@genesis-community/golden-layout 2.6.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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/ts/config/config.js +870 -0
- package/dist/cjs/ts/config/config.js.map +1 -0
- package/dist/cjs/ts/config/resolved-config.js +477 -0
- package/dist/cjs/ts/config/resolved-config.js.map +1 -0
- package/dist/cjs/ts/container/component-container.js +412 -0
- package/dist/cjs/ts/container/component-container.js.map +1 -0
- package/dist/cjs/ts/controls/browser-popout.js +298 -0
- package/dist/cjs/ts/controls/browser-popout.js.map +1 -0
- package/dist/cjs/ts/controls/drag-proxy.js +221 -0
- package/dist/cjs/ts/controls/drag-proxy.js.map +1 -0
- package/dist/cjs/ts/controls/drag-source.js +149 -0
- package/dist/cjs/ts/controls/drag-source.js.map +1 -0
- package/dist/cjs/ts/controls/drop-target-indicator.js +31 -0
- package/dist/cjs/ts/controls/drop-target-indicator.js.map +1 -0
- package/dist/cjs/ts/controls/header-button.js +34 -0
- package/dist/cjs/ts/controls/header-button.js.map +1 -0
- package/dist/cjs/ts/controls/header.js +366 -0
- package/dist/cjs/ts/controls/header.js.map +1 -0
- package/dist/cjs/ts/controls/splitter.js +42 -0
- package/dist/cjs/ts/controls/splitter.js.map +1 -0
- package/dist/cjs/ts/controls/tab.js +262 -0
- package/dist/cjs/ts/controls/tab.js.map +1 -0
- package/dist/cjs/ts/controls/tabs-container.js +236 -0
- package/dist/cjs/ts/controls/tabs-container.js.map +1 -0
- package/dist/cjs/ts/controls/transition-indicator.js +64 -0
- package/dist/cjs/ts/controls/transition-indicator.js.map +1 -0
- package/dist/cjs/ts/errors/external-error.js +46 -0
- package/dist/cjs/ts/errors/external-error.js.map +1 -0
- package/dist/cjs/ts/errors/internal-error.js +38 -0
- package/dist/cjs/ts/errors/internal-error.js.map +1 -0
- package/dist/cjs/ts/golden-layout.js +299 -0
- package/dist/cjs/ts/golden-layout.js.map +1 -0
- package/dist/cjs/ts/items/component-item.js +190 -0
- package/dist/cjs/ts/items/component-item.js.map +1 -0
- package/dist/cjs/ts/items/component-parentable-item.js +18 -0
- package/dist/cjs/ts/items/component-parentable-item.js.map +1 -0
- package/dist/cjs/ts/items/content-item.js +414 -0
- package/dist/cjs/ts/items/content-item.js.map +1 -0
- package/dist/cjs/ts/items/ground-item.js +352 -0
- package/dist/cjs/ts/items/ground-item.js.map +1 -0
- package/dist/cjs/ts/items/row-or-column.js +609 -0
- package/dist/cjs/ts/items/row-or-column.js.map +1 -0
- package/dist/cjs/ts/items/stack.js +841 -0
- package/dist/cjs/ts/items/stack.js.map +1 -0
- package/dist/cjs/ts/layout-manager.js +1618 -0
- package/dist/cjs/ts/layout-manager.js.map +1 -0
- package/dist/cjs/ts/utils/config-minifier.js +218 -0
- package/dist/cjs/ts/utils/config-minifier.js.map +1 -0
- package/dist/cjs/ts/utils/dom-constants.js +3 -0
- package/dist/cjs/ts/utils/dom-constants.js.map +1 -0
- package/dist/cjs/ts/utils/drag-listener.js +132 -0
- package/dist/cjs/ts/utils/drag-listener.js.map +1 -0
- package/dist/cjs/ts/utils/event-emitter.js +201 -0
- package/dist/cjs/ts/utils/event-emitter.js.map +1 -0
- package/dist/cjs/ts/utils/event-hub.js +135 -0
- package/dist/cjs/ts/utils/event-hub.js.map +1 -0
- package/dist/cjs/ts/utils/i18n-strings.js +74 -0
- package/dist/cjs/ts/utils/i18n-strings.js.map +1 -0
- package/dist/cjs/ts/utils/jquery-legacy.js +15 -0
- package/dist/cjs/ts/utils/jquery-legacy.js.map +1 -0
- package/dist/cjs/ts/utils/style-constants.js +11 -0
- package/dist/cjs/ts/utils/style-constants.js.map +1 -0
- package/dist/cjs/ts/utils/types.js +94 -0
- package/dist/cjs/ts/utils/types.js.map +1 -0
- package/dist/cjs/ts/utils/utils.js +211 -0
- package/dist/cjs/ts/utils/utils.js.map +1 -0
- package/dist/cjs/ts/virtual-layout.js +247 -0
- package/dist/cjs/ts/virtual-layout.js.map +1 -0
- package/dist/css/goldenlayout-base.css +319 -0
- package/dist/css/themes/goldenlayout-borderless-dark-theme.css +136 -0
- package/dist/css/themes/goldenlayout-dark-theme.css +139 -0
- package/dist/css/themes/goldenlayout-light-theme.css +129 -0
- package/dist/css/themes/goldenlayout-soda-theme.css +126 -0
- package/dist/css/themes/goldenlayout-translucent-theme.css +152 -0
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/ts/config/config.js +864 -0
- package/dist/esm/ts/config/config.js.map +1 -0
- package/dist/esm/ts/config/resolved-config.js +474 -0
- package/dist/esm/ts/config/resolved-config.js.map +1 -0
- package/dist/esm/ts/container/component-container.js +408 -0
- package/dist/esm/ts/container/component-container.js.map +1 -0
- package/dist/esm/ts/controls/browser-popout.js +294 -0
- package/dist/esm/ts/controls/browser-popout.js.map +1 -0
- package/dist/esm/ts/controls/drag-proxy.js +217 -0
- package/dist/esm/ts/controls/drag-proxy.js.map +1 -0
- package/dist/esm/ts/controls/drag-source.js +145 -0
- package/dist/esm/ts/controls/drag-source.js.map +1 -0
- package/dist/esm/ts/controls/drop-target-indicator.js +27 -0
- package/dist/esm/ts/controls/drop-target-indicator.js.map +1 -0
- package/dist/esm/ts/controls/header-button.js +30 -0
- package/dist/esm/ts/controls/header-button.js.map +1 -0
- package/dist/esm/ts/controls/header.js +362 -0
- package/dist/esm/ts/controls/header.js.map +1 -0
- package/dist/esm/ts/controls/splitter.js +38 -0
- package/dist/esm/ts/controls/splitter.js.map +1 -0
- package/dist/esm/ts/controls/tab.js +258 -0
- package/dist/esm/ts/controls/tab.js.map +1 -0
- package/dist/esm/ts/controls/tabs-container.js +232 -0
- package/dist/esm/ts/controls/tabs-container.js.map +1 -0
- package/dist/esm/ts/controls/transition-indicator.js +60 -0
- package/dist/esm/ts/controls/transition-indicator.js.map +1 -0
- package/dist/esm/ts/errors/external-error.js +38 -0
- package/dist/esm/ts/errors/external-error.js.map +1 -0
- package/dist/esm/ts/errors/internal-error.js +31 -0
- package/dist/esm/ts/errors/internal-error.js.map +1 -0
- package/dist/esm/ts/golden-layout.js +295 -0
- package/dist/esm/ts/golden-layout.js.map +1 -0
- package/dist/esm/ts/items/component-item.js +186 -0
- package/dist/esm/ts/items/component-item.js.map +1 -0
- package/dist/esm/ts/items/component-parentable-item.js +14 -0
- package/dist/esm/ts/items/component-parentable-item.js.map +1 -0
- package/dist/esm/ts/items/content-item.js +410 -0
- package/dist/esm/ts/items/content-item.js.map +1 -0
- package/dist/esm/ts/items/ground-item.js +348 -0
- package/dist/esm/ts/items/ground-item.js.map +1 -0
- package/dist/esm/ts/items/row-or-column.js +605 -0
- package/dist/esm/ts/items/row-or-column.js.map +1 -0
- package/dist/esm/ts/items/stack.js +837 -0
- package/dist/esm/ts/items/stack.js.map +1 -0
- package/dist/esm/ts/layout-manager.js +1614 -0
- package/dist/esm/ts/layout-manager.js.map +1 -0
- package/dist/esm/ts/utils/config-minifier.js +215 -0
- package/dist/esm/ts/utils/config-minifier.js.map +1 -0
- package/dist/esm/ts/utils/dom-constants.js +2 -0
- package/dist/esm/ts/utils/dom-constants.js.map +1 -0
- package/dist/esm/ts/utils/drag-listener.js +128 -0
- package/dist/esm/ts/utils/drag-listener.js.map +1 -0
- package/dist/esm/ts/utils/event-emitter.js +197 -0
- package/dist/esm/ts/utils/event-emitter.js.map +1 -0
- package/dist/esm/ts/utils/event-hub.js +131 -0
- package/dist/esm/ts/utils/event-hub.js.map +1 -0
- package/dist/esm/ts/utils/i18n-strings.js +71 -0
- package/dist/esm/ts/utils/i18n-strings.js.map +1 -0
- package/dist/esm/ts/utils/jquery-legacy.js +11 -0
- package/dist/esm/ts/utils/jquery-legacy.js.map +1 -0
- package/dist/esm/ts/utils/style-constants.js +8 -0
- package/dist/esm/ts/utils/style-constants.js.map +1 -0
- package/dist/esm/ts/utils/types.js +91 -0
- package/dist/esm/ts/utils/types.js.map +1 -0
- package/dist/esm/ts/utils/utils.js +191 -0
- package/dist/esm/ts/utils/utils.js.map +1 -0
- package/dist/esm/ts/virtual-layout.js +243 -0
- package/dist/esm/ts/virtual-layout.js.map +1 -0
- package/dist/img/lm_close_black.png +0 -0
- package/dist/img/lm_close_tab_white.png +0 -0
- package/dist/img/lm_close_white.png +0 -0
- package/dist/img/lm_maximise_black.png +0 -0
- package/dist/img/lm_maximise_white.png +0 -0
- package/dist/img/lm_minimize_black.png +0 -0
- package/dist/img/lm_minimize_white.png +0 -0
- package/dist/img/lm_popin_black.png +0 -0
- package/dist/img/lm_popin_white.png +0 -0
- package/dist/img/lm_popout_black.png +0 -0
- package/dist/img/lm_popout_white.png +0 -0
- package/dist/less/goldenlayout-base.less +422 -0
- package/dist/less/themes/goldenlayout-borderless-dark-theme.less +230 -0
- package/dist/less/themes/goldenlayout-dark-theme.less +233 -0
- package/dist/less/themes/goldenlayout-light-theme.less +223 -0
- package/dist/less/themes/goldenlayout-soda-theme.less +211 -0
- package/dist/less/themes/goldenlayout-translucent-theme.less +237 -0
- package/dist/scss/goldenlayout-base.scss +422 -0
- package/dist/scss/themes/_goldenlayout-var-theme.scss +232 -0
- package/dist/types/golden-layout-untrimmed.d.ts +3428 -0
- package/dist/types/index.d.ts +2246 -0
- package/dist/types/tsdoc-metadata.json +11 -0
- package/package.json +107 -0
- package/src/TOOLCHAIN.md +54 -0
- package/src/img/lm_close_black.png +0 -0
- package/src/img/lm_close_tab_white.png +0 -0
- package/src/img/lm_close_white.png +0 -0
- package/src/img/lm_maximise_black.png +0 -0
- package/src/img/lm_maximise_white.png +0 -0
- package/src/img/lm_minimize_black.png +0 -0
- package/src/img/lm_minimize_white.png +0 -0
- package/src/img/lm_popin_black.png +0 -0
- package/src/img/lm_popin_white.png +0 -0
- package/src/img/lm_popout_black.png +0 -0
- package/src/img/lm_popout_white.png +0 -0
- package/src/index.ts +21 -0
- package/src/less/goldenlayout-base.less +422 -0
- package/src/less/themes/goldenlayout-borderless-dark-theme.less +230 -0
- package/src/less/themes/goldenlayout-dark-theme.less +233 -0
- package/src/less/themes/goldenlayout-light-theme.less +223 -0
- package/src/less/themes/goldenlayout-soda-theme.less +211 -0
- package/src/less/themes/goldenlayout-translucent-theme.less +237 -0
- package/src/scss/goldenlayout-base.scss +422 -0
- package/src/scss/themes/_goldenlayout-var-theme.scss +232 -0
- package/src/ts/config/config.ts +1283 -0
- package/src/ts/config/resolved-config.ts +621 -0
- package/src/ts/container/component-container.ts +500 -0
- package/src/ts/controls/browser-popout.ts +325 -0
- package/src/ts/controls/drag-proxy.ts +259 -0
- package/src/ts/controls/drag-source.ts +167 -0
- package/src/ts/controls/drop-target-indicator.ts +35 -0
- package/src/ts/controls/header-button.ts +39 -0
- package/src/ts/controls/header.ts +483 -0
- package/src/ts/controls/splitter.ts +50 -0
- package/src/ts/controls/tab.ts +293 -0
- package/src/ts/controls/tabs-container.ts +281 -0
- package/src/ts/controls/transition-indicator.ts +78 -0
- package/src/ts/errors/external-error.ts +39 -0
- package/src/ts/errors/internal-error.ts +34 -0
- package/src/ts/golden-layout.ts +365 -0
- package/src/ts/items/component-item.ts +252 -0
- package/src/ts/items/component-parentable-item.ts +16 -0
- package/src/ts/items/content-item.ts +513 -0
- package/src/ts/items/ground-item.ts +404 -0
- package/src/ts/items/row-or-column.ts +707 -0
- package/src/ts/items/stack.ts +975 -0
- package/src/ts/layout-manager.ts +1862 -0
- package/src/ts/utils/config-minifier.ts +235 -0
- package/src/ts/utils/dom-constants.ts +44 -0
- package/src/ts/utils/drag-listener.ts +178 -0
- package/src/ts/utils/event-emitter.ts +275 -0
- package/src/ts/utils/event-hub.ts +163 -0
- package/src/ts/utils/i18n-strings.ts +96 -0
- package/src/ts/utils/jquery-legacy.ts +12 -0
- package/src/ts/utils/style-constants.ts +6 -0
- package/src/ts/utils/types.ts +145 -0
- package/src/ts/utils/utils.ts +206 -0
- package/src/ts/virtual-layout.ts +328 -0
|
@@ -0,0 +1,2246 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
export declare class ApiError extends ExternalError {
|
|
3
|
+
/* Excluded from this release type: __constructor */
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Excluded from this release type: AreaLinkedRect */
|
|
7
|
+
|
|
8
|
+
/** @public */
|
|
9
|
+
export declare class BindError extends ExternalError {
|
|
10
|
+
/* Excluded from this release type: __constructor */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Pops a content item out into a new browser window.
|
|
15
|
+
* This is achieved by
|
|
16
|
+
*
|
|
17
|
+
* - Creating a new configuration with the content item as root element
|
|
18
|
+
* - Serializing and minifying the configuration
|
|
19
|
+
* - Opening the current window's URL with the configuration as a GET parameter
|
|
20
|
+
* - GoldenLayout when opened in the new window will look for the GET parameter
|
|
21
|
+
* and use it instead of the provided configuration
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare class BrowserPopout extends EventEmitter {
|
|
25
|
+
/* Excluded from this release type: _config */
|
|
26
|
+
/* Excluded from this release type: _initialWindowSize */
|
|
27
|
+
/* Excluded from this release type: _layoutManager */
|
|
28
|
+
/* Excluded from this release type: _popoutWindow */
|
|
29
|
+
/* Excluded from this release type: _isInitialised */
|
|
30
|
+
/* Excluded from this release type: _checkReadyInterval */
|
|
31
|
+
/* Excluded from this release type: __constructor */
|
|
32
|
+
toConfig(): ResolvedPopoutLayoutConfig;
|
|
33
|
+
getGlInstance(): LayoutManager;
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves the native BrowserWindow backing this popout.
|
|
36
|
+
* Might throw an UnexpectedNullError exception when the window is not initialized yet.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
getWindow(): Window;
|
|
40
|
+
close(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the popped out item to its original position. If the original
|
|
43
|
+
* parent isn't available anymore it falls back to the layout's topmost element
|
|
44
|
+
*/
|
|
45
|
+
popIn(): void;
|
|
46
|
+
/* Excluded from this release type: createWindow */
|
|
47
|
+
/* Excluded from this release type: checkReady */
|
|
48
|
+
/* Excluded from this release type: serializeWindowFeatures */
|
|
49
|
+
/* Excluded from this release type: createUrl */
|
|
50
|
+
/* Excluded from this release type: positionWindow */
|
|
51
|
+
/* Excluded from this release type: onInitialised */
|
|
52
|
+
/* Excluded from this release type: _onClose */
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @public */
|
|
56
|
+
export declare class ComponentContainer extends EventEmitter {
|
|
57
|
+
/* Excluded from this release type: _config */
|
|
58
|
+
/* Excluded from this release type: _parent */
|
|
59
|
+
/* Excluded from this release type: _layoutManager */
|
|
60
|
+
/* Excluded from this release type: _element */
|
|
61
|
+
/* Excluded from this release type: _updateItemConfigEvent */
|
|
62
|
+
/* Excluded from this release type: _showEvent */
|
|
63
|
+
/* Excluded from this release type: _hideEvent */
|
|
64
|
+
/* Excluded from this release type: _focusEvent */
|
|
65
|
+
/* Excluded from this release type: _blurEvent */
|
|
66
|
+
/* Excluded from this release type: _componentType */
|
|
67
|
+
/* Excluded from this release type: _boundComponent */
|
|
68
|
+
/* Excluded from this release type: _width */
|
|
69
|
+
/* Excluded from this release type: _height */
|
|
70
|
+
/* Excluded from this release type: _isClosable */
|
|
71
|
+
/* Excluded from this release type: _initialState */
|
|
72
|
+
/* Excluded from this release type: _state */
|
|
73
|
+
/* Excluded from this release type: _visible */
|
|
74
|
+
/* Excluded from this release type: _isShownWithZeroDimensions */
|
|
75
|
+
/* Excluded from this release type: _tab */
|
|
76
|
+
/* Excluded from this release type: _stackMaximised */
|
|
77
|
+
/* Excluded from this release type: _logicalZIndex */
|
|
78
|
+
stateRequestEvent: ComponentContainer.StateRequestEventHandler | undefined;
|
|
79
|
+
virtualRectingRequiredEvent: ComponentContainer.VirtualRectingRequiredEvent | undefined;
|
|
80
|
+
virtualVisibilityChangeRequiredEvent: ComponentContainer.VirtualVisibilityChangeRequiredEvent | undefined;
|
|
81
|
+
virtualZIndexChangeRequiredEvent: ComponentContainer.VirtualZIndexChangeRequiredEvent | undefined;
|
|
82
|
+
get width(): number;
|
|
83
|
+
get height(): number;
|
|
84
|
+
get parent(): ComponentItem;
|
|
85
|
+
/* Excluded from this release type: componentName */
|
|
86
|
+
get componentType(): JsonValue;
|
|
87
|
+
get virtual(): boolean;
|
|
88
|
+
get component(): ComponentContainer.Component;
|
|
89
|
+
get tab(): Tab;
|
|
90
|
+
get title(): string;
|
|
91
|
+
get layoutManager(): LayoutManager;
|
|
92
|
+
get isHidden(): boolean;
|
|
93
|
+
get visible(): boolean;
|
|
94
|
+
get state(): JsonValue | undefined;
|
|
95
|
+
/** Return the initial component state */
|
|
96
|
+
get initialState(): JsonValue | undefined;
|
|
97
|
+
/** The inner DOM element where the container's content is intended to live in */
|
|
98
|
+
get element(): HTMLElement;
|
|
99
|
+
/* Excluded from this release type: __constructor */
|
|
100
|
+
/* Excluded from this release type: destroy */
|
|
101
|
+
/** @deprecated use {@link (ComponentContainer:class).element } */
|
|
102
|
+
getElement(): HTMLElement;
|
|
103
|
+
/**
|
|
104
|
+
* Hides the container's component item (and hence, the container) if not already hidden.
|
|
105
|
+
* Emits hide event prior to hiding the container.
|
|
106
|
+
*/
|
|
107
|
+
hide(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Shows the container's component item (and hence, the container) if not visible.
|
|
110
|
+
* Emits show event prior to hiding the container.
|
|
111
|
+
*/
|
|
112
|
+
show(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Focus this component in Layout.
|
|
115
|
+
*/
|
|
116
|
+
focus(suppressEvent?: boolean): void;
|
|
117
|
+
/**
|
|
118
|
+
* Remove focus from this component in Layout.
|
|
119
|
+
*/
|
|
120
|
+
blur(suppressEvent?: boolean): void;
|
|
121
|
+
/* Excluded from this release type: setSize */
|
|
122
|
+
/**
|
|
123
|
+
* Closes the container if it is closable. Can be called by
|
|
124
|
+
* both the component within at as well as the contentItem containing
|
|
125
|
+
* it. Emits a close event before the container itself is closed.
|
|
126
|
+
*/
|
|
127
|
+
close(): void;
|
|
128
|
+
/** Replaces component without affecting layout */
|
|
129
|
+
replaceComponent(itemConfig: ComponentItemConfig): void;
|
|
130
|
+
/**
|
|
131
|
+
* Returns the initial component state or the latest passed in setState()
|
|
132
|
+
* @returns state
|
|
133
|
+
* @deprecated Use {@link (ComponentContainer:class).initialState}
|
|
134
|
+
*/
|
|
135
|
+
getState(): JsonValue | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* Merges the provided state into the current one
|
|
138
|
+
* @deprecated Use {@link (ComponentContainer:class).stateRequestEvent}
|
|
139
|
+
*/
|
|
140
|
+
extendState(state: Record<string, unknown>): void;
|
|
141
|
+
/**
|
|
142
|
+
* Sets the component state
|
|
143
|
+
* @deprecated Use {@link (ComponentContainer:class).stateRequestEvent}
|
|
144
|
+
*/
|
|
145
|
+
setState(state: JsonValue): void;
|
|
146
|
+
/**
|
|
147
|
+
* Set's the components title
|
|
148
|
+
*/
|
|
149
|
+
setTitle(title: string): void;
|
|
150
|
+
/* Excluded from this release type: setTab */
|
|
151
|
+
/* Excluded from this release type: setVisibility */
|
|
152
|
+
setBaseLogicalZIndex(): void;
|
|
153
|
+
setLogicalZIndex(logicalZIndex: LogicalZIndex): void;
|
|
154
|
+
/* Excluded from this release type: enterDragMode */
|
|
155
|
+
/* Excluded from this release type: exitDragMode */
|
|
156
|
+
/* Excluded from this release type: enterStackMaximised */
|
|
157
|
+
/* Excluded from this release type: exitStackMaximised */
|
|
158
|
+
/* Excluded from this release type: drag */
|
|
159
|
+
/* Excluded from this release type: setSizeToNodeSize */
|
|
160
|
+
/* Excluded from this release type: notifyVirtualRectingRequired */
|
|
161
|
+
/* Excluded from this release type: notifyVirtualZIndexChangeRequired */
|
|
162
|
+
/* Excluded from this release type: updateElementPositionPropertyFromBoundComponent */
|
|
163
|
+
/* Excluded from this release type: addVirtualSizedContainerToLayoutManager */
|
|
164
|
+
/* Excluded from this release type: checkShownFromZeroDimensions */
|
|
165
|
+
/* Excluded from this release type: emitShow */
|
|
166
|
+
/* Excluded from this release type: emitHide */
|
|
167
|
+
/* Excluded from this release type: releaseComponent */
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @public */
|
|
171
|
+
export declare namespace ComponentContainer {
|
|
172
|
+
export type Component = unknown;
|
|
173
|
+
export interface BindableComponent {
|
|
174
|
+
component: Component;
|
|
175
|
+
virtual: boolean;
|
|
176
|
+
}
|
|
177
|
+
export type StateRequestEventHandler = (this: void) => JsonValue | undefined;
|
|
178
|
+
export type VirtualRectingRequiredEvent = (this: void, container: ComponentContainer, width: number, height: number) => void;
|
|
179
|
+
export type VirtualVisibilityChangeRequiredEvent = (this: void, container: ComponentContainer, visible: boolean) => void;
|
|
180
|
+
export type VirtualZIndexChangeRequiredEvent = (this: void, container: ComponentContainer, logicalZIndex: LogicalZIndex, defaultZIndex: string) => void;
|
|
181
|
+
/* Excluded from this release type: ShowEventHandler */
|
|
182
|
+
/* Excluded from this release type: HideEventHandler */
|
|
183
|
+
/* Excluded from this release type: FocusEventHandler */
|
|
184
|
+
/* Excluded from this release type: BlurEventHandler */
|
|
185
|
+
/* Excluded from this release type: UpdateItemConfigEventHandler */
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** @public */
|
|
189
|
+
export declare class ComponentItem extends ContentItem {
|
|
190
|
+
/* Excluded from this release type: _parentItem */
|
|
191
|
+
/* Excluded from this release type: _reorderEnabled */
|
|
192
|
+
/* Excluded from this release type: _headerConfig */
|
|
193
|
+
/* Excluded from this release type: _title */
|
|
194
|
+
/* Excluded from this release type: _initialWantMaximise */
|
|
195
|
+
/* Excluded from this release type: _container */
|
|
196
|
+
/* Excluded from this release type: _tab */
|
|
197
|
+
/* Excluded from this release type: _focused */
|
|
198
|
+
/* Excluded from this release type: componentName */
|
|
199
|
+
get componentType(): JsonValue;
|
|
200
|
+
get reorderEnabled(): boolean;
|
|
201
|
+
/* Excluded from this release type: initialWantMaximise */
|
|
202
|
+
get component(): ComponentContainer.Component | undefined;
|
|
203
|
+
get container(): ComponentContainer;
|
|
204
|
+
get parentItem(): ComponentParentableItem;
|
|
205
|
+
get headerConfig(): ResolvedHeaderedItemConfig.Header | undefined;
|
|
206
|
+
get title(): string;
|
|
207
|
+
get tab(): Tab;
|
|
208
|
+
get focused(): boolean;
|
|
209
|
+
/* Excluded from this release type: __constructor */
|
|
210
|
+
/* Excluded from this release type: destroy */
|
|
211
|
+
applyUpdatableConfig(config: ResolvedComponentItemConfig): void;
|
|
212
|
+
toConfig(): ResolvedComponentItemConfig;
|
|
213
|
+
close(): void;
|
|
214
|
+
/* Excluded from this release type: enterDragMode */
|
|
215
|
+
/* Excluded from this release type: exitDragMode */
|
|
216
|
+
/* Excluded from this release type: enterStackMaximised */
|
|
217
|
+
/* Excluded from this release type: exitStackMaximised */
|
|
218
|
+
/* Excluded from this release type: drag */
|
|
219
|
+
/* Excluded from this release type: updateSize */
|
|
220
|
+
/* Excluded from this release type: init */
|
|
221
|
+
/**
|
|
222
|
+
* Set this component's title
|
|
223
|
+
*
|
|
224
|
+
* @public
|
|
225
|
+
* @param title -
|
|
226
|
+
*/
|
|
227
|
+
setTitle(title: string): void;
|
|
228
|
+
setTab(tab: Tab): void;
|
|
229
|
+
/* Excluded from this release type: hide */
|
|
230
|
+
/* Excluded from this release type: show */
|
|
231
|
+
/**
|
|
232
|
+
* Focuses the item if it is not already focused
|
|
233
|
+
*/
|
|
234
|
+
focus(suppressEvent?: boolean): void;
|
|
235
|
+
/* Excluded from this release type: setFocused */
|
|
236
|
+
/**
|
|
237
|
+
* Blurs (defocuses) the item if it is focused
|
|
238
|
+
*/
|
|
239
|
+
blur(suppressEvent?: boolean): void;
|
|
240
|
+
/* Excluded from this release type: setBlurred */
|
|
241
|
+
/* Excluded from this release type: setParent */
|
|
242
|
+
/* Excluded from this release type: handleUpdateItemConfigEvent */
|
|
243
|
+
/* Excluded from this release type: updateNodeSize */
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** @public */
|
|
247
|
+
export declare namespace ComponentItem {
|
|
248
|
+
export type Component = ComponentContainer.Component;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** @public */
|
|
252
|
+
export declare interface ComponentItemConfig extends HeaderedItemConfig {
|
|
253
|
+
type: 'component';
|
|
254
|
+
readonly content?: [];
|
|
255
|
+
/**
|
|
256
|
+
* The title of the item as displayed on its tab and on popout windows
|
|
257
|
+
* Default: componentType.toString() or ''
|
|
258
|
+
*/
|
|
259
|
+
title?: string;
|
|
260
|
+
/**
|
|
261
|
+
* The type of the component.
|
|
262
|
+
* @deprecated use {@link (ComponentItemConfig:interface).componentType} instead
|
|
263
|
+
*/
|
|
264
|
+
componentName?: string;
|
|
265
|
+
/**
|
|
266
|
+
* The type of the component.
|
|
267
|
+
* `componentType` must be of type `string` if it is registered with any of the following functions:
|
|
268
|
+
* * {@link (GoldenLayout:class).registerComponent} (deprecated)
|
|
269
|
+
* * {@link (GoldenLayout:class).registerComponentConstructor}
|
|
270
|
+
* * {@link (GoldenLayout:class).registerComponentFactoryFunction}
|
|
271
|
+
*/
|
|
272
|
+
componentType: JsonValue;
|
|
273
|
+
/**
|
|
274
|
+
* The state information with which a component will be initialised with.
|
|
275
|
+
* Will be passed to the component constructor function and will be the value returned by
|
|
276
|
+
* container.initialState.
|
|
277
|
+
*/
|
|
278
|
+
componentState?: JsonValue;
|
|
279
|
+
/**
|
|
280
|
+
* Default: true
|
|
281
|
+
*/
|
|
282
|
+
reorderEnabled?: boolean;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** @public */
|
|
286
|
+
export declare namespace ComponentItemConfig {
|
|
287
|
+
/* Excluded from this release type: resolve */
|
|
288
|
+
/* Excluded from this release type: fromResolved */
|
|
289
|
+
export function componentTypeToTitle(componentType: JsonValue): string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
declare abstract class ComponentParentableItem extends ContentItem {
|
|
293
|
+
/* Excluded from this release type: _focused */
|
|
294
|
+
get focused(): boolean;
|
|
295
|
+
/* Excluded from this release type: setFocusedValue */
|
|
296
|
+
abstract setActiveComponentItem(item: ComponentItem, focus: boolean, suppressFocusEvent: boolean): void;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** @public @deprecated - use {@link (LayoutConfig:interface)} */
|
|
300
|
+
export declare type Config = LayoutConfig;
|
|
301
|
+
|
|
302
|
+
/** @public */
|
|
303
|
+
export declare class ConfigurationError extends ExternalError {
|
|
304
|
+
readonly node?: string | undefined;
|
|
305
|
+
/* Excluded from this release type: __constructor */
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* This is the baseclass that all content items inherit from.
|
|
310
|
+
* Most methods provide a subset of what the sub-classes do.
|
|
311
|
+
*
|
|
312
|
+
* It also provides a number of functions for tree traversal
|
|
313
|
+
* @public
|
|
314
|
+
*/
|
|
315
|
+
export declare abstract class ContentItem extends EventEmitter {
|
|
316
|
+
readonly layoutManager: LayoutManager;
|
|
317
|
+
/* Excluded from this release type: _parent */
|
|
318
|
+
/* Excluded from this release type: _element */
|
|
319
|
+
/* Excluded from this release type: _type */
|
|
320
|
+
/* Excluded from this release type: _id */
|
|
321
|
+
/* Excluded from this release type: _popInParentIds */
|
|
322
|
+
/* Excluded from this release type: _contentItems */
|
|
323
|
+
/* Excluded from this release type: _isClosable */
|
|
324
|
+
/* Excluded from this release type: _pendingEventPropagations */
|
|
325
|
+
/* Excluded from this release type: _throttledEvents */
|
|
326
|
+
/* Excluded from this release type: _isInitialised */
|
|
327
|
+
/* Excluded from this release type: size */
|
|
328
|
+
/* Excluded from this release type: sizeUnit */
|
|
329
|
+
/* Excluded from this release type: minSize */
|
|
330
|
+
/* Excluded from this release type: minSizeUnit */
|
|
331
|
+
isGround: boolean;
|
|
332
|
+
isRow: boolean;
|
|
333
|
+
isColumn: boolean;
|
|
334
|
+
isStack: boolean;
|
|
335
|
+
isComponent: boolean;
|
|
336
|
+
get type(): ItemType;
|
|
337
|
+
get id(): string;
|
|
338
|
+
set id(value: string);
|
|
339
|
+
/* Excluded from this release type: popInParentIds */
|
|
340
|
+
get parent(): ContentItem | null;
|
|
341
|
+
get contentItems(): ContentItem[];
|
|
342
|
+
get isClosable(): boolean;
|
|
343
|
+
get element(): HTMLElement;
|
|
344
|
+
get isInitialised(): boolean;
|
|
345
|
+
static isStack(item: ContentItem): item is Stack;
|
|
346
|
+
static isComponentItem(item: ContentItem): item is ComponentItem;
|
|
347
|
+
static isComponentParentableItem(item: ContentItem): item is ComponentParentableItem;
|
|
348
|
+
/* Excluded from this release type: __constructor */
|
|
349
|
+
/* Excluded from this release type: updateSize */
|
|
350
|
+
/**
|
|
351
|
+
* Removes a child node (and its children) from the tree
|
|
352
|
+
* @param contentItem - The child item to remove
|
|
353
|
+
* @param keepChild - Whether to destroy the removed item
|
|
354
|
+
*/
|
|
355
|
+
removeChild(contentItem: ContentItem, keepChild?: boolean): void;
|
|
356
|
+
/**
|
|
357
|
+
* Sets up the tree structure for the newly added child
|
|
358
|
+
* The responsibility for the actual DOM manipulations lies
|
|
359
|
+
* with the concrete item
|
|
360
|
+
*
|
|
361
|
+
* @param contentItem -
|
|
362
|
+
* @param index - If omitted item will be appended
|
|
363
|
+
* @param suspendResize - Used by descendent implementations
|
|
364
|
+
*/
|
|
365
|
+
addChild(contentItem: ContentItem, index?: number | null, suspendResize?: boolean): number;
|
|
366
|
+
/* Excluded from this release type: replaceChild */
|
|
367
|
+
/**
|
|
368
|
+
* Convenience method.
|
|
369
|
+
* Shorthand for this.parent.removeChild( this )
|
|
370
|
+
*/
|
|
371
|
+
remove(): void;
|
|
372
|
+
/**
|
|
373
|
+
* Removes the component from the layout and creates a new
|
|
374
|
+
* browser window with the component and its children inside
|
|
375
|
+
*/
|
|
376
|
+
popout(): BrowserPopout;
|
|
377
|
+
abstract toConfig(): ResolvedItemConfig;
|
|
378
|
+
/* Excluded from this release type: calculateConfigContent */
|
|
379
|
+
/* Excluded from this release type: highlightDropZone */
|
|
380
|
+
/* Excluded from this release type: onDrop */
|
|
381
|
+
/* Excluded from this release type: show */
|
|
382
|
+
/* Excluded from this release type: destroy */
|
|
383
|
+
/* Excluded from this release type: getElementArea */
|
|
384
|
+
/* Excluded from this release type: init */
|
|
385
|
+
/* Excluded from this release type: setParent */
|
|
386
|
+
/* Excluded from this release type: addPopInParentId */
|
|
387
|
+
/* Excluded from this release type: initContentItems */
|
|
388
|
+
/* Excluded from this release type: hide */
|
|
389
|
+
/* Excluded from this release type: updateContentItemsSize */
|
|
390
|
+
/* Excluded from this release type: createContentItems */
|
|
391
|
+
/* Excluded from this release type: propagateEvent */
|
|
392
|
+
tryBubbleEvent(name: string, args: unknown[]): void;
|
|
393
|
+
/* Excluded from this release type: scheduleEventPropagationToLayoutManager */
|
|
394
|
+
/* Excluded from this release type: propagateEventToLayoutManager */
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/** @public */
|
|
398
|
+
export declare namespace ContentItem {
|
|
399
|
+
/* Excluded from this release type: Area */
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Excluded from this release type: DragListener */
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Allows for any DOM item to create a component on drag
|
|
406
|
+
* start to be dragged into the Layout
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export declare class DragSource {
|
|
410
|
+
/* Excluded from this release type: _layoutManager */
|
|
411
|
+
/* Excluded from this release type: _element */
|
|
412
|
+
/* Excluded from this release type: _extraAllowableChildTargets */
|
|
413
|
+
/* Excluded from this release type: _componentTypeOrFtn */
|
|
414
|
+
/* Excluded from this release type: _componentState */
|
|
415
|
+
/* Excluded from this release type: _title */
|
|
416
|
+
/* Excluded from this release type: _id */
|
|
417
|
+
/* Excluded from this release type: _dragListener */
|
|
418
|
+
/* Excluded from this release type: _dummyGroundContainer */
|
|
419
|
+
/* Excluded from this release type: _dummyGroundContentItem */
|
|
420
|
+
/* Excluded from this release type: __constructor */
|
|
421
|
+
/* Excluded from this release type: destroy */
|
|
422
|
+
/* Excluded from this release type: createDragListener */
|
|
423
|
+
/* Excluded from this release type: onDragStart */
|
|
424
|
+
/* Excluded from this release type: onDragStop */
|
|
425
|
+
/* Excluded from this release type: removeDragListener */
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** @public */
|
|
429
|
+
export declare namespace DragSource {
|
|
430
|
+
/** @deprecated use Config {@link (ComponentItemConfig:interface)} */
|
|
431
|
+
export interface ComponentItemConfig {
|
|
432
|
+
type: JsonValue;
|
|
433
|
+
state?: JsonValue;
|
|
434
|
+
title?: string;
|
|
435
|
+
}
|
|
436
|
+
/** @deprecated remove in version 3 */
|
|
437
|
+
export function isDragSourceComponentItemConfig(config: DragSource.ComponentItemConfig | ComponentItemConfig): config is DragSource.ComponentItemConfig;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Excluded from this release type: DropTargetIndicator */
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* A generic and very fast EventEmitter implementation. On top of emitting the actual event it emits an
|
|
444
|
+
* {@link (EventEmitter:namespace).ALL_EVENT} event for every event triggered. This allows to hook into it and proxy events forwards
|
|
445
|
+
* @public
|
|
446
|
+
*/
|
|
447
|
+
export declare class EventEmitter {
|
|
448
|
+
/* Excluded from this release type: _allEventSubscriptions */
|
|
449
|
+
/* Excluded from this release type: _subscriptionsMap */
|
|
450
|
+
tryBubbleEvent(name: string, args: unknown[]): void;
|
|
451
|
+
/**
|
|
452
|
+
* Emit an event and notify listeners
|
|
453
|
+
*
|
|
454
|
+
* @param eventName - The name of the event
|
|
455
|
+
* @param args - Additional arguments that will be passed to the listener
|
|
456
|
+
*/
|
|
457
|
+
emit<K extends keyof EventEmitter.EventParamsMap>(eventName: K, ...args: EventEmitter.EventParamsMap[K]): void;
|
|
458
|
+
/* Excluded from this release type: emitUnknown */
|
|
459
|
+
emitBaseBubblingEvent<K extends keyof EventEmitter.EventParamsMap>(eventName: K): void;
|
|
460
|
+
/* Excluded from this release type: emitUnknownBubblingEvent */
|
|
461
|
+
/**
|
|
462
|
+
* Removes a listener for an event.
|
|
463
|
+
* @param eventName - The name of the event
|
|
464
|
+
* @param callback - The previously registered callback method (optional)
|
|
465
|
+
*/
|
|
466
|
+
removeEventListener<K extends keyof EventEmitter.EventParamsMap>(eventName: K, callback: EventEmitter.Callback<K>): void;
|
|
467
|
+
off<K extends keyof EventEmitter.EventParamsMap>(eventName: K, callback: EventEmitter.Callback<K>): void;
|
|
468
|
+
/**
|
|
469
|
+
* Alias for off
|
|
470
|
+
*/
|
|
471
|
+
unbind: <K extends keyof EventEmitter.EventParamsMap>(eventName: K, callback: EventEmitter.Callback<K>) => void;
|
|
472
|
+
/**
|
|
473
|
+
* Alias for emit
|
|
474
|
+
*/
|
|
475
|
+
trigger: <K extends keyof EventEmitter.EventParamsMap>(eventName: K, ...args: EventEmitter.EventParamsMap[K]) => void;
|
|
476
|
+
/**
|
|
477
|
+
* Listen for events
|
|
478
|
+
*
|
|
479
|
+
* @param eventName - The name of the event to listen to
|
|
480
|
+
* @param callback - The callback to execute when the event occurs
|
|
481
|
+
*/
|
|
482
|
+
addEventListener<K extends keyof EventEmitter.EventParamsMap>(eventName: K, callback: EventEmitter.Callback<K>): void;
|
|
483
|
+
on<K extends keyof EventEmitter.EventParamsMap>(eventName: K, callback: EventEmitter.Callback<K>): void;
|
|
484
|
+
/* Excluded from this release type: addUnknownEventListener */
|
|
485
|
+
/* Excluded from this release type: removeUnknownEventListener */
|
|
486
|
+
/* Excluded from this release type: removeSubscription */
|
|
487
|
+
/* Excluded from this release type: emitAllEvent */
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/** @public */
|
|
491
|
+
export declare namespace EventEmitter {
|
|
492
|
+
/**
|
|
493
|
+
* The name of the event that's triggered for every event
|
|
494
|
+
*/
|
|
495
|
+
const ALL_EVENT = "__all";
|
|
496
|
+
const headerClickEventName = "stackHeaderClick";
|
|
497
|
+
const headerTouchStartEventName = "stackHeaderTouchStart";
|
|
498
|
+
/* Excluded from this release type: UnknownCallback */
|
|
499
|
+
export type Callback<K extends keyof EventEmitter.EventParamsMap> = (this: void, ...args: EventParamsMap[K]) => void;
|
|
500
|
+
export interface EventParamsMap {
|
|
501
|
+
"__all": UnknownParams;
|
|
502
|
+
"activeContentItemChanged": ComponentItemParam;
|
|
503
|
+
"close": NoParams;
|
|
504
|
+
"closed": NoParams;
|
|
505
|
+
"destroy": NoParams;
|
|
506
|
+
"drag": DragParams;
|
|
507
|
+
"dragStart": DragStartParams;
|
|
508
|
+
"dragStop": DragStopParams;
|
|
509
|
+
"hide": NoParams;
|
|
510
|
+
"initialised": NoParams;
|
|
511
|
+
"itemDropped": ComponentItemParam;
|
|
512
|
+
"maximised": NoParams;
|
|
513
|
+
"minimised": NoParams;
|
|
514
|
+
"open": NoParams;
|
|
515
|
+
"popIn": NoParams;
|
|
516
|
+
"resize": NoParams;
|
|
517
|
+
"show": NoParams;
|
|
518
|
+
/** @deprecated - use show instead */
|
|
519
|
+
"shown": NoParams;
|
|
520
|
+
"stateChanged": NoParams;
|
|
521
|
+
"tab": TabParam;
|
|
522
|
+
"tabCreated": TabParam;
|
|
523
|
+
"titleChanged": StringParam;
|
|
524
|
+
"windowClosed": PopoutParam;
|
|
525
|
+
"windowOpened": PopoutParam;
|
|
526
|
+
"beforeComponentRelease": BeforeComponentReleaseParams;
|
|
527
|
+
"beforeItemDestroyed": BubblingEventParam;
|
|
528
|
+
"itemCreated": BubblingEventParam;
|
|
529
|
+
"itemDestroyed": BubblingEventParam;
|
|
530
|
+
"focus": BubblingEventParam;
|
|
531
|
+
"blur": BubblingEventParam;
|
|
532
|
+
"stackHeaderClick": ClickBubblingEventParam;
|
|
533
|
+
"stackHeaderTouchStart": TouchStartBubblingEventParam;
|
|
534
|
+
"userBroadcast": UnknownParams;
|
|
535
|
+
}
|
|
536
|
+
export type UnknownParams = unknown[];
|
|
537
|
+
export type NoParams = [];
|
|
538
|
+
export type UnknownParam = [unknown];
|
|
539
|
+
export type PopoutParam = [BrowserPopout];
|
|
540
|
+
export type ComponentItemParam = [ComponentItem];
|
|
541
|
+
export type TabParam = [Tab];
|
|
542
|
+
export type BubblingEventParam = [EventEmitter.BubblingEvent];
|
|
543
|
+
export type StringParam = [string];
|
|
544
|
+
export type DragStartParams = [originalX: number, originalY: number];
|
|
545
|
+
export type DragStopParams = [event: PointerEvent | undefined];
|
|
546
|
+
export type DragParams = [offsetX: number, offsetY: number, event: PointerEvent];
|
|
547
|
+
export type BeforeComponentReleaseParams = [component: unknown];
|
|
548
|
+
export type ClickBubblingEventParam = [ClickBubblingEvent];
|
|
549
|
+
export type TouchStartBubblingEventParam = [TouchStartBubblingEvent];
|
|
550
|
+
export class BubblingEvent {
|
|
551
|
+
/* Excluded from this release type: _name */
|
|
552
|
+
/* Excluded from this release type: _target */
|
|
553
|
+
/* Excluded from this release type: _isPropagationStopped */
|
|
554
|
+
get name(): string;
|
|
555
|
+
get target(): EventEmitter;
|
|
556
|
+
/** @deprecated Use {@link (EventEmitter:namespace).(BubblingEvent:class).target} instead */
|
|
557
|
+
get origin(): EventEmitter;
|
|
558
|
+
get isPropagationStopped(): boolean;
|
|
559
|
+
/* Excluded from this release type: __constructor */
|
|
560
|
+
stopPropagation(): void;
|
|
561
|
+
}
|
|
562
|
+
export class ClickBubblingEvent extends BubblingEvent {
|
|
563
|
+
/* Excluded from this release type: _mouseEvent */
|
|
564
|
+
get mouseEvent(): MouseEvent;
|
|
565
|
+
/* Excluded from this release type: __constructor */
|
|
566
|
+
}
|
|
567
|
+
export class TouchStartBubblingEvent extends BubblingEvent {
|
|
568
|
+
/* Excluded from this release type: _touchEvent */
|
|
569
|
+
get touchEvent(): TouchEvent;
|
|
570
|
+
/* Excluded from this release type: __constructor */
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* An EventEmitter singleton that propagates events
|
|
576
|
+
* across multiple windows. This is a little bit trickier since
|
|
577
|
+
* windows are allowed to open childWindows in their own right.
|
|
578
|
+
*
|
|
579
|
+
* This means that we deal with a tree of windows. Therefore, we do the event propagation in two phases:
|
|
580
|
+
*
|
|
581
|
+
* - Propagate events from this layout to the parent layout
|
|
582
|
+
* - Repeat until the event arrived at the root layout
|
|
583
|
+
* - Propagate events to this layout and to all children
|
|
584
|
+
* - Repeat until all layouts got the event
|
|
585
|
+
*
|
|
586
|
+
* **WARNING**: Only userBroadcast events are propagated between windows.
|
|
587
|
+
* This means the you have to take care of propagating state changes between windows yourself.
|
|
588
|
+
*
|
|
589
|
+
* @public
|
|
590
|
+
*/
|
|
591
|
+
export declare class EventHub extends EventEmitter {
|
|
592
|
+
/* Excluded from this release type: _layoutManager */
|
|
593
|
+
/* Excluded from this release type: _childEventListener */
|
|
594
|
+
/* Excluded from this release type: __constructor */
|
|
595
|
+
/**
|
|
596
|
+
* Emit an event and notify listeners
|
|
597
|
+
*
|
|
598
|
+
* @param eventName - The name of the event
|
|
599
|
+
* @param args - Additional arguments that will be passed to the listener
|
|
600
|
+
* @public
|
|
601
|
+
*/
|
|
602
|
+
emit<K extends keyof EventEmitter.EventParamsMap>(eventName: K, ...args: EventEmitter.EventParamsMap[K]): void;
|
|
603
|
+
/**
|
|
604
|
+
* Broadcasts a message to all other currently opened windows.
|
|
605
|
+
* @public
|
|
606
|
+
*/
|
|
607
|
+
emitUserBroadcast(...args: EventEmitter.UnknownParams): void;
|
|
608
|
+
/* Excluded from this release type: destroy */
|
|
609
|
+
/* Excluded from this release type: handleUserBroadcastEvent */
|
|
610
|
+
/* Excluded from this release type: onEventFromChild */
|
|
611
|
+
/* Excluded from this release type: propagateToParent */
|
|
612
|
+
/* Excluded from this release type: propagateToThisAndSubtree */
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/** @public */
|
|
616
|
+
export declare namespace EventHub {
|
|
617
|
+
/* Excluded from this release type: ChildEventName */
|
|
618
|
+
/* Excluded from this release type: ChildEventDetail */
|
|
619
|
+
/* Excluded from this release type: ChildEventInit */
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** @public */
|
|
623
|
+
export declare abstract class ExternalError extends Error {
|
|
624
|
+
readonly type: string;
|
|
625
|
+
/* Excluded from this release type: __constructor */
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* Excluded from this release type: formatSize */
|
|
629
|
+
|
|
630
|
+
/* Excluded from this release type: formatUndefinableSize */
|
|
631
|
+
|
|
632
|
+
/** @public */
|
|
633
|
+
export declare class GoldenLayout extends VirtualLayout {
|
|
634
|
+
/* Excluded from this release type: _componentTypesMap */
|
|
635
|
+
/* Excluded from this release type: _getComponentConstructorFtn */
|
|
636
|
+
/* Excluded from this release type: _registeredComponentMap */
|
|
637
|
+
/* Excluded from this release type: _virtuableComponentMap */
|
|
638
|
+
/* Excluded from this release type: _goldenLayoutBoundingClientRect */
|
|
639
|
+
/* Excluded from this release type: _containerVirtualRectingRequiredEventListener */
|
|
640
|
+
/* Excluded from this release type: _containerVirtualVisibilityChangeRequiredEventListener */
|
|
641
|
+
/* Excluded from this release type: _containerVirtualZIndexChangeRequiredEventListener */
|
|
642
|
+
/**
|
|
643
|
+
* @param container - A Dom HTML element. Defaults to body
|
|
644
|
+
* @param bindComponentEventHandler - Event handler to bind components
|
|
645
|
+
* @param bindComponentEventHandler - Event handler to unbind components
|
|
646
|
+
* If bindComponentEventHandler is defined, then constructor will be determinate. It will always call the init()
|
|
647
|
+
* function and the init() function will always complete. This means that the bindComponentEventHandler will be called
|
|
648
|
+
* if constructor is for a popout window. Make sure bindComponentEventHandler is ready for events.
|
|
649
|
+
*/
|
|
650
|
+
constructor(container?: HTMLElement, bindComponentEventHandler?: VirtualLayout.BindComponentEventHandler, unbindComponentEventHandler?: VirtualLayout.UnbindComponentEventHandler);
|
|
651
|
+
/** @deprecated specify layoutConfig in {@link (LayoutManager:class).loadLayout} */
|
|
652
|
+
constructor(config: LayoutConfig, container?: HTMLElement);
|
|
653
|
+
/**
|
|
654
|
+
* Register a new component type with the layout manager.
|
|
655
|
+
*
|
|
656
|
+
* @deprecated See {@link https://stackoverflow.com/questions/40922531/how-to-check-if-a-javascript-function-is-a-constructor}
|
|
657
|
+
* instead use {@link (GoldenLayout:class).registerComponentConstructor}
|
|
658
|
+
* or {@link (GoldenLayout:class).registerComponentFactoryFunction}
|
|
659
|
+
*/
|
|
660
|
+
registerComponent(name: string, componentConstructorOrFactoryFtn: GoldenLayout.ComponentConstructor | GoldenLayout.ComponentFactoryFunction, virtual?: boolean): void;
|
|
661
|
+
/**
|
|
662
|
+
* Register a new component type with the layout manager.
|
|
663
|
+
*/
|
|
664
|
+
registerComponentConstructor(typeName: string, componentConstructor: GoldenLayout.ComponentConstructor, virtual?: boolean): void;
|
|
665
|
+
/**
|
|
666
|
+
* Register a new component with the layout manager.
|
|
667
|
+
*/
|
|
668
|
+
registerComponentFactoryFunction(typeName: string, componentFactoryFunction: GoldenLayout.ComponentFactoryFunction, virtual?: boolean): void;
|
|
669
|
+
/**
|
|
670
|
+
* Register a component function with the layout manager. This function should
|
|
671
|
+
* return a constructor for a component based on a config.
|
|
672
|
+
* This function will be called if a component type with the required name is not already registered.
|
|
673
|
+
* It is recommended that applications use the {@link (VirtualLayout:class).getComponentEvent} and
|
|
674
|
+
* {@link (VirtualLayout:class).releaseComponentEvent} instead of registering a constructor callback
|
|
675
|
+
* @deprecated use {@link (GoldenLayout:class).registerGetComponentConstructorCallback}
|
|
676
|
+
*/
|
|
677
|
+
registerComponentFunction(callback: GoldenLayout.GetComponentConstructorCallback): void;
|
|
678
|
+
/**
|
|
679
|
+
* Register a callback closure with the layout manager which supplies a Component Constructor.
|
|
680
|
+
* This callback should return a constructor for a component based on a config.
|
|
681
|
+
* This function will be called if a component type with the required name is not already registered.
|
|
682
|
+
* It is recommended that applications use the {@link (VirtualLayout:class).getComponentEvent} and
|
|
683
|
+
* {@link (VirtualLayout:class).releaseComponentEvent} instead of registering a constructor callback
|
|
684
|
+
*/
|
|
685
|
+
registerGetComponentConstructorCallback(callback: GoldenLayout.GetComponentConstructorCallback): void;
|
|
686
|
+
getRegisteredComponentTypeNames(): string[];
|
|
687
|
+
/**
|
|
688
|
+
* Returns a previously registered component instantiator. Attempts to utilize registered
|
|
689
|
+
* component type by first, then falls back to the component constructor callback function (if registered).
|
|
690
|
+
* If neither gets an instantiator, then returns `undefined`.
|
|
691
|
+
* Note that `undefined` will return if config.componentType is not a string
|
|
692
|
+
*
|
|
693
|
+
* @param config - The item config
|
|
694
|
+
* @public
|
|
695
|
+
*/
|
|
696
|
+
getComponentInstantiator(config: ResolvedComponentItemConfig): GoldenLayout.ComponentInstantiator | undefined;
|
|
697
|
+
/* Excluded from this release type: bindComponent */
|
|
698
|
+
/* Excluded from this release type: unbindComponent */
|
|
699
|
+
fireBeforeVirtualRectingEvent(count: number): void;
|
|
700
|
+
/* Excluded from this release type: handleContainerVirtualRectingRequiredEvent */
|
|
701
|
+
/* Excluded from this release type: handleContainerVirtualVisibilityChangeRequiredEvent */
|
|
702
|
+
/* Excluded from this release type: handleContainerVirtualZIndexChangeRequiredEvent */
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/** @public */
|
|
706
|
+
export declare namespace GoldenLayout {
|
|
707
|
+
export interface VirtuableComponent {
|
|
708
|
+
rootHtmlElement: HTMLElement;
|
|
709
|
+
}
|
|
710
|
+
export type ComponentConstructor = new (container: ComponentContainer, state: JsonValue | undefined, virtual: boolean) => ComponentContainer.Component;
|
|
711
|
+
export type ComponentFactoryFunction = (container: ComponentContainer, state: JsonValue | undefined, virtual: boolean) => ComponentContainer.Component | undefined;
|
|
712
|
+
export type GetComponentConstructorCallback = (this: void, config: ResolvedComponentItemConfig) => ComponentConstructor;
|
|
713
|
+
export interface ComponentInstantiator {
|
|
714
|
+
constructor: ComponentConstructor | undefined;
|
|
715
|
+
factoryFunction: ComponentFactoryFunction | undefined;
|
|
716
|
+
virtual: boolean;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/* Excluded from this release type: GroundItem */
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* This class represents a header above a Stack ContentItem.
|
|
724
|
+
* @public
|
|
725
|
+
*/
|
|
726
|
+
export declare class Header extends EventEmitter {
|
|
727
|
+
/* Excluded from this release type: _layoutManager */
|
|
728
|
+
/* Excluded from this release type: _parent */
|
|
729
|
+
/* Excluded from this release type: _configClosable */
|
|
730
|
+
/* Excluded from this release type: _getActiveComponentItemEvent */
|
|
731
|
+
/* Excluded from this release type: _popoutEvent */
|
|
732
|
+
/* Excluded from this release type: _maximiseToggleEvent */
|
|
733
|
+
/* Excluded from this release type: _clickEvent */
|
|
734
|
+
/* Excluded from this release type: _touchStartEvent */
|
|
735
|
+
/* Excluded from this release type: _componentRemoveEvent */
|
|
736
|
+
/* Excluded from this release type: _componentFocusEvent */
|
|
737
|
+
/* Excluded from this release type: _componentDragStartEvent */
|
|
738
|
+
/* Excluded from this release type: _tabsContainer */
|
|
739
|
+
/* Excluded from this release type: _element */
|
|
740
|
+
/* Excluded from this release type: _controlsContainerElement */
|
|
741
|
+
/* Excluded from this release type: _show */
|
|
742
|
+
/* Excluded from this release type: _popoutEnabled */
|
|
743
|
+
/* Excluded from this release type: _popoutLabel */
|
|
744
|
+
/* Excluded from this release type: _maximiseEnabled */
|
|
745
|
+
/* Excluded from this release type: _maximiseLabel */
|
|
746
|
+
/* Excluded from this release type: _minimiseEnabled */
|
|
747
|
+
/* Excluded from this release type: _minimiseLabel */
|
|
748
|
+
/* Excluded from this release type: _closeEnabled */
|
|
749
|
+
/* Excluded from this release type: _closeLabel */
|
|
750
|
+
/* Excluded from this release type: _tabDropdownEnabled */
|
|
751
|
+
/* Excluded from this release type: _tabDropdownLabel */
|
|
752
|
+
/* Excluded from this release type: _tabControlOffset */
|
|
753
|
+
/* Excluded from this release type: _clickListener */
|
|
754
|
+
/* Excluded from this release type: _touchStartListener */
|
|
755
|
+
/* Excluded from this release type: _documentMouseUpListener */
|
|
756
|
+
/* Excluded from this release type: _rowColumnClosable */
|
|
757
|
+
/* Excluded from this release type: _canRemoveComponent */
|
|
758
|
+
/* Excluded from this release type: _side */
|
|
759
|
+
/* Excluded from this release type: _leftRightSided */
|
|
760
|
+
/* Excluded from this release type: _closeButton */
|
|
761
|
+
/* Excluded from this release type: _popoutButton */
|
|
762
|
+
/* Excluded from this release type: _tabDropdownButton */
|
|
763
|
+
/* Excluded from this release type: _maximiseButton */
|
|
764
|
+
get show(): boolean;
|
|
765
|
+
get side(): Side;
|
|
766
|
+
get leftRightSided(): boolean;
|
|
767
|
+
get layoutManager(): LayoutManager;
|
|
768
|
+
get parent(): Stack;
|
|
769
|
+
get tabs(): Tab[];
|
|
770
|
+
get lastVisibleTabIndex(): number;
|
|
771
|
+
get element(): HTMLElement;
|
|
772
|
+
get tabsContainerElement(): HTMLElement;
|
|
773
|
+
get controlsContainerElement(): HTMLElement;
|
|
774
|
+
/* Excluded from this release type: __constructor */
|
|
775
|
+
/* Excluded from this release type: destroy */
|
|
776
|
+
/* Excluded from this release type: createTab */
|
|
777
|
+
/* Excluded from this release type: removeTab */
|
|
778
|
+
/* Excluded from this release type: processActiveComponentChanged */
|
|
779
|
+
/* Excluded from this release type: setSide */
|
|
780
|
+
/* Excluded from this release type: setRowColumnClosable */
|
|
781
|
+
/* Excluded from this release type: updateClosability */
|
|
782
|
+
/* Excluded from this release type: applyFocusedValue */
|
|
783
|
+
/* Excluded from this release type: processMaximised */
|
|
784
|
+
/* Excluded from this release type: processMinimised */
|
|
785
|
+
/* Excluded from this release type: updateTabSizes */
|
|
786
|
+
/* Excluded from this release type: handleTabInitiatedComponentRemoveEvent */
|
|
787
|
+
/* Excluded from this release type: handleTabInitiatedComponentFocusEvent */
|
|
788
|
+
/* Excluded from this release type: handleTabInitiatedDragStartEvent */
|
|
789
|
+
/* Excluded from this release type: processTabDropdownActiveChanged */
|
|
790
|
+
/* Excluded from this release type: handleButtonPopoutEvent */
|
|
791
|
+
/* Excluded from this release type: handleButtonMaximiseToggleEvent */
|
|
792
|
+
/* Excluded from this release type: onClick */
|
|
793
|
+
/* Excluded from this release type: onTouchStart */
|
|
794
|
+
/* Excluded from this release type: notifyClick */
|
|
795
|
+
/* Excluded from this release type: notifyTouchStart */
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/** @public */
|
|
799
|
+
export declare namespace Header {
|
|
800
|
+
/* Excluded from this release type: GetActiveComponentItemEvent */
|
|
801
|
+
/* Excluded from this release type: CloseEvent */
|
|
802
|
+
/* Excluded from this release type: PopoutEvent */
|
|
803
|
+
/* Excluded from this release type: MaximiseToggleEvent */
|
|
804
|
+
/* Excluded from this release type: ClickEvent */
|
|
805
|
+
/* Excluded from this release type: TouchStartEvent */
|
|
806
|
+
/* Excluded from this release type: ComponentRemoveEvent */
|
|
807
|
+
/* Excluded from this release type: ComponentFocusEvent */
|
|
808
|
+
/* Excluded from this release type: ComponentDragStartEvent */
|
|
809
|
+
/* Excluded from this release type: StateChangedEvent */
|
|
810
|
+
/* Excluded from this release type: Settings */
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/** @public */
|
|
814
|
+
export declare interface HeaderedItemConfig extends ItemConfig {
|
|
815
|
+
/** @deprecated use {@link (HeaderedItemConfig:namespace).(Header:interface).show} instead */
|
|
816
|
+
hasHeaders?: boolean;
|
|
817
|
+
header?: HeaderedItemConfig.Header;
|
|
818
|
+
maximised?: boolean;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/** @public */
|
|
822
|
+
export declare namespace HeaderedItemConfig {
|
|
823
|
+
export interface Header {
|
|
824
|
+
show?: false | Side;
|
|
825
|
+
popout?: false | string;
|
|
826
|
+
dock?: false | string;
|
|
827
|
+
maximise?: false | string;
|
|
828
|
+
close?: string;
|
|
829
|
+
minimise?: string;
|
|
830
|
+
tabDropdown?: false | string;
|
|
831
|
+
}
|
|
832
|
+
export namespace Header {
|
|
833
|
+
export function resolve(header: Header | undefined, hasHeaders: boolean | undefined): ResolvedHeaderedItemConfig.Header | undefined;
|
|
834
|
+
}
|
|
835
|
+
/* Excluded from this release type: resolveIdAndMaximised */
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/** @public */
|
|
839
|
+
export declare const enum I18nStringId {
|
|
840
|
+
PopoutCannotBeCreatedWithGroundItemConfig = 0,
|
|
841
|
+
PleaseRegisterAConstructorFunction = 1,
|
|
842
|
+
ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned = 2,
|
|
843
|
+
ComponentIsAlreadyRegistered = 3,
|
|
844
|
+
ComponentIsNotVirtuable = 4,
|
|
845
|
+
VirtualComponentDoesNotHaveRootHtmlElement = 5,
|
|
846
|
+
ItemConfigIsNotTypeComponent = 6,
|
|
847
|
+
InvalidNumberPartInSizeString = 7,
|
|
848
|
+
UnknownUnitInSizeString = 8,
|
|
849
|
+
UnsupportedUnitInSizeString = 9
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/** @public */
|
|
853
|
+
export declare namespace I18nStrings {
|
|
854
|
+
const idCount: number;
|
|
855
|
+
export function checkInitialise(): void;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/** @public */
|
|
859
|
+
export declare const i18nStrings: string[];
|
|
860
|
+
|
|
861
|
+
/** @public */
|
|
862
|
+
export declare interface ItemConfig {
|
|
863
|
+
/**
|
|
864
|
+
* The type of the item. Possible values are 'row', 'column', 'stack', 'component'.
|
|
865
|
+
*/
|
|
866
|
+
type: ItemType;
|
|
867
|
+
/**
|
|
868
|
+
* An array of configurations for items that will be created as children of this item.
|
|
869
|
+
*/
|
|
870
|
+
content?: ItemConfig[];
|
|
871
|
+
/**
|
|
872
|
+
* The width of this item, relative to the other children of its parent in percent
|
|
873
|
+
* @deprecated use {@link (ItemConfig:interface).size} instead
|
|
874
|
+
*/
|
|
875
|
+
width?: number;
|
|
876
|
+
/**
|
|
877
|
+
* The minimum width of this item in pixels
|
|
878
|
+
* CAUTION - Not tested - do not use
|
|
879
|
+
* @deprecated use {@link (ItemConfig:interface).minSize} instead
|
|
880
|
+
*/
|
|
881
|
+
minWidth?: number;
|
|
882
|
+
/**
|
|
883
|
+
* The height of this item, relative to the other children of its parent in percent
|
|
884
|
+
* @deprecated use {@link (ItemConfig:interface).size} instead
|
|
885
|
+
*/
|
|
886
|
+
height?: number;
|
|
887
|
+
/**
|
|
888
|
+
* The minimum height of this item in pixels
|
|
889
|
+
* CAUTION - Not tested - do not use
|
|
890
|
+
* @deprecated use {@link (ItemConfig:interface).minSize} instead
|
|
891
|
+
*/
|
|
892
|
+
minHeight?: number;
|
|
893
|
+
/**
|
|
894
|
+
* The size of this item.
|
|
895
|
+
* For rows, it specifies height. For columns, it specifies width.
|
|
896
|
+
* Has format \<number\>\<{@link SizeUnit}\>. Currently only supports units `fr` and `%`.
|
|
897
|
+
*
|
|
898
|
+
* Space is first proportionally allocated to items with sizeUnit `%`.
|
|
899
|
+
* If there is any space left over (less than 100% allocated), then the
|
|
900
|
+
* remainder is allocated to the items with unit `fr` according to the fractional size.
|
|
901
|
+
* If more than 100% is allocated, then an extra 50% is allocated to items with unit `fr` and
|
|
902
|
+
* is allocated to each item according to its fractional size. All item sizes are then adjusted
|
|
903
|
+
* to bring the total back to 100%
|
|
904
|
+
*/
|
|
905
|
+
size?: string;
|
|
906
|
+
/**
|
|
907
|
+
* The size of this item.
|
|
908
|
+
* For rows, it specifies height. For columns, it specifies width.
|
|
909
|
+
* Has format <number><sizeUnit>. Currently only supports units `px`
|
|
910
|
+
*/
|
|
911
|
+
minSize?: string;
|
|
912
|
+
/**
|
|
913
|
+
* A string that can be used to identify a ContentItem.
|
|
914
|
+
* Do NOT assign an array. This only exists for legacy purposes. If an array is assigned, the first element
|
|
915
|
+
* will become the id.
|
|
916
|
+
*/
|
|
917
|
+
id?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
|
|
920
|
+
* will return false
|
|
921
|
+
* Default: true
|
|
922
|
+
*/
|
|
923
|
+
isClosable?: boolean;
|
|
924
|
+
/**
|
|
925
|
+
* The title of the item as displayed on its tab and on popout windows
|
|
926
|
+
* Default: componentType.toString() or ''
|
|
927
|
+
* @deprecated only Component has a title
|
|
928
|
+
*/
|
|
929
|
+
title?: string;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/** @public */
|
|
933
|
+
export declare namespace ItemConfig {
|
|
934
|
+
/* Excluded from this release type: SizeWidthHeightSpecificationType */
|
|
935
|
+
/* Excluded from this release type: resolve */
|
|
936
|
+
/* Excluded from this release type: resolveContent */
|
|
937
|
+
/* Excluded from this release type: resolveId */
|
|
938
|
+
/* Excluded from this release type: resolveSize */
|
|
939
|
+
/* Excluded from this release type: resolveMinSize */
|
|
940
|
+
/* Excluded from this release type: calculateSizeWidthHeightSpecificationType */
|
|
941
|
+
export function isGround(config: ItemConfig): config is ItemConfig;
|
|
942
|
+
export function isRow(config: ItemConfig): config is ItemConfig;
|
|
943
|
+
export function isColumn(config: ItemConfig): config is ItemConfig;
|
|
944
|
+
export function isStack(config: ItemConfig): config is ItemConfig;
|
|
945
|
+
export function isComponent(config: ItemConfig): config is ComponentItemConfig;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/** @public */
|
|
949
|
+
export declare type ItemType = 'ground' | 'row' | 'column' | 'stack' | 'component';
|
|
950
|
+
|
|
951
|
+
/** @public */
|
|
952
|
+
export declare namespace ItemType {
|
|
953
|
+
const ground = "ground";
|
|
954
|
+
const row = "row";
|
|
955
|
+
const column = "column";
|
|
956
|
+
const stack = "stack";
|
|
957
|
+
const component = "component";
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
/** @public */
|
|
961
|
+
export declare interface Json {
|
|
962
|
+
[name: string]: JsonValue;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/** @public */
|
|
966
|
+
export declare type JsonValue = string | number | boolean | null | Json | object | JsonValueArray;
|
|
967
|
+
|
|
968
|
+
/** @public */
|
|
969
|
+
export declare namespace JsonValue {
|
|
970
|
+
export function isJson(value: JsonValue): value is Json;
|
|
971
|
+
export function isJsonObject(value: JsonValue): value is Json | object;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/** @public */
|
|
975
|
+
export declare type JsonValueArray = Array<JsonValue>;
|
|
976
|
+
|
|
977
|
+
/** @public */
|
|
978
|
+
export declare interface LayoutConfig {
|
|
979
|
+
root: RootItemConfig | undefined;
|
|
980
|
+
/** @deprecated Use {@link (LayoutConfig:interface).root} */
|
|
981
|
+
content?: (RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig)[];
|
|
982
|
+
openPopouts?: PopoutLayoutConfig[];
|
|
983
|
+
dimensions?: LayoutConfig.Dimensions;
|
|
984
|
+
settings?: LayoutConfig.Settings;
|
|
985
|
+
/** @deprecated use {@link (LayoutConfig:interface).header} instead */
|
|
986
|
+
labels?: LayoutConfig.Labels;
|
|
987
|
+
header?: LayoutConfig.Header;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/** Use to specify LayoutConfig with defaults or deserialise a LayoutConfig.
|
|
991
|
+
* Deserialisation will handle backwards compatibility.
|
|
992
|
+
* Note that LayoutConfig should be used for serialisation (not LayoutConfig)
|
|
993
|
+
* @public
|
|
994
|
+
*/
|
|
995
|
+
export declare namespace LayoutConfig {
|
|
996
|
+
export interface Settings {
|
|
997
|
+
/**
|
|
998
|
+
* @deprecated use ${@link (LayoutConfig:namespace).(Header:interface).show} instead
|
|
999
|
+
*/
|
|
1000
|
+
hasHeaders?: boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* Constrains the area in which items can be dragged to the layout's container. Will be set to false
|
|
1003
|
+
* automatically when layout.createDragSource() is called.
|
|
1004
|
+
* Default: true
|
|
1005
|
+
*/
|
|
1006
|
+
constrainDragToContainer?: boolean;
|
|
1007
|
+
/**
|
|
1008
|
+
* If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
|
|
1009
|
+
* Can be overridden by ItemConfig.reorderEnabled for specific ItemConfigs
|
|
1010
|
+
* Default: true
|
|
1011
|
+
*/
|
|
1012
|
+
reorderEnabled?: boolean;
|
|
1013
|
+
/**
|
|
1014
|
+
* Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
|
|
1015
|
+
* be transferred to the new window, if false only the active component will be opened.
|
|
1016
|
+
* Default: false
|
|
1017
|
+
*/
|
|
1018
|
+
popoutWholeStack?: boolean;
|
|
1019
|
+
/**
|
|
1020
|
+
* Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
|
|
1021
|
+
* If false, the popout call will fail silently.
|
|
1022
|
+
* Default: true
|
|
1023
|
+
*/
|
|
1024
|
+
blockedPopoutsThrowError?: boolean;
|
|
1025
|
+
/**
|
|
1026
|
+
* Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
|
|
1027
|
+
* strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
|
|
1028
|
+
* addition, any changes made to popouts won't be stored after the parent is closed.
|
|
1029
|
+
* Default: true
|
|
1030
|
+
* @deprecated Will be removed in version 3.
|
|
1031
|
+
*/
|
|
1032
|
+
closePopoutsOnUnload?: boolean;
|
|
1033
|
+
/**
|
|
1034
|
+
* Specifies if the popout icon should be displayed in the header-bar.
|
|
1035
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).popout} instead
|
|
1036
|
+
*/
|
|
1037
|
+
showPopoutIcon?: boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
* Specifies if the maximise icon should be displayed in the header-bar.
|
|
1040
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).maximise} instead
|
|
1041
|
+
*/
|
|
1042
|
+
showMaximiseIcon?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Specifies if the close icon should be displayed in the header-bar.
|
|
1045
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).close} instead
|
|
1046
|
+
*/
|
|
1047
|
+
showCloseIcon?: boolean;
|
|
1048
|
+
/**
|
|
1049
|
+
* Specifies Responsive Mode (more info needed).
|
|
1050
|
+
* Default: none
|
|
1051
|
+
*/
|
|
1052
|
+
responsiveMode?: ResponsiveMode;
|
|
1053
|
+
/**
|
|
1054
|
+
* Specifies Maximum pixel overlap per tab.
|
|
1055
|
+
* Default: 0
|
|
1056
|
+
*/
|
|
1057
|
+
tabOverlapAllowance?: number;
|
|
1058
|
+
/**
|
|
1059
|
+
*
|
|
1060
|
+
* Default: true
|
|
1061
|
+
*/
|
|
1062
|
+
reorderOnTabMenuClick?: boolean;
|
|
1063
|
+
/**
|
|
1064
|
+
* Default: 10
|
|
1065
|
+
*/
|
|
1066
|
+
tabControlOffset?: number;
|
|
1067
|
+
/**
|
|
1068
|
+
* Specifies whether to pop in elements when closing a popout window.
|
|
1069
|
+
* Default: false
|
|
1070
|
+
*/
|
|
1071
|
+
popInOnClose?: boolean;
|
|
1072
|
+
}
|
|
1073
|
+
export namespace Settings {
|
|
1074
|
+
export function resolve(settings: Settings | undefined): ResolvedLayoutConfig.Settings;
|
|
1075
|
+
}
|
|
1076
|
+
export interface Dimensions {
|
|
1077
|
+
/**
|
|
1078
|
+
* The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
|
|
1079
|
+
* than the visible one, making it safe to set this to small values without affecting usability.
|
|
1080
|
+
* Default: 5
|
|
1081
|
+
*/
|
|
1082
|
+
borderWidth?: number;
|
|
1083
|
+
/**
|
|
1084
|
+
* Default: 15
|
|
1085
|
+
*/
|
|
1086
|
+
borderGrabWidth?: number;
|
|
1087
|
+
/**
|
|
1088
|
+
* The minimum height an item can be resized to (in pixel).
|
|
1089
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Dimensions:interface).defaultMinItemHeight} instead
|
|
1090
|
+
*/
|
|
1091
|
+
minItemHeight?: number;
|
|
1092
|
+
/**
|
|
1093
|
+
* The minimum height an item can be resized to.
|
|
1094
|
+
* Default: 0
|
|
1095
|
+
*/
|
|
1096
|
+
defaultMinItemHeight?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* The minimum width an item can be resized to (in pixel).
|
|
1099
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Dimensions:interface).defaultMinItemWidth} instead
|
|
1100
|
+
*/
|
|
1101
|
+
minItemWidth?: number;
|
|
1102
|
+
/**
|
|
1103
|
+
* The minimum width an item can be resized to.
|
|
1104
|
+
* Default: 10px
|
|
1105
|
+
*/
|
|
1106
|
+
defaultMinItemWidth?: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
|
|
1109
|
+
* adjusted accordingly.
|
|
1110
|
+
* Default: 20
|
|
1111
|
+
*/
|
|
1112
|
+
headerHeight?: number;
|
|
1113
|
+
/**
|
|
1114
|
+
* The width of the element that appears when an item is dragged (in pixel).
|
|
1115
|
+
* Default: 300
|
|
1116
|
+
*/
|
|
1117
|
+
dragProxyWidth?: number;
|
|
1118
|
+
/**
|
|
1119
|
+
* The height of the element that appears when an item is dragged (in pixel).
|
|
1120
|
+
* Default: 200
|
|
1121
|
+
*/
|
|
1122
|
+
dragProxyHeight?: number;
|
|
1123
|
+
}
|
|
1124
|
+
export namespace Dimensions {
|
|
1125
|
+
/* Excluded from this release type: resolve */
|
|
1126
|
+
/* Excluded from this release type: fromResolved */
|
|
1127
|
+
/* Excluded from this release type: resolveDefaultMinItemHeight */
|
|
1128
|
+
/* Excluded from this release type: resolveDefaultMinItemWidth */
|
|
1129
|
+
}
|
|
1130
|
+
export interface Labels {
|
|
1131
|
+
/**
|
|
1132
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).close} instead
|
|
1133
|
+
*/
|
|
1134
|
+
close?: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).maximise} instead
|
|
1137
|
+
*/
|
|
1138
|
+
maximise?: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).minimise} instead
|
|
1141
|
+
*/
|
|
1142
|
+
minimise?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).popin} instead
|
|
1145
|
+
*/
|
|
1146
|
+
popin?: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).popout} instead
|
|
1149
|
+
*/
|
|
1150
|
+
popout?: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* @deprecated use {@link (LayoutConfig:namespace).(Header:interface).tabDropdown} instead
|
|
1153
|
+
*/
|
|
1154
|
+
tabDropdown?: string;
|
|
1155
|
+
}
|
|
1156
|
+
export interface Header {
|
|
1157
|
+
/**
|
|
1158
|
+
* Specifies whether header should be displayed, and if so, on which side.
|
|
1159
|
+
* If false, the layout will be displayed with splitters only.
|
|
1160
|
+
* Default: 'top'
|
|
1161
|
+
*/
|
|
1162
|
+
show?: false | Side;
|
|
1163
|
+
/**
|
|
1164
|
+
* The tooltip text that appears when hovering over the popout icon or false if popout button not displayed.
|
|
1165
|
+
* Default: 'open in new window'
|
|
1166
|
+
*/
|
|
1167
|
+
popout?: false | string;
|
|
1168
|
+
/**
|
|
1169
|
+
* The tooltip text that appears when hovering over the popin icon.
|
|
1170
|
+
* Default: 'pop in'
|
|
1171
|
+
*/
|
|
1172
|
+
popin?: string;
|
|
1173
|
+
/**
|
|
1174
|
+
* The tooltip text that appears when hovering over the maximise icon or false if maximised button not displayed.
|
|
1175
|
+
* Default: 'maximise'
|
|
1176
|
+
*/
|
|
1177
|
+
maximise?: false | string;
|
|
1178
|
+
/**
|
|
1179
|
+
* The tooltip text that appears when hovering over the close icon.
|
|
1180
|
+
* Default: 'close'
|
|
1181
|
+
*/
|
|
1182
|
+
close?: false | string;
|
|
1183
|
+
/**
|
|
1184
|
+
* The tooltip text that appears when hovering over the minimise icon.
|
|
1185
|
+
* Default: 'minimise'
|
|
1186
|
+
*/
|
|
1187
|
+
minimise?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
*
|
|
1190
|
+
* Default: 'additional tabs'
|
|
1191
|
+
*/
|
|
1192
|
+
tabDropdown?: false | string;
|
|
1193
|
+
}
|
|
1194
|
+
export namespace Header {
|
|
1195
|
+
/* Excluded from this release type: resolve */
|
|
1196
|
+
}
|
|
1197
|
+
export function isPopout(config: LayoutConfig): config is PopoutLayoutConfig;
|
|
1198
|
+
/* Excluded from this release type: resolve */
|
|
1199
|
+
export function fromResolved(config: ResolvedLayoutConfig): LayoutConfig;
|
|
1200
|
+
export function isResolved(configOrResolvedConfig: ResolvedLayoutConfig | LayoutConfig): configOrResolvedConfig is ResolvedLayoutConfig;
|
|
1201
|
+
/* Excluded from this release type: resolveOpenPopouts */
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* The main class that will be exposed as GoldenLayout.
|
|
1206
|
+
*/
|
|
1207
|
+
/** @public */
|
|
1208
|
+
export declare abstract class LayoutManager extends EventEmitter {
|
|
1209
|
+
/** Whether the layout will be automatically be resized to container whenever the container's size is changed
|
|
1210
|
+
* Default is true if <body> is the container otherwise false
|
|
1211
|
+
* Default will be changed to true for any container in the future
|
|
1212
|
+
*/
|
|
1213
|
+
resizeWithContainerAutomatically: boolean;
|
|
1214
|
+
/** The debounce interval (in milliseconds) used whenever a layout is automatically resized. 0 means next tick */
|
|
1215
|
+
resizeDebounceInterval: number;
|
|
1216
|
+
/** Extend the current debounce delay time period if it is triggered during the delay.
|
|
1217
|
+
* If this is true, the layout will only resize when its container has stopped being resized.
|
|
1218
|
+
* If it is false, the layout will resize at intervals while its container is being resized.
|
|
1219
|
+
*/
|
|
1220
|
+
resizeDebounceExtendedWhenPossible: boolean;
|
|
1221
|
+
/* Excluded from this release type: _containerElement */
|
|
1222
|
+
/* Excluded from this release type: _isInitialised */
|
|
1223
|
+
/* Excluded from this release type: _groundItem */
|
|
1224
|
+
/* Excluded from this release type: _openPopouts */
|
|
1225
|
+
/* Excluded from this release type: _dropTargetIndicator */
|
|
1226
|
+
/* Excluded from this release type: _transitionIndicator */
|
|
1227
|
+
/* Excluded from this release type: _resizeTimeoutId */
|
|
1228
|
+
/* Excluded from this release type: _itemAreas */
|
|
1229
|
+
/* Excluded from this release type: _maximisedStack */
|
|
1230
|
+
/* Excluded from this release type: _maximisePlaceholder */
|
|
1231
|
+
/* Excluded from this release type: _tabDropPlaceholder */
|
|
1232
|
+
/* Excluded from this release type: _dragSources */
|
|
1233
|
+
/* Excluded from this release type: _updatingColumnsResponsive */
|
|
1234
|
+
/* Excluded from this release type: _firstLoad */
|
|
1235
|
+
/* Excluded from this release type: _eventHub */
|
|
1236
|
+
/* Excluded from this release type: _width */
|
|
1237
|
+
/* Excluded from this release type: _height */
|
|
1238
|
+
/* Excluded from this release type: _focusedComponentItem */
|
|
1239
|
+
/* Excluded from this release type: _virtualSizedContainers */
|
|
1240
|
+
/* Excluded from this release type: _virtualSizedContainerAddingBeginCount */
|
|
1241
|
+
/* Excluded from this release type: _sizeInvalidationBeginCount */
|
|
1242
|
+
/* Excluded from this release type: _constructorOrSubWindowLayoutConfig */
|
|
1243
|
+
/* Excluded from this release type: _resizeObserver */
|
|
1244
|
+
/* Excluded from this release type: _windowBeforeUnloadListener */
|
|
1245
|
+
/* Excluded from this release type: _windowBeforeUnloadListening */
|
|
1246
|
+
/* Excluded from this release type: _maximisedStackBeforeDestroyedListener */
|
|
1247
|
+
readonly isSubWindow: boolean;
|
|
1248
|
+
layoutConfig: ResolvedLayoutConfig;
|
|
1249
|
+
beforeVirtualRectingEvent: LayoutManager.BeforeVirtualRectingEvent | undefined;
|
|
1250
|
+
afterVirtualRectingEvent: LayoutManager.AfterVirtualRectingEvent | undefined;
|
|
1251
|
+
get container(): HTMLElement;
|
|
1252
|
+
get isInitialised(): boolean;
|
|
1253
|
+
/* Excluded from this release type: groundItem */
|
|
1254
|
+
/* Excluded from this release type: root */
|
|
1255
|
+
get openPopouts(): BrowserPopout[];
|
|
1256
|
+
/* Excluded from this release type: dropTargetIndicator */
|
|
1257
|
+
/* Excluded from this release type: transitionIndicator */
|
|
1258
|
+
get width(): number | null;
|
|
1259
|
+
get height(): number | null;
|
|
1260
|
+
/**
|
|
1261
|
+
* Retrieves the {@link (EventHub:class)} instance associated with this layout manager.
|
|
1262
|
+
* This can be used to propagate events between the windows
|
|
1263
|
+
* @public
|
|
1264
|
+
*/
|
|
1265
|
+
get eventHub(): EventHub;
|
|
1266
|
+
get rootItem(): ContentItem | undefined;
|
|
1267
|
+
get focusedComponentItem(): ComponentItem | undefined;
|
|
1268
|
+
/* Excluded from this release type: tabDropPlaceholder */
|
|
1269
|
+
get maximisedStack(): Stack | undefined;
|
|
1270
|
+
/** @deprecated indicates deprecated constructor use */
|
|
1271
|
+
get deprecatedConstructor(): boolean;
|
|
1272
|
+
/* Excluded from this release type: __constructor */
|
|
1273
|
+
/**
|
|
1274
|
+
* Destroys the LayoutManager instance itself as well as every ContentItem
|
|
1275
|
+
* within it. After this is called nothing should be left of the LayoutManager.
|
|
1276
|
+
*
|
|
1277
|
+
* This function only needs to be called if an application wishes to destroy the Golden Layout object while
|
|
1278
|
+
* a page remains loaded. When a page is unloaded, all resources claimed by Golden Layout will automatically
|
|
1279
|
+
* be released.
|
|
1280
|
+
*/
|
|
1281
|
+
destroy(): void;
|
|
1282
|
+
/**
|
|
1283
|
+
* Takes a GoldenLayout configuration object and
|
|
1284
|
+
* replaces its keys and values recursively with
|
|
1285
|
+
* one letter codes
|
|
1286
|
+
* @deprecated use {@link (ResolvedLayoutConfig:namespace).minifyConfig} instead
|
|
1287
|
+
*/
|
|
1288
|
+
minifyConfig(config: ResolvedLayoutConfig): ResolvedLayoutConfig;
|
|
1289
|
+
/**
|
|
1290
|
+
* Takes a configuration Object that was previously minified
|
|
1291
|
+
* using minifyConfig and returns its original version
|
|
1292
|
+
* @deprecated use {@link (ResolvedLayoutConfig:namespace).unminifyConfig} instead
|
|
1293
|
+
*/
|
|
1294
|
+
unminifyConfig(config: ResolvedLayoutConfig): ResolvedLayoutConfig;
|
|
1295
|
+
/* Excluded from this release type: bindComponent */
|
|
1296
|
+
/* Excluded from this release type: unbindComponent */
|
|
1297
|
+
/* Excluded from this release type: init */
|
|
1298
|
+
/**
|
|
1299
|
+
* Loads a new layout
|
|
1300
|
+
* @param layoutConfig - New layout to be loaded
|
|
1301
|
+
*/
|
|
1302
|
+
loadLayout(layoutConfig: LayoutConfig): void;
|
|
1303
|
+
/**
|
|
1304
|
+
* Creates a layout configuration object based on the the current state
|
|
1305
|
+
*
|
|
1306
|
+
* @public
|
|
1307
|
+
* @returns GoldenLayout configuration
|
|
1308
|
+
*/
|
|
1309
|
+
saveLayout(): ResolvedLayoutConfig;
|
|
1310
|
+
/**
|
|
1311
|
+
* Removes any existing layout. Effectively, an empty layout will be loaded.
|
|
1312
|
+
*/
|
|
1313
|
+
clear(): void;
|
|
1314
|
+
/**
|
|
1315
|
+
* @deprecated Use {@link (LayoutManager:class).saveLayout}
|
|
1316
|
+
*/
|
|
1317
|
+
toConfig(): ResolvedLayoutConfig;
|
|
1318
|
+
/**
|
|
1319
|
+
* Adds a new ComponentItem. Will use default location selectors to ensure a location is found and
|
|
1320
|
+
* component is successfully added
|
|
1321
|
+
* @param componentTypeName - Name of component type to be created.
|
|
1322
|
+
* @param state - Optional initial state to be assigned to component
|
|
1323
|
+
* @returns New ComponentItem created.
|
|
1324
|
+
*/
|
|
1325
|
+
newComponent(componentType: JsonValue, componentState?: JsonValue, title?: string): ComponentItem;
|
|
1326
|
+
/**
|
|
1327
|
+
* Adds a ComponentItem at the first valid selector location.
|
|
1328
|
+
* @param componentTypeName - Name of component type to be created.
|
|
1329
|
+
* @param state - Optional initial state to be assigned to component
|
|
1330
|
+
* @param locationSelectors - Array of location selectors used to find location in layout where component
|
|
1331
|
+
* will be added. First location in array which is valid will be used. If locationSelectors is undefined,
|
|
1332
|
+
* {@link (LayoutManager:namespace).defaultLocationSelectors} will be used
|
|
1333
|
+
* @returns New ComponentItem created or undefined if no valid location selector was in array.
|
|
1334
|
+
*/
|
|
1335
|
+
newComponentAtLocation(componentType: JsonValue, componentState?: JsonValue, title?: string, locationSelectors?: LayoutManager.LocationSelector[]): ComponentItem | undefined;
|
|
1336
|
+
/**
|
|
1337
|
+
* Adds a new ComponentItem. Will use default location selectors to ensure a location is found and
|
|
1338
|
+
* component is successfully added
|
|
1339
|
+
* @param componentType - Type of component to be created.
|
|
1340
|
+
* @param state - Optional initial state to be assigned to component
|
|
1341
|
+
* @returns Location of new ComponentItem created.
|
|
1342
|
+
*/
|
|
1343
|
+
addComponent(componentType: JsonValue, componentState?: JsonValue, title?: string): LayoutManager.Location;
|
|
1344
|
+
/**
|
|
1345
|
+
* Adds a ComponentItem at the first valid selector location.
|
|
1346
|
+
* @param componentType - Type of component to be created.
|
|
1347
|
+
* @param state - Optional initial state to be assigned to component
|
|
1348
|
+
* @param locationSelectors - Array of location selectors used to find determine location in layout where component
|
|
1349
|
+
* will be added. First location in array which is valid will be used. If undefined,
|
|
1350
|
+
* {@link (LayoutManager:namespace).defaultLocationSelectors} will be used.
|
|
1351
|
+
* @returns Location of new ComponentItem created or undefined if no valid location selector was in array.
|
|
1352
|
+
*/
|
|
1353
|
+
addComponentAtLocation(componentType: JsonValue, componentState?: JsonValue, title?: string, locationSelectors?: readonly LayoutManager.LocationSelector[]): LayoutManager.Location | undefined;
|
|
1354
|
+
/**
|
|
1355
|
+
* Adds a new ContentItem. Will use default location selectors to ensure a location is found and
|
|
1356
|
+
* component is successfully added
|
|
1357
|
+
* @param itemConfig - ResolvedItemConfig of child to be added.
|
|
1358
|
+
* @returns New ContentItem created.
|
|
1359
|
+
*/
|
|
1360
|
+
newItem(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig): ContentItem;
|
|
1361
|
+
/**
|
|
1362
|
+
* Adds a new child ContentItem under the root ContentItem. If a root does not exist, then create root ContentItem instead
|
|
1363
|
+
* @param itemConfig - ResolvedItemConfig of child to be added.
|
|
1364
|
+
* @param locationSelectors - Array of location selectors used to find determine location in layout where ContentItem
|
|
1365
|
+
* will be added. First location in array which is valid will be used. If undefined,
|
|
1366
|
+
* {@link (LayoutManager:namespace).defaultLocationSelectors} will be used.
|
|
1367
|
+
* @returns New ContentItem created or undefined if no valid location selector was in array. */
|
|
1368
|
+
newItemAtLocation(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig, locationSelectors?: readonly LayoutManager.LocationSelector[]): ContentItem | undefined;
|
|
1369
|
+
/**
|
|
1370
|
+
* Adds a new ContentItem. Will use default location selectors to ensure a location is found and
|
|
1371
|
+
* component is successfully added.
|
|
1372
|
+
* @param itemConfig - ResolvedItemConfig of child to be added.
|
|
1373
|
+
* @returns Location of new ContentItem created. */
|
|
1374
|
+
addItem(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig): LayoutManager.Location;
|
|
1375
|
+
/**
|
|
1376
|
+
* Adds a ContentItem at the first valid selector location.
|
|
1377
|
+
* @param itemConfig - ResolvedItemConfig of child to be added.
|
|
1378
|
+
* @param locationSelectors - Array of location selectors used to find determine location in layout where ContentItem
|
|
1379
|
+
* will be added. First location in array which is valid will be used. If undefined,
|
|
1380
|
+
* {@link (LayoutManager:namespace).defaultLocationSelectors} will be used.
|
|
1381
|
+
* @returns Location of new ContentItem created or undefined if no valid location selector was in array. */
|
|
1382
|
+
addItemAtLocation(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig, locationSelectors?: readonly LayoutManager.LocationSelector[]): LayoutManager.Location | undefined;
|
|
1383
|
+
/** Loads the specified component ResolvedItemConfig as root.
|
|
1384
|
+
* This can be used to display a Component all by itself. The layout cannot be changed other than having another new layout loaded.
|
|
1385
|
+
* Note that, if this layout is saved and reloaded, it will reload with the Component as a child of a Stack.
|
|
1386
|
+
*/
|
|
1387
|
+
loadComponentAsRoot(itemConfig: ComponentItemConfig): void;
|
|
1388
|
+
/** @deprecated Use {@link (LayoutManager:class).setSize} */
|
|
1389
|
+
updateSize(width: number, height: number): void;
|
|
1390
|
+
/**
|
|
1391
|
+
* Updates the layout managers size
|
|
1392
|
+
*
|
|
1393
|
+
* @param width - Width in pixels
|
|
1394
|
+
* @param height - Height in pixels
|
|
1395
|
+
*/
|
|
1396
|
+
setSize(width: number, height: number): void;
|
|
1397
|
+
/* Excluded from this release type: beginSizeInvalidation */
|
|
1398
|
+
/* Excluded from this release type: endSizeInvalidation */
|
|
1399
|
+
/* Excluded from this release type: updateSizeFromContainer */
|
|
1400
|
+
/**
|
|
1401
|
+
* Update the size of the root ContentItem. This will update the size of all contentItems in the tree
|
|
1402
|
+
* @param force - In some cases the size is not updated if it has not changed. In this case, events
|
|
1403
|
+
* (such as ComponentContainer.virtualRectingRequiredEvent) are not fired. Setting force to true, ensures the size is updated regardless, and
|
|
1404
|
+
* the respective events are fired. This is sometimes necessary when a component's size has not changed but it has become visible, and the
|
|
1405
|
+
* relevant events need to be fired.
|
|
1406
|
+
*/
|
|
1407
|
+
updateRootSize(force?: boolean): void;
|
|
1408
|
+
/** @public */
|
|
1409
|
+
createAndInitContentItem(config: ResolvedItemConfig, parent: ContentItem): ContentItem;
|
|
1410
|
+
/* Excluded from this release type: createContentItem */
|
|
1411
|
+
findFirstComponentItemById(id: string): ComponentItem | undefined;
|
|
1412
|
+
/**
|
|
1413
|
+
* Creates a popout window with the specified content at the specified position
|
|
1414
|
+
*
|
|
1415
|
+
* @param itemConfigOrContentItem - The content of the popout window's layout manager derived from either
|
|
1416
|
+
* a {@link (ContentItem:class)} or {@link (ItemConfig:interface)} or ResolvedItemConfig content (array of {@link (ItemConfig:interface)})
|
|
1417
|
+
* @param positionAndSize - The width, height, left and top of Popout window
|
|
1418
|
+
* @param parentId -The id of the element this item will be appended to when popIn is called
|
|
1419
|
+
* @param indexInParent - The position of this item within its parent element
|
|
1420
|
+
*/
|
|
1421
|
+
createPopout(itemConfigOrContentItem: ContentItem | ResolvedRootItemConfig, positionAndSize: ResolvedPopoutLayoutConfig.Window, parentId: string | null, indexInParent: number | null): BrowserPopout;
|
|
1422
|
+
/* Excluded from this release type: createPopoutFromContentItem */
|
|
1423
|
+
/* Excluded from this release type: beginVirtualSizedContainerAdding */
|
|
1424
|
+
/* Excluded from this release type: addVirtualSizedContainer */
|
|
1425
|
+
/* Excluded from this release type: endVirtualSizedContainerAdding */
|
|
1426
|
+
/* Excluded from this release type: fireBeforeVirtualRectingEvent */
|
|
1427
|
+
/* Excluded from this release type: fireAfterVirtualRectingEvent */
|
|
1428
|
+
/* Excluded from this release type: createPopoutFromItemConfig */
|
|
1429
|
+
/* Excluded from this release type: createPopoutFromPopoutLayoutConfig */
|
|
1430
|
+
/**
|
|
1431
|
+
* Closes all Open Popouts
|
|
1432
|
+
* Applications can call this method when a page is unloaded to remove its open popouts
|
|
1433
|
+
*/
|
|
1434
|
+
closeAllOpenPopouts(): void;
|
|
1435
|
+
/**
|
|
1436
|
+
* Attaches DragListener to any given DOM element
|
|
1437
|
+
* and turns it into a way of creating new ComponentItems
|
|
1438
|
+
* by 'dragging' the DOM element into the layout
|
|
1439
|
+
*
|
|
1440
|
+
* @param element - The HTML element which will be listened to for commencement of drag.
|
|
1441
|
+
* @param componentTypeOrItemConfigCallback - Type of component to be created, or a callback which will provide the ItemConfig
|
|
1442
|
+
* to be used to create the component.
|
|
1443
|
+
* @param componentState - Optional initial state of component. This will be ignored if componentTypeOrFtn is a function.
|
|
1444
|
+
*
|
|
1445
|
+
* @returns an opaque object that identifies the DOM element
|
|
1446
|
+
* and the attached itemConfig. This can be used in
|
|
1447
|
+
* removeDragSource() later to get rid of the drag listeners.
|
|
1448
|
+
*/
|
|
1449
|
+
newDragSource(element: HTMLElement, itemConfigCallback: () => (DragSource.ComponentItemConfig | ComponentItemConfig)): DragSource;
|
|
1450
|
+
/** @deprecated will be replaced in version 3 with newDragSource(element: HTMLElement, itemConfig: ComponentItemConfig) */
|
|
1451
|
+
newDragSource(element: HTMLElement, componentType: JsonValue, componentState?: JsonValue, title?: JsonValue, id?: string): DragSource;
|
|
1452
|
+
/**
|
|
1453
|
+
* Removes a DragListener added by createDragSource() so the corresponding
|
|
1454
|
+
* DOM element is not a drag source any more.
|
|
1455
|
+
*/
|
|
1456
|
+
removeDragSource(dragSource: DragSource): void;
|
|
1457
|
+
/* Excluded from this release type: startComponentDrag */
|
|
1458
|
+
/**
|
|
1459
|
+
* Programmatically focuses an item. This focuses the specified component item
|
|
1460
|
+
* and the item emits a focus event
|
|
1461
|
+
*
|
|
1462
|
+
* @param item - The component item to be focused
|
|
1463
|
+
* @param suppressEvent - Whether to emit focus event
|
|
1464
|
+
*/
|
|
1465
|
+
focusComponent(item: ComponentItem, suppressEvent?: boolean): void;
|
|
1466
|
+
/**
|
|
1467
|
+
* Programmatically blurs (defocuses) the currently focused component.
|
|
1468
|
+
* If a component item is focused, then it is blurred and and the item emits a blur event
|
|
1469
|
+
*
|
|
1470
|
+
* @param item - The component item to be blurred
|
|
1471
|
+
* @param suppressEvent - Whether to emit blur event
|
|
1472
|
+
*/
|
|
1473
|
+
clearComponentFocus(suppressEvent?: boolean): void;
|
|
1474
|
+
/* Excluded from this release type: setFocusedComponentItem */
|
|
1475
|
+
/* Excluded from this release type: createContentItemFromConfig */
|
|
1476
|
+
/* Excluded from this release type: setMaximisedStack */
|
|
1477
|
+
checkMinimiseMaximisedStack(): void;
|
|
1478
|
+
/* Excluded from this release type: cleanupBeforeMaximisedStackDestroyed */
|
|
1479
|
+
/* Excluded from this release type: closeWindow */
|
|
1480
|
+
/* Excluded from this release type: getArea */
|
|
1481
|
+
/* Excluded from this release type: calculateItemAreas */
|
|
1482
|
+
/* Excluded from this release type: checkLoadedLayoutMaximiseItem */
|
|
1483
|
+
/* Excluded from this release type: processMaximiseStack */
|
|
1484
|
+
/* Excluded from this release type: processMinimiseMaximisedStack */
|
|
1485
|
+
/* Excluded from this release type: reconcilePopoutWindows */
|
|
1486
|
+
/* Excluded from this release type: getAllContentItems */
|
|
1487
|
+
/* Excluded from this release type: createSubWindows */
|
|
1488
|
+
/* Excluded from this release type: handleContainerResize */
|
|
1489
|
+
/* Excluded from this release type: processResizeWithDebounce */
|
|
1490
|
+
private checkClearResizeTimeout;
|
|
1491
|
+
/* Excluded from this release type: setContainer */
|
|
1492
|
+
/* Excluded from this release type: onBeforeUnload */
|
|
1493
|
+
/* Excluded from this release type: adjustColumnsResponsive */
|
|
1494
|
+
/* Excluded from this release type: useResponsiveLayout */
|
|
1495
|
+
/* Excluded from this release type: addChildContentItemsToContainer */
|
|
1496
|
+
/* Excluded from this release type: getAllStacks */
|
|
1497
|
+
/* Excluded from this release type: findFirstContentItemType */
|
|
1498
|
+
/* Excluded from this release type: findFirstContentItemTypeRecursive */
|
|
1499
|
+
/* Excluded from this release type: findFirstContentItemTypeByIdRecursive */
|
|
1500
|
+
/* Excluded from this release type: findAllStacksRecursive */
|
|
1501
|
+
/* Excluded from this release type: findFirstLocation */
|
|
1502
|
+
/* Excluded from this release type: findLocation */
|
|
1503
|
+
/* Excluded from this release type: tryCreateLocationFromParentItem */
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/** @public */
|
|
1507
|
+
export declare namespace LayoutManager {
|
|
1508
|
+
export type BeforeVirtualRectingEvent = (this: void, count: number) => void;
|
|
1509
|
+
export type AfterVirtualRectingEvent = (this: void) => void;
|
|
1510
|
+
/* Excluded from this release type: ConstructorParameters */
|
|
1511
|
+
/* Excluded from this release type: createMaximisePlaceElement */
|
|
1512
|
+
/* Excluded from this release type: createTabDropPlaceholderElement */
|
|
1513
|
+
/**
|
|
1514
|
+
* Specifies a location of a ContentItem without referencing the content item.
|
|
1515
|
+
* Used to specify where a new item is to be added
|
|
1516
|
+
* @public
|
|
1517
|
+
*/
|
|
1518
|
+
export interface Location {
|
|
1519
|
+
parentItem: ContentItem;
|
|
1520
|
+
index: number;
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* A selector used to specify a unique location in the layout
|
|
1524
|
+
* @public
|
|
1525
|
+
*/
|
|
1526
|
+
export interface LocationSelector {
|
|
1527
|
+
/** Specifies selector algorithm */
|
|
1528
|
+
typeId: LocationSelector.TypeId;
|
|
1529
|
+
/** Used by algorithm to determine index in found ContentItem */
|
|
1530
|
+
index?: number;
|
|
1531
|
+
}
|
|
1532
|
+
/** @public */
|
|
1533
|
+
export namespace LocationSelector {
|
|
1534
|
+
export const enum TypeId {
|
|
1535
|
+
/** Stack with focused Item. Index specifies offset from index of focused item (eg 1 is the position after focused item) */
|
|
1536
|
+
FocusedItem = 0,
|
|
1537
|
+
/** Stack with focused Item. Index specfies ContentItems index */
|
|
1538
|
+
FocusedStack = 1,
|
|
1539
|
+
/** First stack found in layout */
|
|
1540
|
+
FirstStack = 2,
|
|
1541
|
+
/** First Row or Column found in layout (rows are searched first) */
|
|
1542
|
+
FirstRowOrColumn = 3,
|
|
1543
|
+
/** First Row in layout */
|
|
1544
|
+
FirstRow = 4,
|
|
1545
|
+
/** First Column in layout */
|
|
1546
|
+
FirstColumn = 5,
|
|
1547
|
+
/** Finds a location if layout is empty. The found location will be the root ContentItem. */
|
|
1548
|
+
Empty = 6,
|
|
1549
|
+
/** Finds root if layout is empty, otherwise a child under root */
|
|
1550
|
+
Root = 7
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Default LocationSelectors array used if none is specified. Will always find a location.
|
|
1555
|
+
* @public
|
|
1556
|
+
*/
|
|
1557
|
+
const defaultLocationSelectors: readonly LocationSelector[];
|
|
1558
|
+
/**
|
|
1559
|
+
* LocationSelectors to try to get location next to existing focused item
|
|
1560
|
+
* @public
|
|
1561
|
+
*/
|
|
1562
|
+
const afterFocusedItemIfPossibleLocationSelectors: readonly LocationSelector[];
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/* Excluded from this release type: LeftAndTop */
|
|
1566
|
+
|
|
1567
|
+
/** @public */
|
|
1568
|
+
export declare type LogicalZIndex = 'base' | 'drag' | 'stackMaximised';
|
|
1569
|
+
|
|
1570
|
+
/** @public */
|
|
1571
|
+
export declare namespace LogicalZIndex {
|
|
1572
|
+
const base = "base";
|
|
1573
|
+
const drag = "drag";
|
|
1574
|
+
const stackMaximised = "stackMaximised";
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/** @public */
|
|
1578
|
+
export declare const LogicalZIndexToDefaultMap: {
|
|
1579
|
+
base: string;
|
|
1580
|
+
drag: string;
|
|
1581
|
+
stackMaximised: string;
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
/* Excluded from this release type: parseSize */
|
|
1585
|
+
|
|
1586
|
+
/** @public */
|
|
1587
|
+
export declare class PopoutBlockedError extends ExternalError {
|
|
1588
|
+
/* Excluded from this release type: __constructor */
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/** @public */
|
|
1592
|
+
export declare interface PopoutLayoutConfig extends LayoutConfig {
|
|
1593
|
+
/** The id of the element the item will be appended to on popIn
|
|
1594
|
+
* If null, append to topmost layout element
|
|
1595
|
+
*/
|
|
1596
|
+
parentId: string | null | undefined;
|
|
1597
|
+
/** The position of this element within its parent
|
|
1598
|
+
* If null, position is last
|
|
1599
|
+
*/
|
|
1600
|
+
indexInParent: number | null | undefined;
|
|
1601
|
+
/** @deprecated use {@link (PopoutLayoutConfig:interface).window} */
|
|
1602
|
+
dimensions: PopoutLayoutConfig.Dimensions | undefined;
|
|
1603
|
+
window: PopoutLayoutConfig.Window | undefined;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
/** @public */
|
|
1607
|
+
export declare namespace PopoutLayoutConfig {
|
|
1608
|
+
/** @deprecated use {@link (PopoutLayoutConfig:namespace).(Window:interface)} */
|
|
1609
|
+
export interface Dimensions extends LayoutConfig.Dimensions {
|
|
1610
|
+
/** @deprecated use {@link (PopoutLayoutConfig:namespace).(Window:interface).width} */
|
|
1611
|
+
width?: number | null;
|
|
1612
|
+
/** @deprecated use {@link (PopoutLayoutConfig:namespace).(Window:interface).height} */
|
|
1613
|
+
height?: number | null;
|
|
1614
|
+
/** @deprecated use {@link (PopoutLayoutConfig:namespace).(Window:interface).left} */
|
|
1615
|
+
left?: number | null;
|
|
1616
|
+
/** @deprecated use {@link (PopoutLayoutConfig:namespace).(Window:interface).top} */
|
|
1617
|
+
top?: number | null;
|
|
1618
|
+
}
|
|
1619
|
+
export interface Window {
|
|
1620
|
+
width?: number;
|
|
1621
|
+
height?: number;
|
|
1622
|
+
left?: number;
|
|
1623
|
+
top?: number;
|
|
1624
|
+
}
|
|
1625
|
+
export namespace Window {
|
|
1626
|
+
/* Excluded from this release type: resolve */
|
|
1627
|
+
/* Excluded from this release type: fromResolved */
|
|
1628
|
+
}
|
|
1629
|
+
/* Excluded from this release type: resolve */
|
|
1630
|
+
/* Excluded from this release type: fromResolved */
|
|
1631
|
+
/* Excluded from this release type: fromResolvedArray */
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
/* Excluded from this release type: Rect */
|
|
1635
|
+
|
|
1636
|
+
/** @public */
|
|
1637
|
+
export declare interface ResolvedComponentItemConfig extends ResolvedHeaderedItemConfig {
|
|
1638
|
+
readonly type: 'component';
|
|
1639
|
+
readonly content: [];
|
|
1640
|
+
readonly title: string;
|
|
1641
|
+
readonly reorderEnabled: boolean;
|
|
1642
|
+
/**
|
|
1643
|
+
* The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
|
|
1644
|
+
*/
|
|
1645
|
+
readonly componentType: JsonValue;
|
|
1646
|
+
readonly componentState?: JsonValue;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/** @public */
|
|
1650
|
+
export declare namespace ResolvedComponentItemConfig {
|
|
1651
|
+
const defaultReorderEnabled = true;
|
|
1652
|
+
export function resolveComponentTypeName(itemConfig: ResolvedComponentItemConfig): string | undefined;
|
|
1653
|
+
export function createCopy(original: ResolvedComponentItemConfig): ResolvedComponentItemConfig;
|
|
1654
|
+
export function createDefault(componentType?: JsonValue, componentState?: JsonValue, title?: string): ResolvedComponentItemConfig;
|
|
1655
|
+
export function copyComponentType(componentType: JsonValue): JsonValue;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
/* Excluded from this release type: ResolvedGroundItemConfig */
|
|
1659
|
+
|
|
1660
|
+
/** @public */
|
|
1661
|
+
export declare interface ResolvedHeaderedItemConfig extends ResolvedItemConfig {
|
|
1662
|
+
header: ResolvedHeaderedItemConfig.Header | undefined;
|
|
1663
|
+
readonly maximised: boolean;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/** @public */
|
|
1667
|
+
export declare namespace ResolvedHeaderedItemConfig {
|
|
1668
|
+
const defaultMaximised = false;
|
|
1669
|
+
export interface Header {
|
|
1670
|
+
readonly show: false | Side | undefined;
|
|
1671
|
+
readonly popout: false | string | undefined;
|
|
1672
|
+
readonly maximise: false | string | undefined;
|
|
1673
|
+
readonly close: string | undefined;
|
|
1674
|
+
readonly minimise: string | undefined;
|
|
1675
|
+
readonly tabDropdown: false | string | undefined;
|
|
1676
|
+
}
|
|
1677
|
+
export namespace Header {
|
|
1678
|
+
export function createCopy(original: Header | undefined, show?: false | Side): Header | undefined;
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/** @public */
|
|
1683
|
+
export declare interface ResolvedItemConfig {
|
|
1684
|
+
readonly type: ItemType;
|
|
1685
|
+
readonly content: readonly ResolvedItemConfig[];
|
|
1686
|
+
readonly size: number;
|
|
1687
|
+
readonly sizeUnit: SizeUnitEnum;
|
|
1688
|
+
readonly minSize: number | undefined;
|
|
1689
|
+
readonly minSizeUnit: SizeUnitEnum;
|
|
1690
|
+
readonly id: string;
|
|
1691
|
+
readonly isClosable: boolean;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/** @public */
|
|
1695
|
+
export declare namespace ResolvedItemConfig {
|
|
1696
|
+
const defaults: ResolvedItemConfig;
|
|
1697
|
+
/** Creates a copy of the original ResolvedItemConfig using an alternative content if specified */
|
|
1698
|
+
export function createCopy(original: ResolvedItemConfig, content?: ResolvedItemConfig[]): ResolvedItemConfig;
|
|
1699
|
+
export function createDefault(type: ItemType): ResolvedItemConfig;
|
|
1700
|
+
export function isComponentItem(itemConfig: ResolvedItemConfig): itemConfig is ResolvedComponentItemConfig;
|
|
1701
|
+
export function isStackItem(itemConfig: ResolvedItemConfig): itemConfig is ResolvedStackItemConfig;
|
|
1702
|
+
/* Excluded from this release type: isGroundItem */
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
/** @public */
|
|
1706
|
+
export declare interface ResolvedLayoutConfig {
|
|
1707
|
+
readonly root: ResolvedRootItemConfig | undefined;
|
|
1708
|
+
readonly openPopouts: ResolvedPopoutLayoutConfig[];
|
|
1709
|
+
readonly dimensions: ResolvedLayoutConfig.Dimensions;
|
|
1710
|
+
readonly settings: ResolvedLayoutConfig.Settings;
|
|
1711
|
+
readonly header: ResolvedLayoutConfig.Header;
|
|
1712
|
+
readonly resolved: true;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/** @public */
|
|
1716
|
+
export declare namespace ResolvedLayoutConfig {
|
|
1717
|
+
export interface Settings {
|
|
1718
|
+
readonly constrainDragToContainer: boolean;
|
|
1719
|
+
readonly reorderEnabled: boolean;
|
|
1720
|
+
readonly popoutWholeStack: boolean;
|
|
1721
|
+
readonly blockedPopoutsThrowError: boolean;
|
|
1722
|
+
/** @deprecated Will be removed in version 3. */
|
|
1723
|
+
readonly closePopoutsOnUnload: boolean;
|
|
1724
|
+
readonly responsiveMode: ResponsiveMode;
|
|
1725
|
+
readonly tabOverlapAllowance: number;
|
|
1726
|
+
readonly reorderOnTabMenuClick: boolean;
|
|
1727
|
+
readonly tabControlOffset: number;
|
|
1728
|
+
readonly popInOnClose: boolean;
|
|
1729
|
+
}
|
|
1730
|
+
export namespace Settings {
|
|
1731
|
+
const defaults: ResolvedLayoutConfig.Settings;
|
|
1732
|
+
export function createCopy(original: Settings): Settings;
|
|
1733
|
+
}
|
|
1734
|
+
export interface Dimensions {
|
|
1735
|
+
readonly borderWidth: number;
|
|
1736
|
+
readonly borderGrabWidth: number;
|
|
1737
|
+
readonly defaultMinItemHeight: number;
|
|
1738
|
+
readonly defaultMinItemHeightUnit: SizeUnitEnum;
|
|
1739
|
+
readonly defaultMinItemWidth: number;
|
|
1740
|
+
readonly defaultMinItemWidthUnit: SizeUnitEnum;
|
|
1741
|
+
readonly headerHeight: number;
|
|
1742
|
+
readonly dragProxyWidth: number;
|
|
1743
|
+
readonly dragProxyHeight: number;
|
|
1744
|
+
}
|
|
1745
|
+
export namespace Dimensions {
|
|
1746
|
+
export function createCopy(original: Dimensions): Dimensions;
|
|
1747
|
+
const defaults: ResolvedLayoutConfig.Dimensions;
|
|
1748
|
+
}
|
|
1749
|
+
export interface Header {
|
|
1750
|
+
readonly show: false | Side;
|
|
1751
|
+
readonly popout: false | string;
|
|
1752
|
+
readonly dock: string;
|
|
1753
|
+
readonly maximise: false | string;
|
|
1754
|
+
readonly minimise: string;
|
|
1755
|
+
readonly close: false | string;
|
|
1756
|
+
readonly tabDropdown: false | string;
|
|
1757
|
+
}
|
|
1758
|
+
export namespace Header {
|
|
1759
|
+
export function createCopy(original: Header): Header;
|
|
1760
|
+
const defaults: ResolvedLayoutConfig.Header;
|
|
1761
|
+
}
|
|
1762
|
+
export function isPopout(config: ResolvedLayoutConfig): config is ResolvedPopoutLayoutConfig;
|
|
1763
|
+
export function createDefault(): ResolvedLayoutConfig;
|
|
1764
|
+
export function createCopy(config: ResolvedLayoutConfig): ResolvedLayoutConfig;
|
|
1765
|
+
export function copyOpenPopouts(original: ResolvedPopoutLayoutConfig[]): ResolvedPopoutLayoutConfig[];
|
|
1766
|
+
/**
|
|
1767
|
+
* Takes a GoldenLayout configuration object and
|
|
1768
|
+
* replaces its keys and values recursively with
|
|
1769
|
+
* one letter counterparts
|
|
1770
|
+
*/
|
|
1771
|
+
export function minifyConfig(layoutConfig: ResolvedLayoutConfig): ResolvedLayoutConfig;
|
|
1772
|
+
/**
|
|
1773
|
+
* Takes a configuration Object that was previously minified
|
|
1774
|
+
* using minifyConfig and returns its original version
|
|
1775
|
+
*/
|
|
1776
|
+
export function unminifyConfig(minifiedConfig: ResolvedLayoutConfig): ResolvedLayoutConfig;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/** @public */
|
|
1780
|
+
export declare interface ResolvedPopoutLayoutConfig extends ResolvedLayoutConfig {
|
|
1781
|
+
readonly parentId: string | null;
|
|
1782
|
+
readonly indexInParent: number | null;
|
|
1783
|
+
readonly window: ResolvedPopoutLayoutConfig.Window;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
/** @public */
|
|
1787
|
+
export declare namespace ResolvedPopoutLayoutConfig {
|
|
1788
|
+
export interface Window {
|
|
1789
|
+
readonly width: number | null;
|
|
1790
|
+
readonly height: number | null;
|
|
1791
|
+
readonly left: number | null;
|
|
1792
|
+
readonly top: number | null;
|
|
1793
|
+
}
|
|
1794
|
+
export namespace Window {
|
|
1795
|
+
export function createCopy(original: Window): Window;
|
|
1796
|
+
const defaults: ResolvedPopoutLayoutConfig.Window;
|
|
1797
|
+
}
|
|
1798
|
+
export function createCopy(original: ResolvedPopoutLayoutConfig): ResolvedPopoutLayoutConfig;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* RootItemConfig is the topmost ResolvedItemConfig specified by the user.
|
|
1803
|
+
* Note that it does not have a corresponding contentItem. It specifies the one and only child of the Ground ContentItem
|
|
1804
|
+
* Note that RootItemConfig can be an ComponentItem itemConfig. However when the Ground ContentItem's child is created
|
|
1805
|
+
* a ComponentItem itemConfig will create a Stack with a child ComponentItem.
|
|
1806
|
+
* @public
|
|
1807
|
+
*/
|
|
1808
|
+
export declare type ResolvedRootItemConfig = ResolvedRowOrColumnItemConfig | ResolvedStackItemConfig | ResolvedComponentItemConfig;
|
|
1809
|
+
|
|
1810
|
+
/** @public */
|
|
1811
|
+
export declare namespace ResolvedRootItemConfig {
|
|
1812
|
+
export function createCopy(config: ResolvedRootItemConfig): ResolvedRootItemConfig;
|
|
1813
|
+
export function isRootItemConfig(itemConfig: ResolvedItemConfig): itemConfig is ResolvedRootItemConfig;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
/** Base for Root or RowOrColumn ItemConfigs
|
|
1817
|
+
* @public
|
|
1818
|
+
*/
|
|
1819
|
+
export declare interface ResolvedRowOrColumnItemConfig extends ResolvedItemConfig {
|
|
1820
|
+
readonly type: 'row' | 'column';
|
|
1821
|
+
/** Note that RowOrColumn ResolvedItemConfig contents, can contain ComponentItem itemConfigs. However
|
|
1822
|
+
* when ContentItems are created, these ComponentItem itemConfigs will create a Stack with a child ComponentItem.
|
|
1823
|
+
*/
|
|
1824
|
+
readonly content: readonly (ResolvedRowOrColumnItemConfig | ResolvedStackItemConfig | ResolvedComponentItemConfig)[];
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
/** @public */
|
|
1828
|
+
export declare namespace ResolvedRowOrColumnItemConfig {
|
|
1829
|
+
export type ChildItemConfig = ResolvedRowOrColumnItemConfig | ResolvedStackItemConfig | ResolvedComponentItemConfig;
|
|
1830
|
+
export function isChildItemConfig(itemConfig: ResolvedItemConfig): itemConfig is ChildItemConfig;
|
|
1831
|
+
export function createCopy(original: ResolvedRowOrColumnItemConfig, content?: ChildItemConfig[]): ResolvedRowOrColumnItemConfig;
|
|
1832
|
+
export function copyContent(original: readonly ChildItemConfig[]): ChildItemConfig[];
|
|
1833
|
+
export function createDefault(type: 'row' | 'column'): ResolvedRowOrColumnItemConfig;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/** @public */
|
|
1837
|
+
export declare interface ResolvedStackItemConfig extends ResolvedHeaderedItemConfig {
|
|
1838
|
+
readonly type: 'stack';
|
|
1839
|
+
readonly content: ResolvedComponentItemConfig[];
|
|
1840
|
+
/** The index of the active item in the Stack. Only undefined if the Stack is empty. */
|
|
1841
|
+
readonly activeItemIndex: number | undefined;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
/** @public */
|
|
1845
|
+
export declare namespace ResolvedStackItemConfig {
|
|
1846
|
+
const defaultActiveItemIndex = 0;
|
|
1847
|
+
export function createCopy(original: ResolvedStackItemConfig, content?: ResolvedComponentItemConfig[]): ResolvedStackItemConfig;
|
|
1848
|
+
export function copyContent(original: ResolvedComponentItemConfig[]): ResolvedComponentItemConfig[];
|
|
1849
|
+
export function createDefault(): ResolvedStackItemConfig;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
/** @public */
|
|
1853
|
+
export declare type ResponsiveMode = 'none' | 'always' | 'onload';
|
|
1854
|
+
|
|
1855
|
+
/** @public */
|
|
1856
|
+
export declare namespace ResponsiveMode {
|
|
1857
|
+
const none = "none";
|
|
1858
|
+
const always = "always";
|
|
1859
|
+
const onload = "onload";
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
/** @public */
|
|
1863
|
+
export declare type RootItemConfig = RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig;
|
|
1864
|
+
|
|
1865
|
+
/** @public */
|
|
1866
|
+
export declare namespace RootItemConfig {
|
|
1867
|
+
export function isRootItemConfig(itemConfig: ItemConfig): itemConfig is RootItemConfig;
|
|
1868
|
+
/* Excluded from this release type: resolve */
|
|
1869
|
+
/* Excluded from this release type: fromResolvedOrUndefined */
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
/** @public */
|
|
1873
|
+
export declare class RowOrColumn extends ContentItem {
|
|
1874
|
+
/* Excluded from this release type: _rowOrColumnParent */
|
|
1875
|
+
/* Excluded from this release type: _childElementContainer */
|
|
1876
|
+
/* Excluded from this release type: _configType */
|
|
1877
|
+
/* Excluded from this release type: _isColumn */
|
|
1878
|
+
/* Excluded from this release type: _splitterSize */
|
|
1879
|
+
/* Excluded from this release type: _splitterGrabSize */
|
|
1880
|
+
/* Excluded from this release type: _dimension */
|
|
1881
|
+
/* Excluded from this release type: _splitter */
|
|
1882
|
+
/* Excluded from this release type: _splitterPosition */
|
|
1883
|
+
/* Excluded from this release type: _splitterMinPosition */
|
|
1884
|
+
/* Excluded from this release type: _splitterMaxPosition */
|
|
1885
|
+
/* Excluded from this release type: __constructor */
|
|
1886
|
+
newComponent(componentType: JsonValue, componentState?: JsonValue, title?: string, index?: number): ComponentItem;
|
|
1887
|
+
addComponent(componentType: JsonValue, componentState?: JsonValue, title?: string, index?: number): number;
|
|
1888
|
+
newItem(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig, index?: number): ContentItem;
|
|
1889
|
+
addItem(itemConfig: RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig, index?: number): number;
|
|
1890
|
+
/**
|
|
1891
|
+
* Add a new contentItem to the Row or Column
|
|
1892
|
+
*
|
|
1893
|
+
* @param contentItem -
|
|
1894
|
+
* @param index - The position of the new item within the Row or Column.
|
|
1895
|
+
* If no index is provided the item will be added to the end
|
|
1896
|
+
* @param suspendResize - If true the items won't be resized. This will leave the item in
|
|
1897
|
+
* an inconsistent state and is only intended to be used if multiple
|
|
1898
|
+
* children need to be added in one go and resize is called afterwards
|
|
1899
|
+
*
|
|
1900
|
+
* @returns
|
|
1901
|
+
*/
|
|
1902
|
+
addChild(contentItem: ContentItem, index?: number, suspendResize?: boolean): number;
|
|
1903
|
+
/**
|
|
1904
|
+
* Removes a child of this element
|
|
1905
|
+
*
|
|
1906
|
+
* @param contentItem -
|
|
1907
|
+
* @param keepChild - If true the child will be removed, but not destroyed
|
|
1908
|
+
*
|
|
1909
|
+
*/
|
|
1910
|
+
removeChild(contentItem: ContentItem, keepChild: boolean): void;
|
|
1911
|
+
/**
|
|
1912
|
+
* Replaces a child of this Row or Column with another contentItem
|
|
1913
|
+
*/
|
|
1914
|
+
replaceChild(oldChild: ContentItem, newChild: ContentItem): void;
|
|
1915
|
+
/**
|
|
1916
|
+
* Called whenever the dimensions of this item or one of its parents change
|
|
1917
|
+
*/
|
|
1918
|
+
updateSize(force: boolean): void;
|
|
1919
|
+
/* Excluded from this release type: init */
|
|
1920
|
+
toConfig(): ResolvedRowOrColumnItemConfig;
|
|
1921
|
+
/* Excluded from this release type: setParent */
|
|
1922
|
+
/* Excluded from this release type: updateNodeSize */
|
|
1923
|
+
/* Excluded from this release type: setAbsoluteSizes */
|
|
1924
|
+
/* Excluded from this release type: calculateAbsoluteSizes */
|
|
1925
|
+
/* Excluded from this release type: calculateRelativeSizes */
|
|
1926
|
+
/* Excluded from this release type: respectMinItemSize */
|
|
1927
|
+
/* Excluded from this release type: createSplitter */
|
|
1928
|
+
/* Excluded from this release type: getSplitItems */
|
|
1929
|
+
private calculateContentItemMinSize;
|
|
1930
|
+
/* Excluded from this release type: calculateContentItemsTotalMinSize */
|
|
1931
|
+
/* Excluded from this release type: onSplitterDragStart */
|
|
1932
|
+
/* Excluded from this release type: onSplitterDrag */
|
|
1933
|
+
/* Excluded from this release type: onSplitterDragStop */
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
/** @public */
|
|
1937
|
+
export declare namespace RowOrColumn {
|
|
1938
|
+
/* Excluded from this release type: AbsoluteSizes */
|
|
1939
|
+
/* Excluded from this release type: getElementDimensionSize */
|
|
1940
|
+
/* Excluded from this release type: setElementDimensionSize */
|
|
1941
|
+
/* Excluded from this release type: createElement */
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
/** @public */
|
|
1945
|
+
export declare interface RowOrColumnItemConfig extends ItemConfig {
|
|
1946
|
+
type: 'row' | 'column';
|
|
1947
|
+
content: (RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig)[];
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/** @public */
|
|
1951
|
+
export declare namespace RowOrColumnItemConfig {
|
|
1952
|
+
export type ChildItemConfig = RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig;
|
|
1953
|
+
export function isChildItemConfig(itemConfig: ItemConfig): itemConfig is ChildItemConfig;
|
|
1954
|
+
/* Excluded from this release type: resolve */
|
|
1955
|
+
/* Excluded from this release type: fromResolved */
|
|
1956
|
+
/* Excluded from this release type: resolveContent */
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
/** @public */
|
|
1960
|
+
export declare type Side = 'top' | 'left' | 'right' | 'bottom';
|
|
1961
|
+
|
|
1962
|
+
/** @public */
|
|
1963
|
+
export declare namespace Side {
|
|
1964
|
+
const top = "top";
|
|
1965
|
+
const left = "left";
|
|
1966
|
+
const right = "right";
|
|
1967
|
+
const bottom = "bottom";
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* Length units which can specify the size of a Component Item
|
|
1972
|
+
* @public
|
|
1973
|
+
*/
|
|
1974
|
+
export declare type SizeUnit = 'px' | '%' | 'fr' | 'em';
|
|
1975
|
+
|
|
1976
|
+
/** @public */
|
|
1977
|
+
export declare enum SizeUnitEnum {
|
|
1978
|
+
Pixel = "px",
|
|
1979
|
+
Percent = "%",
|
|
1980
|
+
Fractional = "fr",
|
|
1981
|
+
Em = "em"
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/** @public */
|
|
1985
|
+
export declare namespace SizeUnitEnum {
|
|
1986
|
+
export function tryParse(value: string): SizeUnitEnum | undefined;
|
|
1987
|
+
export function format(value: SizeUnitEnum): SizeUnitEnum;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
/* Excluded from this release type: SizeWithUnit */
|
|
1991
|
+
|
|
1992
|
+
/** @public */
|
|
1993
|
+
export declare class Stack extends ComponentParentableItem {
|
|
1994
|
+
/* Excluded from this release type: _headerConfig */
|
|
1995
|
+
/* Excluded from this release type: _header */
|
|
1996
|
+
/* Excluded from this release type: _childElementContainer */
|
|
1997
|
+
/* Excluded from this release type: _maximisedEnabled */
|
|
1998
|
+
/* Excluded from this release type: _activeComponentItem */
|
|
1999
|
+
/* Excluded from this release type: _dropSegment */
|
|
2000
|
+
/* Excluded from this release type: _dropIndex */
|
|
2001
|
+
/* Excluded from this release type: _contentAreaDimensions */
|
|
2002
|
+
/* Excluded from this release type: _headerSideChanged */
|
|
2003
|
+
/* Excluded from this release type: _initialWantMaximise */
|
|
2004
|
+
/* Excluded from this release type: _initialActiveItemIndex */
|
|
2005
|
+
/* Excluded from this release type: _resizeListener */
|
|
2006
|
+
/* Excluded from this release type: _maximisedListener */
|
|
2007
|
+
/* Excluded from this release type: _minimisedListener */
|
|
2008
|
+
get childElementContainer(): HTMLElement;
|
|
2009
|
+
get header(): Header;
|
|
2010
|
+
get headerShow(): boolean;
|
|
2011
|
+
get headerSide(): Side;
|
|
2012
|
+
get headerLeftRightSided(): boolean;
|
|
2013
|
+
/* Excluded from this release type: contentAreaDimensions */
|
|
2014
|
+
/* Excluded from this release type: initialWantMaximise */
|
|
2015
|
+
get isMaximised(): boolean;
|
|
2016
|
+
get stackParent(): ContentItem;
|
|
2017
|
+
/* Excluded from this release type: __constructor */
|
|
2018
|
+
/* Excluded from this release type: updateSize */
|
|
2019
|
+
/* Excluded from this release type: init */
|
|
2020
|
+
/** @deprecated Use {@link (Stack:class).setActiveComponentItem} */
|
|
2021
|
+
setActiveContentItem(item: ContentItem): void;
|
|
2022
|
+
setActiveComponentItem(componentItem: ComponentItem, focus: boolean, suppressFocusEvent?: boolean): void;
|
|
2023
|
+
/** @deprecated Use {@link (Stack:class).getActiveComponentItem} */
|
|
2024
|
+
getActiveContentItem(): ContentItem | null;
|
|
2025
|
+
getActiveComponentItem(): ComponentItem | undefined;
|
|
2026
|
+
/* Excluded from this release type: focusActiveContentItem */
|
|
2027
|
+
/* Excluded from this release type: setFocusedValue */
|
|
2028
|
+
/* Excluded from this release type: setRowColumnClosable */
|
|
2029
|
+
newComponent(componentType: JsonValue, componentState?: JsonValue, title?: string, index?: number): ComponentItem;
|
|
2030
|
+
addComponent(componentType: JsonValue, componentState?: JsonValue, title?: string, index?: number): number;
|
|
2031
|
+
newItem(itemConfig: ComponentItemConfig, index?: number): ContentItem;
|
|
2032
|
+
addItem(itemConfig: ComponentItemConfig, index?: number): number;
|
|
2033
|
+
addChild(contentItem: ContentItem, index?: number, focus?: boolean): number;
|
|
2034
|
+
removeChild(contentItem: ContentItem, keepChild: boolean): void;
|
|
2035
|
+
/**
|
|
2036
|
+
* Maximises the Item or minimises it if it is already maximised
|
|
2037
|
+
*/
|
|
2038
|
+
toggleMaximise(): void;
|
|
2039
|
+
maximise(): void;
|
|
2040
|
+
minimise(): void;
|
|
2041
|
+
/* Excluded from this release type: destroy */
|
|
2042
|
+
toConfig(): ResolvedStackItemConfig;
|
|
2043
|
+
/* Excluded from this release type: onDrop */
|
|
2044
|
+
/* Excluded from this release type: highlightDropZone */
|
|
2045
|
+
/* Excluded from this release type: getArea */
|
|
2046
|
+
/* Excluded from this release type: positionHeader */
|
|
2047
|
+
/* Excluded from this release type: updateNodeSize */
|
|
2048
|
+
/* Excluded from this release type: highlightHeaderDropZone */
|
|
2049
|
+
/* Excluded from this release type: resetHeaderDropZone */
|
|
2050
|
+
/* Excluded from this release type: setupHeaderPosition */
|
|
2051
|
+
/* Excluded from this release type: highlightBodyDropZone */
|
|
2052
|
+
/* Excluded from this release type: handleResize */
|
|
2053
|
+
/* Excluded from this release type: handleMaximised */
|
|
2054
|
+
/* Excluded from this release type: handleMinimised */
|
|
2055
|
+
/* Excluded from this release type: handlePopoutEvent */
|
|
2056
|
+
/* Excluded from this release type: handleHeaderClickEvent */
|
|
2057
|
+
/* Excluded from this release type: handleHeaderTouchStartEvent */
|
|
2058
|
+
/* Excluded from this release type: handleHeaderComponentRemoveEvent */
|
|
2059
|
+
/* Excluded from this release type: handleHeaderComponentFocusEvent */
|
|
2060
|
+
/* Excluded from this release type: handleHeaderComponentStartDragEvent */
|
|
2061
|
+
/* Excluded from this release type: createHeaderConfig */
|
|
2062
|
+
/* Excluded from this release type: emitStateChangedEvent */
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/** @public */
|
|
2066
|
+
export declare namespace Stack {
|
|
2067
|
+
/* Excluded from this release type: Segment */
|
|
2068
|
+
/* Excluded from this release type: ContentAreaDimension */
|
|
2069
|
+
/* Excluded from this release type: ContentAreaDimensions */
|
|
2070
|
+
/* Excluded from this release type: createElement */
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
/** @public */
|
|
2074
|
+
export declare interface StackItemConfig extends HeaderedItemConfig {
|
|
2075
|
+
type: 'stack';
|
|
2076
|
+
content: ComponentItemConfig[];
|
|
2077
|
+
/** The index of the item in content which is to be active*/
|
|
2078
|
+
activeItemIndex?: number;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/** @public */
|
|
2082
|
+
export declare namespace StackItemConfig {
|
|
2083
|
+
/* Excluded from this release type: resolve */
|
|
2084
|
+
/* Excluded from this release type: fromResolved */
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
/** @public */
|
|
2088
|
+
export declare namespace StyleConstants {
|
|
2089
|
+
const defaultComponentBaseZIndex = "auto";
|
|
2090
|
+
const defaultComponentDragZIndex = "32";
|
|
2091
|
+
const defaultComponentStackMaximisedZIndex = "41";
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* Represents an individual tab within a Stack's header
|
|
2096
|
+
* @public
|
|
2097
|
+
*/
|
|
2098
|
+
export declare class Tab {
|
|
2099
|
+
/* Excluded from this release type: _layoutManager */
|
|
2100
|
+
/* Excluded from this release type: _componentItem */
|
|
2101
|
+
/* Excluded from this release type: _closeEvent */
|
|
2102
|
+
/* Excluded from this release type: _focusEvent */
|
|
2103
|
+
/* Excluded from this release type: _dragStartEvent */
|
|
2104
|
+
/* Excluded from this release type: _element */
|
|
2105
|
+
/* Excluded from this release type: _titleElement */
|
|
2106
|
+
/* Excluded from this release type: _closeElement */
|
|
2107
|
+
/* Excluded from this release type: _dragListener */
|
|
2108
|
+
/* Excluded from this release type: _isActive */
|
|
2109
|
+
/* Excluded from this release type: _tabClickListener */
|
|
2110
|
+
/* Excluded from this release type: _tabTouchStartListener */
|
|
2111
|
+
/* Excluded from this release type: _closeClickListener */
|
|
2112
|
+
/* Excluded from this release type: _closeTouchStartListener */
|
|
2113
|
+
/* Excluded from this release type: _dragStartListener */
|
|
2114
|
+
/* Excluded from this release type: _contentItemDestroyListener */
|
|
2115
|
+
/* Excluded from this release type: _tabTitleChangedListener */
|
|
2116
|
+
get isActive(): boolean;
|
|
2117
|
+
get componentItem(): ComponentItem;
|
|
2118
|
+
/** @deprecated use {@link (Tab:class).componentItem} */
|
|
2119
|
+
get contentItem(): ComponentItem;
|
|
2120
|
+
get element(): HTMLElement;
|
|
2121
|
+
get titleElement(): HTMLElement;
|
|
2122
|
+
get closeElement(): HTMLElement | undefined;
|
|
2123
|
+
get reorderEnabled(): boolean;
|
|
2124
|
+
set reorderEnabled(value: boolean);
|
|
2125
|
+
/* Excluded from this release type: __constructor */
|
|
2126
|
+
/**
|
|
2127
|
+
* Sets the tab's title to the provided string and sets
|
|
2128
|
+
* its title attribute to a pure text representation (without
|
|
2129
|
+
* html tags) of the same string.
|
|
2130
|
+
*/
|
|
2131
|
+
setTitle(title: string): void;
|
|
2132
|
+
/**
|
|
2133
|
+
* Sets this tab's active state. To programmatically
|
|
2134
|
+
* switch tabs, use Stack.setActiveComponentItem( item ) instead.
|
|
2135
|
+
*/
|
|
2136
|
+
setActive(isActive: boolean): void;
|
|
2137
|
+
/* Excluded from this release type: destroy */
|
|
2138
|
+
/* Excluded from this release type: setBlurred */
|
|
2139
|
+
/* Excluded from this release type: setFocused */
|
|
2140
|
+
/* Excluded from this release type: onDragStart */
|
|
2141
|
+
/* Excluded from this release type: onContentItemDestroy */
|
|
2142
|
+
/* Excluded from this release type: onTabClickDown */
|
|
2143
|
+
/* Excluded from this release type: onTabTouchStart */
|
|
2144
|
+
/* Excluded from this release type: onCloseClick */
|
|
2145
|
+
/* Excluded from this release type: onCloseTouchStart */
|
|
2146
|
+
/* Excluded from this release type: notifyClose */
|
|
2147
|
+
/* Excluded from this release type: notifyFocus */
|
|
2148
|
+
/* Excluded from this release type: enableReorder */
|
|
2149
|
+
/* Excluded from this release type: disableReorder */
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
/** @public */
|
|
2153
|
+
export declare namespace Tab {
|
|
2154
|
+
/* Excluded from this release type: CloseEvent */
|
|
2155
|
+
/* Excluded from this release type: FocusEvent */
|
|
2156
|
+
/* Excluded from this release type: DragStartEvent */
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
/* Excluded from this release type: TransitionIndicator */
|
|
2160
|
+
|
|
2161
|
+
/* Excluded from this release type: UndefinableSizeWithUnit */
|
|
2162
|
+
|
|
2163
|
+
/** @public */
|
|
2164
|
+
export declare class VirtualLayout extends LayoutManager {
|
|
2165
|
+
/**
|
|
2166
|
+
* @deprecated Use {@link (VirtualLayout:class).bindComponentEvent} and
|
|
2167
|
+
* {@link (VirtualLayout:class).unbindComponentEvent} with virtual components
|
|
2168
|
+
*/
|
|
2169
|
+
getComponentEvent: VirtualLayout.GetComponentEventHandler | undefined;
|
|
2170
|
+
/**
|
|
2171
|
+
* @deprecated Use {@link (VirtualLayout:class).bindComponentEvent} and
|
|
2172
|
+
* {@link (VirtualLayout:class).unbindComponentEvent} with virtual components
|
|
2173
|
+
*/
|
|
2174
|
+
releaseComponentEvent: VirtualLayout.ReleaseComponentEventHandler | undefined;
|
|
2175
|
+
bindComponentEvent: VirtualLayout.BindComponentEventHandler | undefined;
|
|
2176
|
+
unbindComponentEvent: VirtualLayout.UnbindComponentEventHandler | undefined;
|
|
2177
|
+
/* Excluded from this release type: _bindComponentEventHanlderPassedInConstructor */
|
|
2178
|
+
/* Excluded from this release type: _creationTimeoutPassed */
|
|
2179
|
+
/**
|
|
2180
|
+
* @param container - A Dom HTML element. Defaults to body
|
|
2181
|
+
* @param bindComponentEventHandler - Event handler to bind components
|
|
2182
|
+
* @param bindComponentEventHandler - Event handler to unbind components
|
|
2183
|
+
* If bindComponentEventHandler is defined, then constructor will be determinate. It will always call the init()
|
|
2184
|
+
* function and the init() function will always complete. This means that the bindComponentEventHandler will be called
|
|
2185
|
+
* if constructor is for a popout window. Make sure bindComponentEventHandler is ready for events.
|
|
2186
|
+
*/
|
|
2187
|
+
constructor(container?: HTMLElement, bindComponentEventHandler?: VirtualLayout.BindComponentEventHandler, unbindComponentEventHandler?: VirtualLayout.UnbindComponentEventHandler);
|
|
2188
|
+
/** @deprecated specify layoutConfig in {@link (LayoutManager:class).loadLayout} */
|
|
2189
|
+
constructor(config: LayoutConfig, container?: HTMLElement);
|
|
2190
|
+
/* Excluded from this release type: __constructor */
|
|
2191
|
+
destroy(): void;
|
|
2192
|
+
/**
|
|
2193
|
+
* Creates the actual layout. Must be called after all initial components
|
|
2194
|
+
* are registered. Recurses through the configuration and sets up
|
|
2195
|
+
* the item tree.
|
|
2196
|
+
*
|
|
2197
|
+
* If called before the document is ready it adds itself as a listener
|
|
2198
|
+
* to the document.ready event
|
|
2199
|
+
* @deprecated LayoutConfig should not be loaded in {@link (LayoutManager:class)} constructor, but rather in a
|
|
2200
|
+
* {@link (LayoutManager:class).loadLayout} call. If LayoutConfig is not specified in {@link (LayoutManager:class)} constructor,
|
|
2201
|
+
* then init() will be automatically called internally and should not be called externally.
|
|
2202
|
+
*/
|
|
2203
|
+
init(): void;
|
|
2204
|
+
/**
|
|
2205
|
+
* Clears existing HTML and adjusts style to make window suitable to be a popout sub window
|
|
2206
|
+
* Curently is automatically called when window is a subWindow and bindComponentEvent is not passed in the constructor
|
|
2207
|
+
* If bindComponentEvent is not passed in the constructor, the application must either call this function explicitly or
|
|
2208
|
+
* (preferably) make the window suitable as a subwindow.
|
|
2209
|
+
* In the future, it is planned that this function is NOT automatically called in any circumstances. Applications will
|
|
2210
|
+
* need to determine whether a window is a Golden Layout popout window and either call this function explicitly or
|
|
2211
|
+
* hide HTML not relevant to the popout.
|
|
2212
|
+
* See apitest for an example of how HTML is hidden when popout windows are displayed
|
|
2213
|
+
*/
|
|
2214
|
+
clearHtmlAndAdjustStylesForSubWindow(): void;
|
|
2215
|
+
/**
|
|
2216
|
+
* Will add button if not popinOnClose specified in settings
|
|
2217
|
+
* @returns true if added otherwise false
|
|
2218
|
+
*/
|
|
2219
|
+
checkAddDefaultPopinButton(): boolean;
|
|
2220
|
+
/* Excluded from this release type: bindComponent */
|
|
2221
|
+
/* Excluded from this release type: unbindComponent */
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
/** @public */
|
|
2225
|
+
export declare namespace VirtualLayout {
|
|
2226
|
+
/**
|
|
2227
|
+
* @deprecated Use virtual components with {@link (VirtualLayout:class).bindComponentEvent} and
|
|
2228
|
+
* {@link (VirtualLayout:class).unbindComponentEvent} events.
|
|
2229
|
+
*/
|
|
2230
|
+
export type GetComponentEventHandler = (this: void, container: ComponentContainer, itemConfig: ResolvedComponentItemConfig) => ComponentContainer.Component;
|
|
2231
|
+
/**
|
|
2232
|
+
* @deprecated Use virtual components with {@link (VirtualLayout:class).bindComponentEvent} and
|
|
2233
|
+
* {@link (VirtualLayout:class).unbindComponentEvent} events.
|
|
2234
|
+
*/
|
|
2235
|
+
export type ReleaseComponentEventHandler = (this: void, container: ComponentContainer, component: ComponentContainer.Component) => void;
|
|
2236
|
+
export type BindComponentEventHandler = (this: void, container: ComponentContainer, itemConfig: ResolvedComponentItemConfig) => ComponentContainer.BindableComponent;
|
|
2237
|
+
export type UnbindComponentEventHandler = (this: void, container: ComponentContainer) => void;
|
|
2238
|
+
export type BeforeVirtualRectingEvent = (this: void) => void;
|
|
2239
|
+
/* Excluded from this release type: createLayoutManagerConstructorParameters */
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
/* Excluded from this release type: WidthAndHeight */
|
|
2243
|
+
|
|
2244
|
+
/* Excluded from this release type: WidthOrHeightPropertyName */
|
|
2245
|
+
|
|
2246
|
+
export { }
|