@dargmuesli/nuxt-cookie-control 7.4.1 → 7.5.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/README.md +2 -1
- package/dist/module.d.mts +1 -0
- package/dist/module.d.ts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/CookieControl.vue +5 -3
- package/dist/runtime/plugin.mjs +1 -1
- package/dist/runtime/types.d.ts +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -208,6 +208,7 @@ Every property that includes a `{ en: ... }` value is a translatable property th
|
|
|
208
208
|
},
|
|
209
209
|
id: 'p', // if unset, `getCookieId(cookie)` returns the cookie's slugified name instead, which e.g. is used to fill the state's `enabledCookieIds` list
|
|
210
210
|
// use a short cookie id to save bandwidth!
|
|
211
|
+
isPreselected: false // `true` is not GDPR compliant! This flag does not enable any cookies, it only preselects the cookie's modal toggle. The default is `false`.
|
|
211
212
|
name: {
|
|
212
213
|
en: 'Preferences' // you always have to specify a cookie name (in English)
|
|
213
214
|
},
|
|
@@ -216,7 +217,7 @@ Every property that includes a `{ en: ... }` value is a translatable property th
|
|
|
216
217
|
'https://example.com/terms': 'Terms of Service',
|
|
217
218
|
},
|
|
218
219
|
src: 'https://example.com/preferences/js?id=<API-KEY>',
|
|
219
|
-
targetCookieIds: ['xmpl_a', 'xmpl_b']
|
|
220
|
+
targetCookieIds: ['xmpl_a', 'xmpl_b'],
|
|
220
221
|
}
|
|
221
222
|
```
|
|
222
223
|
|
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
3
3
|
import { createResolver, defineNuxtModule, addPlugin, addImports, addTemplate, extendWebpackConfig, extendViteConfig, resolvePath } from '@nuxt/kit';
|
|
4
4
|
|
|
5
5
|
const name = "@dargmuesli/nuxt-cookie-control";
|
|
6
|
-
const version = "7.
|
|
6
|
+
const version = "7.5.0";
|
|
7
7
|
|
|
8
8
|
const en = {
|
|
9
9
|
accept: "Accept",
|
|
@@ -94,9 +94,11 @@
|
|
|
94
94
|
:id="resolveTranslatable(cookie.name, props.locale)"
|
|
95
95
|
type="checkbox"
|
|
96
96
|
:checked="
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
isConsentGiven === undefined
|
|
98
|
+
? cookie.isPreselected
|
|
99
|
+
: getCookieIds(localCookiesEnabled).includes(
|
|
100
|
+
getCookieId(cookie),
|
|
101
|
+
)
|
|
100
102
|
"
|
|
101
103
|
@change="toogleCookie(cookie)"
|
|
102
104
|
/>
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const plugin = defineNuxtPlugin((_nuxtApp) => {
|
|
|
12
12
|
moduleOptions.cookieOptions
|
|
13
13
|
).value?.split("|");
|
|
14
14
|
const isConsentGiven = ref(
|
|
15
|
-
cookieIsConsentGiven === void 0 ? void 0 : cookieIsConsentGiven.value === getAllCookieIdsString(moduleOptions)
|
|
15
|
+
cookieIsConsentGiven.value === void 0 ? void 0 : cookieIsConsentGiven.value === getAllCookieIdsString(moduleOptions)
|
|
16
16
|
);
|
|
17
17
|
const cookiesEnabled = ref(
|
|
18
18
|
cookieCookiesEnabledIds === void 0 ? void 0 : [
|
package/dist/runtime/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"lint-staged": "15.2.2",
|
|
25
25
|
"nuxt": "3.11.1",
|
|
26
26
|
"prettier": "3.2.5",
|
|
27
|
-
"typescript": "5.4.
|
|
27
|
+
"typescript": "5.4.3",
|
|
28
28
|
"vue": "3.4.21",
|
|
29
|
-
"vue-tsc": "2.0.
|
|
30
|
-
"webpack": "5.
|
|
29
|
+
"vue-tsc": "2.0.7",
|
|
30
|
+
"webpack": "5.91.0"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=16"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
},
|
|
80
80
|
"type": "module",
|
|
81
81
|
"types": "./dist/module.d.ts",
|
|
82
|
-
"version": "7.
|
|
82
|
+
"version": "7.5.0"
|
|
83
83
|
}
|