@kne/super-select 0.1.48 → 0.1.49

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.
@@ -1,4 +1,4 @@
1
- import React, { useMemo, forwardRef, useState, useCallback, useLayoutEffect, useEffect, useImperativeHandle, useRef } from 'react';
1
+ import React$1, { useMemo, forwardRef, useState, useCallback, useLayoutEffect, useEffect, useImperativeHandle, useRef } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import { createContext } from '@kne/global-context';
4
4
  import useResize from '@kne/use-resize';
@@ -6,7 +6,7 @@ import useControlValue from '@kne/use-control-value';
6
6
  import classnames from 'classnames';
7
7
  import isEqual from 'lodash/isEqual';
8
8
  import last from 'lodash/last';
9
- import { Tag, Modal, App, Dropdown, Flex, Checkbox, List, Empty, Row, Col, Button, Popover, Tree, Space, Badge, Spin } from 'antd';
9
+ import { Tag, Modal, App, Dropdown, Flex, Checkbox, List, Empty, Pagination, Row, Col, Button, Popover, Tree, Space, Badge, Spin } from 'antd';
10
10
  import { CloseCircleFilled, DownOutlined, CheckOutlined, RightOutlined } from '@ant-design/icons';
11
11
  import { isNotEmpty } from '@kne/is-empty';
12
12
  import { usePopupContainer, useScrollElement, useMobilePopupMount, MOBILE_POPUP_MODE } from '@kne/responsive-utils';
@@ -19,14 +19,14 @@ import SearchInput from '@kne/search-input';
19
19
  import { FetchScrollLoader } from '@kne/scroll-loader';
20
20
  import '@kne/scroll-loader/dist/index.css';
21
21
  import merge from 'lodash/merge';
22
- import TablePage, { hasColumnWidth, isTreeDataType, normalizeTreeData, flattenAllTree } from '@kne/table-page';
23
- export { mergeTreeChildren } from '@kne/table-page';
24
- import '@kne/table-page/dist/index.css';
22
+ import { Table, hasColumnWidth, isTreeDataType, normalizeTreeData, flattenAllTree } from '@kne/table-view';
23
+ export { mergeTreeChildren } from '@kne/table-view';
24
+ import '@kne/table-view/dist/index.css';
25
+ import Fetch, { withFetch } from '@kne/react-fetch';
25
26
  import { CentralContent } from '@kne/info-page';
26
27
  import '@kne/info-page/dist/index.css';
27
28
  import memoize from 'lodash/memoize';
28
29
  import isNil from 'lodash/isNil';
29
- import Fetch from '@kne/react-fetch';
30
30
 
