From 2abbb06daf22151e378334f5e2ef9389ff5b8025 Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Fri, 3 Dec 2021 11:24:23 +0000 Subject: [PATCH 1/7] Fix compliance cookie not deleting if domain specified as .example.com --- src/stores.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores.js b/src/stores.js index 17cdb8d2..2bded1d5 100644 --- a/src/stores.js +++ b/src/stores.js @@ -39,7 +39,7 @@ export class CookieStore { } delete() { - return deleteCookie(this.cookieName); + return deleteCookie(this.cookieName, this.cookiePath, this.cookieDomain); } } From dc6901731c21e34da7047687a3345fc212e6015b Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Fri, 3 Dec 2021 11:34:23 +0000 Subject: [PATCH 2/7] Fix compliance cookie not deleting if domain specified as .example.com --- src/stores.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores.js b/src/stores.js index 17cdb8d2..2bded1d5 100644 --- a/src/stores.js +++ b/src/stores.js @@ -39,7 +39,7 @@ export class CookieStore { } delete() { - return deleteCookie(this.cookieName); + return deleteCookie(this.cookieName, this.cookiePath, this.cookieDomain); } } From 9665f5b1d53e016e196555b8d64557336baa7bc4 Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Mon, 20 Dec 2021 16:53:40 +0000 Subject: [PATCH 3/7] https://github.com/kiprotect/klaro/issues/420 Revert focus on change --- src/components/consent-notice.jsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/consent-notice.jsx b/src/components/consent-notice.jsx index c783e4f1..8359ba96 100644 --- a/src/components/consent-notice.jsx +++ b/src/components/consent-notice.jsx @@ -16,10 +16,6 @@ export default class ConsentNotice extends React.Component { componentDidUpdate(prevProps) { if (prevProps.modal !== this.props.modal) this.setState({ modal: this.props.modal }); - - if (this.noticeRef) { - this.noticeRef.focus(); - } } executeButtonClicked = (setChangedAll, changedAllValue, eventType) => { @@ -113,12 +109,6 @@ export default class ConsentNotice extends React.Component { if (config.mustConsent && !config.acceptAll) return; if (manager.confirmed && !testing) this.props.hide(); else this.setState({ modal: false }); - - setTimeout(() => { - if (this.noticeRef) { - this.noticeRef.focus(); - } - }, 1); }; let changesText; From a4170cc3a83e2d18a110688283e3e8dc37088fb8 Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Mon, 20 Dec 2021 17:02:48 +0000 Subject: [PATCH 4/7] v0.7.19 --- .gitignore | 1 + README.md | 2 + dist/cm.js | 2 +- dist/ide.js | 4 +- dist/klaro-no-css.js | 2 +- dist/klaro-no-translations-no-css.js | 2 +- dist/klaro-no-translations.js | 2 +- dist/klaro.js | 2 +- dist/translations.js | 2 +- examples/klaro-and-webpack/dist/index.html | 2 +- examples/klaro-and-webpack/dist/main.js | 59 +- examples/klaro-and-webpack/package-lock.json | 23970 ++++++++++++++++- examples/klaro-and-webpack/package.json | 1 + examples/klaro-and-webpack/src/index.js | 20 +- nbproject/project.properties | 3 + nbproject/project.xml | 9 + package-lock.json | 10 +- package.json | 2 +- releases.json | 48 + releases.yml | 27 + 20 files changed, 23367 insertions(+), 803 deletions(-) create mode 100644 nbproject/project.properties create mode 100644 nbproject/project.xml diff --git a/.gitignore b/.gitignore index ec86a9c4..15da4caf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build __pycache__ node_modules yarn.lock +/nbproject/private/ diff --git a/README.md b/README.md index 6ff20dcf..d14522d8 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,8 @@ If you want to customize Klaro or extend it, you can build it from scratch using npm install npm run-script make-dev #will run a development server npm run-script make #will build the production version + +SEPARATE_CSS=1 npm run-script make #will build the production version with no css ``` If you have an environment where `make` is available, you can also run diff --git a/dist/cm.js b/dist/cm.js index 382c72b6..2d398d4f 100644 --- a/dist/cm.js +++ b/dist/cm.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cm",[],e):"object"==typeof exports?exports.cm=e():t.cm=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=131)}([function(t,e,n){var r=n(3),o=n(59),i=n(5),c=n(47),u=n(62),a=n(88),s=o("wks"),f=r.Symbol,l=a?f:f&&f.withoutSetter||c;t.exports=function(t){return i(s,t)||(u&&i(f,t)?s[t]=f[t]:s[t]=l("Symbol."+t)),s[t]}},function(t,e,n){var r=n(3),o=n(31).f,i=n(19),c=n(22),u=n(58),a=n(84),s=n(61);t.exports=function(t,e){var n,f,l,p,v,h=t.target,y=t.global,d=t.stat;if(n=y?r:d?r[h]||u(h,{}):(r[h]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(v=o(n,f))&&v.value:n[f],!s(y?f:h+(d?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;a(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),c(n,f,p,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(133))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";var r=n(21),o=n(93),i=n(38),c=n(28),u=n(65),a=c.set,s=c.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){a(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){"use strict";var r=n(1),o=n(3),i=n(30),c=n(32),u=n(8),a=n(62),s=n(88),f=n(2),l=n(5),p=n(55),v=n(4),h=n(9),y=n(25),d=n(21),g=n(45),m=n(33),b=n(36),x=n(48),S=n(50),O=n(135),w=n(76),E=n(31),k=n(11),j=n(57),A=n(19),P=n(22),C=n(59),T=n(46),I=n(35),R=n(47),_=n(0),D=n(89),N=n(90),M=n(37),L=n(28),F=n(56).forEach,U=T("hidden"),$=_("toPrimitive"),z=L.set,W=L.getterFor("Symbol"),G=Object.prototype,B=o.Symbol,K=i("JSON","stringify"),q=E.f,V=k.f,Y=O.f,H=j.f,J=C("symbols"),Q=C("op-symbols"),X=C("string-to-symbol-registry"),Z=C("symbol-to-string-registry"),tt=C("wks"),et=o.QObject,nt=!et||!et.prototype||!et.prototype.findChild,rt=u&&f((function(){return 7!=b(V({},"a",{get:function(){return V(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=q(G,e);r&&delete G[e],V(t,e,n),r&&t!==G&&V(G,e,r)}:V,ot=function(t,e){var n=J[t]=b(B.prototype);return z(n,{type:"Symbol",tag:t,description:e}),u||(n.description=e),n},it=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof B},ct=function(t,e,n){t===G&&ct(Q,e,n),h(t);var r=g(e,!0);return h(n),l(J,r)?(n.enumerable?(l(t,U)&&t[U][r]&&(t[U][r]=!1),n=b(n,{enumerable:m(0,!1)})):(l(t,U)||V(t,U,m(1,{})),t[U][r]=!0),rt(t,r,n)):V(t,r,n)},ut=function(t,e){h(t);var n=d(e),r=x(n).concat(lt(n));return F(r,(function(e){u&&!at.call(n,e)||ct(t,e,n[e])})),t},at=function(t){var e=g(t,!0),n=H.call(this,e);return!(this===G&&l(J,e)&&!l(Q,e))&&(!(n||!l(this,e)||!l(J,e)||l(this,U)&&this[U][e])||n)},st=function(t,e){var n=d(t),r=g(e,!0);if(n!==G||!l(J,r)||l(Q,r)){var o=q(n,r);return!o||!l(J,r)||l(n,U)&&n[U][r]||(o.enumerable=!0),o}},ft=function(t){var e=Y(d(t)),n=[];return F(e,(function(t){l(J,t)||l(I,t)||n.push(t)})),n},lt=function(t){var e=t===G,n=Y(e?Q:d(t)),r=[];return F(n,(function(t){!l(J,t)||e&&!l(G,t)||r.push(J[t])})),r};(a||(P((B=function(){if(this instanceof B)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=R(t),n=function(t){this===G&&n.call(Q,t),l(this,U)&&l(this[U],e)&&(this[U][e]=!1),rt(this,e,m(1,t))};return u&&nt&&rt(G,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return W(this).tag})),P(B,"withoutSetter",(function(t){return ot(R(t),t)})),j.f=at,k.f=ct,E.f=st,S.f=O.f=ft,w.f=lt,D.f=function(t){return ot(_(t),t)},u&&(V(B.prototype,"description",{configurable:!0,get:function(){return W(this).description}}),c||P(G,"propertyIsEnumerable",at,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!a,sham:!a},{Symbol:B}),F(x(tt),(function(t){N(t)})),r({target:"Symbol",stat:!0,forced:!a},{for:function(t){var e=String(t);if(l(X,e))return X[e];var n=B(e);return X[e]=n,Z[n]=e,n},keyFor:function(t){if(!it(t))throw TypeError(t+" is not a symbol");if(l(Z,t))return Z[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!a,sham:!u},{create:function(t,e){return void 0===e?b(t):ut(b(t),e)},defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:st}),r({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ft,getOwnPropertySymbols:lt}),r({target:"Object",stat:!0,forced:f((function(){w.f(1)}))},{getOwnPropertySymbols:function(t){return w.f(y(t))}}),K)&&r({target:"JSON",stat:!0,forced:!a||f((function(){var t=B();return"[null]"!=K([t])||"{}"!=K({a:t})||"{}"!=K(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(v(e)||void 0!==t)&&!it(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!it(e))return e}),o[1]=e,K.apply(null,o)}});B.prototype[$]||A(B.prototype,$,B.prototype.valueOf),M(B,"Symbol"),I[U]=!0},function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(64),o=n(22),i=n(141);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){var r=n(8),o=n(82),i=n(9),c=n(45),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=c(e,!0),i(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var r=n(1),o=n(8),i=n(3),c=n(5),u=n(4),a=n(11).f,s=n(84),f=i.Symbol;if(o&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new f(t):void 0===t?f():f(t);return""===t&&(l[e]=!0),e};s(p,f);var v=p.prototype=f.prototype;v.constructor=p;var h=v.toString,y="Symbol(test)"==String(f("test")),d=/^Symbol\((.*)\)[^)]+$/;a(v,"description",{configurable:!0,get:function(){var t=u(this)?this.valueOf():this,e=h.call(t);if(c(l,t))return"";var n=y?e.slice(7,-1):e.replace(d,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(t,e,n){"use strict";var r=n(98).charAt,o=n(28),i=n(65),c=o.set,u=o.getterFor("String Iterator");i(String,"String",(function(t){c(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){n(90)("iterator")},function(t,e,n){"use strict";var r=n(22),o=n(9),i=n(2),c=n(107),u=RegExp.prototype,a=u.toString,s=i((function(){return"/a/b"!=a.call({source:"a",flags:"b"})})),f="toString"!=a.name;(s||f)&&r(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in u)?c.call(t):n)}),{unsafe:!0})},function(t,e,n){var r=n(3),o=n(112),i=n(6),c=n(19),u=n(0),a=u("iterator"),s=u("toStringTag"),f=i.values;for(var l in o){var p=r[l],v=p&&p.prototype;if(v){if(v[a]!==f)try{c(v,a,f)}catch(t){v[a]=f}if(v[s]||c(v,s,l),o[l])for(var h in i)if(v[h]!==i[h])try{c(v,h,i[h])}catch(t){v[h]=i[h]}}}},function(t,e,n){var r=n(8),o=n(11).f,i=Function.prototype,c=i.toString,u=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return c.call(this).match(u)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(1),o=n(4),i=n(55),c=n(101),u=n(24),a=n(21),s=n(63),f=n(0),l=n(77),p=n(53),v=l("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),y=f("species"),d=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!v||!h},{slice:function(t,e){var n,r,f,l=a(this),p=u(l.length),v=c(t,p),h=c(void 0===e?p:e,p);if(i(l)&&("function"!=typeof(n=l.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[y])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(l,v,h);for(r=new(void 0===n?Array:n)(g(h-v,0)),f=0;v1?arguments[1]:void 0)}})},function(t,e,n){var r=n(51),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(27);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(55),c=n(4),u=n(25),a=n(24),s=n(63),f=n(102),l=n(77),p=n(0),v=n(119),h=p("isConcatSpreadable"),y=v>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),d=l("concat"),g=function(t){if(!c(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!y||!d},{concat:function(t){var e,n,r,o,i,c=u(this),l=f(c,0),p=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(l,p++,i)}return l.length=p,l}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r,o,i,c=n(134),u=n(3),a=n(4),s=n(19),f=n(5),l=n(46),p=n(35),v=u.WeakMap;if(c){var h=new v,y=h.get,d=h.has,g=h.set;r=function(t,e){return g.call(h,t,e),e},o=function(t){return y.call(h,t)||{}},i=function(t){return d.call(h,t)}}else{var m=l("state");p[m]=!0,r=function(t,e){return s(t,m,e),e},o=function(t){return f(t,m)?t[m]:{}},i=function(t){return f(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!a(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},,function(t,e,n){var r=n(85),o=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(8),o=n(57),i=n(33),c=n(21),u=n(45),a=n(5),s=n(82),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=c(t),e=u(e,!0),s)try{return f(t,e)}catch(t){}if(a(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r,o=n(9),i=n(117),c=n(60),u=n(35),a=n(118),s=n(74),f=n(46),l=f("IE_PROTO"),p=function(){},v=function(t){return"