@icvdeveloper/common-module 2.2.3 → 2.3.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 +11 -3
- package/dist/runtime/assets/{scss → postcss}/_forms.css +1 -1
- package/dist/runtime/assets/{scss → postcss}/_transitions.css +1 -1
- package/dist/runtime/plugin.mjs +14 -7
- package/dist/runtime/store/conferences.d.ts +2 -0
- package/dist/runtime/store/conferences.mjs +24 -2
- package/dist/runtime/store/portal.mjs +1 -1
- package/package.json +1 -1
- /package/dist/runtime/assets/{scss → postcss}/_agenda.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_animations.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_container_variants.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_custom.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_footer.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_header.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_index_production.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_variables.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_variables2.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/_webcast.css +0 -0
- /package/dist/runtime/assets/{scss → postcss}/index.css +0 -0
package/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { join, resolve } from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { defineNuxtModule, useLogger, installModule, addPlugin, addImportsDir, addComponentsDir } from '@nuxt/kit';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
4
5
|
import svgLoader from 'vite-svg-loader';
|
|
5
6
|
|
|
6
7
|
|
|
@@ -68,7 +69,7 @@ const module = defineNuxtModule({
|
|
|
68
69
|
content: [join(runtimeDir, "components/**/*.{vue,js,ts}")]
|
|
69
70
|
};
|
|
70
71
|
await installModule("@nuxtjs/tailwindcss", tailwindConfig);
|
|
71
|
-
logger.success("
|
|
72
|
+
logger.success("TailwindCSS installed!");
|
|
72
73
|
} else {
|
|
73
74
|
throw new Error("Remove @nuxtjs/tailwindcss from nuxt.config.ts");
|
|
74
75
|
}
|
|
@@ -82,8 +83,15 @@ const module = defineNuxtModule({
|
|
|
82
83
|
nuxt.options.build.transpile.push(runtimeDir);
|
|
83
84
|
addPlugin(resolve(runtimeDir, "plugin"));
|
|
84
85
|
nuxt.options.css.push(resolve("node_modules/nprogress/nprogress.css"));
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
const parentCSSVars = resolve(nuxt.options.rootDir, "assets/postcss/_variables2.css");
|
|
87
|
+
logger.info("compiling module CSS...");
|
|
88
|
+
nuxt.options.css.push(resolve(join(runtimeDir, "assets/postcss/index.css")));
|
|
89
|
+
if (existsSync(parentCSSVars)) {
|
|
90
|
+
logger.info("overriding default CSS vars with parent project's...");
|
|
91
|
+
nuxt.options.css.push(parentCSSVars);
|
|
92
|
+
} else {
|
|
93
|
+
logger.info("no parent CSS vars detected, skipping...");
|
|
94
|
+
}
|
|
87
95
|
nuxt.options.nitro.publicAssets = [{
|
|
88
96
|
dir: resolve(resolve(join(runtimeDir, "assets/css"))),
|
|
89
97
|
baseURL: "/public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-input{@apply border rounded w-full py-2 px-3 text-gray-600 leading-tight}.form-input:focus{@apply outline-none shadow}.select-input{@apply border rounded w-full text-gray-600 leading-tight py-1 px-2 h-auto}.select-input:focus{@apply outline-none}.btn{@apply button-color-1 text-white tracking-wider font-bold uppercase py-2 px-4 rounded}.btn:hover{@apply button-color-1-darker}.btn-secondary{@apply text-white button-color-2}.btn-secondary:hover{@apply button-color-2-darker}
|
|
1
|
+
.form-input{@apply border rounded w-full py-2 px-3 text-gray-600 leading-tight}.form-input:focus{@apply outline-none shadow}.select-input{@apply border rounded w-full text-gray-600 leading-tight py-1 px-2 h-auto}.select-input:focus{@apply outline-none}.btn{@apply button-color-1 text-white tracking-wider font-bold uppercase py-2 px-4 rounded}.btn:hover{@apply button-color-1-darker}.btn-secondary{@apply text-white button-color-2}.btn-secondary:hover{@apply button-color-2-darker}.max-form-width{max-width:50ch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.page-enter-active,.page-leave-active{transition:opacity .25s}.page-enter,.page-leave-to{opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.slide-fade-enter-active{transition:all .3s ease}.slide-fade-leave-active{transition:all .3s cubic-bezier(1,.5,.8,1)}.slide-fade-enter,.slide-fade-leave-to{opacity:0;transform:translateY(-100px)}
|
|
1
|
+
.page-enter-active,.page-leave-active{transition:opacity .25s}.page-enter,.page-leave-to{opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.slide-fade-enter-active{transition:all .3s ease}.slide-fade-leave-active{transition:all .3s cubic-bezier(1,.5,.8,1)}.slide-fade-enter,.slide-fade-leave-to{opacity:0;transform:translateY(-100px)}.modal-fade-enter,.modal-fade-leave-active{opacity:0}.modal-fade-enter-active,.modal-fade-leave-active{transition:opacity .3s ease}
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -37,20 +37,27 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
37
37
|
let docTitle = "";
|
|
38
38
|
const routeName = to.name;
|
|
39
39
|
const routeArray = routeName.toLowerCase().split("-");
|
|
40
|
+
const isRedirectPage = routeName.includes("events-id") && to.params.id == "redirect";
|
|
41
|
+
const isStreamTest = routeName == "stream-test";
|
|
42
|
+
let skipCurrentConf = false;
|
|
40
43
|
if (portal.value === null) {
|
|
41
44
|
Promise.all([
|
|
42
45
|
// fetch portal config then increment loading indicator
|
|
43
46
|
await portalStore.getPortal().then(() => {
|
|
47
|
+
skipCurrentConf = portal.value.template_id == 7 && !isRedirectPage && !isStreamTest;
|
|
44
48
|
docTitle = portal.value.name;
|
|
45
49
|
NProgress.inc();
|
|
46
|
-
})
|
|
47
|
-
// wait for portal config request to complete, then fetch conferences
|
|
48
|
-
await conferencesStore.getConferences().then(() => NProgress.inc()),
|
|
49
|
-
// wait for get conferences to complete, then get current conference data.
|
|
50
|
-
await conferencesStore.getCurrentConference(true).then(() => NProgress.inc())
|
|
50
|
+
})
|
|
51
51
|
]);
|
|
52
|
+
if (!skipCurrentConf) {
|
|
53
|
+
Promise.all([
|
|
54
|
+
await conferencesStore.getConferences().then(() => NProgress.inc()),
|
|
55
|
+
// wait for get conferences to complete, then get current conference data.
|
|
56
|
+
await conferencesStore.getCurrentConference(true).then(() => NProgress.inc())
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
52
59
|
}
|
|
53
|
-
if (
|
|
60
|
+
if (isRedirectPage) {
|
|
54
61
|
let matchedConfs = conferencesStore.conferenceList;
|
|
55
62
|
if (to.query.custom1) {
|
|
56
63
|
matchedConfs = conferencesStore.searchConferenceAffiliatesCustom1(to.query.custom1);
|
|
@@ -134,7 +141,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
134
141
|
metaDesc = get(portal.value, "social_description");
|
|
135
142
|
}
|
|
136
143
|
if (get(conferencesStore, "selectedConference.photo.length", 0) > 0) {
|
|
137
|
-
socialImage = get(conferencesStore, "selectedConference.photo");
|
|
144
|
+
socialImage = get(conferencesStore, "selectedConference.photo", "");
|
|
138
145
|
} else if (get(portal.value, "social_photo.length", 0) > 0) {
|
|
139
146
|
socialImage = get(portal.value, "social_photo");
|
|
140
147
|
}
|
|
@@ -4,6 +4,7 @@ export interface ConferencesState {
|
|
|
4
4
|
currentConference: null | Conference;
|
|
5
5
|
selectedConference: null | Conference;
|
|
6
6
|
featuredConference: null | Conference;
|
|
7
|
+
liveConference: null | Conference;
|
|
7
8
|
}
|
|
8
9
|
export declare const useConferencesStore: import("pinia").StoreDefinition<"conferences", ConferencesState, {
|
|
9
10
|
upcomingEvents: (state: ConferencesState) => Conference[];
|
|
@@ -12,6 +13,7 @@ export declare const useConferencesStore: import("pinia").StoreDefinition<"confe
|
|
|
12
13
|
getConferences(): Promise<Conference[]>;
|
|
13
14
|
searchConferenceAffiliatesCustom1(code: string): Conference[];
|
|
14
15
|
getSelectedConference(id: number, skipDetails?: boolean): Promise<Conference>;
|
|
16
|
+
getLiveConference(): Promise<Conference>;
|
|
15
17
|
getCurrentConference(skipDetails?: boolean): Promise<Conference>;
|
|
16
18
|
getRegisteredConferences(): Conference[];
|
|
17
19
|
updateConferencesAccess(userConferences: Conference[]): void;
|
|
@@ -11,7 +11,8 @@ export const useConferencesStore = defineStore("conferences", {
|
|
|
11
11
|
conferenceList: [],
|
|
12
12
|
currentConference: null,
|
|
13
13
|
selectedConference: null,
|
|
14
|
-
featuredConference: null
|
|
14
|
+
featuredConference: null,
|
|
15
|
+
liveConference: null
|
|
15
16
|
}),
|
|
16
17
|
getters: {
|
|
17
18
|
upcomingEvents: (state) => {
|
|
@@ -67,9 +68,29 @@ export const useConferencesStore = defineStore("conferences", {
|
|
|
67
68
|
});
|
|
68
69
|
});
|
|
69
70
|
},
|
|
71
|
+
getLiveConference() {
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
if (this.currentConference !== null) {
|
|
74
|
+
if (this.currentConference.state.toLowerCase() == "live") {
|
|
75
|
+
this.liveConference = this.currentConference;
|
|
76
|
+
resolve(this.liveConference);
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
let url = `conferences?filters[state]=live&page=1&pageSize=1&orderBy=start_date&orderDir=asc`;
|
|
80
|
+
const request = useApi();
|
|
81
|
+
request(url).then((response) => {
|
|
82
|
+
if (get(response, "data.length", 0) > 0) {
|
|
83
|
+
this.liveConference = response.data[0];
|
|
84
|
+
resolve(this.liveConference);
|
|
85
|
+
}
|
|
86
|
+
}).catch((error) => {
|
|
87
|
+
reject(error);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
},
|
|
70
92
|
getCurrentConference(skipDetails) {
|
|
71
93
|
return new Promise((resolve, reject) => {
|
|
72
|
-
const request = useApi();
|
|
73
94
|
let conference;
|
|
74
95
|
const liveConference = this.conferenceList.find(
|
|
75
96
|
(conf) => conf.state === ConferenceState.LIVE || conf.state === ConferenceState.MIXED
|
|
@@ -96,6 +117,7 @@ export const useConferencesStore = defineStore("conferences", {
|
|
|
96
117
|
this.currentConference = conference;
|
|
97
118
|
resolve(this.currentConference);
|
|
98
119
|
} else {
|
|
120
|
+
const request = useApi();
|
|
99
121
|
request(
|
|
100
122
|
`conferences/${conference.id}?with=${conferenceDetailsQueryString()}`
|
|
101
123
|
).then((response) => {
|
|
@@ -14,7 +14,7 @@ export const usePortalStore = defineStore("portal", {
|
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
15
|
this.loading = true;
|
|
16
16
|
request(
|
|
17
|
-
"portals/1?fields=id,name,description,domain,favicon,ga_id,gtm_id,adobe_launch_url,social_title,social_description,social_photo&with=template_config,navigation_config"
|
|
17
|
+
"portals/1?fields=template_id,id,name,description,domain,favicon,ga_id,gtm_id,adobe_launch_url,social_title,social_description,social_photo&with=template_config,navigation_config,brand_codes_active"
|
|
18
18
|
).then((response) => {
|
|
19
19
|
const {
|
|
20
20
|
data: { navigation_config, template_config, ...data }
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|