@fonixtree/magic-design 2.0.189 → 2.0.191
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/Roboto-Bold.ttf +0 -0
- package/es/assets/fonts/Roboto-Medium.ttf +0 -0
- package/es/assets/fonts/Roboto-Regular.ttf +0 -0
- package/es/assets/fonts/Roboto-SemiBold.ttf +0 -0
- package/es/assets/less/font.less +30 -0
- package/es/composite-comp/ashita/components/WalletAshita/defaultJSON.js +1 -1
- package/es/composite-comp/ashita/components/WalletAshita/index.js +1 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.less +6 -2
- package/es/composite-comp/common/config-panels/InputField/index.js +1 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +66 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +55 -20
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +1 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +6 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +3 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +29 -5
- package/es/composite-comp/public/components/Stores/defaultJSON.js +1 -3
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +2 -2
- package/es/composite-comp/public/components/Stores/mobile/index.js +33 -9
- package/es/composite-comp/public/components/Wallet/defaultJSON.js +1 -1
- package/es/composite-comp/public/components/Wallet/index.js +1 -1
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +10 -2
- package/es/constants/index.js +6 -2
- package/es/core/Designer/ToolBarModal/index.js +1 -1
- package/es/decorator/compositeDecorator.js +5 -8
- package/es/locale/ar/ar.json +6 -0
- package/es/locale/en/en.json +6 -0
- package/es/locale/es/es.json +6 -0
- package/es/locale/mn/mn.json +7 -1
- package/es/meta-comp/config-panels/ButtonConfig/index.js +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/utils/dateUtil.js +14 -0
- package/lib/assets/fonts/Roboto-Bold.ttf +0 -0
- package/lib/assets/fonts/Roboto-Medium.ttf +0 -0
- package/lib/assets/fonts/Roboto-Regular.ttf +0 -0
- package/lib/assets/fonts/Roboto-SemiBold.ttf +0 -0
- package/lib/assets/less/font.less +30 -0
- package/lib/composite-comp/ashita/components/WalletAshita/defaultJSON.js +1 -1
- package/lib/composite-comp/ashita/components/WalletAshita/index.js +1 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +6 -2
- package/lib/composite-comp/common/config-panels/InputField/index.js +1 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +66 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +55 -20
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +1 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +6 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +3 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +29 -5
- package/lib/composite-comp/public/components/Stores/defaultJSON.js +1 -3
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +2 -2
- package/lib/composite-comp/public/components/Stores/mobile/index.js +33 -9
- package/lib/composite-comp/public/components/Wallet/defaultJSON.js +1 -1
- package/lib/composite-comp/public/components/Wallet/index.js +1 -1
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +10 -2
- package/lib/constants/index.js +6 -2
- package/lib/core/Designer/ToolBarModal/index.js +1 -1
- package/lib/decorator/compositeDecorator.js +5 -8
- package/lib/locale/ar/ar.json +6 -0
- package/lib/locale/en/en.json +6 -0
- package/lib/locale/es/es.json +6 -0
- package/lib/locale/mn/mn.json +7 -1
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/utils/dateUtil.js +14 -0
- package/package.json +2 -2
|
@@ -243,24 +243,40 @@ function (_super) {
|
|
|
243
243
|
_this.state = {
|
|
244
244
|
list: []
|
|
245
245
|
};
|
|
246
|
+
_this.sourceType = '1';
|
|
247
|
+
_this.maxProdNum = 5;
|
|
246
248
|
|
|
247
249
|
_this.getData = function () {
|
|
248
250
|
return __awaiter(_this, void 0, void 0, function () {
|
|
249
|
-
var params, res, list;
|
|
251
|
+
var _a, maxProdNum, sourceType, params, info, res, list;
|
|
250
252
|
|
|
251
|
-
var
|
|
253
|
+
var _b;
|
|
252
254
|
|
|
253
|
-
return __generator(this, function (
|
|
254
|
-
switch (
|
|
255
|
+
return __generator(this, function (_c) {
|
|
256
|
+
switch (_c.label) {
|
|
255
257
|
case 0:
|
|
258
|
+
_a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType;
|
|
256
259
|
params = {
|
|
257
260
|
pageIndex: 1,
|
|
258
|
-
pageSize:
|
|
261
|
+
pageSize: maxProdNum,
|
|
262
|
+
pageTotal: true
|
|
259
263
|
};
|
|
260
264
|
|
|
265
|
+
if (sourceType === '2') {
|
|
266
|
+
params.freeShipping = 'Y';
|
|
267
|
+
} else if (sourceType === '3') {
|
|
268
|
+
params.newFlag = 'Y';
|
|
269
|
+
} else if (sourceType === '4') {
|
|
270
|
+
params.sortType = '1';
|
|
271
|
+
}
|
|
272
|
+
|
|
261
273
|
if ((0, _commonUtil.isLogin)()) {
|
|
262
|
-
|
|
263
|
-
|
|
274
|
+
info = getStore('USER_ADDRESS_INFO') || {};
|
|
275
|
+
|
|
276
|
+
if (info.longitude && info.latitude) {
|
|
277
|
+
params.longitude = info.longitude;
|
|
278
|
+
params.latitude = info.latitude;
|
|
279
|
+
}
|
|
264
280
|
}
|
|
265
281
|
|
|
266
282
|
return [4
|
|
@@ -268,8 +284,8 @@ function (_super) {
|
|
|
268
284
|
, (0, _commonUtil.commonFetch)('/designer/v1/h5/store/es', params, 'POST')];
|
|
269
285
|
|
|
270
286
|
case 1:
|
|
271
|
-
res =
|
|
272
|
-
list = ((
|
|
287
|
+
res = _c.sent();
|
|
288
|
+
list = ((_b = res.storePage) === null || _b === void 0 ? void 0 : _b.list) || [];
|
|
273
289
|
this.setState({
|
|
274
290
|
list: list
|
|
275
291
|
});
|
|
@@ -288,6 +304,14 @@ function (_super) {
|
|
|
288
304
|
this.getData();
|
|
289
305
|
};
|
|
290
306
|
|
|
307
|
+
Mobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
308
|
+
if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum) {
|
|
309
|
+
this.getData();
|
|
310
|
+
this.sourceType = nextProps.panelProps.content.sourceType;
|
|
311
|
+
this.maxProdNum = nextProps.panelProps.content.maxProdNum;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
|
|
291
315
|
Mobile.prototype.render = function () {
|
|
292
316
|
var _a;
|
|
293
317
|
|
|
@@ -28,7 +28,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
28
28
|
var defaultFontFamily = _constants.projectFontFamily[(_a = window.systemParams) === null || _a === void 0 ? void 0 : _a.projectCode] || 'Open Sans';
|
|
29
29
|
return {
|
|
30
30
|
id: groupId,
|
|
31
|
-
type: '
|
|
31
|
+
type: 'WALLET_PRODUCT',
|
|
32
32
|
groupSource: walletDataList.map(function (item) {
|
|
33
33
|
var itemId = (0, _uuid.v4)();
|
|
34
34
|
return {
|
|
@@ -145,14 +145,22 @@ function (_super) {
|
|
|
145
145
|
value: panelProps.sourceType
|
|
146
146
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
147
147
|
value: "1"
|
|
148
|
-
}, (0, _locale.i18n)('
|
|
148
|
+
}, (0, _locale.i18n)('ALL_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
149
|
+
value: "2"
|
|
150
|
+
}, (0, _locale.i18n)('FREE_SHIPPING_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
151
|
+
value: "3"
|
|
152
|
+
}, (0, _locale.i18n)('NEW_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
153
|
+
value: "4"
|
|
154
|
+
}, (0, _locale.i18n)('HIGH_SALES_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
155
|
+
value: "5"
|
|
156
|
+
}, (0, _locale.i18n)('SELECT_STORES')))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
149
157
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY'),
|
|
150
158
|
topSplit: true
|
|
151
159
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
152
160
|
onChange: function onChange(e) {
|
|
153
161
|
panelProps.maxProdNum = e.target.value;
|
|
154
162
|
|
|
155
|
-
_this.
|
|
163
|
+
_this.reRender();
|
|
156
164
|
},
|
|
157
165
|
value: panelProps.maxProdNum
|
|
158
166
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
package/lib/constants/index.js
CHANGED
|
@@ -73,6 +73,9 @@ var fontFamilyList = [{
|
|
|
73
73
|
}, {
|
|
74
74
|
name: (0, _locale.i18n)('INTER'),
|
|
75
75
|
value: 'Inter'
|
|
76
|
+
}, {
|
|
77
|
+
name: (0, _locale.i18n)('ROBOTO'),
|
|
78
|
+
value: 'Roboto'
|
|
76
79
|
}];
|
|
77
80
|
exports.fontFamilyList = fontFamilyList;
|
|
78
81
|
var fontWeightList = [{
|
|
@@ -109,7 +112,8 @@ exports.projectCodes = projectCodes;
|
|
|
109
112
|
var projectFontFamily = {
|
|
110
113
|
MN: 'Inter',
|
|
111
114
|
Ashita: 'Montserrat',
|
|
112
|
-
pto: 'Open Sans'
|
|
115
|
+
pto: 'Open Sans',
|
|
116
|
+
ar: 'Roboto'
|
|
113
117
|
};
|
|
114
118
|
exports.projectFontFamily = projectFontFamily;
|
|
115
119
|
var campaignTypes = {
|
|
@@ -323,7 +327,7 @@ var compInfoMap = {
|
|
|
323
327
|
name: 'Wallet',
|
|
324
328
|
icon: 'icon-Wallet'
|
|
325
329
|
},
|
|
326
|
-
|
|
330
|
+
WALLET_PRODUCT: {
|
|
327
331
|
name: 'Wallet',
|
|
328
332
|
icon: 'icon-Wallet'
|
|
329
333
|
},
|
|
@@ -209,7 +209,7 @@ function (_super) {
|
|
|
209
209
|
|
|
210
210
|
var quillFormat = this.state.quillFormat;
|
|
211
211
|
|
|
212
|
-
var _fontWeightList = quillFormat['font-family']
|
|
212
|
+
var _fontWeightList = ['Montserrat', 'Roboto'].includes(quillFormat['font-family']) ? _constants.fontWeightList : _constants.otherFontWeightList;
|
|
213
213
|
|
|
214
214
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
215
215
|
ref: this.toolBarRef,
|
|
@@ -15,8 +15,6 @@ var _constants = require("../constants");
|
|
|
15
15
|
|
|
16
16
|
var _commonUtil = require("../utils/commonUtil");
|
|
17
17
|
|
|
18
|
-
var _androidUtil = require("../utils/androidUtil");
|
|
19
|
-
|
|
20
18
|
var _storeUtil = require("../utils/storeUtil");
|
|
21
19
|
|
|
22
20
|
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); }
|
|
@@ -289,13 +287,12 @@ function compositeDecorator(WrappedComponent) {
|
|
|
289
287
|
hoveredFloor: _mobx.store.hoveredFloor
|
|
290
288
|
});
|
|
291
289
|
});
|
|
292
|
-
this.getOuterWrapStyle();
|
|
290
|
+
this.getOuterWrapStyle(); // if (browserVersion().isDelivistaApp) {
|
|
293
291
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
292
|
+
window['switchLanguage'] = this.switchLanguage;
|
|
293
|
+
window['getUserAddress'] = this.getUserAddress; // switchLanguage();
|
|
294
|
+
// getUserAddress();
|
|
295
|
+
// }
|
|
299
296
|
};
|
|
300
297
|
|
|
301
298
|
Wrapper.prototype.componentWillUnmount = function () {
|
package/lib/locale/ar/ar.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SELECT_STORES": "Select stores",
|
|
3
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
4
|
+
"NEW_STORES": "New stores",
|
|
5
|
+
"ALL_STORES": "All stores",
|
|
6
|
+
"ROBOTO": "Roboto",
|
|
7
|
+
"POINTS": "Points",
|
|
2
8
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
9
|
"GIFT": "Gift",
|
|
4
10
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/lib/locale/en/en.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SELECT_STORES": "Select stores",
|
|
3
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
4
|
+
"NEW_STORES": "New stores",
|
|
5
|
+
"ALL_STORES": "All stores",
|
|
6
|
+
"ROBOTO": "Roboto",
|
|
7
|
+
"POINTS": "Points",
|
|
2
8
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
9
|
"GIFT": "Gift",
|
|
4
10
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/lib/locale/es/es.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SELECT_STORES": "Select stores",
|
|
3
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
4
|
+
"NEW_STORES": "New stores",
|
|
5
|
+
"ALL_STORES": "All stores",
|
|
6
|
+
"ROBOTO": "Roboto",
|
|
7
|
+
"POINTS": "Points",
|
|
2
8
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
9
|
"GIFT": "Gift",
|
|
4
10
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/lib/locale/mn/mn.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SELECT_STORES": "Select stores",
|
|
3
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
4
|
+
"NEW_STORES": "New stores",
|
|
5
|
+
"ALL_STORES": "All stores",
|
|
6
|
+
"ROBOTO": "Roboto",
|
|
7
|
+
"POINTS": "Points",
|
|
2
8
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
9
|
"GIFT": "Бэлэгтэй",
|
|
4
10
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
|
@@ -172,7 +178,7 @@
|
|
|
172
178
|
"COUPON": "Купон",
|
|
173
179
|
"HEADER_IMAGE": "Толгойн зураг",
|
|
174
180
|
"ACTIVITY_LABEL": "Үйл ажиллагааны шошго",
|
|
175
|
-
"STOCK": "
|
|
181
|
+
"STOCK": "Үлдэгдэл",
|
|
176
182
|
"DISCOUNT_LABEL": "Хөнгөлөлтийн шошго",
|
|
177
183
|
"SESSION_TIME": "Сеанс цаг",
|
|
178
184
|
"COUNTDOWN": "Countdown",
|
|
@@ -171,7 +171,7 @@ function (_super) {
|
|
|
171
171
|
|
|
172
172
|
var fontSizeKey = window.magicDesign.device == 'pc' ? 'pcFontSize' : 'fontSize';
|
|
173
173
|
|
|
174
|
-
var _fontWeightList = ((_a = data === null || data === void 0 ? void 0 : data.buttonText) === null || _a === void 0 ? void 0 : _a.fontFamily)
|
|
174
|
+
var _fontWeightList = ['Montserrat', 'Roboto'].includes((_a = data === null || data === void 0 ? void 0 : data.buttonText) === null || _a === void 0 ? void 0 : _a.fontFamily) ? _constants.fontWeightList : _constants.otherFontWeightList;
|
|
175
175
|
|
|
176
176
|
var ButtonTextSetting = function ButtonTextSetting(_data) {
|
|
177
177
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
@@ -187,7 +187,7 @@ function (_super) {
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
var _fontWeightList = textData.fontFamily
|
|
190
|
+
var _fontWeightList = ['Montserrat', 'Roboto'].includes(textData.fontFamily) ? _constants.fontWeightList : _constants.otherFontWeightList;
|
|
191
191
|
|
|
192
192
|
var source = [{
|
|
193
193
|
key: '1',
|
package/lib/utils/dateUtil.js
CHANGED
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.formatDateTime = exports.formatDateMinute = exports.formatDate = void 0;
|
|
7
7
|
exports.formatDayMonth = formatDayMonth;
|
|
8
8
|
exports.formatDayMonthTime = formatDayMonthTime;
|
|
9
|
+
exports.isToday = isToday;
|
|
10
|
+
exports.isTomorrow = isTomorrow;
|
|
9
11
|
exports.newDate = void 0;
|
|
10
12
|
|
|
11
13
|
var _moment = _interopRequireDefault(require("moment"));
|
|
@@ -80,4 +82,16 @@ function formatDayMonthTime(date, fmt) {
|
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
return (0, _moment["default"])(newDate(date)).format(fmt);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function isToday(date) {
|
|
88
|
+
var now = new Date();
|
|
89
|
+
var tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
90
|
+
return date.getDate() === tomorrow.getDate() && date.getMonth() === tomorrow.getMonth() && date.getFullYear() === tomorrow.getFullYear();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function isTomorrow(date) {
|
|
94
|
+
var now = new Date();
|
|
95
|
+
var tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
|
|
96
|
+
return date.getDate() === tomorrow.getDate() && date.getMonth() === tomorrow.getMonth() && date.getFullYear() === tomorrow.getFullYear();
|
|
83
97
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonixtree/magic-design",
|
|
3
3
|
"author": "Cylon Team",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.191",
|
|
5
5
|
"description": "Magic Design",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"marked": "4.3.0",
|
|
33
33
|
"mobx": "6.6.1",
|
|
34
34
|
"mobx-react": "7.5.2",
|
|
35
|
-
"moment": "2.
|
|
35
|
+
"moment": "2.30",
|
|
36
36
|
"postcss-pxtorem": "^6.0.0",
|
|
37
37
|
"quill": "^1.3.7",
|
|
38
38
|
"ramda": "^0.28.0",
|