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