@fonixtree/magic-design 2.0.93 → 2.0.95

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 (119) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +11 -3
  2. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/common/index.js +8 -0
  7. package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -2
  8. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
  9. package/es/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
  10. package/es/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
  11. package/es/composite-comp/common/components/ProductItem/index.js +36 -22
  12. package/es/composite-comp/common/components/ProductItem/index.less +9 -0
  13. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +1 -1
  14. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
  15. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -3
  16. package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +232 -0
  17. package/es/composite-comp/dito/components/GroupBuy/index.js +86 -0
  18. package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg.png +0 -0
  19. package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg1.png +0 -0
  20. package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg2.png +0 -0
  21. package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg3.png +0 -0
  22. package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +341 -0
  23. package/es/composite-comp/dito/components/GroupBuy/mobile/index.less +87 -0
  24. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
  25. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  26. package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
  27. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -0
  28. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
  29. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  30. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +5 -3
  31. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +174 -0
  32. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +38 -0
  33. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigTitle/index.js +103 -0
  34. package/es/composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png +0 -0
  35. package/es/composite-comp/dito/config-panels/GroupBuyConfig/index.js +73 -0
  36. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +7 -2
  37. package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
  38. package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.js +12 -10
  39. package/{lib/composite-comp/dito → es/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  40. package/es/constants/component-types.js +9 -5
  41. package/es/constants/index.js +4 -0
  42. package/es/core/Renderer/index.js +27 -10
  43. package/es/decorator/metaDecorator.js +6 -2
  44. package/es/locale/en/en.json +5 -1
  45. package/es/locale/es/es.json +4 -0
  46. package/es/locale/id/id.json +5 -1
  47. package/es/utils/commonUtil.js +16 -0
  48. package/lib/assets/fonts/magic-box-iconfont.css +11 -3
  49. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  50. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  51. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  52. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  53. package/lib/common/index.js +8 -0
  54. package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -2
  55. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
  56. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
  57. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
  58. package/lib/composite-comp/common/components/ProductItem/index.js +36 -22
  59. package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
  60. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +1 -1
  61. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
  62. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -3
  63. package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +232 -0
  64. package/lib/composite-comp/dito/components/GroupBuy/index.js +86 -0
  65. package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg.png +0 -0
  66. package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg1.png +0 -0
  67. package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg2.png +0 -0
  68. package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg3.png +0 -0
  69. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +341 -0
  70. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.less +87 -0
  71. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
  72. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  73. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
  74. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -0
  75. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
  76. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  77. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +5 -3
  78. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +174 -0
  79. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +38 -0
  80. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigTitle/index.js +103 -0
  81. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png +0 -0
  82. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/index.js +73 -0
  83. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +7 -2
  84. package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
  85. package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.js +12 -10
  86. package/{es/composite-comp/dito → lib/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  87. package/lib/constants/component-types.js +9 -5
  88. package/lib/constants/index.js +4 -0
  89. package/lib/core/Renderer/index.js +27 -10
  90. package/lib/decorator/metaDecorator.js +6 -2
  91. package/lib/locale/en/en.json +5 -1
  92. package/lib/locale/es/es.json +4 -0
  93. package/lib/locale/id/id.json +5 -1
  94. package/lib/utils/commonUtil.js +16 -0
  95. package/package.json +1 -1
  96. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
  97. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
  98. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
  99. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
  100. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  101. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  102. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  103. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  104. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  105. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  106. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  107. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
  108. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
  109. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
  110. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
  111. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
  112. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  113. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  114. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  115. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  116. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  117. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  118. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  119. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
@@ -13,7 +13,7 @@ var _commonUtil = require("../../../../utils/commonUtil");
13
13
 
14
14
  var _currencyUtil = require("../../../../utils/currencyUtil");
15
15
 
16
- var _NewImg = _interopRequireDefault(require("../../../../common/NewImg"));
16
+ var _common = require("../../../../common");
17
17
 
18
18
  var _ImageLabel = _interopRequireDefault(require("../ImageLabel"));
19
19
 
@@ -95,20 +95,21 @@ function (_super) {
95
95
  }
96
96
 
97
97
  ProductItem.prototype.render = function () {
98
- var _a, _b, _c;
99
-
100
- var _d = this.props,
101
- data = _d.data,
102
- panelProps = _d.panelProps,
103
- onItemClick = _d.onItemClick,
104
- showProName = _d.showProName,
105
- showProgress = _d.showProgress,
106
- fixHeight = _d.fixHeight,
107
- layout = _d.layout,
108
- imgHeight = _d.imgHeight,
109
- imgWidth = _d.imgWidth,
110
- unknownPrice = _d.unknownPrice,
111
- rest = __rest(_d, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
98
+ var _a, _b, _c, _d, _e;
99
+
100
+ var _f = this.props,
101
+ data = _f.data,
102
+ type = _f.type,
103
+ panelProps = _f.panelProps,
104
+ onItemClick = _f.onItemClick,
105
+ showProName = _f.showProName,
106
+ showProgress = _f.showProgress,
107
+ fixHeight = _f.fixHeight,
108
+ layout = _f.layout,
109
+ imgHeight = _f.imgHeight,
110
+ imgWidth = _f.imgWidth,
111
+ unknownPrice = _f.unknownPrice,
112
+ rest = __rest(_f, ["data", "type", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
112
113
 
113
114
  var promotions = (0, _businessUtil.getPromotionList)(data);
114
115
  var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
@@ -139,6 +140,9 @@ function (_super) {
139
140
  var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
140
141
 
141
142
  var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
143
+
144
+ var _oldPrice = type === 'groupBuy' && data.sppMarketPrice ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.sppMarketPrice) : oldPrice;
145
+
142
146
  var discount = Number(data.discountPercent) || 0;
143
147
  var salePercent = Number(data.salePercent) / 100 || 0;
144
148
  var imgStyle = {};
@@ -153,6 +157,9 @@ function (_super) {
153
157
  var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
154
158
  return f.position === '7';
155
159
  })) || [];
160
+ var shareByNum = (0, _commonUtil.ensure)(function () {
161
+ return data.campaigns.cmpShareBuys[0].shareByNum;
162
+ }, 0);
156
163
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
157
164
  className: (0, _classnames["default"])('m-product-item-wrap', {
158
165
  fixHeight: fixHeight,
@@ -166,7 +173,7 @@ function (_super) {
166
173
  }
167
174
  }, rest), /*#__PURE__*/_react["default"].createElement("div", {
168
175
  className: "img-wrap"
169
- }, /*#__PURE__*/_react["default"].createElement(_NewImg["default"], {
176
+ }, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
170
177
  className: "product-img",
171
178
  lazy: true,
172
179
  src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
@@ -176,7 +183,7 @@ function (_super) {
176
183
  small: true
177
184
  })), /*#__PURE__*/_react["default"].createElement("div", {
178
185
  className: "content-wrap"
179
- }, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
186
+ }, type !== 'groupBuy' && panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
180
187
  className: "promotions-wrap"
181
188
  }, promotions.map(function (promot, index) {
182
189
  return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
@@ -187,7 +194,13 @@ function (_super) {
187
194
  }),
188
195
  readonly: true
189
196
  });
190
- })), /*#__PURE__*/_react["default"].createElement("div", {
197
+ })), type === 'groupBuy' && panelProps.label.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
198
+ className: "group-num",
199
+ data: __assign(__assign({}, panelProps.label), {
200
+ text: shareByNum
201
+ }),
202
+ readonly: true
203
+ }), /*#__PURE__*/_react["default"].createElement("div", {
191
204
  className: "product-name-wrap"
192
205
  }, /*#__PURE__*/_react["default"].createElement("div", {
193
206
  className: "box"
@@ -216,10 +229,10 @@ function (_super) {
216
229
  className: "old-price-wrap"
217
230
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
218
231
  className: "discount"
219
- }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
232
+ }, "-", discount, "%"), _oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
220
233
  className: "old-price",
221
234
  data: __assign(__assign({}, panelProps.salesPrice), {
222
- text: oldPrice
235
+ text: _oldPrice
223
236
  }),
224
237
  readonly: true,
225
238
  style: {
@@ -227,7 +240,7 @@ function (_super) {
227
240
  }
228
241
  })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
