@forgeroute/ui 0.3.5 → 0.3.7
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/fesm2022/forgeroute-ui-charts.mjs +323 -0
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +52 -239
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/forgeroute-ui-charts.d.ts +95 -0
- package/types/forgeroute-ui.d.ts +31 -80
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeroute/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=22.0.0",
|
|
6
6
|
"@angular/core": ">=22.0.0",
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
".": {
|
|
37
37
|
"types": "./types/forgeroute-ui.d.ts",
|
|
38
38
|
"default": "./fesm2022/forgeroute-ui.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./charts": {
|
|
41
|
+
"types": "./types/forgeroute-ui-charts.d.ts",
|
|
42
|
+
"default": "./fesm2022/forgeroute-ui-charts.mjs"
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
"sideEffects": false,
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Bar chart of one series (e.g. calls per day). Pass the category `labels` and the matching `values`.
|
|
4
|
+
*
|
|
5
|
+
* <ui-bar-chart [labels]="['8/1', '8/2']" [values]="[3, 0]" ariaLabel="Daily call volume"
|
|
6
|
+
* unitSingular="call" unitPlural="calls" />
|
|
7
|
+
*
|
|
8
|
+
* - Bars show their value above them (`showValues`, a 0 bar shows nothing), the y axis starts at 0 and counts whole numbers.
|
|
9
|
+
* - The tooltip reads "<value> <unit>" (`unitSingular` for 1, `unitPlural` otherwise; no unit = just the number).
|
|
10
|
+
* - With an `ariaLabel` the chart is an image for assistive tech (`role="img"` + that label; without a label no role is set, as an
|
|
11
|
+
* unnamed image is an accessibility error); render the same figures as text next to it
|
|
12
|
+
* (e.g. a visually hidden list) when the exact values matter.
|
|
13
|
+
* - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);
|
|
14
|
+
* the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).
|
|
15
|
+
*/
|
|
16
|
+
export declare class BarChartComponent {
|
|
17
|
+
/** Category labels, left to right (one per bar). */
|
|
18
|
+
readonly labels: import("@angular/core").InputSignal<string[]>;
|
|
19
|
+
/** The bar values, in the order of `labels`. */
|
|
20
|
+
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
21
|
+
/** Bar colour (any CSS colour). */
|
|
22
|
+
readonly color: import("@angular/core").InputSignal<string>;
|
|
23
|
+
/** Bar colour while hovered. */
|
|
24
|
+
readonly hoverColor: import("@angular/core").InputSignal<string>;
|
|
25
|
+
/** Chart height in px. */
|
|
26
|
+
readonly height: import("@angular/core").InputSignal<number>;
|
|
27
|
+
/** Spoken description of the chart. */
|
|
28
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
29
|
+
/** Show each bar's value above it. */
|
|
30
|
+
readonly showValues: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
/** Tooltip unit for exactly 1 (e.g. "call"). */
|
|
32
|
+
readonly unitSingular: import("@angular/core").InputSignal<string>;
|
|
33
|
+
/** Tooltip unit for any other value (e.g. "calls"). */
|
|
34
|
+
readonly unitPlural: import("@angular/core").InputSignal<string>;
|
|
35
|
+
private readonly canvas;
|
|
36
|
+
private readonly zone;
|
|
37
|
+
private chart;
|
|
38
|
+
private readonly tooltipText;
|
|
39
|
+
protected readonly series: import("@angular/core").Signal<{
|
|
40
|
+
labels: string[];
|
|
41
|
+
data: number[];
|
|
42
|
+
color: string;
|
|
43
|
+
hoverColor: string;
|
|
44
|
+
showValues: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
constructor();
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BarChartComponent, "ui-bar-chart", never, {
|
|
49
|
+
"labels": {
|
|
50
|
+
"alias": "labels";
|
|
51
|
+
"required": false;
|
|
52
|
+
"isSignal": true;
|
|
53
|
+
};
|
|
54
|
+
"values": {
|
|
55
|
+
"alias": "values";
|
|
56
|
+
"required": false;
|
|
57
|
+
"isSignal": true;
|
|
58
|
+
};
|
|
59
|
+
"color": {
|
|
60
|
+
"alias": "color";
|
|
61
|
+
"required": false;
|
|
62
|
+
"isSignal": true;
|
|
63
|
+
};
|
|
64
|
+
"hoverColor": {
|
|
65
|
+
"alias": "hoverColor";
|
|
66
|
+
"required": false;
|
|
67
|
+
"isSignal": true;
|
|
68
|
+
};
|
|
69
|
+
"height": {
|
|
70
|
+
"alias": "height";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
"ariaLabel": {
|
|
75
|
+
"alias": "ariaLabel";
|
|
76
|
+
"required": false;
|
|
77
|
+
"isSignal": true;
|
|
78
|
+
};
|
|
79
|
+
"showValues": {
|
|
80
|
+
"alias": "showValues";
|
|
81
|
+
"required": false;
|
|
82
|
+
"isSignal": true;
|
|
83
|
+
};
|
|
84
|
+
"unitSingular": {
|
|
85
|
+
"alias": "unitSingular";
|
|
86
|
+
"required": false;
|
|
87
|
+
"isSignal": true;
|
|
88
|
+
};
|
|
89
|
+
"unitPlural": {
|
|
90
|
+
"alias": "unitPlural";
|
|
91
|
+
"required": false;
|
|
92
|
+
"isSignal": true;
|
|
93
|
+
};
|
|
94
|
+
}, {}, never, never, true, never>;
|
|
95
|
+
}
|
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -834,7 +834,7 @@ export declare class SelectComponent implements ControlValueAccessor, Validator,
|
|
|
834
834
|
readonly error: import("@angular/core").InputSignal<string>;
|
|
835
835
|
/** Reveal the built-in error messages now (e.g. after a failed Save click), without waiting for blur. */
|
|
836
836
|
readonly showErrors: import("@angular/core").InputSignal<boolean>;
|
|
837
|
-
readonly size: import("@angular/core").InputSignal<"
|
|
837
|
+
readonly size: import("@angular/core").InputSignal<"default" | "sm">;
|
|
838
838
|
readonly _disabledInput: import("@angular/core").InputSignal<boolean>;
|
|
839
839
|
private readonly _cvaDisabled;
|
|
840
840
|
protected readonly disabled: import("@angular/core").Signal<boolean>;
|
|
@@ -1685,7 +1685,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
|
|
|
1685
1685
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
1686
1686
|
readonly description: import("@angular/core").InputSignal<string>;
|
|
1687
1687
|
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
1688
|
-
readonly bodyOverflow: import("@angular/core").InputSignal<"
|
|
1688
|
+
readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "hidden" | "visible">;
|
|
1689
1689
|
readonly close: import("@angular/core").OutputEmitterRef<void>;
|
|
1690
1690
|
protected readonly titleId: string;
|
|
1691
1691
|
private readonly el;
|
|
@@ -1826,74 +1826,33 @@ export declare class ProgressBarComponent {
|
|
|
1826
1826
|
}, {}, never, never, true, never>;
|
|
1827
1827
|
}
|
|
1828
1828
|
/**
|
|
1829
|
-
*
|
|
1829
|
+
* Audio player for a recording (a call, a voicemail, a message): the browser's own controls (play / pause, seek, time, volume,
|
|
1830
|
+
* keyboard and screen-reader support, the same in Chrome, Edge, Firefox and Safari) in the library's look, plus a readable message
|
|
1831
|
+
* when the file can't be played.
|
|
1830
1832
|
*
|
|
1831
|
-
* <ui-
|
|
1832
|
-
* unitSingular="call" unitPlural="calls" />
|
|
1833
|
+
* <ui-audio-player [src]="blobUrl()" ariaLabel="Call recording playback" />
|
|
1833
1834
|
*
|
|
1834
|
-
* -
|
|
1835
|
-
* -
|
|
1836
|
-
* -
|
|
1837
|
-
*
|
|
1838
|
-
* (e.g. a visually hidden list) when the exact values matter.
|
|
1839
|
-
* - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);
|
|
1840
|
-
* the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).
|
|
1835
|
+
* - `src`: the audio URL (an object URL from a fetched blob works). An empty `src` renders the player with nothing to play.
|
|
1836
|
+
* - `ariaLabel`: the accessible name of the player. Give it one; without it assistive tech just hears "audio".
|
|
1837
|
+
* - `preload`: 'metadata' (default; loads the length only), 'auto' or 'none'.
|
|
1838
|
+
* - `playbackError` fires once per failed source; the message "Audio could not be played." replaces the player until `src` changes.
|
|
1841
1839
|
*/
|
|
1842
|
-
export declare class
|
|
1843
|
-
/**
|
|
1844
|
-
readonly
|
|
1845
|
-
/**
|
|
1846
|
-
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
1847
|
-
/** Bar colour (any CSS colour). */
|
|
1848
|
-
readonly color: import("@angular/core").InputSignal<string>;
|
|
1849
|
-
/** Bar colour while hovered. */
|
|
1850
|
-
readonly hoverColor: import("@angular/core").InputSignal<string>;
|
|
1851
|
-
/** Chart height in px. */
|
|
1852
|
-
readonly height: import("@angular/core").InputSignal<number>;
|
|
1853
|
-
/** Spoken description of the chart. */
|
|
1840
|
+
export declare class AudioPlayerComponent {
|
|
1841
|
+
/** The audio URL. */
|
|
1842
|
+
readonly src: import("@angular/core").InputSignal<string>;
|
|
1843
|
+
/** Accessible name of the player. */
|
|
1854
1844
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
1855
|
-
/**
|
|
1856
|
-
readonly
|
|
1857
|
-
/**
|
|
1858
|
-
readonly
|
|
1859
|
-
|
|
1860
|
-
readonly unitPlural: import("@angular/core").InputSignal<string>;
|
|
1861
|
-
private readonly canvas;
|
|
1862
|
-
private readonly zone;
|
|
1863
|
-
private chart;
|
|
1864
|
-
private readonly tooltipText;
|
|
1865
|
-
protected readonly series: import("@angular/core").Signal<{
|
|
1866
|
-
labels: string[];
|
|
1867
|
-
data: number[];
|
|
1868
|
-
color: string;
|
|
1869
|
-
hoverColor: string;
|
|
1870
|
-
showValues: boolean;
|
|
1871
|
-
}>;
|
|
1845
|
+
/** How much to load before play: 'metadata' (default), 'auto' or 'none'. */
|
|
1846
|
+
readonly preload: import("@angular/core").InputSignal<"none" | "metadata" | "auto">;
|
|
1847
|
+
/** Fires when the browser can't load or decode the source. */
|
|
1848
|
+
readonly playbackError: import("@angular/core").OutputEmitterRef<void>;
|
|
1849
|
+
protected readonly failed: import("@angular/core").WritableSignal<boolean>;
|
|
1872
1850
|
constructor();
|
|
1873
|
-
|
|
1874
|
-
static
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
"
|
|
1878
|
-
"isSignal": true;
|
|
1879
|
-
};
|
|
1880
|
-
"values": {
|
|
1881
|
-
"alias": "values";
|
|
1882
|
-
"required": false;
|
|
1883
|
-
"isSignal": true;
|
|
1884
|
-
};
|
|
1885
|
-
"color": {
|
|
1886
|
-
"alias": "color";
|
|
1887
|
-
"required": false;
|
|
1888
|
-
"isSignal": true;
|
|
1889
|
-
};
|
|
1890
|
-
"hoverColor": {
|
|
1891
|
-
"alias": "hoverColor";
|
|
1892
|
-
"required": false;
|
|
1893
|
-
"isSignal": true;
|
|
1894
|
-
};
|
|
1895
|
-
"height": {
|
|
1896
|
-
"alias": "height";
|
|
1851
|
+
protected onError(): void;
|
|
1852
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AudioPlayerComponent, never>;
|
|
1853
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AudioPlayerComponent, "ui-audio-player", never, {
|
|
1854
|
+
"src": {
|
|
1855
|
+
"alias": "src";
|
|
1897
1856
|
"required": false;
|
|
1898
1857
|
"isSignal": true;
|
|
1899
1858
|
};
|
|
@@ -1902,22 +1861,14 @@ export declare class BarChartComponent {
|
|
|
1902
1861
|
"required": false;
|
|
1903
1862
|
"isSignal": true;
|
|
1904
1863
|
};
|
|
1905
|
-
"
|
|
1906
|
-
"alias": "
|
|
1864
|
+
"preload": {
|
|
1865
|
+
"alias": "preload";
|
|
1907
1866
|
"required": false;
|
|
1908
1867
|
"isSignal": true;
|
|
1909
1868
|
};
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
"isSignal": true;
|
|
1914
|
-
};
|
|
1915
|
-
"unitPlural": {
|
|
1916
|
-
"alias": "unitPlural";
|
|
1917
|
-
"required": false;
|
|
1918
|
-
"isSignal": true;
|
|
1919
|
-
};
|
|
1920
|
-
}, {}, never, never, true, never>;
|
|
1869
|
+
}, {
|
|
1870
|
+
"playbackError": "playbackError";
|
|
1871
|
+
}, never, never, true, never>;
|
|
1921
1872
|
}
|
|
1922
1873
|
export declare class SkeletonComponent {
|
|
1923
1874
|
readonly height: import("@angular/core").InputSignal<number>;
|
|
@@ -1957,7 +1908,7 @@ export declare class TooltipDirective {
|
|
|
1957
1908
|
/** Tooltip text; empty or null disables the tooltip. */
|
|
1958
1909
|
readonly uiTooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
1959
1910
|
/** Preferred side; flips to the other side when there is no room. */
|
|
1960
|
-
readonly tooltipPosition: import("@angular/core").InputSignal<"
|
|
1911
|
+
readonly tooltipPosition: import("@angular/core").InputSignal<"top" | "bottom">;
|
|
1961
1912
|
private readonly host;
|
|
1962
1913
|
private readonly doc;
|
|
1963
1914
|
private bubble;
|
|
@@ -6195,7 +6146,7 @@ export declare class DetailCardComponent {
|
|
|
6195
6146
|
/** Bold uppercase title. Empty = no title text. */
|
|
6196
6147
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
6197
6148
|
/** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */
|
|
6198
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 |
|
|
6149
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
6199
6150
|
/** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */
|
|
6200
6151
|
readonly titleId: import("@angular/core").InputSignal<string>;
|
|
6201
6152
|
/** Grey line under the title. */
|