@rjsf/mantine 6.5.2 → 6.6.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/dist/index.cjs +438 -440
- package/dist/index.cjs.map +4 -4
- package/dist/mantine.esm.js +418 -420
- package/dist/mantine.esm.js.map +4 -4
- package/dist/mantine.umd.js +245 -245
- package/lib/templates/ArrayFieldItemTemplate.js +1 -1
- package/lib/templates/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/templates/ArrayFieldTemplate.js +1 -1
- package/lib/templates/ArrayFieldTemplate.js.map +1 -1
- package/lib/templates/ArrayFieldTitleTemplate.js +1 -1
- package/lib/templates/ArrayFieldTitleTemplate.js.map +1 -1
- package/lib/templates/BaseInputTemplate.js +1 -1
- package/lib/templates/BaseInputTemplate.js.map +1 -1
- package/lib/templates/ButtonTemplates/AddButton.js +1 -1
- package/lib/templates/ButtonTemplates/AddButton.js.map +1 -1
- package/lib/templates/ButtonTemplates/index.js +1 -1
- package/lib/templates/ButtonTemplates/index.js.map +1 -1
- package/lib/templates/DescriptionField.js +1 -1
- package/lib/templates/DescriptionField.js.map +1 -1
- package/lib/templates/ErrorList.js +1 -1
- package/lib/templates/ErrorList.js.map +1 -1
- package/lib/templates/FieldErrorTemplate.js +1 -1
- package/lib/templates/FieldErrorTemplate.js.map +1 -1
- package/lib/templates/FieldHelpTemplate.js +1 -1
- package/lib/templates/FieldHelpTemplate.js.map +1 -1
- package/lib/templates/TitleField.js.map +1 -1
- package/lib/templates/WrapIfAdditionalTemplate.js +1 -1
- package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/templates/index.js +3 -3
- package/lib/templates/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/widgets/CheckboxWidget.js +1 -1
- package/lib/widgets/CheckboxWidget.js.map +1 -1
- package/lib/widgets/CheckboxesWidget.js +1 -1
- package/lib/widgets/CheckboxesWidget.js.map +1 -1
- package/lib/widgets/ColorWidget.js +1 -1
- package/lib/widgets/ColorWidget.js.map +1 -1
- package/lib/widgets/DateTime/AltDateWidget.js +1 -1
- package/lib/widgets/DateTime/AltDateWidget.js.map +1 -1
- package/lib/widgets/DateTime/DateTimeInput.js +1 -1
- package/lib/widgets/DateTime/DateTimeInput.js.map +1 -1
- package/lib/widgets/DateTime/TimeWidget.js +1 -1
- package/lib/widgets/DateTime/TimeWidget.js.map +1 -1
- package/lib/widgets/FileWidget.js +3 -2
- package/lib/widgets/FileWidget.js.map +1 -1
- package/lib/widgets/PasswordWidget.js +1 -1
- package/lib/widgets/PasswordWidget.js.map +1 -1
- package/lib/widgets/RadioWidget.js +1 -1
- package/lib/widgets/RadioWidget.js.map +1 -1
- package/lib/widgets/RangeWidget.js +1 -1
- package/lib/widgets/RangeWidget.js.map +1 -1
- package/lib/widgets/SelectWidget.js +1 -1
- package/lib/widgets/SelectWidget.js.map +1 -1
- package/lib/widgets/TextareaWidget.js +1 -1
- package/lib/widgets/TextareaWidget.js.map +1 -1
- package/lib/widgets/index.js +1 -1
- package/lib/widgets/index.js.map +1 -1
- package/package.json +13 -13
- package/src/templates/ArrayFieldItemTemplate.tsx +1 -1
- package/src/templates/ArrayFieldTemplate.tsx +1 -1
- package/src/templates/ArrayFieldTitleTemplate.tsx +1 -1
- package/src/templates/BaseInputTemplate.tsx +2 -2
- package/src/templates/ButtonTemplates/AddButton.tsx +1 -1
- package/src/templates/ButtonTemplates/index.ts +2 -1
- package/src/templates/DescriptionField.tsx +2 -2
- package/src/templates/ErrorList.tsx +1 -1
- package/src/templates/FieldErrorTemplate.tsx +1 -1
- package/src/templates/FieldHelpTemplate.tsx +1 -1
- package/src/templates/TitleField.tsx +1 -1
- package/src/templates/WrapIfAdditionalTemplate.tsx +1 -1
- package/src/templates/index.ts +3 -3
- package/src/tsconfig.json +0 -1
- package/src/widgets/CheckboxWidget.tsx +1 -1
- package/src/widgets/CheckboxesWidget.tsx +1 -1
- package/src/widgets/ColorWidget.tsx +1 -1
- package/src/widgets/DateTime/AltDateWidget.tsx +1 -1
- package/src/widgets/DateTime/DateTimeInput.tsx +1 -1
- package/src/widgets/DateTime/TimeWidget.tsx +1 -1
- package/src/widgets/FileWidget.tsx +3 -2
- package/src/widgets/PasswordWidget.tsx +1 -1
- package/src/widgets/RadioWidget.tsx +1 -1
- package/src/widgets/RangeWidget.tsx +1 -1
- package/src/widgets/SelectWidget.tsx +1 -1
- package/src/widgets/TextareaWidget.tsx +1 -1
- package/src/widgets/index.ts +1 -1
package/dist/mantine.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/mantine"] = {}, global.core, global.
|
|
5
|
-
})(this, (function (exports, core,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('@mantine/core'), require('@rjsf/utils'), require('react/jsx-runtime'), require('react'), require('dayjs'), require('dayjs/plugin/customParseFormat'), require('@mantine/dates')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', '@mantine/core', '@rjsf/utils', 'react/jsx-runtime', 'react', 'dayjs', 'dayjs/plugin/customParseFormat', '@mantine/dates'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/mantine"] = {}, global.core, global.core$1, global.utils, global.jsxRuntime, global.react, global.dayjs, global.customParseFormat, global.dates));
|
|
5
|
+
})(this, (function (exports, core, core$1, utils, jsxRuntime, react, dayjs, customParseFormat, dates) { 'use strict';
|
|
6
6
|
|
|
7
7
|
// src/Form/index.ts
|
|
8
8
|
function ArrayFieldItemTemplate(props) {
|
|
@@ -249,13 +249,6 @@
|
|
|
249
249
|
/* @__PURE__ */ jsxRuntime.jsx(core.SchemaExamples, { id, schema })
|
|
250
250
|
] });
|
|
251
251
|
}
|
|
252
|
-
function DescriptionField(props) {
|
|
253
|
-
const { id, description, registry, uiSchema } = props;
|
|
254
|
-
if (description) {
|
|
255
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Text, { id, mt: 3, mb: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(core.RichDescription, { description, registry, uiSchema }) });
|
|
256
|
-
}
|
|
257
|
-
return null;
|
|
258
|
-
}
|
|
259
252
|
function Plus({ size, style, ...others }) {
|
|
260
253
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
261
254
|
"svg",
|
|
@@ -398,29 +391,6 @@
|
|
|
398
391
|
}
|
|
399
392
|
);
|
|
400
393
|
}
|
|
401
|
-
function ErrorList({
|
|
402
|
-
errors,
|
|
403
|
-
registry
|
|
404
|
-
}) {
|
|
405
|
-
const { translateString } = registry;
|
|
406
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
407
|
-
core$1.Alert,
|
|
408
|
-
{
|
|
409
|
-
color: "red",
|
|
410
|
-
variant: "transparent",
|
|
411
|
-
title: /* @__PURE__ */ jsxRuntime.jsx(core$1.Title, { order: 5, fw: "normal", children: translateString(utils.TranslatableString.ErrorsLabel) }),
|
|
412
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(ExclamationCircle, {}),
|
|
413
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(core$1.List, { children: errors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx(core$1.List.Item, { c: "red", children: error.stack }, `error-${index}`)) })
|
|
414
|
-
}
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
function SubmitButton({ uiSchema }) {
|
|
418
|
-
const { submitText, norender, props: submitButtonProps = {} } = utils.getSubmitButtonOptions(uiSchema);
|
|
419
|
-
if (norender) {
|
|
420
|
-
return null;
|
|
421
|
-
}
|
|
422
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { type: "submit", variant: "filled", ...submitButtonProps, children: submitText });
|
|
423
|
-
}
|
|
424
394
|
function IconButton(props) {
|
|
425
395
|
const { icon, iconType = "sm", color, onClick, uiSchema, registry, ...otherProps } = props;
|
|
426
396
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -495,6 +465,13 @@
|
|
|
495
465
|
} = props;
|
|
496
466
|
return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.AddItemButton), variant: "subtle", ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(Plus, {}) });
|
|
497
467
|
}
|
|
468
|
+
function SubmitButton({ uiSchema }) {
|
|
469
|
+
const { submitText, norender, props: submitButtonProps = {} } = utils.getSubmitButtonOptions(uiSchema);
|
|
470
|
+
if (norender) {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { type: "submit", variant: "filled", ...submitButtonProps, children: submitText });
|
|
474
|
+
}
|
|
498
475
|
|
|
499
476
|
// src/templates/ButtonTemplates/index.ts
|
|
500
477
|
function buttonTemplates() {
|
|
@@ -509,6 +486,29 @@
|
|
|
509
486
|
};
|
|
510
487
|
}
|
|
511
488
|
var ButtonTemplates_default = buttonTemplates;
|
|
489
|
+
function DescriptionField(props) {
|
|
490
|
+
const { id, description, registry, uiSchema } = props;
|
|
491
|
+
if (description) {
|
|
492
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Text, { id, mt: 3, mb: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(core.RichDescription, { description, registry, uiSchema }) });
|
|
493
|
+
}
|
|
494
|
+
return null;
|
|
495
|
+
}
|
|
496
|
+
function ErrorList({
|
|
497
|
+
errors,
|
|
498
|
+
registry
|
|
499
|
+
}) {
|
|
500
|
+
const { translateString } = registry;
|
|
501
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
502
|
+
core$1.Alert,
|
|
503
|
+
{
|
|
504
|
+
color: "red",
|
|
505
|
+
variant: "transparent",
|
|
506
|
+
title: /* @__PURE__ */ jsxRuntime.jsx(core$1.Title, { order: 5, fw: "normal", children: translateString(utils.TranslatableString.ErrorsLabel) }),
|
|
507
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(ExclamationCircle, {}),
|
|
508
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(core$1.List, { children: errors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx(core$1.List.Item, { c: "red", children: error.stack }, `error-${index}`)) })
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
512
|
function FieldErrorTemplate({ errors, fieldPathId }) {
|
|
513
513
|
if (!errors || !errors.length) {
|
|
514
514
|
return null;
|
|
@@ -516,6 +516,13 @@
|
|
|
516
516
|
const id = utils.errorId(fieldPathId);
|
|
517
517
|
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Box, { id, c: "red", display: "none", children: /* @__PURE__ */ jsxRuntime.jsx(core$1.List, { children: errors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx(core$1.List.Item, { children: error }, `field-error-${index}`)) }) });
|
|
518
518
|
}
|
|
519
|
+
function FieldHelpTemplate(props) {
|
|
520
|
+
const { fieldPathId, help, uiSchema, registry } = props;
|
|
521
|
+
if (!help) {
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Text, { id: utils.helpId(fieldPathId), size: "sm", my: "xs", c: "dimmed", children: /* @__PURE__ */ jsxRuntime.jsx(core.RichHelp, { help, registry, uiSchema }) });
|
|
525
|
+
}
|
|
519
526
|
function FieldTemplate(props) {
|
|
520
527
|
const {
|
|
521
528
|
id,
|
|
@@ -564,13 +571,6 @@
|
|
|
564
571
|
}
|
|
565
572
|
);
|
|
566
573
|
}
|
|
567
|
-
function FieldHelpTemplate(props) {
|
|
568
|
-
const { fieldPathId, help, uiSchema, registry } = props;
|
|
569
|
-
if (!help) {
|
|
570
|
-
return null;
|
|
571
|
-
}
|
|
572
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Text, { id: utils.helpId(fieldPathId), size: "sm", my: "xs", c: "dimmed", children: /* @__PURE__ */ jsxRuntime.jsx(core.RichHelp, { help, registry, uiSchema }) });
|
|
573
|
-
}
|
|
574
574
|
function GridTemplate(props) {
|
|
575
575
|
const { children, column, fluid = true, ...rest } = props;
|
|
576
576
|
if (column) {
|
|
@@ -581,6 +581,12 @@
|
|
|
581
581
|
}
|
|
582
582
|
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Grid, { grow: true, ...rest, children });
|
|
583
583
|
}
|
|
584
|
+
function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
|
|
585
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core$1.Stack, { style: { marginBottom: "1rem" }, children: [
|
|
586
|
+
selector,
|
|
587
|
+
optionSchemaField
|
|
588
|
+
] });
|
|
589
|
+
}
|
|
584
590
|
function ObjectFieldTemplate(props) {
|
|
585
591
|
const {
|
|
586
592
|
title,
|
|
@@ -763,12 +769,6 @@
|
|
|
763
769
|
) })
|
|
764
770
|
] }) });
|
|
765
771
|
}
|
|
766
|
-
function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
|
|
767
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(core$1.Stack, { style: { marginBottom: "1rem" }, children: [
|
|
768
|
-
selector,
|
|
769
|
-
optionSchemaField
|
|
770
|
-
] });
|
|
771
|
-
}
|
|
772
772
|
|
|
773
773
|
// src/templates/index.ts
|
|
774
774
|
function generateTemplates() {
|
|
@@ -792,203 +792,6 @@
|
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
794
|
var templates_default = generateTemplates();
|
|
795
|
-
function AltDateTimeWidget(props) {
|
|
796
|
-
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
797
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AltDateWidget2, { time: true, ...props });
|
|
798
|
-
}
|
|
799
|
-
function AltDateWidget(props) {
|
|
800
|
-
const { id, required, disabled, readonly, label, hideLabel, rawErrors, options, registry } = props;
|
|
801
|
-
const { translateString } = registry;
|
|
802
|
-
const { elements, handleChange, handleClear, handleSetNow } = utils.useAltDateWidgetProps(props);
|
|
803
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
804
|
-
!hideLabel && !!label && /* @__PURE__ */ jsxRuntime.jsx(core$1.Input.Label, { id: utils.titleId(id), required, children: label }),
|
|
805
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core$1.Flex, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
806
|
-
elements.map((elemProps, i) => {
|
|
807
|
-
const elemId = `${id}_${elemProps.type}`;
|
|
808
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
809
|
-
core$1.Select,
|
|
810
|
-
{
|
|
811
|
-
id: elemId,
|
|
812
|
-
name: elemId,
|
|
813
|
-
placeholder: elemProps.type,
|
|
814
|
-
disabled: disabled || readonly,
|
|
815
|
-
data: utils.dateRangeOptions(elemProps.range[0], elemProps.range[1]).map((item) => item.value.toString()),
|
|
816
|
-
value: !elemProps.value || elemProps.value < 0 ? null : elemProps.value.toString(),
|
|
817
|
-
onChange: (v) => handleChange(elemProps.type, v || void 0),
|
|
818
|
-
searchable: false,
|
|
819
|
-
allowDeselect: false,
|
|
820
|
-
comboboxProps: { withinPortal: false },
|
|
821
|
-
"aria-describedby": utils.ariaDescribedByIds(elemId)
|
|
822
|
-
}
|
|
823
|
-
) }, i);
|
|
824
|
-
}),
|
|
825
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core$1.Group, { wrap: "nowrap", gap: 3, children: [
|
|
826
|
-
(options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { variant: "subtle", size: "xs", onClick: handleSetNow, children: translateString(utils.TranslatableString.NowLabel) }),
|
|
827
|
-
(options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { variant: "subtle", size: "xs", onClick: handleClear, children: translateString(utils.TranslatableString.ClearLabel) })
|
|
828
|
-
] })
|
|
829
|
-
] }),
|
|
830
|
-
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx(core$1.Input.Error, { children: error }, `alt-date-widget-input-errors-${index}`))
|
|
831
|
-
] });
|
|
832
|
-
}
|
|
833
|
-
var dateParser = (input, format) => {
|
|
834
|
-
if (!input) {
|
|
835
|
-
return null;
|
|
836
|
-
}
|
|
837
|
-
const d = dayjs(input, format);
|
|
838
|
-
return d.isValid() ? d.toDate() : null;
|
|
839
|
-
};
|
|
840
|
-
var dateFormat = (date, format) => {
|
|
841
|
-
if (!date) {
|
|
842
|
-
return "";
|
|
843
|
-
}
|
|
844
|
-
return dayjs(date).format(format || "YYYY-MM-DD");
|
|
845
|
-
};
|
|
846
|
-
function DateTimeInput(props) {
|
|
847
|
-
const {
|
|
848
|
-
id,
|
|
849
|
-
name,
|
|
850
|
-
value,
|
|
851
|
-
placeholder,
|
|
852
|
-
required,
|
|
853
|
-
disabled,
|
|
854
|
-
readonly,
|
|
855
|
-
autofocus,
|
|
856
|
-
label,
|
|
857
|
-
hideLabel,
|
|
858
|
-
rawErrors,
|
|
859
|
-
options,
|
|
860
|
-
onChange,
|
|
861
|
-
onBlur,
|
|
862
|
-
onFocus,
|
|
863
|
-
valueFormat,
|
|
864
|
-
displayFormat
|
|
865
|
-
} = props;
|
|
866
|
-
const handleChange = react.useCallback(
|
|
867
|
-
(nextValue) => {
|
|
868
|
-
onChange(dateFormat(nextValue, valueFormat));
|
|
869
|
-
},
|
|
870
|
-
[onChange, valueFormat]
|
|
871
|
-
);
|
|
872
|
-
const handleBlur = react.useCallback(() => {
|
|
873
|
-
if (onBlur) {
|
|
874
|
-
onBlur(id, value);
|
|
875
|
-
}
|
|
876
|
-
}, [onBlur, id, value]);
|
|
877
|
-
const handleFocus = react.useCallback(() => {
|
|
878
|
-
if (onFocus) {
|
|
879
|
-
onFocus(id, value);
|
|
880
|
-
}
|
|
881
|
-
}, [onFocus, id, value]);
|
|
882
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
883
|
-
dates.DateInput,
|
|
884
|
-
{
|
|
885
|
-
id,
|
|
886
|
-
name,
|
|
887
|
-
value: dateParser(value, valueFormat),
|
|
888
|
-
dateParser: (v) => dateParser(v, displayFormat),
|
|
889
|
-
placeholder: placeholder || void 0,
|
|
890
|
-
required,
|
|
891
|
-
disabled: disabled || readonly,
|
|
892
|
-
autoFocus: autofocus,
|
|
893
|
-
label: utils.labelValue(label || void 0, hideLabel, false),
|
|
894
|
-
onChange: handleChange,
|
|
895
|
-
onBlur: handleBlur,
|
|
896
|
-
onFocus: handleFocus,
|
|
897
|
-
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
898
|
-
...options,
|
|
899
|
-
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
900
|
-
popoverProps: { withinPortal: false },
|
|
901
|
-
classNames: typeof options?.classNames === "object" ? options.classNames : void 0,
|
|
902
|
-
valueFormat: displayFormat
|
|
903
|
-
}
|
|
904
|
-
);
|
|
905
|
-
}
|
|
906
|
-
function DateWidget(props) {
|
|
907
|
-
const { valueFormat = "YYYY-MM-DD", displayFormat, ...otherOptions } = props.options;
|
|
908
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
909
|
-
DateTimeInput,
|
|
910
|
-
{
|
|
911
|
-
...props,
|
|
912
|
-
options: otherOptions,
|
|
913
|
-
valueFormat,
|
|
914
|
-
displayFormat: displayFormat || valueFormat
|
|
915
|
-
}
|
|
916
|
-
);
|
|
917
|
-
}
|
|
918
|
-
function DateTimeWidget(props) {
|
|
919
|
-
const { valueFormat = "YYYY-MM-DD HH:mm:ss", displayFormat, ...otherOptions } = props.options;
|
|
920
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
-
DateTimeInput,
|
|
922
|
-
{
|
|
923
|
-
...props,
|
|
924
|
-
options: otherOptions,
|
|
925
|
-
valueFormat,
|
|
926
|
-
displayFormat: displayFormat || valueFormat
|
|
927
|
-
}
|
|
928
|
-
);
|
|
929
|
-
}
|
|
930
|
-
function TimeWidget(props) {
|
|
931
|
-
const {
|
|
932
|
-
id,
|
|
933
|
-
name,
|
|
934
|
-
value,
|
|
935
|
-
placeholder,
|
|
936
|
-
required,
|
|
937
|
-
disabled,
|
|
938
|
-
readonly,
|
|
939
|
-
autofocus,
|
|
940
|
-
label,
|
|
941
|
-
hideLabel,
|
|
942
|
-
rawErrors,
|
|
943
|
-
options,
|
|
944
|
-
onChange,
|
|
945
|
-
onBlur,
|
|
946
|
-
onFocus
|
|
947
|
-
} = props;
|
|
948
|
-
const emptyValue = options.emptyValue || "";
|
|
949
|
-
const handleChange = react.useCallback(
|
|
950
|
-
(e) => {
|
|
951
|
-
onChange(e.target.value === "" ? emptyValue : e.target.value);
|
|
952
|
-
},
|
|
953
|
-
[onChange, emptyValue]
|
|
954
|
-
);
|
|
955
|
-
const handleBlur = react.useCallback(
|
|
956
|
-
({ target }) => {
|
|
957
|
-
if (onBlur) {
|
|
958
|
-
onBlur(id, target && target.value);
|
|
959
|
-
}
|
|
960
|
-
},
|
|
961
|
-
[onBlur, id]
|
|
962
|
-
);
|
|
963
|
-
const handleFocus = react.useCallback(
|
|
964
|
-
({ target }) => {
|
|
965
|
-
if (onFocus) {
|
|
966
|
-
onFocus(id, target && target.value);
|
|
967
|
-
}
|
|
968
|
-
},
|
|
969
|
-
[onFocus, id]
|
|
970
|
-
);
|
|
971
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
972
|
-
dates.TimeInput,
|
|
973
|
-
{
|
|
974
|
-
id,
|
|
975
|
-
name,
|
|
976
|
-
value: value || "",
|
|
977
|
-
placeholder: placeholder || void 0,
|
|
978
|
-
required,
|
|
979
|
-
disabled: disabled || readonly,
|
|
980
|
-
autoFocus: autofocus,
|
|
981
|
-
label: utils.labelValue(label || void 0, hideLabel, false),
|
|
982
|
-
onChange: handleChange,
|
|
983
|
-
onBlur: handleBlur,
|
|
984
|
-
onFocus: handleFocus,
|
|
985
|
-
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
986
|
-
...options,
|
|
987
|
-
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
988
|
-
classNames: typeof options?.classNames === "object" ? options.classNames : void 0
|
|
989
|
-
}
|
|
990
|
-
);
|
|
991
|
-
}
|
|
992
795
|
function CheckboxesWidget(props) {
|
|
993
796
|
const {
|
|
994
797
|
id,
|
|
@@ -1208,6 +1011,203 @@
|
|
|
1208
1011
|
}
|
|
1209
1012
|
);
|
|
1210
1013
|
}
|
|
1014
|
+
function AltDateTimeWidget(props) {
|
|
1015
|
+
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
1016
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AltDateWidget2, { time: true, ...props });
|
|
1017
|
+
}
|
|
1018
|
+
function AltDateWidget(props) {
|
|
1019
|
+
const { id, required, disabled, readonly, label, hideLabel, rawErrors, options, registry } = props;
|
|
1020
|
+
const { translateString } = registry;
|
|
1021
|
+
const { elements, handleChange, handleClear, handleSetNow } = utils.useAltDateWidgetProps(props);
|
|
1022
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1023
|
+
!hideLabel && !!label && /* @__PURE__ */ jsxRuntime.jsx(core$1.Input.Label, { id: utils.titleId(id), required, children: label }),
|
|
1024
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core$1.Flex, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
1025
|
+
elements.map((elemProps, i) => {
|
|
1026
|
+
const elemId = `${id}_${elemProps.type}`;
|
|
1027
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
+
core$1.Select,
|
|
1029
|
+
{
|
|
1030
|
+
id: elemId,
|
|
1031
|
+
name: elemId,
|
|
1032
|
+
placeholder: elemProps.type,
|
|
1033
|
+
disabled: disabled || readonly,
|
|
1034
|
+
data: utils.dateRangeOptions(elemProps.range[0], elemProps.range[1]).map((item) => item.value.toString()),
|
|
1035
|
+
value: !elemProps.value || elemProps.value < 0 ? null : elemProps.value.toString(),
|
|
1036
|
+
onChange: (v) => handleChange(elemProps.type, v || void 0),
|
|
1037
|
+
searchable: false,
|
|
1038
|
+
allowDeselect: false,
|
|
1039
|
+
comboboxProps: { withinPortal: false },
|
|
1040
|
+
"aria-describedby": utils.ariaDescribedByIds(elemId)
|
|
1041
|
+
}
|
|
1042
|
+
) }, i);
|
|
1043
|
+
}),
|
|
1044
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core$1.Group, { wrap: "nowrap", gap: 3, children: [
|
|
1045
|
+
(options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { variant: "subtle", size: "xs", onClick: handleSetNow, children: translateString(utils.TranslatableString.NowLabel) }),
|
|
1046
|
+
(options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ jsxRuntime.jsx(core$1.Button, { variant: "subtle", size: "xs", onClick: handleClear, children: translateString(utils.TranslatableString.ClearLabel) })
|
|
1047
|
+
] })
|
|
1048
|
+
] }),
|
|
1049
|
+
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx(core$1.Input.Error, { children: error }, `alt-date-widget-input-errors-${index}`))
|
|
1050
|
+
] });
|
|
1051
|
+
}
|
|
1052
|
+
var dateParser = (input, format) => {
|
|
1053
|
+
if (!input) {
|
|
1054
|
+
return null;
|
|
1055
|
+
}
|
|
1056
|
+
const d = dayjs(input, format);
|
|
1057
|
+
return d.isValid() ? d.toDate() : null;
|
|
1058
|
+
};
|
|
1059
|
+
var dateFormat = (date, format) => {
|
|
1060
|
+
if (!date) {
|
|
1061
|
+
return "";
|
|
1062
|
+
}
|
|
1063
|
+
return dayjs(date).format(format || "YYYY-MM-DD");
|
|
1064
|
+
};
|
|
1065
|
+
function DateTimeInput(props) {
|
|
1066
|
+
const {
|
|
1067
|
+
id,
|
|
1068
|
+
name,
|
|
1069
|
+
value,
|
|
1070
|
+
placeholder,
|
|
1071
|
+
required,
|
|
1072
|
+
disabled,
|
|
1073
|
+
readonly,
|
|
1074
|
+
autofocus,
|
|
1075
|
+
label,
|
|
1076
|
+
hideLabel,
|
|
1077
|
+
rawErrors,
|
|
1078
|
+
options,
|
|
1079
|
+
onChange,
|
|
1080
|
+
onBlur,
|
|
1081
|
+
onFocus,
|
|
1082
|
+
valueFormat,
|
|
1083
|
+
displayFormat
|
|
1084
|
+
} = props;
|
|
1085
|
+
const handleChange = react.useCallback(
|
|
1086
|
+
(nextValue) => {
|
|
1087
|
+
onChange(dateFormat(nextValue, valueFormat));
|
|
1088
|
+
},
|
|
1089
|
+
[onChange, valueFormat]
|
|
1090
|
+
);
|
|
1091
|
+
const handleBlur = react.useCallback(() => {
|
|
1092
|
+
if (onBlur) {
|
|
1093
|
+
onBlur(id, value);
|
|
1094
|
+
}
|
|
1095
|
+
}, [onBlur, id, value]);
|
|
1096
|
+
const handleFocus = react.useCallback(() => {
|
|
1097
|
+
if (onFocus) {
|
|
1098
|
+
onFocus(id, value);
|
|
1099
|
+
}
|
|
1100
|
+
}, [onFocus, id, value]);
|
|
1101
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1102
|
+
dates.DateInput,
|
|
1103
|
+
{
|
|
1104
|
+
id,
|
|
1105
|
+
name,
|
|
1106
|
+
value: dateParser(value, valueFormat),
|
|
1107
|
+
dateParser: (v) => dateParser(v, displayFormat),
|
|
1108
|
+
placeholder: placeholder || void 0,
|
|
1109
|
+
required,
|
|
1110
|
+
disabled: disabled || readonly,
|
|
1111
|
+
autoFocus: autofocus,
|
|
1112
|
+
label: utils.labelValue(label || void 0, hideLabel, false),
|
|
1113
|
+
onChange: handleChange,
|
|
1114
|
+
onBlur: handleBlur,
|
|
1115
|
+
onFocus: handleFocus,
|
|
1116
|
+
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
1117
|
+
...options,
|
|
1118
|
+
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
1119
|
+
popoverProps: { withinPortal: false },
|
|
1120
|
+
classNames: typeof options?.classNames === "object" ? options.classNames : void 0,
|
|
1121
|
+
valueFormat: displayFormat
|
|
1122
|
+
}
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1125
|
+
function DateWidget(props) {
|
|
1126
|
+
const { valueFormat = "YYYY-MM-DD", displayFormat, ...otherOptions } = props.options;
|
|
1127
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
+
DateTimeInput,
|
|
1129
|
+
{
|
|
1130
|
+
...props,
|
|
1131
|
+
options: otherOptions,
|
|
1132
|
+
valueFormat,
|
|
1133
|
+
displayFormat: displayFormat || valueFormat
|
|
1134
|
+
}
|
|
1135
|
+
);
|
|
1136
|
+
}
|
|
1137
|
+
function DateTimeWidget(props) {
|
|
1138
|
+
const { valueFormat = "YYYY-MM-DD HH:mm:ss", displayFormat, ...otherOptions } = props.options;
|
|
1139
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1140
|
+
DateTimeInput,
|
|
1141
|
+
{
|
|
1142
|
+
...props,
|
|
1143
|
+
options: otherOptions,
|
|
1144
|
+
valueFormat,
|
|
1145
|
+
displayFormat: displayFormat || valueFormat
|
|
1146
|
+
}
|
|
1147
|
+
);
|
|
1148
|
+
}
|
|
1149
|
+
function TimeWidget(props) {
|
|
1150
|
+
const {
|
|
1151
|
+
id,
|
|
1152
|
+
name,
|
|
1153
|
+
value,
|
|
1154
|
+
placeholder,
|
|
1155
|
+
required,
|
|
1156
|
+
disabled,
|
|
1157
|
+
readonly,
|
|
1158
|
+
autofocus,
|
|
1159
|
+
label,
|
|
1160
|
+
hideLabel,
|
|
1161
|
+
rawErrors,
|
|
1162
|
+
options,
|
|
1163
|
+
onChange,
|
|
1164
|
+
onBlur,
|
|
1165
|
+
onFocus
|
|
1166
|
+
} = props;
|
|
1167
|
+
const emptyValue = options.emptyValue || "";
|
|
1168
|
+
const handleChange = react.useCallback(
|
|
1169
|
+
(e) => {
|
|
1170
|
+
onChange(e.target.value === "" ? emptyValue : e.target.value);
|
|
1171
|
+
},
|
|
1172
|
+
[onChange, emptyValue]
|
|
1173
|
+
);
|
|
1174
|
+
const handleBlur = react.useCallback(
|
|
1175
|
+
({ target }) => {
|
|
1176
|
+
if (onBlur) {
|
|
1177
|
+
onBlur(id, target && target.value);
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
[onBlur, id]
|
|
1181
|
+
);
|
|
1182
|
+
const handleFocus = react.useCallback(
|
|
1183
|
+
({ target }) => {
|
|
1184
|
+
if (onFocus) {
|
|
1185
|
+
onFocus(id, target && target.value);
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
[onFocus, id]
|
|
1189
|
+
);
|
|
1190
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1191
|
+
dates.TimeInput,
|
|
1192
|
+
{
|
|
1193
|
+
id,
|
|
1194
|
+
name,
|
|
1195
|
+
value: value || "",
|
|
1196
|
+
placeholder: placeholder || void 0,
|
|
1197
|
+
required,
|
|
1198
|
+
disabled: disabled || readonly,
|
|
1199
|
+
autoFocus: autofocus,
|
|
1200
|
+
label: utils.labelValue(label || void 0, hideLabel, false),
|
|
1201
|
+
onChange: handleChange,
|
|
1202
|
+
onBlur: handleBlur,
|
|
1203
|
+
onFocus: handleFocus,
|
|
1204
|
+
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
1205
|
+
...options,
|
|
1206
|
+
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
1207
|
+
classNames: typeof options?.classNames === "object" ? options.classNames : void 0
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
1211
|
function FileWidget(props) {
|
|
1212
1212
|
const {
|
|
1213
1213
|
id,
|
|
@@ -1230,7 +1230,7 @@
|
|
|
1230
1230
|
const handleOnChange = react.useCallback(
|
|
1231
1231
|
(files) => {
|
|
1232
1232
|
if (typeof files === "object") {
|
|
1233
|
-
handleChange(files);
|
|
1233
|
+
void handleChange(files);
|
|
1234
1234
|
}
|
|
1235
1235
|
},
|
|
1236
1236
|
[handleChange]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
3
2
|
import { Box, Flex, Group } from '@mantine/core';
|
|
3
|
+
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
4
4
|
/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
|
|
5
5
|
*
|
|
6
6
|
* @param props - The `ArrayFieldItemTemplateProps` props for the component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA2C;IAC3C,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3F,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IAA6B,SAAS,EAAE,SAAS,IAAI,iBAAiB,EAAE,EAAE,EAAC,IAAI,YACjF,MAAC,IAAI,IAAC,GAAG,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,QAAQ,aACzC,KAAC,GAAG,IAAC,CAAC,EAAC,MAAM,YAAE,QAAQ,GAAO,EAC7B,UAAU,IAAI,CACb,KAAC,KAAK,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAChC,KAAC,6BAA6B,OAAK,YAAY,GAAI,GAC7C,CACT,IACI,IARC,cAAc,KAAK,EAAE,CASzB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, getUiOptions, buttonId, } from '@rjsf/utils';
|
|
3
2
|
import { Fieldset, Box, Group } from '@mantine/core';
|
|
3
|
+
import { getTemplate, getUiOptions, buttonId, } from '@rjsf/utils';
|
|
4
4
|
/** The `ArrayFieldTemplate` component is the template used to render all items in an array.
|
|
5
5
|
*
|
|
6
6
|
* @param props - The `ArrayFieldTemplateProps` props for the component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE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AG,aAChE,CAAC,SAAS,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAChD,KAAC,6BAA6B,IAC5B,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,EACxD,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACD,MAAC,GAAG,IAAC,SAAS,EAAC,0BAA0B,aACtC,CAAC,8BAA8B,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,EACjE,KAAK,IACF,EACL,MAAM,IAAI,CACT,KAAC,KAAK,IAAC,OAAO,EAAC,UAAU,YACvB,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,EAChC,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAC,IAAI,GACb,GACI,CACT,IACQ,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getUiOptions, titleId, } from '@rjsf/utils';
|
|
3
2
|
import { Grid, Title } from '@mantine/core';
|
|
3
|
+
import { getUiOptions, titleId, } from '@rjsf/utils';
|
|
4
4
|
/** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from
|
|
5
5
|
* the `fieldPathId`.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTitleTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrayFieldTitleTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,OAAO,GAKR,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAI7C,KAAoC;IACpC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAE9E,MAAM,OAAO,GAAG,YAAY,CAAU,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC1E,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC/C,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CACpB,KAAC,KAAK,IAAC,EAAE,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAC,QAAQ,YACnD,KAAK,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,IAAI,mBAAmB,EAAE,CAAC;QACxB,OAAO,GAAG,CACR,MAAC,IAAI,eACH,KAAC,IAAI,CAAC,GAAG,IAAC,IAAI,EAAC,MAAM,YAAE,OAAO,GAAY,EAC1C,KAAC,IAAI,CAAC,GAAG,IAAC,IAAI,EAAC,SAAS,YAAE,mBAAmB,GAAY,IACpD,CACR,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { ariaDescribedByIds, examplesId, getInputProps, labelValue, } from '@rjsf/utils';
|
|
4
3
|
import { TextInput, NumberInput } from '@mantine/core';
|
|
5
4
|
import { SchemaExamples } from '@rjsf/core';
|
|
5
|
+
import { ariaDescribedByIds, examplesId, getInputProps, labelValue, } from '@rjsf/utils';
|
|
6
6
|
import { cleanupOptions } from '../utils.js';
|
|
7
7
|
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
8
8
|
* It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/templates/BaseInputTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuC,WAAW,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/templates/BaseInputTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuC,WAAW,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAElB,UAAU,EACV,aAAa,EACb,UAAU,GAIX,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,KAAsC;IACtC,MAAM,EACJ,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MA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2
2
|
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
-
import IconButton from './IconButton.js';
|
|
4
3
|
import { Plus } from '../icons.js';
|
|
4
|
+
import IconButton from './IconButton.js';
|
|
5
5
|
/** The `AddButton` renders a button that represent the `Add` action on a form
|
|
6
6
|
*/
|
|
7
7
|
export default function AddButton(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjH,OAAO,
|
|
1
|
+
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjH,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,OAAO,EAAC,QAAQ,KAAK,KAAK,EAAE,IAAI,EAAE,KAAC,IAAI,KAAG,GAAI,CACrH,CAAC;AACJ,CAAC"}
|