@icvdeveloper/common-module 0.0.98 → 0.0.100

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 (94) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/assets/svg/answer.svg +14 -14
  4. package/dist/runtime/assets/svg/avatar.svg +1 -1
  5. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  6. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  7. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  10. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  11. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  13. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  14. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  15. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  17. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  19. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  20. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  21. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  22. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  23. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  24. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  25. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  26. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  27. package/dist/runtime/assets/svg/phone.svg +1 -1
  28. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  29. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  30. package/dist/runtime/assets/svg/reject.svg +14 -14
  31. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  32. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  33. package/dist/runtime/components/agenda/AgendaList.vue +243 -243
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +309 -309
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +53 -53
  36. package/dist/runtime/components/agenda/components/Calendar.vue +89 -89
  37. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  38. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  39. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  40. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  41. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  42. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  43. package/dist/runtime/components/auth/Registration.vue +27 -27
  44. package/dist/runtime/components/auth/Ucc.vue +124 -124
  45. package/dist/runtime/components/core/Accordion.vue +97 -97
  46. package/dist/runtime/components/core/CountdownTimer.vue +357 -357
  47. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  48. package/dist/runtime/components/core/Modal.vue +111 -111
  49. package/dist/runtime/components/core/Navbar.vue +154 -154
  50. package/dist/runtime/components/core/SvgIcon.vue +151 -151
  51. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  52. package/dist/runtime/components/events/EventHeader.vue +133 -133
  53. package/dist/runtime/components/events/ListEvents.vue +531 -531
  54. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  55. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  56. package/dist/runtime/components/forms/Message.vue +27 -27
  57. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  58. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  59. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  60. package/dist/runtime/components/forms/TextArea.vue +26 -26
  61. package/dist/runtime/components/forms/TextInput.vue +28 -28
  62. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  63. package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +157 -157
  64. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +186 -186
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +175 -175
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +167 -167
  67. package/dist/runtime/components/media/components/AgendaPanel.vue +43 -43
  68. package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +91 -91
  69. package/dist/runtime/components/media/components/CeCreditNotification.vue +95 -95
  70. package/dist/runtime/components/media/components/ContentAccordion.vue +63 -63
  71. package/dist/runtime/components/media/components/ContentAccordion.vue.d.ts +1 -3
  72. package/dist/runtime/components/media/components/ContentArea.vue +158 -158
  73. package/dist/runtime/components/media/components/ContentTabs.vue +231 -231
  74. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  75. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  76. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  77. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  78. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  79. package/dist/runtime/components/media/components/SessionReporting.vue +93 -93
  80. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  81. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  82. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  83. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  84. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  85. package/dist/runtime/components/profile/Profile.vue +149 -149
  86. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  87. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  88. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  89. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  90. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  91. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  92. package/dist/runtime/composables/useUcc.mjs +2 -1
  93. package/package.json +1 -1
  94. package/dist/.DS_Store +0 -0