31
31
  function _extends() {
32
32
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
@@ -121,24 +121,24 @@ const TagOverflowInner = ({
121
121
  const displayCount = ready ? visibleCount : list.length;
122
122
  const displayTags = list.slice(0, displayCount);
123
123
  const showOverflow = ready && hiddenCount > 0;
124
- return /*#__PURE__*/React.createElement("div", {
124
+ return /*#__PURE__*/React$1.createElement("div", {
125
125
  ref: setContainerRef,
126
126
  className: style$6['tag-overflow'],
127
127
  style: {
128
128
  width: availableWidth || '100%',
129
129
  maxWidth: '100%'
130
130
  }
131
- }, shouldMeasure ? /*#__PURE__*/React.createElement("div", {
131
+ }, shouldMeasure ? /*#__PURE__*/React$1.createElement("div", {
132
132
  ref: setMeasureRef,
133
133
  className: style$6['measure-layer'],
134
134
  "aria-hidden": true,
135
135
  style: {
136
136
  gap: TAG_GAP
137
137
  }
138
- }, list.map(item => /*#__PURE__*/React.createElement("div", {
138
+ }, list.map(item => /*#__PURE__*/React$1.createElement("div", {
139
139
  key: item[valueKey],
140
140
  "data-tag-measure": true
141
- }, /*#__PURE__*/React.createElement(Tag, {
141
+ }, /*#__PURE__*/React$1.createElement(Tag, {
142
142
  closable: true,
143
143
  bordered: false,
144
144
  className: style$6['tag-item'],
@@ -146,21 +146,21 @@ const TagOverflowInner = ({
146
146
  '--max-tag-width': `${maxTagWidth}px`,
147
147
  margin: 0
148
148
  }
149
- }, /*#__PURE__*/React.createElement("span", {
149
+ }, /*#__PURE__*/React$1.createElement("span", {
150
150
  className: style$6['tag-label']
151
- }, item[labelKey])))), /*#__PURE__*/React.createElement("div", {
151
+ }, item[labelKey])))), /*#__PURE__*/React$1.createElement("div", {
152
152
  ref: setMoreMeasureRef
153
- }, /*#__PURE__*/React.createElement(Tag, {
153
+ }, /*#__PURE__*/React$1.createElement(Tag, {
154
154
  className: style$6['overflow-tag'],
155
155
  style: {
156
156
  margin: 0
157
157
  }
158
- }, "+99"))) : null, /*#__PURE__*/React.createElement("div", {
158
+ }, "+99"))) : null, /*#__PURE__*/React$1.createElement("div", {
159
159
  className: style$6['tag-overflow-content'],
160
160
  style: {
161
161
  gap: TAG_GAP
162
162
  }
163
- }, displayTags.map(item => /*#__PURE__*/React.createElement(Tag, {
163
+ }, displayTags.map(item => /*#__PURE__*/React$1.createElement(Tag, {
164
164
  key: item[valueKey],
165
165
  closable: true,
166
166
  bordered: false,
@@ -173,15 +173,15 @@ const TagOverflowInner = ({
173
173
  e.preventDefault();
174
174
  onRemove(item);
175
175
  }
176
- }, /*#__PURE__*/React.createElement("span", {
176
+ }, /*#__PURE__*/React$1.createElement("span", {
177
177
  className: style$6['tag-label'],
178
178
  title: item[labelKey]
179
- }, item[labelKey]))), showOverflow ? /*#__PURE__*/React.createElement(Tag, {
179
+ }, item[labelKey]))), showOverflow ? /*#__PURE__*/React$1.createElement(Tag, {
180
180
  className: style$6['overflow-tag']
181
181
  }, "+", hiddenCount) : null));
182
182
  };
183
183
 
184
- const _excluded$3 = ["children"];
184
+ const _excluded$4 = ["children"];
185
185
  const MOBILE_SHEET_MAX_HEIGHT = '80%';
186
186
  const MOBILE_SHEET_MIN_HEIGHT = '30%';
187
187
  const MOBILE_MASK_Z_INDEX = 1000;
@@ -259,7 +259,7 @@ const ModalContent = _ref => {
259
259
  let {
260
260
  children: renderContent
261
261
  } = _ref,
262
- others = _objectWithoutPropertiesLoose(_ref, _excluded$3);
262
+ others = _objectWithoutPropertiesLoose(_ref, _excluded$4);
263
263
  const {
264
264
  open,
265
265
  value: propsValue
@@ -286,7 +286,7 @@ const ModalContent = _ref => {
286
286
  }
287
287
  }
288
288
  });
289
- return /*#__PURE__*/React.createElement(Provider, {
289
+ return /*#__PURE__*/React$1.createElement(Provider, {
290
290
  value: contextProps
291
291
  }, renderContent(contextProps));
292
292
  };
@@ -317,7 +317,7 @@ const MobileSheetMask = ({
317
317
  if (!renderMask || !mountNode) {
318
318
  return null;
319
319
  }
320
- return createPortal(/*#__PURE__*/React.createElement("div", {
320
+ return createPortal(/*#__PURE__*/React$1.createElement("div", {
321
321
  className: classnames(style$6['mobile-sheet-mask'], maskClosing && style$6['mobile-sheet-mask-leave'], fixedModeClass),
322
322
  style: {
323
323
  zIndex: MOBILE_MASK_Z_INDEX
@@ -335,16 +335,16 @@ const MobileSheetHeader = ({
335
335
  onCancel,
336
336
  onConfirm
337
337
  }) => {
338
- return /*#__PURE__*/React.createElement("div", {
338
+ return /*#__PURE__*/React$1.createElement("div", {
339
339
  className: style$6['mobile-sheet-header']
340
- }, /*#__PURE__*/React.createElement("button", {
340
+ }, /*#__PURE__*/React$1.createElement("button", {
341
341
  type: "button",
342
342
  className: style$6['mobile-sheet-action'],
343
343
  onClick: onCancel
344
- }, cancelText), /*#__PURE__*/React.createElement("div", {
344
+ }, cancelText), /*#__PURE__*/React$1.createElement("div", {
345
345
  className: style$6['mobile-sheet-title'],
346
346
  title: title
347
- }, title), /*#__PURE__*/React.createElement("button", {
347
+ }, title), /*#__PURE__*/React$1.createElement("button", {
348
348
  type: "button",
349
349
  className: classnames(style$6['mobile-sheet-action'], style$6['mobile-sheet-confirm']),
350
350
  onClick: onConfirm
@@ -365,7 +365,7 @@ const MobileSheetPanel = ({
365
365
  if (!open || !mountNode) {
366
366
  return null;
367
367
  }
368
- return createPortal(/*#__PURE__*/React.createElement("div", {
368
+ return createPortal(/*#__PURE__*/React$1.createElement("div", {
369
369
  className: classnames(style$6['mobile-sheet-popup'], style$6['mobile-sheet-portal'], fixedModeClass, overlayClassName),
370
370
  style: {
371
371
  zIndex: MOBILE_POPUP_Z_INDEX,
@@ -379,13 +379,13 @@ const MobileSheetPanel = ({
379
379
  e.preventDefault();
380
380
  }
381
381
  }
382
- }, /*#__PURE__*/React.createElement(MobileSheetHeader, {
382
+ }, /*#__PURE__*/React$1.createElement(MobileSheetHeader, {
383
383
  title: title,
384
384
  cancelText: cancelText,
385
385
  confirmText: confirmText,
386
386
  onCancel: onCancel,
387
387
  onConfirm: onConfirm
388
- }), /*#__PURE__*/React.createElement("div", {
388
+ }), /*#__PURE__*/React$1.createElement("div", {
389
389
  className: classnames(style$6['mobile-sheet-body'], style$6['overlay-content'], 'over-content'),
390
390
  onClick: e => {
391
391
  e.stopPropagation();
@@ -458,12 +458,12 @@ const SelectInput = createWithIntlProvider({
458
458
  if (isMobile && !disableMobileSheet) {
459
459
  const mountNode = typeof getPopupContainer === 'function' ? getPopupContainer() : null;
460
460
  const closeWithoutCommit = () => onOpenChange(false);
461
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileSheetMask, {
461
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(MobileSheetMask, {
462
462
  open: open,
463
463
  mountNode: mountNode,
464
464
  fixedModeClass: fixedModeClass,
465
465
  onClose: closeWithoutCommit
466
- }), /*#__PURE__*/React.createElement(MobileSheetPanel, {
466
+ }), /*#__PURE__*/React$1.createElement(MobileSheetPanel, {
467
467
  open: open,
468
468
  mountNode: mountNode,
469
469
  fixedModeClass: fixedModeClass,
@@ -482,7 +482,7 @@ const SelectInput = createWithIntlProvider({
482
482
  }
483
483
  }, open ? children(contextProps) : null));
484
484
  }
485
- return /*#__PURE__*/React.createElement(Modal, {
485
+ return /*#__PURE__*/React$1.createElement(Modal, {
486
486
  className: overlayClassName,
487
487
  width: 1000,
488
488
  open: open,
@@ -730,7 +730,7 @@ const SelectInput = createWithIntlProvider({
730
730
  if (typeof contextProps.props.inputRender === 'function') {
731
731
  return contextProps.props.inputRender(props, contextProps);
732
732
  }
733
- return /*#__PURE__*/React.createElement(Flex, _extends({}, props, {
733
+ return /*#__PURE__*/React$1.createElement(Flex, _extends({}, props, {
734
734
  ref: setContainerRef,
735
735
  className: classnames(className, style$6['select-input'], 'select-input', {
736
736
  [style$6['wrap']]: labelWrap,
@@ -748,35 +748,35 @@ const SelectInput = createWithIntlProvider({
748
748
  }
749
749
  }), (() => {
750
750
  const current = typeof prefix === 'function' ? prefix(contextProps) : prefix;
751
- return current && /*#__PURE__*/React.createElement("span", {
751
+ return current && /*#__PURE__*/React$1.createElement("span", {
752
752
  className: classnames(style$6['select-input-prefix'], 'select-input-prefix'),
753
753
  onClick: e => {
754
754
  e.stopPropagation();
755
755
  }
756
756
  }, current);
757
- })(), /*#__PURE__*/React.createElement("div", {
757
+ })(), /*#__PURE__*/React$1.createElement("div", {
758
758
  className: classnames(style$6['select-input-inner'], 'select-input-inner')
759
- }, value.length > 0 ? single || value[0][valueKey] === selectedAllValue[valueKey] ? /*#__PURE__*/React.createElement("span", {
759
+ }, value.length > 0 ? single || value[0][valueKey] === selectedAllValue[valueKey] ? /*#__PURE__*/React$1.createElement("span", {
760
760
  className: classnames(style$6['single-label'], 'select-input-single-label'),
761
761
  title: value[0][labelKey]
762
- }, value[0][labelKey]) : /*#__PURE__*/React.createElement(TagOverflowInner, {
762
+ }, value[0][labelKey]) : /*#__PURE__*/React$1.createElement(TagOverflowInner, {
763
763
  value: value,
764
764
  innerWidth: innerWidth,
765
765
  labelKey: labelKey,
766
766
  valueKey: valueKey,
767
767
  onRemove: onRemove
768
- }) : /*#__PURE__*/React.createElement("span", {
768
+ }) : /*#__PURE__*/React$1.createElement("span", {
769
769
  className: classnames(style$6['placeholder'], 'select-input-placeholder')
770
- }, placeholder)), /*#__PURE__*/React.createElement("div", {
770
+ }, placeholder)), /*#__PURE__*/React$1.createElement("div", {
771
771
  className: classnames(style$6['select-input-icon'], 'select-input-icon')
772
- }, !disabled && allowClear && hover && value.length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
772
+ }, !disabled && allowClear && hover && value.length > 0 ? /*#__PURE__*/React$1.createElement(CloseCircleFilled, {
773
773
  onClick: e => {
774
774
  e.stopPropagation();
775
775
  setValue([]);
776
776
  }
777
- }) : /*#__PURE__*/React.createElement(DownOutlined, null)), (() => {
777
+ }) : /*#__PURE__*/React$1.createElement(DownOutlined, null)), (() => {
778
778
  const current = typeof suffix === 'function' ? suffix(contextProps) : suffix;
779
- return current && /*#__PURE__*/React.createElement("span", {
779
+ return current && /*#__PURE__*/React$1.createElement("span", {
780
780
  className: classnames(style$6['select-input-suffix'], 'select-input-suffix'),
781
781
  onClick: e => {
782
782
  e.stopPropagation();
@@ -799,7 +799,7 @@ const SelectInput = createWithIntlProvider({
799
799
  // 移动端半屏:与 Modal 一致,临时选中 + 取消/确认
800
800
  if (useMobileSheet) {
801
801
  const closeWithoutCommit = () => setOpen(false);
802
- return /*#__PURE__*/React.createElement(Provider, {
802
+ return /*#__PURE__*/React$1.createElement(Provider, {
803
803
  value: contextProps
804
804
  }, inputInnerRender({
805
805
  onClick: () => {
@@ -807,16 +807,16 @@ const SelectInput = createWithIntlProvider({
807
807
  setOpen(true);
808
808
  }
809
809
  }
810
- }), /*#__PURE__*/React.createElement(ModalContent, contextProps, sheetContextProps => {
810
+ }), /*#__PURE__*/React$1.createElement(ModalContent, contextProps, sheetContextProps => {
811
811
  const {
812
812
  onComplete
813
813
  } = sheetContextProps;
814
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileSheetMask, {
814
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(MobileSheetMask, {
815
815
  open: sheetOpen,
816
816
  mountNode: popupMountNode,
817
817
  fixedModeClass: fixedModeClass,
818
818
  onClose: closeWithoutCommit
819
- }), /*#__PURE__*/React.createElement(MobileSheetPanel, {
819
+ }), /*#__PURE__*/React$1.createElement(MobileSheetPanel, {
820
820
  open: sheetOpen,
821
821
  mountNode: popupMountNode,
822
822
  fixedModeClass: fixedModeClass,
@@ -836,7 +836,7 @@ const SelectInput = createWithIntlProvider({
836
836
  }, sheetOpen ? children(sheetContextProps) : null));
837
837
  }));
838
838
  }
839
- const overlayContent = /*#__PURE__*/React.createElement("div", {
839
+ const overlayContent = /*#__PURE__*/React$1.createElement("div", {
840
840
  style: {
841
841
  '--overlay-width': popupOverlayWidth
842
842
  },
@@ -845,9 +845,9 @@ const SelectInput = createWithIntlProvider({
845
845
  e.stopPropagation();
846
846
  }
847
847
  }, isOverlayOpen ? children(contextProps) : null);
848
- return /*#__PURE__*/React.createElement(Provider, {
848
+ return /*#__PURE__*/React$1.createElement(Provider, {
849
849
  value: contextProps
850
- }, isPopup ? /*#__PURE__*/React.createElement(Dropdown, {
850
+ }, isPopup ? /*#__PURE__*/React$1.createElement(Dropdown, {
851
851
  open: isOverlayOpen,
852
852
  onOpenChange: handleOpenChange,
853
853
  placement: placement,
@@ -863,11 +863,11 @@ const SelectInput = createWithIntlProvider({
863
863
  destroyOnHidden: true,
864
864
  popupRender: () => overlayContent,
865
865
  dropdownRender: () => overlayContent
866
- }, /*#__PURE__*/React.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React.createElement(React.Fragment, null, inputInnerRender({
866
+ }, /*#__PURE__*/React$1.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, inputInnerRender({
867
867
  onClick: () => {
868
868
  setOpen(true);
869
869
  }
870
- }), /*#__PURE__*/React.createElement(ModalContent, contextProps, renderModal)));
870
+ }), /*#__PURE__*/React$1.createElement(ModalContent, contextProps, renderModal)));
871
871
  }));
872
872
 
873
873
  var style$5 = {"selected-all":"kne-super-select_prlgN"};
@@ -893,14 +893,14 @@ const SelectedAll = createWithIntlProvider('zh-CN', locale$1, 'super-select')(()
893
893
  })
894
894
  }, props);
895
895
  const isSelectedAll = computedIsSelectAll(value, selectedAllValue, valueKey);
896
- return /*#__PURE__*/React.createElement(Flex, {
896
+ return /*#__PURE__*/React$1.createElement(Flex, {
897
897
  justify: "space-between",
898
898
  className: classnames(style$5['selected-all'], 'selected-all')
899
- }, /*#__PURE__*/React.createElement(Flex, {
899
+ }, /*#__PURE__*/React$1.createElement(Flex, {
900
900
  gap: 8
901
- }, /*#__PURE__*/React.createElement("span", null, formatMessage({
901
+ }, /*#__PURE__*/React$1.createElement("span", null, formatMessage({
902
902
  id: 'selected'
903
- }), ":"), /*#__PURE__*/React.createElement("span", null, isSelectedAll ? selectedAllValue.label : typeof unit === 'function' ? unit(value.length) : value.length)), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Checkbox, {
903
+ }), ":"), /*#__PURE__*/React$1.createElement("span", null, isSelectedAll ? selectedAllValue.label : typeof unit === 'function' ? unit(value.length) : value.length)), /*#__PURE__*/React$1.createElement("span", null, /*#__PURE__*/React$1.createElement(Checkbox, {
904
904
  checked: isSelectedAll,
905
905
  onChange: e => {
906
906
  const checked = e.target.checked;
@@ -935,21 +935,21 @@ const SelectedTagList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
935
935
  labelKey,
936
936
  valueKey
937
937
  } = Object.assign({}, props);
938
- return /*#__PURE__*/React.createElement(Flex, {
938
+ return /*#__PURE__*/React$1.createElement(Flex, {
939
939
  className: classnames(style$4['tag-list'], 'selected-tag-list'),
940
940
  gap: 8
941
- }, /*#__PURE__*/React.createElement("div", {
941
+ }, /*#__PURE__*/React$1.createElement("div", {
942
942
  className: style$4['label']
943
943
  }, formatMessage({
944
944
  id: 'selected'
945
- }), !single && value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(SimpleBar, {
945
+ }), !single && value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React$1.createElement(SimpleBar, {
946
946
  className: style$4['tag-container']
947
- }, /*#__PURE__*/React.createElement(Flex, {
947
+ }, /*#__PURE__*/React$1.createElement(Flex, {
948
948
  gap: 8,
949
949
  wrap: true,
950
950
  className: style$4['tag-container-inner']
951
951
  }, value.map(item => {
952
- return /*#__PURE__*/React.createElement(Tag, {
952
+ return /*#__PURE__*/React$1.createElement(Tag, {
953
953
  className: style$4['tag'],
954
954
  key: item[valueKey],
955
955
  closable: true,
@@ -958,7 +958,7 @@ const SelectedTagList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
958
958
  e.preventDefault();
959
959
  onRemove(item);
960
960
  }
961
- }, /*#__PURE__*/React.createElement("span", {
961
+ }, /*#__PURE__*/React$1.createElement("span", {
962
962
  className: style$4['tag-inner']
963
963
  }, item[labelKey]));
964
964
  }))));
@@ -966,12 +966,12 @@ const SelectedTagList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
966
966
 
967
967
  var style$3 = {"kne-responsive-boundary":"kne-super-select_Nc-y4","kne-responsive-scroll":"kne-super-select_RlrDm","list":"kne-super-select_IsXdU","empty":"kne-super-select_SQZ8k","default-list":"kne-super-select_QD1Mz","is-selected-all":"kne-super-select_M-mOy","default-list-item":"kne-super-select_KtOsz","is-selected":"kne-super-select_TQhBB","single-checked":"kne-super-select_2rUrh","is-disabled":"kne-super-select_NbwX5","selected-all":"kne-super-select_vN2Fx","selected-tag":"kne-super-select_6oITk","select-search":"kne-super-select_iAH9D","select-list-item-description":"kne-super-select_TCkeJ","footer":"kne-super-select_v3f23","is-mobile":"kne-super-select_w-WB8"};
968
968
 
969
- const _excluded$2 = ["children"];
969
+ const _excluded$3 = ["children"];
970
970
  const SelectList = forwardRef((_ref, ref) => {
971
971
  let {
972
972
  children
973
973
  } = _ref,
974
- p = _objectWithoutPropertiesLoose(_ref, _excluded$2);
974
+ p = _objectWithoutPropertiesLoose(_ref, _excluded$3);
975
975
  const fetchListRef = useRef(null);
976
976
  const props = Object.assign({}, {
977
977
  renderItemContent: ({
@@ -981,9 +981,9 @@ const SelectList = forwardRef((_ref, ref) => {
981
981
  const {
982
982
  labelKey
983
983
  } = props;
984
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
984
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
985
985
  className: 'select-list-item-label'
986
- }, item[labelKey]), item.description && /*#__PURE__*/React.createElement("div", {
986
+ }, item[labelKey]), item.description && /*#__PURE__*/React$1.createElement("div", {
987
987
  className: classnames(style$3['select-list-item-description'], 'select-list-item-description')
988
988
  }, item.description));
989
989
  },
@@ -1004,7 +1004,7 @@ const SelectList = forwardRef((_ref, ref) => {
1004
1004
  valueKey
1005
1005
  } = props;
1006
1006
  const isChecked = value.some(target => target[valueKey] === item[valueKey]);
1007
- return /*#__PURE__*/React.createElement(List.Item, {
1007
+ return /*#__PURE__*/React$1.createElement(List.Item, {
1008
1008
  className: classnames(style$3['default-list-item'], 'select-list-item', {
1009
1009
  [style$3['is-selected']]: isChecked,
1010
1010
  [style$3['is-disabled']]: item.disabled
@@ -1027,17 +1027,17 @@ const SelectList = forwardRef((_ref, ref) => {
1027
1027
  onOpenChange(false);
1028
1028
  }
1029
1029
  }
1030
- }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
1030
+ }, !single && /*#__PURE__*/React$1.createElement(Flex, null, /*#__PURE__*/React$1.createElement(Checkbox, {
1031
1031
  checked: isSelectedAll || isChecked,
1032
1032
  disabled: isSelectedAll || item.disabled
1033
- })), /*#__PURE__*/React.createElement(Flex, {
1033
+ })), /*#__PURE__*/React$1.createElement(Flex, {
1034
1034
  vertical: true,
1035
1035
  gag: 8,
1036
1036
  flex: 1,
1037
1037
  className: 'select-list-item-content'
1038
- }, renderItemContent(contextProps)), single && /*#__PURE__*/React.createElement("div", {
1038
+ }, renderItemContent(contextProps)), single && /*#__PURE__*/React$1.createElement("div", {
1039
1039
  className: style$3['single-checked']
1040
- }, isChecked && /*#__PURE__*/React.createElement(CheckOutlined, null)));
1040
+ }, isChecked && /*#__PURE__*/React$1.createElement(CheckOutlined, null)));
1041
1041
  },
1042
1042
  renderList: contextProps => {
1043
1043
  const {
@@ -1049,11 +1049,11 @@ const SelectList = forwardRef((_ref, ref) => {
1049
1049
  renderItem
1050
1050
  } = props;
1051
1051
  if (!(list && list.length > 0)) {
1052
- return props.empty || /*#__PURE__*/React.createElement(Empty, {
1052
+ return props.empty || /*#__PURE__*/React$1.createElement(Empty, {
1053
1053
  className: style$3['empty']
1054
1054
  });
1055
1055
  }
1056
- return /*#__PURE__*/React.createElement(List, {
1056
+ return /*#__PURE__*/React$1.createElement(List, {
1057
1057
  className: classnames(style$3['default-list'], {
1058
1058
  [style$3['is-selected-all']]: isSelectedAll
1059
1059
  }),
@@ -1065,7 +1065,7 @@ const SelectList = forwardRef((_ref, ref) => {
1065
1065
  });
1066
1066
  }
1067
1067
  }, p);
1068
- return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
1068
+ return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
1069
1069
  ref: ref
1070
1070
  }), targetProps => {
1071
1071
  const {
@@ -1093,7 +1093,7 @@ const SelectList = forwardRef((_ref, ref) => {
1093
1093
  selectedAllValue
1094
1094
  } = props;
1095
1095
  const components = {
1096
- search: (api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function') && /*#__PURE__*/React.createElement(SearchInput, {
1096
+ search: (api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function') && /*#__PURE__*/React$1.createElement(SearchInput, {
1097
1097
  className: classnames(style$3['select-search'], 'select-list-search', {
1098
1098
  'is-popup': isPopup
1099
1099
  }),
@@ -1107,12 +1107,12 @@ const SelectList = forwardRef((_ref, ref) => {
1107
1107
  simple: isPopup,
1108
1108
  showSearchButton: !isPopup
1109
1109
  }),
1110
- selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement("div", {
1110
+ selectedAll: !single && allowSelectedAll && /*#__PURE__*/React$1.createElement("div", {
1111
1111
  className: classnames(style$3['selected-all'], 'select-list-selected-all', {
1112
1112
  'is-popup': isPopup
1113
1113
  })
1114
- }, /*#__PURE__*/React.createElement(SelectedAll, null)),
1115
- fetchList: open ? /*#__PURE__*/React.createElement(FetchScrollLoader, _extends({}, props, {
1114
+ }, /*#__PURE__*/React$1.createElement(SelectedAll, null)),
1115
+ fetchList: open ? /*#__PURE__*/React$1.createElement(FetchScrollLoader, _extends({}, props, {
1116
1116
  className: classnames(style$3['list'], 'select-list-scroll-list', {
1117
1117
  'is-popup': isPopup
1118
1118
  }),
@@ -1149,12 +1149,12 @@ const SelectList = forwardRef((_ref, ref) => {
1149
1149
  isSelectedAll
1150
1150
  }));
1151
1151
  }) : null,
1152
- selectedTag: showSelectedTag && /*#__PURE__*/React.createElement("div", {
1152
+ selectedTag: showSelectedTag && /*#__PURE__*/React$1.createElement("div", {
1153
1153
  className: classnames(style$3['selected-tag'], 'select-list-selected-tag', {
1154
1154
  'is-popup': isPopup
1155
1155
  })
1156
- }, /*#__PURE__*/React.createElement(SelectedTagList, null)),
1157
- footer: footer && /*#__PURE__*/React.createElement("div", {
1156
+ }, /*#__PURE__*/React$1.createElement(SelectedTagList, null)),
1157
+ footer: footer && /*#__PURE__*/React$1.createElement("div", {
1158
1158
  className: classnames(style$3['footer'], 'select-list-footer')
1159
1159
  }, typeof footer === 'function' ? footer({
1160
1160
  reload: () => {
@@ -1170,7 +1170,7 @@ const SelectList = forwardRef((_ref, ref) => {
1170
1170
  components
1171
1171
  }));
1172
1172
  }
1173
- return /*#__PURE__*/React.createElement(Flex, {
1173
+ return /*#__PURE__*/React$1.createElement(Flex, {
1174
1174
  vertical: true,
1175
1175
  className: classnames({
1176
1176
  [style$3['is-mobile']]: isMobile
@@ -1181,6 +1181,70 @@ const SelectList = forwardRef((_ref, ref) => {
1181
1181
 
1182
1182
  var style$2 = {"body":"kne-super-select_704J1","is-mobile":"kne-super-select_HYGUN","table-panel-wrap":"kne-super-select_Boo1a","selected-panel-wrap":"kne-super-select_q-BjK","table-panel":"kne-super-select_UAejp","filter-wrap":"kne-super-select_gmlBv","table":"kne-super-select_zE-14","list":"kne-super-select_DrEYJ","is-fit-columns":"kne-super-select_QqZxW","empty":"kne-super-select_5Tyrt","right-options-col":"kne-super-select_sNBrJ","right-options":"kne-super-select_UXi-g","no-padding-btn":"kne-super-select_iaCir","selected-tags-scroll":"kne-super-select_b-3Xk","tag":"kne-super-select_JkYqS","tag-inner":"kne-super-select_VZlBL","single-checked":"kne-super-select_Eiz-u","select-search":"kne-super-select_temy6","tags-search":"kne-super-select_7phL2","descriptions":"kne-super-select_ttNK9","footer":"kne-super-select_lISfA"};
1183
1183
 
1184
+ const _excluded$2 = ["data", "reload", "refresh", "requestParams", "fetchProps", "dataFormat", "pagination", "columns", "columnRenderProps"];
1185
+ const defaultDataFormat = data => ({
1186
+ list: data == null ? void 0 : data.pageData,
1187
+ total: data == null ? void 0 : data.totalCount,
1188
+ data
1189
+ });
1190
+ const FetchTableContent = _ref => {
1191
+ let {
1192
+ data,
1193
+ reload,
1194
+ refresh,
1195
+ requestParams,
1196
+ fetchProps,
1197
+ dataFormat = defaultDataFormat,
1198
+ pagination,
1199
+ columns,
1200
+ columnRenderProps
1201
+ } = _ref,
1202
+ tableProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1203
+ const paginationMerged = Object.assign({
1204
+ open: false,
1205
+ paramsType: 'data',
1206
+ requestType: 'reload',
1207
+ currentName: 'currentPage',
1208
+ pageSizeName: 'perPage',
1209
+ pageSize: 20,
1210
+ showSizeChanger: false,
1211
+ showQuickJumper: false,
1212
+ hideOnSinglePage: true
1213
+ }, pagination);
1214
+ const formatData = dataFormat(data);
1215
+ const tableContext = Object.assign({}, columnRenderProps, {
1216
+ data,
1217
+ requestParams,
1218
+ fetchProps
1219
+ });
1220
+ const showPagination = paginationMerged.open && formatData.total > 0;
1221
+ const currentPage = get(requestParams, [paginationMerged.paramsType, paginationMerged.currentName], 1);
1222
+ const currentPageSize = Number(get(requestParams, [paginationMerged.paramsType, paginationMerged.pageSizeName], paginationMerged.pageSize)) || paginationMerged.pageSize || 20;
1223
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, _extends({}, tableProps, {
1224
+ dataSource: formatData.list || [],
1225
+ pagination: false,
1226
+ columns: columns,
1227
+ context: tableContext,
1228
+ columnRenderProps: tableContext
1229
+ })), showPagination ? /*#__PURE__*/React.createElement(Pagination, {
1230
+ total: formatData.total,
1231
+ current: currentPage,
1232
+ pageSize: currentPageSize,
1233
+ showSizeChanger: paginationMerged.showSizeChanger,
1234
+ showQuickJumper: paginationMerged.showQuickJumper,
1235
+ hideOnSinglePage: paginationMerged.hideOnSinglePage,
1236
+ onChange: (page, size) => {
1237
+ (paginationMerged.requestType === 'refresh' ? refresh : reload)({
1238
+ [paginationMerged.paramsType]: Object.assign({}, get(requestParams, paginationMerged.paramsType), {
1239
+ [paginationMerged.currentName]: page,
1240
+ [paginationMerged.pageSizeName]: size
1241
+ })
1242
+ });
1243
+ }
1244
+ }) : null);
1245
+ };
1246
+ const FetchTable = withFetch(FetchTableContent);
1247
+
1184
1248
  const isEmptyParentKey = value => value == null || value === '';
1185
1249
  const flattenSelectList = (list, {
1186
1250
  dataType,
@@ -1291,7 +1355,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1291
1355
  if (!(api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function')) {
1292
1356
  return null;
1293
1357
  }
1294
- return /*#__PURE__*/React.createElement(SearchInput, {
1358
+ return /*#__PURE__*/React$1.createElement(SearchInput, {
1295
1359
  className: classnames(style$2['select-search'], 'select-table-search', {
1296
1360
  'is-popup': isPopup
1297
1361
  }),
@@ -1320,7 +1384,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1320
1384
  }
1321
1385
  }, p);
1322
1386
  const bodyRef = useRef(null);
1323
- return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
1387
+ return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
1324
1388
  ref: ref
1325
1389
  }), targetProps => {
1326
1390
  const {
@@ -1367,7 +1431,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1367
1431
  } = props;
1368
1432
  const isSelectedAll = computedIsSelectAll(value, selectedAllValue, valueKey);
1369
1433
  const resolvedTreeTitleKey = treeTitleKey || labelKey;
1370
- const footerEl = footer && /*#__PURE__*/React.createElement("div", {
1434
+ const footerEl = footer && /*#__PURE__*/React$1.createElement("div", {
1371
1435
  className: classnames(style$2['footer'], 'select-table-footer')
1372
1436
  }, typeof footer === 'function' ? footer({
1373
1437
  reload: () => {
@@ -1433,12 +1497,12 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1433
1497
  }
1434
1498
  }
1435
1499
  };
1436
- const selectedPanel = !single && /*#__PURE__*/React.createElement("div", {
1500
+ const selectedPanel = !single && /*#__PURE__*/React$1.createElement("div", {
1437
1501
  className: classnames(style$2['right-options'], {
1438
1502
  'is-popup': isPopup,
1439
1503
  [style$2['is-mobile']]: isMobile
1440
1504
  })
1441
- }, /*#__PURE__*/React.createElement(SearchInput, {
1505
+ }, /*#__PURE__*/React$1.createElement(SearchInput, {
1442
1506
  className: style$2['tags-search'],
1443
1507
  placeholder: searchPlaceholder,
1444
1508
  value: tagSearchText,
@@ -1446,13 +1510,13 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1446
1510
  setTagSearchText(value);
1447
1511
  },
1448
1512
  showSearchButton: false
1449
- }), /*#__PURE__*/React.createElement(Row, {
1513
+ }), /*#__PURE__*/React$1.createElement(Row, {
1450
1514
  wrap: false,
1451
1515
  justify: 'space-between',
1452
1516
  align: 'middle'
1453
- }, /*#__PURE__*/React.createElement(Col, null, formatMessage({
1517
+ }, /*#__PURE__*/React$1.createElement(Col, null, formatMessage({
1454
1518
  id: 'selected'
1455
- }), value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement(Button, {
1519
+ }), value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement(Button, {
1456
1520
  className: style$2['no-padding-btn'],
1457
1521
  type: "link",
1458
1522
  onClick: () => {
@@ -1461,12 +1525,12 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1461
1525
  }, formatMessage({
1462
1526
  id: 'removeAll'
1463
1527
  })))), (() => {
1464
- const selectedTags = /*#__PURE__*/React.createElement(Flex, {
1528
+ const selectedTags = /*#__PURE__*/React$1.createElement(Flex, {
1465
1529
  wrap: true,
1466
1530
  gap: 8
1467
1531
  }, value.filter(item => getTagSearchCallback(tagSearchText, item, targetProps)).map(item => {
1468
1532
  var _tablePageRef$current3;
1469
- return /*#__PURE__*/React.createElement(Tag, {
1533
+ return /*#__PURE__*/React$1.createElement(Tag, {
1470
1534
  className: style$2['tag'],
1471
1535
  key: item[valueKey],
1472
1536
  closable: true,
@@ -1475,9 +1539,9 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1475
1539
  e.preventDefault();
1476
1540
  onRemove(item);
1477
1541
  }
1478
- }, /*#__PURE__*/React.createElement(Popover, {
1542
+ }, /*#__PURE__*/React$1.createElement(Popover, {
1479
1543
  getPopupContainer: () => bodyRef.current,
1480
- content: /*#__PURE__*/React.createElement(CentralContent, {
1544
+ content: /*#__PURE__*/React$1.createElement(CentralContent, {
1481
1545
  className: style$2['descriptions'],
1482
1546
  columns: columns.filter(item => {
1483
1547
  if (Object.hasOwn(item, 'previewHidden')) {
@@ -1493,35 +1557,35 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1493
1557
  list: getListFromPageData((_tablePageRef$current3 = tablePageRef.current) == null ? void 0 : _tablePageRef$current3.data)
1494
1558
  })
1495
1559
  })
1496
- }, /*#__PURE__*/React.createElement("span", {
1560
+ }, /*#__PURE__*/React$1.createElement("span", {
1497
1561
  className: style$2['tag-inner']
1498
1562
  }, item[labelKey])));
1499
1563
  }));
1500
1564
  // 移动端弹窗内不用 SimpleBar,改原生滚动
1501
1565
  if (isMobile) {
1502
- return /*#__PURE__*/React.createElement("div", {
1566
+ return /*#__PURE__*/React$1.createElement("div", {
1503
1567
  className: style$2['selected-tags-scroll']
1504
1568
  }, selectedTags);
1505
1569
  }
1506
- return /*#__PURE__*/React.createElement(SimpleBar, {
1570
+ return /*#__PURE__*/React$1.createElement(SimpleBar, {
1507
1571
  className: style$2['selected-tags-scroll']
1508
1572
  }, selectedTags);
1509
1573
  })(), footerEl);
1510
- const tablePanel = /*#__PURE__*/React.createElement("div", {
1574
+ const tablePanel = /*#__PURE__*/React$1.createElement("div", {
1511
1575
  className: classnames(style$2['table-panel'], {
1512
1576
  [style$2['single-body']]: single
1513
1577
  })
1514
- }, /*#__PURE__*/React.createElement("div", {
1578
+ }, /*#__PURE__*/React$1.createElement("div", {
1515
1579
  className: style$2['filter-wrap']
1516
- }, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React.createElement("div", {
1580
+ }, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React$1.createElement("div", {
1517
1581
  className: classnames(style$2['table'], 'select-table')
1518
- }, open ? /*#__PURE__*/React.createElement("div", {
1582
+ }, open ? /*#__PURE__*/React$1.createElement("div", {
1519
1583
  ref: listScrollRef,
1520
1584
  className: classnames(style$2['list'], 'select-table-list-scroll-list', {
1521
1585
  'is-popup': isPopup,
1522
1586
  [style$2['is-fit-columns']]: !allColumnsHaveWidth
1523
1587
  })
1524
- }, /*#__PURE__*/React.createElement(TablePage, _extends({}, tablePageFetchConfig, {
1588
+ }, /*#__PURE__*/React$1.createElement(FetchTable, _extends({}, tablePageFetchConfig, {
1525
1589
  ref: tablePageRef
1526
1590
  }, dataFormat ? {
1527
1591
  dataFormat
@@ -1544,7 +1608,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1544
1608
  columnRenderProps: Object.assign({}, targetProps, {
1545
1609
  isSelectedAll
1546
1610
  }),
1547
- empty: props.empty || /*#__PURE__*/React.createElement(Empty, {
1611
+ empty: props.empty || /*#__PURE__*/React$1.createElement(Empty, {
1548
1612
  className: classnames(style$2['empty'])
1549
1613
  }),
1550
1614
  dataType: dataType,
@@ -1568,31 +1632,31 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1568
1632
  expandedKeys
1569
1633
  } : null, Object.prototype.hasOwnProperty.call(p, 'defaultExpandedKeys') ? {
1570
1634
  defaultExpandedKeys
1571
- } : null))) : null), single && footerEl || !isMobile && /*#__PURE__*/React.createElement("div", {
1635
+ } : null))) : null), single && footerEl || !isMobile && /*#__PURE__*/React$1.createElement("div", {
1572
1636
  className: classnames(style$2['footer'], 'select-table-footer')
1573
1637
  }));
1574
1638
 
1575
1639
  // 移动端:表格在上、已选在下(上下布局)
1576
1640
  if (isMobile) {
1577
- return /*#__PURE__*/React.createElement("div", {
1641
+ return /*#__PURE__*/React$1.createElement("div", {
1578
1642
  ref: bodyRef,
1579
1643
  className: classnames(style$2['body'], style$2['is-mobile'], 'select-table-list-body')
1580
- }, /*#__PURE__*/React.createElement("div", {
1644
+ }, /*#__PURE__*/React$1.createElement("div", {
1581
1645
  className: style$2['table-panel-wrap']
1582
- }, tablePanel), selectedPanel ? /*#__PURE__*/React.createElement("div", {
1646
+ }, tablePanel), selectedPanel ? /*#__PURE__*/React$1.createElement("div", {
1583
1647
  className: style$2['selected-panel-wrap']
1584
1648
  }, selectedPanel) : null);
1585
1649
  }
1586
- return /*#__PURE__*/React.createElement(Row, {
1650
+ return /*#__PURE__*/React$1.createElement(Row, {
1587
1651
  wrap: false,
1588
1652
  ref: bodyRef,
1589
1653
  className: classnames(style$2['body'], 'select-table-list-body')
1590
- }, /*#__PURE__*/React.createElement(Col, {
1654
+ }, /*#__PURE__*/React$1.createElement(Col, {
1591
1655
  className: classnames({
1592
1656
  [style$2['single-body']]: single
1593
1657
  }),
1594
1658
  span: single ? 24 : 16
1595
- }, tablePanel), !single && /*#__PURE__*/React.createElement(Col, {
1659
+ }, tablePanel), !single && /*#__PURE__*/React$1.createElement(Col, {
1596
1660
  span: 8,
1597
1661
  className: style$2['right-options-col']
1598
1662
  }, selectedPanel));
@@ -1640,7 +1704,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1640
1704
  const {
1641
1705
  labelKey
1642
1706
  } = props;
1643
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1707
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1644
1708
  className: 'select-tree-item-label'
1645
1709
  }, item[labelKey]));
1646
1710
  },
@@ -1661,7 +1725,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1661
1725
  valueKey
1662
1726
  } = props;
1663
1727
  const isChecked = value.some(target => target[valueKey] === item[valueKey]);
1664
- return /*#__PURE__*/React.createElement(Flex, {
1728
+ return /*#__PURE__*/React$1.createElement(Flex, {
1665
1729
  className: classnames(style$1['default-list-item'], 'select-tree-item', {
1666
1730
  [style$1['is-selected']]: isChecked,
1667
1731
  [style$1['is-disabled']]: item.disabled
@@ -1684,17 +1748,17 @@ const SelectTree = forwardRef((_ref, ref) => {
1684
1748
  onOpenChange(false);
1685
1749
  }
1686
1750
  }
1687
- }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
1751
+ }, !single && /*#__PURE__*/React$1.createElement(Flex, null, /*#__PURE__*/React$1.createElement(Checkbox, {
1688
1752
  checked: isSelectedAll || isChecked,
1689
1753
  disabled: isSelectedAll || item.disabled
1690
- })), /*#__PURE__*/React.createElement(Flex, {
1754
+ })), /*#__PURE__*/React$1.createElement(Flex, {
1691
1755
  vertical: true,
1692
1756
  gag: 8,
1693
1757
  flex: 1,
1694
1758
  className: 'select-tree-item-content'
1695
- }, renderItemContent(contextProps)), single && /*#__PURE__*/React.createElement("div", {
1759
+ }, renderItemContent(contextProps)), single && /*#__PURE__*/React$1.createElement("div", {
1696
1760
  className: style$1['single-checked']
1697
- }, isChecked && /*#__PURE__*/React.createElement(CheckOutlined, null)));
1761
+ }, isChecked && /*#__PURE__*/React$1.createElement(CheckOutlined, null)));
1698
1762
  },
1699
1763
  renderTree: contextProps => {
1700
1764
  const {
@@ -1718,9 +1782,9 @@ const SelectTree = forwardRef((_ref, ref) => {
1718
1782
  childrenKey
1719
1783
  });
1720
1784
  if (!(treeData && treeData.length > 0)) {
1721
- return props.empty || /*#__PURE__*/React.createElement(Empty, null);
1785
+ return props.empty || /*#__PURE__*/React$1.createElement(Empty, null);
1722
1786
  }
1723
- return /*#__PURE__*/React.createElement(Tree, {
1787
+ return /*#__PURE__*/React$1.createElement(Tree, {
1724
1788
  className: classnames(style$1['default-list'], {
1725
1789
  [style$1['is-selected-all']]: isSelectedAll
1726
1790
  }),
@@ -1744,7 +1808,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1744
1808
  });
1745
1809
  }
1746
1810
  }, p);
1747
- return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
1811
+ return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
1748
1812
  ref: ref
1749
1813
  }), targetProps => {
1750
1814
  const {
@@ -1767,12 +1831,12 @@ const SelectTree = forwardRef((_ref, ref) => {
1767
1831
  selectedAllValue
1768
1832
  } = props;
1769
1833
  const components = {
1770
- selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement("div", {
1834
+ selectedAll: !single && allowSelectedAll && /*#__PURE__*/React$1.createElement("div", {
1771
1835
  className: classnames(style$1['selected-all'], 'select-tree-selected-all', {
1772
1836
  'is-popup': isPopup
1773
1837
  })
1774
- }, /*#__PURE__*/React.createElement(SelectedAll, null)),
1775
- treeList: open ? /*#__PURE__*/React.createElement(Fetch, _extends({}, Object.assign({}, options ? {
1838
+ }, /*#__PURE__*/React$1.createElement(SelectedAll, null)),
1839
+ treeList: open ? /*#__PURE__*/React$1.createElement(Fetch, _extends({}, Object.assign({}, options ? {
1776
1840
  data: {
1777
1841
  options
1778
1842
  },
@@ -1796,22 +1860,22 @@ const SelectTree = forwardRef((_ref, ref) => {
1796
1860
  });
1797
1861
  // 移动端弹窗内不用 SimpleBar,改原生滚动
1798
1862
  if (isMobile) {
1799
- return /*#__PURE__*/React.createElement("div", {
1863
+ return /*#__PURE__*/React$1.createElement("div", {
1800
1864
  className: scrollClassName
1801
1865
  }, treeContent);
1802
1866
  }
1803
- return /*#__PURE__*/React.createElement(SimpleBar, {
1867
+ return /*#__PURE__*/React$1.createElement(SimpleBar, {
1804
1868
  className: scrollClassName,
1805
1869
  autoHide: false
1806
1870
  }, treeContent);
1807
1871
  }
1808
1872
  })) : null,
1809
- selectedTag: showSelectedTag && /*#__PURE__*/React.createElement("div", {
1873
+ selectedTag: showSelectedTag && /*#__PURE__*/React$1.createElement("div", {
1810
1874
  className: classnames(style$1['selected-tag'], 'select-tree-selected-tag', {
1811
1875
  'is-popup': isPopup
1812
1876
  })
1813
- }, /*#__PURE__*/React.createElement(SelectedTagList, null)),
1814
- footer: footer && /*#__PURE__*/React.createElement("div", {
1877
+ }, /*#__PURE__*/React$1.createElement(SelectedTagList, null)),
1878
+ footer: footer && /*#__PURE__*/React$1.createElement("div", {
1815
1879
  className: classnames(style$1['footer'], 'select-list-footer')
1816
1880
  }, typeof footer === 'function' ? footer({
1817
1881
  reload: () => {
@@ -1827,7 +1891,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1827
1891
  components
1828
1892
  }));
1829
1893
  }
1830
- return /*#__PURE__*/React.createElement(Flex, {
1894
+ return /*#__PURE__*/React$1.createElement(Flex, {
1831
1895
  vertical: true,
1832
1896
  className: classnames({
1833
1897
  [style$1['is-mobile']]: isMobile
@@ -2055,12 +2119,12 @@ const CustomMenu = ({
2055
2119
  domEvent: e
2056
2120
  });
2057
2121
  };
2058
- return /*#__PURE__*/React.createElement(List, {
2122
+ return /*#__PURE__*/React$1.createElement(List, {
2059
2123
  className: classnames(style['custom-menu'], className),
2060
2124
  dataSource: items,
2061
2125
  renderItem: item => {
2062
2126
  const isSelected = selectedKeys == null ? void 0 : selectedKeys.includes(item.key);
2063
- return /*#__PURE__*/React.createElement(List.Item, {
2127
+ return /*#__PURE__*/React$1.createElement(List.Item, {
2064
2128
  className: classnames(style['custom-menu-item'], {
2065
2129
  [style['selected']]: isSelected,
2066
2130
  selected: isSelected
@@ -2279,12 +2343,12 @@ const CascaderInner = ({
2279
2343
  // 渲染搜索内容
2280
2344
  if (searchText && searchResults) {
2281
2345
  const _currentIds3 = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2282
- return /*#__PURE__*/React.createElement("div", {
2346
+ return /*#__PURE__*/React$1.createElement("div", {
2283
2347
  className: classnames(style['content'], 'select-cascader-content', {
2284
2348
  [style['is-popup']]: isPopup,
2285
2349
  [style['is-mobile']]: isMobile
2286
2350
  })
2287
- }, /*#__PURE__*/React.createElement(SearchInput, {
2351
+ }, /*#__PURE__*/React$1.createElement(SearchInput, {
2288
2352
  className: classnames(style['search-input'], {
2289
2353
  'is-popup': isPopup
2290
2354
  }),
@@ -2293,23 +2357,23 @@ const CascaderInner = ({
2293
2357
  onSearch: setSearchText,
2294
2358
  simple: isPopup,
2295
2359
  showSearchButton: !isPopup
2296
- }), /*#__PURE__*/React.createElement(ScrollBox, {
2360
+ }), /*#__PURE__*/React$1.createElement(ScrollBox, {
2297
2361
  className: style['scroll-plus-box']
2298
- }, searchResults.length === 0 ? /*#__PURE__*/React.createElement(Empty, {
2362
+ }, searchResults.length === 0 ? /*#__PURE__*/React$1.createElement(Empty, {
2299
2363
  description: "\u6682\u65E0\u6570\u636E"
2300
- }) : /*#__PURE__*/React.createElement(List, {
2364
+ }) : /*#__PURE__*/React$1.createElement(List, {
2301
2365
  className: style['list'],
2302
2366
  size: "small",
2303
2367
  dataSource: searchResults,
2304
2368
  rowKey: "id",
2305
2369
  renderItem: item => {
2306
2370
  const checked = _currentIds3.includes(item.id);
2307
- return /*#__PURE__*/React.createElement(List.Item, {
2371
+ return /*#__PURE__*/React$1.createElement(List.Item, {
2308
2372
  className: classnames({
2309
2373
  [style['is-selected']]: checked
2310
2374
  }),
2311
2375
  onClick: () => onSearchSelect(item)
2312
- }, /*#__PURE__*/React.createElement("span", null, item.label), checked && /*#__PURE__*/React.createElement("span", {
2376
+ }, /*#__PURE__*/React$1.createElement("span", null, item.label), checked && /*#__PURE__*/React$1.createElement("span", {
2313
2377
  style: {
2314
2378
  marginLeft: 8,
2315
2379
  color: '#1677ff'
@@ -2321,7 +2385,7 @@ const CascaderInner = ({
2321
2385
 
2322
2386
  // 渲染级联列
2323
2387
  const currentIds = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2324
- return /*#__PURE__*/React.createElement("div", {
2388
+ return /*#__PURE__*/React$1.createElement("div", {
2325
2389
  className: classnames(style['content'], 'select-cascader-content', {
2326
2390
  [style['is-popup']]: isPopup,
2327
2391
  [style['has-search']]: !!onSearch,
@@ -2330,7 +2394,7 @@ const CascaderInner = ({
2330
2394
  style: {
2331
2395
  '--menu-item-width': numberToPx(menuItemWidth)
2332
2396
  }
2333
- }, onSearch && /*#__PURE__*/React.createElement(SearchInput, {
2397
+ }, onSearch && /*#__PURE__*/React$1.createElement(SearchInput, {
2334
2398
  className: classnames(style['search-input'], {
2335
2399
  'is-popup': isPopup
2336
2400
  }),
@@ -2339,13 +2403,13 @@ const CascaderInner = ({
2339
2403
  onSearch: setSearchText,
2340
2404
  simple: isPopup,
2341
2405
  showSearchButton: !isPopup
2342
- }), /*#__PURE__*/React.createElement(ScrollBox, _extends({
2406
+ }), /*#__PURE__*/React$1.createElement(ScrollBox, _extends({
2343
2407
  className: classnames(style['scroller'], 'select-cascader-scroller')
2344
2408
  }, isMobile ? {} : {
2345
2409
  options: {
2346
2410
  autoHide: false
2347
2411
  }
2348
- }), /*#__PURE__*/React.createElement("div", {
2412
+ }), /*#__PURE__*/React$1.createElement("div", {
2349
2413
  className: classnames(style['columns'], {
2350
2414
  [style['is-mobile']]: isMobile
2351
2415
  })
@@ -2353,12 +2417,12 @@ const CascaderInner = ({
2353
2417
  const selectNode = mapping.get(selectedId);
2354
2418
  const siblingNodes = treeUtils.getSiblingNode(selectedId);
2355
2419
  const isLastLevel = !isNotLastNode(selectNode == null ? void 0 : selectNode.id) && index > 0;
2356
- return /*#__PURE__*/React.createElement(ScrollBox, {
2420
+ return /*#__PURE__*/React$1.createElement(ScrollBox, {
2357
2421
  key: selectedId || index,
2358
2422
  className: classnames(style['content-item'], {
2359
2423
  [style['last-level-area']]: isLastLevel
2360
2424
  })
2361
- }, isLastLevel ? isMobile ? /*#__PURE__*/React.createElement(CustomMenu, {
2425
+ }, isLastLevel ? isMobile ? /*#__PURE__*/React$1.createElement(CustomMenu, {
2362
2426
  className: style['menu'],
2363
2427
  selectedKeys: currentIds,
2364
2428
  onSelect: ({
@@ -2378,11 +2442,11 @@ const CascaderInner = ({
2378
2442
  } = treeUtils.computedCheckboxStatus(node.id, currentIds);
2379
2443
  return {
2380
2444
  key: node.id,
2381
- label: /*#__PURE__*/React.createElement(Space, {
2445
+ label: /*#__PURE__*/React$1.createElement(Space, {
2382
2446
  className: classnames(style['menu-item'], {
2383
2447
  [style['single-mode']]: single
2384
2448
  })
2385
- }, /*#__PURE__*/React.createElement(Checkbox, {
2449
+ }, /*#__PURE__*/React$1.createElement(Checkbox, {
2386
2450
  checked: checked,
2387
2451
  indeterminate: indeterminate,
2388
2452
  onClick: e => e.stopPropagation(),
@@ -2390,14 +2454,14 @@ const CascaderInner = ({
2390
2454
  e.stopPropagation();
2391
2455
  onCheckedChange(e.target.checked, node.id);
2392
2456
  }
2393
- }), /*#__PURE__*/React.createElement("div", {
2457
+ }), /*#__PURE__*/React$1.createElement("div", {
2394
2458
  className: style['menu-label']
2395
- }, /*#__PURE__*/React.createElement("span", {
2459
+ }, /*#__PURE__*/React$1.createElement("span", {
2396
2460
  className: style['menu-label-text']
2397
2461
  }, node.label)))
2398
2462
  };
2399
2463
  })
2400
- }) : /*#__PURE__*/React.createElement(Space, {
2464
+ }) : /*#__PURE__*/React$1.createElement(Space, {
2401
2465
  wrap: true,
2402
2466
  style: {
2403
2467
  padding: 12
@@ -2410,13 +2474,13 @@ const CascaderInner = ({
2410
2474
  checked,
2411
2475
  indeterminate
2412
2476
  } = treeUtils.computedCheckboxStatus(node.id, currentIds);
2413
- return /*#__PURE__*/React.createElement(Checkbox, {
2477
+ return /*#__PURE__*/React$1.createElement(Checkbox, {
2414
2478
  key: node.id,
2415
2479
  checked: checked,
2416
2480
  indeterminate: indeterminate,
2417
2481
  onChange: e => onCheckedChange(e.target.checked, node.id)
2418
2482
  }, node.label);
2419
- })) : /*#__PURE__*/React.createElement(CustomMenu, {
2483
+ })) : /*#__PURE__*/React$1.createElement(CustomMenu, {
2420
2484
  className: style['menu'],
2421
2485
  selectedKeys: index === selectedIds.length - 1 ? [] : selectedIds,
2422
2486
  onSelect: ({
@@ -2444,12 +2508,12 @@ const CascaderInner = ({
2444
2508
  const childrenSelectedCount = hasChildren ? treeUtils.getAllChildren(node.id).filter(child => currentIds.includes(child.id)).length : 0;
2445
2509
  return {
2446
2510
  key: node.id,
2447
- label: /*#__PURE__*/React.createElement(Space, {
2511
+ label: /*#__PURE__*/React$1.createElement(Space, {
2448
2512
  className: classnames(style['menu-item'], {
2449
2513
  [style['checkbox-hidden']]: onlyAllowLastLevel && hasChildren,
2450
2514
  [style['single-mode']]: single
2451
2515
  })
2452
- }, (!onlyAllowLastLevel || !hasChildren) && /*#__PURE__*/React.createElement(Checkbox, {
2516
+ }, (!onlyAllowLastLevel || !hasChildren) && /*#__PURE__*/React$1.createElement(Checkbox, {
2453
2517
  checked: checked,
2454
2518
  indeterminate: indeterminate,
2455
2519
  onClick: e => e.stopPropagation(),
@@ -2457,24 +2521,24 @@ const CascaderInner = ({
2457
2521
  e.stopPropagation();
2458
2522
  onCheckedChange(e.target.checked, node.id);
2459
2523
  }
2460
- }), /*#__PURE__*/React.createElement("div", {
2524
+ }), /*#__PURE__*/React$1.createElement("div", {
2461
2525
  className: style['menu-label']
2462
- }, /*#__PURE__*/React.createElement("span", {
2526
+ }, /*#__PURE__*/React$1.createElement("span", {
2463
2527
  className: style['menu-label-text']
2464
- }, node.label), hasChildren && childrenSelectedCount > 0 && /*#__PURE__*/React.createElement(Badge, {
2528
+ }, node.label), hasChildren && childrenSelectedCount > 0 && /*#__PURE__*/React$1.createElement(Badge, {
2465
2529
  count: childrenSelectedCount,
2466
2530
  size: "small"
2467
- })), hasChildren ? /*#__PURE__*/React.createElement(RightOutlined, {
2531
+ })), hasChildren ? /*#__PURE__*/React$1.createElement(RightOutlined, {
2468
2532
  className: style['menu-item-icon']
2469
- }) : /*#__PURE__*/React.createElement("span", {
2533
+ }) : /*#__PURE__*/React$1.createElement("span", {
2470
2534
  className: style['menu-item-placeholder']
2471
2535
  }))
2472
2536
  };
2473
2537
  })
2474
2538
  }));
2475
- }), loading && /*#__PURE__*/React.createElement("div", {
2539
+ }), loading && /*#__PURE__*/React$1.createElement("div", {
2476
2540
  className: style['loading']
2477
- }, /*#__PURE__*/React.createElement(Spin, {
2541
+ }, /*#__PURE__*/React$1.createElement(Spin, {
2478
2542
  size: "small"
2479
2543
  })))));
2480
2544
  };
@@ -2588,7 +2652,7 @@ const SelectCascader = _ref => {
2588
2652
  };
2589
2653
  }).filter(Boolean);
2590
2654
  }, [currentValue, options, valueKey, labelKey]);
2591
- return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
2655
+ return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
2592
2656
  value: selectInputValue,
2593
2657
  onChange: setValue,
2594
2658
  single: single,
@@ -2636,7 +2700,7 @@ const SelectCascader = _ref => {
2636
2700
  [labelKey]: String(item)
2637
2701
  };
2638
2702
  }).filter(Boolean);
2639
- return contextProps.open ? /*#__PURE__*/React.createElement(CascaderInner, {
2703
+ return contextProps.open ? /*#__PURE__*/React$1.createElement(CascaderInner, {
2640
2704
  options: options,
2641
2705
  value: currentDisplayValue,
2642
2706
  setValue: contextSetValue,