@fonixtree/magic-design 2.0.190 → 2.0.192

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 (71) hide show
  1. package/es/assets/fonts/Roboto-Bold.ttf +0 -0
  2. package/es/assets/fonts/Roboto-Medium.ttf +0 -0
  3. package/es/assets/fonts/Roboto-Regular.ttf +0 -0
  4. package/es/assets/fonts/Roboto-SemiBold.ttf +0 -0
  5. package/es/assets/less/font.less +30 -0
  6. package/es/common/SelectStoreModal/SortableImageList/index.js +118 -0
  7. package/es/common/SelectStoreModal/SortableImageList/index.less +3 -0
  8. package/es/common/SelectStoreModal/index.js +756 -0
  9. package/es/common/SelectStoreModal/index.less +152 -0
  10. package/es/composite-comp/ashita/components/WalletAshita/defaultJSON.js +1 -1
  11. package/es/composite-comp/ashita/components/WalletAshita/index.js +1 -1
  12. package/es/composite-comp/common/config-panels/InputField/index.js +1 -1
  13. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +66 -0
  14. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +55 -20
  15. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
  16. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +6 -0
  17. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +3 -1
  18. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +1 -2
  19. package/es/composite-comp/public/components/Stores/defaultJSON.js +1 -3
  20. package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
  21. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -6
  22. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
  23. package/es/composite-comp/public/components/Stores/mobile/index.js +35 -13
  24. package/es/composite-comp/public/components/Wallet/defaultJSON.js +1 -1
  25. package/es/composite-comp/public/components/Wallet/index.js +1 -1
  26. package/es/composite-comp/public/components/Wallet/mobile/index.js +1 -4
  27. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +11 -3
  28. package/es/constants/index.js +6 -2
  29. package/es/core/Designer/ToolBarModal/index.js +1 -1
  30. package/es/locale/ar/ar.json +9 -0
  31. package/es/locale/en/en.json +9 -0
  32. package/es/locale/es/es.json +9 -0
  33. package/es/locale/mn/mn.json +9 -0
  34. package/es/meta-comp/config-panels/ButtonConfig/index.js +1 -1
  35. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  36. package/lib/assets/fonts/Roboto-Bold.ttf +0 -0
  37. package/lib/assets/fonts/Roboto-Medium.ttf +0 -0
  38. package/lib/assets/fonts/Roboto-Regular.ttf +0 -0
  39. package/lib/assets/fonts/Roboto-SemiBold.ttf +0 -0
  40. package/lib/assets/less/font.less +30 -0
  41. package/lib/common/SelectStoreModal/SortableImageList/index.js +118 -0
  42. package/lib/common/SelectStoreModal/SortableImageList/index.less +3 -0
  43. package/lib/common/SelectStoreModal/index.js +756 -0
  44. package/lib/common/SelectStoreModal/index.less +152 -0
  45. package/lib/composite-comp/ashita/components/WalletAshita/defaultJSON.js +1 -1
  46. package/lib/composite-comp/ashita/components/WalletAshita/index.js +1 -1
  47. package/lib/composite-comp/common/config-panels/InputField/index.js +1 -1
  48. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +66 -0
  49. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +55 -20
  50. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
  51. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +6 -0
  52. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +3 -1
  53. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +1 -2
  54. package/lib/composite-comp/public/components/Stores/defaultJSON.js +1 -3
  55. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
  56. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -6
  57. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
  58. package/lib/composite-comp/public/components/Stores/mobile/index.js +35 -13
  59. package/lib/composite-comp/public/components/Wallet/defaultJSON.js +1 -1
  60. package/lib/composite-comp/public/components/Wallet/index.js +1 -1
  61. package/lib/composite-comp/public/components/Wallet/mobile/index.js +1 -4
  62. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +11 -3
  63. package/lib/constants/index.js +6 -2
  64. package/lib/core/Designer/ToolBarModal/index.js +1 -1
  65. package/lib/locale/ar/ar.json +9 -0
  66. package/lib/locale/en/en.json +9 -0
  67. package/lib/locale/es/es.json +9 -0
  68. package/lib/locale/mn/mn.json +9 -0
  69. package/lib/meta-comp/config-panels/ButtonConfig/index.js +1 -1
  70. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  71. package/package.json +1 -1
@@ -0,0 +1,152 @@
1
+ .modalCot {
2
+ width: 1200px;
3
+ right: unset !important;
4
+ left: unset !important;
5
+
6
+ .proModalWrap {
7
+ thead .cylon-checkbox {
8
+ visibility: hidden;
9
+ }
10
+
11
+ .content {
12
+ display: flex;
13
+ margin-bottom: 8px;
14
+
15
+ .rightCot {
16
+ width: calc(100% - 260px);
17
+ margin-left: 16px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ justify-content: flex-start;
21
+
22
+
23
+ .btn-select-type {
24
+ text-align: right;
25
+ margin-bottom: 15px;
26
+ }
27
+
28
+ .prodImg {
29
+ display: inline-block;
30
+ width: 36px;
31
+ height: 36px;
32
+ background-size: cover;
33
+ background-position: 50% 50%;
34
+ background-repeat: no-repeat;
35
+ }
36
+
37
+ .selectedCot {
38
+ padding-right: 18px;
39
+ margin-left: 4px;
40
+ height: 78px;
41
+ background: #f8f8f8;
42
+ border: 1px solid #e0e0e0;
43
+ border-radius: 2px;
44
+ display: flex;
45
+ flex-direction: row;
46
+ // flex-wrap: wrap;
47
+ overflow-x: auto;
48
+
49
+ .selectedItem {
50
+ box-sizing: border-box;
51
+ margin-top: 12px;
52
+ margin-left: 18px;
53
+ height: 52px;
54
+ position: relative;
55
+
56
+ &:hover {
57
+ .selectedItemImg {
58
+ width: 52px;
59
+ height: 52px;
60
+ border: 1px solid #4477ee !important;
61
+ box-shadow: 0 0 0 2px rgba(68, 119, 238, 0.15);
62
+ border-radius: 2px;
63
+ }
64
+
65
+ .selectedItemClose {
66
+ display: flex;
67
+ }
68
+ }
69
+
70
+ .selectedItemClose {
71
+ display: none;
72
+ border: 1px solid #000;
73
+ width: 16px;
74
+ height: 16px;
75
+ border-radius: 50%;
76
+ padding: 2px;
77
+ position: absolute;
78
+ top: -9px;
79
+ right: -8px;
80
+ z-index: 400;
81
+ cursor: pointer;
82
+ }
83
+
84
+ // &:nth-child(n + 11) {
85
+ // margin-top: 5px !important;
86
+ // }
87
+
88
+ .selectedItemImg {
89
+ height: 52px;
90
+ width: 52px;
91
+ border: 1px solid #e0e0e0;
92
+ border-radius: 2px;
93
+
94
+ &.invalid {
95
+ border: 1px solid red;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+ .leftCot {
103
+ width: 260px;
104
+ padding-right: 14px;
105
+ box-sizing: border-box;
106
+ border-right: 1px solid #e0e0e0;
107
+
108
+ .divider {
109
+ width: 10%;
110
+ display: inline-block;
111
+ text-align: center;
112
+ height: 32px;
113
+ line-height: 32px;
114
+ }
115
+
116
+ .buttonStyle {
117
+ margin-top: 10px;
118
+ display: flex;
119
+ flex-direction: row-reverse;
120
+ align-items: center;
121
+ }
122
+ }
123
+ }
124
+
125
+ .footer {
126
+ padding-top: 12px;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: space-between;
130
+ border-top: 1px solid #e0e0e0;
131
+ }
132
+
133
+ .total {
134
+ font-size: 16px;
135
+ color: #2d3040;
136
+ letter-spacing: 0;
137
+
138
+ .totalNum {
139
+ color: #4477ee;
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ .cylon-modal-root {
146
+ display: flex;
147
+ justify-content: center;
148
+ position: absolute;
149
+ left: 0;
150
+ right: 0;
151
+ z-index: 1001;
152
+ }
@@ -166,7 +166,7 @@ var getDefaultJSON = function getDefaultJSON() {
166
166
  var defaultFontFamily = _constants.projectFontFamily[(_a = window.systemParams) === null || _a === void 0 ? void 0 : _a.projectCode] || 'Open Sans';
167
167
  return {
168
168
  id: groupId,
169
- type: 'WALLET_ASHITA',
169
+ type: 'WALLET',
170
170
  title: {
171
171
  headline: {
172
172
  id: (0, _uuid.v4)(),
@@ -74,7 +74,7 @@ function (_super) {
74
74
  };
75
75
 
76
76
  Wallet.defaultProps = {};
77
- Wallet.type = 'WALLET_ASHITA';
77
+ Wallet.type = 'WALLET';
78
78
  Wallet.getDefaultJSON = _defaultJSON.getDefaultJSON;
79
79
  Wallet = __decorate([_compositeDecorator["default"]], Wallet);
80
80
  return Wallet;
@@ -94,7 +94,7 @@ function (_super) {
94
94
  inputLabel = _a.inputLabel;
95
95
  var textData = data.content;
96
96
 
97
- var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
97
+ var _fontWeightList = ['Montserrat', 'Roboto'].includes(textData.fontFamily) ? _constants.fontWeightList : _constants.otherFontWeightList;
98
98
 
99
99
  return /*#__PURE__*/_react["default"].createElement("div", {
100
100
  className: "m-text-config"
@@ -9,6 +9,8 @@ var _uuid = require("uuid");
9
9
 
10
10
  var _constants = require("../../../../constants");
11
11
 
12
+ var _index = require("../../../../assets/images/base64/index");
13
+
12
14
  var getDefaultJSON = function getDefaultJSON() {
13
15
  var _a;
14
16
 
@@ -82,6 +84,70 @@ var getDefaultJSON = function getDefaultJSON() {
82
84
  pc: false,
83
85
  mobile: true
84
86
  }
87
+ },
88
+ points: {
89
+ id: (0, _uuid.v4)(),
90
+ open: false,
91
+ type: 'BUTTON',
92
+ text: 0,
93
+ content: {
94
+ url: '',
95
+ backgroundColor: ''
96
+ },
97
+ buttonText: {
98
+ sizeType: 'Customize font styles',
99
+ fontFamily: defaultFontFamily,
100
+ fontWeight: 400,
101
+ fontSize: 14,
102
+ fontStyle: 'normal',
103
+ color: '#545454'
104
+ },
105
+ buttonBorder: {
106
+ open: true,
107
+ borderColor: '',
108
+ borderRadius: 4
109
+ },
110
+ buttonIcon: {
111
+ iconUrl: _index.starIcon,
112
+ layout: 'left'
113
+ },
114
+ spacing: {
115
+ pc: {
116
+ paddingTop: 4,
117
+ paddingBottom: 4,
118
+ paddingLeft: 10,
119
+ paddingRight: 10
120
+ },
121
+ mobile: {
122
+ paddingTop: 2,
123
+ paddingBottom: 2,
124
+ paddingLeft: 8,
125
+ paddingRight: 8
126
+ }
127
+ },
128
+ hover: {
129
+ open: false,
130
+ content: {
131
+ backgroundColor: '#E6EAF0'
132
+ },
133
+ buttonText: {
134
+ sizeType: 'Customize font styles',
135
+ fontFamily: defaultFontFamily,
136
+ fontWeight: 600,
137
+ fontSize: 14,
138
+ fontStyle: 'normal',
139
+ color: '#8493AF'
140
+ },
141
+ buttonBorder: {
142
+ open: true,
143
+ borderColor: '',
144
+ borderRadius: 4
145
+ },
146
+ buttonIcon: {
147
+ iconUrl: '',
148
+ layout: 'left'
149
+ }
150
+ }
85
151
  }
86
152
  },
87
153
  spacing: {
@@ -11,6 +11,8 @@ var _antd = require("antd4");
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
14
16
  var _components = require("../../../../../meta-comp/components");
15
17
 
16
18
  var _common = require("../../../../../common");
@@ -219,7 +221,8 @@ function (_super) {
219
221
  _this.state = {
220
222
  messageNum: '',
221
223
  cartNum: '',
222
- editing: false
224
+ editing: false,
225
+ points: 0
223
226
  };
224
227
 
225
228
  _this.getCartNum = function () {
@@ -319,6 +322,29 @@ function (_super) {
319
322
  }
320
323
  };
321
324
 
325
+ _this.getPoints = function () {
326
+ return __awaiter(_this, void 0, void 0, function () {
327
+ var num;
328
+ return __generator(this, function (_a) {
329
+ switch (_a.label) {
330
+ case 0:
331
+ return [4
332
+ /*yield*/
333
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/points', {}, 'GET')];
334
+
335
+ case 1:
336
+ num = _a.sent();
337
+ this.setState({
338
+ points: num || 0
339
+ });
340
+ return [2
341
+ /*return*/
342
+ ];
343
+ }
344
+ });
345
+ });
346
+ };
347
+
322
348
  return _this;
323
349
  }
324
350
 
@@ -327,6 +353,7 @@ function (_super) {
327
353
 
328
354
  this.getMessageNum();
329
355
  this.getCartNum();
356
+ this.getPoints();
330
357
 
331
358
  if ((_c = (_b = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.open) {
332
359
  this.setState({
@@ -352,25 +379,28 @@ function (_super) {
352
379
  };
353
380
 
354
381
  SearchMobile.prototype.render = function () {
355
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
382
+ var _a;
383
+
384
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
356
385
 
357
386
  var data = this.props.data;
358
- var _v = this.state,
359
- messageNum = _v.messageNum,
360
- cartNum = _v.cartNum,
361
- value = _v.value;
387
+ var _x = this.state,
388
+ messageNum = _x.messageNum,
389
+ cartNum = _x.cartNum,
390
+ value = _x.value,
391
+ points = _x.points;
362
392
 
363
- var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
393
+ var style = __assign({}, (0, _Text.contentStyle)(((_b = data.content.keyword) === null || _b === void 0 ? void 0 : _b.content) || {}));
364
394
 
365
395
  Reflect.deleteProperty(style, 'width');
366
396
 
367
- var _placeholder = ((_b = data.content.placeholder) === null || _b === void 0 ? void 0 : _b.open) ? (_c = data.content.placeholder) === null || _c === void 0 ? void 0 : _c.text : '';
397
+ var _placeholder = ((_c = data.content.placeholder) === null || _c === void 0 ? void 0 : _c.open) ? (_d = data.content.placeholder) === null || _d === void 0 ? void 0 : _d.text : '';
368
398
 
369
399
  return /*#__PURE__*/_react["default"].createElement("div", {
370
- className: "m-search-bar"
400
+ className: (0, _classnames["default"])('m-search-bar', (_a = {}, _a['reversed-layout'] = (0, _commonUtil.needReverse)(), _a))
371
401
  }, /*#__PURE__*/_react["default"].createElement("div", {
372
402
  className: "right"
373
- }, data.content && ((_d = data.content.box) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
403
+ }, data.content && ((_e = data.content.box) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
374
404
  className: "search-input-wrap",
375
405
  onClick: function onClick() {
376
406
  return (0, _coreUtil.clickUrl)('/search-page', {
@@ -378,26 +408,31 @@ function (_super) {
378
408
  });
379
409
  },
380
410
  style: {
381
- borderColor: (_f = (_e = data.content.box) === null || _e === void 0 ? void 0 : _e.color) === null || _f === void 0 ? void 0 : _f.mobile,
382
- backgroundColor: (_h = (_g = data.content.box) === null || _g === void 0 ? void 0 : _g.backgroundColor) === null || _h === void 0 ? void 0 : _h.mobile
411
+ borderColor: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
412
+ backgroundColor: (_j = (_h = data.content.box) === null || _h === void 0 ? void 0 : _h.backgroundColor) === null || _j === void 0 ? void 0 : _j.mobile
383
413
  }
384
414
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
385
415
  className: "search-input",
386
416
  onBlur: this.onBlur,
387
417
  onChange: this.onChange,
388
418
  onFocus: this.onFocus,
419
+ placeholder: _placeholder,
420
+ readOnly: true,
389
421
  style: (0, _commonUtil.pxToRem)(style),
390
422
  type: "text",
391
- value: value,
392
- placeholder: _placeholder
423
+ value: value
393
424
  }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
394
- color: (_k = (_j = data.content.box) === null || _j === void 0 ? void 0 : _j.color) === null || _k === void 0 ? void 0 : _k.mobile,
425
+ color: (_l = (_k = data.content.box) === null || _k === void 0 ? void 0 : _k.color) === null || _l === void 0 ? void 0 : _l.mobile,
395
426
  size: (0, _commonUtil.convertToRem)(24),
396
427
  type: "icon-search2"
397
- })), data.content && ((_m = (_l = data.content.icon) === null || _l === void 0 ? void 0 : _l.cartIcon) === null || _m === void 0 ? void 0 : _m.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
428
+ })), data.content && ((_m = data.content.points) === null || _m === void 0 ? void 0 : _m.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
429
+ data: __assign(__assign({}, data.content.points), {
430
+ text: points
431
+ })
432
+ }), data.content && ((_p = (_o = data.content.icon) === null || _o === void 0 ? void 0 : _o.cartIcon) === null || _p === void 0 ? void 0 : _p.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
398
433
  className: "message-wrap"
399
434
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
400
- color: (_p = (_o = data.content.icon) === null || _o === void 0 ? void 0 : _o.color) === null || _p === void 0 ? void 0 : _p.mobile,
435
+ color: (_r = (_q = data.content.icon) === null || _q === void 0 ? void 0 : _q.color) === null || _r === void 0 ? void 0 : _r.mobile,
401
436
  onClick: function onClick() {
402
437
  return (0, _coreUtil.clickUrl)('/main/cart');
403
438
  },
@@ -408,10 +443,10 @@ function (_super) {
408
443
  type: "icon-ShoppingCartSimple1"
409
444
  }), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
410
445
  className: "num"
411
- }, cartNum)), data.content && ((_r = (_q = data.content.icon) === null || _q === void 0 ? void 0 : _q.messageIcon) === null || _r === void 0 ? void 0 : _r.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
446
+ }, cartNum)), data.content && ((_t = (_s = data.content.icon) === null || _s === void 0 ? void 0 : _s.messageIcon) === null || _t === void 0 ? void 0 : _t.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
412
447
  className: "message-wrap"
413
448
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
414
- color: (_t = (_s = data.content.icon) === null || _s === void 0 ? void 0 : _s.color) === null || _t === void 0 ? void 0 : _t.mobile,
449
+ color: (_v = (_u = data.content.icon) === null || _u === void 0 ? void 0 : _u.color) === null || _v === void 0 ? void 0 : _v.mobile,
415
450
  onClick: function onClick() {
416
451
  return (0, _coreUtil.clickUrl)('/message-center');
417
452
  },
@@ -422,7 +457,7 @@ function (_super) {
422
457
  type: "icon-message"
423
458
  }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
424
459
  className: "num"
425
- }, messageNum))), data.content && ((_u = data.content.logo) === null || _u === void 0 ? void 0 : _u.open) && /*#__PURE__*/_react["default"].createElement("div", {
460
+ }, messageNum))), data.content && ((_w = data.content.logo) === null || _w === void 0 ? void 0 : _w.open) && /*#__PURE__*/_react["default"].createElement("div", {
426
461
  className: "logo",
427
462
  onClick: function onClick() {
428
463
  var _a, _b;
@@ -106,7 +106,7 @@ function (_super) {
106
106
  };
107
107
  }
108
108
 
109
- var _fontWeightList = textData.fontFamily === 'Montserrat' ? _constants.fontWeightList : _constants.otherFontWeightList;
109
+ var _fontWeightList = ['Montserrat', 'Roboto'].includes(textData.fontFamily) ? _constants.fontWeightList : _constants.otherFontWeightList;
110
110
 
111
111
  return /*#__PURE__*/_react["default"].createElement("div", {
112
112
  className: "m-text-config"
@@ -209,6 +209,12 @@ function (_super) {
209
209
  }
210
210
  })))),
211
211
  metaOption: panelProps.icon
212
+ }, {
213
+ key: 'search6',
214
+ name: (0, _locale.i18n)('POINTS'),
215
+ toggleType: 'switch',
216
+ value: null,
217
+ metaOption: panelProps.points
212
218
  }];
213
219
  return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
214
220
  headerSize: "middle",
@@ -247,7 +247,9 @@ function (_super) {
247
247
  case 1:
248
248
  res = _a.sent();
249
249
  list = (0, _commonUtil.ensure)(function () {
250
- return res.storePage.list;
250
+ var _a;
251
+
252
+ return (_a = res.storePage) === null || _a === void 0 ? void 0 : _a.list;
251
253
  }, []);
252
254
  this.setState({
253
255
  list: list
@@ -367,8 +367,7 @@ function (_super) {
367
367
  _this.toLocale = function (value) {
368
368
  var locale = (0, _storeUtil.getStore)(_constants.STORAGE_KEY.FISHX_LOCALE) || (0, _storeUtil.getStore)(_constants.STORAGE_KEY.LOCALE);
369
369
 
370
- if (locale == 'mn') {
371
- // const time = newDate('2024-10-13 10:11:00');
370
+ if (locale === 'mn' || locale === 'id-ID') {
372
371
  var time = (0, _dateUtil.newDate)(value);
373
372
 
374
373
  var _hour = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
@@ -12,10 +12,8 @@ var _constants = require("../../../../constants");
12
12
  var _index = require("../../../../assets/images/base64/index");
13
13
 
14
14
  var getDefaultJSON = function getDefaultJSON() {
15
- var _a;
16
-
17
15
  var groupId = (0, _uuid.v4)();
18
- var defaultFontFamily = _constants.projectFontFamily[(_a = window.systemParams) === null || _a === void 0 ? void 0 : _a.projectCode] || 'Open Sans';
16
+ var defaultFontFamily = _constants.projectFontFamily['ar'] || 'Open Sans';
19
17
  return {
20
18
  id: groupId,
21
19
  type: 'STORES',
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
+ var _defaultImg = _interopRequireDefault(require("./img/defaultImg.png"));
13
+
12
14
  var _commonUtil = require("../../../../../../utils/commonUtil");
13
15
 
14
16
  var _currencyUtil = require("../../../../../../utils/currencyUtil");
@@ -121,19 +123,23 @@ function (_super) {
121
123
  }, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
122
124
  className: "product-img",
123
125
  lazy: true,
124
- src: (0, _commonUtil.convertImageUrl)(data.storePosterUrl || data.storeLogoUrl)
126
+ src: data.storePosterUrl || _defaultImg["default"]
125
127
  }), freeDeliveryLabel.open && data.freeShipping === 'Y' && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
126
128
  className: "flag",
127
129
  data: freeDeliveryLabel
128
130
  })), /*#__PURE__*/_react["default"].createElement("div", {
129
131
  className: "content-wrap"
130
- }, storeName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
132
+ }, storeName.open && /*#__PURE__*/_react["default"].createElement("div", {
133
+ className: "name-row"
134
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
131
135
  className: "name",
132
136
  data: __assign(__assign({}, storeName), {
133
137
  text: data.storeName
134
138
  }),
135
139
  readonly: true
136
- }), minOrder.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
140
+ }), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
141
+ className: "new"
142
+ }, "New")), minOrder.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
137
143
  className: "minOrder no-reversed",
138
144
  data: __assign(__assign({}, minOrder), {
139
145
  text: (0, _commonUtil.reverseStrArr)([(0, _locale.i18n)('MIN_ORDER'), ':', (data.minOrderAmount || 0) + " IQD"])
@@ -177,19 +183,23 @@ function (_super) {
177
183
  }, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
178
184
  className: "product-img",
179
185
  lazy: true,
180
- src: (0, _commonUtil.convertImageUrl)(data.storePosterUrl || data.storeLogoUrl)
186
+ src: data.storeLogoUrl || _defaultImg["default"]
181
187
  }), freeDeliveryLabel.open && data.freeShipping === 'Y' && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
182
188
  className: "flag",
183
189
  data: freeDeliveryLabel
184
190
  })), /*#__PURE__*/_react["default"].createElement("div", {
185
191
  className: "content-wrap"
186
- }, storeName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
192
+ }, storeName.open && /*#__PURE__*/_react["default"].createElement("div", {
193
+ className: "name-row"
194
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
187
195
  className: "name",
188
196
  data: __assign(__assign({}, storeName), {
189
197
  text: data.storeName
190
198
  }),
191
199
  readonly: true
192
- }), storeDesc.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
200
+ }), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
201
+ className: "new"
202
+ }, "New")), storeDesc.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
193
203
  className: "desc",
