@deephaven/golden-layout 0.39.1-chart-refactor.14 → 0.40.0
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 +24 -0
- package/dist/LayoutManager.d.ts.map +1 -1
- package/dist/LayoutManager.js +43 -0
- package/dist/LayoutManager.js.map +1 -1
- package/dist/utils/EventEmitter.js +1 -1
- package/dist/utils/EventEmitter.js.map +1 -1
- package/dist/utils/ReactComponentHandler.d.ts +10 -0
- package/dist/utils/ReactComponentHandler.d.ts.map +1 -1
- package/dist/utils/ReactComponentHandler.js +28 -2
- package/dist/utils/ReactComponentHandler.js.map +1 -1
- package/package.json +2 -2
- package/css/goldenlayout-light-theme.css +0 -1
- package/css/goldenlayout-light-theme.css.map +0 -1
- package/css/goldenlayout-soda-theme.css +0 -1
- package/css/goldenlayout-soda-theme.css.map +0 -1
- package/css/goldenlayout-translucent-theme.css +0 -1
- package/css/goldenlayout-translucent-theme.css.map +0 -1
- package/scss/goldenlayout-light-theme.scss +0 -242
- package/scss/goldenlayout-soda-theme.scss +0 -213
- package/scss/goldenlayout-translucent-theme.scss +0 -229
package/dist/LayoutManager.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export default class LayoutManager extends EventEmitter {
|
|
|
55
55
|
private _dragSources;
|
|
56
56
|
private _updatingColumnsResponsive;
|
|
57
57
|
private _firstLoad;
|
|
58
|
+
private _reactChildMap;
|
|
59
|
+
private _reactChildren;
|
|
58
60
|
width: number | null;
|
|
59
61
|
height: number | null;
|
|
60
62
|
root: Root;
|
|
@@ -119,6 +121,28 @@ export default class LayoutManager extends EventEmitter {
|
|
|
119
121
|
* to the document.ready event
|
|
120
122
|
*/
|
|
121
123
|
init(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Adds a react child to the layout manager
|
|
126
|
+
* @param id Unique panel id
|
|
127
|
+
* @param element The React element
|
|
128
|
+
*/
|
|
129
|
+
addReactChild(id: string, element: React.ReactNode): void;
|
|
130
|
+
/**
|
|
131
|
+
* Removes a react child from the layout manager
|
|
132
|
+
* Only removes if the elements for the panelId has not been replaced by a different element
|
|
133
|
+
* @param id Unique panel id
|
|
134
|
+
* @param element The React element
|
|
135
|
+
*/
|
|
136
|
+
removeReactChild(id: string, element: React.ReactNode): void;
|
|
137
|
+
/**
|
|
138
|
+
* Gets the react children in the layout
|
|
139
|
+
*
|
|
140
|
+
* Used in @deephaven/dashboard to mount the react elements
|
|
141
|
+
* inside the app's React tree
|
|
142
|
+
*
|
|
143
|
+
* @returns The react children to mount for this layout manager
|
|
144
|
+
*/
|
|
145
|
+
getReactChildren(): React.ReactNode;
|
|
122
146
|
/**
|
|
123
147
|
* Updates the layout managers size
|
|
124
148
|
* @param width width in pixels
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutManager.d.ts","sourceRoot":"","sources":["../src/LayoutManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,UAAU,EACV,MAAM,EACN,eAAe,EACf,cAAc,EACd,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,QAAQ,EAGR,IAAI,EAEJ,KAAK,EACN,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,YAAY,EACZ,QAAQ,EAKT,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,CAC9B,CAAC,SAAS,eAAe,GAAG,oBAAoB,GAAG,eAAe,IAChE;IACF,KAAK,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;CAC5D,CAAC;AAEF;;;;;GAKG;AACH,MAA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iCAE6B;IAC7B;;;;OAIG;IACH,mBAAmB;IAkBnB;;OAEG;IACH,WAAW;IAUX;;OAEG;IACH,WAAW;IAIX,YAAY;IAIZ;;OAEG;IACH,SAAS;IAKT;;;;;;;OAOG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAiCrC;;;OAGG;IACH,mBAAmB;IAsCnB;;;OAGG;IACH,iBAAiB;IAiBjB,aAAa;IAgBb;;OAEG;IACH,aAAa;IAiBb;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM;IA0BtB;;;OAGG;IACH,SAAS;IAQT;;OAEG;IACH,wBAAwB;IAgDxB;;;;OAIG;IACH,oBAAoB;IAQpB;;;;OAIG;IACH,gCAAgC,CAC9B,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,mBAAmB;IAc3B;;;OAGG;IACH,uBAAuB;IAOvB;;;;;OAKG;IACH,gCAAgC,CAC9B,eAAe,EAAE,KAAK,EAAE,EACxB,IAAI,EAAE,mBAAmB;CAU5B"}
|
package/dist/LayoutManager.js
CHANGED
|
@@ -60,6 +60,8 @@ export default class LayoutManager extends EventEmitter {
|
|
|
60
60
|
_defineProperty(this, "_dragSources", []);
|
|
61
61
|
_defineProperty(this, "_updatingColumnsResponsive", false);
|
|
62
62
|
_defineProperty(this, "_firstLoad", true);
|
|
63
|
+
_defineProperty(this, "_reactChildMap", new Map());
|
|
64
|
+
_defineProperty(this, "_reactChildren", null);
|
|
63
65
|
_defineProperty(this, "width", null);
|
|
64
66
|
_defineProperty(this, "height", null);
|
|
65
67
|
_defineProperty(this, "root", void 0);
|
|
@@ -270,6 +272,47 @@ export default class LayoutManager extends EventEmitter {
|
|
|
270
272
|
this.emit('initialised');
|
|
271
273
|
}
|
|
272
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Adds a react child to the layout manager
|
|
277
|
+
* @param id Unique panel id
|
|
278
|
+
* @param element The React element
|
|
279
|
+
*/
|
|
280
|
+
addReactChild(id, element) {
|
|
281
|
+
this._reactChildMap.set(id, element);
|
|
282
|
+
this._reactChildren = [...this._reactChildMap.values()];
|
|
283
|
+
this.emit('reactChildrenChanged');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Removes a react child from the layout manager
|
|
288
|
+
* Only removes if the elements for the panelId has not been replaced by a different element
|
|
289
|
+
* @param id Unique panel id
|
|
290
|
+
* @param element The React element
|
|
291
|
+
*/
|
|
292
|
+
removeReactChild(id, element) {
|
|
293
|
+
var mapElem = this._reactChildMap.get(id);
|
|
294
|
+
if (mapElem === element) {
|
|
295
|
+
// If an element was replaced it may be destroyed after the other is created
|
|
296
|
+
// In that case, the new element would be removed
|
|
297
|
+
// Make sure the element being removed is the current element associated with its id
|
|
298
|
+
this._reactChildMap.delete(id);
|
|
299
|
+
this._reactChildren = [...this._reactChildMap.values()];
|
|
300
|
+
this.emit('reactChildrenChanged');
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Gets the react children in the layout
|
|
306
|
+
*
|
|
307
|
+
* Used in @deephaven/dashboard to mount the react elements
|
|
308
|
+
* inside the app's React tree
|
|
309
|
+
*
|
|
310
|
+
* @returns The react children to mount for this layout manager
|
|
311
|
+
*/
|
|
312
|
+
getReactChildren() {
|
|
313
|
+
return this._reactChildren;
|
|
314
|
+
}
|
|
315
|
+
|
|
273
316
|
/**
|
|
274
317
|
* Updates the layout managers size
|
|
275
318
|
* @param width width in pixels
|
|
@@ -1 +1 @@
|
|
|
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,CAAC,MAAM,QAAQ;AAAC,OAEhBC,EAAE;AAAA,SACAC,aAAa;AAAA,SAUpBC,aAAa,EACbC,UAAU,EACVC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB;AAAA,SAEZC,kBAAkB;AAAA,SAEzBC,mBAAmB,EAEnBC,OAAO,EACPC,SAAS,EACTC,IAAI,EACJC,WAAW,EACXC,KAAK;AAAA,SAGLC,YAAY,EACZC,cAAc,EACdC,YAAY,EACZC,QAAQ,EACRC,qBAAqB,EACrBC,mBAAmB,EACnBC,WAAW,EACXC,SAAS;AASX;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,aAAa,SAASN,YAAY,CAAC;EACtD;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOF,YAAY,CAACS,MAAc,EAA2B;IAC3D,OAAOT,YAAY,CAACS,MAAM,CAAC;EAC7B;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOR,cAAc,CAACQ,MAA+B,EAAU;IAC7D,OAAOR,cAAc,CAACQ,MAAM,CAAC;EAC/B;EA4CAC,WAAW,CACTD,MAAc,EACdE,SAAwD,EACxD;IACA,KAAK,EAAE;IAAC,uCA9CM,KAAK;IAAA,qCACC,KAAK;IAAA;IAAA,qCASvB;MAAE,oBAAoB,EAAEP;IAAsB,CAAC;IAAA;IAAA,oCAKlB,EAAE;IAAA,wCACkB,IAAI;IAAA,8CAC1BnB,CAAC,CAAC,uCAAuC,CAAC;IAAA,gDACxC,KAAK;IAAA,4CACT,KAAK;IAAA,sCACG,EAAE;IAAA,oDACF,KAAK;IAAA,oCACrB,IAAI;IAAA,+BAEF,IAAI;IAAA,gCACH,IAAI;IAAA;IAAA,qCAEG,EAAE;IAAA,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AAE,IAAI,CAAC9L,IAAI,CAAC;IAEjE,OAAO8L,eAAe;EACxB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,gCAAgC,CAC9BD,eAAwB,EACxBvC,IAAyB,EACzB;IACAA,IAAI,CAAC3I,YAAY,CAACuC,OAAO,CAAC3C,IAAI,IAAI;MAChC,IAAIlD,OAAO,CAACkD,IAAI,CAAC,EAAE;QACjBsL,eAAe,CAAC7K,IAAI,CAACT,IAAI,CAAC;MAC5B,CAAC,MAAM,IAAI,CAACA,IAAI,CAACwL,WAAW,EAAE;QAC5B,IAAI,CAACD,gCAAgC,CAACD,eAAe,EAAEtL,IAAI,CAAC;MAC9D;IACF,CAAC,CAAC;EACJ;AACF;AAAC,gBA1oCoBrC,aAAa,UAIlBtB,EAAE"}
|
|
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","Map","_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","addReactChild","id","element","_reactChildMap","set","_reactChildren","values","removeReactChild","mapElem","get","delete","getReactChildren","width","height","callDownwards","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 private _reactChildMap = new Map<string, React.ReactNode>();\n private _reactChildren: React.ReactNode = null;\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 * Adds a react child to the layout manager\n * @param id Unique panel id\n * @param element The React element\n */\n addReactChild(id: string, element: React.ReactNode) {\n this._reactChildMap.set(id, element);\n this._reactChildren = [...this._reactChildMap.values()];\n this.emit('reactChildrenChanged');\n }\n\n /**\n * Removes a react child from the layout manager\n * Only removes if the elements for the panelId has not been replaced by a different element\n * @param id Unique panel id\n * @param element The React element\n */\n removeReactChild(id: string, element: React.ReactNode) {\n const mapElem = this._reactChildMap.get(id);\n if (mapElem === element) {\n // If an element was replaced it may be destroyed after the other is created\n // In that case, the new element would be removed\n // Make sure the element being removed is the current element associated with its id\n this._reactChildMap.delete(id);\n this._reactChildren = [...this._reactChildMap.values()];\n this.emit('reactChildrenChanged');\n }\n }\n\n /**\n * Gets the react children in the layout\n *\n * Used in @deephaven/dashboard to mount the react elements\n * inside the app's React tree\n *\n * @returns The react children to mount for this layout manager\n */\n getReactChildren() {\n return this._reactChildren;\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,CAAC,MAAM,QAAQ;AAAC,OAEhBC,EAAE;AAAA,SACAC,aAAa;AAAA,SAUpBC,aAAa,EACbC,UAAU,EACVC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB;AAAA,SAEZC,kBAAkB;AAAA,SAEzBC,mBAAmB,EAEnBC,OAAO,EACPC,SAAS,EACTC,IAAI,EACJC,WAAW,EACXC,KAAK;AAAA,SAGLC,YAAY,EACZC,cAAc,EACdC,YAAY,EACZC,QAAQ,EACRC,qBAAqB,EACrBC,mBAAmB,EACnBC,WAAW,EACXC,SAAS;AASX;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,aAAa,SAASN,YAAY,CAAC;EACtD;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOF,YAAY,CAACS,MAAc,EAA2B;IAC3D,OAAOT,YAAY,CAACS,MAAM,CAAC;EAC7B;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOR,cAAc,CAACQ,MAA+B,EAAU;IAC7D,OAAOR,cAAc,CAACQ,MAAM,CAAC;EAC/B;EA8CAC,WAAW,CACTD,MAAc,EACdE,SAAwD,EACxD;IACA,KAAK,EAAE;IAAC,uCAhDM,KAAK;IAAA,qCACC,KAAK;IAAA;IAAA,qCASvB;MAAE,oBAAoB,EAAEP;IAAsB,CAAC;IAAA;IAAA,o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C,IAAyB,EACzB;IACAA,IAAI,CAACtJ,YAAY,CAACkD,OAAO,CAACtD,IAAI,IAAI;MAChC,IAAInD,OAAO,CAACmD,IAAI,CAAC,EAAE;QACjBiM,eAAe,CAACxL,IAAI,CAACT,IAAI,CAAC;MAC5B,CAAC,MAAM,IAAI,CAACA,IAAI,CAACmM,WAAW,EAAE;QAC5B,IAAI,CAACD,gCAAgC,CAACD,eAAe,EAAEjM,IAAI,CAAC;MAC9D;IACF,CAAC,CAAC;EACJ;AACF;AAAC,gBArrCoBtC,aAAa,UAIlBtB,EAAE"}
|
|
@@ -86,7 +86,7 @@ class EventEmitter {
|
|
|
86
86
|
*/
|
|
87
87
|
unbind(eventName, callback, context) {
|
|
88
88
|
if (!this._mSubscriptions[eventName]) {
|
|
89
|
-
throw new Error('No
|
|
89
|
+
throw new Error('No subscriptions to unsubscribe for event ' + eventName);
|
|
90
90
|
}
|
|
91
91
|
var bUnbound = false;
|
|
92
92
|
for (var i = 0; i < this._mSubscriptions[eventName].length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEmitter.js","names":["EventEmitter","constructor","unbind","emit","_mSubscriptions","ALL_EVENT","on","eventName","callback","context","Error","push","fn","ctx","subs","args","i","length","apply","unshift","allEventSubs","bUnbound","splice"],"sources":["../../src/utils/EventEmitter.ts"],"sourcesContent":["/**\n * A generic and very fast EventEmitter\n * implementation. On top of emitting the\n * actual event it emits an\n *\n * EventEmitter.ALL_EVENT\n *\n * event for every event triggered. This allows\n * to hook into it and proxy events forwards\n *\n * @constructor\n */\nclass EventEmitter {\n /**\n * The name of the event that's triggered for every other event\n *\n * usage\n *\n * myEmitter.on( EventEmitter.ALL_EVENT, function( eventName, argsArray ){\n * \t//do stuff\n * });\n */\n static ALL_EVENT = '__all';\n\n private _mSubscriptions: Record<string, { fn: Function; ctx?: unknown }[]>;\n\n constructor() {\n this._mSubscriptions = {};\n this._mSubscriptions[EventEmitter.ALL_EVENT] = [];\n }\n\n /**\n * Listen for events\n *\n * @param eventName The name of the event to listen to\n * @param callback The callback to execute when the event occurs\n * @param context The value of the this pointer within the callback function\n */\n on(eventName: string, callback: Function, context?: unknown): void {\n if (typeof callback !== 'function') {\n throw new Error(\n 'Tried to listen to event ' +\n eventName +\n ' with non-function callback ' +\n callback\n );\n }\n\n if (!this._mSubscriptions[eventName]) {\n this._mSubscriptions[eventName] = [];\n }\n\n this._mSubscriptions[eventName].push({ fn: callback, ctx: context });\n }\n\n /**\n * Emit an event and notify listeners\n *\n * @param eventName The name of the event\n * @param args additional arguments that will be passed to the listener\n */\n emit(eventName: string, ...args: unknown[]) {\n const subs = this._mSubscriptions[eventName];\n\n if (subs) {\n for (let i = 0; i < subs.length; i++) {\n const ctx = subs[i].ctx || {};\n subs[i].fn.apply(ctx, args);\n }\n }\n\n args.unshift(eventName);\n\n const allEventSubs = this._mSubscriptions[EventEmitter.ALL_EVENT];\n\n for (let i = 0; i < allEventSubs.length; i++) {\n const ctx = allEventSubs[i].ctx || {};\n allEventSubs[i].fn.apply(ctx, args);\n }\n }\n\n /**\n * Removes a listener for an event, or all listeners if no callback and context is provided.\n *\n * @param eventName The name of the event\n * @param callback The previously registered callback method (optional)\n * @param context The previously registered context (optional)\n */\n unbind(eventName: string, callback?: Function, context?: unknown) {\n if (!this._mSubscriptions[eventName]) {\n throw new Error('No
|
|
1
|
+
{"version":3,"file":"EventEmitter.js","names":["EventEmitter","constructor","unbind","emit","_mSubscriptions","ALL_EVENT","on","eventName","callback","context","Error","push","fn","ctx","subs","args","i","length","apply","unshift","allEventSubs","bUnbound","splice"],"sources":["../../src/utils/EventEmitter.ts"],"sourcesContent":["/**\n * A generic and very fast EventEmitter\n * implementation. On top of emitting the\n * actual event it emits an\n *\n * EventEmitter.ALL_EVENT\n *\n * event for every event triggered. This allows\n * to hook into it and proxy events forwards\n *\n * @constructor\n */\nclass EventEmitter {\n /**\n * The name of the event that's triggered for every other event\n *\n * usage\n *\n * myEmitter.on( EventEmitter.ALL_EVENT, function( eventName, argsArray ){\n * \t//do stuff\n * });\n */\n static ALL_EVENT = '__all';\n\n private _mSubscriptions: Record<string, { fn: Function; ctx?: unknown }[]>;\n\n constructor() {\n this._mSubscriptions = {};\n this._mSubscriptions[EventEmitter.ALL_EVENT] = [];\n }\n\n /**\n * Listen for events\n *\n * @param eventName The name of the event to listen to\n * @param callback The callback to execute when the event occurs\n * @param context The value of the this pointer within the callback function\n */\n on(eventName: string, callback: Function, context?: unknown): void {\n if (typeof callback !== 'function') {\n throw new Error(\n 'Tried to listen to event ' +\n eventName +\n ' with non-function callback ' +\n callback\n );\n }\n\n if (!this._mSubscriptions[eventName]) {\n this._mSubscriptions[eventName] = [];\n }\n\n this._mSubscriptions[eventName].push({ fn: callback, ctx: context });\n }\n\n /**\n * Emit an event and notify listeners\n *\n * @param eventName The name of the event\n * @param args additional arguments that will be passed to the listener\n */\n emit(eventName: string, ...args: unknown[]) {\n const subs = this._mSubscriptions[eventName];\n\n if (subs) {\n for (let i = 0; i < subs.length; i++) {\n const ctx = subs[i].ctx || {};\n subs[i].fn.apply(ctx, args);\n }\n }\n\n args.unshift(eventName);\n\n const allEventSubs = this._mSubscriptions[EventEmitter.ALL_EVENT];\n\n for (let i = 0; i < allEventSubs.length; i++) {\n const ctx = allEventSubs[i].ctx || {};\n allEventSubs[i].fn.apply(ctx, args);\n }\n }\n\n /**\n * Removes a listener for an event, or all listeners if no callback and context is provided.\n *\n * @param eventName The name of the event\n * @param callback The previously registered callback method (optional)\n * @param context The previously registered context (optional)\n */\n unbind(eventName: string, callback?: Function, context?: unknown) {\n if (!this._mSubscriptions[eventName]) {\n throw new Error('No subscriptions to unsubscribe for event ' + eventName);\n }\n\n let bUnbound = false;\n\n for (let i = 0; i < this._mSubscriptions[eventName].length; i++) {\n if (\n (!callback || this._mSubscriptions[eventName][i].fn === callback) &&\n (!context || context === this._mSubscriptions[eventName][i].ctx)\n ) {\n this._mSubscriptions[eventName].splice(i, 1);\n bUnbound = true;\n }\n }\n\n if (bUnbound === false) {\n throw new Error('Nothing to unbind for ' + eventName);\n }\n }\n\n /**\n * Alias for unbind\n */\n off = this.unbind;\n\n /**\n * Alias for emit\n */\n trigger = this.emit;\n}\n\nexport default EventEmitter;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,YAAY,CAAC;EACjB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAKEC,WAAW,GAAG;IAAA;IAAA,6BAuFR,IAAI,CAACC,MAAM;IAAA,iCAKP,IAAI,CAACC,IAAI;IA3FjB,IAAI,CAACC,eAAe,GAAG,CAAC,CAAC;IACzB,IAAI,CAACA,eAAe,CAACJ,YAAY,CAACK,SAAS,CAAC,GAAG,EAAE;EACnD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,EAAE,CAACC,SAAiB,EAAEC,QAAkB,EAAEC,OAAiB,EAAQ;IACjE,IAAI,OAAOD,QAAQ,KAAK,UAAU,EAAE;MAClC,MAAM,IAAIE,KAAK,CACb,2BAA2B,GACzBH,SAAS,GACT,8BAA8B,GAC9BC,QAAQ,CACX;IACH;IAEA,IAAI,CAAC,IAAI,CAACJ,eAAe,CAACG,SAAS,CAAC,EAAE;MACpC,IAAI,CAACH,eAAe,CAACG,SAAS,CAAC,GAAG,EAAE;IACtC;IAEA,IAAI,CAACH,eAAe,CAACG,SAAS,CAAC,CAACI,IAAI,CAAC;MAAEC,EAAE,EAAEJ,QAAQ;MAAEK,GAAG,EAAEJ;IAAQ,CAAC,CAAC;EACtE;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEN,IAAI,CAACI,SAAiB,EAAsB;IAC1C,IAAMO,IAAI,GAAG,IAAI,CAACV,eAAe,CAACG,SAAS,CAAC;IAAC,kCADpBQ,IAAI;MAAJA,IAAI;IAAA;IAG7B,IAAID,IAAI,EAAE;MACR,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GA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C,CAACH,GAAG,CAAC,EAChE;QACA,IAAI,CAACT,eAAe,CAACG,SAAS,CAAC,CAACe,MAAM,CAACN,CAAC,EAAE,CAAC,CAAC;QAC5CK,QAAQ,GAAG,IAAI;MACjB;IACF;IAEA,IAAIA,QAAQ,KAAK,KAAK,EAAE;MACtB,MAAM,IAAIX,KAAK,CAAC,wBAAwB,GAAGH,SAAS,CAAC;IACvD;EACF;;EAEA;AACF;AACA;AAOA;AAAC,gBA3GKP,YAAY,eAUG,OAAO;AAmG5B,eAAeA,YAAY"}
|
|
@@ -11,15 +11,25 @@ import type { ReactComponentConfig } from '../config/ItemConfig';
|
|
|
11
11
|
export default class ReactComponentHandler {
|
|
12
12
|
private _container;
|
|
13
13
|
private _reactComponent;
|
|
14
|
+
private _portalComponent;
|
|
14
15
|
private _originalComponentWillUpdate;
|
|
15
16
|
private _initialState;
|
|
16
17
|
private _reactClass;
|
|
17
18
|
constructor(container: ItemContainer<ReactComponentConfig>, state?: unknown);
|
|
19
|
+
/**
|
|
20
|
+
* Gets the unique key to use for the react component
|
|
21
|
+
* @returns Unique key for the component
|
|
22
|
+
*/
|
|
23
|
+
_key(): string;
|
|
18
24
|
/**
|
|
19
25
|
* Creates the react class and component and hydrates it with
|
|
20
26
|
* the initial state - if one is present
|
|
21
27
|
*
|
|
22
28
|
* By default, react's getInitialState will be used
|
|
29
|
+
*
|
|
30
|
+
* Creates a portal so the non-react golden-layout code still works,
|
|
31
|
+
* but also allows us to mount the React components in the app's tree
|
|
32
|
+
* instead of separate sibling root trees
|
|
23
33
|
*/
|
|
24
34
|
_render(): void;
|
|
25
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactComponentHandler.d.ts","sourceRoot":"","sources":["../../src/utils/ReactComponentHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,oB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 -15,10 +15,12 @@ export default class ReactComponentHandler {
|
|
|
15
15
|
constructor(container, state) {
|
|
16
16
|
_defineProperty(this, "_container", void 0);
|
|
17
17
|
_defineProperty(this, "_reactComponent", null);
|
|
18
|
+
_defineProperty(this, "_portalComponent", null);
|
|
18
19
|
_defineProperty(this, "_originalComponentWillUpdate", null);
|
|
19
20
|
_defineProperty(this, "_initialState", void 0);
|
|
20
21
|
_defineProperty(this, "_reactClass", void 0);
|
|
21
22
|
this._reactComponent = null;
|
|
23
|
+
this._portalComponent = null;
|
|
22
24
|
this._originalComponentWillUpdate = null;
|
|
23
25
|
this._container = container;
|
|
24
26
|
this._initialState = state;
|
|
@@ -27,14 +29,38 @@ export default class ReactComponentHandler {
|
|
|
27
29
|
this._container.on('destroy', this._destroy, this);
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Gets the unique key to use for the react component
|
|
34
|
+
* @returns Unique key for the component
|
|
35
|
+
*/
|
|
36
|
+
_key() {
|
|
37
|
+
var id = this._container._config.id;
|
|
38
|
+
if (!id) {
|
|
39
|
+
throw new Error('Cannot mount panel without id');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// If addId is called multiple times, an element can have multiple IDs in golden-layout
|
|
43
|
+
// We don't use it, but changing the type requires many changes and a separate PR
|
|
44
|
+
if (Array.isArray(id)) {
|
|
45
|
+
return id.join(',');
|
|
46
|
+
}
|
|
47
|
+
return id;
|
|
48
|
+
}
|
|
49
|
+
|
|
30
50
|
/**
|
|
31
51
|
* Creates the react class and component and hydrates it with
|
|
32
52
|
* the initial state - if one is present
|
|
33
53
|
*
|
|
34
54
|
* By default, react's getInitialState will be used
|
|
55
|
+
*
|
|
56
|
+
* Creates a portal so the non-react golden-layout code still works,
|
|
57
|
+
* but also allows us to mount the React components in the app's tree
|
|
58
|
+
* instead of separate sibling root trees
|
|
35
59
|
*/
|
|
36
60
|
_render() {
|
|
37
|
-
|
|
61
|
+
var key = this._key();
|
|
62
|
+
this._portalComponent = /*#__PURE__*/ReactDOM.createPortal(this._getReactComponent(), this._container.getElement()[0], key);
|
|
63
|
+
this._container.layoutManager.addReactChild(key, this._portalComponent);
|
|
38
64
|
}
|
|
39
65
|
|
|
40
66
|
/**
|
|
@@ -63,7 +89,7 @@ export default class ReactComponentHandler {
|
|
|
63
89
|
* Removes the component from the DOM and thus invokes React's unmount lifecycle
|
|
64
90
|
*/
|
|
65
91
|
_destroy() {
|
|
66
|
-
|
|
92
|
+
this._container.layoutManager.removeReactChild(this._key(), this._portalComponent);
|
|
67
93
|
this._container.off('open', this._render, this);
|
|
68
94
|
this._container.off('destroy', this._destroy, this);
|
|
69
95
|
}
|