@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.
- package/CHANGELOG.md +4 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +10 -0
- package/dist/runtime/@types/components.d.ts +22 -0
- package/dist/runtime/@types/configVariables.d.ts +6 -0
- package/dist/runtime/analytics.d.ts +1 -1
- package/dist/runtime/assets/scss/index.css +0 -705
- package/dist/runtime/assets/svg/icon-minus.svg +6 -0
- package/dist/runtime/assets/svg/icon-video.svg +6 -0
- package/dist/runtime/components/affiliates/AffiliateModal.vue +66 -0
- package/dist/runtime/components/affiliates/AffiliatePage.vue +337 -132
- package/dist/runtime/components/agenda/AgendaTabbed.vue +43 -34
- package/dist/runtime/components/agenda/components/Calendar.vue +8 -3
- package/dist/runtime/components/agenda/components/Favorite.vue +44 -0
- package/dist/runtime/components/agenda/components/PlayIcon.vue +1 -1
- package/dist/runtime/components/agenda/components/PresentationLink.vue +26 -15
- package/dist/runtime/components/chat/ChatConversationList.vue +108 -0
- package/dist/runtime/components/chat/ChatCreateConversation.vue +205 -0
- package/dist/runtime/components/chat/ChatCreateGroupConversation.vue +159 -0
- package/dist/runtime/components/chat/ChatHeader.vue +98 -0
- package/dist/runtime/components/chat/ChatMessage.vue +40 -0
- package/dist/runtime/components/chat/ChatShowConversation.vue +77 -0
- package/dist/runtime/components/chat/ChatWidget.vue +65 -0
- package/dist/runtime/components/chat/ChatWindow.vue +211 -0
- package/dist/runtime/components/chat/ChatWindow.vue.d.ts +6 -0
- package/dist/runtime/components/chat/MessageInput.vue +30 -0
- package/dist/runtime/components/chat/SearchInput.vue +32 -0
- package/dist/runtime/components/core/Accordion.vue +1 -1
- package/dist/runtime/components/core/AttendeeList.vue +25 -16
- package/dist/runtime/components/core/CountdownTimer.vue +1 -1
- package/dist/runtime/components/core/Modal.vue +21 -13
- package/dist/runtime/components/core/ModalButton.vue +43 -0
- package/dist/runtime/components/core/Navbar.vue +3 -3
- package/dist/runtime/components/core/Navigation.vue +293 -0
- package/dist/runtime/components/core/SvgIcon.vue +31 -1
- package/dist/runtime/components/core/VButton.vue +41 -0
- package/dist/runtime/components/core/ZoomModal.vue +1 -1
- package/dist/runtime/components/events/ListEvents.vue +3 -4
- package/dist/runtime/components/forms/CheckboxGroup.vue +46 -0
- package/dist/runtime/components/forms/ErrorField.vue +11 -2
- package/dist/runtime/components/forms/RadioGroup.vue +50 -0
- package/dist/runtime/components/forms/SelectDropDown.vue +47 -0
- package/dist/runtime/components/forms/SupportForm.vue +6 -6
- package/dist/runtime/components/layouts/Accordion.vue +2 -2
- package/dist/runtime/components/media/ArchivePlayerAndContentContainer.vue +20 -4
- package/dist/runtime/components/media/ArchiveVideoPlayer.vue +14 -6
- package/dist/runtime/components/media/WebcastVideoPlayer.vue +1 -1
- package/dist/runtime/components/media/components/ArchiveMediaContainer.vue +8 -8
- package/dist/runtime/components/media/components/CeCreditNotification.vue +2 -2
- package/dist/runtime/components/media/components/ContentArea.vue +51 -14
- package/dist/runtime/components/media/components/ContentTabs.vue +2 -2
- package/dist/runtime/components/media/components/DocumentsPanel.vue +2 -2
- package/dist/runtime/components/media/components/MediaContainer.vue +3 -7
- package/dist/runtime/components/media/components/PresentersPanel.vue +69 -50
- package/dist/runtime/components/media/components/SessionReporting.vue +5 -4
- package/dist/runtime/components/media/components/SponsorsPanel.vue +3 -3
- package/dist/runtime/components/presenters/PresenterListing.vue +30 -20
- package/dist/runtime/components/presenters/PresenterModal.vue +26 -21
- package/dist/runtime/components/presenters/Presenters.vue +139 -0
- package/dist/runtime/components/profile/Profile.vue +10 -6
- package/dist/runtime/components/profile/components/Sidebar.vue +1 -1
- package/dist/runtime/components/profile/components/SidebarNavItem.vue +1 -1
- package/dist/runtime/components/profile/tabs/Favorites.vue +5 -4
- package/dist/runtime/components/profile/tabs/GeneralInformation.vue +26 -16
- package/dist/runtime/components/registration/AlreadyRegisteredModal.vue +99 -0
- package/dist/runtime/components/registration/PaymentForm.vue +136 -0
- package/dist/runtime/components/registration/RegistrationForm.vue +417 -0
- package/dist/runtime/components/registration/RegistrationGroupSelect.vue +142 -0
- package/dist/runtime/components/registration/StripePaymentForm.vue +141 -0
- package/dist/runtime/composables/useAgenda.d.ts +12 -0
- package/dist/runtime/composables/useAgenda.mjs +101 -10
- package/dist/runtime/composables/useAuth.mjs +1 -1
- package/dist/runtime/composables/useConferenceHelpers.d.ts +5 -1
- package/dist/runtime/composables/useConferenceHelpers.mjs +15 -1
- package/dist/runtime/composables/useEventHooks.d.ts +26 -0
- package/dist/runtime/composables/useEventHooks.mjs +21 -0
- package/dist/runtime/composables/useEvents.d.ts +17 -1
- package/dist/runtime/composables/useEvents.mjs +29 -1
- package/dist/runtime/composables/useLogin.mjs +7 -3
- package/dist/runtime/composables/usePresentation.mjs +1 -1
- package/dist/runtime/composables/usePusher.d.ts +4 -0
- package/dist/runtime/composables/usePusher.mjs +38 -26
- package/dist/runtime/composables/useStream.mjs +7 -1
- package/dist/runtime/enums/general.d.ts +4 -1
- package/dist/runtime/enums/general.mjs +4 -1
- package/dist/runtime/models/authUser.d.ts +1 -0
- package/dist/runtime/models/conference.d.ts +14 -0
- package/dist/runtime/models/conversation.d.ts +2 -4
- package/dist/runtime/models/globalConfig.d.ts +6 -2
- package/dist/runtime/models/group.d.ts +32 -2
- package/dist/runtime/models/icons.d.ts +7 -0
- package/dist/runtime/models/templateConfig.d.ts +6 -0
- package/dist/runtime/models/user.d.ts +1 -0
- package/dist/runtime/models/virtualPagesConfig.d.ts +335 -0
- package/dist/runtime/models/virtualPagesConfig.mjs +0 -0
- package/dist/runtime/plugin.mjs +11 -1
- package/dist/runtime/store/affiliates.d.ts +3 -0
- package/dist/runtime/store/affiliates.mjs +38 -0
- package/dist/runtime/store/auth.mjs +6 -0
- package/dist/runtime/store/conferences.d.ts +3 -1
- package/dist/runtime/store/conferences.mjs +7 -2
- package/dist/runtime/store/conversations.d.ts +4040 -10
- package/dist/runtime/store/conversations.mjs +255 -22
- package/dist/runtime/store/modalPlayerConfig.d.ts +498 -0
- package/dist/runtime/store/modalPlayerConfig.mjs +58 -0
- package/dist/runtime/store/templateConfigs.d.ts +3 -2
- package/dist/runtime/store/templateConfigs.mjs +2 -1
- package/package.json +5 -2
- package/dist/runtime/components/media/components/PresentersPanel.vue.d.ts +0 -32
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { toRefs } from "vue";
|
|
3
|
+
import { get } from 'lodash-es';
|
|
4
|
+
import { Group } from "../../models/conference";
|
|
5
|
+
import { useUserStore } from "../../store/user";
|
|
6
|
+
import { useTemplateConfigsStore } from "../../store/templateConfigs";
|
|
7
|
+
import { storeToRefs } from "pinia";
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
content: any[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const props = defineProps<Props>();
|
|
14
|
+
|
|
15
|
+
const { content } = toRefs(props);
|
|
16
|
+
|
|
17
|
+
const { globalConfigValue } = useTemplateConfigsStore();
|
|
18
|
+
const { currentUser } = storeToRefs(useUserStore());
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{
|
|
21
|
+
(event: "setRegForm", value: string): void;
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
// computed
|
|
25
|
+
const hasGroups = (): boolean => {
|
|
26
|
+
return content.value.length > 0;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const regButtonEnabled = (): boolean => {
|
|
30
|
+
return globalConfigValue("reg_button_enabled");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const regExternalUrl = (): string => {
|
|
34
|
+
const extRegUrl = globalConfigValue("external_reg_url");
|
|
35
|
+
if (extRegUrl.length > 0) return extRegUrl;
|
|
36
|
+
return '';
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const regButtonAlias = (): string => {
|
|
40
|
+
let returnText = "Register";
|
|
41
|
+
const aliasText = globalConfigValue("reg_button_alias");
|
|
42
|
+
if (aliasText.length > 0) returnText = aliasText;
|
|
43
|
+
return returnText;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// methods
|
|
47
|
+
const getRegisterText = (_group: Group): string => {
|
|
48
|
+
return _group.price as number > 0 ? "Buy Now" : "Register";
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const formatCurrency = (_value: number): string => {
|
|
52
|
+
const val: number = _value / 100;
|
|
53
|
+
return val
|
|
54
|
+
.toLocaleString('en-US', {currency: 'USD', style: 'currency'})
|
|
55
|
+
.substring(1);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const setRegForm = (_code: string) => {
|
|
59
|
+
emit("setRegForm", _code);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const checkAlreadyRegistered = (_group_id: number): boolean => {
|
|
63
|
+
let hasGroups: boolean = false;
|
|
64
|
+
if (get(currentUser.value, 'group_ids', false) != false) {
|
|
65
|
+
const groupIds: number[] = currentUser.value.group_ids as number[];
|
|
66
|
+
hasGroups = groupIds.includes(_group_id);
|
|
67
|
+
}
|
|
68
|
+
return hasGroups;
|
|
69
|
+
};
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<div class="px-2">
|
|
74
|
+
<!-- If the conference has one or more groups -->
|
|
75
|
+
<template v-if="hasGroups() && regButtonEnabled() && regExternalUrl().length == 0">
|
|
76
|
+
<div
|
|
77
|
+
v-for="(group, index) in content"
|
|
78
|
+
:key="group.id"
|
|
79
|
+
class="flex flex-col justify-around p-6 m-2 text-center"
|
|
80
|
+
:class="index != content.length - 1 ? 'border-b border-gray-400' : ''"
|
|
81
|
+
>
|
|
82
|
+
<div class="flex flex-1 flex-col py-2">
|
|
83
|
+
<div class="flex-1 mb-2 text-xl font-bold">{{ group.name }}</div>
|
|
84
|
+
<div class="flex-1">{{ group.description }}</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="flex flex-col grow-0 items-center justify-between">
|
|
88
|
+
<div
|
|
89
|
+
v-if="group.price"
|
|
90
|
+
class="text-lg mb-2"
|
|
91
|
+
>
|
|
92
|
+
{{ formatCurrency(group.price) }}
|
|
93
|
+
</div>
|
|
94
|
+
<button
|
|
95
|
+
v-if="group.type == 'media' || !checkAlreadyRegistered(group.id)"
|
|
96
|
+
class="btn btn-primary"
|
|
97
|
+
@click="setRegForm(group.code)"
|
|
98
|
+
>
|
|
99
|
+
{{ getRegisterText(group) }}
|
|
100
|
+
</button>
|
|
101
|
+
<span
|
|
102
|
+
v-else
|
|
103
|
+
class="text-red"
|
|
104
|
+
>
|
|
105
|
+
You are already registered for this access level for this event.
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<!-- If the conference does not have any groups, or reg disabled -->
|
|
112
|
+
<div
|
|
113
|
+
v-if="!hasGroups() || !regButtonEnabled()"
|
|
114
|
+
class="px-2 md:px-4"
|
|
115
|
+
>
|
|
116
|
+
<div class="flex justify-around m-2 border-b border-gray-400 py-12 text-lg">
|
|
117
|
+
Sorry! There are no registration options available at this time.
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- If Registration External URL -->
|
|
122
|
+
<div
|
|
123
|
+
v-if="regButtonEnabled() && regExternalUrl().length > 0"
|
|
124
|
+
class="px-2 text-center"
|
|
125
|
+
>
|
|
126
|
+
<a
|
|
127
|
+
:href="regExternalUrl"
|
|
128
|
+
:target="/^http/.test(regExternalUrl()) ? '_blank' : '_self'"
|
|
129
|
+
>
|
|
130
|
+
<button
|
|
131
|
+
class="btn btn-primary my-2"
|
|
132
|
+
type="submit"
|
|
133
|
+
>
|
|
134
|
+
{{ regButtonAlias }}
|
|
135
|
+
</button>
|
|
136
|
+
</a>
|
|
137
|
+
</div>
|
|
138
|
+
<br>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<style></style>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, toRefs, unref, computed, onBeforeMount, onMounted } from 'vue';
|
|
3
|
+
import { StripeElements, StripeElement } from 'vue-stripe-js'
|
|
4
|
+
import { loadStripe } from '@stripe/stripe-js'
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
stripeKey: string;
|
|
8
|
+
price: number;
|
|
9
|
+
errors?: Object;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
errors: () => {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const { stripeKey, price, errors } = toRefs(props);
|
|
19
|
+
|
|
20
|
+
const stripeLoaded = ref<boolean>(false);
|
|
21
|
+
const instanceOptions = ref({
|
|
22
|
+
// https://stripe.com/docs/js/initializing#init_stripe_js-options
|
|
23
|
+
})
|
|
24
|
+
const elementsOptions = ref({
|
|
25
|
+
// https://stripe.com/docs/js/elements_object/create#stripe_elements-options
|
|
26
|
+
})
|
|
27
|
+
const cardOptions = ref({
|
|
28
|
+
// https://stripe.com/docs/stripe.js#element-options
|
|
29
|
+
value: {
|
|
30
|
+
// postalCode: '12345',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// ref from StripeElement.vue
|
|
35
|
+
const card = ref();
|
|
36
|
+
// ref from StripeElements.vue
|
|
37
|
+
const elms = ref();
|
|
38
|
+
|
|
39
|
+
const emit = defineEmits<{
|
|
40
|
+
(event: "tokenGenerated", value: string): void;
|
|
41
|
+
(event: "onError"): void;
|
|
42
|
+
}>();
|
|
43
|
+
|
|
44
|
+
// computed
|
|
45
|
+
const totalFormatted = computed((): string => {
|
|
46
|
+
return new Intl.NumberFormat('en-US', {
|
|
47
|
+
style: 'currency',
|
|
48
|
+
currency: 'USD',
|
|
49
|
+
minimumFractionDigits: 2
|
|
50
|
+
})
|
|
51
|
+
.format(price.value / 100);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// methods
|
|
55
|
+
const payWithStripe = (): void => {
|
|
56
|
+
// Get stripe element
|
|
57
|
+
const cardElement = card.value.stripeElement;
|
|
58
|
+
|
|
59
|
+
// Access instance methods, e.g. createToken()
|
|
60
|
+
// TODO - correctly type result if possible
|
|
61
|
+
elms.value.instance.createToken(cardElement).then((result: object) => {
|
|
62
|
+
// Handle result.error or result.token
|
|
63
|
+
if (result?.token) {
|
|
64
|
+
emit('tokenGenerated', result.token.id);
|
|
65
|
+
} else {
|
|
66
|
+
emit('onError');
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
defineExpose({
|
|
72
|
+
payWithStripe
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
onBeforeMount(() => {
|
|
76
|
+
const stripePromise = loadStripe(unref(stripeKey));
|
|
77
|
+
stripePromise.then((): void => {
|
|
78
|
+
stripeLoaded.value = true;
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<div class="border border-gray-200 rounded p-4">
|
|
85
|
+
<div class="py-3 mb-4 px-3 flex bg-gray-400 rounded text-white font-semibold">
|
|
86
|
+
<div class="flex-1">
|
|
87
|
+
Payment Information
|
|
88
|
+
</div>
|
|
89
|
+
<div class="flex-1 text-right">{{ totalFormatted }}</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<p class="text-red-600 my-3" v-if="errors.payment">
|
|
93
|
+
{{ errors.payment[0] }}
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
<StripeElements
|
|
97
|
+
v-if="stripeLoaded"
|
|
98
|
+
v-slot="{ elements, instance }"
|
|
99
|
+
ref="elms"
|
|
100
|
+
:stripe-key="stripeKey"
|
|
101
|
+
:instance-options="instanceOptions"
|
|
102
|
+
:elements-options="elementsOptions"
|
|
103
|
+
>
|
|
104
|
+
<StripeElement
|
|
105
|
+
ref="card"
|
|
106
|
+
:elements="elements"
|
|
107
|
+
:options="cardOptions"
|
|
108
|
+
/>
|
|
109
|
+
</StripeElements>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
|
|
113
|
+
<style>
|
|
114
|
+
.StripeElement {
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
|
|
117
|
+
height: 40px;
|
|
118
|
+
|
|
119
|
+
padding: 10px 12px;
|
|
120
|
+
|
|
121
|
+
border: 1px solid transparent;
|
|
122
|
+
border-radius: 4px;
|
|
123
|
+
background-color: white;
|
|
124
|
+
|
|
125
|
+
box-shadow: 0 1px 3px 0 #e6ebf1;
|
|
126
|
+
-webkit-transition: box-shadow 150ms ease;
|
|
127
|
+
transition: box-shadow 150ms ease;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.StripeElement--focus {
|
|
131
|
+
box-shadow: 0 1px 3px 0 #cfd7df;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.StripeElement--invalid {
|
|
135
|
+
border-color: #fa755a;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.StripeElement--webkit-autofill {
|
|
139
|
+
background-color: #fefde5 !important;
|
|
140
|
+
}
|
|
141
|
+
</style>
|
|
@@ -81,5 +81,17 @@ export type UseAgendaMethods = {
|
|
|
81
81
|
* show presenter description
|
|
82
82
|
*/
|
|
83
83
|
showPresenterDescription: (presenter: Presenter, presentation: Presentation) => void;
|
|
84
|
+
/**
|
|
85
|
+
* emits handles player behavior for virtual template
|
|
86
|
+
*/
|
|
87
|
+
playPresentation: (_track: Track, _presentation: Presentation, _conference: Conference, _isActiveAgenda: boolean, _isVirtual?: boolean) => void | null;
|
|
88
|
+
/**
|
|
89
|
+
* update the selectedPresentation
|
|
90
|
+
*/
|
|
91
|
+
updateSelectedPresentation: (_conference: Conference) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Save the current live Presentation for this Conference in store
|
|
94
|
+
*/
|
|
95
|
+
setLivePresentations: (_event?: any) => void;
|
|
84
96
|
};
|
|
85
97
|
export declare const useAgenda: (conference: Ref<Conference>) => UseAgendaMethods;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import { get, remove, cloneDeep, intersectionBy, pullAllBy } from "lodash-es";
|
|
2
2
|
import { ref, computed, onBeforeMount } from "vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
3
4
|
import { storeToRefs } from "pinia";
|
|
4
5
|
import { DateTime } from "luxon";
|
|
5
6
|
import { useTemplateConfigsStore } from "../store/index.mjs";
|
|
6
7
|
import { useAuthStore } from "../store/auth.mjs";
|
|
8
|
+
import { useConferencesStore } from "../store/index.mjs";
|
|
7
9
|
import { useAffiliatesStore } from "../store/affiliates.mjs";
|
|
10
|
+
import { usePlayerConfigStore } from "../store/modalPlayerConfig.mjs";
|
|
11
|
+
import {
|
|
12
|
+
commitLivePresentationsEventHook,
|
|
13
|
+
setIsPlayerVisibleEventHook,
|
|
14
|
+
setPlayerPresentationEventHook,
|
|
15
|
+
setPlayerConferenceEventHook
|
|
16
|
+
} from "../composables/useEventHooks.mjs";
|
|
8
17
|
export const useAgenda = (conference) => {
|
|
9
18
|
const { setConferenceConfig, pagesConfigValue } = useTemplateConfigsStore();
|
|
19
|
+
console.log("setting conference config");
|
|
10
20
|
setConferenceConfig(conference.value);
|
|
11
21
|
const affiliateStore = useAffiliatesStore();
|
|
22
|
+
const route = useRoute();
|
|
12
23
|
const { isLoggedIn } = storeToRefs(useAuthStore());
|
|
24
|
+
const { currentConference } = storeToRefs(useConferencesStore());
|
|
25
|
+
const { playerPresentation, livePresentations } = storeToRefs(usePlayerConfigStore());
|
|
13
26
|
const selectedDay = ref(null);
|
|
14
27
|
const allowAgendaFullAccess = pagesConfigValue("agenda.agendas_full_access", false);
|
|
15
28
|
const displayTrackGroups = pagesConfigValue("agenda.group_tracks", "None");
|
|
@@ -25,7 +38,7 @@ export const useAgenda = (conference) => {
|
|
|
25
38
|
return affiliateStore.getConferenceAffiliates(conference.value.id);
|
|
26
39
|
});
|
|
27
40
|
const horizontalTrackGroups = computed(() => {
|
|
28
|
-
return displayTrackGroups === "
|
|
41
|
+
return displayTrackGroups === "Horizontal";
|
|
29
42
|
});
|
|
30
43
|
const setSelectedDay = (day) => {
|
|
31
44
|
selectedDay.value = day;
|
|
@@ -128,14 +141,6 @@ export const useAgenda = (conference) => {
|
|
|
128
141
|
}
|
|
129
142
|
return classes;
|
|
130
143
|
};
|
|
131
|
-
onBeforeMount(() => {
|
|
132
|
-
if (!conference.value.hasOwnProperty("affiliates")) {
|
|
133
|
-
affiliateStore.getAffiliates(conference.value.id);
|
|
134
|
-
}
|
|
135
|
-
if (selectedDay.value === null) {
|
|
136
|
-
selectedDay.value = conference.value.days[0];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
144
|
const showInfoLink = () => {
|
|
140
145
|
return pagesConfigValue("agenda.session_desc_link") !== "none";
|
|
141
146
|
};
|
|
@@ -152,6 +157,89 @@ export const useAgenda = (conference) => {
|
|
|
152
157
|
selectedPresenter.value = presenter;
|
|
153
158
|
}
|
|
154
159
|
};
|
|
160
|
+
const getPresentationPlayerType = (_presentation) => {
|
|
161
|
+
let playerType = _presentation.video_url || _presentation.type == "embed" ? "archive" : "live";
|
|
162
|
+
if (_presentation.external_type == "iframe") {
|
|
163
|
+
playerType = "iframe";
|
|
164
|
+
}
|
|
165
|
+
return playerType;
|
|
166
|
+
};
|
|
167
|
+
const playPresentation = (_track, _presentation, _conference, _isActiveAgenda, _isVirtual = false) => {
|
|
168
|
+
if (!_isVirtual) {
|
|
169
|
+
return null;
|
|
170
|
+
} else if (_presentation.type == "link" && _presentation.external_type != "iframe") {
|
|
171
|
+
openExternalLink(_presentation);
|
|
172
|
+
} else if ((route.name == "agenda-id" || _isActiveAgenda) && (_conference.state == "live" || _conference.state == "mixed") || _conference.state == "archive") {
|
|
173
|
+
const pres = _presentation;
|
|
174
|
+
pres.track = { "channel": _track.channel };
|
|
175
|
+
pres.access = _track.access;
|
|
176
|
+
setPlayerPresentationEventHook.trigger({
|
|
177
|
+
"player_type": getPresentationPlayerType(_presentation),
|
|
178
|
+
"data": pres
|
|
179
|
+
});
|
|
180
|
+
console.log({
|
|
181
|
+
"player_type": getPresentationPlayerType(_presentation),
|
|
182
|
+
"data": pres
|
|
183
|
+
});
|
|
184
|
+
setPlayerConferenceEventHook.trigger(_conference);
|
|
185
|
+
setIsPlayerVisibleEventHook.trigger(true);
|
|
186
|
+
} else {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const openExternalLink = (_presentation) => {
|
|
191
|
+
let ext_type = get(_presentation, "external_type", "new_window");
|
|
192
|
+
if (ext_type === null) {
|
|
193
|
+
ext_type = "new_window";
|
|
194
|
+
}
|
|
195
|
+
const tempUrl = _presentation.video_url;
|
|
196
|
+
const url = tempUrl;
|
|
197
|
+
return ext_type === "new_window" ? window.open(url, "_blank") : window.open(url, "_self");
|
|
198
|
+
};
|
|
199
|
+
const updateSelectedPresentation = (_conference) => {
|
|
200
|
+
const oldSelectedPres = playerPresentation.value.data;
|
|
201
|
+
_conference?.days?.some((day) => {
|
|
202
|
+
day?.tracks?.some((track) => {
|
|
203
|
+
track?.presentations?.some((pres) => {
|
|
204
|
+
if (pres.id == oldSelectedPres.id && (day.access || track.access)) {
|
|
205
|
+
const _pres = Object.assign({}, pres);
|
|
206
|
+
_pres.access = true;
|
|
207
|
+
setPlayerPresentationEventHook.trigger({
|
|
208
|
+
"player_type": getPresentationPlayerType(_pres),
|
|
209
|
+
"data": _pres
|
|
210
|
+
});
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
const setLivePresentations = (_event = {}) => {
|
|
218
|
+
const tempPres = Object.assign({}, livePresentations.value);
|
|
219
|
+
if (Object.keys(_event).length) {
|
|
220
|
+
_event.presentation.is_live ? tempPres[_event.track.id] = _event.presentation.id : delete tempPres[_event.track.id];
|
|
221
|
+
commitLivePresentationsEventHook.trigger(tempPres);
|
|
222
|
+
} else if (!Object.keys(livePresentations.value).length) {
|
|
223
|
+
currentConference.value.days.forEach((day) => {
|
|
224
|
+
day.tracks.forEach((track) => {
|
|
225
|
+
track.presentations.forEach((presentation) => {
|
|
226
|
+
if (presentation.is_live) {
|
|
227
|
+
tempPres[track.id] = presentation.id;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
commitLivePresentationsEventHook.trigger(tempPres);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
onBeforeMount(() => {
|
|
236
|
+
if (!Object.prototype.hasOwnProperty.call(conference.value, "affiliates")) {
|
|
237
|
+
affiliateStore.getAffiliates(conference.value.id);
|
|
238
|
+
}
|
|
239
|
+
if (selectedDay.value === null) {
|
|
240
|
+
selectedDay.value = conference.value.days[0];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
155
243
|
return {
|
|
156
244
|
days,
|
|
157
245
|
enabledSponsors,
|
|
@@ -171,6 +259,9 @@ export const useAgenda = (conference) => {
|
|
|
171
259
|
showInfoLink,
|
|
172
260
|
useAccordion,
|
|
173
261
|
usePresenterModal,
|
|
174
|
-
showPresenterDescription
|
|
262
|
+
showPresenterDescription,
|
|
263
|
+
playPresentation,
|
|
264
|
+
updateSelectedPresentation,
|
|
265
|
+
setLivePresentations
|
|
175
266
|
};
|
|
176
267
|
};
|
|
@@ -3,7 +3,7 @@ import { useTemplateConfigsStore } from "../store/templateConfigs.mjs";
|
|
|
3
3
|
export const useAuth = () => {
|
|
4
4
|
const { globalConfigValue } = useTemplateConfigsStore();
|
|
5
5
|
const isLoginDisabled = computed(() => {
|
|
6
|
-
return
|
|
6
|
+
return globalConfigValue("login_disabled") || globalConfigValue("login_process") === "disabled";
|
|
7
7
|
});
|
|
8
8
|
return {
|
|
9
9
|
isLoginDisabled
|
|
@@ -20,7 +20,7 @@ export type UseConferenceHelpersMethods = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Get conference webcast url
|
|
22
22
|
*/
|
|
23
|
-
getConferenceWebcastUrl: (_conference?:
|
|
23
|
+
getConferenceWebcastUrl: (_conference: Conference, skipAgenda?: boolean) => string;
|
|
24
24
|
/**
|
|
25
25
|
* Get timezone display
|
|
26
26
|
*/
|
|
@@ -69,5 +69,9 @@ export type UseConferenceHelpersMethods = {
|
|
|
69
69
|
* conference is Archived
|
|
70
70
|
*/
|
|
71
71
|
conferenceIsArchived: (_conference?: Conference) => boolean;
|
|
72
|
+
/**
|
|
73
|
+
* string description of conference state
|
|
74
|
+
*/
|
|
75
|
+
getConferenceStatusLabel: (_conference: Conference) => string;
|
|
72
76
|
};
|
|
73
77
|
export declare const useConferenceHelpers: (conference: Ref<Conference | null>) => UseConferenceHelpersMethods;
|
|
@@ -255,6 +255,19 @@ export const useConferenceHelpers = (conference) => {
|
|
|
255
255
|
const _selectedConference = _getSelectedConference(_conference);
|
|
256
256
|
return _selectedConference.state === ConferenceState.ARCHIVED;
|
|
257
257
|
};
|
|
258
|
+
const getConferenceStatusLabel = (_conference) => {
|
|
259
|
+
switch (_conference.state) {
|
|
260
|
+
case "archive":
|
|
261
|
+
return "Archive";
|
|
262
|
+
case "upcoming":
|
|
263
|
+
return "Upcoming";
|
|
264
|
+
case "mixed":
|
|
265
|
+
return "Live";
|
|
266
|
+
case "live":
|
|
267
|
+
return "Live";
|
|
268
|
+
}
|
|
269
|
+
return "Archive";
|
|
270
|
+
};
|
|
258
271
|
return {
|
|
259
272
|
isSingleDayEvent,
|
|
260
273
|
hasAccessToEvent,
|
|
@@ -272,6 +285,7 @@ export const useConferenceHelpers = (conference) => {
|
|
|
272
285
|
showConferenceViewButton,
|
|
273
286
|
conferenceIsLiveOrMixed,
|
|
274
287
|
conferenceIsMixed,
|
|
275
|
-
conferenceIsArchived
|
|
288
|
+
conferenceIsArchived,
|
|
289
|
+
getConferenceStatusLabel
|
|
276
290
|
};
|
|
277
291
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Conversation } from "../models/conversation";
|
|
2
|
+
import type { User } from "../models/user";
|
|
3
|
+
export type UserSearchParams = {
|
|
4
|
+
value?: string;
|
|
5
|
+
iterate?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const loginEventHook: import("@vueuse/shared").EventHook<boolean>;
|
|
8
|
+
export declare const loggedOutEventHook: import("@vueuse/shared").EventHook<any>;
|
|
9
|
+
export declare const modalClosedEventHook: import("@vueuse/shared").EventHook<any>;
|
|
10
|
+
export declare const commitLivePresentationsEventHook: import("@vueuse/shared").EventHook<any>;
|
|
11
|
+
export declare const setIsPlayerVisibleEventHook: import("@vueuse/shared").EventHook<boolean>;
|
|
12
|
+
export declare const setIsProfileVisibleEventHook: import("@vueuse/shared").EventHook<boolean>;
|
|
13
|
+
export declare const setPlayerPresentationEventHook: import("@vueuse/shared").EventHook<any>;
|
|
14
|
+
export declare const setPlayerConferenceEventHook: import("@vueuse/shared").EventHook<any>;
|
|
15
|
+
export declare const createVideoChatAffiliateEventHook: import("@vueuse/shared").EventHook<any>;
|
|
16
|
+
export declare const createVideoChatEventHook: import("@vueuse/shared").EventHook<any>;
|
|
17
|
+
export declare const modalContentEventHook: import("@vueuse/shared").EventHook<ContentData>;
|
|
18
|
+
export declare const hideConversationEventHook: import("@vueuse/shared").EventHook<Conversation>;
|
|
19
|
+
export declare const chatSearchEventHook: import("@vueuse/shared").EventHook<UserSearchParams>;
|
|
20
|
+
export declare const clearConversationEventHook: import("@vueuse/shared").EventHook<Conversation>;
|
|
21
|
+
export declare const createConversationEventHook: import("@vueuse/shared").EventHook<User[]>;
|
|
22
|
+
export declare const chatLoadUsersEventHook: import("@vueuse/shared").EventHook<any>;
|
|
23
|
+
export declare const chatUsersLoadedEventHook: import("@vueuse/shared").EventHook<any>;
|
|
24
|
+
export declare const sendMessageEventHook: import("@vueuse/shared").EventHook<string>;
|
|
25
|
+
export declare const setSelectedConversationEventHook: import("@vueuse/shared").EventHook<Conversation>;
|
|
26
|
+
export declare const toggleChatWindowEventHook: import("@vueuse/shared").EventHook<boolean>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createEventHook } from "@vueuse/core";
|
|
2
|
+
export const loginEventHook = createEventHook();
|
|
3
|
+
export const loggedOutEventHook = createEventHook();
|
|
4
|
+
export const modalClosedEventHook = createEventHook();
|
|
5
|
+
export const commitLivePresentationsEventHook = createEventHook();
|
|
6
|
+
export const setIsPlayerVisibleEventHook = createEventHook();
|
|
7
|
+
export const setIsProfileVisibleEventHook = createEventHook();
|
|
8
|
+
export const setPlayerPresentationEventHook = createEventHook();
|
|
9
|
+
export const setPlayerConferenceEventHook = createEventHook();
|
|
10
|
+
export const createVideoChatAffiliateEventHook = createEventHook();
|
|
11
|
+
export const createVideoChatEventHook = createEventHook();
|
|
12
|
+
export const modalContentEventHook = createEventHook();
|
|
13
|
+
export const hideConversationEventHook = createEventHook();
|
|
14
|
+
export const chatSearchEventHook = createEventHook();
|
|
15
|
+
export const clearConversationEventHook = createEventHook();
|
|
16
|
+
export const createConversationEventHook = createEventHook();
|
|
17
|
+
export const chatLoadUsersEventHook = createEventHook();
|
|
18
|
+
export const chatUsersLoadedEventHook = createEventHook();
|
|
19
|
+
export const sendMessageEventHook = createEventHook();
|
|
20
|
+
export const setSelectedConversationEventHook = createEventHook();
|
|
21
|
+
export const toggleChatWindowEventHook = createEventHook();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref, ComputedRef } from "vue";
|
|
2
|
-
import type { Conference, Sponsor } from "../models/conference";
|
|
2
|
+
import type { Conference, Sponsor, Presenter } from "../models/conference";
|
|
3
3
|
export type UseEventsMethods = {
|
|
4
4
|
/**
|
|
5
5
|
* determine if logged in
|
|
@@ -37,9 +37,25 @@ export type UseEventsMethods = {
|
|
|
37
37
|
* sorts an event's affiliates by level, then by name
|
|
38
38
|
*/
|
|
39
39
|
getSponsors: (_affiliates: Array<Sponsor> | undefined) => Array<Sponsor>;
|
|
40
|
+
/**
|
|
41
|
+
* sorts an event's affiliates by level, then by name
|
|
42
|
+
*/
|
|
43
|
+
getExhibitors: (_affiliates: Array<Sponsor> | undefined) => Array<Sponsor>;
|
|
40
44
|
/**
|
|
41
45
|
* returns the first affiliate set to role 'custom1'
|
|
42
46
|
*/
|
|
43
47
|
getBrand: (_affiliates: Array<Sponsor>) => Sponsor | null;
|
|
48
|
+
/**
|
|
49
|
+
* formats presenters to {[key: string]: Presenter[]} if necessary
|
|
50
|
+
*/
|
|
51
|
+
formatPresenters: (_presenters: Presenter[] | {
|
|
52
|
+
[key: string]: Presenter[];
|
|
53
|
+
} | {
|
|
54
|
+
[key: string]: {
|
|
55
|
+
[key: string]: Presenter[];
|
|
56
|
+
};
|
|
57
|
+
} | null | undefined) => {
|
|
58
|
+
[key: string]: Presenter[];
|
|
59
|
+
};
|
|
44
60
|
};
|
|
45
61
|
export declare const useEvents: () => UseEventsMethods;
|
|
@@ -44,6 +44,15 @@ export const useEvents = () => {
|
|
|
44
44
|
tempSponsors = sortBy(tempSponsors, ["level", "name"]);
|
|
45
45
|
return tempSponsors;
|
|
46
46
|
};
|
|
47
|
+
const getExhibitors = (_affiliates) => {
|
|
48
|
+
if (_affiliates === void 0) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
let tempSponsors = [];
|
|
52
|
+
tempSponsors = filter(_affiliates, { "role": "exhibitor" });
|
|
53
|
+
tempSponsors = sortBy(tempSponsors, ["level", "name"]);
|
|
54
|
+
return tempSponsors;
|
|
55
|
+
};
|
|
47
56
|
const getBrand = (_affiliates) => {
|
|
48
57
|
let i = 0;
|
|
49
58
|
for (i; i < get(_affiliates, "length", 0); i++) {
|
|
@@ -53,6 +62,23 @@ export const useEvents = () => {
|
|
|
53
62
|
}
|
|
54
63
|
return null;
|
|
55
64
|
};
|
|
65
|
+
const formatPresenters = (presenters) => {
|
|
66
|
+
let formattedPresenters = {};
|
|
67
|
+
if (presenters == null || presenters == void 0) {
|
|
68
|
+
return formattedPresenters;
|
|
69
|
+
} else {
|
|
70
|
+
if (presenters != null && presenters != void 0 && typeof presenters == "object") {
|
|
71
|
+
if (Array.isArray(Object.values(presenters)[0])) {
|
|
72
|
+
formattedPresenters = presenters;
|
|
73
|
+
return formattedPresenters;
|
|
74
|
+
}
|
|
75
|
+
if (Array.isArray(presenters)) {
|
|
76
|
+
formattedPresenters["presenters_all"] = presenters;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return formattedPresenters;
|
|
81
|
+
};
|
|
56
82
|
return {
|
|
57
83
|
isLoggedIn,
|
|
58
84
|
loginModalVisible,
|
|
@@ -63,6 +89,8 @@ export const useEvents = () => {
|
|
|
63
89
|
setConferenceToLoginTo,
|
|
64
90
|
orderAffiliates,
|
|
65
91
|
getSponsors,
|
|
66
|
-
|
|
92
|
+
getExhibitors,
|
|
93
|
+
getBrand,
|
|
94
|
+
formatPresenters
|
|
67
95
|
};
|
|
68
96
|
};
|
|
@@ -10,13 +10,17 @@ import { useConferenceHelpers } from "./useConferenceHelpers.mjs";
|
|
|
10
10
|
export const useLogin = (conference) => {
|
|
11
11
|
const { login } = useAuthStore();
|
|
12
12
|
const { currentConference } = storeToRefs(useConferencesStore());
|
|
13
|
-
const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
13
|
+
const { portalConfig, globalConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
14
14
|
const email = ref("");
|
|
15
15
|
const password = ref("");
|
|
16
16
|
const tooManySessions = ref(false);
|
|
17
17
|
const loginError = ref(false);
|
|
18
18
|
const router = useRouter();
|
|
19
|
-
const
|
|
19
|
+
const handleRedirect = () => {
|
|
20
|
+
if (portalConfig.value?.meta?.id === 3 || portalConfig.value?.meta?.name === "Virtual Tradeshow Template") {
|
|
21
|
+
console.log("virtual template detected on login");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
20
24
|
let redirectUrl = null;
|
|
21
25
|
if (currentConference.value !== null) {
|
|
22
26
|
if (globalConfigValue.value("login_redirect_enabled")) {
|
|
@@ -37,7 +41,7 @@ export const useLogin = (conference) => {
|
|
|
37
41
|
};
|
|
38
42
|
const handleLogin = (revoke = false) => {
|
|
39
43
|
login({ email: email.value, password: password.value, revoke }).then(() => {
|
|
40
|
-
|
|
44
|
+
handleRedirect();
|
|
41
45
|
}).catch((error) => {
|
|
42
46
|
if (error.response.status === 423) {
|
|
43
47
|
tooManySessions.value = true;
|
|
@@ -41,7 +41,7 @@ export const usePresentation = (conference) => {
|
|
|
41
41
|
if (presentation.type === "link") {
|
|
42
42
|
return presentation.video_url;
|
|
43
43
|
}
|
|
44
|
-
if ((presentation.video_url || presentation.type === "embed") && conferenceIsMixed) {
|
|
44
|
+
if ((presentation.video_url || presentation.type === "embed") && conferenceIsMixed(conference.value)) {
|
|
45
45
|
return getArchivePresentationLinkDestination(presentation);
|
|
46
46
|
}
|
|
47
47
|
return `/upcoming-events/${conference.value.id}/webcast/${track.channel}`;
|