@kne/super-select 0.1.49 → 0.1.50

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$1, { useMemo, forwardRef, useState, useCallback, useLayoutEffect, useEffect, useImperativeHandle, useRef } from 'react';
1
+ import React, { 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';
@@ -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$1.createElement("div", {
124
+ return /*#__PURE__*/React.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$1.createElement("div", {
131
+ }, shouldMeasure ? /*#__PURE__*/React.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$1.createElement("div", {
138
+ }, list.map(item => /*#__PURE__*/React.createElement("div", {
139
139
  key: item[valueKey],
140
140
  "data-tag-measure": true
141
- }, /*#__PURE__*/React$1.createElement(Tag, {
141
+ }, /*#__PURE__*/React.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$1.createElement("span", {
149
+ }, /*#__PURE__*/React.createElement("span", {
150
150
  className: style$6['tag-label']
151
- }, item[labelKey])))), /*#__PURE__*/React$1.createElement("div", {
151
+ }, item[labelKey])))), /*#__PURE__*/React.createElement("div", {
152
152
  ref: setMoreMeasureRef
153
- }, /*#__PURE__*/React$1.createElement(Tag, {
153
+ }, /*#__PURE__*/React.createElement(Tag, {
154
154
  className: style$6['overflow-tag'],
155
155
  style: {
156
156
  margin: 0
157
157
  }
158
- }, "+99"))) : null, /*#__PURE__*/React$1.createElement("div", {
158
+ }, "+99"))) : null, /*#__PURE__*/React.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$1.createElement(Tag, {
163
+ }, displayTags.map(item => /*#__PURE__*/React.createElement(Tag, {
164
164
  key: item[valueKey],
165
165
  closable: true,
166
166
  bordered: false,
@@ -173,10 +173,10 @@ const TagOverflowInner = ({
173
173
  e.preventDefault();
174
174
  onRemove(item);
175
175
  }
176
- }, /*#__PURE__*/React$1.createElement("span", {
176
+ }, /*#__PURE__*/React.createElement("span", {
177
177
  className: style$6['tag-label'],
178
178
  title: item[labelKey]
179
- }, item[labelKey]))), showOverflow ? /*#__PURE__*/React$1.createElement(Tag, {
179
+ }, item[labelKey]))), showOverflow ? /*#__PURE__*/React.createElement(Tag, {
180
180
  className: style$6['overflow-tag']
181
181
  }, "+", hiddenCount) : null));
182
182
  };
@@ -286,7 +286,7 @@ const ModalContent = _ref => {
286
286
  }
287
287
  }
288
288
  });
289
- return /*#__PURE__*/React$1.createElement(Provider, {
289
+ return /*#__PURE__*/React.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$1.createElement("div", {
320
+ return createPortal(/*#__PURE__*/React.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$1.createElement("div", {
338
+ return /*#__PURE__*/React.createElement("div", {
339
339
  className: style$6['mobile-sheet-header']
340
- }, /*#__PURE__*/React$1.createElement("button", {
340
+ }, /*#__PURE__*/React.createElement("button", {
341
341
  type: "button",
342
342
  className: style$6['mobile-sheet-action'],
343
343
  onClick: onCancel
344
- }, cancelText), /*#__PURE__*/React$1.createElement("div", {
344
+ }, cancelText), /*#__PURE__*/React.createElement("div", {
345
345
  className: style$6['mobile-sheet-title'],
346
346
  title: title
347
- }, title), /*#__PURE__*/React$1.createElement("button", {
347
+ }, title), /*#__PURE__*/React.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$1.createElement("div", {
368
+ return createPortal(/*#__PURE__*/React.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$1.createElement(MobileSheetHeader, {
382
+ }, /*#__PURE__*/React.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$1.createElement("div", {
388
+ }), /*#__PURE__*/React.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$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(MobileSheetMask, {
461
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileSheetMask, {
462
462
  open: open,
463
463
  mountNode: mountNode,
464
464
  fixedModeClass: fixedModeClass,
465
465
  onClose: closeWithoutCommit
466
- }), /*#__PURE__*/React$1.createElement(MobileSheetPanel, {
466
+ }), /*#__PURE__*/React.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$1.createElement(Modal, {
485
+ return /*#__PURE__*/React.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$1.createElement(Flex, _extends({}, props, {
733
+ return /*#__PURE__*/React.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$1.createElement("span", {
751
+ return current && /*#__PURE__*/React.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$1.createElement("div", {
757
+ })(), /*#__PURE__*/React.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$1.createElement("span", {
759
+ }, value.length > 0 ? single || value[0][valueKey] === selectedAllValue[valueKey] ? /*#__PURE__*/React.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$1.createElement(TagOverflowInner, {
762
+ }, value[0][labelKey]) : /*#__PURE__*/React.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$1.createElement("span", {
768
+ }) : /*#__PURE__*/React.createElement("span", {
769
769
  className: classnames(style$6['placeholder'], 'select-input-placeholder')
770
- }, placeholder)), /*#__PURE__*/React$1.createElement("div", {
770
+ }, placeholder)), /*#__PURE__*/React.createElement("div", {
771
771
  className: classnames(style$6['select-input-icon'], 'select-input-icon')
772
- }, !disabled && allowClear && hover && value.length > 0 ? /*#__PURE__*/React$1.createElement(CloseCircleFilled, {
772
+ }, !disabled && allowClear && hover && value.length > 0 ? /*#__PURE__*/React.createElement(CloseCircleFilled, {
773
773
  onClick: e => {
774
774
  e.stopPropagation();
775
775
  setValue([]);
776
776
  }
777
- }) : /*#__PURE__*/React$1.createElement(DownOutlined, null)), (() => {
777
+ }) : /*#__PURE__*/React.createElement(DownOutlined, null)), (() => {
778
778
  const current = typeof suffix === 'function' ? suffix(contextProps) : suffix;
779
- return current && /*#__PURE__*/React$1.createElement("span", {
779
+ return current && /*#__PURE__*/React.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$1.createElement(Provider, {
802
+ return /*#__PURE__*/React.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$1.createElement(ModalContent, contextProps, sheetContextProps => {
810
+ }), /*#__PURE__*/React.createElement(ModalContent, contextProps, sheetContextProps => {
811
811
  const {
812
812
  onComplete
813
813
  } = sheetContextProps;
814
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(MobileSheetMask, {
814
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileSheetMask, {
815
815
  open: sheetOpen,
816
816
  mountNode: popupMountNode,
817
817
  fixedModeClass: fixedModeClass,
818
818
  onClose: closeWithoutCommit
819
- }), /*#__PURE__*/React$1.createElement(MobileSheetPanel, {
819
+ }), /*#__PURE__*/React.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$1.createElement("div", {
839
+ const overlayContent = /*#__PURE__*/React.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$1.createElement(Provider, {
848
+ return /*#__PURE__*/React.createElement(Provider, {
849
849
  value: contextProps
850
- }, isPopup ? /*#__PURE__*/React$1.createElement(Dropdown, {
850
+ }, isPopup ? /*#__PURE__*/React.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$1.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, inputInnerRender({
866
+ }, /*#__PURE__*/React.createElement("span", null, inputInnerRender())) : /*#__PURE__*/React.createElement(React.Fragment, null, inputInnerRender({
867
867
  onClick: () => {
868
868
  setOpen(true);
869
869
  }
870
- }), /*#__PURE__*/React$1.createElement(ModalContent, contextProps, renderModal)));
870
+ }), /*#__PURE__*/React.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$1.createElement(Flex, {
896
+ return /*#__PURE__*/React.createElement(Flex, {
897
897
  justify: "space-between",
898
898
  className: classnames(style$5['selected-all'], 'selected-all')
899
- }, /*#__PURE__*/React$1.createElement(Flex, {
899
+ }, /*#__PURE__*/React.createElement(Flex, {
900
900
  gap: 8
901
- }, /*#__PURE__*/React$1.createElement("span", null, formatMessage({
901
+ }, /*#__PURE__*/React.createElement("span", null, formatMessage({
902
902
  id: 'selected'
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, {
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, {
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$1.createElement(Flex, {
938
+ return /*#__PURE__*/React.createElement(Flex, {
939
939
  className: classnames(style$4['tag-list'], 'selected-tag-list'),
940
940
  gap: 8
941
- }, /*#__PURE__*/React$1.createElement("div", {
941
+ }, /*#__PURE__*/React.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$1.createElement(SimpleBar, {
945
+ }), !single && value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(SimpleBar, {
946
946
  className: style$4['tag-container']
947
- }, /*#__PURE__*/React$1.createElement(Flex, {
947
+ }, /*#__PURE__*/React.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$1.createElement(Tag, {
952
+ return /*#__PURE__*/React.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$1.createElement("span", {
961
+ }, /*#__PURE__*/React.createElement("span", {
962
962
  className: style$4['tag-inner']
963
963
  }, item[labelKey]));
964
964
  }))));
@@ -981,9 +981,9 @@ const SelectList = forwardRef((_ref, ref) => {
981
981
  const {
982
982
  labelKey
983
983
  } = props;
984
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
984
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
985
985
  className: 'select-list-item-label'
986
- }, item[labelKey]), item.description && /*#__PURE__*/React$1.createElement("div", {
986
+ }, item[labelKey]), item.description && /*#__PURE__*/React.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$1.createElement(List.Item, {
1007
+ return /*#__PURE__*/React.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$1.createElement(Flex, null, /*#__PURE__*/React$1.createElement(Checkbox, {
1030
+ }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
1031
1031
  checked: isSelectedAll || isChecked,
1032
1032
  disabled: isSelectedAll || item.disabled
1033
- })), /*#__PURE__*/React$1.createElement(Flex, {
1033
+ })), /*#__PURE__*/React.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$1.createElement("div", {
1038
+ }, renderItemContent(contextProps)), single && /*#__PURE__*/React.createElement("div", {
1039
1039
  className: style$3['single-checked']
1040
- }, isChecked && /*#__PURE__*/React$1.createElement(CheckOutlined, null)));
1040
+ }, isChecked && /*#__PURE__*/React.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$1.createElement(Empty, {
1052
+ return props.empty || /*#__PURE__*/React.createElement(Empty, {
1053
1053
  className: style$3['empty']
1054
1054
  });
1055
1055
  }
1056
- return /*#__PURE__*/React$1.createElement(List, {
1056
+ return /*#__PURE__*/React.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$1.createElement(SelectInput, _extends({}, props, {
1068
+ return /*#__PURE__*/React.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$1.createElement(SearchInput, {
1096
+ search: (api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function') && /*#__PURE__*/React.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$1.createElement("div", {
1110
+ selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement("div", {
1111
1111
  className: classnames(style$3['selected-all'], 'select-list-selected-all', {
1112
1112
  'is-popup': isPopup
1113
1113
  })
1114
- }, /*#__PURE__*/React$1.createElement(SelectedAll, null)),
1115
- fetchList: open ? /*#__PURE__*/React$1.createElement(FetchScrollLoader, _extends({}, props, {
1114
+ }, /*#__PURE__*/React.createElement(SelectedAll, null)),
1115
+ fetchList: open ? /*#__PURE__*/React.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$1.createElement("div", {
1152
+ selectedTag: showSelectedTag && /*#__PURE__*/React.createElement("div", {
1153
1153
  className: classnames(style$3['selected-tag'], 'select-list-selected-tag', {
1154
1154
  'is-popup': isPopup
1155
1155
  })
1156
- }, /*#__PURE__*/React$1.createElement(SelectedTagList, null)),
1157
- footer: footer && /*#__PURE__*/React$1.createElement("div", {
1156
+ }, /*#__PURE__*/React.createElement(SelectedTagList, null)),
1157
+ footer: footer && /*#__PURE__*/React.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$1.createElement(Flex, {
1173
+ return /*#__PURE__*/React.createElement(Flex, {
1174
1174
  vertical: true,
1175
1175
  className: classnames({
1176
1176
  [style$3['is-mobile']]: isMobile
@@ -1201,7 +1201,7 @@ const FetchTableContent = _ref => {
1201
1201
  } = _ref,
1202
1202
  tableProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1203
1203
  const paginationMerged = Object.assign({
1204
- open: false,
1204
+ open: true,
1205
1205
  paramsType: 'data',
1206
1206
  requestType: 'reload',
1207
1207
  currentName: 'currentPage',
@@ -1217,16 +1217,101 @@ const FetchTableContent = _ref => {
1217
1217
  requestParams,
1218
1218
  fetchProps
1219
1219
  });
1220
- const showPagination = paginationMerged.open && formatData.total > 0;
1221
1220
  const currentPage = get(requestParams, [paginationMerged.paramsType, paginationMerged.currentName], 1);
1222
1221
  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 || [],
1222
+ const hasMore = formatData.total > currentPage * currentPageSize;
1223
+ const showPagination = paginationMerged.open && formatData.total > 0;
1224
+ const isLoadMoreMode = !paginationMerged.open;
1225
+ const [accumulatedList, setAccumulatedList] = useState([]);
1226
+ const [isLoadingMore, setIsLoadingMore] = useState(false);
1227
+ const isLoadingMoreRef = useRef(false);
1228
+ const prevDataRef = useRef(null);
1229
+ const containerRef = useRef(null);
1230
+ useEffect(() => {
1231
+ if (!isLoadMoreMode) return;
1232
+ if (data === prevDataRef.current) return;
1233
+ prevDataRef.current = data;
1234
+ const newList = formatData.list || [];
1235
+ if (currentPage <= 1) {
1236
+ setAccumulatedList(newList);
1237
+ } else {
1238
+ setAccumulatedList(prev => prev.concat(newList));
1239
+ }
1240
+ setIsLoadingMore(false);
1241
+ isLoadingMoreRef.current = false;
1242
+ }, [data, isLoadMoreMode, currentPage, formatData.list]);
1243
+ const doLoadNextPage = useCallback(() => {
1244
+ if (isLoadingMoreRef.current || !hasMore || !isLoadMoreMode) return;
1245
+ isLoadingMoreRef.current = true;
1246
+ setIsLoadingMore(true);
1247
+ const nextPage = currentPage + 1;
1248
+ const currentParams = get(requestParams, paginationMerged.paramsType, {});
1249
+ (paginationMerged.requestType === 'refresh' ? refresh : reload)({
1250
+ [paginationMerged.paramsType]: Object.assign({}, currentParams, {
1251
+ [paginationMerged.currentName]: nextPage,
1252
+ [paginationMerged.pageSizeName]: currentPageSize
1253
+ })
1254
+ });
1255
+ }, [hasMore, isLoadMoreMode, currentPage, requestParams, paginationMerged, refresh, reload, currentPageSize]);
1256
+ useEffect(() => {
1257
+ if (!isLoadMoreMode) return;
1258
+ const container = containerRef.current;
1259
+ if (!container) return;
1260
+ const scrollEl = container.querySelector('.ant-table-body') || container.closest('.select-table-list-scroll-list');
1261
+ if (!scrollEl) return;
1262
+ const onScroll = () => {
1263
+ const {
1264
+ scrollTop,
1265
+ scrollHeight,
1266
+ clientHeight
1267
+ } = scrollEl;
1268
+ if (scrollHeight - scrollTop - clientHeight < 50) {
1269
+ doLoadNextPage();
1270
+ }
1271
+ };
1272
+ scrollEl.addEventListener('scroll', onScroll, {
1273
+ passive: true
1274
+ });
1275
+ return () => scrollEl.removeEventListener('scroll', onScroll);
1276
+ }, [isLoadMoreMode, doLoadNextPage]);
1277
+
1278
+ // 如果当前列表高度没有超过容器(弹窗模式可能不出现滚动条),
1279
+ // 仅靠 scroll 事件无法触发 loadMore:自动补页直到出现溢出或没有更多。
1280
+ const autoLoadCountRef = useRef(0);
1281
+ useEffect(() => {
1282
+ if (!isLoadMoreMode) return;
1283
+ if (isLoadingMoreRef.current) return;
1284
+ if (!hasMore) return;
1285
+ const container = containerRef.current;
1286
+ if (!container) return;
1287
+ const scrollEl = container.querySelector('.ant-table-body') || container.closest('.select-table-list-scroll-list');
1288
+ if (!scrollEl) return;
1289
+ const isOverflowing = scrollEl.scrollHeight > scrollEl.clientHeight + 1;
1290
+ if (isOverflowing) {
1291
+ autoLoadCountRef.current = 0;
1292
+ return;
1293
+ }
1294
+ if (autoLoadCountRef.current >= 5) return;
1295
+ autoLoadCountRef.current += 1;
1296
+ setTimeout(() => doLoadNextPage(), 0);
1297
+ }, [isLoadMoreMode, hasMore, data, currentPage, currentPageSize, doLoadNextPage]);
1298
+ const displayList = isLoadMoreMode ? accumulatedList : formatData.list || [];
1299
+ return /*#__PURE__*/React.createElement("div", {
1300
+ ref: containerRef
1301
+ }, /*#__PURE__*/React.createElement(Table, _extends({}, tableProps, {
1302
+ dataSource: displayList,
1225
1303
  pagination: false,
1226
1304
  columns: columns,
1227
1305
  context: tableContext,
1228
1306
  columnRenderProps: tableContext
1229
- })), showPagination ? /*#__PURE__*/React.createElement(Pagination, {
1307
+ })), showPagination ? /*#__PURE__*/React.createElement("div", {
1308
+ style: {
1309
+ padding: '8px 12px',
1310
+ display: 'flex',
1311
+ justifyContent: 'flex-end'
1312
+ }
1313
+ }, /*#__PURE__*/React.createElement(Pagination, {
1314
+ size: "small",
1230
1315
  total: formatData.total,
1231
1316
  current: currentPage,
1232
1317
  pageSize: currentPageSize,
@@ -1234,14 +1319,24 @@ const FetchTableContent = _ref => {
1234
1319
  showQuickJumper: paginationMerged.showQuickJumper,
1235
1320
  hideOnSinglePage: paginationMerged.hideOnSinglePage,
1236
1321
  onChange: (page, size) => {
1322
+ const currentParams = get(requestParams, paginationMerged.paramsType, {});
1237
1323
  (paginationMerged.requestType === 'refresh' ? refresh : reload)({
1238
- [paginationMerged.paramsType]: Object.assign({}, get(requestParams, paginationMerged.paramsType), {
1324
+ [paginationMerged.paramsType]: Object.assign({}, currentParams, {
1239
1325
  [paginationMerged.currentName]: page,
1240
1326
  [paginationMerged.pageSizeName]: size
1241
1327
  })
1242
1328
  });
1243
1329
  }
1244
- }) : null);
1330
+ })) : null, isLoadMoreMode ? /*#__PURE__*/React.createElement("div", {
1331
+ style: {
1332
+ textAlign: 'center',
1333
+ padding: '8px 0',
1334
+ color: '#999',
1335
+ fontSize: 12,
1336
+ height: 32,
1337
+ visibility: isLoadingMore ? 'visible' : 'hidden'
1338
+ }
1339
+ }, "\u52A0\u8F7D\u4E2D...") : null);
1245
1340
  };
1246
1341
  const FetchTable = withFetch(FetchTableContent);
1247
1342
 
@@ -1355,7 +1450,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1355
1450
  if (!(api && typeof getSearchProps === 'function' || options && typeof getSearchCallback === 'function')) {
1356
1451
  return null;
1357
1452
  }
1358
- return /*#__PURE__*/React$1.createElement(SearchInput, {
1453
+ return /*#__PURE__*/React.createElement(SearchInput, {
1359
1454
  className: classnames(style$2['select-search'], 'select-table-search', {
1360
1455
  'is-popup': isPopup
1361
1456
  }),
@@ -1384,7 +1479,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1384
1479
  }
1385
1480
  }, p);
1386
1481
  const bodyRef = useRef(null);
1387
- return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
1482
+ return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
1388
1483
  ref: ref
1389
1484
  }), targetProps => {
1390
1485
  const {
@@ -1431,7 +1526,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1431
1526
  } = props;
1432
1527
  const isSelectedAll = computedIsSelectAll(value, selectedAllValue, valueKey);
1433
1528
  const resolvedTreeTitleKey = treeTitleKey || labelKey;
1434
- const footerEl = footer && /*#__PURE__*/React$1.createElement("div", {
1529
+ const footerEl = footer && /*#__PURE__*/React.createElement("div", {
1435
1530
  className: classnames(style$2['footer'], 'select-table-footer')
1436
1531
  }, typeof footer === 'function' ? footer({
1437
1532
  reload: () => {
@@ -1497,12 +1592,12 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1497
1592
  }
1498
1593
  }
1499
1594
  };
1500
- const selectedPanel = !single && /*#__PURE__*/React$1.createElement("div", {
1595
+ const selectedPanel = !single && /*#__PURE__*/React.createElement("div", {
1501
1596
  className: classnames(style$2['right-options'], {
1502
1597
  'is-popup': isPopup,
1503
1598
  [style$2['is-mobile']]: isMobile
1504
1599
  })
1505
- }, /*#__PURE__*/React$1.createElement(SearchInput, {
1600
+ }, /*#__PURE__*/React.createElement(SearchInput, {
1506
1601
  className: style$2['tags-search'],
1507
1602
  placeholder: searchPlaceholder,
1508
1603
  value: tagSearchText,
@@ -1510,13 +1605,13 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1510
1605
  setTagSearchText(value);
1511
1606
  },
1512
1607
  showSearchButton: false
1513
- }), /*#__PURE__*/React$1.createElement(Row, {
1608
+ }), /*#__PURE__*/React.createElement(Row, {
1514
1609
  wrap: false,
1515
1610
  justify: 'space-between',
1516
1611
  align: 'middle'
1517
- }, /*#__PURE__*/React$1.createElement(Col, null, formatMessage({
1612
+ }, /*#__PURE__*/React.createElement(Col, null, formatMessage({
1518
1613
  id: 'selected'
1519
- }), value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement(Button, {
1614
+ }), value.length > 0 && `(${value.length}${Number.isInteger(maxLength) ? `/${maxLength}` : ''})`, ":"), /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement(Button, {
1520
1615
  className: style$2['no-padding-btn'],
1521
1616
  type: "link",
1522
1617
  onClick: () => {
@@ -1525,12 +1620,12 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1525
1620
  }, formatMessage({
1526
1621
  id: 'removeAll'
1527
1622
  })))), (() => {
1528
- const selectedTags = /*#__PURE__*/React$1.createElement(Flex, {
1623
+ const selectedTags = /*#__PURE__*/React.createElement(Flex, {
1529
1624
  wrap: true,
1530
1625
  gap: 8
1531
1626
  }, value.filter(item => getTagSearchCallback(tagSearchText, item, targetProps)).map(item => {
1532
1627
  var _tablePageRef$current3;
1533
- return /*#__PURE__*/React$1.createElement(Tag, {
1628
+ return /*#__PURE__*/React.createElement(Tag, {
1534
1629
  className: style$2['tag'],
1535
1630
  key: item[valueKey],
1536
1631
  closable: true,
@@ -1539,9 +1634,9 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1539
1634
  e.preventDefault();
1540
1635
  onRemove(item);
1541
1636
  }
1542
- }, /*#__PURE__*/React$1.createElement(Popover, {
1637
+ }, /*#__PURE__*/React.createElement(Popover, {
1543
1638
  getPopupContainer: () => bodyRef.current,
1544
- content: /*#__PURE__*/React$1.createElement(CentralContent, {
1639
+ content: /*#__PURE__*/React.createElement(CentralContent, {
1545
1640
  className: style$2['descriptions'],
1546
1641
  columns: columns.filter(item => {
1547
1642
  if (Object.hasOwn(item, 'previewHidden')) {
@@ -1557,41 +1652,41 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1557
1652
  list: getListFromPageData((_tablePageRef$current3 = tablePageRef.current) == null ? void 0 : _tablePageRef$current3.data)
1558
1653
  })
1559
1654
  })
1560
- }, /*#__PURE__*/React$1.createElement("span", {
1655
+ }, /*#__PURE__*/React.createElement("span", {
1561
1656
  className: style$2['tag-inner']
1562
1657
  }, item[labelKey])));
1563
1658
  }));
1564
1659
  // 移动端弹窗内不用 SimpleBar,改原生滚动
1565
1660
  if (isMobile) {
1566
- return /*#__PURE__*/React$1.createElement("div", {
1661
+ return /*#__PURE__*/React.createElement("div", {
1567
1662
  className: style$2['selected-tags-scroll']
1568
1663
  }, selectedTags);
1569
1664
  }
1570
- return /*#__PURE__*/React$1.createElement(SimpleBar, {
1665
+ return /*#__PURE__*/React.createElement(SimpleBar, {
1571
1666
  className: style$2['selected-tags-scroll']
1572
1667
  }, selectedTags);
1573
1668
  })(), footerEl);
1574
- const tablePanel = /*#__PURE__*/React$1.createElement("div", {
1669
+ const tablePanel = /*#__PURE__*/React.createElement("div", {
1575
1670
  className: classnames(style$2['table-panel'], {
1576
1671
  [style$2['single-body']]: single
1577
1672
  })
1578
- }, /*#__PURE__*/React$1.createElement("div", {
1673
+ }, /*#__PURE__*/React.createElement("div", {
1579
1674
  className: style$2['filter-wrap']
1580
- }, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React$1.createElement("div", {
1675
+ }, filterRender(Object.assign({}, targetProps))), /*#__PURE__*/React.createElement("div", {
1581
1676
  className: classnames(style$2['table'], 'select-table')
1582
- }, open ? /*#__PURE__*/React$1.createElement("div", {
1677
+ }, open ? /*#__PURE__*/React.createElement("div", {
1583
1678
  ref: listScrollRef,
1584
1679
  className: classnames(style$2['list'], 'select-table-list-scroll-list', {
1585
1680
  'is-popup': isPopup,
1586
1681
  [style$2['is-fit-columns']]: !allColumnsHaveWidth
1587
1682
  })
1588
- }, /*#__PURE__*/React$1.createElement(FetchTable, _extends({}, tablePageFetchConfig, {
1683
+ }, /*#__PURE__*/React.createElement(FetchTable, _extends({}, tablePageFetchConfig, {
1589
1684
  ref: tablePageRef
1590
1685
  }, dataFormat ? {
1591
1686
  dataFormat
1592
1687
  } : null, {
1593
1688
  pagination: Object.assign({
1594
- open: false,
1689
+ open: true,
1595
1690
  showSizeChanger: false,
1596
1691
  showQuickJumper: false,
1597
1692
  hideOnSinglePage: true
@@ -1608,7 +1703,7 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1608
1703
  columnRenderProps: Object.assign({}, targetProps, {
1609
1704
  isSelectedAll
1610
1705
  }),
1611
- empty: props.empty || /*#__PURE__*/React$1.createElement(Empty, {
1706
+ empty: props.empty || /*#__PURE__*/React.createElement(Empty, {
1612
1707
  className: classnames(style$2['empty'])
1613
1708
  }),
1614
1709
  dataType: dataType,
@@ -1632,31 +1727,31 @@ const SelectTableList = createWithIntlProvider('zh-CN', locale$1, 'super-select'
1632
1727
  expandedKeys
1633
1728
  } : null, Object.prototype.hasOwnProperty.call(p, 'defaultExpandedKeys') ? {
1634
1729
  defaultExpandedKeys
1635
- } : null))) : null), single && footerEl || !isMobile && /*#__PURE__*/React$1.createElement("div", {
1730
+ } : null))) : null), single && footerEl || !isMobile && /*#__PURE__*/React.createElement("div", {
1636
1731
  className: classnames(style$2['footer'], 'select-table-footer')
1637
1732
  }));
1638
1733
 
1639
1734
  // 移动端:表格在上、已选在下(上下布局)
1640
1735
  if (isMobile) {
1641
- return /*#__PURE__*/React$1.createElement("div", {
1736
+ return /*#__PURE__*/React.createElement("div", {
1642
1737
  ref: bodyRef,
1643
1738
  className: classnames(style$2['body'], style$2['is-mobile'], 'select-table-list-body')
1644
- }, /*#__PURE__*/React$1.createElement("div", {
1739
+ }, /*#__PURE__*/React.createElement("div", {
1645
1740
  className: style$2['table-panel-wrap']
1646
- }, tablePanel), selectedPanel ? /*#__PURE__*/React$1.createElement("div", {
1741
+ }, tablePanel), selectedPanel ? /*#__PURE__*/React.createElement("div", {
1647
1742
  className: style$2['selected-panel-wrap']
1648
1743
  }, selectedPanel) : null);
1649
1744
  }
1650
- return /*#__PURE__*/React$1.createElement(Row, {
1745
+ return /*#__PURE__*/React.createElement(Row, {
1651
1746
  wrap: false,
1652
1747
  ref: bodyRef,
1653
1748
  className: classnames(style$2['body'], 'select-table-list-body')
1654
- }, /*#__PURE__*/React$1.createElement(Col, {
1749
+ }, /*#__PURE__*/React.createElement(Col, {
1655
1750
  className: classnames({
1656
1751
  [style$2['single-body']]: single
1657
1752
  }),
1658
1753
  span: single ? 24 : 16
1659
- }, tablePanel), !single && /*#__PURE__*/React$1.createElement(Col, {
1754
+ }, tablePanel), !single && /*#__PURE__*/React.createElement(Col, {
1660
1755
  span: 8,
1661
1756
  className: style$2['right-options-col']
1662
1757
  }, selectedPanel));
@@ -1704,7 +1799,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1704
1799
  const {
1705
1800
  labelKey
1706
1801
  } = props;
1707
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1802
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1708
1803
  className: 'select-tree-item-label'
1709
1804
  }, item[labelKey]));
1710
1805
  },
@@ -1725,7 +1820,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1725
1820
  valueKey
1726
1821
  } = props;
1727
1822
  const isChecked = value.some(target => target[valueKey] === item[valueKey]);
1728
- return /*#__PURE__*/React$1.createElement(Flex, {
1823
+ return /*#__PURE__*/React.createElement(Flex, {
1729
1824
  className: classnames(style$1['default-list-item'], 'select-tree-item', {
1730
1825
  [style$1['is-selected']]: isChecked,
1731
1826
  [style$1['is-disabled']]: item.disabled
@@ -1748,17 +1843,17 @@ const SelectTree = forwardRef((_ref, ref) => {
1748
1843
  onOpenChange(false);
1749
1844
  }
1750
1845
  }
1751
- }, !single && /*#__PURE__*/React$1.createElement(Flex, null, /*#__PURE__*/React$1.createElement(Checkbox, {
1846
+ }, !single && /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Checkbox, {
1752
1847
  checked: isSelectedAll || isChecked,
1753
1848
  disabled: isSelectedAll || item.disabled
1754
- })), /*#__PURE__*/React$1.createElement(Flex, {
1849
+ })), /*#__PURE__*/React.createElement(Flex, {
1755
1850
  vertical: true,
1756
1851
  gag: 8,
1757
1852
  flex: 1,
1758
1853
  className: 'select-tree-item-content'
1759
- }, renderItemContent(contextProps)), single && /*#__PURE__*/React$1.createElement("div", {
1854
+ }, renderItemContent(contextProps)), single && /*#__PURE__*/React.createElement("div", {
1760
1855
  className: style$1['single-checked']
1761
- }, isChecked && /*#__PURE__*/React$1.createElement(CheckOutlined, null)));
1856
+ }, isChecked && /*#__PURE__*/React.createElement(CheckOutlined, null)));
1762
1857
  },
1763
1858
  renderTree: contextProps => {
1764
1859
  const {
@@ -1782,9 +1877,9 @@ const SelectTree = forwardRef((_ref, ref) => {
1782
1877
  childrenKey
1783
1878
  });
1784
1879
  if (!(treeData && treeData.length > 0)) {
1785
- return props.empty || /*#__PURE__*/React$1.createElement(Empty, null);
1880
+ return props.empty || /*#__PURE__*/React.createElement(Empty, null);
1786
1881
  }
1787
- return /*#__PURE__*/React$1.createElement(Tree, {
1882
+ return /*#__PURE__*/React.createElement(Tree, {
1788
1883
  className: classnames(style$1['default-list'], {
1789
1884
  [style$1['is-selected-all']]: isSelectedAll
1790
1885
  }),
@@ -1808,7 +1903,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1808
1903
  });
1809
1904
  }
1810
1905
  }, p);
1811
- return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
1906
+ return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
1812
1907
  ref: ref
1813
1908
  }), targetProps => {
1814
1909
  const {
@@ -1831,12 +1926,12 @@ const SelectTree = forwardRef((_ref, ref) => {
1831
1926
  selectedAllValue
1832
1927
  } = props;
1833
1928
  const components = {
1834
- selectedAll: !single && allowSelectedAll && /*#__PURE__*/React$1.createElement("div", {
1929
+ selectedAll: !single && allowSelectedAll && /*#__PURE__*/React.createElement("div", {
1835
1930
  className: classnames(style$1['selected-all'], 'select-tree-selected-all', {
1836
1931
  'is-popup': isPopup
1837
1932
  })
1838
- }, /*#__PURE__*/React$1.createElement(SelectedAll, null)),
1839
- treeList: open ? /*#__PURE__*/React$1.createElement(Fetch, _extends({}, Object.assign({}, options ? {
1933
+ }, /*#__PURE__*/React.createElement(SelectedAll, null)),
1934
+ treeList: open ? /*#__PURE__*/React.createElement(Fetch, _extends({}, Object.assign({}, options ? {
1840
1935
  data: {
1841
1936
  options
1842
1937
  },
@@ -1860,22 +1955,22 @@ const SelectTree = forwardRef((_ref, ref) => {
1860
1955
  });
1861
1956
  // 移动端弹窗内不用 SimpleBar,改原生滚动
1862
1957
  if (isMobile) {
1863
- return /*#__PURE__*/React$1.createElement("div", {
1958
+ return /*#__PURE__*/React.createElement("div", {
1864
1959
  className: scrollClassName
1865
1960
  }, treeContent);
1866
1961
  }
1867
- return /*#__PURE__*/React$1.createElement(SimpleBar, {
1962
+ return /*#__PURE__*/React.createElement(SimpleBar, {
1868
1963
  className: scrollClassName,
1869
1964
  autoHide: false
1870
1965
  }, treeContent);
1871
1966
  }
1872
1967
  })) : null,
1873
- selectedTag: showSelectedTag && /*#__PURE__*/React$1.createElement("div", {
1968
+ selectedTag: showSelectedTag && /*#__PURE__*/React.createElement("div", {
1874
1969
  className: classnames(style$1['selected-tag'], 'select-tree-selected-tag', {
1875
1970
  'is-popup': isPopup
1876
1971
  })
1877
- }, /*#__PURE__*/React$1.createElement(SelectedTagList, null)),
1878
- footer: footer && /*#__PURE__*/React$1.createElement("div", {
1972
+ }, /*#__PURE__*/React.createElement(SelectedTagList, null)),
1973
+ footer: footer && /*#__PURE__*/React.createElement("div", {
1879
1974
  className: classnames(style$1['footer'], 'select-list-footer')
1880
1975
  }, typeof footer === 'function' ? footer({
1881
1976
  reload: () => {
@@ -1891,7 +1986,7 @@ const SelectTree = forwardRef((_ref, ref) => {
1891
1986
  components
1892
1987
  }));
1893
1988
  }
1894
- return /*#__PURE__*/React$1.createElement(Flex, {
1989
+ return /*#__PURE__*/React.createElement(Flex, {
1895
1990
  vertical: true,
1896
1991
  className: classnames({
1897
1992
  [style$1['is-mobile']]: isMobile
@@ -2119,12 +2214,12 @@ const CustomMenu = ({
2119
2214
  domEvent: e
2120
2215
  });
2121
2216
  };
2122
- return /*#__PURE__*/React$1.createElement(List, {
2217
+ return /*#__PURE__*/React.createElement(List, {
2123
2218
  className: classnames(style['custom-menu'], className),
2124
2219
  dataSource: items,
2125
2220
  renderItem: item => {
2126
2221
  const isSelected = selectedKeys == null ? void 0 : selectedKeys.includes(item.key);
2127
- return /*#__PURE__*/React$1.createElement(List.Item, {
2222
+ return /*#__PURE__*/React.createElement(List.Item, {
2128
2223
  className: classnames(style['custom-menu-item'], {
2129
2224
  [style['selected']]: isSelected,
2130
2225
  selected: isSelected
@@ -2343,12 +2438,12 @@ const CascaderInner = ({
2343
2438
  // 渲染搜索内容
2344
2439
  if (searchText && searchResults) {
2345
2440
  const _currentIds3 = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2346
- return /*#__PURE__*/React$1.createElement("div", {
2441
+ return /*#__PURE__*/React.createElement("div", {
2347
2442
  className: classnames(style['content'], 'select-cascader-content', {
2348
2443
  [style['is-popup']]: isPopup,
2349
2444
  [style['is-mobile']]: isMobile
2350
2445
  })
2351
- }, /*#__PURE__*/React$1.createElement(SearchInput, {
2446
+ }, /*#__PURE__*/React.createElement(SearchInput, {
2352
2447
  className: classnames(style['search-input'], {
2353
2448
  'is-popup': isPopup
2354
2449
  }),
@@ -2357,23 +2452,23 @@ const CascaderInner = ({
2357
2452
  onSearch: setSearchText,
2358
2453
  simple: isPopup,
2359
2454
  showSearchButton: !isPopup
2360
- }), /*#__PURE__*/React$1.createElement(ScrollBox, {
2455
+ }), /*#__PURE__*/React.createElement(ScrollBox, {
2361
2456
  className: style['scroll-plus-box']
2362
- }, searchResults.length === 0 ? /*#__PURE__*/React$1.createElement(Empty, {
2457
+ }, searchResults.length === 0 ? /*#__PURE__*/React.createElement(Empty, {
2363
2458
  description: "\u6682\u65E0\u6570\u636E"
2364
- }) : /*#__PURE__*/React$1.createElement(List, {
2459
+ }) : /*#__PURE__*/React.createElement(List, {
2365
2460
  className: style['list'],
2366
2461
  size: "small",
2367
2462
  dataSource: searchResults,
2368
2463
  rowKey: "id",
2369
2464
  renderItem: item => {
2370
2465
  const checked = _currentIds3.includes(item.id);
2371
- return /*#__PURE__*/React$1.createElement(List.Item, {
2466
+ return /*#__PURE__*/React.createElement(List.Item, {
2372
2467
  className: classnames({
2373
2468
  [style['is-selected']]: checked
2374
2469
  }),
2375
2470
  onClick: () => onSearchSelect(item)
2376
- }, /*#__PURE__*/React$1.createElement("span", null, item.label), checked && /*#__PURE__*/React$1.createElement("span", {
2471
+ }, /*#__PURE__*/React.createElement("span", null, item.label), checked && /*#__PURE__*/React.createElement("span", {
2377
2472
  style: {
2378
2473
  marginLeft: 8,
2379
2474
  color: '#1677ff'
@@ -2385,7 +2480,7 @@ const CascaderInner = ({
2385
2480
 
2386
2481
  // 渲染级联列
2387
2482
  const currentIds = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2388
- return /*#__PURE__*/React$1.createElement("div", {
2483
+ return /*#__PURE__*/React.createElement("div", {
2389
2484
  className: classnames(style['content'], 'select-cascader-content', {
2390
2485
  [style['is-popup']]: isPopup,
2391
2486
  [style['has-search']]: !!onSearch,
@@ -2394,7 +2489,7 @@ const CascaderInner = ({
2394
2489
  style: {
2395
2490
  '--menu-item-width': numberToPx(menuItemWidth)
2396
2491
  }
2397
- }, onSearch && /*#__PURE__*/React$1.createElement(SearchInput, {
2492
+ }, onSearch && /*#__PURE__*/React.createElement(SearchInput, {
2398
2493
  className: classnames(style['search-input'], {
2399
2494
  'is-popup': isPopup
2400
2495
  }),
@@ -2403,13 +2498,13 @@ const CascaderInner = ({
2403
2498
  onSearch: setSearchText,
2404
2499
  simple: isPopup,
2405
2500
  showSearchButton: !isPopup
2406
- }), /*#__PURE__*/React$1.createElement(ScrollBox, _extends({
2501
+ }), /*#__PURE__*/React.createElement(ScrollBox, _extends({
2407
2502
  className: classnames(style['scroller'], 'select-cascader-scroller')
2408
2503
  }, isMobile ? {} : {
2409
2504
  options: {
2410
2505
  autoHide: false
2411
2506
  }
2412
- }), /*#__PURE__*/React$1.createElement("div", {
2507
+ }), /*#__PURE__*/React.createElement("div", {
2413
2508
  className: classnames(style['columns'], {
2414
2509
  [style['is-mobile']]: isMobile
2415
2510
  })
@@ -2417,12 +2512,12 @@ const CascaderInner = ({
2417
2512
  const selectNode = mapping.get(selectedId);
2418
2513
  const siblingNodes = treeUtils.getSiblingNode(selectedId);
2419
2514
  const isLastLevel = !isNotLastNode(selectNode == null ? void 0 : selectNode.id) && index > 0;
2420
- return /*#__PURE__*/React$1.createElement(ScrollBox, {
2515
+ return /*#__PURE__*/React.createElement(ScrollBox, {
2421
2516
  key: selectedId || index,
2422
2517
  className: classnames(style['content-item'], {
2423
2518
  [style['last-level-area']]: isLastLevel
2424
2519
  })
2425
- }, isLastLevel ? isMobile ? /*#__PURE__*/React$1.createElement(CustomMenu, {
2520
+ }, isLastLevel ? isMobile ? /*#__PURE__*/React.createElement(CustomMenu, {
2426
2521
  className: style['menu'],
2427
2522
  selectedKeys: currentIds,
2428
2523
  onSelect: ({
@@ -2442,11 +2537,11 @@ const CascaderInner = ({
2442
2537
  } = treeUtils.computedCheckboxStatus(node.id, currentIds);
2443
2538
  return {
2444
2539
  key: node.id,
2445
- label: /*#__PURE__*/React$1.createElement(Space, {
2540
+ label: /*#__PURE__*/React.createElement(Space, {
2446
2541
  className: classnames(style['menu-item'], {
2447
2542
  [style['single-mode']]: single
2448
2543
  })
2449
- }, /*#__PURE__*/React$1.createElement(Checkbox, {
2544
+ }, /*#__PURE__*/React.createElement(Checkbox, {
2450
2545
  checked: checked,
2451
2546
  indeterminate: indeterminate,
2452
2547
  onClick: e => e.stopPropagation(),
@@ -2454,14 +2549,14 @@ const CascaderInner = ({
2454
2549
  e.stopPropagation();
2455
2550
  onCheckedChange(e.target.checked, node.id);
2456
2551
  }
2457
- }), /*#__PURE__*/React$1.createElement("div", {
2552
+ }), /*#__PURE__*/React.createElement("div", {
2458
2553
  className: style['menu-label']
2459
- }, /*#__PURE__*/React$1.createElement("span", {
2554
+ }, /*#__PURE__*/React.createElement("span", {
2460
2555
  className: style['menu-label-text']
2461
2556
  }, node.label)))
2462
2557
  };
2463
2558
  })
2464
- }) : /*#__PURE__*/React$1.createElement(Space, {
2559
+ }) : /*#__PURE__*/React.createElement(Space, {
2465
2560
  wrap: true,
2466
2561
  style: {
2467
2562
  padding: 12
@@ -2474,13 +2569,13 @@ const CascaderInner = ({
2474
2569
  checked,
2475
2570
  indeterminate
2476
2571
  } = treeUtils.computedCheckboxStatus(node.id, currentIds);
2477
- return /*#__PURE__*/React$1.createElement(Checkbox, {
2572
+ return /*#__PURE__*/React.createElement(Checkbox, {
2478
2573
  key: node.id,
2479
2574
  checked: checked,
2480
2575
  indeterminate: indeterminate,
2481
2576
  onChange: e => onCheckedChange(e.target.checked, node.id)
2482
2577
  }, node.label);
2483
- })) : /*#__PURE__*/React$1.createElement(CustomMenu, {
2578
+ })) : /*#__PURE__*/React.createElement(CustomMenu, {
2484
2579
  className: style['menu'],
2485
2580
  selectedKeys: index === selectedIds.length - 1 ? [] : selectedIds,
2486
2581
  onSelect: ({
@@ -2508,12 +2603,12 @@ const CascaderInner = ({
2508
2603
  const childrenSelectedCount = hasChildren ? treeUtils.getAllChildren(node.id).filter(child => currentIds.includes(child.id)).length : 0;
2509
2604
  return {
2510
2605
  key: node.id,
2511
- label: /*#__PURE__*/React$1.createElement(Space, {
2606
+ label: /*#__PURE__*/React.createElement(Space, {
2512
2607
  className: classnames(style['menu-item'], {
2513
2608
  [style['checkbox-hidden']]: onlyAllowLastLevel && hasChildren,
2514
2609
  [style['single-mode']]: single
2515
2610
  })
2516
- }, (!onlyAllowLastLevel || !hasChildren) && /*#__PURE__*/React$1.createElement(Checkbox, {
2611
+ }, (!onlyAllowLastLevel || !hasChildren) && /*#__PURE__*/React.createElement(Checkbox, {
2517
2612
  checked: checked,
2518
2613
  indeterminate: indeterminate,
2519
2614
  onClick: e => e.stopPropagation(),
@@ -2521,24 +2616,24 @@ const CascaderInner = ({
2521
2616
  e.stopPropagation();
2522
2617
  onCheckedChange(e.target.checked, node.id);
2523
2618
  }
2524
- }), /*#__PURE__*/React$1.createElement("div", {
2619
+ }), /*#__PURE__*/React.createElement("div", {
2525
2620
  className: style['menu-label']
2526
- }, /*#__PURE__*/React$1.createElement("span", {
2621
+ }, /*#__PURE__*/React.createElement("span", {
2527
2622
  className: style['menu-label-text']
2528
- }, node.label), hasChildren && childrenSelectedCount > 0 && /*#__PURE__*/React$1.createElement(Badge, {
2623
+ }, node.label), hasChildren && childrenSelectedCount > 0 && /*#__PURE__*/React.createElement(Badge, {
2529
2624
  count: childrenSelectedCount,
2530
2625
  size: "small"
2531
- })), hasChildren ? /*#__PURE__*/React$1.createElement(RightOutlined, {
2626
+ })), hasChildren ? /*#__PURE__*/React.createElement(RightOutlined, {
2532
2627
  className: style['menu-item-icon']
2533
- }) : /*#__PURE__*/React$1.createElement("span", {
2628
+ }) : /*#__PURE__*/React.createElement("span", {
2534
2629
  className: style['menu-item-placeholder']
2535
2630
  }))
2536
2631
  };
2537
2632
  })
2538
2633
  }));
2539
- }), loading && /*#__PURE__*/React$1.createElement("div", {
2634
+ }), loading && /*#__PURE__*/React.createElement("div", {
2540
2635
  className: style['loading']
2541
- }, /*#__PURE__*/React$1.createElement(Spin, {
2636
+ }, /*#__PURE__*/React.createElement(Spin, {
2542
2637
  size: "small"
2543
2638
  })))));
2544
2639
  };
@@ -2652,7 +2747,7 @@ const SelectCascader = _ref => {
2652
2747
  };
2653
2748
  }).filter(Boolean);
2654
2749
  }, [currentValue, options, valueKey, labelKey]);
2655
- return /*#__PURE__*/React$1.createElement(SelectInput, _extends({}, props, {
2750
+ return /*#__PURE__*/React.createElement(SelectInput, _extends({}, props, {
2656
2751
  value: selectInputValue,
2657
2752
  onChange: setValue,
2658
2753
  single: single,
@@ -2700,7 +2795,7 @@ const SelectCascader = _ref => {
2700
2795
  [labelKey]: String(item)
2701
2796
  };
2702
2797
  }).filter(Boolean);
2703
- return contextProps.open ? /*#__PURE__*/React$1.createElement(CascaderInner, {
2798
+ return contextProps.open ? /*#__PURE__*/React.createElement(CascaderInner, {
2704
2799
  options: options,
2705
2800
  value: currentDisplayValue,
2706
2801
  setValue: contextSetValue,