229
242
  className: "sold-count"
230
- }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
243
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && ((_d = panelProps.salesProgress) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
231
244
  className: "progress-wrap"
232
245
  }, /*#__PURE__*/_react["default"].createElement("span", {
233
246
  className: "text"
@@ -236,7 +249,8 @@ function (_super) {
236
249
  }, /*#__PURE__*/_react["default"].createElement("div", {
237
250
  className: "progress",
238
251
  style: {
239
- width: salePercent + "%"
252
+ width: salePercent + "%",
253
+ backgroundColor: (_e = panelProps.salesProgress) === null || _e === void 0 ? void 0 : _e.color
240
254
  }
241
255
  })))));
242
256
  };
@@ -34,6 +34,14 @@
34
34
  }
35
35
  }
36
36
 
37
+ .group-num {
38
+ display: inline-block;
39
+
40
+ .m-meta-button .btnContent img {
41
+ height: 14px;
42
+ }
43
+ }
44
+
37
45
  .product-name-wrap {
38
46
  overflow: hidden;
39
47
  text-overflow: ellipsis;
@@ -42,6 +50,7 @@
42
50
  -webkit-line-clamp: 2;
43
51
  line-height: 18px;
44
52
  max-height: 40px;
53
+ white-space: wrap;
45
54
  }
