@icvdeveloper/common-module 2.1.2 → 2.1.4
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/CHANGELOG.md +4 -0
- package/dist/module.d.mts +2 -0
- package/dist/module.d.ts +2 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/chat/ChatWidget.vue +17 -2
- package/dist/runtime/components/core/Navigation.vue +29 -10
- package/dist/runtime/components/core/SectionHeader.vue +133 -0
- package/dist/runtime/composables/useAgenda.mjs +5 -2
- package/dist/runtime/composables/useConferenceHelpers.d.ts +4 -0
- package/dist/runtime/composables/useConferenceHelpers.mjs +1 -0
- package/dist/runtime/models/conference.d.ts +1 -0
- package/dist/runtime/models/pagesConfig.d.ts +1 -0
- package/dist/runtime/store/templateConfigs.mjs +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/module.d.mts
CHANGED
|
@@ -259,6 +259,7 @@ type Track = {
|
|
|
259
259
|
access: boolean;
|
|
260
260
|
channel: number;
|
|
261
261
|
conference_day_id?: number;
|
|
262
|
+
day: Day;
|
|
262
263
|
date: string;
|
|
263
264
|
embed_html?: string | null;
|
|
264
265
|
id: number;
|
|
@@ -682,6 +683,7 @@ type AgendaPlayerPageConfigs = {
|
|
|
682
683
|
agenda_tab_bg_color: ColorVariable;
|
|
683
684
|
agenda_tab_color: ColorVariable;
|
|
684
685
|
agenda_tab_sponsor_bg_color: ColorVariable;
|
|
686
|
+
agenda_theme: SelectVariable;
|
|
685
687
|
agenda_track_bg_color: ColorVariable;
|
|
686
688
|
agenda_track_group_bg_color: ColorVariable;
|
|
687
689
|
session_end_times: ToggleVariable;
|
package/dist/module.d.ts
CHANGED
|
@@ -259,6 +259,7 @@ type Track = {
|
|
|
259
259
|
access: boolean;
|
|
260
260
|
channel: number;
|
|
261
261
|
conference_day_id?: number;
|
|
262
|
+
day: Day;
|
|
262
263
|
date: string;
|
|
263
264
|
embed_html?: string | null;
|
|
264
265
|
id: number;
|
|
@@ -682,6 +683,7 @@ type AgendaPlayerPageConfigs = {
|
|
|
682
683
|
agenda_tab_bg_color: ColorVariable;
|
|
683
684
|
agenda_tab_color: ColorVariable;
|
|
684
685
|
agenda_tab_sponsor_bg_color: ColorVariable;
|
|
686
|
+
agenda_theme: SelectVariable;
|
|
685
687
|
agenda_track_bg_color: ColorVariable;
|
|
686
688
|
agenda_track_group_bg_color: ColorVariable;
|
|
687
689
|
session_end_times: ToggleVariable;
|
package/dist/module.json
CHANGED
|
@@ -35,6 +35,21 @@ const { hasNotifications } = toRefs(props);
|
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
|
-
<style scoped>
|
|
39
|
-
.launcher
|
|
38
|
+
<style scoped lang="postcss">
|
|
39
|
+
.launcher {
|
|
40
|
+
@apply rounded-full cursor-pointer fixed h-16 w-16 z-50 bottom-6 right-10;
|
|
41
|
+
background-position: center;
|
|
42
|
+
background-repeat: no-repeat;
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bell {
|
|
48
|
+
@apply z-50 fixed bottom-6 right-4;
|
|
49
|
+
padding: 2px 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.bell svg {
|
|
53
|
+
height: 90px;
|
|
54
|
+
}
|
|
40
55
|
</style>
|
|
@@ -89,12 +89,16 @@ const navigationItems = computed(() => {
|
|
|
89
89
|
return getEnabled();
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
const htmlHeader = computed(() => {
|
|
92
|
+
const htmlHeader = computed((): string => {
|
|
93
93
|
return globalConfigValue("html_header");
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
const hideUserProfile = computed(() => {
|
|
97
|
-
return globalConfigValue("hide_user_profile");
|
|
96
|
+
const hideUserProfile = computed((): boolean => {
|
|
97
|
+
return globalConfigValue("hide_user_profile", true);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const isSearchEnabled = computed((): boolean => {
|
|
101
|
+
return globalConfigValue("site_search", false);
|
|
98
102
|
});
|
|
99
103
|
|
|
100
104
|
// methods
|
|
@@ -104,6 +108,12 @@ const emitLoginModal = (): void => {
|
|
|
104
108
|
modalContentEventHook.trigger(modalContent);
|
|
105
109
|
};
|
|
106
110
|
|
|
111
|
+
const emitSearchModal = (): void => {
|
|
112
|
+
const modalContent: ContentData = {};
|
|
113
|
+
modalContent.contentType = 'search';
|
|
114
|
+
modalContentEventHook.trigger(modalContent);
|
|
115
|
+
};
|
|
116
|
+
|
|
107
117
|
const emitStreamTest = (): void => {
|
|
108
118
|
const streamPres: PlayerPresentation = {
|
|
109
119
|
player_type: 'live',
|
|
@@ -190,13 +200,22 @@ const emitStreamTest = (): void => {
|
|
|
190
200
|
>
|
|
191
201
|
<li>
|
|
192
202
|
<template v-if="!isExternalLink(item)">
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
<template v-if="isVirtual">
|
|
204
|
+
<nuxt-link
|
|
205
|
+
v-if="item.slug == 'stream-test'"
|
|
206
|
+
:class="['cursor-pointer', classBinding(classObject, 'navigationItemLink', 'nav-link')]"
|
|
207
|
+
@click.enter="emitSearchModal"
|
|
208
|
+
>
|
|
209
|
+
{{ item.label }}
|
|
210
|
+
</nuxt-link>
|
|
211
|
+
<nuxt-link
|
|
212
|
+
v-if="isSearchEnabled && item.slug == 'search'"
|
|
213
|
+
:class="['cursor-pointer', classBinding(classObject, 'navigationItemLink', 'nav-link')]"
|
|
214
|
+
@click.enter="emitSearchModal"
|
|
215
|
+
>
|
|
216
|
+
{{ item.label }}
|
|
217
|
+
</nuxt-link>
|
|
218
|
+
</template>
|
|
200
219
|
<nuxt-link
|
|
201
220
|
v-else
|
|
202
221
|
:to="formatLink(item)"
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, onMounted, ref, toRefs, watch } from 'vue';
|
|
3
|
+
import { useRoute } from 'vue-router';
|
|
4
|
+
import { find } from 'lodash-es';
|
|
5
|
+
import { storeToRefs } from 'pinia';
|
|
6
|
+
import { useConferencesStore } from '../../store/conferences';
|
|
7
|
+
import { useNavigationConfigStore } from '../../store/navigationConfig';
|
|
8
|
+
import { useTemplateConfigsStore } from '../../store/templateConfigs';
|
|
9
|
+
import type { NavigationConfig } from '../../models/navigationConfig';
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
title?: string;
|
|
13
|
+
photoLarge?: string;
|
|
14
|
+
textClass?: string;
|
|
15
|
+
isConferencePage?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
19
|
+
title: 'Page',
|
|
20
|
+
photoLarge: '',
|
|
21
|
+
textClass: '',
|
|
22
|
+
isConferencePage: false
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const { title, photoLarge, textClass, isConferencePage } = toRefs(props);
|
|
26
|
+
|
|
27
|
+
// data
|
|
28
|
+
const headerTitle = ref<string>('');
|
|
29
|
+
|
|
30
|
+
const { currentConference } = storeToRefs(useConferencesStore());
|
|
31
|
+
|
|
32
|
+
const { data } = storeToRefs(useNavigationConfigStore());
|
|
33
|
+
|
|
34
|
+
const { globalConfigValue } = useTemplateConfigsStore();
|
|
35
|
+
|
|
36
|
+
const route = useRoute();
|
|
37
|
+
|
|
38
|
+
// computed
|
|
39
|
+
const showPageTitle = computed((): boolean => {
|
|
40
|
+
if (isConferencePage.value) return true;
|
|
41
|
+
return globalConfigValue('header_titles', true);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const mainBodyImage = computed((): string => {
|
|
45
|
+
if (photoLarge.value.length > 0) {
|
|
46
|
+
return photoLarge.value;
|
|
47
|
+
} else if (
|
|
48
|
+
globalConfigValue('conference_photo_headers', true) &&
|
|
49
|
+
currentConference.value?.photo_large &&
|
|
50
|
+
currentConference.value.photo_large.length
|
|
51
|
+
) {
|
|
52
|
+
return currentConference.value?.photo_large;
|
|
53
|
+
} else {
|
|
54
|
+
return ''
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const currentPageName = computed((): string => {
|
|
59
|
+
const ignoreArray = [
|
|
60
|
+
'webcast-id',
|
|
61
|
+
'agenda-id',
|
|
62
|
+
'support',
|
|
63
|
+
'registration'
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const routeName: string = route.name?.toString() ?? '';
|
|
67
|
+
let currentPageObj: NavigationConfig;
|
|
68
|
+
|
|
69
|
+
if (routeName === 'page-slug') {
|
|
70
|
+
currentPageObj = find(data.value, ['slug', route.params.slug as string]) as NavigationConfig;
|
|
71
|
+
return currentPageObj.name as string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (routeName === 'index') {
|
|
75
|
+
currentPageObj = find(data.value, ['slug', 'home']) as NavigationConfig;
|
|
76
|
+
return currentPageObj.label as string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!ignoreArray.includes(routeName)) {
|
|
80
|
+
currentPageObj = find(data.value, ['slug', routeName ]) as NavigationConfig;
|
|
81
|
+
if(currentPageObj) {
|
|
82
|
+
return currentPageObj.label as string;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return '';
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const mainBodyImageStyle = computed((): {} | string => {
|
|
89
|
+
return (mainBodyImage.value.length > 0) ? {
|
|
90
|
+
'background-image': `url(${mainBodyImage.value})`,
|
|
91
|
+
'background-repeat': 'no-repeat',
|
|
92
|
+
'background-size': 'cover',
|
|
93
|
+
'background-position': 'center',
|
|
94
|
+
} : '';
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const mutedHeaderStyle = computed((): string => {
|
|
98
|
+
const muted = globalConfigValue('muted_photo_headers', 'none');
|
|
99
|
+
let style = '';
|
|
100
|
+
if (mainBodyImage.value.length > 0) style += 'min-height: 112px;';
|
|
101
|
+
if (muted == 'lighten') style += 'background-color: rgb(255, 255, 255, .4)';
|
|
102
|
+
if (muted == 'darken') style += 'background-color: rgb(0, 0, 0, .4)';
|
|
103
|
+
return style;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
watch(title, () => {
|
|
107
|
+
headerTitle.value = currentPageName.value || title.value;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
headerTitle.value = currentPageName.value || title.value;
|
|
112
|
+
});
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<template>
|
|
116
|
+
<div
|
|
117
|
+
:style="mainBodyImageStyle"
|
|
118
|
+
class="flex bg-color-2"
|
|
119
|
+
>
|
|
120
|
+
<div
|
|
121
|
+
class="mx-auto flex-1 self-center items-center drop-shadow-md"
|
|
122
|
+
:style="mutedHeaderStyle"
|
|
123
|
+
>
|
|
124
|
+
<h1
|
|
125
|
+
v-if="showPageTitle"
|
|
126
|
+
:class="textClass"
|
|
127
|
+
class="heading-color-4 py-10"
|
|
128
|
+
>
|
|
129
|
+
{{ headerTitle }}
|
|
130
|
+
</h1>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
@@ -16,10 +16,9 @@ import {
|
|
|
16
16
|
} from "../composables/useEventHooks.mjs";
|
|
17
17
|
export const useAgenda = (conference) => {
|
|
18
18
|
const { setConferenceConfig, pagesConfigValue } = useTemplateConfigsStore();
|
|
19
|
-
console.log("setting conference config");
|
|
20
|
-
setConferenceConfig(conference.value);
|
|
21
19
|
const affiliateStore = useAffiliatesStore();
|
|
22
20
|
const route = useRoute();
|
|
21
|
+
const { conferences } = storeToRefs(useTemplateConfigsStore());
|
|
23
22
|
const { isLoggedIn } = storeToRefs(useAuthStore());
|
|
24
23
|
const { currentConference } = storeToRefs(useConferencesStore());
|
|
25
24
|
const { playerPresentation, livePresentations } = storeToRefs(usePlayerConfigStore());
|
|
@@ -27,6 +26,10 @@ export const useAgenda = (conference) => {
|
|
|
27
26
|
const allowAgendaFullAccess = pagesConfigValue("agenda.agendas_full_access", false);
|
|
28
27
|
const displayTrackGroups = pagesConfigValue("agenda.group_tracks", "None");
|
|
29
28
|
const selectedPresenter = ref(null);
|
|
29
|
+
if (conferences.value[conference.value.id] === void 0) {
|
|
30
|
+
console.log("setting conference config");
|
|
31
|
+
setConferenceConfig(conference.value);
|
|
32
|
+
}
|
|
30
33
|
const days = computed(() => {
|
|
31
34
|
const data = conference.value.days;
|
|
32
35
|
if (data == void 0) return [];
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { Conference } from '../models/conference';
|
|
3
3
|
export type UseConferenceHelpersMethods = {
|
|
4
|
+
/**
|
|
5
|
+
* if conference has a template config, get its values from its 'main' config
|
|
6
|
+
*/
|
|
7
|
+
getConferenceConfigMainValue: (_conference: Conference, _string: string) => {};
|
|
4
8
|
/**
|
|
5
9
|
* Determine if conference is a single day event
|
|
6
10
|
*/
|
|
@@ -31,6 +31,7 @@ export type AgendaPlayerPageConfigs = {
|
|
|
31
31
|
agenda_tab_bg_color: ColorVariable;
|
|
32
32
|
agenda_tab_color: ColorVariable;
|
|
33
33
|
agenda_tab_sponsor_bg_color: ColorVariable;
|
|
34
|
+
agenda_theme: SelectVariable;
|
|
34
35
|
agenda_track_bg_color: ColorVariable;
|
|
35
36
|
agenda_track_group_bg_color: ColorVariable;
|
|
36
37
|
session_end_times: ToggleVariable;
|
|
@@ -81,6 +81,7 @@ export const useTemplateConfigsStore = defineStore("templateConfigs", {
|
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
83
|
setConferenceConfig(conference) {
|
|
84
|
+
if (this.conferences[conference.id] != void 0) return;
|
|
84
85
|
const newPagesConfig = this.portalConfig.pages;
|
|
85
86
|
const confPagesConfig = {};
|
|
86
87
|
const conferenceTemplateConfig = conference.template_config ?? {};
|