@icvdeveloper/common-module 0.0.76 → 0.0.78

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 (106) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +5 -0
  4. package/dist/runtime/@types/components.d.ts +89 -1
  5. package/dist/runtime/assets/svg/answer.svg +14 -14
  6. package/dist/runtime/assets/svg/avatar.svg +1 -1
  7. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  8. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  9. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  10. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  11. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  12. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  13. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  14. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  15. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  16. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  17. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  18. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  19. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  20. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  21. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  22. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  23. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  24. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  25. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  26. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  27. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  28. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  29. package/dist/runtime/assets/svg/phone.svg +1 -1
  30. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  31. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  32. package/dist/runtime/assets/svg/reject.svg +14 -14
  33. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  34. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  35. package/dist/runtime/components/agenda/AgendaList.vue +234 -112
  36. package/dist/runtime/components/agenda/AgendaTabbed.vue +309 -309
  37. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +53 -26
  38. package/dist/runtime/components/agenda/components/Calendar.vue +89 -89
  39. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  40. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  41. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  42. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  43. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  44. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  45. package/dist/runtime/components/auth/Registration.vue +27 -27
  46. package/dist/runtime/components/auth/Ucc.vue +52 -52
  47. package/dist/runtime/components/core/Accordion.vue +97 -97
  48. package/dist/runtime/components/core/CountdownTimer.vue +308 -308
  49. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  50. package/dist/runtime/components/core/Modal.vue +111 -111
  51. package/dist/runtime/components/core/Navbar.vue +154 -154
  52. package/dist/runtime/components/core/SvgIcon.vue +151 -151
  53. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  54. package/dist/runtime/components/events/EventHeader.vue +133 -133
  55. package/dist/runtime/components/events/ListEvents.vue +521 -521
  56. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  57. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  58. package/dist/runtime/components/forms/Message.vue +27 -27
  59. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  60. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  61. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  62. package/dist/runtime/components/forms/TextArea.vue +26 -26
  63. package/dist/runtime/components/forms/TextInput.vue +28 -28
  64. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +170 -0
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +167 -0
  67. package/dist/runtime/components/media/components/AgendaPanel.vue +53 -0
  68. package/dist/runtime/components/media/components/CeCreditNotification.vue +99 -0
  69. package/dist/runtime/components/media/components/CeCreditNotification.vue.d.ts +28 -0
  70. package/dist/runtime/components/media/components/ContentAccordion.vue +65 -0
  71. package/dist/runtime/components/media/components/ContentAccordion.vue.d.ts +29 -0
  72. package/dist/runtime/components/media/components/ContentArea.vue +175 -0
  73. package/dist/runtime/components/media/components/ContentTabs.vue +263 -0
  74. package/dist/runtime/components/media/components/DocumentsPanel.vue +52 -0
  75. package/dist/runtime/components/media/components/DocumentsPanel.vue.d.ts +7 -0
  76. package/dist/runtime/components/media/components/JsonApi.vue +33 -0
  77. package/dist/runtime/components/media/components/JsonApi.vue.d.ts +16 -0
  78. package/dist/runtime/components/media/components/MediaContainer.vue +104 -0
  79. package/dist/runtime/components/media/components/OverviewPanel.vue +51 -0
  80. package/dist/runtime/components/media/components/PresentersPanel.vue +65 -0
  81. package/dist/runtime/components/media/components/PresentersPanel.vue.d.ts +32 -0
  82. package/dist/runtime/components/media/components/SessionReporting.vue +96 -0
  83. package/dist/runtime/components/media/components/SessionReporting.vue.d.ts +35 -0
  84. package/dist/runtime/components/media/components/SponsorsPanel.vue +85 -0
  85. package/dist/runtime/components/media/components/SponsorsPanel.vue.d.ts +27 -0
  86. package/dist/runtime/components/media/components/WindowContent.vue +118 -0
  87. package/dist/runtime/components/media/components/WindowContent.vue.d.ts +50 -0
  88. package/dist/runtime/components/media/components/WindowSlide.vue +92 -0
  89. package/dist/runtime/components/media/components/WindowSlide.vue.d.ts +36 -0
  90. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  91. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  92. package/dist/runtime/components/profile/Profile.vue +149 -149
  93. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  94. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  95. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  96. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  97. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  98. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  99. package/dist/runtime/composables/useStream.d.ts +15 -0
  100. package/dist/runtime/composables/useStream.mjs +89 -0
  101. package/dist/runtime/enums/general.d.ts +7 -0
  102. package/dist/runtime/enums/general.mjs +8 -0
  103. package/dist/runtime/models/conference.d.ts +17 -0
  104. package/dist/runtime/store/presentations.d.ts +11 -0
  105. package/dist/runtime/store/presentations.mjs +10 -0
  106. package/package.json +1 -1
