@fonixtree/magic-design 2.0.82 → 2.0.83

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.
Files changed (95) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +30 -6
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  7. package/es/common/GroupList/index.js +5 -2
  8. package/es/common/ProductModal/SortableImageList/index.js +118 -0
  9. package/es/common/ProductModal/SortableImageList/index.less +3 -0
  10. package/es/common/ProductModal/index.js +40 -27
  11. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  12. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
  13. package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  14. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
  15. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +33 -0
  16. package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  17. package/es/composite-comp/dito/components/Orders/index.js +84 -0
  18. package/es/composite-comp/dito/components/Orders/mobile/index.js +334 -0
  19. package/es/composite-comp/dito/components/Orders/mobile/index.less +83 -0
  20. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  21. package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  22. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  23. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
  24. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
  25. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  26. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  27. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
  28. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +113 -0
  29. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +128 -0
  30. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +117 -0
  31. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  32. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
  33. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  34. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  35. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  36. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  37. package/es/constants/component-types.js +21 -3
  38. package/es/constants/index.js +37 -3
  39. package/es/core/Designer/ConfigPanel/index.js +6 -0
  40. package/es/decorator/compositeDecorator.js +1 -1
  41. package/es/locale/en/en.json +14 -0
  42. package/es/locale/es/es.json +14 -0
  43. package/es/locale/id/id.json +14 -0
  44. package/es/mobx/UserState.js +144 -0
  45. package/es/mobx/index.js +9 -3
  46. package/es/utils/androidUtil.js +13 -2
  47. package/es/utils/commonUtil.js +117 -3
  48. package/lib/assets/fonts/.DS_Store +0 -0
  49. package/lib/assets/fonts/magic-box-iconfont.css +30 -6
  50. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  51. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  52. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  53. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  54. package/lib/common/GroupList/index.js +5 -2
  55. package/lib/common/ProductModal/SortableImageList/index.js +118 -0
  56. package/lib/common/ProductModal/SortableImageList/index.less +3 -0
  57. package/lib/common/ProductModal/index.js +40 -27
  58. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  59. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
  60. package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  61. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
  62. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +33 -0
  63. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  64. package/lib/composite-comp/dito/components/Orders/index.js +84 -0
  65. package/lib/composite-comp/dito/components/Orders/mobile/index.js +334 -0
  66. package/lib/composite-comp/dito/components/Orders/mobile/index.less +83 -0
  67. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  68. package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  69. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  70. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
  71. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
  72. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  73. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  74. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
  75. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +113 -0
  76. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +128 -0
  77. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +117 -0
  78. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  79. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
  80. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  81. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  82. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  83. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  84. package/lib/constants/component-types.js +21 -3
  85. package/lib/constants/index.js +37 -3
  86. package/lib/core/Designer/ConfigPanel/index.js +6 -0
  87. package/lib/decorator/compositeDecorator.js +1 -1
  88. package/lib/locale/en/en.json +14 -0
  89. package/lib/locale/es/es.json +14 -0
  90. package/lib/locale/id/id.json +14 -0
  91. package/lib/mobx/UserState.js +144 -0
  92. package/lib/mobx/index.js +9 -3
  93. package/lib/utils/androidUtil.js +13 -2
  94. package/lib/utils/commonUtil.js +117 -3
  95. package/package.json +1 -1
