@icvdeveloper/common-module 0.0.1

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.
Files changed (141) hide show
  1. package/README.md +6 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.ts +9 -0
  4. package/dist/module.json +8 -0
  5. package/dist/module.mjs +102051 -0
  6. package/dist/runtime/@types/configVariables.d.ts +78 -0
  7. package/dist/runtime/@types/configVariables.mjs +0 -0
  8. package/dist/runtime/analytics.d.ts +8 -0
  9. package/dist/runtime/analytics.mjs +38 -0
  10. package/dist/runtime/assets/scss/_agenda.scss +47 -0
  11. package/dist/runtime/assets/scss/_animations.scss +11 -0
  12. package/dist/runtime/assets/scss/_container_variants.scss +26 -0
  13. package/dist/runtime/assets/scss/_custom.scss +364 -0
  14. package/dist/runtime/assets/scss/_footer.scss +20 -0
  15. package/dist/runtime/assets/scss/_forms.scss +29 -0
  16. package/dist/runtime/assets/scss/_functions.scss +24 -0
  17. package/dist/runtime/assets/scss/_header.scss +41 -0
  18. package/dist/runtime/assets/scss/_index_production.scss +45 -0
  19. package/dist/runtime/assets/scss/_transitions.scss +24 -0
  20. package/dist/runtime/assets/scss/_variables.scss +62 -0
  21. package/dist/runtime/assets/scss/_variables2.scss +0 -0
  22. package/dist/runtime/assets/scss/_webcast.scss +141 -0
  23. package/dist/runtime/assets/scss/index.scss +42 -0
  24. package/dist/runtime/assets/svg/answer.svg +14 -0
  25. package/dist/runtime/assets/svg/avatar.svg +1 -0
  26. package/dist/runtime/assets/svg/bell-icon.svg +3 -0
  27. package/dist/runtime/assets/svg/chat-icon.svg +1 -0
  28. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -0
  29. package/dist/runtime/assets/svg/close-icon.svg +1 -0
  30. package/dist/runtime/assets/svg/icon-avatar.svg +1 -0
  31. package/dist/runtime/assets/svg/icon-close.svg +1 -0
  32. package/dist/runtime/assets/svg/icon-down-arrow.svg +1 -0
  33. package/dist/runtime/assets/svg/icon-facebook.svg +1 -0
  34. package/dist/runtime/assets/svg/icon-info.svg +3 -0
  35. package/dist/runtime/assets/svg/icon-linkedin.svg +1 -0
  36. package/dist/runtime/assets/svg/icon-new-window.svg +11 -0
  37. package/dist/runtime/assets/svg/icon-offline.svg +3 -0
  38. package/dist/runtime/assets/svg/icon-online.svg +3 -0
  39. package/dist/runtime/assets/svg/icon-person.svg +3 -0
  40. package/dist/runtime/assets/svg/icon-play.svg +3 -0
  41. package/dist/runtime/assets/svg/icon-star-filled.svg +30 -0
  42. package/dist/runtime/assets/svg/icon-star.svg +25 -0
  43. package/dist/runtime/assets/svg/icon-twitter.svg +1 -0
  44. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -0
  45. package/dist/runtime/assets/svg/icon-website.svg +3 -0
  46. package/dist/runtime/assets/svg/icon-youtube.svg +1 -0
  47. package/dist/runtime/assets/svg/icon-zoom.svg +10 -0
  48. package/dist/runtime/assets/svg/notification-icon.svg +32 -0
  49. package/dist/runtime/assets/svg/offline-icon.svg +1 -0
  50. package/dist/runtime/assets/svg/online-icon.svg +3 -0
  51. package/dist/runtime/assets/svg/peer2peer.svg +3 -0
  52. package/dist/runtime/assets/svg/phone.svg +1 -0
  53. package/dist/runtime/assets/svg/plus-icon.svg +1 -0
  54. package/dist/runtime/assets/svg/red-icon.svg +3 -0
  55. package/dist/runtime/assets/svg/reject.svg +14 -0
  56. package/dist/runtime/assets/svg/search-icon.svg +3 -0
  57. package/dist/runtime/components/affiliates/AffiliatePage.vue +16 -0
  58. package/dist/runtime/components/agenda/AgendaTabbed.vue +342 -0
  59. package/dist/runtime/components/agenda/components/InfoLink.vue +55 -0
  60. package/dist/runtime/components/agenda/components/PlayIcon.vue +48 -0
  61. package/dist/runtime/components/agenda/components/PresentationLink.vue +147 -0
  62. package/dist/runtime/components/agenda/components/Sponsor.vue +108 -0
  63. package/dist/runtime/components/auth/LoginFullWidth.vue +76 -0
  64. package/dist/runtime/components/core/CountdownTimer.vue +275 -0
  65. package/dist/runtime/components/core/DynamicHtml.vue +16 -0
  66. package/dist/runtime/components/core/DynamicHtml.vue.d.ts +2 -0
  67. package/dist/runtime/components/core/Modal.vue +84 -0
  68. package/dist/runtime/components/core/SvgIcon.vue +119 -0
  69. package/dist/runtime/components/core/ZoomModal.vue +37 -0
  70. package/dist/runtime/components/events/EventHeader.vue +131 -0
  71. package/dist/runtime/components/events/PastEvents.vue +150 -0
  72. package/dist/runtime/components/events/UpcomingEvents.vue +145 -0
  73. package/dist/runtime/components/forms/ErrorField.vue +19 -0
  74. package/dist/runtime/components/forms/Message.vue +25 -0
  75. package/dist/runtime/components/forms/SearchInput.vue +30 -0
  76. package/dist/runtime/components/forms/SupportForm.vue +109 -0
  77. package/dist/runtime/components/forms/TextArea.vue +26 -0
  78. package/dist/runtime/components/forms/TextInput.vue +22 -0
  79. package/dist/runtime/components/layouts/Accordion.vue +76 -0
  80. package/dist/runtime/components/presenters/PresenterListing.vue +89 -0
  81. package/dist/runtime/components/presenters/PresenterModal.vue +83 -0
  82. package/dist/runtime/composables/useAgenda.d.ts +81 -0
  83. package/dist/runtime/composables/useAgenda.mjs +178 -0
  84. package/dist/runtime/composables/useAnalytics.d.ts +7 -0
  85. package/dist/runtime/composables/useAnalytics.mjs +10 -0
  86. package/dist/runtime/composables/useApi.d.ts +1 -0
  87. package/dist/runtime/composables/useApi.mjs +16 -0
  88. package/dist/runtime/composables/useConferenceHelpers.d.ts +65 -0
  89. package/dist/runtime/composables/useConferenceHelpers.mjs +270 -0
  90. package/dist/runtime/composables/useDateFormat.d.ts +12 -0
  91. package/dist/runtime/composables/useDateFormat.mjs +21 -0
  92. package/dist/runtime/composables/useLogin.d.ts +30 -0
  93. package/dist/runtime/composables/useLogin.mjs +58 -0
  94. package/dist/runtime/composables/usePresentation.d.ts +53 -0
  95. package/dist/runtime/composables/usePresentation.mjs +98 -0
  96. package/dist/runtime/composables/usePresenter.d.ts +15 -0
  97. package/dist/runtime/composables/usePresenter.mjs +67 -0
  98. package/dist/runtime/composables/usePresenters.d.ts +13 -0
  99. package/dist/runtime/composables/usePresenters.mjs +21 -0
  100. package/dist/runtime/composables/useV3plusCommonModule.d.ts +2 -0
  101. package/dist/runtime/composables/useV3plusCommonModule.mjs +2 -0
  102. package/dist/runtime/models/affiliate.d.ts +1 -0
  103. package/dist/runtime/models/affiliate.mjs +0 -0
  104. package/dist/runtime/models/authUser.d.ts +16 -0
  105. package/dist/runtime/models/authUser.mjs +0 -0
  106. package/dist/runtime/models/conference.d.ts +124 -0
  107. package/dist/runtime/models/conference.mjs +18 -0
  108. package/dist/runtime/models/globalConfig.d.ts +80 -0
  109. package/dist/runtime/models/globalConfig.mjs +0 -0
  110. package/dist/runtime/models/group.d.ts +14 -0
  111. package/dist/runtime/models/group.mjs +0 -0
  112. package/dist/runtime/models/icons.d.ts +18 -0
  113. package/dist/runtime/models/icons.mjs +0 -0
  114. package/dist/runtime/models/navigationConfig.d.ts +8 -0
  115. package/dist/runtime/models/navigationConfig.mjs +0 -0
  116. package/dist/runtime/models/pagesConfig.d.ts +169 -0
  117. package/dist/runtime/models/pagesConfig.mjs +0 -0
  118. package/dist/runtime/models/portal.d.ts +8 -0
  119. package/dist/runtime/models/portal.mjs +0 -0
  120. package/dist/runtime/models/templateConfig.d.ts +44 -0
  121. package/dist/runtime/models/templateConfig.mjs +0 -0
  122. package/dist/runtime/plugin.d.ts +2 -0
  123. package/dist/runtime/plugin.mjs +55 -0
  124. package/dist/runtime/store/affiliates.d.ts +12 -0
  125. package/dist/runtime/store/affiliates.mjs +35 -0
  126. package/dist/runtime/store/auth.d.ts +14 -0
  127. package/dist/runtime/store/auth.mjs +32 -0
  128. package/dist/runtime/store/conferences.d.ts +13 -0
  129. package/dist/runtime/store/conferences.mjs +86 -0
  130. package/dist/runtime/store/navigationConfig.d.ts +7 -0
  131. package/dist/runtime/store/navigationConfig.mjs +14 -0
  132. package/dist/runtime/store/portal.d.ts +9 -0
  133. package/dist/runtime/store/portal.mjs +39 -0
  134. package/dist/runtime/store/support.d.ts +3 -0
  135. package/dist/runtime/store/support.mjs +20 -0
  136. package/dist/runtime/store/templateConfigs.d.ts +20 -0
  137. package/dist/runtime/store/templateConfigs.mjs +84 -0
  138. package/dist/runtime/v3plusCommonPlugin.d.ts +14 -0
  139. package/dist/runtime/v3plusCommonPlugin.mjs +8 -0
  140. package/dist/types.d.ts +10 -0
  141. package/package.json +57 -0
