@rjsf/react-bootstrap 6.5.3 → 6.6.1
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 +152 -152
- package/dist/index.cjs.map +4 -4
- package/dist/react-bootstrap.esm.js +153 -153
- package/dist/react-bootstrap.esm.js.map +4 -4
- package/dist/react-bootstrap.umd.js +96 -96
- package/lib/AddButton/AddButton.js +1 -1
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +2 -2
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +2 -2
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/ErrorList/ErrorList.js +1 -1
- package/lib/ErrorList/ErrorList.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/Form/Form.js.map +1 -1
- package/lib/GridTemplate/GridTemplate.js +1 -1
- package/lib/GridTemplate/GridTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.js +4 -4
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +2 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js +1 -1
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js +1 -1
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/SubmitButton/SubmitButton.js +1 -1
- package/lib/SubmitButton/SubmitButton.js.map +1 -1
- package/lib/Templates/Templates.js +1 -1
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/Theme/Theme.js.map +1 -1
- package/lib/TitleField/TitleField.js +1 -1
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/Widgets/Widgets.js +1 -1
- package/lib/Widgets/Widgets.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/src/AddButton/AddButton.tsx +1 -1
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +2 -2
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +3 -3
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -2
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
- package/src/DescriptionField/DescriptionField.tsx +1 -1
- package/src/ErrorList/ErrorList.tsx +1 -2
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +1 -1
- package/src/Form/Form.tsx +2 -2
- package/src/GridTemplate/GridTemplate.tsx +2 -2
- package/src/IconButton/IconButton.tsx +4 -4
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +3 -4
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +1 -1
- package/src/RadioWidget/RadioWidget.tsx +1 -1
- package/src/RangeWidget/RangeWidget.tsx +1 -1
- package/src/SelectWidget/SelectWidget.tsx +1 -1
- package/src/SubmitButton/SubmitButton.tsx +1 -1
- package/src/Templates/Templates.ts +3 -2
- package/src/Theme/Theme.tsx +1 -1
- package/src/TitleField/TitleField.tsx +1 -1
- package/src/Widgets/Widgets.ts +3 -2
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -2
- package/src/tsconfig.json +0 -1
package/dist/index.cjs
CHANGED
|
@@ -46,9 +46,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
46
46
|
var import_core4 = require("@rjsf/core");
|
|
47
47
|
|
|
48
48
|
// src/AddButton/AddButton.tsx
|
|
49
|
+
var import_BsPlus = require("@react-icons/all-files/bs/BsPlus");
|
|
49
50
|
var import_utils = require("@rjsf/utils");
|
|
50
51
|
var import_Button = __toESM(require("react-bootstrap/Button"), 1);
|
|
51
|
-
var import_BsPlus = require("@react-icons/all-files/bs/BsPlus");
|
|
52
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
53
|
function AddButton({
|
|
54
54
|
uiSchema,
|
|
@@ -69,9 +69,9 @@ function AddButton({
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx
|
|
72
|
-
var import_Row = __toESM(require("react-bootstrap/Row"), 1);
|
|
73
|
-
var import_Col = __toESM(require("react-bootstrap/Col"), 1);
|
|
74
72
|
var import_utils2 = require("@rjsf/utils");
|
|
73
|
+
var import_Col = __toESM(require("react-bootstrap/Col"), 1);
|
|
74
|
+
var import_Row = __toESM(require("react-bootstrap/Row"), 1);
|
|
75
75
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
76
76
|
function ArrayFieldItemTemplate(props) {
|
|
77
77
|
const { children, buttonsProps, displayLabel, hasDescription, hasToolbar, uiSchema, registry } = props;
|
|
@@ -95,10 +95,10 @@ function ArrayFieldItemTemplate(props) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
|
|
98
|
-
var
|
|
98
|
+
var import_utils3 = require("@rjsf/utils");
|
|
99
99
|
var import_Col2 = __toESM(require("react-bootstrap/Col"), 1);
|
|
100
100
|
var import_Container = __toESM(require("react-bootstrap/Container"), 1);
|
|
101
|
-
var
|
|
101
|
+
var import_Row2 = __toESM(require("react-bootstrap/Row"), 1);
|
|
102
102
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
103
103
|
function ArrayFieldTemplate(props) {
|
|
104
104
|
const {
|
|
@@ -176,9 +176,9 @@ function ArrayFieldTemplate(props) {
|
|
|
176
176
|
|
|
177
177
|
// src/BaseInputTemplate/BaseInputTemplate.tsx
|
|
178
178
|
var import_react = require("react");
|
|
179
|
-
var import_Form = __toESM(require("react-bootstrap/Form"), 1);
|
|
180
|
-
var import_utils4 = require("@rjsf/utils");
|
|
181
179
|
var import_core = require("@rjsf/core");
|
|
180
|
+
var import_utils4 = require("@rjsf/utils");
|
|
181
|
+
var import_Form = __toESM(require("react-bootstrap/Form"), 1);
|
|
182
182
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
183
183
|
function BaseInputTemplate({
|
|
184
184
|
id,
|
|
@@ -255,9 +255,9 @@ function DescriptionField({ id, description, registry, uiSchema }) {
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
// src/ErrorList/ErrorList.tsx
|
|
258
|
+
var import_utils5 = require("@rjsf/utils");
|
|
258
259
|
var import_Card = __toESM(require("react-bootstrap/Card"), 1);
|
|
259
260
|
var import_ListGroup = __toESM(require("react-bootstrap/ListGroup"), 1);
|
|
260
|
-
var import_utils5 = require("@rjsf/utils");
|
|
261
261
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
262
262
|
function ErrorList({
|
|
263
263
|
errors,
|
|
@@ -272,90 +272,38 @@ function ErrorList({
|
|
|
272
272
|
] });
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
// src/IconButton/IconButton.tsx
|
|
276
|
-
var import_utils6 = require("@rjsf/utils");
|
|
277
|
-
var import_Button2 = __toESM(require("react-bootstrap/Button"), 1);
|
|
278
|
-
var import_IoIosCopy = require("@react-icons/all-files/io/IoIosCopy");
|
|
279
|
-
var import_IoIosRemove = require("@react-icons/all-files/io/IoIosRemove");
|
|
280
|
-
var import_AiOutlineArrowUp = require("@react-icons/all-files/ai/AiOutlineArrowUp");
|
|
281
|
-
var import_AiOutlineArrowDown = require("@react-icons/all-files/ai/AiOutlineArrowDown");
|
|
282
|
-
var import_IoMdClose = require("@react-icons/all-files/io/IoMdClose");
|
|
283
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
284
|
-
function IconButton(props) {
|
|
285
|
-
const { icon, iconType, className, uiSchema, registry, ...otherProps } = props;
|
|
286
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_Button2.default, { ...otherProps, variant: props.variant || "light", size: "sm", children: icon });
|
|
287
|
-
}
|
|
288
|
-
function CopyButton(props) {
|
|
289
|
-
const {
|
|
290
|
-
registry: { translateString }
|
|
291
|
-
} = props;
|
|
292
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconButton, { title: translateString(import_utils6.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_IoIosCopy.IoIosCopy, {}) });
|
|
293
|
-
}
|
|
294
|
-
function MoveDownButton(props) {
|
|
295
|
-
const {
|
|
296
|
-
registry: { translateString }
|
|
297
|
-
} = props;
|
|
298
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconButton, { title: translateString(import_utils6.TranslatableString.MoveDownButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_AiOutlineArrowDown.AiOutlineArrowDown, {}) });
|
|
299
|
-
}
|
|
300
|
-
function MoveUpButton(props) {
|
|
301
|
-
const {
|
|
302
|
-
registry: { translateString }
|
|
303
|
-
} = props;
|
|
304
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconButton, { title: translateString(import_utils6.TranslatableString.MoveUpButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_AiOutlineArrowUp.AiOutlineArrowUp, {}) });
|
|
305
|
-
}
|
|
306
|
-
function RemoveButton(props) {
|
|
307
|
-
const {
|
|
308
|
-
registry: { translateString }
|
|
309
|
-
} = props;
|
|
310
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
311
|
-
IconButton,
|
|
312
|
-
{
|
|
313
|
-
title: translateString(import_utils6.TranslatableString.RemoveButton),
|
|
314
|
-
variant: "danger",
|
|
315
|
-
...props,
|
|
316
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_IoIosRemove.IoIosRemove, {})
|
|
317
|
-
}
|
|
318
|
-
);
|
|
319
|
-
}
|
|
320
|
-
function ClearButton(props) {
|
|
321
|
-
const {
|
|
322
|
-
registry: { translateString }
|
|
323
|
-
} = props;
|
|
324
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconButton, { title: translateString(import_utils6.TranslatableString.ClearButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_IoMdClose.IoMdClose, {}) });
|
|
325
|
-
}
|
|
326
|
-
|
|
327
275
|
// src/FieldErrorTemplate/FieldErrorTemplate.tsx
|
|
328
|
-
var
|
|
276
|
+
var import_utils6 = require("@rjsf/utils");
|
|
329
277
|
var import_ListGroup2 = __toESM(require("react-bootstrap/ListGroup"), 1);
|
|
330
|
-
var
|
|
278
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
331
279
|
function FieldErrorTemplate(props) {
|
|
332
280
|
const { errors = [], fieldPathId } = props;
|
|
333
281
|
if (errors.length === 0) {
|
|
334
282
|
return null;
|
|
335
283
|
}
|
|
336
|
-
const id = (0,
|
|
337
|
-
return /* @__PURE__ */ (0,
|
|
338
|
-
return /* @__PURE__ */ (0,
|
|
284
|
+
const id = (0, import_utils6.errorId)(fieldPathId);
|
|
285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ListGroup2.default, { as: "ul", id, children: errors.map((error, i) => {
|
|
286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ListGroup2.default.Item, { as: "li", className: "border-0 m-0 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { className: "m-0 text-danger", children: error }) }, i);
|
|
339
287
|
}) });
|
|
340
288
|
}
|
|
341
289
|
|
|
342
290
|
// src/FieldHelpTemplate/FieldHelpTemplate.tsx
|
|
343
|
-
var import_utils8 = require("@rjsf/utils");
|
|
344
291
|
var import_core3 = require("@rjsf/core");
|
|
292
|
+
var import_utils7 = require("@rjsf/utils");
|
|
345
293
|
var import_Form2 = __toESM(require("react-bootstrap/Form"), 1);
|
|
346
|
-
var
|
|
294
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
347
295
|
function FieldHelpTemplate(props) {
|
|
348
296
|
const { fieldPathId, help, uiSchema, registry, hasErrors } = props;
|
|
349
297
|
if (!help) {
|
|
350
298
|
return null;
|
|
351
299
|
}
|
|
352
|
-
return /* @__PURE__ */ (0,
|
|
300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Form2.default.Text, { id: (0, import_utils7.helpId)(fieldPathId), className: hasErrors ? "text-danger" : "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core3.RichHelp, { help, registry, uiSchema }) });
|
|
353
301
|
}
|
|
354
302
|
|
|
355
303
|
// src/FieldTemplate/FieldTemplate.tsx
|
|
356
|
-
var
|
|
304
|
+
var import_utils8 = require("@rjsf/utils");
|
|
357
305
|
var import_Form3 = __toESM(require("react-bootstrap/Form"), 1);
|
|
358
|
-
var
|
|
306
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
359
307
|
function FieldTemplate({
|
|
360
308
|
id,
|
|
361
309
|
children,
|
|
@@ -379,17 +327,17 @@ function FieldTemplate({
|
|
|
379
327
|
uiSchema,
|
|
380
328
|
registry
|
|
381
329
|
}) {
|
|
382
|
-
const uiOptions = (0,
|
|
383
|
-
const WrapIfAdditionalTemplate2 = (0,
|
|
330
|
+
const uiOptions = (0, import_utils8.getUiOptions)(uiSchema);
|
|
331
|
+
const WrapIfAdditionalTemplate2 = (0, import_utils8.getTemplate)(
|
|
384
332
|
"WrapIfAdditionalTemplate",
|
|
385
333
|
registry,
|
|
386
334
|
uiOptions
|
|
387
335
|
);
|
|
388
336
|
if (hidden) {
|
|
389
|
-
return /* @__PURE__ */ (0,
|
|
337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "hidden", children });
|
|
390
338
|
}
|
|
391
339
|
const isCheckbox = uiOptions.widget === "checkbox";
|
|
392
|
-
return /* @__PURE__ */ (0,
|
|
340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
393
341
|
WrapIfAdditionalTemplate2,
|
|
394
342
|
{
|
|
395
343
|
classNames,
|
|
@@ -407,13 +355,13 @@ function FieldTemplate({
|
|
|
407
355
|
schema,
|
|
408
356
|
uiSchema,
|
|
409
357
|
registry,
|
|
410
|
-
children: /* @__PURE__ */ (0,
|
|
411
|
-
displayLabel && !isCheckbox && /* @__PURE__ */ (0,
|
|
358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_Form3.default.Group, { children: [
|
|
359
|
+
displayLabel && !isCheckbox && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_Form3.default.Label, { htmlFor: id, className: rawErrors.length > 0 ? "text-danger" : "", children: [
|
|
412
360
|
label,
|
|
413
361
|
required ? "*" : null
|
|
414
362
|
] }),
|
|
415
363
|
children,
|
|
416
|
-
displayLabel && rawDescription && !isCheckbox && /* @__PURE__ */ (0,
|
|
364
|
+
displayLabel && rawDescription && !isCheckbox && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_Form3.default.Text, { className: rawErrors.length > 0 ? "text-danger" : "text-muted", children: description }),
|
|
417
365
|
errors,
|
|
418
366
|
help
|
|
419
367
|
] })
|
|
@@ -422,15 +370,67 @@ function FieldTemplate({
|
|
|
422
370
|
}
|
|
423
371
|
|
|
424
372
|
// src/GridTemplate/GridTemplate.tsx
|
|
425
|
-
var import_Row3 = __toESM(require("react-bootstrap/Row"), 1);
|
|
426
373
|
var import_Col3 = __toESM(require("react-bootstrap/Col"), 1);
|
|
427
|
-
var
|
|
374
|
+
var import_Row3 = __toESM(require("react-bootstrap/Row"), 1);
|
|
375
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
428
376
|
function GridTemplate(props) {
|
|
429
377
|
const { children, column, ...rest } = props;
|
|
430
378
|
if (column) {
|
|
431
|
-
return /* @__PURE__ */ (0,
|
|
379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Col3.default, { ...rest, children });
|
|
432
380
|
}
|
|
433
|
-
return /* @__PURE__ */ (0,
|
|
381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Row3.default, { ...rest, children });
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// src/IconButton/IconButton.tsx
|
|
385
|
+
var import_AiOutlineArrowDown = require("@react-icons/all-files/ai/AiOutlineArrowDown");
|
|
386
|
+
var import_AiOutlineArrowUp = require("@react-icons/all-files/ai/AiOutlineArrowUp");
|
|
387
|
+
var import_IoIosCopy = require("@react-icons/all-files/io/IoIosCopy");
|
|
388
|
+
var import_IoIosRemove = require("@react-icons/all-files/io/IoIosRemove");
|
|
389
|
+
var import_IoMdClose = require("@react-icons/all-files/io/IoMdClose");
|
|
390
|
+
var import_utils9 = require("@rjsf/utils");
|
|
391
|
+
var import_Button2 = __toESM(require("react-bootstrap/Button"), 1);
|
|
392
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
393
|
+
function IconButton(props) {
|
|
394
|
+
const { icon, iconType, className, uiSchema, registry, ...otherProps } = props;
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { ...otherProps, variant: props.variant || "light", size: "sm", children: icon });
|
|
396
|
+
}
|
|
397
|
+
function CopyButton(props) {
|
|
398
|
+
const {
|
|
399
|
+
registry: { translateString }
|
|
400
|
+
} = props;
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: translateString(import_utils9.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_IoIosCopy.IoIosCopy, {}) });
|
|
402
|
+
}
|
|
403
|
+
function MoveDownButton(props) {
|
|
404
|
+
const {
|
|
405
|
+
registry: { translateString }
|
|
406
|
+
} = props;
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: translateString(import_utils9.TranslatableString.MoveDownButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_AiOutlineArrowDown.AiOutlineArrowDown, {}) });
|
|
408
|
+
}
|
|
409
|
+
function MoveUpButton(props) {
|
|
410
|
+
const {
|
|
411
|
+
registry: { translateString }
|
|
412
|
+
} = props;
|
|
413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: translateString(import_utils9.TranslatableString.MoveUpButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_AiOutlineArrowUp.AiOutlineArrowUp, {}) });
|
|
414
|
+
}
|
|
415
|
+
function RemoveButton(props) {
|
|
416
|
+
const {
|
|
417
|
+
registry: { translateString }
|
|
418
|
+
} = props;
|
|
419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
420
|
+
IconButton,
|
|
421
|
+
{
|
|
422
|
+
title: translateString(import_utils9.TranslatableString.RemoveButton),
|
|
423
|
+
variant: "danger",
|
|
424
|
+
...props,
|
|
425
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_IoIosRemove.IoIosRemove, {})
|
|
426
|
+
}
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
function ClearButton(props) {
|
|
430
|
+
const {
|
|
431
|
+
registry: { translateString }
|
|
432
|
+
} = props;
|
|
433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: translateString(import_utils9.TranslatableString.ClearButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_IoMdClose.IoMdClose, {}) });
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
// src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
|
|
@@ -444,10 +444,10 @@ function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
|
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
// src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
|
|
447
|
-
var
|
|
447
|
+
var import_utils10 = require("@rjsf/utils");
|
|
448
448
|
var import_Col4 = __toESM(require("react-bootstrap/Col"), 1);
|
|
449
449
|
var import_Container2 = __toESM(require("react-bootstrap/Container"), 1);
|
|
450
|
-
var
|
|
450
|
+
var import_Row4 = __toESM(require("react-bootstrap/Row"), 1);
|
|
451
451
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
452
452
|
function ObjectFieldTemplate({
|
|
453
453
|
description,
|
|
@@ -556,8 +556,8 @@ function OptionalDataControlsTemplate(props) {
|
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
// src/SubmitButton/SubmitButton.tsx
|
|
559
|
-
var import_Button3 = __toESM(require("react-bootstrap/Button"), 1);
|
|
560
559
|
var import_utils11 = require("@rjsf/utils");
|
|
560
|
+
var import_Button3 = __toESM(require("react-bootstrap/Button"), 1);
|
|
561
561
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
562
562
|
function SubmitButton(props) {
|
|
563
563
|
const { submitText, norender, props: submitButtonProps } = (0, import_utils11.getSubmitButtonOptions)(props.uiSchema);
|
|
@@ -569,9 +569,9 @@ function SubmitButton(props) {
|
|
|
569
569
|
|
|
570
570
|
// src/TitleField/TitleField.tsx
|
|
571
571
|
var import_utils12 = require("@rjsf/utils");
|
|
572
|
-
var import_Row5 = __toESM(require("react-bootstrap/Row"), 1);
|
|
573
572
|
var import_Col5 = __toESM(require("react-bootstrap/Col"), 1);
|
|
574
573
|
var import_Container3 = __toESM(require("react-bootstrap/Container"), 1);
|
|
574
|
+
var import_Row5 = __toESM(require("react-bootstrap/Row"), 1);
|
|
575
575
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
576
576
|
function TitleField({
|
|
577
577
|
id,
|
|
@@ -595,9 +595,9 @@ function TitleField({
|
|
|
595
595
|
|
|
596
596
|
// src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
|
|
597
597
|
var import_utils13 = require("@rjsf/utils");
|
|
598
|
-
var import_Row6 = __toESM(require("react-bootstrap/Row"), 1);
|
|
599
598
|
var import_Col6 = __toESM(require("react-bootstrap/Col"), 1);
|
|
600
599
|
var import_Form4 = __toESM(require("react-bootstrap/Form"), 1);
|
|
600
|
+
var import_Row6 = __toESM(require("react-bootstrap/Row"), 1);
|
|
601
601
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
602
602
|
function WrapIfAdditionalTemplate({
|
|
603
603
|
classNames,
|
|
@@ -690,10 +690,65 @@ function generateTemplates() {
|
|
|
690
690
|
}
|
|
691
691
|
var Templates_default = generateTemplates();
|
|
692
692
|
|
|
693
|
-
// src/
|
|
693
|
+
// src/CheckboxesWidget/CheckboxesWidget.tsx
|
|
694
694
|
var import_utils14 = require("@rjsf/utils");
|
|
695
695
|
var import_Form5 = __toESM(require("react-bootstrap/Form"), 1);
|
|
696
696
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
697
|
+
function CheckboxesWidget({
|
|
698
|
+
id,
|
|
699
|
+
htmlName,
|
|
700
|
+
disabled,
|
|
701
|
+
options,
|
|
702
|
+
value,
|
|
703
|
+
autofocus,
|
|
704
|
+
readonly,
|
|
705
|
+
required,
|
|
706
|
+
onChange,
|
|
707
|
+
onBlur,
|
|
708
|
+
onFocus
|
|
709
|
+
}) {
|
|
710
|
+
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
711
|
+
const optionValueFormat = (0, import_utils14.getOptionValueFormat)(options);
|
|
712
|
+
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
713
|
+
const _onChange = (index) => ({ target: { checked } }) => {
|
|
714
|
+
if (checked) {
|
|
715
|
+
onChange((0, import_utils14.enumOptionsSelectValue)(index, checkboxesValues, enumOptions));
|
|
716
|
+
} else {
|
|
717
|
+
onChange((0, import_utils14.enumOptionsDeselectValue)(index, checkboxesValues, enumOptions));
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
const _onBlur = ({ target }) => onBlur(id, (0, import_utils14.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
721
|
+
const _onFocus = ({ target }) => onFocus(id, (0, import_utils14.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_Form5.default.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
723
|
+
const checked = (0, import_utils14.enumOptionsIsSelected)(option.value, checkboxesValues);
|
|
724
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
726
|
+
import_Form5.default.Check,
|
|
727
|
+
{
|
|
728
|
+
inline,
|
|
729
|
+
required,
|
|
730
|
+
checked,
|
|
731
|
+
className: "bg-transparent border-0",
|
|
732
|
+
type: "checkbox",
|
|
733
|
+
id: (0, import_utils14.optionId)(id, index),
|
|
734
|
+
name: htmlName || id,
|
|
735
|
+
label: option.label,
|
|
736
|
+
autoFocus: autofocus && index === 0,
|
|
737
|
+
onChange: _onChange(index),
|
|
738
|
+
onBlur: _onBlur,
|
|
739
|
+
onFocus: _onFocus,
|
|
740
|
+
disabled: disabled || itemDisabled || readonly,
|
|
741
|
+
"aria-describedby": (0, import_utils14.ariaDescribedByIds)(id)
|
|
742
|
+
},
|
|
743
|
+
option.value
|
|
744
|
+
);
|
|
745
|
+
}) });
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/CheckboxWidget/CheckboxWidget.tsx
|
|
749
|
+
var import_utils15 = require("@rjsf/utils");
|
|
750
|
+
var import_Form6 = __toESM(require("react-bootstrap/Form"), 1);
|
|
751
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
697
752
|
function CheckboxWidget(props) {
|
|
698
753
|
const {
|
|
699
754
|
id,
|
|
@@ -712,8 +767,8 @@ function CheckboxWidget(props) {
|
|
|
712
767
|
registry,
|
|
713
768
|
uiSchema
|
|
714
769
|
} = props;
|
|
715
|
-
const required = (0,
|
|
716
|
-
const DescriptionFieldTemplate = (0,
|
|
770
|
+
const required = (0, import_utils15.schemaRequiresTrueValue)(schema);
|
|
771
|
+
const DescriptionFieldTemplate = (0, import_utils15.getTemplate)(
|
|
717
772
|
"DescriptionFieldTemplate",
|
|
718
773
|
registry,
|
|
719
774
|
options
|
|
@@ -722,23 +777,23 @@ function CheckboxWidget(props) {
|
|
|
722
777
|
const _onBlur = ({ target }) => onBlur(id, target && target.checked);
|
|
723
778
|
const _onFocus = ({ target }) => onFocus(id, target && target.checked);
|
|
724
779
|
const description = options.description || schema.description;
|
|
725
|
-
return /* @__PURE__ */ (0,
|
|
726
|
-
!hideLabel && description && /* @__PURE__ */ (0,
|
|
780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Form6.default.Group, { className: disabled || readonly ? "disabled" : "", "aria-describedby": (0, import_utils15.ariaDescribedByIds)(id), children: [
|
|
781
|
+
!hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
727
782
|
DescriptionFieldTemplate,
|
|
728
783
|
{
|
|
729
|
-
id: (0,
|
|
784
|
+
id: (0, import_utils15.descriptionId)(id),
|
|
730
785
|
description,
|
|
731
786
|
schema,
|
|
732
787
|
uiSchema,
|
|
733
788
|
registry
|
|
734
789
|
}
|
|
735
790
|
),
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
737
|
-
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
792
|
+
import_Form6.default.Check,
|
|
738
793
|
{
|
|
739
794
|
id,
|
|
740
795
|
name: htmlName || id,
|
|
741
|
-
label: (0,
|
|
796
|
+
label: (0, import_utils15.labelValue)(label, hideLabel || !label),
|
|
742
797
|
checked: typeof value === "undefined" ? false : value,
|
|
743
798
|
required,
|
|
744
799
|
disabled: disabled || readonly,
|
|
@@ -752,64 +807,9 @@ function CheckboxWidget(props) {
|
|
|
752
807
|
] });
|
|
753
808
|
}
|
|
754
809
|
|
|
755
|
-
// src/CheckboxesWidget/CheckboxesWidget.tsx
|
|
756
|
-
var import_Form6 = __toESM(require("react-bootstrap/Form"), 1);
|
|
757
|
-
var import_utils15 = require("@rjsf/utils");
|
|
758
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
759
|
-
function CheckboxesWidget({
|
|
760
|
-
id,
|
|
761
|
-
htmlName,
|
|
762
|
-
disabled,
|
|
763
|
-
options,
|
|
764
|
-
value,
|
|
765
|
-
autofocus,
|
|
766
|
-
readonly,
|
|
767
|
-
required,
|
|
768
|
-
onChange,
|
|
769
|
-
onBlur,
|
|
770
|
-
onFocus
|
|
771
|
-
}) {
|
|
772
|
-
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
773
|
-
const optionValueFormat = (0, import_utils15.getOptionValueFormat)(options);
|
|
774
|
-
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
775
|
-
const _onChange = (index) => ({ target: { checked } }) => {
|
|
776
|
-
if (checked) {
|
|
777
|
-
onChange((0, import_utils15.enumOptionsSelectValue)(index, checkboxesValues, enumOptions));
|
|
778
|
-
} else {
|
|
779
|
-
onChange((0, import_utils15.enumOptionsDeselectValue)(index, checkboxesValues, enumOptions));
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
const _onBlur = ({ target }) => onBlur(id, (0, import_utils15.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
783
|
-
const _onFocus = ({ target }) => onFocus(id, (0, import_utils15.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, emptyValue));
|
|
784
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Form6.default.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
785
|
-
const checked = (0, import_utils15.enumOptionsIsSelected)(option.value, checkboxesValues);
|
|
786
|
-
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
787
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
788
|
-
import_Form6.default.Check,
|
|
789
|
-
{
|
|
790
|
-
inline,
|
|
791
|
-
required,
|
|
792
|
-
checked,
|
|
793
|
-
className: "bg-transparent border-0",
|
|
794
|
-
type: "checkbox",
|
|
795
|
-
id: (0, import_utils15.optionId)(id, index),
|
|
796
|
-
name: htmlName || id,
|
|
797
|
-
label: option.label,
|
|
798
|
-
autoFocus: autofocus && index === 0,
|
|
799
|
-
onChange: _onChange(index),
|
|
800
|
-
onBlur: _onBlur,
|
|
801
|
-
onFocus: _onFocus,
|
|
802
|
-
disabled: disabled || itemDisabled || readonly,
|
|
803
|
-
"aria-describedby": (0, import_utils15.ariaDescribedByIds)(id)
|
|
804
|
-
},
|
|
805
|
-
option.value
|
|
806
|
-
);
|
|
807
|
-
}) });
|
|
808
|
-
}
|
|
809
|
-
|
|
810
810
|
// src/RadioWidget/RadioWidget.tsx
|
|
811
|
-
var import_Form7 = __toESM(require("react-bootstrap/Form"), 1);
|
|
812
811
|
var import_utils16 = require("@rjsf/utils");
|
|
812
|
+
var import_Form7 = __toESM(require("react-bootstrap/Form"), 1);
|
|
813
813
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
814
814
|
function RadioWidget({
|
|
815
815
|
id,
|
|
@@ -881,8 +881,8 @@ function RangeWidget(props) {
|
|
|
881
881
|
}
|
|
882
882
|
|
|
883
883
|
// src/SelectWidget/SelectWidget.tsx
|
|
884
|
-
var import_FormSelect = __toESM(require("react-bootstrap/FormSelect"), 1);
|
|
885
884
|
var import_utils18 = require("@rjsf/utils");
|
|
885
|
+
var import_FormSelect = __toESM(require("react-bootstrap/FormSelect"), 1);
|
|
886
886
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
887
887
|
function SelectWidget({
|
|
888
888
|
schema,
|