@jsonforms/material-renderers 3.3.0-alpha.1 → 3.3.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.
Files changed (108) hide show
  1. package/lib/additional/ListWithDetailMasterItem.d.ts +5 -5
  2. package/lib/additional/MaterialLabelRenderer.d.ts +13 -13
  3. package/lib/additional/MaterialListWithDetailRenderer.d.ts +6 -6
  4. package/lib/additional/index.d.ts +4 -4
  5. package/lib/additional/unwrapped.d.ts +5 -5
  6. package/lib/cells/CustomizableCells.d.ts +9 -9
  7. package/lib/cells/MaterialBooleanCell.d.ts +6 -6
  8. package/lib/cells/MaterialBooleanToggleCell.d.ts +6 -6
  9. package/lib/cells/MaterialDateCell.d.ts +7 -7
  10. package/lib/cells/MaterialEnumCell.d.ts +11 -11
  11. package/lib/cells/MaterialIntegerCell.d.ts +6 -6
  12. package/lib/cells/MaterialNumberCell.d.ts +10 -10
  13. package/lib/cells/MaterialNumberFormatCell.d.ts +10 -10
  14. package/lib/cells/MaterialOneOfEnumCell.d.ts +11 -11
  15. package/lib/cells/MaterialTextCell.d.ts +10 -10
  16. package/lib/cells/MaterialTimeCell.d.ts +6 -6
  17. package/lib/cells/index.d.ts +13 -13
  18. package/lib/complex/CombinatorProperties.d.ts +12 -12
  19. package/lib/complex/DeleteDialog.d.ts +15 -15
  20. package/lib/complex/MaterialAllOfRenderer.d.ts +6 -6
  21. package/lib/complex/MaterialAnyOfRenderer.d.ts +6 -6
  22. package/lib/complex/MaterialArrayControlRenderer.d.ts +6 -6
  23. package/lib/complex/MaterialEnumArrayRenderer.d.ts +6 -6
  24. package/lib/complex/MaterialObjectRenderer.d.ts +6 -6
  25. package/lib/complex/MaterialOneOfRenderer.d.ts +9 -9
  26. package/lib/complex/MaterialTableControl.d.ts +27 -27
  27. package/lib/complex/NoBorderTableCell.d.ts +3 -3
  28. package/lib/complex/TabSwitchConfirmDialog.d.ts +9 -9
  29. package/lib/complex/TableToolbar.d.ts +17 -17
  30. package/lib/complex/ValidationIcon.d.ts +7 -7
  31. package/lib/complex/index.d.ts +14 -14
  32. package/lib/complex/unwrapped.d.ts +9 -9
  33. package/lib/controls/MaterialAnyOfStringOrEnumControl.d.ts +9 -9
  34. package/lib/controls/MaterialBooleanControl.d.ts +6 -6
  35. package/lib/controls/MaterialBooleanToggleControl.d.ts +6 -6
  36. package/lib/controls/MaterialDateControl.d.ts +6 -6
  37. package/lib/controls/MaterialDateTimeControl.d.ts +6 -6
  38. package/lib/controls/MaterialEnumControl.d.ts +8 -8
  39. package/lib/controls/MaterialInputControl.d.ts +6 -6
  40. package/lib/controls/MaterialIntegerControl.d.ts +6 -6
  41. package/lib/controls/MaterialNativeControl.d.ts +6 -6
  42. package/lib/controls/MaterialNumberControl.d.ts +6 -6
  43. package/lib/controls/MaterialOneOfEnumControl.d.ts +8 -8
  44. package/lib/controls/MaterialOneOfRadioGroupControl.d.ts +6 -6
  45. package/lib/controls/MaterialRadioGroup.d.ts +3 -3
  46. package/lib/controls/MaterialRadioGroupControl.d.ts +6 -6
  47. package/lib/controls/MaterialSliderControl.d.ts +6 -6
  48. package/lib/controls/MaterialTextControl.d.ts +6 -6
  49. package/lib/controls/MaterialTimeControl.d.ts +6 -6
  50. package/lib/controls/index.d.ts +17 -17
  51. package/lib/controls/unwrapped.d.ts +19 -19
  52. package/lib/index.d.ts +42 -42
  53. package/lib/jsonforms-react-material.cjs.js +144 -83
  54. package/lib/jsonforms-react-material.cjs.js.map +1 -1
  55. package/lib/jsonforms-react-material.esm.js +149 -85
  56. package/lib/jsonforms-react-material.esm.js.map +1 -1
  57. package/lib/layouts/ArrayToolbar.d.ts +13 -13
  58. package/lib/layouts/ExpandPanelRenderer.d.ts +58 -54
  59. package/lib/layouts/MaterialArrayLayout.d.ts +3 -3
  60. package/lib/layouts/MaterialArrayLayoutRenderer.d.ts +6 -6
  61. package/lib/layouts/MaterialCategorizationLayout.d.ts +18 -18
  62. package/lib/layouts/MaterialCategorizationStepperLayout.d.ts +14 -14
  63. package/lib/layouts/MaterialGroupLayout.d.ts +7 -7
  64. package/lib/layouts/MaterialHorizontalLayout.d.ts +10 -10
  65. package/lib/layouts/MaterialVerticalLayout.d.ts +10 -10
  66. package/lib/layouts/index.d.ts +8 -8
  67. package/lib/layouts/unwrapped.d.ts +10 -10
  68. package/lib/mui-controls/MuiAutocomplete.d.ts +9 -9
  69. package/lib/mui-controls/MuiCheckbox.d.ts +8 -8
  70. package/lib/mui-controls/MuiInputInteger.d.ts +4 -4
  71. package/lib/mui-controls/MuiInputNumber.d.ts +4 -4
  72. package/lib/mui-controls/MuiInputNumberFormat.d.ts +4 -4
  73. package/lib/mui-controls/MuiInputText.d.ts +10 -10
  74. package/lib/mui-controls/MuiInputTime.d.ts +4 -4
  75. package/lib/mui-controls/MuiSelect.d.ts +5 -5
  76. package/lib/mui-controls/MuiToggle.d.ts +8 -8
  77. package/lib/mui-controls/index.d.ts +9 -9
  78. package/lib/util/datejs.d.ts +5 -5
  79. package/lib/util/debounce.d.ts +1 -1
  80. package/lib/util/focus.d.ts +1 -1
  81. package/lib/util/i18nDefaults.d.ts +3 -3
  82. package/lib/util/index.d.ts +6 -6
  83. package/lib/util/layout.d.ts +17 -17
  84. package/lib/util/theme.d.ts +17 -17
  85. package/package.json +6 -6
  86. package/src/additional/ListWithDetailMasterItem.tsx +13 -6
  87. package/src/additional/MaterialLabelRenderer.tsx +5 -6
  88. package/src/additional/MaterialListWithDetailRenderer.tsx +10 -4
  89. package/src/complex/MaterialAllOfRenderer.tsx +14 -12
  90. package/src/complex/MaterialAnyOfRenderer.tsx +7 -3
  91. package/src/complex/MaterialArrayControlRenderer.tsx +6 -3
  92. package/src/complex/MaterialEnumArrayRenderer.tsx +56 -55
  93. package/src/complex/MaterialObjectRenderer.tsx +14 -12
  94. package/src/complex/MaterialOneOfRenderer.tsx +7 -3
  95. package/src/complex/MaterialTableControl.tsx +34 -33
  96. package/src/controls/MaterialBooleanControl.tsx +7 -8
  97. package/src/controls/MaterialBooleanToggleControl.tsx +7 -8
  98. package/src/controls/MaterialInputControl.tsx +32 -30
  99. package/src/controls/MaterialNativeControl.tsx +23 -21
  100. package/src/controls/MaterialRadioGroup.tsx +39 -38
  101. package/src/controls/MaterialSliderControl.tsx +44 -43
  102. package/src/layouts/ExpandPanelRenderer.tsx +48 -11
  103. package/src/layouts/MaterialArrayLayoutRenderer.tsx +6 -4
  104. package/src/layouts/MaterialCategorizationLayout.tsx +7 -3
  105. package/src/layouts/MaterialCategorizationStepperLayout.tsx +8 -3
  106. package/src/layouts/MaterialGroupLayout.tsx +17 -14
  107. package/src/mui-controls/MuiAutocomplete.tsx +6 -3
  108. package/src/util/layout.tsx +16 -18
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useCallback, useMemo, Fragment, useEffect } from 'react';
2
- import { Hidden, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Tabs, Tab, TableCell, styled as styled$1, Badge, Tooltip, TableRow, Stack, Grid, Typography, FormHelperText, IconButton, Table, TableHead, TableBody, Autocomplete, TextField, Checkbox, useThemeProps, Input, FilledInput, OutlinedInput, useTheme, InputAdornment, Select, MenuItem, Switch, FormControl, FormLabel, FormGroup, FormControlLabel, Toolbar, ListItem, ListItemAvatar, Avatar, ListItemText, ListItemSecondaryAction, List, InputLabel, RadioGroup, Radio, Slider, Accordion, AccordionSummary, AccordionDetails, Card, CardHeader, CardContent, AppBar, Stepper, Step, StepButton } from '@mui/material';
3
- import { rankWith, isAllOfControl, findMatchingUISchema, createCombinatorRenderInfos, Generate, isLayout, isAnyOfControl, createDefaultValue, Resolve, encode, Paths, formatErrorMessage, errorsAt, or, isObjectArrayControl, isPrimitiveArrayControl, isDescriptionHidden, getAjv, and, uiTypeIs, schemaMatches, hasType, schemaSubPathMatches, resolveSchema, showAsRequired, isObjectControl, findUISchema, isOneOfControl, isObjectArray, computeLabel, composePaths, isBooleanControl, optionIs, isDateControl, defaultDateFormat, isDateTimeControl, defaultDateTimeFormat, isEnumControl, isIntegerControl, isTimeControl, isNumberControl, isOneOfEnumControl, isRangeControl, isStringControl, defaultTimeFormat, createId, removeId, update, moveUp, moveDown, getFirstPrimitiveProp, withIncreasedRank, isVisible, deriveLabelForUISchemaElement, isObjectArrayWithNesting, isNumberFormatControl, categorizationHasCategory } from '@jsonforms/core';
2
+ import { rankWith, isAllOfControl, findMatchingUISchema, createCombinatorRenderInfos, Generate, isLayout, isAnyOfControl, createDefaultValue, Resolve, encode, Paths, formatErrorMessage, errorsAt, or, isObjectArrayControl, isPrimitiveArrayControl, isDescriptionHidden, getAjv, and, uiTypeIs, schemaMatches, hasType, schemaSubPathMatches, resolveSchema, showAsRequired, isObjectControl, findUISchema, isOneOfControl, isObjectArray, computeLabel, composePaths, isBooleanControl, optionIs, isDateControl, defaultDateFormat, isDateTimeControl, defaultDateTimeFormat, isEnumControl, isIntegerControl, isTimeControl, isNumberControl, isOneOfEnumControl, isRangeControl, isStringControl, defaultTimeFormat, createId, removeId, update, moveUp, moveDown, computeChildLabel, withIncreasedRank, isVisible, deriveLabelForUISchemaElement, isObjectArrayWithNesting, isNumberFormatControl, categorizationHasCategory } from '@jsonforms/core';
4
3
  import { withJsonFormsAllOfProps, JsonFormsDispatch, withJsonFormsAnyOfProps, DispatchCell, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsMultiEnumProps, withJsonFormsDetailProps, withJsonFormsOneOfProps, withJsonFormsLabelProps, withJsonFormsMasterListItemProps, withJsonFormsControlProps, Control, withJsonFormsEnumProps, withTranslateProps, withJsonFormsOneOfEnumProps, withJsonFormsContext, withJsonFormsLayoutProps, withJsonFormsCellProps, withJsonFormsEnumCellProps, withJsonFormsOneOfEnumCellProps } from '@jsonforms/react';
