@rjsf/antd 5.2.1 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/antd.cjs.development.js +21 -1
- package/dist/antd.cjs.development.js.map +1 -1
- package/dist/antd.cjs.production.min.js +1 -1
- package/dist/antd.cjs.production.min.js.map +1 -1
- package/dist/antd.esm.js +20 -1
- package/dist/antd.esm.js.map +1 -1
- package/dist/antd.umd.development.js +24 -5
- package/dist/antd.umd.development.js.map +1 -1
- package/dist/antd.umd.production.min.js +1 -1
- package/dist/antd.umd.production.min.js.map +1 -1
- package/package.json +18 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('react/jsx-runtime'), require('antd/lib/button'), require('antd/lib/col'), require('antd/lib/row'), require('@rjsf/utils'), require('classnames'), require('antd/lib/config-provider/context'), require('antd/lib/input'), require('antd/lib/input-number'), require('antd/lib/alert'), require('antd/lib/list'), require('antd/lib/space'), require('@ant-design/icons/ExclamationCircleOutlined'), require('@ant-design/icons/ArrowDownOutlined'), require('@ant-design/icons/ArrowUpOutlined'), require('@ant-design/icons/DeleteOutlined'), require('@ant-design/icons/PlusCircleOutlined'), require('antd/lib/form'), require('lodash-es/isObject'), require('lodash-es/isNumber'), require('lodash-es/isString'), require('react'), require('antd/lib/checkbox'), require('dayjs'), require('rc-picker/lib/generate/dayjs'), require('antd/lib/date-picker/generatePicker'), require('antd/lib/radio'), require('antd/lib/slider'), require('antd/lib/select')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', 'react/jsx-runtime', 'antd/lib/button', 'antd/lib/col', 'antd/lib/row', '@rjsf/utils', 'classnames', 'antd/lib/config-provider/context', 'antd/lib/input', 'antd/lib/input-number', 'antd/lib/alert', 'antd/lib/list', 'antd/lib/space', '@ant-design/icons/ExclamationCircleOutlined', '@ant-design/icons/ArrowDownOutlined', '@ant-design/icons/ArrowUpOutlined', '@ant-design/icons/DeleteOutlined', '@ant-design/icons/PlusCircleOutlined', 'antd/lib/form', 'lodash-es/isObject', 'lodash-es/isNumber', 'lodash-es/isString', 'react', 'antd/lib/checkbox', 'dayjs', 'rc-picker/lib/generate/dayjs', 'antd/lib/date-picker/generatePicker', 'antd/lib/radio', 'antd/lib/slider', 'antd/lib/select'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/antd"] = {}, global.core, global.jsxRuntime, global.Button, global.Col, global.Row, global.utils, global.classNames, global.context, global.Input, global.InputNumber, global.Alert, global.List, global.Space, global.ExclamationCircleOutlined, global.ArrowDownOutlined, global.ArrowUpOutlined, global.DeleteOutlined, global.PlusCircleOutlined, global.Form$1, global.isObject, global.isNumber, global.isString, global.React, global.Checkbox, global.dayjs, global.dayjsGenerateConfig, global.generatePicker, global.Radio, global.Slider, global.Select));
|
|
5
|
-
})(this, (function (exports, core, jsxRuntime, Button, Col, Row, utils, classNames, context, Input, InputNumber, Alert, List, Space, ExclamationCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, DeleteOutlined, PlusCircleOutlined, Form$1, isObject, isNumber, isString, react, Checkbox, dayjs, dayjsGenerateConfig, generatePicker, Radio, Slider, Select) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('react/jsx-runtime'), require('antd/lib/button'), require('antd/lib/col'), require('antd/lib/row'), require('@rjsf/utils'), require('classnames'), require('antd/lib/config-provider/context'), require('antd/lib/input'), require('antd/lib/input-number'), require('antd/lib/alert'), require('antd/lib/list'), require('antd/lib/space'), require('@ant-design/icons/ExclamationCircleOutlined'), require('@ant-design/icons/ArrowDownOutlined'), require('@ant-design/icons/ArrowUpOutlined'), require('@ant-design/icons/CopyOutlined'), require('@ant-design/icons/DeleteOutlined'), require('@ant-design/icons/PlusCircleOutlined'), require('antd/lib/form'), require('lodash-es/isObject'), require('lodash-es/isNumber'), require('lodash-es/isString'), require('react'), require('antd/lib/checkbox'), require('dayjs'), require('rc-picker/lib/generate/dayjs'), require('antd/lib/date-picker/generatePicker'), require('antd/lib/radio'), require('antd/lib/slider'), require('antd/lib/select')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', 'react/jsx-runtime', 'antd/lib/button', 'antd/lib/col', 'antd/lib/row', '@rjsf/utils', 'classnames', 'antd/lib/config-provider/context', 'antd/lib/input', 'antd/lib/input-number', 'antd/lib/alert', 'antd/lib/list', 'antd/lib/space', '@ant-design/icons/ExclamationCircleOutlined', '@ant-design/icons/ArrowDownOutlined', '@ant-design/icons/ArrowUpOutlined', '@ant-design/icons/CopyOutlined', '@ant-design/icons/DeleteOutlined', '@ant-design/icons/PlusCircleOutlined', 'antd/lib/form', 'lodash-es/isObject', 'lodash-es/isNumber', 'lodash-es/isString', 'react', 'antd/lib/checkbox', 'dayjs', 'rc-picker/lib/generate/dayjs', 'antd/lib/date-picker/generatePicker', 'antd/lib/radio', 'antd/lib/slider', 'antd/lib/select'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/antd"] = {}, global.core, global.jsxRuntime, global.Button, global.Col, global.Row, global.utils, global.classNames, global.context, global.Input, global.InputNumber, global.Alert, global.List, global.Space, global.ExclamationCircleOutlined, global.ArrowDownOutlined, global.ArrowUpOutlined, global.CopyOutlined, global.DeleteOutlined, global.PlusCircleOutlined, global.Form$1, global.isObject, global.isNumber, global.isString, global.React, global.Checkbox, global.dayjs, global.dayjsGenerateConfig, global.generatePicker, global.Radio, global.Slider, global.Select));
|
|
5
|
+
})(this, (function (exports, core, jsxRuntime, Button, Col, Row, utils, classNames, context, Input, InputNumber, Alert, List, Space, ExclamationCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, CopyOutlined, DeleteOutlined, PlusCircleOutlined, Form$1, isObject, isNumber, isString, react, Checkbox, dayjs, dayjsGenerateConfig, generatePicker, Radio, Slider, Select) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
var ExclamationCircleOutlined__default = /*#__PURE__*/_interopDefaultLegacy(ExclamationCircleOutlined);
|
|
19
19
|
var ArrowDownOutlined__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDownOutlined);
|
|
20
20
|
var ArrowUpOutlined__default = /*#__PURE__*/_interopDefaultLegacy(ArrowUpOutlined);
|
|
21
|
+
var CopyOutlined__default = /*#__PURE__*/_interopDefaultLegacy(CopyOutlined);
|
|
21
22
|
var DeleteOutlined__default = /*#__PURE__*/_interopDefaultLegacy(DeleteOutlined);
|
|
22
23
|
var PlusCircleOutlined__default = /*#__PURE__*/_interopDefaultLegacy(PlusCircleOutlined);
|
|
23
24
|
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form$1);
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
width: '100%'
|
|
37
38
|
};
|
|
38
39
|
var BTN_STYLE = {
|
|
39
|
-
width: 'calc(100% /
|
|
40
|
+
width: 'calc(100% / 4)'
|
|
40
41
|
};
|
|
41
42
|
/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
|
|
42
43
|
*
|
|
@@ -45,17 +46,20 @@
|
|
|
45
46
|
function ArrayFieldItemTemplate(props) {
|
|
46
47
|
var children = props.children,
|
|
47
48
|
disabled = props.disabled,
|
|
49
|
+
hasCopy = props.hasCopy,
|
|
48
50
|
hasMoveDown = props.hasMoveDown,
|
|
49
51
|
hasMoveUp = props.hasMoveUp,
|
|
50
52
|
hasRemove = props.hasRemove,
|
|
51
53
|
hasToolbar = props.hasToolbar,
|
|
52
54
|
index = props.index,
|
|
55
|
+
onCopyIndexClick = props.onCopyIndexClick,
|
|
53
56
|
onDropIndexClick = props.onDropIndexClick,
|
|
54
57
|
onReorderClick = props.onReorderClick,
|
|
55
58
|
readonly = props.readonly,
|
|
56
59
|
registry = props.registry,
|
|
57
60
|
uiSchema = props.uiSchema;
|
|
58
61
|
var _registry$templates$B = registry.templates.ButtonTemplates,
|
|
62
|
+
CopyButton = _registry$templates$B.CopyButton,
|
|
59
63
|
MoveDownButton = _registry$templates$B.MoveDownButton,
|
|
60
64
|
MoveUpButton = _registry$templates$B.MoveUpButton,
|
|
61
65
|
RemoveButton = _registry$templates$B.RemoveButton;
|
|
@@ -86,6 +90,12 @@
|
|
|
86
90
|
style: BTN_STYLE,
|
|
87
91
|
uiSchema: uiSchema,
|
|
88
92
|
registry: registry
|
|
93
|
+
}), hasCopy && jsxRuntime.jsx(CopyButton, {
|
|
94
|
+
disabled: disabled || readonly,
|
|
95
|
+
onClick: onCopyIndexClick(index),
|
|
96
|
+
style: BTN_STYLE,
|
|
97
|
+
uiSchema: uiSchema,
|
|
98
|
+
registry: registry
|
|
89
99
|
}), hasRemove && jsxRuntime.jsx(RemoveButton, {
|
|
90
100
|
disabled: disabled || readonly,
|
|
91
101
|
onClick: onDropIndexClick(index),
|
|
@@ -369,6 +379,14 @@
|
|
|
369
379
|
icon: jsxRuntime.jsx(PlusCircleOutlined__default["default"], {})
|
|
370
380
|
}));
|
|
371
381
|
}
|
|
382
|
+
function CopyButton(props) {
|
|
383
|
+
var translateString = props.registry.translateString;
|
|
384
|
+
return jsxRuntime.jsx(IconButton, _extends({
|
|
385
|
+
title: translateString(utils.TranslatableString.CopyButton)
|
|
386
|
+
}, props, {
|
|
387
|
+
icon: jsxRuntime.jsx(CopyOutlined__default["default"], {})
|
|
388
|
+
}));
|
|
389
|
+
}
|
|
372
390
|
function MoveDownButton(props) {
|
|
373
391
|
var translateString = props.registry.translateString;
|
|
374
392
|
return jsxRuntime.jsx(IconButton, _extends({
|
|
@@ -819,6 +837,7 @@
|
|
|
819
837
|
BaseInputTemplate: BaseInputTemplate,
|
|
820
838
|
ButtonTemplates: {
|
|
821
839
|
AddButton: AddButton,
|
|
840
|
+
CopyButton: CopyButton,
|
|
822
841
|
MoveDownButton: MoveDownButton,
|
|
823
842
|
MoveUpButton: MoveUpButton,
|
|
824
843
|
RemoveButton: RemoveButton,
|