@fonixtree/magic-design 2.0.85 → 2.0.87
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/common/CountDown/index.js +20 -11
- package/es/common/CropperModal/index.js +126 -0
- package/es/common/CropperModal/index.less +29 -0
- package/es/common/LinkModal/AffiliateStore/index.js +332 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/UrlPicker/index.js +1 -10
- package/es/common/index.js +8 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/es/composite-comp/dito/components/Orders/mobile/index.js +2 -2
- package/es/composite-comp/dito/components/Orders/mobile/index.less +1 -6
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +114 -7
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +6 -2
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/es/core/Designer/ToolBarModal/index.js +5 -1
- package/es/core/Renderer/index.js +6 -2
- package/es/decorator/compositeDecorator.js +9 -5
- package/es/locale/en/en.json +1 -1
- package/es/locale/es/es.json +2 -2
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/utils/commonUtil.js +1 -3
- package/es/utils/coreUtil.js +29 -21
- package/lib/common/CountDown/index.js +20 -11
- package/lib/common/CropperModal/index.js +126 -0
- package/lib/common/CropperModal/index.less +29 -0
- package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/UrlPicker/index.js +1 -10
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +2 -2
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +1 -6
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +114 -7
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +6 -2
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/lib/core/Designer/ToolBarModal/index.js +5 -1
- package/lib/core/Renderer/index.js +6 -2
- package/lib/decorator/compositeDecorator.js +9 -5
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/es/es.json +2 -2
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/utils/commonUtil.js +1 -3
- package/lib/utils/coreUtil.js +29 -21
- package/package.json +2 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
|
@@ -44,7 +44,8 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
44
44
|
var setDesignConfig = function setDesignConfig(props) {
|
|
45
45
|
var config = props.config,
|
|
46
46
|
device = props.device,
|
|
47
|
-
isPreview = props.isPreview
|
|
47
|
+
isPreview = props.isPreview,
|
|
48
|
+
projectCode = props.projectCode;
|
|
48
49
|
window.magicDesign = __assign(__assign({
|
|
49
50
|
pageBackground: '#f2f2f2',
|
|
50
51
|
mode: 'renderer',
|
|
@@ -52,6 +53,7 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
52
53
|
designMode: isPreview,
|
|
53
54
|
navigatePreUrl: ''
|
|
54
55
|
}, config), {
|
|
56
|
+
projectCode: projectCode,
|
|
55
57
|
compSpacing: Number(config.compSpacing),
|
|
56
58
|
compWidth: Number(config.compWidth)
|
|
57
59
|
});
|
|
@@ -137,7 +139,9 @@ var Renderer = function Renderer(props) {
|
|
|
137
139
|
};
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
return {
|
|
142
|
+
return {
|
|
143
|
+
overflow: 'auto'
|
|
144
|
+
};
|
|
141
145
|
};
|
|
142
146
|
|
|
143
147
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -87,7 +87,11 @@ function compositeDecorator(WrappedComponent) {
|
|
|
87
87
|
}; // 复合组件点击事件
|
|
88
88
|
|
|
89
89
|
_this.onCompositeCompClick = function (event) {
|
|
90
|
-
|
|
90
|
+
if (window.magicDesign.mode === 'renderer') {
|
|
91
|
+
return;
|
|
92
|
+
} // 触发左侧楼层的滚动
|
|
93
|
+
|
|
94
|
+
|
|
91
95
|
if (document.getElementById("card" + _this.props.nodeData.id)) {
|
|
92
96
|
document.getElementById("card" + _this.props.nodeData.id).scrollIntoView({
|
|
93
97
|
behavior: 'smooth'
|
|
@@ -115,19 +119,20 @@ function compositeDecorator(WrappedComponent) {
|
|
|
115
119
|
device = _b.device,
|
|
116
120
|
compWidth = _b.compWidth;
|
|
117
121
|
var zIndex = '0';
|
|
122
|
+
var position = 'relative';
|
|
118
123
|
|
|
119
124
|
if (nodeData.type === 'CAROUSEL' || nodeData.type === 'IMAGE_GALLERY' || nodeData.type === 'ORDERS') {
|
|
120
125
|
zIndex = '1';
|
|
121
126
|
} // 解决pc导航hover上去,类目被下面组件遮罩的问题
|
|
122
127
|
|
|
123
128
|
|
|
124
|
-
if (nodeData.type === 'PC_NAVIGATION') {
|
|
129
|
+
if (nodeData.type === 'PC_NAVIGATION' || nodeData.type === 'PERSONAL_INFOMATION') {
|
|
125
130
|
zIndex = '2';
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
var wrapStyle = {
|
|
129
134
|
border: 'none',
|
|
130
|
-
position:
|
|
135
|
+
position: position,
|
|
131
136
|
zIndex: zIndex,
|
|
132
137
|
margin: '0 auto'
|
|
133
138
|
}; // 复合组件内边距
|
|
@@ -205,8 +210,7 @@ function compositeDecorator(WrappedComponent) {
|
|
|
205
210
|
};
|
|
206
211
|
|
|
207
212
|
_this.getWrapStyle = function () {
|
|
208
|
-
var mode = window.magicDesign.mode;
|
|
209
|
-
|
|
213
|
+
var mode = window.magicDesign.mode;
|
|
210
214
|
var style = {
|
|
211
215
|
position: 'relative',
|
|
212
216
|
zIndex: '1'
|
package/lib/locale/en/en.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SUBMIT": "Submit",
|
|
2
3
|
"CANCELLED": "Cancelled",
|
|
3
4
|
"DONE": "Done",
|
|
4
5
|
"TO_RECEIVE": "To Receive",
|
|
@@ -128,7 +129,6 @@
|
|
|
128
129
|
"MOVE_DOWN": "Move Down",
|
|
129
130
|
"COPY": "Copy",
|
|
130
131
|
"DELETE": "Delete",
|
|
131
|
-
"DONE": "Done",
|
|
132
132
|
"ADD_COMPONENT": "Add Component",
|
|
133
133
|
"ALL": "ALL",
|
|
134
134
|
"HOT": "Hot",
|
package/lib/locale/es/es.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SUBMIT": "Submit",
|
|
2
3
|
"CANCELLED": "Cancelled",
|
|
3
|
-
"DONE": "
|
|
4
|
+
"DONE": "Hecho",
|
|
4
5
|
"TO_RECEIVE": "To Receive",
|
|
5
6
|
"TO_SHIP": "To ship",
|
|
6
7
|
"TO_PAY": "To Pay",
|
|
@@ -128,7 +129,6 @@
|
|
|
128
129
|
"MOVE_DOWN": "Mover hacia abajo",
|
|
129
130
|
"COPY": "Copiar",
|
|
130
131
|
"DELETE": "Eliminar",
|
|
131
|
-
"DONE": "Hecho",
|
|
132
132
|
"ADD_COMPONENT": "Agregar Componente",
|
|
133
133
|
"ALL": "TODO",
|
|
134
134
|
"HOT": "Caliente",
|
package/lib/locale/id/id.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SUBMIT": "Submit",
|
|
2
3
|
"CANCELLED": "Cancelled",
|
|
3
4
|
"DONE": "Done",
|
|
4
5
|
"TO_RECEIVE": "To Receive",
|
|
@@ -128,7 +129,6 @@
|
|
|
128
129
|
"MOVE_DOWN": "Move Down",
|
|
129
130
|
"COPY": "Copy",
|
|
130
131
|
"DELETE": "Delete",
|
|
131
|
-
"DONE": "Done",
|
|
132
132
|
"ADD_COMPONENT": "Add Component",
|
|
133
133
|
"ALL": "ALL",
|
|
134
134
|
"HOT": "Hot",
|
|
@@ -278,7 +278,7 @@ function (_super) {
|
|
|
278
278
|
showBgColor: true,
|
|
279
279
|
showTextAlign: true,
|
|
280
280
|
value: textData
|
|
281
|
-
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
281
|
+
})), window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
282
282
|
split: true,
|
|
283
283
|
title: "URL"
|
|
284
284
|
}, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -297,8 +297,6 @@ function commonFetch(url, data, method) {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
var navigateTo = function navigateTo(url) {
|
|
300
|
-
console.log(url);
|
|
301
|
-
|
|
302
300
|
if (!url) {
|
|
303
301
|
return;
|
|
304
302
|
}
|
|
@@ -349,7 +347,7 @@ function goLogin(state, replaceFlag) {
|
|
|
349
347
|
var signUrl = isFromSf === 'Y' ? '/sign-in-opt' : '/sign-in';
|
|
350
348
|
|
|
351
349
|
if (replaceFlag) {
|
|
352
|
-
|
|
350
|
+
window.magicDesign.history.replace({
|
|
353
351
|
pathname: signUrl,
|
|
354
352
|
state: state
|
|
355
353
|
});
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -303,6 +303,8 @@ function isUrl(string) {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
var clickUrl = function clickUrl(url) {
|
|
306
|
+
var _a;
|
|
307
|
+
|
|
306
308
|
if (url === void 0) {
|
|
307
309
|
url = '';
|
|
308
310
|
}
|
|
@@ -313,12 +315,12 @@ var clickUrl = function clickUrl(url) {
|
|
|
313
315
|
return;
|
|
314
316
|
}
|
|
315
317
|
|
|
316
|
-
var
|
|
317
|
-
link =
|
|
318
|
-
data =
|
|
318
|
+
var _b = _typeof(url) === 'object' ? (0, _businessUtil.newParseUrl)(url) : (0, _businessUtil.parseUrl)(url),
|
|
319
|
+
link = _b.link,
|
|
320
|
+
data = _b.data;
|
|
319
321
|
|
|
320
|
-
var
|
|
321
|
-
params =
|
|
322
|
+
var _c = data.params,
|
|
323
|
+
params = _c === void 0 ? {} : _c;
|
|
322
324
|
console.log('clicked data:', data);
|
|
323
325
|
console.log({
|
|
324
326
|
type: 'jumpBrowser',
|
|
@@ -341,11 +343,12 @@ var clickUrl = function clickUrl(url) {
|
|
|
341
343
|
if ((0, _androidUtil.browserVersion)().isAshitaApp) {
|
|
342
344
|
(0, _androidUtil.sendToApp)(data);
|
|
343
345
|
} else if ((0, _androidUtil.browserVersion)().isApp && params.link && params.link.startsWith('http')) {
|
|
344
|
-
// 兼容Nuri的 绝对路径跳转
|
|
346
|
+
var urlTemp = "" + params.link + (params.link.includes('?') ? '&' : '?') + "userToken=" + (localStorage.getItem('h5Token') || ''); // 兼容Nuri的 绝对路径跳转
|
|
347
|
+
|
|
345
348
|
(0, _androidUtil.sendToAndroid)({
|
|
346
349
|
type: 'jumpBrowser',
|
|
347
350
|
params: {
|
|
348
|
-
url:
|
|
351
|
+
url: urlTemp
|
|
349
352
|
}
|
|
350
353
|
});
|
|
351
354
|
} else {
|
|
@@ -369,25 +372,30 @@ var clickUrl = function clickUrl(url) {
|
|
|
369
372
|
}
|
|
370
373
|
|
|
371
374
|
return;
|
|
372
|
-
} //
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
if (link.includes(
|
|
379
|
-
|
|
380
|
-
|
|
375
|
+
} // 判断是否是nuri, nuri跳外链需要带token
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
if (((_a = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _a === void 0 ? void 0 : _a.projectCode) === 'nuri') {
|
|
379
|
+
// 输入的是完整的跳转地址
|
|
380
|
+
if (isUrl(link)) {
|
|
381
|
+
if (!link.includes(window.location.host)) {
|
|
382
|
+
// 跳转外链 需要把userToken带上
|
|
383
|
+
if (link.includes('?')) {
|
|
384
|
+
var a = link + "&userToken=" + (localStorage.getItem('h5Token') || '');
|
|
385
|
+
window.open(a);
|
|
386
|
+
} else {
|
|
387
|
+
var a = link + "?userToken=" + (localStorage.getItem('h5Token') || '');
|
|
388
|
+
window.open(a);
|
|
389
|
+
}
|
|
381
390
|
} else {
|
|
382
|
-
|
|
383
|
-
window.open(a);
|
|
391
|
+
window.open(link);
|
|
384
392
|
}
|
|
385
393
|
} else {
|
|
386
|
-
|
|
394
|
+
(0, _commonUtil.navigateTo)(link);
|
|
387
395
|
}
|
|
388
|
-
} else {
|
|
389
|
-
(0, _commonUtil.navigateTo)(link);
|
|
390
396
|
}
|
|
397
|
+
|
|
398
|
+
(0, _commonUtil.navigateTo)(link);
|
|
391
399
|
}
|
|
392
400
|
};
|
|
393
401
|
|
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.87",
|
|
5
5
|
"description": "Magic Design",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"ramda": "^0.28.0",
|
|
37
37
|
"react-ace": "^10.1.0",
|
|
38
38
|
"react-color": "2.17.0",
|
|
39
|
+
"react-cropper": "^2.3.3",
|
|
39
40
|
"react-router-dom": "5.3.0",
|
|
40
41
|
"react-slick": "^0.29.0",
|
|
41
42
|
"replace": "^1.2.1",
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.common_functions_second_conf_wrap {}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.common_functions_second_conf_wrap {}
|