@fonixtree/magic-design 2.0.48 → 2.0.50
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/.DS_Store +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +22 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +28 -3
- package/es/assets/fonts/magic-box-iconfont.js +5 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +5 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/base64/index.js +10 -2
- package/es/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/es/common/ImagePicker/index.js +1 -1
- package/es/common/MyModal/index.js +413 -0
- package/es/common/MyModal/index.less +74 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +60 -77
- package/es/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/es/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/es/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
- package/es/constants/component-types.js +9 -3
- package/es/constants/index.js +4 -0
- package/es/constants/layout.js +9 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +9 -0
- package/es/core/Designer/ToolBarModal/index.js +55 -0
- package/es/core/Designer/ToolBarModal/index.less +3 -2
- package/es/core/Renderer/index.js +44 -3
- package/es/locale/en/en.json +2 -1
- package/es/locale/es/es.json +2 -1
- package/es/locale/id/id.json +2 -1
- package/es/meta-comp/components/Image/index.js +31 -25
- package/es/meta-comp/config-panels/ImageConfig/index.js +44 -42
- package/es/mobx/Frame.js +15 -1
- package/es/utils/businessUtil.js +2 -1
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +22 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +28 -3
- package/lib/assets/fonts/magic-box-iconfont.js +5 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +5 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/base64/index.js +10 -2
- package/lib/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/lib/common/ImagePicker/index.js +1 -1
- package/lib/common/MyModal/index.js +413 -0
- package/lib/common/MyModal/index.less +74 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +60 -77
- package/lib/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/lib/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
- package/lib/constants/component-types.js +9 -3
- package/lib/constants/index.js +4 -0
- package/lib/constants/layout.js +9 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +9 -0
- package/lib/core/Designer/ToolBarModal/index.js +55 -0
- package/lib/core/Designer/ToolBarModal/index.less +3 -2
- package/lib/core/Renderer/index.js +44 -3
- package/lib/locale/en/en.json +2 -1
- package/lib/locale/es/es.json +2 -1
- package/lib/locale/id/id.json +2 -1
- package/lib/meta-comp/components/Image/index.js +31 -25
- package/lib/meta-comp/config-panels/ImageConfig/index.js +44 -42
- package/lib/mobx/Frame.js +15 -1
- package/lib/utils/businessUtil.js +2 -1
- package/package.json +1 -1
|
@@ -244,14 +244,14 @@ function (_super) {
|
|
|
244
244
|
|
|
245
245
|
_this.getMyWalletData = function () {
|
|
246
246
|
return __awaiter(_this, void 0, void 0, function () {
|
|
247
|
-
var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet,
|
|
247
|
+
var data, _a, userCreditResps, userCashbackValues, userBalance, userPoint, defaultShowWallet, bnplObj, creditObj, B2BObj;
|
|
248
248
|
|
|
249
249
|
var _b;
|
|
250
250
|
|
|
251
|
-
var
|
|
251
|
+
var _this = this;
|
|
252
252
|
|
|
253
|
-
return __generator(this, function (
|
|
254
|
-
switch (
|
|
253
|
+
return __generator(this, function (_c) {
|
|
254
|
+
switch (_c.label) {
|
|
255
255
|
case 0:
|
|
256
256
|
data = this.props.data;
|
|
257
257
|
return [4
|
|
@@ -259,86 +259,60 @@ function (_super) {
|
|
|
259
259
|
, (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
|
|
260
260
|
|
|
261
261
|
case 1:
|
|
262
|
-
_a =
|
|
263
|
-
// userCreditResps: [
|
|
264
|
-
// {
|
|
265
|
-
// userCreditId: 1023,
|
|
266
|
-
// creditId: 1,
|
|
267
|
-
// partyType: null,
|
|
268
|
-
// state: 'Pass',
|
|
269
|
-
// isUrlExpired: false,
|
|
270
|
-
// creditLimit: 150000,
|
|
271
|
-
// usageAmount: 100000,
|
|
272
|
-
// availableAmount: 1000,
|
|
273
|
-
// comments: null,
|
|
274
|
-
// userNearestBillDto: null,
|
|
275
|
-
// },
|
|
276
|
-
// {
|
|
277
|
-
// userCreditId: 1026,
|
|
278
|
-
// creditId: 2,
|
|
279
|
-
// partyType: null,
|
|
280
|
-
// state: 'Locked',
|
|
281
|
-
// isUrlExpired: false,
|
|
282
|
-
// creditLimit: 100000,
|
|
283
|
-
// usageAmount: 100000,
|
|
284
|
-
// availableAmount: 2000,
|
|
285
|
-
// comments: null,
|
|
286
|
-
// userNearestBillDto: null,
|
|
287
|
-
// },
|
|
288
|
-
// {
|
|
289
|
-
// userCreditId: 1027,
|
|
290
|
-
// creditId: 3,
|
|
291
|
-
// partyType: 'I',
|
|
292
|
-
// state: 'Pass',
|
|
293
|
-
// isUrlExpired: false,
|
|
294
|
-
// creditLimit: 100000000,
|
|
295
|
-
// usageAmount: 0,
|
|
296
|
-
// availableAmount: 3000,
|
|
297
|
-
// comments: 'ty',
|
|
298
|
-
// userNearestBillDto: null,
|
|
299
|
-
// },
|
|
300
|
-
// ],
|
|
301
|
-
// userCashbackValues: 4000,
|
|
302
|
-
// userBalance: 5000,
|
|
303
|
-
// userPoint: 6000,
|
|
304
|
-
// defaultShowWallet: 'Balance',
|
|
305
|
-
// };
|
|
306
|
-
|
|
307
|
-
if (data.customize.layout === 'layout2' && this.carouselRef) {
|
|
308
|
-
defaultShowIndex_1 = 0;
|
|
309
|
-
data.groupSource.forEach(function (f, i) {
|
|
310
|
-
if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
|
|
311
|
-
});
|
|
312
|
-
(_c = this.carouselRef.current) === null || _c === void 0 ? void 0 : _c.slideTo(defaultShowIndex_1);
|
|
313
|
-
}
|
|
314
|
-
|
|
262
|
+
_a = _c.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues, userBalance = _a.userBalance, userPoint = _a.userPoint, defaultShowWallet = _a.defaultShowWallet;
|
|
315
263
|
bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
316
|
-
return item.creditId === 1
|
|
264
|
+
return item.creditId === 1;
|
|
317
265
|
});
|
|
318
266
|
creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
319
|
-
return item.creditId === 2
|
|
267
|
+
return item.creditId === 2;
|
|
320
268
|
});
|
|
321
269
|
B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
322
|
-
return item.creditId === 3
|
|
270
|
+
return item.creditId === 3;
|
|
323
271
|
});
|
|
324
272
|
this.setState({
|
|
325
273
|
userWalletData: (_b = {}, _b[_constants.walletType.BNPL] = {
|
|
326
|
-
amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
|
|
274
|
+
amount: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY',
|
|
275
|
+
show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(bnplObj === null || bnplObj === void 0 ? void 0 : bnplObj.state)
|
|
327
276
|
}, _b[_constants.walletType.CREDIT] = {
|
|
328
|
-
amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
|
|
277
|
+
amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
|
|
278
|
+
show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(creditObj === null || creditObj === void 0 ? void 0 : creditObj.state)
|
|
329
279
|
}, _b[_constants.walletType.B2B] = {
|
|
330
280
|
amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
|
|
331
281
|
text: B2BObj ? 'Add more products to your shop!' : '',
|
|
332
|
-
btnText: B2BObj ? 'Procure Product' : ''
|
|
282
|
+
btnText: B2BObj ? 'Procure Product' : '',
|
|
283
|
+
show: userCreditResps === null || [_constants.CREDIT_STATE.APPROVED.KEY].includes(B2BObj === null || B2BObj === void 0 ? void 0 : B2BObj.state)
|
|
333
284
|
}, _b[_constants.walletType.CASHBACK] = {
|
|
334
|
-
amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
|
|
285
|
+
amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
|
|
286
|
+
show: true
|
|
335
287
|
}, _b[_constants.walletType.BALANCE] = {
|
|
336
288
|
amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
|
|
337
|
-
btnText: userBalance ? 'Social Commerce' : ''
|
|
289
|
+
btnText: userBalance ? 'Social Commerce' : '',
|
|
290
|
+
show: true
|
|
338
291
|
}, _b[_constants.walletType.CENDUIT] = {
|
|
339
292
|
amount: userPoint === null ? '****' : userPoint,
|
|
340
|
-
btnText: userPoint ? 'Cenduit Mall' : ''
|
|
293
|
+
btnText: userPoint ? 'Cenduit Mall' : '',
|
|
294
|
+
show: true
|
|
341
295
|
}, _b)
|
|
296
|
+
}, function () {
|
|
297
|
+
var _a;
|
|
298
|
+
|
|
299
|
+
if (data.customize.layout === 'layout2' && _this.carouselRef) {
|
|
300
|
+
var userWalletData_1 = _this.state.userWalletData;
|
|
301
|
+
|
|
302
|
+
var _groupSource = data.groupSource.filter(function (f) {
|
|
303
|
+
var _a;
|
|
304
|
+
|
|
305
|
+
return (_a = userWalletData_1[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
var defaultShowIndex_1 = 0;
|
|
309
|
+
|
|
310
|
+
_groupSource.forEach(function (f, i) {
|
|
311
|
+
if (f.sourceType === defaultShowWallet) defaultShowIndex_1 = i;
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
(_a = _this.carouselRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(defaultShowIndex_1);
|
|
315
|
+
}
|
|
342
316
|
});
|
|
343
317
|
return [2
|
|
344
318
|
/*return*/
|
|
@@ -428,11 +402,20 @@ function (_super) {
|
|
|
428
402
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
429
403
|
|
|
430
404
|
var data = this.props.data;
|
|
431
|
-
var
|
|
405
|
+
var _j = this.state,
|
|
406
|
+
sliderIndex = _j.sliderIndex,
|
|
407
|
+
userWalletData = _j.userWalletData;
|
|
432
408
|
var colNum = data.customize.rowNum;
|
|
433
409
|
var autoplay = (_b = (_a = data.setting) === null || _a === void 0 ? void 0 : _a.autoplay) === null || _b === void 0 ? void 0 : _b.open;
|
|
410
|
+
|
|
411
|
+
var _groupSource = data.groupSource.filter(function (f) {
|
|
412
|
+
var _a;
|
|
413
|
+
|
|
414
|
+
return (_a = userWalletData[f.sourceType]) === null || _a === void 0 ? void 0 : _a.show;
|
|
415
|
+
});
|
|
434
416
|
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
435
417
|
|
|
418
|
+
|
|
436
419
|
if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
|
|
437
420
|
autoplay = false;
|
|
438
421
|
}
|
|
@@ -551,7 +534,7 @@ function (_super) {
|
|
|
551
534
|
style: (0, _commonUtil.pxToRem)({
|
|
552
535
|
gap: MOBILE_IMG_SIZE[colNum].gap
|
|
553
536
|
})
|
|
554
|
-
},
|
|
537
|
+
}, _groupSource.map(function (item) {
|
|
555
538
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
556
539
|
key: item.id,
|
|
557
540
|
className: "item-wrap",
|
|
@@ -561,7 +544,7 @@ function (_super) {
|
|
|
561
544
|
}, getItemContent(item));
|
|
562
545
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
563
546
|
className: "carousel-layout"
|
|
564
|
-
}, data.setting.navigation.open &&
|
|
547
|
+
}, data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
565
548
|
className: "carousel-icon-left",
|
|
566
549
|
onClick: function onClick() {
|
|
567
550
|
return _this.carouselRef.current.toPrev();
|
|
@@ -579,16 +562,16 @@ function (_super) {
|
|
|
579
562
|
sliderIndex: index
|
|
580
563
|
});
|
|
581
564
|
}
|
|
582
|
-
},
|
|
583
|
-
var preItemFirst =
|
|
584
|
-
var preItemLast =
|
|
585
|
-
var preItem = index === 0 ? preItemFirst :
|
|
586
|
-
var nextItem = index ===
|
|
565
|
+
}, _groupSource.map(function (item, index) {
|
|
566
|
+
var preItemFirst = _groupSource.length > 1 ? _groupSource[_groupSource.length - 1] : null;
|
|
567
|
+
var preItemLast = _groupSource.length > 1 ? _groupSource[0] : null;
|
|
568
|
+
var preItem = index === 0 ? preItemFirst : _groupSource[index - 1];
|
|
569
|
+
var nextItem = index === _groupSource.length - 1 ? preItemLast : _groupSource[index + 1];
|
|
587
570
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
588
571
|
key: item.id,
|
|
589
572
|
className: "item-wrap"
|
|
590
573
|
}, getItemContent(item, preItem, nextItem));
|
|
591
|
-
})), data.setting.navigation.open &&
|
|
574
|
+
})), data.setting.navigation.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
592
575
|
className: "carousel-icon-right",
|
|
593
576
|
onClick: function onClick() {
|
|
594
577
|
return _this.carouselRef.current.toNext();
|
|
@@ -597,9 +580,9 @@ function (_super) {
|
|
|
597
580
|
onMouseLeave: this.mouseLeaveBtn,
|
|
598
581
|
style: navStyle,
|
|
599
582
|
type: "icon-right"
|
|
600
|
-
}), data.setting.dots.open &&
|
|
583
|
+
}), data.setting.dots.open && _groupSource.length > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
601
584
|
className: "swiper-ban"
|
|
602
|
-
},
|
|
585
|
+
}, _groupSource.map(function (item, i) {
|
|
603
586
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
604
587
|
key: i,
|
|
605
588
|
className: (0, _classnames["default"])('ban', {
|
|
@@ -0,0 +1,148 @@
|
|
|
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 _base = require("../../../../assets/images/base64");
|
|
11
|
+
|
|
12
|
+
var walletDataList = [{
|
|
13
|
+
name: 'Saldo',
|
|
14
|
+
icon: _base.walletSaldoIcon,
|
|
15
|
+
text: 'Rincian Saldo'
|
|
16
|
+
}, {
|
|
17
|
+
name: 'Koin',
|
|
18
|
+
icon: _base.walletKoinIcon,
|
|
19
|
+
text: 'Rincian Koin'
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Voucher',
|
|
22
|
+
icon: _base.walletVoucherIcon,
|
|
23
|
+
text: 'Diskon sd 50%'
|
|
24
|
+
}];
|
|
25
|
+
|
|
26
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
27
|
+
var groupId = (0, _uuid.v4)();
|
|
28
|
+
return {
|
|
29
|
+
id: groupId,
|
|
30
|
+
type: 'WALLET_NURI',
|
|
31
|
+
groupSource: walletDataList.map(function (item) {
|
|
32
|
+
var itemId = (0, _uuid.v4)();
|
|
33
|
+
return {
|
|
34
|
+
id: itemId,
|
|
35
|
+
parentId: groupId,
|
|
36
|
+
logo: {
|
|
37
|
+
parentId: itemId,
|
|
38
|
+
id: (0, _uuid.v4)(),
|
|
39
|
+
open: true,
|
|
40
|
+
content: {
|
|
41
|
+
clickUrl: '',
|
|
42
|
+
h5ImgSrc: item.icon,
|
|
43
|
+
h5Name: ''
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
title: {
|
|
47
|
+
parentId: itemId,
|
|
48
|
+
id: (0, _uuid.v4)(),
|
|
49
|
+
open: true,
|
|
50
|
+
type: 'TEXT',
|
|
51
|
+
specialContent: [],
|
|
52
|
+
text: item.name,
|
|
53
|
+
content: {
|
|
54
|
+
sizeType: 'Customize font styles',
|
|
55
|
+
fontFamily: 'Open Sans',
|
|
56
|
+
fontWeight: 400,
|
|
57
|
+
fontSize: 11,
|
|
58
|
+
color: '#232F46',
|
|
59
|
+
textAlign: 'center'
|
|
60
|
+
},
|
|
61
|
+
underline: {
|
|
62
|
+
open: false,
|
|
63
|
+
textDecorationColor: '',
|
|
64
|
+
textDecorationStyle: 'solid'
|
|
65
|
+
},
|
|
66
|
+
vertical: {}
|
|
67
|
+
},
|
|
68
|
+
amount: {
|
|
69
|
+
parentId: itemId,
|
|
70
|
+
id: (0, _uuid.v4)(),
|
|
71
|
+
open: true,
|
|
72
|
+
type: 'TEXT',
|
|
73
|
+
specialContent: [],
|
|
74
|
+
text: '****',
|
|
75
|
+
content: {
|
|
76
|
+
sizeType: 'Customize font styles',
|
|
77
|
+
fontFamily: 'Open Sans',
|
|
78
|
+
fontWeight: 700,
|
|
79
|
+
fontSize: 14,
|
|
80
|
+
color: '#232F46',
|
|
81
|
+
textAlign: ''
|
|
82
|
+
},
|
|
83
|
+
underline: {
|
|
84
|
+
open: false,
|
|
85
|
+
textDecorationColor: '',
|
|
86
|
+
textDecorationStyle: 'solid'
|
|
87
|
+
},
|
|
88
|
+
vertical: {}
|
|
89
|
+
},
|
|
90
|
+
text: {
|
|
91
|
+
parentId: itemId,
|
|
92
|
+
id: (0, _uuid.v4)(),
|
|
93
|
+
open: true,
|
|
94
|
+
type: 'TEXT',
|
|
95
|
+
specialContent: [],
|
|
96
|
+
text: item.text,
|
|
97
|
+
content: {
|
|
98
|
+
sizeType: 'Customize font styles',
|
|
99
|
+
fontFamily: 'Open Sans',
|
|
100
|
+
fontWeight: 400,
|
|
101
|
+
fontSize: 11,
|
|
102
|
+
color: '#232F46',
|
|
103
|
+
textAlign: ''
|
|
104
|
+
},
|
|
105
|
+
underline: {
|
|
106
|
+
open: false,
|
|
107
|
+
textDecorationColor: '',
|
|
108
|
+
textDecorationStyle: 'solid'
|
|
109
|
+
},
|
|
110
|
+
vertical: {}
|
|
111
|
+
},
|
|
112
|
+
tip: {
|
|
113
|
+
parentId: itemId,
|
|
114
|
+
id: (0, _uuid.v4)(),
|
|
115
|
+
open: true,
|
|
116
|
+
url: ''
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}),
|
|
120
|
+
spacing: {
|
|
121
|
+
pc: {
|
|
122
|
+
paddingTop: 12,
|
|
123
|
+
paddingBottom: 12,
|
|
124
|
+
paddingLeft: 10,
|
|
125
|
+
paddingRight: 10,
|
|
126
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
127
|
+
},
|
|
128
|
+
mobile: {
|
|
129
|
+
paddingTop: 12,
|
|
130
|
+
paddingBottom: 12,
|
|
131
|
+
paddingLeft: 10,
|
|
132
|
+
paddingRight: 10,
|
|
133
|
+
marginBottom: window.magicDesign.compSpacing
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
customize: {
|
|
137
|
+
layout: 'layout1'
|
|
138
|
+
},
|
|
139
|
+
background: {
|
|
140
|
+
opacity: 100,
|
|
141
|
+
color: '#FFF8F0',
|
|
142
|
+
image: '',
|
|
143
|
+
bgType: 'color'
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,84 @@
|
|
|
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 _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
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--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var Wallet =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(Wallet, _super);
|
|
64
|
+
|
|
65
|
+
function Wallet() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Wallet.prototype.render = function () {
|
|
70
|
+
var nodeData = this.props.nodeData;
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
72
|
+
data: nodeData
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
Wallet.defaultProps = {};
|
|
77
|
+
Wallet.type = 'WALLET_NURI';
|
|
78
|
+
Wallet.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
79
|
+
Wallet = __decorate([_compositeDecorator["default"]], Wallet);
|
|
80
|
+
return Wallet;
|
|
81
|
+
}(_react.Component);
|
|
82
|
+
|
|
83
|
+
var _default = Wallet;
|
|
84
|
+
exports["default"] = _default;
|