@eifi1/ui-kit 0.52.0 → 0.54.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/README.md +52 -59
- package/dist/account/delete-account-setting.d.ts +3 -2
- package/dist/account/delete-account-setting.js.map +1 -1
- package/dist/auth/auth-errors.d.ts +36 -0
- package/dist/auth/auth-errors.js +20 -0
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/billing/cancel-subscription.d.ts +5 -14
- package/dist/billing/cancel-subscription.js +1 -3
- package/dist/billing/cancel-subscription.js.map +1 -1
- package/dist/billing/plan-card.d.ts +5 -13
- package/dist/billing/plan-card.js +3 -11
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-switch.d.ts +5 -14
- package/dist/billing/plan-switch.js +1 -3
- package/dist/billing/plan-switch.js.map +1 -1
- package/dist/chart.d.ts +3 -14
- package/dist/chart.js +64 -11
- package/dist/chart.js.map +1 -1
- package/dist/components/amount-input.d.ts +2 -1
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/calendar-heatmap.js +4 -2
- package/dist/components/calendar-heatmap.js.map +1 -1
- package/dist/components/currency-option-list.d.ts +2 -1
- package/dist/components/currency-option-list.js +10 -3
- package/dist/components/currency-option-list.js.map +1 -1
- package/dist/components/currency-select.d.ts +3 -1
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.d.ts +22 -1
- package/dist/components/danger-confirm.js +50 -28
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-filter-popover.d.ts +2 -1
- package/dist/components/data-table-filter-popover.js +3 -2
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +33 -3
- package/dist/components/data-table-filters.js +6 -4
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/date-field.d.ts +1 -1
- package/dist/components/date-field.js.map +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +4 -17
- package/dist/components/date-range-picker.js +2 -2
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog-frame.d.ts +3 -1
- package/dist/components/dialog-frame.js +6 -2
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/mini-calendar.js +3 -2
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.d.ts +27 -0
- package/dist/components/modal.js +5 -3
- package/dist/components/modal.js.map +1 -1
- package/dist/components/nav-pills.d.ts +1 -1
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/series-chart-axes.d.ts +1 -1
- package/dist/components/series-chart-axes.js.map +1 -1
- package/dist/components/series-chart.d.ts +64 -19
- package/dist/components/series-chart.js +2 -1
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/stat-tile.d.ts +21 -2
- package/dist/components/stat-tile.js +4 -2
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/treemap-labels.d.ts +6 -1
- package/dist/components/treemap-labels.js +2 -2
- package/dist/components/treemap-labels.js.map +1 -1
- package/dist/components/treemap.d.ts +29 -4
- package/dist/components/treemap.js +22 -9
- package/dist/components/treemap.js.map +1 -1
- package/dist/currencies.d.ts +16 -2
- package/dist/currencies.js +2 -1
- package/dist/currencies.js.map +1 -1
- package/dist/data-table.d.ts +1 -6
- package/dist/data-table.js +1 -9
- package/dist/data-table.js.map +1 -1
- package/dist/demo/demo-countdown.d.ts +0 -5
- package/dist/demo/demo-countdown.js +0 -4
- package/dist/demo/demo-countdown.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/feedback/feedback-context-labels.js +2 -1
- package/dist/feedback/feedback-context-labels.js.map +1 -1
- package/dist/feedback/feedback-context.d.ts +19 -3
- package/dist/feedback/feedback-context.js +12 -1
- package/dist/feedback/feedback-context.js.map +1 -1
- package/dist/feedback/feedback-diagnostics.d.ts +17 -0
- package/dist/feedback/feedback-diagnostics.js +27 -0
- package/dist/feedback/feedback-diagnostics.js.map +1 -0
- package/dist/feedback/feedback-dialog.d.ts +10 -0
- package/dist/feedback/feedback-dialog.js +6 -4
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-mutation.d.ts +11 -23
- package/dist/feedback/feedback-mutation.js +1 -9
- package/dist/feedback/feedback-mutation.js.map +1 -1
- package/dist/feedback/feedback-public-list.d.ts +1 -6
- package/dist/feedback/feedback-public-list.js +1 -2
- package/dist/feedback/feedback-public-list.js.map +1 -1
- package/dist/feedback/feedback-record.d.ts +5 -0
- package/dist/feedback/feedback-record.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.js +1 -8
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -1
- package/dist/feedback/feedback-row-detail.d.ts +6 -50
- package/dist/feedback/feedback-row-detail.js +3 -8
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.d.ts +3 -19
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.d.ts +5 -1
- package/dist/feedback/feedback-submit-dialog.js +15 -3
- package/dist/feedback/feedback-submit-dialog.js.map +1 -1
- package/dist/feedback/feedback-submit.d.ts +30 -2
- package/dist/feedback/feedback-submit.js +5 -2
- package/dist/feedback/feedback-submit.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +0 -9
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback.d.ts +6 -40
- package/dist/feedback.js +88 -46
- package/dist/feedback.js.map +1 -1
- package/dist/hooks/use-hotkey.js +11 -1
- package/dist/hooks/use-hotkey.js.map +1 -1
- package/dist/i18n/defaults.js +0 -4
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +5 -20
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +5 -14
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +5 -31
- package/dist/i18n/locales/en.js.map +3 -3
- package/dist/i18n/locales/es.js +5 -20
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +5 -20
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +5 -20
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +5 -21
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +5 -20
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +9 -4
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js +0 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +18 -67
- package/dist/index.js +28 -103
- package/dist/index.js.map +1 -1
- package/dist/lib/dates.d.ts +7 -1
- package/dist/lib/dates.js +8 -1
- package/dist/lib/dates.js.map +1 -1
- package/dist/lib/format.d.ts +37 -2
- package/dist/lib/format.js +25 -1
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/intl-cache.d.ts +4 -2
- package/dist/lib/intl-cache.js.map +1 -1
- package/dist/lib/translation-review.d.ts +26 -0
- package/dist/lib/translation-review.js +14 -0
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/rhf/fields.d.ts +2 -2
- package/dist/rhf/fields.js.map +1 -1
- package/dist/search/search-index.d.ts +0 -6
- package/dist/search/search-index.js +0 -4
- package/dist/search/search-index.js.map +1 -1
- package/dist/search.d.ts +1 -8
- package/dist/search.js +2 -7
- package/dist/search.js.map +1 -1
- package/dist/shell/account-menu-language.d.ts +7 -21
- package/dist/shell/account-menu-language.js +1 -3
- package/dist/shell/account-menu-language.js.map +1 -1
- package/dist/shell/account-menu-text-size.d.ts +9 -23
- package/dist/shell/account-menu-text-size.js +2 -3
- package/dist/shell/account-menu-text-size.js.map +1 -1
- package/dist/shell/app-shell.d.ts +0 -10
- package/dist/shell/app-shell.js +1 -7
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/company-switcher.d.ts +1 -1
- package/dist/shell/company-switcher.js.map +1 -1
- package/dist/shell/dev-menu.d.ts +1 -1
- package/dist/shell/dev-menu.js.map +1 -1
- package/dist/shell/top-bar-parts-labels.d.ts +1 -1
- package/dist/shell/top-bar-parts-labels.js.map +1 -1
- package/dist/shell.d.ts +7 -29
- package/dist/shell.js +12 -42
- package/dist/shell.js.map +1 -1
- package/dist/sync.d.ts +2 -6
- package/dist/sync.js +2 -15
- package/dist/sync.js.map +1 -1
- package/dist/theme/chart-palette.d.ts +0 -5
- package/dist/theme/chart-palette.js +0 -2
- package/dist/theme/chart-palette.js.map +1 -1
- package/package.json +1 -1
- package/src/account/delete-account-setting.tsx +3 -2
- package/src/auth/auth-errors.ts +69 -0
- package/src/billing/cancel-subscription.tsx +5 -16
- package/src/billing/plan-card.tsx +7 -24
- package/src/billing/plan-switch.tsx +5 -16
- package/src/chart.ts +62 -13
- package/src/components/amount-input.tsx +2 -1
- package/src/components/calendar-heatmap.tsx +8 -2
- package/src/components/currency-option-list.tsx +12 -4
- package/src/components/currency-select.tsx +3 -1
- package/src/components/danger-confirm.tsx +80 -27
- package/src/components/data-table-filter-popover.tsx +19 -11
- package/src/components/data-table-filters.ts +36 -8
- package/src/components/date-field.tsx +1 -1
- package/src/components/date-picker.tsx +0 -1
- package/src/components/date-range-picker.tsx +6 -22
- package/src/components/dialog-frame.tsx +12 -4
- package/src/components/mini-calendar.tsx +5 -2
- package/src/components/modal.tsx +36 -7
- package/src/components/nav-pills.tsx +1 -1
- package/src/components/number-input.tsx +4 -3
- package/src/components/series-chart-axes.ts +6 -1
- package/src/components/series-chart.tsx +78 -21
- package/src/components/stat-tile.tsx +32 -3
- package/src/components/treemap-labels.ts +11 -3
- package/src/components/treemap.tsx +65 -12
- package/src/currencies.ts +23 -3
- package/src/data-table.ts +1 -11
- package/src/demo/demo-countdown.ts +3 -8
- package/src/feedback/feedback-context-labels.ts +1 -0
- package/src/feedback/feedback-context.tsx +34 -2
- package/src/feedback/feedback-diagnostics.tsx +41 -0
- package/src/feedback/feedback-dialog.tsx +16 -4
- package/src/feedback/feedback-mutation.ts +12 -33
- package/src/feedback/feedback-public-list.tsx +1 -7
- package/src/feedback/feedback-record.ts +5 -0
- package/src/feedback/feedback-row-detail-labels.ts +1 -8
- package/src/feedback/feedback-row-detail.tsx +21 -58
- package/src/feedback/feedback-status-undo.ts +4 -18
- package/src/feedback/feedback-submit-dialog.tsx +15 -2
- package/src/feedback/feedback-submit.tsx +36 -3
- package/src/feedback/feedback-thread.tsx +0 -10
- package/src/feedback.ts +89 -48
- package/src/hooks/use-hotkey.ts +24 -1
- package/src/i18n/defaults.ts +0 -4
- package/src/i18n/german.ts +4 -19
- package/src/i18n/kit-labels.tsx +5 -14
- package/src/i18n/locales/es.ts +4 -19
- package/src/i18n/locales/fr.ts +4 -19
- package/src/i18n/locales/hu.ts +4 -19
- package/src/i18n/locales/it.ts +4 -20
- package/src/i18n/locales/zh.ts +4 -19
- package/src/i18n/review.ts +9 -4
- package/src/i18n/shared-labels.ts +0 -1
- package/src/index.ts +44 -114
- package/src/lib/dates.ts +24 -2
- package/src/lib/format.ts +66 -3
- package/src/lib/intl-cache.ts +4 -2
- package/src/lib/translation-review.ts +52 -0
- package/src/rhf/fields.tsx +2 -2
- package/src/search/search-index.ts +0 -15
- package/src/search.ts +8 -8
- package/src/shell/account-menu-language.tsx +7 -27
- package/src/shell/account-menu-text-size.tsx +13 -32
- package/src/shell/app-shell.tsx +0 -13
- package/src/shell/company-switcher.tsx +1 -1
- package/src/shell/dev-menu.tsx +1 -1
- package/src/shell/top-bar-parts-labels.ts +1 -1
- package/src/shell.ts +17 -44
- package/src/sync.ts +2 -15
- package/src/theme/chart-palette.ts +0 -2
- package/tokens.css +4 -4
- package/dist/billing/dialog-close.d.ts +0 -29
- package/dist/billing/dialog-close.js +0 -8
- package/dist/billing/dialog-close.js.map +0 -1
- package/dist/components/field-sync-labels.d.ts +0 -3
- package/dist/components/field-sync-labels.js +0 -12
- package/dist/components/field-sync-labels.js.map +0 -1
- package/dist/components/field-sync.d.ts +0 -186
- package/dist/components/field-sync.js +0 -269
- package/dist/components/field-sync.js.map +0 -1
- package/dist/components/section-nav.d.ts +0 -44
- package/dist/components/section-nav.js +0 -33
- package/dist/components/section-nav.js.map +0 -1
- package/dist/components/sign-chip-labels.d.ts +0 -3
- package/dist/components/sign-chip-labels.js +0 -11
- package/dist/components/sign-chip-labels.js.map +0 -1
- package/dist/components/sign-chip.d.ts +0 -77
- package/dist/components/sign-chip.js +0 -47
- package/dist/components/sign-chip.js.map +0 -1
- package/dist/lib/isin.d.ts +0 -38
- package/dist/lib/isin.js +0 -36
- package/dist/lib/isin.js.map +0 -1
- package/dist/shell/role-switcher.d.ts +0 -28
- package/dist/shell/role-switcher.js +0 -31
- package/dist/shell/role-switcher.js.map +0 -1
- package/src/billing/dialog-close.ts +0 -34
- package/src/components/field-sync-labels.ts +0 -14
- package/src/components/field-sync.tsx +0 -504
- package/src/components/section-nav.tsx +0 -72
- package/src/components/sign-chip-labels.ts +0 -13
- package/src/components/sign-chip.tsx +0 -133
- package/src/lib/isin.ts +0 -72
- package/src/shell/role-switcher.tsx +0 -53
|
@@ -10,7 +10,14 @@ export { AXIS_TICK_WIDTH, AXIS_TITLE_STRIP, anchoredBand, axisBandWidth, mergeSe
|
|
|
10
10
|
export type { SeriesSource } from "./series-chart-axes.js";
|
|
11
11
|
import { type ChartTooltipPlacement, type LabelOverride } from "../i18n/kit-labels.js";
|
|
12
12
|
import { type ChartHeight } from "./chart-height.js";
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* One line, area or bar run of a {@link SeriesChart}.
|
|
15
|
+
*
|
|
16
|
+
* `TRow` is the chart's row type (0.53, keksdose after 0.52), and only `dot` reads it: its
|
|
17
|
+
* `point.row` is that type. Without a type argument a series is what it was, and a chart
|
|
18
|
+
* of typed rows still takes it — see {@link SeriesChartProps}.
|
|
19
|
+
*/
|
|
20
|
+
export interface SeriesChartSeries<TRow extends object = object> {
|
|
14
21
|
/** The row key this line reads — and the `--color-<key>` it is painted with, so it
|
|
15
22
|
* must be a CSS identifier. Build keys out of data with {@link seriesKey}. */
|
|
16
23
|
key: string;
|
|
@@ -58,8 +65,9 @@ export interface SeriesChartSeries {
|
|
|
58
65
|
* point: `true` for the default dot, `false`/`null` for none, or any SVG node drawn
|
|
59
66
|
* as-is at `point.cx`/`point.cy` — a buy/sell marker on keksdose's paper price.
|
|
60
67
|
* Never called for a point with no value. Bars have no points, and ignore it.
|
|
68
|
+
* `point.row` is the caller's own row, typed as the chart's rows are (0.53).
|
|
61
69
|
*/
|
|
62
|
-
dot?: boolean | ((point: SeriesChartPoint) => ReactNode);
|
|
70
|
+
dot?: boolean | ((point: SeriesChartPoint<TRow>) => ReactNode);
|
|
63
71
|
/** Line (or area outline) weight in px. Default 2, or 1.5 for a `step`. keksdose
|
|
64
72
|
* draws the subject of a chart at 2.5 and the reference it is read against at 1.5. */
|
|
65
73
|
strokeWidth?: number;
|
|
@@ -94,14 +102,16 @@ export interface SeriesChartSeries {
|
|
|
94
102
|
}
|
|
95
103
|
/** What a series draws. See {@link SeriesChartSeries.type}. */
|
|
96
104
|
export type SeriesChartType = "line" | "bar" | "area";
|
|
97
|
-
/** One point of a series, as a `dot` function is handed it.
|
|
98
|
-
|
|
105
|
+
/** One point of a series, as a `dot` function is handed it. `TRow` is the chart's row
|
|
106
|
+
* type (0.53); without one, `row` is a {@link SeriesChartRow}, as before. */
|
|
107
|
+
export interface SeriesChartPoint<TRow extends object = object> {
|
|
99
108
|
/** The series' key. */
|
|
100
109
|
key: string;
|
|
101
110
|
/** The row's position in `rows`. */
|
|
102
111
|
index: number;
|
|
103
|
-
/** The caller's own row, with everything the chart did not plot still in it
|
|
104
|
-
|
|
112
|
+
/** The caller's own row, with everything the chart did not plot still in it: the very
|
|
113
|
+
* object in `rows`, typed as `rows` is. */
|
|
114
|
+
row: SeriesChartRowOf<TRow>;
|
|
105
115
|
/** The abscissa in the caller's terms: the number, the category, or (time) a Date. */
|
|
106
116
|
x: SeriesChartXValue;
|
|
107
117
|
value: number;
|
|
@@ -113,8 +123,26 @@ export interface SeriesChartPoint {
|
|
|
113
123
|
}
|
|
114
124
|
/** A row of a series chart: one abscissa value and the series' values at it. Anything
|
|
115
125
|
* else in it (a raw ISO period for a drilldown) rides along untouched and is handed
|
|
116
|
-
* back in {@link SeriesChartPoint.row} and {@link SeriesChartHit.row}
|
|
126
|
+
* back in {@link SeriesChartPoint.row} and {@link SeriesChartHit.row} — typed as the
|
|
127
|
+
* caller's rows are since 0.53, and as this where their type names no keys. */
|
|
117
128
|
export type SeriesChartRow = Readonly<Record<string, unknown>>;
|
|
129
|
+
/**
|
|
130
|
+
* The row a hit or a point hands back, for a chart whose rows are `TRow[]` (0.53, keksdose
|
|
131
|
+
* after 0.52): `TRow` itself, so a drilldown reads `hit.row.rawPeriod` as the string it
|
|
132
|
+
* is. A {@link SeriesChartRow} where `TRow` names no keys — `object`, the default, which
|
|
133
|
+
* keeps `SeriesChartHit` and `SeriesChartPoint` without a type argument what they were, and
|
|
134
|
+
* the `object[]` rows an app passes today; `{}`; and `any` or `never` (`rows={[]}`), which
|
|
135
|
+
* are both assignable to `null` while no object type is.
|
|
136
|
+
*
|
|
137
|
+
* Both tests take `TRow` in the CHECKED position, never in the `extends` one, so TypeScript
|
|
138
|
+
* measures every type below as covariant in it (`SeriesChartSeries`, through `dot`'s
|
|
139
|
+
* parameter, contravariant) and relates two of them by their type arguments alone: a
|
|
140
|
+
* `SeriesChartHit<Month>` is a `SeriesChartHit`, and a handler or a series typed without an
|
|
141
|
+
* argument fits a chart of `Month` rows, though an interface has no index signature and is
|
|
142
|
+
* not, field by field, a `SeriesChartRow`. Written `object extends TRow ?`, the type is
|
|
143
|
+
* invariant and both of those stop type-checking.
|
|
144
|
+
*/
|
|
145
|
+
type SeriesChartRowOf<TRow> = [TRow] extends [null] ? SeriesChartRow : [keyof TRow] extends [never] ? SeriesChartRow : TRow;
|
|
118
146
|
/** An abscissa value: a number (`x.type: "number"`), a category (a string, a number or
|
|
119
147
|
* a Date standing for a period), or a time (a Date, epoch ms or an ISO string). */
|
|
120
148
|
export type SeriesChartXValue = number | string | Date;
|
|
@@ -406,28 +434,41 @@ export interface SeriesChartMarker {
|
|
|
406
434
|
/** Radius in px. Default 4.5. */
|
|
407
435
|
r?: number;
|
|
408
436
|
}
|
|
409
|
-
/** What a click on the plot picked.
|
|
410
|
-
|
|
437
|
+
/** What a click on the plot picked. `TRow` is the chart's row type (0.53); without one,
|
|
438
|
+
* `row` is a {@link SeriesChartRow}, as before. */
|
|
439
|
+
export interface SeriesChartHit<TRow extends object = object> {
|
|
411
440
|
/** The row's position in `rows`. */
|
|
412
441
|
index: number;
|
|
413
|
-
/** The caller's own row — with its `rawPeriod`, id or whatever the drilldown needs
|
|
414
|
-
|
|
442
|
+
/** The caller's own row — with its `rawPeriod`, id or whatever the drilldown needs: the
|
|
443
|
+
* very object in `rows`, typed as `rows` is, so it is read without a cast. */
|
|
444
|
+
row: SeriesChartRowOf<TRow>;
|
|
415
445
|
x: SeriesChartXValue;
|
|
416
446
|
/** The series, when the click landed ON a bar. A click anywhere else picks the slot
|
|
417
447
|
* (the period), not a series. */
|
|
418
448
|
key?: string;
|
|
419
449
|
}
|
|
420
|
-
|
|
450
|
+
/**
|
|
451
|
+
* The props of {@link SeriesChart} and {@link StaticSeriesChart}, for rows of type `TRow`.
|
|
452
|
+
*
|
|
453
|
+
* `TRow` is inferred from `rows` (0.53, keksdose after 0.52), and what the chart hands back
|
|
454
|
+
* — `hit.row` in `onPointClick`, `point.row` in a series' `dot` — is that type, so a
|
|
455
|
+
* drilldown reads its own fields without narrowing an `unknown`. Without a type argument,
|
|
456
|
+
* `SeriesChartProps` is what it was: any object is a row, and a row comes back as a
|
|
457
|
+
* {@link SeriesChartRow}. So is `ComponentProps<typeof SeriesChart>`, which reads the
|
|
458
|
+
* constraint, `object`. A series, a handler or a `dot` typed without an argument fits a
|
|
459
|
+
* chart of typed rows too.
|
|
460
|
+
*/
|
|
461
|
+
export interface SeriesChartProps<TRow extends object = object> {
|
|
421
462
|
/**
|
|
422
463
|
* One row per abscissa value. A missing key is a hole (see `connectNulls`).
|
|
423
464
|
*
|
|
424
465
|
* Any object (0.52, refactor audit 2026-10-30, API-2): an `interface` has no index
|
|
425
466
|
* signature, so a typed sweep did not fit `SeriesChartRow` and Kurvenschmiede cast its
|
|
426
467
|
* Ackermann rows `as unknown as Record<string, number>[]`. The chart reads the keys
|
|
427
|
-
* `series` and `x` name, and hands the row back as
|
|
468
|
+
* `series` and `x` name, and hands the row back typed as these are (0.53).
|
|
428
469
|
*/
|
|
429
|
-
rows: readonly
|
|
430
|
-
series: readonly SeriesChartSeries[];
|
|
470
|
+
rows: readonly TRow[];
|
|
471
|
+
series: readonly SeriesChartSeries<TRow>[];
|
|
431
472
|
/** Default: one untitled axis, `"y"`. */
|
|
432
473
|
axes?: readonly SeriesChartAxis[];
|
|
433
474
|
x?: SeriesChartX;
|
|
@@ -482,7 +523,7 @@ export interface SeriesChartProps {
|
|
|
482
523
|
* a chart without bars, named "period — series: value", behind ONE tab stop. With this
|
|
483
524
|
* they are buttons that Enter and Space activate; without, images to read.
|
|
484
525
|
*/
|
|
485
|
-
onPointClick?: (hit: SeriesChartHit) => void;
|
|
526
|
+
onPointClick?: (hit: SeriesChartHit<TRow>) => void;
|
|
486
527
|
/** Where the tooltip may go: for a chart inside a scroll wrapper. See
|
|
487
528
|
* {@link SeriesChartTooltip}. */
|
|
488
529
|
tooltip?: SeriesChartTooltip;
|
|
@@ -595,17 +636,21 @@ export interface SeriesLegendAxes {
|
|
|
595
636
|
* series whose axis is not drawn says the unit that axis would have: "Velocity (mm/s)"
|
|
596
637
|
* — see {@link SeriesChartAxis.unit}. Without them, the labels are as given.
|
|
597
638
|
*/
|
|
598
|
-
export declare function seriesLegendEntries(series: readonly SeriesChartSeries[], { axes, budgeted }?: SeriesLegendAxes): LegendEntry[];
|
|
639
|
+
export declare function seriesLegendEntries<TRow extends object>(series: readonly SeriesChartSeries<TRow>[], { axes, budgeted }?: SeriesLegendAxes): LegendEntry[];
|
|
599
640
|
/**
|
|
600
641
|
* {@link SeriesChart} without the zoom: the same picture, no drag layer, no reset
|
|
601
642
|
* button. For a thumbnail, a print view, or a chart the consumer wraps in its own
|
|
602
643
|
* interaction.
|
|
603
644
|
*/
|
|
604
|
-
export declare function StaticSeriesChart(props: SeriesChartProps): import("react").JSX.Element;
|
|
645
|
+
export declare function StaticSeriesChart<TRow extends object = object>(props: SeriesChartProps<TRow>): import("react").JSX.Element;
|
|
605
646
|
/**
|
|
606
647
|
* The series chart, zoomable. Drag across the plot to zoom (the drag's shape picks the
|
|
607
648
|
* axes), double-click or press the reset button to go back; wrap several in
|
|
608
649
|
* `SharedXZoom` to move their x windows together. Which axes zoom depends on the marks
|
|
609
650
|
* — see {@link SeriesChartProps.zoomAxes}.
|
|
651
|
+
*
|
|
652
|
+
* Generic in its rows (0.53): `hit.row` and a `dot`'s `point.row` are typed as `rows` is —
|
|
653
|
+
* see {@link SeriesChartProps}. A plain function, so the generic survives: a `memo` or a
|
|
654
|
+
* `forwardRef` around it would read `TRow` as its constraint.
|
|
610
655
|
*/
|
|
611
|
-
export declare function SeriesChart(props: SeriesChartProps): import("react").JSX.Element;
|
|
656
|
+
export declare function SeriesChart<TRow extends object = object>(props: SeriesChartProps<TRow>): import("react").JSX.Element;
|
|
@@ -822,7 +822,8 @@ function SeriesPlot({
|
|
|
822
822
|
] });
|
|
823
823
|
}
|
|
824
824
|
const ZoomablePlot = withChartZoom(SeriesPlot);
|
|
825
|
-
function usePlotProps(
|
|
825
|
+
function usePlotProps(typed) {
|
|
826
|
+
const props = typed;
|
|
826
827
|
const x = props.x ?? {};
|
|
827
828
|
const { rows } = props;
|
|
828
829
|
const { type, key } = x;
|