@icvdeveloper/common-module 0.0.46 → 0.0.49

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 (77) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/@types/components.d.ts +3 -0
  5. package/dist/runtime/assets/svg/answer.svg +14 -14
  6. package/dist/runtime/assets/svg/avatar.svg +1 -1
  7. package/dist/runtime/assets/svg/bell-icon.svg +3 -3
  8. package/dist/runtime/assets/svg/checkmark-icon.svg +1 -1
  9. package/dist/runtime/assets/svg/close-icon.svg +1 -1
  10. package/dist/runtime/assets/svg/icon-avatar.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 +17 -17
  33. package/dist/runtime/components/agenda/AgendaTabbed.vue +300 -300
  34. package/dist/runtime/components/agenda/components/InfoLink.vue +56 -56
  35. package/dist/runtime/components/agenda/components/PlayIcon.vue +49 -49
  36. package/dist/runtime/components/agenda/components/PresentationLink.vue +137 -137
  37. package/dist/runtime/components/agenda/components/Sponsor.vue +132 -132
  38. package/dist/runtime/components/auth/LoginFullWidth.vue +78 -78
  39. package/dist/runtime/components/auth/PasswordReset.vue +60 -60
  40. package/dist/runtime/components/auth/Registration.vue +27 -27
  41. package/dist/runtime/components/auth/Ucc.vue +52 -0
  42. package/dist/runtime/components/core/Accordion.vue +39 -39
  43. package/dist/runtime/components/core/CountdownTimer.vue +308 -308
  44. package/dist/runtime/components/core/DynamicHtml.vue +1 -1
  45. package/dist/runtime/components/core/Modal.vue +111 -111
  46. package/dist/runtime/components/core/Navbar.vue +154 -154
  47. package/dist/runtime/components/core/SvgIcon.vue +139 -139
  48. package/dist/runtime/components/core/ZoomModal.vue +37 -37
  49. package/dist/runtime/components/events/EventHeader.vue +133 -133
  50. package/dist/runtime/components/events/ListEvents.vue +477 -477
  51. package/dist/runtime/components/forms/AlertBox.vue +21 -21
  52. package/dist/runtime/components/forms/ErrorField.vue +17 -17
  53. package/dist/runtime/components/forms/Message.vue +27 -27
  54. package/dist/runtime/components/forms/SearchInput.vue +38 -38
  55. package/dist/runtime/components/forms/SupportForm.vue +112 -112
  56. package/dist/runtime/components/forms/SwitchInput.vue +42 -42
  57. package/dist/runtime/components/forms/TextArea.vue +26 -26
  58. package/dist/runtime/components/forms/TextInput.vue +28 -28
  59. package/dist/runtime/components/layouts/Accordion.vue +78 -78
  60. package/dist/runtime/components/presenters/PresenterListing.vue +164 -164
  61. package/dist/runtime/components/presenters/PresenterModal.vue +225 -225
  62. package/dist/runtime/components/profile/Profile.vue +149 -149
  63. package/dist/runtime/components/profile/components/Sidebar.vue +27 -27
  64. package/dist/runtime/components/profile/components/SidebarNavItem.vue +39 -39
  65. package/dist/runtime/components/profile/tabs/Favorites.vue +21 -21
  66. package/dist/runtime/components/profile/tabs/GeneralInformation.vue +122 -122
  67. package/dist/runtime/components/profile/tabs/ProfileImage.vue +75 -75
  68. package/dist/runtime/components/support/FAQAccordion.vue +247 -247
  69. package/dist/runtime/composables/index.d.ts +1 -0
  70. package/dist/runtime/composables/index.mjs +1 -0
  71. package/dist/runtime/composables/useClassBinding.d.ts +1 -1
  72. package/dist/runtime/composables/useClassBinding.mjs +1 -1
  73. package/dist/runtime/composables/useDateFormat.d.ts +2 -2
  74. package/dist/runtime/composables/useDateFormat.mjs +4 -4
  75. package/dist/runtime/composables/useUcc.d.ts +11 -0
  76. package/dist/runtime/composables/useUcc.mjs +67 -0
  77. package/package.json +59 -59
