@fonixtree/magic-design 2.0.94 → 2.0.97
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 +11 -3
- package/es/assets/fonts/magic-box-iconfont.js +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/common/LinkModal/MiniAppApi/const.js +637 -0
- package/es/common/LinkModal/MiniAppApi/index.js +61 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -2
- package/es/composite-comp/common/components/ProductItem/index.js +36 -22
- package/es/composite-comp/common/components/ProductItem/index.less +9 -0
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -3
- package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +232 -0
- package/es/composite-comp/dito/components/GroupBuy/index.js +86 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg.png +0 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +341 -0
- package/es/composite-comp/dito/components/GroupBuy/mobile/index.less +87 -0
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +5 -3
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +174 -0
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +38 -0
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigTitle/index.js +103 -0
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/index.js +73 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +7 -2
- package/es/constants/component-types.js +6 -2
- package/es/constants/index.js +6 -1
- package/es/core/Renderer/index.js +27 -10
- package/es/locale/en/en.json +5 -1
- package/es/locale/es/es.json +4 -0
- package/es/locale/id/id.json +5 -1
- package/es/utils/businessUtil.js +12 -0
- package/lib/assets/fonts/magic-box-iconfont.css +11 -3
- package/lib/assets/fonts/magic-box-iconfont.js +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/common/LinkModal/MiniAppApi/const.js +637 -0
- package/lib/common/LinkModal/MiniAppApi/index.js +61 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +36 -22
- package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -3
- package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +232 -0
- package/lib/composite-comp/dito/components/GroupBuy/index.js +86 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg.png +0 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +341 -0
- package/lib/composite-comp/dito/components/GroupBuy/mobile/index.less +87 -0
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +5 -3
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +174 -0
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +38 -0
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigTitle/index.js +103 -0
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/index.js +73 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +7 -2
- package/lib/constants/component-types.js +6 -2
- package/lib/constants/index.js +6 -1
- package/lib/core/Renderer/index.js +27 -10
- package/lib/locale/en/en.json +5 -1
- package/lib/locale/es/es.json +4 -0
- package/lib/locale/id/id.json +5 -1
- package/lib/utils/businessUtil.js +12 -0
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -39,6 +39,8 @@ var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductT
|
|
|
39
39
|
|
|
40
40
|
var _AffiliateStore = _interopRequireDefault(require("./AffiliateStore"));
|
|
41
41
|
|
|
42
|
+
var _MiniAppApi = _interopRequireDefault(require("./MiniAppApi"));
|
|
43
|
+
|
|
42
44
|
var _locale = require("../../locale");
|
|
43
45
|
|
|
44
46
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -368,6 +370,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
368
370
|
onChange: function onChange(value) {
|
|
369
371
|
return setLinkUrl(value);
|
|
370
372
|
}
|
|
373
|
+
}), item.linkTypeCode === 'MiniApi' && /*#__PURE__*/_react["default"].createElement(_MiniAppApi["default"], {
|
|
374
|
+
onChange: function onChange(value) {
|
|
375
|
+
return setLinkUrl(value);
|
|
376
|
+
}
|
|
371
377
|
}));
|
|
372
378
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
373
379
|
className: "footer"
|
package/es/common/index.js
CHANGED
|
@@ -99,6 +99,12 @@ Object.defineProperty(exports, "MyModal", {
|
|
|
99
99
|
return _MyModal["default"];
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
+
Object.defineProperty(exports, "NewImg", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function get() {
|
|
105
|
+
return _NewImg["default"];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
102
108
|
Object.defineProperty(exports, "ProductSource", {
|
|
103
109
|
enumerable: true,
|
|
104
110
|
get: function get() {
|
|
@@ -196,4 +202,6 @@ var _MyModal = _interopRequireDefault(require("./MyModal"));
|
|
|
196
202
|
|
|
197
203
|
var _CropperModal = _interopRequireDefault(require("./CropperModal"));
|
|
198
204
|
|
|
205
|
+
var _NewImg = _interopRequireDefault(require("./NewImg"));
|
|
206
|
+
|
|
199
207
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -13,6 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
require("./index.less");
|
|
15
15
|
|
|
16
|
+
var _locale = require("../../../../../locale");
|
|
17
|
+
|
|
16
18
|
var _mobx = require("../../../../../mobx");
|
|
17
19
|
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -212,8 +214,8 @@ function (_super) {
|
|
|
212
214
|
/** PTO 定制GA */
|
|
213
215
|
if (window.magicDesign.pushGA) {
|
|
214
216
|
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
215
|
-
|
|
216
|
-
promotion_name: (0,
|
|
217
|
+
event_section: 'Banner',
|
|
218
|
+
promotion_name: item.image.content.h5ImgSrc ? item.image.content.h5Name : (0, _locale.i18n)('BANNER_GROUP_NAME')
|
|
217
219
|
});
|
|
218
220
|
}
|
|
219
221
|
},
|
|
@@ -13,7 +13,7 @@ var _commonUtil = require("../../../../utils/commonUtil");
|
|
|
13
13
|
|
|
14
14
|
var _currencyUtil = require("../../../../utils/currencyUtil");
|
|
15
15
|
|
|
16
|
-
var
|
|
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
|
|
101
|
-
data =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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(
|
|
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(
|
|
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, "%"),
|
|
232
|
+
}, "-", discount, "%"), _oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
220
233
|
className: "old-price",
|
|
221
234
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
222
|
-
text:
|
|
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.
|
|
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 {
|
|
@@ -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
|
-
|
|
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
|
|
@@ -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;
|