From 8baebe54359bf5fedb0e1d28ccd85e3fbba5633a Mon Sep 17 00:00:00 2001 From: Katie Brady Date: Fri, 22 Sep 2023 16:28:41 -0400 Subject: [PATCH 1/2] Add Segment Cookie Consent Manager --- ui/package-lock.json | 17 +++ ui/package.json | 3 +- .../components/custom/ConsentManager.svelte | 117 ++++++++++++++++++ ui/src/routes/+layout.svelte | 3 + 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 ui/src/lib/components/custom/ConsentManager.svelte diff --git a/ui/package-lock.json b/ui/package-lock.json index 2d50ad31..5b145149 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -8,6 +8,7 @@ "name": "ui", "version": "0.0.1", "dependencies": { + "@segment/in-eu": "astronomer/in-eu", "bits-ui": "^0.5.7", "clsx": "^2.0.0", "radix-icons-svelte": "^1.2.1", @@ -561,6 +562,14 @@ "integrity": "sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==", "dev": true }, + "node_modules/@segment/in-eu": { + "version": "0.3.0", + "resolved": "git+ssh://git@github.com/astronomer/in-eu.git#49f901c7a9e7e0c4a5d9cef5364e3b637254e8f5", + "license": "MIT", + "dependencies": { + "jstz": "^2.0.0" + } + }, "node_modules/@sveltejs/adapter-auto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.0.tgz", @@ -1383,6 +1392,14 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jstz": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/jstz/-/jstz-2.1.1.tgz", + "integrity": "sha512-8hfl5RD6P7rEeIbzStBz3h4f+BQHfq/ABtoU6gXKQv5OcZhnmrIpG7e1pYaZ8hS9e0mp+bxUj08fnDUbKctYyA==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", diff --git a/ui/package.json b/ui/package.json index a5a89ca2..6bb6d5eb 100644 --- a/ui/package.json +++ b/ui/package.json @@ -27,6 +27,7 @@ }, "type": "module", "dependencies": { + "@segment/in-eu": "astronomer/in-eu", "bits-ui": "^0.5.7", "clsx": "^2.0.0", "radix-icons-svelte": "^1.2.1", @@ -34,4 +35,4 @@ "tailwind-merge": "^1.14.0", "tailwind-variants": "^0.1.14" } -} +} \ No newline at end of file diff --git a/ui/src/lib/components/custom/ConsentManager.svelte b/ui/src/lib/components/custom/ConsentManager.svelte new file mode 100644 index 00000000..dc64c3f4 --- /dev/null +++ b/ui/src/lib/components/custom/ConsentManager.svelte @@ -0,0 +1,117 @@ + + + + + + + + +