@icvdeveloper/common-module 0.0.68 → 0.0.69

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