@fonixtree/magic-design 2.0.84 → 2.0.86

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.
Files changed (65) hide show
  1. package/es/common/CountDown/index.js +20 -11
  2. package/es/common/CropperModal/index.js +126 -0
  3. package/es/common/CropperModal/index.less +29 -0
  4. package/es/common/GroupList/index.js +2 -0
  5. package/es/common/LinkModal/AffiliateStore/index.js +332 -0
  6. package/es/common/LinkModal/index.js +6 -0
  7. package/es/common/UrlPicker/index.js +1 -10
  8. package/es/common/index.js +8 -0
  9. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  10. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  11. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
  12. package/es/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
  13. package/es/composite-comp/dito/components/Orders/mobile/index.js +17 -8
  14. package/es/composite-comp/dito/components/Orders/mobile/index.less +2 -6
  15. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
  16. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
  17. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
  18. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  19. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  20. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  21. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  22. package/es/constants/index.js +3 -3
  23. package/es/core/Designer/ToolBarModal/index.js +5 -1
  24. package/es/core/Renderer/index.js +3 -1
  25. package/es/decorator/compositeDecorator.js +9 -5
  26. package/es/locale/en/en.json +5 -5
  27. package/es/locale/es/es.json +5 -5
  28. package/es/locale/id/id.json +5 -5
  29. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  30. package/es/utils/commonUtil.js +12 -5
  31. package/es/utils/coreUtil.js +3 -2
  32. package/lib/common/CountDown/index.js +20 -11
  33. package/lib/common/CropperModal/index.js +126 -0
  34. package/lib/common/CropperModal/index.less +29 -0
  35. package/lib/common/GroupList/index.js +2 -0
  36. package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
  37. package/lib/common/LinkModal/index.js +6 -0
  38. package/lib/common/UrlPicker/index.js +1 -10
  39. package/lib/common/index.js +8 -0
  40. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  41. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  42. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
  43. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
  44. package/lib/composite-comp/dito/components/Orders/mobile/index.js +17 -8
  45. package/lib/composite-comp/dito/components/Orders/mobile/index.less +2 -6
  46. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
  47. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
  48. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
  49. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  50. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  51. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  52. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  53. package/lib/constants/index.js +3 -3
  54. package/lib/core/Designer/ToolBarModal/index.js +5 -1
  55. package/lib/core/Renderer/index.js +3 -1
  56. package/lib/decorator/compositeDecorator.js +9 -5
  57. package/lib/locale/en/en.json +5 -5
  58. package/lib/locale/es/es.json +5 -5
  59. package/lib/locale/id/id.json +5 -5
  60. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  61. package/lib/utils/commonUtil.js +12 -5
  62. package/lib/utils/coreUtil.js +3 -2
  63. package/package.json +2 -1
  64. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
  65. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
@@ -109,8 +109,8 @@ function (_super) {
109
109
  }, (0, _locale.i18n)('WISHLIST')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
110
110
  value: _index.personalInfoType.STORES
111
111
  }, (0, _locale.i18n)('STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
112
- value: _index.personalInfoType.COUPONS
113
- }, (0, _locale.i18n)('COUPONS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
112
+ value: _index.personalInfoType.VOUCHERS
113
+ }, (0, _locale.i18n)('VOUCHERS')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
114
114
  value: _index.personalInfoType.VIEWED
115
115
  }, (0, _locale.i18n)('RECENTLY_VIEWED'))))));
116
116
  };
@@ -49,14 +49,14 @@ var orderStatusType = {
49
49
  PAY: 'To Pay',
50
50
  SHIP: 'To Ship',
51
51
  RECEIVE: 'To Receive',
52
- RATING: 'Rating',
53
- RETURN: 'Return'
52
+ DONE: 'Done',
53
+ CANCELLED: 'Cancelled'
54
54
  };
55
55
  exports.orderStatusType = orderStatusType;
56
56
  var personalInfoType = {
57
57
  WISHLIST: 'Wishlist',
58
58
  STORES: 'Stores',
59
- COUPONS: 'Coupons',
59
+ VOUCHERS: 'Vouchers',
60
60
  VIEWED: 'Recently Viewed'
61
61
  };
62
62
  exports.personalInfoType = personalInfoType;
@@ -153,7 +153,11 @@ function (_super) {
153
153
 
154
154
  _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
155
155
  } else if (type == 'link') {
156
- _this.props.quillRef.format('link', JSON.stringify(value));
156
+ if (window.magicDesign.outputType === 'html') {
157
+ _this.props.quillRef.format('link', value.name);
158
+ } else {
159
+ _this.props.quillRef.format('link', JSON.stringify(value));
160
+ }
157
161
  } else if (type == 'size') {
158
162
  _this.props.quillRef.format('size', value + 'px');
159
163
  } else if (type == 'font') {
@@ -137,7 +137,9 @@ var Renderer = function Renderer(props) {
137
137
  };
138
138
  }
139
139
 
140
- return {};
140
+ return {
141
+ overflow: 'auto'
142
+ };
141
143
  };
142
144
 
