diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx
index bce36299..acd398fd 100644
--- a/rsconcept/frontend/src/components/Icons.tsx
+++ b/rsconcept/frontend/src/components/Icons.tsx
@@ -69,9 +69,12 @@ export { IoLibrary as IconLibrary2 } from 'react-icons/io5';
export { BiDiamond as IconTemplates } from 'react-icons/bi';
export { TbHexagons as IconOSS } from 'react-icons/tb';
export { TbHexagon as IconRSForm } from 'react-icons/tb';
-export { TbTopologyRing as IconConsolidation } from 'react-icons/tb';
+export { LuNewspaper as IconDefinition } from 'react-icons/lu';
+export { LuDna as IconTerminology } from 'react-icons/lu';
+export { FaRegHandshake as IconConvention } from 'react-icons/fa6';
export { LiaCloneSolid as IconChild } from 'react-icons/lia';
export { RiParentLine as IconParent } from 'react-icons/ri';
+export { TbTopologyRing as IconConsolidation } from 'react-icons/tb';
export { BiSpa as IconPredecessor } from 'react-icons/bi';
export { LuArchive as IconArchive } from 'react-icons/lu';
export { LuDatabase as IconDatabase } from 'react-icons/lu';
diff --git a/rsconcept/frontend/src/components/ui/IconValue.tsx b/rsconcept/frontend/src/components/ui/ValueIcon.tsx
similarity index 55%
rename from rsconcept/frontend/src/components/ui/IconValue.tsx
rename to rsconcept/frontend/src/components/ui/ValueIcon.tsx
index f7898bf9..23320308 100644
--- a/rsconcept/frontend/src/components/ui/IconValue.tsx
+++ b/rsconcept/frontend/src/components/ui/ValueIcon.tsx
@@ -1,35 +1,47 @@
import clsx from 'clsx';
+import { useMemo } from 'react';
import { globals } from '@/utils/constants';
import { CProps } from '../props';
import MiniButton from './MiniButton';
-interface IconValueProps extends CProps.Styling, CProps.Titled {
+interface ValueIconProps extends CProps.Styling, CProps.Titled {
id?: string;
icon: React.ReactNode;
value: string | number;
+ textClassName?: string;
onClick?: (event: CProps.EventMouse) => void;
+ smallThreshold?: number;
dense?: boolean;
disabled?: boolean;
}
-function IconValue({
+function ValueIcon({
id,
dense,
- value,
icon,
+ value,
+ textClassName,
disabled = true,
title,
titleHtml,
hideTitle,
className,
+ smallThreshold,
onClick,
...restProps
-}: IconValueProps) {
+}: ValueIconProps) {
+ const isSmall = useMemo(() => !smallThreshold || String(value).length < smallThreshold, [value, smallThreshold]);
return (
-
+
{value}
);
}
-export default IconValue;
+export default ValueIcon;
diff --git a/rsconcept/frontend/src/components/ui/LabeledValue.tsx b/rsconcept/frontend/src/components/ui/ValueLabeled.tsx
similarity index 64%
rename from rsconcept/frontend/src/components/ui/LabeledValue.tsx
rename to rsconcept/frontend/src/components/ui/ValueLabeled.tsx
index d7873a97..6aead4f5 100644
--- a/rsconcept/frontend/src/components/ui/LabeledValue.tsx
+++ b/rsconcept/frontend/src/components/ui/ValueLabeled.tsx
@@ -2,14 +2,14 @@ import clsx from 'clsx';
import { CProps } from '../props';
-interface LabeledValueProps extends CProps.Styling {
+interface ValueLabeledProps extends CProps.Styling {
id?: string;
label: string;
text: string | number;
title?: string;
}
-function LabeledValue({ id, label, text, title, className, ...restProps }: LabeledValueProps) {
+function ValueLabeled({ id, label, text, title, className, ...restProps }: ValueLabeledProps) {
return (
{label}
@@ -18,4 +18,4 @@ function LabeledValue({ id, label, text, title, className, ...restProps }: Label
);
}
-export default LabeledValue;
+export default ValueLabeled;
diff --git a/rsconcept/frontend/src/components/ui/ValueStats.tsx b/rsconcept/frontend/src/components/ui/ValueStats.tsx
new file mode 100644
index 00000000..ae123a9c
--- /dev/null
+++ b/rsconcept/frontend/src/components/ui/ValueStats.tsx
@@ -0,0 +1,16 @@
+import { PARAMETER } from '@/utils/constants';
+
+import { CProps } from '../props';
+import ValueIcon from './ValueIcon';
+
+interface ValueStatsProps extends CProps.Styling, CProps.Titled {
+ id: string;
+ icon: React.ReactNode;
+ value: string | number;
+}
+
+function ValueStats(props: ValueStatsProps) {
+ return
;
+}
+
+export default ValueStats;
diff --git a/rsconcept/frontend/src/pages/OssPage/EditorOssCard/OssStats.tsx b/rsconcept/frontend/src/pages/OssPage/EditorOssCard/OssStats.tsx
index ab2ed4a9..1df6d4a0 100644
--- a/rsconcept/frontend/src/pages/OssPage/EditorOssCard/OssStats.tsx
+++ b/rsconcept/frontend/src/pages/OssPage/EditorOssCard/OssStats.tsx
@@ -1,5 +1,5 @@
import Divider from '@/components/ui/Divider';
-import LabeledValue from '@/components/ui/LabeledValue';
+import ValueLabeled from '@/components/ui/ValueLabeled';
import { IOperationSchemaStats } from '@/models/oss';
interface OssStatsProps {
@@ -14,13 +14,13 @@ function OssStats({ stats }: OssStatsProps) {
);
}
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
index c9775724..ea076e1c 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
@@ -79,7 +79,7 @@ function EditorConstituenta({ activeCst, isModified, setIsModified, onOpenEdit }
}
return (
-
+
}
- disabled={disabled}
+ disabled={!controller.isContentEditable || controller.isProcessing}
onClick={() => controller.createCst(activeCst?.cst_type, false)}
/>
- }
value={item.location}
@@ -68,7 +68,7 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
) : null}
) : null}
- }
value={getUserLabel(item.owner)}
@@ -78,7 +78,7 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
/>
-
}
@@ -90,7 +90,7 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
-
}
@@ -98,7 +98,7 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
title='Дата обновления'
/>
-
}
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/EditorRSFormCard.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/EditorRSFormCard.tsx
index f2e77721..25123df6 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/EditorRSFormCard.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/EditorRSFormCard.tsx
@@ -49,7 +49,7 @@ function EditorRSFormCard({ isModified, onDestroy, setIsModified }: EditorRSForm
/>
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx
index abbbf21c..94517280 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx
@@ -1,13 +1,15 @@
import {
IconChild,
+ IconConvention,
+ IconDefinition,
IconPredecessor,
IconStatusError,
IconStatusIncalculable,
IconStatusOK,
- IconStatusProperty
+ IconStatusProperty,
+ IconTerminology
} from '@/components/Icons';
-import IconValue from '@/components/ui/IconValue';
-import LabeledValue from '@/components/ui/LabeledValue';
+import ValueStats from '@/components/ui/ValueStats';
import { type IRSFormStats } from '@/models/rsform';
interface RSFormStatsProps {
@@ -19,120 +21,119 @@ function RSFormStats({ stats }: RSFormStatsProps) {
return null;
}
return (
-
-
-
+
+
+
Всего
{stats.count_all}
-
}
value={stats.count_all - stats.count_inherited}
title='Собственные'
/>
-
}
value={stats.count_inherited}
title='Наследованные'
/>
-
}
value={stats.count_all - stats.count_errors - stats.count_property - stats.count_incalculable}
title='Корректные'
/>
-
}
value={stats.count_errors}
title='Неразмерные'
/>
-
}
value={stats.count_incalculable}
title='Невычислимые'
/>
-
}
value={stats.count_errors}
title='Некорректные'
/>
-
X#}
+ icon={X}
value={stats.count_base}
title='Базисные множества'
/>
- C#}
+ icon={C}
value={stats.count_constant}
title='Константные множества'
/>
- S#}
+ icon={S}
value={stats.count_structured}
title='Родовые структуры'
/>
- A#}
+ icon={A}
value={stats.count_axiom}
title='Аксиомы'
/>
- D#}
+ icon={D}
value={stats.count_term}
title='Термы'
/>
- F#}
+ icon={F}
value={stats.count_function}
title='Терм-функции'
/>
- P#}
+ icon={P}
value={stats.count_predicate}
title='Предикат-функции'
/>
- T#}
+ icon={T}
value={stats.count_theorem}
title='Теоремы'
/>
-
-
-
-
-
+ }
+ value={stats.count_text_term}
+ title='Термины'
+ />
+ }
+ value={stats.count_definition}
+ title='Определения'
+ />
+ }
+ value={stats.count_convention}
+ title='Конвенции'
+ />
);
diff --git a/rsconcept/frontend/src/utils/constants.ts b/rsconcept/frontend/src/utils/constants.ts
index 5895aef4..093f74ee 100644
--- a/rsconcept/frontend/src/utils/constants.ts
+++ b/rsconcept/frontend/src/utils/constants.ts
@@ -30,6 +30,8 @@ export const PARAMETER = {
ossLongLabel: 14, // characters - threshold for long labels - small font
ossTruncateLabel: 28, // characters - threshold for long labels - truncate
+ statSmallThreshold: 3, // characters - threshold for small labels - small font
+
logicLabel: 'LOGIC',
exteorVersion: '4.9.3',