@icvdeveloper/common-module 0.0.118 → 0.0.120
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/components/auth/Ucc.vue +1 -4
- package/dist/runtime/components/events/ListEvents.vue +8 -4
- package/dist/runtime/composables/useConferenceHelpers.d.ts +1 -1
- package/dist/runtime/composables/useConferenceHelpers.mjs +3 -1
- package/dist/runtime/composables/useEvents.d.ts +9 -9
- package/dist/runtime/composables/useEvents.mjs +15 -13
- package/dist/runtime/composables/useUcc.d.ts +1 -1
- package/dist/runtime/composables/useUcc.mjs +2 -2
- package/dist/runtime/plugin.mjs +22 -24
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -10,12 +10,10 @@ const { loadUccScript, loginV3 } = useUcc();
|
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
12
12
|
conference: Conference;
|
|
13
|
-
eventPathPrefix?: string;
|
|
14
13
|
classObject?: uccClassObj;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
-
eventPathPrefix: "",
|
|
19
17
|
classObject: () => {
|
|
20
18
|
return {
|
|
21
19
|
container: ""
|
|
@@ -24,7 +22,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
24
22
|
});
|
|
25
23
|
|
|
26
24
|
const {
|
|
27
|
-
eventPathPrefix,
|
|
28
25
|
classObject,
|
|
29
26
|
} = toRefs(props);
|
|
30
27
|
|
|
@@ -71,7 +68,7 @@ const buttonColorClass = computed(() => {
|
|
|
71
68
|
|
|
72
69
|
// on mount
|
|
73
70
|
onMounted(() => {
|
|
74
|
-
loadUccScript(props.conference
|
|
71
|
+
loadUccScript(props.conference);
|
|
75
72
|
});
|
|
76
73
|
|
|
77
74
|
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ref, toRefs, computed } from "vue";
|
|
3
3
|
import { storeToRefs } from "pinia";
|
|
4
|
+
import { get } from "lodash-es";
|
|
4
5
|
import { useConferencesStore } from "../../store/conferences";
|
|
5
6
|
import { useTemplateConfigsStore } from "../../store/templateConfigs";
|
|
6
7
|
import { useDateFormat } from "../../composables/useDateFormat";
|
|
@@ -27,7 +28,6 @@ interface Props {
|
|
|
27
28
|
loginButton?: boolean;
|
|
28
29
|
viewInfoButton?: boolean;
|
|
29
30
|
registerPathPrefix?: string;
|
|
30
|
-
eventPathPrefix?: string;
|
|
31
31
|
liveButtonOpensStream?: boolean;
|
|
32
32
|
isUpcoming?: boolean;
|
|
33
33
|
showEventImage?: boolean;
|
|
@@ -47,7 +47,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
47
47
|
loginButton: true,
|
|
48
48
|
viewInfoButton: true,
|
|
49
49
|
registerPathPrefix: "",
|
|
50
|
-
eventPathPrefix: "",
|
|
51
50
|
liveButtonOpensStream: true,
|
|
52
51
|
isUpcoming: true,
|
|
53
52
|
showEventImage: true,
|
|
@@ -83,6 +82,7 @@ const {
|
|
|
83
82
|
} = toRefs(props);
|
|
84
83
|
|
|
85
84
|
// data
|
|
85
|
+
const config = useRuntimeConfig();
|
|
86
86
|
const { pastEvents, upcomingEvents } = storeToRefs(useConferencesStore());
|
|
87
87
|
|
|
88
88
|
// methods
|
|
@@ -136,6 +136,10 @@ const getVideoButtonText = (_conference: Conference): string => {
|
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
// computed
|
|
139
|
+
const eventPathPrefix = computed(() => {
|
|
140
|
+
return (get(config.public, "eventPathPrefix.length", 0) > 0) ? config.public.eventPathPrefix : null;
|
|
141
|
+
});
|
|
142
|
+
|
|
139
143
|
const eventType = computed((): Conference[] => {
|
|
140
144
|
return isUpcoming.value ? upcomingEvents.value : pastEvents.value;
|
|
141
145
|
});
|
|
@@ -363,7 +367,7 @@ const showLoginButton = computed((): boolean => {
|
|
|
363
367
|
:class="
|
|
364
368
|
classBinding(classObject, 'liveButtonItem', buttonClass)
|
|
365
369
|
"
|
|
366
|
-
@click="goEventPage(conference
|
|
370
|
+
@click="goEventPage(conference)"
|
|
367
371
|
>
|
|
368
372
|
{{ getVideoButtonText(conference) }}
|
|
369
373
|
</button>
|
|
@@ -376,7 +380,7 @@ const showLoginButton = computed((): boolean => {
|
|
|
376
380
|
:class="
|
|
377
381
|
classBinding(classObject, 'buttonItem', buttonClass)
|
|
378
382
|
"
|
|
379
|
-
@click="goEventPage(conference
|
|
383
|
+
@click="goEventPage(conference)"
|
|
380
384
|
>
|
|
381
385
|
More Info
|
|
382
386
|
</button>
|
|
@@ -20,7 +20,7 @@ export type UseConferenceHelpersMethods = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Get conference webcast url
|
|
22
22
|
*/
|
|
23
|
-
getConferenceWebcastUrl: (_conference?: Conference
|
|
23
|
+
getConferenceWebcastUrl: (_conference?: Conference) => string;
|
|
24
24
|
/**
|
|
25
25
|
* Get timezone display
|
|
26
26
|
*/
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
useAuthStore
|
|
11
11
|
} from "../store";
|
|
12
12
|
import { useDateFormat } from "./useDateFormat.mjs";
|
|
13
|
+
const config = useRuntimeConfig();
|
|
13
14
|
const getConferenceConfigMainValue = (_conference, _name) => {
|
|
14
15
|
const configPages = get(_conference, "template_config.config.pages", []);
|
|
15
16
|
const mainPageContent = get(
|
|
@@ -58,12 +59,13 @@ export const useConferenceHelpers = (conference) => {
|
|
|
58
59
|
const _selectedConference = _getSelectedConference(_conference);
|
|
59
60
|
return _selectedConference.access && _selectedConference.state !== "archive" && _selectedConference.state !== "hidden";
|
|
60
61
|
};
|
|
61
|
-
const getConferenceWebcastUrl = (_conference
|
|
62
|
+
const getConferenceWebcastUrl = (_conference) => {
|
|
62
63
|
const _selectedConference = _getSelectedConference(_conference);
|
|
63
64
|
if (_selectedConference.state === "upcoming") {
|
|
64
65
|
return "/stream-test";
|
|
65
66
|
}
|
|
66
67
|
const channel = get(_selectedConference, "days[0].tracks[0].channel", 1);
|
|
68
|
+
const eventPathPrefix = config.public.eventPathPrefix;
|
|
67
69
|
return _selectedConference.agenda_enabled ? `/agenda/${_selectedConference.id}` : eventPathPrefix ? `${eventPathPrefix}${_selectedConference.id}/webcast/${channel}` : `/upcoming-events/${_selectedConference.id}/webcast/${channel}`;
|
|
68
70
|
};
|
|
69
71
|
const getConferenceWebcastButtonText = (_conference) => {
|
|
@@ -13,10 +13,18 @@ export type UseEventsMethods = {
|
|
|
13
13
|
* the conference passed the login modal
|
|
14
14
|
*/
|
|
15
15
|
conferenceToLoginTo: Ref<Conference | null>;
|
|
16
|
+
/**
|
|
17
|
+
* return different classes if countdown timer is/is not active
|
|
18
|
+
*/
|
|
19
|
+
buttonClass: ComputedRef<string>;
|
|
20
|
+
/**
|
|
21
|
+
* checks if component is on the homepage
|
|
22
|
+
*/
|
|
23
|
+
isHomePage: Ref<boolean>;
|
|
16
24
|
/**
|
|
17
25
|
* redirects to event landing page
|
|
18
26
|
*/
|
|
19
|
-
goEventPage: (conference: Conference
|
|
27
|
+
goEventPage: (conference: Conference) => void;
|
|
20
28
|
/**
|
|
21
29
|
* display modal login modal and set its conference prop
|
|
22
30
|
*/
|
|
@@ -33,13 +41,5 @@ export type UseEventsMethods = {
|
|
|
33
41
|
* returns the first affiliate set to role 'custom1'
|
|
34
42
|
*/
|
|
35
43
|
getBrand: (_affiliates: Array<Sponsor>) => Sponsor | null;
|
|
36
|
-
/**
|
|
37
|
-
* return different classes if countdown timer is/is not active
|
|
38
|
-
*/
|
|
39
|
-
buttonClass: ComputedRef<string>;
|
|
40
|
-
/**
|
|
41
|
-
* checks if component is on the homepage
|
|
42
|
-
*/
|
|
43
|
-
isHomePage: Ref<boolean>;
|
|
44
44
|
};
|
|
45
45
|
export declare const useEvents: () => UseEventsMethods;
|
|
@@ -6,13 +6,21 @@ import { useAuthStore, useTemplateConfigsStore } from "../store/index.mjs";
|
|
|
6
6
|
export const useEvents = () => {
|
|
7
7
|
const route = useRoute();
|
|
8
8
|
const router = useRouter();
|
|
9
|
+
const config = useRuntimeConfig();
|
|
9
10
|
const { isLoggedIn } = storeToRefs(useAuthStore());
|
|
11
|
+
const { pagesConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
10
12
|
const loginModalVisible = ref(false);
|
|
11
13
|
const conferenceToLoginTo = ref(null);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const buttonClass = computed(() => {
|
|
15
|
+
return pagesConfigValue.value("main.countdown_timer") ? "mx-2 mb-2 w-5/6 sm:w-auto sm:mx-0 sm:mr-4 md:w-full xl:mr-1 xl:w-auto btn btn-secondary" : "mx-2 mb-2 w-5/6 sm:w-auto sm:mx-0 sm:mr-4 btn btn-secondary";
|
|
16
|
+
});
|
|
17
|
+
const isHomePage = computed(() => {
|
|
18
|
+
return route.name === "index";
|
|
19
|
+
});
|
|
20
|
+
const goEventPage = (conference) => {
|
|
21
|
+
const eventPathPrefix = config.public.eventPathPrefix;
|
|
22
|
+
if (eventPathPrefix) {
|
|
23
|
+
router.push(eventPathPrefix + conference.id);
|
|
16
24
|
} else {
|
|
17
25
|
router.push(`/upcoming-events/${conference.id}`);
|
|
18
26
|
}
|
|
@@ -44,22 +52,16 @@ export const useEvents = () => {
|
|
|
44
52
|
}
|
|
45
53
|
return null;
|
|
46
54
|
};
|
|
47
|
-
const buttonClass = computed(() => {
|
|
48
|
-
return pagesConfigValue.value("main.countdown_timer") ? "mx-2 mb-2 w-5/6 sm:w-auto sm:mx-0 sm:mr-4 md:w-full xl:mr-1 xl:w-auto btn btn-secondary" : "mx-2 mb-2 w-5/6 sm:w-auto sm:mx-0 sm:mr-4 btn btn-secondary";
|
|
49
|
-
});
|
|
50
|
-
const isHomePage = computed(() => {
|
|
51
|
-
return route.name === "index";
|
|
52
|
-
});
|
|
53
55
|
return {
|
|
54
56
|
isLoggedIn,
|
|
55
57
|
loginModalVisible,
|
|
56
58
|
conferenceToLoginTo,
|
|
59
|
+
buttonClass,
|
|
60
|
+
isHomePage,
|
|
57
61
|
goEventPage,
|
|
58
62
|
setConferenceToLoginTo,
|
|
59
63
|
orderAffiliates,
|
|
60
64
|
getSponsors,
|
|
61
|
-
getBrand
|
|
62
|
-
buttonClass,
|
|
63
|
-
isHomePage
|
|
65
|
+
getBrand
|
|
64
66
|
};
|
|
65
67
|
};
|
|
@@ -12,7 +12,7 @@ export const useUcc = () => {
|
|
|
12
12
|
const { loginEmailOnly } = useAuthStore();
|
|
13
13
|
const { selectedConference } = storeToRefs(useConferencesStore());
|
|
14
14
|
const router = useRouter();
|
|
15
|
-
const loadUccScript = (conference
|
|
15
|
+
const loadUccScript = (conference) => {
|
|
16
16
|
console.log("conference", conference);
|
|
17
17
|
let brandCode = get(conference, "custom1[0].code");
|
|
18
18
|
const { getConferenceWebcastUrl } = useConferenceHelpers(conference);
|
|
@@ -24,7 +24,7 @@ export const useUcc = () => {
|
|
|
24
24
|
state: conference.state,
|
|
25
25
|
brandCode
|
|
26
26
|
};
|
|
27
|
-
window.uccMixin.webcastUrl = getConferenceWebcastUrl(conference
|
|
27
|
+
window.uccMixin.webcastUrl = getConferenceWebcastUrl(conference);
|
|
28
28
|
window.uccMixin.loginV3 = loginV3;
|
|
29
29
|
window.uccMixin.postAuthRedirect = postAuthRedirect;
|
|
30
30
|
window.uccMixin.uccShowEventSignUp = uccShowEventSignUp;
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -38,8 +38,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
38
38
|
const text = div.textContent || div.innerText || "";
|
|
39
39
|
return text;
|
|
40
40
|
};
|
|
41
|
-
let docTitle = "
|
|
42
|
-
let docSubtitle = "";
|
|
41
|
+
let docTitle = "";
|
|
43
42
|
let routeArray = to.name.toLowerCase().split("-");
|
|
44
43
|
if (portal.value === null) {
|
|
45
44
|
Promise.all([
|
|
@@ -53,15 +52,13 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
53
52
|
// wait for get conferences to complete, then get current conference data.
|
|
54
53
|
await conferencesStore.getCurrentConference().then(() => NProgress.inc())
|
|
55
54
|
]);
|
|
56
|
-
} else {
|
|
57
|
-
docTitle = portal.value.name;
|
|
58
55
|
}
|
|
59
56
|
if (to.name.includes("events-id") && to.params.id) {
|
|
60
57
|
await conferencesStore.getSelectedConference(to.params.id).then(() => {
|
|
61
58
|
if (conferencesStore.selectedConference) {
|
|
62
|
-
|
|
59
|
+
docTitle = `${conferencesStore.selectedConference.name}`;
|
|
63
60
|
if (to.name.includes("webcast-channelid")) {
|
|
64
|
-
|
|
61
|
+
docTitle += ` | Live Webcast`;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
NProgress.inc();
|
|
@@ -72,32 +69,33 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
72
69
|
if (to.params.presid) {
|
|
73
70
|
await presentationsStore.getSelectedPresentation(to.params.presid).then(() => {
|
|
74
71
|
if (conferencesStore.selectedConference) {
|
|
75
|
-
|
|
72
|
+
docTitle = `${presentationsStore.selectedPresentation.name}`;
|
|
76
73
|
}
|
|
77
74
|
});
|
|
78
75
|
} else {
|
|
79
76
|
presentationsStore.selectedPresentation = null;
|
|
80
77
|
}
|
|
81
|
-
if (!
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (navObj) {
|
|
89
|
-
docSubtitle += `${navObj.label}`;
|
|
90
|
-
} else {
|
|
91
|
-
let routeName = routeArray.map(
|
|
92
|
-
function(word) {
|
|
93
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
78
|
+
if (!docTitle && portal.value) {
|
|
79
|
+
docTitle = portal.value.name;
|
|
80
|
+
if (to.name != "index") {
|
|
81
|
+
let navObj = find(
|
|
82
|
+
navigation.value,
|
|
83
|
+
function(nav) {
|
|
84
|
+
return nav.slug == to.name || nav.url == to.path;
|
|
94
85
|
}
|
|
95
|
-
)
|
|
96
|
-
|
|
86
|
+
);
|
|
87
|
+
if (navObj) {
|
|
88
|
+
docTitle += ` | ${navObj.label}`;
|
|
89
|
+
} else {
|
|
90
|
+
let routeName = routeArray.map(
|
|
91
|
+
function(word) {
|
|
92
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
93
|
+
}
|
|
94
|
+
).join(" ");
|
|
95
|
+
docTitle += ` | ${routeName}`;
|
|
96
|
+
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
if (docSubtitle)
|
|
100
|
-
docTitle += ` | ${docSubtitle}`;
|
|
101
99
|
document.title = docTitle;
|
|
102
100
|
let canonicalUrl = "https://" + portal.value.domain + to.path;
|
|
103
101
|
if (document.querySelector("link[rel='canonical']")) {
|