@base-framework/base 3.7.74 → 3.7.76
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @typedef {import('../data/data.js').Data} Data */
|
|
1
2
|
/**
|
|
2
3
|
* Component
|
|
3
4
|
*
|
|
@@ -36,9 +37,9 @@ export class Component extends Unit {
|
|
|
36
37
|
/**
|
|
37
38
|
* This will set the data.
|
|
38
39
|
*
|
|
39
|
-
* @returns {
|
|
40
|
+
* @returns {Data|null}
|
|
40
41
|
*/
|
|
41
|
-
setData():
|
|
42
|
+
setData(): Data | null;
|
|
42
43
|
/**
|
|
43
44
|
* This will setup the component data.
|
|
44
45
|
*
|
|
@@ -60,16 +61,6 @@ export class Component extends Unit {
|
|
|
60
61
|
id: string;
|
|
61
62
|
}): void;
|
|
62
63
|
stateHelper: any;
|
|
63
|
-
/**
|
|
64
|
-
* Mark context as restored from persistence so the
|
|
65
|
-
* subsequent setupContext() call doesn't invoke the
|
|
66
|
-
* user's setContext() hook again — doing so would
|
|
67
|
-
* create a new context.data instance, leaving every
|
|
68
|
-
* still-attached watcher subscribed to the now-orphan
|
|
69
|
-
* persisted Data while writes (e.g. xhr callbacks
|
|
70
|
-
* using parent.context.data) target the new instance.
|
|
71
|
-
*/
|
|
72
|
-
_contextResumed: boolean;
|
|
73
64
|
/**
|
|
74
65
|
* This will resume the data during persistence.
|
|
75
66
|
*
|
|
@@ -82,10 +73,10 @@ export class Component extends Unit {
|
|
|
82
73
|
* that should be preserved until the component fetches updates.
|
|
83
74
|
*
|
|
84
75
|
* @protected
|
|
85
|
-
* @param {
|
|
76
|
+
* @param {Data|null} persistedData
|
|
86
77
|
* @returns {void}
|
|
87
78
|
*/
|
|
88
|
-
protected _resumeData(persistedData:
|
|
79
|
+
protected _resumeData(persistedData: Data | null): void;
|
|
89
80
|
/**
|
|
90
81
|
* This will refresh the persisted data with fresh
|
|
91
82
|
* prop-derived values from setData().
|
|
@@ -203,5 +194,6 @@ export class Component extends Unit {
|
|
|
203
194
|
*/
|
|
204
195
|
protected removeEvents(): void;
|
|
205
196
|
}
|
|
197
|
+
export type Data = import("../data/data.js").Data;
|
|
206
198
|
import { Unit } from './unit.js';
|
|
207
199
|
import { EventHelper } from './event-helper.js';
|