@@ -0,0 +1,22 @@
1
+ <script lang="ts" setup>
2
+ type Props = {
3
+ modelValue: string;
4
+ placeholder: string;
5
+ type: string;
6
+ };
7
+
8
+ const props = defineProps<Props>();
9
+
10
+ const emit = defineEmits<{
11
+ (event: "update:modelValue", value: string): void;
12
+ }>();
13
+
14
+ // methods
15
+ const changeInput = (e) => {
16
+ emit("update:modelValue", e.target.value);
17
+ };
18
+ </script>
19
+
20
+ <template>
21
+ <input :value="props.modelValue" @change="changeInput" />
22
+ </template>
@@ -0,0 +1,76 @@
1
+ <script lang="ts" setup>
2
+ type Props = {
3
+ title?: string;
4
+ tabContent?: {
5
+ content?: string;
6
+ label?: string;
7
+ type?: string;
8
+ };
9
+ contentObject?: object;
10
+ };
11
+
12
+ const props = withDefaults(defineProps<Props>(), {
13
+ title: "",
14
+ tabContent: () => ({}),
15
+ contentObject: () => ({}),
16
+ });
17
+
18
+ // data
19
+ const { title, tabContent, contentObject } = toRefs(props);
20
+ const active = ref<boolean>(false);
21
+
22
+ // computed
23
+ const tabTitleValues = computed(() => {
24
+ if (title.value) {
25
+ return {
26
+ title: title.value,
27
+ classes: "",
28
+ };
29
+ } else {
30
+ return {
31
+ title: tabContent.value.label,
32
+ classes: "pl-4",
33
+ };
34
+ }
35
+ });
36
+ </script>
37
+
38
+ <template>
39
+ <div>
40
+ <a
41
+ v-if="tabContent.type === 'url'"
42
+ :href="tabContent.content"
43
+ target="_blank"
44
+ class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
45
+ :class="tabTitleValues.classes"
46
+ >
47
+ <span class="flex-initial">
48
+ {{ tabTitleValues.title }}
49
+ </span>
50
+ </a>
51
+ <a
52
+ v-else
53
+ href="#"
54
+ class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
55
+ :class="tabTitleValues.classes"
56
+ @click.prevent="active = !active"
57
+ >
58
+ <span class="flex-initial"> {{ tabTitleValues.title }}&nbsp;&nbsp; </span>
59
+ <span
60
+ v-show="!active"
61
+ class="font-black flex-initial"
62
+ style="width: 0.75rem"
63
+ >
64
+ <CommonSvgIcon icon="downarrow"></CommonSvgIcon>
65
+ </span>
66
+ <span
67
+ v-show="active"
68
+ class="font-black flex-initial"
69
+ style="width: 0.75rem"
70
+ >
71
+ <CommonSvgIcon class="invert" icon="downarrow"></CommonSvgIcon>
72
+ </span>
73
+ </a>
74
+ <div v-show="active"><slot /></div>
75
+ </div>
76
+ </template>
@@ -0,0 +1,89 @@
1
+ <script lang="ts" setup>
2
+ import { Presenter } from "../../models/conference";
3
+ import { usePresenter } from "../../composables/usePresenter";
4
+
5
+ type Props = {
6
+ presenter: Presenter;
7
+ textClass?: string;
8
+ linkClass?: string;
9
+ enableBio?: boolean;
10
+ showBio?: boolean;
11
+ isSmallGroupedTrack?: boolean;
12
+ };
13
+
14
+ const props = withDefaults(defineProps<Props>(), {
15
+ textClass: "font-medium text-lg",
16
+ linkClass: "",
17
+ enableBio: true,
18
+ showBio: false,
19
+ isSmallGroupedTrack: false,
20
+ });
21
+
22
+ const emit = defineEmits(["clicked"]);
23
+
24
+ const { presenter, textClass, linkClass, enableBio, isSmallGroupedTrack } =
25
+ toRefs(props);
26
+ const { fullName, titleCompany } = usePresenter(presenter);
27
+
28
+ // methods
29
+ const handleClick = () => {
30
+ if (enableBio.value) {
31
+ emit("clicked");
32
+ }
33
+ };
34
+ </script>
35
+
36
+ <template>
37
+ <div :class="textClass">
38
+ <p class="my-1">
39
+ <a
40
+ v-if="enableBio"
41
+ class="cursor-pointer"
42
+ :class="linkClass"
43
+ @click="handleClick()"
44
+ >{{ fullName }}</a
45
+ >
46
+ <span v-else>{{ fullName }}</span>
47
+ <span
48
+ v-if="presenter.role == 'moderator'"
49
+ class="text-grey-dark"
50
+ :class="isSmallGroupedTrack ? 'new-line' : 'no-new-line'"
51
+ >Moderator</span
52
+ >
53
+ <span
54
+ v-if="titleCompany"
55
+ class="font-light paragraph-color-1"
56
+ :class="isSmallGroupedTrack ? 'new-line' : 'new-line-responsive'"
57
+ >{{ titleCompany }}</span
58
+ >
59
+ </p>
60
+ <p
61
+ v-if="showBio && presenter.biography"
62
+ class="font-light text-base paragraph-color-1"
63
+ v-html="presenter.biography"
64
+ ></p>
65
+ </div>
66
+ </template>
67
+
68
+ <style scoped lang="scss">
69
+ .new-line:before {
70
+ content: "\a ";
71
+ white-space: pre;
72
+ }
73
+ .no-new-line:before {
74
+ content: " - ";
75
+ white-space: normal;
76
+ }
77
+ @media (max-width: 991px) {
78
+ .new-line-responsive:before {
79
+ content: "\a ";
80
+ white-space: pre;
81
+ }
82
+ }
83
+ @media (min-width: 992px) {
84
+ .new-line-responsive:before {
85
+ content: " - ";
86
+ white-space: normal;
87
+ }
88
+ }
89
+ </style>
@@ -0,0 +1,83 @@
1
+ <script lang="ts" setup>
2
+ import { Presenter } from "../../models/conference";
3
+ import { usePresenter } from "../../composables/usePresenter";
4
+
5
+ type Props = {
6
+ presenter: Presenter;
7
+ useIcon?: boolean;
8
+ isSmallGroupedTrack: boolean;
9
+ };
10
+
11
+ const props = withDefaults(defineProps<Props>(), {
12
+ useIcon: true,
13
+ });
14
+
15
+ const { presenter, useIcon, isSmallGroupedTrack } = toRefs(props);
16
+ const modalVisible = ref<boolean>(false);
17
+
18
+ // methods
19
+ const { fullName, presenterImageStyle, itemWidthStyle, isGrayScale } =
20
+ usePresenter(presenter);
21
+ </script>
22
+
23
+ <template>
24
+ <div>
25
+ <div v-if="useIcon" class="presenter-icon cursor-pointer">
26
+ <CommonSvgIcon icon="info" :greyscale="isGrayScale"></CommonSvgIcon>
27
+ </div>
28
+
29
+ <CommonPresenterListing
30
+ v-else
31
+ :presenter="presenter"
32
+ :enable-bio="true"
33
+ :show-bio="false"
34
+ text-class="font-bold text-base"
35
+ link-class="agenda-presenter-color"
36
+ :is-small-grouped-track="isSmallGroupedTrack"
37
+ >
38
+ </CommonPresenterListing>
39
+
40
+ <CommonModal :visible="modalVisible" @trigger="modalVisible = false">
41
+ <template #modal-title>
42
+ <div
43
+ class="flex flex-col lg:flex-row w-full pb-8 mb-8 border-b border-solid border-grey-light"
44
+ >
45
+ <div class="flex-1 mb-6 lg:mb-0 lg:flex-initial flex justify-center">
46
+ <div
47
+ v-if="presenter.photo"
48
+ :style="presenterImageStyle"
49
+ class="border-white border-2 shadow-md bg-white"
50
+ >
51
+ <img
52
+ :src="presenter.photo"
53
+ class="invisible"
54
+ :style="itemWidthStyle"
55
+ />
56
+ </div>
57
+ </div>
58
+ <div class="flex-1 pl-4 text-center lg:text-left flex">
59
+ <div class="flex-1 self-center">
60
+ <h1
61
+ class="flex-1 font-light mb-0 body-color-4 presenter-name-color"
62
+ >
63
+ {{ fullName }}
64
+ </h1>
65
+ <p
66
+ class="flex-1 font-normal text-base pt-2 leading-tight mb-0 body-color-5 presenter-title-color"
67
+ >
68
+ {{ presenter.title }}<br />{{ presenter.company }}
69
+ </p>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </template>
74
+ <template #modal-body>
75
+ <p class="font-normal text-center lg:text-left">
76
+ <CommonDynamicHtml
77
+ :template="presenter.biography"
78
+ ></CommonDynamicHtml>
79
+ </p>
80
+ </template>
81
+ </CommonModal>
82
+ </div>
83
+ </template>
@@ -0,0 +1,81 @@
1
+ import { Ref, ComputedRef } from "nuxt/dist/app/compat/capi";
2
+ import { Conference, Day, Presentation, Presenter, Sponsor, Track, TrackGroup } from "../models/conference";
3
+ export declare type UseAgendaMethods = {
4
+ /**
5
+ * conference days.
6
+ */
7
+ days: ComputedRef<Day[]>;
8
+ /**
9
+ * Selected day.
10
+ */
11
+ selectedDay: Ref<Day | null>;
12
+ /**
13
+ * Enabled Sponsors
14
+ */
15
+ enabledSponsors: ComputedRef<Sponsor[]>;
16
+ /**
17
+ * Display Track Groups
18
+ */
19
+ displayTrackGroups: string;
20
+ /**
21
+ * Horizonal track groups
22
+ */
23
+ horizontalTrackGroups: ComputedRef<boolean>;
24
+ /**
25
+ * Selected presenter
26
+ */
27
+ selectedPresenter: Ref<Presenter | null>;
28
+ /**
29
+ * Set selected day
30
+ */
31
+ setSelectedDay: (day: Day) => void;
32
+ /**
33
+ * show tab dates
34
+ */
35
+ showTabDates: (day: Day) => boolean;
36
+ /**
37
+ * should show sponsors
38
+ */
39
+ shouldShowSponsors: (day: Day) => boolean;
40
+ /**
41
+ * Get combined track list.
42
+ */
43
+ getCombinedTrackList: (day: Day) => Track[] | TrackGroup[];
44
+ /**
45
+ * Has Presentations
46
+ */
47
+ hasPresentations: (track: Track | TrackGroup) => boolean;
48
+ /**
49
+ * is grouped Track
50
+ */
51
+ isGroupedTrack: (track: Track | TrackGroup) => boolean;
52
+ /**
53
+ * is small grouped track
54
+ */
55
+ isSmallGroupedTrack: (track: Track | TrackGroup) => boolean;
56
+ /**
57
+ * get tracks
58
+ */
59
+ getTracks: (track: Track | TrackGroup) => Track[];
60
+ /**
61
+ * get track classes
62
+ */
63
+ getTrackClasses: (track: Track | TrackGroup, index: number) => string;
64
+ /**
65
+ * show info link
66
+ */
67
+ showInfoLink: () => boolean;
68
+ /**
69
+ * use accordion
70
+ */
71
+ useAccordion: () => boolean;
72
+ /**
73
+ * use presenter modal
74
+ */
75
+ usePresenterModal: () => boolean;
76
+ /**
77
+ * show presenter description
78
+ */
79
+ showPresenterDescription: (presenter: Presenter, presentation: Presentation) => void;
80
+ };
81
+ export declare const useAgenda: (conference: Ref<Conference>) => UseAgendaMethods;
@@ -0,0 +1,178 @@
1
+ import { get, remove, cloneDeep, intersectionBy, pullAllBy } from "lodash";
2
+ import { storeToRefs } from "pinia";
3
+ import { differenceInSeconds } from "date-fns";
4
+ import { useAffiliatesStore } from "../store/affiliates.mjs";
5
+ export const useAgenda = (conference) => {
6
+ const { setConferenceConfig, pagesConfigValue } = useTemplateConfigsStore();
7
+ setConferenceConfig(conference.value);
8
+ const affiliateStore = useAffiliatesStore();
9
+ const { isLoggedIn } = storeToRefs(useAuthStore());
10
+ const selectedDay = ref(null);
11
+ const displayTrackGroups = pagesConfigValue("agenda.group_tracks", "None");
12
+ const selectedPresenter = ref(null);
13
+ const days = computed(() => {
14
+ const data = conference.value.days;
15
+ if (isLoggedIn.value) {
16
+ remove(data, ["access", false]);
17
+ }
18
+ return data;
19
+ });
20
+ const enabledSponsors = computed(() => {
21
+ return affiliateStore.getConferenceAffiliates(conference.value.id);
22
+ });
23
+ const horizontalTrackGroups = computed(() => {
24
+ return displayTrackGroups === "Horizonal";
25
+ });
26
+ const setSelectedDay = (day) => {
27
+ selectedDay.value = day;
28
+ };
29
+ const showTabDates = (day) => {
30
+ return pagesConfigValue("agenda.tab_dates", true) && get(day, "date_visible", true);
31
+ };
32
+ const shouldShowSponsors = (day) => {
33
+ return day.sponsors.length > 0 && pagesConfigValue("agenda.sponsors");
34
+ };
35
+ const getCombinedTrackList = (day) => {
36
+ const trackGroups = cloneDeep(day.track_groups ?? {});
37
+ const tracks = cloneDeep(day.tracks ?? {});
38
+ if (isLoggedIn.value) {
39
+ remove(tracks, ["access", false]);
40
+ }
41
+ if (displayTrackGroups === "None") {
42
+ tracks.sort((trackA, trackB) => {
43
+ return differenceInSeconds(
44
+ new Date(trackA.date),
45
+ new Date(trackB.date)
46
+ );
47
+ });
48
+ return tracks;
49
+ }
50
+ let duplicateTracks = [];
51
+ trackGroups.forEach((trackGroup) => {
52
+ duplicateTracks = intersectionBy(tracks, trackGroup.tracks, "id");
53
+ pullAllBy(tracks, duplicateTracks, "id");
54
+ if (isLoggedIn.value) {
55
+ remove(trackGroup.tracks, ["access", false]);
56
+ }
57
+ trackGroup.tracks.sort((trackA, trackB) => {
58
+ return differenceInSeconds(
59
+ new Date(trackA.date),
60
+ new Date(trackB.date)
61
+ );
62
+ });
63
+ trackGroup.type = "track_group";
64
+ });
65
+ tracks.forEach((track) => {
66
+ track.type = "track";
67
+ });
68
+ const combinedArray = trackGroups.concat(tracks);
69
+ combinedArray.sort((trackA, trackB) => {
70
+ return differenceInSeconds(new Date(trackA.date), new Date(trackB.date));
71
+ });
72
+ return combinedArray;
73
+ };
74
+ const hasPresentations = (track) => {
75
+ if (track.type === "track_group") {
76
+ for (let i = 0; i < get(track, "tracks.length", 0); i++) {
77
+ if (get(track.tracks[i], "presentations.length", 0) > 0) {
78
+ return true;
79
+ }
80
+ }
81
+ return false;
82
+ } else {
83
+ return get(track, "presentations.length", 0) > 0;
84
+ }
85
+ };
86
+ const isGroupedTrack = (track) => {
87
+ return track.type === "track_group" && horizontalTrackGroups.value === true;
88
+ };
89
+ const isSmallGroupedTrack = (track) => {
90
+ if (isGroupedTrack(track)) {
91
+ if (get(track, "tracks.length", 0) > 1) {
92
+ return true;
93
+ }
94
+ }
95
+ return false;
96
+ };
97
+ const getTracks = (track) => {
98
+ if (track.type === "track_group") {
99
+ return track.tracks;
100
+ } else {
101
+ return [track];
102
+ }
103
+ };
104
+ const getTrackClasses = (track, index) => {
105
+ let classes = "";
106
+ if (isGroupedTrack(track)) {
107
+ switch (index) {
108
+ case 0:
109
+ case 4:
110
+ classes += "agenda-grouped-track-color-1";
111
+ break;
112
+ case 1:
113
+ case 5:
114
+ classes += "agenda-grouped-track-color-2";
115
+ break;
116
+ case 2:
117
+ case 6:
118
+ classes += "agenda-grouped-track-color-3";
119
+ break;
120
+ case 3:
121
+ case 7:
122
+ classes += "agenda-grouped-track-color-4";
123
+ break;
124
+ }
125
+ if (get(track, "tracks.length", 0) === 1) {
126
+ classes += " lg:flex-row";
127
+ }
128
+ } else {
129
+ classes = "lg:flex-row";
130
+ }
131
+ return classes;
132
+ };
133
+ onBeforeMount(() => {
134
+ if (!affiliateStore.hasFetchedAffilites(conference.value.id)) {
135
+ affiliateStore.getAffiliates(conference.value.id);
136
+ }
137
+ if (selectedDay.value === null) {
138
+ selectedDay.value = conference.value.days[0];
139
+ }
140
+ });
141
+ const showInfoLink = () => {
142
+ return pagesConfigValue("agenda.session_desc_link") !== "none";
143
+ };
144
+ const useAccordion = () => {
145
+ return pagesConfigValue("agenda.use_accordion");
146
+ };
147
+ const usePresenterModal = () => {
148
+ return pagesConfigValue("agenda.use_presenter_modal");
149
+ };
150
+ const showPresenterDescription = (presenter, presentation) => {
151
+ if (selectedPresenter.value.presentationId === presentation.id && selectedPresenter.value.id === presenter.id) {
152
+ selectedPresenter.value = null;
153
+ } else {
154
+ selectedPresenter.value = presenter;
155
+ }
156
+ };
157
+ return {
158
+ days,
159
+ enabledSponsors,
160
+ selectedDay,
161
+ displayTrackGroups,
162
+ horizontalTrackGroups,
163
+ selectedPresenter,
164
+ setSelectedDay,
165
+ showTabDates,
166
+ shouldShowSponsors,
167
+ getCombinedTrackList,
168
+ hasPresentations,
169
+ isGroupedTrack,
170
+ isSmallGroupedTrack,
171
+ getTracks,
172
+ getTrackClasses,
173
+ showInfoLink,
174
+ useAccordion,
175
+ usePresenterModal,
176
+ showPresenterDescription
177
+ };
178
+ };
@@ -0,0 +1,7 @@
1
+ export declare type UseAnalyticsMethods = {
2
+ /**
3
+ * Fire event to google analytics
4
+ */
5
+ fireEvent: (event: string, label: string) => void;
6
+ };
7
+ export declare const useAnalytics: () => UseAnalyticsMethods;
@@ -0,0 +1,10 @@
1
+ import { useV3plusCommonModule } from "./useV3plusCommonModule.mjs";
2
+ export const useAnalytics = () => {
3
+ const module = useV3plusCommonModule();
4
+ const fireEvent = (event, label) => {
5
+ module.analytics.click(event, label);
6
+ };
7
+ return {
8
+ fireEvent
9
+ };
10
+ };
@@ -0,0 +1 @@
1
+ export declare const useApi: () => any;
@@ -0,0 +1,16 @@
1
+ import { useAuthStore } from "../store/auth.mjs";
2
+ import { useV3plusCommonModule } from "./useV3plusCommonModule.mjs";
3
+ export const useApi = () => {
4
+ const authStore = useAuthStore();
5
+ const commonModule = useV3plusCommonModule();
6
+ const headers = {
7
+ "X-Portal-Token": commonModule.options.portalHash
8
+ };
9
+ if (useAuthStore().isLoggedIn) {
10
+ headers.Authorization = `Bearer ${authStore.user.token}`;
11
+ }
12
+ return $fetch.create({
13
+ baseURL: commonModule.options.apiUrl,
14
+ headers
15
+ });
16
+ };
@@ -0,0 +1,65 @@
1
+ import { Ref } from "vue";
2
+ import { Conference } from "../models/conference";
3
+ export declare type UseConferenceHelpersMethods = {
4
+ /**
5
+ * Determine if conference is a single day event
6
+ */
7
+ isSingleDayEvent: (conference?: Conference) => boolean;
8
+ /**
9
+ * Determine if the webcast button should be shown
10
+ */
11
+ showConferenceWebcastButton: (conference?: Conference) => boolean;
12
+ /**
13
+ * get webcast button text
14
+ */
15
+ getConferenceWebcastButtonText: (conference?: Conference) => string;
16
+ /**
17
+ * Get conference webcast url
18
+ */
19
+ getConferenceWebcastUrl: (conference?: Conference) => string;
20
+ /**
21
+ * Get conference display date.
22
+ */
23
+ getConferenceDisplayDate: (conference?: Conference) => string;
24
+ /**
25
+ * Determine if show view archive button should be shown
26
+ */
27
+ showViewArchiveButton: (conference?: Conference) => boolean;
28
+ /**
29
+ * get view archive button text
30
+ */
31
+ getViewArchiveUrl: (conference?: Conference) => string;
32
+ /**
33
+ * get view archive button text
34
+ */
35
+ getViewArchiveButtonText: (conference?: Conference) => string;
36
+ /**
37
+ * determine if reg button should be shown
38
+ */
39
+ showConferenceRegButton: (conference?: Conference) => boolean;
40
+ /**
41
+ * Get conference registration url
42
+ */
43
+ getConferenceRegUrl: (conference?: Conference) => string;
44
+ /**
45
+ * get conference registration text
46
+ */
47
+ getConferenceRegText: (conference?: Conference) => string;
48
+ /**
49
+ * Show conference View button
50
+ */
51
+ showConferenceViewButton: (conference?: Conference) => boolean;
52
+ /**
53
+ * conference is live
54
+ */
55
+ conferenceIsLive: (conference?: Conference) => boolean;
56
+ /**
57
+ * conference is mixed
58
+ */
59
+ conferenceIsMixed: (conference?: Conference) => boolean;
60
+ /**
61
+ * conference is Archived
62
+ */
63
+ conferenceIsArchived: (conference?: Conference) => boolean;
64
+ };
65
+ export declare const useConferenceHelpers: (conferences: Ref<Conference> | Ref<Conference[]>) => UseConferenceHelpersMethods;