@fonixtree/magic-design 1.0.119 → 1.0.121

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.
@@ -13,6 +13,8 @@ require("./index.less");
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
+ var _card = _interopRequireDefault(require("./imgs/card.png"));
17
+
16
18
  var _mobx = require("../../../../../mobx");
17
19
 
18
20
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
@@ -226,6 +228,26 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
226
228
  return r;
227
229
  };
228
230
 
231
+ var defaultData = [{
232
+ imgUrlContent: {
233
+ url: _card["default"]
234
+ },
235
+ offerName: 'Product Name Long Long Long Long Long',
236
+ salesPrice: 10000,
237
+ specialPrice: null,
238
+ marketPrice: 20000,
239
+ salePercent: 500,
240
+ discountPercent: 90
241
+ }, {
242
+ imgUrlContent: {
243
+ url: _card["default"]
244
+ },
245
+ offerName: 'Product Name',
246
+ salesPrice: 10000,
247
+ specialPrice: null,
248
+ marketPrice: 20000,
249
+ salePercent: 500
250
+ }];
229
251
  var LAYOUT_IMAGE_SIZE = {
230
252
  layout1: {
231
253
  w: '100%',
@@ -572,6 +594,9 @@ function (_super) {
572
594
  hideTabs = _a.hideTabs,
573
595
  contentWidth = _a.contentWidth;
574
596
  var products = this.state["products" + tabIndex] || [];
597
+
598
+ var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
599
+
575
600
  var isDivide = groupSource.length <= 3;
576
601
  var layout = panelProps.customize.layout.h5Layout;
577
602
 
@@ -645,7 +670,7 @@ function (_super) {
645
670
  })), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
646
671
  key: "macyContainer",
647
672
  className: "macyContainer macyContainer_" + panelProps.id
648
- }, products.map(function (item) {
673
+ }, _products.map(function (item) {
649
674
  return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
650
675
  key: item.productId,
651
676
  data: item // fixHeight={layout === 'layout3'}
@@ -669,7 +694,7 @@ function (_super) {
669
694
  panelProps: panelProps.content,
670
695
  showProgress: false
671
696
  });
672
- })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
697
+ })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
673
698
  className: "btnSeeAll",
674
699
  data: _seeAll
675
700
  })) : /*#__PURE__*/_react["default"].createElement("div", {
@@ -679,7 +704,7 @@ function (_super) {
679
704
  })
680
705
  }, /*#__PURE__*/_react["default"].createElement("div", {
681
706
  className: "scrollProductList"
682
- }, products.map(function (item) {
707
+ }, _products.map(function (item) {
683
708
  return /*#__PURE__*/_react["default"].createElement("div", {
684
709
  className: "productCard"
685
710
  }, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
@@ -700,7 +725,7 @@ function (_super) {
700
725
  panelProps: panelProps.content,
701
726
  showProgress: false
702
727
  }));
703
- })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
728
+ })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
704
729
  className: "btnSeeAll",
705
730
  data: _seeAll
706
731
  })));
@@ -1,6 +1,7 @@
1
1
  .m-recommend-mobile {
2
2
  display: flex;
3
3
  flex-direction: column;
4
+ min-height: 4rem;
4
5
  }
5
6
  .m-recommend-mobile .cylon-tabs-nav-operations {
6
7
  display: none !important;
@@ -75,72 +75,70 @@ var getDefaultJSON = function getDefaultJSON() {
75
75
  mobile: 'transparent'
76
76
  }
77
77
  },
78
- icons: {
79
- cartIcon: {
80
- id: (0, _uuid.v4)(),
81
- open: true,
82
- type: 'IMAGE',
83
- content: {
84
- h5Name: 'name2',
85
- pcName: 'name2',
86
- h5ImgSrc: _base.searchCartIcon,
87
- pcImgSrc: '',
88
- clickUrl: {
89
- name: '/main/cart',
90
- value: '/main/cart'
91
- }
92
- },
93
- hover: {
94
- open: false,
95
- backgroundType: 'enlarge',
96
- magnification: 1.5,
97
- pcImgHoverUrl: '',
98
- h5ImgHoverUrl: ''
78
+ cartIcon: {
79
+ id: (0, _uuid.v4)(),
80
+ open: true,
81
+ type: 'IMAGE',
82
+ content: {
83
+ h5Name: 'name2',
84
+ pcName: 'name2',
85
+ h5ImgSrc: _base.searchCartIcon,
86
+ pcImgSrc: '',
87
+ clickUrl: {
88
+ name: '/main/cart',
89
+ value: '/main/cart'
99
90
  }
100
91
  },
101
- chatbotIcon: {
102
- id: (0, _uuid.v4)(),
103
- open: true,
104
- type: 'IMAGE',
105
- content: {
106
- h5Name: 'name2',
107
- pcName: 'name2',
108
- h5ImgSrc: _base.searchChatbotIcon,
109
- pcImgSrc: '',
110
- clickUrl: {
111
- name: '/new-chat',
112
- value: '/new-chat'
113
- }
114
- },
115
- hover: {
116
- open: false,
117
- backgroundType: 'enlarge',
118
- magnification: 1.5,
119
- pcImgHoverUrl: '',
120
- h5ImgHoverUrl: ''
92
+ hover: {
93
+ open: false,
94
+ backgroundType: 'enlarge',
95
+ magnification: 1.5,
96
+ pcImgHoverUrl: '',
97
+ h5ImgHoverUrl: ''
98
+ }
99
+ },
100
+ chatbotIcon: {
101
+ id: (0, _uuid.v4)(),
102
+ open: true,
103
+ type: 'IMAGE',
104
+ content: {
105
+ h5Name: 'name2',
106
+ pcName: 'name2',
107
+ h5ImgSrc: _base.searchChatbotIcon,
108
+ pcImgSrc: '',
109
+ clickUrl: {
110
+ name: '/new-chat',
111
+ value: '/new-chat'
121
112
  }
122
113
  },
123
- messageIcon: {
124
- id: (0, _uuid.v4)(),
125
- open: true,
126
- type: 'IMAGE',
127
- content: {
128
- h5Name: 'name2',
129
- pcName: 'name2',
130
- h5ImgSrc: _base.searchMessageIcon,
131
- pcImgSrc: '',
132
- clickUrl: {
133
- name: '/message-center',
134
- value: '/message-center'
135
- }
136
- },
137
- hover: {
138
- open: false,
139
- backgroundType: 'enlarge',
140
- magnification: 1.5,
141
- pcImgHoverUrl: '',
142
- h5ImgHoverUrl: ''
114
+ hover: {
115
+ open: false,
116
+ backgroundType: 'enlarge',
117
+ magnification: 1.5,
118
+ pcImgHoverUrl: '',
119
+ h5ImgHoverUrl: ''
120
+ }
121
+ },
122
+ messageIcon: {
123
+ id: (0, _uuid.v4)(),
124
+ open: true,
125
+ type: 'IMAGE',
126
+ content: {
127
+ h5Name: 'name2',
128
+ pcName: 'name2',
129
+ h5ImgSrc: _base.searchMessageIcon,
130
+ pcImgSrc: '',
131
+ clickUrl: {
132
+ name: '/message-center',
133
+ value: '/message-center'
143
134
  }
135
+ },
136
+ hover: {
137
+ open: false,
138
+ backgroundType: 'enlarge',
139
+ magnification: 1.5,
140
+ pcImgHoverUrl: '',
141
+ h5ImgHoverUrl: ''
144
142
  }
145
143
  }
146
144
  },
@@ -147,10 +147,9 @@ function (_super) {
147
147
  SearchBannerMobile.prototype.render = function () {
148
148
  var _this = this;
149
149
 
150
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
150
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
151
151
 
152
152
  var data = this.props.data;
153
- console.log('data', data);
154
153
  var GAData = (0, _commonUtil.getGAData)(data);
155
154
  var carouseIndex = this.state.carouseIndex;
156
155
  var autoplay = data.setting.autoplay.open;
@@ -179,16 +178,16 @@ function (_super) {
179
178
  color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
180
179
  size: (0, _commonUtil.convertToRem)(20),
181
180
  type: "icon-search2"
182
- })), ((_k = (_j = (_h = data.content) === null || _h === void 0 ? void 0 : _h.icons) === null || _j === void 0 ? void 0 : _j.cartIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
181
+ })), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
183
182
  className: "right-icon",
184
- data: (_m = (_l = data.content) === null || _l === void 0 ? void 0 : _l.icons) === null || _m === void 0 ? void 0 : _m.cartIcon
185
- }), ((_q = (_p = (_o = data.content) === null || _o === void 0 ? void 0 : _o.icons) === null || _p === void 0 ? void 0 : _p.chatbotIcon) === null || _q === void 0 ? void 0 : _q.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
183
+ data: data.content.cartIcon
184
+ }), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
186
185
  className: "right-icon",
187
- data: (_s = (_r = data.content) === null || _r === void 0 ? void 0 : _r.icons) === null || _s === void 0 ? void 0 : _s.chatbotIcon
188
- }), ((_v = (_u = (_t = data.content) === null || _t === void 0 ? void 0 : _t.icons) === null || _u === void 0 ? void 0 : _u.messageIcon) === null || _v === void 0 ? void 0 : _v.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
186
+ data: data.content.chatbotIcon
187
+ }), data.content && ((_k = data.content.messageIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
189
188
  className: "right-icon",
190
- data: (_x = (_w = data.content) === null || _w === void 0 ? void 0 : _w.icons) === null || _x === void 0 ? void 0 : _x.messageIcon
191
- })), data.content && ((_y = data.content.logo) === null || _y === void 0 ? void 0 : _y.open) && /*#__PURE__*/_react["default"].createElement("div", {
189
+ data: data.content.messageIcon
190
+ })), data.content && ((_l = data.content.logo) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
192
191
  className: "logo",
193
192
  onClick: function onClick() {
194
193
  var _a, _b;
@@ -65,49 +65,13 @@ function (_super) {
65
65
  _this.setState({});
66
66
  };
67
67
 
68
- _this.getIconPanel = function () {
69
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
70
-
71
- var panelProps = _this.props.panelProps;
72
- var source = [{
73
- key: (_b = (_a = panelProps.icons) === null || _a === void 0 ? void 0 : _a.cartIcon) === null || _b === void 0 ? void 0 : _b.id,
74
- name: (0, _locale.i18n)('CART_ICON'),
75
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
76
- data: (_c = panelProps.icons) === null || _c === void 0 ? void 0 : _c.cartIcon
77
- }),
78
- metaOption: (_d = panelProps.icons) === null || _d === void 0 ? void 0 : _d.cartIcon
79
- }, {
80
- key: (_f = (_e = panelProps.icons) === null || _e === void 0 ? void 0 : _e.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
81
- name: (0, _locale.i18n)('CHATBOT_ICON'),
82
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
83
- data: (_g = panelProps.icons) === null || _g === void 0 ? void 0 : _g.chatbotIcon
84
- }),
85
- metaOption: (_h = panelProps.icons) === null || _h === void 0 ? void 0 : _h.chatbotIcon
86
- }, {
87
- key: (_k = (_j = panelProps.icons) === null || _j === void 0 ? void 0 : _j.messageIcon) === null || _k === void 0 ? void 0 : _k.id,
88
- name: (0, _locale.i18n)('MESSAGE_ICON'),
89
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
90
- data: (_l = panelProps.icons) === null || _l === void 0 ? void 0 : _l.messageIcon
91
- }),
92
- metaOption: (_m = panelProps.icons) === null || _m === void 0 ? void 0 : _m.messageIcon
93
- }];
94
- return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
95
- headerSize: "middle",
96
- onRefresh: function onRefresh() {
97
- return (0, _coreUtil.renderPreview)();
98
- },
99
- source: source,
100
- type: "switch"
101
- });
102
- };
103
-
104
68
  return _this;
