@aiquants/daily-report 0.33.0 → 0.35.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 +130 -0
- package/README.md +312 -74
- package/dist/client.d.mts +147 -130
- package/dist/client.d.ts +147 -130
- package/dist/client.js +4 -4
- package/dist/client.mjs +4 -4
- package/dist/comment-adapter-ChA4KOE1.d.mts +172 -0
- package/dist/comment-adapter-DqBqtqfA.d.ts +172 -0
- package/dist/index.d.mts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger-BaxnzF-0.d.mts +17 -0
- package/dist/logger-BaxnzF-0.d.ts +17 -0
- package/dist/server.d.mts +266 -15
- package/dist/server.d.ts +266 -15
- package/dist/server.js +11 -4
- package/dist/server.mjs +11 -4
- package/dist/{sse-schema-DcOgQr_O.d.mts → sse-schema-getLS62T.d.mts} +1 -1
- package/dist/{sse-schema-DcOgQr_O.d.ts → sse-schema-getLS62T.d.ts} +1 -1
- package/dist/styles/daily-report.standalone.css +1 -1
- package/package.json +4 -3
- package/dist/ids-stream-CtlszCHr.d.ts +0 -32
- package/dist/ids-stream-CyK2upgD.d.mts +0 -32
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 DailyReportSseTerminalEvent, c as DailyReportSseMessage, d as DailyReportDetail } from "./sse-schema-
|
|
3
|
+
import { D as DailyReportItem, a as DailyReportUser, b as DailyReportSseTerminalEvent, c as DailyReportSseMessage, d as DailyReportDetail } from "./sse-schema-getLS62T.js";
|
|
4
4
|
import { VirtualScrollLocale, VirtualScrollLabels, VirtualScrollHandle } from "@aiquants/virtualscroll";
|
|
5
|
+
import { D as DailyReportActionIntent, a as DailyReportSseStreamAnchor, U as UIComment } from "./comment-adapter-DqBqtqfA.js";
|
|
5
6
|
import { UseReopeningEventSourceResult } from "@aiquants/sse/react";
|
|
6
|
-
import { U as UIComment, D as DailyReportSseStreamAnchor } from "./ids-stream-CtlszCHr.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;
|
|
@@ -41,18 +41,7 @@ type DailyReportListProps = {
|
|
|
41
41
|
scrollOffsetRef?: RefObject<number>;
|
|
42
42
|
};
|
|
43
43
|
declare const DailyReportList: (props: DailyReportListProps) => react.JSX.Element;
|
|
44
|
-
|
|
45
|
-
"create",
|
|
46
|
-
"update",
|
|
47
|
-
"publish",
|
|
48
|
-
"delete",
|
|
49
|
-
"toggleStar",
|
|
50
|
-
"toggleRead",
|
|
51
|
-
"addComment",
|
|
52
|
-
"deleteComment",
|
|
53
|
-
"clearCache"
|
|
54
|
-
];
|
|
55
|
-
type DailyReportActionIntent = (typeof DAILY_REPORT_ACTION_INTENTS)[number];
|
|
44
|
+
type DailyReportSearchFailure = "invalid" | "busy" | "unavailable" | "failed";
|
|
56
45
|
type DailyReportLocale = VirtualScrollLocale;
|
|
57
46
|
type DailyReportOperation = Exclude<DailyReportActionIntent, "clearCache">;
|
|
58
47
|
type DailyReportLabels = VirtualScrollLabels & {
|
|
@@ -129,6 +118,16 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
129
118
|
readonly commentDeleteConfirm: string;
|
|
130
119
|
readonly unknownUser: string;
|
|
131
120
|
readonly sourceInternal: string;
|
|
121
|
+
readonly searchInputLabel: string;
|
|
122
|
+
readonly searchPlaceholder: string;
|
|
123
|
+
readonly searchCombineAnd: string;
|
|
124
|
+
readonly searchCombineOr: string;
|
|
125
|
+
readonly searchCombineAndTitle: string;
|
|
126
|
+
readonly searchCombineOrTitle: string;
|
|
127
|
+
readonly searchClear: string;
|
|
128
|
+
readonly searching: string;
|
|
129
|
+
readonly searchNoHits: string;
|
|
130
|
+
readonly searchSyntaxHelp: string;
|
|
132
131
|
readonly totalCount: (count: number) => string;
|
|
133
132
|
readonly debounce: (milliseconds: number) => string;
|
|
134
133
|
readonly streamProgressCount: (loaded: number) => string;
|
|
@@ -138,12 +137,15 @@ type DailyReportLabels = VirtualScrollLabels & {
|
|
|
138
137
|
readonly reportSummaryLoadFailed: (reportHubId: number) => string;
|
|
139
138
|
readonly interviewerWithAffiliation: (name: string, affiliation: string) => string;
|
|
140
139
|
readonly operationFailed: (operation: DailyReportOperation) => string;
|
|
140
|
+
readonly noticeRepeated: (count: number) => string;
|
|
141
141
|
readonly rowState: (state: {
|
|
142
142
|
readonly isRead: boolean;
|
|
143
143
|
readonly isStarred: boolean;
|
|
144
144
|
}) => string;
|
|
145
145
|
readonly listRowPosition: (position: number, total: number) => string;
|
|
146
146
|
readonly listRowPositionInUnknownTotal: (position: number) => string;
|
|
147
|
+
readonly searchHitCount: (count: number) => string;
|
|
148
|
+
readonly searchFailed: (failure: DailyReportSearchFailure) => string;
|
|
147
149
|
};
|
|
148
150
|
type DailyReportLabelOverrides = {
|
|
149
151
|
readonly [K in keyof DailyReportLabels]?: DailyReportLabels[K];
|
|
@@ -233,6 +235,16 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
233
235
|
"commentDeleteConfirm",
|
|
234
236
|
"unknownUser",
|
|
235
237
|
"sourceInternal",
|
|
238
|
+
"searchInputLabel",
|
|
239
|
+
"searchPlaceholder",
|
|
240
|
+
"searchCombineAnd",
|
|
241
|
+
"searchCombineOr",
|
|
242
|
+
"searchCombineAndTitle",
|
|
243
|
+
"searchCombineOrTitle",
|
|
244
|
+
"searchClear",
|
|
245
|
+
"searching",
|
|
246
|
+
"searchNoHits",
|
|
247
|
+
"searchSyntaxHelp",
|
|
236
248
|
"totalCount",
|
|
237
249
|
"debounce",
|
|
238
250
|
"streamProgressCount",
|
|
@@ -242,9 +254,12 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
|
|
|
242
254
|
"reportSummaryLoadFailed",
|
|
243
255
|
"interviewerWithAffiliation",
|
|
244
256
|
"operationFailed",
|
|
257
|
+
"noticeRepeated",
|
|
245
258
|
"rowState",
|
|
246
259
|
"listRowPosition",
|
|
247
|
-
"listRowPositionInUnknownTotal"
|
|
260
|
+
"listRowPositionInUnknownTotal",
|
|
261
|
+
"searchHitCount",
|
|
262
|
+
"searchFailed"
|
|
248
263
|
];
|
|
249
264
|
declare const DAILY_REPORT_LABEL_CATALOGS: Readonly<Record<DailyReportLocale, DailyReportLabels>>;
|
|
250
265
|
declare const resolveDailyReportLabels: (locale: DailyReportLocale | undefined, overrides: DailyReportLabelOverrides | undefined) => DailyReportLabels;
|
|
@@ -263,6 +278,12 @@ type SourceTypeConfig = {
|
|
|
263
278
|
badgeClassName?: string;
|
|
264
279
|
allowComment?: boolean;
|
|
265
280
|
};
|
|
281
|
+
type DailyReportSearchSetting = {
|
|
282
|
+
readonly debounceMs: number | null;
|
|
283
|
+
};
|
|
284
|
+
type DailyReportSearchSettingInput = {
|
|
285
|
+
readonly debounceMs?: number;
|
|
286
|
+
};
|
|
266
287
|
type DailyReportClientConfig = {
|
|
267
288
|
apiBasePath: string;
|
|
268
289
|
ssePath: string;
|
|
@@ -275,11 +296,13 @@ type DailyReportClientConfig = {
|
|
|
275
296
|
headingLevel: 2 | 3 | 4 | 5;
|
|
276
297
|
onError?: (info: DailyReportErrorInfo) => void;
|
|
277
298
|
onSessionExpired: () => void;
|
|
299
|
+
search: DailyReportSearchSetting | null;
|
|
278
300
|
};
|
|
279
|
-
type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "locale" | "labels" | "onSessionExpired">> & {
|
|
301
|
+
type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "locale" | "labels" | "onSessionExpired" | "search">> & {
|
|
280
302
|
locale?: DailyReportLocale;
|
|
281
303
|
labels?: DailyReportLabelOverrides;
|
|
282
304
|
onSessionExpired: () => void;
|
|
305
|
+
search?: DailyReportSearchSettingInput;
|
|
283
306
|
};
|
|
284
307
|
type DailyReportClientConfigDefaults = Readonly<Pick<DailyReportClientConfig, "apiBasePath" | "ssePath" | "draftLabelName" | "renderHeader" | "showDevControls" | "headingLevel">>;
|
|
285
308
|
declare const defaultDailyReportClientConfig: DailyReportClientConfigDefaults;
|
|
@@ -289,118 +312,6 @@ declare const DailyReportConfigProvider: ({ config, children }: {
|
|
|
289
312
|
}) => react.JSX.Element;
|
|
290
313
|
declare const useDailyReportConfig: () => DailyReportClientConfig;
|
|
291
314
|
declare const resolveSourceTypeConfig: (sourceType?: string | null, sourceTypeConfigs?: Record<string, SourceTypeConfig>) => SourceTypeConfig | undefined;
|
|
292
|
-
type DailyReportPageProps = {
|
|
293
|
-
user?: DailyReportUser;
|
|
294
|
-
userId?: string | null;
|
|
295
|
-
config: DailyReportClientConfigInput;
|
|
296
|
-
};
|
|
297
|
-
declare const DailyReportPage: ({ config, ...rest }: DailyReportPageProps) => react.JSX.Element;
|
|
298
|
-
type DailyReportResolvedContentProps = {
|
|
299
|
-
userId?: string | null;
|
|
300
|
-
};
|
|
301
|
-
declare const DailyReportResolvedContent: ({ userId }: DailyReportResolvedContentProps) => react.JSX.Element;
|
|
302
|
-
type ListNavigationHandle = Pick<VirtualScrollHandle, "getViewportSize" | "getScrollPosition" | "getScrollAnchor">;
|
|
303
|
-
type ListScrollToIndexOptions = NonNullable<Parameters<VirtualScrollHandle["scrollToIndex"]>[1]>;
|
|
304
|
-
type ViewTestReadHandle = ListNavigationHandle & Pick<VirtualScrollHandle, "getRange" | "getFenwickSize">;
|
|
305
|
-
type ViewTestHandle = ViewTestReadHandle & {
|
|
306
|
-
readonly findReportIndex: (id: number) => number;
|
|
307
|
-
readonly getReportItem: (index: number) => DailyReportItem | undefined;
|
|
308
|
-
readonly getReportIds: (limit?: number) => number[];
|
|
309
|
-
readonly revealIndex: (index: number, options: ListScrollToIndexOptions) => void;
|
|
310
|
-
};
|
|
311
|
-
type DailyReportSseConnectionStatus = UseReopeningEventSourceResult<DailyReportSseTerminalEvent>["status"] | {
|
|
312
|
-
readonly kind: "resyncing";
|
|
313
|
-
};
|
|
314
|
-
type UseDailyReportSseConnectionOptions = {
|
|
315
|
-
isSseEnabled: boolean;
|
|
316
|
-
onMessage: (payload: Exclude<DailyReportSseMessage, {
|
|
317
|
-
type: "connected";
|
|
318
|
-
}>) => void;
|
|
319
|
-
};
|
|
320
|
-
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
321
|
-
type ReportBusinessDate = DailyReportDetail["date"];
|
|
322
|
-
type DailyReportActionFunctions = {
|
|
323
|
-
toggleSse: () => void;
|
|
324
|
-
addComment: (reportHubId: number, content: string, businessDate: ReportBusinessDate) => Promise<void>;
|
|
325
|
-
deleteComment: (reportHubId: number, commentId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
326
|
-
toggleStar: (reportHubId: number, isStarred: boolean, businessDate: ReportBusinessDate) => Promise<void>;
|
|
327
|
-
toggleRead: (reportHubId: number, isRead: boolean, businessDate: ReportBusinessDate) => Promise<void>;
|
|
328
|
-
createReport: (businessDate: string) => Promise<number>;
|
|
329
|
-
updateReport: (reportHubId: number, data: {
|
|
330
|
-
title: string;
|
|
331
|
-
content: string;
|
|
332
|
-
}, businessDate: ReportBusinessDate) => Promise<void>;
|
|
333
|
-
publishReport: (reportHubId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
334
|
-
deleteReport: (reportHubId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
335
|
-
removeStaleItem: (reportHubId: number) => void;
|
|
336
|
-
refetchData: () => Promise<void>;
|
|
337
|
-
clearCacheAndRefetch: () => Promise<void>;
|
|
338
|
-
};
|
|
339
|
-
type DailyReportActionLedgers = {
|
|
340
|
-
pendingAddCommentIds: React.MutableRefObject<Map<number, Map<number, string>>>;
|
|
341
|
-
pendingDeleteCommentIds: React.MutableRefObject<Map<number, Set<number>>>;
|
|
342
|
-
pendingStarUpdates: React.MutableRefObject<Map<number, boolean>>;
|
|
343
|
-
pendingReadUpdates: React.MutableRefObject<Map<number, boolean>>;
|
|
344
|
-
resolvedIdMap: React.MutableRefObject<Map<number, number>>;
|
|
345
|
-
};
|
|
346
|
-
type DailyReportActions = DailyReportActionFunctions & DailyReportActionLedgers & {
|
|
347
|
-
user?: DailyReportUser;
|
|
348
|
-
};
|
|
349
|
-
type DailyReportActionState = {
|
|
350
|
-
version: number;
|
|
351
|
-
items: DailyReportItem[];
|
|
352
|
-
isSseEnabled: boolean;
|
|
353
|
-
sseStatus: DailyReportSseConnectionStatus;
|
|
354
|
-
};
|
|
355
|
-
type DailyReportActionContextType = DailyReportActions & DailyReportActionState;
|
|
356
|
-
declare global {
|
|
357
|
-
var __DailyReportActionsContext: Context<DailyReportActions | null> | undefined;
|
|
358
|
-
var __DailyReportActionStateContext: Context<DailyReportActionState | null> | undefined;
|
|
359
|
-
}
|
|
360
|
-
declare const useDailyReportActionContext: () => DailyReportActionContextType;
|
|
361
|
-
declare const DailyReportActionProvider: ({ children, user, userId }: {
|
|
362
|
-
children: ReactNode;
|
|
363
|
-
user?: DailyReportUser;
|
|
364
|
-
userId?: string | null;
|
|
365
|
-
}) => react.JSX.Element;
|
|
366
|
-
declare const DailyReportErrorProvider: ({ children }: {
|
|
367
|
-
children: ReactNode;
|
|
368
|
-
}) => react.JSX.Element;
|
|
369
|
-
type DailyReportDetailResource = {
|
|
370
|
-
report: DailyReportDetail | null;
|
|
371
|
-
error: Error | null;
|
|
372
|
-
isLoading: boolean;
|
|
373
|
-
isRefetching: boolean;
|
|
374
|
-
};
|
|
375
|
-
declare const useDailyReportDetail: (reportHubId: number, businessDate: string | null) => DailyReportDetailResource;
|
|
376
|
-
declare const useDailyReportPrefetch: () => (date: string | null) => void;
|
|
377
|
-
type User = {
|
|
378
|
-
displayName?: string;
|
|
379
|
-
name?: {
|
|
380
|
-
familyName?: string;
|
|
381
|
-
givenName?: string;
|
|
382
|
-
};
|
|
383
|
-
emails?: {
|
|
384
|
-
value: string;
|
|
385
|
-
}[];
|
|
386
|
-
};
|
|
387
|
-
declare const useDailyReportComments: (report: DailyReportDetail | null, user: User | null | undefined, userId?: string | null) => {
|
|
388
|
-
uiComments: UIComment[];
|
|
389
|
-
handleAddComment: (content: string) => Promise<void>;
|
|
390
|
-
handleDeleteComment: (cId: number) => Promise<void> | null;
|
|
391
|
-
pendingDeleteId: string | number | null;
|
|
392
|
-
setPendingDeleteId: react.Dispatch<react.SetStateAction<string | number | null>>;
|
|
393
|
-
resolvedIdMap: Map<number, number>;
|
|
394
|
-
};
|
|
395
|
-
declare const dailyReportShouldRevalidate: ShouldRevalidateFunction;
|
|
396
|
-
declare const createDailyReportClientLoader: <TServerData extends Record<string, unknown>>(options?: {
|
|
397
|
-
apiBasePath?: string;
|
|
398
|
-
}) => {
|
|
399
|
-
(args: {
|
|
400
|
-
serverLoader: () => Promise<unknown>;
|
|
401
|
-
}): Promise<TServerData>;
|
|
402
|
-
hydrate: true;
|
|
403
|
-
};
|
|
404
315
|
type DailyReportIdsStreamItemReplacement = {
|
|
405
316
|
readonly previous: DailyReportItem;
|
|
406
317
|
readonly next: DailyReportItem;
|
|
@@ -508,5 +419,111 @@ declare const bootstrapDailyReportIdsStreamSession: (options: {
|
|
|
508
419
|
declare const primeDailyReportIdsStreamSession: () => void;
|
|
509
420
|
declare const resyncDailyReportIdsStream: () => void;
|
|
510
421
|
declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
|
|
422
|
+
type DailyReportPageProps = {
|
|
423
|
+
user?: DailyReportUser;
|
|
424
|
+
userId?: string | null;
|
|
425
|
+
config: DailyReportClientConfigInput;
|
|
426
|
+
};
|
|
427
|
+
declare const DailyReportPage: ({ config, ...rest }: DailyReportPageProps) => react.JSX.Element;
|
|
428
|
+
type DailyReportResolvedContentProps = {
|
|
429
|
+
userId?: string | null;
|
|
430
|
+
};
|
|
431
|
+
declare const DailyReportResolvedContent: ({ userId }: DailyReportResolvedContentProps) => react.JSX.Element;
|
|
432
|
+
type ListNavigationHandle = Pick<VirtualScrollHandle, "getViewportSize" | "getScrollPosition" | "getScrollAnchor">;
|
|
433
|
+
type ListScrollToIndexOptions = NonNullable<Parameters<VirtualScrollHandle["scrollToIndex"]>[1]>;
|
|
434
|
+
type ViewTestReadHandle = ListNavigationHandle & Pick<VirtualScrollHandle, "getRange" | "getFenwickSize">;
|
|
435
|
+
type ViewTestHandle = ViewTestReadHandle & {
|
|
436
|
+
readonly findReportIndex: (id: number) => number;
|
|
437
|
+
readonly getReportItem: (index: number) => DailyReportItem | undefined;
|
|
438
|
+
readonly getReportIds: (limit?: number) => number[];
|
|
439
|
+
readonly revealIndex: (index: number, options: ListScrollToIndexOptions) => void;
|
|
440
|
+
};
|
|
441
|
+
type DailyReportSseConnectionStatus = UseReopeningEventSourceResult<DailyReportSseTerminalEvent>["status"] | {
|
|
442
|
+
readonly kind: "resyncing";
|
|
443
|
+
};
|
|
444
|
+
type UseDailyReportSseConnectionOptions = {
|
|
445
|
+
isSseEnabled: boolean;
|
|
446
|
+
onMessage: (payload: Exclude<DailyReportSseMessage, {
|
|
447
|
+
type: "connected";
|
|
448
|
+
}>) => void;
|
|
449
|
+
};
|
|
450
|
+
declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage }: UseDailyReportSseConnectionOptions) => DailyReportSseConnectionStatus;
|
|
451
|
+
type ReportBusinessDate = DailyReportDetail["date"];
|
|
452
|
+
type DailyReportActionFunctions = {
|
|
453
|
+
toggleSse: () => void;
|
|
454
|
+
addComment: (reportHubId: number, content: string, businessDate: ReportBusinessDate) => Promise<void>;
|
|
455
|
+
deleteComment: (reportHubId: number, commentId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
456
|
+
toggleStar: (reportHubId: number, isStarred: boolean, businessDate: ReportBusinessDate) => Promise<void>;
|
|
457
|
+
toggleRead: (reportHubId: number, isRead: boolean, businessDate: ReportBusinessDate) => Promise<void>;
|
|
458
|
+
createReport: (businessDate: string) => Promise<number>;
|
|
459
|
+
updateReport: (reportHubId: number, data: {
|
|
460
|
+
title: string;
|
|
461
|
+
content: string;
|
|
462
|
+
}, businessDate: ReportBusinessDate) => Promise<void>;
|
|
463
|
+
publishReport: (reportHubId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
464
|
+
deleteReport: (reportHubId: number, businessDate: ReportBusinessDate) => Promise<void>;
|
|
465
|
+
removeStaleItem: (reportHubId: number) => void;
|
|
466
|
+
refetchData: () => Promise<void>;
|
|
467
|
+
clearCacheAndRefetch: () => Promise<void>;
|
|
468
|
+
};
|
|
469
|
+
type DailyReportActionLedgers = {
|
|
470
|
+
pendingAddCommentIds: React.MutableRefObject<Map<number, Map<number, string>>>;
|
|
471
|
+
pendingDeleteCommentIds: React.MutableRefObject<Map<number, Set<number>>>;
|
|
472
|
+
pendingStarUpdates: React.MutableRefObject<Map<number, boolean>>;
|
|
473
|
+
pendingReadUpdates: React.MutableRefObject<Map<number, boolean>>;
|
|
474
|
+
resolvedIdMap: React.MutableRefObject<Map<number, number>>;
|
|
475
|
+
};
|
|
476
|
+
type DailyReportActions = DailyReportActionFunctions & DailyReportActionLedgers & {
|
|
477
|
+
user?: DailyReportUser;
|
|
478
|
+
};
|
|
479
|
+
type DailyReportActionState = {
|
|
480
|
+
version: number;
|
|
481
|
+
items: DailyReportItem[];
|
|
482
|
+
isSseEnabled: boolean;
|
|
483
|
+
sseStatus: DailyReportSseConnectionStatus;
|
|
484
|
+
searchInvalidation: string;
|
|
485
|
+
isReportRemoved: (reportHubId: number) => boolean;
|
|
486
|
+
removedVersion: number;
|
|
487
|
+
};
|
|
488
|
+
type DailyReportActionContextType = DailyReportActions & DailyReportActionState;
|
|
489
|
+
declare global {
|
|
490
|
+
var __DailyReportActionsContext: Context<DailyReportActions | null> | undefined;
|
|
491
|
+
var __DailyReportActionStateContext: Context<DailyReportActionState | null> | undefined;
|
|
492
|
+
}
|
|
493
|
+
declare const useDailyReportActionContext: () => DailyReportActionContextType;
|
|
494
|
+
declare const DailyReportActionProvider: ({ children, user, userId }: {
|
|
495
|
+
children: ReactNode;
|
|
496
|
+
user?: DailyReportUser;
|
|
497
|
+
userId?: string | null;
|
|
498
|
+
}) => react.JSX.Element;
|
|
499
|
+
declare const DailyReportErrorProvider: ({ children }: {
|
|
500
|
+
children: ReactNode;
|
|
501
|
+
}) => react.JSX.Element;
|
|
502
|
+
type DailyReportDetailResource = {
|
|
503
|
+
report: DailyReportDetail | null;
|
|
504
|
+
error: Error | null;
|
|
505
|
+
isLoading: boolean;
|
|
506
|
+
isRefetching: boolean;
|
|
507
|
+
};
|
|
508
|
+
declare const useDailyReportDetail: (reportHubId: number, businessDate: string | null) => DailyReportDetailResource;
|
|
509
|
+
declare const useDailyReportPrefetch: () => (date: string | null) => void;
|
|
510
|
+
declare const useDailyReportComments: (report: DailyReportDetail | null, user: Pick<DailyReportUser, "displayName" | "name" | "emails"> | null | undefined, userId?: string | null) => {
|
|
511
|
+
uiComments: UIComment[];
|
|
512
|
+
handleAddComment: (content: string) => Promise<void>;
|
|
513
|
+
handleDeleteComment: (cId: number) => Promise<void> | null;
|
|
514
|
+
pendingDeleteId: string | number | null;
|
|
515
|
+
setPendingDeleteId: react.Dispatch<react.SetStateAction<string | number | null>>;
|
|
516
|
+
resolvedIdMap: Map<number, number>;
|
|
517
|
+
};
|
|
518
|
+
declare const dailyReportShouldRevalidate: ShouldRevalidateFunction;
|
|
519
|
+
declare const createDailyReportClientLoader: <TServerData extends Record<string, unknown>>(options?: {
|
|
520
|
+
apiBasePath?: string;
|
|
521
|
+
}) => {
|
|
522
|
+
(args: {
|
|
523
|
+
serverLoader: () => Promise<unknown>;
|
|
524
|
+
}): Promise<TServerData>;
|
|
525
|
+
hydrate: true;
|
|
526
|
+
};
|
|
527
|
+
declare const LATTICE_BLOCK_QUANTUM_CLASS_NAME = "[--aqdr-lattice-block:4px] [@media(resolution:1.125dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:1.375dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:1.625dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:1.875dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:2.125dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:2.375dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:2.625dppx)]:[--aqdr-lattice-block:8px] [@media(resolution:2.875dppx)]:[--aqdr-lattice-block:8px]";
|
|
511
528
|
declare const DAILY_REPORT_LAYOUT_LATTICE_PX = 4;
|
|
512
|
-
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 };
|
|
529
|
+
export { DAILY_REPORT_LABEL_CATALOGS, DAILY_REPORT_LABEL_KEYS, LATTICE_BLOCK_QUANTUM_CLASS_NAME as DAILY_REPORT_LATTICE_BLOCK_QUANTUM_CLASS_NAME, DAILY_REPORT_LAYOUT_LATTICE_PX, type ReportBusinessDate as DailyReportActionBusinessDate, type DailyReportActionContextType, type DailyReportActionFunctions, type DailyReportActionLedgers, DailyReportActionProvider, type DailyReportActionState, type DailyReportActions, DailyReportAttachmentIndicator, type DailyReportAttachmentIndicatorProps, type DailyReportClientConfig, type DailyReportClientConfigDefaults, type DailyReportClientConfigInput, DailyReportConfigProvider, DailyReportDetailList, type DailyReportDetailListProps, type DailyReportDetailListScrollRestore, type DailyReportDetailResource, type DailyReportErrorInfo, DailyReportErrorProvider, type DailyReportHeaderProps, DailyReportIdsStreamClient, type DailyReportIdsStreamClientOptions, type DailyReportIdsStreamItemReplacement, type DailyReportIdsStreamItemsChange, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, DailyReportList, type ListNavigationHandle as DailyReportListNavigationHandle, type DailyReportListProps, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportResolvedContent, type DailyReportResolvedContentProps, type ListScrollToIndexOptions as DailyReportRevealOptions, type DailyReportSearchFailure, type DailyReportSearchSetting, type DailyReportSearchSettingInput, type DailyReportSseConnectionStatus, type ViewTestHandle as DailyReportViewTestHandle, type ViewTestReadHandle as DailyReportViewTestReadHandle, type SourceTypeConfig, type UseDailyReportSseConnectionOptions, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
|