@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
@@ -0,0 +1,99 @@
1
+ <script lang="ts" setup>
2
+ import { toRefs } from 'vue';
3
+ import { storeToRefs } from 'pinia';
4
+ import { DateTime } from 'luxon';
5
+ import { useUserStore } from '../../store/user';
6
+ import { useConferencesStore } from '../../store';
7
+ import { useEvents } from '../../composables/useEvents';
8
+ import type { Conference } from '../../models/conference';
9
+ import { useConferenceHelpers } from '../../composables';
10
+
11
+ type Props = {
12
+ conference: Conference,
13
+ group: any,
14
+ show?: boolean
15
+ }
16
+
17
+ const props = withDefaults(defineProps<Props>(), {
18
+ show: false
19
+ });
20
+
21
+ const { conference, group, show } = toRefs(props);
22
+
23
+ const { currentUser } = storeToRefs(useUserStore());
24
+
25
+ const { getConferenceStatusLabel } = useConferenceHelpers(conference);
26
+
27
+ // emits
28
+ const emit = defineEmits<{
29
+ (event: "close"): void;
30
+ }>();
31
+
32
+ // computed
33
+ const registeredConferences = (): Conference[] => {
34
+ return useConferencesStore().getRegisteredConferences();
35
+ };
36
+
37
+ // methods
38
+ const formatDateTime = (_value: string, _format: string = 'LLL') => {
39
+ return DateTime.fromISO(_value).toFormat(_format);
40
+ };
41
+ </script>
42
+
43
+ <template>
44
+ <CommonModal
45
+ v-if="show"
46
+ @click="emit('close')"
47
+ @trigger="emit('close')"
48
+ >
49
+ <template #modal-title>
50
+ <h3>You're already registered for this event.</h3>
51
+ </template>
52
+
53
+ <template #modal-body>
54
+ <div class="pt-5">
55
+ <p class="mb-0">
56
+ {{ currentUser.name }}
57
+ </p>
58
+ <p class="mb-0">
59
+ Thank you for registering for the:
60
+ </p>
61
+ <h4>{{ group.name }}</h4>
62
+
63
+ <p class="mb-1 mt-3">
64
+ You are registered into these Events. Click to go to any live or archived event.
65
+ </p>
66
+
67
+ <div class="py-5 border border-gray-600">
68
+ <div
69
+ v-for="(conf, index) in registeredConferences()"
70
+ id="list-striped"
71
+ :key="index"
72
+ class="py-2 px-3 flex justify-between"
73
+ @click="useEvents().getEventPage(conf)"
74
+ >
75
+ <div>
76
+ {{ conf.name }}
77
+ </div>
78
+ <div>
79
+ {{ formatDateTime(conf.start_date as string, 'MMMM Do') }} <span>{{ getConferenceStatusLabel(conf) }}</span>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </template>
85
+ </CommonModal>
86
+ </template>
87
+
88
+
89
+ <style>
90
+ #list-striped {
91
+ cursor: pointer;
92
+ }
93
+ #list-striped:nth-of-type(odd) {
94
+ background-color: rgb(240, 240, 240);
95
+ }
96
+ #list-striped:hover {
97
+ background-color: rgb(230, 230, 230);
98
+ }
99
+ </style>
@@ -0,0 +1,136 @@
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, onMounted } from 'vue';
3
+
4
+ type Props = {
5
+ total: number,
6
+ value: any,
7
+ errors?: {}
8
+ };
9
+
10
+ const props = withDefaults(defineProps<Props>(), {
11
+ errors: () => {
12
+ return {}
13
+ }
14
+ });
15
+
16
+ // TODO - is 'value' used?
17
+ const { total, value, errors } = toRefs(props);
18
+
19
+ // data
20
+ const paymentInputs = ref<{}>({});
21
+
22
+ // emits
23
+ // TODO - set value type
24
+ const emit = defineEmits<{
25
+ (event: 'input', value: any): void;
26
+ }>();
27
+
28
+ // computed
29
+ const totalFormatted = () => {
30
+ return new Intl.NumberFormat('en-US', {
31
+ style: 'currency',
32
+ currency: 'USD',
33
+ minimumFractionDigits: 2
34
+ })
35
+ .format(total.value/100);
36
+ };
37
+
38
+ const monthArray = ():[{ 'name': string, 'value': number}] => {
39
+ return [
40
+ { name: '01 - January', value: 1 },
41
+ { name: '02 - February', value: 2 },
42
+ { name: '03 - March', value: 3 },
43
+ { name: '04 - April', value: 4 },
44
+ { name: '05 - May', value: 5 },
45
+ { name: '06 - June', value: 6 },
46
+ { name: '07 - July', value: 7 },
47
+ { name: '08 - August', value: 8 },
48
+ { name: '09 - September', value: 9 },
49
+ { name: '10 - October', value: 10 },
50
+ { name: '11 - November', value: 11 },
51
+ { name: '12 - December', value: 12 },
52
+ ];
53
+ };
54
+
55
+ const yearArray = () => {
56
+ const startingYear = new Date().getFullYear();
57
+ const returnArray = [];
58
+ for(let i = startingYear; i <= (startingYear + 10); i++) {
59
+ returnArray.push({name: i, value: i});
60
+ }
61
+ return returnArray;
62
+ };
63
+
64
+ watch(paymentInputs.value, (newValue, oldValue) => {
65
+ emit('input', newValue);
66
+ });
67
+
68
+ onMounted(() => {
69
+ paymentInputs.value.cc_exp_month = 1;
70
+ paymentInputs.value.cc_exp_year = new Date().getFullYear();
71
+ });
72
+ </script>
73
+
74
+ <template>
75
+ <!-- Payment Form -->
76
+ <div class="row mb-5 border border-gray-400 rounded p-4">
77
+ <div class="py-3 px-3 flex bg-gray-600 rounded text-white font-semibold">
78
+ <div class="flex-1">
79
+ Payment Information
80
+ </div>
81
+ <div class="flex-1 text-right">
82
+ {{ totalFormatted }}
83
+ </div>
84
+ </div>
85
+
86
+ <div class="row flex flex-col mb-2">
87
+ <div class="flex-1 my-2">
88
+ <div>
89
+ <label class="block font-semibold text-gray-800 mb-1">
90
+ Card Number
91
+ </label>
92
+ <input
93
+ v-model="paymentInputs['cc_number']"
94
+ type="text"
95
+ class="form-input"
96
+ >
97
+ <ErrorField :errors="errors['cc_number']" />
98
+ <ErrorField :errors="errors['payment']" />
99
+ </div>
100
+ </div>
101
+ <div class="flex flex-1 my-2">
102
+ <div class="flex-1 mx-1">
103
+ <label class="block font-semibold text-gray-800 mb-1">
104
+ Exp. Month
105
+ </label>
106
+ <SelectDropDown
107
+ v-model="paymentInputs['cc_exp_month']"
108
+ :options="monthArray"
109
+ />
110
+ <ErrorField :errors="errors['cc_exp_month']" />
111
+ </div>
112
+ <div class="flex-1 mx-1">
113
+ <label class="block font-semibold text-gray-800 mb-1">
114
+ Exp. Year
115
+ </label>
116
+ <SelectDropDown
117
+ v-model="paymentInputs['cc_exp_year']"
118
+ :options="yearArray"
119
+ />
120
+ <ErrorField :errors="errors['cc_exp_year']" />
121
+ </div>
122
+ <div class="flex-1 mx-1">
123
+ <label class="block font-semibold text-gray-800 mb-1">
124
+ CVC/CVV
125
+ </label>
126
+ <input
127
+ v-model="paymentInputs['cc_cvc']"
128
+ type="text"
129
+ class="form-input"
130
+ >
131
+ <ErrorField :errors="errors['cc_cvc']" />
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </template>
@@ -0,0 +1,417 @@
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, onMounted, computed } from 'vue';
3
+ import { useRouter } from '#vue-router';
4
+ import { storeToRefs } from 'pinia';
5
+ import { get, debounce } from 'lodash-es';
6
+ import { useApi } from '../../composables';
7
+ import { useAuthStore } from '../../store';
8
+ import { useTemplateConfigsStore } from '../../store';
9
+ import type { IFetchError } from 'ofetch'
10
+ import type { Conference } from '../../models/conference';
11
+ import type { Group, RegistrationForm } from '../../models/group';
12
+
13
+ type Props = {
14
+ content: string;
15
+ conference?: Conference | null;
16
+ }
17
+
18
+ const props = withDefaults(defineProps<Props>(), {
19
+ conference: null
20
+ });
21
+
22
+ const { content } = toRefs(props);
23
+ const { globalConfigValue } = useTemplateConfigsStore();
24
+ const { user } = storeToRefs(useAuthStore());
25
+ const router = useRouter();
26
+
27
+ // data
28
+ const group = ref<Group>();
29
+ const registrationFormObject = ref<RegistrationForm>();
30
+ const formInputs = ref<{[key: string]: string}>({});
31
+ const title = ref<string>('');
32
+ const formComplete = ref<boolean>(false);
33
+ const loading = ref<boolean>(false);
34
+ const errors = ref<{[key: string]: []}>({});
35
+ const showLogin = ref<boolean>(false);
36
+ const stripeComponent = ref();
37
+
38
+ // computed
39
+ const regButtonEnabled = computed((): boolean => {
40
+ return globalConfigValue('reg_button_enabled') === true;
41
+ });
42
+
43
+ const regExternalUrl = computed((): string => {
44
+ const extRegUrl = globalConfigValue('external_reg_url');
45
+ if (extRegUrl) return extRegUrl;
46
+ return '';
47
+ });
48
+
49
+ const showCheckout = computed((): boolean => {
50
+ if (group.value && group.value.price != 0 && group.value.enabled) {
51
+ return true;
52
+ }
53
+ return false;
54
+ });
55
+
56
+ const isTownhallRegistration = computed((): boolean => {
57
+ return globalConfigValue('townhall_registration_enabled', false);
58
+ });
59
+
60
+ const isLoggedIn = computed(():boolean => {
61
+ return user.value != null;
62
+ });
63
+
64
+ const userAcctError = computed((): string => {
65
+ if (group.value.type == 'online') {
66
+ return 'An account with this email already exists. Please log in to continue your registration.';
67
+ } else if (group.value.type == 'media') {
68
+ return 'An account with this email already exists. Please login to continue your purchase, or continue your purchase as a guest.';
69
+ } else {
70
+ return '';
71
+ }
72
+ });
73
+
74
+ const regButtonAlias = computed((): string => {
75
+ let returnText = "Register";
76
+ const aliasText = globalConfigValue('reg_button_alias', '');
77
+ if (aliasText.length != 0) returnText = aliasText;
78
+ return returnText;
79
+ });
80
+
81
+ // methods
82
+ const debounceEmail = debounce(() => {
83
+ const request = useApi();
84
+ request(`groups/${group.value.id}/check-email`,
85
+ {
86
+ method: 'POST',
87
+ query: {
88
+ email: formInputs.value.email
89
+ }
90
+ })
91
+ .then((response: any) => {
92
+ if (response.data.registered === true) {
93
+ showLogin.value = true;
94
+ }
95
+ })
96
+ .catch(error => {
97
+ console.log(error);
98
+ });
99
+ }, 500);
100
+
101
+ const closeUserAcctError = (): void => {
102
+ if (group.value.type == 'media') {
103
+ errors.value['user'] = [];
104
+ };
105
+ showLogin.value = false;
106
+ };
107
+
108
+ const getRegistrationFormData = (_group: string): void => {
109
+ const request = useApi();
110
+ request(`groups/${_group}?with=registration_form.fields,merchant`)
111
+ // TODO - define type
112
+ .then((response: any) => {
113
+ group.value = response.data as Group;
114
+ registrationFormObject.value = group.value.registration_form;
115
+
116
+ title.value = `Registration - ${group.value.name}`;
117
+
118
+ if(registrationFormObject.value != undefined && registrationFormObject.value.fields) {
119
+ registrationFormObject.value.fields.map((field: any) => {
120
+ // TODO - define type
121
+ let tmpValue: any = '';
122
+
123
+ if (field.type == 'checkbox') {
124
+ tmpValue = [];
125
+ }
126
+
127
+ if (field.type == 'hidden') {
128
+ tmpValue = field.value;
129
+ }
130
+
131
+ formInputs.value[field.name] = tmpValue;
132
+ });
133
+ }
134
+ })
135
+ };
136
+
137
+ const shouldRenderField = (field: any): boolean => {
138
+ if ((isLoggedIn.value && field.name === 'password') || (isLoggedIn.value && field.name === 'email')) {
139
+ return false;
140
+ }
141
+ return true;
142
+ };
143
+
144
+ const getTextInputType = (_field_object: any): string => {
145
+ if (_field_object.type == 'password') {
146
+ return 'password';
147
+ } else if (_field_object.validation.email) {
148
+ return 'email';
149
+ } else if (_field_object.validation.numeric) {
150
+ return 'number';
151
+ } else {
152
+ return 'text';
153
+ }
154
+ };
155
+
156
+ const getPlaceholder = (_placeholder: string | null): string => {
157
+ if (_placeholder != null) return _placeholder;
158
+ return '';
159
+ };
160
+
161
+ const handleForm = (): void => {
162
+ if (showCheckout.value) {
163
+ loading.value = true;
164
+ stripeComponent.value.payWithStripe();
165
+ } else {
166
+ register();
167
+ }
168
+ };
169
+
170
+ const register = (ccToken: string = '') => {
171
+ loading.value = true;
172
+ errors.value = {};
173
+ console.log('formInputs', formInputs.value);
174
+ const inputs = {
175
+ method: 'POST',
176
+ body: {
177
+ ...formInputs.value
178
+ }
179
+ };
180
+ if (ccToken.length != 0) {
181
+ inputs.body.cc_token = ccToken;
182
+ }
183
+ if (isLoggedIn.value) {
184
+ inputs.body.email = user.value!.email;
185
+ }
186
+
187
+ const request = useApi();
188
+
189
+ request(`groups/${group.value.id}/registration`, inputs)
190
+ .then((response: any) => {
191
+ if(isLoggedIn.value) {
192
+ router.push('/');
193
+ }
194
+ formComplete.value = true;
195
+ user.value = response;
196
+ })
197
+ .catch((error: IFetchError) => {
198
+ errors.value = get(error?.response?._data, 'errors', {});
199
+ })
200
+ .finally(() => {
201
+ loading.value = false;
202
+ });
203
+ };
204
+
205
+ onMounted(() => {
206
+ getRegistrationFormData(content.value);
207
+ });
208
+ </script>
209
+
210
+ <template>
211
+ <div
212
+ v-if="group != undefined && Object.keys(group).length > 0"
213
+ id="page-registration"
214
+ >
215
+ <div class="px-2">
216
+ <!-- Registration Form -->
217
+ <div
218
+ v-if="!formComplete && regButtonEnabled && regExternalUrl.length == 0"
219
+ class="mx-auto text-left max-form-width"
220
+ >
221
+ <h3
222
+ v-if="group.name"
223
+ class="py-8 font-light"
224
+ >
225
+ Please complete the registration form below for {{ group.name }}.
226
+ </h3>
227
+ <form
228
+ class="w-full mx-auto"
229
+ @submit.prevent="handleForm"
230
+ >
231
+ <template v-for="field in registrationFormObject.fields">
232
+ <div
233
+ v-if="shouldRenderField(field)"
234
+ :key="field.name"
235
+ class="row mb-3"
236
+ >
237
+ <label
238
+ v-if="field.type != 'hidden'"
239
+ class="block body-color-1 mb-1"
240
+ >
241
+ {{ field.label }}
242
+ </label>
243
+
244
+ <!-- Input / Password -->
245
+ <span v-if="['text', 'password'].indexOf(field.type) >= 0">
246
+ <span v-if="field.name === 'email'">
247
+ <CommonTextInput
248
+ v-model="formInputs[field.name]"
249
+ :placeholder="getPlaceholder(field.placeholder)"
250
+ :required="field.validation.required"
251
+ :type="getTextInputType(field)"
252
+ @update:model-value="debounceEmail"
253
+ />
254
+ </span>
255
+
256
+ <span v-else>
257
+ <CommonTextInput
258
+ v-model="formInputs[field.name]"
259
+ :placeholder="getPlaceholder(field.placeholder)"
260
+ :required="field.validation.required"
261
+ :type="getTextInputType(field)"
262
+ />
263
+ </span>
264
+ </span>
265
+
266
+ <!-- TextArea -->
267
+ <span v-if="field.type == 'textarea'">
268
+ <CommonTextArea v-model="formInputs[field.name]" />
269
+ </span>
270
+
271
+ <!-- Select -->
272
+ <span v-if="field.type == 'select'">
273
+ <CommonSelectDropDown
274
+ v-model="formInputs[field.name]"
275
+ :options="field.options"
276
+ :first-disabled="true"
277
+ />
278
+ </span>
279
+
280
+ <!-- Checkboxes -->
281
+ <span v-if="field.type == 'checkbox'">
282
+ <CommonCheckboxGroup
283
+ v-model="formInputs[field.name]"
284
+ :options="field.options"
285
+ />
286
+ </span>
287
+
288
+ <!-- Radio Buttons -->
289
+ <span v-if="field.type == 'radiogroup'">
290
+ <CommonRadioGroup
291
+ v-model="formInputs[field.name]"
292
+ :options="field.options"
293
+ />
294
+ </span>
295
+
296
+ <!-- Hidden -->
297
+ <span v-if="field.type == 'hidden'">
298
+ <input
299
+ v-model="formInputs[field.name]"
300
+ type="hidden"
301
+ >
302
+ </span>
303
+
304
+ <!-- Error Field -->
305
+ <CommonErrorField
306
+ v-if="errors[field.name]"
307
+ :errors="errors[field.name]"
308
+ />
309
+ <CommonErrorField
310
+ v-if="field.name == 'email' && (errors.user != undefined && errors.user.length)"
311
+ :errors="errors.user"
312
+ />
313
+ </div>
314
+ </template>
315
+ <!-- Payment Form -->
316
+ <!-- TODO - update Stripe integration -->
317
+ <CommonStripePaymentForm
318
+ v-if="showCheckout"
319
+ ref="stripeComponent"
320
+ :stripe-key="group?.merchant?.account_id as string"
321
+ :price="group.price as number"
322
+ :errors="errors"
323
+ @token-generated="register"
324
+ @on-error="loading = false"
325
+ />
326
+
327
+ <!-- error field when email field/error is hidden -->
328
+ <CommonErrorField
329
+ v-if="isLoggedIn && errors.user.length"
330
+ class="mt-3"
331
+ :errors="errors.user"
332
+ />
333
+
334
+ <button
335
+ class="btn btn-primary my-2"
336
+ type="submit"
337
+ :disabled="loading"
338
+ >
339
+ <span v-if="!loading">Submit</span>
340
+ <span v-else>Processing</span>
341
+ </button>
342
+ </form>
343
+ </div>
344
+ <!-- End Registration Form -->
345
+
346
+ <!-- If Registration External URL -->
347
+ <div
348
+ v-if="regButtonEnabled && regExternalUrl.length != 0"
349
+ class="px-2"
350
+ >
351
+ <a
352
+ :href="regExternalUrl"
353
+ :target="/^http/.test(regExternalUrl) ? '_blank' : '_self'"
354
+ >
355
+ <button
356
+ class="btn btn-primary my-2"
357
+ type="submit"
358
+ >
359
+ {{ regButtonAlias }}
360
+ </button>
361
+ </a>
362
+ </div>
363
+
364
+ <!-- If Registration disabled -->
365
+ <div
366
+ v-if="!regButtonEnabled || !group"
367
+ class="px-2 md:px-4"
368
+ >
369
+ <div class="flex justify-around m-2 border-b border-gray-400 py-12 text-lg">
370
+ Sorry! There are no registration options available at this time.
371
+ </div>
372
+ </div>
373
+
374
+ <br>
375
+
376
+ <div
377
+ v-if="user && formComplete"
378
+ class="w-full mx-auto max-form-width"
379
+ >
380
+ <template v-if="user.name">
381
+ <h2 class="mb-4">
382
+ {{ user.name }}
383
+ </h2>
384
+ </template>
385
+ <CommonDynamicHtml
386
+ v-if="group.registration_message"
387
+ :template="group.registration_message"
388
+ />
389
+ <CommonLoginFullWidth
390
+ v-else-if="!user"
391
+ title="Thank you for registering. Please log in to continue to your event."
392
+ />
393
+ <span v-else>
394
+ You are now registered for <span class="font-bold"><i>{{ group.name }}</i></span>.
395
+ </span>
396
+ </div>
397
+ </div>
398
+
399
+ <CommonModal
400
+ v-if="showLogin"
401
+ @trigger="closeUserAcctError"
402
+ >
403
+ <template #modal-body>
404
+ <div class="py-5">
405
+ <CommonLoginFullWidth
406
+ :title="userAcctError"
407
+ :center-text="false"
408
+ :allow-guest="group.type == 'media'"
409
+ @loggingin="errors={}"
410
+ @loggedin="showLogin=false"
411
+ @close-login="closeUserAcctError"
412
+ />
413
+ </div>
414
+ </template>
415
+ </CommonModal>
416
+ </div>
417
+ </template>