@fonixtree/magic-design 2.0.198 → 2.0.202

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 (139) hide show
  1. package/es/assets/fonts/Montserrat-Bold.ttf +0 -0
  2. package/es/assets/fonts/Montserrat-Medium.ttf +0 -0
  3. package/es/assets/fonts/Montserrat-Regular.ttf +0 -0
  4. package/es/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.css +14 -6
  6. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  7. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  8. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  9. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  10. package/es/assets/images/base64/index.js +8 -2
  11. package/es/common/ColorPickerInput/index.less +2 -0
  12. package/es/common/ErrorBoundary/index.js +90 -0
  13. package/es/common/FontStyles/index.less +1 -1
  14. package/es/common/index.js +8 -0
  15. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  16. package/es/composite-comp/common/components/ImageLabel/index.less +23 -7
  17. package/es/composite-comp/common/components/ProductItem/index.js +34 -24
  18. package/es/composite-comp/common/components/ProductItem/index.less +10 -15
  19. package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +65 -3
  20. package/es/composite-comp/dito/components/Bargain/defaultJSON.js +24 -0
  21. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +24 -0
  22. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +9 -1
  23. package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +24 -0
  24. package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +8 -5
  25. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +19 -0
  26. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  27. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +12 -6
  28. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +8 -1
  29. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +55 -1
  30. package/es/composite-comp/dito/components/Recommend/mobile/imgs/card.png +0 -0
  31. package/es/composite-comp/dito/components/Recommend/mobile/index.js +47 -6
  32. package/es/composite-comp/dito/components/Recommend/mobile/index.less +24 -1
  33. package/es/composite-comp/dito/components/SearchBanner/defaultJSON.js +234 -0
  34. package/es/composite-comp/dito/components/SearchBanner/imgs/defaultImg.png +0 -0
  35. package/es/composite-comp/dito/components/SearchBanner/imgs/pcDefImg1.png +0 -0
  36. package/es/composite-comp/dito/components/SearchBanner/index.js +108 -0
  37. package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +301 -0
  38. package/es/composite-comp/dito/components/SearchBanner/mobile/index.less +108 -0
  39. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  40. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +7 -0
  41. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +7 -0
  42. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +7 -0
  43. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.js +91 -0
  44. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.less +9 -0
  45. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +10 -2
  46. package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +17 -1
  47. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +1 -0
  48. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +197 -0
  49. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.less +7 -0
  50. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.js +148 -0
  51. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.less +0 -0
  52. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.js +226 -0
  53. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.less +9 -0
  54. package/es/composite-comp/dito/config-panels/SearchBannerConfig/imgs/defaultImg.png +0 -0
  55. package/es/composite-comp/dito/config-panels/SearchBannerConfig/index.js +65 -0
  56. package/es/composite-comp/dito/second-config-panels/SearchBannerSecondConfig/index.js +98 -0
  57. package/es/composite-comp/nuri/components/AffiliateRecommend/mobile/index.js +1 -1
  58. package/es/composite-comp/nuri/components/AffiliateRecommend/mobile/index.less +15 -15
  59. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
  60. package/es/composite-comp/public/components/Stores/mobile/index.less +3 -0
  61. package/es/constants/component-types.js +9 -3
  62. package/es/constants/index.js +4 -0
  63. package/es/core/Designer/ConfigPanel/index.js +1 -0
  64. package/es/core/Designer/index.js +2 -2
  65. package/es/decorator/compositeDecorator.js +9 -3
  66. package/es/locale/ar/ar.json +7 -0
  67. package/es/locale/en/en.json +7 -0
  68. package/es/locale/es/es.json +7 -0
  69. package/es/locale/mn/mn.json +4 -0
  70. package/lib/assets/fonts/Montserrat-Bold.ttf +0 -0
  71. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  72. package/lib/assets/fonts/Montserrat-Regular.ttf +0 -0
  73. package/lib/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  74. package/lib/assets/fonts/magic-box-iconfont.css +14 -6
  75. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  76. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  77. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  78. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  79. package/lib/assets/images/base64/index.js +8 -2
  80. package/lib/common/ColorPickerInput/index.less +2 -0
  81. package/lib/common/ErrorBoundary/index.js +90 -0
  82. package/lib/common/FontStyles/index.less +1 -1
  83. package/lib/common/index.js +8 -0
  84. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  85. package/lib/composite-comp/common/components/ImageLabel/index.less +23 -7
  86. package/lib/composite-comp/common/components/ProductItem/index.js +34 -24
  87. package/lib/composite-comp/common/components/ProductItem/index.less +10 -15
  88. package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +65 -3
  89. package/lib/composite-comp/dito/components/Bargain/defaultJSON.js +24 -0
  90. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +24 -0
  91. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +9 -1
  92. package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +24 -0
  93. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +8 -5
  94. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +19 -0
  95. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  96. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +12 -6
  97. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +8 -1
  98. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +55 -1
  99. package/lib/composite-comp/dito/components/Recommend/mobile/imgs/card.png +0 -0
  100. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +47 -6
  101. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +24 -1
  102. package/lib/composite-comp/dito/components/SearchBanner/defaultJSON.js +234 -0
  103. package/lib/composite-comp/dito/components/SearchBanner/imgs/defaultImg.png +0 -0
  104. package/lib/composite-comp/dito/components/SearchBanner/imgs/pcDefImg1.png +0 -0
  105. package/lib/composite-comp/dito/components/SearchBanner/index.js +108 -0
  106. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +301 -0
  107. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.less +108 -0
  108. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  109. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +7 -0
  110. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +7 -0
  111. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +7 -0
  112. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.js +91 -0
  113. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.less +9 -0
  114. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +10 -2
  115. package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +17 -1
  116. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +1 -0
  117. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +197 -0
  118. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.less +7 -0
  119. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.js +148 -0
  120. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.less +0 -0
  121. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.js +226 -0
  122. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.less +9 -0
  123. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/imgs/defaultImg.png +0 -0
  124. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/index.js +65 -0
  125. package/lib/composite-comp/dito/second-config-panels/SearchBannerSecondConfig/index.js +98 -0
  126. package/lib/composite-comp/nuri/components/AffiliateRecommend/mobile/index.js +1 -1
  127. package/lib/composite-comp/nuri/components/AffiliateRecommend/mobile/index.less +15 -15
  128. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
  129. package/lib/composite-comp/public/components/Stores/mobile/index.less +3 -0
  130. package/lib/constants/component-types.js +9 -3
  131. package/lib/constants/index.js +4 -0
  132. package/lib/core/Designer/ConfigPanel/index.js +1 -0
  133. package/lib/core/Designer/index.js +2 -2
  134. package/lib/decorator/compositeDecorator.js +9 -3
  135. package/lib/locale/ar/ar.json +7 -0
  136. package/lib/locale/en/en.json +7 -0
  137. package/lib/locale/es/es.json +7 -0
  138. package/lib/locale/mn/mn.json +4 -0
  139. package/package.json +1 -1
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _ConfigGroup = _interopRequireDefault(require("./ConfigGroup"));
11
11
 
