@dargmuesli/nuxt-cookie-control 8.4.7 → 8.4.8

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
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "8.4.7",
3
+ "version": "8.4.8",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
8
8
  "builder": {
9
- "@nuxt/module-builder": "0.8.1",
9
+ "@nuxt/module-builder": "0.8.3",
10
10
  "unbuild": "unknown"
11
11
  }
12
12
  }
package/dist/module.mjs CHANGED
@@ -122,7 +122,7 @@ const DEFAULTS = {
122
122
  };
123
123
 
124
124
  const name = "@dargmuesli/nuxt-cookie-control";
125
- const version = "8.4.7";
125
+ const version = "8.4.8";
126
126
 
127
127
  const resolver = createResolver(import.meta.url);
128
128
  const runtimeDir = resolver.resolve("./runtime");
@@ -1,201 +1,197 @@
1
1
  <template>
2
- <client-only>
3
- <aside class="cookieControl">
4
- <transition :name="`cookieControl__Bar--${moduleOptions.barPosition}`">
5
- <div
6
- v-if="!isConsentGiven && !moduleOptions.isModalForced"
7
- :class="`cookieControl__Bar cookieControl__Bar--${moduleOptions.barPosition}`"
8
- >
9
- <div class="cookieControl__BarContainer">
10
- <div>
11
- <slot name="bar">
12
- <h2 v-text="localeStrings?.bannerTitle" />
13
- <p v-text="localeStrings?.bannerDescription" />
14
- </slot>
15
- </div>
16
- <div class="cookieControl__BarButtons">
17
- <button @click="accept()" v-text="localeStrings?.accept" />
18
- <button
19
- v-if="moduleOptions.isAcceptNecessaryButtonEnabled"
20
- @click="decline()"
21
- v-text="localeStrings?.decline"
22
- />
23
- <button
24
- @click="isModalActive = true"
25
- v-text="localeStrings?.manageCookies"
26
- />
27
- </div>
2
+ <aside class="cookieControl">
3
+ <transition :name="`cookieControl__Bar--${moduleOptions.barPosition}`">
4
+ <div
5
+ v-if="!isConsentGiven && !moduleOptions.isModalForced"
6
+ :class="`cookieControl__Bar cookieControl__Bar--${moduleOptions.barPosition}`"
7
+ >
8
+ <div class="cookieControl__BarContainer">
9
+ <div>
10
+ <slot name="bar">
11
+ <h2 v-text="localeStrings?.bannerTitle" />
12
+ <p v-text="localeStrings?.bannerDescription" />
13
+ </slot>
14
+ </div>
15
+ <div class="cookieControl__BarButtons">
16
+ <button @click="accept()" v-text="localeStrings?.accept" />
17
+ <button
18
+ v-if="moduleOptions.isAcceptNecessaryButtonEnabled"
19
+ @click="decline()"
20
+ v-text="localeStrings?.decline"
21
+ />
22
+ <button
23
+ @click="isModalActive = true"
24
+ v-text="localeStrings?.manageCookies"
25
+ />
28
26
  </div>
29
27
  </div>
30
- </transition>
31
- <button
32
- v-if="moduleOptions.isControlButtonEnabled && isConsentGiven"
33
- aria-label="Cookie control"
34
- class="cookieControl__ControlButton"
35
- data-testid="nuxt-cookie-control-control-button"
36
- @click="isModalActive = true"
28
+ </div>
29
+ </transition>
30
+ <button
31
+ v-if="moduleOptions.isControlButtonEnabled && isConsentGiven"
32
+ aria-label="Cookie control"
33
+ class="cookieControl__ControlButton"
34
+ data-testid="nuxt-cookie-control-control-button"
35
+ @click="isModalActive = true"
36
+ >
37
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
38
+ <path
39
+ fill="currentColor"
40
+ d="M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 00-57.79 57.81l-35.1 68.88a132.645 132.645 0 00-12.82 80.95l12.08 76.27a132.521 132.521 0 0037.16 72.96l54.77 54.76a132.036 132.036 0 0072.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0057.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"
41
+ />
42
+ </svg>
43
+ </button>
44
+ <transition name="cookieControl__Modal">
45
+ <div
46
+ v-if="isModalActive"
47
+ class="cookieControl__Modal"
48
+ @click.self="onModalClick"
37
49
  >
