@fonixtree/magic-design 0.2.3 → 0.2.6
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/common/LinkModal/CustomTable/index.js +1 -0
- package/es/common/MyModal/index.less +12 -4
- package/es/composite-comp/ashita/components/WalletAshita/defaultJSON.js +250 -0
- package/es/composite-comp/ashita/components/WalletAshita/index.js +84 -0
- package/es/composite-comp/ashita/components/WalletAshita/mobile/index.js +613 -0
- package/es/composite-comp/ashita/components/WalletAshita/mobile/index.less +103 -0
- package/es/composite-comp/ashita/components/WalletAshita/pc/index.js +359 -0
- package/es/composite-comp/ashita/components/WalletAshita/pc/index.less +1 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.js +93 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.less +0 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.js +145 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.js +201 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.less +9 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/index.js +77 -0
- package/es/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.js +188 -0
- package/es/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.less +9 -0
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
- package/es/composite-comp/public/components/Wallet/defaultJSON.js +145 -0
- package/es/composite-comp/public/components/Wallet/index.js +84 -0
- package/es/composite-comp/public/components/Wallet/mobile/index.js +350 -0
- package/es/composite-comp/public/components/Wallet/mobile/index.less +22 -0
- package/es/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
- package/es/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
- package/es/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
- package/es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +123 -0
- package/es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
- package/es/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
- package/es/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
- package/es/constants/component-types.js +15 -9
- package/es/constants/index.js +19 -10
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/LinkModal/CustomTable/index.js +1 -0
- package/lib/common/MyModal/index.less +12 -4
- package/lib/composite-comp/ashita/components/WalletAshita/defaultJSON.js +250 -0
- package/lib/composite-comp/ashita/components/WalletAshita/index.js +84 -0
- package/lib/composite-comp/ashita/components/WalletAshita/mobile/index.js +613 -0
- package/lib/composite-comp/ashita/components/WalletAshita/mobile/index.less +103 -0
- package/lib/composite-comp/ashita/components/WalletAshita/pc/index.js +359 -0
- package/lib/composite-comp/ashita/components/WalletAshita/pc/index.less +1 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.js +93 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.less +0 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.js +145 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.js +201 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigSetting/index.less +9 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/index.js +77 -0
- package/lib/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.js +188 -0
- package/lib/composite-comp/ashita/second-config-panels/WalletAshitaSecondConfig/index.less +9 -0
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
- package/lib/composite-comp/public/components/Wallet/defaultJSON.js +145 -0
- package/lib/composite-comp/public/components/Wallet/index.js +84 -0
- package/lib/composite-comp/public/components/Wallet/mobile/index.js +350 -0
- package/lib/composite-comp/public/components/Wallet/mobile/index.less +22 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +123 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
- package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
- package/lib/constants/component-types.js +15 -9
- package/lib/constants/index.js +19 -10
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.m-Wallet-mobile .headline {
|
|
2
|
+
margin-bottom: 0.14rem;
|
|
3
|
+
}
|
|
4
|
+
.m-Wallet-mobile .item-wrap .text-content {
|
|
5
|
+
position: relative !important;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
border-radius: 0.2rem;
|
|
11
|
+
padding: 0.2rem 0.8rem 1.16rem 0.8rem;
|
|
12
|
+
}
|
|
13
|
+
.m-Wallet-mobile .item-wrap .text-content .wallet-btn {
|
|
14
|
+
margin-top: 0.2rem;
|
|
15
|
+
}
|
|
16
|
+
.m-Wallet-mobile .item-wrap .text-content .peek {
|
|
17
|
+
position: absolute;
|
|
18
|
+
bottom: 0.16rem;
|
|
19
|
+
width: 1.2rem !important;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
}
|
|
22
|
+
.m-Wallet-mobile .item-wrap .text-content .peek.left {
|
|
23
|
+
left: 0.8rem;
|
|
24
|
+
}
|
|
25
|
+
.m-Wallet-mobile .item-wrap .text-content .peek.right {
|
|
26
|
+
right: 0.8rem;
|
|
27
|
+
}
|
|
28
|
+
.m-Wallet-mobile .column-layout {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
}
|
|
33
|
+
.m-Wallet-mobile .column-layout .text-content {
|
|
34
|
+
padding: 0.2rem 0 0.2rem 0;
|
|
35
|
+
}
|
|
36
|
+
.m-Wallet-mobile .column-layout .text-content .wallet-btn {
|
|
37
|
+
margin-top: 0.2rem;
|
|
38
|
+
}
|
|
39
|
+
.m-Wallet-mobile .column-layout .text-content .peek {
|
|
40
|
+
bottom: 0.2rem;
|
|
41
|
+
}
|
|
42
|
+
.m-Wallet-mobile .column-layout .text-content .peek.left {
|
|
43
|
+
left: 0.32rem;
|
|
44
|
+
}
|
|
45
|
+
.m-Wallet-mobile .column-layout .text-content .peek.right {
|
|
46
|
+
right: 0.32rem;
|
|
47
|
+
}
|
|
48
|
+
.m-Wallet-mobile .carousel-layout {
|
|
49
|
+
position: relative;
|
|
50
|
+
min-height: 4.8rem;
|
|
51
|
+
}
|
|
52
|
+
.m-Wallet-mobile .carousel-layout .slick-track {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
.m-Wallet-mobile .carousel-layout .carousel-icon-left {
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: 0.32rem;
|
|
60
|
+
top: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
margin: auto;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
z-index: 20;
|
|
65
|
+
}
|
|
66
|
+
.m-Wallet-mobile .carousel-layout .carousel-icon-right {
|
|
67
|
+
position: absolute;
|
|
68
|
+
right: 0.32rem;
|
|
69
|
+
top: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
margin: auto;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
z-index: 20;
|
|
74
|
+
}
|
|
75
|
+
.m-Wallet-mobile .carousel-layout .swiper-ban {
|
|
76
|
+
position: absolute;
|
|
77
|
+
width: 100%;
|
|
78
|
+
bottom: 0.72rem;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
z-index: 20;
|
|
83
|
+
}
|
|
84
|
+
.m-Wallet-mobile .carousel-layout .swiper-ban .ban {
|
|
85
|
+
font-size: 0.16rem;
|
|
86
|
+
width: 1em;
|
|
87
|
+
height: 1em;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
background-color: #FFF;
|
|
90
|
+
cursor: inherit;
|
|
91
|
+
margin-right: 0.2rem;
|
|
92
|
+
transition: all 0.5s;
|
|
93
|
+
opacity: 0.4;
|
|
94
|
+
}
|
|
95
|
+
.m-Wallet-mobile .carousel-layout .swiper-ban .ban:last-child {
|
|
96
|
+
margin-right: 0;
|
|
97
|
+
}
|
|
98
|
+
.m-Wallet-mobile .carousel-layout .swiper-ban .ban.active {
|
|
99
|
+
width: 2em;
|
|
100
|
+
height: 1em;
|
|
101
|
+
border-radius: 2rem;
|
|
102
|
+
opacity: 1;
|
|
103
|
+
}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _components = require("../../../../../meta-comp/components");
|
|
11
|
+
|
|
12
|
+
var _constants = require("../../../../../constants");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _currencyUtil = require("../../../../../utils/currencyUtil");
|
|
17
|
+
|
|
18
|
+
var _ConfigPanel = require("../../../../../core/Designer/ConfigPanel");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
+
__proto__: []
|
|
26
|
+
} instanceof Array && function (d, b) {
|
|
27
|
+
d.__proto__ = b;
|
|
28
|
+
} || function (d, b) {
|
|
29
|
+
for (var p in b) {
|
|
30
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return _extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return function (d, b) {
|
|
38
|
+
_extendStatics(d, b);
|
|
39
|
+
|
|
40
|
+
function __() {
|
|
41
|
+
this.constructor = d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
49
|
+
__assign = Object.assign || function (t) {
|
|
50
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
51
|
+
s = arguments[i];
|
|
52
|
+
|
|
53
|
+
for (var p in s) {
|
|
54
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return __assign.apply(this, arguments);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
65
|
+
function adopt(value) {
|
|
66
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
67
|
+
resolve(value);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
72
|
+
function fulfilled(value) {
|
|
73
|
+
try {
|
|
74
|
+
step(generator.next(value));
|
|
75
|
+
} catch (e) {
|
|
76
|
+
reject(e);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function rejected(value) {
|
|
81
|
+
try {
|
|
82
|
+
step(generator["throw"](value));
|
|
83
|
+
} catch (e) {
|
|
84
|
+
reject(e);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function step(result) {
|
|
89
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
97
|
+
var _ = {
|
|
98
|
+
label: 0,
|
|
99
|
+
sent: function sent() {
|
|
100
|
+
if (t[0] & 1) throw t[1];
|
|
101
|
+
return t[1];
|
|
102
|
+
},
|
|
103
|
+
trys: [],
|
|
104
|
+
ops: []
|
|
105
|
+
},
|
|
106
|
+
f,
|
|
107
|
+
y,
|
|
108
|
+
t,
|
|
109
|
+
g;
|
|
110
|
+
return g = {
|
|
111
|
+
next: verb(0),
|
|
112
|
+
"throw": verb(1),
|
|
113
|
+
"return": verb(2)
|
|
114
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
115
|
+
return this;
|
|
116
|
+
}), g;
|
|
117
|
+
|
|
118
|
+
function verb(n) {
|
|
119
|
+
return function (v) {
|
|
120
|
+
return step([n, v]);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function step(op) {
|
|
125
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
126
|
+
|
|
127
|
+
while (_) {
|
|
128
|
+
try {
|
|
129
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
130
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
131
|
+
|
|
132
|
+
switch (op[0]) {
|
|
133
|
+
case 0:
|
|
134
|
+
case 1:
|
|
135
|
+
t = op;
|
|
136
|
+
break;
|
|
137
|
+
|
|
138
|
+
case 4:
|
|
139
|
+
_.label++;
|
|
140
|
+
return {
|
|
141
|
+
value: op[1],
|
|
142
|
+
done: false
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
case 5:
|
|
146
|
+
_.label++;
|
|
147
|
+
y = op[1];
|
|
148
|
+
op = [0];
|
|
149
|
+
continue;
|
|
150
|
+
|
|
151
|
+
case 7:
|
|
152
|
+
op = _.ops.pop();
|
|
153
|
+
|
|
154
|
+
_.trys.pop();
|
|
155
|
+
|
|
156
|
+
continue;
|
|
157
|
+
|
|
158
|
+
default:
|
|
159
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
160
|
+
_ = 0;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
165
|
+
_.label = op[1];
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
170
|
+
_.label = t[1];
|
|
171
|
+
t = op;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (t && _.label < t[2]) {
|
|
176
|
+
_.label = t[2];
|
|
177
|
+
|
|
178
|
+
_.ops.push(op);
|
|
179
|
+
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (t[2]) _.ops.pop();
|
|
184
|
+
|
|
185
|
+
_.trys.pop();
|
|
186
|
+
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
op = body.call(thisArg, _);
|
|
191
|
+
} catch (e) {
|
|
192
|
+
op = [6, e];
|
|
193
|
+
y = 0;
|
|
194
|
+
} finally {
|
|
195
|
+
f = t = 0;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (op[0] & 5) throw op[1];
|
|
200
|
+
return {
|
|
201
|
+
value: op[0] ? op[1] : void 0,
|
|
202
|
+
done: true
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
var MOBILE_IMG_SIZE = {
|
|
208
|
+
2: {
|
|
209
|
+
maxW: 628,
|
|
210
|
+
maxH: 168,
|
|
211
|
+
gap: 24
|
|
212
|
+
},
|
|
213
|
+
3: {
|
|
214
|
+
maxW: 410,
|
|
215
|
+
maxH: 148,
|
|
216
|
+
gap: 24
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
var WalletPc =
|
|
221
|
+
/** @class */
|
|
222
|
+
function (_super) {
|
|
223
|
+
__extends(WalletPc, _super);
|
|
224
|
+
|
|
225
|
+
function WalletPc() {
|
|
226
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
227
|
+
|
|
228
|
+
_this.state = {
|
|
229
|
+
cashback: 0,
|
|
230
|
+
credit: 0,
|
|
231
|
+
bnpl: 0
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
_this.getMyWalletData = function () {
|
|
235
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
236
|
+
var _a, userCreditResps, userCashbackValues, creditObj, bnplObj;
|
|
237
|
+
|
|
238
|
+
return __generator(this, function (_b) {
|
|
239
|
+
switch (_b.label) {
|
|
240
|
+
case 0:
|
|
241
|
+
return [4
|
|
242
|
+
/*yield*/
|
|
243
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/mywallet/list', {}, 'GET')];
|
|
244
|
+
|
|
245
|
+
case 1:
|
|
246
|
+
_a = _b.sent(), userCreditResps = _a.userCreditResps, userCashbackValues = _a.userCashbackValues;
|
|
247
|
+
creditObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
248
|
+
return item.creditId === 2 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
|
|
249
|
+
});
|
|
250
|
+
bnplObj = userCreditResps === null || userCreditResps === void 0 ? void 0 : userCreditResps.find(function (item) {
|
|
251
|
+
return item.creditId === 1 && [_constants.CREDIT_STATE.APPROVED.KEY, _constants.CREDIT_STATE.LOCKED.KEY].includes(item.state);
|
|
252
|
+
});
|
|
253
|
+
this.setState({
|
|
254
|
+
cashback: userCashbackValues === null ? '****' : (0, _currencyUtil.formatCurrencyWithSymbol)(userCashbackValues),
|
|
255
|
+
credit: userCreditResps === null ? '****' : creditObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(creditObj.availableAmount) : 'APPLY',
|
|
256
|
+
bnpl: userCreditResps === null ? '****' : bnplObj ? (0, _currencyUtil.formatCurrencyWithSymbol)(bnplObj.availableAmount) : 'APPLY'
|
|
257
|
+
});
|
|
258
|
+
return [2
|
|
259
|
+
/*return*/
|
|
260
|
+
];
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
_this.getAmount = function (type) {
|
|
267
|
+
var _a = _this.state,
|
|
268
|
+
cashback = _a.cashback,
|
|
269
|
+
credit = _a.credit,
|
|
270
|
+
bnpl = _a.bnpl;
|
|
271
|
+
if (type === 'Cashback') return cashback;
|
|
272
|
+
if (type === 'Credit') return credit;
|
|
273
|
+
if (type === 'BNPL') return bnpl;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
return _this;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
WalletPc.prototype.componentDidMount = function () {
|
|
280
|
+
this.getMyWalletData();
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
WalletPc.prototype.render = function () {
|
|
284
|
+
var _this = this;
|
|
285
|
+
|
|
286
|
+
var data = this.props.data;
|
|
287
|
+
var GAData = (0, _commonUtil.getGAData)(data);
|
|
288
|
+
var colNum = data.customize.pcRowNum;
|
|
289
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
290
|
+
className: "m-Wallet-pc"
|
|
291
|
+
}, data.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
292
|
+
className: "headline",
|
|
293
|
+
data: data.title.headline
|
|
294
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
295
|
+
className: "content column_" + colNum,
|
|
296
|
+
style: {
|
|
297
|
+
gap: MOBILE_IMG_SIZE[colNum].gap
|
|
298
|
+
}
|
|
299
|
+
}, data.groupSource.map(function (item) {
|
|
300
|
+
var _amount = _this.getAmount(item.sourceType);
|
|
301
|
+
|
|
302
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
303
|
+
key: item.id,
|
|
304
|
+
className: "item-wrap",
|
|
305
|
+
onMouseEnter: function onMouseEnter() {
|
|
306
|
+
var _a;
|
|
307
|
+
|
|
308
|
+
return _this.setState((_a = {}, _a["hover_" + item.id] = true, _a));
|
|
309
|
+
},
|
|
310
|
+
onMouseLeave: function onMouseLeave() {
|
|
311
|
+
var _a;
|
|
312
|
+
|
|
313
|
+
return _this.setState((_a = {}, _a["hover_" + item.id] = false, _a));
|
|
314
|
+
},
|
|
315
|
+
style: {
|
|
316
|
+
width: "calc((100% - " + MOBILE_IMG_SIZE[colNum].gap * (colNum - 1) + "px) / " + colNum + ")"
|
|
317
|
+
}
|
|
318
|
+
}, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
319
|
+
className: "image",
|
|
320
|
+
data: item.hover.open && item.hover.image.open && _this.state["hover_" + item.id] ? item.hover.image : item.image,
|
|
321
|
+
GAData: __assign(__assign({}, GAData), {
|
|
322
|
+
groupId: item.id,
|
|
323
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
324
|
+
}) // maxHeight={MOBILE_IMG_SIZE[colNum].maxH}
|
|
325
|
+
,
|
|
326
|
+
maxWidth: "100%"
|
|
327
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
328
|
+
className: "text-content"
|
|
329
|
+
}, item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
330
|
+
className: "title",
|
|
331
|
+
data: item.hover.open && item.hover.title.open && _this.state["hover_" + item.id] ? item.hover.title : item.title,
|
|
332
|
+
GAData: __assign(__assign({}, GAData), {
|
|
333
|
+
groupId: item.id,
|
|
334
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
335
|
+
})
|
|
336
|
+
}), item.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
337
|
+
className: "amount",
|
|
338
|
+
data: __assign(__assign({}, item.hover.open && item.hover.amount.open && _this.state["hover_" + item.id] ? item.hover.amount : item.amount), {
|
|
339
|
+
text: _amount
|
|
340
|
+
}),
|
|
341
|
+
GAData: __assign(__assign({}, GAData), {
|
|
342
|
+
groupId: item.id,
|
|
343
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
344
|
+
}),
|
|
345
|
+
readonly: true
|
|
346
|
+
})));
|
|
347
|
+
})));
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
WalletPc.defaultProps = {
|
|
351
|
+
data: {
|
|
352
|
+
groupSource: []
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
return WalletPc;
|
|
356
|
+
}(_react["default"].Component);
|
|
357
|
+
|
|
358
|
+
var _default = WalletPc;
|
|
359
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.m-Wallet-pc {}
|
package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
11
|
+
|
|
12
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../../common");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../../../../../locale");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
|
|
46
|
+
var AComponent =
|
|
47
|
+
/** @class */
|
|
48
|
+
function (_super) {
|
|
49
|
+
__extends(AComponent, _super);
|
|
50
|
+
|
|
51
|
+
function AComponent() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
|
|
54
|
+
_this.state = {};
|
|
55
|
+
|
|
56
|
+
_this.reRender = function () {
|
|
57
|
+
(0, _coreUtil.renderPreview)();
|
|
58
|
+
|
|
59
|
+
_this.setState({});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
AComponent.prototype.render = function () {
|
|
66
|
+
var panelProps = this.props.panelProps;
|
|
67
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
|
+
className: "recommend_content"
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
70
|
+
headerSize: "middle",
|
|
71
|
+
onRefresh: this.reRender,
|
|
72
|
+
source: [{
|
|
73
|
+
key: '1',
|
|
74
|
+
name: (0, _locale.i18n)('HEADLINE'),
|
|
75
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
76
|
+
data: panelProps.headline
|
|
77
|
+
}),
|
|
78
|
+
metaOption: panelProps.headline
|
|
79
|
+
}],
|
|
80
|
+
type: "switch"
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
AComponent.defaultProps = {
|
|
85
|
+
panelProps: {
|
|
86
|
+
headline: {}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return AComponent;
|
|
90
|
+
}(_react["default"].Component);
|
|
91
|
+
|
|
92
|
+
var _default = AComponent;
|
|
93
|
+
exports["default"] = _default;
|
package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigContent/index.less
ADDED
|
File without changes
|
package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
13
|
+
|
|
14
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
17
|
+
|
|
18
|
+
var _defaultJSON = require("../../../components/WalletAshita/defaultJSON");
|
|
19
|
+
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
22
|
+
var _decorator = require("../../../../../decorator");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = "Looks like you don't have any images in your gallery. Choose images to feature on this page.";
|
|
65
|
+
|
|
66
|
+
var AComponent =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(AComponent, _super);
|
|
70
|
+
|
|
71
|
+
function AComponent() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.imagesGroupSourceJSON)('', 'Tab');
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
(0, _coreUtil.renderPreview)();
|
|
94
|
+
|
|
95
|
+
_this.setState({});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return _this;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
AComponent.prototype.render = function () {
|
|
102
|
+
var _a = this.props.source,
|
|
103
|
+
source = _a === void 0 ? [] : _a;
|
|
104
|
+
|
|
105
|
+
var _renderCard = function renderCard(src) {
|
|
106
|
+
var _a;
|
|
107
|
+
|
|
108
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
|
+
className: "card_wrap"
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
|
+
className: "name"
|
|
112
|
+
}, (_a = src.title) === null || _a === void 0 ? void 0 : _a.text));
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
+
className: "WALLET_image"
|
|
117
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
+
className: "node_list"
|
|
119
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
120
|
+
className: "notice"
|
|
121
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
122
|
+
onClickItem: this.onClickItem,
|
|
123
|
+
renderCard: function renderCard(v) {
|
|
124
|
+
return _renderCard(v);
|
|
125
|
+
},
|
|
126
|
+
reRender: this.reRender,
|
|
127
|
+
source: source
|
|
128
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
129
|
+
className: "btn_wrap"
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
131
|
+
icon: "icon-add",
|
|
132
|
+
onClick: this.onAddClick,
|
|
133
|
+
type: "primary"
|
|
134
|
+
}, (0, _locale.i18n)('ADD_GROUP'))));
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
AComponent.defaultProps = {
|
|
138
|
+
source: []
|
|
139
|
+
};
|
|
140
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
141
|
+
return AComponent;
|
|
142
|
+
}(_react["default"].Component);
|
|
143
|
+
|
|
144
|
+
var _default = AComponent;
|
|
145
|
+
exports["default"] = _default;
|
package/es/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less
ADDED
|
File without changes
|