@icvdeveloper/common-module 2.6.2 → 2.6.4
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/runtime/components/agenda/AgendaTabbed.vue +2 -1
- package/dist/runtime/components/agenda/components/InfoLink.vue +2 -1
- package/dist/runtime/components/agenda/components/PresentationLink.vue +1 -4
- package/dist/runtime/components/auth/LoginFullWidth.vue +11 -7
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.mjs +1 -0
- package/dist/runtime/composables/useAgenda.mjs +4 -0
- package/dist/runtime/composables/useLogin.d.ts +1 -1
- package/dist/runtime/composables/useLogin.mjs +4 -1
- package/dist/runtime/composables/usePresentationHelpers.d.ts +5 -0
- package/dist/runtime/composables/usePresentationHelpers.mjs +47 -0
- package/dist/runtime/store/auth.mjs +1 -1
- package/dist/runtime/store/modalPlayerConfig.d.ts +3 -2
- package/dist/runtime/store/modalPlayerConfig.mjs +10 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
|
@@ -35,6 +35,7 @@ const {
|
|
|
35
35
|
showInfoLink,
|
|
36
36
|
useAccordion,
|
|
37
37
|
usePresenterModal,
|
|
38
|
+
showPresenterImages,
|
|
38
39
|
showPresenterDescription,
|
|
39
40
|
} = useAgenda(conference);
|
|
40
41
|
const {
|
|
@@ -285,7 +286,7 @@ const presentersContainer = computed(() => {
|
|
|
285
286
|
<CommonPresenterModal
|
|
286
287
|
v-if="usePresenterModal()"
|
|
287
288
|
:use-icon="false"
|
|
288
|
-
:show-img="
|
|
289
|
+
:show-img="showPresenterImages()"
|
|
289
290
|
:presenter="presenter"
|
|
290
291
|
:is-small-grouped-track="
|
|
291
292
|
isSmallGroupedTrack(group_or_track)
|
|
@@ -3,13 +3,14 @@ import { ref, toRefs, computed } from "vue";
|
|
|
3
3
|
import type { Presentation } from "../../../models/conference";
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
6
|
-
linkText: string;
|
|
7
6
|
presentation: Presentation;
|
|
7
|
+
linkText?: string;
|
|
8
8
|
useIcon?: boolean;
|
|
9
9
|
newLine?: boolean;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
linkText: "",
|
|
13
14
|
useIcon: true,
|
|
14
15
|
newLine: false,
|
|
15
16
|
});
|
|
@@ -138,9 +138,7 @@ const allowFavorites = computed(() => {
|
|
|
138
138
|
<InfoLink
|
|
139
139
|
v-if="showInfoLink && presentation.description"
|
|
140
140
|
:presentation="presentation"
|
|
141
|
-
:
|
|
142
|
-
:link-text="infoLinkText"
|
|
143
|
-
:new-line="isSmallGroupedTrack"
|
|
141
|
+
:new-line="isSmallGroupedTrack(track)"
|
|
144
142
|
class="ml-2"
|
|
145
143
|
/>
|
|
146
144
|
|
|
@@ -149,7 +147,6 @@ const allowFavorites = computed(() => {
|
|
|
149
147
|
v-if="allowFavorites && isLoggedIn"
|
|
150
148
|
class="ml-1"
|
|
151
149
|
:presentation="presentation"
|
|
152
|
-
@click="handleFavoriteClick"
|
|
153
150
|
/>
|
|
154
151
|
</h2>
|
|
155
152
|
</div>
|
|
@@ -10,23 +10,24 @@ interface Props {
|
|
|
10
10
|
title?: string | null;
|
|
11
11
|
message?: string | null;
|
|
12
12
|
conference?: Conference | null;
|
|
13
|
+
onLoginSuccess?: () => void;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const props = withDefaults(defineProps<Props>(), {
|
|
16
17
|
title: null,
|
|
17
18
|
message: null,
|
|
18
19
|
conference: null,
|
|
20
|
+
onLoginSuccess: undefined
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
const { title, message, conference } = toRefs<Props>(props);
|
|
22
24
|
|
|
23
|
-
const { data:portal } = storeToRefs(usePortalStore());
|
|
25
|
+
const { data: portal } = storeToRefs(usePortalStore());
|
|
24
26
|
const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
25
27
|
|
|
26
28
|
// emits
|
|
27
29
|
const emit = defineEmits<{
|
|
28
30
|
(event: "showResetRequest"): void;
|
|
29
|
-
|
|
30
31
|
}>();
|
|
31
32
|
|
|
32
33
|
// Methods
|
|
@@ -43,14 +44,16 @@ const showResetRequest = () => {
|
|
|
43
44
|
<div class="px-2">
|
|
44
45
|
<div class="flex flex-1 flex-col text-center pt-8">
|
|
45
46
|
<h3
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
v-if="title"
|
|
48
|
+
class="py-8"
|
|
48
49
|
>
|
|
49
50
|
{{ title }}
|
|
50
51
|
</h3>
|
|
52
|
+
|
|
51
53
|
<h1 class="mb-3 heading-color-3">
|
|
52
54
|
Log In
|
|
53
55
|
</h1>
|
|
56
|
+
|
|
54
57
|
<!-- message -->
|
|
55
58
|
<CommonMessage
|
|
56
59
|
v-if="message && !loginError"
|
|
@@ -59,6 +62,7 @@ const showResetRequest = () => {
|
|
|
59
62
|
>
|
|
60
63
|
{{ message }}
|
|
61
64
|
</CommonMessage>
|
|
65
|
+
|
|
62
66
|
<!-- error messages -->
|
|
63
67
|
<CommonMessage
|
|
64
68
|
v-if="loginError"
|
|
@@ -89,19 +93,19 @@ const showResetRequest = () => {
|
|
|
89
93
|
type="email"
|
|
90
94
|
placeholder="Email"
|
|
91
95
|
class="form-input contrast-border mb-2"
|
|
92
|
-
@keyup.enter="handleLogin()"
|
|
96
|
+
@keyup.enter="handleLogin(false, onLoginSuccess)"
|
|
93
97
|
>
|
|
94
98
|
<input
|
|
95
99
|
v-model="password"
|
|
96
100
|
type="password"
|
|
97
101
|
placeholder="password"
|
|
98
102
|
class="form-input contrast-border mb-5"
|
|
99
|
-
@keyup.enter="handleLogin()"
|
|
103
|
+
@keyup.enter="handleLogin(false, onLoginSuccess)"
|
|
100
104
|
>
|
|
101
105
|
<button
|
|
102
106
|
v-if="!tooManySessions"
|
|
103
107
|
class="btn"
|
|
104
|
-
@click="handleLogin()"
|
|
108
|
+
@click="handleLogin(false, onLoginSuccess)"
|
|
105
109
|
>
|
|
106
110
|
Log In
|
|
107
111
|
</button>
|
|
@@ -5,6 +5,7 @@ export * from "./useAuth";
|
|
|
5
5
|
export * from "./useConferenceHelpers";
|
|
6
6
|
export * from "./useLogin";
|
|
7
7
|
export * from "./usePresentation";
|
|
8
|
+
export * from './usePresentationHelpers';
|
|
8
9
|
export * from "./usePresenter";
|
|
9
10
|
export * from "./usePresenters";
|
|
10
11
|
export * from "./useScripts";
|
|
@@ -5,6 +5,7 @@ export * from "./useAuth.mjs";
|
|
|
5
5
|
export * from "./useConferenceHelpers.mjs";
|
|
6
6
|
export * from "./useLogin.mjs";
|
|
7
7
|
export * from "./usePresentation.mjs";
|
|
8
|
+
export * from "./usePresentationHelpers.mjs";
|
|
8
9
|
export * from "./usePresenter.mjs";
|
|
9
10
|
export * from "./usePresenters.mjs";
|
|
10
11
|
export * from "./useScripts.mjs";
|
|
@@ -160,6 +160,9 @@ export const useAgenda = (conference) => {
|
|
|
160
160
|
const usePresenterModal = () => {
|
|
161
161
|
return pagesConfigValue("agenda.use_presenter_modal");
|
|
162
162
|
};
|
|
163
|
+
const showPresenterImages = () => {
|
|
164
|
+
return pagesConfigValue("agenda.show_presenter_images", true);
|
|
165
|
+
};
|
|
163
166
|
const showPresenterDescription = (presenter, presentation) => {
|
|
164
167
|
if (selectedPresenter.value?.presentationId === presentation.id && selectedPresenter.value?.id === presenter.id) {
|
|
165
168
|
selectedPresenter.value = null;
|
|
@@ -270,6 +273,7 @@ export const useAgenda = (conference) => {
|
|
|
270
273
|
getTrackClasses,
|
|
271
274
|
showInfoLink,
|
|
272
275
|
useAccordion,
|
|
276
|
+
showPresenterImages,
|
|
273
277
|
usePresenterModal,
|
|
274
278
|
showPresenterDescription,
|
|
275
279
|
playPresentation,
|
|
@@ -41,8 +41,11 @@ export const useLogin = (conference) => {
|
|
|
41
41
|
router.push(redirectUrl);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
const handleLogin = (revoke = false) => {
|
|
44
|
+
const handleLogin = (revoke = false, onLoginSuccess) => {
|
|
45
45
|
login({ email: email.value, password: password.value, revoke }).then(() => {
|
|
46
|
+
if (onLoginSuccess) {
|
|
47
|
+
onLoginSuccess();
|
|
48
|
+
}
|
|
46
49
|
handleRedirect();
|
|
47
50
|
}).catch((error) => {
|
|
48
51
|
if (error.response.status === 423) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Presentation, Conference } from '../models/conference';
|
|
2
|
+
export declare const usePresentationHelpers: () => {
|
|
3
|
+
getPresentationPlayerType: (_presentation: Presentation) => string;
|
|
4
|
+
findPresentationById: (conference: Conference, id: number) => Presentation | undefined;
|
|
5
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export const usePresentationHelpers = () => {
|
|
2
|
+
const getPresentationPlayerType = (_presentation) => {
|
|
3
|
+
let playerType = _presentation.video_url || _presentation.type == "embed" ? "archive" : "live";
|
|
4
|
+
if (_presentation.external_type == "iframe") {
|
|
5
|
+
playerType = "iframe";
|
|
6
|
+
}
|
|
7
|
+
return playerType;
|
|
8
|
+
};
|
|
9
|
+
const findPresentationById = (conference, id) => {
|
|
10
|
+
if (!conference || !id) return void 0;
|
|
11
|
+
const findInPresentations = (presentations) => {
|
|
12
|
+
if (!presentations?.length) return void 0;
|
|
13
|
+
return presentations.find((p) => p?.id === id);
|
|
14
|
+
};
|
|
15
|
+
const findInTracks = (tracks) => {
|
|
16
|
+
if (!tracks?.length) return void 0;
|
|
17
|
+
for (const track of tracks) {
|
|
18
|
+
const hit = findInPresentations(track?.presentations);
|
|
19
|
+
if (hit) return hit;
|
|
20
|
+
}
|
|
21
|
+
return void 0;
|
|
22
|
+
};
|
|
23
|
+
const findInTrackGroups = (trackGroups) => {
|
|
24
|
+
if (!trackGroups?.length) return void 0;
|
|
25
|
+
for (const group of trackGroups) {
|
|
26
|
+
const hit = findInTracks(group?.tracks);
|
|
27
|
+
if (hit) return hit;
|
|
28
|
+
}
|
|
29
|
+
return void 0;
|
|
30
|
+
};
|
|
31
|
+
for (const day of conference.days ?? []) {
|
|
32
|
+
const hitInTracks = findInTracks(day?.tracks);
|
|
33
|
+
if (hitInTracks) return hitInTracks;
|
|
34
|
+
const hitInGroups = findInTrackGroups(day?.track_groups);
|
|
35
|
+
if (hitInGroups) return hitInGroups;
|
|
36
|
+
}
|
|
37
|
+
for (const presenter of conference.presenters ?? []) {
|
|
38
|
+
const hit = findInPresentations(presenter?.presentations);
|
|
39
|
+
if (hit) return hit;
|
|
40
|
+
}
|
|
41
|
+
return void 0;
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
getPresentationPlayerType,
|
|
45
|
+
findPresentationById
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -60,7 +60,7 @@ export const useAuthStore = defineStore("auth", {
|
|
|
60
60
|
this.user = response;
|
|
61
61
|
const conferencesStore = useConferencesStore();
|
|
62
62
|
conferencesStore.getConferences().then(() => {
|
|
63
|
-
conferencesStore.getCurrentConference(
|
|
63
|
+
conferencesStore.getCurrentConference();
|
|
64
64
|
});
|
|
65
65
|
loginEventHook.trigger(false);
|
|
66
66
|
resolve(response);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type { Conference, PlayerPresentation } from '../models/conference';
|
|
2
|
+
import type { Conference, PlayerPresentation, VirtualPresentation } from '../models/conference';
|
|
3
3
|
type PlayerConfigStore = {
|
|
4
4
|
isPlayerVisible: Ref<boolean>;
|
|
5
5
|
playerPresentation: Ref<PlayerPresentation>;
|
|
@@ -23,6 +23,7 @@ type PlayerConfigStore = {
|
|
|
23
23
|
setSelectedContent: (payload: {}) => void;
|
|
24
24
|
setChatroomId: (payload: string) => void;
|
|
25
25
|
updateSelectedPresentationAccess: (payload: boolean) => void;
|
|
26
|
+
updateSelectedPresentation: (presentation: VirtualPresentation) => void;
|
|
26
27
|
};
|
|
27
|
-
export declare const usePlayerConfigStore: import("pinia").StoreDefinition<"playerConfig", import("pinia")._UnwrapAll<Pick<PlayerConfigStore, "selectedContent" | "isPlayerVisible" | "playerPresentation" | "livePresentations" | "playerConference" | "chatroomId" | "getlivePresentations">>, Pick<PlayerConfigStore, never>, Pick<PlayerConfigStore, "emitStreamTest" | "setIsPlayerVisible" | "setSelectedPresentation" | "setLivePresentations" | "setSelectedConference" | "setSelectedConferenceAccess" | "setSelectedContent" | "setChatroomId" | "updateSelectedPresentationAccess">>;
|
|
28
|
+
export declare const usePlayerConfigStore: import("pinia").StoreDefinition<"playerConfig", import("pinia")._UnwrapAll<Pick<PlayerConfigStore, "selectedContent" | "isPlayerVisible" | "playerPresentation" | "livePresentations" | "playerConference" | "chatroomId" | "getlivePresentations">>, Pick<PlayerConfigStore, never>, Pick<PlayerConfigStore, "emitStreamTest" | "setIsPlayerVisible" | "setSelectedPresentation" | "setLivePresentations" | "setSelectedConference" | "setSelectedConferenceAccess" | "setSelectedContent" | "setChatroomId" | "updateSelectedPresentationAccess" | "updateSelectedPresentation">>;
|
|
28
29
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ref, computed } from "vue";
|
|
2
2
|
import { defineStore } from "pinia";
|
|
3
|
+
import { usePresentationHelpers } from "../composables/index.mjs";
|
|
3
4
|
import {
|
|
4
5
|
setIsPlayerVisibleEventHook,
|
|
5
6
|
setPlayerConferenceEventHook,
|
|
@@ -62,6 +63,13 @@ export const usePlayerConfigStore = defineStore("playerConfig", () => {
|
|
|
62
63
|
const updateSelectedPresentationAccess = (payload) => {
|
|
63
64
|
playerPresentation.value.data.access = payload;
|
|
64
65
|
};
|
|
66
|
+
const updateSelectedPresentation = (presentation) => {
|
|
67
|
+
const { getPresentationPlayerType } = usePresentationHelpers();
|
|
68
|
+
playerPresentation.value = {
|
|
69
|
+
player_type: getPresentationPlayerType(presentation),
|
|
70
|
+
data: presentation
|
|
71
|
+
};
|
|
72
|
+
};
|
|
65
73
|
return {
|
|
66
74
|
isPlayerVisible,
|
|
67
75
|
playerPresentation,
|
|
@@ -78,6 +86,7 @@ export const usePlayerConfigStore = defineStore("playerConfig", () => {
|
|
|
78
86
|
setSelectedConferenceAccess,
|
|
79
87
|
setSelectedContent,
|
|
80
88
|
setChatroomId,
|
|
81
|
-
updateSelectedPresentationAccess
|
|
89
|
+
updateSelectedPresentationAccess,
|
|
90
|
+
updateSelectedPresentation
|
|
82
91
|
};
|
|
83
92
|
});
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icvdeveloper/common-module",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"types": "./dist/
|
|
8
|
+
"types": "./dist/module.d.ts",
|
|
9
9
|
"import": "./dist/module.mjs",
|
|
10
10
|
"require": "./dist/module.cjs"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/module.cjs",
|
|
14
|
-
"types": "./dist/
|
|
14
|
+
"types": "./dist/module.d.ts",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|