@fonixtree/magic-design 2.0.105 → 2.0.108

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 (89) hide show
  1. package/es/common/LinkModal/AffiliateProductTable/index.js +3 -4
  2. package/es/common/LinkModal/AffiliateStore/index.js +3 -4
  3. package/es/common/LinkModal/BundleCampaign/index.js +4 -5
  4. package/es/common/LinkModal/CatgTable/index.js +3 -4
  5. package/es/common/LinkModal/CouponTable/index.js +3 -4
  6. package/es/common/LinkModal/CustomTable/index.js +4 -4
  7. package/es/common/LinkModal/FilteredProductModal/index.js +7 -6
  8. package/es/common/LinkModal/FunctionTable/index.js +4 -4
  9. package/es/common/LinkModal/MiniAppTable/index.js +4 -4
  10. package/es/common/LinkModal/ProductDetailPage/index.js +6 -5
  11. package/es/common/LinkModal/StoreTable/index.js +3 -4
  12. package/es/common/LinkModal/index.js +39 -18
  13. package/es/common/UrlPicker/index.js +5 -1
  14. package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange.png +0 -0
  15. package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-red.png +0 -0
  16. package/es/composite-comp/common/components/MonpayProductItem/index.js +33 -2
  17. package/es/composite-comp/common/components/MonpayProductItem/index.less +36 -0
  18. package/es/composite-comp/dito/components/Recommend/mobile/index.js +1 -1
  19. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +1 -0
  20. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
  21. package/es/composite-comp/dito/components/SearchBar/pc/index.js +1 -1
  22. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +2 -2
  23. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +3 -5
  24. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +7 -4
  25. package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +2 -1
  26. package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +26 -4
  27. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +2 -1
  28. package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +2 -0
  29. package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +4 -2
  30. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +99 -58
  31. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +4 -12
  32. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +1 -1
  33. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -0
  34. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +1 -1
  35. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +7 -6
  36. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +5 -5
  37. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +1 -3
  38. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
  39. package/es/core/SelectUrl/index.js +36 -0
  40. package/es/index.js +16 -0
  41. package/es/locale/en/en.json +1 -1
  42. package/es/locale/id/id.json +1 -1
  43. package/es/meta-comp/components/Text/index.js +1 -1
  44. package/es/meta-comp/config-panels/TextConfig/index.js +1 -0
  45. package/lib/common/LinkModal/AffiliateProductTable/index.js +3 -4
  46. package/lib/common/LinkModal/AffiliateStore/index.js +3 -4
  47. package/lib/common/LinkModal/BundleCampaign/index.js +4 -5
  48. package/lib/common/LinkModal/CatgTable/index.js +3 -4
  49. package/lib/common/LinkModal/CouponTable/index.js +3 -4
  50. package/lib/common/LinkModal/CustomTable/index.js +4 -4
  51. package/lib/common/LinkModal/FilteredProductModal/index.js +7 -6
  52. package/lib/common/LinkModal/FunctionTable/index.js +4 -4
  53. package/lib/common/LinkModal/MiniAppTable/index.js +4 -4
  54. package/lib/common/LinkModal/ProductDetailPage/index.js +6 -5
  55. package/lib/common/LinkModal/StoreTable/index.js +3 -4
  56. package/lib/common/LinkModal/index.js +39 -18
  57. package/lib/common/UrlPicker/index.js +5 -1
  58. package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange.png +0 -0
  59. package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-red.png +0 -0
  60. package/lib/composite-comp/common/components/MonpayProductItem/index.js +33 -2
  61. package/lib/composite-comp/common/components/MonpayProductItem/index.less +36 -0
  62. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +1 -1
  63. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +1 -0
  64. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
  65. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +1 -1
  66. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +2 -2
  67. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +3 -5
  68. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +7 -4
  69. package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +2 -1
  70. package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +26 -4
  71. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +2 -1
  72. package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +2 -0
  73. package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +4 -2
  74. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +99 -58
  75. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +4 -12
  76. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +1 -1
  77. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -0
  78. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +1 -1
  79. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +7 -6
  80. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +5 -5
  81. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +1 -3
  82. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
  83. package/lib/core/SelectUrl/index.js +36 -0
  84. package/lib/index.js +16 -0
  85. package/lib/locale/en/en.json +1 -1
  86. package/lib/locale/id/id.json +1 -1
  87. package/lib/meta-comp/components/Text/index.js +1 -1
  88. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -0
  89. package/package.json +1 -1