105
69
  }
106
70
 
107
71
  SearchBarConfigContent.prototype.render = function () {
108
72
  var _this = this;
109
73
 
110
- var _a, _b, _c, _d;
74
+ var _a, _b, _c, _d, _e, _f, _g;
111
75
 
112
76
  var panelProps = this.props.panelProps;
113
77
  var source = [{
@@ -158,10 +122,26 @@ function (_super) {
158
122
  metaOption: panelProps.box,
159
123
  toggleType: 'switch'
160
124
  }, {
161
- key: 'search3',
162
- name: (0, _locale.i18n)('ICON'),
163
- toggleType: 'triangle',
164
- value: this.getIconPanel()
125
+ key: (_e = panelProps.cartIcon) === null || _e === void 0 ? void 0 : _e.id,
126
+ name: (0, _locale.i18n)('CART_ICON'),
127
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
128
+ data: panelProps.cartIcon
129
+ }),
130
+ metaOption: panelProps.cartIcon
131
+ }, {
132
+ key: (_f = panelProps.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
133
+ name: (0, _locale.i18n)('CHATBOT_ICON'),
134
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
135
+ data: panelProps.chatbotIcon
136
+ }),
137
+ metaOption: panelProps.chatbotIcon
138
+ }, {
139
+ key: (_g = panelProps.messageIcon) === null || _g === void 0 ? void 0 : _g.id,
140
+ name: (0, _locale.i18n)('MESSAGE_ICON'),
141
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
142
+ data: panelProps.messageIcon
143
+ }),
144
+ metaOption: panelProps.messageIcon
165
145
  }];
