@fonixtree/magic-design 2.0.27 → 2.0.29

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 (45) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/common/Field/index.js +20 -3
  3. package/es/common/ImageLazy/index.js +171 -0
  4. package/es/common/LinkModal/CatgTable/index.js +1 -1
  5. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  6. package/es/common/LinkModal/ProductDetailPage/index.js +1 -1
  7. package/es/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  8. package/es/composite-comp/bol/components/Location/index.js +20 -58
  9. package/es/composite-comp/bol/components/Location/index.less +15 -0
  10. package/es/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  11. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  12. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  13. package/es/constants/component-types.js +6 -2
  14. package/es/constants/index.js +4 -0
  15. package/es/constants/layout.js +9 -1
  16. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  17. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  18. package/es/locale/en/en.json +2 -0
  19. package/es/locale/es/es.json +2 -0
  20. package/es/locale/id/id.json +2 -0
  21. package/es/meta-comp/components/Image/index.js +4 -5
  22. package/lib/assets/fonts/.DS_Store +0 -0
  23. package/lib/common/Field/index.js +20 -3
  24. package/lib/common/ImageLazy/index.js +171 -0
  25. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  26. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  27. package/lib/common/LinkModal/ProductDetailPage/index.js +1 -1
  28. package/lib/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  29. package/lib/composite-comp/bol/components/Location/index.js +20 -58
  30. package/lib/composite-comp/bol/components/Location/index.less +15 -0
  31. package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  32. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  33. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  34. package/lib/constants/component-types.js +6 -2
  35. package/lib/constants/index.js +4 -0
  36. package/lib/constants/layout.js +9 -1
  37. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  38. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  39. package/lib/locale/en/en.json +2 -0
  40. package/lib/locale/es/es.json +2 -0
  41. package/lib/locale/id/id.json +2 -0
  42. package/lib/meta-comp/components/Image/index.js +4 -5
  43. package/package.json +1 -1
  44. package/es/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
  45. package/lib/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
@@ -310,17 +310,21 @@ function (_super) {
310
310
 
311
311
  _this.toChat = function () {
312
312
  var storeInfo = _this.state.storeInfo; // 登录情况下,直接跳聊天页
313
-
314
- if (localStorage.getItem('isLogin') === 'Y') {
315
- (0, _commonUtil.navigateTo)("/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount));
316
- } else {
317
- window.magicDesign.history.push({
318
- pathname: '/sign-in',
319
- state: {
320
- redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
321
- }
322
- });
323
- }
313
+ // if (localStorage.getItem('isLogin') === 'Y') {
314
+ // navigateTo(`/chat/${storeInfo?.sysAccount}`);
315
+ // } else {
316
+ // window.magicDesign.history.push({ pathname: '/sign-in', state: { redirectUrl: `/chat/${storeInfo?.sysAccount}` } });
317
+ // }
318
+
319
+ var params = {
320
+ action: 'operation',
321
+ params: {
322
+ type: 'CHAT',
323
+ storeId: storeInfo.storeId,
324
+ sysAccount: storeInfo.sysAccount
325
+ }
326
+ };
327
+ window.magicDesign.handleAction(params);
324
328
  };
325
329
 
326
330
  return _this;
@@ -383,7 +387,7 @@ function (_super) {
383
387
  src: _star["default"]
384
388
  })), /*#__PURE__*/_react["default"].createElement("div", {
385
389
  className: "number"
386
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
387
391
  className: "chat-btn",
388
392
  onClick: this.toChat
389
393
  }, (0, _locale.i18n)('CHAT'))));
@@ -275,7 +275,7 @@ function (_super) {
275
275
  ];
