@jsonforms/material-renderers 3.0.0-alpha.0 → 3.0.0-beta.0
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/README.md +1 -1
- 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 +1014 -483
- package/docs/index.html +77 -68
- 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 +11 -14
- package/docs/interfaces/materialcategorizationstepperlayoutrendererprops.html +7 -10
- package/docs/interfaces/materiallayoutrendererprops.html +0 -3
- package/docs/interfaces/materialtabletoolbarprops.html +10 -13
- 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 -18
- 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 -0
- package/lib/controls/index.d.ts +35 -33
- 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 -52
- 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 -0
- package/lib/util/debounce.d.ts +1 -0
- package/lib/util/focus.d.ts +1 -0
- package/lib/util/index.d.ts +5 -2
- package/lib/util/layout.d.ts +15 -13
- package/lib/util/theme.d.ts +10 -10
- package/package.json +36 -31
- 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 +2 -3
- 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 +4 -4
- 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 +10 -9
- 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 -119
- package/src/controls/MaterialDateTimeControl.tsx +91 -78
- package/src/controls/MaterialEnumControl.tsx +12 -3
- package/src/controls/MaterialInputControl.tsx +65 -72
- package/src/controls/MaterialNativeControl.tsx +55 -60
- package/src/controls/MaterialOneOfEnumControl.tsx +13 -4
- package/src/controls/MaterialOneOfRadioGroupControl.tsx +4 -4
- package/src/controls/MaterialRadioGroup.tsx +73 -74
- package/src/controls/MaterialRadioGroupControl.tsx +1 -1
- package/src/controls/MaterialSliderControl.tsx +93 -89
- package/src/controls/MaterialTimeControl.tsx +133 -0
- package/src/controls/index.ts +7 -0
- package/src/index.ts +3 -0
- package/src/layouts/ArrayToolbar.tsx +11 -7
- package/src/layouts/ExpandPanelRenderer.tsx +44 -42
- package/src/layouts/MaterialArrayLayout.tsx +73 -83
- 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/src/util/datejs.ts +32 -0
- package/{lib/cells/MaterialNumberCell.js → src/util/debounce.ts} +20 -16
- package/{lib/util/index.js → src/util/focus.ts} +9 -6
- package/src/util/index.ts +3 -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 +9 -9
- 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 +46 -2
- package/test/renderers/MaterialDateTimeControl.test.tsx +57 -12
- package/test/renderers/MaterialEnumArrayRenderer.test.tsx +1 -1
- 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 +380 -0
- 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/interfaces/datecontrol.html +0 -157
- package/docs/interfaces/materialarraylayoutstate.html +0 -157
- package/docs/interfaces/statepropsofdatecontrol.html +0 -468
- 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/bundle.js +0 -191792
- package/lib/bundle.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 -83
- package/lib/controls/MaterialDateControl.js.map +0 -1
- package/lib/controls/MaterialDateTimeControl.js +0 -64
- 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 -54
- 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/index.js +0 -87
- package/lib/controls/index.js.map +0 -1
- package/lib/example/src/App.d.ts +0 -8
- package/lib/example/src/Rating.d.ts +0 -18
- package/lib/example/src/RatingControl.d.ts +0 -16
- package/lib/example/src/index.d.ts +0 -11
- package/lib/example/src/reduxUtil.d.ts +0 -38
- package/lib/example/src/util.d.ts +0 -20
- package/lib/examples/src/1169.d.ts +0 -24
- package/lib/examples/src/1220.d.ts +0 -3
- package/lib/examples/src/1253.d.ts +0 -16
- package/lib/examples/src/1254.d.ts +0 -21
- package/lib/examples/src/allOf.d.ts +0 -56
- package/lib/examples/src/anyOf-oneOf-allOf-resolve.d.ts +0 -44
- package/lib/examples/src/anyOf.d.ts +0 -64
- package/lib/examples/src/arrays-with-custom-element-label.d.ts +0 -43
- package/lib/examples/src/arrays-with-detail-and-rule.d.ts +0 -91
- package/lib/examples/src/arrays-with-detail.d.ts +0 -65
- package/lib/examples/src/arrays.d.ts +0 -38
- package/lib/examples/src/booleanToggle.d.ts +0 -62
- package/lib/examples/src/categorization.d.ts +0 -135
- package/lib/examples/src/config.d.ts +0 -29
- package/lib/examples/src/control-options.d.ts +0 -190
- package/lib/examples/src/dates.d.ts +0 -1
- package/lib/examples/src/day1.d.ts +0 -23
- package/lib/examples/src/day2.d.ts +0 -42
- package/lib/examples/src/day3.d.ts +0 -51
- package/lib/examples/src/day4.d.ts +0 -72
- package/lib/examples/src/day5.d.ts +0 -133
- package/lib/examples/src/day6.d.ts +0 -85
- package/lib/examples/src/default.d.ts +0 -64
- package/lib/examples/src/dynamic.d.ts +0 -1
- package/lib/examples/src/enum.d.ts +0 -49
- package/lib/examples/src/enumInArray.d.ts +0 -27
- package/lib/examples/src/example.d.ts +0 -15
- package/lib/examples/src/generate.d.ts +0 -12
- package/lib/examples/src/generateUI.d.ts +0 -33
- package/lib/examples/src/huge.d.ts +0 -1
- package/lib/examples/src/i18n.d.ts +0 -25
- package/lib/examples/src/if_then_else.d.ts +0 -25
- package/lib/examples/src/index.d.ts +0 -56
- package/lib/examples/src/layout.d.ts +0 -97
- package/lib/examples/src/list-with-detail-registered.d.ts +0 -1
- package/lib/examples/src/list-with-detail.d.ts +0 -1
- package/lib/examples/src/multi-enum.d.ts +0 -34
- package/lib/examples/src/nestedArrays.d.ts +0 -4
- package/lib/examples/src/numbers.d.ts +0 -46
- package/lib/examples/src/object.d.ts +0 -56
- package/lib/examples/src/onChange.d.ts +0 -18
- package/lib/examples/src/oneOf-recursive.d.ts +0 -48
- package/lib/examples/src/oneOf.d.ts +0 -53
- package/lib/examples/src/oneOfArray.d.ts +0 -53
- package/lib/examples/src/person.d.ts +0 -99
- package/lib/examples/src/radioGroup.d.ts +0 -1
- package/lib/examples/src/readonly.d.ts +0 -36
- package/lib/examples/src/register.d.ts +0 -3
- package/lib/examples/src/resolve.d.ts +0 -45
- package/lib/examples/src/rule.d.ts +0 -59
- package/lib/examples/src/ruleInheritance.d.ts +0 -26
- package/lib/examples/src/scope.d.ts +0 -50
- package/lib/examples/src/stepper.d.ts +0 -138
- package/lib/examples/src/steppershownav.d.ts +0 -139
- package/lib/examples/src/stringArray.d.ts +0 -22
- package/lib/examples/src/text.d.ts +0 -37
- 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 -88
- package/lib/index.js.map +0 -1
- package/lib/jsonforms-material.js +0 -358
- 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 -109
- 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/logo.svg +0 -7
- package/lib/material/example/CustomAutocomplete.d.ts +0 -3
- package/lib/material/example/index.d.ts +0 -1
- package/lib/material/src/additional/ListWithDetailMasterItem.d.ts +0 -3
- package/lib/material/src/additional/MaterialLabelRenderer.d.ts +0 -13
- package/lib/material/src/additional/MaterialListWithDetailRenderer.d.ts +0 -6
- package/lib/material/src/additional/index.d.ts +0 -4
- package/lib/material/src/cells/CustomizableCells.d.ts +0 -9
- package/lib/material/src/cells/MaterialBooleanCell.d.ts +0 -6
- package/lib/material/src/cells/MaterialBooleanToggleCell.d.ts +0 -6
- package/lib/material/src/cells/MaterialDateCell.d.ts +0 -6
- package/lib/material/src/cells/MaterialEnumCell.d.ts +0 -10
- package/lib/material/src/cells/MaterialIntegerCell.d.ts +0 -6
- package/lib/material/src/cells/MaterialNumberCell.d.ts +0 -10
- package/lib/material/src/cells/MaterialNumberFormatCell.d.ts +0 -10
- package/lib/material/src/cells/MaterialOneOfEnumCell.d.ts +0 -10
- package/lib/material/src/cells/MaterialTextCell.d.ts +0 -10
- package/lib/material/src/cells/MaterialTimeCell.d.ts +0 -6
- package/lib/material/src/cells/index.d.ts +0 -13
- package/lib/material/src/complex/CombinatorProperties.d.ts +0 -12
- package/lib/material/src/complex/DeleteDialog.d.ts +0 -11
- package/lib/material/src/complex/MaterialAllOfRenderer.d.ts +0 -5
- package/lib/material/src/complex/MaterialAnyOfRenderer.d.ts +0 -5
- package/lib/material/src/complex/MaterialArrayControlRenderer.d.ts +0 -5
- package/lib/material/src/complex/MaterialEnumArrayRenderer.d.ts +0 -6
- package/lib/material/src/complex/MaterialObjectRenderer.d.ts +0 -5
- package/lib/material/src/complex/MaterialOneOfRenderer.d.ts +0 -8
- package/lib/material/src/complex/MaterialTableControl.d.ts +0 -10
- package/lib/material/src/complex/NoBorderTableCell.d.ts +0 -3
- package/lib/material/src/complex/TableToolbar.d.ts +0 -15
- package/lib/material/src/complex/ValidationIcon.d.ts +0 -11
- package/lib/material/src/complex/index.d.ts +0 -19
- package/lib/material/src/controls/MaterialAnyOfStringOrEnumControl.d.ts +0 -9
- package/lib/material/src/controls/MaterialBooleanControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialBooleanToggleControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialDateControl.d.ts +0 -18
- package/lib/material/src/controls/MaterialDateTimeControl.d.ts +0 -9
- package/lib/material/src/controls/MaterialEnumControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialInputControl.d.ts +0 -9
- package/lib/material/src/controls/MaterialIntegerControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialNativeControl.d.ts +0 -9
- package/lib/material/src/controls/MaterialNumberControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialOneOfEnumControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialOneOfRadioGroupControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialRadioGroup.d.ts +0 -6
- package/lib/material/src/controls/MaterialRadioGroupControl.d.ts +0 -6
- package/lib/material/src/controls/MaterialSliderControl.d.ts +0 -9
- package/lib/material/src/controls/MaterialTextControl.d.ts +0 -6
- package/lib/material/src/controls/index.d.ts +0 -33
- package/lib/material/src/extended/MaterialAutocompleteEnumControl.d.ts +0 -7
- package/lib/material/src/extended/MaterialAutocompleteOneOfEnumControl.d.ts +0 -7
- package/lib/material/src/extended/MuiAutocomplete.d.ts +0 -10
- package/lib/material/src/extended/index.d.ts +0 -10
- package/lib/material/src/index.d.ts +0 -9
- package/lib/material/src/layouts/ArrayToolbar.d.ts +0 -9
- package/lib/material/src/layouts/ExpandPanelRenderer.d.ts +0 -52
- package/lib/material/src/layouts/MaterialArrayLayout.d.ts +0 -13
- package/lib/material/src/layouts/MaterialArrayLayoutRenderer.d.ts +0 -6
- package/lib/material/src/layouts/MaterialCategorizationLayout.d.ts +0 -25
- package/lib/material/src/layouts/MaterialCategorizationStepperLayout.d.ts +0 -20
- package/lib/material/src/layouts/MaterialGroupLayout.d.ts +0 -7
- package/lib/material/src/layouts/MaterialHorizontalLayout.d.ts +0 -10
- package/lib/material/src/layouts/MaterialVerticalLayout.d.ts +0 -10
- package/lib/material/src/layouts/index.d.ts +0 -6
- package/lib/material/src/mui-controls/MuiCheckbox.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiInputInteger.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiInputNumber.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiInputNumberFormat.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiInputText.d.ts +0 -9
- package/lib/material/src/mui-controls/MuiInputTime.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiSelect.d.ts +0 -3
- package/lib/material/src/mui-controls/MuiToggle.d.ts +0 -3
- package/lib/material/src/mui-controls/index.d.ts +0 -7
- package/lib/material/src/util/index.d.ts +0 -2
- package/lib/material/src/util/layout.d.ts +0 -13
- package/lib/material/src/util/theme.d.ts +0 -10
- 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/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
|
@@ -26,7 +26,7 @@ import './MatchMediaMock';
|
|
|
26
26
|
import React from 'react';
|
|
27
27
|
|
|
28
28
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
29
|
-
import Adapter from 'enzyme-adapter-react-
|
|
29
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
30
30
|
import { ControlElement } from '@jsonforms/core';
|
|
31
31
|
import { MaterialAllOfRenderer, materialRenderers } from '../../src';
|
|
32
32
|
import { JsonForms, JsonFormsStateProvider } from '@jsonforms/react';
|
|
@@ -26,7 +26,7 @@ import './MatchMediaMock';
|
|
|
26
26
|
import React from 'react';
|
|
27
27
|
|
|
28
28
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
29
|
-
import Adapter from 'enzyme-adapter-react-
|
|
29
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
30
30
|
import {
|
|
31
31
|
ControlElement
|
|
32
32
|
} from '@jsonforms/core';
|
|
@@ -62,7 +62,7 @@ describe('Material anyOf renderer', () => {
|
|
|
62
62
|
|
|
63
63
|
afterEach(() => wrapper.unmount());
|
|
64
64
|
|
|
65
|
-
it('should add an item at correct path', () => {
|
|
65
|
+
it('should add an item at correct path', (done) => {
|
|
66
66
|
const schema = {
|
|
67
67
|
type: 'object',
|
|
68
68
|
properties: {
|
|
@@ -103,9 +103,12 @@ describe('Material anyOf renderer', () => {
|
|
|
103
103
|
const input = wrapper.find('input').first();
|
|
104
104
|
input.simulate('change', { target: { value: 'test' } });
|
|
105
105
|
wrapper.update();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
setTimeout(() => {
|
|
107
|
+
expect(onChangeData.data).toEqual({
|
|
108
|
+
value: 'test'
|
|
109
|
+
});
|
|
110
|
+
done();
|
|
111
|
+
}, 1000);
|
|
109
112
|
});
|
|
110
113
|
|
|
111
114
|
it('should add a "mything"', async () => {
|
|
@@ -179,7 +182,7 @@ describe('Material anyOf renderer', () => {
|
|
|
179
182
|
expect(nrOfRowsAfterAdd.length).toBe(4);
|
|
180
183
|
});
|
|
181
184
|
|
|
182
|
-
it('should switch to "yourThing" edit, then switch back, then edit', async () => {
|
|
185
|
+
it('should switch to "yourThing" edit, then switch back, then edit', async (done) => {
|
|
183
186
|
const schema = {
|
|
184
187
|
type: 'object',
|
|
185
188
|
properties: {
|
|
@@ -260,9 +263,12 @@ describe('Material anyOf renderer', () => {
|
|
|
260
263
|
input.simulate('change', { target: { value: 'test' } });
|
|
261
264
|
wrapper.update();
|
|
262
265
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
+
setTimeout(() => {
|
|
267
|
+
expect(onChangeData.data).toEqual({
|
|
268
|
+
myThingsAndOrYourThings: [{ age: 5, name: 'test' }]
|
|
269
|
+
});
|
|
270
|
+
done();
|
|
271
|
+
}, 1000);
|
|
266
272
|
});
|
|
267
273
|
|
|
268
274
|
it('should be hideable', () => {
|
|
@@ -26,7 +26,7 @@ import './MatchMediaMock';
|
|
|
26
26
|
import React from 'react';
|
|
27
27
|
|
|
28
28
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
29
|
-
import Adapter from 'enzyme-adapter-react-
|
|
29
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
30
30
|
import {
|
|
31
31
|
ControlElement,
|
|
32
32
|
JsonSchema
|
|
@@ -33,7 +33,7 @@ import * as React from 'react';
|
|
|
33
33
|
import MaterialArrayControlRenderer from '../../src/complex/MaterialArrayControlRenderer';
|
|
34
34
|
import { materialCells, materialRenderers } from '../../src';
|
|
35
35
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
36
|
-
import Adapter from 'enzyme-adapter-react-
|
|
36
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
37
37
|
import { JsonFormsStateProvider, StatelessRenderer } from '@jsonforms/react';
|
|
38
38
|
import { initCore, TestEmitter } from './util';
|
|
39
39
|
|
|
@@ -34,9 +34,9 @@ import {
|
|
|
34
34
|
materialArrayLayoutTester
|
|
35
35
|
} from '../../src/layouts';
|
|
36
36
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
37
|
-
import Adapter from 'enzyme-adapter-react-
|
|
37
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
38
38
|
import { JsonForms, JsonFormsStateProvider } from '@jsonforms/react';
|
|
39
|
-
import {
|
|
39
|
+
import { Accordion } from '@mui/material';
|
|
40
40
|
import { initCore } from './util';
|
|
41
41
|
|
|
42
42
|
Enzyme.configure({ adapter: new Adapter() });
|
|
@@ -292,7 +292,7 @@ describe('Material array layout', () => {
|
|
|
292
292
|
// up button
|
|
293
293
|
expect(
|
|
294
294
|
wrapper
|
|
295
|
-
.find('
|
|
295
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
296
296
|
.at(0)
|
|
297
297
|
.find('button')
|
|
298
298
|
.find({ 'aria-label': 'Move up' }).length
|
|
@@ -300,7 +300,7 @@ describe('Material array layout', () => {
|
|
|
300
300
|
// down button
|
|
301
301
|
expect(
|
|
302
302
|
wrapper
|
|
303
|
-
.find('
|
|
303
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
304
304
|
.at(0)
|
|
305
305
|
.find('button')
|
|
306
306
|
.find({ 'aria-label': 'Move down' }).length
|
|
@@ -326,7 +326,7 @@ describe('Material array layout', () => {
|
|
|
326
326
|
|
|
327
327
|
// getting up button of second item in expension panel;
|
|
328
328
|
const upButton = wrapper
|
|
329
|
-
.find('
|
|
329
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
330
330
|
.at(1)
|
|
331
331
|
.find('button')
|
|
332
332
|
.find({ 'aria-label': 'Move up' });
|
|
@@ -363,7 +363,7 @@ describe('Material array layout', () => {
|
|
|
363
363
|
|
|
364
364
|
// getting up button of second item in expension panel;
|
|
365
365
|
const upButton = wrapper
|
|
366
|
-
.find('
|
|
366
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
367
367
|
.at(0)
|
|
368
368
|
.find('button')
|
|
369
369
|
.find({ 'aria-label': 'Move down' });
|
|
@@ -394,7 +394,7 @@ describe('Material array layout', () => {
|
|
|
394
394
|
|
|
395
395
|
// getting up button of second item in expension panel;
|
|
396
396
|
const upButton = wrapper
|
|
397
|
-
.find('
|
|
397
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
398
398
|
.at(0)
|
|
399
399
|
.find('button')
|
|
400
400
|
.find({ 'aria-label': 'Move up' });
|
|
@@ -414,7 +414,7 @@ describe('Material array layout', () => {
|
|
|
414
414
|
|
|
415
415
|
// getting up button of second item in expension panel;
|
|
416
416
|
const downButton = wrapper
|
|
417
|
-
.find('
|
|
417
|
+
.find('Memo(ExpandPanelRendererComponent)')
|
|
418
418
|
.at(1)
|
|
419
419
|
.find('button')
|
|
420
420
|
.find({ 'aria-label': 'Move down' });
|
|
@@ -426,7 +426,7 @@ describe('Material array layout', () => {
|
|
|
426
426
|
.find(
|
|
427
427
|
`#${
|
|
428
428
|
wrapper
|
|
429
|
-
.find(
|
|
429
|
+
.find(Accordion)
|
|
430
430
|
.at(index)
|
|
431
431
|
.props()['aria-labelledby']
|
|
432
432
|
}`
|
|
@@ -35,7 +35,7 @@ import * as ReactDOM from 'react-dom';
|
|
|
35
35
|
import { materialRenderers } from '../../src';
|
|
36
36
|
|
|
37
37
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
38
|
-
import Adapter from 'enzyme-adapter-react-
|
|
38
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
39
39
|
import { JsonFormsStateProvider } from '@jsonforms/react';
|
|
40
40
|
import { initCore, TestEmitter } from './util';
|
|
41
41
|
|
|
@@ -36,9 +36,10 @@ import * as ReactDOM from 'react-dom';
|
|
|
36
36
|
import { materialRenderers } from '../../src';
|
|
37
37
|
|
|
38
38
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
39
|
-
import Adapter from 'enzyme-adapter-react-
|
|
39
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
40
40
|
import { JsonFormsStateProvider } from '@jsonforms/react';
|
|
41
41
|
import { initCore, TestEmitter } from './util';
|
|
42
|
+
import { Switch } from '@mui/material';
|
|
42
43
|
|
|
43
44
|
Enzyme.configure({ adapter: new Adapter() });
|
|
44
45
|
|
|
@@ -236,7 +237,7 @@ describe('Material boolean toggle cell', () => {
|
|
|
236
237
|
);
|
|
237
238
|
|
|
238
239
|
// Make sure a toggle is rendered by checking for the thumb element
|
|
239
|
-
expect(wrapper.find(
|
|
240
|
+
expect(wrapper.find(Switch)).toHaveLength(1);
|
|
240
241
|
|
|
241
242
|
const input = wrapper.find('input').first();
|
|
242
243
|
expect(input.props().type).toBe('checkbox');
|
|
@@ -36,9 +36,10 @@ import * as ReactDOM from 'react-dom';
|
|
|
36
36
|
import { materialRenderers } from '../../src';
|
|
37
37
|
|
|
38
38
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
39
|
-
import Adapter from 'enzyme-adapter-react-
|
|
39
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
40
40
|
import { JsonFormsStateProvider } from '@jsonforms/react';
|
|
41
41
|
import { initCore, TestEmitter } from './util';
|
|
42
|
+
import { Switch } from '@mui/material';
|
|
42
43
|
|
|
43
44
|
Enzyme.configure({ adapter: new Adapter() });
|
|
44
45
|
|
|
@@ -241,7 +242,7 @@ describe('Material boolean toggle control', () => {
|
|
|
241
242
|
);
|
|
242
243
|
|
|
243
244
|
// Make sure a toggle is rendered by checking for the thumb element
|
|
244
|
-
expect(wrapper.find(
|
|
245
|
+
expect(wrapper.find(Switch)).toHaveLength(1);
|
|
245
246
|
|
|
246
247
|
const input = wrapper.find('input').first();
|
|
247
248
|
expect(input.props().type).toBe('checkbox');
|
|
@@ -39,8 +39,8 @@ import MaterialCategorizationLayoutRenderer, {
|
|
|
39
39
|
materialCategorizationTester
|
|
40
40
|
} from '../../src/layouts/MaterialCategorizationLayout';
|
|
41
41
|
import { MaterialLayoutRenderer, materialRenderers } from '../../src';
|
|
42
|
-
import { Tab, Tabs } from '@material
|
|
43
|
-
import Adapter from 'enzyme-adapter-react-
|
|
42
|
+
import { Tab, Tabs } from '@mui/material';
|
|
43
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
44
44
|
import { initCore } from './util';
|
|
45
45
|
|
|
46
46
|
Enzyme.configure({ adapter: new Adapter() });
|
|
@@ -270,7 +270,7 @@ describe('Material categorization layout', () => {
|
|
|
270
270
|
|
|
271
271
|
const beforeClick = wrapper.find(Tabs).props().value;
|
|
272
272
|
wrapper
|
|
273
|
-
.find(
|
|
273
|
+
.find('button[role="tab"]')
|
|
274
274
|
.at(1)
|
|
275
275
|
.simulate('click');
|
|
276
276
|
const afterClick = wrapper.find(Tabs).props().value;
|
|
@@ -372,4 +372,77 @@ describe('Material categorization layout', () => {
|
|
|
372
372
|
const materialArrayLayout = wrapper.find(MaterialLayoutRenderer);
|
|
373
373
|
expect(materialArrayLayout.props().renderers).toHaveLength(0);
|
|
374
374
|
});
|
|
375
|
+
|
|
376
|
+
it('display correct content when hiding a tab', () => {
|
|
377
|
+
const data = { name : 'fo' };
|
|
378
|
+
const condition: SchemaBasedCondition = {
|
|
379
|
+
scope: '#/properties/name',
|
|
380
|
+
schema: { maxLength: 3 }
|
|
381
|
+
};
|
|
382
|
+
const nameControl: ControlElement = {
|
|
383
|
+
type: 'Control',
|
|
384
|
+
scope: '#/properties/name'
|
|
385
|
+
};
|
|
386
|
+
const uischema: Categorization = {
|
|
387
|
+
type: 'Categorization',
|
|
388
|
+
label: '',
|
|
389
|
+
options: {
|
|
390
|
+
showNavButtons: true
|
|
391
|
+
},
|
|
392
|
+
elements: [
|
|
393
|
+
{
|
|
394
|
+
type: 'Category',
|
|
395
|
+
label: 'A',
|
|
396
|
+
elements: undefined
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
type: 'Category',
|
|
400
|
+
label: 'B',
|
|
401
|
+
elements: undefined,
|
|
402
|
+
rule: {
|
|
403
|
+
effect: RuleEffect.SHOW,
|
|
404
|
+
condition: condition
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: 'Category',
|
|
409
|
+
label: 'C',
|
|
410
|
+
elements: [nameControl],
|
|
411
|
+
rule: {
|
|
412
|
+
effect: RuleEffect.HIDE,
|
|
413
|
+
condition: condition
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
const core = initCore(fixture.schema, uischema, data);
|
|
420
|
+
|
|
421
|
+
const wrapper = mount(
|
|
422
|
+
<JsonFormsStateProvider initState={{ renderers: materialRenderers, core }}>
|
|
423
|
+
<MaterialCategorizationLayoutRenderer
|
|
424
|
+
{...layoutDefaultProps}
|
|
425
|
+
schema={fixture.schema}
|
|
426
|
+
uischema={uischema}
|
|
427
|
+
/>
|
|
428
|
+
</JsonFormsStateProvider>
|
|
429
|
+
);
|
|
430
|
+
|
|
431
|
+
wrapper
|
|
432
|
+
.find('button[role="tab"]')
|
|
433
|
+
.at(1)
|
|
434
|
+
.simulate('click');
|
|
435
|
+
|
|
436
|
+
let isCategoryCshown = wrapper.find('input[type="text"]').length > 0;
|
|
437
|
+
expect(isCategoryCshown).toBe(false);
|
|
438
|
+
|
|
439
|
+
core.data = { ...core.data, name: 'Barr' };
|
|
440
|
+
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
441
|
+
wrapper.update();
|
|
442
|
+
|
|
443
|
+
isCategoryCshown = wrapper.find('input[type="text"]').length > 0;
|
|
444
|
+
expect(isCategoryCshown).toBe(true);
|
|
445
|
+
|
|
446
|
+
wrapper.unmount();
|
|
447
|
+
});
|
|
375
448
|
});
|
|
@@ -39,8 +39,8 @@ import MaterialCategorizationStepperLayoutRenderer, {
|
|
|
39
39
|
materialCategorizationStepperTester
|
|
40
40
|
} from '../../src/layouts/MaterialCategorizationStepperLayout';
|
|
41
41
|
import { MaterialLayoutRenderer, materialRenderers } from '../../src';
|
|
42
|
-
import { Button, Step,
|
|
43
|
-
import Adapter from 'enzyme-adapter-react-
|
|
42
|
+
import { Button, Step, Stepper } from '@mui/material';
|
|
43
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
44
44
|
import { initCore } from './util';
|
|
45
45
|
|
|
46
46
|
Enzyme.configure({ adapter: new Adapter() });
|
|
@@ -281,7 +281,7 @@ describe('Material categorization stepper layout', () => {
|
|
|
281
281
|
);
|
|
282
282
|
const beforeClick = wrapper.find(Stepper).props().activeStep;
|
|
283
283
|
wrapper
|
|
284
|
-
.find(
|
|
284
|
+
.find('button')
|
|
285
285
|
.at(1)
|
|
286
286
|
.simulate('click');
|
|
287
287
|
const afterClick = wrapper.find(Stepper).props().activeStep;
|
|
@@ -422,7 +422,7 @@ describe('Material categorization stepper layout', () => {
|
|
|
422
422
|
const isPrevButtonEnabledBeforeClick = !wrapper.find(Button).at(1).props().disabled;
|
|
423
423
|
const isNextButtonEnabledBeforeClick = !wrapper.find(Button).at(0).props().disabled;
|
|
424
424
|
wrapper
|
|
425
|
-
.find(
|
|
425
|
+
.find('button')
|
|
426
426
|
.at(1)
|
|
427
427
|
.simulate('click');
|
|
428
428
|
const isPrevButtonEnabledAfterClick = !wrapper.find(Button).at(1).props().disabled;
|
|
@@ -489,8 +489,8 @@ describe('Material categorization stepper layout', () => {
|
|
|
489
489
|
);
|
|
490
490
|
const activeStepBeforeClick = wrapper.find(Stepper).props().activeStep;
|
|
491
491
|
wrapper
|
|
492
|
-
.find(
|
|
493
|
-
.at(
|
|
492
|
+
.find('button')
|
|
493
|
+
.at(4)
|
|
494
494
|
.simulate('click');
|
|
495
495
|
const activeStepAfterClick = wrapper.find(Stepper).props().activeStep;
|
|
496
496
|
|
|
@@ -561,4 +561,77 @@ describe('Material categorization stepper layout', () => {
|
|
|
561
561
|
|
|
562
562
|
wrapper.unmount();
|
|
563
563
|
});
|
|
564
|
+
|
|
565
|
+
it('display correct content when hiding a step', () => {
|
|
566
|
+
const data = { name : 'fo' };
|
|
567
|
+
const condition: SchemaBasedCondition = {
|
|
568
|
+
scope: '#/properties/name',
|
|
569
|
+
schema: { maxLength: 3 }
|
|
570
|
+
};
|
|
571
|
+
const nameControl: ControlElement = {
|
|
572
|
+
type: 'Control',
|
|
573
|
+
scope: '#/properties/name'
|
|
574
|
+
};
|
|
575
|
+
const uischema: Categorization = {
|
|
576
|
+
type: 'Categorization',
|
|
577
|
+
label: '',
|
|
578
|
+
options: {
|
|
579
|
+
showNavButtons: true
|
|
580
|
+
},
|
|
581
|
+
elements: [
|
|
582
|
+
{
|
|
583
|
+
type: 'Category',
|
|
584
|
+
label: 'A',
|
|
585
|
+
elements: undefined
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
type: 'Category',
|
|
589
|
+
label: 'B',
|
|
590
|
+
elements: undefined,
|
|
591
|
+
rule: {
|
|
592
|
+
effect: RuleEffect.SHOW,
|
|
593
|
+
condition: condition
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
type: 'Category',
|
|
598
|
+
label: 'C',
|
|
599
|
+
elements: [nameControl],
|
|
600
|
+
rule: {
|
|
601
|
+
effect: RuleEffect.HIDE,
|
|
602
|
+
condition: condition
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
]
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
const core = initCore(fixture.schema, uischema, data);
|
|
609
|
+
|
|
610
|
+
const wrapper = mount(
|
|
611
|
+
<JsonFormsStateProvider initState={{ renderers: materialRenderers, core }}>
|
|
612
|
+
<MaterialCategorizationStepperLayoutRenderer
|
|
613
|
+
{...layoutDefaultProps}
|
|
614
|
+
schema={fixture.schema}
|
|
615
|
+
uischema={uischema}
|
|
616
|
+
/>
|
|
617
|
+
</JsonFormsStateProvider>
|
|
618
|
+
);
|
|
619
|
+
|
|
620
|
+
wrapper
|
|
621
|
+
.find('button')
|
|
622
|
+
.at(1)
|
|
623
|
+
.simulate('click');
|
|
624
|
+
|
|
625
|
+
let isCategoryCshown = wrapper.find('input[type="text"]').length > 0;
|
|
626
|
+
expect(isCategoryCshown).toBe(false);
|
|
627
|
+
|
|
628
|
+
core.data = { ...core.data, name: 'Barr' };
|
|
629
|
+
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
630
|
+
wrapper.update();
|
|
631
|
+
|
|
632
|
+
isCategoryCshown = wrapper.find('input[type="text"]').length > 0;
|
|
633
|
+
expect(isCategoryCshown).toBe(true);
|
|
634
|
+
|
|
635
|
+
wrapper.unmount();
|
|
636
|
+
});
|
|
564
637
|
});
|
|
@@ -35,7 +35,7 @@ import MaterialDateCell, {
|
|
|
35
35
|
import { materialRenderers } from '../../src';
|
|
36
36
|
|
|
37
37
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
38
|
-
import Adapter from 'enzyme-adapter-react-
|
|
38
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
39
39
|
import { initCore, TestEmitter } from './util';
|
|
40
40
|
|
|
41
41
|
Enzyme.configure({ adapter: new Adapter() });
|
|
@@ -34,7 +34,7 @@ import * as React from 'react';
|
|
|
34
34
|
import { materialRenderers } from '../../src';
|
|
35
35
|
|
|
36
36
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
37
|
-
import Adapter from 'enzyme-adapter-react-
|
|
37
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
38
38
|
import { JsonFormsStateProvider } from '@jsonforms/react';
|
|
39
39
|
import { initCore, TestEmitter } from './util';
|
|
40
40
|
|
|
@@ -101,6 +101,19 @@ describe('Material date control tester', () => {
|
|
|
101
101
|
}
|
|
102
102
|
})
|
|
103
103
|
).toBe(4);
|
|
104
|
+
expect(
|
|
105
|
+
materialDateControlTester(
|
|
106
|
+
{ ...uischema, options: { format: 'date' } },
|
|
107
|
+
{
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
foo: {
|
|
111
|
+
type: 'string'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
).toBe(4);
|
|
104
117
|
});
|
|
105
118
|
});
|
|
106
119
|
|
|
@@ -189,7 +202,8 @@ describe('Material date control', () => {
|
|
|
189
202
|
</JsonFormsStateProvider>
|
|
190
203
|
);
|
|
191
204
|
const input = wrapper.find('input').first();
|
|
192
|
-
input.
|
|
205
|
+
(input.getDOMNode() as HTMLInputElement).value = '1961-04-12';
|
|
206
|
+
input.simulate('change', input);
|
|
193
207
|
expect(onChangeData.data.foo).toBe('1961-04-12');
|
|
194
208
|
});
|
|
195
209
|
|
|
@@ -333,4 +347,34 @@ describe('Material date control', () => {
|
|
|
333
347
|
const inputs = wrapper.find('input');
|
|
334
348
|
expect(inputs.length).toBe(0);
|
|
335
349
|
});
|
|
350
|
+
|
|
351
|
+
it('should support format customizations', () => {
|
|
352
|
+
const core = initCore(schema, uischema, {foo: '06---1980'});
|
|
353
|
+
const onChangeData: any = {
|
|
354
|
+
data: undefined
|
|
355
|
+
};
|
|
356
|
+
wrapper = mount(
|
|
357
|
+
<JsonFormsStateProvider initState={{ renderers: materialRenderers, core }}>
|
|
358
|
+
<TestEmitter
|
|
359
|
+
onChange={({ data }) => {
|
|
360
|
+
onChangeData.data = data;
|
|
361
|
+
}}
|
|
362
|
+
/>
|
|
363
|
+
<MaterialDateControl
|
|
364
|
+
schema={schema}
|
|
365
|
+
uischema={{...uischema, options: {
|
|
366
|
+
dateFormat: 'YYYY/MM',
|
|
367
|
+
dateSaveFormat: 'MM---YYYY'
|
|
368
|
+
}}}
|
|
369
|
+
/>
|
|
370
|
+
</JsonFormsStateProvider>
|
|
371
|
+
);
|
|
372
|
+
|
|
373
|
+
const input = wrapper.find('input').first();
|
|
374
|
+
expect(input.props().value).toBe('1980/06');
|
|
375
|
+
|
|
376
|
+
(input.getDOMNode() as HTMLInputElement).value = '1961/04';
|
|
377
|
+
input.simulate('change', input);
|
|
378
|
+
expect(onChangeData.data.foo).toBe('04---1961');
|
|
379
|
+
});
|
|
336
380
|
});
|
|
@@ -31,17 +31,17 @@ import {
|
|
|
31
31
|
import MaterialDateTimeControl, {
|
|
32
32
|
materialDateTimeControlTester
|
|
33
33
|
} from '../../src/controls/MaterialDateTimeControl';
|
|
34
|
-
import
|
|
34
|
+
import dayjs from 'dayjs';
|
|
35
35
|
import { materialRenderers } from '../../src';
|
|
36
36
|
|
|
37
37
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
38
|
-
import Adapter from 'enzyme-adapter-react-
|
|
38
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
39
39
|
import { JsonFormsStateProvider } from '@jsonforms/react';
|
|
40
40
|
import { initCore, TestEmitter } from './util';
|
|
41
41
|
|
|
42
42
|
Enzyme.configure({ adapter: new Adapter() });
|
|
43
43
|
|
|
44
|
-
const data = { foo:
|
|
44
|
+
const data = { foo: dayjs('1980-04-04 13:37').format() };
|
|
45
45
|
const schema = {
|
|
46
46
|
type: 'object',
|
|
47
47
|
properties: {
|
|
@@ -102,6 +102,19 @@ describe('Material date time control tester', () => {
|
|
|
102
102
|
}
|
|
103
103
|
})
|
|
104
104
|
).toBe(2);
|
|
105
|
+
expect(
|
|
106
|
+
materialDateTimeControlTester(
|
|
107
|
+
{ ...uischema, options: { format: 'date-time' } },
|
|
108
|
+
{
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
foo: {
|
|
112
|
+
type: 'string'
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
).toBe(2);
|
|
105
118
|
});
|
|
106
119
|
});
|
|
107
120
|
|
|
@@ -173,7 +186,7 @@ describe('Material date time control', () => {
|
|
|
173
186
|
|
|
174
187
|
const input = wrapper.find('input').first();
|
|
175
188
|
expect(input.props().type).toBe('text');
|
|
176
|
-
expect(input.props().value).toBe('04
|
|
189
|
+
expect(input.props().value).toBe('1980-04-04 13:37');
|
|
177
190
|
});
|
|
178
191
|
|
|
179
192
|
it('should update via event', () => {
|
|
@@ -192,9 +205,10 @@ describe('Material date time control', () => {
|
|
|
192
205
|
</JsonFormsStateProvider>
|
|
193
206
|
);
|
|
194
207
|
const input = wrapper.find('input').first();
|
|
195
|
-
input.
|
|
208
|
+
(input.getDOMNode() as HTMLInputElement).value ='1961-12-94 20:15';
|
|
209
|
+
input.simulate('change', input);
|
|
196
210
|
expect(onChangeData.data.foo).toBe(
|
|
197
|
-
|
|
211
|
+
dayjs('1961-12-94 20:15').format()
|
|
198
212
|
);
|
|
199
213
|
});
|
|
200
214
|
|
|
@@ -205,11 +219,11 @@ describe('Material date time control', () => {
|
|
|
205
219
|
<MaterialDateTimeControl schema={schema} uischema={uischema} />
|
|
206
220
|
</JsonFormsStateProvider>
|
|
207
221
|
);
|
|
208
|
-
core.data = { ...core.data, foo:
|
|
222
|
+
core.data = { ...core.data, foo: dayjs('1961-12-04 20:15').format() };
|
|
209
223
|
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
210
224
|
wrapper.update();
|
|
211
225
|
const input = wrapper.find('input').first();
|
|
212
|
-
expect(input.props().value).toBe('04
|
|
226
|
+
expect(input.props().value).toBe('1961-12-04 20:15');
|
|
213
227
|
});
|
|
214
228
|
|
|
215
229
|
it('should update with null value', () => {
|
|
@@ -251,7 +265,7 @@ describe('Material date time control', () => {
|
|
|
251
265
|
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
252
266
|
wrapper.update();
|
|
253
267
|
const input = wrapper.find('input').first();
|
|
254
|
-
expect(input.props().value).toBe('04
|
|
268
|
+
expect(input.props().value).toBe('1980-04-04 13:37');
|
|
255
269
|
});
|
|
256
270
|
|
|
257
271
|
it('should not update with null ref', () => {
|
|
@@ -265,7 +279,7 @@ describe('Material date time control', () => {
|
|
|
265
279
|
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
266
280
|
wrapper.update();
|
|
267
281
|
const input = wrapper.find('input').first();
|
|
268
|
-
expect(input.props().value).toBe('04
|
|
282
|
+
expect(input.props().value).toBe('1980-04-04 13:37');
|
|
269
283
|
});
|
|
270
284
|
|
|
271
285
|
it('should not update with undefined ref', () => {
|
|
@@ -279,7 +293,7 @@ describe('Material date time control', () => {
|
|
|
279
293
|
wrapper.setProps({ initState: { renderers: materialRenderers, core }} );
|
|
280
294
|
wrapper.update();
|
|
281
295
|
const input = wrapper.find('input').first();
|
|
282
|
-
expect(input.props().value).toBe('04
|
|
296
|
+
expect(input.props().value).toBe('1980-04-04 13:37');
|
|
283
297
|
});
|
|
284
298
|
|
|
285
299
|
it('can be disabled', () => {
|
|
@@ -320,7 +334,7 @@ describe('Material date time control', () => {
|
|
|
320
334
|
</JsonFormsStateProvider>
|
|
321
335
|
);
|
|
322
336
|
const input = wrapper.find('input').first();
|
|
323
|
-
// there is only input id at the
|
|
337
|
+
// there is only input id at the dayjs
|
|
324
338
|
expect(input.props().id).toBe('#/properties/foo-input');
|
|
325
339
|
});
|
|
326
340
|
|
|
@@ -338,4 +352,35 @@ describe('Material date time control', () => {
|
|
|
338
352
|
const inputs = wrapper.find('input');
|
|
339
353
|
expect(inputs.length).toBe(0);
|
|
340
354
|
});
|
|
355
|
+
|
|
356
|
+
it('should support format customizations', () => {
|
|
357
|
+
const core = initCore(schema, uischema, {foo: dayjs('1980-04-23 13:37').format('YYYY/MM/DD h:mm a')});
|
|
358
|
+
const onChangeData: any = {
|
|
359
|
+
data: undefined
|
|
360
|
+
};
|
|
361
|
+
wrapper = mount(
|
|
362
|
+
<JsonFormsStateProvider initState={{ renderers: materialRenderers, core }}>
|
|
363
|
+
<TestEmitter
|
|
364
|
+
onChange={({ data }) => {
|
|
365
|
+
onChangeData.data = data;
|
|
366
|
+
}}
|
|
367
|
+
/>
|
|
368
|
+
<MaterialDateTimeControl
|
|
369
|
+
schema={schema}
|
|
370
|
+
uischema={{...uischema, options: {
|
|
371
|
+
dateTimeFormat: 'DD-MM-YY hh:mm:a',
|
|
372
|
+
dateTimeSaveFormat: 'YYYY/MM/DD h:mm a',
|
|
373
|
+
ampm: true
|
|
374
|
+
}}}
|
|
375
|
+
/>
|
|
376
|
+
</JsonFormsStateProvider>
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
const input = wrapper.find('input').first();
|
|
380
|
+
expect(input.props().value).toBe('23-04-80 01:37:pm');
|
|
381
|
+
|
|
382
|
+
(input.getDOMNode() as HTMLInputElement).value = '10-12-05 11:22:am';
|
|
383
|
+
input.simulate('change', input);
|
|
384
|
+
expect(onChangeData.data.foo).toBe('2005/12/10 11:22 am');
|
|
385
|
+
});
|
|
341
386
|
});
|
|
@@ -2,7 +2,7 @@ import './MatchMediaMock';
|
|
|
2
2
|
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
|
|
3
3
|
import { JsonForms } from '@jsonforms/react';
|
|
4
4
|
import Enzyme, { mount, ReactWrapper } from 'enzyme';
|
|
5
|
-
import Adapter from 'enzyme-adapter-react-
|
|
5
|
+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import {
|
|
8
8
|
materialEnumArrayRendererTester,
|