38
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
39
- <path
40
- fill="currentColor"
41
- d="M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 00-57.79 57.81l-35.1 68.88a132.645 132.645 0 00-12.82 80.95l12.08 76.27a132.521 132.521 0 0037.16 72.96l54.77 54.76a132.036 132.036 0 0072.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0057.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"
42
- />
43
- </svg>
44
- </button>
45
- <transition name="cookieControl__Modal">
46
- <div
47
- v-if="isModalActive"
48
- class="cookieControl__Modal"
49
- @click.self="onModalClick"
50
- >
51
- <p
52
- v-if="isSaved"
53
- class="cookieControl__ModalUnsaved"
54
- v-text="localeStrings?.settingsUnsaved"
55
- />
56
- <div class="cookieControl__ModalContent">
57
- <div class="cookieControl__ModalContentInner">
58
- <slot name="modal" />
59
- <button
60
- v-if="!moduleOptions.isModalForced"
61
- class="cookieControl__ModalClose"
62
- @click="isModalActive = false"
63
- v-text="localeStrings?.close"
64
- />
65
- <template v-for="cookieType in CookieType" :key="cookieType">
66
- <template v-if="moduleOptions.cookies[cookieType].length">
67
- <h2
68
- v-text="
69
- localeStrings &&
70
- (cookieType === CookieType.NECESSARY
71
- ? localeStrings.cookiesNecessary
72
- : localeStrings.cookiesOptional)
73
- "
74
- />
75
- <ul>
76
- <li
77
- v-for="cookie in moduleOptions.cookies[cookieType]"
78
- :key="cookie.id"
79
- >
80
- <slot name="cookie" v-bind="{ cookie }">
81
- <div class="cookieControl__ModalInputWrapper">
82
- <input
50
+ <p
51
+ v-if="isSaved"
52
+ class="cookieControl__ModalUnsaved"
53
+ v-text="localeStrings?.settingsUnsaved"
54
+ />
55
+ <div class="cookieControl__ModalContent">
56
+ <div class="cookieControl__ModalContentInner">
57
+ <slot name="modal" />
58
+ <button
59
+ v-if="!moduleOptions.isModalForced"
60
+ class="cookieControl__ModalClose"
61
+ @click="isModalActive = false"
62
+ v-text="localeStrings?.close"
63
+ />
64
+ <template v-for="cookieType in CookieType" :key="cookieType">
65
+ <template v-if="moduleOptions.cookies[cookieType].length">
66
+ <h2
67
+ v-text="
68
+ localeStrings &&
69
+ (cookieType === CookieType.NECESSARY
70
+ ? localeStrings.cookiesNecessary
71
+ : localeStrings.cookiesOptional)
72
+ "
73
+ />
74
+ <ul>
75
+ <li
76
+ v-for="cookie in moduleOptions.cookies[cookieType]"
77
+ :key="cookie.id"
78
+ >
79
+ <slot name="cookie" v-bind="{ cookie }">
80
+ <div class="cookieControl__ModalInputWrapper">
81
+ <input
82
+ v-if="
83
+ cookieType === CookieType.NECESSARY &&
84
+ cookie.name !== 'functional'
85
+ "
86
+ :id="resolveTranslatable(cookie.name, props.locale)"
87
+ type="checkbox"
88
+ disabled
89
+ checked
90
+ />
91
+ <input
92
+ v-else
93
+ :id="resolveTranslatable(cookie.name, props.locale)"
94
+ type="checkbox"
95
+ :checked="
96
+ isConsentGiven === undefined
97
+ ? cookie.isPreselected
98
+ : getCookieIds(localCookiesEnabled).includes(
99
+ cookie.id,
100
+ )
101
+ "
102
+ @change="toogleCookie(cookie)"
103
+ />
104
+ <button @click="toggleButton($event)">
105
+ {{ getName(cookie.name) }}
106
+ </button>
107
+ <label
108
+ class="cookieControl__ModalCookieName"
109
+ :for="resolveTranslatable(cookie.name, props.locale)"
110
+ tabindex="0"
111
+ @keydown="toggleLabel($event)"
112
+ >
113
+ {{ getName(cookie.name) }}
114
+ <span v-if="cookie.description">
115
+ {{ getDescription(cookie.description) }}
116
+ </span>
117
+ <span
83
118
  v-if="
