From 59053c9b0c8c3d5339cbc45301621e87a6f3ffea Mon Sep 17 00:00:00 2001 From: Valentin Dide Date: Mon, 4 May 2020 22:36:27 +0300 Subject: [PATCH] Bundle --- docs/demo/lib/bundle/index.js | 1546 +++++++++++++++++++---------- docs/demo/lib/bundle/index.js.map | 2 +- package.json | 2 +- tsconfig.json | 2 +- 4 files changed, 1027 insertions(+), 525 deletions(-) diff --git a/docs/demo/lib/bundle/index.js b/docs/demo/lib/bundle/index.js index 3c69105..1b7c5a2 100644 --- a/docs/demo/lib/bundle/index.js +++ b/docs/demo/lib/bundle/index.js @@ -9,15 +9,17 @@ * @returns The has code */ function getHashCode(value) { - let hash = 0; - let length = value.length; - let char; - let index = 0; + var hash = 0; + var length = value.length; + var char; + var index = 0; if (length === 0) return hash; while (index < length) { char = value.charCodeAt(index); + // tslint:disable-next-line: no-bitwise hash = ((hash << 5) - hash) + char; + // tslint:disable-next-line: no-bitwise hash |= 0; // Convert to 32bit integer index++; } @@ -30,7 +32,9 @@ */ function getUuidV4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + // tslint:disable: one-variable-per-declaration + // tslint:disable: no-bitwise + var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }); } @@ -43,6 +47,7 @@ /** * A function that does nothing. */ + // tslint:disable-next-line: no-empty function noop() { } /** @@ -50,11 +55,12 @@ * @param document The reference to the document object * @returns A random generated string */ - function generateUniqueId(document, prefix = '') { - const prefixString = (prefix !== null && prefix !== void 0 ? prefix : ''); + function generateUniqueId(document, prefix) { + if (prefix === void 0) { prefix = ''; } + var prefixString = (prefix !== null && prefix !== void 0 ? prefix : ''); while (true) { // The 'A-' will ensure this is always a valid JavaScript ID - const id = prefixString + 'A-' + getRandomString() + getRandomString(); + var id = prefixString + 'A-' + getRandomString() + getRandomString(); if (document.getElementById(id) === null) { return id; } @@ -70,9 +76,9 @@ function getUrlFullPath(document, url) { if (!url) return ''; - const a = document.createElement('a'); + var a = document.createElement('a'); a.setAttribute('href', url); - return a.protocol + "//" + a.hostname + (a.port && ":" + a.port) + a.pathname; + return a.protocol + '//' + a.hostname + (a.port && ':' + a.port) + a.pathname; } /** @@ -84,9 +90,9 @@ function getUrlOrigin(document, url) { if (!url) return ''; - const a = document.createElement('a'); + var a = document.createElement('a'); a.setAttribute('href', url); - return a.protocol + "//" + a.hostname + (a.port && ":" + a.port); + return a.protocol + '//' + a.hostname + (a.port && ':' + a.port); } /** @@ -97,11 +103,12 @@ * @param skipLoading Function to determine if the resource should not be loaded. * @param attributes Extra attributes to add on the HTML element before attaching it to the document. */ - function loadResource(document, url, isScript = true, skipLoading, attributes) { + function loadResource(document, url, isScript, skipLoading, attributes) { + if (isScript === void 0) { isScript = true; } if (skipLoading && skipLoading()) return Promise.resolve(); - return new Promise((resolve, reject) => { - let resource; + return new Promise(function (resolve, reject) { + var resource; if (isScript) { resource = document.createElement('script'); resource.src = url; @@ -111,14 +118,15 @@ resource.href = url; } if (attributes) { - const keys = Object.keys(attributes); - for (let index = 0; index < keys.length; index++) { - const key = keys[index]; + var keys = Object.keys(attributes); + // tslint:disable-next-line: prefer-for-of + for (var index = 0; index < keys.length; index++) { + var key = keys[index]; resource.setAttribute(key, attributes[key]); } } - resource.addEventListener('load', () => resolve()); - resource.addEventListener('error', () => reject(new Error(`Script load error for url: ${url}.`))); + resource.addEventListener('load', function () { return resolve(); }); + resource.addEventListener('error', function () { return reject(new Error("Script load error for url: " + url + ".")); }); document.head.appendChild(resource); }); } @@ -141,7 +149,7 @@ /** * Evnts triggered by the components */ - class ComponentEvent { + var ComponentEvent = /** @class */ (function () { /** * COnstructor. * @param id Component unique idnetifyer. @@ -150,7 +158,7 @@ * @param parentEl The parent element of the component. * @param error The error data in case this is an error event. */ - constructor(id, type, el, parentEl, error) { + function ComponentEvent(id, type, el, parentEl, error) { this.id = id; this.type = type; this.el = el; @@ -158,7 +166,8 @@ this.error = error; this.timestamp = new Date(); } - } + return ComponentEvent; + }()); var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -169,16 +178,43 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __generator = (window && window.__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 }; + } + }; /** * Base class for all components. */ - class Component { + var Component = /** @class */ (function () { /** * Constructor * @param window The reference to the window object * @param options The component options */ - constructor(window, options) { + function Component(window, options) { if (!window) throw new Error('Missing "window" argument.'); if (!options) @@ -195,21 +231,21 @@ /** * Create the root element hat will "encapsulate" the rest of the elements. */ - createRootElement() { + Component.prototype.createRootElement = function () { if (this.rootElement) return; - const parent = this.getParentElement(); + var parent = this.getParentElement(); this.rootElement = this.getDocument().createElement(this.getOptions().tag); this.id = generateUniqueId(this.getDocument(), 'ufe-'); this.rootElement.id = this.id; parent.appendChild(this.rootElement); - } + }; /** * Get the parent element that hosts this component. */ - getParentElement() { - let parent = null; - const opt = this.getOptions(); + Component.prototype.getParentElement = function () { + var parent = null; + var opt = this.getOptions(); if (opt.parent) { if (typeof opt.parent === 'string') { parent = this.getDocument().querySelector(opt.parent); @@ -219,69 +255,85 @@ } } if (!parent) - throw new Error(`Failed to find parent "${opt.parent}".`); + throw new Error("Failed to find parent \"" + opt.parent + "\"."); return parent; - } + }; /** * Load the resources required by the compoent. */ - loadResources() { - return __awaiter(this, void 0, void 0, function* () { - if (this.resourcesLoaded) - return; - this.resourcesLoaded = true; - const options = this.getOptions(); - if (options.resources && options.resources.length > 0) { - const document = this.getDocument(); - for (let index = 0; index < options.resources.length; index++) { - const resource = options.resources[index]; - // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES - // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY - yield loadResource(document, resource.url, resource.isScript, resource.skip, resource.attributes); + Component.prototype.loadResources = function () { + return __awaiter(this, void 0, void 0, function () { + var options, document_1, index, resource; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.resourcesLoaded) + return [2 /*return*/]; + this.resourcesLoaded = true; + options = this.getOptions(); + if (!(options.resources && options.resources.length > 0)) return [3 /*break*/, 4]; + document_1 = this.getDocument(); + index = 0; + _a.label = 1; + case 1: + if (!(index < options.resources.length)) return [3 /*break*/, 4]; + resource = options.resources[index]; + // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES + // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY + return [4 /*yield*/, loadResource(document_1, resource.url, resource.isScript, resource.skip, resource.attributes)]; + case 2: + // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES + // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY + _a.sent(); + _a.label = 3; + case 3: + index++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; } - } + }); }); - } + }; /** * Get the optons data. */ - getOptions() { + Component.prototype.getOptions = function () { return this.options; - } + }; /** * Get the wndow reference. */ - getWindow() { return this.window; } + Component.prototype.getWindow = function () { return this.window; }; /** * Get the document refrence. */ - getDocument() { return this.getWindow().document; } + Component.prototype.getDocument = function () { return this.getWindow().document; }; /** * Core initialization function. * Any component derived should override this to add extra functionality. */ - initializeCore() { return Promise.resolve(); } + Component.prototype.initializeCore = function () { return Promise.resolve(); }; /** * Core mount function. * Any component derived should override this to add extra functionality. */ - mountCore() { + Component.prototype.mountCore = function () { // This needs to be handled by each component // this.callHandler(ComponentEventType.Mounted); return Promise.resolve(); - } + }; /** * Core dispose function. * Any component derived should override this to add clean-up after itself. */ - disposeCore() { return Promise.resolve(); } + Component.prototype.disposeCore = function () { return Promise.resolve(); }; /** * Call the global error handler. * @param e The error object */ - callErrorHandler(e) { + Component.prototype.callErrorHandler = function (e) { var _a; - const handler = (_a = this.options.handlers) === null || _a === void 0 ? void 0 : _a.error; + var handler = (_a = this.options.handlers) === null || _a === void 0 ? void 0 : _a.error; if (handler) { try { handler(new ComponentEvent(this.id, exports.ComponentEventType.Error, this.rootElement, this.getParentElement(), e)); @@ -293,110 +345,153 @@ else { this.log(e); } - } + }; /** * Call a specific event handler. * @param type The type of handler to call. */ - callHandler(type, data) { + Component.prototype.callHandler = function (type, data) { if (type === exports.ComponentEventType.Error) - throw new Error(`For calling the "${exports.ComponentEventType.Error}" handler use the "callErrorHandler" method.`); - const handler = this.options.handlers + throw new Error("For calling the \"" + exports.ComponentEventType.Error + "\" handler use the \"callErrorHandler\" method."); + var handler = this.options.handlers ? this.options.handlers[type] : null; if (handler) { try { - const event = new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null); - event.data = data; - handler(event); + var event_1 = new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null); + event_1.data = data; + handler(event_1); } catch (error) { this.callErrorHandler(error); } } - } + }; /** * Logging method. * @param message The message. * @param optionalParams Optional parameters. */ - log(message, ...optionalParams) { + Component.prototype.log = function (message) { + var optionalParams = []; + for (var _i = 1; _i < arguments.length; _i++) { + optionalParams[_i - 1] = arguments[_i]; + } var _a, _b; - const logMethod = (_b = (_a = this.window) === null || _a === void 0 ? void 0 : _a.console) === null || _b === void 0 ? void 0 : _b.log; + var logMethod = (_b = (_a = this.window) === null || _a === void 0 ? void 0 : _a.console) === null || _b === void 0 ? void 0 : _b.log; if (logMethod) logMethod(message, optionalParams); - } + }; /** * Method invoked to initialize the component. * It should create the root element and any base dependencies. */ - initialize() { - return __awaiter(this, void 0, void 0, function* () { - if (this.isInitialized) - return this; - this.callHandler(exports.ComponentEventType.BeforeCreate); - this.isInitialized = true; - try { - yield this.loadResources(); - this.createRootElement(); - yield this.initializeCore(); - } - catch (e) { - this.callErrorHandler(e); - } - this.callHandler(exports.ComponentEventType.Created); - return this; + Component.prototype.initialize = function () { + return __awaiter(this, void 0, void 0, function () { + var e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.isInitialized) + return [2 /*return*/, this]; + this.callHandler(exports.ComponentEventType.BeforeCreate); + this.isInitialized = true; + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + return [4 /*yield*/, this.loadResources()]; + case 2: + _a.sent(); + this.createRootElement(); + return [4 /*yield*/, this.initializeCore()]; + case 3: + _a.sent(); + return [3 /*break*/, 5]; + case 4: + e_1 = _a.sent(); + this.callErrorHandler(e_1); + return [3 /*break*/, 5]; + case 5: + this.callHandler(exports.ComponentEventType.Created); + return [2 /*return*/, this]; + } + }); }); - } + }; /** * Method invoked to mount the actual content of the component. */ - mount() { - return __awaiter(this, void 0, void 0, function* () { - if (!this.isInitialized) { - this.callErrorHandler(new Error(`Call "initialize" before calling "mount".`)); - return this; - } - if (this.isMounted) - return this; - this.callHandler(exports.ComponentEventType.BeforeMount); - this.isMounted = true; - try { - yield this.mountCore(); - } - catch (e) { - this.callErrorHandler(e); - } - return this; + Component.prototype.mount = function () { + return __awaiter(this, void 0, void 0, function () { + var e_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.isInitialized) { + this.callErrorHandler(new Error('Call "initialize" before calling "mount".')); + return [2 /*return*/, this]; + } + if (this.isMounted) + return [2 /*return*/, this]; + this.callHandler(exports.ComponentEventType.BeforeMount); + this.isMounted = true; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this.mountCore()]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + e_2 = _a.sent(); + this.callErrorHandler(e_2); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/, this]; + } + }); }); - } + }; /** * Method invoked to dispose of the component. */ - dispose() { + Component.prototype.dispose = function () { var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - if (this.disposed) - return; - this.callHandler(exports.ComponentEventType.BeforeDestroy); - this.disposed = true; - try { - yield this.disposeCore(); - } - catch (e) { - this.callErrorHandler(e); - } - this.callHandler(exports.ComponentEventType.Destroyed); - this.id = ''; - this.isInitialized = false; - this.isMounted = false; - this.resourcesLoaded = false; - (_b = (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(this.rootElement); - this.rootElement = null; - this.window = null; + return __awaiter(this, void 0, void 0, function () { + var e_3; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + if (this.disposed) + return [2 /*return*/]; + this.callHandler(exports.ComponentEventType.BeforeDestroy); + this.disposed = true; + _c.label = 1; + case 1: + _c.trys.push([1, 3, , 4]); + return [4 /*yield*/, this.disposeCore()]; + case 2: + _c.sent(); + return [3 /*break*/, 4]; + case 3: + e_3 = _c.sent(); + this.callErrorHandler(e_3); + return [3 /*break*/, 4]; + case 4: + this.callHandler(exports.ComponentEventType.Destroyed); + this.id = ''; + this.isInitialized = false; + this.isMounted = false; + this.resourcesLoaded = false; + (_b = (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(this.rootElement); + this.rootElement = null; + this.window = null; + return [2 /*return*/]; + } + }); }); - } - } + }; + return Component; + }()); (function (CommunicationsEventKind) { CommunicationsEventKind["Mounted"] = "mounted"; @@ -409,33 +504,34 @@ /** * Event used to comunicate between content and container component. */ - class CommunicationsEvent { + var CommunicationsEvent = /** @class */ (function () { /** * Constructor. * @param kind The kind of event. */ - constructor(kind) { + function CommunicationsEvent(kind) { this.kind = kind; this.uuid = getUuidV4(); this.timestamp = new Date().getTime(); this.contentId = ''; } - } - /** - * The type of event dispatched by the child component. - */ - CommunicationsEvent.CONTENT_EVENT_TYPE = 'content_event.communication.children.validide_micro_front_ends'; - /** - * The type of event dispatched by the content. - */ - CommunicationsEvent.CONTAINER_EVENT_TYPE = 'container_event.communication.children.validide_micro_front_ends'; + /** + * The type of event dispatched by the child component. + */ + CommunicationsEvent.CONTENT_EVENT_TYPE = 'content_event.communication.children.validide_micro_front_ends'; + /** + * The type of event dispatched by the content. + */ + CommunicationsEvent.CONTAINER_EVENT_TYPE = 'container_event.communication.children.validide_micro_front_ends'; + return CommunicationsEvent; + }()); var _a, _b, _c, _d, _e, _f; /** * The communication handler methods. */ - class ContainerCommunicationHandlerMethods { - constructor() { + var ContainerCommunicationHandlerMethods = /** @class */ (function () { + function ContainerCommunicationHandlerMethods() { /** * Call the container to signal that the content finished mounting. */ @@ -461,22 +557,24 @@ */ this[_f] = noop; } - } + return ContainerCommunicationHandlerMethods; + }()); _a = exports.CommunicationsEventKind.Mounted, _b = exports.CommunicationsEventKind.BeforeUpdate, _c = exports.CommunicationsEventKind.Updated, _d = exports.CommunicationsEventKind.BeforeDispose, _e = exports.CommunicationsEventKind.Disposed, _f = exports.CommunicationsEventKind.Data; /** * Handle the communications on the child component side. */ - class ContainerCommunicationHandler { + var ContainerCommunicationHandler = /** @class */ (function () { /** * Constructor * @param communicationsManager A communications manager. * @param handlerMethods A collection of handler methods. */ - constructor(communicationsManager, handlerMethods) { + function ContainerCommunicationHandler(communicationsManager, handlerMethods) { + var _this = this; this.communicationsManager = communicationsManager; this.handlerMethods = handlerMethods; - this.communicationsManager.setEventReceivedCallback((e) => { - this.handleEvent(e); + this.communicationsManager.setEventReceivedCallback(function (e) { + _this.handleEvent(e); }); this.disposed = false; } @@ -484,25 +582,25 @@ * Core functionality for handling the incomming events. * @param e The event. */ - handleEventCore(e) { + ContainerCommunicationHandler.prototype.handleEventCore = function (e) { if (!this.handlerMethods) return; - const method = this.handlerMethods[e.kind]; + var method = this.handlerMethods[e.kind]; if (!method) return; method(e.data); - } + }; /** * Handle the incomming communications event. * @param e The event */ - handleEvent(e) { + ContainerCommunicationHandler.prototype.handleEvent = function (e) { this.handleEventCore(e); - } + }; /** * Method invoked to dispose of the handler. */ - dispose() { + ContainerCommunicationHandler.prototype.dispose = function () { var _g; if (this.disposed) return; @@ -510,38 +608,39 @@ (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.dispose(); this.communicationsManager = null; this.handlerMethods = null; - } + }; /** * Send a message. * @param event The message. */ - send(event) { + ContainerCommunicationHandler.prototype.send = function (event) { var _g; (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event); - } + }; /** * Send data. * @param data The data to send. */ - sendData(data) { + ContainerCommunicationHandler.prototype.sendData = function (data) { var _g; - const event = new CommunicationsEvent(exports.CommunicationsEventKind.Data); + var event = new CommunicationsEvent(exports.CommunicationsEventKind.Data); event.data = data; (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event); - } + }; /** * Reuest that the content begins disposing. */ - requestContentDispose() { + ContainerCommunicationHandler.prototype.requestContentDispose = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.BeforeDispose)); - } - } + }; + return ContainerCommunicationHandler; + }()); /** * Content communications handler methods */ - class ContentCommunicationHandlerMethods { - constructor() { + var ContentCommunicationHandlerMethods = /** @class */ (function () { + function ContentCommunicationHandlerMethods() { /** * Method to dispose the content. */ @@ -551,21 +650,23 @@ */ this.handleDataEvent = noop; } - } + return ContentCommunicationHandlerMethods; + }()); /** * Handle the communications on the component content side. */ - class ContentCommunicationHandler { + var ContentCommunicationHandler = /** @class */ (function () { /** * Constructor * @param communicationsManager A comunications manager * @param methods The callback to dispose the content. */ - constructor(communicationsManager, methods) { + function ContentCommunicationHandler(communicationsManager, methods) { + var _this = this; this.communicationsManager = communicationsManager; this.methods = methods; - this.communicationsManager.setEventReceivedCallback((e) => { - this.handleEvent(e); + this.communicationsManager.setEventReceivedCallback(function (e) { + _this.handleEvent(e); }); this.disposed = false; } @@ -573,7 +674,7 @@ * Core functionality for handling the incomming events. * @param e The event. */ - handleEventCore(e) { + ContentCommunicationHandler.prototype.handleEventCore = function (e) { switch (e.kind) { case exports.CommunicationsEventKind.BeforeDispose: case exports.CommunicationsEventKind.Disposed: @@ -587,71 +688,72 @@ } break; default: - throw new Error(`The "${e.kind}" event is not configured.`); + throw new Error("The \"" + e.kind + "\" event is not configured."); } - } + }; /** * Handle the incomming communications event. * @param e The event */ - handleEvent(e) { + ContentCommunicationHandler.prototype.handleEvent = function (e) { this.handleEventCore(e); - } + }; /** * Core dispose function. * Any component derived should override this to add clean-up after itself. */ - disposeCore() { } + // tslint:disable-next-line: no-empty + ContentCommunicationHandler.prototype.disposeCore = function () { }; /** * Send a message. * @param event The message. */ - send(event) { + ContentCommunicationHandler.prototype.send = function (event) { var _a; (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.send(event); - } + }; /** * Dispatch event to signal mounting finished. */ - sendData(data) { - const evt = new CommunicationsEvent(exports.CommunicationsEventKind.Data); + ContentCommunicationHandler.prototype.sendData = function (data) { + var evt = new CommunicationsEvent(exports.CommunicationsEventKind.Data); evt.data = data; this.send(evt); - } + }; /** * Dispatch event to signal mounting finished. */ - dispatchMounted() { + ContentCommunicationHandler.prototype.dispatchMounted = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.Mounted)); - } + }; /** * Dispatch event to signal update is about to start. */ - dispatchBeforeUpdate() { + ContentCommunicationHandler.prototype.dispatchBeforeUpdate = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.BeforeUpdate)); - } + }; /** * Dispatch event to signal update finished. */ - dispatchUpdated() { + ContentCommunicationHandler.prototype.dispatchUpdated = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.Updated)); - } + }; /** * Dispatch event to disposing started. */ - dispatchBeforeDispose() { + ContentCommunicationHandler.prototype.dispatchBeforeDispose = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.BeforeDispose)); - } + }; /** * Dispatch event to mount finished. */ - dispatchDisposed() { + ContentCommunicationHandler.prototype.dispatchDisposed = function () { this.send(new CommunicationsEvent(exports.CommunicationsEventKind.Disposed)); - } + }; /** * Method invoked to dispose of the handler. */ - dispose() { + ContentCommunicationHandler.prototype.dispose = function () { var _a; if (this.disposed) return; @@ -660,63 +762,82 @@ (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.dispose(); this.communicationsManager = null; this.methods = null; - } - } + }; + return ContentCommunicationHandler; + }()); /** * The data sent between the windows directly on the Message Event. */ - class CrossWindowCommunicationDataContract { + var CrossWindowCommunicationDataContract = /** @class */ (function () { /** * Constructor. * @param type Data type. * @param detail Data detail. */ - constructor(type, detail) { + function CrossWindowCommunicationDataContract(type, detail) { this.type = type; this.detail = detail; } - } + return CrossWindowCommunicationDataContract; + }()); - class CommunicationsManager { + var __extends = (window && window.__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 CommunicationsManager = /** @class */ (function () { /** * Constructor. */ - constructor() { + function CommunicationsManager() { this.initialized = false; this.disposed = false; } /** * Initialize the manager. */ - initializeCore() { } + // tslint:disable-next-line: no-empty + CommunicationsManager.prototype.initializeCore = function () { }; /** * Clean any resources before the manager is disposed. */ - disposeCore() { } + // tslint:disable-next-line: no-empty + CommunicationsManager.prototype.disposeCore = function () { }; /** * Initialize the manager. */ - initialize() { + CommunicationsManager.prototype.initialize = function () { if (this.initialized) return; this.initialized = true; this.initializeCore(); - } + }; /** * Dispose of the manager. */ - dispose() { + CommunicationsManager.prototype.dispose = function () { if (this.disposed) return; this.disposed = true; this.disposeCore(); - } - } + }; + return CommunicationsManager; + }()); /** * Comunications manager base class. */ - class CommunicationsManagerOf extends CommunicationsManager { + var CommunicationsManagerOf = /** @class */ (function (_super) { + __extends(CommunicationsManagerOf, _super); /** * Constructor * @param inboundEndpoint The endpoint for receiving messages. @@ -724,68 +845,84 @@ * @param outboundEndpoint The endpoint to sent mesages. * @param outboundEventType The messages to send. */ - constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) { - super(); - this.inboundEndpoint = inboundEndpoint; - this.inboundEventType = inboundEventType; - this.outboundEndpoint = outboundEndpoint; - this.outboundEventType = outboundEventType; - this.onEventReceived = null; - this.eventHandler = (e) => { this.handleEvent(e); }; + function CommunicationsManagerOf(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) { + var _this = _super.call(this) || this; + _this.inboundEndpoint = inboundEndpoint; + _this.inboundEventType = inboundEventType; + _this.outboundEndpoint = outboundEndpoint; + _this.outboundEventType = outboundEventType; + _this.onEventReceived = null; + _this.eventHandler = function (e) { _this.handleEvent(e); }; + return _this; } /** * Handle the received events. * @param e The recevied event. */ - handleEvent(e) { + CommunicationsManagerOf.prototype.handleEvent = function (e) { if (!this.onEventReceived) return; - const evt = this.readEvent(e); + var evt = this.readEvent(e); if (evt) { this.onEventReceived(evt); } - } + }; /** * @inheritdoc */ - initializeCore() { + CommunicationsManagerOf.prototype.initializeCore = function () { if (this.inboundEndpoint && this.eventHandler) { this.startReceiving(this.inboundEndpoint, this.eventHandler); } - super.initializeCore(); - } + _super.prototype.initializeCore.call(this); + }; /** * @inheritdoc */ - disposeCore() { + CommunicationsManagerOf.prototype.disposeCore = function () { if (this.inboundEndpoint && this.eventHandler) { this.stopReceiving(this.inboundEndpoint, this.eventHandler); } this.eventHandler = null; this.onEventReceived = null; this.inboundEndpoint = null; - super.disposeCore(); - } + _super.prototype.disposeCore.call(this); + }; /** * @inheritdoc */ - send(event) { + CommunicationsManagerOf.prototype.send = function (event) { if (this.outboundEndpoint) { this.sendEvent(this.outboundEndpoint, event); } - } + }; /** * @inheritdoc */ - setEventReceivedCallback(callback) { + CommunicationsManagerOf.prototype.setEventReceivedCallback = function (callback) { this.onEventReceived = callback; - } - } + }; + return CommunicationsManagerOf; + }(CommunicationsManager)); + var __extends$1 = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class CrossWindowCommunicationsManager extends CommunicationsManagerOf { + var CrossWindowCommunicationsManager = /** @class */ (function (_super) { + __extends$1(CrossWindowCommunicationsManager, _super); /** * Constructor * @param inboundEndpoint The endpoint for receiving messages. @@ -794,51 +931,53 @@ * @param outboundEventType The messages to send. * @param origin The origin to comunicate with. */ - constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType, origin) { - super(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType); - this.origin = origin; + function CrossWindowCommunicationsManager(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType, origin) { + var _this = _super.call(this, inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) || this; + _this.origin = origin; + return _this; } /** * @inheritdoc */ - readEvent(e) { - const messageEvent = e; + CrossWindowCommunicationsManager.prototype.readEvent = function (e) { + var messageEvent = e; if (!messageEvent || messageEvent.origin !== this.origin) return null; - const data = messageEvent.data; + var data = messageEvent.data; if (!data || data.type !== this.inboundEventType) return null; return data.detail ? data.detail : null; - } + }; /** * @inheritdoc */ - startReceiving(inboundEndpoint, handler) { + CrossWindowCommunicationsManager.prototype.startReceiving = function (inboundEndpoint, handler) { inboundEndpoint.addEventListener('message', handler); - } + }; /** * @inheritdoc */ - stopReceiving(inboundEndpoint, handler) { + CrossWindowCommunicationsManager.prototype.stopReceiving = function (inboundEndpoint, handler) { inboundEndpoint.removeEventListener('message', handler); - } + }; /** * @inheritdoc */ - sendEvent(outboundEndpoint, event) { - const data = new CrossWindowCommunicationDataContract(this.outboundEventType, event); + CrossWindowCommunicationsManager.prototype.sendEvent = function (outboundEndpoint, event) { + var data = new CrossWindowCommunicationDataContract(this.outboundEventType, event); outboundEndpoint.postMessage(data, this.origin); - } - } + }; + return CrossWindowCommunicationsManager; + }(CommunicationsManagerOf)); function customEventPolyfill(document, typeArg, eventInitDict) { - const params = eventInitDict || { bubbles: false, cancelable: false, detail: null }; + var params = eventInitDict || { bubbles: false, cancelable: false, detail: null }; var evt = document.createEvent('CustomEvent'); evt.initCustomEvent(typeArg, params.bubbles || false, params.cancelable || false, params.detail); return evt; } function createCustomEvent(document, typeArg, eventInitDict) { - const win = document === null || document === void 0 ? void 0 : document.defaultView; + var win = document === null || document === void 0 ? void 0 : document.defaultView; if (!win) throw new Error('Document does not have a defualt view.'); if (typeof win.CustomEvent !== 'function') { @@ -847,50 +986,78 @@ return new win.CustomEvent(typeArg, eventInitDict); } + var __extends$2 = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class HTMLElementCommunicationsManager extends CommunicationsManagerOf { + var HTMLElementCommunicationsManager = /** @class */ (function (_super) { + __extends$2(HTMLElementCommunicationsManager, _super); /** * @inheritdoc */ - constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) { - super(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType); + function HTMLElementCommunicationsManager(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) { + return _super.call(this, inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) || this; } /** * @inheritdoc */ - readEvent(e) { - const customEvent = e; + HTMLElementCommunicationsManager.prototype.readEvent = function (e) { + var customEvent = e; if (!customEvent || customEvent.type !== this.inboundEventType) return null; return customEvent.detail instanceof CommunicationsEvent ? customEvent.detail : null; - } + }; /** * @inheritdoc */ - startReceiving(inboundEndpoint, handler) { + HTMLElementCommunicationsManager.prototype.startReceiving = function (inboundEndpoint, handler) { inboundEndpoint.addEventListener(this.inboundEventType, handler); - } + }; /** * @inheritdoc */ - stopReceiving(inboundEndpoint, handler) { + HTMLElementCommunicationsManager.prototype.stopReceiving = function (inboundEndpoint, handler) { inboundEndpoint.removeEventListener(this.inboundEventType, handler); - } + }; /** * @inheritdoc */ - sendEvent(outboundEndpoint, event) { + HTMLElementCommunicationsManager.prototype.sendEvent = function (outboundEndpoint, event) { if (!outboundEndpoint.ownerDocument) return; - const evt = createCustomEvent(outboundEndpoint.ownerDocument, this.outboundEventType, { detail: event }); + var evt = createCustomEvent(outboundEndpoint.ownerDocument, this.outboundEventType, { detail: event }); outboundEndpoint.dispatchEvent(evt); - } - } + }; + return HTMLElementCommunicationsManager; + }(CommunicationsManagerOf)); + var __extends$3 = (window && window.__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 __awaiter$1 = (window && window.__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) { @@ -900,85 +1067,116 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __generator$1 = (window && window.__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 }; + } + }; /** * Child component base class. */ - class ChildComponent extends Component { + var ChildComponent = /** @class */ (function (_super) { + __extends$3(ChildComponent, _super); /** * Constructor. * @param window The window reference. * @param options The child options. * @param rootFacade The facade to the root component. */ - constructor(window, options, rootFacade) { - super(window, options); - this.rootFacade = rootFacade; - this.communicationHandler = null; - this.contentDisposePromise = null; - this.contentDisposePromiseResolver = null; + function ChildComponent(window, options, rootFacade) { + var _this = _super.call(this, window, options) || this; + _this.rootFacade = rootFacade; + _this.communicationHandler = null; + _this.contentDisposePromise = null; + _this.contentDisposePromiseResolver = null; + return _this; } /** * Get the comunication handler. */ - getCommunicationHandler() { - const methods = new ContainerCommunicationHandlerMethods(); - methods.mounted = () => this.callHandler(exports.ComponentEventType.Mounted); - methods.beforeUpdate = () => this.callHandler(exports.ComponentEventType.BeforeUpdate); - methods.updated = () => this.callHandler(exports.ComponentEventType.Updated); - methods.data = (data) => this.callHandler(exports.ComponentEventType.Data, data); - methods.beforeDispose = () => this.contentBeginDisposed(); - methods.disposed = () => this.contentDisposed(); + ChildComponent.prototype.getCommunicationHandler = function () { + var _this = this; + var methods = new ContainerCommunicationHandlerMethods(); + methods.mounted = function () { return _this.callHandler(exports.ComponentEventType.Mounted); }; + methods.beforeUpdate = function () { return _this.callHandler(exports.ComponentEventType.BeforeUpdate); }; + methods.updated = function () { return _this.callHandler(exports.ComponentEventType.Updated); }; + methods.data = function (data) { return _this.callHandler(exports.ComponentEventType.Data, data); }; + methods.beforeDispose = function () { return _this.contentBeginDisposed(); }; + methods.disposed = function () { return _this.contentDisposed(); }; return this.getCommunicationHandlerCore(methods); - } + }; /** * Get the child component options. */ - getOptions() { - return super.getOptions(); - } + ChildComponent.prototype.getOptions = function () { + return _super.prototype.getOptions.call(this); + }; /** * Handler for the signal that the component started to dispose. */ - contentBeginDisposed() { + ChildComponent.prototype.contentBeginDisposed = function () { if (this.contentDisposePromise !== null) return; // Dispose has already started. this.setContentDisposePromise(); // Inform parent the content is beeing disposed. this.rootFacade.signalDisposed(this); - } + }; /** * Signal the content that it will be disposed. */ - startDisposingContent() { + ChildComponent.prototype.startDisposingContent = function () { if (this.contentDisposePromise !== null) return; // Dispose has already started. this.setContentDisposePromise(); // This should trigger the child component dispose. this.communicationHandler.requestContentDispose(); - } + }; /** * Set the promise that is used fof the disposing of the component. */ - setContentDisposePromise() { + ChildComponent.prototype.setContentDisposePromise = function () { + var _this = this; this.contentDisposePromise = Promise .race([ - new Promise((resolver, rejecter) => { - this.contentDisposePromiseResolver = resolver; + new Promise(function (resolver, rejecter) { + _this.contentDisposePromiseResolver = resolver; }), - new Promise((resolveTimeout, rejectTimeout) => { - this + new Promise(function (resolveTimeout, rejectTimeout) { + _this .getWindow() - .setTimeout(() => rejectTimeout(new Error(`Child dispose timeout.`)), this.getOptions().contentDisposeTimeout); + .setTimeout(function () { return rejectTimeout(new Error('Child dispose timeout.')); }, _this.getOptions().contentDisposeTimeout); }) ]) - .catch((err) => { - this.callErrorHandler(err); + .catch(function (err) { + _this.callErrorHandler(err); }); - } + }; /** * Handler for the signal that the content has finished disposing. */ - contentDisposed() { + ChildComponent.prototype.contentDisposed = function () { if (this.contentDisposePromiseResolver === null) { // For some reason we got the disposed call without getting the 'beginDispose' call. this.contentDisposePromise = Promise.resolve(); @@ -987,42 +1185,50 @@ else { this.contentDisposePromiseResolver(); } - } + }; /** * @@inheritdoc */ - mountCore() { + ChildComponent.prototype.mountCore = function () { if (!this.communicationHandler) { this.communicationHandler = this.getCommunicationHandler(); } - return super.mountCore(); - } + return _super.prototype.mountCore.call(this); + }; /** * @@inheritdoc */ - disposeCore() { - const _super = Object.create(null, { - disposeCore: { get: () => super.disposeCore } - }); - return __awaiter$1(this, void 0, void 0, function* () { - this.startDisposingContent(); - yield this.contentDisposePromise; - this.communicationHandler.dispose(); - this.communicationHandler = null; - this.contentDisposePromiseResolver = null; - this.contentDisposePromise = null; - yield _super.disposeCore.call(this); + ChildComponent.prototype.disposeCore = function () { + return __awaiter$1(this, void 0, void 0, function () { + return __generator$1(this, function (_a) { + switch (_a.label) { + case 0: + this.startDisposingContent(); + return [4 /*yield*/, this.contentDisposePromise]; + case 1: + _a.sent(); + this.communicationHandler.dispose(); + this.communicationHandler = null; + this.contentDisposePromiseResolver = null; + this.contentDisposePromise = null; + return [4 /*yield*/, _super.prototype.disposeCore.call(this)]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); }); - } + }; /** * Send data. * @param data The data to send. */ - sendData(data) { + ChildComponent.prototype.sendData = function (data) { var _a; (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendData(data); - } - } + }; + return ChildComponent; + }(Component)); /** * The type of child component. @@ -1038,18 +1244,46 @@ ChildComponentType["CrossWindow"] = "crossWindow"; })(exports.ChildComponentType || (exports.ChildComponentType = {})); + var __extends$4 = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class InWindowContainerCommunicationHandler extends ContainerCommunicationHandler { + var InWindowContainerCommunicationHandler = /** @class */ (function (_super) { + __extends$4(InWindowContainerCommunicationHandler, _super); /** - * @inheritdoc - */ - constructor(communicationsManager, wrapperMethods) { - super(communicationsManager, wrapperMethods); + * @inheritdoc + */ + function InWindowContainerCommunicationHandler(communicationsManager, wrapperMethods) { + return _super.call(this, communicationsManager, wrapperMethods) || this; } - } + return InWindowContainerCommunicationHandler; + }(ContainerCommunicationHandler)); + var __extends$5 = (window && window.__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 __awaiter$2 = (window && window.__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) { @@ -1059,70 +1293,120 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __generator$2 = (window && window.__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 }; + } + }; /** * In Window Child Component. */ - class InWindowChildComponent extends ChildComponent { + var InWindowChildComponent = /** @class */ (function (_super) { + __extends$5(InWindowChildComponent, _super); /** * Constructor. * @param window The window reference. * @param options The child component options. * @param rootFacade The facade to the root component. */ - constructor(window, options, rootFacade) { - super(window, options, rootFacade); + function InWindowChildComponent(window, options, rootFacade) { + return _super.call(this, window, options, rootFacade) || this; } /** * @inheritdoc */ - getCommunicationHandlerCore(methods) { - const endpoint = this.rootElement; - const manager = new HTMLElementCommunicationsManager(endpoint, CommunicationsEvent.CONTENT_EVENT_TYPE, endpoint, CommunicationsEvent.CONTAINER_EVENT_TYPE); + InWindowChildComponent.prototype.getCommunicationHandlerCore = function (methods) { + var endpoint = this.rootElement; + var manager = new HTMLElementCommunicationsManager(endpoint, CommunicationsEvent.CONTENT_EVENT_TYPE, endpoint, CommunicationsEvent.CONTAINER_EVENT_TYPE); manager.initialize(); return new InWindowContainerCommunicationHandler(manager, methods); - } + }; /** * Get the InWindowChildComponentOptions */ - getOptions() { - return super.getOptions(); - } + InWindowChildComponent.prototype.getOptions = function () { + return _super.prototype.getOptions.call(this); + }; /** * @inheritdoc */ - mountCore() { - const _super = Object.create(null, { - mountCore: { get: () => super.mountCore } - }); - return __awaiter$2(this, void 0, void 0, function* () { - const injectionFunction = this.getOptions().inject; - if (!injectionFunction) { - throw new Error('Inject method not defined!'); - } - injectionFunction(this.rootElement); - yield _super.mountCore.call(this); + InWindowChildComponent.prototype.mountCore = function () { + return __awaiter$2(this, void 0, void 0, function () { + var injectionFunction; + return __generator$2(this, function (_a) { + switch (_a.label) { + case 0: + injectionFunction = this.getOptions().inject; + if (!injectionFunction) { + throw new Error('Inject method not defined!'); + } + injectionFunction(this.rootElement); + return [4 /*yield*/, _super.prototype.mountCore.call(this)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }); - } - } + }; + return InWindowChildComponent; + }(ChildComponent)); + var __extends$6 = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class CrossWindowContainerCommunicationHandler extends ContainerCommunicationHandler { + var CrossWindowContainerCommunicationHandler = /** @class */ (function (_super) { + __extends$6(CrossWindowContainerCommunicationHandler, _super); /** * Constructor. * @param communicationsManager A communications manager. * @param embedId The Id of the embeded element. * @param containerMethods The methods to communicate with the container. */ - constructor(communicationsManager, embedId, containerMethods) { - super(communicationsManager, containerMethods); - this.embedId = embedId; + function CrossWindowContainerCommunicationHandler(communicationsManager, embedId, containerMethods) { + var _this = _super.call(this, communicationsManager, containerMethods) || this; + _this.embedId = embedId; + return _this; } /** * @inheritdoc */ - handleEventCore(e) { + CrossWindowContainerCommunicationHandler.prototype.handleEventCore = function (e) { if (!this.embedId) return; if (!e.contentId && e.kind === exports.CommunicationsEventKind.Mounted) { @@ -1131,14 +1415,14 @@ } if (this.embedId !== e.contentId) return; - super.handleEventCore(e); - } + _super.prototype.handleEventCore.call(this, e); + }; /** * Attempt a andshake with the content. */ - attemptHandShake(e) { - const hash = getHashCode(this.embedId).toString(10); - const response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); + CrossWindowContainerCommunicationHandler.prototype.attemptHandShake = function (e) { + var hash = getHashCode(this.embedId).toString(10); + var response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); // We got a message back so if the data matches the hash we sent send the id if (e.data && e.data === hash) { response.contentId = this.embedId; @@ -1147,9 +1431,23 @@ response.data = hash; } this.send(response); - } - } + }; + return CrossWindowContainerCommunicationHandler; + }(ContainerCommunicationHandler)); + var __extends$7 = (window && window.__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 __awaiter$3 = (window && window.__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) { @@ -1159,34 +1457,63 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __generator$3 = (window && window.__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 }; + } + }; /** * Cross Window Child Component. */ - class CrossWindowChildComponent extends ChildComponent { + var CrossWindowChildComponent = /** @class */ (function (_super) { + __extends$7(CrossWindowChildComponent, _super); /** * Constructor. * @param window The window refrence. * @param options The child options. * @param rootFacade he root component facade. */ - constructor(window, options, rootFacade) { - super(window, options, rootFacade); - this.embededId = ''; - this.embededLoadResolver = null; - this.embededErrorRejecter = null; - this.embededLoadPromise = new Promise((resolve, reject) => { - this.embededLoadResolver = resolve; - this.embededErrorRejecter = reject; + function CrossWindowChildComponent(window, options, rootFacade) { + var _this = _super.call(this, window, options, rootFacade) || this; + _this.embededId = ''; + _this.embededLoadResolver = null; + _this.embededErrorRejecter = null; + _this.embededLoadPromise = new Promise(function (resolve, reject) { + _this.embededLoadResolver = resolve; + _this.embededErrorRejecter = reject; }); - this.embededLoadHandlerRef = this.embededLoadHandler.bind(this); - this.embededErrorHandlerRef = this.embededErrorHandler.bind(this); + _this.embededLoadHandlerRef = _this.embededLoadHandler.bind(_this); + _this.embededErrorHandlerRef = _this.embededErrorHandler.bind(_this); + return _this; } /** * @inheritdoc */ - disposeCore() { - const embed = this.embededId - ? this.rootElement.querySelector(`#${this.embededId}`) + CrossWindowChildComponent.prototype.disposeCore = function () { + var embed = this.embededId + ? this.rootElement.querySelector("#" + this.embededId) : null; if (embed) { embed.removeEventListener('load', this.embededLoadHandlerRef); @@ -1200,178 +1527,237 @@ this.embededLoadResolver = null; this.embededErrorRejecter = null; this.embededLoadPromise = null; - return super.disposeCore(); - } + return _super.prototype.disposeCore.call(this); + }; /** * Get the CrossWindowChildComponentOptions */ - getOptions() { - return super.getOptions(); - } + CrossWindowChildComponent.prototype.getOptions = function () { + return _super.prototype.getOptions.call(this); + }; /** * @inheritdoc */ - mountCore() { - const _super = Object.create(null, { - mountCore: { get: () => super.mountCore } - }); - return __awaiter$3(this, void 0, void 0, function* () { - const createEmbedElementFn = this.getOptions().createEmbedElement; - let embed = null; - if (createEmbedElementFn) { - embed = createEmbedElementFn(this.rootElement); - } - else { - embed = this.createEmbedElement(); - } - if (!embed) - throw new Error('Failed to create embed element!'); - const embedId = generateUniqueId(this.getDocument(), 'ufe-cross-'); - embed.id = embedId; - this.embededId = embedId; - embed.addEventListener('load', this.embededLoadHandlerRef); - embed.addEventListener('error', this.embededErrorHandlerRef); - this.rootElement.appendChild(embed); - yield (this.embededLoadPromise); - return yield _super.mountCore.call(this); + CrossWindowChildComponent.prototype.mountCore = function () { + return __awaiter$3(this, void 0, void 0, function () { + var createEmbedElementFn, embed, embedId; + return __generator$3(this, function (_a) { + switch (_a.label) { + case 0: + createEmbedElementFn = this.getOptions().createEmbedElement; + embed = null; + if (createEmbedElementFn) { + embed = createEmbedElementFn(this.rootElement); + } + else { + embed = this.createEmbedElement(); + } + if (!embed) + throw new Error('Failed to create embed element!'); + embedId = generateUniqueId(this.getDocument(), 'ufe-cross-'); + embed.id = embedId; + this.embededId = embedId; + embed.addEventListener('load', this.embededLoadHandlerRef); + embed.addEventListener('error', this.embededErrorHandlerRef); + this.rootElement.appendChild(embed); + return [4 /*yield*/, (this.embededLoadPromise)]; + case 1: + _a.sent(); + return [4 /*yield*/, _super.prototype.mountCore.call(this)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); }); - } + }; /** * * @param methods @inheritdoc */ - getCommunicationHandlerCore(methods) { - const document = this.getDocument(); - const manager = new CrossWindowCommunicationsManager((document).defaultView, CommunicationsEvent.CONTENT_EVENT_TYPE, this.outboundEndpointAccesor(), CommunicationsEvent.CONTAINER_EVENT_TYPE, getUrlOrigin(document, this.getOptions().url)); + CrossWindowChildComponent.prototype.getCommunicationHandlerCore = function (methods) { + var document = this.getDocument(); + var manager = new CrossWindowCommunicationsManager((document).defaultView, CommunicationsEvent.CONTENT_EVENT_TYPE, this.outboundEndpointAccesor(), CommunicationsEvent.CONTAINER_EVENT_TYPE, getUrlOrigin(document, this.getOptions().url)); manager.initialize(); return new CrossWindowContainerCommunicationHandler(manager, this.embededId, methods); - } + }; /** * Handle the loading of the embeded element. * @param e The load event. */ - embededLoadHandler(e) { + CrossWindowChildComponent.prototype.embededLoadHandler = function (e) { this.embededLoadResolver(); - } + }; /** * Handle the errir of the embeded element. * @param e The error event. */ - embededErrorHandler(e) { - this.embededErrorRejecter(new Error(`Failed to load embeded element.\nError details:\n${JSON.stringify(e)}`)); - } + CrossWindowChildComponent.prototype.embededErrorHandler = function (e) { + this.embededErrorRejecter(new Error("Failed to load embeded element.\nError details:\n" + JSON.stringify(e))); + }; /** * Create the embeded element. */ - createEmbedElement() { - const embed = this.getDocument().createElement('iframe'); - const opt = this.getOptions(); + CrossWindowChildComponent.prototype.createEmbedElement = function () { + var embed = this.getDocument().createElement('iframe'); + var opt = this.getOptions(); if (opt.embededAttributes) { - const keys = Object.keys(opt.embededAttributes); - for (let index = 0; index < keys.length; index++) { - const key = keys[index]; + var keys = Object.keys(opt.embededAttributes); + // tslint:disable-next-line: prefer-for-of + for (var index = 0; index < keys.length; index++) { + var key = keys[index]; embed.setAttribute(key, opt.embededAttributes[key]); } } embed.setAttribute('src', opt.url); return embed; - } + }; /** * Access the outbound comunication endpoint. */ - outboundEndpointAccesor() { - const embed = this.embededId - ? this.rootElement.querySelector(`#${this.embededId}`) + CrossWindowChildComponent.prototype.outboundEndpointAccesor = function () { + var embed = this.embededId + ? this.rootElement.querySelector("#" + this.embededId) : null; if (!embed) - throw new Error(`No iframe with "${this.embededId}" id found.`); + throw new Error("No iframe with \"" + this.embededId + "\" id found."); if (!embed.contentWindow) - throw new Error(`The iframe with "${this.embededId}" id does not have a "contentWindow"(${embed.contentWindow}).`); + throw new Error("The iframe with \"" + this.embededId + "\" id does not have a \"contentWindow\"(" + embed.contentWindow + ")."); return embed.contentWindow; - } - } + }; + return CrossWindowChildComponent; + }(ChildComponent)); /** * Configuration object for the event handlers. */ - class ComponentEventHandlers { - } + var ComponentEventHandlers = /** @class */ (function () { + function ComponentEventHandlers() { + } + return ComponentEventHandlers; + }()); exports.ComponentEventType.BeforeCreate, exports.ComponentEventType.Created, exports.ComponentEventType.BeforeMount, exports.ComponentEventType.Mounted, exports.ComponentEventType.BeforeUpdate, exports.ComponentEventType.Updated, exports.ComponentEventType.BeforeDestroy, exports.ComponentEventType.Destroyed, exports.ComponentEventType.Error, exports.ComponentEventType.Data; /** * Compoent configuration options. */ - class ComponentOptions { - constructor() { + var ComponentOptions = /** @class */ (function () { + function ComponentOptions() { this.parent = 'body'; this.tag = 'div'; this.handlers = new ComponentEventHandlers(); this.resources = []; } - } + return ComponentOptions; + }()); + var __extends$8 = (window && window.__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 __()); + }; + })(); /** * Child component options. */ - class ChildComponentOptions extends ComponentOptions { - constructor() { - super(); - this.type = exports.ChildComponentType.InWindow; + var ChildComponentOptions = /** @class */ (function (_super) { + __extends$8(ChildComponentOptions, _super); + function ChildComponentOptions() { + var _this = _super.call(this) || this; + _this.type = exports.ChildComponentType.InWindow; /** * The the interval to wait for the component before triggering an error and the 'disposed' event. */ - this.contentDisposeTimeout = 3000; + _this.contentDisposeTimeout = 3000; + return _this; } - } + return ChildComponentOptions; + }(ComponentOptions)); + var __extends$9 = (window && window.__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 __()); + }; + })(); /** * Cross Window Child Component Options. */ - class CrossWindowChildComponentOptions extends ChildComponentOptions { + var CrossWindowChildComponentOptions = /** @class */ (function (_super) { + __extends$9(CrossWindowChildComponentOptions, _super); /** * Constructor. */ - constructor() { - super(); - this.url = 'about:blank'; - this.type = exports.ChildComponentType.CrossWindow; + function CrossWindowChildComponentOptions() { + var _this = _super.call(this) || this; + _this.url = 'about:blank'; + _this.type = exports.ChildComponentType.CrossWindow; + return _this; } - } + return CrossWindowChildComponentOptions; + }(ChildComponentOptions)); + var __extends$a = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class CrossWindowContentCommunicationHandler extends ContentCommunicationHandler { + var CrossWindowContentCommunicationHandler = /** @class */ (function (_super) { + __extends$a(CrossWindowContentCommunicationHandler, _super); /** * Constructor. * @param communicationsManager A communications manager. * @param methods The callback to dispose the content. */ - constructor(communicationsManager, methods) { - super(communicationsManager, methods); - this.iframeId = ''; - this.messageQueue = []; + function CrossWindowContentCommunicationHandler(communicationsManager, methods) { + var _this = _super.call(this, communicationsManager, methods) || this; + _this.iframeId = ''; + _this.messageQueue = []; + return _this; } /** * @inheritdoc */ - disposeCore() { + CrossWindowContentCommunicationHandler.prototype.disposeCore = function () { this.messageQueue = []; - super.disposeCore(); - } + _super.prototype.disposeCore.call(this); + }; /** * @inheritdoc */ - handleEventCore(e) { + CrossWindowContentCommunicationHandler.prototype.handleEventCore = function (e) { if (!this.iframeId) { this.attemptHandShake(e); return; } - super.handleEventCore(e); - } + _super.prototype.handleEventCore.call(this, e); + }; /** * @inheritdoc */ - send(message) { + CrossWindowContentCommunicationHandler.prototype.send = function (message) { if (this.iframeId) { message.contentId = this.iframeId; } @@ -1383,18 +1769,18 @@ return; } } - super.send(message); - } + _super.prototype.send.call(this, message); + }; /** * Attempt a handshake with the container. * @param e The communication event. */ - attemptHandShake(e) { + CrossWindowContentCommunicationHandler.prototype.attemptHandShake = function (e) { if (e.contentId) { // Phase 2 of the handshake - we got the id. this.iframeId = e.contentId; // Send it again to notify parent. - const response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); + var response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); response.contentId = this.iframeId; this.send(response); // Send the previously queued messages. @@ -1402,96 +1788,146 @@ } else { // Phase 1 of the handshake - we got the hash so send it back. - const response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); + var response = new CommunicationsEvent(exports.CommunicationsEventKind.Mounted); response.contentId = this.iframeId; response.data = e.data; this.send(response); } - } + }; /** * Flush all the messages that were enqueues before the handhake. */ - flushMessages() { - for (let index = 0; index < this.messageQueue.length; index++) { - const msg = this.messageQueue[index]; + CrossWindowContentCommunicationHandler.prototype.flushMessages = function () { + // tslint:disable-next-line: prefer-for-of + for (var index = 0; index < this.messageQueue.length; index++) { + var msg = this.messageQueue[index]; msg.contentId = this.iframeId; this.send(msg); } - } - } + }; + return CrossWindowContentCommunicationHandler; + }(ContentCommunicationHandler)); /** * Factory to create child components. */ - class ChildComponentFactory { + var ChildComponentFactory = /** @class */ (function () { + function ChildComponentFactory() { + } /** * Create a child component. * @param window The window reference. * @param options The child component options. * @param rootFacade The facade for the root component. */ - createComponent(window, options, rootFacade) { + ChildComponentFactory.prototype.createComponent = function (window, options, rootFacade) { switch (options.type) { case exports.ChildComponentType.InWindow: return new InWindowChildComponent(window, options, rootFacade); case exports.ChildComponentType.CrossWindow: return new CrossWindowChildComponent(window, options, rootFacade); default: - throw new Error(`The "${options.type}" is not configured.`); + throw new Error("The \"" + options.type + "\" is not configured."); } - } - } + }; + return ChildComponentFactory; + }()); + var __extends$b = (window && window.__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 __()); + }; + })(); /** * In Window Child Component Options. */ - class InWindowChildComponentOptions extends ChildComponentOptions { + var InWindowChildComponentOptions = /** @class */ (function (_super) { + __extends$b(InWindowChildComponentOptions, _super); /** * Constructor. */ - constructor() { - super(); + function InWindowChildComponentOptions() { + return _super.call(this) || this; } - } + return InWindowChildComponentOptions; + }(ChildComponentOptions)); + var __extends$c = (window && window.__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 __()); + }; + })(); /** * @inheritdoc */ - class InWindowContentCommunicationHandler extends ContentCommunicationHandler { + var InWindowContentCommunicationHandler = /** @class */ (function (_super) { + __extends$c(InWindowContentCommunicationHandler, _super); /** * Constructor. * @param el The element to use for sending and receiving messages. * @param methods The callback to dispose the content. */ - constructor(communicationsManager, methods) { - super(communicationsManager, methods); + function InWindowContentCommunicationHandler(communicationsManager, methods) { + return _super.call(this, communicationsManager, methods) || this; } - } + return InWindowContentCommunicationHandler; + }(ContentCommunicationHandler)); /** * Configuration for retrieving a resource. */ - class ResourceConfiguration { - constructor() { + var ResourceConfiguration = /** @class */ (function () { + function ResourceConfiguration() { this.url = ''; this.isScript = true; - this.skip = () => { return false; }; + this.skip = function () { return false; }; } - } + return ResourceConfiguration; + }()); /** * Facade to interface with the the root component. */ - class RootComponentFacade { + var RootComponentFacade = /** @class */ (function () { /** * Constructor. * @param signalDisposed The function to invoke to signal that the child was disposed. */ - constructor(signalDisposed) { + function RootComponentFacade(signalDisposed) { this.signalDisposed = signalDisposed; } - } + return RootComponentFacade; + }()); + var __extends$d = (window && window.__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 __awaiter$4 = (window && window.__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) { @@ -1501,96 +1937,162 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; + var __generator$4 = (window && window.__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 }; + } + }; /** * The root component to host the rest of the components. * There is not limitation right no but ideally there should only be one of these on a page. */ - class RootComponent extends Component { - constructor(window, options) { - super(window, options); - this.children = {}; + var RootComponent = /** @class */ (function (_super) { + __extends$d(RootComponent, _super); + function RootComponent(window, options) { + var _this = _super.call(this, window, options) || this; + _this.children = {}; + return _this; } /** * Schedule the disposing of the child on exiting the function. * The dispose method is async but we do not want to wait for that. * @param child The child that was disposed. */ - scheduleDisposeChild(child) { + RootComponent.prototype.scheduleDisposeChild = function (child) { + var _this = this; // Schedule this later - this.getWindow().setTimeout(() => { - this.disposeChildByRef(child); + this.getWindow().setTimeout(function () { + _this.disposeChildByRef(child); }, 0); - } + }; /** * Dispose a child using it's reference. * @param child */ - disposeChildByRef(child) { + RootComponent.prototype.disposeChildByRef = function (child) { return this.disposeChild(child.id); - } + }; /** * Dispose a child by using it's id. * @param childId The child identifyer. */ - disposeChild(childId) { - return __awaiter$4(this, void 0, void 0, function* () { - const child = this.getChild(childId); - if (!child) - return Promise.resolve(); - yield child.dispose(); - this.children[childId] = null; + RootComponent.prototype.disposeChild = function (childId) { + return __awaiter$4(this, void 0, void 0, function () { + var child; + return __generator$4(this, function (_a) { + switch (_a.label) { + case 0: + child = this.getChild(childId); + if (!child) + return [2 /*return*/, Promise.resolve()]; + return [4 /*yield*/, child.dispose()]; + case 1: + _a.sent(); + this.children[childId] = null; + return [2 /*return*/]; + } + }); }); - } + }; /** * @@inheritdoc */ - mountCore() { + RootComponent.prototype.mountCore = function () { this.callHandler(exports.ComponentEventType.Mounted); - return super.mountCore(); - } + return _super.prototype.mountCore.call(this); + }; /** * Add a child component. * @param options Child component options. */ - addChild(options) { - return __awaiter$4(this, void 0, void 0, function* () { - if (!this.isInitialized) - throw new Error('Wait for the component to initilize before starting to add children.'); - if (!this.isMounted) - throw new Error('Wait for the component to mount before starting to add children.'); - const child = this.options.childFactory.createComponent(this.getWindow(), options, new RootComponentFacade(this.scheduleDisposeChild.bind(this))); - const id = (yield child.initialize()).id; - this.children[id] = child; - yield child.mount(); - return id; + RootComponent.prototype.addChild = function (options) { + return __awaiter$4(this, void 0, void 0, function () { + var child, id; + return __generator$4(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.isInitialized) + throw new Error('Wait for the component to initilize before starting to add children.'); + if (!this.isMounted) + throw new Error('Wait for the component to mount before starting to add children.'); + child = this.options.childFactory.createComponent(this.getWindow(), options, new RootComponentFacade(this.scheduleDisposeChild.bind(this))); + return [4 /*yield*/, child.initialize()]; + case 1: + id = (_a.sent()).id; + this.children[id] = child; + return [4 /*yield*/, child.mount()]; + case 2: + _a.sent(); + return [2 /*return*/, id]; + } + }); }); - } + }; /** * Get the child with the given identifier. * @param id The child identifier. */ - getChild(id) { + RootComponent.prototype.getChild = function (id) { return id ? (this.children[id] || null) : null; - } + }; /** * Remove a child component. * @param id The child component identifyer. */ - removeChild(id) { + RootComponent.prototype.removeChild = function (id) { return this.disposeChild(id); - } - } + }; + return RootComponent; + }(Component)); + var __extends$e = (window && window.__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 __()); + }; + })(); /** * Options for the root component. */ - class RootComponentOptions extends ComponentOptions { - constructor() { - super(); - this.tag = 'script'; - this.childFactory = new ChildComponentFactory(); - } - } + var RootComponentOptions = /** @class */ (function (_super) { + __extends$e(RootComponentOptions, _super); + function RootComponentOptions() { + var _this = _super.call(this) || this; + _this.tag = 'script'; + _this.childFactory = new ChildComponentFactory(); + return _this; + } + return RootComponentOptions; + }(ComponentOptions)); exports.ChildComponent = ChildComponent; exports.ChildComponentFactory = ChildComponentFactory; diff --git a/docs/demo/lib/bundle/index.js.map b/docs/demo/lib/bundle/index.js.map index 2b026e8..32a8574 100644 --- a/docs/demo/lib/bundle/index.js.map +++ b/docs/demo/lib/bundle/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../../../../dist/js/utilities/getHashCode.js","../../../../dist/js/utilities/random.js","../../../../dist/js/utilities/noop.js","../../../../dist/js/dom/document/generateIds.js","../../../../dist/js/dom/document/getUrlFullPath.js","../../../../dist/js/dom/document/getUrlOrigin.js","../../../../dist/js/dom/document/loadResource.js","../../../../dist/js/core/componentEvent.js","../../../../dist/js/core/component.js","../../../../dist/js/core/children/communications/event.js","../../../../dist/js/core/children/communications/containerHandler.js","../../../../dist/js/core/children/communications/contentHandler.js","../../../../dist/js/core/children/communications/crossWindowDataContract.js","../../../../dist/js/core/children/communications/manager.js","../../../../dist/js/core/children/communications/crossWindowManager.js","../../../../dist/js/dom/document/createCustomEvent.js","../../../../dist/js/core/children/communications/htmlElementManager.js","../../../../dist/js/core/children/childComponent.js","../../../../dist/js/core/children/childComponentType.js","../../../../dist/js/core/children/inWindow/containerCommunicationHandler.js","../../../../dist/js/core/children/inWindow/childComponent.js","../../../../dist/js/core/children/crossWindow/containerCommunicationHandler.js","../../../../dist/js/core/children/crossWindow/childComponent.js","../../../../dist/js/core/componentOptions.js","../../../../dist/js/core/children/childComponentOptions.js","../../../../dist/js/core/children/crossWindow/childComponentOptions.js","../../../../dist/js/core/children/crossWindow/contentComunicationHandler.js","../../../../dist/js/core/children/childComponentFactory.js","../../../../dist/js/core/children/inWindow/childComponentOptions.js","../../../../dist/js/core/children/inWindow/contentComunicationHandler.js","../../../../dist/js/core/resourceConfiguration.js","../../../../dist/js/core/rootComponentFacade.js","../../../../dist/js/core/rootComponent.js","../../../../dist/js/core/rootComponentOptions.js"],"sourcesContent":["/**\r\n * Get a hash code for the given string\r\n * @returns The has code\r\n */\r\nfunction getHashCode(value) {\r\n let hash = 0;\r\n let length = value.length;\r\n let char;\r\n let index = 0;\r\n if (length === 0)\r\n return hash;\r\n while (index < length) {\r\n char = value.charCodeAt(index);\r\n hash = ((hash << 5) - hash) + char;\r\n hash |= 0; // Convert to 32bit integer\r\n index++;\r\n }\r\n return hash;\r\n}\r\nexport { getHashCode };\r\n//# sourceMappingURL=getHashCode.js.map","/**\r\n * Generate a v4 UUID/GUID\r\n * @returns A random generated string\r\n */\r\nfunction getUuidV4() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n}\r\n/**\r\n * Generate a random string\r\n * @returns A random generated string\r\n */\r\nfunction getRandomString() { return Math.random().toString(36).substring(2); }\r\nexport { getUuidV4, getRandomString };\r\n//# sourceMappingURL=random.js.map","/**\r\n * A function that does nothing.\r\n */\r\nexport function noop() { }\r\n//# sourceMappingURL=noop.js.map","import { getRandomString } from '../../utilities/index';\r\n/**\r\n * Generate a random id that is not present in the document at this time\r\n * @param document The reference to the document object\r\n * @returns A random generated string\r\n */\r\nfunction generateUniqueId(document, prefix = '') {\r\n const prefixString = (prefix !== null && prefix !== void 0 ? prefix : '');\r\n while (true) {\r\n // The 'A-' will ensure this is always a valid JavaScript ID\r\n const id = prefixString + 'A-' + getRandomString() + getRandomString();\r\n if (document.getElementById(id) === null) {\r\n return id;\r\n }\r\n }\r\n}\r\nexport { generateUniqueId };\r\n//# sourceMappingURL=generateIds.js.map","/**\r\n * Return the full path of an url (the origin and path name)\r\n * @param document The reference to the document object\r\n * @param url The ´url´ for which to get the full path\r\n * @returns A string representing the url full path\r\n */\r\nfunction getUrlFullPath(document, url) {\r\n if (!url)\r\n return '';\r\n const a = document.createElement('a');\r\n a.setAttribute('href', url);\r\n return a.protocol + \"//\" + a.hostname + (a.port && \":\" + a.port) + a.pathname;\r\n}\r\nexport { getUrlFullPath };\r\n//# sourceMappingURL=getUrlFullPath.js.map","/**\r\n * Return the origin of an url\r\n * @param document The reference to the document object\r\n * @param url The ´url´ for which to get the 'origin'\r\n * @returns A string representing the url origin\r\n */\r\nfunction getUrlOrigin(document, url) {\r\n if (!url)\r\n return '';\r\n const a = document.createElement('a');\r\n a.setAttribute('href', url);\r\n return a.protocol + \"//\" + a.hostname + (a.port && \":\" + a.port);\r\n}\r\nexport { getUrlOrigin };\r\n//# sourceMappingURL=getUrlOrigin.js.map","/**\r\n * A function to load a resource and wait for it to load.\r\n * @param document The reference to the document object.\r\n * @param url The resource URL.\r\n * @param isScript Is this resource a script or a stylesheet?\r\n * @param skipLoading Function to determine if the resource should not be loaded.\r\n * @param attributes Extra attributes to add on the HTML element before attaching it to the document.\r\n */\r\nexport function loadResource(document, url, isScript = true, skipLoading, attributes) {\r\n if (skipLoading && skipLoading())\r\n return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n let resource;\r\n if (isScript) {\r\n resource = document.createElement('script');\r\n resource.src = url;\r\n }\r\n else {\r\n resource = document.createElement('link');\r\n resource.href = url;\r\n }\r\n if (attributes) {\r\n const keys = Object.keys(attributes);\r\n for (let index = 0; index < keys.length; index++) {\r\n const key = keys[index];\r\n resource.setAttribute(key, attributes[key]);\r\n }\r\n }\r\n resource.addEventListener('load', () => resolve());\r\n resource.addEventListener('error', () => reject(new Error(`Script load error for url: ${url}.`)));\r\n document.head.appendChild(resource);\r\n });\r\n}\r\n//# sourceMappingURL=loadResource.js.map","/**\r\n * Lifecycle event types.\r\n */\r\nexport var ComponentEventType;\r\n(function (ComponentEventType) {\r\n ComponentEventType[\"BeforeCreate\"] = \"beforeCreate\";\r\n ComponentEventType[\"Created\"] = \"created\";\r\n ComponentEventType[\"BeforeMount\"] = \"beforeMount\";\r\n ComponentEventType[\"Mounted\"] = \"mounted\";\r\n ComponentEventType[\"BeforeUpdate\"] = \"beforeUpdate\";\r\n ComponentEventType[\"Updated\"] = \"updated\";\r\n ComponentEventType[\"BeforeDestroy\"] = \"beforeDestroy\";\r\n ComponentEventType[\"Destroyed\"] = \"destroyed\";\r\n ComponentEventType[\"Error\"] = \"error\";\r\n ComponentEventType[\"Data\"] = \"data\";\r\n})(ComponentEventType || (ComponentEventType = {}));\r\n/**\r\n * Evnts triggered by the components\r\n */\r\nexport class ComponentEvent {\r\n /**\r\n * COnstructor.\r\n * @param id Component unique idnetifyer.\r\n * @param type The type of event.\r\n * @param el The componenet root element.\r\n * @param parentEl The parent element of the component.\r\n * @param error The error data in case this is an error event.\r\n */\r\n constructor(id, type, el, parentEl, error) {\r\n this.id = id;\r\n this.type = type;\r\n this.el = el;\r\n this.parentEl = parentEl;\r\n this.error = error;\r\n this.timestamp = new Date();\r\n }\r\n}\r\n//# sourceMappingURL=componentEvent.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { generateUniqueId, loadResource } from '../dom/index';\r\nimport { ComponentEvent, ComponentEventType } from './componentEvent';\r\n/**\r\n * Base class for all components.\r\n */\r\nexport class Component {\r\n /**\r\n * Constructor\r\n * @param window The reference to the window object\r\n * @param options The component options\r\n */\r\n constructor(window, options) {\r\n if (!window)\r\n throw new Error('Missing \"window\" argument.');\r\n if (!options)\r\n throw new Error('Missing \"options\" argument.');\r\n this.isInitialized = false;\r\n this.isMounted = false;\r\n this.resourcesLoaded = false;\r\n this.id = '';\r\n this.rootElement = null;\r\n this.window = window;\r\n this.options = options;\r\n this.disposed = false;\r\n }\r\n /**\r\n * Create the root element hat will \"encapsulate\" the rest of the elements.\r\n */\r\n createRootElement() {\r\n if (this.rootElement)\r\n return;\r\n const parent = this.getParentElement();\r\n this.rootElement = this.getDocument().createElement(this.getOptions().tag);\r\n this.id = generateUniqueId(this.getDocument(), 'ufe-');\r\n this.rootElement.id = this.id;\r\n parent.appendChild(this.rootElement);\r\n }\r\n /**\r\n * Get the parent element that hosts this component.\r\n */\r\n getParentElement() {\r\n let parent = null;\r\n const opt = this.getOptions();\r\n if (opt.parent) {\r\n if (typeof opt.parent === 'string') {\r\n parent = this.getDocument().querySelector(opt.parent);\r\n }\r\n else {\r\n parent = opt.parent;\r\n }\r\n }\r\n if (!parent)\r\n throw new Error(`Failed to find parent \"${opt.parent}\".`);\r\n return parent;\r\n }\r\n /**\r\n * Load the resources required by the compoent.\r\n */\r\n loadResources() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.resourcesLoaded)\r\n return;\r\n this.resourcesLoaded = true;\r\n const options = this.getOptions();\r\n if (options.resources && options.resources.length > 0) {\r\n const document = this.getDocument();\r\n for (let index = 0; index < options.resources.length; index++) {\r\n const resource = options.resources[index];\r\n // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES\r\n // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY\r\n yield loadResource(document, resource.url, resource.isScript, resource.skip, resource.attributes);\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Get the optons data.\r\n */\r\n getOptions() {\r\n return this.options;\r\n }\r\n /**\r\n * Get the wndow reference.\r\n */\r\n getWindow() { return this.window; }\r\n /**\r\n * Get the document refrence.\r\n */\r\n getDocument() { return this.getWindow().document; }\r\n /**\r\n * Core initialization function.\r\n * Any component derived should override this to add extra functionality.\r\n */\r\n initializeCore() { return Promise.resolve(); }\r\n /**\r\n * Core mount function.\r\n * Any component derived should override this to add extra functionality.\r\n */\r\n mountCore() {\r\n // This needs to be handled by each component\r\n // this.callHandler(ComponentEventType.Mounted);\r\n return Promise.resolve();\r\n }\r\n /**\r\n * Core dispose function.\r\n * Any component derived should override this to add clean-up after itself.\r\n */\r\n disposeCore() { return Promise.resolve(); }\r\n /**\r\n * Call the global error handler.\r\n * @param e The error object\r\n */\r\n callErrorHandler(e) {\r\n var _a;\r\n const handler = (_a = this.options.handlers) === null || _a === void 0 ? void 0 : _a.error;\r\n if (handler) {\r\n try {\r\n handler(new ComponentEvent(this.id, ComponentEventType.Error, this.rootElement, this.getParentElement(), e));\r\n }\r\n catch (error) {\r\n this.log(error);\r\n }\r\n }\r\n else {\r\n this.log(e);\r\n }\r\n }\r\n /**\r\n * Call a specific event handler.\r\n * @param type The type of handler to call.\r\n */\r\n callHandler(type, data) {\r\n if (type === ComponentEventType.Error)\r\n throw new Error(`For calling the \"${ComponentEventType.Error}\" handler use the \"callErrorHandler\" method.`);\r\n const handler = this.options.handlers\r\n ? this.options.handlers[type]\r\n : null;\r\n if (handler) {\r\n try {\r\n const event = new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null);\r\n event.data = data;\r\n handler(event);\r\n }\r\n catch (error) {\r\n this.callErrorHandler(error);\r\n }\r\n }\r\n }\r\n /**\r\n * Logging method.\r\n * @param message The message.\r\n * @param optionalParams Optional parameters.\r\n */\r\n log(message, ...optionalParams) {\r\n var _a, _b;\r\n const logMethod = (_b = (_a = this.window) === null || _a === void 0 ? void 0 : _a.console) === null || _b === void 0 ? void 0 : _b.log;\r\n if (logMethod)\r\n logMethod(message, optionalParams);\r\n }\r\n /**\r\n * Method invoked to initialize the component.\r\n * It should create the root element and any base dependencies.\r\n */\r\n initialize() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.isInitialized)\r\n return this;\r\n this.callHandler(ComponentEventType.BeforeCreate);\r\n this.isInitialized = true;\r\n try {\r\n yield this.loadResources();\r\n this.createRootElement();\r\n yield this.initializeCore();\r\n }\r\n catch (e) {\r\n this.callErrorHandler(e);\r\n }\r\n this.callHandler(ComponentEventType.Created);\r\n return this;\r\n });\r\n }\r\n /**\r\n * Method invoked to mount the actual content of the component.\r\n */\r\n mount() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.isInitialized) {\r\n this.callErrorHandler(new Error(`Call \"initialize\" before calling \"mount\".`));\r\n return this;\r\n }\r\n if (this.isMounted)\r\n return this;\r\n this.callHandler(ComponentEventType.BeforeMount);\r\n this.isMounted = true;\r\n try {\r\n yield this.mountCore();\r\n }\r\n catch (e) {\r\n this.callErrorHandler(e);\r\n }\r\n return this;\r\n });\r\n }\r\n /**\r\n * Method invoked to dispose of the component.\r\n */\r\n dispose() {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.disposed)\r\n return;\r\n this.callHandler(ComponentEventType.BeforeDestroy);\r\n this.disposed = true;\r\n try {\r\n yield this.disposeCore();\r\n }\r\n catch (e) {\r\n this.callErrorHandler(e);\r\n }\r\n this.callHandler(ComponentEventType.Destroyed);\r\n this.id = '';\r\n this.isInitialized = false;\r\n this.isMounted = false;\r\n this.resourcesLoaded = false;\r\n (_b = (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(this.rootElement);\r\n this.rootElement = null;\r\n this.window = null;\r\n });\r\n }\r\n}\r\n//# sourceMappingURL=component.js.map","import { getUuidV4 } from '../../../utilities/random';\r\n/**\r\n * Kind of events used to comunicate between content and container component.\r\n */\r\nexport var CommunicationsEventKind;\r\n(function (CommunicationsEventKind) {\r\n CommunicationsEventKind[\"Mounted\"] = \"mounted\";\r\n CommunicationsEventKind[\"BeforeUpdate\"] = \"beforeUpdate\";\r\n CommunicationsEventKind[\"Updated\"] = \"updated\";\r\n CommunicationsEventKind[\"BeforeDispose\"] = \"beforeDispose\";\r\n CommunicationsEventKind[\"Disposed\"] = \"disposed\";\r\n CommunicationsEventKind[\"Data\"] = \"data\";\r\n})(CommunicationsEventKind || (CommunicationsEventKind = {}));\r\n/**\r\n * Event used to comunicate between content and container component.\r\n */\r\nexport class CommunicationsEvent {\r\n /**\r\n * Constructor.\r\n * @param kind The kind of event.\r\n */\r\n constructor(kind) {\r\n this.kind = kind;\r\n this.uuid = getUuidV4();\r\n this.timestamp = new Date().getTime();\r\n this.contentId = '';\r\n }\r\n}\r\n/**\r\n * The type of event dispatched by the child component.\r\n */\r\nCommunicationsEvent.CONTENT_EVENT_TYPE = 'content_event.communication.children.validide_micro_front_ends';\r\n/**\r\n * The type of event dispatched by the content.\r\n */\r\nCommunicationsEvent.CONTAINER_EVENT_TYPE = 'container_event.communication.children.validide_micro_front_ends';\r\n//# sourceMappingURL=event.js.map","var _a, _b, _c, _d, _e, _f;\r\nimport { CommunicationsEventKind, CommunicationsEvent } from './event';\r\nimport { noop } from '../../../utilities/noop';\r\n/**\r\n * The communication handler methods.\r\n */\r\nexport class ContainerCommunicationHandlerMethods {\r\n constructor() {\r\n /**\r\n * Call the container to signal that the content finished mounting.\r\n */\r\n this[_a] = noop;\r\n /**\r\n * Call the container to signal an update is about to happen.\r\n */\r\n this[_b] = noop;\r\n /**\r\n * Call the container to signal an update finished.\r\n */\r\n this[_c] = noop;\r\n /**\r\n * Call the container to signal dispose started.\r\n */\r\n this[_d] = noop;\r\n /**\r\n * Call the container to signal the component has disposed(almost).\r\n */\r\n this[_e] = noop;\r\n /**\r\n * Call the container to signal the component has disposed(almost).\r\n */\r\n this[_f] = noop;\r\n }\r\n}\r\n_a = CommunicationsEventKind.Mounted, _b = CommunicationsEventKind.BeforeUpdate, _c = CommunicationsEventKind.Updated, _d = CommunicationsEventKind.BeforeDispose, _e = CommunicationsEventKind.Disposed, _f = CommunicationsEventKind.Data;\r\n/**\r\n * Handle the communications on the child component side.\r\n */\r\nexport class ContainerCommunicationHandler {\r\n /**\r\n * Constructor\r\n * @param communicationsManager A communications manager.\r\n * @param handlerMethods A collection of handler methods.\r\n */\r\n constructor(communicationsManager, handlerMethods) {\r\n this.communicationsManager = communicationsManager;\r\n this.handlerMethods = handlerMethods;\r\n this.communicationsManager.setEventReceivedCallback((e) => {\r\n this.handleEvent(e);\r\n });\r\n this.disposed = false;\r\n }\r\n /**\r\n * Core functionality for handling the incomming events.\r\n * @param e The event.\r\n */\r\n handleEventCore(e) {\r\n if (!this.handlerMethods)\r\n return;\r\n const method = this.handlerMethods[e.kind];\r\n if (!method)\r\n return;\r\n method(e.data);\r\n }\r\n /**\r\n * Handle the incomming communications event.\r\n * @param e The event\r\n */\r\n handleEvent(e) {\r\n this.handleEventCore(e);\r\n }\r\n /**\r\n * Method invoked to dispose of the handler.\r\n */\r\n dispose() {\r\n var _g;\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.dispose();\r\n this.communicationsManager = null;\r\n this.handlerMethods = null;\r\n }\r\n /**\r\n * Send a message.\r\n * @param event The message.\r\n */\r\n send(event) {\r\n var _g;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event);\r\n }\r\n /**\r\n * Send data.\r\n * @param data The data to send.\r\n */\r\n sendData(data) {\r\n var _g;\r\n const event = new CommunicationsEvent(CommunicationsEventKind.Data);\r\n event.data = data;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event);\r\n }\r\n /**\r\n * Reuest that the content begins disposing.\r\n */\r\n requestContentDispose() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeDispose));\r\n }\r\n}\r\n//# sourceMappingURL=containerHandler.js.map","import { CommunicationsEventKind, CommunicationsEvent } from './event';\r\nimport { noop } from '../../../utilities/noop';\r\n/**\r\n * Content communications handler methods\r\n */\r\nexport class ContentCommunicationHandlerMethods {\r\n constructor() {\r\n /**\r\n * Method to dispose the content.\r\n */\r\n this.dispose = noop;\r\n /**\r\n * Method to dispose the content.\r\n */\r\n this.handleDataEvent = noop;\r\n }\r\n}\r\n/**\r\n * Handle the communications on the component content side.\r\n */\r\nexport class ContentCommunicationHandler {\r\n /**\r\n * Constructor\r\n * @param communicationsManager A comunications manager\r\n * @param methods The callback to dispose the content.\r\n */\r\n constructor(communicationsManager, methods) {\r\n this.communicationsManager = communicationsManager;\r\n this.methods = methods;\r\n this.communicationsManager.setEventReceivedCallback((e) => {\r\n this.handleEvent(e);\r\n });\r\n this.disposed = false;\r\n }\r\n /**\r\n * Core functionality for handling the incomming events.\r\n * @param e The event.\r\n */\r\n handleEventCore(e) {\r\n switch (e.kind) {\r\n case CommunicationsEventKind.BeforeDispose:\r\n case CommunicationsEventKind.Disposed:\r\n if (this.methods) {\r\n this.methods.dispose();\r\n }\r\n break;\r\n case CommunicationsEventKind.Data:\r\n if (this.methods) {\r\n this.methods.handleDataEvent(e.data);\r\n }\r\n break;\r\n default:\r\n throw new Error(`The \"${e.kind}\" event is not configured.`);\r\n }\r\n }\r\n /**\r\n * Handle the incomming communications event.\r\n * @param e The event\r\n */\r\n handleEvent(e) {\r\n this.handleEventCore(e);\r\n }\r\n /**\r\n * Core dispose function.\r\n * Any component derived should override this to add clean-up after itself.\r\n */\r\n disposeCore() { }\r\n /**\r\n * Send a message.\r\n * @param event The message.\r\n */\r\n send(event) {\r\n var _a;\r\n (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.send(event);\r\n }\r\n /**\r\n * Dispatch event to signal mounting finished.\r\n */\r\n sendData(data) {\r\n const evt = new CommunicationsEvent(CommunicationsEventKind.Data);\r\n evt.data = data;\r\n this.send(evt);\r\n }\r\n /**\r\n * Dispatch event to signal mounting finished.\r\n */\r\n dispatchMounted() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Mounted));\r\n }\r\n /**\r\n * Dispatch event to signal update is about to start.\r\n */\r\n dispatchBeforeUpdate() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeUpdate));\r\n }\r\n /**\r\n * Dispatch event to signal update finished.\r\n */\r\n dispatchUpdated() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Updated));\r\n }\r\n /**\r\n * Dispatch event to disposing started.\r\n */\r\n dispatchBeforeDispose() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeDispose));\r\n }\r\n /**\r\n * Dispatch event to mount finished.\r\n */\r\n dispatchDisposed() {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Disposed));\r\n }\r\n /**\r\n * Method invoked to dispose of the handler.\r\n */\r\n dispose() {\r\n var _a;\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n this.disposeCore();\r\n (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.communicationsManager = null;\r\n this.methods = null;\r\n }\r\n}\r\n//# sourceMappingURL=contentHandler.js.map","/**\r\n * The data sent between the windows directly on the Message Event.\r\n */\r\nexport class CrossWindowCommunicationDataContract {\r\n /**\r\n * Constructor.\r\n * @param type Data type.\r\n * @param detail Data detail.\r\n */\r\n constructor(type, detail) {\r\n this.type = type;\r\n this.detail = detail;\r\n }\r\n}\r\n//# sourceMappingURL=crossWindowDataContract.js.map","export class CommunicationsManager {\r\n /**\r\n * Constructor.\r\n */\r\n constructor() {\r\n this.initialized = false;\r\n this.disposed = false;\r\n }\r\n /**\r\n * Initialize the manager.\r\n */\r\n initializeCore() { }\r\n /**\r\n * Clean any resources before the manager is disposed.\r\n */\r\n disposeCore() { }\r\n /**\r\n * Initialize the manager.\r\n */\r\n initialize() {\r\n if (this.initialized)\r\n return;\r\n this.initialized = true;\r\n this.initializeCore();\r\n }\r\n /**\r\n * Dispose of the manager.\r\n */\r\n dispose() {\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n this.disposeCore();\r\n }\r\n}\r\n/**\r\n * Comunications manager base class.\r\n */\r\nexport class CommunicationsManagerOf extends CommunicationsManager {\r\n /**\r\n * Constructor\r\n * @param inboundEndpoint The endpoint for receiving messages.\r\n * @param inboundEventType The types of messages to receive.\r\n * @param outboundEndpoint The endpoint to sent mesages.\r\n * @param outboundEventType The messages to send.\r\n */\r\n constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) {\r\n super();\r\n this.inboundEndpoint = inboundEndpoint;\r\n this.inboundEventType = inboundEventType;\r\n this.outboundEndpoint = outboundEndpoint;\r\n this.outboundEventType = outboundEventType;\r\n this.onEventReceived = null;\r\n this.eventHandler = (e) => { this.handleEvent(e); };\r\n }\r\n /**\r\n * Handle the received events.\r\n * @param e The recevied event.\r\n */\r\n handleEvent(e) {\r\n if (!this.onEventReceived)\r\n return;\r\n const evt = this.readEvent(e);\r\n if (evt) {\r\n this.onEventReceived(evt);\r\n }\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n initializeCore() {\r\n if (this.inboundEndpoint && this.eventHandler) {\r\n this.startReceiving(this.inboundEndpoint, this.eventHandler);\r\n }\r\n super.initializeCore();\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n disposeCore() {\r\n if (this.inboundEndpoint && this.eventHandler) {\r\n this.stopReceiving(this.inboundEndpoint, this.eventHandler);\r\n }\r\n this.eventHandler = null;\r\n this.onEventReceived = null;\r\n this.inboundEndpoint = null;\r\n super.disposeCore();\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n send(event) {\r\n if (this.outboundEndpoint) {\r\n this.sendEvent(this.outboundEndpoint, event);\r\n }\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n setEventReceivedCallback(callback) {\r\n this.onEventReceived = callback;\r\n }\r\n}\r\n//# sourceMappingURL=manager.js.map","import { CommunicationsManagerOf } from '../communications/manager';\r\nimport { CrossWindowCommunicationDataContract } from './crossWindowDataContract';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class CrossWindowCommunicationsManager extends CommunicationsManagerOf {\r\n /**\r\n * Constructor\r\n * @param inboundEndpoint The endpoint for receiving messages.\r\n * @param inboundEventType The types of messages to receive.\r\n * @param outboundEndpoint The endpoint to sent mesages.\r\n * @param outboundEventType The messages to send.\r\n * @param origin The origin to comunicate with.\r\n */\r\n constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType, origin) {\r\n super(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType);\r\n this.origin = origin;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n readEvent(e) {\r\n const messageEvent = e;\r\n if (!messageEvent || messageEvent.origin !== this.origin)\r\n return null;\r\n const data = messageEvent.data;\r\n if (!data || data.type !== this.inboundEventType)\r\n return null;\r\n return data.detail ? data.detail : null;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n startReceiving(inboundEndpoint, handler) {\r\n inboundEndpoint.addEventListener('message', handler);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n stopReceiving(inboundEndpoint, handler) {\r\n inboundEndpoint.removeEventListener('message', handler);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n sendEvent(outboundEndpoint, event) {\r\n const data = new CrossWindowCommunicationDataContract(this.outboundEventType, event);\r\n outboundEndpoint.postMessage(data, this.origin);\r\n }\r\n}\r\n//# sourceMappingURL=crossWindowManager.js.map","function customEventPolyfill(document, typeArg, eventInitDict) {\r\n const params = eventInitDict || { bubbles: false, cancelable: false, detail: null };\r\n var evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(typeArg, params.bubbles || false, params.cancelable || false, params.detail);\r\n return evt;\r\n}\r\nexport function createCustomEvent(document, typeArg, eventInitDict) {\r\n const win = document === null || document === void 0 ? void 0 : document.defaultView;\r\n if (!win)\r\n throw new Error('Document does not have a defualt view.');\r\n if (typeof win.CustomEvent !== 'function') {\r\n return new customEventPolyfill(document, typeArg, eventInitDict);\r\n }\r\n return new win.CustomEvent(typeArg, eventInitDict);\r\n}\r\n//# sourceMappingURL=createCustomEvent.js.map","import { CommunicationsEvent } from '../communications/event';\r\nimport { CommunicationsManagerOf } from '../communications/manager';\r\nimport { createCustomEvent } from '../../../dom/document/createCustomEvent';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class HTMLElementCommunicationsManager extends CommunicationsManagerOf {\r\n /**\r\n * @inheritdoc\r\n */\r\n constructor(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) {\r\n super(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n readEvent(e) {\r\n const customEvent = e;\r\n if (!customEvent || customEvent.type !== this.inboundEventType)\r\n return null;\r\n return customEvent.detail instanceof CommunicationsEvent\r\n ? customEvent.detail\r\n : null;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n startReceiving(inboundEndpoint, handler) {\r\n inboundEndpoint.addEventListener(this.inboundEventType, handler);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n stopReceiving(inboundEndpoint, handler) {\r\n inboundEndpoint.removeEventListener(this.inboundEventType, handler);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n sendEvent(outboundEndpoint, event) {\r\n if (!outboundEndpoint.ownerDocument)\r\n return;\r\n const evt = createCustomEvent(outboundEndpoint.ownerDocument, this.outboundEventType, { detail: event });\r\n outboundEndpoint.dispatchEvent(evt);\r\n }\r\n}\r\n//# sourceMappingURL=htmlElementManager.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Component } from '../component';\r\nimport { ComponentEventType } from '../componentEvent';\r\nimport { ContainerCommunicationHandlerMethods } from './communications/index';\r\n/**\r\n * Child component base class.\r\n */\r\nexport class ChildComponent extends Component {\r\n /**\r\n * Constructor.\r\n * @param window The window reference.\r\n * @param options The child options.\r\n * @param rootFacade The facade to the root component.\r\n */\r\n constructor(window, options, rootFacade) {\r\n super(window, options);\r\n this.rootFacade = rootFacade;\r\n this.communicationHandler = null;\r\n this.contentDisposePromise = null;\r\n this.contentDisposePromiseResolver = null;\r\n }\r\n /**\r\n * Get the comunication handler.\r\n */\r\n getCommunicationHandler() {\r\n const methods = new ContainerCommunicationHandlerMethods();\r\n methods.mounted = () => this.callHandler(ComponentEventType.Mounted);\r\n methods.beforeUpdate = () => this.callHandler(ComponentEventType.BeforeUpdate);\r\n methods.updated = () => this.callHandler(ComponentEventType.Updated);\r\n methods.data = (data) => this.callHandler(ComponentEventType.Data, data);\r\n methods.beforeDispose = () => this.contentBeginDisposed();\r\n methods.disposed = () => this.contentDisposed();\r\n return this.getCommunicationHandlerCore(methods);\r\n }\r\n /**\r\n * Get the child component options.\r\n */\r\n getOptions() {\r\n return super.getOptions();\r\n }\r\n /**\r\n * Handler for the signal that the component started to dispose.\r\n */\r\n contentBeginDisposed() {\r\n if (this.contentDisposePromise !== null)\r\n return; // Dispose has already started.\r\n this.setContentDisposePromise();\r\n // Inform parent the content is beeing disposed.\r\n this.rootFacade.signalDisposed(this);\r\n }\r\n /**\r\n * Signal the content that it will be disposed.\r\n */\r\n startDisposingContent() {\r\n if (this.contentDisposePromise !== null)\r\n return; // Dispose has already started.\r\n this.setContentDisposePromise();\r\n // This should trigger the child component dispose.\r\n this.communicationHandler.requestContentDispose();\r\n }\r\n /**\r\n * Set the promise that is used fof the disposing of the component.\r\n */\r\n setContentDisposePromise() {\r\n this.contentDisposePromise = Promise\r\n .race([\r\n new Promise((resolver, rejecter) => {\r\n this.contentDisposePromiseResolver = resolver;\r\n }),\r\n new Promise((resolveTimeout, rejectTimeout) => {\r\n this\r\n .getWindow()\r\n .setTimeout(() => rejectTimeout(new Error(`Child dispose timeout.`)), this.getOptions().contentDisposeTimeout);\r\n })\r\n ])\r\n .catch((err) => {\r\n this.callErrorHandler(err);\r\n });\r\n }\r\n /**\r\n * Handler for the signal that the content has finished disposing.\r\n */\r\n contentDisposed() {\r\n if (this.contentDisposePromiseResolver === null) {\r\n // For some reason we got the disposed call without getting the 'beginDispose' call.\r\n this.contentDisposePromise = Promise.resolve();\r\n this.rootFacade.signalDisposed(this);\r\n }\r\n else {\r\n this.contentDisposePromiseResolver();\r\n }\r\n }\r\n /**\r\n * @@inheritdoc\r\n */\r\n mountCore() {\r\n if (!this.communicationHandler) {\r\n this.communicationHandler = this.getCommunicationHandler();\r\n }\r\n return super.mountCore();\r\n }\r\n /**\r\n * @@inheritdoc\r\n */\r\n disposeCore() {\r\n const _super = Object.create(null, {\r\n disposeCore: { get: () => super.disposeCore }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.startDisposingContent();\r\n yield this.contentDisposePromise;\r\n this.communicationHandler.dispose();\r\n this.communicationHandler = null;\r\n this.contentDisposePromiseResolver = null;\r\n this.contentDisposePromise = null;\r\n yield _super.disposeCore.call(this);\r\n });\r\n }\r\n /**\r\n * Send data.\r\n * @param data The data to send.\r\n */\r\n sendData(data) {\r\n var _a;\r\n (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendData(data);\r\n }\r\n}\r\n//# sourceMappingURL=childComponent.js.map","/**\r\n * The type of child component.\r\n */\r\nexport var ChildComponentType;\r\n(function (ChildComponentType) {\r\n /**\r\n * In window component(JavaScript or WebComponent Custom Element)\r\n */\r\n ChildComponentType[\"InWindow\"] = \"inWindow\";\r\n /**\r\n * Cross window component(loaded in an embedable form - Iframe)\r\n */\r\n ChildComponentType[\"CrossWindow\"] = \"crossWindow\";\r\n})(ChildComponentType || (ChildComponentType = {}));\r\n//# sourceMappingURL=childComponentType.js.map","import { ContainerCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class InWindowContainerCommunicationHandler extends ContainerCommunicationHandler {\r\n /**\r\n * @inheritdoc\r\n */\r\n constructor(communicationsManager, wrapperMethods) {\r\n super(communicationsManager, wrapperMethods);\r\n }\r\n}\r\n//# sourceMappingURL=containerCommunicationHandler.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { ChildComponent } from '../childComponent';\r\nimport { CommunicationsEvent, HTMLElementCommunicationsManager } from '../communications/index';\r\nimport { InWindowContainerCommunicationHandler } from './containerCommunicationHandler';\r\n/**\r\n * In Window Child Component.\r\n */\r\nexport class InWindowChildComponent extends ChildComponent {\r\n /**\r\n * Constructor.\r\n * @param window The window reference.\r\n * @param options The child component options.\r\n * @param rootFacade The facade to the root component.\r\n */\r\n constructor(window, options, rootFacade) {\r\n super(window, options, rootFacade);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n getCommunicationHandlerCore(methods) {\r\n const endpoint = this.rootElement;\r\n const manager = new HTMLElementCommunicationsManager(endpoint, CommunicationsEvent.CONTENT_EVENT_TYPE, endpoint, CommunicationsEvent.CONTAINER_EVENT_TYPE);\r\n manager.initialize();\r\n return new InWindowContainerCommunicationHandler(manager, methods);\r\n }\r\n /**\r\n * Get the InWindowChildComponentOptions\r\n */\r\n getOptions() {\r\n return super.getOptions();\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n mountCore() {\r\n const _super = Object.create(null, {\r\n mountCore: { get: () => super.mountCore }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const injectionFunction = this.getOptions().inject;\r\n if (!injectionFunction) {\r\n throw new Error('Inject method not defined!');\r\n }\r\n injectionFunction(this.rootElement);\r\n yield _super.mountCore.call(this);\r\n });\r\n }\r\n}\r\n//# sourceMappingURL=childComponent.js.map","import { CommunicationsEvent, ContainerCommunicationHandler, CommunicationsEventKind } from '../communications/index';\r\nimport { getHashCode } from '../../../utilities/getHashCode';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class CrossWindowContainerCommunicationHandler extends ContainerCommunicationHandler {\r\n /**\r\n * Constructor.\r\n * @param communicationsManager A communications manager.\r\n * @param embedId The Id of the embeded element.\r\n * @param containerMethods The methods to communicate with the container.\r\n */\r\n constructor(communicationsManager, embedId, containerMethods) {\r\n super(communicationsManager, containerMethods);\r\n this.embedId = embedId;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n handleEventCore(e) {\r\n if (!this.embedId)\r\n return;\r\n if (!e.contentId && e.kind === CommunicationsEventKind.Mounted) {\r\n this.attemptHandShake(e);\r\n return;\r\n }\r\n if (this.embedId !== e.contentId)\r\n return;\r\n super.handleEventCore(e);\r\n }\r\n /**\r\n * Attempt a andshake with the content.\r\n */\r\n attemptHandShake(e) {\r\n const hash = getHashCode(this.embedId).toString(10);\r\n const response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n // We got a message back so if the data matches the hash we sent send the id\r\n if (e.data && e.data === hash) {\r\n response.contentId = this.embedId;\r\n }\r\n else {\r\n response.data = hash;\r\n }\r\n this.send(response);\r\n }\r\n}\r\n//# sourceMappingURL=containerCommunicationHandler.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { ChildComponent } from '../childComponent';\r\nimport { CrossWindowCommunicationsManager, CommunicationsEvent } from '../communications/index';\r\nimport { CrossWindowContainerCommunicationHandler } from './containerCommunicationHandler';\r\nimport { generateUniqueId } from '../../../dom/document/generateIds';\r\nimport { getUrlOrigin } from '../../../dom/document/getUrlOrigin';\r\n/**\r\n * Cross Window Child Component.\r\n */\r\nexport class CrossWindowChildComponent extends ChildComponent {\r\n /**\r\n * Constructor.\r\n * @param window The window refrence.\r\n * @param options The child options.\r\n * @param rootFacade he root component facade.\r\n */\r\n constructor(window, options, rootFacade) {\r\n super(window, options, rootFacade);\r\n this.embededId = '';\r\n this.embededLoadResolver = null;\r\n this.embededErrorRejecter = null;\r\n this.embededLoadPromise = new Promise((resolve, reject) => {\r\n this.embededLoadResolver = resolve;\r\n this.embededErrorRejecter = reject;\r\n });\r\n this.embededLoadHandlerRef = this.embededLoadHandler.bind(this);\r\n this.embededErrorHandlerRef = this.embededErrorHandler.bind(this);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n disposeCore() {\r\n const embed = this.embededId\r\n ? this.rootElement.querySelector(`#${this.embededId}`)\r\n : null;\r\n if (embed) {\r\n embed.removeEventListener('load', this.embededLoadHandlerRef);\r\n embed.removeEventListener('error', this.embededErrorHandlerRef);\r\n // Do not remove the embeded element now as we still need it to comunicate with the content.\r\n // The parent \"rootElement\" will be removed latter anyhow.\r\n // (embed.parentElement).removeChild(embed);\r\n }\r\n this.embededLoadHandlerRef = null;\r\n this.embededErrorHandlerRef = null;\r\n this.embededLoadResolver = null;\r\n this.embededErrorRejecter = null;\r\n this.embededLoadPromise = null;\r\n return super.disposeCore();\r\n }\r\n /**\r\n * Get the CrossWindowChildComponentOptions\r\n */\r\n getOptions() {\r\n return super.getOptions();\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n mountCore() {\r\n const _super = Object.create(null, {\r\n mountCore: { get: () => super.mountCore }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const createEmbedElementFn = this.getOptions().createEmbedElement;\r\n let embed = null;\r\n if (createEmbedElementFn) {\r\n embed = createEmbedElementFn(this.rootElement);\r\n }\r\n else {\r\n embed = this.createEmbedElement();\r\n }\r\n if (!embed)\r\n throw new Error('Failed to create embed element!');\r\n const embedId = generateUniqueId(this.getDocument(), 'ufe-cross-');\r\n embed.id = embedId;\r\n this.embededId = embedId;\r\n embed.addEventListener('load', this.embededLoadHandlerRef);\r\n embed.addEventListener('error', this.embededErrorHandlerRef);\r\n this.rootElement.appendChild(embed);\r\n yield (this.embededLoadPromise);\r\n return yield _super.mountCore.call(this);\r\n });\r\n }\r\n /**\r\n *\r\n * @param methods @inheritdoc\r\n */\r\n getCommunicationHandlerCore(methods) {\r\n const document = this.getDocument();\r\n const manager = new CrossWindowCommunicationsManager((document).defaultView, CommunicationsEvent.CONTENT_EVENT_TYPE, this.outboundEndpointAccesor(), CommunicationsEvent.CONTAINER_EVENT_TYPE, getUrlOrigin(document, this.getOptions().url));\r\n manager.initialize();\r\n return new CrossWindowContainerCommunicationHandler(manager, this.embededId, methods);\r\n }\r\n /**\r\n * Handle the loading of the embeded element.\r\n * @param e The load event.\r\n */\r\n embededLoadHandler(e) {\r\n this.embededLoadResolver();\r\n }\r\n /**\r\n * Handle the errir of the embeded element.\r\n * @param e The error event.\r\n */\r\n embededErrorHandler(e) {\r\n this.embededErrorRejecter(new Error(`Failed to load embeded element.\\nError details:\\n${JSON.stringify(e)}`));\r\n }\r\n /**\r\n * Create the embeded element.\r\n */\r\n createEmbedElement() {\r\n const embed = this.getDocument().createElement('iframe');\r\n const opt = this.getOptions();\r\n if (opt.embededAttributes) {\r\n const keys = Object.keys(opt.embededAttributes);\r\n for (let index = 0; index < keys.length; index++) {\r\n const key = keys[index];\r\n embed.setAttribute(key, opt.embededAttributes[key]);\r\n }\r\n }\r\n embed.setAttribute('src', opt.url);\r\n return embed;\r\n }\r\n /**\r\n * Access the outbound comunication endpoint.\r\n */\r\n outboundEndpointAccesor() {\r\n const embed = this.embededId\r\n ? this.rootElement.querySelector(`#${this.embededId}`)\r\n : null;\r\n if (!embed)\r\n throw new Error(`No iframe with \"${this.embededId}\" id found.`);\r\n if (!embed.contentWindow)\r\n throw new Error(`The iframe with \"${this.embededId}\" id does not have a \"contentWindow\"(${embed.contentWindow}).`);\r\n return embed.contentWindow;\r\n }\r\n}\r\n//# sourceMappingURL=childComponent.js.map","import { ComponentEventType } from './componentEvent';\r\n/**\r\n * Configuration object for the event handlers.\r\n */\r\nexport class ComponentEventHandlers {\r\n}\r\nComponentEventType.BeforeCreate, ComponentEventType.Created, ComponentEventType.BeforeMount, ComponentEventType.Mounted, ComponentEventType.BeforeUpdate, ComponentEventType.Updated, ComponentEventType.BeforeDestroy, ComponentEventType.Destroyed, ComponentEventType.Error, ComponentEventType.Data;\r\n/**\r\n * Compoent configuration options.\r\n */\r\nexport class ComponentOptions {\r\n constructor() {\r\n this.parent = 'body';\r\n this.tag = 'div';\r\n this.handlers = new ComponentEventHandlers();\r\n this.resources = [];\r\n }\r\n}\r\n//# sourceMappingURL=componentOptions.js.map","import { ChildComponentType } from './childComponentType';\r\nimport { ComponentOptions } from '../componentOptions';\r\n/**\r\n * Child component options.\r\n */\r\nexport class ChildComponentOptions extends ComponentOptions {\r\n constructor() {\r\n super();\r\n this.type = ChildComponentType.InWindow;\r\n /**\r\n * The the interval to wait for the component before triggering an error and the 'disposed' event.\r\n */\r\n this.contentDisposeTimeout = 3000;\r\n }\r\n}\r\n//# sourceMappingURL=childComponentOptions.js.map","import { ChildComponentOptions } from '../childComponentOptions';\r\nimport { ChildComponentType } from '../childComponentType';\r\n/**\r\n * Cross Window Child Component Options.\r\n */\r\nexport class CrossWindowChildComponentOptions extends ChildComponentOptions {\r\n /**\r\n * Constructor.\r\n */\r\n constructor() {\r\n super();\r\n this.url = 'about:blank';\r\n this.type = ChildComponentType.CrossWindow;\r\n }\r\n}\r\n//# sourceMappingURL=childComponentOptions.js.map","import { CommunicationsEvent, CommunicationsEventKind, ContentCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class CrossWindowContentCommunicationHandler extends ContentCommunicationHandler {\r\n /**\r\n * Constructor.\r\n * @param communicationsManager A communications manager.\r\n * @param methods The callback to dispose the content.\r\n */\r\n constructor(communicationsManager, methods) {\r\n super(communicationsManager, methods);\r\n this.iframeId = '';\r\n this.messageQueue = [];\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n disposeCore() {\r\n this.messageQueue = [];\r\n super.disposeCore();\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n handleEventCore(e) {\r\n if (!this.iframeId) {\r\n this.attemptHandShake(e);\r\n return;\r\n }\r\n super.handleEventCore(e);\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n send(message) {\r\n if (this.iframeId) {\r\n message.contentId = this.iframeId;\r\n }\r\n else {\r\n if (message.kind !== CommunicationsEventKind.Mounted) {\r\n // In case we do not have an iframeId push all events to queue,\r\n // only Mounted are allowed to establish handshake.\r\n this.messageQueue.push(message);\r\n return;\r\n }\r\n }\r\n super.send(message);\r\n }\r\n /**\r\n * Attempt a handshake with the container.\r\n * @param e The communication event.\r\n */\r\n attemptHandShake(e) {\r\n if (e.contentId) {\r\n // Phase 2 of the handshake - we got the id.\r\n this.iframeId = e.contentId;\r\n // Send it again to notify parent.\r\n const response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n response.contentId = this.iframeId;\r\n this.send(response);\r\n // Send the previously queued messages.\r\n this.flushMessages();\r\n }\r\n else {\r\n // Phase 1 of the handshake - we got the hash so send it back.\r\n const response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n response.contentId = this.iframeId;\r\n response.data = e.data;\r\n this.send(response);\r\n }\r\n }\r\n /**\r\n * Flush all the messages that were enqueues before the handhake.\r\n */\r\n flushMessages() {\r\n for (let index = 0; index < this.messageQueue.length; index++) {\r\n const msg = this.messageQueue[index];\r\n msg.contentId = this.iframeId;\r\n this.send(msg);\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=contentComunicationHandler.js.map","import { ChildComponentType } from './childComponentType';\r\nimport { InWindowChildComponent } from './inWindow/childComponent';\r\nimport { CrossWindowChildComponent } from './crossWindow/index';\r\n/**\r\n * Factory to create child components.\r\n */\r\nexport class ChildComponentFactory {\r\n /**\r\n * Create a child component.\r\n * @param window The window reference.\r\n * @param options The child component options.\r\n * @param rootFacade The facade for the root component.\r\n */\r\n createComponent(window, options, rootFacade) {\r\n switch (options.type) {\r\n case ChildComponentType.InWindow:\r\n return new InWindowChildComponent(window, options, rootFacade);\r\n case ChildComponentType.CrossWindow:\r\n return new CrossWindowChildComponent(window, options, rootFacade);\r\n default:\r\n throw new Error(`The \"${options.type}\" is not configured.`);\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=childComponentFactory.js.map","import { ChildComponentOptions } from '../childComponentOptions';\r\n/**\r\n * In Window Child Component Options.\r\n */\r\nexport class InWindowChildComponentOptions extends ChildComponentOptions {\r\n /**\r\n * Constructor.\r\n */\r\n constructor() {\r\n super();\r\n }\r\n}\r\n//# sourceMappingURL=childComponentOptions.js.map","import { ContentCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nexport class InWindowContentCommunicationHandler extends ContentCommunicationHandler {\r\n /**\r\n * Constructor.\r\n * @param el The element to use for sending and receiving messages.\r\n * @param methods The callback to dispose the content.\r\n */\r\n constructor(communicationsManager, methods) {\r\n super(communicationsManager, methods);\r\n }\r\n}\r\n//# sourceMappingURL=contentComunicationHandler.js.map","/**\r\n * Configuration for retrieving a resource.\r\n */\r\nexport class ResourceConfiguration {\r\n constructor() {\r\n this.url = '';\r\n this.isScript = true;\r\n this.skip = () => { return false; };\r\n }\r\n}\r\n//# sourceMappingURL=resourceConfiguration.js.map","/**\r\n * Facade to interface with the the root component.\r\n */\r\nexport class RootComponentFacade {\r\n /**\r\n * Constructor.\r\n * @param signalDisposed The function to invoke to signal that the child was disposed.\r\n */\r\n constructor(signalDisposed) {\r\n this.signalDisposed = signalDisposed;\r\n }\r\n}\r\n//# sourceMappingURL=rootComponentFacade.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { RootComponentFacade } from './rootComponentFacade';\r\nimport { Component } from './component';\r\nimport { ComponentEventType } from './componentEvent';\r\n/**\r\n * The root component to host the rest of the components.\r\n * There is not limitation right no but ideally there should only be one of these on a page.\r\n */\r\nexport class RootComponent extends Component {\r\n constructor(window, options) {\r\n super(window, options);\r\n this.children = {};\r\n }\r\n /**\r\n * Schedule the disposing of the child on exiting the function.\r\n * The dispose method is async but we do not want to wait for that.\r\n * @param child The child that was disposed.\r\n */\r\n scheduleDisposeChild(child) {\r\n // Schedule this later\r\n this.getWindow().setTimeout(() => {\r\n this.disposeChildByRef(child);\r\n }, 0);\r\n }\r\n /**\r\n * Dispose a child using it's reference.\r\n * @param child\r\n */\r\n disposeChildByRef(child) {\r\n return this.disposeChild(child.id);\r\n }\r\n /**\r\n * Dispose a child by using it's id.\r\n * @param childId The child identifyer.\r\n */\r\n disposeChild(childId) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const child = this.getChild(childId);\r\n if (!child)\r\n return Promise.resolve();\r\n yield child.dispose();\r\n this.children[childId] = null;\r\n });\r\n }\r\n /**\r\n * @@inheritdoc\r\n */\r\n mountCore() {\r\n this.callHandler(ComponentEventType.Mounted);\r\n return super.mountCore();\r\n }\r\n /**\r\n * Add a child component.\r\n * @param options Child component options.\r\n */\r\n addChild(options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.isInitialized)\r\n throw new Error('Wait for the component to initilize before starting to add children.');\r\n if (!this.isMounted)\r\n throw new Error('Wait for the component to mount before starting to add children.');\r\n const child = this.options.childFactory.createComponent(this.getWindow(), options, new RootComponentFacade(this.scheduleDisposeChild.bind(this)));\r\n const id = (yield child.initialize()).id;\r\n this.children[id] = child;\r\n yield child.mount();\r\n return id;\r\n });\r\n }\r\n /**\r\n * Get the child with the given identifier.\r\n * @param id The child identifier.\r\n */\r\n getChild(id) {\r\n return id ? (this.children[id] || null) : null;\r\n }\r\n /**\r\n * Remove a child component.\r\n * @param id The child component identifyer.\r\n */\r\n removeChild(id) {\r\n return this.disposeChild(id);\r\n }\r\n}\r\n//# sourceMappingURL=rootComponent.js.map","import { ComponentOptions } from \"./componentOptions\";\r\nimport { ChildComponentFactory } from \"./children/childComponentFactory\";\r\n/**\r\n * Options for the root component.\r\n */\r\nexport class RootComponentOptions extends ComponentOptions {\r\n constructor() {\r\n super();\r\n this.tag = 'script';\r\n this.childFactory = new ChildComponentFactory();\r\n }\r\n}\r\n//# sourceMappingURL=rootComponentOptions.js.map"],"names":["ComponentEventType","this","CommunicationsEventKind","__awaiter","ChildComponentType"],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA,SAAS,WAAW,CAAC,KAAK,EAAE;IAC5B,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;IACjB,IAAI,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC9B,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,KA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AAI,qBAAqB,EAAE,CAAC;IACxD,KAAK;IACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../../../dist/js/utilities/getHashCode.js","../../../../dist/js/utilities/random.js","../../../../dist/js/utilities/noop.js","../../../../dist/js/dom/document/generateIds.js","../../../../dist/js/dom/document/getUrlFullPath.js","../../../../dist/js/dom/document/getUrlOrigin.js","../../../../dist/js/dom/document/loadResource.js","../../../../dist/js/core/componentEvent.js","../../../../dist/js/core/component.js","../../../../dist/js/core/children/communications/event.js","../../../../dist/js/core/children/communications/containerHandler.js","../../../../dist/js/core/children/communications/contentHandler.js","../../../../dist/js/core/children/communications/crossWindowDataContract.js","../../../../dist/js/core/children/communications/manager.js","../../../../dist/js/core/children/communications/crossWindowManager.js","../../../../dist/js/dom/document/createCustomEvent.js","../../../../dist/js/core/children/communications/htmlElementManager.js","../../../../dist/js/core/children/childComponent.js","../../../../dist/js/core/children/childComponentType.js","../../../../dist/js/core/children/inWindow/containerCommunicationHandler.js","../../../../dist/js/core/children/inWindow/childComponent.js","../../../../dist/js/core/children/crossWindow/containerCommunicationHandler.js","../../../../dist/js/core/children/crossWindow/childComponent.js","../../../../dist/js/core/componentOptions.js","../../../../dist/js/core/children/childComponentOptions.js","../../../../dist/js/core/children/crossWindow/childComponentOptions.js","../../../../dist/js/core/children/crossWindow/contentComunicationHandler.js","../../../../dist/js/core/children/childComponentFactory.js","../../../../dist/js/core/children/inWindow/childComponentOptions.js","../../../../dist/js/core/children/inWindow/contentComunicationHandler.js","../../../../dist/js/core/resourceConfiguration.js","../../../../dist/js/core/rootComponentFacade.js","../../../../dist/js/core/rootComponent.js","../../../../dist/js/core/rootComponentOptions.js"],"sourcesContent":["/**\r\n * Get a hash code for the given string\r\n * @returns The has code\r\n */\r\nfunction getHashCode(value) {\r\n var hash = 0;\r\n var length = value.length;\r\n var char;\r\n var index = 0;\r\n if (length === 0)\r\n return hash;\r\n while (index < length) {\r\n char = value.charCodeAt(index);\r\n // tslint:disable-next-line: no-bitwise\r\n hash = ((hash << 5) - hash) + char;\r\n // tslint:disable-next-line: no-bitwise\r\n hash |= 0; // Convert to 32bit integer\r\n index++;\r\n }\r\n return hash;\r\n}\r\nexport { getHashCode };\r\n//# sourceMappingURL=getHashCode.js.map","/**\r\n * Generate a v4 UUID/GUID\r\n * @returns A random generated string\r\n */\r\nfunction getUuidV4() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n // tslint:disable: one-variable-per-declaration\r\n // tslint:disable: no-bitwise\r\n var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n}\r\n/**\r\n * Generate a random string\r\n * @returns A random generated string\r\n */\r\nfunction getRandomString() { return Math.random().toString(36).substring(2); }\r\nexport { getUuidV4, getRandomString };\r\n//# sourceMappingURL=random.js.map","/**\r\n * A function that does nothing.\r\n */\r\n// tslint:disable-next-line: no-empty\r\nexport function noop() { }\r\n//# sourceMappingURL=noop.js.map","import { getRandomString } from '../../utilities/index';\r\n/**\r\n * Generate a random id that is not present in the document at this time\r\n * @param document The reference to the document object\r\n * @returns A random generated string\r\n */\r\nfunction generateUniqueId(document, prefix) {\r\n if (prefix === void 0) { prefix = ''; }\r\n var prefixString = (prefix !== null && prefix !== void 0 ? prefix : '');\r\n while (true) {\r\n // The 'A-' will ensure this is always a valid JavaScript ID\r\n var id = prefixString + 'A-' + getRandomString() + getRandomString();\r\n if (document.getElementById(id) === null) {\r\n return id;\r\n }\r\n }\r\n}\r\nexport { generateUniqueId };\r\n//# sourceMappingURL=generateIds.js.map","/**\r\n * Return the full path of an url (the origin and path name)\r\n * @param document The reference to the document object\r\n * @param url The ´url´ for which to get the full path\r\n * @returns A string representing the url full path\r\n */\r\nfunction getUrlFullPath(document, url) {\r\n if (!url)\r\n return '';\r\n var a = document.createElement('a');\r\n a.setAttribute('href', url);\r\n return a.protocol + '//' + a.hostname + (a.port && ':' + a.port) + a.pathname;\r\n}\r\nexport { getUrlFullPath };\r\n//# sourceMappingURL=getUrlFullPath.js.map","/**\r\n * Return the origin of an url\r\n * @param document The reference to the document object\r\n * @param url The ´url´ for which to get the 'origin'\r\n * @returns A string representing the url origin\r\n */\r\nfunction getUrlOrigin(document, url) {\r\n if (!url)\r\n return '';\r\n var a = document.createElement('a');\r\n a.setAttribute('href', url);\r\n return a.protocol + '//' + a.hostname + (a.port && ':' + a.port);\r\n}\r\nexport { getUrlOrigin };\r\n//# sourceMappingURL=getUrlOrigin.js.map","/**\r\n * A function to load a resource and wait for it to load.\r\n * @param document The reference to the document object.\r\n * @param url The resource URL.\r\n * @param isScript Is this resource a script or a stylesheet?\r\n * @param skipLoading Function to determine if the resource should not be loaded.\r\n * @param attributes Extra attributes to add on the HTML element before attaching it to the document.\r\n */\r\nexport function loadResource(document, url, isScript, skipLoading, attributes) {\r\n if (isScript === void 0) { isScript = true; }\r\n if (skipLoading && skipLoading())\r\n return Promise.resolve();\r\n return new Promise(function (resolve, reject) {\r\n var resource;\r\n if (isScript) {\r\n resource = document.createElement('script');\r\n resource.src = url;\r\n }\r\n else {\r\n resource = document.createElement('link');\r\n resource.href = url;\r\n }\r\n if (attributes) {\r\n var keys = Object.keys(attributes);\r\n // tslint:disable-next-line: prefer-for-of\r\n for (var index = 0; index < keys.length; index++) {\r\n var key = keys[index];\r\n resource.setAttribute(key, attributes[key]);\r\n }\r\n }\r\n resource.addEventListener('load', function () { return resolve(); });\r\n resource.addEventListener('error', function () { return reject(new Error(\"Script load error for url: \" + url + \".\")); });\r\n document.head.appendChild(resource);\r\n });\r\n}\r\n//# sourceMappingURL=loadResource.js.map","/**\r\n * Lifecycle event types.\r\n */\r\nexport var ComponentEventType;\r\n(function (ComponentEventType) {\r\n ComponentEventType[\"BeforeCreate\"] = \"beforeCreate\";\r\n ComponentEventType[\"Created\"] = \"created\";\r\n ComponentEventType[\"BeforeMount\"] = \"beforeMount\";\r\n ComponentEventType[\"Mounted\"] = \"mounted\";\r\n ComponentEventType[\"BeforeUpdate\"] = \"beforeUpdate\";\r\n ComponentEventType[\"Updated\"] = \"updated\";\r\n ComponentEventType[\"BeforeDestroy\"] = \"beforeDestroy\";\r\n ComponentEventType[\"Destroyed\"] = \"destroyed\";\r\n ComponentEventType[\"Error\"] = \"error\";\r\n ComponentEventType[\"Data\"] = \"data\";\r\n})(ComponentEventType || (ComponentEventType = {}));\r\n/**\r\n * Evnts triggered by the components\r\n */\r\nvar ComponentEvent = /** @class */ (function () {\r\n /**\r\n * COnstructor.\r\n * @param id Component unique idnetifyer.\r\n * @param type The type of event.\r\n * @param el The componenet root element.\r\n * @param parentEl The parent element of the component.\r\n * @param error The error data in case this is an error event.\r\n */\r\n function ComponentEvent(id, type, el, parentEl, error) {\r\n this.id = id;\r\n this.type = type;\r\n this.el = el;\r\n this.parentEl = parentEl;\r\n this.error = error;\r\n this.timestamp = new Date();\r\n }\r\n return ComponentEvent;\r\n}());\r\nexport { ComponentEvent };\r\n//# sourceMappingURL=componentEvent.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { generateUniqueId, loadResource } from '../dom/index';\r\nimport { ComponentEvent, ComponentEventType } from './componentEvent';\r\n/**\r\n * Base class for all components.\r\n */\r\nvar Component = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n * @param window The reference to the window object\r\n * @param options The component options\r\n */\r\n function Component(window, options) {\r\n if (!window)\r\n throw new Error('Missing \"window\" argument.');\r\n if (!options)\r\n throw new Error('Missing \"options\" argument.');\r\n this.isInitialized = false;\r\n this.isMounted = false;\r\n this.resourcesLoaded = false;\r\n this.id = '';\r\n this.rootElement = null;\r\n this.window = window;\r\n this.options = options;\r\n this.disposed = false;\r\n }\r\n /**\r\n * Create the root element hat will \"encapsulate\" the rest of the elements.\r\n */\r\n Component.prototype.createRootElement = function () {\r\n if (this.rootElement)\r\n return;\r\n var parent = this.getParentElement();\r\n this.rootElement = this.getDocument().createElement(this.getOptions().tag);\r\n this.id = generateUniqueId(this.getDocument(), 'ufe-');\r\n this.rootElement.id = this.id;\r\n parent.appendChild(this.rootElement);\r\n };\r\n /**\r\n * Get the parent element that hosts this component.\r\n */\r\n Component.prototype.getParentElement = function () {\r\n var parent = null;\r\n var opt = this.getOptions();\r\n if (opt.parent) {\r\n if (typeof opt.parent === 'string') {\r\n parent = this.getDocument().querySelector(opt.parent);\r\n }\r\n else {\r\n parent = opt.parent;\r\n }\r\n }\r\n if (!parent)\r\n throw new Error(\"Failed to find parent \\\"\" + opt.parent + \"\\\".\");\r\n return parent;\r\n };\r\n /**\r\n * Load the resources required by the compoent.\r\n */\r\n Component.prototype.loadResources = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var options, document_1, index, resource;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.resourcesLoaded)\r\n return [2 /*return*/];\r\n this.resourcesLoaded = true;\r\n options = this.getOptions();\r\n if (!(options.resources && options.resources.length > 0)) return [3 /*break*/, 4];\r\n document_1 = this.getDocument();\r\n index = 0;\r\n _a.label = 1;\r\n case 1:\r\n if (!(index < options.resources.length)) return [3 /*break*/, 4];\r\n resource = options.resources[index];\r\n // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES\r\n // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY\r\n return [4 /*yield*/, loadResource(document_1, resource.url, resource.isScript, resource.skip, resource.attributes)];\r\n case 2:\r\n // DO NOT LOAD ALL AT ONCE AS YOU MIHGT HAVE DEPENDENCIES\r\n // AND A RESOURCE MIGHT LOAD BEFORE IT'S DEPENDENCY\r\n _a.sent();\r\n _a.label = 3;\r\n case 3:\r\n index++;\r\n return [3 /*break*/, 1];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Get the optons data.\r\n */\r\n Component.prototype.getOptions = function () {\r\n return this.options;\r\n };\r\n /**\r\n * Get the wndow reference.\r\n */\r\n Component.prototype.getWindow = function () { return this.window; };\r\n /**\r\n * Get the document refrence.\r\n */\r\n Component.prototype.getDocument = function () { return this.getWindow().document; };\r\n /**\r\n * Core initialization function.\r\n * Any component derived should override this to add extra functionality.\r\n */\r\n Component.prototype.initializeCore = function () { return Promise.resolve(); };\r\n /**\r\n * Core mount function.\r\n * Any component derived should override this to add extra functionality.\r\n */\r\n Component.prototype.mountCore = function () {\r\n // This needs to be handled by each component\r\n // this.callHandler(ComponentEventType.Mounted);\r\n return Promise.resolve();\r\n };\r\n /**\r\n * Core dispose function.\r\n * Any component derived should override this to add clean-up after itself.\r\n */\r\n Component.prototype.disposeCore = function () { return Promise.resolve(); };\r\n /**\r\n * Call the global error handler.\r\n * @param e The error object\r\n */\r\n Component.prototype.callErrorHandler = function (e) {\r\n var _a;\r\n var handler = (_a = this.options.handlers) === null || _a === void 0 ? void 0 : _a.error;\r\n if (handler) {\r\n try {\r\n handler(new ComponentEvent(this.id, ComponentEventType.Error, this.rootElement, this.getParentElement(), e));\r\n }\r\n catch (error) {\r\n this.log(error);\r\n }\r\n }\r\n else {\r\n this.log(e);\r\n }\r\n };\r\n /**\r\n * Call a specific event handler.\r\n * @param type The type of handler to call.\r\n */\r\n Component.prototype.callHandler = function (type, data) {\r\n if (type === ComponentEventType.Error)\r\n throw new Error(\"For calling the \\\"\" + ComponentEventType.Error + \"\\\" handler use the \\\"callErrorHandler\\\" method.\");\r\n var handler = this.options.handlers\r\n ? this.options.handlers[type]\r\n : null;\r\n if (handler) {\r\n try {\r\n var event_1 = new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null);\r\n event_1.data = data;\r\n handler(event_1);\r\n }\r\n catch (error) {\r\n this.callErrorHandler(error);\r\n }\r\n }\r\n };\r\n /**\r\n * Logging method.\r\n * @param message The message.\r\n * @param optionalParams Optional parameters.\r\n */\r\n Component.prototype.log = function (message) {\r\n var optionalParams = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n optionalParams[_i - 1] = arguments[_i];\r\n }\r\n var _a, _b;\r\n var logMethod = (_b = (_a = this.window) === null || _a === void 0 ? void 0 : _a.console) === null || _b === void 0 ? void 0 : _b.log;\r\n if (logMethod)\r\n logMethod(message, optionalParams);\r\n };\r\n /**\r\n * Method invoked to initialize the component.\r\n * It should create the root element and any base dependencies.\r\n */\r\n Component.prototype.initialize = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.isInitialized)\r\n return [2 /*return*/, this];\r\n this.callHandler(ComponentEventType.BeforeCreate);\r\n this.isInitialized = true;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 4, , 5]);\r\n return [4 /*yield*/, this.loadResources()];\r\n case 2:\r\n _a.sent();\r\n this.createRootElement();\r\n return [4 /*yield*/, this.initializeCore()];\r\n case 3:\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n e_1 = _a.sent();\r\n this.callErrorHandler(e_1);\r\n return [3 /*break*/, 5];\r\n case 5:\r\n this.callHandler(ComponentEventType.Created);\r\n return [2 /*return*/, this];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Method invoked to mount the actual content of the component.\r\n */\r\n Component.prototype.mount = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_2;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.isInitialized) {\r\n this.callErrorHandler(new Error('Call \"initialize\" before calling \"mount\".'));\r\n return [2 /*return*/, this];\r\n }\r\n if (this.isMounted)\r\n return [2 /*return*/, this];\r\n this.callHandler(ComponentEventType.BeforeMount);\r\n this.isMounted = true;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.mountCore()];\r\n case 2:\r\n _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_2 = _a.sent();\r\n this.callErrorHandler(e_2);\r\n return [3 /*break*/, 4];\r\n case 4: return [2 /*return*/, this];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Method invoked to dispose of the component.\r\n */\r\n Component.prototype.dispose = function () {\r\n var _a, _b;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var e_3;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n if (this.disposed)\r\n return [2 /*return*/];\r\n this.callHandler(ComponentEventType.BeforeDestroy);\r\n this.disposed = true;\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.disposeCore()];\r\n case 2:\r\n _c.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_3 = _c.sent();\r\n this.callErrorHandler(e_3);\r\n return [3 /*break*/, 4];\r\n case 4:\r\n this.callHandler(ComponentEventType.Destroyed);\r\n this.id = '';\r\n this.isInitialized = false;\r\n this.isMounted = false;\r\n this.resourcesLoaded = false;\r\n (_b = (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(this.rootElement);\r\n this.rootElement = null;\r\n this.window = null;\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return Component;\r\n}());\r\nexport { Component };\r\n//# sourceMappingURL=component.js.map","import { getUuidV4 } from '../../../utilities/random';\r\n/**\r\n * Kind of events used to comunicate between content and container component.\r\n */\r\nexport var CommunicationsEventKind;\r\n(function (CommunicationsEventKind) {\r\n CommunicationsEventKind[\"Mounted\"] = \"mounted\";\r\n CommunicationsEventKind[\"BeforeUpdate\"] = \"beforeUpdate\";\r\n CommunicationsEventKind[\"Updated\"] = \"updated\";\r\n CommunicationsEventKind[\"BeforeDispose\"] = \"beforeDispose\";\r\n CommunicationsEventKind[\"Disposed\"] = \"disposed\";\r\n CommunicationsEventKind[\"Data\"] = \"data\";\r\n})(CommunicationsEventKind || (CommunicationsEventKind = {}));\r\n/**\r\n * Event used to comunicate between content and container component.\r\n */\r\nvar CommunicationsEvent = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param kind The kind of event.\r\n */\r\n function CommunicationsEvent(kind) {\r\n this.kind = kind;\r\n this.uuid = getUuidV4();\r\n this.timestamp = new Date().getTime();\r\n this.contentId = '';\r\n }\r\n /**\r\n * The type of event dispatched by the child component.\r\n */\r\n CommunicationsEvent.CONTENT_EVENT_TYPE = 'content_event.communication.children.validide_micro_front_ends';\r\n /**\r\n * The type of event dispatched by the content.\r\n */\r\n CommunicationsEvent.CONTAINER_EVENT_TYPE = 'container_event.communication.children.validide_micro_front_ends';\r\n return CommunicationsEvent;\r\n}());\r\nexport { CommunicationsEvent };\r\n//# sourceMappingURL=event.js.map","var _a, _b, _c, _d, _e, _f;\r\nimport { CommunicationsEventKind, CommunicationsEvent } from './event';\r\nimport { noop } from '../../../utilities/noop';\r\n/**\r\n * The communication handler methods.\r\n */\r\nvar ContainerCommunicationHandlerMethods = /** @class */ (function () {\r\n function ContainerCommunicationHandlerMethods() {\r\n /**\r\n * Call the container to signal that the content finished mounting.\r\n */\r\n this[_a] = noop;\r\n /**\r\n * Call the container to signal an update is about to happen.\r\n */\r\n this[_b] = noop;\r\n /**\r\n * Call the container to signal an update finished.\r\n */\r\n this[_c] = noop;\r\n /**\r\n * Call the container to signal dispose started.\r\n */\r\n this[_d] = noop;\r\n /**\r\n * Call the container to signal the component has disposed(almost).\r\n */\r\n this[_e] = noop;\r\n /**\r\n * Call the container to signal the component has disposed(almost).\r\n */\r\n this[_f] = noop;\r\n }\r\n return ContainerCommunicationHandlerMethods;\r\n}());\r\nexport { ContainerCommunicationHandlerMethods };\r\n_a = CommunicationsEventKind.Mounted, _b = CommunicationsEventKind.BeforeUpdate, _c = CommunicationsEventKind.Updated, _d = CommunicationsEventKind.BeforeDispose, _e = CommunicationsEventKind.Disposed, _f = CommunicationsEventKind.Data;\r\n/**\r\n * Handle the communications on the child component side.\r\n */\r\nvar ContainerCommunicationHandler = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n * @param communicationsManager A communications manager.\r\n * @param handlerMethods A collection of handler methods.\r\n */\r\n function ContainerCommunicationHandler(communicationsManager, handlerMethods) {\r\n var _this = this;\r\n this.communicationsManager = communicationsManager;\r\n this.handlerMethods = handlerMethods;\r\n this.communicationsManager.setEventReceivedCallback(function (e) {\r\n _this.handleEvent(e);\r\n });\r\n this.disposed = false;\r\n }\r\n /**\r\n * Core functionality for handling the incomming events.\r\n * @param e The event.\r\n */\r\n ContainerCommunicationHandler.prototype.handleEventCore = function (e) {\r\n if (!this.handlerMethods)\r\n return;\r\n var method = this.handlerMethods[e.kind];\r\n if (!method)\r\n return;\r\n method(e.data);\r\n };\r\n /**\r\n * Handle the incomming communications event.\r\n * @param e The event\r\n */\r\n ContainerCommunicationHandler.prototype.handleEvent = function (e) {\r\n this.handleEventCore(e);\r\n };\r\n /**\r\n * Method invoked to dispose of the handler.\r\n */\r\n ContainerCommunicationHandler.prototype.dispose = function () {\r\n var _g;\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.dispose();\r\n this.communicationsManager = null;\r\n this.handlerMethods = null;\r\n };\r\n /**\r\n * Send a message.\r\n * @param event The message.\r\n */\r\n ContainerCommunicationHandler.prototype.send = function (event) {\r\n var _g;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event);\r\n };\r\n /**\r\n * Send data.\r\n * @param data The data to send.\r\n */\r\n ContainerCommunicationHandler.prototype.sendData = function (data) {\r\n var _g;\r\n var event = new CommunicationsEvent(CommunicationsEventKind.Data);\r\n event.data = data;\r\n (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.send(event);\r\n };\r\n /**\r\n * Reuest that the content begins disposing.\r\n */\r\n ContainerCommunicationHandler.prototype.requestContentDispose = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeDispose));\r\n };\r\n return ContainerCommunicationHandler;\r\n}());\r\nexport { ContainerCommunicationHandler };\r\n//# sourceMappingURL=containerHandler.js.map","import { CommunicationsEventKind, CommunicationsEvent } from './event';\r\nimport { noop } from '../../../utilities/noop';\r\n/**\r\n * Content communications handler methods\r\n */\r\nvar ContentCommunicationHandlerMethods = /** @class */ (function () {\r\n function ContentCommunicationHandlerMethods() {\r\n /**\r\n * Method to dispose the content.\r\n */\r\n this.dispose = noop;\r\n /**\r\n * Method to dispose the content.\r\n */\r\n this.handleDataEvent = noop;\r\n }\r\n return ContentCommunicationHandlerMethods;\r\n}());\r\nexport { ContentCommunicationHandlerMethods };\r\n/**\r\n * Handle the communications on the component content side.\r\n */\r\nvar ContentCommunicationHandler = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n * @param communicationsManager A comunications manager\r\n * @param methods The callback to dispose the content.\r\n */\r\n function ContentCommunicationHandler(communicationsManager, methods) {\r\n var _this = this;\r\n this.communicationsManager = communicationsManager;\r\n this.methods = methods;\r\n this.communicationsManager.setEventReceivedCallback(function (e) {\r\n _this.handleEvent(e);\r\n });\r\n this.disposed = false;\r\n }\r\n /**\r\n * Core functionality for handling the incomming events.\r\n * @param e The event.\r\n */\r\n ContentCommunicationHandler.prototype.handleEventCore = function (e) {\r\n switch (e.kind) {\r\n case CommunicationsEventKind.BeforeDispose:\r\n case CommunicationsEventKind.Disposed:\r\n if (this.methods) {\r\n this.methods.dispose();\r\n }\r\n break;\r\n case CommunicationsEventKind.Data:\r\n if (this.methods) {\r\n this.methods.handleDataEvent(e.data);\r\n }\r\n break;\r\n default:\r\n throw new Error(\"The \\\"\" + e.kind + \"\\\" event is not configured.\");\r\n }\r\n };\r\n /**\r\n * Handle the incomming communications event.\r\n * @param e The event\r\n */\r\n ContentCommunicationHandler.prototype.handleEvent = function (e) {\r\n this.handleEventCore(e);\r\n };\r\n /**\r\n * Core dispose function.\r\n * Any component derived should override this to add clean-up after itself.\r\n */\r\n // tslint:disable-next-line: no-empty\r\n ContentCommunicationHandler.prototype.disposeCore = function () { };\r\n /**\r\n * Send a message.\r\n * @param event The message.\r\n */\r\n ContentCommunicationHandler.prototype.send = function (event) {\r\n var _a;\r\n (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.send(event);\r\n };\r\n /**\r\n * Dispatch event to signal mounting finished.\r\n */\r\n ContentCommunicationHandler.prototype.sendData = function (data) {\r\n var evt = new CommunicationsEvent(CommunicationsEventKind.Data);\r\n evt.data = data;\r\n this.send(evt);\r\n };\r\n /**\r\n * Dispatch event to signal mounting finished.\r\n */\r\n ContentCommunicationHandler.prototype.dispatchMounted = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Mounted));\r\n };\r\n /**\r\n * Dispatch event to signal update is about to start.\r\n */\r\n ContentCommunicationHandler.prototype.dispatchBeforeUpdate = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeUpdate));\r\n };\r\n /**\r\n * Dispatch event to signal update finished.\r\n */\r\n ContentCommunicationHandler.prototype.dispatchUpdated = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Updated));\r\n };\r\n /**\r\n * Dispatch event to disposing started.\r\n */\r\n ContentCommunicationHandler.prototype.dispatchBeforeDispose = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.BeforeDispose));\r\n };\r\n /**\r\n * Dispatch event to mount finished.\r\n */\r\n ContentCommunicationHandler.prototype.dispatchDisposed = function () {\r\n this.send(new CommunicationsEvent(CommunicationsEventKind.Disposed));\r\n };\r\n /**\r\n * Method invoked to dispose of the handler.\r\n */\r\n ContentCommunicationHandler.prototype.dispose = function () {\r\n var _a;\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n this.disposeCore();\r\n (_a = this.communicationsManager) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.communicationsManager = null;\r\n this.methods = null;\r\n };\r\n return ContentCommunicationHandler;\r\n}());\r\nexport { ContentCommunicationHandler };\r\n//# sourceMappingURL=contentHandler.js.map","/**\r\n * The data sent between the windows directly on the Message Event.\r\n */\r\nvar CrossWindowCommunicationDataContract = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param type Data type.\r\n * @param detail Data detail.\r\n */\r\n function CrossWindowCommunicationDataContract(type, detail) {\r\n this.type = type;\r\n this.detail = detail;\r\n }\r\n return CrossWindowCommunicationDataContract;\r\n}());\r\nexport { CrossWindowCommunicationDataContract };\r\n//# sourceMappingURL=crossWindowDataContract.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar CommunicationsManager = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n */\r\n function CommunicationsManager() {\r\n this.initialized = false;\r\n this.disposed = false;\r\n }\r\n /**\r\n * Initialize the manager.\r\n */\r\n // tslint:disable-next-line: no-empty\r\n CommunicationsManager.prototype.initializeCore = function () { };\r\n /**\r\n * Clean any resources before the manager is disposed.\r\n */\r\n // tslint:disable-next-line: no-empty\r\n CommunicationsManager.prototype.disposeCore = function () { };\r\n /**\r\n * Initialize the manager.\r\n */\r\n CommunicationsManager.prototype.initialize = function () {\r\n if (this.initialized)\r\n return;\r\n this.initialized = true;\r\n this.initializeCore();\r\n };\r\n /**\r\n * Dispose of the manager.\r\n */\r\n CommunicationsManager.prototype.dispose = function () {\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n this.disposeCore();\r\n };\r\n return CommunicationsManager;\r\n}());\r\nexport { CommunicationsManager };\r\n/**\r\n * Comunications manager base class.\r\n */\r\nvar CommunicationsManagerOf = /** @class */ (function (_super) {\r\n __extends(CommunicationsManagerOf, _super);\r\n /**\r\n * Constructor\r\n * @param inboundEndpoint The endpoint for receiving messages.\r\n * @param inboundEventType The types of messages to receive.\r\n * @param outboundEndpoint The endpoint to sent mesages.\r\n * @param outboundEventType The messages to send.\r\n */\r\n function CommunicationsManagerOf(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) {\r\n var _this = _super.call(this) || this;\r\n _this.inboundEndpoint = inboundEndpoint;\r\n _this.inboundEventType = inboundEventType;\r\n _this.outboundEndpoint = outboundEndpoint;\r\n _this.outboundEventType = outboundEventType;\r\n _this.onEventReceived = null;\r\n _this.eventHandler = function (e) { _this.handleEvent(e); };\r\n return _this;\r\n }\r\n /**\r\n * Handle the received events.\r\n * @param e The recevied event.\r\n */\r\n CommunicationsManagerOf.prototype.handleEvent = function (e) {\r\n if (!this.onEventReceived)\r\n return;\r\n var evt = this.readEvent(e);\r\n if (evt) {\r\n this.onEventReceived(evt);\r\n }\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CommunicationsManagerOf.prototype.initializeCore = function () {\r\n if (this.inboundEndpoint && this.eventHandler) {\r\n this.startReceiving(this.inboundEndpoint, this.eventHandler);\r\n }\r\n _super.prototype.initializeCore.call(this);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CommunicationsManagerOf.prototype.disposeCore = function () {\r\n if (this.inboundEndpoint && this.eventHandler) {\r\n this.stopReceiving(this.inboundEndpoint, this.eventHandler);\r\n }\r\n this.eventHandler = null;\r\n this.onEventReceived = null;\r\n this.inboundEndpoint = null;\r\n _super.prototype.disposeCore.call(this);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CommunicationsManagerOf.prototype.send = function (event) {\r\n if (this.outboundEndpoint) {\r\n this.sendEvent(this.outboundEndpoint, event);\r\n }\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CommunicationsManagerOf.prototype.setEventReceivedCallback = function (callback) {\r\n this.onEventReceived = callback;\r\n };\r\n return CommunicationsManagerOf;\r\n}(CommunicationsManager));\r\nexport { CommunicationsManagerOf };\r\n//# sourceMappingURL=manager.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { CommunicationsManagerOf } from '../communications/manager';\r\nimport { CrossWindowCommunicationDataContract } from './crossWindowDataContract';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar CrossWindowCommunicationsManager = /** @class */ (function (_super) {\r\n __extends(CrossWindowCommunicationsManager, _super);\r\n /**\r\n * Constructor\r\n * @param inboundEndpoint The endpoint for receiving messages.\r\n * @param inboundEventType The types of messages to receive.\r\n * @param outboundEndpoint The endpoint to sent mesages.\r\n * @param outboundEventType The messages to send.\r\n * @param origin The origin to comunicate with.\r\n */\r\n function CrossWindowCommunicationsManager(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType, origin) {\r\n var _this = _super.call(this, inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) || this;\r\n _this.origin = origin;\r\n return _this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowCommunicationsManager.prototype.readEvent = function (e) {\r\n var messageEvent = e;\r\n if (!messageEvent || messageEvent.origin !== this.origin)\r\n return null;\r\n var data = messageEvent.data;\r\n if (!data || data.type !== this.inboundEventType)\r\n return null;\r\n return data.detail ? data.detail : null;\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowCommunicationsManager.prototype.startReceiving = function (inboundEndpoint, handler) {\r\n inboundEndpoint.addEventListener('message', handler);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowCommunicationsManager.prototype.stopReceiving = function (inboundEndpoint, handler) {\r\n inboundEndpoint.removeEventListener('message', handler);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowCommunicationsManager.prototype.sendEvent = function (outboundEndpoint, event) {\r\n var data = new CrossWindowCommunicationDataContract(this.outboundEventType, event);\r\n outboundEndpoint.postMessage(data, this.origin);\r\n };\r\n return CrossWindowCommunicationsManager;\r\n}(CommunicationsManagerOf));\r\nexport { CrossWindowCommunicationsManager };\r\n//# sourceMappingURL=crossWindowManager.js.map","function customEventPolyfill(document, typeArg, eventInitDict) {\r\n var params = eventInitDict || { bubbles: false, cancelable: false, detail: null };\r\n var evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(typeArg, params.bubbles || false, params.cancelable || false, params.detail);\r\n return evt;\r\n}\r\nexport function createCustomEvent(document, typeArg, eventInitDict) {\r\n var win = document === null || document === void 0 ? void 0 : document.defaultView;\r\n if (!win)\r\n throw new Error('Document does not have a defualt view.');\r\n if (typeof win.CustomEvent !== 'function') {\r\n return new customEventPolyfill(document, typeArg, eventInitDict);\r\n }\r\n return new win.CustomEvent(typeArg, eventInitDict);\r\n}\r\n//# sourceMappingURL=createCustomEvent.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { CommunicationsEvent } from '../communications/event';\r\nimport { CommunicationsManagerOf } from '../communications/manager';\r\nimport { createCustomEvent } from '../../../dom/document/createCustomEvent';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar HTMLElementCommunicationsManager = /** @class */ (function (_super) {\r\n __extends(HTMLElementCommunicationsManager, _super);\r\n /**\r\n * @inheritdoc\r\n */\r\n function HTMLElementCommunicationsManager(inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) {\r\n return _super.call(this, inboundEndpoint, inboundEventType, outboundEndpoint, outboundEventType) || this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n HTMLElementCommunicationsManager.prototype.readEvent = function (e) {\r\n var customEvent = e;\r\n if (!customEvent || customEvent.type !== this.inboundEventType)\r\n return null;\r\n return customEvent.detail instanceof CommunicationsEvent\r\n ? customEvent.detail\r\n : null;\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n HTMLElementCommunicationsManager.prototype.startReceiving = function (inboundEndpoint, handler) {\r\n inboundEndpoint.addEventListener(this.inboundEventType, handler);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n HTMLElementCommunicationsManager.prototype.stopReceiving = function (inboundEndpoint, handler) {\r\n inboundEndpoint.removeEventListener(this.inboundEventType, handler);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n HTMLElementCommunicationsManager.prototype.sendEvent = function (outboundEndpoint, event) {\r\n if (!outboundEndpoint.ownerDocument)\r\n return;\r\n var evt = createCustomEvent(outboundEndpoint.ownerDocument, this.outboundEventType, { detail: event });\r\n outboundEndpoint.dispatchEvent(evt);\r\n };\r\n return HTMLElementCommunicationsManager;\r\n}(CommunicationsManagerOf));\r\nexport { HTMLElementCommunicationsManager };\r\n//# sourceMappingURL=htmlElementManager.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { Component } from '../component';\r\nimport { ComponentEventType } from '../componentEvent';\r\nimport { ContainerCommunicationHandlerMethods } from './communications/index';\r\n/**\r\n * Child component base class.\r\n */\r\nvar ChildComponent = /** @class */ (function (_super) {\r\n __extends(ChildComponent, _super);\r\n /**\r\n * Constructor.\r\n * @param window The window reference.\r\n * @param options The child options.\r\n * @param rootFacade The facade to the root component.\r\n */\r\n function ChildComponent(window, options, rootFacade) {\r\n var _this = _super.call(this, window, options) || this;\r\n _this.rootFacade = rootFacade;\r\n _this.communicationHandler = null;\r\n _this.contentDisposePromise = null;\r\n _this.contentDisposePromiseResolver = null;\r\n return _this;\r\n }\r\n /**\r\n * Get the comunication handler.\r\n */\r\n ChildComponent.prototype.getCommunicationHandler = function () {\r\n var _this = this;\r\n var methods = new ContainerCommunicationHandlerMethods();\r\n methods.mounted = function () { return _this.callHandler(ComponentEventType.Mounted); };\r\n methods.beforeUpdate = function () { return _this.callHandler(ComponentEventType.BeforeUpdate); };\r\n methods.updated = function () { return _this.callHandler(ComponentEventType.Updated); };\r\n methods.data = function (data) { return _this.callHandler(ComponentEventType.Data, data); };\r\n methods.beforeDispose = function () { return _this.contentBeginDisposed(); };\r\n methods.disposed = function () { return _this.contentDisposed(); };\r\n return this.getCommunicationHandlerCore(methods);\r\n };\r\n /**\r\n * Get the child component options.\r\n */\r\n ChildComponent.prototype.getOptions = function () {\r\n return _super.prototype.getOptions.call(this);\r\n };\r\n /**\r\n * Handler for the signal that the component started to dispose.\r\n */\r\n ChildComponent.prototype.contentBeginDisposed = function () {\r\n if (this.contentDisposePromise !== null)\r\n return; // Dispose has already started.\r\n this.setContentDisposePromise();\r\n // Inform parent the content is beeing disposed.\r\n this.rootFacade.signalDisposed(this);\r\n };\r\n /**\r\n * Signal the content that it will be disposed.\r\n */\r\n ChildComponent.prototype.startDisposingContent = function () {\r\n if (this.contentDisposePromise !== null)\r\n return; // Dispose has already started.\r\n this.setContentDisposePromise();\r\n // This should trigger the child component dispose.\r\n this.communicationHandler.requestContentDispose();\r\n };\r\n /**\r\n * Set the promise that is used fof the disposing of the component.\r\n */\r\n ChildComponent.prototype.setContentDisposePromise = function () {\r\n var _this = this;\r\n this.contentDisposePromise = Promise\r\n .race([\r\n new Promise(function (resolver, rejecter) {\r\n _this.contentDisposePromiseResolver = resolver;\r\n }),\r\n new Promise(function (resolveTimeout, rejectTimeout) {\r\n _this\r\n .getWindow()\r\n .setTimeout(function () { return rejectTimeout(new Error('Child dispose timeout.')); }, _this.getOptions().contentDisposeTimeout);\r\n })\r\n ])\r\n .catch(function (err) {\r\n _this.callErrorHandler(err);\r\n });\r\n };\r\n /**\r\n * Handler for the signal that the content has finished disposing.\r\n */\r\n ChildComponent.prototype.contentDisposed = function () {\r\n if (this.contentDisposePromiseResolver === null) {\r\n // For some reason we got the disposed call without getting the 'beginDispose' call.\r\n this.contentDisposePromise = Promise.resolve();\r\n this.rootFacade.signalDisposed(this);\r\n }\r\n else {\r\n this.contentDisposePromiseResolver();\r\n }\r\n };\r\n /**\r\n * @@inheritdoc\r\n */\r\n ChildComponent.prototype.mountCore = function () {\r\n if (!this.communicationHandler) {\r\n this.communicationHandler = this.getCommunicationHandler();\r\n }\r\n return _super.prototype.mountCore.call(this);\r\n };\r\n /**\r\n * @@inheritdoc\r\n */\r\n ChildComponent.prototype.disposeCore = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n this.startDisposingContent();\r\n return [4 /*yield*/, this.contentDisposePromise];\r\n case 1:\r\n _a.sent();\r\n this.communicationHandler.dispose();\r\n this.communicationHandler = null;\r\n this.contentDisposePromiseResolver = null;\r\n this.contentDisposePromise = null;\r\n return [4 /*yield*/, _super.prototype.disposeCore.call(this)];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Send data.\r\n * @param data The data to send.\r\n */\r\n ChildComponent.prototype.sendData = function (data) {\r\n var _a;\r\n (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendData(data);\r\n };\r\n return ChildComponent;\r\n}(Component));\r\nexport { ChildComponent };\r\n//# sourceMappingURL=childComponent.js.map","/**\r\n * The type of child component.\r\n */\r\nexport var ChildComponentType;\r\n(function (ChildComponentType) {\r\n /**\r\n * In window component(JavaScript or WebComponent Custom Element)\r\n */\r\n ChildComponentType[\"InWindow\"] = \"inWindow\";\r\n /**\r\n * Cross window component(loaded in an embedable form - Iframe)\r\n */\r\n ChildComponentType[\"CrossWindow\"] = \"crossWindow\";\r\n})(ChildComponentType || (ChildComponentType = {}));\r\n//# sourceMappingURL=childComponentType.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ContainerCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar InWindowContainerCommunicationHandler = /** @class */ (function (_super) {\r\n __extends(InWindowContainerCommunicationHandler, _super);\r\n /**\r\n * @inheritdoc\r\n */\r\n function InWindowContainerCommunicationHandler(communicationsManager, wrapperMethods) {\r\n return _super.call(this, communicationsManager, wrapperMethods) || this;\r\n }\r\n return InWindowContainerCommunicationHandler;\r\n}(ContainerCommunicationHandler));\r\nexport { InWindowContainerCommunicationHandler };\r\n//# sourceMappingURL=containerCommunicationHandler.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { ChildComponent } from '../childComponent';\r\nimport { CommunicationsEvent, HTMLElementCommunicationsManager } from '../communications/index';\r\nimport { InWindowContainerCommunicationHandler } from './containerCommunicationHandler';\r\n/**\r\n * In Window Child Component.\r\n */\r\nvar InWindowChildComponent = /** @class */ (function (_super) {\r\n __extends(InWindowChildComponent, _super);\r\n /**\r\n * Constructor.\r\n * @param window The window reference.\r\n * @param options The child component options.\r\n * @param rootFacade The facade to the root component.\r\n */\r\n function InWindowChildComponent(window, options, rootFacade) {\r\n return _super.call(this, window, options, rootFacade) || this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n InWindowChildComponent.prototype.getCommunicationHandlerCore = function (methods) {\r\n var endpoint = this.rootElement;\r\n var manager = new HTMLElementCommunicationsManager(endpoint, CommunicationsEvent.CONTENT_EVENT_TYPE, endpoint, CommunicationsEvent.CONTAINER_EVENT_TYPE);\r\n manager.initialize();\r\n return new InWindowContainerCommunicationHandler(manager, methods);\r\n };\r\n /**\r\n * Get the InWindowChildComponentOptions\r\n */\r\n InWindowChildComponent.prototype.getOptions = function () {\r\n return _super.prototype.getOptions.call(this);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n InWindowChildComponent.prototype.mountCore = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var injectionFunction;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n injectionFunction = this.getOptions().inject;\r\n if (!injectionFunction) {\r\n throw new Error('Inject method not defined!');\r\n }\r\n injectionFunction(this.rootElement);\r\n return [4 /*yield*/, _super.prototype.mountCore.call(this)];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return InWindowChildComponent;\r\n}(ChildComponent));\r\nexport { InWindowChildComponent };\r\n//# sourceMappingURL=childComponent.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { CommunicationsEvent, ContainerCommunicationHandler, CommunicationsEventKind } from '../communications/index';\r\nimport { getHashCode } from '../../../utilities/getHashCode';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar CrossWindowContainerCommunicationHandler = /** @class */ (function (_super) {\r\n __extends(CrossWindowContainerCommunicationHandler, _super);\r\n /**\r\n * Constructor.\r\n * @param communicationsManager A communications manager.\r\n * @param embedId The Id of the embeded element.\r\n * @param containerMethods The methods to communicate with the container.\r\n */\r\n function CrossWindowContainerCommunicationHandler(communicationsManager, embedId, containerMethods) {\r\n var _this = _super.call(this, communicationsManager, containerMethods) || this;\r\n _this.embedId = embedId;\r\n return _this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowContainerCommunicationHandler.prototype.handleEventCore = function (e) {\r\n if (!this.embedId)\r\n return;\r\n if (!e.contentId && e.kind === CommunicationsEventKind.Mounted) {\r\n this.attemptHandShake(e);\r\n return;\r\n }\r\n if (this.embedId !== e.contentId)\r\n return;\r\n _super.prototype.handleEventCore.call(this, e);\r\n };\r\n /**\r\n * Attempt a andshake with the content.\r\n */\r\n CrossWindowContainerCommunicationHandler.prototype.attemptHandShake = function (e) {\r\n var hash = getHashCode(this.embedId).toString(10);\r\n var response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n // We got a message back so if the data matches the hash we sent send the id\r\n if (e.data && e.data === hash) {\r\n response.contentId = this.embedId;\r\n }\r\n else {\r\n response.data = hash;\r\n }\r\n this.send(response);\r\n };\r\n return CrossWindowContainerCommunicationHandler;\r\n}(ContainerCommunicationHandler));\r\nexport { CrossWindowContainerCommunicationHandler };\r\n//# sourceMappingURL=containerCommunicationHandler.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { ChildComponent } from '../childComponent';\r\nimport { CrossWindowCommunicationsManager, CommunicationsEvent } from '../communications/index';\r\nimport { CrossWindowContainerCommunicationHandler } from './containerCommunicationHandler';\r\nimport { generateUniqueId } from '../../../dom/document/generateIds';\r\nimport { getUrlOrigin } from '../../../dom/document/getUrlOrigin';\r\n/**\r\n * Cross Window Child Component.\r\n */\r\nvar CrossWindowChildComponent = /** @class */ (function (_super) {\r\n __extends(CrossWindowChildComponent, _super);\r\n /**\r\n * Constructor.\r\n * @param window The window refrence.\r\n * @param options The child options.\r\n * @param rootFacade he root component facade.\r\n */\r\n function CrossWindowChildComponent(window, options, rootFacade) {\r\n var _this = _super.call(this, window, options, rootFacade) || this;\r\n _this.embededId = '';\r\n _this.embededLoadResolver = null;\r\n _this.embededErrorRejecter = null;\r\n _this.embededLoadPromise = new Promise(function (resolve, reject) {\r\n _this.embededLoadResolver = resolve;\r\n _this.embededErrorRejecter = reject;\r\n });\r\n _this.embededLoadHandlerRef = _this.embededLoadHandler.bind(_this);\r\n _this.embededErrorHandlerRef = _this.embededErrorHandler.bind(_this);\r\n return _this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowChildComponent.prototype.disposeCore = function () {\r\n var embed = this.embededId\r\n ? this.rootElement.querySelector(\"#\" + this.embededId)\r\n : null;\r\n if (embed) {\r\n embed.removeEventListener('load', this.embededLoadHandlerRef);\r\n embed.removeEventListener('error', this.embededErrorHandlerRef);\r\n // Do not remove the embeded element now as we still need it to comunicate with the content.\r\n // The parent \"rootElement\" will be removed latter anyhow.\r\n // (embed.parentElement).removeChild(embed);\r\n }\r\n this.embededLoadHandlerRef = null;\r\n this.embededErrorHandlerRef = null;\r\n this.embededLoadResolver = null;\r\n this.embededErrorRejecter = null;\r\n this.embededLoadPromise = null;\r\n return _super.prototype.disposeCore.call(this);\r\n };\r\n /**\r\n * Get the CrossWindowChildComponentOptions\r\n */\r\n CrossWindowChildComponent.prototype.getOptions = function () {\r\n return _super.prototype.getOptions.call(this);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowChildComponent.prototype.mountCore = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var createEmbedElementFn, embed, embedId;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n createEmbedElementFn = this.getOptions().createEmbedElement;\r\n embed = null;\r\n if (createEmbedElementFn) {\r\n embed = createEmbedElementFn(this.rootElement);\r\n }\r\n else {\r\n embed = this.createEmbedElement();\r\n }\r\n if (!embed)\r\n throw new Error('Failed to create embed element!');\r\n embedId = generateUniqueId(this.getDocument(), 'ufe-cross-');\r\n embed.id = embedId;\r\n this.embededId = embedId;\r\n embed.addEventListener('load', this.embededLoadHandlerRef);\r\n embed.addEventListener('error', this.embededErrorHandlerRef);\r\n this.rootElement.appendChild(embed);\r\n return [4 /*yield*/, (this.embededLoadPromise)];\r\n case 1:\r\n _a.sent();\r\n return [4 /*yield*/, _super.prototype.mountCore.call(this)];\r\n case 2: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n *\r\n * @param methods @inheritdoc\r\n */\r\n CrossWindowChildComponent.prototype.getCommunicationHandlerCore = function (methods) {\r\n var document = this.getDocument();\r\n var manager = new CrossWindowCommunicationsManager((document).defaultView, CommunicationsEvent.CONTENT_EVENT_TYPE, this.outboundEndpointAccesor(), CommunicationsEvent.CONTAINER_EVENT_TYPE, getUrlOrigin(document, this.getOptions().url));\r\n manager.initialize();\r\n return new CrossWindowContainerCommunicationHandler(manager, this.embededId, methods);\r\n };\r\n /**\r\n * Handle the loading of the embeded element.\r\n * @param e The load event.\r\n */\r\n CrossWindowChildComponent.prototype.embededLoadHandler = function (e) {\r\n this.embededLoadResolver();\r\n };\r\n /**\r\n * Handle the errir of the embeded element.\r\n * @param e The error event.\r\n */\r\n CrossWindowChildComponent.prototype.embededErrorHandler = function (e) {\r\n this.embededErrorRejecter(new Error(\"Failed to load embeded element.\\nError details:\\n\" + JSON.stringify(e)));\r\n };\r\n /**\r\n * Create the embeded element.\r\n */\r\n CrossWindowChildComponent.prototype.createEmbedElement = function () {\r\n var embed = this.getDocument().createElement('iframe');\r\n var opt = this.getOptions();\r\n if (opt.embededAttributes) {\r\n var keys = Object.keys(opt.embededAttributes);\r\n // tslint:disable-next-line: prefer-for-of\r\n for (var index = 0; index < keys.length; index++) {\r\n var key = keys[index];\r\n embed.setAttribute(key, opt.embededAttributes[key]);\r\n }\r\n }\r\n embed.setAttribute('src', opt.url);\r\n return embed;\r\n };\r\n /**\r\n * Access the outbound comunication endpoint.\r\n */\r\n CrossWindowChildComponent.prototype.outboundEndpointAccesor = function () {\r\n var embed = this.embededId\r\n ? this.rootElement.querySelector(\"#\" + this.embededId)\r\n : null;\r\n if (!embed)\r\n throw new Error(\"No iframe with \\\"\" + this.embededId + \"\\\" id found.\");\r\n if (!embed.contentWindow)\r\n throw new Error(\"The iframe with \\\"\" + this.embededId + \"\\\" id does not have a \\\"contentWindow\\\"(\" + embed.contentWindow + \").\");\r\n return embed.contentWindow;\r\n };\r\n return CrossWindowChildComponent;\r\n}(ChildComponent));\r\nexport { CrossWindowChildComponent };\r\n//# sourceMappingURL=childComponent.js.map","import { ComponentEventType } from './componentEvent';\r\n/**\r\n * Configuration object for the event handlers.\r\n */\r\nvar ComponentEventHandlers = /** @class */ (function () {\r\n function ComponentEventHandlers() {\r\n }\r\n return ComponentEventHandlers;\r\n}());\r\nexport { ComponentEventHandlers };\r\nComponentEventType.BeforeCreate, ComponentEventType.Created, ComponentEventType.BeforeMount, ComponentEventType.Mounted, ComponentEventType.BeforeUpdate, ComponentEventType.Updated, ComponentEventType.BeforeDestroy, ComponentEventType.Destroyed, ComponentEventType.Error, ComponentEventType.Data;\r\n/**\r\n * Compoent configuration options.\r\n */\r\nvar ComponentOptions = /** @class */ (function () {\r\n function ComponentOptions() {\r\n this.parent = 'body';\r\n this.tag = 'div';\r\n this.handlers = new ComponentEventHandlers();\r\n this.resources = [];\r\n }\r\n return ComponentOptions;\r\n}());\r\nexport { ComponentOptions };\r\n//# sourceMappingURL=componentOptions.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ChildComponentType } from './childComponentType';\r\nimport { ComponentOptions } from '../componentOptions';\r\n/**\r\n * Child component options.\r\n */\r\nvar ChildComponentOptions = /** @class */ (function (_super) {\r\n __extends(ChildComponentOptions, _super);\r\n function ChildComponentOptions() {\r\n var _this = _super.call(this) || this;\r\n _this.type = ChildComponentType.InWindow;\r\n /**\r\n * The the interval to wait for the component before triggering an error and the 'disposed' event.\r\n */\r\n _this.contentDisposeTimeout = 3000;\r\n return _this;\r\n }\r\n return ChildComponentOptions;\r\n}(ComponentOptions));\r\nexport { ChildComponentOptions };\r\n//# sourceMappingURL=childComponentOptions.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ChildComponentOptions } from '../childComponentOptions';\r\nimport { ChildComponentType } from '../childComponentType';\r\n/**\r\n * Cross Window Child Component Options.\r\n */\r\nvar CrossWindowChildComponentOptions = /** @class */ (function (_super) {\r\n __extends(CrossWindowChildComponentOptions, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function CrossWindowChildComponentOptions() {\r\n var _this = _super.call(this) || this;\r\n _this.url = 'about:blank';\r\n _this.type = ChildComponentType.CrossWindow;\r\n return _this;\r\n }\r\n return CrossWindowChildComponentOptions;\r\n}(ChildComponentOptions));\r\nexport { CrossWindowChildComponentOptions };\r\n//# sourceMappingURL=childComponentOptions.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { CommunicationsEvent, CommunicationsEventKind, ContentCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar CrossWindowContentCommunicationHandler = /** @class */ (function (_super) {\r\n __extends(CrossWindowContentCommunicationHandler, _super);\r\n /**\r\n * Constructor.\r\n * @param communicationsManager A communications manager.\r\n * @param methods The callback to dispose the content.\r\n */\r\n function CrossWindowContentCommunicationHandler(communicationsManager, methods) {\r\n var _this = _super.call(this, communicationsManager, methods) || this;\r\n _this.iframeId = '';\r\n _this.messageQueue = [];\r\n return _this;\r\n }\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowContentCommunicationHandler.prototype.disposeCore = function () {\r\n this.messageQueue = [];\r\n _super.prototype.disposeCore.call(this);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowContentCommunicationHandler.prototype.handleEventCore = function (e) {\r\n if (!this.iframeId) {\r\n this.attemptHandShake(e);\r\n return;\r\n }\r\n _super.prototype.handleEventCore.call(this, e);\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CrossWindowContentCommunicationHandler.prototype.send = function (message) {\r\n if (this.iframeId) {\r\n message.contentId = this.iframeId;\r\n }\r\n else {\r\n if (message.kind !== CommunicationsEventKind.Mounted) {\r\n // In case we do not have an iframeId push all events to queue,\r\n // only Mounted are allowed to establish handshake.\r\n this.messageQueue.push(message);\r\n return;\r\n }\r\n }\r\n _super.prototype.send.call(this, message);\r\n };\r\n /**\r\n * Attempt a handshake with the container.\r\n * @param e The communication event.\r\n */\r\n CrossWindowContentCommunicationHandler.prototype.attemptHandShake = function (e) {\r\n if (e.contentId) {\r\n // Phase 2 of the handshake - we got the id.\r\n this.iframeId = e.contentId;\r\n // Send it again to notify parent.\r\n var response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n response.contentId = this.iframeId;\r\n this.send(response);\r\n // Send the previously queued messages.\r\n this.flushMessages();\r\n }\r\n else {\r\n // Phase 1 of the handshake - we got the hash so send it back.\r\n var response = new CommunicationsEvent(CommunicationsEventKind.Mounted);\r\n response.contentId = this.iframeId;\r\n response.data = e.data;\r\n this.send(response);\r\n }\r\n };\r\n /**\r\n * Flush all the messages that were enqueues before the handhake.\r\n */\r\n CrossWindowContentCommunicationHandler.prototype.flushMessages = function () {\r\n // tslint:disable-next-line: prefer-for-of\r\n for (var index = 0; index < this.messageQueue.length; index++) {\r\n var msg = this.messageQueue[index];\r\n msg.contentId = this.iframeId;\r\n this.send(msg);\r\n }\r\n };\r\n return CrossWindowContentCommunicationHandler;\r\n}(ContentCommunicationHandler));\r\nexport { CrossWindowContentCommunicationHandler };\r\n//# sourceMappingURL=contentComunicationHandler.js.map","import { ChildComponentType } from './childComponentType';\r\nimport { InWindowChildComponent } from './inWindow/childComponent';\r\nimport { CrossWindowChildComponent } from './crossWindow/index';\r\n/**\r\n * Factory to create child components.\r\n */\r\nvar ChildComponentFactory = /** @class */ (function () {\r\n function ChildComponentFactory() {\r\n }\r\n /**\r\n * Create a child component.\r\n * @param window The window reference.\r\n * @param options The child component options.\r\n * @param rootFacade The facade for the root component.\r\n */\r\n ChildComponentFactory.prototype.createComponent = function (window, options, rootFacade) {\r\n switch (options.type) {\r\n case ChildComponentType.InWindow:\r\n return new InWindowChildComponent(window, options, rootFacade);\r\n case ChildComponentType.CrossWindow:\r\n return new CrossWindowChildComponent(window, options, rootFacade);\r\n default:\r\n throw new Error(\"The \\\"\" + options.type + \"\\\" is not configured.\");\r\n }\r\n };\r\n return ChildComponentFactory;\r\n}());\r\nexport { ChildComponentFactory };\r\n//# sourceMappingURL=childComponentFactory.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ChildComponentOptions } from '../childComponentOptions';\r\n/**\r\n * In Window Child Component Options.\r\n */\r\nvar InWindowChildComponentOptions = /** @class */ (function (_super) {\r\n __extends(InWindowChildComponentOptions, _super);\r\n /**\r\n * Constructor.\r\n */\r\n function InWindowChildComponentOptions() {\r\n return _super.call(this) || this;\r\n }\r\n return InWindowChildComponentOptions;\r\n}(ChildComponentOptions));\r\nexport { InWindowChildComponentOptions };\r\n//# sourceMappingURL=childComponentOptions.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ContentCommunicationHandler } from '../communications/index';\r\n/**\r\n * @inheritdoc\r\n */\r\nvar InWindowContentCommunicationHandler = /** @class */ (function (_super) {\r\n __extends(InWindowContentCommunicationHandler, _super);\r\n /**\r\n * Constructor.\r\n * @param el The element to use for sending and receiving messages.\r\n * @param methods The callback to dispose the content.\r\n */\r\n function InWindowContentCommunicationHandler(communicationsManager, methods) {\r\n return _super.call(this, communicationsManager, methods) || this;\r\n }\r\n return InWindowContentCommunicationHandler;\r\n}(ContentCommunicationHandler));\r\nexport { InWindowContentCommunicationHandler };\r\n//# sourceMappingURL=contentComunicationHandler.js.map","/**\r\n * Configuration for retrieving a resource.\r\n */\r\nvar ResourceConfiguration = /** @class */ (function () {\r\n function ResourceConfiguration() {\r\n this.url = '';\r\n this.isScript = true;\r\n this.skip = function () { return false; };\r\n }\r\n return ResourceConfiguration;\r\n}());\r\nexport { ResourceConfiguration };\r\n//# sourceMappingURL=resourceConfiguration.js.map","/**\r\n * Facade to interface with the the root component.\r\n */\r\nvar RootComponentFacade = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param signalDisposed The function to invoke to signal that the child was disposed.\r\n */\r\n function RootComponentFacade(signalDisposed) {\r\n this.signalDisposed = signalDisposed;\r\n }\r\n return RootComponentFacade;\r\n}());\r\nexport { RootComponentFacade };\r\n//# sourceMappingURL=rootComponentFacade.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nimport { RootComponentFacade } from './rootComponentFacade';\r\nimport { Component } from './component';\r\nimport { ComponentEventType } from './componentEvent';\r\n/**\r\n * The root component to host the rest of the components.\r\n * There is not limitation right no but ideally there should only be one of these on a page.\r\n */\r\nvar RootComponent = /** @class */ (function (_super) {\r\n __extends(RootComponent, _super);\r\n function RootComponent(window, options) {\r\n var _this = _super.call(this, window, options) || this;\r\n _this.children = {};\r\n return _this;\r\n }\r\n /**\r\n * Schedule the disposing of the child on exiting the function.\r\n * The dispose method is async but we do not want to wait for that.\r\n * @param child The child that was disposed.\r\n */\r\n RootComponent.prototype.scheduleDisposeChild = function (child) {\r\n var _this = this;\r\n // Schedule this later\r\n this.getWindow().setTimeout(function () {\r\n _this.disposeChildByRef(child);\r\n }, 0);\r\n };\r\n /**\r\n * Dispose a child using it's reference.\r\n * @param child\r\n */\r\n RootComponent.prototype.disposeChildByRef = function (child) {\r\n return this.disposeChild(child.id);\r\n };\r\n /**\r\n * Dispose a child by using it's id.\r\n * @param childId The child identifyer.\r\n */\r\n RootComponent.prototype.disposeChild = function (childId) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var child;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n child = this.getChild(childId);\r\n if (!child)\r\n return [2 /*return*/, Promise.resolve()];\r\n return [4 /*yield*/, child.dispose()];\r\n case 1:\r\n _a.sent();\r\n this.children[childId] = null;\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * @@inheritdoc\r\n */\r\n RootComponent.prototype.mountCore = function () {\r\n this.callHandler(ComponentEventType.Mounted);\r\n return _super.prototype.mountCore.call(this);\r\n };\r\n /**\r\n * Add a child component.\r\n * @param options Child component options.\r\n */\r\n RootComponent.prototype.addChild = function (options) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var child, id;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.isInitialized)\r\n throw new Error('Wait for the component to initilize before starting to add children.');\r\n if (!this.isMounted)\r\n throw new Error('Wait for the component to mount before starting to add children.');\r\n child = this.options.childFactory.createComponent(this.getWindow(), options, new RootComponentFacade(this.scheduleDisposeChild.bind(this)));\r\n return [4 /*yield*/, child.initialize()];\r\n case 1:\r\n id = (_a.sent()).id;\r\n this.children[id] = child;\r\n return [4 /*yield*/, child.mount()];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/, id];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Get the child with the given identifier.\r\n * @param id The child identifier.\r\n */\r\n RootComponent.prototype.getChild = function (id) {\r\n return id ? (this.children[id] || null) : null;\r\n };\r\n /**\r\n * Remove a child component.\r\n * @param id The child component identifyer.\r\n */\r\n RootComponent.prototype.removeChild = function (id) {\r\n return this.disposeChild(id);\r\n };\r\n return RootComponent;\r\n}(Component));\r\nexport { RootComponent };\r\n//# sourceMappingURL=rootComponent.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { ComponentOptions } from './componentOptions';\r\nimport { ChildComponentFactory } from './children/childComponentFactory';\r\n/**\r\n * Options for the root component.\r\n */\r\nvar RootComponentOptions = /** @class */ (function (_super) {\r\n __extends(RootComponentOptions, _super);\r\n function RootComponentOptions() {\r\n var _this = _super.call(this) || this;\r\n _this.tag = 'script';\r\n _this.childFactory = new ChildComponentFactory();\r\n return _this;\r\n }\r\n return RootComponentOptions;\r\n}(ComponentOptions));\r\nexport { RootComponentOptions };\r\n//# sourceMappingURL=rootComponentOptions.js.map"],"names":["ComponentEventType","this","CommunicationsEventKind","__extends","__awaiter","__generator","ChildComponentType"],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA,SAAS,WAAW,CAAC,KAAK,EAAE;IAC5B,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;IACjB,IAAI,IA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C,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,GAAG,GAAG,QAAQ,CAAC;IAC7B,QAAQ,KAAK,CAAC,YAAY,GAAG,IAAI,qBAAqB,EAAE,CAAC;IACzD,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,OAAO,oBAAoB,CAAC;IAChC,CAAC,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/package.json b/package.json index 9fda579..cb35a85 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "node ./.build/clean.js", "prebuild": "npm run clean", - "build": "tsc --module es2015 && rollup --config ./rollup.config.js && node ./.build/minify.js", + "build": "tsc --module es2015 --target ES5 && rollup --config ./rollup.config.js && node ./.build/minify.js", "test": "npm run lint && nyc mocha", "predocs": "npm run test && npm run build", "docs": "rollup --config ./rollup.config.js --dir ./docs/demo/lib/bundle/", diff --git a/tsconfig.json b/tsconfig.json index 8148576..affb4be 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { /* Basic Options */ - "target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ + "target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */