@meridianlabs/inspect-scout-viewer 0.4.6 → 0.4.7

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.
Files changed (81) hide show
  1. package/lib/App.d.ts +1 -0
  2. package/lib/AppRouter.d.ts +2 -0
  3. package/lib/api/api.d.ts +13 -1
  4. package/lib/app/components/ActivityBarLayout.d.ts +2 -0
  5. package/lib/app/components/Chip.d.ts +12 -0
  6. package/lib/app/components/ChipGroup.d.ts +7 -0
  7. package/lib/app/components/NextPreviousNav.d.ts +11 -0
  8. package/lib/app/components/ProjectBar.d.ts +7 -0
  9. package/lib/app/components/ScansNavbar.d.ts +1 -1
  10. package/lib/app/components/ValidationResult.d.ts +3 -0
  11. package/lib/app/hooks/useFilterConditions.d.ts +6 -0
  12. package/lib/app/project/ProjectPanel.d.ts +7 -0
  13. package/lib/app/project/SettingsContent.d.ts +7 -0
  14. package/lib/app/project/components/FormFields.d.ts +67 -0
  15. package/lib/app/project/configUtils.d.ts +30 -0
  16. package/lib/app/project/hooks/useNestedConfig.d.ts +28 -0
  17. package/lib/app/runScan/ActiveScanView.d.ts +6 -0
  18. package/lib/app/runScan/DefineScannerSection.d.ts +6 -0
  19. package/lib/app/runScan/RunScanPanel.d.ts +2 -0
  20. package/lib/app/scannerResult/result/ResultBody.d.ts +2 -2
  21. package/lib/app/scannerResult/result/ResultPanel.d.ts +3 -2
  22. package/lib/app/scans/ScansGrid.d.ts +2 -2
  23. package/lib/app/server/useActiveScan.d.ts +3 -0
  24. package/lib/app/server/useActiveScans.d.ts +3 -0
  25. package/lib/app/server/useAdjacentTranscriptIds.d.ts +10 -0
  26. package/lib/app/server/useCode.d.ts +4 -0
  27. package/lib/app/server/useConfig.d.ts +1 -0
  28. package/lib/app/server/useProjectConfig.d.ts +30 -0
  29. package/lib/app/server/useScan.d.ts +4 -0
  30. package/lib/app/server/useScanDataframe.d.ts +9 -0
  31. package/lib/app/server/useScanDataframeInput.d.ts +10 -0
  32. package/lib/app/server/useScans.d.ts +3 -0
  33. package/lib/app/server/{useServerScansInfinite.d.ts → useScansInfinite.d.ts} +1 -1
  34. package/lib/app/server/useServerTranscriptsInfinite.d.ts +9 -2
  35. package/lib/app/server/useStartScan.d.ts +3 -0
  36. package/lib/app/server/useTranscript.d.ts +9 -0
  37. package/lib/app/server/useTranscriptsColumnValues.d.ts +11 -0
  38. package/lib/app/transcript/TranscriptBody.d.ts +2 -1
  39. package/lib/app/transcript/TranscriptNav.d.ts +10 -0
  40. package/lib/app/transcripts/TranscriptColumnsButton.d.ts +6 -0
  41. package/lib/app/transcripts/TranscriptColumnsPopover.d.ts +7 -0
  42. package/lib/app/transcripts/TranscriptFilterBar.d.ts +7 -0
  43. package/lib/app/transcripts/TranscriptsGrid.d.ts +5 -0
  44. package/lib/app/transcripts/columnFilter/ColumnFilterButton.d.ts +6 -0
  45. package/lib/app/transcripts/columnFilter/ColumnFilterControl.d.ts +16 -0
  46. package/lib/app/transcripts/columnFilter/ColumnFilterEditor.d.ts +18 -0
  47. package/lib/app/transcripts/columnFilter/index.d.ts +7 -0
  48. package/lib/app/transcripts/columnFilter/useColumnFilter.d.ts +19 -0
  49. package/lib/app/transcripts/columnFilter/useColumnFilterPopover.d.ts +22 -0
  50. package/lib/app/transcripts/columnSizing/defaultStrategy.d.ts +2 -0
  51. package/lib/app/transcripts/columnSizing/fitContentStrategy.d.ts +2 -0
  52. package/lib/app/transcripts/columnSizing/index.d.ts +4 -0
  53. package/lib/app/transcripts/columnSizing/strategies.d.ts +10 -0
  54. package/lib/app/transcripts/columnSizing/types.d.ts +47 -0
  55. package/lib/app/transcripts/columnSizing/useColumnSizing.d.ts +34 -0
  56. package/lib/app/transcripts/columnSizing/utils.d.ts +14 -0
  57. package/lib/app/transcripts/columns.d.ts +30 -0
  58. package/lib/app/transcripts/constants.d.ts +35 -0
  59. package/lib/components/AutocompleteInput.d.ts +17 -0
  60. package/lib/components/Modal.d.ts +10 -0
  61. package/lib/components/ToolButton.d.ts +1 -1
  62. package/lib/components/ToolDropdownButton.d.ts +3 -0
  63. package/lib/components/icons.d.ts +3 -0
  64. package/lib/components/transcript/TranscriptViewNodes.d.ts +13 -0
  65. package/lib/index.d.ts +2 -0
  66. package/lib/index.js +29357 -13421
  67. package/lib/index.js.map +1 -1
  68. package/lib/router/url.d.ts +2 -0
  69. package/lib/state/store.d.ts +13 -5
  70. package/lib/styles/index.css +1265 -263
  71. package/lib/types/api-types.d.ts +10 -1
  72. package/lib/types/generated.d.ts +817 -8
  73. package/lib/utils/react-query.d.ts +1 -0
  74. package/package.json +2 -1
  75. package/lib/app/components/ToolButton.d.ts +0 -8
  76. package/lib/app/server/useServerScan.d.ts +0 -3
  77. package/lib/app/server/useServerScanDataframe.d.ts +0 -3
  78. package/lib/app/server/useServerScanDataframeInput.d.ts +0 -3
  79. package/lib/app/server/useServerScans.d.ts +0 -3
  80. package/lib/app/server/useServerTranscript.d.ts +0 -3
  81. package/lib/app/transcripts/ColumnFilterControl.d.ts +0 -11
package/lib/App.d.ts CHANGED
@@ -2,4 +2,5 @@ import { FC } from 'react';
2
2
  export interface AppProps {
3
3
  mode?: "scans" | "workbench";
4
4
  }
5
+ export declare const AppModeContext: import('react').Context<"scans" | "workbench" | undefined>;
5
6
  export declare const App: FC<AppProps>;
@@ -1,4 +1,6 @@
1
+ import { AppConfig } from './types/api-types';
1
2
  export interface AppRouterConfig {
2
3
  mode: "scans" | "workbench";
4
+ config: AppConfig;
3
5
  }
4
6
  export declare const createAppRouter: (config: AppRouterConfig) => import('react-router-dom').DataRouter;
package/lib/api/api.d.ts CHANGED
@@ -1,16 +1,28 @@
1
1
  import { StateStorage } from 'zustand/middleware';
2
2
  import { ScanResultInputData } from '../app/types';
3
3
  import { Condition, OrderByModel } from '../query';
4
- import { AppConfig, Pagination, ScansResponse, Status, Transcript, TranscriptsResponse } from '../types/api-types';
4
+ import { ActiveScansResponse, AppConfig, Pagination, ProjectConfig, ProjectConfigInput, ScansResponse, Status, Transcript, TranscriptsResponse } from '../types/api-types';
5
5
  export type ClientStorage = StateStorage;
6
+ export type ScalarValue = string | number | boolean | null;
6
7
  export interface ScanApi {
7
8
  getConfig(): Promise<AppConfig>;
8
9
  getTranscripts(transcriptsDir: string, filter?: Condition, orderBy?: OrderByModel | OrderByModel[], pagination?: Pagination): Promise<TranscriptsResponse>;
9
10
  getTranscript(transcriptsDir: string, id: string): Promise<Transcript>;
11
+ getTranscriptsColumnValues(transcriptsDir: string, column: string, filter: Condition | undefined): Promise<ScalarValue[]>;
10
12
  getScans(filter?: Condition, orderBy?: OrderByModel | OrderByModel[], pagination?: Pagination): Promise<ScansResponse>;
11
13
  getScan(scanLocation: string): Promise<Status>;
12
14
  getScannerDataframe(scanLocation: string, scanner: string): Promise<ArrayBuffer | Uint8Array>;
13
15
  getScannerDataframeInput(scanLocation: string, scanner: string, uuid: string): Promise<ScanResultInputData>;
16
+ getActiveScans(): Promise<ActiveScansResponse>;
17
+ postCode(condition: Condition): Promise<Record<string, string>>;
18
+ getProjectConfig(): Promise<{
19
+ config: ProjectConfig;
20
+ etag: string;
21
+ }>;
22
+ updateProjectConfig(config: ProjectConfigInput, etag: string | null): Promise<{
23
+ config: ProjectConfig;
24
+ etag: string;
25
+ }>;
14
26
  storage: ClientStorage;
15
27
  capability: "scans" | "workbench";
16
28
  }
@@ -1,5 +1,7 @@
1
1
  import { FC, ReactNode } from 'react';
2
+ import { AppConfig } from '../../types/api-types';
2
3
  interface ActivityBarLayoutProps {
4
+ config: AppConfig;
3
5
  children: ReactNode;
4
6
  }
5
7
  /**
@@ -0,0 +1,12 @@
1
+ interface ChipProps {
2
+ icon?: string;
3
+ label?: string;
4
+ value: string;
5
+ title?: string;
6
+ closeTitle?: string;
7
+ onClick?: () => void;
8
+ onClose?: (event?: React.MouseEvent | React.KeyboardEvent) => void;
9
+ className?: string | string[];
10
+ }
11
+ export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface ChipGroupProps {
3
+ className?: string | string[];
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const ChipGroup: FC<ChipGroupProps>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface NextPreviousNavProps {
3
+ onPrevious?: () => void;
4
+ onNext?: () => void;
5
+ hasPrevious: boolean;
6
+ hasNext: boolean;
7
+ children?: ReactNode;
8
+ enableKeyboardNav?: boolean;
9
+ }
10
+ export declare const NextPreviousNav: FC<NextPreviousNavProps>;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { AppConfig } from '../../types/api-types';
3
+ interface ProjectBarProps {
4
+ config: AppConfig;
5
+ }
6
+ export declare const ProjectBar: FC<ProjectBarProps>;
7
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  interface ScansNavbarProps {
3
- scansDir?: string;
3
+ scansDir: string | null;
4
4
  setScansDir: (path: string) => void;
5
5
  children?: ReactNode;
6
6
  bordered?: boolean;
@@ -1,6 +1,9 @@
1
1
  import { FC } from 'react';
2
+ import { JsonValue } from '../../types/json-value';
2
3
  interface ValidationResultProps {
3
4
  result: boolean | Record<string, boolean>;
5
+ target?: JsonValue;
6
+ label?: string;
4
7
  }
5
8
  export declare const ValidationResult: FC<ValidationResultProps>;
6
9
  export {};
@@ -0,0 +1,6 @@
1
+ import { Condition } from '../../query';
2
+ /**
3
+ * Build a combined filter condition from column filters.
4
+ * @param excludeColumnId - Optional column ID to exclude from the condition
5
+ */
6
+ export declare const useFilterConditions: (excludeColumnId?: string) => Condition | undefined;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { AppConfig } from '../../types/api-types';
3
+ interface ProjectPanelProps {
4
+ config: AppConfig;
5
+ }
6
+ export declare const ProjectPanel: FC<ProjectPanelProps>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ProjectConfigInput } from '../../types/api-types';
3
+ export interface SettingsContentProps {
4
+ config: Partial<ProjectConfigInput>;
5
+ onChange: (updates: Partial<ProjectConfigInput>) => void;
6
+ }
7
+ export declare const SettingsContent: FC<SettingsContentProps>;
@@ -0,0 +1,67 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface TextFieldProps {
3
+ id?: string;
4
+ label: string;
5
+ helper?: ReactNode;
6
+ value: string | null | undefined;
7
+ onChange: (value: string | null) => void;
8
+ placeholder?: string;
9
+ disabled?: boolean;
10
+ /** Optional validation function. Returns error message if invalid, null if valid. */
11
+ validate?: (value: string | null) => string | null;
12
+ }
13
+ export declare const TextField: FC<TextFieldProps>;
14
+ interface TextAreaFieldProps {
15
+ id?: string;
16
+ label: string;
17
+ helper?: ReactNode;
18
+ value: string | null | undefined;
19
+ onChange: (value: string | null) => void;
20
+ placeholder?: string;
21
+ disabled?: boolean;
22
+ rows?: number;
23
+ }
24
+ export declare const TextAreaField: FC<TextAreaFieldProps>;
25
+ /**
26
+ * Convert an object or string to key=value lines for display.
27
+ */
28
+ export declare function objectToKeyValueLines(value: Record<string, unknown> | string | null | undefined): string;
29
+ /**
30
+ * Parse key=value lines into an object, or return as string if it looks like a path.
31
+ * Numeric values are preserved as numbers.
32
+ */
33
+ export declare function parseKeyValueLines(text: string | null): Record<string, string | number> | string | null;
34
+ interface KeyValueFieldProps {
35
+ id?: string;
36
+ label: string;
37
+ helper?: ReactNode;
38
+ value: Record<string, unknown> | string | null | undefined;
39
+ onChange: (value: Record<string, string | number> | string | null) => void;
40
+ placeholder?: string;
41
+ disabled?: boolean;
42
+ rows?: number;
43
+ }
44
+ export declare const KeyValueField: FC<KeyValueFieldProps>;
45
+ interface NumberFieldProps {
46
+ id?: string;
47
+ label: string;
48
+ helper?: ReactNode;
49
+ value: number | null | undefined;
50
+ onChange: (value: number | null) => void;
51
+ placeholder?: string;
52
+ disabled?: boolean;
53
+ step?: number;
54
+ }
55
+ export declare const NumberField: FC<NumberFieldProps>;
56
+ interface SelectFieldProps<T extends string> {
57
+ id?: string;
58
+ label: string;
59
+ helper?: ReactNode;
60
+ value: T | null | undefined;
61
+ options: readonly T[];
62
+ onChange: (value: T | null) => void;
63
+ disabled?: boolean;
64
+ defaultLabel?: string;
65
+ }
66
+ export declare function SelectField<T extends string>({ id, label, helper, value, options, onChange, disabled, defaultLabel, }: SelectFieldProps<T>): ReactNode;
67
+ export {};
@@ -0,0 +1,30 @@
1
+ import { ProjectConfigInput } from '../../types/api-types';
2
+ /**
3
+ * Deep equality check for config objects using JSON serialization.
4
+ */
5
+ export declare function configsEqual(a: Partial<ProjectConfigInput> | null, b: Partial<ProjectConfigInput> | null): boolean;
6
+ /**
7
+ * Check if a value is "empty" (null, undefined, or empty object/array).
8
+ */
9
+ export declare function isEmpty(value: unknown): boolean;
10
+ /**
11
+ * Filter out null and undefined values from an object.
12
+ */
13
+ export declare function filterNullValues<T extends Record<string, unknown>>(obj: T): Partial<T>;
14
+ /**
15
+ * Deep copy an object using JSON serialization.
16
+ * Note: Only works for JSON-serializable types (objects, arrays, primitives).
17
+ * Loses functions, Symbols, undefined values. Circular references will throw.
18
+ */
19
+ export declare function deepCopy<T>(obj: T): T;
20
+ /**
21
+ * Compute the config to save by comparing edited values against original server state.
22
+ * Only includes values that have changed or have content.
23
+ */
24
+ export declare function computeConfigToSave(edited: Partial<ProjectConfigInput>, original: Partial<ProjectConfigInput>, serverConfig: ProjectConfigInput): ProjectConfigInput;
25
+ /**
26
+ * Initialize edited config from server config.
27
+ * Extracts the relevant fields for editing.
28
+ * All fields are normalized to null (not undefined) for consistent comparison.
29
+ */
30
+ export declare function initializeEditedConfig(serverConfig: ProjectConfigInput): Partial<ProjectConfigInput>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Hook for managing nested config sections like cache and batch.
3
+ *
4
+ * These configs can be:
5
+ * - null/undefined (disabled)
6
+ * - true (enabled with defaults)
7
+ * - number (for batch: simple size value)
8
+ * - object (enabled with specific settings)
9
+ *
10
+ * @param configValue The current config value (from parent generate_config)
11
+ * @param updateParent Function to update the parent config with new nested value
12
+ */
13
+ export declare function useNestedConfig<T extends Record<string, unknown>>(configValue: T | boolean | number | null | undefined, updateParent: (value: T | boolean | null) => void): {
14
+ enabled: boolean;
15
+ config: Partial<T>;
16
+ setEnabled: (newEnabled: boolean) => void;
17
+ updateConfig: (updates: Partial<T>) => void;
18
+ };
19
+ /**
20
+ * Hook specifically for batch config which can also be a simple number (size).
21
+ */
22
+ export declare function useBatchConfig<T extends Record<string, unknown>>(configValue: T | boolean | number | null | undefined, updateParent: (value: T | boolean | null) => void): {
23
+ updateConfig: (updates: Partial<T>) => void;
24
+ currentBatchSize: number | undefined;
25
+ enabled: boolean;
26
+ config: Partial<T>;
27
+ setEnabled: (newEnabled: boolean) => void;
28
+ };
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ scanId: string | undefined;
4
+ }
5
+ export declare const ActiveScanView: FC<Props>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ onScanStarted: (scanId: string) => void;
4
+ }
5
+ export declare const DefineScannerSection: FC<Props>;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const RunScanPanel: FC;
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { ScanResultInputData, ScanResultData } from '../../types';
3
3
  export interface ResultBodyProps {
4
- resultData?: ScanResultData;
5
- inputData?: ScanResultInputData;
4
+ resultData: ScanResultData;
5
+ inputData: ScanResultInputData;
6
6
  }
7
7
  export declare const ResultBody: FC<ResultBodyProps>;
@@ -1,7 +1,8 @@
1
1
  import { FC } from 'react';
2
- import { ScanResultData } from '../../types';
2
+ import { ScanResultData, ScanResultInputData } from '../../types';
3
3
  interface ResultPanelProps {
4
- resultData?: ScanResultData;
4
+ resultData: ScanResultData;
5
+ inputData: ScanResultInputData | undefined;
5
6
  }
6
7
  export declare const ResultPanel: FC<ResultPanelProps>;
7
8
  export {};
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { Status } from '../../types/api-types';
2
+ import { ScanStatusWithActiveInfo } from '../../types/api-types';
3
3
  export declare const ScansGrid: FC<{
4
- scans: Status[];
4
+ scans: ScanStatusWithActiveInfo[];
5
5
  resultsDir: string | undefined;
6
6
  }>;
@@ -0,0 +1,3 @@
1
+ import { ActiveScanInfo } from '../../types/api-types';
2
+ import { AsyncData } from '../../utils/asyncData';
3
+ export declare const useActiveScan: (scanId: string | undefined) => AsyncData<ActiveScanInfo | undefined>;
@@ -0,0 +1,3 @@
1
+ import { ActiveScanInfo } from '../../types/api-types';
2
+ import { AsyncData } from '../../utils/asyncData';
3
+ export declare const useActiveScans: () => AsyncData<Record<string, ActiveScanInfo>>;
@@ -0,0 +1,10 @@
1
+ import { SortingState } from '@tanstack/react-table';
2
+ import { Condition } from '../../query';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ /**
5
+ * Returns prev/next transcript IDs relative to the given ID.
6
+ *
7
+ * Note: prev is undefined when viewing the first loaded item.
8
+ * Reverse paging not yet supported - will need backend prev_cursor.
9
+ */
10
+ export declare const useAdjacentTranscriptIds: (id: string, location?: string | null, pageSize?: number, filter?: Condition, sorting?: SortingState) => AsyncData<[string | undefined, string | undefined]>;
@@ -0,0 +1,4 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { Condition } from '../../query/types';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ export declare const useCode: (condition: Condition | typeof skipToken) => AsyncData<Record<string, string>>;
@@ -16,3 +16,4 @@ export declare const useConfigAsync: () => AsyncData<AppConfig>;
16
16
  * Throws if data not yet available.
17
17
  */
18
18
  export declare const useConfig: () => AppConfig;
19
+ export declare function appAliasedPath(appConfig: AppConfig, path: string | null): string | null;
@@ -0,0 +1,30 @@
1
+ import { DefaultError, UseMutationResult } from '@tanstack/react-query';
2
+ import { ProjectConfig, ProjectConfigInput } from '../../types/api-types';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ export type ProjectConfigWithEtag = {
5
+ config: ProjectConfig;
6
+ etag: string;
7
+ };
8
+ /**
9
+ * Loads project configuration from scout.yaml.
10
+ *
11
+ * Returns both the config and an etag for optimistic concurrency control.
12
+ *
13
+ * Automatic refetching is disabled to support optimistic locking:
14
+ * - External changes are detected via etag mismatch on save (412 error)
15
+ * - User explicitly chooses to reload or force save on conflict
16
+ */
17
+ export declare const useProjectConfig: () => AsyncData<ProjectConfigWithEtag>;
18
+ /**
19
+ * Mutation hook for updating project configuration.
20
+ *
21
+ * Updates scout.yaml while preserving comments and formatting.
22
+ * Requires the current etag for optimistic concurrency control.
23
+ *
24
+ * On success, updates the query cache with the new config and etag.
25
+ * On 412 Precondition Failed, the config was modified externally.
26
+ */
27
+ export declare const useUpdateProjectConfig: () => UseMutationResult<ProjectConfigWithEtag, DefaultError, {
28
+ config: ProjectConfigInput;
29
+ etag: string | null;
30
+ }>;
@@ -0,0 +1,4 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { Status } from '../../types/api-types';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ export declare const useScan: (location: string | typeof skipToken) => AsyncData<Status>;
@@ -0,0 +1,9 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { ColumnTable } from 'arquero';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ type ScanDataframeParams = {
5
+ location: string;
6
+ scanner: string;
7
+ };
8
+ export declare const useScanDataframe: (params: ScanDataframeParams | typeof skipToken) => AsyncData<ColumnTable>;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { AsyncData } from '../../utils/asyncData';
3
+ import { ScanResultInputData } from '../types';
4
+ type ScanDataframeInputParams = {
5
+ location: string;
6
+ scanner: string;
7
+ uuid: string;
8
+ };
9
+ export declare const useScanDataframeInput: (params: ScanDataframeInputParams | typeof skipToken) => AsyncData<ScanResultInputData>;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ScanStatusWithActiveInfo } from '../../types/api-types';
2
+ import { AsyncData } from '../../utils/asyncData';
3
+ export declare const useScans: () => AsyncData<ScanStatusWithActiveInfo[]>;
@@ -3,4 +3,4 @@ import { SortingState } from '@tanstack/react-table';
3
3
  import { Condition } from '../../query';
4
4
  import { ScansResponse } from '../../types/api-types';
5
5
  import { CursorType } from '.';
6
- export declare const useServerScansInfinite: (pageSize?: number, filter?: Condition, sorting?: SortingState) => UseInfiniteQueryResult<InfiniteData<ScansResponse, CursorType | undefined>, Error>;
6
+ export declare const useScansInfinite: (pageSize?: number, filter?: Condition, sorting?: SortingState) => UseInfiniteQueryResult<InfiniteData<ScansResponse, CursorType | undefined>, Error>;
@@ -1,6 +1,13 @@
1
- import { UseInfiniteQueryResult, InfiniteData } from '@tanstack/react-query';
1
+ import { UseInfiniteQueryResult, InfiniteData, skipToken } from '@tanstack/react-query';
2
2
  import { SortingState } from '@tanstack/react-table';
3
3
  import { Condition } from '../../query';
4
4
  import { TranscriptsResponse } from '../../types/api-types';
5
5
  import { CursorType } from '.';
6
- export declare const useServerTranscriptsInfinite: (location?: string | null, pageSize?: number, filter?: Condition, sorting?: SortingState) => UseInfiniteQueryResult<InfiniteData<TranscriptsResponse, CursorType | undefined>, Error>;
6
+ type ServerTranscriptsInfiniteParams = {
7
+ location: string;
8
+ pageSize?: number;
9
+ filter?: Condition;
10
+ sorting?: SortingState;
11
+ };
12
+ export declare const useServerTranscriptsInfinite: (params: ServerTranscriptsInfiniteParams | typeof skipToken) => UseInfiniteQueryResult<InfiniteData<TranscriptsResponse, CursorType | undefined>, Error>;
13
+ export {};
@@ -0,0 +1,3 @@
1
+ import { DefaultError, UseMutationResult } from '@tanstack/react-query';
2
+ import { ScanJobConfig, Status } from '../../types/api-types';
3
+ export declare const useStartScan: () => UseMutationResult<Status, DefaultError, ScanJobConfig>;
@@ -0,0 +1,9 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { Transcript } from '../../types/api-types';
3
+ import { AsyncData } from '../../utils/asyncData';
4
+ type TranscriptParams = {
5
+ location: string;
6
+ id: string;
7
+ };
8
+ export declare const useTranscript: (params: TranscriptParams | typeof skipToken) => AsyncData<Transcript>;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { skipToken } from '@tanstack/react-query';
2
+ import { ScalarValue } from '../../api/api';
3
+ import { Condition } from '../../query';
4
+ import { AsyncData } from '../../utils/asyncData';
5
+ type TranscriptsColumnValuesParams = {
6
+ location: string;
7
+ column: string;
8
+ filter: Condition | undefined;
9
+ };
10
+ export declare const useTranscriptsColumnValues: (params: TranscriptsColumnValuesParams | typeof skipToken) => AsyncData<ScalarValue[]>;
11
+ export {};
@@ -1,7 +1,8 @@
1
- import { FC } from 'react';
1
+ import { FC, RefObject } from 'react';
2
2
  import { Transcript } from '../../types/api-types';
3
3
  interface TranscriptBodyProps {
4
4
  transcript: Transcript;
5
+ scrollRef: RefObject<HTMLDivElement | null>;
5
6
  }
6
7
  export declare const TranscriptBody: FC<TranscriptBodyProps>;
7
8
  export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { Transcript } from '../../types/api-types';
3
+ interface TranscriptNavProps {
4
+ transcriptsDir: string;
5
+ transcript?: Transcript;
6
+ prevId?: string;
7
+ nextId?: string;
8
+ }
9
+ export declare const TranscriptNav: FC<TranscriptNavProps>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ interface TranscriptColumnsButtonProps {
2
+ isOpen: boolean;
3
+ onClick: () => void;
4
+ }
5
+ export declare const TranscriptColumnsButton: import('react').ForwardRefExoticComponent<TranscriptColumnsButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export interface TranscriptColumnsPopoverProps {
3
+ positionEl: HTMLElement | null;
4
+ isOpen: boolean;
5
+ setIsOpen: (open: boolean) => void;
6
+ }
7
+ export declare const TranscriptColumnsPopover: FC<TranscriptColumnsPopoverProps>;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ScalarValue } from '../../api/api';
3
+ export declare const TranscriptFilterBar: FC<{
4
+ filterCodeValues?: Record<string, string>;
5
+ filterSuggestions?: ScalarValue[];
6
+ onFilterColumnChange?: (columnId: string | null) => void;
7
+ }>;
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+ import { ScalarValue } from '../../api/api';
2
3
  import { TranscriptInfo } from '../../types/api-types';
