@altertable/data-app-react 0.0.0-stage → 0.71.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/LICENSE +21 -0
- package/README.md +58 -2
- package/THIRD_PARTY_NOTICES +18 -0
- package/dist/chunks/index-1nbjx0se.js +17022 -0
- package/dist/chunks/index-1nbjx0se.js.map +120 -0
- package/dist/index.js +2888 -0
- package/dist/index.js.map +23 -0
- package/dist/types/actions.d.ts +53 -0
- package/dist/types/annotations/AnnotationBar.d.ts +30 -0
- package/dist/types/annotations/AnnotationControls.d.ts +10 -0
- package/dist/types/annotations/AnnotationEditor.d.ts +16 -0
- package/dist/types/annotations/AnnotationMarkers.d.ts +19 -0
- package/dist/types/annotations/AnnotationSelectionLayer.d.ts +12 -0
- package/dist/types/annotations/AnnotationTarget.d.ts +9 -0
- package/dist/types/annotations/AnnotationTooltip.d.ts +9 -0
- package/dist/types/annotations/AnnotationTrigger.d.ts +10 -0
- package/dist/types/annotations/annotation-editor-state.d.ts +58 -0
- package/dist/types/annotations/annotation-screenshot.d.ts +4 -0
- package/dist/types/annotations/annotation-targets.d.ts +34 -0
- package/dist/types/annotations/getAnnotationProps.d.ts +17 -0
- package/dist/types/annotations/styles.d.ts +3 -0
- package/dist/types/annotations/useAnnotationGeometry.d.ts +22 -0
- package/dist/types/annotations/useDataAppAnnotations.d.ts +22 -0
- package/dist/types/app-context.d.ts +3 -0
- package/dist/types/bindings.d.ts +169 -0
- package/dist/types/content.d.ts +36 -0
- package/dist/types/date-formatting.d.ts +12 -0
- package/dist/types/details.d.ts +46 -0
- package/dist/types/exploration.d.ts +44 -0
- package/dist/types/hooks.d.ts +114 -0
- package/dist/types/index.d.ts +78 -0
- package/dist/types/injectStyles.d.ts +7 -0
- package/dist/types/mount.d.ts +13 -0
- package/dist/types/search-suggestions.d.ts +8 -0
- package/dist/types/source-owner.d.ts +2 -0
- package/dist/types/style-contract.d.ts +88 -0
- package/dist/types/style-validation.d.ts +2 -0
- package/dist/types/styles.d.ts +8 -0
- package/dist/types/ui/AboutData.d.ts +73 -0
- package/dist/types/ui/AltertableLogo.d.ts +3 -0
- package/dist/types/ui/AppFooter.d.ts +6 -0
- package/dist/types/ui/AppHeader.d.ts +10 -0
- package/dist/types/ui/AppLayout.d.ts +10 -0
- package/dist/types/ui/AppScope.d.ts +7 -0
- package/dist/types/ui/AppToolbar.d.ts +30 -0
- package/dist/types/ui/AreaChart.d.ts +7 -0
- package/dist/types/ui/BarChart.d.ts +6 -0
- package/dist/types/ui/Breakdown.d.ts +13 -0
- package/dist/types/ui/Button.d.ts +12 -0
- package/dist/types/ui/ChartLegend.d.ts +32 -0
- package/dist/types/ui/Checkbox.d.ts +21 -0
- package/dist/types/ui/CheckboxGroup.d.ts +7 -0
- package/dist/types/ui/ChoicePicker.d.ts +39 -0
- package/dist/types/ui/Comparison.d.ts +14 -0
- package/dist/types/ui/ComposedChart.d.ts +41 -0
- package/dist/types/ui/ComposedChartLegend.d.ts +9 -0
- package/dist/types/ui/ContentSkeleton.d.ts +7 -0
- package/dist/types/ui/DataApp.d.ts +24 -0
- package/dist/types/ui/DataAppFrame.d.ts +52 -0
- package/dist/types/ui/DataBoundary.d.ts +14 -0
- package/dist/types/ui/DataSection.d.ts +14 -0
- package/dist/types/ui/DataSectionBoundary.d.ts +30 -0
- package/dist/types/ui/DataTable.d.ts +29 -0
- package/dist/types/ui/DataValue.d.ts +9 -0
- package/dist/types/ui/DataViewToast.d.ts +11 -0
- package/dist/types/ui/DataWidget.d.ts +37 -0
- package/dist/types/ui/DateDisplay.d.ts +9 -0
- package/dist/types/ui/DateRangePicker.d.ts +30 -0
- package/dist/types/ui/DateTimeTooltip.d.ts +10 -0
- package/dist/types/ui/DimensionPicker.d.ts +14 -0
- package/dist/types/ui/EmptyState.d.ts +6 -0
- package/dist/types/ui/ExplorationActionControl.d.ts +60 -0
- package/dist/types/ui/ExportControl.d.ts +4 -0
- package/dist/types/ui/FilterActions.d.ts +10 -0
- package/dist/types/ui/FilterBar.d.ts +3 -0
- package/dist/types/ui/FunnelChart.d.ts +20 -0
- package/dist/types/ui/GettingStarted.d.ts +6 -0
- package/dist/types/ui/GlossaryDefinition.d.ts +7 -0
- package/dist/types/ui/GlossaryExplanation.d.ts +16 -0
- package/dist/types/ui/GradientScroll.d.ts +23 -0
- package/dist/types/ui/Grid.d.ts +12 -0
- package/dist/types/ui/GridItem.d.ts +7 -0
- package/dist/types/ui/HelpPopover.d.ts +21 -0
- package/dist/types/ui/IconButton.d.ts +19 -0
- package/dist/types/ui/InspectionContext.d.ts +12 -0
- package/dist/types/ui/InspectionProvider.d.ts +29 -0
- package/dist/types/ui/JourneyChart.d.ts +10 -0
- package/dist/types/ui/Kbd.d.ts +7 -0
- package/dist/types/ui/LineChart.d.ts +7 -0
- package/dist/types/ui/LiveControl.d.ts +10 -0
- package/dist/types/ui/Menu.d.ts +13 -0
- package/dist/types/ui/MetricWidget.d.ts +51 -0
- package/dist/types/ui/NumberField.d.ts +27 -0
- package/dist/types/ui/NumberFilterPicker.d.ts +11 -0
- package/dist/types/ui/PeriodSummary.d.ts +17 -0
- package/dist/types/ui/PickerField.d.ts +23 -0
- package/dist/types/ui/PieChart.d.ts +11 -0
- package/dist/types/ui/PopoverSurface.d.ts +5 -0
- package/dist/types/ui/PresentStory.d.ts +30 -0
- package/dist/types/ui/QueryList.d.ts +14 -0
- package/dist/types/ui/RadioGroup.d.ts +18 -0
- package/dist/types/ui/Ranking.d.ts +13 -0
- package/dist/types/ui/RefreshControl.d.ts +9 -0
- package/dist/types/ui/RequestHint.d.ts +20 -0
- package/dist/types/ui/RetentionChart.d.ts +27 -0
- package/dist/types/ui/ScatterChart.d.ts +17 -0
- package/dist/types/ui/SearchField.d.ts +23 -0
- package/dist/types/ui/SearchInput.d.ts +10 -0
- package/dist/types/ui/SearchMatch.d.ts +6 -0
- package/dist/types/ui/SearchTypeahead.d.ts +15 -0
- package/dist/types/ui/SectionHeading.d.ts +8 -0
- package/dist/types/ui/Select.d.ts +22 -0
- package/dist/types/ui/SelectionMark.d.ts +5 -0
- package/dist/types/ui/Sheet.d.ts +21 -0
- package/dist/types/ui/Skeleton.d.ts +8 -0
- package/dist/types/ui/Stack.d.ts +7 -0
- package/dist/types/ui/StaticDataApp.d.ts +4 -0
- package/dist/types/ui/StatusPanel.d.ts +10 -0
- package/dist/types/ui/TableWidget.d.ts +67 -0
- package/dist/types/ui/Tabs.d.ts +10 -0
- package/dist/types/ui/TextContent.d.ts +4 -0
- package/dist/types/ui/TextWidget.d.ts +20 -0
- package/dist/types/ui/ThemeSelector.d.ts +12 -0
- package/dist/types/ui/Toast.d.ts +8 -0
- package/dist/types/ui/Tooltip.d.ts +23 -0
- package/dist/types/ui/TooltipSurface.d.ts +3 -0
- package/dist/types/ui/TrendChart.d.ts +5 -0
- package/dist/types/ui/UpdatedAt.d.ts +9 -0
- package/dist/types/ui/VariableBar.d.ts +6 -0
- package/dist/types/ui/VisualizationWidget.d.ts +43 -0
- package/dist/types/ui/WidgetDisclosure.d.ts +6 -0
- package/dist/types/ui/WidgetEvidence.d.ts +12 -0
- package/dist/types/ui/WidgetViewTabs.d.ts +16 -0
- package/dist/types/ui/chart-data.d.ts +36 -0
- package/dist/types/ui/chart-date-axis.d.ts +15 -0
- package/dist/types/ui/chart-interaction.d.ts +27 -0
- package/dist/types/ui/chart-primitives.d.ts +22 -0
- package/dist/types/ui/chart-time.d.ts +19 -0
- package/dist/types/ui/chartColor.d.ts +2 -0
- package/dist/types/ui/classNames.d.ts +1 -0
- package/dist/types/ui/csv-export.d.ts +19 -0
- package/dist/types/ui/data-context.d.ts +76 -0
- package/dist/types/ui/data-identifiers.d.ts +32 -0
- package/dist/types/ui/icons.d.ts +49 -0
- package/dist/types/ui/index.d.ts +111 -0
- package/dist/types/ui/journey-flow.d.ts +49 -0
- package/dist/types/ui/keyboard.d.ts +6 -0
- package/dist/types/ui/metric-comparison.d.ts +30 -0
- package/dist/types/ui/metric.d.ts +11 -0
- package/dist/types/ui/presentation.d.ts +25 -0
- package/dist/types/ui/search.d.ts +6 -0
- package/dist/types/ui/searchItems.d.ts +36 -0
- package/dist/types/ui/shortcuts.d.ts +45 -0
- package/dist/types/ui/story.d.ts +20 -0
- package/dist/types/ui/time-interval.d.ts +96 -0
- package/dist/types/ui/use-chart-scroll-to-end.d.ts +2 -0
- package/dist/types/ui/useAppAppearance.d.ts +3 -0
- package/dist/types/ui/useDataAppPresentation.d.ts +3 -0
- package/dist/types/ui/useSvgId.d.ts +2 -0
- package/dist/types/ui/variables.d.ts +36 -0
- package/dist/types/ui/widget-views.d.ts +3 -0
- package/dist/types/view-control-bar.d.ts +18 -0
- package/dist/types/view-controls.d.ts +20 -0
- package/dist/types/view-runtime.d.ts +34 -0
- package/dist/types/view.d.ts +87 -0
- package/dist/types/widgets.d.ts +90 -0
- package/dist/ui/index.js +3520 -0
- package/dist/ui/index.js.map +36 -0
- package/package.json +65 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Altertable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @altertable/data-app-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React components, hooks, styles, and authoring tools for Altertable data apps.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```fish
|
|
8
|
+
bun add @altertable/data-app @altertable/data-app-react react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
React and React DOM 19.2 or newer are required.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Mount a simple static screen into an element with `id="root"`:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { defineDataApp } from '@altertable/data-app';
|
|
19
|
+
import { injectDataAppStyles, mountDataApp } from '@altertable/data-app-react';
|
|
20
|
+
import { MetricWidget } from '@altertable/data-app-react/ui';
|
|
21
|
+
|
|
22
|
+
const app = defineDataApp({
|
|
23
|
+
title: 'Activity',
|
|
24
|
+
description: 'A snapshot of activity.',
|
|
25
|
+
scope: { organization: 'demo', environment: 'production' },
|
|
26
|
+
queries: {},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
function App() {
|
|
30
|
+
return (
|
|
31
|
+
<MetricWidget
|
|
32
|
+
label="Active projects"
|
|
33
|
+
value={42}
|
|
34
|
+
format={{ kind: 'count' }}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
injectDataAppStyles();
|
|
40
|
+
mountDataApp({ app, component: App });
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use the main entry for declared views, bound widgets, and layouts; `/ui` supports
|
|
44
|
+
setup screens, static content, and custom composition. Install styles explicitly
|
|
45
|
+
with `injectDataAppStyles()`.
|
|
46
|
+
|
|
47
|
+
To embed an app in a React host, use `@altertable/data-app-embed/react`. These
|
|
48
|
+
packages do not depend on each other: this package builds the app UI; the embed
|
|
49
|
+
package manages its host iframe.
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
See the [React guide](https://github.com/altertable-ai/data-app/blob/main/docs/react.md)
|
|
54
|
+
and [single-file starter](https://github.com/altertable-ai/data-app/blob/main/examples/starter-data-app/index.tsx)
|
|
55
|
+
for apps with queries, filters, and bound widgets.
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
[MIT](LICENSE). Vendored code is covered by [third-party notices](THIRD_PARTY_NOTICES).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
d3-time 3.1.0 and d3-array 3.2.4
|
|
2
|
+
https://github.com/d3/d3-time
|
|
3
|
+
https://github.com/d3/d3-array
|
|
4
|
+
|
|
5
|
+
Copyright 2010-2022 Mike Bostock (d3-time)
|
|
6
|
+
Copyright 2010-2023 Mike Bostock (d3-array tick-step helpers)
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
9
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
10
|
+
and this permission notice appear in all copies.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
14
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
16
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
17
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
18
|
+
THIS SOFTWARE.
|