@redneckz/wildless-cms-uni-blocks 0.14.771 → 0.14.772
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/bundle/bundle.umd.js +8 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/useChatBot.d.ts +1 -1
- package/dist/components/Header/useChatBot.d.ts +1 -1
- package/dist/components/Header/useChatBot.js +7 -3
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/lib/components/Header/useChatBot.d.ts +1 -1
- package/lib/components/Header/useChatBot.js +7 -3
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/useChatBot.d.ts +1 -1
- package/mobile/dist/components/Header/useChatBot.d.ts +1 -1
- package/mobile/dist/components/Header/useChatBot.js +7 -3
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.d.ts +1 -1
- package/mobile/lib/components/Header/useChatBot.js +7 -3
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/src/components/Header/useChatBot.ts +17 -3
- package/package.json +1 -1
- package/src/components/Header/useChatBot.ts +17 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -5091,17 +5091,21 @@
|
|
|
5091
5091
|
const CHAT_STORAGE_NAME = 'webchat-keep-open';
|
|
5092
5092
|
const CHATBOT_URL = {
|
|
5093
5093
|
personal: '//chat.mes.rshb.ru/assets/js/webchat_rshb',
|
|
5094
|
-
business: '',
|
|
5094
|
+
business: '/webchat',
|
|
5095
5095
|
};
|
|
5096
5096
|
const useChatBot = (chat) => {
|
|
5097
5097
|
useEffect(() => globalThis.localStorage?.setItem(CHAT_STORAGE_NAME, String(Date.now())), []);
|
|
5098
5098
|
const chatUrl = CHATBOT_URL[chat ?? ''];
|
|
5099
|
-
return (ev) => {
|
|
5099
|
+
return async (ev) => {
|
|
5100
5100
|
if (!chatUrl) {
|
|
5101
5101
|
return;
|
|
5102
5102
|
}
|
|
5103
5103
|
if (chat !== 'personal') {
|
|
5104
|
-
initializeExternalNS(CHAT_NAMESPACE
|
|
5104
|
+
initializeExternalNS(`${CHAT_NAMESPACE}_business_css`, `${chatUrl}/bundle.css`);
|
|
5105
|
+
const businessChat = (await initializeExternalNS(CHAT_NAMESPACE, `${chatUrl}/bundle.js`));
|
|
5106
|
+
if (businessChat?.render) {
|
|
5107
|
+
businessChat.render(CHAT_FRAME_ID, true);
|
|
5108
|
+
}
|
|
5105
5109
|
}
|
|
5106
5110
|
else {
|
|
5107
5111
|
const target = ev.target;
|
|
@@ -6998,7 +7002,7 @@
|
|
|
6998
7002
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6999
7003
|
});
|
|
7000
7004
|
|
|
7001
|
-
const packageVersion = "0.14.
|
|
7005
|
+
const packageVersion = "0.14.771";
|
|
7002
7006
|
|
|
7003
7007
|
exports.Blocks = Blocks;
|
|
7004
7008
|
exports.ContentPage = ContentPage;
|