@icvdeveloper/common-module 0.0.86 → 0.0.88

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/@types/components.d.ts +1 -1
  4. package/dist/runtime/assets/svg/answer.svg +14 -14
  5. package/dist/runtime/assets/svg/avatar.svg +1 -1
  6. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  7. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  10. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  11. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  13. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  14. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  15. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  17. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  19. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  20. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  21. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  22. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  23. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  24. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  25. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  26. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  27. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  28. package/dist/runtime/assets/svg/phone.svg +1 -1
  29. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  30. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  31. package/dist/runtime/assets/svg/reject.svg +14 -14
  32. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  33. package/dist/runtime/components/affiliates/AffiliatePage.vue +17 -17
  34. package/dist/runtime/components/agenda/AgendaList.vue +234 -234
  35. package/dist/runtime/components/agenda/AgendaTabbed.vue +309 -309
  36. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +53 -53
  37. package/dist/runtime/components/agenda/components/Calendar.vue +89 -89
  38. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  39. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  40. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  41. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  42. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  43. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  44. package/dist/runtime/components/auth/Registration.vue +27 -27
  45. package/dist/runtime/components/auth/Ucc.vue +80 -52
  46. package/dist/runtime/components/core/Accordion.vue +97 -97
  47. package/dist/runtime/components/core/CountdownTimer.vue +308 -308
  48. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  49. package/dist/runtime/components/core/Modal.vue +111 -111
  50. package/dist/runtime/components/core/Navbar.vue +154 -154
  51. package/dist/runtime/components/core/SvgIcon.vue +151 -151
  52. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  53. package/dist/runtime/components/events/EventHeader.vue +133 -133
  54. package/dist/runtime/components/events/ListEvents.vue +521 -521
  55. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  56. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  57. package/dist/runtime/components/forms/Message.vue +27 -27
  58. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  59. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  60. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  61. package/dist/runtime/components/forms/TextArea.vue +26 -26
  62. package/dist/runtime/components/forms/TextInput.vue +28 -28
  63. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  64. package/dist/runtime/components/media/PlayerAndContentContainer.vue +175 -172
  65. package/dist/runtime/components/media/WebcastVideoPlayer.vue +167 -167
  66. package/dist/runtime/components/media/components/AgendaPanel.vue +42 -42
  67. package/dist/runtime/components/media/components/CeCreditNotification.vue +95 -95
  68. package/dist/runtime/components/media/components/ContentAccordion.vue +63 -63
  69. package/dist/runtime/components/media/components/ContentAccordion.vue.d.ts +1 -3
  70. package/dist/runtime/components/media/components/ContentArea.vue +158 -158
  71. package/dist/runtime/components/media/components/ContentTabs.vue +229 -229
  72. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  73. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  74. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  75. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  76. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  77. package/dist/runtime/components/media/components/SessionReporting.vue +93 -93
  78. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  79. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  80. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  81. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  82. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  83. package/dist/runtime/components/profile/Profile.vue +149 -149
  84. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  85. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  86. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  87. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  88. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  89. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  90. package/dist/runtime/composables/useConferenceHelpers.d.ts +1 -1
  91. package/dist/runtime/composables/useConferenceHelpers.mjs +2 -2
  92. package/dist/runtime/composables/useUcc.d.ts +19 -2
  93. package/dist/runtime/composables/useUcc.mjs +105 -22
  94. package/package.json +1 -1
