@icvdeveloper/common-module 2.3.8 → 2.4.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 CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 2.4.0 - 2025-07-02
11
+
10
12
  ## 2.3.8 - 2025-06-11
11
13
 
12
14
  ## 2.3.7 - 2025-06-09
package/dist/module.d.mts CHANGED
@@ -840,6 +840,8 @@ type Portal = {
840
840
  social_description: string | null;
841
841
  social_photo: string | null;
842
842
  template_id: number | null;
843
+ is_nejm_template: boolean;
844
+ is_virtual_template: boolean;
843
845
  };
844
846
 
845
847
  type ContentData = {
package/dist/module.d.ts CHANGED
@@ -840,6 +840,8 @@ type Portal = {
840
840
  social_description: string | null;
841
841
  social_photo: string | null;
842
842
  template_id: number | null;
843
+ is_nejm_template: boolean;
844
+ is_virtual_template: boolean;
843
845
  };
844
846
 
845
847
  type ContentData = {
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "v3plus-common-module",
3
3
  "configKey": "v3plusCommonModule",
4
- "version": "2.3.8"
4
+ "version": "2.4.0"
5
5
  }
@@ -1,5 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { toRefs, computed, inject } from "vue";
3
+ import { storeToRefs } from "pinia";
3
4
  import { useAgenda } from "../../../composables/useAgenda";
4
5
  import { useConferenceHelpers } from "../../../composables/useConferenceHelpers";
5
6
  import { usePresentation } from "../../../composables/usePresentation";
@@ -9,6 +10,7 @@ import type {
9
10
  Track,
10
11
  TrackGroup,
11
12
  } from "../../../models/conference";
13
+ import { usePortalStore } from "../../../store";
12
14
  import InfoLink from "./InfoLink.vue";
13
15
  import PlayIcon from "./PlayIcon.vue";
14
16
  import Favorite from "./Favorite.vue";
@@ -31,9 +33,10 @@ const props = withDefaults(defineProps<Props>(), {
31
33
  });
32
34
 
33
35
  const { conference, track, presentation } = toRefs(props);
36
+ const { data:portal } = storeToRefs(usePortalStore());
34
37
 
35
38
  const isActiveAgenda: boolean = inject('isActiveAgenda', false);
36
- const isVirtual: boolean = inject('isVirtual', true);
39
+ const isVirtual = portal.value?.is_virtual_template || false;
37
40
 
38
41
  // Methods
39
42
  const { conferenceIsLiveOrMixed, conferenceIsArchived } =
@@ -9,6 +9,7 @@ import { useClassBinding } from '../../composables/useClassBinding';
9
9
  import {
10
10
  useTemplateConfigsStore,
11
11
  useNavigationConfigStore,
12
+ usePortalStore,
12
13
  useConferencesStore,
13
14
  useAuthStore
14
15
  } from '../../store';
@@ -28,7 +29,6 @@ import type { ContentData } from '../../models/vButton';
28
29
 
29
30
  type Props = {
30
31
  classObject?: NavigationClassObj;
31
- isVirtual?: boolean;
32
32
  }
33
33
 
34
34
  const props = withDefaults(defineProps<Props>(), {
@@ -55,17 +55,18 @@ const props = withDefaults(defineProps<Props>(), {
55
55
  profileImg: '',
56
56
  loginListItem: '',
57
57
  }
58
- },
59
- isVirtual: false
58
+ }
60
59
  });
61
60
 
62
- const { classObject, isVirtual } = toRefs(props);
61
+ const { classObject } = toRefs(props);
63
62
  const { user, isLoggedIn } = storeToRefs(useAuthStore());
63
+ const { data:portal } = storeToRefs(usePortalStore());
64
64
  const { currentConference } = storeToRefs(useConferencesStore());
65
65
 
66
66
  // data
67
67
  const showMenu = ref<boolean>(false);
68
68
  const profileImg = 'https://v3plus-production.s3.us-west-2.amazonaws.com/users/profile.png';
69
+ const isVirtual = portal.value?.is_virtual_template || false;
69
70
 
70
71
  // methods
71
72
  const { formatLink, isExternalLink } = useNavigation();
@@ -2,6 +2,7 @@ import { storeToRefs } from "pinia";
2
2
  import { useRouter } from "vue-router";
3
3
  import { ref } from "vue";
4
4
  import {
5
+ usePortalStore,
5
6
  useConferencesStore,
6
7
  useAuthStore,
7
8
  useTemplateConfigsStore
@@ -9,15 +10,16 @@ import {
9
10
  import { useConferenceHelpers } from "./useConferenceHelpers.mjs";
10
11
  export const useLogin = (conference) => {
11
12
  const { login } = useAuthStore();
13
+ const { data: portal } = storeToRefs(usePortalStore());
12
14
  const { currentConference } = storeToRefs(useConferencesStore());
13
- const { portalConfig, globalConfigValue } = storeToRefs(useTemplateConfigsStore());
15
+ const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
14
16
  const email = ref("");
15
17
  const password = ref("");
16
18
  const tooManySessions = ref(false);
17
19
  const loginError = ref(false);
18
20
  const router = useRouter();
19
21
  const handleRedirect = () => {
20
- if (portalConfig.value?.meta?.id === 3 || portalConfig.value?.meta?.name === "Virtual Tradeshow Template") {
22
+ if (portal.value?.is_virtual_template) {
21
23
  console.log("virtual template detected on login");
22
24
  return;
23
25
  }
@@ -14,4 +14,6 @@ export type Portal = {
14
14
  social_description: string | null;
15
15
  social_photo: string | null;
16
16
  template_id: number | null;
17
+ is_nejm_template: boolean;
18
+ is_virtual_template: boolean;
17
19
  };
@@ -44,7 +44,7 @@ export default defineNuxtPlugin((nuxtApp) => {
44
44
  NProgress.inc();
45
45
  });
46
46
  }
47
- let isNEJM = portal.value.template_id == 7;
47
+ let isNEJM = portal.value.is_nejm_template == true;
48
48
  let skipCurrentConf = isNEJM && !isRedirectPage && !isStreamTest;
49
49
  docTitle = portal.value.name;
50
50
  if (!skipCurrentConf) {
@@ -20,6 +20,8 @@ export const usePortalStore = defineStore("portal", {
20
20
  data: { navigation_config, template_config, ...data }
21
21
  } = response;
22
22
  this.data = data;
23
+ this.data.is_nejm_template = data.template_id == 7;
24
+ this.data.is_virtual_template = data.template_id == 5 || data.template_id == 8;
23
25
  useTemplateConfigsStore().setPortalTemplateConfig(
24
26
  template_config.config
25
27
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icvdeveloper/common-module",
3
- "version": "2.3.8",
3
+ "version": "2.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {