@genesislcap/foundation-layout 14.380.1 → 14.380.2-alpha-81e1f42.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.
|
@@ -474,9 +474,10 @@
|
|
|
474
474
|
"kind": "field",
|
|
475
475
|
"name": "layout",
|
|
476
476
|
"type": {
|
|
477
|
-
"text": "GoldenLayout"
|
|
477
|
+
"text": "GoldenLayout | null"
|
|
478
478
|
},
|
|
479
|
-
"privacy": "private"
|
|
479
|
+
"privacy": "private",
|
|
480
|
+
"default": "null"
|
|
480
481
|
},
|
|
481
482
|
{
|
|
482
483
|
"kind": "field",
|
|
@@ -515,6 +516,15 @@
|
|
|
515
516
|
"privacy": "private",
|
|
516
517
|
"default": "false"
|
|
517
518
|
},
|
|
519
|
+
{
|
|
520
|
+
"kind": "field",
|
|
521
|
+
"name": "reloadTimeout",
|
|
522
|
+
"type": {
|
|
523
|
+
"text": "NodeJS.Timeout | null"
|
|
524
|
+
},
|
|
525
|
+
"privacy": "private",
|
|
526
|
+
"default": "null"
|
|
527
|
+
},
|
|
518
528
|
{
|
|
519
529
|
"kind": "field",
|
|
520
530
|
"name": "registeredComponents",
|
|
@@ -524,6 +534,15 @@
|
|
|
524
534
|
"privacy": "private",
|
|
525
535
|
"default": "0"
|
|
526
536
|
},
|
|
537
|
+
{
|
|
538
|
+
"kind": "field",
|
|
539
|
+
"name": "stackCreatedHandler",
|
|
540
|
+
"type": {
|
|
541
|
+
"text": "((stack: any) => void) | null"
|
|
542
|
+
},
|
|
543
|
+
"privacy": "private",
|
|
544
|
+
"default": "null"
|
|
545
|
+
},
|
|
527
546
|
{
|
|
528
547
|
"kind": "field",
|
|
529
548
|
"name": "autoSaveKey",
|
|
@@ -30,7 +30,9 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
30
30
|
*/
|
|
31
31
|
reloadBuffer: number;
|
|
32
32
|
private reloadPending;
|
|
33
|
+
private reloadTimeout;
|
|
33
34
|
private registeredComponents;
|
|
35
|
+
private stackCreatedHandler;
|
|
34
36
|
/** @internal */
|
|
35
37
|
private uuid;
|
|
36
38
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAEZ,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAGL,gBAAgB,EAChB,aAAa,EACb,YAAY,EAOZ,eAAe,EAKf,SAAS,EAET,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;;IAChF,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAEZ,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAGL,gBAAgB,EAChB,aAAa,EACb,YAAY,EAOZ,eAAe,EAKf,SAAS,EAET,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;;IAChF,OAAO,CAAC,MAAM,CAA6B;IAC3C,gBAAgB;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,mBAAmB,CAAqC;IAEhE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;;OAQG;IACH,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IA4J5D;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAehC;;;;;;;;SAQK;IACL,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;IA4B1C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IASzB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAWpC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;CAyBhC;AAMD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,uEAK1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;2BAI3B,CAAC"}
|
|
@@ -41,6 +41,7 @@ export class FoundationLayout extends FoundationElement {
|
|
|
41
41
|
/** @internal */
|
|
42
42
|
constructor() {
|
|
43
43
|
super();
|
|
44
|
+
this.layout = null;
|
|
44
45
|
this.layoutConfig = { root: undefined };
|
|
45
46
|
this.defaultLayoutConfig = { root: undefined };
|
|
46
47
|
/** @internal */
|
|
@@ -52,7 +53,9 @@ export class FoundationLayout extends FoundationElement {
|
|
|
52
53
|
*/
|
|
53
54
|
this.reloadBuffer = DEFAULT_RELOAD_BUFFER;
|
|
54
55
|
this.reloadPending = false;
|
|
56
|
+
this.reloadTimeout = null;
|
|
55
57
|
this.registeredComponents = 0;
|
|
58
|
+
this.stackCreatedHandler = null;
|
|
56
59
|
/**
|
|
57
60
|
* Function which is used to generate the placeholder text when a layout is loaded
|
|
58
61
|
* with a missing item.
|
|
@@ -149,7 +152,12 @@ export class FoundationLayout extends FoundationElement {
|
|
|
149
152
|
}
|
|
150
153
|
/** @internal */
|
|
151
154
|
disconnectedCallback() {
|
|
152
|
-
//
|
|
155
|
+
// Clear pending reload timeout to prevent memory leak
|
|
156
|
+
if (this.reloadTimeout) {
|
|
157
|
+
clearTimeout(this.reloadTimeout);
|
|
158
|
+
this.reloadTimeout = null;
|
|
159
|
+
}
|
|
160
|
+
// Remove golden layout event listeners
|
|
153
161
|
this.shadowRoot.removeEventListener('dragStart', this.onDragStart);
|
|
154
162
|
this.shadowRoot.removeEventListener('dragStop', this.onDragStop);
|
|
155
163
|
this.shadowRoot.removeEventListener('closeButtonPre', this.onPreItemRemoved);
|
|
@@ -157,7 +165,31 @@ export class FoundationLayout extends FoundationElement {
|
|
|
157
165
|
this.shadowRoot.removeEventListener('maximised', this.onPreItemMaximised);
|
|
158
166
|
this.shadowRoot.removeEventListener('minimised', this.onPreItemMinimised);
|
|
159
167
|
// events.ts events
|
|
160
|
-
this.shadowRoot.
|
|
168
|
+
this.shadowRoot.removeEventListener(LayoutReceiveEvents.autosave, this.onAutosaveRequest);
|
|
169
|
+
// Remove Golden Layout event listeners
|
|
170
|
+
if (this.layout && this.stackCreatedHandler) {
|
|
171
|
+
this.layout.off('stackCreated', this.stackCreatedHandler);
|
|
172
|
+
this.stackCreatedHandler = null;
|
|
173
|
+
}
|
|
174
|
+
// Clean up resize event listeners from drag handles
|
|
175
|
+
if (__classPrivateFieldGet(this, _FoundationLayout__boundDragListener, "f")) {
|
|
176
|
+
this.shadowRoot.querySelectorAll('div.lm_drag_handle').forEach((h) => {
|
|
177
|
+
h.removeEventListener('click', __classPrivateFieldGet(this, _FoundationLayout__boundDragListener, "f"));
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
// Destroy Golden Layout instance to prevent memory leaks
|
|
181
|
+
if (this.layout) {
|
|
182
|
+
try {
|
|
183
|
+
// GoldenLayout may have a destroy method or we need to clear its internal state
|
|
184
|
+
if (typeof this.layout.destroy === 'function') {
|
|
185
|
+
this.layout.destroy();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
catch (e) {
|
|
189
|
+
logger.error('Error destroying GoldenLayout:', e);
|
|
190
|
+
}
|
|
191
|
+
this.layout = null;
|
|
192
|
+
}
|
|
161
193
|
}
|
|
162
194
|
/** @internal */
|
|
163
195
|
onDragStart() {
|
|
@@ -637,9 +669,14 @@ export class FoundationLayout extends FoundationElement {
|
|
|
637
669
|
requestLayoutReload() {
|
|
638
670
|
if (this.reloadPending)
|
|
639
671
|
return;
|
|
672
|
+
// Clear any existing timeout to prevent memory leak
|
|
673
|
+
if (this.reloadTimeout) {
|
|
674
|
+
clearTimeout(this.reloadTimeout);
|
|
675
|
+
}
|
|
640
676
|
this.reloadPending = true;
|
|
641
|
-
setTimeout(() => {
|
|
677
|
+
this.reloadTimeout = setTimeout(() => {
|
|
642
678
|
this.reloadPending = false;
|
|
679
|
+
this.reloadTimeout = null;
|
|
643
680
|
if (!this.hasFirstLoaded) {
|
|
644
681
|
this.hasFirstLoaded = true;
|
|
645
682
|
// Store the default layout config before attempting to load from storage
|
|
@@ -928,7 +965,8 @@ export class FoundationLayout extends FoundationElement {
|
|
|
928
965
|
* @internal
|
|
929
966
|
*/
|
|
930
967
|
setupCustomButtons() {
|
|
931
|
-
|
|
968
|
+
// Store handler reference so we can remove it later
|
|
969
|
+
this.stackCreatedHandler = (stack) => {
|
|
932
970
|
var _b;
|
|
933
971
|
const controlElem = stack.target.header.controlsContainerElement;
|
|
934
972
|
const containedElement = () => stack.target.getActiveContentItem().container.element;
|
|
@@ -939,7 +977,8 @@ export class FoundationLayout extends FoundationElement {
|
|
|
939
977
|
button.addEventListener('click', () => customButton.onClick(button, containedElement()));
|
|
940
978
|
controlElem.prepend(button);
|
|
941
979
|
});
|
|
942
|
-
}
|
|
980
|
+
};
|
|
981
|
+
this.layout.on('stackCreated', this.stackCreatedHandler);
|
|
943
982
|
}
|
|
944
983
|
/**
|
|
945
984
|
* Return an array of each contained items in the layout.
|
|
@@ -105,7 +105,9 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
105
105
|
*/
|
|
106
106
|
reloadBuffer: number;
|
|
107
107
|
private reloadPending;
|
|
108
|
+
private reloadTimeout;
|
|
108
109
|
private registeredComponents;
|
|
110
|
+
private stackCreatedHandler;
|
|
109
111
|
/** @internal */
|
|
110
112
|
private uuid;
|
|
111
113
|
/** @internal */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-layout",
|
|
3
3
|
"description": "Genesis Foundation UI App Layout",
|
|
4
|
-
"version": "14.380.
|
|
4
|
+
"version": "14.380.2-alpha-81e1f42.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-layout.d.ts",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@genesislcap/foundation-testing": "14.380.
|
|
40
|
-
"@genesislcap/genx": "14.380.
|
|
41
|
-
"@genesislcap/rollup-builder": "14.380.
|
|
42
|
-
"@genesislcap/ts-builder": "14.380.
|
|
43
|
-
"@genesislcap/uvu-playwright-builder": "14.380.
|
|
44
|
-
"@genesislcap/vite-builder": "14.380.
|
|
45
|
-
"@genesislcap/webpack-builder": "14.380.
|
|
39
|
+
"@genesislcap/foundation-testing": "14.380.2-alpha-81e1f42.0",
|
|
40
|
+
"@genesislcap/genx": "14.380.2-alpha-81e1f42.0",
|
|
41
|
+
"@genesislcap/rollup-builder": "14.380.2-alpha-81e1f42.0",
|
|
42
|
+
"@genesislcap/ts-builder": "14.380.2-alpha-81e1f42.0",
|
|
43
|
+
"@genesislcap/uvu-playwright-builder": "14.380.2-alpha-81e1f42.0",
|
|
44
|
+
"@genesislcap/vite-builder": "14.380.2-alpha-81e1f42.0",
|
|
45
|
+
"@genesislcap/webpack-builder": "14.380.2-alpha-81e1f42.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@genesis-community/golden-layout": "^2.11.0",
|
|
49
|
-
"@genesislcap/foundation-comms": "14.380.
|
|
50
|
-
"@genesislcap/foundation-logger": "14.380.
|
|
51
|
-
"@genesislcap/foundation-ui": "14.380.
|
|
52
|
-
"@genesislcap/foundation-utils": "14.380.
|
|
49
|
+
"@genesislcap/foundation-comms": "14.380.2-alpha-81e1f42.0",
|
|
50
|
+
"@genesislcap/foundation-logger": "14.380.2-alpha-81e1f42.0",
|
|
51
|
+
"@genesislcap/foundation-ui": "14.380.2-alpha-81e1f42.0",
|
|
52
|
+
"@genesislcap/foundation-utils": "14.380.2-alpha-81e1f42.0",
|
|
53
53
|
"@microsoft/fast-components": "2.30.6",
|
|
54
54
|
"@microsoft/fast-element": "1.14.0",
|
|
55
55
|
"@microsoft/fast-foundation": "2.49.6"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"customElements": "dist/custom-elements.json",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a9953e15c14f1ddaa18c533b5dfbd189775207ae"
|
|
67
67
|
}
|