@rjsf/antd 6.5.2 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/antd.esm.js +145 -145
  2. package/dist/antd.esm.js.map +4 -4
  3. package/dist/antd.umd.js +91 -91
  4. package/dist/index.cjs +140 -140
  5. package/dist/index.cjs.map +4 -4
  6. package/lib/index.d.ts +1 -1
  7. package/lib/index.js.map +1 -1
  8. package/lib/templates/ArrayFieldItemTemplate/index.js +1 -1
  9. package/lib/templates/ArrayFieldItemTemplate/index.js.map +1 -1
  10. package/lib/templates/ArrayFieldTemplate/index.js +2 -2
  11. package/lib/templates/ArrayFieldTemplate/index.js.map +1 -1
  12. package/lib/templates/BaseInputTemplate/index.js +2 -2
  13. package/lib/templates/BaseInputTemplate/index.js.map +1 -1
  14. package/lib/templates/FieldDescriptionTemplate/index.js.map +1 -1
  15. package/lib/templates/FieldHelpTemplate/index.js +1 -1
  16. package/lib/templates/FieldHelpTemplate/index.js.map +1 -1
  17. package/lib/templates/FieldTemplate/index.js +1 -1
  18. package/lib/templates/FieldTemplate/index.js.map +1 -1
  19. package/lib/templates/GridTemplate/index.js.map +1 -1
  20. package/lib/templates/IconButton/index.d.ts +1 -1
  21. package/lib/templates/IconButton/index.js +1 -1
  22. package/lib/templates/IconButton/index.js.map +1 -1
  23. package/lib/templates/ObjectFieldTemplate/index.js +4 -4
  24. package/lib/templates/ObjectFieldTemplate/index.js.map +1 -1
  25. package/lib/templates/SubmitButton/index.js +1 -1
  26. package/lib/templates/SubmitButton/index.js.map +1 -1
  27. package/lib/templates/TitleField/index.js +2 -2
  28. package/lib/templates/TitleField/index.js.map +1 -1
  29. package/lib/templates/WrapIfAdditionalTemplate/index.js +1 -1
  30. package/lib/templates/WrapIfAdditionalTemplate/index.js.map +1 -1
  31. package/lib/templates/index.js +2 -2
  32. package/lib/templates/index.js.map +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/lib/widgets/AltDateWidget/index.js +1 -1
  35. package/lib/widgets/AltDateWidget/index.js.map +1 -1
  36. package/lib/widgets/CheckboxWidget/index.js +1 -1
  37. package/lib/widgets/CheckboxWidget/index.js.map +1 -1
  38. package/lib/widgets/CheckboxesWidget/index.js +1 -1
  39. package/lib/widgets/CheckboxesWidget/index.js.map +1 -1
  40. package/lib/widgets/DateTimeWidget/index.js +1 -1
  41. package/lib/widgets/DateTimeWidget/index.js.map +1 -1
  42. package/lib/widgets/DateWidget/index.js +1 -1
  43. package/lib/widgets/DateWidget/index.js.map +1 -1
  44. package/lib/widgets/PasswordWidget/index.js +1 -1
  45. package/lib/widgets/PasswordWidget/index.js.map +1 -1
  46. package/lib/widgets/RadioWidget/index.js +1 -1
  47. package/lib/widgets/RadioWidget/index.js.map +1 -1
  48. package/lib/widgets/RangeWidget/index.js +1 -1
  49. package/lib/widgets/RangeWidget/index.js.map +1 -1
  50. package/lib/widgets/SelectWidget/index.js +1 -1
  51. package/lib/widgets/SelectWidget/index.js.map +1 -1
  52. package/lib/widgets/TextareaWidget/index.js +1 -1
  53. package/lib/widgets/TextareaWidget/index.js.map +1 -1
  54. package/package.json +16 -16
  55. package/src/index.ts +1 -1
  56. package/src/templates/ArrayFieldItemTemplate/index.tsx +1 -1
  57. package/src/templates/ArrayFieldTemplate/index.tsx +2 -2
  58. package/src/templates/BaseInputTemplate/index.tsx +2 -2
  59. package/src/templates/FieldDescriptionTemplate/index.tsx +1 -1
  60. package/src/templates/FieldHelpTemplate/index.tsx +1 -1
  61. package/src/templates/FieldTemplate/index.tsx +1 -1
  62. package/src/templates/GridTemplate/index.tsx +1 -1
  63. package/src/templates/IconButton/index.tsx +2 -2
  64. package/src/templates/ObjectFieldTemplate/index.tsx +5 -5
  65. package/src/templates/SubmitButton/index.tsx +1 -1
  66. package/src/templates/TitleField/index.tsx +2 -2
  67. package/src/templates/WrapIfAdditionalTemplate/index.tsx +1 -1
  68. package/src/templates/index.ts +2 -2
  69. package/src/tsconfig.json +0 -1
  70. package/src/widgets/AltDateWidget/index.tsx +1 -1
  71. package/src/widgets/CheckboxWidget/index.tsx +1 -1
  72. package/src/widgets/CheckboxesWidget/index.tsx +1 -1
  73. package/src/widgets/DateTimeWidget/index.tsx +1 -2
  74. package/src/widgets/DateWidget/index.tsx +1 -2
  75. package/src/widgets/PasswordWidget/index.tsx +1 -1
  76. package/src/widgets/RadioWidget/index.tsx +1 -1
  77. package/src/widgets/RangeWidget/index.tsx +1 -1
  78. package/src/widgets/SelectWidget/index.tsx +2 -2
  79. package/src/widgets/TextareaWidget/index.tsx +1 -1
