diff --git a/docs/demo/embeded-nav-bar.html b/docs/demo/embeded-nav-bar.html
index ff1cce0..d3537e0 100644
--- a/docs/demo/embeded-nav-bar.html
+++ b/docs/demo/embeded-nav-bar.html
@@ -64,6 +64,9 @@
manager.initialize();
var contentMethods = new ufe.ContentCommunicationHandlerMethods();
contentMethods.dispose = function() { dispose(); };
+ contentMethods.handleDataEvent = function(data) {
+ console.log('Iframe recevied data: \n\n' + JSON.stringify(data));
+ };
communicationHandler = new ufe.CrossWindowContentCommunicationHandler(
manager,
contentMethods
@@ -104,6 +107,7 @@
} else {
if (communicationHandler) {
communicationHandler.dispatchBeforeUpdate();
+
setTimeout(() => {
communicationHandler.dispatchUpdated();
}, 1000);
@@ -123,6 +127,7 @@
// Simulate a delay to consider exts processing
window.setTimeout(() => {
communicationHandler.dispatchMounted();
+ communicationHandler.sendData(['Data from content!']);
}, 1000);
}
}
diff --git a/docs/demo/js/app.js b/docs/demo/js/app.js
index 147565b..97f61fc 100644
--- a/docs/demo/js/app.js
+++ b/docs/demo/js/app.js
@@ -28,7 +28,10 @@
case 'error':
console.error(evt.error);
break;
- default:
+ case 'data':
+ console.log('Data from child:\n' + JSON.stringify(evt.data));
+ break;
+ default:
alert('Unknown event: ' + evt.type);
}
}
@@ -43,6 +46,7 @@
globalHandlers['beforeDestroy'] = mfeEventHadler;
globalHandlers['destroyed'] = mfeEventHadler;
globalHandlers['error'] = mfeEventHadler;
+ globalHandlers['data'] = mfeEventHadler;
var configuration = new ufe.RootComponentOptions();
@@ -206,6 +210,10 @@
if (!navbarIframeId)
return;
+ mfe.getChild(navbarIframeId).sendData({
+ 'foo': 'bar'
+ })
+
await mfe.removeChild(navbarIframeId);
navbarIframeId = '';
}
diff --git a/docs/demo/lib/bundle/index.js b/docs/demo/lib/bundle/index.js
index 92c9958..3c69105 100644
--- a/docs/demo/lib/bundle/index.js
+++ b/docs/demo/lib/bundle/index.js
@@ -136,6 +136,7 @@
ComponentEventType["BeforeDestroy"] = "beforeDestroy";
ComponentEventType["Destroyed"] = "destroyed";
ComponentEventType["Error"] = "error";
+ ComponentEventType["Data"] = "data";
})(exports.ComponentEventType || (exports.ComponentEventType = {}));
/**
* Evnts triggered by the components
@@ -297,7 +298,7 @@
* Call a specific event handler.
* @param type The type of handler to call.
*/
- callHandler(type) {
+ callHandler(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
@@ -305,7 +306,9 @@
: null;
if (handler) {
try {
- handler(new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null));
+ const event = new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null);
+ event.data = data;
+ handler(event);
}
catch (error) {
this.callErrorHandler(error);
@@ -401,6 +404,7 @@
CommunicationsEventKind["Updated"] = "updated";
CommunicationsEventKind["BeforeDispose"] = "beforeDispose";
CommunicationsEventKind["Disposed"] = "disposed";
+ CommunicationsEventKind["Data"] = "data";
})(exports.CommunicationsEventKind || (exports.CommunicationsEventKind = {}));
/**
* Event used to comunicate between content and container component.
@@ -426,7 +430,7 @@
*/
CommunicationsEvent.CONTAINER_EVENT_TYPE = 'container_event.communication.children.validide_micro_front_ends';
- var _a, _b, _c, _d, _e;
+ var _a, _b, _c, _d, _e, _f;
/**
* The communication handler methods.
*/
@@ -452,9 +456,13 @@
* Call the container to signal the component has disposed(almost).
*/
this[_e] = noop;
+ /**
+ * Call the container to signal the component has disposed(almost).
+ */
+ this[_f] = noop;
}
}
- _a = exports.CommunicationsEventKind.Mounted, _b = exports.CommunicationsEventKind.BeforeUpdate, _c = exports.CommunicationsEventKind.Updated, _d = exports.CommunicationsEventKind.BeforeDispose, _e = exports.CommunicationsEventKind.Disposed;
+ _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.
*/
@@ -482,7 +490,7 @@
const method = this.handlerMethods[e.kind];
if (!method)
return;
- method();
+ method(e.data);
}
/**
* Handle the incomming communications event.
@@ -495,11 +503,11 @@
* Method invoked to dispose of the handler.
*/
dispose() {
- var _f;
+ var _g;
if (this.disposed)
return;
this.disposed = true;
- (_f = this.communicationsManager) === null || _f === void 0 ? void 0 : _f.dispose();
+ (_g = this.communicationsManager) === null || _g === void 0 ? void 0 : _g.dispose();
this.communicationsManager = null;
this.handlerMethods = null;
}
@@ -508,8 +516,18 @@
* @param event The message.
*/
send(event) {
- var _f;
- (_f = this.communicationsManager) === null || _f === void 0 ? void 0 : _f.send(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) {
+ var _g;
+ const 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.
@@ -528,6 +546,10 @@
* Method to dispose the content.
*/
this.dispose = noop;
+ /**
+ * Method to dispose the content.
+ */
+ this.handleDataEvent = noop;
}
}
/**
@@ -559,6 +581,11 @@
this.methods.dispose();
}
break;
+ case exports.CommunicationsEventKind.Data:
+ if (this.methods) {
+ this.methods.handleDataEvent(e.data);
+ }
+ break;
default:
throw new Error(`The "${e.kind}" event is not configured.`);
}
@@ -583,6 +610,14 @@
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);
+ evt.data = data;
+ this.send(evt);
+ }
/**
* Dispatch event to signal mounting finished.
*/
@@ -890,6 +925,7 @@
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();
return this.getCommunicationHandlerCore(methods);
@@ -978,6 +1014,14 @@
yield _super.disposeCore.call(this);
});
}
+ /**
+ * Send data.
+ * @param data The data to send.
+ */
+ sendData(data) {
+ var _a;
+ (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.sendData(data);
+ }
}
/**
@@ -1252,7 +1296,7 @@
*/
class 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.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.
*/
diff --git a/docs/demo/lib/bundle/index.js.map b/docs/demo/lib/bundle/index.js.map
index 5baf371..2b026e8 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 || (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) {\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 handler(new ComponentEvent(this.id, type, this.rootElement, this.getParentElement(), null));\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 || (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;\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}\r\n_a = CommunicationsEventKind.Mounted, _b = CommunicationsEventKind.BeforeUpdate, _c = CommunicationsEventKind.Updated, _d = CommunicationsEventKind.BeforeDispose, _e = CommunicationsEventKind.Disposed;\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();\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 _f;\r\n if (this.disposed)\r\n return;\r\n this.disposed = true;\r\n (_f = this.communicationsManager) === null || _f === void 0 ? void 0 : _f.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 _f;\r\n (_f = this.communicationsManager) === null || _f === void 0 ? void 0 : _f.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}\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 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 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.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//# 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;\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,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,QAAQ,OAAO,IAAI,CAAC;IACpB,IAAI,OAAO,KAAK,GAAG,MAAM,EAAE;IAC3B,QAAQ,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvC,QAAQ,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC;IAC3C,QAAQ,IAAI,IAAI,CAAC,CAAC;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,KAAK;IACL,IAAI,OAAO,I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AE,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC;IACvD,KAAK;IACL;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,EAAE,EAAE;IACpB,QAAQ,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACrC,KAAK;IACL;;ICxFA;IACA;IACA;IACO,MAAM,oBAAoB,SAAS,gBAAgB,CAAC;IAC3D,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,QAAQ,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;IAC5B,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,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 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,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,IAAI,MAAM,KAAK,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/src/core/children/childComponent.ts b/src/core/children/childComponent.ts
index 94e8c63..2e3986e 100644
--- a/src/core/children/childComponent.ts
+++ b/src/core/children/childComponent.ts
@@ -42,6 +42,7 @@ export abstract class ChildComponent extends Component {
methods.mounted = () => this.callHandler(ComponentEventType.Mounted);
methods.beforeUpdate = () => this.callHandler(ComponentEventType.BeforeUpdate);
methods.updated = () => this.callHandler(ComponentEventType.Updated);
+ methods.data = (data: any) => this.callHandler(ComponentEventType.Data, data);
methods.beforeDispose = () => this.contentBeginDisposed();
methods.disposed = () => this.contentDisposed();
return this.getCommunicationHandlerCore(methods);
@@ -139,4 +140,12 @@ export abstract class ChildComponent extends Component {
this.contentDisposePromise = null;
await super.disposeCore();
}
+
+ /**
+ * Send data.
+ * @param data The data to send.
+ */
+ public sendData(data: any): void{
+ this.communicationHandler?.sendData(data);
+ }
}
diff --git a/src/core/children/communications/containerHandler.ts b/src/core/children/communications/containerHandler.ts
index e1d4eb5..1ccdb98 100644
--- a/src/core/children/communications/containerHandler.ts
+++ b/src/core/children/communications/containerHandler.ts
@@ -26,6 +26,10 @@ export class ContainerCommunicationHandlerMethods {
* Call the container to signal the component has disposed(almost).
*/
public [CommunicationsEventKind.Disposed]: () => void = noop;
+ /**
+ * Call the container to signal the component has disposed(almost).
+ */
+ public [CommunicationsEventKind.Data]: (data: any) => void = noop;
}
/**
@@ -65,7 +69,7 @@ export abstract class ContainerCommunicationHandler {
if (!method)
return;
- method();
+ method(e.data);
}
/**
@@ -97,6 +101,16 @@ export abstract class ContainerCommunicationHandler {
this.communicationsManager?.send(event);
}
+ /**
+ * Send data.
+ * @param data The data to send.
+ */
+ public sendData(data: any): void{
+ const event = new CommunicationsEvent(CommunicationsEventKind.Data);
+ event.data = data;
+ this.communicationsManager?.send(event);
+ }
+
/**
* Reuest that the content begins disposing.
*/
diff --git a/src/core/children/communications/contentHandler.ts b/src/core/children/communications/contentHandler.ts
index c720d76..acf6f63 100644
--- a/src/core/children/communications/contentHandler.ts
+++ b/src/core/children/communications/contentHandler.ts
@@ -10,6 +10,10 @@ export class ContentCommunicationHandlerMethods {
* Method to dispose the content.
*/
public dispose: () => void = noop;
+ /**
+ * Method to dispose the content.
+ */
+ public handleDataEvent: (data: any) => void = noop;
}
/**
@@ -49,6 +53,11 @@ export abstract class ContentCommunicationHandler {
this.methods.dispose();
}
break;
+ case CommunicationsEventKind.Data:
+ if (this.methods) {
+ this.methods.handleDataEvent(e.data);
+ }
+ break;
default:
throw new Error(`The "${e.kind}" event is not configured.`);
}
@@ -76,6 +85,15 @@ export abstract class ContentCommunicationHandler {
this.communicationsManager?.send(event);
}
+ /**
+ * Dispatch event to signal mounting finished.
+ */
+ public sendData(data: any): void {
+ const evt = new CommunicationsEvent(CommunicationsEventKind.Data);
+ evt.data = data;
+ this.send(evt);
+ }
+
/**
* Dispatch event to signal mounting finished.
*/
diff --git a/src/core/children/communications/event.ts b/src/core/children/communications/event.ts
index 50debab..8934ee4 100644
--- a/src/core/children/communications/event.ts
+++ b/src/core/children/communications/event.ts
@@ -7,7 +7,8 @@ export enum CommunicationsEventKind {
BeforeUpdate = 'beforeUpdate',
Updated = 'updated',
BeforeDispose = 'beforeDispose',
- Disposed = 'disposed'
+ Disposed = 'disposed',
+ Data = 'data'
}
/**
diff --git a/src/core/component.ts b/src/core/component.ts
index 063e482..93812a0 100644
--- a/src/core/component.ts
+++ b/src/core/component.ts
@@ -160,7 +160,7 @@ export abstract class Component {
* Call a specific event handler.
* @param type The type of handler to call.
*/
- protected callHandler(type: ComponentEventType): void {
+ protected callHandler(type: ComponentEventType, data?: any): void {
if (type === ComponentEventType.Error)
throw new Error(`For calling the "${ComponentEventType.Error}" handler use the "callErrorHandler" method.`);
@@ -170,13 +170,15 @@ export abstract class Component {
if (handler) {
try {
- handler(new ComponentEvent(
+ const event = new ComponentEvent(
this.id,
type,
this.rootElement,
this.getParentElement(),
null
- ));
+ );
+ event.data = data;
+ handler(event);
} catch (error) {
this.callErrorHandler(error);
}
diff --git a/src/core/componentEvent.ts b/src/core/componentEvent.ts
index 93b70da..fb6e19d 100644
--- a/src/core/componentEvent.ts
+++ b/src/core/componentEvent.ts
@@ -10,7 +10,8 @@ export enum ComponentEventType {
Updated = 'updated',
BeforeDestroy = 'beforeDestroy',
Destroyed = 'destroyed',
- Error = 'error'
+ Error = 'error',
+ Data = 'data'
}
/**
@@ -28,6 +29,7 @@ export class ComponentEvent {
public parentEl: HTMLElement;
public error: Error | null;
public timestamp: Date;
+ public data: any;
/**
* COnstructor.
diff --git a/src/core/componentOptions.ts b/src/core/componentOptions.ts
index df4add5..26294a3 100644
--- a/src/core/componentOptions.ts
+++ b/src/core/componentOptions.ts
@@ -14,6 +14,7 @@ export class ComponentEventHandlers {
[ComponentEventType.BeforeDestroy]?: ComponentEventHandler;
[ComponentEventType.Destroyed]?: ComponentEventHandler;
[ComponentEventType.Error]?: ComponentEventHandler;
+ [ComponentEventType.Data]?: ComponentEventHandler;
}
/**
diff --git a/test/core/children/childComponent.spec.ts b/test/core/children/childComponent.spec.ts
index e15e5a6..fd8decb 100644
--- a/test/core/children/childComponent.spec.ts
+++ b/test/core/children/childComponent.spec.ts
@@ -1,7 +1,7 @@
import 'mocha';
import { JSDOM } from 'jsdom';
import { expect } from 'chai';
-import { ChildComponentOptions, RootComponentFacade, noop } from '../../../src';
+import { ChildComponentOptions, RootComponentFacade, noop, ContainerCommunicationHandler } from '../../../src';
import { MockChildComponent, MockContainerCommunicationHandler } from '../../mocks/mockChildComponentFactory';
export function test_ChildComponent() {
@@ -131,10 +131,12 @@ export function test_ChildComponent() {
let mounted = false;
let beforeUpdate = false;
let updated = false;
+ let data: any = null;
_options.tag= 'ce-dipose-tests';
_options.handlers.mounted = (evt) => {mounted = true;}
_options.handlers.beforeUpdate = (evt) => {beforeUpdate = true;}
_options.handlers.updated = (evt) => {updated = true;}
+ _options.handlers.data = (evt) => {data = evt.data;}
const mock = new MockChildComponent(_win, _options, new RootComponentFacade(noop));
await mock.initialize();
@@ -144,12 +146,35 @@ export function test_ChildComponent() {
await mount;
+ const testData = {'foo': 'bar'};
+ mock.comunicationMethods.data(testData);
mock.comunicationMethods.beforeUpdate()
mock.comunicationMethods.updated();
expect(mounted).to.be.true;
expect(beforeUpdate).to.be.true;
expect(updated).to.be.true;
+ expect(data).to.eq(testData);
})
+
+ it(`calls commounication handler on sendData`, async () => {
+ const mock = new MockChildComponent(_win, _options, new RootComponentFacade(noop));
+ await mock.initialize();
+ await mock.mount();
+
+ let called = false;
+ (mock.public_containerCommunicationHandler).sendData = () => { called = true; };
+ mock.sendData(null);
+
+ expect(called).to.be.true;
+ })
+
+ it(`should not fail when calling sendData without a handler`, async () => {
+ const mock = new MockChildComponent(_win, _options, new RootComponentFacade(noop));
+
+ expect(() => mock.sendData(null)).not.to.throw();
+ expect(mock.public_containerCommunicationHandler).to.be.null;
+ })
+
})
}
diff --git a/test/core/children/communications/containerHandler.spec.ts b/test/core/children/communications/containerHandler.spec.ts
index 4160708..86c25be 100644
--- a/test/core/children/communications/containerHandler.spec.ts
+++ b/test/core/children/communications/containerHandler.spec.ts
@@ -78,5 +78,32 @@ export function test_ContainerCommunicationHandler() {
.not.to.throw()
})
})
+
+ it('should send data', () => {
+ const data = {
+ 'foo': 'bar',
+ nested: {
+ 'prop_name': 'prop_value'
+ }
+ };
+
+ _handler.sendData(data);
+
+ expect(_mngr.sentEvents.length).to.eq(1);
+ expect(_mngr.sentEvents[0].kind).to.eq(CommunicationsEventKind.Data);
+ expect(_mngr.sentEvents[0].data).to.eq(data);
+ })
+
+ it('should not fail on send data', () => {
+ const data = {
+ 'foo': 'bar',
+ nested: {
+ 'prop_name': 'prop_value'
+ }
+ };
+
+ _handler.dispose()
+ expect(()=> _handler.sendData(data)).not.to.throw();
+ })
})
}
diff --git a/test/core/children/communications/contentHandler.spec.ts b/test/core/children/communications/contentHandler.spec.ts
index dc5e92b..a37c849 100644
--- a/test/core/children/communications/contentHandler.spec.ts
+++ b/test/core/children/communications/contentHandler.spec.ts
@@ -109,5 +109,52 @@ export function test_ContentCommunicationHandler() {
expect(_mngr.sentEvents.length).to.eq(1);
expect((_mngr.sentEvents[0]).kind).to.eql(CommunicationsEventKind.Disposed);
})
+
+ it('should send data', () => {
+ const data = {
+ 'foo': 'bar',
+ nested: {
+ 'prop_name': 'prop_value'
+ }
+ };
+
+ _handler.sendData(data);
+
+ expect(_mngr.sentEvents.length).to.eq(1);
+ expect(_mngr.sentEvents[0].kind).to.eq(CommunicationsEventKind.Data);
+ expect(_mngr.sentEvents[0].data).to.eq(data);
+ })
+
+ it(`should handle data event`, () => {
+ const data = {
+ 'foo': 'bar',
+ nested: {
+ 'prop_name': 'prop_value'
+ }
+ };
+ const e = new CommunicationsEvent(CommunicationsEventKind.Data);
+ e.data = data;
+
+ let receivedData: any = null;
+ _methods.handleDataEvent = (data: any) => receivedData = data;
+ _handler.handleEventCore(e);
+
+ expect(receivedData).not.to.be.null;
+ expect(receivedData).to.eq(data);
+ })
+
+ it(`should not fail if data event is not configured`, () => {
+ const data = {
+ 'foo': 'bar',
+ nested: {
+ 'prop_name': 'prop_value'
+ }
+ };
+ const e = new CommunicationsEvent(CommunicationsEventKind.Data);
+ e.data = data;
+
+ const handler = new MockContentCommunicationHandler(_mngr, null)
+ expect(() => handler.handleEventCore(e)).not.to.throw();
+ })
})
}