Socket
Socket
Sign inDemoInstall

@govflanders/vl-widget-core

Package Overview
Dependencies
Maintainers
13
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govflanders/vl-widget-core - npm Package Compare versions

Comparing version 1.2.2 to 1.3.2-0

dist/index.esm.js

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var Vue=_interopDefault(require("vue")),vlWidgetUtility=require("@govflanders/vl-widget-utility"),vlWidgetPlugin=require("@govflanders/vl-widget-plugin"),vlWidgetDependencyInjection=require("@govflanders/vl-widget-dependency-injection"),vlWidgetEvent=require("@govflanders/vl-widget-event"),vlWidgetModule=require("@govflanders/vl-widget-module"),vlWidgetRenderEngine=require("@govflanders/vl-widget-render-engine"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function __decorate(t,e,n,o){var r,i=arguments.length,u=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;0<=s;s--)(r=t[s])&&(u=(i<3?r(u):3<i?r(e,n,u):r(e,n))||u);return 3<i&&u&&Object.defineProperty(e,n,u),u}function __metadata(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function __awaiter(i,u,s,a){return new(s||(s=Promise))(function(t,e){function n(t){try{r(a.next(t))}catch(t){e(t)}}function o(t){try{r(a.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(n,o)}r((a=a.apply(i,u||[])).next())})}function __generator(n,o){var r,i,u,t,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(u=i[2&e[0]?"return":e[0]?"throw":"next"])&&!(u=u.call(i,e[1])).done)return u;switch(i=0,u&&(e=[0,u.value]),e[0]){case 0:case 1:u=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,i=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(u=0<(u=s.trys).length&&u[u.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!u||e[1]>u[0]&&e[1]<u[3])){s.label=e[1];break}if(6===e[0]&&s.label<u[1]){s.label=u[1],u=e;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(e);break}u[2]&&s.ops.pop(),s.trys.pop();continue}e=o.call(n,s)}catch(t){e=[6,t],i=0}finally{r=u=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}!function(t){t.StyleSheet="stylesheet",t.Script="script"}(exports.AssetType||(exports.AssetType={}));var AssetBase=function(){function t(t,e){this.options=t,this.document=e}return t.prototype.getDocument=function(){return this.document},t.prototype.getMountElement=function(){return this.getDocument().head},t.prototype.getOptions=function(){return this.options},t.prototype.isMounted=function(){return!!this.element&&!!this.element.parentNode},t.prototype.mount=function(){var i=this;return Promise.resolve().then(function(){return i.isMounted()?i:i.createElement().then(function(r){return new Promise(function(t,n){i.element=r;function o(){r.removeEventListener("load",o),r.removeEventListener("error",e),t(i)}var e=function t(){r.removeEventListener("load",o),r.removeEventListener("error",t);var e=new vlWidgetUtility.Error.RuntimeError("Asset "+i.getType()+" failed to resolve");i.unmount().then(function(){return n(e)}).catch(function(){return n(e)})};r.addEventListener("load",o),r.removeEventListener("error",e),vlWidgetUtility.Browser.DOM.mount(r,i.getMountElement()),i.getOptions().reference||o()})})})},t.prototype.unmount=function(){var e=this;return Promise.resolve().then(function(){return e.isMounted()?Promise.resolve().then(function(){var t=e.element;return t&&vlWidgetUtility.Browser.DOM.unmount(t),e.element=void 0,e}):e})},t.prototype.remount=function(){var t=this;return this.unmount().then(function(){return t.mount()})},t}(),DefaultScriptAsset=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getMountElement=function(){return this.getDocument().body},e.prototype.createElement=function(){var o=this;return Promise.resolve().then(function(){var t=o.getOptions(),e=o.getDocument(),n=e.createElement("script");return(t.attributes||[]).forEach(function(t){n.setAttribute(t.name,""+t.value)}),n.setAttribute("type",t.type||"text/javascript"),t.reference?n.setAttribute("src",t.value):vlWidgetUtility.Browser.DOM.mount(e.createTextNode(t.value),n),n})},e.prototype.getType=function(){return exports.AssetType.Script},e}(AssetBase),DefaultStyleSheetAsset=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.createElement=function(){var o=this;return Promise.resolve().then(function(){var t=o.getOptions(),e=o.getDocument(),n=e.createElement(t.reference?"link":"style");return(t.attributes||[]).forEach(function(t){n.setAttribute(t.name,""+t.value)}),n.setAttribute("type",t.type||"text/css"),t.reference?(n.setAttribute("rel","stylesheet"),n.setAttribute("href",t.value)):vlWidgetUtility.Browser.DOM.mount(e.createTextNode(t.value),n),n})},e.prototype.getType=function(){return exports.AssetType.StyleSheet},e}(AssetBase),AssetManagerBase=function(){function t(){this.mounted=!1,this.assets=[]}return t.prototype.has=function(e){return-1<this.assets.findIndex(function(t){return t===e})},t.prototype.add=function(t){for(var e=0,n=Array.isArray(t)?t:[t];e<n.length;e++){var o=n[e];this.has(o)||(this.assets.push(o),this.isMounted()&&o.mount())}return this},t.prototype.remove=function(t){for(var e=Array.isArray(t)?t:[t],n=function(e){var t=o.assets.findIndex(function(t){return t===e});-1<t&&(o.assets=o.assets.slice(t,1),e.unmount())},o=this,r=0,i=e;r<i.length;r++){n(i[r])}return this},t.prototype.list=function(t){return t?this.assets.filter(t):this.assets.concat()},t.prototype.isMounted=function(){return this.mounted},t.prototype.mount=function(t){var n=this;return Promise.resolve().then(function(){return n.mounted=!0}).then(function(){var e=[];return n.list(t).forEach(function(t){e.push(t.mount())}),Promise.all(e)}).then(function(){return n})},t.prototype.unmount=function(t){var n=this;return Promise.resolve().then(function(){var e=[];return n.list(t).forEach(function(t){e.push(t.mount())}),Promise.all(e)}).then(function(){return n.mounted=!1}).then(function(){return n})},t.prototype.remount=function(t){var n=this;return Promise.resolve().then(function(){return n.mounted=!0}).then(function(){var e=[];return n.list(t).forEach(function(t){e.push(t.remount())}),Promise.all(e)}).then(function(){return n})},t}(),DefaultAssetManager=function(n){function t(t){var e=n.call(this)||this;return e.document=t,e}return __extends(t,n),t.prototype.getDocument=function(){return this.document},t.prototype.create=function(t,e){var n=this.getDocument();switch(t){case exports.AssetType.Script:return new DefaultScriptAsset(e,n);case exports.AssetType.StyleSheet:return new DefaultStyleSheetAsset(e,n);default:throw new vlWidgetUtility.Error.InvalidArgumentError('Asset type "'+t+'" is invalid')}},t}(AssetManagerBase);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var PlatformRuntimeConfigBase=function(){function t(){}return t.prototype.getBoolean=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"boolean":return n;case"string":return"true"===n;default:return!!n}},t.prototype.getString=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"string":return n;default:return""+n}},t.prototype.getInteger=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"number":return n;default:return parseInt(n,10)}},t.prototype.getFloat=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"number":return n;default:return parseFloat(n)}},t}();!function(t){t.PluginContextProcessor="plugin.context.processor",t.PluginExtension="plugin.extension",t.Widget="widget"}(exports.PlatformRegistrationType||(exports.PlatformRegistrationType={}));var PLUGIN_CONTEXT_PROCESSOR_SERVICE="plugin.context.processor",DefaultPluginContextProcessorDiscovery=function(n){function t(t,e){return n.call(this,t,e,PLUGIN_CONTEXT_PROCESSOR_SERVICE)||this}return __extends(t,n),t}(vlWidgetPlugin.ModulePluginContextProcessorDiscovery),WidgetContextProcessorBase=function(c){function t(){return null!==c&&c.apply(this,arguments)||this}return __extends(t,c),t.prototype.getPluginExtensionContexts=function(t,e){return Promise.resolve(t.extensions||[])},t.prototype.onPostProcess=function(a,l){return __awaiter(this,void 0,void 0,function(){var e,n,o,r,i,u,s;return __generator(this,function(t){switch(t.label){case 0:return[4,c.prototype.onPostProcess.call(this,a,l)];case 1:return e=t.sent(),[4,this.getPluginExtensionContexts(e,l)];case 2:if(!(0<(n=t.sent()).length))return[3,9];o=[],r=0,i=n,t.label=3;case 3:if(!(r<i.length))return[3,8];u=i[r],t.label=4;case 4:return t.trys.push([4,6,,7]),[4,l.process(u)];case 5:return s=t.sent(),o.push(s),[3,7];case 6:return t.sent(),[3,7];case 7:return r++,[3,3];case 8:return e.extensions=o,[3,10];case 9:e.extensions=[],t.label=10;case 10:return[2,e]}})})},t}(vlWidgetPlugin.PluginContextProcessorBase),DefaultWidgetContextProcessor=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(WidgetContextProcessorBase),PluginExtensionContextProcessorBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(vlWidgetPlugin.PluginContextProcessorBase),DefaultPluginExtensionContextProcessor=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginExtensionContextProcessorBase),DefaultWidgetContextProcessorFactory=function(){function t(){}return t.prototype.createPluginContextProcessor=function(t){return Promise.resolve().then(function(){return new DefaultWidgetContextProcessor})},t=__decorate([vlWidgetDependencyInjection.injectable()],t)}(),DefaultPluginExtensionContextProcessorFactory=function(){function t(){}return t.prototype.createPluginContextProcessor=function(t){return Promise.resolve().then(function(){return new DefaultPluginExtensionContextProcessor})},t=__decorate([vlWidgetDependencyInjection.injectable()],t)}(),DefaultPluginContextPipeline=function(o){function t(t,e){var n=o.call(this,e)||this;return n.moduleManager=t,n}return __extends(t,o),t.prototype.getModuleManager=function(){return this.moduleManager},t.prototype.process=function(t){var e=this,n=this.getModuleManager();return vlWidgetPlugin.installPluginContext(n,t).then(function(){return o.prototype.process.call(e,t)})},t=__decorate([vlWidgetDependencyInjection.injectable(),__metadata("design:paramtypes",[Object,Object])],t)}(vlWidgetPlugin.PluginContextPipelineBase),WIDGET_FACTORY_SERVICE="widget.factory",DefaultWidgetDiscovery=function(e){function t(t){return e.call(this,t.getModuleManager(),t.getServiceContainer(),WIDGET_FACTORY_SERVICE)||this}return __extends(t,e),t}(vlWidgetPlugin.ModulePluginDiscovery),PLUGIN_EXTENSION_FACTORY_SERVICE="plugin.extension.factory",DefaultPluginExtensionDiscovery=function(n){function t(t){var e=t.getRuntime();return n.call(this,e.getModuleManager(),e.getServiceContainer(),PLUGIN_EXTENSION_FACTORY_SERVICE)||this}return __extends(t,n),t}(vlWidgetPlugin.ModulePluginDiscovery),DefaultWidgetManager=function(e){function t(t){return e.call(this,t,new DefaultWidgetDiscovery(t))||this}return __extends(t,e),t.prototype.createPluginInstance=function(t){return e.prototype.createPluginInstance.call(this,t).then(function(t){return t.getRuntime().emit(new vlWidgetPlugin.GenericPluginEvent("vl.widget.created",t)),t})},t.prototype.mount=function(e){return this.each(function(t){return!e||e(t)?t.mount():Promise.resolve(t)})},t.prototype.unmount=function(e){return this.each(function(t){return!e||e(t)?t.unmount():Promise.resolve(t)})},t.prototype.remount=function(e){return this.each(function(t){return!e||e(t)?t.remount():Promise.resolve(t)})},t}(vlWidgetPlugin.PluginManagerBase),DefaultPluginExtensionManager=function(e){function t(t){return e.call(this,t,new DefaultPluginExtensionDiscovery(t))||this}return __extends(t,e),t}(vlWidgetPlugin.PluginExtensionManagerBase),PluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onReady=function(){var e=this;return t.prototype.onReady.call(this).then(function(){return e.addEventBroadcast(function(t){return e.getPluginHost().emit(t.prefix(e.getPluginId()))})}).then(function(){return e.getRuntime().getWidget().on("beforeMount",function(){return e.invokeHook("beforeMount")}).on("beforeUnmount",function(){return e.invokeHook("beforeUnmount")}).on("mounted",function(){return e.invokeHook("mounted")}).on("unmounted",function(){return e.invokeHook("unmounted")}),e}).then(function(){return e.isMounted()?e.invokeHook("beforeMount").then(function(){return e.invokeHook("mounted")}):e.invokeHook("beforeUnmount").then(function(){return e.invokeHook("unmounted")}),e})},e.prototype.onBeforeMount=function(){return Promise.resolve(this)},e.prototype.onMounted=function(){return Promise.resolve(this)},e.prototype.onBeforeUnmount=function(){return Promise.resolve(this)},e.prototype.onUnmounted=function(){return Promise.resolve(this)},e.prototype.isMounted=function(){return this.getRuntime().getWidget().isMounted()},e.prototype.createRuntime=function(){return new PluginExtensionWidgetRuntime(this)},e.prototype.getRuntime=function(){return void 0===this.pluginRuntime&&(this.pluginRuntime=this.createRuntime()),this.pluginRuntime},e}(vlWidgetPlugin.PluginBase),UIPluginExtensionBase=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},t.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},t.prototype.onReady=function(){var t=this;return e.prototype.onReady.call(this).then(function(){return t.attachComponentRoot()})},t}(PluginExtensionBase),ExtensiblePluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.createExtensionManager=function(){return new DefaultPluginExtensionManager(this)},e.prototype.onReady=function(){var e=this;return t.prototype.onReady.call(this).then(function(){return e.addEventBroadcast(function(t){return e.getPluginHost().emit(t.prefix(e.getPluginId()))})}).then(function(){return e.getRuntime().getWidget().on("beforeMount",function(){return e.invokeHook("beforeMount")}).on("beforeUnmount",function(){return e.invokeHook("beforeUnmount")}).on("mounted",function(){return e.invokeHook("mounted")}).on("unmounted",function(){return e.invokeHook("unmounted")}),e}).then(function(){return e.isMounted()?e.invokeHook("beforeMount").then(function(){return e.invokeHook("mounted")}):e.invokeHook("beforeUnmount").then(function(){return e.invokeHook("unmounted")}),e})},e.prototype.onBeforeMount=function(){return Promise.resolve(this)},e.prototype.onMounted=function(){return Promise.resolve(this)},e.prototype.onBeforeUnmount=function(){return Promise.resolve(this)},e.prototype.onUnmounted=function(){return Promise.resolve(this)},e.prototype.isMounted=function(){return this.getRuntime().getWidget().isMounted()},e.prototype.createRuntime=function(){return new PluginExtensionWidgetRuntime(this)},e.prototype.getRuntime=function(){return void 0===this.pluginRuntime&&(this.pluginRuntime=this.createRuntime()),this.pluginRuntime},e}(vlWidgetPlugin.ExtensiblePluginBase),ExtensibleUIPluginExtensionBase=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},t.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},t.prototype.onReady=function(){var t=this;return e.prototype.onReady.call(this).then(function(){return t.attachComponentRoot()})},t}(ExtensiblePluginExtensionBase),WidgetBase=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.onReady=function(){var e=this;return n.prototype.onReady.call(this).then(function(){return e.addEventBroadcast(function(t){return e.getPluginHost().emit(t.prefix("vl.widget."+e.getPluginTypeId()))})})},t.prototype.onBeforeMount=function(){return Promise.resolve(this)},t.prototype.onMounted=function(){return Promise.resolve(this)},t.prototype.onBeforeUnmount=function(){return Promise.resolve(this)},t.prototype.onUnmounted=function(){return Promise.resolve(this)},t.prototype.validatePluginContext=function(t){if(n.prototype.validatePluginContext.call(this,t),"string"!=typeof t.id)throw new vlWidgetPlugin.PluginError(this,'Context property "id" should be a string');if(t.extensions&&!Array.isArray(t.extensions))throw new vlWidgetPlugin.PluginError(this,'Context property "extensions" should be an array')},t.prototype.resolveExtensionContexts=function(t){var e=this;return Promise.resolve().then(function(){switch(t){case vlWidgetPlugin.PluginExtensionConstraint.Optional:return e.getPluginContext().extensions||[];default:return[]}})},t.prototype.createExtensionManager=function(){return new DefaultPluginExtensionManager(this)},t.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},t.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},t.prototype.createAssetManager=function(){if(this.getRuntime().getEnvironment()!==exports.PlatformRuntimeEnvironment.Browser)throw new vlWidgetUtility.Error.RuntimeError("Asset manager requires a browser runtime");return new DefaultAssetManager(window.document)},t.prototype.getAssetManager=function(){return void 0===this.assetManager&&(this.assetManager=this.createAssetManager()),this.assetManager},t.prototype.getPluginId=function(){return this.getPluginContext().id},t.prototype.createRuntime=function(){return new DefaultWidgetRuntime(this)},t.prototype.getRuntime=function(){return void 0===this.widgetRuntime&&(this.widgetRuntime=this.createRuntime()),this.widgetRuntime},t.prototype.getElement=function(){var t=this.getComponentRoot(),e=t.$el||null;if(null===e&&(t.$mount(),e=t.$el||null),null===e)throw new vlWidgetPlugin.PluginError(this,"Cannot resolve widget element");return e},t.prototype.getCurrentMountElement=function(){return this.currentMountElement||null},t.prototype.getMountElement=function(){return this.mountElement||null},t.prototype.setMountElement=function(t){return t!==this.getMountElement()&&(this.mountElement=t||void 0),this},t.prototype.isMounted=function(){return null!==this.getCurrentMountElement()},t.prototype.mount=function(){var n=this;return Promise.resolve().then(function(){var e=n.getMountElement();return n.isMounted()||null===e?n:n.invokeHook("beforeMount").then(function(){return n.getAssetManager().mount()}).then(function(){var t=n.getElement();return n.currentMountElement=vlWidgetUtility.Browser.DOM.replaceWith(e,t),n.getComponentRoot().$forceUpdate(),n.invokeHook("mounted")})})},t.prototype.unmount=function(){var e=this;return Promise.resolve().then(function(){var t=e.getCurrentMountElement();return e.isMounted()&&null!==t?e.invokeHook("beforeUnmount").then(function(){return vlWidgetUtility.Browser.DOM.replaceWith(e.getElement(),t),e.currentMountElement=void 0,e.invokeHook("unmounted")}).then(function(){return e.getAssetManager().unmount().then(function(){return e})}):e})},t.prototype.remount=function(){var t=this;return this.unmount().then(function(){return t.mount()})},t}(vlWidgetPlugin.ExtensiblePluginBase);function registerPluginContextProcessor(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginContextProcessorFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Plugin context processor registration should contain the following properties: pluginTypeId and pluginContextProcessorFactory");e.getServiceContainer().bind(PLUGIN_CONTEXT_PROCESSOR_SERVICE).to(t.pluginContextProcessorFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}function registerPluginExtension(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Plugin extension registration should contain the following properties: pluginTypeId and pluginFactory");e.getServiceContainer().bind(PLUGIN_EXTENSION_FACTORY_SERVICE).to(t.pluginFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}function registerWidget(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Widget registration should contain the following properties: pluginTypeId and pluginFactory");e.getServiceContainer().bind(WIDGET_FACTORY_SERVICE).to(t.pluginFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}!function(t){t.Unknown="unknown",t.Browser="browser",t.WebWorker="webworker",t.Server="server"}(exports.PlatformRuntimeEnvironment||(exports.PlatformRuntimeEnvironment={}));var WidgetRuntimeBase=function(){function t(){}return t.prototype.createServiceContainer=function(){var t=new vlWidgetDependencyInjection.DefaultServiceContainer;return t.bind("platform.runtime").toConstantValue(this),t.bind("plugin").toConstantValue(this.getPlugin()),t.bind("widget").toConstantValue(this.getWidget()),t},t.prototype.getServiceContainer=function(){return void 0===this.serviceContainer&&(this.serviceContainer=this.createServiceContainer(),this.linkServiceContainer(this.serviceContainer)),this.serviceContainer},t.prototype.getVersion=function(){return this.getWidget().getPluginHost().getVersion()},t.prototype.emit=function(t){return this.getWidget().getPluginHost().emit(t)},t.prototype.on=function(t,e){return this.getWidget().getPluginHost().on(t,e),this},t.prototype.off=function(t,e){return this.getWidget().getPluginHost().off(t,e),this},t.prototype.once=function(t,e){return this.getWidget().getPluginHost().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getWidget().getPluginHost().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getWidget().getPluginHost().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getWidget().getPluginHost().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getWidget().getPluginHost().removeEventBroadcast(t),this},t.prototype.getEventBroadcast=function(){return this.getWidget().getPluginHost().getEventBroadcast()},t.prototype.getModuleManager=function(){return this.getWidget().getPluginHost().getModuleManager()},t.prototype.getWidgetManager=function(){return this.getWidget().getPluginHost().getWidgetManager()},t.prototype.capture=function(t,e){return this.getWidget().getPluginHost().capture(t,e)},t.prototype.getEnvironment=function(){return this.getWidget().getPluginHost().getEnvironment()},t.prototype.getConfiguration=function(){return this.getWidget().getPluginHost().getConfiguration()},t.prototype.bootstrap=function(t){return this.getWidget().getPluginHost().bootstrap(t)},t.prototype.register=function(t){return this.getWidget().getPluginHost().register(t)},t}(),DefaultWidgetRuntime=function(n){function t(t){var e=n.call(this)||this;return e.widget=t,e}return __extends(t,n),t.prototype.getPlugin=function(){return this.getWidget()},t.prototype.linkServiceContainer=function(t){t.parent=this.getWidget().getPluginHost().getServiceContainer()},t.prototype.getWidget=function(){return this.widget},t}(WidgetRuntimeBase),PluginExtensionWidgetRuntime=function(n){function t(t){var e=n.call(this)||this;return e.pluginExtension=t,e}return __extends(t,n),t.prototype.linkServiceContainer=function(t){t.parent=this.getWidget().getRuntime().getServiceContainer()},t.prototype.getPlugin=function(){return this.pluginExtension},t.prototype.getWidget=function(){return this.getPlugin().getPluginHost().getRuntime().getWidget()},t}(WidgetRuntimeBase),PlatformRuntimeBase=function(){function t(t){this.moduleLoader=t,this.widgetCaptureQueue=[],this.initialize()}return t.prototype.initialize=function(){var i=this;this.on("vl.widget.created",function(r){vlWidgetUtility.Utility.nextTick(function(){for(var n=r.getSender(),t=function(e){vlWidgetUtility.Utility.nextTick(function(){var t="function"==typeof e.filter?e.filter:null;null!==t&&!t(n)||e.callback(n)})},e=0,o=i.widgetCaptureQueue;e<o.length;e++){t(o[e])}})})},t.prototype.createEventEmitter=function(){return new vlWidgetEvent.DefaultEventEmitter},t.prototype.getEventEmitter=function(){return void 0===this.eventEmitter&&(this.eventEmitter=this.createEventEmitter()),this.eventEmitter},t.prototype.emit=function(t){return this.getEventEmitter().emit(t)},t.prototype.on=function(t,e){return this.getEventEmitter().on(t,e),this},t.prototype.off=function(t,e){return this.getEventEmitter().off(t,e),this},t.prototype.once=function(t,e){return this.getEventEmitter().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getEventEmitter().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getEventEmitter().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getEventEmitter().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getEventEmitter().removeEventBroadcast(t),this},t.prototype.getEventBroadcast=function(){return this.getEventEmitter().getEventBroadcast()},t.prototype.createModuleManager=function(t){return new vlWidgetModule.DefaultModuleManager(t,this)},t.prototype.getModuleManager=function(){return void 0===this.moduleManager&&(this.moduleManager=this.createModuleManager(this.moduleLoader)),this.moduleManager},t.prototype.createServiceContainer=function(){return new vlWidgetDependencyInjection.DefaultServiceContainer},t.prototype.getServiceContainer=function(){return void 0===this.serviceContainer&&(this.serviceContainer=this.createServiceContainer()),this.serviceContainer},t.prototype.createWidgetManager=function(){return new DefaultWidgetManager(this)},t.prototype.getWidgetManager=function(){return void 0===this.widgetManager&&(this.widgetManager=this.createWidgetManager()),this.widgetManager},t.prototype.bootstrap=function(t){return this.getWidgetManager().createPluginInstance(t)},t.prototype.capture=function(o,r){var i=this;vlWidgetUtility.Utility.nextTick(function(){i.widgetCaptureQueue.push({callback:o,filter:r});for(var t=0,e=i.getWidgetManager().list(r);t<e.length;t++){var n=e[t];o(n)}})},t.prototype.getEnvironment=function(){return vlWidgetUtility.Environment.isBrowser()?exports.PlatformRuntimeEnvironment.Browser:vlWidgetUtility.Environment.isWebWorker()?exports.PlatformRuntimeEnvironment.WebWorker:vlWidgetUtility.Environment.isServer()?exports.PlatformRuntimeEnvironment.Server:exports.PlatformRuntimeEnvironment.Unknown},t.prototype.register=function(t){var e=this;return Promise.resolve().then(function(){switch(t.type){case exports.PlatformRegistrationType.PluginContextProcessor:registerPluginContextProcessor(t,e);break;case exports.PlatformRegistrationType.PluginExtension:registerPluginExtension(t,e);break;case exports.PlatformRegistrationType.Widget:registerWidget(t,e);break;default:throw new vlWidgetUtility.Error.InvalidArgumentError('Registration type "'+t.type+'" is invalid')}})},t}(),PluginStore=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.$widget=function(){var t=this.$plugin().getRuntime();if("function"!=typeof t.getWidget)throw new vlWidgetUtility.Error.RuntimeError("Plugin does not have a valid widget runtime");return t.getWidget()},e}(vlWidgetRenderEngine.PluginStore);Vue.use({install:function(t){t.mixin({beforeCreate:function(){var e=this;void 0===this.$widget&&(this.$widget=function(){var t=e.$plugin().getRuntime();if("function"!=typeof t.getWidget)throw new vlWidgetUtility.Error.RuntimeError("Plugin does not have a valid widget runtime");return t.getWidget()})}})}}),exports.AssetBase=AssetBase,exports.AssetManagerBase=AssetManagerBase,exports.DefaultAssetManager=DefaultAssetManager,exports.DefaultPluginContextPipeline=DefaultPluginContextPipeline,exports.DefaultPluginContextProcessorDiscovery=DefaultPluginContextProcessorDiscovery,exports.DefaultPluginExtensionContextProcessor=DefaultPluginExtensionContextProcessor,exports.DefaultPluginExtensionContextProcessorFactory=DefaultPluginExtensionContextProcessorFactory,exports.DefaultPluginExtensionDiscovery=DefaultPluginExtensionDiscovery,exports.DefaultPluginExtensionManager=DefaultPluginExtensionManager,exports.DefaultScriptAsset=DefaultScriptAsset,exports.DefaultStyleSheetAsset=DefaultStyleSheetAsset,exports.DefaultWidgetContextProcessor=DefaultWidgetContextProcessor,exports.DefaultWidgetContextProcessorFactory=DefaultWidgetContextProcessorFactory,exports.DefaultWidgetDiscovery=DefaultWidgetDiscovery,exports.DefaultWidgetManager=DefaultWidgetManager,exports.DefaultWidgetRuntime=DefaultWidgetRuntime,exports.ExtensiblePluginExtensionBase=ExtensiblePluginExtensionBase,exports.ExtensibleUIPluginExtensionBase=ExtensibleUIPluginExtensionBase,exports.PLUGIN_CONTEXT_PROCESSOR_SERVICE=PLUGIN_CONTEXT_PROCESSOR_SERVICE,exports.PLUGIN_EXTENSION_FACTORY_SERVICE=PLUGIN_EXTENSION_FACTORY_SERVICE,exports.PlatformRuntimeBase=PlatformRuntimeBase,exports.PlatformRuntimeConfigBase=PlatformRuntimeConfigBase,exports.PluginExtensionBase=PluginExtensionBase,exports.PluginExtensionContextProcessorBase=PluginExtensionContextProcessorBase,exports.PluginExtensionWidgetRuntime=PluginExtensionWidgetRuntime,exports.PluginStore=PluginStore,exports.UIPluginExtensionBase=UIPluginExtensionBase,exports.WIDGET_FACTORY_SERVICE=WIDGET_FACTORY_SERVICE,exports.WidgetBase=WidgetBase,exports.WidgetContextProcessorBase=WidgetContextProcessorBase,exports.WidgetRuntimeBase=WidgetRuntimeBase,exports.registerPluginContextProcessor=registerPluginContextProcessor,exports.registerPluginExtension=registerPluginExtension,exports.registerWidget=registerWidget;
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var Vue=_interopDefault(require("vue")),vlWidgetUtility=require("@govflanders/vl-widget-utility"),vlWidgetPlugin=require("@govflanders/vl-widget-plugin"),vlWidgetDependencyInjection=require("@govflanders/vl-widget-dependency-injection"),vlWidgetEvent=require("@govflanders/vl-widget-event"),vlWidgetModule=require("@govflanders/vl-widget-module"),vlWidgetRenderEngine=require("@govflanders/vl-widget-render-engine"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function __decorate(t,e,n,r){var o,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(u=(i<3?o(u):i>3?o(e,n,u):o(e,n))||u);return i>3&&u&&Object.defineProperty(e,n,u),u}function __metadata(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function __awaiter(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,s)}a((r=r.apply(t,e||[])).next())})}function __generator(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}!function(t){t.StyleSheet="stylesheet",t.Script="script"}(exports.AssetType||(exports.AssetType={}));var AssetBase=function(){function t(t,e){this.options=t,this.document=e}return t.prototype.getDocument=function(){return this.document},t.prototype.getMountElement=function(){return this.getDocument().head},t.prototype.getOptions=function(){return this.options},t.prototype.isMounted=function(){return!!this.element&&!!this.element.parentNode},t.prototype.mount=function(){return __awaiter(this,void 0,void 0,function(){var t=this;return __generator(this,function(e){return this.isMounted()?[2]:[2,this.createElement().then(function(e){return new Promise(function(n,r){t.element=e;var o=function t(){e.removeEventListener("load",t),e.removeEventListener("error",i),n()},i=function n(){e.removeEventListener("load",o),e.removeEventListener("error",n);var i=new vlWidgetUtility.Error.RuntimeError("Asset "+t.getType()+" failed to resolve");t.unmount().then(function(){return r(i)}).catch(function(){return r(i)})};e.addEventListener("load",o),e.removeEventListener("error",i),vlWidgetUtility.Browser.DOM.mount(e,t.getMountElement()),t.getOptions().reference||o()})})]})})},t.prototype.unmount=function(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){return this.isMounted()&&((t=this.element)&&vlWidgetUtility.Browser.DOM.unmount(t),this.element=void 0),[2]})})},t.prototype.remount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,this.unmount()];case 1:return t.sent(),[4,this.mount()];case 2:return t.sent(),[2]}})})},t}(),DefaultScriptAsset=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getMountElement=function(){return this.getDocument().body},e.prototype.createElement=function(){return __awaiter(this,void 0,void 0,function(){var t,e,n;return __generator(this,function(r){return t=this.getOptions(),e=this.getDocument(),n=e.createElement("script"),(t.attributes||[]).forEach(function(t){n.setAttribute(t.name,""+t.value)}),n.setAttribute("type",t.type||"text/javascript"),t.reference?n.setAttribute("src",t.value):vlWidgetUtility.Browser.DOM.mount(e.createTextNode(t.value),n),[2,n]})})},e.prototype.getType=function(){return exports.AssetType.Script},e}(AssetBase),DefaultStyleSheetAsset=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.createElement=function(){return __awaiter(this,void 0,void 0,function(){var t,e,n;return __generator(this,function(r){return t=this.getOptions(),e=this.getDocument(),n=e.createElement(t.reference?"link":"style"),(t.attributes||[]).forEach(function(t){n.setAttribute(t.name,""+t.value)}),n.setAttribute("type",t.type||"text/css"),t.reference?(n.setAttribute("rel","stylesheet"),n.setAttribute("href",t.value)):vlWidgetUtility.Browser.DOM.mount(e.createTextNode(t.value),n),[2,n]})})},e.prototype.getType=function(){return exports.AssetType.StyleSheet},e}(AssetBase),AssetManagerBase=function(){function t(){this.mounted=!1,this.assets=[]}return t.prototype.has=function(t){return this.assets.findIndex(function(e){return e===t})>-1},t.prototype.add=function(t){for(var e=0,n=Array.isArray(t)?t:[t];e<n.length;e++){var r=n[e];this.has(r)||(this.assets.push(r),this.isMounted()&&r.mount())}return this},t.prototype.remove=function(t){for(var e=Array.isArray(t)?t:[t],n=function(t){var e=r.assets.findIndex(function(e){return e===t});e>-1&&(r.assets=r.assets.slice(e,1),t.unmount())},r=this,o=0,i=e;o<i.length;o++){n(i[o])}return this},t.prototype.list=function(t){return t?this.assets.filter(t):this.assets.concat()},t.prototype.isMounted=function(){return this.mounted},t.prototype.mount=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return this.mounted=!0,e=[],this.list(t).forEach(function(t){e.push(t.mount())}),[4,Promise.all(e)];case 1:return n.sent(),[2]}})})},t.prototype.unmount=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return e=[],this.list(t).forEach(function(t){e.push(t.mount())}),[4,Promise.all(e)];case 1:return n.sent(),this.mounted=!1,[2]}})})},t.prototype.remount=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return this.mounted=!0,e=[],this.list(t).forEach(function(t){e.push(t.remount())}),[4,Promise.all(e)];case 1:return n.sent(),[2]}})})},t}(),DefaultAssetManager=function(t){function e(e){var n=t.call(this)||this;return n.document=e,n}return __extends(e,t),e.prototype.getDocument=function(){return this.document},e.prototype.create=function(t,e){var n=this.getDocument();switch(t){case exports.AssetType.Script:return new DefaultScriptAsset(e,n);case exports.AssetType.StyleSheet:return new DefaultStyleSheetAsset(e,n);default:throw new vlWidgetUtility.Error.InvalidArgumentError('Asset type "'+t+'" is invalid')}},e}(AssetManagerBase);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var PlatformRuntimeConfigBase=function(){function t(){}return t.prototype.getBoolean=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"boolean":return n;case"string":return"true"===n;default:return!!n}},t.prototype.getString=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"string":return n;default:return""+n}},t.prototype.getInteger=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"number":return n;default:return parseInt(n,10)}},t.prototype.getFloat=function(t,e){var n=this.get(t,e);switch(_typeof(n)){case"number":return n;default:return parseFloat(n)}},t}();!function(t){t.PluginContextProcessor="plugin.context.processor",t.PluginExtension="plugin.extension",t.Widget="widget"}(exports.PlatformRegistrationType||(exports.PlatformRegistrationType={}));var PLUGIN_CONTEXT_PROCESSOR_SERVICE="plugin.context.processor",DefaultPluginContextProcessorDiscovery=function(t){function e(e,n){return t.call(this,e,n,PLUGIN_CONTEXT_PROCESSOR_SERVICE)||this}return __extends(e,t),e}(vlWidgetPlugin.ModulePluginContextProcessorDiscovery),WidgetContextProcessorBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getPluginExtensionContexts=function(t,e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,t.extensions||[]]})})},e.prototype.onPostProcess=function(e,n){return __awaiter(this,void 0,void 0,function(){var r,o,i,u,s,a,c,l;return __generator(this,function(g){switch(g.label){case 0:return[4,t.prototype.onPostProcess.call(this,e,n)];case 1:return r=g.sent(),[4,this.getPluginExtensionContexts(r,n)];case 2:if(!((o=g.sent()).length>0))return[3,9];i=[],u=0,s=o,g.label=3;case 3:if(!(u<s.length))return[3,8];a=s[u],g.label=4;case 4:return g.trys.push([4,6,,7]),[4,n.process(a)];case 5:return c=g.sent(),i.push(c),[3,7];case 6:return l=g.sent(),console.error('Failed to perform plugin context post processing on "'+e.id+'": '+l.message),[3,7];case 7:return u++,[3,3];case 8:return r.extensions=i,[3,10];case 9:r.extensions=[],g.label=10;case 10:return[2,r]}})})},e}(vlWidgetPlugin.PluginContextProcessorBase),DefaultWidgetContextProcessor=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(WidgetContextProcessorBase),PluginExtensionContextProcessorBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(vlWidgetPlugin.PluginContextProcessorBase),DefaultPluginExtensionContextProcessor=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginExtensionContextProcessorBase),DefaultWidgetContextProcessorFactory=function(){function t(){}return t.prototype.createPluginContextProcessor=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,new DefaultWidgetContextProcessor]})})},t=__decorate([vlWidgetDependencyInjection.injectable()],t)}(),DefaultPluginExtensionContextProcessorFactory=function(){function t(){}return t.prototype.createPluginContextProcessor=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,new DefaultPluginExtensionContextProcessor]})})},t=__decorate([vlWidgetDependencyInjection.injectable()],t)}(),DefaultPluginContextPipeline=function(t){function e(e,n){var r=t.call(this,n)||this;return r.moduleManager=e,r}return __extends(e,t),e.prototype.getModuleManager=function(){return this.moduleManager},e.prototype.process=function(e){return __awaiter(this,void 0,void 0,function(){var n,r;return __generator(this,function(o){switch(o.label){case 0:return n=this.getModuleManager(),[4,vlWidgetPlugin.installPluginContext(n,e)];case 1:return r=o.sent(),[2,t.prototype.process.call(this,r)]}})})},e=__decorate([vlWidgetDependencyInjection.injectable(),__metadata("design:paramtypes",[Object,Object])],e)}(vlWidgetPlugin.PluginContextPipelineBase),WIDGET_FACTORY_SERVICE="widget.factory",DefaultWidgetDiscovery=function(t){function e(e){return t.call(this,e.getModuleManager(),e.getServiceContainer(),WIDGET_FACTORY_SERVICE)||this}return __extends(e,t),e}(vlWidgetPlugin.ModulePluginDiscovery),PLUGIN_EXTENSION_FACTORY_SERVICE="plugin.extension.factory",DefaultPluginExtensionDiscovery=function(t){function e(e){var n=e.getRuntime();return t.call(this,n.getModuleManager(),n.getServiceContainer(),PLUGIN_EXTENSION_FACTORY_SERVICE)||this}return __extends(e,t),e}(vlWidgetPlugin.ModulePluginDiscovery),DefaultWidgetManager=function(t){function e(e){return t.call(this,e,new DefaultWidgetDiscovery(e))||this}return __extends(e,t),e.prototype.createPluginInstance=function(e){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){switch(r.label){case 0:return[4,t.prototype.createPluginInstance.call(this,e)];case 1:return(n=r.sent()).getRuntime().emit(new vlWidgetPlugin.GenericPluginEvent("vl.widget.created",n)),[2,n]}})})},e.prototype.mount=function(t){var e=this;return this.each(function(n){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return t&&!t(n)?[3,2]:[4,n.mount()];case 1:e.sent(),e.label=2;case 2:return[2,n]}})})})},e.prototype.unmount=function(t){var e=this;return this.each(function(n){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return t&&!t(n)?[3,2]:[4,n.unmount()];case 1:e.sent(),e.label=2;case 2:return[2,n]}})})})},e.prototype.remount=function(t){var e=this;return this.each(function(n){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return t&&!t(n)?[3,2]:[4,n.remount()];case 1:e.sent(),e.label=2;case 2:return[2,n]}})})})},e}(vlWidgetPlugin.PluginManagerBase),DefaultPluginExtensionManager=function(t){function e(e){return t.call(this,e,new DefaultPluginExtensionDiscovery(e))||this}return __extends(e,t),e}(vlWidgetPlugin.PluginExtensionManagerBase),PluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return n.sent(),this.addEventBroadcast(function(t){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,this.getPluginHost().emit(t.prefix(this.getPluginId()))];case 1:return e.sent(),[2]}})})}),this.getRuntime().getWidget().on("beforeMount",function(){return e.invokeHook("beforeMount")}).on("beforeUnmount",function(){return e.invokeHook("beforeUnmount")}).on("mounted",function(){return e.invokeHook("mounted")}).on("unmounted",function(){return e.invokeHook("unmounted")}),this.isMounted()?[4,this.invokeHook("beforeMount").then(function(){return e.invokeHook("mounted")})]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,this.invokeHook("beforeUnmount").then(function(){return e.invokeHook("unmounted")})];case 4:n.sent(),n.label=5;case 5:return[2]}})})},e.prototype.onBeforeMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onMounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onBeforeUnmount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onUnmounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.isMounted=function(){return this.getRuntime().getWidget().isMounted()},e.prototype.createRuntime=function(){return new PluginExtensionWidgetRuntime(this)},e.prototype.getRuntime=function(){return void 0===this.pluginRuntime&&(this.pluginRuntime=this.createRuntime()),this.pluginRuntime},e}(vlWidgetPlugin.PluginBase),UIPluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},e.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return e.sent(),[4,this.attachComponentRoot()];case 2:return e.sent(),[2]}})})},e}(PluginExtensionBase),ExtensiblePluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.createExtensionManager=function(){return new DefaultPluginExtensionManager(this)},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return n.sent(),this.addEventBroadcast(function(t){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,this.getPluginHost().emit(t.prefix(this.getPluginId()))];case 1:return e.sent(),[2]}})})}),this.getRuntime().getWidget().on("beforeMount",function(){return e.invokeHook("beforeMount")}).on("beforeUnmount",function(){return e.invokeHook("beforeUnmount")}).on("mounted",function(){return e.invokeHook("mounted")}).on("unmounted",function(){return e.invokeHook("unmounted")}),this.isMounted()?[4,this.invokeHook("beforeMount").then(function(){return e.invokeHook("mounted")})]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,this.invokeHook("beforeUnmount").then(function(){return e.invokeHook("unmounted")})];case 4:n.sent(),n.label=5;case 5:return[2]}})})},e.prototype.onBeforeMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onMounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onBeforeUnmount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onUnmounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.isMounted=function(){return this.getRuntime().getWidget().isMounted()},e.prototype.createRuntime=function(){return new PluginExtensionWidgetRuntime(this)},e.prototype.getRuntime=function(){return void 0===this.pluginRuntime&&(this.pluginRuntime=this.createRuntime()),this.pluginRuntime},e}(vlWidgetPlugin.ExtensiblePluginBase),ExtensibleUIPluginExtensionBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},e.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return e.sent(),[4,this.attachComponentRoot()];case 2:return e.sent(),[2]}})})},e}(ExtensiblePluginExtensionBase),WidgetBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return n.sent(),this.addEventBroadcast(function(t){return __awaiter(e,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,this.getPluginHost().emit(t.prefix("vl.widget."+this.getPluginTypeId()))];case 1:return e.sent(),[2]}})})}),[2]}})})},e.prototype.onBeforeMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,this.getAssetManager().mount()];case 1:return t.sent(),[2]}})})},e.prototype.onMounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onBeforeUnmount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onUnmounted=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,this.getAssetManager().unmount()];case 1:return t.sent(),[2]}})})},e.prototype.validatePluginContext=function(e){if(t.prototype.validatePluginContext.call(this,e),"string"!=typeof e.id)throw new vlWidgetPlugin.PluginError(this,'Context property "id" should be a string');if(e.extensions&&!Array.isArray(e.extensions))throw new vlWidgetPlugin.PluginError(this,'Context property "extensions" should be an array')},e.prototype.resolveExtensionContexts=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(t){case vlWidgetPlugin.PluginExtensionConstraint.Optional:return[2,this.getPluginContext().extensions||[]];default:return[2,[]]}return[2]})})},e.prototype.createExtensionManager=function(){return new DefaultPluginExtensionManager(this)},e.prototype.getComponentRoot=function(){return void 0===this.componentRoot&&(this.componentRoot=this.createComponentRoot()),this.componentRoot},e.prototype.getComponentStore=function(){return void 0===this.componentStore&&(this.componentStore=this.createComponentStore()),this.componentStore},e.prototype.createAssetManager=function(){if(this.getRuntime().getEnvironment()!==exports.PlatformRuntimeEnvironment.Browser)throw new vlWidgetUtility.Error.RuntimeError("Asset manager requires a browser runtime");return new DefaultAssetManager(window.document)},e.prototype.getAssetManager=function(){return void 0===this.assetManager&&(this.assetManager=this.createAssetManager()),this.assetManager},e.prototype.getPluginId=function(){return this.getPluginContext().id},e.prototype.createRuntime=function(){return new DefaultWidgetRuntime(this)},e.prototype.getRuntime=function(){return void 0===this.widgetRuntime&&(this.widgetRuntime=this.createRuntime()),this.widgetRuntime},e.prototype.getElement=function(){var t=this.getComponentRoot(),e=t.$el||null;if(null===e&&(t.$mount(),e=t.$el||null),null===e)throw new vlWidgetPlugin.PluginError(this,"Cannot resolve widget element");return e},e.prototype.getCurrentMountElement=function(){return this.currentMountElement||null},e.prototype.getMountElement=function(){return this.mountElement||null},e.prototype.setMountElement=function(t){return t!==this.getMountElement()&&(this.mountElement=t||void 0),this},e.prototype.isMounted=function(){return null!==this.getCurrentMountElement()},e.prototype.mount=function(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=this.getMountElement(),this.isMounted()||null===t?[3,3]:[4,this.invokeHook("beforeMount")];case 1:return e.sent(),this.currentMountElement=vlWidgetUtility.Browser.DOM.replaceWith(t,this.getElement()),this.getComponentRoot().$forceUpdate(),[4,this.invokeHook("mounted")];case 2:e.sent(),e.label=3;case 3:return[2]}})})},e.prototype.unmount=function(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=this.getCurrentMountElement(),this.isMounted()&&null!==t?[4,this.invokeHook("beforeUnmount")]:[3,3];case 1:return e.sent(),vlWidgetUtility.Browser.DOM.replaceWith(this.getElement(),t),this.currentMountElement=void 0,[4,this.invokeHook("unmounted")];case 2:e.sent(),e.label=3;case 3:return[2]}})})},e.prototype.remount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,this.unmount()];case 1:return t.sent(),[4,this.mount()];case 2:return t.sent(),[2]}})})},e}(vlWidgetPlugin.ExtensiblePluginBase);function registerPluginContextProcessor(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginContextProcessorFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Plugin context processor registration should contain the following properties: pluginTypeId and pluginContextProcessorFactory");e.getServiceContainer().bind(PLUGIN_CONTEXT_PROCESSOR_SERVICE).to(t.pluginContextProcessorFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}function registerPluginExtension(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Plugin extension registration should contain the following properties: pluginTypeId and pluginFactory");e.getServiceContainer().bind(PLUGIN_EXTENSION_FACTORY_SERVICE).to(t.pluginFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}function registerWidget(t,e){if("string"!=typeof t.pluginTypeId||"function"!=typeof t.pluginFactory)throw new vlWidgetUtility.Error.InvalidArgumentError("Widget registration should contain the following properties: pluginTypeId and pluginFactory");e.getServiceContainer().bind(WIDGET_FACTORY_SERVICE).to(t.pluginFactory).inSingletonScope().whenTargetNamed(t.pluginTypeId)}!function(t){t.Unknown="unknown",t.Browser="browser",t.WebWorker="webworker",t.Server="server"}(exports.PlatformRuntimeEnvironment||(exports.PlatformRuntimeEnvironment={}));var WidgetRuntimeBase=function(){function t(){}return t.prototype.createServiceContainer=function(){var t=new vlWidgetDependencyInjection.DefaultServiceContainer;return t.bind("platform.runtime").toConstantValue(this),t.bind("plugin").toConstantValue(this.getPlugin()),t.bind("widget").toConstantValue(this.getWidget()),t},t.prototype.getServiceContainer=function(){return void 0===this.serviceContainer&&(this.serviceContainer=this.createServiceContainer(),this.linkServiceContainer(this.serviceContainer)),this.serviceContainer},t.prototype.getVersion=function(){return this.getWidget().getPluginHost().getVersion()},t.prototype.emit=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getWidget().getPluginHost().emit(t)]})})},t.prototype.on=function(t,e){return this.getWidget().getPluginHost().on(t,e),this},t.prototype.off=function(t,e){return this.getWidget().getPluginHost().off(t,e),this},t.prototype.once=function(t,e){return this.getWidget().getPluginHost().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getWidget().getPluginHost().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getWidget().getPluginHost().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getWidget().getPluginHost().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getWidget().getPluginHost().removeEventBroadcast(t),this},t.prototype.getEventBroadcast=function(){return this.getWidget().getPluginHost().getEventBroadcast()},t.prototype.getModuleManager=function(){return this.getWidget().getPluginHost().getModuleManager()},t.prototype.getWidgetManager=function(){return this.getWidget().getPluginHost().getWidgetManager()},t.prototype.capture=function(t,e){return this.getWidget().getPluginHost().capture(t,e)},t.prototype.getEnvironment=function(){return this.getWidget().getPluginHost().getEnvironment()},t.prototype.getConfiguration=function(){return this.getWidget().getPluginHost().getConfiguration()},t.prototype.bootstrap=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getWidget().getPluginHost().bootstrap(t)]})})},t.prototype.register=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getWidget().getPluginHost().register(t)]})})},t}(),DefaultWidgetRuntime=function(t){function e(e){var n=t.call(this)||this;return n.widget=e,n}return __extends(e,t),e.prototype.getPlugin=function(){return this.getWidget()},e.prototype.linkServiceContainer=function(t){t.parent=this.getWidget().getPluginHost().getServiceContainer()},e.prototype.getWidget=function(){return this.widget},e}(WidgetRuntimeBase),PluginExtensionWidgetRuntime=function(t){function e(e){var n=t.call(this)||this;return n.pluginExtension=e,n}return __extends(e,t),e.prototype.linkServiceContainer=function(t){t.parent=this.getWidget().getRuntime().getServiceContainer()},e.prototype.getPlugin=function(){return this.pluginExtension},e.prototype.getWidget=function(){return this.getPlugin().getPluginHost().getRuntime().getWidget()},e}(WidgetRuntimeBase),PlatformRuntimeBase=function(){function t(t){this.moduleLoader=t,this.widgetCaptureQueue=[],this.initialize()}return t.prototype.initialize=function(){var t=this;this.on("vl.widget.created",function(e){return __awaiter(t,void 0,void 0,function(){var t=this;return __generator(this,function(n){return vlWidgetUtility.Utility.nextTick(function(){for(var n=e.getSender(),r=function(t){vlWidgetUtility.Utility.nextTick(function(){var e="function"==typeof t.filter?t.filter:null;(null===e||e(n))&&t.callback(n)})},o=0,i=t.widgetCaptureQueue;o<i.length;o++){r(i[o])}}),[2]})})})},t.prototype.createEventEmitter=function(){return new vlWidgetEvent.DefaultEventEmitter},t.prototype.getEventEmitter=function(){return void 0===this.eventEmitter&&(this.eventEmitter=this.createEventEmitter()),this.eventEmitter},t.prototype.emit=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getEventEmitter().emit(t)]})})},t.prototype.on=function(t,e){return this.getEventEmitter().on(t,e),this},t.prototype.off=function(t,e){return this.getEventEmitter().off(t,e),this},t.prototype.once=function(t,e){return this.getEventEmitter().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getEventEmitter().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getEventEmitter().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getEventEmitter().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getEventEmitter().removeEventBroadcast(t),this},t.prototype.getEventBroadcast=function(){return this.getEventEmitter().getEventBroadcast()},t.prototype.createModuleManager=function(t){return new vlWidgetModule.DefaultModuleManager(t,this)},t.prototype.getModuleManager=function(){return void 0===this.moduleManager&&(this.moduleManager=this.createModuleManager(this.moduleLoader)),this.moduleManager},t.prototype.createServiceContainer=function(){return new vlWidgetDependencyInjection.DefaultServiceContainer},t.prototype.getServiceContainer=function(){return void 0===this.serviceContainer&&(this.serviceContainer=this.createServiceContainer()),this.serviceContainer},t.prototype.createWidgetManager=function(){return new DefaultWidgetManager(this)},t.prototype.getWidgetManager=function(){return void 0===this.widgetManager&&(this.widgetManager=this.createWidgetManager()),this.widgetManager},t.prototype.bootstrap=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getWidgetManager().createPluginInstance(t)]})})},t.prototype.capture=function(t,e){var n=this;vlWidgetUtility.Utility.nextTick(function(){n.widgetCaptureQueue.push({callback:t,filter:e});for(var r=0,o=n.getWidgetManager().list(e);r<o.length;r++){var i=o[r];t(i)}})},t.prototype.getEnvironment=function(){return vlWidgetUtility.Environment.isBrowser()?exports.PlatformRuntimeEnvironment.Browser:vlWidgetUtility.Environment.isWebWorker()?exports.PlatformRuntimeEnvironment.WebWorker:vlWidgetUtility.Environment.isServer()?exports.PlatformRuntimeEnvironment.Server:exports.PlatformRuntimeEnvironment.Unknown},t.prototype.register=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(t.type){case exports.PlatformRegistrationType.PluginContextProcessor:registerPluginContextProcessor(t,this);break;case exports.PlatformRegistrationType.PluginExtension:registerPluginExtension(t,this);break;case exports.PlatformRegistrationType.Widget:registerWidget(t,this);break;default:throw new vlWidgetUtility.Error.InvalidArgumentError('Registration type "'+t.type+'" is invalid')}return[2]})})},t}(),PluginStore=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.$widget=function(){var t=this.$plugin().getRuntime();if("function"!=typeof t.getWidget)throw new vlWidgetUtility.Error.RuntimeError("Plugin does not have a valid widget runtime");return t.getWidget()},e}(vlWidgetRenderEngine.PluginStore);Vue.use({install:function(t){t.mixin({beforeCreate:function(){var t=this;void 0===this.$widget&&(this.$widget=function(){var e=t.$plugin().getRuntime();if("function"!=typeof e.getWidget)throw new vlWidgetUtility.Error.RuntimeError("Plugin does not have a valid widget runtime");return e.getWidget()})}})}}),exports.AssetBase=AssetBase,exports.AssetManagerBase=AssetManagerBase,exports.DefaultAssetManager=DefaultAssetManager,exports.DefaultPluginContextPipeline=DefaultPluginContextPipeline,exports.DefaultPluginContextProcessorDiscovery=DefaultPluginContextProcessorDiscovery,exports.DefaultPluginExtensionContextProcessor=DefaultPluginExtensionContextProcessor,exports.DefaultPluginExtensionContextProcessorFactory=DefaultPluginExtensionContextProcessorFactory,exports.DefaultPluginExtensionDiscovery=DefaultPluginExtensionDiscovery,exports.DefaultPluginExtensionManager=DefaultPluginExtensionManager,exports.DefaultScriptAsset=DefaultScriptAsset,exports.DefaultStyleSheetAsset=DefaultStyleSheetAsset,exports.DefaultWidgetContextProcessor=DefaultWidgetContextProcessor,exports.DefaultWidgetContextProcessorFactory=DefaultWidgetContextProcessorFactory,exports.DefaultWidgetDiscovery=DefaultWidgetDiscovery,exports.DefaultWidgetManager=DefaultWidgetManager,exports.DefaultWidgetRuntime=DefaultWidgetRuntime,exports.ExtensiblePluginExtensionBase=ExtensiblePluginExtensionBase,exports.ExtensibleUIPluginExtensionBase=ExtensibleUIPluginExtensionBase,exports.PLUGIN_CONTEXT_PROCESSOR_SERVICE=PLUGIN_CONTEXT_PROCESSOR_SERVICE,exports.PLUGIN_EXTENSION_FACTORY_SERVICE=PLUGIN_EXTENSION_FACTORY_SERVICE,exports.PlatformRuntimeBase=PlatformRuntimeBase,exports.PlatformRuntimeConfigBase=PlatformRuntimeConfigBase,exports.PluginExtensionBase=PluginExtensionBase,exports.PluginExtensionContextProcessorBase=PluginExtensionContextProcessorBase,exports.PluginExtensionWidgetRuntime=PluginExtensionWidgetRuntime,exports.PluginStore=PluginStore,exports.UIPluginExtensionBase=UIPluginExtensionBase,exports.WIDGET_FACTORY_SERVICE=WIDGET_FACTORY_SERVICE,exports.WidgetBase=WidgetBase,exports.WidgetContextProcessorBase=WidgetContextProcessorBase,exports.WidgetRuntimeBase=WidgetRuntimeBase,exports.registerPluginContextProcessor=registerPluginContextProcessor,exports.registerPluginExtension=registerPluginExtension,exports.registerWidget=registerWidget;
{
"name": "@govflanders/vl-widget-core",
"version": "1.2.2",
"version": "1.3.2-0",
"license": "MIT",

@@ -24,10 +24,11 @@ "contributors": [

"main": "dist/index.js",
"module": "dist/index.esm.js",
"typings": "types/index.d.ts",
"dependencies": {
"@govflanders/vl-widget-dependency-injection": "^1.2.2",
"@govflanders/vl-widget-event": "^1.2.2",
"@govflanders/vl-widget-module": "^1.2.2",
"@govflanders/vl-widget-plugin": "^1.2.2",
"@govflanders/vl-widget-render-engine": "^1.2.2",
"@govflanders/vl-widget-utility": "^1.2.2"
"@govflanders/vl-widget-dependency-injection": "^1.3.2-0",
"@govflanders/vl-widget-event": "^1.3.2-0",
"@govflanders/vl-widget-module": "^1.3.2-0",
"@govflanders/vl-widget-plugin": "^1.3.2-0",
"@govflanders/vl-widget-render-engine": "^1.3.2-0",
"@govflanders/vl-widget-utility": "^1.3.2-0"
},

@@ -34,0 +35,0 @@ "devDependencies": {

import { Asset, AssetOptions, AssetType } from './asset';
import { Mountable } from './mountable';
import { MountAware } from './mount-aware';
/**

@@ -12,3 +13,3 @@ * Interface which describes an asset filter.

*/
export interface AssetManager extends Mountable {
export interface AssetManager extends Mountable, MountAware {
/**

@@ -64,11 +65,11 @@ * Create an asset for given configuration.

*/
mount(filter?: AssetFilter): Promise<this>;
mount(filter?: AssetFilter): Promise<void>;
/**
* {@inheritdoc}
*/
unmount(filter?: AssetFilter): Promise<this>;
unmount(filter?: AssetFilter): Promise<void>;
/**
* {@inheritdoc}
*/
remount(filter?: AssetFilter): Promise<this>;
remount(filter?: AssetFilter): Promise<void>;
}

@@ -122,11 +123,11 @@ /**

*/
mount(filter?: AssetFilter): Promise<this>;
mount(filter?: AssetFilter): Promise<void>;
/**
* {@inheritdoc}
*/
unmount(filter?: AssetFilter): Promise<this>;
unmount(filter?: AssetFilter): Promise<void>;
/**
* {@inheritdoc}
*/
remount(filter?: AssetFilter): Promise<this>;
remount(filter?: AssetFilter): Promise<void>;
}

@@ -133,0 +134,0 @@ /**

import { Mountable } from './mountable';
import { MountAware } from './mount-aware';
/**

@@ -83,3 +84,3 @@ * Enumeration which holds the asset types.

*/
export interface Asset<AssetOptionsType extends AssetOptions = AssetOptions> extends Mountable {
export interface Asset<AssetOptionsType extends AssetOptions = AssetOptions> extends Mountable, MountAware {
/**

@@ -166,11 +167,11 @@ * Get the type of asset.

*/
mount(): Promise<this>;
mount(): Promise<void>;
/**
* {@inheritdoc}
*/
unmount(): Promise<this>;
unmount(): Promise<void>;
/**
* {@inheritdoc}
*/
remount(): Promise<this>;
remount(): Promise<void>;
}

@@ -177,0 +178,0 @@ /**

@@ -1,27 +0,26 @@

import { MountAware } from './mount-aware';
/**
* Interface which describes a mountable object.
*/
export interface Mountable extends MountAware {
export interface Mountable {
/**
* Mount this object.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to mount the object.
*/
mount(): Promise<this>;
mount(): Promise<void>;
/**
* Unmount this object.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to unmount the object.
*/
unmount(): Promise<this>;
unmount(): Promise<void>;
/**
* Remount this object.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to remount the object.
*/
remount(): Promise<this>;
remount(): Promise<void>;
}

@@ -25,19 +25,19 @@ import { Plugin, PluginBase, ExtensiblePluginBase, ExtensiblePlugin, PluginExtensionManager } from '@govflanders/vl-widget-plugin';

*/
protected onReady(): Promise<this>;
protected onReady(): Promise<void>;
/**
* Handle tasks before widget is mounted.
*/
protected onBeforeMount(): Promise<this>;
protected onBeforeMount(): Promise<void>;
/**
* Handle tasks when widget is mounted.
*/
protected onMounted(): Promise<this>;
protected onMounted(): Promise<void>;
/**
* Handle tasks before widget is unmounted.
*/
protected onBeforeUnmount(): Promise<this>;
protected onBeforeUnmount(): Promise<void>;
/**
* Handle tasks when widget is unmounted.
*/
protected onUnmounted(): Promise<this>;
protected onUnmounted(): Promise<void>;
/**

@@ -106,10 +106,10 @@ * {@inheritdoc}

*/
protected onReady(): Promise<this>;
protected onReady(): Promise<void>;
/**
* Attach the component root.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to attach the component root.
*/
protected abstract attachComponentRoot(): Promise<this>;
protected abstract attachComponentRoot(): Promise<void>;
}

@@ -138,19 +138,19 @@ /**

*/
protected onReady(): Promise<this>;
protected onReady(): Promise<void>;
/**
* Handle tasks before widget is mounted.
*/
protected onBeforeMount(): Promise<this>;
protected onBeforeMount(): Promise<void>;
/**
* Handle tasks when widget is mounted.
*/
protected onMounted(): Promise<this>;
protected onMounted(): Promise<void>;
/**
* Handle tasks before widget is unmounted.
*/
protected onBeforeUnmount(): Promise<this>;
protected onBeforeUnmount(): Promise<void>;
/**
* Handle tasks when widget is unmounted.
*/
protected onUnmounted(): Promise<this>;
protected onUnmounted(): Promise<void>;
/**

@@ -219,10 +219,10 @@ * {@inheritdoc}

*/
protected onReady(): Promise<this>;
protected onReady(): Promise<void>;
/**
* Attach the component root.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to attach the component root.
*/
protected abstract attachComponentRoot(): Promise<this>;
protected abstract attachComponentRoot(): Promise<void>;
}

@@ -56,31 +56,31 @@ import { ExtensiblePlugin, ExtensiblePluginBase, PluginExtensionManager, PluginExtensionConstraint, PluginContext } from '@govflanders/vl-widget-plugin';

*/
protected onReady(): Promise<this>;
protected onReady(): Promise<void>;
/**
* Handle task before mounting the widget.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to perform the task.
*/
protected onBeforeMount(): Promise<this>;
protected onBeforeMount(): Promise<void>;
/**
* Handle task mounting the widget.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to perform the task.
*/
protected onMounted(): Promise<this>;
protected onMounted(): Promise<void>;
/**
* Handle task before unmounting the widget.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to perform the task.
*/
protected onBeforeUnmount(): Promise<this>;
protected onBeforeUnmount(): Promise<void>;
/**
* Handle task unmounting the widget.
*
* @return {Promise<this>}
* @return {Promise<void>}
* A promise to perform the task.
*/
protected onUnmounted(): Promise<this>;
protected onUnmounted(): Promise<void>;
/**

@@ -175,11 +175,11 @@ * {@inheritdoc}

*/
mount(): Promise<this>;
mount(): Promise<void>;
/**
* {@inheritdoc}
*/
unmount(): Promise<this>;
unmount(): Promise<void>;
/**
* {@inheritdoc}
*/
remount(): Promise<this>;
remount(): Promise<void>;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc