@fonixtree/magic-design 2.0.33 → 2.0.36

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 (73) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/Trueno-Light.otf +0 -0
  3. package/es/assets/fonts/Trueno-Regular.otf +0 -0
  4. package/es/assets/fonts/TruenoBd.otf +0 -0
  5. package/es/assets/less/font.less +22 -0
  6. package/es/common/AffiliateProductModal/index.js +582 -0
  7. package/es/common/AffiliateProductModal/index.less +146 -0
  8. package/es/common/ProductModal/index.js +1 -2
  9. package/es/common/ProductSource/index.js +42 -10
  10. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
  11. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
  12. package/es/composite-comp/common/components/AffiliateProductItem/index.js +175 -0
  13. package/es/composite-comp/common/components/AffiliateProductItem/index.less +107 -0
  14. package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
  15. package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
  16. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +656 -0
  17. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +76 -0
  18. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +725 -0
  19. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
  20. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
  21. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  22. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +145 -0
  23. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
  24. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  25. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
  26. package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
  27. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
  28. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
  29. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
  30. package/es/constants/component-types.js +9 -3
  31. package/es/constants/index.js +4 -0
  32. package/es/core/Designer/ConfigPanel/index.js +7 -2
  33. package/es/core/Renderer/index.js +18 -11
  34. package/es/meta-comp/components/Text/index.js +16 -0
  35. package/es/utils/businessUtil.js +6 -1
  36. package/es/utils/currencyUtil.js +9 -2
  37. package/lib/assets/fonts/.DS_Store +0 -0
  38. package/lib/assets/fonts/Trueno-Light.otf +0 -0
  39. package/lib/assets/fonts/Trueno-Regular.otf +0 -0
  40. package/lib/assets/fonts/TruenoBd.otf +0 -0
  41. package/lib/assets/less/font.less +22 -0
  42. package/lib/common/AffiliateProductModal/index.js +582 -0
  43. package/lib/common/AffiliateProductModal/index.less +146 -0
  44. package/lib/common/ProductModal/index.js +1 -2
  45. package/lib/common/ProductSource/index.js +42 -10
  46. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
  47. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
  48. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +175 -0
  49. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +107 -0
  50. package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
  51. package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
  52. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +656 -0
  53. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +76 -0
  54. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +725 -0
  55. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
  56. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
  57. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  58. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +145 -0
  59. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
  60. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  61. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
  62. package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
  63. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
  64. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
  65. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
  66. package/lib/constants/component-types.js +9 -3
  67. package/lib/constants/index.js +4 -0
  68. package/lib/core/Designer/ConfigPanel/index.js +7 -2
  69. package/lib/core/Renderer/index.js +18 -11
  70. package/lib/meta-comp/components/Text/index.js +16 -0
  71. package/lib/utils/businessUtil.js +6 -1
  72. package/lib/utils/currencyUtil.js +9 -2
  73. package/package.json +1 -1
