@rjsf/mui 6.6.0 → 6.6.2
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/dist/index.cjs +90 -71
- package/dist/index.cjs.map +3 -3
- package/dist/mui.esm.js +103 -145
- package/dist/mui.esm.js.map +3 -3
- package/dist/mui.umd.js +85 -67
- package/lib/AddButton/AddButton.d.ts +1 -1
- package/lib/AddButton/AddButton.js +1 -1
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +4 -4
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +4 -4
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +3 -3
- package/lib/BaseInputTemplate/BaseInputTemplate.js +7 -7
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.d.ts +3 -3
- package/lib/CheckboxWidget/CheckboxWidget.js +5 -5
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +4 -4
- package/lib/CheckboxesWidget/CheckboxesWidget.js +6 -6
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.d.ts +2 -2
- package/lib/DescriptionField/DescriptionField.js +1 -1
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/ErrorList/ErrorList.d.ts +8 -8
- package/lib/ErrorList/ErrorList.js +2 -4
- package/lib/ErrorList/ErrorList.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +4 -4
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -4
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +2 -2
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/FieldTemplate/FieldTemplate.d.ts +3 -3
- package/lib/FieldTemplate/FieldTemplate.js +2 -2
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
- package/lib/GridTemplate/GridTemplate.d.ts +1 -1
- package/lib/IconButton/IconButton.d.ts +14 -7
- package/lib/IconButton/IconButton.js +15 -7
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/MuiForm/MuiForm.d.ts +3 -3
- package/lib/MuiForm/MuiForm.js.map +1 -1
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +3 -3
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js +1 -1
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +2 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +3 -3
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.d.ts +4 -4
- package/lib/RadioWidget/RadioWidget.js +6 -6
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.d.ts +2 -2
- package/lib/RangeWidget/RangeWidget.js +6 -6
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.d.ts +3 -3
- package/lib/SelectWidget/SelectWidget.js +7 -7
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/SubmitButton/SubmitButton.d.ts +3 -3
- package/lib/SubmitButton/SubmitButton.js +1 -1
- package/lib/SubmitButton/SubmitButton.js.map +1 -1
- package/lib/Templates/Templates.d.ts +1 -1
- package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/Theme/Theme.d.ts +2 -2
- package/lib/TitleField/TitleField.d.ts +5 -5
- package/lib/TitleField/TitleField.js +1 -1
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/Widgets/Widgets.d.ts +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +2 -2
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/util.d.ts +2 -2
- package/lib/util.js +3 -3
- package/package.json +8 -8
- package/src/AddButton/AddButton.tsx +4 -9
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +9 -7
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +8 -7
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +17 -18
- package/src/CheckboxWidget/CheckboxWidget.tsx +12 -20
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +16 -17
- package/src/DescriptionField/DescriptionField.tsx +4 -3
- package/src/ErrorList/ErrorList.tsx +26 -27
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +17 -22
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +4 -10
- package/src/FieldTemplate/FieldTemplate.tsx +8 -13
- package/src/GridTemplate/GridTemplate.tsx +1 -1
- package/src/IconButton/IconButton.tsx +20 -19
- package/src/MuiForm/MuiForm.tsx +4 -3
- package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +6 -4
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +6 -10
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +3 -2
- package/src/RadioWidget/RadioWidget.tsx +17 -18
- package/src/RangeWidget/RangeWidget.tsx +12 -19
- package/src/SelectWidget/SelectWidget.tsx +21 -20
- package/src/SubmitButton/SubmitButton.tsx +6 -11
- package/src/Templates/Templates.ts +1 -1
- package/src/TextareaWidget/TextareaWidget.tsx +2 -1
- package/src/Theme/Theme.tsx +2 -2
- package/src/TitleField/TitleField.tsx +11 -13
- package/src/Widgets/Widgets.ts +1 -1
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +6 -8
- package/src/util.ts +5 -5
package/dist/mui.umd.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
function getMuiProps(options, propsToFilter, rjsfSlotPropsOnly) {
|
|
11
11
|
const muiProps = options?.mui || {};
|
|
12
12
|
if (propsToFilter) {
|
|
13
|
-
return Object.keys(muiProps).filter((key) => propsToFilter.includes(key)).reduce((
|
|
14
|
-
|
|
15
|
-
return
|
|
13
|
+
return Object.keys(muiProps).filter((key) => propsToFilter.includes(key)).reduce((acc, key) => {
|
|
14
|
+
acc[key] = muiProps[key];
|
|
15
|
+
return acc;
|
|
16
16
|
}, {});
|
|
17
17
|
}
|
|
18
18
|
return muiProps;
|
|
@@ -226,11 +226,11 @@
|
|
|
226
226
|
accept,
|
|
227
227
|
...schema.examples ? { list: utils.examplesId(id) } : void 0
|
|
228
228
|
};
|
|
229
|
-
const
|
|
230
|
-
const
|
|
231
|
-
const
|
|
229
|
+
const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
|
|
230
|
+
const handleBlur = ({ target }) => onBlur(id, target && target.value);
|
|
231
|
+
const handleFocus = ({ target }) => onFocus(id, target && target.value);
|
|
232
232
|
const DisplayInputLabelProps = TYPES_THAT_SHRINK_LABEL.includes(type) ? { ...slotProps?.inputLabel, ...muiSlotProps?.inputLabel, ...InputLabelProps, shrink: true } : { ...slotProps?.inputLabel, ...muiSlotProps?.inputLabel, ...InputLabelProps };
|
|
233
|
-
const
|
|
233
|
+
const handleClear = react.useCallback(
|
|
234
234
|
(e) => {
|
|
235
235
|
e.preventDefault();
|
|
236
236
|
e.stopPropagation();
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
);
|
|
241
241
|
const inputProps = { ...InputProps, ...slotProps?.input, ...muiSlotProps?.input };
|
|
242
242
|
if (options.allowClearTextInputs && value && !readonly && !disabled) {
|
|
243
|
-
const clearAdornment = /* @__PURE__ */ jsxRuntime.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(ClearButton2, { registry, onClick:
|
|
243
|
+
const clearAdornment = /* @__PURE__ */ jsxRuntime.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntime.jsx(ClearButton2, { registry, onClick: handleClear }) });
|
|
244
244
|
inputProps.endAdornment = !inputProps.endAdornment ? clearAdornment : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
245
245
|
inputProps.endAdornment,
|
|
246
246
|
clearAdornment
|
|
@@ -267,9 +267,9 @@
|
|
|
267
267
|
...rest,
|
|
268
268
|
value: value || value === 0 ? value : "",
|
|
269
269
|
error: rawErrors.length > 0,
|
|
270
|
-
onChange: onChangeOverride ||
|
|
271
|
-
onBlur:
|
|
272
|
-
onFocus:
|
|
270
|
+
onChange: onChangeOverride || handleChange,
|
|
271
|
+
onBlur: handleBlur,
|
|
272
|
+
onFocus: handleFocus,
|
|
273
273
|
...{ ...otherMuiProps, ...textFieldProps },
|
|
274
274
|
"aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples)
|
|
275
275
|
}
|
|
@@ -315,12 +315,13 @@
|
|
|
315
315
|
} = getMuiProps(uiOptions);
|
|
316
316
|
return /* @__PURE__ */ jsxRuntime.jsx(Paper, { elevation: 2, ...errorPaper, children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { ...errorBox, sx: computeSxProps({ mb: 2, p: 2 }, errorBox), children: [
|
|
317
317
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", ...errorTypography, children: translateString(utils.TranslatableString.ErrorsLabel) }),
|
|
318
|
-
/* @__PURE__ */ jsxRuntime.jsx(List, { dense: true, ...errorList, children: errors.map((error, i) =>
|
|
319
|
-
|
|
318
|
+
/* @__PURE__ */ jsxRuntime.jsx(List, { dense: true, ...errorList, children: errors.map((error, i) => (
|
|
319
|
+
// oxlint-disable-next-line react/no-array-index-key
|
|
320
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ListItem, { ...errorListItem, children: [
|
|
320
321
|
/* @__PURE__ */ jsxRuntime.jsx(ListItemIcon, { ...errorListItemIcon, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, { color: "error" }) }),
|
|
321
322
|
/* @__PURE__ */ jsxRuntime.jsx(ListItemText, { primary: error.stack, ...errorListItemText })
|
|
322
|
-
] }, i)
|
|
323
|
-
|
|
323
|
+
] }, i)
|
|
324
|
+
)) })
|
|
324
325
|
] }) });
|
|
325
326
|
}
|
|
326
327
|
function FieldErrorTemplate(props) {
|
|
@@ -332,9 +333,10 @@
|
|
|
332
333
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
333
334
|
const muiProps = getMuiProps(uiOptions);
|
|
334
335
|
const { rjsfSlotProps: muiSlotProps } = muiProps;
|
|
335
|
-
return /* @__PURE__ */ jsxRuntime.jsx(List, { id, dense: true, disablePadding: true, ...muiSlotProps?.fieldErrorList, children: errors.map((error, i) =>
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
return /* @__PURE__ */ jsxRuntime.jsx(List, { id, dense: true, disablePadding: true, ...muiSlotProps?.fieldErrorList, children: errors.map((error, i) => (
|
|
337
|
+
// oxlint-disable-next-line react/no-array-index-key
|
|
338
|
+
/* @__PURE__ */ jsxRuntime.jsx(ListItem, { disableGutters: true, ...muiSlotProps?.fieldErrorListItem, children: /* @__PURE__ */ jsxRuntime.jsx(FormHelperText, { component: "div", id: `${id}-${i}`, ...muiSlotProps?.fieldErrorFormHelperText, children: error }) }, i)
|
|
339
|
+
)) });
|
|
338
340
|
}
|
|
339
341
|
function FieldHelpTemplate(props) {
|
|
340
342
|
const { fieldPathId, help, uiSchema, registry } = props;
|
|
@@ -411,7 +413,7 @@
|
|
|
411
413
|
FormControl,
|
|
412
414
|
{
|
|
413
415
|
fullWidth: true,
|
|
414
|
-
error: rawErrors.length
|
|
416
|
+
error: !!rawErrors.length,
|
|
415
417
|
required,
|
|
416
418
|
...muiSlotProps?.fieldFormControl,
|
|
417
419
|
sx: otherMuiProps.sx,
|
|
@@ -431,7 +433,7 @@
|
|
|
431
433
|
const { children, column, ...rest } = props;
|
|
432
434
|
return /* @__PURE__ */ jsxRuntime.jsx(Grid4, { container: !column, ...rest, children });
|
|
433
435
|
}
|
|
434
|
-
function
|
|
436
|
+
function MuiIconButtonFn(props) {
|
|
435
437
|
const { icon, color, uiSchema, registry, ...otherProps } = props;
|
|
436
438
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
437
439
|
const muiProps = getMuiProps(uiOptions, [
|
|
@@ -444,7 +446,9 @@
|
|
|
444
446
|
]);
|
|
445
447
|
return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...muiProps, ...otherProps, size: "small", color, children: icon });
|
|
446
448
|
}
|
|
447
|
-
|
|
449
|
+
var MuiIconButton = react.memo(MuiIconButtonFn);
|
|
450
|
+
var IconButton_default = MuiIconButton;
|
|
451
|
+
function CopyButtonFn(props) {
|
|
448
452
|
const {
|
|
449
453
|
registry: { translateString }
|
|
450
454
|
} = props;
|
|
@@ -457,7 +461,8 @@
|
|
|
457
461
|
}
|
|
458
462
|
);
|
|
459
463
|
}
|
|
460
|
-
|
|
464
|
+
var CopyButton = react.memo(CopyButtonFn);
|
|
465
|
+
function MoveDownButtonFn(props) {
|
|
461
466
|
const {
|
|
462
467
|
registry: { translateString }
|
|
463
468
|
} = props;
|
|
@@ -470,7 +475,8 @@
|
|
|
470
475
|
}
|
|
471
476
|
);
|
|
472
477
|
}
|
|
473
|
-
|
|
478
|
+
var MoveDownButton = react.memo(MoveDownButtonFn);
|
|
479
|
+
function MoveUpButtonFn(props) {
|
|
474
480
|
const {
|
|
475
481
|
registry: { translateString }
|
|
476
482
|
} = props;
|
|
@@ -483,7 +489,8 @@
|
|
|
483
489
|
}
|
|
484
490
|
);
|
|
485
491
|
}
|
|
486
|
-
|
|
492
|
+
var MoveUpButton = react.memo(MoveUpButtonFn);
|
|
493
|
+
function RemoveButtonFn(props) {
|
|
487
494
|
const { iconType, ...otherProps } = props;
|
|
488
495
|
const {
|
|
489
496
|
registry: { translateString }
|
|
@@ -498,7 +505,8 @@
|
|
|
498
505
|
}
|
|
499
506
|
);
|
|
500
507
|
}
|
|
501
|
-
|
|
508
|
+
var RemoveButton = react.memo(RemoveButtonFn);
|
|
509
|
+
function ClearButtonFn(props) {
|
|
502
510
|
const { iconType, ...otherProps } = props;
|
|
503
511
|
const {
|
|
504
512
|
registry: { translateString }
|
|
@@ -512,6 +520,7 @@
|
|
|
512
520
|
}
|
|
513
521
|
);
|
|
514
522
|
}
|
|
523
|
+
var ClearButton = react.memo(ClearButtonFn);
|
|
515
524
|
function MultiSchemaFieldTemplate(props) {
|
|
516
525
|
const { optionSchemaField, selector, uiSchema } = props;
|
|
517
526
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
@@ -584,7 +593,7 @@
|
|
|
584
593
|
children: [
|
|
585
594
|
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
586
595
|
properties.map(
|
|
587
|
-
(element
|
|
596
|
+
(element) => (
|
|
588
597
|
// Remove the <Grid> if the inner element is hidden as the <Grid>
|
|
589
598
|
// itself would otherwise still take up space.
|
|
590
599
|
element.hidden ? element.content : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -595,7 +604,7 @@
|
|
|
595
604
|
sx: computeSxProps({ mb: 1.25 }, objectGridItem),
|
|
596
605
|
children: element.content
|
|
597
606
|
},
|
|
598
|
-
|
|
607
|
+
element.name
|
|
599
608
|
)
|
|
600
609
|
)
|
|
601
610
|
)
|
|
@@ -627,7 +636,7 @@
|
|
|
627
636
|
const { id, registry, label, onAddClick, onRemoveClick, uiSchema } = props;
|
|
628
637
|
if (onAddClick) {
|
|
629
638
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
630
|
-
|
|
639
|
+
IconButton_default,
|
|
631
640
|
{
|
|
632
641
|
id,
|
|
633
642
|
registry,
|
|
@@ -638,7 +647,8 @@
|
|
|
638
647
|
icon: /* @__PURE__ */ jsxRuntime.jsx(AddIcon, { fontSize: "small" })
|
|
639
648
|
}
|
|
640
649
|
);
|
|
641
|
-
}
|
|
650
|
+
}
|
|
651
|
+
if (onRemoveClick) {
|
|
642
652
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
643
653
|
RemoveButton,
|
|
644
654
|
{
|
|
@@ -830,15 +840,15 @@
|
|
|
830
840
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
831
841
|
const optionValueFormat = utils.getOptionValueFormat(options);
|
|
832
842
|
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
833
|
-
const
|
|
843
|
+
const handleChange = (index) => ({ target: { checked } }) => {
|
|
834
844
|
if (checked) {
|
|
835
845
|
onChange(utils.enumOptionsSelectValue(index, checkboxesValues, enumOptions));
|
|
836
846
|
} else {
|
|
837
847
|
onChange(utils.enumOptionsDeselectValue(index, checkboxesValues, enumOptions));
|
|
838
848
|
}
|
|
839
849
|
};
|
|
840
|
-
const
|
|
841
|
-
const
|
|
850
|
+
const handleBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
851
|
+
const handleFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
842
852
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
843
853
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
844
854
|
utils.labelValue(
|
|
@@ -847,7 +857,7 @@
|
|
|
847
857
|
),
|
|
848
858
|
/* @__PURE__ */ jsxRuntime.jsx(FormGroup, { ...otherMuiProps, ...muiSlotProps?.formGroup, id, row: !!inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
849
859
|
const checked = utils.enumOptionsIsSelected(option.value, checkboxesValues);
|
|
850
|
-
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.
|
|
860
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
851
861
|
const checkbox = /* @__PURE__ */ jsxRuntime.jsx(
|
|
852
862
|
Checkbox,
|
|
853
863
|
{
|
|
@@ -857,9 +867,9 @@
|
|
|
857
867
|
checked,
|
|
858
868
|
disabled: disabled || itemDisabled || readonly,
|
|
859
869
|
autoFocus: autofocus && index === 0,
|
|
860
|
-
onChange:
|
|
861
|
-
onBlur:
|
|
862
|
-
onFocus:
|
|
870
|
+
onChange: handleChange(index),
|
|
871
|
+
onBlur: handleBlur,
|
|
872
|
+
onFocus: handleFocus,
|
|
863
873
|
"aria-describedby": utils.ariaDescribedByIds(id)
|
|
864
874
|
}
|
|
865
875
|
);
|
|
@@ -868,7 +878,7 @@
|
|
|
868
878
|
{
|
|
869
879
|
...muiSlotProps?.formControlLabel,
|
|
870
880
|
control: checkbox,
|
|
871
|
-
key:
|
|
881
|
+
key: String(option.value),
|
|
872
882
|
label: option.label
|
|
873
883
|
}
|
|
874
884
|
);
|
|
@@ -899,9 +909,9 @@
|
|
|
899
909
|
options
|
|
900
910
|
);
|
|
901
911
|
const required = utils.schemaRequiresTrueValue(schema);
|
|
902
|
-
const
|
|
903
|
-
const
|
|
904
|
-
const
|
|
912
|
+
const handleChange = (_, checked) => onChange(checked);
|
|
913
|
+
const handleBlur = () => onBlur(id, value);
|
|
914
|
+
const handleFocus = () => onFocus(id, value);
|
|
905
915
|
const description = options.description ?? schema.description;
|
|
906
916
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
907
917
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -929,9 +939,9 @@
|
|
|
929
939
|
required,
|
|
930
940
|
disabled: disabled || readonly,
|
|
931
941
|
autoFocus: autofocus,
|
|
932
|
-
onChange:
|
|
933
|
-
onBlur:
|
|
934
|
-
onFocus:
|
|
942
|
+
onChange: handleChange,
|
|
943
|
+
onBlur: handleBlur,
|
|
944
|
+
onFocus: handleFocus,
|
|
935
945
|
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
936
946
|
...muiSlotProps?.checkbox
|
|
937
947
|
}
|
|
@@ -945,9 +955,9 @@
|
|
|
945
955
|
const { id, htmlName, options, value, required, disabled, readonly, label, hideLabel, onChange, onBlur, onFocus } = props;
|
|
946
956
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
947
957
|
const optionValueFormat = utils.getOptionValueFormat(options);
|
|
948
|
-
const
|
|
949
|
-
const
|
|
950
|
-
const
|
|
958
|
+
const handleChange = (_, enumValue) => onChange(utils.enumOptionValueDecoder(enumValue, enumOptions, optionValueFormat, emptyValue));
|
|
959
|
+
const handleBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
960
|
+
const handleFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
951
961
|
const row = options ? options.inline : false;
|
|
952
962
|
const selectValue = utils.enumOptionSelectedValue(value, enumOptions, false, optionValueFormat, "");
|
|
953
963
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
@@ -965,12 +975,12 @@
|
|
|
965
975
|
name: htmlName || id,
|
|
966
976
|
value: selectValue,
|
|
967
977
|
row,
|
|
968
|
-
onChange:
|
|
969
|
-
onBlur:
|
|
970
|
-
onFocus:
|
|
978
|
+
onChange: handleChange,
|
|
979
|
+
onBlur: handleBlur,
|
|
980
|
+
onFocus: handleFocus,
|
|
971
981
|
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
972
982
|
children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
973
|
-
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.
|
|
983
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
974
984
|
const radio = /* @__PURE__ */ react.createElement(
|
|
975
985
|
FormControlLabel,
|
|
976
986
|
{
|
|
@@ -978,7 +988,7 @@
|
|
|
978
988
|
control: /* @__PURE__ */ jsxRuntime.jsx(Radio, { ...muiSlotProps?.radio, name: htmlName || id, id: utils.optionId(id, index), color: "primary" }),
|
|
979
989
|
label: option.label,
|
|
980
990
|
value: utils.enumOptionValueEncoder(option.value, index, optionValueFormat),
|
|
981
|
-
key:
|
|
991
|
+
key: String(option.value),
|
|
982
992
|
disabled: disabled || itemDisabled || readonly
|
|
983
993
|
}
|
|
984
994
|
);
|
|
@@ -991,11 +1001,11 @@
|
|
|
991
1001
|
function RangeWidget(props) {
|
|
992
1002
|
const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, required, label, hideLabel, id } = props;
|
|
993
1003
|
const sliderProps = { value, label, id, name: id, ...utils.rangeSpec(schema) };
|
|
994
|
-
const
|
|
995
|
-
onChange(
|
|
1004
|
+
const handleChange = (_, newValue) => {
|
|
1005
|
+
onChange(newValue ?? options.emptyValue);
|
|
996
1006
|
};
|
|
997
|
-
const
|
|
998
|
-
const
|
|
1007
|
+
const handleBlur = ({ target }) => onBlur(id, target && target.value);
|
|
1008
|
+
const handleFocus = ({ target }) => onFocus(id, target && target.value);
|
|
999
1009
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
1000
1010
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1001
1011
|
utils.labelValue(
|
|
@@ -1006,9 +1016,9 @@
|
|
|
1006
1016
|
Slider,
|
|
1007
1017
|
{
|
|
1008
1018
|
disabled: disabled || readonly,
|
|
1009
|
-
onChange:
|
|
1010
|
-
onBlur:
|
|
1011
|
-
onFocus:
|
|
1019
|
+
onChange: handleChange,
|
|
1020
|
+
onBlur: handleBlur,
|
|
1021
|
+
onFocus: handleFocus,
|
|
1012
1022
|
valueLabelDisplay: "auto",
|
|
1013
1023
|
...otherMuiProps,
|
|
1014
1024
|
...muiSlotProps?.slider,
|
|
@@ -1050,9 +1060,9 @@
|
|
|
1050
1060
|
const isMultiple = typeof multiple === "undefined" ? false : !!multiple;
|
|
1051
1061
|
const emptyValue = isMultiple ? [] : "";
|
|
1052
1062
|
const isEmpty = typeof value === "undefined" || isMultiple && value.length < 1 || !isMultiple && value === emptyValue;
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1063
|
+
const handleChange = ({ target: { value: newValue } }) => onChange(utils.enumOptionValueDecoder(newValue, enumOptions, optionValueFormat, optEmptyVal));
|
|
1064
|
+
const handleBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
|
|
1065
|
+
const handleFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
|
|
1056
1066
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
1057
1067
|
const { InputLabelProps, SelectProps, autocomplete, ...textFieldRemainingProps } = textFieldProps;
|
|
1058
1068
|
const showPlaceholderOption = !isMultiple && schema.default === void 0;
|
|
@@ -1069,9 +1079,9 @@
|
|
|
1069
1079
|
autoComplete: autocomplete,
|
|
1070
1080
|
placeholder,
|
|
1071
1081
|
error: rawErrors.length > 0,
|
|
1072
|
-
onChange:
|
|
1073
|
-
onBlur:
|
|
1074
|
-
onFocus:
|
|
1082
|
+
onChange: handleChange,
|
|
1083
|
+
onBlur: handleBlur,
|
|
1084
|
+
onFocus: handleFocus,
|
|
1075
1085
|
...{ ...otherMuiProps, ...textFieldRemainingProps },
|
|
1076
1086
|
select: true,
|
|
1077
1087
|
slotProps: {
|
|
@@ -1088,9 +1098,17 @@
|
|
|
1088
1098
|
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
1089
1099
|
children: [
|
|
1090
1100
|
showPlaceholderOption && /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { value: "", children: placeholder }),
|
|
1091
|
-
Array.isArray(enumOptions) && enumOptions.map(({ value:
|
|
1092
|
-
const
|
|
1093
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1101
|
+
Array.isArray(enumOptions) && enumOptions.map(({ value: enumValue, label: enumLabel }, i) => {
|
|
1102
|
+
const isDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(enumValue);
|
|
1103
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1104
|
+
MenuItem,
|
|
1105
|
+
{
|
|
1106
|
+
value: utils.enumOptionValueEncoder(enumValue, i, optionValueFormat),
|
|
1107
|
+
disabled: isDisabled,
|
|
1108
|
+
children: enumLabel
|
|
1109
|
+
},
|
|
1110
|
+
String(enumValue)
|
|
1111
|
+
);
|
|
1094
1112
|
})
|
|
1095
1113
|
]
|
|
1096
1114
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
/** The `AddButton` renders a button that represent the `Add` action on a form
|
|
3
3
|
*/
|
|
4
4
|
export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema, registry, ...props }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import AddIcon from '@mui/icons-material/Add';
|
|
3
3
|
import IconButton from '@mui/material/IconButton';
|
|
4
|
-
import { getUiOptions, TranslatableString
|
|
4
|
+
import { getUiOptions, TranslatableString } from '@rjsf/utils';
|
|
5
5
|
import { getMuiProps } from '../util.js';
|
|
6
6
|
/** The `AddButton` renders a button that represent the `Add` action on a form
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAE9C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACiB;IACzB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,WAAW,CAA8B,SAAS,EAAE;QACnE,OAAO;QACP,oBAAoB;QACpB,eAAe;QACf,MAAM;QACN,MAAM;QACN,IAAI;KACL,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,KAAM,KAAK,EAAE,KAAK,EAAC,SAAS,KAAK,QAAQ,YAC3G,KAAC,OAAO,KAAG,GACA,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BoxProps } from '@mui/material/Box';
|
|
2
|
-
import { GridProps } from '@mui/material/Grid';
|
|
3
|
-
import { PaperProps } from '@mui/material/Paper';
|
|
4
|
-
import { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema, GenericObjectType } from '@rjsf/utils';
|
|
1
|
+
import type { BoxProps } from '@mui/material/Box';
|
|
2
|
+
import type { GridProps } from '@mui/material/Grid';
|
|
3
|
+
import type { PaperProps } from '@mui/material/Paper';
|
|
4
|
+
import type { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema, GenericObjectType } from '@rjsf/utils';
|
|
5
5
|
/** Properties available for the `rjsfSlotProps` target of the ArrayFieldItemTemplate. */
|
|
6
6
|
export interface ArrayFieldItemTemplateMuiProps extends GenericObjectType {
|
|
7
7
|
/** RJSF-specific slot props for targeting child elements of the ArrayFieldItemTemplate. */
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import Grid from '@mui/material/Grid';
|
|
4
4
|
import Paper from '@mui/material/Paper';
|
|
5
|
-
import { getUiOptions, getTemplate
|
|
5
|
+
import { getUiOptions, getTemplate } from '@rjsf/utils';
|
|
6
6
|
import { computeSxProps, getMuiProps } from '../util.js';
|
|
7
7
|
/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAEA,OAAO,GAAG,MAAM,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AM,EAAE,EAAE,iBAAiB,CAAC,YAE3D,KAAC,GAAG,OAAK,iBAAiB,EAAE,EAAE,EAAE,cAAc,CAAW,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,iBAAiB,CAAC,YACpF,KAAC,KAAK,IAAC,SAAS,EAAE,CAAC,KAAM,cAAc,YACrC,KAAC,GAAG,OAAK,iBAAiB,EAAE,EAAE,EAAE,cAAc,CAAW,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,CAAC,YAClF,QAAQ,GACL,GACA,GACJ,GACD,EACN,UAAU,IAAI,CACb,KAAC,IAAI,OACC,oBAAoB,EACxB,EAAE,EAAE,cAAc,CAAY,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,YAEvF,KAAC,6BAA6B,OAAK,YAAY,EAAE,KAAK,EAAE,QAAQ,GAAI,GAC/D,CACR,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BoxProps } from '@mui/material/Box';
|
|
2
|
-
import { GridProps } from '@mui/material/Grid';
|
|
3
|
-
import { PaperProps } from '@mui/material/Paper';
|
|
4
|
-
import { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema, GenericObjectType } from '@rjsf/utils';
|
|
1
|
+
import type { BoxProps } from '@mui/material/Box';
|
|
2
|
+
import type { GridProps } from '@mui/material/Grid';
|
|
3
|
+
import type { PaperProps } from '@mui/material/Paper';
|
|
4
|
+
import type { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema, GenericObjectType } from '@rjsf/utils';
|
|
5
5
|
/** Properties available for the `rjsfSlotProps` target of the ArrayFieldTemplate. */
|
|
6
6
|
export interface ArrayFieldTemplateMuiProps extends GenericObjectType {
|
|
7
7
|
/** RJSF-specific slot props for targeting child elements of the ArrayFieldTemplate. */
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import Grid from '@mui/material/Grid';
|
|
4
4
|
import Paper from '@mui/material/Paper';
|
|
5
|
-
import { getTemplate, getUiOptions, buttonId
|
|
5
|
+
import { getTemplate, getUiOptions, buttonId } from '@rjsf/utils';
|
|
6
6
|
import { computeSxProps, getMuiProps } from '../util.js';
|
|
7
7
|
/** The `ArrayFieldTemplate` component is the template used to render all items in an array.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAEpC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAQxC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAmBtD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,GACN,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,uBAA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E,EAAE,2BAA2B,CAAC,YAE1F,KAAC,IAAI,OAAK,sBAAsB,YAC9B,KAAC,GAAG,OAAK,iBAAiB,EAAE,EAAE,EAAE,cAAc,CAAW,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,iBAAiB,CAAC,YACpF,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,EAChC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACE,GACD,GACF,CACR,IACG,GACA,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InputProps as MuiInputProps } from '@mui/material/Input';
|
|
2
|
-
import { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel';
|
|
3
|
-
import { BaseInputTemplateProps, FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { InputProps as MuiInputProps } from '@mui/material/Input';
|
|
2
|
+
import type { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel';
|
|
3
|
+
import type { BaseInputTemplateProps, FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
4
4
|
/** Properties available for the MUI `ui:options` of the BaseInputTemplate.
|
|
5
5
|
* Unlike RJSF templates, `slotProps` here maps directly to MUI's native `TextField` `slotProps`,
|
|
6
6
|
* enabling type-safe customization of the underlying MUI sub-components. */
|
|
@@ -3,7 +3,7 @@ import { useCallback } from 'react';
|
|
|
3
3
|
import InputAdornment from '@mui/material/InputAdornment';
|
|
4
4
|
import TextField from '@mui/material/TextField';
|
|
5
5
|
import { SchemaExamples } from '@rjsf/core';
|
|
6
|
-
import { ariaDescribedByIds, examplesId, getInputProps, labelValue
|
|
6
|
+
import { ariaDescribedByIds, examplesId, getInputProps, labelValue } from '@rjsf/utils';
|
|
7
7
|
import { getMuiProps } from '../util.js';
|
|
8
8
|
const TYPES_THAT_SHRINK_LABEL = ['date', 'datetime-local', 'file', 'time'];
|
|
9
9
|
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
@@ -29,13 +29,13 @@ export default function BaseInputTemplate(props) {
|
|
|
29
29
|
accept,
|
|
30
30
|
...(schema.examples ? { list: examplesId(id) } : undefined),
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
32
|
+
const handleChange = ({ target: { value: newValue } }) => onChange(newValue === '' ? options.emptyValue : newValue);
|
|
33
|
+
const handleBlur = ({ target }) => onBlur(id, target && target.value);
|
|
34
|
+
const handleFocus = ({ target }) => onFocus(id, target && target.value);
|
|
35
35
|
const DisplayInputLabelProps = TYPES_THAT_SHRINK_LABEL.includes(type)
|
|
36
36
|
? { ...slotProps === null || slotProps === void 0 ? void 0 : slotProps.inputLabel, ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.inputLabel, ...InputLabelProps, shrink: true }
|
|
37
37
|
: { ...slotProps === null || slotProps === void 0 ? void 0 : slotProps.inputLabel, ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.inputLabel, ...InputLabelProps };
|
|
38
|
-
const
|
|
38
|
+
const handleClear = useCallback((e) => {
|
|
39
39
|
var _a;
|
|
40
40
|
e.preventDefault();
|
|
41
41
|
e.stopPropagation();
|
|
@@ -43,7 +43,7 @@ export default function BaseInputTemplate(props) {
|
|
|
43
43
|
}, [onChange, options.emptyValue]);
|
|
44
44
|
const inputProps = { ...InputProps, ...slotProps === null || slotProps === void 0 ? void 0 : slotProps.input, ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.input };
|
|
45
45
|
if (options.allowClearTextInputs && value && !readonly && !disabled) {
|
|
46
|
-
const clearAdornment = (_jsx(InputAdornment, { position: 'end', children: _jsx(ClearButton, { registry: registry, onClick:
|
|
46
|
+
const clearAdornment = (_jsx(InputAdornment, { position: 'end', children: _jsx(ClearButton, { registry: registry, onClick: handleClear }) }));
|
|
47
47
|
inputProps.endAdornment = !inputProps.endAdornment ? (clearAdornment) : (_jsxs(_Fragment, { children: [inputProps.endAdornment, clearAdornment] }));
|
|
48
48
|
}
|
|
49
49
|
return (_jsxs(_Fragment, { children: [_jsx(TextField, { id: id, name: htmlName || id, placeholder: placeholder, label: labelValue(label || undefined, hideLabel, undefined), autoFocus: autofocus, required: required, disabled: disabled || readonly, slotProps: {
|
|
@@ -52,6 +52,6 @@ export default function BaseInputTemplate(props) {
|
|
|
52
52
|
input: inputProps,
|
|
53
53
|
htmlInput: htmlInputProps,
|
|
54
54
|
inputLabel: DisplayInputLabelProps,
|
|
55
|
-
}, ...rest, value: value || value === 0 ? value : '', error: rawErrors.length > 0, onChange: onChangeOverride ||
|
|
55
|
+
}, ...rest, value: value || value === 0 ? value : '', error: rawErrors.length > 0, onChange: onChangeOverride || handleChange, onBlur: handleBlur, onFocus: handleFocus, ...{ ...otherMuiProps, ...textFieldProps }, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), _jsx(SchemaExamples, { id: id, schema: schema })] }));
|
|
56
56
|
}
|
|
57
57
|
//# sourceMappingURL=BaseInputTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAQ5C,OA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GAAG,CAAC,EAC3B,QAAQ,EAAE,gBAAgB,IAAI,YAAY,EAC1C,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,KACf,EAAE,GAAG,aAAa,EAAE,GAAG,cAAc,EAAqB,sBAC7C,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAC3D,EACF,KAAC,cAAc,IAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,GAAI,IACzC,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
2
|
-
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
3
|
-
import { FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
1
|
+
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
2
|
+
import type { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
3
|
+
import type { FormContextType, GenericObjectType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
4
4
|
/** Properties available for the `rjsfSlotProps` target of the CheckboxWidget. */
|
|
5
5
|
export interface CheckboxWidgetMuiProps extends GenericObjectType {
|
|
6
6
|
/** RJSF-specific slot props for targeting child elements of the CheckboxWidget. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Checkbox from '@mui/material/Checkbox';
|
|
3
3
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
-
import { ariaDescribedByIds, descriptionId, getTemplate, labelValue, schemaRequiresTrueValue
|
|
4
|
+
import { ariaDescribedByIds, descriptionId, getTemplate, labelValue, schemaRequiresTrueValue } from '@rjsf/utils';
|
|
5
5
|
import { getMuiProps } from '../util.js';
|
|
6
6
|
/** The `CheckBoxWidget` is a widget for rendering boolean properties.
|
|
7
7
|
* It is typically used to represent a boolean.
|
|
@@ -16,11 +16,11 @@ export default function CheckboxWidget(props) {
|
|
|
16
16
|
// the "required" attribute if the field value must be "true", due to the
|
|
17
17
|
// "const" or "enum" keywords
|
|
18
18
|
const required = schemaRequiresTrueValue(schema);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
19
|
+
const handleChange = (_, checked) => onChange(checked);
|
|
20
|
+
const handleBlur = () => onBlur(id, value);
|
|
21
|
+
const handleFocus = () => onFocus(id, value);
|
|
22
22
|
const description = (_a = options.description) !== null && _a !== void 0 ? _a : schema.description;
|
|
23
23
|
const { rjsfSlotProps: muiSlotProps, ...otherMuiProps } = getMuiProps(options);
|
|
24
|
-
return (_jsxs(_Fragment, { children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(FormControlLabel, { ...otherMuiProps, ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.formControlLabel, control: _jsx(Checkbox, { id: id, name: htmlName || id, checked: typeof value === 'undefined' ? false : Boolean(value), required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange:
|
|
24
|
+
return (_jsxs(_Fragment, { children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(FormControlLabel, { ...otherMuiProps, ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.formControlLabel, control: _jsx(Checkbox, { id: id, name: htmlName || id, checked: typeof value === 'undefined' ? false : Boolean(value), required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id), ...muiSlotProps === null || muiSlotProps === void 0 ? void 0 : muiSlotProps.checkbox }), label: labelValue(label, hideLabel, false) })] }));
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=CheckboxWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";AACA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAE9C,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAElH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAatC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAIpC,KAA2B;;IAC3B,MAAM,EACJ,MAAM,EACN,EAAE,EACF,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,OAAO,CACR,CAAC;IACF,8EAA8E;IAC9E,yEAAyE;IACzE,6BAA6B;IAC7B,MAAM,QAAQ,GAAG,uBAAuB,CAAI,MAAM,CAAC,CAAC;IAEpD,MAAM,YAAY,GAAG,CAAC,CAAM,EAAE,OAAgB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACrE,MAAM,UAAU,GAA+C,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACvF,MAAM,WAAW,GAA+C,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACzF,MAAM,WAAW,GAAG,MAAA,OAAO,CAAC,WAAW,mCAAI,MAAM,CAAC,WAAW,CAAC;IAE9D,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,GAAG,WAAW,CAAkC,OAAO,CAAC,CAAC;IAEhH,OAAO,CACL,8BACG,CAAC,SAAS,IAAI,WAAW,IAAI,CAC5B,KAAC,wBAAwB,IACvB,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACD,KAAC,gBAAgB,OACX,aAAa,KACb,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,gBAAgB,EAClC,OAAO,EACL,KAAC,QAAQ,IACP,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,QAAQ,IAAI,EAAE,EACpB,OAAO,EAAE,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAC9D,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,sBACF,kBAAkB,CAAC,EAAE,CAAC,KACpC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,GAC1B,EAEJ,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,GAC1C,IACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
2
|
-
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
3
|
-
import { FormGroupProps } from '@mui/material/FormGroup';
|
|
4
|
-
import { FormContextType, GenericObjectType, WidgetProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
1
|
+
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
2
|
+
import type { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
3
|
+
import type { FormGroupProps } from '@mui/material/FormGroup';
|
|
4
|
+
import type { FormContextType, GenericObjectType, WidgetProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
5
5
|
/** Properties available for the `rjsfSlotProps` target of the CheckboxesWidget. */
|
|
6
6
|
export interface CheckboxesWidgetMuiProps extends GenericObjectType {
|
|
7
7
|
/** RJSF-specific slot props for targeting child elements of the CheckboxesWidget. */
|