@dartech/arsenal-ui 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +13 -0
- package/.eslintrc.json +22 -0
- package/{index.d.ts → index.ts} +5 -5
- package/jest.config.ts +11 -0
- package/package.json +3 -12
- package/project.json +94 -0
- package/rollup.config.js +146 -0
- package/src/assets/chevron_left_gray.svg +3 -0
- package/src/consts/index.ts +13 -0
- package/src/interfaces/common.ts +18 -0
- package/src/interfaces/definition.ts +143 -0
- package/src/interfaces/{index.d.ts → index.ts} +3 -3
- package/src/interfaces/ui.ts +80 -0
- package/src/lib/Alert/Alert.tsx +108 -0
- package/src/lib/Alert/index.ts +1 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.tsx +16 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.tsx +40 -0
- package/src/lib/Breadcrumbs/{index.d.ts → index.ts} +1 -1
- package/src/lib/ContentLayout/ContentLayout.tsx +31 -0
- package/src/lib/ContentLayout/index.ts +1 -0
- package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +78 -0
- package/src/lib/Definition/CreateDefinition/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +71 -0
- package/src/lib/Definition/DefinitionFiller/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx +54 -0
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx +67 -0
- package/src/lib/Definition/DefinitionValueView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/{index.d.ts → index.ts} +3 -3
- package/src/lib/Forms/BackButton.tsx +46 -0
- package/src/lib/Forms/ControlAceEditor.tsx +125 -0
- package/src/lib/Forms/ControlAutocomplete.tsx +145 -0
- package/src/lib/Forms/ControlCheckbox.tsx +113 -0
- package/src/lib/Forms/ControlDate.tsx +75 -0
- package/src/lib/Forms/ControlDateTime.tsx +77 -0
- package/src/lib/Forms/ControlDebouncedInput.tsx +80 -0
- package/src/lib/Forms/ControlInput.tsx +111 -0
- package/src/lib/Forms/ControlNumberInput.tsx +121 -0
- package/src/lib/Forms/ControlQueryAutocomplete.tsx +197 -0
- package/src/lib/Forms/ControlRadio.tsx +136 -0
- package/src/lib/Forms/ControlSelect.tsx +164 -0
- package/src/lib/Forms/ControlSwitch.tsx +71 -0
- package/src/lib/Forms/ControlTime.tsx +93 -0
- package/src/lib/Forms/CopyButton.tsx +46 -0
- package/src/lib/Forms/{index.d.ts → index.ts} +15 -15
- package/src/lib/Forms/useAutocomplete.tsx +47 -0
- package/src/lib/InfoItem/InfoItem.tsx +40 -0
- package/src/lib/InfoItem/{index.d.ts → index.ts} +1 -1
- package/src/lib/InfoItem/styles.ts +17 -0
- package/src/lib/JsonPathPicker/JsonPathPicker.tsx +73 -0
- package/src/lib/JsonPathPicker/PropertyStep.tsx +70 -0
- package/src/lib/JsonPathPicker/{index.d.ts → index.ts} +1 -1
- package/src/lib/JsonView/JsonView.tsx +41 -0
- package/src/lib/JsonView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Loader/Loader.tsx +41 -0
- package/src/lib/Loader/{index.d.ts → index.ts} +1 -1
- package/src/lib/Modals/JsonModalView.tsx +53 -0
- package/src/lib/Modals/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/PropertyFiller/JsonEditor.tsx +58 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx +129 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx +85 -0
- package/src/lib/Property/PropertyFiller/PropertyFiller.tsx +199 -0
- package/src/lib/Property/PropertyFiller/{index.d.ts → index.ts} +2 -2
- package/src/lib/Property/PropertyFiller/usePropertyFiller.ts +72 -0
- package/src/lib/Property/PropertyFiller/useStyles.ts +12 -0
- package/src/lib/Property/PropertyValidator/NodeValidator.tsx +92 -0
- package/src/lib/Property/PropertyValidator/NodesList.tsx +26 -0
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx +59 -0
- package/src/lib/Property/PropertyValidator/PropertyValidator.tsx +42 -0
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx +4 -0
- package/src/lib/Property/PropertyValidator/StringTypeValidator.tsx +36 -0
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx +62 -0
- package/src/lib/Property/PropertyValidator/index.ts +1 -0
- package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +49 -0
- package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +58 -0
- package/src/lib/Property/PropertyValueField/DateValueField.tsx +58 -0
- package/src/lib/Property/PropertyValueField/JsonValueField.tsx +65 -0
- package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +49 -0
- package/src/lib/Property/PropertyValueField/StringValueField.tsx +50 -0
- package/src/lib/Property/PropertyValueField/TimeValueField.tsx +67 -0
- package/src/lib/Property/PropertyValueField/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +115 -0
- package/src/lib/Property/PropertyWidget/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +148 -0
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +158 -0
- package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +40 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +41 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +27 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +133 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +46 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +52 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +103 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/UpsertProperty/{index.d.ts → index.ts} +2 -2
- package/src/lib/Property/UpsertProperty/useCustomFields.ts +22 -0
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +37 -0
- package/src/lib/Property/ViewPropertiesList/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +40 -0
- package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +48 -0
- package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +148 -0
- package/src/lib/Property/ViewProperty/PropertyItem.tsx +43 -0
- package/src/lib/Property/ViewProperty/ViewProperty.tsx +52 -0
- package/src/lib/Property/ViewProperty/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/{index.d.ts → index.ts} +5 -5
- package/src/lib/Sidebar/Sidebar.styled.tsx +157 -0
- package/src/lib/Sidebar/Sidebar.tsx +27 -0
- package/src/lib/Sidebar/SidebarContext.tsx +37 -0
- package/src/lib/Sidebar/SidebarDrawer.tsx +50 -0
- package/src/lib/Sidebar/SidebarLink/MenuIcon.tsx +16 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLink.tsx +54 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx +54 -0
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx +62 -0
- package/src/lib/Sidebar/SidebarLink/{index.d.ts → index.ts} +2 -2
- package/src/lib/Sidebar/index.ts +2 -0
- package/src/lib/Status/Status.tsx +16 -0
- package/src/lib/Status/{index.d.ts → index.ts} +1 -1
- package/src/lib/Status/styles.ts +21 -0
- package/src/lib/StepperView/StepperView.tsx +73 -0
- package/src/lib/StepperView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Table/DataGrid/JsonTypeCell.tsx +51 -0
- package/src/lib/Table/DataGrid/Table.tsx +117 -0
- package/src/lib/Table/DataGrid/TableAction.tsx +43 -0
- package/src/lib/Table/DataGrid/TableColumnMenu.tsx +12 -0
- package/src/lib/Table/DataGrid/TablePagination.tsx +42 -0
- package/src/lib/Table/DataGrid/index.ts +2 -0
- package/src/lib/Table/DataGrid/styles.ts +59 -0
- package/src/lib/Table/DataGrid/usePagination.ts +15 -0
- package/src/lib/Table/DataGrid/useTableQueryPagination.ts +47 -0
- package/src/lib/Table/DataGrid/useTableQuerySorting.ts +47 -0
- package/src/lib/Table/SimpleTable/SimpleTable.tsx +138 -0
- package/src/lib/Table/SimpleTable/TableActionCell.tsx +67 -0
- package/src/lib/Table/SimpleTable/index.ts +2 -0
- package/src/lib/Table/SimpleTable/useTablePagination.ts +54 -0
- package/src/lib/Table/SimpleTable/useTableSorting.ts +50 -0
- package/src/lib/Table/index.ts +2 -0
- package/src/lib/Tabs/RouteTabs.tsx +54 -0
- package/src/lib/Tabs/TabPanel.tsx +42 -0
- package/src/lib/Tabs/{index.d.ts → index.ts} +2 -2
- package/src/lib/{index.d.ts → index.ts} +16 -16
- package/src/theme/baseTheme.ts +128 -0
- package/src/theme/fonts.d.ts +2 -0
- package/src/theme/index.ts +126 -0
- package/src/theme/inputThemeOptions.ts +126 -0
- package/src/theme/stepperThemeOptions.ts +20 -0
- package/src/theme/tableThemeOptions.ts +50 -0
- package/src/theme/typographyThemeOptions.ts +32 -0
- package/src/utils/common.ts +73 -0
- package/src/utils/dem.ts +431 -0
- package/src/utils/hooks.ts +41 -0
- package/src/utils/{index.d.ts → index.ts} +5 -5
- package/src/utils/ui-utils.tsx +102 -0
- package/src/utils/validators.ts +14 -0
- package/tsconfig.json +25 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.spec.json +20 -0
- package/index.js +0 -1
- package/src/consts/index.d.ts +0 -12
- package/src/interfaces/common.d.ts +0 -17
- package/src/interfaces/definition.d.ts +0 -107
- package/src/interfaces/ui.d.ts +0 -70
- package/src/lib/Alert/Alert.d.ts +0 -53
- package/src/lib/Alert/index.d.ts +0 -1
- package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +0 -2
- package/src/lib/ContentLayout/ContentLayout.d.ts +0 -9
- package/src/lib/ContentLayout/index.d.ts +0 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +0 -11
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +0 -10
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +0 -8
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +0 -9
- package/src/lib/Forms/BackButton.d.ts +0 -7
- package/src/lib/Forms/ControlAceEditor.d.ts +0 -24
- package/src/lib/Forms/ControlAutocomplete.d.ts +0 -69
- package/src/lib/Forms/ControlCheckbox.d.ts +0 -51
- package/src/lib/Forms/ControlDate.d.ts +0 -18
- package/src/lib/Forms/ControlDateTime.d.ts +0 -18
- package/src/lib/Forms/ControlDebouncedInput.d.ts +0 -4
- package/src/lib/Forms/ControlInput.d.ts +0 -59
- package/src/lib/Forms/ControlNumberInput.d.ts +0 -51
- package/src/lib/Forms/ControlQueryAutocomplete.d.ts +0 -16
- package/src/lib/Forms/ControlRadio.d.ts +0 -66
- package/src/lib/Forms/ControlSelect.d.ts +0 -67
- package/src/lib/Forms/ControlSwitch.d.ts +0 -19
- package/src/lib/Forms/ControlTime.d.ts +0 -18
- package/src/lib/Forms/CopyButton.d.ts +0 -20
- package/src/lib/Forms/useAutocomplete.d.ts +0 -10
- package/src/lib/InfoItem/InfoItem.d.ts +0 -10
- package/src/lib/InfoItem/styles.d.ts +0 -12
- package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +0 -10
- package/src/lib/JsonPathPicker/PropertyStep.d.ts +0 -11
- package/src/lib/JsonView/JsonView.d.ts +0 -7
- package/src/lib/Loader/Loader.d.ts +0 -21
- package/src/lib/Modals/JsonModalView.d.ts +0 -10
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +0 -10
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +0 -12
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +0 -11
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +0 -12
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +0 -24
- package/src/lib/Property/PropertyFiller/useStyles.d.ts +0 -12
- package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/NodesList.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +0 -8
- package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +0 -3
- package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +0 -8
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +0 -7
- package/src/lib/Property/PropertyValidator/index.d.ts +0 -1
- package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +0 -7
- package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/DateValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +0 -10
- package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/StringValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +0 -9
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +0 -13
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +0 -13
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +0 -10
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +0 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +0 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +0 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +0 -10
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +0 -6
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +0 -8
- 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/Sidebar/Sidebar.d.ts +0 -10
- package/src/lib/Sidebar/Sidebar.styled.d.ts +0 -117
- package/src/lib/Sidebar/SidebarContext.d.ts +0 -11
- package/src/lib/Sidebar/SidebarDrawer.d.ts +0 -9
- package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +0 -7
- package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +0 -7
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +0 -8
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +0 -10
- package/src/lib/Sidebar/index.d.ts +0 -2
- package/src/lib/Status/Status.d.ts +0 -8
- package/src/lib/Status/styles.d.ts +0 -12
- package/src/lib/StepperView/StepperView.d.ts +0 -11
- package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +0 -7
- package/src/lib/Table/DataGrid/Table.d.ts +0 -49
- package/src/lib/Table/DataGrid/TableAction.d.ts +0 -13
- package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +0 -3
- package/src/lib/Table/DataGrid/TablePagination.d.ts +0 -3
- package/src/lib/Table/DataGrid/index.d.ts +0 -2
- package/src/lib/Table/DataGrid/styles.d.ts +0 -12
- package/src/lib/Table/DataGrid/usePagination.d.ts +0 -5
- package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +0 -11
- package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +0 -6
- package/src/lib/Table/SimpleTable/SimpleTable.d.ts +0 -17
- package/src/lib/Table/SimpleTable/TableActionCell.d.ts +0 -10
- package/src/lib/Table/SimpleTable/index.d.ts +0 -2
- package/src/lib/Table/SimpleTable/useTablePagination.d.ts +0 -7
- package/src/lib/Table/SimpleTable/useTableSorting.d.ts +0 -6
- package/src/lib/Table/index.d.ts +0 -2
- package/src/lib/Tabs/RouteTabs.d.ts +0 -11
- package/src/lib/Tabs/TabPanel.d.ts +0 -25
- package/src/theme/baseTheme.d.ts +0 -2
- package/src/theme/index.d.ts +0 -1
- package/src/theme/inputThemeOptions.d.ts +0 -117
- package/src/theme/stepperThemeOptions.d.ts +0 -16
- package/src/theme/tableThemeOptions.d.ts +0 -47
- package/src/theme/typographyThemeOptions.d.ts +0 -29
- package/src/utils/common.d.ts +0 -7
- package/src/utils/dem.d.ts +0 -27
- package/src/utils/hooks.d.ts +0 -7
- package/src/utils/ui-utils.d.ts +0 -8
- package/src/utils/validators.d.ts +0 -5
package/src/consts/index.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
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
|
-
};
|
@@ -1,17 +0,0 @@
|
|
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
|
-
}
|
@@ -1,107 +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
|
-
JSON = "JSON",
|
14
|
-
DATE = "DATE",
|
15
|
-
TIME = "TIME",
|
16
|
-
DATE_TIME = "DATE_TIME",
|
17
|
-
ANY = "ANY"
|
18
|
-
}
|
19
|
-
export interface Definition<T = Record<string, never>> {
|
20
|
-
code: string;
|
21
|
-
version: number;
|
22
|
-
name: string;
|
23
|
-
properties: PropertiesObjectType<T>;
|
24
|
-
}
|
25
|
-
export type PropertiesObjectType<T = Record<string, never>> = Record<string, PropertyUnion & T>;
|
26
|
-
export type PropertiesArrayType<T = Record<string, never>> = Array<PropertyUnion & T>;
|
27
|
-
export interface CreateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
28
|
-
properties: PropertiesArrayType<T>;
|
29
|
-
}
|
30
|
-
export interface UpdateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
31
|
-
properties: PropertiesArrayType<T>;
|
32
|
-
}
|
33
|
-
export interface Property {
|
34
|
-
propertyType: keyof typeof PropertyType | {
|
35
|
-
value: keyof typeof PropertyType;
|
36
|
-
};
|
37
|
-
name: string;
|
38
|
-
defaultValue: unknown;
|
39
|
-
defaultValues: unknown[];
|
40
|
-
isRequired: boolean;
|
41
|
-
isMultiple: boolean;
|
42
|
-
sortOrder: number;
|
43
|
-
isEnabled: boolean;
|
44
|
-
uiSettings: unknown;
|
45
|
-
validationNode: unknown;
|
46
|
-
key?: string;
|
47
|
-
}
|
48
|
-
export interface BigDecimalProperty extends Property {
|
49
|
-
propertyType: PropertyType.BIG_DECIMAL;
|
50
|
-
precisionScale: number;
|
51
|
-
roundingMode: keyof typeof RoundingMode;
|
52
|
-
}
|
53
|
-
export interface BigIntegerProperty extends Property {
|
54
|
-
propertyType: PropertyType.BIG_INTEGER;
|
55
|
-
}
|
56
|
-
export interface BooleanProperty extends Property {
|
57
|
-
propertyType: PropertyType.BOOLEAN;
|
58
|
-
}
|
59
|
-
export interface DateProperty extends Property {
|
60
|
-
propertyType: PropertyType.DATE;
|
61
|
-
format: string;
|
62
|
-
}
|
63
|
-
export interface DateTimeProperty extends Property {
|
64
|
-
propertyType: PropertyType.DATE_TIME;
|
65
|
-
format: string;
|
66
|
-
}
|
67
|
-
export interface DoubleProperty extends Property {
|
68
|
-
propertyType: PropertyType.DOUBLE;
|
69
|
-
}
|
70
|
-
export interface EntityTypeProperty<T = Record<string, never>> extends Property {
|
71
|
-
propertyType: PropertyType.ENTITY;
|
72
|
-
properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
|
73
|
-
}
|
74
|
-
export interface EntityReferenceProperty extends Property {
|
75
|
-
propertyType: PropertyType.ENTITY_REFERENCE;
|
76
|
-
definitionCode: string;
|
77
|
-
definitionVersion: string;
|
78
|
-
labelPropertyCode: string;
|
79
|
-
valuePropertyCode: string;
|
80
|
-
}
|
81
|
-
export interface FloatProperty extends Property {
|
82
|
-
propertyType: PropertyType.FLOAT;
|
83
|
-
}
|
84
|
-
export interface StringProperty extends Property {
|
85
|
-
propertyType: PropertyType.STRING;
|
86
|
-
restrictedValues: string[];
|
87
|
-
}
|
88
|
-
export interface IntegerProperty extends Property {
|
89
|
-
propertyType: PropertyType.INTEGER;
|
90
|
-
}
|
91
|
-
export interface JsonProperty extends Property {
|
92
|
-
propertyType: PropertyType.JSON;
|
93
|
-
}
|
94
|
-
export interface LongProperty extends Property {
|
95
|
-
propertyType: PropertyType.LONG;
|
96
|
-
}
|
97
|
-
export interface TimeProperty extends Property {
|
98
|
-
propertyType: PropertyType.TIME;
|
99
|
-
format: string;
|
100
|
-
}
|
101
|
-
export interface AnyProperty extends Property {
|
102
|
-
propertyType: PropertyType.ANY;
|
103
|
-
}
|
104
|
-
export type PropertyUnion<T = Record<string, never>> = BigDecimalProperty | BigIntegerProperty | BooleanProperty | DateProperty | DateTimeProperty | DoubleProperty | EntityTypeProperty<T> | EntityReferenceProperty | FloatProperty | StringProperty | IntegerProperty | JsonProperty | LongProperty | TimeProperty | AnyProperty;
|
105
|
-
export declare const DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
|
106
|
-
export declare const TIME_DEFAULT_FORMAT = "HH:mm:ss";
|
107
|
-
export declare const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
|
package/src/interfaces/ui.d.ts
DELETED
@@ -1,70 +0,0 @@
|
|
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 = 'id' | 'JSON' | 'JSON_text' | 'JSON_copy' | 'copy' | 'boolean' | 'date' | 'status' | '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
|
-
};
|
46
|
-
export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
|
47
|
-
export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
|
48
|
-
export type ValidateFunc = (value: string) => boolean | string;
|
49
|
-
export interface Column<T> {
|
50
|
-
id: string;
|
51
|
-
label: string;
|
52
|
-
align?: 'right' | 'left';
|
53
|
-
type?: TableDataType;
|
54
|
-
sortKey?: string;
|
55
|
-
width?: number;
|
56
|
-
renderCell?: (row: Row<T>, rowIndex: number) => ReactNode;
|
57
|
-
}
|
58
|
-
export type Row<T> = T & {
|
59
|
-
id?: string;
|
60
|
-
onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
|
61
|
-
};
|
62
|
-
export type Route = {
|
63
|
-
name: string;
|
64
|
-
main?: boolean;
|
65
|
-
icon?: ReactNode;
|
66
|
-
link?: string;
|
67
|
-
query?: string;
|
68
|
-
children?: Route[];
|
69
|
-
};
|
70
|
-
export {};
|
package/src/lib/Alert/Alert.d.ts
DELETED
@@ -1,53 +0,0 @@
|
|
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
|
-
}
|
48
|
-
/**
|
49
|
-
* Alert dialog component. Used for popup information
|
50
|
-
* @category Common UI components
|
51
|
-
*/
|
52
|
-
export declare const AlertDialog: ({ open, title, description, closeButtonTitle, onClose, confirmButtonTitle, confirmButtonDisabled, onConfirm, children, dialogProps, loading, maxWidth }: AlertDialogProps) => JSX.Element;
|
53
|
-
export default AlertDialog;
|
package/src/lib/Alert/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Alert';
|
@@ -1,2 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare const StyledLink: import("@emotion/styled").StyledComponent<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { SxProps, Theme } from '@mui/material/styles';
|
3
|
-
type Props = {
|
4
|
-
children?: ReactNode;
|
5
|
-
toolbar?: ReactNode;
|
6
|
-
contentSx?: SxProps<Theme>;
|
7
|
-
};
|
8
|
-
export declare const ContentLayout: ({ children, toolbar, contentSx }: Props) => JSX.Element;
|
9
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ContentLayout';
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
type Props = {
|
3
|
-
definitionFieldName?: string;
|
4
|
-
title?: string;
|
5
|
-
hideCodeField?: boolean;
|
6
|
-
hideVersionField?: boolean;
|
7
|
-
hideNameField?: boolean;
|
8
|
-
required?: boolean;
|
9
|
-
};
|
10
|
-
export declare const CreateDefinition: ({ definitionFieldName, title, hideCodeField, hideVersionField, hideNameField, required, }: Props) => JSX.Element;
|
11
|
-
export default CreateDefinition;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { PropertiesArrayType } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
properties: PropertiesArrayType;
|
5
|
-
dataFieldName: string;
|
6
|
-
useExpression?: boolean;
|
7
|
-
title?: string;
|
8
|
-
};
|
9
|
-
export declare const DefinitionFiller: ({ properties, dataFieldName, useExpression, title }: Props) => JSX.Element;
|
10
|
-
export default DefinitionFiller;
|
@@ -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,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,24 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import AceEditor from 'react-ace';
|
3
|
-
import 'ace-builds/src-noconflict/mode-python';
|
4
|
-
import 'ace-builds/src-noconflict/theme-monokai';
|
5
|
-
import 'ace-builds/src-noconflict/ext-language_tools';
|
6
|
-
import { Control } from 'react-hook-form';
|
7
|
-
export interface ControlAceEditorProps {
|
8
|
-
name: string;
|
9
|
-
control: Control<any>;
|
10
|
-
mode?: string;
|
11
|
-
label?: string;
|
12
|
-
width?: string;
|
13
|
-
height?: string;
|
14
|
-
theme?: string;
|
15
|
-
readOnly?: boolean;
|
16
|
-
required?: boolean;
|
17
|
-
validateJson?: boolean;
|
18
|
-
fontSize?: number;
|
19
|
-
validate?: boolean;
|
20
|
-
parseValue?: boolean;
|
21
|
-
[key: string]: unknown;
|
22
|
-
}
|
23
|
-
export declare const ControlAceEditor: import("react").ForwardRefExoticComponent<Omit<ControlAceEditorProps, "ref"> & import("react").RefAttributes<AceEditor>>;
|
24
|
-
export default ControlAceEditor;
|
@@ -1,69 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
3
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
4
|
-
import { Control } from 'react-hook-form';
|
5
|
-
import { ValidateFunc } from '../../interfaces';
|
6
|
-
/**
|
7
|
-
* This interface is referencing the [[ControlAutocomplete]] component props.
|
8
|
-
* @category Forms
|
9
|
-
*/
|
10
|
-
export type ControlAutocompleteProps = Omit<AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>, 'renderInput'> & {
|
11
|
-
/**
|
12
|
-
* React Hook Form control `name` propery
|
13
|
-
*/
|
14
|
-
name: string;
|
15
|
-
/**
|
16
|
-
* Label for MUI TextField select component
|
17
|
-
*/
|
18
|
-
label?: string;
|
19
|
-
/**
|
20
|
-
* React Hook Form `control`
|
21
|
-
*/
|
22
|
-
control: Control<any>;
|
23
|
-
/**
|
24
|
-
* Is input required flag
|
25
|
-
*/
|
26
|
-
required?: boolean;
|
27
|
-
/**
|
28
|
-
* React Hook Form `defaultValue`
|
29
|
-
*/
|
30
|
-
defaultValue?: unknown;
|
31
|
-
/**
|
32
|
-
* Is disabled input flag
|
33
|
-
*/
|
34
|
-
disabled?: boolean;
|
35
|
-
/**
|
36
|
-
* React Hook Form validate function
|
37
|
-
* ```typescript
|
38
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
39
|
-
* ```
|
40
|
-
*/
|
41
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
42
|
-
/**
|
43
|
-
* Hide error message flag
|
44
|
-
*/
|
45
|
-
hideErrorMessage?: boolean;
|
46
|
-
/**
|
47
|
-
* Custom onChange functionƒ
|
48
|
-
*/
|
49
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: unknown) => void;
|
50
|
-
/**
|
51
|
-
* Key for option label
|
52
|
-
*/
|
53
|
-
labelKey?: string;
|
54
|
-
/**
|
55
|
-
* Key for option value
|
56
|
-
*/
|
57
|
-
valueKey?: string;
|
58
|
-
/**
|
59
|
-
* Select options
|
60
|
-
*/
|
61
|
-
options: string[] | unknown[];
|
62
|
-
textFieldProps?: TextFieldProps;
|
63
|
-
};
|
64
|
-
/**
|
65
|
-
* Material UI `Autocomplete` controlled component. Used with react-hook-form
|
66
|
-
* @category Forms
|
67
|
-
*/
|
68
|
-
export declare const ControlAutocomplete: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, labelKey, valueKey, options, multiple, textFieldProps, disableCloseOnSelect, ...autocompleteProps }: ControlAutocompleteProps) => JSX.Element;
|
69
|
-
export default ControlAutocomplete;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { CheckboxProps } from '@mui/material/Checkbox';
|
3
|
-
import { Control } from 'react-hook-form';
|
4
|
-
import { ValidateFunc } from '../../interfaces';
|
5
|
-
/**
|
6
|
-
* This interface is referencing the [[ControlCheckbox]] component props.
|
7
|
-
* @category Forms
|
8
|
-
*/
|
9
|
-
export type ControlCheckboxProps = CheckboxProps & {
|
10
|
-
/**
|
11
|
-
* React Hook Form control `name` propery
|
12
|
-
*/
|
13
|
-
name: string;
|
14
|
-
/**
|
15
|
-
* Label for MUI TextField component
|
16
|
-
*/
|
17
|
-
label?: string;
|
18
|
-
/**
|
19
|
-
* React Hook Form `control`
|
20
|
-
*/
|
21
|
-
control: Control<any>;
|
22
|
-
/**
|
23
|
-
* React Hook Form `defaultValue`
|
24
|
-
*/
|
25
|
-
defaultValue?: unknown;
|
26
|
-
/**
|
27
|
-
* Is disabled input flag
|
28
|
-
*/
|
29
|
-
disabled?: boolean;
|
30
|
-
/**
|
31
|
-
* React Hook Form validate function
|
32
|
-
* ```typescript
|
33
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
34
|
-
* ```
|
35
|
-
*/
|
36
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
37
|
-
/**
|
38
|
-
* Hide error message flag
|
39
|
-
*/
|
40
|
-
hideErrorMessage?: boolean;
|
41
|
-
/**
|
42
|
-
* Custom onChange functionƒ
|
43
|
-
*/
|
44
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Material UI `Checkbox` controlled component. Used with react-hook-form
|
48
|
-
* @category Forms
|
49
|
-
*/
|
50
|
-
export declare const ControlCheckbox: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, ...checkboxProps }: ControlCheckboxProps) => JSX.Element;
|
51
|
-
export default ControlCheckbox;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
type Props = {
|
4
|
-
/**
|
5
|
-
* React Hook Form `control`
|
6
|
-
*/
|
7
|
-
control: Control<any>;
|
8
|
-
/**
|
9
|
-
* Is input required flag
|
10
|
-
*/
|
11
|
-
required?: boolean;
|
12
|
-
name: string;
|
13
|
-
label?: string;
|
14
|
-
format?: string;
|
15
|
-
hideErrorMessage?: boolean;
|
16
|
-
};
|
17
|
-
export declare const ControlDate: ({ control, name, required, label, format, hideErrorMessage, }: Props) => JSX.Element;
|
18
|
-
export default ControlDate;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
type Props = {
|
4
|
-
/**
|
5
|
-
* React Hook Form `control`
|
6
|
-
*/
|
7
|
-
control: Control<any>;
|
8
|
-
/**
|
9
|
-
* Is input required flag
|
10
|
-
*/
|
11
|
-
required?: boolean;
|
12
|
-
name: string;
|
13
|
-
label?: string;
|
14
|
-
format?: string;
|
15
|
-
hideErrorMessage?: boolean;
|
16
|
-
};
|
17
|
-
export declare const ControlDateTime: ({ control, name, required, label, format, hideErrorMessage, }: Props) => JSX.Element;
|
18
|
-
export default ControlDateTime;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { ControlInputProps } from './ControlInput';
|
3
|
-
export declare const ControlDebouncedInput: ({ control, validate, name, label, required, defaultValue, disabled, textarea, hideErrorMessage, onChange: customOnChange, ...textFieldProps }: ControlInputProps) => JSX.Element;
|
4
|
-
export default ControlDebouncedInput;
|
@@ -1,59 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
4
|
-
import { ValidateFunc } from '../../interfaces';
|
5
|
-
/**
|
6
|
-
* This interface is referencing the [[ControlInput]] component props.
|
7
|
-
* @category Forms
|
8
|
-
*/
|
9
|
-
export type ControlInputProps = TextFieldProps & {
|
10
|
-
/**
|
11
|
-
* React Hook Form control `name` propery
|
12
|
-
*/
|
13
|
-
name: string;
|
14
|
-
/**
|
15
|
-
* Label for MUI TextField component
|
16
|
-
*/
|
17
|
-
label?: string;
|
18
|
-
/**
|
19
|
-
* React Hook Form `control`
|
20
|
-
*/
|
21
|
-
control: Control<any>;
|
22
|
-
/**
|
23
|
-
* Is input required flag
|
24
|
-
*/
|
25
|
-
required?: boolean;
|
26
|
-
/**
|
27
|
-
* React Hook Form `defaultValue`
|
28
|
-
*/
|
29
|
-
defaultValue?: unknown;
|
30
|
-
/**
|
31
|
-
* Is disabled input flag
|
32
|
-
*/
|
33
|
-
disabled?: boolean;
|
34
|
-
/**
|
35
|
-
* React Hook Form validate function
|
36
|
-
* ```typescript
|
37
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
38
|
-
* ```
|
39
|
-
*/
|
40
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
41
|
-
/**
|
42
|
-
* Is input textarea flag
|
43
|
-
*/
|
44
|
-
textarea?: boolean;
|
45
|
-
/**
|
46
|
-
* Hide error message flag
|
47
|
-
*/
|
48
|
-
hideErrorMessage?: boolean;
|
49
|
-
/**
|
50
|
-
* Custom onChange functionƒ
|
51
|
-
*/
|
52
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
53
|
-
};
|
54
|
-
/**
|
55
|
-
* Material UI `TextField` controlled component. Used with react-hook-form
|
56
|
-
* @category Forms
|
57
|
-
*/
|
58
|
-
export declare const ControlInput: ({ control, validate, name, label, required, defaultValue, disabled, textarea, hideErrorMessage, onChange: customOnChange, ...textFieldProps }: ControlInputProps) => JSX.Element;
|
59
|
-
export default ControlInput;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
-
import { Control } from 'react-hook-form';
|
4
|
-
import { ValidateFunc } from '../../interfaces';
|
5
|
-
type Props = TextFieldProps & {
|
6
|
-
/**
|
7
|
-
* React Hook Form control `name` propery
|
8
|
-
*/
|
9
|
-
name: string;
|
10
|
-
/**
|
11
|
-
* Label for MUI TextField component
|
12
|
-
*/
|
13
|
-
label?: string;
|
14
|
-
/**
|
15
|
-
* React Hook Form `control`
|
16
|
-
*/
|
17
|
-
control: Control;
|
18
|
-
/**
|
19
|
-
* Is input required flag
|
20
|
-
*/
|
21
|
-
required?: boolean;
|
22
|
-
/**
|
23
|
-
* React Hook Form `defaultValue`
|
24
|
-
*/
|
25
|
-
defaultValue?: number;
|
26
|
-
/**
|
27
|
-
* Is disabled input flag
|
28
|
-
*/
|
29
|
-
disabled?: boolean;
|
30
|
-
/**
|
31
|
-
* React Hook Form validate function
|
32
|
-
* ```typescript
|
33
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
34
|
-
* ```
|
35
|
-
*/
|
36
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
37
|
-
/**
|
38
|
-
* Hide error message flag
|
39
|
-
*/
|
40
|
-
hideErrorMessage?: boolean;
|
41
|
-
/**
|
42
|
-
* Custom onChange function
|
43
|
-
*/
|
44
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
45
|
-
/**
|
46
|
-
* Is number decimal or integer flag
|
47
|
-
*/
|
48
|
-
decimal?: boolean;
|
49
|
-
};
|
50
|
-
export declare const ControlNumberInput: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, decimal, ...textFieldProps }: Props) => JSX.Element;
|
51
|
-
export default ControlNumberInput;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { ControlAutocompleteProps } from './ControlAutocomplete';
|
3
|
-
import { PaginateData } from '../../interfaces';
|
4
|
-
type PaginateParams = {
|
5
|
-
page: string;
|
6
|
-
size: string;
|
7
|
-
[key: string]: string;
|
8
|
-
};
|
9
|
-
type ControlQueryAutocompleteProps<T> = Omit<ControlAutocompleteProps, 'options'> & {
|
10
|
-
searchBy: string;
|
11
|
-
sortBy?: string;
|
12
|
-
queryFunction: (params: PaginateParams) => Promise<PaginateData<T>>;
|
13
|
-
itemQueryFunction?: (valueKey: string) => Promise<T>;
|
14
|
-
};
|
15
|
-
export declare function ControlQueryAutocomplete<T>({ name, label, control, required, searchBy, labelKey, multiple, disabled, valueKey, sortBy, hideErrorMessage, disableCloseOnSelect, textFieldProps, onChange, queryFunction, validate, itemQueryFunction, ...autocompleteProps }: ControlQueryAutocompleteProps<T>): JSX.Element;
|
16
|
-
export default ControlQueryAutocomplete;
|