@dargmuesli/nuxt-cookie-control 8.0.0-beta.3 → 8.0.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 +15 -6
- 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
|
en: 'This cookie stores preferences.'
|
|
209
209
|
},
|
|
210
210
|
id: 'p', // use a short cookie id to save bandwidth and prefixes to separate
|
|
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 = "8.0.0
|
|
6
|
+
const version = "8.0.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
|
-
cookie.
|
|
99
|
-
|
|
97
|
+
isConsentGiven === undefined
|
|
98
|
+
? cookie.isPreselected
|
|
99
|
+
: getCookieIds(localCookiesEnabled).includes(
|
|
100
|
+
cookie.id,
|
|
101
|
+
)
|
|
100
102
|
"
|
|
101
103
|
@change="toogleCookie(cookie)"
|
|
102
104
|
/>
|
|
@@ -139,9 +141,16 @@
|
|
|
139
141
|
:key="entry[0]"
|
|
140
142
|
>
|
|
141
143
|
<br />
|
|
142
|
-
<
|
|
143
|
-
entry[
|
|
144
|
-
|
|
144
|
+
<NuxtLink
|
|
145
|
+
:to="entry[0]"
|
|
146
|
+
@click="
|
|
147
|
+
!entry[0].toLowerCase().startsWith('http')
|
|
148
|
+
? (isModalActive = false)
|
|
149
|
+
: null
|
|
150
|
+
"
|
|
151
|
+
>
|
|
152
|
+
{{ entry[1] || entry[0] }}
|
|
153
|
+
</NuxtLink>
|
|
145
154
|
</span>
|
|
146
155
|
</template>
|
|
147
156
|
</label>
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const plugin = defineNuxtPlugin((_nuxtApp) => {
|
|
|
13
13
|
moduleOptions.cookieOptions
|
|
14
14
|
).value?.split(COOKIE_ID_SEPARATOR);
|
|
15
15
|
const isConsentGiven = ref(
|
|
16
|
-
cookieIsConsentGiven === void 0 ? void 0 : cookieIsConsentGiven.value === getAllCookieIdsString(moduleOptions)
|
|
16
|
+
cookieIsConsentGiven.value === void 0 ? void 0 : cookieIsConsentGiven.value === getAllCookieIdsString(moduleOptions)
|
|
17
17
|
);
|
|
18
18
|
const cookiesEnabled = ref(
|
|
19
19
|
cookieCookiesEnabledIds === void 0 ? void 0 : [
|
package/dist/runtime/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"lint-staged": "15.2.2",
|
|
24
24
|
"nuxt": "3.11.1",
|
|
25
25
|
"prettier": "3.2.5",
|
|
26
|
-
"typescript": "5.4.
|
|
26
|
+
"typescript": "5.4.3",
|
|
27
27
|
"vue": "3.4.21",
|
|
28
|
-
"vue-tsc": "2.0.
|
|
29
|
-
"webpack": "5.
|
|
28
|
+
"vue-tsc": "2.0.7",
|
|
29
|
+
"webpack": "5.91.0"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=16"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
},
|
|
80
80
|
"type": "module",
|
|
81
81
|
"types": "./dist/module.d.ts",
|
|
82
|
-
"version": "8.0.0
|
|
82
|
+
"version": "8.0.0"
|
|
83
83
|
}
|