@dargmuesli/nuxt-cookie-control 2.0.0-beta.4 → 2.0.0-beta.6
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 +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/CookieControl.vue +3 -0
- package/dist/runtime/components/CookieIframe.vue +4 -0
- package/dist/runtime/composables.mjs +1 -0
- package/dist/runtime/methods.d.ts +2 -2
- package/dist/runtime/methods.mjs +1 -1
- package/dist/runtime/plugin.mjs +2 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
|
11
11
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
12
12
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
13
13
|
const name = "@dargmuesli/nuxt-cookie-control";
|
|
14
|
-
const version = "2.0.0-beta.
|
|
14
|
+
const version = "2.0.0-beta.6";
|
|
15
15
|
|
|
16
16
|
const en = {
|
|
17
17
|
acceptAll: "Accept all",
|
|
@@ -141,6 +141,7 @@
|
|
|
141
141
|
|
|
142
142
|
<script setup lang="ts">
|
|
143
143
|
import Cookies from 'js-cookie'
|
|
144
|
+
import { ref, computed, onBeforeMount } from 'vue'
|
|
144
145
|
|
|
145
146
|
import { Cookie, CookieType, Locale, Translatable } from '../types'
|
|
146
147
|
import {
|
|
@@ -150,6 +151,8 @@ import {
|
|
|
150
151
|
useResolveTranslatable,
|
|
151
152
|
} from '../methods'
|
|
152
153
|
|
|
154
|
+
import { useCookieControl } from '#imports'
|
|
155
|
+
|
|
153
156
|
export interface Props {
|
|
154
157
|
locale?: Locale
|
|
155
158
|
}
|
|
@@ -15,9 +15,13 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script setup lang="ts">
|
|
18
|
+
import { computed } from 'vue'
|
|
19
|
+
|
|
18
20
|
import { LOCALE_DEFAULT } from '../constants'
|
|
19
21
|
import { Locale } from '../types'
|
|
20
22
|
|
|
23
|
+
import { useCookieControl } from '#imports'
|
|
24
|
+
|
|
21
25
|
export interface Props {
|
|
22
26
|
locale?: Locale
|
|
23
27
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { Cookie,
|
|
2
|
+
import { Cookie, ModuleOptions, Translatable } from './types';
|
|
3
3
|
export declare const useAcceptNecessary: () => () => void;
|
|
4
4
|
export declare const acceptNecessary: (enabled: Ref<Cookie[]>, consent: Ref<boolean>, necessaryCookies?: Cookie[]) => void;
|
|
5
|
-
export declare const useResolveTranslatable: (locale?: Locale) => (translatable: Translatable) => string;
|
|
5
|
+
export declare const useResolveTranslatable: (locale?: import("./types").Locale) => (translatable: Translatable) => string;
|
|
6
6
|
export declare const useSetConsent: () => () => void;
|
|
7
7
|
export declare const setConsent: ({ isInit, isConsentGiven, moduleOptions, cookiesEnabled, cookiesEnabledIds, }: {
|
|
8
8
|
isInit: boolean;
|
package/dist/runtime/methods.mjs
CHANGED
|
@@ -28,7 +28,7 @@ export const acceptNecessary = (enabled, consent, necessaryCookies = []) => {
|
|
|
28
28
|
export const useResolveTranslatable = (locale = LOCALE_DEFAULT) => {
|
|
29
29
|
return (translatable) => resolveTranslatable(translatable, locale);
|
|
30
30
|
};
|
|
31
|
-
const resolveTranslatable = (translatable, locale) => {
|
|
31
|
+
const resolveTranslatable = (translatable, locale = LOCALE_DEFAULT) => {
|
|
32
32
|
if (typeof translatable === "string")
|
|
33
33
|
return translatable;
|
|
34
34
|
if (!locale)
|
package/dist/runtime/plugin.mjs
CHANGED