4
+ import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Tabs, Tab, TableCell, styled as styled$1, Badge, Tooltip, TableRow, Stack, Grid, Typography, FormHelperText, IconButton, Table, TableHead, TableBody, Autocomplete, TextField, Checkbox, useThemeProps, Input, FilledInput, OutlinedInput, useTheme, InputAdornment, Select, MenuItem, Switch, FormControl, FormLabel, FormGroup, FormControlLabel, Toolbar, ListItem, ListItemAvatar, Avatar, ListItemText, ListItemSecondaryAction, List, InputLabel, RadioGroup, Radio, Slider, Accordion, AccordionSummary, AccordionDetails, Card, CardHeader, CardContent, AppBar, Stepper, Step, StepButton } from '@mui/material';
5
5
  import omit from 'lodash/omit';
6
6
  import isEmpty from 'lodash/isEmpty';
7
7
  import union from 'lodash/union';
@@ -17,16 +17,17 @@ import map from 'lodash/map';
17
17
  import AddIcon from '@mui/icons-material/Add';
18
18
  import { LocalizationProvider, DatePicker, DateTimePicker, TimePicker } from '@mui/x-date-pickers';
19
19
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
20
- import get from 'lodash/get';
21
20
 
22
21
  const MaterialAllOfRenderer = ({ schema, rootSchema, visible, renderers, cells, path, uischemas, uischema, }) => {
23
22
  const delegateUISchema = findMatchingUISchema(uischemas)(schema, uischema.scope, path);
23
+ if (!visible) {
24
+ return null;
25
+ }
24
26
  if (delegateUISchema) {
25
- return (React.createElement(Hidden, { xsUp: !visible },
26
- React.createElement(JsonFormsDispatch, { schema: schema, uischema: delegateUISchema, path: path, renderers: renderers, cells: cells })));
27
+ return (React.createElement(JsonFormsDispatch, { schema: schema, uischema: delegateUISchema, path: path, renderers: renderers, cells: cells }));
27
28
  }
28
29
  const allOfRenderInfos = createCombinatorRenderInfos(schema.allOf, rootSchema, 'allOf', uischema, path, uischemas);
29
- return (React.createElement(Hidden, { xsUp: !visible }, allOfRenderInfos.map((allOfRenderInfo, allOfIndex) => (React.createElement(JsonFormsDispatch, { key: allOfIndex, schema: allOfRenderInfo.schema, uischema: allOfRenderInfo.uischema, path: path, renderers: renderers, cells: cells })))));
30
+ return (React.createElement(React.Fragment, null, allOfRenderInfos.map((allOfRenderInfo, allOfIndex) => (React.createElement(JsonFormsDispatch, { key: allOfIndex, schema: allOfRenderInfo.schema, uischema: allOfRenderInfo.uischema, path: path, renderers: renderers, cells: cells })))));
30
31
  };
