@flatbiz/antd 5.0.10 → 5.0.12

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 (50) hide show
  1. package/dist/box-grid/index.d.ts +4 -1
  2. package/dist/box-grid/index.js +4 -1
  3. package/dist/box-grid/index.js.map +1 -1
  4. package/dist/button-operate/index.d.ts +2 -2
  5. package/dist/button-operate/index.js +1 -1
  6. package/dist/{button-operate-BRkW26Up.js → button-operate-C7NGikli.js} +13 -9
  7. package/dist/button-operate-C7NGikli.js.map +1 -0
  8. package/dist/{cell-render-iOsnjpak.js → cell-render-D4e6I9eI.js} +2 -2
  9. package/dist/{cell-render-iOsnjpak.js.map → cell-render-D4e6I9eI.js.map} +1 -1
  10. package/dist/{drag-COCvgEoI.js → drag-CYnGqWKf.js} +2 -2
  11. package/dist/{drag-COCvgEoI.js.map → drag-CYnGqWKf.js.map} +1 -1
  12. package/dist/drag-editable-table/index.js +4 -4
  13. package/dist/dropdown-menu-wrapper/index.d.ts +2 -2
  14. package/dist/dropdown-menu-wrapper-CSzVvlcO.js.map +1 -1
  15. package/dist/easy-table/index.d.ts +2 -0
  16. package/dist/easy-table/index.js +14 -1
  17. package/dist/easy-table/index.js.map +1 -1
  18. package/dist/editable-table/index.js +3 -3
  19. package/dist/{editable-table-DEpIgXwl.js → editable-table-Ccuxddfl.js} +2 -2
  20. package/dist/{editable-table-DEpIgXwl.js.map → editable-table-Ccuxddfl.js.map} +1 -1
  21. package/dist/index.d.ts +23 -19
  22. package/dist/index.js +8 -8
  23. package/dist/{label-value-Dj1ba-a9.js → label-value-C7kXxKh2.js} +5 -2
  24. package/dist/label-value-C7kXxKh2.js.map +1 -0
  25. package/dist/label-value-render/index.css +1 -1
  26. package/dist/label-value-render/index.d.ts +2 -0
  27. package/dist/label-value-render/index.js +1 -1
  28. package/dist/radio-group-wrapper/index.d.ts +2 -0
  29. package/dist/radio-group-wrapper/index.js +1 -1
  30. package/dist/{radio-group-wrapper-DkbBQw9P.js → radio-group-wrapper-Dip9OsdR.js} +2 -1
  31. package/dist/radio-group-wrapper-Dip9OsdR.js.map +1 -0
  32. package/dist/{selector-HbymPXNd.js → selector-CxZacuxg.js} +26 -9
  33. package/dist/selector-CxZacuxg.js.map +1 -0
  34. package/dist/table-cell-render/index.d.ts +3 -3
  35. package/dist/table-cell-render/index.js +2 -2
  36. package/dist/tree-modal/index.d.ts +14 -19
  37. package/dist/tree-modal/index.js +403 -17
  38. package/dist/tree-modal/index.js.map +1 -1
  39. package/dist/tree-modal-selector/index.d.ts +11 -11
  40. package/dist/tree-modal-selector/index.js +4 -4
  41. package/dist/tree-wrapper/index.d.ts +3 -3
  42. package/dist/tree-wrapper/index.js +2 -2
  43. package/dist/tree-wrapper/index.js.map +1 -1
  44. package/package.json +1 -1
  45. package/dist/button-operate-BRkW26Up.js.map +0 -1
  46. package/dist/label-value-Dj1ba-a9.js.map +0 -1
  47. package/dist/radio-group-wrapper-DkbBQw9P.js.map +0 -1
  48. package/dist/select-modal-Dt4YHH8a.js +0 -370
  49. package/dist/select-modal-Dt4YHH8a.js.map +0 -1
  50. package/dist/selector-HbymPXNd.js.map +0 -1
@@ -14,26 +14,25 @@ import './../tree-wrapper/index.css';
14
14
  import './index.css';
15
15
  /*! @flatjs/forge MIT @flatbiz/antd */
16
16
 
17
- export { T as TreeModal } from '../select-modal-Dt4YHH8a.js';
18
- import '../_rollupPluginBabelHelpers-BYm17lo8.js';
19
- import '@dimjs/lang/is-object';
20
- import '@wove/react/hooks';
21
- import 'react';
22
- import 'ahooks';
23
- import 'antd';
24
- import '@flatbiz/utils';
25
- import '../fba-hooks/index.js';
17
+ import { toArray, treeToTiledMap, isUndefinedOrNull, attachPropertiesToComponent } from '@flatbiz/utils';
18
+ import { b as _objectSpread2, a as _slicedToArray } from '../_rollupPluginBabelHelpers-BYm17lo8.js';
19
+ import { hooks } from '@wove/react/hooks';
20
+ import { Fragment, useRef, useState, useMemo } from 'react';
21
+ import { useSize } from 'ahooks';
22
+ import { Modal } from 'antd';
23
+ import { fbaHooks } from '../fba-hooks/index.js';
24
+ import { isObject } from '@dimjs/lang/is-object';
25
+ import { F as FlexLayout } from '../flex-layout-BaDncU_Z.js';
26
+ import _CloseOutlined from '@ant-design/icons/es/icons/CloseOutlined.js';
27
+ import { C as CssNodeHover } from '../css-node-hover-CsHQgf77.js';
28
+ import { I as IconWrapper } from '../icon-wrapper-CR3akisG.js';
29
+ import { T as TextOverflow } from '../text-overflow-Bk9MC6Cg.js';
30
+ import { jsx, jsxs } from 'react/jsx-runtime';
31
+ import { TreeWrapper } from '../tree-wrapper/index.js';
26
32
  import '../use-responsive-point-Bp3D3lZT.js';
27
- import '../flex-layout-BaDncU_Z.js';
28
33
  import '@dimjs/utils/class-names/class-names';
29
- import 'react/jsx-runtime';
30
- import '@ant-design/icons/es/icons/CloseOutlined.js';
31
- import '../css-node-hover-CsHQgf77.js';
32
- import '../icon-wrapper-CR3akisG.js';
33
34
  import '@dimjs/lang/is-undefined';
34
- import '../text-overflow-Bk9MC6Cg.js';
35
35
  import '@dimjs/lang/is-string';
36
- import '../tree-wrapper/index.js';
37
36
  import '@dimjs/lang/is-array';
38
37
  import '@dimjs/model-react';
39
38
  import '@ant-design/icons/es/icons/CaretDownFilled.js';
@@ -41,7 +40,7 @@ import '@ant-design/icons/es/icons/MoreOutlined.js';
41
40
  import '@dimjs/utils/extend/extend';
42
41
  import '@dimjs/utils/get/get';
43
42
  import '@dimjs/model';
