@altertable/data-app-react 0.72.0 → 0.73.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/README.md +3 -7
- package/dist/chunks/SectionHeading-CVenpddF.js +7813 -0
- package/dist/chunks/SectionHeading-CVenpddF.js.map +1 -0
- package/dist/index.js +1004 -2847
- package/dist/index.js.map +1 -23
- package/dist/types/chunks/date-formatting.d.ts +863 -0
- package/dist/types/index.d.ts +745 -78
- package/dist/types/ui/index.d.ts +572 -111
- package/dist/ui/index.js +2779 -3403
- package/dist/ui/index.js.map +1 -36
- package/package.json +7 -6
- package/dist/chunks/index-xwy62xrb.js +0 -16996
- package/dist/chunks/index-xwy62xrb.js.map +0 -120
- package/dist/types/actions.d.ts +0 -53
- package/dist/types/annotations/AnnotationBar.d.ts +0 -30
- package/dist/types/annotations/AnnotationControls.d.ts +0 -10
- package/dist/types/annotations/AnnotationEditor.d.ts +0 -16
- package/dist/types/annotations/AnnotationMarkers.d.ts +0 -19
- package/dist/types/annotations/AnnotationSelectionLayer.d.ts +0 -12
- package/dist/types/annotations/AnnotationTarget.d.ts +0 -9
- package/dist/types/annotations/AnnotationTooltip.d.ts +0 -9
- package/dist/types/annotations/AnnotationTrigger.d.ts +0 -10
- package/dist/types/annotations/annotation-editor-state.d.ts +0 -58
- package/dist/types/annotations/annotation-screenshot.d.ts +0 -4
- package/dist/types/annotations/annotation-targets.d.ts +0 -34
- package/dist/types/annotations/getAnnotationProps.d.ts +0 -17
- package/dist/types/annotations/styles.d.ts +0 -3
- package/dist/types/annotations/useAnnotationGeometry.d.ts +0 -22
- package/dist/types/annotations/useDataAppAnnotations.d.ts +0 -22
- package/dist/types/app-context.d.ts +0 -3
- package/dist/types/bindings.d.ts +0 -169
- package/dist/types/content.d.ts +0 -36
- package/dist/types/date-formatting.d.ts +0 -12
- package/dist/types/details.d.ts +0 -46
- package/dist/types/exploration.d.ts +0 -44
- package/dist/types/hooks.d.ts +0 -114
- package/dist/types/injectStyles.d.ts +0 -7
- package/dist/types/mount.d.ts +0 -13
- package/dist/types/search-suggestions.d.ts +0 -8
- package/dist/types/source-owner.d.ts +0 -2
- package/dist/types/style-contract.d.ts +0 -88
- package/dist/types/style-validation.d.ts +0 -2
- package/dist/types/styles.d.ts +0 -8
- package/dist/types/ui/AboutData.d.ts +0 -73
- package/dist/types/ui/AltertableLogo.d.ts +0 -3
- package/dist/types/ui/AppFooter.d.ts +0 -6
- package/dist/types/ui/AppHeader.d.ts +0 -10
- package/dist/types/ui/AppLayout.d.ts +0 -10
- package/dist/types/ui/AppScope.d.ts +0 -7
- package/dist/types/ui/AppToolbar.d.ts +0 -30
- package/dist/types/ui/AreaChart.d.ts +0 -7
- package/dist/types/ui/BarChart.d.ts +0 -6
- package/dist/types/ui/Breakdown.d.ts +0 -13
- package/dist/types/ui/Button.d.ts +0 -12
- package/dist/types/ui/ChartLegend.d.ts +0 -32
- package/dist/types/ui/Checkbox.d.ts +0 -21
- package/dist/types/ui/CheckboxGroup.d.ts +0 -7
- package/dist/types/ui/ChoicePicker.d.ts +0 -39
- package/dist/types/ui/Comparison.d.ts +0 -14
- package/dist/types/ui/ComposedChart.d.ts +0 -41
- package/dist/types/ui/ComposedChartLegend.d.ts +0 -9
- package/dist/types/ui/ContentSkeleton.d.ts +0 -7
- package/dist/types/ui/DataApp.d.ts +0 -24
- package/dist/types/ui/DataAppFrame.d.ts +0 -52
- package/dist/types/ui/DataBoundary.d.ts +0 -14
- package/dist/types/ui/DataSection.d.ts +0 -14
- package/dist/types/ui/DataSectionBoundary.d.ts +0 -30
- package/dist/types/ui/DataTable.d.ts +0 -29
- package/dist/types/ui/DataValue.d.ts +0 -9
- package/dist/types/ui/DataViewToast.d.ts +0 -11
- package/dist/types/ui/DataWidget.d.ts +0 -37
- package/dist/types/ui/DateDisplay.d.ts +0 -9
- package/dist/types/ui/DateRangePicker.d.ts +0 -30
- package/dist/types/ui/DateTimeTooltip.d.ts +0 -10
- package/dist/types/ui/DimensionPicker.d.ts +0 -14
- package/dist/types/ui/EmptyState.d.ts +0 -6
- package/dist/types/ui/ExplorationActionControl.d.ts +0 -60
- package/dist/types/ui/ExportControl.d.ts +0 -4
- package/dist/types/ui/FilterActions.d.ts +0 -10
- package/dist/types/ui/FilterBar.d.ts +0 -3
- package/dist/types/ui/FunnelChart.d.ts +0 -20
- package/dist/types/ui/GettingStarted.d.ts +0 -6
- package/dist/types/ui/GlossaryDefinition.d.ts +0 -7
- package/dist/types/ui/GlossaryExplanation.d.ts +0 -16
- package/dist/types/ui/GradientScroll.d.ts +0 -23
- package/dist/types/ui/Grid.d.ts +0 -12
- package/dist/types/ui/GridItem.d.ts +0 -7
- package/dist/types/ui/HelpPopover.d.ts +0 -21
- package/dist/types/ui/IconButton.d.ts +0 -19
- package/dist/types/ui/InspectionContext.d.ts +0 -12
- package/dist/types/ui/InspectionProvider.d.ts +0 -29
- package/dist/types/ui/JourneyChart.d.ts +0 -10
- package/dist/types/ui/Kbd.d.ts +0 -7
- package/dist/types/ui/LineChart.d.ts +0 -7
- package/dist/types/ui/LiveControl.d.ts +0 -10
- package/dist/types/ui/Menu.d.ts +0 -13
- package/dist/types/ui/MetricWidget.d.ts +0 -51
- package/dist/types/ui/NumberField.d.ts +0 -27
- package/dist/types/ui/NumberFilterPicker.d.ts +0 -11
- package/dist/types/ui/PeriodSummary.d.ts +0 -17
- package/dist/types/ui/PickerField.d.ts +0 -23
- package/dist/types/ui/PieChart.d.ts +0 -11
- package/dist/types/ui/PopoverSurface.d.ts +0 -5
- package/dist/types/ui/PresentStory.d.ts +0 -30
- package/dist/types/ui/QueryList.d.ts +0 -14
- package/dist/types/ui/RadioGroup.d.ts +0 -18
- package/dist/types/ui/Ranking.d.ts +0 -13
- package/dist/types/ui/RefreshControl.d.ts +0 -9
- package/dist/types/ui/RequestHint.d.ts +0 -20
- package/dist/types/ui/RetentionChart.d.ts +0 -27
- package/dist/types/ui/ScatterChart.d.ts +0 -17
- package/dist/types/ui/SearchField.d.ts +0 -23
- package/dist/types/ui/SearchInput.d.ts +0 -10
- package/dist/types/ui/SearchMatch.d.ts +0 -6
- package/dist/types/ui/SearchTypeahead.d.ts +0 -15
- package/dist/types/ui/SectionHeading.d.ts +0 -8
- package/dist/types/ui/Select.d.ts +0 -22
- package/dist/types/ui/SelectionMark.d.ts +0 -5
- package/dist/types/ui/Sheet.d.ts +0 -21
- package/dist/types/ui/Skeleton.d.ts +0 -8
- package/dist/types/ui/Stack.d.ts +0 -7
- package/dist/types/ui/StaticDataApp.d.ts +0 -4
- package/dist/types/ui/StatusPanel.d.ts +0 -10
- package/dist/types/ui/TableWidget.d.ts +0 -67
- package/dist/types/ui/Tabs.d.ts +0 -10
- package/dist/types/ui/TextContent.d.ts +0 -4
- package/dist/types/ui/TextWidget.d.ts +0 -20
- package/dist/types/ui/ThemeSelector.d.ts +0 -12
- package/dist/types/ui/Toast.d.ts +0 -8
- package/dist/types/ui/Tooltip.d.ts +0 -23
- package/dist/types/ui/TooltipSurface.d.ts +0 -3
- package/dist/types/ui/TrendChart.d.ts +0 -5
- package/dist/types/ui/UpdatedAt.d.ts +0 -9
- package/dist/types/ui/VariableBar.d.ts +0 -6
- package/dist/types/ui/VisualizationWidget.d.ts +0 -43
- package/dist/types/ui/WidgetDisclosure.d.ts +0 -6
- package/dist/types/ui/WidgetEvidence.d.ts +0 -12
- package/dist/types/ui/WidgetViewTabs.d.ts +0 -16
- package/dist/types/ui/chart-data.d.ts +0 -36
- package/dist/types/ui/chart-date-axis.d.ts +0 -15
- package/dist/types/ui/chart-interaction.d.ts +0 -27
- package/dist/types/ui/chart-primitives.d.ts +0 -22
- package/dist/types/ui/chart-time.d.ts +0 -19
- package/dist/types/ui/chartColor.d.ts +0 -2
- package/dist/types/ui/classNames.d.ts +0 -1
- package/dist/types/ui/csv-export.d.ts +0 -19
- package/dist/types/ui/data-context.d.ts +0 -76
- package/dist/types/ui/data-identifiers.d.ts +0 -32
- package/dist/types/ui/icons.d.ts +0 -49
- package/dist/types/ui/journey-flow.d.ts +0 -49
- package/dist/types/ui/keyboard.d.ts +0 -6
- package/dist/types/ui/metric-comparison.d.ts +0 -30
- package/dist/types/ui/metric.d.ts +0 -11
- package/dist/types/ui/presentation.d.ts +0 -25
- package/dist/types/ui/search.d.ts +0 -6
- package/dist/types/ui/searchItems.d.ts +0 -36
- package/dist/types/ui/shortcuts.d.ts +0 -45
- package/dist/types/ui/story.d.ts +0 -20
- package/dist/types/ui/time-interval.d.ts +0 -96
- package/dist/types/ui/use-chart-scroll-to-end.d.ts +0 -2
- package/dist/types/ui/useAppAppearance.d.ts +0 -3
- package/dist/types/ui/useDataAppPresentation.d.ts +0 -3
- package/dist/types/ui/useSvgId.d.ts +0 -2
- package/dist/types/ui/variables.d.ts +0 -36
- package/dist/types/ui/widget-views.d.ts +0 -3
- package/dist/types/view-control-bar.d.ts +0 -18
- package/dist/types/view-controls.d.ts +0 -20
- package/dist/types/view-runtime.d.ts +0 -34
- package/dist/types/view.d.ts +0 -87
- package/dist/types/widgets.d.ts +0 -90
package/dist/types/actions.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { FilterTarget, BreakdownTarget } from './exploration.js';
|
|
2
|
-
import type { DetailView } from './details.js';
|
|
3
|
-
import type { ItemActions } from './ui/ExplorationActionControl.js';
|
|
4
|
-
type ActionCondition<Row> = {
|
|
5
|
-
label: string;
|
|
6
|
-
when?: (row: Row) => boolean;
|
|
7
|
-
};
|
|
8
|
-
type DetailAction<Row, Input, DestinationInput> = ActionCondition<Row> & {
|
|
9
|
-
label: string;
|
|
10
|
-
target: DetailView<any, DestinationInput>;
|
|
11
|
-
input: (row: Row, displayedInput: Input) => DestinationInput;
|
|
12
|
-
};
|
|
13
|
-
export type ActionDeclaration<Row, Input> = ActionCondition<Row> & ({
|
|
14
|
-
kind: 'detail';
|
|
15
|
-
target: DetailView<any, any>;
|
|
16
|
-
input: (row: Row, input: Input) => unknown;
|
|
17
|
-
} | {
|
|
18
|
-
kind: 'filter';
|
|
19
|
-
target: object;
|
|
20
|
-
values: (row: Row) => object;
|
|
21
|
-
breakdown?: {
|
|
22
|
-
target: BreakdownTarget<any>;
|
|
23
|
-
value: (row: Row) => string;
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
export declare class ActionBuilder<Row, Input> {
|
|
27
|
-
detail<DestinationInput>(config: DetailAction<Row, Input, DestinationInput>): ActionDeclaration<Row, Input>;
|
|
28
|
-
filter<Patch extends object, const Values extends NoInfer<Patch>, Value extends string = never>(config: ActionCondition<Row> & {
|
|
29
|
-
label: string;
|
|
30
|
-
target: FilterTarget<Patch>;
|
|
31
|
-
values: (row: Row) => Values & NoInfer<Patch>;
|
|
32
|
-
breakdown?: {
|
|
33
|
-
target: BreakdownTarget<Value>;
|
|
34
|
-
value: (row: Row) => NoInfer<Value>;
|
|
35
|
-
};
|
|
36
|
-
}): ActionDeclaration<Row, Input>;
|
|
37
|
-
}
|
|
38
|
-
declare const actionTypes: unique symbol;
|
|
39
|
-
/** Actions belong to one metric or dataset; its widget supplies displayed rows and input. */
|
|
40
|
-
export declare class ExplorationActions<Row, Input> {
|
|
41
|
-
readonly [actionTypes]: {
|
|
42
|
-
row: Row;
|
|
43
|
-
input: Input;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export declare function defineActions<Row, Input, const Actions extends Record<string, ActionDeclaration<Row, Input>>>(binding: object, build: (action: ActionBuilder<Row, Input>) => Actions, options?: {
|
|
47
|
-
primary?: keyof Actions & string;
|
|
48
|
-
}): ExplorationActions<Row, Input>;
|
|
49
|
-
export declare function resolveActions<Row, Input>(set: ExplorationActions<Row, Input> | undefined, binding: object, viewOwner: object | undefined, source: {
|
|
50
|
-
loading?: boolean;
|
|
51
|
-
input?: Input;
|
|
52
|
-
}, open: (target: DetailView<any, any>, input: unknown, trigger?: HTMLElement | SVGElement) => void): ItemActions<Row>;
|
|
53
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'react';
|
|
2
|
-
import { type Theme } from '@altertable/data-app/appearance';
|
|
3
|
-
import { type DataAppAnnotationDraft } from '@altertable/data-app/contract';
|
|
4
|
-
export type AnnotationBarHandle = {
|
|
5
|
-
/** Submit through the same guards, pending state, and retry feedback as the Send button. */
|
|
6
|
-
send: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
export type AnnotationBarProps = {
|
|
9
|
-
ref?: Ref<AnnotationBarHandle>;
|
|
10
|
-
annotations: readonly DataAppAnnotationDraft[];
|
|
11
|
-
active?: boolean;
|
|
12
|
-
theme?: Theme;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
deletedAnnotationId?: string;
|
|
15
|
-
onUndoDelete?: (id: string) => void;
|
|
16
|
-
onDismissUndo?: () => void;
|
|
17
|
-
hasUnsavedChanges?: boolean;
|
|
18
|
-
pinsVisible: boolean;
|
|
19
|
-
onPinsVisibleChange: (visible: boolean) => void;
|
|
20
|
-
onSelect: (id: string) => void;
|
|
21
|
-
onDelete: (id: string) => void;
|
|
22
|
-
onClear: () => void;
|
|
23
|
-
/** Let host apps use their existing confirmation dialog. */
|
|
24
|
-
requestDiscard?: (discard: () => void) => void;
|
|
25
|
-
/** Resolve only after the outer application's agent API accepts this snapshot. */
|
|
26
|
-
onSend: (annotations: readonly DataAppAnnotationDraft[]) => Promise<void>;
|
|
27
|
-
onClose: () => void;
|
|
28
|
-
};
|
|
29
|
-
/** Host-owned batch controls. Collection changes and agent submission stay with the outer app. */
|
|
30
|
-
export declare function AnnotationBar({ ref, annotations, active, theme, disabled, deletedAnnotationId, onUndoDelete, onDismissUndo, hasUnsavedChanges, pinsVisible, onPinsVisibleChange, onSelect, onDelete, onClear, requestDiscard, onSend, onClose, }: AnnotationBarProps): import("react").JSX.Element | null;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ComponentRef, type RefObject } from 'react';
|
|
2
|
-
import { type DataAppAnnotationPresentation } from '@altertable/data-app/contract';
|
|
3
|
-
type AnnotationControlsProps = {
|
|
4
|
-
rootRef: RefObject<ComponentRef<'div'> | null>;
|
|
5
|
-
presentation: DataAppAnnotationPresentation;
|
|
6
|
-
displayedInput?: unknown;
|
|
7
|
-
view?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function AnnotationControls({ rootRef, presentation, displayedInput, view, }: AnnotationControlsProps): import("react").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type ComponentRef, type CSSProperties, type Ref } from 'react';
|
|
2
|
-
import { type AnnotationEditorState } from './annotation-editor-state.js';
|
|
3
|
-
type AnnotationEditorProps = {
|
|
4
|
-
editor: AnnotationEditorState;
|
|
5
|
-
editorRef: Ref<ComponentRef<'section'>>;
|
|
6
|
-
textareaRef: Ref<ComponentRef<'textarea'>>;
|
|
7
|
-
style: CSSProperties;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
onCommentChange: (comment: string) => void;
|
|
10
|
-
onSubmit: () => void;
|
|
11
|
-
onSend: () => void;
|
|
12
|
-
onRetryScreenshot: () => void;
|
|
13
|
-
onShakeEnd: () => void;
|
|
14
|
-
};
|
|
15
|
-
export declare function AnnotationEditor({ editor, editorRef, textareaRef, style, disabled, onCommentChange, onSubmit, onSend, onRetryScreenshot, onShakeEnd, }: AnnotationEditorProps): import("react").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type AnnotationPoint, type AnnotationRect } from './annotation-targets.js';
|
|
2
|
-
export type AnnotationPin = {
|
|
3
|
-
id: string;
|
|
4
|
-
number: number;
|
|
5
|
-
anchor: AnnotationPoint;
|
|
6
|
-
rect: AnnotationRect;
|
|
7
|
-
};
|
|
8
|
-
type AnnotationMarkersProps = {
|
|
9
|
-
outline?: AnnotationRect;
|
|
10
|
-
rounded: boolean;
|
|
11
|
-
pins: AnnotationPin[];
|
|
12
|
-
pinsVisible: boolean;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
showHint: boolean;
|
|
15
|
-
hasDuplicateIds: boolean;
|
|
16
|
-
onOpenAnnotation: (id: string) => void;
|
|
17
|
-
};
|
|
18
|
-
export declare function AnnotationMarkers({ outline, rounded, pins, pinsVisible, disabled, showHint, hasDuplicateIds, onOpenAnnotation, }: AnnotationMarkersProps): import("react").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type AnnotationTargetElement, type AnnotationPoint, type AnnotationRect } from './annotation-targets.js';
|
|
2
|
-
type AnnotationSelectionLayerProps = {
|
|
3
|
-
scope: HTMLElement;
|
|
4
|
-
targets: AnnotationTargetElement[];
|
|
5
|
-
onHover: (target: AnnotationTargetElement | undefined) => void;
|
|
6
|
-
onSelect: (target: AnnotationTargetElement, point?: AnnotationPoint, region?: AnnotationRect) => void;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
editing: boolean;
|
|
9
|
-
};
|
|
10
|
-
/** Own pointer selection and keyboard focus while the app underneath is inert. */
|
|
11
|
-
export declare function AnnotationSelectionLayer({ scope, targets, onHover, onSelect, disabled, editing, }: AnnotationSelectionLayerProps): import("react").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { type WidgetEvidence } from '../ui/WidgetEvidence.js';
|
|
3
|
-
export type AnnotationTargetProps = ComponentPropsWithRef<'div'> & {
|
|
4
|
-
annotationId: string;
|
|
5
|
-
label: string;
|
|
6
|
-
evidence?: WidgetEvidence;
|
|
7
|
-
};
|
|
8
|
-
/** A stable feedback target for app-owned content outside the built-in widgets. */
|
|
9
|
-
export declare function AnnotationTarget({ annotationId, label, evidence, ...props }: AnnotationTargetProps): import("react").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Theme } from '@altertable/data-app/appearance';
|
|
3
|
-
type AnnotationTooltipProps = {
|
|
4
|
-
content: ReactNode;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
theme?: Theme;
|
|
7
|
-
};
|
|
8
|
-
export declare function AnnotationTooltip({ content, children, theme, }: AnnotationTooltipProps): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ComponentRef, type Ref } from 'react';
|
|
2
|
-
type AnnotationTriggerProps = {
|
|
3
|
-
buttonRef: Ref<ComponentRef<'button'>>;
|
|
4
|
-
active: boolean;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
count: number;
|
|
7
|
-
onToggle: () => void;
|
|
8
|
-
};
|
|
9
|
-
export declare function AnnotationTrigger({ buttonRef, active, disabled, count, onToggle, }: AnnotationTriggerProps): import("react").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { type DataAppAnnotationDraft } from '@altertable/data-app/contract';
|
|
2
|
-
import { type AnnotationTargetElement } from './annotation-targets.js';
|
|
3
|
-
export type AnnotationEditorState = {
|
|
4
|
-
target: AnnotationTargetElement;
|
|
5
|
-
draft: DataAppAnnotationDraft;
|
|
6
|
-
annotationId?: string;
|
|
7
|
-
/** Epoch milliseconds, comparable to host interaction timestamps. */
|
|
8
|
-
openedAt: number;
|
|
9
|
-
comment: string;
|
|
10
|
-
captureStatus: 'capturing' | 'ready' | 'failed';
|
|
11
|
-
error: string;
|
|
12
|
-
discardArmed: boolean;
|
|
13
|
-
shaking: boolean;
|
|
14
|
-
};
|
|
15
|
-
type AnnotationControlsState = {
|
|
16
|
-
annotationModeActive: boolean;
|
|
17
|
-
observedActive: boolean;
|
|
18
|
-
hoveredTarget?: AnnotationTargetElement;
|
|
19
|
-
editor?: AnnotationEditorState;
|
|
20
|
-
saving: boolean;
|
|
21
|
-
};
|
|
22
|
-
type AnnotationControlsAction = {
|
|
23
|
-
type: 'annotationModeChanged';
|
|
24
|
-
active: boolean;
|
|
25
|
-
} | {
|
|
26
|
-
type: 'externalModeObserved';
|
|
27
|
-
active: boolean;
|
|
28
|
-
} | {
|
|
29
|
-
type: 'targetHovered';
|
|
30
|
-
target?: AnnotationTargetElement;
|
|
31
|
-
} | {
|
|
32
|
-
type: 'editorOpened';
|
|
33
|
-
editor: AnnotationEditorState;
|
|
34
|
-
} | {
|
|
35
|
-
type: 'editorClosed';
|
|
36
|
-
} | {
|
|
37
|
-
type: 'commentChanged';
|
|
38
|
-
comment: string;
|
|
39
|
-
} | {
|
|
40
|
-
type: 'captureCompleted';
|
|
41
|
-
draftId: string;
|
|
42
|
-
succeeded: boolean;
|
|
43
|
-
} | {
|
|
44
|
-
type: 'editorEscaped';
|
|
45
|
-
hasUnsavedChanges: boolean;
|
|
46
|
-
} | {
|
|
47
|
-
type: 'shakeFinished';
|
|
48
|
-
} | {
|
|
49
|
-
type: 'saveStarted';
|
|
50
|
-
} | {
|
|
51
|
-
type: 'saveFailed';
|
|
52
|
-
error: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: 'saveFinished';
|
|
55
|
-
};
|
|
56
|
-
export declare function createAnnotationControlsState(active: boolean): AnnotationControlsState;
|
|
57
|
-
export declare function annotationControlsReducer(state: AnnotationControlsState, action: AnnotationControlsAction): AnnotationControlsState;
|
|
58
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type AnnotationRect } from './annotation-targets.js';
|
|
2
|
-
import { type DataAppAnnotationDraft } from '@altertable/data-app/contract';
|
|
3
|
-
/** Capture the visible target at selection time; never include annotation controls. */
|
|
4
|
-
export declare function captureAnnotationScreenshot(element: HTMLElement, region?: AnnotationRect): Promise<NonNullable<DataAppAnnotationDraft['context']['screenshot']>>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export type AnnotationPoint = {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
};
|
|
5
|
-
export type AnnotationRect = {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
export type AnnotationTargetElement = {
|
|
12
|
-
element: HTMLElement;
|
|
13
|
-
id: string;
|
|
14
|
-
label: string;
|
|
15
|
-
kind: 'widget' | 'element' | 'app';
|
|
16
|
-
};
|
|
17
|
-
export declare function discoverAnnotationTargets(root: HTMLElement | null): {
|
|
18
|
-
targets: AnnotationTargetElement[];
|
|
19
|
-
hasDuplicateIds: boolean;
|
|
20
|
-
};
|
|
21
|
-
export declare function annotationGeometry(element: HTMLElement): AnnotationRect;
|
|
22
|
-
export declare function annotationPoint(rect: AnnotationRect, point?: AnnotationPoint): {
|
|
23
|
-
cursor: AnnotationPoint;
|
|
24
|
-
anchor: {
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
/** The iframe document is a crop surface, never a selectable global-layout target. */
|
|
30
|
-
export declare function annotationRoot(root: HTMLElement | null): AnnotationTargetElement | undefined;
|
|
31
|
-
export declare function indexAnnotationTargets(root: HTMLElement | null): Map<string, AnnotationTargetElement>;
|
|
32
|
-
export declare function findAnnotationTarget(root: HTMLElement | null, id: string | undefined): AnnotationTargetElement | undefined;
|
|
33
|
-
export declare function normalizeAnnotationRect(area: AnnotationRect, target: AnnotationRect): AnnotationRect;
|
|
34
|
-
export declare function projectAnnotationRect(area: AnnotationRect, target: AnnotationRect): AnnotationRect;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type WidgetEvidence } from '../ui/WidgetEvidence.js';
|
|
2
|
-
type AnnotationPropsOptions = {
|
|
3
|
-
id: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
fallbackId?: string;
|
|
6
|
-
evidence?: WidgetEvidence;
|
|
7
|
-
kind?: 'widget' | 'element';
|
|
8
|
-
};
|
|
9
|
-
export declare function getAnnotationProps({ id, label, fallbackId, evidence, kind, }: AnnotationPropsOptions): {
|
|
10
|
-
'data-annotation-id': string;
|
|
11
|
-
'data-annotation-fallback-id': string | undefined;
|
|
12
|
-
'data-annotation-label': string | undefined;
|
|
13
|
-
'data-annotation-kind': "element" | "widget";
|
|
14
|
-
'data-annotation-queries': string;
|
|
15
|
-
'data-annotation-glossary': string;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ComponentRef, type RefObject } from 'react';
|
|
2
|
-
import { type DataAppAnnotationPresentation } from '@altertable/data-app/contract';
|
|
3
|
-
import { type AnnotationRect, type AnnotationTargetElement } from './annotation-targets.js';
|
|
4
|
-
import { type AnnotationPin } from './AnnotationMarkers.js';
|
|
5
|
-
type AnnotationRootRef = RefObject<ComponentRef<'div'> | null>;
|
|
6
|
-
export declare function useAnnotationTargets(rootRef: AnnotationRootRef, active: boolean): {
|
|
7
|
-
targets: AnnotationTargetElement[];
|
|
8
|
-
hasDuplicateIds: boolean;
|
|
9
|
-
} & {
|
|
10
|
-
scope?: HTMLElement;
|
|
11
|
-
};
|
|
12
|
-
type AnnotationGeometryOptions = {
|
|
13
|
-
rootRef: AnnotationRootRef;
|
|
14
|
-
target?: AnnotationTargetElement;
|
|
15
|
-
region?: AnnotationRect;
|
|
16
|
-
annotations: DataAppAnnotationPresentation['targets'];
|
|
17
|
-
};
|
|
18
|
-
export declare function useAnnotationGeometry({ rootRef, target, region, annotations, }: AnnotationGeometryOptions): {
|
|
19
|
-
pins: AnnotationPin[];
|
|
20
|
-
outline?: AnnotationRect;
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** Bind annotation delivery to this app's current iframe bridge. The host owns storage and submission. */
|
|
2
|
-
export declare function useDataAppAnnotations(): {
|
|
3
|
-
requestSendAnnotations(options?: {
|
|
4
|
-
signal?: AbortSignal;
|
|
5
|
-
}): Promise<null>;
|
|
6
|
-
reportAnnotationEditorState(state: {
|
|
7
|
-
hasUnsavedChanges: boolean;
|
|
8
|
-
}, options?: {
|
|
9
|
-
signal?: AbortSignal;
|
|
10
|
-
}): Promise<null>;
|
|
11
|
-
addAnnotation(draft: import("@altertable/data-app/contract").DataAppAnnotationDraft, options?: {
|
|
12
|
-
signal?: AbortSignal;
|
|
13
|
-
}): Promise<null>;
|
|
14
|
-
updateAnnotation(id: string, comment: string, options?: {
|
|
15
|
-
signal?: AbortSignal;
|
|
16
|
-
}): Promise<null>;
|
|
17
|
-
requestAnnotationModeChange(request: {
|
|
18
|
-
active: boolean;
|
|
19
|
-
}, options?: {
|
|
20
|
-
signal?: AbortSignal;
|
|
21
|
-
}): Promise<null>;
|
|
22
|
-
};
|
package/dist/types/bindings.d.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { type DetailNavigation } from './details.js';
|
|
2
|
-
import { type ActionBuilder, type ExplorationActions, type ActionDeclaration } from './actions.js';
|
|
3
|
-
import type { EvidenceDeclaration } from './ui/data-context.js';
|
|
4
|
-
import type { SearchSuggestion } from './ui/SearchTypeahead.js';
|
|
5
|
-
import { type ReactNode } from 'react';
|
|
6
|
-
import type { DateFormat } from '@altertable/data-app/format';
|
|
7
|
-
import type { DateRangeRequest } from '@altertable/data-app/contract';
|
|
8
|
-
import type { DataView, DisplayedSnapshot } from '@altertable/data-app/internal';
|
|
9
|
-
import type { MetricFormat } from '@altertable/data-app/format';
|
|
10
|
-
import type { DataReading, MetricValues } from '@altertable/data-app/internal';
|
|
11
|
-
import type { CsvCell, CsvTable, CsvExport } from './ui/csv-export.js';
|
|
12
|
-
import type { MetricDefinition } from './ui/metric.js';
|
|
13
|
-
import type { EmptyContent } from './ui/presentation.js';
|
|
14
|
-
import type { TableWidgetColumn } from './ui/TableWidget.js';
|
|
15
|
-
import type { WidgetEvidence } from './ui/WidgetEvidence.js';
|
|
16
|
-
import { DetailView } from './details.js';
|
|
17
|
-
/** Displayed data, or an initial loading reading. Pending filter values are never a source. */
|
|
18
|
-
export type ViewSource<Data, Input> = {
|
|
19
|
-
loading: true;
|
|
20
|
-
} | {
|
|
21
|
-
loading?: false;
|
|
22
|
-
data: Data;
|
|
23
|
-
input: Input;
|
|
24
|
-
};
|
|
25
|
-
type SourceReading<Source, Value> = Source extends {
|
|
26
|
-
loading: true;
|
|
27
|
-
} ? {
|
|
28
|
-
loading: true;
|
|
29
|
-
} : {
|
|
30
|
-
loading: false;
|
|
31
|
-
value: Value;
|
|
32
|
-
};
|
|
33
|
-
/** Keys supply IDs; accessors supply raw CSV values. Formats affect display only. */
|
|
34
|
-
export type DatasetColumn<Row> = {
|
|
35
|
-
label?: string;
|
|
36
|
-
} & ({
|
|
37
|
-
value: (row: Row) => CsvCell;
|
|
38
|
-
format?: (row: Row) => ReactNode;
|
|
39
|
-
} | {
|
|
40
|
-
value: (row: Row) => number | null | undefined;
|
|
41
|
-
format: MetricFormat;
|
|
42
|
-
} | {
|
|
43
|
-
value: (row: Row) => string | number | null | undefined;
|
|
44
|
-
format: Extract<DateFormat, {
|
|
45
|
-
kind: 'dateTime';
|
|
46
|
-
}>;
|
|
47
|
-
} | {
|
|
48
|
-
value: (row: Row) => string | null | undefined;
|
|
49
|
-
format: Extract<DateFormat, {
|
|
50
|
-
kind: 'date';
|
|
51
|
-
}>;
|
|
52
|
-
});
|
|
53
|
-
export type DatasetDefinition<Data, Input, Row, Evidence = WidgetEvidence> = {
|
|
54
|
-
name: string;
|
|
55
|
-
select: (data: Data, input: Input) => readonly Row[];
|
|
56
|
-
columns: Record<string, DatasetColumn<NoInfer<Row>>>;
|
|
57
|
-
rowKey: (row: NoInfer<Row>) => string | number;
|
|
58
|
-
evidence: Evidence;
|
|
59
|
-
emptyFallback?: EmptyContent;
|
|
60
|
-
/** Declare for records whose titles are useful query completions; omit for aggregate rows. */
|
|
61
|
-
suggestions?: DatasetSuggestionOptions<Row>;
|
|
62
|
-
};
|
|
63
|
-
export type DatasetSuggestionOptions<Row> = {
|
|
64
|
-
title: (row: Row) => string;
|
|
65
|
-
description?: (row: Row) => string;
|
|
66
|
-
/** Override query completion with an app action. */
|
|
67
|
-
onSelect?: (row: Row) => void;
|
|
68
|
-
};
|
|
69
|
-
/** Authoring references are registered by the owning view. */
|
|
70
|
-
export type DatasetDeclaration<Data, Input, Row> = DatasetDefinition<Data, Input, Row, EvidenceDeclaration>;
|
|
71
|
-
/** Real view ownership and registered references, shared by metrics and datasets. */
|
|
72
|
-
export declare class RegisteredBinding {
|
|
73
|
-
#private;
|
|
74
|
-
constructor(owner?: object, evidence?: WidgetEvidence);
|
|
75
|
-
/** @internal */
|
|
76
|
-
static owner(binding: RegisteredBinding): object | undefined;
|
|
77
|
-
protected assertSource(source: object): void;
|
|
78
|
-
static evidence(binding: RegisteredBinding, owner: object): WidgetEvidence;
|
|
79
|
-
}
|
|
80
|
-
export declare function registeredEvidence(binding: RegisteredBinding, owner: object): WidgetEvidence;
|
|
81
|
-
export declare class ExportDataset<Data, Input> extends RegisteredBinding {
|
|
82
|
-
#private;
|
|
83
|
-
readonly name: string;
|
|
84
|
-
/** @internal Undefined means this dataset declares no record suggestions. */
|
|
85
|
-
readSearchSuggestions(_source: ViewSource<Data, Input>): DataReading<readonly SearchSuggestion[]> | undefined;
|
|
86
|
-
constructor(name: string, csv: (snapshot: DisplayedSnapshot<Data, Input>) => CsvTable, owner?: object, evidence?: WidgetEvidence);
|
|
87
|
-
static csv<Data, Input>(dataset: ExportDataset<Data, Input>, snapshot: DisplayedSnapshot<Data, Input>): CsvTable;
|
|
88
|
-
}
|
|
89
|
-
export declare class Dataset<Data, Input, Row> extends ExportDataset<Data, Input> {
|
|
90
|
-
#private;
|
|
91
|
-
readonly evidence: WidgetEvidence;
|
|
92
|
-
constructor(definition: DatasetDefinition<Data, Input, Row>, owner?: object, timeZone?: string);
|
|
93
|
-
actions<const Actions extends Record<string, ActionDeclaration<Row, Input>>>(build: (action: ActionBuilder<Row, Input>) => Actions, options?: {
|
|
94
|
-
primary?: keyof Actions & string;
|
|
95
|
-
}): ExplorationActions<Row, Input>;
|
|
96
|
-
readSearchSuggestions(source: ViewSource<Data, Input>): DataReading<readonly SearchSuggestion[]> | undefined;
|
|
97
|
-
read: <Source extends ViewSource<Data, Input>>(source: Source) => SourceReading<Source, readonly Row[]>;
|
|
98
|
-
static table<Data, Input, Row>(dataset: Dataset<Data, Input, Row>, source: ViewSource<Data, Input>): {
|
|
99
|
-
title: string;
|
|
100
|
-
columns: [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
|
|
101
|
-
rowKey: (row: Row) => string | number;
|
|
102
|
-
evidence: WidgetEvidence;
|
|
103
|
-
emptyFallback: EmptyContent;
|
|
104
|
-
reading: {
|
|
105
|
-
loading: true;
|
|
106
|
-
} | {
|
|
107
|
-
loading: false;
|
|
108
|
-
value: readonly Row[];
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
export declare function bindDataset<Data, Input, Row>(definition: DatasetDefinition<Data, Input, Row>, owner?: object, timeZone?: string): Dataset<Data, Input, Row>;
|
|
113
|
-
export declare function datasetTable<Data, Input, Row>(dataset: Dataset<Data, Input, Row>, source: ViewSource<Data, Input>): {
|
|
114
|
-
title: string;
|
|
115
|
-
columns: [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
|
|
116
|
-
rowKey: (row: Row) => string | number;
|
|
117
|
-
evidence: WidgetEvidence;
|
|
118
|
-
emptyFallback: EmptyContent;
|
|
119
|
-
reading: {
|
|
120
|
-
loading: true;
|
|
121
|
-
} | {
|
|
122
|
-
loading: false;
|
|
123
|
-
value: readonly Row[];
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
export declare function datasetCsv<Data, Input>(dataset: ExportDataset<Data, Input>, snapshot: DisplayedSnapshot<Data, Input>): CsvTable;
|
|
127
|
-
export declare class Metric<Data, Input> extends RegisteredBinding {
|
|
128
|
-
#private;
|
|
129
|
-
readonly definition: MetricDefinition;
|
|
130
|
-
constructor(definition: MetricDefinition, select: (data: Data, input: Input) => MetricValues, date?: (input: Input) => DateRangeRequest, owner?: object);
|
|
131
|
-
read: <Source extends ViewSource<Data, Input>>(source: Source) => SourceReading<Source, MetricValues & {
|
|
132
|
-
period?: DateRangeRequest;
|
|
133
|
-
}>;
|
|
134
|
-
records<DetailData, DetailInput>(options: {
|
|
135
|
-
target: DetailView<DetailData, DetailInput>;
|
|
136
|
-
input: (displayedInput: Input) => DetailInput;
|
|
137
|
-
}): MetricRecords<Data, Input, DetailData, DetailInput>;
|
|
138
|
-
actions<const Actions extends Record<string, ActionDeclaration<void, Input>>>(build: (action: ActionBuilder<void, Input>) => Actions, options?: {
|
|
139
|
-
primary?: keyof Actions & string;
|
|
140
|
-
}): ExplorationActions<void, Input>;
|
|
141
|
-
}
|
|
142
|
-
/** A metric-owned record destination. It can only render from that metric's displayed source. */
|
|
143
|
-
export declare class MetricRecords<Data, Input, DetailData, DetailInput> {
|
|
144
|
-
#private;
|
|
145
|
-
constructor(metric: Metric<Data, Input>, target: DetailView<DetailData, DetailInput>, input: (displayedInput: Input) => DetailInput);
|
|
146
|
-
render(source: ViewSource<Data, Input>, navigation?: DetailNavigation): {
|
|
147
|
-
scope: string;
|
|
148
|
-
content: import("react").FunctionComponentElement<{
|
|
149
|
-
content: import("./details.js").DetailContent<any, any>;
|
|
150
|
-
input: any;
|
|
151
|
-
navigation?: DetailNavigation;
|
|
152
|
-
}>;
|
|
153
|
-
} | undefined;
|
|
154
|
-
static render<Data, Input, DetailData, DetailInput>(records: MetricRecords<Data, Input, DetailData, DetailInput>, metric: Metric<Data, Input>, source: ViewSource<Data, Input>, navigation?: DetailNavigation): {
|
|
155
|
-
scope: string;
|
|
156
|
-
content: import("react").FunctionComponentElement<{
|
|
157
|
-
content: import("./details.js").DetailContent<any, any>;
|
|
158
|
-
input: any;
|
|
159
|
-
navigation?: DetailNavigation;
|
|
160
|
-
}>;
|
|
161
|
-
} | undefined;
|
|
162
|
-
}
|
|
163
|
-
export declare function bindMetric<Data, Input>(definition: MetricDefinition, select: (data: Data, input: Input) => MetricValues, date?: (input: Input) => DateRangeRequest, owner?: object): Metric<Data, Input>;
|
|
164
|
-
export declare function displayedScope<Data, Input>(view: DataView<Data, Input>, describeInput: (input: Input) => string): DataReading<string>;
|
|
165
|
-
export declare function exportDatasets<Data, Input>(datasets: readonly [
|
|
166
|
-
ExportDataset<Data, Input>,
|
|
167
|
-
...ExportDataset<Data, Input>[]
|
|
168
|
-
], snapshot: DisplayedSnapshot<Data, Input>, scope: string, appTitle: string): CsvExport;
|
|
169
|
-
export {};
|
package/dist/types/content.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type DeclaredView } from './view-runtime.js';
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
import { type DataReading } from '@altertable/data-app/internal';
|
|
4
|
-
export type DataContentState<Data, Input> = {
|
|
5
|
-
scope: DataReading<string>;
|
|
6
|
-
} & ({
|
|
7
|
-
loading: true;
|
|
8
|
-
data?: never;
|
|
9
|
-
input?: never;
|
|
10
|
-
} | {
|
|
11
|
-
loading: false;
|
|
12
|
-
data: Data;
|
|
13
|
-
input: Input;
|
|
14
|
-
});
|
|
15
|
-
/** Content receives only displayed data, its original input, and the derived scope. */
|
|
16
|
-
export declare function defineDataContent<Data, Input>(render: (state: DataContentState<Data, Input>) => ReactNode, options?: {
|
|
17
|
-
describeInput?: (input: Input) => string;
|
|
18
|
-
}): {
|
|
19
|
-
loadingFallback: ReactNode;
|
|
20
|
-
children(this: void, data: Data, input: Input): ReactNode;
|
|
21
|
-
};
|
|
22
|
-
/** A section's request owner and render layout are declared together. */
|
|
23
|
-
export declare class ViewContent<Data, Input> {
|
|
24
|
-
#private;
|
|
25
|
-
constructor(view: DeclaredView<Data, Input>, render: (source: DataContentState<Data, Input>) => ReactNode, describeInput: (input: Input) => string);
|
|
26
|
-
static section<Data, Input>(content: ViewContent<Data, Input>): {
|
|
27
|
-
loadingFallback: ReactNode;
|
|
28
|
-
children(this: void, data: Data, input: Input): ReactNode;
|
|
29
|
-
view: DeclaredView<Data, Input, unknown>;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export declare function sectionContent<Data, Input>(content: ViewContent<Data, Input>): {
|
|
33
|
-
loadingFallback: ReactNode;
|
|
34
|
-
children(this: void, data: Data, input: Input): ReactNode;
|
|
35
|
-
view: DeclaredView<Data, Input, unknown>;
|
|
36
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** The reporting zone belongs to the displayed view, not the browser. */
|
|
2
|
-
export declare const DateFormattingContext: import("react").Context<{
|
|
3
|
-
timeZone?: string;
|
|
4
|
-
}>;
|
|
5
|
-
/** Resolve date display defaults for custom charts and narrative. Explicit options override the view and app. */
|
|
6
|
-
export declare function useDateFormatting(options?: {
|
|
7
|
-
locale?: string;
|
|
8
|
-
timeZone?: string;
|
|
9
|
-
}): {
|
|
10
|
-
locale: string;
|
|
11
|
-
timeZone: string;
|
|
12
|
-
};
|
package/dist/types/details.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import type { EmptyContent } from './ui/presentation.js';
|
|
3
|
-
import type { ViewSource } from './bindings.js';
|
|
4
|
-
import type { ViewResult } from './view-runtime.js';
|
|
5
|
-
export type DetailViewDefinition<Data, Input> = {
|
|
6
|
-
id: string;
|
|
7
|
-
title: ReactNode;
|
|
8
|
-
/** Validates untrusted navigation input before a detail operation can run. */
|
|
9
|
-
parseInput: (input: unknown) => Input;
|
|
10
|
-
describeInput: (input: Input) => string;
|
|
11
|
-
isEmpty: (data: Data) => boolean;
|
|
12
|
-
emptyFallback: EmptyContent;
|
|
13
|
-
};
|
|
14
|
-
/** A typed, query-backed destination. */
|
|
15
|
-
export declare class DetailView<Data, Input> {
|
|
16
|
-
#private;
|
|
17
|
-
readonly definition: DetailViewDefinition<Data, Input>;
|
|
18
|
-
readonly useResult: (input: Input) => ViewResult<Data, Input>;
|
|
19
|
-
constructor(definition: DetailViewDefinition<Data, Input>, useResult: (input: Input) => ViewResult<Data, Input>);
|
|
20
|
-
content(render: (source: ViewSource<Data, Input>) => ReactNode): DetailContent<Data, Input>;
|
|
21
|
-
static content<Data, Input>(target: DetailView<Data, Input>): DetailContent<Data, Input>;
|
|
22
|
-
}
|
|
23
|
-
/** Validate destination input before it enters either navigation or a lazy records query. */
|
|
24
|
-
export declare function parseDetailInput<Data, Input>(target: DetailView<Data, Input>, value: unknown): Input;
|
|
25
|
-
/** A destination’s rendered body. Pass these to DataApp.details. */
|
|
26
|
-
export declare class DetailContent<Data, Input> {
|
|
27
|
-
readonly target: DetailView<Data, Input>;
|
|
28
|
-
readonly render: (source: ViewSource<Data, Input>) => ReactNode;
|
|
29
|
-
constructor(target: DetailView<Data, Input>, render: (source: ViewSource<Data, Input>) => ReactNode);
|
|
30
|
-
}
|
|
31
|
-
export type DetailNavigation = {
|
|
32
|
-
open<Data, Input>(target: DetailView<Data, Input>, input: Input, trigger?: HTMLElement | SVGElement | null): void;
|
|
33
|
-
};
|
|
34
|
-
/** Resolve a detail target from an interaction. The destination validates input before fetching. */
|
|
35
|
-
export declare function useDetailNavigation(): DetailNavigation;
|
|
36
|
-
/** Mounts one replacement sheet for a stack of detail destinations. */
|
|
37
|
-
export declare function DetailRoutes({ details, children, }: {
|
|
38
|
-
details: readonly DetailContent<any, any>[];
|
|
39
|
-
children: ReactNode;
|
|
40
|
-
}): import("react").JSX.Element;
|
|
41
|
-
/** Render a destination in an inspection tab. The query starts only when that tab mounts. */
|
|
42
|
-
export declare function DetailRecords({ content, input, navigation, }: {
|
|
43
|
-
content: DetailContent<any, any>;
|
|
44
|
-
input: any;
|
|
45
|
-
navigation?: DetailNavigation;
|
|
46
|
-
}): import("react").JSX.Element;
|