12
+ var _ConfigDecoration = _interopRequireDefault(require("./ConfigDecoration"));
13
+
12
14
  var _locale = require("../../../../locale");
13
15
 
14
16
  var _common = require("../../../../common");
@@ -86,6 +88,12 @@ function (_super) {
86
88
  value: this.getContentPanel()
87
89
  }, {
88
90
  key: 'PersonalInformation2',
91
+ name: (0, _locale.i18n)('FESTIVAL_DECORATION'),
92
+ value: /*#__PURE__*/_react["default"].createElement(_ConfigDecoration["default"], {
93
+ data: data.decorationIcon
94
+ })
95
+ }, {
96
+ key: 'PersonalInformation3',
89
97
  name: (0, _locale.i18n)('Content'),
90
98
  value: /*#__PURE__*/_react["default"].createElement(_ConfigGroup["default"], {
91
99
  maxNum: 4,
@@ -93,13 +101,13 @@ function (_super) {
93
101
  }),
94
102
  metaOption: data.groupSource
95
103
  }, {
96
- key: 'PersonalInformation3',
104
+ key: 'PersonalInformation4',
97
105
  name: (0, _locale.i18n)('SPACING'),
98
106
  value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
99
107
  data: data.spacing
100
108
  })
101
109
  }, {
102
- key: 'PersonalInformation4',
110
+ key: 'PersonalInformation5',
103
111
  name: (0, _locale.i18n)('BACKGROUND'),
104
112
  value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
105
113
  data: data.background
@@ -99,6 +99,20 @@ function (_super) {
99
99
  data: panelProps.salesPrice
100
100
  }),