166
146
  return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
167
147
  headerSize: "middle",
@@ -13,6 +13,8 @@ require("./index.less");
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
+ var _card = _interopRequireDefault(require("./imgs/card.png"));
17
+
16
18
  var _mobx = require("../../../../../mobx");
17
19
 
18
20
  var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
@@ -226,6 +228,26 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
226
228
  return r;
227
229
  };
228
230
 
231
+ var defaultData = [{
232
+ imgUrlContent: {
233
+ url: _card["default"]
234
+ },
235
+ offerName: 'Product Name Long Long Long Long Long',
236
+ salesPrice: 10000,
237
+ specialPrice: null,
238
+ marketPrice: 20000,
239
+ salePercent: 500,
240
+ discountPercent: 90
241
+ }, {
242
+ imgUrlContent: {
243
+ url: _card["default"]
244
+ },
245
+ offerName: 'Product Name',
246
+ salesPrice: 10000,
247
+ specialPrice: null,
248
+ marketPrice: 20000,
249
+ salePercent: 500
250
+ }];
229
251
  var LAYOUT_IMAGE_SIZE = {
230
252
  layout1: {
231
253
  w: '100%',
@@ -572,6 +594,9 @@ function (_super) {
572
594
  hideTabs = _a.hideTabs,
573
595
  contentWidth = _a.contentWidth;
574
596
  var products = this.state["products" + tabIndex] || [];
597
+
598
+ var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
599
+
575
600
  var isDivide = groupSource.length <= 3;
576
601
  var layout = panelProps.customize.layout.h5Layout;
577
602
 
@@ -645,7 +670,7 @@ function (_super) {
645
670
  })), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
646
671
  key: "macyContainer",
647
672
  className: "macyContainer macyContainer_" + panelProps.id
648
- }, products.map(function (item) {
673
+ }, _products.map(function (item) {
649
674
  return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
650
675
  key: item.productId,
651
676
  data: item // fixHeight={layout === 'layout3'}
@@ -669,7 +694,7 @@ function (_super) {
669
694
  panelProps: panelProps.content,
670
695
  showProgress: false
671
696
  });
672
- })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
697
+ })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
673
698
  className: "btnSeeAll",
674
699
  data: _seeAll
675
700
  })) : /*#__PURE__*/_react["default"].createElement("div", {
@@ -679,7 +704,7 @@ function (_super) {
679
704
  })
680
705
  }, /*#__PURE__*/_react["default"].createElement("div", {
681
706
  className: "scrollProductList"
682
- }, products.map(function (item) {
707
+ }, _products.map(function (item) {
683
708
  return /*#__PURE__*/_react["default"].createElement("div", {
684
709
  className: "productCard"
685
710
  }, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
@@ -700,7 +725,7 @@ function (_super) {
700
725
  panelProps: panelProps.content,
701
726
  showProgress: false
702
727
  }));
703
- })), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
728
+ })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
704
729
  className: "btnSeeAll",
705
730
  data: _seeAll
706
731
  })));
@@ -1,6 +1,7 @@
1
1
  .m-recommend-mobile {
2
2
  display: flex;
3
3
  flex-direction: column;
4
+ min-height: 4rem;
4
5
  }
5
6
  .m-recommend-mobile .cylon-tabs-nav-operations {
6
7
  display: none !important;
@@ -75,72 +75,70 @@ var getDefaultJSON = function getDefaultJSON() {
75
75
  mobile: 'transparent'
76
76
  }
77
77
  },
78
- icons: {
79
- cartIcon: {
80
- id: (0, _uuid.v4)(),
81
- open: true,
82
- type: 'IMAGE',
83
- content: {
84
- h5Name: 'name2',
85
- pcName: 'name2',
86
- h5ImgSrc: _base.searchCartIcon,
87
- pcImgSrc: '',
88
- clickUrl: {
89
- name: '/main/cart',
90
- value: '/main/cart'
91
- }
92
- },
93
- hover: {
94
- open: false,
95
- backgroundType: 'enlarge',
96
- magnification: 1.5,
97
- pcImgHoverUrl: '',
98
- h5ImgHoverUrl: ''
78
+ cartIcon: {
79
+ id: (0, _uuid.v4)(),
80
+ open: true,
81
+ type: 'IMAGE',
82
+ content: {
83
+ h5Name: 'name2',
84
+ pcName: 'name2',
85
+ h5ImgSrc: _base.searchCartIcon,
86
+ pcImgSrc: '',
87
+ clickUrl: {
88
+ name: '/main/cart',
89
+ value: '/main/cart'
99
90
  }
100
91
  },
101
- chatbotIcon: {
102
- id: (0, _uuid.v4)(),
103
- open: true,
104
- type: 'IMAGE',
105
- content: {
106
- h5Name: 'name2',
107
- pcName: 'name2',
108
- h5ImgSrc: _base.searchChatbotIcon,
109
- pcImgSrc: '',
110
- clickUrl: {
111
- name: '/new-chat',
112
- value: '/new-chat'
113
- }
114
- },
115
- hover: {
116
- open: false,
117
- backgroundType: 'enlarge',
118
- magnification: 1.5,
119
- pcImgHoverUrl: '',
120
- h5ImgHoverUrl: ''
92
+ hover: {
93
+ open: false,
94
+ backgroundType: 'enlarge',
95
+ magnification: 1.5,
96
+ pcImgHoverUrl: '',
97
+ h5ImgHoverUrl: ''
98
+ }
99
+ },
100
+ chatbotIcon: {
101
+ id: (0, _uuid.v4)(),
102
+ open: true,
103
+ type: 'IMAGE',
104
+ content: {
105
+ h5Name: 'name2',
106
+ pcName: 'name2',
107
+ h5ImgSrc: _base.searchChatbotIcon,
108
+ pcImgSrc: '',
109
+ clickUrl: {
110
+ name: '/new-chat',
111
+ value: '/new-chat'
121
112
  }
122
113
  },
123
- messageIcon: {
124
- id: (0, _uuid.v4)(),
125
- open: true,
126
- type: 'IMAGE',
127
- content: {
128
- h5Name: 'name2',
129
- pcName: 'name2',
130
- h5ImgSrc: _base.searchMessageIcon,
131
- pcImgSrc: '',
132
- clickUrl: {
133
- name: '/message-center',
134
- value: '/message-center'
135
- }
136
- },
137
- hover: {
138
- open: false,
139
- backgroundType: 'enlarge',
140
- magnification: 1.5,
141
- pcImgHoverUrl: '',
142
- h5ImgHoverUrl: ''
114
+ hover: {
115
+ open: false,
116
+ backgroundType: 'enlarge',
117
+ magnification: 1.5,
118
+ pcImgHoverUrl: '',
119
+ h5ImgHoverUrl: ''
120
+ }
121
+ },
122
+ messageIcon: {
123
+ id: (0, _uuid.v4)(),
124
+ open: true,
125
+ type: 'IMAGE',
126
+ content: {
127
+ h5Name: 'name2',
128
+ pcName: 'name2',
129
+ h5ImgSrc: _base.searchMessageIcon,
130
+ pcImgSrc: '',
131
+ clickUrl: {
132
+ name: '/message-center',
133
+ value: '/message-center'
143
134
  }
135
+ },
136
+ hover: {
137
+ open: false,
138
+ backgroundType: 'enlarge',
139
+ magnification: 1.5,
140
+ pcImgHoverUrl: '',
141
+ h5ImgHoverUrl: ''
144
142
  }
145
143
  }
146
144
  },
@@ -147,10 +147,9 @@ function (_super) {
147
147
  SearchBannerMobile.prototype.render = function () {
148
148
  var _this = this;
149
149
 
150
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
150
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
151
151
 
152
152
  var data = this.props.data;
153
- console.log('data', data);
154
153
  var GAData = (0, _commonUtil.getGAData)(data);
155
154
  var carouseIndex = this.state.carouseIndex;
156
155
  var autoplay = data.setting.autoplay.open;
@@ -179,16 +178,16 @@ function (_super) {
179
178
  color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
180
179
  size: (0, _commonUtil.convertToRem)(20),
181
180
  type: "icon-search2"
182
- })), ((_k = (_j = (_h = data.content) === null || _h === void 0 ? void 0 : _h.icons) === null || _j === void 0 ? void 0 : _j.cartIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
181
+ })), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
183
182
  className: "right-icon",
184
- data: (_m = (_l = data.content) === null || _l === void 0 ? void 0 : _l.icons) === null || _m === void 0 ? void 0 : _m.cartIcon
185
- }), ((_q = (_p = (_o = data.content) === null || _o === void 0 ? void 0 : _o.icons) === null || _p === void 0 ? void 0 : _p.chatbotIcon) === null || _q === void 0 ? void 0 : _q.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
183
+ data: data.content.cartIcon
184
+ }), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
186
185
  className: "right-icon",
187
- data: (_s = (_r = data.content) === null || _r === void 0 ? void 0 : _r.icons) === null || _s === void 0 ? void 0 : _s.chatbotIcon
188
- }), ((_v = (_u = (_t = data.content) === null || _t === void 0 ? void 0 : _t.icons) === null || _u === void 0 ? void 0 : _u.messageIcon) === null || _v === void 0 ? void 0 : _v.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
186
+ data: data.content.chatbotIcon
187
+ }), data.content && ((_k = data.content.messageIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
189
188
  className: "right-icon",
190
- data: (_x = (_w = data.content) === null || _w === void 0 ? void 0 : _w.icons) === null || _x === void 0 ? void 0 : _x.messageIcon
191
- })), data.content && ((_y = data.content.logo) === null || _y === void 0 ? void 0 : _y.open) && /*#__PURE__*/_react["default"].createElement("div", {
189
+ data: data.content.messageIcon
190
+ })), data.content && ((_l = data.content.logo) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
192
191
  className: "logo",
193
192
  onClick: function onClick() {
194
193
  var _a, _b;
@@ -65,49 +65,13 @@ function (_super) {
65
65
  _this.setState({});
66
66
  };
67
67
 
68
- _this.getIconPanel = function () {
69
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
70
-
71
- var panelProps = _this.props.panelProps;
72
- var source = [{
73
- key: (_b = (_a = panelProps.icons) === null || _a === void 0 ? void 0 : _a.cartIcon) === null || _b === void 0 ? void 0 : _b.id,
74
- name: (0, _locale.i18n)('CART_ICON'),
75
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
76
- data: (_c = panelProps.icons) === null || _c === void 0 ? void 0 : _c.cartIcon
77
- }),
78
- metaOption: (_d = panelProps.icons) === null || _d === void 0 ? void 0 : _d.cartIcon
79
- }, {
80
- key: (_f = (_e = panelProps.icons) === null || _e === void 0 ? void 0 : _e.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
81
- name: (0, _locale.i18n)('CHATBOT_ICON'),
82
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
83
- data: (_g = panelProps.icons) === null || _g === void 0 ? void 0 : _g.chatbotIcon
84
- }),
85
- metaOption: (_h = panelProps.icons) === null || _h === void 0 ? void 0 : _h.chatbotIcon
86
- }, {
87
- key: (_k = (_j = panelProps.icons) === null || _j === void 0 ? void 0 : _j.messageIcon) === null || _k === void 0 ? void 0 : _k.id,
88
- name: (0, _locale.i18n)('MESSAGE_ICON'),
89
- value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
90
- data: (_l = panelProps.icons) === null || _l === void 0 ? void 0 : _l.messageIcon
91
- }),
92
- metaOption: (_m = panelProps.icons) === null || _m === void 0 ? void 0 : _m.messageIcon
93
- }];
94
- return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
95
- headerSize: "middle",
96
- onRefresh: function onRefresh() {
97
- return (0, _coreUtil.renderPreview)();
98
- },
99
- source: source,
100
- type: "switch"
101
- });
102
- };
103
-
104
68
  return _this;
105
69
  }
106
70
 
107
71
  SearchBarConfigContent.prototype.render = function () {
108
72
  var _this = this;
109
73
 
110
- var _a, _b, _c, _d;
74
+ var _a, _b, _c, _d, _e, _f, _g;
111
75
 
112
76
  var panelProps = this.props.panelProps;
113
77
  var source = [{
@@ -158,10 +122,26 @@ function (_super) {
158
122
  metaOption: panelProps.box,
159
123
  toggleType: 'switch'
160
124
  }, {
161
- key: 'search3',
162
- name: (0, _locale.i18n)('ICON'),
163
- toggleType: 'triangle',
164
- value: this.getIconPanel()
125
+ key: (_e = panelProps.cartIcon) === null || _e === void 0 ? void 0 : _e.id,
126
+ name: (0, _locale.i18n)('CART_ICON'),
127
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
128
+ data: panelProps.cartIcon
129
+ }),
130
+ metaOption: panelProps.cartIcon
131
+ }, {
132
+ key: (_f = panelProps.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
133
+ name: (0, _locale.i18n)('CHATBOT_ICON'),
134
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
135
+ data: panelProps.chatbotIcon
136
+ }),
137
+ metaOption: panelProps.chatbotIcon
138
+ }, {
139
+ key: (_g = panelProps.messageIcon) === null || _g === void 0 ? void 0 : _g.id,
140
+ name: (0, _locale.i18n)('MESSAGE_ICON'),
141
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
142
+ data: panelProps.messageIcon
143
+ }),
144
+ metaOption: panelProps.messageIcon
165
145
  }];
166
146
  return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
167
147
  headerSize: "middle",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.119",
4
+ "version": "1.0.121",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",