@altertable/data-app 0.70.0 → 0.72.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 +7 -1
- package/CONTRIBUTING.md +73 -33
- package/README.md +23 -26
- package/REFERENCE.md +1904 -0
- package/dist/chunks/index-5a27erdg.js +54 -0
- package/dist/chunks/index-5a27erdg.js.map +10 -0
- package/dist/chunks/{index-58kks6a8.js → index-9yxr7nmm.js} +330 -21
- package/dist/chunks/index-9yxr7nmm.js.map +17 -0
- package/dist/chunks/{index-wjt6cavj.js → index-j5q5n3ra.js} +5 -5
- package/dist/chunks/index-j5q5n3ra.js.map +10 -0
- package/dist/chunks/{index-22d576sn.js → index-q75zm3a7.js} +3 -3
- package/dist/chunks/{index-22d576sn.js.map → index-q75zm3a7.js.map} +3 -3
- package/dist/chunks/{index-9zqbrv2z.js → index-vhaec7m5.js} +4 -6
- package/dist/chunks/index-vhaec7m5.js.map +10 -0
- package/dist/chunks/{index-q1w84fv9.js → index-zp78caex.js} +345 -84
- package/dist/chunks/index-zp78caex.js.map +19 -0
- package/dist/client/index.js +284 -16
- package/dist/client/index.js.map +7 -3
- package/dist/core/appearance.js +181 -11
- package/dist/core/appearance.js.map +4 -3
- package/dist/core/config.js +3 -3
- package/dist/core/contract.js +10 -12
- package/dist/core/contract.js.map +1 -1
- package/dist/core/format.js +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/internal.js +418 -0
- package/dist/internal.js.map +15 -0
- package/dist/server/index.js +102 -0
- package/dist/server/index.js.map +10 -0
- package/dist/types/client/annotations.d.ts +1 -1
- package/dist/types/client/iframe.d.ts +6 -6
- package/dist/types/client/index.d.ts +3 -4
- package/dist/types/client/location.d.ts +2 -2
- package/dist/types/client/logger.d.ts +1 -1
- package/dist/types/client/navigation.d.ts +1 -1
- package/dist/types/client/transport.d.ts +1 -1
- package/dist/types/core/bridge.d.ts +1 -1
- package/dist/types/core/config.d.ts +8 -9
- package/dist/types/core/filters.d.ts +1 -1
- package/dist/types/core/format.d.ts +1 -2
- package/dist/types/core/messages.d.ts +3 -3
- package/dist/types/core/operation-types.d.ts +1 -1
- package/dist/types/core/presentation.d.ts +1 -1
- package/dist/types/core/reading.d.ts +1 -1
- package/dist/types/internal.d.ts +22 -0
- package/dist/types/server/index.d.ts +1 -2
- package/docs/app-authoring.md +18 -1
- package/docs/client.md +1 -1
- package/docs/contract.md +1 -1
- package/docs/data-context.md +3 -3
- package/docs/embed.md +4 -4
- package/docs/formatting-and-appearance.md +1 -1
- package/docs/hosted-apps.md +16 -8
- package/docs/local-data-apps.md +1 -1
- package/docs/react-embed.md +7 -6
- package/docs/react.md +6 -6
- package/docs/server-bun.md +6 -6
- package/docs/stories-and-export.md +3 -3
- package/docs/styling.md +2 -2
- package/docs/ui.md +6 -6
- package/docs/views.md +2 -2
- package/docs/widgets.md +4 -4
- package/docs/worker.md +4 -4
- package/package.json +15 -92
- package/THIRD_PARTY_NOTICES +0 -18
- package/dist/chunks/index-2ajhmsc4.js +0 -355
- package/dist/chunks/index-2ajhmsc4.js.map +0 -13
- package/dist/chunks/index-58kks6a8.js.map +0 -13
- package/dist/chunks/index-7q99hf1z.js +0 -87
- package/dist/chunks/index-7q99hf1z.js.map +0 -10
- package/dist/chunks/index-9zqbrv2z.js.map +0 -10
- package/dist/chunks/index-cv36cyna.js +0 -180
- package/dist/chunks/index-cv36cyna.js.map +0 -10
- package/dist/chunks/index-q1w84fv9.js.map +0 -15
- package/dist/chunks/index-rew95tbg.js +0 -272
- package/dist/chunks/index-rew95tbg.js.map +0 -13
- package/dist/chunks/index-vtpygsbq.js +0 -17270
- package/dist/chunks/index-vtpygsbq.js.map +0 -126
- package/dist/chunks/index-wjt6cavj.js.map +0 -10
- package/dist/chunks/index-wss3gd3h.js +0 -319
- package/dist/chunks/index-wss3gd3h.js.map +0 -13
- package/dist/chunks/index-xzb7sx6g.js +0 -221
- package/dist/chunks/index-xzb7sx6g.js.map +0 -12
- package/dist/embed/index.js +0 -138
- package/dist/embed/index.js.map +0 -12
- package/dist/local.js +0 -465
- package/dist/local.js.map +0 -16
- package/dist/preview.js +0 -1456
- package/dist/preview.js.map +0 -17
- package/dist/react/embed/index.js +0 -117
- package/dist/react/embed/index.js.map +0 -10
- package/dist/react/index.js +0 -2890
- package/dist/react/index.js.map +0 -23
- package/dist/react/ui/index.js +0 -3514
- package/dist/react/ui/index.js.map +0 -36
- package/dist/server.js +0 -334
- package/dist/server.js.map +0 -15
- package/dist/types/core/time-interval.d.ts +0 -96
- package/dist/types/embed/bootstrap.d.ts +0 -5
- package/dist/types/embed/bridge.d.ts +0 -12
- package/dist/types/embed/host.d.ts +0 -36
- package/dist/types/embed/index.d.ts +0 -14
- package/dist/types/embed/navigation.d.ts +0 -6
- package/dist/types/embed/runtime-html.d.ts +0 -2
- package/dist/types/embed/source.d.ts +0 -16
- package/dist/types/embed/sql.d.ts +0 -4
- package/dist/types/react/actions.d.ts +0 -53
- package/dist/types/react/annotations/AnnotationBar.d.ts +0 -30
- package/dist/types/react/annotations/AnnotationControls.d.ts +0 -10
- package/dist/types/react/annotations/AnnotationEditor.d.ts +0 -16
- package/dist/types/react/annotations/AnnotationMarkers.d.ts +0 -19
- package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +0 -12
- package/dist/types/react/annotations/AnnotationTarget.d.ts +0 -9
- package/dist/types/react/annotations/AnnotationTooltip.d.ts +0 -9
- package/dist/types/react/annotations/AnnotationTrigger.d.ts +0 -10
- package/dist/types/react/annotations/annotation-editor-state.d.ts +0 -58
- package/dist/types/react/annotations/annotation-screenshot.d.ts +0 -4
- package/dist/types/react/annotations/annotation-targets.d.ts +0 -34
- package/dist/types/react/annotations/getAnnotationProps.d.ts +0 -17
- package/dist/types/react/annotations/styles.d.ts +0 -3
- package/dist/types/react/annotations/useAnnotationGeometry.d.ts +0 -22
- package/dist/types/react/annotations/useDataAppAnnotations.d.ts +0 -22
- package/dist/types/react/app-context.d.ts +0 -3
- package/dist/types/react/bindings.d.ts +0 -169
- package/dist/types/react/content.d.ts +0 -36
- package/dist/types/react/date-formatting.d.ts +0 -12
- package/dist/types/react/details.d.ts +0 -46
- package/dist/types/react/embed/bridge.d.ts +0 -21
- package/dist/types/react/embed/index.d.ts +0 -7
- package/dist/types/react/exploration.d.ts +0 -44
- package/dist/types/react/hooks.d.ts +0 -113
- package/dist/types/react/index.d.ts +0 -78
- package/dist/types/react/injectStyles.d.ts +0 -7
- package/dist/types/react/mount.d.ts +0 -13
- package/dist/types/react/search-suggestions.d.ts +0 -8
- package/dist/types/react/source-owner.d.ts +0 -2
- package/dist/types/react/style-contract.d.ts +0 -88
- package/dist/types/react/style-validation.d.ts +0 -2
- package/dist/types/react/styles.d.ts +0 -8
- package/dist/types/react/ui/AboutData.d.ts +0 -73
- package/dist/types/react/ui/AltertableLogo.d.ts +0 -3
- package/dist/types/react/ui/AppFooter.d.ts +0 -6
- package/dist/types/react/ui/AppHeader.d.ts +0 -10
- package/dist/types/react/ui/AppLayout.d.ts +0 -10
- package/dist/types/react/ui/AppScope.d.ts +0 -7
- package/dist/types/react/ui/AppToolbar.d.ts +0 -30
- package/dist/types/react/ui/AreaChart.d.ts +0 -7
- package/dist/types/react/ui/BarChart.d.ts +0 -6
- package/dist/types/react/ui/Breakdown.d.ts +0 -13
- package/dist/types/react/ui/Button.d.ts +0 -12
- package/dist/types/react/ui/ChartLegend.d.ts +0 -32
- package/dist/types/react/ui/Checkbox.d.ts +0 -21
- package/dist/types/react/ui/CheckboxGroup.d.ts +0 -7
- package/dist/types/react/ui/ChoicePicker.d.ts +0 -39
- package/dist/types/react/ui/Comparison.d.ts +0 -14
- package/dist/types/react/ui/ComposedChart.d.ts +0 -41
- package/dist/types/react/ui/ComposedChartLegend.d.ts +0 -9
- package/dist/types/react/ui/ContentSkeleton.d.ts +0 -7
- package/dist/types/react/ui/DataApp.d.ts +0 -24
- package/dist/types/react/ui/DataAppFrame.d.ts +0 -52
- package/dist/types/react/ui/DataBoundary.d.ts +0 -14
- package/dist/types/react/ui/DataSection.d.ts +0 -14
- package/dist/types/react/ui/DataSectionBoundary.d.ts +0 -30
- package/dist/types/react/ui/DataTable.d.ts +0 -29
- package/dist/types/react/ui/DataValue.d.ts +0 -9
- package/dist/types/react/ui/DataViewToast.d.ts +0 -11
- package/dist/types/react/ui/DataWidget.d.ts +0 -37
- package/dist/types/react/ui/DateDisplay.d.ts +0 -9
- package/dist/types/react/ui/DateRangePicker.d.ts +0 -30
- package/dist/types/react/ui/DateTimeTooltip.d.ts +0 -10
- package/dist/types/react/ui/DimensionPicker.d.ts +0 -13
- package/dist/types/react/ui/EmptyState.d.ts +0 -6
- package/dist/types/react/ui/ExplorationActionControl.d.ts +0 -60
- package/dist/types/react/ui/ExportControl.d.ts +0 -4
- package/dist/types/react/ui/FilterActions.d.ts +0 -10
- package/dist/types/react/ui/FilterBar.d.ts +0 -3
- package/dist/types/react/ui/FunnelChart.d.ts +0 -20
- package/dist/types/react/ui/GettingStarted.d.ts +0 -6
- package/dist/types/react/ui/GlossaryDefinition.d.ts +0 -7
- package/dist/types/react/ui/GlossaryExplanation.d.ts +0 -16
- package/dist/types/react/ui/GradientScroll.d.ts +0 -23
- package/dist/types/react/ui/Grid.d.ts +0 -12
- package/dist/types/react/ui/GridItem.d.ts +0 -7
- package/dist/types/react/ui/HelpPopover.d.ts +0 -21
- package/dist/types/react/ui/IconButton.d.ts +0 -19
- package/dist/types/react/ui/InspectionContext.d.ts +0 -12
- package/dist/types/react/ui/InspectionProvider.d.ts +0 -29
- package/dist/types/react/ui/JourneyChart.d.ts +0 -10
- package/dist/types/react/ui/Kbd.d.ts +0 -7
- package/dist/types/react/ui/LineChart.d.ts +0 -7
- package/dist/types/react/ui/LiveControl.d.ts +0 -10
- package/dist/types/react/ui/Menu.d.ts +0 -13
- package/dist/types/react/ui/MetricWidget.d.ts +0 -51
- package/dist/types/react/ui/NumberField.d.ts +0 -27
- package/dist/types/react/ui/NumberFilterPicker.d.ts +0 -11
- package/dist/types/react/ui/PeriodSummary.d.ts +0 -17
- package/dist/types/react/ui/PickerField.d.ts +0 -23
- package/dist/types/react/ui/PieChart.d.ts +0 -11
- package/dist/types/react/ui/PopoverSurface.d.ts +0 -5
- package/dist/types/react/ui/PresentStory.d.ts +0 -30
- package/dist/types/react/ui/QueryList.d.ts +0 -14
- package/dist/types/react/ui/RadioGroup.d.ts +0 -18
- package/dist/types/react/ui/Ranking.d.ts +0 -13
- package/dist/types/react/ui/RefreshControl.d.ts +0 -9
- package/dist/types/react/ui/RequestHint.d.ts +0 -20
- package/dist/types/react/ui/RetentionChart.d.ts +0 -27
- package/dist/types/react/ui/ScatterChart.d.ts +0 -17
- package/dist/types/react/ui/SearchField.d.ts +0 -23
- package/dist/types/react/ui/SearchInput.d.ts +0 -10
- package/dist/types/react/ui/SearchMatch.d.ts +0 -6
- package/dist/types/react/ui/SearchTypeahead.d.ts +0 -15
- package/dist/types/react/ui/SectionHeading.d.ts +0 -8
- package/dist/types/react/ui/Select.d.ts +0 -22
- package/dist/types/react/ui/SelectionMark.d.ts +0 -5
- package/dist/types/react/ui/Sheet.d.ts +0 -21
- package/dist/types/react/ui/Skeleton.d.ts +0 -8
- package/dist/types/react/ui/Stack.d.ts +0 -7
- package/dist/types/react/ui/StaticDataApp.d.ts +0 -4
- package/dist/types/react/ui/StatusPanel.d.ts +0 -10
- package/dist/types/react/ui/TableWidget.d.ts +0 -67
- package/dist/types/react/ui/Tabs.d.ts +0 -10
- package/dist/types/react/ui/TextContent.d.ts +0 -4
- package/dist/types/react/ui/TextWidget.d.ts +0 -20
- package/dist/types/react/ui/ThemeSelector.d.ts +0 -12
- package/dist/types/react/ui/Toast.d.ts +0 -8
- package/dist/types/react/ui/Tooltip.d.ts +0 -23
- package/dist/types/react/ui/TooltipSurface.d.ts +0 -3
- package/dist/types/react/ui/TrendChart.d.ts +0 -5
- package/dist/types/react/ui/UpdatedAt.d.ts +0 -9
- package/dist/types/react/ui/VariableBar.d.ts +0 -6
- package/dist/types/react/ui/VisualizationWidget.d.ts +0 -43
- package/dist/types/react/ui/WidgetDisclosure.d.ts +0 -6
- package/dist/types/react/ui/WidgetEvidence.d.ts +0 -12
- package/dist/types/react/ui/WidgetViewTabs.d.ts +0 -16
- package/dist/types/react/ui/chart-data.d.ts +0 -36
- package/dist/types/react/ui/chart-date-axis.d.ts +0 -15
- package/dist/types/react/ui/chart-interaction.d.ts +0 -27
- package/dist/types/react/ui/chart-primitives.d.ts +0 -22
- package/dist/types/react/ui/chart-time.d.ts +0 -19
- package/dist/types/react/ui/chartColor.d.ts +0 -2
- package/dist/types/react/ui/classNames.d.ts +0 -1
- package/dist/types/react/ui/csv-export.d.ts +0 -19
- package/dist/types/react/ui/data-context.d.ts +0 -76
- package/dist/types/react/ui/data-identifiers.d.ts +0 -32
- package/dist/types/react/ui/icons.d.ts +0 -49
- package/dist/types/react/ui/index.d.ts +0 -111
- package/dist/types/react/ui/journey-flow.d.ts +0 -49
- package/dist/types/react/ui/keyboard.d.ts +0 -6
- package/dist/types/react/ui/metric-comparison.d.ts +0 -30
- package/dist/types/react/ui/metric.d.ts +0 -11
- package/dist/types/react/ui/presentation.d.ts +0 -25
- package/dist/types/react/ui/search.d.ts +0 -6
- package/dist/types/react/ui/searchItems.d.ts +0 -36
- package/dist/types/react/ui/shortcuts.d.ts +0 -45
- package/dist/types/react/ui/story.d.ts +0 -20
- package/dist/types/react/ui/use-chart-scroll-to-end.d.ts +0 -2
- package/dist/types/react/ui/useAppAppearance.d.ts +0 -3
- package/dist/types/react/ui/useDataAppPresentation.d.ts +0 -3
- package/dist/types/react/ui/useSvgId.d.ts +0 -2
- package/dist/types/react/ui/variables.d.ts +0 -38
- package/dist/types/react/ui/widget-views.d.ts +0 -3
- package/dist/types/react/view-control-bar.d.ts +0 -18
- package/dist/types/react/view-controls.d.ts +0 -20
- package/dist/types/react/view-runtime.d.ts +0 -34
- package/dist/types/react/view.d.ts +0 -87
- package/dist/types/react/widgets.d.ts +0 -90
- package/dist/types/server/local.d.ts +0 -19
- package/dist/types/server/preview/host.d.ts +0 -1
- package/dist/types/server/preview/index.d.ts +0 -16
- package/dist/types/server/reload-channel.d.ts +0 -6
- package/dist/worker.js +0 -106
- package/examples/starter-data-app/index.tsx +0 -193
- package/examples/starter-local-data-app/.bun-version +0 -1
- package/examples/starter-local-data-app/.node-version +0 -1
- package/examples/starter-local-data-app/.oxfmtrc.json +0 -4
- package/examples/starter-local-data-app/.oxlintrc.json +0 -33
- package/examples/starter-local-data-app/AGENTS.md +0 -22
- package/examples/starter-local-data-app/README.md +0 -54
- package/examples/starter-local-data-app/app.ts +0 -28
- package/examples/starter-local-data-app/bunfig.toml +0 -2
- package/examples/starter-local-data-app/package.json +0 -33
- package/examples/starter-local-data-app/src/App.tsx +0 -8
- package/examples/starter-local-data-app/src/assets.d.ts +0 -1
- package/examples/starter-local-data-app/src/data-context.ts +0 -21
- package/examples/starter-local-data-app/src/favicon.svg +0 -13
- package/examples/starter-local-data-app/src/index.html +0 -14
- package/examples/starter-local-data-app/src/main.tsx +0 -7
- package/examples/starter-local-data-app/src/operations.ts +0 -6
- package/examples/starter-local-data-app/src/server.ts +0 -6
- package/examples/starter-local-data-app/tsconfig.json +0 -21
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/** Direct UI composition and static screens. Requests use declared views from /react. */
|
|
2
|
-
export { DataAppProvider } from '../mount.js';
|
|
3
|
-
export { isPlainKeyEvent } from './keyboard.js';
|
|
4
|
-
export { GettingStarted } from './GettingStarted.js';
|
|
5
|
-
export { DataWidget } from './DataWidget.js';
|
|
6
|
-
export type { WidgetStatus } from './RequestHint.js';
|
|
7
|
-
export type { DataWidgetProps } from './DataWidget.js';
|
|
8
|
-
export { TextWidget } from './TextWidget.js';
|
|
9
|
-
export type { TextWidgetProps } from './TextWidget.js';
|
|
10
|
-
export { VisualizationWidget } from './VisualizationWidget.js';
|
|
11
|
-
export type { VisualizationWidgetProps } from './VisualizationWidget.js';
|
|
12
|
-
export { TableWidget } from './TableWidget.js';
|
|
13
|
-
export type { TableWidgetProps } from './TableWidget.js';
|
|
14
|
-
export { DataTable, DataTableEmptyRow, DataTableTimestamp, DataTableShare, } from './DataTable.js';
|
|
15
|
-
export type { DataTableProps, DataTableSearch, DataTableEmptyRowProps, DataTableTimestampProps, } from './DataTable.js';
|
|
16
|
-
export { MetricWidget } from './MetricWidget.js';
|
|
17
|
-
export type { MetricWidgetProps } from './MetricWidget.js';
|
|
18
|
-
export { DimensionPicker } from './DimensionPicker.js';
|
|
19
|
-
export { LiveControl } from './LiveControl.js';
|
|
20
|
-
export type { LiveControlProps, LiveIntervalSeconds, } from './LiveControl.js';
|
|
21
|
-
export { DateRangePicker } from './DateRangePicker.js';
|
|
22
|
-
export type { DatePresetId, DateRange, DateRangePickerProps, } from './DateRangePicker.js';
|
|
23
|
-
export { useAppVariables } from './variables.js';
|
|
24
|
-
export { SearchField } from './SearchField.js';
|
|
25
|
-
export type { SearchFieldProps } from './SearchField.js';
|
|
26
|
-
export { searchItems, matchSearchText } from './searchItems.js';
|
|
27
|
-
export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './searchItems.js';
|
|
28
|
-
export { SearchMatch } from './SearchMatch.js';
|
|
29
|
-
export type { SearchMatchProps } from './SearchMatch.js';
|
|
30
|
-
export { ChoicePicker } from './ChoicePicker.js';
|
|
31
|
-
export type { ChoiceOption, ChoicePickerProps, } from './ChoicePicker.js';
|
|
32
|
-
export { MenuTrigger, MenuButton, MenuPopover, Menu, MenuItem, MenuSection, MenuSeparator, } from './Menu.js';
|
|
33
|
-
export type { MenuTriggerProps, MenuPopoverProps, MenuProps, MenuItemProps, } from './Menu.js';
|
|
34
|
-
export { GradientScroll } from './GradientScroll.js';
|
|
35
|
-
export type { GradientScrollProps } from './GradientScroll.js';
|
|
36
|
-
export { Tabs, TabList, Tab, TabPanels, TabPanel, useViewTab, } from './Tabs.js';
|
|
37
|
-
export { GlossaryExplanation } from './GlossaryExplanation.js';
|
|
38
|
-
export type { GlossaryExplanationProps } from './GlossaryExplanation.js';
|
|
39
|
-
export { GlossaryDefinition } from './GlossaryDefinition.js';
|
|
40
|
-
export type { GlossaryDefinitionProps } from './GlossaryDefinition.js';
|
|
41
|
-
export { AboutData } from './AboutData.js';
|
|
42
|
-
export type { AboutDataProps, AboutEmpty, AboutSubject, AboutTab, } from './AboutData.js';
|
|
43
|
-
export { PresentStory } from './PresentStory.js';
|
|
44
|
-
export type { PresentStoryProps } from './PresentStory.js';
|
|
45
|
-
export type { StoryFinding, BoundStory } from './story.js';
|
|
46
|
-
export { Checkbox } from './Checkbox.js';
|
|
47
|
-
export type { CheckboxProps } from './Checkbox.js';
|
|
48
|
-
export { AppIcon } from './icons.js';
|
|
49
|
-
export type { AppIconName, AppIconProps } from './icons.js';
|
|
50
|
-
export { Sheet } from './Sheet.js';
|
|
51
|
-
export type { SheetProps } from './Sheet.js';
|
|
52
|
-
export { HelpPopover } from './HelpPopover.js';
|
|
53
|
-
export type { HelpPopoverProps } from './HelpPopover.js';
|
|
54
|
-
export { DataApp } from './StaticDataApp.js';
|
|
55
|
-
export type { DataAppProps } from './StaticDataApp.js';
|
|
56
|
-
export { injectDataAppStyles } from '../styles.js';
|
|
57
|
-
export { Tooltip, TooltipProvider } from './Tooltip.js';
|
|
58
|
-
export type { TooltipProps, TooltipProviderProps, } from './Tooltip.js';
|
|
59
|
-
export { LineChart } from './LineChart.js';
|
|
60
|
-
export type { LineChartProps, LineChartItem } from './LineChart.js';
|
|
61
|
-
export { AreaChart } from './AreaChart.js';
|
|
62
|
-
export type { AreaChartProps, AreaChartItem } from './AreaChart.js';
|
|
63
|
-
export { PieChart } from './PieChart.js';
|
|
64
|
-
export type { PieChartProps, PieChartItem } from './PieChart.js';
|
|
65
|
-
export { ScatterChart } from './ScatterChart.js';
|
|
66
|
-
export type { ScatterChartProps, ScatterChartItem, } from './ScatterChart.js';
|
|
67
|
-
export { BarChart } from './BarChart.js';
|
|
68
|
-
export type { BarChartProps, BarChartItem } from './BarChart.js';
|
|
69
|
-
export { DataValue } from './DataValue.js';
|
|
70
|
-
export type { DataValueProps } from './DataValue.js';
|
|
71
|
-
export type { CsvExport, CsvTable } from './csv-export.js';
|
|
72
|
-
export type { TableWidgetColumn } from './TableWidget.js';
|
|
73
|
-
export type { DataReading, MetricReading } from '../../core/reading.js';
|
|
74
|
-
export type { DataAppStyle, DataAppStyleToken, DataAppStyleHooks, } from '../style-contract.js';
|
|
75
|
-
export { Select } from './Select.js';
|
|
76
|
-
export type { SelectProps } from './Select.js';
|
|
77
|
-
export { RadioGroup, Radio, SegmentedControl } from './RadioGroup.js';
|
|
78
|
-
export type { RadioGroupProps, RadioProps, SegmentedControlProps, } from './RadioGroup.js';
|
|
79
|
-
export { CheckboxGroup } from './CheckboxGroup.js';
|
|
80
|
-
export type { CheckboxGroupProps } from './CheckboxGroup.js';
|
|
81
|
-
export { NumberField, NumberRangeField } from './NumberField.js';
|
|
82
|
-
export type { NumberFieldProps, NumberRangeFieldProps, NumberRange, } from './NumberField.js';
|
|
83
|
-
export { FilterBar } from './FilterBar.js';
|
|
84
|
-
export type { FilterBarProps } from './FilterBar.js';
|
|
85
|
-
export { VariableBar } from './VariableBar.js';
|
|
86
|
-
export type { VariableBarProps } from './VariableBar.js';
|
|
87
|
-
export { FilterActions } from './FilterActions.js';
|
|
88
|
-
export type { FilterActionsProps } from './FilterActions.js';
|
|
89
|
-
export { NumberFilterPicker } from './NumberFilterPicker.js';
|
|
90
|
-
export type { NumberFilterPickerProps } from './NumberFilterPicker.js';
|
|
91
|
-
export { ComposedChart } from './ComposedChart.js';
|
|
92
|
-
export type { ComposedChartProps } from './ComposedChart.js';
|
|
93
|
-
export { ChartLegend } from './ChartLegend.js';
|
|
94
|
-
export type { ChartLegendProps, ChartLegendItemProps, ChartLegendMarkerProps, ChartLegendLabelProps, ChartLegendMarkerKind, } from './ChartLegend.js';
|
|
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';
|
|
110
|
-
export { ExplorationActionControl } from './ExplorationActionControl.js';
|
|
111
|
-
export type { ExplorationActionControlProps, ExplorationAction, ItemActions, } from './ExplorationActionControl.js';
|
|
@@ -1,49 +0,0 @@
|
|
|
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,6 +0,0 @@
|
|
|
1
|
-
type KeyEvent = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'isComposing'>;
|
|
2
|
-
/** Keep local key actions separate from shortcuts and IME composition. Pass React's nativeEvent. */
|
|
3
|
-
export declare function isPlainKeyEvent(event: KeyEvent, { allowShift }?: {
|
|
4
|
-
allowShift?: boolean;
|
|
5
|
-
}): boolean;
|
|
6
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { DateRangeRequest } from '../../core/contract.js';
|
|
2
|
-
import { type MetricFormat, type DateFormatOptions } from '../../core/format.js';
|
|
3
|
-
export type MetricComparison = {
|
|
4
|
-
current: {
|
|
5
|
-
value: number;
|
|
6
|
-
formattedValue: string;
|
|
7
|
-
periodLabel?: string;
|
|
8
|
-
};
|
|
9
|
-
previous?: {
|
|
10
|
-
value: number | null;
|
|
11
|
-
formattedValue: string;
|
|
12
|
-
periodLabel?: string;
|
|
13
|
-
};
|
|
14
|
-
favorableDirection?: 'up' | 'down';
|
|
15
|
-
};
|
|
16
|
-
/** Label a comparison from the input that produced the displayed result. Null means the
|
|
17
|
-
* requested previous period has no comparable value; zero remains a measured value. */
|
|
18
|
-
export declare function calendarMetricComparison(displayedInput: DateRangeRequest, values: {
|
|
19
|
-
current: number;
|
|
20
|
-
previous: number | null;
|
|
21
|
-
format: MetricFormat;
|
|
22
|
-
favorableDirection?: MetricComparison['favorableDirection'];
|
|
23
|
-
}, options?: DateFormatOptions): MetricComparison | undefined;
|
|
24
|
-
/** A zero or missing baseline has no meaningful relative percentage. */
|
|
25
|
-
export declare function comparisonChange({ current, previous, favorableDirection, }: MetricComparison): {
|
|
26
|
-
readonly percent: number | null;
|
|
27
|
-
readonly direction: "down" | "flat" | "up";
|
|
28
|
-
readonly tone: "bad" | "good" | "neutral";
|
|
29
|
-
readonly icon: "trendDown" | "trendFlat" | "trendUp";
|
|
30
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MetricFormat, DateFormatOptions } from '../../core/format.js';
|
|
2
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
3
|
-
import type { MetricReading } from '../../core/reading.js';
|
|
4
|
-
export type MetricDefinition = {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
format: MetricFormat;
|
|
8
|
-
favorableDirection?: 'up' | 'down';
|
|
9
|
-
evidence: WidgetEvidence;
|
|
10
|
-
};
|
|
11
|
-
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading, options?: DateFormatOptions): import("./metric-comparison.js").MetricComparison | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DataReading } from '../../core/reading.js';
|
|
3
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
4
|
-
export type EmptyContent = {
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
/** A relevant recovery action; omit when there is nothing the user can change. */
|
|
8
|
-
action?: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export type SkeletonContent = {
|
|
11
|
-
variant: 'metric' | 'panel' | 'ranking';
|
|
12
|
-
/**
|
|
13
|
-
* Placeholder rows, clamped to 0–100.
|
|
14
|
-
* @default 4
|
|
15
|
-
*/
|
|
16
|
-
rows?: number;
|
|
17
|
-
};
|
|
18
|
-
/** A bound widget must explain empty results and link the reading to its evidence. */
|
|
19
|
-
export type BoundWidgetReading<Data> = {
|
|
20
|
-
reading: DataReading<Data>;
|
|
21
|
-
isEmpty: (data: Data) => boolean;
|
|
22
|
-
emptyFallback: EmptyContent;
|
|
23
|
-
evidence: WidgetEvidence;
|
|
24
|
-
skeleton?: SkeletonContent;
|
|
25
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function searchParams(): URLSearchParams;
|
|
2
|
-
/** Listen to Back/Forward and writes made by another runtime control. */
|
|
3
|
-
export declare function subscribeSearch(listener: () => void): () => void;
|
|
4
|
-
/** Write search keys. `null` removes a key. Skips the history write when nothing changed. */
|
|
5
|
-
export declare function writeSearch(update: Record<string, string | null>, mode?: 'replace' | 'push'): void;
|
|
6
|
-
export declare function slug(value: string): string;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type SearchRange = {
|
|
2
|
-
start: number;
|
|
3
|
-
end: number;
|
|
4
|
-
};
|
|
5
|
-
/** The exact displayed text and its offsets stay together for safe rendering. */
|
|
6
|
-
export type SearchMatchValue = {
|
|
7
|
-
text: string;
|
|
8
|
-
ranges: readonly SearchRange[];
|
|
9
|
-
};
|
|
10
|
-
export type SearchAttribute<Item> = {
|
|
11
|
-
name: string;
|
|
12
|
-
getter: (item: Item) => string;
|
|
13
|
-
weight?: number;
|
|
14
|
-
};
|
|
15
|
-
export type SearchHit<Item> = {
|
|
16
|
-
item: Item;
|
|
17
|
-
score: number;
|
|
18
|
-
/** Render displayed fields with <SearchMatch match={hit.matches.fieldName} />. */
|
|
19
|
-
matches: Record<string, SearchMatchValue>;
|
|
20
|
-
};
|
|
21
|
-
export type SearchItemsOptions<Item> = {
|
|
22
|
-
attributes: readonly [SearchAttribute<Item>, ...SearchAttribute<Item>[]];
|
|
23
|
-
/** Literal filtering preserves source order; fuzzy search ranks discovery results. */
|
|
24
|
-
mode?: 'literal' | 'fuzzy';
|
|
25
|
-
limit?: number;
|
|
26
|
-
fuzzyThreshold?: number;
|
|
27
|
-
};
|
|
28
|
-
/** Highlight literal query terms in supplied text without filtering or reordering results. */
|
|
29
|
-
export declare function matchSearchText(text: string, query: string): SearchMatchValue;
|
|
30
|
-
/**
|
|
31
|
-
* Search only a complete local collection. Empty queries retain every item.
|
|
32
|
-
* When a searched field is displayed, render its match with SearchMatch:
|
|
33
|
-
* `hits.map(hit => <SearchMatch match={hit.matches.name} />)`.
|
|
34
|
-
* Fields used only to find a row need no visible highlight.
|
|
35
|
-
*/
|
|
36
|
-
export declare function searchItems<Item>(items: readonly Item[], query: string, options: SearchItemsOptions<Item>): SearchHit<Item>[];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `alt` is Alt/Option, leaving character keys and browser refresh untouched; `mod` is ⌘ on Apple
|
|
3
|
-
* platforms and Ctrl elsewhere.
|
|
4
|
-
*/
|
|
5
|
-
export type Shortcut = {
|
|
6
|
-
modifier: 'alt' | 'mod';
|
|
7
|
-
shift?: boolean;
|
|
8
|
-
code: string;
|
|
9
|
-
key: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const shortcuts: {
|
|
12
|
-
readonly annotate: {
|
|
13
|
-
readonly modifier: 'mod';
|
|
14
|
-
readonly shift: true;
|
|
15
|
-
readonly code: 'Period';
|
|
16
|
-
readonly key: '.';
|
|
17
|
-
};
|
|
18
|
-
readonly sendAnnotations: {
|
|
19
|
-
readonly modifier: 'mod';
|
|
20
|
-
readonly code: 'Enter';
|
|
21
|
-
readonly key: 'Enter';
|
|
22
|
-
};
|
|
23
|
-
readonly refresh: {
|
|
24
|
-
readonly modifier: 'alt';
|
|
25
|
-
readonly code: 'KeyR';
|
|
26
|
-
readonly key: 'R';
|
|
27
|
-
};
|
|
28
|
-
readonly aboutData: {
|
|
29
|
-
readonly modifier: 'alt';
|
|
30
|
-
readonly code: 'KeyI';
|
|
31
|
-
readonly key: 'I';
|
|
32
|
-
};
|
|
33
|
-
readonly playStory: {
|
|
34
|
-
readonly modifier: 'mod';
|
|
35
|
-
readonly shift: true;
|
|
36
|
-
readonly code: 'Enter';
|
|
37
|
-
readonly key: 'Enter';
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export declare function shortcutLabel({ modifier, shift, key }: Shortcut): string;
|
|
41
|
-
export declare function ariaKeyShortcuts({ modifier, shift, key }: Shortcut): string;
|
|
42
|
-
export declare function isEditingTarget(target: EventTarget | null): boolean;
|
|
43
|
-
export declare function matchesShortcut(event: KeyboardEvent, shortcut: Shortcut): boolean;
|
|
44
|
-
/** Bind a page-level shortcut. Ignored while typing or while a modal layer is open. */
|
|
45
|
-
export declare function useShortcut(shortcut: Shortcut, action: () => void, enabled?: boolean, allowWhileEditing?: boolean): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DisplayedSnapshot } from '../../core/data-view.js';
|
|
3
|
-
import type { MetricDefinition } from './metric.js';
|
|
4
|
-
import type { StoryStep } from './PresentStory.js';
|
|
5
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
6
|
-
import type { DataContext } from './data-context.js';
|
|
7
|
-
/** One consequential, inspectable finding from the displayed result. */
|
|
8
|
-
export type StoryFinding = {
|
|
9
|
-
id: string;
|
|
10
|
-
headline: string;
|
|
11
|
-
context?: string;
|
|
12
|
-
visual: ReactNode;
|
|
13
|
-
visualKind?: 'metric' | 'chart';
|
|
14
|
-
evidence: WidgetEvidence | MetricDefinition;
|
|
15
|
-
};
|
|
16
|
-
/** One to four findings with unique, nonempty IDs and registered evidence.
|
|
17
|
-
* Receives the displayed result and its original input during refresh or failure. */
|
|
18
|
-
export type BoundStory<Data, Input> = (snapshot: DisplayedSnapshot<Data, Input>) => readonly StoryFinding[];
|
|
19
|
-
/** Validate the authored findings before handing them to the presentation UI. */
|
|
20
|
-
export declare function storySteps(findings: readonly StoryFinding[], context: DataContext): StoryStep[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Theme, type AppearanceOptions } from '../../core/appearance.js';
|
|
2
|
-
/** The parent theme takes precedence; only standalone viewers receive controls. */
|
|
3
|
-
export declare function useAppAppearance(appearance: AppearanceOptions | undefined, hostTheme?: Theme): import("../../core/appearance.js").ThemeController | undefined;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { DatePresetId, DateRange } from '../../core/date-range.js';
|
|
2
|
-
import { type AppVariableValues, type DateRangeSelection, type DateRangeVariable, type HistoryMode, type VariableCollection } from '../../core/variables.js';
|
|
3
|
-
export { defineAppVariables, searchVariable, choiceVariable, multiChoiceVariable, dateRangeVariable, } from '../../core/variables.js';
|
|
4
|
-
export type { VariablePresentation, AppVariable, AppVariableValues, ChoiceOption, ChoiceVariable, MultiChoiceVariable, SearchVariable, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, VariableCollection, } from '../../core/variables.js';
|
|
5
|
-
/** Adapt one date variable to the controlled picker without giving the picker URL ownership. */
|
|
6
|
-
export declare function dateRangeControl(variable: DateRangeVariable, selection: DateRangeSelection, onChange: (selection: DateRangeSelection) => void): {
|
|
7
|
-
minDate?: string;
|
|
8
|
-
maxDate: string;
|
|
9
|
-
maxRangeDays: number;
|
|
10
|
-
timeZone: string;
|
|
11
|
-
value: DateRange;
|
|
12
|
-
label: string | undefined;
|
|
13
|
-
onChange(range: DateRange | null): void;
|
|
14
|
-
onPresetChange(id: DatePresetId): void;
|
|
15
|
-
selectedPresetId: DatePresetId | null;
|
|
16
|
-
onReset(): void;
|
|
17
|
-
isDefault: boolean;
|
|
18
|
-
resetValue: DateRange;
|
|
19
|
-
comparison?: {
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
range: DateRange | null;
|
|
22
|
-
onChange(enabled: boolean): void;
|
|
23
|
-
} | undefined;
|
|
24
|
-
};
|
|
25
|
-
/** URL is the source of truth for app variables; one update can change dependent values atomically. */
|
|
26
|
-
export declare function useAppVariables<const Variables extends VariableCollection>(definitions: Variables): {
|
|
27
|
-
values: AppVariableValues<Variables>;
|
|
28
|
-
set: <Key extends keyof Variables & string>(name: Key, value: AppVariableValues<Variables>[Key]) => void;
|
|
29
|
-
reset: <Key extends keyof Variables & string>(name: Key) => void;
|
|
30
|
-
resetAll: () => void;
|
|
31
|
-
clearAll: () => void;
|
|
32
|
-
update: (next: Partial<AppVariableValues<Variables>>, history?: HistoryMode) => void;
|
|
33
|
-
bind: <Key extends keyof Variables & string>(name: Key) => {
|
|
34
|
-
value: AppVariableValues<Variables>[Key];
|
|
35
|
-
onChange(value: AppVariableValues<Variables>[Key]): void;
|
|
36
|
-
resetValue: AppVariableValues<Variables>[Key];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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,20 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type AppVariableValues, type VariableCollection } from './ui/variables.js';
|
|
3
|
-
import type { ResolvedVariables } from './view.js';
|
|
4
|
-
/** URL values resolve before facets; facet keys include their dependent inputs for cached, bounded loading. */
|
|
5
|
-
export declare function useViewVariables<Variables extends VariableCollection>(definitions: Variables, clientScope: string, loadFacet: (operation: string, input: unknown, signal: AbortSignal) => Promise<unknown>): {
|
|
6
|
-
values: AppVariableValues<Variables>;
|
|
7
|
-
set: <Key extends keyof Variables & string>(name: Key, value: AppVariableValues<Variables>[Key]) => void;
|
|
8
|
-
reset: <Key extends keyof Variables & string>(name: Key) => void;
|
|
9
|
-
resetAll: () => void;
|
|
10
|
-
clearAll: () => void;
|
|
11
|
-
update: (next: Partial<AppVariableValues<Variables>>, history?: import("../core/variables.js").HistoryMode) => void;
|
|
12
|
-
bind: <Key extends keyof Variables & string>(name: Key) => {
|
|
13
|
-
value: AppVariableValues<Variables>[Key];
|
|
14
|
-
onChange(value: AppVariableValues<Variables>[Key]): void;
|
|
15
|
-
resetValue: AppVariableValues<Variables>[Key];
|
|
16
|
-
};
|
|
17
|
-
resolved: ResolvedVariables<Variables>;
|
|
18
|
-
searchControls: ReactNode[] | null;
|
|
19
|
-
filterControls: import("react").JSX.Element | null;
|
|
20
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { DataContext } from './ui/data-context.js';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import type { DataView, DisplayedSnapshot } from '../core/data-view.js';
|
|
4
|
-
import type { DisclosedQuery } from '../core/contract.js';
|
|
5
|
-
import type { EmptyContent } from './ui/presentation.js';
|
|
6
|
-
export type ViewResult<Data, Input> = {
|
|
7
|
-
dataContext: DataContext;
|
|
8
|
-
timeZone?: string;
|
|
9
|
-
view: DataView<Data, Input>;
|
|
10
|
-
snapshot?: DisplayedSnapshot<Data, Input>;
|
|
11
|
-
refetch: () => unknown;
|
|
12
|
-
cancel: () => unknown;
|
|
13
|
-
refreshing: boolean;
|
|
14
|
-
queries?: DisclosedQuery[];
|
|
15
|
-
searchControls?: ReactNode;
|
|
16
|
-
filterControls?: ReactNode;
|
|
17
|
-
emptyFallback: EmptyContent;
|
|
18
|
-
};
|
|
19
|
-
/** The executor is private; declarations expose data composition, not subscription hooks. */
|
|
20
|
-
export declare class DeclaredView<Data, Input, Definition = unknown> {
|
|
21
|
-
#private;
|
|
22
|
-
constructor(useResult: () => ViewResult<Data, Input>, definition?: Definition);
|
|
23
|
-
static definition<Data, Input, Definition>(view: DeclaredView<Data, Input, Definition>): Definition;
|
|
24
|
-
static useResult<View extends DeclaredView<unknown, unknown>>(view: View): DeclaredViewResult<View>;
|
|
25
|
-
}
|
|
26
|
-
/** Distribute across declarations so each result keeps its own data and input together. */
|
|
27
|
-
type DeclaredViewResult<View> = View extends DeclaredView<infer Data, infer Input> ? ViewResult<Data, Input> : never;
|
|
28
|
-
export declare function useDeclaredResult<View extends DeclaredView<unknown, unknown>>(view: View): DeclaredViewResult<View>;
|
|
29
|
-
export declare const PrimaryViewContext: import("react").Context<{
|
|
30
|
-
declaration: object;
|
|
31
|
-
result: ViewResult<unknown, unknown>;
|
|
32
|
-
} | null>;
|
|
33
|
-
export declare function getViewDefinition<Data, Input, Definition>(view: DeclaredView<Data, Input, Definition>): Definition;
|
|
34
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type { DataContext } from './ui/data-context.js';
|
|
2
|
-
import type { EmptyContent } from './ui/presentation.js';
|
|
3
|
-
import type { AppVariableValues, DateRangeVariable, VariableCollection, CheckedFacetContexts } from '../core/variables.js';
|
|
4
|
-
import type { DateRangeRequest } from '../core/contract.js';
|
|
5
|
-
type ResolvedVariable<Variable> = Variable extends DateRangeVariable ? DateRangeRequest : AppVariableValues<{
|
|
6
|
-
value: Variable;
|
|
7
|
-
}>['value'];
|
|
8
|
-
export type ResolvedVariables<Variables extends VariableCollection> = {
|
|
9
|
-
[Key in keyof Variables]: ResolvedVariable<Variables[Key]> | (string extends keyof Variables ? undefined : never);
|
|
10
|
-
};
|
|
11
|
-
type DateVariableKey<Variables extends VariableCollection> = {
|
|
12
|
-
[Key in keyof Variables]: Variables[Key] extends DateRangeVariable ? Key : never;
|
|
13
|
-
}[keyof Variables] & string;
|
|
14
|
-
export type ViewDate<Variables extends VariableCollection, Input> = {
|
|
15
|
-
variable: DateVariableKey<Variables>;
|
|
16
|
-
/** Extract the selected range and comparison unchanged, including from nested inputs. */
|
|
17
|
-
input: (input: Input) => DateRangeRequest;
|
|
18
|
-
};
|
|
19
|
-
/** Read variable values from a custom operation input; omitted keys use top-level fields. */
|
|
20
|
-
export type ViewBindings<Variables extends VariableCollection, Input> = Partial<{
|
|
21
|
-
[Key in keyof Variables]: (input: Input) => ResolvedVariables<Variables>[Key];
|
|
22
|
-
}>;
|
|
23
|
-
type RequiredFilterBindingKeys<Variables extends VariableCollection, Input> = {
|
|
24
|
-
[Key in keyof Variables]: Variables[Key]['kind'] extends 'dateRange' ? never : Variables[Key]['kind'] extends 'choice' ? [Input] extends [Record<Key, unknown>] ? ResolvedVariables<Variables>[Key] extends Input[Key] ? never : Key : Key : Extract<Variables[Key]['presentation'], {
|
|
25
|
-
group: 'display';
|
|
26
|
-
}> extends never ? [Input] extends [Record<Key, ResolvedVariables<Variables>[Key]>] ? [ResolvedVariables<Variables>[Key]] extends [Input[Key]] ? never : Key : Key : never;
|
|
27
|
-
}[keyof Variables];
|
|
28
|
-
/** Derive compatible top-level filter bindings; require readers for other input shapes. */
|
|
29
|
-
export type ViewBindingOptions<Variables extends VariableCollection, Input, AdditionalRequired extends keyof Variables = never> = [RequiredFilterBindingKeys<Variables, Input> | AdditionalRequired] extends [
|
|
30
|
-
never
|
|
31
|
-
] ? {
|
|
32
|
-
bindings?: ViewBindings<Variables, Input>;
|
|
33
|
-
} : {
|
|
34
|
-
bindings: ViewBindings<Variables, Input> & {
|
|
35
|
-
[Key in RequiredFilterBindingKeys<Variables, Input> | AdditionalRequired]-?: (input: Input) => ResolvedVariables<Variables>[Key];
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type SameViewInput<Variables extends VariableCollection, Input> = [
|
|
39
|
-
ResolvedVariables<Variables>
|
|
40
|
-
] extends [Input] ? [Input] extends [
|
|
41
|
-
{
|
|
42
|
-
[Key in keyof Variables]: Variables[Key]['kind'] extends 'choice' ? string : ResolvedVariables<Variables>[Key];
|
|
43
|
-
}
|
|
44
|
-
] ? [Input] extends [Record<string, never>] ? true : [keyof Input] extends [keyof Variables] ? true : false : false : false;
|
|
45
|
-
type ViewInputMapping<Variables extends VariableCollection, Input> = SameViewInput<Variables, Input> extends true ? {
|
|
46
|
-
input?: (values: ResolvedVariables<Variables>) => Input;
|
|
47
|
-
} : {
|
|
48
|
-
input: (values: ResolvedVariables<Variables>) => Input;
|
|
49
|
-
};
|
|
50
|
-
export type DataViewDefinition<Name extends string, Variables extends VariableCollection, Input, Data> = {
|
|
51
|
-
operation: Name;
|
|
52
|
-
dataContext: DataContext;
|
|
53
|
-
/** App-owned semantics: measured zero need not mean an empty result. */
|
|
54
|
-
isEmpty: (data: Data) => boolean;
|
|
55
|
-
/** Inherited by DataSection unless it supplies its own copy. */
|
|
56
|
-
emptyFallback: EmptyContent;
|
|
57
|
-
} & (keyof Variables extends never ? {
|
|
58
|
-
variables?: Variables & CheckedFacetContexts<NoInfer<Variables>>;
|
|
59
|
-
} : {
|
|
60
|
-
variables: Variables & CheckedFacetContexts<NoInfer<Variables>>;
|
|
61
|
-
}) & ViewInputMapping<NoInfer<Variables>, Input> & ViewBindingOptions<NoInfer<Variables>, Input> & ({
|
|
62
|
-
date: ViewDate<Variables, Input>;
|
|
63
|
-
describeInput?: (input: Input) => string;
|
|
64
|
-
} | {
|
|
65
|
-
date?: never;
|
|
66
|
-
describeInput: (input: Input) => string;
|
|
67
|
-
});
|
|
68
|
-
export type ResolvedDataViewDefinition<Name extends string, Variables extends VariableCollection, Input, Data> = Omit<DataViewDefinition<Name, Variables, Input, Data>, 'variables' | 'input'> & {
|
|
69
|
-
variables: Variables;
|
|
70
|
-
input: (values: ResolvedVariables<Variables>) => Input;
|
|
71
|
-
};
|
|
72
|
-
export declare function describeViewInput<Input>(definition: {
|
|
73
|
-
variables: VariableCollection;
|
|
74
|
-
bindings?: Partial<Record<string, (input: Input) => unknown>>;
|
|
75
|
-
date?: {
|
|
76
|
-
variable: string;
|
|
77
|
-
input: (input: Input) => DateRangeRequest;
|
|
78
|
-
};
|
|
79
|
-
describeInput?: (input: Input) => string;
|
|
80
|
-
}): (input: Input) => string;
|
|
81
|
-
export declare function resolveViewInput<Variables extends VariableCollection, Input>(definition: {
|
|
82
|
-
input: (values: ResolvedVariables<Variables>) => Input;
|
|
83
|
-
date?: ViewDate<Variables, Input>;
|
|
84
|
-
variables: Variables;
|
|
85
|
-
bindings?: ViewBindings<Variables, Input>;
|
|
86
|
-
}, values: ResolvedVariables<Variables>): Input;
|
|
87
|
-
export {};
|