46
55
 
47
56
  .price-wrap {
@@ -205,7 +205,7 @@ var getDefaultJSON = function getDefaultJSON() {
205
205
  lineHeight: 18
206
206
  }
207
207
  },
208
- salesProgressVisible: {
208
+ salesProgress: {
209
209
  open: true
210
210
  }
211
211
  },
@@ -423,7 +423,14 @@ function (_super) {
423
423
  }) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
424
424
  ,
425
425
  onItemClick: function onItemClick() {
426
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
426
+ if (window.magicDesign.pushGA) {
427
+ window.magicDesign.pushGA({}, 'select_promotion', {
428
+ event_section: 'Flash Deal',
429
+ promotion_name: item === null || item === void 0 ? void 0 : item.offerName
430
+ });
431
+ }
432
+
433
+ (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
427
434
  },
428
435
  panelProps: panelProps.content,
429
436
  unknownPrice: isWill
@@ -81,6 +81,3 @@
81
81
  height: 2.8rem;
82
82
  width: 2.8rem;
83
83
  }
84
- .m-flash-deal-mobile .flash-deal-list .m-product-item-wrap .product-name {
85
- height: 0.72rem;
86
- }
@@ -0,0 +1,232 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var getDefaultJSON = function getDefaultJSON() {
11
+ var contentId = (0, _uuid.v4)();
12
+ return {
13
+ id: (0, _uuid.v4)(),
14
+ type: 'GROUP_BUY',
15
+ title: {
16
+ headline: {
17
+ id: (0, _uuid.v4)(),
18
+ open: true,
19
+ type: 'TEXT',
20
+ specialContent: [],
21
+ text: 'Group Buy',
22
+ content: {
23
+ sizeType: 'Customize font styles',
24
+ fontFamily: 'Open Sans',
25
+ fontWeight: 600,
26
+ fontSize: 16,
27
+ color: '#000'
28
+ },
29
+ underline: {
30
+ open: false,
31
+ textDecorationColor: '',
32
+ textDecorationStyle: 'solid'
33
+ },
34
+ vertical: {
35
+ open: false,
36
+ lineHeight: 18
37
+ }
38
+ },
39
+ button: {
40
+ id: (0, _uuid.v4)(),
41
+ open: true,
42
+ type: 'BUTTON',
43
+ text: 'Shop More',
44
+ content: {
45
+ url: '/product/GroupBuy',
46
+ backgroundColor: ''
47
+ },
48
+ buttonText: {
49
+ sizeType: 'Customize font styles',
50
+ fontFamily: 'Open Sans',
51
+ fontWeight: 400,
52
+ fontSize: 13,
53
+ fontStyle: 'normal',
54
+ color: '#2F54EB',
55
+ padding: '0'
56
+ },
57
+ buttonBorder: {
58
+ open: false,
59
+ borderColor: '',
60
+ borderRadius: 6
61
+ },
62
+ spacing: {
63
+ pc: {
64
+ paddingTop: 2,
65
+ paddingBottom: 2,
66
+ paddingLeft: 5,
67
+ paddingRight: 5
68
+ },
69
+ mobile: {
70
+ paddingTop: 2,
71
+ paddingBottom: 2,
72
+ paddingLeft: 5,
73
+ paddingRight: 5
74
+ }
75
+ },
76
+ buttonIcon: {
77
+ iconUrl: '',
78
+ layout: 'right'
79
+ },
80
+ hover: null
81
+ }
82
+ },
83
+ content: {
84
+ id: contentId,
85
+ sortType: '3',
86
+ label: {
87
+ id: (0, _uuid.v4)(),
88
+ contentId: contentId,
89
+ open: true,
90
+ type: 'BUTTON',
91
+ text: 'Button',
92
+ content: {
93
+ url: '',
94
+ backgroundColor: '#CE1126'
95
+ },
96
+ buttonText: {
97
+ sizeType: 'Customize font styles',
98
+ fontFamily: 'Open Sans',
99
+ fontWeight: 700,
100
+ fontSize: 8,
101
+ fontStyle: 'normal',
102
+ color: '#fff'
103
+ },
104
+ buttonBorder: {
105
+ open: true,
106
+ borderColor: '',
107
+ borderRadius: 0
108
+ },
109
+ spacing: {
110
+ mobile: {
111
+ paddingTop: 0,
112
+ paddingBottom: 0,
113
+ paddingLeft: 5,
114
+ paddingRight: 5
115
+ }
116
+ },
117
+ buttonIcon: {
118
+ iconUrl: '/get/resource/platform/20240417/picture/Users1780405511404216320.svg',
119
+ layout: 'left'
120
+ },
121
+ hover: null
122
+ },
123
+ productName: {
124
+ id: (0, _uuid.v4)(),
125
+ contentId: contentId,
126
+ open: true,
127
+ type: 'TEXT',
128
+ specialContent: [],
129
+ text: 'Group Buy',
130
+ content: {
131
+ sizeType: 'Customize font styles',
132
+ fontFamily: 'Open Sans',
133
+ fontWeight: 700,
134
+ fontSize: 13,
135
+ color: '#232F46'
136
+ },
137
+ underline: {
138
+ open: false,
139
+ textDecorationColor: '',
140
+ textDecorationStyle: 'solid'
141
+ },
142
+ vertical: {
143
+ open: false,
144
+ lineHeight: 18
145
+ }
146
+ },
147
+ activityPrice: {
148
+ id: (0, _uuid.v4)(),
149
+ contentId: contentId,
150
+ open: true,
151
+ type: 'TEXT',
152
+ specialContent: [],
153
+ text: 'Group Buy',
154
+ content: {
155
+ sizeType: 'Customize font styles',
156
+ fontFamily: 'Open Sans',
157
+ fontWeight: 700,
158
+ fontSize: 13,
159
+ color: '#CE1126'
160
+ },
161
+ underline: {
162
+ open: false,
163
+ textDecorationColor: '',
164
+ textDecorationStyle: 'solid'
165
+ },
166
+ vertical: {
167
+ open: false,
168
+ lineHeight: 18
169
+ }
170
+ },
171
+ salesPrice: {
172
+ id: (0, _uuid.v4)(),
173
+ contentId: contentId,
174
+ open: true,
175
+ type: 'TEXT',
176
+ specialContent: [],
177
+ text: 'Group Buy',
178
+ content: {
179
+ sizeType: 'Customize font styles',
180
+ fontFamily: 'Open Sans',
181
+ fontWeight: 500,
182
+ fontSize: 10,
183
+ color: '#8493AF'
184
+ },
185
+ underline: {
186
+ open: false,
187
+ textDecorationColor: '',
188
+ textDecorationStyle: 'solid'
189
+ },
190
+ vertical: {
191
+ open: false,
192
+ lineHeight: 18
193
+ }
194
+ },
195
+ salesProgress: {
196
+ open: true,
197
+ color: '#CE1126'
198
+ }
199
+ },
200
+ spacing: {
201
+ pc: {
202
+ paddingTop: 0,
203
+ paddingBottom: 0,
204
+ paddingLeft: 0,
205
+ paddingRight: 0,
206
+ marginBottom: window.magicDesign.compSpacing * 1.5
207
+ },
208
+ mobile: {
209
+ paddingTop: 0,
210
+ paddingBottom: 0,
211
+ paddingLeft: 0,
212
+ paddingRight: 0,
213
+ marginBottom: window.magicDesign.compSpacing
214
+ }
215
+ },
216
+ customize: {
217
+ layout: 'layout1',
218
+ align: 'left',
219
+ pcRowNum: 6,
220
+ pcMaxRowNum: 6,
221
+ pcMinRowNum: 5
222
+ },
223
+ background: {
224
+ opacity: 100,
225
+ color: '#fff',
226
+ image: '',
227
+ bgType: 'color'
228
+ }
229
+ };
230
+ };
231
+
232
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _mobile = _interopRequireDefault(require("./mobile"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _coreUtil = require("../../../../utils/coreUtil");
15
+
16
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ 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); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var GroupBuy =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(GroupBuy, _super);
66
+
67
+ function GroupBuy() {
68
+ return _super !== null && _super.apply(this, arguments) || this;
69
+ }
70
+
71
+ GroupBuy.prototype.render = function () {
72
+ var nodeData = this.props.nodeData;
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
74
+ panelProps: nodeData
75
+ }));
76
+ };
77
+
78
+ GroupBuy.defaultProps = {};
79
+ GroupBuy.type = 'GROUP_BUY';
80
+ GroupBuy.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ GroupBuy = __decorate([_compositeDecorator["default"]], GroupBuy);
82
+ return GroupBuy;
83
+ }(_react.Component);
84
+
85
+ var _default = GroupBuy;
86
+ exports["default"] = _default;