84
- cookieType === CookieType.NECESSARY &&
85
- cookie.name !== 'functional'
119
+ moduleOptions.isCookieIdVisible &&
120
+ cookie.targetCookieIds
86
121
  "
87
- :id="resolveTranslatable(cookie.name, props.locale)"
88
- type="checkbox"
89
- disabled
90
- checked
91
- />
92
- <input
93
- v-else
94
- :id="resolveTranslatable(cookie.name, props.locale)"
95
- type="checkbox"
96
- :checked="
97
- isConsentGiven === undefined
98
- ? cookie.isPreselected
99
- : getCookieIds(localCookiesEnabled).includes(
100
- cookie.id,
101
- )
102
- "
103
- @change="toogleCookie(cookie)"
104
- />
105
- <button @click="toggleButton($event)">
106
- {{ getName(cookie.name) }}
107
- </button>
108
- <label
109
- class="cookieControl__ModalCookieName"
110
- :for="
111
- resolveTranslatable(cookie.name, props.locale)
112
- "
113
- tabindex="0"
114
- @keydown="toggleLabel($event)"
115
122
  >
116
- {{ getName(cookie.name) }}
117
- <span v-if="cookie.description">
118
- {{ getDescription(cookie.description) }}
119
- </span>
123
+ <br />
124
+ {{
125
+ 'IDs: ' +
126
+ cookie.targetCookieIds
127
+ .map((id) => `"${id}"`)
128
+ .join(', ')
129
+ }}
130
+ </span>
131
+ <template
132
+ v-if="Object.entries(cookie.links || {}).length"
133
+ >
120
134
  <span
121
- v-if="
122
- moduleOptions.isCookieIdVisible &&
123
- cookie.targetCookieIds
124
- "
135
+ v-for="entry in Object.entries(
136
+ cookie.links || {},
137
+ )"
138
+ :key="entry[0]"
125
139
  >
126
140
  <br />
127
- {{
128
- 'IDs: ' +
129
- cookie.targetCookieIds
130
- .map((id) => `"${id}"`)
131
- .join(', ')
132
- }}
133
- </span>
134
- <template
135
- v-if="Object.entries(cookie.links || {}).length"
136
- >
137
- <span
138
- v-for="entry in Object.entries(
139
- cookie.links || {},
140
- )"
141
- :key="entry[0]"
141
+ <NuxtLink
142
+ :to="entry[0]"
143
+ @click="
144
+ !entry[0].toLowerCase().startsWith('http')
145
+ ? (isModalActive = false)
146
+ : null
147
+ "
142
148
  >
143
- <br />
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>
154
- </span>
155
- </template>
156
- </label>
157
- </div>
158
- </slot>
159
- </li>
160
- </ul>
161
- </template>
149
+ {{ entry[1] || entry[0] }}
150
+ </NuxtLink>
151
+ </span>
152
+ </template>
153
+ </label>
154
+ </div>
155
+ </slot>
156
+ </li>
157
+ </ul>
162
158
  </template>
163
- <div class="cookieControl__ModalButtons">
164
- <button
165
- @click="
166
- () => {
167
- acceptPartial()
168
- isModalActive = false
169
- }
170
- "
171
- v-text="localeStrings?.save"
172
- />
173
- <button
174
- @click="
175
- () => {
176
- accept()
177
- isModalActive = false
178
- }
179
- "
180
- v-text="localeStrings?.acceptAll"
181
- />
182
- <button
183
- v-if="!moduleOptions.isModalForced"
184
- @click="
185
- () => {
186
- declineAll()
187
- isModalActive = false
188
- }
189
- "
190
- v-text="localeStrings?.declineAll"
191
- />
192
- </div>
159
+ </template>
160
+ <div class="cookieControl__ModalButtons">
161
+ <button
162
+ @click="
163
+ () => {
164
+ acceptPartial()
165
+ isModalActive = false
166
+ }
167
+ "
168
+ v-text="localeStrings?.save"
169
+ />
170
+ <button
171
+ @click="
172
+ () => {
173
+ accept()
174
+ isModalActive = false
175
+ }
176
+ "
177
+ v-text="localeStrings?.acceptAll"
178
+ />
179
+ <button
180
+ v-if="!moduleOptions.isModalForced"
181
+ @click="
182
+ () => {
183
+ declineAll()
184
+ isModalActive = false
185
+ }
186
+ "
187
+ v-text="localeStrings?.declineAll"
188
+ />
193
189
  </div>
