diff --git a/package.json b/package.json index 7b925981..d3b35462 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "serve build -s -c 1", "prestart": "npm run build", "build": "cross-env NODE_ENV=production webpack --progress", + "dev-build": "cross-env NODE_ENV=development webpack --progress", "prebuild": "npm run clean && mkdirp build", "test": "npm run -s lint && jest --coverage", "test:watch": "npm run -s test -- --watch", diff --git a/src/components/popup/details/details.jsx b/src/components/popup/details/details.jsx index 44f5c9b1..ef92a8e2 100644 --- a/src/components/popup/details/details.jsx +++ b/src/components/popup/details/details.jsx @@ -91,6 +91,19 @@ export default class Details extends Component { }; }; + handleSaveAndGo = () => { + const { store } = this.props; + store.selectAllVendors(true); + store.selectAllVendorLegitimateInterests(true); + store.selectAllPurposes(true); + store.selectAllPurposesLegitimateInterests(true); + store.selectAllSpecialFeatureOptins(true); + store.selectAllPublisherPurposes(true); + store.selectAllPublisherLegitimateInterests(true); + store.setAllContractPurposes(false); + this.props.onSaveOrClose(); + }; + render(props, state) { const { onSaveOrClose, @@ -194,6 +207,8 @@ export default class Details extends Component { localizeKey='back'>Back + { window.__tcfConfig.showAgreeAndGoButton && } ); diff --git a/src/components/popup/details/details.less b/src/components/popup/details/details.less index 4174e813..17508ca1 100644 --- a/src/components/popup/details/details.less +++ b/src/components/popup/details/details.less @@ -36,6 +36,12 @@ margin-right: 20px; width: 205px; } + + .saveAndGo { + margin-right: 20px; + width: 270px; + } + .cancel { margin-right: 25px; background: none; diff --git a/src/components/popup/intro/intro.jsx b/src/components/popup/intro/intro.jsx index 2f872fb5..8b07a9cf 100644 --- a/src/components/popup/intro/intro.jsx +++ b/src/components/popup/intro/intro.jsx @@ -29,6 +29,7 @@ export default class Intro extends Component { const { onAcceptAll, + onDontAgree, onShowPurposes } = props; @@ -64,6 +65,13 @@ export default class Intro extends Component { > Got it, thanks! + { window.__tcfConfig.showDontAgreeButton && } ); diff --git a/src/components/popup/intro/intro.less b/src/components/popup/intro/intro.less index 913b864c..3a6b86b6 100644 --- a/src/components/popup/intro/intro.less +++ b/src/components/popup/intro/intro.less @@ -74,6 +74,11 @@ div.intro { .acceptAll { flex: 1; } + + .dontAgree { + flex: 1; + margin-left: 10px; + } } .intro { diff --git a/src/components/popup/popup.jsx b/src/components/popup/popup.jsx index 926534a7..d99f49a4 100644 --- a/src/components/popup/popup.jsx +++ b/src/components/popup/popup.jsx @@ -33,6 +33,12 @@ export default class Popup extends Component { this.onCancel() }; + handleDontAgree = () => { + const { store, onSave } = this.props; + store.initialVendorsRejection(); + onSave(); + }; + render(props) { const { store } = props; const { isConsentToolShowing, section } = store; @@ -50,6 +56,7 @@ export default class Popup extends Component {
{ + this.setCustomVendorsConsent(false); + this.selectAllVendors(false); + }; + selectPurpose = (purposeId, isSelected) => { const {contractPurposeIds} = config; const {purposeConsents} = this.tcModel;