@aiquants/daily-report 0.42.0 → 0.44.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/dist/client.d.mts CHANGED
@@ -1,11 +1,15 @@
1
1
  import * as react from "react";
2
2
  import { RefObject, ReactNode, Context } from "react";
3
- import { D as DailyReportItem, a as DailyReportSseStreamAnchor, b as DailyReportUser, c as DailyReportSseTerminalEvent, d as DailyReportSseMessage, e as DailyReportDetail } from "./sse-schema-CUiQKk8K.mjs";
4
- import { VirtualScrollLocale, VirtualScrollLabels, VirtualScrollHandle } from "@aiquants/virtualscroll";
5
- import { D as DailyReportActionIntent, U as UIComment } from "./comment-adapter-wejvIziS.mjs";
3
+ import { D as DailyReportRows } from "./instrumentation-CobsTeyw.mjs";
4
+ export { a as DailyReportInstrumentation, b as DailyReportInstrumentationContext, I as DailyReportInstrumentedView, L as DailyReportListNavigationHandle, c as DailyReportRevealOptions, V as DailyReportViewInstrumentation } from "./instrumentation-CobsTeyw.mjs";
5
+ import { D as DailyReportItem, a as DailyReportUser, b as DailyReportDetail } from "./types-BP1kIGMo.mjs";
6
+ import { VirtualScrollLocale, VirtualScrollLabels } from "@aiquants/virtualscroll";
7
+ import { D as DailyReportActionIntent, U as UIComment } from "./source-types-Hy_znWJl.mjs";
8
+ export { f as foldDailyReportSourceTypeToken } from "./source-types-Hy_znWJl.mjs";
6
9
  import { D as DailyReportSearchFilterFacet } from "./search-filters-wire-5MWi6GWu.mjs";
7
10
  export { a as DAILY_REPORT_SEARCH_FILTER_FACETS } from "./search-filters-wire-5MWi6GWu.mjs";
8
11
  import { UseReopeningEventSourceResult } from "@aiquants/sse/react";
12
+ import { D as DailyReportSseStreamAnchor, a as DailyReportSseTerminalEvent, b as DailyReportSseMessage } from "./sse-schema-sKBorzg9.mjs";
9
13
  import { ShouldRevalidateFunction } from "react-router";
10
14
  import "zod/v3";
11
15
  type DailyReportAttachmentIndicatorProps = {
@@ -14,7 +18,7 @@ type DailyReportAttachmentIndicatorProps = {
14
18
  label: string;
15
19
  };
16
20
  declare const DailyReportAttachmentIndicator: ({ id, count, label }: DailyReportAttachmentIndicatorProps) => react.JSX.Element | null;
17
- type DailyReportRows = Pick<ReadonlyArray<DailyReportItem>, "length" | "at"> & Iterable<DailyReportItem>;
21
+ type DailyReportSelectionPhase = "held" | "settled";
18
22
  type DailyReportDetailListScrollRestore = {
19
23
  topItem: {
20
24
  reportHubId: number;
@@ -29,7 +33,7 @@ type DailyReportDetailListProps = {
29
33
  rowSetSize?: number;
30
34
  userId?: string | null;
31
35
  selectedItemId?: number | null;
32
- onSelectItem?: (id: number | null) => void;
36
+ onSelectItem?: (id: number | null, phase: DailyReportSelectionPhase) => void;
33
37
  scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
34
38
  };
35
39
  declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
@@ -140,6 +144,9 @@ type DailyReportLabels = VirtualScrollLabels & {
140
144
  readonly isRead: boolean;
141
145
  readonly isStarred: boolean;
142
146
  }) => string;
147
+ readonly rowEditingState: (state: {
148
+ readonly isDraft: boolean;
149
+ }) => string;
143
150
  readonly listRowPosition: (position: number, total: number) => string;
144
151
  readonly listRowPositionInUnknownTotal: (position: number) => string;
145
152
  readonly searchHitCount: (count: number) => string;
@@ -266,6 +273,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
266
273
  "operationFailed",
267
274
  "noticeRepeated",
268
275
  "rowState",
276
+ "rowEditingState",
269
277
  "listRowPosition",
270
278
  "listRowPositionInUnknownTotal",
271
279
  "searchHitCount",
@@ -329,7 +337,7 @@ type DailyReportListProps = {
329
337
  rowSetSize?: number;
330
338
  autoMarkRead?: boolean;
331
339
  selectedReportHubId: number | null;
332
- onSelectItem: (reportHubId: number | null) => void;
340
+ onSelectItem: (reportHubId: number | null, phase: DailyReportSelectionPhase) => void;
333
341
  userId?: string | null;
334
342
  scrollOffsetRef?: RefObject<number>;
335
343
  };
@@ -407,15 +415,6 @@ type DailyReportResolvedContentProps = {
407
415
  userId?: string | null;
408
416
  };
409
417
  declare const DailyReportResolvedContent: ({ userId }: DailyReportResolvedContentProps) => react.JSX.Element;
410
- type ListNavigationHandle = Pick<VirtualScrollHandle, "getViewportSize" | "getScrollPosition" | "getScrollAnchor">;
411
- type ListScrollToIndexOptions = NonNullable<Parameters<VirtualScrollHandle["scrollToIndex"]>[1]>;
412
- type ViewTestReadHandle = ListNavigationHandle & Pick<VirtualScrollHandle, "getRange" | "getFenwickSize">;
413
- type ViewTestHandle = ViewTestReadHandle & {
414
- readonly findReportIndex: (id: number) => number;
415
- readonly getReportItem: (index: number) => DailyReportItem | undefined;
416
- readonly getReportIds: (limit?: number) => number[];
417
- readonly revealIndex: (index: number, options: ListScrollToIndexOptions) => void;
418
- };
419
418
  type DailyReportSseConnectionStatus = UseReopeningEventSourceResult<DailyReportSseTerminalEvent>["status"] | {
420
419
  readonly kind: "resyncing";
421
420
  };
@@ -507,4 +506,4 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
507
506
  };
508
507
  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]";
509
508
  declare const DAILY_REPORT_LAYOUT_LATTICE_PX = 4;
510
- 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, type DailyReportIdsStreamItemReplacements, type DailyReportIdsStreamItemsChange, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, type DailyReportLedgerView, DailyReportList, type ListNavigationHandle as DailyReportListNavigationHandle, type DailyReportListProps, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportResolvedContent, type DailyReportResolvedContentProps, type ListScrollToIndexOptions as DailyReportRevealOptions, type DailyReportRowBatch, type DailyReportRows, type DailyReportSearchFailure, DailyReportSearchFilterFacet, type DailyReportSearchFilterOption, type DailyReportSearchFilterSelectProps, type DailyReportSearchFilterSelectRenderer, type DailyReportSearchSetting, type DailyReportSearchSettingInput, type SourceTypeConfig as DailyReportSourceTypeConfig, type DailyReportSseConnectionStatus, type ViewTestHandle as DailyReportViewTestHandle, type ViewTestReadHandle as DailyReportViewTestReadHandle, type UseDailyReportSseConnectionOptions, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, readDailyReportIdsStreamRows, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
509
+ 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, type DailyReportIdsStreamItemReplacements, type DailyReportIdsStreamItemsChange, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, type DailyReportLedgerView, DailyReportList, type DailyReportListProps, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportResolvedContent, type DailyReportResolvedContentProps, type DailyReportRowBatch, DailyReportRows, type DailyReportSearchFailure, DailyReportSearchFilterFacet, type DailyReportSearchFilterOption, type DailyReportSearchFilterSelectProps, type DailyReportSearchFilterSelectRenderer, type DailyReportSearchSetting, type DailyReportSearchSettingInput, type DailyReportSelectionPhase, type SourceTypeConfig as DailyReportSourceTypeConfig, type DailyReportSseConnectionStatus, type UseDailyReportSseConnectionOptions, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, readDailyReportIdsStreamRows, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
package/dist/client.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import * as react from "react";
2
2
  import { RefObject, ReactNode, Context } from "react";
