@dartech/arsenal-ui 1.4.87 → 1.4.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. package/index.d.ts +5 -5
  2. package/index.js +8487 -0
  3. package/package.json +10 -4
  4. package/src/consts/index.d.ts +14 -14
  5. package/src/interfaces/common.d.ts +24 -24
  6. package/src/interfaces/definition.d.ts +142 -142
  7. package/src/interfaces/index.d.ts +3 -3
  8. package/src/interfaces/ui.d.ts +73 -73
  9. package/src/lib/Alert/Alert.d.ts +55 -55
  10. package/src/lib/Alert/index.d.ts +1 -1
  11. package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +9 -8
  12. package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +2 -2
  13. package/src/lib/Breadcrumbs/index.d.ts +1 -1
  14. package/src/lib/ContentLayout/ContentLayout.d.ts +10 -10
  15. package/src/lib/ContentLayout/index.d.ts +1 -1
  16. package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +26 -26
  17. package/src/lib/Definition/CreateDefinition/index.d.ts +1 -1
  18. package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +21 -21
  19. package/src/lib/Definition/DefinitionFiller/index.d.ts +1 -1
  20. package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +8 -7
  21. package/src/lib/Definition/DefinitionValueView/FileDefinitionValueView.d.ts +8 -7
  22. package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +9 -8
  23. package/src/lib/Definition/DefinitionValueView/index.d.ts +1 -1
  24. package/src/lib/Definition/index.d.ts +3 -3
  25. package/src/lib/Forms/BackButton.d.ts +7 -6
  26. package/src/lib/Forms/ControlAceEditor.d.ts +23 -23
  27. package/src/lib/Forms/ControlArrayInput.d.ts +14 -14
  28. package/src/lib/Forms/ControlAutocomplete/ControlAutocomplete.d.ts +74 -74
  29. package/src/lib/Forms/ControlAutocomplete/ControlQueryAutocomplete.d.ts +20 -20
  30. package/src/lib/Forms/ControlAutocomplete/index.d.ts +2 -2
  31. package/src/lib/Forms/ControlAutocomplete/useAutocomplete.d.ts +10 -9
  32. package/src/lib/Forms/ControlCheckbox.d.ts +51 -51
  33. package/src/lib/Forms/ControlDate.d.ts +26 -26
  34. package/src/lib/Forms/ControlDateTime.d.ts +26 -26
  35. package/src/lib/Forms/ControlDebouncedInput.d.ts +4 -3
  36. package/src/lib/Forms/ControlInput.d.ts +63 -63
  37. package/src/lib/Forms/ControlNumberInput.d.ts +72 -72
  38. package/src/lib/Forms/ControlPeriodInput.d.ts +11 -11
  39. package/src/lib/Forms/ControlPhoneInput.d.ts +17 -17
  40. package/src/lib/Forms/ControlRadio.d.ts +70 -70
  41. package/src/lib/Forms/ControlSelect.d.ts +72 -72
  42. package/src/lib/Forms/ControlSwitch.d.ts +19 -19
  43. package/src/lib/Forms/ControlTime.d.ts +24 -24
  44. package/src/lib/Forms/CopyButton.d.ts +20 -19
  45. package/src/lib/Forms/index.d.ts +17 -17
  46. package/src/lib/InfoItem/InfoItem.d.ts +8 -7
  47. package/src/lib/InfoItem/index.d.ts +1 -1
  48. package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +10 -9
  49. package/src/lib/JsonPathPicker/PropertyStep.d.ts +11 -10
  50. package/src/lib/JsonPathPicker/index.d.ts +1 -1
  51. package/src/lib/JsonView/JsonView.d.ts +9 -9
  52. package/src/lib/JsonView/index.d.ts +1 -1
  53. package/src/lib/Loader/Loader.d.ts +22 -21
  54. package/src/lib/Loader/index.d.ts +1 -1
  55. package/src/lib/Modals/JsonModalView.d.ts +12 -12
  56. package/src/lib/Modals/index.d.ts +1 -1
  57. package/src/lib/OverflowTooltip/OverflowTooltip.d.ts +4 -3
  58. package/src/lib/OverflowTooltip/index.d.ts +1 -1
  59. package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyFiller.d.ts +26 -26
  60. package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyWidget.d.ts +24 -24
  61. package/src/lib/Property/PropertyFiller/ControlFiller/ControlPropertyFiller.d.ts +26 -26
  62. package/src/lib/Property/PropertyFiller/ControlFiller/index.d.ts +3 -3
  63. package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +9 -9
  64. package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +24 -24
  65. package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +22 -22
  66. package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +24 -24
  67. package/src/lib/Property/PropertyFiller/index.d.ts +2 -2
  68. package/src/lib/Property/PropertyFiller/styled.d.ts +18 -18
  69. package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +26 -26
  70. package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +6 -5
  71. package/src/lib/Property/PropertyValidator/NodesList.d.ts +6 -5
  72. package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +8 -7
  73. package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +6 -5
  74. package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +3 -3
  75. package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +8 -7
  76. package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +7 -6
  77. package/src/lib/Property/PropertyValidator/index.d.ts +1 -1
  78. package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +23 -23
  79. package/src/lib/Property/PropertyWidget/index.d.ts +1 -1
  80. package/src/lib/Property/UpsertProperty/CreatePropertiesList/CreatePropertiesList.d.ts +36 -36
  81. package/src/lib/Property/UpsertProperty/CreatePropertiesList/ListItem.d.ts +29 -29
  82. package/src/lib/Property/UpsertProperty/CreatePropertiesList/index.d.ts +2 -2
  83. package/src/lib/Property/UpsertProperty/CreatePropertiesListContext.d.ts +30 -30
  84. package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +24 -24
  85. package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +7 -6
  86. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +8 -7
  87. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +9 -8
  88. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +22 -22
  89. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +12 -11
  90. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +23 -23
  91. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +8 -7
  92. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/index.d.ts +1 -1
  93. package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +8 -8
  94. package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +8 -8
  95. package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +8 -8
  96. package/src/lib/Property/UpsertProperty/PropertyValueField/FileValueWidget.d.ts +6 -5
  97. package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +7 -7
  98. package/src/lib/Property/UpsertProperty/PropertyValueField/PropertyValueField.d.ts +23 -23
  99. package/src/lib/Property/UpsertProperty/PropertyValueField/StringValueField.d.ts +14 -13
  100. package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +8 -8
  101. package/src/lib/Property/UpsertProperty/PropertyValueField/index.d.ts +1 -1
  102. package/src/lib/Property/UpsertProperty/index.d.ts +4 -4
  103. package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +6 -6
  104. package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +8 -7
  105. package/src/lib/Property/ViewPropertiesList/index.d.ts +1 -1
  106. package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +7 -6
  107. package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +8 -8
  108. package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +7 -6
  109. package/src/lib/Property/ViewProperty/PropertyItem.d.ts +8 -8
  110. package/src/lib/Property/ViewProperty/ViewProperty.d.ts +9 -8
  111. package/src/lib/Property/ViewProperty/index.d.ts +1 -1
  112. package/src/lib/Property/index.d.ts +4 -4
  113. package/src/lib/Sidebar/Sidebar.d.ts +14 -14
  114. package/src/lib/Sidebar/Sidebar.styled.d.ts +118 -118
  115. package/src/lib/Sidebar/SidebarContext.d.ts +12 -12
  116. package/src/lib/Sidebar/SidebarDrawer.d.ts +13 -13
  117. package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +7 -6
  118. package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +8 -7
  119. package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +9 -8
  120. package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +11 -10
  121. package/src/lib/Sidebar/SidebarLink/SidebarRootItem.d.ts +11 -10
  122. package/src/lib/Sidebar/SidebarLink/index.d.ts +2 -2
  123. package/src/lib/Sidebar/index.d.ts +2 -2
  124. package/src/lib/Status/Status.d.ts +8 -7
  125. package/src/lib/Status/index.d.ts +1 -1
  126. package/src/lib/StepperView/StepperView.d.ts +11 -11
  127. package/src/lib/StepperView/index.d.ts +1 -1
  128. package/src/lib/Table/DataGrid/DataGrid.styled.d.ts +4 -4
  129. package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +7 -6
  130. package/src/lib/Table/DataGrid/Table.d.ts +47 -47
  131. package/src/lib/Table/DataGrid/TableAction.d.ts +13 -13
  132. package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +3 -2
  133. package/src/lib/Table/DataGrid/TablePagination.d.ts +3 -2
  134. package/src/lib/Table/DataGrid/index.d.ts +2 -2
  135. package/src/lib/Table/DataGrid/usePagination.d.ts +5 -5
  136. package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +11 -11
  137. package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +6 -6
  138. package/src/lib/Table/SimpleTable/SimpleTable.d.ts +19 -19
  139. package/src/lib/Table/SimpleTable/Table.styled.d.ts +30 -30
  140. package/src/lib/Table/SimpleTable/TableActionCell.d.ts +10 -10
  141. package/src/lib/Table/SimpleTable/index.d.ts +2 -2
  142. package/src/lib/Table/SimpleTable/useTablePagination.d.ts +7 -7
  143. package/src/lib/Table/SimpleTable/useTableSorting.d.ts +6 -6
  144. package/src/lib/Table/index.d.ts +2 -2
  145. package/src/lib/Tabs/RouteTabs.d.ts +11 -11
  146. package/src/lib/Tabs/TabPanel.d.ts +25 -25
  147. package/src/lib/Tabs/index.d.ts +2 -2
  148. package/src/lib/index.d.ts +17 -17
  149. package/src/theme/baseTheme.d.ts +2 -2
  150. package/src/theme/index.d.ts +1 -1
  151. package/src/theme/inputThemeOptions.d.ts +201 -200
  152. package/src/theme/stepperThemeOptions.d.ts +16 -16
  153. package/src/theme/tableThemeOptions.d.ts +159 -159
  154. package/src/theme/typographyThemeOptions.d.ts +29 -29
  155. package/src/utils/common.d.ts +7 -7
  156. package/src/utils/dem.d.ts +27 -27
  157. package/src/utils/hooks.d.ts +7 -7
  158. package/src/utils/index.d.ts +5 -5
  159. package/src/utils/test-mocks.d.ts +166 -166
  160. package/src/utils/ui-utils.d.ts +17 -17
  161. package/src/utils/validators.d.ts +6 -6
  162. package/index.cjs.d.ts +0 -1
  163. package/index.cjs.js +0 -1
  164. package/index.esm.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.87",
