@katlux/providers 0.1.1-alpha.95 → 0.1.1-alpha.96
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/README.md +1 -1
- package/dist/index.cjs +3292 -2172
- package/dist/index.d.cts +581 -77
- package/dist/index.d.mts +581 -77
- package/dist/index.d.ts +581 -77
- package/dist/index.mjs +3307 -2220
- package/dist/nuxtAppCompat.cjs +10 -30
- package/dist/nuxtAppCompat.d.cts +3 -13
- package/dist/nuxtAppCompat.d.mts +3 -13
- package/dist/nuxtAppCompat.d.ts +3 -13
- package/dist/nuxtAppCompat.mjs +10 -30
- package/dist/nuxtAppCompat.server.cjs +22 -6
- package/dist/nuxtAppCompat.server.d.cts +6 -6
- package/dist/nuxtAppCompat.server.d.mts +6 -6
- package/dist/nuxtAppCompat.server.d.ts +6 -6
- package/dist/nuxtAppCompat.server.mjs +22 -6
- package/dist/shared/providers.C8C1HrDy.mjs +228 -0
- package/dist/shared/providers.CxZeMH3Y.cjs +241 -0
- package/package.json +7 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* types.ts — Framework-agnostic hydration and platform abstraction contracts.
|
|
3
|
+
*/
|
|
4
|
+
interface ISSRHydrationAdapter {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve pre-hydrated SSR state for a key. Returns null if not present.
|
|
7
|
+
*/
|
|
8
|
+
getSSRData<T>(key: string, context?: any): T | null;
|
|
9
|
+
/**
|
|
10
|
+
* Execute fetcher with SSR serialization/caching if in an SSR environment,
|
|
11
|
+
* or simply await fetcher() in standalone/client environments.
|
|
12
|
+
*/
|
|
13
|
+
fetchWithSSR<T>(key: string, fetcher: () => Promise<T>, context?: any): Promise<T | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Invalidate or clear SSR cache for a key (e.g. after mutations).
|
|
16
|
+
*/
|
|
17
|
+
clearSSRData?(key: string, context?: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Extract SSR hydration payload dictionary (for cache initialization).
|
|
20
|
+
*/
|
|
21
|
+
getSSRPayload?(context?: any): Record<string, any> | null;
|
|
22
|
+
}
|
|
23
|
+
interface IPlatformRouter {
|
|
24
|
+
getRoute(): {
|
|
25
|
+
query: Record<string, any>;
|
|
26
|
+
path?: string;
|
|
27
|
+
} | null;
|
|
28
|
+
getRouter(): any;
|
|
29
|
+
onReady?(cb: () => void): void;
|
|
30
|
+
}
|
|
2
31
|
|
|
32
|
+
type TDataProviderListener<T = any> = (provider: T) => void;
|
|
33
|
+
type TUnsubscribe = () => void;
|
|
3
34
|
declare enum EDataFilterOperator {
|
|
4
35
|
Equal = "==",
|
|
5
36
|
NotEqual = "!=",
|
|
@@ -37,8 +68,45 @@ interface IRequestOptions {
|
|
|
37
68
|
cacheKey?: string;
|
|
38
69
|
query?: Record<string, any>;
|
|
39
70
|
deduplicate?: boolean;
|
|
71
|
+
context?: any;
|
|
72
|
+
/** @deprecated Use `context` instead */
|
|
40
73
|
nuxtApp?: any;
|
|
41
74
|
disableCache?: boolean;
|
|
75
|
+
queue?: boolean;
|
|
76
|
+
queueLabel?: string;
|
|
77
|
+
label?: string;
|
|
78
|
+
tags?: string[];
|
|
79
|
+
signal?: AbortSignal;
|
|
80
|
+
}
|
|
81
|
+
/** Queue persistence backend with automatic fallback: IndexedDB → LocalStorage → Memory */
|
|
82
|
+
declare enum EQueueStorage {
|
|
83
|
+
Memory = "Memory",
|
|
84
|
+
LocalStorage = "LocalStorage",
|
|
85
|
+
IndexedDB = "IndexedDB"
|
|
86
|
+
}
|
|
87
|
+
/** Status of an item currently in the pending queue */
|
|
88
|
+
type TQueueItemStatus = 'pending' | 'flushing';
|
|
89
|
+
/** A single mutation operation waiting to be sent */
|
|
90
|
+
interface IQueuedOperation {
|
|
91
|
+
id: string;
|
|
92
|
+
url: string;
|
|
93
|
+
method: 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
94
|
+
options: IRequestOptions;
|
|
95
|
+
tags: string[];
|
|
96
|
+
label?: string;
|
|
97
|
+
createdAt: number;
|
|
98
|
+
flushAttempts: number;
|
|
99
|
+
status: TQueueItemStatus;
|
|
100
|
+
}
|
|
101
|
+
/** An operation that failed permanently and was moved to the dead-letter store */
|
|
102
|
+
interface IDeadLetterItem extends IQueuedOperation {
|
|
103
|
+
failedAt: number;
|
|
104
|
+
lastError: string;
|
|
105
|
+
httpStatus?: number;
|
|
106
|
+
}
|
|
107
|
+
/** Options for flush operations */
|
|
108
|
+
interface IFlushOptions {
|
|
109
|
+
tag?: string;
|
|
42
110
|
}
|
|
43
111
|
interface IKDatatableAction {
|
|
44
112
|
action: Function;
|
|
@@ -68,18 +136,23 @@ type TPageDataHandler = (currentPage: number, pageSize: number, filter: IDataFil
|
|
|
68
136
|
disableCache?: boolean;
|
|
69
137
|
}) => IDataResult | Promise<IDataResult>;
|
|
70
138
|
interface IDataProviderOptions {
|
|
139
|
+
idKey?: string;
|
|
71
140
|
filter?: IDataFilter;
|
|
72
141
|
sortList?: IDataSort[];
|
|
73
142
|
pageSize?: number;
|
|
74
143
|
currentPage?: number;
|
|
75
144
|
SSR?: boolean;
|
|
145
|
+
initialLoad?: boolean;
|
|
76
146
|
cacheStrategy?: ECacheStrategy;
|
|
77
147
|
cacheLifetime?: number;
|
|
78
148
|
deduplicate?: boolean;
|
|
149
|
+
context?: any;
|
|
150
|
+
/** @deprecated Use `context` instead for framework-agnostic SSR context */
|
|
79
151
|
nuxtApp?: any;
|
|
80
152
|
urlPageParam?: string;
|
|
81
153
|
refreshOnMutation?: boolean;
|
|
82
154
|
}
|
|
155
|
+
|
|
83
156
|
interface ITreeNode {
|
|
84
157
|
data: TDataRow;
|
|
85
158
|
id: string | number;
|
|
@@ -102,6 +175,19 @@ interface ITreeDataProviderOptions extends IDataProviderOptions {
|
|
|
102
175
|
expandedByDefault?: boolean;
|
|
103
176
|
paginateBy?: TreePaginationMode;
|
|
104
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Tree-specific page data handler that includes tree parameters
|
|
180
|
+
* Server handles tree building, visibility, and pagination
|
|
181
|
+
*/
|
|
182
|
+
type TTreePageDataHandler = (currentPage: number, pageSize: number, filter: IDataFilter, sortList: IDataSort[], treeParams: {
|
|
183
|
+
expandedNodes: (string | number)[] | Set<string | number>;
|
|
184
|
+
parentKey: string;
|
|
185
|
+
idKey: string;
|
|
186
|
+
paginateBy: TreePaginationMode;
|
|
187
|
+
expandedByDefault: boolean;
|
|
188
|
+
}, options?: {
|
|
189
|
+
disableCache?: boolean;
|
|
190
|
+
}) => IDataResult | Promise<IDataResult>;
|
|
105
191
|
interface KProductItemData {
|
|
106
192
|
id: string | number;
|
|
107
193
|
title: string;
|
|
@@ -118,34 +204,94 @@ interface KProductRowAction {
|
|
|
118
204
|
color?: 'primary' | 'danger' | 'success' | 'warning' | 'info' | 'light' | 'dark' | 'default';
|
|
119
205
|
}
|
|
120
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Standalone CompatRef and CompatArray
|
|
209
|
+
* Zero-dependency wrappers providing backward-compatibility for .value access
|
|
210
|
+
* and reactive callback triggers without Vue.
|
|
211
|
+
*/
|
|
212
|
+
declare const VAL_KEY: unique symbol;
|
|
213
|
+
declare const ON_CHANGE_KEY: unique symbol;
|
|
214
|
+
declare class CompatRef<T> {
|
|
215
|
+
private [VAL_KEY];
|
|
216
|
+
private [ON_CHANGE_KEY]?;
|
|
217
|
+
constructor(initial: T, onChange?: (val: T) => void);
|
|
218
|
+
get value(): T;
|
|
219
|
+
set value(newVal: T);
|
|
220
|
+
setOnChange(cb: (val: T) => void): void;
|
|
221
|
+
valueOf(): T;
|
|
222
|
+
toString(): string;
|
|
223
|
+
[Symbol.toPrimitive](hint: string): string | number | T;
|
|
224
|
+
}
|
|
225
|
+
declare class CompatArray<T> extends Array<T> {
|
|
226
|
+
private [VAL_KEY];
|
|
227
|
+
private [ON_CHANGE_KEY]?;
|
|
228
|
+
static get [Symbol.species](): ArrayConstructor;
|
|
229
|
+
constructor(items?: T[], onChange?: (items: T[]) => void);
|
|
230
|
+
get value(): T[];
|
|
231
|
+
set value(newItems: T[]);
|
|
232
|
+
[Symbol.iterator](): ArrayIterator<T>;
|
|
233
|
+
setOnChange(cb: (items: T[]) => void): void;
|
|
234
|
+
}
|
|
235
|
+
declare function makeCompatArray<T>(arr: T[]): T[] & {
|
|
236
|
+
value: T[];
|
|
237
|
+
};
|
|
238
|
+
|
|
121
239
|
declare abstract class ADataProvider {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
240
|
+
idKey: string;
|
|
241
|
+
filter: CompatRef<IDataFilter | null>;
|
|
242
|
+
sortList: CompatRef<IDataSort[]>;
|
|
243
|
+
currentPage: CompatRef<number>;
|
|
244
|
+
pageSize: CompatRef<number>;
|
|
245
|
+
pageData: CompatArray<TDataRow>;
|
|
246
|
+
rowCount: CompatRef<number>;
|
|
247
|
+
loading: CompatRef<boolean>;
|
|
248
|
+
initialLoad: CompatRef<boolean>;
|
|
249
|
+
error: CompatRef<any>;
|
|
250
|
+
SSR: CompatRef<boolean>;
|
|
251
|
+
deduplicate: CompatRef<boolean>;
|
|
252
|
+
context: any;
|
|
253
|
+
get nuxtApp(): any;
|
|
254
|
+
set nuxtApp(val: any);
|
|
255
|
+
urlPageParam: CompatRef<string>;
|
|
256
|
+
selectedRows: CompatRef<any[]>;
|
|
257
|
+
selectAll: CompatRef<boolean>;
|
|
258
|
+
private _listeners;
|
|
135
259
|
constructor(options?: IDataProviderOptions);
|
|
260
|
+
subscribe(listener: TDataProviderListener<this>): TUnsubscribe;
|
|
261
|
+
notify(): void;
|
|
262
|
+
getState(): {
|
|
263
|
+
pageData: TDataRow[];
|
|
264
|
+
rowCount: number;
|
|
265
|
+
currentPage: number;
|
|
266
|
+
pageSize: number;
|
|
267
|
+
loading: boolean;
|
|
268
|
+
initialLoad: boolean;
|
|
269
|
+
error: any;
|
|
270
|
+
filter: IDataFilter | null;
|
|
271
|
+
sortList: IDataSort[];
|
|
272
|
+
selectedRows: any[];
|
|
273
|
+
selectAll: boolean;
|
|
274
|
+
};
|
|
136
275
|
setFilter(filter: IDataFilter | null): void;
|
|
137
276
|
setSortList(sortList: IDataSort[]): void;
|
|
138
277
|
setCurrentPage(currentPage: number): void;
|
|
139
278
|
setPageSize(pageSize: number): void;
|
|
140
|
-
abstract loadPageData(
|
|
279
|
+
abstract loadPageData(options?: {
|
|
280
|
+
disableCache?: boolean;
|
|
281
|
+
signal?: AbortSignal;
|
|
282
|
+
}): void | Promise<void>;
|
|
141
283
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
142
284
|
}
|
|
143
285
|
|
|
144
286
|
declare class CFlatClientDataProvider extends ADataProvider {
|
|
145
|
-
allData:
|
|
146
|
-
filteredData:
|
|
287
|
+
allData: CompatArray<TDataRow>;
|
|
288
|
+
filteredData: CompatArray<TDataRow>;
|
|
147
289
|
constructor(options?: IDataProviderOptions);
|
|
148
290
|
setData(data: TDataRow[]): void;
|
|
291
|
+
refreshData(options?: {
|
|
292
|
+
disableCache?: boolean;
|
|
293
|
+
}): Promise<void>;
|
|
294
|
+
refresh(hardRefresh?: boolean): Promise<void>;
|
|
149
295
|
loadPageData(): Promise<void>;
|
|
150
296
|
}
|
|
151
297
|
|
|
@@ -162,9 +308,14 @@ declare abstract class ACacheProvider {
|
|
|
162
308
|
|
|
163
309
|
declare class RequestProvider {
|
|
164
310
|
cacheProvider: ACacheProvider | null;
|
|
311
|
+
cacheStrategy?: ECacheStrategy;
|
|
165
312
|
cacheLifetime: number | null;
|
|
166
313
|
deduplicate: boolean;
|
|
167
314
|
cacheKey: string;
|
|
315
|
+
/** Registry tags — set via useRequestProvider() or manually */
|
|
316
|
+
tags: string[];
|
|
317
|
+
/** If true, non-GET requests are enqueued instead of sent immediately */
|
|
318
|
+
queue: boolean;
|
|
168
319
|
private static requestQueue;
|
|
169
320
|
private static executing;
|
|
170
321
|
private static requestsInFlight;
|
|
@@ -185,11 +336,11 @@ declare class RequestProvider {
|
|
|
185
336
|
}
|
|
186
337
|
|
|
187
338
|
declare abstract class AAPIDataProvider {
|
|
188
|
-
apiUrl:
|
|
189
|
-
cacheStrategy:
|
|
190
|
-
cacheLifetime:
|
|
339
|
+
apiUrl: CompatRef<string>;
|
|
340
|
+
cacheStrategy: CompatRef<ECacheStrategy | null>;
|
|
341
|
+
cacheLifetime: CompatRef<number>;
|
|
191
342
|
requestProvider: RequestProvider;
|
|
192
|
-
refreshOnMutation:
|
|
343
|
+
refreshOnMutation: CompatRef<boolean | undefined>;
|
|
193
344
|
constructor(options?: IDataProviderOptions);
|
|
194
345
|
abstract setAPIUrl(url: string): void;
|
|
195
346
|
abstract create(item: any): Promise<void>;
|
|
@@ -198,13 +349,12 @@ declare abstract class AAPIDataProvider {
|
|
|
198
349
|
}
|
|
199
350
|
|
|
200
351
|
declare class CAPIFlatClientDataProvider extends CFlatClientDataProvider implements AAPIDataProvider {
|
|
201
|
-
apiUrl:
|
|
202
|
-
contextKey:
|
|
203
|
-
initialLoad: Ref<boolean>;
|
|
352
|
+
apiUrl: CompatRef<string>;
|
|
353
|
+
contextKey: CompatRef<string>;
|
|
204
354
|
requestProvider: RequestProvider;
|
|
205
|
-
cacheStrategy:
|
|
206
|
-
cacheLifetime:
|
|
207
|
-
refreshOnMutation:
|
|
355
|
+
cacheStrategy: CompatRef<ECacheStrategy | null>;
|
|
356
|
+
cacheLifetime: CompatRef<number>;
|
|
357
|
+
refreshOnMutation: CompatRef<boolean | undefined>;
|
|
208
358
|
constructor(options?: IDataProviderOptions);
|
|
209
359
|
setContextKey(key: string): void;
|
|
210
360
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
@@ -219,24 +369,26 @@ declare class CAPIFlatClientDataProvider extends CFlatClientDataProvider impleme
|
|
|
219
369
|
}
|
|
220
370
|
|
|
221
371
|
declare class CFlatServerDataProvider extends ADataProvider {
|
|
222
|
-
pageDataHandler:
|
|
223
|
-
contextKey:
|
|
224
|
-
|
|
372
|
+
pageDataHandler: CompatRef<TPageDataHandler>;
|
|
373
|
+
contextKey: CompatRef<string>;
|
|
374
|
+
private latestRequestId;
|
|
375
|
+
private abortController;
|
|
225
376
|
constructor(options?: IDataProviderOptions);
|
|
226
377
|
setContextKey(key: string): void;
|
|
227
378
|
setPageDataHandler(handler: TPageDataHandler): Promise<void>;
|
|
228
379
|
loadPageData(options?: {
|
|
229
380
|
disableCache?: boolean;
|
|
381
|
+
signal?: AbortSignal;
|
|
230
382
|
}): Promise<void>;
|
|
231
383
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
232
384
|
}
|
|
233
385
|
|
|
234
386
|
declare class CAPIFlatServerDataProvider extends CFlatServerDataProvider implements AAPIDataProvider {
|
|
235
|
-
apiUrl:
|
|
387
|
+
apiUrl: CompatRef<string>;
|
|
236
388
|
requestProvider: RequestProvider;
|
|
237
|
-
cacheStrategy:
|
|
238
|
-
cacheLifetime:
|
|
239
|
-
refreshOnMutation:
|
|
389
|
+
cacheStrategy: CompatRef<ECacheStrategy | null>;
|
|
390
|
+
cacheLifetime: CompatRef<number>;
|
|
391
|
+
refreshOnMutation: CompatRef<boolean | undefined>;
|
|
240
392
|
constructor(options?: IDataProviderOptions);
|
|
241
393
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
242
394
|
refreshData(options?: {
|
|
@@ -244,6 +396,8 @@ declare class CAPIFlatServerDataProvider extends CFlatServerDataProvider impleme
|
|
|
244
396
|
}): Promise<void>;
|
|
245
397
|
setAPIUrl(url: string): Promise<void>;
|
|
246
398
|
delete(items: any[]): Promise<void>;
|
|
399
|
+
create(item: any): Promise<void>;
|
|
400
|
+
update(item: any): Promise<void>;
|
|
247
401
|
}
|
|
248
402
|
|
|
249
403
|
declare class CTreeClientDataProvider extends CFlatClientDataProvider {
|
|
@@ -251,11 +405,16 @@ declare class CTreeClientDataProvider extends CFlatClientDataProvider {
|
|
|
251
405
|
idKey: string;
|
|
252
406
|
expandedByDefault: boolean;
|
|
253
407
|
paginateBy: TreePaginationMode;
|
|
254
|
-
expandedNodes:
|
|
255
|
-
private
|
|
256
|
-
private
|
|
257
|
-
private
|
|
408
|
+
expandedNodes: CompatRef<Set<string | number>>;
|
|
409
|
+
private _staticNodesCache;
|
|
410
|
+
private _nodeMapCache;
|
|
411
|
+
private _sortedNodeIdsCache;
|
|
412
|
+
private get _staticNodes();
|
|
413
|
+
private get _nodeMap();
|
|
414
|
+
private get _sortedNodeIds();
|
|
415
|
+
private invalidateStaticCache;
|
|
258
416
|
constructor(options?: ITreeDataProviderOptions);
|
|
417
|
+
setData(data: TDataRow[]): void;
|
|
259
418
|
private buildStaticNodes;
|
|
260
419
|
private computeSortedIds;
|
|
261
420
|
private updatePageData;
|
|
@@ -275,13 +434,12 @@ declare class CTreeClientDataProvider extends CFlatClientDataProvider {
|
|
|
275
434
|
}
|
|
276
435
|
|
|
277
436
|
declare class CAPITreeClientDataProvider extends CTreeClientDataProvider implements AAPIDataProvider {
|
|
278
|
-
apiUrl:
|
|
279
|
-
contextKey:
|
|
280
|
-
initialLoad: Ref<boolean>;
|
|
437
|
+
apiUrl: CompatRef<string>;
|
|
438
|
+
contextKey: CompatRef<string>;
|
|
281
439
|
requestProvider: RequestProvider;
|
|
282
|
-
cacheStrategy:
|
|
283
|
-
cacheLifetime:
|
|
284
|
-
refreshOnMutation:
|
|
440
|
+
cacheStrategy: CompatRef<ECacheStrategy | null>;
|
|
441
|
+
cacheLifetime: CompatRef<number>;
|
|
442
|
+
refreshOnMutation: CompatRef<boolean | undefined>;
|
|
285
443
|
constructor(options?: ITreeDataProviderOptions);
|
|
286
444
|
setContextKey(key: string): void;
|
|
287
445
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
@@ -295,19 +453,6 @@ declare class CAPITreeClientDataProvider extends CTreeClientDataProvider impleme
|
|
|
295
453
|
delete(items: any[]): Promise<void>;
|
|
296
454
|
}
|
|
297
455
|
|
|
298
|
-
/**
|
|
299
|
-
* Tree-specific page data handler that includes tree parameters
|
|
300
|
-
* Server handles tree building, visibility, and pagination
|
|
301
|
-
*/
|
|
302
|
-
type TTreePageDataHandler = (currentPage: number, pageSize: number, filter: IDataFilter, sortList: IDataSort[], treeParams: {
|
|
303
|
-
expandedNodes: (string | number)[];
|
|
304
|
-
parentKey: string;
|
|
305
|
-
idKey: string;
|
|
306
|
-
paginateBy: TreePaginationMode;
|
|
307
|
-
expandedByDefault: boolean;
|
|
308
|
-
}, options?: {
|
|
309
|
-
disableCache?: boolean;
|
|
310
|
-
}) => IDataResult | Promise<IDataResult>;
|
|
311
456
|
/**
|
|
312
457
|
* Server-side Tree Data Provider
|
|
313
458
|
*
|
|
@@ -322,19 +467,21 @@ declare class CTreeServerDataProvider extends ADataProvider {
|
|
|
322
467
|
idKey: string;
|
|
323
468
|
expandedByDefault: boolean;
|
|
324
469
|
paginateBy: TreePaginationMode;
|
|
325
|
-
expandedNodes:
|
|
326
|
-
pageDataHandler:
|
|
327
|
-
contextKey:
|
|
328
|
-
initialLoad: Ref<boolean>;
|
|
470
|
+
expandedNodes: CompatRef<Set<string | number>>;
|
|
471
|
+
pageDataHandler: CompatRef<TTreePageDataHandler | null>;
|
|
472
|
+
contextKey: CompatRef<string>;
|
|
329
473
|
constructor(options?: ITreeDataProviderOptions);
|
|
330
474
|
setContextKey(key: string): void;
|
|
331
475
|
setPageDataHandler(handler: TTreePageDataHandler): Promise<void>;
|
|
476
|
+
private latestRequestId;
|
|
477
|
+
private abortController;
|
|
332
478
|
/**
|
|
333
479
|
* Load page data from server
|
|
334
480
|
* Server handles tree building, visibility, and pagination
|
|
335
481
|
*/
|
|
336
482
|
loadPageData(options?: {
|
|
337
483
|
disableCache?: boolean;
|
|
484
|
+
signal?: AbortSignal;
|
|
338
485
|
}): Promise<void>;
|
|
339
486
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
340
487
|
toggleNode(nodeId: string | number): void;
|
|
@@ -353,11 +500,11 @@ declare class CTreeServerDataProvider extends ADataProvider {
|
|
|
353
500
|
* - Automatic tree parameter serialization in query
|
|
354
501
|
*/
|
|
355
502
|
declare class CAPITreeServerDataProvider extends CTreeServerDataProvider implements AAPIDataProvider {
|
|
356
|
-
apiUrl:
|
|
503
|
+
apiUrl: CompatRef<string>;
|
|
357
504
|
requestProvider: RequestProvider;
|
|
358
|
-
cacheStrategy:
|
|
359
|
-
cacheLifetime:
|
|
360
|
-
refreshOnMutation:
|
|
505
|
+
cacheStrategy: CompatRef<ECacheStrategy | null>;
|
|
506
|
+
cacheLifetime: CompatRef<number>;
|
|
507
|
+
refreshOnMutation: CompatRef<boolean | undefined>;
|
|
361
508
|
constructor(options?: ITreeDataProviderOptions);
|
|
362
509
|
refresh(hardRefresh?: boolean): Promise<void>;
|
|
363
510
|
refreshData(options?: {
|
|
@@ -365,21 +512,90 @@ declare class CAPITreeServerDataProvider extends CTreeServerDataProvider impleme
|
|
|
365
512
|
}): Promise<void>;
|
|
366
513
|
setAPIUrl(url: string): Promise<void>;
|
|
367
514
|
delete(items: any[]): Promise<void>;
|
|
515
|
+
create(item: any): Promise<void>;
|
|
516
|
+
update(item: any): Promise<void>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* KatluxIndexedDB
|
|
521
|
+
*
|
|
522
|
+
* Shared IndexedDB connection singleton for the entire @katlux/providers library.
|
|
523
|
+
* All IndexedDB consumers (CIndexedDBCache, RequestQueue) use this single connection,
|
|
524
|
+
* ensuring there is one database, one version number, and no versionchange conflicts.
|
|
525
|
+
*
|
|
526
|
+
* KatluxDB stores:
|
|
527
|
+
* cache — used by CIndexedDBCache
|
|
528
|
+
* queue — used by RequestQueue (pending operations)
|
|
529
|
+
* dead_letter — used by RequestQueue (permanently failed operations)
|
|
530
|
+
*/
|
|
531
|
+
type TKatluxStore = 'cache' | 'queue' | 'dead_letter' | (string & {});
|
|
532
|
+
declare class KatluxIndexedDB {
|
|
533
|
+
private static db;
|
|
534
|
+
private static openPromise;
|
|
535
|
+
private static currentVersion;
|
|
536
|
+
private static customStores;
|
|
537
|
+
static readonly DB_NAME = "KatluxDB";
|
|
538
|
+
static get DB_VERSION(): number;
|
|
539
|
+
/**
|
|
540
|
+
* Opens (or returns the existing) shared IDBDatabase connection.
|
|
541
|
+
* Safe to call multiple times — always resolves to the same instance.
|
|
542
|
+
*/
|
|
543
|
+
static open(): Promise<IDBDatabase>;
|
|
544
|
+
/**
|
|
545
|
+
* Dynamically ensures that an object store exists in the database.
|
|
546
|
+
* If not present, performs a database version bump and creates the store.
|
|
547
|
+
*/
|
|
548
|
+
static ensureStore(storeName: string): Promise<IDBDatabase>;
|
|
549
|
+
/**
|
|
550
|
+
* Returns a transaction-bound object store.
|
|
551
|
+
* Convenience wrapper used by CIndexedDBCache, QueueStorage adapters, etc.
|
|
552
|
+
*/
|
|
553
|
+
static getStore(storeName: TKatluxStore, mode: IDBTransactionMode): Promise<IDBObjectStore>;
|
|
554
|
+
/**
|
|
555
|
+
* For testing only — resets the singleton so tests can start fresh.
|
|
556
|
+
*/
|
|
557
|
+
static _reset(): void;
|
|
368
558
|
}
|
|
369
559
|
|
|
560
|
+
type CacheDriverLoader = () => Promise<{
|
|
561
|
+
getInstance: () => ACacheProvider;
|
|
562
|
+
}>;
|
|
370
563
|
declare class CacheProviderFactory {
|
|
371
|
-
static
|
|
564
|
+
private static instanceCache;
|
|
565
|
+
private static customDrivers;
|
|
566
|
+
private static readonly defaultLoaders;
|
|
567
|
+
/**
|
|
568
|
+
* Register a custom or pre-loaded cache provider driver
|
|
569
|
+
*/
|
|
570
|
+
static registerDriver(strategy: string, loaderOrClass: CacheDriverLoader | {
|
|
571
|
+
getInstance: () => ACacheProvider;
|
|
572
|
+
}): void;
|
|
573
|
+
/**
|
|
574
|
+
* Asynchronously load and return the cache provider singleton for a strategy.
|
|
575
|
+
*/
|
|
576
|
+
static getProvider(strategy: ECacheStrategy | string): Promise<ACacheProvider | null>;
|
|
577
|
+
/**
|
|
578
|
+
* Synchronously returns the cache provider if it was already loaded/instantiated,
|
|
579
|
+
* or undefined otherwise.
|
|
580
|
+
*/
|
|
581
|
+
static getProviderSync(strategy: ECacheStrategy | string): ACacheProvider | undefined;
|
|
582
|
+
/**
|
|
583
|
+
* Clear cached singleton instances (useful for testing or cache resets)
|
|
584
|
+
*/
|
|
585
|
+
static clearInstances(): void;
|
|
372
586
|
}
|
|
373
587
|
|
|
374
588
|
declare class CSessionCache extends ACacheProvider {
|
|
375
589
|
private static instance;
|
|
376
590
|
static getInstance(): CSessionCache;
|
|
377
|
-
|
|
591
|
+
static get storage(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
378
592
|
static getSnapshot(): Map<string, Map<string, ICacheEntry<any>>>;
|
|
593
|
+
private static cleanupTimer;
|
|
594
|
+
private static initCleanupTimer;
|
|
379
595
|
private sessionIdCache;
|
|
380
596
|
private sessionId;
|
|
381
597
|
private readonly SESSION_ID_KEY;
|
|
382
|
-
|
|
598
|
+
constructor();
|
|
383
599
|
/**
|
|
384
600
|
* Generate a UUID v4 sessionId
|
|
385
601
|
*/
|
|
@@ -401,11 +617,15 @@ declare class CCookieCache extends ACacheProvider {
|
|
|
401
617
|
private static instance;
|
|
402
618
|
static getInstance(): CCookieCache;
|
|
403
619
|
type: string;
|
|
404
|
-
|
|
620
|
+
constructor();
|
|
621
|
+
private getCookieKey;
|
|
622
|
+
private parseKeyFromCookieName;
|
|
623
|
+
private isClient;
|
|
405
624
|
getKeyList(nuxtApp?: any): Promise<Array<string>>;
|
|
406
625
|
get<T>(key: string, nuxtApp?: any): Promise<T | null>;
|
|
407
626
|
set<T>(key: string, data: T, lifetime: number, nuxtApp?: any): Promise<void>;
|
|
408
627
|
remove(key: string, nuxtApp?: any): Promise<void>;
|
|
628
|
+
removeByPrefix(prefix: string, nuxtApp?: any): Promise<void>;
|
|
409
629
|
getRemainingTime(key: string, nuxtApp?: any): Promise<number | null>;
|
|
410
630
|
cleanupExpired(): Promise<void>;
|
|
411
631
|
}
|
|
@@ -428,14 +648,8 @@ declare class CLocalStorageCache extends ACacheProvider {
|
|
|
428
648
|
declare class CIndexedDBCache extends ACacheProvider {
|
|
429
649
|
private static instance;
|
|
430
650
|
static getInstance(): CIndexedDBCache;
|
|
431
|
-
private dbName;
|
|
432
|
-
private storeName;
|
|
433
|
-
private version;
|
|
434
|
-
private dbPromise;
|
|
435
|
-
setStore(storeName?: string): void;
|
|
436
651
|
private constructor();
|
|
437
652
|
private _hydrateFromPayload;
|
|
438
|
-
private openDB;
|
|
439
653
|
private getStore;
|
|
440
654
|
getKeyList(nuxtApp?: any): Promise<Array<string>>;
|
|
441
655
|
get<T>(key: string, nuxtApp?: any): Promise<T | null>;
|
|
@@ -478,5 +692,295 @@ declare class CApplicationCache extends ACacheProvider {
|
|
|
478
692
|
cleanupExpired(): Promise<void>;
|
|
479
693
|
}
|
|
480
694
|
|
|
481
|
-
|
|
482
|
-
|
|
695
|
+
interface IRegistryEntry {
|
|
696
|
+
provider: RequestProvider;
|
|
697
|
+
tags: string[];
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* RequestProviderRegistry
|
|
701
|
+
*
|
|
702
|
+
* Static singleton registry that maps RequestProvider instances to string tags.
|
|
703
|
+
* When a mutation completes on any tagged provider, the registry automatically
|
|
704
|
+
* calls refresh(true) on all GET-capable providers sharing any of those tags.
|
|
705
|
+
*
|
|
706
|
+
* Framework-agnostic — no Vue imports. Works in any JS environment.
|
|
707
|
+
*
|
|
708
|
+
* Usage:
|
|
709
|
+
* // Register (or use the useRequestProvider() Vue composable for auto-lifecycle)
|
|
710
|
+
* RequestProviderRegistry.register(myProvider, ['invoices', 'sales'])
|
|
711
|
+
*
|
|
712
|
+
* // Unregister manually (or automatically via useRequestProvider onUnmounted)
|
|
713
|
+
* RequestProviderRegistry.unregister(myProvider)
|
|
714
|
+
*
|
|
715
|
+
* // Manual targeted refresh
|
|
716
|
+
* await RequestProviderRegistry.refreshByTag('invoices', true)
|
|
717
|
+
*
|
|
718
|
+
* // Called internally by RequestProvider after a successful non-GET request
|
|
719
|
+
* await RequestProviderRegistry.notifyMutation(['invoices'])
|
|
720
|
+
*/
|
|
721
|
+
declare class RequestProviderRegistry {
|
|
722
|
+
private static entries;
|
|
723
|
+
/**
|
|
724
|
+
* Register a provider with one or more tags.
|
|
725
|
+
* If the provider is already registered, its tags are updated.
|
|
726
|
+
*/
|
|
727
|
+
static register(provider: RequestProvider, tags: string[]): void;
|
|
728
|
+
/**
|
|
729
|
+
* Unregister a provider from the registry.
|
|
730
|
+
* After this, the provider will no longer receive auto-refresh signals.
|
|
731
|
+
*/
|
|
732
|
+
static unregister(provider: RequestProvider): void;
|
|
733
|
+
/**
|
|
734
|
+
* Manually refresh all providers matching a specific tag.
|
|
735
|
+
*/
|
|
736
|
+
static refreshByTag(tag: string, hardRefresh?: boolean): Promise<void>;
|
|
737
|
+
/**
|
|
738
|
+
* Called internally by RequestProvider (after non-GET success) and by
|
|
739
|
+
* RequestQueue (after flush with at least one success).
|
|
740
|
+
*
|
|
741
|
+
* Finds all registered providers sharing any of the succeeded tags and
|
|
742
|
+
* calls refresh(true) once per unique provider (deduplication built in).
|
|
743
|
+
*/
|
|
744
|
+
static notifyMutation(succeededTags: string[]): Promise<void>;
|
|
745
|
+
/**
|
|
746
|
+
* Returns a copy of all registry entries.
|
|
747
|
+
* Useful for debugging and testing.
|
|
748
|
+
*/
|
|
749
|
+
static getEntries(): IRegistryEntry[];
|
|
750
|
+
/**
|
|
751
|
+
* Clears the entire registry.
|
|
752
|
+
* Use on app teardown (e.g., logout) or in tests.
|
|
753
|
+
*/
|
|
754
|
+
static clear(): void;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* RequestQueue
|
|
759
|
+
*
|
|
760
|
+
* Static class that manages the offline mutation queue and dead-letter store.
|
|
761
|
+
* All state is reactive (CompatRef / CompatArray) so UI components and standalone code can bind directly.
|
|
762
|
+
*
|
|
763
|
+
* Design rules:
|
|
764
|
+
* - Stop-on-first-failure: flush halts when any item fails
|
|
765
|
+
* - No internal retry: the queue is the retry mechanism (items persist until flushed)
|
|
766
|
+
* - Partial refresh: registry refresh fires for succeeded tags only
|
|
767
|
+
* - Dead-letter is final: Katlux never auto-retries — app decides via retryOne() or discard()
|
|
768
|
+
*
|
|
769
|
+
* Usage:
|
|
770
|
+
* RequestQueue.setStorageBackend(EQueueStorage.IndexedDB)
|
|
771
|
+
* await RequestQueue.init() // call once at app startup
|
|
772
|
+
*
|
|
773
|
+
* // Hooks (set in app setup, not in components)
|
|
774
|
+
* RequestQueue.onDeadLetter((item, err) => toast.error(`Failed: ${item.label}`))
|
|
775
|
+
* RequestQueue.onFlushComplete((tags) => console.log('Synced tags:', tags))
|
|
776
|
+
* RequestQueue.onNetworkError((item) => toast.warn('Offline — will retry when back online'))
|
|
777
|
+
*
|
|
778
|
+
* // Flush when back online
|
|
779
|
+
* window.addEventListener('online', () => RequestQueue.flushAll())
|
|
780
|
+
*/
|
|
781
|
+
declare class RequestQueue {
|
|
782
|
+
static queue: CompatArray<IQueuedOperation>;
|
|
783
|
+
static deadLetterQueue: CompatArray<IDeadLetterItem>;
|
|
784
|
+
static isFlushing: CompatRef<boolean>;
|
|
785
|
+
private static adapter;
|
|
786
|
+
private static initialized;
|
|
787
|
+
private static _onDeadLetter;
|
|
788
|
+
private static _onFlushComplete;
|
|
789
|
+
private static _onNetworkError;
|
|
790
|
+
/**
|
|
791
|
+
* Load persisted queue from storage into reactive state.
|
|
792
|
+
* Call once at app startup, before any flush or enqueue operations.
|
|
793
|
+
*/
|
|
794
|
+
static init(): Promise<void>;
|
|
795
|
+
/**
|
|
796
|
+
* Set the storage backend. Call before init().
|
|
797
|
+
* Defaults to IndexedDB with fallback to LocalStorage → Memory.
|
|
798
|
+
*/
|
|
799
|
+
static setStorageBackend(backend: EQueueStorage): void;
|
|
800
|
+
static onDeadLetter(cb: (item: IDeadLetterItem, error: Error) => void): void;
|
|
801
|
+
static onFlushComplete(cb: (succeededTags: string[]) => void): void;
|
|
802
|
+
static onNetworkError(cb: (item: IQueuedOperation) => void): void;
|
|
803
|
+
/**
|
|
804
|
+
* Add an operation to the pending queue and persist it.
|
|
805
|
+
* Called internally by RequestProvider when queue: true.
|
|
806
|
+
* Returns the stable ID of the queued item.
|
|
807
|
+
*/
|
|
808
|
+
static enqueue(operation: Omit<IQueuedOperation, 'id' | 'createdAt' | 'flushAttempts' | 'status'>): Promise<string>;
|
|
809
|
+
static getQueue(tag?: string): IQueuedOperation[];
|
|
810
|
+
static getDeadLetterQueue(tag?: string): IDeadLetterItem[];
|
|
811
|
+
/**
|
|
812
|
+
* Flush queued items in FIFO order.
|
|
813
|
+
* Stops on first failure. Refreshes registry for succeeded tags only.
|
|
814
|
+
*/
|
|
815
|
+
static flushAll(options?: IFlushOptions): Promise<void>;
|
|
816
|
+
/**
|
|
817
|
+
* Flush a specific pending item by ID, independent of queue position.
|
|
818
|
+
* On success: triggers registry refresh for its own tags.
|
|
819
|
+
* On failure: moves to dead-letter independently.
|
|
820
|
+
*/
|
|
821
|
+
static flushOne(id: string): Promise<void>;
|
|
822
|
+
/**
|
|
823
|
+
* Move a dead-letter item back to the FRONT of the pending queue for retry.
|
|
824
|
+
* App should call flushAll() afterwards.
|
|
825
|
+
*/
|
|
826
|
+
static retryOne(id: string): Promise<void>;
|
|
827
|
+
/**
|
|
828
|
+
* Permanently remove an item from either the pending queue or dead-letter store.
|
|
829
|
+
*/
|
|
830
|
+
static discard(id: string): Promise<void>;
|
|
831
|
+
/**
|
|
832
|
+
* Reorder the pending queue by providing an ordered array of IDs.
|
|
833
|
+
* Fully permissive — causal ordering is the app's responsibility.
|
|
834
|
+
*/
|
|
835
|
+
static reorder(ids: string[]): void;
|
|
836
|
+
private static executeRequest;
|
|
837
|
+
private static moveToDeadLetter;
|
|
838
|
+
private static persistQueue;
|
|
839
|
+
private static persistDeadLetter;
|
|
840
|
+
/** For testing only */
|
|
841
|
+
static _reset(): void;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
interface IQueueStorageAdapter {
|
|
845
|
+
loadQueue(): Promise<IQueuedOperation[]>;
|
|
846
|
+
saveQueue(items: IQueuedOperation[]): Promise<void>;
|
|
847
|
+
loadDeadLetter(): Promise<IDeadLetterItem[]>;
|
|
848
|
+
saveDeadLetter(items: IDeadLetterItem[]): Promise<void>;
|
|
849
|
+
}
|
|
850
|
+
declare class QueueStorageFactory {
|
|
851
|
+
private static indexedDBAdapter;
|
|
852
|
+
private static localStorageAdapter;
|
|
853
|
+
private static memoryAdapter;
|
|
854
|
+
/**
|
|
855
|
+
* Returns an adapter for the requested backend.
|
|
856
|
+
* Falls back automatically if the requested backend is unavailable:
|
|
857
|
+
* IndexedDB → LocalStorage → Memory
|
|
858
|
+
*/
|
|
859
|
+
static getAdapter(backend: EQueueStorage): IQueueStorageAdapter;
|
|
860
|
+
static _reset(): void;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
declare const compareIn: (rowValue: any, filterValue: any) => boolean;
|
|
864
|
+
declare const compareEqual: (rowValue: any, filterValue: any) => boolean;
|
|
865
|
+
declare const compareValues: (rowValue: any, filterValue: any) => number;
|
|
866
|
+
declare const compareAnd: (row: TDataRow, nested: any) => boolean;
|
|
867
|
+
declare const compareOr: (row: TDataRow, nested: any) => boolean;
|
|
868
|
+
declare const applyOperator: (operator: string, rowValue: any, filterValue: any) => boolean;
|
|
869
|
+
declare const evaluateFilter: (filter: IDataFilter, row: TDataRow) => boolean;
|
|
870
|
+
declare const filterTreeData: (nodes: any[], filter: IDataFilter, options: {
|
|
871
|
+
idKey: string;
|
|
872
|
+
parentKey: string;
|
|
873
|
+
}) => {
|
|
874
|
+
visibleNodes: any[];
|
|
875
|
+
expandedNodes: Set<string | number>;
|
|
876
|
+
};
|
|
877
|
+
declare const filterData: (data: any[], filter: IDataFilter, options?: {
|
|
878
|
+
treeOptions?: {
|
|
879
|
+
idKey: string;
|
|
880
|
+
parentKey: string;
|
|
881
|
+
};
|
|
882
|
+
}) => {
|
|
883
|
+
results: any[];
|
|
884
|
+
expandedNodes?: Set<string | number>;
|
|
885
|
+
};
|
|
886
|
+
declare const useFilterLogic: () => {
|
|
887
|
+
evaluateFilter: (filter: IDataFilter, row: TDataRow) => boolean;
|
|
888
|
+
filterTreeData: (nodes: any[], filter: IDataFilter, options: {
|
|
889
|
+
idKey: string;
|
|
890
|
+
parentKey: string;
|
|
891
|
+
}) => {
|
|
892
|
+
visibleNodes: any[];
|
|
893
|
+
expandedNodes: Set<string | number>;
|
|
894
|
+
};
|
|
895
|
+
filterData: (data: any[], filter: IDataFilter, options?: {
|
|
896
|
+
treeOptions?: {
|
|
897
|
+
idKey: string;
|
|
898
|
+
parentKey: string;
|
|
899
|
+
};
|
|
900
|
+
}) => {
|
|
901
|
+
results: any[];
|
|
902
|
+
expandedNodes?: Set<string | number>;
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
declare const sortData: (sortList: IDataSort[], rows: TDataRow[]) => TDataRow[];
|
|
907
|
+
declare const useSortLogic: () => {
|
|
908
|
+
sortData: (sortList: IDataSort[], rows: TDataRow[]) => TDataRow[];
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Universal debounce utility
|
|
913
|
+
*/
|
|
914
|
+
declare const useDebounce: <T extends (...args: any[]) => any>(callback: T, delay: number) => ((...args: Parameters<T>) => void);
|
|
915
|
+
declare const debounce: <T extends (...args: any[]) => any>(callback: T, delay: number) => ((...args: Parameters<T>) => void);
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* defaultAdapter.ts — Framework-agnostic default implementation of ISSRHydrationAdapter.
|
|
919
|
+
* Pure Vanilla JS / React / Node.js with zero framework dependencies.
|
|
920
|
+
*/
|
|
921
|
+
|
|
922
|
+
declare class DefaultHydrationAdapter implements ISSRHydrationAdapter {
|
|
923
|
+
getSSRData<T>(key: string, context?: any): T | null;
|
|
924
|
+
fetchWithSSR<T>(key: string, fetcher: () => Promise<T>, context?: any): Promise<T | null>;
|
|
925
|
+
clearSSRData(key: string, context?: any): void;
|
|
926
|
+
getSSRPayload(context?: any): Record<string, any> | null;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* nuxtAdapter.ts — Nuxt 3 implementation of ISSRHydrationAdapter.
|
|
931
|
+
* Bridges to Nuxt 3's useNuxtData, useAsyncData, and useNuxtApp when running in Nuxt.
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
declare class NuxtHydrationAdapter implements ISSRHydrationAdapter {
|
|
935
|
+
private fallback;
|
|
936
|
+
getSSRData<T>(key: string, context?: any): T | null;
|
|
937
|
+
fetchWithSSR<T>(key: string, fetcher: () => Promise<T>, context?: any): Promise<T | null>;
|
|
938
|
+
clearSSRData(key: string, context?: any): void;
|
|
939
|
+
getSSRPayload(context?: any): Record<string, any> | null;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* index.ts — Framework-agnostic hydration and platform bridge.
|
|
944
|
+
* Provides unified, safe methods for SSR hydration, routing, and lifecycle hooks.
|
|
945
|
+
*/
|
|
946
|
+
|
|
947
|
+
declare function getHydrationAdapter(): ISSRHydrationAdapter;
|
|
948
|
+
declare function setHydrationAdapter(adapter: ISSRHydrationAdapter): void;
|
|
949
|
+
/**
|
|
950
|
+
* Retrieve SSR state for a key. Returns null if not found.
|
|
951
|
+
*/
|
|
952
|
+
declare function getSSRData<T>(key: string, context?: any): T | null;
|
|
953
|
+
/**
|
|
954
|
+
* Execute fetcher with SSR caching/serialization or fallback directly.
|
|
955
|
+
*/
|
|
956
|
+
declare function fetchWithSSR<T>(key: string, fetcher: () => Promise<T>, context?: any): Promise<T | null>;
|
|
957
|
+
/**
|
|
958
|
+
* Clear SSR data for a key.
|
|
959
|
+
*/
|
|
960
|
+
declare function clearSSRData(key: string, context?: any): void;
|
|
961
|
+
/**
|
|
962
|
+
* Extract SSR payload dictionary for hydration of memory/storage caches.
|
|
963
|
+
*/
|
|
964
|
+
declare function getSSRPayload(context?: any): Record<string, any> | null;
|
|
965
|
+
/**
|
|
966
|
+
* Safe platform app accessor.
|
|
967
|
+
*/
|
|
968
|
+
declare function getPlatformApp(): any;
|
|
969
|
+
/**
|
|
970
|
+
* Safe route accessor with browser URLSearchParams fallback for React/Vanilla.
|
|
971
|
+
*/
|
|
972
|
+
declare function getAppRoute(): {
|
|
973
|
+
query: Record<string, any>;
|
|
974
|
+
path?: string;
|
|
975
|
+
} | null;
|
|
976
|
+
/**
|
|
977
|
+
* Safe router accessor with window.history fallback for React/Vanilla.
|
|
978
|
+
*/
|
|
979
|
+
declare function getAppRouter(): any;
|
|
980
|
+
/**
|
|
981
|
+
* Register a callback when platform hydration is ready or DOMContentLoaded.
|
|
982
|
+
*/
|
|
983
|
+
declare function onPlatformReady(cb: () => void): void;
|
|
984
|
+
|
|
985
|
+
export { AAPIDataProvider, ADataProvider, CAPIFlatClientDataProvider, CAPIFlatServerDataProvider, CAPITreeClientDataProvider, CAPITreeServerDataProvider, CApplicationCache, CCookieCache, CFlatClientDataProvider, CFlatServerDataProvider, CIndexedDBCache, CLocalStorageCache, CMemoryCache, CSessionCache, CTreeClientDataProvider, CTreeServerDataProvider, CacheProviderFactory, CompatArray, CompatRef, DefaultHydrationAdapter, ECacheStrategy, EDataFilterOperator, EQueueStorage, KatluxIndexedDB, NuxtHydrationAdapter, QueueStorageFactory, RequestProvider, RequestProviderRegistry, RequestQueue, applyOperator, clearSSRData, compareAnd, compareEqual, compareIn, compareOr, compareValues, debounce, evaluateFilter, fetchWithSSR, filterData, filterTreeData, getAppRoute, getAppRouter, getHydrationAdapter, getPlatformApp, getSSRData, getSSRPayload, makeCompatArray, onPlatformReady, setHydrationAdapter, sortData, useDebounce, useFilterLogic, useSortLogic };
|
|
986
|
+
export type { CacheDriverLoader, ICacheEntry, IDataFilter, IDataProviderOptions, IDataResult, IDataSort, IDeadLetterItem, IFlushOptions, IKDatatableAction, IPlatformRouter, IQueueStorageAdapter, IQueuedOperation, IRequestOptions, ISSRHydrationAdapter, ITreeDataProviderOptions, ITreeNode, ITreeNodeStatic, KProductItemData, KProductRowAction, TDataProviderListener, TDataRow, TKatluxStore, TPageDataHandler, TQueueItemStatus, TTreePageDataHandler, TUnsubscribe, TreePaginationMode };
|