@flatbiz/antd 5.0.34 → 5.0.35
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/_commonjsHelpers-B0GIDhER.js +33 -0
- package/dist/_commonjsHelpers-B0GIDhER.js.map +1 -0
- package/dist/ai-search/index.js +1 -1
- package/dist/{ai-search-DIVO-ryc.js → ai-search-WcG2oakE.js} +2 -2
- package/dist/{ai-search-DIVO-ryc.js.map → ai-search-WcG2oakE.js.map} +1 -1
- package/dist/dialog-drag-modal/index.js +2 -1
- package/dist/dialog-drag-modal/index.js.map +1 -1
- package/dist/drag-editable-card/index.d.ts +7 -4
- package/dist/drag-editable-card/index.js +7 -7
- package/dist/{drag-modal-hO3kzep4.js → drag-modal-DVq260Mc.js} +5 -33
- package/dist/{drag-modal-hO3kzep4.js.map → drag-modal-DVq260Mc.js.map} +1 -1
- package/dist/drawer-BI8T3w7e.js +257 -0
- package/dist/drawer-BI8T3w7e.js.map +1 -0
- package/dist/easy-form/index.d.ts +0 -4
- package/dist/easy-form/index.js +1 -1
- package/dist/easy-table/index.d.ts +0 -4
- package/dist/easy-table/index.js +1 -1
- package/dist/editable-card/index.d.ts +7 -4
- package/dist/editable-card/index.js +6 -6
- package/dist/{editable-card-DlqrwXa0.js → editable-card-BN9ViZz0.js} +69 -56
- package/dist/editable-card-BN9ViZz0.js.map +1 -0
- package/dist/{editable-card-eGAbYXAH.js → editable-card-BrnWDl8j.js} +2 -2
- package/dist/{editable-card-eGAbYXAH.js.map → editable-card-BrnWDl8j.js.map} +1 -1
- package/dist/{form-3qaPduiy.js → form-DNtjXzAW.js} +35 -36
- package/dist/form-DNtjXzAW.js.map +1 -0
- package/dist/index.d.ts +475 -447
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/resizable-drawer/index.css +1 -0
- package/dist/resizable-drawer/index.d.ts +29 -0
- package/dist/resizable-drawer/index.js +41 -0
- package/dist/resizable-drawer/index.js.map +1 -0
- package/package.json +10 -5
- package/dist/editable-card-DlqrwXa0.js.map +0 -1
- package/dist/form-3qaPduiy.js.map +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
2
|
+
|
|
3
|
+
import _CloseOutlined from '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
4
|
+
import { b as _objectSpread2, a as _slicedToArray } from './_rollupPluginBabelHelpers-CP5aeNcJ.js';
|
|
5
|
+
import { isPromise } from '@dimjs/lang/is-promise';
|
|
6
|
+
import { hooks } from '@wove/react/hooks';
|
|
7
|
+
import { forwardRef, useState, useMemo } from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { Resizable } from 'react-resizable';
|
|
10
|
+
import { Button, Space } from 'antd';
|
|
11
|
+
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-B0GIDhER.js';
|
|
12
|
+
import { B as ButtonWrapper } from './button-wrapper-C2koH6hy.js';
|
|
13
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var classnames = {exports: {}};
|
|
16
|
+
|
|
17
|
+
/*!
|
|
18
|
+
Copyright (c) 2018 Jed Watson.
|
|
19
|
+
Licensed under the MIT License (MIT), see
|
|
20
|
+
http://jedwatson.github.io/classnames
|
|
21
|
+
*/
|
|
22
|
+
var hasRequiredClassnames;
|
|
23
|
+
function requireClassnames() {
|
|
24
|
+
if (hasRequiredClassnames) return classnames.exports;
|
|
25
|
+
hasRequiredClassnames = 1;
|
|
26
|
+
(function (module) {
|
|
27
|
+
/* global define */
|
|
28
|
+
|
|
29
|
+
(function () {
|
|
30
|
+
|
|
31
|
+
var hasOwn = {}.hasOwnProperty;
|
|
32
|
+
function classNames() {
|
|
33
|
+
var classes = '';
|
|
34
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
35
|
+
var arg = arguments[i];
|
|
36
|
+
if (arg) {
|
|
37
|
+
classes = appendClass(classes, parseValue(arg));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return classes;
|
|
41
|
+
}
|
|
42
|
+
function parseValue(arg) {
|
|
43
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
44
|
+
return arg;
|
|
45
|
+
}
|
|
46
|
+
if (typeof arg !== 'object') {
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
if (Array.isArray(arg)) {
|
|
50
|
+
return classNames.apply(null, arg);
|
|
51
|
+
}
|
|
52
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
53
|
+
return arg.toString();
|
|
54
|
+
}
|
|
55
|
+
var classes = '';
|
|
56
|
+
for (var key in arg) {
|
|
57
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
58
|
+
classes = appendClass(classes, key);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return classes;
|
|
62
|
+
}
|
|
63
|
+
function appendClass(value, newClass) {
|
|
64
|
+
if (!newClass) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
if (value) {
|
|
68
|
+
return value + ' ' + newClass;
|
|
69
|
+
}
|
|
70
|
+
return value + newClass;
|
|
71
|
+
}
|
|
72
|
+
if (module.exports) {
|
|
73
|
+
classNames.default = classNames;
|
|
74
|
+
module.exports = classNames;
|
|
75
|
+
} else {
|
|
76
|
+
window.classNames = classNames;
|
|
77
|
+
}
|
|
78
|
+
})();
|
|
79
|
+
})(classnames);
|
|
80
|
+
return classnames.exports;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var classnamesExports = requireClassnames();
|
|
84
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
85
|
+
|
|
86
|
+
var ResizeHandle = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
87
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({
|
|
88
|
+
ref: ref
|
|
89
|
+
}, props), {}, {
|
|
90
|
+
className: "resize-border"
|
|
91
|
+
}));
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
var zIndex = 10;
|
|
95
|
+
var getZindex = function getZindex() {
|
|
96
|
+
zIndex++;
|
|
97
|
+
return zIndex;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var ResizableDrawer = function ResizableDrawer(_ref) {
|
|
101
|
+
var open = _ref.open,
|
|
102
|
+
onClose = _ref.onClose,
|
|
103
|
+
_ref$title = _ref.title,
|
|
104
|
+
title = _ref$title === void 0 ? '抽屉标题' : _ref$title,
|
|
105
|
+
_ref$width = _ref.width,
|
|
106
|
+
initialWidth = _ref$width === void 0 ? 600 : _ref$width,
|
|
107
|
+
children = _ref.children,
|
|
108
|
+
footer = _ref.footer,
|
|
109
|
+
_ref$maskClosable = _ref.maskClosable,
|
|
110
|
+
maskClosable = _ref$maskClosable === void 0 ? true : _ref$maskClosable,
|
|
111
|
+
className = _ref.className,
|
|
112
|
+
style = _ref.style,
|
|
113
|
+
_ref$mask = _ref.mask,
|
|
114
|
+
mask = _ref$mask === void 0 ? true : _ref$mask,
|
|
115
|
+
styles = _ref.styles,
|
|
116
|
+
headerExtraRender = _ref.headerExtraRender,
|
|
117
|
+
zIndex = _ref.zIndex,
|
|
118
|
+
onOk = _ref.onOk,
|
|
119
|
+
okText = _ref.okText,
|
|
120
|
+
cancelText = _ref.cancelText,
|
|
121
|
+
hidenFooter = _ref.hidenFooter;
|
|
122
|
+
var _useState = useState(initialWidth),
|
|
123
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
124
|
+
width = _useState2[0],
|
|
125
|
+
setWidth = _useState2[1];
|
|
126
|
+
var onResize = function onResize(_, data) {
|
|
127
|
+
var size = data.size;
|
|
128
|
+
setWidth(size.width);
|
|
129
|
+
};
|
|
130
|
+
// 遮罩层点击
|
|
131
|
+
var handleMaskClick = function handleMaskClick(e) {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
if (maskClosable) {
|
|
134
|
+
onClose === null || onClose === void 0 || onClose();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// 计算宽度样式
|
|
139
|
+
var widthStyle = typeof width === 'number' ? "".concat(width, "px") : width;
|
|
140
|
+
var drawerStyle = open ? {
|
|
141
|
+
transform: 'translateX(0)',
|
|
142
|
+
opacity: 1
|
|
143
|
+
} : {
|
|
144
|
+
transform: 'translateX(100%)',
|
|
145
|
+
opacity: 0
|
|
146
|
+
};
|
|
147
|
+
var maskOpacity = open ? 1 : 0;
|
|
148
|
+
var zIndexInner = useMemo(function () {
|
|
149
|
+
return zIndex ? zIndex : 10 + getZindex();
|
|
150
|
+
}, [zIndex]);
|
|
151
|
+
var onOkHandle = hooks.useCallbackRef(function (e) {
|
|
152
|
+
if (onOk) {
|
|
153
|
+
var response = onOk(e);
|
|
154
|
+
if (response && isPromise(response)) {
|
|
155
|
+
return response.then(onClose);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
159
|
+
});
|
|
160
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/jsxs("div", {
|
|
161
|
+
className: classNames('drawer-resizable', {
|
|
162
|
+
'drawer-resizable-visible': open
|
|
163
|
+
}, className),
|
|
164
|
+
style: !mask ? {
|
|
165
|
+
width: widthStyle,
|
|
166
|
+
zIndex: zIndexInner
|
|
167
|
+
} : {
|
|
168
|
+
left: 0,
|
|
169
|
+
zIndex: zIndexInner
|
|
170
|
+
},
|
|
171
|
+
children: [mask ? /*#__PURE__*/jsx("div", {
|
|
172
|
+
className: "drawer-resizable-mask",
|
|
173
|
+
style: {
|
|
174
|
+
opacity: maskOpacity
|
|
175
|
+
},
|
|
176
|
+
onClick: handleMaskClick
|
|
177
|
+
}) : null, /*#__PURE__*/jsxs("div", {
|
|
178
|
+
className: "drawer-resizable-content",
|
|
179
|
+
style: _objectSpread2(_objectSpread2({
|
|
180
|
+
width: widthStyle
|
|
181
|
+
}, drawerStyle), style),
|
|
182
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
183
|
+
className: "drawer-resizable-header",
|
|
184
|
+
style: styles === null || styles === void 0 ? void 0 : styles.header,
|
|
185
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
186
|
+
className: "drawer-resizable-title",
|
|
187
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
188
|
+
type: "text",
|
|
189
|
+
className: "drawer-resizable-title-close",
|
|
190
|
+
icon: /*#__PURE__*/jsx(_CloseOutlined, {}),
|
|
191
|
+
onClick: function onClick(event) {
|
|
192
|
+
event.stopPropagation();
|
|
193
|
+
onClose === null || onClose === void 0 || onClose();
|
|
194
|
+
}
|
|
195
|
+
}), /*#__PURE__*/jsx("div", {
|
|
196
|
+
className: "",
|
|
197
|
+
children: title
|
|
198
|
+
})]
|
|
199
|
+
}), headerExtraRender ? /*#__PURE__*/jsx("div", {
|
|
200
|
+
className: "drawer-resizable-title-extra",
|
|
201
|
+
children: headerExtraRender
|
|
202
|
+
}) : null]
|
|
203
|
+
}), /*#__PURE__*/jsx("div", {
|
|
204
|
+
className: "drawer-resizable-body",
|
|
205
|
+
style: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
206
|
+
children: /*#__PURE__*/jsx(Resizable, {
|
|
207
|
+
onResize: onResize,
|
|
208
|
+
width: width,
|
|
209
|
+
handle: /*#__PURE__*/jsx(ResizeHandle, {}),
|
|
210
|
+
axis: "x",
|
|
211
|
+
resizeHandles: ['w'],
|
|
212
|
+
minConstraints: [400, 0],
|
|
213
|
+
maxConstraints: [1200, 0],
|
|
214
|
+
style: {
|
|
215
|
+
height: '100%'
|
|
216
|
+
},
|
|
217
|
+
onResizeStop: function onResizeStop(e) {
|
|
218
|
+
e.stopPropagation();
|
|
219
|
+
var iframeList = document.querySelectorAll('iframe');
|
|
220
|
+
iframeList.forEach(function (item) {
|
|
221
|
+
item.style.pointerEvents = '';
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
onResizeStart: function onResizeStart(e) {
|
|
225
|
+
e.stopPropagation();
|
|
226
|
+
var iframeList = document.querySelectorAll('iframe');
|
|
227
|
+
iframeList.forEach(function (item) {
|
|
228
|
+
item.style.pointerEvents = 'none';
|
|
229
|
+
});
|
|
230
|
+
},
|
|
231
|
+
children: children
|
|
232
|
+
})
|
|
233
|
+
}), hidenFooter ? null : footer ? /*#__PURE__*/jsx("div", {
|
|
234
|
+
className: "drawer-footer",
|
|
235
|
+
style: styles === null || styles === void 0 ? void 0 : styles.footer,
|
|
236
|
+
children: footer
|
|
237
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
238
|
+
className: "drawer-footer",
|
|
239
|
+
style: styles === null || styles === void 0 ? void 0 : styles.footer,
|
|
240
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
241
|
+
children: [/*#__PURE__*/jsx(ButtonWrapper, {
|
|
242
|
+
onClick: onClose,
|
|
243
|
+
children: cancelText || '取消'
|
|
244
|
+
}), /*#__PURE__*/jsx(ButtonWrapper, {
|
|
245
|
+
onClick: onOkHandle,
|
|
246
|
+
type: "primary",
|
|
247
|
+
loadingPosition: "center",
|
|
248
|
+
children: okText || '确定'
|
|
249
|
+
})]
|
|
250
|
+
})
|
|
251
|
+
})]
|
|
252
|
+
})]
|
|
253
|
+
}), document.body);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export { ResizableDrawer as R };
|
|
257
|
+
//# sourceMappingURL=drawer-BI8T3w7e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer-BI8T3w7e.js","sources":["@flatbiz/antd/node_modules/classnames/index.js","@flatbiz/antd/src/resizable-drawer/resize-handle/index.tsx","@flatbiz/antd/src/resizable-drawer/utils.ts","@flatbiz/antd/src/resizable-drawer/drawer.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { forwardRef } from 'react';\nimport './style.less';\nexport const ResizeHandle = forwardRef<HTMLDivElement>((props, ref) => {\n return <div ref={ref} {...props} className=\"resize-border\" />;\n});\n","let zIndex = 10;\n\nexport const getZindex = () => {\n zIndex++;\n return zIndex;\n};\n","import React, {\n type CSSProperties,\n type ReactElement,\n useMemo,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { Resizable } from 'react-resizable';\nimport { Button, Space } from 'antd';\nimport classNames from 'classnames';\nimport { CloseOutlined } from '@ant-design/icons';\nimport { isPromise } from '@dimjs/lang';\nimport { hooks } from '@wove/react';\nimport { ButtonWrapper } from '../button-wrapper/button-wrapper.jsx';\nimport { ResizeHandle } from './resize-handle/index.jsx';\nimport { getZindex } from './utils.js';\nimport './style.less';\n\ntype ResizableDrawerProps = {\n open?: boolean;\n onClose?: () => void;\n title?: React.ReactNode;\n width?: number | string;\n children?: React.ReactNode;\n footer?: React.ReactNode | null;\n hidenFooter?: boolean;\n maskClosable?: boolean;\n mask?: boolean;\n className?: string;\n style?: React.CSSProperties;\n styles?: {\n header?: CSSProperties;\n body?: CSSProperties;\n footer?: CSSProperties;\n };\n headerExtraRender?: ReactElement;\n zIndex?: number;\n onOk?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;\n cancelText?: string;\n okText?: string;\n};\n\nexport const ResizableDrawer: React.FC<ResizableDrawerProps> = ({\n open,\n onClose,\n title = '抽屉标题',\n width: initialWidth = 600,\n children,\n footer,\n maskClosable = true,\n className,\n style,\n mask = true,\n styles,\n headerExtraRender,\n zIndex,\n onOk,\n okText,\n cancelText,\n hidenFooter,\n}) => {\n const [width, setWidth] = useState(initialWidth);\n\n const onResize = (_, data) => {\n const { size } = data;\n setWidth(size.width);\n };\n // 遮罩层点击\n const handleMaskClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.stopPropagation();\n if (maskClosable) {\n onClose?.();\n }\n };\n\n // 计算宽度样式\n const widthStyle = typeof width === 'number' ? `${width}px` : width;\n\n const drawerStyle = open\n ? {\n transform: 'translateX(0)',\n opacity: 1,\n }\n : {\n transform: 'translateX(100%)',\n opacity: 0,\n };\n\n const maskOpacity = open ? 1 : 0;\n\n const zIndexInner = useMemo(() => {\n return zIndex ? zIndex : 10 + getZindex();\n }, [zIndex]);\n\n const onOkHandle = hooks.useCallbackRef((e) => {\n if (onOk) {\n const response = onOk(e);\n if (response && isPromise(response)) {\n return response.then(onClose);\n }\n }\n return onClose?.();\n });\n\n return createPortal(\n <div\n className={classNames(\n 'drawer-resizable',\n { 'drawer-resizable-visible': open },\n className\n )}\n style={\n !mask\n ? { width: widthStyle, zIndex: zIndexInner }\n : { left: 0, zIndex: zIndexInner }\n }\n >\n {mask ? (\n <div\n className=\"drawer-resizable-mask\"\n style={{ opacity: maskOpacity }}\n onClick={handleMaskClick}\n />\n ) : null}\n\n <div\n className=\"drawer-resizable-content\"\n style={{\n width: widthStyle,\n ...drawerStyle,\n ...style,\n }}\n >\n {/* 头部 */}\n <div className=\"drawer-resizable-header\" style={styles?.header}>\n <div className=\"drawer-resizable-title\">\n <Button\n type=\"text\"\n className=\"drawer-resizable-title-close\"\n icon={<CloseOutlined />}\n onClick={(event) => {\n event.stopPropagation();\n onClose?.();\n }}\n ></Button>\n <div className=\"\">{title}</div>\n </div>\n {headerExtraRender ? (\n <div className=\"drawer-resizable-title-extra\">\n {headerExtraRender}\n </div>\n ) : null}\n </div>\n\n {/* 内容区域 */}\n <div className=\"drawer-resizable-body\" style={styles?.body}>\n <Resizable\n onResize={onResize}\n width={width}\n handle={<ResizeHandle />}\n axis=\"x\"\n resizeHandles={['w']}\n minConstraints={[400, 0]}\n maxConstraints={[1200, 0]}\n style={{ height: '100%' }}\n onResizeStop={(e) => {\n e.stopPropagation();\n const iframeList = document.querySelectorAll('iframe');\n iframeList.forEach((item) => {\n item.style.pointerEvents = '';\n });\n }}\n onResizeStart={(e) => {\n e.stopPropagation();\n const iframeList = document.querySelectorAll('iframe');\n iframeList.forEach((item) => {\n item.style.pointerEvents = 'none';\n });\n }}\n >\n {children}\n </Resizable>\n </div>\n {/* 底部 */}\n {hidenFooter ? null : footer ? (\n <div className=\"drawer-footer\" style={styles?.footer}>\n {footer}\n </div>\n ) : (\n <div className=\"drawer-footer\" style={styles?.footer}>\n <Space>\n <ButtonWrapper onClick={onClose}>\n {cancelText || '取消'}\n </ButtonWrapper>\n <ButtonWrapper\n onClick={onOkHandle}\n type=\"primary\"\n loadingPosition=\"center\"\n >\n {okText || '确定'}\n </ButtonWrapper>\n </Space>\n </div>\n )}\n </div>\n </div>,\n document.body\n );\n};\n"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","appendClass","parseValue","Array","isArray","apply","toString","Object","prototype","includes","key","call","value","newClass","module","exports","default","window","ResizeHandle","forwardRef","props","ref","_jsx","_objectSpread","className","zIndex","getZindex","ResizableDrawer","_ref","open","onClose","_ref$title","title","_ref$width","width","initialWidth","children","footer","_ref$maskClosable","maskClosable","style","_ref$mask","mask","styles","headerExtraRender","onOk","okText","cancelText","hidenFooter","_useState","useState","_useState2","_slicedToArray","setWidth","onResize","_","data","size","handleMaskClick","e","stopPropagation","widthStyle","concat","drawerStyle","transform","opacity","maskOpacity","zIndexInner","useMemo","onOkHandle","_hooks","useCallbackRef","response","_isPromise","then","createPortal","_jsxs","left","onClick","header","Button","type","icon","_CloseOutlined","event","body","Resizable","handle","axis","resizeHandles","minConstraints","maxConstraints","height","onResizeStop","iframeList","document","querySelectorAll","forEach","item","pointerEvents","onResizeStart","Space","ButtonWrapper","loadingPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;IAEC,CAAY,YAAA;;AAGZ,MAAA,IAAIA,MAAM,GAAG,EAAE,CAACC,cAAc;MAE9B,SAASC,UAAUA,GAAI;QACtB,IAAIC,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;AAC1C,UAAA,IAAIG,GAAG,GAAGF,SAAS,CAACD,CAAC,CAAC;AACtB,UAAA,IAAIG,GAAG,EAAE;YACRJ,OAAO,GAAGK,WAAW,CAACL,OAAO,EAAEM,UAAU,CAACF,GAAG,CAAC,CAAC;AACnD;AACA;AAEE,QAAA,OAAOJ,OAAO;AAChB;MAEC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AA/D,UAAAA,QAAA,EAEDA;SACQ;OACR,CAAC,EAELY,WAAW,GAAG,IAAI,GAAGX,MAAM,gBAC1Bf,GAAA,CAAA,KAAA,EAAA;AAAKE,QAAAA,SAAS,EAAC,eAAe;AAACgB,QAAAA,KAAK,EAAEG,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEN,MAAO;AAAAD,QAAAA,QAAA,EAClDC;OACE,CAAC,gBAENf,GAAA,CAAA,KAAA,EAAA;AAAKE,QAAAA,SAAS,EAAC,eAAe;AAACgB,QAAAA,KAAK,EAAEG,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEN,MAAO;QAAAD,QAAA,eACnDwC,IAAA,CAACyB,KAAK,EAAA;UAAAjE,QAAA,EAAA,cACJd,GAAA,CAACgF,aAAa,EAAA;AAACxB,YAAAA,OAAO,EAAEhD,OAAQ;YAAAM,QAAA,EAC7BW,UAAU,IAAI;AAAI,WACN,CAAC,eAChBzB,GAAA,CAACgF,aAAa,EAAA;AACZxB,YAAAA,OAAO,EAAET,UAAW;AACpBY,YAAAA,IAAI,EAAC,SAAS;AACdsB,YAAAA,eAAe,EAAC,QAAQ;YAAAnE,QAAA,EAEvBU,MAAM,IAAI;AAAI,WACF,CAAC;SACX;AAAC,OACL,CACN;AAAA,KACE,CAAC;AAAA,GACH,CAAC,EACNiD,QAAQ,CAACV,IACX,CAAC;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -94,10 +94,6 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
|
94
94
|
* 是否为纯净模式,对EasyForm的子节点不做任何包装处理
|
|
95
95
|
*/
|
|
96
96
|
isPure?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* true: 当前EasyForm组件不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用
|
|
99
|
-
*/
|
|
100
|
-
nonuseFormWrapper?: boolean;
|
|
101
97
|
/**
|
|
102
98
|
* 栅格占位格数,最大值:24
|
|
103
99
|
* ```
|
package/dist/easy-form/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import './../pre-defined-class-name/index.css';
|
|
|
5
5
|
import './index.css';
|
|
6
6
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
7
7
|
|
|
8
|
-
export { E as EasyForm } from '../form-
|
|
8
|
+
export { E as EasyForm } from '../form-DNtjXzAW.js';
|
|
9
9
|
import '@dimjs/utils/class-names/class-names';
|
|
10
10
|
import '../_rollupPluginBabelHelpers-CP5aeNcJ.js';
|
|
11
11
|
import 'react';
|
|
@@ -398,10 +398,6 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
|
398
398
|
* 是否为纯净模式,对EasyForm的子节点不做任何包装处理
|
|
399
399
|
*/
|
|
400
400
|
isPure?: boolean;
|
|
401
|
-
/**
|
|
402
|
-
* true: 当前EasyForm组件不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用
|
|
403
|
-
*/
|
|
404
|
-
nonuseFormWrapper?: boolean;
|
|
405
401
|
/**
|
|
406
402
|
* 栅格占位格数,最大值:24
|
|
407
403
|
* ```
|
package/dist/easy-table/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import _UpOutlined from '@ant-design/icons/es/icons/UpOutlined.js';
|
|
|
27
27
|
import { isFragment } from 'react-is';
|
|
28
28
|
import { B as BlockLayout } from '../layout-Bl4P3Cv6.js';
|
|
29
29
|
import { B as ButtonWrapper } from '../button-wrapper-C2koH6hy.js';
|
|
30
|
-
import { E as EasyForm } from '../form-
|
|
30
|
+
import { E as EasyForm } from '../form-DNtjXzAW.js';
|
|
31
31
|
import { FormGrid } from '../form-grid/index.js';
|
|
32
32
|
import { T as TableScrollbar } from '../table-scrollbar-BdG-x6ZM.js';
|
|
33
33
|
import { F as FlexLayout } from '../flex-layout-zremxICp.js';
|
|
@@ -114,10 +114,6 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
|
114
114
|
* 是否为纯净模式,对EasyForm的子节点不做任何包装处理
|
|
115
115
|
*/
|
|
116
116
|
isPure?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* true: 当前EasyForm组件不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用
|
|
119
|
-
*/
|
|
120
|
-
nonuseFormWrapper?: boolean;
|
|
121
117
|
/**
|
|
122
118
|
* 栅格占位格数,最大值:24
|
|
123
119
|
* ```
|
|
@@ -357,6 +353,13 @@ export type EditableCardProps = {
|
|
|
357
353
|
* ```
|
|
358
354
|
*/
|
|
359
355
|
cardEasyFormProps?: Omit<EasyFormProps, "nonuseFormWrapper" | "isPure" | "children">;
|
|
356
|
+
/**
|
|
357
|
+
* 定义卡片网格水平跨度,最大值:24,默认值:24;设置 onCustomWrapper 后失效
|
|
358
|
+
* ```
|
|
359
|
+
* 1. 外层宽度在 xs、sm 时,强制为24
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
boxGridColSpan?: number;
|
|
360
363
|
/**
|
|
361
364
|
* 默认卡片右侧布局,设置 onCustomWrapper 后失效
|
|
362
365
|
* ```
|
|
@@ -5,7 +5,7 @@ import './../pre-defined-class-name/index.css';
|
|
|
5
5
|
import './index.css';
|
|
6
6
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
7
7
|
|
|
8
|
-
export { E as EditableCard } from '../editable-card-
|
|
8
|
+
export { E as EditableCard } from '../editable-card-BN9ViZz0.js';
|
|
9
9
|
import '@ant-design/icons/es/icons/PlusOutlined.js';
|
|
10
10
|
import '@dimjs/utils/class-names/class-names';
|
|
11
11
|
import '../_rollupPluginBabelHelpers-CP5aeNcJ.js';
|
|
@@ -13,6 +13,10 @@ import '@wove/react/hooks';
|
|
|
13
13
|
import 'react';
|
|
14
14
|
import 'antd';
|
|
15
15
|
import '@flatbiz/utils';
|
|
16
|
+
import '../box-grid/index.js';
|
|
17
|
+
import 'react/jsx-runtime';
|
|
18
|
+
import '@dimjs/lang/is-number';
|
|
19
|
+
import 'ahooks';
|
|
16
20
|
import '../button-wrapper-C2koH6hy.js';
|
|
17
21
|
import '@ant-design/icons/es/icons/LoadingOutlined.js';
|
|
18
22
|
import '@dimjs/lang/is-promise';
|
|
@@ -33,7 +37,6 @@ import '../use-responsive-point-Bp3D3lZT.js';
|
|
|
33
37
|
import '@dimjs/utils/uuid/uuid';
|
|
34
38
|
import 'dayjs/locale/en.js';
|
|
35
39
|
import 'dayjs/locale/zh-cn.js';
|
|
36
|
-
import 'react/jsx-runtime';
|
|
37
40
|
import '../fba-utils-Dfbczn1S.js';
|
|
38
41
|
import '@dimjs/lang/is-array';
|
|
39
42
|
import '@dimjs/model';
|
|
@@ -43,10 +46,7 @@ import '@ant-design/icons/es/icons/CloseCircleFilled.js';
|
|
|
43
46
|
import '@ant-design/icons/es/icons/DeleteOutlined.js';
|
|
44
47
|
import '../icon-wrapper-GTNh6wtb.js';
|
|
45
48
|
import '@dimjs/lang/is-undefined';
|
|
46
|
-
import '../form-
|
|
47
|
-
import '../box-grid/index.js';
|
|
48
|
-
import '@dimjs/lang/is-number';
|
|
49
|
-
import 'ahooks';
|
|
49
|
+
import '../form-DNtjXzAW.js';
|
|
50
50
|
import '../form-wrapper-BSwxGtCk.js';
|
|
51
51
|
import '../pre-defined-class-name/index.js';
|
|
52
52
|
import '../form-item-hidden-BtQvJEx7.js';
|
|
@@ -7,10 +7,11 @@ import { hooks } from '@wove/react/hooks';
|
|
|
7
7
|
import { useRef, Fragment, createElement, isValidElement } from 'react';
|
|
8
8
|
import { Form, ConfigProvider, Empty } from 'antd';
|
|
9
9
|
import { toArray, isUndefinedOrNull } from '@flatbiz/utils';
|
|
10
|
+
import { useBoxBreakpoint, BoxGrid } from './box-grid/index.js';
|
|
10
11
|
import { B as ButtonWrapper } from './button-wrapper-C2koH6hy.js';
|
|
11
12
|
import { C as CardWrapper } from './card-wrapper-Bu6yyUKG.js';
|
|
12
13
|
import { D as DeleteNode } from './delete-node-C6jwhyxz.js';
|
|
13
|
-
import { E as EasyForm } from './form-
|
|
14
|
+
import { E as EasyForm } from './form-DNtjXzAW.js';
|
|
14
15
|
import { fbaHooks } from './fba-hooks/index.js';
|
|
15
16
|
import { f as fbaUtils } from './fba-utils-Dfbczn1S.js';
|
|
16
17
|
import { F as FormItemHidden } from './form-item-hidden-BtQvJEx7.js';
|
|
@@ -25,6 +26,8 @@ var EditableCard = function EditableCard(props) {
|
|
|
25
26
|
var forceUpdate = hooks.useForceUpdate();
|
|
26
27
|
var _ConfigProvider$useCo = ConfigProvider.useConfig(),
|
|
27
28
|
componentDisabled = _ConfigProvider$useCo.componentDisabled;
|
|
29
|
+
var comRef = useRef(null);
|
|
30
|
+
var boxBreakpointApi = useBoxBreakpoint(comRef);
|
|
28
31
|
var formListCompleteName = props.formListCompleteName || formListName;
|
|
29
32
|
var validateRowFields = hooks.useCallbackRef(function (formItemPrevName, nameList) {
|
|
30
33
|
return new Promise(function ($return, $error) {
|
|
@@ -160,6 +163,7 @@ var EditableCard = function EditableCard(props) {
|
|
|
160
163
|
return /*#__PURE__*/jsx("div", {
|
|
161
164
|
className: className,
|
|
162
165
|
style: props.style,
|
|
166
|
+
ref: comRef,
|
|
163
167
|
children: /*#__PURE__*/jsx(Form.List, {
|
|
164
168
|
name: formListName,
|
|
165
169
|
rules: props.rules,
|
|
@@ -173,9 +177,8 @@ var EditableCard = function EditableCard(props) {
|
|
|
173
177
|
borderRadius: '6px',
|
|
174
178
|
border: errors !== null && errors !== void 0 && errors.length ? '1px solid #ff4d4f' : '1px solid transparent'
|
|
175
179
|
},
|
|
176
|
-
children: [(_props$contentBeforeR = props.contentBeforeRender) === null || _props$contentBeforeR === void 0 ? void 0 : _props$contentBeforeR.call(props, formListOperation, fields.length), fields.map(function (fieldItem, index) {
|
|
177
|
-
var _props$
|
|
178
|
-
var title = props.onCustomGroupName ? props.onCustomGroupName(index) : index + 1;
|
|
180
|
+
children: [(_props$contentBeforeR = props.contentBeforeRender) === null || _props$contentBeforeR === void 0 ? void 0 : _props$contentBeforeR.call(props, formListOperation, fields.length), props.onCustomWrapper ? fields.map(function (fieldItem, index) {
|
|
181
|
+
var _props$onCustomWrappe, _props$cardEasyFormPr;
|
|
179
182
|
var extraData = {
|
|
180
183
|
index: index,
|
|
181
184
|
fields: fields,
|
|
@@ -184,64 +187,74 @@ var EditableCard = function EditableCard(props) {
|
|
|
184
187
|
required: props.required,
|
|
185
188
|
key: "".concat(fieldItem.key)
|
|
186
189
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return /*#__PURE__*/jsx(Fragment, {
|
|
190
|
-
children: props.onCustomWrapper(/*#__PURE__*/jsx(EasyForm, _objectSpread2(_objectSpread2({
|
|
191
|
-
nonuseFormWrapper: true
|
|
192
|
-
}, props.cardEasyFormProps), {}, {
|
|
193
|
-
style: _objectSpread2({
|
|
194
|
-
padding: 0,
|
|
195
|
-
margin: 0
|
|
196
|
-
}, (_props$cardEasyFormPr = props.cardEasyFormProps) === null || _props$cardEasyFormPr === void 0 ? void 0 : _props$cardEasyFormPr.style),
|
|
197
|
-
children: columns.map(function (column) {
|
|
198
|
-
return column.render(index, fieldItem, formListOperation);
|
|
199
|
-
})
|
|
200
|
-
})), extraData)
|
|
201
|
-
}, fieldItem.key);
|
|
202
|
-
}
|
|
203
|
-
var cardExtraRenderResult = (_props$cardExtraRende = props.cardExtraRender) === null || _props$cardExtraRende === void 0 ? void 0 : _props$cardExtraRende.call(props, extraData);
|
|
204
|
-
return /*#__PURE__*/jsx(CardWrapper, {
|
|
205
|
-
className: props.cardClassName,
|
|
206
|
-
title: title,
|
|
207
|
-
size: "small",
|
|
208
|
-
style: _objectSpread2({
|
|
209
|
-
padding: 0,
|
|
210
|
-
margin: '0 0 15px 0'
|
|
211
|
-
}, props.cardStyle),
|
|
212
|
-
bodyStyle: {
|
|
213
|
-
paddingBottom: 0
|
|
214
|
-
}
|
|
215
|
-
// styles={{ body: { paddingBottom: 0 } }}
|
|
216
|
-
,
|
|
217
|
-
extra: /*#__PURE__*/isValidElement(cardExtraRenderResult) ? cardExtraRenderResult : /*#__PURE__*/jsxs("div", {
|
|
218
|
-
style: {
|
|
219
|
-
display: 'inline-flex',
|
|
220
|
-
alignItems: 'center',
|
|
221
|
-
gap: '8px'
|
|
222
|
-
},
|
|
223
|
-
children: [cardExtraRenderResult === null || cardExtraRenderResult === void 0 ? void 0 : cardExtraRenderResult['before'], /*#__PURE__*/jsx(DeleteNode, {
|
|
224
|
-
style: {
|
|
225
|
-
color: 'red'
|
|
226
|
-
},
|
|
227
|
-
hidden: props.hiddenDeleteBtn || props.required && fields.length === 1 || componentDisabled,
|
|
228
|
-
onDelete: function onDelete() {
|
|
229
|
-
formListOperation.remove(index);
|
|
230
|
-
}
|
|
231
|
-
}), cardExtraRenderResult === null || cardExtraRenderResult === void 0 ? void 0 : cardExtraRenderResult['after']]
|
|
232
|
-
}),
|
|
233
|
-
children: /*#__PURE__*/jsx(EasyForm, _objectSpread2(_objectSpread2({
|
|
234
|
-
nonuseFormWrapper: true
|
|
235
|
-
}, props.cardEasyFormProps), {}, {
|
|
190
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
191
|
+
children: (_props$onCustomWrappe = props.onCustomWrapper) === null || _props$onCustomWrappe === void 0 ? void 0 : _props$onCustomWrappe.call(props, /*#__PURE__*/jsx(EasyForm, _objectSpread2(_objectSpread2({}, props.cardEasyFormProps), {}, {
|
|
236
192
|
style: _objectSpread2({
|
|
237
193
|
padding: 0,
|
|
238
194
|
margin: 0
|
|
239
|
-
}, (_props$
|
|
195
|
+
}, (_props$cardEasyFormPr = props.cardEasyFormProps) === null || _props$cardEasyFormPr === void 0 ? void 0 : _props$cardEasyFormPr.style),
|
|
240
196
|
children: columns.map(function (column) {
|
|
241
197
|
return column.render(index, fieldItem, formListOperation);
|
|
242
198
|
})
|
|
243
|
-
}))
|
|
199
|
+
})), extraData)
|
|
244
200
|
}, fieldItem.key);
|
|
201
|
+
}) : /*#__PURE__*/jsx(BoxGrid.Row, {
|
|
202
|
+
children: fields.map(function (fieldItem, index) {
|
|
203
|
+
var _props$cardExtraRende, _props$cardEasyFormPr2;
|
|
204
|
+
var title = props.onCustomGroupName ? props.onCustomGroupName(index) : index + 1;
|
|
205
|
+
var extraData = {
|
|
206
|
+
index: index,
|
|
207
|
+
fields: fields,
|
|
208
|
+
fieldItem: fieldItem,
|
|
209
|
+
operation: formListOperation,
|
|
210
|
+
required: props.required,
|
|
211
|
+
key: "".concat(fieldItem.key)
|
|
212
|
+
};
|
|
213
|
+
var cardExtraRenderResult = (_props$cardExtraRende = props.cardExtraRender) === null || _props$cardExtraRende === void 0 ? void 0 : _props$cardExtraRende.call(props, extraData);
|
|
214
|
+
var span = ['xs', 'sm'].includes(boxBreakpointApi.boxBreakpoint) ? 24 : props.boxGridColSpan;
|
|
215
|
+
return /*#__PURE__*/jsx(BoxGrid.Col, {
|
|
216
|
+
span: span || 24,
|
|
217
|
+
children: /*#__PURE__*/jsx(CardWrapper, {
|
|
218
|
+
className: props.cardClassName,
|
|
219
|
+
title: title,
|
|
220
|
+
size: "small",
|
|
221
|
+
style: _objectSpread2({
|
|
222
|
+
padding: 0,
|
|
223
|
+
margin: '0 0 15px 0'
|
|
224
|
+
}, props.cardStyle),
|
|
225
|
+
bodyStyle: {
|
|
226
|
+
paddingBottom: 0
|
|
227
|
+
}
|
|
228
|
+
// styles={{ body: { paddingBottom: 0 } }}
|
|
229
|
+
,
|
|
230
|
+
extra: /*#__PURE__*/isValidElement(cardExtraRenderResult) ? cardExtraRenderResult : /*#__PURE__*/jsxs("div", {
|
|
231
|
+
style: {
|
|
232
|
+
display: 'inline-flex',
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
gap: '8px'
|
|
235
|
+
},
|
|
236
|
+
children: [cardExtraRenderResult === null || cardExtraRenderResult === void 0 ? void 0 : cardExtraRenderResult['before'], /*#__PURE__*/jsx(DeleteNode, {
|
|
237
|
+
style: {
|
|
238
|
+
color: 'red'
|
|
239
|
+
},
|
|
240
|
+
hidden: props.hiddenDeleteBtn || props.required && fields.length === 1 || componentDisabled,
|
|
241
|
+
onDelete: function onDelete() {
|
|
242
|
+
formListOperation.remove(index);
|
|
243
|
+
}
|
|
244
|
+
}), cardExtraRenderResult === null || cardExtraRenderResult === void 0 ? void 0 : cardExtraRenderResult['after']]
|
|
245
|
+
}),
|
|
246
|
+
children: /*#__PURE__*/jsx(EasyForm, _objectSpread2(_objectSpread2({}, props.cardEasyFormProps), {}, {
|
|
247
|
+
style: _objectSpread2({
|
|
248
|
+
padding: 0,
|
|
249
|
+
margin: 0
|
|
250
|
+
}, (_props$cardEasyFormPr2 = props.cardEasyFormProps) === null || _props$cardEasyFormPr2 === void 0 ? void 0 : _props$cardEasyFormPr2.style),
|
|
251
|
+
children: columns.map(function (column) {
|
|
252
|
+
return column.render(index, fieldItem, formListOperation);
|
|
253
|
+
})
|
|
254
|
+
}))
|
|
255
|
+
}, fieldItem.key)
|
|
256
|
+
});
|
|
257
|
+
})
|
|
245
258
|
}), fields.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
246
259
|
className: "editable-card-empty",
|
|
247
260
|
children: /*#__PURE__*/jsx(Empty, {
|
|
@@ -274,4 +287,4 @@ var EditableCard = function EditableCard(props) {
|
|
|
274
287
|
};
|
|
275
288
|
|
|
276
289
|
export { EditableCard as E };
|
|
277
|
-
//# sourceMappingURL=editable-card-
|
|
290
|
+
//# sourceMappingURL=editable-card-BN9ViZz0.js.map
|