44
- import '../button-operate-BRkW26Up.js';
43
+ import '../button-operate-C7NGikli.js';
45
44
  import '@dimjs/lang/is-plain-object';
46
45
  import '@dimjs/lang/is-promise';
47
46
  import '../button-wrapper-l9FUsrWl.js';
@@ -70,4 +69,391 @@ import '../input-search-wrapper-wVYGWi2O.js';
70
69
  import '../request-status-DQsSHUSx.js';
71
70
  import '@dimjs/utils/tree/walk-through-tree';
72
71
  import 'dequal';
72
+
73
+ var SelectItemList = function SelectItemList(props) {
74
+ var chenkedIdList = props.chenkedIdList;
75
+ return /*#__PURE__*/jsx(Fragment, {
76
+ children: chenkedIdList === null || chenkedIdList === void 0 ? void 0 : chenkedIdList.map(function (item) {
77
+ var value = item.value;
78
+ var label = item.label || value;
79
+ return /*#__PURE__*/jsx(CssNodeHover, {
80
+ style: {
81
+ paddingLeft: 5,
82
+ paddingRight: 0
83
+ },
84
+ children: /*#__PURE__*/jsxs(FlexLayout, {
85
+ fullIndex: 1,
86
+ direction: "horizontal",
87
+ style: {
88
+ alignItems: 'center',
89
+ fontSize: 14,
90
+ marginBottom: 0,
91
+ color: '#505050'
92
+ },
93
+ children: [/*#__PURE__*/jsx(TextOverflow, {
94
+ text: label
95
+ }), /*#__PURE__*/jsx("div", {
96
+ style: {
97
+ position: 'relative',
98
+ zIndex: 9,
99
+ color: '#a1a1a1'
100
+ },
101
+ children: /*#__PURE__*/jsx(IconWrapper, {
102
+ text: /*#__PURE__*/jsx(_CloseOutlined, {}),
103
+ onClick: props.onDeleteItem.bind(null, value),
104
+ size: "small",
105
+ style: {
106
+ paddingRight: 5,
107
+ margin: '2px'
108
+ }
109
+ })
110
+ })]
111
+ })
112
+ }, value);
113
+ })
114
+ });
115
+ };
116
+
117
+ var SelectContent = function SelectContent(props) {
118
+ var _props$treeProps, _props$value;
119
+ var modelKey = hooks.useId(undefined, 'tree-select-modal');
120
+ return /*#__PURE__*/jsx(TreeWrapper, _objectSpread2(_objectSpread2({
121
+ initRootExpand: true,
122
+ showSearch: true,
123
+ searchPlaceholder: "\u641C\u7D22",
124
+ checkable: true,
125
+ checkableType: "2"
126
+ }, props.treeProps), {}, {
127
+ showIcon: (_props$treeProps = props.treeProps) !== null && _props$treeProps !== void 0 && _props$treeProps.icon ? true : false,
128
+ value: (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.map(function (item) {
129
+ return item.value;
130
+ }),
131
+ modelKey: modelKey,
132
+ fieldNames: props.fieldNames,
133
+ labelInValue: true,
134
+ serviceConfig: props.serviceConfig,
135
+ onChange: function onChange(values) {
136
+ var _props$onChange;
137
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, toArray(values));
138
+ }
139
+ }));
140
+ };
141
+
142
+ var HorizontalLayout = function HorizontalLayout(props) {
143
+ var _props$fieldNames, _props$fieldNames2;
144
+ var chenkedIdList = props.value || [];
145
+ var valueKey = ((_props$fieldNames = props.fieldNames) === null || _props$fieldNames === void 0 ? void 0 : _props$fieldNames.value) || 'value';
146
+ var childrenKey = ((_props$fieldNames2 = props.fieldNames) === null || _props$fieldNames2 === void 0 ? void 0 : _props$fieldNames2.children) || 'children';
147
+ var _props$textConfig = props.textConfig,
148
+ selectQuantityPrompt = _props$textConfig.selectQuantityPrompt,
149
+ placeholder = _props$textConfig.placeholder;
150
+ return /*#__PURE__*/jsxs(FlexLayout, {
151
+ fullIndex: 0,
152
+ direction: "horizontal",
153
+ gap: 10,
154
+ style: {
155
+ height: '100%',
156
+ overflow: 'hidden'
157
+ },
158
+ children: [/*#__PURE__*/jsx("div", {
159
+ style: {
160
+ backgroundColor: '#f4f4f4',
161
+ padding: 10,
162
+ borderRadius: 5
163
+ },
164
+ children: /*#__PURE__*/jsx(SelectContent, {
165
+ treeProps: props.treeProps,
166
+ value: chenkedIdList,
167
+ onChange: props.onChange,
168
+ fieldNames: props.fieldNames,
169
+ serviceConfig: {
170
+ onRequest: props.onRequest,
171
+ onRequestResultAdapter: function onRequestResultAdapter(respData) {
172
+ var _props$onChangeDataSo;
173
+ var listMap = treeToTiledMap(respData, {
174
+ value: valueKey,
175
+ children: childrenKey
176
+ });
177
+ (_props$onChangeDataSo = props.onChangeDataSource) === null || _props$onChangeDataSo === void 0 || _props$onChangeDataSo.call(props, respData, listMap);
178
+ return respData;
179
+ }
180
+ }
181
+ })
182
+ }), /*#__PURE__*/jsxs("div", {
183
+ style: {
184
+ width: '40%',
185
+ overflow: 'hidden',
186
+ height: '100%',
187
+ display: 'flex',
188
+ flexDirection: 'column',
189
+ flexShrink: 0
190
+ },
191
+ children: [/*#__PURE__*/jsx("div", {
192
+ style: {
193
+ fontSize: 15,
194
+ fontWeight: '500',
195
+ marginBottom: 10
196
+ },
197
+ children: chenkedIdList.length > 0 ? /*#__PURE__*/jsx(Fragment, {
198
+ children: selectQuantityPrompt ? selectQuantityPrompt.replace('{total}', "".concat((chenkedIdList === null || chenkedIdList === void 0 ? void 0 : chenkedIdList.length) || '')) : "\u5DF2\u9009\u62E9".concat(chenkedIdList === null || chenkedIdList === void 0 ? void 0 : chenkedIdList.length)
199
+ }) : placeholder || '请选择'
200
+ }), /*#__PURE__*/jsx("div", {
201
+ style: {
202
+ overflow: 'auto',
203
+ flex: 1,
204
+ paddingRight: 15
205
+ },
206
+ children: /*#__PURE__*/jsx(SelectItemList, {
207
+ chenkedIdList: chenkedIdList,
208
+ fieldNames: props.fieldNames,
209
+ onDeleteItem: props.onDeleteItem
210
+ })
211
+ })]
212
+ })]
213
+ });
214
+ };
215
+
216
+ var VerticalLayout = function VerticalLayout(props) {
217
+ var _props$fieldNames, _props$fieldNames2;
218
+ var _props$textConfig = props.textConfig,
219
+ selectQuantityPrompt = _props$textConfig.selectQuantityPrompt,
220
+ placeholder = _props$textConfig.placeholder;
221
+ var valueKey = ((_props$fieldNames = props.fieldNames) === null || _props$fieldNames === void 0 ? void 0 : _props$fieldNames.value) || 'value';
222
+ var childrenKey = ((_props$fieldNames2 = props.fieldNames) === null || _props$fieldNames2 === void 0 ? void 0 : _props$fieldNames2.children) || 'children';
223
+ var chenkedIdList = props.value || [];
224
+ return /*#__PURE__*/jsxs("div", {
225
+ style: {
226
+ height: '100%',
227
+ overflow: 'auto'
228
+ },
229
+ children: [/*#__PURE__*/jsx("div", {
230
+ style: {
231
+ backgroundColor: '#f4f4f4',
232
+ padding: 10,
233
+ borderRadius: 5
234
+ },
235
+ children: /*#__PURE__*/jsx(SelectContent, {
236
+ treeProps: props.treeProps,
237
+ value: chenkedIdList,
238
+ onChange: props.onChange,
239
+ fieldNames: props.fieldNames,
240
+ serviceConfig: {
241
+ onRequest: props.onRequest,
242
+ onRequestResultAdapter: function onRequestResultAdapter(respData) {
243
+ var _props$onChangeDataSo;
244
+ var listMap = treeToTiledMap(respData, {
245
+ value: valueKey,
246
+ children: childrenKey
247
+ });
248
+ (_props$onChangeDataSo = props.onChangeDataSource) === null || _props$onChangeDataSo === void 0 || _props$onChangeDataSo.call(props, respData, listMap);
249
+ return respData;
250
+ }
251
+ }
252
+ })
253
+ }), /*#__PURE__*/jsxs("div", {
254
+ style: {
255
+ marginTop: 20
256
+ },
257
+ children: [/*#__PURE__*/jsx("div", {
258
+ style: {
259
+ fontSize: 15,
260
+ fontWeight: '500',
261
+ marginBottom: 10
262
+ },
263
+ children: chenkedIdList.length > 0 ? /*#__PURE__*/jsx(Fragment, {
264
+ children: selectQuantityPrompt ? selectQuantityPrompt.replace('{total}', "".concat((chenkedIdList === null || chenkedIdList === void 0 ? void 0 : chenkedIdList.length) || '')) : "\u5DF2\u9009\u62E9".concat(chenkedIdList === null || chenkedIdList === void 0 ? void 0 : chenkedIdList.length)
265
+ }) : placeholder
266
+ }), /*#__PURE__*/jsx(SelectItemList, {
267
+ chenkedIdList: chenkedIdList,
268
+ fieldNames: props.fieldNames,
269
+ onDeleteItem: props.onDeleteItem
270
+ })]
271
+ })]
272
+ });
273
+ };
274
+
275
+ var TreeModalContent = function TreeModalContent(props) {
276
+ var _props$fieldNames, _props$fieldNames2;
277
+ var isMultiple = props.isMultiple;
278
+ var labelKey = ((_props$fieldNames = props.fieldNames) === null || _props$fieldNames === void 0 ? void 0 : _props$fieldNames.label) || 'label';
279
+ var valueKey = ((_props$fieldNames2 = props.fieldNames) === null || _props$fieldNames2 === void 0 ? void 0 : _props$fieldNames2.value) || 'value';
280
+ var dataSourceMapRef = useRef({});
281
+ var screenType = fbaHooks.useResponsivePoint() || '';
282
+ var direction = screenType === 'xs' ? 'vertical' : 'horizontal';
283
+ var isMultipleFt = isUndefinedOrNull(isMultiple) ? true : isMultiple;
284
+ var _useState = useState(),
285
+ _useState2 = _slicedToArray(_useState, 2),
286
+ values = _useState2[0],
287
+ setValues = _useState2[1];
288
+ var onDeleteItem = function onDeleteItem(value) {
289
+ var targetList = values === null || values === void 0 ? void 0 : values.filter(function (item) {
290
+ return item.value !== value;
291
+ });
292
+ setValues(targetList);
293
+ };
294
+ fbaHooks.useEffectCustom(function () {
295
+ var values = toArray(props.value).map(function (item) {
296
+ var _dataSourceMapRef$cur;
297
+ var target = isObject(item) ? item : {
298
+ label: item,
299
+ value: item
300
+ };
301
+ var value = target.value;
302
+ return {
303
+ value: value,
304
+ label: ((_dataSourceMapRef$cur = dataSourceMapRef.current[value]) === null || _dataSourceMapRef$cur === void 0 ? void 0 : _dataSourceMapRef$cur[labelKey]) || ''
305
+ };
306
+ });
307
+ setValues(values);
308
+ }, [props.value]);
309
+ var treePropsFt = _objectSpread2(_objectSpread2({}, props.treeProps), {}, {
310
+ checkable: isMultipleFt ? true : false
311
+ });
312
+ var onChange = function onChange(values) {
313
+ var _props$onChange;
314
+ setValues(values);
315
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, values);
316
+ };
317
+ var onChangeDataSource = hooks.useCallbackRef(function (treeDataList, mapData) {
318
+ var _props$onDataSourceCh;
319
+ dataSourceMapRef.current = mapData;
320
+ var result = values === null || values === void 0 ? void 0 : values.map(function (item) {
321
+ var target = mapData[item.value];
322
+ return target ? {
323
+ label: target[labelKey],
324
+ value: target[valueKey]
325
+ } : undefined;
326
+ }).filter(Boolean);
327
+ setValues(result);
328
+ (_props$onDataSourceCh = props.onDataSourceChange) === null || _props$onDataSourceCh === void 0 || _props$onDataSourceCh.call(props, treeDataList, mapData);
329
+ });
330
+ return /*#__PURE__*/jsx(Fragment, {
331
+ children: direction === 'vertical' ? /*#__PURE__*/jsx(VerticalLayout, {
332
+ value: values,
333
+ onDeleteItem: onDeleteItem,
334
+ fieldNames: props.fieldNames,
335
+ onRequest: props.onRequest,
336
+ textConfig: props.textConfig,
337
+ onChange: onChange,
338
+ onChangeDataSource: onChangeDataSource,
339
+ treeProps: treePropsFt
340
+ }) : /*#__PURE__*/jsx(HorizontalLayout, {
341
+ value: values,
342
+ onDeleteItem: onDeleteItem,
343
+ fieldNames: props.fieldNames,
344
+ onRequest: props.onRequest,
345
+ textConfig: props.textConfig,
346
+ onChange: onChange,
347
+ onChangeDataSource: onChangeDataSource,
348
+ treeProps: treePropsFt
349
+ })
350
+ });
351
+ };
352
+
353
+ /**
354
+ * 树节点数据选择,一般用于选择员工等
355
+ * ```
356
+ * 1. 可通过 treeProps.checkableType 配置多选节点模式(包括返回所有节点、只返回叶子节点、叶子节点&父节点全选只返回父节点),默认只返回叶子节点
357
+ * 2. demo: https://fex.qa.tcshuke.com/docs/admin/main/selector/tree
358
+ * ```
359
+ */
360
+ var TreeModal$1 = function TreeModal(props) {
361
+ var _props$size = props.size,
362
+ size = _props$size === void 0 ? 'large' : _props$size;
363
+ var _useState = useState(false),
364
+ _useState2 = _slicedToArray(_useState, 2),
365
+ isOpen = _useState2[0],
366
+ setIsOpen = _useState2[1];
367
+ var htmlSize = useSize(document.querySelector('html'));
368
+ var screenType = fbaHooks.useResponsivePoint() || '';
369
+ var direction = screenType === 'xs' ? 'vertical' : 'horizontal';
370
+ var handleOnClick = hooks.useCallbackRef(function () {
371
+ setIsOpen(true);
372
+ });
373
+ var Action = props.children.type;
374
+ var _useState3 = useState(),
375
+ _useState4 = _slicedToArray(_useState3, 2),
376
+ values = _useState4[0],
377
+ setValues = _useState4[1];
378
+ var originalValuesRef = useRef([]);
379
+ var customSize = useMemo(function () {
380
+ if (!(htmlSize !== null && htmlSize !== void 0 && htmlSize.height) || !screenType) return undefined;
381
+ var isXsSm = ['xs', 'sm'].includes(screenType);
382
+ var sizeCalculate = {};
383
+ if (size == 'large') {
384
+ sizeCalculate = {
385
+ height: (htmlSize === null || htmlSize === void 0 ? void 0 : htmlSize.height) * 0.65,
386
+ width: 800
387
+ };
388
+ } else if (size == 'small') {
389
+ sizeCalculate = {
390
+ height: (htmlSize === null || htmlSize === void 0 ? void 0 : htmlSize.height) * 0.45,
391
+ width: 450
392
+ };
393
+ } else if (size == 'middle') {
394
+ sizeCalculate = {
395
+ height: (htmlSize === null || htmlSize === void 0 ? void 0 : htmlSize.height) * 0.55,
396
+ width: 600
397
+ };
398
+ }
399
+ return {
400
+ height: props.modalBodyHeight || sizeCalculate.height,
401
+ width: isXsSm ? '90%' : props.modalWidth || sizeCalculate.width
402
+ };
403
+ }, [htmlSize === null || htmlSize === void 0 ? void 0 : htmlSize.height, screenType, size, props.modalBodyHeight, props.modalWidth]);
404
+ var onSubmit = function onSubmit() {
405
+ var _props$onChange;
406
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, values);
407
+ setIsOpen(false);
408
+ };
409
+ var onCancel = function onCancel() {
410
+ setIsOpen(false);
411
+ setValues(originalValuesRef.current);
412
+ };
413
+ return /*#__PURE__*/jsxs(Fragment, {
414
+ children: [/*#__PURE__*/jsx(Action, _objectSpread2(_objectSpread2({}, props.children.props), {}, {
415
+ onClick: handleOnClick
416
+ })), /*#__PURE__*/jsx(Modal, {
417
+ className: props.modalClassName,
418
+ title: props.textConfig.title || '选择',
419
+ open: isOpen,
420
+ onCancel: onCancel,
421
+ forceRender: props.forceRender,
422
+ centered: true,
423
+ width: customSize === null || customSize === void 0 ? void 0 : customSize.width,
424
+ onOk: onSubmit,
425
+ styles: direction === 'horizontal' ? {
426
+ body: {
427
+ height: customSize === null || customSize === void 0 ? void 0 : customSize.height,
428
+ maxHeight: 'calc(100vh - 200px)',
429
+ padding: '0px 0 0 20px'
430
+ },
431
+ content: {
432
+ padding: 0
433
+ },
434
+ header: {
435
+ padding: '20px 24px 0 20px'
436
+ },
437
+ footer: {
438
+ padding: '0 24px 20px 24px'
439
+ }
440
+ } : {
441
+ body: {
442
+ height: customSize === null || customSize === void 0 ? void 0 : customSize.height
443
+ }
444
+ },
445
+ children: /*#__PURE__*/jsx(TreeModalContent, _objectSpread2(_objectSpread2({}, props), {}, {
446
+ onChange: function onChange(values) {
447
+ setValues(values);
448
+ }
449
+ }))
450
+ })]
451
+ });
452
+ };
453
+
454
+ var TreeModal = attachPropertiesToComponent(TreeModal$1, {
455
+ Content: TreeModalContent
456
+ });
457
+
458
+ export { TreeModal };
73
459
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/tree-modal/select-item.tsx","@flatbiz/antd/src/tree-modal/tree.tsx","@flatbiz/antd/src/tree-modal/horizontal.tsx","@flatbiz/antd/src/tree-modal/vertical.tsx","@flatbiz/antd/src/tree-modal/select-modal-content.tsx","@flatbiz/antd/src/tree-modal/select-modal.tsx","@flatbiz/antd/src/tree-modal/index.ts"],"sourcesContent":["import { Fragment } from 'react';\nimport { CloseOutlined } from '@ant-design/icons';\nimport type { TAny, TPlainObject } from '@flatbiz/utils';\nimport { CssNodeHover } from '../css-node-hover/index.js';\nimport { FlexLayout } from '../flex-layout/index.js';\nimport { IconWrapper } from '../icon-wrapper/index.js';\nimport { TextOverflow } from '../text-overflow/index.js';\nimport type { TreeModalProps } from './types.js';\n\nexport const SelectItemList = (props: {\n chenkedIdList: TPlainObject[];\n fieldNames: TreeModalProps['fieldNames'];\n onDeleteItem: (value: TAny) => void;\n}) => {\n const chenkedIdList = props.chenkedIdList;\n return (\n <Fragment>\n {chenkedIdList?.map((item) => {\n const value = item.value;\n const label = item.label || value;\n\n return (\n <CssNodeHover style={{ paddingLeft: 5, paddingRight: 0 }} key={value}>\n <FlexLayout\n fullIndex={1}\n direction=\"horizontal\"\n style={{\n alignItems: 'center',\n fontSize: 14,\n marginBottom: 0,\n color: '#505050',\n }}\n >\n <TextOverflow text={label} />\n <div\n style={{\n position: 'relative',\n zIndex: 9,\n color: '#a1a1a1',\n }}\n >\n <IconWrapper\n text={<CloseOutlined />}\n onClick={props.onDeleteItem.bind(null, value)}\n size=\"small\"\n style={{ paddingRight: 5, margin: '2px' }}\n />\n </div>\n </FlexLayout>\n </CssNodeHover>\n );\n })}\n </Fragment>\n );\n};\n","import type { TAny } from '@flatbiz/utils';\nimport { toArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport type {\n TreeServiceConfig,\n TreeWrapperProps,\n} from '../tree-wrapper/index.js';\nimport { TreeWrapper } from '../tree-wrapper/index.js';\nimport type { TreeModalProps, TreeModelSelectItem } from './types.js';\n\nexport const SelectContent = (props: {\n value?: TAny;\n onChange?: (value?: TreeModelSelectItem[]) => void;\n fieldNames?: TreeWrapperProps['fieldNames'];\n serviceConfig?: TreeServiceConfig;\n treeProps?: TreeModalProps['treeProps'];\n}) => {\n const modelKey = hooks.useId(undefined, 'tree-select-modal');\n return (\n <TreeWrapper\n initRootExpand\n showSearch\n searchPlaceholder=\"搜索\"\n checkable={true}\n checkableType=\"2\"\n {...props.treeProps}\n showIcon={props.treeProps?.icon ? true : false}\n value={props.value?.map((item) => item.value)}\n modelKey={modelKey}\n fieldNames={props.fieldNames}\n labelInValue={true}\n serviceConfig={props.serviceConfig}\n onChange={(values) => {\n props.onChange?.(toArray(values));\n }}\n />\n );\n};\n","import { Fragment } from 'react';\nimport type { TAny, TPlainObject } from '@flatbiz/utils';\nimport { treeToTiledMap } from '@flatbiz/utils';\nimport { FlexLayout } from '../flex-layout/index.js';\nimport { SelectItemList } from './select-item.jsx';\nimport { SelectContent } from './tree.jsx';\nimport type { TreeModalProps, TreeModelSelectItem } from './types.js';\n\nexport const HorizontalLayout = (props: {\n onChangeDataSource?: (\n treeDataList: TPlainObject[],\n mapData: TPlainObject\n ) => void;\n onDeleteItem: (value: TAny) => void;\n fieldNames?: TreeModalProps['fieldNames'];\n onRequest?: TreeModalProps['onRequest'];\n textConfig: TreeModalProps['textConfig'];\n onChange?: (value?: TreeModelSelectItem[]) => void;\n value?: TreeModelSelectItem[];\n treeProps?: TreeModalProps['treeProps'];\n}) => {\n const chenkedIdList = props.value || [];\n\n const valueKey = props.fieldNames?.value || 'value';\n const childrenKey = props.fieldNames?.children || 'children';\n\n const { selectQuantityPrompt, placeholder } = props.textConfig;\n\n return (\n <FlexLayout\n fullIndex={0}\n direction=\"horizontal\"\n gap={10}\n style={{ height: '100%', overflow: 'hidden' }}\n >\n <div style={{ backgroundColor: '#f4f4f4', padding: 10, borderRadius: 5 }}>\n <SelectContent\n treeProps={props.treeProps}\n value={chenkedIdList}\n onChange={props.onChange}\n fieldNames={props.fieldNames}\n serviceConfig={{\n onRequest: props.onRequest,\n onRequestResultAdapter: (respData) => {\n const listMap: TPlainObject = treeToTiledMap(respData, {\n value: valueKey,\n children: childrenKey,\n });\n props.onChangeDataSource?.(respData, listMap);\n return respData;\n },\n }}\n />\n </div>\n\n <div\n style={{\n width: '40%',\n overflow: 'hidden',\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n flexShrink: 0,\n }}\n >\n <div style={{ fontSize: 15, fontWeight: '500', marginBottom: 10 }}>\n {chenkedIdList.length > 0 ? (\n <Fragment>\n {selectQuantityPrompt\n ? selectQuantityPrompt.replace(\n '{total}',\n `${chenkedIdList?.length || ''}`\n )\n : `已选择${chenkedIdList?.length}`}\n </Fragment>\n ) : (\n placeholder || '请选择'\n )}\n </div>\n <div style={{ overflow: 'auto', flex: 1, paddingRight: 15 }}>\n <SelectItemList\n chenkedIdList={chenkedIdList}\n fieldNames={props.fieldNames}\n onDeleteItem={props.onDeleteItem}\n />\n </div>\n </div>\n </FlexLayout>\n );\n};\n","import { Fragment } from 'react';\nimport type { TAny, TPlainObject } from '@flatbiz/utils';\nimport { treeToTiledMap } from '@flatbiz/utils';\nimport { SelectItemList } from './select-item.jsx';\nimport { SelectContent } from './tree.jsx';\nimport type { TreeModalProps, TreeModelSelectItem } from './types.js';\n\nexport const VerticalLayout = (props: {\n onChangeDataSource?: (\n treeDataList: TPlainObject[],\n mapData: TPlainObject\n ) => void;\n onDeleteItem: (value: TAny) => void;\n fieldNames?: TreeModalProps['fieldNames'];\n onRequest?: TreeModalProps['onRequest'];\n textConfig: TreeModalProps['textConfig'];\n onChange?: (value?: TreeModelSelectItem[]) => void;\n value?: TreeModelSelectItem[];\n treeProps?: TreeModalProps['treeProps'];\n}) => {\n const { selectQuantityPrompt, placeholder } = props.textConfig;\n const valueKey = props.fieldNames?.value || 'value';\n const childrenKey = props.fieldNames?.children || 'children';\n\n const chenkedIdList = props.value || [];\n\n return (\n <div style={{ height: '100%', overflow: 'auto' }}>\n <div style={{ backgroundColor: '#f4f4f4', padding: 10, borderRadius: 5 }}>\n <SelectContent\n treeProps={props.treeProps}\n value={chenkedIdList}\n onChange={props.onChange}\n fieldNames={props.fieldNames}\n serviceConfig={{\n onRequest: props.onRequest,\n onRequestResultAdapter: (respData) => {\n const listMap: TPlainObject = treeToTiledMap(respData, {\n value: valueKey,\n children: childrenKey,\n });\n props.onChangeDataSource?.(respData, listMap);\n return respData;\n },\n }}\n />\n </div>\n\n <div style={{ marginTop: 20 }}>\n <div style={{ fontSize: 15, fontWeight: '500', marginBottom: 10 }}>\n {chenkedIdList.length > 0 ? (\n <Fragment>\n {selectQuantityPrompt\n ? selectQuantityPrompt.replace(\n '{total}',\n `${chenkedIdList?.length || ''}`\n )\n : `已选择${chenkedIdList?.length}`}\n </Fragment>\n ) : (\n placeholder\n )}\n </div>\n <SelectItemList\n chenkedIdList={chenkedIdList}\n fieldNames={props.fieldNames}\n onDeleteItem={props.onDeleteItem}\n />\n </div>\n </div>\n );\n};\n","import { Fragment, useRef, useState } from 'react';\nimport { isObject } from '@dimjs/lang';\nimport { type TAny, type TPlainObject } from '@flatbiz/utils';\nimport { isUndefinedOrNull, toArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { HorizontalLayout } from './horizontal.jsx';\nimport type { TreeModalContentProps, TreeModelSelectItem } from './types.js';\nimport { VerticalLayout } from './vertical.jsx';\n\n/**\n * 树节点数据选择,一般用于选择员工等\n * ```\n * 1. 可通过 treeProps.checkableType 配置多选节点模式(包括返回所有节点、只返回叶子节点、叶子节点&父节点全选只返回父节点),默认只返回叶子节点\n * 2. demo: https://fex.qa.tcshuke.com/docs/admin/main/selector/tree\n * ```\n */\nexport const TreeModalContent = (props: TreeModalContentProps) => {\n const { isMultiple } = props;\n const labelKey = props.fieldNames?.label || 'label';\n const valueKey = props.fieldNames?.value || 'value';\n const dataSourceMapRef = useRef<TPlainObject>({});\n\n const screenType = fbaHooks.useResponsivePoint() || '';\n\n const direction = screenType === 'xs' ? 'vertical' : 'horizontal';\n const isMultipleFt = isUndefinedOrNull(isMultiple) ? true : isMultiple;\n\n const [values, setValues] = useState<TreeModelSelectItem[]>();\n\n const onDeleteItem = (value) => {\n const targetList = values?.filter((item) => item.value !== value);\n setValues(targetList);\n };\n\n fbaHooks.useEffectCustom(() => {\n const values = toArray<TAny>(props.value).map((item) => {\n const target = isObject(item) ? item : { label: item, value: item };\n const value = target.value;\n return {\n value: value,\n label: dataSourceMapRef.current[value]?.[labelKey] || '',\n };\n });\n setValues(values);\n }, [props.value]);\n\n const treePropsFt = {\n ...props.treeProps,\n checkable: isMultipleFt ? true : false,\n };\n\n const onChange = (values?: TreeModelSelectItem[]) => {\n setValues(values);\n props.onChange?.(values);\n };\n\n const onChangeDataSource = hooks.useCallbackRef(\n (treeDataList: TPlainObject[], mapData: TPlainObject) => {\n dataSourceMapRef.current = mapData;\n const result = values\n ?.map((item) => {\n const target = mapData[item.value];\n return target\n ? { label: target[labelKey], value: target[valueKey] }\n : undefined;\n })\n .filter(Boolean) as TreeModelSelectItem[];\n setValues(result);\n props.onDataSourceChange?.(treeDataList, mapData);\n }\n );\n\n return (\n <Fragment>\n {direction === 'vertical' ? (\n <VerticalLayout\n value={values}\n onDeleteItem={onDeleteItem}\n fieldNames={props.fieldNames}\n onRequest={props.onRequest}\n textConfig={props.textConfig}\n onChange={onChange}\n onChangeDataSource={onChangeDataSource}\n treeProps={treePropsFt}\n ></VerticalLayout>\n ) : (\n <HorizontalLayout\n value={values}\n onDeleteItem={onDeleteItem}\n fieldNames={props.fieldNames}\n onRequest={props.onRequest}\n textConfig={props.textConfig}\n onChange={onChange}\n onChangeDataSource={onChangeDataSource}\n treeProps={treePropsFt}\n />\n )}\n </Fragment>\n );\n};\n","import { Fragment, useMemo, useRef, useState } from 'react';\nimport { useSize } from 'ahooks';\nimport { Modal } from 'antd';\nimport type { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { TreeModalContent } from './select-modal-content.jsx';\nimport type { TreeModalProps, TreeModelSelectItem } from './types.js';\n\n/**\n * 树节点数据选择,一般用于选择员工等\n * ```\n * 1. 可通过 treeProps.checkableType 配置多选节点模式(包括返回所有节点、只返回叶子节点、叶子节点&父节点全选只返回父节点),默认只返回叶子节点\n * 2. demo: https://fex.qa.tcshuke.com/docs/admin/main/selector/tree\n * ```\n */\nexport const TreeModal = (props: TreeModalProps) => {\n const { size = 'large' } = props;\n const [isOpen, setIsOpen] = useState(false);\n\n const htmlSize = useSize(document.querySelector('html'));\n const screenType = fbaHooks.useResponsivePoint() || '';\n\n const direction = screenType === 'xs' ? 'vertical' : 'horizontal';\n\n const handleOnClick = hooks.useCallbackRef(() => {\n setIsOpen(true);\n });\n\n const Action = props.children.type;\n\n const [values, setValues] = useState<TreeModelSelectItem[]>();\n const originalValuesRef = useRef<TreeModelSelectItem[]>([]);\n\n const customSize = useMemo(() => {\n if (!htmlSize?.height || !screenType) return undefined;\n const isXsSm = ['xs', 'sm'].includes(screenType);\n let sizeCalculate: TPlainObject = {};\n if (size == 'large') {\n sizeCalculate = {\n height: htmlSize?.height * 0.65,\n width: 800,\n };\n } else if (size == 'small') {\n sizeCalculate = {\n height: htmlSize?.height * 0.45,\n width: 450,\n };\n } else if (size == 'middle') {\n sizeCalculate = {\n height: htmlSize?.height * 0.55,\n width: 600,\n };\n }\n\n return {\n height: props.modalBodyHeight || sizeCalculate.height,\n width: isXsSm ? '90%' : props.modalWidth || sizeCalculate.width,\n };\n }, [\n htmlSize?.height,\n screenType,\n size,\n props.modalBodyHeight,\n props.modalWidth,\n ]);\n\n const onSubmit = () => {\n props.onChange?.(values);\n setIsOpen(false);\n };\n\n const onCancel = () => {\n setIsOpen(false);\n setValues(originalValuesRef.current);\n };\n\n return (\n <Fragment>\n <Action {...props.children.props} onClick={handleOnClick} />\n <Modal\n className={props.modalClassName}\n title={props.textConfig.title || '选择'}\n open={isOpen}\n onCancel={onCancel}\n forceRender={props.forceRender}\n centered\n width={customSize?.width}\n onOk={onSubmit}\n styles={\n direction === 'horizontal'\n ? {\n body: {\n height: customSize?.height,\n maxHeight: 'calc(100vh - 200px)',\n padding: '0px 0 0 20px',\n },\n content: {\n padding: 0,\n },\n header: {\n padding: '20px 24px 0 20px',\n },\n footer: {\n padding: '0 24px 20px 24px',\n },\n }\n : {\n body: {\n height: customSize?.height,\n },\n }\n }\n >\n <TreeModalContent\n {...props}\n onChange={(values) => {\n setValues(values);\n }}\n />\n </Modal>\n </Fragment>\n );\n};\n","import { attachPropertiesToComponent } from '@flatbiz/utils';\nimport { TreeModal as TreeModalInner } from './select-modal.jsx';\nimport { TreeModalContent } from './select-modal-content.jsx';\n\nexport const TreeModal = attachPropertiesToComponent(TreeModalInner, {\n Content: TreeModalContent,\n});\n"],"names":["SelectItemList","props","chenkedIdList","_jsx","Fragment","children","map","item","value","label","CssNodeHover","style","paddingLeft","paddingRight","_jsxs","FlexLayout","fullIndex","direction","alignItems","fontSize","marginBottom","color","TextOverflow","text","position","zIndex","IconWrapper","_CloseOutlined","onClick","onDeleteItem","bind","size","margin","SelectContent","_props$treeProps","_props$value","modelKey","_hooks","useId","undefined","TreeWrapper","_objectSpread","initRootExpand","showSearch","searchPlaceholder","checkable","checkableType","treeProps","showIcon","icon","fieldNames","labelInValue","serviceConfig","onChange","values","_props$onChange","call","toArray","HorizontalLayout","_props$fieldNames","_props$fieldNames2","valueKey","childrenKey","_props$textConfig","textConfig","selectQuantityPrompt","placeholder","gap","height","overflow","backgroundColor","padding","borderRadius","onRequest","onRequestResultAdapter","respData","_props$onChangeDataSo","listMap","treeToTiledMap","onChangeDataSource","width","display","flexDirection","flexShrink","fontWeight","length","replace","concat","flex","VerticalLayout","marginTop","TreeModalContent","isMultiple","labelKey","dataSourceMapRef","useRef","screenType","fbaHooks","useResponsivePoint","isMultipleFt","isUndefinedOrNull","_useState","useState","_useState2","_slicedToArray","setValues","targetList","filter","useEffectCustom","_dataSourceMapRef$cur","target","_isObject","current","treePropsFt","useCallbackRef","treeDataList","mapData","_props$onDataSourceCh","result","Boolean","onDataSourceChange","TreeModal","_props$size","isOpen","setIsOpen","htmlSize","useSize","document","querySelector","handleOnClick","Action","type","_useState3","_useState4","originalValuesRef","customSize","useMemo","isXsSm","includes","sizeCalculate","modalBodyHeight","modalWidth","onSubmit","onCancel","Modal","className","modalClassName","title","open","forceRender","centered","onOk","styles","body","maxHeight","content","header","footer","attachPropertiesToComponent","TreeModalInner","Content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAI9B,EAAK;AACJ,EAAA,IAAMC,aAAa,GAAGD,KAAK,CAACC,aAAa;EACzC,oBACEC,GAAA,CAACC,QAAQ,EAAA;IAAAC,QAAA,EACNH,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAEI,GAAG,CAAC,UAACC,IAAI,EAAK;AAC5B,MAAA,IAAMC,KAAK,GAAGD,IAAI,CAACC,KAAK;AACxB,MAAA,IAAMC,KAAK,GAAGF,IAAI,CAACE,KAAK,IAAID,KAAK;MAE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AU,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAU,CAAEvD,KAAM;AACzBuE,MAAAA,IAAI,EAAET,QAAS;AACfU,MAAAA,MAAM,EACJvI,SAAS,KAAK,YAAY,GACtB;AACEwI,QAAAA,IAAI,EAAE;AACJrF,UAAAA,MAAM,EAAEmE,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAU,CAAEnE,MAAM;AAC1BsF,UAAAA,SAAS,EAAE,qBAAqB;AAChCnF,UAAAA,OAAO,EAAE;SACV;AACDoF,QAAAA,OAAO,EAAE;AACPpF,UAAAA,OAAO,EAAE;SACV;AACDqF,QAAAA,MAAM,EAAE;AACNrF,UAAAA,OAAO,EAAE;SACV;AACDsF,QAAAA,MAAM,EAAE;AACNtF,UAAAA,OAAO,EAAE;AACX;AACF,OAAC,GACD;AACEkF,QAAAA,IAAI,EAAE;AACJrF,UAAAA,MAAM,EAAEmE,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAVA,UAAU,CAAEnE;AACtB;OAEP;MAAA/D,QAAA,eAEDF,GAAA,CAACwF,gBAAgB,EAAAlD,cAAA,CAAAA,cAAA,CAAA,EAAA,EACXxC,KAAK,CAAA,EAAA,EAAA,EAAA;AACToD,QAAAA,QAAQ,EAAE,SAAVA,QAAQA,CAAGC,MAAM,EAAK;UACpBmD,SAAS,CAACnD,MAAM,CAAC;AACnB;OACD,CAAA;AAAC,KACG,CAAC;AAAA,GACA,CAAC;AAEf,CAAC;;ICvHYmE,SAAS,GAAGqC,2BAA2B,CAACC,WAAc,EAAE;AACnEC,EAAAA,OAAO,EAAErE;AACX,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
2
2
  import { ButtonProps, DropdownProps, FormInstance, ModalProps, PopconfirmProps, SpaceProps, TreeProps } from 'antd';
3
3
  import { ConfigProviderProps } from 'antd/es/config-provider';
4
- import { CSSProperties, DependencyList, ReactElement } from 'react';
4
+ import { CSSProperties, DependencyList, ReactElement, ReactNode } from 'react';
5
5
 
6
6
  export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "color"> & {
7
7
  /** 当返回 Promise 时,按钮自动loading */
@@ -80,7 +80,7 @@ export interface DropdownMenuItem extends Omit<ButtonProps, "color"> {
80
80
  onClick?: (event: React.MouseEvent<HTMLElement>) => void | Promise<void>;
81
81
  permission?: string;
82
82
  needConfirm?: boolean;
83
- confirmMessage?: string;
83
+ confirmMessage?: ReactNode;
84
84
  hidden?: boolean;
85
85
  confirmModalProps?: DialogModalProps;
86
86
  stopPropagation?: boolean;
@@ -102,7 +102,7 @@ export interface ButtonOperateItem extends ButtonWrapperProps {
102
102
  /** 是否需要二次弹框确认 */
103
103
  needConfirm?: boolean;
104
104
  /** 二次弹框确认文案 */
105
- confirmMessage?: string;
105
+ confirmMessage?: ReactNode;
106
106
  popconfirmProps?: Pick<PopconfirmProps, "placement" | "okText" | "cancelText" | "trigger">;
107
107
  /** 是否折叠合拢 */
108
108
  isFold?: boolean;
@@ -367,13 +367,10 @@ export type TreeModelSelectItem = {
367
367
  value: string | number;
368
368
  };
369
369
  export type TreeModelSelectValue = TreeModelSelectItem[] | Array<TreeModelSelectItem["value"]> | TreeModelSelectItem["value"];
370
- export type TreeModalProps = {
370
+ export type TreeModalContentProps = {
371
371
  /** 是否多选,默认值:true */
372
372
  isMultiple?: boolean;
373
373
  forceRender?: boolean;
374
- children: ReactElement & {
375
- onClick?: (e: any) => void | Promise<void>;
376
- };
377
374
  /**
378
375
  * 内置尺寸,根据比例固定高度、宽度,默认:large
379
376
  */
@@ -395,13 +392,16 @@ export type TreeModalProps = {
395
392
  /** 选择数量提示,例如:已选择{total}位用户 */
396
393
  selectQuantityPrompt?: string;
397
394
  };
398
- /** 选中值变更change,包括入参value、操作选中等 */
399
- onSelectChange?: (values?: TreeModelSelectItem[]) => void;
400
- onChangeDataSource?: (treeDataList: TPlainObject[], mapData: TPlainObject) => void;
395
+ onDataSourceChange?: (treeDataList: TPlainObject[], mapData: TPlainObject) => void;
396
+ treeProps?: Pick<TreeWrapperProps, "showSearch" | "searchResultType" | "searchPlaceholder" | "searchValue" | "loadDataFlag" | "loadDataServiceConfig" | "icon" | "disabledCanUse" | "treeItemDataAdapter" | "searchExtraElement" | "initRootExpand" | "searchResultType" | "labelRender" | "customSearchRule" | "checkableType" | "checkStrictly" | "defaultExpandAll">;
397
+ };
398
+ export type TreeModalProps = TreeModalContentProps & {
399
+ children: ReactElement & {
400
+ onClick?: (e: any) => void | Promise<void>;
401
+ };
401
402
  modalClassName?: string;
402
403
  modalWidth?: number;
403
404
  modalBodyHeight?: number;
404
- treeProps?: Pick<TreeWrapperProps, "showSearch" | "searchResultType" | "searchPlaceholder" | "searchValue" | "loadDataFlag" | "loadDataServiceConfig" | "icon" | "disabledCanUse" | "treeItemDataAdapter" | "searchExtraElement" | "initRootExpand" | "searchResultType" | "labelRender" | "customSearchRule" | "checkableType">;
405
405
  };
406
406
  export type TreeModalSelectorProps = Omit<TreeModalProps, "children" | "forceRender" | "onChange"> & {
407
407
  placeholder?: string;
@@ -15,14 +15,14 @@ import './../tree-wrapper/index.css';
15
15
  import './index.css';
16
16
  /*! @flatjs/forge MIT @flatbiz/antd */
17
17
 
18
- export { T as TreeModalSelector } from '../selector-HbymPXNd.js';
18
+ export { T as TreeModalSelector } from '../selector-CxZacuxg.js';
19
19
  import '../_rollupPluginBabelHelpers-BYm17lo8.js';
20
+ import '@wove/react/hooks';
20
21
  import '@dimjs/lang/is-object';
21
22
  import 'react';
22
23
  import 'antd';
23
24
  import '@flatbiz/utils';
24
- import '../select-modal-Dt4YHH8a.js';
25
- import '@wove/react/hooks';
25
+ import '../tree-modal/index.js';
26
26
  import 'ahooks';
27
27
  import '../fba-hooks/index.js';
28
28
  import '../use-responsive-point-Bp3D3lZT.js';
@@ -43,7 +43,7 @@ import '@ant-design/icons/es/icons/MoreOutlined.js';
43
43
  import '@dimjs/utils/extend/extend';
44
44
  import '@dimjs/utils/get/get';
45
45
  import '@dimjs/model';
46
- import '../button-operate-BRkW26Up.js';
46
+ import '../button-operate-C7NGikli.js';
47
47
  import '@dimjs/lang/is-plain-object';
48
48
  import '@dimjs/lang/is-promise';
49
49
  import '../button-wrapper-l9FUsrWl.js';
@@ -1,7 +1,7 @@
1
1
  import { TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
2
2
  import { ButtonProps, DropdownProps, FormInstance, ModalProps, PopconfirmProps, SpaceProps, TreeProps } from 'antd';
3
3
  import { ConfigProviderProps } from 'antd/es/config-provider';
4
- import { CSSProperties, DependencyList, ForwardRefExoticComponent, ReactElement, RefAttributes } from 'react';
4
+ import { CSSProperties, DependencyList, ForwardRefExoticComponent, ReactElement, ReactNode, RefAttributes } from 'react';
5
5
 
6
6
  export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "color"> & {
7
7
  /** 当返回 Promise 时,按钮自动loading */
@@ -80,7 +80,7 @@ export interface DropdownMenuItem extends Omit<ButtonProps, "color"> {
80
80
  onClick?: (event: React.MouseEvent<HTMLElement>) => void | Promise<void>;
81
81
  permission?: string;
82
82
  needConfirm?: boolean;
83
- confirmMessage?: string;
83
+ confirmMessage?: ReactNode;
84
84
  hidden?: boolean;
85
85
  confirmModalProps?: DialogModalProps;
86
86
  stopPropagation?: boolean;
@@ -102,7 +102,7 @@ export interface ButtonOperateItem extends ButtonWrapperProps {
102
102
  /** 是否需要二次弹框确认 */
103
103
  needConfirm?: boolean;
104
104
  /** 二次弹框确认文案 */
105
- confirmMessage?: string;
105
+ confirmMessage?: ReactNode;
106
106
  popconfirmProps?: Pick<PopconfirmProps, "placement" | "okText" | "cancelText" | "trigger">;
107
107
  /** 是否折叠合拢 */
108
108
  isFold?: boolean;
@@ -22,7 +22,7 @@ import { get } from '@dimjs/utils/get/get';
22
22
  import { forwardRef, useState, useMemo, useRef, useImperativeHandle, Fragment, isValidElement } from 'react';
23
23
  import { Spin, Tree, Button, message } from 'antd';
24
24
  import { cloneState } from '@dimjs/model';
25
- import { a as ButtonOperate } from '../button-operate-BRkW26Up.js';
25
+ import { a as ButtonOperate } from '../button-operate-C7NGikli.js';
26
26
  import { D as DropdownMenuWrapper } from '../dropdown-menu-wrapper-CSzVvlcO.js';
27
27
  import { fbaHooks } from '../fba-hooks/index.js';
28
28
  import { I as InputSearchWrapper } from '../input-search-wrapper-wVYGWi2O.js';
@@ -433,7 +433,7 @@ var TreeWrapper$1 = /*#__PURE__*/forwardRef(function (props, ref) {
433
433
  }, [labelInValueFieldNamesMerge, value]);
434
434
  fbaHooks.useEffectCustom(function () {
435
435
  if (state.treeList.length > 0) {
436
- if (responseFirstRef.current) {
436
+ if (responseFirstRef.current && isUndefinedOrNull(value)) {
437
437
  responseFirstRef.current = false;
438
438
  if (defaultExpandAll) {
439
439
  setTreeExpandedKeys(getDefaultExpandAllKeys(state.treeList, fieldNames));