@altertable/data-app 0.68.0 → 0.70.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 +10 -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-2ajhmsc4.js +355 -0
- package/dist/chunks/index-2ajhmsc4.js.map +13 -0
- package/dist/chunks/{index-ktmvs916.js → index-58kks6a8.js} +37 -21
- package/dist/chunks/index-58kks6a8.js.map +13 -0
- package/dist/chunks/{index-23dktynd.js → index-7q99hf1z.js} +19 -12
- package/dist/chunks/index-7q99hf1z.js.map +10 -0
- package/dist/chunks/{index-mt93ff2b.js → index-9zqbrv2z.js} +7 -3
- package/dist/chunks/index-9zqbrv2z.js.map +10 -0
- 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-q1w84fv9.js} +178 -31
- package/dist/chunks/index-q1w84fv9.js.map +15 -0
- package/dist/chunks/{index-qd5xgx6y.js → index-rew95tbg.js} +89 -21
- package/dist/chunks/index-rew95tbg.js.map +13 -0
- package/dist/chunks/{index-gvers8jw.js → index-vtpygsbq.js} +5651 -2711
- package/dist/chunks/index-vtpygsbq.js.map +126 -0
- package/dist/chunks/{index-x69p7cv7.js → index-wjt6cavj.js} +6 -4
- package/dist/chunks/index-wjt6cavj.js.map +10 -0
- package/dist/chunks/{index-f5cnbrjz.js → index-wss3gd3h.js} +39 -9
- package/dist/chunks/index-wss3gd3h.js.map +13 -0
- package/dist/chunks/{index-ev2b5aaf.js → index-xzb7sx6g.js} +4 -4
- 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 +7 -7
- package/dist/core/contract.js.map +1 -1
- 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 +200 -145
- package/dist/local.js.map +10 -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 +500 -401
- package/dist/react/index.js.map +10 -13
- package/dist/react/ui/index.js +1851 -1476
- package/dist/react/ui/index.js.map +24 -21
- package/dist/server.js +102 -58
- package/dist/server.js.map +9 -6
- package/dist/types/client/data-client.d.ts +21 -10
- 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 +25 -17
- package/dist/types/core/contract.d.ts +26 -14
- package/dist/types/core/date-format.d.ts +24 -0
- package/dist/types/core/dimension-source.d.ts +64 -0
- package/dist/types/core/dimension.d.ts +33 -24
- package/dist/types/core/facets.d.ts +13 -0
- package/dist/types/core/filters.d.ts +4 -3
- package/dist/types/core/format.d.ts +5 -3
- package/dist/types/core/keys.d.ts +2 -0
- package/dist/types/core/messages.d.ts +3 -1
- package/dist/types/core/operation-types.d.ts +12 -11
- package/dist/types/core/queries.d.ts +75 -7
- package/dist/types/core/time-interval.d.ts +96 -0
- package/dist/types/core/variables.d.ts +49 -14
- package/dist/types/embed/host.d.ts +4 -4
- package/dist/types/embed/sql.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react/actions.d.ts +53 -0
- 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 +62 -3
- package/dist/types/react/date-formatting.d.ts +12 -0
- package/dist/types/react/details.d.ts +46 -0
- package/dist/types/react/exploration.d.ts +44 -0
- package/dist/types/react/hooks.d.ts +82 -43
- package/dist/types/react/index.d.ts +10 -2
- package/dist/types/react/search-suggestions.d.ts +8 -0
- package/dist/types/react/style-contract.d.ts +1 -5
- package/dist/types/react/ui/AboutData.d.ts +9 -4
- package/dist/types/react/ui/AreaChart.d.ts +2 -2
- package/dist/types/react/ui/BarChart.d.ts +2 -2
- package/dist/types/react/ui/Button.d.ts +2 -1
- package/dist/types/react/ui/ChartLegend.d.ts +3 -2
- package/dist/types/react/ui/ChoicePicker.d.ts +2 -0
- package/dist/types/react/ui/ComposedChartLegend.d.ts +2 -1
- package/dist/types/react/ui/DataApp.d.ts +8 -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 +7 -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 +5 -3
- package/dist/types/react/ui/EmptyState.d.ts +1 -1
- package/dist/types/react/ui/ExplorationActionControl.d.ts +60 -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/InspectionProvider.d.ts +2 -2
- package/dist/types/react/ui/LineChart.d.ts +2 -2
- package/dist/types/react/ui/Menu.d.ts +3 -2
- package/dist/types/react/ui/MetricWidget.d.ts +4 -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 +23 -0
- package/dist/types/react/ui/PieChart.d.ts +2 -2
- 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/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 +9 -1
- package/dist/types/react/ui/Sheet.d.ts +4 -2
- 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/TrendChart.d.ts +3 -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 +8 -6
- package/dist/types/react/ui/chart-date-axis.d.ts +15 -0
- package/dist/types/react/ui/chart-interaction.d.ts +27 -0
- package/dist/types/react/ui/chart-primitives.d.ts +4 -4
- package/dist/types/react/ui/chart-time.d.ts +19 -0
- package/dist/types/react/ui/chartColor.d.ts +1 -1
- package/dist/types/react/ui/icons.d.ts +5 -1
- package/dist/types/react/ui/index.d.ts +10 -4
- 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/use-chart-scroll-to-end.d.ts +2 -0
- package/dist/types/react/ui/variables.d.ts +1 -1
- package/dist/types/react/view-control-bar.d.ts +18 -0
- package/dist/types/react/view-controls.d.ts +3 -2
- package/dist/types/react/view-runtime.d.ts +8 -3
- package/dist/types/react/view.d.ts +28 -7
- package/dist/types/react/widgets.d.ts +22 -11
- 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 +1 -1
- package/docs/app-authoring.md +27 -12
- package/docs/client.md +6 -7
- package/docs/composition.md +84 -0
- package/docs/contract.md +45 -26
- package/docs/data-context.md +2 -0
- 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 +2 -2
- package/docs/styling.md +10 -27
- package/docs/ui.md +32 -18
- package/docs/variables.md +174 -25
- package/docs/views.md +60 -29
- package/docs/widgets.md +131 -26
- package/examples/starter-data-app/index.tsx +10 -23
- 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 +28 -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 +21 -0
- package/package.json +13 -3
- package/dist/chunks/index-23dktynd.js.map +0 -10
- 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-gvers8jw.js.map +0 -109
- 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-ev2b5aaf.js.map → index-xzb7sx6g.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
1
|
+
import { type ComponentRef, type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { type AboutDataProps, type AboutTab } from './AboutData.js';
|
|
3
3
|
type Inspection = {
|
|
4
4
|
key: string;
|
|
5
5
|
id: string;
|
|
6
6
|
props: AboutDataProps;
|
|
7
|
-
trigger: RefObject<
|
|
7
|
+
trigger: RefObject<ComponentRef<'button'> | null>;
|
|
8
8
|
};
|
|
9
9
|
type Selection = {
|
|
10
10
|
inspection: Inspection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
2
|
export type LineChartItem = ChartItem;
|
|
3
|
-
export type LineChartProps = ValueChartProps
|
|
3
|
+
export type LineChartProps<Row extends LineChartItem = LineChartItem> = ValueChartProps<Row>;
|
|
4
4
|
/** Equally spaced finite samples in supplied order; fill missing periods explicitly.
|
|
5
5
|
* Supports negative values, single points, and horizontal scrolling for long series.
|
|
6
6
|
* Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
|
|
7
|
-
export declare function LineChart(props: LineChartProps): import("react").JSX.Element;
|
|
7
|
+
export declare function LineChart<Row extends LineChartItem>(props: LineChartProps<Row>): import("react").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { MenuTrigger, MenuSection,
|
|
2
|
+
import { MenuTrigger, MenuSection, Separator, type MenuProps, type MenuItemProps, type MenuTriggerProps } from 'react-aria-components';
|
|
3
|
+
import { PopoverSurface } from './PopoverSurface.js';
|
|
3
4
|
export { MenuTrigger, MenuSection };
|
|
4
5
|
export { PressButton as MenuButton } from './Button.js';
|
|
5
6
|
export type { MenuProps, MenuItemProps, MenuTriggerProps };
|
|
6
|
-
export type MenuPopoverProps = ComponentPropsWithRef<typeof
|
|
7
|
+
export type MenuPopoverProps = ComponentPropsWithRef<typeof PopoverSurface>;
|
|
7
8
|
/** Anchored popup for a Menu; the surrounding MenuTrigger owns focus and dismissal. */
|
|
8
9
|
export declare function MenuPopover({ className, placement, ...props }: MenuPopoverProps): import("react").JSX.Element;
|
|
9
10
|
/** Actions by default; single selection creates radio items, multiple creates checkbox items. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InspectionRecords } from './AboutData.js';
|
|
1
2
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
3
|
import type { WidgetStatus } from './RequestHint.js';
|
|
3
4
|
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
@@ -7,10 +8,13 @@ import type { MetricReading } from '../../core/reading.js';
|
|
|
7
8
|
import { type MetricDefinition } from './metric.js';
|
|
8
9
|
type MetricWidgetBaseProps = {
|
|
9
10
|
label: string;
|
|
11
|
+
/** Document outline level. The label keeps the shared widget-heading appearance. */
|
|
12
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
10
13
|
annotationId?: string;
|
|
11
14
|
description?: ReactNode;
|
|
12
15
|
comparison?: MetricComparison;
|
|
13
16
|
evidence?: WidgetEvidence;
|
|
17
|
+
records?: InspectionRecords;
|
|
14
18
|
action?: ReactNode;
|
|
15
19
|
status?: WidgetStatus;
|
|
16
20
|
visual?: ReactNode;
|
|
@@ -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,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type AppIconName } from './icons.js';
|
|
3
|
+
/** Inline labels sit with the value; above and beside labels have a separate layout slot. */
|
|
4
|
+
export type ControlLabelPlacement = 'inline' | 'above' | 'beside';
|
|
5
|
+
/** Popup triggers retain their accessible names when the visible label moves outside. */
|
|
6
|
+
export declare function PickerField({ label, labelPlacement, children, }: {
|
|
7
|
+
label: string;
|
|
8
|
+
labelPlacement?: ControlLabelPlacement;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): 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;
|
|
11
|
+
/** Shared label and value slots for pickers and active-filter summaries. */
|
|
12
|
+
export declare function ControlLabelValue({ label, value, }: {
|
|
13
|
+
label?: ReactNode;
|
|
14
|
+
value: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Shared label, value, and disclosure layout for selection and predicate controls. */
|
|
17
|
+
export declare function PickerTriggerContent({ label, labelPlacement, value, icon, iconSize, }: {
|
|
18
|
+
label: string;
|
|
19
|
+
labelPlacement: ControlLabelPlacement;
|
|
20
|
+
value: ReactNode;
|
|
21
|
+
icon?: AppIconName;
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
2
|
export type PieChartItem = ChartItem;
|
|
3
|
-
export type PieChartProps = ValueChartProps & {
|
|
3
|
+
export type PieChartProps<Row extends PieChartItem = PieChartItem> = ValueChartProps<Row> & {
|
|
4
4
|
/** Omit the built-in key when composing a separate ChartLegend. */
|
|
5
5
|
showLegend?: boolean;
|
|
6
6
|
};
|
|
@@ -8,4 +8,4 @@ export type PieChartProps = ValueChartProps & {
|
|
|
8
8
|
* Include Other to represent the whole. Zero values remain in the legend; all-zero
|
|
9
9
|
* data shows an empty circle. Colors follow item order. Compose inside VisualizationWidget;
|
|
10
10
|
* hover/touch tooltips coordinate slice and legend emphasis without caller state. */
|
|
11
|
-
export declare function PieChart({ items, unit, ariaLabel, showLegend, formatValue, }: PieChartProps): import("react").JSX.Element;
|
|
11
|
+
export declare function PieChart<Row extends PieChartItem>({ items, unit, ariaLabel, showLegend, formatValue, itemActions, }: PieChartProps<Row>): 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;
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { type ControlLabelPlacement } from './PickerField.js';
|
|
1
2
|
import { type ChoiceOption } from '../../core/variables.js';
|
|
3
|
+
import type { AppIconName } from './icons.js';
|
|
2
4
|
export type SelectProps = {
|
|
3
5
|
label: string;
|
|
6
|
+
labelPlacement?: ControlLabelPlacement;
|
|
7
|
+
/** Replace the inline text label with a decorative icon; the accessible label remains. */
|
|
8
|
+
icon?: AppIconName;
|
|
9
|
+
size?: 'default' | 'compact';
|
|
4
10
|
options: readonly ChoiceOption[];
|
|
5
11
|
value: string;
|
|
6
12
|
onChange: (value: string) => void;
|
|
@@ -9,6 +15,8 @@ export type SelectProps = {
|
|
|
9
15
|
name?: string;
|
|
10
16
|
id?: string;
|
|
11
17
|
className?: string;
|
|
18
|
+
/** Align the popup with the selection button. Defaults to start. */
|
|
19
|
+
align?: 'start' | 'end';
|
|
12
20
|
};
|
|
13
21
|
/** 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;
|
|
22
|
+
export declare function Select({ label, options, value, onChange, disabled, required, className, align, labelPlacement, icon, size, ...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
|
-
|
|
13
|
+
/** Edge for side placement. Defaults to right; small screens use a bottom sheet. */
|
|
14
|
+
side?: 'left' | 'right';
|
|
15
|
+
returnFocus?: RefObject<HTMLElement | SVGElement | 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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ValueChartProps } from './chart-data.js';
|
|
1
|
+
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
2
|
/** Ordered, equally spaced samples; negative values share an explicit zero baseline. */
|
|
3
|
-
export declare function TrendChart({ items, unit, ariaLabel, formatValue,
|
|
4
|
-
area
|
|
3
|
+
export declare function TrendChart<Row extends ChartItem>({ items, unit, ariaLabel, formatValue, kind, itemActions, }: ValueChartProps<Row> & {
|
|
4
|
+
kind: 'line' | 'area';
|
|
5
5
|
}): 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' | 'records' | 'status' | 'emptyFallback'> & {
|
|
5
5
|
/** Footer controls, such as table pagination. */
|
|
6
6
|
footer?: ReactNode;
|
|
7
7
|
} & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { ItemActions } from './ExplorationActionControl.js';
|
|
1
2
|
/** Ordered category or time-series sample. IDs are unique and nonblank; values are finite. */
|
|
2
3
|
export type ChartItem = {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
5
6
|
value: number;
|
|
6
7
|
};
|
|
7
|
-
export type ValueChartProps = {
|
|
8
|
+
export type ValueChartProps<Row extends ChartItem = ChartItem> = {
|
|
8
9
|
/** Ordered samples; the chart validates IDs and values when rendering. */
|
|
9
|
-
items: readonly
|
|
10
|
+
items: readonly Row[];
|
|
11
|
+
/** Actions available for each displayed item. Domain fields remain available to this callback. */
|
|
12
|
+
itemActions?: ItemActions<Row>;
|
|
10
13
|
unit: string;
|
|
11
14
|
ariaLabel: string;
|
|
12
15
|
formatValue?: (value: number) => string;
|
|
@@ -27,8 +30,7 @@ export type ScatterChartItem = {
|
|
|
27
30
|
x: number;
|
|
28
31
|
y: number;
|
|
29
32
|
};
|
|
30
|
-
type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export declare function validateChartItems<Kind extends ChartKind>(kind: Kind, items: readonly ItemFor<Kind>[]): void;
|
|
33
|
+
type ValueChartKind = 'bar' | 'line' | 'area' | 'pie';
|
|
34
|
+
export declare function validateValueChartItems(kind: ValueChartKind, items: readonly ChartItem[]): void;
|
|
35
|
+
export declare function validateScatterChartItems(items: readonly ScatterChartItem[]): void;
|
|
34
36
|
export {};
|
|
@@ -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 | Date>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Coordinates in the chart SVG, shared by pointer tracking and active samples. */
|
|
3
|
+
export type ChartPoint = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
type ChartInteractionApi = {
|
|
8
|
+
isPointerInspection: boolean;
|
|
9
|
+
activePoint: ChartPoint | undefined;
|
|
10
|
+
seriesCount: number;
|
|
11
|
+
/** Line and area series register the sample at the current inspection position. */
|
|
12
|
+
registerPoint: (id: string, x: number, y: number) => () => void;
|
|
13
|
+
registerSeries: (id: string) => () => void;
|
|
14
|
+
activeSeriesId: string | null;
|
|
15
|
+
setHoveredSeriesId: (id: string | null) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const ChartInteractionContext: import("react").Context<ChartInteractionApi | null>;
|
|
18
|
+
export declare function isChartSeriesActive(interaction: ChartInteractionApi | null, seriesId: string): boolean;
|
|
19
|
+
export declare function useChartSeries(id?: string): {
|
|
20
|
+
id: string;
|
|
21
|
+
active: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function ChartSeries({ id, children, }: {
|
|
24
|
+
id: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { type
|
|
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';
|
|
3
4
|
/** Hollow sample marker shared by standalone and composed series. */
|
|
4
5
|
export declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
|
|
5
6
|
active?: boolean;
|
|
6
7
|
}): import("react").JSX.Element;
|
|
7
8
|
/** Shared series defaults; native props override every authored choice. */
|
|
8
9
|
export declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
|
|
9
|
-
/**
|
|
10
|
+
/** Sample dots are opt-in with dot=true.
|
|
10
11
|
* activeDot independently controls the hovered point. Native dot props and renderers remain available. */
|
|
11
12
|
export declare function ChartLine<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: LineProps<Row, Value>): import("react").JSX.Element;
|
|
12
13
|
/** Filled series with the same sample-dot and activeDot options as ChartLine. */
|
|
13
14
|
export declare function ChartArea<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: AreaProps<Row, Value>): import("react").JSX.Element;
|
|
14
15
|
export declare function ChartScatter<Row = unknown, Value = number>(props: ComponentProps<typeof Scatter<Row, Value>>): import("react").JSX.Element;
|
|
15
|
-
export declare function ChartXAxis<Row = unknown, Value = string | number>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
16
16
|
export declare function ChartYAxis<Row = unknown, Value = number>(props: ComponentProps<typeof YAxis<Row, Value>>): import("react").JSX.Element;
|
|
17
17
|
export declare function ChartGrid(props: ComponentProps<typeof CartesianGrid>): import("react").JSX.Element;
|
|
18
18
|
export declare function ChartTooltipContent(props: ComponentProps<typeof DefaultTooltipContent> & {
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
type ChartTimeModel = {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
times: readonly number[];
|
|
7
|
+
/** Smallest gap in milliseconds; a single instant uses a one-day extent. */
|
|
8
|
+
minimumInterval: number;
|
|
9
|
+
tooltip: (value: unknown) => string;
|
|
10
|
+
};
|
|
11
|
+
export declare function timeModel(values: readonly unknown[], numeric?: boolean): ChartTimeModel | null;
|
|
12
|
+
export declare function timeTicks(model: ChartTimeModel, width: number): {
|
|
13
|
+
ticks: number[];
|
|
14
|
+
label: (value: number, index: number) => {
|
|
15
|
+
main: string;
|
|
16
|
+
context: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function chartColor(id: string): string;
|
|
2
|
-
export declare const chartBarFill = "var(--atbl-chart-fill, color-mix(in srgb, var(--atbl-
|
|
2
|
+
export declare const chartBarFill = "var(--atbl-chart-fill, color-mix(in srgb, var(--atbl-chart-1) 75%, var(--atbl-surface)))";
|
|
@@ -7,6 +7,8 @@ declare const brandedIcons: {
|
|
|
7
7
|
readonly clock: import("lucide-react").LucideIcon;
|
|
8
8
|
readonly check: import("lucide-react").LucideIcon;
|
|
9
9
|
readonly disclosure: import("lucide-react").LucideIcon;
|
|
10
|
+
readonly breakdown: import("lucide-react").LucideIcon;
|
|
11
|
+
readonly moreActions: import("lucide-react").LucideIcon;
|
|
10
12
|
readonly previousMonth: import("lucide-react").LucideIcon;
|
|
11
13
|
readonly nextMonth: import("lucide-react").LucideIcon;
|
|
12
14
|
readonly explore: import("lucide-react").LucideIcon;
|
|
@@ -18,7 +20,9 @@ declare const brandedIcons: {
|
|
|
18
20
|
readonly export: import("lucide-react").LucideIcon;
|
|
19
21
|
readonly error: import("lucide-react").LucideIcon;
|
|
20
22
|
readonly close: import("lucide-react").LucideIcon;
|
|
23
|
+
readonly filters: import("lucide-react").LucideIcon;
|
|
21
24
|
readonly clearFilters: import("lucide-react").LucideIcon;
|
|
25
|
+
readonly displayOptions: import("lucide-react").LucideIcon;
|
|
22
26
|
readonly previous: import("lucide-react").LucideIcon;
|
|
23
27
|
readonly next: import("lucide-react").LucideIcon;
|
|
24
28
|
readonly lightTheme: import("lucide-react").LucideIcon;
|
|
@@ -39,7 +43,7 @@ declare const brandedIcons: {
|
|
|
39
43
|
export type AppIconName = keyof typeof brandedIcons;
|
|
40
44
|
export type AppIconProps = Omit<LucideProps, 'size'> & {
|
|
41
45
|
name: AppIconName;
|
|
42
|
-
size?: number;
|
|
46
|
+
size?: number | string;
|
|
43
47
|
};
|
|
44
48
|
export declare function AppIcon({ name, size, strokeWidth, style, ...props }: AppIconProps): import("react").FunctionComponentElement<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
45
49
|
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';
|
|
@@ -103,3 +100,12 @@ export type { RetentionChartProps, RetentionChartPoint, RetentionChartSeries, }
|
|
|
103
100
|
export { JourneyChart } from './JourneyChart.js';
|
|
104
101
|
export type { JourneyChartProps, JourneyChartPath, } from './JourneyChart.js';
|
|
105
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';
|
|
110
|
+
export { ExplorationActionControl } from './ExplorationActionControl.js';
|
|
111
|
+
export type { ExplorationActionControlProps, ExplorationAction, ItemActions, } from './ExplorationActionControl.js';
|
|
@@ -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';
|
|
@@ -25,6 +25,8 @@ export type SearchItemsOptions<Item> = {
|
|
|
25
25
|
limit?: number;
|
|
26
26
|
fuzzyThreshold?: number;
|
|
27
27
|
};
|
|
28
|
+
/** Highlight literal query terms in supplied text without filtering or reordering results. */
|
|
29
|
+
export declare function matchSearchText(text: string, query: string): SearchMatchValue;
|
|
28
30
|
/**
|
|
29
31
|
* Search only a complete local collection. Empty queries retain every item.
|
|
30
32
|
* When a searched field is displayed, render its match with SearchMatch:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DatePresetId, DateRange } from '../../core/date-range.js';
|
|
2
2
|
import { type AppVariableValues, type DateRangeSelection, type DateRangeVariable, type HistoryMode, type VariableCollection } from '../../core/variables.js';
|
|
3
3
|
export { defineAppVariables, searchVariable, choiceVariable, multiChoiceVariable, dateRangeVariable, } from '../../core/variables.js';
|
|
4
|
-
export type { AppVariable, AppVariableValues, ChoiceOption, ChoiceVariable, MultiChoiceVariable, SearchVariable, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, VariableCollection, } from '../../core/variables.js';
|
|
4
|
+
export type { VariablePresentation, AppVariable, AppVariableValues, ChoiceOption, ChoiceVariable, MultiChoiceVariable, SearchVariable, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, VariableCollection, } from '../../core/variables.js';
|
|
5
5
|
/** Adapt one date variable to the controlled picker without giving the picker URL ownership. */
|
|
6
6
|
export declare function dateRangeControl(variable: DateRangeVariable, selection: DateRangeSelection, onChange: (selection: DateRangeSelection) => void): {
|
|
7
7
|
minDate?: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type ActiveFilterControl = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
onRemove: () => void;
|
|
7
|
+
/** Render the editor and notify when it clears its own active filter. */
|
|
8
|
+
renderToolbarControl?: (onClear: () => void) => ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function ViewControlBar({ primaryFilters, activeFilters, allFilters, activeFilterCount, displayOptions, changedDisplayOptionCount, onClear, }: {
|
|
11
|
+
primaryFilters: ReactNode[];
|
|
12
|
+
allFilters: ReactNode[];
|
|
13
|
+
activeFilters: ActiveFilterControl[];
|
|
14
|
+
activeFilterCount: number;
|
|
15
|
+
displayOptions: ReactNode[];
|
|
16
|
+
changedDisplayOptionCount: number;
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import { type AppVariableValues, type VariableCollection } from './ui/variables.js';
|
|
3
3
|
import type { ResolvedVariables } from './view.js';
|
|
4
4
|
/** URL values resolve before facets; facet keys include their dependent inputs for cached, bounded loading. */
|
|
@@ -15,5 +15,6 @@ export declare function useViewVariables<Variables extends VariableCollection>(d
|
|
|
15
15
|
resetValue: AppVariableValues<Variables>[Key];
|
|
16
16
|
};
|
|
17
17
|
resolved: ResolvedVariables<Variables>;
|
|
18
|
-
|
|
18
|
+
searchControls: ReactNode[] | null;
|
|
19
|
+
filterControls: import("react").JSX.Element | null;
|
|
19
20
|
};
|