@@ -1,523 +1,523 @@
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="eventPathPrefix ? (eventPathPrefix + conference.id) : (`/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
245
- conference.id
246
- }`)"
247
- class="no-underline"
248
- >
249
- <h2
250
- :class="
251
- classBinding(
252
- classObject,
253
- 'eventName',
254
- 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
255
- )
256
- "
257
- >
258
- {{ conference.name }}
259
- </h2>
260
- </nuxt-link>
261
- <p
262
- :class="
263
- classBinding(
264
- classObject,
265
- 'eventDate',
266
- 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
267
- )
268
- "
269
- >
270
- {{ formatDate(conference.start_date) }}
271
- <span v-if="!isSingleDayEvent(conference)">
272
- - {{ formatDate(conference.end_date) }}</span
273
- >
274
- </p>
275
- </div>
276
- <!-- countdown timer - top-aligned -->
277
- <div
278
- v-if="
279
- isUpcoming &&
280
- showCountdown &&
281
- countdownPosition === Position.TOP &&
282
- pagesConfigValue('main.countdown_timer')
283
- "
284
- :class="
285
- classBinding(
286
- classObject,
287
- 'countdownContainerTop',
288
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
289
- )
290
- "
291
- >
292
- <CommonCountdownTimer
293
- :date="conference.start_date"
294
- :is-compact="true"
295
- :class-object="classObject.components.countdownTimer"
296
- ></CommonCountdownTimer>
297
- </div>
298
- </div>
299
- <!-- event button, countdown timer, and sponsors container -->
300
- <div
301
- :class="
302
- classBinding(
303
- classObject,
304
- 'buttonCountdownSponsorsContainer',
305
- 'flex flex-col w-full'
306
- )
307
- "
308
- >
309
- <div
310
- :class="
311
- classBinding(
312
- classObject,
313
- 'buttonCountdownContainer',
314
- 'flex-1 flex flex-col justify-between xl:flex-row w-full'
315
- )
316
- "
317
- >
318
- <div
319
- :class="
320
- classBinding(
321
- classObject,
322
- 'buttonContainer',
323
- 'flex-auto mr-0 xl:mr-4'
324
- )
325
- "
326
- >
327
- <!-- live event button - if enabled, hide all other buttons if event is live -->
328
- <template v-if="liveButton && conference.state === ConferenceState.LIVE">
329
- <!-- go to video -->
330
- <a
331
- v-if="liveButtonOpensStream"
332
- :href="getVideoUrl(conference)"
333
- :target="
334
- /^http/.test(!isUpcoming && getVideoUrl(conference))
335
- ? '_blank'
336
- : '_self'
337
- "
338
- >
339
- <button
340
- :class="
341
- classBinding(classObject, 'liveButtonItem', buttonClass)
342
- "
343
- >
344
- {{ getVideoButtonText(conference) }}
345
- </button>
346
- </a>
347
- <!-- go to event page -->
348
- <button
349
- v-else
350
- :class="
351
- classBinding(classObject, 'liveButtonItem', buttonClass)
352
- "
353
- @click="goEventPage(conference, eventPathPrefix)"
354
- >
355
- {{ getVideoButtonText(conference) }}
356
- </button>
357
- </template>
358
-
359
- <template v-else>
360
- <!-- view info button -->
361
- <button
362
- v-if="viewInfoButton"
363
- :class="classBinding(classObject, 'buttonItem', buttonClass)"
364
- @click="goEventPage(conference, eventPathPrefix)"
365
- >
366
- View Info
367
- </button>
368
- <!-- view live/preview archive button -->
369
- <a
370
- v-if="mediaButton && showViewButton(conference)"
371
- :href="getVideoUrl(conference)"
372
- :target="
373
- /^http/.test(!isUpcoming && getVideoUrl(conference))
374
- ? '_blank'
375
- : '_self'
376
- "
377
- >
378
- <button
379
- :class="
380
- classBinding(classObject, 'buttonItem', buttonClass)
381
- "
382
- >
383
- {{ getVideoButtonText(conference) }}
384
- </button>
385
- </a>
386
-
387
- <!-- login button -->
388
- <button
389
- v-if="showLoginButton"
390
- :class="classBinding(classObject, 'buttonItem', buttonClass)"
391
- @click="setConferenceToLoginTo(conference)"
392
- >
393
- Log In
394
- </button>
395
-
396
- <!-- register button -->
397
- <a
398
- v-if="registerButton && showConferenceRegButton(conference)"
399
- :href="getConferenceRegUrl(conference, registerPathPrefix)"
400
- :target="
401
- /^http/.test(getConferenceRegUrl(conference))
402
- ? '_blank'
403
- : '_self'
404
- "
405
- >
406
- <button
407
- :class="
408
- classBinding(classObject, 'buttonItem', buttonClass)
409
- "
410
- >
411
- {{ getConferenceRegText(conference) }}
412
- </button>
413
- </a>
414
- </template>
415
- </div>
416
- <!-- countdown timer - right-aligned -->
417
- <div
418
- v-if="
419
- isUpcoming &&
420
- showCountdown &&
421
- countdownPosition === Position.RIGHT &&
422
- pagesConfigValue('main.countdown_timer')
423
- "
424
- class="flex-auto md:flex mt-3 md:mt-2"
425
- :class="
426
- classBinding(
427
- classObject,
428
- 'countdownContainerRight',
429
- 'flex-auto flex items-center self-center mb-4 lg:mb-0'
430
- )
431
- "
432
- >
433
- <CommonCountdownTimer
434
- :date="conference.start_date"
435
- :is-compact="true"
436
- :class-object="classObject.components.countdownTimer"
437
- ></CommonCountdownTimer>
438
- </div>
439
- </div>
440
- <!-- countdown timer - bottom-aligned -->
441
- <div
442
- v-if="
443
- isUpcoming &&
444
- showCountdown &&
445
- countdownPosition === Position.BOTTOM &&
446
- pagesConfigValue('main.countdown_timer')
447
- "
448
- :class="
449
- classBinding(
450
- classObject,
451
- 'countdownContainerBottom',
452
- 'flex-auto md:flex my-3 md:my-2'
453
- )
454
- "
455
- >
456
- <CommonCountdownTimer
457
- :date="conference.start_date"
458
- :is-compact="true"
459
- :class-object="classObject.components.countdownTimer"
460
- ></CommonCountdownTimer>
461
- </div>
462
- <!-- sponsors container - bottom-aligned -->
463
- <div
464
- v-if="showSponsors && sponsorPosition === Position.BOTTOM"
465
- class=""
466
- :class="
467
- classBinding(
468
- classObject,
469
- 'sponsorsContainer',
470
- 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
471
- )
472
- "
473
- >
474
- <!-- individual sponsor -->
475
- <template
476
- v-for="affiliate in orderAffiliates(conference.affiliates)"
477
- >
478
- <CommonSponsor
479
- v-if="affiliate.role == 'sponsor'"
480
- :key="affiliate.id"
481
- :sponsor="affiliate"
482
- :class-object="classObject.components.sponsor"
483
- ></CommonSponsor>
484
- </template>
485
- </div>
486
- </div>
487
- </div>
488
- <!-- sponsors container - right-aligned -->
489
- <div
490
- v-if="showSponsors && sponsorPosition === Position.RIGHT"
491
- class="flex flex-col"
492
- >
493
- <!-- individual sponsor -->
494
- <template v-for="affiliate in orderAffiliates(conference.affiliates)">
495
- <CommonSponsor
496
- v-if="affiliate.role == 'sponsor'"
497
- :key="affiliate.id"
498
- :sponsor="affiliate"
499
- :class-object="classObject.components.sponsor"
500
- ></CommonSponsor>
501
- </template>
502
- </div>
503
- </div>
504
- </div>
505
- <!-- login modal -->
506
- <CommonModal
507
- :visible="loginModalVisible"
508
- :class="classObject.components.modal"
509
- @trigger="loginModalVisible = false"
510
- >
511
- <template #modal-body>
512
- <CommonLoginFullWidth
513
- :conference="conferenceToLoginTo"
514
- :class="classObject.components.login"
515
- />
516
- </template>
517
- </CommonModal>
518
- </div>
519
- </template>
520
-
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="eventPathPrefix ? (eventPathPrefix + conference.id) : (`/${isUpcoming ? 'upcoming-events' : 'past-events'}/${
245
+ conference.id
246
+ }`)"
247
+ class="no-underline"
248
+ >
249
+ <h2
250
+ :class="
251
+ classBinding(
252
+ classObject,
253
+ 'eventName',
254
+ 'text-2xl lg:text-3xl font-medium mb-2 conf-name-alignment'
255
+ )
256
+ "
257
+ >
258
+ {{ conference.name }}
259
+ </h2>
260
+ </nuxt-link>
261
+ <p
262
+ :class="
263
+ classBinding(
264
+ classObject,
265
+ 'eventDate',
266
+ 'text-base leading-normal tracking-wide font-light uppercase md:text-md lg:text-lg'
267
+ )
268
+ "
269
+ >
270
+ {{ formatDate(conference.start_date) }}
271
+ <span v-if="!isSingleDayEvent(conference)">
272
+ - {{ formatDate(conference.end_date) }}</span
273
+ >
274
+ </p>
275
+ </div>
276
+ <!-- countdown timer - top-aligned -->
277
+ <div
278
+ v-if="
279
+ isUpcoming &&
280
+ showCountdown &&
281
+ countdownPosition === Position.TOP &&
282
+ pagesConfigValue('main.countdown_timer')
283
+ "
284
+ :class="
285
+ classBinding(
286
+ classObject,
287
+ 'countdownContainerTop',
288
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
289
+ )
290
+ "
291
+ >
292
+ <CommonCountdownTimer
293
+ :date="conference.start_date"
294
+ :is-compact="true"
295
+ :class-object="classObject.components.countdownTimer"
296
+ ></CommonCountdownTimer>
297
+ </div>
298
+ </div>
299
+ <!-- event button, countdown timer, and sponsors container -->
300
+ <div
301
+ :class="
302
+ classBinding(
303
+ classObject,
304
+ 'buttonCountdownSponsorsContainer',
305
+ 'flex flex-col w-full'
306
+ )
307
+ "
308
+ >
309
+ <div
310
+ :class="
311
+ classBinding(
312
+ classObject,
313
+ 'buttonCountdownContainer',
314
+ 'flex-1 flex flex-col justify-between xl:flex-row w-full'
315
+ )
316
+ "
317
+ >
318
+ <div
319
+ :class="
320
+ classBinding(
321
+ classObject,
322
+ 'buttonContainer',
323
+ 'flex-auto mr-0 xl:mr-4'
324
+ )
325
+ "
326
+ >
327
+ <!-- live event button - if enabled, hide all other buttons if event is live -->
328
+ <template v-if="liveButton && conference.state === ConferenceState.LIVE">
329
+ <!-- go to video -->
330
+ <a
331
+ v-if="liveButtonOpensStream"
332
+ :href="getVideoUrl(conference)"
333
+ :target="
334
+ /^http/.test(!isUpcoming && getVideoUrl(conference))
335
+ ? '_blank'
336
+ : '_self'
337
+ "
338
+ >
339
+ <button
340
+ :class="
341
+ classBinding(classObject, 'liveButtonItem', buttonClass)
342
+ "
343
+ >
344
+ {{ getVideoButtonText(conference) }}
345
+ </button>
346
+ </a>
347
+ <!-- go to event page -->
348
+ <button
349
+ v-else
350
+ :class="
351
+ classBinding(classObject, 'liveButtonItem', buttonClass)
352
+ "
353
+ @click="goEventPage(conference, eventPathPrefix)"
354
+ >
355
+ {{ getVideoButtonText(conference) }}
356
+ </button>
357
+ </template>
358
+
359
+ <template v-else>
360
+ <!-- view info button -->
361
+ <button
362
+ v-if="viewInfoButton"
363
+ :class="classBinding(classObject, 'buttonItem', buttonClass)"
364
+ @click="goEventPage(conference, eventPathPrefix)"
365
+ >
366
+ View Info
367
+ </button>
368
+ <!-- view live/preview archive button -->
369
+ <a
370
+ v-if="mediaButton && showViewButton(conference)"
371
+ :href="getVideoUrl(conference)"
372
+ :target="
373
+ /^http/.test(!isUpcoming && getVideoUrl(conference))
374
+ ? '_blank'
375
+ : '_self'
376
+ "
377
+ >
378
+ <button
379
+ :class="
380
+ classBinding(classObject, 'buttonItem', buttonClass)
381
+ "
382
+ >
383
+ {{ getVideoButtonText(conference) }}
384
+ </button>
385
+ </a>
386
+
387
+ <!-- login button -->
388
+ <button
389
+ v-if="showLoginButton"
390
+ :class="classBinding(classObject, 'buttonItem', buttonClass)"
391
+ @click="setConferenceToLoginTo(conference)"
392
+ >
393
+ Log In
394
+ </button>
395
+
396
+ <!-- register button -->
397
+ <a
398
+ v-if="registerButton && showConferenceRegButton(conference)"
399
+ :href="getConferenceRegUrl(conference, registerPathPrefix)"
400
+ :target="
401
+ /^http/.test(getConferenceRegUrl(conference))
402
+ ? '_blank'
403
+ : '_self'
404
+ "
405
+ >
406
+ <button
407
+ :class="
408
+ classBinding(classObject, 'buttonItem', buttonClass)
409
+ "
410
+ >
411
+ {{ getConferenceRegText(conference) }}
412
+ </button>
413
+ </a>
414
+ </template>
415
+ </div>
416
+ <!-- countdown timer - right-aligned -->
417
+ <div
418
+ v-if="
419
+ isUpcoming &&
420
+ showCountdown &&
421
+ countdownPosition === Position.RIGHT &&
422
+ pagesConfigValue('main.countdown_timer')
423
+ "
424
+ class="flex-auto md:flex mt-3 md:mt-2"
425
+ :class="
426
+ classBinding(
427
+ classObject,
428
+ 'countdownContainerRight',
429
+ 'flex-auto flex items-center self-center mb-4 lg:mb-0'
430
+ )
431
+ "
432
+ >
433
+ <CommonCountdownTimer
434
+ :date="conference.start_date"
435
+ :is-compact="true"
436
+ :class-object="classObject.components.countdownTimer"
437
+ ></CommonCountdownTimer>
438
+ </div>
439
+ </div>
440
+ <!-- countdown timer - bottom-aligned -->
441
+ <div
442
+ v-if="
443
+ isUpcoming &&
444
+ showCountdown &&
445
+ countdownPosition === Position.BOTTOM &&
446
+ pagesConfigValue('main.countdown_timer')
447
+ "
448
+ :class="
449
+ classBinding(
450
+ classObject,
451
+ 'countdownContainerBottom',
452
+ 'flex-auto md:flex my-3 md:my-2'
453
+ )
454
+ "
455
+ >
456
+ <CommonCountdownTimer
457
+ :date="conference.start_date"
458
+ :is-compact="true"
459
+ :class-object="classObject.components.countdownTimer"
460
+ ></CommonCountdownTimer>
461
+ </div>
462
+ <!-- sponsors container - bottom-aligned -->
463
+ <div
464
+ v-if="showSponsors && sponsorPosition === Position.BOTTOM"
465
+ class=""
466
+ :class="
467
+ classBinding(
468
+ classObject,
469
+ 'sponsorsContainer',
470
+ 'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-y-1.5 gap-x-3'
471
+ )
472
+ "
473
+ >
474
+ <!-- individual sponsor -->
475
+ <template
476
+ v-for="affiliate in orderAffiliates(conference.affiliates)"
477
+ >
478
+ <CommonSponsor
479
+ v-if="affiliate.role == 'sponsor'"
480
+ :key="affiliate.id"
481
+ :sponsor="affiliate"
482
+ :class-object="classObject.components.sponsor"
483
+ ></CommonSponsor>
484
+ </template>
485
+ </div>
486
+ </div>
487
+ </div>
488
+ <!-- sponsors container - right-aligned -->
489
+ <div
490
+ v-if="showSponsors && sponsorPosition === Position.RIGHT"
491
+ class="flex flex-col"
492
+ >
493
+ <!-- individual sponsor -->
494
+ <template v-for="affiliate in orderAffiliates(conference.affiliates)">
495
+ <CommonSponsor
496
+ v-if="affiliate.role == 'sponsor'"
497
+ :key="affiliate.id"
498
+ :sponsor="affiliate"
499
+ :class-object="classObject.components.sponsor"
500
+ ></CommonSponsor>
501
+ </template>
502
+ </div>
503
+ </div>
504
+ </div>
505
+ <!-- login modal -->
506
+ <CommonModal
507
+ :visible="loginModalVisible"
508
+ :class="classObject.components.modal"
509
+ @trigger="loginModalVisible = false"
510
+ >
511
+ <template #modal-body>
512
+ <CommonLoginFullWidth
513
+ :conference="conferenceToLoginTo"
514
+ :class="classObject.components.login"
515
+ />
516
+ </template>
517
+ </CommonModal>
518
+ </div>
519
+ </template>
520
+
521
521
  <style scoped>
522
522
  .leading-tight {
523
523
  line-height: 1.25rem;
@@ -526,4 +526,4 @@ const showLoginButton = computed((): boolean => {
526
526
  .mr-4 {
527
527
  margin-right: 1rem;
528
528
  }
529
- </style>
529
+ </style>