@aiquants/daily-report 0.30.0 → 0.31.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 +53 -0
- package/README.md +65 -32
- package/dist/client.d.mts +26 -3
- package/dist/client.d.ts +26 -3
- package/dist/client.js +4 -4
- package/dist/client.mjs +4 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/server.js +4 -4
- package/dist/server.mjs +4 -4
- package/dist/styles/daily-report.standalone.css +1 -1
- package/package.json +5 -5
package/dist/client.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ type DailyReportDetailListScrollRestore = {
|
|
|
23
23
|
};
|
|
24
24
|
type DailyReportDetailListProps = {
|
|
25
25
|
dailyReportItems: DailyReportItem[];
|
|
26
|
+
rowSetSize?: number;
|
|
26
27
|
userId?: string | null;
|
|
27
28
|
selectedItemId?: number | null;
|
|
28
29
|
onSelectItem?: (id: number | null) => void;
|
|
@@ -32,6 +33,7 @@ declare const DailyReportDetailList: (props: DailyReportDetailListProps) => reac
|
|
|
32
33
|
declare const DailyReportIdsStreamStatus: () => react.JSX.Element | null;
|
|
33
34
|
type DailyReportListProps = {
|
|
34
35
|
dailyReportItems: DailyReportItem[];
|
|
36
|
+
rowSetSize?: number;
|
|
35
37
|
autoMarkRead?: boolean;
|
|
36
38
|
selectedReportHubId: number | null;
|
|
37
39
|
onSelectItem: (reportHubId: number | null) => void;
|
|
@@ -129,6 +131,7 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
129
131
|
readonly isStarred: boolean;
|
|
130
132
|
}) => string;
|
|
131
133
|
readonly listRowPosition: (position: number, total: number) => string;
|
|
134
|
+
readonly listRowPositionInUnknownTotal: (position: number) => string;
|
|
132
135
|
};
|
|
133
136
|
type DailyReportLabelOverrides = {
|
|
134
137
|
readonly [K in keyof DailyReportLabels]?: DailyReportLabels[K];
|
|
@@ -228,7 +231,8 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
228
231
|
"interviewerWithAffiliation",
|
|
229
232
|
"operationFailed",
|
|
230
233
|
"rowState",
|
|
231
|
-
"listRowPosition"
|
|
234
|
+
"listRowPosition",
|
|
235
|
+
"listRowPositionInUnknownTotal"
|
|
232
236
|
];
|
|
233
237
|
declare const DAILY_REPORT_LABEL_CATALOGS: Readonly<Record<DailyReportLocale, DailyReportLabels>>;
|
|
234
238
|
declare const resolveDailyReportLabels: (locale: DailyReportLocale | undefined, overrides: DailyReportLabelOverrides | undefined) => DailyReportLabels;
|
|
@@ -334,10 +338,9 @@ declare global {
|
|
|
334
338
|
var __DailyReportActionContext: Context<DailyReportActionContextType | null> | undefined;
|
|
335
339
|
}
|
|
336
340
|
declare const useDailyReportActionContext: () => DailyReportActionContextType;
|
|
337
|
-
declare const DailyReportActionProvider: ({ children, user,
|
|
341
|
+
declare const DailyReportActionProvider: ({ children, user, userId }: {
|
|
338
342
|
children: ReactNode;
|
|
339
343
|
user?: DailyReportUser;
|
|
340
|
-
initialItems?: DailyReportItem[];
|
|
341
344
|
userId?: string | null;
|
|
342
345
|
}) => react.JSX.Element;
|
|
343
346
|
declare const DailyReportErrorProvider: ({ children }: {
|
|
@@ -378,10 +381,23 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
|
|
|
378
381
|
}): Promise<TServerData>;
|
|
379
382
|
hydrate: true;
|
|
380
383
|
};
|
|
384
|
+
type DailyReportIdsStreamItemReplacement = {
|
|
385
|
+
readonly previous: DailyReportItem;
|
|
386
|
+
readonly next: DailyReportItem;
|
|
387
|
+
};
|
|
388
|
+
type DailyReportIdsStreamItemsChange = {
|
|
389
|
+
readonly base: number;
|
|
390
|
+
readonly revision: number;
|
|
391
|
+
readonly appended: readonly DailyReportItem[];
|
|
392
|
+
readonly replaced: readonly DailyReportIdsStreamItemReplacement[];
|
|
393
|
+
readonly removed: readonly DailyReportItem[];
|
|
394
|
+
};
|
|
381
395
|
type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
|
|
382
396
|
type DailyReportIdsStreamState = {
|
|
383
397
|
items: DailyReportItem[];
|
|
384
398
|
loadedCount: number;
|
|
399
|
+
itemsRevision: number;
|
|
400
|
+
itemsChanges: readonly DailyReportIdsStreamItemsChange[];
|
|
385
401
|
totalCount: number | null;
|
|
386
402
|
phase: DailyReportIdsStreamPhase;
|
|
387
403
|
isRevalidating: boolean;
|
|
@@ -402,6 +418,7 @@ type DailyReportIdsStreamClientOptions = {
|
|
|
402
418
|
readStallTimeoutMs?: number;
|
|
403
419
|
warn?: (...args: unknown[]) => void;
|
|
404
420
|
publishCoalesceMs?: number;
|
|
421
|
+
now?: () => number;
|
|
405
422
|
};
|
|
406
423
|
declare class DailyReportIdsStreamClient {
|
|
407
424
|
private readonly apiBasePath;
|
|
@@ -428,7 +445,9 @@ declare class DailyReportIdsStreamClient {
|
|
|
428
445
|
private readonly handleOnline;
|
|
429
446
|
private readonly publishCoalesceMs;
|
|
430
447
|
private publishCoalesceTimer;
|
|
448
|
+
private readonly now;
|
|
431
449
|
private lastItemsPublishAt;
|
|
450
|
+
private pendingItemsChange;
|
|
432
451
|
constructor(options?: DailyReportIdsStreamClientOptions);
|
|
433
452
|
getState(): DailyReportIdsStreamState;
|
|
434
453
|
subscribe(listener: () => void): () => void;
|
|
@@ -440,13 +459,17 @@ declare class DailyReportIdsStreamClient {
|
|
|
440
459
|
resync(): void;
|
|
441
460
|
applyExternalUpsert(item: DailyReportItem): void;
|
|
442
461
|
applyExternalRemoval(reportHubId: number): void;
|
|
462
|
+
has(reportHubId: number): boolean;
|
|
443
463
|
dispose(): void;
|
|
444
464
|
private runStreamLoop;
|
|
445
465
|
private pruneUnseenItems;
|
|
446
466
|
private streamOnce;
|
|
447
467
|
private readWithStallGuard;
|
|
448
468
|
private absorbChunkLine;
|
|
469
|
+
private putItem;
|
|
470
|
+
private deleteItem;
|
|
449
471
|
private absorbStreamAnchor;
|
|
472
|
+
private takePendingItems;
|
|
450
473
|
private publishItems;
|
|
451
474
|
private schedulePublishItems;
|
|
452
475
|
private cancelScheduledPublishItems;
|