@icvdeveloper/common-module 0.0.72 → 0.0.73
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/dist/module.json +1 -1
- package/dist/runtime/composables/useAdobeLaunch.d.ts +1 -1
- package/dist/runtime/composables/useAdobeLaunch.mjs +19 -10
- package/dist/runtime/composables/useScripts.mjs +3 -3
- package/dist/runtime/models/portal.d.ts +1 -0
- package/dist/runtime/store/portal.mjs +1 -1
- package/dist/runtime/store/templateConfigs.mjs +0 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { useRouter } from "vue-router";
|
|
2
2
|
import { get } from "lodash-es";
|
|
3
|
+
import { usePortalStore } from "../store/portal.mjs";
|
|
3
4
|
export const useAdobeLaunch = () => {
|
|
4
5
|
const router = useRouter();
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
window
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const portalStore = usePortalStore();
|
|
7
|
+
const loadAdobeLaunch = () => {
|
|
8
|
+
if (portalStore.data.adobe_launch_url) {
|
|
9
|
+
let adtm = document.createElement("script");
|
|
10
|
+
adtm.setAttribute("src", portalStore.data.adobe_launch_url);
|
|
11
|
+
document.head.appendChild(adtm);
|
|
12
|
+
adtm.onload = () => {
|
|
13
|
+
if (get(window, "_satellite.track", false)) {
|
|
14
|
+
window._satellite.setDebug(true);
|
|
15
|
+
window._satellite.track("spaPageView");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
router.afterEach((to, from) => {
|
|
19
|
+
if (get(window, "_satellite.track", false)) {
|
|
20
|
+
window._satellite.track("spaPageView");
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
15
24
|
};
|
|
16
25
|
return {
|
|
17
26
|
loadAdobeLaunch
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const useScripts = () => {
|
|
2
2
|
const loadScripts = (scripts) => {
|
|
3
3
|
scripts.forEach((src) => {
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
document.head.appendChild(
|
|
4
|
+
let _script = document.createElement("script");
|
|
5
|
+
_script.setAttribute("src", src);
|
|
6
|
+
document.head.appendChild(_script);
|
|
7
7
|
});
|
|
8
8
|
};
|
|
9
9
|
return {
|
|
@@ -14,7 +14,7 @@ export const usePortalStore = defineStore("portal", {
|
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
15
|
this.loading = true;
|
|
16
16
|
request(
|
|
17
|
-
"portals/1?fields=id,name,description,favicon,ga_id,gtm_id&with=template_config,navigation_config"
|
|
17
|
+
"portals/1?fields=id,name,description,favicon,ga_id,gtm_id,adobe_launch_url&with=template_config,navigation_config"
|
|
18
18
|
).then((response) => {
|
|
19
19
|
const {
|
|
20
20
|
data: { navigation_config, template_config, ...data }
|
|
@@ -80,8 +80,6 @@ export const useTemplateConfigsStore = defineStore("templateConfigs", {
|
|
|
80
80
|
};
|
|
81
81
|
},
|
|
82
82
|
setConferenceConfig(conference) {
|
|
83
|
-
console.log("setConferenceConfig conference", conference);
|
|
84
|
-
console.log("setConferenceConfig conferences", this.conferences);
|
|
85
83
|
const newPagesConfig = this.portalConfig.pages;
|
|
86
84
|
const confPagesConfig = {};
|
|
87
85
|
const conferenceTemplateConfig = conference.template_config ?? {};
|
|
@@ -98,7 +96,6 @@ export const useTemplateConfigsStore = defineStore("templateConfigs", {
|
|
|
98
96
|
}
|
|
99
97
|
});
|
|
100
98
|
this.conferences[conference.id] = newPagesConfig;
|
|
101
|
-
console.log("setConferenceConfig conference", conference);
|
|
102
99
|
}
|
|
103
100
|
}
|
|
104
101
|
});
|