@fonixtree/magic-design 0.0.48 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/es/assets/less/cylon-antd.less +32526 -32526
  2. package/es/common/LinkModal/BundleCampaign/index.less +17 -0
  3. package/es/common/LinkModal/CatgTable/index.js +1 -1
  4. package/es/common/LinkModal/CouponTable/index.js +2 -2
  5. package/es/common/LinkModal/CustomTable/index.js +1 -1
  6. package/es/common/LinkModal/FilteredProductModal/index.js +72 -24
  7. package/es/common/LinkModal/FunctionTable/index.js +1 -1
  8. package/es/common/LinkModal/ProductDetailPage/index.js +96 -23
  9. package/es/common/LinkModal/index.js +7 -1
  10. package/es/common/LinkModal/index.less +1 -1
  11. package/es/common/ProductModal/index.js +75 -36
  12. package/es/common/ProductSource/index.js +3 -1
  13. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  14. package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
  15. package/es/composite-comp/common/components/ProductItem/index.less +6 -7
  16. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
  17. package/es/composite-comp/dito/components/Recommend/mobile/index.js +24 -30
  18. package/es/composite-comp/dito/components/Recommend/pc/index.js +5 -3
  19. package/es/composite-comp/dito/components/Recommend/pc/index.less +4 -1
  20. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +19 -15
  21. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
  22. package/es/core/Designer/PageCompList/index.less +10 -10
  23. package/es/locale/index.js +3 -1
  24. package/es/meta-comp/components/Image/index.js +6 -3
  25. package/lib/assets/less/cylon-antd.less +32526 -32526
  26. package/lib/common/LinkModal/BundleCampaign/index.less +17 -0
  27. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  28. package/lib/common/LinkModal/CouponTable/index.js +2 -2
  29. package/lib/common/LinkModal/CustomTable/index.js +1 -1
  30. package/lib/common/LinkModal/FilteredProductModal/index.js +72 -24
  31. package/lib/common/LinkModal/FunctionTable/index.js +1 -1
  32. package/lib/common/LinkModal/ProductDetailPage/index.js +96 -23
  33. package/lib/common/LinkModal/index.js +7 -1
  34. package/lib/common/LinkModal/index.less +1 -1
  35. package/lib/common/ProductModal/index.js +75 -36
  36. package/lib/common/ProductSource/index.js +3 -1
  37. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  38. package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
  39. package/lib/composite-comp/common/components/ProductItem/index.less +6 -7
  40. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
  41. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +24 -30
  42. package/lib/composite-comp/dito/components/Recommend/pc/index.js +5 -3
  43. package/lib/composite-comp/dito/components/Recommend/pc/index.less +4 -1
  44. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +19 -15
  45. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
  46. package/lib/core/Designer/PageCompList/index.less +10 -10
  47. package/lib/locale/index.js +3 -1
  48. package/lib/meta-comp/components/Image/index.js +6 -3
  49. package/package.json +1 -1
@@ -12,8 +12,7 @@
12
12
  }
13
13
  }
14
14
 
15
- &.position-1,
16
- &.position-default {
15
+ &.position-1 {
17
16
  top: 0;
18
17
  left: 0;
19
18
  }
@@ -32,4 +31,9 @@
32
31
  bottom: 0;
33
32
  right: 0;
34
33
  }
34
+
35
+ &.position-null {
36
+ top: 0;
37
+ left: 0;
38
+ }
35
39
  }
@@ -4,14 +4,11 @@
4
4
  background: #FFFFFF;
5
5
  border: 1px solid #D2D9E5;
6
6
  width: 142px;
7
- border-radius: 8px;
8
7
 
