@dargmuesli/nuxt-cookie-control 8.4.7 → 8.4.9
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.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/CookieControl.vue +180 -183
- package/dist/runtime/components/CookieIframe.vue +15 -17
- package/package.json +16 -16
package/dist/module.d.mts
CHANGED
|
@@ -56,7 +56,7 @@ interface ModuleOptions {
|
|
|
56
56
|
localeTexts: PartialRecord<Locale, Partial<LocaleStrings>>;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
59
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
60
60
|
|
|
61
61
|
declare module '@nuxt/schema' {
|
|
62
62
|
interface PublicRuntimeConfig {
|
package/dist/module.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ interface ModuleOptions {
|
|
|
56
56
|
localeTexts: PartialRecord<Locale, Partial<LocaleStrings>>;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
59
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
60
60
|
|
|
61
61
|
declare module '@nuxt/schema' {
|
|
62
62
|
interface PublicRuntimeConfig {
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dargmuesli/nuxt-cookie-control",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.9",
|
|
4
4
|
"configKey": "cookieControl",
|
|
5
5
|
"compatibility": {
|
|
6
6
|
"nuxt": ">=3.0.0"
|
|
7
7
|
},
|
|
8
8
|
"builder": {
|
|
9
|
-
"@nuxt/module-builder": "0.8.
|
|
9
|
+
"@nuxt/module-builder": "0.8.3",
|
|
10
10
|
"unbuild": "unknown"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -1,201 +1,198 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
</
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
type="button"
|
|
36
|
+
@click="isModalActive = true"
|
|
37
|
+
>
|
|
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"
|
|
37
50
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
v-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
|
83
|
+
v-if="
|
|
84
|
+
cookieType === CookieType.NECESSARY &&
|
|
85
|
+
cookie.name !== 'functional'
|
|
86
|
+
"
|
|
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="resolveTranslatable(cookie.name, props.locale)"
|
|
111
|
+
tabindex="0"
|
|
112
|
+
@keydown="toggleLabel($event)"
|
|
113
|
+
>
|
|
114
|
+
{{ getName(cookie.name) }}
|
|
115
|
+
<span v-if="cookie.description">
|
|
116
|
+
{{ getDescription(cookie.description) }}
|
|
117
|
+
</span>
|
|
118
|
+
<span
|
|
83
119
|
v-if="
|
|
84
|
-
|
|
85
|
-
cookie.
|
|
120
|
+
moduleOptions.isCookieIdVisible &&
|
|
121
|
+
cookie.targetCookieIds
|
|
86
122
|
"
|
|
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
123
|
>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
<br />
|
|
125
|
+
{{
|
|
126
|
+
'IDs: ' +
|
|
127
|
+
cookie.targetCookieIds
|
|
128
|
+
.map((id) => `"${id}"`)
|
|
129
|
+
.join(', ')
|
|
130
|
+
}}
|
|
131
|
+
</span>
|
|
132
|
+
<template
|
|
133
|
+
v-if="Object.entries(cookie.links || {}).length"
|
|
134
|
+
>
|
|
120
135
|
<span
|
|
121
|
-
v-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
136
|
+
v-for="entry in Object.entries(
|
|
137
|
+
cookie.links || {},
|
|
138
|
+
)"
|
|
139
|
+
:key="entry[0]"
|
|
125
140
|
>
|
|
126
141
|
<br />
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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]"
|
|
142
|
+
<NuxtLink
|
|
143
|
+
:to="entry[0]"
|
|
144
|
+
@click="
|
|
145
|
+
!entry[0].toLowerCase().startsWith('http')
|
|
146
|
+
? (isModalActive = false)
|
|
147
|
+
: null
|
|
148
|
+
"
|
|
142
149
|
>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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>
|
|
150
|
+
{{ entry[1] || entry[0] }}
|
|
151
|
+
</NuxtLink>
|
|
152
|
+
</span>
|
|
153
|
+
</template>
|
|
154
|
+
</label>
|
|
155
|
+
</div>
|
|
156
|
+
</slot>
|
|
157
|
+
</li>
|
|
158
|
+
</ul>
|
|
162
159
|
</template>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
160
|
+
</template>
|
|
161
|
+
<div class="cookieControl__ModalButtons">
|
|
162
|
+
<button
|
|
163
|
+
@click="
|
|
164
|
+
() => {
|
|
165
|
+
acceptPartial()
|
|
166
|
+
isModalActive = false
|
|
167
|
+
}
|
|
168
|
+
"
|
|
169
|
+
v-text="localeStrings?.save"
|
|
170
|
+
/>
|
|
171
|
+
<button
|
|
172
|
+
@click="
|
|
173
|
+
() => {
|
|
174
|
+
accept()
|
|
175
|
+
isModalActive = false
|
|
176
|
+
}
|
|
177
|
+
"
|
|
178
|
+
v-text="localeStrings?.acceptAll"
|
|
179
|
+
/>
|
|
180
|
+
<button
|
|
181
|
+
v-if="!moduleOptions.isModalForced"
|
|
182
|
+
@click="
|
|
183
|
+
() => {
|
|
184
|
+
declineAll()
|
|
185
|
+
isModalActive = false
|
|
186
|
+
}
|
|
187
|
+
"
|
|
188
|
+
v-text="localeStrings?.declineAll"
|
|
189
|
+
/>
|
|
193
190
|
</div>
|
|
194
191
|
</div>
|
|
195
192
|
</div>
|
|
196
|
-
</
|
|
197
|
-
</
|
|
198
|
-
</
|
|
193
|
+
</div>
|
|
194
|
+
</transition>
|
|
195
|
+
</aside>
|
|
199
196
|
</template>
|
|
200
197
|
|
|
201
198
|
<script setup lang="ts">
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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,30 +11,30 @@
|
|
|
11
11
|
},
|
|
12
12
|
"description": "Nuxt Cookie Control Module",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@commitlint/cli": "19.
|
|
14
|
+
"@commitlint/cli": "19.4.0",
|
|
15
15
|
"@commitlint/config-conventional": "19.2.2",
|
|
16
16
|
"@dargmuesli/nuxt-cookie-control": "link:",
|
|
17
|
-
"@nuxt/eslint-config": "0.5.
|
|
18
|
-
"@nuxt/module-builder": "0.8.
|
|
19
|
-
"@nuxt/schema": "3.
|
|
17
|
+
"@nuxt/eslint-config": "0.5.2",
|
|
18
|
+
"@nuxt/module-builder": "0.8.3",
|
|
19
|
+
"@nuxt/schema": "3.13.0",
|
|
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.
|
|
23
|
+
"@semantic-release/github": "10.1.7",
|
|
24
24
|
"@semantic-release/npm": "12.0.1",
|
|
25
25
|
"@semantic-release/release-notes-generator": "14.0.1",
|
|
26
|
-
"eslint": "9.
|
|
26
|
+
"eslint": "9.9.0",
|
|
27
27
|
"eslint-config-prettier": "9.1.0",
|
|
28
28
|
"eslint-plugin-prettier": "5.2.1",
|
|
29
|
-
"husky": "9.1.
|
|
30
|
-
"lint-staged": "15.2.
|
|
31
|
-
"nuxt": "3.
|
|
29
|
+
"husky": "9.1.5",
|
|
30
|
+
"lint-staged": "15.2.9",
|
|
31
|
+
"nuxt": "3.13.0",
|
|
32
32
|
"prettier": "3.3.3",
|
|
33
|
-
"semantic-release": "24.
|
|
34
|
-
"vite": "5.
|
|
35
|
-
"vue": "3.4.
|
|
33
|
+
"semantic-release": "24.1.0",
|
|
34
|
+
"vite": "5.4.2",
|
|
35
|
+
"vue": "3.4.38",
|
|
36
36
|
"vue-tsc": "2.0.29",
|
|
37
|
-
"webpack": "5.
|
|
37
|
+
"webpack": "5.94.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=16"
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"Jonas Thelemann"
|
|
70
70
|
],
|
|
71
71
|
"name": "@dargmuesli/nuxt-cookie-control",
|
|
72
|
-
"packageManager": "pnpm@9.
|
|
72
|
+
"packageManager": "pnpm@9.8.0",
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
76
|
"repository": "https://github.com/dargmuesli/nuxt-cookie-control",
|
|
77
77
|
"resolutions": {
|
|
78
|
-
"@nuxt/kit": "3.
|
|
78
|
+
"@nuxt/kit": "3.13.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "nuxt-module-build build",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
},
|
|
90
90
|
"type": "module",
|
|
91
91
|
"types": "./dist/types.d.ts",
|
|
92
|
-
"version": "8.4.
|
|
92
|
+
"version": "8.4.9"
|
|
93
93
|
}
|