@rjsf/react-bootstrap 6.0.0-beta.20 → 6.0.0-beta.22
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 +147 -66
- package/dist/index.cjs.map +4 -4
- package/dist/react-bootstrap.esm.js +143 -62
- package/dist/react-bootstrap.esm.js.map +4 -4
- package/dist/react-bootstrap.umd.js +106 -32
- package/lib/AddButton/AddButton.js +1 -1
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +2 -2
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +3 -4
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js +2 -2
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js +2 -2
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/FieldTemplate/FieldTemplate.d.ts +1 -1
- package/lib/FieldTemplate/FieldTemplate.js +2 -2
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.d.ts +6 -5
- package/lib/IconButton/IconButton.js +1 -1
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +3 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +10 -0
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +22 -0
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -0
- package/lib/OptionalDataControlsTemplate/index.d.ts +2 -0
- package/lib/OptionalDataControlsTemplate/index.js +3 -0
- package/lib/OptionalDataControlsTemplate/index.js.map +1 -0
- package/lib/RadioWidget/RadioWidget.d.ts +1 -1
- package/lib/RadioWidget/RadioWidget.js +2 -2
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.d.ts +1 -1
- package/lib/SelectWidget/SelectWidget.js +2 -2
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/Templates/Templates.js +2 -0
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
- package/lib/TextareaWidget/TextareaWidget.js +2 -2
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/TitleField/TitleField.d.ts +1 -1
- package/lib/TitleField/TitleField.js +9 -2
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +2 -3
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/AddButton/AddButton.tsx +1 -1
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +2 -2
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +18 -12
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -1
- package/src/CheckboxWidget/CheckboxWidget.tsx +2 -1
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +14 -2
- package/src/FieldTemplate/FieldTemplate.tsx +6 -4
- package/src/IconButton/IconButton.tsx +12 -6
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +6 -2
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +47 -0
- package/src/OptionalDataControlsTemplate/index.ts +2 -0
- package/src/RadioWidget/RadioWidget.tsx +2 -1
- package/src/SelectWidget/SelectWidget.tsx +2 -1
- package/src/Templates/Templates.ts +2 -0
- package/src/TextareaWidget/TextareaWidget.tsx +2 -1
- package/src/TitleField/TitleField.tsx +19 -2
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +4 -6
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
15
|
Button,
|
|
16
16
|
{
|
|
17
|
+
title: translateString(utils.TranslatableString.AddItemButton),
|
|
17
18
|
...props,
|
|
18
19
|
style: { width: "100%" },
|
|
19
20
|
className: `ml-1 ${props.className}`,
|
|
20
|
-
title: translateString(utils.TranslatableString.AddItemButton),
|
|
21
21
|
children: /* @__PURE__ */ jsxRuntime.jsx(BsPlus.BsPlus, {})
|
|
22
22
|
}
|
|
23
23
|
);
|
|
@@ -42,23 +42,32 @@
|
|
|
42
42
|
] }) });
|
|
43
43
|
}
|
|
44
44
|
function ArrayFieldTemplate(props) {
|
|
45
|
-
const {
|
|
45
|
+
const {
|
|
46
|
+
canAdd,
|
|
47
|
+
disabled,
|
|
48
|
+
fieldPathId,
|
|
49
|
+
uiSchema,
|
|
50
|
+
items,
|
|
51
|
+
optionalDataControl,
|
|
52
|
+
onAddClick,
|
|
53
|
+
readonly,
|
|
54
|
+
registry,
|
|
55
|
+
required,
|
|
56
|
+
schema,
|
|
57
|
+
title
|
|
58
|
+
} = props;
|
|
46
59
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
47
60
|
const ArrayFieldDescriptionTemplate = utils.getTemplate(
|
|
48
61
|
"ArrayFieldDescriptionTemplate",
|
|
49
62
|
registry,
|
|
50
63
|
uiOptions
|
|
51
64
|
);
|
|
52
|
-
const ArrayFieldItemTemplate2 = utils.getTemplate(
|
|
53
|
-
"ArrayFieldItemTemplate",
|
|
54
|
-
registry,
|
|
55
|
-
uiOptions
|
|
56
|
-
);
|
|
57
65
|
const ArrayFieldTitleTemplate = utils.getTemplate(
|
|
58
66
|
"ArrayFieldTitleTemplate",
|
|
59
67
|
registry,
|
|
60
68
|
uiOptions
|
|
61
69
|
);
|
|
70
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
62
71
|
const {
|
|
63
72
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
64
73
|
} = registry.templates;
|
|
@@ -71,7 +80,8 @@
|
|
|
71
80
|
schema,
|
|
72
81
|
uiSchema,
|
|
73
82
|
required,
|
|
74
|
-
registry
|
|
83
|
+
registry,
|
|
84
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
75
85
|
}
|
|
76
86
|
),
|
|
77
87
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -85,7 +95,8 @@
|
|
|
85
95
|
}
|
|
86
96
|
),
|
|
87
97
|
/* @__PURE__ */ jsxRuntime.jsxs(Container, { fluid: true, className: "p-0 m-0", children: [
|
|
88
|
-
|
|
98
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
99
|
+
items,
|
|
89
100
|
canAdd && /* @__PURE__ */ jsxRuntime.jsx(Container, { className: "", children: /* @__PURE__ */ jsxRuntime.jsxs(Row2, { className: "mt-2", children: [
|
|
90
101
|
/* @__PURE__ */ jsxRuntime.jsx(Col2, { xs: 9 }),
|
|
91
102
|
/* @__PURE__ */ jsxRuntime.jsx(Col2, { xs: 3, className: "py-4 col-lg-3 col-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -105,6 +116,7 @@
|
|
|
105
116
|
}
|
|
106
117
|
function BaseInputTemplate({
|
|
107
118
|
id,
|
|
119
|
+
htmlName,
|
|
108
120
|
placeholder,
|
|
109
121
|
required,
|
|
110
122
|
readonly,
|
|
@@ -134,7 +146,7 @@
|
|
|
134
146
|
Form3.Control,
|
|
135
147
|
{
|
|
136
148
|
id,
|
|
137
|
-
name: id,
|
|
149
|
+
name: htmlName || id,
|
|
138
150
|
placeholder,
|
|
139
151
|
autoFocus: autofocus,
|
|
140
152
|
required,
|
|
@@ -204,8 +216,8 @@
|
|
|
204
216
|
IconButton,
|
|
205
217
|
{
|
|
206
218
|
title: translateString(utils.TranslatableString.RemoveButton),
|
|
207
|
-
...props,
|
|
208
219
|
variant: "danger",
|
|
220
|
+
...props,
|
|
209
221
|
icon: /* @__PURE__ */ jsxRuntime.jsx(IoIosRemove.IoIosRemove, {})
|
|
210
222
|
}
|
|
211
223
|
);
|
|
@@ -242,8 +254,9 @@
|
|
|
242
254
|
disabled,
|
|
243
255
|
label,
|
|
244
256
|
hidden,
|
|
245
|
-
|
|
246
|
-
|
|
257
|
+
onKeyRename,
|
|
258
|
+
onKeyRenameBlur,
|
|
259
|
+
onRemoveProperty,
|
|
247
260
|
readonly,
|
|
248
261
|
required,
|
|
249
262
|
schema,
|
|
@@ -267,8 +280,9 @@
|
|
|
267
280
|
disabled,
|
|
268
281
|
id,
|
|
269
282
|
label,
|
|
270
|
-
|
|
271
|
-
|
|
283
|
+
onKeyRename,
|
|
284
|
+
onKeyRenameBlur,
|
|
285
|
+
onRemoveProperty,
|
|
272
286
|
readonly,
|
|
273
287
|
required,
|
|
274
288
|
schema,
|
|
@@ -309,7 +323,8 @@
|
|
|
309
323
|
fieldPathId,
|
|
310
324
|
schema,
|
|
311
325
|
formData,
|
|
312
|
-
|
|
326
|
+
optionalDataControl,
|
|
327
|
+
onAddProperty,
|
|
313
328
|
disabled,
|
|
314
329
|
readonly,
|
|
315
330
|
registry
|
|
@@ -321,6 +336,7 @@
|
|
|
321
336
|
registry,
|
|
322
337
|
uiOptions
|
|
323
338
|
);
|
|
339
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
324
340
|
const {
|
|
325
341
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
326
342
|
} = registry.templates;
|
|
@@ -333,7 +349,8 @@
|
|
|
333
349
|
required,
|
|
334
350
|
schema,
|
|
335
351
|
uiSchema,
|
|
336
|
-
registry
|
|
352
|
+
registry,
|
|
353
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
337
354
|
}
|
|
338
355
|
),
|
|
339
356
|
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -347,6 +364,7 @@
|
|
|
347
364
|
}
|
|
348
365
|
),
|
|
349
366
|
/* @__PURE__ */ jsxRuntime.jsxs(Container, { fluid: true, className: "p-0", children: [
|
|
367
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
350
368
|
properties.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(Row2, { style: { marginBottom: "10px" }, className: element.hidden ? "d-none" : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(Col2, { xs: 12, children: [
|
|
351
369
|
" ",
|
|
352
370
|
element.content
|
|
@@ -355,7 +373,7 @@
|
|
|
355
373
|
AddButton2,
|
|
356
374
|
{
|
|
357
375
|
id: utils.buttonId(fieldPathId, "add"),
|
|
358
|
-
onClick:
|
|
376
|
+
onClick: onAddProperty,
|
|
359
377
|
disabled: disabled || readonly,
|
|
360
378
|
className: "rjsf-object-property-expand",
|
|
361
379
|
uiSchema,
|
|
@@ -365,6 +383,38 @@
|
|
|
365
383
|
] })
|
|
366
384
|
] });
|
|
367
385
|
}
|
|
386
|
+
function OptionalDataControlsTemplate(props) {
|
|
387
|
+
const { id, registry, label, onAddClick, onRemoveClick } = props;
|
|
388
|
+
if (onAddClick) {
|
|
389
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
+
IconButton,
|
|
391
|
+
{
|
|
392
|
+
id,
|
|
393
|
+
registry,
|
|
394
|
+
className: "rjsf-add-optional-data",
|
|
395
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(BsPlus.BsPlus, {}),
|
|
396
|
+
onClick: onAddClick,
|
|
397
|
+
title: label,
|
|
398
|
+
size: "sm",
|
|
399
|
+
variant: "secondary"
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
} else if (onRemoveClick) {
|
|
403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
404
|
+
RemoveButton,
|
|
405
|
+
{
|
|
406
|
+
id,
|
|
407
|
+
registry,
|
|
408
|
+
className: "rjsf-remove-optional-data",
|
|
409
|
+
onClick: onRemoveClick,
|
|
410
|
+
title: label,
|
|
411
|
+
size: "sm",
|
|
412
|
+
variant: "secondary"
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
return /* @__PURE__ */ jsxRuntime.jsx("em", { id, children: label });
|
|
417
|
+
}
|
|
368
418
|
function SubmitButton(props) {
|
|
369
419
|
const { submitText, norender, props: submitButtonProps } = utils.getSubmitButtonOptions(props.uiSchema);
|
|
370
420
|
if (norender) {
|
|
@@ -375,12 +425,20 @@
|
|
|
375
425
|
function TitleField({
|
|
376
426
|
id,
|
|
377
427
|
title,
|
|
378
|
-
uiSchema
|
|
428
|
+
uiSchema,
|
|
429
|
+
optionalDataControl
|
|
379
430
|
}) {
|
|
380
431
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
432
|
+
let heading = /* @__PURE__ */ jsxRuntime.jsx("h5", { children: uiOptions.title || title });
|
|
433
|
+
if (optionalDataControl) {
|
|
434
|
+
heading = /* @__PURE__ */ jsxRuntime.jsx(Container, { fluid: true, className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(Row2, { children: [
|
|
435
|
+
/* @__PURE__ */ jsxRuntime.jsx(Col2, { xs: "11", children: heading }),
|
|
436
|
+
/* @__PURE__ */ jsxRuntime.jsx(Col2, { xs: "1", style: { marginLeft: "-5px" }, children: optionalDataControl })
|
|
437
|
+
] }) });
|
|
438
|
+
}
|
|
381
439
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { id, className: "my-1", children: [
|
|
382
|
-
|
|
383
|
-
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-0 bg-secondary", style: { height: "1px" } })
|
|
440
|
+
heading,
|
|
441
|
+
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-0 bg-secondary mt-0", style: { height: "1px" } })
|
|
384
442
|
] });
|
|
385
443
|
}
|
|
386
444
|
function WrapIfAdditionalTemplate({
|
|
@@ -390,8 +448,8 @@
|
|
|
390
448
|
disabled,
|
|
391
449
|
id,
|
|
392
450
|
label,
|
|
393
|
-
|
|
394
|
-
|
|
451
|
+
onRemoveProperty,
|
|
452
|
+
onKeyRenameBlur,
|
|
395
453
|
readonly,
|
|
396
454
|
required,
|
|
397
455
|
schema,
|
|
@@ -405,7 +463,6 @@
|
|
|
405
463
|
if (!additional) {
|
|
406
464
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames, style, children });
|
|
407
465
|
}
|
|
408
|
-
const handleBlur = ({ target }) => onKeyChange(target.value);
|
|
409
466
|
const keyId = `${id}-key`;
|
|
410
467
|
return /* @__PURE__ */ jsxRuntime.jsxs(Row2, { className: classNames, style, children: [
|
|
411
468
|
/* @__PURE__ */ jsxRuntime.jsx(Col2, { xs: 5, children: /* @__PURE__ */ jsxRuntime.jsxs(Form3.Group, { children: [
|
|
@@ -418,7 +475,7 @@
|
|
|
418
475
|
disabled: disabled || readonly,
|
|
419
476
|
id: keyId,
|
|
420
477
|
name: keyId,
|
|
421
|
-
onBlur: !readonly ?
|
|
478
|
+
onBlur: !readonly ? onKeyRenameBlur : void 0,
|
|
422
479
|
type: "text"
|
|
423
480
|
}
|
|
424
481
|
)
|
|
@@ -430,7 +487,7 @@
|
|
|
430
487
|
id: utils.buttonId(id, "remove"),
|
|
431
488
|
className: "rjsf-object-property-remove w-100",
|
|
432
489
|
disabled: disabled || readonly,
|
|
433
|
-
onClick:
|
|
490
|
+
onClick: onRemoveProperty,
|
|
434
491
|
uiSchema,
|
|
435
492
|
registry
|
|
436
493
|
}
|
|
@@ -460,6 +517,7 @@
|
|
|
460
517
|
GridTemplate,
|
|
461
518
|
MultiSchemaFieldTemplate,
|
|
462
519
|
ObjectFieldTemplate,
|
|
520
|
+
OptionalDataControlsTemplate,
|
|
463
521
|
TitleFieldTemplate: TitleField,
|
|
464
522
|
WrapIfAdditionalTemplate
|
|
465
523
|
};
|
|
@@ -468,6 +526,7 @@
|
|
|
468
526
|
function CheckboxWidget(props) {
|
|
469
527
|
const {
|
|
470
528
|
id,
|
|
529
|
+
htmlName,
|
|
471
530
|
value,
|
|
472
531
|
disabled,
|
|
473
532
|
readonly,
|
|
@@ -507,7 +566,7 @@
|
|
|
507
566
|
Form3.Check,
|
|
508
567
|
{
|
|
509
568
|
id,
|
|
510
|
-
name: id,
|
|
569
|
+
name: htmlName || id,
|
|
511
570
|
label: utils.labelValue(label, hideLabel || !label),
|
|
512
571
|
checked: typeof value === "undefined" ? false : value,
|
|
513
572
|
required,
|
|
@@ -521,7 +580,19 @@
|
|
|
521
580
|
)
|
|
522
581
|
] });
|
|
523
582
|
}
|
|
524
|
-
function CheckboxesWidget({
|
|
583
|
+
function CheckboxesWidget({
|
|
584
|
+
id,
|
|
585
|
+
htmlName,
|
|
586
|
+
disabled,
|
|
587
|
+
options,
|
|
588
|
+
value,
|
|
589
|
+
autofocus,
|
|
590
|
+
readonly,
|
|
591
|
+
required,
|
|
592
|
+
onChange,
|
|
593
|
+
onBlur,
|
|
594
|
+
onFocus
|
|
595
|
+
}) {
|
|
525
596
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
526
597
|
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
527
598
|
const _onChange = (index) => ({ target: { checked } }) => {
|
|
@@ -545,7 +616,7 @@
|
|
|
545
616
|
className: "bg-transparent border-0",
|
|
546
617
|
type: "checkbox",
|
|
547
618
|
id: utils.optionId(id, index),
|
|
548
|
-
name: id,
|
|
619
|
+
name: htmlName || id,
|
|
549
620
|
label: option.label,
|
|
550
621
|
autoFocus: autofocus && index === 0,
|
|
551
622
|
onChange: _onChange(index),
|
|
@@ -560,6 +631,7 @@
|
|
|
560
631
|
}
|
|
561
632
|
function RadioWidget({
|
|
562
633
|
id,
|
|
634
|
+
htmlName,
|
|
563
635
|
options,
|
|
564
636
|
value,
|
|
565
637
|
required,
|
|
@@ -583,7 +655,7 @@
|
|
|
583
655
|
inline,
|
|
584
656
|
label: option.label,
|
|
585
657
|
id: utils.optionId(id, index),
|
|
586
|
-
name: id,
|
|
658
|
+
name: htmlName || id,
|
|
587
659
|
type: "radio",
|
|
588
660
|
disabled: disabled || itemDisabled || readonly,
|
|
589
661
|
checked,
|
|
@@ -622,6 +694,7 @@
|
|
|
622
694
|
function SelectWidget({
|
|
623
695
|
schema,
|
|
624
696
|
id,
|
|
697
|
+
htmlName,
|
|
625
698
|
options,
|
|
626
699
|
required,
|
|
627
700
|
disabled,
|
|
@@ -650,7 +723,7 @@
|
|
|
650
723
|
FormSelect,
|
|
651
724
|
{
|
|
652
725
|
id,
|
|
653
|
-
name: id,
|
|
726
|
+
name: htmlName || id,
|
|
654
727
|
value: typeof selectedIndexes === "undefined" ? emptyValue : selectedIndexes,
|
|
655
728
|
required,
|
|
656
729
|
multiple,
|
|
@@ -682,6 +755,7 @@
|
|
|
682
755
|
}
|
|
683
756
|
function TextareaWidget({
|
|
684
757
|
id,
|
|
758
|
+
htmlName,
|
|
685
759
|
placeholder,
|
|
686
760
|
value,
|
|
687
761
|
required,
|
|
@@ -700,7 +774,7 @@
|
|
|
700
774
|
FormControl,
|
|
701
775
|
{
|
|
702
776
|
id,
|
|
703
|
-
name: id,
|
|
777
|
+
name: htmlName || id,
|
|
704
778
|
as: "textarea",
|
|
705
779
|
placeholder,
|
|
706
780
|
disabled,
|
|
@@ -4,6 +4,6 @@ import Button from 'react-bootstrap/Button';
|
|
|
4
4
|
import { BsPlus } from '@react-icons/all-files/bs/BsPlus';
|
|
5
5
|
export default function AddButton({ uiSchema, registry, ...props }) {
|
|
6
6
|
const { translateString } = registry;
|
|
7
|
-
return (_jsx(Button, { ...props, style: { width: '100%' }, className: `ml-1 ${props.className}`,
|
|
7
|
+
return (_jsx(Button, { title: translateString(TranslatableString.AddItemButton), ...props, style: { width: '100%' }, className: `ml-1 ${props.className}`, children: _jsx(BsPlus, {}) }));
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=AddButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjH,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACiB;IACzB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,KAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjH,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACiB;IACzB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,KACpD,KAAK,EACT,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,SAAS,EAAE,QAAQ,KAAK,CAAC,SAAS,EAAE,YAEpC,KAAC,MAAM,KAAG,GACH,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props:
|
|
1
|
+
import { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,
|
|
1
|
+
{"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA2C;IAC3C,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACzE,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,QAAQ,GAAkB;QAC9B,IAAI,EAAE,CAAC;QACP,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,MAAM;KACnB,CAAC;IACF,OAAO,CACL,wBACE,MAAC,GAAG,IAAC,SAAS,EAAC,iCAAiC,aAC9C,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,YACf,QAAQ,GACL,EACN,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,SAAS,EAAC,MAAM,YAChC,UAAU,IAAI,CACb,cAAK,SAAS,EAAC,iBAAiB,YAC9B,KAAC,6BAA6B,OAAK,YAAY,EAAE,KAAK,EAAE,QAAQ,GAAI,GAChE,CACP,GACG,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,14 +4,13 @@ import Col from 'react-bootstrap/Col';
|
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
5
5
|
import { buttonId, getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
6
6
|
export default function ArrayFieldTemplate(props) {
|
|
7
|
-
const { canAdd, disabled, fieldPathId, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
7
|
+
const { canAdd, disabled, fieldPathId, uiSchema, items, optionalDataControl, onAddClick, readonly, registry, required, schema, title, } = props;
|
|
8
8
|
const uiOptions = getUiOptions(uiSchema);
|
|
9
9
|
const ArrayFieldDescriptionTemplate = getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
|
|
10
|
-
const ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
|
|
11
10
|
const ArrayFieldTitleTemplate = getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
|
|
11
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
12
12
|
// Button templates are not overridden in the uiSchema
|
|
13
13
|
const { ButtonTemplates: { AddButton }, } = registry.templates;
|
|
14
|
-
return (_jsx("div", { children: _jsx(Row, { className: 'p-0 m-0', children: _jsxs(Col, { className: 'p-0 m-0', children: [_jsx(ArrayFieldTitleTemplate, { fieldPathId: fieldPathId, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry }), _jsx(ArrayFieldDescriptionTemplate, { fieldPathId: fieldPathId, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsxs(Container, { fluid: true, className: 'p-0 m-0', children: [items &&
|
|
15
|
-
items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))), canAdd && (_jsx(Container, { className: '', children: _jsxs(Row, { className: 'mt-2', children: [_jsx(Col, { xs: 9 }), _jsx(Col, { xs: 3, className: 'py-4 col-lg-3 col-3', children: _jsx(AddButton, { id: buttonId(fieldPathId, 'add'), className: 'rjsf-array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }) })] }) }))] }, `array-item-list-${fieldPathId.$id}`)] }) }) }));
|
|
14
|
+
return (_jsx("div", { children: _jsx(Row, { className: 'p-0 m-0', children: _jsxs(Col, { className: 'p-0 m-0', children: [_jsx(ArrayFieldTitleTemplate, { fieldPathId: fieldPathId, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, required: required, registry: registry, optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : undefined }), _jsx(ArrayFieldDescriptionTemplate, { fieldPathId: fieldPathId, description: uiOptions.description || schema.description, schema: schema, uiSchema: uiSchema, registry: registry }), _jsxs(Container, { fluid: true, className: 'p-0 m-0', children: [!showOptionalDataControlInTitle ? optionalDataControl : undefined, items, canAdd && (_jsx(Container, { className: '', children: _jsxs(Row, { className: 'mt-2', children: [_jsx(Col, { xs: 9 }), _jsx(Col, { xs: 3, className: 'py-4 col-lg-3 col-3', children: _jsx(AddButton, { id: buttonId(fieldPathId, 'add'), className: 'rjsf-array-item-add', onClick: onAddClick, disabled: disabled || readonly, uiSchema: uiSchema, registry: registry }) })] }) }))] }, `array-item-list-${fieldPathId.$id}`)] }) }) }));
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=ArrayFieldTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAEL,QAAQ,EAER,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,GACN,GAAG,KAAK,CAAC;IACV,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,uBAAuB,GAAG,WAAW,CACzC,yBAAyB,EACzB,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,8BAA8B,GAAG,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC;IAC9D,sDAAsD;IACtD,MAAM,EACJ,eAAe,EAAE,EAAE,SAAS,EAAE,GAC/B,GAAG,QAAQ,CAAC,SAAS,CAA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F,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
-
export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, placeholder, required, readonly, disabled, type, value, onChange, onChangeOverride, onBlur, onFocus, autofocus, options, schema, rawErrors, children, extraProps, }: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, htmlName, placeholder, required, readonly, disabled, type, value, onChange, onChangeOverride, onBlur, onFocus, autofocus, options, schema, rawErrors, children, extraProps, }: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Form from 'react-bootstrap/Form';
|
|
3
3
|
import { ariaDescribedByIds, examplesId, getInputProps, } from '@rjsf/utils';
|
|
4
|
-
export default function BaseInputTemplate({ id, placeholder, required, readonly, disabled, type, value, onChange, onChangeOverride, onBlur, onFocus, autofocus, options, schema, rawErrors = [], children, extraProps, }) {
|
|
4
|
+
export default function BaseInputTemplate({ id, htmlName, placeholder, required, readonly, disabled, type, value, onChange, onChangeOverride, onBlur, onFocus, autofocus, options, schema, rawErrors = [], children, extraProps, }) {
|
|
5
5
|
const inputProps = {
|
|
6
6
|
...extraProps,
|
|
7
7
|
...getInputProps(schema, type, options),
|
|
@@ -10,7 +10,7 @@ export default function BaseInputTemplate({ id, placeholder, required, readonly,
|
|
|
10
10
|
const _onBlur = ({ target }) => onBlur(id, target && target.value);
|
|
11
11
|
const _onFocus = ({ target }) => onFocus(id, target && target.value);
|
|
12
12
|
// const classNames = [rawErrors.length > 0 ? "is-invalid" : "", type === 'file' ? 'custom-file-label': ""]
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(Form.Control, { id: id, name: id, placeholder: placeholder, autoFocus: autofocus, required: required, disabled: disabled, readOnly: readonly, className: rawErrors.length > 0 ? 'is-invalid' : '', list: schema.examples ? examplesId(id) : undefined, ...inputProps, value: value || value === 0 ? value : '', onChange: onChangeOverride || _onChange, onBlur: _onBlur, onFocus: _onFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), children, Array.isArray(schema.examples) ? (_jsx("datalist", { id: examplesId(id), children: schema.examples
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx(Form.Control, { id: id, name: htmlName || id, placeholder: placeholder, autoFocus: autofocus, required: required, disabled: disabled, readOnly: readonly, className: rawErrors.length > 0 ? 'is-invalid' : '', list: schema.examples ? examplesId(id) : undefined, ...inputProps, value: value || value === 0 ? value : '', onChange: onChangeOverride || _onChange, onBlur: _onBlur, onFocus: _onFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }), children, Array.isArray(schema.examples) ? (_jsx("datalist", { id: examplesId(id), children: schema.examples
|
|
14
14
|
.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : [])
|
|
15
15
|
.map((example) => {
|
|
16
16
|
return _jsx("option", { value: example }, example);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,sBAAsB,CAAC;AACxC,OAAO,EACL,kBAAkB,EAElB,UAAU,EAEV,aAAa,GAGd,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,EACA,EAAE,EACF,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,UAAU,GACsB;IAChC,MAAM,UAAU,GAAG;QACjB,GAAG,UAAU;QACb,GAAG,aAAa,CAAU,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;KACjD,CAAC;IACF,MAAM,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAiC,EAAE,EAAE,CACzE,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,EAAgC,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IACjG,MAAM,QAAQ,GAAG,CAAC,EAAE,MAAM,EAAgC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAEnG,2GAA2G;IAC3G,OAAO,CACL,8BACE,KAAC,IAAI,CAAC,OAAO,IACX,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/BaseInputTemplate/BaseInputTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,sBAAsB,CAAC;AACxC,OAAO,EACL,kBAAkB,EAElB,UAAU,EAEV,aAAa,GAGd,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,EACA,EAAE,EACF,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,UAAU,GACsB;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kB,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAC3D,EACD,QAAQ,EACR,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAChC,mBAAU,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,YACxB,MAAM,CAAC,QAAqB;qBAC3B,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,MAAM,CAAC,OAAO,CAAc,CAAC,CAAC,CAAC,EAAE,CAAC;qBACzG,GAAG,CAAC,CAAC,OAAY,EAAE,EAAE;oBACpB,OAAO,iBAAsB,KAAK,EAAE,OAAO,IAAvB,OAAO,CAAoB,CAAC;gBAClD,CAAC,CAAC,GACK,CACZ,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ariaDescribedByIds, descriptionId, getTemplate, labelValue, schemaRequiresTrueValue, } from '@rjsf/utils';
|
|
3
3
|
import Form from 'react-bootstrap/Form';
|
|
4
4
|
export default function CheckboxWidget(props) {
|
|
5
|
-
const { id, value, disabled, readonly, label, hideLabel, schema, autofocus, options, onChange, onBlur, onFocus, registry, uiSchema, } = props;
|
|
5
|
+
const { id, htmlName, value, disabled, readonly, label, hideLabel, schema, autofocus, options, onChange, onBlur, onFocus, registry, uiSchema, } = props;
|
|
6
6
|
// Because an unchecked checkbox will cause html5 validation to fail, only add
|
|
7
7
|
// the "required" attribute if the field value must be "true", due to the
|
|
8
8
|
// "const" or "enum" keywords
|
|
@@ -12,6 +12,6 @@ export default function CheckboxWidget(props) {
|
|
|
12
12
|
const _onBlur = ({ target }) => onBlur(id, target && target.checked);
|
|
13
13
|
const _onFocus = ({ target }) => onFocus(id, target && target.checked);
|
|
14
14
|
const description = options.description || schema.description;
|
|
15
|
-
return (_jsxs(Form.Group, { className: disabled || readonly ? 'disabled' : '', "aria-describedby": ariaDescribedByIds(id), children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(Form.Check, { id: id, name: id, label: labelValue(label, hideLabel || !label), checked: typeof value === 'undefined' ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: _onChange, type: 'checkbox', onBlur: _onBlur, onFocus: _onFocus })] }));
|
|
15
|
+
return (_jsxs(Form.Group, { className: disabled || readonly ? 'disabled' : '', "aria-describedby": ariaDescribedByIds(id), children: [!hideLabel && description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(Form.Check, { id: id, name: htmlName || id, label: labelValue(label, hideLabel || !label), checked: typeof value === 'undefined' ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: _onChange, type: 'checkbox', onBlur: _onBlur, onFocus: _onFocus })] }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=CheckboxWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxWidget.js","sourceRoot":"","sources":["../../src/CheckboxWidget/CheckboxWidget.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,UAAU,EAEV,uBAAuB,GAIxB,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,cAAc,CAIpC,KAA2B;IAC3B,MAAM,EACJ,EAAE,EACF,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,GAA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,KAAC,wBAAwB,IACvB,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACD,KAAC,IAAI,CAAC,KAAK,IACT,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,QAAQ,IAAI,EAAE,EACpB,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,IAAI,CAAC,KAAK,CAAC,EAC7C,OAAO,EAAE,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EACrD,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAC,UAAU,EACf,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,GACjB,IACS,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
|
-
export default function CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, htmlName, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Form from 'react-bootstrap/Form';
|
|
3
3
|
import { ariaDescribedByIds, enumOptionsDeselectValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, optionId, } from '@rjsf/utils';
|
|
4
|
-
export default function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus }) {
|
|
4
|
+
export default function CheckboxesWidget({ id, htmlName, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus, }) {
|
|
5
5
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
6
6
|
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
7
7
|
const _onChange = (index) => ({ target: { checked } }) => {
|
|
@@ -18,7 +18,7 @@ export default function CheckboxesWidget({ id, disabled, options, value, autofoc
|
|
|
18
18
|
enumOptions.map((option, index) => {
|
|
19
19
|
const checked = enumOptionsIsSelected(option.value, checkboxesValues);
|
|
20
20
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
21
|
-
return (_jsx(Form.Check, { inline: inline, required: required, checked: checked, className: 'bg-transparent border-0', type: 'checkbox', id: optionId(id, index), name: id, label: option.label, autoFocus: autofocus && index === 0, onChange: _onChange(index), onBlur: _onBlur, onFocus: _onFocus, disabled: disabled || itemDisabled || readonly, "aria-describedby": ariaDescribedByIds(id) }, option.value));
|
|
21
|
+
return (_jsx(Form.Check, { inline: inline, required: required, checked: checked, className: 'bg-transparent border-0', type: 'checkbox', id: optionId(id, index), name: htmlName || id, label: option.label, autoFocus: autofocus && index === 0, onChange: _onChange(index), onBlur: _onBlur, onFocus: _onFocus, disabled: disabled || itemDisabled || readonly, "aria-describedby": ariaDescribedByIds(id) }, option.value));
|
|
22
22
|
}) }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=CheckboxesWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxesWidget.js","sourceRoot":"","sources":["../../src/CheckboxesWidget/CheckboxesWidget.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,sBAAsB,CAAC;AACxC,OAAO,EACL,kBAAkB,EACl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CAAC,GACO,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
-
export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, children, displayLabel, rawErrors, errors, help, description, rawDescription, classNames, style, disabled, label, hidden,
|
|
2
|
+
export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, children, displayLabel, rawErrors, errors, help, description, rawDescription, classNames, style, disabled, label, hidden, onKeyRename, onKeyRenameBlur, onRemoveProperty, readonly, required, schema, uiSchema, registry, }: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
3
3
|
import Form from 'react-bootstrap/Form';
|
|
4
|
-
export default function FieldTemplate({ id, children, displayLabel, rawErrors = [], errors, help, description, rawDescription, classNames, style, disabled, label, hidden,
|
|
4
|
+
export default function FieldTemplate({ id, children, displayLabel, rawErrors = [], errors, help, description, rawDescription, classNames, style, disabled, label, hidden, onKeyRename, onKeyRenameBlur, onRemoveProperty, readonly, required, schema, uiSchema, registry, }) {
|
|
5
5
|
const uiOptions = getUiOptions(uiSchema);
|
|
6
6
|
const WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
|
|
7
7
|
if (hidden) {
|
|
8
8
|
return _jsx("div", { className: 'hidden', children: children });
|
|
9
9
|
}
|
|
10
|
-
return (_jsx(WrapIfAdditionalTemplate, { classNames: classNames, style: style, disabled: disabled, id: id, label: label,
|
|
10
|
+
return (_jsx(WrapIfAdditionalTemplate, { classNames: classNames, style: style, disabled: disabled, id: id, label: label, onKeyRename: onKeyRename, onKeyRenameBlur: onKeyRenameBlur, onRemoveProperty: onRemoveProperty, readonly: readonly, required: required, schema: schema, uiSchema: uiSchema, registry: registry, children: _jsxs(Form.Group, { children: [displayLabel && (_jsxs(Form.Label, { htmlFor: id, className: rawErrors.length > 0 ? 'text-danger' : '', children: [label, required ? '*' : null] })), children, displayLabel && rawDescription && (_jsx(Form.Text, { className: rawErrors.length > 0 ? 'text-danger' : 'text-muted', children: description })), errors, help] }) }));
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=FieldTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,EACA,EAAE,EACF,QAAQ,EACR,YAAY,EACZ,SAAS,GAAG,EAAE,EACd,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,EACA,EAAE,EACF,QAAQ,EACR,YAAY,EACZ,SAAS,GAAG,EAAE,EACd,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,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
|
2
2
|
import { ButtonProps } from 'react-bootstrap/Button';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
3
|
+
export type BootstrapIconButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = IconButtonProps<T, S, F> & ButtonProps;
|
|
4
|
+
export default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BootstrapIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BootstrapIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BootstrapIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BootstrapIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BootstrapIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,6 +23,6 @@ export function MoveUpButton(props) {
|
|
|
23
23
|
}
|
|
24
24
|
export function RemoveButton(props) {
|
|
25
25
|
const { registry: { translateString }, } = props;
|
|
26
|
-
return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton),
|
|
26
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), variant: 'danger', ...props, icon: _jsx(IoIosRemove, {}) }));
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../src/IconButton/IconButton.t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AE,IAAI,EAAE,KAAC,SAAS,KAAG,GAAI,CAAC;AAC/G,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAAwC;IAExC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,cAAc,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,KAAC,kBAAkB,KAAG,GAAI,CACnH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAwC;IAExC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,KAAC,gBAAgB,KAAG,GAAI,CAAC;AACxH,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAwC;IAExC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,EACvD,OAAO,EAAC,QAAQ,KACZ,KAAK,EACT,IAAI,EAAE,KAAC,WAAW,KAAG,GACrB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
-
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ description, title, properties, required, uiSchema, fieldPathId, schema, formData,
|
|
2
|
+
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ description, title, properties, required, uiSchema, fieldPathId, schema, formData, optionalDataControl, onAddProperty, disabled, readonly, registry, }: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|