@dargmuesli/nuxt-cookie-control 1.9.9 → 2.0.0-beta.2
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/LICENSE +21 -0
- package/README.md +206 -285
- package/dist/module.cjs +5 -0
- package/dist/module.d.ts +66 -0
- package/dist/module.json +8 -0
- package/dist/module.mjs +186 -0
- package/dist/runtime/components/CookieControl.vue +274 -0
- package/dist/runtime/components/CookieIframe.vue +39 -0
- package/dist/runtime/composables.d.ts +1 -0
- package/dist/runtime/composables.mjs +1 -0
- package/dist/runtime/constants.d.ts +2 -0
- package/dist/runtime/constants.mjs +2 -0
- package/dist/runtime/locale/ar.d.ts +3 -0
- package/dist/runtime/locale/ar.mjs +16 -0
- package/dist/runtime/locale/de.d.ts +3 -0
- package/dist/runtime/locale/de.mjs +16 -0
- package/dist/runtime/locale/en.d.ts +3 -0
- package/dist/runtime/locale/en.mjs +16 -0
- package/dist/runtime/locale/es.d.ts +3 -0
- package/dist/runtime/locale/es.mjs +16 -0
- package/dist/runtime/locale/fr.d.ts +3 -0
- package/dist/runtime/locale/fr.mjs +16 -0
- package/dist/runtime/locale/hr.d.ts +3 -0
- package/dist/runtime/locale/hr.mjs +16 -0
- package/dist/runtime/locale/hu.d.ts +3 -0
- package/dist/runtime/locale/hu.mjs +16 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.mjs +15 -0
- package/dist/runtime/locale/it.d.ts +3 -0
- package/dist/runtime/locale/it.mjs +16 -0
- package/dist/runtime/locale/ja.d.ts +3 -0
- package/dist/runtime/locale/ja.mjs +16 -0
- package/dist/runtime/locale/nl.d.ts +3 -0
- package/dist/runtime/locale/nl.mjs +16 -0
- package/dist/runtime/locale/no.d.ts +3 -0
- package/dist/runtime/locale/no.mjs +16 -0
- package/dist/runtime/locale/pt.d.ts +3 -0
- package/dist/runtime/locale/pt.mjs +16 -0
- package/dist/runtime/locale/ru.d.ts +3 -0
- package/dist/runtime/locale/ru.mjs +16 -0
- package/dist/runtime/locale/uk.d.ts +3 -0
- package/dist/runtime/locale/uk.mjs +16 -0
- package/dist/runtime/methods.d.ts +16 -0
- package/dist/runtime/methods.mjs +117 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.mjs +27 -0
- package/dist/runtime/styles.css +347 -0
- package/dist/runtime/types.d.ts +73 -0
- package/dist/runtime/types.mjs +66 -0
- package/dist/types.d.ts +6 -0
- package/package.json +60 -21
- package/components/CookieControl.vue +0 -182
- package/components/CookieIframe.vue +0 -32
- package/lib/module.js +0 -74
- package/lib/plugin.js +0 -206
- package/lib/postinstall.js +0 -1
- package/lib/styles.scss +0 -434
- package/locale/de.js +0 -15
- package/locale/en.js +0 -15
- package/locale/es.js +0 -15
- package/locale/fr.js +0 -15
- package/locale/hr.js +0 -15
- package/locale/hu.js +0 -15
- package/locale/it.js +0 -15
- package/locale/ja.js +0 -15
- package/locale/no.js +0 -16
- package/locale/pt.js +0 -15
- package/locale/ru.js +0 -15
- package/locale/uk.js +0 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,285 +1,206 @@
|
|
|
1
|
-
# Nuxt Cookie Control
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[Nuxt
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
###
|
|
54
|
-
```html
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
name: 'Google Analitycs',
|
|
208
|
-
//if you don't set identifier, slugified name will be used
|
|
209
|
-
identifier: 'ga',
|
|
210
|
-
//if multilanguage
|
|
211
|
-
description: {
|
|
212
|
-
en: 'Google GTM is ...'
|
|
213
|
-
},
|
|
214
|
-
//else
|
|
215
|
-
description: 'Google GTM is...',
|
|
216
|
-
|
|
217
|
-
initialState: true,
|
|
218
|
-
src: 'https://www.googletagmanager.com/gtag/js?id=<API-KEY>',
|
|
219
|
-
async: true,
|
|
220
|
-
cookies: ['_ga', '_gat', '_gid'],
|
|
221
|
-
accepted: () =>{
|
|
222
|
-
window.dataLayer = window.dataLayer || [];
|
|
223
|
-
window.dataLayer.push({
|
|
224
|
-
'gtm.start': new Date().getTime(),
|
|
225
|
-
event: 'gtm.js'
|
|
226
|
-
});
|
|
227
|
-
},
|
|
228
|
-
declined: () =>{
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
```
|
|
234
|
-
### Multilanguage
|
|
235
|
-
Set **locale** prop
|
|
236
|
-
```html
|
|
237
|
-
<CookieControl locale="de"/>
|
|
238
|
-
```
|
|
239
|
-
#### Default: en,
|
|
240
|
-
#### Currently available:
|
|
241
|
-
- en
|
|
242
|
-
- de
|
|
243
|
-
- it
|
|
244
|
-
- es
|
|
245
|
-
- fr
|
|
246
|
-
- pt
|
|
247
|
-
- hr
|
|
248
|
-
- no
|
|
249
|
-
- hu
|
|
250
|
-
- ja
|
|
251
|
-
- ru
|
|
252
|
-
- uk
|
|
253
|
-
|
|
254
|
-
If you don't like the default texts you can change them in options (**nuxt.config.js**)
|
|
255
|
-
```javascript
|
|
256
|
-
text: {
|
|
257
|
-
locale: {
|
|
258
|
-
en: {
|
|
259
|
-
barTitle: 'Cookies Different',
|
|
260
|
-
barDescription: 'We use our own cookies and third-party...',
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
de: {
|
|
264
|
-
...
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
//this will override locale text
|
|
269
|
-
barTitle: 'Override Title'
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Buy me a coffee
|
|
274
|
-
[](https://ko-fi.com/F1F31MWWL)
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
<!-- Badges -->
|
|
278
|
-
[npm-version-src]: https://badgen.net/npm/v/nuxt-cookie-control/latest
|
|
279
|
-
[npm-version-href]: https://npmjs.com/package/nuxt-cookie-control
|
|
280
|
-
|
|
281
|
-
[kofi-src]: https://badgen.net/badge/icon/kofi?icon=kofi&label=support
|
|
282
|
-
[kofi-href]: https://ko-fi.com/darioferderber
|
|
283
|
-
|
|
284
|
-
[npm-downloads-src]: https://badgen.net/npm/dm/nuxt-cookie-control
|
|
285
|
-
[npm-downloads-href]: https://npmjs.com/package/nuxt-cookie-control
|
|
1
|
+
# Nuxt Cookie Control
|
|
2
|
+
|
|
3
|
+
Continuing Dario Ferderber's work on [gitlab.com/broj42/nuxt-cookie-control](https://gitlab.com/broj42/nuxt-cookie-control).
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
####
|
|
7
|
+
Try it out here:
|
|
8
|
+
[Nuxt.js Cookie Control](https://codesandbox.io/s/vkwqmm577)
|
|
9
|
+
|
|
10
|
+
## 🚀 Usage
|
|
11
|
+
```bash
|
|
12
|
+
npm i -D @dargmuesli/nuxt-cookie-control
|
|
13
|
+
yarn add -D @dargmuesli/nuxt-cookie-control
|
|
14
|
+
pnpm i -D @dargmuesli/nuxt-cookie-control
|
|
15
|
+
```
|
|
16
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
17
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
// nuxt.config.js
|
|
21
|
+
|
|
22
|
+
modules: [
|
|
23
|
+
'@dargmuesli/nuxt-cookie-control'
|
|
24
|
+
]
|
|
25
|
+
// or
|
|
26
|
+
modules: [
|
|
27
|
+
['@dargmuesli/nuxt-cookie-control', {
|
|
28
|
+
// module options
|
|
29
|
+
}]
|
|
30
|
+
]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Components and composables are [auto-imported](https://nuxt.com/docs/guide/concepts/auto-imports)!
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<!-- component.vue -->
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<CookieControl locale="en" />
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
const {
|
|
44
|
+
cookiesEnabled,
|
|
45
|
+
cookiesEnabledIds,
|
|
46
|
+
isConsentGiven,
|
|
47
|
+
isModalActive,
|
|
48
|
+
moduleOptions
|
|
49
|
+
} = useCookieControl()
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
52
|
+
## Slot
|
|
53
|
+
### Bar
|
|
54
|
+
```html
|
|
55
|
+
<CookieControl>
|
|
56
|
+
<template #bar>
|
|
57
|
+
<h3>Bar title</h3>
|
|
58
|
+
<p>Bar description (you can use $cookies.text.barDescription)</p>
|
|
59
|
+
<n-link>Go somewhere</n-link>
|
|
60
|
+
</template>
|
|
61
|
+
</CookieControl>
|
|
62
|
+
```
|
|
63
|
+
### Modal
|
|
64
|
+
```html
|
|
65
|
+
<template #modal>
|
|
66
|
+
<h3>Modal title</h3>
|
|
67
|
+
<p>Modal description</p>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
### Cookie
|
|
71
|
+
```html
|
|
72
|
+
<template #cookie="{config}">
|
|
73
|
+
<span v-for="c in config" :key="c.id" v-text="c.cookies"/>
|
|
74
|
+
</template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Props
|
|
78
|
+
- locale: `['en']`
|
|
79
|
+
```html
|
|
80
|
+
<CookieControl locale="de"/>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Currently available:
|
|
84
|
+
- ar
|
|
85
|
+
- de
|
|
86
|
+
- en
|
|
87
|
+
- es
|
|
88
|
+
- fr
|
|
89
|
+
- hr
|
|
90
|
+
- hu
|
|
91
|
+
- it
|
|
92
|
+
- ja
|
|
93
|
+
- nl
|
|
94
|
+
- no
|
|
95
|
+
- pt
|
|
96
|
+
- ru
|
|
97
|
+
- uk
|
|
98
|
+
|
|
99
|
+
## Module Options
|
|
100
|
+
|
|
101
|
+
```javascript
|
|
102
|
+
// Position of cookie bar.
|
|
103
|
+
// 'top-left', 'top-right', 'top-full', 'bottom-left', 'bottom-right', 'bottom-full'
|
|
104
|
+
barPosition: 'bottom-full',
|
|
105
|
+
|
|
106
|
+
// Component colors.
|
|
107
|
+
// If you want to disable colors set colors property to false.
|
|
108
|
+
colors: {
|
|
109
|
+
barBackground: '#000',
|
|
110
|
+
barButtonBackground: '#fff',
|
|
111
|
+
barButtonColor: '#000',
|
|
112
|
+
barButtonHoverBackground: '#333',
|
|
113
|
+
barButtonHoverColor: '#fff',
|
|
114
|
+
barTextColor: '#fff',
|
|
115
|
+
checkboxActiveBackground: '#000',
|
|
116
|
+
checkboxActiveCircleBackground: '#fff',
|
|
117
|
+
checkboxDisabledBackground: '#ddd',
|
|
118
|
+
checkboxDisabledCircleBackground: '#fff',
|
|
119
|
+
checkboxInactiveBackground: '#000',
|
|
120
|
+
checkboxInactiveCircleBackground: '#fff',
|
|
121
|
+
controlButtonBackground: '#fff',
|
|
122
|
+
controlButtonHoverBackground: '#000',
|
|
123
|
+
controlButtonIconColor: '#000',
|
|
124
|
+
controlButtonIconHoverColor: '#fff',
|
|
125
|
+
modalBackground: '#fff',
|
|
126
|
+
modalButtonBackground: '#000',
|
|
127
|
+
modalButtonColor: '#fff',
|
|
128
|
+
modalButtonHoverBackground: '#333',
|
|
129
|
+
modalButtonHoverColor: '#fff',
|
|
130
|
+
modalOverlay: '#000',
|
|
131
|
+
modalOverlayOpacity: 0.8,
|
|
132
|
+
modalTextColor: '#000',
|
|
133
|
+
modalUnsavedColor: '#fff',
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// The cookies that are to be controlled.
|
|
137
|
+
// See detailed explanation further down below!
|
|
138
|
+
cookies: {
|
|
139
|
+
necessary: [],
|
|
140
|
+
optional: [],
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Switch to toggle the "accept necessary" button.
|
|
144
|
+
isAcceptNecessaryButtonEnabled: true
|
|
145
|
+
|
|
146
|
+
// Switch to toggle the button that opens the configuration modal.
|
|
147
|
+
isControlButtonEnabled: true,
|
|
148
|
+
|
|
149
|
+
// Switch to toggle the inclusion of this module's css.
|
|
150
|
+
// If css is set to false, you will still be able to access your color variables.
|
|
151
|
+
isCssEnabled: true,
|
|
152
|
+
|
|
153
|
+
// Switch to toggle the css variables polyfill.
|
|
154
|
+
isCssPolyfillEnabled: true,
|
|
155
|
+
|
|
156
|
+
// Switch to toggle the separation of cookie name and description in the configuration modal by a dash.
|
|
157
|
+
isDashInDescriptionEnabled: true,
|
|
158
|
+
|
|
159
|
+
// Switch to toggle the blocking of iframes.
|
|
160
|
+
// This can be used to prevent iframes from adding additional cookies.
|
|
161
|
+
isIframeBlocked: false,
|
|
162
|
+
// or:
|
|
163
|
+
// isIframeBlocked: {
|
|
164
|
+
// initialState: false
|
|
165
|
+
// },
|
|
166
|
+
|
|
167
|
+
// The domain to set cookies on.
|
|
168
|
+
// This is useful in case you have subdomains (shop.yourdomain.com)
|
|
169
|
+
domain: 'yourdomain.com',
|
|
170
|
+
|
|
171
|
+
// The locales to include.
|
|
172
|
+
locales: ['en'],
|
|
173
|
+
|
|
174
|
+
// Translations to override.
|
|
175
|
+
localeTexts: {
|
|
176
|
+
en: {
|
|
177
|
+
save: 'Remember',
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Cookies
|
|
183
|
+
|
|
184
|
+
Every property the includes a `{ en: ... }` value is a translatable property that could instead only specify a string (`'...'`) or other locales as well (`{ de: ..., uk: ... }`).
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
{
|
|
188
|
+
description: {
|
|
189
|
+
en: 'Used for cookie control.'
|
|
190
|
+
},
|
|
191
|
+
id: 'ga', // if unset, the slugified name will be used
|
|
192
|
+
name: {
|
|
193
|
+
en: 'Google Analytics'
|
|
194
|
+
},
|
|
195
|
+
src: 'https://www.googletagmanager.com/gtag/js?id=<API-KEY>',
|
|
196
|
+
targetCookieIds: ['cookie_control_consent', 'cookie_control_enabled_cookies']
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<!-- Badges -->
|
|
202
|
+
[npm-version-src]: https://badgen.net/npm/v/@dargmuesli/nuxt-cookie-control/latest
|
|
203
|
+
[npm-version-href]: https://npmjs.com/package/@dargmuesli/nuxt-cookie-control
|
|
204
|
+
|
|
205
|
+
[npm-downloads-src]: https://badgen.net/npm/dm/@dargmuesli/nuxt-cookie-control
|
|
206
|
+
[npm-downloads-href]: https://npmjs.com/package/@dargmuesli/nuxt-cookie-control
|
package/dist/module.cjs
ADDED
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
declare enum Locale {
|
|
4
|
+
AR = "ar",
|
|
5
|
+
DE = "de",
|
|
6
|
+
EN = "en",
|
|
7
|
+
ES = "es",
|
|
8
|
+
FR = "fr",
|
|
9
|
+
HR = "hr",
|
|
10
|
+
HU = "hu",
|
|
11
|
+
IT = "it",
|
|
12
|
+
JA = "ja",
|
|
13
|
+
NL = "nl",
|
|
14
|
+
NO = "no",
|
|
15
|
+
PT = "pt",
|
|
16
|
+
RU = "ru",
|
|
17
|
+
UK = "uk"
|
|
18
|
+
}
|
|
19
|
+
type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
|
|
20
|
+
type Translatable = string | PartialRecord<Locale, string>;
|
|
21
|
+
interface Cookie {
|
|
22
|
+
description?: Translatable;
|
|
23
|
+
id?: string;
|
|
24
|
+
name: Translatable;
|
|
25
|
+
src?: string;
|
|
26
|
+
targetCookieIds?: string[];
|
|
27
|
+
}
|
|
28
|
+
interface LocaleStrings {
|
|
29
|
+
acceptAll: string;
|
|
30
|
+
acceptNecessary: string;
|
|
31
|
+
barDescription: string;
|
|
32
|
+
barTitle: string;
|
|
33
|
+
blockedIframe: string;
|
|
34
|
+
close: string;
|
|
35
|
+
declineAll: string;
|
|
36
|
+
functional: string;
|
|
37
|
+
here: string;
|
|
38
|
+
manageCookies: string;
|
|
39
|
+
necessary: string;
|
|
40
|
+
optional: string;
|
|
41
|
+
save: string;
|
|
42
|
+
unsaved: string;
|
|
43
|
+
}
|
|
44
|
+
interface ModuleOptions {
|
|
45
|
+
barPosition?: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
|
|
46
|
+
colors?: false | Record<string, any>;
|
|
47
|
+
cookies: {
|
|
48
|
+
necessary: Cookie[];
|
|
49
|
+
optional: Cookie[];
|
|
50
|
+
};
|
|
51
|
+
isAcceptNecessaryButtonEnabled?: boolean;
|
|
52
|
+
isControlButtonEnabled?: boolean;
|
|
53
|
+
isCssEnabled?: boolean;
|
|
54
|
+
isCssPolyfillEnabled?: boolean;
|
|
55
|
+
isDashInDescriptionEnabled?: boolean;
|
|
56
|
+
isIframeBlocked?: boolean | {
|
|
57
|
+
initialState: boolean;
|
|
58
|
+
};
|
|
59
|
+
domain?: string;
|
|
60
|
+
locales: Locale[];
|
|
61
|
+
localeTexts: PartialRecord<Locale, LocaleStrings>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
65
|
+
|
|
66
|
+
export { _default as default };
|