@redneckz/wildless-cms-uni-blocks 0.14.773 → 0.14.774
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 +13 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/hooks/useExternalNS.d.ts +2 -1
- package/dist/components/Header/useChatBot.js +2 -2
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/dist/hooks/useExternalNS.d.ts +2 -1
- package/dist/hooks/useExternalNS.js +12 -2
- package/dist/hooks/useExternalNS.js.map +1 -1
- package/lib/components/Header/useChatBot.js +3 -3
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/lib/hooks/useExternalNS.d.ts +2 -1
- package/lib/hooks/useExternalNS.js +10 -1
- package/lib/hooks/useExternalNS.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +5 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/hooks/useExternalNS.d.ts +2 -1
- package/mobile/dist/components/Header/useChatBot.js +2 -2
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/dist/hooks/useExternalNS.d.ts +2 -1
- package/mobile/dist/hooks/useExternalNS.js +12 -2
- package/mobile/dist/hooks/useExternalNS.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.js +3 -3
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/hooks/useExternalNS.d.ts +2 -1
- package/mobile/lib/hooks/useExternalNS.js +10 -1
- package/mobile/lib/hooks/useExternalNS.js.map +1 -1
- package/mobile/src/components/Header/useChatBot.ts +3 -2
- package/mobile/src/hooks/useExternalNS.ts +12 -1
- package/package.json +1 -1
- package/src/components/Header/useChatBot.ts +3 -2
- package/src/hooks/useExternalNS.ts +12 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -5028,7 +5028,7 @@
|
|
|
5028
5028
|
});
|
|
5029
5029
|
|
|
5030
5030
|
const getNS = (_) => globalThis[_];
|
|
5031
|
-
const initializeExternalNS = (namespaceName, url) => {
|
|
5031
|
+
const initializeExternalNS = (namespaceName, url, isModule = false) => {
|
|
5032
5032
|
const script = document.getElementById(url);
|
|
5033
5033
|
if (script) {
|
|
5034
5034
|
const ns = getNS(namespaceName);
|
|
@@ -5049,6 +5049,9 @@
|
|
|
5049
5049
|
newScript.src = url;
|
|
5050
5050
|
newScript.async = true;
|
|
5051
5051
|
newScript.id = url;
|
|
5052
|
+
if (isModule) {
|
|
5053
|
+
newScript.type = 'module';
|
|
5054
|
+
}
|
|
5052
5055
|
newScript.addEventListener('load', () => {
|
|
5053
5056
|
resolve(getNS(namespaceName));
|
|
5054
5057
|
});
|
|
@@ -5059,6 +5062,12 @@
|
|
|
5059
5062
|
});
|
|
5060
5063
|
}
|
|
5061
5064
|
};
|
|
5065
|
+
const initializeExternalStylesheet = (url = '') => {
|
|
5066
|
+
const link = document.createElement('link');
|
|
5067
|
+
link.href = url;
|
|
5068
|
+
link.rel = 'stylesheet';
|
|
5069
|
+
document.head.appendChild(link);
|
|
5070
|
+
};
|
|
5062
5071
|
function useExternalNS(namespaceName, url, unmountNS = true) {
|
|
5063
5072
|
const [externalNS, setExternalNS] = useState(undefined);
|
|
5064
5073
|
useEffect(() => {
|
|
@@ -5102,8 +5111,8 @@
|
|
|
5102
5111
|
return;
|
|
5103
5112
|
}
|
|
5104
5113
|
if (chat !== 'personal') {
|
|
5105
|
-
|
|
5106
|
-
const businessChat = (await initializeExternalNS(CHAT_NAMESPACE, `${chatUrl}/bundle.js
|
|
5114
|
+
initializeExternalStylesheet(`${chatUrl}/bundle.css`);
|
|
5115
|
+
const businessChat = (await initializeExternalNS(CHAT_NAMESPACE, `${chatUrl}/bundle.js`, true));
|
|
5107
5116
|
if (businessChat?.render) {
|
|
5108
5117
|
businessChat.render(CHAT_FRAME_ID, true);
|
|
5109
5118
|
}
|
|
@@ -7003,7 +7012,7 @@
|
|
|
7003
7012
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7004
7013
|
});
|
|
7005
7014
|
|
|
7006
|
-
const packageVersion = "0.14.
|
|
7015
|
+
const packageVersion = "0.14.773";
|
|
7007
7016
|
|
|
7008
7017
|
exports.Blocks = Blocks;
|
|
7009
7018
|
exports.ContentPage = ContentPage;
|