@area8975/ui 0.1.1-dev.17 → 0.1.1-dev.19
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/area8975-ui.mjs +849 -198
- package/fesm2022/area8975-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/theme.css +2 -13
- package/types/area8975-ui.d.ts +185 -95
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
/* Defaults hover styles on all devices */
|
|
14
14
|
@custom-variant hover (&:hover);
|
|
15
15
|
|
|
16
|
-
/* dark: follows a .dark class on <html> rather than the media query, so an app can offer System, Light and Dark */
|
|
17
16
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
18
17
|
|
|
19
18
|
|
|
@@ -116,7 +115,6 @@
|
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
|
|
119
|
-
/* Paints the page, otherwise the browser's white shows through whatever --background is */
|
|
120
118
|
@layer base {
|
|
121
119
|
body {
|
|
122
120
|
background-color: var(--background);
|
|
@@ -124,10 +122,6 @@
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
/*
|
|
128
|
-
* Softer light theme. The page is a light grey so white cards and the sidebar
|
|
129
|
-
* stand off it, edged with a slightly stronger line. Dark mode keeps Preline's.
|
|
130
|
-
*/
|
|
131
125
|
:root:not(.dark) {
|
|
132
126
|
--background: oklch(0.948 0.005 264);
|
|
133
127
|
--sidebar: var(--card);
|
|
@@ -135,23 +129,18 @@
|
|
|
135
129
|
--card-line: oklch(0.9 0.006 264);
|
|
136
130
|
}
|
|
137
131
|
|
|
138
|
-
/* Dark to match, a deeper page with the cards and sidebar raised off it */
|
|
139
132
|
.dark {
|
|
140
133
|
--background: var(--color-neutral-900);
|
|
141
134
|
--sidebar: var(--card);
|
|
142
135
|
--sidebar-line: var(--card-line);
|
|
143
136
|
|
|
144
|
-
/*
|
|
137
|
+
/* Preline's item hover matches the card colour in dark */
|
|
145
138
|
--dropdown-item-hover: var(--color-neutral-700);
|
|
146
139
|
--dropdown-item-focus: var(--color-neutral-700);
|
|
147
140
|
--dropdown-item-active: var(--color-neutral-700);
|
|
148
141
|
}
|
|
149
142
|
|
|
150
|
-
/*
|
|
151
|
-
* Dark tints. Soft fills, borders and focus rings use the 50 to 200 shades and
|
|
152
|
-
* soft text the 800 one, so in dark those become see-through tints of the
|
|
153
|
-
* colour and a light text shade. Solid colours stay as they are.
|
|
154
|
-
*/
|
|
143
|
+
/* soft fills use the 50 to 200 shades and 800 text, so those become tints in dark */
|
|
155
144
|
.dark {
|
|
156
145
|
--color-primary-50: color-mix(in oklab, var(--color-blue-500) 12%, transparent);
|
|
157
146
|
--color-primary-100: color-mix(in oklab, var(--color-blue-500) 20%, transparent);
|
package/types/area8975-ui.d.ts
CHANGED
|
@@ -30,10 +30,7 @@ export type ChartLegendPosition = 'auto' | 'none';
|
|
|
30
30
|
* Keep the order, a series takes the next slot, never a generated colour.
|
|
31
31
|
*/
|
|
32
32
|
export declare const CHART_PALETTE: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
|
|
33
|
-
/**
|
|
34
|
-
* The palette for dark mode. Violet and green are lightened so every slot
|
|
35
|
-
* keeps 3:1 contrast on a dark card, the rest already do.
|
|
36
|
-
*/
|
|
33
|
+
/** Violet and green are lightened to keep 3:1 contrast on a dark card. */
|
|
37
34
|
export declare const CHART_PALETTE_DARK: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#2e9e2e", "#8a7cf0", "#e34948"];
|
|
38
35
|
/** Past eight series, fold the rest into "Other" instead of reusing a colour. */
|
|
39
36
|
export declare const CHART_MAX_SERIES: 8;
|
|
@@ -45,7 +42,6 @@ export interface ChartInk {
|
|
|
45
42
|
muted: string;
|
|
46
43
|
grid: string;
|
|
47
44
|
surface: string;
|
|
48
|
-
/** Series that are there for context. */
|
|
49
45
|
context: string;
|
|
50
46
|
}
|
|
51
47
|
export declare const CHART_INK: ChartInk;
|
|
@@ -73,11 +69,7 @@ export interface ChartSeries {
|
|
|
73
69
|
/** Draws the line dashed, e.g. to set projected figures apart from actual ones. Bars ignore it. */
|
|
74
70
|
dashed?: boolean;
|
|
75
71
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Pixels, or `fill` to take the height of the chart's host, which then has to
|
|
78
|
-
* get its height from layout (a grid row, a flex parent, `h-full` under a sized
|
|
79
|
-
* parent). Clamp it with `min-h-*` and `max-h-*` on the host.
|
|
80
|
-
*/
|
|
72
|
+
/** `fill` takes the host's height, which has to come from layout. */
|
|
81
73
|
export type ChartHeight = number | 'fill';
|
|
82
74
|
/** Turns a raw value into what the axis, tooltip and table show, e.g. money. */
|
|
83
75
|
export type ChartValueFormatter = (value: number) => string;
|
|
@@ -106,10 +98,6 @@ declare abstract class UiAxisChartBase implements ChartLegendSource {
|
|
|
106
98
|
* matter stand out. The way to show more series than there are colours.
|
|
107
99
|
*/
|
|
108
100
|
readonly highlight: import("@angular/core").InputSignal<string[] | null>;
|
|
109
|
-
/**
|
|
110
|
-
* Highlighted series keep the colour they'd have with nothing highlighted,
|
|
111
|
-
* so picking one out of many doesn't change what colour it is.
|
|
112
|
-
*/
|
|
113
101
|
readonly highlightKeepsColours: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
114
102
|
/** `none` leaves the legend out, for when a `ui-chart-legend` is linked with `for`. */
|
|
115
103
|
readonly legend: import("@angular/core").InputSignal<ChartLegendPosition>;
|
|
@@ -440,10 +428,7 @@ export declare class UiChartLegendComponent {
|
|
|
440
428
|
readonly note: import("@angular/core").InputSignal<string>;
|
|
441
429
|
/** A chart to take items from and hide or fade series on, set its `legend` to `none`. */
|
|
442
430
|
readonly for: import("@angular/core").InputSignal<ChartLegendSource | null>;
|
|
443
|
-
/**
|
|
444
|
-
* Adjusts the items taken from `for`, e.g. to relabel or reorder them.
|
|
445
|
-
* Keep each item's `name`, toggling and fading find the series by it.
|
|
446
|
-
*/
|
|
431
|
+
/** Adjusts the linked chart's items, e.g. to relabel them. Keep each `name`. */
|
|
447
432
|
readonly itemsWith: import("@angular/core").InputSignal<((items: ChartLegendItem[]) => ChartLegendItem[]) | null>;
|
|
448
433
|
/** Names of items switched off, bound two-way when `toggleable`. */
|
|
449
434
|
readonly hidden: import("@angular/core").ModelSignal<string[]>;
|
|
@@ -512,7 +497,6 @@ export declare class UiLineChartComponent extends UiAxisChartBase {
|
|
|
512
497
|
readonly showPoints: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
513
498
|
/** Shades this category and everything after it as a forecast. */
|
|
514
499
|
readonly projectedFrom: import("@angular/core").InputSignal<string | null>;
|
|
515
|
-
/** Names the `projectedFrom` band. */
|
|
516
500
|
readonly projectedLabel: import("@angular/core").InputSignal<string>;
|
|
517
501
|
private readonly projectedAnnotations;
|
|
518
502
|
protected readonly chartOptions: import("@angular/core").Signal<ApexCharts.ApexOptions>;
|
|
@@ -584,26 +568,16 @@ export declare class UiPieChartComponent extends UiAxisChartBase {
|
|
|
584
568
|
export declare const PieChartVariants: readonly ["pie", "donut"];
|
|
585
569
|
/** @see {@link PieChartVariants} */
|
|
586
570
|
export type PieChartVariant = typeof PieChartVariants[number];
|
|
587
|
-
/** Currency and locale shared by everything in the library that formats numbers. */
|
|
588
571
|
export interface UiFormat {
|
|
589
572
|
/** ISO 4217 code, e.g. "GBP". */
|
|
590
573
|
currency: string;
|
|
591
574
|
/** BCP 47 tag, e.g. "en-GB". */
|
|
592
575
|
locale: string;
|
|
593
576
|
}
|
|
594
|
-
/** What the library uses when nothing is provided. */
|
|
595
577
|
export declare const UI_FORMAT_DEFAULTS: UiFormat;
|
|
596
578
|
export declare const UI_FORMAT: InjectionToken<UiFormat>;
|
|
597
|
-
/**
|
|
598
|
-
* Sets the currency and locale once, in the app config or on a component for
|
|
599
|
-
* just its part of the page. Inputs on a component still win over it.
|
|
600
|
-
*/
|
|
601
579
|
export declare function provideUiFormat(format: Partial<UiFormat>): Provider;
|
|
602
|
-
/**
|
|
603
|
-
* Formats money in the provided currency and locale, made for a chart's
|
|
604
|
-
* `valueFormatter`. Needs an injection context, e.g. a component field.
|
|
605
|
-
* `options` tweaks the output, e.g. `{ maximumFractionDigits: 0 }` for axes.
|
|
606
|
-
*/
|
|
580
|
+
/** Needs an injection context, e.g. a component field. */
|
|
607
581
|
export declare function injectMoneyFormatter(options?: Intl.NumberFormatOptions): (value: number) => string;
|
|
608
582
|
/** Native type values ui-input supports. File/checkbox/radio/range need their own components. */
|
|
609
583
|
export declare const InputTypes: readonly ["text", "email", "tel", "url", "search", "password", "number", "date", "time", "datetime-local", "month", "week", "color"];
|
|
@@ -1252,6 +1226,7 @@ export declare class UiSelectComponent<Model = unknown> {
|
|
|
1252
1226
|
readonly listId: string;
|
|
1253
1227
|
readonly hasSelection: import("@angular/core").Signal<boolean>;
|
|
1254
1228
|
readonly triggerLabel: import("@angular/core").Signal<string>;
|
|
1229
|
+
readonly isEmpty: import("@angular/core").Signal<boolean>;
|
|
1255
1230
|
/** Tags only replace the trigger text when there's no inline search box. */
|
|
1256
1231
|
readonly showTags: import("@angular/core").Signal<boolean>;
|
|
1257
1232
|
/** The text to create from, or null when there's nothing to offer. */
|
|
@@ -1568,12 +1543,7 @@ export declare const AlertIntents: string[];
|
|
|
1568
1543
|
export declare const AlertAppearances: readonly ["soft", "bordered"];
|
|
1569
1544
|
export type AlertIntent = typeof AlertIntents[number];
|
|
1570
1545
|
export type AlertAppearance = typeof AlertAppearances[number];
|
|
1571
|
-
/**
|
|
1572
|
-
* A small round picture of a person, their initials until `src` is set or
|
|
1573
|
-
* when the image fails to load. Screen readers hear the name, not the initials.
|
|
1574
|
-
*/
|
|
1575
1546
|
export declare class UiAvatarComponent {
|
|
1576
|
-
/** Who it shows, the initials come from it. */
|
|
1577
1547
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
1578
1548
|
readonly src: import("@angular/core").InputSignal<string | null>;
|
|
1579
1549
|
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg">;
|
|
@@ -1601,7 +1571,6 @@ export declare class UiAvatarComponent {
|
|
|
1601
1571
|
};
|
|
1602
1572
|
}, {}, never, never, true, never>;
|
|
1603
1573
|
}
|
|
1604
|
-
/** sm for dense rows, md for menus and lists, lg for a profile header. */
|
|
1605
1574
|
export declare const AvatarSizes: readonly ["sm", "md", "lg"];
|
|
1606
1575
|
/** @see {@link AvatarSizes} */
|
|
1607
1576
|
export type AvatarSize = typeof AvatarSizes[number];
|
|
@@ -1868,11 +1837,6 @@ export declare const CardRadii: readonly ["none", "sm", "md", "lg", "xl"];
|
|
|
1868
1837
|
/** @see {@link CardRadii} */
|
|
1869
1838
|
export type CardRadius = typeof CardRadii[number];
|
|
1870
1839
|
export declare const radiusClasses: Record<CardRadius, string>;
|
|
1871
|
-
/**
|
|
1872
|
-
* The title row at the top of a card, with an optional muted subtitle.
|
|
1873
|
-
* Anything projected goes on the right as actions, e.g. buttons or a picker,
|
|
1874
|
-
* and wraps under the title when there isn't room.
|
|
1875
|
-
*/
|
|
1876
1840
|
export declare class UiCardHeaderComponent {
|
|
1877
1841
|
readonly heading: import("@angular/core").InputSignal<string>;
|
|
1878
1842
|
readonly subtitle: import("@angular/core").InputSignal<string>;
|
|
@@ -1897,7 +1861,6 @@ export declare class UiCardHeaderComponent {
|
|
|
1897
1861
|
};
|
|
1898
1862
|
}, {}, never, ["*"], true, never>;
|
|
1899
1863
|
}
|
|
1900
|
-
/** Heading levels a card title can use. */
|
|
1901
1864
|
export declare const CardHeadingLevels: readonly [2, 3, 4];
|
|
1902
1865
|
/** @see {@link CardHeadingLevels} */
|
|
1903
1866
|
export type CardHeadingLevel = typeof CardHeadingLevels[number];
|
|
@@ -1927,7 +1890,7 @@ export declare class UiDrawerComponent {
|
|
|
1927
1890
|
"required": false;
|
|
1928
1891
|
"isSignal": true;
|
|
1929
1892
|
};
|
|
1930
|
-
}, {}, never,
|
|
1893
|
+
}, {}, never, ["[drawer-actions]", "*"], true, never>;
|
|
1931
1894
|
}
|
|
1932
1895
|
export declare class UiDropdownDirective {
|
|
1933
1896
|
readonly element: ElementRef<any>;
|
|
@@ -2299,18 +2262,12 @@ export declare class UiProgressComponent {
|
|
|
2299
2262
|
};
|
|
2300
2263
|
}, {}, never, never, true, never>;
|
|
2301
2264
|
}
|
|
2302
|
-
/** One choice in a segmented control. */
|
|
2303
2265
|
export interface SegmentedOption<T> {
|
|
2304
2266
|
value: T;
|
|
2305
2267
|
label: string;
|
|
2306
2268
|
/** Read out instead of `label`, for when the label is abbreviated, e.g. "6M". */
|
|
2307
2269
|
ariaLabel?: string;
|
|
2308
2270
|
}
|
|
2309
|
-
/**
|
|
2310
|
-
* A row of options where exactly one is picked, e.g. a time range or a view
|
|
2311
|
-
* toggle. Built on native radios, so arrow keys move between options and
|
|
2312
|
-
* screen readers hear a radio group.
|
|
2313
|
-
*/
|
|
2314
2271
|
export declare class UiSegmentedComponent<T> {
|
|
2315
2272
|
readonly options: import("@angular/core").InputSignal<SegmentedOption<T>[]>;
|
|
2316
2273
|
readonly value: import("@angular/core").ModelSignal<T>;
|
|
@@ -2379,13 +2336,7 @@ export declare class UiSkeletonComponent {
|
|
|
2379
2336
|
export declare const SkeletonShapes: readonly ["text", "circle", "rect"];
|
|
2380
2337
|
/** @see {@link SkeletonShapes} */
|
|
2381
2338
|
export type SkeletonShape = typeof SkeletonShapes[number];
|
|
2382
|
-
/**
|
|
2383
|
-
* A muted label over a large figure, for the numbers inside a card. Project
|
|
2384
|
-
* the value, e.g. a `ui-money`, and optionally a change or badge beside it
|
|
2385
|
-
* with `stat-change` and a small line under it with `stat-note`.
|
|
2386
|
-
*
|
|
2387
|
-
* Each stat is its own `dl`, so put a row of them in a plain flex or grid wrapper.
|
|
2388
|
-
*/
|
|
2339
|
+
/** Each stat is its own `dl`, so wrap a row of them in a plain div. */
|
|
2389
2340
|
export declare class UiStatComponent {
|
|
2390
2341
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
2391
2342
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiStatComponent, never>;
|
|
@@ -2521,6 +2472,8 @@ interface ColumnDragPreview {
|
|
|
2521
2472
|
}
|
|
2522
2473
|
export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestroy {
|
|
2523
2474
|
readonly classes: import("@angular/core").InputSignal<string>;
|
|
2475
|
+
/** Lets controls elsewhere on the page link to this table, e.g. `<ui-search [table]="'transactions'">`. */
|
|
2476
|
+
readonly tableId: import("@angular/core").InputSignal<string | null>;
|
|
2524
2477
|
readonly columns: import("@angular/core").InputSignal<TableColumn<Row>[]>;
|
|
2525
2478
|
readonly dataSource: import("@angular/core").InputSignal<TableDataSource<Row>>;
|
|
2526
2479
|
readonly emptyMessage: import("@angular/core").InputSignal<string>;
|
|
@@ -2576,6 +2529,9 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2576
2529
|
private readonly load$;
|
|
2577
2530
|
private readonly destroyRef;
|
|
2578
2531
|
private readonly cdr;
|
|
2532
|
+
private readonly registry;
|
|
2533
|
+
private loadedQuery;
|
|
2534
|
+
private loadedFilters;
|
|
2579
2535
|
private resizeState;
|
|
2580
2536
|
private columnDragState;
|
|
2581
2537
|
private readonly filterDataSources;
|
|
@@ -2628,6 +2584,11 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2628
2584
|
"required": false;
|
|
2629
2585
|
"isSignal": true;
|
|
2630
2586
|
};
|
|
2587
|
+
"tableId": {
|
|
2588
|
+
"alias": "tableId";
|
|
2589
|
+
"required": false;
|
|
2590
|
+
"isSignal": true;
|
|
2591
|
+
};
|
|
2631
2592
|
"columns": {
|
|
2632
2593
|
"alias": "columns";
|
|
2633
2594
|
"required": true;
|
|
@@ -2720,6 +2681,18 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2720
2681
|
"rowsReordered": "rowsReordered";
|
|
2721
2682
|
}, never, never, true, never>;
|
|
2722
2683
|
}
|
|
2684
|
+
export interface UiLinkedTable {
|
|
2685
|
+
readonly query: WritableSignal<string>;
|
|
2686
|
+
readonly filters: WritableSignal<Record<string, unknown>>;
|
|
2687
|
+
}
|
|
2688
|
+
export declare class UiTableRegistry {
|
|
2689
|
+
private readonly tables;
|
|
2690
|
+
get(id: string): UiLinkedTable | null;
|
|
2691
|
+
register(id: string, table: UiLinkedTable): void;
|
|
2692
|
+
unregister(id: string, table: UiLinkedTable): void;
|
|
2693
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTableRegistry, never>;
|
|
2694
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2695
|
+
}
|
|
2723
2696
|
export declare class UiToastComponent {
|
|
2724
2697
|
readonly intent: import("@angular/core").InputSignal<"success" | "warning" | "danger" | "info">;
|
|
2725
2698
|
readonly classes: import("@angular/core").InputSignal<string>;
|
|
@@ -2926,11 +2899,6 @@ export declare class UiOverlayComponent implements UiOverlayStackEntry {
|
|
|
2926
2899
|
}
|
|
2927
2900
|
export declare class UiSidebarComponent {
|
|
2928
2901
|
readonly isOpen: import("@angular/core").ModelSignal<boolean>;
|
|
2929
|
-
/**
|
|
2930
|
-
* True while the sidebar is narrow, so content projected into the footer can
|
|
2931
|
-
* shrink to an icon or avatar. Read it with `#sidebar="uiSidebar"` or by
|
|
2932
|
-
* injecting UiSidebarComponent.
|
|
2933
|
-
*/
|
|
2934
2902
|
readonly isCollapsed: import("@angular/core").Signal<boolean>;
|
|
2935
2903
|
readonly toggle: () => void;
|
|
2936
2904
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiSidebarComponent, never>;
|
|
@@ -2944,11 +2912,6 @@ export declare class UiSidebarComponent {
|
|
|
2944
2912
|
"isOpen": "isOpenChange";
|
|
2945
2913
|
}, never, ["*", "[sidebar-footer]"], true, never>;
|
|
2946
2914
|
}
|
|
2947
|
-
/**
|
|
2948
|
-
* A labelled section of sidebar items. The label shows while the sidebar is
|
|
2949
|
-
* open and turns into a divider when it's collapsed, screen readers get the
|
|
2950
|
-
* name either way.
|
|
2951
|
-
*/
|
|
2952
2915
|
export declare class UiSidebarGroupComponent {
|
|
2953
2916
|
private readonly sidebar;
|
|
2954
2917
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
@@ -3428,6 +3391,61 @@ export declare class UiFileInputComponent {
|
|
|
3428
3391
|
"rejected": "rejected";
|
|
3429
3392
|
}, never, never, true, never>;
|
|
3430
3393
|
}
|
|
3394
|
+
export declare class UiSearchComponent {
|
|
3395
|
+
private readonly host;
|
|
3396
|
+
private readonly registry;
|
|
3397
|
+
readonly value: import("@angular/core").ModelSignal<string>;
|
|
3398
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
3399
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
3400
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3401
|
+
/** How long typing has to pause before `searched` fires, in milliseconds. */
|
|
3402
|
+
readonly debounce: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
3403
|
+
/** The `tableId` of a ui-table to search, it can render before or after this. */
|
|
3404
|
+
readonly table: import("@angular/core").InputSignal<string | null>;
|
|
3405
|
+
/** The value once typing pauses, for running a search. Clearing fires straight away. */
|
|
3406
|
+
readonly searched: import("@angular/core").OutputEmitterRef<string>;
|
|
3407
|
+
private readonly linked;
|
|
3408
|
+
private timer;
|
|
3409
|
+
constructor();
|
|
3410
|
+
protected onInput(value: string): void;
|
|
3411
|
+
protected clear(): void;
|
|
3412
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiSearchComponent, never>;
|
|
3413
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiSearchComponent, "ui-search", never, {
|
|
3414
|
+
"value": {
|
|
3415
|
+
"alias": "value";
|
|
3416
|
+
"required": false;
|
|
3417
|
+
"isSignal": true;
|
|
3418
|
+
};
|
|
3419
|
+
"placeholder": {
|
|
3420
|
+
"alias": "placeholder";
|
|
3421
|
+
"required": false;
|
|
3422
|
+
"isSignal": true;
|
|
3423
|
+
};
|
|
3424
|
+
"ariaLabel": {
|
|
3425
|
+
"alias": "ariaLabel";
|
|
3426
|
+
"required": false;
|
|
3427
|
+
"isSignal": true;
|
|
3428
|
+
};
|
|
3429
|
+
"disabled": {
|
|
3430
|
+
"alias": "disabled";
|
|
3431
|
+
"required": false;
|
|
3432
|
+
"isSignal": true;
|
|
3433
|
+
};
|
|
3434
|
+
"debounce": {
|
|
3435
|
+
"alias": "debounce";
|
|
3436
|
+
"required": false;
|
|
3437
|
+
"isSignal": true;
|
|
3438
|
+
};
|
|
3439
|
+
"table": {
|
|
3440
|
+
"alias": "table";
|
|
3441
|
+
"required": false;
|
|
3442
|
+
"isSignal": true;
|
|
3443
|
+
};
|
|
3444
|
+
}, {
|
|
3445
|
+
"value": "valueChange";
|
|
3446
|
+
"searched": "searched";
|
|
3447
|
+
}, never, never, true, never>;
|
|
3448
|
+
}
|
|
3431
3449
|
export declare class UiSwitchComponent {
|
|
3432
3450
|
readonly value: import("@angular/core").ModelSignal<boolean>;
|
|
3433
3451
|
readonly id: import("@angular/core").InputSignal<string>;
|
|
@@ -3459,6 +3477,104 @@ export declare class UiSwitchComponent {
|
|
|
3459
3477
|
"value": "valueChange";
|
|
3460
3478
|
}, never, ["*"], true, never>;
|
|
3461
3479
|
}
|
|
3480
|
+
export declare const TableFiltersBreakpoints: {
|
|
3481
|
+
readonly sm: "40rem";
|
|
3482
|
+
readonly md: "48rem";
|
|
3483
|
+
readonly lg: "64rem";
|
|
3484
|
+
readonly xl: "80rem";
|
|
3485
|
+
readonly '2xl': "96rem";
|
|
3486
|
+
};
|
|
3487
|
+
/** @see {@link TableFiltersBreakpoints} */
|
|
3488
|
+
export type TableFiltersBreakpoint = keyof typeof TableFiltersBreakpoints;
|
|
3489
|
+
export interface TableFacetOption {
|
|
3490
|
+
value: unknown;
|
|
3491
|
+
label: string;
|
|
3492
|
+
}
|
|
3493
|
+
/** Writes the picked value, or an array when `multiple`, under `id`. */
|
|
3494
|
+
export interface TableOptionsFacet {
|
|
3495
|
+
id: string;
|
|
3496
|
+
label: string;
|
|
3497
|
+
kind: 'options';
|
|
3498
|
+
options: TableFacetOption[];
|
|
3499
|
+
multiple?: boolean;
|
|
3500
|
+
}
|
|
3501
|
+
/** Writes `{ start, end }` ISO dates under `id`. */
|
|
3502
|
+
export interface TableDateRangeFacet {
|
|
3503
|
+
id: string;
|
|
3504
|
+
label: string;
|
|
3505
|
+
kind: 'dateRange';
|
|
3506
|
+
/** Quick picks, see date-range-presets.ts for ready made ones. */
|
|
3507
|
+
presets?: DateRangePreset[];
|
|
3508
|
+
placeholder?: string;
|
|
3509
|
+
min?: IsoDate | null;
|
|
3510
|
+
max?: IsoDate | null;
|
|
3511
|
+
}
|
|
3512
|
+
export type TableFacet = TableOptionsFacet | TableDateRangeFacet;
|
|
3513
|
+
export type TableFacetDateRange = DateRange;
|
|
3514
|
+
type Filters = Record<string, unknown>;
|
|
3515
|
+
type DateMode = 'any' | 'custom' | number;
|
|
3516
|
+
export declare class UiTableFiltersComponent {
|
|
3517
|
+
private readonly registry;
|
|
3518
|
+
readonly facets: import("@angular/core").InputSignal<TableFacet[]>;
|
|
3519
|
+
/** The `tableId` of a ui-table to filter, it can render before or after this. */
|
|
3520
|
+
readonly table: import("@angular/core").InputSignal<string | null>;
|
|
3521
|
+
readonly value: import("@angular/core").ModelSignal<Filters>;
|
|
3522
|
+
/** Below this breakpoint the panel becomes a Filters button and a drawer. */
|
|
3523
|
+
readonly collapseBelow: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xl" | "2xl">;
|
|
3524
|
+
protected readonly idPrefix: string;
|
|
3525
|
+
protected readonly anyDate: DateMode;
|
|
3526
|
+
protected readonly customDate: DateMode;
|
|
3527
|
+
private readonly customDates;
|
|
3528
|
+
private readonly linked;
|
|
3529
|
+
protected readonly appliedCount: import("@angular/core").Signal<number>;
|
|
3530
|
+
protected readonly anyApplied: import("@angular/core").Signal<boolean>;
|
|
3531
|
+
private readonly window;
|
|
3532
|
+
protected readonly wide: import("@angular/core").WritableSignal<boolean>;
|
|
3533
|
+
constructor();
|
|
3534
|
+
protected groupName(facet: TableFacet): string;
|
|
3535
|
+
protected choiceId(facet: TableFacet, choice: number | string): string;
|
|
3536
|
+
protected picked(facet: TableOptionsFacet): unknown;
|
|
3537
|
+
protected pick(facet: TableOptionsFacet, value: unknown): void;
|
|
3538
|
+
protected isChecked(facet: TableOptionsFacet, option: TableFacetOption): boolean;
|
|
3539
|
+
protected check(facet: TableOptionsFacet, option: TableFacetOption, checked: boolean): void;
|
|
3540
|
+
protected range(facet: TableDateRangeFacet): DateRange;
|
|
3541
|
+
protected dateMode(facet: TableDateRangeFacet): DateMode;
|
|
3542
|
+
protected pickDate(facet: TableDateRangeFacet, mode: DateMode): void;
|
|
3543
|
+
protected setRange(facet: TableDateRangeFacet, range: DateRange): void;
|
|
3544
|
+
protected clearAll(): void;
|
|
3545
|
+
private setCustom;
|
|
3546
|
+
private apply;
|
|
3547
|
+
private write;
|
|
3548
|
+
private currentFilters;
|
|
3549
|
+
private ownFilters;
|
|
3550
|
+
private withoutOwn;
|
|
3551
|
+
private hasAny;
|
|
3552
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTableFiltersComponent, never>;
|
|
3553
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiTableFiltersComponent, "ui-table-filters", never, {
|
|
3554
|
+
"facets": {
|
|
3555
|
+
"alias": "facets";
|
|
3556
|
+
"required": true;
|
|
3557
|
+
"isSignal": true;
|
|
3558
|
+
};
|
|
3559
|
+
"table": {
|
|
3560
|
+
"alias": "table";
|
|
3561
|
+
"required": false;
|
|
3562
|
+
"isSignal": true;
|
|
3563
|
+
};
|
|
3564
|
+
"value": {
|
|
3565
|
+
"alias": "value";
|
|
3566
|
+
"required": false;
|
|
3567
|
+
"isSignal": true;
|
|
3568
|
+
};
|
|
3569
|
+
"collapseBelow": {
|
|
3570
|
+
"alias": "collapseBelow";
|
|
3571
|
+
"required": false;
|
|
3572
|
+
"isSignal": true;
|
|
3573
|
+
};
|
|
3574
|
+
}, {
|
|
3575
|
+
"value": "valueChange";
|
|
3576
|
+
}, never, never, true, never>;
|
|
3577
|
+
}
|
|
3462
3578
|
export declare class UiTimeSelectComponent {
|
|
3463
3579
|
/** 24 hour "HH:mm" string. */
|
|
3464
3580
|
readonly value: import("@angular/core").ModelSignal<string>;
|
|
@@ -3492,22 +3608,14 @@ export declare class UiTimeSelectComponent {
|
|
|
3492
3608
|
"value": "valueChange";
|
|
3493
3609
|
}, never, never, true, never>;
|
|
3494
3610
|
}
|
|
3495
|
-
/**
|
|
3496
|
-
* The signed in person and their options, e.g. Settings and Log out, with a
|
|
3497
|
-
* theme switch. Goes inside a dropdown's `uiDropdownContent`, the same as
|
|
3498
|
-
* `ui-dropdown-menu`. Give that dropdown `closeBehaviour="whenClickOutside"`
|
|
3499
|
-
* so picking a theme doesn't close it, picking an item still does.
|
|
3500
|
-
*/
|
|
3611
|
+
/** Give the dropdown it sits in `closeBehaviour="whenClickOutside"`. */
|
|
3501
3612
|
export declare class UiUserMenuComponent {
|
|
3502
3613
|
private readonly dropdown;
|
|
3503
3614
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
3504
3615
|
/** A second line under the name, e.g. an email address. */
|
|
3505
3616
|
readonly detail: import("@angular/core").InputSignal<string>;
|
|
3506
3617
|
readonly src: import("@angular/core").InputSignal<string | null>;
|
|
3507
|
-
/** The same items as `ui-dropdown-menu`, buttons, labelled groups and dividers. */
|
|
3508
3618
|
readonly items: import("@angular/core").InputSignal<DropdownMenuItem[]>;
|
|
3509
|
-
/** Shows the System, Light and Dark switch, which needs `provideUiTheme()`. */
|
|
3510
|
-
readonly themeSwitch: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3511
3619
|
protected readonly menuItems: import("@angular/core").Signal<DropdownMenuItem[]>;
|
|
3512
3620
|
protected isDivider(item: DropdownMenuItem): boolean;
|
|
3513
3621
|
protected group(item: DropdownMenuItem): DropdownMenuCategory | null;
|
|
@@ -3535,26 +3643,16 @@ export declare class UiUserMenuComponent {
|
|
|
3535
3643
|
"required": false;
|
|
3536
3644
|
"isSignal": true;
|
|
3537
3645
|
};
|
|
3538
|
-
|
|
3539
|
-
"alias": "themeSwitch";
|
|
3540
|
-
"required": false;
|
|
3541
|
-
"isSignal": true;
|
|
3542
|
-
};
|
|
3543
|
-
}, {}, never, never, true, never>;
|
|
3646
|
+
}, {}, never, ["*"], true, never>;
|
|
3544
3647
|
}
|
|
3545
3648
|
/** What the user picked, `system` follows the OS setting. */
|
|
3546
3649
|
export type UiThemePreference = 'system' | 'light' | 'dark';
|
|
3547
3650
|
export interface UiThemeConfig {
|
|
3548
|
-
/** localStorage key the preference is kept under. */
|
|
3549
3651
|
storageKey: string;
|
|
3550
3652
|
}
|
|
3551
3653
|
export declare const UI_THEME_CONFIG: InjectionToken<UiThemeConfig>;
|
|
3552
3654
|
/**
|
|
3553
|
-
*
|
|
3554
|
-
* library's tokens key off. Add it with `provideUiTheme()`.
|
|
3555
|
-
*
|
|
3556
|
-
* To stop the page flashing the wrong theme before the app boots, apply the
|
|
3557
|
-
* stored class early with a small inline script in `index.html`'s `<head>`:
|
|
3655
|
+
* Add this to `index.html`'s `<head>` so the stored theme applies before boot:
|
|
3558
3656
|
*
|
|
3559
3657
|
* ```html
|
|
3560
3658
|
* <script>
|
|
@@ -3573,24 +3671,16 @@ export declare class UiThemeService {
|
|
|
3573
3671
|
private readonly media;
|
|
3574
3672
|
readonly preference: import("@angular/core").WritableSignal<UiThemePreference>;
|
|
3575
3673
|
private readonly systemDark;
|
|
3576
|
-
/** Whether dark is showing now, resolved from the preference and the OS setting. */
|
|
3577
3674
|
readonly isDark: import("@angular/core").Signal<boolean>;
|
|
3578
3675
|
constructor();
|
|
3579
3676
|
private stored;
|
|
3580
3677
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiThemeService, never>;
|
|
3581
3678
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
3582
3679
|
}
|
|
3583
|
-
/** Starts theme switching at boot. Read or change it through `UiThemeService`. */
|
|
3584
3680
|
export declare function provideUiTheme(config?: Partial<UiThemeConfig>): EnvironmentProviders;
|
|
3585
|
-
/**
|
|
3586
|
-
* Picks System, Light or Dark through UiThemeService, so the choice is stored
|
|
3587
|
-
* and applied straight away. Add `provideUiTheme()` so the stored choice is
|
|
3588
|
-
* applied at boot, not only once this has rendered.
|
|
3589
|
-
*/
|
|
3590
3681
|
export declare class UiThemeSwitchComponent {
|
|
3591
3682
|
protected readonly theme: UiThemeService;
|
|
3592
3683
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
3593
|
-
/** Stretches to the container's width, see `ui-segmented`. */
|
|
3594
3684
|
readonly fill: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3595
3685
|
protected readonly options: SegmentedOption<UiThemePreference>[];
|
|
3596
3686
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiThemeSwitchComponent, never>;
|