3
- import { D as DailyReportItem, a as DailyReportSseStreamAnchor, b as DailyReportUser, c as DailyReportSseTerminalEvent, d as DailyReportSseMessage, e as DailyReportDetail } from "./sse-schema-CUiQKk8K.js";
4
- import { VirtualScrollLocale, VirtualScrollLabels, VirtualScrollHandle } from "@aiquants/virtualscroll";
5
- import { D as DailyReportActionIntent, U as UIComment } from "./comment-adapter-BTXFkMSz.js";
3
+ import { D as DailyReportRows } from "./instrumentation-Dz7Uh7dT.js";
4
+ export { a as DailyReportInstrumentation, b as DailyReportInstrumentationContext, I as DailyReportInstrumentedView, L as DailyReportListNavigationHandle, c as DailyReportRevealOptions, V as DailyReportViewInstrumentation } from "./instrumentation-Dz7Uh7dT.js";
5
+ import { D as DailyReportItem, a as DailyReportUser, b as DailyReportDetail } from "./types-BP1kIGMo.js";
6
+ import { VirtualScrollLocale, VirtualScrollLabels } from "@aiquants/virtualscroll";
7
+ import { D as DailyReportActionIntent, U as UIComment } from "./source-types-Cg7T2dm6.js";
8
+ export { f as foldDailyReportSourceTypeToken } from "./source-types-Cg7T2dm6.js";
6
9
  import { D as DailyReportSearchFilterFacet } from "./search-filters-wire-5MWi6GWu.js";
7
10
  export { a as DAILY_REPORT_SEARCH_FILTER_FACETS } from "./search-filters-wire-5MWi6GWu.js";
8
11
  import { UseReopeningEventSourceResult } from "@aiquants/sse/react";
12
+ import { D as DailyReportSseStreamAnchor, a as DailyReportSseTerminalEvent, b as DailyReportSseMessage } from "./sse-schema-BcjRPJjN.js";
9
13
  import { ShouldRevalidateFunction } from "react-router";
10
14
  import "zod/v3";