194
204
  data: __assign(__assign({}, storeDesc), {
195
205
  text: data.comments
@@ -24,10 +24,24 @@
24
24
  padding: 0.12rem 0.2rem;
25
25
  width: 4.4rem;
26
26
  }
27
- .m-store-item-wrap .content-wrap .name {
27
+ .m-store-item-wrap .content-wrap .name-row {
28
+ display: flex;
29
+ align-items: center;
30
+ }
31
+ .m-store-item-wrap .content-wrap .name-row .name {
28
32
  overflow: hidden;
29
33
  white-space: nowrap;
30
34
  text-overflow: ellipsis;
35
+ width: fit-content !important;
36
+ }
37
+ .m-store-item-wrap .content-wrap .name-row .new {
38
+ background: rgba(110, 157, 40, 0.25);
39
+ color: #395212;
40
+ font-size: 0.24rem;
41
+ border-radius: 0.08rem;
42
+ padding: 0.1rem 0.12rem;
43
+ margin-left: 0.16rem;
44
+ line-height: 1;
31
45
  }
32
46
  .m-store-item-wrap .content-wrap .desc {
33
47
  overflow: hidden;
@@ -19,6 +19,8 @@ var _commonUtil = require("../../../../../utils/commonUtil");
19
19
 
20
20
  var _coreUtil = require("../../../../../utils/coreUtil");
21
21
 
22
+ var _storeUtil = require("../../../../../utils/storeUtil");
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  var __extends = void 0 && (void 0).__extends || function () {
@@ -210,8 +212,6 @@ var defaultData = [{
210
212
  storeId: 1,
211
213
  storeName: '落落彩虹的大超市',
212
214
  comments: '没有比我面积更大、性价比更高的商品了。',
213
- storeLogoUrl: '/get/resource/store6/conf/20240905/picture/3331831612826257207296_600.jpg',
214
- storePosterUrl: '/get/resource/store6/conf/20240905/picture/11111831612121177927680_600.png',
215
215
  freeShipping: null,
216
216
  distance: '0',
217
217
  deliveryTime: null,
@@ -222,8 +222,6 @@ var defaultData = [{
222
222
  storeId: 2,
223
223
  storeName: '落落彩虹的大超市',
224
224
  comments: '没有比我面积更大、性价比更高的商品了。',
225
- storeLogoUrl: '/get/resource/store6/conf/20240905/picture/3331831612826257207296_600.jpg',
226
- storePosterUrl: '/get/resource/store6/conf/20240905/picture/11111831612121177927680_600.png',
227
225
  freeShipping: 'Y',
228
226
  distance: '18',
229
227
  deliveryTime: null,
@@ -243,24 +241,40 @@ function (_super) {
243
241
  _this.state = {
244
242
  list: []
245
243
  };
244
+ _this.sourceType = '1';
245
+ _this.maxProdNum = 5;
246
246
 
247
247
  _this.getData = function () {
248
248
  return __awaiter(_this, void 0, void 0, function () {
249
- var params, res, list;
249
+ var _a, maxProdNum, sourceType, params, info, res, list;
250
250
 
251
- var _a;
251
+ var _b;
252
252
 
253
- return __generator(this, function (_b) {
254
- switch (_b.label) {
253
+ return __generator(this, function (_c) {
254
+ switch (_c.label) {
255
255
  case 0:
256
+ _a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType;
256
257
  params = {
257
258
  pageIndex: 1,
258
- pageSize: 10
259
+ pageSize: maxProdNum,
260
+ pageTotal: true
259
261
  };
260
262
 
263
+ if (sourceType === '2') {
264
+ params.freeShipping = 'Y';
265
+ } else if (sourceType === '3') {
266
+ params.newFlag = 'Y';
267
+ } else if (sourceType === '4') {
268
+ params.sortType = '1';
269
+ }
270
+
261
271
  if ((0, _commonUtil.isLogin)()) {
262
- params.longitude = '118.78344';
263
- params.latitude = '31.90613';
272
+ info = (0, _storeUtil.getStore)('USER_ADDRESS_INFO') || {};
273
+
274
+ if (info.longitude && info.latitude) {
275
+ params.longitude = info.longitude;
276
+ params.latitude = info.latitude;
277
+ }
264
278
  }
265
279
 
266
280
  return [4
@@ -268,8 +282,8 @@ function (_super) {
268
282
  , (0, _commonUtil.commonFetch)('/designer/v1/h5/store/es', params, 'POST')];
269
283
 
270
284
  case 1:
271
- res = _b.sent();
272
- list = ((_a = res.storePage) === null || _a === void 0 ? void 0 : _a.list) || [];
285
+ res = _c.sent();
286
+ list = ((_b = res.storePage) === null || _b === void 0 ? void 0 : _b.list) || [];
273
287
  this.setState({
274
288
  list: list
275
289
  });
@@ -288,6 +302,14 @@ function (_super) {
288
302
  this.getData();
289
303
  };
290
304
 
305
+ Mobile.prototype.componentWillReceiveProps = function (nextProps) {
306
+ if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum) {
307
+ this.getData();
308
+ this.sourceType = nextProps.panelProps.content.sourceType;
309
+ this.maxProdNum = nextProps.panelProps.content.maxProdNum;
310
+ }
311
+ };
312
+
291
313
  Mobile.prototype.render = function () {
292
314
  var _a;
293
315