143
145
  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: 'relative',
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; // const { nodeData } = this.props;
209
-
213
+ var mode = window.magicDesign.mode;
210
214
  var style = {
211
215
  position: 'relative',
212
216
  zIndex: '1'
@@ -1,13 +1,14 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "SUBMIT": "Submit",
3
+ "CANCELLED": "Cancelled",
4
+ "DONE": "Done",
4
5
  "TO_RECEIVE": "To Receive",
5
6
  "TO_SHIP": "To ship",
6
7
  "TO_PAY": "To Pay",
7
8
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
9
+ "ORDERS": "Orders",
9
10
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
11
+ "VOUCHERS": "Vouchers",
11
12
  "STORES": "Stores",
12
13
  "WISHLIST": "Wishlist",
13
14
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -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",
@@ -1,13 +1,14 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "SUBMIT": "Submit",
3
+ "CANCELLED": "Cancelled",
4
+ "DONE": "Hecho",
4
5
  "TO_RECEIVE": "To Receive",
5
6
  "TO_SHIP": "To ship",
6
7
  "TO_PAY": "To Pay",
7
8
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
9
+ "ORDERS": "Orders",
9
10
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
11
+ "VOUCHERS": "Vouchers",
11
12
  "STORES": "Stores",
12
13
  "WISHLIST": "Wishlist",
13
14
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -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",
@@ -1,13 +1,14 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "SUBMIT": "Submit",
3
+ "CANCELLED": "Cancelled",
4
+ "DONE": "Done",
4
5
  "TO_RECEIVE": "To Receive",
5
6
  "TO_SHIP": "To ship",
6
7
  "TO_PAY": "To Pay",
7
8
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
9
+ "ORDERS": "Orders",
9
10
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
11
+ "VOUCHERS": "Vouchers",
11
12
  "STORES": "Stores",
12
13
  "WISHLIST": "Wishlist",
13
14
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -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, {
@@ -296,7 +296,7 @@ function commonFetch(url, data, method) {
296
296
  });
297
297
  }
298
298
 
299
- var navigateTo = function navigateTo(url) {
299
+ var navigateTo = function navigateTo(url, state) {
300
300
  console.log(url);
301
301
 
302
302
  if (!url) {
@@ -305,13 +305,20 @@ var navigateTo = function navigateTo(url) {
305
305
 
306
306
  var _a = url.split(';'),
307
307
  h5Url = _a[0],
308
- appUrl = _a[1]; // 未配置App路径并且h5绝对路径时直接跳转,其他情况让业务层处理
308
+ appUrl = _a[1];
309
+
310
+ if (appUrl && (0, _androidUtil.browserVersion)().isApp) {
311
+ window.location.href = appUrl;
312
+ } // 未配置App路径并且h5绝对路径时直接跳转,其他情况让业务层处理
309
313
 
310
314
 
311
315
  if (!appUrl && !h5Url.startsWith('/')) {
312
316
  window.location.href = h5Url;
313
317
  } else if (window.magicDesign.history) {
314
- window.magicDesign.history.push(url);
318
+ window.magicDesign.history.push({
319
+ pathname: h5Url,
320
+ state: state
321
+ });
315
322
  } else if (window.magicDesign.navigatePreUrl) {
316
323
  // 预览模式跳转
317
324
  if (h5Url.startsWith('/')) {
@@ -349,7 +356,7 @@ function goLogin(state, replaceFlag) {
349
356
  var signUrl = isFromSf === 'Y' ? '/sign-in-opt' : '/sign-in';
350
357
 
351
358
  if (replaceFlag) {
352
- Fishx.history.replace({
359
+ window.magicDesign.history.replace({
353
360
  pathname: signUrl,
354
361
  state: state
355
362
  });
@@ -752,7 +759,7 @@ function pushGA(data, eventName) {
752
759
  elementName: data.elementName
753
760
  };
754
761
  console.log('GA push', eventName, eventData);
755
- window.gtag('event', eventName, eventData);
762
+ if (window.gtag) window.gtag('event', eventName, eventData);
756
763
  }
757
764
  } catch (error) {
758
765
  console.error(error);
@@ -341,11 +341,12 @@ var clickUrl = function clickUrl(url) {
341
341
  if ((0, _androidUtil.browserVersion)().isAshitaApp) {
342
342
  (0, _androidUtil.sendToApp)(data);
343
343
  } else if ((0, _androidUtil.browserVersion)().isApp && params.link && params.link.startsWith('http')) {
344
- // 兼容Nuri的 绝对路径跳转
344
+ var urlTemp = "" + params.link + (params.link.includes('?') ? '&' : '?') + "userToken=" + (localStorage.getItem('h5Token') || ''); // 兼容Nuri的 绝对路径跳转
345
+
345
346
  (0, _androidUtil.sendToAndroid)({
346
347
  type: 'jumpBrowser',
347
348
  params: {
348
- url: params.link
349
+ url: urlTemp
349
350
  }
350
351
  });
351
352
  } else {
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.84",
4
+ "version": "2.0.86",
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",
@@ -1 +0,0 @@
1
- .common_functions_second_conf_wrap {}
@@ -1 +0,0 @@
1
- .common_functions_second_conf_wrap {}