276
276
  return [4
277
277
  /*yield*/
278
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
278
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
279
279
 
280
280
  case 3:
281
281
  res = _a.sent();
@@ -29,6 +29,8 @@ var _Wallet = _interopRequireDefault(require("../composite-comp/bol/components/W
29
29
 
30
30
  var _CustomCode = _interopRequireDefault(require("../composite-comp/bol/components/CustomCode"));
31
31
 
32
+ var _Location = _interopRequireDefault(require("../composite-comp/bol/components/Location"));
33
+
32
34
  var _FlashDeal = _interopRequireDefault(require("../composite-comp/dito/components/FlashDeal"));
33
35
 
34
36
  var _SearchBar = _interopRequireDefault(require("../composite-comp/dito/components/SearchBar"));
@@ -63,6 +65,8 @@ var _VideoConfig = _interopRequireDefault(require("../composite-comp/bol/config-
63
65
 
64
66
  var _CustomCodeConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/CustomCodeConfig"));
65
67
 
68
+ var _LocationConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/LocationConfig"));
69
+
66
70
  var _WalletConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/WalletConfig"));
67
71
 
68
72
  var _FlashDealConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/FlashDealConfig"));
@@ -109,13 +113,13 @@ var _a, _b, _c; // 组件
109
113
  /**
110
114
  * 渲染组件索引
111
115
  */
112
- var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a);
116
+ var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a[_Location["default"].type] = _Location["default"], _a);
113
117
  /**
114
118
  * 一级配置面板索引
115
119
  */
116
120
 
117
121
  exports.componentMap = componentMap;
118
- var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b);
122
+ var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b[_Location["default"].type] = _LocationConfig["default"], _b);
119
123
  /**
120
124
  * 二级配置面板索引
121
125
  */
@@ -129,6 +129,10 @@ var compInfoMap = {
129
129
  name: 'Image and Text',
130
130
  icon: 'icon-filled-image'
131
131
  },
132
+ LOCATION: {
133
+ name: 'Location',
134
+ icon: 'icon-location'
135
+ },
132
136
  CUSTOM_CODE: {
133
137
  name: 'Custom Code',
134
138
  icon: 'icon-html'
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.videoPCLayout = exports.videoH5Layout = exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.pcNavigationLayout = exports.newsletterLayout = exports.mobileNavigationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = exports.WalletLayout = void 0;
6
+ exports.videoPCLayout = exports.videoH5Layout = exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.pcNavigationLayout = exports.newsletterLayout = exports.mobileNavigationLayout = exports.locationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = exports.WalletLayout = void 0;
7
7
 
8
8
  var _dividerLayout = _interopRequireDefault(require("../assets/images/layout-icon/dividerLayout.svg"));
9
9
 
@@ -43,6 +43,8 @@ var _imageTextRight = _interopRequireDefault(require("../assets/images/layout-ic
43
43
 
44
44
  var _newsletter = _interopRequireDefault(require("../assets/images/layout-icon/newsletter.svg"));
45
45
 
46
+ var _locationLayout = _interopRequireDefault(require("../assets/images/layout-icon/locationLayout.png"));
47
+
46
48
  var _layoutRecommend = _interopRequireDefault(require("../assets/images/layout-icon/layout-recommend-1.png"));
47
49
 
48
50
  var _layoutRecommend2 = _interopRequireDefault(require("../assets/images/layout-icon/layout-recommend-2.png"));
@@ -90,6 +92,12 @@ var searchLayout = [{
90
92
  image: _layoutSearch["default"]
91
93
  }];
92
94
  exports.searchLayout = searchLayout;
95
+ var locationLayout = [{
96
+ id: 'top',
97
+ name: 'top',
98
+ image: _locationLayout["default"]
99
+ }];
100
+ exports.locationLayout = locationLayout;
93
101
  var imageGalleryLayout = [{
94
102
  id: 'layout1',
95
103
  name: 'layout1',
@@ -89,7 +89,7 @@ function (_super) {
89
89
  }), /*#__PURE__*/_react["default"].createElement("span", {
90
90
  className: "commit-btn",
91
91
  onClick: this.onCommit
92
- }, "\u786E\u5B9A"))));
92
+ }, "Confirm"))));
93
93
  };
94
94
 
95
95
  return LinkInputPicker;
