@fonixtree/magic-design 2.0.98 → 2.0.100
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/magic-box-iconfont.css +23 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/common/PopUpModal/index.js +349 -0
- package/es/common/PopUpModal/index.less +79 -0
- package/es/common/PopUpModal1/index.js +164 -0
- package/es/common/PopUpModal1/style.less +56 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/es/common/ProductFilterModal/index.js +366 -0
- package/es/common/ProductFilterModal/index.less +72 -0
- package/es/common/Tag/index.js +46 -0
- package/es/common/Tag/index.less +16 -0
- package/es/common/index.js +16 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.js +1 -1
- package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/es/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/es/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/es/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/es/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
- package/es/constants/component-types.js +14 -2
- package/es/constants/index.js +34 -3
- package/es/locale/en/en.json +10 -0
- package/es/locale/es/es.json +10 -0
- package/es/locale/id/id.json +10 -0
- package/lib/assets/fonts/magic-box-iconfont.css +23 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/common/PopUpModal/index.js +349 -0
- package/lib/common/PopUpModal/index.less +79 -0
- package/lib/common/PopUpModal1/index.js +164 -0
- package/lib/common/PopUpModal1/style.less +56 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/lib/common/ProductFilterModal/index.js +366 -0
- package/lib/common/ProductFilterModal/index.less +72 -0
- package/lib/common/Tag/index.js +46 -0
- package/lib/common/Tag/index.less +16 -0
- package/lib/common/index.js +16 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +1 -1
- package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/lib/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/lib/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/lib/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/lib/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
- package/lib/constants/component-types.js +14 -2
- package/lib/constants/index.js +34 -3
- package/lib/locale/en/en.json +10 -0
- package/lib/locale/es/es.json +10 -0
- package/lib/locale/id/id.json +10 -0
- package/package.json +1 -1
- 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/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/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/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
|
@@ -0,0 +1,366 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _locale = require("../../locale");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _Tag = _interopRequireDefault(require("../Tag"));
|
|
19
|
+
|
|
20
|
+
var _PopUpModal = _interopRequireDefault(require("../PopUpModal"));
|
|
21
|
+
|
|
22
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
23
|
+
|
|
24
|
+
var _FilterSearchModal = _interopRequireDefault(require("./components/FilterSearchModal"));
|
|
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 __assign = void 0 && (void 0).__assign || function () {
|
|
33
|
+
__assign = Object.assign || function (t) {
|
|
34
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
35
|
+
s = arguments[i];
|
|
36
|
+
|
|
37
|
+
for (var p in s) {
|
|
38
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return __assign.apply(this, arguments);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
49
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
50
|
+
s += arguments[i].length;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
54
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
55
|
+
r[k] = a[j];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return r;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
function ProductFilterModal(props) {
|
|
63
|
+
var _a;
|
|
64
|
+
|
|
65
|
+
var visible = props.visible,
|
|
66
|
+
filterObj = props.filterObj,
|
|
67
|
+
onClose = props.onClose,
|
|
68
|
+
onChange = props.onChange,
|
|
69
|
+
_b = props.value,
|
|
70
|
+
value = _b === void 0 ? {} : _b;
|
|
71
|
+
|
|
72
|
+
var _c = (0, _react.useState)({}),
|
|
73
|
+
condValue = _c[0],
|
|
74
|
+
setCondValue = _c[1];
|
|
75
|
+
|
|
76
|
+
var _d = (0, _react.useState)(''),
|
|
77
|
+
detailKey = _d[0],
|
|
78
|
+
setDetailKey = _d[1];
|
|
79
|
+
|
|
80
|
+
var _e = (0, _react.useState)(false),
|
|
81
|
+
searchVisible = _e[0],
|
|
82
|
+
setSearchVisible = _e[1];
|
|
83
|
+
|
|
84
|
+
var serviceIds = condValue.serviceIds,
|
|
85
|
+
brandIds = condValue.brandIds,
|
|
86
|
+
catgIds = condValue.catgIds,
|
|
87
|
+
startPrice = condValue.startPrice,
|
|
88
|
+
endPrice = condValue.endPrice,
|
|
89
|
+
evaluationAvgs = condValue.evaluationAvgs,
|
|
90
|
+
offerAttrValues = condValue.offerAttrValues;
|
|
91
|
+
(0, _react.useEffect)(function () {
|
|
92
|
+
setCondValue(value);
|
|
93
|
+
}, [value]);
|
|
94
|
+
var keyInfo = {
|
|
95
|
+
serviceIds: {
|
|
96
|
+
title: (0, _locale.i18n)('SERVICE'),
|
|
97
|
+
callbackKey: 'serviceList',
|
|
98
|
+
idKey: 'serviceId',
|
|
99
|
+
showKey: 'serviceName',
|
|
100
|
+
selectedList: (serviceIds === null || serviceIds === void 0 ? void 0 : serviceIds.split(',')) || [],
|
|
101
|
+
multi: true
|
|
102
|
+
},
|
|
103
|
+
catgIds: {
|
|
104
|
+
title: (0, _locale.i18n)('CATEGORY'),
|
|
105
|
+
callbackKey: 'catgList',
|
|
106
|
+
idKey: 'catgId',
|
|
107
|
+
showKey: 'catgName',
|
|
108
|
+
selectedList: (catgIds === null || catgIds === void 0 ? void 0 : catgIds.split(',')) || [],
|
|
109
|
+
multi: false
|
|
110
|
+
},
|
|
111
|
+
brandIds: {
|
|
112
|
+
title: (0, _locale.i18n)('BRANDS'),
|
|
113
|
+
callbackKey: 'brandList',
|
|
114
|
+
idKey: 'brandId',
|
|
115
|
+
showKey: 'brandName',
|
|
116
|
+
selectedList: (brandIds === null || brandIds === void 0 ? void 0 : brandIds.split(',')) || [],
|
|
117
|
+
multi: true
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var tagSelect = function tagSelect(key, tagValue, selected, multi) {
|
|
122
|
+
var _a;
|
|
123
|
+
|
|
124
|
+
if (!multi) {
|
|
125
|
+
// 单选
|
|
126
|
+
if (selected) {
|
|
127
|
+
condValue[key] = String(tagValue);
|
|
128
|
+
} else {
|
|
129
|
+
condValue[key] = '';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
setCondValue(__assign({}, condValue));
|
|
133
|
+
} else {
|
|
134
|
+
// 多选
|
|
135
|
+
var temp = ((_a = condValue[key]) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
|
|
136
|
+
|
|
137
|
+
if (selected) {
|
|
138
|
+
temp.push(tagValue);
|
|
139
|
+
} else {
|
|
140
|
+
temp = temp.filter(function (val) {
|
|
141
|
+
return val !== String(tagValue);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
condValue[key] = temp.join(',');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
setCondValue(__assign({}, condValue));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
var isAttrValueActive = function isAttrValueActive(attrId, attrValue) {
|
|
152
|
+
var _a;
|
|
153
|
+
|
|
154
|
+
var find = offerAttrValues === null || offerAttrValues === void 0 ? void 0 : offerAttrValues.find(function (attr) {
|
|
155
|
+
return attr.attrId === attrId;
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
if (find && ((_a = find.attrValue) === null || _a === void 0 ? void 0 : _a.includes(attrValue))) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return false;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var onAttrChange = function onAttrChange(attrId, item, selected) {
|
|
166
|
+
var newOfferAttrValues = offerAttrValues ? __spreadArrays(offerAttrValues) : [];
|
|
167
|
+
|
|
168
|
+
if (selected) {
|
|
169
|
+
var find = newOfferAttrValues === null || newOfferAttrValues === void 0 ? void 0 : newOfferAttrValues.find(function (attr) {
|
|
170
|
+
return attr.attrId === attrId;
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
if (find) {
|
|
174
|
+
var split = find.attrValue.split(',');
|
|
175
|
+
split.push(item);
|
|
176
|
+
find.attrValue = split.join(',');
|
|
177
|
+
} else {
|
|
178
|
+
newOfferAttrValues.push({
|
|
179
|
+
attrId: attrId,
|
|
180
|
+
attrValue: item
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
} else {
|
|
184
|
+
var find = newOfferAttrValues === null || newOfferAttrValues === void 0 ? void 0 : newOfferAttrValues.find(function (attr) {
|
|
185
|
+
return attr.attrId === attrId;
|
|
186
|
+
});
|
|
187
|
+
find.attrValue = find.attrValue.split(',').filter(function (val) {
|
|
188
|
+
return val !== item;
|
|
189
|
+
}).join(',');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setCondValue(__assign(__assign({}, condValue), {
|
|
193
|
+
offerAttrValues: newOfferAttrValues
|
|
194
|
+
}));
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var onApply = function onApply() {
|
|
198
|
+
var _a;
|
|
199
|
+
|
|
200
|
+
var params = __assign({}, condValue);
|
|
201
|
+
|
|
202
|
+
var filterAttr = (_a = condValue.offerAttrValues) === null || _a === void 0 ? void 0 : _a.filter(function (attr) {
|
|
203
|
+
return !!attr.attrValue;
|
|
204
|
+
});
|
|
205
|
+
params.offerAttrValues = (filterAttr === null || filterAttr === void 0 ? void 0 : filterAttr.length) ? filterAttr : null;
|
|
206
|
+
Object.keys(params).forEach(function (key) {
|
|
207
|
+
if (!params[key]) {
|
|
208
|
+
Reflect.deleteProperty(params, key);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
onChange(params);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var onReset = function onReset() {
|
|
215
|
+
onChange({});
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
var onShowMore = function onShowMore(key) {
|
|
219
|
+
setDetailKey(key);
|
|
220
|
+
setSearchVisible(true);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var onFilterSearchOk = function onFilterSearchOk(val) {
|
|
224
|
+
var _a;
|
|
225
|
+
|
|
226
|
+
var newParams = __assign(__assign({}, condValue), (_a = {}, _a[detailKey] = val, _a));
|
|
227
|
+
|
|
228
|
+
setCondValue(newParams);
|
|
229
|
+
setSearchVisible(false);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
return /*#__PURE__*/_react["default"].createElement(_PopUpModal["default"], {
|
|
233
|
+
bodyStyle: {
|
|
234
|
+
height: '80vh'
|
|
235
|
+
},
|
|
236
|
+
hideCloseBtn: true,
|
|
237
|
+
onClose: onClose,
|
|
238
|
+
visible: visible
|
|
239
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
240
|
+
className: "productFilterWrap"
|
|
241
|
+
}, ['serviceIds', 'catgIds', 'brandIds'].map(function (key) {
|
|
242
|
+
var _a;
|
|
243
|
+
|
|
244
|
+
var _b = keyInfo[key],
|
|
245
|
+
title = _b.title,
|
|
246
|
+
idKey = _b.idKey,
|
|
247
|
+
showKey = _b.showKey,
|
|
248
|
+
selectedList = _b.selectedList,
|
|
249
|
+
multi = _b.multi;
|
|
250
|
+
return filterObj[key] && ((_a = filterObj[key]) === null || _a === void 0 ? void 0 : _a.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
|
+
className: "item"
|
|
252
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
253
|
+
className: "title"
|
|
254
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
255
|
+
className: "accordionContentWrap"
|
|
256
|
+
}, filterObj[key].slice(0, 10).map(function (item) {
|
|
257
|
+
return /*#__PURE__*/_react["default"].createElement(_Tag["default"], {
|
|
258
|
+
active: selectedList.indexOf(String(item[idKey])) > -1,
|
|
259
|
+
name: item[showKey],
|
|
260
|
+
onChange: function onChange(selected) {
|
|
261
|
+
tagSelect(key, item[idKey], selected, multi);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}), filterObj[key].length > 10 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
265
|
+
className: "btnMore",
|
|
266
|
+
onClick: function onClick() {
|
|
267
|
+
onShowMore(key);
|
|
268
|
+
}
|
|
269
|
+
}, "Show More")));
|
|
270
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
271
|
+
className: "item"
|
|
272
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
273
|
+
className: "title"
|
|
274
|
+
}, (0, _locale.i18n)('PRICE')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
275
|
+
className: "inputWrap"
|
|
276
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
277
|
+
onChange: function onChange(e) {
|
|
278
|
+
return setCondValue(__assign(__assign({}, condValue), {
|
|
279
|
+
startPrice: e.target.value
|
|
280
|
+
}));
|
|
281
|
+
},
|
|
282
|
+
placeholder: "Min",
|
|
283
|
+
type: "number",
|
|
284
|
+
value: startPrice || ''
|
|
285
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
286
|
+
className: "divider"
|
|
287
|
+
}), /*#__PURE__*/_react["default"].createElement("input", {
|
|
288
|
+
onChange: function onChange(e) {
|
|
289
|
+
return setCondValue(__assign(__assign({}, condValue), {
|
|
290
|
+
endPrice: e.target.value
|
|
291
|
+
}));
|
|
292
|
+
},
|
|
293
|
+
placeholder: "Max",
|
|
294
|
+
type: "number",
|
|
295
|
+
value: endPrice || ''
|
|
296
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
297
|
+
className: "item"
|
|
298
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
299
|
+
className: "title"
|
|
300
|
+
}, (0, _locale.i18n)('RATINGS')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
301
|
+
className: "accordionContentWrap"
|
|
302
|
+
}, ['1', '2', '3', '4', '5'].map(function (item) {
|
|
303
|
+
return /*#__PURE__*/_react["default"].createElement(_Tag["default"], {
|
|
304
|
+
active: evaluationAvgs === item,
|
|
305
|
+
name: item + " " + (0, _locale.i18n)('STAR'),
|
|
306
|
+
onChange: function onChange(selected) {
|
|
307
|
+
setCondValue(__assign(__assign({}, condValue), {
|
|
308
|
+
evaluationAvgs: selected ? item : ''
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}))), filterObj.offerAttrValues && ((_a = filterObj.offerAttrValues) === null || _a === void 0 ? void 0 : _a.length) > 0 && filterObj.offerAttrValues.map(function (attr) {
|
|
313
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
314
|
+
className: "item",
|
|
315
|
+
header: attr.attrName
|
|
316
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
317
|
+
className: "title"
|
|
318
|
+
}, attr.attrName), /*#__PURE__*/_react["default"].createElement("div", {
|
|
319
|
+
className: "accordionContentWrap"
|
|
320
|
+
}, attr.attrValues && attr.attrValues.split(',').map(function (item) {
|
|
321
|
+
return /*#__PURE__*/_react["default"].createElement(_Tag["default"], {
|
|
322
|
+
active: isAttrValueActive(attr.attrId, item),
|
|
323
|
+
name: item,
|
|
324
|
+
onChange: function onChange(selected) {
|
|
325
|
+
onAttrChange(attr.attrId, item, selected);
|
|
326
|
+
}
|
|
327
|
+
}, item);
|
|
328
|
+
})));
|
|
329
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
330
|
+
className: "bottomWrap"
|
|
331
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
332
|
+
onClick: onReset,
|
|
333
|
+
plain: true
|
|
334
|
+
}, (0, _locale.i18n)('RESET')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
335
|
+
onClick: onApply,
|
|
336
|
+
style: {
|
|
337
|
+
marginLeft: '20px'
|
|
338
|
+
}
|
|
339
|
+
}, (0, _locale.i18n)('APPLY'))), /*#__PURE__*/_react["default"].createElement(_FilterSearchModal["default"], {
|
|
340
|
+
filterInfo: keyInfo[detailKey],
|
|
341
|
+
onClose: function onClose() {
|
|
342
|
+
return setSearchVisible(false);
|
|
343
|
+
},
|
|
344
|
+
onOk: onFilterSearchOk,
|
|
345
|
+
source: filterObj[detailKey],
|
|
346
|
+
value: condValue[detailKey],
|
|
347
|
+
visible: searchVisible
|
|
348
|
+
}));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
ProductFilterModal.propTypes = {
|
|
352
|
+
visible: _propTypes["default"].bool,
|
|
353
|
+
filterObj: _propTypes["default"].object,
|
|
354
|
+
onClose: _propTypes["default"].func,
|
|
355
|
+
onChange: _propTypes["default"].func,
|
|
356
|
+
value: _propTypes["default"].object
|
|
357
|
+
};
|
|
358
|
+
ProductFilterModal.defaultProps = {
|
|
359
|
+
visible: false,
|
|
360
|
+
filterObj: {},
|
|
361
|
+
onClose: function onClose() {},
|
|
362
|
+
onChange: function onChange() {},
|
|
363
|
+
value: {}
|
|
364
|
+
};
|
|
365
|
+
var _default = ProductFilterModal;
|
|
366
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.productFilterWrap {
|
|
2
|
+
background: #ffffff;
|
|
3
|
+
height: calc(80vh - 40px);
|
|
4
|
+
overflow-y: scroll;
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
padding: 0 20px 78px 20px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
|
|
9
|
+
.item {
|
|
10
|
+
margin-top: 20px;
|
|
11
|
+
|
|
12
|
+
.inputWrap {
|
|
13
|
+
margin-top: 10px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
|
|
18
|
+
.divider {
|
|
19
|
+
padding: 0 10px;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
height: 2px;
|
|
22
|
+
width: 11px;
|
|
23
|
+
background-color: #000;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
input {
|
|
27
|
+
width: 45%;
|
|
28
|
+
height: 48px;
|
|
29
|
+
border: 1px solid #E4E4E4;
|
|
30
|
+
box-shadow: none;
|
|
31
|
+
padding: 12px;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
line-height: 24px;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
color: #000;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.accordionContentWrap {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-wrap: wrap;
|
|
50
|
+
align-items: center;
|
|
51
|
+
padding-bottom: 1px;
|
|
52
|
+
|
|
53
|
+
.btnMore {
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
color: var(--theme-color);
|
|
57
|
+
margin-top: 6px;
|
|
58
|
+
margin-left: 10px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.bottomWrap {
|
|
65
|
+
position: fixed;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
background: #fff;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 78px;
|
|
70
|
+
padding: 12px 24px;
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
require("./index.less");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function Tag(props) {
|
|
19
|
+
var name = props.name,
|
|
20
|
+
onChange = props.onChange,
|
|
21
|
+
active = props.active;
|
|
22
|
+
|
|
23
|
+
var onClick = function onClick() {
|
|
24
|
+
onChange(!active);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
28
|
+
className: (0, _classnames["default"])('m-tagWrap', {
|
|
29
|
+
active: active
|
|
30
|
+
}),
|
|
31
|
+
onClick: onClick
|
|
32
|
+
}, name);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
Tag.propTypes = {
|
|
36
|
+
name: _propTypes["default"].string,
|
|
37
|
+
active: _propTypes["default"].bool,
|
|
38
|
+
onChange: _propTypes["default"].func
|
|
39
|
+
};
|
|
40
|
+
Tag.defaultProps = {
|
|
41
|
+
name: 'tag',
|
|
42
|
+
active: false,
|
|
43
|
+
onChange: function onChange() {}
|
|
44
|
+
};
|
|
45
|
+
var _default = Tag;
|
|
46
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.m-tagWrap {
|
|
2
|
+
padding: 6px 12px;
|
|
3
|
+
border: 1px solid #E4E4E4;
|
|
4
|
+
color: #545454;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
line-height: 24px;
|
|
9
|
+
margin-right: 15px;
|
|
10
|
+
margin-top: 8px;
|
|
11
|
+
|
|
12
|
+
&.active {
|
|
13
|
+
color: var(--theme-color);
|
|
14
|
+
border-color: var(--theme-color);
|
|
15
|
+
}
|
|
16
|
+
}
|
package/lib/common/index.js
CHANGED
|
@@ -105,6 +105,18 @@ Object.defineProperty(exports, "NewImg", {
|
|
|
105
105
|
return _NewImg["default"];
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "PopUpModal", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function get() {
|
|
111
|
+
return _PopUpModal["default"];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "ProductFilterModal", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _ProductFilterModal["default"];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
108
120
|
Object.defineProperty(exports, "ProductSource", {
|
|
109
121
|
enumerable: true,
|
|
110
122
|
get: function get() {
|
|
@@ -208,8 +220,12 @@ var _CardCarousel = _interopRequireDefault(require("./CardCarousel"));
|
|
|
208
220
|
|
|
209
221
|
var _MyModal = _interopRequireDefault(require("./MyModal"));
|
|
210
222
|
|
|
223
|
+
var _PopUpModal = _interopRequireDefault(require("./PopUpModal"));
|
|
224
|
+
|
|
211
225
|
var _CropperModal = _interopRequireDefault(require("./CropperModal"));
|
|
212
226
|
|
|
213
227
|
var _NewImg = _interopRequireDefault(require("./NewImg"));
|
|
214
228
|
|
|
229
|
+
var _ProductFilterModal = _interopRequireDefault(require("./ProductFilterModal"));
|
|
230
|
+
|
|
215
231
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -250,7 +250,7 @@ function (_super) {
|
|
|
250
250
|
className: "sold"
|
|
251
251
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
252
252
|
data: __assign(__assign({}, panelProps.sold), {
|
|
253
|
-
text: "Sold " + soldNumber + "+"
|
|
253
|
+
text: "Sold " + (soldNumber || 0) + "+"
|
|
254
254
|
}),
|
|
255
255
|
readonly: true
|
|
256
256
|
}))), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var _headerImage = _interopRequireDefault(require("./mobile/img/headerImage.jpg"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
15
|
+
var contentId = (0, _uuid.v4)();
|
|
16
|
+
return {
|
|
17
|
+
id: (0, _uuid.v4)(),
|
|
18
|
+
type: 'BUNDLE',
|
|
19
|
+
title: {
|
|
20
|
+
headerImage: {
|
|
21
|
+
id: contentId,
|
|
22
|
+
open: true,
|
|
23
|
+
type: 'IMAGE',
|
|
24
|
+
content: {
|
|
25
|
+
h5Name: '',
|
|
26
|
+
pcName: '',
|
|
27
|
+
h5ImgSrc: _headerImage["default"],
|
|
28
|
+
pcImgSrc: '',
|
|
29
|
+
clickUrl: ''
|
|
30
|
+
},
|
|
31
|
+
hover: {
|
|
32
|
+
open: false,
|
|
33
|
+
backgroundType: 'enlarge',
|
|
34
|
+
magnification: 1.5,
|
|
35
|
+
pcImgHoverUrl: '',
|
|
36
|
+
h5ImgHoverUrl: ''
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
content: {
|
|
41
|
+
id: contentId,
|
|
42
|
+
sourceType: '1',
|
|
43
|
+
maxProdNum: 1
|
|
44
|
+
},
|
|
45
|
+
spacing: {
|
|
46
|
+
pc: {
|
|
47
|
+
paddingTop: 0,
|
|
48
|
+
paddingBottom: 0,
|
|
49
|
+
paddingLeft: 0,
|
|
50
|
+
paddingRight: 0,
|
|
51
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
52
|
+
},
|
|
53
|
+
mobile: {
|
|
54
|
+
paddingTop: 0,
|
|
55
|
+
paddingBottom: 0,
|
|
56
|
+
paddingLeft: 0,
|
|
57
|
+
paddingRight: 0,
|
|
58
|
+
marginBottom: window.magicDesign.compSpacing
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
customize: {
|
|
62
|
+
layout: 'layout1',
|
|
63
|
+
align: 'left',
|
|
64
|
+
pcRowNum: 6,
|
|
65
|
+
pcMaxRowNum: 6,
|
|
66
|
+
pcMinRowNum: 5
|
|
67
|
+
},
|
|
68
|
+
background: {
|
|
69
|
+
opacity: 100,
|
|
70
|
+
color: '#fff',
|
|
71
|
+
image: '',
|
|
72
|
+
bgType: 'color'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.getDefaultJSON = getDefaultJSON;
|