@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
|
Binary file
|
package/es/common/Field/index.js
CHANGED
|
@@ -13,6 +13,8 @@ require("./index.less");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
17
19
|
var _extendStatics = function extendStatics(d, b) {
|
|
18
20
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -39,6 +41,19 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
41
|
};
|
|
40
42
|
}();
|
|
41
43
|
|
|
44
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
45
|
+
var t = {};
|
|
46
|
+
|
|
47
|
+
for (var p in s) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
|
|
42
57
|
var Field =
|
|
43
58
|
/** @class */
|
|
44
59
|
function (_super) {
|
|
@@ -53,13 +68,15 @@ function (_super) {
|
|
|
53
68
|
title = _a.title,
|
|
54
69
|
children = _a.children,
|
|
55
70
|
layout = _a.layout,
|
|
56
|
-
split = _a.split
|
|
57
|
-
|
|
71
|
+
split = _a.split,
|
|
72
|
+
rest = __rest(_a, ["title", "children", "layout", "split"]);
|
|
73
|
+
|
|
74
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
58
75
|
className: (0, _classnames["default"])('m-field', {
|
|
59
76
|
split: split,
|
|
60
77
|
bold: split === 'bold'
|
|
61
78
|
})
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
}, rest), /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
80
|
className: (0, _classnames["default"])('field-item', {
|
|
64
81
|
horizontal: layout === 'horizontal'
|
|
65
82
|
})
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
51
|
+
__assign = Object.assign || function (t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
|
|
55
|
+
for (var p in s) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return __assign.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
67
|
+
var t = {};
|
|
68
|
+
|
|
69
|
+
for (var p in s) {
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
74
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
75
|
+
}
|
|
76
|
+
return t;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// import styles from './index.less';
|
|
80
|
+
var ImageLazy =
|
|
81
|
+
/** @class */
|
|
82
|
+
function (_super) {
|
|
83
|
+
__extends(ImageLazy, _super);
|
|
84
|
+
|
|
85
|
+
function ImageLazy() {
|
|
86
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
+
|
|
88
|
+
_this.state = {
|
|
89
|
+
show: false
|
|
90
|
+
};
|
|
91
|
+
_this.imageRef = /*#__PURE__*/_react["default"].createRef();
|
|
92
|
+
_this.intersectionObserver = null;
|
|
93
|
+
return _this;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
ImageLazy.prototype.componentDidMount = function () {
|
|
97
|
+
var _this = this;
|
|
98
|
+
|
|
99
|
+
var _a;
|
|
100
|
+
|
|
101
|
+
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
102
|
+
if (entries[0].isIntersecting) {
|
|
103
|
+
_this.setState({
|
|
104
|
+
show: true
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
root: (_a = this.props) === null || _a === void 0 ? void 0 : _a.rootContainer(),
|
|
109
|
+
// threshold: 0.8,
|
|
110
|
+
rootMargin: '0px 0px 100px 0px'
|
|
111
|
+
});
|
|
112
|
+
this.intersectionObserver.observe(this.imageRef.current);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
ImageLazy.prototype.componentWillUnmount = function () {
|
|
116
|
+
this.intersectionObserver.disconnect(this.imageRef.current);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
ImageLazy.prototype.render = function () {
|
|
120
|
+
var _this = this;
|
|
121
|
+
|
|
122
|
+
var _a = this.props,
|
|
123
|
+
root = _a.root,
|
|
124
|
+
_b = _a.lazy,
|
|
125
|
+
lazy = _b === void 0 ? true : _b,
|
|
126
|
+
src = _a.src,
|
|
127
|
+
onLoadFunc = _a.onLoadFunc,
|
|
128
|
+
style = _a.style,
|
|
129
|
+
className = _a.className,
|
|
130
|
+
rest = __rest(_a, ["root", "lazy", "src", "onLoadFunc", "style", "className"]);
|
|
131
|
+
|
|
132
|
+
var show = this.state.show;
|
|
133
|
+
var isShow = lazy ? show : true;
|
|
134
|
+
return /*#__PURE__*/_react["default"].createElement("img", _extends({
|
|
135
|
+
ref: this.imageRef,
|
|
136
|
+
alt: "",
|
|
137
|
+
className: (0, _classnames["default"])(className),
|
|
138
|
+
onLoad: function onLoad() {
|
|
139
|
+
if (onLoadFunc) {
|
|
140
|
+
onLoadFunc(_this.imageRef.current.clientWidth);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
src: isShow ? src : '',
|
|
144
|
+
style: __assign({
|
|
145
|
+
opacity: ~~isShow
|
|
146
|
+
}, style)
|
|
147
|
+
}, rest));
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
return ImageLazy;
|
|
151
|
+
}(_react.Component);
|
|
152
|
+
|
|
153
|
+
ImageLazy.propTypes = {
|
|
154
|
+
/** 外层容器 */
|
|
155
|
+
rootContainer: _propTypes["default"].func,
|
|
156
|
+
|
|
157
|
+
/** src */
|
|
158
|
+
src: _propTypes["default"].string,
|
|
159
|
+
|
|
160
|
+
/** 懒加载 */
|
|
161
|
+
lazy: _propTypes["default"].bool
|
|
162
|
+
};
|
|
163
|
+
ImageLazy.defaultProps = {
|
|
164
|
+
rootContainer: function rootContainer() {
|
|
165
|
+
return null;
|
|
166
|
+
},
|
|
167
|
+
lazy: true,
|
|
168
|
+
src: ''
|
|
169
|
+
};
|
|
170
|
+
var _default = ImageLazy;
|
|
171
|
+
exports["default"] = _default;
|
|
@@ -184,7 +184,7 @@ function CatgTable(props) {
|
|
|
184
184
|
setLoading(true);
|
|
185
185
|
return [4
|
|
186
186
|
/*yield*/
|
|
187
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
187
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
188
188
|
|
|
189
189
|
case 1:
|
|
190
190
|
res = _a.sent();
|
|
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
346
346
|
case 0:
|
|
347
347
|
return [4
|
|
348
348
|
/*yield*/
|
|
349
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
349
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
350
350
|
|
|
351
351
|
case 1:
|
|
352
352
|
res = _a.sent();
|
|
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
368
368
|
case 0:
|
|
369
369
|
return [4
|
|
370
370
|
/*yield*/
|
|
371
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
371
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
|
|
372
372
|
|
|
373
373
|
case 1:
|
|
374
374
|
res = _a.sent();
|
|
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
309
309
|
case 0:
|
|
310
310
|
return [4
|
|
311
311
|
/*yield*/
|
|
312
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
|
|
313
313
|
|
|
314
314
|
case 1:
|
|
315
315
|
res = _a.sent();
|
|
@@ -8,21 +8,26 @@ exports.getDefaultJSON = void 0;
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
10
|
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
11
12
|
return {
|
|
12
|
-
id:
|
|
13
|
+
id: groupId,
|
|
13
14
|
type: 'LOCATION',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
logo: {
|
|
16
|
+
parentId: groupId,
|
|
17
|
+
id: (0, _uuid.v4)(),
|
|
18
|
+
open: true,
|
|
19
|
+
color: '#fff'
|
|
20
|
+
},
|
|
21
|
+
address: {
|
|
22
|
+
parentId: groupId,
|
|
23
|
+
id: (0, _uuid.v4)(),
|
|
24
|
+
open: true
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
parentId: groupId,
|
|
28
|
+
id: (0, _uuid.v4)(),
|
|
29
|
+
open: true,
|
|
30
|
+
color: '#fff'
|
|
26
31
|
},
|
|
27
32
|
spacing: {
|
|
28
33
|
pc: {
|
|
@@ -31,8 +36,9 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
31
36
|
marginBottom: 0
|
|
32
37
|
},
|
|
33
38
|
mobile: {
|
|
34
|
-
paddingTop:
|
|
35
|
-
paddingBottom:
|
|
39
|
+
paddingTop: 12,
|
|
40
|
+
paddingBottom: 12,
|
|
41
|
+
paddingLeft: 12,
|
|
36
42
|
marginBottom: 0
|
|
37
43
|
}
|
|
38
44
|
},
|
|
@@ -44,7 +50,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
44
50
|
},
|
|
45
51
|
background: {
|
|
46
52
|
opacity: 100,
|
|
47
|
-
color: '#
|
|
53
|
+
color: '#597EF7',
|
|
48
54
|
image: '',
|
|
49
55
|
bgType: 'color'
|
|
50
56
|
}
|
|
@@ -9,9 +9,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _defaultJSON = require("./defaultJSON");
|
|
11
11
|
|
|
12
|
+
var _common = require("../../../../common");
|
|
13
|
+
|
|
12
14
|
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
require("./index.less");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
@@ -63,68 +65,28 @@ function (_super) {
|
|
|
63
65
|
__extends(CustomCode, _super);
|
|
64
66
|
|
|
65
67
|
function CustomCode() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
_this.htmlTemp = ''; // createHtml = () => {
|
|
69
|
-
// const { nodeData } = this.props;
|
|
70
|
-
// const htmlCode = window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html;
|
|
71
|
-
// this.htmlTemp = htmlCode;
|
|
72
|
-
// if (document.getElementById('custom-wrap')) {
|
|
73
|
-
// document.getElementById('custom-wrap').innerHTML = htmlCode;
|
|
74
|
-
// }
|
|
75
|
-
// }
|
|
76
|
-
|
|
77
|
-
_this.handleClick = function (e) {
|
|
78
|
-
console.log(e.target.getAttribute('href'));
|
|
79
|
-
(0, _coreUtil.clickUrl)(e.target.getAttribute('href'));
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return _this;
|
|
68
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
83
69
|
}
|
|
84
70
|
|
|
85
|
-
CustomCode.prototype.componentDidMount = function () {
|
|
86
|
-
var _this = this;
|
|
87
|
-
|
|
88
|
-
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
89
|
-
aElements.forEach(function (element) {
|
|
90
|
-
element.addEventListener('click', _this.handleClick);
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
CustomCode.prototype.componentWillUnmount = function () {
|
|
95
|
-
var _this = this;
|
|
96
|
-
|
|
97
|
-
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
98
|
-
aElements.forEach(function (element) {
|
|
99
|
-
element.removeEventListener('click', _this.handleClick);
|
|
100
|
-
});
|
|
101
|
-
}; // componentWillReceiveProps(prevProps) {
|
|
102
|
-
// console.log('111111');
|
|
103
|
-
// if (window.magicDesign.device === 'pc') {
|
|
104
|
-
// console.log('22222222');
|
|
105
|
-
// if (prevProps.nodeData.content.pcHtml != this.props.nodeData.content.pcHtml) {
|
|
106
|
-
// console.log('4444444');
|
|
107
|
-
// this.createHtml();
|
|
108
|
-
// }
|
|
109
|
-
// } else {
|
|
110
|
-
// console.log('3333333333', this.htmlTemp, this.props.nodeData.content);
|
|
111
|
-
// if (this.htmlTemp != this.props.nodeData.content.h5Html) {
|
|
112
|
-
// console.log('5555555');
|
|
113
|
-
// this.createHtml();
|
|
114
|
-
// }
|
|
115
|
-
// }
|
|
116
|
-
// }
|
|
117
|
-
|
|
71
|
+
CustomCode.prototype.componentDidMount = function () {};
|
|
118
72
|
|
|
119
73
|
CustomCode.prototype.render = function () {
|
|
120
74
|
var nodeData = this.props.nodeData;
|
|
121
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
-
|
|
123
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
75
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
+
className: "location-mobile"
|
|
77
|
+
}, nodeData.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
78
|
+
className: "logo",
|
|
79
|
+
color: nodeData.logo.color,
|
|
80
|
+
size: 20,
|
|
81
|
+
type: "icon-MapPin"
|
|
82
|
+
}), nodeData.address.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
+
className: "address"
|
|
84
|
+
}, "Display Location Address"), nodeData.icon.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
85
|
+
className: "logo",
|
|
86
|
+
color: nodeData.icon.color,
|
|
87
|
+
size: 16,
|
|
88
|
+
type: "icon-outlined-right"
|
|
89
|
+
})));
|
|
128
90
|
};
|
|
129
91
|
|
|
130
92
|
CustomCode.defaultProps = {};
|
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _common = require("../../../../common");
|
|
11
11
|
|
|
12
12
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
13
13
|
|
|
@@ -53,32 +53,62 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
53
53
|
};
|
|
54
54
|
}();
|
|
55
55
|
|
|
56
|
-
var
|
|
56
|
+
var LocationConfig =
|
|
57
57
|
/** @class */
|
|
58
58
|
function (_super) {
|
|
59
|
-
__extends(
|
|
59
|
+
__extends(LocationConfig, _super);
|
|
60
60
|
|
|
61
|
-
function
|
|
61
|
+
function LocationConfig() {
|
|
62
62
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
63
|
|
|
64
|
-
_this.
|
|
64
|
+
_this.getContentPanel = function () {
|
|
65
65
|
var data = _this.props.data;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
var source = [{
|
|
67
|
+
key: data.logo.id,
|
|
68
|
+
name: (0, _locale.i18n)('LOCATION_LOGO'),
|
|
69
|
+
value: /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
70
|
+
colorType: "rgba",
|
|
71
|
+
onChange: function onChange(v) {
|
|
72
|
+
data.logo.color = v;
|
|
73
|
+
|
|
74
|
+
_this.selfRender();
|
|
75
|
+
},
|
|
76
|
+
value: data.logo.color
|
|
77
|
+
})),
|
|
78
|
+
metaOption: data.logo
|
|
79
|
+
}, {
|
|
80
|
+
key: data.address.id,
|
|
81
|
+
name: (0, _locale.i18n)('ADDRESS'),
|
|
82
|
+
metaOption: data.address
|
|
83
|
+
}, {
|
|
84
|
+
key: data.icon.id,
|
|
85
|
+
name: (0, _locale.i18n)('ICON'),
|
|
86
|
+
value: /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
87
|
+
colorType: "rgba",
|
|
88
|
+
onChange: function onChange(v) {
|
|
89
|
+
data.icon.color = v;
|
|
90
|
+
|
|
91
|
+
_this.selfRender();
|
|
92
|
+
},
|
|
93
|
+
value: data.icon.color
|
|
94
|
+
})),
|
|
95
|
+
metaOption: data.icon
|
|
96
|
+
}];
|
|
97
|
+
return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
98
|
+
headerSize: "middle",
|
|
99
|
+
onRefresh: function onRefresh() {
|
|
100
|
+
return (0, _coreUtil.renderPreview)();
|
|
101
|
+
},
|
|
102
|
+
showActiveColor: true,
|
|
103
|
+
source: source,
|
|
104
|
+
type: "switch"
|
|
105
|
+
});
|
|
76
106
|
};
|
|
77
107
|
|
|
78
108
|
return _this;
|
|
79
109
|
}
|
|
80
110
|
|
|
81
|
-
|
|
111
|
+
LocationConfig.prototype.render = function () {
|
|
82
112
|
var data = this.props.data;
|
|
83
113
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
84
114
|
divider: "bold",
|
|
@@ -86,11 +116,7 @@ function (_super) {
|
|
|
86
116
|
source: [{
|
|
87
117
|
key: 'content',
|
|
88
118
|
name: (0, _locale.i18n)('CONTENT'),
|
|
89
|
-
value:
|
|
90
|
-
blurArea: this.blurArea,
|
|
91
|
-
changeVal: this.changeVal,
|
|
92
|
-
value: (0, _coreUtil.isPc)() ? data.content.pcHtml : data.content.h5Html
|
|
93
|
-
})
|
|
119
|
+
value: this.getContentPanel()
|
|
94
120
|
}, {
|
|
95
121
|
key: 'spacing',
|
|
96
122
|
name: (0, _locale.i18n)('SPACING'),
|
|
@@ -102,6 +128,7 @@ function (_super) {
|
|
|
102
128
|
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
103
129
|
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
104
130
|
data: data.customize,
|
|
131
|
+
isHideAlign: true,
|
|
105
132
|
layoutSource: _layout.locationLayout
|
|
106
133
|
})
|
|
107
134
|
}, {
|
|
@@ -115,8 +142,8 @@ function (_super) {
|
|
|
115
142
|
}));
|
|
116
143
|
};
|
|
117
144
|
|
|
118
|
-
return
|
|
145
|
+
return LocationConfig;
|
|
119
146
|
}(_BaseConfig["default"]);
|
|
120
147
|
|
|
121
|
-
var _default =
|
|
148
|
+
var _default = LocationConfig;
|
|
122
149
|
exports["default"] = _default;
|
|
@@ -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/es/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/es/constants/index.js
CHANGED