package/dist/antd.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('antd'), require('@rjsf/utils'), require('react/jsx-runtime'), require('classnames'), require('react'), require('@ant-design/icons'), require('lodash/isObject'), require('lodash/isNumber'), require('lodash/isString'), require('dayjs')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', 'antd', '@rjsf/utils', 'react/jsx-runtime', 'classnames', 'react', '@ant-design/icons', 'lodash/isObject', 'lodash/isNumber', 'lodash/isString', 'dayjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/antd"] = {}, global.core, global.antd, global.utils, global.jsxRuntime, global.classNames, global.react, global.icons, global.isObject, global.isNumber, global.isString, global.dayjs));
5
- })(this, (function (exports, core, antd, utils, jsxRuntime, classNames, react, icons, isObject, isNumber, isString, dayjs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('@rjsf/utils'), require('antd'), require('react/jsx-runtime'), require('react'), require('classnames'), require('@ant-design/icons'), require('lodash/isNumber'), require('lodash/isObject'), require('lodash/isString'), require('dayjs')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', '@rjsf/utils', 'antd', 'react/jsx-runtime', 'react', 'classnames', '@ant-design/icons', 'lodash/isNumber', 'lodash/isObject', 'lodash/isString', 'dayjs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/antd"] = {}, global.core, global.utils, global.antd, global.jsxRuntime, global.react, global.classNames, global.icons, global.isNumber, global.isObject, global.isString, global.dayjs));
5
+ })(this, (function (exports, core, utils, antd, jsxRuntime, react, classNames, icons, isNumber, isObject, isString, dayjs) { 'use strict';
6
6
 
7
7
  // src/index.ts
8
8
  var BTN_GRP_STYLE = {
@@ -176,13 +176,6 @@
176
176
  /* @__PURE__ */ jsxRuntime.jsx(core.SchemaExamples, { id, schema })
177
177
  ] });
178
178
  }
179
- function DescriptionField(props) {
180
- const { id, description, registry, uiSchema } = props;
181
- if (!description) {
182
- return null;
183
- }
184
- return /* @__PURE__ */ jsxRuntime.jsx("span", { id, children: /* @__PURE__ */ jsxRuntime.jsx(core.RichDescription, { description, registry, uiSchema }) });
185
- }
186
179
  var antdMajor = parseInt(antd.version.split(".")[0], 10);
187
180
  function ErrorList({
188
181
  errors,
@@ -211,86 +204,12 @@
211
204
  const headerProp = antdMajor >= 6 ? { title: translateString(utils.TranslatableString.ErrorsLabel) } : { message: translateString(utils.TranslatableString.ErrorsLabel) };
212
205
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { className: "panel panel-danger errors", description: renderErrors(), type: "error", ...headerProp });
213
206
  }
214
- function IconButton(props) {
215
- const { iconType = "default", icon, onClick, uiSchema, registry, color, ...otherProps } = props;
216
- return /* @__PURE__ */ jsxRuntime.jsx(
217
- antd.Button,
218
- {
219
- onClick,
220
- type: iconType,
221
- icon,
222
- color,
223
- style: {
224
- paddingTop: "4px"
225
- /* Center the button */
226
- },
227
- ...otherProps
228
- }
229
- );
230
- }
231
- function AddButton(props) {
232
- const {
233
- registry: { translateString }
234
- } = props;
235
- return /* @__PURE__ */ jsxRuntime.jsx(
236
- IconButton,
237
- {
238
- title: translateString(utils.TranslatableString.AddItemButton),
239
- iconType: "primary",
240
- block: true,
241
- ...props,
242
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {})
243
- }
244
- );
245
- }
246
- function CopyButton(props) {
247
- const {
248
- registry: { translateString }
249
- } = props;
250
- return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CopyOutlined, {}) });
251
- }
252
- function MoveDownButton(props) {
253
- const {
254
- registry: { translateString }
255
- } = props;
256
- return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveDownButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}) });
257
- }
258
- function MoveUpButton(props) {
259
- const {
260
- registry: { translateString }
261
- } = props;
262
- return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveUpButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}) });
263
- }
264
- function RemoveButton(props) {
265
- const options = utils.getUiOptions(props.uiSchema);
266
- const {
267
- registry: { translateString }
268
- } = props;
269
- return /* @__PURE__ */ jsxRuntime.jsx(
270
- IconButton,
271
- {
272
- title: translateString(utils.TranslatableString.RemoveButton),
273
- danger: true,
274
- block: !!options.block,
275
- iconType: "primary",
276
- ...props,
277
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {})
278
- }
279
- );
280
- }
281
- function ClearButton(props) {
282
- const {
283
- registry: { translateString }
284
- } = props;
285
- return /* @__PURE__ */ jsxRuntime.jsx(
286
- IconButton,
287
- {
288
- title: translateString(utils.TranslatableString.ClearButton),
289
- ...props,
290
- iconType: "link",
291
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseOutlined, {})
292
- }
293
- );
207
+ function DescriptionField(props) {
208
+ const { id, description, registry, uiSchema } = props;
209
+ if (!description) {
210
+ return null;
211
+ }
212
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { id, children: /* @__PURE__ */ jsxRuntime.jsx(core.RichDescription, { description, registry, uiSchema }) });
294
213
  }
