@fonixtree/magic-design 2.0.97 → 2.0.98
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.
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/es/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/es/common/Collapse/index.js +10 -8
- package/es/common/FontStyles/index.less +3 -1
- package/es/common/MonpayCountDown/index.js +160 -0
- package/es/common/RatingText/index.js +105 -0
- package/es/common/RatingText/index.less +12 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/es/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/es/composite-comp/common/components/ProductItem/index.js +5 -11
- package/es/composite-comp/common/components/ProductItem/index.less +10 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +385 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +714 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +763 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +124 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/es/constants/component-types.js +13 -3
- package/es/constants/index.js +8 -0
- package/es/constants/layout.js +43 -4
- package/es/core/Designer/ConfigPanel/index.js +1 -1
- package/es/core/Designer/index.js +5 -2
- package/es/locale/en/en.json +11 -0
- package/es/locale/es/es.json +11 -0
- package/es/locale/id/id.json +11 -0
- package/es/utils/dateUtil.js +13 -0
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/lib/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/lib/common/Collapse/index.js +10 -8
- package/lib/common/FontStyles/index.less +3 -1
- package/lib/common/MonpayCountDown/index.js +160 -0
- package/lib/common/RatingText/index.js +105 -0
- package/lib/common/RatingText/index.less +12 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/lib/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +5 -11
- package/lib/composite-comp/common/components/ProductItem/index.less +10 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +385 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +714 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +763 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +124 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/lib/constants/component-types.js +13 -3
- package/lib/constants/index.js +8 -0
- package/lib/constants/layout.js +43 -4
- package/lib/core/Designer/ConfigPanel/index.js +1 -1
- package/lib/core/Designer/index.js +5 -2
- package/lib/locale/en/en.json +11 -0
- package/lib/locale/es/es.json +11 -0
- package/lib/locale/id/id.json +11 -0
- package/lib/utils/dateUtil.js +13 -0
- package/package.json +1 -1
|
@@ -36,13 +36,26 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
36
36
|
open: true,
|
|
37
37
|
color: {
|
|
38
38
|
pc: '#D92929',
|
|
39
|
-
mobile: '#
|
|
39
|
+
mobile: '#D2D9E5'
|
|
40
40
|
},
|
|
41
41
|
backgroundColor: {
|
|
42
42
|
pc: '#fff',
|
|
43
43
|
mobile: '#fff'
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
keyword: {
|
|
47
|
+
open: true,
|
|
48
|
+
type: 'InputField',
|
|
49
|
+
placeholder: 'Tshirt Woman',
|
|
50
|
+
content: {
|
|
51
|
+
sizeType: 'Customize font styles',
|
|
52
|
+
fontFamily: 'Open Sans',
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
fontSize: 12,
|
|
55
|
+
pcFontSize: 14,
|
|
56
|
+
color: '#CE1126'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
46
59
|
icon: {
|
|
47
60
|
id: (0, _uuid.v4)(),
|
|
48
61
|
open: true,
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
10
12
|
require("./index.less");
|
|
11
13
|
|
|
12
14
|
var _components = require("../../../../../meta-comp/components");
|
|
@@ -15,6 +17,8 @@ var _common = require("../../../../../common");
|
|
|
15
17
|
|
|
16
18
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
19
|
|
|
20
|
+
var _Text = require("../../../../../meta-comp/components/Text");
|
|
21
|
+
|
|
18
22
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -45,6 +49,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
45
49
|
};
|
|
46
50
|
}();
|
|
47
51
|
|
|
52
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
53
|
+
__assign = Object.assign || function (t) {
|
|
54
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
55
|
+
s = arguments[i];
|
|
56
|
+
|
|
57
|
+
for (var p in s) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return t;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return __assign.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
|
|
48
68
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
49
69
|
function adopt(value) {
|
|
50
70
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -198,7 +218,8 @@ function (_super) {
|
|
|
198
218
|
|
|
199
219
|
_this.state = {
|
|
200
220
|
messageNum: '',
|
|
201
|
-
cartNum: ''
|
|
221
|
+
cartNum: '',
|
|
222
|
+
editing: false
|
|
202
223
|
};
|
|
203
224
|
|
|
204
225
|
_this.getCartNum = function () {
|
|
@@ -265,60 +286,103 @@ function (_super) {
|
|
|
265
286
|
});
|
|
266
287
|
};
|
|
267
288
|
|
|
289
|
+
_this.onChange = function (e) {
|
|
290
|
+
_this.setState({
|
|
291
|
+
value: e.target.value,
|
|
292
|
+
editing: true
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
_this.onFocus = function () {
|
|
297
|
+
var _a;
|
|
298
|
+
|
|
299
|
+
var value = _this.state.value;
|
|
300
|
+
|
|
301
|
+
if (value === ((_a = _this.props.data.content.keyword) === null || _a === void 0 ? void 0 : _a.placeholder)) {
|
|
302
|
+
_this.setState({
|
|
303
|
+
value: '',
|
|
304
|
+
editing: true
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
_this.onBlur = function () {
|
|
310
|
+
var _a, _b, _c;
|
|
311
|
+
|
|
312
|
+
var value = _this.state.value;
|
|
313
|
+
|
|
314
|
+
if (!value) {
|
|
315
|
+
_this.setState({
|
|
316
|
+
value: (_c = (_b = (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder,
|
|
317
|
+
editing: false
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
268
322
|
return _this;
|
|
269
323
|
}
|
|
270
324
|
|
|
271
325
|
SearchMobile.prototype.componentDidMount = function () {
|
|
272
|
-
|
|
273
|
-
|
|
326
|
+
var _a, _b, _c;
|
|
327
|
+
|
|
274
328
|
this.getMessageNum();
|
|
275
329
|
this.getCartNum();
|
|
330
|
+
this.setState({
|
|
331
|
+
value: (_c = (_b = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
SearchMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
336
|
+
var _a, _b, _c;
|
|
337
|
+
|
|
338
|
+
if (!this.state.editing) {
|
|
339
|
+
this.setState({
|
|
340
|
+
value: (_c = (_b = (_a = nextProps.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
341
|
+
});
|
|
342
|
+
}
|
|
276
343
|
};
|
|
277
344
|
|
|
278
345
|
SearchMobile.prototype.render = function () {
|
|
279
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
346
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
280
347
|
|
|
281
348
|
var data = this.props.data;
|
|
282
|
-
var
|
|
283
|
-
messageNum =
|
|
284
|
-
cartNum =
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
// opacity: data.content.background.opacity,
|
|
289
|
-
// };
|
|
290
|
-
// } else {
|
|
291
|
-
// styleWrap = {
|
|
292
|
-
// backgroundImage: `url(${data.content.background.image})`,
|
|
293
|
-
// backgroundPosition: 'center',
|
|
294
|
-
// backgroundRepeat: 'no-repeat',
|
|
295
|
-
// backgroundSize: '100%',
|
|
296
|
-
// };
|
|
297
|
-
// }
|
|
349
|
+
var _t = this.state,
|
|
350
|
+
messageNum = _t.messageNum,
|
|
351
|
+
cartNum = _t.cartNum,
|
|
352
|
+
value = _t.value;
|
|
353
|
+
|
|
354
|
+
var style = __assign({}, (0, _Text.contentStyle)((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content));
|
|
298
355
|
|
|
356
|
+
Reflect.deleteProperty(style, 'width');
|
|
299
357
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
358
|
className: "m-search-bar"
|
|
301
359
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
360
|
className: "right"
|
|
303
|
-
}, data.content && ((
|
|
361
|
+
}, data.content && ((_b = data.content.box) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
304
362
|
className: "search-input-wrap",
|
|
305
363
|
onClick: function onClick() {
|
|
306
364
|
return (0, _coreUtil.clickUrl)('/search-page');
|
|
307
365
|
},
|
|
308
366
|
style: {
|
|
309
|
-
borderColor: (
|
|
367
|
+
borderColor: (_d = (_c = data.content.box) === null || _c === void 0 ? void 0 : _c.color) === null || _d === void 0 ? void 0 : _d.mobile,
|
|
368
|
+
backgroundColor: (_f = (_e = data.content.box) === null || _e === void 0 ? void 0 : _e.backgroundColor) === null || _f === void 0 ? void 0 : _f.mobile
|
|
310
369
|
}
|
|
311
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
312
|
-
|
|
370
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
371
|
+
className: "search-input",
|
|
372
|
+
onBlur: this.onBlur,
|
|
373
|
+
onChange: this.onChange,
|
|
374
|
+
onFocus: this.onFocus,
|
|
375
|
+
style: (0, _commonUtil.pxToRem)(style),
|
|
376
|
+
type: "text",
|
|
377
|
+
value: value
|
|
378
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
379
|
+
color: (_h = (_g = data.content.box) === null || _g === void 0 ? void 0 : _g.color) === null || _h === void 0 ? void 0 : _h.mobile,
|
|
313
380
|
size: (0, _commonUtil.convertToRem)(24),
|
|
314
|
-
style: {
|
|
315
|
-
display: 'flex'
|
|
316
|
-
},
|
|
317
381
|
type: "icon-search2"
|
|
318
|
-
})), data.content && ((
|
|
382
|
+
})), data.content && ((_k = (_j = data.content.icon) === null || _j === void 0 ? void 0 : _j.cartIcon) === null || _k === void 0 ? void 0 : _k.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
319
383
|
className: "message-wrap"
|
|
320
384
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
321
|
-
color: (
|
|
385
|
+
color: (_m = (_l = data.content.icon) === null || _l === void 0 ? void 0 : _l.color) === null || _m === void 0 ? void 0 : _m.mobile,
|
|
322
386
|
onClick: function onClick() {
|
|
323
387
|
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
324
388
|
},
|
|
@@ -329,10 +393,10 @@ function (_super) {
|
|
|
329
393
|
type: "icon-ShoppingCartSimple1"
|
|
330
394
|
}), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
331
395
|
className: "num"
|
|
332
|
-
}, cartNum)), data.content && ((
|
|
396
|
+
}, cartNum)), data.content && ((_p = (_o = data.content.icon) === null || _o === void 0 ? void 0 : _o.messageIcon) === null || _p === void 0 ? void 0 : _p.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
333
397
|
className: "message-wrap"
|
|
334
398
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
335
|
-
color: (
|
|
399
|
+
color: (_r = (_q = data.content.icon) === null || _q === void 0 ? void 0 : _q.color) === null || _r === void 0 ? void 0 : _r.mobile,
|
|
336
400
|
onClick: function onClick() {
|
|
337
401
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
338
402
|
},
|
|
@@ -343,7 +407,7 @@ function (_super) {
|
|
|
343
407
|
type: "icon-message"
|
|
344
408
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
345
409
|
className: "num"
|
|
346
|
-
}, messageNum))), data.content && ((
|
|
410
|
+
}, messageNum))), data.content && ((_s = data.content.logo) === null || _s === void 0 ? void 0 : _s.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
347
411
|
className: "logo",
|
|
348
412
|
onClick: function onClick() {
|
|
349
413
|
var _a, _b;
|
|
@@ -366,7 +430,8 @@ function (_super) {
|
|
|
366
430
|
};
|
|
367
431
|
|
|
368
432
|
SearchMobile.defaultProps = {
|
|
369
|
-
data: {}
|
|
433
|
+
data: {},
|
|
434
|
+
value: ''
|
|
370
435
|
};
|
|
371
436
|
return SearchMobile;
|
|
372
437
|
}(_react["default"].Component);
|
|
@@ -23,7 +23,17 @@
|
|
|
23
23
|
height: 0.64rem;
|
|
24
24
|
text-align: right;
|
|
25
25
|
display: flex;
|
|
26
|
-
justify-content:
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
}
|
|
28
|
+
.m-search-bar .right .search-input-wrap .search-input {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
border: none;
|
|
31
|
+
height: 100%;
|
|
32
|
+
box-shadow: none;
|
|
33
|
+
font-family: 'Open Sans';
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 0.28rem;
|
|
27
37
|
}
|
|
28
38
|
.m-search-bar .right .message-wrap {
|
|
29
39
|
position: relative;
|
|
@@ -19,6 +19,10 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
21
21
|
|
|
22
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
23
|
+
|
|
24
|
+
var _Text = require("../../../../../meta-comp/components/Text");
|
|
25
|
+
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
27
|
|
|
24
28
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -47,6 +51,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
47
51
|
};
|
|
48
52
|
}();
|
|
49
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
|
+
|
|
50
70
|
var SearchPc =
|
|
51
71
|
/** @class */
|
|
52
72
|
function (_super) {
|
|
@@ -56,17 +76,43 @@ function (_super) {
|
|
|
56
76
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
77
|
|
|
58
78
|
_this.state = {
|
|
59
|
-
|
|
60
|
-
|
|
79
|
+
inputVal: '',
|
|
80
|
+
editing: false
|
|
61
81
|
};
|
|
62
82
|
|
|
63
83
|
_this.onChangeVal = function (val) {
|
|
64
|
-
// console.log('--onChangeVal', val);
|
|
65
84
|
_this.setState({
|
|
66
|
-
inputVal: val
|
|
85
|
+
inputVal: val,
|
|
86
|
+
editing: true
|
|
67
87
|
});
|
|
68
88
|
};
|
|
69
89
|
|
|
90
|
+
_this.onFocus = function () {
|
|
91
|
+
var _a;
|
|
92
|
+
|
|
93
|
+
var inputVal = _this.state.inputVal;
|
|
94
|
+
|
|
95
|
+
if (inputVal === ((_a = _this.props.data.content.keyword) === null || _a === void 0 ? void 0 : _a.placeholder)) {
|
|
96
|
+
_this.setState({
|
|
97
|
+
inputVal: '',
|
|
98
|
+
editing: true
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
_this.onBlur = function () {
|
|
104
|
+
var _a, _b, _c;
|
|
105
|
+
|
|
106
|
+
var inputVal = _this.state.inputVal;
|
|
107
|
+
|
|
108
|
+
if (!inputVal) {
|
|
109
|
+
_this.setState({
|
|
110
|
+
inputVal: (_c = (_b = (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder,
|
|
111
|
+
editing: false
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
70
116
|
_this.searchProduct = function () {
|
|
71
117
|
(0, _coreUtil.clickUrl)("/product/list?q=" + _this.state.inputVal);
|
|
72
118
|
};
|
|
@@ -80,13 +126,35 @@ function (_super) {
|
|
|
80
126
|
return _this;
|
|
81
127
|
}
|
|
82
128
|
|
|
83
|
-
SearchPc.prototype.componentDidMount = function () {
|
|
129
|
+
SearchPc.prototype.componentDidMount = function () {
|
|
130
|
+
var _a, _b, _c;
|
|
131
|
+
|
|
132
|
+
this.setState({
|
|
133
|
+
inputVal: (_c = (_b = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
SearchPc.prototype.componentWillReceiveProps = function (nextProps) {
|
|
138
|
+
var _a, _b, _c;
|
|
139
|
+
|
|
140
|
+
if (!this.state.editing) {
|
|
141
|
+
this.setState({
|
|
142
|
+
inputVal: (_c = (_b = (_a = nextProps.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
};
|
|
84
146
|
|
|
85
147
|
SearchPc.prototype.render = function () {
|
|
86
148
|
var _this = this;
|
|
87
149
|
|
|
150
|
+
var _a, _b, _c;
|
|
151
|
+
|
|
88
152
|
var data = this.props.data;
|
|
89
153
|
var inputVal = this.state.inputVal;
|
|
154
|
+
|
|
155
|
+
var style = __assign({}, (0, _Text.contentStyle)((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content));
|
|
156
|
+
|
|
157
|
+
Reflect.deleteProperty(style, 'width');
|
|
90
158
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
159
|
className: "pc-search-bar"
|
|
92
160
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -94,15 +162,19 @@ function (_super) {
|
|
|
94
162
|
}, data.content && data.content.box.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
163
|
className: "search-input-wrap",
|
|
96
164
|
style: {
|
|
97
|
-
borderColor: data.content.box.color.pc
|
|
165
|
+
borderColor: data.content.box.color.pc,
|
|
166
|
+
backgroundColor: (_c = (_b = data.content.box) === null || _b === void 0 ? void 0 : _b.backgroundColor) === null || _c === void 0 ? void 0 : _c.pc
|
|
98
167
|
}
|
|
99
168
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
100
169
|
className: "search-input",
|
|
170
|
+
onBlur: this.onBlur,
|
|
101
171
|
onChange: function onChange(e) {
|
|
102
172
|
return _this.onChangeVal(e.target.value);
|
|
103
173
|
},
|
|
174
|
+
onFocus: this.onFocus,
|
|
104
175
|
onKeyUp: this.keyUp,
|
|
105
176
|
placeholder: (0, _locale.i18n)('PLEASE_INPUT_KEYWORDS'),
|
|
177
|
+
style: (0, _commonUtil.pxToRem)(style),
|
|
106
178
|
value: inputVal
|
|
107
179
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
180
|
className: "search-icon",
|
|
@@ -13,8 +13,6 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
var _common = require("../../../../../common");
|
|
15
15
|
|
|
16
|
-
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
-
|
|
18
16
|
var _star = _interopRequireDefault(require("../imgs/star.svg"));
|
|
19
17
|
|
|
20
18
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
@@ -241,7 +239,10 @@ function (_super) {
|
|
|
241
239
|
|
|
242
240
|
_this.searchProduct = function () {
|
|
243
241
|
var storeId = window.magicDesign.storeId;
|
|
244
|
-
(0,
|
|
242
|
+
(0, _commonUtil.navigateTo)('/product/list', {
|
|
243
|
+
q: _this.state.inputVal,
|
|
244
|
+
storeId: storeId
|
|
245
|
+
}); // clickUrl(`/product/list?q=${this.state.inputVal}&storeId=${storeId}`);
|
|
245
246
|
};
|
|
246
247
|
|
|
247
248
|
_this.clickCollect = function () {
|
|
@@ -71,7 +71,7 @@ function (_super) {
|
|
|
71
71
|
AComponent.prototype.render = function () {
|
|
72
72
|
var _this = this;
|
|
73
73
|
|
|
74
|
-
var _a, _b;
|
|
74
|
+
var _a, _b, _c;
|
|
75
75
|
|
|
76
76
|
var panelProps = this.props.panelProps;
|
|
77
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -131,26 +131,22 @@ function (_super) {
|
|
|
131
131
|
}, (0, _locale.i18n)('SALES_PROGRESS')), /*#__PURE__*/_react["default"].createElement(_antd.Switch, {
|
|
132
132
|
checked: (_a = panelProps.salesProgress) === null || _a === void 0 ? void 0 : _a.open,
|
|
133
133
|
onChange: function onChange(v) {
|
|
134
|
-
panelProps.salesProgress =
|
|
135
|
-
open: v
|
|
136
|
-
};
|
|
134
|
+
panelProps.salesProgress.open = v;
|
|
137
135
|
|
|
138
136
|
_this.reRender();
|
|
139
137
|
}
|
|
140
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
138
|
+
})), ((_b = panelProps.salesProgress) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
141
139
|
className: "content"
|
|
142
140
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
143
141
|
className: "name"
|
|
144
142
|
}, (0, _locale.i18n)('PROGRESS_BAR_COLOR')), /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
145
143
|
colorType: "rgba",
|
|
146
144
|
onChange: function onChange(v) {
|
|
147
|
-
panelProps.salesProgress =
|
|
148
|
-
color: v
|
|
149
|
-
};
|
|
145
|
+
panelProps.salesProgress.color = v;
|
|
150
146
|
|
|
151
147
|
_this.reRender();
|
|
152
148
|
},
|
|
153
|
-
value: (
|
|
149
|
+
value: (_c = panelProps.salesProgress) === null || _c === void 0 ? void 0 : _c.color
|
|
154
150
|
}))));
|
|
155
151
|
};
|
|
156
152
|
|
package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -19,6 +19,10 @@ var _coreUtil = require("../../../../../utils/coreUtil");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
+
var _InputField = _interopRequireDefault(require("../../../../common/config-panels/InputField"));
|
|
23
|
+
|
|
24
|
+
require("./index.less");
|
|
25
|
+
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
27
|
|
|
24
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); }
|
|
@@ -71,6 +75,8 @@ function (_super) {
|
|
|
71
75
|
SearchBarConfigContent.prototype.render = function () {
|
|
72
76
|
var _this = this;
|
|
73
77
|
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
|
|
74
80
|
var panelProps = this.props.panelProps;
|
|
75
81
|
var source = [{
|
|
76
82
|
key: 'search1',
|
|
@@ -83,10 +89,9 @@ function (_super) {
|
|
|
83
89
|
}, {
|
|
84
90
|
key: 'search2',
|
|
85
91
|
name: (0, _locale.i18n)('SEARCH_BOX'),
|
|
86
|
-
value: /*#__PURE__*/_react["default"].createElement(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
92
|
+
value: /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
className: "search_bar_config_box"
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
90
95
|
title: (0, _locale.i18n)('BOX_COLOR')
|
|
91
96
|
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
92
97
|
colorType: "rgba",
|
|
@@ -102,12 +107,37 @@ function (_super) {
|
|
|
102
107
|
value: (0, _coreUtil.isPc)() ? panelProps.box.color.pc : panelProps.box.color.mobile
|
|
103
108
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
104
109
|
style: {
|
|
105
|
-
marginTop:
|
|
110
|
+
marginTop: 16
|
|
106
111
|
},
|
|
107
112
|
title: (0, _locale.i18n)('BOX_BACKGROUND')
|
|
108
|
-
}
|
|
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
|
+
}))),
|
|
109
126
|
metaOption: panelProps.box,
|
|
110
127
|
toggleType: 'switch'
|
|
128
|
+
}, {
|
|
129
|
+
key: panelProps.keyword.id,
|
|
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
|
|
111
141
|
}, {
|
|
112
142
|
key: panelProps.icon.id,
|
|
113
143
|
name: (0, _locale.i18n)('ICON'),
|