11
15
  type DailyReportAttachmentIndicatorProps = {
@@ -14,7 +18,7 @@ type DailyReportAttachmentIndicatorProps = {
14
18
  label: string;
15
19
  };
16
20
  declare const DailyReportAttachmentIndicator: ({ id, count, label }: DailyReportAttachmentIndicatorProps) => react.JSX.Element | null;
17
- type DailyReportRows = Pick<ReadonlyArray<DailyReportItem>, "length" | "at"> & Iterable<DailyReportItem>;
21
+ type DailyReportSelectionPhase = "held" | "settled";
18
22
  type DailyReportDetailListScrollRestore = {
19
23
  topItem: {
20
24
  reportHubId: number;
@@ -29,7 +33,7 @@ type DailyReportDetailListProps = {
29
33
  rowSetSize?: number;
30
34
  userId?: string | null;
31
35
  selectedItemId?: number | null;
32
- onSelectItem?: (id: number | null) => void;
36
+ onSelectItem?: (id: number | null, phase: DailyReportSelectionPhase) => void;
33
37
  scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
34
38
  };
35
39
  declare const DailyReportDetailList: (props: DailyReportDetailListProps) => react.JSX.Element;
@@ -140,6 +144,9 @@ type DailyReportLabels = VirtualScrollLabels & {
140
144
  readonly isRead: boolean;
141
145
  readonly isStarred: boolean;
142
146
  }) => string;
147
+ readonly rowEditingState: (state: {
148
+ readonly isDraft: boolean;
149
+ }) => string;
143
150
  readonly listRowPosition: (position: number, total: number) => string;
144
151
  readonly listRowPositionInUnknownTotal: (position: number) => string;
145
152
  readonly searchHitCount: (count: number) => string;
@@ -266,6 +273,7 @@ declare const DAILY_REPORT_LABEL_KEYS: readonly [
266
273
  "operationFailed",
267
274
  "noticeRepeated",
268
275
  "rowState",
276
+ "rowEditingState",
269
277
  "listRowPosition",
270
278
  "listRowPositionInUnknownTotal",
271
279
  "searchHitCount",
@@ -329,7 +337,7 @@ type DailyReportListProps = {
329
337
  rowSetSize?: number;
330
338
  autoMarkRead?: boolean;
331
339
  selectedReportHubId: number | null;
332
- onSelectItem: (reportHubId: number | null) => void;
340
+ onSelectItem: (reportHubId: number | null, phase: DailyReportSelectionPhase) => void;
333
341
  userId?: string | null;
334
342
  scrollOffsetRef?: RefObject<number>;
335
343
  };
@@ -407,15 +415,6 @@ type DailyReportResolvedContentProps = {
407
415
  userId?: string | null;
408
416
  };
409
417
  declare const DailyReportResolvedContent: ({ userId }: DailyReportResolvedContentProps) => react.JSX.Element;
410
- type ListNavigationHandle = Pick<VirtualScrollHandle, "getViewportSize" | "getScrollPosition" | "getScrollAnchor">;
411
- type ListScrollToIndexOptions = NonNullable<Parameters<VirtualScrollHandle["scrollToIndex"]>[1]>;
412
- type ViewTestReadHandle = ListNavigationHandle & Pick<VirtualScrollHandle, "getRange" | "getFenwickSize">;
413
- type ViewTestHandle = ViewTestReadHandle & {
414
- readonly findReportIndex: (id: number) => number;
415
- readonly getReportItem: (index: number) => DailyReportItem | undefined;
416
- readonly getReportIds: (limit?: number) => number[];
417
- readonly revealIndex: (index: number, options: ListScrollToIndexOptions) => void;
418
- };
419
418
  type DailyReportSseConnectionStatus = UseReopeningEventSourceResult<DailyReportSseTerminalEvent>["status"] | {
420
419
  readonly kind: "resyncing";
421
420
  };
@@ -507,4 +506,4 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
507
506
  };
508
507
  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]";
509
508
  declare const DAILY_REPORT_LAYOUT_LATTICE_PX = 4;
510
- 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, type DailyReportIdsStreamItemReplacements, type DailyReportIdsStreamItemsChange, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, type DailyReportLedgerView, DailyReportList, type ListNavigationHandle as DailyReportListNavigationHandle, type DailyReportListProps, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportResolvedContent, type DailyReportResolvedContentProps, type ListScrollToIndexOptions as DailyReportRevealOptions, type DailyReportRowBatch, type DailyReportRows, type DailyReportSearchFailure, DailyReportSearchFilterFacet, type DailyReportSearchFilterOption, type DailyReportSearchFilterSelectProps, type DailyReportSearchFilterSelectRenderer, type DailyReportSearchSetting, type DailyReportSearchSettingInput, type SourceTypeConfig as DailyReportSourceTypeConfig, type DailyReportSseConnectionStatus, type ViewTestHandle as DailyReportViewTestHandle, type ViewTestReadHandle as DailyReportViewTestReadHandle, type UseDailyReportSseConnectionOptions, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, readDailyReportIdsStreamRows, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };
509
+ 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, type DailyReportIdsStreamItemReplacements, type DailyReportIdsStreamItemsChange, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, type DailyReportLedgerView, DailyReportList, type DailyReportListProps, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportResolvedContent, type DailyReportResolvedContentProps, type DailyReportRowBatch, DailyReportRows, type DailyReportSearchFailure, DailyReportSearchFilterFacet, type DailyReportSearchFilterOption, type DailyReportSearchFilterSelectProps, type DailyReportSearchFilterSelectRenderer, type DailyReportSearchSetting, type DailyReportSearchSettingInput, type DailyReportSelectionPhase, type SourceTypeConfig as DailyReportSourceTypeConfig, type DailyReportSseConnectionStatus, type UseDailyReportSseConnectionOptions, bootstrapDailyReportIdsStreamSession, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, ensureDailyReportIdsStreamSession, primeDailyReportIdsStreamSession, readDailyReportIdsStreamRows, resolveDailyReportLabels, resolveSourceTypeConfig, resyncDailyReportIdsStream, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection };