Browse Source

adding

master
Björn 4 years ago
parent
commit
55ce39ad7a
4 changed files with 28 additions and 9 deletions
  1. +1
    -1
      dist/js/demo.js
  2. +16
    -1
      package-lock.json
  3. +2
    -1
      package.json
  4. +9
    -6
      src/TinyConsent.riot

+ 1
- 1
dist/js/demo.js
File diff suppressed because it is too large
View File


+ 16
- 1
package-lock.json View File

@ -1,6 +1,6 @@
{ {
"name": "tiny-consent", "name": "tiny-consent",
"version": "1.0.0",
"version": "1.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1439,6 +1439,21 @@
} }
} }
}, },
"assign-deep": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/assign-deep/-/assign-deep-1.0.1.tgz",
"integrity": "sha512-CSXAX79mibneEYfqLT5FEmkqR5WXF+xDRjgQQuVf6wSCXCYU8/vHttPidNar7wJ5BFmKAo8Wei0rCtzb+M/yeA==",
"requires": {
"assign-symbols": "^2.0.2"
},
"dependencies": {
"assign-symbols": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-2.0.2.tgz",
"integrity": "sha512-9sBQUQZMKFKcO/C3Bo6Rx4CQany0R0UeVcefNGRRdW2vbmaMOhV1sbmlXcQLcD56juLXbSGTBm0GGuvmrAF8pA=="
}
}
},
"assign-symbols": { "assign-symbols": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",


+ 2
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "tiny-consent", "name": "tiny-consent",
"version": "1.1.0",
"version": "1.1.1",
"description": "Consent Banner for GDPR with RiotJS, part of Tiny-Components", "description": "Consent Banner for GDPR with RiotJS, part of Tiny-Components",
"scripts": { "scripts": {
"dev": "npm run development", "dev": "npm run development",
@ -18,6 +18,7 @@
"author": "Björn Hase", "author": "Björn Hase",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"assign-deep": "^1.0.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"riot": "^4.8.*" "riot": "^4.8.*"
}, },


+ 9
- 6
src/TinyConsent.riot View File

@ -62,6 +62,7 @@
<script> <script>
import Cookie from 'js-cookie'; import Cookie from 'js-cookie';
import assign from 'assign-deep';
/** /**
* tiny-consent.riot * tiny-consent.riot
@ -122,8 +123,9 @@
/** /**
* *
* @param {[type]} cookie [description]
* @return {[type]} [description]
*
* @param {Object} cookie
* @return {String}
*/ */
getAgreeClasses(cookie) getAgreeClasses(cookie)
{ {
@ -246,11 +248,12 @@
this.root.firstChild.style.bottom = '0px'; this.root.firstChild.style.bottom = '0px';
} }
}); });
},
push()
{
const essential = this.$('.button--ok.tiny-consent__button:not([disabled])');
if (essential) {
essential.click();
}
}, },
/** /**
@ -262,7 +265,7 @@
const data = this.getData(); const data = this.getData();
if (this.props.options) { if (this.props.options) {
this.state.options = Object.assign(this.state.options, this.props.options);
this.state.options = assign(this.state.options, this.props.options);
} }
// check if consent already has set // check if consent already has set


Loading…
Cancel
Save