@rjsf/chakra-ui 6.0.0-beta.19 → 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/chakra-ui.esm.js +14 -14
- package/dist/chakra-ui.esm.js.map +2 -2
- package/dist/chakra-ui.umd.js +14 -14
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +2 -2
- package/lib/AltDateWidget/AltDateWidget.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +3 -3
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -2
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +2 -2
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +2 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectNativeWidget/NativeSelectWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/UpDownWidget/UpDownWidget.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/AltDateWidget/AltDateWidget.tsx +1 -1
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +5 -5
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +3 -3
- package/src/CheckboxWidget/CheckboxWidget.tsx +2 -2
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +2 -2
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -2
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +5 -5
- package/src/RadioWidget/RadioWidget.tsx +1 -1
- package/src/RangeWidget/RangeWidget.tsx +1 -1
- package/src/SelectNativeWidget/NativeSelectWidget.tsx +1 -1
- package/src/SelectWidget/SelectWidget.tsx +1 -1
- package/src/TextareaWidget/TextareaWidget.tsx +1 -1
- package/src/UpDownWidget/UpDownWidget.tsx +1 -1
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -1
package/dist/chakra-ui.esm.js
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "@rjsf/utils";
|
|
48
48
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
49
49
|
function ArrayFieldTemplate(props) {
|
|
50
|
-
const { canAdd, disabled,
|
|
50
|
+
const { canAdd, disabled, fieldPathId, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
51
51
|
const uiOptions = getUiOptions2(uiSchema);
|
|
52
52
|
const ArrayFieldDescriptionTemplate = getTemplate2(
|
|
53
53
|
"ArrayFieldDescriptionTemplate",
|
|
@@ -71,7 +71,7 @@ function ArrayFieldTemplate(props) {
|
|
|
71
71
|
/* @__PURE__ */ jsx3(
|
|
72
72
|
ArrayFieldTitleTemplate,
|
|
73
73
|
{
|
|
74
|
-
|
|
74
|
+
fieldPathId,
|
|
75
75
|
title: uiOptions.title || title,
|
|
76
76
|
schema,
|
|
77
77
|
uiSchema,
|
|
@@ -82,7 +82,7 @@ function ArrayFieldTemplate(props) {
|
|
|
82
82
|
/* @__PURE__ */ jsx3(
|
|
83
83
|
ArrayFieldDescriptionTemplate,
|
|
84
84
|
{
|
|
85
|
-
|
|
85
|
+
fieldPathId,
|
|
86
86
|
description: uiOptions.description || schema.description,
|
|
87
87
|
schema,
|
|
88
88
|
uiSchema,
|
|
@@ -94,7 +94,7 @@ function ArrayFieldTemplate(props) {
|
|
|
94
94
|
canAdd && /* @__PURE__ */ jsx3(GridItem, { justifySelf: "flex-end", children: /* @__PURE__ */ jsx3(Box2, { mt: 2, children: /* @__PURE__ */ jsx3(
|
|
95
95
|
AddButton2,
|
|
96
96
|
{
|
|
97
|
-
id: buttonId(
|
|
97
|
+
id: buttonId(fieldPathId, "add"),
|
|
98
98
|
className: "rjsf-array-item-add",
|
|
99
99
|
onClick: onAddClick,
|
|
100
100
|
disabled: disabled || readonly,
|
|
@@ -102,7 +102,7 @@ function ArrayFieldTemplate(props) {
|
|
|
102
102
|
registry
|
|
103
103
|
}
|
|
104
104
|
) }) })
|
|
105
|
-
] }, `array-item-list-${
|
|
105
|
+
] }, `array-item-list-${fieldPathId.$id}`)
|
|
106
106
|
] });
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -328,11 +328,11 @@ import { errorId } from "@rjsf/utils";
|
|
|
328
328
|
import { Fieldset } from "@chakra-ui/react";
|
|
329
329
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
330
330
|
function FieldErrorTemplate(props) {
|
|
331
|
-
const { errors = [],
|
|
331
|
+
const { errors = [], fieldPathId } = props;
|
|
332
332
|
if (errors.length === 0) {
|
|
333
333
|
return null;
|
|
334
334
|
}
|
|
335
|
-
const id = errorId(
|
|
335
|
+
const id = errorId(fieldPathId);
|
|
336
336
|
return errors.map((error, i) => {
|
|
337
337
|
return /* @__PURE__ */ jsx12(Fieldset.ErrorText, { mt: 0, id, children: error }, i);
|
|
338
338
|
});
|
|
@@ -343,11 +343,11 @@ import { Text as Text2 } from "@chakra-ui/react";
|
|
|
343
343
|
import { helpId } from "@rjsf/utils";
|
|
344
344
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
345
345
|
function FieldHelpTemplate(props) {
|
|
346
|
-
const {
|
|
346
|
+
const { fieldPathId, help } = props;
|
|
347
347
|
if (!help) {
|
|
348
348
|
return null;
|
|
349
349
|
}
|
|
350
|
-
const id = helpId(
|
|
350
|
+
const id = helpId(fieldPathId);
|
|
351
351
|
return /* @__PURE__ */ jsx13(Text2, { id, children: help });
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -457,7 +457,7 @@ function ObjectFieldTemplate(props) {
|
|
|
457
457
|
disabled,
|
|
458
458
|
readonly,
|
|
459
459
|
uiSchema,
|
|
460
|
-
|
|
460
|
+
fieldPathId,
|
|
461
461
|
schema,
|
|
462
462
|
formData,
|
|
463
463
|
onAddClick,
|
|
@@ -477,7 +477,7 @@ function ObjectFieldTemplate(props) {
|
|
|
477
477
|
title && /* @__PURE__ */ jsx17(
|
|
478
478
|
TitleFieldTemplate,
|
|
479
479
|
{
|
|
480
|
-
id: titleId(
|
|
480
|
+
id: titleId(fieldPathId),
|
|
481
481
|
title,
|
|
482
482
|
required,
|
|
483
483
|
schema,
|
|
@@ -488,7 +488,7 @@ function ObjectFieldTemplate(props) {
|
|
|
488
488
|
description && /* @__PURE__ */ jsx17(
|
|
489
489
|
DescriptionFieldTemplate,
|
|
490
490
|
{
|
|
491
|
-
id: descriptionId(
|
|
491
|
+
id: descriptionId(fieldPathId),
|
|
492
492
|
description,
|
|
493
493
|
schema,
|
|
494
494
|
uiSchema,
|
|
@@ -497,12 +497,12 @@ function ObjectFieldTemplate(props) {
|
|
|
497
497
|
),
|
|
498
498
|
/* @__PURE__ */ jsxs9(Grid3, { gap: description ? 2 : 6, mb: 4, children: [
|
|
499
499
|
properties.map(
|
|
500
|
-
(element, index) => element.hidden ? element.content : /* @__PURE__ */ jsx17(GridItem3, { children: element.content }, `${
|
|
500
|
+
(element, index) => element.hidden ? element.content : /* @__PURE__ */ jsx17(GridItem3, { children: element.content }, `${fieldPathId.$id}-${element.name}-${index}`)
|
|
501
501
|
),
|
|
502
502
|
canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx17(GridItem3, { justifySelf: "flex-end", children: /* @__PURE__ */ jsx17(
|
|
503
503
|
AddButton2,
|
|
504
504
|
{
|
|
505
|
-
id: buttonId2(
|
|
505
|
+
id: buttonId2(fieldPathId, "add"),
|
|
506
506
|
className: "rjsf-object-property-expand",
|
|
507
507
|
onClick: onAddClick(schema),
|
|
508
508
|
disabled: disabled || readonly,
|