@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
@@ -1,26 +1,259 @@
1
+ import { ref, computed } from "vue";
1
2
  import { defineStore } from "pinia";
2
3
  import { useApi } from "../composables/useApi.mjs";
3
- ;
4
- export const useConversationStore = defineStore("conversations", {
5
- state: () => ({
6
- chatOpen: false,
7
- selectedConversation: {}
8
- }),
9
- getters: {},
10
- actions: {
11
- toggleChat() {
12
- this.chatOpen = !this.chatOpen;
13
- },
14
- createConversation(users) {
15
- return new Promise((resolve, reject) => {
16
- const request = useApi();
17
- request(`conversations`, { users }).then((response) => {
18
- this.selectedConversation = response.data;
19
- resolve(this.selectedConversation);
20
- }).catch((error) => {
21
- reject(error);
22
- });
23
- });
4
+ export const useConversationStore = defineStore("conversations", () => {
5
+ const chatOpen = ref(false);
6
+ const conversations = ref();
7
+ const selectedConversation = ref();
8
+ const attendeeList = ref({
9
+ page: 1,
10
+ lastPage: null,
11
+ data: []
12
+ });
13
+ const users = ref({
14
+ page: 1,
15
+ lastPage: null,
16
+ data: []
17
+ });
18
+ const onlineUsers = ref({
19
+ data: []
20
+ });
21
+ const user = ref({
22
+ data: {},
23
+ errors: []
24
+ });
25
+ const favorites = ref({
26
+ data: [],
27
+ errors: []
28
+ });
29
+ const usersResultsPage = ref(1);
30
+ const attendeesResultsPage = ref(1);
31
+ const prevSearch = ref("");
32
+ const isInitial = ref(true);
33
+ const getConversations = computed(() => {
34
+ return conversations.value;
35
+ });
36
+ const getUsers = computed(() => {
37
+ return users.value;
38
+ });
39
+ const getSelectedConversation = computed(() => {
40
+ return selectedConversation.value;
41
+ });
42
+ const getUser = computed(() => {
43
+ return user.value;
44
+ });
45
+ const getFavorites = computed(() => {
46
+ return favorites.value;
47
+ });
48
+ const getOnlineUsers = computed(() => {
49
+ if (onlineUsers.value) {
50
+ return onlineUsers.value.data;
24
51
  }
25
- }
52
+ return [];
53
+ });
54
+ const getName = (user2) => {
55
+ return user2.name ? user2.name : user2.email;
56
+ };
57
+ const hasConversation = (id) => {
58
+ if (conversations.value) {
59
+ return conversations.value.filter((conversation) => conversation.id == id);
60
+ }
61
+ return [];
62
+ };
63
+ const hasFavorite = (presId) => {
64
+ return favorites.value.data.find(({ favorite }) => favorite.id === presId) ?? [];
65
+ };
66
+ const commitConversations = (payload) => {
67
+ conversations.value = payload;
68
+ console.log("conversations", conversations.value);
69
+ };
70
+ const commitConversation = (payload) => {
71
+ conversations?.value?.push(payload);
72
+ console.log("conversation", conversations.value[conversations.value.length - 1]);
73
+ };
74
+ const commitUsers = (payload) => {
75
+ console.log("committing users");
76
+ users.value.data.push(...payload.data);
77
+ users.value.page = payload.meta.current_page;
78
+ users.value.lastPage = payload.meta.last_page;
79
+ };
80
+ const commitAttendeeList = (payload) => {
81
+ console.log("committing attendee list");
82
+ attendeeList.value.data.push(...payload.data);
83
+ attendeeList.value.page = payload.meta.current_page;
84
+ attendeeList.value.lastPage = payload.meta.last_page;
85
+ };
86
+ const setRemoteUserOnline = (payload) => {
87
+ users.value.data.map(function(user2, index) {
88
+ if (user2.id === payload) {
89
+ user2.online = true;
90
+ }
91
+ });
92
+ };
93
+ const setRemoteUserOffline = (payload) => {
94
+ users.value.data.map(function(user2, index) {
95
+ if (user2.id === payload) {
96
+ user2.online = false;
97
+ }
98
+ });
99
+ };
100
+ const clearUsers = () => {
101
+ usersResultsPage.value = 1;
102
+ isInitial.value = true;
103
+ users.value.data = [];
104
+ };
105
+ const clearAttendeeList = () => {
106
+ attendeesResultsPage.value = 1;
107
+ isInitial.value = true;
108
+ attendeeList.value.data = [];
109
+ };
110
+ const commitSelectedConversation = (payload) => {
111
+ selectedConversation.value = payload;
112
+ };
113
+ const commitMessage = (payload) => {
114
+ selectedConversation?.value?.messages?.push(payload);
115
+ };
116
+ const commitChatOpen = (payload) => {
117
+ chatOpen.value = payload;
118
+ };
119
+ const commitFavorites = (payload) => {
120
+ favorites.value.data = payload;
121
+ };
122
+ const commitOnlineUsers = (payload) => {
123
+ onlineUsers.value.data = payload;
124
+ };
125
+ const commitOnlineUser = (payload) => {
126
+ onlineUsers.value.data.push(payload);
127
+ };
128
+ const removeOnlineUser = (payload) => {
129
+ const removedUserIndex = onlineUsers.value.data.indexOf(payload);
130
+ onlineUsers.value = onlineUsers.value.data.splice(removedUserIndex, 1);
131
+ };
132
+ const getConversationsApi = async () => {
133
+ const apiUrl = `conversations?timestamp=${(/* @__PURE__ */ new Date()).getTime()}`;
134
+ const request = useApi();
135
+ await request(apiUrl).then((response) => {
136
+ commitConversations(response.data);
137
+ });
138
+ };
139
+ const getUsersApi = async (search2, page = 1, isAttendeeList = false) => {
140
+ console.log("search", search2);
141
+ const apiUrl = "users";
142
+ const request = useApi();
143
+ let usersResponse;
144
+ if (page != void 0 || search2 != void 0) {
145
+ usersResponse = await request(apiUrl, { params: { page, search: search2 } });
146
+ isAttendeeList == false ? commitUsers(usersResponse) : commitAttendeeList(usersResponse);
147
+ console.log("getUsersApi response (with search params)", usersResponse);
148
+ } else {
149
+ usersResponse = await request(apiUrl);
150
+ isAttendeeList == false ? commitUsers(usersResponse) : commitAttendeeList(usersResponse);
151
+ console.log("getUsersApi response (without search params)", usersResponse);
152
+ }
153
+ return usersResponse;
154
+ };
155
+ const getFavoritesApi = async () => {
156
+ const apiUrl = "presentations/favorites?a=" + Date.now();
157
+ const request = useApi();
158
+ await request(apiUrl).then((response) => {
159
+ commitFavorites(response.data);
160
+ });
161
+ };
162
+ const hideConversation = async (conversation) => {
163
+ const apiUrl = `conversations/${conversation.id}/hide`;
164
+ const request = useApi();
165
+ await request(apiUrl, { method: "POST" }).then((response) => {
166
+ getConversationsApi();
167
+ });
168
+ };
169
+ const setConversationRead = async (conversation) => {
170
+ const apiUrl = "conversations/" + conversation.id + "/read";
171
+ const request = useApi();
172
+ await request(apiUrl, { method: "POST" });
173
+ };
174
+ const createConversation = async (users2) => {
175
+ console.log("creating conversation with users: ", users2);
176
+ const apiUrl = "conversations";
177
+ const request = useApi();
178
+ await request(apiUrl, {
179
+ method: "POST",
180
+ body: {
181
+ users: users2
182
+ }
183
+ }).then((response) => {
184
+ commitSelectedConversation(response.data);
185
+ });
186
+ };
187
+ const sendMessage = async (message) => {
188
+ const apiUrl = `conversations/${selectedConversation?.value?.id}/messages`;
189
+ const request = useApi();
190
+ await request(apiUrl, {
191
+ method: "POST",
192
+ body: {
193
+ message
194
+ }
195
+ }).then((response) => {
196
+ commitMessage(response.data);
197
+ });
198
+ };
199
+ const search = async (query) => {
200
+ const apiUrl = "search";
201
+ const request = useApi();
202
+ await request(apiUrl, {
203
+ query
204
+ }).then((response) => {
205
+ return response.data;
206
+ });
207
+ };
208
+ const toggleChat = () => {
209
+ console.log("toggled chat");
210
+ chatOpen.value = !chatOpen.value;
211
+ };
212
+ return {
213
+ conversations,
214
+ selectedConversation,
215
+ attendeeList,
216
+ users,
217
+ user,
218
+ onlineUsers,
219
+ chatOpen,
220
+ favorites,
221
+ usersResultsPage,
222
+ attendeesResultsPage,
223
+ getConversations,
224
+ getUsers,
225
+ getSelectedConversation,
226
+ getUser,
227
+ getFavorites,
228
+ getOnlineUsers,
229
+ prevSearch,
230
+ isInitial,
231
+ getName,
232
+ hasConversation,
233
+ hasFavorite,
234
+ commitConversations,
235
+ commitConversation,
236
+ commitUsers,
237
+ commitAttendeeList,
238
+ setRemoteUserOffline,
239
+ setRemoteUserOnline,
240
+ clearUsers,
241
+ clearAttendeeList,
242
+ commitSelectedConversation,
243
+ commitMessage,
244
+ commitChatOpen,
245
+ commitFavorites,
246
+ commitOnlineUsers,
247
+ commitOnlineUser,
248
+ removeOnlineUser,
249
+ getConversationsApi,
250
+ getUsersApi,
251
+ getFavoritesApi,
252
+ hideConversation,
253
+ setConversationRead,
254
+ createConversation,
255
+ sendMessage,
256
+ search,
257
+ toggleChat
258
+ };
26
259
  });