@@ -53,6 +53,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
53
53
 
54
54
  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; }
55
55
 
56
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
57
+
56
58
  var __assign = void 0 && (void 0).__assign || function () {
57
59
  __assign = Object.assign || function (t) {
58
60
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -216,23 +218,28 @@ var LinkModal = function LinkModal(props) {
216
218
  var onConfirm = props.onConfirm,
217
219
  onClose = props.onClose,
218
220
  visible = props.visible,
219
- onlySpecificCode = props.onlySpecificCode;
221
+ onlySpecificCode = props.onlySpecificCode,
222
+ selfFetch = props.selfFetch,
223
+ _a = props.modalConfig,
224
+ modalConfig = _a === void 0 ? {} : _a;
225
+
226
+ var _b = (0, _react.useState)(''),
227
+ linkUrl = _b[0],
228
+ setLinkUrl = _b[1];
220
229
 
221
- var _a = (0, _react.useState)(''),
222
- linkUrl = _a[0],
223
- setLinkUrl = _a[1];
230
+ var _c = (0, _react.useState)('Category'),
231
+ selected = _c[0],
232
+ setSelected = _c[1];
224
233
 
225
- var _b = (0, _react.useState)('Category'),
226
- selected = _b[0],
227
- setSelected = _b[1];
234
+ var _d = (0, _react.useState)([]),
235
+ linkTypes = _d[0],
236
+ setLinkTypes = _d[1];
228
237
 
229
- var _c = (0, _react.useState)([]),
230
- linkTypes = _c[0],
231
- setLinkTypes = _c[1];
238
+ var _fetch = selfFetch || _commonUtil.commonFetch;
232
239
 
233
- var _d = (0, _react.useState)(0),
234
- total = _d[0],
235
- setTotal = _d[1];
240
+ var _e = (0, _react.useState)(0),
241
+ total = _e[0],
242
+ setTotal = _e[1];
236
243
 
237
244
  var getLinkTypes = function getLinkTypes() {
238
245
  return __awaiter(void 0, void 0, void 0, function () {
@@ -242,7 +249,7 @@ var LinkModal = function LinkModal(props) {
242
249
  case 0:
243
250
  return [4
244
251
  /*yield*/
245
- , (0, _commonUtil.commonFetch)('/designer/v1/linktypes', {
252
+ , _fetch('/designer/v1/linktypes', {
246
253
  partyType: window.magicDesign.partyType
247
254
  })];
248
255
 
@@ -295,18 +302,18 @@ var LinkModal = function LinkModal(props) {
295
302
  setSelected(type);
296
303
  };
297
304
 
298
- return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
305
+ return /*#__PURE__*/_react["default"].createElement(_antd.Modal, _extends({
299
306
  cancelText: (0, _locale.i18n)('CANCEL'),
300
307
  draggable: false,
301
308
  footer: null,
302
- okText: "OK",
303
- onCancel: onClose // onOk={onConfirm}
309
+ okText: "OK" // onOk={onConfirm}
304
310
  ,
311
+ onCancel: onClose,
305
312
  title: (0, _locale.i18n)('URL_SETUP'),
306
313
  visible: visible,
307
314
  width: "1000px",
308
315
  wrapClassName: "magicLinkModal"
309
- }, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
316
+ }, modalConfig), /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
310
317
  activeKey: selected,
311
318
  onChange: onTabsChange
312
319
  }, linkTypes.map(function (item) {
@@ -318,59 +325,73 @@ var LinkModal = function LinkModal(props) {
318
325
  setLinkUrl(value);
319
326
  }
320
327
  }), item.linkTypeCode === 'Category' && /*#__PURE__*/_react["default"].createElement(_CatgTable["default"], {
328
+ _fetch: _fetch,
321
329
  onChange: function onChange(value) {
322
330
  return setLinkUrl(value);
323
331
  }
324
332
  }), item.linkTypeCode === 'CustomizedPage' && /*#__PURE__*/_react["default"].createElement(_CustomTable["default"], {
333
+ _fetch: _fetch,
325
334
  onChange: function onChange(value) {
326
335
  return setLinkUrl(value);
327
336
  }
328
337
  }), item.linkTypeCode === 'ProductDetailPage' && /*#__PURE__*/_react["default"].createElement(_ProductDetailPage["default"], {
338
+ _fetch: _fetch,
329
339
  onChange: function onChange(url) {
330
340
  return setLinkUrl(url);
331
341
  }
332
342
  }), item.linkTypeCode === 'FilteredProduct' && /*#__PURE__*/_react["default"].createElement(_FilteredProductModal["default"], {
343
+ _fetch: _fetch,
333
344
  onDataChange: function onDataChange(url, t) {
334
345
  setLinkUrl(url);
335
346
  setTotal(t);
336
347
  }
337
348
  }), item.linkTypeCode === 'FunctionPage' && /*#__PURE__*/_react["default"].createElement(_FunctionTable["default"], {
349
+ _fetch: _fetch,
338
350
  onChange: function onChange(value) {
339
351
  return setLinkUrl(value);
340
352
  }
341
353
  }), item.linkTypeCode === 'Coupons' && /*#__PURE__*/_react["default"].createElement(_CouponTable["default"], {
354
+ _fetch: _fetch,
342
355
  onChange: function onChange(value) {
343
356
  return setLinkUrl(value);
344
357
  }
345
358
  }), item.linkTypeCode === 'BundleCampaign' && /*#__PURE__*/_react["default"].createElement(_BundleCampaign["default"], {
359
+ _fetch: _fetch,
346
360
  onChange: function onChange(value) {
347
361
  return setLinkUrl(value);
348
362
  }
349
363
  }), item.linkTypeCode === 'Video' && /*#__PURE__*/_react["default"].createElement(_SelectVideoModal["default"], {
364
+ _fetch: _fetch,
350
365
  setUrl: function setUrl(value) {
351
366
  return setLinkUrl(value);
352
367
  }
353
368
  }), item.linkTypeCode === 'ShareURL' && /*#__PURE__*/_react["default"].createElement(_ShareUrl["default"], {
369
+ _fetch: _fetch,
354
370
  onChange: function onChange(value) {
355
371
  return setLinkUrl(value);
356
372
  }
357
373
  }), item.linkTypeCode === 'MiniApp' && /*#__PURE__*/_react["default"].createElement(_MiniAppTable["default"], {
374
+ _fetch: _fetch,
358
375
  onChange: function onChange(value) {
359
376
  return setLinkUrl(value);
360
377
  }
361
378
  }), item.linkTypeCode === 'Store' && /*#__PURE__*/_react["default"].createElement(_StoreTable["default"], {
379
+ _fetch: _fetch,
362
380
  onChange: function onChange(value) {
363
381
  return setLinkUrl(value);
364
382
  }
365
383
  }), item.linkTypeCode === 'AffiliateProduct' && /*#__PURE__*/_react["default"].createElement(_AffiliateProductTable["default"], {
384
+ _fetch: _fetch,
366
385
  onChange: function onChange(value) {
367
386
  return setLinkUrl(value);
368
387
  }
369
388
  }), item.linkTypeCode === 'AffiliateStore' && /*#__PURE__*/_react["default"].createElement(_AffiliateStore["default"], {
389
+ _fetch: _fetch,
370
390
  onChange: function onChange(value) {
371
391
  return setLinkUrl(value);
372
392
  }
373
393
  }), item.linkTypeCode === 'MiniApi' && /*#__PURE__*/_react["default"].createElement(_MiniAppApi["default"], {
394
+ _fetch: _fetch,
374
395
  onChange: function onChange(value) {
375
396
  return setLinkUrl(value);
376
397
  }
@@ -82,7 +82,9 @@ function (_super) {
82
82
  value = _c.value,
83
83
  _onChange = _c.onChange,
84
84
  disabled = _c.disabled,
85
- onlySpecificCode = _c.onlySpecificCode; // 弹框选择url不可编辑,需要先清除
85
+ onlySpecificCode = _c.onlySpecificCode,
86
+ selfFetch = _c.selfFetch,
87
+ modalConfig = _c.modalConfig; // 弹框选择url不可编辑,需要先清除
86
88
 
87
89
  var editable = !value || !value.type;
88
90
  var inputName = (value === null || value === void 0 ? void 0 : value.name) || '';
@@ -134,6 +136,7 @@ function (_super) {
134
136
  size: "20px",
135
137
  type: "icon-delete1"
136
138
  }))), visible && /*#__PURE__*/_react["default"].createElement(_LinkModal["default"], {
139
+ modalConfig: modalConfig,
137
140
  onClose: function onClose() {
138
141
  return _this.setState({
139
142
  visible: false
@@ -147,6 +150,7 @@ function (_super) {
147
150
  });
148
151
  },
149
152
  onlySpecificCode: onlySpecificCode,
153
+ selfFetch: selfFetch,
150
154
  visible: visible
151
155
  }), anchorModalVisible && /*#__PURE__*/_react["default"].createElement(_AnchorModal["default"], {
152
156
  initData: value,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = void 0;
6
+ exports.renderDiscount = exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -84,6 +84,26 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
84
84
  return t;
85
85
  };
86
86
 
87
+ var renderDiscount = function renderDiscount(data) {
88
+ var AMT = data.discountMethod === 'AMT'; // 金额扣减
89
+
90
+ var DISC = data.discountMethod === 'DISC'; // 百分比
91
+
92
+ var text = '';
93
+
94
+ if (AMT) {
95
+ text = (0, _currencyUtil.formatCurrencyWithSymbol)(data.discountAmount);
96
+ } else if (DISC) {
97
+ var temp = (0, _currencyUtil.formatCurrency)(data.discountAmount, 2); // 折扣券处理:100 => 1%
98
+
99
+ text = parseInt(temp, 10) + "%";
100
+ }
101
+
102
+ return text;
103
+ };
104
+
105
+ exports.renderDiscount = renderDiscount;
106
+
87
107
  var ProductItem =
88
108
  /** @class */
89
109
  function (_super) {
@@ -253,7 +273,18 @@ function (_super) {
253
273
  text: "Sold " + (soldNumber || 0) + "+"
254
274
  }),
255
275
  readonly: true
256
- }))), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
276
+ }))), data.coupons && data.coupons.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
277
+ className: "coupons-list"
278
+ }, data.coupons.map(function (m) {
279
+ return /*#__PURE__*/_react["default"].createElement("div", {
280
+ key: m.couponId,
281
+ className: (0, _classnames["default"])('item', m.discountMethod)
282
+ }, /*#__PURE__*/_react["default"].createElement("div", {
283
+ className: "name"
284
+ }, "DISCOUNT"), /*#__PURE__*/_react["default"].createElement("div", {
285
+ className: "num"
286
+ }, renderDiscount(m)));
287
+ })), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
257
288
  className: "progress-wrap"
258
289
  }, ((_j = panelProps.salesProgress) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
259
290
  className: "progress-container"
@@ -153,6 +153,42 @@
153
153
  }
154
154
  }
155
155
 
156
+ .coupons-list {
157
+ display: flex;
158
+ flex-wrap: wrap;
159
+ margin-top: 8px;
160
+
161
+ .item {
162
+ width: 53px;
163
+ height: 20px;
164
+ color: #F47A46;
165
+ background: url('./imgs/coupon-orange.png') no-repeat center;
166
+ background-size: 100%;
167
+ margin-right: 6px;
168
+ margin-bottom: 4px;
169
+ line-height: 1;
170
+ text-align: center;
171
+ padding: 2px 0;
172
+
173
+ &.DISC {
174
+ color: #FF5757;
175
+ background: url('./imgs/coupon-red.png') no-repeat center;
176
+ }
177
+
178
+ .name {
179
+ font-size: 5px;
180
+ width: 40px;
181
+ margin-bottom: 1px;
182
+ }
183
+
184
+ .num {
185
+ font-size: 10px;
186
+ font-weight: 800;
187
+ width: 40px;
188
+ }
189
+ }
190
+ }
191
+
156
192
  .progress-wrap {
157
193
  margin-top: 10px;
158
194
 
@@ -377,7 +377,7 @@ function (_super) {
377
377
  , 6];
378
378
 
379
379
  case 3:
380
- if (!(sourceType === 'recommend' || sourceType === 'cross')) return [3
380
+ if (!(sourceType === 'recommend')) return [3
381
381
  /*break*/
382
382
  , 5];
383
383
  return [4
@@ -44,6 +44,7 @@ var getDefaultJSON = function getDefaultJSON() {
44
44
  }
45
45
  },
46
46
  keyword: {
47
+ id: (0, _uuid.v4)(),
47
48
  open: true,
48
49
  type: 'InputField',
49
50
  placeholder: 'Tshirt Woman',
@@ -351,7 +351,7 @@ function (_super) {
351
351
  cartNum = _t.cartNum,
352
352
  value = _t.value;
353
353
 
354
- var style = __assign({}, (0, _Text.contentStyle)((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content));
354
+ var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
355
355
 
356
356
  Reflect.deleteProperty(style, 'width');
357
357
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -152,7 +152,7 @@ function (_super) {
152
152
  var data = this.props.data;
153
153
  var inputVal = this.state.inputVal;
154
154
 
155
- var style = __assign({}, (0, _Text.contentStyle)((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content));
155
+ var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
156
156
 
157
157
  Reflect.deleteProperty(style, 'width');
158
158
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -126,7 +126,7 @@ function (_super) {
126
126
  metaOption: panelProps.box,
127
127
  toggleType: 'switch'
128
128
  }, {
129
- key: panelProps.keyword.id,
129
+ key: 'search3',
130
130
  name: (0, _locale.i18n)('SEARCH_BAR_KEYWORD'),
131
131
  toggleType: 'switch',
132
132
  value: /*#__PURE__*/_react["default"].createElement("div", {
@@ -139,7 +139,7 @@ function (_super) {
139
139
  })),
140
140
  metaOption: panelProps.keyword
141
141
  }, {
142
- key: panelProps.icon.id,
142
+ key: 'search4',
143
143
  name: (0, _locale.i18n)('ICON'),
144
144
  toggleType: 'triangle',
145
145
  value: /*#__PURE__*/_react["default"].createElement("div", {
@@ -111,9 +111,7 @@ function (_super) {
111
111
  value: "select"
112
112
  }, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
113
113
  value: "recommend"
114
- }, (0, _locale.i18n)('AI_RECOMMENDATION')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
115
- value: "cross"
116
- }, "Cross Selling"))), /*#__PURE__*/_react["default"].createElement("div", {
114
+ }, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
117
115
  className: "greyBg"
118
116
  }, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
119
117
  onChange: function onChange(ids, type) {
@@ -124,7 +122,7 @@ function (_super) {
124
122
  },
125
123
  prodType: panelProps.prodType,
126
124
  value: panelProps.prodIds
127
- }), (panelProps.sourceType === 'recommend' || panelProps.sourceType === 'cross') && /*#__PURE__*/_react["default"].createElement(_AIRecommendation["default"], {
125
+ }), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_AIRecommendation["default"], {
128
126
  onChange: function onChange(val) {
129
127
  panelProps.intelligentType = val.intelligentType;
130
128
  panelProps.intelligentValue = val.intelligentValue;
@@ -135,7 +133,7 @@ function (_super) {
135
133
  intelligentType: panelProps.intelligentType,
136
134
  intelligentValue: panelProps.intelligentValue
137
135
  }
138
- }), (panelProps.sourceType === 'recommend' || panelProps.sourceType === 'cross') && /*#__PURE__*/_react["default"].createElement(_common.Field, {
136
+ }), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
139
137
  title: (0, _locale.i18n)('PRODUCT_QUANTITY')
140
138
  }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
141
139
  onChange: function onChange(e) {
@@ -314,7 +314,7 @@ function (_super) {
314
314
  interestName: res.interest.interestName,
315
315
  list: list
316
316
  });
317
- this.getMacy();
317
+ if (list.length > 0) this.getMacy();
318
318
  (0, _storeUtil.setMagicStore)("interestProducts_" + (window.magicDesign.pageId || '') + "_" + this.props.panelProps.id, list);
319
319
  return [2
320
320
  /*return*/
@@ -331,7 +331,10 @@ function (_super) {
331
331
  if (!(0, _coreUtil.isDesignMode)()) {
332
332
  this.getData();
333
333
  } else {
334
- this.getMacy();
334
+ if (this.state.list.length > 0) this.getMacy();
335
+ this.setState({
336
+ interestName: 'Interest Name'
337
+ });
335
338
  }
336
339
  };
337
340
 
@@ -340,7 +343,7 @@ function (_super) {
340
343
  var _a = this.state,
341
344
  interestName = _a.interestName,
342
345
  list = _a.list;
343
- return /*#__PURE__*/_react["default"].createElement("div", {
346
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, list.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
344
347
  className: "monpay-interest-products-mobile"
345
348
  }, /*#__PURE__*/_react["default"].createElement("div", {
346
349
  className: "interest-products-title"
@@ -361,7 +364,7 @@ function (_super) {
361
364
  (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
362
365
  }
363
366
  });
364
- })));
367
+ }))));
365
368
  };
366
369
 
367
370
  InterestProductsMobile.defaultProps = {
@@ -47,7 +47,8 @@ var getDefaultJSON = function getDefaultJSON() {
47
47
  fontFamily: 'Open Sans',
48
48
  fontWeight: 400,
49
49
  fontSize: 14,
50
- color: '#000'
50
+ color: '#000',
51
+ urlDisabled: true
51
52
  },
52
53
  underline: {
53
54
  open: false,
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _commonUtil = require("../../../../../../utils/commonUtil");
13
13
 
14
+ var _components = require("../../../../../../meta-comp/components");
15
+
14
16
  var _common = require("../../../../../../common");
15
17
 
16
18
  require("./index.less");
@@ -45,6 +47,22 @@ var __extends = void 0 && (void 0).__extends || function () {
45
47
  };
46
48
  }();
47
49
 
50
+ var __assign = void 0 && (void 0).__assign || function () {
51
+ __assign = Object.assign || function (t) {
52
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
53
+ s = arguments[i];
54
+
55
+ for (var p in s) {
56
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
57
+ }
58
+ }
59
+
60
+ return t;
61
+ };
62
+
63
+ return __assign.apply(this, arguments);
64
+ };
65
+
48
66
  var __rest = void 0 && (void 0).__rest || function (s, e) {
49
67
  var t = {};
50
68
 
@@ -73,8 +91,9 @@ function (_super) {
73
91
  ProductItem.prototype.render = function () {
74
92
  var _a = this.props,
75
93
  data = _a.data,
94
+ panelProps = _a.panelProps,
76
95
  onItemClick = _a.onItemClick,
77
- rest = __rest(_a, ["data", "onItemClick"]);
96
+ rest = __rest(_a, ["data", "panelProps", "onItemClick"]);
78
97
 
79
98
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
80
99
  className: (0, _classnames["default"])('monpay-merchant-product-item-wrap'),
@@ -89,9 +108,12 @@ function (_super) {
89
108
  src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent)
90
109
  }), /*#__PURE__*/_react["default"].createElement("div", {
91
110
  className: "sale-tag"
92
- })), /*#__PURE__*/_react["default"].createElement("div", {
93
- className: "prodName"
94
- }, data.offerName));
111
+ })), panelProps.merchantName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
112
+ className: "prodName",
113
+ data: __assign(__assign({}, panelProps.merchantName), {
114
+ text: data.offerName
115
+ })
116
+ }));
95
117
  };
