@fonixtree/magic-design 2.0.47 → 2.0.48
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/common/CardCarousel/index.less +1 -2
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +15 -17
- package/es/core/Renderer/index.js +1 -2
- package/lib/common/CardCarousel/index.less +1 -2
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +15 -17
- package/lib/core/Renderer/index.js +1 -2
- package/package.json +1 -1
|
@@ -313,13 +313,13 @@ function (_super) {
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
316
|
-
return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
316
|
+
return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
317
317
|
});
|
|
318
318
|
creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
319
|
-
return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
319
|
+
return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
320
320
|
});
|
|
321
321
|
B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
322
|
-
return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
322
|
+
return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
323
323
|
});
|
|
324
324
|
this.setState({
|
|
325
325
|
userWalletData: (_b = {}, _b[_constants.walletType.BNPL] = {
|
|
@@ -328,16 +328,16 @@ function (_super) {
|
|
|
328
328
|
amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
|
|
329
329
|
}, _b[_constants.walletType.B2B] = {
|
|
330
330
|
amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
|
|
331
|
-
text: B2BObj ? 'Add
|
|
332
|
-
btnText: 'Procure Product'
|
|
331
|
+
text: B2BObj ? 'Add more products to your shop!' : '',
|
|
332
|
+
btnText: B2BObj ? 'Procure Product' : ''
|
|
333
333
|
}, _b[_constants.walletType.CASHBACK] = {
|
|
334
334
|
amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
|
|
335
335
|
}, _b[_constants.walletType.BALANCE] = {
|
|
336
336
|
amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
|
|
337
|
-
btnText: 'Social Commerce'
|
|
337
|
+
btnText: userBalance ? 'Social Commerce' : ''
|
|
338
338
|
}, _b[_constants.walletType.CENDUIT] = {
|
|
339
|
-
amount: userPoint === null ? '****' :
|
|
340
|
-
btnText: 'Cenduit Mall'
|
|
339
|
+
amount: userPoint === null ? '****' : userPoint,
|
|
340
|
+
btnText: userPoint ? 'Cenduit Mall' : ''
|
|
341
341
|
}, _b)
|
|
342
342
|
});
|
|
343
343
|
return [2
|
|
@@ -461,36 +461,34 @@ function (_super) {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
+
item.text.text = ((_a = userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.text) || 'Make money and shop on Cendol!';
|
|
464
465
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
465
466
|
className: "text-content",
|
|
466
467
|
style: _bgStyle
|
|
467
|
-
}, ((
|
|
468
|
+
}, ((_b = item.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
468
469
|
className: "title",
|
|
469
470
|
data: item.title,
|
|
470
471
|
GAData: __assign(__assign({}, GAData), {
|
|
471
472
|
groupId: item.id,
|
|
472
473
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
473
474
|
})
|
|
474
|
-
}), ((
|
|
475
|
+
}), ((_c = item.amount) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
475
476
|
className: "amount",
|
|
476
477
|
data: __assign(__assign({}, item.amount), {
|
|
477
|
-
text: (
|
|
478
|
+
text: (_d = userWalletData[item.sourceType]) === null || _d === void 0 ? void 0 : _d.amount
|
|
478
479
|
}),
|
|
479
480
|
GAData: __assign(__assign({}, GAData), {
|
|
480
481
|
groupId: item.id,
|
|
481
482
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
482
483
|
}),
|
|
483
484
|
readonly: true
|
|
484
|
-
}), ((
|
|
485
|
+
}), ((_e = item.text) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
485
486
|
className: "text",
|
|
486
|
-
data:
|
|
487
|
-
text: ((_e = userWalletData[item.sourceType]) === null || _e === void 0 ? void 0 : _e.text) || 'Make money and shop on Cendol!'
|
|
488
|
-
}),
|
|
487
|
+
data: item.text,
|
|
489
488
|
GAData: __assign(__assign({}, GAData), {
|
|
490
489
|
groupId: item.id,
|
|
491
490
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
492
|
-
})
|
|
493
|
-
readonly: true
|
|
491
|
+
})
|
|
494
492
|
}), ((_f = item.button) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
495
493
|
className: "wallet-btn",
|
|
496
494
|
data: __assign(__assign({}, item.button), {
|
|
@@ -102,8 +102,7 @@ var Renderer = function Renderer(props) {
|
|
|
102
102
|
magic_design: "",
|
|
103
103
|
style: {
|
|
104
104
|
height: '100%',
|
|
105
|
-
background: pageBackground
|
|
106
|
-
overflow: 'auto'
|
|
105
|
+
background: pageBackground
|
|
107
106
|
}
|
|
108
107
|
}, floors.length > 0 && floors.map(function (nodeData, moduleIndex) {
|
|
109
108
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
@@ -313,13 +313,13 @@ function (_super) {
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
316
|
-
return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
316
|
+
return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
317
317
|
});
|
|
318
318
|
creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
319
|
-
return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
319
|
+
return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
320
320
|
});
|
|
321
321
|
B2BObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
322
|
-
return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY
|
|
322
|
+
return item.creditId === 3 && [_constants.CREDIT_STATE.APPROVED.KEY].includes(item.state);
|
|
323
323
|
});
|
|
324
324
|
this.setState({
|
|
325
325
|
userWalletData: (_b = {}, _b[_constants.walletType.BNPL] = {
|
|
@@ -328,16 +328,16 @@ function (_super) {
|
|
|
328
328
|
amount: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY'
|
|
329
329
|
}, _b[_constants.walletType.B2B] = {
|
|
330
330
|
amount: userCreditResps === null ? '****' : B2BObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(B2BObj.availableAmount) : 'APPLY',
|
|
331
|
-
text: B2BObj ? 'Add
|
|
332
|
-
btnText: 'Procure Product'
|
|
331
|
+
text: B2BObj ? 'Add more products to your shop!' : '',
|
|
332
|
+
btnText: B2BObj ? 'Procure Product' : ''
|
|
333
333
|
}, _b[_constants.walletType.CASHBACK] = {
|
|
334
334
|
amount: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues)
|
|
335
335
|
}, _b[_constants.walletType.BALANCE] = {
|
|
336
336
|
amount: userBalance === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userBalance),
|
|
337
|
-
btnText: 'Social Commerce'
|
|
337
|
+
btnText: userBalance ? 'Social Commerce' : ''
|
|
338
338
|
}, _b[_constants.walletType.CENDUIT] = {
|
|
339
|
-
amount: userPoint === null ? '****' :
|
|
340
|
-
btnText: 'Cenduit Mall'
|
|
339
|
+
amount: userPoint === null ? '****' : userPoint,
|
|
340
|
+
btnText: userPoint ? 'Cenduit Mall' : ''
|
|
341
341
|
}, _b)
|
|
342
342
|
});
|
|
343
343
|
return [2
|
|
@@ -461,36 +461,34 @@ function (_super) {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
+
item.text.text = ((_a = userWalletData[item.sourceType]) === null || _a === void 0 ? void 0 : _a.text) || 'Make money and shop on Cendol!';
|
|
464
465
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
465
466
|
className: "text-content",
|
|
466
467
|
style: _bgStyle
|
|
467
|
-
}, ((
|
|
468
|
+
}, ((_b = item.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
468
469
|
className: "title",
|
|
469
470
|
data: item.title,
|
|
470
471
|
GAData: __assign(__assign({}, GAData), {
|
|
471
472
|
groupId: item.id,
|
|
472
473
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
473
474
|
})
|
|
474
|
-
}), ((
|
|
475
|
+
}), ((_c = item.amount) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
475
476
|
className: "amount",
|
|
476
477
|
data: __assign(__assign({}, item.amount), {
|
|
477
|
-
text: (
|
|
478
|
+
text: (_d = userWalletData[item.sourceType]) === null || _d === void 0 ? void 0 : _d.amount
|
|
478
479
|
}),
|
|
479
480
|
GAData: __assign(__assign({}, GAData), {
|
|
480
481
|
groupId: item.id,
|
|
481
482
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
482
483
|
}),
|
|
483
484
|
readonly: true
|
|
484
|
-
}), ((
|
|
485
|
+
}), ((_e = item.text) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
485
486
|
className: "text",
|
|
486
|
-
data:
|
|
487
|
-
text: ((_e = userWalletData[item.sourceType]) === null || _e === void 0 ? void 0 : _e.text) || 'Make money and shop on Cendol!'
|
|
488
|
-
}),
|
|
487
|
+
data: item.text,
|
|
489
488
|
GAData: __assign(__assign({}, GAData), {
|
|
490
489
|
groupId: item.id,
|
|
491
490
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
492
|
-
})
|
|
493
|
-
readonly: true
|
|
491
|
+
})
|
|
494
492
|
}), ((_f = item.button) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
495
493
|
className: "wallet-btn",
|
|
496
494
|
data: __assign(__assign({}, item.button), {
|
|
@@ -102,8 +102,7 @@ var Renderer = function Renderer(props) {
|
|
|
102
102
|
magic_design: "",
|
|
103
103
|
style: {
|
|
104
104
|
height: '100%',
|
|
105
|
-
background: pageBackground
|
|
106
|
-
overflow: 'auto'
|
|
105
|
+
background: pageBackground
|
|
107
106
|
}
|
|
108
107
|
}, floors.length > 0 && floors.map(function (nodeData, moduleIndex) {
|
|
109
108
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|