@deephaven/golden-layout 0.19.2-beta.5 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LayoutManager.d.ts +313 -0
- package/dist/LayoutManager.d.ts.map +1 -0
- package/dist/LayoutManager.js +468 -450
- package/dist/LayoutManager.js.map +1 -1
- package/dist/base.d.ts +16 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +6 -6
- package/dist/base.js.map +1 -1
- package/dist/config/Config.d.ts +146 -0
- package/dist/config/Config.d.ts.map +1 -0
- package/dist/config/{defaultConfig.js → Config.js} +6 -6
- package/dist/config/Config.js.map +1 -0
- package/dist/config/ItemConfig.d.ts +66 -0
- package/dist/config/ItemConfig.d.ts.map +1 -0
- package/dist/config/ItemConfig.js +14 -0
- package/dist/config/ItemConfig.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -6
- package/dist/config/index.js.map +1 -1
- package/dist/container/ItemContainer.d.ts +91 -0
- package/dist/container/ItemContainer.d.ts.map +1 -0
- package/dist/container/ItemContainer.js +110 -85
- package/dist/container/ItemContainer.js.map +1 -1
- package/dist/container/index.d.ts +3 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +2 -4
- package/dist/container/index.js.map +1 -1
- package/dist/controls/BrowserPopout.d.ts +83 -0
- package/dist/controls/BrowserPopout.d.ts.map +1 -0
- package/dist/controls/BrowserPopout.js +135 -101
- package/dist/controls/BrowserPopout.js.map +1 -1
- package/dist/controls/DragProxy.d.ts +67 -0
- package/dist/controls/DragProxy.d.ts.map +1 -0
- package/dist/controls/DragProxy.js +135 -110
- package/dist/controls/DragProxy.js.map +1 -1
- package/dist/controls/DragSource.d.ts +30 -0
- package/dist/controls/DragSource.d.ts.map +1 -0
- package/dist/controls/DragSource.js +37 -29
- package/dist/controls/DragSource.js.map +1 -1
- package/dist/controls/DragSourceFromEvent.d.ts +30 -0
- package/dist/controls/DragSourceFromEvent.d.ts.map +1 -0
- package/dist/controls/DragSourceFromEvent.js +49 -36
- package/dist/controls/DragSourceFromEvent.js.map +1 -1
- package/dist/controls/DropTargetIndicator.d.ts +14 -0
- package/dist/controls/DropTargetIndicator.d.ts.map +1 -0
- package/dist/controls/DropTargetIndicator.js +18 -14
- package/dist/controls/DropTargetIndicator.js.map +1 -1
- package/dist/controls/Header.d.ts +145 -0
- package/dist/controls/Header.d.ts.map +1 -0
- package/dist/controls/Header.js +414 -271
- package/dist/controls/Header.js.map +1 -1
- package/dist/controls/HeaderButton.d.ts +9 -0
- package/dist/controls/HeaderButton.d.ts.map +1 -0
- package/dist/controls/HeaderButton.js +19 -13
- package/dist/controls/HeaderButton.js.map +1 -1
- package/dist/controls/Splitter.d.ts +12 -0
- package/dist/controls/Splitter.d.ts.map +1 -0
- package/dist/controls/Splitter.js +36 -20
- package/dist/controls/Splitter.js.map +1 -1
- package/dist/controls/Tab.d.ts +91 -0
- package/dist/controls/Tab.d.ts.map +1 -0
- package/dist/controls/Tab.js +131 -119
- package/dist/controls/Tab.js.map +1 -1
- package/dist/controls/TransitionIndicator.d.ts +25 -0
- package/dist/controls/TransitionIndicator.d.ts.map +1 -0
- package/dist/controls/TransitionIndicator.js +53 -39
- package/dist/controls/TransitionIndicator.js.map +1 -1
- package/dist/controls/index.d.ts +11 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +10 -22
- package/dist/controls/index.js.map +1 -1
- package/dist/errors/ConfigurationError.d.ts +6 -0
- package/dist/errors/ConfigurationError.d.ts.map +1 -0
- package/dist/errors/ConfigurationError.js +15 -8
- package/dist/errors/ConfigurationError.js.map +1 -1
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +1 -4
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/items/AbstractContentItem.d.ts +233 -0
- package/dist/items/AbstractContentItem.d.ts.map +1 -0
- package/dist/items/AbstractContentItem.js +284 -242
- package/dist/items/AbstractContentItem.js.map +1 -1
- package/dist/items/Component.d.ts +30 -0
- package/dist/items/Component.d.ts.map +1 -0
- package/dist/items/Component.js +61 -42
- package/dist/items/Component.js.map +1 -1
- package/dist/items/Root.d.ts +18 -0
- package/dist/items/Root.d.ts.map +1 -0
- package/dist/items/Root.js +68 -38
- package/dist/items/Root.js.map +1 -1
- package/dist/items/RowOrColumn.d.ts +157 -0
- package/dist/items/RowOrColumn.d.ts.map +1 -0
- package/dist/items/RowOrColumn.js +219 -187
- package/dist/items/RowOrColumn.js.map +1 -1
- package/dist/items/Stack.d.ts +108 -0
- package/dist/items/Stack.d.ts.map +1 -0
- package/dist/items/Stack.js +218 -151
- package/dist/items/Stack.js.map +1 -1
- package/dist/items/index.d.ts +8 -0
- package/dist/items/index.d.ts.map +1 -0
- package/dist/items/index.js +7 -12
- package/dist/items/index.js.map +1 -1
- package/dist/utils/BubblingEvent.d.ts +8 -0
- package/dist/utils/BubblingEvent.d.ts.map +1 -0
- package/dist/utils/BubblingEvent.js +18 -9
- package/dist/utils/BubblingEvent.js.map +1 -1
- package/dist/utils/ConfigMinifier.d.ts +21 -0
- package/dist/utils/ConfigMinifier.d.ts.map +1 -0
- package/dist/utils/ConfigMinifier.js +121 -121
- package/dist/utils/ConfigMinifier.js.map +1 -1
- package/dist/utils/DragListener.d.ts +34 -0
- package/dist/utils/DragListener.d.ts.map +1 -0
- package/dist/utils/DragListener.js +103 -70
- package/dist/utils/DragListener.js.map +1 -1
- package/dist/utils/EventEmitter.d.ts +59 -0
- package/dist/utils/EventEmitter.d.ts.map +1 -0
- package/dist/utils/EventEmitter.js +64 -70
- package/dist/utils/EventEmitter.js.map +1 -1
- package/dist/utils/EventHub.d.ts +55 -0
- package/dist/utils/EventHub.d.ts.map +1 -0
- package/dist/utils/EventHub.js +83 -105
- package/dist/utils/EventHub.js.map +1 -1
- package/dist/utils/ReactComponentHandler.d.ts +54 -0
- package/dist/utils/ReactComponentHandler.d.ts.map +1 -0
- package/dist/utils/ReactComponentHandler.js +58 -56
- package/dist/utils/ReactComponentHandler.js.map +1 -1
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/utils.d.ts +25 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +21 -145
- package/dist/utils/utils.js.map +1 -1
- package/package.json +9 -5
- package/dist/config/ItemDefaultConfig.js +0 -8
- package/dist/config/ItemDefaultConfig.js.map +0 -1
- package/dist/config/defaultConfig.js.map +0 -1
package/dist/controls/index.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
BrowserPopout,
|
|
13
|
-
DragProxy,
|
|
14
|
-
DragSource,
|
|
15
|
-
DragSourceFromEvent,
|
|
16
|
-
DropTargetIndicator,
|
|
17
|
-
Header,
|
|
18
|
-
HeaderButton,
|
|
19
|
-
Splitter,
|
|
20
|
-
Tab,
|
|
21
|
-
TransitionIndicator
|
|
22
|
-
};
|
|
1
|
+
export { default as BrowserPopout } from "./BrowserPopout.js";
|
|
2
|
+
export { default as DragProxy } from "./DragProxy.js";
|
|
3
|
+
export { default as DragSource } from "./DragSource.js";
|
|
4
|
+
export { default as DragSourceFromEvent } from "./DragSourceFromEvent.js";
|
|
5
|
+
export { default as DropTargetIndicator } from "./DropTargetIndicator.js";
|
|
6
|
+
export { default as Header } from "./Header.js";
|
|
7
|
+
export { default as HeaderButton } from "./HeaderButton.js";
|
|
8
|
+
export { default as Splitter } from "./Splitter.js";
|
|
9
|
+
export { default as Tab } from "./Tab.js";
|
|
10
|
+
export { default as TransitionIndicator } from "./TransitionIndicator.js";
|
|
23
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BrowserPopout","DragProxy","DragSource","DragSourceFromEvent","DropTargetIndicator","Header","HeaderButton","Splitter","Tab","TransitionIndicator"],"sources":["../../src/controls/index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","BrowserPopout","DragProxy","DragSource","DragSourceFromEvent","DropTargetIndicator","Header","HeaderButton","Splitter","Tab","TransitionIndicator"],"sources":["../../src/controls/index.ts"],"sourcesContent":["export { default as BrowserPopout } from './BrowserPopout';\nexport { default as DragProxy } from './DragProxy';\nexport { default as DragSource } from './DragSource';\nexport { default as DragSourceFromEvent } from './DragSourceFromEvent';\nexport { default as DropTargetIndicator } from './DropTargetIndicator';\nexport { default as Header } from './Header';\nexport { default as HeaderButton } from './HeaderButton';\nexport { default as Splitter } from './Splitter';\nexport { default as Tab } from './Tab';\nexport { default as TransitionIndicator } from './TransitionIndicator';\n"],"mappings":"SAASA,OAAO,IAAIC,a;SACXD,OAAO,IAAIE,S;SACXF,OAAO,IAAIG,U;SACXH,OAAO,IAAII,mB;SACXJ,OAAO,IAAIK,mB;SACXL,OAAO,IAAIM,M;SACXN,OAAO,IAAIO,Y;SACXP,OAAO,IAAIQ,Q;SACXR,OAAO,IAAIS,G;SACXT,OAAO,IAAIU,mB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationError.d.ts","sourceRoot":"","sources":["../../src/errors/ConfigurationError.ts"],"names":[],"mappings":"AAAA,cAAM,kBAAmB,SAAQ,KAAK;IACpC,IAAI,EAAE,OAAO,CAAC;gBAEF,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAO5C;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
class ConfigurationError extends Error {
|
|
4
|
+
constructor(message, node) {
|
|
5
|
+
super();
|
|
6
|
+
|
|
7
|
+
_defineProperty(this, "node", void 0);
|
|
8
|
+
|
|
9
|
+
this.name = 'Configuration Error';
|
|
10
|
+
this.message = message;
|
|
11
|
+
this.node = node;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
export default ConfigurationError;
|
|
10
17
|
//# sourceMappingURL=ConfigurationError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationError.js","names":["ConfigurationError","
|
|
1
|
+
{"version":3,"file":"ConfigurationError.js","names":["ConfigurationError","Error","constructor","message","node","name"],"sources":["../../src/errors/ConfigurationError.ts"],"sourcesContent":["class ConfigurationError extends Error {\n node: unknown;\n\n constructor(message: string, node?: unknown) {\n super();\n\n this.name = 'Configuration Error';\n this.message = message;\n this.node = node;\n }\n}\n\nexport default ConfigurationError;\n"],"mappings":";;AAAA,MAAMA,kBAAN,SAAiCC,KAAjC,CAAuC;EAGrCC,WAAW,CAACC,OAAD,EAAkBC,IAAlB,EAAkC;IAC3C;;IAD2C;;IAG3C,KAAKC,IAAL,GAAY,qBAAZ;IACA,KAAKF,OAAL,GAAeA,OAAf;IACA,KAAKC,IAAL,GAAYA,IAAZ;EACD;;AAToC;;AAYvC,eAAeJ,kBAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/errors/index.js
CHANGED
package/dist/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ConfigurationError"],"sources":["../../src/errors/index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","ConfigurationError"],"sources":["../../src/errors/index.ts"],"sourcesContent":["export { default as ConfigurationError } from './ConfigurationError';\n"],"mappings":"SAASA,OAAO,IAAIC,kB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import LayoutManager from './LayoutManager';
|
|
2
|
+
export default LayoutManager;
|
|
3
|
+
export * from './config';
|
|
4
|
+
export * from './container';
|
|
5
|
+
export * from './controls';
|
|
6
|
+
export * from './errors';
|
|
7
|
+
export * from './items';
|
|
8
|
+
export * from './utils';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,eAAe,aAAa,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import LayoutManager from
|
|
1
|
+
import LayoutManager from "./LayoutManager.js";
|
|
2
2
|
export default LayoutManager;
|
|
3
|
+
export * from "./config/index.js";
|
|
4
|
+
export * from "./container/index.js";
|
|
5
|
+
export * from "./controls/index.js";
|
|
6
|
+
export * from "./errors/index.js";
|
|
7
|
+
export * from "./items/index.js";
|
|
8
|
+
export * from "./utils/index.js";
|
|
3
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LayoutManager"],"sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["LayoutManager"],"sources":["../src/index.ts"],"sourcesContent":["import LayoutManager from './LayoutManager';\n\nexport default LayoutManager;\nexport * from './config';\nexport * from './container';\nexport * from './controls';\nexport * from './errors';\nexport * from './items';\nexport * from './utils';\n"],"mappings":"OAAOA,a;AAEP,eAAeA,aAAf"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { BubblingEvent, EventEmitter } from '../utils';
|
|
2
|
+
import type { ItemConfig, ItemConfigType } from '../config';
|
|
3
|
+
import type LayoutManager from '../LayoutManager';
|
|
4
|
+
import type Tab from '../controls/Tab';
|
|
5
|
+
import type Stack from './Stack';
|
|
6
|
+
import type Component from './Component';
|
|
7
|
+
import type Root from './Root';
|
|
8
|
+
export declare function isStack(item: AbstractContentItem): item is Stack;
|
|
9
|
+
export declare function isComponent(item: AbstractContentItem): item is Component;
|
|
10
|
+
export declare function isRoot(item: AbstractContentItem): item is Root;
|
|
11
|
+
export declare type ItemArea<C = AbstractContentItem> = {
|
|
12
|
+
x1: number;
|
|
13
|
+
x2: number;
|
|
14
|
+
y1: number;
|
|
15
|
+
y2: number;
|
|
16
|
+
surface: number;
|
|
17
|
+
side: 'left' | 'right' | 'top' | 'bottom' | '';
|
|
18
|
+
contentItem: C;
|
|
19
|
+
};
|
|
20
|
+
declare type AbstractItemConfig = ItemConfig | {
|
|
21
|
+
type: ItemConfig['type'];
|
|
22
|
+
content: ItemConfigType[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* This is the baseclass that all content items inherit from.
|
|
26
|
+
* Most methods provide a subset of what the sub-classes do.
|
|
27
|
+
*
|
|
28
|
+
* It also provides a number of functions for tree traversal
|
|
29
|
+
*
|
|
30
|
+
* @param {lm.LayoutManager} layoutManager
|
|
31
|
+
* @param {item node configuration} config
|
|
32
|
+
* @param {lm.item} parent
|
|
33
|
+
*
|
|
34
|
+
* @event stateChanged
|
|
35
|
+
* @event beforeItemDestroyed
|
|
36
|
+
* @event itemDestroyed
|
|
37
|
+
* @event itemCreated
|
|
38
|
+
* @event componentCreated
|
|
39
|
+
* @event rowCreated
|
|
40
|
+
* @event columnCreated
|
|
41
|
+
* @event stackCreated
|
|
42
|
+
*
|
|
43
|
+
* @constructor
|
|
44
|
+
*/
|
|
45
|
+
export default abstract class AbstractContentItem extends EventEmitter {
|
|
46
|
+
config: ItemConfig;
|
|
47
|
+
type: string;
|
|
48
|
+
contentItems: AbstractContentItem[];
|
|
49
|
+
parent: AbstractContentItem | null;
|
|
50
|
+
layoutManager: LayoutManager;
|
|
51
|
+
element: JQuery<HTMLElement>;
|
|
52
|
+
childElementContainer?: JQuery<HTMLElement>;
|
|
53
|
+
componentName?: string;
|
|
54
|
+
isInitialised: boolean;
|
|
55
|
+
isMaximised: boolean;
|
|
56
|
+
isRoot: boolean;
|
|
57
|
+
isRow: boolean;
|
|
58
|
+
isColumn: boolean;
|
|
59
|
+
isStack: boolean;
|
|
60
|
+
isComponent: boolean;
|
|
61
|
+
tab?: Tab;
|
|
62
|
+
private _pendingEventPropagations;
|
|
63
|
+
private _throttledEvents;
|
|
64
|
+
constructor(layoutManager: LayoutManager, config: AbstractItemConfig, parent: AbstractContentItem | null, element: JQuery<HTMLElement>);
|
|
65
|
+
/**
|
|
66
|
+
* Set the size of the component and its children, called recursively
|
|
67
|
+
*
|
|
68
|
+
* @abstract
|
|
69
|
+
*/
|
|
70
|
+
abstract setSize(width?: number, height?: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Calls a method recursively downwards on the tree
|
|
73
|
+
*
|
|
74
|
+
* @param functionName the name of the function to be called
|
|
75
|
+
* @param functionArguments optional arguments that are passed to every function
|
|
76
|
+
* @param bottomUp Call methods from bottom to top, defaults to false
|
|
77
|
+
* @param skipSelf Don't invoke the method on the class that calls it, defaults to false
|
|
78
|
+
*/
|
|
79
|
+
callDownwards<N extends 'setSize' | '_$destroy' | '_$init' | '_$show'>(functionName: N, functionArguments?: Parameters<AbstractContentItem[N]>, bottomUp?: boolean, skipSelf?: boolean): void;
|
|
80
|
+
/**
|
|
81
|
+
* Removes a child node (and its children) from the tree
|
|
82
|
+
*
|
|
83
|
+
* @param contentItem
|
|
84
|
+
*/
|
|
85
|
+
removeChild(contentItem: AbstractContentItem, keepChild?: boolean): void;
|
|
86
|
+
/**
|
|
87
|
+
* Sets up the tree structure for the newly added child
|
|
88
|
+
* The responsibility for the actual DOM manipulations lies
|
|
89
|
+
* with the concrete item
|
|
90
|
+
*
|
|
91
|
+
* @param contentItem
|
|
92
|
+
* @param index If omitted item will be appended
|
|
93
|
+
*/
|
|
94
|
+
addChild(contentItem: AbstractContentItem | ItemConfigType | {
|
|
95
|
+
type: ItemConfig['type'];
|
|
96
|
+
}, index?: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* Replaces oldChild with newChild. This used to use jQuery.replaceWith... which for
|
|
99
|
+
* some reason removes all event listeners, so isn't really an option.
|
|
100
|
+
*
|
|
101
|
+
* @param oldChild
|
|
102
|
+
* @param newChild
|
|
103
|
+
*/
|
|
104
|
+
replaceChild(oldChild: AbstractContentItem, newChild: AbstractContentItem, _$destroyOldChild?: boolean): void;
|
|
105
|
+
/**
|
|
106
|
+
* Convenience method.
|
|
107
|
+
* Shorthand for this.parent.removeChild( this )
|
|
108
|
+
*/
|
|
109
|
+
remove(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Removes the component from the layout and creates a new
|
|
112
|
+
* browser window with the component and its children inside
|
|
113
|
+
*/
|
|
114
|
+
popout(): import("..").BrowserPopout | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Maximises the Item or minimises it if it is already maximised
|
|
117
|
+
*/
|
|
118
|
+
toggleMaximise(e?: Event): void;
|
|
119
|
+
/**
|
|
120
|
+
* Selects the item if it is not already selected
|
|
121
|
+
*/
|
|
122
|
+
select(): void;
|
|
123
|
+
/**
|
|
124
|
+
* De-selects the item if it is selected
|
|
125
|
+
*/
|
|
126
|
+
deselect(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set this component's title
|
|
129
|
+
* @param title
|
|
130
|
+
*/
|
|
131
|
+
setTitle(title: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Checks whether a provided id is present
|
|
134
|
+
* @param id
|
|
135
|
+
* @returns isPresent
|
|
136
|
+
*/
|
|
137
|
+
hasId(id: string): boolean | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Adds an id. Adds it as a string if the component doesn't
|
|
140
|
+
* have an id yet or creates/uses an array
|
|
141
|
+
* @param id
|
|
142
|
+
*/
|
|
143
|
+
addId(id: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* Removes an existing id. Throws an error
|
|
146
|
+
* if the id is not present
|
|
147
|
+
* @param id
|
|
148
|
+
*/
|
|
149
|
+
removeId(id: string): void;
|
|
150
|
+
/****************************************
|
|
151
|
+
* SELECTOR
|
|
152
|
+
****************************************/
|
|
153
|
+
getItemsByFilter(filter: (item: AbstractContentItem) => boolean): AbstractContentItem[];
|
|
154
|
+
getItemsById(id: string): AbstractContentItem[];
|
|
155
|
+
getItemsByType(type: string): AbstractContentItem[];
|
|
156
|
+
getComponentsByName(componentName: string): unknown[];
|
|
157
|
+
/****************************************
|
|
158
|
+
* PACKAGE PRIVATE
|
|
159
|
+
****************************************/
|
|
160
|
+
_$getItemsByProperty(key: keyof AbstractContentItem, value: string): AbstractContentItem[];
|
|
161
|
+
_$setParent(parent: AbstractContentItem | null): void;
|
|
162
|
+
_$highlightDropZone(x: number, y: number, area: ItemArea): void;
|
|
163
|
+
_$onDrop(contentItem: AbstractContentItem, area: ItemArea): void;
|
|
164
|
+
_$hide(): void;
|
|
165
|
+
_$show(): void;
|
|
166
|
+
_callOnActiveComponents(methodName: 'hide' | 'show'): void;
|
|
167
|
+
/**
|
|
168
|
+
* Destroys this item ands its children
|
|
169
|
+
*/
|
|
170
|
+
_$destroy(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Returns the area the component currently occupies in the format
|
|
173
|
+
*
|
|
174
|
+
* {
|
|
175
|
+
* x1: int
|
|
176
|
+
* x2: int
|
|
177
|
+
* y1: int
|
|
178
|
+
* y2: int
|
|
179
|
+
* contentItem: contentItem
|
|
180
|
+
* }
|
|
181
|
+
*/
|
|
182
|
+
_$getArea(element?: JQuery<HTMLElement>): ItemArea<this> | null;
|
|
183
|
+
/**
|
|
184
|
+
* The tree of content items is created in two steps: First all content items are instantiated,
|
|
185
|
+
* then init is called recursively from top to bottem. This is the basic init function,
|
|
186
|
+
* it can be used, extended or overwritten by the content items
|
|
187
|
+
*
|
|
188
|
+
* Its behaviour depends on the content item
|
|
189
|
+
*/
|
|
190
|
+
_$init(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Emit an event that bubbles up the item tree.
|
|
193
|
+
*
|
|
194
|
+
* @param name The name of the event
|
|
195
|
+
*/
|
|
196
|
+
emitBubblingEvent(name: string): void;
|
|
197
|
+
/**
|
|
198
|
+
* Private method, creates all content items for this node at initialisation time
|
|
199
|
+
* PLEASE NOTE, please see addChild for adding contentItems add runtime
|
|
200
|
+
* @param {configuration item node} config
|
|
201
|
+
*/
|
|
202
|
+
_createContentItems(config: AbstractItemConfig): void;
|
|
203
|
+
/**
|
|
204
|
+
* Extends an item configuration node with default settings
|
|
205
|
+
* @param config
|
|
206
|
+
* @returns extended config
|
|
207
|
+
*/
|
|
208
|
+
_extendItemNode(config: AbstractItemConfig): AbstractItemConfig;
|
|
209
|
+
/**
|
|
210
|
+
* Called for every event on the item tree. Decides whether the event is a bubbling
|
|
211
|
+
* event and propagates it to its parent
|
|
212
|
+
*
|
|
213
|
+
* @param name the name of the event
|
|
214
|
+
* @param event
|
|
215
|
+
*/
|
|
216
|
+
_propagateEvent(name: string, event: BubblingEvent): void;
|
|
217
|
+
/**
|
|
218
|
+
* All raw events bubble up to the root element. Some events that
|
|
219
|
+
* are propagated to - and emitted by - the layoutManager however are
|
|
220
|
+
* only string-based, batched and sanitized to make them more usable
|
|
221
|
+
*
|
|
222
|
+
* @param name the name of the event
|
|
223
|
+
*/
|
|
224
|
+
_scheduleEventPropagationToLayoutManager(name: string, event: BubblingEvent): void;
|
|
225
|
+
/**
|
|
226
|
+
* Callback for events scheduled by _scheduleEventPropagationToLayoutManager
|
|
227
|
+
*
|
|
228
|
+
* @param name the name of the event
|
|
229
|
+
*/
|
|
230
|
+
_propagateEventToLayoutManager(name: string, event: BubblingEvent): void;
|
|
231
|
+
}
|
|
232
|
+
export {};
|
|
233
|
+
//# sourceMappingURL=AbstractContentItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractContentItem.d.ts","sourceRoot":"","sources":["../../src/items/AbstractContentItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,wBAAgB,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,IAAI,KAAK,CAEhE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,IAAI,SAAS,CAExE;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,IAAI,IAAI,CAE9D;AAED,oBAAY,QAAQ,CAAC,CAAC,GAAG,mBAAmB,IAAI;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IACh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