@jsonforms/material-renderers 3.0.0-alpha.2 → 3.0.0-alpha.3
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/materialanyofstringorenumcontrol.html +1 -1
- package/docs/classes/materialtablecontrol.html +2 -2
- package/docs/globals.html +79 -79
- package/docs/index.html +6 -0
- package/docs/interfaces/arraylayouttoolbarprops.html +5 -5
- package/docs/interfaces/categorizationstate.html +1 -1
- package/docs/interfaces/dispatchpropsofexpandpanel.html +3 -3
- package/docs/interfaces/expandpanelprops.html +19 -19
- package/docs/interfaces/jsonformstheme.html +39 -46
- package/docs/interfaces/materialcategorizationlayoutrendererprops.html +4 -4
- package/docs/interfaces/materialtabletoolbarprops.html +9 -9
- package/docs/interfaces/muitextinputprops.html +2 -2
- package/docs/interfaces/ownpropsofexpandpanel.html +14 -14
- package/docs/interfaces/statepropsofexpandpanel.html +16 -16
- package/docs/interfaces/tablerowsprop.html +9 -9
- package/docs/interfaces/validationprops.html +2 -2
- package/docs/interfaces/withoptionlabel.html +7 -4
- package/example/index.ts +5 -20
- package/lib/additional/ListWithDetailMasterItem.js +8 -8
- package/lib/additional/ListWithDetailMasterItem.js.map +1 -1
- package/lib/additional/MaterialLabelRenderer.js +3 -3
- package/lib/additional/MaterialLabelRenderer.js.map +1 -1
- package/lib/additional/MaterialListWithDetailRenderer.js +6 -6
- package/lib/additional/MaterialListWithDetailRenderer.js.map +1 -1
- package/lib/cells/MaterialDateCell.js +1 -1
- package/lib/cells/MaterialDateCell.js.map +1 -1
- package/lib/complex/DeleteDialog.js +8 -9
- package/lib/complex/DeleteDialog.js.map +1 -1
- package/lib/complex/MaterialAllOfRenderer.js +8 -8
- package/lib/complex/MaterialAllOfRenderer.js.map +1 -1
- package/lib/complex/MaterialAnyOfRenderer.js +3 -3
- package/lib/complex/MaterialAnyOfRenderer.js.map +1 -1
- package/lib/complex/MaterialArrayControlRenderer.js +2 -2
- package/lib/complex/MaterialArrayControlRenderer.js.map +1 -1
- package/lib/complex/MaterialEnumArrayRenderer.js +6 -6
- package/lib/complex/MaterialEnumArrayRenderer.js.map +1 -1
- package/lib/complex/MaterialObjectRenderer.js +2 -2
- package/lib/complex/MaterialObjectRenderer.js.map +1 -1
- package/lib/complex/MaterialOneOfRenderer.js +10 -10
- package/lib/complex/MaterialOneOfRenderer.js.map +1 -1
- package/lib/complex/MaterialTableControl.js +27 -28
- package/lib/complex/MaterialTableControl.js.map +1 -1
- package/lib/complex/NoBorderTableCell.d.ts +2 -2
- package/lib/complex/NoBorderTableCell.js +8 -10
- package/lib/complex/NoBorderTableCell.js.map +1 -1
- package/lib/complex/TableToolbar.js +12 -14
- package/lib/complex/TableToolbar.js.map +1 -1
- package/lib/complex/ValidationIcon.d.ts +2 -8
- package/lib/complex/ValidationIcon.js +9 -13
- package/lib/complex/ValidationIcon.js.map +1 -1
- package/lib/controls/MaterialAnyOfStringOrEnumControl.js +2 -2
- package/lib/controls/MaterialAnyOfStringOrEnumControl.js.map +1 -1
- package/lib/controls/MaterialBooleanControl.js +3 -3
- package/lib/controls/MaterialBooleanControl.js.map +1 -1
- package/lib/controls/MaterialBooleanToggleControl.js +3 -3
- package/lib/controls/MaterialBooleanToggleControl.js.map +1 -1
- package/lib/controls/MaterialDateControl.js +8 -11
- package/lib/controls/MaterialDateControl.js.map +1 -1
- package/lib/controls/MaterialDateTimeControl.js +8 -13
- package/lib/controls/MaterialDateTimeControl.js.map +1 -1
- package/lib/controls/MaterialEnumControl.js.map +1 -1
- package/lib/controls/MaterialInputControl.js +7 -7
- package/lib/controls/MaterialInputControl.js.map +1 -1
- package/lib/controls/MaterialNativeControl.js +3 -4
- package/lib/controls/MaterialNativeControl.js.map +1 -1
- package/lib/controls/MaterialOneOfEnumControl.js.map +1 -1
- package/lib/controls/MaterialOneOfRadioGroupControl.js.map +1 -1
- package/lib/controls/MaterialRadioGroup.js +7 -9
- package/lib/controls/MaterialRadioGroup.js.map +1 -1
- package/lib/controls/MaterialRadioGroupControl.js.map +1 -1
- package/lib/controls/MaterialSliderControl.js +9 -9
- package/lib/controls/MaterialSliderControl.js.map +1 -1
- package/lib/controls/MaterialTimeControl.js +8 -8
- package/lib/controls/MaterialTimeControl.js.map +1 -1
- package/lib/extended/MuiAutocomplete.d.ts +3 -4
- package/lib/extended/MuiAutocomplete.js +3 -4
- package/lib/extended/MuiAutocomplete.js.map +1 -1
- package/lib/extended/index.d.ts +1 -1
- package/lib/extended/index.js +1 -1
- package/lib/jsonforms-material.js +248 -43
- package/lib/jsonforms-material.js.map +1 -1
- package/lib/layouts/ArrayToolbar.js +13 -16
- package/lib/layouts/ArrayToolbar.js.map +1 -1
- package/lib/layouts/ExpandPanelRenderer.js +24 -29
- package/lib/layouts/ExpandPanelRenderer.js.map +1 -1
- package/lib/layouts/MaterialArrayLayoutRenderer.js +2 -2
- package/lib/layouts/MaterialArrayLayoutRenderer.js.map +1 -1
- package/lib/layouts/MaterialCategorizationLayout.js +8 -9
- package/lib/layouts/MaterialCategorizationLayout.js.map +1 -1
- package/lib/layouts/MaterialCategorizationStepperLayout.js +9 -9
- package/lib/layouts/MaterialCategorizationStepperLayout.js.map +1 -1
- package/lib/layouts/MaterialGroupLayout.js +8 -8
- package/lib/layouts/MaterialGroupLayout.js.map +1 -1
- package/lib/mui-controls/MuiCheckbox.js +2 -2
- package/lib/mui-controls/MuiCheckbox.js.map +1 -1
- package/lib/mui-controls/MuiInputInteger.js +2 -2
- package/lib/mui-controls/MuiInputInteger.js.map +1 -1
- package/lib/mui-controls/MuiInputNumber.js +2 -2
- package/lib/mui-controls/MuiInputNumber.js.map +1 -1
- package/lib/mui-controls/MuiInputNumberFormat.js +2 -2
- package/lib/mui-controls/MuiInputNumberFormat.js.map +1 -1
- package/lib/mui-controls/MuiInputText.d.ts +1 -1
- package/lib/mui-controls/MuiInputText.js +9 -9
- package/lib/mui-controls/MuiInputText.js.map +1 -1
- package/lib/mui-controls/MuiInputTime.js +2 -2
- package/lib/mui-controls/MuiInputTime.js.map +1 -1
- package/lib/mui-controls/MuiSelect.js +2 -3
- package/lib/mui-controls/MuiSelect.js.map +1 -1
- package/lib/mui-controls/MuiToggle.js +2 -2
- package/lib/mui-controls/MuiToggle.js.map +1 -1
- package/lib/util/layout.js +4 -4
- package/lib/util/layout.js.map +1 -1
- package/lib/util/theme.d.ts +1 -1
- package/package.json +17 -20
- 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/complex/DeleteDialog.tsx +2 -2
- package/src/complex/MaterialAllOfRenderer.tsx +1 -1
- package/src/complex/MaterialAnyOfRenderer.tsx +1 -1
- package/src/complex/MaterialArrayControlRenderer.tsx +1 -1
- package/src/complex/MaterialEnumArrayRenderer.tsx +1 -1
- package/src/complex/MaterialObjectRenderer.tsx +1 -1
- package/src/complex/MaterialOneOfRenderer.tsx +1 -1
- package/src/complex/MaterialTableControl.tsx +9 -13
- 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 +1 -2
- package/src/controls/MaterialBooleanControl.tsx +1 -1
- package/src/controls/MaterialBooleanToggleControl.tsx +1 -1
- package/src/controls/MaterialDateControl.tsx +28 -29
- package/src/controls/MaterialDateTimeControl.tsx +28 -33
- package/src/controls/MaterialEnumControl.tsx +1 -1
- package/src/controls/MaterialInputControl.tsx +3 -2
- package/src/controls/MaterialNativeControl.tsx +1 -2
- package/src/controls/MaterialOneOfEnumControl.tsx +1 -1
- package/src/controls/MaterialOneOfRadioGroupControl.tsx +4 -4
- package/src/controls/MaterialRadioGroup.tsx +7 -5
- package/src/controls/MaterialRadioGroupControl.tsx +1 -1
- package/src/controls/MaterialSliderControl.tsx +1 -1
- package/src/controls/MaterialTimeControl.tsx +28 -23
- package/src/extended/MuiAutocomplete.tsx +9 -6
- package/src/extended/index.ts +1 -1
- package/src/layouts/ArrayToolbar.tsx +11 -7
- package/src/layouts/ExpandPanelRenderer.tsx +17 -15
- package/src/layouts/MaterialArrayLayoutRenderer.tsx +1 -1
- package/src/layouts/MaterialCategorizationLayout.tsx +2 -3
- package/src/layouts/MaterialCategorizationStepperLayout.tsx +1 -1
- package/src/layouts/MaterialGroupLayout.tsx +1 -1
- package/src/mui-controls/MuiCheckbox.tsx +1 -1
- package/src/mui-controls/MuiInputInteger.tsx +1 -1
- package/src/mui-controls/MuiInputNumber.tsx +1 -1
- package/src/mui-controls/MuiInputNumberFormat.tsx +1 -1
- package/src/mui-controls/MuiInputText.tsx +14 -7
- package/src/mui-controls/MuiInputTime.tsx +1 -1
- package/src/mui-controls/MuiSelect.tsx +2 -2
- package/src/mui-controls/MuiToggle.tsx +1 -1
- package/src/util/layout.tsx +1 -1
- package/src/util/theme.ts +1 -1
- package/test/renderers/MaterialAllOfRenderer.test.tsx +1 -1
- package/test/renderers/MaterialAnyOfRenderer.test.tsx +1 -1
- package/test/renderers/MaterialAnyOfStringOrEnumControl.test.tsx +1 -1
- package/test/renderers/MaterialArrayControl.test.tsx +1 -1
- package/test/renderers/MaterialArrayLayout.test.tsx +2 -2
- 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 +2 -2
- package/test/renderers/MaterialCategorizationStepperLayout.test.tsx +2 -2
- 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 +1 -1
- package/test/renderers/MaterialEnumCell.test.tsx +1 -1
- package/test/renderers/MaterialGroupLayout.test.tsx +1 -1
- package/test/renderers/MaterialInputControl.test.tsx +1 -1
- package/test/renderers/MaterialIntegerCell.test.tsx +1 -1
- 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 +1 -1
- 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 +10 -7
- package/test/renderers/MaterialRadioGroupControl.test.tsx +1 -1
- package/test/renderers/MaterialSliderControl.test.tsx +2 -2
- package/test/renderers/MaterialTextCell.test.tsx +6 -13
- package/test/renderers/MaterialTextControl.test.tsx +8 -4
- package/test/renderers/MaterialTimeCell.test.tsx +1 -1
- package/test/renderers/MaterialTimeControl.test.tsx +5 -3
- package/webpack/webpack.build.js +3 -3
- package/example/CustomAutocomplete.tsx +0 -54
|
@@ -27,13 +27,13 @@ var tslib_1 = require("tslib");
|
|
|
27
27
|
THE SOFTWARE.
|
|
28
28
|
*/
|
|
29
29
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
30
|
-
var
|
|
30
|
+
var material_1 = require("@mui/material");
|
|
31
31
|
var merge_1 = tslib_1.__importDefault(require("lodash/merge"));
|
|
32
32
|
exports.MuiToggle = react_1.default.memo(function (props) {
|
|
33
33
|
var data = props.data, className = props.className, id = props.id, enabled = props.enabled, uischema = props.uischema, path = props.path, handleChange = props.handleChange, config = props.config;
|
|
34
34
|
var appliedUiSchemaOptions = merge_1.default({}, config, uischema.options);
|
|
35
35
|
var inputProps = { autoFocus: !!appliedUiSchemaOptions.focus };
|
|
36
36
|
var checked = !!data;
|
|
37
|
-
return (react_1.default.createElement(
|
|
37
|
+
return (react_1.default.createElement(material_1.Switch, { checked: checked, onChange: function (_ev, isChecked) { return handleChange(path, isChecked); }, className: className, id: id, disabled: !enabled, inputProps: inputProps }));
|
|
38
38
|
});
|
|
39
39
|
//# sourceMappingURL=MuiToggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiToggle.js","sourceRoot":"","sources":["../../src/mui-controls/MuiToggle.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,wDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"MuiToggle.js","sourceRoot":"","sources":["../../src/mui-controls/MuiToggle.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,wDAA0B;AAE1B,0CAAuC;AACvC,+DAAiC;AAEpB,QAAA,SAAS,GAAG,eAAK,CAAC,IAAI,CAAC,UAAC,KAAgC;IAEjE,IAAA,IAAI,GAQF,KAAK,KARH,EACJ,SAAS,GAOP,KAAK,UAPE,EACT,EAAE,GAMA,KAAK,GANL,EACF,OAAO,GAKL,KAAK,QALA,EACP,QAAQ,GAIN,KAAK,SAJC,EACR,IAAI,GAGF,KAAK,KAHH,EACJ,YAAY,GAEV,KAAK,aAFK,EACZ,MAAM,GACJ,KAAK,OADD,CACE;IACV,IAAM,sBAAsB,GAAG,eAAK,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnE,IAAM,UAAU,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;IACjE,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC;IAEvB,OAAO,CACL,8BAAC,iBAAM,IACL,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAC,GAAG,EAAE,SAAS,IAAK,OAAA,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,EAA7B,CAA6B,EAC3D,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,CAAC,OAAO,EAClB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/util/layout.js
CHANGED
|
@@ -30,9 +30,9 @@ var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
|
|
|
30
30
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
31
31
|
var core_1 = require("@jsonforms/core");
|
|
32
32
|
var react_2 = require("@jsonforms/react");
|
|
33
|
-
var
|
|
33
|
+
var material_1 = require("@mui/material");
|
|
34
34
|
var renderLayoutElements = function (elements, schema, path, enabled, renderers, cells) {
|
|
35
|
-
return elements.map(function (child, index) { return (react_1.default.createElement(
|
|
35
|
+
return elements.map(function (child, index) { return (react_1.default.createElement(material_1.Grid, { item: true, key: path + "-" + index, xs: true },
|
|
36
36
|
react_1.default.createElement(react_2.JsonFormsDispatch, { uischema: child, schema: schema, path: path, enabled: enabled, renderers: renderers, cells: cells }))); });
|
|
37
37
|
};
|
|
38
38
|
exports.renderLayoutElements = renderLayoutElements;
|
|
@@ -42,8 +42,8 @@ var MaterialLayoutRendererComponent = function (_a) {
|
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
return (react_1.default.createElement(
|
|
46
|
-
react_1.default.createElement(
|
|
45
|
+
return (react_1.default.createElement(material_1.Hidden, { xsUp: !visible },
|
|
46
|
+
react_1.default.createElement(material_1.Grid, { container: true, direction: direction, spacing: direction === 'row' ? 2 : 0 }, exports.renderLayoutElements(elements, schema, path, enabled, renderers, cells))));
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
exports.MaterialLayoutRenderer = react_1.default.memo(MaterialLayoutRendererComponent);
|
package/lib/util/layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/util/layout.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,mEAAqC;AACrC,wDAA0B;AAG1B,wCAOyB;AACzB,0CAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/util/layout.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,mEAAqC;AACrC,wDAA0B;AAG1B,wCAOyB;AACzB,0CAAmE;AACnE,0CAA6C;AAEtC,IAAM,oBAAoB,GAAG,UAClC,QAA2B,EAC3B,MAAkB,EAClB,IAAY,EACZ,OAAgB,EAChB,SAA4C,EAC5C,KAA4C;IAE5C,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,CACpC,8BAAC,eAAI,IAAC,IAAI,QAAC,GAAG,EAAK,IAAI,SAAI,KAAO,EAAE,EAAE;QACpC,8BAAC,yBAAiB,IAChB,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACZ,CACG,CACR,EAXqC,CAWrC,CAAC,CAAC;AACL,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B;AAMF,IAAM,+BAA+B,GACnC,UAAC,EAS6B;QAR5B,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,SAAS,eAAA,EACT,SAAS,eAAA,EACT,KAAK,WAAA;IAEL,IAAI,iBAAO,CAAC,QAAQ,CAAC,EAAE;QACrB,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,CACL,8BAAC,iBAAM,IAAC,IAAI,EAAE,CAAC,OAAO;YACpB,8BAAC,eAAI,IACH,SAAS,QACT,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAEnC,4BAAoB,CACnB,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,EACT,KAAK,CACN,CACI,CACA,CACV,CAAC;KACH;AACH,CAAC,CAAC;AACS,QAAA,sBAAsB,GAAG,eAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;AAM3E,IAAM,YAAY,GAAG,UAAe,SAAsC;IAC/E,OAAA,UAAC,KAAQ;QACP,IAAM,GAAG,GAAG,oBAAY,EAAE,CAAC;QAC3B,IAAM,GAAG,GAAG,aAAM,CAAC,EAAC,SAAS,uBAAM,GAAG,CAAC,EAAC,CAAC,CAAC;QAE1C,OAAO,CAAC,8BAAC,SAAS,uBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;AALD,CAKC,CAAC;AANS,QAAA,YAAY,gBAMrB"}
|
package/lib/util/theme.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonforms/material-renderers",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.3",
|
|
4
4
|
"description": "Material Renderer Set for JSON Forms",
|
|
5
5
|
"repository": "https://github.com/eclipsesource/jsonforms",
|
|
6
6
|
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
|
|
@@ -71,32 +71,29 @@
|
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@jsonforms/core": "^3.0.0-alpha.0",
|
|
73
73
|
"@jsonforms/react": "^3.0.0-alpha.0",
|
|
74
|
-
"@material
|
|
75
|
-
"@
|
|
76
|
-
"@material
|
|
77
|
-
},
|
|
78
|
-
"optionalPeerDependencies": {
|
|
79
|
-
"@material-ui/lab": "^4.0.0-alpha.56"
|
|
74
|
+
"@mui/icons-material": "^5.0.0",
|
|
75
|
+
"@mui/lab": "^5.0.0-alpha.54",
|
|
76
|
+
"@mui/material": "^5.0.0"
|
|
80
77
|
},
|
|
81
78
|
"devDependencies": {
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@material
|
|
87
|
-
"@
|
|
79
|
+
"@emotion/react": "^11.5.0",
|
|
80
|
+
"@emotion/styled": "^11.3.0",
|
|
81
|
+
"@jsonforms/core": "^3.0.0-alpha.3",
|
|
82
|
+
"@jsonforms/react": "^3.0.0-alpha.3",
|
|
83
|
+
"@mui/icons-material": "^5.2.0",
|
|
84
|
+
"@mui/lab": "^5.0.0-alpha.58",
|
|
85
|
+
"@mui/material": "^5.2.2",
|
|
88
86
|
"@types/enzyme": "^3.10.3",
|
|
89
|
-
"@types/
|
|
90
|
-
"@
|
|
87
|
+
"@types/react-dom": "^17.0.9",
|
|
88
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
|
|
91
89
|
"copy-webpack-plugin": "^5.0.5",
|
|
92
90
|
"enzyme": "^3.10.0",
|
|
93
|
-
"
|
|
94
|
-
"jest": "^24.9.0",
|
|
91
|
+
"jest": "^26.6.3",
|
|
95
92
|
"nyc": "^14.1.1",
|
|
96
|
-
"react-dom": "^
|
|
93
|
+
"react-dom": "^17.0.2",
|
|
97
94
|
"rimraf": "^3.0.2",
|
|
98
95
|
"source-map-loader": "^0.2.4",
|
|
99
|
-
"ts-jest": "^
|
|
96
|
+
"ts-jest": "^26.4.4",
|
|
100
97
|
"ts-loader": "^6.2.1",
|
|
101
98
|
"tslint": "^5.20.1",
|
|
102
99
|
"tslint-loader": "^3.5.4",
|
|
@@ -106,5 +103,5 @@
|
|
|
106
103
|
"webpack-cli": "^3.2.1",
|
|
107
104
|
"webpack-dev-server": "^3.9.0"
|
|
108
105
|
},
|
|
109
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "81f1f19dac49b1864e712e9abbc5c5c6355a2b91"
|
|
110
107
|
}
|
|
@@ -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,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;
|
|
@@ -34,7 +34,7 @@ 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
40
|
export const 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) => {
|
|
@@ -32,7 +32,7 @@ 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
38
|
export const MaterialObjectRenderer = ({
|
|
@@ -36,13 +36,14 @@ 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';
|
|
@@ -287,17 +287,13 @@ const NonEmptyRowComponent =
|
|
|
287
287
|
<Grid
|
|
288
288
|
container
|
|
289
289
|
direction='row'
|
|
290
|
-
|
|
290
|
+
justifyContent='flex-end'
|
|
291
291
|
alignItems='center'
|
|
292
292
|
>
|
|
293
293
|
{showSortButtons ? (
|
|
294
294
|
<Fragment>
|
|
295
295
|
<Grid item>
|
|
296
|
-
<IconButton
|
|
297
|
-
aria-label={`Move up`}
|
|
298
|
-
onClick={moveUp}
|
|
299
|
-
disabled={!enableUp}
|
|
300
|
-
>
|
|
296
|
+
<IconButton aria-label={`Move up`} onClick={moveUp} disabled={!enableUp} size='large'>
|
|
301
297
|
<ArrowUpward />
|
|
302
298
|
</IconButton>
|
|
303
299
|
</Grid>
|
|
@@ -306,7 +302,7 @@ const NonEmptyRowComponent =
|
|
|
306
302
|
aria-label={`Move down`}
|
|
307
303
|
onClick={moveDown}
|
|
308
304
|
disabled={!enableDown}
|
|
309
|
-
|
|
305
|
+
size='large'>
|
|
310
306
|
<ArrowDownward />
|
|
311
307
|
</IconButton>
|
|
312
308
|
</Grid>
|
|
@@ -316,7 +312,7 @@ const NonEmptyRowComponent =
|
|
|
316
312
|
<IconButton
|
|
317
313
|
aria-label={`Delete`}
|
|
318
314
|
onClick={() => openDeleteDialog(childPath, rowIndex)}
|
|
319
|
-
|
|
315
|
+
size='large'>
|
|
320
316
|
<DeleteIcon />
|
|
321
317
|
</IconButton>
|
|
322
318
|
</Grid>
|
|
@@ -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,8 +35,7 @@ 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
40
|
import React, { useMemo } from 'react';
|
|
42
41
|
import { useDebouncedChange } from '../util';
|
|
@@ -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 = ({
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
and
|
|
34
34
|
} from '@jsonforms/core';
|
|
35
35
|
import { withJsonFormsControlProps } from '@jsonforms/react';
|
|
36
|
-
import { FormControlLabel, Hidden } from '@material
|
|
36
|
+
import { FormControlLabel, Hidden } from '@mui/material';
|
|
37
37
|
import { MuiToggle } from '../mui-controls/MuiToggle';
|
|
38
38
|
|
|
39
39
|
export const MaterialBooleanToggleControl = ({
|
|
@@ -32,15 +32,12 @@ import {
|
|
|
32
32
|
rankWith,
|
|
33
33
|
} from '@jsonforms/core';
|
|
34
34
|
import { withJsonFormsControlProps } from '@jsonforms/react';
|
|
35
|
-
import { FormHelperText, Hidden } from '@material
|
|
36
|
-
import KeyboardArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft';
|
|
37
|
-
import KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight';
|
|
38
|
-
import EventIcon from '@material-ui/icons/Event';
|
|
35
|
+
import { FormHelperText, Hidden, TextField } from '@mui/material';
|
|
39
36
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} from '@
|
|
43
|
-
import
|
|
37
|
+
DatePicker,
|
|
38
|
+
LocalizationProvider
|
|
39
|
+
} from '@mui/lab';
|
|
40
|
+
import AdapterDayjs from '@mui/lab/AdapterDayjs';
|
|
44
41
|
import { createOnChangeHandler, getData, useFocus } from '../util';
|
|
45
42
|
|
|
46
43
|
export const MaterialDateControl = (props: ControlProps)=> {
|
|
@@ -85,32 +82,34 @@ export const MaterialDateControl = (props: ControlProps)=> {
|
|
|
85
82
|
|
|
86
83
|
return (
|
|
87
84
|
<Hidden xsUp={!visible}>
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
id={id + '-input'}
|
|
91
|
-
required={required && !appliedUiSchemaOptions.hideRequiredAsterisk}
|
|
85
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
86
|
+
<DatePicker
|
|
92
87
|
label={label}
|
|
93
|
-
error={!isValid}
|
|
94
|
-
fullWidth={!appliedUiSchemaOptions.trim}
|
|
95
|
-
InputLabelProps={data ? { shrink: true } : undefined}
|
|
96
88
|
value={getData(data, saveFormat)}
|
|
97
89
|
clearable
|
|
98
90
|
onChange={onChange}
|
|
99
|
-
|
|
91
|
+
inputFormat={format}
|
|
92
|
+
disableMaskedInput
|
|
100
93
|
views={appliedUiSchemaOptions.views}
|
|
101
94
|
disabled={!enabled}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
95
|
+
cancelText={appliedUiSchemaOptions.cancelLabel}
|
|
96
|
+
clearText={appliedUiSchemaOptions.clearLabel}
|
|
97
|
+
okText={appliedUiSchemaOptions.okLabel}
|
|
98
|
+
renderInput={params => (
|
|
99
|
+
<TextField
|
|
100
|
+
{...params}
|
|
101
|
+
id={id + '-input'}
|
|
102
|
+
required={required && !appliedUiSchemaOptions.hideRequiredAsterisk}
|
|
103
|
+
autoFocus={appliedUiSchemaOptions.focus}
|
|
104
|
+
error={!isValid}
|
|
105
|
+
fullWidth={!appliedUiSchemaOptions.trim}
|
|
106
|
+
inputProps={{ ...params.inputProps, type: 'text' }}
|
|
107
|
+
InputLabelProps={data ? { shrink: true } : undefined}
|
|
108
|
+
onFocus={onFocus}
|
|
109
|
+
onBlur={onBlur}
|
|
110
|
+
variant={'standard'}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
114
113
|
/>
|
|
115
114
|
<FormHelperText error={!isValid && !showDescription}>
|
|
116
115
|
{firstFormHelperText}
|
|
@@ -118,7 +117,7 @@ export const MaterialDateControl = (props: ControlProps)=> {
|
|
|
118
117
|
<FormHelperText error={!isValid}>
|
|
119
118
|
{secondFormHelperText}
|
|
120
119
|
</FormHelperText>
|
|
121
|
-
</
|
|
120
|
+
</LocalizationProvider>
|
|
122
121
|
</Hidden>
|
|
123
122
|
);
|
|
124
123
|
};
|