@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
|
@@ -0,0 +1,366 @@
|
|
|
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 _commonUtil = require("../../../../../utils/commonUtil");
|
|
13
|
+
|
|
14
|
+
var _ConfigPanel = require("../../../../../core/Designer/ConfigPanel");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _base = require("../../../../../assets/images/base64");
|
|
19
|
+
|
|
20
|
+
var _currencyUtil = require("../../../../../utils/currencyUtil");
|
|
21
|
+
|
|
22
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
23
|
+
|
|
24
|
+
var _mobx = require("../../../../../mobx");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 __assign = void 0 && (void 0).__assign || function () {
|
|
55
|
+
__assign = Object.assign || function (t) {
|
|
56
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
57
|
+
s = arguments[i];
|
|
58
|
+
|
|
59
|
+
for (var p in s) {
|
|
60
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return t;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return __assign.apply(this, arguments);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
71
|
+
function adopt(value) {
|
|
72
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
73
|
+
resolve(value);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
78
|
+
function fulfilled(value) {
|
|
79
|
+
try {
|
|
80
|
+
step(generator.next(value));
|
|
81
|
+
} catch (e) {
|
|
82
|
+
reject(e);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function rejected(value) {
|
|
87
|
+
try {
|
|
88
|
+
step(generator["throw"](value));
|
|
89
|
+
} catch (e) {
|
|
90
|
+
reject(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function step(result) {
|
|
95
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
103
|
+
var _ = {
|
|
104
|
+
label: 0,
|
|
105
|
+
sent: function sent() {
|
|
106
|
+
if (t[0] & 1) throw t[1];
|
|
107
|
+
return t[1];
|
|
108
|
+
},
|
|
109
|
+
trys: [],
|
|
110
|
+
ops: []
|
|
111
|
+
},
|
|
112
|
+
f,
|
|
113
|
+
y,
|
|
114
|
+
t,
|
|
115
|
+
g;
|
|
116
|
+
return g = {
|
|
117
|
+
next: verb(0),
|
|
118
|
+
"throw": verb(1),
|
|
119
|
+
"return": verb(2)
|
|
120
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
121
|
+
return this;
|
|
122
|
+
}), g;
|
|
123
|
+
|
|
124
|
+
function verb(n) {
|
|
125
|
+
return function (v) {
|
|
126
|
+
return step([n, v]);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function step(op) {
|
|
131
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
132
|
+
|
|
133
|
+
while (_) {
|
|
134
|
+
try {
|
|
135
|
+
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;
|
|
136
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
137
|
+
|
|
138
|
+
switch (op[0]) {
|
|
139
|
+
case 0:
|
|
140
|
+
case 1:
|
|
141
|
+
t = op;
|
|
142
|
+
break;
|
|
143
|
+
|
|
144
|
+
case 4:
|
|
145
|
+
_.label++;
|
|
146
|
+
return {
|
|
147
|
+
value: op[1],
|
|
148
|
+
done: false
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
case 5:
|
|
152
|
+
_.label++;
|
|
153
|
+
y = op[1];
|
|
154
|
+
op = [0];
|
|
155
|
+
continue;
|
|
156
|
+
|
|
157
|
+
case 7:
|
|
158
|
+
op = _.ops.pop();
|
|
159
|
+
|
|
160
|
+
_.trys.pop();
|
|
161
|
+
|
|
162
|
+
continue;
|
|
163
|
+
|
|
164
|
+
default:
|
|
165
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
166
|
+
_ = 0;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
171
|
+
_.label = op[1];
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
176
|
+
_.label = t[1];
|
|
177
|
+
t = op;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (t && _.label < t[2]) {
|
|
182
|
+
_.label = t[2];
|
|
183
|
+
|
|
184
|
+
_.ops.push(op);
|
|
185
|
+
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (t[2]) _.ops.pop();
|
|
190
|
+
|
|
191
|
+
_.trys.pop();
|
|
192
|
+
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
op = body.call(thisArg, _);
|
|
197
|
+
} catch (e) {
|
|
198
|
+
op = [6, e];
|
|
199
|
+
y = 0;
|
|
200
|
+
} finally {
|
|
201
|
+
f = t = 0;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (op[0] & 5) throw op[1];
|
|
206
|
+
return {
|
|
207
|
+
value: op[0] ? op[1] : void 0,
|
|
208
|
+
done: true
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var WalletNuriMobile =
|
|
214
|
+
/** @class */
|
|
215
|
+
function (_super) {
|
|
216
|
+
__extends(WalletNuriMobile, _super);
|
|
217
|
+
|
|
218
|
+
function WalletNuriMobile() {
|
|
219
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
220
|
+
|
|
221
|
+
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
222
|
+
_this.state = {
|
|
223
|
+
infoObj: null
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
_this.getInfo = function () {
|
|
227
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
228
|
+
var infoObj;
|
|
229
|
+
return __generator(this, function (_a) {
|
|
230
|
+
switch (_a.label) {
|
|
231
|
+
case 0:
|
|
232
|
+
return [4
|
|
233
|
+
/*yield*/
|
|
234
|
+
, (0, _commonUtil.commonFetch)('/designer/v1//h5/nuri/distribute/commission')];
|
|
235
|
+
|
|
236
|
+
case 1:
|
|
237
|
+
infoObj = _a.sent();
|
|
238
|
+
this.setState({
|
|
239
|
+
infoObj: infoObj
|
|
240
|
+
});
|
|
241
|
+
return [2
|
|
242
|
+
/*return*/
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
_this.formatAmount = function (info) {
|
|
250
|
+
var infoObj = _this.state.infoObj;
|
|
251
|
+
var amountTxt = '';
|
|
252
|
+
|
|
253
|
+
switch (info.title.text) {
|
|
254
|
+
case 'Saldo':
|
|
255
|
+
amountTxt = (0, _currencyUtil.formatCurrencyWithSymbolNotSpace)(infoObj.balance);
|
|
256
|
+
break;
|
|
257
|
+
|
|
258
|
+
case 'Koin':
|
|
259
|
+
amountTxt = (0, _currencyUtil.addSeparators)(infoObj.lockedPool, '.', '.');
|
|
260
|
+
break;
|
|
261
|
+
|
|
262
|
+
case 'Voucher':
|
|
263
|
+
amountTxt = infoObj.couponCnt + " Kupon";
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return amountTxt;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
_this.clickJump = function (title) {
|
|
271
|
+
if (title !== 'Voucher') {
|
|
272
|
+
(0, _coreUtil.clickUrl)('/main/my-commission');
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
_this.openTip = function (e, img, title) {
|
|
277
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
278
|
+
e.stopPropagation();
|
|
279
|
+
|
|
280
|
+
_mobx.frameStore.setState({
|
|
281
|
+
modalState: {
|
|
282
|
+
visible: true,
|
|
283
|
+
title: title,
|
|
284
|
+
messageImg: img
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
return _this;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
WalletNuriMobile.prototype.componentDidMount = function () {
|
|
294
|
+
if (localStorage.getItem('isLogin') === 'Y') {
|
|
295
|
+
this.getInfo();
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
WalletNuriMobile.prototype.render = function () {
|
|
300
|
+
var _this = this;
|
|
301
|
+
|
|
302
|
+
var data = this.props.data;
|
|
303
|
+
var infoObj = this.state.infoObj;
|
|
304
|
+
var GAData = (0, _commonUtil.getGAData)(data);
|
|
305
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
306
|
+
className: "m-wallet-nuri"
|
|
307
|
+
}, data.groupSource.map(function (group) {
|
|
308
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
309
|
+
key: group.id,
|
|
310
|
+
className: "wallet-item",
|
|
311
|
+
onClick: function onClick() {
|
|
312
|
+
return _this.clickJump(group.title.text);
|
|
313
|
+
}
|
|
314
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
|
+
className: "item-head"
|
|
316
|
+
}, group.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
317
|
+
data: group.logo,
|
|
318
|
+
GAData: GAData,
|
|
319
|
+
style: (0, _commonUtil.pxToRem)({
|
|
320
|
+
width: 16
|
|
321
|
+
})
|
|
322
|
+
}), group.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
323
|
+
className: "group-name"
|
|
324
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
325
|
+
data: group.title,
|
|
326
|
+
GAData: __assign(__assign({}, GAData), {
|
|
327
|
+
groupId: group.id,
|
|
328
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, group.id)
|
|
329
|
+
}),
|
|
330
|
+
readonly: true
|
|
331
|
+
})), group.tip.open && /*#__PURE__*/_react["default"].createElement("img", {
|
|
332
|
+
alt: "tip",
|
|
333
|
+
className: "tip",
|
|
334
|
+
onClick: function onClick(e) {
|
|
335
|
+
return _this.openTip(e, group.tip.url, group.title.text);
|
|
336
|
+
},
|
|
337
|
+
src: _base.tipIcon
|
|
338
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, group.amount.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
339
|
+
data: __assign(__assign({}, group.amount), {
|
|
340
|
+
text: infoObj ? _this.formatAmount(group) : '****'
|
|
341
|
+
}),
|
|
342
|
+
GAData: __assign(__assign({}, GAData), {
|
|
343
|
+
groupId: group.id,
|
|
344
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, group.id)
|
|
345
|
+
}),
|
|
346
|
+
readonly: true
|
|
347
|
+
})), group.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
348
|
+
data: group.text,
|
|
349
|
+
GAData: __assign(__assign({}, GAData), {
|
|
350
|
+
groupId: group.id,
|
|
351
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, group.id)
|
|
352
|
+
})
|
|
353
|
+
}));
|
|
354
|
+
}));
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
WalletNuriMobile.defaultProps = {
|
|
358
|
+
data: {
|
|
359
|
+
groupSource: []
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
return WalletNuriMobile;
|
|
363
|
+
}(_react["default"].Component);
|
|
364
|
+
|
|
365
|
+
var _default = WalletNuriMobile;
|
|
366
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.m-wallet-nuri {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
}
|
|
5
|
+
.m-wallet-nuri .wallet-item {
|
|
6
|
+
flex: 1;
|
|
7
|
+
margin-left: 0.2rem;
|
|
8
|
+
}
|
|
9
|
+
.m-wallet-nuri .wallet-item:first-of-type {
|
|
10
|
+
margin-left: 0;
|
|
11
|
+
}
|
|
12
|
+
.m-wallet-nuri .wallet-item .item-head {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
.m-wallet-nuri .wallet-item .item-head .group-name {
|
|
17
|
+
margin-left: 0.08rem;
|
|
18
|
+
}
|
|
19
|
+
.m-wallet-nuri .wallet-item .item-head .tip {
|
|
20
|
+
margin-left: 0.12rem;
|
|
21
|
+
width: 0.28rem;
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
var _common = require("../../../../../common");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
17
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
18
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
19
|
+
__proto__: []
|
|
20
|
+
} instanceof Array && function (d, b) {
|
|
21
|
+
d.__proto__ = b;
|
|
22
|
+
} || function (d, b) {
|
|
23
|
+
for (var p in b) {
|
|
24
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return _extendStatics(d, b);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return function (d, b) {
|
|
32
|
+
_extendStatics(d, b);
|
|
33
|
+
|
|
34
|
+
function __() {
|
|
35
|
+
this.constructor = d;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
39
|
+
};
|
|
40
|
+
}();
|
|
41
|
+
|
|
42
|
+
var GroupList =
|
|
43
|
+
/** @class */
|
|
44
|
+
function (_super) {
|
|
45
|
+
__extends(GroupList, _super);
|
|
46
|
+
|
|
47
|
+
function GroupList() {
|
|
48
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
|
+
|
|
50
|
+
_this.renderCard = function (src) {
|
|
51
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
+
className: "card_wrap"
|
|
53
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
54
|
+
className: "name"
|
|
55
|
+
}, src.title.text));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
GroupList.prototype.render = function () {
|
|
62
|
+
var _this = this;
|
|
63
|
+
|
|
64
|
+
var _a = this.props,
|
|
65
|
+
source = _a.source,
|
|
66
|
+
onClickItem = _a.onClickItem;
|
|
67
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
|
+
className: "group_list"
|
|
69
|
+
}, source.length > 0 && source.map(function (src, index) {
|
|
70
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
+
key: "card" + src.id,
|
|
72
|
+
className: "group_item",
|
|
73
|
+
"data-nodeid": src.id,
|
|
74
|
+
id: "card" + src.id,
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
return onClickItem(src);
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
className: "left"
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
81
|
+
className: "drag-icon",
|
|
82
|
+
color: "#C4C4C4",
|
|
83
|
+
size: "20px",
|
|
84
|
+
type: "icon-drag"
|
|
85
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
|
+
className: "middle_info ml8"
|
|
87
|
+
}, _this.renderCard(src, index) || 'image name')));
|
|
88
|
+
}));
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
GroupList.defaultProps = {
|
|
92
|
+
source: [],
|
|
93
|
+
onClickItem: function onClickItem() {},
|
|
94
|
+
reRender: function reRender() {}
|
|
95
|
+
};
|
|
96
|
+
return GroupList;
|
|
97
|
+
}(_react["default"].Component);
|
|
98
|
+
|
|
99
|
+
var _default = GroupList;
|
|
100
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.group_list {
|
|
2
|
+
margin-bottom: 12px;
|
|
3
|
+
|
|
4
|
+
.group_item {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
padding: 12px;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
cursor: move;
|
|
11
|
+
|
|
12
|
+
&::after {
|
|
13
|
+
content: ' ';
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
height: 1px;
|
|
19
|
+
background-color: #EDF0F4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.left {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
|
|
26
|
+
.middle_info {
|
|
27
|
+
width: 260px;
|
|
28
|
+
|
|
29
|
+
.card_wrap {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
height: 40px;
|
|
33
|
+
|
|
34
|
+
img {
|
|
35
|
+
height: 40px;
|
|
36
|
+
width: 40px;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
object-fit: cover;
|
|
39
|
+
background-color: #EDF0F4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.name {
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
font-family: 'Open Sans';
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
line-height: 24px;
|
|
49
|
+
color: #232F46;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
p {
|
|
54
|
+
margin-bottom: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background-color: #E9F0FF;
|
|
64
|
+
|
|
65
|
+
.left {
|
|
66
|
+
.middle_info {
|
|
67
|
+
width: 200px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
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 _decorator = require("../../../../../decorator");
|
|
15
|
+
|
|
16
|
+
var _GroupList = _interopRequireDefault(require("../GroupList"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
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 __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
49
|
+
var c = arguments.length,
|
|
50
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
51
|
+
d;
|
|
52
|
+
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--) {
|
|
53
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
54
|
+
}
|
|
55
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var notice = 'error';
|
|
59
|
+
|
|
60
|
+
var WalletNuriConfigImageGroup =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(WalletNuriConfigImageGroup, _super);
|
|
64
|
+
|
|
65
|
+
function WalletNuriConfigImageGroup() {
|
|
66
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
|
|
68
|
+
_this.state = {};
|
|
69
|
+
|
|
70
|
+
_this.onClickItem = function (node) {
|
|
71
|
+
_this.props.store.setState({
|
|
72
|
+
clickedGroup: node.id
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
_this.reRender = function () {
|
|
77
|
+
(0, _coreUtil.renderPreview)();
|
|
78
|
+
|
|
79
|
+
_this.setState({});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
WalletNuriConfigImageGroup.prototype.render = function () {
|
|
86
|
+
var _a = this.props.source,
|
|
87
|
+
source = _a === void 0 ? [] : _a;
|
|
88
|
+
|
|
89
|
+
var _renderCard = function renderCard(src) {
|
|
90
|
+
var _a;
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
className: "card_wrap"
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
+
className: "name"
|
|
96
|
+
}, (_a = src.title) === null || _a === void 0 ? void 0 : _a.text));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: "WALLET_image"
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
|
+
className: "node_list"
|
|
103
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
104
|
+
className: "notice"
|
|
105
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
106
|
+
onClickItem: this.onClickItem,
|
|
107
|
+
renderCard: function renderCard(v) {
|
|
108
|
+
return _renderCard(v);
|
|
109
|
+
},
|
|
110
|
+
reRender: this.reRender,
|
|
111
|
+
source: source
|
|
112
|
+
})));
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
WalletNuriConfigImageGroup.defaultProps = {
|
|
116
|
+
source: []
|
|
117
|
+
};
|
|
118
|
+
WalletNuriConfigImageGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], WalletNuriConfigImageGroup);
|
|
119
|
+
return WalletNuriConfigImageGroup;
|
|
120
|
+
}(_react["default"].Component);
|
|
121
|
+
|
|
122
|
+
var _default = WalletNuriConfigImageGroup;
|
|
123
|
+
exports["default"] = _default;
|
package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less
ADDED
|
File without changes
|