@genesislcap/foundation-utils 14.73.0 → 14.74.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/custom-elements.json +17 -0
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts +28 -0
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/esm/mixins/lifecycle/lifecycle.js +81 -3
- package/dist/foundation-utils.api.json +21 -3
- package/dist/foundation-utils.d.ts +29 -0
- package/docs/api/foundation-utils.lifecyclemixin.md +5 -0
- package/docs/api-report.md +8 -1
- package/package.json +2 -2
|
@@ -2193,6 +2193,23 @@
|
|
|
2193
2193
|
}
|
|
2194
2194
|
},
|
|
2195
2195
|
"readonly": true
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"kind": "method",
|
|
2199
|
+
"name": "#_blockLifecycleDueToTokenChange",
|
|
2200
|
+
"return": {
|
|
2201
|
+
"type": {
|
|
2202
|
+
"text": "boolean"
|
|
2203
|
+
}
|
|
2204
|
+
},
|
|
2205
|
+
"parameters": [
|
|
2206
|
+
{
|
|
2207
|
+
"name": "lifecycleType",
|
|
2208
|
+
"type": {
|
|
2209
|
+
"text": "Lifecycletype"
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
]
|
|
2196
2213
|
}
|
|
2197
2214
|
],
|
|
2198
2215
|
"parameters": [
|
|
@@ -11,6 +11,7 @@ export type ConstructableLifecycleHandler = Constructable<FASTElement & HTMLElem
|
|
|
11
11
|
export type FoundationLayoutContainer = {
|
|
12
12
|
dragging: boolean;
|
|
13
13
|
hasFirstLoaded: boolean;
|
|
14
|
+
lifecycleUpdateToken: string | undefined;
|
|
14
15
|
_key: 'foundation-layout';
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
@@ -29,6 +30,7 @@ export type DOMContainer = {
|
|
|
29
30
|
_key: 'dom';
|
|
30
31
|
};
|
|
31
32
|
type Container = FoundationLayoutContainer | LayoutCacheContainer | DOMContainer;
|
|
33
|
+
type Lifecycletype = 'connect' | 'disconnect' | 'reconnect';
|
|
32
34
|
/**
|
|
33
35
|
* @beta
|
|
34
36
|
* Mixin class to expose `shouldRunConnect` and `shouldRunDisconnect`
|
|
@@ -43,6 +45,31 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
43
45
|
new (...args: any[]): {
|
|
44
46
|
/** @internal **/
|
|
45
47
|
"__#1@#_container": Container;
|
|
48
|
+
/**
|
|
49
|
+
* If the token changes we suggest blocking the lifecycle methods
|
|
50
|
+
* @internal
|
|
51
|
+
**/
|
|
52
|
+
"__#1@#_latestTokenCode": string;
|
|
53
|
+
/**
|
|
54
|
+
* Track first loaded to allow us to always run the connect lifecycle on the first load
|
|
55
|
+
* @internal
|
|
56
|
+
**/
|
|
57
|
+
"__#1@#_hasFirstLoaded": boolean;
|
|
58
|
+
/**
|
|
59
|
+
* When you request to delete an item from the layout it will be removed from the DOM,
|
|
60
|
+
* but the lifecycle might be blocked due to the same mechanism that we block the other
|
|
61
|
+
* items.
|
|
62
|
+
* This would block cleanup of the item, so we need to force a disconnection after a timeout
|
|
63
|
+
* if this item hasn't reconnected within `CLEANUP_TIMEOUT_MS`.
|
|
64
|
+
* @internal
|
|
65
|
+
**/
|
|
66
|
+
"__#1@#_cleanupTimeout": NodeJS.Timeout;
|
|
67
|
+
/**
|
|
68
|
+
* Used to force lifecycle to run even if the token has changed, such as in instances where
|
|
69
|
+
* we are forcing a disconnection due to this item being remove from the layout.
|
|
70
|
+
* @internal
|
|
71
|
+
**/
|
|
72
|
+
"__#1@#_shouldForceLifecycle": boolean;
|
|
46
73
|
/**
|
|
47
74
|
* @privateRemarks
|
|
48
75
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
|
@@ -70,6 +97,7 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
70
97
|
* For now its just the same logic as shouldRunDisconnect
|
|
71
98
|
*/
|
|
72
99
|
readonly shouldRunConnect: boolean;
|
|
100
|
+
"__#1@#_blockLifecycleDueToTokenChange"(lifecycleType: Lifecycletype): boolean;
|
|
73
101
|
/**
|
|
74
102
|
* @internal
|
|
75
103
|
* Recursive function to try and find containing layout object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF,KAAK,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;AAK5D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;kBA+BF,GAAG,EAAE;QA7B1B,iBAAiB;4BACJ,SAAS;QAEtB;;;YAGI;kCACe,MAAM;QACzB;;;YAGI;iCACc,OAAO;QACzB;;;;;;;YAOI;iCACc,OAAO,OAAO;QAChC;;;;YAII;uCACoB,OAAO;QAM/B;;;;;WAKG;yBACuB,OAAO,GAAG,IAAI;QAUxC;;;;;;WAMG;qBACU,IAAI;QAMjB;;;WAGG;;QAmBH;;;;;WAKG;;+DAwB6C,aAAa,GAAG,OAAO;QA2BvE;;;;;;WAMG;4CAC0B,OAAO,GAAG,SAAS;6BA4B3B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM1B,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
2
|
+
/** @internal **/
|
|
3
|
+
const CLEANUP_TIMEOUT_MS = 10000;
|
|
2
4
|
/**
|
|
3
5
|
* @beta
|
|
4
6
|
* Mixin class to expose `shouldRunConnect` and `shouldRunDisconnect`
|
|
@@ -9,12 +11,37 @@ import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
|
9
11
|
* #_ syntax is used for a javascript private method/variable
|
|
10
12
|
* we can't use private/protected from typescript in an anonymous class like this
|
|
11
13
|
*/
|
|
12
|
-
export const LifecycleMixin = (Base) => { var _instances, __container, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
14
|
+
export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
13
15
|
constructor(...args) {
|
|
14
16
|
super(args);
|
|
15
17
|
_instances.add(this);
|
|
16
18
|
/** @internal **/
|
|
17
19
|
__container.set(this, { _key: 'dom' });
|
|
20
|
+
/**
|
|
21
|
+
* If the token changes we suggest blocking the lifecycle methods
|
|
22
|
+
* @internal
|
|
23
|
+
**/
|
|
24
|
+
__latestTokenCode.set(this, '');
|
|
25
|
+
/**
|
|
26
|
+
* Track first loaded to allow us to always run the connect lifecycle on the first load
|
|
27
|
+
* @internal
|
|
28
|
+
**/
|
|
29
|
+
__hasFirstLoaded.set(this, false);
|
|
30
|
+
/**
|
|
31
|
+
* When you request to delete an item from the layout it will be removed from the DOM,
|
|
32
|
+
* but the lifecycle might be blocked due to the same mechanism that we block the other
|
|
33
|
+
* items.
|
|
34
|
+
* This would block cleanup of the item, so we need to force a disconnection after a timeout
|
|
35
|
+
* if this item hasn't reconnected within `CLEANUP_TIMEOUT_MS`.
|
|
36
|
+
* @internal
|
|
37
|
+
**/
|
|
38
|
+
__cleanupTimeout.set(this, void 0);
|
|
39
|
+
/**
|
|
40
|
+
* Used to force lifecycle to run even if the token has changed, such as in instances where
|
|
41
|
+
* we are forcing a disconnection due to this item being remove from the layout.
|
|
42
|
+
* @internal
|
|
43
|
+
**/
|
|
44
|
+
__shouldForceLifecycle.set(this, false);
|
|
18
45
|
}
|
|
19
46
|
/**
|
|
20
47
|
* @privateRemarks
|
|
@@ -48,6 +75,9 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __tryFind
|
|
|
48
75
|
* @returns - boolean controlling whether to run all disconnectedCallback lifecycle functionality
|
|
49
76
|
*/
|
|
50
77
|
get shouldRunDisconnect() {
|
|
78
|
+
if (__classPrivateFieldGet(this, __shouldForceLifecycle, "f")) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
51
81
|
if (__classPrivateFieldGet(this, __container, "f")._key === 'dom') {
|
|
52
82
|
return true;
|
|
53
83
|
}
|
|
@@ -55,7 +85,9 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __tryFind
|
|
|
55
85
|
return false;
|
|
56
86
|
}
|
|
57
87
|
// _key === 'foundation-layout'
|
|
58
|
-
return !(__classPrivateFieldGet(this, __container, "f").dragging ||
|
|
88
|
+
return !(__classPrivateFieldGet(this, __container, "f").dragging ||
|
|
89
|
+
!__classPrivateFieldGet(this, __container, "f").hasFirstLoaded ||
|
|
90
|
+
__classPrivateFieldGet(this, _instances, "m", __blockLifecycleDueToTokenChange).call(this, 'disconnect'));
|
|
59
91
|
}
|
|
60
92
|
/**
|
|
61
93
|
* @beta
|
|
@@ -64,7 +96,24 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __tryFind
|
|
|
64
96
|
* For now its just the same logic as shouldRunDisconnect
|
|
65
97
|
*/
|
|
66
98
|
get shouldRunConnect() {
|
|
67
|
-
|
|
99
|
+
if (__classPrivateFieldGet(this, __shouldForceLifecycle, "f")) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
if (__classPrivateFieldGet(this, __container, "f")._key === 'dom') {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
if (__classPrivateFieldGet(this, __container, "f")._key === 'foundation-layout-cache') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
// _key === 'foundation-layout'
|
|
109
|
+
let connectionType = 'reconnect';
|
|
110
|
+
if (__classPrivateFieldGet(this, __hasFirstLoaded, "f") === false) {
|
|
111
|
+
__classPrivateFieldSet(this, __hasFirstLoaded, true, "f");
|
|
112
|
+
connectionType = 'connect';
|
|
113
|
+
}
|
|
114
|
+
return !(__classPrivateFieldGet(this, __container, "f").dragging ||
|
|
115
|
+
!__classPrivateFieldGet(this, __container, "f").hasFirstLoaded ||
|
|
116
|
+
__classPrivateFieldGet(this, _instances, "m", __blockLifecycleDueToTokenChange).call(this, connectionType));
|
|
68
117
|
}
|
|
69
118
|
connectedCallback() {
|
|
70
119
|
super.connectedCallback();
|
|
@@ -74,7 +123,36 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __tryFind
|
|
|
74
123
|
}
|
|
75
124
|
},
|
|
76
125
|
__container = new WeakMap(),
|
|
126
|
+
__latestTokenCode = new WeakMap(),
|
|
127
|
+
__hasFirstLoaded = new WeakMap(),
|
|
128
|
+
__cleanupTimeout = new WeakMap(),
|
|
129
|
+
__shouldForceLifecycle = new WeakMap(),
|
|
77
130
|
_instances = new WeakSet(),
|
|
131
|
+
__blockLifecycleDueToTokenChange = function __blockLifecycleDueToTokenChange(lifecycleType) {
|
|
132
|
+
var _a, _b;
|
|
133
|
+
if (__classPrivateFieldGet(this, __container, "f")._key !== 'foundation-layout') {
|
|
134
|
+
throw new Error('LifecycleMixin: should not be checking a token change if container not in the layout');
|
|
135
|
+
}
|
|
136
|
+
const tokensDifferent = __classPrivateFieldGet(this, __latestTokenCode, "f") !== __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken;
|
|
137
|
+
let result = false;
|
|
138
|
+
if (lifecycleType === 'connect') {
|
|
139
|
+
// We always want to allow a first connection in the layout
|
|
140
|
+
__classPrivateFieldSet(this, __latestTokenCode, (_a = __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken) !== null && _a !== void 0 ? _a : '', "f");
|
|
141
|
+
}
|
|
142
|
+
else if (lifecycleType === 'disconnect') {
|
|
143
|
+
result = tokensDifferent;
|
|
144
|
+
__classPrivateFieldSet(this, __cleanupTimeout, setTimeout(() => {
|
|
145
|
+
__classPrivateFieldSet(this, __shouldForceLifecycle, true, "f");
|
|
146
|
+
this.disconnectedCallback();
|
|
147
|
+
}, CLEANUP_TIMEOUT_MS), "f");
|
|
148
|
+
}
|
|
149
|
+
else if (lifecycleType === 'reconnect') {
|
|
150
|
+
result = tokensDifferent;
|
|
151
|
+
__classPrivateFieldSet(this, __latestTokenCode, (_b = __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken) !== null && _b !== void 0 ? _b : '', "f");
|
|
152
|
+
clearTimeout(__classPrivateFieldGet(this, __cleanupTimeout, "f"));
|
|
153
|
+
}
|
|
154
|
+
return result;
|
|
155
|
+
},
|
|
78
156
|
__tryFindContainingLayout = function __tryFindContainingLayout(e) {
|
|
79
157
|
/**
|
|
80
158
|
* This is a special case where the element is part of the layout cache
|
|
@@ -4483,7 +4483,16 @@
|
|
|
4483
4483
|
},
|
|
4484
4484
|
{
|
|
4485
4485
|
"kind": "Content",
|
|
4486
|
-
"text": ";\n
|
|
4486
|
+
"text": ";\n \"__#1@#_latestTokenCode\": string;\n \"__#1@#_hasFirstLoaded\": boolean;\n \"__#1@#_cleanupTimeout\": "
|
|
4487
|
+
},
|
|
4488
|
+
{
|
|
4489
|
+
"kind": "Reference",
|
|
4490
|
+
"text": "NodeJS.Timeout",
|
|
4491
|
+
"canonicalReference": "!\"\\\"timers\\\"\".__global.NodeJS.Timeout:interface"
|
|
4492
|
+
},
|
|
4493
|
+
{
|
|
4494
|
+
"kind": "Content",
|
|
4495
|
+
"text": ";\n \"__#1@#_shouldForceLifecycle\": boolean;\n cloneNode(deep?: boolean): "
|
|
4487
4496
|
},
|
|
4488
4497
|
{
|
|
4489
4498
|
"kind": "Reference",
|
|
@@ -4501,7 +4510,16 @@
|
|
|
4501
4510
|
},
|
|
4502
4511
|
{
|
|
4503
4512
|
"kind": "Content",
|
|
4504
|
-
"text": ";\n readonly shouldRunDisconnect: boolean;\n readonly shouldRunConnect: boolean;\n \"__#1@#
|
|
4513
|
+
"text": ";\n readonly shouldRunDisconnect: boolean;\n readonly shouldRunConnect: boolean;\n \"__#1@#_blockLifecycleDueToTokenChange\"(lifecycleType: "
|
|
4514
|
+
},
|
|
4515
|
+
{
|
|
4516
|
+
"kind": "Reference",
|
|
4517
|
+
"text": "Lifecycletype",
|
|
4518
|
+
"canonicalReference": "@genesislcap/foundation-utils!~Lifecycletype:type"
|
|
4519
|
+
},
|
|
4520
|
+
{
|
|
4521
|
+
"kind": "Content",
|
|
4522
|
+
"text": "): boolean;\n \"__#1@#_tryFindContainingLayout\"(e: "
|
|
4505
4523
|
},
|
|
4506
4524
|
{
|
|
4507
4525
|
"kind": "Reference",
|
|
@@ -7372,7 +7390,7 @@
|
|
|
7372
7390
|
"name": "LifecycleMixin",
|
|
7373
7391
|
"variableTypeTokenRange": {
|
|
7374
7392
|
"startIndex": 1,
|
|
7375
|
-
"endIndex":
|
|
7393
|
+
"endIndex": 650
|
|
7376
7394
|
}
|
|
7377
7395
|
},
|
|
7378
7396
|
{
|
|
@@ -374,6 +374,7 @@ export declare function formatTimestamp(timestamp: number, withTime: boolean): s
|
|
|
374
374
|
export declare type FoundationLayoutContainer = {
|
|
375
375
|
dragging: boolean;
|
|
376
376
|
hasFirstLoaded: boolean;
|
|
377
|
+
lifecycleUpdateToken: string | undefined;
|
|
377
378
|
_key: 'foundation-layout';
|
|
378
379
|
};
|
|
379
380
|
|
|
@@ -535,6 +536,31 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
535
536
|
new (...args: any[]): {
|
|
536
537
|
/** @internal **/
|
|
537
538
|
"__#1@#_container": Container;
|
|
539
|
+
/**
|
|
540
|
+
* If the token changes we suggest blocking the lifecycle methods
|
|
541
|
+
* @internal
|
|
542
|
+
**/
|
|
543
|
+
"__#1@#_latestTokenCode": string;
|
|
544
|
+
/**
|
|
545
|
+
* Track first loaded to allow us to always run the connect lifecycle on the first load
|
|
546
|
+
* @internal
|
|
547
|
+
**/
|
|
548
|
+
"__#1@#_hasFirstLoaded": boolean;
|
|
549
|
+
/**
|
|
550
|
+
* When you request to delete an item from the layout it will be removed from the DOM,
|
|
551
|
+
* but the lifecycle might be blocked due to the same mechanism that we block the other
|
|
552
|
+
* items.
|
|
553
|
+
* This would block cleanup of the item, so we need to force a disconnection after a timeout
|
|
554
|
+
* if this item hasn't reconnected within `CLEANUP_TIMEOUT_MS`.
|
|
555
|
+
* @internal
|
|
556
|
+
**/
|
|
557
|
+
"__#1@#_cleanupTimeout": NodeJS.Timeout;
|
|
558
|
+
/**
|
|
559
|
+
* Used to force lifecycle to run even if the token has changed, such as in instances where
|
|
560
|
+
* we are forcing a disconnection due to this item being remove from the layout.
|
|
561
|
+
* @internal
|
|
562
|
+
**/
|
|
563
|
+
"__#1@#_shouldForceLifecycle": boolean;
|
|
538
564
|
/**
|
|
539
565
|
* @privateRemarks
|
|
540
566
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
|
@@ -562,6 +588,7 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
562
588
|
* For now its just the same logic as shouldRunDisconnect
|
|
563
589
|
*/
|
|
564
590
|
readonly shouldRunConnect: boolean;
|
|
591
|
+
"__#1@#_blockLifecycleDueToTokenChange"(lifecycleType: Lifecycletype): boolean;
|
|
565
592
|
/**
|
|
566
593
|
* @internal
|
|
567
594
|
* Recursive function to try and find containing layout object
|
|
@@ -885,6 +912,8 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
885
912
|
};
|
|
886
913
|
} & T;
|
|
887
914
|
|
|
915
|
+
declare type Lifecycletype = 'connect' | 'disconnect' | 'reconnect';
|
|
916
|
+
|
|
888
917
|
/**
|
|
889
918
|
* Creates an observer that facilitates the subscription and publication of events.
|
|
890
919
|
* @public
|
|
@@ -15,10 +15,15 @@ Mixin class to expose `shouldRunConnect` and `shouldRunDisconnect`
|
|
|
15
15
|
LifecycleMixin: <T extends ConstructableLifecycleHandler>(Base: T) => {
|
|
16
16
|
new (...args: any[]): {
|
|
17
17
|
"__#1@#_container": Container;
|
|
18
|
+
"__#1@#_latestTokenCode": string;
|
|
19
|
+
"__#1@#_hasFirstLoaded": boolean;
|
|
20
|
+
"__#1@#_cleanupTimeout": NodeJS.Timeout;
|
|
21
|
+
"__#1@#_shouldForceLifecycle": boolean;
|
|
18
22
|
cloneNode(deep?: boolean): Node;
|
|
19
23
|
deepClone(): Node;
|
|
20
24
|
readonly shouldRunDisconnect: boolean;
|
|
21
25
|
readonly shouldRunConnect: boolean;
|
|
26
|
+
"__#1@#_blockLifecycleDueToTokenChange"(lifecycleType: Lifecycletype): boolean;
|
|
22
27
|
"__#1@#_tryFindContainingLayout"(e: Element): Container;
|
|
23
28
|
connectedCallback(): void;
|
|
24
29
|
readonly $fastController: import("@microsoft/fast-element").Controller;
|
package/docs/api-report.md
CHANGED
|
@@ -235,6 +235,7 @@ export function formatTimestamp(timestamp: number, withTime: boolean): string;
|
|
|
235
235
|
export type FoundationLayoutContainer = {
|
|
236
236
|
dragging: boolean;
|
|
237
237
|
hasFirstLoaded: boolean;
|
|
238
|
+
lifecycleUpdateToken: string | undefined;
|
|
238
239
|
_key: 'foundation-layout';
|
|
239
240
|
};
|
|
240
241
|
|
|
@@ -311,10 +312,15 @@ export const layoutCacheDocument: unique symbol;
|
|
|
311
312
|
export const LifecycleMixin: <T extends ConstructableLifecycleHandler>(Base: T) => {
|
|
312
313
|
new (...args: any[]): {
|
|
313
314
|
"__#1@#_container": Container;
|
|
315
|
+
"__#1@#_latestTokenCode": string;
|
|
316
|
+
"__#1@#_hasFirstLoaded": boolean;
|
|
317
|
+
"__#1@#_cleanupTimeout": NodeJS.Timeout;
|
|
318
|
+
"__#1@#_shouldForceLifecycle": boolean;
|
|
314
319
|
cloneNode(deep?: boolean): Node;
|
|
315
320
|
deepClone(): Node;
|
|
316
321
|
readonly shouldRunDisconnect: boolean;
|
|
317
322
|
readonly shouldRunConnect: boolean;
|
|
323
|
+
"__#1@#_blockLifecycleDueToTokenChange"(lifecycleType: Lifecycletype): boolean;
|
|
318
324
|
"__#1@#_tryFindContainingLayout"(e: Element): Container;
|
|
319
325
|
connectedCallback(): void;
|
|
320
326
|
readonly $fastController: Controller;
|
|
@@ -1112,7 +1118,8 @@ export function whenElse<TSource = any, TReturn = any>(binding: Binding<TSource,
|
|
|
1112
1118
|
//
|
|
1113
1119
|
// src/mappers/dto/serverRow.ts:20:5 - (ae-forgotten-export) The symbol "UppercaseOperation" needs to be exported by the entry point index.d.ts
|
|
1114
1120
|
// src/mappers/dto/serverRow.ts:31:5 - (ae-forgotten-export) The symbol "LowercaseOperation" needs to be exported by the entry point index.d.ts
|
|
1115
|
-
// src/mixins/lifecycle/lifecycle.ts:
|
|
1121
|
+
// src/mixins/lifecycle/lifecycle.ts:57:5 - (ae-forgotten-export) The symbol "Container" needs to be exported by the entry point index.d.ts
|
|
1122
|
+
// src/mixins/lifecycle/lifecycle.ts:147:5 - (ae-forgotten-export) The symbol "Lifecycletype" needs to be exported by the entry point index.d.ts
|
|
1116
1123
|
|
|
1117
1124
|
// (No @packageDocumentation comment for this package)
|
|
1118
1125
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-utils",
|
|
3
3
|
"description": "Genesis Foundation Utils",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.74.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"customElements": "dist/custom-elements.json",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "744f54392e6e9f73c0cddd55300925aa594020d2"
|
|
45
45
|
}
|