@nxgt/material 3.52.0 → 3.53.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/CHANGELOG.md +28 -0
- package/README.md +5 -4
- package/dist/{async-slice-BGtmF3K5.js → async-slice-DDSsekfm.js} +2 -2
- package/dist/{button-Ct0KRBsN.js → button-Ct8DSLVv.js} +1 -1
- package/dist/charts.js +1064 -932
- package/dist/{chip-Ca1SEd70.js → chip-BzoNsd-W.js} +2 -2
- package/dist/{code-editor-DtwRhK8B.js → code-editor-DsLQeiZc.js} +6 -6
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-CEclGxhA.js → code-language-items-4zXlIEZ0.js} +2 -2
- package/dist/components/components.css +1 -5
- package/dist/components/ui/actions/action-card/action-card-tile.css +11 -2
- package/dist/components/ui/collections/data-table/data-table-items-record.css +27 -0
- package/dist/components/ui/collections/data-table/index.css +14 -0
- package/dist/{components-CzELzsOi.js → components-DZPMvc1w.js} +15976 -15821
- package/dist/components.js +26 -26
- package/dist/{dialog-BIy04Hpd.js → dialog-DwPmwmA3.js} +4 -4
- package/dist/dnd.js +1 -1
- package/dist/draw-animate.js +1 -1
- package/dist/{dropdown-menu-B0Kd8x3G.js → dropdown-menu-CDN6Nqx6.js} +1 -1
- package/dist/editor.js +9 -9
- package/dist/{empty-state-CKxORwFE.js → empty-state-Bb9W9did.js} +2 -2
- package/dist/{escape-owner-BGKjiglh.js → escape-owner-DI_lg2ID.js} +1 -1
- package/dist/{field-blur-Dz1zPaYK.js → field-blur-BcJH8H9B.js} +1 -1
- package/dist/{field-blur-context-1T6GkSNc.js → field-blur-context-Dg1nwWOV.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BwQ9IRxa.js → hover-card-Qse4gnop.js} +2 -2
- package/dist/i18n-provider-DlVPS58N.js +79 -0
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-D5Ns7ndZ.js → icon-badge-DVPBQOKe.js} +3 -3
- package/dist/{icon-button-VzdqY_Tv.js → icon-button-C3wDxsh6.js} +12 -12
- package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +17 -1
- package/dist/lib/components/ui/actions/action-card/action-card.d.ts +16 -2
- package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +6 -2
- package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +15 -1
- package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +2 -1
- package/dist/lib/components/ui/collections/data-grid/columns/column-codec.d.ts +3 -3
- package/dist/lib/components/ui/collections/data-grid/columns/column-edit.d.ts +5 -5
- package/dist/lib/components/ui/collections/data-grid/columns/row-meta.d.ts +22 -0
- package/dist/lib/components/ui/collections/data-grid/grid-meta.d.ts +10 -3
- package/dist/lib/components/ui/collections/data-table/data-table.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/layout-types.d.ts +27 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-context.d.ts +2 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-row.d.ts +8 -0
- package/dist/lib/components/ui/collections/data-table/types.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/bar/filter-bar-classes.d.ts +7 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +5 -0
- package/dist/lib/components/ui/display/list-tile/internal.d.ts +1 -0
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-dense-text.d.ts +28 -0
- package/dist/lib/components/ui/feedback/toast/toast-text.d.ts +7 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/forms/index.d.ts +2 -0
- package/dist/lib/components/ui/forms/use-fast-form.d.ts +25 -0
- package/dist/lib/components/ui/forms/use-focus-on-refusal.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/activity-content-aside.d.ts +3 -1
- package/dist/lib/components/ui/layout/app-shell/activity-content.d.ts +10 -1
- package/dist/lib/components/ui/selection/switcher/partials/switcher-trigger.d.ts +3 -1
- package/dist/lib/components/ui/selection/switcher/switcher.d.ts +1 -1
- package/dist/lib/components/ui/selection/switcher/types.d.ts +7 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference-text.d.ts +14 -6
- package/dist/lib/components/ui/widgets/native-charts/core/reference.d.ts +57 -10
- package/dist/lib/components/ui/widgets/native-charts/core/types.d.ts +13 -5
- package/dist/lib/components/ui/widgets/native-charts/hooks/chart-model-types.d.ts +3 -2
- package/dist/lib/components/ui/widgets/native-charts/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/native-charts/line-chart/line-chart-types.d.ts +6 -1
- package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/reference-marks.d.ts +1 -1
- package/dist/lib/i18n/material-resources-registry.d.ts +21 -0
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +5 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +5 -1
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +43 -43
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-D-J3nZFm.js → public-BoVE0ffh.js} +9 -9
- package/dist/{rich-code-block-Ig0ERAa2.js → rich-code-block-DAUM7Yh_.js} +5 -5
- package/dist/{sortable-provider-DfPkSN90.js → sortable-provider-BLXsGE_0.js} +2 -2
- package/dist/{spinner-KQb3YuR_.js → spinner-Rg4PnBPH.js} +1 -1
- package/dist/{stored-language-Cb9FMEwk.js → stored-language-B1lJMPbR.js} +10 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-BY-SpsFV.js → theme-toggle-jVdxF_mc.js} +1 -1
- package/dist/{toolbar-items-30w9rG5h.js → toolbar-items-BFY_hns5.js} +4 -4
- package/dist/{translate-material-BPl8TQLg.js → translate-material-q-JNxP1m.js} +2 -2
- package/dist/{translator-BnQXtpSZ.js → translator-BU1o3_l9.js} +1 -1
- package/dist/{use-chat-composer-BSKJRYMB.js → use-chat-composer-DGbDuIUa.js} +3758 -3716
- package/dist/{use-heading-spy-BgXA8uz6.js → use-heading-spy-CP63sAcS.js} +1 -1
- package/dist/{use-material-translation-ByM3gD9R.js → use-material-translation-nNF8fUXz.js} +2 -2
- package/dist/use-shape-morph-DXdy2X5g.js +35 -0
- package/docs/components/buttons-and-actions.md +30 -1
- package/docs/components/data-table-filter-and-lists.md +2 -2
- package/docs/components/navigation-and-layout.md +1 -0
- package/docs/components/rich-widgets.md +2 -1
- package/docs/components/selection-and-choice.md +20 -0
- package/docs/guides/app-shell.md +22 -0
- package/docs/guides/cards-and-tiles.md +40 -4
- package/docs/guides/charts.md +30 -2
- package/docs/guides/data-grid.md +42 -2
- package/docs/guides/forms.md +35 -0
- package/docs/guides/i18n.md +6 -2
- package/docs/roadmap.md +84 -684
- package/docs/troubleshooting.md +21 -0
- package/lib/components/components.css +1 -5
- package/lib/components/ui/actions/action-card/action-card-tile.css +11 -2
- package/lib/components/ui/collections/data-table/data-table-items-record.css +27 -0
- package/lib/components/ui/collections/data-table/index.css +14 -0
- package/package.json +1 -1
- package/dist/i18n-provider-BFNrM0Qu.js +0 -45
- package/dist/use-shape-morph-BKA_R5P5.js +0 -35
|
@@ -7,4 +7,4 @@ export type { SwitcherFooter, SwitcherItem, SwitcherProps, } from './types.js';
|
|
|
7
7
|
* on a phone, a bottom sheet. `variant="expressive"` is a pill with a larger
|
|
8
8
|
* panel and a "Recent" strip. With `getHref` the options are links.
|
|
9
9
|
*/
|
|
10
|
-
export declare function Switcher({ options, label, value, onValueChange, variant, searchable, recent, getHref, linkComponent, footer, emptyLabel, sheet, open: openProp, onOpenChange, ...props }: SwitcherProps): import("react").JSX.Element;
|
|
10
|
+
export declare function Switcher({ options, label, value, onValueChange, variant, size, searchable, recent, getHref, linkComponent, footer, emptyLabel, sheet, open: openProp, onOpenChange, ...props }: SwitcherProps): import("react").JSX.Element;
|
|
@@ -34,6 +34,13 @@ export type SwitcherProps = {
|
|
|
34
34
|
onValueChange?: (value: string) => void;
|
|
35
35
|
/** `default` is the tile trigger and menu; `expressive` is the pill and the large panel. */
|
|
36
36
|
variant?: 'default' | 'expressive';
|
|
37
|
+
/**
|
|
38
|
+
* `default` is the full trigger (tile, title, subtitle). `compact` is an icon-only
|
|
39
|
+
* round button, for a bar whose title already names the chosen option (the
|
|
40
|
+
* `titleAfter` slot): named by the label and the chosen title, its tooltip shows
|
|
41
|
+
* them, the panel is unchanged. A 44px box on a coarse pointer.
|
|
42
|
+
*/
|
|
43
|
+
size?: 'default' | 'compact';
|
|
37
44
|
/** A search field in the panel; default: from 8 options (always, when expressive). */
|
|
38
45
|
searchable?: boolean;
|
|
39
46
|
/** Up to 3 option ids shown as tiles above the groups while nothing is typed (expressive). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToneMark } from './point-tones.js';
|
|
2
|
+
import { RefBand, RefThreshold } from './reference.js';
|
|
2
3
|
import { ChartTranslate } from './translate.js';
|
|
3
|
-
import { ChartBand, ChartThreshold } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The words of a chart's reference bands, thresholds and toned points, for
|
|
6
6
|
* the summary and the "View data" notes. Pure: the translator comes in as an
|
|
@@ -12,19 +12,27 @@ export type ReferenceSeries = {
|
|
|
12
12
|
/** The tone mark of each row, null where there is none. */
|
|
13
13
|
tones?: readonly (ToneMark | null)[];
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* One line per band ("Normal range: 40 to 60") then one per threshold
|
|
17
|
+
* ("High: 70"): the notes under the data table. A band or a threshold that
|
|
18
|
+
* steps along x names each of its values with the x labels it covers
|
|
19
|
+
* ("Normal range: 40 to 60 (Jan to Mar), 45 to 70 (Apr to Jun)"); `labels` are
|
|
20
|
+
* the x labels, one per row.
|
|
21
|
+
*/
|
|
16
22
|
export declare function referenceNotes(t: ChartTranslate, input: {
|
|
17
|
-
bands: readonly
|
|
18
|
-
thresholds: readonly
|
|
23
|
+
bands: readonly RefBand[];
|
|
24
|
+
thresholds: readonly RefThreshold[];
|
|
19
25
|
format: (value: number) => string;
|
|
26
|
+
labels?: readonly string[];
|
|
20
27
|
}): string[];
|
|
21
28
|
/**
|
|
22
29
|
* The summary sentences: the ranges and the lines, then for each series how
|
|
23
30
|
* many values lie outside each band, then how many points carry each tone.
|
|
24
31
|
*/
|
|
25
32
|
export declare function referenceSummary(t: ChartTranslate, input: {
|
|
26
|
-
bands: readonly
|
|
27
|
-
thresholds: readonly
|
|
33
|
+
bands: readonly RefBand[];
|
|
34
|
+
thresholds: readonly RefThreshold[];
|
|
28
35
|
series: readonly ReferenceSeries[];
|
|
29
36
|
format: (value: number) => string;
|
|
37
|
+
labels?: readonly string[];
|
|
30
38
|
}): string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartBand, ChartThreshold } from './types.js';
|
|
1
|
+
import { ChartBand, ChartRow, ChartThreshold } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The maths of a line chart's reference bands and threshold lines: they are
|
|
4
4
|
* cleaned once (a range given backwards, a value that is not a number), fed
|
|
@@ -7,19 +7,66 @@ import { ChartBand, ChartThreshold } from './types.js';
|
|
|
7
7
|
*/
|
|
8
8
|
/** A value-axis span, low then high. */
|
|
9
9
|
export type Domain = readonly [number, number];
|
|
10
|
-
/**
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/** One row's range of a stepped band. */
|
|
11
|
+
export type BandRange = {
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
};
|
|
15
|
+
/** A band as the chart draws it: numbers only. `from` and `to` hold the whole span (the envelope of a stepped band), `ranges` the range of each row. */
|
|
16
|
+
export type RefBand = Omit<ChartBand, 'from' | 'to'> & {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
/** Set when the band steps along x: the range of each row, null where it has none. */
|
|
20
|
+
ranges?: (BandRange | null)[];
|
|
21
|
+
};
|
|
22
|
+
/** A threshold as the chart draws it; `values` holds the value of each row when it steps along x. */
|
|
23
|
+
export type RefThreshold = Omit<ChartThreshold, 'value'> & {
|
|
24
|
+
value: number;
|
|
25
|
+
values?: (number | null)[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The bands with a finite range, each as `from <= to`; the rest are dropped.
|
|
29
|
+
* A band whose ends are a row field or a function is read against each row of
|
|
30
|
+
* `data`: it keeps its `ranges` unless every row gives the same one.
|
|
31
|
+
*/
|
|
32
|
+
export declare function normalizeBands(bands: readonly ChartBand[] | undefined, data?: readonly ChartRow[]): RefBand[];
|
|
33
|
+
/** The thresholds with a finite value; one given by a row field or a function keeps its `values` unless every row gives the same one. */
|
|
34
|
+
export declare function normalizeThresholds(thresholds: readonly ChartThreshold[] | undefined, data?: readonly ChartRow[]): RefThreshold[];
|
|
14
35
|
/** Every value a band or a threshold marks: the value domain grows to hold them. */
|
|
15
|
-
export declare function referenceValues(bands: readonly
|
|
36
|
+
export declare function referenceValues(bands: readonly RefBand[], thresholds: readonly RefThreshold[]): number[];
|
|
37
|
+
/** A stretch of consecutive rows with the same reference value: `first` to `last` are row indexes. */
|
|
38
|
+
export type Run<V> = {
|
|
39
|
+
first: number;
|
|
40
|
+
last: number;
|
|
41
|
+
value: V;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The runs of consecutive rows that share a value (`same` tells), a row with
|
|
45
|
+
* no value (null) ending the run and leaving a gap. Without `perRow` the one
|
|
46
|
+
* constant value covers every row.
|
|
47
|
+
*/
|
|
48
|
+
export declare function refRuns<V>(count: number, constant: V, perRow: readonly (V | null)[] | undefined, same: (a: V, b: V) => boolean): Run<V>[];
|
|
49
|
+
/** The runs of a band's ranges. */
|
|
50
|
+
export declare const bandRuns: (b: RefBand, count: number) => Run<BandRange>[];
|
|
51
|
+
/** The runs of a threshold's values. */
|
|
52
|
+
export declare const thresholdRuns: (th: RefThreshold, count: number) => Run<number>[];
|
|
53
|
+
/**
|
|
54
|
+
* Where a run sits across the plot, `x` mapping a row index to a pixel and
|
|
55
|
+
* `width` the plot's width: each row owns the stretch up to the midpoint to
|
|
56
|
+
* its neighbour, the first row from the plot's left edge and the last up to
|
|
57
|
+
* its right edge.
|
|
58
|
+
*/
|
|
59
|
+
export declare function runSpan(run: Pick<Run<unknown>, 'first' | 'last'>, count: number, x: (index: number) => number, width: number): {
|
|
60
|
+
x1: number;
|
|
61
|
+
x2: number;
|
|
62
|
+
};
|
|
16
63
|
/** The part of `band` inside `domain`; null when none of it is, or it has no height. */
|
|
17
|
-
export declare function clipBand(band: Pick<
|
|
64
|
+
export declare function clipBand(band: Pick<RefBand, 'from' | 'to'>, domain: Domain): {
|
|
18
65
|
from: number;
|
|
19
66
|
to: number;
|
|
20
67
|
} | null;
|
|
21
68
|
/** A band's box on the plot, `y` mapping a value to a pixel: its top and height, clipped to the domain; null when it is out of view. */
|
|
22
|
-
export declare function bandBox(band: Pick<
|
|
69
|
+
export declare function bandBox(band: Pick<RefBand, 'from' | 'to'>, domain: Domain, y: (value: number) => number): {
|
|
23
70
|
top: number;
|
|
24
71
|
height: number;
|
|
25
72
|
} | null;
|
|
@@ -29,8 +76,8 @@ export declare function thresholdAt(value: number, domain: Domain, y: (value: nu
|
|
|
29
76
|
export declare function bandLabelBaseline(top: number, height: number): number;
|
|
30
77
|
/** The baseline of a threshold's label: above its line, or under it at the top of the plot. */
|
|
31
78
|
export declare function thresholdLabelBaseline(lineY: number): number;
|
|
32
|
-
/** How many of `values` lie outside `band` (a missing value is not counted), and how many there are. */
|
|
33
|
-
export declare function outsideBand(values: readonly (number | null | undefined)[], band: Pick<
|
|
79
|
+
/** How many of `values` lie outside `band` (a missing value is not counted, nor one in a row where a stepped band has no range), and how many there are. */
|
|
80
|
+
export declare function outsideBand(values: readonly (number | null | undefined)[], band: Pick<RefBand, 'from' | 'to' | 'ranges'>): {
|
|
34
81
|
outside: number;
|
|
35
82
|
total: number;
|
|
36
83
|
};
|
|
@@ -95,16 +95,23 @@ export interface ChartPoint {
|
|
|
95
95
|
* the colour's ink (lines, points and swatches in the ink).
|
|
96
96
|
*/
|
|
97
97
|
export type ChartPalette = 'default' | 'soft';
|
|
98
|
+
/** A reference value: fixed, the name of a numeric field read from each row, or computed from the row and its index. */
|
|
99
|
+
export type ChartRowValue = number | string | ((row: ChartRow, index: number) => number | null | undefined);
|
|
98
100
|
/**
|
|
99
101
|
* A shaded range of the value axis, drawn behind the lines: a normal range,
|
|
100
102
|
* a target zone. Its `label` is drawn in the band and listed in the summary
|
|
101
103
|
* and in "View data"; the shade is decorative, the label carries the meaning.
|
|
102
104
|
*/
|
|
103
105
|
export interface ChartBand {
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
/**
|
|
107
|
+
* One end of the range, in the value axis' units (either order): a
|
|
108
|
+
* number, the name of a row field, or a function of the row. With a field
|
|
109
|
+
* or a function the band steps along x, one range per row (a row it gives
|
|
110
|
+
* no number for leaves a gap).
|
|
111
|
+
*/
|
|
112
|
+
from: ChartRowValue;
|
|
113
|
+
/** The other end; same forms as `from`. */
|
|
114
|
+
to: ChartRowValue;
|
|
108
115
|
/** Names the range: drawn in it, read by the summary and the table. */
|
|
109
116
|
label: string;
|
|
110
117
|
/** Tints the band and its label in the tone; default a neutral wash. */
|
|
@@ -112,7 +119,8 @@ export interface ChartBand {
|
|
|
112
119
|
}
|
|
113
120
|
/** A horizontal line at a value, with a direct label at its end. */
|
|
114
121
|
export interface ChartThreshold {
|
|
115
|
-
|
|
122
|
+
/** Where the line sits: a number, a row field or a function of the row (then it steps along x). */
|
|
123
|
+
value: ChartRowValue;
|
|
116
124
|
/** Names the line: drawn at its end, read by the summary and the table. */
|
|
117
125
|
label: string;
|
|
118
126
|
/** Draws the line and its label in the tone's colour; default the axis colour. */
|
|
@@ -2,6 +2,7 @@ import { Tone } from '../../../tones.js';
|
|
|
2
2
|
import { ResolvedSeries } from '../core/colors.js';
|
|
3
3
|
import { SeriesAxis } from '../core/combo-axes.js';
|
|
4
4
|
import { ToneMark, ToneWords } from '../core/point-tones.js';
|
|
5
|
+
import { RefBand, RefThreshold } from '../core/reference.js';
|
|
5
6
|
import { ChartTableModel } from '../core/table.js';
|
|
6
7
|
import { ChartAxis, ChartBand, ChartBaseProps, ChartPoint, ChartRow, ChartSeries, ChartThreshold, ChartXAxis, RowKey } from '../core/types.js';
|
|
7
8
|
import { LegendItem } from '../partials/chart-legend.js';
|
|
@@ -39,8 +40,8 @@ export type { ToneMark };
|
|
|
39
40
|
export type ChartModel = {
|
|
40
41
|
/** The bands and thresholds, cleaned (`from <= to`, finite). */
|
|
41
42
|
refs: {
|
|
42
|
-
bands:
|
|
43
|
-
thresholds:
|
|
43
|
+
bands: RefBand[];
|
|
44
|
+
thresholds: RefThreshold[];
|
|
44
45
|
};
|
|
45
46
|
size: ReturnType<typeof useChartSize<HTMLDivElement>>;
|
|
46
47
|
/** Every series, resolved (colour, shape, dash, position). */
|
|
@@ -4,7 +4,7 @@ export type { BarChartProps, BarLayout, BarOrientation, } from './bar-chart/bar-
|
|
|
4
4
|
export { ComboChart } from './combo-chart/combo-chart.js';
|
|
5
5
|
export type { ComboChartProps } from './combo-chart/combo-chart-types.js';
|
|
6
6
|
export type { ChartRange, ChartRangeProps, ChartScrollOptions, ChartZoomOptions, } from './core/range-types.js';
|
|
7
|
-
export type { ChartAxis, ChartBand, ChartBaseProps, ChartColor, ChartPalette, ChartPoint, ChartRow, ChartSeries, ChartShape, ChartSlice, ChartThreshold, ChartValue, ChartXAxis, ComboSeries, RowKey, ScatterPoint, ScatterSeries, } from './core/types.js';
|
|
7
|
+
export type { ChartAxis, ChartBand, ChartBaseProps, ChartColor, ChartPalette, ChartPoint, ChartRow, ChartRowValue, ChartSeries, ChartShape, ChartSlice, ChartThreshold, ChartValue, ChartXAxis, ComboSeries, RowKey, ScatterPoint, ScatterSeries, } from './core/types.js';
|
|
8
8
|
export { FunnelChart } from './funnel-chart/funnel-chart.js';
|
|
9
9
|
export type { FunnelChartProps } from './funnel-chart/funnel-chart-types.js';
|
|
10
10
|
export { Gauge } from './gauge/gauge.js';
|
|
@@ -21,9 +21,14 @@ export type LineChartProps<T extends object = ChartRow> = ChartModelProps<T> & C
|
|
|
21
21
|
* unless `yAxis.min` / `max` pin it (a band is then clipped); the
|
|
22
22
|
* summary says how many values fall outside each, and "View data"
|
|
23
23
|
* lists them. Keep the array stable (memoize it).
|
|
24
|
+
*
|
|
25
|
+
* `from` and `to` also take a row field or a function of the row: the
|
|
26
|
+
* band then steps along x, one range per row (a normal range copied
|
|
27
|
+
* with each measurement), and the summary and "View data" name each
|
|
28
|
+
* range with the x labels it covers.
|
|
24
29
|
*/
|
|
25
30
|
bands?: ChartBand[];
|
|
26
|
-
/** Horizontal lines at a value with a label at their end, also in the summary and in "View data". Keep the array stable. */
|
|
31
|
+
/** Horizontal lines at a value with a label at their end, also in the summary and in "View data". `value` also takes a row field or a function of the row (the line then steps along x). Keep the array stable. */
|
|
27
32
|
thresholds?: ChartThreshold[];
|
|
28
33
|
/**
|
|
29
34
|
* The tone of a point, or undefined for none. A toned point is drawn
|
package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/reference-marks.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function ReferenceLayer({ refs, geo, }: {
|
|
|
10
10
|
refs: ChartModel['refs'];
|
|
11
11
|
geo: LineGeometry;
|
|
12
12
|
}): import("react").JSX.Element;
|
|
13
|
-
/** The labels of the bands (inside, at the
|
|
13
|
+
/** The labels of the bands (inside, at the left of the widest stretch in view) and of the thresholds (above the line, at the right end of the last stretch), over the series. */
|
|
14
14
|
export declare function ReferenceLabels({ refs, geo, }: {
|
|
15
15
|
refs: ChartModel['refs'];
|
|
16
16
|
geo: LineGeometry;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ResourceBundle } from './merge-resources.js';
|
|
2
|
+
/** What the mounted `I18nProvider` told the code that runs outside React. */
|
|
3
|
+
export type MaterialResourcesRegistration = {
|
|
4
|
+
resources: ResourceBundle | undefined;
|
|
5
|
+
language: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Internal, not exported by the package: `I18nProvider` registers its
|
|
9
|
+
* `resources` and language here so `toast()`, which runs outside React, reads
|
|
10
|
+
* the app's `material.*` overrides. A stack: the provider mounted last wins,
|
|
11
|
+
* and its cleanup restores the previous one.
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerMaterialResources(resources: ResourceBundle | undefined, language: string): () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Changes a registration in place, keeping its place in the stack: a provider
|
|
16
|
+
* whose resources or language change must not rise above one mounted after it.
|
|
17
|
+
* `handle` is what {@link registerMaterialResources} returned.
|
|
18
|
+
*/
|
|
19
|
+
export declare function updateMaterialResources(handle: () => void, resources: ResourceBundle | undefined, language: string): void;
|
|
20
|
+
/** The registration of the provider mounted last, or `undefined` without one. */
|
|
21
|
+
export declare function currentMaterialResources(): MaterialResourcesRegistration | undefined;
|
|
@@ -2839,7 +2839,11 @@ declare const _default: {
|
|
|
2839
2839
|
},
|
|
2840
2840
|
"reference": {
|
|
2841
2841
|
"band": "{label}: {from} to {to}",
|
|
2842
|
-
"threshold": "{label}: {value}"
|
|
2842
|
+
"threshold": "{label}: {value}",
|
|
2843
|
+
"span": "{first} to {last}",
|
|
2844
|
+
"range": "{from} to {to}",
|
|
2845
|
+
"step": "{value} ({where})",
|
|
2846
|
+
"steps": "{label}: {list}"
|
|
2843
2847
|
},
|
|
2844
2848
|
"kind": {
|
|
2845
2849
|
"line": "line chart",
|
|
@@ -2839,7 +2839,11 @@ declare const _default: {
|
|
|
2839
2839
|
},
|
|
2840
2840
|
"reference": {
|
|
2841
2841
|
"band": "{label} : de {from} à {to}",
|
|
2842
|
-
"threshold": "{label} : {value}"
|
|
2842
|
+
"threshold": "{label} : {value}",
|
|
2843
|
+
"span": "de {first} à {last}",
|
|
2844
|
+
"range": "de {from} à {to}",
|
|
2845
|
+
"step": "{value} ({where})",
|
|
2846
|
+
"steps": "{label} : {list}"
|
|
2843
2847
|
},
|
|
2844
2848
|
"kind": {
|
|
2845
2849
|
"line": "graphique en courbes",
|
|
@@ -2848,6 +2848,10 @@ export declare const resources: {
|
|
|
2848
2848
|
reference: {
|
|
2849
2849
|
band: string;
|
|
2850
2850
|
threshold: string;
|
|
2851
|
+
span: string;
|
|
2852
|
+
range: string;
|
|
2853
|
+
step: string;
|
|
2854
|
+
steps: string;
|
|
2851
2855
|
};
|
|
2852
2856
|
kind: {
|
|
2853
2857
|
line: string;
|
|
@@ -5752,6 +5756,10 @@ export declare const resources: {
|
|
|
5752
5756
|
reference: {
|
|
5753
5757
|
band: string;
|
|
5754
5758
|
threshold: string;
|
|
5759
|
+
span: string;
|
|
5760
|
+
range: string;
|
|
5761
|
+
step: string;
|
|
5762
|
+
steps: string;
|
|
5755
5763
|
};
|
|
5756
5764
|
kind: {
|
|
5757
5765
|
line: string;
|