@@ -1,247 +1,247 @@
1
- <script lang="ts" setup>
2
- import { toRefs, unref } from "vue";
3
-
4
- type Props = {
5
- streamTestEnabled?: boolean;
6
- showForm?: boolean;
7
- liveSupportUrl?: string;
8
- };
9
-
10
- const props = withDefaults(defineProps<Props>(), {
11
- streamTestEnabled: false,
12
- showForm: true,
13
- liveSupportUrl: "",
14
- });
15
- </script>
16
-
17
- <template>
18
- <section>
19
- <CommonAccordion v-if="props.streamTestEnabled">
20
- <template #question>
21
- <span class="font-bold"
22
- >Q: Have you run the pre-event streaming test?</span
23
- >
24
- </template>
25
- <template #answer>
26
- <p>
27
- The most important step is to visit our
28
- <a href="/stream-test">Pre-Event Test Stream</a> using the computer or
29
- device you will use for the live web event, and connecting with the
30
- same network connection you will use for the live web event. We begin
31
- webcasting a pre-event test stream one week prior to the event.
32
- </p>
33
- <p>
34
- If you can see video, hear the sound, and see the test slide, you will
35
- most likely be ready for the web event.
36
- </p>
37
- </template>
38
- </CommonAccordion>
39
- <CommonAccordion>
40
- <template #question>
41
- <span class="font-bold">Q: What are the browser requirements?</span>
42
- </template>
43
- <template #answer>
44
- <div>
45
- <p>
46
- <span class="font-bold">Desktop:</span> Minimum browser versions of
47
- the following:
48
- </p>
49
- <ul>
50
- <li>Chrome 65</li>
51
- <li>Edge 16</li>
52
- <li>Firefox 60</li>
53
- <li>Internet Explorer 11 in Windows 8.1+ only</li>
54
- <li>Safari 10</li>
55
- </ul>
56
- <p>
57
- <span class="font-bold">Mobile:</span> Minimum browser versions of
58
- the following for Android 4.4+ and iOS 11+:
59
- </p>
60
- <ul>
61
- <li>Chrome 63</li>
62
- <li>Safari 10</li>
63
- </ul>
64
- </div>
65
- </template>
66
- </CommonAccordion>
67
- <CommonAccordion>
68
- <template #question>
69
- <span class="font-bold">Q: Why am I getting a login error?</span>
70
- </template>
71
-
72
- <template #answer>
73
- <p>
74
- Verify that you are using the same email address you used to register
75
- for the event. If you just registered, wait 1-2 minutes to allow us to
76
- process your registration, then try again. If you are still unable to
77
- log in, please
78
- <span v-if="showForm">contact us via the support form below.</span>
79
- <span v-else
80
- >email
81
- <a href="mailto:support@rubiconportals.com"
82
- >support@rubiconportals.com</a
83
- >.</span
84
- >
85
- </p>
86
- </template>
87
- </CommonAccordion>
88
- <CommonAccordion>
89
- <template #question>
90
- <span class="font-bold"
91
- >Q: What makes the sound or video stop, skip, cut out, or
92
- buffer?</span
93
- >
94
- </template>
95
-
96
- <template #answer>
97
- <div>
98
- <p>
99
- Audio and video stuttering, skipping, stopping and starting, or
100
- buffering happens for a few reasons. If you are experiencing these
101
- issues, first try refreshing your browser. You can do this a few
102
- different ways, depending on your browser and computer or device:
103
- </p>
104
-
105
- <ol>
106
- <li>
107
- Clicking the circle-shaped (reload) arrows in or next to the web
108
- address bar
109
- </li>
110
- <li>
111
- Right-clicking over the webcast the page and choosing "Reload" or
112
- "Refresh"
113
- </li>
114
- <li>Using the keyboard - Ctrl-R (PC) or Command-R (Mac)</li>
115
- </ol>
116
-
117
- <p>
118
- If refreshing your browser does not work, you may be experiencing
119
- one of the following issues:
120
- </p>
121
-
122
- <p>
123
- <span class="font-bold">Slow Internet Connection:</span> You may not
124
- have a fast enough Internet connection to reliably view the web
125
- event video stream. Your Internet connection should have download
126
- speeds of at least 5Mbps. Ideally we recommend an Internet
127
- connection capable of at least 10Mbps.
128
- </p>
129
-
130
- <p>
131
- <span class="font-bold">Network Traffic:</span> Internet traffic
132
- within your local network will slow down the delivery of the video
133
- stream making it difficult for you to connect and may cause
134
- buffering or stopping and starting. If you have repeated issues
135
- connecting, please notify your in-house IT department; if you are at
136
- your home, contact your Internet service provider. They are often
137
- able to provide quick fixes for your issue.
138
- </p>
139
-
140
- <p>
141
- <span class="font-bold">Slow Computer or Tablet:</span> If your
142
- computer or tablet is old, it might be too slow to play the webcast
143
- stream. Or, if you have other programs open, they may be using so
144
- much processor time and/or RAM that the player is unable to work
145
- properly. Try closing other programs, refreshing your page (see
146
- above), and viewing the webcast again.
147
- </p>
148
-
149
- <p>
150
- <span class="font-bold">Local Congestion:</span> Local bandwidth (on
151
- your computer or local network) is shared between all open
152
- applications. other computers, connected devices, mobile phones and
153
- the player. Closing applications and disconnecting other internet or
154
- network connected devices may reduce buffering.
155
- </p>
156
-
157
- <p>
158
- <span class="font-bold">No Sound:</span> Visit
159
- <a href="https://youtube.com" target="_blank">YouTube.com</a> or
160
- another video site and make sure that you can hear those videos play
161
- sound. If you hear sound on YouTube, make sure your media player
162
- volume control isn’t muted. If you don’t hear any sound, check the
163
- player volume, your system volume, and speaker volume, and ensure
164
- that they are all turned on and turned up.
165
- </p>
166
- </div>
167
- </template>
168
- </CommonAccordion>
169
-
170
- <CommonAccordion>
171
- <template #question>
172
- <span class="font-bold"
173
- >Q: Why is my video completely black (or displaying an error)?</span
174
- >
175
- </template>
176
-
177
- <template #answer>
178
- <p>
179
- If your webcast does not start playing even after trying the above
180
- fixes, the stream may have gone down due to technical issues at the
181
- location or out on the internet between the location of the event and
182
- your computer. If this is the case, everyone else watching the stream
183
- will be having the same issues as you. Send a message to tech support
184
- using the “Support" link at the top of the player page. If you do not
185
- receive a response within a few minutes, it is likely that the stream
186
- is down for everyone and that we are working on getting it back up.
187
- </p>
188
- </template>
189
- </CommonAccordion>
190
-
191
- <CommonAccordion>
192
- <template #question>
193
- <span class="font-bold"
194
- >Q: Can I view the live stream on a mobile device?</span
195
- >
196
- </template>
197
- <template #answer>
198
- <p>
199
- You can view the webcast from a mobile device, such as a cell phone,
200
- iPad, or tablet. We recommend that you be somewhere where there is
201
- fast, reliable WiFi or a strong data connection in order to avoid any
202
- interruptions. There are many versions of mobile operating systems on
203
- the market today. We strive to make video playable on all devices,
204
- however while we try to create a universally playable stream, some
205
- older devices may not be compatible.
206
- </p>
207
- <p>
208
- Also, mobile bandwidth can fluctuate extensively from location to
209
- location. Because this is a live streaming protocol, a consistent
210
- sustained data rate is required for the stream to play properly.
211
- Unlike video on YouTube and other services, that will progressively
212
- download the video, live video is constant, and if bandwidth
213
- fluctuates below a minimum data rate, even for a couple of seconds,
214
- the stream could be interrupted.
215
- </p>
216
- </template>
217
- </CommonAccordion>
218
- <CommonAccordion>
219
- <template #question>
220
- <span class="font-bold"
221
- >Q: Who can I contact if I still need help?</span
222
- >
223
- </template>
224
- <template #answer>
225
- <div>
226
- <div v-if="showForm">
227
- <span class="font-bold">Support Form</span><br />
228
- You can email support using the support form below.
229
- </div>
230
- <div v-else>
231
- <span class="font-bold">Support Email</span><br />
232
- You can email support at
233
- <a href="mailto:support@rubiconportals.com"
234
- >support@rubiconportals.com</a
235
- >.
236
- </div>
237
- <div v-if="liveSupportUrl">
238
- <div class="mt-4 font-bold">Live Support Chat</div>
239
- During the webcast, live support will also be available to assist.
240
- You may request live support by
241
- <a :href="liveSupportUrl" target="_blank">clicking here</a>.
242
- </div>
243
- </div>
244
- </template>
245
- </CommonAccordion>
246
- </section>
247
- </template>
1
+ <script lang="ts" setup>
2
+ import { toRefs, unref } from "vue";
3
+
4
+ type Props = {
5
+ streamTestEnabled?: boolean;
6
+ showForm?: boolean;
7
+ liveSupportUrl?: string;
8
+ };
9
+
10
+ const props = withDefaults(defineProps<Props>(), {
11
+ streamTestEnabled: false,
12
+ showForm: true,
13
+ liveSupportUrl: "",
14
+ });
15
+ </script>
16
+
17
+ <template>
18
+ <section>
19
+ <CommonAccordion v-if="props.streamTestEnabled">
20
+ <template #question>
21
+ <span class="font-bold"
22
+ >Q: Have you run the pre-event streaming test?</span
23
+ >
24
+ </template>
25
+ <template #answer>
26
+ <p>
27
+ The most important step is to visit our
28
+ <a href="/stream-test">Pre-Event Test Stream</a> using the computer or
29
+ device you will use for the live web event, and connecting with the
30
+ same network connection you will use for the live web event. We begin
31
+ webcasting a pre-event test stream one week prior to the event.
32
+ </p>
33
+ <p>
34
+ If you can see video, hear the sound, and see the test slide, you will
35
+ most likely be ready for the web event.
36
+ </p>
37
+ </template>
38
+ </CommonAccordion>
39
+ <CommonAccordion>
40
+ <template #question>
41
+ <span class="font-bold">Q: What are the browser requirements?</span>
42
+ </template>
43
+ <template #answer>
44
+ <div>
45
+ <p>
46
+ <span class="font-bold">Desktop:</span> Minimum browser versions of
47
+ the following:
48
+ </p>
49
+ <ul>
50
+ <li>Chrome 65</li>
51
+ <li>Edge 16</li>
52
+ <li>Firefox 60</li>
53
+ <li>Internet Explorer 11 in Windows 8.1+ only</li>
54
+ <li>Safari 10</li>
55
+ </ul>
56
+ <p>
57
+ <span class="font-bold">Mobile:</span> Minimum browser versions of
58
+ the following for Android 4.4+ and iOS 11+:
59
+ </p>
60
+ <ul>
61
+ <li>Chrome 63</li>
62
+ <li>Safari 10</li>
63
+ </ul>
64
+ </div>
65
+ </template>
66
+ </CommonAccordion>
67
+ <CommonAccordion>
68
+ <template #question>
69
+ <span class="font-bold">Q: Why am I getting a login error?</span>
70
+ </template>
71
+
72
+ <template #answer>
73
+ <p>
74
+ Verify that you are using the same email address you used to register
75
+ for the event. If you just registered, wait 1-2 minutes to allow us to
76
+ process your registration, then try again. If you are still unable to
77
+ log in, please
78
+ <span v-if="showForm">contact us via the support form below.</span>
79
+ <span v-else
80
+ >email
81
+ <a href="mailto:support@rubiconportals.com"
82
+ >support@rubiconportals.com</a
83
+ >.</span
84
+ >
85
+ </p>
86
+ </template>
87
+ </CommonAccordion>
88
+ <CommonAccordion>
89
+ <template #question>
90
+ <span class="font-bold"
91
+ >Q: What makes the sound or video stop, skip, cut out, or
92
+ buffer?</span
93
+ >
94
+ </template>
95
+
96
+ <template #answer>
97
+ <div>
98
+ <p>
99
+ Audio and video stuttering, skipping, stopping and starting, or
100
+ buffering happens for a few reasons. If you are experiencing these
101
+ issues, first try refreshing your browser. You can do this a few
102
+ different ways, depending on your browser and computer or device:
103
+ </p>
104
+
105
+ <ol>
106
+ <li>
107
+ Clicking the circle-shaped (reload) arrows in or next to the web
108
+ address bar
109
+ </li>
110
+ <li>
111
+ Right-clicking over the webcast the page and choosing "Reload" or
112
+ "Refresh"
113
+ </li>
114
+ <li>Using the keyboard - Ctrl-R (PC) or Command-R (Mac)</li>
115
+ </ol>
116
+
117
+ <p>
118
+ If refreshing your browser does not work, you may be experiencing
119
+ one of the following issues:
120
+ </p>
121
+
122
+ <p>
123
+ <span class="font-bold">Slow Internet Connection:</span> You may not
124
+ have a fast enough Internet connection to reliably view the web
125
+ event video stream. Your Internet connection should have download
126
+ speeds of at least 5Mbps. Ideally we recommend an Internet
127
+ connection capable of at least 10Mbps.
128
+ </p>
129
+
130
+ <p>
131
+ <span class="font-bold">Network Traffic:</span> Internet traffic
132
+ within your local network will slow down the delivery of the video
133
+ stream making it difficult for you to connect and may cause
134
+ buffering or stopping and starting. If you have repeated issues
135
+ connecting, please notify your in-house IT department; if you are at
136
+ your home, contact your Internet service provider. They are often
137
+ able to provide quick fixes for your issue.
138
+ </p>
139
+
140
+ <p>
141
+ <span class="font-bold">Slow Computer or Tablet:</span> If your
142
+ computer or tablet is old, it might be too slow to play the webcast
143
+ stream. Or, if you have other programs open, they may be using so
144
+ much processor time and/or RAM that the player is unable to work
145
+ properly. Try closing other programs, refreshing your page (see
146
+ above), and viewing the webcast again.
147
+ </p>
148
+
149
+ <p>
150
+ <span class="font-bold">Local Congestion:</span> Local bandwidth (on
151
+ your computer or local network) is shared between all open
152
+ applications. other computers, connected devices, mobile phones and
153
+ the player. Closing applications and disconnecting other internet or
154
+ network connected devices may reduce buffering.
155
+ </p>
156
+
157
+ <p>
158
+ <span class="font-bold">No Sound:</span> Visit
159
+ <a href="https://youtube.com" target="_blank">YouTube.com</a> or
160
+ another video site and make sure that you can hear those videos play
161
+ sound. If you hear sound on YouTube, make sure your media player
162
+ volume control isn’t muted. If you don’t hear any sound, check the
163
+ player volume, your system volume, and speaker volume, and ensure
164
+ that they are all turned on and turned up.
165
+ </p>
166
+ </div>
167
+ </template>
168
+ </CommonAccordion>
169
+
170
+ <CommonAccordion>
171
+ <template #question>
172
+ <span class="font-bold"
173
+ >Q: Why is my video completely black (or displaying an error)?</span
174
+ >
175
+ </template>
176
+
177
+ <template #answer>
178
+ <p>
179
+ If your webcast does not start playing even after trying the above
180
+ fixes, the stream may have gone down due to technical issues at the
181
+ location or out on the internet between the location of the event and
182
+ your computer. If this is the case, everyone else watching the stream
183
+ will be having the same issues as you. Send a message to tech support
184
+ using the “Support" link at the top of the player page. If you do not
185
+ receive a response within a few minutes, it is likely that the stream
186
+ is down for everyone and that we are working on getting it back up.
187
+ </p>
188
+ </template>
189
+ </CommonAccordion>
190
+
191
+ <CommonAccordion>
192
+ <template #question>
193
+ <span class="font-bold"
194
+ >Q: Can I view the live stream on a mobile device?</span
195
+ >
196
+ </template>
197
+ <template #answer>
198
+ <p>
199
+ You can view the webcast from a mobile device, such as a cell phone,
200
+ iPad, or tablet. We recommend that you be somewhere where there is
201
+ fast, reliable WiFi or a strong data connection in order to avoid any
202
+ interruptions. There are many versions of mobile operating systems on
203
+ the market today. We strive to make video playable on all devices,
204
+ however while we try to create a universally playable stream, some
205
+ older devices may not be compatible.
206
+ </p>
207
+ <p>
208
+ Also, mobile bandwidth can fluctuate extensively from location to
209
+ location. Because this is a live streaming protocol, a consistent
210
+ sustained data rate is required for the stream to play properly.
211
+ Unlike video on YouTube and other services, that will progressively
212
+ download the video, live video is constant, and if bandwidth
213
+ fluctuates below a minimum data rate, even for a couple of seconds,
214
+ the stream could be interrupted.
215
+ </p>
216
+ </template>
217
+ </CommonAccordion>
218
+ <CommonAccordion>
219
+ <template #question>
220
+ <span class="font-bold"
221
+ >Q: Who can I contact if I still need help?</span
222
+ >
223
+ </template>
224
+ <template #answer>
225
+ <div>
226
+ <div v-if="showForm">
227
+ <span class="font-bold">Support Form</span><br />
228
+ You can email support using the support form below.
229
+ </div>
230
+ <div v-else>
231
+ <span class="font-bold">Support Email</span><br />
232
+ You can email support at
233
+ <a href="mailto:support@rubiconportals.com"
234
+ >support@rubiconportals.com</a
235
+ >.
236
+ </div>
237
+ <div v-if="liveSupportUrl">
238
+ <div class="mt-4 font-bold">Live Support Chat</div>
239
+ During the webcast, live support will also be available to assist.
240
+ You may request live support by
241
+ <a :href="liveSupportUrl" target="_blank">clicking here</a>.
242
+ </div>
243
+ </div>
244
+ </template>
245
+ </CommonAccordion>
246
+ </section>
247
+ </template>
@@ -8,4 +8,5 @@ export * from "./useLogin";
8
8
  export * from "./usePresentation";
