@fonixtree/magic-design 2.0.30 → 2.0.32
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/less/modal.less +1 -1
- package/es/common/ImageLazy/index.js +6 -5
- package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/es/common/LinkModal/index.js +1 -1
- package/es/common/ProductModal/index.js +23 -30
- package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/es/composite-comp/bol/components/Carousel/index.js +16 -23
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +7 -18
- package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
- package/es/composite-comp/common/components/ProductItem/index.js +4 -2
- package/es/composite-comp/common/components/ProductItem/index.less +9 -0
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/es/core/Designer/ToolBarModal/index.js +16 -4
- package/es/core/Designer/index.js +3 -0
- package/es/decorator/index.js +38 -1
- package/es/decorator/lazyLoadDecorator.js +75 -0
- package/es/locale/en/en.json +1 -1
- package/es/locale/es/es.json +1 -1
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/components/Button/index.js +7 -0
- package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/es/meta-comp/components/Text/index.js +9 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/es/utils/commonUtil.js +17 -3
- package/es/utils/currencyUtil.js +29 -10
- package/lib/assets/less/modal.less +1 -1
- package/lib/common/ImageLazy/index.js +6 -5
- package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/lib/common/LinkModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +23 -30
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/lib/composite-comp/bol/components/Carousel/index.js +16 -23
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +7 -18
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
- package/lib/composite-comp/common/components/ProductItem/index.js +4 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/lib/core/Designer/ToolBarModal/index.js +16 -4
- package/lib/core/Designer/index.js +3 -0
- package/lib/decorator/index.js +38 -1
- package/lib/decorator/lazyLoadDecorator.js +75 -0
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/es/es.json +1 -1
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/components/Button/index.js +7 -0
- package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/lib/meta-comp/components/Text/index.js +9 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/lib/utils/commonUtil.js +17 -3
- package/lib/utils/currencyUtil.js +29 -10
- package/package.json +1 -1
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/es/core/Designer/TextEditModal/index.js +0 -100
- package/es/core/Designer/TextEditModal/index.less +0 -4
- package/es/core/Designer/TextEditModal_old/index.js +0 -142
- package/es/core/Designer/TextEditModal_old/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
- package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
- package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
- package/lib/core/Designer/TextEditModal/index.js +0 -100
- package/lib/core/Designer/TextEditModal/index.less +0 -4
- package/lib/core/Designer/TextEditModal_old/index.js +0 -142
- package/lib/core/Designer/TextEditModal_old/index.less +0 -25
|
@@ -100,9 +100,11 @@ function (_super) {
|
|
|
100
100
|
|
|
101
101
|
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
102
102
|
if (entries[0].isIntersecting) {
|
|
103
|
-
_this.
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
if (!_this.state.show) {
|
|
104
|
+
_this.setState({
|
|
105
|
+
show: true
|
|
106
|
+
});
|
|
107
|
+
}
|
|
106
108
|
}
|
|
107
109
|
}, {
|
|
108
110
|
root: (_a = this.props) === null || _a === void 0 ? void 0 : _a.rootContainer(),
|
|
@@ -120,14 +122,13 @@ function (_super) {
|
|
|
120
122
|
var _this = this;
|
|
121
123
|
|
|
122
124
|
var _a = this.props,
|
|
123
|
-
root = _a.root,
|
|
124
125
|
_b = _a.lazy,
|
|
125
126
|
lazy = _b === void 0 ? true : _b,
|
|
126
127
|
src = _a.src,
|
|
127
128
|
onLoadFunc = _a.onLoadFunc,
|
|
128
129
|
style = _a.style,
|
|
129
130
|
className = _a.className,
|
|
130
|
-
rest = __rest(_a, ["
|
|
131
|
+
rest = __rest(_a, ["lazy", "src", "onLoadFunc", "style", "className"]);
|
|
131
132
|
|
|
132
133
|
var show = this.state.show;
|
|
133
134
|
var isShow = lazy ? show : true;
|
|
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
447
447
|
switch (_a.label) {
|
|
448
448
|
case 0:
|
|
449
449
|
precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
|
|
450
|
-
return window.
|
|
450
|
+
return window.systemParams.precision;
|
|
451
451
|
}, '0'));
|
|
452
452
|
params = {
|
|
453
453
|
catgIds: tValue.join(','),
|
|
@@ -532,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
532
532
|
layout: "vertical"
|
|
533
533
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
534
534
|
label: "Category"
|
|
535
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect
|
|
536
|
-
|
|
535
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
|
|
536
|
+
, {
|
|
537
537
|
dropdownStyle: {
|
|
538
538
|
maxHeight: 400,
|
|
539
539
|
overflow: 'auto'
|
|
540
540
|
},
|
|
541
|
+
maxTagCount: 2,
|
|
542
|
+
maxTagTextLength: 5,
|
|
541
543
|
multiple: true,
|
|
542
544
|
onChange: onChange,
|
|
543
545
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -549,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
549
551
|
label: "Brand"
|
|
550
552
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
551
553
|
defaultValue: [],
|
|
554
|
+
maxTagCount: 2,
|
|
555
|
+
maxTagTextLength: 5,
|
|
552
556
|
mode: "multiple",
|
|
553
557
|
onChange: handleBrandChange,
|
|
554
558
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
285
285
|
,
|
|
286
286
|
title: (0, _locale.i18n)('URL_SETUP'),
|
|
287
287
|
visible: visible,
|
|
288
|
-
width: "
|
|
288
|
+
width: "1000px",
|
|
289
289
|
wrapClassName: "magicLinkModal"
|
|
290
290
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
|
|
291
291
|
activeKey: selected,
|
|
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
204
204
|
return r;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var precision = (0, _currencyUtil.getPrecision)();
|
|
208
|
-
|
|
209
207
|
var formatData = function formatData(list) {
|
|
210
208
|
list.map(function (item) {
|
|
211
209
|
item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
|
|
@@ -377,21 +375,18 @@ var ProductModal = function ProductModal(props) {
|
|
|
377
375
|
|
|
378
376
|
var queryOfferCatgs = function queryOfferCatgs() {
|
|
379
377
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
-
var res,
|
|
378
|
+
var res, tree;
|
|
381
379
|
return __generator(this, function (_a) {
|
|
382
380
|
switch (_a.label) {
|
|
383
381
|
case 0:
|
|
384
382
|
return [4
|
|
385
383
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)(
|
|
384
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
387
385
|
|
|
388
386
|
case 1:
|
|
389
387
|
res = _a.sent();
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
if (f.children) arr.push.apply(arr, f.children);
|
|
393
|
-
});
|
|
394
|
-
setCatgsList(arr);
|
|
388
|
+
tree = (0, _businessUtil.listToTree)(res);
|
|
389
|
+
setCatgsList(tree);
|
|
395
390
|
return [2
|
|
396
391
|
/*return*/
|
|
397
392
|
];
|
|
@@ -409,7 +404,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
409
404
|
case 0:
|
|
410
405
|
return [4
|
|
411
406
|
/*yield*/
|
|
412
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
407
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
413
408
|
|
|
414
409
|
case 1:
|
|
415
410
|
res = _a.sent();
|
|
@@ -565,35 +560,33 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
560
|
layout: "vertical"
|
|
566
561
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
567
562
|
label: "Category"
|
|
568
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
569
|
-
|
|
570
|
-
|
|
563
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
|
|
564
|
+
dropdownStyle: {
|
|
565
|
+
maxHeight: 400,
|
|
566
|
+
overflow: 'auto'
|
|
567
|
+
},
|
|
568
|
+
maxTagCount: 2,
|
|
569
|
+
maxTagTextLength: 5,
|
|
570
|
+
multiple: true,
|
|
571
|
+
onChange: function onChange(value) {
|
|
571
572
|
setSelCatgsList(value);
|
|
572
573
|
},
|
|
573
574
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
574
575
|
size: "small",
|
|
576
|
+
treeData: catgsList,
|
|
577
|
+
treeDefaultExpandAll: true,
|
|
575
578
|
value: selCatgsList
|
|
576
|
-
},
|
|
577
|
-
return /*#__PURE__*/_react["default"].createElement(OptGroup, {
|
|
578
|
-
key: item.model.catgId,
|
|
579
|
-
label: item.model.catgName
|
|
580
|
-
}, (item.children || []).map(function (i) {
|
|
581
|
-
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
582
|
-
key: i.model.catgId,
|
|
583
|
-
value: i.model.catgId
|
|
584
|
-
}, i.model.catgName);
|
|
585
|
-
}));
|
|
586
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
579
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
587
580
|
label: "Brand"
|
|
588
581
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
589
582
|
mode: "multiple",
|
|
590
|
-
onChange: function onChange(value
|
|
583
|
+
onChange: function onChange(value) {
|
|
591
584
|
setSelBrandsList(value);
|
|
592
585
|
},
|
|
593
586
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
594
587
|
size: "small",
|
|
595
588
|
value: selBrandsList
|
|
596
|
-
}, brandsList.map(function (item
|
|
589
|
+
}, brandsList.map(function (item) {
|
|
597
590
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
598
591
|
key: item.catgId,
|
|
599
592
|
value: item.brandId
|
|
@@ -706,8 +699,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
706
699
|
productCode: productCode,
|
|
707
700
|
storeId: storeId,
|
|
708
701
|
cmpTypeId: promotions || '',
|
|
709
|
-
minPrice:
|
|
710
|
-
maxPrice:
|
|
702
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
703
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
711
704
|
catgIds: selCatgsList.join(','),
|
|
712
705
|
brandIds: selBrandsList.join(','),
|
|
713
706
|
labelIds: selLabelData.value || '',
|
|
@@ -736,8 +729,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
736
729
|
productName: productName,
|
|
737
730
|
productCode: productCode,
|
|
738
731
|
cmpTypeId: promotions || '',
|
|
739
|
-
minPrice:
|
|
740
|
-
maxPrice:
|
|
732
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
733
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
741
734
|
catgIds: selCatgsList.join(','),
|
|
742
735
|
brandIds: selBrandsList.join(','),
|
|
743
736
|
labelIds: selLabelData.value || '',
|
|
@@ -208,6 +208,12 @@ function (_super) {
|
|
|
208
208
|
style: _this.getBackgroundStyle(item)
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
className: "carouselItem",
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
/** PTO 定制GA */
|
|
213
|
+
if (window.magicDesign.pushGA) {
|
|
214
|
+
window.magicDesign.pushGA({}, 'select_promotion');
|
|
215
|
+
}
|
|
216
|
+
},
|
|
211
217
|
onMouseEnter: _this.mouseEnterWrap,
|
|
212
218
|
onMouseLeave: _this.mouseLeaveWrap,
|
|
213
219
|
style: _this.getItemStyle(item)
|
|
@@ -15,6 +15,8 @@ var _defaultJSON = require("./defaultJSON");
|
|
|
15
15
|
|
|
16
16
|
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
17
17
|
|
|
18
|
+
var _decorator = require("../../../../decorator");
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -68,40 +70,26 @@ function (_super) {
|
|
|
68
70
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
69
71
|
|
|
70
72
|
_this.state = {
|
|
71
|
-
|
|
73
|
+
lazyShow: false
|
|
72
74
|
};
|
|
73
75
|
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
74
76
|
_this.intersectionObserver = null;
|
|
75
77
|
return _this;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
Carousel.prototype.componentDidMount = function () {
|
|
79
|
-
var _this = this;
|
|
80
|
+
Carousel.prototype.componentDidMount = function () {};
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
if (entries[0].isIntersecting) {
|
|
83
|
-
_this.setState({
|
|
84
|
-
show: true
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
root: null,
|
|
89
|
-
// threshold: 0.8,
|
|
90
|
-
rootMargin: '0px 0px 100px 0px'
|
|
91
|
-
});
|
|
92
|
-
this.intersectionObserver.observe(this.carouselRef.current);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
Carousel.prototype.componentWillUnmount = function () {
|
|
96
|
-
this.intersectionObserver.disconnect(this.carouselRef.current);
|
|
97
|
-
};
|
|
82
|
+
Carousel.prototype.componentWillUnmount = function () {};
|
|
98
83
|
|
|
99
84
|
Carousel.prototype.render = function () {
|
|
100
85
|
var nodeData = this.props.nodeData;
|
|
101
|
-
var
|
|
86
|
+
var lazyShow = this.state.lazyShow;
|
|
102
87
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
-
ref: this.carouselRef
|
|
104
|
-
|
|
88
|
+
ref: this.carouselRef,
|
|
89
|
+
style: {
|
|
90
|
+
height: lazyShow ? 'auto' : 300
|
|
91
|
+
}
|
|
92
|
+
}, lazyShow && (window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
105
93
|
data: nodeData
|
|
106
94
|
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
107
95
|
data: nodeData
|
|
@@ -111,6 +99,11 @@ function (_super) {
|
|
|
111
99
|
Carousel.defaultProps = {};
|
|
112
100
|
Carousel.type = 'CAROUSEL';
|
|
113
101
|
Carousel.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
102
|
+
|
|
103
|
+
__decorate([(0, _decorator.lazy)('carouselRef')], Carousel.prototype, "componentDidMount", null);
|
|
104
|
+
|
|
105
|
+
__decorate([_decorator.lazyDestroy], Carousel.prototype, "componentWillUnmount", null);
|
|
106
|
+
|
|
114
107
|
Carousel = __decorate([_compositeDecorator["default"]], Carousel);
|
|
115
108
|
return Carousel;
|
|
116
109
|
}(_react.Component);
|
|
@@ -73,24 +73,13 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
73
73
|
return __assign.apply(this, arguments);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
3: {
|
|
84
|
-
maxH: 87
|
|
85
|
-
},
|
|
86
|
-
4: {
|
|
87
|
-
maxH: 66
|
|
88
|
-
},
|
|
89
|
-
5: {
|
|
90
|
-
maxH: 50
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
76
|
+
// const MOBILE_IMG_SIZE = {
|
|
77
|
+
// 1: { maxH: 282 },
|
|
78
|
+
// 2: { maxH: 137 },
|
|
79
|
+
// 3: { maxH: 87 },
|
|
80
|
+
// 4: { maxH: 66 },
|
|
81
|
+
// 5: { maxH: 50 },
|
|
82
|
+
// };
|
|
94
83
|
var CarouselMobile =
|
|
95
84
|
/** @class */
|
|
96
85
|
function (_super) {
|
|
@@ -101,6 +101,18 @@ var videoGroupSourceJSON = function videoGroupSourceJSON(parentId) {
|
|
|
101
101
|
iconUrl: '',
|
|
102
102
|
layout: 'right'
|
|
103
103
|
},
|
|
104
|
+
spacing: {
|
|
105
|
+
pc: {
|
|
106
|
+
paddingTop: 0,
|
|
107
|
+
paddingBottom: 0,
|
|
108
|
+
marginBottom: 0
|
|
109
|
+
},
|
|
110
|
+
mobile: {
|
|
111
|
+
paddingTop: 0,
|
|
112
|
+
paddingBottom: 0,
|
|
113
|
+
marginBottom: 0
|
|
114
|
+
}
|
|
115
|
+
},
|
|
104
116
|
text: 'Button Tag'
|
|
105
117
|
},
|
|
106
118
|
secondButtonTag: {
|
|
@@ -126,6 +138,18 @@ var videoGroupSourceJSON = function videoGroupSourceJSON(parentId) {
|
|
|
126
138
|
borderColor: '',
|
|
127
139
|
borderRadius: 4
|
|
128
140
|
},
|
|
141
|
+
spacing: {
|
|
142
|
+
pc: {
|
|
143
|
+
paddingTop: 0,
|
|
144
|
+
paddingBottom: 0,
|
|
145
|
+
marginBottom: 0
|
|
146
|
+
},
|
|
147
|
+
mobile: {
|
|
148
|
+
paddingTop: 0,
|
|
149
|
+
paddingBottom: 0,
|
|
150
|
+
marginBottom: 0
|
|
151
|
+
}
|
|
152
|
+
},
|
|
129
153
|
buttonIcon: {
|
|
130
154
|
iconUrl: '',
|
|
131
155
|
layout: 'right'
|
|
Binary file
|
|
@@ -133,7 +133,7 @@ function (_super) {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
136
|
-
return window.
|
|
136
|
+
return window.systemParams.prefix;
|
|
137
137
|
}, 'Rp');
|
|
138
138
|
|
|
139
139
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
@@ -226,7 +226,9 @@ function (_super) {
|
|
|
226
226
|
style: {
|
|
227
227
|
width: salePercent + "%"
|
|
228
228
|
}
|
|
229
|
-
})))
|
|
229
|
+
}))), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
|
+
className: "sold-count"
|
|
231
|
+
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")));
|
|
230
232
|
};
|
|
231
233
|
|
|
232
234
|
ProductItem.defaultProps = {
|
|
@@ -635,7 +635,14 @@ function (_super) {
|
|
|
635
635
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
636
636
|
,
|
|
637
637
|
onItemClick: function onItemClick() {
|
|
638
|
-
|
|
638
|
+
/** PTO 定制GA */
|
|
639
|
+
if (window.magicDesign.pushGA) {
|
|
640
|
+
window.magicDesign.pushGA(item, 'select_item', {
|
|
641
|
+
event_action: 'Select Item'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
639
646
|
},
|
|
640
647
|
panelProps: panelProps.content,
|
|
641
648
|
showProgress: false
|
|
@@ -661,7 +668,12 @@ function (_super) {
|
|
|
661
668
|
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
662
669
|
,
|
|
663
670
|
onItemClick: function onItemClick() {
|
|
664
|
-
|
|
671
|
+
/** PTO 定制GA */
|
|
672
|
+
if (window.magicDesign.pushGA) {
|
|
673
|
+
window.magicDesign.pushGA({}, 'select_item', item);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
665
677
|
},
|
|
666
678
|
panelProps: panelProps.content,
|
|
667
679
|
showProgress: false
|
|
@@ -11,43 +11,47 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
11
11
|
return {
|
|
12
12
|
id: (0, _uuid.v4)(),
|
|
13
13
|
type: 'SIGN_BOARD',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
14
|
+
content: {
|
|
15
|
+
logo: {
|
|
16
|
+
id: (0, _uuid.v4)(),
|
|
17
|
+
open: true,
|
|
18
|
+
type: 'IMAGE',
|
|
19
|
+
content: {
|
|
20
|
+
h5Name: 'name2',
|
|
21
|
+
pcName: 'name2',
|
|
22
|
+
h5ImgSrc: '',
|
|
23
|
+
pcImgSrc: '',
|
|
24
|
+
clickUrl: ''
|
|
25
|
+
},
|
|
26
|
+
hover: {
|
|
27
|
+
open: false,
|
|
28
|
+
backgroundType: 'enlarge',
|
|
29
|
+
magnification: 1.5,
|
|
30
|
+
pcImgHoverUrl: '',
|
|
31
|
+
h5ImgHoverUrl: ''
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
id: (0, _uuid.v4)(),
|
|
36
|
+
open: true,
|
|
37
|
+
type: 'TEXT',
|
|
38
|
+
specialContent: [],
|
|
39
|
+
text: 'Title',
|
|
40
|
+
content: {
|
|
41
|
+
sizeType: 'Customize font styles',
|
|
42
|
+
fontFamily: 'Open Sans',
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
fontSize: 16,
|
|
45
|
+
color: '#070707'
|
|
46
|
+
},
|
|
47
|
+
underline: {
|
|
48
|
+
open: false,
|
|
49
|
+
textDecorationColor: '',
|
|
50
|
+
textDecorationStyle: 'solid'
|
|
51
|
+
},
|
|
52
|
+
vertical: {}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
51
55
|
spacing: {
|
|
52
56
|
pc: {
|
|
53
57
|
paddingTop: 20,
|