@fonixtree/magic-design 0.0.56 → 0.0.58

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 (135) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +7 -7
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +7 -7
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  9. package/es/common/GroupList/index.js +2 -3
  10. package/es/common/LinkModal/index.less +1 -1
  11. package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  12. package/es/composite-comp/bol/components/Button/index.js +7 -9
  13. package/es/composite-comp/bol/components/Button/index.less +1 -0
  14. package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  15. package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  16. package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  17. package/es/composite-comp/bol/components/Tag/index.js +7 -9
  18. package/es/composite-comp/bol/components/Tag/index.less +1 -0
  19. package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  20. package/es/composite-comp/bol/components/Text/index.js +3 -3
  21. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  22. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  23. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  24. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  25. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  26. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  27. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  28. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  29. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  30. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  31. package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  32. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  33. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  34. package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  35. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  36. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  37. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  38. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  39. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  40. package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
  41. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
  42. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
  43. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  44. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
  45. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  46. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  47. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  48. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  49. package/es/constants/component-types.js +13 -3
  50. package/es/constants/index.js +20 -2
  51. package/es/constants/layout.js +10 -2
  52. package/es/core/Designer/ConfigPanel/index.js +48 -22
  53. package/es/core/Designer/History/index.js +36 -28
  54. package/es/core/Designer/index.js +17 -8
  55. package/es/decorator/compositeDecorator.js +1 -0
  56. package/es/decorator/index.js +8 -0
  57. package/es/decorator/updateConfigDecorator.js +76 -0
  58. package/es/locale/en/en.json +8 -1
  59. package/es/locale/es/es.json +8 -1
  60. package/es/locale/id/id.json +8 -1
  61. package/es/meta-comp/components/Button/index.js +7 -7
  62. package/es/meta-comp/components/Image/index.js +1 -1
  63. package/es/meta-comp/components/Text/index.js +18 -7
  64. package/es/meta-comp/config-panels/BaseConfig.js +8 -10
  65. package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
  66. package/es/mobx/Store.js +1 -9
  67. package/es/utils/coreUtil.js +6 -1
  68. package/lib/assets/fonts/magic-box-iconfont.css +7 -7
  69. package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -7
  70. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  71. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  72. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  73. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  74. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  75. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  76. package/lib/common/GroupList/index.js +2 -3
  77. package/lib/common/LinkModal/index.less +1 -1
  78. package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
  79. package/lib/composite-comp/bol/components/Button/index.js +7 -9
  80. package/lib/composite-comp/bol/components/Button/index.less +1 -0
  81. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
  82. package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
  83. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
  84. package/lib/composite-comp/bol/components/Tag/index.js +7 -9
  85. package/lib/composite-comp/bol/components/Tag/index.less +1 -0
  86. package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
  87. package/lib/composite-comp/bol/components/Text/index.js +3 -3
  88. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  89. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  90. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  91. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  92. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  93. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  94. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
  95. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  96. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  97. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
  98. package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
  99. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  100. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  101. package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  102. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  103. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  104. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
  105. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  106. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  107. package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
  108. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
  109. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
  110. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
  111. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
  112. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
  113. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  114. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
  115. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  116. package/lib/constants/component-types.js +13 -3
  117. package/lib/constants/index.js +20 -2
  118. package/lib/constants/layout.js +10 -2
  119. package/lib/core/Designer/ConfigPanel/index.js +48 -22
  120. package/lib/core/Designer/History/index.js +36 -28
  121. package/lib/core/Designer/index.js +17 -8
  122. package/lib/decorator/compositeDecorator.js +1 -0
  123. package/lib/decorator/index.js +8 -0
  124. package/lib/decorator/updateConfigDecorator.js +76 -0
  125. package/lib/locale/en/en.json +8 -1
  126. package/lib/locale/es/es.json +8 -1
  127. package/lib/locale/id/id.json +8 -1
  128. package/lib/meta-comp/components/Button/index.js +7 -7
  129. package/lib/meta-comp/components/Image/index.js +1 -1
  130. package/lib/meta-comp/components/Text/index.js +18 -7
  131. package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
  132. package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
  133. package/lib/mobx/Store.js +1 -9
  134. package/lib/utils/coreUtil.js +6 -1
  135. package/package.json +1 -1
