@fonixtree/magic-design 2.0.98 → 2.0.100

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 (165) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +23 -3
  2. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/common/PopUpModal/index.js +349 -0
  7. package/es/common/PopUpModal/index.less +79 -0
  8. package/es/common/PopUpModal1/index.js +164 -0
  9. package/es/common/PopUpModal1/style.less +56 -0
  10. package/es/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
  11. package/es/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
  12. package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
  13. package/es/common/ProductFilterModal/index.js +366 -0
  14. package/es/common/ProductFilterModal/index.less +72 -0
  15. package/es/common/Tag/index.js +46 -0
  16. package/es/common/Tag/index.less +16 -0
  17. package/es/common/index.js +16 -0
  18. package/es/composite-comp/common/components/MonpayProductItem/index.js +1 -1
  19. package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
  20. package/es/composite-comp/monpay/components/Bundle/index.js +86 -0
  21. package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
  22. package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
  23. package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
  24. package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
  25. package/es/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
  26. package/es/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
  27. package/es/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
  28. package/es/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
  29. package/es/composite-comp/monpay/components/InterestProducts/index.js +86 -0
  30. package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
  31. package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
  32. package/es/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
  33. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
  34. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
  35. package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
  36. package/es/composite-comp/monpay/components/MerchantSales/index.js +86 -0
  37. package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
  38. package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
  39. package/es/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
  40. package/es/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
  41. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
  42. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
  43. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
  44. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
  45. package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
  46. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
  47. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
  48. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
  49. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
  50. package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
  51. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
  52. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
  53. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
  54. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
  55. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
  56. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
  57. package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  58. package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
  59. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
  60. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
  61. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
  62. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
  63. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  64. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
  65. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
  66. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
  67. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
  68. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
  69. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  70. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
  71. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
  72. package/es/constants/component-types.js +14 -2
  73. package/es/constants/index.js +34 -3
  74. package/es/locale/en/en.json +10 -0
  75. package/es/locale/es/es.json +10 -0
  76. package/es/locale/id/id.json +10 -0
  77. package/lib/assets/fonts/magic-box-iconfont.css +23 -3
  78. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  79. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  80. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  81. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  82. package/lib/common/PopUpModal/index.js +349 -0
  83. package/lib/common/PopUpModal/index.less +79 -0
  84. package/lib/common/PopUpModal1/index.js +164 -0
  85. package/lib/common/PopUpModal1/style.less +56 -0
  86. package/lib/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
  87. package/lib/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
  88. package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
  89. package/lib/common/ProductFilterModal/index.js +366 -0
  90. package/lib/common/ProductFilterModal/index.less +72 -0
  91. package/lib/common/Tag/index.js +46 -0
  92. package/lib/common/Tag/index.less +16 -0
  93. package/lib/common/index.js +16 -0
  94. package/lib/composite-comp/common/components/MonpayProductItem/index.js +1 -1
  95. package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
  96. package/lib/composite-comp/monpay/components/Bundle/index.js +86 -0
  97. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
  98. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
  99. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
  100. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
  101. package/lib/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
  102. package/lib/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
  103. package/lib/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
  104. package/lib/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
  105. package/lib/composite-comp/monpay/components/InterestProducts/index.js +86 -0
  106. package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
  107. package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
  108. package/lib/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
  109. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
  110. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
  111. package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
  112. package/lib/composite-comp/monpay/components/MerchantSales/index.js +86 -0
  113. package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
  114. package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
  115. package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
  116. package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
  117. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
  118. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
  119. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
  120. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
  121. package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
  122. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
  123. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
  124. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
  125. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
  126. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
  127. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
  128. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
  129. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
  130. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
  131. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
  132. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
  133. package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  134. package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
  135. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
  136. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
  137. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
  138. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
  139. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  140. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
  141. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
  142. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
  143. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
  144. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
  145. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  146. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
  147. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
  148. package/lib/constants/component-types.js +14 -2
  149. package/lib/constants/index.js +34 -3
  150. package/lib/locale/en/en.json +10 -0
  151. package/lib/locale/es/es.json +10 -0
  152. package/lib/locale/id/id.json +10 -0
  153. package/package.json +1 -1
  154. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
  155. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
  156. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
  157. package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
  158. package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
  159. package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
  160. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
  161. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
  162. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
  163. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
  164. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
  165. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
@@ -0,0 +1,493 @@
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 _BundleItem = _interopRequireDefault(require("./BundleItem"));
13
+
14
+ var _card = _interopRequireDefault(require("./img/card.png"));
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
17
+
18
+ var _components = require("../../../../../meta-comp/components");
19
+
20
+ var _commonUtil = require("../../../../../utils/commonUtil");
21
+
22
+ var _storeUtil = require("../../../../../utils/storeUtil");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
53
+ function adopt(value) {
54
+ return value instanceof P ? value : new P(function (resolve) {
55
+ resolve(value);
56
+ });
57
+ }
58
+
59
+ return new (P || (P = Promise))(function (resolve, reject) {
60
+ function fulfilled(value) {
61
+ try {
62
+ step(generator.next(value));
63
+ } catch (e) {
64
+ reject(e);
65
+ }
66
+ }
67
+
68
+ function rejected(value) {
69
+ try {
70
+ step(generator["throw"](value));
71
+ } catch (e) {
72
+ reject(e);
73
+ }
74
+ }
75
+
76
+ function step(result) {
77
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
78
+ }
79
+
80
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
81
+ });
82
+ };
83
+
84
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
85
+ var _ = {
86
+ label: 0,
87
+ sent: function sent() {
88
+ if (t[0] & 1) throw t[1];
89
+ return t[1];
90
+ },
91
+ trys: [],
92
+ ops: []
93
+ },
94
+ f,
95
+ y,
96
+ t,
97
+ g;
98
+ return g = {
99
+ next: verb(0),
100
+ "throw": verb(1),
101
+ "return": verb(2)
102
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
103
+ return this;
104
+ }), g;
105
+
106
+ function verb(n) {
107
+ return function (v) {
108
+ return step([n, v]);
109
+ };
110
+ }
111
+
112
+ function step(op) {
113
+ if (f) throw new TypeError("Generator is already executing.");
114
+
115
+ while (_) {
116
+ try {
117
+ 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;
118
+ if (y = 0, t) op = [op[0] & 2, t.value];
119
+
120
+ switch (op[0]) {
121
+ case 0:
122
+ case 1:
123
+ t = op;
124
+ break;
125
+
126
+ case 4:
127
+ _.label++;
128
+ return {
129
+ value: op[1],
130
+ done: false
131
+ };
132
+
133
+ case 5:
134
+ _.label++;
135
+ y = op[1];
136
+ op = [0];
137
+ continue;
138
+
139
+ case 7:
140
+ op = _.ops.pop();
141
+
142
+ _.trys.pop();
143
+
144
+ continue;
145
+
146
+ default:
147
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
148
+ _ = 0;
149
+ continue;
150
+ }
151
+
152
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
153
+ _.label = op[1];
154
+ break;
155
+ }
156
+
157
+ if (op[0] === 6 && _.label < t[1]) {
158
+ _.label = t[1];
159
+ t = op;
160
+ break;
161
+ }
162
+
163
+ if (t && _.label < t[2]) {
164
+ _.label = t[2];
165
+
166
+ _.ops.push(op);
167
+
168
+ break;
169
+ }
170
+
171
+ if (t[2]) _.ops.pop();
172
+
173
+ _.trys.pop();
174
+
175
+ continue;
176
+ }
177
+
178
+ op = body.call(thisArg, _);
179
+ } catch (e) {
180
+ op = [6, e];
181
+ y = 0;
182
+ } finally {
183
+ f = t = 0;
184
+ }
185
+ }
186
+
187
+ if (op[0] & 5) throw op[1];
188
+ return {
189
+ value: op[0] ? op[1] : void 0,
190
+ done: true
191
+ };
192
+ }
193
+ };
194
+
195
+ var defaultData = [{
196
+ campaignId: 5148,
197
+ campaignName: 'Campaign Name',
198
+ price: 10000,
199
+ storeId: 596,
200
+ storeName: 'awesome store',
201
+ marketPrice: 20000,
202
+ spu: [{
203
+ offerId: 2860,
204
+ offerName: 'Offer Name',
205
+ num: 1,
206
+ sku: [{
207
+ productId: 5833,
208
+ productName: 'Product Name',
209
+ imgUrl: _card["default"],
210
+ salesPrice: 2600,
211
+ specAttrValues: [{
212
+ attrName: 'Capacity',
213
+ attrCode: 'EC_SKU_CAPACITY',
214
+ attrId: 102927,
215
+ seq: 1,
216
+ value: '256G',
217
+ attrValues: [{
218
+ attrValueId: 115987,
219
+ showType: null,
220
+ attrId: 102927,
221
+ value: '128G',
222
+ valueMark: null,
223
+ seq: 1,
224
+ valueRule: null,
225
+ attrGroupId: null,
226
+ inputType: null
227
+ }, {
228
+ attrValueId: 115988,
229
+ showType: null,
230
+ attrId: 102927,
231
+ value: '256G',
232
+ valueMark: null,
233
+ seq: 2,
234
+ valueRule: null,
235
+ attrGroupId: null,
236
+ inputType: null
237
+ }]
238
+ }, {
239
+ attrName: 'Color',
240
+ attrCode: 'EC_SKU_COLOR',
241
+ attrId: 102928,
242
+ seq: 2,
243
+ value: '黑色',
244
+ attrValues: [{
245
+ attrValueId: 115989,
246
+ showType: null,
247
+ attrId: 102928,
248
+ value: '白色',
249
+ valueMark: null,
250
+ seq: 1,
251
+ valueRule: null,
252
+ attrGroupId: null,
253
+ inputType: null
254
+ }, {
255
+ attrValueId: 115990,
256
+ showType: null,
257
+ attrId: 102928,
258
+ value: '黑色',
259
+ valueMark: null,
260
+ seq: 2,
261
+ valueRule: null,
262
+ attrGroupId: null,
263
+ inputType: null
264
+ }]
265
+ }]
266
+ }]
267
+ }, {
268
+ offerId: 2861,
269
+ offerName: 'Offer Name',
270
+ num: 1,
271
+ sku: [{
272
+ productId: 5834,
273
+ productName: 'Product Name',
274
+ imgUrl: _card["default"],
275
+ salesPrice: 2600,
276
+ specAttrValues: [{
277
+ attrName: 'Capacity',
278
+ attrCode: 'EC_SKU_CAPACITY',
279
+ attrId: 102927,
280
+ seq: 1,
281
+ value: '256G',
282
+ attrValues: [{
283
+ attrValueId: 115987,
284
+ showType: null,
285
+ attrId: 102927,
286
+ value: '128G',
287
+ valueMark: null,
288
+ seq: 1,
289
+ valueRule: null,
290
+ attrGroupId: null,
291
+ inputType: null
292
+ }, {
293
+ attrValueId: 115988,
294
+ showType: null,
295
+ attrId: 102927,
296
+ value: '256G',
297
+ valueMark: null,
298
+ seq: 2,
299
+ valueRule: null,
300
+ attrGroupId: null,
301
+ inputType: null
302
+ }]
303
+ }, {
304
+ attrName: 'Color',
305
+ attrCode: 'EC_SKU_COLOR',
306
+ attrId: 102928,
307
+ seq: 2,
308
+ value: '黑色',
309
+ attrValues: [{
310
+ attrValueId: 115989,
311
+ showType: null,
312
+ attrId: 102928,
313
+ value: '白色',
314
+ valueMark: null,
315
+ seq: 1,
316
+ valueRule: null,
317
+ attrGroupId: null,
318
+ inputType: null
319
+ }, {
320
+ attrValueId: 115990,
321
+ showType: null,
322
+ attrId: 102928,
323
+ value: '黑色',
324
+ valueMark: null,
325
+ seq: 2,
326
+ valueRule: null,
327
+ attrGroupId: null,
328
+ inputType: null
329
+ }]
330
+ }]
331
+ }]
332
+ }, {
333
+ offerId: 2859,
334
+ offerName: 'Offer Name',
335
+ num: 1,
336
+ sku: [{
337
+ productId: 5832,
338
+ productName: 'Product Name',
339
+ imgUrl: _card["default"],
340
+ salesPrice: 2600,
341
+ specAttrValues: [{
342
+ attrName: 'Capacity',
343
+ attrCode: 'EC_SKU_CAPACITY',
344
+ attrId: 102927,
345
+ seq: 1,
346
+ value: '256G',
347
+ attrValues: [{
348
+ attrValueId: 115987,
349
+ showType: null,
350
+ attrId: 102927,
351
+ value: '128G',
352
+ valueMark: null,
353
+ seq: 1,
354
+ valueRule: null,
355
+ attrGroupId: null,
356
+ inputType: null
357
+ }, {
358
+ attrValueId: 115988,
359
+ showType: null,
360
+ attrId: 102927,
361
+ value: '256G',
362
+ valueMark: null,
363
+ seq: 2,
364
+ valueRule: null,
365
+ attrGroupId: null,
366
+ inputType: null
367
+ }]
368
+ }, {
369
+ attrName: 'Color',
370
+ attrCode: 'EC_SKU_COLOR',
371
+ attrId: 102928,
372
+ seq: 2,
373
+ value: '黑色',
374
+ attrValues: [{
375
+ attrValueId: 115989,
376
+ showType: null,
377
+ attrId: 102928,
378
+ value: '白色',
379
+ valueMark: null,
380
+ seq: 1,
381
+ valueRule: null,
382
+ attrGroupId: null,
383
+ inputType: null
384
+ }, {
385
+ attrValueId: 115990,
386
+ showType: null,
387
+ attrId: 102928,
388
+ value: '黑色',
389
+ valueMark: null,
390
+ seq: 2,
391
+ valueRule: null,
392
+ attrGroupId: null,
393
+ inputType: null
394
+ }]
395
+ }]
396
+ }]
397
+ }]
398
+ }];
399
+
400
+ var BundleMobile =
401
+ /** @class */
402
+ function (_super) {
403
+ __extends(BundleMobile, _super);
404
+
405
+ function BundleMobile() {
406
+ var _this = _super !== null && _super.apply(this, arguments) || this;
407
+
408
+ _this.maxProdNum = 0;
409
+ _this.state = {
410
+ list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
411
+ return (0, _storeUtil.getMagicStore)("bundle_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
412
+ }, [])
413
+ };
414
+
415
+ _this.getData = function () {
416
+ return __awaiter(_this, void 0, void 0, function () {
417
+ var maxProdNum, params, res, list;
418
+
419
+ var _a;
420
+
421
+ return __generator(this, function (_b) {
422
+ switch (_b.label) {
423
+ case 0:
424
+ maxProdNum = this.props.panelProps.content.maxProdNum;
425
+ params = {
426
+ pageIndex: 1,
427
+ pageSize: maxProdNum
428
+ };
429
+ return [4
430
+ /*yield*/
431
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/bundle/es/list', params, 'POST')];
432
+
433
+ case 1:
434
+ res = _b.sent();
435
+ list = (_a = res === null || res === void 0 ? void 0 : res.pageInfo) === null || _a === void 0 ? void 0 : _a.list;
436
+ this.setState({
437
+ list: list
438
+ });
439
+
440
+ if (!(0, _coreUtil.isDesignMode)()) {
441
+ (0, _storeUtil.setMagicStore)("bundle_" + (window.magicDesign.pageId || '') + "_" + this.props.panelProps.id, list);
442
+ }
443
+
444
+ return [2
445
+ /*return*/
446
+ ];
447
+ }
448
+ });
449
+ });
450
+ };
451
+
452
+ return _this;
453
+ }
454
+
455
+ BundleMobile.prototype.componentDidMount = function () {
456
+ this.getData();
457
+ };
458
+
459
+ BundleMobile.prototype.componentWillReceiveProps = function (nextProps) {
460
+ if (nextProps.panelProps.content.maxProdNum !== this.maxProdNum) {
461
+ this.maxProdNum = nextProps.panelProps.content.maxProdNum;
462
+ this.getData();
463
+ }
464
+ };
465
+
466
+ BundleMobile.prototype.render = function () {
467
+ var panelProps = this.props.panelProps;
468
+ var list = this.state.list;
469
+
470
+ var _list = list.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : list;
471
+
472
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _list.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
473
+ className: "monpay-bundle-mobile"
474
+ }, panelProps.title.headerImage.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
475
+ className: "headerImg",
476
+ data: panelProps.title.headerImage
477
+ }), /*#__PURE__*/_react["default"].createElement("div", {
478
+ className: "bundle-list"
479
+ }, _list.map(function (item) {
480
+ return /*#__PURE__*/_react["default"].createElement(_BundleItem["default"], {
481
+ data: item
482
+ });
483
+ }))));
484
+ };
485
+
486
+ BundleMobile.defaultProps = {
487
+ panelProps: {}
488
+ };
489
+ return BundleMobile;
490
+ }(_react["default"].Component);
491
+
492
+ var _default = BundleMobile;
493
+ exports["default"] = _default;
@@ -0,0 +1,7 @@
1
+ .monpay-bundle-mobile {
2
+ padding: 0.4rem;
3
+ }
4
+ .monpay-bundle-mobile .headerImg {
5
+ display: block;
6
+ margin-bottom: 0.4rem;
7
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var getDefaultJSON = function getDefaultJSON() {
11
+ var contentId = (0, _uuid.v4)();
12
+ return {
13
+ id: (0, _uuid.v4)(),
14
+ type: 'INTEREST_PRODUCTS',
15
+ title: {
16
+ headline: {
17
+ id: (0, _uuid.v4)(),
18
+ open: true,
19
+ type: 'TEXT',
20
+ specialContent: [],
21
+ text: 'Nutrition & Wellness supplements',
22
+ content: {
23
+ sizeType: 'Customize font styles',
24
+ fontFamily: 'Open Sans',
25
+ fontWeight: 600,
26
+ fontSize: 15,
27
+ color: '#000'
28
+ },
29
+ underline: {
30
+ open: false,
31
+ textDecorationColor: '',
32
+ textDecorationStyle: 'solid'
33
+ },
34
+ vertical: {
35
+ open: false,
36
+ lineHeight: 18
37
+ }
38
+ },
39
+ seeAll: {
40
+ open: true
41
+ }
42
+ },
43
+ content: {
44
+ id: contentId,
45
+ sourceType: '1',
46
+ maxProdNum: 4
47
+ },
48
+ spacing: {
49
+ pc: {
50
+ paddingTop: 0,
51
+ paddingBottom: 0,
52
+ paddingLeft: 0,
53
+ paddingRight: 0,
54
+ marginBottom: window.magicDesign.compSpacing * 1.5
55
+ },
56
+ mobile: {
57
+ paddingTop: 0,
58
+ paddingBottom: 0,
59
+ paddingLeft: 0,
60
+ paddingRight: 0,
61
+ marginBottom: window.magicDesign.compSpacing
62
+ }
63
+ },
64
+ customize: {
65
+ layout: 'layout1',
66
+ align: 'left',
67
+ pcRowNum: 6,
68
+ pcMaxRowNum: 6,
69
+ pcMinRowNum: 5
70
+ },
71
+ background: {
72
+ opacity: 100,
73
+ color: '#fff',
74
+ image: '',
75
+ bgType: 'color'
76
+ }
77
+ };
78
+ };
79
+
80
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _mobile = _interopRequireDefault(require("./mobile"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _coreUtil = require("../../../../utils/coreUtil");
15
+
16
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ 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); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ 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--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var InterestProducts =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(InterestProducts, _super);
66
+
67
+ function InterestProducts() {
68
+ return _super !== null && _super.apply(this, arguments) || this;
69
+ }
70
+
71
+ InterestProducts.prototype.render = function () {
72
+ var nodeData = this.props.nodeData;
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
74
+ panelProps: nodeData
75
+ }));
76
+ };
77
+
78
+ InterestProducts.defaultProps = {};
79
+ InterestProducts.type = 'INTEREST_PRODUCTS';
80
+ InterestProducts.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ InterestProducts = __decorate([_compositeDecorator["default"]], InterestProducts);
82
+ return InterestProducts;
83
+ }(_react.Component);
84
+
85
+ var _default = InterestProducts;
86
+ exports["default"] = _default;