@cngx/common 0.1.0-rc.7 → 0.1.0-rc.9
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/card/README.md +2 -1
- package/command/README.md +29 -0
- package/data/README.md +15 -3
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +517 -184
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +62 -17
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +301 -46
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +1221 -479
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +97 -16
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +1496 -499
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +236 -61
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +364 -93
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2040 -1046
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +955 -125
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +1293 -89
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +997 -453
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1794 -1265
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +151 -61
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +37 -1
- package/package.json +20 -7
- package/popover/README.md +58 -2
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +91 -0
- package/schematics/package.json +3 -0
- package/stepper/README.md +11 -8
- package/theming/components/cngx-accordion.css +1 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-button-toggle.css +29 -3
- package/theming/components/cngx-data-grid.css +168 -1
- package/theming/components/cngx-dialog.css +13 -0
- package/theming/components/cngx-listbox.css +21 -12
- package/theming/components/cngx-menu.css +56 -16
- package/theming/components/cngx-popover-sheet.css +402 -0
- package/theming/components/cngx-popover.css +28 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +12 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +205 -28
- package/types/cngx-common-card.d.ts +201 -17
- package/types/cngx-common-chart.d.ts +345 -48
- package/types/cngx-common-command.d.ts +50 -10
- package/types/cngx-common-data.d.ts +743 -92
- package/types/cngx-common-dialog.d.ts +161 -10
- package/types/cngx-common-display.d.ts +356 -142
- package/types/cngx-common-interactive.d.ts +910 -226
- package/types/cngx-common-layout.d.ts +603 -32
- package/types/cngx-common-popover.d.ts +612 -49
- package/types/cngx-common-stepper.d.ts +526 -237
- package/types/cngx-common-tabs.d.ts +358 -75
- package/types/cngx-common-timeline.d.ts +108 -22
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal, InjectionToken, TemplateRef,
|
|
2
|
+
import { Signal, InjectionToken, TemplateRef, Provider, DestroyRef } from '@angular/core';
|
|
3
3
|
import * as _cngx_common_chart from '@cngx/common/chart';
|
|
4
4
|
import * as _cngx_common_data from '@cngx/common/data';
|
|
5
5
|
import { AsyncView } from '@cngx/common/data';
|
|
6
6
|
import { CngxAsyncState } from '@cngx/core/utils';
|
|
7
7
|
import * as i1 from '@cngx/common/layout';
|
|
8
|
+
import { CngxMessage } from '@cngx/core/i18n';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Pure-TS linear scale. Maps a numeric domain `[d0, d1]` to a numeric
|
|
@@ -79,7 +80,8 @@ declare function createBandScale<T>(domain: readonly T[], range: readonly [numbe
|
|
|
79
80
|
* @param domain Ordered list of categorical values. Values are matched
|
|
80
81
|
* by reference equality on lookup.
|
|
81
82
|
* @param colors Palette to cycle through. Must have at least one entry;
|
|
82
|
-
* an empty palette throws
|
|
83
|
+
* an empty palette throws a `CngxRuntimeError` (`CNGX1049`)
|
|
84
|
+
* synchronously at construction time.
|
|
83
85
|
* @returns Callable `(v: T) => string` returning the palette entry for
|
|
84
86
|
* `v`. Lookup of an unknown value returns the palette's first entry.
|
|
85
87
|
*
|
|
@@ -294,6 +296,22 @@ interface CngxChartContext<TX = XScaleInput, TY = number> {
|
|
|
294
296
|
* @since 0.1.0
|
|
295
297
|
*/
|
|
296
298
|
declare const CNGX_CHART_CONTEXT: InjectionToken<CngxChartContext<XScaleInput, number>>;
|
|
299
|
+
/**
|
|
300
|
+
* Inject the parent chart's reactive context. Throws a `CngxRuntimeError`
|
|
301
|
+
* with code `CNGX1048` when the consumer is not mounted as a content child
|
|
302
|
+
* of `<cngx-chart>`, in development and production alike. The `selector`
|
|
303
|
+
* argument is the consumer's public selector without brackets (`'cngxLine'`)
|
|
304
|
+
* and names it in the development message.
|
|
305
|
+
*
|
|
306
|
+
* Use it from custom layer directives mounted on `<svg:g>` hosts to
|
|
307
|
+
* read `plot`, the scales and `renderSvg` the same way the built-in
|
|
308
|
+
* layer atoms do.
|
|
309
|
+
*
|
|
310
|
+
* @category common/chart
|
|
311
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/chart/chart/chart-context.ts
|
|
312
|
+
* @since 0.1.0
|
|
313
|
+
*/
|
|
314
|
+
declare function injectChartContext(selector: string): CngxChartContext;
|
|
297
315
|
|
|
298
316
|
/**
|
|
299
317
|
* Common context shape passed into every chart slot template
|
|
@@ -312,11 +330,9 @@ declare const CNGX_CHART_CONTEXT: InjectionToken<CngxChartContext<XScaleInput, n
|
|
|
312
330
|
* ```
|
|
313
331
|
*
|
|
314
332
|
* The `small` flag is true when the chart's rendered width is below
|
|
315
|
-
* the
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* based, not viewport-based, so it works correctly inside dashboard
|
|
319
|
-
* cells of any size.
|
|
333
|
+
* the exported `CHART_SMALL_BREAKPOINT_PX` constant (400).
|
|
334
|
+
* Container-size based, not viewport-based, so it works correctly
|
|
335
|
+
* inside dashboard cells of any size.
|
|
320
336
|
*
|
|
321
337
|
* @category common/chart
|
|
322
338
|
*/
|
|
@@ -785,8 +801,13 @@ declare class CngxChart<T = unknown> implements CngxChartContext<XScaleInput, nu
|
|
|
785
801
|
private readonly axes;
|
|
786
802
|
private readonly thresholds;
|
|
787
803
|
private readonly layers;
|
|
788
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
804
|
+
protected readonly i18n: Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
789
805
|
protected readonly dataTableId: string;
|
|
806
|
+
protected readonly hatchId: string;
|
|
807
|
+
protected readonly hatchFill: {
|
|
808
|
+
diagonal: string;
|
|
809
|
+
horizontal: string;
|
|
810
|
+
};
|
|
790
811
|
private readonly loadingSlot;
|
|
791
812
|
private readonly emptySlot;
|
|
792
813
|
private readonly errorSlot;
|
|
@@ -849,12 +870,34 @@ declare class CngxChart<T = unknown> implements CngxChartContext<XScaleInput, nu
|
|
|
849
870
|
* connection-lost overlay, `'refreshing'` -> reconnecting overlay,
|
|
850
871
|
* everything else -> no overlay. Independent of `activeView()`.
|
|
851
872
|
*/
|
|
852
|
-
protected readonly connectionView: Signal<"error" | "
|
|
873
|
+
protected readonly connectionView: Signal<"error" | "none" | "reconnecting">;
|
|
874
|
+
/**
|
|
875
|
+
* Text of the default connection overlay (a `role="alert"` /
|
|
876
|
+
* `role="status"` live region). Only the connection view is tracked;
|
|
877
|
+
* the copy is read untracked, so a runtime copy or locale flip does not
|
|
878
|
+
* rewrite a shown announcement - the next transition speaks the new one.
|
|
879
|
+
*/
|
|
880
|
+
protected readonly connectionOverlayText: Signal<string>;
|
|
853
881
|
/**
|
|
854
882
|
* Context for the connection-slot templates - the connection-channel
|
|
855
883
|
* twin of {@link errorContext}, carrying the live connection error.
|
|
856
884
|
*/
|
|
857
885
|
protected readonly connectionCtx: Signal<CngxChartConnectionContext>;
|
|
886
|
+
/**
|
|
887
|
+
* Current/previous pair for the connection channel's status,
|
|
888
|
+
* unbound-safe via the `'idle'` fallback.
|
|
889
|
+
*/
|
|
890
|
+
private readonly connectionTransition;
|
|
891
|
+
/**
|
|
892
|
+
* Text for the always-in-DOM polite live region that voices the
|
|
893
|
+
* recovery transition. The lost/reconnecting overlays announce
|
|
894
|
+
* themselves through their `role="alert"` / `role="status"` - but
|
|
895
|
+
* on recovery they simply vanish, which is a silent state change
|
|
896
|
+
* (Pillar 2). This computed says {@link CngxChartI18n.connectionRestored}
|
|
897
|
+
* exactly on the error/refreshing -> success edge and clears again
|
|
898
|
+
* on the next connection transition. Pure derivation, no `effect()`.
|
|
899
|
+
*/
|
|
900
|
+
protected readonly connectionRestoredAnnouncement: Signal<string>;
|
|
858
901
|
constructor();
|
|
859
902
|
readonly dataLength: Signal<number>;
|
|
860
903
|
/**
|
|
@@ -989,7 +1032,7 @@ declare class CngxChart<T = unknown> implements CngxChartContext<XScaleInput, nu
|
|
|
989
1032
|
* Responsive mode is active when neither `[width]` nor `[height]` is
|
|
990
1033
|
* bound. The host then fills its parent's width and derives height
|
|
991
1034
|
* from the `--cngx-chart-aspect-ratio` CSS custom property (default
|
|
992
|
-
* `
|
|
1035
|
+
* `5 / 2`). The resize observer feeds `dimensions()` which drives
|
|
993
1036
|
* the SVG sizing + scale math, so axes and layer atoms re-flow
|
|
994
1037
|
* reactively as the parent resizes.
|
|
995
1038
|
*/
|
|
@@ -1012,7 +1055,12 @@ declare class CngxChart<T = unknown> implements CngxChartContext<XScaleInput, nu
|
|
|
1012
1055
|
* during a refetch.
|
|
1013
1056
|
*/
|
|
1014
1057
|
protected readonly ariaLabelText: Signal<string>;
|
|
1015
|
-
/**
|
|
1058
|
+
/**
|
|
1059
|
+
* The single numeric projection of `data` through `summaryAccessor`.
|
|
1060
|
+
* Both {@link summary} and the data-table view derive from it, so the
|
|
1061
|
+
* projection runs once per data change and its `sameNumberArr` equal
|
|
1062
|
+
* stops the cascade when a refresh produces identical values.
|
|
1063
|
+
*/
|
|
1016
1064
|
protected readonly summaryValues: Signal<readonly number[]>;
|
|
1017
1065
|
/**
|
|
1018
1066
|
* Auto-mode predicate. Drives the data-table's `aria-hidden`
|
|
@@ -1026,6 +1074,68 @@ declare class CngxChart<T = unknown> implements CngxChartContext<XScaleInput, nu
|
|
|
1026
1074
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxChart<any>, "cngx-chart", ["cngxChart"], { "dataInput": { "alias": "data"; "required": true; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "preserveAspectRatio": { "alias": "preserveAspectRatio"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "summaryAccessor": { "alias": "summaryAccessor"; "required": false; "isSignal": true; }; "accessibleTable": { "alias": "accessibleTable"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "connectionState": { "alias": "connectionState"; "required": false; "isSignal": true; }; }, {}, ["axes", "thresholds", "layers", "loadingSlot", "emptySlot", "errorSlot", "connectionErrorSlot", "reconnectingSlot", "overlaySlot", "overlaySlots"], ["*"], true, [{ directive: typeof i1.CngxResizeObserver; inputs: {}; outputs: {}; }]>;
|
|
1027
1075
|
}
|
|
1028
1076
|
|
|
1077
|
+
/**
|
|
1078
|
+
* The chart section of a {@link CngxLanguagePack}: the copy of
|
|
1079
|
+
* `@cngx/common/chart`. Numbers reach the messages already formatted for
|
|
1080
|
+
* the app locale. `summary` and `stackedBarSummary` are assembled from
|
|
1081
|
+
* several keys, so a pack owns their words, their order and their list
|
|
1082
|
+
* separator.
|
|
1083
|
+
*
|
|
1084
|
+
* @category common/chart/i18n
|
|
1085
|
+
* @since 0.1.0
|
|
1086
|
+
* @relatedTo CNGX_CHART_I18N
|
|
1087
|
+
*/
|
|
1088
|
+
interface CngxChartLanguageSection {
|
|
1089
|
+
/** `{trend}`, `{min}`, `{max}`, `{current}`, `{thresholds}`: the chart's accessible name. */
|
|
1090
|
+
readonly summary: CngxMessage;
|
|
1091
|
+
readonly summaryTrendUp: string;
|
|
1092
|
+
readonly summaryTrendDown: string;
|
|
1093
|
+
readonly summaryTrendFlat: string;
|
|
1094
|
+
/** The `{thresholds}` part of `summary` when no threshold is crossed. */
|
|
1095
|
+
readonly summaryNoThresholds: string;
|
|
1096
|
+
/** Plural on `{count}`: the `{thresholds}` part of `summary`. */
|
|
1097
|
+
readonly summaryThresholds: CngxMessage;
|
|
1098
|
+
/** Caption of the screen-reader data table. */
|
|
1099
|
+
readonly dataTable: string;
|
|
1100
|
+
/** Header of the data table's index column. */
|
|
1101
|
+
readonly indexColumnLabel: string;
|
|
1102
|
+
/** Header of the data table's value column. */
|
|
1103
|
+
readonly valueColumnLabel: string;
|
|
1104
|
+
readonly trendChangedUp: string;
|
|
1105
|
+
readonly trendChangedDown: string;
|
|
1106
|
+
readonly trendFlattened: string;
|
|
1107
|
+
/** `{threshold}`: announced when a threshold is crossed. */
|
|
1108
|
+
readonly thresholdAlert: CngxMessage;
|
|
1109
|
+
readonly connectionLost: string;
|
|
1110
|
+
readonly connectionReconnecting: string;
|
|
1111
|
+
readonly connectionRestored: string;
|
|
1112
|
+
readonly empty: string;
|
|
1113
|
+
readonly loading: string;
|
|
1114
|
+
readonly error: string;
|
|
1115
|
+
/** Accessible name of a stacked bar with no segments. */
|
|
1116
|
+
readonly stackedBarEmpty: string;
|
|
1117
|
+
/** `{total}`, `{segments}`: accessible name of a stacked bar. */
|
|
1118
|
+
readonly stackedBarSummary: CngxMessage;
|
|
1119
|
+
/** `{label}`, `{value}`: one stacked-bar segment, in its tooltip and in the summary. */
|
|
1120
|
+
readonly stackedBarSegmentTitle: CngxMessage;
|
|
1121
|
+
/** Joins the segments of `stackedBarSummary`. */
|
|
1122
|
+
readonly listSeparator: string;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* The English chart section: the single source of the chart's English copy.
|
|
1126
|
+
* `CNGX_CHART_I18N` defaults to it.
|
|
1127
|
+
*
|
|
1128
|
+
* @category common/chart/i18n
|
|
1129
|
+
* @since 0.1.0
|
|
1130
|
+
* @relatedTo CNGX_CHART_I18N
|
|
1131
|
+
*/
|
|
1132
|
+
declare const CNGX_CHART_LANGUAGE_EN: CngxChartLanguageSection;
|
|
1133
|
+
declare module '@cngx/core/i18n' {
|
|
1134
|
+
interface CngxLanguagePack {
|
|
1135
|
+
readonly chart: CngxChartLanguageSection;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1029
1139
|
/**
|
|
1030
1140
|
* Summary input describing the chart's current data shape. Consumed by
|
|
1031
1141
|
* `CngxChartI18n.summary()` to produce the `aria-label` text the
|
|
@@ -1050,6 +1160,11 @@ interface CngxChartSummary {
|
|
|
1050
1160
|
interface CngxChartI18n {
|
|
1051
1161
|
readonly summary: (input: CngxChartSummary) => string;
|
|
1052
1162
|
readonly dataTable: () => string;
|
|
1163
|
+
/**
|
|
1164
|
+
* Header of the data table's index column. Optional so pre-existing full
|
|
1165
|
+
* overrides keep compiling; English `#`.
|
|
1166
|
+
*/
|
|
1167
|
+
readonly indexColumnLabel?: () => string;
|
|
1053
1168
|
readonly valueColumnLabel: () => string;
|
|
1054
1169
|
readonly trendChanged: (trend: 'up' | 'down' | 'flat') => string;
|
|
1055
1170
|
readonly thresholdAlert: (threshold: number) => string;
|
|
@@ -1059,35 +1174,78 @@ interface CngxChartI18n {
|
|
|
1059
1174
|
readonly empty: () => string;
|
|
1060
1175
|
readonly loading: () => string;
|
|
1061
1176
|
readonly error: () => string;
|
|
1177
|
+
/**
|
|
1178
|
+
* Accname for a `<cngx-stacked-bar>` with no segments. Optional so
|
|
1179
|
+
* pre-existing full overrides keep compiling; the token factory
|
|
1180
|
+
* supplies English and the component falls back to its built-in
|
|
1181
|
+
* phrasing when a custom override omits the key.
|
|
1182
|
+
*/
|
|
1183
|
+
readonly stackedBarEmpty?: () => string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Auto-generated accname for a `<cngx-stacked-bar>`: the total plus
|
|
1186
|
+
* one label/value pair per segment. Optional for the same
|
|
1187
|
+
* compatibility reason as {@link CngxChartI18n.stackedBarEmpty}.
|
|
1188
|
+
*/
|
|
1189
|
+
readonly stackedBarSummary?: (total: number, segments: readonly {
|
|
1190
|
+
readonly label: string;
|
|
1191
|
+
readonly value: number;
|
|
1192
|
+
}[]) => string;
|
|
1193
|
+
/**
|
|
1194
|
+
* Tooltip of one stacked-bar segment. Receives the segment label and its
|
|
1195
|
+
* value, already formatted for the app locale. Optional for the same
|
|
1196
|
+
* compatibility reason as {@link CngxChartI18n.stackedBarEmpty}; English
|
|
1197
|
+
* `label: value`.
|
|
1198
|
+
*/
|
|
1199
|
+
readonly stackedBarSegmentTitle?: (label: string, value: string) => string;
|
|
1062
1200
|
}
|
|
1063
1201
|
/**
|
|
1064
|
-
* Injection token for chart i18n strings
|
|
1065
|
-
*
|
|
1202
|
+
* Injection token for chart i18n strings, a `Signal` so the copy follows a
|
|
1203
|
+
* runtime language switch. Defaults to English via `factory:`, with numbers
|
|
1204
|
+
* in the root app locale (`CNGX_LOCALE`, falling back to `LOCALE_ID`), read
|
|
1205
|
+
* live. Override at app root with {@link provideChartI18n}; every key left
|
|
1206
|
+
* at its default still follows the app locale at the use site, including a
|
|
1207
|
+
* runtime `CNGX_LOCALE` flip.
|
|
1066
1208
|
*
|
|
1067
1209
|
* @category common/chart/i18n
|
|
1068
1210
|
* @wcag AA
|
|
1069
1211
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/chart/i18n/chart-i18n.ts
|
|
1070
1212
|
* @since 0.1.0
|
|
1071
1213
|
*/
|
|
1072
|
-
declare const CNGX_CHART_I18N: InjectionToken<CngxChartI18n
|
|
1214
|
+
declare const CNGX_CHART_I18N: InjectionToken<Signal<CngxChartI18n>>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Branded feature-fn for {@link provideChartI18n}.
|
|
1217
|
+
*
|
|
1218
|
+
* @category common/chart/i18n
|
|
1219
|
+
*/
|
|
1220
|
+
type CngxChartI18nFeature = ((bundle: Signal<CngxChartI18n>) => Signal<CngxChartI18n>) & {
|
|
1221
|
+
readonly _target: 'i18n';
|
|
1222
|
+
};
|
|
1073
1223
|
/**
|
|
1074
|
-
*
|
|
1224
|
+
* Override chart copy via a partial bundle - unset keys keep the language
|
|
1225
|
+
* pack's copy, or the English default, and keep following the app locale.
|
|
1226
|
+
* Pass a `Signal` to switch the language at runtime.
|
|
1227
|
+
*
|
|
1228
|
+
* @category common/chart/i18n
|
|
1229
|
+
*/
|
|
1230
|
+
declare function withChartI18nLabels(overrides: Partial<CngxChartI18n> | Signal<Partial<CngxChartI18n>>): CngxChartI18nFeature;
|
|
1231
|
+
/**
|
|
1232
|
+
* Provider for the chart i18n bundle. The features apply on top of the
|
|
1233
|
+
* active language pack, so a consumer localises only the keys they care
|
|
1234
|
+
* about; every key left out keeps the pack's copy and follows the app locale.
|
|
1075
1235
|
*
|
|
1076
1236
|
* ```typescript
|
|
1077
|
-
* providers: [
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1082
|
-
*
|
|
1237
|
+
* providers: [
|
|
1238
|
+
* provideChartI18n(
|
|
1239
|
+
* withChartI18nLabels({
|
|
1240
|
+
* dataTable: () => 'Datentabelle',
|
|
1241
|
+
* }),
|
|
1242
|
+
* ),
|
|
1243
|
+
* ]
|
|
1083
1244
|
* ```
|
|
1084
1245
|
*
|
|
1085
1246
|
* @category common/chart/i18n
|
|
1086
1247
|
*/
|
|
1087
|
-
declare function provideChartI18n(
|
|
1088
|
-
provide: typeof CNGX_CHART_I18N;
|
|
1089
|
-
useValue: CngxChartI18n;
|
|
1090
|
-
};
|
|
1248
|
+
declare function provideChartI18n(...features: readonly CngxChartI18nFeature[]): Provider;
|
|
1091
1249
|
|
|
1092
1250
|
/** @internal */
|
|
1093
1251
|
type Trend = 'up' | 'down' | 'flat';
|
|
@@ -1165,9 +1323,13 @@ declare class CngxChartAnnouncer {
|
|
|
1165
1323
|
/** The chart instance whose `significantChange()` this announcer voices. */
|
|
1166
1324
|
readonly chart: _angular_core.InputSignal<CngxChart<unknown>>;
|
|
1167
1325
|
private readonly i18n;
|
|
1168
|
-
/**
|
|
1326
|
+
/**
|
|
1327
|
+
* Polite (informational) text for trend flips; empty otherwise. The copy
|
|
1328
|
+
* is read untracked: only the chart event re-derives a live region, so a
|
|
1329
|
+
* copy or locale flip never re-speaks a shown announcement.
|
|
1330
|
+
*/
|
|
1169
1331
|
protected readonly politeAnnouncement: _angular_core.Signal<string>;
|
|
1170
|
-
/** Assertive (interrupting) text for threshold crossings; empty otherwise. */
|
|
1332
|
+
/** Assertive (interrupting) text for threshold crossings; empty otherwise. Copy untracked, as above. */
|
|
1171
1333
|
protected readonly assertiveAnnouncement: _angular_core.Signal<string>;
|
|
1172
1334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxChartAnnouncer, never>;
|
|
1173
1335
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxChartAnnouncer, "cngx-chart-announcer", never, { "chart": { "alias": "cngxChartAnnouncer"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1355,6 +1517,12 @@ declare class CngxAxis implements CngxChartAxis {
|
|
|
1355
1517
|
*/
|
|
1356
1518
|
readonly axisLabel: _angular_core.InputSignal<string | null>;
|
|
1357
1519
|
private readonly ctx;
|
|
1520
|
+
private readonly locale;
|
|
1521
|
+
/**
|
|
1522
|
+
* The bound `[format]`, or the default tick formatter bound to the app
|
|
1523
|
+
* locale (`CNGX_LOCALE`), so a locale flip re-formats the default labels.
|
|
1524
|
+
*/
|
|
1525
|
+
private readonly resolvedFormat;
|
|
1358
1526
|
/**
|
|
1359
1527
|
* Tick values to render. Resolution order:
|
|
1360
1528
|
* 1. `type='band'` and `[domain]` provided → one tick per domain
|
|
@@ -1508,7 +1676,8 @@ declare class CngxAxisDomain implements CngxChartAxis {
|
|
|
1508
1676
|
* Single legend entry. `color` is optional - when omitted the swatch
|
|
1509
1677
|
* falls back to the chart-level primary token. `value` is rendered as a
|
|
1510
1678
|
* trailing `.cngx-chart-legend__value` node when present (`!= null`, so a
|
|
1511
|
-
* literal `0` still shows), turning a legend into a readout.
|
|
1679
|
+
* literal `0` still shows), turning a legend into a readout. A number value
|
|
1680
|
+
* renders in the app locale (`6,6` in German); any other value as text. It stays
|
|
1512
1681
|
* intentionally unconstrained so the same field a consumer weights in the
|
|
1513
1682
|
* row can still carry their domain key (id, layer name, accessor return
|
|
1514
1683
|
* type, ...) for later interactions without a second lookup.
|
|
@@ -1552,6 +1721,14 @@ interface CngxChartLegendItem<T = unknown> {
|
|
|
1552
1721
|
* and column; `[align]` aligns along the main axis (`start`, `center`,
|
|
1553
1722
|
* `end`).
|
|
1554
1723
|
*
|
|
1724
|
+
* Under forced colors the swatches turn into a four-step pattern by
|
|
1725
|
+
* entry index (solid, 45deg hatch, hollow, 0deg hatch). The stacked-bar
|
|
1726
|
+
* segments and the chart series carry the same step by index: lines as
|
|
1727
|
+
* solid, dashed, dotted, dash-dot; bars and scatter points as the swatch
|
|
1728
|
+
* patterns. Series count line, bar and scatter layers in source order
|
|
1729
|
+
* (areas, thresholds, bands and axes do not count), so list the entries
|
|
1730
|
+
* in the order of those layers.
|
|
1731
|
+
*
|
|
1555
1732
|
* @category common/chart/legend
|
|
1556
1733
|
* @docsKind primary
|
|
1557
1734
|
* @wcag AA
|
|
@@ -1563,6 +1740,9 @@ declare class CngxChartLegend<T = unknown> {
|
|
|
1563
1740
|
readonly items: _angular_core.InputSignal<readonly CngxChartLegendItem<T>[]>;
|
|
1564
1741
|
readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
1565
1742
|
readonly align: _angular_core.InputSignal<"start" | "end" | "center">;
|
|
1743
|
+
private readonly locale;
|
|
1744
|
+
/** @internal Each item's value as display text; numbers in the app locale. */
|
|
1745
|
+
protected readonly displayValues: _angular_core.Signal<string[]>;
|
|
1566
1746
|
protected readonly flexAlign: _angular_core.Signal<"center" | "flex-end" | "flex-start">;
|
|
1567
1747
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxChartLegend<any>, never>;
|
|
1568
1748
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxChartLegend<any>, "cngx-chart-legend", ["cngxChartLegend"], { "items": { "alias": "items"; "required": true; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1626,6 +1806,19 @@ interface PathBuilderOptions<T> {
|
|
|
1626
1806
|
readonly x?: LineXAccessor<T>;
|
|
1627
1807
|
readonly curve: CngxCurve;
|
|
1628
1808
|
}
|
|
1809
|
+
/**
|
|
1810
|
+
* One run of consecutive finite points, as produced by
|
|
1811
|
+
* {@link PathBuilder.buildSegments}. `firstX` / `lastX` are the run's
|
|
1812
|
+
* projected end coordinates, exposed so an area layer can close the
|
|
1813
|
+
* run to its baseline without re-projecting the data.
|
|
1814
|
+
*
|
|
1815
|
+
* @category common/chart/path
|
|
1816
|
+
*/
|
|
1817
|
+
interface PathSegment {
|
|
1818
|
+
readonly d: string;
|
|
1819
|
+
readonly firstX: number;
|
|
1820
|
+
readonly lastX: number;
|
|
1821
|
+
}
|
|
1629
1822
|
/**
|
|
1630
1823
|
* Single-slot LRU cache around an SVG `d`-attribute builder. Returned
|
|
1631
1824
|
* by {@link createPathBuilder}; consumed by the `<cngx-line>` /
|
|
@@ -1638,8 +1831,23 @@ interface PathBuilder<T> {
|
|
|
1638
1831
|
* Build the SVG `d` attribute for the given data + scales. Same
|
|
1639
1832
|
* `(data, xScale, yScale)` triple by reference returns the cached
|
|
1640
1833
|
* string without re-running the O(n) point projection.
|
|
1834
|
+
*
|
|
1835
|
+
* A row whose projected `x` or `y` is non-finite (a `NaN` value, an
|
|
1836
|
+
* invalid Date, a log scale fed zero) is not emitted as a path
|
|
1837
|
+
* command - it breaks the path into subpaths, d3's `defined()`
|
|
1838
|
+
* semantics. One `NaN` therefore renders as a gap in the line rather
|
|
1839
|
+
* than invalidating the whole `d` string.
|
|
1641
1840
|
*/
|
|
1642
1841
|
build(data: readonly T[], xScale: ScaleFn<XScaleInput>, yScale: ScaleFn<number>): string;
|
|
1842
|
+
/**
|
|
1843
|
+
* The same projection split at non-finite rows: one entry per run of
|
|
1844
|
+
* consecutive finite points, carrying the run's path data and its
|
|
1845
|
+
* first/last projected `x`. `<cngx-area>` consumes this to close
|
|
1846
|
+
* every run to the baseline individually - closing the joined string
|
|
1847
|
+
* once would fill straight across the gaps. Shares the single-slot
|
|
1848
|
+
* cache with {@link build}.
|
|
1849
|
+
*/
|
|
1850
|
+
buildSegments(data: readonly T[], xScale: ScaleFn<XScaleInput>, yScale: ScaleFn<number>): readonly PathSegment[];
|
|
1643
1851
|
/**
|
|
1644
1852
|
* Number of times the internal point-projection + path-string
|
|
1645
1853
|
* concatenation has run since this builder was constructed. Exposed
|
|
@@ -1781,6 +1989,7 @@ declare class CngxArea<T = unknown> implements CngxChartLayer {
|
|
|
1781
1989
|
readonly accessor: _angular_core.InputSignal<LineYAccessor<T>>;
|
|
1782
1990
|
readonly xAccessor: _angular_core.InputSignal<LineXAccessor<T> | undefined>;
|
|
1783
1991
|
readonly opacity: _angular_core.InputSignal<string | number | null>;
|
|
1992
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
1784
1993
|
readonly curve: _angular_core.InputSignal<CngxCurve>;
|
|
1785
1994
|
readonly baseline: _angular_core.InputSignal<number>;
|
|
1786
1995
|
readonly data: _angular_core.InputSignal<readonly T[] | undefined>;
|
|
@@ -1803,7 +2012,7 @@ declare class CngxArea<T = unknown> implements CngxChartLayer {
|
|
|
1803
2012
|
*/
|
|
1804
2013
|
protected readonly pointMarks: _angular_core.Signal<readonly PointMark[]>;
|
|
1805
2014
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxArea<any>, never>;
|
|
1806
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxArea<any>, "[cngxArea]", ["cngxArea"], { "accessor": { "alias": "accessor"; "required": false; "isSignal": true; }; "xAccessor": { "alias": "xAccessor"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "curve": { "alias": "curve"; "required": false; "isSignal": true; }; "baseline": { "alias": "baseline"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "points": { "alias": "points"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2015
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxArea<any>, "[cngxArea]", ["cngxArea"], { "accessor": { "alias": "accessor"; "required": false; "isSignal": true; }; "xAccessor": { "alias": "xAccessor"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "curve": { "alias": "curve"; "required": false; "isSignal": true; }; "baseline": { "alias": "baseline"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "points": { "alias": "points"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1807
2016
|
}
|
|
1808
2017
|
|
|
1809
2018
|
/**
|
|
@@ -1851,12 +2060,13 @@ declare class CngxBar<T = unknown> implements CngxChartLayer {
|
|
|
1851
2060
|
readonly gap: _angular_core.InputSignal<number>;
|
|
1852
2061
|
readonly baseline: _angular_core.InputSignal<number>;
|
|
1853
2062
|
readonly data: _angular_core.InputSignal<readonly T[] | undefined>;
|
|
2063
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
1854
2064
|
protected readonly ctx: _cngx_common_chart.CngxChartContext<_cngx_common_chart.XScaleInput, number>;
|
|
1855
2065
|
private readonly resolvedData;
|
|
1856
2066
|
protected readonly rects: _angular_core.Signal<readonly BarRect[]>;
|
|
1857
2067
|
readonly geometry: _angular_core.Signal<LayerGeometry>;
|
|
1858
2068
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBar<any>, never>;
|
|
1859
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBar<any>, "[cngxBar]", ["cngxBar"], { "accessor": { "alias": "accessor"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "baseline": { "alias": "baseline"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2069
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBar<any>, "[cngxBar]", ["cngxBar"], { "accessor": { "alias": "accessor"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "baseline": { "alias": "baseline"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1860
2070
|
}
|
|
1861
2071
|
|
|
1862
2072
|
/**
|
|
@@ -1903,12 +2113,13 @@ declare class CngxScatter<T = unknown> implements CngxChartLayer {
|
|
|
1903
2113
|
readonly y: _angular_core.InputSignal<ScatterYAccessor<T>>;
|
|
1904
2114
|
readonly radius: _angular_core.InputSignal<number>;
|
|
1905
2115
|
readonly data: _angular_core.InputSignal<readonly T[] | undefined>;
|
|
2116
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
1906
2117
|
protected readonly ctx: _cngx_common_chart.CngxChartContext<XScaleInput, number>;
|
|
1907
2118
|
private readonly resolvedData;
|
|
1908
2119
|
protected readonly circles: _angular_core.Signal<readonly ScatterCircle[]>;
|
|
1909
2120
|
readonly geometry: _angular_core.Signal<LayerGeometry>;
|
|
1910
2121
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxScatter<any>, never>;
|
|
1911
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxScatter<any>, "[cngxScatter]", ["cngxScatter"], { "x": { "alias": "x"; "required": true; "isSignal": true; }; "y": { "alias": "y"; "required": true; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2122
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxScatter<any>, "[cngxScatter]", ["cngxScatter"], { "x": { "alias": "x"; "required": true; "isSignal": true; }; "y": { "alias": "y"; "required": true; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1912
2123
|
}
|
|
1913
2124
|
|
|
1914
2125
|
/**
|
|
@@ -1940,6 +2151,7 @@ declare class CngxThreshold implements CngxChartLayer {
|
|
|
1940
2151
|
readonly value: _angular_core.InputSignal<number>;
|
|
1941
2152
|
readonly label: _angular_core.InputSignal<string | null>;
|
|
1942
2153
|
readonly dashed: _angular_core.InputSignal<boolean>;
|
|
2154
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
1943
2155
|
protected readonly ctx: _cngx_common_chart.CngxChartContext<_cngx_common_chart.XScaleInput, number>;
|
|
1944
2156
|
protected readonly bounds: _angular_core.Signal<{
|
|
1945
2157
|
x1: number;
|
|
@@ -1948,7 +2160,7 @@ declare class CngxThreshold implements CngxChartLayer {
|
|
|
1948
2160
|
} | null>;
|
|
1949
2161
|
readonly geometry: _angular_core.Signal<LayerGeometry>;
|
|
1950
2162
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxThreshold, never>;
|
|
1951
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxThreshold, "[cngxThreshold]", ["cngxThreshold"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "dashed": { "alias": "dashed"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2163
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxThreshold, "[cngxThreshold]", ["cngxThreshold"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "dashed": { "alias": "dashed"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1952
2164
|
}
|
|
1953
2165
|
|
|
1954
2166
|
/**
|
|
@@ -1980,6 +2192,7 @@ declare class CngxBand implements CngxChartLayer {
|
|
|
1980
2192
|
readonly to: _angular_core.InputSignal<number>;
|
|
1981
2193
|
readonly label: _angular_core.InputSignal<string | null>;
|
|
1982
2194
|
readonly opacity: _angular_core.InputSignal<string | number | null>;
|
|
2195
|
+
readonly color: _angular_core.InputSignal<string | null>;
|
|
1983
2196
|
protected readonly ctx: _cngx_common_chart.CngxChartContext<_cngx_common_chart.XScaleInput, number>;
|
|
1984
2197
|
protected readonly rect: _angular_core.Signal<{
|
|
1985
2198
|
x: number;
|
|
@@ -1989,7 +2202,7 @@ declare class CngxBand implements CngxChartLayer {
|
|
|
1989
2202
|
} | null>;
|
|
1990
2203
|
readonly geometry: _angular_core.Signal<LayerGeometry>;
|
|
1991
2204
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBand, never>;
|
|
1992
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBand, "[cngxBand]", ["cngxBand"], { "from": { "alias": "from"; "required": true; "isSignal": true; }; "to": { "alias": "to"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2205
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBand, "[cngxBand]", ["cngxBand"], { "from": { "alias": "from"; "required": true; "isSignal": true; }; "to": { "alias": "to"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1993
2206
|
}
|
|
1994
2207
|
|
|
1995
2208
|
/**
|
|
@@ -2003,6 +2216,15 @@ declare class CngxBand implements CngxChartLayer {
|
|
|
2003
2216
|
interface ChartRendererDeps {
|
|
2004
2217
|
readonly ctx: CngxChartContext;
|
|
2005
2218
|
readonly destroyRef: DestroyRef;
|
|
2219
|
+
/**
|
|
2220
|
+
* Whether the host currently matches `(forced-colors: active)`. The
|
|
2221
|
+
* renderer controller fills it from one media-query signal and repaints
|
|
2222
|
+
* on every flip; the Canvas backend reads it to paint in the system
|
|
2223
|
+
* palette. The SVG backend ignores it (its layers carry their own
|
|
2224
|
+
* forced-colors CSS), and a custom backend registered through
|
|
2225
|
+
* {@link CNGX_CHART_RENDERER_FACTORY} may ignore it too.
|
|
2226
|
+
*/
|
|
2227
|
+
readonly forcedColors?: Signal<boolean>;
|
|
2006
2228
|
}
|
|
2007
2229
|
/**
|
|
2008
2230
|
* A rendering backend for `<cngx-chart>`. Both backends compose against
|
|
@@ -2086,6 +2308,22 @@ declare function createSvgRenderer(_deps: ChartRendererDeps): CngxChartRenderer;
|
|
|
2086
2308
|
* `overflow: visible` it now clips there too. Out-of-domain data is cut
|
|
2087
2309
|
* off on both paths.
|
|
2088
2310
|
*
|
|
2311
|
+
* Under forced colors the canvas follows the same contract as the SVG
|
|
2312
|
+
* layers, since the browser never forces canvas pixels: every mark paints
|
|
2313
|
+
* CanvasText, ignoring `[color]` and the colour tokens; areas and bands keep
|
|
2314
|
+
* their opacity; line, bar and scatter take the legend's four-step cycle by
|
|
2315
|
+
* series index (lines solid / dashed / dotted / dash-dot, bars and points
|
|
2316
|
+
* solid / 45deg hatch / hollow / 0deg hatch), with area, threshold and band
|
|
2317
|
+
* not counting. CanvasText and Canvas are resolved through a probe element
|
|
2318
|
+
* opted out of forcing and cached like the author colours. Chromium also
|
|
2319
|
+
* resolves the system keywords on a 2D context to the forced palette, but
|
|
2320
|
+
* other engines are unverified, so the backend paints the probed values.
|
|
2321
|
+
* The renderer controller watches `(forced-colors: active)` and
|
|
2322
|
+
* `(prefers-color-scheme: dark)` and invalidates the colour cache before
|
|
2323
|
+
* repainting on a flip, so a contrast-theme switch repaints at once. One
|
|
2324
|
+
* difference from SVG: a layer wrapped in an extra `<svg:g>` still counts
|
|
2325
|
+
* here, since the backend only sees the layer order.
|
|
2326
|
+
*
|
|
2089
2327
|
* @category common/chart/renderer
|
|
2090
2328
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/chart/renderer/canvas-renderer.ts
|
|
2091
2329
|
* @since 0.1.0
|
|
@@ -2203,9 +2441,13 @@ interface CngxChartRendererController {
|
|
|
2203
2441
|
*
|
|
2204
2442
|
* - **mount** - tracks `mode()`; on change, destroys the previous backend,
|
|
2205
2443
|
* builds the new one via `factory`, mounts it, and seeds the first paint.
|
|
2206
|
-
* - **paint** - tracks `geometries()
|
|
2207
|
-
* dimensions
|
|
2208
|
-
*
|
|
2444
|
+
* - **paint** - tracks `geometries()`, the (structurally-deduped)
|
|
2445
|
+
* dimensions and the `(forced-colors: active)` /
|
|
2446
|
+
* `(prefers-color-scheme: dark)` media queries; repaints on every
|
|
2447
|
+
* geometry emission and invalidates the backend's color cache when the
|
|
2448
|
+
* dimensions or either media query actually change, so a contrast-theme
|
|
2449
|
+
* or OS colour-scheme switch repaints at once instead of after the next
|
|
2450
|
+
* resize.
|
|
2209
2451
|
*
|
|
2210
2452
|
* Both effects wrap their imperative renderer calls in `untracked()` so
|
|
2211
2453
|
* the renderer's own signal reads never feed back into the effect graph.
|
|
@@ -2258,8 +2500,10 @@ declare class CngxSparkline {
|
|
|
2258
2500
|
readonly state: _angular_core.InputSignal<CngxAsyncState<readonly number[]> | undefined>;
|
|
2259
2501
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2260
2502
|
private readonly preset;
|
|
2261
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2503
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2262
2504
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2505
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2506
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2263
2507
|
protected readonly xDomain: _angular_core.Signal<readonly number[]>;
|
|
2264
2508
|
protected readonly yDomain: _angular_core.Signal<readonly number[]>;
|
|
2265
2509
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSparkline, never>;
|
|
@@ -2297,8 +2541,17 @@ declare class CngxMiniBar {
|
|
|
2297
2541
|
readonly state: _angular_core.InputSignal<CngxAsyncState<number> | undefined>;
|
|
2298
2542
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2299
2543
|
private readonly preset;
|
|
2300
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2544
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2301
2545
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2546
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2547
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2548
|
+
/**
|
|
2549
|
+
* Meter value attributes render only in the content view: keeping
|
|
2550
|
+
* `aria-valuenow` while the skeleton or error fallback shows would
|
|
2551
|
+
* announce a stale reading for a value that is not on screen.
|
|
2552
|
+
*/
|
|
2553
|
+
protected readonly showsMeterValue: _angular_core.Signal<boolean>;
|
|
2554
|
+
constructor();
|
|
2302
2555
|
protected readonly percent: _angular_core.Signal<number>;
|
|
2303
2556
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxMiniBar, never>;
|
|
2304
2557
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxMiniBar, "cngx-mini-bar", ["cngxMiniBar"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -2330,8 +2583,26 @@ declare class CngxDeviationBar {
|
|
|
2330
2583
|
readonly state: _angular_core.InputSignal<CngxAsyncState<number> | undefined>;
|
|
2331
2584
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2332
2585
|
private readonly preset;
|
|
2333
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2586
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2334
2587
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2588
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2589
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2590
|
+
/**
|
|
2591
|
+
* Meter value attributes render only in the content view: keeping
|
|
2592
|
+
* `aria-valuenow` while the skeleton or error fallback shows would
|
|
2593
|
+
* announce a stale reading for a value that is not on screen.
|
|
2594
|
+
*/
|
|
2595
|
+
protected readonly showsMeterValue: _angular_core.Signal<boolean>;
|
|
2596
|
+
constructor();
|
|
2597
|
+
/**
|
|
2598
|
+
* The meter's valid range is centred on the baseline, not on zero:
|
|
2599
|
+
* a deviation bar with `[baseline]="100" [magnitude]="50"` reads
|
|
2600
|
+
* values in `[50, 150]`. Anchoring min/max at `±magnitude` alone
|
|
2601
|
+
* puts any non-zero-baseline reading outside its own declared range,
|
|
2602
|
+
* which is invalid meter semantics.
|
|
2603
|
+
*/
|
|
2604
|
+
protected readonly minValue: _angular_core.Signal<number>;
|
|
2605
|
+
protected readonly maxValue: _angular_core.Signal<number>;
|
|
2335
2606
|
protected readonly geometry: _angular_core.Signal<{
|
|
2336
2607
|
positive: boolean;
|
|
2337
2608
|
left: number;
|
|
@@ -2365,8 +2636,10 @@ declare class CngxMiniArea {
|
|
|
2365
2636
|
readonly state: _angular_core.InputSignal<CngxAsyncState<readonly number[]> | undefined>;
|
|
2366
2637
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2367
2638
|
private readonly preset;
|
|
2368
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2639
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2369
2640
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2641
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2642
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2370
2643
|
protected readonly xDomain: _angular_core.Signal<readonly number[]>;
|
|
2371
2644
|
protected readonly yDomain: _angular_core.Signal<readonly number[]>;
|
|
2372
2645
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxMiniArea, never>;
|
|
@@ -2377,7 +2650,10 @@ declare class CngxMiniArea {
|
|
|
2377
2650
|
* Circular donut gauge - a single-value bounded indicator. Renders a
|
|
2378
2651
|
* background ring + a foreground arc whose length is proportional to
|
|
2379
2652
|
* `value / max`. Host carries `role="meter"`; the optional `[label]`
|
|
2380
|
-
* input renders
|
|
2653
|
+
* input renders a visible label inside the ring's centre and doubles
|
|
2654
|
+
* as the host's accessible name when `[aria-label]` is unbound - the
|
|
2655
|
+
* same fallback `CngxMiniBar` uses. A bound `[aria-label]` always
|
|
2656
|
+
* wins.
|
|
2381
2657
|
*
|
|
2382
2658
|
* @category common/chart/presets
|
|
2383
2659
|
* @docsKind primary
|
|
@@ -2398,8 +2674,17 @@ declare class CngxDonut {
|
|
|
2398
2674
|
readonly state: _angular_core.InputSignal<CngxAsyncState<number> | undefined>;
|
|
2399
2675
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2400
2676
|
private readonly preset;
|
|
2401
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2677
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2402
2678
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2679
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2680
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2681
|
+
/**
|
|
2682
|
+
* Meter value attributes render only in the content view: keeping
|
|
2683
|
+
* `aria-valuenow` while the skeleton or error fallback shows would
|
|
2684
|
+
* announce a stale reading for a value that is not on screen.
|
|
2685
|
+
*/
|
|
2686
|
+
protected readonly showsMeterValue: _angular_core.Signal<boolean>;
|
|
2687
|
+
constructor();
|
|
2403
2688
|
protected readonly center: _angular_core.Signal<number>;
|
|
2404
2689
|
protected readonly radius: _angular_core.Signal<number>;
|
|
2405
2690
|
protected readonly circumference: _angular_core.Signal<number>;
|
|
@@ -2453,8 +2738,17 @@ declare class CngxBullet {
|
|
|
2453
2738
|
readonly state: _angular_core.InputSignal<CngxAsyncState<number> | undefined>;
|
|
2454
2739
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2455
2740
|
private readonly preset;
|
|
2456
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2741
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2457
2742
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2743
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2744
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2745
|
+
/**
|
|
2746
|
+
* Meter value attributes render only in the content view: keeping
|
|
2747
|
+
* `aria-valuenow` while the skeleton or error fallback shows would
|
|
2748
|
+
* announce a stale reading for a value that is not on screen.
|
|
2749
|
+
*/
|
|
2750
|
+
protected readonly showsMeterValue: _angular_core.Signal<boolean>;
|
|
2751
|
+
constructor();
|
|
2458
2752
|
protected readonly maxValue: _angular_core.Signal<number>;
|
|
2459
2753
|
protected readonly actualPercent: _angular_core.Signal<number>;
|
|
2460
2754
|
protected readonly targetPercent: _angular_core.Signal<number>;
|
|
@@ -2479,8 +2773,8 @@ interface SegmentRendering {
|
|
|
2479
2773
|
readonly left: number;
|
|
2480
2774
|
readonly width: number;
|
|
2481
2775
|
readonly color: string | null;
|
|
2482
|
-
|
|
2483
|
-
readonly
|
|
2776
|
+
/** `<label>: <value>` with the value in the app locale. */
|
|
2777
|
+
readonly title: string;
|
|
2484
2778
|
}
|
|
2485
2779
|
/**
|
|
2486
2780
|
* Single-bar stacked composition - visualises proportional shares of
|
|
@@ -2505,8 +2799,11 @@ declare class CngxStackedBar {
|
|
|
2505
2799
|
readonly state: _angular_core.InputSignal<CngxAsyncState<readonly CngxStackedSegment[]> | undefined>;
|
|
2506
2800
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
2507
2801
|
private readonly preset;
|
|
2508
|
-
protected readonly i18n: _cngx_common_chart.CngxChartI18n
|
|
2802
|
+
protected readonly i18n: _angular_core.Signal<Required<_cngx_common_chart.CngxChartI18n>>;
|
|
2803
|
+
private readonly locale;
|
|
2509
2804
|
protected readonly activeView: _angular_core.Signal<_cngx_common_data.AsyncView>;
|
|
2805
|
+
/** True while the skeleton branch renders - the host announces busy, the span stays decorative. */
|
|
2806
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
2510
2807
|
protected readonly resolvedTotal: _angular_core.Signal<number>;
|
|
2511
2808
|
protected readonly segmentRenderings: _angular_core.Signal<readonly SegmentRendering[]>;
|
|
2512
2809
|
protected readonly effectiveAriaLabel: _angular_core.Signal<string>;
|
|
@@ -2514,5 +2811,5 @@ declare class CngxStackedBar {
|
|
|
2514
2811
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxStackedBar, "cngx-stacked-bar", ["cngxStackedBar"], { "segments": { "alias": "segments"; "required": true; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2515
2812
|
}
|
|
2516
2813
|
|
|
2517
|
-
export { CHART_SMALL_BREAKPOINT_PX, CNGX_CHART_AXIS, CNGX_CHART_CONTEXT, CNGX_CHART_I18N, CNGX_CHART_LAYER, CNGX_CHART_RENDERER_FACTORY, CNGX_CHART_RENDERER_THRESHOLD, CngxArea, CngxAxis, CngxAxisDomain, CngxBand, CngxBar, CngxBullet, CngxChart, CngxChartAnnouncer, CngxChartConnectionError, CngxChartEmpty, CngxChartError, CngxChartLegend, CngxChartLoading, CngxChartOverlay, CngxChartReconnecting, CngxDeviationBar, CngxDonut, CngxLine, CngxMiniArea, CngxMiniBar, CngxScatter, CngxSparkline, CngxStackedBar, CngxThreshold, buildCurvePath, createBandScale, createCanvasRenderer, createChartRendererController, createDefaultChartRenderer, createLinearScale, createOrdinalScale, createPathBuilder, createSignificantChangeTracker, createSvgRenderer, createTimeScale, downsampleLTTB, injectChartBuffer, provideChartI18n, provideChartRenderer, withChartRendererFactory, withChartRendererThreshold };
|
|
2518
|
-
export type { BandScale, BarYAccessor, ChartBufferOptions, ChartRendererControllerDeps, ChartRendererDeps, CngxAxisPosition, CngxAxisType, CngxBulletRange, CngxChartAxis, CngxChartBuffer, CngxChartConnectionContext, CngxChartContext, CngxChartErrorContext, CngxChartI18n, CngxChartLayer, CngxChartLegendItem, CngxChartPlotArea, CngxChartRenderer, CngxChartRendererController, CngxChartRendererFactory, CngxChartRendererFeature, CngxChartSlotContext, CngxChartSummary, CngxCurve, CngxSignificantChange, CngxStackedSegment, LayerGeometry, LineXAccessor, LineYAccessor, PathBuilder, PathBuilderOptions, PathPoint, ScaleFn, ScatterXAccessor, ScatterYAccessor, XScaleInput };
|
|
2814
|
+
export { CHART_SMALL_BREAKPOINT_PX, CNGX_CHART_AXIS, CNGX_CHART_CONTEXT, CNGX_CHART_I18N, CNGX_CHART_LANGUAGE_EN, CNGX_CHART_LAYER, CNGX_CHART_RENDERER_FACTORY, CNGX_CHART_RENDERER_THRESHOLD, CngxArea, CngxAxis, CngxAxisDomain, CngxBand, CngxBar, CngxBullet, CngxChart, CngxChartAnnouncer, CngxChartConnectionError, CngxChartEmpty, CngxChartError, CngxChartLegend, CngxChartLoading, CngxChartOverlay, CngxChartReconnecting, CngxDeviationBar, CngxDonut, CngxLine, CngxMiniArea, CngxMiniBar, CngxScatter, CngxSparkline, CngxStackedBar, CngxThreshold, buildCurvePath, createBandScale, createCanvasRenderer, createChartRendererController, createDefaultChartRenderer, createLinearScale, createOrdinalScale, createPathBuilder, createSignificantChangeTracker, createSvgRenderer, createTimeScale, downsampleLTTB, injectChartBuffer, injectChartContext, provideChartI18n, provideChartRenderer, withChartI18nLabels, withChartRendererFactory, withChartRendererThreshold };
|
|
2815
|
+
export type { BandScale, BarYAccessor, ChartBufferOptions, ChartRendererControllerDeps, ChartRendererDeps, CngxAxisPosition, CngxAxisType, CngxBulletRange, CngxChartAxis, CngxChartBuffer, CngxChartConnectionContext, CngxChartContext, CngxChartErrorContext, CngxChartI18n, CngxChartI18nFeature, CngxChartLanguageSection, CngxChartLayer, CngxChartLegendItem, CngxChartPlotArea, CngxChartRenderer, CngxChartRendererController, CngxChartRendererFactory, CngxChartRendererFeature, CngxChartSlotContext, CngxChartSummary, CngxCurve, CngxSignificantChange, CngxStackedSegment, LayerGeometry, LineXAccessor, LineYAccessor, PathBuilder, PathBuilderOptions, PathPoint, PathSegment, ScaleFn, ScatterXAccessor, ScatterYAccessor, XScaleInput };
|