@altertable/data-app 0.67.0 → 0.69.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/AGENTS.md +6 -0
- package/CONTRIBUTING.md +27 -1
- package/README.md +18 -21
- package/THIRD_PARTY_NOTICES +18 -0
- package/dist/chunks/index-22d576sn.js +153 -0
- package/dist/chunks/index-22d576sn.js.map +11 -0
- package/dist/chunks/{index-ktmvs916.js → index-2sbp9h2b.js} +37 -21
- package/dist/chunks/index-2sbp9h2b.js.map +13 -0
- package/dist/chunks/{index-23dktynd.js → index-ap60vggk.js} +4 -4
- package/dist/chunks/{index-m6n8ctfc.js → index-cv36cyna.js} +4 -4
- package/dist/chunks/index-cv36cyna.js.map +10 -0
- package/dist/chunks/{index-ag0cgnvq.js → index-k766wwwr.js} +13 -9
- package/dist/chunks/index-k766wwwr.js.map +13 -0
- package/dist/chunks/{index-mt93ff2b.js → index-kwnqycjt.js} +2 -2
- package/dist/chunks/index-kwnqycjt.js.map +10 -0
- package/dist/chunks/index-m0gbxtgp.js +355 -0
- package/dist/chunks/index-m0gbxtgp.js.map +13 -0
- package/dist/chunks/{index-8qfxv0h5.js → index-qhzdzca2.js} +3951 -2242
- package/dist/chunks/index-qhzdzca2.js.map +118 -0
- package/dist/chunks/{index-x69p7cv7.js → index-r7b1ftwy.js} +3 -3
- package/dist/chunks/index-r7b1ftwy.js.map +10 -0
- package/dist/chunks/{index-ev2b5aaf.js → index-sx488hvs.js} +4 -4
- package/dist/chunks/{index-f5cnbrjz.js → index-wss3gd3h.js} +39 -9
- package/dist/chunks/index-wss3gd3h.js.map +13 -0
- package/dist/chunks/{index-qd5xgx6y.js → index-zcqxfwdq.js} +5 -12
- package/dist/chunks/index-zcqxfwdq.js.map +13 -0
- package/dist/client/index.js +6 -6
- package/dist/core/appearance.js +1 -1
- package/dist/core/config.js +3 -3
- package/dist/core/contract.js +3 -3
- package/dist/core/format.js +10 -2
- package/dist/core/format.js.map +1 -1
- package/dist/embed/index.js +26 -25
- package/dist/embed/index.js.map +4 -4
- package/dist/index.js +3 -3
- package/dist/local.js +166 -144
- package/dist/local.js.map +8 -7
- package/dist/preview.js +1456 -0
- package/dist/preview.js.map +17 -0
- package/dist/react/embed/index.js +1 -1
- package/dist/react/index.js +272 -103
- package/dist/react/index.js.map +10 -11
- package/dist/react/ui/index.js +2124 -1254
- package/dist/react/ui/index.js.map +20 -13
- package/dist/server.js +68 -57
- package/dist/server.js.map +7 -6
- package/dist/types/client/download.d.ts +5 -0
- package/dist/types/client/iframe.d.ts +4 -2
- package/dist/types/client/logger.d.ts +10 -2
- package/dist/types/core/annotations.d.ts +5 -0
- package/dist/types/core/appearance.d.ts +2 -0
- package/dist/types/core/bridge-endpoint.d.ts +2 -2
- package/dist/types/core/bridge.d.ts +22 -0
- package/dist/types/core/config.d.ts +5 -0
- package/dist/types/core/contract.d.ts +3 -1
- package/dist/types/core/date-format.d.ts +24 -0
- package/dist/types/core/dimension.d.ts +2 -1
- package/dist/types/core/filters.d.ts +4 -3
- package/dist/types/core/format.d.ts +5 -3
- package/dist/types/core/messages.d.ts +3 -1
- package/dist/types/core/operation-types.d.ts +7 -7
- package/dist/types/core/time-interval.d.ts +96 -0
- package/dist/types/core/variables.d.ts +13 -4
- package/dist/types/embed/host.d.ts +4 -4
- package/dist/types/react/annotations/annotation-editor-state.d.ts +2 -0
- package/dist/types/react/annotations/annotation-targets.d.ts +1 -0
- package/dist/types/react/annotations/getAnnotationProps.d.ts +5 -3
- package/dist/types/react/annotations/useAnnotationGeometry.d.ts +2 -2
- package/dist/types/react/bindings.d.ts +26 -3
- package/dist/types/react/date-formatting.d.ts +12 -0
- package/dist/types/react/hooks.d.ts +10 -9
- package/dist/types/react/index.d.ts +7 -2
- package/dist/types/react/search-suggestions.d.ts +8 -0
- package/dist/types/react/style-contract.d.ts +13 -5
- package/dist/types/react/ui/ChartLegend.d.ts +4 -3
- package/dist/types/react/ui/ChoicePicker.d.ts +2 -0
- package/dist/types/react/ui/ComposedChart.d.ts +1 -1
- package/dist/types/react/ui/DataApp.d.ts +5 -4
- package/dist/types/react/ui/DataAppFrame.d.ts +14 -3
- package/dist/types/react/ui/DataTable.d.ts +6 -4
- package/dist/types/react/ui/DataWidget.d.ts +4 -0
- package/dist/types/react/ui/DateDisplay.d.ts +9 -0
- package/dist/types/react/ui/DateRangePicker.d.ts +3 -1
- package/dist/types/react/ui/DateTimeTooltip.d.ts +3 -2
- package/dist/types/react/ui/DimensionPicker.d.ts +3 -1
- package/dist/types/react/ui/EmptyState.d.ts +1 -1
- package/dist/types/react/ui/FunnelChart.d.ts +20 -0
- package/dist/types/react/ui/GradientScroll.d.ts +8 -0
- package/dist/types/react/ui/Grid.d.ts +1 -1
- package/dist/types/react/ui/JourneyChart.d.ts +10 -0
- package/dist/types/react/ui/MetricWidget.d.ts +2 -0
- package/dist/types/react/ui/NumberFilterPicker.d.ts +3 -1
- package/dist/types/react/ui/PeriodSummary.d.ts +2 -1
- package/dist/types/react/ui/PickerField.d.ts +15 -0
- package/dist/types/react/ui/PopoverSurface.d.ts +5 -0
- package/dist/types/react/ui/RequestHint.d.ts +2 -2
- package/dist/types/react/ui/RetentionChart.d.ts +27 -0
- package/dist/types/react/ui/SearchField.d.ts +3 -1
- package/dist/types/react/ui/SearchTypeahead.d.ts +15 -0
- package/dist/types/react/ui/SectionHeading.d.ts +8 -0
- package/dist/types/react/ui/Select.d.ts +5 -1
- package/dist/types/react/ui/Sheet.d.ts +3 -1
- package/dist/types/react/ui/TableWidget.d.ts +8 -0
- package/dist/types/react/ui/Tabs.d.ts +4 -3
- package/dist/types/react/ui/VariableBar.d.ts +1 -1
- package/dist/types/react/ui/VisualizationWidget.d.ts +1 -1
- package/dist/types/react/ui/chart-data.d.ts +9 -0
- package/dist/types/react/ui/chart-date-axis.d.ts +15 -0
- package/dist/types/react/ui/chart-interaction.d.ts +21 -0
- package/dist/types/react/ui/chart-primitives.d.ts +7 -5
- package/dist/types/react/ui/chart-time.d.ts +16 -0
- package/dist/types/react/ui/chartColor.d.ts +1 -0
- package/dist/types/react/ui/icons.d.ts +3 -1
- package/dist/types/react/ui/index.d.ts +15 -4
- package/dist/types/react/ui/journey-flow.d.ts +49 -0
- package/dist/types/react/ui/metric-comparison.d.ts +2 -2
- package/dist/types/react/ui/metric.d.ts +2 -2
- package/dist/types/react/ui/presentation.d.ts +2 -0
- package/dist/types/react/ui/searchItems.d.ts +2 -0
- package/dist/types/react/ui/useSvgId.d.ts +2 -0
- package/dist/types/react/ui/variables.d.ts +1 -1
- package/dist/types/react/view-control-bar.d.ts +16 -0
- package/dist/types/react/view-controls.d.ts +3 -2
- package/dist/types/react/view-runtime.d.ts +3 -1
- package/dist/types/react/view.d.ts +14 -2
- package/dist/types/server/local.d.ts +3 -1
- package/dist/types/server/preview/host.d.ts +1 -0
- package/dist/types/server/preview/index.d.ts +16 -0
- package/dist/types/server/reload-channel.d.ts +6 -0
- package/dist/types/server/request-body.d.ts +4 -0
- package/dist/worker.js +2 -2
- package/docs/app-authoring.md +17 -9
- package/docs/client.md +1 -1
- package/docs/contract.md +10 -10
- package/docs/embed.md +11 -3
- package/docs/formatting-and-appearance.md +36 -5
- package/docs/layout.md +31 -8
- package/docs/react-embed.md +4 -4
- package/docs/react.md +1 -1
- package/docs/server-bun.md +25 -0
- package/docs/server.md +1 -1
- package/docs/styling.md +7 -28
- package/docs/ui.md +33 -12
- package/docs/variables.md +92 -15
- package/docs/views.md +13 -36
- package/docs/widgets.md +38 -23
- package/docs/worker.md +2 -1
- package/examples/starter-data-app/index.tsx +0 -1
- package/examples/starter-local-data-app/.bun-version +1 -0
- package/examples/starter-local-data-app/.node-version +1 -0
- package/examples/starter-local-data-app/.oxfmtrc.json +4 -0
- package/examples/starter-local-data-app/.oxlintrc.json +33 -0
- package/examples/starter-local-data-app/AGENTS.md +22 -0
- package/examples/starter-local-data-app/README.md +54 -0
- package/examples/starter-local-data-app/app.ts +22 -0
- package/examples/starter-local-data-app/bunfig.toml +2 -0
- package/examples/starter-local-data-app/package.json +33 -0
- package/examples/starter-local-data-app/src/App.tsx +8 -0
- package/examples/starter-local-data-app/src/assets.d.ts +1 -0
- package/examples/starter-local-data-app/src/data-context.ts +21 -0
- package/examples/starter-local-data-app/src/favicon.svg +13 -0
- package/examples/starter-local-data-app/src/index.html +14 -0
- package/examples/starter-local-data-app/src/main.tsx +7 -0
- package/examples/starter-local-data-app/src/operations.ts +6 -0
- package/examples/starter-local-data-app/src/server.ts +6 -0
- package/examples/starter-local-data-app/tsconfig.json +15 -0
- package/package.json +13 -3
- package/dist/chunks/index-8qfxv0h5.js.map +0 -108
- package/dist/chunks/index-ag0cgnvq.js.map +0 -13
- package/dist/chunks/index-dq7b35fn.js +0 -307
- package/dist/chunks/index-dq7b35fn.js.map +0 -13
- package/dist/chunks/index-f5cnbrjz.js.map +0 -13
- package/dist/chunks/index-ktmvs916.js.map +0 -13
- package/dist/chunks/index-m6n8ctfc.js.map +0 -10
- package/dist/chunks/index-mev09s5v.js +0 -77
- package/dist/chunks/index-mev09s5v.js.map +0 -10
- package/dist/chunks/index-mt93ff2b.js.map +0 -10
- package/dist/chunks/index-qd5xgx6y.js.map +0 -13
- package/dist/chunks/index-x69p7cv7.js.map +0 -10
- package/dist/types/react/shellStyles.d.ts +0 -3
- package/dist/types/react/ui/DataAppSkeleton.d.ts +0 -7
- /package/dist/chunks/{index-23dktynd.js.map → index-ap60vggk.js.map} +0 -0
- /package/dist/chunks/{index-ev2b5aaf.js.map → index-sx488hvs.js.map} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { type DateFormat } from '../../core/format.js';
|
|
3
|
+
export type DateDisplayProps = {
|
|
4
|
+
value: string | Date | number | null | undefined;
|
|
5
|
+
/** Calendar dates stay dates; instants require a Date, epoch milliseconds, or an offset-bearing ISO string. */
|
|
6
|
+
format?: DateFormat;
|
|
7
|
+
} & Omit<ComponentPropsWithRef<'time'>, 'children' | 'dateTime'>;
|
|
8
|
+
/** Readable dates with exact-time disclosure for instants; invalid or ambiguous values render as missing. */
|
|
9
|
+
export declare function DateDisplay({ value, format, className, ...props }: DateDisplayProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ControlLabelPlacement } from './PickerField.js';
|
|
1
2
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
3
|
import { type CalendarDate } from '@internationalized/date';
|
|
3
4
|
import { DateRangePicker as AriaDateRangePicker } from 'react-aria-components';
|
|
@@ -5,6 +6,7 @@ import { type DatePresetId, type DateRange } from '../../core/date-range.js';
|
|
|
5
6
|
export type { DatePresetId, DateRange } from '../../core/date-range.js';
|
|
6
7
|
export type DateRangePickerProps = {
|
|
7
8
|
label?: string;
|
|
9
|
+
labelPlacement?: Exclude<ControlLabelPlacement, 'inline'>;
|
|
8
10
|
value: DateRange | null;
|
|
9
11
|
onChange: (range: DateRange | null) => void;
|
|
10
12
|
minDate?: string;
|
|
@@ -25,4 +27,4 @@ export type DateRangePickerProps = {
|
|
|
25
27
|
};
|
|
26
28
|
} & Omit<ComponentProps<typeof AriaDateRangePicker<CalendarDate>>, 'children' | 'value' | 'onChange' | 'minValue' | 'maxValue' | 'isOpen' | 'onOpenChange' | 'defaultValue' | 'defaultOpen'>;
|
|
27
29
|
/** The app owns URL state; `dateRangeControl` binds a date variable to this picker. */
|
|
28
|
-
export declare function DateRangePicker({ label, value, onChange, minDate, maxDate, maxRangeDays, timeZone, resetValue, isDefault, onReset, onPresetChange, selectedPresetId, calendarFooter, comparison, className, ...props }: DateRangePickerProps): import("react").JSX.Element;
|
|
30
|
+
export declare function DateRangePicker({ label, labelPlacement, value, onChange, minDate, maxDate, maxRangeDays, timeZone, resetValue, isDefault, onReset, onPresetChange, selectedPresetId, calendarFooter, comparison, className, ...props }: DateRangePickerProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,8 @@ import { type HelpPopoverProps } from './HelpPopover.js';
|
|
|
3
3
|
export type DateTimeTooltipProps = {
|
|
4
4
|
date: Date;
|
|
5
5
|
timeZone?: string;
|
|
6
|
+
locale?: string;
|
|
6
7
|
children?: ReactNode;
|
|
7
8
|
} & Omit<HelpPopoverProps, 'trigger' | 'triggerLabel' | 'label' | 'children'>;
|
|
8
|
-
/**
|
|
9
|
-
export declare function DateTimeTooltip({ date, timeZone, children, panelProps, ...props }: DateTimeTooltipProps): import("react").JSX.Element;
|
|
9
|
+
/** Exact-time disclosure uses the same reporting zone and locale as other date displays. */
|
|
10
|
+
export declare function DateTimeTooltip({ date, timeZone, locale, children, panelProps, ...props }: DateTimeTooltipProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ControlLabelPlacement } from './PickerField.js';
|
|
1
2
|
import type { DimensionOption, DimensionSelection, DimensionValue, DimensionVariable } from '../../core/dimension.js';
|
|
2
3
|
/** Adapts the typed dimension contract to the shared ChoicePicker control. */
|
|
3
|
-
export declare function DimensionPicker<T extends DimensionValue>({ filter, value, onChange, options: suppliedOptions, loading, error, onRetry, }: {
|
|
4
|
+
export declare function DimensionPicker<T extends DimensionValue>({ filter, labelPlacement, value, onChange, options: suppliedOptions, loading, error, onRetry, }: {
|
|
4
5
|
filter: DimensionVariable<T>;
|
|
6
|
+
labelPlacement?: ControlLabelPlacement;
|
|
5
7
|
value: DimensionSelection<T>;
|
|
6
8
|
onChange: (value: DimensionSelection<T>) => void;
|
|
7
9
|
options?: readonly DimensionOption<T>[];
|
|
@@ -3,4 +3,4 @@ export type EmptyStateProps = EmptyContent & {
|
|
|
3
3
|
variant?: 'visual' | 'table';
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function EmptyState({ title, description, variant, className, }: EmptyStateProps): import("react").JSX.Element;
|
|
6
|
+
export declare function EmptyState({ title, description, action, variant, className, }: EmptyStateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CountChartProps } from './chart-data.js';
|
|
2
|
+
/** Ordered step with a unique, nonblank ID. */
|
|
3
|
+
export type FunnelChartStep = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type FunnelChartSeries = {
|
|
8
|
+
/** Unique, nonblank population ID. */
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
/** Finite, nonnegative counts aligned with steps and nonincreasing. */
|
|
12
|
+
values: readonly number[];
|
|
13
|
+
};
|
|
14
|
+
export type FunnelChartProps = CountChartProps & {
|
|
15
|
+
steps: readonly FunnelChartStep[];
|
|
16
|
+
series: readonly FunnelChartSeries[];
|
|
17
|
+
};
|
|
18
|
+
/** Conversion columns with previous-step drop-off, normalized to each series' first step.
|
|
19
|
+
* Owns series highlighting and portion-specific inspection; compose inside VisualizationWidget. */
|
|
20
|
+
export declare function FunnelChart({ steps, series, unit, ariaLabel, className, formatValue, }: FunnelChartProps): import("react").JSX.Element;
|
|
@@ -10,6 +10,14 @@ export declare function scrollFadeEdges(metrics: ScrollMetrics, axis: 'vertical'
|
|
|
10
10
|
start: boolean;
|
|
11
11
|
end: boolean;
|
|
12
12
|
};
|
|
13
|
+
/** Track overflow on the element that owns scrolling. */
|
|
14
|
+
export declare function useScrollFade(axis: 'vertical' | 'horizontal'): {
|
|
15
|
+
ref: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
|
|
16
|
+
edges: {
|
|
17
|
+
start: boolean;
|
|
18
|
+
end: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
13
21
|
/** Fades only scrollable edges; content, size, and scroll changes update the mask. */
|
|
14
22
|
export declare function GradientScroll({ axis, fadeStart, className, children, ref, ...props }: GradientScrollProps): import("react").JSX.Element;
|
|
15
23
|
export {};
|
|
@@ -5,7 +5,7 @@ export type GridProps = {
|
|
|
5
5
|
columns?: 1 | 2 | 3 | 4;
|
|
6
6
|
minItemWidth?: 'compact' | 'regular' | 'wide';
|
|
7
7
|
gap?: 'sm' | 'md' | 'lg';
|
|
8
|
-
/**
|
|
8
|
+
/** `stretch` gives widgets in each row the same height. */
|
|
9
9
|
align?: 'stretch' | 'start';
|
|
10
10
|
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
11
11
|
/** Responsive layout for peer cards and panels. Cards keep their content height by default. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CountChartProps } from './chart-data.js';
|
|
2
|
+
import { type JourneyChartPath } from './journey-flow.js';
|
|
3
|
+
export type { JourneyChartPath } from './journey-flow.js';
|
|
4
|
+
export type JourneyChartProps = CountChartProps & {
|
|
5
|
+
/** Full paths and their population counts. Branches and outcomes are derived internally. */
|
|
6
|
+
paths: readonly JourneyChartPath[];
|
|
7
|
+
};
|
|
8
|
+
/** Path exploration with two initial steps, expandable prefixes, and three events per depth.
|
|
9
|
+
* Counts and flows use the Step 1 population. Compose inside VisualizationWidget. */
|
|
10
|
+
export declare function JourneyChart({ paths, unit, ariaLabel, className, formatValue, }: JourneyChartProps): import("react").JSX.Element;
|
|
@@ -7,6 +7,8 @@ import type { MetricReading } from '../../core/reading.js';
|
|
|
7
7
|
import { type MetricDefinition } from './metric.js';
|
|
8
8
|
type MetricWidgetBaseProps = {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Document outline level. The label keeps the shared widget-heading appearance. */
|
|
11
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
10
12
|
annotationId?: string;
|
|
11
13
|
description?: ReactNode;
|
|
12
14
|
comparison?: MetricComparison;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type ControlLabelPlacement } from './PickerField.js';
|
|
1
2
|
import { type NumberFilter, type NumberSelection } from '../../core/filters.js';
|
|
2
3
|
export type NumberFilterPickerProps = {
|
|
3
4
|
filter: NumberFilter;
|
|
5
|
+
labelPlacement?: ControlLabelPlacement;
|
|
4
6
|
value: NumberSelection;
|
|
5
7
|
onChange: (value: NumberSelection) => void;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
};
|
|
8
10
|
/** Edit a numeric predicate in a panel. Apply commits one complete value; dismissing discards the draft. */
|
|
9
|
-
export declare function NumberFilterPicker({ filter, value, onChange, disabled, }: NumberFilterPickerProps): import("react").JSX.Element;
|
|
11
|
+
export declare function NumberFilterPicker({ filter, value, onChange, disabled, labelPlacement, }: NumberFilterPickerProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReportingPeriod } from '../../core/contract.js';
|
|
2
|
+
import { type DateTimeFormatOptions } from '../../core/format.js';
|
|
2
3
|
export type { ReportingPeriod } from '../../core/contract.js';
|
|
3
4
|
export type PeriodComparison = {
|
|
4
5
|
kind: 'previous';
|
|
@@ -11,6 +12,6 @@ export type PeriodSummaryProps = {
|
|
|
11
12
|
comparison?: PeriodComparison;
|
|
12
13
|
className?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare function reportingPeriodText(period: ReportingPeriod): string;
|
|
15
|
+
export declare function reportingPeriodText(period: ReportingPeriod, options?: DateTimeFormatOptions): string;
|
|
15
16
|
/** Read-only period context for the variable bar, including exact bounds for assistive technology. */
|
|
16
17
|
export declare function PeriodSummary({ period, comparison, className, }: PeriodSummaryProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Inline labels sit with the value; above and beside labels have a separate layout slot. */
|
|
3
|
+
export type ControlLabelPlacement = 'inline' | 'above' | 'beside';
|
|
4
|
+
/** Popup triggers retain their accessible names when the visible label moves outside. */
|
|
5
|
+
export declare function PickerField({ label, labelPlacement, children, }: {
|
|
6
|
+
label: string;
|
|
7
|
+
labelPlacement?: ControlLabelPlacement;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
10
|
+
/** Shared label, value, and disclosure layout for selection and predicate controls. */
|
|
11
|
+
export declare function PickerTriggerContent({ label, labelPlacement, value, }: {
|
|
12
|
+
label: string;
|
|
13
|
+
labelPlacement: ControlLabelPlacement;
|
|
14
|
+
value: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { Popover } from 'react-aria-components';
|
|
3
|
+
export declare const PopoverContainerContext: import("react").Context<HTMLElement | undefined>;
|
|
4
|
+
/** Shared popup paint; each control owns placement, dimensions, and contents. */
|
|
5
|
+
export declare function PopoverSurface({ className, ...props }: ComponentProps<typeof Popover>): import("react").JSX.Element;
|
|
@@ -14,7 +14,7 @@ export declare function RequestHint({ status, retryLabel, }: {
|
|
|
14
14
|
status?: WidgetStatus;
|
|
15
15
|
retryLabel?: string;
|
|
16
16
|
}): import("react").JSX.Element;
|
|
17
|
-
/**
|
|
17
|
+
/** Supplied status reserves a fixed footprint across request states; omission leaves space for the title. */
|
|
18
18
|
export declare function WidgetStatusControl({ status }: {
|
|
19
19
|
status?: WidgetStatus;
|
|
20
|
-
}): import("react").JSX.Element;
|
|
20
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CountChartProps } from './chart-data.js';
|
|
2
|
+
export type RetentionChartPoint = {
|
|
3
|
+
/** Nonnegative integer, unique per series; uneven offsets retain their distance. */
|
|
4
|
+
offset: number;
|
|
5
|
+
/** Must agree across series for the same offset. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Observed retention fraction in [0, 1], or null for an unobserved period. */
|
|
8
|
+
rate: number | null;
|
|
9
|
+
/** Finite count in [0, cohortSize]; null exactly when rate is null. */
|
|
10
|
+
retainedCount: number | null;
|
|
11
|
+
/** Observed but still accumulating; drawn as a dotted tail. */
|
|
12
|
+
incomplete?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type RetentionChartSeries = {
|
|
15
|
+
/** Unique, nonblank cohort or segment ID. */
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
/** Finite, nonnegative starting population. */
|
|
19
|
+
cohortSize: number;
|
|
20
|
+
points: readonly RetentionChartPoint[];
|
|
21
|
+
};
|
|
22
|
+
export type RetentionChartProps = CountChartProps & {
|
|
23
|
+
series: readonly RetentionChartSeries[];
|
|
24
|
+
};
|
|
25
|
+
/** Query-defined retention curves with count inspection and dotted incomplete periods.
|
|
26
|
+
* Rates are not recomputed from counts. Compose inside VisualizationWidget. */
|
|
27
|
+
export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, }: RetentionChartProps): import("react").JSX.Element;
|
|
@@ -6,6 +6,8 @@ export type SearchFieldProps = {
|
|
|
6
6
|
onSubmit?: (value: string) => void;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
showLabel?: boolean;
|
|
9
|
+
/** Enable page search shortcuts on one primary search field per app. */
|
|
10
|
+
focusShortcut?: boolean;
|
|
9
11
|
size?: 'default' | 'compact';
|
|
10
12
|
description?: ReactNode;
|
|
11
13
|
status?: ReactNode;
|
|
@@ -18,4 +20,4 @@ export type SearchFieldProps = {
|
|
|
18
20
|
* The caller owns filtering, URL state, and whether search runs while typing or on submit.
|
|
19
21
|
* Escape and Clear reset the query.
|
|
20
22
|
*/
|
|
21
|
-
export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
|
|
23
|
+
export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, focusShortcut, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type SearchFieldProps } from './SearchField.js';
|
|
2
|
+
export type SearchSuggestion = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Override completing the query with this title, for example to open record details. */
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type SearchTypeaheadProps = SearchFieldProps & {
|
|
10
|
+
/** Suggestions from the displayed result, in its order. No additional filtering or request. */
|
|
11
|
+
items: readonly SearchSuggestion[];
|
|
12
|
+
};
|
|
13
|
+
/** An editable combobox with manual selection: typing searches, selecting completes the query unless overridden.
|
|
14
|
+
* Input retains focus during navigation; Escape dismisses suggestions before clearing search. */
|
|
15
|
+
export declare function SearchTypeahead({ items, busy, inputProps, ...props }: SearchTypeaheadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
export type SectionHeadingProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Document outline level. Defaults to the section level below the page title. */
|
|
5
|
+
level?: 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
} & Omit<ComponentPropsWithRef<'h2'>, 'children'>;
|
|
7
|
+
/** A section title with the shared section-heading appearance. */
|
|
8
|
+
export declare function SectionHeading({ children, level, className, ...props }: SectionHeadingProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type ControlLabelPlacement } from './PickerField.js';
|
|
1
2
|
import { type ChoiceOption } from '../../core/variables.js';
|
|
2
3
|
export type SelectProps = {
|
|
3
4
|
label: string;
|
|
5
|
+
labelPlacement?: ControlLabelPlacement;
|
|
4
6
|
options: readonly ChoiceOption[];
|
|
5
7
|
value: string;
|
|
6
8
|
onChange: (value: string) => void;
|
|
@@ -9,6 +11,8 @@ export type SelectProps = {
|
|
|
9
11
|
name?: string;
|
|
10
12
|
id?: string;
|
|
11
13
|
className?: string;
|
|
14
|
+
/** Align the popup with the selection button. Defaults to start. */
|
|
15
|
+
align?: 'start' | 'end';
|
|
12
16
|
};
|
|
13
17
|
/** Labeled single selection with keyboard navigation and a styled listbox. */
|
|
14
|
-
export declare function Select({ label, options, value, onChange, disabled, required, className, ...props }: SelectProps): import("react").JSX.Element;
|
|
18
|
+
export declare function Select({ label, options, value, onChange, disabled, required, className, align, labelPlacement, ...props }: SelectProps): import("react").JSX.Element;
|
|
@@ -10,10 +10,12 @@ export type SheetProps = {
|
|
|
10
10
|
footer?: ReactNode;
|
|
11
11
|
wide?: boolean;
|
|
12
12
|
placement?: 'side' | 'center';
|
|
13
|
+
/** Edge for side placement. Defaults to right; small screens use a bottom sheet. */
|
|
14
|
+
side?: 'left' | 'right';
|
|
13
15
|
returnFocus?: RefObject<HTMLElement | null>;
|
|
14
16
|
} & SheetDialogProps;
|
|
15
17
|
/**
|
|
16
18
|
* Uses the native dialog top layer and focus trap. Closing keeps the modal mounted until its
|
|
17
19
|
* exit transition completes.
|
|
18
20
|
*/
|
|
19
|
-
export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
|
|
21
|
+
export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, side, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
|
|
@@ -29,8 +29,14 @@ export type TableDisplayMode = {
|
|
|
29
29
|
};
|
|
30
30
|
type TableWidgetBaseProps<Row> = {
|
|
31
31
|
title: ReactNode;
|
|
32
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
32
33
|
annotationId?: string;
|
|
34
|
+
/** Show the matching supplied-row count before pagination or limits. Defaults to true. */
|
|
35
|
+
showCount?: boolean;
|
|
36
|
+
/** Override the derived count, for example with a server total. Hidden when showCount is false or loading. */
|
|
33
37
|
count?: number;
|
|
38
|
+
/** Clear only filters affecting this dataset. Supply only while those filters are active; enables empty-result recovery. */
|
|
39
|
+
onClearFilters?: () => void;
|
|
34
40
|
description?: ReactNode;
|
|
35
41
|
columns: readonly [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
|
|
36
42
|
/** Unique, nonempty row identity. Numeric keys must be finite; 1 and "1" collide. */
|
|
@@ -41,6 +47,8 @@ type TableWidgetBaseProps<Row> = {
|
|
|
41
47
|
search?: TableWidgetSearch<Row>;
|
|
42
48
|
/** Valid result with no rows; the header remains visible. */
|
|
43
49
|
emptyFallback: EmptyContent;
|
|
50
|
+
/** No local search matches or explicitly filtered results. Defaults to “No matching results” with recovery guidance. */
|
|
51
|
+
noMatchesFallback?: EmptyContent;
|
|
44
52
|
} & TableDisplayMode & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
45
53
|
/** Composes VisualizationWidget with DataTable, search, and local pagination.
|
|
46
54
|
* Columns own header and body semantics; the first column is the row header.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { Tabs as AriaTabs,
|
|
1
|
+
import { type ComponentPropsWithRef, type RefAttributes } from 'react';
|
|
2
|
+
import { Tabs as AriaTabs, type TabListProps, Tab as AriaTab, TabPanels, TabPanel as AriaTabPanel } from 'react-aria-components/Tabs';
|
|
3
3
|
/** React Aria tabs with keyboard and ARIA behavior; pair each Tab and TabPanel by stable id. */
|
|
4
|
-
export {
|
|
4
|
+
export { TabPanels };
|
|
5
|
+
export declare function TabList<T>({ className, ref, ...props }: TabListProps<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
5
6
|
export declare function Tab(props: ComponentPropsWithRef<typeof AriaTab>): import("react").JSX.Element;
|
|
6
7
|
export declare function TabPanel(props: ComponentPropsWithRef<typeof AriaTabPanel>): import("react").JSX.Element;
|
|
7
8
|
export declare function Tabs({ className, ...props }: ComponentPropsWithRef<typeof AriaTabs>): import("react").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
|
2
2
|
export type VariableBarProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
5
|
-
/**
|
|
5
|
+
/** User-controlled inputs below the page header. */
|
|
6
6
|
export declare function VariableBar({ children, className, role, 'aria-label': ariaLabel, ...props }: VariableBarProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
2
|
import { type DataWidgetProps } from './DataWidget.js';
|
|
3
3
|
import type { BoundWidgetReading } from './presentation.js';
|
|
4
|
-
type VisualizationWidgetBaseProps = Pick<DataWidgetProps, 'title' | 'annotationId' | 'description' | 'count' | 'action' | 'evidence' | 'status' | 'emptyFallback'> & {
|
|
4
|
+
type VisualizationWidgetBaseProps = Pick<DataWidgetProps, 'title' | 'headingLevel' | 'annotationId' | 'description' | 'count' | 'action' | 'evidence' | 'status' | 'emptyFallback'> & {
|
|
5
5
|
/** Footer controls, such as table pagination. */
|
|
6
6
|
footer?: ReactNode;
|
|
7
7
|
} & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
@@ -11,6 +11,15 @@ export type ValueChartProps = {
|
|
|
11
11
|
ariaLabel: string;
|
|
12
12
|
formatValue?: (value: number) => string;
|
|
13
13
|
};
|
|
14
|
+
export type CountChartProps = {
|
|
15
|
+
/** Accessible measure and scope description. */
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
/** Population unit, such as users or sessions. */
|
|
18
|
+
unit: string;
|
|
19
|
+
/** Formats counts; rates use percentage formatting. */
|
|
20
|
+
formatValue?: (value: number) => string;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
14
23
|
/** Independent observation on two finite numeric axes. */
|
|
15
24
|
export type ScatterChartItem = {
|
|
16
25
|
id: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { XAxis } from 'recharts';
|
|
3
|
+
type LabelFormatter = (value: unknown) => string;
|
|
4
|
+
export declare function ChartDateAxes({ data, children, }: {
|
|
5
|
+
data: readonly unknown[];
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function useDateAxisLabel(id?: string | number): LabelFormatter | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Infers temporal input from ISO dates, zoned ISO timestamps, and Date values.
|
|
11
|
+
* Use scale="utc" for epoch milliseconds or type="category" for date-like categories.
|
|
12
|
+
* Explicit tick formatters and tick lists retain authored axis behavior.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ChartXAxis<Row = unknown, Value = string | number>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export declare const ChartInteraction: import("react").Context<{
|
|
3
|
+
pointer: boolean;
|
|
4
|
+
point: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
} | undefined;
|
|
8
|
+
seriesCount: number;
|
|
9
|
+
registerPoint: (id: string, x: number, y: number) => () => void;
|
|
10
|
+
registerSeries: (id: string) => () => void;
|
|
11
|
+
hovered: string | null;
|
|
12
|
+
setHovered: (id: string | null) => void;
|
|
13
|
+
} | null>;
|
|
14
|
+
export declare function useChartSeries(id?: string): {
|
|
15
|
+
id: string;
|
|
16
|
+
active: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function ChartSeries({ id, children, }: {
|
|
19
|
+
id: string;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { type
|
|
3
|
-
|
|
1
|
+
export { ChartXAxis } from './chart-date-axis.js';
|
|
2
|
+
import { type ComponentProps } from 'react';
|
|
3
|
+
import { type DotProps, Scatter, YAxis, CartesianGrid, Tooltip, DefaultTooltipContent, type BarProps, type LineProps, type AreaProps } from 'recharts';
|
|
4
4
|
/** Hollow sample marker shared by standalone and composed series. */
|
|
5
5
|
export declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
|
|
6
6
|
active?: boolean;
|
|
7
7
|
}): import("react").JSX.Element;
|
|
8
8
|
/** Shared series defaults; native props override every authored choice. */
|
|
9
9
|
export declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
|
|
10
|
-
/**
|
|
10
|
+
/** Sample dots are opt-in with dot=true.
|
|
11
11
|
* activeDot independently controls the hovered point. Native dot props and renderers remain available. */
|
|
12
12
|
export declare function ChartLine<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: LineProps<Row, Value>): import("react").JSX.Element;
|
|
13
13
|
/** Filled series with the same sample-dot and activeDot options as ChartLine. */
|
|
14
14
|
export declare function ChartArea<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: AreaProps<Row, Value>): import("react").JSX.Element;
|
|
15
15
|
export declare function ChartScatter<Row = unknown, Value = number>(props: ComponentProps<typeof Scatter<Row, Value>>): import("react").JSX.Element;
|
|
16
|
-
export declare function ChartXAxis<Row = unknown, Value = string | number>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
17
16
|
export declare function ChartYAxis<Row = unknown, Value = number>(props: ComponentProps<typeof YAxis<Row, Value>>): import("react").JSX.Element;
|
|
18
17
|
export declare function ChartGrid(props: ComponentProps<typeof CartesianGrid>): import("react").JSX.Element;
|
|
18
|
+
export declare function ChartTooltipContent(props: ComponentProps<typeof DefaultTooltipContent> & {
|
|
19
|
+
active?: boolean;
|
|
20
|
+
}): import("react").JSX.Element | null;
|
|
19
21
|
/** Uses the same surface as single-series inspection; Recharts owns interaction. */
|
|
20
22
|
export declare function ChartTooltip(props: ComponentProps<typeof Tooltip>): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Only ISO calendar dates and zoned instants are inferred. Numbers require scale="utc". */
|
|
2
|
+
export declare function chartTimestamp(value: unknown, numeric?: boolean): number | null;
|
|
3
|
+
export declare function timeModel(values: readonly unknown[], numeric?: boolean): {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
times: number[];
|
|
7
|
+
precision: number;
|
|
8
|
+
tooltip: (value: unknown) => string;
|
|
9
|
+
} | null;
|
|
10
|
+
export declare function timeTicks(model: NonNullable<ReturnType<typeof timeModel>>, width: number): {
|
|
11
|
+
ticks: number[];
|
|
12
|
+
label: (value: number, index: number) => {
|
|
13
|
+
main: string;
|
|
14
|
+
context: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -18,7 +18,9 @@ declare const brandedIcons: {
|
|
|
18
18
|
readonly export: import("lucide-react").LucideIcon;
|
|
19
19
|
readonly error: import("lucide-react").LucideIcon;
|
|
20
20
|
readonly close: import("lucide-react").LucideIcon;
|
|
21
|
+
readonly filters: import("lucide-react").LucideIcon;
|
|
21
22
|
readonly clearFilters: import("lucide-react").LucideIcon;
|
|
23
|
+
readonly displayOptions: import("lucide-react").LucideIcon;
|
|
22
24
|
readonly previous: import("lucide-react").LucideIcon;
|
|
23
25
|
readonly next: import("lucide-react").LucideIcon;
|
|
24
26
|
readonly lightTheme: import("lucide-react").LucideIcon;
|
|
@@ -39,7 +41,7 @@ declare const brandedIcons: {
|
|
|
39
41
|
export type AppIconName = keyof typeof brandedIcons;
|
|
40
42
|
export type AppIconProps = Omit<LucideProps, 'size'> & {
|
|
41
43
|
name: AppIconName;
|
|
42
|
-
size?: number;
|
|
44
|
+
size?: number | string;
|
|
43
45
|
};
|
|
44
46
|
export declare function AppIcon({ name, size, strokeWidth, style, ...props }: AppIconProps): import("react").FunctionComponentElement<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
45
47
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** Direct UI composition and static screens. Requests use declared views from /react. */
|
|
2
|
-
export { injectDataAppShellStyles } from '../shellStyles.js';
|
|
3
2
|
export { DataAppProvider } from '../mount.js';
|
|
4
3
|
export { isPlainKeyEvent } from './keyboard.js';
|
|
5
4
|
export { GettingStarted } from './GettingStarted.js';
|
|
@@ -17,8 +16,6 @@ export type { DataTableProps, DataTableSearch, DataTableEmptyRowProps, DataTable
|
|
|
17
16
|
export { MetricWidget } from './MetricWidget.js';
|
|
18
17
|
export type { MetricWidgetProps } from './MetricWidget.js';
|
|
19
18
|
export { DimensionPicker } from './DimensionPicker.js';
|
|
20
|
-
export { DataAppSkeleton } from './DataAppSkeleton.js';
|
|
21
|
-
export type { DataAppSkeletonProps } from './DataAppSkeleton.js';
|
|
22
19
|
export { LiveControl } from './LiveControl.js';
|
|
23
20
|
export type { LiveControlProps, LiveIntervalSeconds, } from './LiveControl.js';
|
|
24
21
|
export { DateRangePicker } from './DateRangePicker.js';
|
|
@@ -26,7 +23,7 @@ export type { DatePresetId, DateRange, DateRangePickerProps, } from './DateRange
|
|
|
26
23
|
export { useAppVariables } from './variables.js';
|
|
27
24
|
export { SearchField } from './SearchField.js';
|
|
28
25
|
export type { SearchFieldProps } from './SearchField.js';
|
|
29
|
-
export { searchItems } from './searchItems.js';
|
|
26
|
+
export { searchItems, matchSearchText } from './searchItems.js';
|
|
30
27
|
export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './searchItems.js';
|
|
31
28
|
export { SearchMatch } from './SearchMatch.js';
|
|
32
29
|
export type { SearchMatchProps } from './SearchMatch.js';
|
|
@@ -96,3 +93,17 @@ export type { ComposedChartProps } from './ComposedChart.js';
|
|
|
96
93
|
export { ChartLegend } from './ChartLegend.js';
|
|
97
94
|
export type { ChartLegendProps, ChartLegendItemProps, ChartLegendMarkerProps, ChartLegendLabelProps, ChartLegendMarkerKind, } from './ChartLegend.js';
|
|
98
95
|
export type { ComposedChartLegendProps } from './ComposedChartLegend.js';
|
|
96
|
+
export { FunnelChart } from './FunnelChart.js';
|
|
97
|
+
export type { FunnelChartProps, FunnelChartStep, FunnelChartSeries, } from './FunnelChart.js';
|
|
98
|
+
export { RetentionChart } from './RetentionChart.js';
|
|
99
|
+
export type { RetentionChartProps, RetentionChartPoint, RetentionChartSeries, } from './RetentionChart.js';
|
|
100
|
+
export { JourneyChart } from './JourneyChart.js';
|
|
101
|
+
export type { JourneyChartProps, JourneyChartPath, } from './JourneyChart.js';
|
|
102
|
+
export { useSvgId } from './useSvgId.js';
|
|
103
|
+
export { SearchTypeahead } from './SearchTypeahead.js';
|
|
104
|
+
export type { SearchTypeaheadProps, SearchSuggestion, } from './SearchTypeahead.js';
|
|
105
|
+
export { SectionHeading } from './SectionHeading.js';
|
|
106
|
+
export type { SectionHeadingProps } from './SectionHeading.js';
|
|
107
|
+
export { DateDisplay } from './DateDisplay.js';
|
|
108
|
+
export type { DateDisplayProps } from './DateDisplay.js';
|
|
109
|
+
export { useDateFormatting } from '../date-formatting.js';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Aggregated route; repeated events remain distinct by depth and prefix. */
|
|
2
|
+
export type JourneyChartPath = {
|
|
3
|
+
/** Unique, nonblank path ID. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** At least one nonblank event; null property means no property grouping. */
|
|
6
|
+
steps: readonly {
|
|
7
|
+
event: string;
|
|
8
|
+
property: string | null;
|
|
9
|
+
}[];
|
|
10
|
+
/** Finite, nonnegative population following this route. */
|
|
11
|
+
count: number;
|
|
12
|
+
/** True: converted; false: dropped off; null: no conversion classification. */
|
|
13
|
+
converted: boolean | null;
|
|
14
|
+
/** Stops at the last loaded event, without adding an outcome or expand control. */
|
|
15
|
+
truncated: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type JourneyNode = {
|
|
18
|
+
key: string;
|
|
19
|
+
label: string;
|
|
20
|
+
depth: number;
|
|
21
|
+
outcome: 'event' | 'converted' | 'drop-off' | 'truncated' | 'end' | 'other';
|
|
22
|
+
count: number;
|
|
23
|
+
pathKeys: string[];
|
|
24
|
+
branchKeys?: string[];
|
|
25
|
+
expandable?: boolean;
|
|
26
|
+
expanded?: boolean;
|
|
27
|
+
hiddenBranchCount?: number;
|
|
28
|
+
};
|
|
29
|
+
export declare function journeyNodes(path: JourneyChartPath): Omit<JourneyNode, 'count' | 'pathKeys'>[];
|
|
30
|
+
export declare function buildJourneyFlow(paths: readonly JourneyChartPath[], expandedBranch?: string[]): {
|
|
31
|
+
nodes: JourneyNode[];
|
|
32
|
+
links: {
|
|
33
|
+
key: string;
|
|
34
|
+
source: string;
|
|
35
|
+
target: string;
|
|
36
|
+
count: number;
|
|
37
|
+
pathKeys: string[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
export declare function limitJourneyFlow(graph: ReturnType<typeof buildJourneyFlow>, visibleEventsByDepth?: Record<number, number>): {
|
|
41
|
+
nodes: JourneyNode[];
|
|
42
|
+
links: {
|
|
43
|
+
key: string;
|
|
44
|
+
source: string;
|
|
45
|
+
target: string;
|
|
46
|
+
count: number;
|
|
47
|
+
pathKeys: string[];
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DateRangeRequest } from '../../core/contract.js';
|
|
2
|
-
import { type MetricFormat } from '../../core/format.js';
|
|
2
|
+
import { type MetricFormat, type DateFormatOptions } from '../../core/format.js';
|
|
3
3
|
export type MetricComparison = {
|
|
4
4
|
current: {
|
|
5
5
|
value: number;
|
|
@@ -20,7 +20,7 @@ export declare function calendarMetricComparison(displayedInput: DateRangeReques
|
|
|
20
20
|
previous: number | null;
|
|
21
21
|
format: MetricFormat;
|
|
22
22
|
favorableDirection?: MetricComparison['favorableDirection'];
|
|
23
|
-
}): MetricComparison | undefined;
|
|
23
|
+
}, options?: DateFormatOptions): MetricComparison | undefined;
|
|
24
24
|
/** A zero or missing baseline has no meaningful relative percentage. */
|
|
25
25
|
export declare function comparisonChange({ current, previous, favorableDirection, }: MetricComparison): {
|
|
26
26
|
readonly percent: number | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MetricFormat } from '../../core/format.js';
|
|
1
|
+
import type { MetricFormat, DateFormatOptions } from '../../core/format.js';
|
|
2
2
|
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
3
3
|
import type { MetricReading } from '../../core/reading.js';
|
|
4
4
|
export type MetricDefinition = {
|
|
@@ -8,4 +8,4 @@ export type MetricDefinition = {
|
|
|
8
8
|
favorableDirection?: 'up' | 'down';
|
|
9
9
|
evidence: WidgetEvidence;
|
|
10
10
|
};
|
|
11
|
-
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading): import("./metric-comparison.js").MetricComparison | undefined;
|
|
11
|
+
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading, options?: DateFormatOptions): import("./metric-comparison.js").MetricComparison | undefined;
|
|
@@ -4,6 +4,8 @@ import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
|
4
4
|
export type EmptyContent = {
|
|
5
5
|
title: ReactNode;
|
|
6
6
|
description?: ReactNode;
|
|
7
|
+
/** A relevant recovery action; omit when there is nothing the user can change. */
|
|
8
|
+
action?: ReactNode;
|
|
7
9
|
};
|
|
8
10
|
export type SkeletonContent = {
|
|
9
11
|
variant: 'metric' | 'panel' | 'ranking';
|