9
8
  .img-wrap {
10
9
  position: relative;
11
- border-radius: 8px;
12
10
 
13
11
  .product-img {
14
- border-radius: 8px;
15
12
  width: 140px;
16
13
  height: 140px;
17
14
  object-fit: cover;
@@ -36,7 +33,7 @@
36
33
  }
37
34
 
38
35
  .product-name {
39
- margin-bottom: 5px;
36
+ margin-bottom: 3px;
40
37
  // font-family: 'Montserrat';
41
38
  // font-style: normal;
42
39
  // font-weight: 500;
@@ -60,7 +57,7 @@
60
57
 
61
58
  .old-price-wrap {
62
59
  display: flex;
63
- margin-top: 3px;
60
+ margin-top: 0px;
64
61
  align-items: baseline;
65
62
  white-space: nowrap;
66
63
  overflow: hidden;
@@ -71,9 +68,11 @@
71
68
  font-family: 'Montserrat';
72
69
  font-style: normal;
73
70
  font-weight: 700;
74
- font-size: 12px;
71
+ font-size: 8px;
75
72
  line-height: 15px;
76
- color: #2F3043;
73
+ color: #fff;
74
+ padding: 0 4px;
75
+ background-color: #CE1126;
77
76
  }
78
77
 
79
78
  .old-price {
@@ -279,8 +279,14 @@ var getDefaultJSON = function getDefaultJSON() {
279
279
  }
280
280
  },
281
281
  customize: {
282
- layout: 'left',
283
- align: 'left'
282
+ layout: {
283
+ pcLayout: 'layout1',
284
+ h5Layout: 'layout1'
285
+ },
286
+ align: 'left',
287
+ pcRowNum: 6,
288
+ pcMaxRowNum: 6,
289
+ pcMinRowNum: 5
284
290
  },
285
291
  background: {
286
292
  opacity: 100,
@@ -227,10 +227,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
227
227
  };
228
228
 
229
229
  var LAYOUT_IMAGE_SIZE = {
230
- left: {
231
- w: '100%',
232
- h: 165
233
- },
234
230
  layout1: {
235
231
  w: '100%',
236
232
  h: 164
@@ -416,10 +412,8 @@ function (_super) {
416
412
  };
417
413
 
418
414
  _this.resetLayout = function () {
419
- var layout = _this.props.panelProps.customize.layout.h5Layout || _this.props.panelProps.customize.layout; // 后面删除
420
-
415
+ var layout = _this.props.panelProps.customize.layout.h5Layout;
421
416
  var LAYOUT_COLUMN = {
422
- left: 2,
423
417
  layout1: 2,
424
418
  layout2: 1,
425
419
  layout3: 3
@@ -543,7 +537,7 @@ function (_super) {
543
537
  hideTabs: hideTabs
544
538
  });
545
539
  });
546
- var curLayout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
540
+ var curLayout = panelProps.customize.layout.h5Layout;
547
541
 
548
542
  if (curLayout !== this.preLayout) {
549
543
  this.resetLayout();
@@ -565,7 +559,7 @@ function (_super) {
565
559
  var bgStyle = this.getBackgroundStyle();
566
560
  var products = this.state["products" + tabIndex] || [];
567
561
  var isDivide = groupSource.length <= 3;
568
- var layout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
562
+ var layout = panelProps.customize.layout.h5Layout;
569
563
 
570
564
  var _seeAll = (0, _commonUtil.ensure)(function () {
571
565
  return groupSource[tabIndex].seeAll;
@@ -617,47 +611,47 @@ function (_super) {
617
611
  transform: "translateX(" + tabLeft + "px)",
618
612
  background: this.getTabBarActiveColor(panelProps)
619
613
  }
620
- })), ['layout4', 'layout5'].includes(layout) ? /*#__PURE__*/_react["default"].createElement("div", {
621
- key: "scrollContainer",
622
- className: (0, _classnames["default"])('scrollContainer', {
623
- pl_100: layout === 'layout5'
624
- })
614
+ })), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
615
+ key: "macyContainer",
616
+ className: "macyContainer"
625
617
  }, products.map(function (item) {
626
- return /*#__PURE__*/_react["default"].createElement("div", {
627
- className: "productCard"
628
- }, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
629
- key: "scroll_" + item.productId,
618
+ return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
619
+ key: item.productId,
630
620
  data: item,
631
- fixHeight: true,
621
+ fixHeight: layout === 'layout3',
632
622
  imgHeight: imgHeight,
633
623
  imgWidth: imgWidth,
624
+ layout: layout === 'layout2' ? 'horizontal' : 'vertical',
634
625
  onItemClick: function onItemClick() {
635
626
  return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
636
627
  },
637
628
  panelProps: panelProps.content,
638
629
  showProgress: false
639
- }));
640
- }), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
630
+ });
631
+ })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
641
632
  className: "btnSeeAll",
