@aiquants/daily-report 0.32.0 → 0.34.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/CHANGELOG.md +106 -0
- package/README.md +155 -55
- package/dist/client.d.mts +111 -111
- package/dist/client.d.ts +111 -111
- package/dist/client.js +4 -4
- package/dist/client.mjs +4 -4
- package/dist/comment-adapter-7TduiLiu.d.mts +127 -0
- package/dist/comment-adapter-BLfjD6P0.d.ts +127 -0
- package/dist/index.d.mts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/server.d.mts +33 -14
- package/dist/server.d.ts +33 -14
- package/dist/server.js +4 -4
- package/dist/server.mjs +4 -4
- package/dist/{ids-stream-BR5RSj5u.d.ts → sse-schema-DVIUaiAG.d.mts} +685 -643
- package/dist/{ids-stream-DvB2h1dj.d.mts → sse-schema-DVIUaiAG.d.ts} +685 -643
- package/dist/styles/daily-report.standalone.css +1 -1
- package/package.json +5 -4
- package/dist/types-DkERw8NE.d.mts +0 -74
- package/dist/types-DkERw8NE.d.ts +0 -74
package/dist/client.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from "react";
|
|
2
2
|
import { RefObject, ReactNode, Context } from "react";
|
|
3
|
-
import { D as DailyReportItem, a as DailyReportUser, b as DailyReportDetail } from "./
|
|
3
|
+
import { D as DailyReportItem, a as DailyReportUser, b as DailyReportSseTerminalEvent, c as DailyReportSseMessage, d as DailyReportDetail } from "./sse-schema-DVIUaiAG.mjs";
|
|
4
4
|
import { VirtualScrollLocale, VirtualScrollLabels, VirtualScrollHandle } from "@aiquants/virtualscroll";
|
|
5
|
+
import { D as DailyReportActionIntent, a as DailyReportSseStreamAnchor, U as UIComment } from "./comment-adapter-7TduiLiu.mjs";
|
|
5
6
|
import { UseReopeningEventSourceResult } from "@aiquants/sse/react";
|
|
6
|
-
import { D as DailyReportSseTerminalEvent, a as DailyReportSseMessage, U as UIComment, b as DailyReportSseStreamAnchor } from "./ids-stream-DvB2h1dj.mjs";
|
|
7
7
|
import { ShouldRevalidateFunction } from "react-router";
|
|
8
8
|
import "zod";
|
|
9
9
|
type DailyReportAttachmentIndicatorProps = {
|
|
@@ -30,7 +30,7 @@ type DailyReportDetailListProps = {
|
|
|
30
30
|
scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
|
|
31
31
|
};
|
|
32
32
|
declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
|
|
33
|
-
declare const DailyReportIdsStreamStatus: () => react.JSX.Element
|
|
33
|
+
declare const DailyReportIdsStreamStatus: () => react.JSX.Element;
|
|
34
34
|
type DailyReportListProps = {
|
|
35
35
|
dailyReportItems: DailyReportItem[];
|
|
36
36
|
rowSetSize?: number;
|
|
@@ -42,7 +42,7 @@ type DailyReportListProps = {
|
|
|
42
42
|
};
|
|
43
43
|
declare const DailyReportList: (props: DailyReportListProps) => react.JSX.Element;
|
|
44
44
|
type DailyReportLocale = VirtualScrollLocale;
|
|
45
|
-
type DailyReportOperation =
|
|
45
|
+
type DailyReportOperation = Exclude<DailyReportActionIntent, "clearCache">;
|
|
46
46
|
type DailyReportLabels = VirtualScrollLabels & {
|
|
47
47
|
readonly id: string;
|
|
48
48
|
readonly businessDate: string;
|
|
@@ -277,6 +277,113 @@ declare const DailyReportConfigProvider: ({ config, children }: {
|
|
|
277
277
|
}) => react.JSX.Element;
|
|
278
278
|
declare const useDailyReportConfig: () => DailyReportClientConfig;
|
|
279
279
|
declare const resolveSourceTypeConfig: (sourceType?: string | null, sourceTypeConfigs?: Record<string, SourceTypeConfig>) => SourceTypeConfig | undefined;
|
|
280
|
+
type DailyReportIdsStreamItemReplacement = {
|
|
281
|
+
readonly previous: DailyReportItem;
|
|
282
|
+
readonly next: DailyReportItem;
|
|
283
|
+
};
|
|
284
|
+
type DailyReportIdsStreamItemsChange = {
|
|
285
|
+
readonly base: number;
|
|
286
|
+
readonly revision: number;
|
|
287
|
+
readonly appended: readonly DailyReportItem[];
|
|
288
|
+
readonly replaced: readonly DailyReportIdsStreamItemReplacement[];
|
|
289
|
+
readonly removed: readonly DailyReportItem[];
|
|
290
|
+
};
|
|
291
|
+
type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
|
|
292
|
+
type DailyReportIdsStreamState = {
|
|
293
|
+
loadedCount: number;
|
|
294
|
+
itemsRevision: number;
|
|
295
|
+
itemsChanges: readonly DailyReportIdsStreamItemsChange[];
|
|
296
|
+
totalCount: number | null;
|
|
297
|
+
phase: DailyReportIdsStreamPhase;
|
|
298
|
+
isRevalidating: boolean;
|
|
299
|
+
hasCompletedOnce: boolean;
|
|
300
|
+
completedAt: number | null;
|
|
301
|
+
error: Error | null;
|
|
302
|
+
streamAnchor: DailyReportSseStreamAnchor | null;
|
|
303
|
+
};
|
|
304
|
+
type DailyReportIdsStreamClientOptions = {
|
|
305
|
+
apiBasePath?: string;
|
|
306
|
+
fetchFn?: (input: string, init: {
|
|
307
|
+
signal: AbortSignal;
|
|
308
|
+
headers: Record<string, string>;
|
|
309
|
+
cache: RequestCache;
|
|
310
|
+
}) => Promise<Response>;
|
|
311
|
+
setTimeoutFn?: (handler: () => void, ms: number) => ReturnType<typeof setTimeout>;
|
|
312
|
+
clearTimeoutFn?: (id: ReturnType<typeof setTimeout>) => void;
|
|
313
|
+
readStallTimeoutMs?: number;
|
|
314
|
+
warn?: (...args: unknown[]) => void;
|
|
315
|
+
publishCoalesceMs?: number;
|
|
316
|
+
now?: () => number;
|
|
317
|
+
};
|
|
318
|
+
declare class DailyReportIdsStreamClient {
|
|
319
|
+
private readonly apiBasePath;
|
|
320
|
+
private readonly fetchFn;
|
|
321
|
+
private readonly setTimeoutFn;
|
|
322
|
+
private readonly clearTimeoutFn;
|
|
323
|
+
private readonly warn;
|
|
324
|
+
private readonly readStallTimeoutMs;
|
|
325
|
+
private readonly itemMap;
|
|
326
|
+
private readonly listeners;
|
|
327
|
+
private state;
|
|
328
|
+
private streamAnchorRevision;
|
|
329
|
+
private lastCursor;
|
|
330
|
+
private lastSnapshot;
|
|
331
|
+
private consecutiveFailures;
|
|
332
|
+
private started;
|
|
333
|
+
private disposed;
|
|
334
|
+
private loopGeneration;
|
|
335
|
+
private activeAbortController;
|
|
336
|
+
private activeSeenIds;
|
|
337
|
+
private readonly externalRemovalTombstones;
|
|
338
|
+
private pendingForceRefresh;
|
|
339
|
+
private wakeRetryWait;
|
|
340
|
+
private readonly handleOnline;
|
|
341
|
+
private readonly publishCoalesceMs;
|
|
342
|
+
private publishCoalesceTimer;
|
|
343
|
+
private readonly now;
|
|
344
|
+
private lastItemsPublishAt;
|
|
345
|
+
private pendingItemsChange;
|
|
346
|
+
constructor(options?: DailyReportIdsStreamClientOptions);
|
|
347
|
+
getState(): DailyReportIdsStreamState;
|
|
348
|
+
subscribe(listener: () => void): () => void;
|
|
349
|
+
start(): void;
|
|
350
|
+
retry(): void;
|
|
351
|
+
refresh(options?: {
|
|
352
|
+
forceRefresh?: boolean;
|
|
353
|
+
}): void;
|
|
354
|
+
resync(): void;
|
|
355
|
+
applyExternalUpsert(item: DailyReportItem): void;
|
|
356
|
+
applyExternalRemoval(reportHubId: number): void;
|
|
357
|
+
has(reportHubId: number): boolean;
|
|
358
|
+
readItems(): DailyReportItem[];
|
|
359
|
+
dispose(): void;
|
|
360
|
+
private runStreamLoop;
|
|
361
|
+
private pruneUnseenItems;
|
|
362
|
+
private streamOnce;
|
|
363
|
+
private readWithStallGuard;
|
|
364
|
+
private absorbChunkLine;
|
|
365
|
+
private putItem;
|
|
366
|
+
private deleteItem;
|
|
367
|
+
private absorbStreamAnchor;
|
|
368
|
+
private takePendingItems;
|
|
369
|
+
private publishItems;
|
|
370
|
+
private schedulePublishItems;
|
|
371
|
+
private cancelScheduledPublishItems;
|
|
372
|
+
private publish;
|
|
373
|
+
private buildStreamUrl;
|
|
374
|
+
private waitBeforeRetry;
|
|
375
|
+
}
|
|
376
|
+
declare const ensureDailyReportIdsStreamSession: (options: {
|
|
377
|
+
apiBasePath?: string;
|
|
378
|
+
userKey: string | null;
|
|
379
|
+
}) => void;
|
|
380
|
+
declare const bootstrapDailyReportIdsStreamSession: (options: {
|
|
381
|
+
apiBasePath?: string;
|
|
382
|
+
userKey: string | null;
|
|
383
|
+
}) => void;
|
|
384
|
+
declare const primeDailyReportIdsStreamSession: () => void;
|
|
385
|
+
declare const resyncDailyReportIdsStream: () => void;
|
|
386
|
+
declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
|
|
280
387
|
type DailyReportPageProps = {
|
|
281
388
|
user?: DailyReportUser;
|
|
282
389
|
userId?: string | null;
|
|
@@ -389,112 +496,5 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
|
|
|
389
496
|
}): Promise<TServerData>;
|
|
390
497
|
hydrate: true;
|
|
391
498
|
};
|
|
392
|
-
type DailyReportIdsStreamItemReplacement = {
|
|
393
|
-
readonly previous: DailyReportItem;
|
|
394
|
-
readonly next: DailyReportItem;
|
|
395
|
-
};
|
|
396
|
-
type DailyReportIdsStreamItemsChange = {
|
|
397
|
-
readonly base: number;
|
|
398
|
-
readonly revision: number;
|
|
399
|
-
readonly appended: readonly DailyReportItem[];
|
|
400
|
-
readonly replaced: readonly DailyReportIdsStreamItemReplacement[];
|
|
401
|
-
readonly removed: readonly DailyReportItem[];
|
|
402
|
-
};
|
|
403
|
-
type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
|
|
404
|
-
type DailyReportIdsStreamState = {
|
|
405
|
-
loadedCount: number;
|
|
406
|
-
itemsRevision: number;
|
|
407
|
-
itemsChanges: readonly DailyReportIdsStreamItemsChange[];
|
|
408
|
-
totalCount: number | null;
|
|
409
|
-
phase: DailyReportIdsStreamPhase;
|
|
410
|
-
isRevalidating: boolean;
|
|
411
|
-
hasCompletedOnce: boolean;
|
|
412
|
-
completedAt: number | null;
|
|
413
|
-
error: Error | null;
|
|
414
|
-
streamAnchor: DailyReportSseStreamAnchor | null;
|
|
415
|
-
};
|
|
416
|
-
type DailyReportIdsStreamClientOptions = {
|
|
417
|
-
apiBasePath?: string;
|
|
418
|
-
fetchFn?: (input: string, init: {
|
|
419
|
-
signal: AbortSignal;
|
|
420
|
-
headers: Record<string, string>;
|
|
421
|
-
cache: RequestCache;
|
|
422
|
-
}) => Promise<Response>;
|
|
423
|
-
setTimeoutFn?: (handler: () => void, ms: number) => ReturnType<typeof setTimeout>;
|
|
424
|
-
clearTimeoutFn?: (id: ReturnType<typeof setTimeout>) => void;
|
|
425
|
-
readStallTimeoutMs?: number;
|
|
426
|
-
warn?: (...args: unknown[]) => void;
|
|
427
|
-
publishCoalesceMs?: number;
|
|
428
|
-
now?: () => number;
|
|
429
|
-
};
|
|
430
|
-
declare class DailyReportIdsStreamClient {
|
|
431
|
-
private readonly apiBasePath;
|
|
432
|
-
private readonly fetchFn;
|
|
433
|
-
private readonly setTimeoutFn;
|
|
434
|
-
private readonly clearTimeoutFn;
|
|
435
|
-
private readonly warn;
|
|
436
|
-
private readonly readStallTimeoutMs;
|
|
437
|
-
private readonly itemMap;
|
|
438
|
-
private readonly listeners;
|
|
439
|
-
private state;
|
|
440
|
-
private streamAnchorRevision;
|
|
441
|
-
private lastCursor;
|
|
442
|
-
private lastSnapshot;
|
|
443
|
-
private consecutiveFailures;
|
|
444
|
-
private started;
|
|
445
|
-
private disposed;
|
|
446
|
-
private loopGeneration;
|
|
447
|
-
private activeAbortController;
|
|
448
|
-
private activeSeenIds;
|
|
449
|
-
private readonly externalRemovalTombstones;
|
|
450
|
-
private pendingForceRefresh;
|
|
451
|
-
private wakeRetryWait;
|
|
452
|
-
private readonly handleOnline;
|
|
453
|
-
private readonly publishCoalesceMs;
|
|
454
|
-
private publishCoalesceTimer;
|
|
455
|
-
private readonly now;
|
|
456
|
-
private lastItemsPublishAt;
|
|
457
|
-
private pendingItemsChange;
|
|
458
|
-
constructor(options?: DailyReportIdsStreamClientOptions);
|
|
459
|
-
getState(): DailyReportIdsStreamState;
|
|
460
|
-
subscribe(listener: () => void): () => void;
|
|
461
|
-
start(): void;
|
|
462
|
-
retry(): void;
|
|
463
|
-
refresh(options?: {
|
|
464
|
-
forceRefresh?: boolean;
|
|
465
|
-
}): void;
|
|
466
|
-
resync(): void;
|
|
467
|
-
applyExternalUpsert(item: DailyReportItem): void;
|
|
468
|
-
applyExternalRemoval(reportHubId: number): void;
|
|
469
|
-
has(reportHubId: number): boolean;
|
|
470
|
-
readItems(): DailyReportItem[];
|
|
471
|
-
dispose(): void;
|
|
472
|
-
private runStreamLoop;
|
|
473
|
-
private pruneUnseenItems;
|
|
474
|
-
private streamOnce;
|
|
475
|
-
private readWithStallGuard;
|
|
476
|
-
private absorbChunkLine;
|
|
477
|
-
private putItem;
|
|
478
|
-
private deleteItem;
|
|
479
|
-
private absorbStreamAnchor;
|
|
480
|
-
private takePendingItems;
|
|
481
|
-
private publishItems;
|
|
482
|
-
private schedulePublishItems;
|
|
483
|
-
private cancelScheduledPublishItems;
|
|
484
|
-
private publish;
|
|
485
|
-
private buildStreamUrl;
|
|
486
|
-
private waitBeforeRetry;
|
|
487
|
-
}
|
|
488
|
-
declare const ensureDailyReportIdsStreamSession: (options: {
|
|
489
|
-
apiBasePath?: string;
|
|
490
|
-
userKey: string | null;
|
|
491
|
-
}) => void;
|
|
492
|
-
declare const bootstrapDailyReportIdsStreamSession: (options: {
|
|
493
|
-
apiBasePath?: string;
|
|
494
|
-
userKey: string | null;
|
|
495
|
-
}) => void;
|
|
496
|
-
declare const primeDailyReportIdsStreamSession: () => void;
|
|
497
|
-
declare const resyncDailyReportIdsStream: () => void;
|
|
498
|
-
declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
|
|
499
499
|
declare const DAILY_REPORT_LAYOUT_LATTICE_PX = 4;
|
|
500
500
|
export { DAILY_REPORT_LABEL_CATALOGS, DAILY_REPORT_LABEL_KEYS, DAILY_REPORT_LAYOUT_LATTICE_PX, DailyReportActionProvider, DailyReportAttachmentIndicator, type DailyReportClientConfigDefaults, type DailyReportClientConfigInput, DailyReportConfigProvider, DailyReportDetailList, type DailyReportErrorInfo, DailyReportErrorProvider, DailyReportIdsStreamClient, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, DailyReportList, type DailyReportLocale, type DailyReportOperation, DailyReportPage, DailyReportResolvedContent, type ListScrollToIndexOptions as DailyReportRevealOptions, type DailyReportSseConnectionStatus, type ViewTestHandle as DailyReportViewTestHandle, type ViewTestReadHandle as DailyReportViewTestReadHandle, type SourceTypeConfig, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from "react";
|
|
2
2
|
import { RefObject, ReactNode, Context } from "react";
|
|
3
|
-
import { D as DailyReportItem, a as DailyReportUser, b as DailyReportDetail } from "./
|
|
3
|
+
import { D as DailyReportItem, a as DailyReportUser, b as DailyReportSseTerminalEvent, c as DailyReportSseMessage, d as DailyReportDetail } from "./sse-schema-DVIUaiAG.js";
|
|
4
4
|
import { VirtualScrollLocale, VirtualScrollLabels, VirtualScrollHandle } from "@aiquants/virtualscroll";
|
|
5
|
+
import { D as DailyReportActionIntent, a as DailyReportSseStreamAnchor, U as UIComment } from "./comment-adapter-BLfjD6P0.js";
|
|
5
6
|
import { UseReopeningEventSourceResult } from "@aiquants/sse/react";
|
|
6
|
-
import { D as DailyReportSseTerminalEvent, a as DailyReportSseMessage, U as UIComment, b as DailyReportSseStreamAnchor } from "./ids-stream-BR5RSj5u.js";
|
|
7
7
|
import { ShouldRevalidateFunction } from "react-router";
|
|
8
8
|
import "zod";
|
|
9
9
|
type DailyReportAttachmentIndicatorProps = {
|
|
@@ -30,7 +30,7 @@ type DailyReportDetailListProps = {
|
|
|
30
30
|
scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
|
|
31
31
|
};
|
|
32
32
|
declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
|
|
33
|
-
declare const DailyReportIdsStreamStatus: () => react.JSX.Element
|
|
33
|
+
declare const DailyReportIdsStreamStatus: () => react.JSX.Element;
|
|
34
34
|
type DailyReportListProps = {
|
|
35
35
|
dailyReportItems: DailyReportItem[];
|
|
36
36
|
rowSetSize?: number;
|
|
@@ -42,7 +42,7 @@ type DailyReportListProps = {
|
|
|
42
42
|
};
|
|
43
43
|
declare const DailyReportList: (props: DailyReportListProps) => react.JSX.Element;
|
|
44
44
|
type DailyReportLocale = VirtualScrollLocale;
|
|
45
|
-
type DailyReportOperation =
|
|
45
|
+
type DailyReportOperation = Exclude<DailyReportActionIntent, "clearCache">;
|
|
46
46
|
type DailyReportLabels = VirtualScrollLabels & {
|
|
47
47
|
readonly id: string;
|
|
48
48
|
readonly businessDate: string;
|
|
@@ -277,6 +277,113 @@ declare const DailyReportConfigProvider: ({ config, children }: {
|
|
|
277
277
|
}) => react.JSX.Element;
|
|
278
278
|
declare const useDailyReportConfig: () => DailyReportClientConfig;
|
|
279
279
|
declare const resolveSourceTypeConfig: (sourceType?: string | null, sourceTypeConfigs?: Record<string, SourceTypeConfig>) => SourceTypeConfig | undefined;
|
|
280
|
+
type DailyReportIdsStreamItemReplacement = {
|
|
281
|
+
readonly previous: DailyReportItem;
|
|
282
|
+
readonly next: DailyReportItem;
|
|
283
|
+
};
|
|
284
|
+
type DailyReportIdsStreamItemsChange = {
|
|
285
|
+
readonly base: number;
|
|
286
|
+
readonly revision: number;
|
|
287
|
+
readonly appended: readonly DailyReportItem[];
|
|
288
|
+
readonly replaced: readonly DailyReportIdsStreamItemReplacement[];
|
|
289
|
+
readonly removed: readonly DailyReportItem[];
|
|
290
|
+
};
|
|
291
|
+
type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
|
|
292
|
+
type DailyReportIdsStreamState = {
|
|
293
|
+
loadedCount: number;
|
|
294
|
+
itemsRevision: number;
|
|
295
|
+
itemsChanges: readonly DailyReportIdsStreamItemsChange[];
|
|
296
|
+
totalCount: number | null;
|
|
297
|
+
phase: DailyReportIdsStreamPhase;
|
|
298
|
+
isRevalidating: boolean;
|
|
299
|
+
hasCompletedOnce: boolean;
|
|
300
|
+
completedAt: number | null;
|
|
301
|
+
error: Error | null;
|
|
302
|
+
streamAnchor: DailyReportSseStreamAnchor | null;
|
|
303
|
+
};
|
|
304
|
+
type DailyReportIdsStreamClientOptions = {
|
|
305
|
+
apiBasePath?: string;
|
|
306
|
+
fetchFn?: (input: string, init: {
|
|
307
|
+
signal: AbortSignal;
|
|
308
|
+
headers: Record<string, string>;
|
|
309
|
+
cache: RequestCache;
|
|
310
|
+
}) => Promise<Response>;
|
|
311
|
+
setTimeoutFn?: (handler: () => void, ms: number) => ReturnType<typeof setTimeout>;
|
|
312
|
+
clearTimeoutFn?: (id: ReturnType<typeof setTimeout>) => void;
|
|
313
|
+
readStallTimeoutMs?: number;
|
|
314
|
+
warn?: (...args: unknown[]) => void;
|
|
315
|
+
publishCoalesceMs?: number;
|
|
316
|
+
now?: () => number;
|
|
317
|
+
};
|
|
318
|
+
declare class DailyReportIdsStreamClient {
|
|
319
|
+
private readonly apiBasePath;
|
|
320
|
+
private readonly fetchFn;
|
|
321
|
+
private readonly setTimeoutFn;
|
|
322
|
+
private readonly clearTimeoutFn;
|
|
323
|
+
private readonly warn;
|
|
324
|
+
private readonly readStallTimeoutMs;
|
|
325
|
+
private readonly itemMap;
|
|
326
|
+
private readonly listeners;
|
|
327
|
+
private state;
|
|
328
|
+
private streamAnchorRevision;
|
|
329
|
+
private lastCursor;
|
|
330
|
+
private lastSnapshot;
|
|
331
|
+
private consecutiveFailures;
|
|
332
|
+
private started;
|
|
333
|
+
private disposed;
|
|
334
|
+
private loopGeneration;
|
|
335
|
+
private activeAbortController;
|
|
336
|
+
private activeSeenIds;
|
|
337
|
+
private readonly externalRemovalTombstones;
|
|
338
|
+
private pendingForceRefresh;
|
|
339
|
+
private wakeRetryWait;
|
|
340
|
+
private readonly handleOnline;
|
|
341
|
+
private readonly publishCoalesceMs;
|
|
342
|
+
private publishCoalesceTimer;
|
|
343
|
+
private readonly now;
|
|
344
|
+
private lastItemsPublishAt;
|
|
345
|
+
private pendingItemsChange;
|
|
346
|
+
constructor(options?: DailyReportIdsStreamClientOptions);
|
|
347
|
+
getState(): DailyReportIdsStreamState;
|
|
348
|
+
subscribe(listener: () => void): () => void;
|
|
349
|
+
start(): void;
|
|
350
|
+
retry(): void;
|
|
351
|
+
refresh(options?: {
|
|
352
|
+
forceRefresh?: boolean;
|
|
353
|
+
}): void;
|
|
354
|
+
resync(): void;
|
|
355
|
+
applyExternalUpsert(item: DailyReportItem): void;
|
|
356
|
+
applyExternalRemoval(reportHubId: number): void;
|
|
357
|
+
has(reportHubId: number): boolean;
|
|
358
|
+
readItems(): DailyReportItem[];
|
|
359
|
+
dispose(): void;
|
|
360
|
+
private runStreamLoop;
|
|
361
|
+
private pruneUnseenItems;
|
|
362
|
+
private streamOnce;
|
|
363
|
+
private readWithStallGuard;
|
|
364
|
+
private absorbChunkLine;
|
|
365
|
+
private putItem;
|
|
366
|
+
private deleteItem;
|
|
367
|
+
private absorbStreamAnchor;
|
|
368
|
+
private takePendingItems;
|
|
369
|
+
private publishItems;
|
|
370
|
+
private schedulePublishItems;
|
|
371
|
+
private cancelScheduledPublishItems;
|
|
372
|
+
private publish;
|
|
373
|
+
private buildStreamUrl;
|
|
374
|
+
private waitBeforeRetry;
|
|
375
|
+
}
|
|
376
|
+
declare const ensureDailyReportIdsStreamSession: (options: {
|
|
377
|
+
apiBasePath?: string;
|
|
378
|
+
userKey: string | null;
|
|
379
|
+
}) => void;
|
|
380
|
+
declare const bootstrapDailyReportIdsStreamSession: (options: {
|
|
381
|
+
apiBasePath?: string;
|
|
382
|
+
userKey: string | null;
|
|
383
|
+
}) => void;
|
|
384
|
+
declare const primeDailyReportIdsStreamSession: () => void;
|
|
385
|
+
declare const resyncDailyReportIdsStream: () => void;
|
|
386
|
+
declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
|
|
280
387
|
type DailyReportPageProps = {
|
|
281
388
|
user?: DailyReportUser;
|
|
282
389
|
userId?: string | null;
|
|
@@ -389,112 +496,5 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
|
|
|
389
496
|
}): Promise<TServerData>;
|
|
390
497
|
hydrate: true;
|
|
391
498
|
};
|
|
392
|
-
type DailyReportIdsStreamItemReplacement = {
|
|
393
|
-
readonly previous: DailyReportItem;
|
|
394
|
-
readonly next: DailyReportItem;
|
|
395
|
-
};
|
|
396
|
-
type DailyReportIdsStreamItemsChange = {
|
|
397
|
-
readonly base: number;
|
|
398
|
-
readonly revision: number;
|
|
399
|
-
readonly appended: readonly DailyReportItem[];
|
|
400
|
-
readonly replaced: readonly DailyReportIdsStreamItemReplacement[];
|
|
401
|
-
readonly removed: readonly DailyReportItem[];
|
|
402
|
-
};
|
|
403
|
-
type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
|
|
404
|
-
type DailyReportIdsStreamState = {
|
|
405
|
-
loadedCount: number;
|
|
406
|
-
itemsRevision: number;
|
|
407
|
-
itemsChanges: readonly DailyReportIdsStreamItemsChange[];
|
|
408
|
-
totalCount: number | null;
|
|
409
|
-
phase: DailyReportIdsStreamPhase;
|
|
410
|
-
isRevalidating: boolean;
|
|
411
|
-
hasCompletedOnce: boolean;
|
|
412
|
-
completedAt: number | null;
|
|
413
|
-
error: Error | null;
|
|
414
|
-
streamAnchor: DailyReportSseStreamAnchor | null;
|
|
415
|
-
};
|
|
416
|
-
type DailyReportIdsStreamClientOptions = {
|
|
417
|
-
apiBasePath?: string;
|
|
418
|
-
fetchFn?: (input: string, init: {
|
|
419
|
-
signal: AbortSignal;
|
|
420
|
-
headers: Record<string, string>;
|
|
421
|
-
cache: RequestCache;
|
|
422
|
-
}) => Promise<Response>;
|
|
423
|
-
setTimeoutFn?: (handler: () => void, ms: number) => ReturnType<typeof setTimeout>;
|
|
424
|
-
clearTimeoutFn?: (id: ReturnType<typeof setTimeout>) => void;
|
|
425
|
-
readStallTimeoutMs?: number;
|
|
426
|
-
warn?: (...args: unknown[]) => void;
|
|
427
|
-
publishCoalesceMs?: number;
|
|
428
|
-
now?: () => number;
|
|
429
|
-
};
|
|
430
|
-
declare class DailyReportIdsStreamClient {
|
|
431
|
-
private readonly apiBasePath;
|
|
432
|
-
private readonly fetchFn;
|
|
433
|
-
private readonly setTimeoutFn;
|
|
434
|
-
private readonly clearTimeoutFn;
|
|
435
|
-
private readonly warn;
|
|
436
|
-
private readonly readStallTimeoutMs;
|
|
437
|
-
private readonly itemMap;
|
|
438
|
-
private readonly listeners;
|
|
439
|
-
private state;
|
|
440
|
-
private streamAnchorRevision;
|
|
441
|
-
private lastCursor;
|
|
442
|
-
private lastSnapshot;
|
|
443
|
-
private consecutiveFailures;
|
|
444
|
-
private started;
|
|
445
|
-
private disposed;
|
|
446
|
-
private loopGeneration;
|
|
447
|
-
private activeAbortController;
|
|
448
|
-
private activeSeenIds;
|
|
449
|
-
private readonly externalRemovalTombstones;
|
|
450
|
-
private pendingForceRefresh;
|
|
451
|
-
private wakeRetryWait;
|
|
452
|
-
private readonly handleOnline;
|
|
453
|
-
private readonly publishCoalesceMs;
|
|
454
|
-
private publishCoalesceTimer;
|
|
455
|
-
private readonly now;
|
|
456
|
-
private lastItemsPublishAt;
|
|
457
|
-
private pendingItemsChange;
|
|
458
|
-
constructor(options?: DailyReportIdsStreamClientOptions);
|
|
459
|
-
getState(): DailyReportIdsStreamState;
|
|
460
|
-
subscribe(listener: () => void): () => void;
|
|
461
|
-
start(): void;
|
|
462
|
-
retry(): void;
|
|
463
|
-
refresh(options?: {
|
|
464
|
-
forceRefresh?: boolean;
|
|
465
|
-
}): void;
|
|
466
|
-
resync(): void;
|
|
467
|
-
applyExternalUpsert(item: DailyReportItem): void;
|
|
468
|
-
applyExternalRemoval(reportHubId: number): void;
|
|
469
|
-
has(reportHubId: number): boolean;
|
|
470
|
-
readItems(): DailyReportItem[];
|
|
471
|
-
dispose(): void;
|
|
472
|
-
private runStreamLoop;
|
|
473
|
-
private pruneUnseenItems;
|
|
474
|
-
private streamOnce;
|
|
475
|
-
private readWithStallGuard;
|
|
476
|
-
private absorbChunkLine;
|
|
477
|
-
private putItem;
|
|
478
|
-
private deleteItem;
|
|
479
|
-
private absorbStreamAnchor;
|
|
480
|
-
private takePendingItems;
|
|
481
|
-
private publishItems;
|
|
482
|
-
private schedulePublishItems;
|
|
483
|
-
private cancelScheduledPublishItems;
|
|
484
|
-
private publish;
|
|
485
|
-
private buildStreamUrl;
|
|
486
|
-
private waitBeforeRetry;
|
|
487
|
-
}
|
|
488
|
-
declare const ensureDailyReportIdsStreamSession: (options: {
|
|
489
|
-
apiBasePath?: string;
|
|
490
|
-
userKey: string | null;
|
|
491
|
-
}) => void;
|
|
492
|
-
declare const bootstrapDailyReportIdsStreamSession: (options: {
|
|
493
|
-
apiBasePath?: string;
|
|
494
|
-
userKey: string | null;
|
|
495
|
-
}) => void;
|
|
496
|
-
declare const primeDailyReportIdsStreamSession: () => void;
|
|
497
|
-
declare const resyncDailyReportIdsStream: () => void;
|
|
498
|
-
declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
|
|
499
499
|
declare const DAILY_REPORT_LAYOUT_LATTICE_PX = 4;
|
|
500
500
|
export { DAILY_REPORT_LABEL_CATALOGS, DAILY_REPORT_LABEL_KEYS, DAILY_REPORT_LAYOUT_LATTICE_PX, DailyReportActionProvider, DailyReportAttachmentIndicator, type DailyReportClientConfigDefaults, type DailyReportClientConfigInput, DailyReportConfigProvider, DailyReportDetailList, type DailyReportErrorInfo, DailyReportErrorProvider, DailyReportIdsStreamClient, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, DailyReportList, type DailyReportLocale, type DailyReportOperation, DailyReportPage, DailyReportResolvedContent, type ListScrollToIndexOptions as DailyReportRevealOptions, type DailyReportSseConnectionStatus, type ViewTestHandle as DailyReportViewTestHandle, type ViewTestReadHandle as DailyReportViewTestReadHandle, type SourceTypeConfig, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
|