@k2b/ui 0.48.0 → 0.50.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/dist/base.css +40 -2
- package/dist/browser/actions/ContextMenu.js +3 -0
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/CopyButton.js +26 -18
- package/dist/browser/actions/CopyButton.js.map +1 -1
- package/dist/browser/charts/core/area.js +190 -0
- package/dist/browser/charts/core/area.js.map +1 -0
- package/dist/browser/charts/core/calendar.js +186 -0
- package/dist/browser/charts/core/calendar.js.map +1 -0
- package/dist/browser/charts/core/chart-map-data.js +9 -0
- package/dist/browser/charts/core/chart-map-data.js.map +1 -0
- package/dist/browser/charts/core/index.js +12 -0
- package/dist/browser/charts/core/index.js.map +1 -0
- package/dist/browser/charts/core/inspection.js +9 -0
- package/dist/browser/charts/core/inspection.js.map +1 -0
- package/dist/browser/charts/core/registry.js +28 -0
- package/dist/browser/charts/core/registry.js.map +1 -0
- package/dist/browser/charts/core/render.js +103 -0
- package/dist/browser/charts/core/render.js.map +1 -0
- package/dist/browser/charts/core/snapshot.js +65 -0
- package/dist/browser/charts/core/snapshot.js.map +1 -0
- package/dist/browser/charts/core/svg.js +2542 -0
- package/dist/browser/charts/core/svg.js.map +1 -0
- package/dist/browser/charts/core/termination.test-fixture.js +162 -0
- package/dist/browser/charts/core/termination.test-fixture.js.map +1 -0
- package/dist/browser/charts/core/text.js +13 -0
- package/dist/browser/charts/core/text.js.map +1 -0
- package/dist/browser/charts/core/types.js +8 -0
- package/dist/browser/charts/core/types.js.map +1 -0
- package/dist/browser/charts.js +4 -2
- package/dist/browser/charts.js.map +1 -1
- package/dist/browser/content/BalanceSummary.js +106 -0
- package/dist/browser/content/BalanceSummary.js.map +1 -0
- package/dist/browser/content/Chart.js +134 -115
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/ChartExplorer.js +366 -122
- package/dist/browser/content/ChartExplorer.js.map +1 -1
- package/dist/browser/content/ChartSnapshotView.js +16 -9
- package/dist/browser/content/ChartSnapshotView.js.map +1 -1
- package/dist/browser/content/DataTable.js +676 -293
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/DataTableTools.js +119 -0
- package/dist/browser/content/DataTableTools.js.map +1 -0
- package/dist/browser/content/FlowAmount.js +82 -0
- package/dist/browser/content/FlowAmount.js.map +1 -0
- package/dist/browser/content/balance-summary-messages.js +26 -0
- package/dist/browser/content/balance-summary-messages.js.map +1 -0
- package/dist/browser/content/chart-bar.js +6 -6
- package/dist/browser/content/chart-bar.js.map +1 -1
- package/dist/browser/content/chart-calendar.js +43 -0
- package/dist/browser/content/chart-calendar.js.map +1 -0
- package/dist/browser/content/chart-inspection-core.js +164 -37
- package/dist/browser/content/chart-inspection-core.js.map +1 -1
- package/dist/browser/content/chart-inspection.js.map +1 -1
- package/dist/browser/content/chart-line-gaps.js +2 -2
- package/dist/browser/content/chart-line-gaps.js.map +1 -1
- package/dist/browser/content/chart-map-viewport.js.map +1 -1
- package/dist/browser/content/chart-message-catalog.js +164 -0
- package/dist/browser/content/chart-message-catalog.js.map +1 -0
- package/dist/browser/content/chart-messages.js +2 -138
- package/dist/browser/content/chart-messages.js.map +1 -1
- package/dist/browser/content/chart-snapshot.js +1 -62
- package/dist/browser/content/chart-snapshot.js.map +1 -1
- package/dist/browser/content/chart-state-timeline.js +1 -1
- package/dist/browser/content/chart-state-timeline.js.map +1 -1
- package/dist/browser/content/chart-svg.js +2 -1
- package/dist/browser/content/chart-svg.js.map +1 -1
- package/dist/browser/content/chart-time-axis.js +139 -0
- package/dist/browser/content/chart-time-axis.js.map +1 -0
- package/dist/browser/content/data-table-columns.js +160 -0
- package/dist/browser/content/data-table-columns.js.map +1 -0
- package/dist/browser/content/data-table-messages.js +38 -2
- package/dist/browser/content/data-table-messages.js.map +1 -1
- package/dist/browser/content/flow-amount-messages.js +26 -0
- package/dist/browser/content/flow-amount-messages.js.map +1 -0
- package/dist/browser/content/index.js +4 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/prompt-confirm.js +7 -4
- package/dist/browser/feedback/prompt-confirm.js.map +1 -1
- package/dist/browser/feedback/prompts.js +3 -3
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/inputs/DatePicker.js +5 -4
- package/dist/browser/inputs/DatePicker.js.map +1 -1
- package/dist/browser/inputs/NumberInput.js +17 -5
- package/dist/browser/inputs/NumberInput.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +50 -17
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +13 -0
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/intl/Format.js +31 -8
- package/dist/browser/intl/Format.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +580 -522
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +26 -0
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/index.js +1 -0
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/sheet-handle.js +155 -0
- package/dist/browser/layout/sheet-handle.js.map +1 -0
- package/dist/browser/surfaces/BudgetList.js +281 -0
- package/dist/browser/surfaces/BudgetList.js.map +1 -0
- package/dist/browser/surfaces/NoticeCard.js +48 -29
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/ProgressBar.js +134 -21
- package/dist/browser/surfaces/ProgressBar.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +320 -144
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/surfaces/StatGrid.js +75 -57
- package/dist/browser/surfaces/StatGrid.js.map +1 -1
- package/dist/browser/surfaces/budget-messages.js +64 -0
- package/dist/browser/surfaces/budget-messages.js.map +1 -0
- package/dist/browser/surfaces/delta-badge.js +65 -0
- package/dist/browser/surfaces/delta-badge.js.map +1 -0
- package/dist/browser/surfaces/index.js +2 -1
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/person-color.js +2 -2
- package/dist/browser/surfaces/person-color.js.map +1 -1
- package/dist/browser/surfaces/stat-cell-messages.js +41 -0
- package/dist/browser/surfaces/stat-cell-messages.js.map +1 -0
- package/dist/browser/widgets/Dashboard.js +137 -0
- package/dist/browser/widgets/Dashboard.js.map +1 -0
- package/dist/browser/widgets/index.js +1 -0
- package/dist/browser/widgets/index.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +3 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/CopyButton.js +13 -8
- package/dist/ssr/actions/CopyButton.js.map +1 -1
- package/dist/ssr/charts/core/area.js +190 -0
- package/dist/ssr/charts/core/area.js.map +1 -0
- package/dist/ssr/charts/core/calendar.js +186 -0
- package/dist/ssr/charts/core/calendar.js.map +1 -0
- package/dist/ssr/charts/core/chart-map-data.js +9 -0
- package/dist/ssr/charts/core/chart-map-data.js.map +1 -0
- package/dist/ssr/charts/core/index.js +12 -0
- package/dist/ssr/charts/core/index.js.map +1 -0
- package/dist/ssr/charts/core/inspection.js +9 -0
- package/dist/ssr/charts/core/inspection.js.map +1 -0
- package/dist/ssr/charts/core/registry.js +28 -0
- package/dist/ssr/charts/core/registry.js.map +1 -0
- package/dist/ssr/charts/core/render.js +103 -0
- package/dist/ssr/charts/core/render.js.map +1 -0
- package/dist/ssr/charts/core/snapshot.js +65 -0
- package/dist/ssr/charts/core/snapshot.js.map +1 -0
- package/dist/ssr/charts/core/svg.js +2542 -0
- package/dist/ssr/charts/core/svg.js.map +1 -0
- package/dist/ssr/charts/core/termination.test-fixture.js +162 -0
- package/dist/ssr/charts/core/termination.test-fixture.js.map +1 -0
- package/dist/ssr/charts/core/text.js +13 -0
- package/dist/ssr/charts/core/text.js.map +1 -0
- package/dist/ssr/charts/core/types.js +8 -0
- package/dist/ssr/charts/core/types.js.map +1 -0
- package/dist/ssr/charts.js +4 -2
- package/dist/ssr/charts.js.map +1 -1
- package/dist/ssr/content/BalanceSummary.js +75 -0
- package/dist/ssr/content/BalanceSummary.js.map +1 -0
- package/dist/ssr/content/Chart.js +90 -95
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/ChartExplorer.js +190 -46
- package/dist/ssr/content/ChartExplorer.js.map +1 -1
- package/dist/ssr/content/ChartSnapshotView.js +5 -1
- package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
- package/dist/ssr/content/DataTable.js +287 -78
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/DataTableTools.js +106 -0
- package/dist/ssr/content/DataTableTools.js.map +1 -0
- package/dist/ssr/content/FlowAmount.js +58 -0
- package/dist/ssr/content/FlowAmount.js.map +1 -0
- package/dist/ssr/content/balance-summary-messages.js +26 -0
- package/dist/ssr/content/balance-summary-messages.js.map +1 -0
- package/dist/ssr/content/chart-bar.js +6 -6
- package/dist/ssr/content/chart-bar.js.map +1 -1
- package/dist/ssr/content/chart-calendar.js +43 -0
- package/dist/ssr/content/chart-calendar.js.map +1 -0
- package/dist/ssr/content/chart-inspection-core.js +164 -37
- package/dist/ssr/content/chart-inspection-core.js.map +1 -1
- package/dist/ssr/content/chart-inspection.js.map +1 -1
- package/dist/ssr/content/chart-line-gaps.js +2 -2
- package/dist/ssr/content/chart-line-gaps.js.map +1 -1
- package/dist/ssr/content/chart-map-viewport.js.map +1 -1
- package/dist/ssr/content/chart-message-catalog.js +164 -0
- package/dist/ssr/content/chart-message-catalog.js.map +1 -0
- package/dist/ssr/content/chart-messages.js +2 -138
- package/dist/ssr/content/chart-messages.js.map +1 -1
- package/dist/ssr/content/chart-snapshot.js +1 -62
- package/dist/ssr/content/chart-snapshot.js.map +1 -1
- package/dist/ssr/content/chart-state-timeline.js +1 -1
- package/dist/ssr/content/chart-state-timeline.js.map +1 -1
- package/dist/ssr/content/chart-svg.js +2 -1
- package/dist/ssr/content/chart-svg.js.map +1 -1
- package/dist/ssr/content/chart-time-axis.js +139 -0
- package/dist/ssr/content/chart-time-axis.js.map +1 -0
- package/dist/ssr/content/data-table-columns.js +160 -0
- package/dist/ssr/content/data-table-columns.js.map +1 -0
- package/dist/ssr/content/data-table-messages.js +38 -2
- package/dist/ssr/content/data-table-messages.js.map +1 -1
- package/dist/ssr/content/flow-amount-messages.js +26 -0
- package/dist/ssr/content/flow-amount-messages.js.map +1 -0
- package/dist/ssr/content/index.js +4 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/prompt-confirm.js +7 -4
- package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +3 -3
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/inputs/DatePicker.js +5 -4
- package/dist/ssr/inputs/DatePicker.js.map +1 -1
- package/dist/ssr/inputs/NumberInput.js +17 -5
- package/dist/ssr/inputs/NumberInput.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +26 -9
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +13 -0
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/intl/Format.js +22 -2
- package/dist/ssr/intl/Format.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +158 -114
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +26 -0
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -0
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/sheet-handle.js +155 -0
- package/dist/ssr/layout/sheet-handle.js.map +1 -0
- package/dist/ssr/surfaces/BudgetList.js +170 -0
- package/dist/ssr/surfaces/BudgetList.js.map +1 -0
- package/dist/ssr/surfaces/NoticeCard.js +25 -10
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/ProgressBar.js +96 -5
- package/dist/ssr/surfaces/ProgressBar.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +157 -51
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/surfaces/StatGrid.js +24 -35
- package/dist/ssr/surfaces/StatGrid.js.map +1 -1
- package/dist/ssr/surfaces/budget-messages.js +64 -0
- package/dist/ssr/surfaces/budget-messages.js.map +1 -0
- package/dist/ssr/surfaces/delta-badge.js +41 -0
- package/dist/ssr/surfaces/delta-badge.js.map +1 -0
- package/dist/ssr/surfaces/index.js +2 -1
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/person-color.js +2 -2
- package/dist/ssr/surfaces/person-color.js.map +1 -1
- package/dist/ssr/surfaces/stat-cell-messages.js +41 -0
- package/dist/ssr/surfaces/stat-cell-messages.js.map +1 -0
- package/dist/ssr/widgets/Dashboard.js +84 -0
- package/dist/ssr/widgets/Dashboard.js.map +1 -0
- package/dist/ssr/widgets/index.js +1 -0
- package/dist/ssr/widgets/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/charts/core/area.d.ts +62 -0
- package/dist/types/charts/core/calendar.d.ts +57 -0
- package/dist/types/charts/core/chart-map-data.d.ts +3 -0
- package/dist/types/charts/core/index.d.ts +11 -0
- package/dist/types/charts/core/inspection.d.ts +16 -0
- package/dist/types/charts/core/registry.d.ts +27 -0
- package/dist/types/charts/core/render.d.ts +40 -0
- package/dist/types/charts/core/snapshot.d.ts +27 -0
- package/dist/types/charts/core/svg.d.ts +714 -0
- package/dist/types/charts/core/termination.test-fixture.d.ts +1 -0
- package/dist/types/charts/core/text.d.ts +5 -0
- package/dist/types/charts/core/types.d.ts +31 -0
- package/dist/types/charts.d.ts +4 -2
- package/dist/types/content/BalanceSummary.d.ts +29 -0
- package/dist/types/content/Chart.d.ts +26 -36
- package/dist/types/content/ChartExplorer.d.ts +43 -2
- package/dist/types/content/ChartSnapshotView.d.ts +1 -0
- package/dist/types/content/DataTable.d.ts +28 -0
- package/dist/types/content/DataTableTools.d.ts +44 -0
- package/dist/types/content/FlowAmount.d.ts +28 -0
- package/dist/types/content/balance-summary-messages.d.ts +11 -0
- package/dist/types/content/chart-bar.d.ts +1 -1
- package/dist/types/content/chart-calendar.d.ts +4 -0
- package/dist/types/content/chart-inspection-core.d.ts +21 -16
- package/dist/types/content/chart-inspection.d.ts +5 -1
- package/dist/types/content/chart-map-viewport.d.ts +1 -1
- package/dist/types/content/chart-message-catalog.d.ts +84 -0
- package/dist/types/content/chart-messages.d.ts +2 -33
- package/dist/types/content/chart-snapshot.d.ts +1 -26
- package/dist/types/content/chart-svg.d.ts +1 -1
- package/dist/types/content/chart-time-axis.d.ts +26 -0
- package/dist/types/content/data-table-columns.d.ts +72 -0
- package/dist/types/content/data-table-messages.d.ts +18 -0
- package/dist/types/content/flow-amount-messages.d.ts +11 -0
- package/dist/types/content/index.d.ts +10 -2
- package/dist/types/feedback/prompt-confirm.d.ts +3 -1
- package/dist/types/feedback/prompts.d.ts +2 -2
- package/dist/types/inputs/NumberInput.d.ts +1 -1
- package/dist/types/inputs/SelectChip.d.ts +2 -0
- package/dist/types/inputs/date-picker.d.ts +6 -0
- package/dist/types/intl/Format.d.ts +5 -0
- package/dist/types/layout/AppWorkspace.d.ts +21 -1
- package/dist/types/layout/MobileShell.d.ts +5 -0
- package/dist/types/layout/index.d.ts +2 -1
- package/dist/types/layout/sheet-handle.d.ts +21 -0
- package/dist/types/surfaces/BudgetList.d.ts +42 -0
- package/dist/types/surfaces/NoticeCard.d.ts +5 -2
- package/dist/types/surfaces/ProgressBar.d.ts +38 -2
- package/dist/types/surfaces/StatCell.d.ts +35 -2
- package/dist/types/surfaces/StatGrid.d.ts +3 -1
- package/dist/types/surfaces/budget-messages.d.ts +30 -0
- package/dist/types/surfaces/delta-badge.d.ts +10 -0
- package/dist/types/surfaces/index.d.ts +4 -3
- package/dist/types/surfaces/person-color.d.ts +2 -2
- package/dist/types/surfaces/stat-cell-messages.d.ts +19 -0
- package/dist/types/widgets/Dashboard.d.ts +42 -0
- package/dist/types/widgets/index.d.ts +1 -0
- package/package.json +7 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Conservative proportional-font advances in em, shared by DOM-free SVG label layout.
|
|
2
|
+
* Wide glyphs retain their natural shape; fitting removes whole code points instead of stretching text.
|
|
3
|
+
*/
|
|
4
|
+
export declare function chartTextWidth(text: string, size: number): number;
|
|
5
|
+
export declare function fitChartText(text: string, width: number, size: number): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { chartRenderers } from "./registry";
|
|
2
|
+
/** UI-owned kind union, derived from the renderer registry. */
|
|
3
|
+
export type ChartKind = keyof typeof chartRenderers;
|
|
4
|
+
export declare const chartDatumRoles: readonly ["point", "item", "bin", "box", "outlier", "value", "cell", "interval"];
|
|
5
|
+
export type ChartDatumRole = (typeof chartDatumRoles)[number];
|
|
6
|
+
/** Renderer metadata. Anchors use the containing SVG's coordinate space. */
|
|
7
|
+
export type ChartDatum = {
|
|
8
|
+
index: number;
|
|
9
|
+
seriesIndex?: number;
|
|
10
|
+
role: ChartDatumRole;
|
|
11
|
+
label?: string;
|
|
12
|
+
anchor: [number, number];
|
|
13
|
+
grid?: [number, number];
|
|
14
|
+
values: {
|
|
15
|
+
key: string;
|
|
16
|
+
value: string | number;
|
|
17
|
+
formatted?: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
/** Serializable number presentation, compatible with the editor's NumberFormat contract. */
|
|
21
|
+
export type ChartNumberFormat = {
|
|
22
|
+
style?: "number" | "percent" | "currency";
|
|
23
|
+
currency?: string;
|
|
24
|
+
unit?: string;
|
|
25
|
+
decimals?: number;
|
|
26
|
+
compact?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type ChartDateFormat = {
|
|
29
|
+
date: "day" | "minute" | "second";
|
|
30
|
+
};
|
|
31
|
+
export type ChartFormat = ChartNumberFormat | ChartDateFormat;
|
package/dist/types/charts.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* SVG themselves, such as server previews and app frames.
|
|
2
|
+
* Drawing helpers and portable chart contracts. Import the Solid Chart component from `@k2b/ui`.
|
|
4
3
|
*/
|
|
4
|
+
export * from "./charts/core";
|
|
5
|
+
export type { ChartKindProps, ChartLabels, ChartProps, ChartRenderOptions } from "./content/Chart";
|
|
5
6
|
export { type BarChartLayout, type BarChartOptions, barChartLayout, renderBarChartSvg } from "./content/chart-bar";
|
|
7
|
+
export { calendarInspectionNavigation, mountCalendarScroll } from "./content/chart-calendar";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
export type BalanceSummaryProps = {
|
|
3
|
+
/** The balance at the start of the period. */
|
|
4
|
+
start: number;
|
|
5
|
+
/** Money that came in during the period, as an amount (the sign is ignored). */
|
|
6
|
+
in: number;
|
|
7
|
+
/** Money that went out during the period, as an amount (the sign is ignored). */
|
|
8
|
+
out: number;
|
|
9
|
+
/** ISO 4217 currency code, e.g. `"EUR"`. */
|
|
10
|
+
currency: string;
|
|
11
|
+
/** Explicit locale override; defaults to the inherited render locale. */
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** Fixed fraction digits. Defaults to whole amounts, or cents when whole amounts would not add up. */
|
|
14
|
+
decimals?: number;
|
|
15
|
+
/** Replaces the words "Start", "End", "in" and "out". */
|
|
16
|
+
labels?: {
|
|
17
|
+
start?: string;
|
|
18
|
+
end?: string;
|
|
19
|
+
in?: string;
|
|
20
|
+
out?: string;
|
|
21
|
+
};
|
|
22
|
+
class?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* One line from the start of a period to its end: "Start 18,800 € + ↙ 29,260 € − ↗ 29,520 € = End 18,540 €". In and
|
|
26
|
+
* out show their direction with `FlowAmount`; start and end are balances and keep their sign.
|
|
27
|
+
*/
|
|
28
|
+
export declare function BalanceSummary(props: BalanceSummaryProps): JSX.Element;
|
|
29
|
+
export default BalanceSummary;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { MapViewport } from "@k2b/stdlib";
|
|
2
|
-
import { charts } from "@k2b/stdlib";
|
|
3
1
|
import type { JSX } from "solid-js";
|
|
4
|
-
import {
|
|
2
|
+
import { chartKinds } from "../charts/core/registry";
|
|
3
|
+
import { type ChartDrawingOptions } from "../charts/core/render";
|
|
5
4
|
import type { ChartCursor } from "./chart-cursor";
|
|
6
5
|
import { type ChartDatumRef, type ChartKind, type ChartSelection, type ChartTooltipFormatter } from "./chart-inspection-core";
|
|
7
|
-
import { type StateTimelineChartOptions, type StateTimelineDomain } from "./chart-state-timeline";
|
|
8
6
|
/**
|
|
9
|
-
* Chart —
|
|
7
|
+
* Chart — Solid interaction and sizing around the portable UI chart core.
|
|
10
8
|
*
|
|
11
9
|
* **Live-update story.** `charts.<kind>(opts)` returns an SVG string;
|
|
12
10
|
* Solid's `innerHTML` is reactive, so any time a prop (signal, store
|
|
@@ -24,15 +22,15 @@ import { type StateTimelineChartOptions, type StateTimelineDomain } from "./char
|
|
|
24
22
|
* from the row count and legend via `stateTimelineHeight()`.
|
|
25
23
|
*
|
|
26
24
|
* **Why so thin.** The props are a discriminated union over each
|
|
27
|
-
*
|
|
25
|
+
* registered core chart renderer — `kind: "line"` brings in exactly the params
|
|
28
26
|
* `charts.line` expects, `kind: "bar"` brings in `charts.bar`'s, etc.
|
|
29
|
-
* Options stay aligned with
|
|
27
|
+
* Options stay aligned with the core renderer without renaming. Every chart provides
|
|
30
28
|
* renderer-owned inspection, tooltips and optional selection by default.
|
|
31
29
|
* `interactive` adds bounded pan / zoom and reset controls to maps and state timelines.
|
|
32
|
-
*
|
|
30
|
+
* When a core renderer gains an option, it is automatically available at every
|
|
33
31
|
* callsite.
|
|
34
32
|
*
|
|
35
|
-
* **Theming.**
|
|
33
|
+
* **Theming.** The core renderers use `currentColor` for axes / ticks /
|
|
36
34
|
* tick labels — set the wrapping element's `color` and everything
|
|
37
35
|
* inherits. Series colors come from `--stdlib-chart-c1..c8` CSS
|
|
38
36
|
* custom properties; override on the parent for per-chart palettes.
|
|
@@ -49,7 +47,7 @@ import { type StateTimelineChartOptions, type StateTimelineDomain } from "./char
|
|
|
49
47
|
* <Chart kind="map" style={{ height: "16rem" }} series={locations()} interactive />
|
|
50
48
|
* ```
|
|
51
49
|
*/
|
|
52
|
-
/** All chart kinds
|
|
50
|
+
/** All registered chart kinds. */
|
|
53
51
|
export type { ChartKind } from "./chart-inspection-core";
|
|
54
52
|
export type ChartLabels = Partial<{
|
|
55
53
|
empty: string;
|
|
@@ -71,8 +69,9 @@ export type ChartLabels = Partial<{
|
|
|
71
69
|
* get full type safety.
|
|
72
70
|
*/
|
|
73
71
|
export type ChartProps = {
|
|
74
|
-
[K in ChartKind]: {
|
|
72
|
+
[K in ChartKind]: Extract<ChartDrawingOptions, {
|
|
75
73
|
kind: K;
|
|
74
|
+
}> & {
|
|
76
75
|
class?: string;
|
|
77
76
|
style?: JSX.CSSProperties | string;
|
|
78
77
|
labels?: ChartLabels;
|
|
@@ -89,30 +88,21 @@ export type ChartProps = {
|
|
|
89
88
|
tooltip?: ChartTooltipFormatter;
|
|
90
89
|
/** Optional shared X cursor for line charts. */
|
|
91
90
|
cursor?: ChartCursor;
|
|
92
|
-
}
|
|
93
|
-
/** Target when zooming in from the world view. Defaults to Europe (50, 10). */
|
|
94
|
-
zoomFocus?: Pick<MapViewport, "latitude" | "longitude">;
|
|
95
|
-
} : {}) & (K extends "line" ? {
|
|
96
|
-
/** Largest connected X distance; positive, finite, without area/errorBand fills. */ maxGap?: number;
|
|
97
|
-
/** Wrap the legend above the plot inside the caller's total chart height. Requires legend=true. */
|
|
98
|
-
legendPlacement?: "top-start";
|
|
99
|
-
} : {}) & (K extends "stateTimeline" ? StateTimelineChartOptions : K extends "bar" ? BarChartOptions : Omit<Parameters<(typeof charts)[K]>[0], "width" | "height" | "inspect">);
|
|
91
|
+
};
|
|
100
92
|
}[ChartKind];
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export declare const renderChartSvg: (props: ChartProps, width: number, height: number, mapViewport?: MapViewport, timelineViewport?: StateTimelineDomain) => string;
|
|
117
|
-
declare const Chart: (props: ChartProps) => JSX.Element;
|
|
93
|
+
export { type ChartRenderOptions, chartRenderHeight, renderChartSvg } from "../charts/core/render";
|
|
94
|
+
declare const ChartRoot: (props: ChartProps) => JSX.Element;
|
|
95
|
+
type KindProps<T> = T extends unknown ? Omit<T, "kind"> : never;
|
|
96
|
+
export type ChartKindProps<K extends ChartKind> = KindProps<Extract<ChartProps, {
|
|
97
|
+
kind: K;
|
|
98
|
+
}>>;
|
|
99
|
+
type ChartComponents = {
|
|
100
|
+
[Name in keyof typeof chartKinds]: (props: ChartKindProps<(typeof chartKinds)[Name]>) => JSX.Element;
|
|
101
|
+
};
|
|
102
|
+
declare const Chart: typeof ChartRoot & ChartComponents & {
|
|
103
|
+
Calendar: (props: Omit<Extract<ChartProps, {
|
|
104
|
+
kind: "heatmap";
|
|
105
|
+
layout: "calendar";
|
|
106
|
+
}>, "kind" | "layout">) => JSX.Element;
|
|
107
|
+
};
|
|
118
108
|
export default Chart;
|
|
@@ -23,14 +23,52 @@ export type ChartLegendEntry = {
|
|
|
23
23
|
/** A comparison series, drawn hollow like its marks. */
|
|
24
24
|
reference?: boolean;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* The latest read of an explorer's rows, kept apart from the rows on screen. Loading and a failure keep shown rows;
|
|
28
|
+
* without rows they take the viewport's place at its height.
|
|
29
|
+
*/
|
|
30
|
+
export type ChartFrameRequest = {
|
|
31
|
+
status: "idle" | "loading" | "error";
|
|
32
|
+
/** A host sentence for a failure, such as "The query timed out." */
|
|
33
|
+
reason?: string;
|
|
34
|
+
/** The range being read, such as "Last 90 days"; while it differs from `range` the subtitle names it. */
|
|
35
|
+
requestedRange?: string;
|
|
36
|
+
};
|
|
26
37
|
export type ChartExplorerProps<T extends ChartExplorerRow> = {
|
|
27
38
|
cursor?: ChartCursor;
|
|
28
39
|
title: string;
|
|
29
40
|
/** Level of the title heading. Defaults to 3; a chart inside a titled group of charts sits one level below it. */
|
|
30
41
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
31
42
|
description?: JSX.Element;
|
|
32
|
-
data
|
|
43
|
+
/** Owner actions in the header before Copy data, such as showing the query behind the chart. */
|
|
44
|
+
actions?: JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* Rows and the prepared chart. Without `chart`, `children` draws the chart view, such as a live `<Chart>`; the
|
|
47
|
+
* table and Copy data still come from the typed rows.
|
|
48
|
+
*/
|
|
49
|
+
data: ChartExplorerData<T> | {
|
|
50
|
+
rows: readonly T[];
|
|
51
|
+
};
|
|
52
|
+
/** The chart view when `data` has no prepared chart. */
|
|
53
|
+
children?: JSX.Element;
|
|
33
54
|
columns: readonly ChartExplorerColumn<T>[];
|
|
55
|
+
/**
|
|
56
|
+
* The read in flight or the last one that failed. With it the explorer shows loading, empty, failure and stale
|
|
57
|
+
* data in place: the title and subtitle stay, the viewport keeps its height, and nothing moves between states.
|
|
58
|
+
*/
|
|
59
|
+
request?: ChartFrameRequest;
|
|
60
|
+
/** When the shown rows were read, formatted by the host ("09:12"); named only when a newer read failed. */
|
|
61
|
+
asOf?: string;
|
|
62
|
+
/** The range the shown rows cover, such as "Last 30 days". */
|
|
63
|
+
range?: string;
|
|
64
|
+
/** Try again after a failure. Without it a failure has no button. */
|
|
65
|
+
onRetry?: () => void;
|
|
66
|
+
/**
|
|
67
|
+
* The padding of the frame around the explorer, one value or block and inline like CSS `padding` ("14px 16px").
|
|
68
|
+
* The table view then reaches the frame's left, right and bottom edges without a border of its own, and the frame
|
|
69
|
+
* keeps its height.
|
|
70
|
+
*/
|
|
71
|
+
inset?: string;
|
|
34
72
|
view?: "chart" | "table";
|
|
35
73
|
defaultView?: "chart" | "table";
|
|
36
74
|
onViewChange?: (view: "chart" | "table") => void;
|
|
@@ -61,7 +99,10 @@ export type ChartExplorerProps<T extends ChartExplorerRow> = {
|
|
|
61
99
|
* which draws in one row and runs out of narrow columns.
|
|
62
100
|
*/
|
|
63
101
|
legend?: readonly ChartLegendEntry[];
|
|
64
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* What the viewport shows without rows; defaults to "No data". With `request`, write one sentence that says why,
|
|
104
|
+
* such as "No newsletter was sent in this period."
|
|
105
|
+
*/
|
|
65
106
|
empty?: JSX.Element;
|
|
66
107
|
class?: string;
|
|
67
108
|
};
|
|
@@ -5,6 +5,7 @@ import type { ChartSnapshot } from "./chart-snapshot";
|
|
|
5
5
|
export declare function ChartSnapshotView(props: {
|
|
6
6
|
snapshot: ChartSnapshot;
|
|
7
7
|
cursor?: ChartCursor;
|
|
8
|
+
legend?: () => ParentNode | undefined;
|
|
8
9
|
selectedKey: string | null;
|
|
9
10
|
onSelect: (key: string) => void;
|
|
10
11
|
style?: JSX.CSSProperties;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
2
|
import type { CollectionSelection } from "./collection-selection";
|
|
3
|
+
import { type DataTableTypedColumn } from "./data-table-columns";
|
|
3
4
|
export type DataTableColumn<T> = {
|
|
4
5
|
id: string;
|
|
5
6
|
header: JSX.Element | ((ctx: {
|
|
@@ -29,6 +30,22 @@ export type DataTableColumn<T> = {
|
|
|
29
30
|
* rate while another sorts by the absolute count behind it.
|
|
30
31
|
*/
|
|
31
32
|
sortable?: boolean | string;
|
|
33
|
+
/** What the column holds; see `DataTableColumnType`. */
|
|
34
|
+
type?: DataTableTypedColumn["type"];
|
|
35
|
+
format?: DataTableTypedColumn["format"];
|
|
36
|
+
/** Labels and tones of a status column, by stored value. */
|
|
37
|
+
states?: DataTableTypedColumn["states"];
|
|
38
|
+
/** The value a bar column fills its track at; defaults to its largest value. */
|
|
39
|
+
max?: number;
|
|
40
|
+
/** The zone a date column with a time reads in; defaults to the reader's. */
|
|
41
|
+
timeZone?: string;
|
|
42
|
+
/** How a delta column reads and rates its change. */
|
|
43
|
+
delta?: DataTableTypedColumn["delta"];
|
|
44
|
+
/**
|
|
45
|
+
* How much a narrow table needs the column: 1 (default) always shows; 3 hides below a table width of 560 px,
|
|
46
|
+
* 2 below 420 px. Hidden values stay one tap away in the row's details.
|
|
47
|
+
*/
|
|
48
|
+
priority?: 1 | 2 | 3;
|
|
32
49
|
};
|
|
33
50
|
export type DataTableSort = {
|
|
34
51
|
key: string;
|
|
@@ -104,6 +121,17 @@ export type DataTableProps<T> = {
|
|
|
104
121
|
/** Additional classes for the scrolling region, such as `k2b-detail-trail`. */
|
|
105
122
|
scrollClass?: string;
|
|
106
123
|
scrollPreserveKey?: string | false;
|
|
124
|
+
/**
|
|
125
|
+
* The id of the column whose values split the rows into groups, each its own `<tbody>` under a row with the
|
|
126
|
+
* group's value and count, in the order the groups first appear.
|
|
127
|
+
*/
|
|
128
|
+
groupBy?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The host's search text. With no rows left, the table says that nothing matches it and offers to clear it
|
|
131
|
+
* through `onClearQuery`, instead of `empty`. Filter the rows with `filterRows`.
|
|
132
|
+
*/
|
|
133
|
+
query?: string;
|
|
134
|
+
onClearQuery?: () => void;
|
|
107
135
|
};
|
|
108
136
|
export type DataTablePanelProps = {
|
|
109
137
|
children: JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type Accessor, type JSX } from "solid-js";
|
|
2
|
+
import type { DataTableColumn, DataTableSort } from "./DataTable";
|
|
3
|
+
export type DataTableViewOptions<T> = {
|
|
4
|
+
rows: Accessor<readonly T[]>;
|
|
5
|
+
columns: Accessor<readonly DataTableColumn<T>[]>;
|
|
6
|
+
sort?: DataTableSort | null;
|
|
7
|
+
groupBy?: string | null;
|
|
8
|
+
};
|
|
9
|
+
export type DataTableView<T> = {
|
|
10
|
+
query: Accessor<string>;
|
|
11
|
+
setQuery: (query: string) => void;
|
|
12
|
+
sort: Accessor<DataTableSort | null>;
|
|
13
|
+
setSort: (sort: DataTableSort | null) => void;
|
|
14
|
+
groupBy: Accessor<string | null>;
|
|
15
|
+
setGroupBy: (id: string | null) => void;
|
|
16
|
+
/** The rows that match the query, in the chosen order. */
|
|
17
|
+
rows: Accessor<T[]>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The state of a table a reader searches, sorts and groups in the browser: pass `rows()` and the state to `DataTable`
|
|
21
|
+
* and the setters to `DataTableTools` and `onSortChange`. Search and order read the shown text of typed columns.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createDataTableView<T>(options: DataTableViewOptions<T>): DataTableView<T>;
|
|
24
|
+
export type DataTableToolsProps = {
|
|
25
|
+
/** The table's name, for the search field's accessible name ("Search Campaigns"). */
|
|
26
|
+
label: string;
|
|
27
|
+
query?: string;
|
|
28
|
+
onQueryChange?: (query: string) => void;
|
|
29
|
+
/** Columns the reader may group by; without them no group choice shows. An empty list keeps the choice in place while it loads. */
|
|
30
|
+
groups?: readonly {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
groupBy?: string | null;
|
|
35
|
+
onGroupByChange?: (id: string | null) => void;
|
|
36
|
+
/** While the table has no rows to work on, such as during loading or after a failure. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
class?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Search and group choice for the head of the frame that holds a table, never inside the table. Below a frame width
|
|
42
|
+
* of 560 px the tools take their own line under the title and the search field fills it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function DataTableTools(props: DataTableToolsProps): JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
export type FlowAmountDirection = "in" | "out" | "none";
|
|
3
|
+
export type FlowAmountProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
4
|
+
/** Signed amount: positive money comes in, negative goes out, zero moves nothing. */
|
|
5
|
+
value: number;
|
|
6
|
+
/** ISO 4217 currency code, e.g. `"EUR"`. */
|
|
7
|
+
currency: string;
|
|
8
|
+
/** Explicit locale override; defaults to the inherited render locale. */
|
|
9
|
+
locale?: string;
|
|
10
|
+
/** Fixed fraction digits. Defaults to the currency's standard digits. */
|
|
11
|
+
decimals?: number;
|
|
12
|
+
/** The direction words screen readers hear, e.g. `{ in: "Einnahme", out: "Ausgabe" }`. */
|
|
13
|
+
labels?: {
|
|
14
|
+
in?: string;
|
|
15
|
+
out?: string;
|
|
16
|
+
};
|
|
17
|
+
/** `"lg"` is the key figure size. */
|
|
18
|
+
size?: "md" | "lg";
|
|
19
|
+
};
|
|
20
|
+
/** The direction a signed amount moves money; `-0` and non-finite amounts move nothing (non-finite shows "—"). */
|
|
21
|
+
export declare const flowDirection: (value: number) => FlowAmountDirection;
|
|
22
|
+
/**
|
|
23
|
+
* Money with a direction: incoming is turquoise on a ringed surface with an arrow down-left, outgoing is violet with
|
|
24
|
+
* an arrow up-right, zero is grey with "=". The amount carries no sign; the arrow and, for screen readers, a word say
|
|
25
|
+
* the direction, so colour is never the only signal.
|
|
26
|
+
*/
|
|
27
|
+
export declare function FlowAmount(props: FlowAmountProps): JSX.Element;
|
|
28
|
+
export default FlowAmount;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const balanceSummaryMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
start: string;
|
|
3
|
+
end: string;
|
|
4
|
+
in: string;
|
|
5
|
+
out: string;
|
|
6
|
+
}>;
|
|
7
|
+
export type BalanceSummaryMessages = ReturnType<(typeof balanceSummaryMessages)["resolve"]>["t"];
|
|
8
|
+
/** Resolved from an explicit locale override, else the inherited render locale. */
|
|
9
|
+
export declare const useBalanceSummaryMessages: (override?: () => string | undefined) => (() => BalanceSummaryMessages);
|
|
10
|
+
export declare const checkBalanceSummaryMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AxisOptions, type BarItem, type ReferenceLine } from "
|
|
1
|
+
import { type AxisOptions, type BarItem, type ReferenceLine } from "../charts/core/svg";
|
|
2
2
|
/**
|
|
3
3
|
* Bar chart options: stdlib's `charts.bar` options plus a title for the category axis and a separate value format.
|
|
4
4
|
* The wrapper owns size and inspection.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ChartInspectionNavigation } from "./chart-inspection-core";
|
|
2
|
+
export declare const calendarInspectionNavigation: ChartInspectionNavigation;
|
|
3
|
+
/** A calendar starts at the newest week. Pointer inspection never resets its scroll position. */
|
|
4
|
+
export declare function mountCalendarScroll(container: HTMLElement): () => void;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartKind } from "../charts/core/types";
|
|
2
2
|
import type { ChartCursor } from "./chart-cursor";
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
rows: readonly {
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}[];
|
|
3
|
+
export { type ChartDatumRef, type ChartSelection, type ChartTooltip, type ChartTooltipFormatter, isChartDatum, sameChartDatum, } from "../charts/core/inspection";
|
|
4
|
+
export type { ChartKind } from "../charts/core/types";
|
|
5
|
+
import { type ChartDatumRef, type ChartSelection, type ChartTooltipFormatter } from "../charts/core/inspection";
|
|
6
|
+
/** Host policy for inspecting an overflowing drawing. */
|
|
7
|
+
export type ChartInspectionNavigation = {
|
|
8
|
+
last?: boolean;
|
|
9
|
+
pointer?: boolean;
|
|
10
|
+
reveal?: (element: SVGGraphicsElement) => void;
|
|
11
|
+
keepScroll?: boolean;
|
|
16
12
|
};
|
|
17
|
-
export type ChartTooltipFormatter = (selection: ChartSelection) => ChartTooltip;
|
|
18
|
-
export declare function isChartDatum(value: unknown): value is ChartDatum;
|
|
19
13
|
/** Enhances existing SVG nodes. Pointer/focus changes never rebuild the chart. */
|
|
20
14
|
export declare function createChartInspector(options: {
|
|
21
15
|
container: () => HTMLElement | undefined;
|
|
@@ -24,8 +18,13 @@ export declare function createChartInspector(options: {
|
|
|
24
18
|
anchor: () => HTMLSpanElement | undefined;
|
|
25
19
|
kind: () => ChartKind;
|
|
26
20
|
enabled: () => boolean;
|
|
21
|
+
/** Locale for unformatted values in an attached series legend. */
|
|
22
|
+
locale?: () => string;
|
|
23
|
+
/** Legend host when it is outside the inspected SVG container. */
|
|
24
|
+
legend?: () => ParentNode | undefined;
|
|
27
25
|
format: ChartTooltipFormatter;
|
|
28
26
|
select: (selection: ChartSelection) => void;
|
|
27
|
+
nav?: () => ChartInspectionNavigation | undefined;
|
|
29
28
|
}): {
|
|
30
29
|
selectDatum: (selected: ChartDatumRef | null | undefined) => void;
|
|
31
30
|
selectData: (selected: readonly ChartDatumRef[]) => void;
|
|
@@ -33,6 +32,7 @@ export declare function createChartInspector(options: {
|
|
|
33
32
|
destroy: () => void;
|
|
34
33
|
move: (event: PointerEvent) => void;
|
|
35
34
|
down: (event: PointerEvent) => void;
|
|
35
|
+
up: () => void;
|
|
36
36
|
click: (event: MouseEvent) => void;
|
|
37
37
|
focus: (event: FocusEvent) => void;
|
|
38
38
|
key: (event: KeyboardEvent) => boolean;
|
|
@@ -45,12 +45,17 @@ export declare function closeChartInspectionOnOutside(options: {
|
|
|
45
45
|
container: () => HTMLElement | undefined;
|
|
46
46
|
tooltip: () => HTMLElement | undefined;
|
|
47
47
|
close: () => void;
|
|
48
|
+
keepScroll?: () => boolean | undefined;
|
|
48
49
|
}): () => void;
|
|
49
50
|
export type InspectChartOptions = {
|
|
50
51
|
kind: ChartKind;
|
|
52
|
+
nav?: ChartInspectionNavigation;
|
|
51
53
|
format: ChartTooltipFormatter;
|
|
52
54
|
select?: (selection: ChartSelection) => void;
|
|
53
55
|
cursor?: ChartCursor;
|
|
56
|
+
locale?: string;
|
|
57
|
+
/** Host for a separately rendered series legend. Defaults to the chart container. */
|
|
58
|
+
legend?: ParentNode;
|
|
54
59
|
};
|
|
55
60
|
export type ChartInspection = {
|
|
56
61
|
invalidate(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChartCursor } from "./chart-cursor";
|
|
2
|
-
import { type ChartKind, type ChartSelection, type ChartTooltipFormatter } from "./chart-inspection-core";
|
|
2
|
+
import { type ChartInspectionNavigation, type ChartKind, type ChartSelection, type ChartTooltipFormatter } from "./chart-inspection-core";
|
|
3
3
|
export type { ChartSelection } from "./chart-inspection-core";
|
|
4
4
|
export declare function createChartInspection(options: {
|
|
5
5
|
container: () => HTMLDivElement | undefined;
|
|
@@ -7,7 +7,10 @@ export declare function createChartInspection(options: {
|
|
|
7
7
|
tooltip: () => HTMLSpanElement | undefined;
|
|
8
8
|
anchor: () => HTMLSpanElement | undefined;
|
|
9
9
|
kind: () => ChartKind;
|
|
10
|
+
nav?: () => ChartInspectionNavigation | undefined;
|
|
10
11
|
enabled: () => boolean;
|
|
12
|
+
locale?: () => string;
|
|
13
|
+
legend?: () => ParentNode | undefined;
|
|
11
14
|
format: ChartTooltipFormatter;
|
|
12
15
|
select: (selection: ChartSelection) => void;
|
|
13
16
|
}): {
|
|
@@ -15,6 +18,7 @@ export declare function createChartInspection(options: {
|
|
|
15
18
|
selectData: (selected: readonly import("./chart-inspection-core").ChartDatumRef[]) => void;
|
|
16
19
|
move: (event: PointerEvent) => void;
|
|
17
20
|
down: (event: PointerEvent) => void;
|
|
21
|
+
up: () => void;
|
|
18
22
|
click: (event: MouseEvent) => void;
|
|
19
23
|
focus: (event: FocusEvent) => void;
|
|
20
24
|
key: (event: KeyboardEvent) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MapViewport } from "
|
|
1
|
+
import type { MapViewport } from "../charts/core/svg";
|
|
2
2
|
export declare const DEFAULT_MAP_VIEWPORT: MapViewport;
|
|
3
3
|
export declare const normalizeMapViewport: (viewport: MapViewport | undefined) => MapViewport;
|
|
4
4
|
export declare const zoomMapViewport: (viewport: MapViewport, delta: number, focus?: Pick<MapViewport, "latitude" | "longitude">) => MapViewport;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare const chartMessages: import("@k2b/stdlib").Catalog<{
|
|
2
|
+
chartView: string;
|
|
3
|
+
chartDiagram: string;
|
|
4
|
+
chartData: string;
|
|
5
|
+
chartSeries: string;
|
|
6
|
+
chartOnly: string;
|
|
7
|
+
chartShowAll: string;
|
|
8
|
+
chartShowing: string;
|
|
9
|
+
chartSelectedDatum: string;
|
|
10
|
+
chartReference: string;
|
|
11
|
+
chartCurrent: string;
|
|
12
|
+
chartPinReference: string;
|
|
13
|
+
chartRemoveComparison: string;
|
|
14
|
+
chartPreviousData: string;
|
|
15
|
+
chartCopyData: string;
|
|
16
|
+
chartCopyFailed: string;
|
|
17
|
+
chartLegend: string;
|
|
18
|
+
chartLoading: string;
|
|
19
|
+
chartLoadingRange: ({ range }: {
|
|
20
|
+
range: string;
|
|
21
|
+
}) => string;
|
|
22
|
+
chartLoadFailed: string;
|
|
23
|
+
chartLoadFailedKept: string;
|
|
24
|
+
chartAsOf: ({ time }: {
|
|
25
|
+
time: string;
|
|
26
|
+
}) => string;
|
|
27
|
+
chartRefreshFailed: string;
|
|
28
|
+
chartRowsShown: ({ shown, total }: {
|
|
29
|
+
shown: string;
|
|
30
|
+
total: string;
|
|
31
|
+
}) => string;
|
|
32
|
+
interactiveLineChart: string;
|
|
33
|
+
interactiveChart: string;
|
|
34
|
+
chartFields: ({ key }: {
|
|
35
|
+
key: string;
|
|
36
|
+
}) => string;
|
|
37
|
+
interactiveMap: string;
|
|
38
|
+
interactiveTimeline: string;
|
|
39
|
+
series: string;
|
|
40
|
+
resetMapView: string;
|
|
41
|
+
resetTimelineView: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const resolveChartMessages: (locale: string) => {
|
|
44
|
+
chartView: string;
|
|
45
|
+
chartDiagram: string;
|
|
46
|
+
chartData: string;
|
|
47
|
+
chartSeries: string;
|
|
48
|
+
chartOnly: string;
|
|
49
|
+
chartShowAll: string;
|
|
50
|
+
chartShowing: string;
|
|
51
|
+
chartSelectedDatum: string;
|
|
52
|
+
chartReference: string;
|
|
53
|
+
chartCurrent: string;
|
|
54
|
+
chartPinReference: string;
|
|
55
|
+
chartRemoveComparison: string;
|
|
56
|
+
chartPreviousData: string;
|
|
57
|
+
chartCopyData: string;
|
|
58
|
+
chartCopyFailed: string;
|
|
59
|
+
chartLegend: string;
|
|
60
|
+
chartLoading: string;
|
|
61
|
+
chartLoadingRange: ({ range }: {
|
|
62
|
+
range: string;
|
|
63
|
+
}) => string;
|
|
64
|
+
chartLoadFailed: string;
|
|
65
|
+
chartLoadFailedKept: string;
|
|
66
|
+
chartAsOf: ({ time }: {
|
|
67
|
+
time: string;
|
|
68
|
+
}) => string;
|
|
69
|
+
chartRefreshFailed: string;
|
|
70
|
+
chartRowsShown: ({ shown, total }: {
|
|
71
|
+
shown: string;
|
|
72
|
+
total: string;
|
|
73
|
+
}) => string;
|
|
74
|
+
interactiveLineChart: string;
|
|
75
|
+
interactiveChart: string;
|
|
76
|
+
chartFields: ({ key }: {
|
|
77
|
+
key: string;
|
|
78
|
+
}) => string;
|
|
79
|
+
interactiveMap: string;
|
|
80
|
+
interactiveTimeline: string;
|
|
81
|
+
series: string;
|
|
82
|
+
resetMapView: string;
|
|
83
|
+
resetTimelineView: string;
|
|
84
|
+
};
|
|
@@ -1,37 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
chartDiagram: string;
|
|
4
|
-
chartData: string;
|
|
5
|
-
chartSeries: string;
|
|
6
|
-
chartOnly: string;
|
|
7
|
-
chartShowAll: string;
|
|
8
|
-
chartShowing: string;
|
|
9
|
-
chartSelectedDatum: string;
|
|
10
|
-
chartReference: string;
|
|
11
|
-
chartCurrent: string;
|
|
12
|
-
chartPinReference: string;
|
|
13
|
-
chartRemoveComparison: string;
|
|
14
|
-
chartPreviousData: string;
|
|
15
|
-
chartCopyData: string;
|
|
16
|
-
chartCopyFailed: string;
|
|
17
|
-
chartLegend: string;
|
|
18
|
-
chartRowsShown: ({ shown, total }: {
|
|
19
|
-
shown: string;
|
|
20
|
-
total: string;
|
|
21
|
-
}) => string;
|
|
22
|
-
interactiveLineChart: string;
|
|
23
|
-
interactiveChart: string;
|
|
24
|
-
chartFields: ({ key }: {
|
|
25
|
-
key: string;
|
|
26
|
-
}) => string;
|
|
27
|
-
interactiveMap: string;
|
|
28
|
-
interactiveTimeline: string;
|
|
29
|
-
series: string;
|
|
30
|
-
resetMapView: string;
|
|
31
|
-
resetTimelineView: string;
|
|
32
|
-
}>;
|
|
1
|
+
import { chartMessages } from "./chart-message-catalog";
|
|
2
|
+
export { chartMessages, resolveChartMessages } from "./chart-message-catalog";
|
|
33
3
|
export type ChartMessages = ReturnType<(typeof chartMessages)["resolve"]>["t"];
|
|
34
4
|
/** Resolved from the inherited render locale. */
|
|
35
5
|
export declare const useChartMessages: () => (() => ChartMessages);
|
|
36
6
|
export declare const checkChartMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
37
|
-
export {};
|