@icvdeveloper/common-module 0.0.1
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/README.md +6 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.ts +9 -0
- package/dist/module.json +8 -0
- package/dist/module.mjs +102051 -0
- package/dist/runtime/@types/configVariables.d.ts +78 -0
- package/dist/runtime/@types/configVariables.mjs +0 -0
- package/dist/runtime/analytics.d.ts +8 -0
- package/dist/runtime/analytics.mjs +38 -0
- package/dist/runtime/assets/scss/_agenda.scss +47 -0
- package/dist/runtime/assets/scss/_animations.scss +11 -0
- package/dist/runtime/assets/scss/_container_variants.scss +26 -0
- package/dist/runtime/assets/scss/_custom.scss +364 -0
- package/dist/runtime/assets/scss/_footer.scss +20 -0
- package/dist/runtime/assets/scss/_forms.scss +29 -0
- package/dist/runtime/assets/scss/_functions.scss +24 -0
- package/dist/runtime/assets/scss/_header.scss +41 -0
- package/dist/runtime/assets/scss/_index_production.scss +45 -0
- package/dist/runtime/assets/scss/_transitions.scss +24 -0
- package/dist/runtime/assets/scss/_variables.scss +62 -0
- package/dist/runtime/assets/scss/_variables2.scss +0 -0
- package/dist/runtime/assets/scss/_webcast.scss +141 -0
- package/dist/runtime/assets/scss/index.scss +42 -0
- package/dist/runtime/assets/svg/answer.svg +14 -0
- package/dist/runtime/assets/svg/avatar.svg +1 -0
- package/dist/runtime/assets/svg/bell-icon.svg +3 -0
- package/dist/runtime/assets/svg/chat-icon.svg +1 -0
- package/dist/runtime/assets/svg/checkmark-icon.svg +1 -0
- package/dist/runtime/assets/svg/close-icon.svg +1 -0
- package/dist/runtime/assets/svg/icon-avatar.svg +1 -0
- package/dist/runtime/assets/svg/icon-close.svg +1 -0
- package/dist/runtime/assets/svg/icon-down-arrow.svg +1 -0
- package/dist/runtime/assets/svg/icon-facebook.svg +1 -0
- package/dist/runtime/assets/svg/icon-info.svg +3 -0
- package/dist/runtime/assets/svg/icon-linkedin.svg +1 -0
- package/dist/runtime/assets/svg/icon-new-window.svg +11 -0
- package/dist/runtime/assets/svg/icon-offline.svg +3 -0
- package/dist/runtime/assets/svg/icon-online.svg +3 -0
- package/dist/runtime/assets/svg/icon-person.svg +3 -0
- package/dist/runtime/assets/svg/icon-play.svg +3 -0
- package/dist/runtime/assets/svg/icon-star-filled.svg +30 -0
- package/dist/runtime/assets/svg/icon-star.svg +25 -0
- package/dist/runtime/assets/svg/icon-twitter.svg +1 -0
- package/dist/runtime/assets/svg/icon-video-chat.svg +14 -0
- package/dist/runtime/assets/svg/icon-website.svg +3 -0
- package/dist/runtime/assets/svg/icon-youtube.svg +1 -0
- package/dist/runtime/assets/svg/icon-zoom.svg +10 -0
- package/dist/runtime/assets/svg/notification-icon.svg +32 -0
- package/dist/runtime/assets/svg/offline-icon.svg +1 -0
- package/dist/runtime/assets/svg/online-icon.svg +3 -0
- package/dist/runtime/assets/svg/peer2peer.svg +3 -0
- package/dist/runtime/assets/svg/phone.svg +1 -0
- package/dist/runtime/assets/svg/plus-icon.svg +1 -0
- package/dist/runtime/assets/svg/red-icon.svg +3 -0
- package/dist/runtime/assets/svg/reject.svg +14 -0
- package/dist/runtime/assets/svg/search-icon.svg +3 -0
- package/dist/runtime/components/affiliates/AffiliatePage.vue +16 -0
- package/dist/runtime/components/agenda/AgendaTabbed.vue +342 -0
- package/dist/runtime/components/agenda/components/InfoLink.vue +55 -0
- package/dist/runtime/components/agenda/components/PlayIcon.vue +48 -0
- package/dist/runtime/components/agenda/components/PresentationLink.vue +147 -0
- package/dist/runtime/components/agenda/components/Sponsor.vue +108 -0
- package/dist/runtime/components/auth/LoginFullWidth.vue +76 -0
- package/dist/runtime/components/core/CountdownTimer.vue +275 -0
- package/dist/runtime/components/core/DynamicHtml.vue +16 -0
- package/dist/runtime/components/core/DynamicHtml.vue.d.ts +2 -0
- package/dist/runtime/components/core/Modal.vue +84 -0
- package/dist/runtime/components/core/SvgIcon.vue +119 -0
- package/dist/runtime/components/core/ZoomModal.vue +37 -0
- package/dist/runtime/components/events/EventHeader.vue +131 -0
- package/dist/runtime/components/events/PastEvents.vue +150 -0
- package/dist/runtime/components/events/UpcomingEvents.vue +145 -0
- package/dist/runtime/components/forms/ErrorField.vue +19 -0
- package/dist/runtime/components/forms/Message.vue +25 -0
- package/dist/runtime/components/forms/SearchInput.vue +30 -0
- package/dist/runtime/components/forms/SupportForm.vue +109 -0
- package/dist/runtime/components/forms/TextArea.vue +26 -0
- package/dist/runtime/components/forms/TextInput.vue +22 -0
- package/dist/runtime/components/layouts/Accordion.vue +76 -0
- package/dist/runtime/components/presenters/PresenterListing.vue +89 -0
- package/dist/runtime/components/presenters/PresenterModal.vue +83 -0
- package/dist/runtime/composables/useAgenda.d.ts +81 -0
- package/dist/runtime/composables/useAgenda.mjs +178 -0
- package/dist/runtime/composables/useAnalytics.d.ts +7 -0
- package/dist/runtime/composables/useAnalytics.mjs +10 -0
- package/dist/runtime/composables/useApi.d.ts +1 -0
- package/dist/runtime/composables/useApi.mjs +16 -0
- package/dist/runtime/composables/useConferenceHelpers.d.ts +65 -0
- package/dist/runtime/composables/useConferenceHelpers.mjs +270 -0
- package/dist/runtime/composables/useDateFormat.d.ts +12 -0
- package/dist/runtime/composables/useDateFormat.mjs +21 -0
- package/dist/runtime/composables/useLogin.d.ts +30 -0
- package/dist/runtime/composables/useLogin.mjs +58 -0
- package/dist/runtime/composables/usePresentation.d.ts +53 -0
- package/dist/runtime/composables/usePresentation.mjs +98 -0
- package/dist/runtime/composables/usePresenter.d.ts +15 -0
- package/dist/runtime/composables/usePresenter.mjs +67 -0
- package/dist/runtime/composables/usePresenters.d.ts +13 -0
- package/dist/runtime/composables/usePresenters.mjs +21 -0
- package/dist/runtime/composables/useV3plusCommonModule.d.ts +2 -0
- package/dist/runtime/composables/useV3plusCommonModule.mjs +2 -0
- package/dist/runtime/models/affiliate.d.ts +1 -0
- package/dist/runtime/models/affiliate.mjs +0 -0
- package/dist/runtime/models/authUser.d.ts +16 -0
- package/dist/runtime/models/authUser.mjs +0 -0
- package/dist/runtime/models/conference.d.ts +124 -0
- package/dist/runtime/models/conference.mjs +18 -0
- package/dist/runtime/models/globalConfig.d.ts +80 -0
- package/dist/runtime/models/globalConfig.mjs +0 -0
- package/dist/runtime/models/group.d.ts +14 -0
- package/dist/runtime/models/group.mjs +0 -0
- package/dist/runtime/models/icons.d.ts +18 -0
- package/dist/runtime/models/icons.mjs +0 -0
- package/dist/runtime/models/navigationConfig.d.ts +8 -0
- package/dist/runtime/models/navigationConfig.mjs +0 -0
- package/dist/runtime/models/pagesConfig.d.ts +169 -0
- package/dist/runtime/models/pagesConfig.mjs +0 -0
- package/dist/runtime/models/portal.d.ts +8 -0
- package/dist/runtime/models/portal.mjs +0 -0
- package/dist/runtime/models/templateConfig.d.ts +44 -0
- package/dist/runtime/models/templateConfig.mjs +0 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.mjs +55 -0
- package/dist/runtime/store/affiliates.d.ts +12 -0
- package/dist/runtime/store/affiliates.mjs +35 -0
- package/dist/runtime/store/auth.d.ts +14 -0
- package/dist/runtime/store/auth.mjs +32 -0
- package/dist/runtime/store/conferences.d.ts +13 -0
- package/dist/runtime/store/conferences.mjs +86 -0
- package/dist/runtime/store/navigationConfig.d.ts +7 -0
- package/dist/runtime/store/navigationConfig.mjs +14 -0
- package/dist/runtime/store/portal.d.ts +9 -0
- package/dist/runtime/store/portal.mjs +39 -0
- package/dist/runtime/store/support.d.ts +3 -0
- package/dist/runtime/store/support.mjs +20 -0
- package/dist/runtime/store/templateConfigs.d.ts +20 -0
- package/dist/runtime/store/templateConfigs.mjs +84 -0
- package/dist/runtime/v3plusCommonPlugin.d.ts +14 -0
- package/dist/runtime/v3plusCommonPlugin.mjs +8 -0
- package/dist/types.d.ts +10 -0
- package/package.json +57 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Conference } from "../models/conference";
|
|
2
|
+
export interface ConferencesState {
|
|
3
|
+
conferenceList: Conference[];
|
|
4
|
+
currentConference: null | Conference;
|
|
5
|
+
}
|
|
6
|
+
export declare const useConferencesStore: import("pinia").StoreDefinition<"conferences", ConferencesState, {
|
|
7
|
+
upcomingEvents: (state: ConferencesState) => Conference[];
|
|
8
|
+
pastEvents: (state: ConferencesState) => Conference[];
|
|
9
|
+
getConferenceById: (state: ConferencesState) => (id: number) => any;
|
|
10
|
+
}, {
|
|
11
|
+
getConferences(): Promise<Conference[]>;
|
|
12
|
+
getCurrentConference(): Promise<Conference>;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { findLast, find } from "lodash";
|
|
3
|
+
import { useApi } from "../composables/useApi.mjs";
|
|
4
|
+
import { ConferenceState } from "../models/conference.mjs";
|
|
5
|
+
import { useTemplateConfigsStore } from "./templateConfigs.mjs";
|
|
6
|
+
const currentConferenceQueryString = () => {
|
|
7
|
+
return "affiliates.documents,presenters,days.sponsors,days.tracks.sponsors,days.tracks.presentations.presenters,days.tracks.presentations.sponsors,days.tracks.presentations.documents,days.track_groups.tracks.sponsors,days.track_groups.tracks.presentations.presenters,days.track_groups.tracks.presentations.sponsors,days.track_groups.tracks.presentations.documents,days.groups,days.tracks.groups,groups,template_config";
|
|
8
|
+
};
|
|
9
|
+
export const useConferencesStore = defineStore("conferences", {
|
|
10
|
+
state: () => ({
|
|
11
|
+
conferenceList: [],
|
|
12
|
+
currentConference: null
|
|
13
|
+
}),
|
|
14
|
+
getters: {
|
|
15
|
+
upcomingEvents: (state) => {
|
|
16
|
+
return state.conferenceList.filter((conference) => {
|
|
17
|
+
return conference?.state === ConferenceState.LIVE || conference?.state === ConferenceState.UPCOMING || conference?.state === ConferenceState.MIXED;
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
pastEvents: (state) => {
|
|
21
|
+
return state.conferenceList.filter((conference) => {
|
|
22
|
+
return conference?.state === ConferenceState.ARCHIVED;
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
getConferenceById: (state) => {
|
|
26
|
+
return (id) => {
|
|
27
|
+
return find(state.conferenceList, { id });
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
actions: {
|
|
32
|
+
getConferences() {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
const request = useApi();
|
|
35
|
+
request(
|
|
36
|
+
`conferences?with=template_config&orderBy=start_date&orderDir=asc&filters[state]=${ConferenceState.LIVE},${ConferenceState.ARCHIVED},${ConferenceState.UPCOMING},${ConferenceState.MIXED}`
|
|
37
|
+
).then((response) => {
|
|
38
|
+
this.conferenceList = response.data;
|
|
39
|
+
resolve(this.conferenceList);
|
|
40
|
+
}).catch((error) => {
|
|
41
|
+
reject(error);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
getCurrentConference() {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
const request = useApi();
|
|
48
|
+
let conference = null;
|
|
49
|
+
const liveConference = this.conferenceList.find(
|
|
50
|
+
(conf) => conf.state === ConferenceState.LIVE || conf.state === ConferenceState.MIXED
|
|
51
|
+
);
|
|
52
|
+
const upcomingConference = this.conferenceList.find(
|
|
53
|
+
(conf) => conf.state === ConferenceState.UPCOMING
|
|
54
|
+
);
|
|
55
|
+
if (liveConference !== void 0) {
|
|
56
|
+
conference = liveConference;
|
|
57
|
+
} else if (upcomingConference !== void 0) {
|
|
58
|
+
conference = upcomingConference;
|
|
59
|
+
} else {
|
|
60
|
+
conference = findLast(this.conferenceList, [
|
|
61
|
+
"state",
|
|
62
|
+
ConferenceState.ARCHIVED
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
if (!conference) {
|
|
66
|
+
reject(new Error("could not determine current conference."));
|
|
67
|
+
}
|
|
68
|
+
request(
|
|
69
|
+
`conferences/${conference.id}?with=${currentConferenceQueryString()}`
|
|
70
|
+
).then((response) => {
|
|
71
|
+
const {
|
|
72
|
+
data: { template_config, ...data }
|
|
73
|
+
} = response;
|
|
74
|
+
if (template_config) {
|
|
75
|
+
const templateConfigsStore = useTemplateConfigsStore();
|
|
76
|
+
templateConfigsStore.setCurrentConferenceConfig(
|
|
77
|
+
template_config.config
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
this.currentConference = data;
|
|
81
|
+
resolve(this.currentConference);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NavigationConfig } from "../models/navigationConfig";
|
|
2
|
+
export interface NavigationConfigState {
|
|
3
|
+
data: null | NavigationConfig;
|
|
4
|
+
}
|
|
5
|
+
export declare const useNavigationConfigStore: import("pinia").StoreDefinition<"navigationConfig", NavigationConfigState, {}, {
|
|
6
|
+
setNavigationConfig(payload: any): Promise<NavigationConfigState>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
export const useNavigationConfigStore = defineStore("navigationConfig", {
|
|
3
|
+
state: () => ({
|
|
4
|
+
data: null
|
|
5
|
+
}),
|
|
6
|
+
actions: {
|
|
7
|
+
setNavigationConfig(payload) {
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
this.data = payload.filter((item) => item.enabled);
|
|
10
|
+
resolve(this.data);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Portal } from "../models/portal";
|
|
2
|
+
export interface PortalStoreState {
|
|
3
|
+
data: null | Portal;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
errors: Array<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const usePortalStore: import("pinia").StoreDefinition<"portal", PortalStoreState, {}, {
|
|
8
|
+
getPortal(): Promise<Portal>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { useApi } from "../composables/useApi.mjs";
|
|
3
|
+
import { useTemplateConfigsStore } from "./templateConfigs.mjs";
|
|
4
|
+
import { useNavigationConfigStore } from "./navigationConfig.mjs";
|
|
5
|
+
export const usePortalStore = defineStore("portal", {
|
|
6
|
+
state: () => ({
|
|
7
|
+
data: null,
|
|
8
|
+
loading: false,
|
|
9
|
+
errors: []
|
|
10
|
+
}),
|
|
11
|
+
actions: {
|
|
12
|
+
getPortal() {
|
|
13
|
+
const request = useApi();
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
this.loading = true;
|
|
16
|
+
request(
|
|
17
|
+
"portals/1?fields=id,name,description,favicon,ga_id,gtm_id&with=template_config,navigation_config"
|
|
18
|
+
).then((response) => {
|
|
19
|
+
const {
|
|
20
|
+
data: { navigation_config, template_config, ...data }
|
|
21
|
+
} = response;
|
|
22
|
+
this.data = data;
|
|
23
|
+
useTemplateConfigsStore().setPortalTemplateConfig(
|
|
24
|
+
template_config.config
|
|
25
|
+
);
|
|
26
|
+
useNavigationConfigStore().setNavigationConfig(
|
|
27
|
+
navigation_config.config
|
|
28
|
+
);
|
|
29
|
+
resolve(data);
|
|
30
|
+
}).catch((error) => {
|
|
31
|
+
this.errors = error;
|
|
32
|
+
reject(error);
|
|
33
|
+
}).finally(() => {
|
|
34
|
+
this.loading = false;
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { useApi } from "../composables/useApi.mjs";
|
|
3
|
+
export const useSupportStore = defineStore("support", {
|
|
4
|
+
state: () => ({}),
|
|
5
|
+
actions: {
|
|
6
|
+
submit(params) {
|
|
7
|
+
const request = useApi();
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
request("support-request", {
|
|
10
|
+
method: "POST",
|
|
11
|
+
body: params
|
|
12
|
+
}).then((response) => {
|
|
13
|
+
resolve(response);
|
|
14
|
+
}).catch((errors) => {
|
|
15
|
+
reject(errors);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TemplateConfig } from "../models/templateConfig";
|
|
2
|
+
import { NestedKeyOf, Pages } from "../models/pagesConfig";
|
|
3
|
+
import { GlobalConfigKey, GlobalConfigKeyType } from "../models/globalConfig";
|
|
4
|
+
import { Conference } from "../models/conference";
|
|
5
|
+
export interface TemplateConfigState {
|
|
6
|
+
portalConfig: null | TemplateConfig;
|
|
7
|
+
currentConferenceConfig: null | TemplateConfig;
|
|
8
|
+
conferences: {
|
|
9
|
+
[key: string]: TemplateConfig;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const useTemplateConfigsStore: import("pinia").StoreDefinition<"templateConfigs", TemplateConfigState, {
|
|
13
|
+
globalConfigValue: (state: TemplateConfigState) => (path: GlobalConfigKey, defaultValue?: any) => any;
|
|
14
|
+
globalConfig: (state: TemplateConfigState) => <T extends "accent_color_1" | "accent_color_2" | "accent_color_3" | "affiliate_page_button_alias" | "azure_ad_client_id" | "azure_ad_message" | "azure_ad_tenant_id" | "azure_ad_user_password" | "body_color_1" | "body_color_2" | "body_color_3" | "body_color_4" | "body_color_5" | "body_color_6" | "body_font_1" | "body_font_2" | "button_color_1" | "button_color_2" | "captions_bg_color" | "captions_font" | "captions_text_color" | "conference_photo_headers" | "custom_css" | "enable_peer5" | "enable_text_chat" | "enable_video_chat" | "external_reg_url" | "global_color_1" | "global_color_2" | "global_color_3" | "global_color_4" | "global_color_5" | "global_color_6" | "header_font_1" | "header_font_2" | "header_titles" | "heading_color_1" | "heading_color_2" | "heading_color_3" | "heading_color_4" | "heading_color_5" | "heading_color_6" | "hide_user_profile" | "html_footer" | "html_header" | "link_color" | "link_hover" | "login_disabled_user_email" | "login_disabled_user_password" | "login_process" | "login_redirect_enabled" | "muted_photo_headers" | "nav_color_1" | "nav_color_2" | "nav_color_3" | "nav_color_4" | "nav_color_5" | "paragraph_color_1" | "paragraph_color_2" | "presenter_icon_color_style" | "reg_button_alias" | "reg_button_enabled" | "secure_site_access_enabled" | "townhall_registration_enabled" | "townhall_registration_group" | "view_archive_button_alias" | "view_now_button_alias" | "view_preview_button_alias">(path: T, defaultValue?: any) => GlobalConfigKeyType<T>;
|
|
15
|
+
pagesConfigValue: (state: TemplateConfigState) => (path: NestedKeyOf<Pages>, defaultValue?: any, conferenceId?: number) => any;
|
|
16
|
+
}, {
|
|
17
|
+
setPortalTemplateConfig(payload: any): Promise<TemplateConfig>;
|
|
18
|
+
setCurrentConferenceConfig(conferenceTemplateConfig: any): void;
|
|
19
|
+
setConferenceConfig(conference: Conference): void;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { forEach, forIn, get, find } from "lodash";
|
|
3
|
+
export const useTemplateConfigsStore = defineStore("templateConfigs", {
|
|
4
|
+
state: () => ({
|
|
5
|
+
portalConfig: null,
|
|
6
|
+
currentConferenceConfig: null,
|
|
7
|
+
conferences: {}
|
|
8
|
+
}),
|
|
9
|
+
getters: {
|
|
10
|
+
globalConfigValue: (state) => {
|
|
11
|
+
return (path, defaultValue = null) => {
|
|
12
|
+
return get(state.portalConfig.global, `${path}.value`, defaultValue);
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
globalConfig: (state) => {
|
|
16
|
+
return (path, defaultValue = null) => {
|
|
17
|
+
return get(
|
|
18
|
+
state.portalConfig.global,
|
|
19
|
+
`${path}`,
|
|
20
|
+
defaultValue
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
pagesConfigValue: (state) => {
|
|
25
|
+
return (path, defaultValue = null, conferenceId) => {
|
|
26
|
+
const { currentConference } = useConferencesStore();
|
|
27
|
+
if (conferenceId && conferenceId !== currentConference.id) {
|
|
28
|
+
const conference = find(state.conferences, { id: conferenceId });
|
|
29
|
+
return get(conference, `pages.${path}.value`, defaultValue);
|
|
30
|
+
} else if (state.currentConferenceConfig || conferenceId && state.currentConferenceConfig && conferenceId === currentConference.id) {
|
|
31
|
+
return get(
|
|
32
|
+
state.currentConferenceConfig,
|
|
33
|
+
`pages.${path}.value`,
|
|
34
|
+
defaultValue
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
return get(state.portalConfig, `pages.${path}.value`, defaultValue);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
actions: {
|
|
43
|
+
setPortalTemplateConfig(payload) {
|
|
44
|
+
return new Promise((resolve) => {
|
|
45
|
+
const config = { global: {}, misc: {}, pages: {} };
|
|
46
|
+
forEach(payload.global[0].content, function(value) {
|
|
47
|
+
config.global[value.name] = value;
|
|
48
|
+
});
|
|
49
|
+
forEach(payload.misc[0].content, function(value) {
|
|
50
|
+
config.misc[value.name] = value;
|
|
51
|
+
});
|
|
52
|
+
forEach(payload.pages, function(value) {
|
|
53
|
+
const pageContent = {};
|
|
54
|
+
forEach(value.content, function(value2) {
|
|
55
|
+
pageContent[value2.name] = value2;
|
|
56
|
+
});
|
|
57
|
+
config.pages[value.name] = pageContent;
|
|
58
|
+
});
|
|
59
|
+
this.portalConfig = config;
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
setCurrentConferenceConfig(conferenceTemplateConfig) {
|
|
63
|
+
const newPagesConfig = this.portalConfig.pages;
|
|
64
|
+
const confPagesConfig = {};
|
|
65
|
+
forEach(conferenceTemplateConfig.pages, (page) => {
|
|
66
|
+
const pageContent = {};
|
|
67
|
+
forEach(page.content, function(value) {
|
|
68
|
+
pageContent[value.name] = value;
|
|
69
|
+
});
|
|
70
|
+
confPagesConfig[page.name] = pageContent;
|
|
71
|
+
});
|
|
72
|
+
forIn(newPagesConfig, function(value, key) {
|
|
73
|
+
if (get(confPagesConfig, key)) {
|
|
74
|
+
newPagesConfig[key] = confPagesConfig[key];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
this.currentConferenceConfig = {
|
|
78
|
+
pages: newPagesConfig
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
setConferenceConfig(conference) {
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Analytics } from "./analytics";
|
|
2
|
+
export declare type V3plusCommonPluginOptions = {
|
|
3
|
+
version: string;
|
|
4
|
+
portalHash: string;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type V3plusCommonPlugin = {
|
|
8
|
+
options: V3plusCommonPluginOptions;
|
|
9
|
+
analytics: Analytics;
|
|
10
|
+
};
|
|
11
|
+
export declare const createV3plusCommonPlugin: (options: V3plusCommonPluginOptions) => {
|
|
12
|
+
options: V3plusCommonPluginOptions;
|
|
13
|
+
analytics: Analytics;
|
|
14
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import { ModuleOptions } from './module'
|
|
3
|
+
|
|
4
|
+
declare module '@nuxt/schema' {
|
|
5
|
+
interface NuxtConfig { ['v3plusCommonModule']?: Partial<ModuleOptions> }
|
|
6
|
+
interface NuxtOptions { ['v3plusCommonModule']?: ModuleOptions }
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export { default } from './module'
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@icvdeveloper/common-module",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/module.mjs",
|
|
9
|
+
"require": "./dist/module.cjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/module.cjs",
|
|
13
|
+
"types": "./dist/types.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"prepack": "nuxt-module-build",
|
|
19
|
+
"dev": "nuxi dev playground",
|
|
20
|
+
"dev:build": "nuxi build playground",
|
|
21
|
+
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@analytics/google-analytics": "^1.0.3",
|
|
25
|
+
"@nuxt/kit": "^3.0.0-rc.6",
|
|
26
|
+
"@pinia/nuxt": "^0.3.1",
|
|
27
|
+
"analytics": "^0.8.1",
|
|
28
|
+
"date-fns": "^2.29.1",
|
|
29
|
+
"date-fns-tz": "^1.3.6",
|
|
30
|
+
"lodash": "^4.17.21",
|
|
31
|
+
"nprogress": "^0.2.0",
|
|
32
|
+
"pinia": "^2.0.17",
|
|
33
|
+
"pinia-plugin-persistedstate": "^1.6.3"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@nuxt/module-builder": "latest",
|
|
37
|
+
"@nuxtjs/eslint-config-typescript": "latest",
|
|
38
|
+
"@nuxtjs/tailwindcss": "^5.3.1",
|
|
39
|
+
"@tailwindcss/typography": "^0.5.4",
|
|
40
|
+
"eslint": "latest",
|
|
41
|
+
"eslint-config-prettier": "^8.5.0",
|
|
42
|
+
"nuxt": "^3.0.0-rc.6",
|
|
43
|
+
"sass": "^1.54.2",
|
|
44
|
+
"sass-loader": "^13.0.2",
|
|
45
|
+
"vite-svg-loader": "^3.4.0"
|
|
46
|
+
},
|
|
47
|
+
"description": "## Development",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/ICVDM/v3plus-common.git"
|
|
51
|
+
},
|
|
52
|
+
"author": "",
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/ICVDM/v3plus-common/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/ICVDM/v3plus-common#readme"
|
|
57
|
+
}
|