9
9
  export * from "./usePresenter";
10
10
  export * from "./usePresenters";
11
+ export * from "./useUcc";
11
12
  export * from "./useV3plusCommonModule";
@@ -8,4 +8,5 @@ export * from "./useLogin.mjs";
8
8
  export * from "./usePresentation.mjs";
9
9
  export * from "./usePresenter.mjs";
10
10
  export * from "./usePresenters.mjs";
11
+ export * from "./useUcc.mjs";
11
12
  export * from "./useV3plusCommonModule.mjs";
@@ -1,4 +1,4 @@
1
1
  export type UseClassBindingMethods = {
2
- classBinding(_classObject: {}, _element: string, _defaults: string): string;
2
+ classBinding(_classObject: {} | undefined, _element: string, _defaults: string): string;
3
3
  };
4
4
  export declare const useClassBinding: () => UseClassBindingMethods;
@@ -1,7 +1,7 @@
1
1
  export const useClassBinding = () => {
2
2
  const classBinding = (_classObject, _element, _defaults) => {
3
3
  const key = _element;
4
- if (_classObject[`${key}`] === void 0 || !_classObject[`${key}`].length) {
4
+ if (_classObject === void 0 || _classObject[`${key}`] === void 0 || !_classObject[`${key}`].length) {
5
5
  return _defaults;
6
6
  }
7
7
  return _classObject[`${key}`];
@@ -3,10 +3,10 @@ export type DateFunctions = {
3
3
  * Takes a date string and converts it to a formatted date
4
4
  * e.g August 8, 2022
5
5
  */
6
- formatDate: (date: string) => string;
6
+ formatDate: (date: string, dateFormat?: string) => string;
7
7
  /**
8
8
  * Takes a date string with its timezone and converts it to the users local time.
9
9
  */
10
- formatTimezoneToLocal: (date: string | Date, format: string, timezone: string) => string;
10
+ formatTimezoneToLocal: (date: string | Date, dateFormat: string, timezone: string) => string;
11
11
  };
12
12
  export declare const useDateFormat: () => DateFunctions;
@@ -1,17 +1,17 @@
1
1
  import { format as formatTz } from "date-fns-tz";
2
2
  import { format, parseISO } from "date-fns";
3
3
  export const useDateFormat = () => {
4
- const formatDate = (date) => {
5
- return format(new Date(parseISO(date)), "MMMM do, Y");
4
+ const formatDate = (date, dateFormat = "MMMM do, Y") => {
5
+ return format(new Date(parseISO(date)), dateFormat);
6
6
  };
7
- const formatTimezoneToLocal = (date, format2, timezone) => {
7
+ const formatTimezoneToLocal = (date, dateFormat, timezone) => {
8
8
  return formatTz(
9
9
  new Date(
10
10
  formatTz(parseISO(date), "yyyy-MM-dd HH:mm z", {
11
11
  timeZone: timezone
12
12
  })
13
13
  ),
14
- format2
14
+ dateFormat
15
15
  );
16
16
  };
17
17
  return {
@@ -0,0 +1,11 @@
1
+ export type UccFunctions = {
2
+ /**
3
+ * load UCC script
4
+ */
5
+ loadUccScript: (eventId: number) => void;
6
+ /**
7
+ * show UCC Event Sign Up
8
+ */
9
+ uccShowEventSignUp: (eventId: number) => void;
10
+ };
11
+ export declare const useUcc: () => UccFunctions;
@@ -0,0 +1,67 @@
1
+ import { get } from "lodash-es";
2
+ import { useApi } from "./useApi.mjs";
3
+ export const useUcc = () => {
4
+ const loadUccScript = (eventId) => {
5
+ window.uccMixin = {};
6
+ window.uccMixin.eventId = eventId;
7
+ window.uccMixin.uccShowEventSignUp = uccShowEventSignUp;
8
+ let ucc = document.createElement("script");
9
+ ucc.setAttribute("src", "https://cssjs.nejm-qa.org/mmsWidgets.js");
10
+ ucc.onload = () => {
11
+ mmsWidgets.init({
12
+ clientId: "6gw22dzjxwmgj6kekxkgwdshvyrx2uuz",
13
+ // Akamai client id
14
+ origin: "NEJMGroupEvents",
15
+ debug: true,
16
+ // set this false for production
17
+ onReady: function() {
18
+ console.log("UCC ready");
19
+ },
20
+ onLoginSuccess: function(ssoEvent) {
21
+ console.log("UCC login success");
22
+ },
23
+ onAuthStateReady: function(ssoEvent) {
24
+ console.log("UCC auth state ready");
25
+ if (window.uccMixin.eventId) {
26
+ window.uccMixin.uccShowEventSignUp(window.uccMixin.eventId);
27
+ }
28
+ },
29
+ onRegistrationSuccess: function(ssoEvent) {
30
+ console.log("UCC reg success");
31
+ },
32
+ onLogoutSuccess: function(ssoEvent) {
33
+ console.log("UCC logout success");
34
+ }
35
+ });
36
+ };
37
+ document.head.appendChild(ucc);
38
+ };
39
+ const uccShowEventSignUp = (eventId) => {
40
+ return new Promise((resolve, reject) => {
41
+ const request = useApi();
42
+ request(
43
+ `conferences/${eventId}?with=custom1`
44
+ ).then((response) => {
45
+ let brandCode = get(response.data, "custom1[0].code");
46
+ if (brandCode) {
47
+ let mmsResponse = window.mmsWidgets.showEventsSignUp(
48
+ "#uccTarget",
49
+ `${eventId}`,
50
+ null,
51
+ { productCode: `${brandCode}` }
52
+ );
53
+ } else {
54
+ throw new Error("Missing required parameter");
55
+ }
56
+ resolve(brandCode);
57
+ }).catch((error) => {
58
+ document.getElementById("uccTarget").innerHTML = `<div class='border font-bold px-4 py-3 mb-4 rounded relative message-base bg-red-100 border-red-400 text-red-600'>${error}</div>`;
59
+ reject(error);
60
+ });
61
+ });
62
+ };
63
+ return {
64
+ loadUccScript,
65
+ uccShowEventSignUp
66
+ };
67
+ };