UNPKG

@schibstedspain/boros-cmp

Version:

Schibsted GDPR - Consent Management Provider - Standalone

60 lines (45 loc) 1.76 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")); var _CookieConsentRepository = _interopRequireDefault(require("../../repository/CookieConsentRepository")); var _CookieHandler = _interopRequireDefault(require("../../service/CookieHandler")); var _BaseConsentContainer2 = _interopRequireDefault(require("../BaseConsentContainer")); var LocalConsentContainer = /*#__PURE__*/ function (_BaseConsentContainer) { (0, _inheritsLoose2.default)(LocalConsentContainer, _BaseConsentContainer); function LocalConsentContainer(_temp) { var _ref = _temp === void 0 ? {} : _temp, config = _ref.config, window = _ref.window; return _BaseConsentContainer.call(this, { config: config, window: window }) || this; } var _proto = LocalConsentContainer.prototype; _proto._buildConsentRepository = function _buildConsentRepository() { return new _CookieConsentRepository.default({ cookieHandler: this.getInstance({ key: 'CookieHandler' }), consentFactory: this.getInstance({ key: 'ConsentFactory' }) }); }; _proto._buildCookieHandler = function _buildCookieHandler() { return new _CookieHandler.default({ dom: this._window.document }); }; _proto._buildEagerSingletonInstances = function _buildEagerSingletonInstances() { _BaseConsentContainer.prototype._buildEagerSingletonInstances.call(this); }; return LocalConsentContainer; }(_BaseConsentContainer2.default); exports.default = LocalConsentContainer;