@icvdeveloper/common-module 0.0.127 → 0.0.128

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 (92) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/assets/svg/answer.svg +14 -14
  4. package/dist/runtime/assets/svg/avatar.svg +1 -1
  5. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  6. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  7. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  8. package/dist/runtime/assets/svg/icon-avatar.svg +1 -1
  9. package/dist/runtime/assets/svg/icon-chevron.svg +4 -4
  10. package/dist/runtime/assets/svg/icon-circle-plus.svg +1 -1
  11. package/dist/runtime/assets/svg/icon-close.svg +1 -1
  12. package/dist/runtime/assets/svg/icon-info.svg +2 -2
  13. package/dist/runtime/assets/svg/icon-new-window.svg +11 -11
  14. package/dist/runtime/assets/svg/icon-offline.svg +3 -3
  15. package/dist/runtime/assets/svg/icon-online.svg +3 -3
  16. package/dist/runtime/assets/svg/icon-person.svg +2 -2
  17. package/dist/runtime/assets/svg/icon-play.svg +2 -2
  18. package/dist/runtime/assets/svg/icon-star-filled.svg +29 -29
  19. package/dist/runtime/assets/svg/icon-star.svg +24 -24
  20. package/dist/runtime/assets/svg/icon-video-chat.svg +14 -14
  21. package/dist/runtime/assets/svg/icon-website.svg +2 -2
  22. package/dist/runtime/assets/svg/icon-zoom.svg +10 -10
  23. package/dist/runtime/assets/svg/notification-icon.svg +32 -32
  24. package/dist/runtime/assets/svg/offline-icon.svg +1 -1
  25. package/dist/runtime/assets/svg/online-icon.svg +3 -3
  26. package/dist/runtime/assets/svg/peer2peer.svg +3 -3
  27. package/dist/runtime/assets/svg/phone.svg +1 -1
  28. package/dist/runtime/assets/svg/plus-icon.svg +1 -1
  29. package/dist/runtime/assets/svg/red-icon.svg +3 -3
  30. package/dist/runtime/assets/svg/reject.svg +14 -14
  31. package/dist/runtime/assets/svg/search-icon.svg +3 -3
  32. package/dist/runtime/components/affiliates/AffiliatePage.vue +329 -329
  33. package/dist/runtime/components/agenda/AgendaList.vue +259 -259
  34. package/dist/runtime/components/agenda/AgendaTabbed.vue +305 -305
  35. package/dist/runtime/components/agenda/components/AgendaListAccordion.vue +67 -67
  36. package/dist/runtime/components/agenda/components/Calendar.vue +67 -67
  37. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  38. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  39. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  40. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  41. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  42. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  43. package/dist/runtime/components/auth/Registration.vue +27 -27
  44. package/dist/runtime/components/auth/Ucc.vue +129 -129
  45. package/dist/runtime/components/core/Accordion.vue +97 -97
  46. package/dist/runtime/components/core/CountdownTimer.vue +336 -336
  47. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  48. package/dist/runtime/components/core/Modal.vue +111 -111
  49. package/dist/runtime/components/core/Navbar.vue +154 -154
  50. package/dist/runtime/components/core/SvgIcon.vue +157 -157
  51. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  52. package/dist/runtime/components/events/EventHeader.vue +133 -133
  53. package/dist/runtime/components/events/ListEvents.vue +554 -554
  54. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  55. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  56. package/dist/runtime/components/forms/Message.vue +27 -27
  57. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  58. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  59. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  60. package/dist/runtime/components/forms/TextArea.vue +26 -26
  61. package/dist/runtime/components/forms/TextInput.vue +28 -28
  62. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  63. package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +160 -160
  64. package/dist/runtime/components/media/ArchiveVideoPlayer.vue +186 -186
  65. package/dist/runtime/components/media/PlayerAndContentContainer.vue +183 -183
  66. package/dist/runtime/components/media/WebcastVideoPlayer.vue +140 -140
  67. package/dist/runtime/components/media/components/AgendaPanel.vue +43 -43
  68. package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +91 -91
  69. package/dist/runtime/components/media/components/CeCreditNotification.vue +95 -95
  70. package/dist/runtime/components/media/components/ContentAccordion.vue +63 -63
  71. package/dist/runtime/components/media/components/ContentArea.vue +158 -158
  72. package/dist/runtime/components/media/components/ContentTabs.vue +231 -231
  73. package/dist/runtime/components/media/components/DocumentsPanel.vue +31 -31
  74. package/dist/runtime/components/media/components/JsonApi.vue +31 -31
  75. package/dist/runtime/components/media/components/MediaContainer.vue +63 -63
  76. package/dist/runtime/components/media/components/OverviewPanel.vue +52 -52
  77. package/dist/runtime/components/media/components/PresentersPanel.vue +52 -52
  78. package/dist/runtime/components/media/components/SessionReporting.vue +102 -102
  79. package/dist/runtime/components/media/components/SponsorsPanel.vue +71 -71
  80. package/dist/runtime/components/media/components/WindowContent.vue +92 -92
  81. package/dist/runtime/components/media/components/WindowSlide.vue +72 -72
  82. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  83. package/dist/runtime/components/presenters/PresenterModal.vue +223 -223
  84. package/dist/runtime/components/profile/Profile.vue +149 -149
  85. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  86. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  87. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  88. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  89. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  90. package/dist/runtime/components/support/FAQAccordion.vue +140 -140
  91. package/dist/runtime/composables/useApi.mjs +3 -1
  92. package/package.json +1 -1
@@ -1,329 +1,329 @@
1
- <script lang="ts" setup>
2
- import { toRefs } from "vue";
3
- import { get } from "lodash-es";
4
- import { useApi } from "../../composables/useApi";
5
- import { Affiliate } from "../../models/conference";
6
- import { affiliatePageClassObj } from "../../@types/components";
7
- import { useClassBinding } from "../../composables/useClassBinding";
8
-
9
-
10
- type Props = {
11
- affiliateId: string;
12
- classObject?: affiliatePageClassObj;
13
- };
14
-
15
- const props = withDefaults(defineProps<Props>(), {
16
- classObject: () => {
17
- return {
18
- container: "",
19
- headerContainer: "",
20
- headerNameContainer: "",
21
- headerNameElement: "",
22
- headerContactContainer: "",
23
- headerSocialContainer: "",
24
- htmlHeaderContainer: "",
25
- biographyContainer: "",
26
- contentContainer: "",
27
- affiliateContentBox: "flex flex-col w-full h-full overflow-y-auto p-4 border border-slate-300",
28
- };
29
- },
30
- });
31
-
32
- // data
33
- const { affiliateId } = toRefs(props);
34
- const { classBinding } = useClassBinding();
35
- const affiliate = ref<Affiliate>({documents:[],links:[],videos:[]});
36
- const showVideoModal = ref<boolean>(false);
37
- const modalVideoTitle = ref<string>("");
38
- const modalVideoUrl = ref<string>("");
39
-
40
- // computed
41
- const contentCount = computed((): number => {
42
- let hasDocuments = (affiliate.value.documents.length > 0) ? 1 : 0;
43
- let hasVideos = (affiliate.value.videos.length > 0) ? 1 : 0;
44
- let hasLinks = (affiliate.value.links.length > 0) ? 1 : 0;
45
- return hasDocuments + hasVideos + hasLinks;
46
- });
47
- const hasContactInfo = computed((): boolean => {
48
- return (
49
- affiliate.value.contact_photo ||
50
- affiliate.value.contact_name ||
51
- affiliate.value.contact_title ||
52
- affiliate.value.contact_phone ||
53
- affiliate.value.contact_email
54
- );
55
- });
56
- const showLeftBottomBox = computed((): boolean => {
57
- return (hasContactInfo.value || getAffiliateContentItem('custom_box_1'));
58
- });
59
-
60
- // methods
61
- const fireAnalytics = (type: string) => {
62
- let event = 'affiliate-' + affiliate.value.name + '-' + type;
63
- this.$analyticsPlugin.click(event, event);
64
- };
65
-
66
- const getAffiliateContentItem = (_item: string) => {
67
- let itemVal = get(affiliate.value, 'affiliate_content.'+_item);
68
- if (itemVal == undefined || itemVal == '') { return null; }
69
- return itemVal;
70
- };
71
-
72
- const getAffiliateContent = () => {
73
- return new Promise((resolve, reject) => {
74
- const request = useApi();
75
- request(
76
- `/affiliates/${affiliateId.value}?with=affiliate_content,documents,videos,links`
77
- )
78
- .then((response) => {
79
- affiliate.value = response.data;
80
- })
81
- .catch((error) => {
82
- reject(error);
83
- });
84
- });
85
- };
86
-
87
- const getStreamingVideoUrl = (_videoUrl: string): string => {
88
- let tmpUrl = 'https://cdn.v3mediaportal.com/streaming-player/iframe-player.htm?';
89
- tmpUrl += 'cs=' + encodeURIComponent(_videoUrl);
90
- tmpUrl += '&ar=16:9&f=video&as=false';
91
- return tmpUrl;
92
- };
93
-
94
- const openVideoModal = (_title: string, _videoUrl: string) => {
95
- fireAnalytics('video-' + _title);
96
- let tmpUrl = getStreamingVideoUrl(_videoUrl);
97
- modalVideoUrl.value = tmpUrl;
98
- modalVideoTitle.value = _title;
99
- showVideoModal.value = true;
100
- };
101
-
102
- // on mount
103
- onMounted(() => {
104
- getAffiliateContent();
105
- });
106
-
107
- </script>
108
-
109
- <template>
110
- <div
111
- :class="
112
- classBinding(
113
- classObject,
114
- 'container',
115
- 'flex w-full flex-col'
116
- )
117
- "
118
- >
119
-
120
- <div v-if="getAffiliateContentItem('html_vanity_page')" v-html="getAffiliateContentItem('html_vanity_page')">
121
- </div>
122
-
123
- <div v-else>
124
-
125
- <div :class="classBinding(
126
- classObject,
127
- 'headerContainer',
128
- 'flex flex-col md:flex-row w-full pb-6 border-b border-solid border-grey-light'
129
- )">
130
- <div v-if="affiliate.photo" class="mb-6 md:mb-0">
131
- <img :src="affiliate.photo" />
132
- </div>
133
- <div
134
- v-if="!affiliate.photo"
135
- :class="classBinding(
136
- classObject,
137
- 'headerNameContainer',
138
- 'flex w-full justify-center md:justify-start'
139
- )"
140
- >
141
- <h1 :class="classBinding(classObject, 'headerNameElement', 'font-light mb-0 body-color-4 self-end')">{{affiliate.name}}</h1>
142
- </div>
143
- <div
144
- v-if="getAffiliateContentItem('contact_in_header') == 1"
145
- :class="classBinding(classObject, 'headerContactContainer', 'w-full text-center md:text-right')"
146
- >
147
- <p>
148
- <span v-if="affiliate.contact_address">{{affiliate.contact_address}}<br/></span>
149
- <span v-if="affiliate.contact_location">{{affiliate.contact_location}}<br/></span>
150
- <span v-if="affiliate.website"><a @click="fireAnalytics('website')" class="affiliate-website" :href="affiliate.website" target="_blank">{{affiliate.website}}</a><br/></span>
151
- </p>
152
- <span :class="classBinding(classObject, 'headerSocialContainer', 'flex justify-center md:justify-end')">
153
- <a @click="fireAnalytics('twitter')" v-if="affiliate.twitter_url" :href="affiliate.twitter_url" target="_blank" class="affiliate-twitter" :aria-label="affiliate.name + ` Twitter Page`">
154
- <span class="presenter-icon"><CommonSvgIcon icon="twitter"></CommonSvgIcon></span>
155
- </a>
156
- <a @click="fireAnalytics('facebook')" v-if="affiliate.facebook_url" :href="affiliate.facebook_url" target="_blank" class="affiliate-facebook" :aria-label="affiliate.name + ` Facebook Page`">
157
- <span class="presenter-icon "><CommonSvgIcon icon="facebook"></CommonSvgIcon></span>
158
- </a>
159
- <a @click="fireAnalytics('linked_in')" v-if="affiliate.linkedin_url" :href="affiliate.linkedin_url" target="_blank" class="affiliate-linkedin" :aria-label="affiliate.name + ` LinkedIn Page`">
160
- <span class="presenter-icon"><CommonSvgIcon icon="linkedin"></CommonSvgIcon></span>
161
- </a>
162
- <a @click="fireAnalytics('youtube')" v-if="affiliate.youtube_url" :href="affiliate.youtube_url" target="_blank" class="affiliate-youtube" :aria-label="affiliate.name + ` YouTube Page`">
163
- <span class="presenter-icon"><CommonSvgIcon icon="youtube"></CommonSvgIcon></span>
164
- </a>
165
- </span>
166
- </div>
167
- </div>
168
-
169
- <div
170
- v-if="getAffiliateContentItem('html_header')"
171
- v-html="getAffiliateContentItem('html_header')"
172
- :class="classBinding(classObject, 'htmlHeaderContainer', 'w-full mt-5 text-center md:text-left')"
173
- ></div>
174
- <div
175
- v-if="affiliate.biography"
176
- v-html="affiliate.biography"
177
- :class="classBinding(classObject, 'biographyContainer', 'w-full mt-5 text-center md:text-left')"
178
- ></div>
179
- <div
180
- v-if="contentCount>0"
181
- class="grid-container-responsive"
182
- :class="classBinding(classObject, 'contentContainer', 'w-full mt-5 md:max-h-300')"
183
- >
184
-
185
- <div v-if="affiliate.documents.length>0">
186
- <div :class="classBinding(classObject, 'affiliateContentBox', '')">
187
- <h3 class="mb-3">Documents</h3>
188
- <span v-for="document in affiliate.documents" :key="document.id">
189
- <div class="mb-2"><a @click="fireAnalytics('document-' + document.name)" class="affiliate-document" :href="document.url" target="_blank">{{ document.name }}</a></div>
190
- </span>
191
- </div>
192
- </div>
193
- <div v-if="affiliate.videos.length>0">
194
- <div :class="classBinding(classObject, 'affiliateContentBox', '')">
195
- <div v-if="affiliate.videos.length == 1 && getAffiliateContentItem('embed_video') == 1">
196
- <iframe
197
- :src="getStreamingVideoUrl(affiliate.videos[0].url)"
198
- width="100%"
199
- style="max-width: 300px; margin:auto;"
200
- scrolling="no"
201
- frameborder="0"
202
- marginheight="0"
203
- marginwidth="0"
204
- allowfullscreen="">
205
- </iframe>
206
- </div>
207
- <div v-else>
208
- <h3 class="mb-3">Videos</h3>
209
- <input name="affiliateName" type="hidden" id="affiliateName" :value="affiliate.name">
210
- <span v-for="video in affiliate.videos" :key="video.id">
211
- <div class="mb-2"><a href="javascript:null" class="affiliate-video-trigger" @click="openVideoModal(video.name, video.url)">{{ video.name }}</a></div>
212
- </span>
213
- </div>
214
- </div>
215
- </div>
216
- <div v-if="affiliate.links.length>0">
217
- <div :class="classBinding(classObject, 'affiliateContentBox', '')">
218
- <h3 class="mb-3">Links</h3>
219
- <span v-for="link in affiliate.links" :key="link.id">
220
- <div class="mb-2"><a @click="fireAnalytics('external_link-' + link.name)" :href="link.url" class="affiliate-link" target="_blank">{{ link.name }}</a></div>
221
- </span>
222
- </div>
223
- </div>
224
-
225
- </div>
226
- <div class="grid-container-responsive mt-5">
227
- <div v-if="showLeftBottomBox" :class="classBinding(classObject, 'affiliateContentBox', '')">
228
- <div v-if="getAffiliateContentItem('custom_box_1')" v-html="getAffiliateContentItem('custom_box_1')"></div>
229
- <div v-else-if="hasContactInfo">
230
- <div class="flex flex-col md:flex-row">
231
- <div v-if="affiliate.contact_photo" class="mr-4 w-1/3 mb-3 md:mb-0 self-center md:self-start">
232
- <img :src="affiliate.contact_photo" class="w-full" />
233
- </div>
234
- <div class="text-center md:text-left">
235
- <p>Contact:</p>
236
- <p>
237
- <span v-if="affiliate.contact_name">{{affiliate.contact_name}}<br/></span>
238
- <span v-if="affiliate.contact_title">{{affiliate.contact_title}}<br/></span>
239
- <span v-if="affiliate.contact_phone">Phone: {{affiliate.contact_phone}}<br/></span>
240
- <span v-if="affiliate.contact_email">
241
- <a @click="fireAnalytics('contact_email')" class="affiliate-email" :href="'mailto:' + affiliate.contact_email">
242
- {{affiliate.contact_email}}
243
- </a><br />
244
- </span>
245
- </p>
246
- </div>
247
- </div>
248
- </div>
249
- </div>
250
-
251
- <div :class="classBinding(classObject, 'affiliateContentBox', '')">
252
- <div v-if="getAffiliateContentItem('custom_box_2')" v-html="getAffiliateContentItem('custom_box_2')"></div>
253
- <div v-else class="text-center md:text-right">
254
- <p>
255
- <span v-if="affiliate.contact_address">{{affiliate.contact_address}}<br/></span>
256
- <span v-if="affiliate.contact_location">{{affiliate.contact_location}}<br/></span>
257
- <span v-if="affiliate.website"><a @click="fireAnalytics('website')" class="affiliate-website" :href="affiliate.website" target="_blank">{{affiliate.website}}</a><br/></span>
258
- </p>
259
- <span class="flex justify-center" :class="{'md:justify-end':hasContactInfo}">
260
- <a @click="fireAnalytics('twitter')" v-if="affiliate.twitter_url" :href="affiliate.twitter_url" target="_blank" class="affiliate-twitter" :aria-label="affiliate.name + ` Twitter Page`">
261
- <span class="presenter-icon"><CommonSvgIcon icon="twitter"></CommonSvgIcon></span>
262
- </a>
263
- <a @click="fireAnalytics('facebook')" v-if="affiliate.facebook_url" :href="affiliate.facebook_url" target="_blank" class="affiliate-facebook" :aria-label="affiliate.name + ` Facebook Page`">
264
- <span class="presenter-icon "><CommonSvgIcon icon="facebook"></CommonSvgIcon></span>
265
- </a>
266
- <a @click="fireAnalytics('linked_in')" v-if="affiliate.linkedin_url" :href="affiliate.linkedin_url" target="_blank" class="affiliate-linkedin" :aria-label="affiliate.name + ` LinkedIn Page`">
267
- <span class="presenter-icon"><CommonSvgIcon icon="linkedin"></CommonSvgIcon></span>
268
- </a>
269
- <a @click="fireAnalytics('youtube')" v-if="affiliate.youtube_url" :href="affiliate.youtube_url" target="_blank" class="affiliate-youtube" :aria-label="affiliate.name + ` YouTube Page`">
270
- <span class="presenter-icon"><CommonSvgIcon icon="youtube"></CommonSvgIcon></span>
271
- </a>
272
- </span>
273
- </div>
274
- </div>
275
- </div>
276
- </div>
277
-
278
- <CommonModal :visible="showVideoModal" modal-size="lg" @clicked="showVideoModal = false" class="video-dialog">
279
- <template #modal-title>
280
- <div class="p-1 pb-2">
281
- {{ modalVideoTitle }}
282
- </div>
283
- </template>
284
- <template #modal-body>
285
- <div class="video-modal-body">
286
- <iframe
287
- class='video-frame'
288
- :src="modalVideoUrl"
289
- width="640"
290
- height="360"
291
- scrolling="no"
292
- frameborder="0"
293
- marginheight="0"
294
- marginwidth="0"
295
- allowfullscreen="">
296
- </iframe>
297
- </div>
298
- </template>
299
- </CommonModal>
300
-
301
- </div>
302
-
303
- </template>
304
-
305
- <style scoped>
306
- .grid-container-responsive {
307
- display: grid;
308
- grid-template-columns: 1fr;
309
- grid-column-gap: 20px;
310
- grid-row-gap: 20px;
311
- }
312
- @media (min-width: 768px) {
313
- .grid-container-responsive {
314
- grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
315
- }
316
- }
317
- .video-dialog >>> .modal-box {
318
- width: 704px;
319
- }
320
- .video-frame {
321
- display: block;
322
- width: 640px;
323
- margin-left: auto;
324
- margin-right: auto;
325
- padding-left: auto;
326
- padding-right: auto;
327
- }
328
- </style>
329
-
1
+ <script lang="ts" setup>
2
+ import { toRefs } from "vue";
3
+ import { get } from "lodash-es";
4
+ import { useApi } from "../../composables/useApi";
5
+ import { Affiliate } from "../../models/conference";
6
+ import { affiliatePageClassObj } from "../../@types/components";
7
+ import { useClassBinding } from "../../composables/useClassBinding";
8
+
9
+
10
+ type Props = {
11
+ affiliateId: string;
12
+ classObject?: affiliatePageClassObj;
13
+ };
14
+
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ classObject: () => {
17
+ return {
18
+ container: "",
19
+ headerContainer: "",
20
+ headerNameContainer: "",
21
+ headerNameElement: "",
22
+ headerContactContainer: "",
23
+ headerSocialContainer: "",
24
+ htmlHeaderContainer: "",
25
+ biographyContainer: "",
26
+ contentContainer: "",
27
+ affiliateContentBox: "flex flex-col w-full h-full overflow-y-auto p-4 border border-slate-300",
28
+ };
29
+ },
30
+ });
31
+
32
+ // data
33
+ const { affiliateId } = toRefs(props);
34
+ const { classBinding } = useClassBinding();
35
+ const affiliate = ref<Affiliate>({documents:[],links:[],videos:[]});
36
+ const showVideoModal = ref<boolean>(false);
37
+ const modalVideoTitle = ref<string>("");
38
+ const modalVideoUrl = ref<string>("");
39
+
40
+ // computed
41
+ const contentCount = computed((): number => {
42
+ let hasDocuments = (affiliate.value.documents.length > 0) ? 1 : 0;
43
+ let hasVideos = (affiliate.value.videos.length > 0) ? 1 : 0;
44
+ let hasLinks = (affiliate.value.links.length > 0) ? 1 : 0;
45
+ return hasDocuments + hasVideos + hasLinks;
46
+ });
47
+ const hasContactInfo = computed((): boolean => {
48
+ return (
49
+ affiliate.value.contact_photo ||
50
+ affiliate.value.contact_name ||
51
+ affiliate.value.contact_title ||
52
+ affiliate.value.contact_phone ||
53
+ affiliate.value.contact_email
54
+ );
55
+ });
56
+ const showLeftBottomBox = computed((): boolean => {
57
+ return (hasContactInfo.value || getAffiliateContentItem('custom_box_1'));
58
+ });
59
+
60
+ // methods
61
+ const fireAnalytics = (type: string) => {
62
+ let event = 'affiliate-' + affiliate.value.name + '-' + type;
63
+ this.$analyticsPlugin.click(event, event);
64
+ };
65
+
66
+ const getAffiliateContentItem = (_item: string) => {
67
+ let itemVal = get(affiliate.value, 'affiliate_content.'+_item);
68
+ if (itemVal == undefined || itemVal == '') { return null; }
69
+ return itemVal;
70
+ };
71
+
72
+ const getAffiliateContent = () => {
73
+ return new Promise((resolve, reject) => {
74
+ const request = useApi();
75
+ request(
76
+ `/affiliates/${affiliateId.value}?with=affiliate_content,documents,videos,links`
77
+ )
78
+ .then((response) => {
79
+ affiliate.value = response.data;
80
+ })
81
+ .catch((error) => {
82
+ reject(error);
83
+ });
84
+ });
85
+ };
86
+
87
+ const getStreamingVideoUrl = (_videoUrl: string): string => {
88
+ let tmpUrl = 'https://cdn.v3mediaportal.com/streaming-player/iframe-player.htm?';
89
+ tmpUrl += 'cs=' + encodeURIComponent(_videoUrl);
90
+ tmpUrl += '&ar=16:9&f=video&as=false';
91
+ return tmpUrl;
92
+ };
93
+
94
+ const openVideoModal = (_title: string, _videoUrl: string) => {
95
+ fireAnalytics('video-' + _title);
96
+ let tmpUrl = getStreamingVideoUrl(_videoUrl);
97
+ modalVideoUrl.value = tmpUrl;
98
+ modalVideoTitle.value = _title;
99
+ showVideoModal.value = true;
100
+ };
101
+
102
+ // on mount
103
+ onMounted(() => {
104
+ getAffiliateContent();
105
+ });
106
+
107
+ </script>
108
+
109
+ <template>
110
+ <div
111
+ :class="
112
+ classBinding(
113
+ classObject,
114
+ 'container',
115
+ 'flex w-full flex-col'
116
+ )
117
+ "
118
+ >
119
+
120
+ <div v-if="getAffiliateContentItem('html_vanity_page')" v-html="getAffiliateContentItem('html_vanity_page')">
121
+ </div>
122
+
123
+ <div v-else>
124
+
125
+ <div :class="classBinding(
126
+ classObject,
127
+ 'headerContainer',
128
+ 'flex flex-col md:flex-row w-full pb-6 border-b border-solid border-grey-light'
129
+ )">
130
+ <div v-if="affiliate.photo" class="mb-6 md:mb-0">
131
+ <img :src="affiliate.photo" />
132
+ </div>
133
+ <div
134
+ v-if="!affiliate.photo"
135
+ :class="classBinding(
136
+ classObject,
137
+ 'headerNameContainer',
138
+ 'flex w-full justify-center md:justify-start'
139
+ )"
140
+ >
141
+ <h1 :class="classBinding(classObject, 'headerNameElement', 'font-light mb-0 body-color-4 self-end')">{{affiliate.name}}</h1>
142
+ </div>
143
+ <div
144
+ v-if="getAffiliateContentItem('contact_in_header') == 1"
145
+ :class="classBinding(classObject, 'headerContactContainer', 'w-full text-center md:text-right')"
146
+ >
147
+ <p>
148
+ <span v-if="affiliate.contact_address">{{affiliate.contact_address}}<br/></span>
149
+ <span v-if="affiliate.contact_location">{{affiliate.contact_location}}<br/></span>
150
+ <span v-if="affiliate.website"><a @click="fireAnalytics('website')" class="affiliate-website" :href="affiliate.website" target="_blank">{{affiliate.website}}</a><br/></span>
151
+ </p>
152
+ <span :class="classBinding(classObject, 'headerSocialContainer', 'flex justify-center md:justify-end')">
153
+ <a @click="fireAnalytics('twitter')" v-if="affiliate.twitter_url" :href="affiliate.twitter_url" target="_blank" class="affiliate-twitter" :aria-label="affiliate.name + ` Twitter Page`">
154
+ <span class="presenter-icon"><CommonSvgIcon icon="twitter"></CommonSvgIcon></span>
155
+ </a>
156
+ <a @click="fireAnalytics('facebook')" v-if="affiliate.facebook_url" :href="affiliate.facebook_url" target="_blank" class="affiliate-facebook" :aria-label="affiliate.name + ` Facebook Page`">
157
+ <span class="presenter-icon "><CommonSvgIcon icon="facebook"></CommonSvgIcon></span>
158
+ </a>
159
+ <a @click="fireAnalytics('linked_in')" v-if="affiliate.linkedin_url" :href="affiliate.linkedin_url" target="_blank" class="affiliate-linkedin" :aria-label="affiliate.name + ` LinkedIn Page`">
160
+ <span class="presenter-icon"><CommonSvgIcon icon="linkedin"></CommonSvgIcon></span>
161
+ </a>
162
+ <a @click="fireAnalytics('youtube')" v-if="affiliate.youtube_url" :href="affiliate.youtube_url" target="_blank" class="affiliate-youtube" :aria-label="affiliate.name + ` YouTube Page`">
163
+ <span class="presenter-icon"><CommonSvgIcon icon="youtube"></CommonSvgIcon></span>
164
+ </a>
165
+ </span>
166
+ </div>
167
+ </div>
168
+
169
+ <div
170
+ v-if="getAffiliateContentItem('html_header')"
171
+ v-html="getAffiliateContentItem('html_header')"
172
+ :class="classBinding(classObject, 'htmlHeaderContainer', 'w-full mt-5 text-center md:text-left')"
173
+ ></div>
174
+ <div
175
+ v-if="affiliate.biography"
176
+ v-html="affiliate.biography"
177
+ :class="classBinding(classObject, 'biographyContainer', 'w-full mt-5 text-center md:text-left')"
178
+ ></div>
179
+ <div
180
+ v-if="contentCount>0"
181
+ class="grid-container-responsive"
182
+ :class="classBinding(classObject, 'contentContainer', 'w-full mt-5 md:max-h-300')"
183
+ >
184
+
185
+ <div v-if="affiliate.documents.length>0">
186
+ <div :class="classBinding(classObject, 'affiliateContentBox', '')">
187
+ <h3 class="mb-3">Documents</h3>
188
+ <span v-for="document in affiliate.documents" :key="document.id">
189
+ <div class="mb-2"><a @click="fireAnalytics('document-' + document.name)" class="affiliate-document" :href="document.url" target="_blank">{{ document.name }}</a></div>
190
+ </span>
191
+ </div>
192
+ </div>
193
+ <div v-if="affiliate.videos.length>0">
194
+ <div :class="classBinding(classObject, 'affiliateContentBox', '')">
195
+ <div v-if="affiliate.videos.length == 1 && getAffiliateContentItem('embed_video') == 1">
196
+ <iframe
197
+ :src="getStreamingVideoUrl(affiliate.videos[0].url)"
198
+ width="100%"
199
+ style="max-width: 300px; margin:auto;"
200
+ scrolling="no"
201
+ frameborder="0"
202
+ marginheight="0"
203
+ marginwidth="0"
204
+ allowfullscreen="">
205
+ </iframe>
206
+ </div>
207
+ <div v-else>
208
+ <h3 class="mb-3">Videos</h3>
209
+ <input name="affiliateName" type="hidden" id="affiliateName" :value="affiliate.name">
210
+ <span v-for="video in affiliate.videos" :key="video.id">
211
+ <div class="mb-2"><a href="javascript:null" class="affiliate-video-trigger" @click="openVideoModal(video.name, video.url)">{{ video.name }}</a></div>
212
+ </span>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div v-if="affiliate.links.length>0">
217
+ <div :class="classBinding(classObject, 'affiliateContentBox', '')">
218
+ <h3 class="mb-3">Links</h3>
219
+ <span v-for="link in affiliate.links" :key="link.id">
220
+ <div class="mb-2"><a @click="fireAnalytics('external_link-' + link.name)" :href="link.url" class="affiliate-link" target="_blank">{{ link.name }}</a></div>
221
+ </span>
222
+ </div>
223
+ </div>
224
+
225
+ </div>
226
+ <div class="grid-container-responsive mt-5">
227
+ <div v-if="showLeftBottomBox" :class="classBinding(classObject, 'affiliateContentBox', '')">
228
+ <div v-if="getAffiliateContentItem('custom_box_1')" v-html="getAffiliateContentItem('custom_box_1')"></div>
229
+ <div v-else-if="hasContactInfo">
230
+ <div class="flex flex-col md:flex-row">
231
+ <div v-if="affiliate.contact_photo" class="mr-4 w-1/3 mb-3 md:mb-0 self-center md:self-start">
232
+ <img :src="affiliate.contact_photo" class="w-full" />
233
+ </div>
234
+ <div class="text-center md:text-left">
235
+ <p>Contact:</p>
236
+ <p>
237
+ <span v-if="affiliate.contact_name">{{affiliate.contact_name}}<br/></span>
238
+ <span v-if="affiliate.contact_title">{{affiliate.contact_title}}<br/></span>
239
+ <span v-if="affiliate.contact_phone">Phone: {{affiliate.contact_phone}}<br/></span>
240
+ <span v-if="affiliate.contact_email">
241
+ <a @click="fireAnalytics('contact_email')" class="affiliate-email" :href="'mailto:' + affiliate.contact_email">
242
+ {{affiliate.contact_email}}
243
+ </a><br />
244
+ </span>
245
+ </p>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+
251
+ <div :class="classBinding(classObject, 'affiliateContentBox', '')">
252
+ <div v-if="getAffiliateContentItem('custom_box_2')" v-html="getAffiliateContentItem('custom_box_2')"></div>
253
+ <div v-else class="text-center md:text-right">
254
+ <p>
255
+ <span v-if="affiliate.contact_address">{{affiliate.contact_address}}<br/></span>
256
+ <span v-if="affiliate.contact_location">{{affiliate.contact_location}}<br/></span>
257
+ <span v-if="affiliate.website"><a @click="fireAnalytics('website')" class="affiliate-website" :href="affiliate.website" target="_blank">{{affiliate.website}}</a><br/></span>
258
+ </p>
259
+ <span class="flex justify-center" :class="{'md:justify-end':hasContactInfo}">
260
+ <a @click="fireAnalytics('twitter')" v-if="affiliate.twitter_url" :href="affiliate.twitter_url" target="_blank" class="affiliate-twitter" :aria-label="affiliate.name + ` Twitter Page`">
261
+ <span class="presenter-icon"><CommonSvgIcon icon="twitter"></CommonSvgIcon></span>
262
+ </a>
263
+ <a @click="fireAnalytics('facebook')" v-if="affiliate.facebook_url" :href="affiliate.facebook_url" target="_blank" class="affiliate-facebook" :aria-label="affiliate.name + ` Facebook Page`">
264
+ <span class="presenter-icon "><CommonSvgIcon icon="facebook"></CommonSvgIcon></span>
265
+ </a>
266
+ <a @click="fireAnalytics('linked_in')" v-if="affiliate.linkedin_url" :href="affiliate.linkedin_url" target="_blank" class="affiliate-linkedin" :aria-label="affiliate.name + ` LinkedIn Page`">
267
+ <span class="presenter-icon"><CommonSvgIcon icon="linkedin"></CommonSvgIcon></span>
268
+ </a>
269
+ <a @click="fireAnalytics('youtube')" v-if="affiliate.youtube_url" :href="affiliate.youtube_url" target="_blank" class="affiliate-youtube" :aria-label="affiliate.name + ` YouTube Page`">
270
+ <span class="presenter-icon"><CommonSvgIcon icon="youtube"></CommonSvgIcon></span>
271
+ </a>
272
+ </span>
273
+ </div>
274
+ </div>
275
+ </div>
276
+ </div>
277
+
278
+ <CommonModal :visible="showVideoModal" modal-size="lg" @clicked="showVideoModal = false" class="video-dialog">
279
+ <template #modal-title>
280
+ <div class="p-1 pb-2">
281
+ {{ modalVideoTitle }}
282
+ </div>
283
+ </template>
284
+ <template #modal-body>
285
+ <div class="video-modal-body">
286
+ <iframe
287
+ class='video-frame'
288
+ :src="modalVideoUrl"
289
+ width="640"
290
+ height="360"
291
+ scrolling="no"
292
+ frameborder="0"
293
+ marginheight="0"
294
+ marginwidth="0"
295
+ allowfullscreen="">
296
+ </iframe>
297
+ </div>
298
+ </template>
299
+ </CommonModal>
300
+
301
+ </div>
302
+
303
+ </template>
304
+
305
+ <style scoped>
306
+ .grid-container-responsive {
307
+ display: grid;
308
+ grid-template-columns: 1fr;
309
+ grid-column-gap: 20px;
310
+ grid-row-gap: 20px;
311
+ }
312
+ @media (min-width: 768px) {
313
+ .grid-container-responsive {
314
+ grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
315
+ }
316
+ }
317
+ .video-dialog >>> .modal-box {
318
+ width: 704px;
319
+ }
320
+ .video-frame {
321
+ display: block;
322
+ width: 640px;
323
+ margin-left: auto;
324
+ margin-right: auto;
325
+ padding-left: auto;
326
+ padding-right: auto;
327
+ }
328
+ </style>
329
+