@deephaven/golden-layout 0.19.2-beta.0 → 0.19.2-beta.11
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/LayoutManager.d.ts +313 -0
- package/dist/LayoutManager.d.ts.map +1 -0
- package/dist/LayoutManager.js +468 -450
- package/dist/LayoutManager.js.map +1 -1
- package/dist/base.d.ts +16 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +6 -6
- package/dist/base.js.map +1 -1
- package/dist/config/Config.d.ts +146 -0
- package/dist/config/Config.d.ts.map +1 -0
- package/dist/config/{defaultConfig.js → Config.js} +6 -6
- package/dist/config/Config.js.map +1 -0
- package/dist/config/ItemConfig.d.ts +66 -0
- package/dist/config/ItemConfig.d.ts.map +1 -0
- package/dist/config/ItemConfig.js +14 -0
- package/dist/config/ItemConfig.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -6
- package/dist/config/index.js.map +1 -1
- package/dist/container/ItemContainer.d.ts +91 -0
- package/dist/container/ItemContainer.d.ts.map +1 -0
- package/dist/container/ItemContainer.js +110 -85
- package/dist/container/ItemContainer.js.map +1 -1
- package/dist/container/index.d.ts +3 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +2 -4
- package/dist/container/index.js.map +1 -1
- package/dist/controls/BrowserPopout.d.ts +83 -0
- package/dist/controls/BrowserPopout.d.ts.map +1 -0
- package/dist/controls/BrowserPopout.js +135 -101
- package/dist/controls/BrowserPopout.js.map +1 -1
- package/dist/controls/DragProxy.d.ts +67 -0
- package/dist/controls/DragProxy.d.ts.map +1 -0
- package/dist/controls/DragProxy.js +135 -110
- package/dist/controls/DragProxy.js.map +1 -1
- package/dist/controls/DragSource.d.ts +30 -0
- package/dist/controls/DragSource.d.ts.map +1 -0
- package/dist/controls/DragSource.js +37 -29
- package/dist/controls/DragSource.js.map +1 -1
- package/dist/controls/DragSourceFromEvent.d.ts +30 -0
- package/dist/controls/DragSourceFromEvent.d.ts.map +1 -0
- package/dist/controls/DragSourceFromEvent.js +49 -36
- package/dist/controls/DragSourceFromEvent.js.map +1 -1
- package/dist/controls/DropTargetIndicator.d.ts +14 -0
- package/dist/controls/DropTargetIndicator.d.ts.map +1 -0
- package/dist/controls/DropTargetIndicator.js +18 -14
- package/dist/controls/DropTargetIndicator.js.map +1 -1
- package/dist/controls/Header.d.ts +145 -0
- package/dist/controls/Header.d.ts.map +1 -0
- package/dist/controls/Header.js +414 -271
- package/dist/controls/Header.js.map +1 -1
- package/dist/controls/HeaderButton.d.ts +9 -0
- package/dist/controls/HeaderButton.d.ts.map +1 -0
- package/dist/controls/HeaderButton.js +19 -13
- package/dist/controls/HeaderButton.js.map +1 -1
- package/dist/controls/Splitter.d.ts +12 -0
- package/dist/controls/Splitter.d.ts.map +1 -0
- package/dist/controls/Splitter.js +36 -20
- package/dist/controls/Splitter.js.map +1 -1
- package/dist/controls/Tab.d.ts +91 -0
- package/dist/controls/Tab.d.ts.map +1 -0
- package/dist/controls/Tab.js +131 -119
- package/dist/controls/Tab.js.map +1 -1
- package/dist/controls/TransitionIndicator.d.ts +25 -0
- package/dist/controls/TransitionIndicator.d.ts.map +1 -0
- package/dist/controls/TransitionIndicator.js +53 -39
- package/dist/controls/TransitionIndicator.js.map +1 -1
- package/dist/controls/index.d.ts +11 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +10 -22
- package/dist/controls/index.js.map +1 -1
- package/dist/errors/ConfigurationError.d.ts +6 -0
- package/dist/errors/ConfigurationError.d.ts.map +1 -0
- package/dist/errors/ConfigurationError.js +15 -8
- package/dist/errors/ConfigurationError.js.map +1 -1
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +1 -4
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/items/AbstractContentItem.d.ts +233 -0
- package/dist/items/AbstractContentItem.d.ts.map +1 -0
- package/dist/items/AbstractContentItem.js +284 -242
- package/dist/items/AbstractContentItem.js.map +1 -1
- package/dist/items/Component.d.ts +30 -0
- package/dist/items/Component.d.ts.map +1 -0
- package/dist/items/Component.js +61 -42
- package/dist/items/Component.js.map +1 -1
- package/dist/items/Root.d.ts +18 -0
- package/dist/items/Root.d.ts.map +1 -0
- package/dist/items/Root.js +68 -38
- package/dist/items/Root.js.map +1 -1
- package/dist/items/RowOrColumn.d.ts +157 -0
- package/dist/items/RowOrColumn.d.ts.map +1 -0
- package/dist/items/RowOrColumn.js +219 -187
- package/dist/items/RowOrColumn.js.map +1 -1
- package/dist/items/Stack.d.ts +108 -0
- package/dist/items/Stack.d.ts.map +1 -0
- package/dist/items/Stack.js +218 -151
- package/dist/items/Stack.js.map +1 -1
- package/dist/items/index.d.ts +8 -0
- package/dist/items/index.d.ts.map +1 -0
- package/dist/items/index.js +7 -12
- package/dist/items/index.js.map +1 -1
- package/dist/utils/BubblingEvent.d.ts +8 -0
- package/dist/utils/BubblingEvent.d.ts.map +1 -0
- package/dist/utils/BubblingEvent.js +18 -9
- package/dist/utils/BubblingEvent.js.map +1 -1
- package/dist/utils/ConfigMinifier.d.ts +21 -0
- package/dist/utils/ConfigMinifier.d.ts.map +1 -0
- package/dist/utils/ConfigMinifier.js +121 -121
- package/dist/utils/ConfigMinifier.js.map +1 -1
- package/dist/utils/DragListener.d.ts +34 -0
- package/dist/utils/DragListener.d.ts.map +1 -0
- package/dist/utils/DragListener.js +103 -70
- package/dist/utils/DragListener.js.map +1 -1
- package/dist/utils/EventEmitter.d.ts +59 -0
- package/dist/utils/EventEmitter.d.ts.map +1 -0
- package/dist/utils/EventEmitter.js +64 -70
- package/dist/utils/EventEmitter.js.map +1 -1
- package/dist/utils/EventHub.d.ts +55 -0
- package/dist/utils/EventHub.d.ts.map +1 -0
- package/dist/utils/EventHub.js +83 -105
- package/dist/utils/EventHub.js.map +1 -1
- package/dist/utils/ReactComponentHandler.d.ts +54 -0
- package/dist/utils/ReactComponentHandler.d.ts.map +1 -0
- package/dist/utils/ReactComponentHandler.js +58 -56
- package/dist/utils/ReactComponentHandler.js.map +1 -1
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/utils.d.ts +25 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +21 -145
- package/dist/utils/utils.js.map +1 -1
- package/package.json +9 -5
- package/dist/config/ItemDefaultConfig.js +0 -8
- package/dist/config/ItemDefaultConfig.js.map +0 -1
- package/dist/config/defaultConfig.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutManager.js","names":["$","lm","LayoutManager","config","container","noConflict","errorMsg","Error","utils","EventEmitter","call","isInitialised","_isFullPage","_resizeTimeoutId","_components","ReactComponentHandler","_fallbackComponent","undefined","_itemAreas","_resizeFunction","fnBind","_onResize","_unloadFunction","_onUnload","_windowBlur","bind","_windowFocus","_maximisedItem","_maximisePlaceholder","_creationTimeoutPassed","_subWindowsCreated","_dragSources","_updatingColumnsResponsive","_firstLoad","width","height","root","openPopouts","selectedItem","isSubWindow","eventHub","EventHub","_createConfig","dropTargetIndicator","transitionIndicator","tabDropPlaceholder","css","_typeToItem","column","items","RowOrColumn","row","stack","Stack","component","Component","__lm","minifyConfig","ConfigMinifier","unminifyConfig","copy","prototype","registerComponent","name","constructor","render","cleanup","setFallbackComponent","toConfig","next","i","AbstractContentItem","settings","dimensions","labels","content","configNode","item","key","componentName","type","contentItems","length","_$reconcilePopoutWindows","push","maximisedItemId","getComponent","getFallbackComponent","init","_createSubWindows","document","readyState","body","ready","setTimeout","_adjustToWindowMode","_setContainer","controls","DropTargetIndicator","TransitionIndicator","updateSize","_create","_bindEvents","_adjustColumnsResponsive","emit","arguments","callDownwards","element","destroy","window","off","remove","forEach","dragSource","_dragListener","_element","_itemConfig","createContentItem","parent","typeErrorMsg","contentItem","errors","ConfigurationError","objectKeys","join","Root","createPopout","configOrContentItem","parentId","indexInParent","isItem","self","windowLeft","windowTop","offset","child","browserPopout","getUniqueId","isRoot","addId","isNaN","indexOf","Array","screenX","screenLeft","screenY","screenTop","left","top","BrowserPopout","on","createDragSource","itemConfig","constrainDragToContainer","DragSource","createDragSourceFromEvent","event","DragSourceFromEvent","selectItem","_$silent","selectionEnabled","deselect","select","_$maximiseItem","_$minimiseItem","addClass","after","prepend","removeClass","removeId","_$closeWindow","close","_$getArea","x","y","area","smallestSurface","Infinity","mathingArea","x1","x2","y1","y2","surface","_$createRootItemAreas","areaSize","sides","side","_$calculateItemAreas","allContentItems","_getAllContentItems","isStack","concat","header","_contentAreaDimensions","highlightArea","_$normalizeContentItem","contentItemOrConfig","isFunction","isPlainObject","newContentItem","getWindow","closed","addChildren","resize","clearTimeout","windowConfigKey","getQueryStringParam","localStorage","getItem","JSON","parse","removeItem","extend","defaultConfig","nextNode","node","hasHeaders","headerHeight","popInButton","popin","click","title","stripTags","append","html","offsetHeight","__glInstance","popout","margin","padding","overflow","getItemsById","toggleMaximise","closePopoutsOnUnload","_useResponsiveLayout","minItemWidth","isRow","columnCount","totalMinWidth","finalColumnCount","Math","max","floor","stackColumnCount","rootContentItem","firstStackContainer","_findAllStackContainers","_addChildContentItemsToContainer","responsiveMode","addChild","removeChild","stackContainers","_findAllStackContainersRecursive","isComponent"],"sources":["../src/LayoutManager.js"],"sourcesContent":["import $ from 'jquery';\nimport lm from './base.js';\n\n/**\n * The main class that will be exposed as GoldenLayout.\n *\n * @public\n * @constructor\n * @param {GoldenLayout config} config\n * @param {[DOM element container]} container Can be a jQuery selector string or a Dom element. Defaults to body\n *\n * @returns {VOID}\n */\nconst LayoutManager = function (config, container) {\n if (!$ || typeof $.noConflict !== 'function') {\n var errorMsg = 'jQuery is missing as dependency for GoldenLayout. ';\n errorMsg +=\n 'Please either expose $ on GoldenLayout\\'s scope (e.g. window) or add \"jquery\" to ';\n errorMsg += 'your paths when using RequireJS/AMD';\n throw new Error(errorMsg);\n }\n lm.utils.EventEmitter.call(this);\n\n this.isInitialised = false;\n this._isFullPage = false;\n this._resizeTimeoutId = null;\n this._components = { 'lm-react-component': lm.utils.ReactComponentHandler };\n this._fallbackComponent = undefined;\n this._itemAreas = [];\n this._resizeFunction = lm.utils.fnBind(this._onResize, this);\n this._unloadFunction = lm.utils.fnBind(this._onUnload, this);\n this._windowBlur = this._windowBlur.bind(this);\n this._windowFocus = this._windowFocus.bind(this);\n this._maximisedItem = null;\n this._maximisePlaceholder = $('<div class=\"lm_maximise_place\"></div>');\n this._creationTimeoutPassed = false;\n this._subWindowsCreated = false;\n this._dragSources = [];\n this._updatingColumnsResponsive = false;\n this._firstLoad = true;\n\n this.width = null;\n this.height = null;\n this.root = null;\n this.openPopouts = [];\n this.selectedItem = null;\n this.isSubWindow = false;\n this.eventHub = new lm.utils.EventHub(this);\n this.config = this._createConfig(config);\n this.container = container;\n this.dropTargetIndicator = null;\n this.transitionIndicator = null;\n this.tabDropPlaceholder = $('<div class=\"lm_drop_tab_placeholder\"></div>');\n\n if (this.isSubWindow === true) {\n $('body').css('visibility', 'hidden');\n }\n\n this._typeToItem = {\n column: lm.utils.fnBind(lm.items.RowOrColumn, this, [true]),\n row: lm.utils.fnBind(lm.items.RowOrColumn, this, [false]),\n stack: lm.items.Stack,\n component: lm.items.Component,\n };\n};\n\n/**\n * Hook that allows to access private classes\n */\nLayoutManager.__lm = lm;\n\n/**\n * Takes a GoldenLayout configuration object and\n * replaces its keys and values recursively with\n * one letter codes\n *\n * @static\n * @public\n * @param {Object} config A GoldenLayout config object\n *\n * @returns {Object} minified config\n */\nLayoutManager.minifyConfig = function (config) {\n return new lm.utils.ConfigMinifier().minifyConfig(config);\n};\n\n/**\n * Takes a configuration Object that was previously minified\n * using minifyConfig and returns its original version\n *\n * @static\n * @public\n * @param {Object} minifiedConfig\n *\n * @returns {Object} the original configuration\n */\nLayoutManager.unminifyConfig = function (config) {\n return new lm.utils.ConfigMinifier().unminifyConfig(config);\n};\n\nlm.utils.copy(LayoutManager.prototype, {\n /**\n * Register a component with the layout manager. If a configuration node\n * of type component is reached it will look up componentName and create the\n * associated component\n *\n * {\n *\t\ttype: \"component\",\n *\t\tcomponentName: \"EquityNewsFeed\",\n *\t\tcomponentState: { \"feedTopic\": \"us-bluechips\" }\n * }\n *\n * @public\n * @param {String} name\n * @param {Function} constructor\n *\n * @returns {Function} cleanup function to deregister component\n */\n registerComponent: function (name, constructor) {\n if (\n typeof constructor !== 'function' &&\n (constructor == null ||\n constructor.render == null ||\n typeof constructor.render !== 'function')\n ) {\n throw new Error('Please register a constructor function');\n }\n\n if (this._components[name] !== undefined) {\n throw new Error('Component ' + name + ' is already registered');\n }\n\n this._components[name] = constructor;\n\n function cleanup() {\n if (this._components[name] === undefined) {\n throw new Error('Component ' + name + ' is not registered');\n }\n\n delete this._components[name];\n }\n\n return cleanup.bind(this);\n },\n\n /**\n * Set a fallback component to be rendered in place of unregistered components\n *\n * @public\n * @param {Function} constructor\n *\n * @returns {void}\n */\n setFallbackComponent: function (constructor) {\n this._fallbackComponent = constructor;\n },\n\n /**\n * Creates a layout configuration object based on the the current state\n *\n * @public\n * @returns {Object} GoldenLayout configuration\n */\n toConfig: function (root) {\n var config, next, i;\n\n if (this.isInitialised === false) {\n throw new Error(\"Can't create config, layout not yet initialised\");\n }\n\n if (root && !(root instanceof lm.items.AbstractContentItem)) {\n throw new Error('Root must be a ContentItem');\n }\n\n /*\n * settings & labels\n */\n config = {\n settings: lm.utils.copy({}, this.config.settings),\n dimensions: lm.utils.copy({}, this.config.dimensions),\n labels: lm.utils.copy({}, this.config.labels),\n };\n\n /*\n * Content\n */\n config.content = [];\n next = function (configNode, item) {\n var key, i;\n\n for (key in item.config) {\n if (key !== 'content') {\n configNode[key] = item.config[key];\n }\n }\n\n if (configNode.componentName === 'lm-react-component') {\n // We change the type in `createContentItem`, so change it back here\n configNode.type = 'react-component';\n }\n\n if (item.contentItems.length) {\n configNode.content = [];\n\n for (i = 0; i < item.contentItems.length; i++) {\n configNode.content[i] = {};\n next(configNode.content[i], item.contentItems[i]);\n }\n }\n };\n\n if (root) {\n next(config, { contentItems: [root] });\n } else {\n next(config, this.root);\n }\n\n /*\n * Retrieve config for subwindows\n */\n this._$reconcilePopoutWindows();\n config.openPopouts = [];\n for (i = 0; i < this.openPopouts.length; i++) {\n config.openPopouts.push(this.openPopouts[i].toConfig());\n }\n\n /*\n * Add maximised item\n */\n config.maximisedItemId = this._maximisedItem ? '__glMaximised' : null;\n return config;\n },\n\n /**\n * Returns a previously registered component\n *\n * @public\n * @param {String} name The name used\n *\n * @returns {Function}\n */\n getComponent: function (name) {\n return this._components[name];\n },\n\n /**\n * Returns a fallback component to render in place of unregistered components\n *\n * @public\n *\n * @returns {Function}\n */\n getFallbackComponent: function () {\n return this._fallbackComponent;\n },\n\n /**\n * Creates the actual layout. Must be called after all initial components\n * are registered. Recurses through the configuration and sets up\n * the item tree.\n *\n * If called before the document is ready it adds itself as a listener\n * to the document.ready event\n *\n * @public\n *\n * @returns {void}\n */\n init: function () {\n /**\n * Create the popout windows straight away. If popouts are blocked\n * an error is thrown on the same 'thread' rather than a timeout and can\n * be caught. This also prevents any further initilisation from taking place.\n */\n if (this._subWindowsCreated === false) {\n this._createSubWindows();\n this._subWindowsCreated = true;\n }\n\n /**\n * If the document isn't ready yet, wait for it.\n */\n if (document.readyState === 'loading' || document.body === null) {\n $(document).ready(lm.utils.fnBind(this.init, this));\n return;\n }\n\n /**\n * If this is a subwindow, wait a few milliseconds for the original\n * page's js calls to be executed, then replace the bodies content\n * with GoldenLayout\n */\n if (this.isSubWindow === true && this._creationTimeoutPassed === false) {\n setTimeout(lm.utils.fnBind(this.init, this), 7);\n this._creationTimeoutPassed = true;\n return;\n }\n\n if (this.isSubWindow === true) {\n this._adjustToWindowMode();\n }\n\n this._setContainer();\n this.dropTargetIndicator = new lm.controls.DropTargetIndicator(\n this.container\n );\n this.transitionIndicator = new lm.controls.TransitionIndicator();\n this.updateSize();\n this._create(this.config);\n this._bindEvents();\n this.isInitialised = true;\n this._adjustColumnsResponsive();\n this.emit('initialised');\n },\n\n /**\n * Updates the layout managers size\n *\n * @public\n * @param {[int]} width height in pixels\n * @param {[int]} height width in pixels\n *\n * @returns {void}\n */\n updateSize: function (width, height) {\n if (arguments.length === 2) {\n this.width = width;\n this.height = height;\n } else {\n this.width = this.container.width();\n this.height = this.container.height();\n }\n\n if (this.isInitialised === true) {\n this.root.callDownwards('setSize', [this.width, this.height]);\n\n if (this._maximisedItem) {\n this._maximisedItem.element.width(this.container.width());\n this._maximisedItem.element.height(this.container.height());\n this._maximisedItem.callDownwards('setSize');\n }\n\n this._adjustColumnsResponsive();\n }\n },\n\n /**\n * Destroys the LayoutManager instance itself as well as every ContentItem\n * within it. After this is called nothing should be left of the LayoutManager.\n *\n * @public\n * @returns {void}\n */\n destroy: function () {\n if (this.isInitialised === false) {\n return;\n }\n this._onUnload();\n $(window).off('resize', this._resizeFunction);\n $(window).off('unload beforeunload', this._unloadFunction);\n $(window).off('blur.lm').off('focus.lm');\n this.root.callDownwards('_$destroy', [], true);\n this.root.contentItems = [];\n this.tabDropPlaceholder.remove();\n this.dropTargetIndicator.destroy();\n this.transitionIndicator.destroy();\n this.eventHub.destroy();\n\n this._dragSources.forEach(function (dragSource) {\n dragSource._dragListener.destroy();\n dragSource._element = null;\n dragSource._itemConfig = null;\n dragSource._dragListener = null;\n });\n this._dragSources = [];\n },\n\n /**\n * Recursively creates new item tree structures based on a provided\n * ItemConfiguration object\n *\n * @public\n * @param {Object} config ItemConfig\n * @param {[ContentItem]} parent The item the newly created item should be a child of\n *\n * @returns {lm.items.ContentItem}\n */\n createContentItem: function (config, parent) {\n var typeErrorMsg, contentItem;\n\n if (typeof config.type !== 'string') {\n throw new lm.errors.ConfigurationError(\n \"Missing parameter 'type'\",\n config\n );\n }\n\n if (config.type === 'react-component') {\n config.type = 'component';\n config.componentName = 'lm-react-component';\n }\n\n if (!this._typeToItem[config.type]) {\n typeErrorMsg =\n \"Unknown type '\" +\n config.type +\n \"'. \" +\n 'Valid types are ' +\n lm.utils.objectKeys(this._typeToItem).join(',');\n\n throw new lm.errors.ConfigurationError(typeErrorMsg);\n }\n\n /**\n * We add an additional stack around every component that's not within a stack anyways.\n */\n if (\n // If this is a component\n config.type === 'component' &&\n // and it's not already within a stack\n !(parent instanceof lm.items.Stack) &&\n // and we have a parent\n !!parent &&\n // and it's not the topmost item in a new window\n !(this.isSubWindow === true && parent instanceof lm.items.Root)\n ) {\n config = {\n type: 'stack',\n width: config.width,\n height: config.height,\n content: [config],\n };\n }\n\n contentItem = new this._typeToItem[config.type](this, config, parent);\n return contentItem;\n },\n\n /**\n\t * Creates a popout window with the specified content and dimensions\n\t *\n\t * @param {Object|lm.itemsAbstractContentItem} configOrContentItem\n\t * @param {[Object]} dimensions A map with width, height, left and top\n\t * @param {[String]} parentId the id of the element this item will be appended to\n\t * when popIn is called\n\t * @param {[Number]} indexInParent The position of this item within its parent element\n\n\t * @returns {lm.controls.BrowserPopout}\n\t */\n createPopout: function (\n configOrContentItem,\n dimensions,\n parentId,\n indexInParent\n ) {\n var config = configOrContentItem,\n isItem = configOrContentItem instanceof lm.items.AbstractContentItem,\n self = this,\n windowLeft,\n windowTop,\n offset,\n parent,\n child,\n browserPopout;\n\n parentId = parentId || null;\n\n if (isItem) {\n config = this.toConfig(configOrContentItem).content;\n parentId = lm.utils.getUniqueId();\n\n /**\n * If the item is the only component within a stack or for some\n * other reason the only child of its parent the parent will be destroyed\n * when the child is removed.\n *\n * In order to support this we move up the tree until we find something\n * that will remain after the item is being popped out\n */\n parent = configOrContentItem.parent;\n child = configOrContentItem;\n while (parent.contentItems.length === 1 && !parent.isRoot) {\n parent = parent.parent;\n child = child.parent;\n }\n\n parent.addId(parentId);\n if (isNaN(indexInParent)) {\n indexInParent = lm.utils.indexOf(child, parent.contentItems);\n }\n } else {\n if (!(config instanceof Array)) {\n config = [config];\n }\n }\n\n if (!dimensions && isItem) {\n windowLeft = window.screenX || window.screenLeft;\n windowTop = window.screenY || window.screenTop;\n offset = configOrContentItem.element.offset();\n\n dimensions = {\n left: windowLeft + offset.left,\n top: windowTop + offset.top,\n width: configOrContentItem.element.width(),\n height: configOrContentItem.element.height(),\n };\n }\n\n if (!dimensions && !isItem) {\n dimensions = {\n left: window.screenX || window.screenLeft + 20,\n top: window.screenY || window.screenTop + 20,\n width: 500,\n height: 309,\n };\n }\n\n if (isItem) {\n configOrContentItem.remove();\n }\n\n browserPopout = new lm.controls.BrowserPopout(\n config,\n dimensions,\n parentId,\n indexInParent,\n this\n );\n\n browserPopout.on('initialised', function () {\n self.emit('windowOpened', browserPopout);\n });\n\n browserPopout.on('closed', function () {\n self._$reconcilePopoutWindows();\n });\n\n this.openPopouts.push(browserPopout);\n\n return browserPopout;\n },\n\n /**\n * Attaches DragListener to any given DOM element\n * and turns it into a way of creating new ContentItems\n * by 'dragging' the DOM element into the layout\n *\n * @param {jQuery DOM element} element\n * @param {Object|Function} itemConfig for the new item to be created, or a function which will provide it\n *\n * @returns {void}\n */\n createDragSource: function (element, itemConfig) {\n this.config.settings.constrainDragToContainer = false;\n var dragSource = new lm.controls.DragSource($(element), itemConfig, this);\n this._dragSources.push(dragSource);\n\n return dragSource;\n },\n\n /**\n * Create a new item in a dragging state, given a starting mouse event to act as the initial position\n *\n * @param {Object|Function} itemConfig for the new item to be created, or a function which will provide it\n * @param {MouseEvent} event used as the starting position for the dragProxy\n *\n * @returns {void}\n */\n createDragSourceFromEvent: function (itemConfig, event) {\n this.config.settings.constrainDragToContainer = false;\n return new lm.controls.DragSourceFromEvent(itemConfig, this, event);\n },\n\n /**\n * Programmatically selects an item. This deselects\n * the currently selected item, selects the specified item\n * and emits a selectionChanged event\n *\n * @param {lm.item.AbstractContentItem} item#\n * @param {[Boolean]} _$silent Wheather to notify the item of its selection\n * @event selectionChanged\n *\n * @returns {VOID}\n */\n selectItem: function (item, _$silent) {\n if (this.config.settings.selectionEnabled !== true) {\n throw new Error(\n 'Please set selectionEnabled to true to use this feature'\n );\n }\n\n if (item === this.selectedItem) {\n return;\n }\n\n if (this.selectedItem !== null) {\n this.selectedItem.deselect();\n }\n\n if (item && _$silent !== true) {\n item.select();\n }\n\n this.selectedItem = item;\n\n this.emit('selectionChanged', item);\n },\n\n /*************************\n * PACKAGE PRIVATE\n *************************/\n _$maximiseItem: function (contentItem) {\n if (this._maximisedItem !== null) {\n this._$minimiseItem(this._maximisedItem);\n }\n this._maximisedItem = contentItem;\n this._maximisedItem.addId('__glMaximised');\n contentItem.element.addClass('lm_maximised');\n contentItem.element.after(this._maximisePlaceholder);\n this.root.element.prepend(contentItem.element);\n contentItem.element.width(this.container.width());\n contentItem.element.height(this.container.height());\n contentItem.callDownwards('setSize');\n this._maximisedItem.emit('maximised');\n this.emit('stateChanged');\n },\n\n _$minimiseItem: function (contentItem) {\n contentItem.element.removeClass('lm_maximised');\n contentItem.removeId('__glMaximised');\n this._maximisePlaceholder.after(contentItem.element);\n this._maximisePlaceholder.remove();\n contentItem.parent.callDownwards('setSize');\n this._maximisedItem = null;\n contentItem.emit('minimised');\n this.emit('stateChanged');\n },\n\n /**\n * This method is used to get around sandboxed iframe restrictions.\n * If 'allow-top-navigation' is not specified in the iframe's 'sandbox' attribute\n * (as is the case with codepens) the parent window is forbidden from calling certain\n * methods on the child, such as window.close() or setting document.location.href.\n *\n * This prevented GoldenLayout popouts from popping in in codepens. The fix is to call\n * _$closeWindow on the child window's gl instance which (after a timeout to disconnect\n * the invoking method from the close call) closes itself.\n *\n * @packagePrivate\n *\n * @returns {void}\n */\n _$closeWindow: function () {\n window.setTimeout(function () {\n window.close();\n }, 1);\n },\n\n _$getArea: function (x, y) {\n var i,\n area,\n smallestSurface = Infinity,\n mathingArea = null;\n\n for (i = 0; i < this._itemAreas.length; i++) {\n area = this._itemAreas[i];\n\n if (\n x > area.x1 &&\n x < area.x2 &&\n y > area.y1 &&\n y < area.y2 &&\n smallestSurface > area.surface\n ) {\n smallestSurface = area.surface;\n mathingArea = area;\n }\n }\n\n return mathingArea;\n },\n\n _$createRootItemAreas: function () {\n var areaSize = 50;\n var sides = { y2: 'y1', x2: 'x1', y1: 'y2', x1: 'x2' };\n for (var side in sides) {\n var area = this.root._$getArea();\n area.side = side;\n if (sides[side][1] == '2') area[side] = area[sides[side]] - areaSize;\n else {\n area[side] = area[sides[side]] + areaSize;\n }\n area.surface = (area.x2 - area.x1) * (area.y2 - area.y1);\n this._itemAreas.push(area);\n }\n },\n\n _$calculateItemAreas: function () {\n var i,\n area,\n allContentItems = this._getAllContentItems();\n this._itemAreas = [];\n\n /**\n * If the last item is dragged out, highlight the entire container size to\n * allow to re-drop it. allContentItems[ 0 ] === this.root at this point\n *\n * Don't include root into the possible drop areas though otherwise since it\n * will used for every gap in the layout, e.g. splitters\n */\n if (allContentItems.length === 1) {\n this._itemAreas.push(this.root._$getArea());\n return;\n }\n this._$createRootItemAreas();\n\n for (i = 0; i < allContentItems.length; i++) {\n if (!allContentItems[i].isStack) {\n continue;\n }\n\n area = allContentItems[i]._$getArea();\n\n if (area === null) {\n continue;\n } else if (area instanceof Array) {\n this._itemAreas = this._itemAreas.concat(area);\n } else {\n this._itemAreas.push(area);\n var header = {};\n lm.utils.copy(header, area);\n lm.utils.copy(\n header,\n area.contentItem._contentAreaDimensions.header.highlightArea\n );\n header.surface = (header.x2 - header.x1) * (header.y2 - header.y1);\n this._itemAreas.push(header);\n }\n }\n },\n\n /**\n * Takes a contentItem or a configuration and optionally a parent\n * item and returns an initialised instance of the contentItem.\n * If the contentItem is a function, it is first called\n *\n * @packagePrivate\n *\n * @param {lm.items.AbtractContentItem|Object|Function} contentItemOrConfig\n * @param {lm.items.AbtractContentItem} parent Only necessary when passing in config\n *\n * @returns {lm.items.AbtractContentItem}\n */\n _$normalizeContentItem: function (contentItemOrConfig, parent) {\n if (!contentItemOrConfig) {\n throw new Error('No content item defined');\n }\n\n if (lm.utils.isFunction(contentItemOrConfig)) {\n contentItemOrConfig = contentItemOrConfig();\n }\n\n if (contentItemOrConfig instanceof lm.items.AbstractContentItem) {\n return contentItemOrConfig;\n }\n\n if ($.isPlainObject(contentItemOrConfig) && contentItemOrConfig.type) {\n var newContentItem = this.createContentItem(contentItemOrConfig, parent);\n newContentItem.callDownwards('_$init');\n return newContentItem;\n } else {\n throw new Error('Invalid contentItem');\n }\n },\n\n /**\n * Iterates through the array of open popout windows and removes the ones\n * that are effectively closed. This is necessary due to the lack of reliably\n * listening for window.close / unload events in a cross browser compatible fashion.\n *\n * @packagePrivate\n *\n * @returns {void}\n */\n _$reconcilePopoutWindows: function () {\n var openPopouts = [],\n i;\n\n for (i = 0; i < this.openPopouts.length; i++) {\n if (this.openPopouts[i].getWindow().closed === false) {\n openPopouts.push(this.openPopouts[i]);\n } else {\n this.emit('windowClosed', this.openPopouts[i]);\n }\n }\n\n if (this.openPopouts.length !== openPopouts.length) {\n this.emit('stateChanged');\n this.openPopouts = openPopouts;\n }\n },\n\n /***************************\n * PRIVATE\n ***************************/\n /**\n * Returns a flattened array of all content items,\n * regardles of level or type\n *\n * @private\n *\n * @returns {void}\n */\n _getAllContentItems: function () {\n var allContentItems = [];\n\n var addChildren = function (contentItem) {\n allContentItems.push(contentItem);\n\n if (contentItem.contentItems instanceof Array) {\n for (var i = 0; i < contentItem.contentItems.length; i++) {\n addChildren(contentItem.contentItems[i]);\n }\n }\n };\n\n addChildren(this.root);\n\n return allContentItems;\n },\n\n /**\n * Binds to DOM/BOM events on init\n *\n * @private\n *\n * @returns {void}\n */\n _bindEvents: function () {\n if (this._isFullPage) {\n $(window).resize(this._resizeFunction);\n }\n $(window)\n .on('unload beforeunload', this._unloadFunction)\n .on('blur.lm', this._windowBlur)\n .on('focus.lm', this._windowFocus);\n },\n\n /**\n * Handles setting a class based on window focus, useful for focus indicators\n */\n _windowBlur: function () {\n this.root.element.addClass('lm_window_blur');\n },\n\n _windowFocus: function () {\n this.root.element.removeClass('lm_window_blur');\n },\n\n /**\n * Debounces resize events\n *\n * @private\n *\n * @returns {void}\n */\n _onResize: function () {\n clearTimeout(this._resizeTimeoutId);\n this._resizeTimeoutId = setTimeout(\n lm.utils.fnBind(this.updateSize, this),\n 100\n );\n },\n\n /**\n * Extends the default config with the user specific settings and applies\n * derivations. Please note that there's a seperate method (AbstractContentItem._extendItemNode)\n * that deals with the extension of item configs\n *\n * @param {Object} config\n * @static\n * @returns {Object} config\n */\n _createConfig: function (config) {\n var windowConfigKey = lm.utils.getQueryStringParam('gl-window');\n\n if (windowConfigKey) {\n this.isSubWindow = true;\n config = localStorage.getItem(windowConfigKey);\n config = JSON.parse(config);\n config = new lm.utils.ConfigMinifier().unminifyConfig(config);\n localStorage.removeItem(windowConfigKey);\n }\n\n config = $.extend(true, {}, lm.config.defaultConfig, config);\n\n var nextNode = function (node) {\n for (var key in node) {\n if (key !== 'props' && typeof node[key] === 'object') {\n nextNode(node[key]);\n } else if (key === 'type' && node[key] === 'react-component') {\n node.type = 'component';\n node.componentName = 'lm-react-component';\n }\n }\n };\n\n nextNode(config);\n\n if (config.settings.hasHeaders === false) {\n config.dimensions.headerHeight = 0;\n }\n\n return config;\n },\n\n /**\n * This is executed when GoldenLayout detects that it is run\n * within a previously opened popout window.\n *\n * @private\n *\n * @returns {void}\n */\n _adjustToWindowMode: function () {\n var popInButton = $(\n '<div class=\"lm_popin\" title=\"' +\n this.config.labels.popin +\n '\">' +\n '<div class=\"lm_icon\"></div>' +\n '<div class=\"lm_bg\"></div>' +\n '</div>'\n );\n\n popInButton.click(\n lm.utils.fnBind(function () {\n this.emit('popIn');\n }, this)\n );\n\n document.title = lm.utils.stripTags(this.config.content[0].title);\n\n $('head').append($('body link, body style, template, .gl_keep'));\n\n this.container = $('body')\n .html('')\n .css('visibility', 'visible')\n .append(popInButton);\n\n /*\n * This seems a bit pointless, but actually causes a reflow/re-evaluation getting around\n * slickgrid's \"Cannot find stylesheet.\" bug in chrome\n */\n var x = document.body.offsetHeight; // jshint ignore:line\n\n /*\n * Expose this instance on the window object\n * to allow the opening window to interact with\n * it\n */\n window.__glInstance = this;\n },\n\n /**\n * Creates Subwindows (if there are any). Throws an error\n * if popouts are blocked.\n *\n * @returns {void}\n */\n _createSubWindows: function () {\n var i, popout;\n\n for (i = 0; i < this.config.openPopouts.length; i++) {\n popout = this.config.openPopouts[i];\n\n this.createPopout(\n popout.content,\n popout.dimensions,\n popout.parentId,\n popout.indexInParent\n );\n }\n },\n\n /**\n * Determines what element the layout will be created in\n *\n * @private\n *\n * @returns {void}\n */\n _setContainer: function () {\n var container = $(this.container || 'body');\n\n if (container.length === 0) {\n throw new Error('GoldenLayout container not found');\n }\n\n if (container.length > 1) {\n throw new Error('GoldenLayout more than one container element specified');\n }\n\n if (container[0] === document.body) {\n this._isFullPage = true;\n\n $('html, body').css({\n height: '100%',\n margin: 0,\n padding: 0,\n overflow: 'hidden',\n });\n }\n\n this.container = container;\n },\n\n /**\n * Kicks of the initial, recursive creation chain\n *\n * @param {Object} config GoldenLayout Config\n *\n * @returns {void}\n */\n _create: function (config) {\n var errorMsg;\n\n if (!(config.content instanceof Array)) {\n if (config.content === undefined) {\n errorMsg = \"Missing setting 'content' on top level of configuration\";\n } else {\n errorMsg = \"Configuration parameter 'content' must be an array\";\n }\n\n throw new lm.errors.ConfigurationError(errorMsg, config);\n }\n\n if (config.content.length > 1) {\n errorMsg = \"Top level content can't contain more then one element.\";\n throw new lm.errors.ConfigurationError(errorMsg, config);\n }\n\n this.root = new lm.items.Root(\n this,\n { content: config.content },\n this.container\n );\n this.root.callDownwards('_$init');\n\n if (config.maximisedItemId === '__glMaximised') {\n this.root.getItemsById(config.maximisedItemId)[0].toggleMaximise();\n }\n },\n\n /**\n * Called when the window is closed or the user navigates away\n * from the page\n *\n * @returns {void}\n */\n _onUnload: function () {\n if (this.config.settings.closePopoutsOnUnload === true) {\n for (var i = 0; i < this.openPopouts.length; i++) {\n this.openPopouts[i].close();\n }\n }\n },\n\n /**\n * Adjusts the number of columns to be lower to fit the screen and still maintain minItemWidth.\n *\n * @returns {void}\n */\n _adjustColumnsResponsive: function () {\n // If there is no min width set, or not content items, do nothing.\n if (\n !this._useResponsiveLayout() ||\n this._updatingColumnsResponsive ||\n !this.config.dimensions ||\n !this.config.dimensions.minItemWidth ||\n this.root.contentItems.length === 0 ||\n !this.root.contentItems[0].isRow\n ) {\n this._firstLoad = false;\n return;\n }\n\n this._firstLoad = false;\n\n // If there is only one column, do nothing.\n var columnCount = this.root.contentItems[0].contentItems.length;\n if (columnCount <= 1) {\n return;\n }\n\n // If they all still fit, do nothing.\n var minItemWidth = this.config.dimensions.minItemWidth;\n var totalMinWidth = columnCount * minItemWidth;\n if (totalMinWidth <= this.width) {\n return;\n }\n\n // Prevent updates while it is already happening.\n this._updatingColumnsResponsive = true;\n\n // Figure out how many columns to stack, and put them all in the first stack container.\n var finalColumnCount = Math.max(Math.floor(this.width / minItemWidth), 1);\n var stackColumnCount = columnCount - finalColumnCount;\n\n var rootContentItem = this.root.contentItems[0];\n var firstStackContainer = this._findAllStackContainers()[0];\n for (var i = 0; i < stackColumnCount; i++) {\n // Stack from right.\n var column =\n rootContentItem.contentItems[rootContentItem.contentItems.length - 1];\n this._addChildContentItemsToContainer(firstStackContainer, column);\n }\n\n this._updatingColumnsResponsive = false;\n },\n\n /**\n * Determines if responsive layout should be used.\n *\n * @returns {bool} - True if responsive layout should be used; otherwise false.\n */\n _useResponsiveLayout: function () {\n return (\n this.config.settings &&\n (this.config.settings.responsiveMode == 'always' ||\n (this.config.settings.responsiveMode == 'onload' && this._firstLoad))\n );\n },\n\n /**\n * Adds all children of a node to another container recursively.\n * @param {object} container - Container to add child content items to.\n * @param {object} node - Node to search for content items.\n * @returns {void}\n */\n _addChildContentItemsToContainer: function (container, node) {\n if (node.type === 'stack') {\n node.contentItems.forEach(function (item) {\n container.addChild(item);\n node.removeChild(item, true);\n });\n } else {\n node.contentItems.forEach(\n lm.utils.fnBind(function (item) {\n this._addChildContentItemsToContainer(container, item);\n }, this)\n );\n }\n },\n\n /**\n * Finds all the stack containers.\n * @returns {array} - The found stack containers.\n */\n _findAllStackContainers: function () {\n var stackContainers = [];\n this._findAllStackContainersRecursive(stackContainers, this.root);\n\n return stackContainers;\n },\n\n /**\n * Finds all the stack containers.\n *\n * @param {array} - Set of containers to populate.\n * @param {object} - Current node to process.\n *\n * @returns {void}\n */\n _findAllStackContainersRecursive: function (stackContainers, node) {\n node.contentItems.forEach(\n lm.utils.fnBind(function (item) {\n if (item.type == 'stack') {\n stackContainers.push(item);\n } else if (!item.isComponent) {\n this._findAllStackContainersRecursive(stackContainers, item);\n }\n }, this)\n );\n },\n});\n\nexport default LayoutManager;\n"],"mappings":"AAAA,OAAOA,CAAP,MAAc,QAAd;AACA,OAAOC,EAAP,MAAe,WAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAUC,MAAV,EAAkBC,SAAlB,EAA6B;EACjD,IAAI,CAACJ,CAAD,IAAM,OAAOA,CAAC,CAACK,UAAT,KAAwB,UAAlC,EAA8C;IAC5C,IAAIC,QAAQ,GAAG,oDAAf;IACAA,QAAQ,IACN,mFADF;IAEAA,QAAQ,IAAI,qCAAZ;IACA,MAAM,IAAIC,KAAJ,CAAUD,QAAV,CAAN;EACD;;EACDL,EAAE,CAACO,KAAH,CAASC,YAAT,CAAsBC,IAAtB,CAA2B,IAA3B;EAEA,KAAKC,aAAL,GAAqB,KAArB;EACA,KAAKC,WAAL,GAAmB,KAAnB;EACA,KAAKC,gBAAL,GAAwB,IAAxB;EACA,KAAKC,WAAL,GAAmB;IAAE,sBAAsBb,EAAE,CAACO,KAAH,CAASO;EAAjC,CAAnB;EACA,KAAKC,kBAAL,GAA0BC,SAA1B;EACA,KAAKC,UAAL,GAAkB,EAAlB;EACA,KAAKC,eA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E,CAACO,KAAH,CAASY,MAAT,CAAgB,UAAUyD,IAAV,EAAgB;MAC9B,IAAIA,IAAI,CAACG,IAAL,IAAa,OAAjB,EAA0B;QACxB4K,eAAe,CAACxK,IAAhB,CAAqBP,IAArB;MACD,CAFD,MAEO,IAAI,CAACA,IAAI,CAACiL,WAAV,EAAuB;QAC5B,KAAKD,gCAAL,CAAsCD,eAAtC,EAAuD/K,IAAvD;MACD;IACF,CAND,EAMG,IANH,CADF;EASD;AA5jCoC,CAAvC;AA+jCA,eAAe3E,aAAf"}
|
|
1
|
+
{"version":3,"file":"LayoutManager.js","names":["$","lm","defaultConfig","BrowserPopout","DragSource","DragSourceFromEvent","DropTargetIndicator","TransitionIndicator","ConfigurationError","AbstractContentItem","isStack","Component","Root","RowOrColumn","Stack","minifyConfig","unminifyConfig","EventEmitter","EventHub","ReactComponentHandler","getQueryStringParam","getUniqueId","stripTags","LayoutManager","config","constructor","container","_onResize","bind","_onUnload","_windowBlur","_windowFocus","_createConfig","_originalContainer","_getContainer","isSubWindow","css","_typeToItem","column","row","stack","component","registerComponent","name","render","Error","_components","undefined","cleanup","setFallbackComponent","_fallbackComponent","toConfig","root","isInitialised","settings","dimensions","labels","content","next","configNode","item","key","componentName","type","contentItems","length","i","_$reconcilePopoutWindows","openPopouts","push","maximisedItemId","_maximisedItem","getComponent","getFallbackComponent","init","_subWindowsCreated","_createSubWindows","document","readyState","body","ready","_creationTimeoutPassed","setTimeout","_adjustToWindowMode","_setContainer","dropTargetIndicator","transitionIndicator","updateSize","_create","_bindEvents","_adjustColumnsResponsive","emit","width","height","callDownwards","element","destroy","window","off","tabDropPlaceholder","remove","eventHub","_dragSources","forEach","dragSource","_dragListener","createContentItem","parent","typeErrorMsg","contentItem","Object","keys","join","createPopout","configOrContentItem","parentId","indexInParent","configArray","isItem","self","child","isRoot","addId","Number","isNaN","indexOf","Array","windowLeft","screenX","screenLeft","windowTop","screenY","screenTop","offset","left","top","browserPopout","on","createDragSource","itemConfig","constrainDragToContainer","createDragSourceFromEvent","event","selectItem","_$silent","selectionEnabled","selectedItem","deselect","select","_$maximiseItem","_$minimiseItem","addClass","after","_maximisePlaceholder","prepend","removeClass","removeId","_$closeWindow","close","_$getArea","x","y","smallestSurface","Infinity","mathingArea","_itemAreas","area","x1","x2","y1","y2","surface","_$createRootItemAreas","areaSize","rootArea","areas","side","_$calculateItemAreas","allContentItems","_getAllContentItems","concat","header","_contentAreaDimensions","highlightArea","_$normalizeContentItem","contentItemOrConfig","isPlainObject","newContentItem","getWindow","closed","addChildren","_isFullPage","resize","clearTimeout","_resizeTimeoutId","windowConfigKey","JSON","parse","localStorage","getItem","removeItem","extend","nextNode","node","value","hasHeaders","headerHeight","popInButton","popin","click","title","append","html","offsetHeight","__glInstance","popout","margin","padding","overflow","errorMsg","getItemsById","toggleMaximise","closePopoutsOnUnload","_useResponsiveLayout","_updatingColumnsResponsive","minItemWidth","isRow","_firstLoad","columnCount","totalMinWidth","finalColumnCount","Math","max","floor","stackColumnCount","rootContentItem","firstStackContainer","_findAllStackContainers","_addChildContentItemsToContainer","responsiveMode","addChild","removeChild","stackContainers","_findAllStackContainersRecursive","isComponent"],"sources":["../src/LayoutManager.ts"],"sourcesContent":["import $ from 'jquery';\nimport React from 'react';\nimport lm from './base';\nimport { defaultConfig } from './config';\nimport type {\n ItemConfig,\n Config,\n ComponentConfig,\n ItemConfigType,\n ReactComponentConfig,\n} from './config';\nimport type { ItemContainer } from './container';\nimport {\n BrowserPopout,\n DragSource,\n DragSourceFromEvent,\n DropTargetIndicator,\n TransitionIndicator,\n} from './controls';\nimport { ConfigurationError } from './errors';\nimport {\n AbstractContentItem,\n ItemArea,\n isStack,\n Component,\n Root,\n RowOrColumn,\n Stack,\n} from './items';\nimport {\n minifyConfig,\n unminifyConfig,\n EventEmitter,\n EventHub,\n ReactComponentHandler,\n getQueryStringParam,\n getUniqueId,\n stripTags,\n} from './utils';\n\nexport type ComponentConstructor<\n C extends ComponentConfig | ReactComponentConfig = ComponentConfig\n> = {\n new (container: ItemContainer<C>, state: unknown): unknown;\n};\n\n/**\n * The main class that will be exposed as GoldenLayout.\n *\n * @param config\n * @param container Can be a jQuery selector string or a Dom element. Defaults to body\n */\nexport default class LayoutManager extends EventEmitter {\n /**\n * Hook that allows to access private classes\n */\n static __lm = lm;\n\n /**\n * Takes a GoldenLayout configuration object and\n * replaces its keys and values recursively with\n * one letter codes\n *\n * @param config A GoldenLayout config object\n * @returns minified config\n */\n static minifyConfig(config: Config): Record<string, unknown> {\n return minifyConfig(config);\n }\n\n /**\n * Takes a configuration Object that was previously minified\n * using minifyConfig and returns its original version\n *\n * @param minifiedConfig\n * @returns the original configuration\n */\n static unminifyConfig(config: Record<string, unknown>): Config {\n return unminifyConfig(config);\n }\n\n isInitialised = false;\n private _isFullPage = false;\n private _resizeTimeoutId: number | undefined;\n\n private _components: {\n [name: string]:\n | ComponentConstructor\n | ComponentConstructor<ReactComponentConfig>\n | React.Component\n | React.ForwardRefExoticComponent<any>;\n } = { 'lm-react-component': ReactComponentHandler };\n\n private _fallbackComponent?:\n | ComponentConstructor\n | React.ForwardRefExoticComponent<any>;\n private _itemAreas: ItemArea[] = [];\n private _maximisedItem: AbstractContentItem | null = null;\n private _maximisePlaceholder = $('<div class=\"lm_maximise_place\"></div>');\n private _creationTimeoutPassed = false;\n private _subWindowsCreated = false;\n private _dragSources: DragSource[] = [];\n private _updatingColumnsResponsive = false;\n private _firstLoad = true;\n\n width: number | null = null;\n height: number | null = null;\n root!: Root; // This will be created after init is called.\n openPopouts: BrowserPopout[] = [];\n selectedItem: AbstractContentItem | null = null;\n isSubWindow = false;\n eventHub = new EventHub(this);\n config: Config;\n container: JQuery<HTMLElement>;\n private _originalContainer: JQuery<HTMLElement> | HTMLElement | undefined;\n dropTargetIndicator: DropTargetIndicator | null = null;\n transitionIndicator: TransitionIndicator | null = null;\n tabDropPlaceholder = $('<div class=\"lm_drop_tab_placeholder\"></div>');\n\n private _typeToItem: {\n [type: string]: new (...args: any[]) => AbstractContentItem;\n };\n\n constructor(\n config: Config,\n container: JQuery<HTMLElement> | HTMLElement | undefined\n ) {\n super();\n\n this._onResize = this._onResize.bind(this);\n this._onUnload = this._onUnload.bind(this);\n this._windowBlur = this._windowBlur.bind(this);\n this._windowFocus = this._windowFocus.bind(this);\n\n this.config = this._createConfig(config);\n this._originalContainer = container;\n this.container = this._getContainer();\n\n if (this.isSubWindow) {\n $('body').css('visibility', 'hidden');\n }\n\n this._typeToItem = {\n column: RowOrColumn.bind(this, true),\n row: RowOrColumn.bind(this, false),\n stack: Stack,\n component: Component,\n };\n }\n\n /**\n * Register a component with the layout manager. If a configuration node\n * of type component is reached it will look up componentName and create the\n * associated component\n *\n * {\n *\t\ttype: \"component\",\n *\t\tcomponentName: \"EquityNewsFeed\",\n *\t\tcomponentState: { \"feedTopic\": \"us-bluechips\" }\n * }\n *\n * @param name\n * @param constructor\n * @returns cleanup function to deregister component\n */\n registerComponent(\n name: string,\n constructor:\n | ComponentConstructor\n | React.Component\n | React.ForwardRefExoticComponent<any>\n ) {\n if (\n typeof constructor !== 'function' &&\n (constructor == null ||\n constructor.render == null ||\n typeof constructor.render !== 'function')\n ) {\n throw new Error('Please register a constructor function');\n }\n\n if (this._components[name] !== undefined) {\n throw new Error('Component ' + name + ' is already registered');\n }\n\n this._components[name] = constructor;\n\n const cleanup = () => {\n if (this._components[name] === undefined) {\n throw new Error('Component ' + name + ' is not registered');\n }\n\n delete this._components[name];\n };\n\n return cleanup;\n }\n\n /**\n * Set a fallback component to be rendered in place of unregistered components\n * @param constructor\n */\n setFallbackComponent(\n constructor: ComponentConstructor | React.ForwardRefExoticComponent<any>\n ) {\n this._fallbackComponent = constructor;\n }\n\n /**\n * Creates a layout configuration object based on the the current state\n * @param root\n * @returns GoldenLayout configuration\n */\n toConfig(root?: AbstractContentItem) {\n if (this.isInitialised === false) {\n throw new Error(\"Can't create config, layout not yet initialised\");\n }\n\n if (root && !(root instanceof AbstractContentItem)) {\n throw new Error('Root must be a ContentItem');\n }\n\n /*\n * settings & labels\n */\n const config: Config = {\n settings: { ...this.config.settings },\n dimensions: { ...this.config.dimensions },\n labels: { ...this.config.labels },\n content: [],\n };\n\n /*\n * Content\n */\n const next = function (\n configNode: ComponentConfig & { [key: string]: unknown },\n item: AbstractContentItem & {\n config: Record<string, unknown>;\n }\n ) {\n for (let key in item.config) {\n if (key !== 'content') {\n configNode[key] = item.config[key];\n }\n }\n\n if (configNode.componentName === 'lm-react-component') {\n // We change the type in `createContentItem`, so change it back here\n configNode.type = 'react-component';\n }\n\n if (item.contentItems.length) {\n configNode.content = [];\n\n for (let i = 0; i < item.contentItems.length; i++) {\n configNode.content[i] = {} as ItemConfigType;\n next(\n configNode.content[i] as ComponentConfig & Record<string, unknown>,\n item.contentItems[i] as AbstractContentItem & {\n config: Record<string, unknown>;\n }\n );\n }\n }\n };\n\n if (root) {\n next(\n (config as unknown) as ComponentConfig & Record<string, unknown>,\n { contentItems: [root] } as AbstractContentItem & {\n config: Record<string, unknown>;\n }\n );\n } else {\n next(\n (config as unknown) as ComponentConfig & Record<string, unknown>,\n (this.root as unknown) as AbstractContentItem & {\n config: Record<string, unknown>;\n }\n );\n }\n\n /*\n * Retrieve config for subwindows\n */\n this._$reconcilePopoutWindows();\n config.openPopouts = [];\n for (let i = 0; i < this.openPopouts.length; i++) {\n config.openPopouts.push(this.openPopouts[i].toConfig());\n }\n\n /*\n * Add maximised item\n */\n config.maximisedItemId = this._maximisedItem ? '__glMaximised' : undefined;\n return config;\n }\n\n /**\n * Returns a previously registered component\n * @param name The name used\n */\n getComponent(name: string) {\n return this._components[name];\n }\n\n /**\n * Returns a fallback component to render in place of unregistered components\n *\n * @public\n *\n * @returns {Function}\n */\n getFallbackComponent() {\n return this._fallbackComponent;\n }\n\n /**\n * Creates the actual layout. Must be called after all initial components\n * are registered. Recurses through the configuration and sets up\n * the item tree.\n *\n * If called before the document is ready it adds itself as a listener\n * to the document.ready event\n */\n init() {\n /**\n * Create the popout windows straight away. If popouts are blocked\n * an error is thrown on the same 'thread' rather than a timeout and can\n * be caught. This also prevents any further initilisation from taking place.\n */\n if (this._subWindowsCreated === false) {\n this._createSubWindows();\n this._subWindowsCreated = true;\n }\n\n /**\n * If the document isn't ready yet, wait for it.\n */\n if (document.readyState === 'loading' || document.body === null) {\n $(document).ready(this.init.bind(this));\n return;\n }\n\n /**\n * If this is a subwindow, wait a few milliseconds for the original\n * page's js calls to be executed, then replace the bodies content\n * with GoldenLayout\n */\n if (this.isSubWindow === true && this._creationTimeoutPassed === false) {\n setTimeout(this.init.bind(this), 7);\n this._creationTimeoutPassed = true;\n return;\n }\n\n if (this.isSubWindow === true) {\n this._adjustToWindowMode();\n }\n\n this._setContainer();\n this.dropTargetIndicator = new DropTargetIndicator();\n this.transitionIndicator = new TransitionIndicator();\n this.updateSize();\n this._create(this.config);\n this._bindEvents();\n this.isInitialised = true;\n this._adjustColumnsResponsive();\n this.emit('initialised');\n }\n\n /**\n * Updates the layout managers size\n * @param width width in pixels\n * @param height height in pixels\n */\n updateSize(width?: number, height?: number) {\n this.width = width ?? this.container.width() ?? 0;\n this.height = height ?? this.container.height() ?? 0;\n\n if (this.isInitialised === true) {\n this.root.callDownwards('setSize', [this.width, this.height]);\n\n if (this._maximisedItem) {\n this._maximisedItem.element.width(this.container.width() ?? 0);\n this._maximisedItem.element.height(this.container.height() ?? 0);\n this._maximisedItem.callDownwards('setSize');\n }\n\n this._adjustColumnsResponsive();\n }\n }\n\n /**\n * Destroys the LayoutManager instance itself as well as every ContentItem\n * within it. After this is called nothing should be left of the LayoutManager.\n */\n destroy() {\n if (this.isInitialised === false || !this.root) {\n return;\n }\n this._onUnload();\n $(window).off('resize', this._onResize);\n $(window).off('unload beforeunload', this._onUnload);\n $(window).off('blur.lm').off('focus.lm');\n this.root.callDownwards('_$destroy', [], true);\n this.root.contentItems = [];\n this.tabDropPlaceholder.remove();\n this.dropTargetIndicator?.destroy();\n this.transitionIndicator?.destroy();\n this.eventHub.destroy();\n\n this._dragSources.forEach(function (dragSource) {\n dragSource._dragListener.destroy();\n });\n this._dragSources = [];\n }\n\n /**\n * Recursively creates new item tree structures based on a provided\n * ItemConfiguration object\n *\n * @public\n * @param config ItemConfig\n * @param parent The item the newly created item should be a child of\n *\n * @returns Created item\n */\n createContentItem(\n config: Partial<ComponentConfig> & { type: ItemConfig['type'] },\n parent?: AbstractContentItem\n ) {\n var typeErrorMsg, contentItem;\n\n if (typeof config.type !== 'string') {\n throw new ConfigurationError(\"Missing parameter 'type'\", config);\n }\n\n if (config.type === 'react-component') {\n config.type = 'component';\n config.componentName = 'lm-react-component';\n }\n\n if (!this._typeToItem[config.type]) {\n typeErrorMsg =\n \"Unknown type '\" +\n config.type +\n \"'. \" +\n 'Valid types are ' +\n Object.keys(this._typeToItem).join(',');\n\n throw new ConfigurationError(typeErrorMsg);\n }\n\n /**\n * We add an additional stack around every component that's not within a stack anyways.\n */\n if (\n // If this is a component\n config.type === 'component' &&\n // and it's not already within a stack\n !(parent instanceof Stack) &&\n // and we have a parent\n !!parent &&\n // and it's not the topmost item in a new window\n !(this.isSubWindow === true && parent instanceof Root)\n ) {\n config = {\n type: 'stack',\n width: config.width,\n height: config.height,\n content: [config],\n };\n }\n\n contentItem = new this._typeToItem[config.type](this, config, parent);\n return contentItem;\n }\n\n /**\n\t * Creates a popout window with the specified content and dimensions\n\t *\n\t * @param configOrContentItem\n\t * @param dimensions A map with width, height, left and top\n\t * @param parentId the id of the element this item will be appended to\n\t * when popIn is called\n\t * @param indexInParent The position of this item within its parent element\n\n\t * @returns Created popout\n\t */\n createPopout(\n configOrContentItem:\n | ItemConfigType\n | AbstractContentItem\n | ItemConfigType[],\n dimensions?: { width: number; height: number; left: number; top: number },\n parentId?: string,\n indexInParent?: number\n ): BrowserPopout | undefined {\n let config = configOrContentItem;\n let configArray: ItemConfigType[] = [];\n const isItem = configOrContentItem instanceof AbstractContentItem;\n const self = this;\n\n if (isItem) {\n configArray = this.toConfig(configOrContentItem).content;\n parentId = getUniqueId();\n\n /**\n * If the item is the only component within a stack or for some\n * other reason the only child of its parent the parent will be destroyed\n * when the child is removed.\n *\n * In order to support this we move up the tree until we find something\n * that will remain after the item is being popped out\n */\n let parent = configOrContentItem.parent;\n let child = configOrContentItem;\n while (parent?.contentItems.length === 1 && !parent.isRoot) {\n child = parent;\n parent = parent.parent;\n }\n\n parent?.addId(parentId);\n if (indexInParent == undefined || Number.isNaN(indexInParent)) {\n indexInParent = parent?.contentItems.indexOf(child);\n }\n } else {\n if (!(configOrContentItem instanceof Array)) {\n configArray = [configOrContentItem];\n } else {\n configArray = configOrContentItem;\n }\n }\n\n if (!dimensions && isItem) {\n const windowLeft = window.screenX || window.screenLeft;\n const windowTop = window.screenY || window.screenTop;\n const offset = configOrContentItem.element.offset() ?? {\n left: 0,\n top: 0,\n };\n\n dimensions = {\n left: windowLeft + offset.left,\n top: windowTop + offset.top,\n width: configOrContentItem.element.width() ?? 0,\n height: configOrContentItem.element.height() ?? 0,\n };\n }\n\n if (!dimensions && !isItem) {\n dimensions = {\n left: window.screenX || window.screenLeft + 20,\n top: window.screenY || window.screenTop + 20,\n width: 500,\n height: 309,\n };\n }\n\n if (isItem) {\n configOrContentItem.remove();\n }\n\n if (!dimensions || !parentId || indexInParent === undefined) {\n return;\n }\n\n const browserPopout = new BrowserPopout(\n configArray,\n dimensions,\n parentId,\n indexInParent,\n this\n );\n\n browserPopout.on('initialised', function () {\n self.emit('windowOpened', browserPopout);\n });\n\n browserPopout.on('closed', function () {\n self._$reconcilePopoutWindows();\n });\n\n this.openPopouts.push(browserPopout);\n\n return browserPopout;\n }\n\n /**\n * Attaches DragListener to any given DOM element\n * and turns it into a way of creating new ContentItems\n * by 'dragging' the DOM element into the layout\n *\n * @param element\n * @param itemConfig for the new item to be created, or a function which will provide it\n */\n createDragSource(\n element: JQuery<HTMLElement>,\n itemConfig: ComponentConfig | (() => ComponentConfig)\n ) {\n this.config.settings.constrainDragToContainer = false;\n var dragSource = new DragSource(element, itemConfig, this);\n this._dragSources.push(dragSource);\n\n return dragSource;\n }\n\n /**\n * Create a new item in a dragging state, given a starting mouse event to act as the initial position\n *\n * @param itemConfig for the new item to be created, or a function which will provide it\n * @param event used as the starting position for the dragProxy\n */\n createDragSourceFromEvent(\n itemConfig: ItemConfig | (() => ItemConfig),\n event: JQuery.TriggeredEvent\n ) {\n this.config.settings.constrainDragToContainer = false;\n return new DragSourceFromEvent(itemConfig, this, event);\n }\n\n /**\n * Programmatically selects an item. This deselects\n * the currently selected item, selects the specified item\n * and emits a selectionChanged event\n *\n * @param item\n * @param _$silent Wheather to notify the item of its selection\n */\n selectItem(item: AbstractContentItem, _$silent?: boolean) {\n if (this.config.settings.selectionEnabled !== true) {\n throw new Error(\n 'Please set selectionEnabled to true to use this feature'\n );\n }\n\n if (item === this.selectedItem) {\n return;\n }\n\n if (this.selectedItem !== null) {\n this.selectedItem.deselect();\n }\n\n if (item && _$silent !== true) {\n item.select();\n }\n\n this.selectedItem = item;\n\n this.emit('selectionChanged', item);\n }\n\n /*************************\n * PACKAGE PRIVATE\n *************************/\n _$maximiseItem(contentItem: AbstractContentItem) {\n if (this._maximisedItem !== null) {\n this._$minimiseItem(this._maximisedItem);\n }\n this._maximisedItem = contentItem;\n this._maximisedItem.addId('__glMaximised');\n contentItem.element.addClass('lm_maximised');\n contentItem.element.after(this._maximisePlaceholder);\n this.root.element.prepend(contentItem.element);\n contentItem.element.width(this.container.width() ?? 0);\n contentItem.element.height(this.container.height() ?? 0);\n contentItem.callDownwards('setSize');\n this._maximisedItem.emit('maximised');\n this.emit('stateChanged');\n }\n\n _$minimiseItem(contentItem: AbstractContentItem) {\n contentItem.element.removeClass('lm_maximised');\n contentItem.removeId('__glMaximised');\n this._maximisePlaceholder.after(contentItem.element);\n this._maximisePlaceholder.remove();\n contentItem.parent?.callDownwards('setSize');\n this._maximisedItem = null;\n contentItem.emit('minimised');\n this.emit('stateChanged');\n }\n\n /**\n * This method is used to get around sandboxed iframe restrictions.\n * If 'allow-top-navigation' is not specified in the iframe's 'sandbox' attribute\n * (as is the case with codepens) the parent window is forbidden from calling certain\n * methods on the child, such as window.close() or setting document.location.href.\n *\n * This prevented GoldenLayout popouts from popping in in codepens. The fix is to call\n * _$closeWindow on the child window's gl instance which (after a timeout to disconnect\n * the invoking method from the close call) closes itself.\n */\n _$closeWindow() {\n window.setTimeout(function () {\n window.close();\n }, 1);\n }\n\n _$getArea(x: number, y: number) {\n let smallestSurface = Infinity;\n let mathingArea: ItemArea | null = null;\n\n for (let i = 0; i < this._itemAreas.length; i++) {\n const area = this._itemAreas[i];\n\n if (\n x > area.x1 &&\n x < area.x2 &&\n y > area.y1 &&\n y < area.y2 &&\n smallestSurface > area.surface\n ) {\n smallestSurface = area.surface;\n mathingArea = area;\n }\n }\n\n return mathingArea;\n }\n\n /**\n * Creates the drop zones at the edges of the screen\n */\n _$createRootItemAreas() {\n const areaSize = 50;\n const rootArea = { ...this.root._$getArea() };\n\n const areas = [\n {\n ...rootArea,\n side: 'left' as const,\n x2: rootArea.x1 + areaSize,\n },\n {\n ...rootArea,\n side: 'right' as const,\n x1: rootArea.x2 - areaSize,\n },\n {\n ...rootArea,\n side: 'top' as const,\n y2: rootArea.y1 + areaSize,\n },\n {\n ...rootArea,\n side: 'bottom' as const,\n y1: rootArea.y2 - areaSize,\n },\n ];\n\n areas.forEach(area => {\n area.surface = (area.x2 - area.x1) * (area.y2 - area.y1);\n });\n\n this._itemAreas.push(...areas);\n }\n\n _$calculateItemAreas() {\n const allContentItems = this._getAllContentItems();\n this._itemAreas = [];\n\n /**\n * If the last item is dragged out, highlight the entire container size to\n * allow to re-drop it. allContentItems[ 0 ] === this.root at this point\n *\n * Don't include root into the possible drop areas though otherwise since it\n * will used for every gap in the layout, e.g. splitters\n */\n if (allContentItems.length === 1) {\n this._itemAreas.push(this.root._$getArea());\n return;\n }\n this._$createRootItemAreas();\n\n for (let i = 0; i < allContentItems.length; i++) {\n const item = allContentItems[i];\n if (!isStack(item)) {\n continue;\n }\n\n const area = item._$getArea();\n\n if (area === null) {\n continue;\n } else if (area instanceof Array) {\n this._itemAreas = this._itemAreas.concat(area);\n } else {\n this._itemAreas.push(area);\n let header = {\n ...area,\n ...area.contentItem._contentAreaDimensions?.header.highlightArea,\n };\n header.surface = (header.x2 - header.x1) * (header.y2 - header.y1);\n this._itemAreas.push(header);\n }\n }\n }\n\n /**\n * Takes a contentItem or a configuration and optionally a parent\n * item and returns an initialised instance of the contentItem.\n * If the contentItem is a function, it is first called\n *\n * @param contentItemOrConfig\n * @param parent Only necessary when passing in config\n */\n _$normalizeContentItem(\n contentItemOrConfig:\n | { type: ItemConfig['type'] }\n | ItemConfigType\n | AbstractContentItem\n | (() => AbstractContentItem),\n parent?: AbstractContentItem\n ) {\n if (!contentItemOrConfig) {\n throw new Error('No content item defined');\n }\n\n if (typeof contentItemOrConfig === 'function') {\n contentItemOrConfig = contentItemOrConfig();\n }\n\n if (contentItemOrConfig instanceof AbstractContentItem) {\n return contentItemOrConfig;\n }\n\n if ($.isPlainObject(contentItemOrConfig) && contentItemOrConfig.type) {\n var newContentItem = this.createContentItem(contentItemOrConfig, parent);\n newContentItem.callDownwards('_$init');\n return newContentItem;\n } else {\n throw new Error('Invalid contentItem');\n }\n }\n\n /**\n * Iterates through the array of open popout windows and removes the ones\n * that are effectively closed. This is necessary due to the lack of reliably\n * listening for window.close / unload events in a cross browser compatible fashion.\n */\n _$reconcilePopoutWindows() {\n const openPopouts: BrowserPopout[] = [];\n\n for (let i = 0; i < this.openPopouts.length; i++) {\n if (this.openPopouts[i].getWindow()?.closed === false) {\n openPopouts.push(this.openPopouts[i]);\n } else {\n this.emit('windowClosed', this.openPopouts[i]);\n }\n }\n\n if (this.openPopouts.length !== openPopouts.length) {\n this.emit('stateChanged');\n this.openPopouts = openPopouts;\n }\n }\n\n /***************************\n * PRIVATE\n ***************************/\n /**\n * Returns a flattened array of all content items,\n * regardles of level or type\n * @return Flattened array of content items\n */\n _getAllContentItems() {\n const allContentItems: AbstractContentItem[] = [];\n\n const addChildren = (contentItem: AbstractContentItem) => {\n allContentItems.push(contentItem);\n\n if (contentItem.contentItems instanceof Array) {\n for (let i = 0; i < contentItem.contentItems.length; i++) {\n addChildren(contentItem.contentItems[i]);\n }\n }\n };\n\n addChildren(this.root);\n\n return allContentItems;\n }\n\n /**\n * Binds to DOM/BOM events on init\n */\n _bindEvents() {\n if (this._isFullPage) {\n $(window).resize(this._onResize);\n }\n $(window)\n .on('unload beforeunload', this._onUnload)\n .on('blur.lm', this._windowBlur)\n .on('focus.lm', this._windowFocus);\n }\n\n /**\n * Handles setting a class based on window focus, useful for focus indicators\n */\n _windowBlur() {\n this.root.element.addClass('lm_window_blur');\n }\n\n _windowFocus() {\n this.root.element.removeClass('lm_window_blur');\n }\n\n /**\n * Debounces resize events\n */\n _onResize() {\n clearTimeout(this._resizeTimeoutId);\n this._resizeTimeoutId = window.setTimeout(this.updateSize.bind(this), 100);\n }\n\n /**\n * Extends the default config with the user specific settings and applies\n * derivations. Please note that there's a seperate method (AbstractContentItem._extendItemNode)\n * that deals with the extension of item configs\n *\n * @param config\n * @returns config\n */\n _createConfig(config: Config): Config {\n var windowConfigKey = getQueryStringParam('gl-window');\n\n if (windowConfigKey) {\n this.isSubWindow = true;\n config = JSON.parse(localStorage.getItem(windowConfigKey) || '{}');\n config = unminifyConfig(config);\n localStorage.removeItem(windowConfigKey);\n }\n\n config = $.extend(true, {}, defaultConfig, config);\n\n var nextNode = function (node: Record<string, unknown>) {\n for (var key in node) {\n const value = node[key];\n if (key !== 'props' && typeof value === 'object' && value != null) {\n nextNode(value as Record<string, unknown>);\n } else if (key === 'type' && value === 'react-component') {\n node.type = 'component';\n node.componentName = 'lm-react-component';\n }\n }\n };\n\n nextNode(config);\n\n if (config.settings?.hasHeaders === false) {\n config.dimensions.headerHeight = 0;\n }\n\n return config;\n }\n\n /**\n * This is executed when GoldenLayout detects that it is run\n * within a previously opened popout window.\n */\n _adjustToWindowMode() {\n var popInButton = $(\n '<div class=\"lm_popin\" title=\"' +\n this.config.labels.popin +\n '\">' +\n '<div class=\"lm_icon\"></div>' +\n '<div class=\"lm_bg\"></div>' +\n '</div>'\n );\n\n popInButton.click(() => {\n this.emit('popIn');\n });\n\n document.title = stripTags(this.config.content[0].title ?? '');\n\n $('head').append($('body link, body style, template, .gl_keep'));\n\n this.container = $('body')\n .html('')\n .css('visibility', 'visible')\n .append(popInButton);\n\n /*\n * This seems a bit pointless, but actually causes a reflow/re-evaluation getting around\n * slickgrid's \"Cannot find stylesheet.\" bug in chrome\n */\n var x = document.body.offsetHeight; // jshint ignore:line\n\n /*\n * Expose this instance on the window object\n * to allow the opening window to interact with\n * it\n */\n (window as Window &\n typeof globalThis & { __glInstance: LayoutManager }).__glInstance = this;\n }\n\n /**\n * Creates Subwindows (if there are any). Throws an error\n * if popouts are blocked.\n */\n _createSubWindows() {\n if (!this.config.openPopouts) {\n return;\n }\n\n for (let i = 0; i < this.config.openPopouts.length; i++) {\n const popout = this.config.openPopouts[i];\n\n this.createPopout(\n popout.content,\n popout.dimensions,\n popout.parentId,\n popout.indexInParent\n );\n }\n }\n\n _getContainer() {\n const container = this._originalContainer\n ? $(this._originalContainer)\n : $('body');\n\n if (container.length === 0) {\n throw new Error('GoldenLayout container not found');\n }\n\n if (container.length > 1) {\n throw new Error('GoldenLayout more than one container element specified');\n }\n\n return container;\n }\n\n /**\n * Determines what element the layout will be created in\n */\n _setContainer() {\n const container = this._getContainer();\n\n if (container[0] === document.body) {\n this._isFullPage = true;\n\n $('html, body').css({\n height: '100%',\n margin: 0,\n padding: 0,\n overflow: 'hidden',\n });\n }\n\n this.container = container;\n }\n\n /**\n * Kicks of the initial, recursive creation chain\n *\n * @param config GoldenLayout Config\n */\n _create(config: Config) {\n var errorMsg;\n\n if (!(config.content instanceof Array)) {\n if (config.content === undefined) {\n errorMsg = \"Missing setting 'content' on top level of configuration\";\n } else {\n errorMsg = \"Configuration parameter 'content' must be an array\";\n }\n\n throw new ConfigurationError(errorMsg, config);\n }\n\n if (config.content.length > 1) {\n errorMsg = \"Top level content can't contain more then one element.\";\n throw new ConfigurationError(errorMsg, config);\n }\n\n this.root = new Root(this, { content: config.content }, this.container);\n this.root.callDownwards('_$init');\n\n if (config.maximisedItemId === '__glMaximised') {\n this.root.getItemsById(config.maximisedItemId)[0].toggleMaximise();\n }\n }\n\n /**\n * Called when the window is closed or the user navigates away\n * from the page\n */\n _onUnload() {\n if (this.config.settings.closePopoutsOnUnload === true) {\n for (var i = 0; i < this.openPopouts.length; i++) {\n this.openPopouts[i].close();\n }\n }\n }\n\n /**\n * Adjusts the number of columns to be lower to fit the screen and still maintain minItemWidth.\n */\n _adjustColumnsResponsive() {\n // If there is no min width set, or not content items, do nothing.\n if (\n !this._useResponsiveLayout() ||\n this._updatingColumnsResponsive ||\n !this.config.dimensions ||\n !this.config.dimensions.minItemWidth ||\n this.root.contentItems.length === 0 ||\n !this.root.contentItems[0].isRow\n ) {\n this._firstLoad = false;\n return;\n }\n\n this._firstLoad = false;\n\n // If there is only one column, do nothing.\n var columnCount = this.root.contentItems[0].contentItems.length;\n if (columnCount <= 1) {\n return;\n }\n\n // If they all still fit, do nothing.\n var minItemWidth = this.config.dimensions.minItemWidth;\n var totalMinWidth = columnCount * minItemWidth;\n if (this.width == null || totalMinWidth <= this.width) {\n return;\n }\n\n // Prevent updates while it is already happening.\n this._updatingColumnsResponsive = true;\n\n // Figure out how many columns to stack, and put them all in the first stack container.\n var finalColumnCount = Math.max(Math.floor(this.width / minItemWidth), 1);\n var stackColumnCount = columnCount - finalColumnCount;\n\n var rootContentItem = this.root.contentItems[0];\n var firstStackContainer = this._findAllStackContainers()[0];\n for (var i = 0; i < stackColumnCount; i++) {\n // Stack from right.\n var column =\n rootContentItem.contentItems[rootContentItem.contentItems.length - 1];\n this._addChildContentItemsToContainer(firstStackContainer, column);\n }\n\n this._updatingColumnsResponsive = false;\n }\n\n /**\n * Determines if responsive layout should be used.\n *\n * @returns True if responsive layout should be used; otherwise false.\n */\n _useResponsiveLayout() {\n return (\n this.config.settings &&\n (this.config.settings.responsiveMode == 'always' ||\n (this.config.settings.responsiveMode == 'onload' && this._firstLoad))\n );\n }\n\n /**\n * Adds all children of a node to another container recursively.\n * @param container - Container to add child content items to.\n * @param node - Node to search for content items.\n */\n _addChildContentItemsToContainer(\n container: AbstractContentItem,\n node: AbstractContentItem\n ) {\n if (node.type === 'stack') {\n node.contentItems.forEach(function (item) {\n container.addChild(item);\n node.removeChild(item, true);\n });\n } else {\n node.contentItems.forEach(item => {\n this._addChildContentItemsToContainer(container, item);\n });\n }\n }\n\n /**\n * Finds all the stack containers.\n * @returns The found stack containers.\n */\n _findAllStackContainers() {\n const stackContainers: Stack[] = [];\n this._findAllStackContainersRecursive(stackContainers, this.root);\n\n return stackContainers;\n }\n\n /**\n * Finds all the stack containers.\n *\n * @param stackContainers Set of containers to populate.\n * @param node Current node to process.\n */\n _findAllStackContainersRecursive(\n stackContainers: Stack[],\n node: AbstractContentItem\n ) {\n node.contentItems.forEach(item => {\n if (isStack(item)) {\n stackContainers.push(item);\n } else if (!item.isComponent) {\n this._findAllStackContainersRecursive(stackContainers, item);\n }\n });\n }\n}\n"],"mappings":";;;;;;AAAA,OAAOA,CAAP,MAAc,QAAd;OAEOC,E;SACEC,a;SAUPC,a,EACAC,U,EACAC,mB,EACAC,mB,EACAC,mB;SAEOC,kB;SAEPC,mB,EAEAC,O,EACAC,S,EACAC,I,EACAC,W,EACAC,K;SAGAC,Y,EACAC,c,EACAC,Y,EACAC,Q,EACAC,qB,EACAC,mB,EACAC,W,EACAC,S;;AASF;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,aAAN,SAA4BN,YAA5B,CAAyC;EACtD;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACqB,OAAZF,YAAY,CAACS,MAAD,EAA0C;IAC3D,OAAOT,YAAY,CAACS,MAAD,CAAnB;EACD;EAED;AACF;AACA;AACA;AACA;AACA;AACA;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AACA,IAAI,CAACwL,WAAV,EAAuB;QAC5B,KAAKD,gCAAL,CAAsCD,eAAtC,EAAuDtL,IAAvD;MACD;IACF,CAND;EAOD;;AAzoCqD;;gBAAnCrC,a,UAILtB,E"}
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as config from './config';
|
|
2
|
+
import * as container from './container';
|
|
3
|
+
import * as controls from './controls';
|
|
4
|
+
import * as errors from './errors';
|
|
5
|
+
import * as items from './items';
|
|
6
|
+
import * as utils from './utils';
|
|
7
|
+
declare const lm: {
|
|
8
|
+
config: typeof config;
|
|
9
|
+
container: typeof container;
|
|
10
|
+
controls: typeof controls;
|
|
11
|
+
errors: typeof errors;
|
|
12
|
+
items: typeof items;
|
|
13
|
+
utils: typeof utils;
|
|
14
|
+
};
|
|
15
|
+
export default lm;
|
|
16
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,QAAA,MAAM,EAAE;;;;;;;CAOP,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
package/dist/base.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import config from
|
|
2
|
-
import container from
|
|
3
|
-
import controls from
|
|
4
|
-
import errors from
|
|
5
|
-
import items from
|
|
6
|
-
import utils from
|
|
1
|
+
import * as config from "./config/index.js";
|
|
2
|
+
import * as container from "./container/index.js";
|
|
3
|
+
import * as controls from "./controls/index.js";
|
|
4
|
+
import * as errors from "./errors/index.js";
|
|
5
|
+
import * as items from "./items/index.js";
|
|
6
|
+
import * as utils from "./utils/index.js";
|
|
7
7
|
var lm = {
|
|
8
8
|
config,
|
|
9
9
|
container,
|
package/dist/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":["config","container","controls","errors","items","utils","lm"],"sources":["../src/base.
|
|
1
|
+
{"version":3,"file":"base.js","names":["config","container","controls","errors","items","utils","lm"],"sources":["../src/base.ts"],"sourcesContent":["import * as config from './config';\nimport * as container from './container';\nimport * as controls from './controls';\nimport * as errors from './errors';\nimport * as items from './items';\nimport * as utils from './utils';\n\nconst lm = {\n config,\n container,\n controls,\n errors,\n items,\n utils,\n};\n\nexport default lm;\n"],"mappings":"OAAO,KAAKA,M;OACL,KAAKC,S;OACL,KAAKC,Q;OACL,KAAKC,M;OACL,KAAKC,K;OACL,KAAKC,K;AAEZ,IAAMC,EAAE,GAAG;EACTN,MADS;EAETC,SAFS;EAGTC,QAHS;EAITC,MAJS;EAKTC,KALS;EAMTC;AANS,CAAX;AASA,eAAeC,EAAf"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { ItemConfigType } from './ItemConfig';
|
|
2
|
+
export declare type Config = {
|
|
3
|
+
settings: Partial<Settings>;
|
|
4
|
+
dimensions: Dimensions;
|
|
5
|
+
labels: Labels;
|
|
6
|
+
content: ItemConfigType[];
|
|
7
|
+
maximisedItemId?: string;
|
|
8
|
+
openPopouts?: PopoutConfig[];
|
|
9
|
+
};
|
|
10
|
+
export declare type PopoutConfig = Config & {
|
|
11
|
+
parentId: string;
|
|
12
|
+
indexInParent: number;
|
|
13
|
+
dimensions: Dimensions & {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
left: number;
|
|
17
|
+
top: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export interface Settings {
|
|
21
|
+
/**
|
|
22
|
+
* Turns headers on or off. If false, the layout will be displayed with splitters only.
|
|
23
|
+
* Default: true
|
|
24
|
+
*/
|
|
25
|
+
hasHeaders: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Constrains the area in which items can be dragged to the layout's container. Will be set to false
|
|
28
|
+
* automatically when layout.createDragSource() is called.
|
|
29
|
+
* Default: true
|
|
30
|
+
*/
|
|
31
|
+
constrainDragToContainer: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
|
|
34
|
+
* Default: true
|
|
35
|
+
*/
|
|
36
|
+
reorderEnabled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
|
|
39
|
+
* the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
|
|
40
|
+
* Default: false
|
|
41
|
+
*/
|
|
42
|
+
selectionEnabled: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
|
|
45
|
+
* be transferred to the new window, if false only the active component will be opened.
|
|
46
|
+
* Default: false
|
|
47
|
+
*/
|
|
48
|
+
popoutWholeStack: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
|
|
51
|
+
* If false, the popout call will fail silently.
|
|
52
|
+
* Default: true
|
|
53
|
+
*/
|
|
54
|
+
blockedPopoutsThrowError: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
|
|
57
|
+
* strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
|
|
58
|
+
* addition, any changes made to popouts won't be stored after the parent is closed.
|
|
59
|
+
* Default: true
|
|
60
|
+
*/
|
|
61
|
+
closePopoutsOnUnload: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies if the popout icon should be displayed in the header-bar.
|
|
64
|
+
* Default: true
|
|
65
|
+
*/
|
|
66
|
+
showPopoutIcon: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Specifies if the maximise icon should be displayed in the header-bar.
|
|
69
|
+
* Default: true
|
|
70
|
+
*/
|
|
71
|
+
showMaximiseIcon: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies if the close icon should be displayed in the header-bar.
|
|
74
|
+
* Default: true
|
|
75
|
+
*/
|
|
76
|
+
showCloseIcon: boolean;
|
|
77
|
+
responsiveMode: 'onload' | 'always' | 'none';
|
|
78
|
+
/**
|
|
79
|
+
* Maximum pixel overlap per tab
|
|
80
|
+
*/
|
|
81
|
+
tabOverlapAllowance: number;
|
|
82
|
+
tabControlOffset: number;
|
|
83
|
+
}
|
|
84
|
+
export interface Dimensions {
|
|
85
|
+
/**
|
|
86
|
+
* The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
|
|
87
|
+
* than the visible one, making it safe to set this to small values without affecting usability.
|
|
88
|
+
* Default: 5
|
|
89
|
+
*/
|
|
90
|
+
borderWidth: number;
|
|
91
|
+
borderGrabWidth: number;
|
|
92
|
+
/**
|
|
93
|
+
* The minimum height an item can be resized to (in pixel).
|
|
94
|
+
* Default: 10
|
|
95
|
+
*/
|
|
96
|
+
minItemHeight: number;
|
|
97
|
+
/**
|
|
98
|
+
* The minimum width an item can be resized to (in pixel).
|
|
99
|
+
* Default: 10
|
|
100
|
+
*/
|
|
101
|
+
minItemWidth: number;
|
|
102
|
+
/**
|
|
103
|
+
* The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
|
|
104
|
+
* adjusted accordingly.
|
|
105
|
+
* Default: 20
|
|
106
|
+
*/
|
|
107
|
+
headerHeight: number;
|
|
108
|
+
/**
|
|
109
|
+
* The width of the element that appears when an item is dragged (in pixel).
|
|
110
|
+
* Default: 300
|
|
111
|
+
*/
|
|
112
|
+
dragProxyWidth: number;
|
|
113
|
+
/**
|
|
114
|
+
* The height of the element that appears when an item is dragged (in pixel).
|
|
115
|
+
* Default: 200
|
|
116
|
+
*/
|
|
117
|
+
dragProxyHeight: number;
|
|
118
|
+
}
|
|
119
|
+
export interface Labels {
|
|
120
|
+
/**
|
|
121
|
+
* The tooltip text that appears when hovering over the close icon.
|
|
122
|
+
* Default: 'close'
|
|
123
|
+
*/
|
|
124
|
+
close: string;
|
|
125
|
+
/**
|
|
126
|
+
* The tooltip text that appears when hovering over the maximise icon.
|
|
127
|
+
* Default: 'maximise'
|
|
128
|
+
*/
|
|
129
|
+
maximise: string;
|
|
130
|
+
/**
|
|
131
|
+
* The tooltip text that appears when hovering over the minimise icon.
|
|
132
|
+
* Default: 'minimise'
|
|
133
|
+
*/
|
|
134
|
+
minimise: string;
|
|
135
|
+
/**
|
|
136
|
+
* The tooltip text that appears when hovering over the popout icon.
|
|
137
|
+
* Default: 'open in new window'
|
|
138
|
+
*/
|
|
139
|
+
popout: string;
|
|
140
|
+
tabDropdown: string;
|
|
141
|
+
tabNextLabel: string;
|
|
142
|
+
tabPreviousLabel: string;
|
|
143
|
+
popin: string;
|
|
144
|
+
}
|
|
145
|
+
export declare const defaultConfig: Config;
|
|
146
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,oBAAY,MAAM,GAAG;IACnB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B,CAAC;AAEF,oBAAY,YAAY,GAAG,MAAM,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,GA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QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,MAAM,CAAC;IAErB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,MAsC1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var defaultConfig = {
|
|
1
|
+
export var defaultConfig = Object.freeze({
|
|
2
2
|
openPopouts: [],
|
|
3
3
|
settings: {
|
|
4
4
|
hasHeaders: true,
|
|
@@ -15,7 +15,7 @@ var defaultConfig = {
|
|
|
15
15
|
// Can be onload, always, or none.
|
|
16
16
|
tabOverlapAllowance: 0,
|
|
17
17
|
// maximum pixel overlap per tab
|
|
18
|
-
// reorderOnTabMenuClick: true, //
|
|
18
|
+
// reorderOnTabMenuClick: true, // Deephaven disabled
|
|
19
19
|
tabControlOffset: 10
|
|
20
20
|
},
|
|
21
21
|
dimensions: {
|
|
@@ -36,7 +36,7 @@ var defaultConfig = {
|
|
|
36
36
|
tabDropdown: 'Additional tabs',
|
|
37
37
|
tabNextLabel: 'Next',
|
|
38
38
|
tabPreviousLabel: 'Previous'
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=
|
|
39
|
+
},
|
|
40
|
+
content: []
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=Config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.js","names":["defaultConfig","Object","freeze","openPopouts","settings","hasHeaders","constrainDragToContainer","reorderEnabled","selectionEnabled","popoutWholeStack","blockedPopoutsThrowError","closePopoutsOnUnload","showPopoutIcon","showMaximiseIcon","showCloseIcon","responsiveMode","tabOverlapAllowance","tabControlOffset","dimensions","borderWidth","borderGrabWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","popin","tabDropdown","tabNextLabel","tabPreviousLabel","content"],"sources":["../../src/config/Config.ts"],"sourcesContent":["import type { ItemConfigType } from './ItemConfig';\n\nexport type Config = {\n settings: Partial<Settings>;\n dimensions: Dimensions;\n labels: Labels;\n content: ItemConfigType[];\n maximisedItemId?: string;\n openPopouts?: PopoutConfig[];\n};\n\nexport type PopoutConfig = Config & {\n parentId: string;\n indexInParent: number;\n dimensions: Dimensions & {\n width: number;\n\n height: number;\n\n left: number;\n\n top: number;\n };\n};\n\nexport interface Settings {\n /**\n * Turns headers on or off. If false, the layout will be displayed with splitters only.\n * Default: true\n */\n hasHeaders: boolean;\n\n /**\n * Constrains the area in which items can be dragged to the layout's container. Will be set to false\n * automatically when layout.createDragSource() is called.\n * Default: true\n */\n constrainDragToContainer: boolean;\n\n /**\n * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.\n * Default: true\n */\n reorderEnabled: boolean;\n\n /**\n * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to\n * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.\n * Default: false\n */\n selectionEnabled: boolean;\n\n /**\n * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will\n * be transferred to the new window, if false only the active component will be opened.\n * Default: false\n */\n popoutWholeStack: boolean;\n\n /**\n * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).\n * If false, the popout call will fail silently.\n * Default: true\n */\n blockedPopoutsThrowError: boolean;\n\n /**\n * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a\n * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In\n * addition, any changes made to popouts won't be stored after the parent is closed.\n * Default: true\n */\n closePopoutsOnUnload: boolean;\n\n /**\n * Specifies if the popout icon should be displayed in the header-bar.\n * Default: true\n */\n showPopoutIcon: boolean;\n\n /**\n * Specifies if the maximise icon should be displayed in the header-bar.\n * Default: true\n */\n showMaximiseIcon: boolean;\n\n /**\n * Specifies if the close icon should be displayed in the header-bar.\n * Default: true\n */\n showCloseIcon: boolean;\n\n responsiveMode: 'onload' | 'always' | 'none'; // Can be onload, always, or none.\n\n /**\n * Maximum pixel overlap per tab\n */\n tabOverlapAllowance: number;\n\n tabControlOffset: number;\n}\n\nexport interface Dimensions {\n /**\n * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider\n * than the visible one, making it safe to set this to small values without affecting usability.\n * Default: 5\n */\n borderWidth: number;\n\n borderGrabWidth: number;\n\n /**\n * The minimum height an item can be resized to (in pixel).\n * Default: 10\n */\n minItemHeight: number;\n\n /**\n * The minimum width an item can be resized to (in pixel).\n * Default: 10\n */\n minItemWidth: number;\n\n /**\n * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be\n * adjusted accordingly.\n * Default: 20\n */\n headerHeight: number;\n\n /**\n * The width of the element that appears when an item is dragged (in pixel).\n * Default: 300\n */\n dragProxyWidth: number;\n\n /**\n * The height of the element that appears when an item is dragged (in pixel).\n * Default: 200\n */\n dragProxyHeight: number;\n}\n\nexport interface Labels {\n /**\n * The tooltip text that appears when hovering over the close icon.\n * Default: 'close'\n */\n close: string;\n\n /**\n * The tooltip text that appears when hovering over the maximise icon.\n * Default: 'maximise'\n */\n maximise: string;\n\n /**\n * The tooltip text that appears when hovering over the minimise icon.\n * Default: 'minimise'\n */\n minimise: string;\n\n /**\n * The tooltip text that appears when hovering over the popout icon.\n * Default: 'open in new window'\n */\n popout: string;\n\n tabDropdown: string;\n\n tabNextLabel: string;\n\n tabPreviousLabel: string;\n\n popin: string;\n}\n\nexport const defaultConfig: Config = Object.freeze({\n openPopouts: [],\n settings: {\n hasHeaders: true,\n constrainDragToContainer: true,\n reorderEnabled: true,\n selectionEnabled: false,\n popoutWholeStack: false,\n blockedPopoutsThrowError: true,\n closePopoutsOnUnload: true,\n showPopoutIcon: true,\n showMaximiseIcon: true,\n showCloseIcon: true,\n responsiveMode: 'onload', // Can be onload, always, or none.\n tabOverlapAllowance: 0, // maximum pixel overlap per tab\n // reorderOnTabMenuClick: true, // Deephaven disabled\n tabControlOffset: 10,\n },\n dimensions: {\n borderWidth: 5,\n borderGrabWidth: 10,\n minItemHeight: 10,\n minItemWidth: 10,\n headerHeight: 20,\n dragProxyWidth: 300,\n dragProxyHeight: 200,\n },\n labels: {\n close: 'Close',\n maximise: 'Maximize',\n minimise: 'Minimize',\n popout: 'Open in new window',\n popin: 'Pop in',\n tabDropdown: 'Additional tabs',\n tabNextLabel: 'Next',\n tabPreviousLabel: 'Previous',\n },\n content: [],\n});\n"],"mappings":"AAkLA,OAAO,IAAMA,aAAqB,GAAGC,MAAM,CAACC,MAAP,CAAc;EACjDC,WAAW,EAAE,EADoC;EAEjDC,QAAQ,EAAE;IACRC,UAAU,EAAE,IADJ;IAERC,wBAAwB,EAAE,IAFlB;IAGRC,cAAc,EAAE,IAHR;IAIRC,gBAAgB,EAAE,KAJV;IAKRC,gBAAgB,EAAE,KALV;IAMRC,wBAAwB,EAAE,IANlB;IAORC,oBAAoB,EAAE,IAPd;IAQRC,cAAc,EAAE,IARR;IASRC,gBAAgB,EAAE,IATV;IAURC,aAAa,EAAE,IAVP;IAWRC,cAAc,EAAE,QAXR;IAWkB;IAC1BC,mBAAmB,EAAE,CAZb;IAYgB;IACxB;IACAC,gBAAgB,EAAE;EAdV,CAFuC;EAkBjDC,UAAU,EAAE;IACVC,WAAW,EAAE,CADH;IAEVC,eAAe,EAAE,EAFP;IAGVC,aAAa,EAAE,EAHL;IAIVC,YAAY,EAAE,EAJJ;IAKVC,YAAY,EAAE,EALJ;IAMVC,cAAc,EAAE,GANN;IAOVC,eAAe,EAAE;EAPP,CAlBqC;EA2BjDC,MAAM,EAAE;IACNC,KAAK,EAAE,OADD;IAENC,QAAQ,EAAE,UAFJ;IAGNC,QAAQ,EAAE,UAHJ;IAINC,MAAM,EAAE,oBAJF;IAKNC,KAAK,EAAE,QALD;IAMNC,WAAW,EAAE,iBANP;IAONC,YAAY,EAAE,MAPR;IAQNC,gBAAgB,EAAE;EARZ,CA3ByC;EAqCjDC,OAAO,EAAE;AArCwC,CAAd,CAA9B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { StackHeaderConfig } from '../items/Stack';
|
|
2
|
+
export declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
|
|
3
|
+
export interface ItemConfig {
|
|
4
|
+
/**
|
|
5
|
+
* The type of the item.
|
|
6
|
+
*/
|
|
7
|
+
type: 'default' | 'root' | 'row' | 'column' | 'stack' | 'component' | 'react-component';
|
|
8
|
+
/**
|
|
9
|
+
* An array of configurations for items that will be created as children of this item.
|
|
10
|
+
*/
|
|
11
|
+
content?: (ItemConfig | ItemConfigType)[];
|
|
12
|
+
/**
|
|
13
|
+
* The width of this item, relative to the other children of its parent in percent
|
|
14
|
+
*/
|
|
15
|
+
width?: number;
|
|
16
|
+
minWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The height of this item, relative to the other children of its parent in percent
|
|
19
|
+
*/
|
|
20
|
+
height?: number;
|
|
21
|
+
minHeight?: number;
|
|
22
|
+
/**
|
|
23
|
+
* A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
|
|
24
|
+
*/
|
|
25
|
+
id?: string | string[];
|
|
26
|
+
/**
|
|
27
|
+
* Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
|
|
28
|
+
* will return false
|
|
29
|
+
* Default: true
|
|
30
|
+
*/
|
|
31
|
+
isClosable?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The title of the item as displayed on its tab and on popout windows
|
|
34
|
+
* Default: componentName or ''
|
|
35
|
+
*/
|
|
36
|
+
title?: string;
|
|
37
|
+
isFocusOnShow?: boolean;
|
|
38
|
+
reorderEnabled?: boolean;
|
|
39
|
+
header?: StackHeaderConfig;
|
|
40
|
+
}
|
|
41
|
+
export interface ComponentConfig extends ItemConfig {
|
|
42
|
+
/**
|
|
43
|
+
* The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
|
|
44
|
+
*/
|
|
45
|
+
componentName: string;
|
|
46
|
+
/**
|
|
47
|
+
* A serialisable object. Will be passed to the component constructor function and will be the value returned by
|
|
48
|
+
* container.getState().
|
|
49
|
+
*/
|
|
50
|
+
componentState: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
export interface ReactComponentConfig extends ItemConfig {
|
|
53
|
+
componentName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
|
|
56
|
+
*/
|
|
57
|
+
component: string;
|
|
58
|
+
/**
|
|
59
|
+
* Properties that will be passed to the component and accessible using this.props.
|
|
60
|
+
*/
|
|
61
|
+
props?: any;
|
|
62
|
+
}
|
|
63
|
+
export declare function isGLComponentConfig(item: ItemConfigType): item is ComponentConfig;
|
|
64
|
+
export declare function isReactComponentConfig(item: ItemConfigType): item is ReactComponentConfig;
|
|
65
|
+
export declare const itemDefaultConfig: ItemConfig;
|
|
66
|
+
//# sourceMappingURL=ItemConfig.d.ts.map
|