3
+ "version": "1.4.88",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,8 +26,14 @@
26
26
  "react-toastify": "^9.1.1",
27
27
  "classnames": "^2.3.1",
28
28
  "@tanstack/react-query": "^4.24.10",
29
- "react-input-mask": "^3.0.0-alpha.2"
29
+ "@rollup/plugin-node-resolve": "13.3.0",
30
+ "lodash": "4.17.21",
31
+ "qs": "6.11.0",
32
+ "react-input-mask": "3.0.0-alpha.2"
30
33
  },
31
- "module": "./index.esm.js",
32
- "main": "./index.cjs.js"
34
+ "module": "./index.js",
35
+ "main": "./index.js",
36
+ "type": "module",
37
+ "types": "./index.d.ts",
38
+ "peerDependencies": {}
33
39
  }
@@ -1,14 +1,14 @@
1
- export declare const defaultDefinitionArrayValue: {
2
- code: string;
3
- name: string;
4
- version: number;
5
- properties: any[];
6
- };
7
- export declare const defaultDefinitionObjectValue: {
8
- code: string;
9
- name: string;
10
- version: number;
11
- properties: {};
12
- };
13
- export declare const DEFAULT_REQUIRED_ERROR_TEXT = "Please, fill this field";
14
- export declare const DEFAULT_DATE_VALIDATION_ERROR_TEXT = "Incorrect date format";
1
+ export declare const defaultDefinitionArrayValue: {
2
+ code: string;
3
+ name: string;
4
+ version: number;
5
+ properties: any[];
6
+ };
7
+ export declare const defaultDefinitionObjectValue: {
8
+ code: string;
9
+ name: string;
10
+ version: number;
11
+ properties: {};
12
+ };
13
+ export declare const DEFAULT_REQUIRED_ERROR_TEXT = "Please, fill this field";
14
+ export declare const DEFAULT_DATE_VALIDATION_ERROR_TEXT = "Incorrect date format";
@@ -1,24 +1,24 @@
1
- export declare enum RoundingMode {
2
- UP = "UP",
3
- DOWN = "DOWN",
4
- CEILING = "CEILING",
5
- FLOOR = "FLOOR",
6
- HALF_UP = "HALF_UP",
7
- HALF_DOWN = "HALF_DOWN",
8
- HALF_EVEN = "HALF_EVEN",
9
- UNNECESSARY = "UNNECESSARY"
10
- }
11
- export interface PaginateData<T> {
12
- collection: T[];
13
- totalItems: number;
14
- totalPages: number;
15
- total?: number;
16
- pageNumber: number;
17
- }
18
- export interface PeriodObject {
19
- years?: number;
20
- months?: number;
21
- days?: number;
22
- hours?: number;
23
- minutes?: number;
24
- }
1
+ export declare enum RoundingMode {
2
+ UP = "UP",
3
+ DOWN = "DOWN",
4
+ CEILING = "CEILING",
5
+ FLOOR = "FLOOR",
6
+ HALF_UP = "HALF_UP",
7
+ HALF_DOWN = "HALF_DOWN",
8
+ HALF_EVEN = "HALF_EVEN",
9
+ UNNECESSARY = "UNNECESSARY"
10
+ }
11
+ export interface PaginateData<T> {
12
+ collection: T[];
13
+ totalItems: number;
14
+ totalPages: number;
15
+ total?: number;
16
+ pageNumber: number;
17
+ }
18
+ export interface PeriodObject {
19
+ years?: number;
20
+ months?: number;
21
+ days?: number;
22
+ hours?: number;
23
+ minutes?: number;
24
+ }
@@ -1,142 +1,142 @@
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
- fileRefParams?: {
49
- acceptTypes?: string;
50
- limit?: number;
51
- description?: string;
52
- photoUploader?: boolean;
53
- };
54
- };
55
- behaviorJson: {
56
- showDependOn?: string;
57
- hideDependOn?: string;
58
- dynamicEntity?: boolean;
59
- };
60
- }
61
- export interface Property {
62
- propertyType: keyof typeof PropertyType | {
63
- value: keyof typeof PropertyType;
64
- };
65
- name: string;
66
- defaultValue: unknown;
67
- defaultValues: unknown[];
68
- isRequired: boolean;
69
- isMultiple: boolean;
70
- sortOrder: number;
71
- isEnabled: boolean;
72
- uiSettings: UiSettings | null;
73
- validationNode: unknown;
74
- key?: string;
75
- }
76
- export interface BigDecimalProperty extends Property {
77
- propertyType: PropertyType.BIG_DECIMAL;
78
- precisionScale: number;
79
- roundingMode: keyof typeof RoundingMode;
80
- }
81
- export interface BigIntegerProperty extends Property {
82
- propertyType: PropertyType.BIG_INTEGER;
83
- }
84
- export interface BooleanProperty extends Property {
85
- propertyType: PropertyType.BOOLEAN;
86
- }
87
- export interface DateProperty extends Property {
88
- propertyType: PropertyType.DATE;
89
- format: string;
90
- }
91
- export interface DateTimeProperty extends Property {
92
- propertyType: PropertyType.DATE_TIME;
93
- format: string;
94
- }
95
- export interface DoubleProperty extends Property {
96
- propertyType: PropertyType.DOUBLE;
97
- }
98
- export interface EntityTypeProperty<T = Record<string, never>> extends Property {
99
- propertyType: PropertyType.ENTITY;
100
- properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
101
- }
102
- export interface EntityReferenceProperty extends Property {
103
- propertyType: PropertyType.ENTITY_REFERENCE;
104
- source: string;
105
- definitionCode: string;
106
- definitionVersion: string;
107
- labelPropertyCode: string;
108
- valuePropertyCode: string;
109
- }
110
- export interface FloatProperty extends Property {
111
- propertyType: PropertyType.FLOAT;
112
- }
113
- export interface StringProperty extends Property {
114
- propertyType: PropertyType.STRING;
115
- restrictedValues: string[];
116
- }
117
- export interface IntegerProperty extends Property {
118
- propertyType: PropertyType.INTEGER;
119
- }
120
- export interface JsonProperty extends Property {
121
- propertyType: PropertyType.JSON;
122
- }
123
- export interface LongProperty extends Property {
124
- propertyType: PropertyType.LONG;
125
- }
126
- export interface TimeProperty extends Property {
127
- propertyType: PropertyType.TIME;
128
- format: string;
129
- }
130
- export interface AnyProperty extends Property {
131
- propertyType: PropertyType.ANY;
132
- }
133
- export interface FileProperty extends Property {
134
- propertyType: PropertyType.FILE;
135
- }
136
- export interface FileReferenceProperty extends Property {
137
- propertyType: PropertyType.FILE_REFERENCE;
138
- }
139
- 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;
140
- export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
141
- export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
142
- export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
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
+ fileRefParams?: {
49
+ acceptTypes?: string;
50
+ limit?: number;
51
+ description?: string;
52
+ photoUploader?: boolean;
53
+ };
54
+ };
55
+ behaviorJson: {
56
+ showDependOn?: string;
57
+ hideDependOn?: string;
58
+ dynamicEntity?: boolean;
59
+ };
60
+ }
61
+ export interface Property {
62
+ propertyType: keyof typeof PropertyType | {
63
+ value: keyof typeof PropertyType;
64
+ };
65
+ name: string;
66
+ defaultValue: unknown;
67
+ defaultValues: unknown[];
68
+ isRequired: boolean;
69
+ isMultiple: boolean;
70
+ sortOrder: number;
71
+ isEnabled: boolean;
72
+ uiSettings: UiSettings | null;
73
+ validationNode: unknown;
74
+ key?: string;
75
+ }
76
+ export interface BigDecimalProperty extends Property {
77
+ propertyType: PropertyType.BIG_DECIMAL;
78
+ precisionScale: number;
79
+ roundingMode: keyof typeof RoundingMode;
80
+ }
81
+ export interface BigIntegerProperty extends Property {
82
+ propertyType: PropertyType.BIG_INTEGER;
83
+ }
84
+ export interface BooleanProperty extends Property {
85
+ propertyType: PropertyType.BOOLEAN;
86
+ }
87
+ export interface DateProperty extends Property {
88
+ propertyType: PropertyType.DATE;
89
+ format: string;
90
+ }
91
+ export interface DateTimeProperty extends Property {
92
+ propertyType: PropertyType.DATE_TIME;
93
+ format: string;
94
+ }
95
+ export interface DoubleProperty extends Property {
96
+ propertyType: PropertyType.DOUBLE;
97
+ }
98
+ export interface EntityTypeProperty<T = Record<string, never>> extends Property {
99
+ propertyType: PropertyType.ENTITY;
100
+ properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
101
+ }
102
+ export interface EntityReferenceProperty extends Property {
103
+ propertyType: PropertyType.ENTITY_REFERENCE;
104
+ source: string;
105
+ definitionCode: string;
106
+ definitionVersion: string;
107
+ labelPropertyCode: string;
108
+ valuePropertyCode: string;
109
+ }
110
+ export interface FloatProperty extends Property {
111
+ propertyType: PropertyType.FLOAT;
112
+ }
113
+ export interface StringProperty extends Property {
114
+ propertyType: PropertyType.STRING;
115
+ restrictedValues: string[];
116
+ }
117
+ export interface IntegerProperty extends Property {
118
+ propertyType: PropertyType.INTEGER;
119
+ }
120
+ export interface JsonProperty extends Property {
121
+ propertyType: PropertyType.JSON;
122
+ }
123
+ export interface LongProperty extends Property {
124
+ propertyType: PropertyType.LONG;
125
+ }
126
+ export interface TimeProperty extends Property {
127
+ propertyType: PropertyType.TIME;
128
+ format: string;
129
+ }
130
+ export interface AnyProperty extends Property {
131
+ propertyType: PropertyType.ANY;
132
+ }
133
+ export interface FileProperty extends Property {
134
+ propertyType: PropertyType.FILE;
135
+ }
136
+ export interface FileReferenceProperty extends Property {
137
+ propertyType: PropertyType.FILE_REFERENCE;
138
+ }
139
+ 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;
140
+ export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
141
+ export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
142
+ export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
@@ -1,3 +1,3 @@
1
- export * from './definition';
2
- export * from './ui';
3
- export * from './common';
1
+ export * from './definition';
2
+ export * from './ui';
3
+ export * from './common';
@@ -1,73 +1,73 @@
1
- import { PaginateData } from './common';
2
- import { PropertiesArrayType } from './definition';
3
- import { ReactNode } from 'react';
4
- type PaginateParams = {
5
- page: string;
6
- size: string;
7
- [key: string]: string;
8
- };
9
- export interface FilterField {
10
- name: string;
11
- label: string;
12
- type: 'text' | 'select' | 'autocomplete' | 'date' | 'number' | 'date_time' | 'query_autocomplete';
13
- value?: unknown;
14
- multiple?: boolean;
15
- options?: {
16
- value: string;
17
- label: string;
18
- }[];
19
- searchBy?: string;
20
- sortBy?: string;
21
- labelKey?: string;
22
- valueKey?: string;
23
- queryFunction?: (params: PaginateParams) => Promise<PaginateData<unknown>>;
24
- }
25
- export interface Option<T = string> {
26
- value: T;
27
- label: string;
28
- }
29
- export type TableDataType = 'text' | 'boolean' | 'date' | 'status' | 'json_text' | 'json_code' | 'array' | 'number' | 'collapsed_array';
30
- export type JsonPathPickerProperty = {
31
- properties: PropertiesArrayType;
32
- pathPrefix: string;
33
- title: string;
34
- };
35
- export type CustomPropertyFieldProps = {
36
- name: string;
37
- label?: string;
38
- type: 'text' | 'checkbox' | 'number' | 'select' | 'autocomplete' | 'json';
39
- decimal?: boolean;
40
- options?: string[] | {
41
- value: unknown;
42
- label: string;
43
- }[];
44
- required?: boolean;
45
- checked?: boolean;
46
- defaultValue?: any;
47
- };
48
- export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
49
- export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
50
- export type ValidateFunc = (value: string) => boolean | string;
51
- export interface Column<T> {
52
- id: string;
53
- label: string;
54
- align?: 'right' | 'left';
55
- type?: TableDataType;
56
- sortKey?: string;
57
- width?: number;
58
- renderCell?: (row: Row<T>, rowIndex: number) => ReactNode;
59
- }
60
- export type Row<T> = T & {
61
- id?: string;
62
- onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
63
- };
64
- export type Route = {
65
- name: string;
66
- rootLink?: string;
67
- main?: boolean;
68
- icon?: ReactNode;
69
- link?: string;
70
- query?: string;
71
- children?: Route[];
72
- };
73
- export {};
1
+ import { PaginateData } from './common';
2
+ import { PropertiesArrayType } from './definition';
3
+ import { ReactNode } from 'react';
4
+ type PaginateParams = {
5
+ page: string;
6
+ size: string;
7
+ [key: string]: string;
8
+ };
9
+ export interface FilterField {
10
+ name: string;
11
+ label: string;
12
+ type: 'text' | 'select' | 'autocomplete' | 'date' | 'number' | 'date_time' | 'query_autocomplete';
13
+ value?: unknown;
14
+ multiple?: boolean;
15
+ options?: {
16
+ value: string;
17
+ label: string;
18
+ }[];
19
+ searchBy?: string;
20
+ sortBy?: string;
21
+ labelKey?: string;
22
+ valueKey?: string;
23
+ queryFunction?: (params: PaginateParams) => Promise<PaginateData<unknown>>;
24
+ }
25
+ export interface Option<T = string> {
26
+ value: T;
27
+ label: string;
28
+ }
29
+ export type TableDataType = 'text' | 'boolean' | 'date' | 'status' | 'json_text' | 'json_code' | 'array' | 'number' | 'collapsed_array';
30
+ export type JsonPathPickerProperty = {
31
+ properties: PropertiesArrayType;
32
+ pathPrefix: string;
33
+ title: string;
34
+ };
35
+ export type CustomPropertyFieldProps = {
36
+ name: string;
37
+ label?: string;
38
+ type: 'text' | 'checkbox' | 'number' | 'select' | 'autocomplete' | 'json';
39
+ decimal?: boolean;
40
+ options?: string[] | {
41
+ value: unknown;
42
+ label: string;
43
+ }[];
44
+ required?: boolean;
45
+ checked?: boolean;
46
+ defaultValue?: any;
47
+ };
48
+ export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
49
+ export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
50
+ export type ValidateFunc = (value: string) => boolean | string;
51
+ export interface Column<T> {
52
+ id: string;
53
+ label: string;
54
+ align?: 'right' | 'left';
55
+ type?: TableDataType;
56
+ sortKey?: string;
57
+ width?: number;
58
+ renderCell?: (row: Row<T>, rowIndex: number) => ReactNode;
59
+ }
60
+ export type Row<T> = T & {
61
+ id?: string;
62
+ onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
63
+ };
64
+ export type Route = {
65
+ name: string;
66
+ rootLink?: string;
67
+ main?: boolean;
68
+ icon?: ReactNode;
69
+ link?: string;
70
+ query?: string;
71
+ children?: Route[];
72
+ };
73
+ export {};
@@ -1,55 +1,55 @@
1
- import React from 'react';
2
- import { DialogProps } from '@mui/material/Dialog';
3
- /**
4
- * This interface is referencing the [[AlertDialog]] component props.
5
- * @category Common UI components
6
- */
7
- export interface AlertDialogProps {
8
- /**
9
- * Is dialog open flag
10
- */
11
- open: boolean;
12
- /**
13
- * Dialog title
14
- */
15
- title: string;
16
- /**
17
- * Dialog description
18
- */
19
- description?: string;
20
- /**
21
- * Close button text
22
- */
23
- closeButtonTitle?: string;
24
- /**
25
- * Confirm button text
26
- */
27
- confirmButtonTitle?: string;
28
- /**
29
- * onClose event handle function
30
- */
31
- onClose?: () => void;
32
- /**
33
- * onConfirm event handle function
34
- */
35
- onConfirm?: (values?: any) => void;
36
- /**
37
- * children components
38
- */
39
- children?: React.ReactNode;
40
- /**
41
- * Material UI Dialog component props
42
- */
43
- dialogProps?: Partial<DialogProps>;
44
- loading?: boolean;
45
- confirmButtonDisabled?: boolean;
46
- maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
47
- hideCloseButton?: boolean;
48
- disableBackdropClick?: boolean;
49
- }
50
- /**
51
- * Alert dialog component. Used for popup information
52
- * @category Common UI components
53
- */
54
- export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, disableBackdropClick, onConfirm, children, dialogProps, loading, maxWidth, hideCloseButton, }: AlertDialogProps) => import("react/jsx-runtime").JSX.Element;
55
- export default AlertDialog;
1
+ import React from 'react';
2
+ import { DialogProps } from '@mui/material/Dialog';
3
+ /**
4
+ * This interface is referencing the [[AlertDialog]] component props.
5
+ * @category Common UI components
6
+ */
7
+ export interface AlertDialogProps {
8
+ /**
9
+ * Is dialog open flag
10
+ */
11
+ open: boolean;
12
+ /**
13
+ * Dialog title
14
+ */
15
+ title: string;
16
+ /**
17
+ * Dialog description
18
+ */
19
+ description?: string;
20
+ /**
21
+ * Close button text
22
+ */
23
+ closeButtonTitle?: string;
24
+ /**
25
+ * Confirm button text
26
+ */
27
+ confirmButtonTitle?: string;
28
+ /**
29
+ * onClose event handle function
30
+ */
31
+ onClose?: () => void;
32
+ /**
33
+ * onConfirm event handle function
34
+ */
35
+ onConfirm?: (values?: any) => void;
36
+ /**
37
+ * children components
38
+ */
39
+ children?: React.ReactNode;
40
+ /**
41
+ * Material UI Dialog component props
42
+ */
43
+ dialogProps?: Partial<DialogProps>;
44
+ loading?: boolean;
45
+ confirmButtonDisabled?: boolean;
46
+ maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
47
+ hideCloseButton?: boolean;
48
+ disableBackdropClick?: boolean;
49
+ }
50
+ /**
51
+ * Alert dialog component. Used for popup information
52
+ * @category Common UI components
53
+ */
54
+ export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, disableBackdropClick, onConfirm, children, dialogProps, loading, maxWidth, hideCloseButton, }: AlertDialogProps) => JSX.Element;
55
+ export default AlertDialog;
@@ -1 +1 @@
1
- export * from './Alert';
1
+ export * from './Alert';