101
101
  metaOption: panelProps.salesPrice
102
+ }, {
103
+ key: '5',
104
+ name: (0, _locale.i18n)('SOLD'),
105
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
106
+ data: panelProps.sold
107
+ }),
108
+ metaOption: panelProps.sold
109
+ }, {
110
+ key: '6',
111
+ name: (0, _locale.i18n)('PRICE_REDUCTION'),
112
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
113
+ data: panelProps.discountLabel
114
+ }),
115
+ metaOption: panelProps.discountLabel
102
116
  }],
103
117
  type: "switch"
104
118
  }));
@@ -110,7 +124,9 @@ function (_super) {
110
124
  label: {},
111
125
  productName: {},
112
126
  activityPrice: {},
113
- salesPrice: {}
127
+ salesPrice: {},
128
+ sold: {},
129
+ discountLabel: {}
114
130
  }
115
131
  };
116
132
  return AComponent;
@@ -124,6 +124,7 @@ function (_super) {
124
124
  key: '5',
125
125
  name: (0, _locale.i18n)('BACKGROUND'),
126
126
  value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
127
+ component: "recommend",
127
128
  data: data.background
128
129
  })
129
130
  }],
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _antd = require("antd4");
13
+
14
+ var _common = require("../../../../../common");
15
+
16
+ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
17
+
18
+ var _coreUtil = require("../../../../../utils/coreUtil");
19
+
20
+ var _locale = require("../../../../../locale");
21
+
22
+ var _InputField = _interopRequireDefault(require("../../../../common/config-panels/InputField"));
23
+
24
+ require("./index.less");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
32
+ var __extends = void 0 && (void 0).__extends || function () {
33
+ var _extendStatics = function extendStatics(d, b) {
34
+ _extendStatics = Object.setPrototypeOf || {
35
+ __proto__: []
36
+ } instanceof Array && function (d, b) {
37
+ d.__proto__ = b;
38
+ } || function (d, b) {
39
+ for (var p in b) {
40
+ if (b.hasOwnProperty(p)) d[p] = b[p];
41
+ }
42
+ };
43
+
44
+ return _extendStatics(d, b);
45
+ };
46
+
47
+ return function (d, b) {
48
+ _extendStatics(d, b);
49
+
50
+ function __() {
51
+ this.constructor = d;
52
+ }
53
+
54
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55
+ };
56
+ }();
57
+
58
+ var SearchBarConfigContent =
59
+ /** @class */
60
+ function (_super) {
61
+ __extends(SearchBarConfigContent, _super);
62
+
63
+ function SearchBarConfigContent() {
64
+ var _this = _super !== null && _super.apply(this, arguments) || this;
65
+
66
+ _this.selfRender = function () {
67
+ (0, _coreUtil.renderPreview)();
68
+
69
+ _this.setState({});
70
+ };
71
+
72
+ return _this;
73
+ }
74
+
75
+ SearchBarConfigContent.prototype.render = function () {
76
+ var _this = this;
77
+
78
+ var _a, _b, _c, _d, _e, _f, _g, _h;
79
+
80
+ var panelProps = this.props.panelProps;
81
+ var source = [{
82
+ key: 'search1',
83
+ name: (0, _locale.i18n)('LOGO'),
84
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
85
+ data: panelProps.logo
86
+ }),
87
+ metaOption: panelProps.logo,
88
+ toggleType: 'switch'
89
+ }, {
90
+ key: 'search2',
91
+ name: (0, _locale.i18n)('SEARCH_BOX'),
92
+ value: /*#__PURE__*/_react["default"].createElement("div", {
93
+ className: "search_bar_config_box"
94
+ }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
95
+ title: (0, _locale.i18n)('BOX_COLOR')
96
+ }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
97
+ colorType: "rgba",
98
+ onChange: function onChange(v) {
99
+ if ((0, _coreUtil.isPc)()) {
100
+ panelProps.box.color.pc = v;
101
+ } else {
102
+ panelProps.box.color.mobile = v;
103
+ }
104
+
105
+ _this.selfRender();
106
+ },
107
+ value: (0, _coreUtil.isPc)() ? panelProps.box.color.pc : panelProps.box.color.mobile
108
+ })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
109
+ style: {
110
+ marginTop: 16
111
+ },
112
+ title: (0, _locale.i18n)('BOX_BACKGROUND')
113
+ }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
114
+ colorType: "rgba",
115
+ onChange: function onChange(v) {
116
+ if ((0, _coreUtil.isPc)()) {
117
+ panelProps.box.backgroundColor.pc = v;
118
+ } else {
119
+ panelProps.box.backgroundColor.mobile = v;
120
+ }
121
+
122
+ _this.selfRender();
123
+ },
124
+ value: (0, _coreUtil.isPc)() ? (_b = (_a = panelProps.box) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.pc : (_d = (_c = panelProps.box) === null || _c === void 0 ? void 0 : _c.backgroundColor) === null || _d === void 0 ? void 0 : _d.mobile
125
+ }))),
126
+ metaOption: panelProps.box,
127
+ toggleType: 'switch'
128
+ }, {
129
+ key: 'search3',
130
+ name: (0, _locale.i18n)('SEARCH_BAR_KEYWORD'),
131
+ toggleType: 'switch',
132
+ value: /*#__PURE__*/_react["default"].createElement("div", {
133
+ style: {
134
+ marginTop: 10
135
+ }
136
+ }, /*#__PURE__*/_react["default"].createElement(_InputField["default"], {
137
+ data: panelProps.keyword,
138
+ inputLabel: "Input Keyword"
139
+ })),
140
+ metaOption: panelProps.keyword
141
+ }, {
142
+ key: 'search4',
143
+ name: (0, _locale.i18n)('SEARCH_BAR_PLACEHOLDER'),
144
+ toggleType: 'switch',
145
+ value: /*#__PURE__*/_react["default"].createElement("div", {
146
+ className: "m-text-config",
147
+ style: {
148
+ marginTop: 10
149
+ }
150
+ }, /*#__PURE__*/_react["default"].createElement(_common.Field, {
151
+ title: "Input Placeholder"
152
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
153
+ onChange: function onChange(e) {
154
+ panelProps.placeholder.text = e.target.value;
155
+
156
+ _this.selfRender();
157
+ },
158
+ value: (_e = panelProps.placeholder) === null || _e === void 0 ? void 0 : _e.text
159
+ }))),
160
+ metaOption: panelProps.placeholder
161
+ }, {
162
+ key: (_f = panelProps.cartIcon) === null || _f === void 0 ? void 0 : _f.id,
163
+ name: (0, _locale.i18n)('CART_ICON'),
164
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
165
+ data: panelProps.cartIcon
166
+ }),
167
+ metaOption: panelProps.cartIcon
168
+ }, {
169
+ key: (_g = panelProps.chatbotIcon) === null || _g === void 0 ? void 0 : _g.id,
170
+ name: (0, _locale.i18n)('CHATBOT_ICON'),
171
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
172
+ data: panelProps.chatbotIcon
173
+ }),
174
+ metaOption: panelProps.chatbotIcon
175
+ }, {
176
+ key: (_h = panelProps.messageIcon) === null || _h === void 0 ? void 0 : _h.id,
177
+ name: (0, _locale.i18n)('MESSAGE_ICON'),
178
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
179
+ data: panelProps.messageIcon
180
+ }),
181
+ metaOption: panelProps.messageIcon
182
+ }];
183
+ return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
184
+ headerSize: "middle",
185
+ noChange: true,
186
+ onRefresh: this.selfRender,
187
+ showActiveColor: true,
188
+ source: source,
189
+ type: "switch"
190
+ });
191
+ };
192
+
193
+ return SearchBarConfigContent;
194
+ }(_react.Component);
195
+
196
+ var _default = SearchBarConfigContent;
197
+ exports["default"] = _default;
@@ -0,0 +1,7 @@
1
+ .search_bar_config_box {
2
+ padding: 12px;
3
+ background-color: #F5F6F7;
4
+ margin-top: 16px;
5
+ padding-bottom: 1px;
6
+ border-radius: 6px;
7
+ }
@@ -0,0 +1,148 @@
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 _mobxReact = require("mobx-react");
11
+
12
+ var _coreUtil = require("../../../../../utils/coreUtil");
13
+
14
+ var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
15
+
16
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
17
+
18
+ var _defaultJSON = require("../../../components/SearchBanner/defaultJSON");
19
+
20
+ var _defaultImg = _interopRequireDefault(require("../imgs/defaultImg.png"));
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ var _decorator = require("../../../../../decorator");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
29
+
30
+ var __extends = void 0 && (void 0).__extends || function () {
31
+ var _extendStatics = function extendStatics(d, b) {
32
+ _extendStatics = Object.setPrototypeOf || {
33
+ __proto__: []
34
+ } instanceof Array && function (d, b) {
35
+ d.__proto__ = b;
36
+ } || function (d, b) {
37
+ for (var p in b) {
38
+ if (b.hasOwnProperty(p)) d[p] = b[p];
39
+ }
40
+ };
41
+
42
+ return _extendStatics(d, b);
43
+ };
44
+
45
+ return function (d, b) {
46
+ _extendStatics(d, b);
47
+
48
+ function __() {
49
+ this.constructor = d;
50
+ }
51
+
52
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53
+ };
54
+ }();
55
+
56
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
57
+ var c = arguments.length,
58
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
59
+ d;
60
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
61
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62
+ }
63
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
64
+ };
65
+
66
+ var notice = "Looks like you don't have any images in your gallery. Choose images to feature on this page.";
67
+
68
+ var AComponent =
69
+ /** @class */
70
+ function (_super) {
71
+ __extends(AComponent, _super);
72
+
73
+ function AComponent() {
74
+ var _this = _super !== null && _super.apply(this, arguments) || this;
75
+
76
+ _this.state = {};
77
+
78
+ _this.onClickItem = function (node) {
79
+ _this.props.store.setState({
80
+ clickedGroup: node.id
81
+ });
82
+ };
83
+
84
+ _this.onAddClick = function () {
85
+ var json = (0, _defaultJSON.groupSourceJSON)(_this.props.id);
86
+
87
+ _this.props.source.push(json);
88
+
89
+ _this.setState({});
90
+
91
+ (0, _coreUtil.renderPreview)();
92
+ };
93
+
94
+ _this.reRender = function () {
95
+ (0, _coreUtil.renderPreview)();
96
+
97
+ _this.setState({});
98
+ };
99
+
100
+ return _this;
101
+ }
102
+
103
+ AComponent.prototype.render = function () {
104
+ var _a = this.props.source,
105
+ source = _a === void 0 ? [] : _a;
106
+
107
+ var _renderCard = function renderCard(src) {
108
+ return /*#__PURE__*/_react["default"].createElement("div", {
109
+ className: "card_wrap"
110
+ }, /*#__PURE__*/_react["default"].createElement("img", {
111
+ alt: "",
112
+ src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
113
+ }), /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "name"
115
+ }, ((0, _coreUtil.isPc)() ? src.image.content.pcName : src.image.content.h5Name) || (0, _locale.i18n)('URL_IMAGE')));
116
+ };
117
+
118
+ return /*#__PURE__*/_react["default"].createElement("div", {
119
+ className: "carousel_image"
120
+ }, /*#__PURE__*/_react["default"].createElement("div", {
121
+ className: "node_list"
122
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
123
+ className: "notice"
124
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
125
+ onClickItem: this.onClickItem,
126
+ renderCard: function renderCard(v) {
127
+ return _renderCard(v);
128
+ },
129
+ reRender: this.reRender,
130
+ source: source
131
+ })), /*#__PURE__*/_react["default"].createElement("div", {
132
+ className: "btn_wrap"
133
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
134
+ icon: "icon-add",
135
+ onClick: this.onAddClick,
136
+ type: "primary"
137
+ }, (0, _locale.i18n)('ADD_IMAGE'))));
138
+ };
139
+
140
+ AComponent.defaultProps = {
141
+ source: []
142
+ };
143
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
144
+ return AComponent;
145
+ }(_react["default"].Component);
146
+
147
+ var _default = AComponent;
148
+ exports["default"] = _default;
@@ -0,0 +1,226 @@
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 _common = require("../../../../../common");
11
+
12
+ require("./index.less");
13
+
14
+ var _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _layout = require("../../../../../constants/layout");
17
+
18
+ var _CustomizeConfig = _interopRequireDefault(require("../../../../common/config-panels/CustomizeConfig"));
19
+
20
+ var _locale = require("../../../../../locale");
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 BannerConfigSetting =
51
+ /** @class */
52
+ function (_super) {
53
+ __extends(BannerConfigSetting, _super);
54
+
55
+ function BannerConfigSetting() {
56
+ var _this = _super !== null && _super.apply(this, arguments) || this;
57
+
58
+ _this.reRender = function () {
59
+ (0, _coreUtil.renderPreview)();
60
+
61
+ _this.setState({});
62
+ };
63
+
64
+ return _this;
65
+ }
66
+
67
+ BannerConfigSetting.prototype.render = function () {
68
+ var _this = this;
69
+
70
+ var setting = this.props.setting;
71
+
72
+ var autoplaySetting = /*#__PURE__*/_react["default"].createElement(_common.Field, {
73
+ title: (0, _locale.i18n)('HOW_LONG_BETWEEN_SLIDES_(SECS)')
74
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
75
+ maxVal: 60,
76
+ minVal: 1,
77
+ onChange: function onChange(value) {
78
+ setting.autoplay.interval = value.count;
79
+
80
+ _this.reRender();
81
+ },
82
+ unit: "s",
83
+ value: {
84
+ count: setting.autoplay.interval
85
+ }
86
+ }));
87
+
88
+ var navigationSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
89
+ title: (0, _locale.i18n)('NAVIGATION_ARROW')
90
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
91
+ needColor: true,
92
+ onChange: function onChange(value) {
93
+ setting.navigation.size = value.count;
94
+ setting.navigation.color = value.color;
95
+
96
+ _this.reRender();
97
+ },
98
+ unit: "px",
99
+ value: {
100
+ count: setting.navigation.size,
101
+ color: setting.navigation.color
102
+ }
103
+ })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
104
+ title: (0, _locale.i18n)('SELECTED_ARROW')
105
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
106
+ needColor: true,
107
+ onChange: function onChange(value) {
108
+ setting.navigation.hoverSize = value.count;
109
+ setting.navigation.hoverColor = value.color;
110
+
111
+ _this.reRender();
112
+ },
113
+ unit: "px",
114
+ value: {
115
+ count: setting.navigation.hoverSize,
116
+ color: setting.navigation.hoverColor
117
+ }
118
+ })));
119
+
120
+ var dotsSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
121
+ data: setting.dots,
122
+ isHideAlign: true,
123
+ layoutSource: _layout.bannerSlideLayout
124
+ }), /*#__PURE__*/_react["default"].createElement(_common.Field, {
125
+ title: (0, _locale.i18n)('SLIDE_BUTTON')
126
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
127
+ needColor: true,
128
+ onChange: function onChange(value) {
129
+ if ((0, _coreUtil.isPc)()) {
130
+ setting.dots.size.pc = value.count;
131
+ setting.dots.color.pc = value.color;
132
+ } else {
133
+ setting.dots.size.mobile = value.count;
134
+ setting.dots.color.mobile = value.color;
135
+ }
136
+
137
+ _this.reRender();
138
+ },
139
+ unit: "px",
140
+ value: {
141
+ count: (0, _coreUtil.isPc)() ? setting.dots.size.pc : setting.dots.size.mobile,
142
+ color: (0, _coreUtil.isPc)() ? setting.dots.color.pc : setting.dots.color.mobile
143
+ }
144
+ })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
145
+ title: (0, _locale.i18n)('SELECTED_BUTTON')
146
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
147
+ needColor: true,
148
+ onChange: function onChange(value) {
149
+ if ((0, _coreUtil.isPc)()) {
150
+ setting.dots.hoverSize.pc = value.count;
151
+ setting.dots.hoverColor.pc = value.color;
152
+ } else {
153
+ setting.dots.hoverSize.mobile = value.count;
154
+ setting.dots.hoverColor.mobile = value.color;
155
+ }
156
+
157
+ _this.reRender();
158
+ },
159
+ unit: "px",
160
+ value: {
161
+ count: (0, _coreUtil.isPc)() ? setting.dots.hoverSize.pc : setting.dots.hoverSize.mobile,
162
+ color: (0, _coreUtil.isPc)() ? setting.dots.hoverColor.pc : setting.dots.hoverColor.mobile
163
+ }
164
+ })));
165
+
166
+ return /*#__PURE__*/_react["default"].createElement("div", {
167
+ className: "banner_setting"
168
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
169
+ divider: "dashed",
170
+ onRefresh: this.reRender,
171
+ source: [{
172
+ key: '1',
173
+ name: (0, _locale.i18n)('AUTOPLAYS'),
174
+ value: autoplaySetting,
175
+ metaOption: setting.autoplay,
176
+ toggleType: 'switch'
177
+ }, {
178
+ key: '2',
179
+ name: (0, _locale.i18n)('SHOW_NAVIGATION_ARROW'),
180
+ value: navigationSetting,
181
+ metaOption: setting.navigation,
182
+ toggleType: 'switch'
183
+ }, {
184
+ key: '3',
185
+ name: (0, _locale.i18n)('SHOW_SLIDE_BUTTON'),
186
+ value: dotsSetting,
187
+ metaOption: setting.dots,
188
+ toggleType: 'switch'
189
+ }]
190
+ }));
191
+ };
192
+
193
+ BannerConfigSetting.defaultProps = {
194
+ setting: {
195
+ autoplay: {
196
+ open: false,
197
+ interval: 4
198
+ },
199
+ navigation: {
200
+ open: false,
201
+ size: 16,
202
+ color: '#384966',
203
+ hoverSize: 16,
204
+ hoverColor: '#384966'
205
+ },
206
+ dots: {
207
+ open: false,
208
+ layout: 'circle',
209
+ size: {
210
+ pc: 16,
211
+ mobile: 8
212
+ },
213
+ color: '#fff',
214
+ hoverSize: {
215
+ pc: 16,
216
+ mobile: 8
217
+ },
218
+ hoverColor: '#fff'
219
+ }
220
+ }
221
+ };
222
+ return BannerConfigSetting;
223
+ }(_react["default"].Component);
224
+
225
+ var _default = BannerConfigSetting;
226
+ exports["default"] = _default;
@@ -0,0 +1,9 @@
1
+ .banner_setting {
2
+
3
+ .collapse_wrap {
4
+ .header_wrap {
5
+ font-weight: 600 !important;
6
+ }
7
+ }
8
+
9
+ }