@area8975/ui 0.2.2-dev.40 → 0.2.2-dev.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/fesm2022/area8975-ui.mjs +849 -229
- package/fesm2022/area8975-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/area8975-ui.d.ts +325 -103
package/package.json
CHANGED
package/types/area8975-ui.d.ts
CHANGED
|
@@ -24,6 +24,111 @@ export interface ChartLegendSource {
|
|
|
24
24
|
}
|
|
25
25
|
/** Where a chart draws its own legend, `none` when one is linked elsewhere. */
|
|
26
26
|
export type ChartLegendPosition = 'auto' | 'none';
|
|
27
|
+
export type ChartOptions = ApexCharts$1.ApexOptions;
|
|
28
|
+
/** One named set of values, one per category. */
|
|
29
|
+
export interface ChartSeries {
|
|
30
|
+
name: string;
|
|
31
|
+
data: (number | null)[];
|
|
32
|
+
/** Overrides the palette slot, keep it for when a series must match something else. */
|
|
33
|
+
colour?: string;
|
|
34
|
+
/** Draws the line dashed, e.g. to set projected figures apart from actual ones. Bars ignore it. */
|
|
35
|
+
dashed?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** `fill` takes the host's height, which has to come from layout. */
|
|
38
|
+
export type ChartHeight = number | 'fill';
|
|
39
|
+
/** Turns a raw value into what the axis, tooltip and table show, e.g. money. */
|
|
40
|
+
export type ChartValueFormatter = (value: number) => string;
|
|
41
|
+
/** Inputs, privacy handling and legend wiring every chart shares, whatever it draws. */
|
|
42
|
+
declare abstract class UiChartBase implements ChartLegendSource {
|
|
43
|
+
protected readonly uiFormat: import("@area8975/ui").UiFormat;
|
|
44
|
+
private readonly privacy;
|
|
45
|
+
protected readonly dark: import("@angular/core").WritableSignal<boolean>;
|
|
46
|
+
protected readonly ink: Signal<import("@area8975/ui").ChartInk>;
|
|
47
|
+
/** Says what the chart shows, e.g. "Spending by month". */
|
|
48
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
49
|
+
readonly height: import("@angular/core").InputSignal<ChartHeight>;
|
|
50
|
+
/** Used on the value axis, the tooltip and the table, e.g. to show money. */
|
|
51
|
+
readonly valueFormatter: import("@angular/core").InputSignal<ChartValueFormatter>;
|
|
52
|
+
/** Masks the values in privacy mode. Defaults to whether `valueFormatter` came from `injectMoneyFormatter`. */
|
|
53
|
+
readonly sensitive: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
54
|
+
/** Heading for the category column in the data table. */
|
|
55
|
+
readonly categoryLabel: import("@angular/core").InputSignal<string>;
|
|
56
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
57
|
+
readonly emptyText: import("@angular/core").InputSignal<string>;
|
|
58
|
+
/** Shows the data table under the chart instead of only to screen readers. */
|
|
59
|
+
readonly showTable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
60
|
+
/** Raw ApexCharts options merged over the defaults, for anything not covered here. */
|
|
61
|
+
readonly options: import("@angular/core").InputSignal<ApexCharts.ApexOptions | null>;
|
|
62
|
+
/** `none` leaves the legend out, for when a `ui-chart-legend` is linked with `for`. */
|
|
63
|
+
readonly legend: import("@angular/core").InputSignal<ChartLegendPosition>;
|
|
64
|
+
/** Series switched off in the legend. */
|
|
65
|
+
readonly hiddenSeries: import("@angular/core").WritableSignal<string[]>;
|
|
66
|
+
/** The series the legend is pointing at, the others fade while it's set. */
|
|
67
|
+
readonly emphasis: import("@angular/core").WritableSignal<string | null>;
|
|
68
|
+
abstract readonly legendItems: Signal<ChartLegendItem[]>;
|
|
69
|
+
abstract readonly legendNote: Signal<string>;
|
|
70
|
+
protected abstract readonly isEmpty: Signal<boolean>;
|
|
71
|
+
private readonly money;
|
|
72
|
+
protected readonly privacyMode: Signal<"visible" | "discreet" | "hidden">;
|
|
73
|
+
protected readonly masked: Signal<boolean>;
|
|
74
|
+
protected readonly concealed: Signal<boolean>;
|
|
75
|
+
protected readonly displayFormatter: Signal<ChartValueFormatter>;
|
|
76
|
+
protected readonly apexHeight: Signal<number | "100%">;
|
|
77
|
+
protected formatValue(value: number | null | undefined): string;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiChartBase, never>;
|
|
79
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiChartBase, never, never, {
|
|
80
|
+
"ariaLabel": {
|
|
81
|
+
"alias": "ariaLabel";
|
|
82
|
+
"required": true;
|
|
83
|
+
"isSignal": true;
|
|
84
|
+
};
|
|
85
|
+
"height": {
|
|
86
|
+
"alias": "height";
|
|
87
|
+
"required": false;
|
|
88
|
+
"isSignal": true;
|
|
89
|
+
};
|
|
90
|
+
"valueFormatter": {
|
|
91
|
+
"alias": "valueFormatter";
|
|
92
|
+
"required": false;
|
|
93
|
+
"isSignal": true;
|
|
94
|
+
};
|
|
95
|
+
"sensitive": {
|
|
96
|
+
"alias": "sensitive";
|
|
97
|
+
"required": false;
|
|
98
|
+
"isSignal": true;
|
|
99
|
+
};
|
|
100
|
+
"categoryLabel": {
|
|
101
|
+
"alias": "categoryLabel";
|
|
102
|
+
"required": false;
|
|
103
|
+
"isSignal": true;
|
|
104
|
+
};
|
|
105
|
+
"loading": {
|
|
106
|
+
"alias": "loading";
|
|
107
|
+
"required": false;
|
|
108
|
+
"isSignal": true;
|
|
109
|
+
};
|
|
110
|
+
"emptyText": {
|
|
111
|
+
"alias": "emptyText";
|
|
112
|
+
"required": false;
|
|
113
|
+
"isSignal": true;
|
|
114
|
+
};
|
|
115
|
+
"showTable": {
|
|
116
|
+
"alias": "showTable";
|
|
117
|
+
"required": false;
|
|
118
|
+
"isSignal": true;
|
|
119
|
+
};
|
|
120
|
+
"options": {
|
|
121
|
+
"alias": "options";
|
|
122
|
+
"required": false;
|
|
123
|
+
"isSignal": true;
|
|
124
|
+
};
|
|
125
|
+
"legend": {
|
|
126
|
+
"alias": "legend";
|
|
127
|
+
"required": false;
|
|
128
|
+
"isSignal": true;
|
|
129
|
+
};
|
|
130
|
+
}, {}, never, never, true, never>;
|
|
131
|
+
}
|
|
27
132
|
/**
|
|
28
133
|
* Categorical colours for chart series, in a fixed order that was checked for
|
|
29
134
|
* colour blindness (adjacent pairs stay apart for protan, deutan and tritan).
|
|
@@ -188,63 +293,30 @@ export declare function chartColour(index: number, dark?: boolean): string;
|
|
|
188
293
|
* them apart. Anything past that is grey.
|
|
189
294
|
*/
|
|
190
295
|
export declare function chartSeriesStyle(index: number, dashes: boolean, dark?: boolean): ChartSeriesStyle;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
export
|
|
203
|
-
/** Turns a raw value into what the axis, tooltip and table show, e.g. money. */
|
|
204
|
-
export type ChartValueFormatter = (value: number) => string;
|
|
296
|
+
/**
|
|
297
|
+
* Blends `colour` towards `towards`, keeping `strength` of the original: 1 leaves
|
|
298
|
+
* it as it is, 0 gives `towards`. Apex can't parse color-mix(), so it's done
|
|
299
|
+
* here. Both must be six digit hex, anything else gives null.
|
|
300
|
+
*/
|
|
301
|
+
export declare function mixChartColours(colour: string, towards: string, strength: number): string | null;
|
|
302
|
+
/**
|
|
303
|
+
* Dark or light text, whichever reads better on a mark filled with `background`.
|
|
304
|
+
* Judged by APCA, the contrast model drafted for WCAG 3: the WCAG 2 ratio
|
|
305
|
+
* puts black text on saturated orange and red, where white reads far better.
|
|
306
|
+
*/
|
|
307
|
+
export declare function chartLabelInk(background: string): string;
|
|
205
308
|
/** Inputs every chart with categories along one axis and values up the other shares. */
|
|
206
|
-
declare abstract class UiAxisChartBase
|
|
207
|
-
protected readonly uiFormat: import("@area8975/ui").UiFormat;
|
|
208
|
-
private readonly privacy;
|
|
209
|
-
protected readonly dark: import("@angular/core").WritableSignal<boolean>;
|
|
210
|
-
protected readonly ink: import("@angular/core").Signal<import("@area8975/ui").ChartInk>;
|
|
309
|
+
declare abstract class UiAxisChartBase extends UiChartBase {
|
|
211
310
|
readonly series: import("@angular/core").InputSignal<ChartSeries[]>;
|
|
212
311
|
readonly categories: import("@angular/core").InputSignal<string[]>;
|
|
213
|
-
/** Says what the chart shows, e.g. "Spending by month". */
|
|
214
|
-
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
215
|
-
readonly height: import("@angular/core").InputSignal<ChartHeight>;
|
|
216
|
-
/** Used on the value axis, the tooltip and the table, e.g. to show money. */
|
|
217
|
-
readonly valueFormatter: import("@angular/core").InputSignal<ChartValueFormatter>;
|
|
218
|
-
/** Masks the values in privacy mode. Defaults to whether `valueFormatter` came from `injectMoneyFormatter`. */
|
|
219
|
-
readonly sensitive: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
220
|
-
/** Heading for the category column in the data table. */
|
|
221
|
-
readonly categoryLabel: import("@angular/core").InputSignal<string>;
|
|
222
|
-
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
223
|
-
readonly emptyText: import("@angular/core").InputSignal<string>;
|
|
224
|
-
/** Shows the data table under the chart instead of only to screen readers. */
|
|
225
|
-
readonly showTable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
226
|
-
/** Raw ApexCharts options merged over the defaults, for anything not covered here. */
|
|
227
|
-
readonly options: import("@angular/core").InputSignal<ApexCharts.ApexOptions | null>;
|
|
228
312
|
/**
|
|
229
313
|
* Only these series get palette colours, the rest go grey so the few that
|
|
230
314
|
* matter stand out. The way to show more series than there are colours.
|
|
231
315
|
*/
|
|
232
316
|
readonly highlight: import("@angular/core").InputSignal<string[] | null>;
|
|
233
317
|
readonly highlightKeepsColours: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
234
|
-
/** `none` leaves the legend out, for when a `ui-chart-legend` is linked with `for`. */
|
|
235
|
-
readonly legend: import("@angular/core").InputSignal<ChartLegendPosition>;
|
|
236
|
-
/** Series switched off in the legend. */
|
|
237
|
-
readonly hiddenSeries: import("@angular/core").WritableSignal<string[]>;
|
|
238
|
-
/** The series the legend is pointing at, the others fade while it's set. */
|
|
239
|
-
readonly emphasis: import("@angular/core").WritableSignal<string | null>;
|
|
240
318
|
/** Charts that draw lines can tell series apart by dashes too, bars can't. */
|
|
241
319
|
protected readonly supportsDashes: boolean;
|
|
242
|
-
private readonly money;
|
|
243
|
-
protected readonly privacyMode: import("@angular/core").Signal<"visible" | "discreet" | "hidden">;
|
|
244
|
-
protected readonly masked: import("@angular/core").Signal<boolean>;
|
|
245
|
-
protected readonly concealed: import("@angular/core").Signal<boolean>;
|
|
246
|
-
protected readonly displayFormatter: import("@angular/core").Signal<ChartValueFormatter>;
|
|
247
|
-
protected readonly apexHeight: import("@angular/core").Signal<number | "100%">;
|
|
248
320
|
protected readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
249
321
|
protected readonly isMuted: import("@angular/core").Signal<boolean[]>;
|
|
250
322
|
private readonly colourOrder;
|
|
@@ -254,7 +326,6 @@ declare abstract class UiAxisChartBase implements ChartLegendSource {
|
|
|
254
326
|
/** Grey context series stay out of the legend, the note says how many there are. */
|
|
255
327
|
readonly legendItems: import("@angular/core").Signal<ChartLegendItem[]>;
|
|
256
328
|
readonly legendNote: import("@angular/core").Signal<string>;
|
|
257
|
-
protected formatValue(value: number | null | undefined): string;
|
|
258
329
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiAxisChartBase, never>;
|
|
259
330
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UiAxisChartBase, never, never, {
|
|
260
331
|
"series": {
|
|
@@ -267,51 +338,6 @@ declare abstract class UiAxisChartBase implements ChartLegendSource {
|
|
|
267
338
|
"required": true;
|
|
268
339
|
"isSignal": true;
|
|
269
340
|
};
|
|
270
|
-
"ariaLabel": {
|
|
271
|
-
"alias": "ariaLabel";
|
|
272
|
-
"required": true;
|
|
273
|
-
"isSignal": true;
|
|
274
|
-
};
|
|
275
|
-
"height": {
|
|
276
|
-
"alias": "height";
|
|
277
|
-
"required": false;
|
|
278
|
-
"isSignal": true;
|
|
279
|
-
};
|
|
280
|
-
"valueFormatter": {
|
|
281
|
-
"alias": "valueFormatter";
|
|
282
|
-
"required": false;
|
|
283
|
-
"isSignal": true;
|
|
284
|
-
};
|
|
285
|
-
"sensitive": {
|
|
286
|
-
"alias": "sensitive";
|
|
287
|
-
"required": false;
|
|
288
|
-
"isSignal": true;
|
|
289
|
-
};
|
|
290
|
-
"categoryLabel": {
|
|
291
|
-
"alias": "categoryLabel";
|
|
292
|
-
"required": false;
|
|
293
|
-
"isSignal": true;
|
|
294
|
-
};
|
|
295
|
-
"loading": {
|
|
296
|
-
"alias": "loading";
|
|
297
|
-
"required": false;
|
|
298
|
-
"isSignal": true;
|
|
299
|
-
};
|
|
300
|
-
"emptyText": {
|
|
301
|
-
"alias": "emptyText";
|
|
302
|
-
"required": false;
|
|
303
|
-
"isSignal": true;
|
|
304
|
-
};
|
|
305
|
-
"showTable": {
|
|
306
|
-
"alias": "showTable";
|
|
307
|
-
"required": false;
|
|
308
|
-
"isSignal": true;
|
|
309
|
-
};
|
|
310
|
-
"options": {
|
|
311
|
-
"alias": "options";
|
|
312
|
-
"required": false;
|
|
313
|
-
"isSignal": true;
|
|
314
|
-
};
|
|
315
341
|
"highlight": {
|
|
316
342
|
"alias": "highlight";
|
|
317
343
|
"required": false;
|
|
@@ -322,11 +348,6 @@ declare abstract class UiAxisChartBase implements ChartLegendSource {
|
|
|
322
348
|
"required": false;
|
|
323
349
|
"isSignal": true;
|
|
324
350
|
};
|
|
325
|
-
"legend": {
|
|
326
|
-
"alias": "legend";
|
|
327
|
-
"required": false;
|
|
328
|
-
"isSignal": true;
|
|
329
|
-
};
|
|
330
351
|
}, {}, never, never, true, never>;
|
|
331
352
|
}
|
|
332
353
|
/**
|
|
@@ -413,7 +434,8 @@ export declare class UiChartComponent {
|
|
|
413
434
|
}
|
|
414
435
|
/** The loading, empty and data table states around a chart, shared by every chart type. */
|
|
415
436
|
export declare class UiChartFrameComponent {
|
|
416
|
-
|
|
437
|
+
/** ApexCharts options to draw, or null for a chart that draws itself as projected content. */
|
|
438
|
+
readonly options: import("@angular/core").InputSignal<ApexCharts.ApexOptions | null>;
|
|
417
439
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
418
440
|
readonly categories: import("@angular/core").InputSignal<string[]>;
|
|
419
441
|
readonly series: import("@angular/core").InputSignal<ChartSeries[]>;
|
|
@@ -523,7 +545,7 @@ export declare class UiChartFrameComponent {
|
|
|
523
545
|
}, {
|
|
524
546
|
"hiddenSeries": "hiddenSeriesChange";
|
|
525
547
|
"emphasis": "emphasisChange";
|
|
526
|
-
}, never,
|
|
548
|
+
}, never, ["*"], true, never>;
|
|
527
549
|
}
|
|
528
550
|
/**
|
|
529
551
|
* The numbers behind a chart as a table. Hidden visually by default so screen
|
|
@@ -729,6 +751,168 @@ export declare class UiPieChartComponent extends UiAxisChartBase {
|
|
|
729
751
|
export declare const PieChartVariants: readonly ["pie", "donut"];
|
|
730
752
|
/** @see {@link PieChartVariants} */
|
|
731
753
|
export type PieChartVariant = typeof PieChartVariants[number];
|
|
754
|
+
/** One block inside a group, sized by its value. */
|
|
755
|
+
export interface TreemapItem {
|
|
756
|
+
name: string;
|
|
757
|
+
value: number;
|
|
758
|
+
}
|
|
759
|
+
/** A set of items drawn together in one colour, e.g. a category and who it went to. */
|
|
760
|
+
export interface TreemapGroup {
|
|
761
|
+
name: string;
|
|
762
|
+
items: TreemapItem[];
|
|
763
|
+
/** Overrides the palette slot, keep it for when a group must match something else. */
|
|
764
|
+
colour?: string;
|
|
765
|
+
}
|
|
766
|
+
/** What `itemSelect` emits when a block is clicked. */
|
|
767
|
+
export interface TreemapSelection {
|
|
768
|
+
group: string;
|
|
769
|
+
item: string;
|
|
770
|
+
}
|
|
771
|
+
declare const TREEMAP_GROUP_GAP = 8;
|
|
772
|
+
declare const TREEMAP_BLOCK_GAP = 3;
|
|
773
|
+
declare const TREEMAP_HEADER_HEIGHT = 24;
|
|
774
|
+
interface TreemapRect {
|
|
775
|
+
x: number;
|
|
776
|
+
y: number;
|
|
777
|
+
width: number;
|
|
778
|
+
height: number;
|
|
779
|
+
}
|
|
780
|
+
/** One block as it's drawn, with the colours worked out. */
|
|
781
|
+
interface TreemapBlock {
|
|
782
|
+
group: string;
|
|
783
|
+
item: string;
|
|
784
|
+
value: number;
|
|
785
|
+
fill: string;
|
|
786
|
+
labelInk: string;
|
|
787
|
+
}
|
|
788
|
+
/** A group as it's drawn: only its items with something to show. */
|
|
789
|
+
interface DrawnTreemapGroup {
|
|
790
|
+
name: string;
|
|
791
|
+
colour: string;
|
|
792
|
+
total: number;
|
|
793
|
+
blocks: TreemapBlock[];
|
|
794
|
+
}
|
|
795
|
+
/** How much of its label a block has room for. */
|
|
796
|
+
type TreemapLabel = 'none' | 'name' | 'full';
|
|
797
|
+
interface PlacedTreemapBlock extends TreemapBlock {
|
|
798
|
+
rect: TreemapRect;
|
|
799
|
+
label: TreemapLabel;
|
|
800
|
+
}
|
|
801
|
+
interface PlacedTreemapGroup extends DrawnTreemapGroup {
|
|
802
|
+
rect: TreemapRect;
|
|
803
|
+
hasHeader: boolean;
|
|
804
|
+
placedBlocks: PlacedTreemapBlock[];
|
|
805
|
+
}
|
|
806
|
+
/** A group's own colour, or its palette slot, then grey once the palette runs out. */
|
|
807
|
+
declare function treemapGroupColours(groups: TreemapGroup[], dark: boolean): string[];
|
|
808
|
+
/**
|
|
809
|
+
* The groups worth drawing: hidden ones and items of zero or less are left out,
|
|
810
|
+
* then any group left with nothing.
|
|
811
|
+
*/
|
|
812
|
+
declare function drawnTreemapGroups(groups: TreemapGroup[], colours: string[], hidden: string[], shades: boolean, ink: ChartInk): DrawnTreemapGroup[];
|
|
813
|
+
/** Every block as one row of the data table, named "<group> – <item>". */
|
|
814
|
+
declare function treemapTableRows(groups: TreemapGroup[]): {
|
|
815
|
+
categories: string[];
|
|
816
|
+
values: number[];
|
|
817
|
+
};
|
|
818
|
+
/**
|
|
819
|
+
* Places each group in `bounds`, a header strip along its top when there's
|
|
820
|
+
* room, and its blocks under that. Positions are relative to `bounds`, and
|
|
821
|
+
* each block's are relative to its group.
|
|
822
|
+
*/
|
|
823
|
+
declare function placeTreemapGroups(groups: DrawnTreemapGroup[], bounds: TreemapRect): PlacedTreemapGroup[];
|
|
824
|
+
/**
|
|
825
|
+
* Splits `bounds` into one rectangle per value, each sized by its share and
|
|
826
|
+
* kept as close to square as the others allow (the squarified treemap of
|
|
827
|
+
* Bruls, Huizing and van Wijk). Rectangles come back in the order of
|
|
828
|
+
* `values`, with `gap` between neighbours but none at the edges.
|
|
829
|
+
*/
|
|
830
|
+
declare function squarify(values: number[], bounds: TreemapRect, gap?: number): TreemapRect[];
|
|
831
|
+
interface PointedBlock {
|
|
832
|
+
group: PlacedTreemapGroup;
|
|
833
|
+
block: PlacedTreemapBlock;
|
|
834
|
+
x: number;
|
|
835
|
+
y: number;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Nested blocks sized by value, for showing how a whole splits into groups
|
|
839
|
+
* and each group into items, e.g. spending by category and who it went to.
|
|
840
|
+
* Past eight groups the palette runs out and the rest go grey, so give each
|
|
841
|
+
* group a `colour` when there can be more.
|
|
842
|
+
*/
|
|
843
|
+
export declare class UiTreemapChartComponent extends UiChartBase {
|
|
844
|
+
readonly groups: import("@angular/core").InputSignal<TreemapGroup[]>;
|
|
845
|
+
readonly height: import("@angular/core").InputSignal<ChartHeight>;
|
|
846
|
+
/** Shades each group's items from its colour, biggest strongest, so they stay told apart. */
|
|
847
|
+
readonly shades: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
848
|
+
/** Makes each block a button that emits `itemSelect`. */
|
|
849
|
+
readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
850
|
+
/** Heading for the value column in the data table. */
|
|
851
|
+
readonly valueLabel: import("@angular/core").InputSignal<string>;
|
|
852
|
+
readonly itemSelect: import("@angular/core").OutputEmitterRef<TreemapSelection>;
|
|
853
|
+
private readonly canvas;
|
|
854
|
+
private readonly size;
|
|
855
|
+
protected readonly pointed: import("@angular/core").WritableSignal<PointedBlock | null>;
|
|
856
|
+
/** Set once the first layout is drawn, so blocks glide to new places after that but don't grow in from nothing. */
|
|
857
|
+
protected readonly settled: import("@angular/core").WritableSignal<boolean>;
|
|
858
|
+
private readonly percentFormatter;
|
|
859
|
+
protected readonly fill: import("@angular/core").Signal<boolean>;
|
|
860
|
+
protected readonly fixedHeight: import("@angular/core").Signal<number | null>;
|
|
861
|
+
private readonly colours;
|
|
862
|
+
private readonly drawnGroups;
|
|
863
|
+
protected readonly placedGroups: import("@angular/core").Signal<PlacedTreemapGroup[]>;
|
|
864
|
+
private readonly total;
|
|
865
|
+
private readonly tableRows;
|
|
866
|
+
protected readonly categories: import("@angular/core").Signal<string[]>;
|
|
867
|
+
protected readonly series: import("@angular/core").Signal<ChartSeries[]>;
|
|
868
|
+
protected readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
869
|
+
readonly legendItems: import("@angular/core").Signal<ChartLegendItem[]>;
|
|
870
|
+
readonly legendNote: import("@angular/core").Signal<string>;
|
|
871
|
+
private readonly emphasised;
|
|
872
|
+
protected readonly tooltipFooter: import("@angular/core").Signal<string>;
|
|
873
|
+
protected readonly tooltipPosition: import("@angular/core").Signal<{
|
|
874
|
+
left: number | null;
|
|
875
|
+
right: number | null;
|
|
876
|
+
top: number;
|
|
877
|
+
} | null>;
|
|
878
|
+
constructor();
|
|
879
|
+
protected isFaded(group: PlacedTreemapGroup): boolean;
|
|
880
|
+
protected point(event: PointerEvent, group: PlacedTreemapGroup, block: PlacedTreemapBlock): void;
|
|
881
|
+
protected focus(group: PlacedTreemapGroup, block: PlacedTreemapBlock): void;
|
|
882
|
+
protected select(block: PlacedTreemapBlock): void;
|
|
883
|
+
protected accessibleName(block: PlacedTreemapBlock): string;
|
|
884
|
+
private percent;
|
|
885
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTreemapChartComponent, never>;
|
|
886
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiTreemapChartComponent, "ui-treemap-chart", never, {
|
|
887
|
+
"groups": {
|
|
888
|
+
"alias": "groups";
|
|
889
|
+
"required": true;
|
|
890
|
+
"isSignal": true;
|
|
891
|
+
};
|
|
892
|
+
"height": {
|
|
893
|
+
"alias": "height";
|
|
894
|
+
"required": false;
|
|
895
|
+
"isSignal": true;
|
|
896
|
+
};
|
|
897
|
+
"shades": {
|
|
898
|
+
"alias": "shades";
|
|
899
|
+
"required": false;
|
|
900
|
+
"isSignal": true;
|
|
901
|
+
};
|
|
902
|
+
"selectable": {
|
|
903
|
+
"alias": "selectable";
|
|
904
|
+
"required": false;
|
|
905
|
+
"isSignal": true;
|
|
906
|
+
};
|
|
907
|
+
"valueLabel": {
|
|
908
|
+
"alias": "valueLabel";
|
|
909
|
+
"required": false;
|
|
910
|
+
"isSignal": true;
|
|
911
|
+
};
|
|
912
|
+
}, {
|
|
913
|
+
"itemSelect": "itemSelect";
|
|
914
|
+
}, never, never, true, never>;
|
|
915
|
+
}
|
|
732
916
|
export interface UiFormat {
|
|
733
917
|
/** ISO 4217 code, e.g. "GBP". */
|
|
734
918
|
currency: string;
|
|
@@ -1012,7 +1196,7 @@ export declare class UiInputComponent<ValueType = string> {
|
|
|
1012
1196
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
1013
1197
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1014
1198
|
readonly autocomplete: import("@angular/core").InputSignal<string>;
|
|
1015
|
-
readonly inputmode: import("@angular/core").InputSignal<"" | "
|
|
1199
|
+
readonly inputmode: import("@angular/core").InputSignal<"" | "none" | "decimal" | "search" | "text" | "numeric" | "email" | "tel" | "url">;
|
|
1016
1200
|
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1017
1201
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1018
1202
|
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -1341,6 +1525,10 @@ export interface SelectOptionContext<Model> {
|
|
|
1341
1525
|
export interface SelectTriggerContext<Model> {
|
|
1342
1526
|
$implicit: Model;
|
|
1343
1527
|
}
|
|
1528
|
+
/** Context for a projected `#leading` template, inline search single select only. */
|
|
1529
|
+
export interface SelectLeadingContext<Model> {
|
|
1530
|
+
$implicit: Model;
|
|
1531
|
+
}
|
|
1344
1532
|
/** One line in the open list. Groups are headings, the rest can be picked. */
|
|
1345
1533
|
export type SelectRow<Model> = {
|
|
1346
1534
|
kind: 'group';
|
|
@@ -1407,6 +1595,8 @@ export declare class UiSelectComponent<Model = unknown> {
|
|
|
1407
1595
|
readonly hasMore: import("@angular/core").WritableSignal<boolean>;
|
|
1408
1596
|
readonly optionTemplate: import("@angular/core").Signal<TemplateRef<SelectOptionContext<Model>> | undefined>;
|
|
1409
1597
|
readonly triggerTemplate: import("@angular/core").Signal<TemplateRef<SelectTriggerContext<Model>> | undefined>;
|
|
1598
|
+
/** With an inline search, shown before the chosen item's text, e.g. its colour. Single select only. */
|
|
1599
|
+
readonly leadingTemplate: import("@angular/core").Signal<TemplateRef<SelectLeadingContext<Model>> | undefined>;
|
|
1410
1600
|
/** Index into the pickable rows, the one keyboard focus sits on. */
|
|
1411
1601
|
readonly activeIndex: import("@angular/core").WritableSignal<number>;
|
|
1412
1602
|
readonly listId: string;
|
|
@@ -1415,6 +1605,9 @@ export declare class UiSelectComponent<Model = unknown> {
|
|
|
1415
1605
|
readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
1416
1606
|
/** Tags only replace the trigger text when there's no inline search box. */
|
|
1417
1607
|
readonly showTags: import("@angular/core").Signal<boolean>;
|
|
1608
|
+
readonly showLeading: import("@angular/core").Signal<boolean>;
|
|
1609
|
+
/** Typing replaces the chosen item's text, so its leading content sits out the search. */
|
|
1610
|
+
readonly leadingHidden: import("@angular/core").Signal<boolean>;
|
|
1418
1611
|
/** The text to create from, or null when there's nothing to offer. */
|
|
1419
1612
|
readonly createQuery: import("@angular/core").Signal<string | null>;
|
|
1420
1613
|
readonly rows: import("@angular/core").Signal<SelectRow<Model>[]>;
|
|
@@ -1579,7 +1772,7 @@ export declare class UiSelectComponent<Model = unknown> {
|
|
|
1579
1772
|
"create": "create";
|
|
1580
1773
|
"selectedItem": "selectedItemChange";
|
|
1581
1774
|
"selectedItems": "selectedItemsChange";
|
|
1582
|
-
}, ["optionTemplate", "triggerTemplate"], never, true, never>;
|
|
1775
|
+
}, ["optionTemplate", "triggerTemplate", "leadingTemplate"], never, true, never>;
|
|
1583
1776
|
}
|
|
1584
1777
|
/** Native resize values for the textarea element. */
|
|
1585
1778
|
export declare const TextareaResizeOptions: readonly ["none", "both", "horizontal", "vertical"];
|
|
@@ -2715,12 +2908,16 @@ export interface TableColumn<Row> {
|
|
|
2715
2908
|
/** unique key, used for sorting/filtering/visibility/pinning/reordering */
|
|
2716
2909
|
id: string;
|
|
2717
2910
|
header: string;
|
|
2911
|
+
/** the cell's value, used for sorting and filtering even when a `uiTableCell` template draws the cell */
|
|
2718
2912
|
accessor: (row: Row) => unknown;
|
|
2719
2913
|
/** how the cell value is formatted for display, defaults to plain text */
|
|
2720
2914
|
displayType?: TableColumnDisplayType;
|
|
2721
2915
|
/** ISO currency code, used when displayType is 'currency'. Defaults to the currency from `provideUiFormat`. */
|
|
2722
2916
|
currency?: string;
|
|
2723
|
-
/**
|
|
2917
|
+
/**
|
|
2918
|
+
* Masks the cell in privacy mode, e.g. a transaction's description. Currency cells are already masked, icon cells have no text.
|
|
2919
|
+
* A `uiTableCell` template is replaced by the mask too.
|
|
2920
|
+
*/
|
|
2724
2921
|
sensitive?: boolean;
|
|
2725
2922
|
sortable?: boolean;
|
|
2726
2923
|
filterable?: boolean;
|
|
@@ -2736,6 +2933,12 @@ export interface TableColumn<Row> {
|
|
|
2736
2933
|
/** false excludes the column from the visibility toggle menu */
|
|
2737
2934
|
hideable?: boolean;
|
|
2738
2935
|
}
|
|
2936
|
+
/** Context for a `uiTableCell` template. */
|
|
2937
|
+
export interface TableCellContext<Row> {
|
|
2938
|
+
$implicit: Row;
|
|
2939
|
+
/** what the column's accessor gives for the row */
|
|
2940
|
+
value: unknown;
|
|
2941
|
+
}
|
|
2739
2942
|
export interface TableRowAction<Row> {
|
|
2740
2943
|
id: string;
|
|
2741
2944
|
label: string;
|
|
@@ -2820,6 +3023,8 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2820
3023
|
protected readonly dragOverColumnId: import("@angular/core").WritableSignal<string | null>;
|
|
2821
3024
|
protected readonly dragPreview: import("@angular/core").WritableSignal<ColumnDragPreview | null>;
|
|
2822
3025
|
protected readonly draggedRowIndex: import("@angular/core").WritableSignal<number | null>;
|
|
3026
|
+
private readonly cellDirectives;
|
|
3027
|
+
protected readonly cellTemplates: import("@angular/core").Signal<Map<string, TemplateRef<TableCellContext<unknown>>>>;
|
|
2823
3028
|
readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
2824
3029
|
readonly generatedClasses: import("@angular/core").Signal<string>;
|
|
2825
3030
|
protected readonly orderedColumns: import("@angular/core").Signal<TableColumn<Row>[]>;
|
|
@@ -2845,6 +3050,7 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2845
3050
|
private readonly registry;
|
|
2846
3051
|
protected readonly uiFormat: import("@area8975/ui").UiFormat;
|
|
2847
3052
|
private readonly privateText;
|
|
3053
|
+
protected readonly privacy: import("@angular/core").Signal<"visible" | "discreet" | "hidden">;
|
|
2848
3054
|
private loadedQuery;
|
|
2849
3055
|
private loadedFilters;
|
|
2850
3056
|
private resizeState;
|
|
@@ -2996,7 +3202,23 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2996
3202
|
"selectedRowIds": "selectedRowIdsChange";
|
|
2997
3203
|
"selectionChange": "selectionChange";
|
|
2998
3204
|
"rowsReordered": "rowsReordered";
|
|
2999
|
-
},
|
|
3205
|
+
}, ["cellDirectives"], never, true, never>;
|
|
3206
|
+
}
|
|
3207
|
+
/**
|
|
3208
|
+
* Draws a column's cells in place of its formatted value, matched by column id:
|
|
3209
|
+
* `<ng-template uiTableCell="description" let-row>`. The accessor stays the cell's value.
|
|
3210
|
+
*/
|
|
3211
|
+
export declare class UiTableCellDirective {
|
|
3212
|
+
readonly columnId: import("@angular/core").InputSignal<string>;
|
|
3213
|
+
readonly template: TemplateRef<TableCellContext<unknown>>;
|
|
3214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTableCellDirective, never>;
|
|
3215
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTableCellDirective, "ng-template[uiTableCell]", never, {
|
|
3216
|
+
"columnId": {
|
|
3217
|
+
"alias": "uiTableCell";
|
|
3218
|
+
"required": true;
|
|
3219
|
+
"isSignal": true;
|
|
3220
|
+
};
|
|
3221
|
+
}, {}, never, never, true, never>;
|
|
3000
3222
|
}
|
|
3001
3223
|
export interface UiLinkedTable {
|
|
3002
3224
|
readonly query: WritableSignal<string>;
|