@rjsf/antd 6.0.0-alpha.0 → 6.0.0-beta.2
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/antd.esm.js +116 -144
- package/dist/antd.esm.js.map +4 -4
- package/dist/antd.umd.js +32 -72
- package/dist/index.js +215 -249
- package/dist/index.js.map +4 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/lib/templates/ArrayFieldItemTemplate/index.d.ts +3 -3
- package/lib/templates/ArrayFieldItemTemplate/index.js +7 -5
- package/lib/templates/ArrayFieldItemTemplate/index.js.map +1 -1
- package/lib/templates/ArrayFieldTemplate/index.d.ts +1 -1
- package/lib/templates/ArrayFieldTemplate/index.js +4 -6
- package/lib/templates/ArrayFieldTemplate/index.js.map +1 -1
- package/lib/templates/DescriptionField/index.js +3 -2
- package/lib/templates/DescriptionField/index.js.map +1 -1
- package/lib/templates/FieldErrorTemplate/index.js.map +1 -1
- package/lib/templates/FieldTemplate/index.js +1 -1
- package/lib/templates/FieldTemplate/index.js.map +1 -1
- package/lib/templates/GridTemplate/index.d.ts +7 -0
- package/lib/templates/GridTemplate/index.js +15 -0
- package/lib/templates/GridTemplate/index.js.map +1 -0
- package/lib/templates/IconButton/index.d.ts +1 -1
- package/lib/templates/ObjectFieldTemplate/index.js +6 -8
- package/lib/templates/ObjectFieldTemplate/index.js.map +1 -1
- package/lib/templates/SubmitButton/index.js.map +1 -1
- package/lib/templates/TitleField/index.js.map +1 -1
- package/lib/templates/WrapIfAdditionalTemplate/index.js +2 -2
- package/lib/templates/WrapIfAdditionalTemplate/index.js.map +1 -1
- package/lib/templates/index.js +14 -12
- package/lib/templates/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/widgets/AltDateTimeWidget/index.js +1 -1
- package/lib/widgets/AltDateWidget/index.js.map +1 -1
- package/lib/widgets/RadioWidget/index.js +1 -1
- package/lib/widgets/RadioWidget/index.js.map +1 -1
- package/lib/widgets/SelectWidget/index.js +1 -1
- package/lib/widgets/SelectWidget/index.js.map +1 -1
- package/lib/widgets/index.js +11 -11
- package/package.json +46 -41
- package/src/index.ts +2 -2
- package/src/templates/ArrayFieldItemTemplate/index.tsx +22 -60
- package/src/templates/ArrayFieldTemplate/index.tsx +11 -9
- package/src/templates/BaseInputTemplate/index.tsx +1 -1
- package/src/templates/DescriptionField/index.tsx +8 -3
- package/src/templates/FieldErrorTemplate/index.tsx +1 -1
- package/src/templates/FieldTemplate/index.tsx +3 -3
- package/src/templates/GridTemplate/index.tsx +15 -0
- package/src/templates/IconButton/index.tsx +9 -9
- package/src/templates/ObjectFieldTemplate/index.tsx +6 -4
- package/src/templates/SubmitButton/index.tsx +1 -1
- package/src/templates/WrapIfAdditionalTemplate/index.tsx +4 -2
- package/src/templates/index.ts +3 -1
- package/src/tsconfig.json +3 -1
- package/src/widgets/AltDateTimeWidget/index.tsx +1 -1
- package/src/widgets/AltDateWidget/index.tsx +2 -2
- package/src/widgets/CheckboxWidget/index.tsx +1 -1
- package/src/widgets/CheckboxesWidget/index.tsx +1 -1
- package/src/widgets/DateTimeWidget/index.tsx +1 -1
- package/src/widgets/DateWidget/index.tsx +1 -1
- package/src/widgets/PasswordWidget/index.tsx +1 -1
- package/src/widgets/RadioWidget/index.tsx +1 -1
- package/src/widgets/RangeWidget/index.tsx +1 -1
- package/src/widgets/SelectWidget/index.tsx +1 -1
- package/src/widgets/TextareaWidget/index.tsx +1 -1
- package/src/widgets/index.ts +1 -1
- package/LICENSE.md +0 -201
- package/src/index.less +0 -38
package/dist/index.js
CHANGED
|
@@ -28,23 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
Form: () => Form3,
|
|
34
34
|
Templates: () => templates_default,
|
|
35
35
|
Theme: () => Theme,
|
|
36
36
|
Widgets: () => widgets_default,
|
|
37
|
-
default: () =>
|
|
37
|
+
default: () => index_default,
|
|
38
38
|
generateForm: () => generateForm,
|
|
39
39
|
generateTemplates: () => generateTemplates,
|
|
40
40
|
generateTheme: () => generateTheme,
|
|
41
41
|
generateWidgets: () => generateWidgets
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
44
|
-
var
|
|
43
|
+
module.exports = __toCommonJS(index_exports);
|
|
44
|
+
var import_core2 = require("@rjsf/core");
|
|
45
45
|
|
|
46
46
|
// src/templates/ArrayFieldItemTemplate/index.tsx
|
|
47
47
|
var import_antd = require("antd");
|
|
48
|
+
var import_utils = require("@rjsf/utils");
|
|
48
49
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
50
|
var BTN_GRP_STYLE = {
|
|
50
51
|
width: "100%"
|
|
@@ -53,74 +54,23 @@ var BTN_STYLE = {
|
|
|
53
54
|
width: "calc(100% / 4)"
|
|
54
55
|
};
|
|
55
56
|
function ArrayFieldItemTemplate(props) {
|
|
56
|
-
const {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
hasMoveDown,
|
|
61
|
-
hasMoveUp,
|
|
62
|
-
hasRemove,
|
|
63
|
-
hasToolbar,
|
|
64
|
-
index,
|
|
65
|
-
onCopyIndexClick,
|
|
66
|
-
onDropIndexClick,
|
|
67
|
-
onReorderClick,
|
|
68
|
-
readonly,
|
|
57
|
+
const { children, buttonsProps, hasToolbar, index, registry, uiSchema } = props;
|
|
58
|
+
const uiOptions = (0, import_utils.getUiOptions)(uiSchema);
|
|
59
|
+
const ArrayFieldItemButtonsTemplate = (0, import_utils.getTemplate)(
|
|
60
|
+
"ArrayFieldItemButtonsTemplate",
|
|
69
61
|
registry,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
|
|
62
|
+
uiOptions
|
|
63
|
+
);
|
|
73
64
|
const { rowGutter = 24, toolbarAlign = "top" } = registry.formContext;
|
|
74
65
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Row, { align: toolbarAlign, gutter: rowGutter, children: [
|
|
75
66
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Col, { flex: "1", children }),
|
|
76
|
-
hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime.
|
|
77
|
-
|
|
78
|
-
MoveUpButton2,
|
|
79
|
-
{
|
|
80
|
-
disabled: disabled || readonly || !hasMoveUp,
|
|
81
|
-
onClick: onReorderClick(index, index - 1),
|
|
82
|
-
style: BTN_STYLE,
|
|
83
|
-
uiSchema,
|
|
84
|
-
registry
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
MoveDownButton2,
|
|
89
|
-
{
|
|
90
|
-
disabled: disabled || readonly || !hasMoveDown,
|
|
91
|
-
onClick: onReorderClick(index, index + 1),
|
|
92
|
-
style: BTN_STYLE,
|
|
93
|
-
uiSchema,
|
|
94
|
-
registry
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
hasCopy && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
CopyButton2,
|
|
99
|
-
{
|
|
100
|
-
disabled: disabled || readonly,
|
|
101
|
-
onClick: onCopyIndexClick(index),
|
|
102
|
-
style: BTN_STYLE,
|
|
103
|
-
uiSchema,
|
|
104
|
-
registry
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
hasRemove && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
-
RemoveButton2,
|
|
109
|
-
{
|
|
110
|
-
disabled: disabled || readonly,
|
|
111
|
-
onClick: onDropIndexClick(index),
|
|
112
|
-
style: BTN_STYLE,
|
|
113
|
-
uiSchema,
|
|
114
|
-
registry
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
] }) })
|
|
118
|
-
] }, `array-item-${index}`);
|
|
67
|
+
hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space.Compact, { style: BTN_GRP_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrayFieldItemButtonsTemplate, { ...buttonsProps, style: BTN_STYLE }) }) })
|
|
68
|
+
] }, `rjsf-array-item-${index}`);
|
|
119
69
|
}
|
|
120
70
|
|
|
121
71
|
// src/templates/ArrayFieldTemplate/index.tsx
|
|
122
|
-
var
|
|
123
|
-
var import_classnames = __toESM(require("classnames"));
|
|
72
|
+
var import_utils2 = require("@rjsf/utils");
|
|
73
|
+
var import_classnames = __toESM(require("classnames"), 1);
|
|
124
74
|
var import_antd2 = require("antd");
|
|
125
75
|
var import_react = require("react");
|
|
126
76
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -143,18 +93,18 @@ function ArrayFieldTemplate(props) {
|
|
|
143
93
|
title,
|
|
144
94
|
uiSchema
|
|
145
95
|
} = props;
|
|
146
|
-
const uiOptions = (0,
|
|
147
|
-
const ArrayFieldDescriptionTemplate = (0,
|
|
96
|
+
const uiOptions = (0, import_utils2.getUiOptions)(uiSchema);
|
|
97
|
+
const ArrayFieldDescriptionTemplate = (0, import_utils2.getTemplate)(
|
|
148
98
|
"ArrayFieldDescriptionTemplate",
|
|
149
99
|
registry,
|
|
150
100
|
uiOptions
|
|
151
101
|
);
|
|
152
|
-
const ArrayFieldItemTemplate2 = (0,
|
|
102
|
+
const ArrayFieldItemTemplate2 = (0, import_utils2.getTemplate)(
|
|
153
103
|
"ArrayFieldItemTemplate",
|
|
154
104
|
registry,
|
|
155
105
|
uiOptions
|
|
156
106
|
);
|
|
157
|
-
const ArrayFieldTitleTemplate = (0,
|
|
107
|
+
const ArrayFieldTitleTemplate = (0, import_utils2.getTemplate)(
|
|
158
108
|
"ArrayFieldTitleTemplate",
|
|
159
109
|
registry,
|
|
160
110
|
uiOptions
|
|
@@ -197,7 +147,8 @@ function ArrayFieldTemplate(props) {
|
|
|
197
147
|
canAdd && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Row, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
198
148
|
AddButton2,
|
|
199
149
|
{
|
|
200
|
-
|
|
150
|
+
id: (0, import_utils2.buttonId)(idSchema, "add"),
|
|
151
|
+
className: "rjsf-array-item-add",
|
|
201
152
|
disabled: disabled || readonly,
|
|
202
153
|
onClick: onAddClick,
|
|
203
154
|
uiSchema,
|
|
@@ -209,7 +160,7 @@ function ArrayFieldTemplate(props) {
|
|
|
209
160
|
|
|
210
161
|
// src/templates/BaseInputTemplate/index.tsx
|
|
211
162
|
var import_antd3 = require("antd");
|
|
212
|
-
var
|
|
163
|
+
var import_utils3 = require("@rjsf/utils");
|
|
213
164
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
214
165
|
var INPUT_STYLE = {
|
|
215
166
|
width: "100%"
|
|
@@ -230,7 +181,7 @@ function BaseInputTemplate(props) {
|
|
|
230
181
|
value,
|
|
231
182
|
type
|
|
232
183
|
} = props;
|
|
233
|
-
const inputProps = (0,
|
|
184
|
+
const inputProps = (0, import_utils3.getInputProps)(schema, type, options, false);
|
|
234
185
|
const { readonlyAsDisabled = true } = formContext;
|
|
235
186
|
const handleNumberChange = (nextValue) => onChange(nextValue);
|
|
236
187
|
const handleTextChange = onChangeOverride ? onChangeOverride : ({ target }) => onChange(target.value === "" ? options.emptyValue : target.value);
|
|
@@ -247,10 +198,10 @@ function BaseInputTemplate(props) {
|
|
|
247
198
|
onFocus: !readonly ? handleFocus : void 0,
|
|
248
199
|
placeholder,
|
|
249
200
|
style: INPUT_STYLE,
|
|
250
|
-
list: schema.examples ? (0,
|
|
201
|
+
list: schema.examples ? (0, import_utils3.examplesId)(id) : void 0,
|
|
251
202
|
...inputProps,
|
|
252
203
|
value,
|
|
253
|
-
"aria-describedby": (0,
|
|
204
|
+
"aria-describedby": (0, import_utils3.ariaDescribedByIds)(id, !!schema.examples)
|
|
254
205
|
}
|
|
255
206
|
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
256
207
|
import_antd3.Input,
|
|
@@ -263,34 +214,35 @@ function BaseInputTemplate(props) {
|
|
|
263
214
|
onFocus: !readonly ? handleFocus : void 0,
|
|
264
215
|
placeholder,
|
|
265
216
|
style: INPUT_STYLE,
|
|
266
|
-
list: schema.examples ? (0,
|
|
217
|
+
list: schema.examples ? (0, import_utils3.examplesId)(id) : void 0,
|
|
267
218
|
...inputProps,
|
|
268
219
|
value,
|
|
269
|
-
"aria-describedby": (0,
|
|
220
|
+
"aria-describedby": (0, import_utils3.ariaDescribedByIds)(id, !!schema.examples)
|
|
270
221
|
}
|
|
271
222
|
);
|
|
272
223
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
273
224
|
input,
|
|
274
|
-
Array.isArray(schema.examples) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("datalist", { id: (0,
|
|
225
|
+
Array.isArray(schema.examples) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("datalist", { id: (0, import_utils3.examplesId)(id), children: schema.examples.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : []).map((example) => {
|
|
275
226
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: example }, example);
|
|
276
227
|
}) })
|
|
277
228
|
] });
|
|
278
229
|
}
|
|
279
230
|
|
|
280
231
|
// src/templates/DescriptionField/index.tsx
|
|
232
|
+
var import_core = require("@rjsf/core");
|
|
281
233
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
282
234
|
function DescriptionField(props) {
|
|
283
|
-
const { id, description } = props;
|
|
235
|
+
const { id, description, registry, uiSchema } = props;
|
|
284
236
|
if (!description) {
|
|
285
237
|
return null;
|
|
286
238
|
}
|
|
287
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { id, children: description });
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { id, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core.RichDescription, { description, registry, uiSchema }) });
|
|
288
240
|
}
|
|
289
241
|
|
|
290
242
|
// src/templates/ErrorList/index.tsx
|
|
291
243
|
var import_antd4 = require("antd");
|
|
292
|
-
var import_ExclamationCircleOutlined = __toESM(require("@ant-design/icons/ExclamationCircleOutlined"));
|
|
293
|
-
var
|
|
244
|
+
var import_ExclamationCircleOutlined = __toESM(require("@ant-design/icons/ExclamationCircleOutlined"), 1);
|
|
245
|
+
var import_utils4 = require("@rjsf/utils");
|
|
294
246
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
295
247
|
function ErrorList({
|
|
296
248
|
errors,
|
|
@@ -306,7 +258,7 @@ function ErrorList({
|
|
|
306
258
|
{
|
|
307
259
|
className: "panel panel-danger errors",
|
|
308
260
|
description: renderErrors(),
|
|
309
|
-
message: translateString(
|
|
261
|
+
message: translateString(import_utils4.TranslatableString.ErrorsLabel),
|
|
310
262
|
type: "error"
|
|
311
263
|
}
|
|
312
264
|
);
|
|
@@ -314,12 +266,12 @@ function ErrorList({
|
|
|
314
266
|
|
|
315
267
|
// src/templates/IconButton/index.tsx
|
|
316
268
|
var import_antd5 = require("antd");
|
|
317
|
-
var import_ArrowDownOutlined = __toESM(require("@ant-design/icons/ArrowDownOutlined"));
|
|
318
|
-
var import_ArrowUpOutlined = __toESM(require("@ant-design/icons/ArrowUpOutlined"));
|
|
319
|
-
var import_CopyOutlined = __toESM(require("@ant-design/icons/CopyOutlined"));
|
|
320
|
-
var import_DeleteOutlined = __toESM(require("@ant-design/icons/DeleteOutlined"));
|
|
321
|
-
var import_PlusCircleOutlined = __toESM(require("@ant-design/icons/PlusCircleOutlined"));
|
|
322
|
-
var
|
|
269
|
+
var import_ArrowDownOutlined = __toESM(require("@ant-design/icons/ArrowDownOutlined"), 1);
|
|
270
|
+
var import_ArrowUpOutlined = __toESM(require("@ant-design/icons/ArrowUpOutlined"), 1);
|
|
271
|
+
var import_CopyOutlined = __toESM(require("@ant-design/icons/CopyOutlined"), 1);
|
|
272
|
+
var import_DeleteOutlined = __toESM(require("@ant-design/icons/DeleteOutlined"), 1);
|
|
273
|
+
var import_PlusCircleOutlined = __toESM(require("@ant-design/icons/PlusCircleOutlined"), 1);
|
|
274
|
+
var import_utils5 = require("@rjsf/utils");
|
|
323
275
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
324
276
|
function IconButton(props) {
|
|
325
277
|
const { iconType = "default", icon, onClick, uiSchema, registry, ...otherProps } = props;
|
|
@@ -340,7 +292,7 @@ function AddButton(props) {
|
|
|
340
292
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
341
293
|
IconButton,
|
|
342
294
|
{
|
|
343
|
-
title: translateString(
|
|
295
|
+
title: translateString(import_utils5.TranslatableString.AddItemButton),
|
|
344
296
|
...props,
|
|
345
297
|
block: true,
|
|
346
298
|
iconType: "primary",
|
|
@@ -352,29 +304,29 @@ function CopyButton(props) {
|
|
|
352
304
|
const {
|
|
353
305
|
registry: { translateString }
|
|
354
306
|
} = props;
|
|
355
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(
|
|
307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(import_utils5.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CopyOutlined.default, {}) });
|
|
356
308
|
}
|
|
357
309
|
function MoveDownButton(props) {
|
|
358
310
|
const {
|
|
359
311
|
registry: { translateString }
|
|
360
312
|
} = props;
|
|
361
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(
|
|
313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(import_utils5.TranslatableString.MoveDownButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ArrowDownOutlined.default, {}) });
|
|
362
314
|
}
|
|
363
315
|
function MoveUpButton(props) {
|
|
364
316
|
const {
|
|
365
317
|
registry: { translateString }
|
|
366
318
|
} = props;
|
|
367
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(
|
|
319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { title: translateString(import_utils5.TranslatableString.MoveUpButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ArrowUpOutlined.default, {}) });
|
|
368
320
|
}
|
|
369
321
|
function RemoveButton(props) {
|
|
370
|
-
const options = (0,
|
|
322
|
+
const options = (0, import_utils5.getUiOptions)(props.uiSchema);
|
|
371
323
|
const {
|
|
372
324
|
registry: { translateString }
|
|
373
325
|
} = props;
|
|
374
326
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
375
327
|
IconButton,
|
|
376
328
|
{
|
|
377
|
-
title: translateString(
|
|
329
|
+
title: translateString(import_utils5.TranslatableString.RemoveButton),
|
|
378
330
|
...props,
|
|
379
331
|
danger: true,
|
|
380
332
|
block: !!options.block,
|
|
@@ -385,20 +337,20 @@ function RemoveButton(props) {
|
|
|
385
337
|
}
|
|
386
338
|
|
|
387
339
|
// src/templates/FieldErrorTemplate/index.tsx
|
|
388
|
-
var
|
|
340
|
+
var import_utils6 = require("@rjsf/utils");
|
|
389
341
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
390
342
|
function FieldErrorTemplate(props) {
|
|
391
343
|
const { errors = [], idSchema } = props;
|
|
392
344
|
if (errors.length === 0) {
|
|
393
345
|
return null;
|
|
394
346
|
}
|
|
395
|
-
const id = (0,
|
|
347
|
+
const id = (0, import_utils6.errorId)(idSchema);
|
|
396
348
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, children: errors.map((error) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: error }, `field-${id}-error-${error}`)) });
|
|
397
349
|
}
|
|
398
350
|
|
|
399
351
|
// src/templates/FieldTemplate/index.tsx
|
|
400
352
|
var import_antd6 = require("antd");
|
|
401
|
-
var
|
|
353
|
+
var import_utils7 = require("@rjsf/utils");
|
|
402
354
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
403
355
|
var VERTICAL_LABEL_COL = { span: 24 };
|
|
404
356
|
var VERTICAL_WRAPPER_COL = { span: 24 };
|
|
@@ -434,14 +386,14 @@ function FieldTemplate(props) {
|
|
|
434
386
|
wrapperStyle,
|
|
435
387
|
descriptionLocation = "below"
|
|
436
388
|
} = formContext;
|
|
437
|
-
const uiOptions = (0,
|
|
438
|
-
const WrapIfAdditionalTemplate2 = (0,
|
|
389
|
+
const uiOptions = (0, import_utils7.getUiOptions)(uiSchema);
|
|
390
|
+
const WrapIfAdditionalTemplate2 = (0, import_utils7.getTemplate)(
|
|
439
391
|
"WrapIfAdditionalTemplate",
|
|
440
392
|
registry,
|
|
441
393
|
uiOptions
|
|
442
394
|
);
|
|
443
395
|
if (hidden) {
|
|
444
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "field-hidden", children });
|
|
396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rjsf-field-hidden", children });
|
|
445
397
|
}
|
|
446
398
|
const descriptionNode = rawDescription ? description : void 0;
|
|
447
399
|
const descriptionProps = {};
|
|
@@ -490,15 +442,26 @@ function FieldTemplate(props) {
|
|
|
490
442
|
);
|
|
491
443
|
}
|
|
492
444
|
|
|
493
|
-
// src/templates/
|
|
494
|
-
var import_classnames2 = __toESM(require("classnames"));
|
|
495
|
-
var import_isObject = __toESM(require("lodash/isObject"));
|
|
496
|
-
var import_isNumber = __toESM(require("lodash/isNumber"));
|
|
497
|
-
var import_isString = __toESM(require("lodash/isString"));
|
|
498
|
-
var import_utils7 = require("@rjsf/utils");
|
|
445
|
+
// src/templates/GridTemplate/index.tsx
|
|
499
446
|
var import_antd7 = require("antd");
|
|
500
|
-
var import_react2 = require("react");
|
|
501
447
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
448
|
+
function GridTemplate(props) {
|
|
449
|
+
const { children, column, ...rest } = props;
|
|
450
|
+
if (column) {
|
|
451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd7.Col, { ...rest, children });
|
|
452
|
+
}
|
|
453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd7.Row, { ...rest, children });
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// src/templates/ObjectFieldTemplate/index.tsx
|
|
457
|
+
var import_classnames2 = __toESM(require("classnames"), 1);
|
|
458
|
+
var import_isObject = __toESM(require("lodash/isObject"), 1);
|
|
459
|
+
var import_isNumber = __toESM(require("lodash/isNumber"), 1);
|
|
460
|
+
var import_isString = __toESM(require("lodash/isString"), 1);
|
|
461
|
+
var import_utils8 = require("@rjsf/utils");
|
|
462
|
+
var import_antd8 = require("antd");
|
|
463
|
+
var import_react2 = require("react");
|
|
464
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
502
465
|
var DESCRIPTION_COL_STYLE2 = {
|
|
503
466
|
paddingBottom: "8px"
|
|
504
467
|
};
|
|
@@ -518,9 +481,9 @@ function ObjectFieldTemplate(props) {
|
|
|
518
481
|
title,
|
|
519
482
|
uiSchema
|
|
520
483
|
} = props;
|
|
521
|
-
const uiOptions = (0,
|
|
522
|
-
const TitleFieldTemplate = (0,
|
|
523
|
-
const DescriptionFieldTemplate = (0,
|
|
484
|
+
const uiOptions = (0, import_utils8.getUiOptions)(uiSchema);
|
|
485
|
+
const TitleFieldTemplate = (0, import_utils8.getTemplate)("TitleFieldTemplate", registry, uiOptions);
|
|
486
|
+
const DescriptionFieldTemplate = (0, import_utils8.getTemplate)(
|
|
524
487
|
"DescriptionFieldTemplate",
|
|
525
488
|
registry,
|
|
526
489
|
uiOptions
|
|
@@ -532,8 +495,8 @@ function ObjectFieldTemplate(props) {
|
|
|
532
495
|
const findSchema = (element) => element.content.props.schema;
|
|
533
496
|
const findSchemaType = (element) => findSchema(element).type;
|
|
534
497
|
const findUiSchema = (element) => element.content.props.uiSchema;
|
|
535
|
-
const findUiSchemaField = (element) => (0,
|
|
536
|
-
const findUiSchemaWidget = (element) => (0,
|
|
498
|
+
const findUiSchemaField = (element) => (0, import_utils8.getUiOptions)(findUiSchema(element)).field;
|
|
499
|
+
const findUiSchemaWidget = (element) => (0, import_utils8.getUiOptions)(findUiSchema(element)).widget;
|
|
537
500
|
const calculateColSpan = (element) => {
|
|
538
501
|
const type = findSchemaType(element);
|
|
539
502
|
const field = findUiSchemaField(element);
|
|
@@ -557,7 +520,7 @@ function ObjectFieldTemplate(props) {
|
|
|
557
520
|
}
|
|
558
521
|
return defaultColSpan;
|
|
559
522
|
};
|
|
560
|
-
const { getPrefixCls } = (0, import_react2.useContext)(
|
|
523
|
+
const { getPrefixCls } = (0, import_react2.useContext)(import_antd8.ConfigProvider.ConfigContext);
|
|
561
524
|
const prefixCls = getPrefixCls("form");
|
|
562
525
|
const labelClsBasic = `${prefixCls}-item-label`;
|
|
563
526
|
const labelColClassName = (0, import_classnames2.default)(
|
|
@@ -565,12 +528,12 @@ function ObjectFieldTemplate(props) {
|
|
|
565
528
|
labelAlign === "left" && `${labelClsBasic}-left`
|
|
566
529
|
// labelCol.className,
|
|
567
530
|
);
|
|
568
|
-
return /* @__PURE__ */ (0,
|
|
569
|
-
/* @__PURE__ */ (0,
|
|
570
|
-
title && /* @__PURE__ */ (0,
|
|
531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("fieldset", { id: idSchema.$id, children: [
|
|
532
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_antd8.Row, { gutter: rowGutter, children: [
|
|
533
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { className: labelColClassName, span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
571
534
|
TitleFieldTemplate,
|
|
572
535
|
{
|
|
573
|
-
id: (0,
|
|
536
|
+
id: (0, import_utils8.titleId)(idSchema),
|
|
574
537
|
title,
|
|
575
538
|
required,
|
|
576
539
|
schema,
|
|
@@ -578,22 +541,23 @@ function ObjectFieldTemplate(props) {
|
|
|
578
541
|
registry
|
|
579
542
|
}
|
|
580
543
|
) }),
|
|
581
|
-
description && /* @__PURE__ */ (0,
|
|
544
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: 24, style: DESCRIPTION_COL_STYLE2, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
582
545
|
DescriptionFieldTemplate,
|
|
583
546
|
{
|
|
584
|
-
id: (0,
|
|
547
|
+
id: (0, import_utils8.descriptionId)(idSchema),
|
|
585
548
|
description,
|
|
586
549
|
schema,
|
|
587
550
|
uiSchema,
|
|
588
551
|
registry
|
|
589
552
|
}
|
|
590
553
|
) }),
|
|
591
|
-
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0,
|
|
554
|
+
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: calculateColSpan(element), children: element.content }, element.name))
|
|
592
555
|
] }),
|
|
593
|
-
(0,
|
|
556
|
+
(0, import_utils8.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Row, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
594
557
|
AddButton2,
|
|
595
558
|
{
|
|
596
|
-
|
|
559
|
+
id: (0, import_utils8.buttonId)(idSchema, "add"),
|
|
560
|
+
className: "rjsf-object-property-expand",
|
|
597
561
|
disabled: disabled || readonly,
|
|
598
562
|
onClick: onAddClick(schema),
|
|
599
563
|
uiSchema,
|
|
@@ -604,22 +568,22 @@ function ObjectFieldTemplate(props) {
|
|
|
604
568
|
}
|
|
605
569
|
|
|
606
570
|
// src/templates/SubmitButton/index.tsx
|
|
607
|
-
var
|
|
608
|
-
var
|
|
609
|
-
var
|
|
571
|
+
var import_antd9 = require("antd");
|
|
572
|
+
var import_utils9 = require("@rjsf/utils");
|
|
573
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
610
574
|
function SubmitButton({ uiSchema }) {
|
|
611
|
-
const { submitText, norender, props: submitButtonProps } = (0,
|
|
575
|
+
const { submitText, norender, props: submitButtonProps } = (0, import_utils9.getSubmitButtonOptions)(uiSchema);
|
|
612
576
|
if (norender) {
|
|
613
577
|
return null;
|
|
614
578
|
}
|
|
615
|
-
return /* @__PURE__ */ (0,
|
|
579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd9.Button, { type: "submit", ...submitButtonProps, htmlType: "submit", children: submitText });
|
|
616
580
|
}
|
|
617
581
|
|
|
618
582
|
// src/templates/TitleField/index.tsx
|
|
619
|
-
var import_classnames3 = __toESM(require("classnames"));
|
|
620
|
-
var
|
|
583
|
+
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
584
|
+
var import_antd10 = require("antd");
|
|
621
585
|
var import_react3 = require("react");
|
|
622
|
-
var
|
|
586
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
623
587
|
function TitleField({
|
|
624
588
|
id,
|
|
625
589
|
required,
|
|
@@ -641,13 +605,13 @@ function TitleField({
|
|
|
641
605
|
control.focus();
|
|
642
606
|
}
|
|
643
607
|
};
|
|
644
|
-
const { getPrefixCls } = (0, import_react3.useContext)(
|
|
608
|
+
const { getPrefixCls } = (0, import_react3.useContext)(import_antd10.ConfigProvider.ConfigContext);
|
|
645
609
|
const prefixCls = getPrefixCls("form");
|
|
646
610
|
const labelClassName = (0, import_classnames3.default)({
|
|
647
611
|
[`${prefixCls}-item-required`]: required,
|
|
648
612
|
[`${prefixCls}-item-no-colon`]: !colon
|
|
649
613
|
});
|
|
650
|
-
return title ? /* @__PURE__ */ (0,
|
|
614
|
+
return title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
651
615
|
"label",
|
|
652
616
|
{
|
|
653
617
|
className: labelClassName,
|
|
@@ -660,9 +624,9 @@ function TitleField({
|
|
|
660
624
|
}
|
|
661
625
|
|
|
662
626
|
// src/templates/WrapIfAdditionalTemplate/index.tsx
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
627
|
+
var import_antd11 = require("antd");
|
|
628
|
+
var import_utils10 = require("@rjsf/utils");
|
|
629
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
666
630
|
var VERTICAL_LABEL_COL2 = { span: 24 };
|
|
667
631
|
var VERTICAL_WRAPPER_COL2 = { span: 24 };
|
|
668
632
|
var INPUT_STYLE2 = {
|
|
@@ -695,20 +659,20 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
695
659
|
} = registry.formContext;
|
|
696
660
|
const { templates, translateString } = registry;
|
|
697
661
|
const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
|
|
698
|
-
const keyLabel = translateString(
|
|
699
|
-
const additional =
|
|
662
|
+
const keyLabel = translateString(import_utils10.TranslatableString.KeyLabel, [label]);
|
|
663
|
+
const additional = import_utils10.ADDITIONAL_PROPERTY_FLAG in schema;
|
|
700
664
|
if (!additional) {
|
|
701
|
-
return /* @__PURE__ */ (0,
|
|
665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: classNames4, style, children });
|
|
702
666
|
}
|
|
703
667
|
const handleBlur = ({ target }) => onKeyChange(target && target.value);
|
|
704
|
-
const uiOptions = uiSchema ? uiSchema[
|
|
668
|
+
const uiOptions = uiSchema ? uiSchema[import_utils10.UI_OPTIONS_KEY] : {};
|
|
705
669
|
const buttonUiOptions = {
|
|
706
670
|
...uiSchema,
|
|
707
|
-
[
|
|
671
|
+
[import_utils10.UI_OPTIONS_KEY]: { ...uiOptions, block: true }
|
|
708
672
|
};
|
|
709
|
-
return /* @__PURE__ */ (0,
|
|
710
|
-
/* @__PURE__ */ (0,
|
|
711
|
-
|
|
673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: classNames4, style, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_antd11.Row, { align: toolbarAlign, gutter: rowGutter, children: [
|
|
674
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
675
|
+
import_antd11.Form.Item,
|
|
712
676
|
{
|
|
713
677
|
colon,
|
|
714
678
|
className: "form-group",
|
|
@@ -719,8 +683,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
719
683
|
required,
|
|
720
684
|
style: wrapperStyle,
|
|
721
685
|
wrapperCol,
|
|
722
|
-
children: /* @__PURE__ */ (0,
|
|
723
|
-
|
|
686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
687
|
+
import_antd11.Input,
|
|
724
688
|
{
|
|
725
689
|
className: "form-control",
|
|
726
690
|
defaultValue: label,
|
|
@@ -734,11 +698,12 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
734
698
|
)
|
|
735
699
|
}
|
|
736
700
|
) }) }),
|
|
737
|
-
/* @__PURE__ */ (0,
|
|
738
|
-
/* @__PURE__ */ (0,
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children }),
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
739
703
|
RemoveButton2,
|
|
740
704
|
{
|
|
741
|
-
|
|
705
|
+
id: (0, import_utils10.buttonId)(id, "remove"),
|
|
706
|
+
className: "rjsf-object-property-remove",
|
|
742
707
|
disabled: disabled || readonly,
|
|
743
708
|
onClick: onDropPropertyClick(label),
|
|
744
709
|
uiSchema: buttonUiOptions,
|
|
@@ -766,6 +731,7 @@ function generateTemplates() {
|
|
|
766
731
|
ErrorListTemplate: ErrorList,
|
|
767
732
|
FieldErrorTemplate,
|
|
768
733
|
FieldTemplate,
|
|
734
|
+
GridTemplate,
|
|
769
735
|
ObjectFieldTemplate,
|
|
770
736
|
TitleFieldTemplate: TitleField,
|
|
771
737
|
WrapIfAdditionalTemplate
|
|
@@ -775,9 +741,9 @@ var templates_default = generateTemplates();
|
|
|
775
741
|
|
|
776
742
|
// src/widgets/AltDateWidget/index.tsx
|
|
777
743
|
var import_react4 = require("react");
|
|
778
|
-
var
|
|
779
|
-
var
|
|
780
|
-
var
|
|
744
|
+
var import_antd12 = require("antd");
|
|
745
|
+
var import_utils11 = require("@rjsf/utils");
|
|
746
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
781
747
|
var readyForChange = (state) => {
|
|
782
748
|
return Object.values(state).every((value) => value !== -1);
|
|
783
749
|
};
|
|
@@ -799,9 +765,9 @@ function AltDateWidget(props) {
|
|
|
799
765
|
const { translateString, widgets } = registry;
|
|
800
766
|
const { SelectWidget: SelectWidget2 } = widgets;
|
|
801
767
|
const { rowGutter = 24 } = formContext;
|
|
802
|
-
const [state, setState] = (0, import_react4.useState)((0,
|
|
768
|
+
const [state, setState] = (0, import_react4.useState)((0, import_utils11.parseDateString)(value, showTime));
|
|
803
769
|
(0, import_react4.useEffect)(() => {
|
|
804
|
-
setState((0,
|
|
770
|
+
setState((0, import_utils11.parseDateString)(value, showTime));
|
|
805
771
|
}, [showTime, value]);
|
|
806
772
|
const handleChange = (property, nextValue) => {
|
|
807
773
|
const nextState = {
|
|
@@ -809,7 +775,7 @@ function AltDateWidget(props) {
|
|
|
809
775
|
[property]: typeof nextValue === "undefined" ? -1 : nextValue
|
|
810
776
|
};
|
|
811
777
|
if (readyForChange(nextState)) {
|
|
812
|
-
onChange((0,
|
|
778
|
+
onChange((0, import_utils11.toDateString)(nextState, showTime));
|
|
813
779
|
} else {
|
|
814
780
|
setState(nextState);
|
|
815
781
|
}
|
|
@@ -819,8 +785,8 @@ function AltDateWidget(props) {
|
|
|
819
785
|
if (disabled || readonly) {
|
|
820
786
|
return;
|
|
821
787
|
}
|
|
822
|
-
const nextState = (0,
|
|
823
|
-
onChange((0,
|
|
788
|
+
const nextState = (0, import_utils11.parseDateString)((/* @__PURE__ */ new Date()).toJSON(), showTime);
|
|
789
|
+
onChange((0, import_utils11.toDateString)(nextState, showTime));
|
|
824
790
|
};
|
|
825
791
|
const handleClear = (event) => {
|
|
826
792
|
event.preventDefault();
|
|
@@ -829,7 +795,7 @@ function AltDateWidget(props) {
|
|
|
829
795
|
}
|
|
830
796
|
onChange(void 0);
|
|
831
797
|
};
|
|
832
|
-
const renderDateElement = (elemProps) => /* @__PURE__ */ (0,
|
|
798
|
+
const renderDateElement = (elemProps) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
833
799
|
SelectWidget2,
|
|
834
800
|
{
|
|
835
801
|
autofocus: elemProps.autofocus,
|
|
@@ -841,7 +807,7 @@ function AltDateWidget(props) {
|
|
|
841
807
|
onChange: (elemValue) => elemProps.select(elemProps.type, elemValue),
|
|
842
808
|
onFocus: elemProps.onFocus,
|
|
843
809
|
options: {
|
|
844
|
-
enumOptions: (0,
|
|
810
|
+
enumOptions: (0, import_utils11.dateRangeOptions)(elemProps.range[0], elemProps.range[1])
|
|
845
811
|
},
|
|
846
812
|
placeholder: elemProps.type,
|
|
847
813
|
readonly: elemProps.readonly,
|
|
@@ -849,18 +815,18 @@ function AltDateWidget(props) {
|
|
|
849
815
|
value: elemProps.value,
|
|
850
816
|
registry,
|
|
851
817
|
label: "",
|
|
852
|
-
"aria-describedby": (0,
|
|
818
|
+
"aria-describedby": (0, import_utils11.ariaDescribedByIds)(id)
|
|
853
819
|
}
|
|
854
820
|
);
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
856
|
-
(0,
|
|
821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_antd12.Row, { gutter: [Math.floor(rowGutter / 2), Math.floor(rowGutter / 2)], children: [
|
|
822
|
+
(0, import_utils11.getDateElementProps)(
|
|
857
823
|
state,
|
|
858
824
|
showTime,
|
|
859
825
|
options.yearsRange,
|
|
860
826
|
options.format
|
|
861
827
|
).map((elemProps, i) => {
|
|
862
828
|
const elemId = id + "_" + elemProps.type;
|
|
863
|
-
return /* @__PURE__ */ (0,
|
|
829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: renderDateElement({
|
|
864
830
|
...elemProps,
|
|
865
831
|
autofocus: autofocus && i === 0,
|
|
866
832
|
disabled,
|
|
@@ -876,8 +842,8 @@ function AltDateWidget(props) {
|
|
|
876
842
|
value: elemProps.value || -1 < 0 ? void 0 : elemProps.value
|
|
877
843
|
}) }, elemId);
|
|
878
844
|
}),
|
|
879
|
-
!options.hideNowButton && /* @__PURE__ */ (0,
|
|
880
|
-
!options.hideClearButton && /* @__PURE__ */ (0,
|
|
845
|
+
!options.hideNowButton && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Button, { block: true, className: "btn-now", onClick: handleNow, type: "primary", children: translateString(import_utils11.TranslatableString.NowLabel) }) }),
|
|
846
|
+
!options.hideClearButton && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Button, { block: true, className: "btn-clear", danger: true, onClick: handleClear, type: "primary", children: translateString(import_utils11.TranslatableString.ClearLabel) }) })
|
|
881
847
|
] });
|
|
882
848
|
}
|
|
883
849
|
AltDateWidget.defaultProps = {
|
|
@@ -891,10 +857,10 @@ AltDateWidget.defaultProps = {
|
|
|
891
857
|
};
|
|
892
858
|
|
|
893
859
|
// src/widgets/AltDateTimeWidget/index.tsx
|
|
894
|
-
var
|
|
860
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
895
861
|
function AltDateTimeWidget(props) {
|
|
896
862
|
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
897
|
-
return /* @__PURE__ */ (0,
|
|
863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AltDateWidget2, { showTime: true, ...props });
|
|
898
864
|
}
|
|
899
865
|
AltDateTimeWidget.defaultProps = {
|
|
900
866
|
...AltDateWidget.defaultProps,
|
|
@@ -902,35 +868,35 @@ AltDateTimeWidget.defaultProps = {
|
|
|
902
868
|
};
|
|
903
869
|
|
|
904
870
|
// src/widgets/CheckboxesWidget/index.tsx
|
|
905
|
-
var
|
|
906
|
-
var
|
|
907
|
-
var
|
|
871
|
+
var import_antd13 = require("antd");
|
|
872
|
+
var import_utils12 = require("@rjsf/utils");
|
|
873
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
908
874
|
function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
|
|
909
875
|
const { readonlyAsDisabled = true } = formContext;
|
|
910
876
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
911
|
-
const handleChange = (nextValue) => onChange((0,
|
|
912
|
-
const handleBlur = ({ target }) => onBlur(id, (0,
|
|
913
|
-
const handleFocus = ({ target }) => onFocus(id, (0,
|
|
877
|
+
const handleChange = (nextValue) => onChange((0, import_utils12.enumOptionsValueForIndex)(nextValue, enumOptions, emptyValue));
|
|
878
|
+
const handleBlur = ({ target }) => onBlur(id, (0, import_utils12.enumOptionsValueForIndex)(target.value, enumOptions, emptyValue));
|
|
879
|
+
const handleFocus = ({ target }) => onFocus(id, (0, import_utils12.enumOptionsValueForIndex)(target.value, enumOptions, emptyValue));
|
|
914
880
|
const extraProps = {
|
|
915
881
|
id,
|
|
916
882
|
onBlur: !readonly ? handleBlur : void 0,
|
|
917
883
|
onFocus: !readonly ? handleFocus : void 0
|
|
918
884
|
};
|
|
919
|
-
const selectedIndexes = (0,
|
|
920
|
-
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0,
|
|
921
|
-
|
|
885
|
+
const selectedIndexes = (0, import_utils12.enumOptionsIndexForValue)(value, enumOptions, true);
|
|
886
|
+
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
887
|
+
import_antd13.Checkbox.Group,
|
|
922
888
|
{
|
|
923
889
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
924
890
|
name: id,
|
|
925
891
|
onChange: !readonly ? handleChange : void 0,
|
|
926
892
|
value: selectedIndexes,
|
|
927
893
|
...extraProps,
|
|
928
|
-
"aria-describedby": (0,
|
|
929
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
931
|
-
|
|
894
|
+
"aria-describedby": (0, import_utils12.ariaDescribedByIds)(id),
|
|
895
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
897
|
+
import_antd13.Checkbox,
|
|
932
898
|
{
|
|
933
|
-
id: (0,
|
|
899
|
+
id: (0, import_utils12.optionId)(id, i),
|
|
934
900
|
name: id,
|
|
935
901
|
autoFocus: i === 0 ? autofocus : false,
|
|
936
902
|
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
|
|
@@ -938,16 +904,16 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
938
904
|
children: option.label
|
|
939
905
|
}
|
|
940
906
|
),
|
|
941
|
-
!inline && /* @__PURE__ */ (0,
|
|
907
|
+
!inline && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("br", {})
|
|
942
908
|
] }, i))
|
|
943
909
|
}
|
|
944
910
|
) }) : null;
|
|
945
911
|
}
|
|
946
912
|
|
|
947
913
|
// src/widgets/CheckboxWidget/index.tsx
|
|
948
|
-
var
|
|
949
|
-
var
|
|
950
|
-
var
|
|
914
|
+
var import_antd14 = require("antd");
|
|
915
|
+
var import_utils13 = require("@rjsf/utils");
|
|
916
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
951
917
|
function CheckboxWidget(props) {
|
|
952
918
|
const { autofocus, disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value } = props;
|
|
953
919
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -958,8 +924,8 @@ function CheckboxWidget(props) {
|
|
|
958
924
|
onBlur: !readonly ? handleBlur : void 0,
|
|
959
925
|
onFocus: !readonly ? handleFocus : void 0
|
|
960
926
|
};
|
|
961
|
-
return /* @__PURE__ */ (0,
|
|
962
|
-
|
|
927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
928
|
+
import_antd14.Checkbox,
|
|
963
929
|
{
|
|
964
930
|
autoFocus: autofocus,
|
|
965
931
|
checked: typeof value === "undefined" ? false : value,
|
|
@@ -968,17 +934,17 @@ function CheckboxWidget(props) {
|
|
|
968
934
|
name: id,
|
|
969
935
|
onChange: !readonly ? handleChange : void 0,
|
|
970
936
|
...extraProps,
|
|
971
|
-
"aria-describedby": (0,
|
|
972
|
-
children: (0,
|
|
937
|
+
"aria-describedby": (0, import_utils13.ariaDescribedByIds)(id),
|
|
938
|
+
children: (0, import_utils13.labelValue)(label, hideLabel, "")
|
|
973
939
|
}
|
|
974
940
|
);
|
|
975
941
|
}
|
|
976
942
|
|
|
977
943
|
// src/widgets/DateTimeWidget/index.tsx
|
|
978
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
979
|
-
var
|
|
980
|
-
var
|
|
981
|
-
var
|
|
944
|
+
var import_dayjs = __toESM(require("dayjs"), 1);
|
|
945
|
+
var import_utils14 = require("@rjsf/utils");
|
|
946
|
+
var import_antd15 = require("antd");
|
|
947
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
982
948
|
var DATE_PICKER_STYLE = {
|
|
983
949
|
width: "100%"
|
|
984
950
|
};
|
|
@@ -989,8 +955,8 @@ function DateTimeWidget(props) {
|
|
|
989
955
|
const handleBlur = () => onBlur(id, value);
|
|
990
956
|
const handleFocus = () => onFocus(id, value);
|
|
991
957
|
const getPopupContainer = (node) => node.parentNode;
|
|
992
|
-
return /* @__PURE__ */ (0,
|
|
993
|
-
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
959
|
+
import_antd15.DatePicker,
|
|
994
960
|
{
|
|
995
961
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
996
962
|
getPopupContainer,
|
|
@@ -1003,16 +969,16 @@ function DateTimeWidget(props) {
|
|
|
1003
969
|
showTime: true,
|
|
1004
970
|
style: DATE_PICKER_STYLE,
|
|
1005
971
|
value: value && (0, import_dayjs.default)(value),
|
|
1006
|
-
"aria-describedby": (0,
|
|
972
|
+
"aria-describedby": (0, import_utils14.ariaDescribedByIds)(id)
|
|
1007
973
|
}
|
|
1008
974
|
);
|
|
1009
975
|
}
|
|
1010
976
|
|
|
1011
977
|
// src/widgets/DateWidget/index.tsx
|
|
1012
|
-
var import_dayjs2 = __toESM(require("dayjs"));
|
|
1013
|
-
var
|
|
1014
|
-
var
|
|
1015
|
-
var
|
|
978
|
+
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
979
|
+
var import_utils15 = require("@rjsf/utils");
|
|
980
|
+
var import_antd16 = require("antd");
|
|
981
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1016
982
|
var DATE_PICKER_STYLE2 = {
|
|
1017
983
|
width: "100%"
|
|
1018
984
|
};
|
|
@@ -1023,8 +989,8 @@ function DateWidget(props) {
|
|
|
1023
989
|
const handleBlur = () => onBlur(id, value);
|
|
1024
990
|
const handleFocus = () => onFocus(id, value);
|
|
1025
991
|
const getPopupContainer = (node) => node.parentNode;
|
|
1026
|
-
return /* @__PURE__ */ (0,
|
|
1027
|
-
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
993
|
+
import_antd16.DatePicker,
|
|
1028
994
|
{
|
|
1029
995
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
1030
996
|
getPopupContainer,
|
|
@@ -1037,15 +1003,15 @@ function DateWidget(props) {
|
|
|
1037
1003
|
showTime: false,
|
|
1038
1004
|
style: DATE_PICKER_STYLE2,
|
|
1039
1005
|
value: value && (0, import_dayjs2.default)(value),
|
|
1040
|
-
"aria-describedby": (0,
|
|
1006
|
+
"aria-describedby": (0, import_utils15.ariaDescribedByIds)(id)
|
|
1041
1007
|
}
|
|
1042
1008
|
);
|
|
1043
1009
|
}
|
|
1044
1010
|
|
|
1045
1011
|
// src/widgets/PasswordWidget/index.tsx
|
|
1046
|
-
var
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1012
|
+
var import_antd17 = require("antd");
|
|
1013
|
+
var import_utils16 = require("@rjsf/utils");
|
|
1014
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1049
1015
|
function PasswordWidget(props) {
|
|
1050
1016
|
const { disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, value } = props;
|
|
1051
1017
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -1053,8 +1019,8 @@ function PasswordWidget(props) {
|
|
|
1053
1019
|
const handleChange = ({ target }) => onChange(target.value === "" ? emptyValue : target.value);
|
|
1054
1020
|
const handleBlur = ({ target }) => onBlur(id, target.value);
|
|
1055
1021
|
const handleFocus = ({ target }) => onFocus(id, target.value);
|
|
1056
|
-
return /* @__PURE__ */ (0,
|
|
1057
|
-
|
|
1022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1023
|
+
import_antd17.Input.Password,
|
|
1058
1024
|
{
|
|
1059
1025
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
1060
1026
|
id,
|
|
@@ -1064,15 +1030,15 @@ function PasswordWidget(props) {
|
|
|
1064
1030
|
onFocus: !readonly ? handleFocus : void 0,
|
|
1065
1031
|
placeholder,
|
|
1066
1032
|
value: value || "",
|
|
1067
|
-
"aria-describedby": (0,
|
|
1033
|
+
"aria-describedby": (0, import_utils16.ariaDescribedByIds)(id)
|
|
1068
1034
|
}
|
|
1069
1035
|
);
|
|
1070
1036
|
}
|
|
1071
1037
|
|
|
1072
1038
|
// src/widgets/RadioWidget/index.tsx
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1039
|
+
var import_antd18 = require("antd");
|
|
1040
|
+
var import_utils17 = require("@rjsf/utils");
|
|
1041
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1076
1042
|
function RadioWidget({
|
|
1077
1043
|
autofocus,
|
|
1078
1044
|
disabled,
|
|
@@ -1087,12 +1053,12 @@ function RadioWidget({
|
|
|
1087
1053
|
}) {
|
|
1088
1054
|
const { readonlyAsDisabled = true } = formContext;
|
|
1089
1055
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
1090
|
-
const handleChange = ({ target: { value: nextValue } }) => onChange((0,
|
|
1091
|
-
const handleBlur = ({ target }) => onBlur(id, (0,
|
|
1092
|
-
const handleFocus = ({ target }) => onFocus(id, (0,
|
|
1093
|
-
const selectedIndexes = (0,
|
|
1094
|
-
return /* @__PURE__ */ (0,
|
|
1095
|
-
|
|
1056
|
+
const handleChange = ({ target: { value: nextValue } }) => onChange((0, import_utils17.enumOptionsValueForIndex)(nextValue, enumOptions, emptyValue));
|
|
1057
|
+
const handleBlur = ({ target }) => onBlur(id, (0, import_utils17.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
|
|
1058
|
+
const handleFocus = ({ target }) => onFocus(id, (0, import_utils17.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
|
|
1059
|
+
const selectedIndexes = (0, import_utils17.enumOptionsIndexForValue)(value, enumOptions);
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1061
|
+
import_antd18.Radio.Group,
|
|
1096
1062
|
{
|
|
1097
1063
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
1098
1064
|
id,
|
|
@@ -1101,14 +1067,14 @@ function RadioWidget({
|
|
|
1101
1067
|
onBlur: !readonly ? handleBlur : void 0,
|
|
1102
1068
|
onFocus: !readonly ? handleFocus : void 0,
|
|
1103
1069
|
value: selectedIndexes,
|
|
1104
|
-
"aria-describedby": (0,
|
|
1105
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0,
|
|
1106
|
-
|
|
1070
|
+
"aria-describedby": (0, import_utils17.ariaDescribedByIds)(id),
|
|
1071
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1072
|
+
import_antd18.Radio,
|
|
1107
1073
|
{
|
|
1108
|
-
id: (0,
|
|
1074
|
+
id: (0, import_utils17.optionId)(id, i),
|
|
1109
1075
|
name: id,
|
|
1110
1076
|
autoFocus: i === 0 ? autofocus : false,
|
|
1111
|
-
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
|
|
1077
|
+
disabled: disabled || Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
|
|
1112
1078
|
value: String(i),
|
|
1113
1079
|
children: option.label
|
|
1114
1080
|
},
|
|
@@ -1119,9 +1085,9 @@ function RadioWidget({
|
|
|
1119
1085
|
}
|
|
1120
1086
|
|
|
1121
1087
|
// src/widgets/RangeWidget/index.tsx
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1124
|
-
var
|
|
1088
|
+
var import_antd19 = require("antd");
|
|
1089
|
+
var import_utils18 = require("@rjsf/utils");
|
|
1090
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1125
1091
|
function RangeWidget(props) {
|
|
1126
1092
|
const {
|
|
1127
1093
|
autofocus,
|
|
@@ -1138,7 +1104,7 @@ function RangeWidget(props) {
|
|
|
1138
1104
|
value
|
|
1139
1105
|
} = props;
|
|
1140
1106
|
const { readonlyAsDisabled = true } = formContext;
|
|
1141
|
-
const { min, max, step } = (0,
|
|
1107
|
+
const { min, max, step } = (0, import_utils18.rangeSpec)(schema);
|
|
1142
1108
|
const emptyValue = options.emptyValue || "";
|
|
1143
1109
|
const handleChange = (nextValue) => onChange(nextValue === "" ? emptyValue : nextValue);
|
|
1144
1110
|
const handleBlur = () => onBlur(id, value);
|
|
@@ -1148,8 +1114,8 @@ function RangeWidget(props) {
|
|
|
1148
1114
|
onBlur: !readonly ? handleBlur : void 0,
|
|
1149
1115
|
onFocus: !readonly ? handleFocus : void 0
|
|
1150
1116
|
};
|
|
1151
|
-
return /* @__PURE__ */ (0,
|
|
1152
|
-
|
|
1117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1118
|
+
import_antd19.Slider,
|
|
1153
1119
|
{
|
|
1154
1120
|
autoFocus: autofocus,
|
|
1155
1121
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1161,17 +1127,17 @@ function RangeWidget(props) {
|
|
|
1161
1127
|
step,
|
|
1162
1128
|
value,
|
|
1163
1129
|
...extraProps,
|
|
1164
|
-
"aria-describedby": (0,
|
|
1130
|
+
"aria-describedby": (0, import_utils18.ariaDescribedByIds)(id)
|
|
1165
1131
|
}
|
|
1166
1132
|
);
|
|
1167
1133
|
}
|
|
1168
1134
|
|
|
1169
1135
|
// src/widgets/SelectWidget/index.tsx
|
|
1170
|
-
var
|
|
1171
|
-
var
|
|
1172
|
-
var import_isString2 = __toESM(require("lodash/isString"));
|
|
1136
|
+
var import_antd20 = require("antd");
|
|
1137
|
+
var import_utils19 = require("@rjsf/utils");
|
|
1138
|
+
var import_isString2 = __toESM(require("lodash/isString"), 1);
|
|
1173
1139
|
var import_react5 = require("react");
|
|
1174
|
-
var
|
|
1140
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1175
1141
|
var SELECT_STYLE = {
|
|
1176
1142
|
width: "100%"
|
|
1177
1143
|
};
|
|
@@ -1192,9 +1158,9 @@ function SelectWidget({
|
|
|
1192
1158
|
}) {
|
|
1193
1159
|
const { readonlyAsDisabled = true } = formContext;
|
|
1194
1160
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
1195
|
-
const handleChange = (nextValue) => onChange((0,
|
|
1196
|
-
const handleBlur = () => onBlur(id, (0,
|
|
1197
|
-
const handleFocus = () => onFocus(id, (0,
|
|
1161
|
+
const handleChange = (nextValue) => onChange((0, import_utils19.enumOptionsValueForIndex)(nextValue, enumOptions, emptyValue));
|
|
1162
|
+
const handleBlur = () => onBlur(id, (0, import_utils19.enumOptionsValueForIndex)(value, enumOptions, emptyValue));
|
|
1163
|
+
const handleFocus = () => onFocus(id, (0, import_utils19.enumOptionsValueForIndex)(value, enumOptions, emptyValue));
|
|
1198
1164
|
const filterOption = (input, option) => {
|
|
1199
1165
|
if (option && (0, import_isString2.default)(option.label)) {
|
|
1200
1166
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
@@ -1202,7 +1168,7 @@ function SelectWidget({
|
|
|
1202
1168
|
return false;
|
|
1203
1169
|
};
|
|
1204
1170
|
const getPopupContainer = (node) => node.parentNode;
|
|
1205
|
-
const selectedIndexes = (0,
|
|
1171
|
+
const selectedIndexes = (0, import_utils19.enumOptionsIndexForValue)(value, enumOptions, multiple);
|
|
1206
1172
|
const extraProps = {
|
|
1207
1173
|
name: id
|
|
1208
1174
|
};
|
|
@@ -1222,8 +1188,8 @@ function SelectWidget({
|
|
|
1222
1188
|
}
|
|
1223
1189
|
return void 0;
|
|
1224
1190
|
}, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
|
|
1225
|
-
return /* @__PURE__ */ (0,
|
|
1226
|
-
|
|
1191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1192
|
+
import_antd20.Select,
|
|
1227
1193
|
{
|
|
1228
1194
|
autoFocus: autofocus,
|
|
1229
1195
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1238,16 +1204,16 @@ function SelectWidget({
|
|
|
1238
1204
|
value: selectedIndexes,
|
|
1239
1205
|
...extraProps,
|
|
1240
1206
|
filterOption,
|
|
1241
|
-
"aria-describedby": (0,
|
|
1207
|
+
"aria-describedby": (0, import_utils19.ariaDescribedByIds)(id),
|
|
1242
1208
|
options: selectOptions
|
|
1243
1209
|
}
|
|
1244
1210
|
);
|
|
1245
1211
|
}
|
|
1246
1212
|
|
|
1247
1213
|
// src/widgets/TextareaWidget/index.tsx
|
|
1248
|
-
var
|
|
1249
|
-
var
|
|
1250
|
-
var
|
|
1214
|
+
var import_antd21 = require("antd");
|
|
1215
|
+
var import_utils20 = require("@rjsf/utils");
|
|
1216
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1251
1217
|
var INPUT_STYLE3 = {
|
|
1252
1218
|
width: "100%"
|
|
1253
1219
|
};
|
|
@@ -1270,8 +1236,8 @@ function TextareaWidget({
|
|
|
1270
1236
|
const extraProps = {
|
|
1271
1237
|
type: "textarea"
|
|
1272
1238
|
};
|
|
1273
|
-
return /* @__PURE__ */ (0,
|
|
1274
|
-
|
|
1239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1240
|
+
import_antd21.Input.TextArea,
|
|
1275
1241
|
{
|
|
1276
1242
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
1277
1243
|
id,
|
|
@@ -1284,7 +1250,7 @@ function TextareaWidget({
|
|
|
1284
1250
|
style: INPUT_STYLE3,
|
|
1285
1251
|
value,
|
|
1286
1252
|
...extraProps,
|
|
1287
|
-
"aria-describedby": (0,
|
|
1253
|
+
"aria-describedby": (0, import_utils20.ariaDescribedByIds)(id)
|
|
1288
1254
|
}
|
|
1289
1255
|
);
|
|
1290
1256
|
}
|
|
@@ -1316,8 +1282,8 @@ function generateTheme() {
|
|
|
1316
1282
|
}
|
|
1317
1283
|
var Theme = generateTheme();
|
|
1318
1284
|
function generateForm() {
|
|
1319
|
-
return (0,
|
|
1285
|
+
return (0, import_core2.withTheme)(generateTheme());
|
|
1320
1286
|
}
|
|
1321
1287
|
var Form3 = generateForm();
|
|
1322
|
-
var
|
|
1288
|
+
var index_default = Form3;
|
|
1323
1289
|
//# sourceMappingURL=index.js.map
|