@@ -89,7 +89,7 @@ function (_super) {
89
89
  }), /*#__PURE__*/_react["default"].createElement("span", {
90
90
  className: "commit-btn",
91
91
  onClick: this.onCommit
92
- }, "\u786E\u5B9A"))));
92
+ }, "Confirm"))));
93
93
  };
94
94
 
95
95
  return LinkInputPicker;
@@ -1,4 +1,6 @@
1
1
  {
2
+ "ADDRESS": "Address",
3
+ "LOCATION_LOGO": "Location Logo",
2
4
  "MESSAGE_ICON": "Message icon",
3
5
  "CART_ICON": "Cart icon",
4
6
  "RECOMMENDED_SIZE": "Recommended Size",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "ADDRESS": "Address",
3
+ "LOCATION_LOGO": "Location Logo",
2
4
  "MESSAGE_ICON": "Message icon",
3
5
  "CART_ICON": "Cart icon",
4
6
  "RECOMMENDED_SIZE": "Recommended Size",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "ADDRESS": "Address",
3
+ "LOCATION_LOGO": "Location Logo",
2
4
  "MESSAGE_ICON": "Message icon",
3
5
  "CART_ICON": "Cart icon",
4
6
  "RECOMMENDED_SIZE": "Recommended Size",
@@ -21,8 +21,6 @@ var _commonUtil = require("../../../utils/commonUtil");
21
21
 
22
22
  var _decorator = require("../../../decorator");
23
23
 
24
- var _ImageLazy = _interopRequireDefault(require("../../../common/ImageLazy"));
25
-
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
25
 
28
26
  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); }
@@ -192,9 +190,10 @@ function (_super) {
192
190
  onClick: function onClick() {
193
191
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
194
192
  }
195
- }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_ImageLazy["default"], {
196
- onLoadFunc: function onLoadFunc(clientWidth) {
197
- var scale = clientWidth / 600;
193
+ }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
194
+ ref: this.imgRef,
195
+ onLoad: function onLoad() {
196
+ var scale = _this.imgRef.current.clientWidth / 600;
198
197
 
199
198
  _this.setState({
200
199
  scale: scale
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.27",
4
+ "version": "2.0.29",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactAce = _interopRequireDefault(require("react-ace"));
11
-
12
- require("ace-builds/src-noconflict/mode-html");
13
-
14
- require("ace-builds/src-noconflict/mode-javascript");
15
-
16
- require("ace-builds/src-noconflict/theme-github");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- // 可选的主题样式
21
- var MyEditor = function MyEditor(props) {
22
- var value = props.value,
23
- changeVal = props.changeVal,
24
- blurArea = props.blurArea;
25
- return /*#__PURE__*/_react["default"].createElement(_reactAce["default"], {
26
- editorProps: {
27
- $blockScrolling: true
28
- },
29
- mode: "html",
30
- name: "editor",
31
- onBlur: blurArea,
32
- onChange: changeVal,
33
- style: {
34
- width: '100%'
35
- },
36
- theme: "github",
37
- value: value
38
- });
39
- };
40
-
41
- var _default = MyEditor;
42
- exports["default"] = _default;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactAce = _interopRequireDefault(require("react-ace"));
11
-
12
- require("ace-builds/src-noconflict/mode-html");
13
-
14
- require("ace-builds/src-noconflict/mode-javascript");
15
-
16
- require("ace-builds/src-noconflict/theme-github");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- // 可选的主题样式
21
- var MyEditor = function MyEditor(props) {
22
- var value = props.value,
23
- changeVal = props.changeVal,
24
- blurArea = props.blurArea;
25
- return /*#__PURE__*/_react["default"].createElement(_reactAce["default"], {
26
- editorProps: {
27
- $blockScrolling: true
28
- },
29
- mode: "html",
30
- name: "editor",
31
- onBlur: blurArea,
32
- onChange: changeVal,
33
- style: {
34
- width: '100%'
35
- },
36
- theme: "github",
37
- value: value
38
- });
39
- };
40
-
41
- var _default = MyEditor;
42
- exports["default"] = _default;