@maas/vue-equipment 0.10.2 → 0.10.3

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.10.1"
4
+ "version": "0.10.2"
5
5
  }
@@ -12,6 +12,7 @@ export default defineNuxtModule({
12
12
  setup(_options, nuxt) {
13
13
  const resolver = createResolver(import.meta.url);
14
14
  nuxt.options.build.transpile.push("universal-cookie");
15
+ nuxt.options.build.transpile.push("@vueuse/integrations/useCookies");
15
16
  extendViteConfig((config) => {
16
17
  config.optimizeDeps = config.optimizeDeps || {};
17
18
  config.optimizeDeps.include = config.optimizeDeps.include || [];
@@ -3,20 +3,20 @@ import { useCookies } from "@vueuse/integrations/useCookies";
3
3
  import { toValue } from "@vueuse/core";
4
4
  import { globalApiState } from "./private/defineConsentApi.mjs";
5
5
  import { useConsentEmitter } from "./useConsentEmitter.mjs";
6
- const universalCookies = useCookies(["cookie_consent"]);
7
6
  const preferencesVisible = ref(false);
8
7
  const selectedCookies = ref({});
9
- const cookieConsentData = computed({
10
- get: () => {
11
- return universalCookies.get("cookie_consent");
12
- },
13
- set: (value) => {
14
- universalCookies.set("cookie_consent", value, {
15
- maxAge: globalApiState.value?.maxAge
16
- });
17
- }
18
- });
19
8
  export function useConsentApi() {
9
+ const universalCookies = useCookies(["cookie_consent"]);
10
+ const cookieConsentData = computed({
11
+ get: () => {
12
+ return universalCookies.get("cookie_consent");
13
+ },
14
+ set: (value) => {
15
+ universalCookies.set("cookie_consent", value, {
16
+ maxAge: globalApiState.value?.maxAge
17
+ });
18
+ }
19
+ });
20
20
  const emitter = useConsentEmitter();
21
21
  selectedCookies.value = cookieConsentData.value?.cookies || {};
22
22
  function toggleSelection(key) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "A magic collection of Vue composables, plugins, components and directives",
4
- "version": "0.10.2",
4
+ "version": "0.10.3",
5
5
  "author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
6
6
  "devDependencies": {
7
7
  "@antfu/ni": "^0.21.5",