@jsonforms/material-renderers 3.0.0-alpha.1 → 3.0.0-beta.1
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/docs/assets/js/search.json +1 -1
- package/docs/classes/combinatorproperties.html +2 -5
- package/docs/classes/materialanyofstringorenumcontrol.html +6 -9
- package/docs/classes/materialtablecontrol.html +4 -7
- package/docs/globals.html +878 -423
- package/docs/index.html +68 -59
- package/docs/interfaces/ajvprops.html +1 -4
- package/docs/interfaces/arraylayouttoolbarprops.html +5 -8
- package/docs/interfaces/categorizationstate.html +1 -4
- package/docs/interfaces/categorizationstepperstate.html +0 -3
- package/docs/interfaces/combinatorpropertiesprops.html +0 -3
- package/docs/interfaces/deletedialogprops.html +0 -3
- package/docs/interfaces/dispatchpropsofexpandpanel.html +3 -6
- package/docs/interfaces/emptytableprops.html +0 -3
- package/docs/interfaces/expandpanelprops.html +19 -22
- package/docs/interfaces/jsonformstheme.html +39 -49
- package/docs/interfaces/materialcategorizationlayoutrendererprops.html +5 -8
- package/docs/interfaces/materialcategorizationstepperlayoutrendererprops.html +1 -4
- package/docs/interfaces/materiallayoutrendererprops.html +0 -3
- package/docs/interfaces/materialtabletoolbarprops.html +9 -12
- package/docs/interfaces/muitextinputprops.html +2 -5
- package/docs/interfaces/nonemptycellcomponentprops.html +266 -0
- package/docs/interfaces/nonemptycellprops.html +0 -3
- package/docs/interfaces/nonemptyrowprops.html +80 -27
- package/docs/interfaces/ownoneofprops.html +0 -3
- package/docs/interfaces/ownpropsofexpandpanel.html +14 -17
- package/docs/interfaces/ownpropsofnonemptycell.html +0 -3
- package/docs/interfaces/statepropsofexpandpanel.html +16 -19
- package/docs/interfaces/tableheadercellprops.html +0 -3
- package/docs/interfaces/tablerowsprop.html +9 -12
- package/docs/interfaces/validationprops.html +2 -5
- package/docs/interfaces/withdeletedialogsupport.html +0 -3
- package/docs/interfaces/withinput.html +1 -4
- package/docs/interfaces/withoptionlabel.html +7 -7
- package/example/index.ts +7 -23
- package/lib/additional/ListWithDetailMasterItem.d.ts +3 -3
- package/lib/additional/MaterialLabelRenderer.d.ts +13 -13
- package/lib/additional/MaterialListWithDetailRenderer.d.ts +6 -6
- package/lib/additional/index.d.ts +4 -4
- package/lib/cells/CustomizableCells.d.ts +9 -9
- package/lib/cells/MaterialBooleanCell.d.ts +6 -6
- package/lib/cells/MaterialBooleanToggleCell.d.ts +6 -6
- package/lib/cells/MaterialDateCell.d.ts +6 -6
- package/lib/cells/MaterialEnumCell.d.ts +10 -10
- package/lib/cells/MaterialIntegerCell.d.ts +6 -6
- package/lib/cells/MaterialNumberCell.d.ts +10 -10
- package/lib/cells/MaterialNumberFormatCell.d.ts +10 -10
- package/lib/cells/MaterialOneOfEnumCell.d.ts +10 -10
- package/lib/cells/MaterialTextCell.d.ts +10 -10
- package/lib/cells/MaterialTimeCell.d.ts +6 -6
- package/lib/cells/index.d.ts +13 -13
- package/lib/complex/CombinatorProperties.d.ts +12 -12
- package/lib/complex/DeleteDialog.d.ts +11 -11
- package/lib/complex/MaterialAllOfRenderer.d.ts +6 -5
- package/lib/complex/MaterialAnyOfRenderer.d.ts +6 -5
- package/lib/complex/MaterialArrayControlRenderer.d.ts +5 -5
- package/lib/complex/MaterialEnumArrayRenderer.d.ts +6 -6
- package/lib/complex/MaterialObjectRenderer.d.ts +6 -5
- package/lib/complex/MaterialOneOfRenderer.d.ts +9 -8
- package/lib/complex/MaterialTableControl.d.ts +25 -10
- package/lib/complex/NoBorderTableCell.d.ts +3 -3
- package/lib/complex/TableToolbar.d.ts +15 -15
- package/lib/complex/ValidationIcon.d.ts +7 -11
- package/lib/complex/index.d.ts +19 -19
- package/lib/controls/MaterialAnyOfStringOrEnumControl.d.ts +9 -9
- package/lib/controls/MaterialBooleanControl.d.ts +6 -6
- package/lib/controls/MaterialBooleanToggleControl.d.ts +6 -6
- package/lib/controls/MaterialDateControl.d.ts +6 -9
- package/lib/controls/MaterialDateTimeControl.d.ts +6 -9
- package/lib/controls/MaterialEnumControl.d.ts +7 -6
- package/lib/controls/MaterialInputControl.d.ts +6 -9
- package/lib/controls/MaterialIntegerControl.d.ts +6 -6
- package/lib/controls/MaterialNativeControl.d.ts +6 -9
- package/lib/controls/MaterialNumberControl.d.ts +6 -6
- package/lib/controls/MaterialOneOfEnumControl.d.ts +7 -6
- package/lib/controls/MaterialOneOfRadioGroupControl.d.ts +6 -6
- package/lib/controls/MaterialRadioGroup.d.ts +3 -6
- package/lib/controls/MaterialRadioGroupControl.d.ts +6 -6
- package/lib/controls/MaterialSliderControl.d.ts +6 -9
- package/lib/controls/MaterialTextControl.d.ts +6 -6
- package/lib/controls/MaterialTimeControl.d.ts +6 -9
- package/lib/controls/index.d.ts +35 -35
- package/lib/index.d.ts +9 -9
- package/lib/jsonforms-react-material.cjs.js +1489 -0
- package/lib/jsonforms-react-material.cjs.js.map +1 -0
- package/lib/jsonforms-react-material.esm.js +1221 -0
- package/lib/jsonforms-react-material.esm.js.map +1 -0
- package/lib/layouts/ArrayToolbar.d.ts +9 -9
- package/lib/layouts/ExpandPanelRenderer.d.ts +51 -51
- package/lib/layouts/MaterialArrayLayout.d.ts +3 -13
- package/lib/layouts/MaterialArrayLayoutRenderer.d.ts +6 -6
- package/lib/layouts/MaterialCategorizationLayout.d.ts +17 -25
- package/lib/layouts/MaterialCategorizationStepperLayout.d.ts +13 -20
- package/lib/layouts/MaterialGroupLayout.d.ts +7 -7
- package/lib/layouts/MaterialHorizontalLayout.d.ts +10 -10
- package/lib/layouts/MaterialVerticalLayout.d.ts +10 -10
- package/lib/layouts/index.d.ts +6 -6
- package/lib/mui-controls/MuiAutocomplete.d.ts +9 -0
- package/lib/mui-controls/MuiCheckbox.d.ts +3 -3
- package/lib/mui-controls/MuiInputInteger.d.ts +3 -3
- package/lib/mui-controls/MuiInputNumber.d.ts +3 -3
- package/lib/mui-controls/MuiInputNumberFormat.d.ts +3 -3
- package/lib/mui-controls/MuiInputText.d.ts +9 -9
- package/lib/mui-controls/MuiInputTime.d.ts +3 -3
- package/lib/mui-controls/MuiSelect.d.ts +3 -3
- package/lib/mui-controls/MuiToggle.d.ts +3 -3
- package/lib/mui-controls/index.d.ts +7 -7
- package/lib/util/datejs.d.ts +3 -3
- package/lib/util/debounce.d.ts +1 -0
- package/lib/util/focus.d.ts +1 -0
- package/lib/util/index.d.ts +5 -3
- package/lib/util/layout.d.ts +15 -13
- package/lib/util/theme.d.ts +10 -10
- package/package.json +34 -28
- package/rollup.config.js +51 -0
- package/src/additional/ListWithDetailMasterItem.tsx +3 -6
- package/src/additional/MaterialLabelRenderer.tsx +1 -1
- package/src/additional/MaterialListWithDetailRenderer.tsx +1 -1
- package/src/cells/MaterialDateCell.tsx +1 -1
- package/src/cells/MaterialTimeCell.tsx +1 -0
- package/src/complex/CombinatorProperties.tsx +2 -2
- package/src/complex/DeleteDialog.tsx +2 -2
- package/src/complex/MaterialAllOfRenderer.tsx +3 -2
- package/src/complex/MaterialAnyOfRenderer.tsx +3 -2
- package/src/complex/MaterialArrayControlRenderer.tsx +1 -1
- package/src/complex/MaterialEnumArrayRenderer.tsx +4 -3
- package/src/complex/MaterialObjectRenderer.tsx +3 -2
- package/src/complex/MaterialOneOfRenderer.tsx +7 -7
- package/src/complex/MaterialTableControl.tsx +45 -37
- package/src/complex/NoBorderTableCell.tsx +10 -12
- package/src/complex/TableToolbar.tsx +9 -7
- package/src/complex/ValidationIcon.tsx +12 -19
- package/src/controls/MaterialAnyOfStringOrEnumControl.tsx +17 -14
- package/src/controls/MaterialBooleanControl.tsx +1 -1
- package/src/controls/MaterialBooleanToggleControl.tsx +1 -1
- package/src/controls/MaterialDateControl.tsx +87 -93
- package/src/controls/MaterialDateTimeControl.tsx +88 -96
- package/src/controls/MaterialEnumControl.tsx +12 -3
- package/src/controls/MaterialInputControl.tsx +65 -71
- package/src/controls/MaterialNativeControl.tsx +55 -59
- package/src/controls/MaterialOneOfEnumControl.tsx +13 -4
- package/src/controls/MaterialOneOfRadioGroupControl.tsx +4 -4
- package/src/controls/MaterialRadioGroup.tsx +73 -73
- package/src/controls/MaterialRadioGroupControl.tsx +1 -1
- package/src/controls/MaterialSliderControl.tsx +93 -88
- package/src/controls/MaterialTimeControl.tsx +87 -85
- package/src/layouts/ArrayToolbar.tsx +11 -7
- package/src/layouts/ExpandPanelRenderer.tsx +28 -32
- package/src/layouts/MaterialArrayLayout.tsx +73 -82
- package/src/layouts/MaterialArrayLayoutRenderer.tsx +1 -1
- package/src/layouts/MaterialCategorizationLayout.tsx +50 -67
- package/src/layouts/MaterialCategorizationStepperLayout.tsx +80 -88
- package/src/layouts/MaterialGroupLayout.tsx +1 -1
- package/src/{extended → mui-controls}/MuiAutocomplete.tsx +11 -9
- package/src/mui-controls/MuiCheckbox.tsx +2 -3
- package/src/mui-controls/MuiInputInteger.tsx +13 -10
- package/src/mui-controls/MuiInputNumber.tsx +10 -7
- package/src/mui-controls/MuiInputNumberFormat.tsx +9 -12
- package/src/mui-controls/MuiInputText.tsx +30 -21
- package/src/mui-controls/MuiInputTime.tsx +7 -5
- package/src/mui-controls/MuiSelect.tsx +4 -5
- package/src/mui-controls/MuiToggle.tsx +2 -3
- package/{lib/cells/MaterialNumberCell.js → src/util/debounce.ts} +20 -16
- package/{lib/util/index.js → src/util/focus.ts} +9 -7
- package/src/util/index.ts +2 -0
- package/src/util/layout.tsx +7 -8
- package/src/util/theme.ts +1 -1
- package/stats.html +3279 -0
- package/test/renderers/MaterialAllOfRenderer.test.tsx +1 -1
- package/test/renderers/MaterialAnyOfRenderer.test.tsx +15 -9
- package/test/renderers/MaterialAnyOfStringOrEnumControl.test.tsx +1 -1
- package/test/renderers/MaterialArrayControl.test.tsx +1 -1
- package/test/renderers/MaterialArrayLayout.test.tsx +39 -32
- package/test/renderers/MaterialBooleanCell.test.tsx +1 -1
- package/test/renderers/MaterialBooleanToggleCell.test.tsx +3 -2
- package/test/renderers/MaterialBooleanToggleControl.test.tsx +3 -2
- package/test/renderers/MaterialCategorizationLayout.test.tsx +76 -3
- package/test/renderers/MaterialCategorizationStepperLayout.test.tsx +79 -6
- package/test/renderers/MaterialDateCell.test.tsx +1 -1
- package/test/renderers/MaterialDateControl.test.tsx +5 -3
- package/test/renderers/MaterialDateTimeControl.test.tsx +5 -3
- package/test/renderers/MaterialEnumArrayRenderer.test.tsx +15 -7
- package/test/renderers/MaterialEnumCell.test.tsx +1 -1
- package/test/renderers/MaterialGroupLayout.test.tsx +1 -1
- package/test/renderers/MaterialInputControl.test.tsx +4 -4
- package/test/renderers/MaterialIntegerCell.test.tsx +42 -21
- package/test/renderers/MaterialLabelRenderer.test.tsx +1 -1
- package/test/renderers/MaterialLayouts.test.tsx +1 -1
- package/test/renderers/MaterialListWithDetailRenderer.test.tsx +2 -2
- package/test/renderers/MaterialNativeControl.test.tsx +2 -2
- package/test/renderers/MaterialNumberCell.test.tsx +46 -25
- package/test/renderers/MaterialObjectControl.test.tsx +1 -1
- package/test/renderers/MaterialOneOfEnumCell.test.tsx +1 -1
- package/test/renderers/MaterialOneOfRadioGroupControl.test.tsx +1 -1
- package/test/renderers/MaterialOneOfRenderer.test.tsx +17 -11
- package/test/renderers/MaterialRadioGroupControl.test.tsx +1 -1
- package/test/renderers/MaterialSliderControl.test.tsx +2 -2
- package/test/renderers/MaterialTextCell.test.tsx +47 -33
- package/test/renderers/MaterialTextControl.test.tsx +8 -4
- package/test/renderers/MaterialTimeCell.test.tsx +42 -21
- package/test/renderers/MaterialTimeControl.test.tsx +8 -6
- package/tsconfig.json +1 -2
- package/tsconfig.test.json +7 -0
- package/docs/classes/materialarraylayout.html +0 -777
- package/docs/classes/materialcategorizationlayoutrenderer.html +0 -786
- package/docs/classes/materialcategorizationstepperlayoutrenderer.html +0 -762
- package/docs/classes/materialdatecontrol.html +0 -825
- package/docs/classes/materialdatetimecontrol.html +0 -825
- package/docs/classes/materialinputcontrol.html +0 -825
- package/docs/classes/materialnativecontrol.html +0 -825
- package/docs/classes/materialradiogroup.html +0 -825
- package/docs/classes/materialslidercontrol.html +0 -825
- package/docs/classes/materialtimecontrol.html +0 -825
- package/docs/interfaces/materialarraylayoutstate.html +0 -157
- package/example/CustomAutocomplete.tsx +0 -54
- package/lib/additional/ListWithDetailMasterItem.js +0 -19
- package/lib/additional/ListWithDetailMasterItem.js.map +0 -1
- package/lib/additional/MaterialLabelRenderer.js +0 -47
- package/lib/additional/MaterialLabelRenderer.js.map +0 -1
- package/lib/additional/MaterialListWithDetailRenderer.js +0 -64
- package/lib/additional/MaterialListWithDetailRenderer.js.map +0 -1
- package/lib/additional/index.js +0 -34
- package/lib/additional/index.js.map +0 -1
- package/lib/cells/CustomizableCells.js +0 -45
- package/lib/cells/CustomizableCells.js.map +0 -1
- package/lib/cells/MaterialBooleanCell.js +0 -37
- package/lib/cells/MaterialBooleanCell.js.map +0 -1
- package/lib/cells/MaterialBooleanToggleCell.js +0 -38
- package/lib/cells/MaterialBooleanToggleCell.js.map +0 -1
- package/lib/cells/MaterialDateCell.js +0 -40
- package/lib/cells/MaterialDateCell.js.map +0 -1
- package/lib/cells/MaterialEnumCell.js +0 -39
- package/lib/cells/MaterialEnumCell.js.map +0 -1
- package/lib/cells/MaterialIntegerCell.js +0 -35
- package/lib/cells/MaterialIntegerCell.js.map +0 -1
- package/lib/cells/MaterialNumberCell.js.map +0 -1
- package/lib/cells/MaterialNumberFormatCell.js +0 -39
- package/lib/cells/MaterialNumberFormatCell.js.map +0 -1
- package/lib/cells/MaterialOneOfEnumCell.js +0 -39
- package/lib/cells/MaterialOneOfEnumCell.js.map +0 -1
- package/lib/cells/MaterialTextCell.js +0 -39
- package/lib/cells/MaterialTextCell.js.map +0 -1
- package/lib/cells/MaterialTimeCell.js +0 -35
- package/lib/cells/MaterialTimeCell.js.map +0 -1
- package/lib/cells/index.js +0 -60
- package/lib/cells/index.js.map +0 -1
- package/lib/complex/CombinatorProperties.js +0 -57
- package/lib/complex/CombinatorProperties.js.map +0 -1
- package/lib/complex/DeleteDialog.js +0 -41
- package/lib/complex/DeleteDialog.js.map +0 -1
- package/lib/complex/MaterialAllOfRenderer.js +0 -45
- package/lib/complex/MaterialAllOfRenderer.js.map +0 -1
- package/lib/complex/MaterialAnyOfRenderer.js +0 -49
- package/lib/complex/MaterialAnyOfRenderer.js.map +0 -1
- package/lib/complex/MaterialArrayControlRenderer.js +0 -55
- package/lib/complex/MaterialArrayControlRenderer.js.map +0 -1
- package/lib/complex/MaterialEnumArrayRenderer.js +0 -45
- package/lib/complex/MaterialEnumArrayRenderer.js.map +0 -1
- package/lib/complex/MaterialObjectRenderer.js +0 -49
- package/lib/complex/MaterialObjectRenderer.js.map +0 -1
- package/lib/complex/MaterialOneOfRenderer.js +0 -77
- package/lib/complex/MaterialOneOfRenderer.js.map +0 -1
- package/lib/complex/MaterialTableControl.js +0 -190
- package/lib/complex/MaterialTableControl.js.map +0 -1
- package/lib/complex/NoBorderTableCell.js +0 -41
- package/lib/complex/NoBorderTableCell.js.map +0 -1
- package/lib/complex/TableToolbar.js +0 -58
- package/lib/complex/TableToolbar.js.map +0 -1
- package/lib/complex/ValidationIcon.js +0 -48
- package/lib/complex/ValidationIcon.js.map +0 -1
- package/lib/complex/index.js +0 -47
- package/lib/complex/index.js.map +0 -1
- package/lib/controls/MaterialAnyOfStringOrEnumControl.js +0 -80
- package/lib/controls/MaterialAnyOfStringOrEnumControl.js.map +0 -1
- package/lib/controls/MaterialBooleanControl.js +0 -41
- package/lib/controls/MaterialBooleanControl.js.map +0 -1
- package/lib/controls/MaterialBooleanToggleControl.js +0 -41
- package/lib/controls/MaterialBooleanToggleControl.js.map +0 -1
- package/lib/controls/MaterialDateControl.js +0 -69
- package/lib/controls/MaterialDateControl.js.map +0 -1
- package/lib/controls/MaterialDateTimeControl.js +0 -71
- package/lib/controls/MaterialDateTimeControl.js.map +0 -1
- package/lib/controls/MaterialEnumControl.js +0 -36
- package/lib/controls/MaterialEnumControl.js.map +0 -1
- package/lib/controls/MaterialInputControl.js +0 -61
- package/lib/controls/MaterialInputControl.js.map +0 -1
- package/lib/controls/MaterialIntegerControl.js +0 -36
- package/lib/controls/MaterialIntegerControl.js.map +0 -1
- package/lib/controls/MaterialNativeControl.js +0 -55
- package/lib/controls/MaterialNativeControl.js.map +0 -1
- package/lib/controls/MaterialNumberControl.js +0 -36
- package/lib/controls/MaterialNumberControl.js.map +0 -1
- package/lib/controls/MaterialOneOfEnumControl.js +0 -36
- package/lib/controls/MaterialOneOfEnumControl.js.map +0 -1
- package/lib/controls/MaterialOneOfRadioGroupControl.js +0 -37
- package/lib/controls/MaterialOneOfRadioGroupControl.js.map +0 -1
- package/lib/controls/MaterialRadioGroup.js +0 -55
- package/lib/controls/MaterialRadioGroup.js.map +0 -1
- package/lib/controls/MaterialRadioGroupControl.js +0 -37
- package/lib/controls/MaterialRadioGroupControl.js.map +0 -1
- package/lib/controls/MaterialSliderControl.js +0 -74
- package/lib/controls/MaterialSliderControl.js.map +0 -1
- package/lib/controls/MaterialTextControl.js +0 -36
- package/lib/controls/MaterialTextControl.js.map +0 -1
- package/lib/controls/MaterialTimeControl.js +0 -66
- package/lib/controls/MaterialTimeControl.js.map +0 -1
- package/lib/controls/index.js +0 -91
- package/lib/controls/index.js.map +0 -1
- package/lib/extended/MaterialAutocompleteEnumControl.d.ts +0 -7
- package/lib/extended/MaterialAutocompleteEnumControl.js +0 -42
- package/lib/extended/MaterialAutocompleteEnumControl.js.map +0 -1
- package/lib/extended/MaterialAutocompleteOneOfEnumControl.d.ts +0 -7
- package/lib/extended/MaterialAutocompleteOneOfEnumControl.js +0 -42
- package/lib/extended/MaterialAutocompleteOneOfEnumControl.js.map +0 -1
- package/lib/extended/MuiAutocomplete.d.ts +0 -10
- package/lib/extended/MuiAutocomplete.js +0 -45
- package/lib/extended/MuiAutocomplete.js.map +0 -1
- package/lib/extended/index.d.ts +0 -10
- package/lib/extended/index.js +0 -48
- package/lib/extended/index.js.map +0 -1
- package/lib/index.js +0 -89
- package/lib/index.js.map +0 -1
- package/lib/jsonforms-material.js +0 -86
- package/lib/jsonforms-material.js.map +0 -1
- package/lib/layouts/ArrayToolbar.js +0 -27
- package/lib/layouts/ArrayToolbar.js.map +0 -1
- package/lib/layouts/ExpandPanelRenderer.js +0 -113
- package/lib/layouts/ExpandPanelRenderer.js.map +0 -1
- package/lib/layouts/MaterialArrayLayout.js +0 -66
- package/lib/layouts/MaterialArrayLayout.js.map +0 -1
- package/lib/layouts/MaterialArrayLayoutRenderer.js +0 -43
- package/lib/layouts/MaterialArrayLayoutRenderer.js.map +0 -1
- package/lib/layouts/MaterialCategorizationLayout.js +0 -88
- package/lib/layouts/MaterialCategorizationLayout.js.map +0 -1
- package/lib/layouts/MaterialCategorizationStepperLayout.js +0 -89
- package/lib/layouts/MaterialCategorizationStepperLayout.js.map +0 -1
- package/lib/layouts/MaterialGroupLayout.js +0 -52
- package/lib/layouts/MaterialGroupLayout.js.map +0 -1
- package/lib/layouts/MaterialHorizontalLayout.js +0 -51
- package/lib/layouts/MaterialHorizontalLayout.js.map +0 -1
- package/lib/layouts/MaterialVerticalLayout.js +0 -51
- package/lib/layouts/MaterialVerticalLayout.js.map +0 -1
- package/lib/layouts/index.js +0 -43
- package/lib/layouts/index.js.map +0 -1
- package/lib/mui-controls/MuiCheckbox.js +0 -40
- package/lib/mui-controls/MuiCheckbox.js.map +0 -1
- package/lib/mui-controls/MuiInputInteger.js +0 -41
- package/lib/mui-controls/MuiInputInteger.js.map +0 -1
- package/lib/mui-controls/MuiInputNumber.js +0 -41
- package/lib/mui-controls/MuiInputNumber.js.map +0 -1
- package/lib/mui-controls/MuiInputNumberFormat.js +0 -50
- package/lib/mui-controls/MuiInputNumberFormat.js.map +0 -1
- package/lib/mui-controls/MuiInputText.js +0 -64
- package/lib/mui-controls/MuiInputText.js.map +0 -1
- package/lib/mui-controls/MuiInputTime.js +0 -37
- package/lib/mui-controls/MuiInputTime.js.map +0 -1
- package/lib/mui-controls/MuiSelect.js +0 -38
- package/lib/mui-controls/MuiSelect.js.map +0 -1
- package/lib/mui-controls/MuiToggle.js +0 -39
- package/lib/mui-controls/MuiToggle.js.map +0 -1
- package/lib/mui-controls/index.js +0 -35
- package/lib/mui-controls/index.js.map +0 -1
- package/lib/util/datejs.js +0 -26
- package/lib/util/datejs.js.map +0 -1
- package/lib/util/index.js.map +0 -1
- package/lib/util/layout.js +0 -54
- package/lib/util/layout.js.map +0 -1
- package/lib/util/theme.js +0 -3
- package/lib/util/theme.js.map +0 -1
- package/src/extended/MaterialAutocompleteEnumControl.tsx +0 -55
- package/src/extended/MaterialAutocompleteOneOfEnumControl.tsx +0 -55
- package/src/extended/index.ts +0 -56
- package/webpack/webpack.build.js +0 -21
package/rollup.config.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import typescript from 'rollup-plugin-typescript2';
|
|
2
|
+
import cleanup from 'rollup-plugin-cleanup';
|
|
3
|
+
import { visualizer } from 'rollup-plugin-visualizer';
|
|
4
|
+
|
|
5
|
+
const packageJson = require('./package.json');
|
|
6
|
+
|
|
7
|
+
const baseConfig = {
|
|
8
|
+
input: 'src/index.ts',
|
|
9
|
+
external: [
|
|
10
|
+
...Object.keys(packageJson.dependencies),
|
|
11
|
+
...Object.keys(packageJson.peerDependencies),
|
|
12
|
+
'react',
|
|
13
|
+
/^lodash\/.*/,
|
|
14
|
+
/^@material-ui\/.*/,
|
|
15
|
+
/^dayjs\/.*/
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default [
|
|
20
|
+
{
|
|
21
|
+
...baseConfig,
|
|
22
|
+
output: {
|
|
23
|
+
file: packageJson.module,
|
|
24
|
+
format: 'esm',
|
|
25
|
+
sourcemap: true
|
|
26
|
+
},
|
|
27
|
+
plugins: [
|
|
28
|
+
typescript(),
|
|
29
|
+
cleanup({ extensions: ['js', 'ts', 'jsx', 'tsx'] }),
|
|
30
|
+
visualizer({ open: false })
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
...baseConfig,
|
|
35
|
+
output: {
|
|
36
|
+
file: packageJson.main,
|
|
37
|
+
format: 'cjs',
|
|
38
|
+
sourcemap: true
|
|
39
|
+
},
|
|
40
|
+
plugins: [
|
|
41
|
+
typescript({
|
|
42
|
+
tsconfigOverride: {
|
|
43
|
+
compilerOptions: {
|
|
44
|
+
target: 'ES5'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
cleanup({ extensions: ['js', 'ts', 'jsx', 'tsx'] })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
];
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
ListItemAvatar,
|
|
32
32
|
ListItemSecondaryAction,
|
|
33
33
|
ListItemText,
|
|
34
|
-
} from '@material
|
|
35
|
-
import DeleteIcon from '@
|
|
34
|
+
} from '@mui/material';
|
|
35
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
36
36
|
import React from 'react';
|
|
37
37
|
|
|
38
38
|
const ListWithDetailMasterItem = ({ index, childLabel, selected, handleSelect, removeItem, path }: StatePropsOfMasterItem) => {
|
|
@@ -47,10 +47,7 @@ const ListWithDetailMasterItem = ({ index, childLabel, selected, handleSelect, r
|
|
|
47
47
|
</ListItemAvatar>
|
|
48
48
|
<ListItemText primary={childLabel} />
|
|
49
49
|
<ListItemSecondaryAction>
|
|
50
|
-
<IconButton
|
|
51
|
-
aria-label='Delete'
|
|
52
|
-
onClick={removeItem(path, index)}
|
|
53
|
-
>
|
|
50
|
+
<IconButton aria-label='Delete' onClick={removeItem(path, index)} size='large'>
|
|
54
51
|
<DeleteIcon />
|
|
55
52
|
</IconButton>
|
|
56
53
|
</ListItemSecondaryAction>
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
JsonFormsDispatch,
|
|
39
39
|
withJsonFormsArrayLayoutProps
|
|
40
40
|
} from '@jsonforms/react';
|
|
41
|
-
import { Grid, Hidden, List, Typography } from '@material
|
|
41
|
+
import { Grid, Hidden, List, Typography } from '@mui/material';
|
|
42
42
|
import map from 'lodash/map';
|
|
43
43
|
import range from 'lodash/range';
|
|
44
44
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
WithClassname
|
|
32
32
|
} from '@jsonforms/core';
|
|
33
33
|
import { withJsonFormsCellProps } from '@jsonforms/react';
|
|
34
|
-
import Input from '@material
|
|
34
|
+
import Input from '@mui/material/Input';
|
|
35
35
|
import merge from 'lodash/merge';
|
|
36
36
|
|
|
37
37
|
export const MaterialDateCell = (props: CellProps & WithClassname) => {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
import React from 'react';
|
|
26
|
-
import _ from 'lodash';
|
|
27
26
|
import { Generate, JsonSchema, Layout, UISchemaElement } from '@jsonforms/core';
|
|
28
27
|
import { JsonFormsDispatch } from '@jsonforms/react';
|
|
28
|
+
import omit from 'lodash/omit';
|
|
29
29
|
|
|
30
30
|
interface CombinatorPropertiesProps {
|
|
31
31
|
schema: JsonSchema;
|
|
@@ -42,7 +42,7 @@ export class CombinatorProperties extends React.Component<CombinatorPropertiesPr
|
|
|
42
42
|
|
|
43
43
|
const { schema, combinatorKeyword, path } = this.props;
|
|
44
44
|
|
|
45
|
-
const otherProps: JsonSchema =
|
|
45
|
+
const otherProps: JsonSchema = omit(schema, combinatorKeyword) as JsonSchema;
|
|
46
46
|
const foundUISchema: UISchemaElement = Generate.uiSchema(otherProps, 'VerticalLayout');
|
|
47
47
|
let isLayoutWithElements = false;
|
|
48
48
|
if (foundUISchema !== null && isLayout(foundUISchema)) {
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
import React from 'react';
|
|
26
|
-
import Button from '@material-ui/core/Button';
|
|
27
26
|
import {
|
|
27
|
+
Button,
|
|
28
28
|
Dialog,
|
|
29
29
|
DialogActions,
|
|
30
30
|
DialogContent,
|
|
31
31
|
DialogContentText,
|
|
32
32
|
DialogTitle,
|
|
33
|
-
} from '@material
|
|
33
|
+
} from '@mui/material';
|
|
34
34
|
|
|
35
35
|
export interface DeleteDialogProps {
|
|
36
36
|
open: boolean;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
import React from 'react';
|
|
26
|
-
import { Hidden } from '@material
|
|
26
|
+
import { Hidden } from '@mui/material';
|
|
27
27
|
|
|
28
28
|
import {
|
|
29
29
|
createCombinatorRenderInfos,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from '@jsonforms/core';
|
|
38
38
|
import { JsonFormsDispatch, withJsonFormsAllOfProps } from '@jsonforms/react';
|
|
39
39
|
|
|
40
|
-
const MaterialAllOfRenderer = ({
|
|
40
|
+
export const MaterialAllOfRenderer = ({
|
|
41
41
|
schema,
|
|
42
42
|
rootSchema,
|
|
43
43
|
visible,
|
|
@@ -95,4 +95,5 @@ export const materialAllOfControlTester: RankedTester = rankWith(
|
|
|
95
95
|
3,
|
|
96
96
|
isAllOfControl
|
|
97
97
|
);
|
|
98
|
+
|
|
98
99
|
export default withJsonFormsAllOfProps(MaterialAllOfRenderer);
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
StatePropsOfCombinator
|
|
35
35
|
} from '@jsonforms/core';
|
|
36
36
|
import { JsonFormsDispatch, withJsonFormsAnyOfProps } from '@jsonforms/react';
|
|
37
|
-
import { Hidden, Tab, Tabs } from '@material
|
|
37
|
+
import { Hidden, Tab, Tabs } from '@mui/material';
|
|
38
38
|
import CombinatorProperties from './CombinatorProperties';
|
|
39
39
|
|
|
40
|
-
const MaterialAnyOfRenderer = ({
|
|
40
|
+
export const MaterialAnyOfRenderer = ({
|
|
41
41
|
schema,
|
|
42
42
|
rootSchema,
|
|
43
43
|
indexOfFittingSchema,
|
|
@@ -97,4 +97,5 @@ export const materialAnyOfControlTester: RankedTester = rankWith(
|
|
|
97
97
|
3,
|
|
98
98
|
isAnyOfControl
|
|
99
99
|
);
|
|
100
|
+
|
|
100
101
|
export default withJsonFormsAnyOfProps(MaterialAnyOfRenderer);
|
|
@@ -26,7 +26,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
26
26
|
import { ArrayLayoutProps } from '@jsonforms/core';
|
|
27
27
|
import { withJsonFormsArrayLayoutProps } from '@jsonforms/react';
|
|
28
28
|
import { MaterialTableControl } from './MaterialTableControl';
|
|
29
|
-
import { Hidden } from '@material
|
|
29
|
+
import { Hidden } from '@mui/material';
|
|
30
30
|
import { DeleteDialog } from './DeleteDialog';
|
|
31
31
|
|
|
32
32
|
export const MaterialArrayControlRenderer = (props: ArrayLayoutProps) => {
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
FormGroup,
|
|
22
22
|
FormHelperText,
|
|
23
23
|
Hidden
|
|
24
|
-
} from '@material
|
|
25
|
-
import
|
|
26
|
-
import
|
|
24
|
+
} from '@mui/material';
|
|
25
|
+
import startCase from 'lodash/startCase';
|
|
26
|
+
import isEmpty from 'lodash/isEmpty';
|
|
27
27
|
import React from 'react';
|
|
28
28
|
|
|
29
29
|
export const MaterialEnumArrayRenderer = ({
|
|
@@ -35,6 +35,7 @@ export const MaterialEnumArrayRenderer = ({
|
|
|
35
35
|
data,
|
|
36
36
|
addItem,
|
|
37
37
|
removeItem,
|
|
38
|
+
handleChange,
|
|
38
39
|
...otherProps
|
|
39
40
|
}: ControlProps & OwnPropsOfEnum & DispatchPropsOfMultiEnumControl) => {
|
|
40
41
|
return (
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
StatePropsOfControlWithDetail
|
|
33
33
|
} from '@jsonforms/core';
|
|
34
34
|
import { JsonFormsDispatch, withJsonFormsDetailProps } from '@jsonforms/react';
|
|
35
|
-
import { Hidden } from '@material
|
|
35
|
+
import { Hidden } from '@mui/material';
|
|
36
36
|
import React, { useMemo } from 'react';
|
|
37
37
|
|
|
38
|
-
const MaterialObjectRenderer = ({
|
|
38
|
+
export const MaterialObjectRenderer = ({
|
|
39
39
|
renderers,
|
|
40
40
|
cells,
|
|
41
41
|
uischemas,
|
|
@@ -84,4 +84,5 @@ export const materialObjectControlTester: RankedTester = rankWith(
|
|
|
84
84
|
2,
|
|
85
85
|
isObjectControl
|
|
86
86
|
);
|
|
87
|
+
|
|
87
88
|
export default withJsonFormsDetailProps(MaterialObjectRenderer);
|
|
@@ -26,7 +26,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
26
26
|
import isEmpty from 'lodash/isEmpty';
|
|
27
27
|
|
|
28
28
|
import {
|
|
29
|
-
|
|
29
|
+
CombinatorRendererProps,
|
|
30
30
|
createCombinatorRenderInfos,
|
|
31
31
|
createDefaultValue,
|
|
32
32
|
isOneOfControl,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
Hidden,
|
|
47
47
|
Tab,
|
|
48
48
|
Tabs
|
|
49
|
-
} from '@material
|
|
49
|
+
} from '@mui/material';
|
|
50
50
|
import {
|
|
51
51
|
JsonFormsDispatch,
|
|
52
52
|
withJsonFormsOneOfProps
|
|
@@ -57,9 +57,8 @@ export interface OwnOneOfProps extends OwnPropsOfControl {
|
|
|
57
57
|
indexOfFittingSchema?: number;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
({ handleChange, schema, path, renderers, cells, rootSchema, id, visible, indexOfFittingSchema, uischema, uischemas, data }: CombinatorProps) => {
|
|
60
|
+
export const MaterialOneOfRenderer =
|
|
61
|
+
({ handleChange, schema, path, renderers, cells, rootSchema, id, visible, indexOfFittingSchema, uischema, uischemas, data }: CombinatorRendererProps) => {
|
|
63
62
|
const [open, setOpen] = useState(false);
|
|
64
63
|
const [selectedIndex, setSelectedIndex] = useState(indexOfFittingSchema || 0);
|
|
65
64
|
const [newSelectedIndex, setNewSelectedIndex] = useState(0);
|
|
@@ -67,11 +66,11 @@ const MaterialOneOfRenderer =
|
|
|
67
66
|
const cancel = useCallback(() => {
|
|
68
67
|
setOpen(false);
|
|
69
68
|
}, [setOpen]);
|
|
70
|
-
const _schema = resolveSubSchemas(schema, rootSchema, oneOf);
|
|
69
|
+
const _schema = resolveSubSchemas(schema, rootSchema, 'oneOf');
|
|
71
70
|
const oneOfRenderInfos = createCombinatorRenderInfos(
|
|
72
71
|
(_schema as JsonSchema).oneOf,
|
|
73
72
|
rootSchema,
|
|
74
|
-
oneOf,
|
|
73
|
+
'oneOf',
|
|
75
74
|
uischema,
|
|
76
75
|
path,
|
|
77
76
|
uischemas
|
|
@@ -150,4 +149,5 @@ const MaterialOneOfRenderer =
|
|
|
150
149
|
};
|
|
151
150
|
|
|
152
151
|
export const materialOneOfControlTester: RankedTester = rankWith(3, isOneOfControl);
|
|
152
|
+
|
|
153
153
|
export default withJsonFormsOneOfProps(MaterialOneOfRenderer);
|
|
@@ -31,18 +31,19 @@ import {
|
|
|
31
31
|
} from '@jsonforms/react';
|
|
32
32
|
import startCase from 'lodash/startCase';
|
|
33
33
|
import range from 'lodash/range';
|
|
34
|
-
import React, { Fragment } from 'react';
|
|
34
|
+
import React, { Fragment, useMemo } from 'react';
|
|
35
35
|
import {
|
|
36
36
|
FormHelperText,
|
|
37
37
|
Grid,
|
|
38
38
|
Hidden,
|
|
39
|
+
IconButton,
|
|
39
40
|
Table,
|
|
40
41
|
TableBody,
|
|
41
42
|
TableCell,
|
|
42
43
|
TableHead,
|
|
43
44
|
TableRow,
|
|
44
45
|
Typography
|
|
45
|
-
} from '@material
|
|
46
|
+
} from '@mui/material';
|
|
46
47
|
import {
|
|
47
48
|
ArrayLayoutProps,
|
|
48
49
|
ControlElement,
|
|
@@ -54,10 +55,9 @@ import {
|
|
|
54
55
|
JsonFormsRendererRegistryEntry,
|
|
55
56
|
JsonFormsCellRendererRegistryEntry
|
|
56
57
|
} from '@jsonforms/core';
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import ArrowUpward from '@material-ui/icons/ArrowUpward';
|
|
58
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
59
|
+
import ArrowDownward from '@mui/icons-material/ArrowDownward';
|
|
60
|
+
import ArrowUpward from '@mui/icons-material/ArrowUpward';
|
|
61
61
|
|
|
62
62
|
import { WithDeleteDialogSupport } from './DeleteDialog';
|
|
63
63
|
import NoBorderTableCell from './NoBorderTableCell';
|
|
@@ -195,20 +195,19 @@ const controlWithoutLabel = (scope: string): ControlElement => ({
|
|
|
195
195
|
label: false
|
|
196
196
|
});
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
198
|
+
interface NonEmptyCellComponentProps {
|
|
199
|
+
path: string,
|
|
200
|
+
propName?: string,
|
|
201
|
+
schema: JsonSchema,
|
|
202
|
+
rootSchema: JsonSchema,
|
|
203
|
+
errors: string,
|
|
204
|
+
enabled: boolean,
|
|
205
|
+
renderers?: JsonFormsRendererRegistryEntry[],
|
|
206
|
+
cells?: JsonFormsCellRendererRegistryEntry[],
|
|
207
|
+
isValid: boolean
|
|
208
|
+
}
|
|
209
|
+
const NonEmptyCellComponent = React.memo(({path, propName, schema,rootSchema, errors, enabled, renderers, cells, isValid}:NonEmptyCellComponentProps) => {
|
|
210
210
|
|
|
211
|
-
const isValid = isEmpty(errors);
|
|
212
211
|
return (
|
|
213
212
|
<NoBorderTableCell>
|
|
214
213
|
{schema.properties ? (
|
|
@@ -237,35 +236,47 @@ const NonEmptyCell = (ownProps: OwnPropsOfNonEmptyCell) => {
|
|
|
237
236
|
<FormHelperText error={!isValid}>{!isValid && errors}</FormHelperText>
|
|
238
237
|
</NoBorderTableCell>
|
|
239
238
|
);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
const NonEmptyCell = (ownProps: OwnPropsOfNonEmptyCell) => {
|
|
242
|
+
const ctx = useJsonForms();
|
|
243
|
+
const emptyCellProps = ctxToNonEmptyCellProps(ctx, ownProps);
|
|
244
|
+
|
|
245
|
+
const isValid = isEmpty(emptyCellProps.errors);
|
|
246
|
+
return <NonEmptyCellComponent {...emptyCellProps} isValid={isValid}/>
|
|
240
247
|
};
|
|
241
248
|
|
|
242
249
|
interface NonEmptyRowProps {
|
|
243
250
|
childPath: string;
|
|
244
251
|
schema: JsonSchema;
|
|
245
252
|
rowIndex: number;
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
moveUpCreator: (path:string, position: number)=> ()=> void;
|
|
254
|
+
moveDownCreator: (path:string, position: number)=> ()=> void;
|
|
248
255
|
enableUp: boolean;
|
|
249
256
|
enableDown: boolean;
|
|
250
257
|
showSortButtons: boolean;
|
|
251
258
|
enabled: boolean;
|
|
252
259
|
cells?: JsonFormsCellRendererRegistryEntry[];
|
|
260
|
+
path: string;
|
|
253
261
|
}
|
|
254
262
|
|
|
255
|
-
const
|
|
263
|
+
const NonEmptyRowComponent =
|
|
256
264
|
({
|
|
257
265
|
childPath,
|
|
258
266
|
schema,
|
|
259
267
|
rowIndex,
|
|
260
268
|
openDeleteDialog,
|
|
261
|
-
|
|
262
|
-
|
|
269
|
+
moveUpCreator,
|
|
270
|
+
moveDownCreator,
|
|
263
271
|
enableUp,
|
|
264
272
|
enableDown,
|
|
265
273
|
showSortButtons,
|
|
266
274
|
enabled,
|
|
267
|
-
cells
|
|
275
|
+
cells,
|
|
276
|
+
path
|
|
268
277
|
}: NonEmptyRowProps & WithDeleteDialogSupport) => {
|
|
278
|
+
const moveUp = useMemo(() => moveUpCreator(path, rowIndex),[moveUpCreator, path, rowIndex]);
|
|
279
|
+
const moveDown = useMemo(() => moveDownCreator(path, rowIndex),[moveDownCreator, path, rowIndex]);
|
|
269
280
|
return (
|
|
270
281
|
<TableRow key={childPath} hover>
|
|
271
282
|
{generateCells(NonEmptyCell, schema, childPath, enabled, cells)}
|
|
@@ -276,17 +287,13 @@ const NonEmptyRow = React.memo(
|
|
|
276
287
|
<Grid
|
|
277
288
|
container
|
|
278
289
|
direction='row'
|
|
279
|
-
|
|
290
|
+
justifyContent='flex-end'
|
|
280
291
|
alignItems='center'
|
|
281
292
|
>
|
|
282
293
|
{showSortButtons ? (
|
|
283
294
|
<Fragment>
|
|
284
295
|
<Grid item>
|
|
285
|
-
<IconButton
|
|
286
|
-
aria-label={`Move up`}
|
|
287
|
-
onClick={moveUp}
|
|
288
|
-
disabled={!enableUp}
|
|
289
|
-
>
|
|
296
|
+
<IconButton aria-label={`Move up`} onClick={moveUp} disabled={!enableUp} size='large'>
|
|
290
297
|
<ArrowUpward />
|
|
291
298
|
</IconButton>
|
|
292
299
|
</Grid>
|
|
@@ -295,7 +302,7 @@ const NonEmptyRow = React.memo(
|
|
|
295
302
|
aria-label={`Move down`}
|
|
296
303
|
onClick={moveDown}
|
|
297
304
|
disabled={!enableDown}
|
|
298
|
-
|
|
305
|
+
size='large'>
|
|
299
306
|
<ArrowDownward />
|
|
300
307
|
</IconButton>
|
|
301
308
|
</Grid>
|
|
@@ -305,7 +312,7 @@ const NonEmptyRow = React.memo(
|
|
|
305
312
|
<IconButton
|
|
306
313
|
aria-label={`Delete`}
|
|
307
314
|
onClick={() => openDeleteDialog(childPath, rowIndex)}
|
|
308
|
-
|
|
315
|
+
size='large'>
|
|
309
316
|
<DeleteIcon />
|
|
310
317
|
</IconButton>
|
|
311
318
|
</Grid>
|
|
@@ -314,8 +321,8 @@ const NonEmptyRow = React.memo(
|
|
|
314
321
|
) : null}
|
|
315
322
|
</TableRow>
|
|
316
323
|
);
|
|
317
|
-
}
|
|
318
|
-
);
|
|
324
|
+
};
|
|
325
|
+
export const NonEmptyRow = React.memo(NonEmptyRowComponent);
|
|
319
326
|
interface TableRowsProp {
|
|
320
327
|
data: number;
|
|
321
328
|
path: string;
|
|
@@ -359,13 +366,14 @@ const TableRows = ({
|
|
|
359
366
|
rowIndex={index}
|
|
360
367
|
schema={schema}
|
|
361
368
|
openDeleteDialog={openDeleteDialog}
|
|
362
|
-
|
|
363
|
-
|
|
369
|
+
moveUpCreator={moveUp}
|
|
370
|
+
moveDownCreator={moveDown}
|
|
364
371
|
enableUp={index !== 0}
|
|
365
372
|
enableDown={index !== data - 1}
|
|
366
373
|
showSortButtons={appliedUiSchemaOptions.showSortButtons}
|
|
367
374
|
enabled={enabled}
|
|
368
375
|
cells={cells}
|
|
376
|
+
path={path}
|
|
369
377
|
/>
|
|
370
378
|
);
|
|
371
379
|
})}
|
|
@@ -22,20 +22,18 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
26
|
-
import { TableCell } from '@material
|
|
25
|
+
import { styled } from '@mui/material/styles';
|
|
26
|
+
import { TableCell } from '@mui/material';
|
|
27
27
|
import React from 'react';
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
};
|
|
29
|
+
const StyledTableCell = styled(TableCell)({
|
|
30
|
+
borderBottom: 'none'
|
|
31
|
+
});
|
|
34
32
|
|
|
35
|
-
const NoBorderTableCell = ({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
const NoBorderTableCell = ({ children, ...otherProps }: any) => (
|
|
34
|
+
<StyledTableCell {...otherProps}>
|
|
35
|
+
{children}
|
|
36
|
+
</StyledTableCell>
|
|
39
37
|
);
|
|
40
38
|
|
|
41
|
-
export default
|
|
39
|
+
export default (NoBorderTableCell);
|
|
@@ -28,11 +28,13 @@ import {
|
|
|
28
28
|
createDefaultValue,
|
|
29
29
|
JsonSchema,
|
|
30
30
|
} from '@jsonforms/core';
|
|
31
|
-
import
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
import {
|
|
32
|
+
IconButton,
|
|
33
|
+
TableRow,
|
|
34
|
+
Tooltip
|
|
35
|
+
} from '@mui/material';
|
|
36
|
+
import { Grid, Hidden, Typography } from '@mui/material';
|
|
37
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
36
38
|
import ValidationIcon from './ValidationIcon';
|
|
37
39
|
import NoBorderTableCell from './NoBorderTableCell';
|
|
38
40
|
|
|
@@ -67,7 +69,7 @@ const TableToolbar = React.memo(
|
|
|
67
69
|
<NoBorderTableCell colSpan={numColumns}>
|
|
68
70
|
<Grid
|
|
69
71
|
container
|
|
70
|
-
|
|
72
|
+
justifyContent={'flex-start'}
|
|
71
73
|
alignItems={'center'}
|
|
72
74
|
spacing={2}
|
|
73
75
|
>
|
|
@@ -96,7 +98,7 @@ const TableToolbar = React.memo(
|
|
|
96
98
|
<IconButton
|
|
97
99
|
aria-label={`Add to ${label}`}
|
|
98
100
|
onClick={addItem(path, createDefaultValue(schema))}
|
|
99
|
-
|
|
101
|
+
size='large'>
|
|
100
102
|
<AddIcon />
|
|
101
103
|
</IconButton>
|
|
102
104
|
</Tooltip>
|
|
@@ -24,22 +24,15 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import React from 'react';
|
|
26
26
|
|
|
27
|
-
import
|
|
28
|
-
import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
|
|
29
|
-
import Tooltip from '@material-ui/core/Tooltip';
|
|
27
|
+
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
|
30
28
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Theme
|
|
36
|
-
} from '@material-ui/core/styles';
|
|
29
|
+
Badge,
|
|
30
|
+
Tooltip,
|
|
31
|
+
styled
|
|
32
|
+
} from '@mui/material';
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
badge: {
|
|
41
|
-
color: palette.error.main
|
|
42
|
-
}
|
|
34
|
+
const StyledBadge = styled(Badge)(({ theme }: any) => ({
|
|
35
|
+
color: theme.palette.error.main
|
|
43
36
|
}));
|
|
44
37
|
|
|
45
38
|
export interface ValidationProps {
|
|
@@ -47,18 +40,18 @@ export interface ValidationProps {
|
|
|
47
40
|
id: string;
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
const ValidationIcon: React.FC<ValidationProps
|
|
51
|
-
({
|
|
43
|
+
const ValidationIcon: React.FC<ValidationProps> =
|
|
44
|
+
({ errorMessages, id }) => {
|
|
52
45
|
return (
|
|
53
46
|
<Tooltip
|
|
54
47
|
id={id}
|
|
55
48
|
title={errorMessages}
|
|
56
49
|
>
|
|
57
|
-
<
|
|
50
|
+
<StyledBadge badgeContent={errorMessages.split('\n').length}>
|
|
58
51
|
<ErrorOutlineIcon color='inherit'/>
|
|
59
|
-
</
|
|
52
|
+
</StyledBadge>
|
|
60
53
|
</Tooltip>
|
|
61
54
|
);
|
|
62
55
|
};
|
|
63
56
|
|
|
64
|
-
export default
|
|
57
|
+
export default ValidationIcon;
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
WithClassname
|
|
36
36
|
} from '@jsonforms/core';
|
|
37
37
|
import { Control, withJsonFormsControlProps } from '@jsonforms/react';
|
|
38
|
-
import { Input } from '@material
|
|
39
|
-
import { InputBaseComponentProps } from '@material-ui/core/InputBase';
|
|
38
|
+
import { Input, InputBaseComponentProps } from '@mui/material';
|
|
40
39
|
import merge from 'lodash/merge';
|
|
41
|
-
import React from 'react';
|
|
40
|
+
import React, { useMemo } from 'react';
|
|
41
|
+
import { useDebouncedChange } from '../util';
|
|
42
42
|
import { MaterialInputControl } from './MaterialInputControl';
|
|
43
43
|
|
|
44
44
|
const findEnumSchema = (schemas: JsonSchema[]) =>
|
|
@@ -64,17 +64,20 @@ const MuiAutocompleteInputText = (props: EnumCellProps & WithClassname) => {
|
|
|
64
64
|
const enumSchema = findEnumSchema(schema.anyOf);
|
|
65
65
|
const stringSchema = findTextSchema(schema.anyOf);
|
|
66
66
|
const maxLength = stringSchema.maxLength;
|
|
67
|
-
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
const appliedUiSchemaOptions = useMemo(() => merge({}, config, uischema.options),[config, uischema.options]);
|
|
68
|
+
const inputProps: InputBaseComponentProps = useMemo(() => {
|
|
69
|
+
let propMemo: InputBaseComponentProps = {};
|
|
70
|
+
if (appliedUiSchemaOptions.restrict) {
|
|
71
|
+
propMemo = { maxLength: maxLength };
|
|
72
|
+
}
|
|
73
|
+
if (appliedUiSchemaOptions.trim && maxLength !== undefined) {
|
|
74
|
+
propMemo.size = maxLength;
|
|
75
|
+
}
|
|
76
|
+
propMemo.list = props.id + 'datalist';
|
|
77
|
+
return propMemo;
|
|
78
|
+
},[appliedUiSchemaOptions,props.id]);
|
|
79
|
+
const [inputText, onChange] = useDebouncedChange(handleChange, '', data, path);
|
|
76
80
|
|
|
77
|
-
inputProps.list = props.id + 'datalist';
|
|
78
81
|
const dataList = (
|
|
79
82
|
<datalist id={props.id + 'datalist'}>
|
|
80
83
|
{enumSchema.enum.map(optionValue => (
|
|
@@ -85,7 +88,7 @@ const MuiAutocompleteInputText = (props: EnumCellProps & WithClassname) => {
|
|
|
85
88
|
return (
|
|
86
89
|
<Input
|
|
87
90
|
type='text'
|
|
88
|
-
value={
|
|
91
|
+
value={inputText}
|
|
89
92
|
onChange={onChange}
|
|
90
93
|
className={className}
|
|
91
94
|
id={id}
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
ControlProps
|
|
32
32
|
} from '@jsonforms/core';
|
|
33
33
|
import { withJsonFormsControlProps } from '@jsonforms/react';
|
|
34
|
-
import { FormControlLabel, Hidden } from '@material
|
|
34
|
+
import { FormControlLabel, Hidden } from '@mui/material';
|
|
35
35
|
import { MuiCheckbox } from '../mui-controls/MuiCheckbox';
|
|
36
36
|
|
|
37
37
|
export const MaterialBooleanControl = ({
|