@xfe-repo/web-components 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3100,13 +3100,14 @@ var UploadGroup = memo18(function(props) {
3100
3100
  // src/EffectFileUpload/index.tsx
3101
3101
  import { jsx as jsx27 } from "react/jsx-runtime";
3102
3102
  var _EffectFileUpload = memo19(forwardRef2(function(props, ref) {
3103
- var value = props.value, defaultValue = props.defaultValue, files = props.files, needSave = props.needSave, extFormData = props.extFormData, max = props.max, accept = props.accept, disabled = props.disabled, className = props.className, name = props.name, remote = props.remote, deleteConfirm = props.deleteConfirm;
3103
+ var value = props.value, defaultValue = props.defaultValue, files = props.files, needSave = props.needSave, extFormData = props.extFormData, max = props.max, accept = props.accept, disabled = props.disabled, className = props.className, name = props.name, remote = props.remote, pastable = props.pastable, deleteConfirm = props.deleteConfirm;
3104
3104
  var onChange = props.onChange, onFileChange = props.onFileChange, onUpload = props.onUpload, onUploadDone = props.onUploadDone, uploadOnAdd = props.uploadOnAdd;
3105
3105
  var passProps = {
3106
3106
  max: max,
3107
3107
  accept: accept,
3108
3108
  className: className,
3109
3109
  remote: remote,
3110
+ pastable: pastable,
3110
3111
  deleteConfirm: deleteConfirm
3111
3112
  };
3112
3113
  var _useState11 = _sliced_to_array(useState11(files || transformSimpleFile2UploadFile(value)), 2), uploadFiles = _useState11[0], setUploadFiles = _useState11[1];
@@ -3334,9 +3335,10 @@ var _EffectFileUpload = memo19(forwardRef2(function(props, ref) {
3334
3335
  simpleFiles
3335
3336
  ]);
3336
3337
  return /* @__PURE__ */ jsx27(FileUpload, _object_spread_props(_object_spread({}, passProps), {
3337
- onChange: handleFileChange,
3338
3338
  value: uploadFiles,
3339
- disabled: disabled || !!uploadTasksRef.current.length
3339
+ onChange: handleFileChange,
3340
+ disabled: disabled || !!uploadTasksRef.current.length,
3341
+ pastable: pastable && !uploadTasksRef.current.length
3340
3342
  }));
3341
3343
  }));
3342
3344
  var EffectFileUpload = Object.assign(_EffectFileUpload, {
@@ -3623,7 +3625,7 @@ var previewImage = function previewImage(file) {
3623
3625
  };
3624
3626
  var FileUpload = function FileUpload(props) {
3625
3627
  var _props_value = props.value, value = _props_value === void 0 ? [] : _props_value, defaultValue = props.defaultValue, onChange = props.onChange, disabled = props.disabled, classNames2 = props.classNames, children = props.children, accept = props.accept, _props_max = props.max, max = _props_max === void 0 ? 9 : _props_max, deleteConfirm = props.deleteConfirm;
3626
- var remote = props.remote, _props_multiple = props.multiple, multiple = _props_multiple === void 0 ? true : _props_multiple, _props_type = props.type, type = _props_type === void 0 ? "picture-card" : _props_type;
3628
+ var remote = props.remote, pastable = props.pastable, _props_multiple = props.multiple, multiple = _props_multiple === void 0 ? true : _props_multiple, _props_type = props.type, type = _props_type === void 0 ? "picture-card" : _props_type;
3627
3629
  var _useState14 = _sliced_to_array(useState14(-1), 2), previewImageIndex = _useState14[0], setPreviewImageIndex = _useState14[1];
3628
3630
  var _useState141 = _sliced_to_array(useState14(defaultValue || value || []), 2), fileList = _useState141[0], setFileList = _useState141[1];
3629
3631
  var _useState142 = _sliced_to_array(useState14(), 2), bufferAddFile = _useState142[0], setBufferAddFile = _useState142[1];
@@ -3772,6 +3774,7 @@ var FileUpload = function FileUpload(props) {
3772
3774
  multiple: multiple,
3773
3775
  disabled: disabled,
3774
3776
  fileList: fileList,
3777
+ pastable: pastable,
3775
3778
  onPreview: handlePreview,
3776
3779
  beforeUpload: handleBeforeUpload,
3777
3780
  onRemove: handleRemove
@@ -4086,10 +4089,12 @@ import { Transfer, Typography as Typography2 } from "antd";
4086
4089
  import useSWRImmutable2 from "swr/immutable";
4087
4090
  function useBrandOptions(params) {
4088
4091
  var _useRequestConfig = useRequestConfig(), config = _useRequestConfig.config, apiService = _useRequestConfig.apiService;
4089
- var _useSWRImmutable2 = useSWRImmutable2([
4092
+ var _useSWRImmutable2 = useSWRImmutable2(// 只有当 params 存在时才发起请求,避免无效请求
4093
+ params != null ? [
4090
4094
  "/product/brand/combo-box",
4091
4095
  params
4092
- ], function() {
4096
+ ] : null, function(param) {
4097
+ var _param = _sliced_to_array(param, 2), _params = _param[1];
4093
4098
  return _async_to_generator(function() {
4094
4099
  var _res_data, res, options;
4095
4100
  return _ts_generator(this, function(_state) {
@@ -4100,7 +4105,7 @@ function useBrandOptions(params) {
4100
4105
  apiService.brandComboBox(_object_spread({
4101
4106
  page: 1,
4102
4107
  pageSize: 500
4103
- }, params), config)
4108
+ }, _params), config)
4104
4109
  ];
4105
4110
  case 1:
4106
4111
  res = _state.sent();
@@ -4427,22 +4432,15 @@ import { memo as memo25, useCallback as useCallback18, useState as useState19 }
4427
4432
  import { usePrevious as usePrevious4, useUpdateEffect as useUpdateEffect9 } from "react-use";
4428
4433
  import { debounce as debounce3 } from "@xfe-repo/web-utils/tools";
4429
4434
  import classnames8 from "classnames";
4430
- // src/EffectBrandSelect/index.module.less
4431
- var index_module_default11 = {
4432
- input: "index_module_input3",
4433
- select: "index_module_select2"
4434
- };
4435
- // src/EffectBrandSelect/index.tsx
4436
- import { Select as Select4 } from "antd";
4437
- import { Typography as Typography3 } from "antd";
4435
+ import { Select as Select4, Typography as Typography3 } from "antd";
4438
4436
  // src/EffectSkuSelect/index.tsx
4439
4437
  import { memo as memo24, useCallback as useCallback17, useEffect as useEffect16, useMemo as useMemo14, useState as useState18 } from "react";
4440
4438
  import { useMount, useUpdateEffect as useUpdateEffect8, usePrevious as usePrevious3 } from "react-use";
4441
4439
  import { debounce as debounce2, uuid as uuid2 } from "@xfe-repo/web-utils/tools";
4442
4440
  import classnames7 from "classnames";
4443
4441
  // src/EffectSkuSelect/index.module.less
4444
- var index_module_default12 = {
4445
- input: "index_module_input4",
4442
+ var index_module_default11 = {
4443
+ input: "index_module_input3",
4446
4444
  image: "index_module_image",
4447
4445
  preview: "index_module_preview",
4448
4446
  icon: "index_module_icon",
@@ -4674,7 +4672,7 @@ var EffectSkuSelect = memo24(function(props) {
4674
4672
  state,
4675
4673
  options
4676
4674
  ]);
4677
- var dropdownRender = useCallback17(function(_menu) {
4675
+ var popupRender = useCallback17(function(_menu) {
4678
4676
  return /* @__PURE__ */ jsx34(SelectDropdown, {
4679
4677
  value: value,
4680
4678
  options: options,
@@ -4706,14 +4704,14 @@ var EffectSkuSelect = memo24(function(props) {
4706
4704
  onSearch: handleOnSearch,
4707
4705
  onClear: handleOnClear,
4708
4706
  open: openDropDown,
4709
- dropdownRender: dropdownRender,
4710
- onDropdownVisibleChange: setOpenDropDown,
4707
+ popupRender: popupRender,
4708
+ onOpenChange: setOpenDropDown,
4711
4709
  getPopupContainer: function getPopupContainer() {
4712
4710
  return document.body;
4713
4711
  }
4714
4712
  };
4715
4713
  return /* @__PURE__ */ jsx34(Select3, _object_spread({
4716
- className: classnames7(index_module_default12.input, className)
4714
+ className: classnames7(index_module_default11.input, className)
4717
4715
  }, selectBrandProps));
4718
4716
  });
4719
4717
  var SelectDropdown = memo24(function(props) {
@@ -4734,7 +4732,7 @@ var SelectDropdown = memo24(function(props) {
4734
4732
  }, []);
4735
4733
  return /* @__PURE__ */ jsx34("div", {
4736
4734
  id: selectDropdownId,
4737
- className: index_module_default12.select_dropdown,
4735
+ className: index_module_default11.select_dropdown,
4738
4736
  onMouseDown: handleMouseDown,
4739
4737
  children: /* @__PURE__ */ jsx34(InfiniteScroll, {
4740
4738
  dataLength: options.length,
@@ -4751,22 +4749,22 @@ var SelectDropdown = memo24(function(props) {
4751
4749
  scrollableTarget: selectDropdownId,
4752
4750
  scrollThreshold: "100px",
4753
4751
  children: /* @__PURE__ */ jsx34("div", {
4754
- className: index_module_default12.options,
4752
+ className: index_module_default11.options,
4755
4753
  children: options.map(function(item) {
4756
4754
  return /* @__PURE__ */ jsxs14("div", {
4757
- className: classnames7(index_module_default12.option, item.value === value && index_module_default12.active),
4755
+ className: classnames7(index_module_default11.option, item.value === value && index_module_default11.active),
4758
4756
  onClick: function onClick() {
4759
4757
  return handleOnSelect(item);
4760
4758
  },
4761
4759
  children: [
4762
4760
  /* @__PURE__ */ jsx34(ImageItem, {
4763
- className: index_module_default12.select_image,
4761
+ className: index_module_default11.select_image,
4764
4762
  item: item,
4765
4763
  previewed: item.image === previewImage2,
4766
4764
  onPreview: handlePreview
4767
4765
  }),
4768
4766
  /* @__PURE__ */ jsx34("p", {
4769
- className: index_module_default12.label,
4767
+ className: index_module_default11.label,
4770
4768
  children: item.label
4771
4769
  })
4772
4770
  ]
@@ -4787,7 +4785,7 @@ var ImageItem = memo24(function(props) {
4787
4785
  ]);
4788
4786
  var previewProps = useMemo14(function() {
4789
4787
  return {
4790
- maskClassName: "".concat(index_module_default12.item_mask_img),
4788
+ maskClassName: "".concat(index_module_default11.item_mask_img),
4791
4789
  visible: previewed,
4792
4790
  onVisibleChange: function onVisibleChange(value) {
4793
4791
  return !value && (onPreview === null || onPreview === void 0 ? void 0 : onPreview());
@@ -4798,16 +4796,16 @@ var ImageItem = memo24(function(props) {
4798
4796
  onPreview
4799
4797
  ]);
4800
4798
  return /* @__PURE__ */ jsxs14("div", {
4801
- className: classnames7(index_module_default12.image, className),
4799
+ className: classnames7(index_module_default11.image, className),
4802
4800
  children: [
4803
4801
  /* @__PURE__ */ jsxs14("div", {
4804
- className: index_module_default12.preview,
4802
+ className: index_module_default11.preview,
4805
4803
  onClick: function onClick(event) {
4806
4804
  return handlePreview(event);
4807
4805
  },
4808
4806
  children: [
4809
4807
  /* @__PURE__ */ jsx34(EyeOutlined2, {
4810
- className: index_module_default12.icon
4808
+ className: index_module_default11.icon
4811
4809
  }),
4812
4810
  " \u9884\u89C8"
4813
4811
  ]
@@ -4825,44 +4823,64 @@ var getNumberValue = function getNumberValue(value) {
4825
4823
  var numValue = Number(value);
4826
4824
  return Number.isNaN(numValue) ? void 0 : numValue;
4827
4825
  };
4826
+ // src/EffectBrandSelect/index.module.less
4827
+ var index_module_default12 = {
4828
+ input: "index_module_input4",
4829
+ select: "index_module_select2"
4830
+ };
4828
4831
  // src/EffectBrandSelect/index.tsx
4829
4832
  import { jsx as jsx35 } from "react/jsx-runtime";
4833
+ var OTHER_BRAND_OPTION = {
4834
+ label: "\u5176\u5B83",
4835
+ value: 1310
4836
+ };
4830
4837
  var EffectBrandSelect = memo25(function(props) {
4831
- var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, mode = props.mode, categoryId = props.categoryId, sysBizTypeId = props.sysBizTypeId, showOtherBrand = props.showOtherBrand, style = props.style;
4838
+ var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, defaultLabel = props.defaultLabel, disabled = props.disabled, mode = props.mode, categoryId = props.categoryId, sysBizTypeId = props.sysBizTypeId, showOtherBrand = props.showOtherBrand, style = props.style;
4839
+ var initialValue = controlValue !== null && controlValue !== void 0 ? controlValue : defaultValue;
4840
+ var hasDefaultLabel = !!defaultLabel && initialValue !== void 0;
4832
4841
  var _useState19 = _sliced_to_array(useState19(controlValue || defaultValue), 2), value = _useState19[0], setValue = _useState19[1];
4842
+ var _useState191 = _sliced_to_array(useState19(function() {
4843
+ if (hasDefaultLabel) return null;
4844
+ return {
4845
+ /** 兼容 props 分类 Id 异常传入 */ categoryId: getNumberValue(categoryId),
4846
+ sysBizTypeId: sysBizTypeId,
4847
+ brandId: initialValue === null || initialValue === void 0 ? void 0 : initialValue.toString()
4848
+ };
4849
+ }), 2), params = _useState191[0], setParams = _useState191[1];
4850
+ var _useState192 = _sliced_to_array(useState19(hasDefaultLabel ? [
4851
+ {
4852
+ label: defaultLabel,
4853
+ value: initialValue
4854
+ }
4855
+ ] : []), 2), options = _useState192[0], setOptions = _useState192[1];
4856
+ var prevControlValue = usePrevious4(controlValue);
4857
+ var state = useBrandOptions(params);
4833
4858
  var searchFetch = useCallback18(function(brandName, brandId) {
4834
- if (brandId !== void 0) brandId = String(brandId);
4835
4859
  setParams({
4836
- categoryId: getNumberValue(categoryId),
4860
+ /** 兼容 props 分类 Id 异常传入 */ categoryId: getNumberValue(categoryId),
4837
4861
  sysBizTypeId: sysBizTypeId,
4838
- brandName: brandName,
4839
- brandId: brandId
4862
+ brandName: brandName || void 0,
4863
+ brandId: brandId === null || brandId === void 0 ? void 0 : brandId.toString()
4840
4864
  });
4841
4865
  }, [
4842
4866
  categoryId,
4843
4867
  sysBizTypeId
4844
4868
  ]);
4845
- var _useState191 = _sliced_to_array(useState19({
4846
- /** 兼容props分类Id 异常传入 */ categoryId: getNumberValue(categoryId),
4847
- sysBizTypeId: sysBizTypeId,
4848
- brandName: "",
4849
- brandId: value === null || value === void 0 ? void 0 : value.toString()
4850
- }), 2), params = _useState191[0], setParams = _useState191[1];
4851
- var prevControlValue = usePrevious4(controlValue);
4852
- var state = useBrandOptions(params);
4853
- var _useState192 = _sliced_to_array(useState19(state.data || []), 2), options = _useState192[0], setOptions = _useState192[1];
4869
+ var handleSearch = useCallback18(debounce3(800, function(searchName) {
4870
+ return searchFetch(searchName);
4871
+ }), [
4872
+ searchFetch
4873
+ ]);
4874
+ var handleReset = useCallback18(function() {
4875
+ return searchFetch("");
4876
+ }, [
4877
+ searchFetch
4878
+ ]);
4854
4879
  useUpdateEffect9(function() {
4855
4880
  if (!state.data) return;
4856
- if (!showOtherBrand) {
4857
- setOptions(state.data);
4858
- } else {
4859
- setOptions(state.data.concat([
4860
- {
4861
- label: "\u5176\u5B83",
4862
- value: 1310
4863
- }
4864
- ]));
4865
- }
4881
+ setOptions(showOtherBrand ? _to_consumable_array(state.data).concat([
4882
+ OTHER_BRAND_OPTION
4883
+ ]) : state.data);
4866
4884
  }, [
4867
4885
  state.data,
4868
4886
  showOtherBrand
@@ -4884,7 +4902,7 @@ var EffectBrandSelect = memo25(function(props) {
4884
4902
  }, [
4885
4903
  controlValue
4886
4904
  ]);
4887
- var handleOnChange = function handleOnChange(_value, _option) {
4905
+ var handleChange = function handleChange(_value, _option) {
4888
4906
  setValue(_value);
4889
4907
  if (mode === "multiple") {
4890
4908
  var options2 = _option;
@@ -4897,19 +4915,6 @@ var EffectBrandSelect = memo25(function(props) {
4897
4915
  onChange === null || onChange === void 0 ? void 0 : onChange(_value, option === null || option === void 0 ? void 0 : option.label);
4898
4916
  }
4899
4917
  };
4900
- var handleOnDeselect = function handleOnDeselect(_value) {
4901
- searchFetch("");
4902
- };
4903
- var handleOnSearch = function handleOnSearch(searchName) {
4904
- return searchFetch(searchName);
4905
- };
4906
- var handleOnSearchDebounce = useCallback18(debounce3(800, handleOnSearch), [
4907
- categoryId,
4908
- sysBizTypeId
4909
- ]);
4910
- var handleOnClear = function handleOnClear() {
4911
- return searchFetch("");
4912
- };
4913
4918
  if (state.error) {
4914
4919
  var _state_error;
4915
4920
  return /* @__PURE__ */ jsx35(Typography3.Text, {
@@ -4917,53 +4922,34 @@ var EffectBrandSelect = memo25(function(props) {
4917
4922
  children: (_state_error = state.error) === null || _state_error === void 0 ? void 0 : _state_error.toString()
4918
4923
  });
4919
4924
  }
4920
- var notFoundContent = state.isLoading ? "\u641C\u7D22\u4E2D" : "\u672A\u67E5\u8BE2\u5230\u76F8\u5173\u54C1\u724C";
4921
- var selectBrandProps = {
4925
+ return /* @__PURE__ */ jsx35(Select4, {
4926
+ className: classnames8(index_module_default12.input, className),
4922
4927
  popupMatchSelectWidth: false,
4923
- notFoundContent: notFoundContent,
4928
+ notFoundContent: state.isLoading ? "\u641C\u7D22\u4E2D" : "\u672A\u67E5\u8BE2\u5230\u76F8\u5173\u54C1\u724C",
4924
4929
  placeholder: "\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0",
4925
4930
  optionFilterProp: "label",
4926
4931
  showSearch: true,
4927
4932
  allowClear: true,
4928
4933
  defaultActiveFirstOption: false,
4929
4934
  filterOption: false,
4930
- onChange: handleOnChange,
4931
- onSearch: handleOnSearchDebounce,
4932
- onDeselect: handleOnDeselect,
4933
- onClear: handleOnClear,
4935
+ onChange: handleChange,
4936
+ onSearch: handleSearch,
4937
+ onDeselect: handleReset,
4938
+ onClear: handleReset,
4934
4939
  loading: state.isLoading,
4935
4940
  value: value,
4936
4941
  options: options,
4937
4942
  disabled: disabled,
4938
4943
  mode: mode,
4939
4944
  style: style
4940
- };
4941
- return /* @__PURE__ */ jsx35(Select4, _object_spread({
4942
- className: classnames8(index_module_default11.input, className)
4943
- }, selectBrandProps));
4945
+ });
4944
4946
  });
4945
4947
  // src/EffectSeriesSelect/index.tsx
4946
- import { memo as memo26, useCallback as useCallback19, useState as useState20, useMemo as useMemo15, useEffect as useEffect17 } from "react";
4948
+ import { memo as memo26, useCallback as useCallback19, useEffect as useEffect17, useMemo as useMemo15, useRef as useRef11, useState as useState20 } from "react";
4949
+ import { Select as Select5 } from "antd";
4947
4950
  import { useMount as useMount2, usePrevious as usePrevious5, useUpdateEffect as useUpdateEffect10 } from "react-use";
4948
4951
  import { debounce as debounce4 } from "@xfe-repo/web-utils/tools";
4949
4952
  import classnames9 from "classnames";
4950
- // src/EffectSeriesSelect/index.module.less
4951
- var index_module_default13 = {
4952
- input: "index_module_input5",
4953
- hover: "index_module_hover",
4954
- dropdown: "index_module_dropdown",
4955
- img_opt: "index_module_img_opt",
4956
- item: "index_module_item",
4957
- icon_preview: "index_module_icon_preview",
4958
- icon_eye: "index_module_icon_eye",
4959
- item_img: "index_module_item_img",
4960
- item_mask_img: "index_module_item_mask_img",
4961
- item_label: "index_module_item_label",
4962
- txt_opt: "index_module_txt_opt",
4963
- active: "index_module_active2"
4964
- };
4965
- // src/EffectSeriesSelect/index.tsx
4966
- import { Select as Select5 } from "antd";
4967
4953
  // src/EffectSeriesSelect/useSeriesOptions.ts
4968
4954
  import useSWRImmutable4 from "swr/immutable";
4969
4955
  function useSeriesOptions(params) {
@@ -5012,6 +4998,21 @@ function useSeriesOptions(params) {
5012
4998
  mutate: mutate
5013
4999
  };
5014
5000
  }
5001
+ // src/EffectSeriesSelect/index.module.less
5002
+ var index_module_default13 = {
5003
+ input: "index_module_input5",
5004
+ hover: "index_module_hover",
5005
+ dropdown: "index_module_dropdown",
5006
+ img_opt: "index_module_img_opt",
5007
+ item: "index_module_item",
5008
+ icon_preview: "index_module_icon_preview",
5009
+ icon_eye: "index_module_icon_eye",
5010
+ item_img: "index_module_item_img",
5011
+ item_mask_img: "index_module_item_mask_img",
5012
+ item_label: "index_module_item_label",
5013
+ txt_opt: "index_module_txt_opt",
5014
+ active: "index_module_active2"
5015
+ };
5015
5016
  // src/EffectSeriesSelect/index.tsx
5016
5017
  import { jsx as jsx36 } from "react/jsx-runtime";
5017
5018
  var EffectSeriesSelect = memo26(function(props) {
@@ -5020,13 +5021,11 @@ var EffectSeriesSelect = memo26(function(props) {
5020
5021
  var _useState201 = _sliced_to_array(useState20([]), 2), options = _useState201[0], setOptions = _useState201[1];
5021
5022
  var _useState202 = _sliced_to_array(useState20(controlValue || defaultValue), 2), value = _useState202[0], setValue = _useState202[1];
5022
5023
  var _useState203 = _sliced_to_array(useState20(""), 2), searchValue = _useState203[0], setSearchValue = _useState203[1];
5023
- var pageData = useMemo15(function() {
5024
- return {
5025
- page: 1,
5026
- pageSize: 12,
5027
- hasMore: true
5028
- };
5029
- }, []);
5024
+ var pageData = useRef11({
5025
+ page: 1,
5026
+ pageSize: 12,
5027
+ hasMore: true
5028
+ });
5030
5029
  var conditions = useMemo15(function() {
5031
5030
  return {
5032
5031
  categoryId: categoryId,
@@ -5036,29 +5035,30 @@ var EffectSeriesSelect = memo26(function(props) {
5036
5035
  categoryId,
5037
5036
  brandId
5038
5037
  ]);
5039
- var searchFetch = useCallback19(function(params2) {
5040
- var page = params2.page, searchValue2 = params2.searchValue, conditions2 = params2.conditions, value2 = params2.value;
5041
- var pageSize = pageData.pageSize;
5042
- var id = getNumberValue(value2);
5043
- var serviceParams = _object_spread_props(_object_spread({}, conditions2), {
5044
- id: id,
5045
- seriesName: searchValue2,
5046
- page: page,
5047
- pageSize: pageSize
5048
- });
5049
- setParams(serviceParams);
5050
- }, []);
5051
5038
  var _useState204 = _sliced_to_array(useState20({
5052
5039
  categoryId: categoryId,
5053
5040
  brandId: brandId,
5054
- /** 兼容props分类Id 异常传入 */ id: getNumberValue(value),
5041
+ /** 兼容 props 分类 Id 异常传入 */ id: getNumberValue(value),
5055
5042
  seriesName: searchValue,
5056
- page: pageData.page,
5057
- pageSize: pageData.pageSize
5043
+ page: pageData.current.page,
5044
+ pageSize: pageData.current.pageSize
5058
5045
  }), 2), params = _useState204[0], setParams = _useState204[1];
5059
5046
  var state = useSeriesOptions(params);
5060
5047
  var prevControlValue = usePrevious5(controlValue);
5061
- var debounceSearchFetch = useCallback19(debounce4(300, searchFetch), [
5048
+ var searchFetch = useCallback19(function(fetchParams) {
5049
+ var page = fetchParams.page, searchValue2 = fetchParams.searchValue, conditions2 = fetchParams.conditions, value2 = fetchParams.value;
5050
+ var pageSize = pageData.current.pageSize;
5051
+ var id = getNumberValue(value2);
5052
+ setParams(_object_spread_props(_object_spread({}, conditions2), {
5053
+ id: id,
5054
+ seriesName: searchValue2,
5055
+ page: page,
5056
+ pageSize: pageSize
5057
+ }));
5058
+ }, []);
5059
+ var debounceSearchFetch = useMemo15(function() {
5060
+ return debounce4(300, searchFetch);
5061
+ }, [
5062
5062
  searchFetch
5063
5063
  ]);
5064
5064
  useEffect17(function() {
@@ -5074,9 +5074,12 @@ var EffectSeriesSelect = memo26(function(props) {
5074
5074
  brandId: brandId
5075
5075
  };
5076
5076
  });
5077
- pageData.page = state.data.page;
5078
- pageData.page === 1 ? setOptions(newOptions) : setOptions(_to_consumable_array(options).concat(_to_consumable_array(newOptions)));
5079
- pageData.hasMore = pageData.pageSize * pageData.page < state.data.total && newOptions.length > 0;
5077
+ var isFirstPage = state.data.page === 1;
5078
+ pageData.current.page = state.data.page;
5079
+ pageData.current.hasMore = pageData.current.pageSize * pageData.current.page < state.data.total && newOptions.length > 0;
5080
+ setOptions(function(prev) {
5081
+ return isFirstPage ? newOptions : _to_consumable_array(prev).concat(_to_consumable_array(newOptions));
5082
+ });
5080
5083
  }, [
5081
5084
  state.data
5082
5085
  ]);
@@ -5113,8 +5116,8 @@ var EffectSeriesSelect = memo26(function(props) {
5113
5116
  searchValue,
5114
5117
  conditions
5115
5118
  ]);
5116
- var handleOnSearch = useCallback19(function(value2) {
5117
- return setSearchValue(value2);
5119
+ var handleOnSearch = useCallback19(function(text) {
5120
+ return setSearchValue(text);
5118
5121
  }, []);
5119
5122
  var handleOnClear = useCallback19(function() {
5120
5123
  return setSearchValue("");
@@ -5127,7 +5130,7 @@ var EffectSeriesSelect = memo26(function(props) {
5127
5130
  return [
5128
5131
  4,
5129
5132
  searchFetch({
5130
- page: pageData.page + 1,
5133
+ page: pageData.current.page + 1,
5131
5134
  value: value,
5132
5135
  searchValue: searchValue,
5133
5136
  conditions: conditions
@@ -5146,11 +5149,11 @@ var EffectSeriesSelect = memo26(function(props) {
5146
5149
  searchValue,
5147
5150
  conditions
5148
5151
  ]);
5149
- var handleOnChange = useCallback19(function(value2, option) {
5152
+ var handleOnChange = useCallback19(function(newValue, option) {
5150
5153
  var label = (option || {}).label;
5151
- value2 = getNumberValue(value2);
5152
- setValue(value2);
5153
- onChange === null || onChange === void 0 ? void 0 : onChange(value2, label);
5154
+ var numValue = getNumberValue(newValue);
5155
+ setValue(numValue);
5156
+ onChange === null || onChange === void 0 ? void 0 : onChange(numValue, label);
5154
5157
  setOpenDropDown(false);
5155
5158
  }, [
5156
5159
  onChange
@@ -5160,27 +5163,25 @@ var EffectSeriesSelect = memo26(function(props) {
5160
5163
  if (options.length) return "\u6CA1\u6709\u66F4\u591A\u4E86~";
5161
5164
  return "\u6682\u65E0\u6570\u636E";
5162
5165
  }, [
5163
- state,
5164
- options,
5165
- brandId
5166
+ state.isLoading,
5167
+ options.length
5166
5168
  ]);
5167
- var dropdownRender = useCallback19(function(_menu) {
5169
+ var popupRender = useCallback19(function(_menu) {
5168
5170
  return /* @__PURE__ */ jsx36(SelectDropdown, {
5169
5171
  value: value,
5170
5172
  options: options,
5171
5173
  onLoadMore: handleOnLoadMore,
5172
- hasMore: pageData.hasMore,
5174
+ hasMore: pageData.current.hasMore,
5173
5175
  noMoreText: noMoreText,
5174
5176
  onChange: handleOnChange
5175
5177
  });
5176
5178
  }, [
5177
5179
  value,
5178
5180
  options,
5179
- state,
5180
5181
  noMoreText,
5181
5182
  handleOnChange
5182
5183
  ]);
5183
- var selectBrandProps = {
5184
+ var selectProps = {
5184
5185
  popupMatchSelectWidth: false,
5185
5186
  placeholder: "\u8BF7\u8F93\u5165\u7CFB\u5217\u540D\u79F0",
5186
5187
  optionFilterProp: "label",
@@ -5197,15 +5198,15 @@ var EffectSeriesSelect = memo26(function(props) {
5197
5198
  onSearch: handleOnSearch,
5198
5199
  onClear: handleOnClear,
5199
5200
  open: openDropDown,
5200
- dropdownRender: dropdownRender,
5201
- onDropdownVisibleChange: setOpenDropDown,
5201
+ popupRender: popupRender,
5202
+ onOpenChange: setOpenDropDown,
5202
5203
  getPopupContainer: function getPopupContainer() {
5203
5204
  return document.body;
5204
5205
  }
5205
5206
  };
5206
5207
  return /* @__PURE__ */ jsx36(Select5, _object_spread({
5207
5208
  className: classnames9(index_module_default13.input, className)
5208
- }, selectBrandProps));
5209
+ }, selectProps));
5209
5210
  });
5210
5211
  // src/EffectSpuSelect/index.tsx
5211
5212
  import { memo as memo27, useCallback as useCallback20, useEffect as useEffect18, useMemo as useMemo16, useState as useState21 } from "react";
@@ -5430,7 +5431,7 @@ var EffectSpuSelect = memo27(function(props) {
5430
5431
  state,
5431
5432
  options
5432
5433
  ]);
5433
- var dropdownRender = useCallback20(function(_menu) {
5434
+ var popupRender = useCallback20(function(_menu) {
5434
5435
  return /* @__PURE__ */ jsx37(SelectDropdown, {
5435
5436
  value: value,
5436
5437
  options: options,
@@ -5462,8 +5463,8 @@ var EffectSpuSelect = memo27(function(props) {
5462
5463
  onSearch: handleOnSearch,
5463
5464
  onClear: handleOnClear,
5464
5465
  open: openDropDown,
5465
- dropdownRender: dropdownRender,
5466
- onDropdownVisibleChange: setOpenDropDown,
5466
+ popupRender: popupRender,
5467
+ onOpenChange: setOpenDropDown,
5467
5468
  getPopupContainer: function getPopupContainer() {
5468
5469
  return document.body;
5469
5470
  }
@@ -5746,7 +5747,7 @@ var EffectSkuTable = memo28(function(props) {
5746
5747
  }));
5747
5748
  });
5748
5749
  // src/EffectWithFilePanel/index.tsx
5749
- import { memo as memo29, useRef as useRef11, useState as useState23 } from "react";
5750
+ import { memo as memo29, useRef as useRef12, useState as useState23 } from "react";
5750
5751
  // src/EffectWithFilePanel/index.module.less
5751
5752
  var index_module_default15 = {
5752
5753
  accept: "index_module_accept"
@@ -5759,7 +5760,7 @@ var EffectWithFilePanel = memo29(function(props) {
5759
5760
  var _useState23 = _sliced_to_array(useState23(false), 2), uploadLoading = _useState23[0], setUploadLoading = _useState23[1];
5760
5761
  var _useState231 = _sliced_to_array(useState23(disabled ? "\u786E\u5B9A" : "\u4FDD\u5B58"), 2), submitText = _useState231[0], setSubmitText = _useState231[1];
5761
5762
  var drawerTitle = title || (disabled ? "\u67E5\u770B\u9644\u4EF6" : "\u4E0A\u4F20\u9644\u4EF6");
5762
- var uploadRef = useRef11(null);
5763
+ var uploadRef = useRef12(null);
5763
5764
  var handleCLose = function handleCLose() {
5764
5765
  if (!uploadLoading) return true;
5765
5766
  return new Promise(function(resolve) {
@@ -6249,10 +6250,78 @@ var EffectMerchantSelect = memo31(function(props) {
6249
6250
  });
6250
6251
  });
6251
6252
  // src/EffectScopeSelect/index.tsx
6252
- import { memo as memo32, useCallback as useCallback23, useMemo as useMemo18, useState as useState26 } from "react";
6253
- import { Flex as Flex3, Space as Space3 } from "antd";
6253
+ import { memo as memo33, useCallback as useCallback23, useMemo as useMemo18, useState as useState26 } from "react";
6254
+ import { Flex as Flex3, Space as Space4 } from "antd";
6254
6255
  import { useUpdateEffect as useUpdateEffect14 } from "react-use";
6256
+ // src/EffectScopeSelect/ScopeViewMode.tsx
6257
+ import { memo as memo32 } from "react";
6258
+ import { Space as Space3, Typography as Typography6 } from "antd";
6255
6259
  import { jsx as jsx42, jsxs as jsxs19 } from "react/jsx-runtime";
6260
+ var ScopeViewMode = memo32(function(props) {
6261
+ var _ref = props || {}, categoryIds = _ref.categoryIds, categoryName = _ref.categoryName, brandId = _ref.brandId, brandName = _ref.brandName, seriesId = _ref.seriesId, seriesName = _ref.seriesName, spuId = _ref.spuId, spuName = _ref.spuName, skuId = _ref.skuId, skuName = _ref.skuName;
6262
+ var items = [];
6263
+ if ((categoryName === null || categoryName === void 0 ? void 0 : categoryName.length) || (categoryIds === null || categoryIds === void 0 ? void 0 : categoryIds.length)) items.push({
6264
+ label: "\u5206\u7C7B",
6265
+ value: (categoryName === null || categoryName === void 0 ? void 0 : categoryName.join("/")) || (categoryIds === null || categoryIds === void 0 ? void 0 : categoryIds.join(","))
6266
+ });
6267
+ if (brandName || brandId) items.push({
6268
+ label: "\u54C1\u724C",
6269
+ value: brandName || String(brandId)
6270
+ });
6271
+ if (seriesName || seriesId) items.push({
6272
+ label: "\u7CFB\u5217",
6273
+ value: seriesName || String(seriesId)
6274
+ });
6275
+ if (spuName || spuId) items.push({
6276
+ label: "SPU",
6277
+ value: spuName || String(spuId)
6278
+ });
6279
+ if (skuName || skuId) items.push({
6280
+ label: "SKU",
6281
+ value: skuName || String(skuId)
6282
+ });
6283
+ if (items.length === 0) return /* @__PURE__ */ jsx42(Typography6.Text, {
6284
+ style: {
6285
+ fontSize: 14
6286
+ },
6287
+ type: "danger",
6288
+ children: "\u8BF7\u5148\u9009\u62E9\u54C1\u7C7B\u4FE1\u606F"
6289
+ });
6290
+ return /* @__PURE__ */ jsx42(Space3, {
6291
+ size: 4,
6292
+ children: items.map(function(param) {
6293
+ var label = param.label, value = param.value;
6294
+ return /* @__PURE__ */ jsxs19(Space3, {
6295
+ size: 4,
6296
+ style: {
6297
+ height: 32,
6298
+ padding: "0 36px 0 14px",
6299
+ borderRadius: 6
6300
+ },
6301
+ children: [
6302
+ /* @__PURE__ */ jsxs19(Typography6.Text, {
6303
+ style: {
6304
+ fontSize: 14,
6305
+ paddingRight: 16
6306
+ },
6307
+ children: [
6308
+ label,
6309
+ ":"
6310
+ ]
6311
+ }),
6312
+ /* @__PURE__ */ jsx42(Typography6.Text, {
6313
+ style: {
6314
+ fontSize: 14
6315
+ },
6316
+ children: value
6317
+ })
6318
+ ]
6319
+ }, label);
6320
+ })
6321
+ });
6322
+ });
6323
+ // src/EffectScopeSelect/index.tsx
6324
+ import { jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
6256
6325
  var ScopeLevelEnum = /* @__PURE__ */ function(ScopeLevelEnum2) {
6257
6326
  ScopeLevelEnum2[ScopeLevelEnum2["CATEGORY"] = 1] = "CATEGORY";
6258
6327
  ScopeLevelEnum2[ScopeLevelEnum2["BRAND"] = 2] = "BRAND";
@@ -6261,8 +6330,8 @@ var ScopeLevelEnum = /* @__PURE__ */ function(ScopeLevelEnum2) {
6261
6330
  ScopeLevelEnum2[ScopeLevelEnum2["SKU"] = 5] = "SKU";
6262
6331
  return ScopeLevelEnum2;
6263
6332
  }(ScopeLevelEnum || {});
6264
- var EffectScopeSelect = memo32(function(props) {
6265
- var controlledValue = props.value, defaultValue = props.defaultValue, _props_scopeLevel = props.scopeLevel, scopeLevel = _props_scopeLevel === void 0 ? 5 /* SKU */ : _props_scopeLevel, _props_requireLevel = props.requireLevel, requireLevel = _props_requireLevel === void 0 ? 1 /* CATEGORY */ : _props_requireLevel, categoryChangeOnSelect = props.categoryChangeOnSelect, onChange = props.onChange;
6333
+ var EffectScopeSelect = memo33(function(props) {
6334
+ var controlledValue = props.value, defaultValue = props.defaultValue, _props_scopeLevel = props.scopeLevel, scopeLevel = _props_scopeLevel === void 0 ? 5 /* SKU */ : _props_scopeLevel, _props_requireLevel = props.requireLevel, requireLevel = _props_requireLevel === void 0 ? 1 /* CATEGORY */ : _props_requireLevel, categoryChangeOnSelect = props.categoryChangeOnSelect, onChange = props.onChange, _props_mode = props.mode, mode = _props_mode === void 0 ? "edit" : _props_mode;
6266
6335
  var _useState26 = _sliced_to_array(useState26(_object_spread({}, controlledValue, defaultValue)), 2), value = _useState26[0], setValue = _useState26[1];
6267
6336
  var lastLevelCategoryId = useMemo18(function() {
6268
6337
  var _value_categoryIds;
@@ -6368,17 +6437,17 @@ var EffectScopeSelect = memo32(function(props) {
6368
6437
  requireLevel
6369
6438
  ]);
6370
6439
  var renderLabel = useCallback23(function(label, required) {
6371
- return /* @__PURE__ */ jsx42(Flex3, {
6440
+ return /* @__PURE__ */ jsx43(Flex3, {
6372
6441
  flex: "0 0 auto",
6373
- children: /* @__PURE__ */ jsxs19(Space3, {
6442
+ children: /* @__PURE__ */ jsxs20(Space4, {
6374
6443
  children: [
6375
- required && /* @__PURE__ */ jsx42("span", {
6444
+ required && /* @__PURE__ */ jsx43("span", {
6376
6445
  style: {
6377
6446
  color: "var(--ant-color-error)"
6378
6447
  },
6379
6448
  children: "*"
6380
6449
  }),
6381
- /* @__PURE__ */ jsxs19("span", {
6450
+ /* @__PURE__ */ jsxs20("span", {
6382
6451
  children: [
6383
6452
  label,
6384
6453
  ":"
@@ -6388,32 +6457,35 @@ var EffectScopeSelect = memo32(function(props) {
6388
6457
  })
6389
6458
  });
6390
6459
  }, []);
6391
- return /* @__PURE__ */ jsxs19(Flex3, {
6460
+ if (mode === "view") {
6461
+ return /* @__PURE__ */ jsx43(ScopeViewMode, _object_spread({}, value));
6462
+ }
6463
+ return /* @__PURE__ */ jsxs20(Flex3, {
6392
6464
  justify: "flex-start",
6393
6465
  align: "center",
6394
6466
  wrap: "nowrap",
6395
6467
  gap: "15px",
6396
6468
  children: [
6397
- /* @__PURE__ */ jsxs19(Flex3, {
6469
+ /* @__PURE__ */ jsxs20(Flex3, {
6398
6470
  align: "center",
6399
6471
  gap: "5px",
6400
6472
  flex: "0 0 auto",
6401
6473
  children: [
6402
6474
  renderLabel("\u5206\u7C7B", requireLevel >= 1 /* CATEGORY */ ),
6403
- /* @__PURE__ */ jsx42(EffectCategoryCascade, {
6475
+ /* @__PURE__ */ jsx43(EffectCategoryCascade, {
6404
6476
  onChange: handleCategoryChange,
6405
6477
  changeOnSelect: categoryChangeOnSelect,
6406
6478
  value: value.categoryIds
6407
6479
  })
6408
6480
  ]
6409
6481
  }),
6410
- lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ jsxs19(Flex3, {
6482
+ lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ jsxs20(Flex3, {
6411
6483
  align: "center",
6412
6484
  gap: "5px",
6413
6485
  flex: "0 0 auto",
6414
6486
  children: [
6415
6487
  renderLabel("\u54C1\u724C", requireLevel >= 2 /* BRAND */ ),
6416
- /* @__PURE__ */ jsx42(EffectBrandSelect, _object_spread_props(_object_spread({
6488
+ /* @__PURE__ */ jsx43(EffectBrandSelect, _object_spread_props(_object_spread({
6417
6489
  categoryId: lastLevelCategoryId
6418
6490
  }, value), {
6419
6491
  onChange: handleBrandChange,
@@ -6421,13 +6493,13 @@ var EffectScopeSelect = memo32(function(props) {
6421
6493
  }))
6422
6494
  ]
6423
6495
  }),
6424
- !!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ jsxs19(Flex3, {
6496
+ !!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ jsxs20(Flex3, {
6425
6497
  align: "center",
6426
6498
  gap: "5px",
6427
6499
  flex: "0 0 auto",
6428
6500
  children: [
6429
6501
  renderLabel("\u7CFB\u5217", requireLevel >= 3 /* SERIES */ ),
6430
- /* @__PURE__ */ jsx42(EffectSeriesSelect, _object_spread_props(_object_spread({
6502
+ /* @__PURE__ */ jsx43(EffectSeriesSelect, _object_spread_props(_object_spread({
6431
6503
  categoryId: lastLevelCategoryId
6432
6504
  }, value), {
6433
6505
  onChange: handleSeriesChange,
@@ -6435,13 +6507,13 @@ var EffectScopeSelect = memo32(function(props) {
6435
6507
  }))
6436
6508
  ]
6437
6509
  }),
6438
- !!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ jsxs19(Flex3, {
6510
+ !!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ jsxs20(Flex3, {
6439
6511
  align: "center",
6440
6512
  gap: "5px",
6441
6513
  flex: "0 0 auto",
6442
6514
  children: [
6443
6515
  renderLabel("SPU", requireLevel >= 4 /* SPU */ ),
6444
- /* @__PURE__ */ jsx42(EffectSpuSelect, _object_spread_props(_object_spread({
6516
+ /* @__PURE__ */ jsx43(EffectSpuSelect, _object_spread_props(_object_spread({
6445
6517
  categoryId: lastLevelCategoryId
6446
6518
  }, value), {
6447
6519
  onChange: handleSpuChange,
@@ -6449,13 +6521,13 @@ var EffectScopeSelect = memo32(function(props) {
6449
6521
  }))
6450
6522
  ]
6451
6523
  }),
6452
- !!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ jsxs19(Flex3, {
6524
+ !!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ jsxs20(Flex3, {
6453
6525
  align: "center",
6454
6526
  gap: "5px",
6455
6527
  flex: "0 0 auto",
6456
6528
  children: [
6457
6529
  renderLabel("SKU", requireLevel >= 5 /* SKU */ ),
6458
- /* @__PURE__ */ jsx42(EffectSkuSelect, _object_spread_props(_object_spread({
6530
+ /* @__PURE__ */ jsx43(EffectSkuSelect, _object_spread_props(_object_spread({
6459
6531
  categoryId: lastLevelCategoryId
6460
6532
  }, value), {
6461
6533
  onChange: handleSkuChange,
@@ -6467,7 +6539,7 @@ var EffectScopeSelect = memo32(function(props) {
6467
6539
  });
6468
6540
  });
6469
6541
  // src/EffectStaffSelect/index.tsx
6470
- import { memo as memo33, useCallback as useCallback24, useEffect as useEffect22, useState as useState27 } from "react";
6542
+ import { memo as memo34, useCallback as useCallback24, useEffect as useEffect22, useState as useState27 } from "react";
6471
6543
  import { useAsyncFn as useAsyncFn4, useMount as useMount5, useUpdateEffect as useUpdateEffect15 } from "react-use";
6472
6544
  import classnames12 from "classnames";
6473
6545
  import { Select as Select8 } from "antd";
@@ -6477,8 +6549,8 @@ var index_module_default18 = {
6477
6549
  select: "index_module_select4"
6478
6550
  };
6479
6551
  // src/EffectStaffSelect/index.tsx
6480
- import { jsx as jsx43 } from "react/jsx-runtime";
6481
- var EffectStaffSelect = memo33(function(props) {
6552
+ import { jsx as jsx44 } from "react/jsx-runtime";
6553
+ var EffectStaffSelect = memo34(function(props) {
6482
6554
  var _state_value_data, _state_value;
6483
6555
  var onChange = props.onChange, deptId = props.deptId, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, placeholder = props.placeholder, style = props.style;
6484
6556
  var _useState27 = _sliced_to_array(useState27([]), 2), options = _useState27[0], setOptions = _useState27[1];
@@ -6574,7 +6646,7 @@ var EffectStaffSelect = memo33(function(props) {
6574
6646
  }
6575
6647
  };
6576
6648
  var defaultPlaceholder = deptId ? "\u8BF7\u9009\u62E9\u5458\u5DE5\u59D3\u540D" : "\u8BF7\u5148\u8F93\u5165\u5458\u5DE5\u59D3\u540D";
6577
- return /* @__PURE__ */ jsx43(Select8, {
6649
+ return /* @__PURE__ */ jsx44(Select8, {
6578
6650
  className: classnames12(index_module_default18.select, className),
6579
6651
  style: style,
6580
6652
  notFoundContent: state.loading ? "\u641C\u7D22\u4E2D" : ((_state_value = state.value) === null || _state_value === void 0 ? void 0 : (_state_value_data = _state_value.data) === null || _state_value_data === void 0 ? void 0 : _state_value_data.total) === 0 ? "\u6682\u65E0\u6570\u636E" : defaultPlaceholder,
@@ -6593,11 +6665,11 @@ var EffectStaffSelect = memo33(function(props) {
6593
6665
  });
6594
6666
  });
6595
6667
  // src/EffectReservoirSelect/EffectReservoirSelect.tsx
6596
- import { memo as memo34, useEffect as useEffect23, useState as useState28 } from "react";
6668
+ import { memo as memo35, useEffect as useEffect23, useState as useState28 } from "react";
6597
6669
  import { useAsyncFn as useAsyncFn5, useMount as useMount6, usePrevious as usePrevious7, useUpdateEffect as useUpdateEffect16 } from "react-use";
6598
6670
  import { Select as Select9 } from "antd";
6599
- import { jsx as jsx44 } from "react/jsx-runtime";
6600
- var EffectReservoirSelect = memo34(function(props) {
6671
+ import { jsx as jsx45 } from "react/jsx-runtime";
6672
+ var EffectReservoirSelect = memo35(function(props) {
6601
6673
  var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, warehouseId = props.warehouseId, _props_reservoirType = props.reservoirType, reservoirType = _props_reservoirType === void 0 ? "normal" : _props_reservoirType;
6602
6674
  var _useState28 = _sliced_to_array(useState28([]), 2), options = _useState28[0], setOptions = _useState28[1];
6603
6675
  var _useState281 = _sliced_to_array(useState28(controlValue || defaultValue), 2), value = _useState281[0], setValue = _useState281[1];
@@ -6684,16 +6756,16 @@ var EffectReservoirSelect = memo34(function(props) {
6684
6756
  onChange: handleOnChange,
6685
6757
  loading: state.loading
6686
6758
  };
6687
- return /* @__PURE__ */ jsx44(Select9, _object_spread({
6759
+ return /* @__PURE__ */ jsx45(Select9, _object_spread({
6688
6760
  className: className
6689
6761
  }, selectBrandProps));
6690
6762
  });
6691
6763
  // src/EffectReservoirSelect/EffectShelveSelect.tsx
6692
- import { memo as memo35, useEffect as useEffect24, useState as useState29 } from "react";
6764
+ import { memo as memo36, useEffect as useEffect24, useState as useState29 } from "react";
6693
6765
  import { useAsyncFn as useAsyncFn6, useMount as useMount7, usePrevious as usePrevious8, useUpdateEffect as useUpdateEffect17 } from "react-use";
6694
6766
  import { Select as Select10 } from "antd";
6695
- import { jsx as jsx45 } from "react/jsx-runtime";
6696
- var EffectShelveSelect = memo35(function(props) {
6767
+ import { jsx as jsx46 } from "react/jsx-runtime";
6768
+ var EffectShelveSelect = memo36(function(props) {
6697
6769
  var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, warehouseId = props.warehouseId, reservoirId = props.reservoirId;
6698
6770
  var _props_valueType = props.valueType, valueType = _props_valueType === void 0 ? "code" : _props_valueType;
6699
6771
  var _useState29 = _sliced_to_array(useState29([]), 2), options = _useState29[0], setOptions = _useState29[1];
@@ -6784,14 +6856,14 @@ var EffectShelveSelect = memo35(function(props) {
6784
6856
  onChange: handleOnChange,
6785
6857
  loading: state.loading
6786
6858
  };
6787
- return /* @__PURE__ */ jsx45(Select10, _object_spread({
6859
+ return /* @__PURE__ */ jsx46(Select10, _object_spread({
6788
6860
  className: className
6789
6861
  }, selectBrandProps));
6790
6862
  });
6791
6863
  // src/EffectWarehouseSelect/index.tsx
6792
6864
  import { Select as Select11 } from "antd";
6793
6865
  import classnames13 from "classnames";
6794
- import { memo as memo36 } from "react";
6866
+ import { memo as memo37 } from "react";
6795
6867
  // src/EffectWarehouseSelect/useStoreOptions.ts
6796
6868
  import useSWRImmutable7 from "swr/immutable";
6797
6869
  var transformStoreData = function transformStoreData() {
@@ -6854,8 +6926,8 @@ var index_module_default19 = {
6854
6926
  select: "index_module_select5"
6855
6927
  };
6856
6928
  // src/EffectWarehouseSelect/index.tsx
6857
- import { jsx as jsx46 } from "react/jsx-runtime";
6858
- var EffectWarehouseSelect = memo36(function(props) {
6929
+ import { jsx as jsx47 } from "react/jsx-runtime";
6930
+ var EffectWarehouseSelect = memo37(function(props) {
6859
6931
  var onChange = props.onChange, className = props.className, value = props.value, disabled = props.disabled, _props_currentMerchantOnly = props.currentMerchantOnly, currentMerchantOnly = _props_currentMerchantOnly === void 0 ? true : _props_currentMerchantOnly, warehouseType = props.warehouseType;
6860
6932
  var state = useStoreOptions(currentMerchantOnly, warehouseType);
6861
6933
  var handleChange = function handleChange(selectedValue, option) {
@@ -6865,7 +6937,7 @@ var EffectWarehouseSelect = memo36(function(props) {
6865
6937
  var handleClear = function handleClear() {
6866
6938
  onChange === null || onChange === void 0 ? void 0 : onChange(void 0, void 0);
6867
6939
  };
6868
- return /* @__PURE__ */ jsx46(Select11, {
6940
+ return /* @__PURE__ */ jsx47(Select11, {
6869
6941
  className: classnames13(index_module_default19.select, className),
6870
6942
  placeholder: "\u8BF7\u9009\u62E9\u4ED3\u5E93",
6871
6943
  notFoundContent: state.isLoading ? "\u52A0\u8F7D\u4E2D..." : "\u6682\u65E0\u4ED3\u5E93\u6570\u636E",
@@ -6878,7 +6950,7 @@ var EffectWarehouseSelect = memo36(function(props) {
6878
6950
  });
6879
6951
  });
6880
6952
  // src/EffectAddressCascade/index.tsx
6881
- import { memo as memo37, useEffect as useEffect25, useState as useState30 } from "react";
6953
+ import { memo as memo38, useEffect as useEffect25, useState as useState30 } from "react";
6882
6954
  import { useAsyncFn as useAsyncFn7, useMount as useMount8 } from "react-use";
6883
6955
  import classnames14 from "classnames";
6884
6956
  // src/EffectAddressCascade/index.module.less
@@ -6888,8 +6960,8 @@ var index_module_default20 = {
6888
6960
  };
6889
6961
  // src/EffectAddressCascade/index.tsx
6890
6962
  import { Cascader as Cascader2 } from "antd";
6891
- import { jsx as jsx47 } from "react/jsx-runtime";
6892
- var EffectAddressCascade = memo37(function(props) {
6963
+ import { jsx as jsx48 } from "react/jsx-runtime";
6964
+ var EffectAddressCascade = memo38(function(props) {
6893
6965
  var _selectedList_;
6894
6966
  var className = props.className, disabled = props.disabled, defaultValue = props.defaultValue, onChange = props.onChange;
6895
6967
  var _useState30 = _sliced_to_array(useState30(), 2), selectedList = _useState30[0], setSelectedList = _useState30[1];
@@ -6985,7 +7057,7 @@ var EffectAddressCascade = memo37(function(props) {
6985
7057
  setSelectedList(_selectedList);
6986
7058
  if (onChange) onChange(_selectedList);
6987
7059
  };
6988
- return /* @__PURE__ */ jsx47(Cascader2, {
7060
+ return /* @__PURE__ */ jsx48(Cascader2, {
6989
7061
  className: classnames14(index_module_default20.input, className),
6990
7062
  disabled: disabled,
6991
7063
  defaultValue: defaultValue,
@@ -7020,7 +7092,7 @@ var transformSelectedList = function transformSelectedList(selectedOptions) {
7020
7092
  });
7021
7093
  };
7022
7094
  // src/EffectLabelSelect/index.tsx
7023
- import { memo as memo38, useEffect as useEffect26, useState as useState31 } from "react";
7095
+ import { memo as memo39, useEffect as useEffect26, useState as useState31 } from "react";
7024
7096
  import { useUpdateEffect as useUpdateEffect18 } from "react-use";
7025
7097
  import classnames15 from "classnames";
7026
7098
  // src/EffectLabelSelect/hooks.ts
@@ -7069,9 +7141,9 @@ var index_module_default21 = {
7069
7141
  select: "index_module_select7"
7070
7142
  };
7071
7143
  // src/EffectLabelSelect/index.tsx
7072
- import { Select as Select12, Space as Space4 } from "antd";
7073
- import { jsx as jsx48, jsxs as jsxs20 } from "react/jsx-runtime";
7074
- var EffectLabelSelect = memo38(function(props) {
7144
+ import { Select as Select12, Space as Space5 } from "antd";
7145
+ import { jsx as jsx49, jsxs as jsxs21 } from "react/jsx-runtime";
7146
+ var EffectLabelSelect = memo39(function(props) {
7075
7147
  var onChange = props.onChange, className = props.className, value = props.value, disabled = props.disabled, defaultLabel = props.defaultLabel, _props_labelDic = props.labelDic, labelDic = _props_labelDic === void 0 ? defaultLabelDic : _props_labelDic, onFetchData = props.onFetchData, _props_onTransformData = props.onTransformData, onTransformData = _props_onTransformData === void 0 ? defaultTransformDataFn : _props_onTransformData, _props_fetchParams = props.fetchParams, fetchParams = _props_fetchParams === void 0 ? {} : _props_fetchParams, _props_customLabelInValue = props.customLabelInValue, customLabelInValue = _props_customLabelInValue === void 0 ? false : _props_customLabelInValue, optionsDisplayType = props.optionsDisplayType, style = props.style;
7076
7148
  var apiService = useRequestConfig().apiService;
7077
7149
  var _useState31 = _sliced_to_array(useState31(function() {
@@ -7160,12 +7232,12 @@ var EffectLabelSelect = memo38(function(props) {
7160
7232
  filterOption: false,
7161
7233
  popupMatchSelectWidth: false
7162
7234
  };
7163
- return /* @__PURE__ */ jsxs20(Space4.Compact, {
7235
+ return /* @__PURE__ */ jsxs21(Space5.Compact, {
7164
7236
  className: index_module_default21.select_wrap,
7165
7237
  style: style,
7166
7238
  children: [
7167
- /* @__PURE__ */ jsx48(Select12, _object_spread({}, selectLabelProps)),
7168
- /* @__PURE__ */ jsx48(Select12, _object_spread({}, selectValueProps))
7239
+ /* @__PURE__ */ jsx49(Select12, _object_spread({}, selectLabelProps)),
7240
+ /* @__PURE__ */ jsx49(Select12, _object_spread({}, selectValueProps))
7169
7241
  ]
7170
7242
  });
7171
7243
  });