@@ -1,533 +1,533 @@
1
- <script lang="ts" setup>
2
- import { ref, toRefs, computed } from "vue";
3
- import { storeToRefs } from "pinia";
4
- import { useConferencesStore } from "../../store/conferences";
5
- import { useTemplateConfigsStore } from "../../store/templateConfigs";
6
- import { useDateFormat } from "../../composables/useDateFormat";
7
- import { useConferenceHelpers } from "../../composables/useConferenceHelpers";
8
- import { useEvents } from "../../composables/useEvents";
9
- import { useClassBinding } from "../../composables/useClassBinding";
10
- import CommonSponsor from "../agenda/components/Sponsor.vue";
11
- import { Conference, ConferenceState } from "../../models/conference";
12
- import { Position } from "../../enums/general";
13
- import {
14
- listEventsClassObj,
15
- listEventsCompObj,
16
- countdownTimerClassObj,
17
- sponsorClassObj,
18
- } from "../../@types/components";
19
-
20
- interface Props {
21
- showSponsors?: boolean;
22
- showBrand?: boolean;
23
- showCountdown?: boolean;
24
- liveButton?: boolean;
25
- mediaButton?: boolean;
26
- registerButton?: boolean;
27
- loginButton?: boolean;
28
- viewInfoButton?: boolean;
29
- registerPathPrefix?: string;
30
- eventPathPrefix?: string;
31
- liveButtonOpensStream?: boolean;
32
- isUpcoming?: boolean;
33
- showEventImage?: boolean;
34
- sponsorPosition?: Position;
35
- borderPosition?: Position;
36
- countdownPosition?: Position;
37
- classObject?: listEventsClassObj;
38
- }
39
-
40
- const props = withDefaults(defineProps<Props>(), {
41
- showSponsors: true,
42
- showBrand: true,
43
- showCountdown: true,
44
- liveButton: false,
45
- mediaButton: true,
46
- registerButton: true,
47
- loginButton: true,
48
- viewInfoButton: true,
49
- registerPathPrefix: "",
50
- eventPathPrefix: "",
51
- liveButtonOpensStream: true,
52
- isUpcoming: true,
53
- showEventImage: true,
54
- sponsorPosition: Position.RIGHT,
55
- borderPosition: Position.MIDDLE,
56
- countdownPosition: Position.BOTTOM,
57
- classObject: () => {
58
- return {
59
- components: ref<listEventsCompObj>({
60
- countdownTimer: ref<countdownTimerClassObj>({}),
61
- sponsor: ref<sponsorClassObj>({}),
62
- }),
63
- };
64
- },
65
- });
66
-
67
- const {
68
- showSponsors,
69
- showBrand,
70
- showCountdown,
71
- liveButton,
72
- mediaButton,
73
- registerButton,
74
- registerPathPrefix,
75
- loginButton,
76
- viewInfoButton,
77
- isUpcoming,
78
- showEventImage,
79
- sponsorPosition,
80
- borderPosition,
81
- countdownPosition,
82
- classObject,
83
- } = toRefs(props);
84
-
85
- // data
86
- const { pastEvents, upcomingEvents } = storeToRefs(useConferencesStore());
87
-
88
- // methods
89
- const { globalConfigValue, pagesConfigValue } = storeToRefs(
90
- useTemplateConfigsStore()
91
- );
92
- const { formatDate } = useDateFormat();
93
- const {
94
- isSingleDayEvent,
95
- showConferenceViewButton,
96
- getConferenceWebcastUrl,
97
- getConferenceWebcastButtonText,
98
- showViewArchiveButton,
99
- getViewArchiveUrl,
100
- getViewArchiveButtonText,
101
- getConferenceRegUrl,
102
- getConferenceRegText,
103
- showConferenceRegButton,
104
- } = useConferenceHelpers();
105
-
106
- const {
107
- isLoggedIn,
108
- loginModalVisible,
109
- conferenceToLoginTo,
110
- goEventPage,
111
- setConferenceToLoginTo,
112
- buttonClass,
113
- orderAffiliates,
114
- getBrand,
115
- isHomePage,
116
- } = useEvents();
117
-
118
- const { classBinding } = useClassBinding();
119
-
120
- const showViewButton = (_conference: Conference): boolean => {
121
- return isUpcoming.value
122
- ? showConferenceViewButton(_conference)
123
- : showViewArchiveButton(_conference);
124
- };
125
-
126
- const getVideoUrl = (_conference: Conference): string => {
127
- return isUpcoming.value
128
- ? getConferenceWebcastUrl(_conference)
129
- : getViewArchiveUrl(_conference);
130
- };
131
-
132
- const getVideoButtonText = (_conference: Conference): string => {
133
- return isUpcoming.value
134
- ? getConferenceWebcastButtonText(_conference)
135
- : getViewArchiveButtonText(_conference);
136
- };
137
-
138
- // computed
139
- const eventType = computed((): Conference[] => {
140
- return isUpcoming.value ? upcomingEvents.value : pastEvents.value;
141
- });
142
-
143
- const showLoginButton = computed((): boolean => {
144
- const archivedHomepage: boolean =
145
- isUpcoming.value || (!isUpcoming.value && isHomePage.value);
146
- return (
147
- archivedHomepage &&
148
- loginButton.value &&
149
- !isLoggedIn.value &&
150
- !globalConfigValue.value("townhall_registration_enabled")
151
- );
152
- });
153
- </script>
154
-
155
- <template>
156
- <!-- list container -->
157
- <div class="flex w-full flex-col">
158
- <!-- list container -->
159
- <div
160
- :class="
161
- classBinding(classObject, 'listContainer', 'container flex-1 mx-auto')
162
- "
163
- >
164
- <!-- individual event container -->
165
- <div
166
- v-for="conference in eventType"
167
- :key="conference.id"
168
- :class="[
169
- {
170
- 'border-1 border-t border-color-accent-2':
171
- borderPosition === Position.TOP,
172
- },
173
- classBinding(
174
- classObject,
175
- 'eventContainer',
176
- 'flex flex-col items-center md:flex-row py-4'
177
- ),
178
- ]"
179
- >
180
- <!-- event image -->
181
- <div
182
- v-if="showEventImage"
183
- :class="
184
- classBinding(
185
- classObject,
186
- 'eventImageContainer',
187
- 'flex w-full md:w-1/3 pb-3 px-3 md:px-6 overflow-hidden'
188
- )
189
- "
190
- >
191
- <img
192
- :class="
193
- classBinding(
194
- classObject,
195
- 'eventImage',
196
- 'flex-1 self-center mx-auto w-full'
197
- )
198
- "
199
- :src="conference.photo"
200
- />
201
- </div>
202
- <!-- event details container -->
203
- <div
204
- :class="[
205
- { 'md:w-2/3': showEventImage },
206
- classBinding(
207
- classObject,
208
- 'eventContentContainer',
209
- 'flex flex-col justify-center text-center w-full md:pr-6 md:text-left md:justify-start md:items-start'
210
- ),
211
- ]"
212
- >
213
- <!-- event brand, name, date and countdown container -->
214
- <div
215
- :class="[
216
- {
217
- 'border-1 border-b border-color-accent-2 mb-6':
218
- borderPosition === Position.MIDDLE,
219
- },
220
- classBinding(
221
- classObject,
222
- 'eventDetailsContainer',
223
- 'w-full flex flex-col lg:flex-row'
224
- ),
225
- ]"
226
- >
227
- <!-- event details -->
228
- <div
229
- :class="classBinding(classObject, 'eventDetails', 'flex-grow')"
230
- >
231
- <h3
232
- v-if="showBrand && getBrand(conference.affiliates).length"
233
- :class="
234
- classBinding(
235
- classObject,
236
- 'eventBrand',
237
- 'text-base font-bold leading-tight tracking-wide mb-3'
238
- )
239
- "
240
- >
241
- {{ getBrand(conference.affiliates) }}
242
- </h3>
243
- <nuxt-link
244
- :to="
245
- eventPathPrefix
246
- ? eventPathPrefix + conference.id
247
- : `/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
248
- conference.id
249
- }`
250
- "
251
- class="no-underline"
252
- >
253
- <h2
254
- :class="
255
- classBinding(
256
- classObject,
257
- 'eventName',
258
- 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
259
- )
260
- "
261
- >
262
- {{ conference.name }}
263
- </h2>
264
- </nuxt-link>
265
- <p
266
- :class="
267
- classBinding(
268
- classObject,
269
- 'eventDate',
270
- 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
271
- )
272
- "
273
- >
274
- {{ formatDate(conference.start_date) }}
275
- <span v-if="!isSingleDayEvent(conference)">
276
- - {{ formatDate(conference.end_date) }}</span
277
- >
278
- </p>
279
- </div>
280
- <!-- countdown timer - top-aligned -->
281
- <div
282
- v-if="
283
- isUpcoming &&
284
- showCountdown &&
285
- countdownPosition === Position.TOP &&
286
- pagesConfigValue('main.countdown_timer')
287
- "
288
- :class="
289
- classBinding(
290
- classObject,
291
- 'countdownContainerTop',
292
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
293
- )
294
- "
295
- >
296
- <CommonCountdownTimer
297
- :date="conference.start_date"
298
- :is-compact="true"
299
- :class-object="classObject.components.countdownTimer"
300
- ></CommonCountdownTimer>
301
- </div>
302
- </div>
303
- <!-- event button, countdown timer, and sponsors container -->
304
- <div
305
- :class="
306
- classBinding(
307
- classObject,
308
- 'buttonCountdownSponsorsContainer',
309
- 'flex flex-col w-full'
310
- )
311
- "
312
- >
313
- <div
314
- :class="
315
- classBinding(
316
- classObject,
317
- 'buttonCountdownContainer',
318
- 'flex-1 flex flex-col justify-between xl:flex-row w-full'
319
- )
320
- "
321
- >
322
- <div
323
- :class="
324
- classBinding(
325
- classObject,
326
- 'buttonContainer',
327
- 'flex-auto mr-0 xl:mr-4'
328
- )
329
- "
330
- >
331
- <!-- live event button - if enabled, hide all other buttons if event is live -->
332
- <template
333
- v-if="liveButton && conference.state === ConferenceState.LIVE"
334
- >
335
- <!-- go to video -->
336
- <a
337
- v-if="liveButtonOpensStream"
338
- :href="getVideoUrl(conference)"
339
- :target="
340
- /^http/.test(!isUpcoming && getVideoUrl(conference))
341
- ? '_blank'
342
- : '_self'
343
- "
344
- >
345
- <button
346
- :class="
347
- classBinding(classObject, 'liveButtonItem', buttonClass)
348
- "
349
- >
350
- {{ getVideoButtonText(conference) }}
351
- </button>
352
- </a>
353
- <!-- go to event page -->
354
- <button
355
- v-else
356
- :class="
357
- classBinding(classObject, 'liveButtonItem', buttonClass)
358
- "
359
- @click="goEventPage(conference, eventPathPrefix)"
360
- >
361
- {{ getVideoButtonText(conference) }}
362
- </button>
363
- </template>
364
-
365
- <template v-else>
366
- <!-- view info button -->
367
- <button
368
- v-if="viewInfoButton"
369
- :class="
370
- classBinding(classObject, 'buttonItem', buttonClass)
371
- "
372
- @click="goEventPage(conference, eventPathPrefix)"
373
- >
374
- More Info
375
- </button>
376
- <!-- view live/preview archive button -->
377
- <a
378
- v-if="mediaButton && showViewButton(conference)"
379
- :href="getVideoUrl(conference)"
380
- :target="
381
- /^http/.test(!isUpcoming && getVideoUrl(conference))
382
- ? '_blank'
383
- : '_self'
384
- "
385
- >
386
- <button
387
- :class="
388
- classBinding(classObject, 'buttonItem', buttonClass)
389
- "
390
- >
391
- {{ getVideoButtonText(conference) }}
392
- </button>
393
- </a>
394
-
395
- <!-- login button -->
396
- <button
397
- v-if="showLoginButton"
398
- :class="
399
- classBinding(classObject, 'buttonItem', buttonClass)
400
- "
401
- @click="setConferenceToLoginTo(conference)"
402
- >
403
- Log In
404
- </button>
405
-
406
- <!-- register button -->
407
- <a
408
- v-if="registerButton && showConferenceRegButton(conference)"
409
- :href="getConferenceRegUrl(conference, registerPathPrefix)"
410
- :target="
411
- /^http/.test(getConferenceRegUrl(conference))
412
- ? '_blank'
413
- : '_self'
414
- "
415
- >
416
- <button
417
- :class="
418
- classBinding(classObject, 'buttonItem', buttonClass)
419
- "
420
- >
421
- {{ getConferenceRegText(conference) }}
422
- </button>
423
- </a>
424
- </template>
425
- </div>
426
- <!-- countdown timer - right-aligned -->
427
- <div
428
- v-if="
429
- isUpcoming &&
430
- showCountdown &&
431
- countdownPosition === Position.RIGHT &&
432
- pagesConfigValue('main.countdown_timer')
433
- "
434
- class="flex-auto md:flex mt-3 md:mt-2"
435
- :class="
436
- classBinding(
437
- classObject,
438
- 'countdownContainerRight',
439
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
440
- )
441
- "
442
- >
443
- <CommonCountdownTimer
444
- :date="conference.start_date"
445
- :is-compact="true"
446
- :class-object="classObject.components.countdownTimer"
447
- ></CommonCountdownTimer>
448
- </div>
449
- </div>
450
- <!-- countdown timer - bottom-aligned -->
451
- <div
452
- v-if="
453
- isUpcoming &&
454
- showCountdown &&
455
- countdownPosition === Position.BOTTOM &&
456
- pagesConfigValue('main.countdown_timer')
457
- "
458
- :class="
459
- classBinding(
460
- classObject,
461
- 'countdownContainerBottom',
462
- 'flex-auto md:flex my-3 md:my-2'
463
- )
464
- "
465
- >
466
- <CommonCountdownTimer
467
- :date="conference.start_date"
468
- :is-compact="true"
469
- :class-object="classObject.components.countdownTimer"
470
- ></CommonCountdownTimer>
471
- </div>
472
- <!-- sponsors container - bottom-aligned -->
473
- <div
474
- v-if="showSponsors && sponsorPosition === Position.BOTTOM"
475
- class=""
476
- :class="
477
- classBinding(
478
- classObject,
479
- 'sponsorsContainer',
480
- 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
481
- )
482
- "
483
- >
484
- <!-- individual sponsor -->
485
- <template
486
- v-for="affiliate in orderAffiliates(conference.affiliates)"
487
- >
488
- <CommonSponsor
489
- v-if="affiliate.role == 'sponsor'"
490
- :key="affiliate.id"
491
- :sponsor="affiliate"
492
- :class-object="classObject.components.sponsor"
493
- ></CommonSponsor>
494
- </template>
495
- </div>
496
- </div>
497
- </div>
498
- <!-- sponsors container - right-aligned -->
499
- <div
500
- v-if="showSponsors && sponsorPosition === Position.RIGHT"
501
- class="flex flex-col"
502
- >
503
- <!-- individual sponsor -->
504
- <template v-for="affiliate in orderAffiliates(conference.affiliates)">
505
- <CommonSponsor
506
- v-if="affiliate.role == 'sponsor'"
507
- :key="affiliate.id"
508
- :sponsor="affiliate"
509
- :class-object="classObject.components.sponsor"
510
- ></CommonSponsor>
511
- </template>
512
- </div>
513
- </div>
514
- </div>
515
- <!-- login modal -->
516
- <CommonModal
517
- :visible="loginModalVisible"
518
- :class="classObject.components.modal"
519
- @trigger="loginModalVisible = false"
520
- >
521
- <template #modal-body>
522
- <CommonLoginFullWidth
523
- :conference="conferenceToLoginTo"
524
- :class="classObject.components.login"
525
- />
526
- </template>
527
- </CommonModal>
528
- </div>
529
- </template>
530
-
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+ import { storeToRefs } from "pinia";
4
+ import { useConferencesStore } from "../../store/conferences";
5
+ import { useTemplateConfigsStore } from "../../store/templateConfigs";
6
+ import { useDateFormat } from "../../composables/useDateFormat";
7
+ import { useConferenceHelpers } from "../../composables/useConferenceHelpers";
8
+ import { useEvents } from "../../composables/useEvents";
9
+ import { useClassBinding } from "../../composables/useClassBinding";
10
+ import CommonSponsor from "../agenda/components/Sponsor.vue";
11
+ import { Conference, ConferenceState } from "../../models/conference";
12
+ import { Position } from "../../enums/general";
13
+ import {
14
+ listEventsClassObj,
15
+ listEventsCompObj,
16
+ countdownTimerClassObj,
17
+ sponsorClassObj,
18
+ } from "../../@types/components";
19
+
20
+ interface Props {
21
+ showSponsors?: boolean;
22
+ showBrand?: boolean;
23
+ showCountdown?: boolean;
24
+ liveButton?: boolean;
25
+ mediaButton?: boolean;
26
+ registerButton?: boolean;
27
+ loginButton?: boolean;
28
+ viewInfoButton?: boolean;
29
+ registerPathPrefix?: string;
30
+ eventPathPrefix?: string;
31
+ liveButtonOpensStream?: boolean;
32
+ isUpcoming?: boolean;
33
+ showEventImage?: boolean;
34
+ sponsorPosition?: Position;
35
+ borderPosition?: Position;
36
+ countdownPosition?: Position;
37
+ classObject?: listEventsClassObj;
38
+ }
39
+
40
+ const props = withDefaults(defineProps<Props>(), {
41
+ showSponsors: true,
42
+ showBrand: true,
43
+ showCountdown: true,
44
+ liveButton: false,
45
+ mediaButton: true,
46
+ registerButton: true,
47
+ loginButton: true,
48
+ viewInfoButton: true,
49
+ registerPathPrefix: "",
50
+ eventPathPrefix: "",
51
+ liveButtonOpensStream: true,
52
+ isUpcoming: true,
53
+ showEventImage: true,
54
+ sponsorPosition: Position.RIGHT,
55
+ borderPosition: Position.MIDDLE,
56
+ countdownPosition: Position.BOTTOM,
57
+ classObject: () => {
58
+ return {
59
+ components: ref<listEventsCompObj>({
60
+ countdownTimer: ref<countdownTimerClassObj>({}),
61
+ sponsor: ref<sponsorClassObj>({}),
62
+ }),
63
+ };
64
+ },
65
+ });
66
+
67
+ const {
68
+ showSponsors,
69
+ showBrand,
70
+ showCountdown,
71
+ liveButton,
72
+ mediaButton,
73
+ registerButton,
74
+ registerPathPrefix,
75
+ loginButton,
76
+ viewInfoButton,
77
+ isUpcoming,
78
+ showEventImage,
79
+ sponsorPosition,
80
+ borderPosition,
81
+ countdownPosition,
82
+ classObject,
83
+ } = toRefs(props);
84
+
85
+ // data
86
+ const { pastEvents, upcomingEvents } = storeToRefs(useConferencesStore());
87
+
88
+ // methods
89
+ const { globalConfigValue, pagesConfigValue } = storeToRefs(
90
+ useTemplateConfigsStore()
91
+ );
92
+ const { formatDate } = useDateFormat();
93
+ const {
94
+ isSingleDayEvent,
95
+ showConferenceViewButton,
96
+ getConferenceWebcastUrl,
97
+ getConferenceWebcastButtonText,
98
+ showViewArchiveButton,
99
+ getViewArchiveUrl,
100
+ getViewArchiveButtonText,
101
+ getConferenceRegUrl,
102
+ getConferenceRegText,
103
+ showConferenceRegButton,
104
+ } = useConferenceHelpers();
105
+
106
+ const {
107
+ isLoggedIn,
108
+ loginModalVisible,
109
+ conferenceToLoginTo,
110
+ goEventPage,
111
+ setConferenceToLoginTo,
112
+ buttonClass,
113
+ orderAffiliates,
114
+ getBrand,
115
+ isHomePage,
116
+ } = useEvents();
117
+
118
+ const { classBinding } = useClassBinding();
119
+
120
+ const showViewButton = (_conference: Conference): boolean => {
121
+ return isUpcoming.value
122
+ ? showConferenceViewButton(_conference)
123
+ : showViewArchiveButton(_conference);
124
+ };
125
+
126
+ const getVideoUrl = (_conference: Conference): string => {
127
+ return isUpcoming.value
128
+ ? getConferenceWebcastUrl(_conference)
129
+ : getViewArchiveUrl(_conference);
130
+ };
131
+
132
+ const getVideoButtonText = (_conference: Conference): string => {
133
+ return isUpcoming.value
134
+ ? getConferenceWebcastButtonText(_conference)
135
+ : getViewArchiveButtonText(_conference);
136
+ };
137
+
138
+ // computed
139
+ const eventType = computed((): Conference[] => {
140
+ return isUpcoming.value ? upcomingEvents.value : pastEvents.value;
141
+ });
142
+
143
+ const showLoginButton = computed((): boolean => {
144
+ const archivedHomepage: boolean =
145
+ isUpcoming.value || (!isUpcoming.value && isHomePage.value);
146
+ return (
147
+ archivedHomepage &&
148
+ loginButton.value &&
149
+ !isLoggedIn.value &&
150
+ !globalConfigValue.value("townhall_registration_enabled")
151
+ );
152
+ });
153
+ </script>
154
+
155
+ <template>
156
+ <!-- list container -->
157
+ <div class="flex w-full flex-col">
158
+ <!-- list container -->
159
+ <div
160
+ :class="
161
+ classBinding(classObject, 'listContainer', 'container flex-1 mx-auto')
162
+ "
163
+ >
164
+ <!-- individual event container -->
165
+ <div
166
+ v-for="conference in eventType"
167
+ :key="conference.id"
168
+ :class="[
169
+ {
170
+ 'border-1 border-t border-color-accent-2':
171
+ borderPosition === Position.TOP,
172
+ },
173
+ classBinding(
174
+ classObject,
175
+ 'eventContainer',
176
+ 'flex flex-col items-center md:flex-row py-4'
177
+ ),
178
+ ]"
179
+ >
180
+ <!-- event image -->
181
+ <div
182
+ v-if="showEventImage"
183
+ :class="
184
+ classBinding(
185
+ classObject,
186
+ 'eventImageContainer',
187
+ 'flex w-full md:w-1/3 pb-3 px-3 md:px-6 overflow-hidden'
188
+ )
189
+ "
190
+ >
191
+ <img
192
+ :class="
193
+ classBinding(
194
+ classObject,
195
+ 'eventImage',
196
+ 'flex-1 self-center mx-auto w-full'
197
+ )
198
+ "
199
+ :src="conference.photo"
200
+ />
201
+ </div>
202
+ <!-- event details container -->
203
+ <div
204
+ :class="[
205
+ { 'md:w-2/3': showEventImage },
206
+ classBinding(
207
+ classObject,
208
+ 'eventContentContainer',
209
+ 'flex flex-col justify-center text-center w-full md:pr-6 md:text-left md:justify-start md:items-start'
210
+ ),
211
+ ]"
212
+ >
213
+ <!-- event brand, name, date and countdown container -->
214
+ <div
215
+ :class="[
216
+ {
217
+ 'border-1 border-b border-color-accent-2 mb-6':
218
+ borderPosition === Position.MIDDLE,
219
+ },
220
+ classBinding(
221
+ classObject,
222
+ 'eventDetailsContainer',
223
+ 'w-full flex flex-col lg:flex-row'
224
+ ),
225
+ ]"
226
+ >
227
+ <!-- event details -->
228
+ <div
229
+ :class="classBinding(classObject, 'eventDetails', 'flex-grow')"
230
+ >
231
+ <h3
232
+ v-if="showBrand && getBrand(conference.affiliates).length"
233
+ :class="
234
+ classBinding(
235
+ classObject,
236
+ 'eventBrand',
237
+ 'text-base font-bold leading-tight tracking-wide mb-3'
238
+ )
239
+ "
240
+ >
241
+ {{ getBrand(conference.affiliates) }}
242
+ </h3>
243
+ <nuxt-link
244
+ :to="
245
+ eventPathPrefix
246
+ ? eventPathPrefix + conference.id
247
+ : `/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
248
+ conference.id
249
+ }`
250
+ "
251
+ class="no-underline"
252
+ >
253
+ <h2
254
+ :class="
255
+ classBinding(
256
+ classObject,
257
+ 'eventName',
258
+ 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
259
+ )
260
+ "
261
+ >
262
+ {{ conference.name }}
263
+ </h2>
264
+ </nuxt-link>
265
+ <p
266
+ :class="
267
+ classBinding(
268
+ classObject,
269
+ 'eventDate',
270
+ 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
271
+ )
272
+ "
273
+ >
274
+ {{ formatDate(conference.start_date) }}
275
+ <span v-if="!isSingleDayEvent(conference)">
276
+ - {{ formatDate(conference.end_date) }}</span
277
+ >
278
+ </p>
279
+ </div>
280
+ <!-- countdown timer - top-aligned -->
281
+ <div
282
+ v-if="
283
+ isUpcoming &&
284
+ showCountdown &&
285
+ countdownPosition === Position.TOP &&
286
+ pagesConfigValue('main.countdown_timer')
287
+ "
288
+ :class="
289
+ classBinding(
290
+ classObject,
291
+ 'countdownContainerTop',
292
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
293
+ )
294
+ "
295
+ >
296
+ <CommonCountdownTimer
297
+ :date="conference.start_date"
298
+ :is-compact="true"
299
+ :class-object="classObject.components.countdownTimer"
300
+ ></CommonCountdownTimer>
301
+ </div>
302
+ </div>
303
+ <!-- event button, countdown timer, and sponsors container -->
304
+ <div
305
+ :class="
306
+ classBinding(
307
+ classObject,
308
+ 'buttonCountdownSponsorsContainer',
309
+ 'flex flex-col w-full'
310
+ )
311
+ "
312
+ >
313
+ <div
314
+ :class="
315
+ classBinding(
316
+ classObject,
317
+ 'buttonCountdownContainer',
318
+ 'flex-1 flex flex-col justify-between xl:flex-row w-full'
319
+ )
320
+ "
321
+ >
322
+ <div
323
+ :class="
324
+ classBinding(
325
+ classObject,
326
+ 'buttonContainer',
327
+ 'flex-auto mr-0 xl:mr-4'
328
+ )
329
+ "
330
+ >
331
+ <!-- live event button - if enabled, hide all other buttons if event is live -->
332
+ <template
333
+ v-if="liveButton && conference.state === ConferenceState.LIVE"
334
+ >
335
+ <!-- go to video -->
336
+ <a
337
+ v-if="liveButtonOpensStream"
338
+ :href="getVideoUrl(conference)"
339
+ :target="
340
+ /^http/.test(!isUpcoming && getVideoUrl(conference))
341
+ ? '_blank'
342
+ : '_self'
343
+ "
344
+ >
345
+ <button
346
+ :class="
347
+ classBinding(classObject, 'liveButtonItem', buttonClass)
348
+ "
349
+ >
350
+ {{ getVideoButtonText(conference) }}
351
+ </button>
352
+ </a>
353
+ <!-- go to event page -->
354
+ <button
355
+ v-else
356
+ :class="
357
+ classBinding(classObject, 'liveButtonItem', buttonClass)
358
+ "
359
+ @click="goEventPage(conference, eventPathPrefix)"
360
+ >
361
+ {{ getVideoButtonText(conference) }}
362
+ </button>
363
+ </template>
364
+
365
+ <template v-else>
366
+ <!-- view info button -->
367
+ <button
368
+ v-if="viewInfoButton"
369
+ :class="
370
+ classBinding(classObject, 'buttonItem', buttonClass)
371
+ "
372
+ @click="goEventPage(conference, eventPathPrefix)"
373
+ >
374
+ More Info
375
+ </button>
376
+ <!-- view live/preview archive button -->
377
+ <a
378
+ v-if="mediaButton && showViewButton(conference)"
379
+ :href="getVideoUrl(conference)"
380
+ :target="
381
+ /^http/.test(!isUpcoming && getVideoUrl(conference))
382
+ ? '_blank'
383
+ : '_self'
384
+ "
385
+ >
386
+ <button
387
+ :class="
388
+ classBinding(classObject, 'buttonItem', buttonClass)
389
+ "
390
+ >
391
+ {{ getVideoButtonText(conference) }}
392
+ </button>
393
+ </a>
394
+
395
+ <!-- login button -->
396
+ <button
397
+ v-if="showLoginButton"
398
+ :class="
399
+ classBinding(classObject, 'buttonItem', buttonClass)
400
+ "
401
+ @click="setConferenceToLoginTo(conference)"
402
+ >
403
+ Log In
404
+ </button>
405
+
406
+ <!-- register button -->
407
+ <a
408
+ v-if="registerButton && showConferenceRegButton(conference)"
409
+ :href="getConferenceRegUrl(conference, registerPathPrefix)"
410
+ :target="
411
+ /^http/.test(getConferenceRegUrl(conference))
412
+ ? '_blank'
413
+ : '_self'
414
+ "
415
+ >
416
+ <button
417
+ :class="
418
+ classBinding(classObject, 'buttonItem', buttonClass)
419
+ "
420
+ >
421
+ {{ getConferenceRegText(conference) }}
422
+ </button>
423
+ </a>
424
+ </template>
425
+ </div>
426
+ <!-- countdown timer - right-aligned -->
427
+ <div
428
+ v-if="
429
+ isUpcoming &&
430
+ showCountdown &&
431
+ countdownPosition === Position.RIGHT &&
432
+ pagesConfigValue('main.countdown_timer')
433
+ "
434
+ class="flex-auto md:flex mt-3 md:mt-2"
435
+ :class="
436
+ classBinding(
437
+ classObject,
438
+ 'countdownContainerRight',
439
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
440
+ )
441
+ "
442
+ >
443
+ <CommonCountdownTimer
444
+ :date="conference.start_date"
445
+ :is-compact="true"
446
+ :class-object="classObject.components.countdownTimer"
447
+ ></CommonCountdownTimer>
448
+ </div>
449
+ </div>
450
+ <!-- countdown timer - bottom-aligned -->
451
+ <div
452
+ v-if="
453
+ isUpcoming &&
454
+ showCountdown &&
455
+ countdownPosition === Position.BOTTOM &&
456
+ pagesConfigValue('main.countdown_timer')
457
+ "
458
+ :class="
459
+ classBinding(
460
+ classObject,
461
+ 'countdownContainerBottom',
462
+ 'flex-auto md:flex my-3 md:my-2'
463
+ )
464
+ "
465
+ >
466
+ <CommonCountdownTimer
467
+ :date="conference.start_date"
468
+ :is-compact="true"
469
+ :class-object="classObject.components.countdownTimer"
470
+ ></CommonCountdownTimer>
471
+ </div>
472
+ <!-- sponsors container - bottom-aligned -->
473
+ <div
474
+ v-if="showSponsors && sponsorPosition === Position.BOTTOM"
475
+ class=""
476
+ :class="
477
+ classBinding(
478
+ classObject,
479
+ 'sponsorsContainer',
480
+ 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
481
+ )
482
+ "
483
+ >
484
+ <!-- individual sponsor -->
485
+ <template
486
+ v-for="affiliate in orderAffiliates(conference.affiliates)"
487
+ >
488
+ <CommonSponsor
489
+ v-if="affiliate.role == 'sponsor'"
490
+ :key="affiliate.id"
491
+ :sponsor="affiliate"
492
+ :class-object="classObject.components.sponsor"
493
+ ></CommonSponsor>
494
+ </template>
495
+ </div>
496
+ </div>
497
+ </div>
498
+ <!-- sponsors container - right-aligned -->
499
+ <div
500
+ v-if="showSponsors && sponsorPosition === Position.RIGHT"
501
+ class="flex flex-col"
502
+ >
503
+ <!-- individual sponsor -->
504
+ <template v-for="affiliate in orderAffiliates(conference.affiliates)">
505
+ <CommonSponsor
506
+ v-if="affiliate.role == 'sponsor'"
507
+ :key="affiliate.id"
508
+ :sponsor="affiliate"
509
+ :class-object="classObject.components.sponsor"
510
+ ></CommonSponsor>
511
+ </template>
512
+ </div>
513
+ </div>
514
+ </div>
515
+ <!-- login modal -->
516
+ <CommonModal
517
+ :visible="loginModalVisible"
518
+ :class="classObject.components.modal"
519
+ @trigger="loginModalVisible = false"
520
+ >
521
+ <template #modal-body>
522
+ <CommonLoginFullWidth
523
+ :conference="conferenceToLoginTo"
524
+ :class="classObject.components.login"
525
+ />
526
+ </template>
527
+ </CommonModal>
528
+ </div>
529
+ </template>
530
+
531
531
  <style scoped>
532
532
  .leading-tight {
533
533
  line-height: 1.25rem;
@@ -536,4 +536,4 @@ const showLoginButton = computed((): boolean => {
536
536
  .mr-4 {
537
537
  margin-right: 1rem;
538
538
  }
539
- </style>
539
+ </style>