@base-framework/base 3.6.5 → 3.6.7
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.
|
@@ -119,6 +119,13 @@ export class Component extends Unit {
|
|
|
119
119
|
* @returns {void}
|
|
120
120
|
*/
|
|
121
121
|
protected removeStates(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Sets a callback to be called when the component's data is flushed.
|
|
124
|
+
*
|
|
125
|
+
* @param {function} callBack
|
|
126
|
+
* @return {void}
|
|
127
|
+
*/
|
|
128
|
+
onFlush(callBack: Function): void;
|
|
122
129
|
/**
|
|
123
130
|
* This will set the event helper.
|
|
124
131
|
*
|
|
@@ -70,6 +70,13 @@ export class BasicData {
|
|
|
70
70
|
_dataNumber: number;
|
|
71
71
|
_id: string;
|
|
72
72
|
_dataId: string;
|
|
73
|
+
/**
|
|
74
|
+
* This will setup a flush callback.
|
|
75
|
+
*
|
|
76
|
+
* @param {function} callBack
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
79
|
+
onFlush(callBack: Function): void;
|
|
73
80
|
/**
|
|
74
81
|
* This will get the data id.
|
|
75
82
|
*
|
|
@@ -51,6 +51,18 @@ export class DataPubSub {
|
|
|
51
51
|
* @type {boolean}
|
|
52
52
|
*/
|
|
53
53
|
debugMode: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Promises waiting for flush completion
|
|
56
|
+
* @type {Array<Function>}
|
|
57
|
+
* @protected
|
|
58
|
+
*/
|
|
59
|
+
protected flushCompleteResolvers: Array<Function>;
|
|
60
|
+
/**
|
|
61
|
+
* Callbacks to execute after next flush
|
|
62
|
+
* @type {Array<Function>}
|
|
63
|
+
* @protected
|
|
64
|
+
*/
|
|
65
|
+
protected flushCallbacks: Array<Function>;
|
|
54
66
|
/**
|
|
55
67
|
* This will get a subscriber array.
|
|
56
68
|
*
|
|
@@ -116,6 +128,29 @@ export class DataPubSub {
|
|
|
116
128
|
* @returns {void}
|
|
117
129
|
*/
|
|
118
130
|
flush(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Resolve all pending flush completion promises and execute callbacks.
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
* @returns {void}
|
|
136
|
+
*/
|
|
137
|
+
private _resolveFlushComplete;
|
|
138
|
+
/**
|
|
139
|
+
* Returns a promise that resolves when the next flush cycle completes.
|
|
140
|
+
* Useful for waiting until batched DOM updates are applied.
|
|
141
|
+
*
|
|
142
|
+
* @returns {Promise<void>}
|
|
143
|
+
*/
|
|
144
|
+
nextFlush(): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Register a callback to execute after the next flush cycle completes.
|
|
147
|
+
* Callback is automatically removed after execution (one-time use).
|
|
148
|
+
* Useful for waiting until batched DOM updates are applied.
|
|
149
|
+
*
|
|
150
|
+
* @param {Function} callback - Function to execute after next flush
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
153
|
+
onFlush(callback: Function): void;
|
|
119
154
|
/**
|
|
120
155
|
* Flush queued updates synchronously.
|
|
121
156
|
* Use as escape hatch when immediate updates are critical.
|