@rjsf/chakra-ui 5.11.2 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chakra-ui.esm.js +845 -946
- package/dist/chakra-ui.esm.js.map +7 -1
- package/dist/chakra-ui.umd.js +1339 -0
- package/dist/index.js +1500 -5
- package/dist/index.js.map +7 -0
- package/lib/AddButton/AddButton.d.ts +3 -0
- package/lib/AddButton/AddButton.js +11 -0
- package/lib/AddButton/AddButton.js.map +1 -0
- package/lib/AddButton/index.d.ts +2 -0
- package/lib/AddButton/index.js +3 -0
- package/lib/AddButton/index.js.map +1 -0
- package/lib/AltDateTimeWidget/AltDateTimeWidget.d.ts +15 -0
- package/lib/AltDateTimeWidget/AltDateTimeWidget.js +9 -0
- package/lib/AltDateTimeWidget/AltDateTimeWidget.js.map +1 -0
- package/lib/AltDateTimeWidget/index.d.ts +2 -0
- package/lib/AltDateTimeWidget/index.js +3 -0
- package/lib/AltDateTimeWidget/index.js.map +1 -0
- package/lib/AltDateWidget/AltDateWidget.d.ts +15 -0
- package/lib/AltDateWidget/AltDateWidget.js +80 -0
- package/lib/AltDateWidget/AltDateWidget.js.map +1 -0
- package/lib/AltDateWidget/index.d.ts +2 -0
- package/lib/AltDateWidget/index.js +3 -0
- package/lib/AltDateWidget/index.js.map +1 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +3 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +13 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -0
- package/lib/ArrayFieldItemTemplate/index.d.ts +2 -0
- package/lib/ArrayFieldItemTemplate/index.js +3 -0
- package/lib/ArrayFieldItemTemplate/index.js.map +1 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +3 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +19 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -0
- package/lib/ArrayFieldTemplate/index.d.ts +2 -0
- package/lib/ArrayFieldTemplate/index.js +3 -0
- package/lib/ArrayFieldTemplate/index.js.map +1 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +3 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.js +18 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -0
- package/lib/BaseInputTemplate/index.d.ts +2 -0
- package/lib/BaseInputTemplate/index.js +3 -0
- package/lib/BaseInputTemplate/index.js.map +1 -0
- package/lib/ChakraFrameProvider.d.ts +2 -0
- package/lib/ChakraFrameProvider.js +28 -0
- package/lib/ChakraFrameProvider.js.map +1 -0
- package/lib/CheckboxWidget/CheckboxWidget.d.ts +3 -0
- package/lib/CheckboxWidget/CheckboxWidget.js +19 -0
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -0
- package/lib/CheckboxWidget/index.d.ts +2 -0
- package/lib/CheckboxWidget/index.js +3 -0
- package/lib/CheckboxWidget/index.js.map +1 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +3 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.js +21 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -0
- package/lib/CheckboxesWidget/index.d.ts +2 -0
- package/lib/CheckboxesWidget/index.js +3 -0
- package/lib/CheckboxesWidget/index.js.map +1 -0
- package/lib/CssReset.d.ts +24 -0
- package/lib/CssReset.js +266 -0
- package/lib/CssReset.js.map +1 -0
- package/lib/DescriptionField/DescriptionField.d.ts +3 -0
- package/lib/DescriptionField/DescriptionField.js +12 -0
- package/lib/DescriptionField/DescriptionField.js.map +1 -0
- package/lib/DescriptionField/index.d.ts +2 -0
- package/lib/DescriptionField/index.js +3 -0
- package/lib/DescriptionField/index.js.map +1 -0
- package/lib/ErrorList/ErrorList.d.ts +3 -0
- package/lib/ErrorList/ErrorList.js +9 -0
- package/lib/ErrorList/ErrorList.js.map +1 -0
- package/lib/ErrorList/index.d.ts +2 -0
- package/lib/ErrorList/index.js +3 -0
- package/lib/ErrorList/index.js.map +1 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +7 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +18 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -0
- package/lib/FieldErrorTemplate/index.d.ts +2 -0
- package/lib/FieldErrorTemplate/index.js +3 -0
- package/lib/FieldErrorTemplate/index.js.map +1 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +7 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +16 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -0
- package/lib/FieldHelpTemplate/index.d.ts +2 -0
- package/lib/FieldHelpTemplate/index.js +3 -0
- package/lib/FieldHelpTemplate/index.js.map +1 -0
- package/lib/FieldTemplate/FieldTemplate.d.ts +3 -0
- package/lib/FieldTemplate/FieldTemplate.js +13 -0
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -0
- package/lib/FieldTemplate/index.d.ts +2 -0
- package/lib/FieldTemplate/index.js +3 -0
- package/lib/FieldTemplate/index.js.map +1 -0
- package/lib/Form/Form.d.ts +6 -0
- package/lib/Form/Form.js +7 -0
- package/lib/Form/Form.js.map +1 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +3 -0
- package/lib/Form/index.js.map +1 -0
- package/lib/IconButton/ChakraIconButton.d.ts +8 -0
- package/lib/IconButton/ChakraIconButton.js +11 -0
- package/lib/IconButton/ChakraIconButton.js.map +1 -0
- package/lib/IconButton/IconButton.d.ts +6 -0
- package/lib/IconButton/IconButton.js +21 -0
- package/lib/IconButton/IconButton.js.map +1 -0
- package/lib/IconButton/index.d.ts +2 -0
- package/lib/IconButton/index.js +3 -0
- package/lib/IconButton/index.js.map +1 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +3 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +13 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -0
- package/lib/ObjectFieldTemplate/index.d.ts +2 -0
- package/lib/ObjectFieldTemplate/index.js +3 -0
- package/lib/ObjectFieldTemplate/index.js.map +1 -0
- package/lib/RadioWidget/RadioWidget.d.ts +3 -0
- package/lib/RadioWidget/RadioWidget.js +20 -0
- package/lib/RadioWidget/RadioWidget.js.map +1 -0
- package/lib/RadioWidget/index.d.ts +2 -0
- package/lib/RadioWidget/index.js +3 -0
- package/lib/RadioWidget/index.js.map +1 -0
- package/lib/RangeWidget/RangeWidget.d.ts +3 -0
- package/lib/RangeWidget/RangeWidget.js +13 -0
- package/lib/RangeWidget/RangeWidget.js.map +1 -0
- package/lib/RangeWidget/index.d.ts +2 -0
- package/lib/RangeWidget/index.js +3 -0
- package/lib/RangeWidget/index.js.map +1 -0
- package/lib/SelectWidget/SelectWidget.d.ts +3 -0
- package/lib/SelectWidget/SelectWidget.js +47 -0
- package/lib/SelectWidget/SelectWidget.js.map +1 -0
- package/lib/SelectWidget/index.d.ts +2 -0
- package/lib/SelectWidget/index.js +3 -0
- package/lib/SelectWidget/index.js.map +1 -0
- package/lib/SubmitButton/SubmitButton.d.ts +3 -0
- package/lib/SubmitButton/SubmitButton.js +11 -0
- package/lib/SubmitButton/SubmitButton.js.map +1 -0
- package/lib/SubmitButton/index.d.ts +2 -0
- package/lib/SubmitButton/index.js +3 -0
- package/lib/SubmitButton/index.js.map +1 -0
- package/lib/Templates/Templates.d.ts +4 -0
- package/lib/Templates/Templates.js +39 -0
- package/lib/Templates/Templates.js.map +1 -0
- package/lib/Templates/index.d.ts +2 -0
- package/lib/Templates/index.js +3 -0
- package/lib/Templates/index.js.map +1 -0
- package/lib/TextareaWidget/TextareaWidget.d.ts +3 -0
- package/lib/TextareaWidget/TextareaWidget.js +12 -0
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -0
- package/lib/TextareaWidget/index.d.ts +2 -0
- package/lib/TextareaWidget/index.js +3 -0
- package/lib/TextareaWidget/index.js.map +1 -0
- package/lib/Theme/Theme.d.ts +5 -0
- package/lib/Theme/Theme.js +10 -0
- package/lib/Theme/Theme.js.map +1 -0
- package/lib/Theme/index.d.ts +2 -0
- package/lib/Theme/index.js +3 -0
- package/lib/Theme/index.js.map +1 -0
- package/lib/TitleField/TitleField.d.ts +3 -0
- package/lib/TitleField/TitleField.js +6 -0
- package/lib/TitleField/TitleField.js.map +1 -0
- package/lib/TitleField/index.d.ts +2 -0
- package/lib/TitleField/index.js +3 -0
- package/lib/TitleField/index.js.map +1 -0
- package/lib/UpDownWidget/UpDownWidget.d.ts +3 -0
- package/lib/UpDownWidget/UpDownWidget.js +13 -0
- package/lib/UpDownWidget/UpDownWidget.js.map +1 -0
- package/lib/UpDownWidget/index.d.ts +2 -0
- package/lib/UpDownWidget/index.js +3 -0
- package/lib/UpDownWidget/index.js.map +1 -0
- package/lib/Widgets/Widgets.d.ts +4 -0
- package/lib/Widgets/Widgets.js +24 -0
- package/lib/Widgets/Widgets.js.map +1 -0
- package/lib/Widgets/index.d.ts +2 -0
- package/lib/Widgets/index.js +3 -0
- package/lib/Widgets/index.js.map +1 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +3 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +17 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -0
- package/lib/WrapIfAdditionalTemplate/index.d.ts +2 -0
- package/lib/WrapIfAdditionalTemplate/index.js +3 -0
- package/lib/WrapIfAdditionalTemplate/index.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/utils.d.ts +13 -0
- package/lib/utils.js +18 -0
- package/lib/utils.js.map +1 -0
- package/package.json +22 -14
- package/src/AddButton/AddButton.tsx +16 -0
- package/src/AddButton/index.ts +2 -0
- package/src/AltDateTimeWidget/AltDateTimeWidget.tsx +16 -0
- package/src/AltDateTimeWidget/index.ts +2 -0
- package/src/AltDateWidget/AltDateWidget.tsx +165 -0
- package/src/AltDateWidget/index.ts +2 -0
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +78 -0
- package/src/ArrayFieldItemTemplate/index.ts +2 -0
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +79 -0
- package/src/ArrayFieldTemplate/index.ts +2 -0
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +87 -0
- package/src/BaseInputTemplate/index.ts +2 -0
- package/src/ChakraFrameProvider.tsx +40 -0
- package/src/CheckboxWidget/CheckboxWidget.tsx +77 -0
- package/src/CheckboxWidget/index.ts +2 -0
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +93 -0
- package/src/CheckboxesWidget/index.ts +2 -0
- package/src/CssReset.tsx +270 -0
- package/src/DescriptionField/DescriptionField.tsx +22 -0
- package/src/DescriptionField/index.ts +2 -0
- package/src/ErrorList/ErrorList.tsx +23 -0
- package/src/ErrorList/index.ts +2 -0
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +30 -0
- package/src/FieldErrorTemplate/index.ts +2 -0
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +19 -0
- package/src/FieldHelpTemplate/index.ts +2 -0
- package/src/FieldTemplate/FieldTemplate.tsx +72 -0
- package/src/FieldTemplate/index.ts +2 -0
- package/src/Form/Form.tsx +14 -0
- package/src/Form/index.ts +2 -0
- package/src/IconButton/ChakraIconButton.tsx +15 -0
- package/src/IconButton/IconButton.tsx +60 -0
- package/src/IconButton/index.ts +2 -0
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +88 -0
- package/src/ObjectFieldTemplate/index.ts +2 -0
- package/src/RadioWidget/RadioWidget.tsx +78 -0
- package/src/RadioWidget/index.ts +2 -0
- package/src/RangeWidget/RangeWidget.tsx +56 -0
- package/src/RangeWidget/index.ts +2 -0
- package/src/SelectWidget/SelectWidget.tsx +121 -0
- package/src/SelectWidget/index.ts +2 -0
- package/src/SubmitButton/SubmitButton.tsx +21 -0
- package/src/SubmitButton/index.ts +2 -0
- package/src/Templates/Templates.ts +45 -0
- package/src/Templates/index.ts +2 -0
- package/src/TextareaWidget/TextareaWidget.tsx +64 -0
- package/src/TextareaWidget/index.ts +2 -0
- package/src/Theme/Theme.tsx +18 -0
- package/src/Theme/index.ts +2 -0
- package/src/TitleField/TitleField.tsx +14 -0
- package/src/TitleField/index.ts +2 -0
- package/src/UpDownWidget/UpDownWidget.tsx +58 -0
- package/src/UpDownWidget/index.ts +2 -0
- package/src/Widgets/Widgets.ts +30 -0
- package/src/Widgets/index.ts +2 -0
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +76 -0
- package/src/WrapIfAdditionalTemplate/index.ts +2 -0
- package/src/index.ts +11 -0
- package/src/utils.ts +31 -0
- package/dist/chakra-ui.cjs.development.js +0 -1657
- package/dist/chakra-ui.cjs.development.js.map +0 -1
- package/dist/chakra-ui.cjs.production.min.js +0 -2
- package/dist/chakra-ui.cjs.production.min.js.map +0 -1
- package/dist/chakra-ui.umd.development.js +0 -1652
- package/dist/chakra-ui.umd.development.js.map +0 -1
- package/dist/chakra-ui.umd.production.min.js +0 -2
- package/dist/chakra-ui.umd.production.min.js.map +0 -1
- package/dist/index.d.ts +0 -28
package/dist/index.js
CHANGED
|
@@ -1,8 +1,1503 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
29
|
|
|
2
|
-
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
Form: () => Form_default,
|
|
34
|
+
Templates: () => Templates_default,
|
|
35
|
+
Theme: () => Theme_default,
|
|
36
|
+
Widgets: () => Widgets_default,
|
|
37
|
+
__createChakraFrameProvider: () => __createChakraFrameProvider,
|
|
38
|
+
default: () => src_default,
|
|
39
|
+
generateForm: () => generateForm,
|
|
40
|
+
generateTemplates: () => generateTemplates,
|
|
41
|
+
generateTheme: () => generateTheme,
|
|
42
|
+
generateWidgets: () => generateWidgets
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(src_exports);
|
|
3
45
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
46
|
+
// src/Form/Form.tsx
|
|
47
|
+
var import_core = require("@rjsf/core");
|
|
48
|
+
|
|
49
|
+
// src/AddButton/AddButton.tsx
|
|
50
|
+
var import_utils = require("@rjsf/utils");
|
|
51
|
+
var import_react = require("@chakra-ui/react");
|
|
52
|
+
var import_icons = require("@chakra-ui/icons");
|
|
53
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
54
|
+
function AddButton({
|
|
55
|
+
uiSchema,
|
|
56
|
+
registry,
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
const { translateString } = registry;
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Button, { leftIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.AddIcon, {}), ...props, children: translateString(import_utils.TranslatableString.AddItemButton) });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx
|
|
64
|
+
var import_react2 = require("react");
|
|
65
|
+
var import_react3 = require("@chakra-ui/react");
|
|
66
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
67
|
+
function ArrayFieldItemTemplate(props) {
|
|
68
|
+
const {
|
|
69
|
+
children,
|
|
70
|
+
disabled,
|
|
71
|
+
hasToolbar,
|
|
72
|
+
hasCopy,
|
|
73
|
+
hasMoveDown,
|
|
74
|
+
hasMoveUp,
|
|
75
|
+
hasRemove,
|
|
76
|
+
index,
|
|
77
|
+
onCopyIndexClick,
|
|
78
|
+
onDropIndexClick,
|
|
79
|
+
onReorderClick,
|
|
80
|
+
readonly,
|
|
81
|
+
uiSchema,
|
|
82
|
+
registry
|
|
83
|
+
} = props;
|
|
84
|
+
const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
|
|
85
|
+
const onCopyClick = (0, import_react2.useMemo)(() => onCopyIndexClick(index), [index, onCopyIndexClick]);
|
|
86
|
+
const onRemoveClick = (0, import_react2.useMemo)(() => onDropIndexClick(index), [index, onDropIndexClick]);
|
|
87
|
+
const onArrowUpClick = (0, import_react2.useMemo)(() => onReorderClick(index, index - 1), [index, onReorderClick]);
|
|
88
|
+
const onArrowDownClick = (0, import_react2.useMemo)(() => onReorderClick(index, index + 1), [index, onReorderClick]);
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react3.HStack, { alignItems: "flex-end", py: 1, children: [
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Box, { w: "100%", children }),
|
|
91
|
+
hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react3.ButtonGroup, { isAttached: true, mb: 1, children: [
|
|
92
|
+
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
93
|
+
MoveUpButton2,
|
|
94
|
+
{
|
|
95
|
+
disabled: disabled || readonly || !hasMoveUp,
|
|
96
|
+
onClick: onArrowUpClick,
|
|
97
|
+
uiSchema,
|
|
98
|
+
registry
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
102
|
+
MoveDownButton2,
|
|
103
|
+
{
|
|
104
|
+
disabled: disabled || readonly || !hasMoveDown,
|
|
105
|
+
onClick: onArrowDownClick,
|
|
106
|
+
uiSchema,
|
|
107
|
+
registry
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
hasCopy && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
111
|
+
CopyButton2,
|
|
112
|
+
{
|
|
113
|
+
disabled: disabled || readonly,
|
|
114
|
+
onClick: onCopyClick,
|
|
115
|
+
uiSchema,
|
|
116
|
+
registry
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
hasRemove && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
120
|
+
RemoveButton2,
|
|
121
|
+
{
|
|
122
|
+
disabled: disabled || readonly,
|
|
123
|
+
onClick: onRemoveClick,
|
|
124
|
+
uiSchema,
|
|
125
|
+
registry
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
] }) })
|
|
129
|
+
] });
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
|
|
133
|
+
var import_react4 = require("@chakra-ui/react");
|
|
134
|
+
var import_utils2 = require("@rjsf/utils");
|
|
135
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
136
|
+
function ArrayFieldTemplate(props) {
|
|
137
|
+
const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
138
|
+
const uiOptions = (0, import_utils2.getUiOptions)(uiSchema);
|
|
139
|
+
const ArrayFieldDescriptionTemplate = (0, import_utils2.getTemplate)(
|
|
140
|
+
"ArrayFieldDescriptionTemplate",
|
|
141
|
+
registry,
|
|
142
|
+
uiOptions
|
|
143
|
+
);
|
|
144
|
+
const ArrayFieldItemTemplate2 = (0, import_utils2.getTemplate)(
|
|
145
|
+
"ArrayFieldItemTemplate",
|
|
146
|
+
registry,
|
|
147
|
+
uiOptions
|
|
148
|
+
);
|
|
149
|
+
const ArrayFieldTitleTemplate = (0, import_utils2.getTemplate)(
|
|
150
|
+
"ArrayFieldTitleTemplate",
|
|
151
|
+
registry,
|
|
152
|
+
uiOptions
|
|
153
|
+
);
|
|
154
|
+
const {
|
|
155
|
+
ButtonTemplates: { AddButton: AddButton2 }
|
|
156
|
+
} = registry.templates;
|
|
157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react4.Box, { children: [
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
159
|
+
ArrayFieldTitleTemplate,
|
|
160
|
+
{
|
|
161
|
+
idSchema,
|
|
162
|
+
title: uiOptions.title || title,
|
|
163
|
+
schema,
|
|
164
|
+
uiSchema,
|
|
165
|
+
required,
|
|
166
|
+
registry
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
170
|
+
ArrayFieldDescriptionTemplate,
|
|
171
|
+
{
|
|
172
|
+
idSchema,
|
|
173
|
+
description: uiOptions.description || schema.description,
|
|
174
|
+
schema,
|
|
175
|
+
uiSchema,
|
|
176
|
+
registry
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react4.Grid, { children: [
|
|
180
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react4.GridItem, { children: items.length > 0 && items.map(({ key, ...itemProps }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrayFieldItemTemplate2, { ...itemProps }, key)) }),
|
|
181
|
+
canAdd && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react4.GridItem, { justifySelf: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react4.Box, { mt: 2, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
182
|
+
AddButton2,
|
|
183
|
+
{
|
|
184
|
+
className: "array-item-add",
|
|
185
|
+
onClick: onAddClick,
|
|
186
|
+
disabled: disabled || readonly,
|
|
187
|
+
uiSchema,
|
|
188
|
+
registry
|
|
189
|
+
}
|
|
190
|
+
) }) })
|
|
191
|
+
] }, `array-item-list-${idSchema.$id}`)
|
|
192
|
+
] });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// src/BaseInputTemplate/BaseInputTemplate.tsx
|
|
196
|
+
var import_react6 = require("@chakra-ui/react");
|
|
197
|
+
var import_utils3 = require("@rjsf/utils");
|
|
198
|
+
|
|
199
|
+
// src/utils.ts
|
|
200
|
+
var import_react5 = require("@chakra-ui/react");
|
|
201
|
+
function getChakra({ uiSchema = {} }) {
|
|
202
|
+
const chakraProps = uiSchema["ui:options"] && uiSchema["ui:options"].chakra || {};
|
|
203
|
+
Object.keys(chakraProps).forEach((key) => {
|
|
204
|
+
if ((0, import_react5.shouldForwardProp)(key)) {
|
|
205
|
+
delete chakraProps[key];
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
return chakraProps;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// src/BaseInputTemplate/BaseInputTemplate.tsx
|
|
212
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
213
|
+
function BaseInputTemplate(props) {
|
|
214
|
+
const {
|
|
215
|
+
id,
|
|
216
|
+
type,
|
|
217
|
+
value,
|
|
218
|
+
label,
|
|
219
|
+
hideLabel,
|
|
220
|
+
schema,
|
|
221
|
+
uiSchema,
|
|
222
|
+
onChange,
|
|
223
|
+
onChangeOverride,
|
|
224
|
+
onBlur,
|
|
225
|
+
onFocus,
|
|
226
|
+
options,
|
|
227
|
+
required,
|
|
228
|
+
readonly,
|
|
229
|
+
rawErrors,
|
|
230
|
+
autofocus,
|
|
231
|
+
placeholder,
|
|
232
|
+
disabled
|
|
233
|
+
} = props;
|
|
234
|
+
const inputProps = (0, import_utils3.getInputProps)(schema, type, options);
|
|
235
|
+
const chakraProps = getChakra({ uiSchema });
|
|
236
|
+
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
237
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
238
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
240
|
+
import_react6.FormControl,
|
|
241
|
+
{
|
|
242
|
+
mb: 1,
|
|
243
|
+
...chakraProps,
|
|
244
|
+
isDisabled: disabled || readonly,
|
|
245
|
+
isRequired: required,
|
|
246
|
+
isReadOnly: readonly,
|
|
247
|
+
isInvalid: rawErrors && rawErrors.length > 0,
|
|
248
|
+
children: [
|
|
249
|
+
(0, import_utils3.labelValue)(
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react6.FormLabel, { htmlFor: id, id: `${id}-label`, children: label }),
|
|
251
|
+
hideLabel || !label
|
|
252
|
+
),
|
|
253
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
254
|
+
import_react6.Input,
|
|
255
|
+
{
|
|
256
|
+
id,
|
|
257
|
+
name: id,
|
|
258
|
+
value: value || value === 0 ? value : "",
|
|
259
|
+
onChange: onChangeOverride || _onChange,
|
|
260
|
+
onBlur: _onBlur,
|
|
261
|
+
onFocus: _onFocus,
|
|
262
|
+
autoFocus: autofocus,
|
|
263
|
+
placeholder,
|
|
264
|
+
...inputProps,
|
|
265
|
+
list: schema.examples ? (0, import_utils3.examplesId)(id) : void 0,
|
|
266
|
+
"aria-describedby": (0, import_utils3.ariaDescribedByIds)(id, !!schema.examples)
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
Array.isArray(schema.examples) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("datalist", { id: (0, import_utils3.examplesId)(id), children: schema.examples.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : []).map((example) => {
|
|
270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("option", { value: example }, example);
|
|
271
|
+
}) }) : null
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/DescriptionField/DescriptionField.tsx
|
|
278
|
+
var import_react7 = require("@chakra-ui/react");
|
|
279
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
280
|
+
function DescriptionField({ description, id }) {
|
|
281
|
+
if (!description) {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
if (typeof description === "string") {
|
|
285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react7.Text, { id, mt: 2, mb: 4, children: description });
|
|
286
|
+
}
|
|
287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: description });
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// src/ErrorList/ErrorList.tsx
|
|
291
|
+
var import_utils5 = require("@rjsf/utils");
|
|
292
|
+
var import_react8 = require("@chakra-ui/react");
|
|
293
|
+
var import_icons2 = require("@chakra-ui/icons");
|
|
294
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
295
|
+
function ErrorList({
|
|
296
|
+
errors,
|
|
297
|
+
registry
|
|
298
|
+
}) {
|
|
299
|
+
const { translateString } = registry;
|
|
300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react8.Alert, { flexDirection: "column", alignItems: "flex-start", gap: 3, status: "error", children: [
|
|
301
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react8.AlertTitle, { children: translateString(import_utils5.TranslatableString.ErrorsLabel) }),
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react8.List, { children: errors.map((error, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react8.ListItem, { children: [
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react8.ListIcon, { as: import_icons2.WarningIcon, color: "red.500" }),
|
|
304
|
+
error.stack
|
|
305
|
+
] }, i)) })
|
|
306
|
+
] });
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// src/IconButton/ChakraIconButton.tsx
|
|
310
|
+
var import_react9 = require("react");
|
|
311
|
+
var import_react10 = require("@chakra-ui/react");
|
|
312
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
313
|
+
function ChakraIconButton(props) {
|
|
314
|
+
const { icon, iconType, uiSchema, registry, ...otherProps } = props;
|
|
315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react10.IconButton, { "aria-label": props.title, ...otherProps, icon });
|
|
316
|
+
}
|
|
317
|
+
ChakraIconButton.displayName = "ChakraIconButton";
|
|
318
|
+
var ChakraIconButton_default = (0, import_react9.memo)(ChakraIconButton);
|
|
319
|
+
|
|
320
|
+
// src/IconButton/IconButton.tsx
|
|
321
|
+
var import_utils6 = require("@rjsf/utils");
|
|
322
|
+
var import_icons3 = require("@chakra-ui/icons");
|
|
323
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
324
|
+
function CopyButton(props) {
|
|
325
|
+
const {
|
|
326
|
+
registry: { translateString }
|
|
327
|
+
} = props;
|
|
328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChakraIconButton_default, { title: translateString(import_utils6.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.CopyIcon, {}) });
|
|
329
|
+
}
|
|
330
|
+
function MoveDownButton(props) {
|
|
331
|
+
const {
|
|
332
|
+
registry: { translateString }
|
|
333
|
+
} = props;
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
335
|
+
ChakraIconButton_default,
|
|
336
|
+
{
|
|
337
|
+
title: translateString(import_utils6.TranslatableString.MoveDownButton),
|
|
338
|
+
...props,
|
|
339
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.ArrowDownIcon, {})
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
function MoveUpButton(props) {
|
|
344
|
+
const {
|
|
345
|
+
registry: { translateString }
|
|
346
|
+
} = props;
|
|
347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
348
|
+
ChakraIconButton_default,
|
|
349
|
+
{
|
|
350
|
+
title: translateString(import_utils6.TranslatableString.MoveUpButton),
|
|
351
|
+
...props,
|
|
352
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.ArrowUpIcon, {})
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
function RemoveButton(props) {
|
|
357
|
+
const {
|
|
358
|
+
registry: { translateString }
|
|
359
|
+
} = props;
|
|
360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
361
|
+
ChakraIconButton_default,
|
|
362
|
+
{
|
|
363
|
+
title: translateString(import_utils6.TranslatableString.RemoveButton),
|
|
364
|
+
...props,
|
|
365
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.DeleteIcon, {})
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// src/FieldErrorTemplate/FieldErrorTemplate.tsx
|
|
371
|
+
var import_utils7 = require("@rjsf/utils");
|
|
372
|
+
var import_react11 = require("@chakra-ui/react");
|
|
373
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
374
|
+
function FieldErrorTemplate(props) {
|
|
375
|
+
const { errors = [], idSchema } = props;
|
|
376
|
+
if (errors.length === 0) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
const id = (0, import_utils7.errorId)(idSchema);
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react11.List, { children: errors.map((error, i) => {
|
|
381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react11.ListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react11.FormErrorMessage, { id, children: error }) }, i);
|
|
382
|
+
}) });
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// src/FieldHelpTemplate/FieldHelpTemplate.tsx
|
|
386
|
+
var import_utils8 = require("@rjsf/utils");
|
|
387
|
+
var import_react12 = require("@chakra-ui/react");
|
|
388
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
389
|
+
function FieldHelpTemplate(props) {
|
|
390
|
+
const { idSchema, help } = props;
|
|
391
|
+
if (!help) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
const id = (0, import_utils8.helpId)(idSchema);
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.FormHelperText, { id, children: help });
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/FieldTemplate/FieldTemplate.tsx
|
|
399
|
+
var import_utils9 = require("@rjsf/utils");
|
|
400
|
+
var import_react13 = require("@chakra-ui/react");
|
|
401
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
402
|
+
function FieldTemplate(props) {
|
|
403
|
+
const {
|
|
404
|
+
id,
|
|
405
|
+
children,
|
|
406
|
+
classNames,
|
|
407
|
+
style,
|
|
408
|
+
disabled,
|
|
409
|
+
displayLabel,
|
|
410
|
+
hidden,
|
|
411
|
+
label,
|
|
412
|
+
onDropPropertyClick,
|
|
413
|
+
onKeyChange,
|
|
414
|
+
readonly,
|
|
415
|
+
registry,
|
|
416
|
+
required,
|
|
417
|
+
rawErrors = [],
|
|
418
|
+
errors,
|
|
419
|
+
help,
|
|
420
|
+
description,
|
|
421
|
+
rawDescription,
|
|
422
|
+
schema,
|
|
423
|
+
uiSchema
|
|
424
|
+
} = props;
|
|
425
|
+
const uiOptions = (0, import_utils9.getUiOptions)(uiSchema);
|
|
426
|
+
const WrapIfAdditionalTemplate2 = (0, import_utils9.getTemplate)(
|
|
427
|
+
"WrapIfAdditionalTemplate",
|
|
428
|
+
registry,
|
|
429
|
+
uiOptions
|
|
430
|
+
);
|
|
431
|
+
if (hidden) {
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { display: "none" }, children });
|
|
433
|
+
}
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
435
|
+
WrapIfAdditionalTemplate2,
|
|
436
|
+
{
|
|
437
|
+
classNames,
|
|
438
|
+
style,
|
|
439
|
+
disabled,
|
|
440
|
+
id,
|
|
441
|
+
label,
|
|
442
|
+
onDropPropertyClick,
|
|
443
|
+
onKeyChange,
|
|
444
|
+
readonly,
|
|
445
|
+
required,
|
|
446
|
+
schema,
|
|
447
|
+
uiSchema,
|
|
448
|
+
registry,
|
|
449
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react13.FormControl, { isRequired: required, isInvalid: rawErrors && rawErrors.length > 0, children: [
|
|
450
|
+
children,
|
|
451
|
+
displayLabel && rawDescription ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react13.Text, { mt: 2, children: description }) : null,
|
|
452
|
+
errors,
|
|
453
|
+
help
|
|
454
|
+
] })
|
|
455
|
+
}
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
|
|
460
|
+
var import_react14 = require("@chakra-ui/react");
|
|
461
|
+
var import_utils10 = require("@rjsf/utils");
|
|
462
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
463
|
+
function ObjectFieldTemplate(props) {
|
|
464
|
+
const {
|
|
465
|
+
description,
|
|
466
|
+
title,
|
|
467
|
+
properties,
|
|
468
|
+
required,
|
|
469
|
+
disabled,
|
|
470
|
+
readonly,
|
|
471
|
+
uiSchema,
|
|
472
|
+
idSchema,
|
|
473
|
+
schema,
|
|
474
|
+
formData,
|
|
475
|
+
onAddClick,
|
|
476
|
+
registry
|
|
477
|
+
} = props;
|
|
478
|
+
const uiOptions = (0, import_utils10.getUiOptions)(uiSchema);
|
|
479
|
+
const TitleFieldTemplate = (0, import_utils10.getTemplate)("TitleFieldTemplate", registry, uiOptions);
|
|
480
|
+
const DescriptionFieldTemplate = (0, import_utils10.getTemplate)(
|
|
481
|
+
"DescriptionFieldTemplate",
|
|
482
|
+
registry,
|
|
483
|
+
uiOptions
|
|
484
|
+
);
|
|
485
|
+
const {
|
|
486
|
+
ButtonTemplates: { AddButton: AddButton2 }
|
|
487
|
+
} = registry.templates;
|
|
488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
489
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
490
|
+
TitleFieldTemplate,
|
|
491
|
+
{
|
|
492
|
+
id: (0, import_utils10.titleId)(idSchema),
|
|
493
|
+
title,
|
|
494
|
+
required,
|
|
495
|
+
schema,
|
|
496
|
+
uiSchema,
|
|
497
|
+
registry
|
|
498
|
+
}
|
|
499
|
+
),
|
|
500
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
501
|
+
DescriptionFieldTemplate,
|
|
502
|
+
{
|
|
503
|
+
id: (0, import_utils10.descriptionId)(idSchema),
|
|
504
|
+
description,
|
|
505
|
+
schema,
|
|
506
|
+
uiSchema,
|
|
507
|
+
registry
|
|
508
|
+
}
|
|
509
|
+
),
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react14.Grid, { gap: description ? 2 : 6, mb: 4, children: [
|
|
511
|
+
properties.map(
|
|
512
|
+
(element, index) => element.hidden ? element.content : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react14.GridItem, { children: element.content }, `${idSchema.$id}-${element.name}-${index}`)
|
|
513
|
+
),
|
|
514
|
+
(0, import_utils10.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react14.GridItem, { justifySelf: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
515
|
+
AddButton2,
|
|
516
|
+
{
|
|
517
|
+
className: "object-property-expand",
|
|
518
|
+
onClick: onAddClick(schema),
|
|
519
|
+
disabled: disabled || readonly,
|
|
520
|
+
uiSchema,
|
|
521
|
+
registry
|
|
522
|
+
}
|
|
523
|
+
) })
|
|
524
|
+
] })
|
|
525
|
+
] });
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// src/SubmitButton/SubmitButton.tsx
|
|
529
|
+
var import_react15 = require("@chakra-ui/react");
|
|
530
|
+
var import_utils11 = require("@rjsf/utils");
|
|
531
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
532
|
+
function SubmitButton({ uiSchema }) {
|
|
533
|
+
const { submitText, norender, props: submitButtonProps } = (0, import_utils11.getSubmitButtonOptions)(uiSchema);
|
|
534
|
+
if (norender) {
|
|
535
|
+
return null;
|
|
536
|
+
}
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react15.Box, { marginTop: 3, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react15.Button, { type: "submit", variant: "solid", ...submitButtonProps, children: submitText }) });
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// src/TitleField/TitleField.tsx
|
|
541
|
+
var import_react16 = require("@chakra-ui/react");
|
|
542
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
543
|
+
function TitleField({
|
|
544
|
+
id,
|
|
545
|
+
title
|
|
546
|
+
}) {
|
|
547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react16.Box, { id, mt: 1, mb: 4, children: [
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react16.Heading, { as: "h5", children: title }),
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react16.Divider, {})
|
|
550
|
+
] });
|
|
8
551
|
}
|
|
552
|
+
|
|
553
|
+
// src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
|
|
554
|
+
var import_utils12 = require("@rjsf/utils");
|
|
555
|
+
var import_react17 = require("@chakra-ui/react");
|
|
556
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
557
|
+
function WrapIfAdditionalTemplate(props) {
|
|
558
|
+
const {
|
|
559
|
+
children,
|
|
560
|
+
classNames,
|
|
561
|
+
style,
|
|
562
|
+
disabled,
|
|
563
|
+
id,
|
|
564
|
+
label,
|
|
565
|
+
onDropPropertyClick,
|
|
566
|
+
onKeyChange,
|
|
567
|
+
readonly,
|
|
568
|
+
registry,
|
|
569
|
+
required,
|
|
570
|
+
schema,
|
|
571
|
+
uiSchema
|
|
572
|
+
} = props;
|
|
573
|
+
const { templates, translateString } = registry;
|
|
574
|
+
const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
|
|
575
|
+
const keyLabel = translateString(import_utils12.TranslatableString.KeyLabel, [label]);
|
|
576
|
+
const additional = import_utils12.ADDITIONAL_PROPERTY_FLAG in schema;
|
|
577
|
+
if (!additional) {
|
|
578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: classNames, style, children });
|
|
579
|
+
}
|
|
580
|
+
const handleBlur = ({ target }) => onKeyChange(target.value);
|
|
581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react17.Grid, { className: classNames, style, alignItems: "center", gap: 2, children: [
|
|
582
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react17.GridItem, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react17.FormControl, { isRequired: required, children: [
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react17.FormLabel, { htmlFor: `${id}-key`, id: `${id}-key-label`, children: keyLabel }),
|
|
584
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
585
|
+
import_react17.Input,
|
|
586
|
+
{
|
|
587
|
+
defaultValue: label,
|
|
588
|
+
disabled: disabled || readonly,
|
|
589
|
+
id: `${id}-key`,
|
|
590
|
+
name: `${id}-key`,
|
|
591
|
+
onBlur: !readonly ? handleBlur : void 0,
|
|
592
|
+
type: "text",
|
|
593
|
+
mb: 1
|
|
594
|
+
}
|
|
595
|
+
)
|
|
596
|
+
] }) }),
|
|
597
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react17.GridItem, { children }),
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react17.GridItem, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
599
|
+
RemoveButton2,
|
|
600
|
+
{
|
|
601
|
+
disabled: disabled || readonly,
|
|
602
|
+
onClick: onDropPropertyClick(label),
|
|
603
|
+
uiSchema,
|
|
604
|
+
registry
|
|
605
|
+
}
|
|
606
|
+
) })
|
|
607
|
+
] }, `${id}-key`);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// src/Templates/Templates.ts
|
|
611
|
+
function generateTemplates() {
|
|
612
|
+
return {
|
|
613
|
+
ArrayFieldItemTemplate,
|
|
614
|
+
ArrayFieldTemplate,
|
|
615
|
+
BaseInputTemplate,
|
|
616
|
+
ButtonTemplates: {
|
|
617
|
+
CopyButton,
|
|
618
|
+
AddButton,
|
|
619
|
+
MoveDownButton,
|
|
620
|
+
MoveUpButton,
|
|
621
|
+
RemoveButton,
|
|
622
|
+
SubmitButton
|
|
623
|
+
},
|
|
624
|
+
DescriptionFieldTemplate: DescriptionField,
|
|
625
|
+
ErrorListTemplate: ErrorList,
|
|
626
|
+
FieldErrorTemplate,
|
|
627
|
+
FieldHelpTemplate,
|
|
628
|
+
FieldTemplate,
|
|
629
|
+
ObjectFieldTemplate,
|
|
630
|
+
TitleFieldTemplate: TitleField,
|
|
631
|
+
WrapIfAdditionalTemplate
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
var Templates_default = generateTemplates();
|
|
635
|
+
|
|
636
|
+
// src/AltDateWidget/AltDateWidget.tsx
|
|
637
|
+
var import_react18 = require("react");
|
|
638
|
+
var import_utils13 = require("@rjsf/utils");
|
|
639
|
+
var import_react19 = require("@chakra-ui/react");
|
|
640
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
641
|
+
var rangeOptions = (start, stop) => {
|
|
642
|
+
const options = [];
|
|
643
|
+
for (let i = start; i <= stop; i++) {
|
|
644
|
+
options.push({ value: i, label: (0, import_utils13.pad)(i, 2) });
|
|
645
|
+
}
|
|
646
|
+
return options;
|
|
647
|
+
};
|
|
648
|
+
function DateElement(props) {
|
|
649
|
+
const { SelectWidget: SelectWidget2 } = props.registry.widgets;
|
|
650
|
+
const value = props.value ? props.value : void 0;
|
|
651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
652
|
+
SelectWidget2,
|
|
653
|
+
{
|
|
654
|
+
...props,
|
|
655
|
+
label: "",
|
|
656
|
+
className: "form-control",
|
|
657
|
+
onChange: (elemValue) => props.select(props.type, elemValue),
|
|
658
|
+
options: {
|
|
659
|
+
enumOptions: rangeOptions(props.range[0], props.range[1])
|
|
660
|
+
},
|
|
661
|
+
placeholder: props.type,
|
|
662
|
+
schema: { type: "integer" },
|
|
663
|
+
value,
|
|
664
|
+
"aria-describedby": (0, import_utils13.ariaDescribedByIds)(props.name)
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
var readyForChange = (state) => {
|
|
669
|
+
return Object.keys(state).every((key) => typeof state[key] !== "undefined" && state[key] !== -1);
|
|
670
|
+
};
|
|
671
|
+
function AltDateWidget(props) {
|
|
672
|
+
const { autofocus, disabled, id, onBlur, onChange, onFocus, options, readonly, registry, showTime, value } = props;
|
|
673
|
+
const { translateString } = registry;
|
|
674
|
+
const [state, setState] = (0, import_react18.useState)((0, import_utils13.parseDateString)(value, showTime));
|
|
675
|
+
(0, import_react18.useEffect)(() => {
|
|
676
|
+
setState((0, import_utils13.parseDateString)(value, showTime));
|
|
677
|
+
}, [showTime, value]);
|
|
678
|
+
const handleChange = (property, nextValue) => {
|
|
679
|
+
const nextState = {
|
|
680
|
+
...state,
|
|
681
|
+
[property]: typeof nextValue === "undefined" ? -1 : nextValue
|
|
682
|
+
};
|
|
683
|
+
if (readyForChange(nextState)) {
|
|
684
|
+
onChange((0, import_utils13.toDateString)(nextState, showTime));
|
|
685
|
+
} else {
|
|
686
|
+
setState(nextState);
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
const handleNow = (event) => {
|
|
690
|
+
event.preventDefault();
|
|
691
|
+
if (disabled || readonly) {
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
const nextState = (0, import_utils13.parseDateString)((/* @__PURE__ */ new Date()).toJSON(), showTime);
|
|
695
|
+
onChange((0, import_utils13.toDateString)(nextState, showTime));
|
|
696
|
+
};
|
|
697
|
+
const handleClear = (event) => {
|
|
698
|
+
event.preventDefault();
|
|
699
|
+
if (disabled || readonly) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
onChange(void 0);
|
|
703
|
+
};
|
|
704
|
+
const dateElementProps = () => {
|
|
705
|
+
const { year, month, day, hour, minute, second } = state;
|
|
706
|
+
const data = [
|
|
707
|
+
{ type: "year", range: options.yearsRange, value: year },
|
|
708
|
+
{ type: "month", range: [1, 12], value: month },
|
|
709
|
+
{ type: "day", range: [1, 31], value: day }
|
|
710
|
+
];
|
|
711
|
+
if (showTime) {
|
|
712
|
+
data.push(
|
|
713
|
+
{ type: "hour", range: [0, 23], value: hour },
|
|
714
|
+
{ type: "minute", range: [0, 59], value: minute },
|
|
715
|
+
{ type: "second", range: [0, 59], value: second }
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
return data;
|
|
719
|
+
};
|
|
720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react19.Box, { children: [
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react19.Box, { display: "flex", flexWrap: "wrap", alignItems: "center", children: dateElementProps().map((elemProps, i) => {
|
|
722
|
+
const elemId = id + "_" + elemProps.type;
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react19.Box, { mr: "2", mb: "2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
724
|
+
DateElement,
|
|
725
|
+
{
|
|
726
|
+
...props,
|
|
727
|
+
...elemProps,
|
|
728
|
+
autofocus: autofocus && i === 0,
|
|
729
|
+
disabled,
|
|
730
|
+
id: elemId,
|
|
731
|
+
name: id,
|
|
732
|
+
onBlur,
|
|
733
|
+
onFocus,
|
|
734
|
+
readonly,
|
|
735
|
+
registry,
|
|
736
|
+
select: handleChange,
|
|
737
|
+
value: elemProps.value < 0 ? "" : elemProps.value
|
|
738
|
+
}
|
|
739
|
+
) }, elemId);
|
|
740
|
+
}) }),
|
|
741
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react19.Box, { display: "flex", children: [
|
|
742
|
+
!options.hideNowButton && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react19.Button, { onClick: (e) => handleNow(e), mr: "2", children: translateString(import_utils13.TranslatableString.NowLabel) }),
|
|
743
|
+
!options.hideClearButton && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react19.Button, { onClick: (e) => handleClear(e), children: translateString(import_utils13.TranslatableString.ClearLabel) })
|
|
744
|
+
] })
|
|
745
|
+
] });
|
|
746
|
+
}
|
|
747
|
+
AltDateWidget.defaultProps = {
|
|
748
|
+
autofocus: false,
|
|
749
|
+
disabled: false,
|
|
750
|
+
readonly: false,
|
|
751
|
+
showTime: false,
|
|
752
|
+
options: {
|
|
753
|
+
yearsRange: [1900, (/* @__PURE__ */ new Date()).getFullYear() + 2]
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
var AltDateWidget_default = AltDateWidget;
|
|
757
|
+
|
|
758
|
+
// src/AltDateTimeWidget/AltDateTimeWidget.tsx
|
|
759
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
760
|
+
function AltDateTimeWidget(props) {
|
|
761
|
+
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AltDateWidget2, { ...props, showTime: true });
|
|
763
|
+
}
|
|
764
|
+
AltDateTimeWidget.defaultProps = {
|
|
765
|
+
...AltDateWidget_default.defaultProps,
|
|
766
|
+
showTime: true
|
|
767
|
+
};
|
|
768
|
+
var AltDateTimeWidget_default = AltDateTimeWidget;
|
|
769
|
+
|
|
770
|
+
// src/CheckboxWidget/CheckboxWidget.tsx
|
|
771
|
+
var import_react20 = require("@chakra-ui/react");
|
|
772
|
+
var import_utils14 = require("@rjsf/utils");
|
|
773
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
774
|
+
function CheckboxWidget(props) {
|
|
775
|
+
const {
|
|
776
|
+
id,
|
|
777
|
+
value,
|
|
778
|
+
disabled,
|
|
779
|
+
readonly,
|
|
780
|
+
onChange,
|
|
781
|
+
onBlur,
|
|
782
|
+
onFocus,
|
|
783
|
+
label,
|
|
784
|
+
hideLabel,
|
|
785
|
+
registry,
|
|
786
|
+
options,
|
|
787
|
+
uiSchema,
|
|
788
|
+
schema
|
|
789
|
+
} = props;
|
|
790
|
+
const chakraProps = getChakra({ uiSchema });
|
|
791
|
+
const required = (0, import_utils14.schemaRequiresTrueValue)(schema);
|
|
792
|
+
const DescriptionFieldTemplate = (0, import_utils14.getTemplate)(
|
|
793
|
+
"DescriptionFieldTemplate",
|
|
794
|
+
registry,
|
|
795
|
+
options
|
|
796
|
+
);
|
|
797
|
+
const description = options.description || schema.description;
|
|
798
|
+
const _onChange = ({ target: { checked } }) => onChange(checked);
|
|
799
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
800
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react20.FormControl, { mb: 1, ...chakraProps, isRequired: required, children: [
|
|
802
|
+
!hideLabel && !!description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
803
|
+
DescriptionFieldTemplate,
|
|
804
|
+
{
|
|
805
|
+
id: (0, import_utils14.descriptionId)(id),
|
|
806
|
+
description,
|
|
807
|
+
schema,
|
|
808
|
+
uiSchema,
|
|
809
|
+
registry
|
|
810
|
+
}
|
|
811
|
+
),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
813
|
+
import_react20.Checkbox,
|
|
814
|
+
{
|
|
815
|
+
id,
|
|
816
|
+
name: id,
|
|
817
|
+
isChecked: typeof value === "undefined" ? false : value,
|
|
818
|
+
isDisabled: disabled || readonly,
|
|
819
|
+
onChange: _onChange,
|
|
820
|
+
onBlur: _onBlur,
|
|
821
|
+
onFocus: _onFocus,
|
|
822
|
+
"aria-describedby": (0, import_utils14.ariaDescribedByIds)(id),
|
|
823
|
+
children: (0, import_utils14.labelValue)(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react20.Text, { children: label }), hideLabel || !label)
|
|
824
|
+
}
|
|
825
|
+
)
|
|
826
|
+
] });
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// src/CheckboxesWidget/CheckboxesWidget.tsx
|
|
830
|
+
var import_react21 = require("@chakra-ui/react");
|
|
831
|
+
var import_utils16 = require("@rjsf/utils");
|
|
832
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
833
|
+
function CheckboxesWidget(props) {
|
|
834
|
+
const {
|
|
835
|
+
id,
|
|
836
|
+
disabled,
|
|
837
|
+
options,
|
|
838
|
+
value,
|
|
839
|
+
readonly,
|
|
840
|
+
onChange,
|
|
841
|
+
onBlur,
|
|
842
|
+
onFocus,
|
|
843
|
+
required,
|
|
844
|
+
label,
|
|
845
|
+
hideLabel,
|
|
846
|
+
uiSchema,
|
|
847
|
+
rawErrors = []
|
|
848
|
+
} = props;
|
|
849
|
+
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
850
|
+
const chakraProps = getChakra({ uiSchema });
|
|
851
|
+
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
852
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, (0, import_utils16.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
853
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, (0, import_utils16.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
854
|
+
const row = options ? options.inline : false;
|
|
855
|
+
const selectedIndexes = (0, import_utils16.enumOptionsIndexForValue)(value, enumOptions, true);
|
|
856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
857
|
+
import_react21.FormControl,
|
|
858
|
+
{
|
|
859
|
+
mb: 1,
|
|
860
|
+
...chakraProps,
|
|
861
|
+
isDisabled: disabled || readonly,
|
|
862
|
+
isRequired: required,
|
|
863
|
+
isReadOnly: readonly,
|
|
864
|
+
isInvalid: rawErrors && rawErrors.length > 0,
|
|
865
|
+
children: [
|
|
866
|
+
(0, import_utils16.labelValue)(
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.FormLabel, { htmlFor: id, id: `${id}-label`, children: label }),
|
|
868
|
+
hideLabel || !label
|
|
869
|
+
),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
871
|
+
import_react21.CheckboxGroup,
|
|
872
|
+
{
|
|
873
|
+
onChange: (option) => onChange((0, import_utils16.enumOptionsValueForIndex)(option, enumOptions, emptyValue)),
|
|
874
|
+
defaultValue: selectedIndexes,
|
|
875
|
+
"aria-describedby": (0, import_utils16.ariaDescribedByIds)(id),
|
|
876
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
877
|
+
const checked = (0, import_utils16.enumOptionsIsSelected)(option.value, checkboxesValues);
|
|
878
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
880
|
+
import_react21.Checkbox,
|
|
881
|
+
{
|
|
882
|
+
id: (0, import_utils16.optionId)(id, index),
|
|
883
|
+
name: id,
|
|
884
|
+
value: String(index),
|
|
885
|
+
isChecked: checked,
|
|
886
|
+
isDisabled: disabled || itemDisabled || readonly,
|
|
887
|
+
onBlur: _onBlur,
|
|
888
|
+
onFocus: _onFocus,
|
|
889
|
+
children: option.label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Text, { children: option.label })
|
|
890
|
+
},
|
|
891
|
+
index
|
|
892
|
+
);
|
|
893
|
+
}) })
|
|
894
|
+
}
|
|
895
|
+
)
|
|
896
|
+
]
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// src/RadioWidget/RadioWidget.tsx
|
|
902
|
+
var import_react22 = require("@chakra-ui/react");
|
|
903
|
+
var import_utils18 = require("@rjsf/utils");
|
|
904
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
905
|
+
function RadioWidget({
|
|
906
|
+
id,
|
|
907
|
+
options,
|
|
908
|
+
value,
|
|
909
|
+
required,
|
|
910
|
+
disabled,
|
|
911
|
+
readonly,
|
|
912
|
+
label,
|
|
913
|
+
hideLabel,
|
|
914
|
+
onChange,
|
|
915
|
+
onBlur,
|
|
916
|
+
onFocus,
|
|
917
|
+
uiSchema
|
|
918
|
+
}) {
|
|
919
|
+
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
920
|
+
const chakraProps = getChakra({ uiSchema });
|
|
921
|
+
const _onChange = (nextValue) => onChange((0, import_utils18.enumOptionsValueForIndex)(nextValue, enumOptions, emptyValue));
|
|
922
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, (0, import_utils18.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
923
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, (0, import_utils18.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
924
|
+
const row = options ? options.inline : false;
|
|
925
|
+
const selectedIndex = (0, import_utils18.enumOptionsIndexForValue)(value, enumOptions) ?? null;
|
|
926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react22.FormControl, { mb: 1, ...chakraProps, isDisabled: disabled || readonly, isRequired: required, isReadOnly: readonly, children: [
|
|
927
|
+
(0, import_utils18.labelValue)(
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react22.FormLabel, { htmlFor: id, id: `${id}-label`, children: label }),
|
|
929
|
+
hideLabel || !label
|
|
930
|
+
),
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
932
|
+
import_react22.RadioGroup,
|
|
933
|
+
{
|
|
934
|
+
onChange: _onChange,
|
|
935
|
+
onBlur: _onBlur,
|
|
936
|
+
onFocus: _onFocus,
|
|
937
|
+
value: selectedIndex,
|
|
938
|
+
name: id,
|
|
939
|
+
"aria-describedby": (0, import_utils18.ariaDescribedByIds)(id),
|
|
940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react22.Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
941
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
943
|
+
import_react22.Radio,
|
|
944
|
+
{
|
|
945
|
+
value: String(index),
|
|
946
|
+
id: (0, import_utils18.optionId)(id, index),
|
|
947
|
+
disabled: disabled || itemDisabled || readonly,
|
|
948
|
+
children: option.label
|
|
949
|
+
},
|
|
950
|
+
index
|
|
951
|
+
);
|
|
952
|
+
}) })
|
|
953
|
+
}
|
|
954
|
+
)
|
|
955
|
+
] });
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/RangeWidget/RangeWidget.tsx
|
|
959
|
+
var import_react23 = require("@chakra-ui/react");
|
|
960
|
+
var import_utils20 = require("@rjsf/utils");
|
|
961
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
962
|
+
function RangeWidget({
|
|
963
|
+
value,
|
|
964
|
+
readonly,
|
|
965
|
+
disabled,
|
|
966
|
+
onBlur,
|
|
967
|
+
onFocus,
|
|
968
|
+
options,
|
|
969
|
+
schema,
|
|
970
|
+
uiSchema,
|
|
971
|
+
onChange,
|
|
972
|
+
label,
|
|
973
|
+
hideLabel,
|
|
974
|
+
id
|
|
975
|
+
}) {
|
|
976
|
+
const chakraProps = getChakra({ uiSchema });
|
|
977
|
+
const sliderWidgetProps = { value, label, id, ...(0, import_utils20.rangeSpec)(schema) };
|
|
978
|
+
const _onChange = (value2) => onChange(value2 === void 0 ? options.emptyValue : value2);
|
|
979
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
980
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react23.FormControl, { mb: 1, ...chakraProps, children: [
|
|
982
|
+
(0, import_utils20.labelValue)(/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react23.FormLabel, { htmlFor: id, children: label }), hideLabel || !label),
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
984
|
+
import_react23.Slider,
|
|
985
|
+
{
|
|
986
|
+
...sliderWidgetProps,
|
|
987
|
+
id,
|
|
988
|
+
name: id,
|
|
989
|
+
isDisabled: disabled || readonly,
|
|
990
|
+
onChange: _onChange,
|
|
991
|
+
onBlur: _onBlur,
|
|
992
|
+
onFocus: _onFocus,
|
|
993
|
+
"aria-describedby": (0, import_utils20.ariaDescribedByIds)(id),
|
|
994
|
+
children: [
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react23.SliderTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react23.SliderFilledTrack, {}) }),
|
|
996
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react23.SliderThumb, {})
|
|
997
|
+
]
|
|
998
|
+
}
|
|
999
|
+
)
|
|
1000
|
+
] });
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
// src/SelectWidget/SelectWidget.tsx
|
|
1004
|
+
var import_react24 = require("@chakra-ui/react");
|
|
1005
|
+
var import_utils22 = require("@rjsf/utils");
|
|
1006
|
+
var import_chakra_react_select = require("chakra-react-select");
|
|
1007
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1008
|
+
function SelectWidget(props) {
|
|
1009
|
+
const {
|
|
1010
|
+
id,
|
|
1011
|
+
options,
|
|
1012
|
+
label,
|
|
1013
|
+
hideLabel,
|
|
1014
|
+
placeholder,
|
|
1015
|
+
multiple,
|
|
1016
|
+
required,
|
|
1017
|
+
disabled,
|
|
1018
|
+
readonly,
|
|
1019
|
+
value,
|
|
1020
|
+
autofocus,
|
|
1021
|
+
onChange,
|
|
1022
|
+
onBlur,
|
|
1023
|
+
onFocus,
|
|
1024
|
+
rawErrors = [],
|
|
1025
|
+
uiSchema
|
|
1026
|
+
} = props;
|
|
1027
|
+
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
1028
|
+
const chakraProps = getChakra({ uiSchema });
|
|
1029
|
+
const _onMultiChange = (e) => {
|
|
1030
|
+
return onChange(
|
|
1031
|
+
(0, import_utils22.enumOptionsValueForIndex)(
|
|
1032
|
+
e.map((v) => {
|
|
1033
|
+
return v.value;
|
|
1034
|
+
}),
|
|
1035
|
+
enumOptions,
|
|
1036
|
+
emptyValue
|
|
1037
|
+
)
|
|
1038
|
+
);
|
|
1039
|
+
};
|
|
1040
|
+
const _onChange = (e) => {
|
|
1041
|
+
return onChange((0, import_utils22.enumOptionsValueForIndex)(e.value, enumOptions, emptyValue));
|
|
1042
|
+
};
|
|
1043
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, (0, import_utils22.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
1044
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, (0, import_utils22.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
1045
|
+
const _valueLabelMap = {};
|
|
1046
|
+
const displayEnumOptions = Array.isArray(enumOptions) ? enumOptions.map((option, index) => {
|
|
1047
|
+
const { value: value2, label: label2 } = option;
|
|
1048
|
+
_valueLabelMap[index] = label2 || String(value2);
|
|
1049
|
+
return {
|
|
1050
|
+
label: label2,
|
|
1051
|
+
value: String(index),
|
|
1052
|
+
isDisabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
|
|
1053
|
+
};
|
|
1054
|
+
}) : [];
|
|
1055
|
+
const isMultiple = typeof multiple !== "undefined" && Boolean(enumOptions);
|
|
1056
|
+
const selectedIndex = (0, import_utils22.enumOptionsIndexForValue)(value, enumOptions, isMultiple);
|
|
1057
|
+
const formValue = isMultiple ? (selectedIndex || []).map((i) => {
|
|
1058
|
+
return {
|
|
1059
|
+
label: _valueLabelMap[i],
|
|
1060
|
+
value: i
|
|
1061
|
+
};
|
|
1062
|
+
}) : {
|
|
1063
|
+
label: _valueLabelMap[selectedIndex] || "",
|
|
1064
|
+
selectedIndex
|
|
1065
|
+
};
|
|
1066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1067
|
+
import_react24.FormControl,
|
|
1068
|
+
{
|
|
1069
|
+
mb: 1,
|
|
1070
|
+
...chakraProps,
|
|
1071
|
+
isDisabled: disabled || readonly,
|
|
1072
|
+
isRequired: required,
|
|
1073
|
+
isReadOnly: readonly,
|
|
1074
|
+
isInvalid: rawErrors && rawErrors.length > 0,
|
|
1075
|
+
children: [
|
|
1076
|
+
(0, import_utils22.labelValue)(
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react24.FormLabel, { htmlFor: id, id: `${id}-label`, children: label }),
|
|
1078
|
+
hideLabel || !label
|
|
1079
|
+
),
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1081
|
+
import_chakra_react_select.Select,
|
|
1082
|
+
{
|
|
1083
|
+
inputId: id,
|
|
1084
|
+
name: id,
|
|
1085
|
+
isMulti: isMultiple,
|
|
1086
|
+
options: displayEnumOptions,
|
|
1087
|
+
placeholder,
|
|
1088
|
+
closeMenuOnSelect: !isMultiple,
|
|
1089
|
+
onBlur: _onBlur,
|
|
1090
|
+
onChange: isMultiple ? _onMultiChange : _onChange,
|
|
1091
|
+
onFocus: _onFocus,
|
|
1092
|
+
autoFocus: autofocus,
|
|
1093
|
+
value: formValue,
|
|
1094
|
+
"aria-describedby": (0, import_utils22.ariaDescribedByIds)(id)
|
|
1095
|
+
}
|
|
1096
|
+
)
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
// src/TextareaWidget/TextareaWidget.tsx
|
|
1103
|
+
var import_react25 = require("@chakra-ui/react");
|
|
1104
|
+
var import_utils24 = require("@rjsf/utils");
|
|
1105
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1106
|
+
function TextareaWidget({
|
|
1107
|
+
id,
|
|
1108
|
+
placeholder,
|
|
1109
|
+
value,
|
|
1110
|
+
label,
|
|
1111
|
+
hideLabel,
|
|
1112
|
+
disabled,
|
|
1113
|
+
autofocus,
|
|
1114
|
+
readonly,
|
|
1115
|
+
onBlur,
|
|
1116
|
+
onFocus,
|
|
1117
|
+
onChange,
|
|
1118
|
+
options,
|
|
1119
|
+
uiSchema,
|
|
1120
|
+
required,
|
|
1121
|
+
rawErrors
|
|
1122
|
+
}) {
|
|
1123
|
+
const chakraProps = getChakra({ uiSchema });
|
|
1124
|
+
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
1125
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
1126
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
1127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1128
|
+
import_react25.FormControl,
|
|
1129
|
+
{
|
|
1130
|
+
mb: 1,
|
|
1131
|
+
...chakraProps,
|
|
1132
|
+
isDisabled: disabled || readonly,
|
|
1133
|
+
isRequired: required,
|
|
1134
|
+
isReadOnly: readonly,
|
|
1135
|
+
isInvalid: rawErrors && rawErrors.length > 0,
|
|
1136
|
+
children: [
|
|
1137
|
+
(0, import_utils24.labelValue)(/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react25.FormLabel, { htmlFor: id, children: label }), hideLabel || !label),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1139
|
+
import_react25.Textarea,
|
|
1140
|
+
{
|
|
1141
|
+
id,
|
|
1142
|
+
name: id,
|
|
1143
|
+
value: value ?? "",
|
|
1144
|
+
placeholder,
|
|
1145
|
+
autoFocus: autofocus,
|
|
1146
|
+
onChange: _onChange,
|
|
1147
|
+
onBlur: _onBlur,
|
|
1148
|
+
onFocus: _onFocus,
|
|
1149
|
+
"aria-describedby": (0, import_utils24.ariaDescribedByIds)(id)
|
|
1150
|
+
}
|
|
1151
|
+
)
|
|
1152
|
+
]
|
|
1153
|
+
}
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// src/UpDownWidget/UpDownWidget.tsx
|
|
1158
|
+
var import_react26 = require("@chakra-ui/react");
|
|
1159
|
+
var import_utils26 = require("@rjsf/utils");
|
|
1160
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1161
|
+
function UpDownWidget(props) {
|
|
1162
|
+
const { id, uiSchema, readonly, disabled, label, hideLabel, value, onChange, onBlur, onFocus, rawErrors, required } = props;
|
|
1163
|
+
const chakraProps = getChakra({ uiSchema });
|
|
1164
|
+
const _onChange = (value2) => onChange(value2);
|
|
1165
|
+
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
1166
|
+
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
1167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1168
|
+
import_react26.FormControl,
|
|
1169
|
+
{
|
|
1170
|
+
mb: 1,
|
|
1171
|
+
...chakraProps,
|
|
1172
|
+
isDisabled: disabled || readonly,
|
|
1173
|
+
isRequired: required,
|
|
1174
|
+
isReadOnly: readonly,
|
|
1175
|
+
isInvalid: rawErrors && rawErrors.length > 0,
|
|
1176
|
+
children: [
|
|
1177
|
+
(0, import_utils26.labelValue)(/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react26.FormLabel, { htmlFor: id, children: label }), hideLabel || !label),
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1179
|
+
import_react26.NumberInput,
|
|
1180
|
+
{
|
|
1181
|
+
value: value ?? "",
|
|
1182
|
+
onChange: _onChange,
|
|
1183
|
+
onBlur: _onBlur,
|
|
1184
|
+
onFocus: _onFocus,
|
|
1185
|
+
"aria-describedby": (0, import_utils26.ariaDescribedByIds)(id),
|
|
1186
|
+
children: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react26.NumberInputField, { id, name: id }),
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react26.NumberInputStepper, { children: [
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react26.NumberIncrementStepper, {}),
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react26.NumberDecrementStepper, {})
|
|
1191
|
+
] })
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
]
|
|
1196
|
+
}
|
|
1197
|
+
);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// src/Widgets/Widgets.ts
|
|
1201
|
+
function generateWidgets() {
|
|
1202
|
+
return {
|
|
1203
|
+
AltDateTimeWidget: AltDateTimeWidget_default,
|
|
1204
|
+
AltDateWidget: AltDateWidget_default,
|
|
1205
|
+
CheckboxWidget,
|
|
1206
|
+
CheckboxesWidget,
|
|
1207
|
+
RadioWidget,
|
|
1208
|
+
RangeWidget,
|
|
1209
|
+
SelectWidget,
|
|
1210
|
+
TextareaWidget,
|
|
1211
|
+
UpDownWidget
|
|
1212
|
+
};
|
|
1213
|
+
}
|
|
1214
|
+
var Widgets_default = generateWidgets();
|
|
1215
|
+
|
|
1216
|
+
// src/Theme/Theme.tsx
|
|
1217
|
+
function generateTheme() {
|
|
1218
|
+
return {
|
|
1219
|
+
templates: generateTemplates(),
|
|
1220
|
+
widgets: generateWidgets()
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
var Theme_default = generateTheme();
|
|
1224
|
+
|
|
1225
|
+
// src/Form/Form.tsx
|
|
1226
|
+
function generateForm() {
|
|
1227
|
+
return (0, import_core.withTheme)(generateTheme());
|
|
1228
|
+
}
|
|
1229
|
+
var Form_default = generateForm();
|
|
1230
|
+
|
|
1231
|
+
// src/ChakraFrameProvider.tsx
|
|
1232
|
+
var import_react28 = require("@emotion/react");
|
|
1233
|
+
var import_cache = __toESM(require("@emotion/cache"));
|
|
1234
|
+
var import_weak_memoize = __toESM(require("@emotion/weak-memoize"));
|
|
1235
|
+
var import_react29 = require("@chakra-ui/react");
|
|
1236
|
+
|
|
1237
|
+
// src/CssReset.tsx
|
|
1238
|
+
var import_react27 = require("@emotion/react");
|
|
1239
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1240
|
+
var CSSReset = () => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1241
|
+
import_react27.Global,
|
|
1242
|
+
{
|
|
1243
|
+
styles: `
|
|
1244
|
+
html {
|
|
1245
|
+
line-height: 1.5;
|
|
1246
|
+
-webkit-text-size-adjust: 100%;
|
|
1247
|
+
font-family: system-ui, sans-serif;
|
|
1248
|
+
-webkit-font-smoothing: antialiased;
|
|
1249
|
+
text-rendering: optimizeLegibility;
|
|
1250
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1251
|
+
touch-action: manipulation;
|
|
1252
|
+
}
|
|
1253
|
+
body {
|
|
1254
|
+
position: relative;
|
|
1255
|
+
min-height: 100%;
|
|
1256
|
+
font-feature-settings: 'kern';
|
|
1257
|
+
}
|
|
1258
|
+
*,
|
|
1259
|
+
*::before,
|
|
1260
|
+
*::after {
|
|
1261
|
+
border-width: 0;
|
|
1262
|
+
border-style: solid;
|
|
1263
|
+
box-sizing: border-box;
|
|
1264
|
+
}
|
|
1265
|
+
main {
|
|
1266
|
+
display: block;
|
|
1267
|
+
}
|
|
1268
|
+
hr {
|
|
1269
|
+
border-top-width: 1px;
|
|
1270
|
+
box-sizing: content-box;
|
|
1271
|
+
height: 0;
|
|
1272
|
+
overflow: visible;
|
|
1273
|
+
}
|
|
1274
|
+
pre,
|
|
1275
|
+
code,
|
|
1276
|
+
kbd,
|
|
1277
|
+
samp {
|
|
1278
|
+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
1279
|
+
font-size: 1em;
|
|
1280
|
+
}
|
|
1281
|
+
a {
|
|
1282
|
+
background-color: transparent;
|
|
1283
|
+
color: inherit;
|
|
1284
|
+
text-decoration: inherit;
|
|
1285
|
+
}
|
|
1286
|
+
abbr[title] {
|
|
1287
|
+
border-bottom: none;
|
|
1288
|
+
text-decoration: underline;
|
|
1289
|
+
-webkit-text-decoration: underline dotted;
|
|
1290
|
+
text-decoration: underline dotted;
|
|
1291
|
+
}
|
|
1292
|
+
b,
|
|
1293
|
+
strong {
|
|
1294
|
+
font-weight: bold;
|
|
1295
|
+
}
|
|
1296
|
+
small {
|
|
1297
|
+
font-size: 80%;
|
|
1298
|
+
}
|
|
1299
|
+
sub,
|
|
1300
|
+
sup {
|
|
1301
|
+
font-size: 75%;
|
|
1302
|
+
line-height: 0;
|
|
1303
|
+
position: relative;
|
|
1304
|
+
vertical-align: baseline;
|
|
1305
|
+
}
|
|
1306
|
+
sub {
|
|
1307
|
+
bottom: -0.25em;
|
|
1308
|
+
}
|
|
1309
|
+
sup {
|
|
1310
|
+
top: -0.5em;
|
|
1311
|
+
}
|
|
1312
|
+
img {
|
|
1313
|
+
border-style: none;
|
|
1314
|
+
}
|
|
1315
|
+
button,
|
|
1316
|
+
input,
|
|
1317
|
+
optgroup,
|
|
1318
|
+
select,
|
|
1319
|
+
textarea {
|
|
1320
|
+
font-family: inherit;
|
|
1321
|
+
font-size: 100%;
|
|
1322
|
+
line-height: 1.15;
|
|
1323
|
+
margin: 0;
|
|
1324
|
+
}
|
|
1325
|
+
button,
|
|
1326
|
+
input {
|
|
1327
|
+
overflow: visible;
|
|
1328
|
+
}
|
|
1329
|
+
button,
|
|
1330
|
+
select {
|
|
1331
|
+
text-transform: none;
|
|
1332
|
+
}
|
|
1333
|
+
button::-moz-focus-inner,
|
|
1334
|
+
[type="button"]::-moz-focus-inner,
|
|
1335
|
+
[type="reset"]::-moz-focus-inner,
|
|
1336
|
+
[type="submit"]::-moz-focus-inner {
|
|
1337
|
+
border-style: none;
|
|
1338
|
+
padding: 0;
|
|
1339
|
+
}
|
|
1340
|
+
fieldset {
|
|
1341
|
+
padding: 0.35em 0.75em 0.625em;
|
|
1342
|
+
}
|
|
1343
|
+
legend {
|
|
1344
|
+
box-sizing: border-box;
|
|
1345
|
+
color: inherit;
|
|
1346
|
+
display: table;
|
|
1347
|
+
max-width: 100%;
|
|
1348
|
+
padding: 0;
|
|
1349
|
+
white-space: normal;
|
|
1350
|
+
}
|
|
1351
|
+
progress {
|
|
1352
|
+
vertical-align: baseline;
|
|
1353
|
+
}
|
|
1354
|
+
textarea {
|
|
1355
|
+
overflow: auto;
|
|
1356
|
+
}
|
|
1357
|
+
[type="checkbox"],
|
|
1358
|
+
[type="radio"] {
|
|
1359
|
+
box-sizing: border-box;
|
|
1360
|
+
padding: 0;
|
|
1361
|
+
}
|
|
1362
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
1363
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
1364
|
+
-webkit-appearance: none !important;
|
|
1365
|
+
}
|
|
1366
|
+
input[type="number"] {
|
|
1367
|
+
-moz-appearance: textfield;
|
|
1368
|
+
}
|
|
1369
|
+
[type="search"] {
|
|
1370
|
+
-webkit-appearance: textfield;
|
|
1371
|
+
outline-offset: -2px;
|
|
1372
|
+
}
|
|
1373
|
+
[type="search"]::-webkit-search-decoration {
|
|
1374
|
+
-webkit-appearance: none !important;
|
|
1375
|
+
}
|
|
1376
|
+
::-webkit-file-upload-button {
|
|
1377
|
+
-webkit-appearance: button;
|
|
1378
|
+
font: inherit;
|
|
1379
|
+
}
|
|
1380
|
+
details {
|
|
1381
|
+
display: block;
|
|
1382
|
+
}
|
|
1383
|
+
summary {
|
|
1384
|
+
display: list-item;
|
|
1385
|
+
}
|
|
1386
|
+
template {
|
|
1387
|
+
display: none;
|
|
1388
|
+
}
|
|
1389
|
+
[hidden] {
|
|
1390
|
+
display: none !important;
|
|
1391
|
+
}
|
|
1392
|
+
body,
|
|
1393
|
+
blockquote,
|
|
1394
|
+
dl,
|
|
1395
|
+
dd,
|
|
1396
|
+
h1,
|
|
1397
|
+
h2,
|
|
1398
|
+
h3,
|
|
1399
|
+
h4,
|
|
1400
|
+
h5,
|
|
1401
|
+
h6,
|
|
1402
|
+
hr,
|
|
1403
|
+
figure,
|
|
1404
|
+
p,
|
|
1405
|
+
pre {
|
|
1406
|
+
margin: 0;
|
|
1407
|
+
}
|
|
1408
|
+
button {
|
|
1409
|
+
background: transparent;
|
|
1410
|
+
padding: 0;
|
|
1411
|
+
}
|
|
1412
|
+
fieldset {
|
|
1413
|
+
margin: 0;
|
|
1414
|
+
padding: 0;
|
|
1415
|
+
}
|
|
1416
|
+
ol,
|
|
1417
|
+
ul {
|
|
1418
|
+
margin: 0;
|
|
1419
|
+
padding: 0;
|
|
1420
|
+
}
|
|
1421
|
+
textarea {
|
|
1422
|
+
resize: vertical;
|
|
1423
|
+
}
|
|
1424
|
+
button,
|
|
1425
|
+
[role="button"] {
|
|
1426
|
+
cursor: pointer;
|
|
1427
|
+
}
|
|
1428
|
+
button::-moz-focus-inner {
|
|
1429
|
+
border: 0 !important;
|
|
1430
|
+
}
|
|
1431
|
+
table {
|
|
1432
|
+
border-collapse: collapse;
|
|
1433
|
+
}
|
|
1434
|
+
h1,
|
|
1435
|
+
h2,
|
|
1436
|
+
h3,
|
|
1437
|
+
h4,
|
|
1438
|
+
h5,
|
|
1439
|
+
h6 {
|
|
1440
|
+
font-size: inherit;
|
|
1441
|
+
font-weight: inherit;
|
|
1442
|
+
}
|
|
1443
|
+
button,
|
|
1444
|
+
input,
|
|
1445
|
+
optgroup,
|
|
1446
|
+
select,
|
|
1447
|
+
textarea {
|
|
1448
|
+
padding: 0;
|
|
1449
|
+
line-height: inherit;
|
|
1450
|
+
color: inherit;
|
|
1451
|
+
}
|
|
1452
|
+
img,
|
|
1453
|
+
svg,
|
|
1454
|
+
video,
|
|
1455
|
+
canvas,
|
|
1456
|
+
audio,
|
|
1457
|
+
iframe,
|
|
1458
|
+
embed,
|
|
1459
|
+
object {
|
|
1460
|
+
display: block;
|
|
1461
|
+
}
|
|
1462
|
+
img,
|
|
1463
|
+
video {
|
|
1464
|
+
max-width: 100%;
|
|
1465
|
+
height: auto;
|
|
1466
|
+
}
|
|
1467
|
+
[data-js-focus-visible] :focus:not([data-focus-visible-added]) {
|
|
1468
|
+
outline: none;
|
|
1469
|
+
box-shadow: none;
|
|
1470
|
+
}
|
|
1471
|
+
select::-ms-expand {
|
|
1472
|
+
display: none;
|
|
1473
|
+
}
|
|
1474
|
+
input {
|
|
1475
|
+
border-width: revert;
|
|
1476
|
+
border-color: revert;
|
|
1477
|
+
border-style: revert;
|
|
1478
|
+
}
|
|
1479
|
+
.array-item > hr {
|
|
1480
|
+
margin-top: 16px;
|
|
1481
|
+
margin-bottom: 16px;
|
|
1482
|
+
}
|
|
1483
|
+
`
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1486
|
+
var CssReset_default = CSSReset;
|
|
1487
|
+
|
|
1488
|
+
// src/ChakraFrameProvider.tsx
|
|
1489
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1490
|
+
var memoizedCreateCacheWithContainer = (0, import_weak_memoize.default)((container) => {
|
|
1491
|
+
const newCache = (0, import_cache.default)({ container, key: "rjsf" });
|
|
1492
|
+
return newCache;
|
|
1493
|
+
});
|
|
1494
|
+
var __createChakraFrameProvider = (props) => ({ document }) => {
|
|
1495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { margin: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react28.CacheProvider, { value: memoizedCreateCacheWithContainer(document.head), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react29.ChakraProvider, { resetCSS: false, children: [
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CssReset_default, {}),
|
|
1497
|
+
props.children
|
|
1498
|
+
] }) }) });
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
// src/index.ts
|
|
1502
|
+
var src_default = Form_default;
|
|
1503
|
+
//# sourceMappingURL=index.js.map
|