@@ -0,0 +1,452 @@
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
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ require("./index.less");
13
+
14
+ var _components = require("../../../../../meta-comp/components");
15
+
16
+ var _commonUtil = require("../../../../../utils/commonUtil");
17
+
18
+ var _common = require("../../../../../common");
19
+
20
+ var _menuIcon = _interopRequireDefault(require("../images/menu-icon.svg"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
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
+
66
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
67
+ function adopt(value) {
68
+ return value instanceof P ? value : new P(function (resolve) {
69
+ resolve(value);
70
+ });
71
+ }
72
+
73
+ return new (P || (P = Promise))(function (resolve, reject) {
74
+ function fulfilled(value) {
75
+ try {
76
+ step(generator.next(value));
77
+ } catch (e) {
78
+ reject(e);
79
+ }
80
+ }
81
+
82
+ function rejected(value) {
83
+ try {
84
+ step(generator["throw"](value));
85
+ } catch (e) {
86
+ reject(e);
87
+ }
88
+ }
89
+
90
+ function step(result) {
91
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
92
+ }
93
+
94
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
95
+ });
96
+ };
97
+
98
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
99
+ var _ = {
100
+ label: 0,
101
+ sent: function sent() {
102
+ if (t[0] & 1) throw t[1];
103
+ return t[1];
104
+ },
105
+ trys: [],
106
+ ops: []
107
+ },
108
+ f,
109
+ y,
110
+ t,
111
+ g;
112
+ return g = {
113
+ next: verb(0),
114
+ "throw": verb(1),
115
+ "return": verb(2)
116
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
117
+ return this;
118
+ }), g;
119
+
120
+ function verb(n) {
121
+ return function (v) {
122
+ return step([n, v]);
123
+ };
124
+ }
125
+
126
+ function step(op) {
127
+ if (f) throw new TypeError("Generator is already executing.");
128
+
129
+ while (_) {
130
+ try {
131
+ 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;
132
+ if (y = 0, t) op = [op[0] & 2, t.value];
133
+
134
+ switch (op[0]) {
135
+ case 0:
136
+ case 1:
137
+ t = op;
138
+ break;
139
+
140
+ case 4:
141
+ _.label++;
142
+ return {
143
+ value: op[1],
144
+ done: false
145
+ };
146
+
147
+ case 5:
148
+ _.label++;
149
+ y = op[1];
150
+ op = [0];
151
+ continue;
152
+
153
+ case 7:
154
+ op = _.ops.pop();
155
+
156
+ _.trys.pop();
157
+
158
+ continue;
159
+
160
+ default:
161
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
162
+ _ = 0;
163
+ continue;
164
+ }
165
+
166
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
167
+ _.label = op[1];
168
+ break;
169
+ }
170
+
171
+ if (op[0] === 6 && _.label < t[1]) {
172
+ _.label = t[1];
173
+ t = op;
174
+ break;
175
+ }
176
+
177
+ if (t && _.label < t[2]) {
178
+ _.label = t[2];
179
+
180
+ _.ops.push(op);
181
+
182
+ break;
183
+ }
184
+
185
+ if (t[2]) _.ops.pop();
186
+
187
+ _.trys.pop();
188
+
189
+ continue;
190
+ }
191
+
192
+ op = body.call(thisArg, _);
193
+ } catch (e) {
194
+ op = [6, e];
195
+ y = 0;
196
+ } finally {
197
+ f = t = 0;
198
+ }
199
+ }
200
+
201
+ if (op[0] & 5) throw op[1];
202
+ return {
203
+ value: op[0] ? op[1] : void 0,
204
+ done: true
205
+ };
206
+ }
207
+ };
208
+
209
+ var JsonToUrl = function JsonToUrl(data) {
210
+ var tempArr = []; // eslint-disable-next-line no-unused-vars, no-restricted-syntax, guard-for-in
211
+
212
+ for (var i in data) {
213
+ var keyData = encodeURIComponent(i);
214
+ var value = encodeURIComponent(data[i]) === 'null' ? null : encodeURIComponent(data[i]);
215
+ tempArr.push(keyData + "=" + value);
216
+ }
217
+
218
+ var urlParamsStr = tempArr.join('&');
219
+ return urlParamsStr;
220
+ }; // 跳转配置
221
+
222
+
223
+ var jumpUrlConfig = function jumpUrlConfig(item) {
224
+ var _a = item || {},
225
+ objType = _a.objType,
226
+ objValue = _a.objValue;
227
+
228
+ var jumpUrl = '';
229
+
230
+ switch (objType) {
231
+ case 'Category':
232
+ jumpUrl = "/product/list/" + objValue.objId;
233
+ break;
234
+
235
+ case 'ProductDetail':
236
+ {
237
+ var offerId = objValue.objId && objValue.objId.split(',')[0];
238
+ var productId = objValue.objId && objValue.objId.split(',')[1];
239
+ jumpUrl = "/product/detail/" + offerId + "?productId=" + productId;
240
+ break;
241
+ }
242
+
243
+ case 'FilteredProducts':
244
+ {
245
+ var params = JsonToUrl(objValue.filteredProductsRela);
246
+ params = params.replace('productName', 'q');
247
+ jumpUrl = "/product/list/null?" + params;
248
+ break;
249
+ }
250
+
251
+ case 'FunctionPage':
252
+ {
253
+ var url = objValue.objId && objValue.objId.split(',')[1];
254
+ jumpUrl = "" + url;
255
+ break;
256
+ }
257
+
258
+ case 'CustomizedPage':
259
+ jumpUrl = "/group/" + objValue.objId;
260
+ (0, _commonUtil.navigateTo)(jumpUrl);
261
+ break;
262
+
263
+ case 'URL':
264
+ {
265
+ var lastUrl = void 0;
266
+
267
+ if (objValue.url) {
268
+ lastUrl = objValue.url;
269
+ } else {
270
+ lastUrl = objValue.maskValue ? objValue.maskValue.replace('URL: ', '') : '';
271
+ }
272
+
273
+ window.location.href = lastUrl;
274
+ break;
275
+ }
276
+
277
+ default:
278
+ break;
279
+ }
280
+
281
+ (0, _commonUtil.navigateTo)(jumpUrl);
282
+ };
283
+
284
+ var PcNavigationPage =
285
+ /** @class */
286
+ function (_super) {
287
+ __extends(PcNavigationPage, _super);
288
+
289
+ function PcNavigationPage() {
290
+ var _this = _super !== null && _super.apply(this, arguments) || this;
291
+
292
+ _this.state = {
293
+ categList: [],
294
+ list: []
295
+ };
296
+
297
+ _this.getCategory = function () {
298
+ return __awaiter(_this, void 0, void 0, function () {
299
+ var res, e_1;
300
+ return __generator(this, function (_a) {
301
+ switch (_a.label) {
302
+ case 0:
303
+ _a.trys.push([0, 2,, 3]);
304
+
305
+ return [4
306
+ /*yield*/
307
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/h5/pages/buyer/displaycatgs", {}, 'GET')];
308
+
309
+ case 1:
310
+ res = _a.sent();
311
+ console.log('---pc nav', res);
312
+ this.setState({
313
+ list: [res],
314
+ categList: res
315
+ });
316
+ return [3
317
+ /*break*/
318
+ , 3];
319
+
320
+ case 2:
321
+ e_1 = _a.sent(); // newData = [];
322
+
323
+ console.log('error', e_1);
324
+ return [3
325
+ /*break*/
326
+ , 3];
327
+
328
+ case 3:
329
+ return [2
330
+ /*return*/
331
+ ];
332
+ }
333
+ });
334
+ });
335
+ };
336
+
337
+ _this.getListArr = function (pre, arr, index) {
338
+ if (arr) {
339
+ pre[index] = arr.map(function (item) {
340
+ return __assign(__assign({}, item), {
341
+ hoverActive: false
342
+ });
343
+ });
344
+
345
+ _this.setState({
346
+ list: pre.slice(0, index + 1)
347
+ });
348
+ }
349
+ };
350
+
351
+ _this.renderMenuList = function (menuList, index) {
352
+ var list = _this.state.list;
353
+ return /*#__PURE__*/_react["default"].createElement("div", {
354
+ className: "cate-wrap"
355
+ }, menuList.map(function (item) {
356
+ return /*#__PURE__*/_react["default"].createElement("div", {
357
+ key: item.model.categId,
358
+ className: (0, _classnames["default"])('cate-item', {
359
+ 'cate-active': item.hoverActive
360
+ }),
361
+ onClick: function onClick() {
362
+ var _a;
363
+
364
+ jumpUrlConfig((_a = item.model) === null || _a === void 0 ? void 0 : _a.catgRela);
365
+ },
366
+ onMouseEnter: function onMouseEnter() {
367
+ _this.getListArr(list, item.children, index + 1);
368
+
369
+ menuList.forEach(function (_item) {
370
+ _item.hoverActive = false;
371
+ });
372
+ item.hoverActive = true;
373
+
374
+ _this.setState({});
375
+ }
376
+ }, /*#__PURE__*/_react["default"].createElement("span", null, item.model.catgName), item.children && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
377
+ color: item.hoverActive ? '#CE1126' : '#232F46',
378
+ size: 14,
379
+ type: "icon-outlined-right"
380
+ }));
381
+ }));
382
+ };
383
+
384
+ return _this;
385
+ }
386
+
387
+ PcNavigationPage.prototype.componentDidMount = function () {
388
+ this.getCategory();
389
+ }; // getCardStyle = (source: TextMetaType[], i) => {
390
+ // const { data } = this.props;
391
+ // let cardStyle = {};
392
+ // cardStyle.marginRight = (1 + i) % data.customize.rowNum !== 0 ? '2%' : 0;
393
+ // if (data.customize.layout === 'newline') {
394
+ // cardStyle.marginBottom = 12;
395
+ // cardStyle.width = this.calcWidth(data.customize.rowNum);
396
+ // }
397
+ // return cardStyle;
398
+ // }
399
+
400
+
401
+ PcNavigationPage.prototype.render = function () {
402
+ var _this = this;
403
+
404
+ var data = this.props.data; // const { ready } = this.state;
405
+
406
+ console.log('----nav pc', data);
407
+ var _a = this.state,
408
+ list = _a.list,
409
+ categList = _a.categList;
410
+ return /*#__PURE__*/_react["default"].createElement("div", {
411
+ className: (0, _classnames["default"])('pc-navigation')
412
+ }, /*#__PURE__*/_react["default"].createElement("div", {
413
+ className: "menu-wrap",
414
+ onMouseLeave: function onMouseLeave() {
415
+ _this.setState({
416
+ list: [categList]
417
+ });
418
+ }
419
+ }, /*#__PURE__*/_react["default"].createElement("a", {
420
+ className: "menu-drop",
421
+ onClick: function onClick(e) {
422
+ return e.preventDefault();
423
+ }
424
+ }, /*#__PURE__*/_react["default"].createElement("img", {
425
+ alt: "icon",
426
+ src: data.home.allCategory.iconUrl || _menuIcon["default"]
427
+ }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
428
+ className: "all-category",
429
+ data: data.home.allCategory,
430
+ readonly: true
431
+ })), /*#__PURE__*/_react["default"].createElement("div", {
432
+ className: "category"
433
+ }, list.map(function (arrItem, index) {
434
+ return _this.renderMenuList(arrItem, index);
435
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
436
+ className: "category-group"
437
+ }, data.groupSource.map(function (source) {
438
+ return /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
439
+ className: "one-category",
440
+ data: source.title
441
+ });
442
+ })));
443
+ };
444
+
445
+ PcNavigationPage.defaultProps = {
446
+ data: {}
447
+ };
448
+ return PcNavigationPage;
449
+ }(_react["default"].Component);
450
+
451
+ var _default = PcNavigationPage;
452
+ exports["default"] = _default;
@@ -0,0 +1,95 @@
1
+ .pc-navigation {
2
+ display: flex;
3
+ .menu-wrap {
4
+ // margin-top: 26px;
5
+ position: relative;
6
+ width: fit-content;
7
+ display: flex;
8
+ align-items: center;
9
+
10
+ &:hover {
11
+ @keyframes show-active{
12
+ 0% {
13
+ opacity: 0;
14
+ }
15
+
16
+ 100% {
17
+ opacity: 1;
18
+ }
19
+ }
20
+ .category {
21
+ display: flex;
22
+ &:local {
23
+ animation: show-active .3s linear both;
24
+ }
25
+ }
26
+ .menu-drop {
27
+ .all-category {
28
+ color: #ED2121 !important;
29
+ }
30
+ &>img {
31
+ position: relative;
32
+ left: 5000px;
33
+ filter: drop-shadow(#ED2121 -5000px 0);
34
+ }
35
+ }
36
+ }
37
+ .menu-drop {
38
+ display: flex;
39
+ align-items: center;
40
+ &> img {
41
+ width: 16px;
42
+ margin-right: 10px;
43
+ }
44
+ // &> span {
45
+ // color: #3A2E2E;
46
+ // font-family: NunitoSans-Bold;
47
+ // font-size: 16px;
48
+ // line-height: 22px;
49
+ // }
50
+ }
51
+ .category {
52
+ display: none;
53
+ position: absolute;
54
+ z-index: 9999;
55
+ left: 0;
56
+ top: 40px;
57
+ // :global {
58
+ .cate-wrap {
59
+ width: 290px;
60
+ border: 1px solid #E6EAF0;
61
+ padding: 8px 0;
62
+ background-color: #fff;
63
+ .cate-item {
64
+ cursor: pointer;
65
+ font-family: 'Open Sans';
66
+ font-style: normal;
67
+ font-weight: 400;
68
+ font-size: 14px;
69
+ line-height: 38px;
70
+ color: #232F46;
71
+ display: flex;
72
+ width: 100%;
73
+ padding: 0 16px;
74
+ justify-content: space-between;
75
+ }
76
+
77
+ .cate-active {
78
+ background: #FCF1F2;
79
+ color: #CE1126;
80
+ }
81
+ }
82
+ // }
83
+ }
84
+ }
85
+
86
+ .category-group {
87
+ margin-left: 180px;
88
+ display: flex;
89
+ .one-category {
90
+ margin-right: 44px;
91
+ }
92
+ }
93
+
94
+ }
95
+
@@ -13,6 +13,8 @@ var _FlashDealConfigContent = _interopRequireDefault(require("./FlashDealConfigC
13
13
 
14
14
  var _layout = _interopRequireDefault(require("./imgs/layout1.png"));
15
15
 
16
+ var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
17
+
16
18
  var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
17
19
 
18
20
  var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
@@ -42,6 +44,14 @@ function FlashDealConfig(props) {
42
44
  })
43
45
  }, {
44
46
  key: '3',
47
+ name: (0, _locale.i18n)('SPACING'),
48
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
49
+ configCompSpace: true,
50
+ configPaddingLR: true,
51
+ data: data.spacing
52
+ })
53
+ }, {
54
+ key: '4',
45
55
  name: (0, _locale.i18n)('CUSTOMIZE'),
46
56
  value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
47
57
  data: data.customize,
@@ -53,7 +63,7 @@ function FlashDealConfig(props) {
53
63
  }]
