@dargmuesli/nuxt-cookie-control 3.0.0-beta.3 → 3.0.0-beta.4

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 CHANGED
@@ -154,6 +154,9 @@ isAcceptNecessaryButtonEnabled: true
154
154
  // Switch to toggle the button that opens the configuration modal.
155
155
  isControlButtonEnabled: true,
156
156
 
157
+ // Switch to toggle the concatenation of target cookie ids to the cookie description.
158
+ isCookieIdVisible: false,
159
+
157
160
  // Switch to toggle the inclusion of this module's css.
158
161
  // If css is set to false, you will still be able to access your color variables.
159
162
  isCssEnabled: true,
package/dist/module.d.ts CHANGED
@@ -39,6 +39,7 @@ interface ModuleOptions {
39
39
  cookieNameCookiesEnabledIds: string;
40
40
  isAcceptNecessaryButtonEnabled?: boolean;
41
41
  isControlButtonEnabled?: boolean;
42
+ isCookieIdVisible?: boolean;
42
43
  isCssEnabled?: boolean;
43
44
  isCssPolyfillEnabled?: boolean;
44
45
  isDashInDescriptionEnabled?: boolean;
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.4",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { resolve } from 'node:path';
2
2
  import { createResolver, defineNuxtModule, addPlugin, addImports, addTemplate, extendWebpackConfig, resolvePath } from '@nuxt/kit';
3
3
 
4
4
  const name = "@dargmuesli/nuxt-cookie-control";
5
- const version = "3.0.0-beta.3";
5
+ const version = "3.0.0-beta.4";
6
6
 
7
7
  const en = {
8
8
  acceptAll: "Accept all",
@@ -60,6 +60,7 @@ const DEFAULTS = {
60
60
  cookieNameCookiesEnabledIds: "cookie_control_cookies_enabled_ids",
61
61
  isAcceptNecessaryButtonEnabled: true,
62
62
  isControlButtonEnabled: true,
63
+ isCookieIdVisible: false,
63
64
  isCssEnabled: true,
64
65
  isCssPolyfillEnabled: true,
65
66
  isDashInDescriptionEnabled: true,
@@ -103,7 +103,12 @@
103
103
  <span v-if="cookie.description">
104
104
  {{ getDescription(cookie.description) }}
105
105
  </span>
106
- <span v-if="cookie.targetCookieIds">
106
+ <span
107
+ v-if="
108
+ moduleOptions.isCookieIdVisible &&
109
+ cookie.targetCookieIds
110
+ "
111
+ >
107
112
  {{
108
113
  ' IDs: ' +
109
114
  cookie.targetCookieIds
@@ -305,6 +310,8 @@ onBeforeMount(async () => {
305
310
  watch(
306
311
  () => cookiesEnabled.value,
307
312
  (current, _previous) => {
313
+ localCookiesEnabled.value = [...(current || [])]
314
+
308
315
  if (isConsentGiven.value) {
309
316
  Cookies.set(
310
317
  moduleOptions.cookieNameCookiesEnabledIds,
@@ -42,6 +42,7 @@ export interface ModuleOptions {
42
42
  cookieNameCookiesEnabledIds: string;
43
43
  isAcceptNecessaryButtonEnabled?: boolean;
44
44
  isControlButtonEnabled?: boolean;
45
+ isCookieIdVisible?: boolean;
45
46
  isCssEnabled?: boolean;
46
47
  isCssPolyfillEnabled?: boolean;
47
48
  isDashInDescriptionEnabled?: boolean;
@@ -42,6 +42,7 @@ export const DEFAULTS = {
42
42
  cookieNameCookiesEnabledIds: "cookie_control_cookies_enabled_ids",
43
43
  isAcceptNecessaryButtonEnabled: true,
44
44
  isControlButtonEnabled: true,
45
+ isCookieIdVisible: false,
45
46
  isCssEnabled: true,
46
47
  isCssPolyfillEnabled: true,
47
48
  isDashInDescriptionEnabled: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Nuxt Cookies Control Module",
5
5
  "author": "Dario Ferderber <dario.ferderber@broj42.com>",
6
6
  "maintainers": [