@icvdeveloper/common-module 1.4.13 → 2.0.0

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 (109) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +10 -0
  4. package/dist/runtime/@types/components.d.ts +22 -0
  5. package/dist/runtime/@types/configVariables.d.ts +6 -0
  6. package/dist/runtime/analytics.d.ts +1 -1
  7. package/dist/runtime/assets/scss/index.css +0 -705
  8. package/dist/runtime/assets/svg/icon-minus.svg +6 -0
  9. package/dist/runtime/assets/svg/icon-video.svg +6 -0
  10. package/dist/runtime/components/affiliates/AffiliateModal.vue +66 -0
  11. package/dist/runtime/components/affiliates/AffiliatePage.vue +337 -132
  12. package/dist/runtime/components/agenda/AgendaTabbed.vue +43 -34
  13. package/dist/runtime/components/agenda/components/Calendar.vue +8 -3
  14. package/dist/runtime/components/agenda/components/Favorite.vue +44 -0
  15. package/dist/runtime/components/agenda/components/PlayIcon.vue +1 -1
  16. package/dist/runtime/components/agenda/components/PresentationLink.vue +26 -15
  17. package/dist/runtime/components/chat/ChatConversationList.vue +108 -0
  18. package/dist/runtime/components/chat/ChatCreateConversation.vue +205 -0
  19. package/dist/runtime/components/chat/ChatCreateGroupConversation.vue +159 -0
  20. package/dist/runtime/components/chat/ChatHeader.vue +98 -0
  21. package/dist/runtime/components/chat/ChatMessage.vue +40 -0
  22. package/dist/runtime/components/chat/ChatShowConversation.vue +77 -0
  23. package/dist/runtime/components/chat/ChatWidget.vue +65 -0
  24. package/dist/runtime/components/chat/ChatWindow.vue +211 -0
  25. package/dist/runtime/components/chat/ChatWindow.vue.d.ts +6 -0
  26. package/dist/runtime/components/chat/MessageInput.vue +30 -0
  27. package/dist/runtime/components/chat/SearchInput.vue +32 -0
  28. package/dist/runtime/components/core/Accordion.vue +1 -1
  29. package/dist/runtime/components/core/AttendeeList.vue +25 -16
  30. package/dist/runtime/components/core/CountdownTimer.vue +1 -1
  31. package/dist/runtime/components/core/Modal.vue +21 -13
  32. package/dist/runtime/components/core/ModalButton.vue +43 -0
  33. package/dist/runtime/components/core/Navbar.vue +3 -3
  34. package/dist/runtime/components/core/Navigation.vue +293 -0
  35. package/dist/runtime/components/core/SvgIcon.vue +31 -1
  36. package/dist/runtime/components/core/VButton.vue +41 -0
  37. package/dist/runtime/components/core/ZoomModal.vue +1 -1
  38. package/dist/runtime/components/events/ListEvents.vue +3 -4
  39. package/dist/runtime/components/forms/CheckboxGroup.vue +46 -0
  40. package/dist/runtime/components/forms/ErrorField.vue +11 -2
  41. package/dist/runtime/components/forms/RadioGroup.vue +50 -0
  42. package/dist/runtime/components/forms/SelectDropDown.vue +47 -0
  43. package/dist/runtime/components/forms/SupportForm.vue +6 -6
  44. package/dist/runtime/components/layouts/Accordion.vue +2 -2
  45. package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +20 -4
  46. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +14 -6
  47. package/dist/runtime/components/media/WebcastVideoPlayer.vue +1 -1
  48. package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +8 -8
  49. package/dist/runtime/components/media/components/CeCreditNotification.vue +2 -2
  50. package/dist/runtime/components/media/components/ContentArea.vue +51 -14
  51. package/dist/runtime/components/media/components/ContentTabs.vue +2 -2
  52. package/dist/runtime/components/media/components/DocumentsPanel.vue +2 -2
  53. package/dist/runtime/components/media/components/MediaContainer.vue +3 -7
  54. package/dist/runtime/components/media/components/PresentersPanel.vue +69 -50
  55. package/dist/runtime/components/media/components/SessionReporting.vue +5 -4
  56. package/dist/runtime/components/media/components/SponsorsPanel.vue +3 -3
  57. package/dist/runtime/components/presenters/PresenterListing.vue +30 -20
  58. package/dist/runtime/components/presenters/PresenterModal.vue +26 -21
  59. package/dist/runtime/components/presenters/Presenters.vue +139 -0
  60. package/dist/runtime/components/profile/Profile.vue +10 -6
  61. package/dist/runtime/components/profile/components/Sidebar.vue +1 -1
  62. package/dist/runtime/components/profile/components/SidebarNavItem.vue +1 -1
  63. package/dist/runtime/components/profile/tabs/Favorites.vue +5 -4
  64. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +26 -16
  65. package/dist/runtime/components/registration/AlreadyRegisteredModal.vue +99 -0
  66. package/dist/runtime/components/registration/PaymentForm.vue +136 -0
  67. package/dist/runtime/components/registration/RegistrationForm.vue +417 -0
  68. package/dist/runtime/components/registration/RegistrationGroupSelect.vue +142 -0
  69. package/dist/runtime/components/registration/StripePaymentForm.vue +141 -0
  70. package/dist/runtime/composables/useAgenda.d.ts +12 -0
  71. package/dist/runtime/composables/useAgenda.mjs +101 -10
  72. package/dist/runtime/composables/useAuth.mjs +1 -1
  73. package/dist/runtime/composables/useConferenceHelpers.d.ts +5 -1
  74. package/dist/runtime/composables/useConferenceHelpers.mjs +15 -1
  75. package/dist/runtime/composables/useEventHooks.d.ts +26 -0
  76. package/dist/runtime/composables/useEventHooks.mjs +21 -0
  77. package/dist/runtime/composables/useEvents.d.ts +17 -1
  78. package/dist/runtime/composables/useEvents.mjs +29 -1
  79. package/dist/runtime/composables/useLogin.mjs +7 -3
  80. package/dist/runtime/composables/usePresentation.mjs +1 -1
  81. package/dist/runtime/composables/usePusher.d.ts +4 -0
  82. package/dist/runtime/composables/usePusher.mjs +38 -26
  83. package/dist/runtime/composables/useStream.mjs +7 -1
  84. package/dist/runtime/enums/general.d.ts +4 -1
  85. package/dist/runtime/enums/general.mjs +4 -1
  86. package/dist/runtime/models/authUser.d.ts +1 -0
  87. package/dist/runtime/models/conference.d.ts +14 -0
  88. package/dist/runtime/models/conversation.d.ts +2 -4
  89. package/dist/runtime/models/globalConfig.d.ts +6 -2
  90. package/dist/runtime/models/group.d.ts +32 -2
  91. package/dist/runtime/models/icons.d.ts +7 -0
  92. package/dist/runtime/models/templateConfig.d.ts +6 -0
  93. package/dist/runtime/models/user.d.ts +1 -0
  94. package/dist/runtime/models/virtualPagesConfig.d.ts +335 -0
  95. package/dist/runtime/models/virtualPagesConfig.mjs +0 -0
  96. package/dist/runtime/plugin.mjs +11 -1
  97. package/dist/runtime/store/affiliates.d.ts +3 -0
  98. package/dist/runtime/store/affiliates.mjs +38 -0
  99. package/dist/runtime/store/auth.mjs +6 -0
  100. package/dist/runtime/store/conferences.d.ts +3 -1
  101. package/dist/runtime/store/conferences.mjs +7 -2
  102. package/dist/runtime/store/conversations.d.ts +4040 -10
  103. package/dist/runtime/store/conversations.mjs +255 -22
  104. package/dist/runtime/store/modalPlayerConfig.d.ts +498 -0
  105. package/dist/runtime/store/modalPlayerConfig.mjs +58 -0
  106. package/dist/runtime/store/templateConfigs.d.ts +3 -2
  107. package/dist/runtime/store/templateConfigs.mjs +2 -1
  108. package/package.json +5 -2
  109. package/dist/runtime/components/media/components/PresentersPanel.vue.d.ts +0 -32
