ngx-golden-layout
Advanced tools
Comparing version 0.0.29 to 0.0.30
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("golden-layout"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-golden-layout",["exports","@angular/core","rxjs","golden-layout","rxjs/operators","@angular/common"],e):e((t=t||self)["ngx-golden-layout"]={},t.ng.core,t.rxjs,t.GoldenLayout,t.rxjs.operators,t.ng.common)}(this,function(t,e,n,o,i,r){"use strict";var a=function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r["return"])&&n.call(r)}finally{if(i)throw i.error}}return a}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(l(arguments[e]));return t}var u=new e.InjectionToken("ComponentTypes"),d=new e.InjectionToken("Dependencies"),p=function(){return function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}}();function h(){if(console.log("MultiWindowInit"),!window.opener&&(window.__services=new window.Map,window.__serviceConstructors=new window.Map,window.require)){var t=window.open.bind(window);window.open=function(e,n,o,i){var r=t(e,n,o,i);return r.require=window.require,r}}}function f(){return function(t){var e=t,n=window.opener||window;return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(!n.__services.has(e.name)){var i=n.__serviceConstructors.get(e.name)||e;n.__services.set(e.name,new(i.bind.apply(i,c([void 0],t))))}return n.__services.get(e.name)}}}var m=function(){function t(){this.loadedURLs=new Map,this.loads=new n.Subject,this.unloads=new n.Subject}return t.prototype.loadRequests$=function(){return this.loads},t.prototype.unloadRequests$=function(){return this.unloads},t.prototype.allPlugins=function(){return c(this.loadedURLs.entries()).map(function(t){return{id:t[0],url:t[1]}})},t.prototype.requestLoad=function(t,e){var n=this.loadedURLs.get(t);if(n){if(n!==e)throw new Error("Plugin "+t+" is already loaded with another URL")}else this.loadedURLs.set(t,e),this.loads.next({id:t,url:e})},t.prototype.requestUnload=function(t){if(!this.loadedURLs.get(t))throw new Error("Plugin "+t+" is not loaded");this.loadedURLs["delete"](t),this.unloads.next(t)},t.decorators=[{type:e.Injectable}],t=function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}([f()],t)}(),g=function(){function t(t,e,o){var i=this;void 0===t&&(t=[]),this.urlProvider=e,this.injector=o,this.availableDependencies=new Map,this.loadedPlugins=new Map,this.pluginLoaded$=new n.Subject,this.pluginUnloaded$=new n.Subject,console.log("Creating PluginRegistry, got",t.length,"additional dependency modules"),t.forEach(function(t){return i.availableDependencies.set(t.name,t.loader)}),this.patchWindow(),this.urlProvider.loadRequests$().subscribe(function(t){return i.load(t)}),this.urlProvider.allPlugins().forEach(function(t){return i.load(t)})}return t.prototype.startLoadPlugin=function(t,e){this.urlProvider.requestLoad(t,e)},t.prototype.startUnloadPlugin=function(t){this.urlProvider.requestUnload(t)},t.prototype.waitForPlugin=function(t){var e=this.loadedPlugins.get(t);if(e)return e.module.promise;var n={id:t,module:new p,url:null,script:null,moduleRef:null};return this.loadedPlugins.set(t,n),n.module.promise},t.prototype.patchWindow=function(){var t=this;window.define=function(n,o,i){var r=t.loadedPlugins.get(n);if(r){var a=(o=o.slice(1)).map(function(e){var o=t.availableDependencies.get(e);return o?Promise.resolve(o)["catch"](function(t){return console.warn("Plugin",n,"dependency",e,"but load failed",t),undefined}):(console.warn("Plugin",n,"requested unknown dependency",e),Promise.resolve(undefined))});Promise.all(a).then(function(o){var a={};i.apply(void 0,c([a],o)),console.log("Plugin",n,"loaded.");var s=a.MODULE;if(!s)return Promise.reject("No MODULE export found");var l=new e.ɵNgModuleFactory(s);r.moduleRef=l.create(t.injector),r.module.resolve(a),t.pluginLoaded$.next({id:r.id,module:r.moduleRef})})["catch"](function(t){console.warn("Failed to load plugin",n,"error",t),r.module.reject(t)})}else console.warn("Unknown plugin called define():",n)},window.define.amd=!0,console.log("Window AMD shim established.")},t.prototype.load=function(t){var e=t.id,n=t.url,o=this.loadedPlugins.get(e);if(o&&o.url){if(o.url!==n)throw new Error("Plugin is already loaded with another URL")}else{o||(o={id:e,module:new p,url:null,moduleRef:null,script:null}),o.url=n,this.loadedPlugins.set(e,o);var i=document.createElement("script");i.onerror=function(t){return o.module.reject(t)},i.type="text/javascript",i.src=n,o.script=i,document.body.appendChild(i)}},t.prototype.unload=function(t){},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Inject,args:[d]},{type:e.Optional}]},{type:m},{type:e.Injector}]},t}(),y=new e.InjectionToken("GoldenLayoutContainer"),v=new e.InjectionToken("GoldenLayoutComponentState"),w=new e.InjectionToken("GoldenLayoutEventHub"),C=new e.InjectionToken("GoldenLayoutComponentHost");function _(t){return"object"==typeof t&&"function"==typeof t.glOnResize}function b(t){return"object"==typeof t&&"function"==typeof t.glOnShow}function I(t){return"object"==typeof t&&"function"==typeof t.glOnHide}function L(t){return"object"==typeof t&&"function"==typeof t.glOnTab}var x=function(){function t(t,e,n){this.host=t,this.container=e,this.state=n,this.destroyed=!1,this.initialized=!1,this.originalComponent=this.host.getGoldenLayoutInstance()._getAllComponents()[this.state.originalId]}return Object.defineProperty(t.prototype,"headerComponent",{get:function(){return this.originalComponent&&this.originalComponent.instance?this.originalComponent.instance.then(function(t){return t.instance.headerComponent}):undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"additionalTokens",{get:function(){return this.originalComponent&&this.originalComponent.instance?this.originalComponent.instance.then(function(t){return t.instance.additionalTokens}):undefined},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.originalComponent.instance.then(function(e){t.destroyed||t.initialized||(t.redock(e,t.container.getElement()),t.initialized=!0)})},t.prototype.ngOnDestroy=function(){var t=this;this.originalComponent.instance.then(function(e){t.initialized&&!t.destroyed&&(t.redock(e,t.originalComponent.container.getElement()),t.destroyed=!0)})},t.prototype.redock=function(t,e){var n=$(t.location.nativeElement);n.remove(),e.append(n),_(t.instance)&&t.instance.glOnResize()},t.prototype.glOnHide=function(){this.originalComponent.instance.then(function(t){I(t.instance)&&t.instance.glOnHide()})},t.prototype.glOnShow=function(){this.originalComponent.instance.then(function(t){b(t.instance)&&t.instance.glOnShow()})},t.prototype.glOnResize=function(){this.originalComponent.instance.then(function(t){_(t.instance)&&t.instance.glOnResize()})},t.prototype.glOnTab=function(t){var e=this;this.originalComponent.instance.then(function(t){L(t.instance)&&t.instance.glOnTab(e.originalComponent.tab)})},t.decorators=[{type:e.Component,args:[{selector:"gl-wrapper",encapsulation:e.ViewEncapsulation.None,template:'<div class="wrapper"></div>'}]}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:e.Inject,args:[C]}]},{type:undefined,decorators:[{type:e.Inject,args:[y]}]},{type:undefined,decorators:[{type:e.Inject,args:[v]}]}]},t}(),S=function(){function t(t,e){var n=this;this.pluginRegistry=e,this.components=new Map,this.awaitedComponents=new Map,(t||[]).forEach(function(t){return n.registerComponent(t)}),this.registerComponent({name:"gl-wrapper",type:x}),this.pluginRegistry.pluginLoaded$.subscribe(function(t){var e=t.id,o=t.module.injector.get(u,[]);console.log("Plugin",e,"wants to register",o.length,"components"),o.forEach(function(t){return n.registerComponent(a({},t,{plugin:e}))})})}return t.prototype.registeredComponents=function(){return c(this.components.entries()).map(function(t){return{name:t[0],type:t[1]}})},t.prototype.componentMap=function(){return this.components},t.prototype.registerComponent=function(t){var e=this.components.get(t.name);if(e&&e!==t.type)throw new Error("Failed to register component, "+t.name+" is already taken by another component: "+e);this.components.set(t.name,t.type);var n=this.awaitedComponents.get(t.name);n&&(this.awaitedComponents["delete"](t.name),n.resolve(t.type))},t.prototype.waitForComponent=function(t){var e=this.components.get(t);if(e)return Promise.resolve(e);var n=this.awaitedComponents.get(t);return n||(n=new p,this.awaitedComponents.set(t,n)),n.promise},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Inject,args:[u]},{type:e.Optional}]},{type:g}]},t}(),j=new e.InjectionToken("fallback component"),E=new e.InjectionToken("failed component"),P=function(){function t(){}return t.prototype.isChildWindow=function(){try{return!!window.opener&&!!window.opener.location.href}catch(t){return!1}},t.prototype.getRootWindow=function(){return this.isChildWindow()?window.opener:window},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),O=function(){function t(t,e,n){var o=this;this.appref=t,this.rootService=e,this.injector=n,this.unloaded=!1,this.topWindow=this.rootService.getRootWindow(),this.isChildWindow=this.rootService.isChildWindow(),this.isChildWindow&&(window.document.title=window.document.URL,console.__log=console.log,console.log=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=o.topWindow.console).log.apply(t,c(["[CHILD] =>"],e))});var i=this.topWindow;this.isChildWindow||(i.__apprefs=[],i.__injector=this.injector),i.__apprefs.push(this.appref),this.appref.__tick=this.appref.tick,this.appref.tick=function(){var t,e,n=function(t){t._zone.run(function(){return t.__tick()})};try{for(var i=s(o.topWindow.__apprefs),r=i.next();!r.done;r=i.next()){n(r.value)}}catch(a){t={error:a}}finally{try{r&&!r.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}}}return t.prototype.onUnload=function(){if(!this.unloaded&&(this.unloaded=!0,this.isChildWindow)){var t=this.topWindow.__apprefs.indexOf(this.appref);t>=0&&this.topWindow.__apprefs.splice(t,1)}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:P},{type:e.Injector}]},t}(),k=o,R=function(t){return t.contentItem.isComponent&&t.contentItem.config&&t.contentItem.config.componentState&&t.contentItem.config.componentState.originalComponent},M=k.__lm.controls.Tab,T=function(t,e){var n=new M(t,e);return n.closeElement.off("click touchstart"),n.closeElement.on("click touchstart",function(t){t.stopPropagation(),R(n)?n.contentItem.config.componentState.originalComponent.container.close():n.contentItem.container.close()}),n.element.on("mousedown touchstart",function(t){var e=n.contentItem;R(n)&&(e=n.contentItem.config.componentState.originalComponent),e.layoutManager.emit("tabActivated",e)}),R(n)&&!0===n._layoutManager.config.settings.reorderEnabled&&n.element.on("mousedown touchstart",function(e){var o=n.contentItem.config.componentState.originalTab;if(console.log("myId",n.contentItem.id,"origid",n.contentItem.config.componentState.originalComponent.id),console.log(n.contentItem.parent,t.layoutManager._maximisedItem===n.contentItem.parent,o),o&&o._dragListener){var i=o._dragListener,r=function(){i.off("dragStart",r,i),t.layoutManager._maximisedItem===n.contentItem.parent&&n.contentItem.parent.toggleMaximise()};i.off("dragStart",o._onDragStart,o),i.on("dragStart",r,i),i.on("dragStart",o._onDragStart,o),i._fDown(e)}}),n};T._template='<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>',k.__lm.controls.Tab=T;var A=k.__lm.controls.Header,D=function(t,e){var n=e._header.maximise,o=e._header.popout;n&&!0===t.config.settings.maximiseAllItems&&delete e._header.maximise,o&&!0===t.config.settings.maximiseAllItems&&delete e._header.popout;var i=new A(t,e);if(o&&!0===t.config.settings.maximiseAllItems&&(i.popoutButton=new k.__lm.controls.HeaderButton(i,o,"lm_popout",function(){var e=i.activeContentItem;e.isComponent&&e.config&&e.config.componentState&&e.config.componentState.originalComponent?(e=e.config.componentState.originalComponent).popout():!0===t.config.settings.popoutWholeStack?i.parent.popout():e.popout()})),n&&!0===t.config.settings.maximiseAllItems&&(i.maximiseButton=new k.__lm.controls.HeaderButton(i,n,"lm_maximise",function(){console.log("I should maximise all items."),t._maximisedItem===e?e.toggleMaximise():t.generateAndMaximiseDummyStack(e)})),i.closeButton){i.closeButton._$destroy();var r=i._getHeaderSetting("close");i.closeButton=new k.__lm.controls.HeaderButton(i,r,"lm_close",function(){i.parent.contentItems.forEach(function(t){t.container.close()})})}return i};D._template=['<div class="lm_header">','<ul class="lm_tabs"></ul>','<ul class="lm_controls"></ul>','<ul class="lm_tabdropdown_list"></ul>',"</div>"].join(""),k.__lm.controls.Header=D;var U=k.__lm.controls.DragProxy,W=function(t,e,n,o,i,r){return o.emit("itemDragged",i),console.log("new dragProxy",i),new U(t,e,n,o,i,r)};W._template=U._template,k.__lm.controls.DragProxy=W;var z=k.__lm.items.Stack;function H(t,e,o){var i=this;console.log(t,e,o,this),z.call(this,t,e,o),this.activeContentItem$=new n.BehaviorSubject(null);var r=function(t){i.activeContentItem$&&i.activeContentItem$.next(t)};this.on("activeContentItemChanged",r);var a=this._$destroy;return this.___destroyed=!1,this._$destroy=function(){i.___destroyed||(i.___destroyed=!0,i.off("activeContentItemChanged",r),i.activeContentItem$.complete(),i.activeContentItem$=null,a.call(i))},this}H.prototype=Object.create(z.prototype),H.prototype.addChild=function(t,e){var n=this;"stack"===t.type?((t.content||[]).forEach(function(t,o){return z.prototype.addChild.call(n,t,e+o)}),t.content.length&&this.setActiveContentItem(this.contentItems[e+t.activeItemIndex])):z.prototype.addChild.call(this,t,e)},H.prototype.setSize=function(){this.layoutManager._maximisedItem===this&&(this.element.width(this.layoutManager.container.width()),this.element.height(this.layoutManager.container.height())),z.prototype.setSize.call(this)},k.__lm.items.Stack=H;var N=k.__lm.controls.BrowserPopout;k.__lm.controls.BrowserPopout=function(t,e,n,o,i){return 1!==t.length?console.warn("This should not happen, permitting",t):"component"===t[0].type&&(t=[{type:"stack",title:t[0].title,content:[t[0]]}]),new N(t,e,n,o,i)};var G=function(){function t(t,o,i,r,a,s,l,c,u){var d=this;this.rootService=t,this.componentRegistry=o,this.viewContainer=i,this.appref=r,this.componentFactoryResolver=a,this.ngZone=s,this.injector=l,this.windowSync=c,this.fallbackComponent=u,this.stateChanged=new e.EventEmitter,this.tabActivated=new e.EventEmitter,this.goldenLayout=null,this.onUnloaded=new p,this.stateChangePaused=!1,this.stateChangeScheduled=!1,this.tabsList=new n.BehaviorSubject({}),this.pushStateChange=function(){d.tabsList.next(d.goldenLayout._getAllComponents()),d.stateChangePaused||d.stateChangeScheduled||(d.stateChangeScheduled=!0,window.requestAnimationFrame(function(){d.stateChangeScheduled=!1,d.stateChanged.emit()}))},this.resumeStateChange=function(){return d.stateChangePaused=!1},this.pauseStateChange=function(){d.stateChangePaused=!0,d.goldenLayout&&d.goldenLayout.__maximisedStack&&d.goldenLayout},this.pushTabActivated=function(t){d.tabActivated.emit(t)},this.fallbackType=null,this.openedComponents=[],this.poppedIn=!1,this._eventEmitter=new k.__lm.utils.EventEmitter,this.isChildWindow=this.rootService.isChildWindow(),this.fallbackComponent&&(this.fallbackType=this.buildConstructor(this.fallbackComponent)),e.isDevMode()&&console.log("Create@"+(this.isChildWindow?"child":"root")+"!")}return t.prototype.onResize=function(){this.goldenLayout&&this.goldenLayout.updateSize()},t.prototype.ngOnInit=function(){var t=this;e.isDevMode()&&console.log("Init@"+(this.isChildWindow?"child":"root")+"!"),this.layoutSubscription=this.layout.subscribe(function(e){t.destroyGoldenLayout(),t.initializeGoldenLayout(e)})},t.prototype.beforeUnload=function(){var t=this;this.poppedIn&&(this.onUnloaded.promise.then(function(){return t.ngOnDestroy()}),this.onUnloaded.resolve(),this.windowSync.onUnload())},t.prototype.pageHide=function(){var t=this;this.poppedIn||this.openedComponents.forEach(function(t){var e;"object"==typeof(e=t)&&"function"==typeof e.glOnUnload&&t.glOnUnload()}),this.onUnloaded.promise.then(function(){return t.ngOnDestroy()}),this.onUnloaded.resolve(),this.windowSync.onUnload()},t.prototype.ngOnDestroy=function(){var t;e.isDevMode()&&console.log("Destroy@"+(this.isChildWindow?"child":"root")+"!"),this.layoutSubscription.unsubscribe(),this.appref.tick=this.appref.__tick,this.destroyGoldenLayout(),this._eventEmitter._mSubscriptions=((t={})[k.__lm.utils.EventEmitter.ALL_EVENT]=[],t),this.isChildWindow&&(console.log=console.__log)},t.prototype.getGoldenLayoutInstance=function(){if(!this.goldenLayout)throw new Error("Component is not initialized yet");return this.goldenLayout},t.prototype.addEvent=function(t,e,n){this._eventEmitter.on(t,e,n)},t.prototype.getSerializableState=function(){return this.goldenLayout?this.goldenLayout.toConfig():null},t.prototype.createNewComponent=function(t){if(!this.goldenLayout)throw new Error("golden layout is not initialized");var e=t,n=this.goldenLayout.root,o=null;if(n.contentItems&&0!==n.contentItems.length?o=this.findStack(n.contentItems):(o=n,e={type:"stack",content:[a({},e,{type:"component"})]}),null===o)throw new Error("this should never happen!");var i=this.goldenLayout.createContentItem(e);o.addChild(i)},t.prototype.findStack=function(t){var e,n;if(!t)return null;try{for(var o=s(t),i=o.next();!i.done;i=o.next()){var r=i.value;if(r.isStack){if(r.config.isDummy)continue;return r}var a=this.findStack(r.contentItems);if(null!==a)return a}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(e)throw e.error}}},t.prototype.destroyGoldenLayout=function(){this.goldenLayout&&(this.goldenLayout.off("stateChanged",this.pushStateChange),this.goldenLayout.off("itemDropped",this.resumeStateChange),this.goldenLayout.off("itemDragged",this.pauseStateChange),this.goldenLayout.off("tabActivated",this.pushTabActivated),this.goldenLayout.off(k.__lm.utils.EventEmitter.ALL_EVENT,this._eventEmitter.emit,this._eventEmitter),this.goldenLayout.destroy(),this.goldenLayout=null)},t.prototype.initializeGoldenLayout=function(t){var r=this;this.goldenLayout=new o(t,$(this.el.nativeElement));var u=this.goldenLayout.createPopout.bind(this.goldenLayout);this.goldenLayout.createPopout=function(t,e,n,o){for(var i,r=[t];r.length;){var a=r.shift();if(r.push.apply(r,c(a.contentItems)),a.isComponent){var s=a.container.__ngComponent;s&&("object"==typeof(i=s)&&"function"==typeof i.glOnPopout)&&s.glOnPopout()}console.log(a)}return console.log("beforepopout",t),u(t,e,n,o)};var d=function(t){var e,n,o={};try{for(var i=s(t.contentItems),r=i.next();!r.done;r=i.next()){var l=r.value;if(l.isComponent){if(l.config&&l.config.componentState&&l.config.componentState.originalId)continue;o[l.id]=l}else o=a({},o,d(l))}}catch(c){e={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return o};this.goldenLayout._getAllComponents=function(){return d(r.goldenLayout.root)},this.goldenLayout.generateAndMaximiseDummyStack=function(t){var e=r.tabsList.value,o=Object.keys(e);if(0!==o.length){var l=r.goldenLayout.root.contentItems[0];if(l.isStack)l.toggleMaximise();else{var c={type:"stack",content:o.map(function(t){return{type:"component",componentName:"gl-wrapper",title:e[t].config.title,reorderEnabled:!1,componentState:{originalId:t,originalComponent:e[t],originalTab:e[t].tab}}}),isClosable:!1,isDummy:!0,state:"dummy",activeItemIndex:o.findIndex(function(e){return e===t._activeContentItem.id})};l.addChild(c,0);var u=l.contentItems[0],d=new n.Subject;u.on("minimised",function(){console.log("minimised",u),d.next(),d.complete(),u.remove()}),u.toggleMaximise(),r.tabsList.pipe(i.takeUntil(d),i.distinctUntilChanged(function(t,e){var n=Object.keys(t),o=new Set(Object.keys(e));return n.length===o.size&&n.every(function(t){return o.has(t)})})).subscribe(function(t){var e,n,o,i,r=a({},t),l=new Set(Object.keys(r)),c=new Set(u.contentItems.map(function(t){return t.config.componentState.originalId}));try{for(var d=s(l),p=d.next();!p.done;p=d.next()){var h=p.value;c.has(h)?c["delete"](h):u.addChild({type:"component",componentName:"gl-wrapper",title:t[h].config.title,reorderEnabled:!1,componentState:{originalId:h,originalComponent:t[h],originalTab:t[h].tab}})}}catch(y){e={error:y}}finally{try{p&&!p.done&&(n=d["return"])&&n.call(d)}finally{if(e)throw e.error}}var f=function(t){u.contentItems.find(function(e){return e.config.componentState.originalId===t}).remove()};try{for(var m=s(c),g=m.next();!g.done;g=m.next()){f(g.value)}}catch(v){o={error:v}}finally{try{g&&!g.done&&(i=m["return"])&&i.call(m)}finally{if(o)throw o.error}}})}}},this.goldenLayout.on("popIn",function(){console.log("popIn"),r.poppedIn=!0,r.openedComponents.forEach(function(t){var e;"object"==typeof(e=t)&&"function"==typeof e.glOnPopin&&t.glOnPopin()})}),this.goldenLayout.getComponent=function(t){return e.isDevMode()&&console.log("Resolving component "+t),r.buildConstructor(t)},this.goldenLayout.on("stackCreated",function(t){var o=document.createElement("li");o.classList.add("custom-header"),o.style.display="none";var a=t.header.controlsContainer[0],s=null;a.prepend(o);var c=function(){o.style.display="none",s&&(o.childNodes.forEach(function(t){return o.removeChild(t)}),s.destroy(),s=null)};t.activeContentItem$.pipe(i.switchMap(function(t){return t&&t.isComponent&&t.instance||n.of(null)}),i.switchMap(function(t){if(!t)return Promise.all([null,null,null]);var e=t.instance.headerComponent,n=t.instance.additionalTokens;return Promise.all([Promise.resolve(e),Promise.resolve(n),Promise.resolve(t)])})).subscribe(function(t){var n=l(t,3),i=n[0],a=n[1],u=n[2];i&&u?function(t,n,i){s&&c(),o.style.display="";var a=r.componentFactoryResolver.resolveComponentFactory(t),l=e.Injector.create(n,i);s=r.viewContainer.createComponent(a,undefined,l),o.prepend(s.location.nativeElement)}(i,a||[],u.injector):c()},c,c)}),this.goldenLayout.init(),this.goldenLayout.on("stateChanged",this.pushStateChange),this.goldenLayout.on("itemDragged",this.pauseStateChange),this.goldenLayout.on("itemDropped",this.resumeStateChange),this.goldenLayout.on("tabActivated",this.pushTabActivated),this.goldenLayout.on(k.__lm.utils.EventEmitter.ALL_EVENT,this._eventEmitter.emit,this._eventEmitter)},t.prototype.buildConstructor=function(t){var e=this;return function(n,o){n.parent.id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});var i=new p;return e.ngZone.run(function(){e.componentRegistry.waitForComponent(t).then(function(r){console.log("Component "+t+" returned from componentRegistry");var a=e.componentFactoryResolver.resolveComponentFactory(r),s=null;r===e.fallbackComponent&&(s=n._config.componentName);var l=e._createComponentInjector(n,o,s),c=e.viewContainer.createComponent(a,undefined,l);n.getElement().append($(c.location.nativeElement)),e._bindEventHooks(n,c.instance),n.__ngComponent=c.instance,e.openedComponents.push(c.instance);var u=!1,d=function(){u||(u=!0,e.openedComponents=e.openedComponents.filter(function(t){return t!==c.instance}),$(c.location.nativeElement).remove(),c.destroy())};n.on("destroy",d),e.onUnloaded.promise.then(d),i.resolve(c)})}),i.promise}},t.prototype._createComponentInjector=function(t,n,o){var i=[{provide:y,useValue:t},{provide:v,useValue:n},{provide:w,useValue:this.goldenLayout.eventHub},{provide:C,useValue:this}];return o&&i.push({provide:E,useValue:o}),e.Injector.create(i,this.injector)},t.prototype._bindEventHooks=function(t,e){if(_(e)&&t.on("resize",function(){e.glOnResize()}),b(e)&&t.on("show",function(){e.glOnShow()}),I(e)&&t.on("hide",function(){e.glOnHide()}),L(e)&&t.on("tab",function(t){e.glOnTab(t)}),"object"==typeof(o=e)&&"function"==typeof o.glOnClose){var n=t.close.bind(t);t.close=function(){if(!t._config.isClosable)return!1;e.glOnClose().then(function(){n()},function(){})}}var o},t.decorators=[{type:e.Component,args:[{selector:"golden-layout-root",template:'<div class="ng-golden-layout-root" #glroot></div>',styles:["\n .ng-golden-layout-root {\n width:100%;\n height:100%;\n }"]}]}],t.ctorParameters=function(){return[{type:P},{type:S},{type:e.ViewContainerRef},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.NgZone},{type:e.Injector},{type:O},{type:undefined,decorators:[{type:e.Optional},{type:e.Inject,args:[j]}]}]},t.propDecorators={layout:[{type:e.Input}],stateChanged:[{type:e.Output}],tabActivated:[{type:e.Output}],el:[{type:e.ViewChild,args:["glroot",{"static":!0}]}],onResize:[{type:e.HostListener,args:["window:resize"]}],beforeUnload:[{type:e.HostListener,args:["window:beforeunload"]}],pageHide:[{type:e.HostListener,args:["window:pagehide"]}]},t}(),V=function(){function t(){}return t.forRoot=function(n,o,i){return{ngModule:t,providers:[S,P,g,m,O,{provide:e.APP_INITIALIZER,useValue:h,multi:!0},{provide:u,useValue:n},{provide:e.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:[n,o,x],multi:!0},{provide:d,useValue:i},{provide:j,useValue:o}]}},t.decorators=[{type:e.NgModule,args:[{declarations:[G,x],exports:[G],imports:[r.CommonModule]}]}],t}();t.ComponentRegistryService=S,t.FailedComponent=E,t.FallbackComponent=j,t.GoldenLayoutComponent=G,t.GoldenLayoutComponentHost=C,t.GoldenLayoutComponentState=v,t.GoldenLayoutComponents=u,t.GoldenLayoutContainer=y,t.GoldenLayoutEventHub=w,t.GoldenLayoutModule=V,t.GoldenLayoutPluginDependency=d,t.MultiWindowInit=h,t.MultiWindowService=f,t.PluginRegistryService=g,t.PluginURLProvider=m,t.RootWindowService=P,t.forChild=function(t){return[{provide:u,useValue:t},{provide:e.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:t,multi:!0}]},t.ɵa=O,t.ɵb=x,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("golden-layout"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-golden-layout",["exports","@angular/core","rxjs","golden-layout","rxjs/operators","@angular/common"],e):e((t=t||self)["ngx-golden-layout"]={},t.ng.core,t.rxjs,t.GoldenLayout,t.rxjs.operators,t.ng.common)}(this,function(t,e,n,o,i,r){"use strict";var a=function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r["return"])&&n.call(r)}finally{if(i)throw i.error}}return a}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(l(arguments[e]));return t}var u=new e.InjectionToken("ComponentTypes"),d=new e.InjectionToken("Dependencies"),p=function(){return function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}}();function h(){if(console.log("MultiWindowInit"),!window.opener&&(window.__services=new window.Map,window.__serviceConstructors=new window.Map,window.require)){var t=window.open.bind(window);window.open=function(e,n,o,i){var r=t(e,n,o,i);return r.require=window.require,r}}}function f(){return function(t){var e=t,n=window.opener||window,o=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(!n.__services.has(e.name)){var i=n.__serviceConstructors.get(e.name)||e;n.__services.set(e.name,new(i.bind.apply(i,c([void 0],t))))}return n.__services.get(e.name)};try{if(window===n){var i=Reflect.getMetadata("design:paramtypes",e);Reflect.metadata("design:paramtypes",i)(o)}}catch(r){}return o}}var m=function(){function t(){this.loadedURLs=new Map,this.loads=new n.Subject,this.unloads=new n.Subject}return t.prototype.loadRequests$=function(){return this.loads},t.prototype.unloadRequests$=function(){return this.unloads},t.prototype.allPlugins=function(){return c(this.loadedURLs.entries()).map(function(t){return{id:t[0],url:t[1]}})},t.prototype.requestLoad=function(t,e){var n=this.loadedURLs.get(t);if(n){if(n!==e)throw new Error("Plugin "+t+" is already loaded with another URL")}else this.loadedURLs.set(t,e),this.loads.next({id:t,url:e})},t.prototype.requestUnload=function(t){if(!this.loadedURLs.get(t))throw new Error("Plugin "+t+" is not loaded");this.loadedURLs["delete"](t),this.unloads.next(t)},t.decorators=[{type:e.Injectable}],t=function(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}([f()],t)}(),g=function(){function t(t,e,o){var i=this;void 0===t&&(t=[]),this.urlProvider=e,this.injector=o,this.availableDependencies=new Map,this.loadedPlugins=new Map,this.pluginLoaded$=new n.Subject,this.pluginUnloaded$=new n.Subject,console.log("Creating PluginRegistry, got",t.length,"additional dependency modules"),t.forEach(function(t){return i.availableDependencies.set(t.name,t.loader)}),this.patchWindow(),this.urlProvider.loadRequests$().subscribe(function(t){return i.load(t)}),this.urlProvider.allPlugins().forEach(function(t){return i.load(t)})}return t.prototype.startLoadPlugin=function(t,e){this.urlProvider.requestLoad(t,e)},t.prototype.startUnloadPlugin=function(t){this.urlProvider.requestUnload(t)},t.prototype.waitForPlugin=function(t){var e=this.loadedPlugins.get(t);if(e)return e.module.promise;var n={id:t,module:new p,url:null,script:null,moduleRef:null};return this.loadedPlugins.set(t,n),n.module.promise},t.prototype.patchWindow=function(){var t=this;window.define=function(n,o,i){var r=t.loadedPlugins.get(n);if(r){var a=(o=o.slice(1)).map(function(e){var o=t.availableDependencies.get(e);return o?Promise.resolve(o)["catch"](function(t){return console.warn("Plugin",n,"dependency",e,"but load failed",t),undefined}):(console.warn("Plugin",n,"requested unknown dependency",e),Promise.resolve(undefined))});Promise.all(a).then(function(o){var a={};i.apply(void 0,c([a],o)),console.log("Plugin",n,"loaded.");var s=a.MODULE;if(!s)return Promise.reject("No MODULE export found");var l=new e.ɵNgModuleFactory(s);r.moduleRef=l.create(t.injector),r.module.resolve(a),t.pluginLoaded$.next({id:r.id,module:r.moduleRef})})["catch"](function(t){console.warn("Failed to load plugin",n,"error",t),r.module.reject(t)})}else console.warn("Unknown plugin called define():",n)},window.define.amd=!0,console.log("Window AMD shim established.")},t.prototype.load=function(t){var e=t.id,n=t.url,o=this.loadedPlugins.get(e);if(o&&o.url){if(o.url!==n)throw new Error("Plugin is already loaded with another URL")}else{o||(o={id:e,module:new p,url:null,moduleRef:null,script:null}),o.url=n,this.loadedPlugins.set(e,o);var i=document.createElement("script");i.onerror=function(t){return o.module.reject(t)},i.type="text/javascript",i.src=n,o.script=i,document.body.appendChild(i)}},t.prototype.unload=function(t){},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Inject,args:[d]},{type:e.Optional}]},{type:m},{type:e.Injector}]},t}(),y=new e.InjectionToken("GoldenLayoutContainer"),v=new e.InjectionToken("GoldenLayoutComponentState"),w=new e.InjectionToken("GoldenLayoutEventHub"),C=new e.InjectionToken("GoldenLayoutComponentHost");function _(t){return"object"==typeof t&&"function"==typeof t.glOnResize}function b(t){return"object"==typeof t&&"function"==typeof t.glOnShow}function I(t){return"object"==typeof t&&"function"==typeof t.glOnHide}function L(t){return"object"==typeof t&&"function"==typeof t.glOnTab}var x=function(){function t(t,e,n){this.host=t,this.container=e,this.state=n,this.destroyed=!1,this.initialized=!1,this.originalComponent=this.host.getGoldenLayoutInstance()._getAllComponents()[this.state.originalId]}return Object.defineProperty(t.prototype,"headerComponent",{get:function(){return this.originalComponent&&this.originalComponent.instance?this.originalComponent.instance.then(function(t){return t.instance.headerComponent}):undefined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"additionalTokens",{get:function(){return this.originalComponent&&this.originalComponent.instance?this.originalComponent.instance.then(function(t){return t.instance.additionalTokens}):undefined},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.originalComponent.instance.then(function(e){t.destroyed||t.initialized||(t.redock(e,t.container.getElement()),t.initialized=!0)})},t.prototype.ngOnDestroy=function(){var t=this;this.originalComponent.instance.then(function(e){t.initialized&&!t.destroyed&&(t.redock(e,t.originalComponent.container.getElement()),t.destroyed=!0)})},t.prototype.redock=function(t,e){var n=$(t.location.nativeElement);n.remove(),e.append(n),_(t.instance)&&t.instance.glOnResize()},t.prototype.glOnHide=function(){this.originalComponent.instance.then(function(t){I(t.instance)&&t.instance.glOnHide()})},t.prototype.glOnShow=function(){this.originalComponent.instance.then(function(t){b(t.instance)&&t.instance.glOnShow()})},t.prototype.glOnResize=function(){this.originalComponent.instance.then(function(t){_(t.instance)&&t.instance.glOnResize()})},t.prototype.glOnTab=function(t){var e=this;this.originalComponent.instance.then(function(t){L(t.instance)&&t.instance.glOnTab(e.originalComponent.tab)})},t.decorators=[{type:e.Component,args:[{selector:"gl-wrapper",encapsulation:e.ViewEncapsulation.None,template:'<div class="wrapper"></div>'}]}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:e.Inject,args:[C]}]},{type:undefined,decorators:[{type:e.Inject,args:[y]}]},{type:undefined,decorators:[{type:e.Inject,args:[v]}]}]},t}(),S=function(){function t(t,e){var n=this;this.pluginRegistry=e,this.components=new Map,this.awaitedComponents=new Map,(t||[]).forEach(function(t){return n.registerComponent(t)}),this.registerComponent({name:"gl-wrapper",type:x}),this.pluginRegistry.pluginLoaded$.subscribe(function(t){var e=t.id,o=t.module.injector.get(u,[]);console.log("Plugin",e,"wants to register",o.length,"components"),o.forEach(function(t){return n.registerComponent(a({},t,{plugin:e}))})})}return t.prototype.registeredComponents=function(){return c(this.components.entries()).map(function(t){return{name:t[0],type:t[1]}})},t.prototype.componentMap=function(){return this.components},t.prototype.registerComponent=function(t){var e=this.components.get(t.name);if(e&&e!==t.type)throw new Error("Failed to register component, "+t.name+" is already taken by another component: "+e);this.components.set(t.name,t.type);var n=this.awaitedComponents.get(t.name);n&&(this.awaitedComponents["delete"](t.name),n.resolve(t.type))},t.prototype.waitForComponent=function(t){var e=this.components.get(t);if(e)return Promise.resolve(e);var n=this.awaitedComponents.get(t);return n||(n=new p,this.awaitedComponents.set(t,n)),n.promise},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Array,decorators:[{type:e.Inject,args:[u]},{type:e.Optional}]},{type:g}]},t}(),j=new e.InjectionToken("fallback component"),E=new e.InjectionToken("failed component"),P=function(){function t(){}return t.prototype.isChildWindow=function(){try{return!!window.opener&&!!window.opener.location.href}catch(t){return!1}},t.prototype.getRootWindow=function(){return this.isChildWindow()?window.opener:window},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),O=function(){function t(t,e,n){var o=this;this.appref=t,this.rootService=e,this.injector=n,this.unloaded=!1,this.topWindow=this.rootService.getRootWindow(),this.isChildWindow=this.rootService.isChildWindow(),this.isChildWindow&&(window.document.title=window.document.URL,console.__log=console.log,console.log=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=o.topWindow.console).log.apply(t,c(["[CHILD] =>"],e))});var i=this.topWindow;this.isChildWindow||(i.__apprefs=[],i.__injector=this.injector),i.__apprefs.push(this.appref),this.appref.__tick=this.appref.tick,this.appref.tick=function(){var t,e,n=function(t){t._zone.run(function(){return t.__tick()})};try{for(var i=s(o.topWindow.__apprefs),r=i.next();!r.done;r=i.next()){n(r.value)}}catch(a){t={error:a}}finally{try{r&&!r.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}}}return t.prototype.onUnload=function(){if(!this.unloaded&&(this.unloaded=!0,this.isChildWindow)){var t=this.topWindow.__apprefs.indexOf(this.appref);t>=0&&this.topWindow.__apprefs.splice(t,1)}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:P},{type:e.Injector}]},t}(),k=o,R=function(t){return t.contentItem.isComponent&&t.contentItem.config&&t.contentItem.config.componentState&&t.contentItem.config.componentState.originalComponent},M=k.__lm.controls.Tab,T=function(t,e){var n=new M(t,e);return n.closeElement.off("click touchstart"),n.closeElement.on("click touchstart",function(t){t.stopPropagation(),R(n)?n.contentItem.config.componentState.originalComponent.container.close():n.contentItem.container.close()}),n.element.on("mousedown touchstart",function(t){var e=n.contentItem;R(n)&&(e=n.contentItem.config.componentState.originalComponent),e.layoutManager.emit("tabActivated",e)}),R(n)&&!0===n._layoutManager.config.settings.reorderEnabled&&n.element.on("mousedown touchstart",function(e){var o=n.contentItem.config.componentState.originalTab;if(console.log("myId",n.contentItem.id,"origid",n.contentItem.config.componentState.originalComponent.id),console.log(n.contentItem.parent,t.layoutManager._maximisedItem===n.contentItem.parent,o),o&&o._dragListener){var i=o._dragListener,r=function(){i.off("dragStart",r,i),t.layoutManager._maximisedItem===n.contentItem.parent&&n.contentItem.parent.toggleMaximise()};i.off("dragStart",o._onDragStart,o),i.on("dragStart",r,i),i.on("dragStart",o._onDragStart,o),i._fDown(e)}}),n};T._template='<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>',k.__lm.controls.Tab=T;var A=k.__lm.controls.Header,D=function(t,e){var n=e._header.maximise,o=e._header.popout;n&&!0===t.config.settings.maximiseAllItems&&delete e._header.maximise,o&&!0===t.config.settings.maximiseAllItems&&delete e._header.popout;var i=new A(t,e);if(o&&!0===t.config.settings.maximiseAllItems&&(i.popoutButton=new k.__lm.controls.HeaderButton(i,o,"lm_popout",function(){var e=i.activeContentItem;e.isComponent&&e.config&&e.config.componentState&&e.config.componentState.originalComponent?(e=e.config.componentState.originalComponent).popout():!0===t.config.settings.popoutWholeStack?i.parent.popout():e.popout()})),n&&!0===t.config.settings.maximiseAllItems&&(i.maximiseButton=new k.__lm.controls.HeaderButton(i,n,"lm_maximise",function(){console.log("I should maximise all items."),t._maximisedItem===e?e.toggleMaximise():t.generateAndMaximiseDummyStack(e)})),i.closeButton){i.closeButton._$destroy();var r=i._getHeaderSetting("close");i.closeButton=new k.__lm.controls.HeaderButton(i,r,"lm_close",function(){i.parent.contentItems.forEach(function(t){t.container.close()})})}return i};D._template=['<div class="lm_header">','<ul class="lm_tabs"></ul>','<ul class="lm_controls"></ul>','<ul class="lm_tabdropdown_list"></ul>',"</div>"].join(""),k.__lm.controls.Header=D;var U=k.__lm.controls.DragProxy,W=function(t,e,n,o,i,r){return o.emit("itemDragged",i),console.log("new dragProxy",i),new U(t,e,n,o,i,r)};W._template=U._template,k.__lm.controls.DragProxy=W;var z=k.__lm.items.Stack;function H(t,e,o){var i=this;console.log(t,e,o,this),z.call(this,t,e,o),this.activeContentItem$=new n.BehaviorSubject(null);var r=function(t){i.activeContentItem$&&i.activeContentItem$.next(t)};this.on("activeContentItemChanged",r);var a=this._$destroy;return this.___destroyed=!1,this._$destroy=function(){i.___destroyed||(i.___destroyed=!0,i.off("activeContentItemChanged",r),i.activeContentItem$.complete(),i.activeContentItem$=null,a.call(i))},this}H.prototype=Object.create(z.prototype),H.prototype.addChild=function(t,e){var n=this;"stack"===t.type?((t.content||[]).forEach(function(t,o){return z.prototype.addChild.call(n,t,e+o)}),t.content.length&&this.setActiveContentItem(this.contentItems[e+t.activeItemIndex])):z.prototype.addChild.call(this,t,e)},H.prototype.setSize=function(){this.layoutManager._maximisedItem===this&&(this.element.width(this.layoutManager.container.width()),this.element.height(this.layoutManager.container.height())),z.prototype.setSize.call(this)},k.__lm.items.Stack=H;var N=k.__lm.controls.BrowserPopout;k.__lm.controls.BrowserPopout=function(t,e,n,o,i){return 1!==t.length?console.warn("This should not happen, permitting",t):"component"===t[0].type&&(t=[{type:"stack",title:t[0].title,content:[t[0]]}]),new N(t,e,n,o,i)};var G=function(){function t(t,o,i,r,a,s,l,c,u){var d=this;this.rootService=t,this.componentRegistry=o,this.viewContainer=i,this.appref=r,this.componentFactoryResolver=a,this.ngZone=s,this.injector=l,this.windowSync=c,this.fallbackComponent=u,this.stateChanged=new e.EventEmitter,this.tabActivated=new e.EventEmitter,this.goldenLayout=null,this.onUnloaded=new p,this.stateChangePaused=!1,this.stateChangeScheduled=!1,this.tabsList=new n.BehaviorSubject({}),this.pushStateChange=function(){d.tabsList.next(d.goldenLayout._getAllComponents()),d.stateChangePaused||d.stateChangeScheduled||(d.stateChangeScheduled=!0,window.requestAnimationFrame(function(){d.stateChangeScheduled=!1,d.stateChanged.emit()}))},this.resumeStateChange=function(){return d.stateChangePaused=!1},this.pauseStateChange=function(){d.stateChangePaused=!0,d.goldenLayout&&d.goldenLayout.__maximisedStack&&d.goldenLayout},this.pushTabActivated=function(t){d.tabActivated.emit(t)},this.fallbackType=null,this.openedComponents=[],this.poppedIn=!1,this._eventEmitter=new k.__lm.utils.EventEmitter,this.isChildWindow=this.rootService.isChildWindow(),this.fallbackComponent&&(this.fallbackType=this.buildConstructor(this.fallbackComponent)),e.isDevMode()&&console.log("Create@"+(this.isChildWindow?"child":"root")+"!")}return t.prototype.onResize=function(){this.goldenLayout&&this.goldenLayout.updateSize()},t.prototype.ngOnInit=function(){var t=this;e.isDevMode()&&console.log("Init@"+(this.isChildWindow?"child":"root")+"!"),this.layoutSubscription=this.layout.subscribe(function(e){t.destroyGoldenLayout(),t.initializeGoldenLayout(e)})},t.prototype.beforeUnload=function(){var t=this;this.poppedIn&&(this.onUnloaded.promise.then(function(){return t.ngOnDestroy()}),this.onUnloaded.resolve(),this.windowSync.onUnload())},t.prototype.pageHide=function(){var t=this;this.poppedIn||this.openedComponents.forEach(function(t){var e;"object"==typeof(e=t)&&"function"==typeof e.glOnUnload&&t.glOnUnload()}),this.onUnloaded.promise.then(function(){return t.ngOnDestroy()}),this.onUnloaded.resolve(),this.windowSync.onUnload()},t.prototype.ngOnDestroy=function(){var t;e.isDevMode()&&console.log("Destroy@"+(this.isChildWindow?"child":"root")+"!"),this.layoutSubscription.unsubscribe(),this.appref.tick=this.appref.__tick,this.destroyGoldenLayout(),this._eventEmitter._mSubscriptions=((t={})[k.__lm.utils.EventEmitter.ALL_EVENT]=[],t),this.isChildWindow&&(console.log=console.__log)},t.prototype.getGoldenLayoutInstance=function(){if(!this.goldenLayout)throw new Error("Component is not initialized yet");return this.goldenLayout},t.prototype.addEvent=function(t,e,n){this._eventEmitter.on(t,e,n)},t.prototype.getSerializableState=function(){return this.goldenLayout?this.goldenLayout.toConfig():null},t.prototype.createNewComponent=function(t){if(!this.goldenLayout)throw new Error("golden layout is not initialized");var e=t,n=this.goldenLayout.root,o=null;if(n.contentItems&&0!==n.contentItems.length?o=this.findStack(n.contentItems):(o=n,e={type:"stack",content:[a({},e,{type:"component"})]}),null===o)throw new Error("this should never happen!");var i=this.goldenLayout.createContentItem(e);o.addChild(i)},t.prototype.findStack=function(t){var e,n;if(!t)return null;try{for(var o=s(t),i=o.next();!i.done;i=o.next()){var r=i.value;if(r.isStack){if(r.config.isDummy)continue;return r}var a=this.findStack(r.contentItems);if(null!==a)return a}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(e)throw e.error}}},t.prototype.destroyGoldenLayout=function(){this.goldenLayout&&(this.goldenLayout.off("stateChanged",this.pushStateChange),this.goldenLayout.off("itemDropped",this.resumeStateChange),this.goldenLayout.off("itemDragged",this.pauseStateChange),this.goldenLayout.off("tabActivated",this.pushTabActivated),this.goldenLayout.off(k.__lm.utils.EventEmitter.ALL_EVENT,this._eventEmitter.emit,this._eventEmitter),this.goldenLayout.destroy(),this.goldenLayout=null)},t.prototype.initializeGoldenLayout=function(t){var r=this;this.goldenLayout=new o(t,$(this.el.nativeElement));var u=this.goldenLayout.createPopout.bind(this.goldenLayout);this.goldenLayout.createPopout=function(t,e,n,o){for(var i,r=[t];r.length;){var a=r.shift();if(r.push.apply(r,c(a.contentItems)),a.isComponent){var s=a.container.__ngComponent;s&&("object"==typeof(i=s)&&"function"==typeof i.glOnPopout)&&s.glOnPopout()}console.log(a)}return console.log("beforepopout",t),u(t,e,n,o)};var d=function(t){var e,n,o={};try{for(var i=s(t.contentItems),r=i.next();!r.done;r=i.next()){var l=r.value;if(l.isComponent){if(l.config&&l.config.componentState&&l.config.componentState.originalId)continue;o[l.id]=l}else o=a({},o,d(l))}}catch(c){e={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return o};this.goldenLayout._getAllComponents=function(){return d(r.goldenLayout.root)},this.goldenLayout.generateAndMaximiseDummyStack=function(t){var e=r.tabsList.value,o=Object.keys(e);if(0!==o.length){var l=r.goldenLayout.root.contentItems[0];if(l.isStack)l.toggleMaximise();else{var c={type:"stack",content:o.map(function(t){return{type:"component",componentName:"gl-wrapper",title:e[t].config.title,reorderEnabled:!1,componentState:{originalId:t,originalComponent:e[t],originalTab:e[t].tab}}}),isClosable:!1,isDummy:!0,state:"dummy",activeItemIndex:o.findIndex(function(e){return e===t._activeContentItem.id})};l.addChild(c,0);var u=l.contentItems[0],d=new n.Subject;u.on("minimised",function(){console.log("minimised",u),d.next(),d.complete(),u.remove()}),u.toggleMaximise(),r.tabsList.pipe(i.takeUntil(d),i.distinctUntilChanged(function(t,e){var n=Object.keys(t),o=new Set(Object.keys(e));return n.length===o.size&&n.every(function(t){return o.has(t)})})).subscribe(function(t){var e,n,o,i,r=a({},t),l=new Set(Object.keys(r)),c=new Set(u.contentItems.map(function(t){return t.config.componentState.originalId}));try{for(var d=s(l),p=d.next();!p.done;p=d.next()){var h=p.value;c.has(h)?c["delete"](h):u.addChild({type:"component",componentName:"gl-wrapper",title:t[h].config.title,reorderEnabled:!1,componentState:{originalId:h,originalComponent:t[h],originalTab:t[h].tab}})}}catch(y){e={error:y}}finally{try{p&&!p.done&&(n=d["return"])&&n.call(d)}finally{if(e)throw e.error}}var f=function(t){u.contentItems.find(function(e){return e.config.componentState.originalId===t}).remove()};try{for(var m=s(c),g=m.next();!g.done;g=m.next()){f(g.value)}}catch(v){o={error:v}}finally{try{g&&!g.done&&(i=m["return"])&&i.call(m)}finally{if(o)throw o.error}}})}}},this.goldenLayout.on("popIn",function(){console.log("popIn"),r.poppedIn=!0,r.openedComponents.forEach(function(t){var e;"object"==typeof(e=t)&&"function"==typeof e.glOnPopin&&t.glOnPopin()})}),this.goldenLayout.getComponent=function(t){return e.isDevMode()&&console.log("Resolving component "+t),r.buildConstructor(t)},this.goldenLayout.on("stackCreated",function(t){var o=document.createElement("li");o.classList.add("custom-header"),o.style.display="none";var a=t.header.controlsContainer[0],s=null;a.prepend(o);var c=function(){o.style.display="none",s&&(o.childNodes.forEach(function(t){return o.removeChild(t)}),s.destroy(),s=null)};t.activeContentItem$.pipe(i.switchMap(function(t){return t&&t.isComponent&&t.instance||n.of(null)}),i.switchMap(function(t){if(!t)return Promise.all([null,null,null]);var e=t.instance.headerComponent,n=t.instance.additionalTokens;return Promise.all([Promise.resolve(e),Promise.resolve(n),Promise.resolve(t)])})).subscribe(function(t){var n=l(t,3),i=n[0],a=n[1],u=n[2];i&&u?function(t,n,i){s&&c(),o.style.display="";var a=r.componentFactoryResolver.resolveComponentFactory(t),l=e.Injector.create(n,i);s=r.viewContainer.createComponent(a,undefined,l),o.prepend(s.location.nativeElement)}(i,a||[],u.injector):c()},c,c)}),this.goldenLayout.init(),this.goldenLayout.on("stateChanged",this.pushStateChange),this.goldenLayout.on("itemDragged",this.pauseStateChange),this.goldenLayout.on("itemDropped",this.resumeStateChange),this.goldenLayout.on("tabActivated",this.pushTabActivated),this.goldenLayout.on(k.__lm.utils.EventEmitter.ALL_EVENT,this._eventEmitter.emit,this._eventEmitter)},t.prototype.buildConstructor=function(t){var e=this;return function(n,o){n.parent.id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});var i=new p;return e.ngZone.run(function(){e.componentRegistry.waitForComponent(t).then(function(r){console.log("Component "+t+" returned from componentRegistry");var a=e.componentFactoryResolver.resolveComponentFactory(r),s=null;r===e.fallbackComponent&&(s=n._config.componentName);var l=e._createComponentInjector(n,o,s),c=e.viewContainer.createComponent(a,undefined,l);n.getElement().append($(c.location.nativeElement)),e._bindEventHooks(n,c.instance),n.__ngComponent=c.instance,e.openedComponents.push(c.instance);var u=!1,d=function(){u||(u=!0,e.openedComponents=e.openedComponents.filter(function(t){return t!==c.instance}),$(c.location.nativeElement).remove(),c.destroy())};n.on("destroy",d),e.onUnloaded.promise.then(d),i.resolve(c)})}),i.promise}},t.prototype._createComponentInjector=function(t,n,o){var i=[{provide:y,useValue:t},{provide:v,useValue:n},{provide:w,useValue:this.goldenLayout.eventHub},{provide:C,useValue:this}];return o&&i.push({provide:E,useValue:o}),e.Injector.create(i,this.injector)},t.prototype._bindEventHooks=function(t,e){if(_(e)&&t.on("resize",function(){e.glOnResize()}),b(e)&&t.on("show",function(){e.glOnShow()}),I(e)&&t.on("hide",function(){e.glOnHide()}),L(e)&&t.on("tab",function(t){e.glOnTab(t)}),"object"==typeof(o=e)&&"function"==typeof o.glOnClose){var n=t.close.bind(t);t.close=function(){if(!t._config.isClosable)return!1;e.glOnClose().then(function(){n()},function(){})}}var o},t.decorators=[{type:e.Component,args:[{selector:"golden-layout-root",template:'<div class="ng-golden-layout-root" #glroot></div>',styles:["\n .ng-golden-layout-root {\n width:100%;\n height:100%;\n }"]}]}],t.ctorParameters=function(){return[{type:P},{type:S},{type:e.ViewContainerRef},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.NgZone},{type:e.Injector},{type:O},{type:undefined,decorators:[{type:e.Optional},{type:e.Inject,args:[j]}]}]},t.propDecorators={layout:[{type:e.Input}],stateChanged:[{type:e.Output}],tabActivated:[{type:e.Output}],el:[{type:e.ViewChild,args:["glroot",{"static":!0}]}],onResize:[{type:e.HostListener,args:["window:resize"]}],beforeUnload:[{type:e.HostListener,args:["window:beforeunload"]}],pageHide:[{type:e.HostListener,args:["window:pagehide"]}]},t}(),V=function(){function t(){}return t.forRoot=function(n,o,i){return{ngModule:t,providers:[S,P,g,m,O,{provide:e.APP_INITIALIZER,useValue:h,multi:!0},{provide:u,useValue:n},{provide:e.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:[n,o,x],multi:!0},{provide:d,useValue:i},{provide:j,useValue:o}]}},t.decorators=[{type:e.NgModule,args:[{declarations:[G,x],exports:[G],imports:[r.CommonModule]}]}],t}();t.ComponentRegistryService=S,t.FailedComponent=E,t.FallbackComponent=j,t.GoldenLayoutComponent=G,t.GoldenLayoutComponentHost=C,t.GoldenLayoutComponentState=v,t.GoldenLayoutComponents=u,t.GoldenLayoutContainer=y,t.GoldenLayoutEventHub=w,t.GoldenLayoutModule=V,t.GoldenLayoutPluginDependency=d,t.MultiWindowInit=h,t.MultiWindowService=f,t.PluginRegistryService=g,t.PluginURLProvider=m,t.RootWindowService=P,t.forChild=function(t){return[{provide:u,useValue:t},{provide:e.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:t,multi:!0}]},t.ɵa=O,t.ɵb=x,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-golden-layout.umd.min.js.map |
@@ -62,9 +62,15 @@ /** | ||
})))); | ||
///if (window === rootWindow) { | ||
/// const metadata = (Reflect as any).getMetadata('design:paramtypes', constr); | ||
/// (Reflect as any).metadata('design:paramtypes', metadata)(newConstructor); | ||
///} | ||
try { | ||
if (window === rootWindow) { | ||
/** @type {?} */ | ||
const metadata = ((/** @type {?} */ (Reflect))).getMetadata('design:paramtypes', constr); | ||
((/** @type {?} */ (Reflect))).metadata('design:paramtypes', metadata)(newConstructor); | ||
} | ||
} | ||
catch (_a) { | ||
// obviously, we're in ivy. | ||
} | ||
return (/** @type {?} */ (newConstructor)); | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGl3aW5kb3ctc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1nb2xkZW4tbGF5b3V0LyIsInNvdXJjZXMiOlsibGliL211bHRpd2luZG93LXNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLE1BQU0sVUFBVSxlQUFlO0lBQzdCLE9BQU8sQ0FBQyxHQUFHLENBQUMsaUJBQWlCLENBQUMsQ0FBQztJQ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IGNhdGNoIHtcbiAgICAgIC8vIG9idmlvdXNseSwgd2UncmUgaW4gaXZ5LlxuICAgIH1cbiAgICByZXR1cm4gbmV3Q29uc3RydWN0b3IgYXMgQ29uc3RydWN0b3I8VD47XG4gIH07XG59XG4iXX0= |
@@ -67,9 +67,15 @@ /** | ||
})))); | ||
///if (window === rootWindow) { | ||
/// const metadata = (Reflect as any).getMetadata('design:paramtypes', constr); | ||
/// (Reflect as any).metadata('design:paramtypes', metadata)(newConstructor); | ||
///} | ||
try { | ||
if (window === rootWindow) { | ||
/** @type {?} */ | ||
var metadata = ((/** @type {?} */ (Reflect))).getMetadata('design:paramtypes', constr); | ||
((/** @type {?} */ (Reflect))).metadata('design:paramtypes', metadata)(newConstructor); | ||
} | ||
} | ||
catch (_a) { | ||
// obviously, we're in ivy. | ||
} | ||
return (/** @type {?} */ (newConstructor)); | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGl3aW5kb3ctc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1nb2xkZW4tbGF5b3V0LyIsInNvdXJjZXMiOlsibGliL211bHRpd2luZG93LXNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxNQUFNLFVBQVUsZUFBZTtJQUM3QixPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixDQUFDLENBQUM7SUFDL0IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUU7UUFDbEIsQ0FBQyxtQkFBQSxNQUFNLEVBQU8sQ0FBQyxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsbUJBQUEsTUFBTSxFQUFPLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQztRQUN2RCxDQUFDLG1CQUFBLE1BQU0sRUFBTyxDQUFDLENBQUMscUJBQXFCLEdBQUcsSUFBSSxDQUFDLG1CQUFBLE1B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2luZG93ID0gKHdpbmRvdy5vcGVuZXIgfHwgd2luZG93KSBhcyBhbnk7XG4gICAgY29uc3QgbmV3Q29uc3RydWN0b3IgPSAoZnVuY3Rpb24oLi4uYXJnczogYW55W10pOiBUIHtcbiAgICAgIGNvbnN0IGhhc0luc3RhbmNlID0gcm9vdFdpbmRvdy5fX3NlcnZpY2VzLmhhcyhjb25zdHIubmFtZSk7XG4gICAgICBpZiAoIWhhc0luc3RhbmNlKSB7XG4gICAgICAgIGNvbnN0IHN0b3JlZENvbnN0ciA9IHJvb3RXaW5kb3cuX19zZXJ2aWNlQ29uc3RydWN0b3JzLmdldChjb25zdHIubmFtZSkgfHwgY29uc3RyO1xuICAgICAgICByb290V2luZG93Ll9fc2VydmljZXMuc2V0KGNvbnN0ci5uYW1lLCBuZXcgc3RvcmVkQ29uc3RyKC4uLmFyZ3MpKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiByb290V2luZG93Ll9fc2VydmljZXMuZ2V0KGNvbnN0ci5uYW1lKTtcbiAgICB9KSBhcyBhbnk7XG4gICAgdHJ5IHtcbiAgICAgIGlmICh3aW5kb3cgPT09IHJvb3RXaW5kb3cpIHtcbiAgICAgICAgY29uc3QgbWV0YWRhdGEgPSAoUmVmbGVjdCBhcyBhbnkpLmdldE1ldGFkYXRhKCdkZXNpZ246cGFyYW10eXBlcycsIGNvbnN0cik7XG4gICAgICAgIChSZWZsZWN0IGFzIGFueSkubWV0YWRhdGEoJ2Rlc2lnbjpwYXJhbXR5cGVzJywgbWV0YWRhdGEpKG5ld0NvbnN0cnVjdG9yKTtcbiAgICAgIH1cbiAgICB9IGNhdGNoIHtcbiAgICAgIC8vIG9idmlvdXNseSwgd2UncmUgaW4gaXZ5LlxuICAgIH1cbiAgICByZXR1cm4gbmV3Q29uc3RydWN0b3IgYXMgQ29uc3RydWN0b3I8VD47XG4gIH07XG59XG4iXX0= |
{ | ||
"name": "ngx-golden-layout", | ||
"version": "0.0.29", | ||
"version": "0.0.30", | ||
"license": "BSD-3-Clause", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1148357
12709