@fonixtree/magic-design 2.0.190 → 2.0.192
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/common/SelectStoreModal/SortableImageList/index.js +118 -0
- package/es/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/es/common/SelectStoreModal/index.js +756 -0
- package/es/common/SelectStoreModal/index.less +152 -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/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/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 +1 -2
- package/es/composite-comp/public/components/Stores/defaultJSON.js +1 -3
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -6
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/es/composite-comp/public/components/Stores/mobile/index.js +35 -13
- 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/components/Wallet/mobile/index.js +1 -4
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +11 -3
- package/es/constants/index.js +6 -2
- package/es/core/Designer/ToolBarModal/index.js +1 -1
- package/es/locale/ar/ar.json +9 -0
- package/es/locale/en/en.json +9 -0
- package/es/locale/es/es.json +9 -0
- package/es/locale/mn/mn.json +9 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- 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/common/SelectStoreModal/SortableImageList/index.js +118 -0
- package/lib/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/lib/common/SelectStoreModal/index.js +756 -0
- package/lib/common/SelectStoreModal/index.less +152 -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/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/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 +1 -2
- package/lib/composite-comp/public/components/Stores/defaultJSON.js +1 -3
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -6
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/lib/composite-comp/public/components/Stores/mobile/index.js +35 -13
- 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/components/Wallet/mobile/index.js +1 -4
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +11 -3
- package/lib/constants/index.js +6 -2
- package/lib/core/Designer/ToolBarModal/index.js +1 -1
- package/lib/locale/ar/ar.json +9 -0
- package/lib/locale/en/en.json +9 -0
- package/lib/locale/es/es.json +9 -0
- package/lib/locale/mn/mn.json +9 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/package.json +1 -1
|
@@ -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 {
|
|
@@ -282,7 +282,6 @@ function (_super) {
|
|
|
282
282
|
var _this = this;
|
|
283
283
|
|
|
284
284
|
var data = this.props.data;
|
|
285
|
-
console.log('data: ', data);
|
|
286
285
|
var _a = this.state,
|
|
287
286
|
balance = _a.balance,
|
|
288
287
|
cenduit = _a.cenduit;
|
|
@@ -290,8 +289,6 @@ function (_super) {
|
|
|
290
289
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
291
290
|
className: "m-wallet"
|
|
292
291
|
}, data.groupSource.map(function (group, index) {
|
|
293
|
-
var _a;
|
|
294
|
-
|
|
295
292
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
296
293
|
key: group.id,
|
|
297
294
|
className: "wallet-item",
|
|
@@ -300,7 +297,7 @@ function (_super) {
|
|
|
300
297
|
}
|
|
301
298
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
299
|
className: "item-head"
|
|
303
|
-
},
|
|
300
|
+
}, group.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
304
301
|
data: group.logo,
|
|
305
302
|
GAData: GAData,
|
|
306
303
|
style: (0, _commonUtil.pxToRem)({
|
|
@@ -127,7 +127,7 @@ function (_super) {
|
|
|
127
127
|
}, {
|
|
128
128
|
key: '8',
|
|
129
129
|
name: (0, _locale.i18n)('DISTANCE'),
|
|
130
|
-
value: /*#__PURE__*/_react["default"].createElement(
|
|
130
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
131
131
|
data: panelProps.distance
|
|
132
132
|
}),
|
|
133
133
|
metaOption: panelProps.distance
|
|
@@ -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/es/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,
|
package/es/locale/ar/ar.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"STORE_STATE": "Store State",
|
|
3
|
+
"BUSINESS_TYPE": "Business Type",
|
|
4
|
+
"STORE_SELECT": "Store Select",
|
|
5
|
+
"SELECT_STORES": "Select stores",
|
|
6
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
7
|
+
"NEW_STORES": "New stores",
|
|
8
|
+
"ALL_STORES": "All stores",
|
|
9
|
+
"ROBOTO": "Roboto",
|
|
10
|
+
"POINTS": "Points",
|
|
2
11
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
12
|
"GIFT": "Gift",
|
|
4
13
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/es/locale/en/en.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"STORE_STATE": "Store State",
|
|
3
|
+
"BUSINESS_TYPE": "Business Type",
|
|
4
|
+
"STORE_SELECT": "Store Select",
|
|
5
|
+
"SELECT_STORES": "Select stores",
|
|
6
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
7
|
+
"NEW_STORES": "New stores",
|
|
8
|
+
"ALL_STORES": "All stores",
|
|
9
|
+
"ROBOTO": "Roboto",
|
|
10
|
+
"POINTS": "Points",
|
|
2
11
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
12
|
"GIFT": "Gift",
|
|
4
13
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/es/locale/es/es.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"STORE_STATE": "Store State",
|
|
3
|
+
"BUSINESS_TYPE": "Business Type",
|
|
4
|
+
"STORE_SELECT": "Store Select",
|
|
5
|
+
"SELECT_STORES": "Select stores",
|
|
6
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
7
|
+
"NEW_STORES": "New stores",
|
|
8
|
+
"ALL_STORES": "All stores",
|
|
9
|
+
"ROBOTO": "Roboto",
|
|
10
|
+
"POINTS": "Points",
|
|
2
11
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
12
|
"GIFT": "Gift",
|
|
4
13
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
package/es/locale/mn/mn.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"STORE_STATE": "Store State",
|
|
3
|
+
"BUSINESS_TYPE": "Business Type",
|
|
4
|
+
"STORE_SELECT": "Store Select",
|
|
5
|
+
"SELECT_STORES": "Select stores",
|
|
6
|
+
"HIGH_SALES_STORES": "High sales stores",
|
|
7
|
+
"NEW_STORES": "New stores",
|
|
8
|
+
"ALL_STORES": "All stores",
|
|
9
|
+
"ROBOTO": "Roboto",
|
|
10
|
+
"POINTS": "Points",
|
|
2
11
|
"CAN_BE_ADDED_AS_YOUR_ADDRESS": "Can be added as your address",
|
|
3
12
|
"GIFT": "Бэлэгтэй",
|
|
4
13
|
"SEARCH_FOR_PRODUCT_OR_SHOP": "Search for product or shop",
|
|
@@ -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',
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -88,4 +88,34 @@
|
|
|
88
88
|
src: url(../fonts/TruenoBd.otf);
|
|
89
89
|
font-weight: 600;
|
|
90
90
|
font-style: normal;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@font-face {
|
|
95
|
+
font-family: 'Roboto';
|
|
96
|
+
src: url('../fonts/Roboto-Regular.ttf');
|
|
97
|
+
font-weight: 400;
|
|
98
|
+
font-style: normal;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@font-face {
|
|
102
|
+
font-family: 'Roboto';
|
|
103
|
+
src: url(../fonts/Roboto-Medium.ttf);
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
font-style: normal;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@font-face {
|
|
110
|
+
font-family: 'Roboto';
|
|
111
|
+
src: url('../fonts/Roboto-SemiBold.ttf');
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
font-style: normal;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@font-face {
|
|
117
|
+
font-family: 'Roboto';
|
|
118
|
+
src: url(../fonts/Roboto-Bold.ttf);
|
|
119
|
+
font-weight: 700;
|
|
120
|
+
font-style: normal;
|
|
91
121
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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"] = SortableImageList;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"));
|
|
13
|
+
|
|
14
|
+
var _Iconfont = _interopRequireDefault(require("../../Iconfont"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function SortableImageList(_a) {
|
|
25
|
+
var selectedList = _a.selectedList,
|
|
26
|
+
setSelectedList = _a.setSelectedList;
|
|
27
|
+
|
|
28
|
+
var _b = (0, _react.useState)(''),
|
|
29
|
+
dragId = _b[0],
|
|
30
|
+
setDragId = _b[1];
|
|
31
|
+
|
|
32
|
+
var _c = (0, _react.useState)(selectedList || []),
|
|
33
|
+
list = _c[0],
|
|
34
|
+
setList = _c[1];
|
|
35
|
+
|
|
36
|
+
var ref = (0, _react.useRef)();
|
|
37
|
+
|
|
38
|
+
var onDragEnd = function onDragEnd() {
|
|
39
|
+
console.log('onDragEnd');
|
|
40
|
+
setDragId('');
|
|
41
|
+
|
|
42
|
+
if (ref.current) {
|
|
43
|
+
setSelectedList(ref.current);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
(0, _react.useEffect)(function () {
|
|
48
|
+
setList(selectedList || []);
|
|
49
|
+
}, [selectedList]);
|
|
50
|
+
|
|
51
|
+
var delSelectedItem = function delSelectedItem(index) {
|
|
52
|
+
var rows = JSON.parse(JSON.stringify(selectedList));
|
|
53
|
+
rows.splice(index, 1);
|
|
54
|
+
setSelectedList(rows);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var moveCard = (0, _react.useCallback)(function (dragNodeId, hoverNodeId) {
|
|
58
|
+
var dragIndex = list.findIndex(function (comp) {
|
|
59
|
+
return comp.productId === Number(dragNodeId);
|
|
60
|
+
});
|
|
61
|
+
var hoverIndex = list.findIndex(function (comp) {
|
|
62
|
+
return comp.productId === Number(hoverNodeId);
|
|
63
|
+
});
|
|
64
|
+
setList(function (prevCards) {
|
|
65
|
+
var newList = (0, _immutabilityHelper["default"])(prevCards, {
|
|
66
|
+
$splice: [[dragIndex, 1], [hoverIndex, 0, prevCards[dragIndex]]]
|
|
67
|
+
});
|
|
68
|
+
ref.current = newList;
|
|
69
|
+
return newList;
|
|
70
|
+
});
|
|
71
|
+
}, [list]);
|
|
72
|
+
|
|
73
|
+
var onDragEnter = function onDragEnter(e) {
|
|
74
|
+
console.log('onDragEnter');
|
|
75
|
+
var hoverNodeId = e.currentTarget.dataset.nodeid;
|
|
76
|
+
|
|
77
|
+
if (dragId === hoverNodeId) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
moveCard(dragId, hoverNodeId);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var onDragStart = function onDragStart(e) {
|
|
85
|
+
setDragId(e.currentTarget.dataset.nodeid);
|
|
86
|
+
console.log('onDragStart');
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
|
+
className: "imgListWrap"
|
|
91
|
+
}, list.map(function (item, index) {
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
key: index,
|
|
94
|
+
className: "selectedItem"
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
96
|
+
alt: "",
|
|
97
|
+
className: "selectedItemImg " + (item.state !== 'A' ? 'invalid' : ''),
|
|
98
|
+
"data-nodeid": item.productId,
|
|
99
|
+
draggable: "true",
|
|
100
|
+
onDragEnd: onDragEnd,
|
|
101
|
+
onDragEnter: onDragEnter,
|
|
102
|
+
onDragOver: function onDragOver(e) {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
},
|
|
105
|
+
onDragStart: onDragStart,
|
|
106
|
+
src: item.productImageUrl,
|
|
107
|
+
title: item.productName
|
|
108
|
+
}), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
109
|
+
className: "selectedItemClose",
|
|
110
|
+
color: "#000",
|
|
111
|
+
onClick: function onClick() {
|
|
112
|
+
return delSelectedItem(index);
|
|
113
|
+
},
|
|
114
|
+
size: 12,
|
|
115
|
+
type: "icon-close"
|
|
116
|
+
}));
|
|
117
|
+
}));
|
|
118
|
+
}
|