194
190
  </div>
195
191
  </div>
196
- </transition>
197
- </aside>
198
- </client-only>
192
+ </div>
193
+ </transition>
194
+ </aside>
199
195
  </template>
200
196
 
201
197
  <script setup lang="ts">
@@ -1,21 +1,19 @@
1
1
  <template>
2
- <ClientOnly>
3
- <iframe
4
- v-if="isCookieFunctionalEnabled"
5
- :cookie-enabled="null"
6
- v-bind="$attrs"
7
- />
8
- <div v-else class="cookieControl__BlockedIframe">
9
- <p>
10
- {{ localeStrings?.iframeBlocked }}
11
- <a
12
- href="#"
13
- @click.prevent="isModalActive = true"
14
- v-text="localeStrings?.here"
15
- />
16
- </p>
17
- </div>
18
- </ClientOnly>
2
+ <iframe
3
+ v-if="isCookieFunctionalEnabled"
4
+ :cookie-enabled="null"
5
+ v-bind="$attrs"
6
+ />
7
+ <div v-else class="cookieControl__BlockedIframe">
8
+ <p>
9
+ {{ localeStrings?.iframeBlocked }}
10
+ <a
11
+ href="#"
12
+ @click.prevent="isModalActive = true"
13
+ v-text="localeStrings?.here"
14
+ />
15
+ </p>
16
+ </div>
19
17
  </template>
20
18
 
21
19
  <script setup lang="ts">
package/package.json CHANGED
@@ -11,28 +11,28 @@
11
11
  },
12
12
  "description": "Nuxt Cookie Control Module",
13
13
  "devDependencies": {
14
- "@commitlint/cli": "19.3.0",
14
+ "@commitlint/cli": "19.4.0",
15
15
  "@commitlint/config-conventional": "19.2.2",
16
16
  "@dargmuesli/nuxt-cookie-control": "link:",
17
17
  "@nuxt/eslint-config": "0.5.0",
18
- "@nuxt/module-builder": "0.8.1",
18
+ "@nuxt/module-builder": "0.8.3",
19
19
  "@nuxt/schema": "3.12.4",
20
20
  "@semantic-release/changelog": "6.0.3",
21
21
  "@semantic-release/commit-analyzer": "13.0.0",
22
22
  "@semantic-release/git": "10.0.1",
23
- "@semantic-release/github": "10.1.3",
23
+ "@semantic-release/github": "10.1.4",
24
24
  "@semantic-release/npm": "12.0.1",
25
25
  "@semantic-release/release-notes-generator": "14.0.1",
26
- "eslint": "9.8.0",
26
+ "eslint": "9.9.0",
27
27
  "eslint-config-prettier": "9.1.0",
28
28
  "eslint-plugin-prettier": "5.2.1",
29
29
  "husky": "9.1.4",
30
- "lint-staged": "15.2.8",
30
+ "lint-staged": "15.2.9",
31
31
  "nuxt": "3.12.4",
32
32
  "prettier": "3.3.3",
33
33
  "semantic-release": "24.0.0",
34
- "vite": "5.3.5",
35
- "vue": "3.4.36",
34
+ "vite": "5.4.0",
35
+ "vue": "3.4.37",
36
36
  "vue-tsc": "2.0.29",
37
37
  "webpack": "5.93.0"
38
38
  },
@@ -69,7 +69,7 @@
69
69
  "Jonas Thelemann"
70
70
  ],
71
71
  "name": "@dargmuesli/nuxt-cookie-control",
72
- "packageManager": "pnpm@9.6.0",
72
+ "packageManager": "pnpm@9.7.1",
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
@@ -89,5 +89,5 @@
89
89
  },
90
90
  "type": "module",
91
91
  "types": "./dist/types.d.ts",
92
- "version": "8.4.7"
92
+ "version": "8.4.8"
93
93
  }