@rjsf/mantine 6.0.0-beta.18 → 6.0.0-beta.20
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 +16 -16
- package/dist/index.cjs.map +2 -2
- package/dist/mantine.esm.js +16 -16
- package/dist/mantine.esm.js.map +2 -2
- package/dist/mantine.umd.js +16 -16
- package/lib/templates/ArrayFieldTemplate.js +4 -4
- package/lib/templates/ArrayFieldTemplate.js.map +1 -1
- package/lib/templates/ArrayFieldTitleTemplate.d.ts +1 -1
- package/lib/templates/ArrayFieldTitleTemplate.js +3 -3
- package/lib/templates/ArrayFieldTitleTemplate.js.map +1 -1
- package/lib/templates/BaseInputTemplate.js.map +1 -1
- package/lib/templates/FieldErrorTemplate.d.ts +1 -1
- package/lib/templates/FieldErrorTemplate.js +2 -2
- package/lib/templates/FieldErrorTemplate.js.map +1 -1
- package/lib/templates/FieldHelpTemplate.js +2 -2
- package/lib/templates/FieldHelpTemplate.js.map +1 -1
- package/lib/templates/ObjectFieldTemplate.js +3 -3
- package/lib/templates/ObjectFieldTemplate.js.map +1 -1
- package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/widgets/CheckboxWidget.js.map +1 -1
- package/lib/widgets/CheckboxesWidget.js.map +1 -1
- package/lib/widgets/ColorWidget.js.map +1 -1
- package/lib/widgets/DateTime/AltDateWidget.js.map +1 -1
- package/lib/widgets/DateTime/DateTimeInput.js.map +1 -1
- package/lib/widgets/DateTime/TimeWidget.js.map +1 -1
- package/lib/widgets/FileWidget.js.map +1 -1
- package/lib/widgets/PasswordWidget.js.map +1 -1
- package/lib/widgets/RadioWidget.js.map +1 -1
- package/lib/widgets/RangeWidget.js.map +1 -1
- package/lib/widgets/SelectWidget.js.map +1 -1
- package/lib/widgets/TextareaWidget.js.map +1 -1
- package/package.json +7 -7
- package/src/templates/ArrayFieldTemplate.tsx +5 -5
- package/src/templates/ArrayFieldTitleTemplate.tsx +3 -3
- package/src/templates/BaseInputTemplate.tsx +5 -5
- package/src/templates/FieldErrorTemplate.tsx +2 -2
- package/src/templates/FieldHelpTemplate.tsx +2 -2
- package/src/templates/ObjectFieldTemplate.tsx +5 -5
- package/src/templates/WrapIfAdditionalTemplate.tsx +1 -1
- package/src/widgets/CheckboxWidget.tsx +2 -2
- package/src/widgets/CheckboxesWidget.tsx +2 -2
- package/src/widgets/ColorWidget.tsx +1 -1
- package/src/widgets/DateTime/AltDateWidget.tsx +2 -2
- package/src/widgets/DateTime/DateTimeInput.tsx +1 -1
- package/src/widgets/DateTime/TimeWidget.tsx +1 -1
- package/src/widgets/FileWidget.tsx +1 -1
- package/src/widgets/PasswordWidget.tsx +1 -1
- package/src/widgets/RadioWidget.tsx +1 -1
- package/src/widgets/RangeWidget.tsx +2 -2
- package/src/widgets/SelectWidget.tsx +1 -1
- package/src/widgets/TextareaWidget.tsx +1 -1
package/dist/index.cjs
CHANGED
|
@@ -72,7 +72,7 @@ function ArrayFieldTemplate(props) {
|
|
|
72
72
|
canAdd,
|
|
73
73
|
className,
|
|
74
74
|
disabled,
|
|
75
|
-
|
|
75
|
+
fieldPathId,
|
|
76
76
|
items,
|
|
77
77
|
onAddClick,
|
|
78
78
|
readonly,
|
|
@@ -104,7 +104,7 @@ function ArrayFieldTemplate(props) {
|
|
|
104
104
|
const legend = (uiOptions.title || title) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
105
105
|
ArrayFieldTitleTemplate2,
|
|
106
106
|
{
|
|
107
|
-
|
|
107
|
+
fieldPathId,
|
|
108
108
|
required,
|
|
109
109
|
title: uiOptions.title || title,
|
|
110
110
|
schema,
|
|
@@ -112,12 +112,12 @@ function ArrayFieldTemplate(props) {
|
|
|
112
112
|
registry
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Fieldset, { legend, className, id:
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_core2.Fieldset, { legend, className, id: fieldPathId.$id, children: [
|
|
116
116
|
(uiOptions.description || schema.description) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
117
117
|
ArrayFieldDescriptionTemplate,
|
|
118
118
|
{
|
|
119
119
|
description: uiOptions.description || schema.description,
|
|
120
|
-
|
|
120
|
+
fieldPathId,
|
|
121
121
|
schema,
|
|
122
122
|
uiSchema,
|
|
123
123
|
registry
|
|
@@ -127,7 +127,7 @@ function ArrayFieldTemplate(props) {
|
|
|
127
127
|
canAdd && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.Group, { justify: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
128
128
|
AddButton2,
|
|
129
129
|
{
|
|
130
|
-
id: (0, import_utils2.buttonId)(
|
|
130
|
+
id: (0, import_utils2.buttonId)(fieldPathId, "add"),
|
|
131
131
|
className: "rjsf-array-item-add",
|
|
132
132
|
disabled: disabled || readonly,
|
|
133
133
|
onClick: onAddClick,
|
|
@@ -144,13 +144,13 @@ var import_utils3 = require("@rjsf/utils");
|
|
|
144
144
|
var import_core3 = require("@mantine/core");
|
|
145
145
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
146
146
|
function ArrayFieldTitleTemplate(props) {
|
|
147
|
-
const {
|
|
147
|
+
const { fieldPathId, title, uiSchema, registry } = props;
|
|
148
148
|
const options = (0, import_utils3.getUiOptions)(uiSchema, registry.globalUiOptions);
|
|
149
149
|
const { label: displayLabel = true } = options;
|
|
150
150
|
if (!title || !displayLabel) {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Title, { id: (0, import_utils3.titleId)(
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core3.Title, { id: (0, import_utils3.titleId)(fieldPathId), order: 4, fw: "normal", children: title });
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// src/templates/BaseInputTemplate.tsx
|
|
@@ -580,11 +580,11 @@ var ButtonTemplates_default = buttonTemplates;
|
|
|
580
580
|
var import_utils10 = require("@rjsf/utils");
|
|
581
581
|
var import_core10 = require("@mantine/core");
|
|
582
582
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
583
|
-
function FieldErrorTemplate({ errors,
|
|
583
|
+
function FieldErrorTemplate({ errors, fieldPathId }) {
|
|
584
584
|
if (!errors || !errors.length) {
|
|
585
585
|
return null;
|
|
586
586
|
}
|
|
587
|
-
const id = (0, import_utils10.errorId)(
|
|
587
|
+
const id = (0, import_utils10.errorId)(fieldPathId);
|
|
588
588
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.Box, { id, c: "red", display: "none", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.List, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core10.List.Item, { children: error }, `field-error-${index}`)) }) });
|
|
589
589
|
}
|
|
590
590
|
|
|
@@ -644,8 +644,8 @@ var import_utils12 = require("@rjsf/utils");
|
|
|
644
644
|
var import_core12 = require("@mantine/core");
|
|
645
645
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
646
646
|
function FieldHelpTemplate(props) {
|
|
647
|
-
const {
|
|
648
|
-
const id = (0, import_utils12.helpId)(
|
|
647
|
+
const { fieldPathId, help } = props;
|
|
648
|
+
const id = (0, import_utils12.helpId)(fieldPathId);
|
|
649
649
|
return !help ? null : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { id, size: "sm", my: "xs", c: "dimmed", children: help });
|
|
650
650
|
}
|
|
651
651
|
|
|
@@ -678,7 +678,7 @@ function ObjectFieldTemplate(props) {
|
|
|
678
678
|
required,
|
|
679
679
|
schema,
|
|
680
680
|
uiSchema,
|
|
681
|
-
|
|
681
|
+
fieldPathId,
|
|
682
682
|
formData,
|
|
683
683
|
registry
|
|
684
684
|
} = props;
|
|
@@ -695,11 +695,11 @@ function ObjectFieldTemplate(props) {
|
|
|
695
695
|
const gridCols = typeof uiOptions?.gridCols === "number" && uiOptions?.gridCols || void 0;
|
|
696
696
|
const gridSpacing = uiOptions?.gridSpacing;
|
|
697
697
|
const gridVerticalSpacing = uiOptions?.gridVerticalSpacing;
|
|
698
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Container, { id:
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core14.Container, { id: fieldPathId.$id, p: 0, children: [
|
|
699
699
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
700
700
|
TitleFieldTemplate,
|
|
701
701
|
{
|
|
702
|
-
id: (0, import_utils13.titleId)(
|
|
702
|
+
id: (0, import_utils13.titleId)(fieldPathId),
|
|
703
703
|
title,
|
|
704
704
|
required,
|
|
705
705
|
schema,
|
|
@@ -710,7 +710,7 @@ function ObjectFieldTemplate(props) {
|
|
|
710
710
|
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
711
711
|
DescriptionFieldTemplate,
|
|
712
712
|
{
|
|
713
|
-
id: (0, import_utils13.descriptionId)(
|
|
713
|
+
id: (0, import_utils13.descriptionId)(fieldPathId),
|
|
714
714
|
description,
|
|
715
715
|
schema,
|
|
716
716
|
uiSchema,
|
|
@@ -730,7 +730,7 @@ function ObjectFieldTemplate(props) {
|
|
|
730
730
|
(0, import_utils13.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core14.Group, { mt: "xs", justify: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
731
731
|
AddButton2,
|
|
732
732
|
{
|
|
733
|
-
id: (0, import_utils13.buttonId)(
|
|
733
|
+
id: (0, import_utils13.buttonId)(fieldPathId, "add"),
|
|
734
734
|
disabled: disabled || readonly,
|
|
735
735
|
onClick: onAddClick(schema),
|
|
736
736
|
className: "rjsf-object-property-expand",
|