From 5c4899a1196933c91dab229ce5cd85ff402beb18 Mon Sep 17 00:00:00 2001
From: Josef Slezak <32373099+MysterieDev@users.noreply.github.com>
Date: Thu, 3 Mar 2022 15:23:01 +0100
Subject: [PATCH] 1.1.1 Callback fix and new Status attribute (#9)
* lockfiles
* update
* fix
* add descs
* update version
* update readme
* update callback
* update banner
---
cookiebanner.yaml | 4 ++--
public/cookiebanner-index.min.js | 2 +-
solid-frontend-dev/package.json | 2 +-
solid-frontend-dev/src/banner-handling.ts | 16 +++++++++-------
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/cookiebanner.yaml b/cookiebanner.yaml
index 517b24d..584ef68 100644
--- a/cookiebanner.yaml
+++ b/cookiebanner.yaml
@@ -1,5 +1,5 @@
name: Cookie Banner
-version: 1.1.0
+version: 1.1.1
description: Enables a cookie banner for websites
author: Josef Slezak
licence: MIT
@@ -22,7 +22,7 @@ forms:
label: introduction text as markdown - if you add a link to your data privacy or other links without cookiebanner requirement, add the parameter ?nocb=true
javascriptcallback:
type: textarea
- label: callback of the banner - carries an object: { req: true/false, fun: true/false, mar: true/false} for the categories required, functional and marekting. True is for "user has consented". You can get it with 'e.detail'. You are already inside the callback, so just write javascript-statement-blocks.
+ label: callback of the banner - carries an object: { req: true/false, fun: true/false, mar: true/false, newConsent: true/false} for the categories required, functional and marekting.True is for "user has consented". The attribute newConsent shows, if the user set the cookies just now or if it already persisted in the storage. You can get it with 'e.detail'. You are already inside the callback, so just write javascript-statement-blocks.
consentversion:
type: text
label: Consent Version - Increment this string number to force a new cookiebanner to show
diff --git a/public/cookiebanner-index.min.js b/public/cookiebanner-index.min.js
index 8827903..46a19f4 100644
--- a/public/cookiebanner-index.min.js
+++ b/public/cookiebanner-index.min.js
@@ -1 +1 @@
-import{c as e,t,d as n,a as o,b as i,i as r,S as c,e as s,o as a,f as l,r as d}from"./cookiebanner-vendor.min.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const[u,m]=e({Req:[],Fun:[],Mar:[]});const b=t("
'),F=()=>{function e(){return(()=>{const e=M.cloneNode(!0);return e.$$click=()=>q(C.marketing),r(e,(()=>window.cookiemeta.acceptallbtn)),e})()}return a((()=>{document.body.classList.add("cbPreventScroll")})),(()=>{const t=$.cloneNode(!0),n=t.firstChild,o=n.firstChild,s=o.firstChild,a=o.nextSibling,d=a.nextSibling,m=d.firstChild.firstChild;return r(n,i(f,{get category(){return C.required}}),d),r(n,i(f,{get category(){return C.functional}}),d),r(n,i(f,{get category(){return C.marketing}}),d),m.$$click=()=>q(C.required),r(m,(()=>window.cookiemeta.declinenonrequiredbtn)),r(d,i(c,{get when(){return 0===u.Fun.length},get children(){const t=x.cloneNode(!0);return r(t,e),t}}),null),r(n,i(c,{get when(){return u.Fun.length>0},get children(){const t=R.cloneNode(!0),n=t.firstChild,o=n.firstChild,i=n.nextSibling;return o.$$click=()=>q(C.functional),r(o,(()=>window.cookiemeta.onlyfunctionalbtn)),r(i,e),t}}),null),l((e=>{const t=window.cookiemeta.headline,n=window.cookiemeta.introduction;return t!==e._v$&&(s.data=e._v$=t),n!==e._v$2&&(a.innerHTML=e._v$2=n),e}),{_v$:void 0,_v$2:void 0}),t})()};n(["click"]),new URL(window.location.href).searchParams.get("nocb")||s.get("cbSet")===v&&s.get("cbReq")&&s.get("cbFun")&&s.get("cbMar")||(T(),0)?L(!0):d((()=>i(F,{})),document.getElementById("solidApp"));const B=document.getElementById("cbReqTable");if(B){B.outerHTML='';const e=document.createElement("DIV");B.appendChild(e),d((()=>i(f,{get category(){return C.required},get cookieNameTable(){return window.cookiemeta.cookienameColumn},get hostNameTable(){return window.cookiemeta.cookiehostColumn},get persistenceNameTable(){return window.cookiemeta.cookiepersistenceColumn}})),document.getElementById("cbReqTable"))}const I=document.getElementById("cbFunTable");I&&(I.outerHTML='',d((()=>i(f,{get category(){return C.functional},get cookieNameTable(){return window.cookiemeta.cookienameColumn},get hostNameTable(){return window.cookiemeta.cookiehostColumn},get persistenceNameTable(){return window.cookiemeta.cookiepersistenceColumn}})),document.getElementById("cbFunTable")));const A=document.getElementById("cbMarTable");A&&(A.outerHTML='',d((()=>i(f,{get category(){return C.marketing},get cookieNameTable(){return window.cookiemeta.cookienameColumn},get hostNameTable(){return window.cookiemeta.cookiehostColumn},get persistenceNameTable(){return window.cookiemeta.cookiepersistenceColumn}})),document.getElementById("cbMarTable")));
\ No newline at end of file
+var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,c=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,a=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&c(e,n,t[n]);if(o)for(var n of o(t))i.call(t,n)&&c(e,n,t[n]);return e};import{c as s,t as l,d,a as u,b as m,i as b,S as g,e as f,o as w,f as h,r as k}from"./cookiebanner-vendor.min.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const[p,v]=s({Req:[],Fun:[],Mar:[]});const y=l(""),T=l('