@@ -0,0 +1,431 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _antd = require("antd");
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _commonUtil = require("../../../../../utils/commonUtil");
13
+
14
+ var _dataTreeUtils = _interopRequireDefault(require("../../../../../utils/dataTreeUtils"));
15
+
16
+ var _common = require("../../../../../common");
17
+
18
+ var _locale = require("../../../../../locale");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var __assign = void 0 && (void 0).__assign || function () {
49
+ __assign = Object.assign || function (t) {
50
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
51
+ s = arguments[i];
52
+
53
+ for (var p in s) {
54
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
+ }
56
+ }
57
+
58
+ return t;
59
+ };
60
+
61
+ return __assign.apply(this, arguments);
62
+ };
63
+
64
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
65
+ function adopt(value) {
66
+ return value instanceof P ? value : new P(function (resolve) {
67
+ resolve(value);
68
+ });
69
+ }
70
+
71
+ return new (P || (P = Promise))(function (resolve, reject) {
72
+ function fulfilled(value) {
73
+ try {
74
+ step(generator.next(value));
75
+ } catch (e) {
76
+ reject(e);
77
+ }
78
+ }
79
+
80
+ function rejected(value) {
81
+ try {
82
+ step(generator["throw"](value));
83
+ } catch (e) {
84
+ reject(e);
85
+ }
86
+ }
87
+
88
+ function step(result) {
89
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
90
+ }
91
+
92
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
93
+ });
94
+ };
95
+
96
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
97
+ var _ = {
98
+ label: 0,
99
+ sent: function sent() {
100
+ if (t[0] & 1) throw t[1];
101
+ return t[1];
102
+ },
103
+ trys: [],
104
+ ops: []
105
+ },
106
+ f,
107
+ y,
108
+ t,
109
+ g;
110
+ return g = {
111
+ next: verb(0),
112
+ "throw": verb(1),
113
+ "return": verb(2)
114
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
115
+ return this;
116
+ }), g;
117
+
118
+ function verb(n) {
119
+ return function (v) {
120
+ return step([n, v]);
121
+ };
122
+ }
123
+
124
+ function step(op) {
125
+ if (f) throw new TypeError("Generator is already executing.");
126
+
127
+ while (_) {
128
+ try {
129
+ 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;
130
+ if (y = 0, t) op = [op[0] & 2, t.value];
131
+
132
+ switch (op[0]) {
133
+ case 0:
134
+ case 1:
135
+ t = op;
136
+ break;
137
+
138
+ case 4:
139
+ _.label++;
140
+ return {
141
+ value: op[1],
142
+ done: false
143
+ };
144
+
145
+ case 5:
146
+ _.label++;
147
+ y = op[1];
148
+ op = [0];
149
+ continue;
150
+
151
+ case 7:
152
+ op = _.ops.pop();
153
+
154
+ _.trys.pop();
155
+
156
+ continue;
157
+
158
+ default:
159
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
160
+ _ = 0;
161
+ continue;
162
+ }
163
+
164
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
165
+ _.label = op[1];
166
+ break;
167
+ }
168
+
169
+ if (op[0] === 6 && _.label < t[1]) {
170
+ _.label = t[1];
171
+ t = op;
172
+ break;
173
+ }
174
+
175
+ if (t && _.label < t[2]) {
176
+ _.label = t[2];
177
+
178
+ _.ops.push(op);
179
+
180
+ break;
181
+ }
182
+
183
+ if (t[2]) _.ops.pop();
184
+
185
+ _.trys.pop();
186
+
187
+ continue;
188
+ }
189
+
190
+ op = body.call(thisArg, _);
191
+ } catch (e) {
192
+ op = [6, e];
193
+ y = 0;
194
+ } finally {
195
+ f = t = 0;
196
+ }
197
+ }
198
+
199
+ if (op[0] & 5) throw op[1];
200
+ return {
201
+ value: op[0] ? op[1] : void 0,
202
+ done: true
203
+ };
204
+ }
205
+ };
206
+
207
+ var Option = _antd.Select.Option;
208
+
209
+ var AIRecommendation =
210
+ /** @class */
211
+ function (_super) {
212
+ __extends(AIRecommendation, _super);
213
+
214
+ function AIRecommendation() {
215
+ var _this = _super !== null && _super.apply(this, arguments) || this;
216
+
217
+ _this.state = {
218
+ intelligentType: 'Hot',
219
+ intelligentValue: [],
220
+ categoryData: [],
221
+ brandData: [],
222
+ labelData: []
223
+ };
224
+
225
+ _this.onChangeIntelligentType = function (type) {
226
+ return __awaiter(_this, void 0, void 0, function () {
227
+ return __generator(this, function (_a) {
228
+ this.setState({
229
+ intelligentType: type,
230
+ intelligentValue: []
231
+ }); // this.getTypeData(type);
232
+
233
+ this.props.onChange({
234
+ intelligentType: type,
235
+ intelligentValue: []
236
+ });
237
+ return [2
238
+ /*return*/
239
+ ];
240
+ });
241
+ });
242
+ };
243
+
244
+ _this.getTypeData = function (type) {
245
+ return __awaiter(_this, void 0, void 0, function () {
246
+ var res, res, res;
247
+ return __generator(this, function (_a) {
248
+ switch (_a.label) {
249
+ case 0:
250
+ if (!(type === 'Category')) return [3
251
+ /*break*/
252
+ , 2];
253
+ if (this.state.categoryData.length > 0) return [2
254
+ /*return*/
255
+ ];
256
+ return [4
257
+ /*yield*/
258
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
259
+
260
+ case 1:
261
+ res = _a.sent();
262
+ this.setState({
263
+ categoryData: _dataTreeUtils["default"].listToTree(res)
264
+ });
265
+ return [3
266
+ /*break*/
267
+ , 6];
268
+
269
+ case 2:
270
+ if (!(type === 'Brand')) return [3
271
+ /*break*/
272
+ , 4];
273
+ if (this.state.brandData.length > 0) return [2
274
+ /*return*/
275
+ ];
276
+ return [4
277
+ /*yield*/
278
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
279
+
280
+ case 3:
281
+ res = _a.sent();
282
+ this.setState({
283
+ brandData: res
284
+ });
285
+ return [3
286
+ /*break*/
287
+ , 6];
288
+
289
+ case 4:
290
+ if (!(type === 'Label')) return [3
291
+ /*break*/
292
+ , 6];
293
+ if (this.state.labelData.length > 0) return [2
294
+ /*return*/
295
+ ];
296
+ return [4
297
+ /*yield*/
298
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/labels/list")];
299
+
300
+ case 5:
301
+ res = _a.sent();
302
+ this.setState({
303
+ labelData: res
304
+ });
305
+ _a.label = 6;
306
+
307
+ case 6:
308
+ return [2
309
+ /*return*/
310
+ ];
311
+ }
312
+ });
313
+ });
314
+ };
315
+
316
+ return _this;
317
+ }
318
+
319
+ AIRecommendation.prototype.componentDidMount = function () {
320
+ var _a = this.props.value,
321
+ intelligentType = _a.intelligentType,
322
+ intelligentValue = _a.intelligentValue;
323
+ this.getTypeData(intelligentType);
324
+ this.setState({
325
+ intelligentType: intelligentType,
326
+ intelligentValue: intelligentValue
327
+ });
328
+ };
329
+
330
+ AIRecommendation.prototype.componentWillReceiveProps = function (nextProps) {
331
+ var _a = nextProps.value,
332
+ intelligentType = _a.intelligentType,
333
+ intelligentValue = _a.intelligentValue;
334
+ this.getTypeData(intelligentType);
335
+ this.setState({
336
+ intelligentType: intelligentType,
337
+ intelligentValue: intelligentValue
338
+ });
339
+ };
340
+
341
+ AIRecommendation.prototype.render = function () {
342
+ var _this = this;
343
+
344
+ var _a = this.state,
345
+ intelligentType = _a.intelligentType,
346
+ intelligentValue = _a.intelligentValue,
347
+ categoryData = _a.categoryData,
348
+ brandData = _a.brandData,
349
+ labelData = _a.labelData;
350
+ var _onChange = this.props.onChange;
351
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
352
+ split: "dashed",
353
+ title: (0, _locale.i18n)('RECOMMENDED_RULES')
354
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
355
+ onChange: this.onChangeIntelligentType,
356
+ showSearch: true,
357
+ value: intelligentType
358
+ }, /*#__PURE__*/_react["default"].createElement(Option, {
359
+ value: "Hot"
360
+ }, (0, _locale.i18n)('HOT')), /*#__PURE__*/_react["default"].createElement(Option, {
361
+ value: "Like"
362
+ }, (0, _locale.i18n)('GUESS_YOU_LIKE')), /*#__PURE__*/_react["default"].createElement(Option, {
363
+ value: "Category"
364
+ }, (0, _locale.i18n)('CATEGORY')), /*#__PURE__*/_react["default"].createElement(Option, {
365
+ value: "Brand"
366
+ }, (0, _locale.i18n)('BRAND')), /*#__PURE__*/_react["default"].createElement(Option, {
367
+ value: "Label"
368
+ }, (0, _locale.i18n)('LABEL')))), intelligentType === 'Category' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
369
+ allowClear: true,
370
+ dropdownStyle: {
371
+ maxHeight: 400,
372
+ overflow: 'auto'
373
+ },
374
+ multiple: true,
375
+ onChange: function onChange(value) {
376
+ _this.setState({
377
+ intelligentValue: value
378
+ });
379
+
380
+ _onChange(__assign(__assign({}, _this.props.value), {
381
+ intelligentValue: value
382
+ }));
383
+ },
384
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
385
+ treeData: categoryData,
386
+ treeDefaultExpandAll: true,
387
+ value: intelligentValue
388
+ })), intelligentType === 'Brand' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
389
+ mode: "multiple",
390
+ onChange: function onChange(value) {
391
+ _this.setState({
392
+ intelligentValue: value
393
+ });
394
+
395
+ _onChange(__assign(__assign({}, _this.props.value), {
396
+ intelligentValue: value
397
+ }));
398
+ },
399
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
400
+ value: intelligentValue
401
+ }, brandData && brandData.length > 0 && brandData.map(function (v) {
402
+ return /*#__PURE__*/_react["default"].createElement(Option, {
403
+ key: v.brandId,
404
+ value: v.brandId
405
+ }, v.brandName);
406
+ }))), intelligentType === 'Label' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
407
+ mode: "multiple",
408
+ onChange: function onChange(value) {
409
+ _this.setState({
410
+ intelligentValue: value
411
+ });
412
+
413
+ _onChange(__assign(__assign({}, _this.props.value), {
414
+ intelligentValue: value
415
+ }));
416
+ },
417
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
418
+ value: intelligentValue
419
+ }, labelData && labelData.length > 0 && labelData.map(function (v) {
420
+ return /*#__PURE__*/_react["default"].createElement(Option, {
421
+ key: v.labelId,
422
+ value: v.labelId
423
+ }, v.labelName);
424
+ }))));
425
+ };
426
+
427
+ return AIRecommendation;
428
+ }(_react["default"].Component);
429
+
430
+ var _default = AIRecommendation;
431
+ exports["default"] = _default;
@@ -0,0 +1,214 @@
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 _locale = require("../../../../locale");
11
+
12
+ var _common = require("../../../../common");
13
+
14
+ var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
15
+
16
+ var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
17
+
18
+ var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/TextConfig"));
19
+
20
+ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
21
+
22
+ var _coreUtil = require("../../../../utils/coreUtil");
23
+
24
+ require("./index.less");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ var __extends = void 0 && (void 0).__extends || function () {
29
+ var _extendStatics = function extendStatics(d, b) {
30
+ _extendStatics = Object.setPrototypeOf || {
31
+ __proto__: []
32
+ } instanceof Array && function (d, b) {
33
+ d.__proto__ = b;
34
+ } || function (d, b) {
35
+ for (var p in b) {
36
+ if (b.hasOwnProperty(p)) d[p] = b[p];
37
+ }
38
+ };
39
+
40
+ return _extendStatics(d, b);
41
+ };
42
+
43
+ return function (d, b) {
44
+ _extendStatics(d, b);
45
+
46
+ function __() {
47
+ this.constructor = d;
48
+ }
49
+
50
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51
+ };
52
+ }();
53
+
54
+ var __assign = void 0 && (void 0).__assign || function () {
55
+ __assign = Object.assign || function (t) {
56
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
57
+ s = arguments[i];
58
+
59
+ for (var p in s) {
60
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
61
+ }
62
+ }
63
+
64
+ return t;
65
+ };
66
+
67
+ return __assign.apply(this, arguments);
68
+ };
69
+
70
+ var RecommendSecondConfig =
71
+ /** @class */
72
+ function (_super) {
73
+ __extends(RecommendSecondConfig, _super);
74
+
75
+ function RecommendSecondConfig() {
76
+ var _this = _super !== null && _super.apply(this, arguments) || this;
77
+
78
+ _this.state = {};
79
+
80
+ _this.hasSource = function (type) {
81
+ if (!window.systemParams || !window.systemParams.recommendSource) {
82
+ return true;
83
+ }
84
+
85
+ if (window.systemParams.recommendSource && window.systemParams.recommendSource.includes(type)) {
86
+ return true;
87
+ }
88
+
89
+ return false;
90
+ };
91
+
92
+ _this.getContentPanel = function () {
93
+ var panelProps = _this.props.panelProps;
94
+
95
+ var productSource = /*#__PURE__*/_react["default"].createElement("div", {
96
+ className: "sourceOfProduct"
97
+ }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
98
+ title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
99
+ }), /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "greyBg"
101
+ }, /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
102
+ isAffiliate: true,
103
+ onChange: function onChange(v) {
104
+ panelProps.prodIds = v;
105
+
106
+ _this.selfRender();
107
+ },
108
+ value: panelProps.prodIds
109
+ })));
110
+
111
+ var defaultSource = [{
112
+ key: 'defaultSource_1',
113
+ name: (0, _locale.i18n)('IMAGE'),
114
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
115
+ data: panelProps.image
116
+ }),
117
+ metaOption: panelProps.image
118
+ }, {
119
+ key: 'defaultSource_2',
120
+ name: (0, _locale.i18n)('GROUP_NAME'),
121
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
122
+ data: panelProps.groupName
123
+ }),
124
+ metaOption: panelProps.groupName
125
+ }, {
126
+ key: 'defaultSource_3',
127
+ name: (0, _locale.i18n)('SEE_ALL'),
128
+ value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
129
+ data: panelProps.seeAll
130
+ }),
131
+ metaOption: panelProps.seeAll
132
+ }];
133
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
134
+ headerSize: "middle",
135
+ onRefresh: function onRefresh() {
136
+ return (0, _coreUtil.renderPreview)();
137
+ },
138
+ showActiveColor: true,
139
+ source: defaultSource,
140
+ type: "switch"
141
+ }), productSource);
142
+ };
143
+
144
+ _this.resetHover = function () {
145
+ var panelProps = _this.props.panelProps;
146
+
147
+ if (panelProps.hover.open) {
148
+ panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), JSON.parse(JSON.stringify(panelProps.image)));
149
+ panelProps.hover.groupName = __assign(__assign({}, panelProps.hover.groupName), JSON.parse(JSON.stringify(panelProps.groupName)));
150
+ }
151
+ };
152
+
153
+ return _this;
154
+ }
155
+
156
+ RecommendSecondConfig.prototype.render = function () {
157
+ var _this = this;
158
+
159
+ var panelProps = this.props.panelProps;
160
+
161
+ var hoverPanel = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
162
+ divider: "dashed",
163
+ noChange: true,
164
+ onRefresh: function onRefresh() {
165
+ return (0, _coreUtil.renderPreview)();
166
+ },
167
+ source: [{
168
+ key: 'hoverSetting_1',
169
+ name: (0, _locale.i18n)('IMAGE'),
170
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
171
+ data: panelProps.hover.image
172
+ }),
173
+ metaOption: panelProps.hover.image
174
+ }, {
175
+ key: 'hoverSetting_2',
176
+ name: (0, _locale.i18n)('GROUP_NAME'),
177
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
178
+ data: panelProps.hover.groupName
179
+ }),
180
+ metaOption: panelProps.hover.groupName
181
+ }],
182
+ type: "switch"
183
+ });
184
+
185
+ return /*#__PURE__*/_react["default"].createElement("div", {
186
+ className: "recommend_second_conf_wrap"
187
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
188
+ divider: "bold",
189
+ headerSize: "large",
190
+ onRefresh: function onRefresh() {
191
+ return _this.resetHover();
192
+ },
193
+ source: [{
194
+ key: '1',
195
+ name: (0, _locale.i18n)('CONTENT'),
196
+ value: this.getContentPanel()
197
+ }, {
198
+ key: '2',
199
+ name: (0, _locale.i18n)('HOVER'),
200
+ value: hoverPanel,
201
+ metaOption: panelProps.hover,
202
+ toggleType: 'checkbox'
203
+ }]
204
+ }));
205
+ };
206
+
207
+ RecommendSecondConfig.defaultProps = {
208
+ panelProps: {}
209
+ };
210
+ return RecommendSecondConfig;
211
+ }(_BaseConfig["default"]);
212
+
213
+ var _default = RecommendSecondConfig;
214
+ exports["default"] = _default;
@@ -0,0 +1,15 @@
1
+ .recommend_second_conf_wrap {
2
+
3
+ .sourceOfProduct {
4
+ border-top: 1px solid #D2D9E5;
5
+ padding-top: 20px;
6
+ padding-bottom: 10px;
7
+
8
+ .greyBg {
9
+ background: #F5F6F7;
10
+ border-radius: 6px;
11
+ padding: 12px;
12
+ padding-bottom: 1px;
13
+ }
14
+ }
15
+ }