3
4
  interface TranscriptGridProps {
4
5
  transcripts: TranscriptInfo[];
@@ -11,6 +12,10 @@ interface TranscriptGridProps {
11
12
  /** Distance from bottom (in px) at which to trigger callback. */
12
13
  fetchThreshold: number;
13
14
  loading?: boolean;
15
+ /** Autocomplete suggestions for the currently editing filter column */
16
+ filterSuggestions?: ScalarValue[];
17
+ /** Called when a filter column starts/stops being edited */
18
+ onFilterColumnChange?: (columnId: string | null) => void;
14
19
  }
15
20
  export declare const TranscriptsGrid: FC<TranscriptGridProps>;
16
21
  export {};
@@ -0,0 +1,6 @@
1
+ export interface ColumnFilterButtonProps {
2
+ columnId: string;
3
+ isActive: boolean;
4
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
5
+ }
6
+ export declare const ColumnFilterButton: import('react').ForwardRefExoticComponent<ColumnFilterButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { ScalarValue } from '../../../api/api';
3
+ import { SimpleCondition } from '../../../query/types';
4
+ import { FilterType } from '../../../state/store';
5
+ interface ColumnFilterControlProps {
6
+ columnId: string;
7
+ filterType: FilterType;
8
+ condition: SimpleCondition | null;
9
+ onChange: (condition: SimpleCondition | null) => void;
10
+ /** Autocomplete suggestions for the filter value */
11
+ suggestions?: ScalarValue[];
12
+ /** Called when the popover opens/closes (for fetching suggestions) */
13
+ onOpenChange?: (columnId: string | null) => void;
14
+ }
15
+ export declare const ColumnFilterControl: FC<ColumnFilterControlProps>;
16
+ export {};
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { ScalarValue } from '../../../api/api';
3
+ import { OperatorModel } from '../../../query';
4
+ import { FilterType } from '../../../state/store';
5
+ export interface ColumnFilterEditorProps {
6
+ columnId: string;
7
+ filterType: FilterType;
8
+ operator: OperatorModel;
9
+ operatorOptions: OperatorModel[];
10
+ rawValue: string;
11
+ isValueDisabled: boolean;
12
+ onOperatorChange: (operator: OperatorModel) => void;
13
+ onValueChange: (value: string) => void;
14
+ onCommit?: () => void;
15
+ onCancel?: () => void;
16
+ suggestions?: ScalarValue[];
17
+ }
18
+ export declare const ColumnFilterEditor: FC<ColumnFilterEditorProps>;
@@ -0,0 +1,7 @@
1
+ export { ColumnFilterControl } from './ColumnFilterControl';
2
+ export { ColumnFilterButton } from './ColumnFilterButton';
3
+ export { ColumnFilterEditor } from './ColumnFilterEditor';
4
+ export { useColumnFilter } from './useColumnFilter';
5
+ export type { UseColumnFilterParams, UseColumnFilterReturn, } from './useColumnFilter';
6
+ export type { ColumnFilterEditorProps } from './ColumnFilterEditor';
7
+ export type { ColumnFilterButtonProps } from './ColumnFilterButton';
@@ -0,0 +1,19 @@
1
+ import { OperatorModel } from '../../../query';
2
+ import { SimpleCondition } from '../../../query/types';
3
+ import { FilterType } from '../../../state/store';
4
+ export interface UseColumnFilterParams {
5
+ columnId: string;
6
+ filterType: FilterType;
7
+ condition: SimpleCondition | null;
8
+ isOpen: boolean;
9
+ }
10
+ export interface UseColumnFilterReturn {
11
+ operator: OperatorModel;
12
+ setOperator: (operator: OperatorModel) => void;
13
+ operatorOptions: OperatorModel[];
14
+ value: string;
15
+ setValue: (value: string) => void;
16
+ usesValue: boolean;
17
+ buildCondition: (operator: OperatorModel, value: string) => SimpleCondition | null | undefined;
18
+ }
19
+ export declare function useColumnFilter({ columnId, filterType, condition, isOpen, }: UseColumnFilterParams): UseColumnFilterReturn;