@@ -1,78 +1,78 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed } from "vue";
3
-
4
- type Props = {
5
- title?: string;
6
- tabContent?: {
7
- content?: string;
8
- label?: string;
9
- type?: string;
10
- };
11
- contentObject?: object;
12
- };
13
-
14
- const props = withDefaults(defineProps<Props>(), {
15
- title: "",
16
- tabContent: () => ({}),
17
- contentObject: () => ({}),
18
- });
19
-
20
- // data
21
- const { title, tabContent, contentObject } = toRefs(props);
22
- const active = ref<boolean>(false);
23
-
24
- // computed
25
- const tabTitleValues = computed(() => {
26
- if (title.value) {
27
- return {
28
- title: title.value,
29
- classes: "",
30
- };
31
- } else {
32
- return {
33
- title: tabContent.value.label,
34
- classes: "pl-4",
35
- };
36
- }
37
- });
38
- </script>
39
-
40
- <template>
41
- <div>
42
- <a
43
- v-if="tabContent.type === 'url'"
44
- :href="tabContent.content"
45
- target="_blank"
46
- class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
47
- :class="tabTitleValues.classes"
48
- >
49
- <span class="flex-initial">
50
- {{ tabTitleValues.title }}
51
- </span>
52
- </a>
53
- <a
54
- v-else
55
- href="#"
56
- class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
57
- :class="tabTitleValues.classes"
58
- @click.prevent="active = !active"
59
- >
60
- <span class="flex-initial"> {{ tabTitleValues.title }}&nbsp;&nbsp; </span>
61
- <span
62
- v-show="!active"
63
- class="font-black flex-initial"
64
- style="width: 0.75rem"
65
- >
66
- <CommonSvgIcon icon="downarrow"></CommonSvgIcon>
67
- </span>
68
- <span
69
- v-show="active"
70
- class="font-black flex-initial"
71
- style="width: 0.75rem"
72
- >
73
- <CommonSvgIcon class="invert" icon="downarrow"></CommonSvgIcon>
74
- </span>
75
- </a>
76
- <div v-show="active"><slot /></div>
77
- </div>
78
- </template>
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+
4
+ type Props = {
5
+ title?: string;
6
+ tabContent?: {
7
+ content?: string;
8
+ label?: string;
9
+ type?: string;
10
+ };
11
+ contentObject?: object;
12
+ };
13
+
14
+ const props = withDefaults(defineProps<Props>(), {
15
+ title: "",
16
+ tabContent: () => ({}),
17
+ contentObject: () => ({}),
18
+ });
19
+
20
+ // data
21
+ const { title, tabContent, contentObject } = toRefs(props);
22
+ const active = ref<boolean>(false);
23
+
24
+ // computed
25
+ const tabTitleValues = computed(() => {
26
+ if (title.value) {
27
+ return {
28
+ title: title.value,
29
+ classes: "",
30
+ };
31
+ } else {
32
+ return {
33
+ title: tabContent.value.label,
34
+ classes: "pl-4",
35
+ };
36
+ }
37
+ });
38
+ </script>
39
+
40
+ <template>
41
+ <div>
42
+ <a
43
+ v-if="tabContent.type === 'url'"
44
+ :href="tabContent.content"
45
+ target="_blank"
46
+ class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
47
+ :class="tabTitleValues.classes"
48
+ >
49
+ <span class="flex-initial">
50
+ {{ tabTitleValues.title }}
51
+ </span>
52
+ </a>
53
+ <a
54
+ v-else
55
+ href="#"
56
+ class="py-3 block no-underline w-full font-hairline inline-flex items-center text-md my-1"
57
+ :class="tabTitleValues.classes"
58
+ @click.prevent="active = !active"
59
+ >
60
+ <span class="flex-initial"> {{ tabTitleValues.title }}&nbsp;&nbsp; </span>
61
+ <span
62
+ v-show="!active"
63
+ class="font-black flex-initial"
64
+ style="width: 0.75rem"
65
+ >
66
+ <CommonSvgIcon icon="downarrow"></CommonSvgIcon>
67
+ </span>
68
+ <span
69
+ v-show="active"
70
+ class="font-black flex-initial"
71
+ style="width: 0.75rem"
72
+ >
73
+ <CommonSvgIcon class="invert" icon="downarrow"></CommonSvgIcon>
74
+ </span>
75
+ </a>
76
+ <div v-show="active"><slot /></div>
77
+ </div>
78
+ </template>
@@ -0,0 +1,170 @@
1
+ <script lang="ts" setup>
2
+ import { toRefs } from "vue";
3
+ import { storeToRefs } from "pinia";
4
+ import { useRoute } from "vue-router";
5
+ import { useClassBinding } from "../../composables/useClassBinding";
6
+ import { Conference, Presentation } from "../../models/conference";
7
+ import { SelectedContent } from "../../enums/general";
8
+ import {
9
+ PlayerAndContentClassObj,
10
+ PlayerAndContentCompObj,
11
+ ContentTabsClassObj,
12
+ ContentAreaClassObj,
13
+ MediaContainerClassObj,
14
+ } from "../../@types/components";
15
+
16
+ type Props = {
17
+ conference: Conference;
18
+ presentation: Presentation;
19
+ tabs?: Array<{ label: string; type: SelectedContent; content: string }>;
20
+ classObject?: PlayerAndContentClassObj;
21
+ };
22
+
23
+ const props = withDefaults(defineProps<Props>(), {
24
+ tabs: () => {
25
+ return [
26
+ { label: "Overview", type: SelectedContent.OVERVIEW, content: "string" },
27
+ ];
28
+ },
29
+ classObject: () => {
30
+ return {
31
+ container: "",
32
+ noTabsContainer: "",
33
+ noTabsChild: "",
34
+ withTabsContainer: "",
35
+ withTabsChild: "",
36
+ mediaTabsContainer: "",
37
+ components: ref<PlayerAndContentCompObj>({
38
+ contentTabs: ref<ContentTabsClassObj>({}),
39
+ contentArea: ref<ContentAreaClassObj>({}),
40
+ mediaContainer: ref<MediaContainerClassObj>({}),
41
+ }),
42
+ };
43
+ },
44
+ });
45
+
46
+ const { conference, presentation } = toRefs(props);
47
+
48
+ const route = ref(useRoute());
49
+
50
+ const { classBinding } = useClassBinding();
51
+
52
+ const { selectedContent } = storeToRefs(usePresentationsStore());
53
+ const { isLoggedIn } = storeToRefs(useAuthStore());
54
+
55
+ // computed
56
+
57
+ const isStreamTest = computed((): boolean => {
58
+ return String(route.value.name).includes("stream-test");
59
+ });
60
+
61
+ const hasAccess = computed((): boolean => {
62
+ return isLoggedIn.value && conference.value.access;
63
+ });
64
+ </script>
65
+
66
+ <template>
67
+ <div :class="classBinding(classObject, 'container', 'flex flex-col w-full')">
68
+ <!-- NO TABS -->
69
+ <div
70
+ v-if="isStreamTest || (hasAccess && !tabs.length)"
71
+ :class="
72
+ classBinding(
73
+ classObject,
74
+ 'noTabsContainer',
75
+ 'container mx-auto flex flex-col text-center pt-6'
76
+ )
77
+ "
78
+ >
79
+ <div :class="classBinding(classObject, 'noTabsChild', 'flex-1')">
80
+ <CommonComponentsMediaContainer
81
+ :class="
82
+ classBinding(
83
+ classObject,
84
+ 'classObject.components.mediaContainer.container',
85
+ 'flex-1 aspect-video'
86
+ )
87
+ "
88
+ :webcast-conference="conference"
89
+ :class-object="classObject.components.mediaContainer"
90
+ />
91
+ </div>
92
+ </div>
93
+
94
+ <!-- TABS -->
95
+ <div v-else :class="classBinding(classObject, 'withTabsContainer', '')">
96
+ <CommonComponentsContentTabs
97
+ :class="
98
+ classBinding(
99
+ classObject,
100
+ 'classObject.components.contentTabs.container',
101
+ 'hidden md:block'
102
+ )
103
+ "
104
+ :webcast-conference="conference"
105
+ :items="tabs"
106
+ :class-object="classObject.components.contentTabs"
107
+ />
108
+ <div
109
+ :class="
110
+ classBinding(
111
+ classObject,
112
+ 'withTabsChild',
113
+ 'flex-1 grid grid-cols-7 grid-rows-2 gap-y-4'
114
+ )
115
+ "
116
+ >
117
+ <div
118
+ :class="
119
+ classBinding(
120
+ classObject,
121
+ 'MediaTabsContainer',
122
+ 'col-span-7 row-span-1 md:col-span-4 lg:col-span-5 aspect-video'
123
+ )
124
+ "
125
+ >
126
+ <CommonComponentsMediaContainer
127
+ class="w-full"
128
+ :webcast-conference="conference"
129
+ :class-object="classObject.components.mediaContainer"
130
+ />
131
+ <CommonComponentsContentTabs
132
+ class="block md:hidden"
133
+ :webcast-conference="conference"
134
+ :items="tabs"
135
+ :class-object="classObject.components.contentTabs"
136
+ />
137
+ </div>
138
+ <CommonComponentsContentArea
139
+ class="col-span-7 row-span-1 md:col-span-3 lg:col-span-2 border ml-0 md:ml-6"
140
+ :selected-content="selectedContent"
141
+ :webcast-conference="conference"
142
+ :presentation="presentation"
143
+ :class-object="classObject.components.contentArea"
144
+ />
145
+ <!-- sponsor -->
146
+ <figure
147
+ class="col-span-7 md:col-start-5 md:col-span-3 lg:col-start-6 lg:col-span-6 row-span-1 flex flex-col p-6 text-center"
148
+ >
149
+ <h3
150
+ v-if="conference.affiliates.length > 0"
151
+ class="allsmallcaps text-sm pb-4 text-neutral-400 scala"
152
+ >
153
+ Sponsored by:
154
+ </h3>
155
+ <template v-for="affiliate in conference.affiliates">
156
+ <CommonComponentsSponsor
157
+ v-if="affiliate.role == 'sponsor'"
158
+ :key="affiliate.id"
159
+ :sponsor="affiliate"
160
+ :class-object="{
161
+ labelImageContainer: 'block',
162
+ sponsorContainer: 'img-mx-auto',
163
+ }"
164
+ />
165
+ </template>
166
+ </figure>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </template>
@@ -0,0 +1,167 @@
1
+ <script lang="ts" setup>
2
+ import { toRefs, computed, onMounted, nextTick } from "vue";
3
+ import { get } from "lodash-es";
4
+ import { getUnixTime } from "date-fns";
5
+ import { Presentation, Stream, PlayerObj } from "../../models/conference";
6
+ import { WebcastPlayerClassObj } from "../../@types/components";
7
+ import { useScripts } from "../../composables/useScripts";
8
+ import { useClassBinding } from "../../composables/useClassBinding";
9
+
10
+ type Props = {
11
+ stream: Stream;
12
+ presentation: Presentation;
13
+ classObject?: WebcastPlayerClassObj;
14
+ };
15
+
16
+ const props = withDefaults(defineProps<Props>(), {
17
+ classObject: () => {
18
+ return {
19
+ container: "",
20
+ playerElement: "",
21
+ embedElement: "",
22
+ };
23
+ },
24
+ });
25
+
26
+ const { stream, presentation } = toRefs(props);
27
+
28
+ const { loadScripts } = useScripts();
29
+ const { classBinding } = useClassBinding();
30
+
31
+ // data
32
+ let icvPlayerObj: PlayerObj = {
33
+ autostart: false,
34
+ format: "hls",
35
+ playerDiv: "mediaPlayer",
36
+ loadCustomStream: () => {},
37
+ };
38
+ let timeInterval: NodeJS.Timer | null = null;
39
+
40
+ // emits
41
+ const emit = defineEmits<{
42
+ (event: "time", value: Number): void;
43
+ }>();
44
+
45
+ // computed
46
+ const isHtml = computed(() => {
47
+ return stream.value.type === "embed";
48
+ });
49
+
50
+ const isHls = computed(() => {
51
+ return stream.value.type === "hls";
52
+ });
53
+
54
+ // methods
55
+ const setupMediaPlayer = () => {
56
+ if (icvPlayerObj) {
57
+ icvPlayerObj = <PlayerObj>{};
58
+ }
59
+ if (isHls.value) {
60
+ nextTick(() => {
61
+ icvPlayerObj = new window.ICVDMStreamPlayer();
62
+ icvPlayerObj.format = stream.value.type;
63
+ icvPlayerObj.playerDiv = "mediaPlayer";
64
+ icvPlayerObj.autostart = true;
65
+ playStream();
66
+ });
67
+ }
68
+ };
69
+
70
+ const playStream = () => {
71
+ if (isHls.value) {
72
+ icvPlayerObj.format = ["audio", "audio_slide"].includes(stream.value.type)
73
+ ? "audio"
74
+ : "video";
75
+ icvPlayerObj.loadCustomStream({
76
+ file: stream.value.hls_url,
77
+ });
78
+ }
79
+ };
80
+
81
+ const checkStreamTime = () => {
82
+ const defaultStreamUt = getUnixTime(Date.now()) - 40;
83
+ const maxStreamDelay = defaultStreamUt - 20;
84
+ let streamUt = get(icvPlayerObj, "stream_ut", defaultStreamUt);
85
+
86
+ if (streamUt > maxStreamDelay) {
87
+ streamUt = defaultStreamUt;
88
+ }
89
+ emit("time", streamUt);
90
+ };
91
+
92
+ const cleanup = () => {
93
+ if (icvPlayerObj) {
94
+ icvPlayerObj = <PlayerObj>{};
95
+ }
96
+ clearInterval(timeInterval);
97
+ };
98
+
99
+ // watchers
100
+
101
+ watch(
102
+ presentation,
103
+ (_oldPresentation: Presentation, _newPresentation: Presentation) => {
104
+ if (_oldPresentation.type !== _newPresentation.type) {
105
+ setupMediaPlayer();
106
+ }
107
+ }
108
+ );
109
+
110
+ watch(stream, (_oldStream, _newStream) => {
111
+ if (_oldStream !== _newStream) {
112
+ setupMediaPlayer();
113
+ }
114
+ });
115
+
116
+ // on mount
117
+ // @todo figure out why ICVDMStreamPlayer doesn't load when loadScripts is run asynchroniously
118
+ onMounted(() => {
119
+ const _script = document.createElement("script");
120
+ _script.setAttribute(
121
+ "src",
122
+ "https://cdn.v3mediaportal.com/streaming-player/js/icvdm.player.min.js?_id=75"
123
+ );
124
+ document.head.appendChild(_script);
125
+ _script.onload = () => {
126
+ if (get(window, "ICVDMStreamPlayer", false)) {
127
+ setupMediaPlayer();
128
+ timeInterval = setInterval(checkStreamTime, 1000);
129
+ }
130
+ };
131
+ });
132
+ </script>
133
+
134
+ <template>
135
+ <div
136
+ id="webcast-player-container"
137
+ :class="classBinding(classObject, 'container', 'text-center')"
138
+ >
139
+ <div
140
+ v-if="isHls"
141
+ id="mediaPlayer"
142
+ ref="mediaPlayer"
143
+ :class="classBinding(classObject, 'playerElement', '')"
144
+ ></div>
145
+ <span
146
+ v-if="isHtml"
147
+ :v-html="stream.embed_html"
148
+ :class="classBinding(classObject, 'embedElement', '')"
149
+ ></span>
150
+ </div>
151
+ </template>
152
+
153
+ <style>
154
+ #webcast-player-container > span {
155
+ padding-bottom: 56.25%;
156
+ height: 0;
157
+ position: relative;
158
+ display: block;
159
+ }
160
+ #webcast-player-container > span > iframe {
161
+ position: absolute;
162
+ top: 0;
163
+ left: 0;
164
+ height: 100%;
165
+ width: 100%;
166
+ }
167
+ </style>
@@ -0,0 +1,53 @@
1
+ <script lang="ts" setup>
2
+ import { toRefs } from "vue";
3
+ import { Conference } from "../../../models/conference";
4
+ import {
5
+ AgendaPanelClassObj,
6
+ AgendaPanelCompObj,
7
+ AgendaListClassObj,
8
+ } from "../../../@types/components";
9
+ import { useClassBinding } from "../../../composables/useClassBinding";
10
+
11
+ type Props = {
12
+ conference: Conference | null;
13
+ classObject?: AgendaPanelClassObj;
14
+ };
15
+
16
+ const props = withDefaults(defineProps<Props>(), {
17
+ classObject: () => {
18
+ return {
19
+ container: "",
20
+ components: ref<AgendaPanelCompObj>({
21
+ agendaList: ref<AgendaListClassObj>({}),
22
+ }),
23
+ };
24
+ },
25
+ });
26
+
27
+ const { conference } = toRefs(props);
28
+
29
+ const { classBinding } = useClassBinding();
30
+ </script>
31
+
32
+ <template>
33
+ <div :class="classBinding(classObject, 'container', '')">
34
+ <CommonAgendaList
35
+ :conference="conference"
36
+ :class-object="classObject.components.agendaList"
37
+ style="margin-top: 0; margin-bottom: 0; border: none"
38
+ />
39
+ </div>
40
+ </template>
41
+
42
+ <style scoped>
43
+ .sponsor-grid {
44
+ display: grid;
45
+ grid-template-columns: 1fr 1fr 1fr;
46
+ gap: 10px;
47
+ }
48
+ .sponsor-grid .grid-item {
49
+ align-items: center;
50
+ align-self: center;
51
+ justify-self: center;
52
+ }
53
+ </style>
@@ -0,0 +1,99 @@
1
+ <template>
2
+ <transition name="slide-fade">
3
+ <div v-if="visible" class="flex bg-yellow-lightest shadow text-grey-darker py-6 px-10">
4
+ <div class="flex-1 text-center mx-auto">
5
+ <p>
6
+ Time Remaining <span :class="timeRemainingClass">{{ displayFor }} seconds </span>
7
+ </p>
8
+ <p v-text="promptText"></p>
9
+ <p>
10
+ <button class="btn btn-secondary" @click="acceptClick" v-text="buttonText"></button>
11
+ </p>
12
+ </div>
13
+ </div>
14
+ </transition>
15
+ </template>
16
+
17
+ <script>
18
+ import Echo from 'laravel-echo';
19
+ window.Pusher = require('pusher-js');
20
+
21
+ /**
22
+ @todo Extract the wsHost and app ID out so that this can run in multiple environments (local, staging, production)
23
+ */
24
+
25
+ window.Echo = new Echo({
26
+ key: '07Ve4MlR6FmN0Il8Wy',
27
+ broadcaster: 'pusher',
28
+ cluster: 'us2',
29
+ wsHost: 'socket.v3plusportal.com',
30
+ wsPort: 6001,
31
+ wssPort: 6002,
32
+ disableStats: false,
33
+ encrypted: true,
34
+ enabledTransports: ['ws', 'wss'],
35
+ });
36
+
37
+ export default {
38
+ data() {
39
+ return {
40
+ pusher: null,
41
+ channel: null,
42
+ displayFor: 0,
43
+ promptText: '',
44
+ buttonText: '',
45
+ visible: false,
46
+ countdownLoopId: null,
47
+ };
48
+ },
49
+ computed: {
50
+ timeRemainingClass() {
51
+ if (this.displayFor > 10) {
52
+ return 'font-bold text-green-dark';
53
+ }
54
+ return 'font-bold text-red';
55
+ },
56
+ },
57
+ props: {
58
+ conferenceId: {
59
+ type: Number,
60
+ required: true,
61
+ },
62
+ },
63
+ methods: {
64
+ handleNotification(_conference) {
65
+ clearInterval(this.countdownLoopId);
66
+ window.scrollTo({ top: 0, behavior: 'smooth' });
67
+ this.visible = true;
68
+ this.displayFor = parseInt(_conference.ce_credit_config.display_for) || 30;
69
+ this.promptText = _conference.ce_credit_config.prompt_text;
70
+ this.buttonText = _conference.ce_credit_config.button_text;
71
+ this.countdownLoopId = setInterval(this.countdownLoop, 1000);
72
+ },
73
+ countdownLoop() {
74
+ if (this.displayFor > 0) {
75
+ this.displayFor--;
76
+ } else {
77
+ this.closeNotification();
78
+ }
79
+ },
80
+ acceptClick() {
81
+ this.closeNotification();
82
+ },
83
+ closeNotification() {
84
+ this.displayFor = 0;
85
+ this.visible = false;
86
+ clearInterval(this.countdownLoopId);
87
+ },
88
+ },
89
+ created() {
90
+ window.Echo.channel(`ce-notification.${this.conferenceId}`).listen('CeCreditNotification', event => {
91
+ this.handleNotification(event.conference);
92
+ });
93
+ },
94
+ };
95
+ </script>
96
+
97
+ <style scoped>
98
+
99
+ </style>
@@ -0,0 +1,28 @@
1
+ declare namespace _default {
2
+ function data(): {
3
+ pusher: null;
4
+ channel: null;
5
+ displayFor: number;
6
+ promptText: string;
7
+ buttonText: string;
8
+ visible: boolean;
9
+ countdownLoopId: null;
10
+ };
11
+ namespace computed {
12
+ function timeRemainingClass(): "font-bold text-green-dark" | "font-bold text-red";
13
+ }
14
+ namespace props {
15
+ namespace conferenceId {
16
+ const type: NumberConstructor;
17
+ const required: boolean;
18
+ }
19
+ }
20
+ namespace methods {
21
+ function handleNotification(_conference: any): void;
22
+ function countdownLoop(): void;
23
+ function acceptClick(): void;
24
+ function closeNotification(): void;
25
+ }
26
+ function created(): void;
27
+ }
28
+ export default _default;