@eagami/ui 5.98.0 → 5.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/eagami-ui.mjs +670 -1
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +255 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.99.0",
|
|
4
4
|
"description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
|
|
5
5
|
"author": "Michal Wiraszka <michal@eagami.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/eagami-ui.d.ts
CHANGED
|
@@ -89,16 +89,26 @@ export interface EagamiMessages {
|
|
|
89
89
|
lineChart: string;
|
|
90
90
|
barChart: string;
|
|
91
91
|
pieChart: string;
|
|
92
|
+
candlestickChart: string;
|
|
92
93
|
/** Header of the data table's label column. */
|
|
93
94
|
category: string;
|
|
94
95
|
value: string;
|
|
95
96
|
/** Header of a pie chart's percentage column. */
|
|
96
97
|
share: string;
|
|
97
98
|
noData: string;
|
|
99
|
+
/** Header of a candlestick chart's period column. */
|
|
100
|
+
period: string;
|
|
101
|
+
/** A candle's opening, highest, lowest, and closing prices. */
|
|
102
|
+
open: string;
|
|
103
|
+
high: string;
|
|
104
|
+
low: string;
|
|
105
|
+
close: string;
|
|
98
106
|
/** Announces the highlighted point of a line or bar chart. */
|
|
99
107
|
point: (series: string, label: string, value: string) => string;
|
|
100
108
|
/** Announces the highlighted slice of a pie chart. */
|
|
101
109
|
slice: (label: string, value: string, percent: string) => string;
|
|
110
|
+
/** Announces the highlighted candle of a candlestick chart. */
|
|
111
|
+
candle: (label: string, open: string, high: string, low: string, close: string) => string;
|
|
102
112
|
/** Caption beneath the total in a donut's hole. */
|
|
103
113
|
total: string;
|
|
104
114
|
/** Default accessible name of a sparkline. */
|
|
@@ -2139,6 +2149,251 @@ export declare class ButtonLinkComponent {
|
|
|
2139
2149
|
};
|
|
2140
2150
|
}, {}, never, ["[slot=prefix]", "*", "[slot=suffix]"], true, never>;
|
|
2141
2151
|
}
|
|
2152
|
+
/** One period of an `<ea-candlestick-chart>`: its label and its four prices. */
|
|
2153
|
+
export interface CandlestickChartCandle {
|
|
2154
|
+
/** Name of the period, such as a date, shown on the axis, tooltip, and data table. */
|
|
2155
|
+
label: string;
|
|
2156
|
+
open: number;
|
|
2157
|
+
high: number;
|
|
2158
|
+
low: number;
|
|
2159
|
+
close: number;
|
|
2160
|
+
}
|
|
2161
|
+
/** Payload describing a single candle of a candlestick chart. */
|
|
2162
|
+
export interface CandlestickChartCandleEvent {
|
|
2163
|
+
index: number;
|
|
2164
|
+
label: string;
|
|
2165
|
+
open: number;
|
|
2166
|
+
high: number;
|
|
2167
|
+
low: number;
|
|
2168
|
+
close: number;
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* Entrance animation, replayed whenever the data changes. `grow` draws every
|
|
2172
|
+
* candle out of its opening price together, `cascade` does so one candle after
|
|
2173
|
+
* another, and `fade` fades the candles in.
|
|
2174
|
+
*/
|
|
2175
|
+
export type CandlestickChartAnimation = 'grow' | 'cascade' | 'fade' | 'none';
|
|
2176
|
+
interface Prices {
|
|
2177
|
+
open: number;
|
|
2178
|
+
high: number;
|
|
2179
|
+
low: number;
|
|
2180
|
+
close: number;
|
|
2181
|
+
}
|
|
2182
|
+
interface PlotCandle {
|
|
2183
|
+
index: number;
|
|
2184
|
+
rising: boolean;
|
|
2185
|
+
hollow: boolean;
|
|
2186
|
+
wick: string;
|
|
2187
|
+
body: {
|
|
2188
|
+
x: number;
|
|
2189
|
+
y: number;
|
|
2190
|
+
width: number;
|
|
2191
|
+
height: number;
|
|
2192
|
+
};
|
|
2193
|
+
/** Height of the opening price, which the entrance grows the candle out of. */
|
|
2194
|
+
origin: number;
|
|
2195
|
+
delay: number;
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* Shows how a price moved over a run of periods, one candle per period: a wick
|
|
2199
|
+
* from its low to its high, and a body from its open to its close. Rising
|
|
2200
|
+
* candles take the positive tone and falling ones the negative, and rising ones
|
|
2201
|
+
* are drawn hollow by default so the direction never rests on color alone.
|
|
2202
|
+
* Hovering or arrowing through the chart reveals each period's prices in a
|
|
2203
|
+
* tooltip, and a visually hidden table carries the full data for screen readers.
|
|
2204
|
+
*/
|
|
2205
|
+
export declare class CandlestickChartComponent {
|
|
2206
|
+
protected readonly i18n: EagamiI18nService;
|
|
2207
|
+
/**
|
|
2208
|
+
* The candles to draw, oldest first. A candle missing a finite price leaves a
|
|
2209
|
+
* gap, and a high or low that the open or close passes is widened to take it in.
|
|
2210
|
+
*/
|
|
2211
|
+
readonly data: import("@angular/core").InputSignal<CandlestickChartCandle[]>;
|
|
2212
|
+
/**
|
|
2213
|
+
* Draws rising candles as outlines and falling ones solid, so the direction
|
|
2214
|
+
* reads without color. A candle that closes at its open counts as rising.
|
|
2215
|
+
*/
|
|
2216
|
+
readonly hollow: import("@angular/core").InputSignal<boolean>;
|
|
2217
|
+
/** Any CSS color for rising candles; defaults to the success color. */
|
|
2218
|
+
readonly risingColor: import("@angular/core").InputSignal<string | undefined>;
|
|
2219
|
+
/** Any CSS color for falling candles; defaults to the error color. */
|
|
2220
|
+
readonly fallingColor: import("@angular/core").InputSignal<string | undefined>;
|
|
2221
|
+
/** Draws gridlines at each price-axis tick. */
|
|
2222
|
+
readonly showGrid: import("@angular/core").InputSignal<boolean>;
|
|
2223
|
+
/** How the period labels are set; `auto` turns them as they run out of room. */
|
|
2224
|
+
readonly xLabelOrientation: import("@angular/core").InputSignal<ChartLabelOrientation>;
|
|
2225
|
+
/**
|
|
2226
|
+
* Dashed rules across the plot at set prices, such as a purchase price or a
|
|
2227
|
+
* moving average. The price axis widens to take them in.
|
|
2228
|
+
*/
|
|
2229
|
+
readonly referenceLines: import("@angular/core").InputSignal<readonly ChartReferenceLine[]>;
|
|
2230
|
+
/** Height of the plot in pixels; the width fills the container. */
|
|
2231
|
+
readonly height: import("@angular/core").InputSignal<number>;
|
|
2232
|
+
/** Visual size; scales the axis and tooltip text and the candle width cap. */
|
|
2233
|
+
readonly size: import("@angular/core").InputSignal<import("@eagami/ui").EaSize>;
|
|
2234
|
+
/** Entrance animation, replayed whenever the data changes. */
|
|
2235
|
+
readonly animation: import("@angular/core").InputSignal<CandlestickChartAnimation>;
|
|
2236
|
+
/** Length of the entrance animation in milliseconds. */
|
|
2237
|
+
readonly animationDuration: import("@angular/core").InputSignal<number>;
|
|
2238
|
+
/** Formats prices on the axis, tooltip, and data table; locale-grouped by default. */
|
|
2239
|
+
readonly formatValue: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
2240
|
+
/** Accessible name for the chart; defaults to a localized "Candlestick chart". */
|
|
2241
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
2242
|
+
/** Fires when a candle is clicked, or chosen with Enter or Space. */
|
|
2243
|
+
readonly candleClick: import("@angular/core").OutputEmitterRef<CandlestickChartCandleEvent>;
|
|
2244
|
+
/** Fires when the highlighted candle changes by pointer or keyboard, with `null` once cleared. */
|
|
2245
|
+
readonly activeCandleChange: import("@angular/core").OutputEmitterRef<CandlestickChartCandleEvent | null>;
|
|
2246
|
+
private readonly viewport;
|
|
2247
|
+
private readonly format;
|
|
2248
|
+
protected readonly active: import("@angular/core").WritableSignal<number | null>;
|
|
2249
|
+
protected readonly label: import("@angular/core").Signal<string>;
|
|
2250
|
+
protected readonly prices: import("@angular/core").Signal<(Prices | null)[]>;
|
|
2251
|
+
protected readonly hasData: import("@angular/core").Signal<boolean>;
|
|
2252
|
+
protected readonly references: import("@angular/core").Signal<ChartReferenceLine[]>;
|
|
2253
|
+
protected readonly renderPass: import("@angular/core").Signal<{}[]>;
|
|
2254
|
+
protected readonly hostClasses: import("@angular/core").Signal<{
|
|
2255
|
+
[x: string]: boolean;
|
|
2256
|
+
}>;
|
|
2257
|
+
protected readonly layout: import("@angular/core").Signal<{
|
|
2258
|
+
width: number;
|
|
2259
|
+
height: number;
|
|
2260
|
+
top: number;
|
|
2261
|
+
left: number;
|
|
2262
|
+
plotWidth: number;
|
|
2263
|
+
plotHeight: number;
|
|
2264
|
+
band: number;
|
|
2265
|
+
axisPx: number;
|
|
2266
|
+
axisY: number;
|
|
2267
|
+
ticks: {
|
|
2268
|
+
value: number;
|
|
2269
|
+
text: string;
|
|
2270
|
+
pos: number;
|
|
2271
|
+
}[];
|
|
2272
|
+
periods: {
|
|
2273
|
+
text: string;
|
|
2274
|
+
index: number;
|
|
2275
|
+
pos: number;
|
|
2276
|
+
}[];
|
|
2277
|
+
candles: PlotCandle[];
|
|
2278
|
+
referenceLines: {
|
|
2279
|
+
labelX: number;
|
|
2280
|
+
labelY: number;
|
|
2281
|
+
key: number;
|
|
2282
|
+
pos: number;
|
|
2283
|
+
value: number;
|
|
2284
|
+
label?: string;
|
|
2285
|
+
color?: string;
|
|
2286
|
+
}[];
|
|
2287
|
+
valuePos: (value: number) => number;
|
|
2288
|
+
tickEndY: number;
|
|
2289
|
+
labelAngle: number;
|
|
2290
|
+
labelY: number;
|
|
2291
|
+
}>;
|
|
2292
|
+
protected readonly crosshair: import("@angular/core").Signal<number | null>;
|
|
2293
|
+
protected readonly tooltip: import("@angular/core").Signal<{
|
|
2294
|
+
x: number;
|
|
2295
|
+
y: number;
|
|
2296
|
+
title: string;
|
|
2297
|
+
rows: {
|
|
2298
|
+
name: string;
|
|
2299
|
+
value: string;
|
|
2300
|
+
}[];
|
|
2301
|
+
key: number;
|
|
2302
|
+
} | null>;
|
|
2303
|
+
protected readonly tooltips: import("@angular/core").Signal<{
|
|
2304
|
+
x: number;
|
|
2305
|
+
y: number;
|
|
2306
|
+
title: string;
|
|
2307
|
+
rows: {
|
|
2308
|
+
name: string;
|
|
2309
|
+
value: string;
|
|
2310
|
+
}[];
|
|
2311
|
+
key: number;
|
|
2312
|
+
}[]>;
|
|
2313
|
+
protected readonly announcement: import("@angular/core").Signal<string>;
|
|
2314
|
+
protected referenceText(line: ChartReferenceLine): string;
|
|
2315
|
+
protected tableValue(value: number | null | undefined): string;
|
|
2316
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
2317
|
+
protected onPointerLeave(): void;
|
|
2318
|
+
protected onClick(): void;
|
|
2319
|
+
protected onFocus(): void;
|
|
2320
|
+
protected onBlur(): void;
|
|
2321
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2322
|
+
private firstFrom;
|
|
2323
|
+
private eventFor;
|
|
2324
|
+
private setActive;
|
|
2325
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CandlestickChartComponent, never>;
|
|
2326
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CandlestickChartComponent, "ea-candlestick-chart", never, {
|
|
2327
|
+
"data": {
|
|
2328
|
+
"alias": "data";
|
|
2329
|
+
"required": false;
|
|
2330
|
+
"isSignal": true;
|
|
2331
|
+
};
|
|
2332
|
+
"hollow": {
|
|
2333
|
+
"alias": "hollow";
|
|
2334
|
+
"required": false;
|
|
2335
|
+
"isSignal": true;
|
|
2336
|
+
};
|
|
2337
|
+
"risingColor": {
|
|
2338
|
+
"alias": "risingColor";
|
|
2339
|
+
"required": false;
|
|
2340
|
+
"isSignal": true;
|
|
2341
|
+
};
|
|
2342
|
+
"fallingColor": {
|
|
2343
|
+
"alias": "fallingColor";
|
|
2344
|
+
"required": false;
|
|
2345
|
+
"isSignal": true;
|
|
2346
|
+
};
|
|
2347
|
+
"showGrid": {
|
|
2348
|
+
"alias": "showGrid";
|
|
2349
|
+
"required": false;
|
|
2350
|
+
"isSignal": true;
|
|
2351
|
+
};
|
|
2352
|
+
"xLabelOrientation": {
|
|
2353
|
+
"alias": "xLabelOrientation";
|
|
2354
|
+
"required": false;
|
|
2355
|
+
"isSignal": true;
|
|
2356
|
+
};
|
|
2357
|
+
"referenceLines": {
|
|
2358
|
+
"alias": "referenceLines";
|
|
2359
|
+
"required": false;
|
|
2360
|
+
"isSignal": true;
|
|
2361
|
+
};
|
|
2362
|
+
"height": {
|
|
2363
|
+
"alias": "height";
|
|
2364
|
+
"required": false;
|
|
2365
|
+
"isSignal": true;
|
|
2366
|
+
};
|
|
2367
|
+
"size": {
|
|
2368
|
+
"alias": "size";
|
|
2369
|
+
"required": false;
|
|
2370
|
+
"isSignal": true;
|
|
2371
|
+
};
|
|
2372
|
+
"animation": {
|
|
2373
|
+
"alias": "animation";
|
|
2374
|
+
"required": false;
|
|
2375
|
+
"isSignal": true;
|
|
2376
|
+
};
|
|
2377
|
+
"animationDuration": {
|
|
2378
|
+
"alias": "animationDuration";
|
|
2379
|
+
"required": false;
|
|
2380
|
+
"isSignal": true;
|
|
2381
|
+
};
|
|
2382
|
+
"formatValue": {
|
|
2383
|
+
"alias": "formatValue";
|
|
2384
|
+
"required": false;
|
|
2385
|
+
"isSignal": true;
|
|
2386
|
+
};
|
|
2387
|
+
"ariaLabel": {
|
|
2388
|
+
"alias": "aria-label";
|
|
2389
|
+
"required": false;
|
|
2390
|
+
"isSignal": true;
|
|
2391
|
+
};
|
|
2392
|
+
}, {
|
|
2393
|
+
"candleClick": "candleClick";
|
|
2394
|
+
"activeCandleChange": "activeCandleChange";
|
|
2395
|
+
}, never, never, true, never>;
|
|
2396
|
+
}
|
|
2142
2397
|
/** Visual style of a card surface. */
|
|
2143
2398
|
export type CardVariant = 'elevated' | 'outlined' | 'filled';
|
|
2144
2399
|
/** Padding preset applied to the card's content area. */
|