@@ -0,0 +1,451 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setAccountPageValue = exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _lodash = require("lodash");
13
+
14
+ var _antd = require("antd");
15
+
16
+ var _avatar = _interopRequireDefault(require("./images/avatar.png"));
17
+
18
+ var _components = require("../../../../../meta-comp/components");
19
+
20
+ var _androidUtil = require("../../../../../utils/androidUtil");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
25
+
26
+ var _commonUtil = require("../../../../../utils/commonUtil");
27
+
28
+ var _index = require("../../../../../constants/index");
29
+
30
+ var _storeUtil = require("../../../../../utils/storeUtil");
31
+
32
+ require("./index.less");
33
+
34
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
+
36
+ var __extends = void 0 && (void 0).__extends || function () {
37
+ var _extendStatics = function extendStatics(d, b) {
38
+ _extendStatics = Object.setPrototypeOf || {
39
+ __proto__: []
40
+ } instanceof Array && function (d, b) {
41
+ d.__proto__ = b;
42
+ } || function (d, b) {
43
+ for (var p in b) {
44
+ if (b.hasOwnProperty(p)) d[p] = b[p];
45
+ }
46
+ };
47
+
48
+ return _extendStatics(d, b);
49
+ };
50
+
51
+ return function (d, b) {
52
+ _extendStatics(d, b);
53
+
54
+ function __() {
55
+ this.constructor = d;
56
+ }
57
+
58
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
+ };
60
+ }();
61
+
62
+ var __assign = void 0 && (void 0).__assign || function () {
63
+ __assign = Object.assign || function (t) {
64
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
65
+ s = arguments[i];
66
+
67
+ for (var p in s) {
68
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
69
+ }
70
+ }
71
+
72
+ return t;
73
+ };
74
+
75
+ return __assign.apply(this, arguments);
76
+ };
77
+
78
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
79
+ function adopt(value) {
80
+ return value instanceof P ? value : new P(function (resolve) {
81
+ resolve(value);
82
+ });
83
+ }
84
+
85
+ return new (P || (P = Promise))(function (resolve, reject) {
86
+ function fulfilled(value) {
87
+ try {
88
+ step(generator.next(value));
89
+ } catch (e) {
90
+ reject(e);
91
+ }
92
+ }
93
+
94
+ function rejected(value) {
95
+ try {
96
+ step(generator["throw"](value));
97
+ } catch (e) {
98
+ reject(e);
99
+ }
100
+ }
101
+
102
+ function step(result) {
103
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
104
+ }
105
+
106
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
107
+ });
108
+ };
109
+
110
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
111
+ var _ = {
112
+ label: 0,
113
+ sent: function sent() {
114
+ if (t[0] & 1) throw t[1];
115
+ return t[1];
116
+ },
117
+ trys: [],
118
+ ops: []
119
+ },
120
+ f,
121
+ y,
122
+ t,
123
+ g;
124
+ return g = {
125
+ next: verb(0),
126
+ "throw": verb(1),
127
+ "return": verb(2)
128
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
129
+ return this;
130
+ }), g;
131
+
132
+ function verb(n) {
133
+ return function (v) {
134
+ return step([n, v]);
135
+ };
136
+ }
137
+
138
+ function step(op) {
139
+ if (f) throw new TypeError("Generator is already executing.");
140
+
141
+ while (_) {
142
+ try {
143
+ 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;
144
+ if (y = 0, t) op = [op[0] & 2, t.value];
145
+
146
+ switch (op[0]) {
147
+ case 0:
148
+ case 1:
149
+ t = op;
150
+ break;
151
+
152
+ case 4:
153
+ _.label++;
154
+ return {
155
+ value: op[1],
156
+ done: false
157
+ };
158
+
159
+ case 5:
160
+ _.label++;
161
+ y = op[1];
162
+ op = [0];
163
+ continue;
164
+
165
+ case 7:
166
+ op = _.ops.pop();
167
+
168
+ _.trys.pop();
169
+
170
+ continue;
171
+
172
+ default:
173
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
174
+ _ = 0;
175
+ continue;
176
+ }
177
+
178
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
179
+ _.label = op[1];
180
+ break;
181
+ }
182
+
183
+ if (op[0] === 6 && _.label < t[1]) {
184
+ _.label = t[1];
185
+ t = op;
186
+ break;
187
+ }
188
+
189
+ if (t && _.label < t[2]) {
190
+ _.label = t[2];
191
+
192
+ _.ops.push(op);
193
+
194
+ break;
195
+ }
196
+
197
+ if (t[2]) _.ops.pop();
198
+
199
+ _.trys.pop();
200
+
201
+ continue;
202
+ }
203
+
204
+ op = body.call(thisArg, _);
205
+ } catch (e) {
206
+ op = [6, e];
207
+ y = 0;
208
+ } finally {
209
+ f = t = 0;
210
+ }
211
+ }
212
+
213
+ if (op[0] & 5) throw op[1];
214
+ return {
215
+ value: op[0] ? op[1] : void 0,
216
+ done: true
217
+ };
218
+ }
219
+ };
220
+
221
+ var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
222
+
223
+ var setAccountPageValue = function setAccountPageValue(obj) {
224
+ var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
225
+ localStorage.setItem('accountPageValue', JSON.stringify(__assign(__assign({}, accountPageValue), obj)));
226
+ };
227
+
228
+ exports.setAccountPageValue = setAccountPageValue;
229
+
230
+ var PersonalInfoMobile =
231
+ /** @class */
232
+ function (_super) {
233
+ __extends(PersonalInfoMobile, _super);
234
+
235
+ function PersonalInfoMobile() {
236
+ var _this = _super !== null && _super.apply(this, arguments) || this;
237
+
238
+ _this.state = {
239
+ messageNum: '',
240
+ userInfo: {}
241
+ };
242
+
243
+ _this.getNum = function (v) {
244
+ var userInfo = _this.state.userInfo;
245
+
246
+ if (v === _index.personalInfoType.WISHLIST) {
247
+ return userInfo.userCollectionNum || 1;
248
+ } else if (v === _index.personalInfoType.STORES) {
249
+ return userInfo.userCollectionStoreNum || 2;
250
+ } else if (v === _index.personalInfoType.COUPONS) {
251
+ return userInfo.couponNum || 3;
252
+ } else if (v === _index.personalInfoType.VIEWED) {
253
+ return userInfo.recentViewNum || 4;
254
+ }
255
+ };
256
+
257
+ _this.handleFileChange = function (e) {
258
+ var file = e.target.files[0];
259
+
260
+ if (file) {
261
+ if (file.name.length > 120) {
262
+ _antd.message.error((0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'));
263
+
264
+ return;
265
+ }
266
+
267
+ setSelectedImgFile(file);
268
+ setEditImgModalVisible(true);
269
+ }
270
+
271
+ e.target.value = '';
272
+ };
273
+
274
+ _this.goSettings = function () {
275
+ if ((0, _commonUtil.checkLogin)()) {
276
+ (0, _commonUtil.navigateTo)('/settings');
277
+ }
278
+ };
279
+
280
+ _this.goMessageCenter = function () {
281
+ if ((0, _commonUtil.checkLogin)(true)) {
282
+ (0, _commonUtil.navigateTo)('/message-center');
283
+ }
284
+ };
285
+
286
+ _this.clickName = function () {
287
+ if (!(0, _lodash.isEmpty)(LPObj)) {
288
+ return;
289
+ }
290
+
291
+ (0, _commonUtil.navigateTo)('/account/information');
292
+ };
293
+
294
+ _this.goLoginPage = function () {
295
+ if (browserVersion().isApp) {
296
+ (0, _androidUtil.goToLoginApp)();
297
+ } else {
298
+ (0, _commonUtil.goLogin)();
299
+ }
300
+ };
301
+
302
+ _this.getMessageNum = function () {
303
+ return __awaiter(_this, void 0, void 0, function () {
304
+ var num;
305
+ return __generator(this, function (_a) {
306
+ switch (_a.label) {
307
+ case 0:
308
+ return [4
309
+ /*yield*/
310
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/inbox/unread/num', {}, 'GET')];
311
+
312
+ case 1:
313
+ num = _a.sent();
314
+ if (num > 9) num = '9+';
315
+ this.setState({
316
+ messageNum: num
317
+ });
318
+ setAccountPageValue({
319
+ messageNum: num
320
+ });
321
+ return [2
322
+ /*return*/
323
+ ];
324
+ }
325
+ });
326
+ });
327
+ };
328
+
329
+ _this.getUserInfo = function () {
330
+ return __awaiter(_this, void 0, void 0, function () {
331
+ var info;
332
+ return __generator(this, function (_a) {
333
+ switch (_a.label) {
334
+ case 0:
335
+ return [4
336
+ /*yield*/
337
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users', {}, 'GET')];
338
+
339
+ case 1:
340
+ info = _a.sent();
341
+ this.setState({
342
+ userInfo: info
343
+ });
344
+ return [2
345
+ /*return*/
346
+ ];
347
+ }
348
+ });
349
+ });
350
+ };
351
+
352
+ return _this;
353
+ }
354
+
355
+ PersonalInfoMobile.prototype.componentDidMount = function () {
356
+ if ((0, _commonUtil.checkLogin)(false)) {
357
+ this.getUserInfo();
358
+ }
359
+
360
+ this.getMessageNum();
361
+ };
362
+
363
+ PersonalInfoMobile.prototype.render = function () {
364
+ var _this = this;
365
+
366
+ var data = this.props.data;
367
+ var _a = this.state,
368
+ messageNum = _a.messageNum,
369
+ userInfo = _a.userInfo;
370
+ return /*#__PURE__*/_react["default"].createElement("div", {
371
+ className: (0, _classnames["default"])('personal-information-mobile')
372
+ }, /*#__PURE__*/_react["default"].createElement("div", {
373
+ className: "top"
374
+ }, /*#__PURE__*/_react["default"].createElement("div", {
375
+ className: "pInfoWrap"
376
+ }, (0, _commonUtil.isLogin)() ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
377
+ className: "photoWrap"
378
+ }, /*#__PURE__*/_react["default"].createElement("img", {
379
+ alt: "",
380
+ className: "photo",
381
+ src: userInfo.photo || _avatar["default"],
382
+ style: {
383
+ height: 44,
384
+ width: 44,
385
+ background: userInfo.photo ? '#fff' : 'unset'
386
+ }
387
+ }), /*#__PURE__*/_react["default"].createElement("input", {
388
+ accept: "image/*",
389
+ disabled: !(0, _lodash.isEmpty)(LPObj),
390
+ id: "userPhoto",
391
+ onChange: this.handleFileChange,
392
+ type: "file"
393
+ })), /*#__PURE__*/_react["default"].createElement("div", {
394
+ className: "userInfo"
395
+ }, /*#__PURE__*/_react["default"].createElement("p", {
396
+ className: "name",
397
+ onClick: this.clickName
398
+ }, userInfo.firstName || userInfo.nickName))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
399
+ className: "photo"
400
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
401
+ color: "#fff",
402
+ size: 32,
403
+ type: "icon-account"
404
+ })), data.login.open && /*#__PURE__*/_react["default"].createElement("span", {
405
+ className: "btnLogin",
406
+ onClick: this.goLoginPage
407
+ }, (0, _locale.i18n)('LOGIN_OR_REGISTER')))), /*#__PURE__*/_react["default"].createElement("div", {
408
+ className: "btnGroup"
409
+ }, (0, _lodash.isEmpty)(LPObj) && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
410
+ color: "#fff",
411
+ onClick: this.goSettings,
412
+ size: 24,
413
+ type: "icon-set"
414
+ }), /*#__PURE__*/_react["default"].createElement("div", {
415
+ className: "iconWrap"
416
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
417
+ color: "#fff",
418
+ onClick: this.goMessageCenter,
419
+ size: 24,
420
+ type: "icon-messages"
421
+ }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
422
+ className: "num"
423
+ }, messageNum)))), /*#__PURE__*/_react["default"].createElement("div", {
424
+ className: "bottom"
425
+ }, data.groupSource.map(function (item) {
426
+ return /*#__PURE__*/_react["default"].createElement("div", {
427
+ className: "item"
428
+ }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
429
+ className: "number",
430
+ data: __assign(__assign({}, item.number), {
431
+ text: (0, _commonUtil.isLogin)() ? _this.getNum(item.sourceType) : '- -'
432
+ }),
433
+ readonly: true
434
+ }), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
435
+ className: "title",
436
+ data: item.title,
437
+ onTextInput: function onTextInput(text) {
438
+ item.title.text = text;
439
+ }
440
+ }));
441
+ })));
442
+ };
443
+
444
+ PersonalInfoMobile.defaultProps = {
445
+ data: {}
446
+ };
447
+ return PersonalInfoMobile;
448
+ }(_react["default"].Component);
449
+
450
+ var _default = PersonalInfoMobile;
451
+ exports["default"] = _default;
@@ -0,0 +1,127 @@
1
+ .personal-information-mobile {
2
+ height: 4.6rem;
3
+ padding: 0.32rem;
4
+ box-sizing: border-box;
5
+ }
6
+ .top {
7
+ display: flex;
8
+ justify-content: space-between;
9
+ align-items: start;
10
+ }
11
+ .top .pInfoWrap {
12
+ display: flex;
13
+ align-items: center;
14
+ }
15
+ .top .pInfoWrap .photoWrap {
16
+ position: relative;
17
+ display: inline-block;
18
+ vertical-align: middle;
19
+ }
20
+ .top .pInfoWrap .photoWrap > input {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ width: 100%;
25
+ height: 100%;
26
+ opacity: 0;
27
+ }
28
+ .top .pInfoWrap .userInfo {
29
+ display: inline-block;
30
+ vertical-align: middle;
31
+ }
32
+ .top .pInfoWrap .userInfo p {
33
+ margin: 0;
34
+ }
35
+ .top .pInfoWrap .userInfo .name {
36
+ font-size: 0.28rem;
37
+ font-weight: 500;
38
+ color: #ffffff;
39
+ max-width: 2.96rem;
40
+ white-space: nowrap;
41
+ text-overflow: ellipsis;
42
+ overflow: hidden;
43
+ word-break: break-all;
44
+ }
45
+ .top .pInfoWrap .userInfo .phone {
46
+ font-size: 0.28rem;
47
+ font-weight: 400;
48
+ color: #ffffff;
49
+ margin-top: 0.1rem;
50
+ }
51
+ .top .pInfoWrap .photo {
52
+ display: inline-block;
53
+ width: 0.88rem;
54
+ height: 0.88rem;
55
+ line-height: 1.2rem;
56
+ text-align: center;
57
+ background: #7b7b7b;
58
+ margin-right: 0.3rem;
59
+ border-radius: 50%;
60
+ }
61
+ .top .pInfoWrap .btnLogin {
62
+ font-size: 0.28rem;
63
+ font-weight: 400;
64
+ color: #ffffff;
65
+ font-family: Montserrat;
66
+ }
67
+ .top .btnGroup .iconWrap {
68
+ display: inline-block;
69
+ margin-left: 0.3rem;
70
+ position: relative;
71
+ }
72
+ .top .btnGroup .num {
73
+ position: absolute;
74
+ top: -0.04rem;
75
+ left: 0.28rem;
76
+ display: inline-block;
77
+ padding: 0 0.08rem;
78
+ border-radius: 50%;
79
+ text-align: center;
80
+ min-width: 0.32rem;
81
+ height: 0.32rem;
82
+ line-height: 0.32rem;
83
+ background: #ce1126;
84
+ font-size: 0.12rem;
85
+ color: #ffffff;
86
+ }
87
+ .bottom {
88
+ display: flex;
89
+ flex-direction: row;
90
+ justify-content: space-around;
91
+ width: 100%;
92
+ margin-top: 0.48rem;
93
+ }
94
+ .bottom .item {
95
+ display: flex;
96
+ flex-direction: column;
97
+ justify-content: flex-start;
98
+ align-items: center;
99
+ flex: 1;
100
+ position: relative;
101
+ }
102
+ .bottom .item:after {
103
+ content: '';
104
+ display: inline-block;
105
+ width: 0.02rem;
106
+ height: 0.9rem;
107
+ position: absolute;
108
+ right: 0;
109
+ top: 0.12rem;
110
+ background: #ccc;
111
+ }
112
+ .bottom .item:last-child:after {
113
+ display: none;
114
+ }
115
+ .bottom .item .number {
116
+ font-size: 0.36rem;
117
+ font-weight: 600;
118
+ color: #ffffff;
119
+ text-align: center;
120
+ }
121
+ .bottom .item .title {
122
+ font-size: 0.24rem;
123
+ font-weight: 400;
124
+ color: #ffffff;
125
+ line-height: 0.32rem;
126
+ text-align: center;
127
+ }
@@ -0,0 +1,128 @@
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 _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
13
+
14
+ var _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
17
+
18
+ var _defaultJSON = require("../../../components/CommonFunctions/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 = 'Please add some Item';
65
+
66
+ var ImageTextConfigGroup =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(ImageTextConfigGroup, _super);
70
+
71
+ function ImageTextConfigGroup() {
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.CommonFunctionsGroupSourceJSON)();
84
+
85
+ _this.props.source.push(json);
86
+
87
+ _this.setState({});
88
+
89
+ (0, _coreUtil.renderPreview)();
90
+ };
91
+
92
+ _this.reRender = function () {
93
+ _this.setState({});
94
+ };
95
+
96
+ return _this;
97
+ }
98
+
99
+ ImageTextConfigGroup.prototype.render = function () {
100
+ var source = this.props.source;
101
+ return /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: "banner_group"
103
+ }, /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: "node_list"
105
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
106
+ className: "notice"
107
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
108
+ onClickItem: this.onClickItem,
109
+ reRender: this.reRender,
110
+ source: source
111
+ })), /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: "btn_wrap"
113
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
114
+ icon: "icon-add",
115
+ onClick: this.onAddClick,
116
+ type: "primary"
117
+ }, (0, _locale.i18n)('ADD'))));
118
+ };
119
+
120
+ ImageTextConfigGroup.defaultProps = {
121
+ source: []
122
+ };
123
+ ImageTextConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ImageTextConfigGroup);
124
+ return ImageTextConfigGroup;
125
+ }(_react["default"].Component);
126
+
127
+ var _default = ImageTextConfigGroup;
128
+ exports["default"] = _default;