@rjsf/primereact 6.0.0-beta.12 → 6.0.0-beta.14
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.js +49 -41
- package/dist/index.js.map +2 -2
- package/dist/primereact.esm.js +49 -41
- package/dist/primereact.esm.js.map +2 -2
- package/dist/primereact.umd.js +49 -41
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +5 -1
- package/src/CheckboxWidget/CheckboxWidget.tsx +3 -3
package/dist/primereact.umd.js
CHANGED
|
@@ -81,50 +81,58 @@
|
|
|
81
81
|
registry
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
[utils.UI_OPTIONS_KEY]: {
|
|
100
|
-
...itemUiSchema[utils.UI_OPTIONS_KEY]
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
+
fieldset.Fieldset,
|
|
86
|
+
{
|
|
87
|
+
...rest,
|
|
88
|
+
id: idSchema.$id,
|
|
89
|
+
className: `${className}${utils.isFixedItems(schema) ? "" : " sortable-form-fields"}`,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
+
ArrayFieldDescriptionTemplate,
|
|
93
|
+
{
|
|
94
|
+
idSchema,
|
|
95
|
+
description: uiOptions.description || schema.description,
|
|
96
|
+
schema,
|
|
97
|
+
uiSchema,
|
|
98
|
+
registry
|
|
101
99
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
102
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: items && items.map(({ key, uiSchema: itemUiSchema = {}, ...props2 }) => {
|
|
103
|
+
const mergedUiSchema = {
|
|
104
|
+
...itemUiSchema,
|
|
105
|
+
[utils.UI_OPTIONS_KEY]: {
|
|
106
|
+
...itemUiSchema[utils.UI_OPTIONS_KEY]
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ArrayFieldItemTemplate2, { ...props2, uiSchema: mergedUiSchema }, key);
|
|
110
|
+
}) }),
|
|
111
|
+
canAdd && /* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
"div",
|
|
115
113
|
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
style: {
|
|
115
|
+
marginTop: "1rem",
|
|
116
|
+
position: "relative",
|
|
117
|
+
textAlign: "right"
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
AddButton,
|
|
121
|
+
{
|
|
122
|
+
id: utils.buttonId(idSchema, "add"),
|
|
123
|
+
className: "rjsf-array-item-add",
|
|
124
|
+
onClick: onAddClick,
|
|
125
|
+
disabled: disabled || readonly,
|
|
126
|
+
uiSchema,
|
|
127
|
+
registry
|
|
128
|
+
}
|
|
129
|
+
)
|
|
122
130
|
}
|
|
123
131
|
)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
] }, `array-item-list-${idSchema.$id}`)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
)
|
|
128
136
|
] });
|
|
129
137
|
}
|
|
130
138
|
function BaseInputTemplate(props) {
|
|
@@ -640,10 +648,10 @@
|
|
|
640
648
|
options
|
|
641
649
|
);
|
|
642
650
|
const required = utils.schemaRequiresTrueValue(schema);
|
|
651
|
+
const checked = value === "true" || value === true;
|
|
643
652
|
const _onChange = (e) => onChange && onChange(e.checked);
|
|
644
653
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
645
654
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
646
|
-
const checked = value === "true" || value === true;
|
|
647
655
|
const description = options.description ?? schema.description;
|
|
648
656
|
const primeProps = options.prime || {};
|
|
649
657
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -12,7 +12,7 @@ export default function ArrayFieldTemplate(props) {
|
|
|
12
12
|
const ArrayFieldDescriptionTemplate = getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
|
|
13
13
|
const ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
|
|
14
14
|
const ArrayFieldTitleTemplate = getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
|
|
15
|
-
return (_jsxs(_Fragment, { children: [_jsx(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry }), _jsxs(Fieldset, { ...rest, className: `${className}${isFixedItems(schema) ? '' : ' sortable-form-fields'}`, children: [_jsx(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsxs("div", { children: [_jsx("div", { children: items &&
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(ArrayFieldTitleTemplate, { idSchema: idSchema, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry }), _jsxs(Fieldset, { ...rest, id: idSchema.$id, className: `${className}${isFixedItems(schema) ? '' : ' sortable-form-fields'}`, children: [_jsx(ArrayFieldDescriptionTemplate, { idSchema: idSchema, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsxs("div", { children: [_jsx("div", { children: items &&
|
|
16
16
|
items.map(({ key, uiSchema: itemUiSchema = {}, ...props }) => {
|
|
17
17
|
const mergedUiSchema = {
|
|
18
18
|
...itemUiSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EAMZ,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,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,sBAAsB,GAAG,WAAW,CACxC,wBAAwB,EACxB,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,uBAAuB,GAAG,WAAW,CACzC,yBAAyB,EACzB,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,OAAO,CACL,8BACE,KA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CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -12,10 +12,10 @@ export default function CheckboxWidget(props) {
|
|
|
12
12
|
const { id, value, disabled, readonly, label = '', hideLabel, autofocus, onChange, onBlur, options, onFocus, schema, uiSchema, registry, } = props;
|
|
13
13
|
const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
|
|
14
14
|
const required = schemaRequiresTrueValue(schema);
|
|
15
|
+
const checked = value === 'true' || value === true;
|
|
15
16
|
const _onChange = (e) => onChange && onChange(e.checked);
|
|
16
17
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
17
18
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
18
|
-
const checked = value === 'true' || value === true;
|
|
19
19
|
const description = (_a = options.description) !== null && _a !== void 0 ? _a : schema.description;
|
|
20
20
|
const primeProps = (options.prime || {});
|
|
21
21
|
return (_jsxs(_Fragment, { children: [!hideLabel && !!description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '0.5rem', alignItems: 'center' }, children: [_jsx(Checkbox, { inputId: id, name: id, ...primeProps, disabled: disabled || readonly, autoFocus: autofocus, checked: typeof value === 'undefined' ? false : checked, onChange: _onChange, onBlur: _onBlur, onFocus: _onFocus, required: required, "aria-describedby": ariaDescribedByIds(id) }), labelValue(_jsx(Label, { id: id, text: label }), hideLabel, false)] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,UAAU,EACV,uBAAuB,GAKxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAuB,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC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