642
633
  data: _seeAll
643
- })) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
644
- key: "macyContainer",
645
- className: "macyContainer"
634
+ })) : /*#__PURE__*/_react["default"].createElement("div", {
635
+ key: "scrollContainer",
636
+ className: (0, _classnames["default"])('scrollContainer', {
637
+ pl_100: layout === 'layout5'
638
+ })
646
639
  }, products.map(function (item) {
647
- return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
648
- key: item.productId,
640
+ return /*#__PURE__*/_react["default"].createElement("div", {
641
+ className: "productCard"
642
+ }, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
643
+ key: "scroll_" + item.productId,
649
644
  data: item,
650
- fixHeight: layout === 'layout3',
645
+ fixHeight: true,
651
646
  imgHeight: imgHeight,
652
647
  imgWidth: imgWidth,
653
- layout: layout === 'layout2' ? 'horizontal' : 'vertical',
654
648
  onItemClick: function onItemClick() {
655
649
  return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
656
650
  },
657
651
  panelProps: panelProps.content,
658
652
  showProgress: false
659
- });
660
- })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
653
+ }));
654
+ }), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
661
655
  className: "btnSeeAll",
662
656
  data: _seeAll
663
657
  })));
@@ -228,7 +228,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
228
228
 
229
229
  var LAYOUT_IMAGE_SIZE = {
230
230
  layout1: {
231
- w: 180,
231
+ w: '100%',
232
232
  h: 180
233
233
  },
234
234
  layout2: {
@@ -524,7 +524,7 @@ function (_super) {
524
524
  hideTabs: hideTabs
525
525
  });
526
526
  });
527
- var curLayout = panelProps.customize.layout.pcLayout;
527
+ var curLayout = JSON.stringify(panelProps.customize);
528
528
 
529
529
  if (curLayout !== this.preLayout) {
530
530
  this.resetLayout();
@@ -615,7 +615,9 @@ function (_super) {
615
615
  showProgress: false
616
616
  });
617
617
  })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
618
- className: "btnSeeAll",
618
+ className: (0, _classnames["default"])('btnSeeAll', {
619
+ line: layout === 'layout1'
620
+ }),
619
621
  data: _seeAll
620
622
  })) : /*#__PURE__*/_react["default"].createElement("div", {
621
623
  key: "scrollContainer",
@@ -75,6 +75,9 @@
75
75
  display: block;
76
76
  width: fit-content;
77
77
  min-width: 80px;
78
- margin: 0 auto;
78
+
79
+ &.line {
80
+ margin: 0 auto 10px auto;
81
+ }
79
82
  }
80
83
  }
@@ -25,6 +25,8 @@ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
25
25
 
26
26
  var _coreUtil = require("../../../../utils/coreUtil");
27
27
 
28
+ require("./index.less");
29
+
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
31
 
30
32
  var __extends = void 0 && (void 0).__extends || function () {
@@ -74,8 +76,9 @@ function (_super) {
74
76
  };
75
77
  }
76
78
 
77
- var productSource = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
78
- split: "dashed",
79
+ var productSource = /*#__PURE__*/_react["default"].createElement("div", {
80
+ className: "sourceOfProduct"
81
+ }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
79
82
  title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
80
83
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
81
84
  onChange: function onChange(v) {
@@ -88,7 +91,9 @@ function (_super) {
88
91
  value: "select"
89
92
  }, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
90
93
  value: "recommend"
91
- }, (0, _locale.i18n)('AI_RECOMMENDATION')))), panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
94
+ }, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
95
+ className: "greyBg"
96
+ }, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
92
97
  onChange: function onChange(v) {
93
98
  panelProps.prodIds = v;
94
99
 
@@ -107,7 +112,6 @@ function (_super) {
107
112
  intelligentValue: panelProps.intelligentValue
108
113
  }
109
114
  }), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
110
- split: "dashed",
111
115
  title: (0, _locale.i18n)('PRODUCT_QUANTITY')
112
116
  }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
113
117
  onChange: function onChange(e) {
@@ -124,7 +128,7 @@ function (_super) {
124
128
  value: 50
125
129
  }, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
126
130
  value: 100
127
- }, "\u2264100"))));
131
+ }, "\u2264100")))));
128
132
 
129
133
  var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
130
134
  divider: "dashed",
@@ -167,16 +171,8 @@ function (_super) {
167
171
  data: panelProps.seeAll
168
172
  }),
169
173
  metaOption: panelProps.seeAll
170
- }, {
171
- key: 'defaultSource_4',
172
- name: (0, _locale.i18n)('SECOND_CATEGORY'),
173
- value: productSource,
174
- toggleType: 'arrow',
175
- metaOption: {
176
- id: 'productSource',
177
- open: true
178
- }
179
- }, {
174
+ }];
175
+ var hoverSource = [{
180
176
  key: 'defaultSource_5',
181
177
  name: (0, _locale.i18n)('HOVER'),
182
178
  value: hoverSetting,
@@ -191,6 +187,14 @@ function (_super) {
191
187
  showActiveColor: true,
192
188
  source: defaultSource,
193
189
  type: "switch"
190
+ }), productSource, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
191
+ headerSize: "middle",
192
+ onRefresh: function onRefresh() {
193
+ return (0, _coreUtil.renderPreview)();
194
+ },
195
+ showActiveColor: true,
196
+ source: hoverSource,
197
+ type: "switch"
194
198
  }));
195
199
  };
196
200
 
@@ -1,3 +1,16 @@
1
1
  .recommend_second_conf_wrap {
2
- width: 354px;
2
+
3
+ .sourceOfProduct {
4
+ border-top: 1px solid #D2D9E5;
5
+ border-bottom: 1px solid #D2D9E5;
6
+ padding-top: 20px;
7
+ padding-bottom: 20px;
8
+
9
+ .greyBg {
10
+ background: #F5F6F7;
11
+ border-radius: 6px;
12
+ padding: 12px;
13
+ padding-bottom: 1px;
14
+ }
15
+ }
3
16
  }
@@ -121,19 +121,19 @@
121
121
  display: block;
122
122
  }
123
123
  }
124
- }
125
124
 
126
- .active {
127
- background: #E9F0FF;
128
- color: #2F54EB;
125
+ &.active {
126
+ background: #E9F0FF;
127
+ color: #2F54EB;
129
128
 
130
- .left {
131
- .card-title {
132
- font-weight: 600;
129
+ .left {
130
+ .card-title {
131
+ font-weight: 600;
132
+ }
133
133
  }
134
- }
135
134
 
136
- .more-btn {
137
- display: block;
135
+ .more-btn {
136
+ display: block;
137
+ }
138
138
  }
139
139
  }
@@ -30,10 +30,12 @@ function i18n(key, args) {
30
30
  var tempString = localeMap[_mobx.store.locale || 'en'][key];
31
31
 
32
32
  if (tempString) {
33
+ var str_1 = tempString;
33
34
  Object.keys(args).map(function (key) {
34
35
  var reg = new RegExp("{" + key + "}", 'g');
35
- tempString.replace(reg, args[key]);
36
+ str_1 = tempString.replace(reg, args[key]);
36
37
  });
38
+ return str_1;
37
39
  } else {
38
40
  console.log('未找到国际化KEY:' + key);
39
41
  return key;
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
15
+
14
16
  var _coreUtil = require("../../../utils/coreUtil");
15
17
 
16
18
  var _decorator = require("../../../decorator");
@@ -161,10 +163,11 @@ function (_super) {
161
163
 
162
164
  if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
163
165
  srcImg = srcImg.replace('ecommerce/static', 'static');
164
- } // if (!srcImg) {
165
- // srcImg = defaultImg;
166
- // }
166
+ }
167
167
 
168
+ if (!srcImg) {
169
+ srcImg = _defaultImg["default"];
170
+ }
168
171
 
169
172
  return /*#__PURE__*/_react["default"].createElement("div", {
170
173
  className: (0, _classnames["default"])('m-meta-image', {