@rjsf/antd 5.24.10 → 6.0.0-beta.1

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