@altertable/data-app-react 0.76.0 → 0.78.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.
@@ -1,10 +1,11 @@
1
- import { $t as StoryFinding, At as SearchFieldProps, B as DateTimeRangePreset, Bt as AboutData, C as DataWidget, Ct as DataTableShare, D as DataValue, Dt as SearchTypeahead, E as MetricWidgetProps, Et as SearchSuggestion, Ft as ExplorationActionControl, Gt as Sheet, H as DateTimeRangeVariableOptions, Ht as AboutEmpty, I as DateTimeRangeComparisonRequest, It as ExplorationActionControlProps, J as dateTimeRangeVariable, Jt as DataContext, Kt as SheetProps, L as DateTimeRangeComparisonSelection, Lt as ItemActions, Mt as CsvExport, Nt as CsvTable, O as DataValueProps, Ot as SearchTypeaheadProps, Pt as ExplorationAction, Q as DataAppProvider, Qt as BoundStory, R as DateTimeRangeComparisonVariable, S as TextWidgetProps, St as DataTableSearch, T as MetricWidget$1, Tt as DataTableTimestampProps, Ut as AboutSubject, V as DateTimeRangeVariable, Vt as AboutDataProps, Wt as AboutTab, Xt as GlossaryEntry, Z as useAppVariables, _ as HelpPopoverProps, _t as WidgetStatus, a as DateDisplay, bt as DataTableEmptyRowProps, c as SectionHeadingProps, ct as TableWidgetProps, d as TooltipProvider, dt as SearchHit, en as PresentStory, et as DataAppStyle, f as TooltipProviderProps, ft as SearchItemsOptions, g as HelpPopover, gt as searchItems, h as AppIconProps, ht as matchSearchText, i as useDateFormatting, it as injectDataAppStyles, j as StaticDataAppProps, kt as SearchField, l as Tooltip, m as AppIconName, mt as SearchRange, n as DateTimeRangePickerProps, nt as DataAppStyleToken, o as DateDisplayProps, ot as TableWidget$1, p as AppIcon, pt as SearchMatchValue, q as dateTimeRangePresets, r as ControlLabelPlacement, s as SectionHeading, st as TableWidgetColumn, t as DateTimeRangePicker, tn as PresentStoryProps, tt as DataAppStyleHooks, u as TooltipProps, un as PressButton, ut as SearchAttribute, v as VisualizationWidget$1, vt as DataTable, w as DataWidgetProps, wt as DataTableTimestamp, x as TextWidget$1, xt as DataTableProps, y as VisualizationWidgetProps, yt as DataTableEmptyRow, z as DateTimeRangeComparisonVariableOptions } from "../chunks/DateTimeRangePicker.js";
2
- import { ChoiceOption, ChoiceOption as ChoiceOption$1, DataReading, DimensionSelectionVariable, DimensionValue, MetricReading } from "@altertable/data-app/internal";
1
+ import { A as NoticeProps, At as DataContext, B as dateTimeRangePresets, Bt as AboutData, C as DataWidget, Ct as CsvTable, D as DataValue, Dt as ItemActions, E as MetricWidgetProps, Et as ExplorationActionControlProps, F as DateTimeRangeFilter, Ft as StoryFinding, G as DataAppStyleHooks, Gt as Sheet, H as DataAppProvider, Ht as AboutEmpty, I as DateTimeRangeFilterOptions, It as PresentStory, J as injectDataAppStyles, K as DataAppStyleToken, Kt as SheetProps, L as DateTimeRangePreset, Lt as PresentStoryProps, Mt as GlossaryEntry, N as StaticDataAppProps, O as DataValueProps, P as DateTimeRangeComparison, Pt as BoundStory, Q as TableWidgetProps, R as DateTimeRangeSelection, S as TextWidgetProps, St as CsvExport, T as MetricWidget$1, Tt as ExplorationActionControl, Ut as AboutSubject, V as useAppFilters, Vt as AboutDataProps, W as DataAppStyle, Wt as AboutTab, X as TableWidget$1, Yt as PressButton, Z as TableWidgetColumn, _ as HelpPopoverProps, _t as SearchTypeahead, a as DateDisplay, at as matchSearchText, bt as SearchFieldProps, c as SectionHeadingProps, ct as DataTable, d as TooltipProvider, dt as DataTableProps, et as SearchAttribute, f as TooltipProviderProps, ft as DataTableSearch, g as HelpPopover, gt as SearchSuggestion, h as AppIconProps, ht as DataTableTimestampProps, i as useDateFormatting, it as SearchRange, k as Notice, l as Tooltip, lt as DataTableEmptyRow, m as AppIconName, mt as DataTableTimestamp, n as DateTimeRangePickerProps, nt as SearchItemsOptions, o as DateDisplayProps, ot as searchItems, p as AppIcon, pt as DataTableShare, r as ControlLabelPlacement, rt as SearchMatchValue, s as SectionHeading, st as WidgetStatus, t as DateTimeRangePicker, tt as SearchHit, u as TooltipProps, ut as DataTableEmptyRowProps, v as VisualizationWidget$1, vt as SearchTypeaheadProps, w as DataWidgetProps, wt as ExplorationAction, x as TextWidget$1, y as VisualizationWidgetProps, yt as SearchField, z as dateTimeRangeFilter } from "../chunks/DateTimeRangePicker.js";
2
+ import { DataClient } from "@altertable/data-app/client";
3
+ import { ChoiceOption, ChoiceOption as ChoiceOption$1, DataReading, DimensionSelectionFilter, DimensionValue, MetricReading } from "@altertable/data-app/internal";
3
4
  import { ComponentProps, ComponentPropsWithRef, ReactNode, RefAttributes } from "react";
4
5
  import { MenuItemProps, MenuProps, MenuSection, MenuTrigger, MenuTriggerProps, NumberField as NumberField$1, Popover, Radio as Radio$1, RadioGroup as RadioGroup$1, Separator } from "react-aria-components";
5
6
  import { Tab as Tab$1, TabListProps, TabPanel as TabPanel$1, TabPanels, Tabs as Tabs$1 } from "react-aria-components/Tabs";
6
- import { DimensionOption, DimensionSelection, DisclosedQuery, NumberFilter, NumberSelection } from "@altertable/data-app/contract";
7
7
  import { MetricFormat } from "@altertable/data-app/format";
8
+ import { ConnectionOperation, DimensionOption, DimensionSelection, DisclosedQuery, NumberFilter, NumberSelection } from "@altertable/data-app/contract";
8
9
  import { AreaProps, BarProps, Brush, CartesianGrid, ComposedChart as ComposedChart$1, DefaultTooltipContent, DotProps, ErrorBar, Label as Label$1, LabelList, Legend, LineProps, ReferenceArea, ReferenceDot, ReferenceLine, Scatter, Tooltip as Tooltip$1, XAxis, YAxis, ZAxis } from "recharts";
9
10
  //#region src/ui/keyboard.d.ts
10
11
  type KeyEvent = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'isComposing'>;