@@ -3,13 +3,9 @@ import { toRefs, computed } from "vue";
3
3
  import { get } from "lodash-es";
4
4
  import { DateTime } from "luxon";
5
5
  import { useAgenda } from "../../composables/useAgenda";
6
- import type { Conference, Sponsor as SponsorType } from "../../models/conference";
7
6
  import { usePresentation } from "../../composables/usePresentation";
8
7
  import { usePresenters } from "../../composables/usePresenters";
9
- import CommonAccordion from "../layouts/Accordion.vue";
10
- import Sponsor from "./components/Sponsor.vue";
11
- import PresentationLink from "./components/PresentationLink.vue";
12
- import Calendar from "./components/Calendar.vue";
8
+ import type { Conference, Day, Presenter, Presentation, Sponsor as SponsorType } from "../../models/conference";
13
9
 
14
10
  type Props = {
15
11
  conference: Conference;
@@ -67,7 +63,7 @@ const presentersContainer = computed(() => {
67
63
  <button
68
64
  v-for="(day, index) in days"
69
65
  :key="index"
70
- class="flex-1 md:flex-initial py-5 px-4 md:px-6 text-base text-center cursor-pointer no-underline heading-color-2 focus:outline-none agenda-tab"
66
+ class="flex-1 md:flex-initial py-5 px-4 md:px-6 text-base text-center cursor-pointer heading-color-2 focus:outline-none agenda-tab"
71
67
  :class="{
72
68
  'agenda-tab-active-bg-color agenda-tab-color':
73
69
  day === selectedDay,
@@ -77,7 +73,7 @@ const presentersContainer = computed(() => {
77
73
  >
78
74
  {{ day.name }}
79
75
  <small v-if="showTabDates(day)">{{
80
- DateTime.fromSQL(day.date, { zone: conference.timezone }).toFormat("MMMM d, yyyy")
76
+ DateTime.fromSQL(day?.date as string, { zone: conference.timezone }).toFormat("MMMM d, yyyy")
81
77
  }}</small>
82
78
  </button>
83
79
  </div>
@@ -85,15 +81,14 @@ const presentersContainer = computed(() => {
85
81
  <div
86
82
  class="flex w-1/4 items-center agenda-tab-sponsor-bg-color flex-row-reverse pr-5"
87
83
  >
88
- <Sponsor
89
- v-if="shouldShowSponsors(selectedDay)"
90
- :sponsor="selectedDay.sponsors[0]"
84
+ <CommonComponentsSponsor
85
+ v-if="shouldShowSponsors(selectedDay as Day)"
86
+ :sponsor="selectedDay?.sponsors[0] as SponsorType"
91
87
  :show-label="false"
92
88
  size="small"
93
89
  :enabled-sponsors="enabledSponsors"
94
90
  class="agenda-day-sponsor"
95
- >
96
- </Sponsor>
91
+ />
97
92
  </div>
98
93
  </div>
99
94
  </div>
@@ -126,11 +121,12 @@ const presentersContainer = computed(() => {
126
121
  <!-- TRACK + SESSIONS CONTAINER -->
127
122
  <div
128
123
  v-for="(track, trackIndex) in getTracks(group_or_track)"
129
- :key="track.id"
130
- :id="(group_or_track.type == 'track_group') ?
124
+ :id="
125
+ (group_or_track.type == 'track_group') ?
131
126
  'agenda-track-group-'+group_or_track.id :
132
127
  'agenda-track-'+group_or_track.id
133
128
  "
129
+ :key="track.id"
134
130
  :class="(group_or_track.type == 'track_group') ?
135
131
  'agenda-track-group' :
136
132
  'agenda-track'
@@ -148,7 +144,7 @@ const presentersContainer = computed(() => {
148
144
  :class="{
149
145
  'lg:w-3/4':
150
146
  !isSmallGroupedTrack(group_or_track) &&
151
- track.sponsors.length,
147
+ track?.sponsors?.length,
152
148
  }"
153
149
  >
154
150
  <h2
@@ -163,22 +159,21 @@ const presentersContainer = computed(() => {
163
159
  </div>
164
160
  <!-- TRACK SPONSOR -->
165
161
  <div
166
- v-if="track.sponsors.length"
162
+ v-if="track != undefined && track?.sponsors?.length"
167
163
  class="flex w-full pb-2 content-center items-center"
168
164
  :class="{
169
165
  'lg:pb-0 lg:w-1/4 lg:pr-5':
170
166
  !isSmallGroupedTrack(group_or_track),
171
167
  }"
172
168
  >
173
- <sponsor
169
+ <CommonComponentsSponsor
174
170
  v-if="shouldShowSponsors(track)"
175
- :sponsor="track.sponsors[0]"
171
+ :sponsor="track?.sponsors[0]"
176
172
  :inline="true"
177
173
  size="small"
178
174
  :enabled-sponsors="enabledSponsors"
179
175
  class="agenda-track-sponsor"
180
- >
181
- </sponsor>
176
+ />
182
177
  </div>
183
178
  </div>
184
179
  <!-- ALL TRACK SESSIONS -->
@@ -192,7 +187,7 @@ const presentersContainer = computed(() => {
192
187
  :key="presentation.id"
193
188
  >
194
189
  <div
195
- v-if="presentation.visible"
190
+ v-if="presentation != undefined && presentation.visible"
196
191
  :id="'agenda-presentation-'+presentation.id"
197
192
  class="agenda-presentation flex flex-col"
198
193
  :class="
@@ -230,12 +225,12 @@ const presentersContainer = computed(() => {
230
225
  getPresentationStartTime(presentation, "h:mm a")
231
226
  }}
232
227
 
233
- <span v-if="showPresentationEndTimes()"
234
- >- {{ getPresentationEndTime(presentation, "h:mm a") }}</span
235
- >
228
+ <span v-if="showPresentationEndTimes()">
229
+ - {{ getPresentationEndTime(presentation, "h:mm a") }}
230
+ </span>
236
231
  {{
237
232
  DateTime.fromSQL(
238
- presentation.date,
233
+ presentation?.date as string,
239
234
  { zone: conference.timezone }
240
235
  ).toLocal().offsetNameShort
241
236
  }}
@@ -243,7 +238,7 @@ const presentersContainer = computed(() => {
243
238
 
244
239
  <!-- NAME + PLAY BUTTON -->
245
240
  <div class="pb-1">
246
- <presentation-link
241
+ <CommonComponentsPresentationLink
247
242
  :conference="conference"
248
243
  :track="track"
249
244
  :presentation="presentation"
@@ -253,46 +248,60 @@ const presentersContainer = computed(() => {
253
248
  "
254
249
  :is-agenda="true"
255
250
  class="agenda-presentation-link"
256
- ></presentation-link>
251
+ />
257
252
  </div>
258
253
 
259
254
  <!-- ADD TO CALENDAR -->
260
- <calendar
255
+ <!-- <CommonComponentsCalendar
261
256
  :key="conference.id"
262
257
  class="agenda-add-to-calendar mb-3"
263
258
  :presentation="presentation"
264
259
  :conference="conference"
265
- />
260
+ /> -->
266
261
 
267
262
  <!-- PRESENTERS LIST (ACCORDION OR STANDARD/DIV) -->
268
263
  <component
269
264
  :is="presentersContainer"
270
265
  v-if="get(presentation, 'presenters.length') > 0"
271
266
  :title="
272
- getPresentersLabel(presentation.presenters.length)
267
+ presentation.presenters != undefined ?
268
+ getPresentersLabel(presentation.presenters.length) :
269
+ 'Presenters'
273
270
  "
274
271
  class="agenda-presenters"
275
272
  >
276
273
  <p
277
274
  v-for="presenter in getSortedPresenters(
278
- presentation.presenters
275
+ presentation?.presenters as Presenter[]
279
276
  )"
280
- :key="presenter.id"
281
277
  :id="'agenda-presenter-'+presenter.id"
278
+ :key="presenter.id"
282
279
  :class="(presenter.role == 'moderator') ? ' agenda-moderator' : ''"
283
280
  class="agenda-presenter font-bold my-1"
284
281
  >
285
282
  <CommonPresenterModal
286
- v-if="usePresenterModal"
283
+ v-if="usePresenterModal()"
287
284
  :use-icon="false"
285
+ :show-img="true"
288
286
  :presenter="presenter"
289
287
  :is-small-grouped-track="
290
288
  isSmallGroupedTrack(group_or_track)
291
289
  "
292
- ></CommonPresenterModal>
290
+ :class-object="{
291
+ components: {
292
+ presenterListing: {
293
+ presenterContainer:
294
+ 'flex flex-row flex-1 content-center items-start',
295
+ presenterImageContainer: 'shrink pr-2 my-1',
296
+ presenterImage: 'max-w-32',
297
+ },
298
+ },
299
+ }"
300
+ />
293
301
  <CommonPresenterListing
294
302
  v-else
295
303
  :presenter="presenter"
304
+ :show-img="true"
296
305
  :enable-bio="true"
297
306
  :show-bio="false"
298
307
  text-class="font-bold text-base"
@@ -3,7 +3,7 @@ import { ref, toRefs, computed } from "vue";
3
3
  import { storeToRefs } from "pinia";
4
4
  import { useTemplateConfigsStore } from "../../../store";
5
5
  import { usePresentation } from "../../../composables/usePresentation";
6
- import "add-to-calendar-button";
6
+ import "../../../../../node_modules/add-to-calendar-button";
7
7
  import type { Conference } from "../../../models/conference";
8
8
  import type { Presentation } from "../../../models/conference";
9
9
  type Props = {
@@ -41,6 +41,11 @@ const cssPath = computed((): string => {
41
41
  // atcb.css required in template/playground public folder
42
42
  return window.location.origin + "/atcb.css";
43
43
  });
44
+
45
+ // TODO - this *almost* works - the div classed "atcb-initialized" does not get its inline styles updated in order to display the button.
46
+ // Classes are not loading, as the stylesheet in playground/public/atcb.css does not have the right MIME type when loading.
47
+ // When the previously-mentioned div is visible, the button works (it's just unstyled)
48
+
44
49
  </script>
45
50
 
46
51
  <template>
@@ -62,6 +67,6 @@ const cssPath = computed((): string => {
62
67
  hideBackground
63
68
  hideCheckmark
64
69
  :options="calendarOptions"
65
- ></add-to-calendar-button>
70
+ />
66
71
  </div>
67
- </template>
72
+ </template>
@@ -0,0 +1,44 @@
1
+ <script lang="ts" setup>
2
+ import { toRefs, computed } from 'vue';
3
+ import { useConversationStore } from '../../../store/conversations';
4
+ import type { Icons } from '../../../models/icons';
5
+ import type { Presentation } from '../../../models/conference';
6
+ type Props = {
7
+ presentation: Presentation
8
+ };
9
+
10
+ const props = defineProps<Props>();
11
+
12
+ const { presentation } = toRefs(props);
13
+
14
+ const { hasFavorite } = useConversationStore();
15
+
16
+ const emit = defineEmits<{
17
+ (event: 'favoriteClick', presentation: Presentation): void;
18
+ }>();
19
+
20
+ // computed
21
+ const favoriteStatusIcon = computed((): keyof Icons => {
22
+ return hasFavorite(presentation.value.id as number) !== undefined ? 'favoriteFilled' : 'favorite';
23
+ });
24
+
25
+
26
+ </script>
27
+
28
+ <template>
29
+ <a @click="emit('favoriteClick', presentation)">
30
+ <CommonSvgIcon
31
+ :icon="favoriteStatusIcon"
32
+ class="cursor-pointer"
33
+ style="display: inline-block;"
34
+ />
35
+ </a>
36
+ </template>
37
+
38
+ <style scoped>
39
+ .favorite svg {
40
+ stroke: #0070FF;
41
+ fill: blue;
42
+ }
43
+ </style>
44
+
@@ -42,7 +42,7 @@ const {
42
42
  </CommonSvgIcon
43
43
  >&nbsp;
44
44
  </span>
45
- <small class="flex-initial uppercase text-base text-red-darker">{{
45
+ <small class="flex-initial uppercase text-base text-red-800">{{
46
46
  getPresentationStreamingText(presentation)
47
47
  }}</small>
48
48
  </span>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { toRefs, computed } from "vue";
2
+ import { toRefs, computed, inject } from "vue";
3
3
  import { useAgenda } from "../../../composables/useAgenda";
4
4
  import { useConferenceHelpers } from "../../../composables/useConferenceHelpers";
5
5
  import { usePresentation } from "../../../composables/usePresentation";
@@ -11,6 +11,7 @@ import type {
11
11
  } from "../../../models/conference";
12
12
  import InfoLink from "./InfoLink.vue";
13
13
  import PlayIcon from "./PlayIcon.vue";
14
+ import Favorite from "./Favorite.vue";
14
15
 
15
16
  type Props = {
16
17
  conference: Conference;
@@ -31,10 +32,13 @@ const props = withDefaults(defineProps<Props>(), {
31
32
 
32
33
  const { conference, track, presentation } = toRefs(props);
33
34
 
35
+ const isActiveAgenda: boolean = inject('isActiveAgenda', false);
36
+ const isVirtual: boolean = inject('isVirtual', true);
37
+
34
38
  // Methods
35
39
  const { conferenceIsLiveOrMixed, conferenceIsArchived } =
36
40
  useConferenceHelpers(conference);
37
- const { isSmallGroupedTrack } = useAgenda(conference);
41
+ const { isSmallGroupedTrack, playPresentation } = useAgenda(conference);
38
42
  const {
39
43
  getPresentationLinkTarget,
40
44
  getLivePresentationLinkDestination,
@@ -67,7 +71,7 @@ const presentationNameClass = computed(() => {
67
71
  modal-size="full"
68
72
  >
69
73
  <template #modal-link>
70
- <span class="font-semibold no-underline heading-link"
74
+ <span class="font-semibold heading-link"
71
75
  >{{ presentation.name }}
72
76
  <PlayIcon
73
77
  :presentation="presentation"
@@ -80,32 +84,39 @@ const presentationNameClass = computed(() => {
80
84
  </CommonZoomModal>
81
85
 
82
86
  <!-- live/archive stream text & icon link -->
83
- <a
87
+ <!-- <a
84
88
  v-else-if="
85
89
  (isAgenda && conferenceIsLiveOrMixed(conference)) ||
86
90
  (conferenceIsArchived(conference) && presentation.type != 'zoom')
87
91
  "
88
- class="font-semibold no-underline heading-link"
92
+ class="font-semibold heading-link"
89
93
  :href="getLivePresentationLinkDestination(presentation, track)"
90
94
  :target="getPresentationLinkTarget(presentation)"
91
- @click="playPresentation(track, presentation, conference)"
95
+ @click="playPresentation(track, presentation, conference, isActiveAgenda, isVirtual)"
96
+ > -->
97
+ <!-- TODO - ensure this conversion to <button> does not compromise behavior on other templates -->
98
+ <!-- is not a11y compliant, though. would be better if it was button on tradeshow template only -->
99
+ <button v-else-if="(isAgenda && conferenceIsLiveOrMixed(conference)) ||
100
+ (conferenceIsArchived(conference) && presentation.type != 'zoom')"
101
+ @click="playPresentation(track, presentation, conference, isActiveAgenda, isVirtual)"
92
102
  >
93
- {{ presentation.name
94
- }}<transition name="fade">
103
+ {{ presentation.name }}
104
+ <transition name="fade">
95
105
  <PlayIcon
96
106
  v-if="presentationIsLiveOrMixed(presentation)"
97
107
  :presentation="presentation"
98
108
  :conference="conference"
99
109
  :class="'justify-center md:justify-start'"
100
110
  icon="playarrow"
101
- ></PlayIcon>
111
+ />
102
112
  </transition>
103
- </a>
113
+ </button>
114
+ <!-- </a> -->
104
115
 
105
116
  <!-- text only catchall -->
106
- <span v-else class="font-semibold" :class="presentationNameClass"
107
- >{{ presentation.name }}</span
108
- >
117
+ <span v-else class="font-semibold" :class="presentationNameClass">
118
+ {{ presentation.name }}
119
+ </span>
109
120
 
110
121
  <!-- session details -->
111
122
  <InfoLink
@@ -118,7 +129,7 @@ const presentationNameClass = computed(() => {
118
129
  />
119
130
 
120
131
  <!-- favorites -->
121
- <favorite
132
+ <Favorite
122
133
  v-if="allowFavorites && currentUser.token"
123
134
  class="ml-1"
124
135
  :presentation="presentation"
@@ -132,7 +143,7 @@ const presentationNameClass = computed(() => {
132
143
  <div v-else>
133
144
  <a
134
145
  class="underline cursor-pointer"
135
- @click="playPresentation(track, presentation, conference)"
146
+ @click="playPresentation(track, presentation, conference, isActiveAgenda, isVirtual)"
136
147
  >
137
148
  {{ presentation.name }}
138
149
  </a>
@@ -0,0 +1,108 @@
1
+ <script lang="ts" setup>
2
+ import { onMounted } from 'vue';
3
+ import { storeToRefs } from 'pinia';
4
+ import { filter, map } from 'lodash-es';
5
+ import { useConversationStore } from '#imports';
6
+ import type { Conversation, Message } from '../../models/conversation';
7
+ import type { User } from '../../models/user';
8
+
9
+ const conversationStore = useConversationStore();
10
+
11
+ const { conversations, user } = storeToRefs(conversationStore);
12
+
13
+ const { commitSelectedConversation, getConversationsApi, hideConversation } = conversationStore;
14
+
15
+ // methods
16
+ const isRead = (lastMessage: Message) => {
17
+ let read = false;
18
+ if (lastMessage !== null && lastMessage?.user?.id !== user.value.id) {
19
+ map(lastMessage.messages_read, (user: User) => {
20
+ if (user?.id === user.value.data.id) {
21
+ read = true;
22
+ }
23
+ });
24
+ } else {
25
+ read = true;
26
+ }
27
+ return read;
28
+ };
29
+
30
+ const getNames = (conversation: Conversation) => {
31
+ const users: User[] = conversation.users as User[];
32
+ const authenticatedUser: User = user.value.data;
33
+ const conversationCreator: User = conversation.user as User;
34
+ let names = '';
35
+ const filtered = filter(users, user => user.id !== authenticatedUser.id);
36
+
37
+ names += map(filtered, (user) => {
38
+ return user.name ? user.name : user.email;
39
+ }).join(', ');
40
+
41
+ if (conversationCreator.id !== authenticatedUser.id) {
42
+ const name = conversationCreator.name ? conversationCreator.name : conversationCreator.email;
43
+ if (names === '') {
44
+ names += name
45
+ } else {
46
+ names += ', ' + name
47
+ }
48
+ }
49
+ return names;
50
+ };
51
+
52
+ onMounted(() => {
53
+ getConversationsApi();
54
+ })
55
+
56
+ </script>
57
+
58
+ <template>
59
+ <div class="h-full overflow-y-auto">
60
+ <div
61
+ v-for="conversation in conversations"
62
+ :key="conversation.id"
63
+ class="chat-item"
64
+ >
65
+ <div
66
+ class="flex flex-row w-full"
67
+ @click="commitSelectedConversation(conversation)"
68
+ >
69
+ <div class="w-4 flex items-center">
70
+ <CommonSvgIcon icon="notification" />
71
+ </div>
72
+
73
+ <div class="w-1/5">
74
+ <div class="flex justify-center">
75
+ <CommonSvgIcon icon="person" />
76
+ </div>
77
+ </div>
78
+
79
+ <div class="w-3/4">
80
+ <p class="text-gray-700 text-md mt-1 mb-0">
81
+ {{ getNames(conversation) }}
82
+ </p>
83
+ </div>
84
+ </div>
85
+ <div class="w-1/5 flex justify-end">
86
+ <div
87
+ class="cursor-pointer"
88
+ @click="hideConversation(conversation)"
89
+ >
90
+ <CommonSvgIcon icon="close" />
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </template>
96
+
97
+ <style scoped>
98
+ .chat-item {
99
+ @apply flex cursor-pointer flex-row p-4 border-b border-t-0 border-l-0 border-r-0 border-solid border-gray-400;
100
+ border-bottom: 1px solid #dae1e7;
101
+ }
102
+ .chat-item:hover {
103
+ background-color: #e9eef1;
104
+ }
105
+ .chat-item:active {
106
+ background-color: #cbd4dd;
107
+ }
108
+ </style>