@icvdeveloper/common-module 0.0.3 → 0.0.5

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/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.0.3"
7
+ "version": "0.0.5"
8
8
  }
package/dist/module.mjs CHANGED
@@ -26,6 +26,9 @@ const module = defineNuxtModule({
26
26
  },
27
27
  async setup(options, nuxt) {
28
28
  const logger = useLogger();
29
+ if (nuxt.options.ssr) {
30
+ throw new Error("V3plusCommonModule does not support SSR");
31
+ }
29
32
  if (!options.portalHash) {
30
33
  throw new Error(
31
34
  "v3plusCommonModule.portalHash is not set in nuxt.config.ts"
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { find } from "lodash";
2
+ import { find } from "lodash-es";
3
3
  import { Sponsor as SponsorModel } from "../../../models/conference";
4
4
 
5
5
  type Props = {
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { find, get } from "lodash";
2
+ import { find, get } from "lodash-es";
3
3
  import { defineAsyncComponent } from "vue";
4
4
  import { Icon, Icons } from "../../models/icons";
5
5
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { get } from "lodash";
2
+ import { get } from "lodash-es";
3
3
 
4
4
  const form = ref({
5
5
  name: "",
@@ -1,4 +1,4 @@
1
- import { get, remove, cloneDeep, intersectionBy, pullAllBy } from "lodash";
1
+ import { get, remove, cloneDeep, intersectionBy, pullAllBy } from "lodash-es";
2
2
  import { storeToRefs } from "pinia";
3
3
  import { differenceInSeconds } from "date-fns";
4
4
  import { useAffiliatesStore } from "../store/affiliates.mjs";
@@ -1,5 +1,5 @@
1
1
  import { format } from "date-fns";
2
- import { get, find } from "lodash";
2
+ import { get, find } from "lodash-es";
3
3
  import { storeToRefs } from "pinia";
4
4
  import { ConferenceState } from "../models/conference.mjs";
5
5
  import { useDateFormat } from "./useDateFormat.mjs";
@@ -1,4 +1,4 @@
1
- import { sortBy } from "lodash";
1
+ import { sortBy } from "lodash-es";
2
2
  export const usePresenters = (conference) => {
3
3
  const { pagesConfigValue } = useTemplateConfigsStore();
4
4
  const getPresentersLabel = (numberOfPresenters) => {
@@ -12,20 +12,26 @@ export default defineNuxtPlugin((nuxtApp) => {
12
12
  });
13
13
  nuxtApp.hook("app:created", (app) => {
14
14
  const { data } = storeToRefs(usePortalStore());
15
- app.config.globalProperties.$head.addHeadObjs(
16
- computed(() => {
17
- return {
18
- title: data.value.name,
19
- link: [
20
- {
21
- rel: "icon",
22
- type: "image/x-icon",
23
- href: data.value.favicon
24
- }
25
- ]
26
- };
27
- })
28
- );
15
+ if (data.value) {
16
+ app.config.globalProperties.$head.addHeadObjs(
17
+ computed(() => {
18
+ return {
19
+ title: data.value.name,
20
+ link: [
21
+ {
22
+ rel: "icon",
23
+ type: "image/x-icon",
24
+ href: data.value.favicon
25
+ }
26
+ ]
27
+ };
28
+ })
29
+ );
30
+ } else {
31
+ console.warn(
32
+ "[V3Plus Common Module]: Portal has not been fetched. Could not set Meta Data"
33
+ );
34
+ }
29
35
  });
30
36
  return {
31
37
  provide: {
@@ -1,5 +1,5 @@
1
1
  import { defineStore } from "pinia";
2
- import { findLast, find } from "lodash";
2
+ import { findLast, find } 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";
@@ -1,5 +1,5 @@
1
1
  import { defineStore } from "pinia";
2
- import { forEach, forIn, get, find } from "lodash";
2
+ import { forEach, forIn, get, find } from "lodash-es";
3
3
  export const useTemplateConfigsStore = defineStore("templateConfigs", {
4
4
  state: () => ({
5
5
  portalConfig: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icvdeveloper/common-module",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,7 +9,7 @@
9
9
  "require": "./dist/module.cjs"
10
10
  }
11
11
  },
12
- "main": "./dist/module.cjs",
12
+ "main": "./dist/module.mjs",
13
13
  "types": "./dist/types.d.ts",
14
14
  "files": [
15
15
  "dist"
@@ -23,18 +23,18 @@
23
23
  "dependencies": {
24
24
  "@analytics/google-analytics": "^1.0.3",
25
25
  "@nuxt/kit": "^3.0.0-rc.6",
26
+ "@nuxtjs/tailwindcss": "^5.3.1",
26
27
  "@pinia/nuxt": "^0.3.1",
27
28
  "analytics": "^0.8.1",
28
29
  "date-fns": "^2.29.1",
29
30
  "date-fns-tz": "^1.3.6",
30
- "lodash": "^4.17.21",
31
+ "lodash-es": "^4.17.21",
31
32
  "nprogress": "^0.2.0",
32
33
  "pinia": "^2.0.17",
33
34
  "pinia-plugin-persistedstate": "^1.6.3",
34
- "@nuxtjs/tailwindcss": "^5.3.1",
35
- "vite-svg-loader": "^3.4.0",
36
35
  "sass": "^1.54.2",
37
- "sass-loader": "^13.0.2"
36
+ "sass-loader": "^13.0.2",
37
+ "vite-svg-loader": "^3.4.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@nuxt/module-builder": "latest",