@fonixtree/magic-design 2.0.28 → 2.0.30

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 (47) hide show
  1. package/es/common/Field/index.js +20 -3
  2. package/es/common/LinkModal/CatgTable/index.js +1 -1
  3. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  4. package/es/common/LinkModal/ProductDetailPage/index.js +1 -1
  5. package/es/composite-comp/bol/components/Carousel/index.js +34 -3
  6. package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
  7. package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  8. package/es/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  9. package/es/composite-comp/bol/components/Location/index.js +20 -58
  10. package/es/composite-comp/bol/components/Location/index.less +15 -0
  11. package/es/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  12. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  13. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  14. package/es/constants/component-types.js +6 -2
  15. package/es/constants/index.js +4 -0
  16. package/es/constants/layout.js +9 -1
  17. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  18. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  19. package/es/locale/en/en.json +2 -0
  20. package/es/locale/es/es.json +2 -0
  21. package/es/locale/id/id.json +2 -0
  22. package/es/meta-comp/components/Image/index.js +18 -3
  23. package/lib/common/Field/index.js +20 -3
  24. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  25. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  26. package/lib/common/LinkModal/ProductDetailPage/index.js +1 -1
  27. package/lib/composite-comp/bol/components/Carousel/index.js +34 -3
  28. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
  29. package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  30. package/lib/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  31. package/lib/composite-comp/bol/components/Location/index.js +20 -58
  32. package/lib/composite-comp/bol/components/Location/index.less +15 -0
  33. package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  34. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  35. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  36. package/lib/constants/component-types.js +6 -2
  37. package/lib/constants/index.js +4 -0
  38. package/lib/constants/layout.js +9 -1
  39. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  40. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  41. package/lib/locale/en/en.json +2 -0
  42. package/lib/locale/es/es.json +2 -0
  43. package/lib/locale/id/id.json +2 -0
  44. package/lib/meta-comp/components/Image/index.js +18 -3
  45. package/package.json +1 -1
  46. package/es/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
  47. package/lib/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
@@ -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",
@@ -167,7 +167,8 @@ function (_super) {
167
167
  var _c = this.props,
168
168
  data = _c.data,
169
169
  isBackground = _c.isBackground,
170
- hoverState = _c.hoverState;
170
+ hoverState = _c.hoverState,
171
+ notNeedLazy = _c.notNeedLazy;
171
172
  var hoverImgSrc = this.state.hoverImgSrc; // const { hoverSrc } = this.state;
172
173
  // console.log('--metaImage ', this.props);
173
174
 
@@ -192,7 +193,20 @@ function (_super) {
192
193
  onClick: function onClick() {
193
194
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
194
195
  }
195
- }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_ImageLazy["default"], {
196
+ }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, notNeedLazy ? /*#__PURE__*/_react["default"].createElement("img", {
197
+ ref: this.imgRef,
198
+ onLoad: function onLoad() {
199
+ var scale = _this.imgRef.current.clientWidth / 600;
200
+
201
+ _this.setState({
202
+ scale: scale
203
+ });
204
+ },
205
+ onMouseEnter: this.mouseEnterImg,
206
+ onMouseLeave: this.mouseLeaveImg,
207
+ src: srcImg,
208
+ style: (0, _commonUtil.pxToRem)(this.getStyle())
209
+ }) : /*#__PURE__*/_react["default"].createElement(_ImageLazy["default"], {
196
210
  onLoadFunc: function onLoadFunc(clientWidth) {
197
211
  var scale = clientWidth / 600;
198
212
 
@@ -231,7 +245,8 @@ function (_super) {
231
245
  isBackground: false,
232
246
  hoverState: false,
233
247
  limitWidthHeight: false,
234
- scale: 1
248
+ scale: 1,
249
+ notNeedLazy: false
235
250
  };
236
251
  Image = __decorate([_decorator.metaDecorator], Image);
237
252
  return Image;
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.28",
4
+ "version": "2.0.30",
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;