295
214
  function FieldErrorTemplate(props) {
296
215
  const { errors = [], fieldPathId } = props;
@@ -374,6 +293,87 @@
374
293
  }
375
294
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Row, { ...rest, children });
376
295
  }
296
+ function IconButton(props) {
297
+ const { iconType = "default", icon, onClick, uiSchema, registry, color, ...otherProps } = props;
298
+ return /* @__PURE__ */ jsxRuntime.jsx(
299
+ antd.Button,
300
+ {
301
+ onClick,
302
+ type: iconType,
303
+ icon,
304
+ color,
305
+ style: {
306
+ paddingTop: "4px"
307
+ /* Center the button */
308
+ },
309
+ ...otherProps
310
+ }
311
+ );
312
+ }
313
+ function AddButton(props) {
314
+ const {
315
+ registry: { translateString }
316
+ } = props;
317
+ return /* @__PURE__ */ jsxRuntime.jsx(
318
+ IconButton,
319
+ {
320
+ title: translateString(utils.TranslatableString.AddItemButton),
321
+ iconType: "primary",
322
+ block: true,
323
+ ...props,
324
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {})
325
+ }
326
+ );
327
+ }
328
+ function CopyButton(props) {
329
+ const {
330
+ registry: { translateString }
331
+ } = props;
332
+ return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.CopyButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CopyOutlined, {}) });
333
+ }
334
+ function MoveDownButton(props) {
335
+ const {
336
+ registry: { translateString }
337
+ } = props;
338
+ return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveDownButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}) });
339
+ }
340
+ function MoveUpButton(props) {
341
+ const {
342
+ registry: { translateString }
343
+ } = props;
344
+ return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveUpButton), ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}) });
345
+ }
346
+ function RemoveButton(props) {
347
+ const options = utils.getUiOptions(props.uiSchema);
348
+ const {
349
+ registry: { translateString }
350
+ } = props;
351
+ return /* @__PURE__ */ jsxRuntime.jsx(
352
+ IconButton,
353
+ {
354
+ title: translateString(utils.TranslatableString.RemoveButton),
355
+ danger: true,
356
+ block: !!options.block,
357
+ iconType: "primary",
358
+ ...props,
359
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {})
360
+ }
361
+ );
362
+ }
363
+ function ClearButton(props) {
364
+ const {
365
+ registry: { translateString }
366
+ } = props;
367
+ return /* @__PURE__ */ jsxRuntime.jsx(
368
+ IconButton,
369
+ {
370
+ title: translateString(utils.TranslatableString.ClearButton),
371
+ ...props,
372
+ iconType: "link",
373
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseOutlined, {})
374
+ }
375
+ );
376
+ }
377
377
  function MultiSchemaFieldTemplate(props) {
378
378
  const { optionSchemaField, selector } = props;
379
379
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [