@jsonforms/material-renderers 3.0.0-rc.1 → 3.0.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.
@@ -1016,7 +1016,7 @@ const ExpandPanelRendererComponent = (props) => {
1016
1016
  removeId(labelHtmlId);
1017
1017
  };
1018
1018
  }, [labelHtmlId]);
1019
- const { childLabel, childPath, index, expanded, moveDown, moveUp, enableMoveDown, enableMoveUp, handleExpansion, removeItems, path, rootSchema, schema, uischema, uischemas, renderers, cells, config } = props;
1019
+ const { enabled, childLabel, childPath, index, expanded, moveDown, moveUp, enableMoveDown, enableMoveUp, handleExpansion, removeItems, path, rootSchema, schema, uischema, uischemas, renderers, cells, config } = props;
1020
1020
  const foundUISchema = useMemo(() => findUISchema(uischemas, schema, uischema.scope, path, undefined, uischema, rootSchema), [uischemas, schema, uischema.scope, path, uischema, rootSchema]);
1021
1021
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
1022
1022
  const showSortButtons = appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayLayoutSortButtons;
@@ -1044,7 +1044,7 @@ const ExpandPanelRendererComponent = (props) => {
1044
1044
  React.createElement(IconButton, { onClick: removeItems(path, [index]), style: iconStyle, "aria-label": `Delete`, size: 'large' },
1045
1045
  React.createElement(DeleteIcon, null))))))))),
1046
1046
  React.createElement(AccordionDetails, null,
1047
- React.createElement(JsonFormsDispatch, { schema: schema, uischema: foundUISchema, path: childPath, key: childPath, renderers: renderers, cells: cells }))));
1047
+ React.createElement(JsonFormsDispatch, { enabled: enabled, schema: schema, uischema: foundUISchema, path: childPath, key: childPath, renderers: renderers, cells: cells }))));
1048
1048
  };
1049
1049
  const ExpandPanelRenderer = React.memo(ExpandPanelRendererComponent);
1050
1050
  const ctxDispatchToExpandPanelProps = dispatch => ({
@@ -1093,12 +1093,12 @@ const MaterialArrayLayoutComponent = (props) => {
1093
1093
  setExpanded(expandedPanel ? panel : false);
1094
1094
  }, []);
1095
1095
  const isExpanded = (index) => expanded === composePaths(props.path, `${index}`);
1096
- const { data, path, schema, uischema, errors, addItem, renderers, cells, label, required, rootSchema, config, uischemas } = props;
1096
+ const { enabled, data, path, schema, uischema, errors, addItem, renderers, cells, label, required, rootSchema, config, uischemas } = props;
1097
1097
  const appliedUiSchemaOptions = merge({}, config, props.uischema.options);
1098
1098
  return (React.createElement("div", null,
1099
1099
  React.createElement(ArrayLayoutToolbar, { label: computeLabel(label, required, appliedUiSchemaOptions.hideRequiredAsterisk), errors: errors, path: path, addItem: addItem, createDefault: innerCreateDefaultValue }),
1100
1100
  React.createElement("div", null, data > 0 ? (map(range(data), index => {
1101
- return (React.createElement(ExpandPanelRenderer$1, { index: index, expanded: isExpanded(index), schema: schema, path: path, handleExpansion: handleChange, uischema: uischema, renderers: renderers, cells: cells, key: index, rootSchema: rootSchema, enableMoveUp: index != 0, enableMoveDown: index < data - 1, config: config, childLabelProp: appliedUiSchemaOptions.elementLabelProp, uischemas: uischemas }));
1101
+ return (React.createElement(ExpandPanelRenderer$1, { enabled: enabled, index: index, expanded: isExpanded(index), schema: schema, path: path, handleExpansion: handleChange, uischema: uischema, renderers: renderers, cells: cells, key: index, rootSchema: rootSchema, enableMoveUp: index != 0, enableMoveDown: index < data - 1, config: config, childLabelProp: appliedUiSchemaOptions.elementLabelProp, uischemas: uischemas }));
1102
1102
  })) : (React.createElement("p", null, "No data")))));
1103
1103
  };
1104
1104
  const MaterialArrayLayout$1 = React.memo(MaterialArrayLayoutComponent);