@segment/consent-manager
Version:
Drop-in consent management plugin for analytics.js
324 lines • 27.4 kB
JavaScript
;
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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var preferences_1 = require("./preferences");
var fetch_destinations_1 = __importDefault(require("./fetch-destinations"));
var analytics_1 = __importDefault(require("./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: {},
destinationPreferences: {},
isConsentRequired: true,
havePreferencesChanged: false,
workspaceAddedNewDestinations: false
};
_this.initialise = function () { return __awaiter(_this, void 0, void 0, function () {
var _a, writeKey, _b, otherWriteKeys, _c, shouldRequireConsent, initialPreferences, mapCustomPreferences, defaultDestinationBehavior, cookieName, _d, cdnHost, _e, shouldReload, _f, devMode, _g, destinationPreferences, customPreferences, _h, isConsentRequired, destinations, newDestinations, workspaceAddedNewDestinations, preferences, initialPrefencesHaveValue, emptyCustomPreferecences, mapped;
return __generator(this, function (_j) {
switch (_j.label) {
case 0:
_a = this.props, writeKey = _a.writeKey, _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, defaultDestinationBehavior = _a.defaultDestinationBehavior, cookieName = _a.cookieName, _d = _a.cdnHost, cdnHost = _d === void 0 ? ConsentManagerBuilder.defaultProps.cdnHost : _d, _e = _a.shouldReload, shouldReload = _e === void 0 ? ConsentManagerBuilder.defaultProps.shouldReload : _e, _f = _a.devMode, devMode = _f === void 0 ? ConsentManagerBuilder.defaultProps.devMode : _f;
_g = preferences_1.loadPreferences(cookieName), destinationPreferences = _g.destinationPreferences, customPreferences = _g.customPreferences;
return [4 /*yield*/, Promise.all([
shouldRequireConsent(),
fetch_destinations_1.default(cdnHost, __spreadArrays([writeKey], otherWriteKeys))
])];
case 1:
_h = _j.sent(), isConsentRequired = _h[0], destinations = _h[1];
newDestinations = getNewDestinations(destinations, destinationPreferences || {});
workspaceAddedNewDestinations = destinationPreferences &&
Object.keys(destinationPreferences).length > 0 &&
newDestinations.length > 0;
initialPrefencesHaveValue = Object.values(initialPreferences || {}).some(function (v) { return v === true || v === false || v === 'N/A'; });
emptyCustomPreferecences = Object.values(customPreferences || {}).every(function (v) { return v === null || v === undefined || v === 'N/A'; });
if (mapCustomPreferences) {
preferences = customPreferences || initialPreferences || {};
if ((initialPrefencesHaveValue && emptyCustomPreferecences) ||
(defaultDestinationBehavior === 'imply' && workspaceAddedNewDestinations)) {
mapped = mapCustomPreferences(destinations, preferences);
destinationPreferences = mapped.destinationPreferences;
customPreferences = mapped.customPreferences;
preferences = customPreferences;
}
}
else {
preferences = destinationPreferences || initialPreferences;
}
analytics_1.default({
writeKey: writeKey,
destinations: destinations,
destinationPreferences: destinationPreferences,
isConsentRequired: isConsentRequired,
shouldReload: shouldReload,
devMode: devMode,
defaultDestinationBehavior: defaultDestinationBehavior,
categoryPreferences: preferences
});
this.setState({
isLoading: false,
destinations: destinations,
newDestinations: newDestinations,
preferences: preferences,
isConsentRequired: isConsentRequired,
destinationPreferences: destinationPreferences,
workspaceAddedNewDestinations: Boolean(workspaceAddedNewDestinations)
});
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, havePreferencesChanged: true });
});
};
_this.handleResetPreferences = function () {
var _a = _this.props, initialPreferences = _a.initialPreferences, mapCustomPreferences = _a.mapCustomPreferences, cookieName = _a.cookieName;
var _b = preferences_1.loadPreferences(cookieName), 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, devMode) {
var _a = _this.props, writeKey = _a.writeKey, cookieDomain = _a.cookieDomain, cookieName = _a.cookieName, cookieExpires = _a.cookieExpires, cookieAttributes = _a.cookieAttributes, mapCustomPreferences = _a.mapCustomPreferences, defaultDestinationBehavior = _a.defaultDestinationBehavior;
_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);
if (prevState.havePreferencesChanged ||
newDestinations.length > 0 ||
typeof newPreferences === 'boolean') {
shouldReload = true;
}
preferences_1.savePreferences({
destinationPreferences: destinationPreferences,
customPreferences: customPreferences,
cookieDomain: cookieDomain,
cookieName: cookieName,
cookieExpires: cookieExpires,
cookieAttributes: cookieAttributes
});
analytics_1.default({
writeKey: writeKey,
destinations: destinations,
destinationPreferences: destinationPreferences,
isConsentRequired: isConsentRequired,
shouldReload: shouldReload,
devMode: devMode,
defaultDestinationBehavior: defaultDestinationBehavior,
categoryPreferences: customPreferences
});
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, havePreferencesChanged = _b.havePreferencesChanged, workspaceAddedNewDestinations = _b.workspaceAddedNewDestinations, destinationPreferences = _b.destinationPreferences;
if (isLoading) {
return null;
}
return children({
destinations: destinations,
customCategories: customCategories,
newDestinations: newDestinations,
preferences: preferences,
isConsentRequired: isConsentRequired,
havePreferencesChanged: havePreferencesChanged,
workspaceAddedNewDestinations: workspaceAddedNewDestinations,
destinationPreferences: destinationPreferences,
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: {},
cdnHost: 'cdn.segment.com',
shouldReload: true,
devMode: false
};
return ConsentManagerBuilder;
}(react_1.Component));
exports.default = ConsentManagerBuilder;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uc2VudC1tYW5hZ2VyLWJ1aWxkZXIvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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