UNPKG

@sonofatailor/consent-manager

Version:

Drop-in consent management plugin for analytics.js

291 lines 23.4 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; import { Component } from 'react'; import { loadPreferences, savePreferences } from './preferences'; import fetchDestinations from './fetch-destinations'; import conditionallyLoadAnalytics from './analytics'; function getNewDestinations(destinations, preferences) { var newDestinations = []; // If there are no preferences then all destinations are new if (!preferences) { return destinations; } for (var _i = 0, destinations_1 = destinations; _i < destinations_1.length; _i++) { var destination = destinations_1[_i]; if (preferences[destination.id] === undefined) { newDestinations.push(destination); } } return newDestinations; } var ConsentManagerBuilder = /** @class */ (function (_super) { __extends(ConsentManagerBuilder, _super); function ConsentManagerBuilder() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.state = { isLoading: true, destinations: [], newDestinations: [], preferences: {}, isConsentRequired: true }; _this.initialise = function () { return __awaiter(_this, void 0, void 0, function () { var _a, writeKey, externalDestinations, _b, otherWriteKeys, _c, shouldRequireConsent, initialPreferences, mapCustomPreferences, _d, integrationsExcludedFromLoading, _e, _f, destinationPreferences, customPreferences, _g, isConsentRequired, destinations, newDestinations, preferences, hasInitialPreferenceToTrue, emptyCustomPreferecences, mapped; return __generator(this, function (_h) { switch (_h.label) { case 0: _a = this.props, writeKey = _a.writeKey, externalDestinations = _a.externalDestinations, _b = _a.otherWriteKeys, otherWriteKeys = _b === void 0 ? ConsentManagerBuilder.defaultProps.otherWriteKeys : _b, _c = _a.shouldRequireConsent, shouldRequireConsent = _c === void 0 ? ConsentManagerBuilder.defaultProps.shouldRequireConsent : _c, initialPreferences = _a.initialPreferences, mapCustomPreferences = _a.mapCustomPreferences, _d = _a.integrationsExcludedFromLoading, integrationsExcludedFromLoading = _d === void 0 ? [] : _d; _e = loadPreferences(), _f = _e.destinationPreferences, destinationPreferences = _f === void 0 ? {} : _f, customPreferences = _e.customPreferences; return [4 /*yield*/, Promise.all([ shouldRequireConsent(), fetchDestinations(__spreadArrays([writeKey], otherWriteKeys), externalDestinations || []) ])]; case 1: _g = _h.sent(), isConsentRequired = _g[0], destinations = _g[1]; newDestinations = getNewDestinations(destinations, destinationPreferences); if (mapCustomPreferences) { preferences = customPreferences || initialPreferences || {}; hasInitialPreferenceToTrue = Object.values(initialPreferences || {}).some(Boolean); emptyCustomPreferecences = Object.values(customPreferences || {}).every(function (v) { return v === null || v === undefined; }); if (hasInitialPreferenceToTrue && emptyCustomPreferecences) { mapped = mapCustomPreferences(destinations, preferences); destinationPreferences = mapped.destinationPreferences; customPreferences = mapped.customPreferences; } } else { preferences = destinationPreferences || initialPreferences; } conditionallyLoadAnalytics({ writeKey: writeKey, destinations: destinations, destinationPreferences: destinationPreferences, externalDestinations: externalDestinations, isConsentRequired: isConsentRequired, integrationsExcludedFromLoading: integrationsExcludedFromLoading, }); this.setState({ isLoading: false, destinations: destinations, newDestinations: newDestinations, preferences: preferences, isConsentRequired: isConsentRequired }); return [2 /*return*/]; } }); }); }; _this.handleSetPreferences = function (newPreferences) { _this.setState(function (prevState) { var destinations = prevState.destinations, existingPreferences = prevState.preferences; var preferences = _this.mergePreferences({ destinations: destinations, newPreferences: newPreferences, existingPreferences: existingPreferences }); return __assign(__assign({}, prevState), { preferences: preferences }); }); }; _this.handleResetPreferences = function () { var _a = _this.props, initialPreferences = _a.initialPreferences, mapCustomPreferences = _a.mapCustomPreferences; var _b = loadPreferences(), destinationPreferences = _b.destinationPreferences, customPreferences = _b.customPreferences; var preferences; if (mapCustomPreferences) { preferences = customPreferences || initialPreferences; } else { preferences = destinationPreferences || initialPreferences; } _this.setState({ preferences: preferences }); }; _this.handleSaveConsent = function (newPreferences, shouldReload) { var _a = _this.props, writeKey = _a.writeKey, externalDestinations = _a.externalDestinations, cookieDomain = _a.cookieDomain, mapCustomPreferences = _a.mapCustomPreferences, _b = _a.integrationsExcludedFromLoading, integrationsExcludedFromLoading = _b === void 0 ? [] : _b; _this.setState(function (prevState) { var destinations = prevState.destinations, existingPreferences = prevState.preferences, isConsentRequired = prevState.isConsentRequired; var preferences = _this.mergePreferences({ destinations: destinations, newPreferences: newPreferences, existingPreferences: existingPreferences }); var destinationPreferences; var customPreferences; if (mapCustomPreferences) { var custom = mapCustomPreferences(destinations, preferences); destinationPreferences = custom.destinationPreferences; customPreferences = custom.customPreferences; if (customPreferences) { // Allow the customPreferences to be updated from mapCustomPreferences preferences = customPreferences; } else { // Make returning the customPreferences from mapCustomPreferences optional customPreferences = preferences; } } else { destinationPreferences = preferences; } var newDestinations = getNewDestinations(destinations, destinationPreferences); savePreferences({ destinationPreferences: destinationPreferences, customPreferences: customPreferences, cookieDomain: cookieDomain, integrationsExcludedFromLoading: integrationsExcludedFromLoading, }); conditionallyLoadAnalytics({ writeKey: writeKey, destinations: destinations, destinationPreferences: destinationPreferences, externalDestinations: externalDestinations, isConsentRequired: isConsentRequired, shouldReload: shouldReload, integrationsExcludedFromLoading: integrationsExcludedFromLoading, }); return __assign(__assign({}, prevState), { destinationPreferences: destinationPreferences, preferences: preferences, newDestinations: newDestinations }); }); }; _this.mergePreferences = function (args) { var destinations = args.destinations, existingPreferences = args.existingPreferences, newPreferences = args.newPreferences; var preferences; if (typeof newPreferences === 'boolean') { var destinationPreferences = {}; for (var _i = 0, destinations_2 = destinations; _i < destinations_2.length; _i++) { var destination = destinations_2[_i]; destinationPreferences[destination.id] = newPreferences; } preferences = destinationPreferences; } else if (newPreferences) { preferences = __assign(__assign({}, existingPreferences), newPreferences); } else { preferences = existingPreferences; } return preferences; }; return _this; } ConsentManagerBuilder.prototype.render = function () { var _a = this.props, children = _a.children, customCategories = _a.customCategories; var _b = this.state, isLoading = _b.isLoading, destinations = _b.destinations, preferences = _b.preferences, newDestinations = _b.newDestinations, isConsentRequired = _b.isConsentRequired; if (isLoading) { return null; } return children({ destinations: destinations, customCategories: customCategories, newDestinations: newDestinations, preferences: preferences, isConsentRequired: isConsentRequired, setPreferences: this.handleSetPreferences, resetPreferences: this.handleResetPreferences, saveConsent: this.handleSaveConsent }); }; ConsentManagerBuilder.prototype.componentDidMount = function () { return __awaiter(this, void 0, void 0, function () { var onError, e_1; return __generator(this, function (_a) { switch (_a.label) { case 0: onError = this.props.onError; if (!(onError && typeof onError === 'function')) return [3 /*break*/, 6]; _a.label = 1; case 1: _a.trys.push([1, 3, , 5]); return [4 /*yield*/, this.initialise()]; case 2: _a.sent(); return [3 /*break*/, 5]; case 3: e_1 = _a.sent(); return [4 /*yield*/, onError(e_1)]; case 4: _a.sent(); return [3 /*break*/, 5]; case 5: return [3 /*break*/, 8]; case 6: return [4 /*yield*/, this.initialise()]; case 7: _a.sent(); _a.label = 8; case 8: return [2 /*return*/]; } }); }); }; ConsentManagerBuilder.displayName = 'ConsentManagerBuilder'; ConsentManagerBuilder.defaultProps = { otherWriteKeys: [], onError: undefined, shouldRequireConsent: function () { return true; }, initialPreferences: {} }; return ConsentManagerBuilder; }(Component)); export default ConsentManagerBuilder; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uc2VudC1tYW5hZ2VyLWJ1aWxkZXIvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ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