@jsonforms/material-renderers 3.0.0-beta.3 → 3.0.0-rc.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 +71 -13
- package/docs/assets/js/search.json +1 -1
- package/docs/globals.html +174 -80
- package/docs/index.html +85 -13
- package/docs/interfaces/categorizationstate.html +1 -1
- package/docs/interfaces/categorizationstepperstate.html +1 -1
- package/docs/interfaces/inputref.html +168 -0
- package/docs/interfaces/materialcategorizationlayoutrendererprops.html +49 -4
- package/docs/interfaces/materialcategorizationstepperlayoutrendererprops.html +46 -1
- package/docs/interfaces/materiallabelablelayoutrendererprops.html +328 -0
- package/docs/interfaces/materiallayoutrendererprops.html +5 -0
- package/docs/interfaces/withoptionlabel.html +3 -3
- package/lib/additional/MaterialLabelRenderer.d.ts +3 -3
- package/lib/cells/MaterialEnumCell.d.ts +2 -1
- package/lib/cells/MaterialOneOfEnumCell.d.ts +2 -1
- package/lib/controls/MaterialEnumControl.d.ts +2 -1
- package/lib/controls/MaterialOneOfEnumControl.d.ts +2 -1
- package/lib/controls/index.d.ts +2 -2
- package/lib/jsonforms-react-material.cjs.js +125 -61
- package/lib/jsonforms-react-material.cjs.js.map +1 -1
- package/lib/jsonforms-react-material.esm.js +124 -58
- package/lib/jsonforms-react-material.esm.js.map +1 -1
- package/lib/layouts/MaterialArrayLayoutRenderer.d.ts +1 -1
- package/lib/layouts/MaterialCategorizationLayout.d.ts +4 -3
- package/lib/layouts/MaterialCategorizationStepperLayout.d.ts +4 -3
- package/lib/layouts/MaterialGroupLayout.d.ts +2 -2
- package/lib/layouts/MaterialHorizontalLayout.d.ts +1 -1
- package/lib/layouts/MaterialVerticalLayout.d.ts +1 -1
- package/lib/mui-controls/MuiAutocomplete.d.ts +2 -2
- package/lib/mui-controls/MuiSelect.d.ts +2 -1
- package/lib/util/datejs.d.ts +17 -1
- package/lib/util/i18nDefaults.d.ts +3 -0
- package/lib/util/index.d.ts +1 -0
- package/lib/util/layout.d.ts +3 -0
- package/package.json +7 -7
- package/src/additional/MaterialLabelRenderer.tsx +5 -7
- package/src/cells/MaterialEnumCell.tsx +4 -3
- package/src/cells/MaterialOneOfEnumCell.tsx +3 -3
- package/src/complex/MaterialTableControl.tsx +1 -1
- package/src/controls/MaterialDateControl.tsx +23 -6
- package/src/controls/MaterialDateTimeControl.tsx +23 -6
- package/src/controls/MaterialEnumControl.tsx +12 -5
- package/src/controls/MaterialOneOfEnumControl.tsx +13 -5
- package/src/controls/MaterialTimeControl.tsx +24 -7
- package/src/layouts/ExpandPanelRenderer.tsx +2 -1
- package/src/layouts/MaterialArrayLayoutRenderer.tsx +3 -25
- package/src/layouts/MaterialCategorizationLayout.tsx +18 -9
- package/src/layouts/MaterialCategorizationStepperLayout.tsx +19 -12
- package/src/layouts/MaterialGroupLayout.tsx +6 -5
- package/src/mui-controls/MuiAutocomplete.tsx +81 -37
- package/src/mui-controls/MuiInputText.tsx +4 -1
- package/src/mui-controls/MuiSelect.tsx +10 -5
- package/src/util/datejs.tsx +73 -0
- package/src/util/i18nDefaults.ts +3 -0
- package/src/util/index.ts +1 -0
- package/src/util/layout.tsx +4 -0
- package/stats.html +1 -1
- package/test/renderers/MaterialArrayLayout.test.tsx +36 -5
- package/test/renderers/MaterialCategorizationLayout.test.tsx +17 -7
- package/test/renderers/MaterialCategorizationStepperLayout.test.tsx +21 -11
- package/test/renderers/MaterialDateControl.test.tsx +27 -0
- package/test/renderers/MaterialDateTimeControl.test.tsx +27 -0
- package/test/renderers/MaterialGroupLayout.test.tsx +4 -1
- package/test/renderers/MaterialInputControl.test.tsx +4 -0
- package/test/renderers/MaterialLabelRenderer.test.tsx +2 -1
- package/test/renderers/MaterialTimeControl.test.tsx +27 -0
- package/test/renderers/util.ts +5 -0
- package/src/util/datejs.ts +0 -32
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createDefaultValue, Resolve, encode, Paths, formatErrorMessage, errorsAt, rankWith, isObjectControl, findUISchema, Generate, isAllOfControl, findMatchingUISchema, createCombinatorRenderInfos, isAnyOfControl, isOneOfControl, getAjv, and, uiTypeIs, schemaMatches, hasType, schemaSubPathMatches, or, isObjectArrayControl, isPrimitiveArrayControl, isObjectArray, computeLabel, composePaths, isBooleanControl, optionIs, isDescriptionHidden, showAsRequired, isEnumControl, isDateControl, isTimeControl, isDateTimeControl, isRangeControl, isIntegerControl, isNumberControl, isStringControl, isOneOfEnumControl, withIncreasedRank, isVisible, update, moveUp, moveDown, getFirstPrimitiveProp, createId, removeId, isObjectArrayWithNesting, isNumberFormatControl, categorizationHasCategory } from '@jsonforms/core';
|
|
2
|
-
import React, { useMemo, Fragment, useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import { DispatchCell, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsDetailProps, JsonFormsDispatch, withJsonFormsAllOfProps, withJsonFormsAnyOfProps, withJsonFormsOneOfProps, withJsonFormsMultiEnumProps,
|
|
1
|
+
import { createDefaultValue, Resolve, encode, Paths, formatErrorMessage, errorsAt, rankWith, isObjectControl, findUISchema, Generate, isAllOfControl, findMatchingUISchema, createCombinatorRenderInfos, isAnyOfControl, isOneOfControl, getAjv, and, uiTypeIs, schemaMatches, hasType, schemaSubPathMatches, or, isObjectArrayControl, isPrimitiveArrayControl, isObjectArray, computeLabel, composePaths, isBooleanControl, optionIs, isDescriptionHidden, showAsRequired, isEnumControl, isDateControl, isTimeControl, isDateTimeControl, isRangeControl, isIntegerControl, isNumberControl, isStringControl, isOneOfEnumControl, withIncreasedRank, isVisible, deriveLabelForUISchemaElement, update, moveUp, moveDown, getFirstPrimitiveProp, createId, removeId, isObjectArrayWithNesting, isNumberFormatControl, categorizationHasCategory } from '@jsonforms/core';
|
|
2
|
+
import React, { useMemo, Fragment, useState, useCallback, useRef, useEffect } from 'react';
|
|
3
|
+
import { DispatchCell, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsDetailProps, JsonFormsDispatch, withJsonFormsAllOfProps, withJsonFormsAnyOfProps, withJsonFormsOneOfProps, withJsonFormsMultiEnumProps, withJsonFormsLabelProps, withJsonFormsMasterListItemProps, withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, Control, withJsonFormsOneOfEnumProps, withJsonFormsLayoutProps, withJsonFormsContext, withJsonFormsCellProps, withJsonFormsEnumCellProps, withJsonFormsOneOfEnumCellProps } from '@jsonforms/react';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
5
5
|
import union from 'lodash/union';
|
|
6
6
|
import startCase from 'lodash/startCase';
|
|
7
7
|
import range from 'lodash/range';
|
|
8
|
-
import { TableCell, styled as styled$1, Badge, Tooltip, TableRow, Grid, Typography, Hidden, IconButton, FormHelperText, Table, TableHead, TableBody, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Tabs, Tab, Checkbox, Select, MenuItem, Input, useTheme, InputAdornment, FormControl, FormGroup, FormControlLabel, Toolbar, ListItem, ListItemAvatar, Avatar, ListItemText, ListItemSecondaryAction, List, Switch, InputLabel, Autocomplete,
|
|
8
|
+
import { TableCell, styled as styled$1, Badge, Tooltip, TableRow, Grid, Typography, Hidden, IconButton, FormHelperText, Table, TableHead, TableBody, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Tabs, Tab, Checkbox, TextField, Select, MenuItem, Input, useTheme, InputAdornment, FormControl, FormGroup, FormControlLabel, Toolbar, ListItem, ListItemAvatar, Avatar, ListItemText, ListItemSecondaryAction, List, Switch, InputLabel, Autocomplete, FormLabel, Slider, RadioGroup, Radio, Card, CardHeader, CardContent, AppBar, Accordion, AccordionSummary, AccordionDetails, Stepper, Step, StepButton } from '@mui/material';
|
|
9
9
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
10
10
|
import ArrowDownward from '@mui/icons-material/ArrowDownward';
|
|
11
11
|
import ArrowUpward from '@mui/icons-material/ArrowUpward';
|
|
@@ -168,7 +168,7 @@ const TableRows = ({ data, path, schema, openDeleteDialog, moveUp, moveDown, uis
|
|
|
168
168
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
169
169
|
return (React.createElement(React.Fragment, null, range(data).map((index) => {
|
|
170
170
|
const childPath = Paths.compose(path, `${index}`);
|
|
171
|
-
return (React.createElement(NonEmptyRow, { key: childPath, childPath: childPath, rowIndex: index, schema: schema, openDeleteDialog: openDeleteDialog, moveUpCreator: moveUp, moveDownCreator: moveDown, enableUp: index !== 0, enableDown: index !== data - 1, showSortButtons: appliedUiSchemaOptions.showSortButtons, enabled: enabled, cells: cells, path: path }));
|
|
171
|
+
return (React.createElement(NonEmptyRow, { key: childPath, childPath: childPath, rowIndex: index, schema: schema, openDeleteDialog: openDeleteDialog, moveUpCreator: moveUp, moveDownCreator: moveDown, enableUp: index !== 0, enableDown: index !== data - 1, showSortButtons: appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons, enabled: enabled, cells: cells, path: path }));
|
|
172
172
|
})));
|
|
173
173
|
};
|
|
174
174
|
class MaterialTableControl extends React.Component {
|
|
@@ -327,20 +327,14 @@ const MuiCheckbox = React.memo((props) => {
|
|
|
327
327
|
return (React.createElement(Checkbox, { checked: checked, onChange: (_ev, isChecked) => handleChange(path, isChecked), className: className, id: id, disabled: !enabled, inputProps: inputProps }));
|
|
328
328
|
});
|
|
329
329
|
|
|
330
|
-
const MuiSelect = React.memo((props) => {
|
|
331
|
-
const { data, className, id, enabled, uischema, path, handleChange, options, config } = props;
|
|
332
|
-
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
333
|
-
return (React.createElement(Select, { className: className, id: id, disabled: !enabled, autoFocus: appliedUiSchemaOptions.focus, value: data !== undefined ? data : '', onChange: ev => handleChange(path, ev.target.value), fullWidth: true, variant: 'standard' }, [React.createElement(MenuItem, { value: '', key: 'empty' })].concat(options.map(optionValue => (React.createElement(MenuItem, { value: optionValue.value, key: optionValue.value }, optionValue.label))))));
|
|
334
|
-
});
|
|
335
|
-
|
|
336
330
|
dayjs.extend(customParsing);
|
|
337
|
-
const createOnChangeHandler = (path, handleChange, saveFormat) => (time) => {
|
|
331
|
+
const createOnChangeHandler = (path, handleChange, saveFormat) => (time, textInputValue) => {
|
|
338
332
|
if (!time) {
|
|
339
333
|
handleChange(path, undefined);
|
|
340
334
|
return;
|
|
341
335
|
}
|
|
342
336
|
const result = dayjs(time).format(saveFormat);
|
|
343
|
-
handleChange(path, result === 'Invalid Date' ?
|
|
337
|
+
handleChange(path, result === 'Invalid Date' ? textInputValue : result);
|
|
344
338
|
};
|
|
345
339
|
const getData = (data, saveFormat) => {
|
|
346
340
|
if (!data) {
|
|
@@ -352,6 +346,22 @@ const getData = (data, saveFormat) => {
|
|
|
352
346
|
}
|
|
353
347
|
return dayjsData;
|
|
354
348
|
};
|
|
349
|
+
const ResettableTextField = ({ rawValue, dayjsValueIsValid, valueInInputFormat, focused, inputProps, ...props }) => {
|
|
350
|
+
const value = useRef({ lastInput: inputProps?.value, toShow: inputProps?.value });
|
|
351
|
+
if (!focused) {
|
|
352
|
+
if (!dayjsValueIsValid) {
|
|
353
|
+
value.current.toShow = typeof rawValue === 'string' || rawValue === null || rawValue === undefined ? rawValue : JSON.stringify(rawValue);
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
value.current.toShow = valueInInputFormat;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (focused && inputProps?.value !== value.current.lastInput) {
|
|
360
|
+
value.current.lastInput = inputProps?.value;
|
|
361
|
+
value.current.toShow = inputProps?.value;
|
|
362
|
+
}
|
|
363
|
+
return React.createElement(TextField, Object.assign({}, props, { inputProps: { ...inputProps, value: value.current.toShow || '' } }));
|
|
364
|
+
};
|
|
355
365
|
|
|
356
366
|
const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
|
|
357
367
|
return elements.map((child, index) => (React.createElement(Grid, { item: true, key: `${path}-${index}`, xs: true },
|
|
@@ -373,8 +383,8 @@ const withAjvProps = (Component) => (props) => {
|
|
|
373
383
|
return (React.createElement(Component, Object.assign({}, props, { ajv: ajv })));
|
|
374
384
|
};
|
|
375
385
|
|
|
376
|
-
const eventToValue$
|
|
377
|
-
const useDebouncedChange = (handleChange, defaultValue, data, path, eventToValueFunction = eventToValue$
|
|
386
|
+
const eventToValue$3 = (ev) => ev.target.value;
|
|
387
|
+
const useDebouncedChange = (handleChange, defaultValue, data, path, eventToValueFunction = eventToValue$3, timeout = 300) => {
|
|
378
388
|
const [input, setInput] = useState(data ?? defaultValue);
|
|
379
389
|
useEffect(() => {
|
|
380
390
|
setInput(data ?? defaultValue);
|
|
@@ -396,23 +406,35 @@ const useFocus = () => {
|
|
|
396
406
|
return [focused, onFocus, onBlur];
|
|
397
407
|
};
|
|
398
408
|
|
|
409
|
+
const i18nDefaults = {
|
|
410
|
+
'enum.none': 'None'
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
const MuiSelect = React.memo((props) => {
|
|
414
|
+
const { data, className, id, enabled, schema, uischema, path, handleChange, options, config, t } = props;
|
|
415
|
+
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
416
|
+
const noneOptionLabel = useMemo(() => t('enum.none', i18nDefaults['enum.none'], { schema, uischema, path }), [t, schema, uischema, path]);
|
|
417
|
+
return (React.createElement(Select, { className: className, id: id, disabled: !enabled, autoFocus: appliedUiSchemaOptions.focus, value: data !== undefined ? data : '', onChange: ev => handleChange(path, ev.target.value || undefined), fullWidth: true, variant: 'standard' }, [React.createElement(MenuItem, { value: '', key: 'jsonforms.enum.none' },
|
|
418
|
+
React.createElement("em", null, noneOptionLabel))].concat(options.map(optionValue => (React.createElement(MenuItem, { value: optionValue.value, key: optionValue.value }, optionValue.label))))));
|
|
419
|
+
});
|
|
420
|
+
|
|
399
421
|
const toNumber$1 = (value) => value === '' ? undefined : parseInt(value, 10);
|
|
400
|
-
const eventToValue$
|
|
422
|
+
const eventToValue$2 = (ev) => toNumber$1(ev.target.value);
|
|
401
423
|
const MuiInputInteger = React.memo((props) => {
|
|
402
424
|
const { data, className, id, enabled, uischema, path, handleChange, config } = props;
|
|
403
425
|
const inputProps = { step: '1' };
|
|
404
426
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
405
|
-
const [inputValue, onChange] = useDebouncedChange(handleChange, '', data, path, eventToValue$
|
|
427
|
+
const [inputValue, onChange] = useDebouncedChange(handleChange, '', data, path, eventToValue$2);
|
|
406
428
|
return (React.createElement(Input, { type: 'number', value: inputValue, onChange: onChange, className: className, id: id, disabled: !enabled, autoFocus: appliedUiSchemaOptions.focus, inputProps: inputProps, fullWidth: true }));
|
|
407
429
|
});
|
|
408
430
|
|
|
409
431
|
const toNumber = (value) => value === '' ? undefined : parseFloat(value);
|
|
410
|
-
const eventToValue = (ev) => toNumber(ev.target.value);
|
|
432
|
+
const eventToValue$1 = (ev) => toNumber(ev.target.value);
|
|
411
433
|
const MuiInputNumber = React.memo((props) => {
|
|
412
434
|
const { data, className, id, enabled, uischema, path, handleChange, config } = props;
|
|
413
435
|
const inputProps = { step: '0.1' };
|
|
414
436
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
415
|
-
const [inputValue, onChange] = useDebouncedChange(handleChange, '', data, path, eventToValue);
|
|
437
|
+
const [inputValue, onChange] = useDebouncedChange(handleChange, '', data, path, eventToValue$1);
|
|
416
438
|
return (React.createElement(Input, { type: 'number', value: inputValue, onChange: onChange, className: className, id: id, disabled: !enabled, autoFocus: appliedUiSchemaOptions.focus, inputProps: inputProps, fullWidth: true }));
|
|
417
439
|
});
|
|
418
440
|
|
|
@@ -433,6 +455,7 @@ const MuiInputNumberFormat = React.memo((props) => {
|
|
|
433
455
|
return (React.createElement(Input, { type: 'text', value: inputValue, onChange: onChange, className: className, id: id, disabled: !enabled, autoFocus: appliedUiSchemaOptions.focus, multiline: appliedUiSchemaOptions.multi, fullWidth: !appliedUiSchemaOptions.trim || maxLength === undefined, inputProps: inputProps, error: !isValid }));
|
|
434
456
|
});
|
|
435
457
|
|
|
458
|
+
const eventToValue = (ev) => ev.target.value === '' ? undefined : ev.target.value;
|
|
436
459
|
const MuiInputText = React.memo((props) => {
|
|
437
460
|
const [showAdornment, setShowAdornment] = useState(false);
|
|
438
461
|
const { data, config, className, id, enabled, uischema, isValid, path, handleChange, schema, muiInputProps, inputComponent } = props;
|
|
@@ -449,7 +472,7 @@ const MuiInputText = React.memo((props) => {
|
|
|
449
472
|
if (appliedUiSchemaOptions.trim && maxLength !== undefined) {
|
|
450
473
|
inputProps.size = maxLength;
|
|
451
474
|
}
|
|
452
|
-
const [inputText, onChange, onClear] = useDebouncedChange(handleChange, '', data, path);
|
|
475
|
+
const [inputText, onChange, onClear] = useDebouncedChange(handleChange, '', data, path, eventToValue);
|
|
453
476
|
const onPointerEnter = () => setShowAdornment(true);
|
|
454
477
|
const onPointerLeave = () => setShowAdornment(false);
|
|
455
478
|
const theme = useTheme();
|
|
@@ -503,12 +526,11 @@ var MaterialEnumArrayRenderer$1 = withJsonFormsMultiEnumProps(MaterialEnumArrayR
|
|
|
503
526
|
const materialArrayControlTester = rankWith(3, or(isObjectArrayControl, isPrimitiveArrayControl));
|
|
504
527
|
|
|
505
528
|
const materialLabelRendererTester = rankWith(1, uiTypeIs('Label'));
|
|
506
|
-
const MaterialLabelRenderer = ({
|
|
507
|
-
const labelElement = uischema;
|
|
529
|
+
const MaterialLabelRenderer = ({ text, visible }) => {
|
|
508
530
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
509
|
-
React.createElement(Typography, { variant: 'h6' },
|
|
531
|
+
React.createElement(Typography, { variant: 'h6' }, text)));
|
|
510
532
|
};
|
|
511
|
-
var MaterialLabelRenderer$1 =
|
|
533
|
+
var MaterialLabelRenderer$1 = withJsonFormsLabelProps(MaterialLabelRenderer);
|
|
512
534
|
|
|
513
535
|
const ArrayLayoutToolbar = React.memo(({ label, errors, addItem, path, createDefault }) => {
|
|
514
536
|
return (React.createElement(Toolbar, { disableGutters: true },
|
|
@@ -606,24 +628,40 @@ const MaterialInputControl = (props) => {
|
|
|
606
628
|
};
|
|
607
629
|
|
|
608
630
|
const MuiAutocomplete = (props) => {
|
|
609
|
-
const { data, className, id, enabled, uischema, path, handleChange, options, config, getOptionLabel, renderOption, filterOptions } = props;
|
|
631
|
+
const { description, errors, visible, required, label, data, className, id, enabled, uischema, path, handleChange, options, config, getOptionLabel, renderOption, filterOptions, isValid } = props;
|
|
610
632
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
611
633
|
const [inputValue, setInputValue] = React.useState(data ?? '');
|
|
634
|
+
const [focused, onFocus, onBlur] = useFocus();
|
|
612
635
|
const findOption = options.find(o => o.value === data) ?? null;
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
636
|
+
const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
|
|
637
|
+
const firstFormHelperText = showDescription
|
|
638
|
+
? description
|
|
639
|
+
: !isValid
|
|
640
|
+
? errors
|
|
641
|
+
: null;
|
|
642
|
+
const secondFormHelperText = showDescription && !isValid ? errors : null;
|
|
643
|
+
return (React.createElement(Hidden, { xsUp: !visible },
|
|
644
|
+
React.createElement(Autocomplete, { className: className, id: id, disabled: !enabled, value: findOption, onChange: (_event, newValue) => {
|
|
645
|
+
handleChange(path, newValue?.value);
|
|
646
|
+
}, inputValue: inputValue, onInputChange: (_event, newInputValue) => {
|
|
647
|
+
setInputValue(newInputValue);
|
|
648
|
+
}, autoHighlight: true, autoSelect: true, autoComplete: true, fullWidth: true, options: options, getOptionLabel: getOptionLabel || (option => option?.label), freeSolo: false, renderInput: params => {
|
|
649
|
+
return (React.createElement(TextField, Object.assign({ label: label, variant: 'standard', type: 'text', inputProps: params.inputProps, inputRef: params.InputProps.ref, autoFocus: appliedUiSchemaOptions.focus, disabled: !enabled }, params, { id: id + '-input', required: required && !appliedUiSchemaOptions.hideRequiredAsterisk, error: !isValid, fullWidth: !appliedUiSchemaOptions.trim, InputLabelProps: data ? { shrink: true } : undefined, onFocus: onFocus, onBlur: onBlur, focused: focused })));
|
|
650
|
+
}, renderOption: renderOption, filterOptions: filterOptions }),
|
|
651
|
+
React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
|
|
652
|
+
React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText)));
|
|
618
653
|
};
|
|
619
654
|
|
|
620
655
|
const MaterialEnumControl = (props) => {
|
|
621
|
-
const { config, uischema } = props;
|
|
656
|
+
const { config, uischema, errors } = props;
|
|
622
657
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
623
|
-
|
|
658
|
+
const isValid = errors.length === 0;
|
|
659
|
+
return (appliedUiSchemaOptions.autocomplete === false ?
|
|
660
|
+
React.createElement(MaterialInputControl, Object.assign({}, props, { input: MuiSelect })) :
|
|
661
|
+
React.createElement(MuiAutocomplete, Object.assign({}, props, { isValid: isValid })));
|
|
624
662
|
};
|
|
625
663
|
const materialEnumControlTester = rankWith(2, isEnumControl);
|
|
626
|
-
var MaterialEnumControl$1 = withJsonFormsEnumProps(MaterialEnumControl);
|
|
664
|
+
var MaterialEnumControl$1 = withJsonFormsEnumProps(withTranslateProps(React.memo(MaterialEnumControl)), false);
|
|
627
665
|
|
|
628
666
|
const MaterialNativeControl = (props) => {
|
|
629
667
|
const [focused, onFocus, onBlur] = useFocus();
|
|
@@ -647,6 +685,7 @@ const MaterialDateControl = (props) => {
|
|
|
647
685
|
const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
|
|
648
686
|
const format = appliedUiSchemaOptions.dateFormat ?? 'YYYY-MM-DD';
|
|
649
687
|
const saveFormat = appliedUiSchemaOptions.dateSaveFormat ?? 'YYYY-MM-DD';
|
|
688
|
+
const views = appliedUiSchemaOptions.views ?? ['year', 'day'];
|
|
650
689
|
const firstFormHelperText = showDescription
|
|
651
690
|
? description
|
|
652
691
|
: !isValid
|
|
@@ -654,9 +693,14 @@ const MaterialDateControl = (props) => {
|
|
|
654
693
|
: null;
|
|
655
694
|
const secondFormHelperText = showDescription && !isValid ? errors : null;
|
|
656
695
|
const onChange = useMemo(() => createOnChangeHandler(path, handleChange, saveFormat), [path, handleChange, saveFormat]);
|
|
696
|
+
const value = getData(data, saveFormat);
|
|
697
|
+
const valueInInputFormat = value ? value.format(format) : '';
|
|
657
698
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
658
699
|
React.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs },
|
|
659
|
-
React.createElement(DatePicker, { label: label, value:
|
|
700
|
+
React.createElement(DatePicker, { label: label, value: value, clearable: true, onChange: onChange, inputFormat: format, disableMaskedInput: true, views: views, disabled: !enabled, cancelText: appliedUiSchemaOptions.cancelLabel, clearText: appliedUiSchemaOptions.clearLabel, okText: appliedUiSchemaOptions.okLabel, renderInput: params => (React.createElement(ResettableTextField, Object.assign({}, params, { rawValue: data, dayjsValueIsValid: value !== null, valueInInputFormat: valueInInputFormat, focused: focused, id: id + '-input', required: required && !appliedUiSchemaOptions.hideRequiredAsterisk, autoFocus: appliedUiSchemaOptions.focus, error: !isValid, fullWidth: !appliedUiSchemaOptions.trim, inputProps: {
|
|
701
|
+
...params.inputProps,
|
|
702
|
+
type: 'text',
|
|
703
|
+
}, InputLabelProps: data ? { shrink: true } : undefined, onFocus: onFocus, onBlur: onBlur, variant: 'standard' }))) }),
|
|
660
704
|
React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
|
|
661
705
|
React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText))));
|
|
662
706
|
};
|
|
@@ -671,6 +715,7 @@ const MaterialDateTimeControl = (props) => {
|
|
|
671
715
|
const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
|
|
672
716
|
const format = appliedUiSchemaOptions.dateTimeFormat ?? 'YYYY-MM-DD HH:mm';
|
|
673
717
|
const saveFormat = appliedUiSchemaOptions.dateTimeSaveFormat ?? undefined;
|
|
718
|
+
const views = appliedUiSchemaOptions.views ?? ['year', 'day', 'hours', 'minutes'];
|
|
674
719
|
const firstFormHelperText = showDescription
|
|
675
720
|
? description
|
|
676
721
|
: !isValid
|
|
@@ -678,9 +723,14 @@ const MaterialDateTimeControl = (props) => {
|
|
|
678
723
|
: null;
|
|
679
724
|
const secondFormHelperText = showDescription && !isValid ? errors : null;
|
|
680
725
|
const onChange = useMemo(() => createOnChangeHandler(path, handleChange, saveFormat), [path, handleChange, saveFormat]);
|
|
726
|
+
const value = getData(data, saveFormat);
|
|
727
|
+
const valueInInputFormat = value ? value.format(format) : '';
|
|
681
728
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
682
729
|
React.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs },
|
|
683
|
-
React.createElement(DateTimePicker, { label: label, value:
|
|
730
|
+
React.createElement(DateTimePicker, { label: label, value: value, clearable: true, onChange: onChange, inputFormat: format, disableMaskedInput: true, ampm: !!appliedUiSchemaOptions.ampm, views: views, disabled: !enabled, cancelText: appliedUiSchemaOptions.cancelLabel, clearText: appliedUiSchemaOptions.clearLabel, okText: appliedUiSchemaOptions.okLabel, renderInput: params => (React.createElement(ResettableTextField, Object.assign({}, params, { rawValue: data, dayjsValueIsValid: value !== null, valueInInputFormat: valueInInputFormat, focused: focused, id: id + '-input', required: required && !appliedUiSchemaOptions.hideRequiredAsterisk, autoFocus: appliedUiSchemaOptions.focus, error: !isValid, fullWidth: !appliedUiSchemaOptions.trim, inputProps: {
|
|
731
|
+
...params.inputProps,
|
|
732
|
+
type: 'text',
|
|
733
|
+
}, InputLabelProps: data ? { shrink: true } : undefined, onFocus: onFocus, onBlur: onBlur, variant: 'standard' }))) }),
|
|
684
734
|
React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
|
|
685
735
|
React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText))));
|
|
686
736
|
};
|
|
@@ -695,6 +745,7 @@ const MaterialTimeControl = (props) => {
|
|
|
695
745
|
const showDescription = !isDescriptionHidden(visible, description, focused, appliedUiSchemaOptions.showUnfocusedDescription);
|
|
696
746
|
const format = appliedUiSchemaOptions.timeFormat ?? 'HH:mm';
|
|
697
747
|
const saveFormat = appliedUiSchemaOptions.timeSaveFormat ?? 'HH:mm:ss';
|
|
748
|
+
const views = appliedUiSchemaOptions.views ?? ['hours', 'minutes'];
|
|
698
749
|
const firstFormHelperText = showDescription
|
|
699
750
|
? description
|
|
700
751
|
: !isValid
|
|
@@ -702,9 +753,14 @@ const MaterialTimeControl = (props) => {
|
|
|
702
753
|
: null;
|
|
703
754
|
const secondFormHelperText = showDescription && !isValid ? errors : null;
|
|
704
755
|
const onChange = useMemo(() => createOnChangeHandler(path, handleChange, saveFormat), [path, handleChange, saveFormat]);
|
|
756
|
+
const value = getData(data, saveFormat);
|
|
757
|
+
const valueInInputFormat = value ? value.format(format) : '';
|
|
705
758
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
706
759
|
React.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs },
|
|
707
|
-
React.createElement(TimePicker, { label: label, value:
|
|
760
|
+
React.createElement(TimePicker, { label: label, value: value, clearable: true, onChange: onChange, inputFormat: format, disableMaskedInput: true, ampm: !!appliedUiSchemaOptions.ampm, views: views, disabled: !enabled, cancelText: appliedUiSchemaOptions.cancelLabel, clearText: appliedUiSchemaOptions.clearLabel, okText: appliedUiSchemaOptions.okLabel, renderInput: params => (React.createElement(ResettableTextField, Object.assign({}, params, { rawValue: data, dayjsValueIsValid: value !== null, valueInInputFormat: valueInInputFormat, focused: focused, id: id + '-input', required: required && !appliedUiSchemaOptions.hideRequiredAsterisk, autoFocus: appliedUiSchemaOptions.focus, error: !isValid, fullWidth: !appliedUiSchemaOptions.trim, inputProps: {
|
|
761
|
+
...params.inputProps,
|
|
762
|
+
type: 'text'
|
|
763
|
+
}, InputLabelProps: data ? { shrink: true } : undefined, onFocus: onFocus, onBlur: onBlur, variant: 'standard' }))) }),
|
|
708
764
|
React.createElement(FormHelperText, { error: !isValid && !showDescription }, firstFormHelperText),
|
|
709
765
|
React.createElement(FormHelperText, { error: !isValid }, secondFormHelperText))));
|
|
710
766
|
};
|
|
@@ -818,12 +874,15 @@ const materialAnyOfStringOrEnumControlTester = rankWith(5, simpleAnyOf);
|
|
|
818
874
|
var MaterialAnyOfStringOrEnumControl$1 = withJsonFormsControlProps(MaterialAnyOfStringOrEnumControl);
|
|
819
875
|
|
|
820
876
|
const MaterialOneOfEnumControl = (props) => {
|
|
821
|
-
const { config, uischema } = props;
|
|
877
|
+
const { config, uischema, errors } = props;
|
|
822
878
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
823
|
-
|
|
879
|
+
const isValid = errors.length === 0;
|
|
880
|
+
return (appliedUiSchemaOptions.autocomplete === false ?
|
|
881
|
+
React.createElement(MaterialInputControl, Object.assign({}, props, { input: MuiSelect })) :
|
|
882
|
+
React.createElement(MuiAutocomplete, Object.assign({}, props, { isValid: isValid })));
|
|
824
883
|
};
|
|
825
884
|
const materialOneOfEnumControlTester = rankWith(5, isOneOfEnumControl);
|
|
826
|
-
var MaterialOneOfEnumControl$1 = withJsonFormsOneOfEnumProps(MaterialOneOfEnumControl);
|
|
885
|
+
var MaterialOneOfEnumControl$1 = withJsonFormsOneOfEnumProps(withTranslateProps(React.memo(MaterialOneOfEnumControl)), false);
|
|
827
886
|
|
|
828
887
|
const MaterialOneOfRadioGroupControl = (props) => {
|
|
829
888
|
return React.createElement(MaterialRadioGroup, Object.assign({}, props));
|
|
@@ -851,17 +910,17 @@ const Unwrapped = {
|
|
|
851
910
|
|
|
852
911
|
const groupTester = rankWith(1, uiTypeIs('Group'));
|
|
853
912
|
const style = { marginBottom: '10px' };
|
|
854
|
-
const GroupComponent = React.memo(({ visible, enabled, uischema, ...props }) => {
|
|
913
|
+
const GroupComponent = React.memo(({ visible, enabled, uischema, label, ...props }) => {
|
|
855
914
|
const groupLayout = uischema;
|
|
856
915
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
857
916
|
React.createElement(Card, { style: style },
|
|
858
|
-
!isEmpty(
|
|
917
|
+
!isEmpty(label) && (React.createElement(CardHeader, { title: label })),
|
|
859
918
|
React.createElement(CardContent, null,
|
|
860
919
|
React.createElement(MaterialLayoutRenderer, Object.assign({}, props, { visible: visible, enabled: enabled, elements: groupLayout.elements }))))));
|
|
861
920
|
});
|
|
862
|
-
const MaterializedGroupLayoutRenderer = ({ uischema, schema, path, visible, enabled, renderers, cells, direction }) => {
|
|
921
|
+
const MaterializedGroupLayoutRenderer = ({ uischema, schema, path, visible, enabled, renderers, cells, direction, label }) => {
|
|
863
922
|
const groupLayout = uischema;
|
|
864
|
-
return (React.createElement(GroupComponent, { elements: groupLayout.elements, schema: schema, path: path, direction: direction, visible: visible, enabled: enabled, uischema: uischema, renderers: renderers, cells: cells }));
|
|
923
|
+
return (React.createElement(GroupComponent, { elements: groupLayout.elements, schema: schema, path: path, direction: direction, visible: visible, enabled: enabled, uischema: uischema, renderers: renderers, cells: cells, label: label }));
|
|
865
924
|
};
|
|
866
925
|
var MaterialGroupLayout = withJsonFormsLayoutProps(MaterializedGroupLayoutRenderer);
|
|
867
926
|
const materialGroupTester = withIncreasedRank(1, groupTester);
|
|
@@ -903,10 +962,10 @@ const isSingleLevelCategorization = and(uiTypeIs('Categorization'), (uischema) =
|
|
|
903
962
|
});
|
|
904
963
|
const materialCategorizationTester = rankWith(1, isSingleLevelCategorization);
|
|
905
964
|
const MaterialCategorizationLayoutRenderer = (props) => {
|
|
906
|
-
const { data, path, renderers, cells, schema, uischema, visible, enabled, selected, onChange, ajv } = props;
|
|
965
|
+
const { data, path, renderers, cells, schema, uischema, visible, enabled, selected, onChange, ajv, t } = props;
|
|
907
966
|
const categorization = uischema;
|
|
908
967
|
const [activeCategory, setActiveCategory] = useState(selected ?? 0);
|
|
909
|
-
const categories = categorization.elements.filter((category) => isVisible(category, data, undefined, ajv));
|
|
968
|
+
const categories = useMemo(() => categorization.elements.filter((category) => isVisible(category, data, undefined, ajv)), [categorization, data, ajv]);
|
|
910
969
|
const childProps = {
|
|
911
970
|
elements: categories[activeCategory].elements,
|
|
912
971
|
schema,
|
|
@@ -923,13 +982,16 @@ const MaterialCategorizationLayoutRenderer = (props) => {
|
|
|
923
982
|
}
|
|
924
983
|
setActiveCategory(value);
|
|
925
984
|
};
|
|
985
|
+
const tabLabels = useMemo(() => {
|
|
986
|
+
return categories.map((e) => deriveLabelForUISchemaElement(e, t));
|
|
987
|
+
}, [categories, t]);
|
|
926
988
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
927
989
|
React.createElement(AppBar, { position: 'static' },
|
|
928
|
-
React.createElement(Tabs, { value: activeCategory, onChange: onTabChange, textColor: 'inherit', indicatorColor: 'secondary', variant: 'scrollable' }, categories.map((
|
|
990
|
+
React.createElement(Tabs, { value: activeCategory, onChange: onTabChange, textColor: 'inherit', indicatorColor: 'secondary', variant: 'scrollable' }, categories.map((_, idx) => (React.createElement(Tab, { key: idx, label: tabLabels[idx] }))))),
|
|
929
991
|
React.createElement("div", { style: { marginTop: '0.5em' } },
|
|
930
992
|
React.createElement(MaterialLayoutRenderer, Object.assign({}, childProps)))));
|
|
931
993
|
};
|
|
932
|
-
var MaterialCategorizationLayout = withJsonFormsLayoutProps(
|
|
994
|
+
var MaterialCategorizationLayout = withAjvProps(withTranslateProps(withJsonFormsLayoutProps(MaterialCategorizationLayoutRenderer)));
|
|
933
995
|
|
|
934
996
|
const iconStyle = { float: 'right' };
|
|
935
997
|
const ExpandPanelRendererComponent = (props) => {
|
|
@@ -942,6 +1004,7 @@ const ExpandPanelRendererComponent = (props) => {
|
|
|
942
1004
|
const { childLabel, childPath, index, expanded, moveDown, moveUp, enableMoveDown, enableMoveUp, handleExpansion, removeItems, path, rootSchema, schema, uischema, uischemas, renderers, cells, config } = props;
|
|
943
1005
|
const foundUISchema = useMemo(() => findUISchema(uischemas, schema, uischema.scope, path, undefined, uischema, rootSchema), [uischemas, schema, uischema.scope, path, uischema, rootSchema]);
|
|
944
1006
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
1007
|
+
const showSortButtons = appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayLayoutSortButtons;
|
|
945
1008
|
return (React.createElement(Accordion, { "aria-labelledby": labelHtmlId, expanded: expanded, onChange: handleExpansion(childPath) },
|
|
946
1009
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null) },
|
|
947
1010
|
React.createElement(Grid, { container: true, alignItems: 'center' },
|
|
@@ -955,7 +1018,7 @@ const ExpandPanelRendererComponent = (props) => {
|
|
|
955
1018
|
React.createElement(Grid, { container: true, justifyContent: 'flex-end' },
|
|
956
1019
|
React.createElement(Grid, { item: true },
|
|
957
1020
|
React.createElement(Grid, { container: true, direction: 'row', justifyContent: 'center', alignItems: 'center' },
|
|
958
|
-
|
|
1021
|
+
showSortButtons ? (React.createElement(Fragment, null,
|
|
959
1022
|
React.createElement(Grid, { item: true },
|
|
960
1023
|
React.createElement(IconButton, { onClick: moveUp(path, index), style: iconStyle, disabled: !enableMoveUp, "aria-label": `Move up`, size: 'large' },
|
|
961
1024
|
React.createElement(ArrowUpward, null))),
|
|
@@ -1025,12 +1088,12 @@ const MaterialArrayLayoutComponent = (props) => {
|
|
|
1025
1088
|
};
|
|
1026
1089
|
const MaterialArrayLayout$1 = React.memo(MaterialArrayLayoutComponent);
|
|
1027
1090
|
|
|
1028
|
-
const MaterialArrayLayoutRenderer = ({ visible,
|
|
1091
|
+
const MaterialArrayLayoutRenderer = ({ visible, addItem, ...props }) => {
|
|
1029
1092
|
const addItemCb = useCallback((p, value) => addItem(p, value), [
|
|
1030
1093
|
addItem
|
|
1031
1094
|
]);
|
|
1032
1095
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
1033
|
-
React.createElement(MaterialArrayLayout$1, {
|
|
1096
|
+
React.createElement(MaterialArrayLayout$1, Object.assign({ visible: visible, addItem: addItemCb }, props))));
|
|
1034
1097
|
};
|
|
1035
1098
|
const materialArrayLayoutTester = rankWith(4, isObjectArrayWithNesting);
|
|
1036
1099
|
var MaterialArrayLayout = withJsonFormsArrayLayoutProps(MaterialArrayLayoutRenderer);
|
|
@@ -1057,7 +1120,7 @@ var MaterialDateCell$1 = withJsonFormsCellProps(MaterialDateCell);
|
|
|
1057
1120
|
|
|
1058
1121
|
const MaterialEnumCell = (props) => (React.createElement(MuiSelect, Object.assign({}, props)));
|
|
1059
1122
|
const materialEnumCellTester = rankWith(2, isEnumControl);
|
|
1060
|
-
var MaterialEnumCell$1 = withJsonFormsEnumCellProps(MaterialEnumCell);
|
|
1123
|
+
var MaterialEnumCell$1 = withJsonFormsEnumCellProps(withTranslateProps(React.memo(MaterialEnumCell)), false);
|
|
1061
1124
|
|
|
1062
1125
|
const MaterialIntegerCell = (props) => (React.createElement(MuiInputInteger, Object.assign({}, props)));
|
|
1063
1126
|
const materialIntegerCellTester = rankWith(2, isIntegerControl);
|
|
@@ -1073,7 +1136,7 @@ var MaterialNumberFormatCell$1 = withJsonFormsCellProps(MaterialNumberFormatCell
|
|
|
1073
1136
|
|
|
1074
1137
|
const MaterialOneOfEnumCell = (props) => (React.createElement(MuiSelect, Object.assign({}, props)));
|
|
1075
1138
|
const materialOneOfEnumCellTester = rankWith(2, isOneOfEnumControl);
|
|
1076
|
-
var MaterialOneOfEnumCell$1 = withJsonFormsOneOfEnumCellProps(MaterialOneOfEnumCell);
|
|
1139
|
+
var MaterialOneOfEnumCell$1 = withJsonFormsOneOfEnumCellProps(withTranslateProps(React.memo(MaterialOneOfEnumCell)), false);
|
|
1077
1140
|
|
|
1078
1141
|
const MaterialTextCell = (props) => (React.createElement(MuiInputText, Object.assign({}, props)));
|
|
1079
1142
|
const materialTextCellTester = rankWith(1, isStringControl);
|
|
@@ -1102,7 +1165,7 @@ const MaterialCategorizationStepperLayoutRenderer = (props) => {
|
|
|
1102
1165
|
const handleStep = (step) => {
|
|
1103
1166
|
setActiveCategory(step);
|
|
1104
1167
|
};
|
|
1105
|
-
const { data, path, renderers, schema, uischema, visible, cells, config, ajv } = props;
|
|
1168
|
+
const { data, path, renderers, schema, uischema, visible, cells, config, ajv, t } = props;
|
|
1106
1169
|
const categorization = uischema;
|
|
1107
1170
|
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
1108
1171
|
const buttonWrapperStyle = {
|
|
@@ -1116,7 +1179,7 @@ const MaterialCategorizationStepperLayoutRenderer = (props) => {
|
|
|
1116
1179
|
const buttonStyle = {
|
|
1117
1180
|
marginRight: '1em'
|
|
1118
1181
|
};
|
|
1119
|
-
const categories = categorization.elements.filter((category) => isVisible(category, data, undefined, ajv));
|
|
1182
|
+
const categories = useMemo(() => categorization.elements.filter((category) => isVisible(category, data, undefined, ajv)), [categorization, data, ajv]);
|
|
1120
1183
|
const childProps = {
|
|
1121
1184
|
elements: categories[activeCategory].elements,
|
|
1122
1185
|
schema,
|
|
@@ -1126,16 +1189,19 @@ const MaterialCategorizationStepperLayoutRenderer = (props) => {
|
|
|
1126
1189
|
renderers,
|
|
1127
1190
|
cells
|
|
1128
1191
|
};
|
|
1192
|
+
const tabLabels = useMemo(() => {
|
|
1193
|
+
return categories.map((e) => deriveLabelForUISchemaElement(e, t));
|
|
1194
|
+
}, [categories, t]);
|
|
1129
1195
|
return (React.createElement(Hidden, { xsUp: !visible },
|
|
1130
|
-
React.createElement(Stepper, { activeStep: activeCategory, nonLinear: true }, categories.map((
|
|
1131
|
-
React.createElement(StepButton, { onClick: () => handleStep(idx) },
|
|
1196
|
+
React.createElement(Stepper, { activeStep: activeCategory, nonLinear: true }, categories.map((_, idx) => (React.createElement(Step, { key: tabLabels[idx] },
|
|
1197
|
+
React.createElement(StepButton, { onClick: () => handleStep(idx) }, tabLabels[idx]))))),
|
|
1132
1198
|
React.createElement("div", null,
|
|
1133
1199
|
React.createElement(MaterialLayoutRenderer, Object.assign({}, childProps))),
|
|
1134
1200
|
!!appliedUiSchemaOptions.showNavButtons ? (React.createElement("div", { style: buttonWrapperStyle },
|
|
1135
1201
|
React.createElement(Button, { style: buttonNextStyle, variant: "contained", color: "primary", disabled: activeCategory >= categories.length - 1, onClick: () => handleStep(activeCategory + 1) }, "Next"),
|
|
1136
1202
|
React.createElement(Button, { style: buttonStyle, color: "secondary", variant: "contained", disabled: activeCategory <= 0, onClick: () => handleStep(activeCategory - 1) }, "Previous"))) : (React.createElement(React.Fragment, null))));
|
|
1137
1203
|
};
|
|
1138
|
-
var MaterialCategorizationStepperLayout = withJsonFormsLayoutProps(
|
|
1204
|
+
var MaterialCategorizationStepperLayout = withAjvProps(withTranslateProps(withJsonFormsLayoutProps(MaterialCategorizationStepperLayoutRenderer)));
|
|
1139
1205
|
|
|
1140
1206
|
const materialRenderers = [
|
|
1141
1207
|
{
|
|
@@ -1208,5 +1274,5 @@ const materialCells = [
|
|
|
1208
1274
|
{ tester: materialTimeCellTester, cell: MaterialTimeCell$1 }
|
|
1209
1275
|
];
|
|
1210
1276
|
|
|
1211
|
-
export { CustomizableCells as Customizable, MaterialAllOfRenderer$1 as MaterialAllOfRenderer, MaterialAnyOfRenderer$1 as MaterialAnyOfRenderer, MaterialAnyOfStringOrEnumControl$1 as MaterialAnyOfStringOrEnumControl, MaterialArrayControlRenderer$1 as MaterialArrayControlRenderer, MaterialArrayLayout, MaterialBooleanCell$1 as MaterialBooleanCell, MaterialBooleanControl$1 as MaterialBooleanControl, MaterialBooleanToggleCell$1 as MaterialBooleanToggleCell, MaterialBooleanToggleControl$1 as MaterialBooleanToggleControl, MaterialCategorizationLayout, MaterialDateCell$1 as MaterialDateCell, MaterialDateControl$1 as MaterialDateControl, MaterialDateTimeControl$1 as MaterialDateTimeControl, MaterialEnumArrayRenderer$1 as MaterialEnumArrayRenderer, MaterialEnumCell$1 as MaterialEnumCell, MaterialEnumControl$1 as MaterialEnumControl, MaterialGroupLayout, MaterialHorizontalLayout, MaterialInputControl, MaterialIntegerCell$1 as MaterialIntegerCell, MaterialIntegerControl$1 as MaterialIntegerControl, MaterialLayoutRenderer, MaterialNativeControl$1 as MaterialNativeControl, MaterialNumberCell$1 as MaterialNumberCell, MaterialNumberControl$1 as MaterialNumberControl, MaterialNumberFormatCell$1 as MaterialNumberFormatCell, MaterialObjectRenderer$1 as MaterialObjectRenderer, MaterialOneOfEnumCell$1 as MaterialOneOfEnumCell, MaterialOneOfEnumControl$1 as MaterialOneOfEnumControl, MaterialOneOfRadioGroupControl$1 as MaterialOneOfRadioGroupControl, MaterialOneOfRenderer$1 as MaterialOneOfRenderer, MaterialRadioGroupControl$1 as MaterialRadioGroupControl, MaterialSliderControl$1 as MaterialSliderControl, MaterialTextCell$1 as MaterialTextCell, MaterialTextControl$1 as MaterialTextControl, MaterialTimeCell$1 as MaterialTimeCell, MaterialTimeControl$1 as MaterialTimeControl, MaterialVerticalLayout, MuiCheckbox, MuiInputInteger, MuiInputNumber, MuiInputNumberFormat, MuiInputText, MuiInputTime, MuiSelect, Unwrapped, createOnChangeHandler, getData, materialAllOfControlTester, materialAnyOfControlTester, materialAnyOfStringOrEnumControlTester, materialArrayControlTester, materialArrayLayoutTester, materialBooleanCellTester, materialBooleanControlTester, materialBooleanToggleCellTester, materialBooleanToggleControlTester, materialCategorizationTester, materialCells, materialDateCellTester, materialDateControlTester, materialDateTimeControlTester, materialEnumArrayRendererTester, materialEnumCellTester, materialEnumControlTester, materialGroupTester, materialHorizontalLayoutTester, materialIntegerCellTester, materialIntegerControlTester, materialNativeControlTester, materialNumberCellTester, materialNumberControlTester, materialNumberFormatCellTester, materialObjectControlTester, materialOneOfControlTester, materialOneOfEnumCellTester, materialOneOfEnumControlTester, materialOneOfRadioGroupControlTester, materialRadioGroupControlTester, materialRenderers, materialSliderControlTester, materialTextCellTester, materialTextControlTester, materialTimeCellTester, materialTimeControlTester, materialVerticalLayoutTester, renderLayoutElements, useDebouncedChange, useFocus, withAjvProps };
|
|
1277
|
+
export { CustomizableCells as Customizable, MaterialAllOfRenderer$1 as MaterialAllOfRenderer, MaterialAnyOfRenderer$1 as MaterialAnyOfRenderer, MaterialAnyOfStringOrEnumControl$1 as MaterialAnyOfStringOrEnumControl, MaterialArrayControlRenderer$1 as MaterialArrayControlRenderer, MaterialArrayLayout, MaterialBooleanCell$1 as MaterialBooleanCell, MaterialBooleanControl$1 as MaterialBooleanControl, MaterialBooleanToggleCell$1 as MaterialBooleanToggleCell, MaterialBooleanToggleControl$1 as MaterialBooleanToggleControl, MaterialCategorizationLayout, MaterialDateCell$1 as MaterialDateCell, MaterialDateControl$1 as MaterialDateControl, MaterialDateTimeControl$1 as MaterialDateTimeControl, MaterialEnumArrayRenderer$1 as MaterialEnumArrayRenderer, MaterialEnumCell$1 as MaterialEnumCell, MaterialEnumControl$1 as MaterialEnumControl, MaterialGroupLayout, MaterialHorizontalLayout, MaterialInputControl, MaterialIntegerCell$1 as MaterialIntegerCell, MaterialIntegerControl$1 as MaterialIntegerControl, MaterialLayoutRenderer, MaterialNativeControl$1 as MaterialNativeControl, MaterialNumberCell$1 as MaterialNumberCell, MaterialNumberControl$1 as MaterialNumberControl, MaterialNumberFormatCell$1 as MaterialNumberFormatCell, MaterialObjectRenderer$1 as MaterialObjectRenderer, MaterialOneOfEnumCell$1 as MaterialOneOfEnumCell, MaterialOneOfEnumControl$1 as MaterialOneOfEnumControl, MaterialOneOfRadioGroupControl$1 as MaterialOneOfRadioGroupControl, MaterialOneOfRenderer$1 as MaterialOneOfRenderer, MaterialRadioGroupControl$1 as MaterialRadioGroupControl, MaterialSliderControl$1 as MaterialSliderControl, MaterialTextCell$1 as MaterialTextCell, MaterialTextControl$1 as MaterialTextControl, MaterialTimeCell$1 as MaterialTimeCell, MaterialTimeControl$1 as MaterialTimeControl, MaterialVerticalLayout, MuiCheckbox, MuiInputInteger, MuiInputNumber, MuiInputNumberFormat, MuiInputText, MuiInputTime, MuiSelect, ResettableTextField, Unwrapped, createOnChangeHandler, getData, i18nDefaults, materialAllOfControlTester, materialAnyOfControlTester, materialAnyOfStringOrEnumControlTester, materialArrayControlTester, materialArrayLayoutTester, materialBooleanCellTester, materialBooleanControlTester, materialBooleanToggleCellTester, materialBooleanToggleControlTester, materialCategorizationTester, materialCells, materialDateCellTester, materialDateControlTester, materialDateTimeControlTester, materialEnumArrayRendererTester, materialEnumCellTester, materialEnumControlTester, materialGroupTester, materialHorizontalLayoutTester, materialIntegerCellTester, materialIntegerControlTester, materialNativeControlTester, materialNumberCellTester, materialNumberControlTester, materialNumberFormatCellTester, materialObjectControlTester, materialOneOfControlTester, materialOneOfEnumCellTester, materialOneOfEnumControlTester, materialOneOfRadioGroupControlTester, materialRadioGroupControlTester, materialRenderers, materialSliderControlTester, materialTextCellTester, materialTextControlTester, materialTimeCellTester, materialTimeControlTester, materialVerticalLayoutTester, renderLayoutElements, useDebouncedChange, useFocus, withAjvProps };
|
|
1212
1278
|
//# sourceMappingURL=jsonforms-react-material.esm.js.map
|