96
118
 
97
119
  ProductItem.defaultProps = {
@@ -284,7 +284,8 @@ function (_super) {
284
284
  data: item,
285
285
  onItemClick: function onItemClick() {
286
286
  (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
287
- }
287
+ },
288
+ panelProps: panelProps.content
288
289
  });
289
290
  }))));
290
291
  };
@@ -115,6 +115,7 @@ var getDefaultJSON = function getDefaultJSON() {
115
115
  hover: null
116
116
  },
117
117
  sessionTime: {
118
+ id: (0, _uuid.v4)(),
118
119
  open: false
119
120
  }
120
121
  },
@@ -284,6 +285,7 @@ var getDefaultJSON = function getDefaultJSON() {
284
285
  color: '#FF8650'
285
286
  },
286
287
  stock: {
288
+ id: (0, _uuid.v4)(),
287
289
  open: true
288
290
  }
289
291
  },
@@ -305,7 +305,8 @@ var getDefaultJSON = function getDefaultJSON() {
305
305
  fontFamily: 'Open Sans',
306
306
  fontWeight: 400,
307
307
  fontSize: 10,
308
- color: '#545454'
308
+ color: '#545454',
309
+ urlDisabled: true
309
310
  },
310
311
  underline: {
311
312
  open: false,
@@ -328,7 +329,8 @@ var getDefaultJSON = function getDefaultJSON() {
328
329
  fontFamily: 'Open Sans',
329
330
  fontWeight: 400,
330
331
  fontSize: 10,
331
- color: '#545454'
332
+ color: '#545454',
333
+ urlDisabled: true
332
334
  },
333
335
  underline: {
334
336
  open: false,