@adv-ui/universal-consents-cookies-widget
Advanced tools
Comparing version 1.28.0 to 1.29.0
@@ -1,2 +0,1 @@ | ||
import './widget.js'; | ||
import './index.scss'; | ||
import"./widget.js";import"./index.scss"; |
@@ -1,8 +0,1 @@ | ||
var _ref = window.__mpi || {}, | ||
_ref$universalConsent = _ref.universalConsentsCookiesWidget, | ||
universalConsentsCookiesWidget = _ref$universalConsent === void 0 ? {} : _ref$universalConsent; | ||
var _universalConsentsCoo = universalConsentsCookiesWidget.cookiePolicyUrl, | ||
cookiePolicyUrl = _universalConsentsCoo === void 0 ? null : _universalConsentsCoo, | ||
_universalConsentsCoo2 = universalConsentsCookiesWidget.logo, | ||
logo = _universalConsentsCoo2 === void 0 ? 'https://c.dcdn.es/logos/adevinta_blue.png' : _universalConsentsCoo2; | ||
export { cookiePolicyUrl, logo }; | ||
var ref=window.__mpi||{},_universalConsentsCookiesWidget=ref.universalConsentsCookiesWidget,universalConsentsCookiesWidget=_universalConsentsCookiesWidget===void 0?{}:_universalConsentsCookiesWidget;export var _cookiePolicyUrl=universalConsentsCookiesWidget.cookiePolicyUrl,cookiePolicyUrl=_cookiePolicyUrl===void 0?null:_cookiePolicyUrl,_logo=universalConsentsCookiesWidget.logo,logo=_logo===void 0?"https://c.dcdn.es/logos/adevinta_blue.png":_logo,site=universalConsentsCookiesWidget.site; |
@@ -1,12 +0,1 @@ | ||
/** | ||
* @param type Event type (i.e. 'click') | ||
*/ | ||
export default function dispatchEvent(type) { | ||
if (document.createEvent) { | ||
var event = new Event(type); | ||
document.dispatchEvent(event); | ||
} else { | ||
var _event = document.createEventObject(); | ||
document.fireEvent('on' + type, _event); | ||
} | ||
} | ||
export default function dispatchEvent(type){if(document.createEvent){var event=new Event(type);document.dispatchEvent(event)}else{var event1=document.createEventObject();document.fireEvent("on"+type,event1)}} |
@@ -1,12 +0,1 @@ | ||
/* eslint-disable react/prop-types */ | ||
import TcfUi, { showPurposes } from '@adv-ui/adit-boros-tcf-ui-consent'; | ||
import { cookiePolicyUrl, logo } from './config.js'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
export default function TcfWidget() { | ||
return /*#__PURE__*/_jsx(TcfUi, { | ||
cookiePolicyUrl: cookiePolicyUrl, | ||
logo: logo | ||
}); | ||
} | ||
TcfWidget.displayName = 'TcfWidget'; | ||
export { showPurposes }; | ||
import{jsx as _jsx}from"react/jsx-runtime";import TcfUi,{showPurposes}from"@adv-ui/adit-boros-tcf-ui-consent";import{cookiePolicyUrl,logo,site}from"./config.js";export default function TcfWidget(){return _jsx(TcfUi,{cookiePolicyUrl:cookiePolicyUrl,logo:logo,site:site})}TcfWidget.displayName="TcfWidget";export{showPurposes}; |
@@ -1,15 +0,1 @@ | ||
import TcfWidget, { showPurposes } from './TcfWidget.js'; | ||
import { render } from 'react-dom'; | ||
import dispatchEvent from './dispatchEvent'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
var OPEN_CONSENTS_WIDGET_EVENT = '__callUniversalConsentsCookiesWidget'; | ||
var element = document.getElementById('adevinta_consents_cookies_universal_widget'); | ||
if (element) render( /*#__PURE__*/_jsx(TcfWidget, {}, Math.random()), element); | ||
window.__callUniversalConsentsCookiesWidget = function () { | ||
return dispatchEvent(OPEN_CONSENTS_WIDGET_EVENT); | ||
}; | ||
document.addEventListener(OPEN_CONSENTS_WIDGET_EVENT, function () { | ||
if (element) { | ||
showPurposes(); | ||
} | ||
}); | ||
import{jsx as _jsx}from"react/jsx-runtime";import TcfWidget,{showPurposes}from"./TcfWidget.js";import{render}from"react-dom";import dispatchEvent from"./dispatchEvent";var OPEN_CONSENTS_WIDGET_EVENT="__callUniversalConsentsCookiesWidget";var element=document.getElementById("adevinta_consents_cookies_universal_widget");if(element)render(_jsx(TcfWidget,{},Math.random()),element);window.__callUniversalConsentsCookiesWidget=function(){return dispatchEvent(OPEN_CONSENTS_WIDGET_EVENT)};document.addEventListener(OPEN_CONSENTS_WIDGET_EVENT,function(){if(element){showPurposes()}}); |
{ | ||
"name": "@adv-ui/universal-consents-cookies-widget", | ||
"version": "1.28.0", | ||
"version": "1.29.0", | ||
"description": "", | ||
@@ -11,6 +11,7 @@ "main": "lib/app.js", | ||
"scripts": { | ||
"ci": "npm ci --prefer-offline --no-audit --no-fund --production=false --ignore-scripts", | ||
"build": "sui-bundler build", | ||
"co": "sui-mono commit", | ||
"dev": "sui-bundler dev", | ||
"lib:js": "npx rimraf ./lib && npx mkdirp ./lib && babel --presets sui ./src --out-dir ./lib", | ||
"lib:js": "rm -rf ./lib && sui-js-compiler", | ||
"lib:scss": "node scripts/copy-scss-to-umd.js", | ||
@@ -28,3 +29,3 @@ "lib": "npm run lib:js && npm run lib:scss", | ||
"type": "git", | ||
"url": "git@github.mpi-internal.com:miguelangel-duran/frontend-all--consents-cookies-widget-pack.git" | ||
"url": "git@github.mpi-internal.com:scmspain/frontend-all--consents-cookies-widget-pack.git" | ||
}, | ||
@@ -35,17 +36,17 @@ "keywords": [], | ||
"devDependencies": { | ||
"@babel/cli": "7", | ||
"@s-ui/bundler": "7", | ||
"@s-ui/lint": "3", | ||
"@s-ui/mono": "1", | ||
"@s-ui/bundler": "9", | ||
"@s-ui/js-compiler": "1", | ||
"@s-ui/lint": "4", | ||
"@s-ui/mono": "2", | ||
"@s-ui/precommit": "2", | ||
"glob": "7.1.6", | ||
"glob": "10.3.10", | ||
"husky": "4.3.0" | ||
}, | ||
"dependencies": { | ||
"@adv-ui/adit-boros-tcf-ui-consent": "3.19", | ||
"@adv-ui/adit-boros-tcf-ui-consent": "3", | ||
"@adv-ui/vendor-by-consents-loader": "1", | ||
"@s-ui/react-context": "1", | ||
"@s-ui/segment-wrapper": "3", | ||
"react": "17.0.1", | ||
"react-dom": "17.0.1" | ||
"react": "17", | ||
"react-dom": "17" | ||
}, | ||
@@ -64,17 +65,4 @@ "eslintConfig": { | ||
"access": "public" | ||
}, | ||
"validate-commit-msg": { | ||
"types": "@s-ui/mono/src/types" | ||
} | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"sui" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "sui-precommit run" | ||
} | ||
} | ||
} |
@@ -13,2 +13,4 @@ # @adv-ui/universal-consents-cookies-widget [![Build Status](https://travis.mpi-internal.com/scmspain/frontend-all--consents-cookies-widget-pack.svg?token=rg6VMzkvzMeJr1v4tr6s&branch=master)](https://travis.mpi-internal.com/scmspain/frontend-all--consents-cookies-widget-pack) | ||
‼️ Do not duplicate the first line(stub) several times. It's only needed once. | ||
Also, you need to have a `div` element with the needed `id` where the widget will be rendered. Please, try to keep this div on the root level of your `body` in order to avoid problems with the modal. | ||
@@ -47,3 +49,4 @@ | ||
cookiePolicyUrl: 'https://your-domain.com/cookie-policy?disable-cmp', | ||
logo: 'https://your-domain.com/your-awesome-logo.png' | ||
logo: 'https://your-domain.com/your-awesome-logo.png', | ||
site: 'fotocasa' | ||
} | ||
@@ -54,4 +57,11 @@ </script> | ||
**site** | ||
The allowed sites are a map to resolve the notice id. Check [here](https://github.mpi-internal.com/scmspain/frontend-adit--onepunch/blob/a94f46a00f222067ac6b3672f20f3259a0b10c2d/packages/boros/components/ui/consent/src/settings.js#L1) | ||
If you consider that you need to add a new site(because some configuration is different than the vertical main site), please, contact with Advertising IT team on Slack channel `#es-advertising-it-help`. | ||
**cookiePolicyUrl** | ||
🚧 This is not working properly now. The cookie policy is set in the notice on the Didomi console. | ||
- if set, will add a link to the cookie policy page, openend in a new tab | ||
@@ -58,0 +68,0 @@ - use the `disable-cmp` query param to disable the CMP if it's included in the cookie policy page |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1508
149
4
570638
10
74
3
+ Addedreact@17.0.2(transitive)
+ Addedreact-dom@17.0.2(transitive)
- Removedreact@17.0.1(transitive)
- Removedreact-dom@17.0.1(transitive)
Updatedreact@17
Updatedreact-dom@17