@dartech/arsenal-ui 1.2.6 → 1.2.7
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/{index.ts → index.d.ts} +5 -5
- package/index.js +1 -0
- package/package.json +12 -3
- package/src/consts/index.d.ts +12 -0
- package/src/interfaces/common.d.ts +17 -0
- package/src/interfaces/definition.d.ts +107 -0
- package/src/interfaces/{index.ts → index.d.ts} +3 -3
- package/src/interfaces/ui.d.ts +70 -0
- package/src/lib/Alert/Alert.d.ts +53 -0
- package/src/lib/Alert/index.d.ts +1 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +2 -0
- package/src/lib/Breadcrumbs/{index.ts → index.d.ts} +1 -1
- package/src/lib/ContentLayout/ContentLayout.d.ts +9 -0
- package/src/lib/ContentLayout/index.d.ts +1 -0
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +11 -0
- package/src/lib/Definition/CreateDefinition/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +10 -0
- package/src/lib/Definition/DefinitionFiller/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +8 -0
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +9 -0
- package/src/lib/Definition/DefinitionValueView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/{index.ts → index.d.ts} +3 -3
- package/src/lib/Forms/BackButton.d.ts +7 -0
- package/src/lib/Forms/ControlAceEditor.d.ts +24 -0
- package/src/lib/Forms/ControlAutocomplete.d.ts +69 -0
- package/src/lib/Forms/ControlCheckbox.d.ts +51 -0
- package/src/lib/Forms/ControlDate.d.ts +18 -0
- package/src/lib/Forms/ControlDateTime.d.ts +18 -0
- package/src/lib/Forms/ControlDebouncedInput.d.ts +4 -0
- package/src/lib/Forms/ControlInput.d.ts +59 -0
- package/src/lib/Forms/ControlNumberInput.d.ts +51 -0
- package/src/lib/Forms/ControlQueryAutocomplete.d.ts +16 -0
- package/src/lib/Forms/ControlRadio.d.ts +66 -0
- package/src/lib/Forms/ControlSelect.d.ts +67 -0
- package/src/lib/Forms/ControlSwitch.d.ts +19 -0
- package/src/lib/Forms/ControlTime.d.ts +18 -0
- package/src/lib/Forms/CopyButton.d.ts +20 -0
- package/src/lib/Forms/{index.ts → index.d.ts} +15 -15
- package/src/lib/Forms/useAutocomplete.d.ts +10 -0
- package/src/lib/InfoItem/InfoItem.d.ts +10 -0
- package/src/lib/InfoItem/{index.ts → index.d.ts} +1 -1
- package/src/lib/InfoItem/styles.d.ts +12 -0
- package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +10 -0
- package/src/lib/JsonPathPicker/PropertyStep.d.ts +11 -0
- package/src/lib/JsonPathPicker/{index.ts → index.d.ts} +1 -1
- package/src/lib/JsonView/JsonView.d.ts +7 -0
- package/src/lib/JsonView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Loader/Loader.d.ts +21 -0
- package/src/lib/Loader/{index.ts → index.d.ts} +1 -1
- package/src/lib/Modals/JsonModalView.d.ts +10 -0
- package/src/lib/Modals/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +10 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +12 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +11 -0
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +12 -0
- package/src/lib/Property/PropertyFiller/{index.ts → index.d.ts} +2 -2
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +24 -0
- package/src/lib/Property/PropertyFiller/useStyles.d.ts +12 -0
- package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/NodesList.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +8 -0
- package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +3 -0
- package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +8 -0
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +7 -0
- package/src/lib/Property/PropertyValidator/index.d.ts +1 -0
- package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +7 -0
- package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/DateValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +10 -0
- package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/StringValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +13 -0
- package/src/lib/Property/PropertyWidget/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +13 -0
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +10 -0
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +7 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +7 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +8 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +10 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/UpsertProperty/{index.ts → index.d.ts} +2 -2
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +6 -0
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +8 -0
- package/src/lib/Property/ViewPropertiesList/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +7 -0
- package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +8 -0
- package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +7 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +9 -0
- package/src/lib/Property/ViewProperty/ViewProperty.d.ts +9 -0
- package/src/lib/Property/ViewProperty/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/{index.ts → index.d.ts} +5 -5
- package/src/lib/Sidebar/Sidebar.d.ts +10 -0
- package/src/lib/Sidebar/Sidebar.styled.d.ts +117 -0
- package/src/lib/Sidebar/SidebarContext.d.ts +11 -0
- package/src/lib/Sidebar/SidebarDrawer.d.ts +9 -0
- package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +7 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +7 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +8 -0
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +10 -0
- package/src/lib/Sidebar/SidebarLink/{index.ts → index.d.ts} +2 -2
- package/src/lib/Sidebar/index.d.ts +2 -0
- package/src/lib/Status/Status.d.ts +8 -0
- package/src/lib/Status/{index.ts → index.d.ts} +1 -1
- package/src/lib/Status/styles.d.ts +12 -0
- package/src/lib/StepperView/StepperView.d.ts +11 -0
- package/src/lib/StepperView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +7 -0
- package/src/lib/Table/DataGrid/Table.d.ts +49 -0
- package/src/lib/Table/DataGrid/TableAction.d.ts +13 -0
- package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +3 -0
- package/src/lib/Table/DataGrid/TablePagination.d.ts +3 -0
- package/src/lib/Table/DataGrid/index.d.ts +2 -0
- package/src/lib/Table/DataGrid/styles.d.ts +12 -0
- package/src/lib/Table/DataGrid/usePagination.d.ts +5 -0
- package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +11 -0
- package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +6 -0
- package/src/lib/Table/SimpleTable/SimpleTable.d.ts +17 -0
- package/src/lib/Table/SimpleTable/TableActionCell.d.ts +10 -0
- package/src/lib/Table/SimpleTable/index.d.ts +2 -0
- package/src/lib/Table/SimpleTable/useTablePagination.d.ts +7 -0
- package/src/lib/Table/SimpleTable/useTableSorting.d.ts +6 -0
- package/src/lib/Table/index.d.ts +2 -0
- package/src/lib/Tabs/RouteTabs.d.ts +11 -0
- package/src/lib/Tabs/TabPanel.d.ts +25 -0
- package/src/lib/Tabs/{index.ts → index.d.ts} +2 -2
- package/src/lib/{index.ts → index.d.ts} +16 -16
- package/src/theme/baseTheme.d.ts +2 -0
- package/src/theme/index.d.ts +1 -0
- package/src/theme/inputThemeOptions.d.ts +117 -0
- package/src/theme/stepperThemeOptions.d.ts +16 -0
- package/src/theme/tableThemeOptions.d.ts +47 -0
- package/src/theme/typographyThemeOptions.d.ts +29 -0
- package/src/utils/common.d.ts +7 -0
- package/src/utils/dem.d.ts +27 -0
- package/src/utils/hooks.d.ts +7 -0
- package/src/utils/{index.ts → index.d.ts} +5 -5
- package/src/utils/ui-utils.d.ts +14 -0
- package/src/utils/validators.d.ts +5 -0
- package/.babelrc +0 -13
- package/.eslintrc.json +0 -22
- package/jest.config.ts +0 -11
- package/project.json +0 -94
- package/rollup.config.js +0 -146
- package/src/assets/chevron_left_gray.svg +0 -3
- package/src/consts/index.ts +0 -13
- package/src/interfaces/common.ts +0 -18
- package/src/interfaces/definition.ts +0 -143
- package/src/interfaces/ui.ts +0 -80
- package/src/lib/Alert/Alert.tsx +0 -108
- package/src/lib/Alert/index.ts +0 -1
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.tsx +0 -16
- package/src/lib/Breadcrumbs/Breadcrumbs.tsx +0 -40
- package/src/lib/ContentLayout/ContentLayout.tsx +0 -31
- package/src/lib/ContentLayout/index.ts +0 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +0 -78
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +0 -71
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx +0 -54
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx +0 -67
- package/src/lib/Forms/BackButton.tsx +0 -46
- package/src/lib/Forms/ControlAceEditor.tsx +0 -125
- package/src/lib/Forms/ControlAutocomplete.tsx +0 -145
- package/src/lib/Forms/ControlCheckbox.tsx +0 -113
- package/src/lib/Forms/ControlDate.tsx +0 -75
- package/src/lib/Forms/ControlDateTime.tsx +0 -77
- package/src/lib/Forms/ControlDebouncedInput.tsx +0 -80
- package/src/lib/Forms/ControlInput.tsx +0 -111
- package/src/lib/Forms/ControlNumberInput.tsx +0 -121
- package/src/lib/Forms/ControlQueryAutocomplete.tsx +0 -197
- package/src/lib/Forms/ControlRadio.tsx +0 -136
- package/src/lib/Forms/ControlSelect.tsx +0 -164
- package/src/lib/Forms/ControlSwitch.tsx +0 -71
- package/src/lib/Forms/ControlTime.tsx +0 -93
- package/src/lib/Forms/CopyButton.tsx +0 -46
- package/src/lib/Forms/useAutocomplete.tsx +0 -47
- package/src/lib/InfoItem/InfoItem.tsx +0 -40
- package/src/lib/InfoItem/styles.ts +0 -17
- package/src/lib/JsonPathPicker/JsonPathPicker.tsx +0 -73
- package/src/lib/JsonPathPicker/PropertyStep.tsx +0 -70
- package/src/lib/JsonView/JsonView.tsx +0 -41
- package/src/lib/Loader/Loader.tsx +0 -41
- package/src/lib/Modals/JsonModalView.tsx +0 -53
- package/src/lib/Property/PropertyFiller/JsonEditor.tsx +0 -58
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx +0 -129
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx +0 -85
- package/src/lib/Property/PropertyFiller/PropertyFiller.tsx +0 -199
- package/src/lib/Property/PropertyFiller/usePropertyFiller.ts +0 -72
- package/src/lib/Property/PropertyFiller/useStyles.ts +0 -12
- package/src/lib/Property/PropertyValidator/NodeValidator.tsx +0 -92
- package/src/lib/Property/PropertyValidator/NodesList.tsx +0 -26
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx +0 -59
- package/src/lib/Property/PropertyValidator/PropertyValidator.tsx +0 -42
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx +0 -4
- package/src/lib/Property/PropertyValidator/StringTypeValidator.tsx +0 -36
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx +0 -62
- package/src/lib/Property/PropertyValidator/index.ts +0 -1
- package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +0 -49
- package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +0 -58
- package/src/lib/Property/PropertyValueField/DateValueField.tsx +0 -58
- package/src/lib/Property/PropertyValueField/JsonValueField.tsx +0 -65
- package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +0 -49
- package/src/lib/Property/PropertyValueField/StringValueField.tsx +0 -50
- package/src/lib/Property/PropertyValueField/TimeValueField.tsx +0 -67
- package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +0 -115
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +0 -148
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +0 -158
- package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +0 -40
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +0 -41
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +0 -27
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +0 -133
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +0 -46
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +0 -52
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +0 -103
- package/src/lib/Property/UpsertProperty/useCustomFields.ts +0 -22
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +0 -37
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +0 -40
- package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +0 -48
- package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +0 -148
- package/src/lib/Property/ViewProperty/PropertyItem.tsx +0 -43
- package/src/lib/Property/ViewProperty/ViewProperty.tsx +0 -52
- package/src/lib/Sidebar/Sidebar.styled.tsx +0 -157
- package/src/lib/Sidebar/Sidebar.tsx +0 -27
- package/src/lib/Sidebar/SidebarContext.tsx +0 -37
- package/src/lib/Sidebar/SidebarDrawer.tsx +0 -50
- package/src/lib/Sidebar/SidebarLink/MenuIcon.tsx +0 -16
- package/src/lib/Sidebar/SidebarLink/SidebarLink.tsx +0 -54
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx +0 -54
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx +0 -62
- package/src/lib/Sidebar/index.ts +0 -2
- package/src/lib/Status/Status.tsx +0 -16
- package/src/lib/Status/styles.ts +0 -21
- package/src/lib/StepperView/StepperView.tsx +0 -73
- package/src/lib/Table/DataGrid/JsonTypeCell.tsx +0 -51
- package/src/lib/Table/DataGrid/Table.tsx +0 -117
- package/src/lib/Table/DataGrid/TableAction.tsx +0 -43
- package/src/lib/Table/DataGrid/TableColumnMenu.tsx +0 -12
- package/src/lib/Table/DataGrid/TablePagination.tsx +0 -42
- package/src/lib/Table/DataGrid/index.ts +0 -2
- package/src/lib/Table/DataGrid/styles.ts +0 -59
- package/src/lib/Table/DataGrid/usePagination.ts +0 -15
- package/src/lib/Table/DataGrid/useTableQueryPagination.ts +0 -47
- package/src/lib/Table/DataGrid/useTableQuerySorting.ts +0 -47
- package/src/lib/Table/SimpleTable/SimpleTable.tsx +0 -138
- package/src/lib/Table/SimpleTable/TableActionCell.tsx +0 -67
- package/src/lib/Table/SimpleTable/index.ts +0 -2
- package/src/lib/Table/SimpleTable/useTablePagination.ts +0 -54
- package/src/lib/Table/SimpleTable/useTableSorting.ts +0 -50
- package/src/lib/Table/index.ts +0 -2
- package/src/lib/Tabs/RouteTabs.tsx +0 -54
- package/src/lib/Tabs/TabPanel.tsx +0 -42
- package/src/theme/baseTheme.ts +0 -128
- package/src/theme/fonts.d.ts +0 -2
- package/src/theme/index.ts +0 -126
- package/src/theme/inputThemeOptions.ts +0 -126
- package/src/theme/stepperThemeOptions.ts +0 -20
- package/src/theme/tableThemeOptions.ts +0 -50
- package/src/theme/typographyThemeOptions.ts +0 -32
- package/src/utils/common.ts +0 -73
- package/src/utils/dem.ts +0 -431
- package/src/utils/hooks.ts +0 -41
- package/src/utils/ui-utils.tsx +0 -132
- package/src/utils/validators.ts +0 -14
- package/tsconfig.json +0 -25
- package/tsconfig.lib.json +0 -23
- package/tsconfig.spec.json +0 -20
package/rollup.config.js
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
2
|
-
// @ts-nocheck
|
3
|
-
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
-
const nrwlConfig = require('@nrwl/react/plugins/bundle-rollup');
|
6
|
-
const builtins = require('rollup-plugin-node-builtins');
|
7
|
-
const resolve = require('@rollup/plugin-node-resolve');
|
8
|
-
const json = require('@rollup/plugin-json');
|
9
|
-
const terser = require('rollup-plugin-terser');
|
10
|
-
const path = require('path');
|
11
|
-
// const copy = require('@web/rollup-plugin-copy').copy;
|
12
|
-
const fileExtensions = [
|
13
|
-
'.mjs',
|
14
|
-
'.esm.js',
|
15
|
-
'cjs',
|
16
|
-
'.js',
|
17
|
-
'.ts',
|
18
|
-
'.tsx',
|
19
|
-
'.json',
|
20
|
-
'.jsx',
|
21
|
-
];
|
22
|
-
const url = require('@rollup/plugin-url');
|
23
|
-
|
24
|
-
function getRollupOptions(options) {
|
25
|
-
const extraGlobals = {
|
26
|
-
react: 'React',
|
27
|
-
classnames: 'cn',
|
28
|
-
crypto: 'crypto',
|
29
|
-
'@mui/x-data-grid': 'xDataGrid',
|
30
|
-
'react-dom': 'ReactDOM',
|
31
|
-
'react-router-dom': 'ReactRouterDOM',
|
32
|
-
'styled-components': 'styled',
|
33
|
-
'@emotion/react': 'emotionReact',
|
34
|
-
'@emotion/styled': 'emotionStyled',
|
35
|
-
axios: 'axios',
|
36
|
-
'url-join': 'urlJoin',
|
37
|
-
'@mui/material': 'materialUiCore',
|
38
|
-
'react-hook-form': 'reactHookForm',
|
39
|
-
'@mui/icons-material/DeleteForever': 'DeleteForeverIcon',
|
40
|
-
'@mui/material/TextField': 'TextField',
|
41
|
-
'@mui/material/MenuItem': 'MenuItem',
|
42
|
-
'@mui/material/Button': 'Button',
|
43
|
-
'@mui/material/Dialog': 'Dialog',
|
44
|
-
'@mui/material/DialogActions': 'DialogActions',
|
45
|
-
'@mui/material/DialogContent': 'DialogContent',
|
46
|
-
'@mui/material/DialogContentText': 'DialogContentText',
|
47
|
-
'@mui/material/DialogTitle': 'DialogTitle',
|
48
|
-
'@mui/material/Box': 'Box',
|
49
|
-
'@mui/material/Unstable_Grid2': 'Grid',
|
50
|
-
'@mui/material/Checkbox': 'Checkbox',
|
51
|
-
'@mui/material/FormControl': 'FormControl',
|
52
|
-
'@mui/material/InputLabel': 'InputLabel',
|
53
|
-
'@mui/material/Typography': 'Typography',
|
54
|
-
'@mui/material/FormHelperText': 'FormHelperText',
|
55
|
-
'@mui/x-date-pickers/DatePicker': 'DatePicker',
|
56
|
-
'@mui/x-date-pickers/TimePicker': 'TimePicker',
|
57
|
-
'@mui/x-date-pickers/DateTimePicker': 'DateTimePicker',
|
58
|
-
'@mui/material/Card': 'Card',
|
59
|
-
'@mui/material/CardContent': 'CardContent',
|
60
|
-
'@mui/material/TablePagination': 'TablePagination',
|
61
|
-
'@mui/icons-material/CheckCircle': 'CheckCircleIcon',
|
62
|
-
'@mui/material/FormControlLabel': 'FormControlLabel',
|
63
|
-
'@mui/material/IconButton': 'IconButton',
|
64
|
-
'@mui/material/Tooltip': 'Tooltip',
|
65
|
-
'@mui/icons-material/Add': 'AddIcon',
|
66
|
-
'@mui/icons-material/FileCopyOutlined': 'FileCopyOutlined',
|
67
|
-
'@mui/material/CircularProgress': 'CircularProgress',
|
68
|
-
'@mui/icons-material/ZoomInOutlined': 'ZoomInIcon',
|
69
|
-
'@mui/icons-material/ZoomOutOutlined': 'ZoomOutIcon',
|
70
|
-
'@mui/icons-material/AspectRatioOutlined': 'AspectRatioOutlinedIcon',
|
71
|
-
'@mui/icons-material/DeleteForeverOutlined': 'DeleteForeverOutlinedIcon',
|
72
|
-
'@mui/icons-material/ReplayOutlined': 'ReplayOutlinedIcon',
|
73
|
-
'@mui/icons-material/Settings': 'SettingsIcon',
|
74
|
-
'@mui/icons-material/Pause': 'PauseIcon',
|
75
|
-
'@mui/icons-material/PlayArrow': 'PlayArrowIcon',
|
76
|
-
'@mui/icons-material/Fullscreen': 'Fullscreen',
|
77
|
-
'@mui/icons-material/NotInterested': 'NotInterestedIcon',
|
78
|
-
'@mui/material/ButtonGroup': 'ButtonGroupIcon',
|
79
|
-
'@mui/material/Radio': 'Radio',
|
80
|
-
'@mui/material/RadioGroup': 'RadioGroup',
|
81
|
-
'@mui/material/List': 'List',
|
82
|
-
'@mui/material/ListItem': 'ListItem',
|
83
|
-
'@mui/material/ListItemText': 'ListItemText',
|
84
|
-
'@mui/material/ListItemSecondaryAction': 'ListItemSecondaryAction',
|
85
|
-
'@mui/material/Collapse': 'Collapse',
|
86
|
-
'@mui/material/Table': 'MuiTable',
|
87
|
-
'@mui/material/TableRow': 'TableRow',
|
88
|
-
'@mui/material/TableCell': 'TableCell',
|
89
|
-
'@mui/material/TableBody': 'TableBody',
|
90
|
-
'@mui/material/TableContainer': 'TableContainer',
|
91
|
-
'@mui/material/TableHead': 'TableHead',
|
92
|
-
'@mui/material/Breadcrumbs': 'Breadcrumbs',
|
93
|
-
'@mui/icons-material/Close': 'CloseIcon',
|
94
|
-
'react-ace': 'AceEditor',
|
95
|
-
'date-fns': 'dateFns',
|
96
|
-
tslib: 'tslib',
|
97
|
-
'draft-js': 'draftJs',
|
98
|
-
'react-toastify': 'reactToastify',
|
99
|
-
};
|
100
|
-
if (Array.isArray(options.output)) {
|
101
|
-
options.output.forEach((o) => {
|
102
|
-
o.globals = Object.assign(Object.assign({}, o.globals), extraGlobals);
|
103
|
-
o.output.compact = true;
|
104
|
-
// o.output.inlineDynamicImports = false;
|
105
|
-
});
|
106
|
-
} else {
|
107
|
-
options.output = Object.assign(Object.assign({}, options.output), {
|
108
|
-
globals: Object.assign(
|
109
|
-
Object.assign({}, options.output.globals),
|
110
|
-
extraGlobals
|
111
|
-
),
|
112
|
-
compact: true,
|
113
|
-
// inlineDynamicImports: false
|
114
|
-
});
|
115
|
-
}
|
116
|
-
|
117
|
-
options.treeshake = {
|
118
|
-
moduleSideEffects: false,
|
119
|
-
preset: 'recommended',
|
120
|
-
};
|
121
|
-
options.external = (id) => {
|
122
|
-
return !id.startsWith('.') && !path.isAbsolute(id);
|
123
|
-
};
|
124
|
-
|
125
|
-
options.plugins.push(
|
126
|
-
resolve.nodeResolve({
|
127
|
-
mainFields: ['module', 'browser', 'main'],
|
128
|
-
preferBuiltins: true,
|
129
|
-
extensions: fileExtensions,
|
130
|
-
moduleDirectories: ['dist/libs', 'node_modules'], // IMPORTANT
|
131
|
-
})
|
132
|
-
);
|
133
|
-
options.plugins.push(
|
134
|
-
url({
|
135
|
-
limit: Infinity,
|
136
|
-
include: ['**/*.woff', '**/*.woff2'],
|
137
|
-
})
|
138
|
-
);
|
139
|
-
// options.output.sourcemap = true;
|
140
|
-
options.plugins.push(builtins());
|
141
|
-
options.plugins.push(json());
|
142
|
-
options.plugins.push(terser.terser());
|
143
|
-
return options;
|
144
|
-
}
|
145
|
-
|
146
|
-
module.exports = getRollupOptions;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M6.47054 0.861939C6.59552 0.986958 6.66573 1.1565 6.66573 1.33327C6.66573 1.51005 6.59552 1.67959 6.47054 1.80461L2.27521 5.99994L6.47054 10.1953C6.59198 10.321 6.65917 10.4894 6.65766 10.6642C6.65614 10.839 6.58602 11.0062 6.46242 11.1298C6.33881 11.2534 6.1716 11.3235 5.99681 11.3251C5.82201 11.3266 5.65361 11.2594 5.52787 11.1379L0.861207 6.47127C0.736226 6.34625 0.666016 6.17672 0.666016 5.99994C0.666016 5.82316 0.736226 5.65362 0.861207 5.52861L5.52787 0.861939C5.65289 0.736958 5.82243 0.666748 5.99921 0.666748C6.17598 0.666748 6.34552 0.736958 6.47054 0.861939V0.861939Z" fill="#8B8C9E"/>
|
3
|
-
</svg>
|
package/src/consts/index.ts
DELETED
package/src/interfaces/common.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
export 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
|
-
|
12
|
-
export interface PaginateData<T> {
|
13
|
-
collection: T[];
|
14
|
-
totalItems: number;
|
15
|
-
totalPages: number;
|
16
|
-
total?: number;
|
17
|
-
pageNumber: number;
|
18
|
-
}
|
@@ -1,143 +0,0 @@
|
|
1
|
-
import { RoundingMode } from './common';
|
2
|
-
|
3
|
-
export enum PropertyType {
|
4
|
-
STRING = 'STRING',
|
5
|
-
INTEGER = 'INTEGER',
|
6
|
-
BIG_INTEGER = 'BIG_INTEGER',
|
7
|
-
BIG_DECIMAL = 'BIG_DECIMAL',
|
8
|
-
FLOAT = 'FLOAT',
|
9
|
-
LONG = 'LONG',
|
10
|
-
DOUBLE = 'DOUBLE',
|
11
|
-
BOOLEAN = 'BOOLEAN',
|
12
|
-
ENTITY_REFERENCE = 'ENTITY_REFERENCE',
|
13
|
-
ENTITY = 'ENTITY',
|
14
|
-
JSON = 'JSON',
|
15
|
-
DATE = 'DATE',
|
16
|
-
TIME = 'TIME',
|
17
|
-
DATE_TIME = 'DATE_TIME',
|
18
|
-
ANY = 'ANY',
|
19
|
-
}
|
20
|
-
|
21
|
-
export interface Definition<T = Record<string, never>> {
|
22
|
-
code: string;
|
23
|
-
version: number;
|
24
|
-
name: string;
|
25
|
-
properties: PropertiesObjectType<T>;
|
26
|
-
}
|
27
|
-
|
28
|
-
export type PropertiesObjectType<T = Record<string, never>> = Record<string, PropertyUnion & T>;
|
29
|
-
export type PropertiesArrayType<T = Record<string, never>> = Array<PropertyUnion & T>;
|
30
|
-
|
31
|
-
export interface CreateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
32
|
-
properties: PropertiesArrayType<T>;
|
33
|
-
}
|
34
|
-
export interface UpdateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
|
35
|
-
properties: PropertiesArrayType<T>;
|
36
|
-
}
|
37
|
-
|
38
|
-
export interface Property {
|
39
|
-
propertyType: keyof typeof PropertyType | { value: keyof typeof PropertyType };
|
40
|
-
name: string;
|
41
|
-
defaultValue: unknown;
|
42
|
-
defaultValues: unknown[];
|
43
|
-
isRequired: boolean;
|
44
|
-
isMultiple: boolean;
|
45
|
-
sortOrder: number;
|
46
|
-
isEnabled: boolean;
|
47
|
-
uiSettings: unknown;
|
48
|
-
validationNode: unknown;
|
49
|
-
// FRONTEND FIELDS
|
50
|
-
key?: string;
|
51
|
-
}
|
52
|
-
|
53
|
-
export interface BigDecimalProperty extends Property {
|
54
|
-
propertyType: PropertyType.BIG_DECIMAL;
|
55
|
-
precisionScale: number;
|
56
|
-
roundingMode: keyof typeof RoundingMode;
|
57
|
-
}
|
58
|
-
|
59
|
-
export interface BigIntegerProperty extends Property {
|
60
|
-
propertyType: PropertyType.BIG_INTEGER;
|
61
|
-
}
|
62
|
-
|
63
|
-
export interface BooleanProperty extends Property {
|
64
|
-
propertyType: PropertyType.BOOLEAN;
|
65
|
-
}
|
66
|
-
|
67
|
-
export interface DateProperty extends Property {
|
68
|
-
propertyType: PropertyType.DATE;
|
69
|
-
format: string;
|
70
|
-
}
|
71
|
-
|
72
|
-
export interface DateTimeProperty extends Property {
|
73
|
-
propertyType: PropertyType.DATE_TIME;
|
74
|
-
format: string;
|
75
|
-
}
|
76
|
-
|
77
|
-
export interface DoubleProperty extends Property {
|
78
|
-
propertyType: PropertyType.DOUBLE;
|
79
|
-
}
|
80
|
-
|
81
|
-
export interface EntityTypeProperty<T = Record<string, never>> extends Property {
|
82
|
-
propertyType: PropertyType.ENTITY;
|
83
|
-
properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
|
84
|
-
}
|
85
|
-
|
86
|
-
export interface EntityReferenceProperty extends Property {
|
87
|
-
propertyType: PropertyType.ENTITY_REFERENCE;
|
88
|
-
definitionCode: string;
|
89
|
-
definitionVersion: string;
|
90
|
-
labelPropertyCode: string;
|
91
|
-
valuePropertyCode: string;
|
92
|
-
}
|
93
|
-
|
94
|
-
export interface FloatProperty extends Property {
|
95
|
-
propertyType: PropertyType.FLOAT;
|
96
|
-
}
|
97
|
-
|
98
|
-
export interface StringProperty extends Property {
|
99
|
-
propertyType: PropertyType.STRING;
|
100
|
-
restrictedValues: string[];
|
101
|
-
}
|
102
|
-
|
103
|
-
export interface IntegerProperty extends Property {
|
104
|
-
propertyType: PropertyType.INTEGER;
|
105
|
-
}
|
106
|
-
|
107
|
-
export interface JsonProperty extends Property {
|
108
|
-
propertyType: PropertyType.JSON;
|
109
|
-
}
|
110
|
-
|
111
|
-
export interface LongProperty extends Property {
|
112
|
-
propertyType: PropertyType.LONG;
|
113
|
-
}
|
114
|
-
|
115
|
-
export interface TimeProperty extends Property {
|
116
|
-
propertyType: PropertyType.TIME;
|
117
|
-
format: string;
|
118
|
-
}
|
119
|
-
|
120
|
-
export interface AnyProperty extends Property {
|
121
|
-
propertyType: PropertyType.ANY;
|
122
|
-
}
|
123
|
-
|
124
|
-
export type PropertyUnion<T = Record<string, never>> =
|
125
|
-
| BigDecimalProperty
|
126
|
-
| BigIntegerProperty
|
127
|
-
| BooleanProperty
|
128
|
-
| DateProperty
|
129
|
-
| DateTimeProperty
|
130
|
-
| DoubleProperty
|
131
|
-
| EntityTypeProperty<T>
|
132
|
-
| EntityReferenceProperty
|
133
|
-
| FloatProperty
|
134
|
-
| StringProperty
|
135
|
-
| IntegerProperty
|
136
|
-
| JsonProperty
|
137
|
-
| LongProperty
|
138
|
-
| TimeProperty
|
139
|
-
| AnyProperty;
|
140
|
-
|
141
|
-
export const DATE_DEFAULT_FORMAT = 'yyyy-MM-dd';
|
142
|
-
export const TIME_DEFAULT_FORMAT = 'HH:mm:ss';
|
143
|
-
export const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
|
package/src/interfaces/ui.ts
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
import { PaginateData } from './common';
|
2
|
-
import { PropertiesArrayType } from './definition';
|
3
|
-
import { ReactNode } from 'react';
|
4
|
-
|
5
|
-
type PaginateParams = {
|
6
|
-
page: string;
|
7
|
-
size: string;
|
8
|
-
[key: string]: string;
|
9
|
-
};
|
10
|
-
|
11
|
-
export interface FilterField {
|
12
|
-
name: string;
|
13
|
-
label: string;
|
14
|
-
type: 'text' | 'select' | 'autocomplete' | 'date' | 'number' | 'date_time' | 'query_autocomplete';
|
15
|
-
value?: unknown;
|
16
|
-
multiple?: boolean;
|
17
|
-
options?: {
|
18
|
-
value: string;
|
19
|
-
label: string;
|
20
|
-
}[];
|
21
|
-
searchBy?: string;
|
22
|
-
sortBy?: string;
|
23
|
-
labelKey?: string;
|
24
|
-
valueKey?: string;
|
25
|
-
queryFunction?: (params: PaginateParams) => Promise<PaginateData<unknown>>;
|
26
|
-
}
|
27
|
-
|
28
|
-
export interface Option<T = string> {
|
29
|
-
value: T;
|
30
|
-
label: string;
|
31
|
-
}
|
32
|
-
|
33
|
-
export type TableDataType = 'id' | 'JSON' | 'JSON_text' | 'JSON_copy' | 'copy' | 'boolean' | 'date' | 'status' | 'array';
|
34
|
-
|
35
|
-
export type JsonPathPickerProperty = {
|
36
|
-
properties: PropertiesArrayType;
|
37
|
-
pathPrefix: string;
|
38
|
-
title: string;
|
39
|
-
};
|
40
|
-
|
41
|
-
export type CustomPropertyFieldProps = {
|
42
|
-
name: string;
|
43
|
-
label?: string;
|
44
|
-
type: 'text' | 'checkbox' | 'number' | 'select' | 'autocomplete' | 'json';
|
45
|
-
decimal?: boolean;
|
46
|
-
options?: string[] | { value: unknown; label: string }[];
|
47
|
-
required?: boolean;
|
48
|
-
};
|
49
|
-
|
50
|
-
export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
|
51
|
-
|
52
|
-
export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
|
53
|
-
|
54
|
-
export type ValidateFunc = (value: string) => boolean | string;
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
export interface Column<T> {
|
59
|
-
id: string;
|
60
|
-
label: string;
|
61
|
-
align?: 'right' | 'left';
|
62
|
-
type?: TableDataType;
|
63
|
-
sortKey?: string;
|
64
|
-
width?: number;
|
65
|
-
renderCell?: (row: Row<T>, rowIndex: number) => ReactNode;
|
66
|
-
}
|
67
|
-
|
68
|
-
export type Row<T> = T & {
|
69
|
-
id?: string;
|
70
|
-
onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
|
71
|
-
};
|
72
|
-
|
73
|
-
export type Route = {
|
74
|
-
name: string;
|
75
|
-
main?: boolean;
|
76
|
-
icon?: ReactNode;
|
77
|
-
link?: string;
|
78
|
-
query?: string;
|
79
|
-
children?: Route[];
|
80
|
-
}
|
package/src/lib/Alert/Alert.tsx
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import Button from '@mui/material/Button';
|
3
|
-
import Dialog, { DialogProps } from '@mui/material/Dialog';
|
4
|
-
import DialogActions from '@mui/material/DialogActions';
|
5
|
-
import DialogContent from '@mui/material/DialogContent';
|
6
|
-
import DialogContentText from '@mui/material/DialogContentText';
|
7
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
8
|
-
import Box from '@mui/material/Box';
|
9
|
-
import { Loader } from '../Loader';
|
10
|
-
|
11
|
-
/**
|
12
|
-
* This interface is referencing the [[AlertDialog]] component props.
|
13
|
-
* @category Common UI components
|
14
|
-
*/
|
15
|
-
export interface AlertDialogProps {
|
16
|
-
/**
|
17
|
-
* Is dialog open flag
|
18
|
-
*/
|
19
|
-
open: boolean;
|
20
|
-
/**
|
21
|
-
* Dialog title
|
22
|
-
*/
|
23
|
-
title: string;
|
24
|
-
/**
|
25
|
-
* Dialog description
|
26
|
-
*/
|
27
|
-
description?: string;
|
28
|
-
/**
|
29
|
-
* Close button text
|
30
|
-
*/
|
31
|
-
closeButtonTitle?: string;
|
32
|
-
/**
|
33
|
-
* Confirm button text
|
34
|
-
*/
|
35
|
-
confirmButtonTitle?: string;
|
36
|
-
/**
|
37
|
-
* onClose event handle function
|
38
|
-
*/
|
39
|
-
onClose: () => void;
|
40
|
-
/**
|
41
|
-
* onConfirm event handle function
|
42
|
-
*/
|
43
|
-
|
44
|
-
onConfirm?: (values?: any) => void;
|
45
|
-
/**
|
46
|
-
* children components
|
47
|
-
*/
|
48
|
-
children?: React.ReactNode;
|
49
|
-
/**
|
50
|
-
* Material UI Dialog component props
|
51
|
-
*/
|
52
|
-
dialogProps?: Partial<DialogProps>;
|
53
|
-
loading?: boolean;
|
54
|
-
confirmButtonDisabled?: boolean;
|
55
|
-
maxWidth?: false | "xs" | "sm" | "md" | "lg" | "xl";
|
56
|
-
};
|
57
|
-
|
58
|
-
/**
|
59
|
-
* Alert dialog component. Used for popup information
|
60
|
-
* @category Common UI components
|
61
|
-
*/
|
62
|
-
export const AlertDialog = ({
|
63
|
-
open,
|
64
|
-
title,
|
65
|
-
description,
|
66
|
-
closeButtonTitle="Close",
|
67
|
-
onClose,
|
68
|
-
confirmButtonTitle = "Confirm",
|
69
|
-
confirmButtonDisabled = false,
|
70
|
-
onConfirm,
|
71
|
-
children,
|
72
|
-
dialogProps,
|
73
|
-
loading,
|
74
|
-
maxWidth="xs"
|
75
|
-
}: AlertDialogProps) => {
|
76
|
-
return (
|
77
|
-
<div>
|
78
|
-
<Dialog
|
79
|
-
open={open}
|
80
|
-
onClose={onClose}
|
81
|
-
aria-labelledby="alert-dialog-title"
|
82
|
-
aria-describedby="alert-dialog-description"
|
83
|
-
fullWidth
|
84
|
-
maxWidth={maxWidth}
|
85
|
-
{...dialogProps}
|
86
|
-
>
|
87
|
-
{loading && <Loader />}
|
88
|
-
<DialogTitle id="alert-dialog-title">{title}</DialogTitle>
|
89
|
-
<DialogContent>
|
90
|
-
{ description && <DialogContentText id="alert-dialog-description">{description}</DialogContentText>}
|
91
|
-
<Box maxWidth="100%" overflow="hidden">{children}</Box>
|
92
|
-
</DialogContent>
|
93
|
-
<DialogActions>
|
94
|
-
<Button onClick={onClose} color="primary" variant="contained">
|
95
|
-
{closeButtonTitle}
|
96
|
-
</Button>
|
97
|
-
{confirmButtonTitle && onConfirm ? (
|
98
|
-
<Button onClick={onConfirm} color="secondary" variant="contained" autoFocus disabled={confirmButtonDisabled}>
|
99
|
-
{confirmButtonTitle}
|
100
|
-
</Button>
|
101
|
-
) : null}
|
102
|
-
</DialogActions>
|
103
|
-
</Dialog>
|
104
|
-
</div>
|
105
|
-
);
|
106
|
-
};
|
107
|
-
|
108
|
-
export default AlertDialog;
|
package/src/lib/Alert/index.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Alert';
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Link } from 'react-router-dom';
|
2
|
-
import { styled } from '@mui/material/styles';
|
3
|
-
|
4
|
-
// export const StyledBreadcrumbs = styled(Breadcrumbs)(() => ({
|
5
|
-
// '& li': {
|
6
|
-
// color: '#6D6E85',
|
7
|
-
// '&:last-child': {
|
8
|
-
// color: '#262842',
|
9
|
-
// },
|
10
|
-
// },
|
11
|
-
// }));
|
12
|
-
|
13
|
-
export const StyledLink = styled(Link)(() => ({
|
14
|
-
textDecoration: 'none',
|
15
|
-
color: 'inherit',
|
16
|
-
}));
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import Typography from '@mui/material/Typography';
|
2
|
-
import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
|
3
|
-
import { StyledLink } from './Breadcrumbs.styled';
|
4
|
-
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
|
5
|
-
|
6
|
-
type Props = {
|
7
|
-
crumbs: {
|
8
|
-
title: string;
|
9
|
-
link?: string;
|
10
|
-
}[];
|
11
|
-
};
|
12
|
-
|
13
|
-
export const Breadcrumbs = ({ crumbs }: Props) => {
|
14
|
-
return (
|
15
|
-
<MuiBreadcrumbs
|
16
|
-
separator={<NavigateNextIcon fontSize="small" />}
|
17
|
-
aria-label="breadcrumb"
|
18
|
-
sx={{
|
19
|
-
'& li': {
|
20
|
-
color: '#6D6E85',
|
21
|
-
'&:last-child': {
|
22
|
-
color: '#262842',
|
23
|
-
},
|
24
|
-
},
|
25
|
-
}}
|
26
|
-
>
|
27
|
-
{crumbs.map((crumb, index) =>
|
28
|
-
crumb.link ? (
|
29
|
-
<StyledLink key={index} to={crumb.link} className="breadcrumb">
|
30
|
-
{crumb.title}
|
31
|
-
</StyledLink>
|
32
|
-
) : (
|
33
|
-
<Typography key={index} className="breadcrumb">
|
34
|
-
{crumb.title}
|
35
|
-
</Typography>
|
36
|
-
)
|
37
|
-
)}
|
38
|
-
</MuiBreadcrumbs>
|
39
|
-
);
|
40
|
-
};
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { Suspense, ReactNode } from 'react';
|
2
|
-
import Box from '@mui/material/Box';
|
3
|
-
import { SxProps, Theme } from '@mui/material/styles';
|
4
|
-
import Toolbar from '@mui/material/Toolbar';
|
5
|
-
import { Outlet } from 'react-router-dom';
|
6
|
-
import { Loader } from '../Loader';
|
7
|
-
|
8
|
-
type Props = {
|
9
|
-
children?: ReactNode;
|
10
|
-
toolbar?: ReactNode;
|
11
|
-
contentSx?: SxProps<Theme>;
|
12
|
-
}
|
13
|
-
|
14
|
-
export const ContentLayout = ({ children, toolbar, contentSx }: Props) => {
|
15
|
-
return (
|
16
|
-
<Box component="main" sx={{ flexGrow: 1, bgcolor: 'background.default' }}>
|
17
|
-
<Toolbar
|
18
|
-
sx={{
|
19
|
-
borderBottom: '1px solid rgba(38, 40, 66, 0.08)',
|
20
|
-
}}
|
21
|
-
>{toolbar}</Toolbar>
|
22
|
-
<Box sx={{ ...contentSx, height: 'calc(100vh - 56px)', overflow: 'scroll' }}>
|
23
|
-
<Suspense fallback={<Loader />}>
|
24
|
-
{
|
25
|
-
children ?? <Outlet />
|
26
|
-
}
|
27
|
-
</Suspense>
|
28
|
-
</Box>
|
29
|
-
</Box>
|
30
|
-
);
|
31
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ContentLayout';
|
@@ -1,78 +0,0 @@
|
|
1
|
-
import Box from '@mui/material/Box';
|
2
|
-
import Grid from '@mui/material/Unstable_Grid2';
|
3
|
-
import Typography from '@mui/material/Typography';
|
4
|
-
import { ControlInput, ControlNumberInput } from '../../Forms';
|
5
|
-
import CreatePropertiesList from '../../Property/UpsertProperty/CreatePropertiesList';
|
6
|
-
|
7
|
-
import { useFormContext } from 'react-hook-form';
|
8
|
-
|
9
|
-
type Props = {
|
10
|
-
definitionFieldName?: string;
|
11
|
-
title?: string;
|
12
|
-
hideCodeField?: boolean;
|
13
|
-
hideVersionField?: boolean;
|
14
|
-
hideNameField?: boolean;
|
15
|
-
required?: boolean;
|
16
|
-
};
|
17
|
-
|
18
|
-
export const CreateDefinition = ({
|
19
|
-
definitionFieldName,
|
20
|
-
title,
|
21
|
-
hideCodeField,
|
22
|
-
hideVersionField,
|
23
|
-
hideNameField,
|
24
|
-
required = false,
|
25
|
-
}: Props) => {
|
26
|
-
const { control } = useFormContext();
|
27
|
-
|
28
|
-
return (
|
29
|
-
<Grid container direction="column" spacing={2}>
|
30
|
-
{title && (
|
31
|
-
<Grid sm={12}>
|
32
|
-
<Box my={2}>
|
33
|
-
<Typography variant="h6">{title}</Typography>
|
34
|
-
</Box>
|
35
|
-
</Grid>
|
36
|
-
)}
|
37
|
-
{!hideNameField && (
|
38
|
-
<Grid sm={12}>
|
39
|
-
<ControlInput
|
40
|
-
required
|
41
|
-
control={control}
|
42
|
-
name={definitionFieldName ? `${definitionFieldName}.name` : `name`}
|
43
|
-
label="Name"
|
44
|
-
/>
|
45
|
-
</Grid>
|
46
|
-
)}
|
47
|
-
{!hideCodeField && (
|
48
|
-
<Grid sm={12}>
|
49
|
-
<ControlInput
|
50
|
-
required
|
51
|
-
control={control}
|
52
|
-
name={definitionFieldName ? `${definitionFieldName}.code` : `code`}
|
53
|
-
label="Code"
|
54
|
-
/>
|
55
|
-
</Grid>
|
56
|
-
)}
|
57
|
-
{!hideVersionField && (
|
58
|
-
<Grid sm={12}>
|
59
|
-
<ControlNumberInput
|
60
|
-
required
|
61
|
-
control={control}
|
62
|
-
name={
|
63
|
-
definitionFieldName ? `${definitionFieldName}.version` : `version`
|
64
|
-
}
|
65
|
-
label="Version"
|
66
|
-
/>
|
67
|
-
</Grid>
|
68
|
-
)}
|
69
|
-
|
70
|
-
<CreatePropertiesList
|
71
|
-
required={required}
|
72
|
-
parentFieldName={definitionFieldName}
|
73
|
-
/>
|
74
|
-
</Grid>
|
75
|
-
);
|
76
|
-
};
|
77
|
-
|
78
|
-
export default CreateDefinition;
|