@hpcc-js/phosphor 2.15.2 → 2.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -73,5 +73,5 @@ var st=function(t,e){return st=Object.setPrototypeOf||{__proto__:[]}instanceof A
73
73
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
74
74
  PERFORMANCE OF THIS SOFTWARE.
75
75
  ***************************************************************************** */
76
- var oe=function(t,e){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},oe(t,e)};function re(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}oe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var se=function(){return se=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},se.apply(this,arguments)};function ae(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}var de,ce;ae(".phosphor_WidgetAdapter{background:#fff;border-bottom:1px solid silver;border-left:1px solid silver;border-right:1px solid silver;min-height:64px;min-width:64px}.phosphor_WidgetAdapter.p-DockPanel-widget{border-top:none;box-shadow:0 -1px 0 rgba(0,0,0,.2),1px 1px 2px rgba(0,0,0,.2)}.phosphor_WidgetAdapter.p-SplitPanel-child{border:none}"),t.Msg=void 0,de=t.Msg||(t.Msg={}),ce=function(t){function e(e){var i=t.call(this,"wa-activate-request")||this;return i._wa=e,i}return re(e,t),Object.defineProperty(e.prototype,"wa",{get:function(){return this._wa},enumerable:!1,configurable:!0}),e.prototype.conflate=function(t){return this._wa=t.wa,!0},e}(G),de.WAActivateRequest=ce;var he=function(i){function n(t,n,o,r,s){void 0===o&&(o={}),void 0===r&&(r=!1),void 0===s&&(s={});var a=i.call(this)||this;return a.lparam={},a.padding=0,a._width=0,a._height=0,a._owner=t,a._element=e.select(a.node),a.addClass("phosphor_WidgetAdapter"),a.title.label="",a.title.closable=!!r,a.title.caption="Long description for: ".concat(name),a._ext=s,a._closable="boolean"==typeof r?{canClose:function(t,e){return r}}:r,n instanceof e.Widget?a._widget=n.target(a.node):a._widgetLayout=n,a.lparam=o,a}return re(n,i),Object.defineProperty(n.prototype,"widget",{get:function(){return this._widget},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"inputNode",{get:function(){return this.node.getElementsByTagName("input")[0]},enumerable:!1,configurable:!0}),n.prototype.resizeAndRender=function(){this._widget&&(e.select(this.node).style("padding",this.padding+"px").style("width",this._width+"px").style("height",this._height+"px").style("overflow-x",this._ext.overflowX).style("overflow-y",this._ext.overflowY),this._widget.resize({width:this._width-2*this.padding-2,height:this._height-2*this.padding-2}).lazyRender())},n.prototype.onActivateRequest=function(e){i.prototype.onActivateRequest.call(this,e),this._widget&&this.resizeAndRender(),this._owner&&Y.postMessage(this._owner,new t.Msg.WAActivateRequest(this))},n.prototype.onResize=function(t){i.prototype.onResize.call(this,t),this.node&&null!==this.node.offsetParent&&t.width>=0&&t.height>=0?(this._width=t.width,this._height=t.height,this.resizeAndRender()):this._widgetLayout},n.prototype.onCloseRequest=function(t){this._closable.canClose(this._widget,this)&&this.dispose()},n}(pt),le=function(t){function e(e){return t.apply(this,e)||this}return re(e,t),e.create=function(){return Object.create(e.prototype)},e.prototype.watchRendered=function(t,e){if(e)var i=this.map((function(t){return{wa:t,w:t.widget,rc:t.widget.renderCount()}})),n=setInterval((function(){(function(){for(var t=0,e=i;t<e.length;t++){var n=e[t];if(n.wa.isVisible&&n.rc>=n.w.renderCount())return!1}return!0})()&&(clearInterval(n),e(t))}),20)},e}(Array),ue=function(t){function e(){return t.call(this)||this}return re(e,t),e.prototype.createTabBar=function(){var e=t.prototype.createTabBar.call(this);return e.tabsMovable=this._owner.tabsMovable,e},e}(Ut.Renderer),pe=function(t){function e(e){void 0===e&&(e={});var i=this;return e.renderer=e.renderer||new ue,(i=t.call(this,e)||this)._renderer instanceof ue&&(i._renderer._owner=i),i._content=le.create(),i._contentMap={},i}return re(e,t),e.prototype.appendContent=function(t){this._content.push(t),this._contentMap[t.widget.id()]=t},e.prototype.removeContent=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1),delete this._contentMap[t.widget.id()],t.dispose()},e.prototype.content=function(){return this._content},e.prototype.serializeWidget=function(t){if(t instanceof he)try{return{__id:t.widget.id()}}catch(t){return{exception:{message:t.message,stack:t.stack}}}return null},e.prototype.deserializeWidget=function(t){var e=this._contentMap[t.__id];return e||(e=new he(void 0,t)),e},e.prototype.serializeITabAreaConfig=function(t,e){var i=this;return se(se({},t),{widgets:t.widgets.map((function(t){return e?i.deserializeWidget(t):i.serializeWidget(t)}))})},e.prototype.serializeISplitAreaConfig=function(t,e){var i=this;return se(se({},t),{children:t.children.map((function(t){return i.serializeAreaConfig(t,e)}))})},e.prototype.serializeAreaConfig=function(t,e){if(t)switch(t.type){case"tab-area":return this.serializeITabAreaConfig(t,e);case"split-area":return this.serializeISplitAreaConfig(t,e)}},e.prototype.saveLayout=function(){return{main:this.serializeAreaConfig(t.prototype.saveLayout.call(this).main,!1)}},e.prototype.restoreLayout=function(e){return t.prototype.restoreLayout.call(this,{main:this.serializeAreaConfig(e.main,!0)})},e}(Ut);ae('.p-DockPanel-overlay{background:hsla(0,0%,100%,.6);border:1px dashed #000;transition-duration:.15s;transition-property:top,left,right,bottom;transition-timing-function:ease}.p-TabBar{max-height:24px;min-height:24px}.p-TabBar-content{align-items:flex-end;min-height:0;min-width:0}.p-TabPanel-tabBar .p-TabBar-content{border-bottom:1px solid silver}.p-TabBar-tab{background:#e5e5e5;border:1px solid silver;border-bottom:none;flex:0 1 125px;font:12px Helvetica,Arial,sans-serif;line-height:20px;margin-left:-1px;max-height:20px;min-height:20px;min-width:35px;padding:0 10px}.p-TabBar-tab.p-mod-current{background:#fff}.p-TabBar-tab:hover:not(.p-mod-current){background:#f0f0f0}.p-TabBar-tab:first-child{margin-left:0}.p-TabBar-tab.p-mod-current{max-height:23px;min-height:23px;transform:translateY(1px)}.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon,.p-TabBar-tabLabel{display:inline-block}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon{margin-left:4px}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon:before{content:"\\f00d";font-family:FontAwesome}.p-TabBar-tab.p-mod-drag-image{border:none;box-shadow:1px 1px 2px rgba(0,0,0,.3);max-height:23px;min-height:23px;min-width:125px;transform:translateX(-40%) translateY(-58%)}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide{max-height:1px!important;min-height:1px!important}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide .p-TabBar-tab.p-mod-current{display:none}');var fe=function(t){function i(){var e=t.call(this)||this;return e._dock=new pe({mode:"multiple-document"}),e._layoutObj=null,e._tag="div",e._dock.id="p"+e.id(),Y.installMessageHook(e,e),e}return re(i,t),i.prototype.getWidgetAdapter=function(t){var e=null;return this._dock.content().some((function(i){return i.widget===t&&(e=i,!0)})),e},i.prototype.addWidget=function(t,e,i,n,o){void 0===i&&(i="split-right");var r={mode:i,ref:this.getWidgetAdapter(n)},s=new he(this,t,{},o);return s.title.label=e,s.padding=8,this._dock.addWidget(s,r),this._dock.appendContent(s),this._dock.tabsMovable=!0,this},i.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);return e&&(t.target(null),this._dock.removeContent(e)),this},i.prototype.isVisible=function(t){return this.getWidgetAdapter(t).isVisible},i.prototype.widgetAdapters=function(){return this._dock.content()},i.prototype.widgets=function(){return this._dock.content().map((function(t){return t.widget}))},i.prototype.layout=function(t){return arguments.length?(this._dock.restoreLayout(t),this):this._dock.saveLayout()},i.prototype.layoutObj=function(t){return this._layoutObj=t,this},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._pPlaceholder=i.append("div"),pt.attach(this._dock,this._pPlaceholder.node())},i.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._pPlaceholder.style("width",this.width()+"px").style("height",this.height()+"px").style("overflow","auto"),i.select(".p-Widget").style("width",this._pPlaceholder.node().clientWidth+"px").style("height",this.height()+"px"),this.widgets().forEach((function(t){return t.render()}))},i.prototype.exit=function(e,i){var n=this;(function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))})([],this.widgets(),!0).forEach((function(t){return n.removeWidget(t)})),t.prototype.exit.call(this,e,i)},i.prototype.render=function(i){var n=this,o=this;return null!==this._layoutObj&&(this.layout(this._layoutObj),this.layoutObj(null)),t.prototype.render.call(this,(function(t){n._dock.content().watchRendered(n,i),n._dock.update(),setTimeout((function(){var t=n.element().selectAll(".p-Widget.p-TabBar.p-DockPanel-tabBar"),i=!1;t.each((function(){var t=e.select(this),n=t.node().childNodes[0].childNodes.length,r=o.hideSingleTabs()&&1===n;r!==t.classed("hide")&&(t.classed("hide",r),i=!0)})),i&&n._dock.fit()}),0)}))},i.prototype.refit=function(){this._dock.fit()},i.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},i.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa,i=e.widget;this._prevActive!==i&&(this._prevActive=i,this.childActivation(i,e))}},i.prototype.childActivation=function(t,e){},i.prototype.active=function(){return this._prevActive},i}(e.HTMLWidget);fe.prototype._class+=" phosphor_DockPanel",fe.prototype.publish("hideSingleTabs",!1,"boolean");var me=function(t){function e(e){void 0===e&&(e="vertical");var i=t.call(this)||this;return i.content=le.create(),i._split=new St({orientation:e}),i._tag="div",i._split.id="p"+i.id(),i}return re(e,t),e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(i){return i.widget===t&&(e=i,!0)})),e},e.prototype.addWidget=function(t){var e=new he(this,t);return this._split.addWidget(e),this.content.push(e),this},e.prototype.relativeSizes=function(t){return arguments.length?(this._split.setRelativeSizes(t),this):this._split.relativeSizes()},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),pt.attach(this._split,e)},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),i.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,(function(t){i.content.watchRendered(i,e),i._split.update()}))},e}(e.HTMLWidget);me.prototype._class+=" phosphor_SplitPanel";var ve=function(t){function e(){var e=t.call(this)||this;return e._tab=new ie({tabPlacement:"top"}),e.content=le.create(),e._tag="div",e._tab.id="p"+e.id(),e}return re(e,t),e.prototype.getWidget=function(t){if(t instanceof he)return t.widget},e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(i){return i.widget===t&&(e=i,!0)})),e},e.prototype.addWidget=function(t,e,i){void 0===i&&(i={}),this._prevActive||(this._prevActive=t);var n=new he(this,t,void 0,void 0,i);return n.title.label=e,n.padding=8,this._tab.addWidget(n),this.content.push(n),this},e.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);if(e){var i=this.content.indexOf(e);i>=0&&this.content.splice(i,1),t.target(null),e.dispose()}return this},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),pt.attach(this._tab,e)},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),i.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,(function(t){i.content.watchRendered(i,e),i._tab.update()}))},e.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},e.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa.widget;this._prevActive!==e&&(this._prevActive=e,this.childActivation(e))}},e.prototype.childActivation=function(t){},e.prototype.active=function(t){return arguments.length?(this._tab.currentWidget=this.getWidgetAdapter(t),this):this.getWidget(this._tab.currentWidget)},e}(e.HTMLWidget);ve.prototype._class+=" phosphor_TabPanel",t.BUILD_VERSION="2.102.4",t.ContextMenu=Wt,t.DockPanel=fe,t.PKG_NAME="@hpcc-js/phosphor",t.PKG_VERSION="2.15.2",t.SplitPanel=me,t.TabPanel=ve,t.WidgetAdapter=he,t.WidgetAdapterArray=le,Object.defineProperty(t,"__esModule",{value:!0})}));
76
+ var oe=function(t,e){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},oe(t,e)};function re(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}oe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var se=function(){return se=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},se.apply(this,arguments)};function ae(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}var de,ce;ae(".phosphor_WidgetAdapter{background:#fff;border-bottom:1px solid silver;border-left:1px solid silver;border-right:1px solid silver;min-height:64px;min-width:64px}.phosphor_WidgetAdapter.p-DockPanel-widget{border-top:none;box-shadow:0 -1px 0 rgba(0,0,0,.2),1px 1px 2px rgba(0,0,0,.2)}.phosphor_WidgetAdapter.p-SplitPanel-child{border:none}"),t.Msg=void 0,de=t.Msg||(t.Msg={}),ce=function(t){function e(e){var i=t.call(this,"wa-activate-request")||this;return i._wa=e,i}return re(e,t),Object.defineProperty(e.prototype,"wa",{get:function(){return this._wa},enumerable:!1,configurable:!0}),e.prototype.conflate=function(t){return this._wa=t.wa,!0},e}(G),de.WAActivateRequest=ce;var he=function(i){function n(t,n,o,r,s){void 0===o&&(o={}),void 0===r&&(r=!1),void 0===s&&(s={});var a=i.call(this)||this;return a.lparam={},a.padding=0,a._width=0,a._height=0,a._owner=t,a._element=e.select(a.node),a.addClass("phosphor_WidgetAdapter"),a.title.label="",a.title.closable=!!r,a.title.caption="Long description for: ".concat(name),a._ext=s,a._closable="boolean"==typeof r?{canClose:function(t,e){return r}}:r,n instanceof e.Widget?a._widget=n.target(a.node):a._widgetLayout=n,a.lparam=o,a}return re(n,i),Object.defineProperty(n.prototype,"widget",{get:function(){return this._widget},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"inputNode",{get:function(){return this.node.getElementsByTagName("input")[0]},enumerable:!1,configurable:!0}),n.prototype.resizeAndRender=function(){this._widget&&(e.select(this.node).style("padding",this.padding+"px").style("width",this._width+"px").style("height",this._height+"px").style("overflow-x",this._ext.overflowX).style("overflow-y",this._ext.overflowY),this._widget.resize({width:this._width-2*this.padding-2,height:this._height-2*this.padding-2}).lazyRender())},n.prototype.onActivateRequest=function(e){i.prototype.onActivateRequest.call(this,e),this._widget&&this.resizeAndRender(),this._owner&&Y.postMessage(this._owner,new t.Msg.WAActivateRequest(this))},n.prototype.onResize=function(t){i.prototype.onResize.call(this,t),this.node&&null!==this.node.offsetParent&&t.width>=0&&t.height>=0?(this._width=t.width,this._height=t.height,this.resizeAndRender()):this._widgetLayout},n.prototype.onCloseRequest=function(t){this._closable.canClose(this._widget,this)&&this.dispose()},n}(pt),le=function(t){function e(e){return t.apply(this,e)||this}return re(e,t),e.create=function(){return Object.create(e.prototype)},e.prototype.watchRendered=function(t,e){if(e)var i=this.map((function(t){return{wa:t,w:t.widget,rc:t.widget.renderCount()}})),n=setInterval((function(){(function(){for(var t=0,e=i;t<e.length;t++){var n=e[t];if(n.wa.isVisible&&n.rc>=n.w.renderCount())return!1}return!0})()&&(clearInterval(n),e(t))}),20)},e}(Array),ue=function(t){function e(){return t.call(this)||this}return re(e,t),e.prototype.createTabBar=function(){var e=t.prototype.createTabBar.call(this);return e.tabsMovable=this._owner.tabsMovable,e},e}(Ut.Renderer),pe=function(t){function e(e){void 0===e&&(e={});var i=this;return e.renderer=e.renderer||new ue,(i=t.call(this,e)||this)._renderer instanceof ue&&(i._renderer._owner=i),i._content=le.create(),i._contentMap={},i}return re(e,t),e.prototype.appendContent=function(t){this._content.push(t),this._contentMap[t.widget.id()]=t},e.prototype.removeContent=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1),delete this._contentMap[t.widget.id()],t.dispose()},e.prototype.content=function(){return this._content},e.prototype.serializeWidget=function(t){if(t instanceof he)try{return{__id:t.widget.id()}}catch(t){return{exception:{message:t.message,stack:t.stack}}}return null},e.prototype.deserializeWidget=function(t){var e=this._contentMap[t.__id];return e||(e=new he(void 0,t)),e},e.prototype.serializeITabAreaConfig=function(t,e){var i=this;return se(se({},t),{widgets:t.widgets.map((function(t){return e?i.deserializeWidget(t):i.serializeWidget(t)}))})},e.prototype.serializeISplitAreaConfig=function(t,e){var i=this;return se(se({},t),{children:t.children.map((function(t){return i.serializeAreaConfig(t,e)}))})},e.prototype.serializeAreaConfig=function(t,e){if(t)switch(t.type){case"tab-area":return this.serializeITabAreaConfig(t,e);case"split-area":return this.serializeISplitAreaConfig(t,e)}},e.prototype.saveLayout=function(){return{main:this.serializeAreaConfig(t.prototype.saveLayout.call(this).main,!1)}},e.prototype.restoreLayout=function(e){return t.prototype.restoreLayout.call(this,{main:this.serializeAreaConfig(e.main,!0)})},e}(Ut);ae('.p-DockPanel-overlay{background:hsla(0,0%,100%,.6);border:1px dashed #000;transition-duration:.15s;transition-property:top,left,right,bottom;transition-timing-function:ease}.p-TabBar{max-height:24px;min-height:24px}.p-TabBar-content{align-items:flex-end;min-height:0;min-width:0}.p-TabPanel-tabBar .p-TabBar-content{border-bottom:1px solid silver}.p-TabBar-tab{background:#e5e5e5;border:1px solid silver;border-bottom:none;flex:0 1 125px;font:12px Helvetica,Arial,sans-serif;line-height:20px;margin-left:-1px;max-height:20px;min-height:20px;min-width:35px;padding:0 10px}.p-TabBar-tab.p-mod-current{background:#fff}.p-TabBar-tab:hover:not(.p-mod-current){background:#f0f0f0}.p-TabBar-tab:first-child{margin-left:0}.p-TabBar-tab.p-mod-current{max-height:23px;min-height:23px;transform:translateY(1px)}.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon,.p-TabBar-tabLabel{display:inline-block}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon{margin-left:4px}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon:before{content:"\\f00d";font-family:FontAwesome}.p-TabBar-tab.p-mod-drag-image{border:none;box-shadow:1px 1px 2px rgba(0,0,0,.3);max-height:23px;min-height:23px;min-width:125px;transform:translateX(-40%) translateY(-58%)}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide{max-height:1px!important;min-height:1px!important}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide .p-TabBar-tab.p-mod-current{display:none}');var fe=function(t){function i(){var e=t.call(this)||this;return e._dock=new pe({mode:"multiple-document"}),e._layoutObj=null,e._tag="div",e._dock.id="p"+e.id(),Y.installMessageHook(e,e),e}return re(i,t),i.prototype.getWidgetAdapter=function(t){var e=null;return this._dock.content().some((function(i){return i.widget===t&&(e=i,!0)})),e},i.prototype.addWidget=function(t,e,i,n,o){void 0===i&&(i="split-right");var r={mode:i,ref:this.getWidgetAdapter(n)},s=new he(this,t,{},o);return s.title.label=e,s.padding=8,this._dock.addWidget(s,r),this._dock.appendContent(s),this._dock.tabsMovable=!0,this},i.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);return e&&(t.target(null),this._dock.removeContent(e)),this},i.prototype.isVisible=function(t){return this.getWidgetAdapter(t).isVisible},i.prototype.widgetAdapters=function(){return this._dock.content()},i.prototype.widgets=function(){return this._dock.content().map((function(t){return t.widget}))},i.prototype.layout=function(t){return arguments.length?(this._dock.restoreLayout(t),this):this._dock.saveLayout()},i.prototype.layoutObj=function(t){return this._layoutObj=t,this},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._pPlaceholder=i.append("div"),pt.attach(this._dock,this._pPlaceholder.node())},i.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._pPlaceholder.style("width",this.width()+"px").style("height",this.height()+"px").style("overflow","auto"),i.select(".p-Widget").style("width",this._pPlaceholder.node().clientWidth+"px").style("height",this.height()+"px"),this.widgets().forEach((function(t){return t.render()}))},i.prototype.exit=function(e,i){var n=this;(function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))})([],this.widgets(),!0).forEach((function(t){return n.removeWidget(t)})),t.prototype.exit.call(this,e,i)},i.prototype.render=function(i){var n=this,o=this;return null!==this._layoutObj&&(this.layout(this._layoutObj),this.layoutObj(null)),t.prototype.render.call(this,(function(t){n._dock.content().watchRendered(n,i),n._dock.update(),setTimeout((function(){var t=n.element().selectAll(".p-Widget.p-TabBar.p-DockPanel-tabBar"),i=!1;t.each((function(){var t=e.select(this),n=t.node().childNodes[0].childNodes.length,r=o.hideSingleTabs()&&1===n;r!==t.classed("hide")&&(t.classed("hide",r),i=!0)})),i&&n._dock.fit()}),0)}))},i.prototype.refit=function(){this._dock.fit()},i.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},i.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa,i=e.widget;this._prevActive!==i&&(this._prevActive=i,this.childActivation(i,e))}},i.prototype.childActivation=function(t,e){},i.prototype.active=function(){return this._prevActive},i}(e.HTMLWidget);fe.prototype._class+=" phosphor_DockPanel",fe.prototype.publish("hideSingleTabs",!1,"boolean");var me=function(t){function e(e){void 0===e&&(e="vertical");var i=t.call(this)||this;return i.content=le.create(),i._split=new St({orientation:e}),i._tag="div",i._split.id="p"+i.id(),i}return re(e,t),e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(i){return i.widget===t&&(e=i,!0)})),e},e.prototype.addWidget=function(t){var e=new he(this,t);return this._split.addWidget(e),this.content.push(e),this},e.prototype.relativeSizes=function(t){return arguments.length?(this._split.setRelativeSizes(t),this):this._split.relativeSizes()},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),pt.attach(this._split,e)},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),i.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,(function(t){i.content.watchRendered(i,e),i._split.update()}))},e}(e.HTMLWidget);me.prototype._class+=" phosphor_SplitPanel";var ve=function(t){function e(){var e=t.call(this)||this;return e._tab=new ie({tabPlacement:"top"}),e.content=le.create(),e._tag="div",e._tab.id="p"+e.id(),e}return re(e,t),e.prototype.getWidget=function(t){if(t instanceof he)return t.widget},e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(i){return i.widget===t&&(e=i,!0)})),e},e.prototype.addWidget=function(t,e,i){void 0===i&&(i={}),this._prevActive||(this._prevActive=t);var n=new he(this,t,void 0,void 0,i);return n.title.label=e,n.padding=8,this._tab.addWidget(n),this.content.push(n),this},e.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);if(e){var i=this.content.indexOf(e);i>=0&&this.content.splice(i,1),t.target(null),e.dispose()}return this},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),pt.attach(this._tab,e)},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),i.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,(function(t){i.content.watchRendered(i,e),i._tab.update()}))},e.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},e.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa.widget;this._prevActive!==e&&(this._prevActive=e,this.childActivation(e))}},e.prototype.childActivation=function(t){},e.prototype.active=function(t){return arguments.length?(this._tab.currentWidget=this.getWidgetAdapter(t),this):this.getWidget(this._tab.currentWidget)},e}(e.HTMLWidget);ve.prototype._class+=" phosphor_TabPanel",t.BUILD_VERSION="2.102.8",t.ContextMenu=Wt,t.DockPanel=fe,t.PKG_NAME="@hpcc-js/phosphor",t.PKG_VERSION="2.15.3",t.SplitPanel=me,t.TabPanel=ve,t.WidgetAdapter=he,t.WidgetAdapterArray=le,Object.defineProperty(t,"__esModule",{value:!0})}));
77
77
  //# sourceMappingURL=index.min.js.map