54
64
  })
55
65
  }, {
56
- key: '4',
66
+ key: '5',
57
67
  name: (0, _locale.i18n)('BACKGROUND'),
58
68
  value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
59
69
  data: data.background
@@ -0,0 +1,117 @@
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
+ var _TextOnlyFontConfig = _interopRequireDefault(require("../TextOnlyFontConfig"));
11
+
12
+ var _coreUtil = require("../../../../../utils/coreUtil");
13
+
14
+ var _Collapse = _interopRequireDefault(require("../../../../../common/Collapse"));
15
+
16
+ var _locale = require("../../../../../locale");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ var __extends = void 0 && (void 0).__extends || function () {
21
+ var _extendStatics = function extendStatics(d, b) {
22
+ _extendStatics = Object.setPrototypeOf || {
23
+ __proto__: []
24
+ } instanceof Array && function (d, b) {
25
+ d.__proto__ = b;
26
+ } || function (d, b) {
27
+ for (var p in b) {
28
+ if (b.hasOwnProperty(p)) d[p] = b[p];
29
+ }
30
+ };
31
+
32
+ return _extendStatics(d, b);
33
+ };
34
+
35
+ return function (d, b) {
36
+ _extendStatics(d, b);
37
+
38
+ function __() {
39
+ this.constructor = d;
40
+ }
41
+
42
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
+ };
44
+ }();
45
+
46
+ // export default function PcNavConfigCategory(props: any) {
47
+ var PcNavConfigCategory =
48
+ /** @class */
49
+ function (_super) {
50
+ __extends(PcNavConfigCategory, _super);
51
+
52
+ function PcNavConfigCategory() {
53
+ var _this = _super !== null && _super.apply(this, arguments) || this; // const { panelProps } = props;
54
+
55
+
56
+ _this.reRender = function () {
57
+ (0, _coreUtil.renderPreview)();
58
+
59
+ _this.setState({});
60
+ };
61
+
62
+ return _this;
63
+ }
64
+
65
+ PcNavConfigCategory.prototype.render = function () {
66
+ var panelProps = this.props.panelProps;
67
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
68
+ headerSize: "middle",
69
+ onRefresh: this.reRender,
70
+ source: [{
71
+ key: 'category1',
72
+ name: (0, _locale.i18n)('ALL_CATEGORY'),
73
+ value: /*#__PURE__*/_react["default"].createElement(_TextOnlyFontConfig["default"], {
74
+ data: panelProps.allCategory,
75
+ needIcon: true
76
+ }),
77
+ metaOption: panelProps.allCategory,
78
+ toggleType: 'switch'
79
+ }, {
80
+ key: 'category2',
81
+ name: (0, _locale.i18n)('FIRST_CATEGORY'),
82
+ value: /*#__PURE__*/_react["default"].createElement(_TextOnlyFontConfig["default"], {
83
+ data: panelProps.firstCategory
84
+ }),
85
+ metaOption: panelProps.firstCategory,
86
+ toggleType: 'arrow'
87
+ }, {
88
+ key: 'category3',
89
+ name: (0, _locale.i18n)('SECONDARY_CATEGORY'),
90
+ value: /*#__PURE__*/_react["default"].createElement(_TextOnlyFontConfig["default"], {
91
+ data: panelProps.secondCategory
92
+ }),
93
+ metaOption: panelProps.secondCategory,
94
+ toggleType: 'arrow'
95
+ }, {
96
+ key: 'category4',
97
+ name: (0, _locale.i18n)('LAST_CATEGORY'),
98
+ value: /*#__PURE__*/_react["default"].createElement(_TextOnlyFontConfig["default"], {
99
+ data: panelProps.lastCategory
100
+ }),
101
+ metaOption: panelProps.lastCategory,
102
+ toggleType: 'arrow'
103
+ }]
104
+ }));
105
+ };
106
+
107
+ PcNavConfigCategory.defaultProps = {
108
+ panelProps: {
109
+ headline: {},
110
+ subTitle: {}
111
+ }
112
+ };
113
+ return PcNavConfigCategory;
114
+ }(_react["default"].Component);
115
+
116
+ var _default = PcNavConfigCategory;
117
+ exports["default"] = _default;