@fonixtree/magic-design 0.1.93 → 0.2.2
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/es/assets/fonts/magic-box-iconfont.css +7 -35
- package/es/assets/fonts/magic-box-iconfont.css.bak +4 -8
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/less/button.less +0 -5
- package/es/common/AffiliateProductModal/index.js +1 -1
- package/es/common/AffiliateProductModal/index.less +1 -1
- package/es/common/Button/index.less +1 -0
- package/es/common/CountDown/index.js +11 -20
- package/es/common/GroupList/index.js +2 -7
- package/es/common/LinkModal/BundleCampaign/index.js +2 -2
- package/es/common/LinkModal/CouponTable/index.js +1 -1
- package/es/common/LinkModal/CustomTable/index.js +0 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +106 -82
- package/es/common/LinkModal/FilteredProductModal/index.less +0 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +60 -115
- package/es/common/LinkModal/ProductDetailPage/index.less +1 -6
- package/es/common/LinkModal/SelectVideoModal/index.js +2 -3
- package/es/common/LinkModal/index.js +5 -20
- package/es/common/MagicLink/index.js +2 -2
- package/es/common/ProductModal/index.js +124 -181
- package/es/common/ProductModal/index.less +1 -7
- package/es/common/ProductSource/index.js +21 -81
- package/es/common/UrlPicker/index.js +10 -51
- package/es/common/Video/index.js +86 -142
- package/es/common/VideoUpload/index.js +1 -1
- package/es/common/index.js +0 -8
- package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -4
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
- package/{lib/composite-comp/nuri → es/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
- package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
- package/es/composite-comp/dito/components/Recommend/pc/index.js +1 -1
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
- package/{lib/composite-comp/nuri → es/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
- package/es/constants/component-types.js +6 -24
- package/es/constants/index.js +5 -52
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
- package/es/core/Designer/ChatRobot/index.js +4 -49
- package/es/core/Designer/ConfigPanel/index.js +0 -6
- package/es/core/Designer/FonixtreeGpt/index.js +29 -222
- package/es/core/Designer/PageCompList/index.js +1 -1
- package/es/core/Designer/QuickMenuBar/index.js +2 -6
- package/es/core/Designer/ToolBarModal/index.js +1 -5
- package/es/core/Designer/index.js +1 -12
- package/es/core/Renderer/index.js +2 -6
- package/es/decorator/compositeDecorator.js +6 -10
- package/es/decorator/index.js +1 -4
- package/es/decorator/metaDecorator.js +3 -7
- package/es/locale/en/en.json +2 -20
- package/es/locale/es/es.json +2 -20
- package/es/locale/id/id.json +2 -20
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/mobx/index.js +3 -9
- package/es/utils/androidUtil.js +2 -17
- package/es/utils/businessUtil.js +5 -54
- package/es/utils/commonUtil.js +13 -151
- package/es/utils/coreUtil.js +24 -89
- package/lib/assets/fonts/magic-box-iconfont.css +7 -35
- package/lib/assets/fonts/magic-box-iconfont.css.bak +4 -8
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/less/button.less +0 -5
- package/lib/common/AffiliateProductModal/index.js +1 -1
- package/lib/common/AffiliateProductModal/index.less +1 -1
- package/lib/common/Button/index.less +1 -0
- package/lib/common/CountDown/index.js +11 -20
- package/lib/common/GroupList/index.js +2 -7
- package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
- package/lib/common/LinkModal/CouponTable/index.js +1 -1
- package/lib/common/LinkModal/CustomTable/index.js +0 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +106 -82
- package/lib/common/LinkModal/FilteredProductModal/index.less +0 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +60 -115
- package/lib/common/LinkModal/ProductDetailPage/index.less +1 -6
- package/lib/common/LinkModal/SelectVideoModal/index.js +2 -3
- package/lib/common/LinkModal/index.js +5 -20
- package/lib/common/MagicLink/index.js +2 -2
- package/lib/common/ProductModal/index.js +124 -181
- package/lib/common/ProductModal/index.less +1 -7
- package/lib/common/ProductSource/index.js +21 -81
- package/lib/common/UrlPicker/index.js +10 -51
- package/lib/common/Video/index.js +86 -142
- package/lib/common/VideoUpload/index.js +1 -1
- package/lib/common/index.js +0 -8
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -4
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
- package/{es/composite-comp/nuri → lib/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
- package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +1 -1
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
- package/{es/composite-comp/nuri → lib/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
- package/lib/constants/component-types.js +6 -24
- package/lib/constants/index.js +5 -52
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
- package/lib/core/Designer/ChatRobot/index.js +4 -49
- package/lib/core/Designer/ConfigPanel/index.js +0 -6
- package/lib/core/Designer/FonixtreeGpt/index.js +29 -222
- package/lib/core/Designer/PageCompList/index.js +1 -1
- package/lib/core/Designer/QuickMenuBar/index.js +2 -6
- package/lib/core/Designer/ToolBarModal/index.js +1 -5
- package/lib/core/Designer/index.js +1 -12
- package/lib/core/Renderer/index.js +2 -6
- package/lib/decorator/compositeDecorator.js +6 -10
- package/lib/decorator/index.js +1 -4
- package/lib/decorator/metaDecorator.js +3 -7
- package/lib/locale/en/en.json +2 -20
- package/lib/locale/es/es.json +2 -20
- package/lib/locale/id/id.json +2 -20
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/mobx/index.js +3 -9
- package/lib/utils/androidUtil.js +2 -17
- package/lib/utils/businessUtil.js +5 -54
- package/lib/utils/commonUtil.js +13 -151
- package/lib/utils/coreUtil.js +24 -89
- package/package.json +1 -2
- package/es/common/CropperModal/index.js +0 -126
- package/es/common/CropperModal/index.less +0 -29
- package/es/common/LinkModal/AffiliatePlatform/index.js +0 -326
- package/es/common/LinkModal/AffiliateStore/index.js +0 -332
- package/es/common/ProductModal/SortableImageList/index.js +0 -118
- package/es/common/ProductModal/SortableImageList/index.less +0 -3
- package/es/common/UrlPicker/AnchorModal/index.js +0 -170
- package/es/common/UrlPicker/AnchorModal/index.less +0 -21
- package/es/common/Video/QualityComponent/index.js +0 -169
- package/es/common/Video/QualityComponent/index.less +0 -78
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
- package/es/composite-comp/dito/components/CommonFunctions/index.js +0 -84
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
- package/es/composite-comp/dito/components/Orders/index.js +0 -84
- package/es/composite-comp/dito/components/Orders/mobile/index.js +0 -350
- package/es/composite-comp/dito/components/Orders/mobile/index.less +0 -86
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
- package/es/composite-comp/dito/components/PersonalInformation/index.js +0 -84
- package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
- package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
- package/es/mobx/UserState.js +0 -144
- package/lib/common/CropperModal/index.js +0 -126
- package/lib/common/CropperModal/index.less +0 -29
- package/lib/common/LinkModal/AffiliatePlatform/index.js +0 -326
- package/lib/common/LinkModal/AffiliateStore/index.js +0 -332
- package/lib/common/ProductModal/SortableImageList/index.js +0 -118
- package/lib/common/ProductModal/SortableImageList/index.less +0 -3
- package/lib/common/UrlPicker/AnchorModal/index.js +0 -170
- package/lib/common/UrlPicker/AnchorModal/index.less +0 -21
- package/lib/common/Video/QualityComponent/index.js +0 -169
- package/lib/common/Video/QualityComponent/index.less +0 -78
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
- package/lib/composite-comp/dito/components/CommonFunctions/index.js +0 -84
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
- package/lib/composite-comp/dito/components/Orders/index.js +0 -84
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +0 -350
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +0 -86
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
- package/lib/composite-comp/dito/components/PersonalInformation/index.js +0 -84
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
- package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
- package/lib/mobx/UserState.js +0 -144
- /package/es/common/Video/{RateComponent → components}/index.js +0 -0
- /package/es/common/Video/{RateComponent → components}/index.less +0 -0
- /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
- /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
- /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
- /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
- /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
- /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
- /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
- /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
- /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
- /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
- /package/lib/common/Video/{RateComponent → components}/index.js +0 -0
- /package/lib/common/Video/{RateComponent → components}/index.less +0 -0
- /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
- /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
- /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
- /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
- /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
|
@@ -128,11 +128,10 @@ function (_super) {
|
|
|
128
128
|
size: "20px",
|
|
129
129
|
type: "icon-delete1"
|
|
130
130
|
})))), this.videoSetting.sourceType === 'Upload' && /*#__PURE__*/_react["default"].createElement(_VideoUpload["default"], {
|
|
131
|
-
onChange: function onChange(v, n
|
|
131
|
+
onChange: function onChange(v, n) {
|
|
132
132
|
_this.onFieldChange({
|
|
133
133
|
sourceUrl: v,
|
|
134
|
-
name: n
|
|
135
|
-
sourceId: id
|
|
134
|
+
name: n
|
|
136
135
|
});
|
|
137
136
|
},
|
|
138
137
|
value: this.videoSetting.sourceUrl
|
|
@@ -37,10 +37,6 @@ var _StoreCatgTable = _interopRequireDefault(require("./StoreCatgTable"));
|
|
|
37
37
|
|
|
38
38
|
var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductTable"));
|
|
39
39
|
|
|
40
|
-
var _AffiliateStore = _interopRequireDefault(require("./AffiliateStore"));
|
|
41
|
-
|
|
42
|
-
var _AffiliatePlatform = _interopRequireDefault(require("./AffiliatePlatform"));
|
|
43
|
-
|
|
44
40
|
var _locale = require("../../locale");
|
|
45
41
|
|
|
46
42
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -236,7 +232,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
236
232
|
|
|
237
233
|
var getLinkTypes = function getLinkTypes() {
|
|
238
234
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
239
|
-
var types,
|
|
235
|
+
var types, type;
|
|
240
236
|
return __generator(this, function (_a) {
|
|
241
237
|
switch (_a.label) {
|
|
242
238
|
case 0:
|
|
@@ -250,15 +246,12 @@ var LinkModal = function LinkModal(props) {
|
|
|
250
246
|
types = _a.sent();
|
|
251
247
|
|
|
252
248
|
if (onlySpecificCode) {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
type_1.push(types.find(function (item) {
|
|
256
|
-
return item.linkTypeCode === code;
|
|
257
|
-
}));
|
|
249
|
+
type = types.filter(function (item) {
|
|
250
|
+
return item.linkTypeCode === onlySpecificCode;
|
|
258
251
|
});
|
|
259
252
|
|
|
260
|
-
if (
|
|
261
|
-
types =
|
|
253
|
+
if (type.length > 0) {
|
|
254
|
+
types = type;
|
|
262
255
|
}
|
|
263
256
|
}
|
|
264
257
|
|
|
@@ -366,14 +359,6 @@ var LinkModal = function LinkModal(props) {
|
|
|
366
359
|
onChange: function onChange(value) {
|
|
367
360
|
return setLinkUrl(value);
|
|
368
361
|
}
|
|
369
|
-
}), item.linkTypeCode === 'AffiliateStore' && /*#__PURE__*/_react["default"].createElement(_AffiliateStore["default"], {
|
|
370
|
-
onChange: function onChange(value) {
|
|
371
|
-
return setLinkUrl(value);
|
|
372
|
-
}
|
|
373
|
-
}), item.linkTypeCode === 'AffiliatePlatform' && /*#__PURE__*/_react["default"].createElement(_AffiliatePlatform["default"], {
|
|
374
|
-
onChange: function onChange(value) {
|
|
375
|
-
return setLinkUrl(value);
|
|
376
|
-
}
|
|
377
362
|
}));
|
|
378
363
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
379
364
|
className: "footer"
|
|
@@ -7,9 +7,9 @@ exports.onAClick = exports.getLinkUrl = exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _businessUtil = require("src/components/utils/businessUtil");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _coreUtil = require("src/components/utils/coreUtil");
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
@@ -5,18 +5,18 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _antd = require("antd");
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var _SortableImageList = _interopRequireDefault(require("./SortableImageList"));
|
|
15
|
-
|
|
16
14
|
var _commonUtil = require("../../utils/commonUtil");
|
|
17
15
|
|
|
18
16
|
var _businessUtil = require("../../utils/businessUtil");
|
|
19
17
|
|
|
18
|
+
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
19
|
+
|
|
20
20
|
var _currencyUtil = require("../../utils/currencyUtil");
|
|
21
21
|
|
|
22
22
|
require("./index.less");
|
|
@@ -204,26 +204,18 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
204
204
|
return r;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var
|
|
208
|
-
FLASH_SALE: '2',
|
|
209
|
-
GROUP_BUY: '4'
|
|
210
|
-
};
|
|
211
|
-
var proTypeOption = [{
|
|
212
|
-
label: 'SKU',
|
|
213
|
-
value: 'sku'
|
|
214
|
-
}, {
|
|
215
|
-
label: 'SPU',
|
|
216
|
-
value: 'spu'
|
|
217
|
-
}];
|
|
218
|
-
|
|
219
|
-
var formatData = function formatData(list, type) {
|
|
207
|
+
var formatData = function formatData(list) {
|
|
220
208
|
list.map(function (item) {
|
|
221
|
-
item.
|
|
209
|
+
item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
|
|
210
|
+
item.preMarketPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.marketPrice);
|
|
222
211
|
});
|
|
223
212
|
return list;
|
|
224
213
|
};
|
|
225
214
|
|
|
226
|
-
|
|
215
|
+
var promType = {
|
|
216
|
+
FLASH_SALE: '2',
|
|
217
|
+
GROUP_BUY: '4'
|
|
218
|
+
};
|
|
227
219
|
var Option = _antd.Select.Option;
|
|
228
220
|
var InputGroup = _antd.Input.Group;
|
|
229
221
|
|
|
@@ -231,12 +223,14 @@ var ProductModal = function ProductModal(props) {
|
|
|
231
223
|
var handleModalSave = props.handleModalSave,
|
|
232
224
|
closeModal = props.closeModal,
|
|
233
225
|
visible = props.visible,
|
|
234
|
-
_a = props.
|
|
235
|
-
|
|
236
|
-
_b = props.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
226
|
+
_a = props.defaultList,
|
|
227
|
+
defaultList = _a === void 0 ? [] : _a,
|
|
228
|
+
_b = props.maxSelect,
|
|
229
|
+
maxSelect = _b === void 0 ? 20 : _b;
|
|
230
|
+
|
|
231
|
+
var _c = (0, _react.useState)(defaultList),
|
|
232
|
+
selectedList = _c[0],
|
|
233
|
+
setSelectedList = _c[1];
|
|
240
234
|
|
|
241
235
|
var _d = (0, _react.useState)([]),
|
|
242
236
|
catgsList = _d[0],
|
|
@@ -298,35 +292,15 @@ var ProductModal = function ProductModal(props) {
|
|
|
298
292
|
loading = _t[0],
|
|
299
293
|
setLoading = _t[1];
|
|
300
294
|
|
|
301
|
-
var _u = (0, _react.useState)(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
flag = _v[0],
|
|
307
|
-
setFlag = _v[1];
|
|
308
|
-
|
|
309
|
-
var _w = (0, _react.useState)(defaultList),
|
|
310
|
-
selectedList = _w[0],
|
|
311
|
-
setSelectedList = _w[1];
|
|
312
|
-
|
|
313
|
-
var _x = (0, _react.useState)(''),
|
|
314
|
-
dragId = _x[0],
|
|
315
|
-
setDragId = _x[1];
|
|
316
|
-
|
|
317
|
-
var _y = (0, _react.useState)({
|
|
318
|
-
pageSize: 20,
|
|
319
|
-
current: 1,
|
|
320
|
-
total: 0
|
|
321
|
-
}),
|
|
322
|
-
paginationParams = _y[0],
|
|
323
|
-
setPaginationParams = _y[1];
|
|
295
|
+
var _u = (0, _react.useState)(defaultList.map(function (v) {
|
|
296
|
+
return v.productId;
|
|
297
|
+
})),
|
|
298
|
+
selectedRowKeys = _u[0],
|
|
299
|
+
setSelectedRowKeys = _u[1];
|
|
324
300
|
|
|
325
301
|
var rowSelection = {
|
|
326
|
-
selectedRowKeys:
|
|
327
|
-
|
|
328
|
-
}),
|
|
329
|
-
onSelect: function onSelect(record, selected) {
|
|
302
|
+
selectedRowKeys: selectedRowKeys,
|
|
303
|
+
onSelect: function onSelect(record, selected, selectedRows) {
|
|
330
304
|
if (selected) {
|
|
331
305
|
if (selectedList.length === maxSelect) {
|
|
332
306
|
_antd.message.warning("Max " + maxSelect);
|
|
@@ -335,13 +309,17 @@ var ProductModal = function ProductModal(props) {
|
|
|
335
309
|
}
|
|
336
310
|
|
|
337
311
|
if (selectedList.length < maxSelect) {
|
|
338
|
-
setSelectedList(__spreadArrays(selectedList, [record]));
|
|
312
|
+
setSelectedList(__spreadArrays(selectedList, formatData([record])));
|
|
339
313
|
}
|
|
340
314
|
} else {
|
|
341
315
|
setSelectedList(selectedList.filter(function (v) {
|
|
342
|
-
return v.
|
|
316
|
+
return v.productId !== record.productId;
|
|
343
317
|
}));
|
|
344
318
|
}
|
|
319
|
+
|
|
320
|
+
setSelectedRowKeys(selectedRows.map(function (v) {
|
|
321
|
+
return v === null || v === void 0 ? void 0 : v.productId;
|
|
322
|
+
}));
|
|
345
323
|
},
|
|
346
324
|
getCheckboxProps: function getCheckboxProps(record) {
|
|
347
325
|
return {
|
|
@@ -350,104 +328,41 @@ var ProductModal = function ProductModal(props) {
|
|
|
350
328
|
}
|
|
351
329
|
};
|
|
352
330
|
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
var onDragEnter = function onDragEnter(e) {
|
|
370
|
-
var hoverNodeId = e.currentTarget.dataset.nodeid;
|
|
371
|
-
|
|
372
|
-
if (dragId === hoverNodeId) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
moveItem(dragId, hoverNodeId);
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
var onDragEnd = function onDragEnd() {
|
|
380
|
-
setDragId('');
|
|
331
|
+
var _v = (0, _react.useState)({
|
|
332
|
+
pageSize: 20,
|
|
333
|
+
current: 1,
|
|
334
|
+
total: 0
|
|
335
|
+
}),
|
|
336
|
+
paginationParams = _v[0],
|
|
337
|
+
setPaginationParams = _v[1];
|
|
338
|
+
|
|
339
|
+
var delSelectedItem = function delSelectedItem(index) {
|
|
340
|
+
console.log(selectedRowKeys, index, 2223);
|
|
341
|
+
var rowKeys = JSON.parse(JSON.stringify(selectedRowKeys));
|
|
342
|
+
rowKeys.splice(index, 1);
|
|
343
|
+
setSelectedRowKeys(rowKeys);
|
|
344
|
+
var rows = JSON.parse(JSON.stringify(selectedList));
|
|
345
|
+
rows.splice(index, 1);
|
|
346
|
+
setSelectedList(rows);
|
|
381
347
|
}; // 请求商品列表
|
|
382
348
|
|
|
383
349
|
|
|
384
|
-
var queryGoods = function queryGoods() {
|
|
350
|
+
var queryGoods = function queryGoods(data) {
|
|
385
351
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
386
|
-
var
|
|
387
|
-
|
|
352
|
+
var res;
|
|
388
353
|
return __generator(this, function (_a) {
|
|
389
354
|
switch (_a.label) {
|
|
390
355
|
case 0:
|
|
391
|
-
setLoading(true);
|
|
392
|
-
setGoodsList([]);
|
|
393
|
-
_list = [];
|
|
394
|
-
total = 0;
|
|
395
|
-
params = {
|
|
396
|
-
productName: productName,
|
|
397
|
-
storeId: storeId,
|
|
398
|
-
cmpTypeId: promotions || '',
|
|
399
|
-
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
400
|
-
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
401
|
-
catgIds: selCatgsList.join(','),
|
|
402
|
-
brandIds: selBrandsList.join(','),
|
|
403
|
-
labelIds: selLabelData.value || '',
|
|
404
|
-
pageSize: paginationParams.pageSize,
|
|
405
|
-
pageIndex: paginationParams.current
|
|
406
|
-
};
|
|
407
|
-
if (!(proType === 'spu')) return [3
|
|
408
|
-
/*break*/
|
|
409
|
-
, 2];
|
|
410
356
|
return [4
|
|
411
357
|
/*yield*/
|
|
412
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
413
|
-
offerCode: productCode,
|
|
414
|
-
isDefaultCover: 'Y',
|
|
415
|
-
onlyQryPublishSku: true,
|
|
416
|
-
auditState: 'S',
|
|
417
|
-
crmFlag: 'on'
|
|
418
|
-
}), 'GET')];
|
|
358
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", data, 'GET')];
|
|
419
359
|
|
|
420
360
|
case 1:
|
|
421
|
-
res_1 = _a.sent();
|
|
422
|
-
_list = formatData((0, _commonUtil.ensure)(function () {
|
|
423
|
-
return res_1.list.map(function (m) {
|
|
424
|
-
return __assign(__assign({}, m.products[0]), m);
|
|
425
|
-
});
|
|
426
|
-
}, []), proType);
|
|
427
|
-
total = res_1.total;
|
|
428
|
-
return [3
|
|
429
|
-
/*break*/
|
|
430
|
-
, 4];
|
|
431
|
-
|
|
432
|
-
case 2:
|
|
433
|
-
return [4
|
|
434
|
-
/*yield*/
|
|
435
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
436
|
-
state: 'A',
|
|
437
|
-
productCode: productCode
|
|
438
|
-
}), 'GET')];
|
|
439
|
-
|
|
440
|
-
case 3:
|
|
441
361
|
res = _a.sent();
|
|
442
|
-
_list = formatData(res.list || []);
|
|
443
|
-
total = res.total;
|
|
444
|
-
_a.label = 4;
|
|
445
|
-
|
|
446
|
-
case 4:
|
|
447
362
|
setLoading(false);
|
|
448
|
-
|
|
449
|
-
paginationParams
|
|
450
|
-
|
|
363
|
+
paginationParams.total = res.total;
|
|
364
|
+
setPaginationParams(paginationParams);
|
|
365
|
+
setGoodsList(res.list || []);
|
|
451
366
|
return [2
|
|
452
367
|
/*return*/
|
|
453
368
|
];
|
|
@@ -545,18 +460,6 @@ var ProductModal = function ProductModal(props) {
|
|
|
545
460
|
});
|
|
546
461
|
};
|
|
547
462
|
|
|
548
|
-
var reset = function reset() {
|
|
549
|
-
setSelBrandsList([]);
|
|
550
|
-
setSelCatgsList([]);
|
|
551
|
-
setSelLabelData([]);
|
|
552
|
-
setProductName('');
|
|
553
|
-
setStoreId('');
|
|
554
|
-
setProductCode('');
|
|
555
|
-
setMinPrice('');
|
|
556
|
-
setMaxPrice('');
|
|
557
|
-
setPromotions(props.type === 'groupBuy' ? promType.GROUP_BUY : null);
|
|
558
|
-
};
|
|
559
|
-
|
|
560
463
|
(0, _react.useEffect)(function () {
|
|
561
464
|
queryOfferCatgs();
|
|
562
465
|
queryBrands();
|
|
@@ -568,19 +471,27 @@ var ProductModal = function ProductModal(props) {
|
|
|
568
471
|
}, []);
|
|
569
472
|
(0, _react.useEffect)(function () {
|
|
570
473
|
setSelectedList(defaultList);
|
|
474
|
+
setSelectedRowKeys(defaultList.map(function (v) {
|
|
475
|
+
return v.productId;
|
|
476
|
+
}));
|
|
571
477
|
|
|
572
478
|
if (props.type === 'groupBuy') {
|
|
573
479
|
setPromotions(promType.GROUP_BUY);
|
|
574
480
|
}
|
|
575
481
|
}, [visible]);
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
482
|
+
|
|
483
|
+
var reset = function reset() {
|
|
484
|
+
setSelBrandsList([]);
|
|
485
|
+
setSelCatgsList([]);
|
|
486
|
+
setSelLabelData([]);
|
|
487
|
+
setProductName('');
|
|
488
|
+
setStoreId('');
|
|
489
|
+
setProductCode('');
|
|
490
|
+
setMinPrice('');
|
|
491
|
+
setMaxPrice('');
|
|
492
|
+
setPromotions(props.type === 'groupBuy' ? promType.GROUP_BUY : null);
|
|
493
|
+
};
|
|
494
|
+
|
|
584
495
|
var columns = [{
|
|
585
496
|
title: (0, _locale.i18n)('IMAGE'),
|
|
586
497
|
dataIndex: 'productImageUrl',
|
|
@@ -599,8 +510,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
599
510
|
width: 120,
|
|
600
511
|
ellipsis: true
|
|
601
512
|
}, {
|
|
602
|
-
title:
|
|
603
|
-
dataIndex:
|
|
513
|
+
title: (0, _locale.i18n)('PRODUCT_CODE'),
|
|
514
|
+
dataIndex: 'productCode',
|
|
604
515
|
width: 120,
|
|
605
516
|
ellipsis: true
|
|
606
517
|
}, _defineProperty({
|
|
@@ -688,7 +599,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
688
599
|
return setStoreId(value);
|
|
689
600
|
},
|
|
690
601
|
optionFilterProp: "children",
|
|
691
|
-
placeholder:
|
|
602
|
+
placeholder: "Please select",
|
|
692
603
|
showSearch: true,
|
|
693
604
|
value: storeId
|
|
694
605
|
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
@@ -701,6 +612,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
701
612
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
702
613
|
defaultValue: selLabelData.children || null,
|
|
703
614
|
onChange: function onChange(v, o) {
|
|
615
|
+
console.log(v, o, 33);
|
|
704
616
|
setSelLabelData(o);
|
|
705
617
|
},
|
|
706
618
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -747,7 +659,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
747
659
|
size: "small",
|
|
748
660
|
value: productName
|
|
749
661
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
750
|
-
label:
|
|
662
|
+
label: "SKU Code"
|
|
751
663
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
752
664
|
className: "inputStyle",
|
|
753
665
|
onChange: function onChange(e) {
|
|
@@ -781,7 +693,20 @@ var ProductModal = function ProductModal(props) {
|
|
|
781
693
|
onClick: function onClick() {
|
|
782
694
|
setLoading(true);
|
|
783
695
|
paginationParams.current = 1;
|
|
784
|
-
queryGoods(
|
|
696
|
+
queryGoods({
|
|
697
|
+
productName: productName,
|
|
698
|
+
productCode: productCode,
|
|
699
|
+
storeId: storeId,
|
|
700
|
+
cmpTypeId: promotions || '',
|
|
701
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
702
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
703
|
+
catgIds: selCatgsList.join(','),
|
|
704
|
+
brandIds: selBrandsList.join(','),
|
|
705
|
+
labelIds: selLabelData.value || '',
|
|
706
|
+
pageSize: paginationParams.pageSize,
|
|
707
|
+
pageIndex: paginationParams.current,
|
|
708
|
+
state: 'A'
|
|
709
|
+
});
|
|
785
710
|
},
|
|
786
711
|
size: "small",
|
|
787
712
|
style: {
|
|
@@ -790,17 +715,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
790
715
|
type: "primary"
|
|
791
716
|
}, (0, _locale.i18n)('QUERY'))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
792
717
|
className: "rightCot"
|
|
793
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
794
|
-
buttonStyle: "solid",
|
|
795
|
-
className: "btn-select-type",
|
|
796
|
-
onChange: function onChange(e) {
|
|
797
|
-
setProType(e.target.value);
|
|
798
|
-
setSelectedList([]);
|
|
799
|
-
},
|
|
800
|
-
options: proTypeOption,
|
|
801
|
-
optionType: "button",
|
|
802
|
-
value: proType
|
|
803
|
-
}), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
718
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
804
719
|
columns: columns,
|
|
805
720
|
dataSource: goodsList,
|
|
806
721
|
loading: loading,
|
|
@@ -808,19 +723,47 @@ var ProductModal = function ProductModal(props) {
|
|
|
808
723
|
onChange: function onChange(page) {
|
|
809
724
|
setLoading(true);
|
|
810
725
|
paginationParams.current = page;
|
|
811
|
-
|
|
726
|
+
setPaginationParams(paginationParams);
|
|
727
|
+
queryGoods({
|
|
728
|
+
productName: productName,
|
|
729
|
+
productCode: productCode,
|
|
730
|
+
cmpTypeId: promotions || '',
|
|
731
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
732
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
733
|
+
catgIds: selCatgsList.join(','),
|
|
734
|
+
brandIds: selBrandsList.join(','),
|
|
735
|
+
labelIds: selLabelData.value || '',
|
|
736
|
+
pageSize: paginationParams.pageSize,
|
|
737
|
+
pageIndex: paginationParams.current,
|
|
738
|
+
state: 'A'
|
|
739
|
+
});
|
|
812
740
|
}
|
|
813
741
|
}),
|
|
814
|
-
rowKey: "
|
|
742
|
+
rowKey: "productId",
|
|
815
743
|
rowSelection: rowSelection,
|
|
816
744
|
scroll: {
|
|
817
|
-
y:
|
|
745
|
+
y: 500
|
|
818
746
|
}
|
|
819
747
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
820
748
|
className: "selectedCot"
|
|
821
|
-
},
|
|
822
|
-
|
|
823
|
-
|
|
749
|
+
}, selectedList.map(function (item, index) {
|
|
750
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
751
|
+
key: index,
|
|
752
|
+
className: "selectedItem"
|
|
753
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
754
|
+
alt: "",
|
|
755
|
+
className: "selectedItemImg " + (item.state !== 'A' ? 'invalid' : ''),
|
|
756
|
+
src: item.productImageUrl,
|
|
757
|
+
title: item.productName
|
|
758
|
+
}), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
759
|
+
className: "selectedItemClose",
|
|
760
|
+
color: "#000",
|
|
761
|
+
onClick: function onClick() {
|
|
762
|
+
return delSelectedItem(index);
|
|
763
|
+
},
|
|
764
|
+
size: 12,
|
|
765
|
+
type: "icon-close"
|
|
766
|
+
}));
|
|
824
767
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
825
768
|
className: "footer"
|
|
826
769
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -829,7 +772,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
829
772
|
className: "totalNum"
|
|
830
773
|
}, selectedList.length, "/", maxSelect)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
831
774
|
onClick: function onClick() {
|
|
832
|
-
handleModalSave && handleModalSave(selectedList
|
|
775
|
+
handleModalSave && handleModalSave(selectedList);
|
|
833
776
|
closeModal && closeModal();
|
|
834
777
|
},
|
|
835
778
|
style: {
|
|
@@ -17,13 +17,7 @@
|
|
|
17
17
|
margin-left: 16px;
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
|
-
justify-content:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.btn-select-type {
|
|
24
|
-
text-align: right;
|
|
25
|
-
margin-bottom: 15px;
|
|
26
|
-
}
|
|
20
|
+
justify-content: space-between;
|
|
27
21
|
|
|
28
22
|
.prodImg {
|
|
29
23
|
display: inline-block;
|