Socket
Socket
Sign inDemoInstall

@weahead/consent-manager

Package Overview
Dependencies
24
Maintainers
9
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.2 to 2.2.3

2

dist/components/Buttons/Button/Revoke.js

@@ -12,4 +12,4 @@ "use strict";

var actions = (0, useConstentManagerContext_1["default"])().actions;
return react_1["default"].createElement(_1["default"], { onClick: actions.revokeCookies }, children);
return (react_1["default"].createElement(_1["default"], { className: "cmp-secondary", onClick: actions.revokeCookies }, children));
}
exports["default"] = RevokeButton;

@@ -12,4 +12,5 @@ "use strict";

var _c = (0, useConstentManagerContext_1["default"])(), actions = _c.actions, cookies = _c.cookies, _d = cookieName, active = _c[_d];
var deactivated = disabled || (cookies === null || cookies === void 0 ? void 0 : cookies[cookieName]);
function triggerToggle() {
if (disabled || (cookies === null || cookies === void 0 ? void 0 : cookies[cookieName])) {
if (deactivated) {
return;

@@ -19,4 +20,4 @@ }

}
var toggleClassNames = "toggle ".concat(active ? 'toggle--check' : '', " ").concat(disabled || (cookies === null || cookies === void 0 ? void 0 : cookies[cookieName]) ? 'toggle--disabled' : '').trim();
return (react_1["default"].createElement("button", { className: toggleClassNames, id: "toggle", onClick: triggerToggle, "aria-pressed": cookies === null || cookies === void 0 ? void 0 : cookies[cookieName], "aria-disabled": disabled || (cookies === null || cookies === void 0 ? void 0 : cookies[cookieName]), "aria-label": ariaLabel },
var toggleClassNames = "toggle ".concat(active ? 'toggle--check' : '', " ").concat(deactivated ? 'toggle--disabled' : '').trim();
return (react_1["default"].createElement("button", { className: toggleClassNames, id: "toggle", onClick: triggerToggle, "aria-pressed": cookies === null || cookies === void 0 ? void 0 : cookies[cookieName], "aria-disabled": deactivated, "aria-label": ariaLabel },
react_1["default"].createElement("div", { className: "toggle-container", id: "toggle-container" },

@@ -23,0 +24,0 @@ react_1["default"].createElement("div", { id: "toggle-check", className: "toggle-check" }),

@@ -20,9 +20,8 @@ "use strict";

}
var allCookiesApproved = (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.analyticsKey]) && (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.externalKey]);
var showRevokeButton = (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.analyticsKey]) || (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.externalKey]);
return (react_1["default"].createElement("div", { className: "consent-button-container" },
react_1["default"].createElement(Button_1["default"], { className: "cmp-secondary", onClick: actions.setShowCookieSettings }, moreSettingsLabel),
react_1["default"].createElement(Button_1["default"], { disabled: allCookiesApproved, onClick: actions.approveAllCookies }, approveAllLabel),
showRevokeButton ? react_1["default"].createElement(Revoke_1["default"], null, revokeLabel) : null));
showRevokeButton ? react_1["default"].createElement(Revoke_1["default"], null, revokeLabel) : null,
react_1["default"].createElement(Button_1["default"], { onClick: actions.approveAllCookies }, approveAllLabel)));
}
exports["default"] = Buttons;

@@ -16,3 +16,3 @@ "use strict";

var showRevokeButton = (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.analyticsKey]) || (cookies === null || cookies === void 0 ? void 0 : cookies[keys_1.externalKey]);
return (react_1["default"].createElement("div", { className: "consent-button-container consent-button-container--show-more" },
return (react_1["default"].createElement("div", { className: "consent-button-container" },
react_1["default"].createElement(Button_1["default"], { onClick: actions.approveSelectionOfCookies }, approveLabel),

@@ -19,0 +19,0 @@ showRevokeButton ? react_1["default"].createElement(Revoke_1["default"], null, revokeLabel) : null));

import React from 'react';
import type { HeaderProps } from '../../../types/Header';
import './style.css';
export default function Header({ content, settingsContent, title, }: HeaderProps): React.ReactElement;
export default function Header({ content, settingsContent, title, policyLinkLabel, linkUrl, }: HeaderProps): React.ReactElement;

@@ -8,9 +8,11 @@ "use strict";

var Content_1 = __importDefault(require("./Content"));
var PolicyLink_1 = __importDefault(require("../PolicyLink"));
require("./style.css");
function Header(_a) {
var content = _a.content, settingsContent = _a.settingsContent, title = _a.title;
var content = _a.content, settingsContent = _a.settingsContent, title = _a.title, policyLinkLabel = _a.policyLinkLabel, linkUrl = _a.linkUrl;
return (react_1["default"].createElement("header", { className: "consent-header" },
react_1["default"].createElement("h3", { className: "consent-heading", id: "consentModalTitle" }, title),
react_1["default"].createElement(Content_1["default"], { content: content, settingsContent: settingsContent })));
react_1["default"].createElement(Content_1["default"], { content: content, settingsContent: settingsContent }),
react_1["default"].createElement(PolicyLink_1["default"], { policyLinkLabel: policyLinkLabel, linkUrl: linkUrl })));
}
exports["default"] = Header;

@@ -13,3 +13,2 @@ "use strict";

var Content_1 = __importDefault(require("./Settings/Content"));
var PolicyLink_1 = __importDefault(require("./PolicyLink"));
require("./style.css");

@@ -22,4 +21,3 @@ function ConsentModal(_a) {

react_1["default"].createElement("div", { className: "consent-modal", role: "dialog", "aria-labelledby": "consentModalTitle", "aria-describedby": "consentModalContent", "aria-modal": "true" },
react_1["default"].createElement(Header_1["default"], { content: content, settingsContent: settingsContent, title: title }),
react_1["default"].createElement(PolicyLink_1["default"], { policyLinkLabel: policyLinkLabel, linkUrl: linkUrl }),
react_1["default"].createElement(Header_1["default"], { content: content, settingsContent: settingsContent, title: title, policyLinkLabel: policyLinkLabel, linkUrl: linkUrl }),
react_1["default"].createElement(Content_1["default"], { requiredText: requiredText, analyticsLabel: analyticsLabel, externalLabel: externalLabel, functionLabel: functionLabel }),

@@ -26,0 +24,0 @@ react_1["default"].createElement(Buttons_1["default"], { approveAllLabel: approveAllLabel, approveLabel: approveLabel, moreSettingsLabel: moreSettingsLabel, revokeLabel: revokeLabel }))))));

@@ -12,2 +12,4 @@ export declare type HeaderContentProps = {

title: string;
linkUrl: string;
policyLinkLabel: string;
};
{
"name": "@weahead/consent-manager",
"version": "2.2.2",
"version": "2.2.3",
"author": "Weahead AB <alla@weahead.se>",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -14,2 +14,4 @@ export type HeaderContentProps = {

title: string
linkUrl: string
policyLinkLabel: string
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc