@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.
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/common/Field/index.js +20 -3
- package/es/common/ImageLazy/index.js +171 -0
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/es/common/LinkModal/ProductDetailPage/index.js +1 -1
- package/es/composite-comp/bol/components/Location/defaultJSON.js +22 -16
- package/es/composite-comp/bol/components/Location/index.js +20 -58
- package/es/composite-comp/bol/components/Location/index.less +15 -0
- package/es/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/es/constants/component-types.js +6 -2
- package/es/constants/index.js +4 -0
- package/es/constants/layout.js +9 -1
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
- package/es/locale/en/en.json +2 -0
- package/es/locale/es/es.json +2 -0
- package/es/locale/id/id.json +2 -0
- package/es/meta-comp/components/Image/index.js +4 -5
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/Field/index.js +20 -3
- package/lib/common/ImageLazy/index.js +171 -0
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/lib/common/LinkModal/ProductDetailPage/index.js +1 -1
- package/lib/composite-comp/bol/components/Location/defaultJSON.js +22 -16
- package/lib/composite-comp/bol/components/Location/index.js +20 -58
- package/lib/composite-comp/bol/components/Location/index.less +15 -0
- package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/lib/constants/component-types.js +6 -2
- package/lib/constants/index.js +4 -0
- package/lib/constants/layout.js +9 -1
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
- package/lib/locale/en/en.json +2 -0
- package/lib/locale/es/es.json +2 -0
- package/lib/locale/id/id.json +2 -0
- package/lib/meta-comp/components/Image/index.js +4 -5
- package/package.json +1 -1
- package/es/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
- 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
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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'))));
|
package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -275,7 +275,7 @@ function (_super) {
|
|
|
275
275
|
];
|
|
276
276
|
return [4
|
|
277
277
|
/*yield*/
|
|
278
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
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
|
*/
|
package/lib/constants/index.js
CHANGED
package/lib/constants/layout.js
CHANGED
|
@@ -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',
|
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/id/id.json
CHANGED
|
@@ -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(
|
|
196
|
-
|
|
197
|
-
|
|
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,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;
|