@xfe-repo/web-components 1.7.3 → 1.7.4
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.css +9 -9
- package/dist/index.d.mts +2 -5
- package/dist/index.d.ts +2 -5
- package/dist/index.js +183 -181
- package/dist/index.mjs +132 -130
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4383,12 +4383,10 @@ var import_antd23 = require("antd");
|
|
|
4383
4383
|
var import_immutable2 = __toESM(require("swr/immutable"));
|
|
4384
4384
|
function useBrandOptions(params) {
|
|
4385
4385
|
var _useRequestConfig = useRequestConfig(), config = _useRequestConfig.config, apiService = _useRequestConfig.apiService;
|
|
4386
|
-
var _ref = (0, import_immutable2.default)(
|
|
4387
|
-
params != null ? [
|
|
4386
|
+
var _ref = (0, import_immutable2.default)([
|
|
4388
4387
|
"/product/brand/combo-box",
|
|
4389
4388
|
params
|
|
4390
|
-
]
|
|
4391
|
-
var _param = _sliced_to_array(param, 2), _params = _param[1];
|
|
4389
|
+
], function() {
|
|
4392
4390
|
return _async_to_generator(function() {
|
|
4393
4391
|
var _res_data, res, options;
|
|
4394
4392
|
return _ts_generator(this, function(_state) {
|
|
@@ -4399,7 +4397,7 @@ function useBrandOptions(params) {
|
|
|
4399
4397
|
apiService.brandComboBox(_object_spread({
|
|
4400
4398
|
page: 1,
|
|
4401
4399
|
pageSize: 500
|
|
4402
|
-
},
|
|
4400
|
+
}, params), config)
|
|
4403
4401
|
];
|
|
4404
4402
|
case 1:
|
|
4405
4403
|
res = _state.sent();
|
|
@@ -4720,21 +4718,28 @@ var index_module_default10 = {
|
|
|
4720
4718
|
input: "index_module_input2"
|
|
4721
4719
|
};
|
|
4722
4720
|
// src/EffectSkuTable/index.tsx
|
|
4723
|
-
var
|
|
4721
|
+
var import_antd30 = require("antd");
|
|
4724
4722
|
// src/EffectBrandSelect/index.tsx
|
|
4725
4723
|
var import_react39 = require("react");
|
|
4726
4724
|
var import_react_use10 = require("react-use");
|
|
4727
4725
|
var import_tools7 = require("@xfe-repo/web-utils/tools");
|
|
4728
4726
|
var import_classnames9 = __toESM(require("classnames"));
|
|
4727
|
+
// src/EffectBrandSelect/index.module.less
|
|
4728
|
+
var index_module_default11 = {
|
|
4729
|
+
input: "index_module_input3",
|
|
4730
|
+
select: "index_module_select2"
|
|
4731
|
+
};
|
|
4732
|
+
// src/EffectBrandSelect/index.tsx
|
|
4729
4733
|
var import_antd26 = require("antd");
|
|
4734
|
+
var import_antd27 = require("antd");
|
|
4730
4735
|
// src/EffectSkuSelect/index.tsx
|
|
4731
4736
|
var import_react38 = require("react");
|
|
4732
4737
|
var import_react_use9 = require("react-use");
|
|
4733
4738
|
var import_tools6 = require("@xfe-repo/web-utils/tools");
|
|
4734
4739
|
var import_classnames8 = __toESM(require("classnames"));
|
|
4735
4740
|
// src/EffectSkuSelect/index.module.less
|
|
4736
|
-
var
|
|
4737
|
-
input: "
|
|
4741
|
+
var index_module_default12 = {
|
|
4742
|
+
input: "index_module_input4",
|
|
4738
4743
|
image: "index_module_image",
|
|
4739
4744
|
preview: "index_module_preview",
|
|
4740
4745
|
icon: "index_module_icon",
|
|
@@ -5005,7 +5010,7 @@ var EffectSkuSelect = (0, import_react38.memo)(function(props) {
|
|
|
5005
5010
|
}
|
|
5006
5011
|
};
|
|
5007
5012
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_antd25.Select, _object_spread({
|
|
5008
|
-
className: (0, import_classnames8.default)(
|
|
5013
|
+
className: (0, import_classnames8.default)(index_module_default12.input, className)
|
|
5009
5014
|
}, selectBrandProps));
|
|
5010
5015
|
});
|
|
5011
5016
|
var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
@@ -5026,7 +5031,7 @@ var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
|
5026
5031
|
}, []);
|
|
5027
5032
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
5028
5033
|
id: selectDropdownId,
|
|
5029
|
-
className:
|
|
5034
|
+
className: index_module_default12.select_dropdown,
|
|
5030
5035
|
onMouseDown: handleMouseDown,
|
|
5031
5036
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_infinite_scroll_component.default, {
|
|
5032
5037
|
dataLength: options.length,
|
|
@@ -5043,22 +5048,22 @@ var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
|
5043
5048
|
scrollableTarget: selectDropdownId,
|
|
5044
5049
|
scrollThreshold: "100px",
|
|
5045
5050
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
5046
|
-
className:
|
|
5051
|
+
className: index_module_default12.options,
|
|
5047
5052
|
children: options.map(function(item) {
|
|
5048
5053
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5049
|
-
className: (0, import_classnames8.default)(
|
|
5054
|
+
className: (0, import_classnames8.default)(index_module_default12.option, item.value === value && index_module_default12.active),
|
|
5050
5055
|
onClick: function onClick() {
|
|
5051
5056
|
return handleOnSelect(item);
|
|
5052
5057
|
},
|
|
5053
5058
|
children: [
|
|
5054
5059
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ImageItem, {
|
|
5055
|
-
className:
|
|
5060
|
+
className: index_module_default12.select_image,
|
|
5056
5061
|
item: item,
|
|
5057
5062
|
previewed: item.image === previewImage2,
|
|
5058
5063
|
onPreview: handlePreview
|
|
5059
5064
|
}),
|
|
5060
5065
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", {
|
|
5061
|
-
className:
|
|
5066
|
+
className: index_module_default12.label,
|
|
5062
5067
|
children: item.label
|
|
5063
5068
|
})
|
|
5064
5069
|
]
|
|
@@ -5079,7 +5084,7 @@ var ImageItem = (0, import_react38.memo)(function(props) {
|
|
|
5079
5084
|
]);
|
|
5080
5085
|
var previewProps = (0, import_react38.useMemo)(function() {
|
|
5081
5086
|
return {
|
|
5082
|
-
maskClassName: "".concat(
|
|
5087
|
+
maskClassName: "".concat(index_module_default12.item_mask_img),
|
|
5083
5088
|
visible: previewed,
|
|
5084
5089
|
onVisibleChange: function onVisibleChange(value) {
|
|
5085
5090
|
return !value && (onPreview === null || onPreview === void 0 ? void 0 : onPreview());
|
|
@@ -5090,16 +5095,16 @@ var ImageItem = (0, import_react38.memo)(function(props) {
|
|
|
5090
5095
|
onPreview
|
|
5091
5096
|
]);
|
|
5092
5097
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5093
|
-
className: (0, import_classnames8.default)(
|
|
5098
|
+
className: (0, import_classnames8.default)(index_module_default12.image, className),
|
|
5094
5099
|
children: [
|
|
5095
5100
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5096
|
-
className:
|
|
5101
|
+
className: index_module_default12.preview,
|
|
5097
5102
|
onClick: function onClick(event) {
|
|
5098
5103
|
return handlePreview(event);
|
|
5099
5104
|
},
|
|
5100
5105
|
children: [
|
|
5101
5106
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons10.EyeOutlined, {
|
|
5102
|
-
className:
|
|
5107
|
+
className: index_module_default12.icon
|
|
5103
5108
|
}),
|
|
5104
5109
|
" \u9884\u89C8"
|
|
5105
5110
|
]
|
|
@@ -5117,64 +5122,44 @@ var getNumberValue = function getNumberValue(value) {
|
|
|
5117
5122
|
var numValue = Number(value);
|
|
5118
5123
|
return Number.isNaN(numValue) ? void 0 : numValue;
|
|
5119
5124
|
};
|
|
5120
|
-
// src/EffectBrandSelect/index.module.less
|
|
5121
|
-
var index_module_default12 = {
|
|
5122
|
-
input: "index_module_input4",
|
|
5123
|
-
select: "index_module_select2"
|
|
5124
|
-
};
|
|
5125
5125
|
// src/EffectBrandSelect/index.tsx
|
|
5126
5126
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5127
|
-
var OTHER_BRAND_OPTION = {
|
|
5128
|
-
label: "\u5176\u5B83",
|
|
5129
|
-
value: 1310
|
|
5130
|
-
};
|
|
5131
5127
|
var EffectBrandSelect = (0, import_react39.memo)(function(props) {
|
|
5132
|
-
var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value,
|
|
5133
|
-
var initialValue = controlValue !== null && controlValue !== void 0 ? controlValue : defaultValue;
|
|
5134
|
-
var hasDefaultLabel = !!defaultLabel && initialValue !== void 0;
|
|
5128
|
+
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;
|
|
5135
5129
|
var _ref = _sliced_to_array((0, import_react39.useState)(controlValue || defaultValue), 2), value = _ref[0], setValue = _ref[1];
|
|
5136
|
-
var _ref1 = _sliced_to_array((0, import_react39.useState)(function() {
|
|
5137
|
-
if (hasDefaultLabel) return null;
|
|
5138
|
-
return {
|
|
5139
|
-
/** 兼容 props 分类 Id 异常传入 */ categoryId: getNumberValue(categoryId),
|
|
5140
|
-
sysBizTypeId: sysBizTypeId,
|
|
5141
|
-
brandId: initialValue === null || initialValue === void 0 ? void 0 : initialValue.toString()
|
|
5142
|
-
};
|
|
5143
|
-
}), 2), params = _ref1[0], setParams = _ref1[1];
|
|
5144
|
-
var _ref2 = _sliced_to_array((0, import_react39.useState)(hasDefaultLabel ? [
|
|
5145
|
-
{
|
|
5146
|
-
label: defaultLabel,
|
|
5147
|
-
value: initialValue
|
|
5148
|
-
}
|
|
5149
|
-
] : []), 2), options = _ref2[0], setOptions = _ref2[1];
|
|
5150
|
-
var prevControlValue = (0, import_react_use10.usePrevious)(controlValue);
|
|
5151
|
-
var state = useBrandOptions(params);
|
|
5152
5130
|
var searchFetch = (0, import_react39.useCallback)(function(brandName, brandId) {
|
|
5131
|
+
if (brandId !== void 0) brandId = String(brandId);
|
|
5153
5132
|
setParams({
|
|
5154
|
-
|
|
5133
|
+
categoryId: getNumberValue(categoryId),
|
|
5155
5134
|
sysBizTypeId: sysBizTypeId,
|
|
5156
|
-
brandName: brandName
|
|
5157
|
-
brandId: brandId
|
|
5135
|
+
brandName: brandName,
|
|
5136
|
+
brandId: brandId
|
|
5158
5137
|
});
|
|
5159
5138
|
}, [
|
|
5160
5139
|
categoryId,
|
|
5161
5140
|
sysBizTypeId
|
|
5162
5141
|
]);
|
|
5163
|
-
var
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
]);
|
|
5142
|
+
var _ref1 = _sliced_to_array((0, import_react39.useState)({
|
|
5143
|
+
/** 兼容props分类Id 异常传入 */ categoryId: getNumberValue(categoryId),
|
|
5144
|
+
sysBizTypeId: sysBizTypeId,
|
|
5145
|
+
brandName: "",
|
|
5146
|
+
brandId: value === null || value === void 0 ? void 0 : value.toString()
|
|
5147
|
+
}), 2), params = _ref1[0], setParams = _ref1[1];
|
|
5148
|
+
var prevControlValue = (0, import_react_use10.usePrevious)(controlValue);
|
|
5149
|
+
var state = useBrandOptions(params);
|
|
5150
|
+
var _ref2 = _sliced_to_array((0, import_react39.useState)(state.data || []), 2), options = _ref2[0], setOptions = _ref2[1];
|
|
5173
5151
|
(0, import_react_use10.useUpdateEffect)(function() {
|
|
5174
5152
|
if (!state.data) return;
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5153
|
+
if (!showOtherBrand) {
|
|
5154
|
+
setOptions(state.data);
|
|
5155
|
+
} else {
|
|
5156
|
+
setOptions(state.data.concat([
|
|
5157
|
+
{
|
|
5158
|
+
label: "\u5176\u5B83",
|
|
5159
|
+
value: 1310
|
|
5160
|
+
}
|
|
5161
|
+
]));
|
|
5162
|
+
}
|
|
5178
5163
|
}, [
|
|
5179
5164
|
state.data,
|
|
5180
5165
|
showOtherBrand
|
|
@@ -5196,7 +5181,7 @@ var EffectBrandSelect = (0, import_react39.memo)(function(props) {
|
|
|
5196
5181
|
}, [
|
|
5197
5182
|
controlValue
|
|
5198
5183
|
]);
|
|
5199
|
-
var
|
|
5184
|
+
var handleOnChange = function handleOnChange(_value, _option) {
|
|
5200
5185
|
setValue(_value);
|
|
5201
5186
|
if (mode === "multiple") {
|
|
5202
5187
|
var options2 = _option;
|
|
@@ -5209,41 +5194,73 @@ var EffectBrandSelect = (0, import_react39.memo)(function(props) {
|
|
|
5209
5194
|
onChange === null || onChange === void 0 ? void 0 : onChange(_value, option === null || option === void 0 ? void 0 : option.label);
|
|
5210
5195
|
}
|
|
5211
5196
|
};
|
|
5197
|
+
var handleOnDeselect = function handleOnDeselect(_value) {
|
|
5198
|
+
searchFetch("");
|
|
5199
|
+
};
|
|
5200
|
+
var handleOnSearch = function handleOnSearch(searchName) {
|
|
5201
|
+
return searchFetch(searchName);
|
|
5202
|
+
};
|
|
5203
|
+
var handleOnSearchDebounce = (0, import_react39.useCallback)((0, import_tools7.debounce)(800, handleOnSearch), [
|
|
5204
|
+
categoryId,
|
|
5205
|
+
sysBizTypeId
|
|
5206
|
+
]);
|
|
5207
|
+
var handleOnClear = function handleOnClear() {
|
|
5208
|
+
return searchFetch("");
|
|
5209
|
+
};
|
|
5212
5210
|
if (state.error) {
|
|
5213
5211
|
var _state_error;
|
|
5214
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_antd27.Typography.Text, {
|
|
5215
5213
|
type: "danger",
|
|
5216
5214
|
children: (_state_error = state.error) === null || _state_error === void 0 ? void 0 : _state_error.toString()
|
|
5217
5215
|
});
|
|
5218
5216
|
}
|
|
5219
|
-
|
|
5220
|
-
|
|
5217
|
+
var notFoundContent = state.isLoading ? "\u641C\u7D22\u4E2D" : "\u672A\u67E5\u8BE2\u5230\u76F8\u5173\u54C1\u724C";
|
|
5218
|
+
var selectBrandProps = {
|
|
5221
5219
|
popupMatchSelectWidth: false,
|
|
5222
|
-
notFoundContent:
|
|
5220
|
+
notFoundContent: notFoundContent,
|
|
5223
5221
|
placeholder: "\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0",
|
|
5224
5222
|
optionFilterProp: "label",
|
|
5225
5223
|
showSearch: true,
|
|
5226
5224
|
allowClear: true,
|
|
5227
5225
|
defaultActiveFirstOption: false,
|
|
5228
5226
|
filterOption: false,
|
|
5229
|
-
onChange:
|
|
5230
|
-
onSearch:
|
|
5231
|
-
onDeselect:
|
|
5232
|
-
onClear:
|
|
5227
|
+
onChange: handleOnChange,
|
|
5228
|
+
onSearch: handleOnSearchDebounce,
|
|
5229
|
+
onDeselect: handleOnDeselect,
|
|
5230
|
+
onClear: handleOnClear,
|
|
5233
5231
|
loading: state.isLoading,
|
|
5234
5232
|
value: value,
|
|
5235
5233
|
options: options,
|
|
5236
5234
|
disabled: disabled,
|
|
5237
5235
|
mode: mode,
|
|
5238
5236
|
style: style
|
|
5239
|
-
}
|
|
5237
|
+
};
|
|
5238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_antd26.Select, _object_spread({
|
|
5239
|
+
className: (0, import_classnames9.default)(index_module_default11.input, className)
|
|
5240
|
+
}, selectBrandProps));
|
|
5240
5241
|
});
|
|
5241
5242
|
// src/EffectSeriesSelect/index.tsx
|
|
5242
5243
|
var import_react40 = require("react");
|
|
5243
|
-
var import_antd27 = require("antd");
|
|
5244
5244
|
var import_react_use11 = require("react-use");
|
|
5245
5245
|
var import_tools8 = require("@xfe-repo/web-utils/tools");
|
|
5246
5246
|
var import_classnames10 = __toESM(require("classnames"));
|
|
5247
|
+
// src/EffectSeriesSelect/index.module.less
|
|
5248
|
+
var index_module_default13 = {
|
|
5249
|
+
input: "index_module_input5",
|
|
5250
|
+
hover: "index_module_hover",
|
|
5251
|
+
dropdown: "index_module_dropdown",
|
|
5252
|
+
img_opt: "index_module_img_opt",
|
|
5253
|
+
item: "index_module_item",
|
|
5254
|
+
icon_preview: "index_module_icon_preview",
|
|
5255
|
+
icon_eye: "index_module_icon_eye",
|
|
5256
|
+
item_img: "index_module_item_img",
|
|
5257
|
+
item_mask_img: "index_module_item_mask_img",
|
|
5258
|
+
item_label: "index_module_item_label",
|
|
5259
|
+
txt_opt: "index_module_txt_opt",
|
|
5260
|
+
active: "index_module_active2"
|
|
5261
|
+
};
|
|
5262
|
+
// src/EffectSeriesSelect/index.tsx
|
|
5263
|
+
var import_antd28 = require("antd");
|
|
5247
5264
|
// src/EffectSeriesSelect/useSeriesOptions.ts
|
|
5248
5265
|
var import_immutable4 = __toESM(require("swr/immutable"));
|
|
5249
5266
|
function useSeriesOptions(params) {
|
|
@@ -5292,21 +5309,6 @@ function useSeriesOptions(params) {
|
|
|
5292
5309
|
mutate: mutate
|
|
5293
5310
|
};
|
|
5294
5311
|
}
|
|
5295
|
-
// src/EffectSeriesSelect/index.module.less
|
|
5296
|
-
var index_module_default13 = {
|
|
5297
|
-
input: "index_module_input5",
|
|
5298
|
-
hover: "index_module_hover",
|
|
5299
|
-
dropdown: "index_module_dropdown",
|
|
5300
|
-
img_opt: "index_module_img_opt",
|
|
5301
|
-
item: "index_module_item",
|
|
5302
|
-
icon_preview: "index_module_icon_preview",
|
|
5303
|
-
icon_eye: "index_module_icon_eye",
|
|
5304
|
-
item_img: "index_module_item_img",
|
|
5305
|
-
item_mask_img: "index_module_item_mask_img",
|
|
5306
|
-
item_label: "index_module_item_label",
|
|
5307
|
-
txt_opt: "index_module_txt_opt",
|
|
5308
|
-
active: "index_module_active2"
|
|
5309
|
-
};
|
|
5310
5312
|
// src/EffectSeriesSelect/index.tsx
|
|
5311
5313
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5312
5314
|
var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
@@ -5315,11 +5317,13 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5315
5317
|
var _ref1 = _sliced_to_array((0, import_react40.useState)([]), 2), options = _ref1[0], setOptions = _ref1[1];
|
|
5316
5318
|
var _ref2 = _sliced_to_array((0, import_react40.useState)(controlValue || defaultValue), 2), value = _ref2[0], setValue = _ref2[1];
|
|
5317
5319
|
var _ref3 = _sliced_to_array((0, import_react40.useState)(""), 2), searchValue = _ref3[0], setSearchValue = _ref3[1];
|
|
5318
|
-
var pageData = (0, import_react40.
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5320
|
+
var pageData = (0, import_react40.useMemo)(function() {
|
|
5321
|
+
return {
|
|
5322
|
+
page: 1,
|
|
5323
|
+
pageSize: 12,
|
|
5324
|
+
hasMore: true
|
|
5325
|
+
};
|
|
5326
|
+
}, []);
|
|
5323
5327
|
var conditions = (0, import_react40.useMemo)(function() {
|
|
5324
5328
|
return {
|
|
5325
5329
|
categoryId: categoryId,
|
|
@@ -5329,30 +5333,29 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5329
5333
|
categoryId,
|
|
5330
5334
|
brandId
|
|
5331
5335
|
]);
|
|
5336
|
+
var searchFetch = (0, import_react40.useCallback)(function(params2) {
|
|
5337
|
+
var page = params2.page, searchValue2 = params2.searchValue, conditions2 = params2.conditions, value2 = params2.value;
|
|
5338
|
+
var pageSize = pageData.pageSize;
|
|
5339
|
+
var id = getNumberValue(value2);
|
|
5340
|
+
var serviceParams = _object_spread_props(_object_spread({}, conditions2), {
|
|
5341
|
+
id: id,
|
|
5342
|
+
seriesName: searchValue2,
|
|
5343
|
+
page: page,
|
|
5344
|
+
pageSize: pageSize
|
|
5345
|
+
});
|
|
5346
|
+
setParams(serviceParams);
|
|
5347
|
+
}, []);
|
|
5332
5348
|
var _ref4 = _sliced_to_array((0, import_react40.useState)({
|
|
5333
5349
|
categoryId: categoryId,
|
|
5334
5350
|
brandId: brandId,
|
|
5335
|
-
/** 兼容
|
|
5351
|
+
/** 兼容props分类Id 异常传入 */ id: getNumberValue(value),
|
|
5336
5352
|
seriesName: searchValue,
|
|
5337
|
-
page: pageData.
|
|
5338
|
-
pageSize: pageData.
|
|
5353
|
+
page: pageData.page,
|
|
5354
|
+
pageSize: pageData.pageSize
|
|
5339
5355
|
}), 2), params = _ref4[0], setParams = _ref4[1];
|
|
5340
5356
|
var state = useSeriesOptions(params);
|
|
5341
5357
|
var prevControlValue = (0, import_react_use11.usePrevious)(controlValue);
|
|
5342
|
-
var
|
|
5343
|
-
var page = fetchParams.page, searchValue2 = fetchParams.searchValue, conditions2 = fetchParams.conditions, value2 = fetchParams.value;
|
|
5344
|
-
var pageSize = pageData.current.pageSize;
|
|
5345
|
-
var id = getNumberValue(value2);
|
|
5346
|
-
setParams(_object_spread_props(_object_spread({}, conditions2), {
|
|
5347
|
-
id: id,
|
|
5348
|
-
seriesName: searchValue2,
|
|
5349
|
-
page: page,
|
|
5350
|
-
pageSize: pageSize
|
|
5351
|
-
}));
|
|
5352
|
-
}, []);
|
|
5353
|
-
var debounceSearchFetch = (0, import_react40.useMemo)(function() {
|
|
5354
|
-
return (0, import_tools8.debounce)(300, searchFetch);
|
|
5355
|
-
}, [
|
|
5358
|
+
var debounceSearchFetch = (0, import_react40.useCallback)((0, import_tools8.debounce)(300, searchFetch), [
|
|
5356
5359
|
searchFetch
|
|
5357
5360
|
]);
|
|
5358
5361
|
(0, import_react40.useEffect)(function() {
|
|
@@ -5368,12 +5371,9 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5368
5371
|
brandId: brandId
|
|
5369
5372
|
};
|
|
5370
5373
|
});
|
|
5371
|
-
|
|
5372
|
-
pageData.
|
|
5373
|
-
pageData.
|
|
5374
|
-
setOptions(function(prev) {
|
|
5375
|
-
return isFirstPage ? newOptions : _to_consumable_array(prev).concat(_to_consumable_array(newOptions));
|
|
5376
|
-
});
|
|
5374
|
+
pageData.page = state.data.page;
|
|
5375
|
+
pageData.page === 1 ? setOptions(newOptions) : setOptions(_to_consumable_array(options).concat(_to_consumable_array(newOptions)));
|
|
5376
|
+
pageData.hasMore = pageData.pageSize * pageData.page < state.data.total && newOptions.length > 0;
|
|
5377
5377
|
}, [
|
|
5378
5378
|
state.data
|
|
5379
5379
|
]);
|
|
@@ -5410,8 +5410,8 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5410
5410
|
searchValue,
|
|
5411
5411
|
conditions
|
|
5412
5412
|
]);
|
|
5413
|
-
var handleOnSearch = (0, import_react40.useCallback)(function(
|
|
5414
|
-
return setSearchValue(
|
|
5413
|
+
var handleOnSearch = (0, import_react40.useCallback)(function(value2) {
|
|
5414
|
+
return setSearchValue(value2);
|
|
5415
5415
|
}, []);
|
|
5416
5416
|
var handleOnClear = (0, import_react40.useCallback)(function() {
|
|
5417
5417
|
return setSearchValue("");
|
|
@@ -5424,7 +5424,7 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5424
5424
|
return [
|
|
5425
5425
|
4,
|
|
5426
5426
|
searchFetch({
|
|
5427
|
-
page: pageData.
|
|
5427
|
+
page: pageData.page + 1,
|
|
5428
5428
|
value: value,
|
|
5429
5429
|
searchValue: searchValue,
|
|
5430
5430
|
conditions: conditions
|
|
@@ -5443,11 +5443,11 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5443
5443
|
searchValue,
|
|
5444
5444
|
conditions
|
|
5445
5445
|
]);
|
|
5446
|
-
var handleOnChange = (0, import_react40.useCallback)(function(
|
|
5446
|
+
var handleOnChange = (0, import_react40.useCallback)(function(value2, option) {
|
|
5447
5447
|
var label = (option || {}).label;
|
|
5448
|
-
|
|
5449
|
-
setValue(
|
|
5450
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
5448
|
+
value2 = getNumberValue(value2);
|
|
5449
|
+
setValue(value2);
|
|
5450
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(value2, label);
|
|
5451
5451
|
setOpenDropDown(false);
|
|
5452
5452
|
}, [
|
|
5453
5453
|
onChange
|
|
@@ -5457,25 +5457,27 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5457
5457
|
if (options.length) return "\u6CA1\u6709\u66F4\u591A\u4E86~";
|
|
5458
5458
|
return "\u6682\u65E0\u6570\u636E";
|
|
5459
5459
|
}, [
|
|
5460
|
-
state
|
|
5461
|
-
options
|
|
5460
|
+
state,
|
|
5461
|
+
options,
|
|
5462
|
+
brandId
|
|
5462
5463
|
]);
|
|
5463
5464
|
var popupRender = (0, import_react40.useCallback)(function(_menu) {
|
|
5464
5465
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectDropdown, {
|
|
5465
5466
|
value: value,
|
|
5466
5467
|
options: options,
|
|
5467
5468
|
onLoadMore: handleOnLoadMore,
|
|
5468
|
-
hasMore: pageData.
|
|
5469
|
+
hasMore: pageData.hasMore,
|
|
5469
5470
|
noMoreText: noMoreText,
|
|
5470
5471
|
onChange: handleOnChange
|
|
5471
5472
|
});
|
|
5472
5473
|
}, [
|
|
5473
5474
|
value,
|
|
5474
5475
|
options,
|
|
5476
|
+
state,
|
|
5475
5477
|
noMoreText,
|
|
5476
5478
|
handleOnChange
|
|
5477
5479
|
]);
|
|
5478
|
-
var
|
|
5480
|
+
var selectBrandProps = {
|
|
5479
5481
|
popupMatchSelectWidth: false,
|
|
5480
5482
|
placeholder: "\u8BF7\u8F93\u5165\u7CFB\u5217\u540D\u79F0",
|
|
5481
5483
|
optionFilterProp: "label",
|
|
@@ -5498,9 +5500,9 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5498
5500
|
return document.body;
|
|
5499
5501
|
}
|
|
5500
5502
|
};
|
|
5501
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_antd28.Select, _object_spread({
|
|
5502
5504
|
className: (0, import_classnames10.default)(index_module_default13.input, className)
|
|
5503
|
-
},
|
|
5505
|
+
}, selectBrandProps));
|
|
5504
5506
|
});
|
|
5505
5507
|
// src/EffectSpuSelect/index.tsx
|
|
5506
5508
|
var import_react41 = require("react");
|
|
@@ -5513,7 +5515,7 @@ var index_module_default14 = {
|
|
|
5513
5515
|
select: "index_module_select3"
|
|
5514
5516
|
};
|
|
5515
5517
|
// src/EffectSpuSelect/index.tsx
|
|
5516
|
-
var
|
|
5518
|
+
var import_antd29 = require("antd");
|
|
5517
5519
|
// src/EffectSpuSelect/useSpuOptions.ts
|
|
5518
5520
|
var import_immutable5 = __toESM(require("swr/immutable"));
|
|
5519
5521
|
function useSpuOptions(params) {
|
|
@@ -5763,13 +5765,13 @@ var EffectSpuSelect = (0, import_react41.memo)(function(props) {
|
|
|
5763
5765
|
return document.body;
|
|
5764
5766
|
}
|
|
5765
5767
|
};
|
|
5766
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_antd29.Select, _object_spread({
|
|
5767
5769
|
className: (0, import_classnames11.default)(index_module_default14.input, className)
|
|
5768
5770
|
}, selectBrandProps));
|
|
5769
5771
|
});
|
|
5770
5772
|
// src/EffectSkuTable/index.tsx
|
|
5771
5773
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5772
|
-
var
|
|
5774
|
+
var _import_antd30_Table = import_antd30.Table, Column2 = _import_antd30_Table.Column;
|
|
5773
5775
|
var EffectSkuTable = (0, import_react42.memo)(function(props) {
|
|
5774
5776
|
var _curCategoryIds_slice;
|
|
5775
5777
|
var categoryIds = props.categoryIds, brandId = props.brandId, brandName = props.brandName, _props_seriesId = props.seriesId, seriesId = _props_seriesId === void 0 ? 0 : _props_seriesId, seriesName = props.seriesName, spuId = props.spuId, spuName = props.spuName, disabled = props.disabled, value = props.value, _props_showSkuId = props.showSkuId, showSkuId = _props_showSkuId === void 0 ? false : _props_showSkuId, _props_skuType = props.skuType, skuType = _props_skuType === void 0 ? "std" : _props_skuType, onChange = props.onChange;
|
|
@@ -5999,7 +6001,7 @@ var EffectSkuTable = (0, import_react42.memo)(function(props) {
|
|
|
5999
6001
|
skuImage: curSkuImage
|
|
6000
6002
|
}
|
|
6001
6003
|
];
|
|
6002
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_antd30.Table, _object_spread_props(_object_spread({}, commonTableProps), {
|
|
6003
6005
|
dataSource: skuDataSource,
|
|
6004
6006
|
rowKey: function rowKey(record) {
|
|
6005
6007
|
return record.categoryIds.join("_") || "empty";
|
|
@@ -6047,7 +6049,7 @@ var index_module_default15 = {
|
|
|
6047
6049
|
accept: "index_module_accept"
|
|
6048
6050
|
};
|
|
6049
6051
|
// src/EffectWithFilePanel/index.tsx
|
|
6050
|
-
var
|
|
6052
|
+
var import_antd31 = require("antd");
|
|
6051
6053
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6052
6054
|
var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
6053
6055
|
var disabled = props.disabled, children = props.children, header = props.header, defaultValue = props.defaultValue, onChange = props.onChange, onSave = props.onSave, max = props.max, accept = props.accept, remote = props.remote, title = props.title;
|
|
@@ -6058,7 +6060,7 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6058
6060
|
var handleCLose = function handleCLose() {
|
|
6059
6061
|
if (!uploadLoading) return true;
|
|
6060
6062
|
return new Promise(function(resolve) {
|
|
6061
|
-
|
|
6063
|
+
import_antd31.Modal.confirm({
|
|
6062
6064
|
title: "\u6587\u4EF6\u4E0A\u4F20\u4E2D, \u786E\u5B9A\u5173\u95ED\u4E48\uFF1F",
|
|
6063
6065
|
content: "\u5982\u679C\u5173\u95ED\uFF0C\u6B64\u6B21\u4E0A\u4F20\u4FDD\u5B58\u5C06\u4F1A\u5931\u8D25",
|
|
6064
6066
|
okType: "danger",
|
|
@@ -6076,9 +6078,9 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6076
6078
|
setUploadLoading(false);
|
|
6077
6079
|
setSubmitText(disabled ? "\u786E\u5B9A" : "\u4FDD\u5B58");
|
|
6078
6080
|
if (result) {
|
|
6079
|
-
void
|
|
6081
|
+
void import_antd31.message.success(msg || "\u4E0A\u4F20\u6210\u529F");
|
|
6080
6082
|
} else {
|
|
6081
|
-
void
|
|
6083
|
+
void import_antd31.message.error(msg);
|
|
6082
6084
|
}
|
|
6083
6085
|
};
|
|
6084
6086
|
var handleOnUpload = function handleOnUpload() {
|
|
@@ -6146,7 +6148,7 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6146
6148
|
});
|
|
6147
6149
|
// src/EffectSkuRecognize/index.tsx
|
|
6148
6150
|
var import_react44 = require("react");
|
|
6149
|
-
var
|
|
6151
|
+
var import_antd32 = require("antd");
|
|
6150
6152
|
var import_react_use14 = require("react-use");
|
|
6151
6153
|
// src/EffectSkuRecognize/index.module.less
|
|
6152
6154
|
var index_module_default16 = {
|
|
@@ -6154,7 +6156,7 @@ var index_module_default16 = {
|
|
|
6154
6156
|
};
|
|
6155
6157
|
// src/EffectSkuRecognize/index.tsx
|
|
6156
6158
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6157
|
-
var
|
|
6159
|
+
var _import_antd32_Typography = import_antd32.Typography, Title = _import_antd32_Typography.Title, Text = _import_antd32_Typography.Text, Link = _import_antd32_Typography.Link;
|
|
6158
6160
|
var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
6159
6161
|
var categoryId = props.categoryId, brandId = props.brandId, controlledValue = props.value, defaultValue = props.defaultValue, image = props.image, limitSize = props.limitSize, disabled = props.disabled, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, _props_skuType = props.skuType, skuType = _props_skuType === void 0 ? "std" : _props_skuType, onChange = props.onChange;
|
|
6160
6162
|
var _ref = _sliced_to_array((0, import_react44.useState)(controlledValue || defaultValue), 2), value = _ref[0], setValue = _ref[1];
|
|
@@ -6269,19 +6271,19 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6269
6271
|
countRender: function countRender(current, total) {
|
|
6270
6272
|
var currentItem = skuList[current - 1] || {};
|
|
6271
6273
|
var currentImage = currentItem.image || currentItem.skuImage || "";
|
|
6272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd32.Space, {
|
|
6273
6275
|
children: [
|
|
6274
6276
|
current,
|
|
6275
6277
|
" / ",
|
|
6276
6278
|
total,
|
|
6277
|
-
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6279
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.Button, {
|
|
6278
6280
|
type: "primary",
|
|
6279
6281
|
onClick: function onClick() {
|
|
6280
6282
|
return handleSelected(currentItem);
|
|
6281
6283
|
},
|
|
6282
6284
|
children: "\u5C31\u662F\u5B83"
|
|
6283
6285
|
}),
|
|
6284
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6286
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.Button, {
|
|
6285
6287
|
onClick: function onClick() {
|
|
6286
6288
|
return window.open(currentImage);
|
|
6287
6289
|
},
|
|
@@ -6309,23 +6311,23 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6309
6311
|
})
|
|
6310
6312
|
]
|
|
6311
6313
|
});
|
|
6312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.Spin, {
|
|
6313
6315
|
tip: "\u8BC6\u522B\u4E2D...",
|
|
6314
6316
|
spinning: state.loading,
|
|
6315
6317
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OSSImage.PreviewGroup, {
|
|
6316
6318
|
preview: previewProps,
|
|
6317
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6319
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.List, {
|
|
6318
6320
|
grid: gridProps[size],
|
|
6319
6321
|
header: listHeader,
|
|
6320
6322
|
dataSource: skuList,
|
|
6321
6323
|
className: index_module_default16.desc,
|
|
6322
6324
|
renderItem: function renderItem(item) {
|
|
6323
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.List.Item, {
|
|
6324
6326
|
className: index_module_default16.maring_top,
|
|
6325
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd32.Card, {
|
|
6326
6328
|
hoverable: true,
|
|
6327
6329
|
children: [
|
|
6328
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6330
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.Badge, {
|
|
6329
6331
|
count: item.score,
|
|
6330
6332
|
overflowCount: 10,
|
|
6331
6333
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OSSImage, {
|
|
@@ -6343,7 +6345,7 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6343
6345
|
item.name || item.skuName
|
|
6344
6346
|
]
|
|
6345
6347
|
}),
|
|
6346
|
-
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6348
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd32.Button, {
|
|
6347
6349
|
type: item.skuId === value ? "primary" : "default",
|
|
6348
6350
|
block: true,
|
|
6349
6351
|
onClick: function onClick() {
|
|
@@ -6431,7 +6433,7 @@ var index_module_default17 = {
|
|
|
6431
6433
|
selector: "index_module_selector"
|
|
6432
6434
|
};
|
|
6433
6435
|
// src/EffectMerchantSelect/index.tsx
|
|
6434
|
-
var
|
|
6436
|
+
var import_antd33 = require("antd");
|
|
6435
6437
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6436
6438
|
var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
6437
6439
|
var onChange = props.onChange, className = props.className, controlValue = props.value, disabled = props.disabled, _props_source = props.source, source = _props_source === void 0 ? "businessNo" : _props_source, _props_labelDisplayMode = props.labelDisplayMode, labelDisplayMode = _props_labelDisplayMode === void 0 ? "platformName" : _props_labelDisplayMode;
|
|
@@ -6495,7 +6497,7 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6495
6497
|
};
|
|
6496
6498
|
if (state.error) {
|
|
6497
6499
|
var _state_error;
|
|
6498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd33.Typography.Text, {
|
|
6499
6501
|
type: "danger",
|
|
6500
6502
|
children: (_state_error = state.error) === null || _state_error === void 0 ? void 0 : _state_error.toString()
|
|
6501
6503
|
});
|
|
@@ -6536,8 +6538,8 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6536
6538
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", {
|
|
6537
6539
|
className: index_module_default17.merchant_select_wrap,
|
|
6538
6540
|
children: [
|
|
6539
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6540
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd33.Select, _object_spread({}, addonBeforeProps)),
|
|
6542
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd33.Select, _object_spread({
|
|
6541
6543
|
className: (0, import_classnames12.default)(index_module_default17.selector, className)
|
|
6542
6544
|
}, selectBrandProps))
|
|
6543
6545
|
]
|
|
@@ -6545,11 +6547,11 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6545
6547
|
});
|
|
6546
6548
|
// src/EffectScopeSelect/index.tsx
|
|
6547
6549
|
var import_react47 = require("react");
|
|
6548
|
-
var
|
|
6550
|
+
var import_antd35 = require("antd");
|
|
6549
6551
|
var import_react_use16 = require("react-use");
|
|
6550
6552
|
// src/EffectScopeSelect/ScopeViewMode.tsx
|
|
6551
6553
|
var import_react46 = require("react");
|
|
6552
|
-
var
|
|
6554
|
+
var import_antd34 = require("antd");
|
|
6553
6555
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6554
6556
|
var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
6555
6557
|
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;
|
|
@@ -6574,18 +6576,18 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6574
6576
|
label: "SKU",
|
|
6575
6577
|
value: skuName || String(skuId)
|
|
6576
6578
|
});
|
|
6577
|
-
if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6579
|
+
if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd34.Typography.Text, {
|
|
6578
6580
|
style: {
|
|
6579
6581
|
fontSize: 14
|
|
6580
6582
|
},
|
|
6581
6583
|
type: "danger",
|
|
6582
6584
|
children: "\u8BF7\u5148\u9009\u62E9\u54C1\u7C7B\u4FE1\u606F"
|
|
6583
6585
|
});
|
|
6584
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd34.Space, {
|
|
6585
6587
|
size: 4,
|
|
6586
6588
|
children: items.map(function(param) {
|
|
6587
6589
|
var label = param.label, value = param.value;
|
|
6588
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_antd34.Space, {
|
|
6589
6591
|
size: 4,
|
|
6590
6592
|
style: {
|
|
6591
6593
|
height: 32,
|
|
@@ -6593,7 +6595,7 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6593
6595
|
borderRadius: 6
|
|
6594
6596
|
},
|
|
6595
6597
|
children: [
|
|
6596
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_antd34.Typography.Text, {
|
|
6597
6599
|
style: {
|
|
6598
6600
|
fontSize: 14,
|
|
6599
6601
|
paddingRight: 16
|
|
@@ -6603,7 +6605,7 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6603
6605
|
":"
|
|
6604
6606
|
]
|
|
6605
6607
|
}),
|
|
6606
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd34.Typography.Text, {
|
|
6607
6609
|
style: {
|
|
6608
6610
|
fontSize: 14
|
|
6609
6611
|
},
|
|
@@ -6731,9 +6733,9 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6731
6733
|
requireLevel
|
|
6732
6734
|
]);
|
|
6733
6735
|
var renderLabel = (0, import_react47.useCallback)(function(label, required) {
|
|
6734
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_antd35.Flex, {
|
|
6735
6737
|
flex: "0 0 auto",
|
|
6736
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Space, {
|
|
6737
6739
|
children: [
|
|
6738
6740
|
required && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", {
|
|
6739
6741
|
style: {
|
|
@@ -6754,13 +6756,13 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6754
6756
|
if (mode === "view") {
|
|
6755
6757
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScopeViewMode, _object_spread({}, value));
|
|
6756
6758
|
}
|
|
6757
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6758
6760
|
justify: "flex-start",
|
|
6759
6761
|
align: "center",
|
|
6760
6762
|
wrap: "nowrap",
|
|
6761
6763
|
gap: "15px",
|
|
6762
6764
|
children: [
|
|
6763
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6765
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6764
6766
|
align: "center",
|
|
6765
6767
|
gap: "5px",
|
|
6766
6768
|
flex: "0 0 auto",
|
|
@@ -6773,7 +6775,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6773
6775
|
})
|
|
6774
6776
|
]
|
|
6775
6777
|
}),
|
|
6776
|
-
lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6778
|
+
lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6777
6779
|
align: "center",
|
|
6778
6780
|
gap: "5px",
|
|
6779
6781
|
flex: "0 0 auto",
|
|
@@ -6787,7 +6789,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6787
6789
|
}))
|
|
6788
6790
|
]
|
|
6789
6791
|
}),
|
|
6790
|
-
!!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6792
|
+
!!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6791
6793
|
align: "center",
|
|
6792
6794
|
gap: "5px",
|
|
6793
6795
|
flex: "0 0 auto",
|
|
@@ -6801,7 +6803,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6801
6803
|
}))
|
|
6802
6804
|
]
|
|
6803
6805
|
}),
|
|
6804
|
-
!!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6806
|
+
!!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6805
6807
|
align: "center",
|
|
6806
6808
|
gap: "5px",
|
|
6807
6809
|
flex: "0 0 auto",
|
|
@@ -6815,7 +6817,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6815
6817
|
}))
|
|
6816
6818
|
]
|
|
6817
6819
|
}),
|
|
6818
|
-
!!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6820
|
+
!!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd35.Flex, {
|
|
6819
6821
|
align: "center",
|
|
6820
6822
|
gap: "5px",
|
|
6821
6823
|
flex: "0 0 auto",
|
|
@@ -6836,7 +6838,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6836
6838
|
var import_react48 = require("react");
|
|
6837
6839
|
var import_react_use17 = require("react-use");
|
|
6838
6840
|
var import_classnames13 = __toESM(require("classnames"));
|
|
6839
|
-
var
|
|
6841
|
+
var import_antd36 = require("antd");
|
|
6840
6842
|
var import_tools11 = require("@xfe-repo/web-utils/tools");
|
|
6841
6843
|
// src/EffectStaffSelect/index.module.less
|
|
6842
6844
|
var index_module_default18 = {
|
|
@@ -6940,7 +6942,7 @@ var EffectStaffSelect = (0, import_react48.memo)(function(props) {
|
|
|
6940
6942
|
}
|
|
6941
6943
|
};
|
|
6942
6944
|
var defaultPlaceholder = deptId ? "\u8BF7\u9009\u62E9\u5458\u5DE5\u59D3\u540D" : "\u8BF7\u5148\u8F93\u5165\u5458\u5DE5\u59D3\u540D";
|
|
6943
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_antd36.Select, {
|
|
6944
6946
|
className: (0, import_classnames13.default)(index_module_default18.select, className),
|
|
6945
6947
|
style: style,
|
|
6946
6948
|
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,
|
|
@@ -6961,7 +6963,7 @@ var EffectStaffSelect = (0, import_react48.memo)(function(props) {
|
|
|
6961
6963
|
// src/EffectReservoirSelect/EffectReservoirSelect.tsx
|
|
6962
6964
|
var import_react49 = require("react");
|
|
6963
6965
|
var import_react_use18 = require("react-use");
|
|
6964
|
-
var
|
|
6966
|
+
var import_antd37 = require("antd");
|
|
6965
6967
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6966
6968
|
var EffectReservoirSelect = (0, import_react49.memo)(function(props) {
|
|
6967
6969
|
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;
|
|
@@ -7050,14 +7052,14 @@ var EffectReservoirSelect = (0, import_react49.memo)(function(props) {
|
|
|
7050
7052
|
onChange: handleOnChange,
|
|
7051
7053
|
loading: state.loading
|
|
7052
7054
|
};
|
|
7053
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_antd37.Select, _object_spread({
|
|
7054
7056
|
className: className
|
|
7055
7057
|
}, selectBrandProps));
|
|
7056
7058
|
});
|
|
7057
7059
|
// src/EffectReservoirSelect/EffectShelveSelect.tsx
|
|
7058
7060
|
var import_react50 = require("react");
|
|
7059
7061
|
var import_react_use19 = require("react-use");
|
|
7060
|
-
var
|
|
7062
|
+
var import_antd38 = require("antd");
|
|
7061
7063
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7062
7064
|
var EffectShelveSelect = (0, import_react50.memo)(function(props) {
|
|
7063
7065
|
var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, warehouseId = props.warehouseId, reservoirId = props.reservoirId;
|
|
@@ -7150,12 +7152,12 @@ var EffectShelveSelect = (0, import_react50.memo)(function(props) {
|
|
|
7150
7152
|
onChange: handleOnChange,
|
|
7151
7153
|
loading: state.loading
|
|
7152
7154
|
};
|
|
7153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd38.Select, _object_spread({
|
|
7154
7156
|
className: className
|
|
7155
7157
|
}, selectBrandProps));
|
|
7156
7158
|
});
|
|
7157
7159
|
// src/EffectWarehouseSelect/index.tsx
|
|
7158
|
-
var
|
|
7160
|
+
var import_antd39 = require("antd");
|
|
7159
7161
|
var import_classnames14 = __toESM(require("classnames"));
|
|
7160
7162
|
var import_react51 = require("react");
|
|
7161
7163
|
// src/EffectWarehouseSelect/useStoreOptions.ts
|
|
@@ -7231,7 +7233,7 @@ var EffectWarehouseSelect = (0, import_react51.memo)(function(props) {
|
|
|
7231
7233
|
var handleClear = function handleClear() {
|
|
7232
7234
|
onChange === null || onChange === void 0 ? void 0 : onChange(void 0, void 0);
|
|
7233
7235
|
};
|
|
7234
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd39.Select, {
|
|
7235
7237
|
className: (0, import_classnames14.default)(index_module_default19.select, className),
|
|
7236
7238
|
placeholder: "\u8BF7\u9009\u62E9\u4ED3\u5E93",
|
|
7237
7239
|
notFoundContent: state.isLoading ? "\u52A0\u8F7D\u4E2D..." : "\u6682\u65E0\u4ED3\u5E93\u6570\u636E",
|
|
@@ -7253,7 +7255,7 @@ var index_module_default20 = {
|
|
|
7253
7255
|
select: "index_module_select6"
|
|
7254
7256
|
};
|
|
7255
7257
|
// src/EffectAddressCascade/index.tsx
|
|
7256
|
-
var
|
|
7258
|
+
var import_antd40 = require("antd");
|
|
7257
7259
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7258
7260
|
var EffectAddressCascade = (0, import_react52.memo)(function(props) {
|
|
7259
7261
|
var _selectedList_;
|
|
@@ -7351,7 +7353,7 @@ var EffectAddressCascade = (0, import_react52.memo)(function(props) {
|
|
|
7351
7353
|
setSelectedList(_selectedList);
|
|
7352
7354
|
if (onChange) onChange(_selectedList);
|
|
7353
7355
|
};
|
|
7354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_antd40.Cascader, {
|
|
7355
7357
|
className: (0, import_classnames15.default)(index_module_default20.input, className),
|
|
7356
7358
|
disabled: disabled,
|
|
7357
7359
|
defaultValue: defaultValue,
|
|
@@ -7435,7 +7437,7 @@ var index_module_default21 = {
|
|
|
7435
7437
|
select: "index_module_select7"
|
|
7436
7438
|
};
|
|
7437
7439
|
// src/EffectLabelSelect/index.tsx
|
|
7438
|
-
var
|
|
7440
|
+
var import_antd41 = require("antd");
|
|
7439
7441
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7440
7442
|
var EffectLabelSelect = (0, import_react53.memo)(function(props) {
|
|
7441
7443
|
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;
|
|
@@ -7526,12 +7528,12 @@ var EffectLabelSelect = (0, import_react53.memo)(function(props) {
|
|
|
7526
7528
|
filterOption: false,
|
|
7527
7529
|
popupMatchSelectWidth: false
|
|
7528
7530
|
};
|
|
7529
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
7531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_antd41.Space.Compact, {
|
|
7530
7532
|
className: index_module_default21.select_wrap,
|
|
7531
7533
|
style: style,
|
|
7532
7534
|
children: [
|
|
7533
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7534
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7535
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd41.Select, _object_spread({}, selectLabelProps)),
|
|
7536
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd41.Select, _object_spread({}, selectValueProps))
|
|
7535
7537
|
]
|
|
7536
7538
|
});
|
|
7537
7539
|
});
|