@@ -15,15 +16,18 @@ export declare function isPlainKeyEvent(event: KeyEvent, { allowShift }?: {
15
16
  //#endregion
16
17
  //#region src/ui/GettingStarted.d.ts
17
18
  /** Query-backed connection state and next steps for a newly created app. Mount within
18
- * `DataAppProvider` and register `connection: connectionCheck(app.queries)` on the server. */
19
- export declare function GettingStarted({ dataContext }: {
19
+ * `DataAppProvider` and supply the app's registered connection operation. */
20
+ export declare function GettingStarted({ dataContext, client }: {
20
21
  dataContext: DataContext;
22
+ client: DataClient<{
23
+ connection: ConnectionOperation;
24
+ }>;
21
25
  }): import("react").JSX.Element;
22
26
  //#endregion
23
27
  //#region src/ui/DimensionPicker.d.ts
24
28
  /** Adapts the typed dimension contract to the shared ChoicePicker control. */
25
29
  export declare function DimensionPicker<T extends DimensionValue>({ filter, labelPlacement, value, onChange, options: suppliedOptions, loading, error, onRetry }: {
26
- filter: DimensionSelectionVariable<T>;
30
+ filter: DimensionSelectionFilter<T>;
27
31
  labelPlacement?: ControlLabelPlacement;
28
32
  value: DimensionSelection<T>;
29
33
  onChange: (value: DimensionSelection<T>) => void;
@@ -167,7 +171,7 @@ export declare function Checkbox({ label, description, checked, value, onChange,
167
171
  //#region src/ui/StaticDataApp.d.ts
168
172
  type DataAppProps = StaticDataAppProps;
169
173
  /** Setup and static screens; fetched data uses the declared-view DataApp. */
170
- export declare function DataApp(props: DataAppProps): import("react").JSX.Element;
174
+ export declare function DataApp({ csvExport, ...props }: DataAppProps): import("react").JSX.Element;
171
175
  //#endregion
172
176
  //#region src/ui/use-chart-cursor-group.d.ts
173
177
  declare const groupBrand: unique symbol;
@@ -285,10 +289,17 @@ type BarChartItem = ChartItem & {
285
289
  /** Milliseconds since the Unix epoch. Enables adaptive time ticks when no item actions are supplied. */
286
290
  time?: number;
287
291
  };
288
- type BarChartProps<Row extends BarChartItem = BarChartItem> = CartesianChartProps<Row>;
292
+ type BarChartProps<Row extends BarChartItem = BarChartItem> = CartesianChartProps<Row> & {
293
+ /** Show a vertical value scale beside the bars. */
294
+ showYAxis?: boolean;
295
+ /** Automatically reveal the last items after updates. Disable for ranked categories. */
296
+ scrollToEnd?: boolean;
297
+ /** Formats the vertical axis and, unless overridden, inspected values. */
298
+ valueFormat?: MetricFormat;
299
+ };
289
300
  /** Nonnegative category values. Compose inside VisualizationWidget for a titled panel.
290
301
  * Owns hover/touch tooltips; no selection state or keyboard navigation. */
291
- export declare function BarChart<Row extends BarChartItem>({ items, unit, ariaLabel, formatValue, itemActions, cursorGroup, horizontalGrid }: BarChartProps<Row>): import("react").JSX.Element;
302
+ export declare function BarChart<Row extends BarChartItem>({ items, unit, ariaLabel, formatValue: authoredFormatValue, itemActions, cursorGroup, horizontalGrid, showYAxis, scrollToEnd, valueFormat }: BarChartProps<Row>): import("react").JSX.Element;
292
303
  //#endregion
293
304
  //#region src/ui/Select.d.ts
294
305
  type SelectProps = {
@@ -367,12 +378,12 @@ export declare function NumberRangeField({ label, value, onChange, onValidityCha
367
378
  type FilterBarProps = ComponentPropsWithRef<'div'>;
368
379
  export declare function FilterBar({ className, role, 'aria-label': label, ...props }: FilterBarProps): import("react").JSX.Element;
369
380
  //#endregion
370
- //#region src/ui/VariableBar.d.ts
371
- type VariableBarProps = {
381
+ //#region src/ui/ControlBar.d.ts
382
+ type ControlBarProps = {
372
383
  children: ReactNode;
373
384
  } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
374
385
  /** User-controlled inputs below the page header. */
375
- export declare function VariableBar({ children, className, role, 'aria-label': ariaLabel, ...props }: VariableBarProps): import("react").JSX.Element;
386
+ export declare function ControlBar({ children, className, role, 'aria-label': ariaLabel, ...props }: ControlBarProps): import("react").JSX.Element;
376
387
  //#endregion
377
388
  //#region src/ui/FilterActions.d.ts
378
389
  type FilterActionsProps = {
@@ -401,7 +412,8 @@ export declare function NumberFilterPicker({ filter, value, onChange, disabled,
401
412
  /**
402
413
  * Infers temporal input from ISO dates, zoned ISO timestamps, and Date values.
403
414
  * Use scale="utc" for epoch milliseconds or type="category" for date-like categories.
404
- * Explicit tick formatters and tick lists retain authored axis behavior.
415
+ * Explicit tick formatters and tick lists retain authored axis behavior while
416
+ * date-like values still receive readable tooltip labels.
405
417
  */
406
418
  declare function ChartXAxis<Row = unknown, Value = string | number | Date>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
407
419
  //#endregion
@@ -410,7 +422,6 @@ declare function ChartXAxis<Row = unknown, Value = string | number | Date>(props
410
422
  declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
411
423
  active?: boolean;
412
424
  }): import("react").JSX.Element;
413
- /** Shared series defaults; native props override every authored choice. */
414
425
  declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
415
426
  /** Sample dots are opt-in with dot=true.
416
427
  * activeDot independently controls the hovered point. Native dot props and renderers remain available. */
@@ -426,11 +437,12 @@ declare function ChartTooltip(props: ComponentProps<typeof Tooltip$1>): import("
426
437
  //#region src/ui/ComposedChartLegend.d.ts
427
438
  type ComposedChartLegendProps = ComponentProps<typeof Legend> & {
428
439
  maxVisibleItems?: number;
440
+ /** Enable hover emphasis and click to focus one or more series. */
441
+ interactive?: boolean;
429
442
  };
430
443
  /** Opt in inside ComposedChart to derive the shared legend from its displayed series.
431
- * Give native series unique IDs when they share a data key.
432
444
  * Native positioning, sorting, formatters, callbacks, and custom content remain available. */
433
- declare function ComposedChartLegend({ maxVisibleItems, ...props }: ComposedChartLegendProps): import("react").JSX.Element;
445
+ declare function ComposedChartLegend({ maxVisibleItems, interactive, ...props }: ComposedChartLegendProps): import("react").JSX.Element;
434
446
  //#endregion
435
447
  //#region src/ui/ComposedChart.d.ts
436
448
  type ComposedChartProps<Row = unknown> = HorizontalGridProps & Omit<ComponentProps<typeof ComposedChart$1<Row>>, 'data' | 'title'> & {
@@ -451,7 +463,7 @@ type ComposedChartProps<Row = unknown> = HorizontalGridProps & Omit<ComponentPro
451
463
  * for stacks. Preserve missing measures as null and choose connectNulls deliberately.
452
464
  * Use public chart tokens for series colors. Dataset bindings own
453
465
  * loading, empty results, evidence, and CSV; this primitive owns only the plot. */
454
- declare function ComposedChartRoot<Row>({ data, ariaLabel, valueFormat, cursorGroup, horizontalGrid, children, width, height, responsive, className, ...props }: ComposedChartProps<Row>): import("react").JSX.Element;
466
+ declare function ComposedChartRoot<Row>({ data, ariaLabel, valueFormat, cursorGroup, horizontalGrid, children, width, height, responsive, layout, className, ...props }: ComposedChartProps<Row>): import("react").JSX.Element;
455
467
  /** Shared themed series and controls; other children retain native Recharts defaults. */
456
468
  export declare const ComposedChart: typeof ComposedChartRoot & {
457
469
  Dot: typeof ChartDot;
@@ -523,10 +535,12 @@ type FunnelChartSeries = {
523
535
  type FunnelChartProps = CountChartProps & HorizontalGridProps & {
524
536
  steps: readonly FunnelChartStep[];
525
537
  series: readonly FunnelChartSeries[];
538
+ /** Disable legend hover and focus controls. */
539
+ interactiveLegend?: boolean;
526
540
  };
527
541
  /** Conversion columns with previous-step drop-off, normalized to each series' first step.
528
542
  * Owns series highlighting and portion-specific inspection; compose inside VisualizationWidget. */
529
- export declare function FunnelChart({ steps, series, unit, ariaLabel, className, formatValue, horizontalGrid }: FunnelChartProps): import("react").JSX.Element;
543
+ export declare function FunnelChart({ steps, series, unit, ariaLabel, className, formatValue, horizontalGrid, interactiveLegend }: FunnelChartProps): import("react").JSX.Element;
530
544
  //#endregion
531
545
  //#region src/ui/RetentionChart.d.ts
532
546
  type RetentionChartPoint = {
@@ -551,10 +565,12 @@ type RetentionChartSeries = {
551
565
  };
552
566
  type RetentionChartProps = CountChartProps & HorizontalGridProps & {
553
567
  series: readonly RetentionChartSeries[];
568
+ /** Disable legend hover and focus controls. */
569
+ interactiveLegend?: boolean;
554
570
  };
555
571
  /** Query-defined retention curves with count inspection and dotted incomplete periods.
556
572
  * Rates are not recomputed from counts. Compose inside VisualizationWidget. */
557
- export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, horizontalGrid }: RetentionChartProps): import("react").JSX.Element;
573
+ export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, horizontalGrid, interactiveLegend }: RetentionChartProps): import("react").JSX.Element;
558
574
  //#endregion
559
575
  //#region src/ui/journey-flow.d.ts
560
576
  /** Aggregated route; repeated events remain distinct by depth and prefix. */
@@ -594,5 +610,5 @@ export declare const VisualizationWidget: typeof VisualizationWidget$1;
594
610
  export declare const TableWidget: typeof TableWidget$1;
595
611
  export declare const MetricWidget: typeof MetricWidget$1;
596
612
  //#endregion
597
- export { AboutData, type AboutDataProps, type AboutEmpty, type AboutSubject, type AboutTab, AppIcon, type AppIconName, type AppIconProps, type AreaChartItem, type AreaChartProps, type BarChartItem, type BarChartProps, type BoundStory, type ChartCursorGroup, type ChartLegendItemProps, type ChartLegendLabelProps, type ChartLegendMarkerKind, type ChartLegendMarkerProps, type ChartLegendProps, type CheckboxGroupProps, type CheckboxProps, type ChoiceOption, type ChoicePickerProps, type ComposedChartLegendProps, type ComposedChartProps, type CsvExport, type CsvTable, type DataAppProps, DataAppProvider, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataReading, DataTable, DataTableEmptyRow, type DataTableEmptyRowProps, type DataTableProps, type DataTableSearch, DataTableShare, DataTableTimestamp, type DataTableTimestampProps, DataValue, type DataValueProps, DataWidget, type DataWidgetProps, DateDisplay, type DateDisplayProps, type DateTimeRangeComparisonRequest, type DateTimeRangeComparisonSelection, type DateTimeRangeComparisonVariable, type DateTimeRangeComparisonVariableOptions, DateTimeRangePicker, type DateTimeRangePickerProps, type DateTimeRangePreset, type DateTimeRangeVariable, type DateTimeRangeVariableOptions, type ExplorationAction, ExplorationActionControl, type ExplorationActionControlProps, type FilterActionsProps, type FilterBarProps, type FunnelChartProps, type FunnelChartSeries, type FunnelChartStep, type GlossaryDefinitionProps, type GlossaryExplanationProps, type GradientScrollProps, HelpPopover, type HelpPopoverProps, type ItemActions, type JourneyChartPath, type JourneyChartProps, type LineChartItem, type LineChartProps, type LiveControlProps, type LiveIntervalSeconds, PressButton as MenuButton, type MenuItemProps, type MenuPopoverProps, type MenuProps, MenuSection, MenuTrigger, type MenuTriggerProps, type MetricReading, type MetricWidgetProps, type NumberFieldProps, type NumberFilterPickerProps, type NumberRange, type NumberRangeFieldProps, type PieChartItem, type PieChartProps, PresentStory, type PresentStoryProps, type RadioGroupProps, type RadioProps, type RetentionChartPoint, type RetentionChartProps, type RetentionChartSeries, type ScatterChartItem, type ScatterChartProps, type SearchAttribute, SearchField, type SearchFieldProps, type SearchHit, type SearchItemsOptions, type SearchMatchProps, type SearchMatchValue, type SearchRange, type SearchSuggestion, SearchTypeahead, type SearchTypeaheadProps, SectionHeading, type SectionHeadingProps, type SegmentedControlProps, type SelectProps, Sheet, type SheetProps, type ShimmerTextProps, type StoryFinding, TabPanels, type TableWidgetColumn, type TableWidgetProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type VariableBarProps, type VisualizationWidgetProps, type WidgetStatus, dateTimeRangePresets, dateTimeRangeVariable, injectDataAppStyles, matchSearchText, searchItems, useAppVariables, useDateFormatting };
613
+ export { AboutData, type AboutDataProps, type AboutEmpty, type AboutSubject, type AboutTab, AppIcon, type AppIconName, type AppIconProps, type AreaChartItem, type AreaChartProps, type BarChartItem, type BarChartProps, type BoundStory, type ChartCursorGroup, type ChartLegendItemProps, type ChartLegendLabelProps, type ChartLegendMarkerKind, type ChartLegendMarkerProps, type ChartLegendProps, type CheckboxGroupProps, type CheckboxProps, type ChoiceOption, type ChoicePickerProps, type ComposedChartLegendProps, type ComposedChartProps, type ControlBarProps, type CsvExport, type CsvTable, type DataAppProps, DataAppProvider, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataReading, DataTable, DataTableEmptyRow, type DataTableEmptyRowProps, type DataTableProps, type DataTableSearch, DataTableShare, DataTableTimestamp, type DataTableTimestampProps, DataValue, type DataValueProps, DataWidget, type DataWidgetProps, DateDisplay, type DateDisplayProps, type DateTimeRangeComparison, type DateTimeRangeFilter, type DateTimeRangeFilterOptions, DateTimeRangePicker, type DateTimeRangePickerProps, type DateTimeRangePreset, type DateTimeRangeSelection, type ExplorationAction, ExplorationActionControl, type ExplorationActionControlProps, type FilterActionsProps, type FilterBarProps, type FunnelChartProps, type FunnelChartSeries, type FunnelChartStep, type GlossaryDefinitionProps, type GlossaryExplanationProps, type GradientScrollProps, HelpPopover, type HelpPopoverProps, type ItemActions, type JourneyChartPath, type JourneyChartProps, type LineChartItem, type LineChartProps, type LiveControlProps, type LiveIntervalSeconds, PressButton as MenuButton, type MenuItemProps, type MenuPopoverProps, type MenuProps, MenuSection, MenuTrigger, type MenuTriggerProps, type MetricReading, type MetricWidgetProps, Notice, type NoticeProps, type NumberFieldProps, type NumberFilterPickerProps, type NumberRange, type NumberRangeFieldProps, type PieChartItem, type PieChartProps, PresentStory, type PresentStoryProps, type RadioGroupProps, type RadioProps, type RetentionChartPoint, type RetentionChartProps, type RetentionChartSeries, type ScatterChartItem, type ScatterChartProps, type SearchAttribute, SearchField, type SearchFieldProps, type SearchHit, type SearchItemsOptions, type SearchMatchProps, type SearchMatchValue, type SearchRange, type SearchSuggestion, SearchTypeahead, type SearchTypeaheadProps, SectionHeading, type SectionHeadingProps, type SegmentedControlProps, type SelectProps, Sheet, type SheetProps, type ShimmerTextProps, type StoryFinding, TabPanels, type TableWidgetColumn, type TableWidgetProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type VisualizationWidgetProps, type WidgetStatus, dateTimeRangeFilter, dateTimeRangePresets, injectDataAppStyles, matchSearchText, searchItems, useAppFilters, useDateFormatting };
598
614
  //# sourceMappingURL=index.d.ts.map