@icvdeveloper/common-module 2.1.3 → 2.2.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,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 2.2.0 - 2024-10-03
11
+
12
+ ## 2.1.4 - 2024-09-17
13
+
10
14
  ## 2.1.3 - 2024-09-09
11
15
 
12
16
  ## 2.1.2 - 2024-09-07
package/dist/module.d.mts CHANGED
@@ -259,6 +259,7 @@ type Track = {
259
259
  access: boolean;
260
260
  channel: number;
261
261
  conference_day_id?: number;
262
+ day: Day;
262
263
  date: string;
263
264
  embed_html?: string | null;
264
265
  id: number;
@@ -682,6 +683,7 @@ type AgendaPlayerPageConfigs = {
682
683
  agenda_tab_bg_color: ColorVariable;
683
684
  agenda_tab_color: ColorVariable;
684
685
  agenda_tab_sponsor_bg_color: ColorVariable;
686
+ agenda_theme: SelectVariable;
685
687
  agenda_track_bg_color: ColorVariable;
686
688
  agenda_track_group_bg_color: ColorVariable;
687
689
  session_end_times: ToggleVariable;
package/dist/module.d.ts CHANGED
@@ -259,6 +259,7 @@ type Track = {
259
259
  access: boolean;
260
260
  channel: number;
261
261
  conference_day_id?: number;
262
+ day: Day;
262
263
  date: string;
263
264
  embed_html?: string | null;
264
265
  id: number;
@@ -682,6 +683,7 @@ type AgendaPlayerPageConfigs = {
682
683
  agenda_tab_bg_color: ColorVariable;
683
684
  agenda_tab_color: ColorVariable;
684
685
  agenda_tab_sponsor_bg_color: ColorVariable;
686
+ agenda_theme: SelectVariable;
685
687
  agenda_track_bg_color: ColorVariable;
686
688
  agenda_track_group_bg_color: ColorVariable;
687
689
  session_end_times: ToggleVariable;
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "v3plus-common-module",
3
3
  "configKey": "v3plusCommonModule",
4
- "version": "2.1.3"
4
+ "version": "2.2.0"
5
5
  }
@@ -59,7 +59,7 @@ const { getPresentersLabel, getSortedPresenters } = usePresenters(conference);
59
59
 
60
60
  const { classBinding } = useClassBinding();
61
61
 
62
- const isExpanded: Ref<boolean> = inject('isExpanded', ref<boolean>(false));
62
+ const isExpanded: Ref<boolean> = inject('isExpanded', ref<boolean>(true));
63
63
 
64
64
  // data
65
65
  const expandedPres = ref<number>(0);
@@ -89,12 +89,16 @@ const navigationItems = computed(() => {
89
89
  return getEnabled();
90
90
  });
91
91
 
92
- const htmlHeader = computed(() => {
92
+ const htmlHeader = computed((): string => {
93
93
  return globalConfigValue("html_header");
94
94
  });
95
95
 
96
- const hideUserProfile = computed(() => {
97
- return globalConfigValue("hide_user_profile");
96
+ const hideUserProfile = computed((): boolean => {
97
+ return globalConfigValue("hide_user_profile", true);
98
+ });
99
+
100
+ const isSearchEnabled = computed((): boolean => {
101
+ return globalConfigValue("site_search", false);
98
102
  });
99
103
 
100
104
  // methods
@@ -104,6 +108,12 @@ const emitLoginModal = (): void => {
104
108
  modalContentEventHook.trigger(modalContent);
105
109
  };
106
110
 
111
+ const emitSearchModal = (): void => {
112
+ const modalContent: ContentData = {};
113
+ modalContent.contentType = 'search';
114
+ modalContentEventHook.trigger(modalContent);
115
+ };
116
+
107
117
  const emitStreamTest = (): void => {
108
118
  const streamPres: PlayerPresentation = {
109
119
  player_type: 'live',
@@ -190,13 +200,22 @@ const emitStreamTest = (): void => {
190
200
  >
191
201
  <li>
192
202
  <template v-if="!isExternalLink(item)">
193
- <nuxt-link
194
- v-if="isVirtual && item.slug == 'stream-test'"
195
- :class="['cursor-pointer', classBinding(classObject, 'navigationItemLink', 'nav-link')]"
196
- @click.enter="emitStreamTest"
197
- >
198
- {{ item.label }}
199
- </nuxt-link>
203
+ <template v-if="isVirtual">
204
+ <nuxt-link
205
+ v-if="item.slug == 'stream-test'"
206
+ :class="['cursor-pointer', classBinding(classObject, 'navigationItemLink', 'nav-link')]"
207
+ @click.enter="emitSearchModal"
208
+ >
209
+ {{ item.label }}
210
+ </nuxt-link>
211
+ <nuxt-link
212
+ v-if="isSearchEnabled && item.slug == 'search'"
213
+ :class="['cursor-pointer', classBinding(classObject, 'navigationItemLink', 'nav-link')]"
214
+ @click.enter="emitSearchModal"
215
+ >
216
+ {{ item.label }}
217
+ </nuxt-link>
218
+ </template>
200
219
  <nuxt-link
201
220
  v-else
202
221
  :to="formatLink(item)"
@@ -16,10 +16,9 @@ import {
16
16
  } from "../composables/useEventHooks.mjs";
17
17
  export const useAgenda = (conference) => {
18
18
  const { setConferenceConfig, pagesConfigValue } = useTemplateConfigsStore();
19
- console.log("setting conference config");
20
- setConferenceConfig(conference.value);
21
19
  const affiliateStore = useAffiliatesStore();
22
20
  const route = useRoute();
21
+ const { conferences } = storeToRefs(useTemplateConfigsStore());
23
22
  const { isLoggedIn } = storeToRefs(useAuthStore());
24
23
  const { currentConference } = storeToRefs(useConferencesStore());
25
24
  const { playerPresentation, livePresentations } = storeToRefs(usePlayerConfigStore());
@@ -27,6 +26,10 @@ export const useAgenda = (conference) => {
27
26
  const allowAgendaFullAccess = pagesConfigValue("agenda.agendas_full_access", false);
28
27
  const displayTrackGroups = pagesConfigValue("agenda.group_tracks", "None");
29
28
  const selectedPresenter = ref(null);
29
+ if (conferences.value[conference.value.id] === void 0) {
30
+ console.log("setting conference config");
31
+ setConferenceConfig(conference.value);
32
+ }
30
33
  const days = computed(() => {
31
34
  const data = conference.value.days;
32
35
  if (data == void 0) return [];
@@ -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 globalConfigValue("login_disabled") || globalConfigValue("login_process") === "disabled";
6
+ return globalConfigValue("login_process") === "disabled" || globalConfigValue("login_process") === "ucc";
7
7
  });
8
8
  return {
9
9
  isLoginDisabled
@@ -128,6 +128,7 @@ export type Track = {
128
128
  access: boolean;
129
129
  channel: number;
130
130
  conference_day_id?: number;
131
+ day: Day;
131
132
  date: string;
132
133
  embed_html?: string | null;
133
134
  id: number;
@@ -31,6 +31,7 @@ export type AgendaPlayerPageConfigs = {
31
31
  agenda_tab_bg_color: ColorVariable;
32
32
  agenda_tab_color: ColorVariable;
33
33
  agenda_tab_sponsor_bg_color: ColorVariable;
34
+ agenda_theme: SelectVariable;
34
35
  agenda_track_bg_color: ColorVariable;
35
36
  agenda_track_group_bg_color: ColorVariable;
36
37
  session_end_times: ToggleVariable;
@@ -19,7 +19,7 @@ export default defineNuxtPlugin((nuxtApp) => {
19
19
  apiUrl
20
20
  });
21
21
  nuxtApp.$pinia.use(piniaPluginPersistedstate);
22
- router.beforeEach(async (to, from) => {
22
+ router.beforeEach(async (to, from, next) => {
23
23
  NProgress.start();
24
24
  const portalStore = usePortalStore();
25
25
  const conferencesStore = useConferencesStore();
@@ -50,6 +50,38 @@ export default defineNuxtPlugin((nuxtApp) => {
50
50
  await conferencesStore.getCurrentConference(true).then(() => NProgress.inc())
51
51
  ]);
52
52
  }
53
+ if (routeName.includes("events-id") && to.params.id == "redirect") {
54
+ let matchedConfs = conferencesStore.conferenceList;
55
+ if (to.query.custom1) {
56
+ matchedConfs = conferencesStore.searchConferenceAffiliatesCustom1(to.query.custom1);
57
+ }
58
+ if (matchedConfs.length > 0 && to.query.state) {
59
+ if (to.query.state == "upcoming") {
60
+ matchedConfs = matchedConfs.filter(function(conf) {
61
+ return conf.state == "upcoming" || conf.state == "live" || conf.state == "mixed";
62
+ });
63
+ } else {
64
+ matchedConfs = matchedConfs.filter(function(conf) {
65
+ return conf.state == to.query.state;
66
+ });
67
+ }
68
+ }
69
+ if (matchedConfs.length > 0) {
70
+ if (to.query.orderdir == "asc") {
71
+ matchedConfs.sort(function(a, b) {
72
+ return a.start_date < b.start_date ? -1 : b.start_date < a.start_date ? 1 : 0;
73
+ });
74
+ } else {
75
+ matchedConfs.sort(function(a, b) {
76
+ return a.start_date > b.start_date ? -1 : b.start_date > a.start_date ? 1 : 0;
77
+ });
78
+ }
79
+ const eventPathPrefix = to.path.split("/")[1];
80
+ next("/" + eventPathPrefix + "/" + matchedConfs[0].id);
81
+ } else {
82
+ next("/");
83
+ }
84
+ }
53
85
  const routeParamId = parseInt(to.params.id);
54
86
  if (routeName.includes("events-id") && routeParamId) {
55
87
  await conferencesStore.getSelectedConference(routeParamId, false).then(() => {
@@ -118,6 +150,7 @@ export default defineNuxtPlugin((nuxtApp) => {
118
150
  twitterDescription: metaDesc,
119
151
  twitterImage: socialImage
120
152
  });
153
+ next();
121
154
  });
122
155
  router.afterEach(() => {
123
156
  NProgress.done();
@@ -10,6 +10,7 @@ export declare const useConferencesStore: import("pinia").StoreDefinition<"confe
10
10
  pastEvents: (state: ConferencesState) => Conference[];
11
11
  }, {
12
12
  getConferences(): Promise<Conference[]>;
13
+ searchConferenceAffiliatesCustom1(code: string): Conference[];
13
14
  getSelectedConference(id: number, skipDetails?: boolean): Promise<Conference>;
14
15
  getCurrentConference(skipDetails?: boolean): Promise<Conference>;
15
16
  getRegisteredConferences(): Conference[];
@@ -1,5 +1,5 @@
1
1
  import { defineStore } from "pinia";
2
- import { findLast, find } from "lodash-es";
2
+ import { findLast, find, get } from "lodash-es";
3
3
  import { useApi } from "../composables/useApi.mjs";
4
4
  import { ConferenceState } from "../models/conference.mjs";
5
5
  import { useTemplateConfigsStore } from "./templateConfigs.mjs";
@@ -39,6 +39,15 @@ export const useConferencesStore = defineStore("conferences", {
39
39
  });
40
40
  });
41
41
  },
42
+ searchConferenceAffiliatesCustom1(code) {
43
+ const matchedConfs = this.conferenceList.filter(function(conf) {
44
+ const custom1Affiliates = get(conf, "affiliates", []).filter(function(aff) {
45
+ return aff.role == "custom1" && aff.code == code;
46
+ });
47
+ return custom1Affiliates.length > 0;
48
+ });
49
+ return matchedConfs;
50
+ },
42
51
  getSelectedConference(id, skipDetails) {
43
52
  return new Promise((resolve, reject) => {
44
53
  if (skipDetails === true) {
@@ -81,6 +81,7 @@ export const useTemplateConfigsStore = defineStore("templateConfigs", {
81
81
  };
82
82
  },
83
83
  setConferenceConfig(conference) {
84
+ if (this.conferences[conference.id] != void 0) return;
84
85
  const newPagesConfig = this.portalConfig.pages;
85
86
  const confPagesConfig = {};
86
87
  const conferenceTemplateConfig = conference.template_config ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icvdeveloper/common-module",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {