@rjsf/primereact 6.0.0-beta.20 → 6.0.0-beta.21
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 +129 -70
- package/dist/index.cjs.map +4 -4
- package/dist/primereact.esm.js +121 -62
- package/dist/primereact.esm.js.map +4 -4
- package/dist/primereact.umd.js +75 -19
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +4 -4
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.d.ts +1 -1
- package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.js +7 -3
- package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.d.ts +7 -6
- package/lib/IconButton/IconButton.js +1 -2
- package/lib/IconButton/IconButton.js.map +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 +21 -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/Templates/Templates.js +2 -0
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/TitleField/TitleField.d.ts +1 -1
- package/lib/TitleField/TitleField.js +6 -2
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +13 -10
- package/src/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.tsx +11 -2
- package/src/IconButton/IconButton.tsx +13 -9
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +4 -0
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +44 -0
- package/src/OptionalDataControlsTemplate/index.ts +2 -0
- package/src/Templates/Templates.ts +2 -0
- package/src/TitleField/TitleField.tsx +15 -3
package/dist/primereact.esm.js
CHANGED
|
@@ -63,6 +63,7 @@ function ArrayFieldTemplate(props) {
|
|
|
63
63
|
className,
|
|
64
64
|
disabled,
|
|
65
65
|
items,
|
|
66
|
+
optionalDataControl,
|
|
66
67
|
onAddClick,
|
|
67
68
|
readonly,
|
|
68
69
|
schema,
|
|
@@ -87,6 +88,7 @@ function ArrayFieldTemplate(props) {
|
|
|
87
88
|
registry,
|
|
88
89
|
uiOptions
|
|
89
90
|
);
|
|
91
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
90
92
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
91
93
|
/* @__PURE__ */ jsx3(
|
|
92
94
|
ArrayFieldTitleTemplate2,
|
|
@@ -96,7 +98,8 @@ function ArrayFieldTemplate(props) {
|
|
|
96
98
|
schema,
|
|
97
99
|
uiSchema,
|
|
98
100
|
required,
|
|
99
|
-
registry
|
|
101
|
+
registry,
|
|
102
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
100
103
|
}
|
|
101
104
|
),
|
|
102
105
|
/* @__PURE__ */ jsxs2(
|
|
@@ -117,15 +120,18 @@ function ArrayFieldTemplate(props) {
|
|
|
117
120
|
}
|
|
118
121
|
),
|
|
119
122
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
...itemUiSchema
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
124
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
125
|
+
items.map(({ key, uiSchema: itemUiSchema = {}, ...props2 }) => {
|
|
126
|
+
const mergedUiSchema = {
|
|
127
|
+
...itemUiSchema,
|
|
128
|
+
[UI_OPTIONS_KEY]: {
|
|
129
|
+
...itemUiSchema[UI_OPTIONS_KEY]
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
return /* @__PURE__ */ jsx3(ArrayFieldItemTemplate2, { ...props2, uiSchema: mergedUiSchema }, key);
|
|
133
|
+
})
|
|
134
|
+
] }),
|
|
129
135
|
canAdd && /* @__PURE__ */ jsx3(
|
|
130
136
|
"div",
|
|
131
137
|
{
|
|
@@ -392,6 +398,7 @@ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-ru
|
|
|
392
398
|
function ObjectFieldTemplate(props) {
|
|
393
399
|
const {
|
|
394
400
|
description,
|
|
401
|
+
optionalDataControl,
|
|
395
402
|
onAddClick,
|
|
396
403
|
title,
|
|
397
404
|
properties,
|
|
@@ -411,6 +418,7 @@ function ObjectFieldTemplate(props) {
|
|
|
411
418
|
registry,
|
|
412
419
|
uiOptions
|
|
413
420
|
);
|
|
421
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
414
422
|
const {
|
|
415
423
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
416
424
|
} = registry.templates;
|
|
@@ -423,7 +431,8 @@ function ObjectFieldTemplate(props) {
|
|
|
423
431
|
required,
|
|
424
432
|
schema,
|
|
425
433
|
uiSchema,
|
|
426
|
-
registry
|
|
434
|
+
registry,
|
|
435
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
427
436
|
}
|
|
428
437
|
),
|
|
429
438
|
description && /* @__PURE__ */ jsx12("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx12(
|
|
@@ -436,6 +445,7 @@ function ObjectFieldTemplate(props) {
|
|
|
436
445
|
registry
|
|
437
446
|
}
|
|
438
447
|
) }),
|
|
448
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
439
449
|
properties.map((prop) => prop.content),
|
|
440
450
|
canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx12("div", { style: { marginTop: "1rem", textAlign: "right" }, children: /* @__PURE__ */ jsx12(
|
|
441
451
|
AddButton2,
|
|
@@ -451,36 +461,77 @@ function ObjectFieldTemplate(props) {
|
|
|
451
461
|
] });
|
|
452
462
|
}
|
|
453
463
|
|
|
464
|
+
// src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
|
|
465
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
466
|
+
function OptionalDataControlsTemplate(props) {
|
|
467
|
+
const { id, registry, label, onAddClick, onRemoveClick } = props;
|
|
468
|
+
if (onAddClick) {
|
|
469
|
+
return /* @__PURE__ */ jsx13(
|
|
470
|
+
IconButton,
|
|
471
|
+
{
|
|
472
|
+
id,
|
|
473
|
+
registry,
|
|
474
|
+
className: "rjsf-add-optional-data",
|
|
475
|
+
onClick: onAddClick,
|
|
476
|
+
title: label,
|
|
477
|
+
icon: "pi pi-plus",
|
|
478
|
+
style: { height: "1.5rem", width: "1.5rem" }
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
} else if (onRemoveClick) {
|
|
482
|
+
return /* @__PURE__ */ jsx13(
|
|
483
|
+
RemoveButton,
|
|
484
|
+
{
|
|
485
|
+
id,
|
|
486
|
+
registry,
|
|
487
|
+
className: "rjsf-remove-optional-data",
|
|
488
|
+
onClick: onRemoveClick,
|
|
489
|
+
title: label,
|
|
490
|
+
style: { height: "1.5rem", width: "1.5rem" }
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
return /* @__PURE__ */ jsx13("em", { id, children: label });
|
|
495
|
+
}
|
|
496
|
+
|
|
454
497
|
// src/SubmitButton/SubmitButton.tsx
|
|
455
498
|
import { Button as Button3 } from "primereact/button";
|
|
456
499
|
import { getSubmitButtonOptions } from "@rjsf/utils";
|
|
457
|
-
import { jsx as
|
|
500
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
458
501
|
function SubmitButton({ uiSchema }) {
|
|
459
502
|
const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions(uiSchema);
|
|
460
503
|
if (norender) {
|
|
461
504
|
return null;
|
|
462
505
|
}
|
|
463
|
-
return /* @__PURE__ */
|
|
506
|
+
return /* @__PURE__ */ jsx14(Button3, { type: "submit", label: submitText, ...submitButtonProps });
|
|
464
507
|
}
|
|
465
508
|
|
|
466
509
|
// src/TitleField/TitleField.tsx
|
|
467
510
|
import { Divider } from "primereact/divider";
|
|
468
511
|
import { getUiOptions as getUiOptions5, titleId as titleId2 } from "@rjsf/utils";
|
|
469
|
-
import { jsx as
|
|
512
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
470
513
|
function TitleField({
|
|
471
514
|
id,
|
|
472
515
|
title,
|
|
473
516
|
uiSchema,
|
|
474
|
-
required
|
|
517
|
+
required,
|
|
518
|
+
optionalDataControl
|
|
475
519
|
}) {
|
|
476
520
|
const uiOptions = getUiOptions5(uiSchema);
|
|
521
|
+
let heading = /* @__PURE__ */ jsxs8("h5", { style: { margin: 0, fontSize: id === titleId2("root") ? "1.5rem" : "1.2rem" }, children: [
|
|
522
|
+
uiOptions.title || title,
|
|
523
|
+
" ",
|
|
524
|
+
required ? "*" : ""
|
|
525
|
+
] });
|
|
526
|
+
if (optionalDataControl) {
|
|
527
|
+
heading = /* @__PURE__ */ jsxs8("div", { style: { display: "flex" }, children: [
|
|
528
|
+
/* @__PURE__ */ jsx15("div", { style: { flexGrow: 1 }, children: heading }),
|
|
529
|
+
/* @__PURE__ */ jsx15("div", { style: { marginLeft: "-5px" }, children: optionalDataControl })
|
|
530
|
+
] });
|
|
531
|
+
}
|
|
477
532
|
return /* @__PURE__ */ jsxs8("div", { id, children: [
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
" ",
|
|
481
|
-
required ? "*" : ""
|
|
482
|
-
] }),
|
|
483
|
-
/* @__PURE__ */ jsx14(Divider, { pt: { root: { style: { marginTop: "0.5rem" } } } })
|
|
533
|
+
heading,
|
|
534
|
+
/* @__PURE__ */ jsx15(Divider, { pt: { root: { style: { marginTop: "0.5rem" } } } })
|
|
484
535
|
] });
|
|
485
536
|
}
|
|
486
537
|
|
|
@@ -491,7 +542,7 @@ import {
|
|
|
491
542
|
TranslatableString as TranslatableString4
|
|
492
543
|
} from "@rjsf/utils";
|
|
493
544
|
import { InputText as InputText2 } from "primereact/inputtext";
|
|
494
|
-
import { jsx as
|
|
545
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
495
546
|
function WrapIfAdditionalTemplate({
|
|
496
547
|
classNames,
|
|
497
548
|
style,
|
|
@@ -511,7 +562,7 @@ function WrapIfAdditionalTemplate({
|
|
|
511
562
|
const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
|
|
512
563
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
513
564
|
if (!additional) {
|
|
514
|
-
return /* @__PURE__ */
|
|
565
|
+
return /* @__PURE__ */ jsx16("div", { className: classNames, style, children });
|
|
515
566
|
}
|
|
516
567
|
const handleBlur = ({ target }) => onKeyChange(target.value);
|
|
517
568
|
return /* @__PURE__ */ jsxs9(
|
|
@@ -521,8 +572,8 @@ function WrapIfAdditionalTemplate({
|
|
|
521
572
|
style: { ...style, display: "flex", alignItems: "center", gap: "1rem" },
|
|
522
573
|
children: [
|
|
523
574
|
/* @__PURE__ */ jsxs9("div", { style: { flex: 1 }, children: [
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ jsx16("label", { htmlFor: `${id}-key`, style: { display: "block", marginBottom: "0.5rem" }, children: keyLabel }),
|
|
576
|
+
/* @__PURE__ */ jsx16(
|
|
526
577
|
InputText2,
|
|
527
578
|
{
|
|
528
579
|
id: `${id}-key`,
|
|
@@ -535,8 +586,8 @@ function WrapIfAdditionalTemplate({
|
|
|
535
586
|
}
|
|
536
587
|
)
|
|
537
588
|
] }),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ jsx16("div", { style: { flex: 1 }, children }),
|
|
590
|
+
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
|
|
540
591
|
RemoveButton2,
|
|
541
592
|
{
|
|
542
593
|
id: buttonId3(id, "remove"),
|
|
@@ -557,19 +608,26 @@ import {
|
|
|
557
608
|
getUiOptions as getUiOptions6,
|
|
558
609
|
titleId as titleId3
|
|
559
610
|
} from "@rjsf/utils";
|
|
560
|
-
import { jsxs as jsxs10 } from "react/jsx-runtime";
|
|
561
|
-
function ArrayFieldTitleTemplate({ title, uiSchema, required, fieldPathId }) {
|
|
611
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
612
|
+
function ArrayFieldTitleTemplate({ title, uiSchema, required, fieldPathId, optionalDataControl }) {
|
|
562
613
|
const uiOptions = getUiOptions6(uiSchema);
|
|
563
|
-
|
|
614
|
+
let heading = /* @__PURE__ */ jsxs10("h5", { id: titleId3(fieldPathId), style: { margin: 0, fontSize: "1.5rem", marginBottom: "0.2rem" }, children: [
|
|
564
615
|
uiOptions.title || title,
|
|
565
616
|
" ",
|
|
566
617
|
required ? "*" : ""
|
|
567
618
|
] });
|
|
619
|
+
if (optionalDataControl) {
|
|
620
|
+
heading = /* @__PURE__ */ jsxs10("div", { style: { display: "flex" }, children: [
|
|
621
|
+
/* @__PURE__ */ jsx17("div", { style: { flexGrow: 1 }, children: heading }),
|
|
622
|
+
/* @__PURE__ */ jsx17("div", { children: optionalDataControl })
|
|
623
|
+
] });
|
|
624
|
+
}
|
|
625
|
+
return heading;
|
|
568
626
|
}
|
|
569
627
|
|
|
570
628
|
// src/GridTemplate/GridTemplate.tsx
|
|
571
629
|
import { useEffect, useState } from "react";
|
|
572
|
-
import { jsx as
|
|
630
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
573
631
|
var breakpoints = {
|
|
574
632
|
xs: 0,
|
|
575
633
|
sm: 576,
|
|
@@ -606,7 +664,7 @@ function GridTemplateRow(props) {
|
|
|
606
664
|
const layoutGrid = uiSchema?.["ui:layoutGrid"] ?? {};
|
|
607
665
|
const totalColumns = layoutGrid.columns ?? 12;
|
|
608
666
|
const gap = layoutGrid.gap ?? "16px";
|
|
609
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ jsx18(
|
|
610
668
|
"div",
|
|
611
669
|
{
|
|
612
670
|
style: {
|
|
@@ -633,7 +691,7 @@ function GridTemplateColumn(props) {
|
|
|
633
691
|
return () => window.removeEventListener("resize", handleResize);
|
|
634
692
|
}, []);
|
|
635
693
|
const span = getResponsiveSpan(props, breakpoint);
|
|
636
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ jsx18("div", { style: { gridColumn: `span ${span} / span ${span}`, ...style ?? {} }, ...rest, children });
|
|
637
695
|
}
|
|
638
696
|
|
|
639
697
|
// src/Templates/Templates.ts
|
|
@@ -658,6 +716,7 @@ function generateTemplates() {
|
|
|
658
716
|
FieldTemplate,
|
|
659
717
|
MultiSchemaFieldTemplate,
|
|
660
718
|
ObjectFieldTemplate,
|
|
719
|
+
OptionalDataControlsTemplate,
|
|
661
720
|
TitleFieldTemplate: TitleField,
|
|
662
721
|
WrapIfAdditionalTemplate,
|
|
663
722
|
GridTemplate
|
|
@@ -672,7 +731,7 @@ import {
|
|
|
672
731
|
getInputProps as getInputProps2
|
|
673
732
|
} from "@rjsf/utils";
|
|
674
733
|
import { AutoComplete } from "primereact/autocomplete";
|
|
675
|
-
import { Fragment as Fragment3, jsx as
|
|
734
|
+
import { Fragment as Fragment3, jsx as jsx19 } from "react/jsx-runtime";
|
|
676
735
|
function AutoCompleteWidget(props) {
|
|
677
736
|
const {
|
|
678
737
|
id,
|
|
@@ -703,7 +762,7 @@ function AutoCompleteWidget(props) {
|
|
|
703
762
|
const search = (event) => {
|
|
704
763
|
setItems(examples.filter((example) => example.toString().toLowerCase().includes(event.query.toLowerCase())));
|
|
705
764
|
};
|
|
706
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ jsx19(
|
|
707
766
|
AutoComplete,
|
|
708
767
|
{
|
|
709
768
|
id,
|
|
@@ -711,7 +770,7 @@ function AutoCompleteWidget(props) {
|
|
|
711
770
|
placeholder,
|
|
712
771
|
...primeProps,
|
|
713
772
|
...inputProps,
|
|
714
|
-
loadingIcon: /* @__PURE__ */
|
|
773
|
+
loadingIcon: /* @__PURE__ */ jsx19(Fragment3, {}),
|
|
715
774
|
required,
|
|
716
775
|
autoFocus: autofocus,
|
|
717
776
|
disabled: disabled || readonly,
|
|
@@ -752,7 +811,7 @@ import {
|
|
|
752
811
|
schemaRequiresTrueValue
|
|
753
812
|
} from "@rjsf/utils";
|
|
754
813
|
import { Checkbox } from "primereact/checkbox";
|
|
755
|
-
import { Fragment as Fragment4, jsx as
|
|
814
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
756
815
|
function CheckboxWidget(props) {
|
|
757
816
|
const {
|
|
758
817
|
id,
|
|
@@ -783,7 +842,7 @@ function CheckboxWidget(props) {
|
|
|
783
842
|
const description = options.description ?? schema.description;
|
|
784
843
|
const primeProps = options.prime || {};
|
|
785
844
|
return /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
786
|
-
!hideLabel && !!description && /* @__PURE__ */
|
|
845
|
+
!hideLabel && !!description && /* @__PURE__ */ jsx20(
|
|
787
846
|
DescriptionFieldTemplate,
|
|
788
847
|
{
|
|
789
848
|
id: descriptionId2(id),
|
|
@@ -794,7 +853,7 @@ function CheckboxWidget(props) {
|
|
|
794
853
|
}
|
|
795
854
|
),
|
|
796
855
|
/* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "row", gap: "0.5rem", alignItems: "center" }, children: [
|
|
797
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ jsx20(
|
|
798
857
|
Checkbox,
|
|
799
858
|
{
|
|
800
859
|
inputId: id,
|
|
@@ -810,7 +869,7 @@ function CheckboxWidget(props) {
|
|
|
810
869
|
"aria-describedby": ariaDescribedByIds3(id)
|
|
811
870
|
}
|
|
812
871
|
),
|
|
813
|
-
labelValue(/* @__PURE__ */
|
|
872
|
+
labelValue(/* @__PURE__ */ jsx20(Label, { id, text: label }), hideLabel, false)
|
|
814
873
|
] })
|
|
815
874
|
] });
|
|
816
875
|
}
|
|
@@ -826,7 +885,7 @@ import {
|
|
|
826
885
|
descriptionId as descriptionId3,
|
|
827
886
|
getTemplate as getTemplate6
|
|
828
887
|
} from "@rjsf/utils";
|
|
829
|
-
import { jsx as
|
|
888
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
830
889
|
function CheckboxesWidget(props) {
|
|
831
890
|
const {
|
|
832
891
|
id,
|
|
@@ -867,7 +926,7 @@ function CheckboxesWidget(props) {
|
|
|
867
926
|
id,
|
|
868
927
|
style: { display: "flex", flexDirection: "column", gap: "1rem", marginTop: "0.5rem", marginBottom: "0.5rem" },
|
|
869
928
|
children: [
|
|
870
|
-
!hideLabel && !!description && /* @__PURE__ */
|
|
929
|
+
!hideLabel && !!description && /* @__PURE__ */ jsx21(
|
|
871
930
|
DescriptionFieldTemplate,
|
|
872
931
|
{
|
|
873
932
|
id: descriptionId3(id),
|
|
@@ -881,7 +940,7 @@ function CheckboxesWidget(props) {
|
|
|
881
940
|
const checked = enumOptionsIsSelected(option.value, checkboxesValues);
|
|
882
941
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
883
942
|
return /* @__PURE__ */ jsxs12("div", { style: { display: "flex", flexDirection: "row", gap: "0.5rem", alignItems: "center" }, children: [
|
|
884
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ jsx21(
|
|
885
944
|
Checkbox2,
|
|
886
945
|
{
|
|
887
946
|
inputId: optionId(id, index),
|
|
@@ -897,7 +956,7 @@ function CheckboxesWidget(props) {
|
|
|
897
956
|
"aria-describedby": ariaDescribedByIds4(id)
|
|
898
957
|
}
|
|
899
958
|
),
|
|
900
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ jsx21(Label, { id: optionId(id, index), text: option.label })
|
|
901
960
|
] }, index);
|
|
902
961
|
})
|
|
903
962
|
]
|
|
@@ -911,7 +970,7 @@ import {
|
|
|
911
970
|
getInputProps as getInputProps3
|
|
912
971
|
} from "@rjsf/utils";
|
|
913
972
|
import { ColorPicker } from "primereact/colorpicker";
|
|
914
|
-
import { jsx as
|
|
973
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
915
974
|
function ColorWidget(props) {
|
|
916
975
|
const {
|
|
917
976
|
id,
|
|
@@ -935,7 +994,7 @@ function ColorWidget(props) {
|
|
|
935
994
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
936
995
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
937
996
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
938
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsx22(
|
|
939
998
|
ColorPicker,
|
|
940
999
|
{
|
|
941
1000
|
id,
|
|
@@ -962,7 +1021,7 @@ import {
|
|
|
962
1021
|
getInputProps as getInputProps4
|
|
963
1022
|
} from "@rjsf/utils";
|
|
964
1023
|
import { Password } from "primereact/password";
|
|
965
|
-
import { jsx as
|
|
1024
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
966
1025
|
function PasswordWidget(props) {
|
|
967
1026
|
const {
|
|
968
1027
|
id,
|
|
@@ -986,7 +1045,7 @@ function PasswordWidget(props) {
|
|
|
986
1045
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
987
1046
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
988
1047
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
989
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ jsx23(
|
|
990
1049
|
Password,
|
|
991
1050
|
{
|
|
992
1051
|
id,
|
|
@@ -1016,7 +1075,7 @@ import {
|
|
|
1016
1075
|
optionId as optionId2
|
|
1017
1076
|
} from "@rjsf/utils";
|
|
1018
1077
|
import { RadioButton } from "primereact/radiobutton";
|
|
1019
|
-
import { jsx as
|
|
1078
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1020
1079
|
function RadioWidget(props) {
|
|
1021
1080
|
const { id, value, disabled, readonly, onChange, onBlur, onFocus, options } = props;
|
|
1022
1081
|
const primeProps = options.prime || {};
|
|
@@ -1026,11 +1085,11 @@ function RadioWidget(props) {
|
|
|
1026
1085
|
};
|
|
1027
1086
|
const _onBlur = () => onBlur(id, value);
|
|
1028
1087
|
const _onFocus = () => onFocus(id, value);
|
|
1029
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsx24("div", { style: { display: "flex", flexDirection: "row", gap: "1rem" }, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
1030
1089
|
const checked = enumOptionsIsSelected2(option.value, value);
|
|
1031
1090
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
1032
1091
|
return /* @__PURE__ */ jsxs13("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
1033
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ jsx24(
|
|
1034
1093
|
RadioButton,
|
|
1035
1094
|
{
|
|
1036
1095
|
inputId: optionId2(id, index),
|
|
@@ -1045,7 +1104,7 @@ function RadioWidget(props) {
|
|
|
1045
1104
|
"aria-describedby": ariaDescribedByIds7(id)
|
|
1046
1105
|
}
|
|
1047
1106
|
),
|
|
1048
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: optionId2(id, index), style: { marginLeft: "8px" }, children: option.label })
|
|
1049
1108
|
] }, index);
|
|
1050
1109
|
}) });
|
|
1051
1110
|
}
|
|
@@ -1053,7 +1112,7 @@ function RadioWidget(props) {
|
|
|
1053
1112
|
// src/RangeWidget/RangeWidget.tsx
|
|
1054
1113
|
import { Slider } from "primereact/slider";
|
|
1055
1114
|
import { ariaDescribedByIds as ariaDescribedByIds8, rangeSpec } from "@rjsf/utils";
|
|
1056
|
-
import { Fragment as Fragment5, jsx as
|
|
1115
|
+
import { Fragment as Fragment5, jsx as jsx25 } from "react/jsx-runtime";
|
|
1057
1116
|
function RangeWidget(props) {
|
|
1058
1117
|
const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, id } = props;
|
|
1059
1118
|
const primeProps = options.prime || {};
|
|
@@ -1063,7 +1122,7 @@ function RangeWidget(props) {
|
|
|
1063
1122
|
};
|
|
1064
1123
|
const _onBlur = ({ target }) => onBlur(id, target && target.value);
|
|
1065
1124
|
const _onFocus = ({ target }) => onFocus(id, target && target.value);
|
|
1066
|
-
return /* @__PURE__ */
|
|
1125
|
+
return /* @__PURE__ */ jsx25(Fragment5, { children: /* @__PURE__ */ jsx25(
|
|
1067
1126
|
Slider,
|
|
1068
1127
|
{
|
|
1069
1128
|
...primeProps,
|
|
@@ -1086,10 +1145,10 @@ import {
|
|
|
1086
1145
|
enumOptionsValueForIndex as enumOptionsValueForIndex2
|
|
1087
1146
|
} from "@rjsf/utils";
|
|
1088
1147
|
import { MultiSelect } from "primereact/multiselect";
|
|
1089
|
-
import { jsx as
|
|
1148
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1090
1149
|
function SelectWidget(props) {
|
|
1091
1150
|
const { multiple = false } = props;
|
|
1092
|
-
return multiple ? /* @__PURE__ */
|
|
1151
|
+
return multiple ? /* @__PURE__ */ jsx26(MultiSelectWidget, { ...props }) : /* @__PURE__ */ jsx26(SingleSelectWidget, { ...props });
|
|
1093
1152
|
}
|
|
1094
1153
|
function SingleSelectWidget({
|
|
1095
1154
|
schema,
|
|
@@ -1127,7 +1186,7 @@ function SingleSelectWidget({
|
|
|
1127
1186
|
const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, optEmptyVal));
|
|
1128
1187
|
const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, multiple);
|
|
1129
1188
|
const { ...dropdownRemainingProps } = dropdownProps;
|
|
1130
|
-
return /* @__PURE__ */
|
|
1189
|
+
return /* @__PURE__ */ jsx26(
|
|
1131
1190
|
Dropdown,
|
|
1132
1191
|
{
|
|
1133
1192
|
id,
|
|
@@ -1171,7 +1230,7 @@ function MultiSelectWidget({
|
|
|
1171
1230
|
const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, optEmptyVal));
|
|
1172
1231
|
const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, optEmptyVal));
|
|
1173
1232
|
const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, multiple);
|
|
1174
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ jsx26(
|
|
1175
1234
|
MultiSelect,
|
|
1176
1235
|
{
|
|
1177
1236
|
id,
|
|
@@ -1198,7 +1257,7 @@ function MultiSelectWidget({
|
|
|
1198
1257
|
|
|
1199
1258
|
// src/TextareaWidget/TextareaWidget.tsx
|
|
1200
1259
|
import { InputTextarea } from "primereact/inputtextarea";
|
|
1201
|
-
import { jsx as
|
|
1260
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1202
1261
|
function TextareaWidget(props) {
|
|
1203
1262
|
const { id, value, required, disabled, readonly, autofocus, onChange, onBlur, onFocus, options } = props;
|
|
1204
1263
|
const primeProps = options.prime || {};
|
|
@@ -1209,7 +1268,7 @@ function TextareaWidget(props) {
|
|
|
1209
1268
|
const handleChange = (event) => {
|
|
1210
1269
|
onChange(event.target.value === "" ? options.emptyValue : event.target.value);
|
|
1211
1270
|
};
|
|
1212
|
-
return /* @__PURE__ */
|
|
1271
|
+
return /* @__PURE__ */ jsx27(
|
|
1213
1272
|
InputTextarea,
|
|
1214
1273
|
{
|
|
1215
1274
|
id,
|
|
@@ -1232,7 +1291,7 @@ import {
|
|
|
1232
1291
|
getInputProps as getInputProps5
|
|
1233
1292
|
} from "@rjsf/utils";
|
|
1234
1293
|
import { InputNumber } from "primereact/inputnumber";
|
|
1235
|
-
import { jsx as
|
|
1294
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1236
1295
|
function UpDownWidget(props) {
|
|
1237
1296
|
const {
|
|
1238
1297
|
id,
|
|
@@ -1257,7 +1316,7 @@ function UpDownWidget(props) {
|
|
|
1257
1316
|
const _onChange = (event) => onChange(event.value === null ? options.emptyValue : value);
|
|
1258
1317
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
1259
1318
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
1260
|
-
return /* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ jsx28(
|
|
1261
1320
|
InputNumber,
|
|
1262
1321
|
{
|
|
1263
1322
|
id,
|