@dartech/arsenal-ui 1.5.97 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.esm.js +1 -1
- package/package.json +1 -2
- package/src/consts/index.d.ts +3 -0
- package/src/interfaces/{definition3.d.ts → dem.d.ts} +59 -2
- package/src/interfaces/index.d.ts +1 -2
- package/src/interfaces/ui.d.ts +1 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +5 -8
- package/src/lib/Definition/CreateDefinition/index.d.ts +0 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +4 -8
- package/src/lib/Definition/DefinitionFiller/index.d.ts +0 -1
- package/src/lib/Definition/{Dem3DefinitionView/Dem3DefinitionView.d.ts → DefinitionView/DefinitionView.d.ts} +2 -2
- package/src/lib/Definition/DefinitionView/index.d.ts +1 -0
- package/src/lib/Definition/index.d.ts +1 -2
- package/src/lib/{Property/PropertyValidator/PropertyValidator.d.ts → DefinitionNode/DemValidator/DemValidator.d.ts} +2 -2
- package/src/lib/DefinitionNode/DemValidator/DemValidatorContext.d.ts +3 -0
- package/src/lib/DefinitionNode/DemValidator/index.d.ts +2 -0
- package/src/lib/DefinitionNode/UpsertNode/NodeAdditionalFields/NodeAdditionalFields.d.ts +1 -2
- package/src/lib/Forms/{ControlAceEditor.d.ts → ControlCodeEditor.d.ts} +3 -3
- package/src/lib/Forms/index.d.ts +1 -1
- package/src/lib/Table/DataGrid/DataGrid.styled.d.ts +1 -1
- package/src/lib/index.d.ts +0 -1
- package/src/utils/dem.d.ts +16 -15
- package/src/utils/index.d.ts +0 -1
- package/src/utils/validators.d.ts +0 -2
- package/src/interfaces/definition.d.ts +0 -174
- package/src/lib/Definition/CreateDefinition/Dem3CreateDefinition.d.ts +0 -23
- package/src/lib/Definition/DefinitionFiller/Dem3DefinitionFiller.d.ts +0 -17
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +0 -8
- package/src/lib/Definition/DefinitionValueView/FileDefinitionValueView.d.ts +0 -8
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +0 -9
- package/src/lib/Definition/DefinitionValueView/index.d.ts +0 -1
- package/src/lib/Definition/Dem3DefinitionView/index.d.ts +0 -1
- package/src/lib/DefinitionNode/ViewNode/PropertyItem.d.ts +0 -9
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyFiller.d.ts +0 -26
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyWidget.d.ts +0 -24
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlPropertyFiller.d.ts +0 -26
- package/src/lib/Property/PropertyFiller/ControlFiller/index.d.ts +0 -3
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +0 -9
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +0 -24
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +0 -22
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +0 -24
- package/src/lib/Property/PropertyFiller/index.d.ts +0 -2
- package/src/lib/Property/PropertyFiller/styled.d.ts +0 -18
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +0 -26
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +0 -3
- package/src/lib/Property/PropertyValidator/index.d.ts +0 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +0 -23
- package/src/lib/Property/PropertyWidget/index.d.ts +0 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/CreatePropertiesList.d.ts +0 -36
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/ListItem.d.ts +0 -29
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/index.d.ts +0 -2
- package/src/lib/Property/UpsertProperty/CreatePropertiesListContext.d.ts +0 -30
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +0 -24
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +0 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +0 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +0 -9
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +0 -22
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +0 -12
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +0 -23
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +0 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/index.d.ts +0 -1
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +0 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +0 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +0 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/FileValueWidget.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +0 -8
- package/src/lib/Property/UpsertProperty/PropertyValueField/PropertyValueField.d.ts +0 -23
- package/src/lib/Property/UpsertProperty/PropertyValueField/StringValueField.d.ts +0 -14
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +0 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/index.d.ts +0 -1
- package/src/lib/Property/UpsertProperty/index.d.ts +0 -4
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +0 -6
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +0 -8
- package/src/lib/Property/ViewPropertiesList/index.d.ts +0 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +0 -7
- package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +0 -8
- package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +0 -7
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +0 -9
- package/src/lib/Property/ViewProperty/ViewProperty.d.ts +0 -9
- package/src/lib/Property/ViewProperty/index.d.ts +0 -1
- package/src/lib/Property/index.d.ts +0 -4
- package/src/utils/dem3.d.ts +0 -28
- package/src/utils/test-mocks.d.ts +0 -166
- /package/src/lib/Definition/{Dem3DefinitionView → DefinitionView}/FileDefinitionValueView.d.ts +0 -0
- /package/src/lib/Definition/{Dem3DefinitionView → DefinitionView}/NodeDataView.d.ts +0 -0
- /package/src/lib/{Property/PropertyValidator → DefinitionNode/DemValidator}/NodeValidator.d.ts +0 -0
- /package/src/lib/{Property/PropertyValidator → DefinitionNode/DemValidator}/NodesList.d.ts +0 -0
- /package/src/lib/{Property/PropertyValidator → DefinitionNode/DemValidator}/NumericTypeValidator.d.ts +0 -0
- /package/src/lib/{Property/PropertyValidator → DefinitionNode/DemValidator}/StringTypeValidator.d.ts +0 -0
- /package/src/lib/{Property/PropertyValidator → DefinitionNode/DemValidator}/ValidationNodeSelector.d.ts +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dartech/arsenal-ui",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.6.0",
|
4
4
|
"author": "DAR",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -21,7 +21,6 @@
|
|
21
21
|
"@emotion/styled": "^11.10.5",
|
22
22
|
"date-fns": "^2.22.1",
|
23
23
|
"duration-fns": "^3.0.2",
|
24
|
-
"ace-builds": "^1.5.3",
|
25
24
|
"react-router-dom": "6.8.0",
|
26
25
|
"react-toastify": "^9.1.1",
|
27
26
|
"classnames": "^2.3.1",
|
package/src/consts/index.d.ts
CHANGED
@@ -12,3 +12,6 @@ export declare const defaultDefinitionObjectValue: {
|
|
12
12
|
};
|
13
13
|
export declare const DEFAULT_REQUIRED_ERROR_TEXT = "Please, fill this field";
|
14
14
|
export declare const DEFAULT_DATE_VALIDATION_ERROR_TEXT = "Incorrect date format";
|
15
|
+
export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
|
16
|
+
export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
|
17
|
+
export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { RoundingMode } from './common';
|
2
|
-
import { UiSettings } from './definition';
|
3
2
|
export declare enum NodeType {
|
4
3
|
STRING = "STRING",
|
5
4
|
INTEGER = "INTEGER",
|
@@ -34,7 +33,7 @@ export interface Node {
|
|
34
33
|
validationNode: unknown | null;
|
35
34
|
key?: string;
|
36
35
|
}
|
37
|
-
export interface
|
36
|
+
export interface Definition<T = Record<string, never>> {
|
38
37
|
code: string;
|
39
38
|
version: number;
|
40
39
|
name: string;
|
@@ -43,6 +42,64 @@ export interface Definition3<T = Record<string, never>> {
|
|
43
42
|
export type ObjectPropertiesType<T = Record<string, never>> = Record<string, NodeUnion & T>;
|
44
43
|
export type ObjectPropertiesArrayType<T = Record<string, never>> = Array<NodeUnion & T>;
|
45
44
|
export type ObjectNodeType<T = Record<string, never>> = NodeUnion & T;
|
45
|
+
export interface UiSettings {
|
46
|
+
label?: string;
|
47
|
+
name?: string;
|
48
|
+
paramJson?: {
|
49
|
+
columns?: number;
|
50
|
+
size?: number;
|
51
|
+
type?: 'email' | 'phone' | 'iin' | 'currency' | 'iban' | 'radio';
|
52
|
+
radioValues?: string[] | {
|
53
|
+
value: string | boolean;
|
54
|
+
label: string;
|
55
|
+
}[];
|
56
|
+
maxLength?: number;
|
57
|
+
placeholder?: string;
|
58
|
+
description?: string;
|
59
|
+
fileRefParams?: {
|
60
|
+
acceptTypes?: string;
|
61
|
+
limit?: number;
|
62
|
+
description?: string;
|
63
|
+
photoUploader?: boolean;
|
64
|
+
};
|
65
|
+
date?: 'gte' | 'lte' | 'gt' | 'lt' | 'current';
|
66
|
+
alphabet?: 'cyrillic' | 'latin';
|
67
|
+
styleProps?: Record<string, any>;
|
68
|
+
withRequestToStateDatabase?: boolean;
|
69
|
+
gbdflDataPath?: string;
|
70
|
+
gbdflDataPath2?: string;
|
71
|
+
itemArrayPriorityValue?: string;
|
72
|
+
itemArrayPriorityKey?: string;
|
73
|
+
itemDataPath?: string;
|
74
|
+
isFirstLetterUppercase?: boolean;
|
75
|
+
replaceGbdflEntityValues?: Record<string, string>;
|
76
|
+
formatDateFrom?: string;
|
77
|
+
formatDateTo?: string;
|
78
|
+
copyValueToField?: string;
|
79
|
+
ifEmptyReplaceWithNull?: boolean;
|
80
|
+
formatToNumber?: boolean;
|
81
|
+
};
|
82
|
+
behaviorJson: {
|
83
|
+
showDependOn?: string;
|
84
|
+
hideDependOn?: string;
|
85
|
+
dynamicEntity?: boolean;
|
86
|
+
filterByEntity?: string;
|
87
|
+
filterField?: string;
|
88
|
+
findEntityByField?: string;
|
89
|
+
findEntityByValue?: string;
|
90
|
+
getEntityField?: string;
|
91
|
+
copyValueFrom?: string;
|
92
|
+
/**
|
93
|
+
* simple q filter for entity reference
|
94
|
+
* `property: 'some.json.path'`
|
95
|
+
*/
|
96
|
+
qFilter?: {
|
97
|
+
property: string;
|
98
|
+
value?: string | number;
|
99
|
+
valueFrom?: string;
|
100
|
+
};
|
101
|
+
};
|
102
|
+
}
|
46
103
|
export interface BigDecimalNode extends Node {
|
47
104
|
nodeType: NodeType.BIG_DECIMAL;
|
48
105
|
precisionScale: number;
|
package/src/interfaces/ui.d.ts
CHANGED
@@ -1,26 +1,23 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { type
|
2
|
+
import { type NodeRefMethods } from '../../DefinitionNode';
|
3
3
|
import { Control } from 'react-hook-form';
|
4
|
-
import {
|
4
|
+
import { EntityReferenceNode } from '../../../interfaces';
|
5
5
|
type Props = {
|
6
6
|
control?: Control<any>;
|
7
7
|
definitionFieldName?: string;
|
8
|
+
isObjectNode?: boolean;
|
8
9
|
title?: string;
|
9
10
|
hideCodeField?: boolean;
|
10
11
|
hideVersionField?: boolean;
|
11
12
|
hideNameField?: boolean;
|
12
13
|
required?: boolean;
|
13
|
-
entityReferenceDefinitionSources?: {
|
14
|
-
label: string;
|
15
|
-
value: string;
|
16
|
-
}[];
|
17
14
|
entityReferenceValueComponent?: React.ElementType<{
|
18
15
|
name: string;
|
19
|
-
|
16
|
+
node: EntityReferenceNode;
|
20
17
|
}>;
|
21
18
|
fileReferenceValueComponent?: React.ElementType<{
|
22
19
|
name: string;
|
23
20
|
}>;
|
24
21
|
};
|
25
|
-
export declare const CreateDefinition: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<
|
22
|
+
export declare const CreateDefinition: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<NodeRefMethods>>;
|
26
23
|
export default CreateDefinition;
|
@@ -1,21 +1,17 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
2
|
+
import { EntityReferenceNode, NodeUnion } from '../../../interfaces';
|
3
3
|
type Props = {
|
4
|
-
|
4
|
+
node: NodeUnion | null;
|
5
5
|
dataFieldName: string;
|
6
6
|
useExpression?: boolean;
|
7
7
|
title?: string;
|
8
|
-
entityReferenceDefinitionSources?: {
|
9
|
-
label: string;
|
10
|
-
value: string;
|
11
|
-
}[];
|
12
8
|
entityReferenceValueComponent?: React.ElementType<{
|
13
9
|
name: string;
|
14
|
-
|
10
|
+
node: EntityReferenceNode;
|
15
11
|
}>;
|
16
12
|
fileReferenceValueComponent?: React.ElementType<{
|
17
13
|
name: string;
|
18
14
|
}>;
|
19
15
|
};
|
20
|
-
export declare const DefinitionFiller: ({
|
16
|
+
export declare const DefinitionFiller: ({ node, dataFieldName, useExpression, title, entityReferenceValueComponent, fileReferenceValueComponent, }: Props) => JSX.Element;
|
21
17
|
export default DefinitionFiller;
|
@@ -4,5 +4,5 @@ type Props = {
|
|
4
4
|
node: NodeUnion;
|
5
5
|
data: unknown;
|
6
6
|
};
|
7
|
-
export declare const
|
8
|
-
export default
|
7
|
+
export declare const DefinitionView: ({ node, data }: Props) => JSX.Element;
|
8
|
+
export default DefinitionView;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './DefinitionView';
|
@@ -6,5 +6,5 @@ type Props = {
|
|
6
6
|
setValue: UseFormSetValue<any>;
|
7
7
|
validator: boolean;
|
8
8
|
};
|
9
|
-
export declare const
|
10
|
-
export default
|
9
|
+
export declare const DemValidator: ({ name, control, setValue, validator }: Props) => JSX.Element;
|
10
|
+
export default DemValidator;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { NodeType } from '../../../../interfaces';
|
2
|
+
import { NodeType, EntityReferenceNode } from '../../../../interfaces';
|
3
3
|
import { UseFormSetValue, Control } from 'react-hook-form';
|
4
|
-
import { EntityReferenceNode } from '../../../../interfaces';
|
5
4
|
type Props = {
|
6
5
|
setValue: UseFormSetValue<any>;
|
7
6
|
control: Control<any>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
import { ReactNode } from 'react';
|
4
|
-
export interface
|
4
|
+
export interface ControlCodeEditorProps {
|
5
5
|
name: string;
|
6
6
|
control: Control<any>;
|
7
7
|
mode?: 'json' | 'javascript' | 'python' | 'text';
|
@@ -19,5 +19,5 @@ export interface ControlAceEditorProps {
|
|
19
19
|
[key: string]: unknown;
|
20
20
|
useCleanValue?: boolean;
|
21
21
|
}
|
22
|
-
export declare const
|
23
|
-
export default
|
22
|
+
export declare const ControlCodeEditor: import("react").ForwardRefExoticComponent<Omit<ControlCodeEditorProps, "ref"> & import("react").RefAttributes<ReactCodeMirrorRef>>;
|
23
|
+
export default ControlCodeEditor;
|
package/src/lib/Forms/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export * from './ControlRadio';
|
|
6
6
|
export * from './ControlAutocomplete';
|
7
7
|
export * from './CopyButton';
|
8
8
|
export * from './BackButton';
|
9
|
-
export * from './
|
9
|
+
export * from './ControlCodeEditor';
|
10
10
|
export * from './ControlNumberInput';
|
11
11
|
export * from './ControlSwitch';
|
12
12
|
export * from './ControlDate';
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export declare const StyledDataGrid: import("@emotion/styled").StyledComponent<Omit<Partial<import("@mui/x-data-grid/
|
2
|
+
export declare const StyledDataGrid: import("@emotion/styled").StyledComponent<Omit<Partial<import("@mui/x-data-grid/internals").DataGridPropsWithDefaultValues<import("@mui/x-data-grid").GridValidRowModel>> & import("@mui/x-data-grid/internals").DataGridPropsWithComplexDefaultValueBeforeProcessing & import("@mui/x-data-grid/internals").DataGridPropsWithoutDefaultValue<import("@mui/x-data-grid").GridValidRowModel>, import("@mui/x-data-grid/internals").DataGridForcedPropsKey> & {
|
3
3
|
pagination?: true;
|
4
4
|
} & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
package/src/lib/index.d.ts
CHANGED
package/src/utils/dem.d.ts
CHANGED
@@ -1,27 +1,28 @@
|
|
1
|
-
import {
|
2
|
-
export declare const
|
3
|
-
export declare const
|
4
|
-
export declare const
|
5
|
-
export declare function
|
6
|
-
[key: string]:
|
7
|
-
}):
|
8
|
-
export declare const
|
9
|
-
export declare const
|
10
|
-
export declare const
|
11
|
-
|
1
|
+
import { NodeType, ObjectNode, NodeUnion, NodeFillType } from '../interfaces';
|
2
|
+
export declare const isValueEmpty: (value: unknown) => boolean;
|
3
|
+
export declare const formatDefinitionNodeData: (node: Partial<NodeUnion>, data: unknown) => {};
|
4
|
+
export declare const nodePropertiesArrayToObject: <T extends NodeUnion = NodeUnion>(node: T, isGlobalParameter?: boolean) => T;
|
5
|
+
export declare function nodePropertiesObjectToArray<T extends NodeUnion = NodeUnion>(node: T, fields?: {
|
6
|
+
[key: string]: any;
|
7
|
+
}): T;
|
8
|
+
export declare const getDemNodeDateFormat: (defaultFormat: string, propertyFormat: string) => string;
|
9
|
+
export declare const getObjectStarterValue: (node: ObjectNode) => any;
|
10
|
+
export declare const getMultipleNodeFillOptions: ({ nodeType, useExpression, required, }: {
|
11
|
+
nodeType: NodeType;
|
12
12
|
required: boolean;
|
13
13
|
useExpression?: boolean;
|
14
14
|
}) => {
|
15
|
-
value:
|
15
|
+
value: NodeFillType;
|
16
16
|
label: string;
|
17
17
|
sortOrder: number;
|
18
18
|
}[];
|
19
|
-
export declare const
|
20
|
-
|
19
|
+
export declare const getNodeType: (node: Partial<NodeUnion>) => NodeType;
|
20
|
+
export declare const getSingleNodeFillOptions: ({ nodeType, useExpression, required, }: {
|
21
|
+
nodeType: NodeType;
|
21
22
|
required: boolean;
|
22
23
|
useExpression?: boolean;
|
23
24
|
}) => {
|
24
|
-
value:
|
25
|
+
value: NodeFillType;
|
25
26
|
label: string;
|
26
27
|
sortOrder: number;
|
27
28
|
}[];
|
package/src/utils/index.d.ts
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
import { PropertyType } from '../interfaces';
|
2
1
|
export declare const digitsOnly: RegExp;
|
3
2
|
export declare const floatsOnly: RegExp;
|
4
3
|
export declare const isExpression: (value: unknown, useRecursion?: boolean) => boolean;
|
5
|
-
export declare const isDateType: (propertyType: PropertyType) => boolean;
|
6
4
|
export declare const numberFormat: Intl.NumberFormat;
|
@@ -1,174 +0,0 @@
|
|
1
|
-
import { RoundingMode } from './common';
|
2
|
-
export declare enum PropertyType {
|
3
|
-
STRING = "STRING",
|
4
|
-
INTEGER = "INTEGER",
|
5
|
-
BIG_INTEGER = "BIG_INTEGER",
|
6
|
-
BIG_DECIMAL = "BIG_DECIMAL",
|
7
|
-
FLOAT = "FLOAT",
|
8
|
-
LONG = "LONG",
|
9
|
-
DOUBLE = "DOUBLE",
|
10
|
-
BOOLEAN = "BOOLEAN",
|
11
|
-
ENTITY_REFERENCE = "ENTITY_REFERENCE",
|
12
|
-
ENTITY = "ENTITY",
|
13
|
-
FILE = "FILE",
|
14
|
-
FILE_REFERENCE = "FILE_REFERENCE",
|
15
|
-
JSON = "JSON",
|
16
|
-
DATE = "DATE",
|
17
|
-
TIME = "TIME",
|
18
|
-
DATE_TIME = "DATE_TIME",
|
19
|
-
ANY = "ANY"
|
20
|
-
}
|
21
|
-
export interface Definition<T = Record<string, never>> {
|
22
|
-
code: string;
|
23
|
-
version: number;
|
24
|
-
name: string;
|
25
|
-
properties: PropertiesObjectType<T>;
|
26
|
-
}
|
27
|
-
export type PropertiesObjectType<T = Record<string, never>> = Record<string, PropertyUnion & T>;
|
28
|
-
export type PropertiesArrayType<T = Record<string, never>> = Array<PropertyUnion & T>;
|
29
|
-
export interface CreateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
30
|
-
properties: PropertiesArrayType<T>;
|
31
|
-
}
|
32
|
-
export interface UpdateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
33
|
-
properties: PropertiesArrayType<T>;
|
34
|
-
}
|
35
|
-
export interface UiSettings {
|
36
|
-
label?: string;
|
37
|
-
name?: string;
|
38
|
-
paramJson?: {
|
39
|
-
columns?: number;
|
40
|
-
size?: number;
|
41
|
-
type?: 'email' | 'phone' | 'iin' | 'currency' | 'iban' | 'radio';
|
42
|
-
radioValues?: string[] | {
|
43
|
-
value: string | boolean;
|
44
|
-
label: string;
|
45
|
-
}[];
|
46
|
-
maxLength?: number;
|
47
|
-
placeholder?: string;
|
48
|
-
description?: string;
|
49
|
-
fileRefParams?: {
|
50
|
-
acceptTypes?: string;
|
51
|
-
limit?: number;
|
52
|
-
description?: string;
|
53
|
-
photoUploader?: boolean;
|
54
|
-
};
|
55
|
-
date?: 'gte' | 'lte' | 'gt' | 'lt' | 'current';
|
56
|
-
alphabet?: 'cyrillic' | 'latin';
|
57
|
-
styleProps?: Record<string, any>;
|
58
|
-
withRequestToStateDatabase?: boolean;
|
59
|
-
gbdflDataPath?: string;
|
60
|
-
gbdflDataPath2?: string;
|
61
|
-
itemArrayPriorityValue?: string;
|
62
|
-
itemArrayPriorityKey?: string;
|
63
|
-
itemDataPath?: string;
|
64
|
-
isFirstLetterUppercase?: boolean;
|
65
|
-
replaceGbdflEntityValues?: Record<string, string>;
|
66
|
-
formatDateFrom?: string;
|
67
|
-
formatDateTo?: string;
|
68
|
-
copyValueToField?: string;
|
69
|
-
ifEmptyReplaceWithNull?: boolean;
|
70
|
-
formatToNumber?: boolean;
|
71
|
-
};
|
72
|
-
behaviorJson: {
|
73
|
-
showDependOn?: string;
|
74
|
-
hideDependOn?: string;
|
75
|
-
dynamicEntity?: boolean;
|
76
|
-
filterByEntity?: string;
|
77
|
-
filterField?: string;
|
78
|
-
findEntityByField?: string;
|
79
|
-
findEntityByValue?: string;
|
80
|
-
getEntityField?: string;
|
81
|
-
copyValueFrom?: string;
|
82
|
-
/**
|
83
|
-
* simple q filter for entity reference
|
84
|
-
* `property: 'some.json.path'`
|
85
|
-
*/
|
86
|
-
qFilter?: {
|
87
|
-
property: string;
|
88
|
-
value?: string | number;
|
89
|
-
valueFrom?: string;
|
90
|
-
};
|
91
|
-
};
|
92
|
-
}
|
93
|
-
export interface Property {
|
94
|
-
propertyType: keyof typeof PropertyType | {
|
95
|
-
value: keyof typeof PropertyType;
|
96
|
-
};
|
97
|
-
name: string;
|
98
|
-
defaultValue: unknown;
|
99
|
-
defaultValues: unknown[];
|
100
|
-
isRequired: boolean;
|
101
|
-
isMultiple: boolean;
|
102
|
-
sortOrder: number;
|
103
|
-
isEnabled: boolean;
|
104
|
-
uiSettings: UiSettings | null;
|
105
|
-
validationNode: unknown | null;
|
106
|
-
key?: string;
|
107
|
-
}
|
108
|
-
export interface BigDecimalProperty extends Property {
|
109
|
-
propertyType: PropertyType.BIG_DECIMAL;
|
110
|
-
precisionScale: number;
|
111
|
-
roundingMode: keyof typeof RoundingMode;
|
112
|
-
}
|
113
|
-
export interface BigIntegerProperty extends Property {
|
114
|
-
propertyType: PropertyType.BIG_INTEGER;
|
115
|
-
}
|
116
|
-
export interface BooleanProperty extends Property {
|
117
|
-
propertyType: PropertyType.BOOLEAN;
|
118
|
-
}
|
119
|
-
export interface DateProperty extends Property {
|
120
|
-
propertyType: PropertyType.DATE;
|
121
|
-
format: string;
|
122
|
-
}
|
123
|
-
export interface DateTimeProperty extends Property {
|
124
|
-
propertyType: PropertyType.DATE_TIME;
|
125
|
-
format: string;
|
126
|
-
}
|
127
|
-
export interface DoubleProperty extends Property {
|
128
|
-
propertyType: PropertyType.DOUBLE;
|
129
|
-
}
|
130
|
-
export interface EntityTypeProperty<T = Record<string, never>> extends Property {
|
131
|
-
propertyType: PropertyType.ENTITY;
|
132
|
-
properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
|
133
|
-
}
|
134
|
-
export interface EntityReferenceProperty extends Property {
|
135
|
-
propertyType: PropertyType.ENTITY_REFERENCE;
|
136
|
-
source: string;
|
137
|
-
definitionCode: string;
|
138
|
-
definitionVersion: string;
|
139
|
-
labelPropertyCode: string;
|
140
|
-
valuePropertyCode: string;
|
141
|
-
}
|
142
|
-
export interface FloatProperty extends Property {
|
143
|
-
propertyType: PropertyType.FLOAT;
|
144
|
-
}
|
145
|
-
export interface StringProperty extends Property {
|
146
|
-
propertyType: PropertyType.STRING;
|
147
|
-
restrictedValues: string[];
|
148
|
-
}
|
149
|
-
export interface IntegerProperty extends Property {
|
150
|
-
propertyType: PropertyType.INTEGER;
|
151
|
-
}
|
152
|
-
export interface JsonProperty extends Property {
|
153
|
-
propertyType: PropertyType.JSON;
|
154
|
-
}
|
155
|
-
export interface LongProperty extends Property {
|
156
|
-
propertyType: PropertyType.LONG;
|
157
|
-
}
|
158
|
-
export interface TimeProperty extends Property {
|
159
|
-
propertyType: PropertyType.TIME;
|
160
|
-
format: string;
|
161
|
-
}
|
162
|
-
export interface AnyProperty extends Property {
|
163
|
-
propertyType: PropertyType.ANY;
|
164
|
-
}
|
165
|
-
export interface FileProperty extends Property {
|
166
|
-
propertyType: PropertyType.FILE;
|
167
|
-
}
|
168
|
-
export interface FileReferenceProperty extends Property {
|
169
|
-
propertyType: PropertyType.FILE_REFERENCE;
|
170
|
-
}
|
171
|
-
export type PropertyUnion<T = Record<string, never>> = BigDecimalProperty | BigIntegerProperty | BooleanProperty | DateProperty | DateTimeProperty | DoubleProperty | EntityTypeProperty<T> | EntityReferenceProperty | FloatProperty | StringProperty | IntegerProperty | JsonProperty | LongProperty | TimeProperty | AnyProperty | EntityReferenceProperty | FileProperty | FileReferenceProperty;
|
172
|
-
export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
|
173
|
-
export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
|
174
|
-
export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { type NodeRefMethods } from '../../DefinitionNode';
|
3
|
-
import { Control } from 'react-hook-form';
|
4
|
-
import { EntityReferenceNode } from '../../../interfaces';
|
5
|
-
type Props = {
|
6
|
-
control?: Control<any>;
|
7
|
-
definitionFieldName?: string;
|
8
|
-
isObjectNode?: boolean;
|
9
|
-
title?: string;
|
10
|
-
hideCodeField?: boolean;
|
11
|
-
hideVersionField?: boolean;
|
12
|
-
hideNameField?: boolean;
|
13
|
-
required?: boolean;
|
14
|
-
entityReferenceValueComponent?: React.ElementType<{
|
15
|
-
name: string;
|
16
|
-
node: EntityReferenceNode;
|
17
|
-
}>;
|
18
|
-
fileReferenceValueComponent?: React.ElementType<{
|
19
|
-
name: string;
|
20
|
-
}>;
|
21
|
-
};
|
22
|
-
export declare const Dem3CreateDefinition: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<NodeRefMethods>>;
|
23
|
-
export default Dem3CreateDefinition;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { EntityReferenceNode, NodeUnion } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
node: NodeUnion | null;
|
5
|
-
dataFieldName: string;
|
6
|
-
useExpression?: boolean;
|
7
|
-
title?: string;
|
8
|
-
entityReferenceValueComponent?: React.ElementType<{
|
9
|
-
name: string;
|
10
|
-
node: EntityReferenceNode;
|
11
|
-
}>;
|
12
|
-
fileReferenceValueComponent?: React.ElementType<{
|
13
|
-
name: string;
|
14
|
-
}>;
|
15
|
-
};
|
16
|
-
export declare const Dem3DefinitionFiller: ({ node, dataFieldName, useExpression, title, entityReferenceValueComponent, fileReferenceValueComponent, }: Props) => JSX.Element;
|
17
|
-
export default Dem3DefinitionFiller;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { PropertiesArrayType } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
properties: PropertiesArrayType<unknown>;
|
5
|
-
data: unknown;
|
6
|
-
};
|
7
|
-
export declare const DefinitionValueView: ({ properties, data }: Props) => JSX.Element;
|
8
|
-
export default DefinitionValueView;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FileProperty } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
property: FileProperty;
|
5
|
-
data: string;
|
6
|
-
};
|
7
|
-
declare const FileDefinitionValueView: ({ property, data }: Props) => JSX.Element;
|
8
|
-
export default FileDefinitionValueView;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { PropertyUnion } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
property: PropertyUnion;
|
5
|
-
data: unknown;
|
6
|
-
hasBackground?: boolean;
|
7
|
-
};
|
8
|
-
export declare const PropertyDataView: ({ property, data, hasBackground, }: Props) => JSX.Element;
|
9
|
-
export default PropertyDataView;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './DefinitionValueView';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Dem3DefinitionView';
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { PropertyUnion } from '../../../interfaces';
|
3
|
-
type PropertyItemProps = {
|
4
|
-
property: PropertyUnion;
|
5
|
-
showName: boolean;
|
6
|
-
showType: boolean;
|
7
|
-
};
|
8
|
-
declare const PropertyItem: ({ property, showName, showType }: PropertyItemProps) => JSX.Element;
|
9
|
-
export default PropertyItem;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
import { EntityReferenceProperty, PropertyUnion } from '../../../../interfaces';
|
4
|
-
type Props = {
|
5
|
-
control: Control<any>;
|
6
|
-
property: PropertyUnion;
|
7
|
-
name: string;
|
8
|
-
useExpression?: boolean;
|
9
|
-
required?: boolean;
|
10
|
-
label?: string;
|
11
|
-
title?: string;
|
12
|
-
entityReferenceDefinitionSources?: {
|
13
|
-
label: string;
|
14
|
-
value: string;
|
15
|
-
}[];
|
16
|
-
entityReferenceValueComponent?: React.ElementType<{
|
17
|
-
name: string;
|
18
|
-
property: EntityReferenceProperty;
|
19
|
-
}>;
|
20
|
-
fileReferenceValueComponent?: React.ElementType<{
|
21
|
-
name: string;
|
22
|
-
}>;
|
23
|
-
requiredErrorText?: string;
|
24
|
-
};
|
25
|
-
export declare const ControlMultiplePropertyFiller: ({ control, property, name, useExpression, required, label, title, entityReferenceDefinitionSources, entityReferenceValueComponent, fileReferenceValueComponent, requiredErrorText, }: Props) => JSX.Element;
|
26
|
-
export default ControlMultiplePropertyFiller;
|