@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.
Files changed (137) hide show
  1. package/es/assets/less/modal.less +1 -1
  2. package/es/common/ImageLazy/index.js +6 -5
  3. package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
  4. package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
  5. package/es/common/LinkModal/index.js +1 -1
  6. package/es/common/ProductModal/index.js +23 -30
  7. package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  8. package/es/composite-comp/bol/components/Carousel/index.js +16 -23
  9. package/es/composite-comp/bol/components/Carousel/mobile/index.js +7 -18
  10. package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  11. package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  12. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  13. package/es/composite-comp/common/components/ProductItem/index.js +4 -2
  14. package/es/composite-comp/common/components/ProductItem/index.less +9 -0
  15. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  16. package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  17. package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  18. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
  19. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  20. package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  21. package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  22. package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  23. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  24. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  25. package/es/core/Designer/ToolBarModal/index.js +16 -4
  26. package/es/core/Designer/index.js +3 -0
  27. package/es/decorator/index.js +38 -1
  28. package/es/decorator/lazyLoadDecorator.js +75 -0
  29. package/es/locale/en/en.json +1 -1
  30. package/es/locale/es/es.json +1 -1
  31. package/es/locale/id/id.json +1 -1
  32. package/es/meta-comp/components/Button/index.js +7 -0
  33. package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
  34. package/es/meta-comp/components/Text/index.js +9 -0
  35. package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  36. package/es/utils/commonUtil.js +17 -3
  37. package/es/utils/currencyUtil.js +29 -10
  38. package/lib/assets/less/modal.less +1 -1
  39. package/lib/common/ImageLazy/index.js +6 -5
  40. package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
  41. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
  42. package/lib/common/LinkModal/index.js +1 -1
  43. package/lib/common/ProductModal/index.js +23 -30
  44. package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  45. package/lib/composite-comp/bol/components/Carousel/index.js +16 -23
  46. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +7 -18
  47. package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  48. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  49. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  50. package/lib/composite-comp/common/components/ProductItem/index.js +4 -2
  51. package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
  52. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  53. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  54. package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  55. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
  56. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  57. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  58. package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  59. package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  60. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  61. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  62. package/lib/core/Designer/ToolBarModal/index.js +16 -4
  63. package/lib/core/Designer/index.js +3 -0
  64. package/lib/decorator/index.js +38 -1
  65. package/lib/decorator/lazyLoadDecorator.js +75 -0
  66. package/lib/locale/en/en.json +1 -1
  67. package/lib/locale/es/es.json +1 -1
  68. package/lib/locale/id/id.json +1 -1
  69. package/lib/meta-comp/components/Button/index.js +7 -0
  70. package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
  71. package/lib/meta-comp/components/Text/index.js +9 -0
  72. package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  73. package/lib/utils/commonUtil.js +17 -3
  74. package/lib/utils/currencyUtil.js +29 -10
  75. package/package.json +1 -1
  76. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  77. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  78. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  79. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  80. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  81. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  82. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  83. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  84. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  85. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  86. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  87. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  88. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  89. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  90. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  91. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  92. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  93. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  94. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  95. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  96. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  97. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  98. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  99. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  100. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  101. package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  102. package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  103. package/es/core/Designer/TextEditModal/index.js +0 -100
  104. package/es/core/Designer/TextEditModal/index.less +0 -4
  105. package/es/core/Designer/TextEditModal_old/index.js +0 -142
  106. package/es/core/Designer/TextEditModal_old/index.less +0 -25
  107. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  108. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  109. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  110. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  111. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  112. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  113. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  114. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  115. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  116. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  117. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  118. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  119. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  120. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  121. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  122. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  123. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  124. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  125. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  126. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  127. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  128. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  129. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  130. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  131. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  132. package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  133. package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  134. package/lib/core/Designer/TextEditModal/index.js +0 -100
  135. package/lib/core/Designer/TextEditModal/index.less +0 -4
  136. package/lib/core/Designer/TextEditModal_old/index.js +0 -142
  137. package/lib/core/Designer/TextEditModal_old/index.less +0 -25
@@ -18,7 +18,7 @@
18
18
  .cylon-modal-body {
19
19
  padding: 16px 16px 12px 16px !important;
20
20
  max-height: 800px !important;
21
- overflow: scroll;
21
+ // overflow: scroll;
22
22
  }
23
23
  }
24
24
  }
@@ -100,9 +100,11 @@ function (_super) {
100
100
 
101
101
  this.intersectionObserver = new IntersectionObserver(function (entries) {
102
102
  if (entries[0].isIntersecting) {
103
- _this.setState({
104
- show: true
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, ["root", "lazy", "src", "onLoadFunc", "style", "className"]);
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.ecommerce.precision;
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
- allowClear: true,
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'),
@@ -84,7 +84,7 @@
84
84
  }
85
85
 
86
86
  .leftCot {
87
- width: 230px;
87
+ width: 280px;
88
88
  // height: 400px;
89
89
  box-sizing: border-box;
90
90
  border-right: 1px solid #e0e0e0;
@@ -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: "900px",
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, arr;
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)('/designer/v1/h5/offers/catgs', {}, 'GET')];
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
- arr = [];
391
- res.forEach(function (f) {
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 + "/offerdiscatgs/brands", {}, 'GET')];
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.Select, {
569
- mode: "multiple",
570
- onChange: function onChange(value, option) {
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
- }, catgsList.map(function (item) {
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, option) {
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, index) {
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: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
710
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
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: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
740
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
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
- show: false
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
- this.intersectionObserver = new IntersectionObserver(function (entries) {
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 show = this.state.show;
86
+ var lazyShow = this.state.lazyShow;
102
87
  return /*#__PURE__*/_react["default"].createElement("div", {
103
- ref: this.carouselRef
104
- }, show && (window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
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
- var MOBILE_IMG_SIZE = {
77
- 1: {
78
- maxH: 282
79
- },
80
- 2: {
81
- maxH: 137
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'
@@ -79,7 +79,6 @@ function (_super) {
79
79
  var _a;
80
80
 
81
81
  var obj = null;
82
- console.log(customize);
83
82
 
84
83
  if ((0, _coreUtil.isPc)()) {
85
84
  switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
@@ -133,7 +133,7 @@ function (_super) {
133
133
  }
134
134
 
135
135
  var pricePrefix = (0, _commonUtil.ensure)(function () {
136
- return window.ecommerce.prefix;
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 = {
@@ -5,6 +5,15 @@
5
5
  border: 1px solid #D2D9E5;
6
6
  width: 142px;
7
7
  cursor: pointer;
8
+ position: relative;
9
+
10
+ .sold-count {
11
+ color: #7b7b7b;
12
+ font-size: 12px;
13
+ position: absolute;
14
+ right: 8px;
15
+ bottom: 8px;
16
+ }
8
17
 
9
18
  .img-wrap {
10
19
  position: relative;
@@ -98,7 +98,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
98
98
  },
99
99
  hover: null
100
100
  },
101
- sourceType: 'recommend',
101
+ sourceType: 'select',
102
102
  prodIds: '',
103
103
  intelligentType: 'Hot',
104
104
  intelligentValue: [],
@@ -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
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
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
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
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
- // content: {
15
- // logo: {
16
- // id: uuidv4(),
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
- // box: {
35
- // id: uuidv4(),
36
- // open: true,
37
- // color: {
38
- // pc: '#D92929',
39
- // mobile: '#8493AF',
40
- // },
41
- // },
42
- // icon: {
43
- // id: uuidv4(),
44
- // open: true,
45
- // color: {
46
- // pc: '#D92929',
47
- // mobile: '#232F46',
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,