31
32
  const materialAllOfControlTester = rankWith(3, isAllOfControl);
32
33
  var MaterialAllOfRenderer$1 = withJsonFormsAllOfProps(MaterialAllOfRenderer);
@@ -83,7 +84,10 @@ const MaterialAnyOfRenderer = ({ handleChange, schema, rootSchema, indexOfFittin
83
84
  }, [handleChange, createDefaultValue, newSelectedIndex]);
84
85
  const anyOf = 'anyOf';
85
86
  const anyOfRenderInfos = createCombinatorRenderInfos(schema.anyOf, rootSchema, anyOf, uischema, path, uischemas);
86
- return (React.createElement(Hidden, { xsUp: !visible },
87
+ if (!visible) {
88
+ return null;
89
+ }
90
+ return (React.createElement(React.Fragment, null,
87
91
  React.createElement(CombinatorProperties, { schema: schema, combinatorKeyword: anyOf, path: path, rootSchema: rootSchema }),
88
92
  React.createElement(Tabs, { value: selectedAnyOf, onChange: handleTabChange }, anyOfRenderInfos.map((anyOfRenderInfo) => (React.createElement(Tab, { key: anyOfRenderInfo.label, label: anyOfRenderInfo.label })))),
89
93
  anyOfRenderInfos.map((anyOfRenderInfo, anyOfIndex) => selectedAnyOf === anyOfIndex && (React.createElement(JsonFormsDispatch, { key: anyOfIndex, schema: anyOfRenderInfo.schema, uischema: anyOfRenderInfo.uischema, path: path, renderers: renderers, cells: cells }))),
@@ -259,15 +263,17 @@ class MaterialTableControl extends React.Component {
259
263
  const headerCells = isObjectSchema
260
264
  ? generateCells(TableHeaderCell, schema, path, enabled, cells)
261
265
  : undefined;
262
- return (React.createElement(Hidden, { xsUp: !visible },
263
- React.createElement(Table, null,
264
- React.createElement(TableHead, null,
265
- React.createElement(TableToolbar, { errors: errors, label: label, description: description, addItem: this.addItem, numColumns: isObjectSchema ? headerCells.length : 1, path: path, uischema: controlElement, schema: schema, rootSchema: rootSchema, enabled: enabled, translations: translations }),
266
- isObjectSchema && (React.createElement(TableRow, null,
267
- headerCells,
268
- enabled ? React.createElement(TableCell, null) : null))),
269
- React.createElement(TableBody, null,
270
- React.createElement(TableRows, { openDeleteDialog: openDeleteDialog, translations: translations, ...this.props })))));
266
+ if (!visible) {
267
+ return null;
268
+ }
269
+ return (React.createElement(Table, null,
270
+ React.createElement(TableHead, null,
271
+ React.createElement(TableToolbar, { errors: errors, label: label, description: description, addItem: this.addItem, numColumns: isObjectSchema ? headerCells.length : 1, path: path, uischema: controlElement, schema: schema, rootSchema: rootSchema, enabled: enabled, translations: translations }),
272
+ isObjectSchema && (React.createElement(TableRow, null,
273
+ headerCells,
274
+ enabled ? React.createElement(TableCell, null) : null))),
275
+ React.createElement(TableBody, null,
276
+ React.createElement(TableRows, { openDeleteDialog: openDeleteDialog, translations: translations, ...this.props }))));
271
277
  }
272
278
  }
273
279
 
@@ -298,7 +304,10 @@ const MaterialArrayControlRenderer = (props) => {
298
304
  setOpen(false);
299
305
  }, [setOpen, path, rowData]);
300
306
  const deleteClose = useCallback(() => setOpen(false), [setOpen]);
301
- return (React.createElement(Hidden, { xsUp: !visible },
307
+ if (!visible) {
308
+ return null;
309
+ }
310
+ return (React.createElement(React.Fragment, null,
302
311
  React.createElement(MaterialTableControl, { ...props, openDeleteDialog: openDeleteDialog }),
303
312
  React.createElement(DeleteDialog, { open: open, onCancel: deleteCancel, onConfirm: deleteConfirm, onClose: deleteClose, acceptText: props.translations.deleteDialogAccept, declineText: props.translations.deleteDialogDecline, title: props.translations.deleteDialogTitle, message: props.translations.deleteDialogMessage })));
304
313
  };
@@ -325,7 +334,10 @@ const MuiAutocomplete = (props) => {
325
334
  ? errors
326
335
  : null;
327
336
  const secondFormHelperText = showDescription && !isValid ? errors : null;
328
- return (React.createElement(Hidden, { xsUp: !visible },
337
+ if (!visible) {
338
+ return null;
339
+ }
340
+ return (React.createElement(React.Fragment, null,
329
341
  React.createElement(Autocomplete, { className: className, id: id, disabled: !enabled, value: findOption, onChange: (_event, newValue) => {
330
342
  handleChange(path, newValue?.value);
331
343
  }, inputValue: inputValue, onInputChange: (_event, newInputValue) => {
@@ -403,12 +415,11 @@ const renderLayoutElements = (elements, schema, path, enabled, renderers, cells)
403
415
  React.createElement(JsonFormsDispatch, { uischema: child, schema: schema, path: path, enabled: enabled, renderers: renderers, cells: cells }))));
404
416
  };
405
417
  const MaterialLayoutRendererComponent = ({ visible, elements, schema, path, enabled, direction, renderers, cells, }) => {
406
- if (isEmpty(elements)) {
418
+ if (isEmpty(elements) || !visible) {
407
419
  return null;
408
420
  }
409
421
  else {
410
- return (React.createElement(Hidden, { xsUp: !visible },
411
- React.createElement(Grid, { container: true, direction: direction, spacing: direction === 'row' ? 2 : 0 }, renderLayoutElements(elements, schema, path, enabled, renderers, cells))));
422
+ return (React.createElement(Grid, { container: true, direction: direction, spacing: direction === 'row' ? 2 : 0 }, renderLayoutElements(elements, schema, path, enabled, renderers, cells)));
412
423
  }
413
424
  };
414
425
  const MaterialLayoutRenderer = React.memo(MaterialLayoutRendererComponent);
@@ -570,19 +581,21 @@ const MaterialEnumArrayRenderer = ({ config, id, schema, visible, errors, descri
570
581
  const isValid = errors.length === 0;
571
582
  const appliedUiSchemaOptions = merge({}, config, otherProps.uischema.options);
572
583
  const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
573
- return (React.createElement(Hidden, { xsUp: !visible },
574
- React.createElement(FormControl, { component: 'fieldset', fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur },
575
- React.createElement(FormLabel, { error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
576
- React.createElement(FormGroup, { row: true }, options.map((option, index) => {
577
- const optionPath = Paths.compose(path, `${index}`);
578
- const checkboxValue = data?.includes(option.value)
579
- ? option.value
580
- : undefined;
581
- return (React.createElement(FormControlLabel, { id: id + '-label-' + option.value, key: option.value, control: React.createElement(MuiCheckbox, { id: id + '-' + option.value, key: 'checkbox-' + option.value, isValid: isEmpty(errors), path: optionPath, handleChange: (_childPath, newValue) => newValue
582
- ? addItem(path, option.value)
583
- : removeItem(path, option.value), data: checkboxValue, errors: errors, schema: schema, visible: visible, ...otherProps }), label: option.label }));
584
- })),
585
- React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null))));
584
+ if (!visible) {
585
+ return null;
586
+ }
587
+ return (React.createElement(FormControl, { component: 'fieldset', fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur },
588
+ React.createElement(FormLabel, { error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
589
+ React.createElement(FormGroup, { row: true }, options.map((option, index) => {
590
+ const optionPath = Paths.compose(path, `${index}`);
591
+ const checkboxValue = data?.includes(option.value)
592
+ ? option.value
593
+ : undefined;
594
+ return (React.createElement(FormControlLabel, { id: id + '-label-' + option.value, key: option.value, control: React.createElement(MuiCheckbox, { id: id + '-' + option.value, key: 'checkbox-' + option.value, isValid: isEmpty(errors), path: optionPath, handleChange: (_childPath, newValue) => newValue
595
+ ? addItem(path, option.value)
596
+ : removeItem(path, option.value), data: checkboxValue, errors: errors, schema: schema, visible: visible, ...otherProps }), label: option.label }));
597
+ })),
598
+ React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null)));
586
599
  };
587
600
  const hasOneOfItems = (schema) => schema.oneOf !== undefined &&
588
601
  schema.oneOf.length > 0 &&
@@ -607,8 +620,10 @@ const MaterialObjectRenderer = ({ renderers, cells, uischemas, schema, label, pa
607
620
  ...Generate.uiSchema(schema, 'Group', undefined, rootSchema),
608
621
  label,
609
622
  }, uischema, rootSchema), [uischemas, schema, uischema.scope, path, label, uischema, rootSchema]);
610
- return (React.createElement(Hidden, { xsUp: !visible },
611
- React.createElement(JsonFormsDispatch, { visible: visible, enabled: enabled, schema: schema, uischema: detailUiSchema, path: path, renderers: renderers, cells: cells })));
623
+ if (!visible) {
624
+ return null;
625
+ }
626
+ return (React.createElement(JsonFormsDispatch, { visible: visible, enabled: enabled, schema: schema, uischema: detailUiSchema, path: path, renderers: renderers, cells: cells }));
612
627
  };
613
628
  const materialObjectControlTester = rankWith(2, isObjectControl);
614
629
  var MaterialObjectRenderer$1 = withJsonFormsDetailProps(MaterialObjectRenderer);
@@ -639,7 +654,10 @@ const MaterialOneOfRenderer = ({ handleChange, schema, path, renderers, cells, r
639
654
  setConfirmDialogOpen(true);
640
655
  }
641
656
  }, [setConfirmDialogOpen, setSelectedIndex, data]);
642
- return (React.createElement(Hidden, { xsUp: !visible },
657
+ if (!visible) {
658
+ return null;
659
+ }
660
+ return (React.createElement(React.Fragment, null,
643
661
  React.createElement(CombinatorProperties, { schema: schema, combinatorKeyword: 'oneOf', path: path, rootSchema: rootSchema }),
644
662
  React.createElement(Tabs, { value: selectedIndex, onChange: handleTabChange }, oneOfRenderInfos.map((oneOfRenderInfo) => (React.createElement(Tab, { key: oneOfRenderInfo.label, label: oneOfRenderInfo.label })))),
645
663
  oneOfRenderInfos.map((oneOfRenderInfo, oneOfIndex) => selectedIndex === oneOfIndex && (React.createElement(JsonFormsDispatch, { key: oneOfIndex, schema: oneOfRenderInfo.schema, uischema: oneOfRenderInfo.uischema, path: path, renderers: renderers, cells: cells }))),
@@ -650,8 +668,10 @@ var MaterialOneOfRenderer$1 = withJsonFormsOneOfProps(MaterialOneOfRenderer);
650
668
 
651
669
  const materialLabelRendererTester = rankWith(1, uiTypeIs('Label'));
652
670
  const MaterialLabelRenderer = ({ text, visible }) => {
653
- return (React.createElement(Hidden, { xsUp: !visible },
654
- React.createElement(Typography, { variant: 'h6' }, text)));
671
+ if (!visible) {
672
+ return null;
673
+ }
674
+ return React.createElement(Typography, { variant: 'h6' }, text);
655
675
  };
656
676
  var MaterialLabelRenderer$1 = withJsonFormsLabelProps(MaterialLabelRenderer);
657
677
 
@@ -680,8 +700,9 @@ const ListWithDetailMasterItem = ({ index, childLabel, selected, enabled, handle
680
700
  React.createElement(Avatar, { "aria-label": 'Index' }, index + 1)),
681
701
  React.createElement(ListItemText, { primary: childLabel }),
682
702
  enabled && (React.createElement(ListItemSecondaryAction, null,
683
- React.createElement(IconButton, { "aria-label": translations.removeAriaLabel, onClick: removeItem(path, index), size: 'large' },
684
- React.createElement(Delete, null))))));
703
+ React.createElement(Tooltip, { id: 'tooltip-remove', title: translations.removeTooltip, placement: 'bottom' },
704
+ React.createElement(IconButton, { "aria-label": translations.removeAriaLabel, onClick: removeItem(path, index), size: 'large' },
705
+ React.createElement(Delete, null)))))));
685
706
  };
686
707
  var ListWithDetailMasterItem$1 = withJsonFormsMasterListItemProps(ListWithDetailMasterItem);
687
708
 
@@ -703,11 +724,14 @@ const MaterialListWithDetailRenderer = ({ uischemas, schema, uischema, path, ena
703
724
  React.useEffect(() => {
704
725
  setSelectedIndex(undefined);
705
726
  }, [schema]);
706
- return (React.createElement(Hidden, { xsUp: !visible },
727
+ if (!visible) {
728
+ return null;
729
+ }
730
+ return (React.createElement(React.Fragment, null,
707
731
  React.createElement(ArrayLayoutToolbar, { translations: translations, label: computeLabel(label, required, appliedUiSchemaOptions.hideRequiredAsterisk), description: description, errors: errors, path: path, enabled: enabled, addItem: addItem, createDefault: handleCreateDefaultValue }),
708
732
  React.createElement(Grid, { container: true, direction: 'row', spacing: 2 },
709
733
  React.createElement(Grid, { item: true, xs: 3 },
710
- React.createElement(List, null, data > 0 ? (map(range(data), (index) => (React.createElement(ListWithDetailMasterItem$1, { index: index, path: path, schema: schema, enabled: enabled, handleSelect: handleListItemClick, removeItem: handleRemoveItem, selected: selectedIndex === index, key: index, translations: translations })))) : (React.createElement("p", null, "No data")))),
734
+ React.createElement(List, null, data > 0 ? (map(range(data), (index) => (React.createElement(ListWithDetailMasterItem$1, { index: index, path: path, schema: schema, enabled: enabled, handleSelect: handleListItemClick, removeItem: handleRemoveItem, selected: selectedIndex === index, key: index, uischema: foundUISchema, childLabelProp: appliedUiSchemaOptions.elementLabelProp, translations: translations })))) : (React.createElement("p", null, translations.noDataMessage)))),
711
735
  React.createElement(Grid, { item: true, xs: true }, selectedIndex !== undefined ? (React.createElement(JsonFormsDispatch, { renderers: renderers, cells: cells, visible: visible, schema: schema, uischema: foundUISchema, path: composePaths(path, `${selectedIndex}`) })) : (React.createElement(Typography, { variant: 'h6' }, translations.noSelection))))));
712
736
  };
713
737
  const materialListWithDetailTester = rankWith(4, and(uiTypeIs('ListWithDetail'), isObjectArray));
@@ -727,12 +751,14 @@ const MaterialInputControl = (props) => {
727
751
  : null;
728
752
  const secondFormHelperText = showDescription && !isValid ? errors : null;
729
753
  const InnerComponent = input;
730
- return (React.createElement(Hidden, { xsUp: !visible },
731
- React.createElement(FormControl, { fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, variant: variant, id: id },
732
- React.createElement(InputLabel, { htmlFor: id + '-input', error: !isValid, required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
733
- React.createElement(InnerComponent, { ...props, id: id + '-input', isValid: isValid, visible: visible }),
734
- React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
735
- React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText))));
754
+ if (!visible) {
755
+ return null;
756
+ }
757
+ return (React.createElement(FormControl, { fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, variant: variant, id: id },
758
+ React.createElement(InputLabel, { htmlFor: id + '-input', error: !isValid, required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
759
+ React.createElement(InnerComponent, { ...props, id: id + '-input', isValid: isValid, visible: visible }),
760
+ React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
761
+ React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText)));
736
762
  };
737
763
 
738
764
  const findEnumSchema = (schemas) => schemas.find((s) => s.enum !== undefined && (s.type === 'string' || s.type === undefined));
@@ -805,7 +831,10 @@ const MaterialBooleanControl = ({ data, visible, label, id, enabled, uischema, s
805
831
  descriptionIds.push(helpId2);
806
832
  }
807
833
  const ariaDescribedBy = descriptionIds.join(' ');
808
- return (React.createElement(Hidden, { xsUp: !visible },
834
+ if (!visible) {
835
+ return null;
836
+ }
837
+ return (React.createElement(React.Fragment, null,
809
838
  React.createElement(Tooltip, { id: tooltipId, title: showTooltip ? description : '' },
810
839
  React.createElement(FormControlLabel, { label: label, id: id, control: React.createElement(MuiCheckbox, { id: `${id}-input`, isValid: isEmpty(errors), data: data, enabled: enabled, visible: visible, path: path, uischema: uischema, schema: schema, rootSchema: rootSchema, handleChange: handleChange, errors: errors, config: config, inputProps: {
811
840
  'aria-describedby': ariaDescribedBy,
@@ -845,7 +874,10 @@ const MaterialBooleanToggleControl = ({ data, visible, label, id, enabled, uisch
845
874
  descriptionIds.push(helpId2);
846
875
  }
847
876
  const ariaDescribedBy = descriptionIds.join(' ');
848
- return (React.createElement(Hidden, { xsUp: !visible },
877
+ if (!visible) {
878
+ return null;
879
+ }
880
+ return (React.createElement(React.Fragment, null,
849
881
  React.createElement(Tooltip, { id: tooltipId, title: showTooltip ? description : '' },
850
882
  React.createElement(FormControlLabel, { label: label, id: id, control: React.createElement(MuiToggle, { id: `${id}-input`, isValid: isEmpty(errors), data: data, enabled: enabled, visible: visible, path: path, uischema: uischema, schema: schema, rootSchema: rootSchema, handleChange: handleChange, errors: errors, config: config, inputProps: {
851
883
  'aria-describedby': ariaDescribedBy,
@@ -980,8 +1012,10 @@ const MaterialNativeControl = (props) => {
980
1012
  const [inputValue, onChange] = useDebouncedChange(handleChange, '', data, path);
981
1013
  const fieldType = appliedUiSchemaOptions.format ?? schema.format;
982
1014
  const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
983
- return (React.createElement(Hidden, { xsUp: !visible },
984
- React.createElement(TextField, { required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk), id: id + '-input', label: label, type: fieldType, error: !isValid, disabled: !enabled, fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, helperText: !isValid ? errors : showDescription ? description : null, InputLabelProps: { shrink: true }, value: inputValue, onChange: onChange })));
1015
+ if (!visible) {
1016
+ return null;
1017
+ }
1018
+ return (React.createElement(TextField, { required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk), id: id + '-input', label: label, type: fieldType, error: !isValid, disabled: !enabled, fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, helperText: !isValid ? errors : showDescription ? description : null, InputLabelProps: { shrink: true }, value: inputValue, onChange: onChange }));
985
1019
  };
986
1020
  const materialNativeControlTester = rankWith(2, or(isDateControl, isTimeControl));
987
1021
  var MaterialNativeControl$1 = withJsonFormsControlProps(MaterialNativeControl);
@@ -1005,11 +1039,13 @@ const MaterialRadioGroup = (props) => {
1005
1039
  const isValid = errors.length === 0;
1006
1040
  const appliedUiSchemaOptions = merge({}, config, props.uischema.options);
1007
1041
  const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
1008
- return (React.createElement(Hidden, { xsUp: !visible },
1009
- React.createElement(FormControl, { component: 'fieldset', fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur },
1010
- React.createElement(FormLabel, { error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
1011
- React.createElement(RadioGroup, { value: props.data ?? '', row: true }, options.map((option) => (React.createElement(FormControlLabel, { value: option.value, key: option.label, control: React.createElement(Radio, { checked: data === option.value, onChange: () => handleChange(path, option.value) }), label: option.label, disabled: !enabled })))),
1012
- React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null))));
1042
+ if (!visible) {
1043
+ return null;
1044
+ }
1045
+ return (React.createElement(FormControl, { component: 'fieldset', fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur },
1046
+ React.createElement(FormLabel, { error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) }, label),
1047
+ React.createElement(RadioGroup, { value: props.data ?? '', row: true }, options.map((option) => (React.createElement(FormControlLabel, { value: option.value, key: option.label, control: React.createElement(Radio, { checked: data === option.value, onChange: () => handleChange(path, option.value) }), label: option.label, disabled: !enabled })))),
1048
+ React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null)));
1013
1049
  };
1014
1050
 
1015
1051
  const MaterialOneOfRadioGroupControl = (props) => {
@@ -1046,15 +1082,17 @@ const MaterialSliderControl = (props) => {
1046
1082
  };
1047
1083
  const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
1048
1084
  const onChange = useCallback((_ev, value) => handleChange(path, Number(value)), [path, handleChange]);
1049
- return (React.createElement(Hidden, { xsUp: !visible },
1050
- React.createElement(FormControl, { fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, id: id },
1051
- React.createElement(FormLabel, { htmlFor: id, error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) },
1052
- React.createElement(Typography, { id: id + '-typo', style: labelStyle, variant: 'caption' }, label)),
1053
- React.createElement("div", { style: rangeContainerStyle },
1054
- React.createElement(Typography, { style: rangeItemStyle, variant: 'caption', align: 'left' }, schema.minimum),
1055
- React.createElement(Typography, { style: rangeItemStyle, variant: 'caption', align: 'right' }, schema.maximum)),
1056
- React.createElement(Slider, { style: sliderStyle, min: schema.minimum, max: schema.maximum, value: Number(data || schema.default), onChange: onChange, id: id + '-input', disabled: !enabled, step: schema.multipleOf || 1 }),
1057
- React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null))));
1085
+ if (!visible) {
1086
+ return null;
1087
+ }
1088
+ return (React.createElement(FormControl, { fullWidth: !appliedUiSchemaOptions.trim, onFocus: onFocus, onBlur: onBlur, id: id },
1089
+ React.createElement(FormLabel, { htmlFor: id, error: !isValid, component: 'legend', required: showAsRequired(required, appliedUiSchemaOptions.hideRequiredAsterisk) },
1090
+ React.createElement(Typography, { id: id + '-typo', style: labelStyle, variant: 'caption' }, label)),
1091
+ React.createElement("div", { style: rangeContainerStyle },
1092
+ React.createElement(Typography, { style: rangeItemStyle, variant: 'caption', align: 'left' }, schema.minimum),
1093
+ React.createElement(Typography, { style: rangeItemStyle, variant: 'caption', align: 'right' }, schema.maximum)),
1094
+ React.createElement(Slider, { style: sliderStyle, min: schema.minimum, max: schema.maximum, value: Number(data || schema.default), onChange: onChange, id: id + '-input', disabled: !enabled, step: schema.multipleOf || 1 }),
1095
+ React.createElement(FormHelperText, { error: !isValid }, !isValid ? errors : showDescription ? description : null)));
1058
1096
  };
1059
1097
  const materialSliderControlTester = rankWith(4, isRangeControl);
1060
1098
  var MaterialSliderControl$1 = withJsonFormsControlProps(MaterialSliderControl);
@@ -1181,15 +1219,31 @@ const ctxDispatchToExpandPanelProps = (dispatch) => ({
1181
1219
  }));
1182
1220
  }, [dispatch]),
1183
1221
  });
1184
- const withContextToExpandPanelProps = (Component) => function WithContextToExpandPanelProps({ ctx, props, }) {
1185
- const dispatchProps = ctxDispatchToExpandPanelProps(ctx.dispatch);
1186
- const { childLabelProp, schema, path, index, uischemas } = props;
1187
- const childPath = composePaths(path, `${index}`);
1188
- const childData = Resolve.data(ctx.core.data, childPath);
1189
- const childLabel = childLabelProp
1190
- ? get(childData, childLabelProp, '')
1191
- : get(childData, getFirstPrimitiveProp(schema), '');
1192
- return (React.createElement(Component, { ...props, ...dispatchProps, childLabel: childLabel, childPath: childPath, uischemas: uischemas }));
1222
+ const withContextToExpandPanelProps = (Component) => {
1223
+ return function WithContextToExpandPanelProps({ ctx, props, }) {
1224
+ const dispatchProps = ctxDispatchToExpandPanelProps(ctx.dispatch);
1225
+ const {
1226
+ childLabelProp,
1227
+ schema,
1228
+ uischema,
1229
+ rootSchema,
1230
+ path,
1231
+ index,
1232
+ uischemas, } = props;
1233
+ const childPath = composePaths(path, `${index}`);
1234
+ const childLabel = useMemo(() => {
1235
+ return computeChildLabel(ctx.core.data, childPath, childLabelProp, schema, rootSchema, ctx.i18n.translate, uischema);
1236
+ }, [
1237
+ ctx.core.data,
1238
+ childPath,
1239
+ childLabelProp,
1240
+ schema,
1241
+ rootSchema,
1242
+ ctx.i18n.translate,
1243
+ uischema,
1244
+ ]);
1245
+ return (React.createElement(Component, { ...props, ...dispatchProps, childLabel: childLabel, childPath: childPath, uischemas: uischemas }));
1246
+ };
1193
1247
  };
1194
1248
  const withJsonFormsExpandPanelProps = (Component) => withJsonFormsContext(withContextToExpandPanelProps(Component));
1195
1249
  var ExpandPanelRenderer$1 = withJsonFormsExpandPanelProps(ExpandPanelRenderer);
@@ -1198,11 +1252,13 @@ const groupTester = rankWith(1, uiTypeIs('Group'));
1198
1252
  const style = { marginBottom: '10px' };
1199
1253
  const GroupComponent = React.memo(function GroupComponent({ visible, enabled, uischema, label, ...props }) {
1200
1254
  const groupLayout = uischema;
1201
- return (React.createElement(Hidden, { xsUp: !visible },
1202
- React.createElement(Card, { style: style },
1203
- !isEmpty(label) && React.createElement(CardHeader, { title: label }),
1204
- React.createElement(CardContent, null,
1205
- React.createElement(MaterialLayoutRenderer, { ...props, visible: visible, enabled: enabled, elements: groupLayout.elements })))));
1255
+ if (!visible) {
1256
+ return null;
1257
+ }
1258
+ return (React.createElement(Card, { style: style },
1259
+ !isEmpty(label) && React.createElement(CardHeader, { title: label }),
1260
+ React.createElement(CardContent, null,
1261
+ React.createElement(MaterialLayoutRenderer, { ...props, visible: visible, enabled: enabled, elements: groupLayout.elements }))));
1206
1262
  });
1207
1263
  const MaterializedGroupLayoutRenderer = ({ uischema, schema, path, visible, enabled, renderers, cells, direction, label, }) => {
1208
1264
  const groupLayout = uischema;
@@ -1277,7 +1333,10 @@ const MaterialCategorizationLayoutRenderer = (props) => {
1277
1333
  const tabLabels = useMemo(() => {
1278
1334
  return categories.map((e) => deriveLabelForUISchemaElement(e, t));
1279
1335
  }, [categories, t]);
1280
- return (React.createElement(Hidden, { xsUp: !visible },
1336
+ if (!visible) {
1337
+ return null;
1338
+ }
1339
+ return (React.createElement(React.Fragment, null,
1281
1340
  React.createElement(AppBar, { position: 'static' },
1282
1341
  React.createElement(Tabs, { value: safeCategory, onChange: onTabChange, textColor: 'inherit', indicatorColor: 'secondary', variant: 'scrollable' }, categories.map((_, idx) => (React.createElement(Tab, { key: idx, label: tabLabels[idx] }))))),
1283
1342
  React.createElement("div", { style: { marginTop: '0.5em' } },
@@ -1304,8 +1363,10 @@ const MaterialArrayLayout$1 = React.memo(MaterialArrayLayoutComponent);
1304
1363
 
1305
1364
  const MaterialArrayLayoutRenderer = ({ visible, addItem, ...props }) => {
1306
1365
  const addItemCb = useCallback((p, value) => addItem(p, value), [addItem]);
1307
- return (React.createElement(Hidden, { xsUp: !visible },
1308
- React.createElement(MaterialArrayLayout$1, { visible: visible, addItem: addItemCb, ...props })));
1366
+ if (!visible) {
1367
+ return null;
1368
+ }
1369
+ return (React.createElement(MaterialArrayLayout$1, { visible: visible, addItem: addItemCb, ...props }));
1309
1370
  };
1310
1371
  const materialArrayLayoutTester = rankWith(4, isObjectArrayWithNesting);
1311
1372
  var MaterialArrayLayout = withJsonFormsArrayLayoutProps(MaterialArrayLayoutRenderer);
@@ -1405,7 +1466,10 @@ const MaterialCategorizationStepperLayoutRenderer = (props) => {
1405
1466
  const tabLabels = useMemo(() => {
1406
1467
  return categories.map((e) => deriveLabelForUISchemaElement(e, t));
1407
1468
  }, [categories, t]);
1408
- return (React.createElement(Hidden, { xsUp: !visible },
1469
+ if (!visible) {
1470
+ return null;
1471
+ }
1472
+ return (React.createElement(React.Fragment, null,
1409
1473
  React.createElement(Stepper, { activeStep: activeCategory, nonLinear: true }, categories.map((_, idx) => (React.createElement(Step, { key: tabLabels[idx] },
1410
1474
  React.createElement(StepButton, { onClick: () => handleStep(idx) }, tabLabels[idx]))))),
1411
1475
  React.createElement("div", null,