@fonixtree/magic-design 1.0.212 → 1.0.214
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/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +24 -2
- package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +24 -0
- package/es/meta-comp/components/Image/index.js +7 -1
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +24 -2
- package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +24 -0
- package/lib/meta-comp/components/Image/index.js +7 -1
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
67
67
|
return {
|
|
68
68
|
id: (0, _uuid.v4)(),
|
|
69
69
|
type: 'COMMON_FUNCTIONS',
|
|
70
|
-
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/
|
|
70
|
+
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/message-chat')],
|
|
71
71
|
spacing: {
|
|
72
72
|
pc: {
|
|
73
73
|
paddingTop: 0,
|
|
@@ -60,12 +60,34 @@ function (_super) {
|
|
|
60
60
|
_this.state = {};
|
|
61
61
|
|
|
62
62
|
_this.onItemClick = function (item) {
|
|
63
|
+
var _a;
|
|
64
|
+
|
|
63
65
|
var url = (0, _commonUtil.ensure)(function () {
|
|
64
66
|
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
65
67
|
}, '');
|
|
66
68
|
|
|
67
|
-
if (url === '/
|
|
68
|
-
(
|
|
69
|
+
if (url === '/message-chat' || url === '/ai-chat') {
|
|
70
|
+
var chatbotConfig = (_a = JSON.parse(window.ecommerce.chatbotConfig)) !== null && _a !== void 0 ? _a : {};
|
|
71
|
+
var version = chatbotConfig.version,
|
|
72
|
+
isNeedLogin = chatbotConfig.isNeedLogin;
|
|
73
|
+
var urlTemp = '';
|
|
74
|
+
|
|
75
|
+
if (version === 'v1') {
|
|
76
|
+
urlTemp = '/message-chat';
|
|
77
|
+
} else {
|
|
78
|
+
urlTemp = '/ai-chat';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (version === 'v1' || isNeedLogin) {
|
|
82
|
+
if ((0, _commonUtil.checkLogin)(true, urlTemp)) {
|
|
83
|
+
(0, _commonUtil.navigateTo)(urlTemp);
|
|
84
|
+
} else {
|
|
85
|
+
(0, _commonUtil.navigateTo)(urlTemp);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
(0, _commonUtil.navigateTo)(url);
|
|
89
|
+
}
|
|
90
|
+
|
|
69
91
|
return;
|
|
70
92
|
}
|
|
71
93
|
|
|
@@ -119,6 +119,29 @@ function (_super) {
|
|
|
119
119
|
return __assign({}, wrapStyle);
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
+
_this.clickChat = function () {
|
|
123
|
+
var _a;
|
|
124
|
+
|
|
125
|
+
var chatbotConfig = (_a = JSON.parse(window.ecommerce.chatbotConfig)) !== null && _a !== void 0 ? _a : {};
|
|
126
|
+
var version = chatbotConfig.version,
|
|
127
|
+
isNeedLogin = chatbotConfig.isNeedLogin;
|
|
128
|
+
var url = '';
|
|
129
|
+
|
|
130
|
+
if (version === 'v1') {
|
|
131
|
+
url = '/message-chat';
|
|
132
|
+
} else {
|
|
133
|
+
url = '/ai-chat';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (version === 'v1' || isNeedLogin) {
|
|
137
|
+
if ((0, _commonUtil.checkLogin)(true, url)) {
|
|
138
|
+
navigateTo(url);
|
|
139
|
+
} else {
|
|
140
|
+
navigateTo(url);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
122
145
|
return _this;
|
|
123
146
|
}
|
|
124
147
|
|
|
@@ -185,6 +208,7 @@ function (_super) {
|
|
|
185
208
|
}
|
|
186
209
|
}), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
187
210
|
className: "right-icon",
|
|
211
|
+
click: this.clickChat,
|
|
188
212
|
data: data.content.chatbotIcon,
|
|
189
213
|
style: {
|
|
190
214
|
width: '32px',
|
|
@@ -178,7 +178,8 @@ function (_super) {
|
|
|
178
178
|
imgCover = _e.imgCover,
|
|
179
179
|
hoverState = _e.hoverState,
|
|
180
180
|
notNeedLazy = _e.notNeedLazy,
|
|
181
|
-
square = _e.square
|
|
181
|
+
square = _e.square,
|
|
182
|
+
click = _e.click;
|
|
182
183
|
var hoverImgSrc = this.state.hoverImgSrc; // const { hoverSrc } = this.state;
|
|
183
184
|
// console.log('--metaImage ', this.props);
|
|
184
185
|
|
|
@@ -202,6 +203,11 @@ function (_super) {
|
|
|
202
203
|
cover: imgCover
|
|
203
204
|
}),
|
|
204
205
|
onClick: function onClick() {
|
|
206
|
+
if (click) {
|
|
207
|
+
click();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
205
211
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
206
212
|
}
|
|
207
213
|
}, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, notNeedLazy ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -67,7 +67,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
67
67
|
return {
|
|
68
68
|
id: (0, _uuid.v4)(),
|
|
69
69
|
type: 'COMMON_FUNCTIONS',
|
|
70
|
-
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/
|
|
70
|
+
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/message-chat')],
|
|
71
71
|
spacing: {
|
|
72
72
|
pc: {
|
|
73
73
|
paddingTop: 0,
|
|
@@ -60,12 +60,34 @@ function (_super) {
|
|
|
60
60
|
_this.state = {};
|
|
61
61
|
|
|
62
62
|
_this.onItemClick = function (item) {
|
|
63
|
+
var _a;
|
|
64
|
+
|
|
63
65
|
var url = (0, _commonUtil.ensure)(function () {
|
|
64
66
|
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
65
67
|
}, '');
|
|
66
68
|
|
|
67
|
-
if (url === '/
|
|
68
|
-
(
|
|
69
|
+
if (url === '/message-chat' || url === '/ai-chat') {
|
|
70
|
+
var chatbotConfig = (_a = JSON.parse(window.ecommerce.chatbotConfig)) !== null && _a !== void 0 ? _a : {};
|
|
71
|
+
var version = chatbotConfig.version,
|
|
72
|
+
isNeedLogin = chatbotConfig.isNeedLogin;
|
|
73
|
+
var urlTemp = '';
|
|
74
|
+
|
|
75
|
+
if (version === 'v1') {
|
|
76
|
+
urlTemp = '/message-chat';
|
|
77
|
+
} else {
|
|
78
|
+
urlTemp = '/ai-chat';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (version === 'v1' || isNeedLogin) {
|
|
82
|
+
if ((0, _commonUtil.checkLogin)(true, urlTemp)) {
|
|
83
|
+
(0, _commonUtil.navigateTo)(urlTemp);
|
|
84
|
+
} else {
|
|
85
|
+
(0, _commonUtil.navigateTo)(urlTemp);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
(0, _commonUtil.navigateTo)(url);
|
|
89
|
+
}
|
|
90
|
+
|
|
69
91
|
return;
|
|
70
92
|
}
|
|
71
93
|
|
|
@@ -119,6 +119,29 @@ function (_super) {
|
|
|
119
119
|
return __assign({}, wrapStyle);
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
+
_this.clickChat = function () {
|
|
123
|
+
var _a;
|
|
124
|
+
|
|
125
|
+
var chatbotConfig = (_a = JSON.parse(window.ecommerce.chatbotConfig)) !== null && _a !== void 0 ? _a : {};
|
|
126
|
+
var version = chatbotConfig.version,
|
|
127
|
+
isNeedLogin = chatbotConfig.isNeedLogin;
|
|
128
|
+
var url = '';
|
|
129
|
+
|
|
130
|
+
if (version === 'v1') {
|
|
131
|
+
url = '/message-chat';
|
|
132
|
+
} else {
|
|
133
|
+
url = '/ai-chat';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (version === 'v1' || isNeedLogin) {
|
|
137
|
+
if ((0, _commonUtil.checkLogin)(true, url)) {
|
|
138
|
+
navigateTo(url);
|
|
139
|
+
} else {
|
|
140
|
+
navigateTo(url);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
122
145
|
return _this;
|
|
123
146
|
}
|
|
124
147
|
|
|
@@ -185,6 +208,7 @@ function (_super) {
|
|
|
185
208
|
}
|
|
186
209
|
}), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
187
210
|
className: "right-icon",
|
|
211
|
+
click: this.clickChat,
|
|
188
212
|
data: data.content.chatbotIcon,
|
|
189
213
|
style: {
|
|
190
214
|
width: '32px',
|
|
@@ -178,7 +178,8 @@ function (_super) {
|
|
|
178
178
|
imgCover = _e.imgCover,
|
|
179
179
|
hoverState = _e.hoverState,
|
|
180
180
|
notNeedLazy = _e.notNeedLazy,
|
|
181
|
-
square = _e.square
|
|
181
|
+
square = _e.square,
|
|
182
|
+
click = _e.click;
|
|
182
183
|
var hoverImgSrc = this.state.hoverImgSrc; // const { hoverSrc } = this.state;
|
|
183
184
|
// console.log('--metaImage ', this.props);
|
|
184
185
|
|
|
@@ -202,6 +203,11 @@ function (_super) {
|
|
|
202
203
|
cover: imgCover
|
|
203
204
|
}),
|
|
204
205
|
onClick: function onClick() {
|
|
206
|
+
if (click) {
|
|
207
|
+
click();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
205
211
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
206
212
|
}
|
|
207
213
|
}, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, notNeedLazy ? /*#__PURE__*/_react["default"].createElement("img", {
|