@icvdeveloper/common-module 1.4.14 → 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 +2 -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 +6 -0
  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
@@ -0,0 +1,211 @@
1
+ <script>
2
+ export var MenuOptions = /* @__PURE__ */ ((MenuOptions2) => {
3
+ MenuOptions2["LIST"] = "ChatConversationlist";
4
+ MenuOptions2["CREATE"] = "CreateConversation";
5
+ MenuOptions2["CREATEGROUP"] = "CreateGroupConversation";
6
+ MenuOptions2["SHOW"] = "ShowConversation";
7
+ return MenuOptions2;
8
+ })(MenuOptions || {});
9
+ </script>
10
+
11
+ <script lang="ts" setup>
12
+ import { computed, ref, toRefs, watch } from 'vue';
13
+ import { storeToRefs } from 'pinia';
14
+ import {
15
+ clearConversationEventHook,
16
+ createConversationEventHook,
17
+ setSelectedConversationEventHook
18
+ } from '../../composables/useEventHooks';
19
+ import { useConversationStore } from '#imports';
20
+ import type { Conversation } from "../../models/conversation";
21
+ import type { User } from "../../models/user";
22
+
23
+ type Menus = {
24
+ [key: string]: {
25
+ conversation?: Conversation;
26
+ header: {
27
+ showCloseButton: boolean;
28
+ showPlusIcon: boolean;
29
+ title: string;
30
+ onAdd: Function;
31
+ onClose: Function;
32
+ }
33
+ }
34
+ }
35
+
36
+ const conversationStore = useConversationStore();
37
+
38
+ const { chatOpen, conversations, selectedConversation, user, users } = storeToRefs(conversationStore);
39
+
40
+ // emits
41
+ const emit = defineEmits<{
42
+ (event: 'close'): void;
43
+ }>();
44
+
45
+ // data
46
+ const selectedMenu = ref<MenuOptions>(MenuOptions.LIST);
47
+
48
+ const menus: Menus = {
49
+ ChatConversationList: {
50
+ header: {
51
+ showCloseButton: false,
52
+ showPlusIcon: true,
53
+ title: "",
54
+ onAdd: () => {
55
+ selectedMenu.value = MenuOptions.LIST;
56
+ },
57
+ onClose: () => {},
58
+ },
59
+ },
60
+ CreateConversation: {
61
+ header: {
62
+ showCloseButton: true,
63
+ showPlusIcon: false,
64
+ title: "",
65
+ onAdd: () => {},
66
+ onClose: () => {
67
+ selectedMenu.value = MenuOptions.CREATE;
68
+ },
69
+ },
70
+ },
71
+ CreateGroupConversation: {
72
+ header: {
73
+ showCloseButton: true,
74
+ showPlusIcon: false,
75
+ title: "",
76
+ onAdd: () => {},
77
+ onClose: () => {
78
+ selectedMenu.value = MenuOptions.CREATEGROUP;
79
+ },
80
+ },
81
+ },
82
+ ShowConversation: {
83
+ conversation: {},
84
+ header: {
85
+ showCloseButton: true,
86
+ showPlusIcon: false,
87
+ title: "",
88
+ onAdd: () => {},
89
+ onClose: () => {
90
+ clearConversationEventHook.trigger(selectedConversation.value);
91
+ selectedMenu.value = MenuOptions.SHOW;
92
+ },
93
+ },
94
+ },
95
+ };
96
+
97
+ // computed
98
+ const currentMenuConfig = computed(() => {
99
+ return menus[selectedMenu.value];
100
+ });
101
+
102
+ // methods
103
+ const createConversation = (selected: User[]): void => {
104
+ createConversationEventHook.trigger(selected);
105
+ selectedMenu.value = MenuOptions.LIST;
106
+ };
107
+
108
+ const setSelectedConversation = (conversation: Conversation) => {
109
+ setSelectedConversationEventHook.trigger(conversation);
110
+ selectedMenu.value = MenuOptions.SHOW;
111
+ };
112
+
113
+ const setSelectedMenu = (_menu: MenuOptions) => {
114
+ selectedMenu.value = _menu;
115
+ };
116
+
117
+ // watchers
118
+ watch(selectedConversation, (_newConversation, _oldConversation) => {
119
+ selectedConversation.value = _newConversation;
120
+ if (Object.keys(_newConversation as Conversation).length > 0) {
121
+ if (selectedMenu.value !== MenuOptions.SHOW) {
122
+ selectedMenu.value = MenuOptions.SHOW;
123
+ }
124
+ }
125
+ });
126
+ </script>
127
+
128
+
129
+ <template>
130
+ <div
131
+ :class="[{ opened: chatOpen, closed: !chatOpen }, 'chat-window']"
132
+ >
133
+ <CommonChatHeader
134
+ @item-selected="setSelectedMenu"
135
+ />
136
+
137
+ <CommonChatConversationList
138
+ v-if="selectedMenu === MenuOptions.LIST"
139
+ />
140
+
141
+ <CommonChatCreateConversation
142
+ v-if="selectedMenu === MenuOptions.CREATE"
143
+ @on-create="createConversation"
144
+ />
145
+
146
+ <CommonChatCreateGroupConversation
147
+ v-if="selectedMenu === MenuOptions.CREATEGROUP"
148
+ @on-create="createConversation"
149
+ />
150
+
151
+ <CommonChatShowConversation
152
+ v-if="selectedMenu === MenuOptions.SHOW"
153
+ />
154
+ </div>
155
+ </template>
156
+
157
+ <style scoped>
158
+ .chat-window {
159
+ z-index: 999;
160
+ width: 370px;
161
+ height: calc(100% - 120px);
162
+ max-height: 590px;
163
+ position: fixed;
164
+ right: 25px;
165
+ bottom: 100px;
166
+ box-sizing: border-box;
167
+ box-shadow: 0px 7px 40px 2px rgba(148, 149, 150, 0.1);
168
+ background: white;
169
+ display: flex;
170
+ flex-direction: column;
171
+ justify-content: space-between;
172
+ border-radius: 10px;
173
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
174
+ animation: fadeIn;
175
+ animation-duration: 0.3s;
176
+ animation-timing-function: ease-in-out;
177
+ }
178
+ .chat-window.closed {
179
+ opacity: 0;
180
+ display: none;
181
+ bottom: 90px;
182
+ }
183
+
184
+ @keyframes fadeIn {
185
+ 0% {
186
+ display: none;
187
+ opacity: 0;
188
+ }
189
+ 100% {
190
+ display: flex;
191
+ opacity: 1;
192
+ }
193
+ }
194
+
195
+ @media (max-width: 450px) {
196
+ .chat-window {
197
+ width: 100%;
198
+ height: 100%;
199
+ max-height: 100%;
200
+ right: 0px;
201
+ bottom: 0px;
202
+ border-radius: 0px;
203
+ }
204
+ .chat-window {
205
+ transition: 0.1s ease-in-out;
206
+ }
207
+ .chat-window.closed {
208
+ bottom: 0px;
209
+ }
210
+ }
211
+ </style>
@@ -0,0 +1,6 @@
1
+ export declare enum MenuOptions {
2
+ LIST = "ChatConversationlist",
3
+ CREATE = "CreateConversation",
4
+ CREATEGROUP = "CreateGroupConversation",
5
+ SHOW = "ShowConversation"
6
+ }
@@ -0,0 +1,30 @@
1
+ <script lang="ts" setup>
2
+ import { ref } from 'vue';
3
+ const message = ref<string>('');
4
+
5
+ // emits
6
+ const emit = defineEmits<{
7
+ (event: 'sendMessage', value: string): void
8
+ }>();
9
+ </script>
10
+
11
+ <template>
12
+ <form @submit.prevent="[emit('sendMessage', message), message = '']">
13
+ <div class="flex overflow-hidden">
14
+ <input
15
+ v-model="message"
16
+ type="text"
17
+ class="message w-full px-4 py-4 border-l-0 border-b-0 border-r-0"
18
+ style="border-top-width: 1px; border-color: rgba(0,0,0,0.15)"
19
+ placeholder="Type a message..."
20
+ >
21
+ </div>
22
+ </form>
23
+ </template>
24
+
25
+ <style scoped>
26
+ .message {
27
+ border-bottom-left-radius: 9px;
28
+ border-bottom-right-radius: 9px;
29
+ }
30
+ </style>
@@ -0,0 +1,32 @@
1
+ <script lang="ts" setup>
2
+ import { ref } from 'vue';
3
+ const searchValue = ref<string>('');
4
+
5
+ // emits
6
+ const emit = defineEmits<{
7
+ (event: 'clear'): void;
8
+ (event: 'onChange', value: string): void
9
+ }>();
10
+
11
+ // methods
12
+ const clear = (): void => {
13
+ emit('clear');
14
+ };
15
+ </script>
16
+ <template>
17
+ <div class="relative">
18
+ <input
19
+ v-model="searchValue"
20
+ type="text"
21
+ class="w-full pl-2 pr-5 py-3"
22
+ placeholder="Search..."
23
+ @input="emit('onChange', searchValue)"
24
+ >
25
+ <span
26
+ class="pin-r absolute mt-3 mr-5 cursor-pointer"
27
+ @click="clear"
28
+ >
29
+ <SvgIcon icon="close" />
30
+ </span>
31
+ </div>
32
+ </template>
@@ -84,7 +84,7 @@ const toggle = () => {
84
84
  classBinding(
85
85
  classObject,
86
86
  'dropdownContainer',
87
- 'rounded px-4 pt-3 pb-1 bg-grey-lighter'
87
+ 'rounded px-4 pt-3 pb-1 bg-gray-200'
88
88
  )
89
89
  "
90
90
  >
@@ -1,11 +1,12 @@
1
1
  <script lang="ts" setup>
2
- import { ref, onBeforeUnmount } from "vue";
2
+ import { ref, toRefs, onBeforeUnmount, watch } from "vue";
3
3
  import { storeToRefs } from "pinia";
4
4
  import { debounce } from "lodash-es";
5
5
  import { VueEternalLoading, LoadAction } from "@ts-pro/vue-eternal-loading";
6
6
  import type { User } from "../../models/user";
7
7
  import { PAGE_LENGTH } from "../../models/pagination";
8
8
  import { useAttendeeListStore } from "../../store/attendeeList";
9
+ import { useAuthStore } from "../../store/auth";
9
10
  import { useConversationStore } from "../../store/conversations";
10
11
  import { useUserStore } from "../../store/user";
11
12
  import { usePusher } from "../../composables/usePusher";
@@ -63,6 +64,7 @@ const filterUsers = debounce(async () => {
63
64
  }, 500);
64
65
 
65
66
  const load = async ({ loaded }: LoadAction): Promise<void> => {
67
+ console.log('loading more!!!!');
66
68
  currentPage.value += 1;
67
69
  const existingList: User[] = loadedUsersRef.value;
68
70
  const loadedItems = await getAttendeeList({
@@ -95,12 +97,12 @@ const resetAll = async () => {
95
97
  };
96
98
 
97
99
  const createChatConversation = async (user: User) => {
98
- const users: User[] = [];
100
+ const users: User[] = [] as User[];
99
101
  users.push(user);
100
102
 
101
103
  await createConversation(users);
102
104
 
103
- if (!chatOpen) {
105
+ if (!chatOpen.value) {
104
106
  toggleChat();
105
107
  }
106
108
  };
@@ -119,7 +121,7 @@ onBeforeUnmount(() => {
119
121
 
120
122
  watch(isLoggedIn, () => {
121
123
  if (isLoggedIn.value) {
122
- joinPresenceChannel();
124
+ // joinPresenceChannel();
123
125
  }
124
126
  });
125
127
  </script>
@@ -152,7 +154,7 @@ watch(isLoggedIn, () => {
152
154
  "
153
155
  placeholder="Search..."
154
156
  @input="filterUsers"
155
- />
157
+ >
156
158
  <span
157
159
  :class="
158
160
  classBinding(classObject, 'closeContainer', 'ml-2 cursor-pointer')
@@ -162,7 +164,7 @@ watch(isLoggedIn, () => {
162
164
  <CommonSvgIcon
163
165
  icon="close"
164
166
  class="fill-current text-black flex items-center justify-center"
165
- ></CommonSvgIcon>
167
+ />
166
168
  </span>
167
169
  </div>
168
170
  </div>
@@ -212,9 +214,9 @@ watch(isLoggedIn, () => {
212
214
  'w-full max-w-100 aspect-square'
213
215
  )
214
216
  "
215
- :src="user.profile_image"
217
+ :src="user.profile_image as string"
216
218
  alt=""
217
- />
219
+ >
218
220
  </div>
219
221
 
220
222
  <div :class="classBinding(classObject, 'attendeeContentInner', '')">
@@ -230,13 +232,15 @@ watch(isLoggedIn, () => {
230
232
  <span
231
233
  v-if="user.name"
232
234
  :class="classBinding(classObject, 'attendeeNameEmail', 'pl-2')"
233
- >{{ user.name }}</span
234
235
  >
236
+ {{ user.name }}
237
+ </span>
235
238
  <span
236
239
  v-else
237
240
  :class="classBinding(classObject, 'attendeeNameEmail', 'pl-2')"
238
- >{{ user.email }}</span
239
241
  >
242
+ {{ user.email }}
243
+ </span>
240
244
  <span
241
245
  v-if="isLoggedIn"
242
246
  :class="
@@ -244,16 +248,17 @@ watch(isLoggedIn, () => {
244
248
  "
245
249
  >
246
250
  <CommonSvgIcon
247
- :icon="[user.online ? 'online' : 'offline']"
251
+ :icon="user.online ? 'online' : 'offline'"
248
252
  width="0"
249
253
  class="w-4 my-0 mr-1 inline-block"
250
- ></CommonSvgIcon>
254
+ />
251
255
  <span
252
256
  :class="
253
257
  classBinding(classObject, 'statusText', 'inline-block')
254
258
  "
255
- >{{ user.online ? "online" : "offline" }}</span
256
259
  >
260
+ {{ user.online ? "online" : "offline" }}
261
+ </span>
257
262
  </span>
258
263
  </p>
259
264
 
@@ -290,7 +295,7 @@ watch(isLoggedIn, () => {
290
295
  :class="classBinding(classObject, 'socialLink', 'mr-2')"
291
296
  :aria-label="user.name + ` Twitter Page`"
292
297
  >
293
- <span><CommonSvgIcon icon="twitter"></CommonSvgIcon></span>
298
+ <span><CommonSvgIcon icon="twitter" /></span>
294
299
  </a>
295
300
 
296
301
  <a
@@ -300,7 +305,7 @@ watch(isLoggedIn, () => {
300
305
  :class="classBinding(classObject, 'socialLink', 'mr-2')"
301
306
  :aria-label="user.name + ` LinkedIn Page`"
302
307
  >
303
- <span><CommonSvgIcon icon="linkedin"></CommonSvgIcon></span>
308
+ <span><CommonSvgIcon icon="linkedin" /></span>
304
309
  </a>
305
310
  </span>
306
311
  </div>
@@ -361,7 +366,11 @@ watch(isLoggedIn, () => {
361
366
  <VueEternalLoading
362
367
  v-model:is-initial="isInitial"
363
368
  :load="load"
364
- ></VueEternalLoading>
369
+ >
370
+ <template #no-more>
371
+ &nbsp;
372
+ </template>
373
+ </VueEternalLoading>
365
374
  </div>
366
375
  </div>
367
376
  </template>
@@ -369,7 +369,7 @@ onUnmounted(() => {
369
369
  }
370
370
 
371
371
  .unit-label-container.windows {
372
- @apply pb-4 uppercase tracking-wide;
372
+ @apply pb-4 uppercase tracking-wider;
373
373
  }
374
374
 
375
375
  .unit-label-container.dials {
@@ -16,7 +16,7 @@ type Props = {
16
16
  classObject?: modalClassObj;
17
17
  };
18
18
 
19
- // classObject.components.svgIcon is not functioning properly and cannot be passed to svgIcon component
19
+ // TODO - classObject.components.svgIcon is not functioning properly and cannot be passed to svgIcon component
20
20
  const props = withDefaults(defineProps<Props>(), {
21
21
  visible: false,
22
22
  modalSize: "50",
@@ -45,8 +45,8 @@ const { visible, modalSize, noScroll, showClose, usePadding, classObject } =
45
45
  const { classBinding } = useClassBinding();
46
46
 
47
47
  const modalClass = computed(() => {
48
- const padding = usePadding.value ? "p-6" : "";
49
- const classes = `relative w-full ${padding} m-auto flex-col flex rounded shadow bg-white modal-box`;
48
+ const paddingValue = usePadding.value ? 'sm:p-6 sm:pt-6' : '';
49
+ const classes = `relative w-full ${paddingValue} m-auto flex-col flex border border-white sm:border-none sm:rounded shadow bg-white modal-box`;
50
50
  if (noScroll.value) {
51
51
  return classes + ` max-h-full overflow-hidden`;
52
52
  } else {
@@ -61,20 +61,22 @@ const closeModal = () => {
61
61
  const clicked = () => {
62
62
  emit("clicked");
63
63
  };
64
+
65
+ // NOTE: to properly destroy/unmount this component and its contents, use v-if on this component's tag in the parent component/page
64
66
  </script>
65
67
 
66
68
  <template>
67
69
  <Transition>
68
70
  <div
69
- v-if="visible"
71
+ v-show="visible"
70
72
  :class="
71
73
  classBinding(
72
74
  classObject,
73
75
  'modalPositionContainer',
74
- 'fixed top-0 bottom-0 left-0 right-0 z-50 flex bg-smoke-light p-3'
76
+ 'fixed top-0 bottom-0 left-0 right-0 z-50 flex bg-smoke-400 md:p-3'
75
77
  )
76
78
  "
77
- @click="clicked"
79
+ @click.self="clicked, closeModal()"
78
80
  >
79
81
  <div
80
82
  class="custom-max-width max-h-full"
@@ -87,17 +89,23 @@ const clicked = () => {
87
89
  classBinding(
88
90
  classObject,
89
91
  'modalCloseContainer',
90
- 'absolute top-0 bottom-0 right-0 z-30 max-h-1em'
92
+ 'absolute top-0 right-0 z-30 max-h-1em'
91
93
  )
92
94
  "
93
95
  >
94
96
  <button
95
- :class="classBinding(classObject, 'modalButton', 'p-3')"
97
+ :class="classBinding(classObject, 'modalButton', 'p-2')"
96
98
  @click="closeModal()"
97
99
  >
98
- <span :class="classBinding(classObject, 'modalButtonIcon', '')"
99
- ><CommonSvgIcon icon="close" width=".7rem"
100
- /></span>
100
+ <span :class="classBinding(classObject, 'modalButtonIcon', '')">
101
+ <CommonSvgIcon
102
+ icon="close"
103
+ width=".7rem"
104
+ :class-object="{
105
+ container: 'rounded-full bg-white sm:bg-none p-1 sm:p-0'
106
+ }"
107
+ />
108
+ </span>
101
109
  </button>
102
110
  </span>
103
111
 
@@ -113,12 +121,12 @@ const clicked = () => {
113
121
  max-height: 1em;
114
122
  }
115
123
 
116
- .bg-smoke-light {
124
+ .bg-smoke-400 {
117
125
  background-color: rgba(0, 0, 0, 0.4);
118
126
  }
119
127
 
120
128
  .custom-max-width {
121
- max-width: 85%;
129
+ max-width: 100%;
122
130
  }
123
131
  @screen lg {
124
132
  .custom-max-width {
@@ -0,0 +1,43 @@
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs } from "vue";
3
+
4
+ type Props = {
5
+ modalSize: string;
6
+ closeOnClick?: boolean;
7
+ };
8
+
9
+ const props = withDefaults(defineProps<Props>(), {
10
+ closeOnClick: true,
11
+ });
12
+
13
+ const { closeOnClick } = toRefs(props);
14
+
15
+ // data
16
+ const showModal = ref<boolean>(false);
17
+
18
+ // methods
19
+ const closeIfAllowed = () => {
20
+ if (closeOnClick.value) showModal.value = false;
21
+ };
22
+ </script>
23
+
24
+ <template>
25
+ <span>
26
+ <CommonModal
27
+ v-if="showModal"
28
+ @trigger="showModal = false"
29
+ @clicked="closeIfAllowed"
30
+ >
31
+ <div id="modal-title">
32
+ <slot name="title" />
33
+ </div>
34
+ <div id="modal-body">
35
+ <slot name="body" />
36
+ </div>
37
+ </CommonModal>
38
+
39
+ <VButton @click="showModal = true">
40
+ <template #button> Show Modal </template>
41
+ </VButton>
42
+ </span>
43
+ </template>
@@ -60,7 +60,7 @@ const combinedNavItems = computed(() => {
60
60
  <template>
61
61
  <div>
62
62
  <div class="flex flex-col">
63
- <header class="min-w-full flex sticky pin-t z-50">
63
+ <header class="min-w-full flex sticky top-0 z-50">
64
64
  <!-- Standard Screen Nav -->
65
65
  <div
66
66
  class="hidden flex-1 flex-col mx-auto min-w-full"
@@ -73,7 +73,7 @@ const combinedNavItems = computed(() => {
73
73
  ></CommonDynamicHtml>
74
74
 
75
75
  <nav class="flex flex-1 min-h-8 content-center">
76
- <ul class="list-reset h-full">
76
+ <ul class="h-full">
77
77
  <li v-for="(item, index) in combinedNavItems" :key="index">
78
78
  <nuxt-link
79
79
  v-if="!isExternalLink(item)"
@@ -123,7 +123,7 @@ const combinedNavItems = computed(() => {
123
123
 
124
124
  <div class="flex">
125
125
  <nav :class="open ? 'flex' : 'hidden'" class="w-full">
126
- <ul class="flex-col self-center list-reset mx-auto">
126
+ <ul class="flex-col self-center mx-auto">
127
127
  <li v-for="(item, index) in combinedNavItems" :key="index">
128
128
  <nuxt-link
129
129
  v-if="!isExternalLink(item)"