@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.
- package/es/common/Field/index.js +20 -3
- 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/Carousel/index.js +34 -3
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
- package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- 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 +18 -3
- package/lib/common/Field/index.js +20 -3
- 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/Carousel/index.js +34 -3
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- 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 +18 -3
- 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
package/es/locale/id/id.json
CHANGED
|
@@ -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(
|
|
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;
|
|
@@ -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
|
})
|
|
@@ -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();
|
|
@@ -65,16 +65,47 @@ function (_super) {
|
|
|
65
65
|
__extends(Carousel, _super);
|
|
66
66
|
|
|
67
67
|
function Carousel() {
|
|
68
|
-
|
|
68
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
69
|
+
|
|
70
|
+
_this.state = {
|
|
71
|
+
show: false
|
|
72
|
+
};
|
|
73
|
+
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
74
|
+
_this.intersectionObserver = null;
|
|
75
|
+
return _this;
|
|
69
76
|
}
|
|
70
77
|
|
|
78
|
+
Carousel.prototype.componentDidMount = function () {
|
|
79
|
+
var _this = this;
|
|
80
|
+
|
|
81
|
+
this.intersectionObserver = new IntersectionObserver(function (entries) {
|
|
82
|
+
if (entries[0].isIntersecting) {
|
|
83
|
+
_this.setState({
|
|
84
|
+
show: true
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
root: null,
|
|
89
|
+
// threshold: 0.8,
|
|
90
|
+
rootMargin: '0px 0px 100px 0px'
|
|
91
|
+
});
|
|
92
|
+
this.intersectionObserver.observe(this.carouselRef.current);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
Carousel.prototype.componentWillUnmount = function () {
|
|
96
|
+
this.intersectionObserver.disconnect(this.carouselRef.current);
|
|
97
|
+
};
|
|
98
|
+
|
|
71
99
|
Carousel.prototype.render = function () {
|
|
72
100
|
var nodeData = this.props.nodeData;
|
|
73
|
-
|
|
101
|
+
var show = this.state.show;
|
|
102
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
ref: this.carouselRef
|
|
104
|
+
}, show && (window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
74
105
|
data: nodeData
|
|
75
106
|
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
76
107
|
data: nodeData
|
|
77
|
-
}));
|
|
108
|
+
})));
|
|
78
109
|
};
|
|
79
110
|
|
|
80
111
|
Carousel.defaultProps = {};
|
|
@@ -247,7 +247,8 @@ function (_super) {
|
|
|
247
247
|
GAData: __assign(__assign({}, GAData), {
|
|
248
248
|
groupId: item.id,
|
|
249
249
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
250
|
-
})
|
|
250
|
+
}),
|
|
251
|
+
notNeedLazy: true
|
|
251
252
|
})), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
252
253
|
className: "title"
|
|
253
254
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -272,7 +273,8 @@ function (_super) {
|
|
|
272
273
|
groupId: item.id,
|
|
273
274
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
274
275
|
}),
|
|
275
|
-
maxHeight: 20
|
|
276
|
+
maxHeight: 20,
|
|
277
|
+
notNeedLazy: true
|
|
276
278
|
}), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
277
279
|
data: item.buttonTag,
|
|
278
280
|
GAData: __assign(__assign({}, GAData), {
|
|
@@ -280,7 +280,8 @@ function (_super) {
|
|
|
280
280
|
}),
|
|
281
281
|
maxHeight: item.image.content.pcImgSrc ? 'unset' : PC_IMG_SIZE[floorColNum].defH,
|
|
282
282
|
minHeight: PC_IMG_SIZE[floorColNum].minH,
|
|
283
|
-
minWidth: PC_IMG_SIZE[floorColNum].minW
|
|
283
|
+
minWidth: PC_IMG_SIZE[floorColNum].minW,
|
|
284
|
+
notNeedLazy: true
|
|
284
285
|
})), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
285
286
|
className: "title"
|
|
286
287
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -305,7 +306,8 @@ function (_super) {
|
|
|
305
306
|
groupId: item.id,
|
|
306
307
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
307
308
|
}),
|
|
308
|
-
maxHeight: 30
|
|
309
|
+
maxHeight: 30,
|
|
310
|
+
notNeedLazy: true
|
|
309
311
|
}), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
310
312
|
data: item.buttonTag,
|
|
311
313
|
GAData: __assign(__assign({}, GAData), {
|
|
@@ -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/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