@fonixtree/magic-design 2.0.125 → 2.0.126
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/Inter-Bold.ttf +0 -0
- package/es/assets/fonts/Inter-Regular.ttf +0 -0
- package/es/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/es/assets/less/font.less +22 -1
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
- package/es/composite-comp/common/components/MonpayProductItem/index.js +8 -34
- package/es/composite-comp/common/components/MonpayProductItem/index.less +16 -12
- package/es/composite-comp/common/components/ProductItem/index.js +2 -2
- package/es/composite-comp/common/config-panels/InputField/index.js +4 -6
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +3 -1
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +1 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +5 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +38 -25
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +4 -1
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +27 -14
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +3 -1
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +20 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +0 -1
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +2 -2
- package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +6 -6
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -3
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +22 -24
- package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +2 -7
- package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +1 -1
- package/es/constants/index.js +1 -1
- package/es/core/Renderer/index.js +2 -1
- package/es/locale/en/en.json +2 -0
- package/es/locale/es/es.json +2 -0
- package/es/locale/id/id.json +2 -0
- package/es/locale/index.js +2 -1
- package/es/meta-comp/config-panels/ButtonConfig/index.js +3 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +7 -2
- package/es/meta-comp/config-panels/TextConfig/index.less +2 -0
- package/es/utils/currencyUtil.js +9 -1
- package/lib/assets/fonts/Inter-Bold.ttf +0 -0
- package/lib/assets/fonts/Inter-Regular.ttf +0 -0
- package/lib/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/assets/less/font.less +22 -1
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +8 -34
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +16 -12
- package/lib/composite-comp/common/components/ProductItem/index.js +2 -2
- package/lib/composite-comp/common/config-panels/InputField/index.js +4 -6
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +3 -1
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +1 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +5 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +38 -25
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +4 -1
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +27 -14
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +3 -1
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +20 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +0 -1
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +2 -2
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +6 -6
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -3
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +22 -24
- package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +2 -7
- package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +1 -1
- package/lib/constants/index.js +1 -1
- package/lib/core/Renderer/index.js +2 -1
- package/lib/locale/en/en.json +2 -0
- package/lib/locale/es/es.json +2 -0
- package/lib/locale/id/id.json +2 -0
- package/lib/locale/index.js +2 -1
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +3 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +7 -2
- package/lib/meta-comp/config-panels/TextConfig/index.less +2 -0
- package/lib/utils/currencyUtil.js +9 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/es/assets/less/font.less
CHANGED
|
@@ -47,6 +47,28 @@
|
|
|
47
47
|
font-style: normal;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
@font-face {
|
|
51
|
+
font-family: 'Inter';
|
|
52
|
+
src: url(../fonts/Inter-Bold.ttf);
|
|
53
|
+
font-weight: 700;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'Inter';
|
|
59
|
+
src: url(../fonts/Inter-SemiBold.ttf);
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@font-face {
|
|
65
|
+
font-family: 'Inter';
|
|
66
|
+
src: url('../fonts/Inter-Regular.ttf');
|
|
67
|
+
font-weight: 400;
|
|
68
|
+
font-style: normal;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
50
72
|
@font-face {
|
|
51
73
|
font-family: 'Trueno';
|
|
52
74
|
src: url('../fonts/Trueno-Light.otf');
|
|
@@ -66,5 +88,4 @@
|
|
|
66
88
|
src: url(../fonts/TruenoBd.otf);
|
|
67
89
|
font-weight: 600;
|
|
68
90
|
font-style: normal;
|
|
69
|
-
font-display: swap;
|
|
70
91
|
}
|
|
@@ -231,7 +231,7 @@ function (_super) {
|
|
|
231
231
|
case 0:
|
|
232
232
|
return [4
|
|
233
233
|
/*yield*/
|
|
234
|
-
, (0, _commonUtil.commonFetch)('/designer/v1
|
|
234
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/nuri/distribute/commission')];
|
|
235
235
|
|
|
236
236
|
case 1:
|
|
237
237
|
infoObj = _a.sent();
|
|
@@ -268,8 +268,12 @@ function (_super) {
|
|
|
268
268
|
};
|
|
269
269
|
|
|
270
270
|
_this.clickJump = function (title) {
|
|
271
|
-
if (title
|
|
272
|
-
(0, _coreUtil.clickUrl)('/
|
|
271
|
+
if (title === 'Saldo') {
|
|
272
|
+
(0, _coreUtil.clickUrl)('/social-commerce/my-earnings');
|
|
273
|
+
} else if (title === 'Koin') {
|
|
274
|
+
(0, _coreUtil.clickUrl)('/my-points');
|
|
275
|
+
} else if (title === 'Voucher') {
|
|
276
|
+
(0, _coreUtil.clickUrl)('/my-coupon');
|
|
273
277
|
}
|
|
274
278
|
};
|
|
275
279
|
|
|
@@ -291,7 +295,7 @@ function (_super) {
|
|
|
291
295
|
}
|
|
292
296
|
|
|
293
297
|
WalletNuriMobile.prototype.componentDidMount = function () {
|
|
294
|
-
if (localStorage.getItem('isLogin') === 'Y') {
|
|
298
|
+
if (localStorage.getItem('isLogin') === 'Y' && !(0, _coreUtil.isDesignMode)()) {
|
|
295
299
|
this.getInfo();
|
|
296
300
|
}
|
|
297
301
|
};
|
|
@@ -92,7 +92,7 @@ var renderDiscount = function renderDiscount(data) {
|
|
|
92
92
|
var text = '';
|
|
93
93
|
|
|
94
94
|
if (AMT) {
|
|
95
|
-
text = (0, _currencyUtil.
|
|
95
|
+
text = (0, _currencyUtil.formatCurrency)(data.discountAmount);
|
|
96
96
|
} else if (DISC) {
|
|
97
97
|
var temp = (0, _currencyUtil.formatCurrency)(data.discountAmount, 2); // 折扣券处理:100 => 1%
|
|
98
98
|
|
|
@@ -125,43 +125,19 @@ function (_super) {
|
|
|
125
125
|
onItemClick = _m.onItemClick,
|
|
126
126
|
showProName = _m.showProName,
|
|
127
127
|
showProgress = _m.showProgress,
|
|
128
|
+
intelligentType = _m.intelligentType,
|
|
128
129
|
fixHeight = _m.fixHeight,
|
|
129
130
|
layout = _m.layout,
|
|
130
131
|
imgHeight = _m.imgHeight,
|
|
131
132
|
imgWidth = _m.imgWidth,
|
|
132
133
|
unknownPrice = _m.unknownPrice,
|
|
133
|
-
rest = __rest(_m, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
|
|
134
|
+
rest = __rest(_m, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
|
|
134
135
|
|
|
135
136
|
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
136
137
|
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
137
|
-
|
|
138
|
+
price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
139
|
+
var oldPrice = data.specialPrice !== null && data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null; // const discount = Number(data.discountPercent) || 0;
|
|
138
140
|
|
|
139
|
-
if (data.sppType && promotions.length) {
|
|
140
|
-
price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
var integerPart = price;
|
|
144
|
-
var decimalPart = null;
|
|
145
|
-
|
|
146
|
-
if (unknownPrice) {
|
|
147
|
-
if (price.length > 5) {
|
|
148
|
-
integerPart = price.slice(0, -5).replace(/\d/g, '? ') + price.slice(-5);
|
|
149
|
-
} else {
|
|
150
|
-
integerPart = price.replace(/\d/, '? ');
|
|
151
|
-
}
|
|
152
|
-
} else if (Array.isArray(price)) {
|
|
153
|
-
integerPart = price[0];
|
|
154
|
-
decimalPart = price[1];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
158
|
-
return window.systemParams.prefix;
|
|
159
|
-
}, 'Rp');
|
|
160
|
-
|
|
161
|
-
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
162
|
-
|
|
163
|
-
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
164
|
-
var discount = Number(data.discountPercent) || 0;
|
|
165
141
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
166
142
|
var imgStyle = {};
|
|
167
143
|
if (imgWidth) imgStyle.width = imgWidth;
|
|
@@ -229,7 +205,7 @@ function (_super) {
|
|
|
229
205
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
230
206
|
className: "price",
|
|
231
207
|
data: __assign(__assign({}, panelProps.activityPrice), {
|
|
232
|
-
text:
|
|
208
|
+
text: price
|
|
233
209
|
}),
|
|
234
210
|
readonly: true
|
|
235
211
|
}), priceLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
@@ -239,9 +215,7 @@ function (_super) {
|
|
|
239
215
|
className: "price-sold-wrap"
|
|
240
216
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
217
|
className: "old-price-wrap"
|
|
242
|
-
},
|
|
243
|
-
className: "discount"
|
|
244
|
-
}, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
218
|
+
}, oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
245
219
|
className: "old-price",
|
|
246
220
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
247
221
|
text: oldPrice
|
|
@@ -273,7 +247,7 @@ function (_super) {
|
|
|
273
247
|
text: "Sold " + soldNumber
|
|
274
248
|
}),
|
|
275
249
|
readonly: true
|
|
276
|
-
}))), data.coupons && data.coupons.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
250
|
+
}))), intelligentType === 'Coupon' && data.coupons && data.coupons.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
277
251
|
className: "coupons-list"
|
|
278
252
|
}, data.coupons.map(function (m) {
|
|
279
253
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
background: #FFFFFF;
|
|
5
|
-
border: 1px solid #D2D9E5;
|
|
6
5
|
width: 142px;
|
|
7
6
|
cursor: pointer;
|
|
8
7
|
position: relative;
|
|
9
|
-
margin-right:
|
|
8
|
+
margin-right: 16px;
|
|
10
9
|
|
|
11
10
|
.img-wrap {
|
|
12
11
|
position: relative;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
overflow: hidden;
|
|
13
14
|
|
|
14
15
|
.product-img {
|
|
15
16
|
width: 140px;
|
|
@@ -31,7 +32,6 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.content-wrap {
|
|
34
|
-
padding: 12px;
|
|
35
35
|
|
|
36
36
|
.promotions-wrap {
|
|
37
37
|
display: flex;
|
|
@@ -64,14 +64,13 @@
|
|
|
64
64
|
line-height: 18px;
|
|
65
65
|
max-height: 40px;
|
|
66
66
|
white-space: wrap;
|
|
67
|
+
margin-top: 8px;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
.price-wrap {
|
|
70
71
|
display: flex;
|
|
71
72
|
align-items: center;
|
|
72
73
|
flex-wrap: wrap;
|
|
73
|
-
margin-top: 6px;
|
|
74
|
-
margin-bottom: 4px;
|
|
75
74
|
|
|
76
75
|
.price {
|
|
77
76
|
width: auto !important;
|
|
@@ -84,7 +83,6 @@
|
|
|
84
83
|
|
|
85
84
|
.price-sold-wrap {
|
|
86
85
|
display: flex;
|
|
87
|
-
margin-top: 0;
|
|
88
86
|
align-items: center;
|
|
89
87
|
white-space: nowrap;
|
|
90
88
|
overflow: hidden;
|
|
@@ -106,12 +104,12 @@
|
|
|
106
104
|
color: #fff;
|
|
107
105
|
padding: 0 4px;
|
|
108
106
|
background-color: #CE1126;
|
|
107
|
+
margin-right: 4px;
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
.old-price {
|
|
112
111
|
text-decoration: line-through;
|
|
113
112
|
width: fit-content;
|
|
114
|
-
margin-left: 4px;
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
115
|
|
|
@@ -191,7 +189,7 @@
|
|
|
191
189
|
}
|
|
192
190
|
|
|
193
191
|
.progress-wrap {
|
|
194
|
-
margin-top:
|
|
192
|
+
margin-top: 8px;
|
|
195
193
|
|
|
196
194
|
.text {
|
|
197
195
|
font-family: 'Montserrat';
|
|
@@ -232,11 +230,17 @@
|
|
|
232
230
|
|
|
233
231
|
&.horizontal {
|
|
234
232
|
flex-direction: row;
|
|
233
|
+
border: 1px solid #D2D9E5;
|
|
234
|
+
border-radius: 8px;
|
|
235
235
|
|
|
236
|
-
.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
.img-wrap {
|
|
237
|
+
border-radius: 8px 0 0 8px;
|
|
238
|
+
|
|
239
|
+
.product-img {
|
|
240
|
+
width: 100px;
|
|
241
|
+
height: 100%;
|
|
242
|
+
min-height: 100px;
|
|
243
|
+
}
|
|
240
244
|
}
|
|
241
245
|
|
|
242
246
|
.content-wrap {
|
|
@@ -135,9 +135,9 @@ function (_super) {
|
|
|
135
135
|
|
|
136
136
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
137
137
|
return window.systemParams.prefix;
|
|
138
|
-
}, 'Rp');
|
|
138
|
+
}, 'Rp'); // 蒙古项目货币符号在后面
|
|
139
139
|
|
|
140
|
-
var _price =
|
|
140
|
+
var _price = integerPart + " " + (decimalPart ? '.' + decimalPart : '') + " " + pricePrefix;
|
|
141
141
|
|
|
142
142
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
143
143
|
var discount = Number(data.discountPercent) || 0;
|
|
@@ -92,11 +92,7 @@ function (_super) {
|
|
|
92
92
|
inputLabel = _a.inputLabel;
|
|
93
93
|
var textData = data.content;
|
|
94
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
-
className: "m-text-config"
|
|
96
|
-
style: {
|
|
97
|
-
paddingTop: 12,
|
|
98
|
-
borderRadius: 6
|
|
99
|
-
}
|
|
95
|
+
className: "m-text-config"
|
|
100
96
|
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
101
97
|
title: inputLabel || (0, _locale.i18n)('PLACEHOLDER')
|
|
102
98
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
@@ -143,7 +139,9 @@ function (_super) {
|
|
|
143
139
|
value: "Montserrat"
|
|
144
140
|
}, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
145
141
|
value: "Open Sans"
|
|
146
|
-
}, (0, _locale.i18n)('OPEN_SANS'))
|
|
142
|
+
}, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
143
|
+
value: "Inter"
|
|
144
|
+
}, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
147
145
|
title: (0, _locale.i18n)('FONT_WEIGHT')
|
|
148
146
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
149
147
|
onChange: function onChange(v) {
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
height: 100%;
|
|
5
5
|
display: flex;
|
|
6
6
|
justify-content: center;
|
|
7
|
+
max-height: 65px;
|
|
8
|
+
|
|
7
9
|
// overflow: hidden;
|
|
8
10
|
&>img {
|
|
9
11
|
width: 100%;
|
|
10
|
-
height: 100%;
|
|
12
|
+
// height: 100%;
|
|
11
13
|
// object-fit: contain;
|
|
12
14
|
transition: all .2s linear;
|
|
13
15
|
vertical-align: initial;
|
|
@@ -118,7 +118,7 @@ function (_super) {
|
|
|
118
118
|
className: "card-image",
|
|
119
119
|
data: source.image,
|
|
120
120
|
limitWidthHeight: true,
|
|
121
|
-
maxHeight:
|
|
121
|
+
maxHeight: 120,
|
|
122
122
|
scale: 0.5
|
|
123
123
|
})), source.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
124
124
|
className: "card-text",
|
|
@@ -307,13 +307,13 @@ function (_super) {
|
|
|
307
307
|
};
|
|
308
308
|
|
|
309
309
|
_this.onBlur = function () {
|
|
310
|
-
var _a, _b, _c;
|
|
310
|
+
var _a, _b, _c, _d, _e, _f;
|
|
311
311
|
|
|
312
312
|
var value = _this.state.value;
|
|
313
313
|
|
|
314
|
-
if (!value) {
|
|
314
|
+
if (((_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.open) && !value) {
|
|
315
315
|
_this.setState({
|
|
316
|
-
value: (
|
|
316
|
+
value: (_f = (_e = (_d = _this.props.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder,
|
|
317
317
|
editing: false
|
|
318
318
|
});
|
|
319
319
|
}
|
|
@@ -323,42 +323,54 @@ function (_super) {
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
SearchMobile.prototype.componentDidMount = function () {
|
|
326
|
-
var _a, _b, _c;
|
|
326
|
+
var _a, _b, _c, _d, _e, _f;
|
|
327
327
|
|
|
328
328
|
this.getMessageNum();
|
|
329
329
|
this.getCartNum();
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
|
|
331
|
+
if ((_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.open) {
|
|
332
|
+
this.setState({
|
|
333
|
+
value: (_f = (_e = (_d = this.props.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder
|
|
334
|
+
});
|
|
335
|
+
}
|
|
333
336
|
};
|
|
334
337
|
|
|
335
338
|
SearchMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
336
|
-
var _a, _b, _c;
|
|
339
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
337
340
|
|
|
338
|
-
if (!this.state.editing) {
|
|
341
|
+
if (((_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.open) && !this.state.editing) {
|
|
339
342
|
this.setState({
|
|
340
|
-
value: (
|
|
343
|
+
value: (_f = (_e = (_d = nextProps.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (!((_j = (_h = (_g = nextProps.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.keyword) === null || _j === void 0 ? void 0 : _j.open)) {
|
|
348
|
+
this.setState({
|
|
349
|
+
value: ''
|
|
341
350
|
});
|
|
342
351
|
}
|
|
343
352
|
};
|
|
344
353
|
|
|
345
354
|
SearchMobile.prototype.render = function () {
|
|
346
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
347
356
|
|
|
348
357
|
var data = this.props.data;
|
|
349
|
-
var
|
|
350
|
-
messageNum =
|
|
351
|
-
cartNum =
|
|
352
|
-
value =
|
|
358
|
+
var _v = this.state,
|
|
359
|
+
messageNum = _v.messageNum,
|
|
360
|
+
cartNum = _v.cartNum,
|
|
361
|
+
value = _v.value;
|
|
353
362
|
|
|
354
363
|
var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
|
|
355
364
|
|
|
356
365
|
Reflect.deleteProperty(style, 'width');
|
|
366
|
+
|
|
367
|
+
var _placeholder = ((_b = data.content.placeholder) === null || _b === void 0 ? void 0 : _b.open) ? (_c = data.content.placeholder) === null || _c === void 0 ? void 0 : _c.text : '';
|
|
368
|
+
|
|
357
369
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
358
370
|
className: "m-search-bar"
|
|
359
371
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
360
372
|
className: "right"
|
|
361
|
-
}, data.content && ((
|
|
373
|
+
}, data.content && ((_d = data.content.box) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
362
374
|
className: "search-input-wrap",
|
|
363
375
|
onClick: function onClick() {
|
|
364
376
|
return (0, _coreUtil.clickUrl)('/search-page', {
|
|
@@ -366,8 +378,8 @@ function (_super) {
|
|
|
366
378
|
});
|
|
367
379
|
},
|
|
368
380
|
style: {
|
|
369
|
-
borderColor: (
|
|
370
|
-
backgroundColor: (
|
|
381
|
+
borderColor: (_f = (_e = data.content.box) === null || _e === void 0 ? void 0 : _e.color) === null || _f === void 0 ? void 0 : _f.mobile,
|
|
382
|
+
backgroundColor: (_h = (_g = data.content.box) === null || _g === void 0 ? void 0 : _g.backgroundColor) === null || _h === void 0 ? void 0 : _h.mobile
|
|
371
383
|
}
|
|
372
384
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
373
385
|
className: "search-input",
|
|
@@ -376,15 +388,16 @@ function (_super) {
|
|
|
376
388
|
onFocus: this.onFocus,
|
|
377
389
|
style: (0, _commonUtil.pxToRem)(style),
|
|
378
390
|
type: "text",
|
|
379
|
-
value: value
|
|
391
|
+
value: value,
|
|
392
|
+
placeholder: _placeholder
|
|
380
393
|
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
381
|
-
color: (
|
|
394
|
+
color: (_k = (_j = data.content.box) === null || _j === void 0 ? void 0 : _j.color) === null || _k === void 0 ? void 0 : _k.mobile,
|
|
382
395
|
size: (0, _commonUtil.convertToRem)(24),
|
|
383
396
|
type: "icon-search2"
|
|
384
|
-
})), data.content && ((
|
|
397
|
+
})), data.content && ((_m = (_l = data.content.icon) === null || _l === void 0 ? void 0 : _l.cartIcon) === null || _m === void 0 ? void 0 : _m.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
385
398
|
className: "message-wrap"
|
|
386
399
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
387
|
-
color: (
|
|
400
|
+
color: (_p = (_o = data.content.icon) === null || _o === void 0 ? void 0 : _o.color) === null || _p === void 0 ? void 0 : _p.mobile,
|
|
388
401
|
onClick: function onClick() {
|
|
389
402
|
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
390
403
|
},
|
|
@@ -395,10 +408,10 @@ function (_super) {
|
|
|
395
408
|
type: "icon-ShoppingCartSimple1"
|
|
396
409
|
}), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
397
410
|
className: "num"
|
|
398
|
-
}, cartNum)), data.content && ((
|
|
411
|
+
}, cartNum)), data.content && ((_r = (_q = data.content.icon) === null || _q === void 0 ? void 0 : _q.messageIcon) === null || _r === void 0 ? void 0 : _r.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
399
412
|
className: "message-wrap"
|
|
400
413
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
401
|
-
color: (
|
|
414
|
+
color: (_t = (_s = data.content.icon) === null || _s === void 0 ? void 0 : _s.color) === null || _t === void 0 ? void 0 : _t.mobile,
|
|
402
415
|
onClick: function onClick() {
|
|
403
416
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
404
417
|
},
|
|
@@ -409,7 +422,7 @@ function (_super) {
|
|
|
409
422
|
type: "icon-message"
|
|
410
423
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
411
424
|
className: "num"
|
|
412
|
-
}, messageNum))), data.content && ((
|
|
425
|
+
}, messageNum))), data.content && ((_u = data.content.logo) === null || _u === void 0 ? void 0 : _u.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
413
426
|
className: "logo",
|
|
414
427
|
onClick: function onClick() {
|
|
415
428
|
var _a, _b;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
.m-search-bar .right {
|
|
11
11
|
display: flex;
|
|
12
12
|
flex: 1;
|
|
13
|
-
margin-left: 0.3rem;
|
|
14
13
|
align-items: center;
|
|
15
14
|
justify-content: space-between;
|
|
16
15
|
}
|
|
@@ -30,6 +29,7 @@
|
|
|
30
29
|
border: none;
|
|
31
30
|
height: 100%;
|
|
32
31
|
width: 100%;
|
|
32
|
+
padding: 0;
|
|
33
33
|
box-shadow: none;
|
|
34
34
|
font-family: 'Open Sans';
|
|
35
35
|
font-style: normal;
|
|
@@ -57,6 +57,9 @@
|
|
|
57
57
|
font-size: 0.16rem;
|
|
58
58
|
color: #FFFFFF;
|
|
59
59
|
}
|
|
60
|
+
.m-search-bar .logo {
|
|
61
|
+
margin-right: 0.3rem;
|
|
62
|
+
}
|
|
60
63
|
.m-search-bar .logo img {
|
|
61
64
|
width: auto;
|
|
62
65
|
}
|
|
@@ -25,6 +25,8 @@ var _Text = require("../../../../../meta-comp/components/Text");
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
27
|
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
28
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
31
|
var _extendStatics = function extendStatics(d, b) {
|
|
30
32
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -101,13 +103,13 @@ function (_super) {
|
|
|
101
103
|
};
|
|
102
104
|
|
|
103
105
|
_this.onBlur = function () {
|
|
104
|
-
var _a, _b, _c;
|
|
106
|
+
var _a, _b, _c, _d, _e, _f;
|
|
105
107
|
|
|
106
108
|
var inputVal = _this.state.inputVal;
|
|
107
109
|
|
|
108
|
-
if (!inputVal) {
|
|
110
|
+
if (((_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.open) && !inputVal) {
|
|
109
111
|
_this.setState({
|
|
110
|
-
inputVal: (
|
|
112
|
+
inputVal: (_f = (_e = (_d = _this.props.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder,
|
|
111
113
|
editing: false
|
|
112
114
|
});
|
|
113
115
|
}
|
|
@@ -127,19 +129,27 @@ function (_super) {
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
SearchPc.prototype.componentDidMount = function () {
|
|
130
|
-
var _a, _b, _c;
|
|
132
|
+
var _a, _b, _c, _d, _e, _f;
|
|
131
133
|
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
if ((_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.open) {
|
|
135
|
+
this.setState({
|
|
136
|
+
inputVal: (_f = (_e = (_d = this.props.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder
|
|
137
|
+
});
|
|
138
|
+
}
|
|
135
139
|
};
|
|
136
140
|
|
|
137
141
|
SearchPc.prototype.componentWillReceiveProps = function (nextProps) {
|
|
138
|
-
var _a, _b, _c;
|
|
142
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
143
|
+
|
|
144
|
+
if (((_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.open) && !this.state.editing) {
|
|
145
|
+
this.setState({
|
|
146
|
+
inputVal: (_f = (_e = (_d = nextProps.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.keyword) === null || _f === void 0 ? void 0 : _f.placeholder
|
|
147
|
+
});
|
|
148
|
+
}
|
|
139
149
|
|
|
140
|
-
if (!
|
|
150
|
+
if (!((_j = (_h = (_g = nextProps.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.keyword) === null || _j === void 0 ? void 0 : _j.open)) {
|
|
141
151
|
this.setState({
|
|
142
|
-
inputVal:
|
|
152
|
+
inputVal: ''
|
|
143
153
|
});
|
|
144
154
|
}
|
|
145
155
|
};
|
|
@@ -147,7 +157,7 @@ function (_super) {
|
|
|
147
157
|
SearchPc.prototype.render = function () {
|
|
148
158
|
var _this = this;
|
|
149
159
|
|
|
150
|
-
var _a, _b, _c;
|
|
160
|
+
var _a, _b, _c, _d, _e;
|
|
151
161
|
|
|
152
162
|
var data = this.props.data;
|
|
153
163
|
var inputVal = this.state.inputVal;
|
|
@@ -155,6 +165,9 @@ function (_super) {
|
|
|
155
165
|
var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
|
|
156
166
|
|
|
157
167
|
Reflect.deleteProperty(style, 'width');
|
|
168
|
+
|
|
169
|
+
var _placeholder = ((_b = data.content.placeholder) === null || _b === void 0 ? void 0 : _b.open) ? (_c = data.content.placeholder) === null || _c === void 0 ? void 0 : _c.text : '';
|
|
170
|
+
|
|
158
171
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
172
|
className: "pc-search-bar"
|
|
160
173
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -163,9 +176,9 @@ function (_super) {
|
|
|
163
176
|
className: "search-input-wrap",
|
|
164
177
|
style: {
|
|
165
178
|
borderColor: data.content.box.color.pc,
|
|
166
|
-
backgroundColor: (
|
|
179
|
+
backgroundColor: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.backgroundColor) === null || _e === void 0 ? void 0 : _e.pc
|
|
167
180
|
}
|
|
168
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
181
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, _defineProperty({
|
|
169
182
|
className: "search-input",
|
|
170
183
|
onBlur: this.onBlur,
|
|
171
184
|
onChange: function onChange(e) {
|
|
@@ -176,7 +189,7 @@ function (_super) {
|
|
|
176
189
|
placeholder: (0, _locale.i18n)('PLEASE_INPUT_KEYWORDS'),
|
|
177
190
|
style: (0, _commonUtil.pxToRem)(style),
|
|
178
191
|
value: inputVal
|
|
179
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
|
+
}, "placeholder", _placeholder)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
180
193
|
className: "search-icon",
|
|
181
194
|
onClick: this.searchProduct,
|
|
182
195
|
style: {
|
|
@@ -166,7 +166,9 @@ function (_super) {
|
|
|
166
166
|
value: "Montserrat"
|
|
167
167
|
}, (0, _locale.i18n)('MONTSERRAT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
168
168
|
value: "Open Sans"
|
|
169
|
-
}, (0, _locale.i18n)('OPEN_SANS'))
|
|
169
|
+
}, (0, _locale.i18n)('OPEN_SANS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
170
|
+
value: "Inter"
|
|
171
|
+
}, (0, _locale.i18n)('INTER')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
170
172
|
title: (0, _locale.i18n)('FONT_WEIGHT')
|
|
171
173
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
172
174
|
onChange: function onChange(v) {
|
package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -140,6 +140,26 @@ function (_super) {
|
|
|
140
140
|
metaOption: panelProps.keyword
|
|
141
141
|
}, {
|
|
142
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: panelProps.placeholder.text
|
|
159
|
+
}))),
|
|
160
|
+
metaOption: panelProps.placeholder
|
|
161
|
+
}, {
|
|
162
|
+
key: 'search5',
|
|
143
163
|
name: (0, _locale.i18n)('ICON'),
|
|
144
164
|
toggleType: 'triangle',
|
|
145
165
|
value: /*#__PURE__*/_react["default"].createElement("div", {
|