@zambon-dev/ui 1.4.1 → 1.6.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/CHANGELOG.md +74 -15
- package/LICENSE +21 -0
- package/README.md +55 -54
- package/fesm2022/zambon-dev-ui-framework.mjs +751 -13
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +2188 -57
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +446 -446
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -1
- package/i18n/framework/en.json +14 -1
- package/i18n/framework/pt.json +14 -1
- package/i18n/shared/top-bar/en.json +4 -0
- package/i18n/shared/top-bar/pt.json +4 -0
- package/package.json +14 -9
- package/styles/theme.css +15 -6
- package/styles/variables.scss +3 -3
- package/types/zambon-dev-ui-framework.d.ts +703 -27
- package/types/zambon-dev-ui-library.d.ts +1058 -3
- package/types/zambon-dev-ui-shared.d.ts +180 -10
- package/types/zambon-dev-ui-testing.d.ts +1 -0
|
@@ -1,9 +1,48 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { AfterViewInit, EventEmitter, InjectionToken, InputSignal, ModelSignal, OnDestroy, OnInit, OutputEmitterRef, PipeTransform, QueryList, Signal, TemplateRef, WritableSignal } from "@angular/core";
|
|
3
3
|
import { Observable, Subject } from "rxjs";
|
|
4
|
-
import { AbstractControl, FormControl, FormGroup, FormGroupDirective, FormGroupName, ValidationErrors, ValidatorFn } from "@angular/forms";
|
|
4
|
+
import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, FormGroupDirective, FormGroupName, ValidationErrors, Validator, ValidatorFn } from "@angular/forms";
|
|
5
5
|
import { HttpErrorResponse, HttpResponse } from "@angular/common/http";
|
|
6
6
|
import { ActivatedRoute, ActivatedRouteSnapshot } from "@angular/router";
|
|
7
|
+
/** What the status means, which decides the badge colour. */
|
|
8
|
+
export type BadgeIntent = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
|
|
9
|
+
/**
|
|
10
|
+
* A small coloured label for a status, such as "Active" or "Pending", in a grid cell or a details
|
|
11
|
+
* view. The text is the projected content.
|
|
12
|
+
*
|
|
13
|
+
* The badge is not interactive. Its text carries the meaning; the colour, icon and dot only
|
|
14
|
+
* support it, so a colour-blind reader loses nothing.
|
|
15
|
+
*/
|
|
16
|
+
export declare class BadgeComponent {
|
|
17
|
+
/** What the status means. Governs the fill and text colour. Defaults to `neutral`. */
|
|
18
|
+
readonly intent: InputSignal<BadgeIntent>;
|
|
19
|
+
/** Font Awesome classes for a leading icon, e.g. `fa-solid fa-check`. The icon is hidden from screen readers. */
|
|
20
|
+
readonly icon: InputSignal<string | undefined>;
|
|
21
|
+
/** Shows a small dot in the intent colour before the text. Defaults to `false`. */
|
|
22
|
+
readonly dot: InputSignal<boolean>;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "lib-badge", never, {
|
|
25
|
+
"intent": {
|
|
26
|
+
"alias": "intent";
|
|
27
|
+
"required": false;
|
|
28
|
+
"isSignal": true;
|
|
29
|
+
};
|
|
30
|
+
"icon": {
|
|
31
|
+
"alias": "icon";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
"dot": {
|
|
36
|
+
"alias": "dot";
|
|
37
|
+
"required": false;
|
|
38
|
+
"isSignal": true;
|
|
39
|
+
};
|
|
40
|
+
}, {}, never, ["*"], true, never>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Abstract base for the library's components. Gives subclasses a `destroy$` subject that emits
|
|
44
|
+
* and completes when the component is destroyed, for ending subscriptions with `takeUntil`.
|
|
45
|
+
*/
|
|
7
46
|
export declare abstract class BaseComponent implements OnDestroy {
|
|
8
47
|
protected destroy$: Subject<boolean>;
|
|
9
48
|
ngOnDestroy(): void;
|
|
@@ -34,6 +73,7 @@ export declare class ButtonComponent {
|
|
|
34
73
|
readonly intent: InputSignal<ButtonIntent>;
|
|
35
74
|
/** Native button type. `submit` works because the rendered button is inside the host's form. */
|
|
36
75
|
readonly type: InputSignal<'button' | 'submit' | 'reset'>;
|
|
76
|
+
/** Disables the native button, so it cannot be clicked or focused. Defaults to `false`. */
|
|
37
77
|
readonly disabled: InputSignal<boolean>;
|
|
38
78
|
/** Shows a spinner, announces `aria-busy` and blocks activation -- by the keyboard too. */
|
|
39
79
|
readonly loading: InputSignal<boolean>;
|
|
@@ -91,6 +131,105 @@ export declare class ButtonComponent {
|
|
|
91
131
|
};
|
|
92
132
|
}, {}, never, ["*"], true, never>;
|
|
93
133
|
}
|
|
134
|
+
/** One day cell of the month grid. */
|
|
135
|
+
interface CalendarDay {
|
|
136
|
+
date: Date;
|
|
137
|
+
key: string;
|
|
138
|
+
label: string;
|
|
139
|
+
fullLabel: string;
|
|
140
|
+
isOutsideMonth: boolean;
|
|
141
|
+
isToday: boolean;
|
|
142
|
+
isSelected: boolean;
|
|
143
|
+
isActive: boolean;
|
|
144
|
+
isDisabled: boolean;
|
|
145
|
+
}
|
|
146
|
+
/** One weekday column heading. */
|
|
147
|
+
interface CalendarWeekday {
|
|
148
|
+
short: string;
|
|
149
|
+
long: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A month calendar for picking a day.
|
|
153
|
+
*
|
|
154
|
+
* Month names, weekday names, the first day of the week and every label come from `Intl` in the
|
|
155
|
+
* application's language (see `LocaleService`), so the calendar needs no translation keys.
|
|
156
|
+
*
|
|
157
|
+
* `lib-date-input` opens it in a popup. It can also sit inline on a page.
|
|
158
|
+
*
|
|
159
|
+
* Keyboard: the arrow keys move by day and week, Home and End go to the start and end of the week,
|
|
160
|
+
* Page Up and Page Down change the month (with Shift, the year), Enter or Space picks the day, and
|
|
161
|
+
* Escape emits `cancelled`.
|
|
162
|
+
*/
|
|
163
|
+
export declare class CalendarComponent {
|
|
164
|
+
/** The chosen day: a `Date` or a `yyyy-MM-dd` string. Defaults to none. */
|
|
165
|
+
readonly selected: InputSignal<Date | string | null | undefined>;
|
|
166
|
+
/** Earliest day that can be picked: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
|
|
167
|
+
readonly min: InputSignal<Date | string | null | undefined>;
|
|
168
|
+
/** Latest day that can be picked: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
|
|
169
|
+
readonly max: InputSignal<Date | string | null | undefined>;
|
|
170
|
+
/** Locale to show the calendar in. Defaults to the application's language. */
|
|
171
|
+
readonly locale: InputSignal<string | undefined>;
|
|
172
|
+
/** Emits the day the user picked, at midnight local time. */
|
|
173
|
+
readonly dateSelected: OutputEmitterRef<Date>;
|
|
174
|
+
/** Emits when the user presses Escape. */
|
|
175
|
+
readonly cancelled: OutputEmitterRef<void>;
|
|
176
|
+
private readonly injector;
|
|
177
|
+
private readonly localeService;
|
|
178
|
+
private readonly grid;
|
|
179
|
+
protected readonly currentLocale: Signal<string>;
|
|
180
|
+
protected readonly selectedDate: Signal<Date | null>;
|
|
181
|
+
protected readonly minDate: Signal<Date | null>;
|
|
182
|
+
protected readonly maxDate: Signal<Date | null>;
|
|
183
|
+
/** The day that holds keyboard focus. Starts at the chosen day, else today, kept within the limits. */
|
|
184
|
+
protected readonly activeDate: WritableSignal<Date>;
|
|
185
|
+
protected readonly monthLabel: Signal<string>;
|
|
186
|
+
protected readonly previousMonthLabel: Signal<string>;
|
|
187
|
+
protected readonly nextMonthLabel: Signal<string>;
|
|
188
|
+
protected readonly todayLabel: Signal<string>;
|
|
189
|
+
protected readonly isTodayDisabled: Signal<boolean>;
|
|
190
|
+
protected readonly isPreviousDisabled: Signal<boolean>;
|
|
191
|
+
protected readonly isNextDisabled: Signal<boolean>;
|
|
192
|
+
protected readonly weekdays: Signal<CalendarWeekday[]>;
|
|
193
|
+
protected readonly weeks: Signal<CalendarDay[][]>;
|
|
194
|
+
protected onDayClick(day: CalendarDay): void;
|
|
195
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
196
|
+
protected onPreviousMonth(): void;
|
|
197
|
+
protected onNextMonth(): void;
|
|
198
|
+
protected onToday(): void;
|
|
199
|
+
protected onEscape(event: Event): void;
|
|
200
|
+
/** Moves keyboard focus to the active day, after the next render. */
|
|
201
|
+
focusActiveDay(): void;
|
|
202
|
+
private monthStart;
|
|
203
|
+
private clamp;
|
|
204
|
+
private isDisabled;
|
|
205
|
+
private monthName;
|
|
206
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
207
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "lib-calendar", never, {
|
|
208
|
+
"selected": {
|
|
209
|
+
"alias": "selected";
|
|
210
|
+
"required": false;
|
|
211
|
+
"isSignal": true;
|
|
212
|
+
};
|
|
213
|
+
"min": {
|
|
214
|
+
"alias": "min";
|
|
215
|
+
"required": false;
|
|
216
|
+
"isSignal": true;
|
|
217
|
+
};
|
|
218
|
+
"max": {
|
|
219
|
+
"alias": "max";
|
|
220
|
+
"required": false;
|
|
221
|
+
"isSignal": true;
|
|
222
|
+
};
|
|
223
|
+
"locale": {
|
|
224
|
+
"alias": "locale";
|
|
225
|
+
"required": false;
|
|
226
|
+
"isSignal": true;
|
|
227
|
+
};
|
|
228
|
+
}, {
|
|
229
|
+
"dateSelected": "dateSelected";
|
|
230
|
+
"cancelled": "cancelled";
|
|
231
|
+
}, never, never, true, never>;
|
|
232
|
+
}
|
|
94
233
|
export interface IBatchUpdate<TEntity, TKey> {
|
|
95
234
|
entitiesToDelete: Array<TKey>;
|
|
96
235
|
entitiesToInsertOrUpdate: Array<TEntity>;
|
|
@@ -127,6 +266,12 @@ export type DataGridConfigs = GridConfigs & {
|
|
|
127
266
|
hideBorders?: boolean;
|
|
128
267
|
hideColumnHeaders?: boolean;
|
|
129
268
|
multiSelect?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Track size of the selection column. Defaults to `min-content`, the checkbox plus the row's
|
|
271
|
+
* padding. A range such as `minmax(1.5rem, min-content)` only reaches its upper bound when the
|
|
272
|
+
* grid has width to spare; in a narrow grid it stays at the minimum, and the row's padding then
|
|
273
|
+
* leaves the checkbox no room at all.
|
|
274
|
+
*/
|
|
130
275
|
multiSelectSize?: string;
|
|
131
276
|
selectOnClick?: boolean;
|
|
132
277
|
showMessageOnEmpty?: boolean;
|
|
@@ -299,26 +444,63 @@ export interface ITabView {
|
|
|
299
444
|
declare namespace catalog_select_component_d_exports {
|
|
300
445
|
export { CatalogSelectComponent };
|
|
301
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* A labelled field that picks one entry from a catalog. It works in one of two modes:
|
|
449
|
+
*
|
|
450
|
+
* - **Fixed list.** Pass the entries in `entriesList`, such as the members of an enum or
|
|
451
|
+
* Yes/No/Maybe. No backend call is made. For a short list, set `searchable` to `false` and the
|
|
452
|
+
* field becomes a plain picker.
|
|
453
|
+
* - **Search endpoint.** Set `searchEndpoint`, and the entries are searched on your API as the
|
|
454
|
+
* user types.
|
|
455
|
+
*
|
|
456
|
+
* Either way it writes the chosen value to `controlName` and its text to `displayControlName` in
|
|
457
|
+
* the surrounding form group.
|
|
458
|
+
*/
|
|
302
459
|
export declare class CatalogSelectComponent extends BaseComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
303
460
|
protected bodyMouseDown(event: MouseEvent): void;
|
|
304
461
|
protected bodyMouseUp(event: MouseEvent): void;
|
|
305
462
|
private readonly dropdownTemplate;
|
|
306
463
|
private readonly inputElement;
|
|
464
|
+
/** Passed to the inner `lib-form-input`, which does not apply it yet. Defaults to `false`. */
|
|
307
465
|
readonly autofocus: InputSignal<boolean>;
|
|
466
|
+
/** Control in the surrounding form group that receives the chosen entry's value. Required. */
|
|
308
467
|
readonly controlName: InputSignal<string>;
|
|
468
|
+
/** Control in the surrounding form group that receives the chosen entry's text, which the input shows. Required. */
|
|
309
469
|
readonly displayControlName: InputSignal<string>;
|
|
470
|
+
/** Property of each `entriesList` item that holds its text. Defaults to `display`. */
|
|
310
471
|
readonly displayProperty: InputSignal<string>;
|
|
472
|
+
/**
|
|
473
|
+
* The entries of the fixed-list mode, used when there is no `searchEndpoint`. No backend call is
|
|
474
|
+
* made for them. Each item's text and value
|
|
475
|
+
* are read from `displayProperty` and `valueProperty`; the text may be an observable, such as
|
|
476
|
+
* a translation. Setting a new list refreshes the dropdown.
|
|
477
|
+
*/
|
|
311
478
|
set entriesList(value: any[] | {
|
|
312
479
|
key: number;
|
|
313
480
|
value: Observable<any> | string;
|
|
314
481
|
}[] | null | undefined);
|
|
482
|
+
/**
|
|
483
|
+
* Extra filters sent to `searchEndpoint` with every search. A changed filter set runs the search
|
|
484
|
+
* again. Defaults to none.
|
|
485
|
+
*/
|
|
315
486
|
set filters(value: {
|
|
316
487
|
[id: string]: any;
|
|
317
488
|
});
|
|
489
|
+
/** Text of the label, as a translation key. Defaults to empty. */
|
|
318
490
|
readonly label: InputSignal<string>;
|
|
491
|
+
/** Maximum number of entries requested from `searchEndpoint`. Defaults to `100`. */
|
|
319
492
|
readonly maxEntries: InputSignal<number>;
|
|
493
|
+
/**
|
|
494
|
+
* Characters the user must type before a search runs, when the endpoint asks for search
|
|
495
|
+
* criteria. Defaults to `3`.
|
|
496
|
+
*/
|
|
320
497
|
readonly minimumLengthSearch: InputSignal<number>;
|
|
498
|
+
/** Hint shown in small italics under the field, as a translation key. Defaults to empty. */
|
|
321
499
|
readonly notes: InputSignal<string>;
|
|
500
|
+
/**
|
|
501
|
+
* Blocks typing, hides the clear button and stops the dropdown opening on focus; a click still
|
|
502
|
+
* opens it. Defaults to `false`.
|
|
503
|
+
*/
|
|
322
504
|
readonly readOnly: InputSignal<boolean>;
|
|
323
505
|
/**
|
|
324
506
|
* Whether the field accepts typing to narrow the list.
|
|
@@ -333,10 +515,17 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
|
|
|
333
515
|
* until it is given criteria, and there would be no way left to type any.
|
|
334
516
|
*/
|
|
335
517
|
readonly searchable: InputSignal<boolean>;
|
|
518
|
+
/**
|
|
519
|
+
* URL of the search-endpoint mode. The entries are searched there with a POST of
|
|
520
|
+
* `{ maxResults, criteria, filters }`. When empty, the field uses the fixed `entriesList` and
|
|
521
|
+
* calls no backend. Changing it starts the search over.
|
|
522
|
+
*/
|
|
336
523
|
set searchEndpoint(value: string | undefined);
|
|
524
|
+
/** Messages per validation error key of `controlName`, as translation keys. Defaults to none. */
|
|
337
525
|
readonly validations: InputSignal<{
|
|
338
526
|
[id: string]: string;
|
|
339
527
|
}>;
|
|
528
|
+
/** Property of each `entriesList` item that holds its value. Defaults to `value`. */
|
|
340
529
|
readonly valueProperty: InputSignal<string>;
|
|
341
530
|
protected readonly displayedEntries: WritableSignal<ICatalogEntry[]>;
|
|
342
531
|
protected readonly focusedIndex: WritableSignal<number>;
|
|
@@ -369,13 +558,16 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
|
|
|
369
558
|
private searchSubject;
|
|
370
559
|
private viewContainerRef;
|
|
371
560
|
private wasClickedOutside;
|
|
561
|
+
/** The static entries to choose from. */
|
|
372
562
|
get entriesList(): any[] | {
|
|
373
563
|
key: number;
|
|
374
564
|
value: Observable<any> | string;
|
|
375
565
|
}[] | null | undefined;
|
|
566
|
+
/** The filters sent to `searchEndpoint`. */
|
|
376
567
|
get filters(): {
|
|
377
568
|
[id: string]: any;
|
|
378
569
|
} | undefined;
|
|
570
|
+
/** The URL the entries are searched from. */
|
|
379
571
|
get searchEndpoint(): string | undefined;
|
|
380
572
|
protected get activeDescendantId(): string | null;
|
|
381
573
|
protected get displayControl(): FormControl;
|
|
@@ -523,6 +715,10 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
|
|
|
523
715
|
};
|
|
524
716
|
}, {}, never, never, true, never>;
|
|
525
717
|
}
|
|
718
|
+
/**
|
|
719
|
+
* Searches a catalog endpoint for `lib-catalog-select`. Sends a POST of
|
|
720
|
+
* `{ maxResults, criteria, filters }` and returns the matching entries.
|
|
721
|
+
*/
|
|
526
722
|
export declare class CatalogService {
|
|
527
723
|
private http;
|
|
528
724
|
search(endpoint: string, maxResults: number, criteria?: string, filters?: {
|
|
@@ -531,6 +727,11 @@ export declare class CatalogService {
|
|
|
531
727
|
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService, never>;
|
|
532
728
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
533
729
|
}
|
|
730
|
+
/**
|
|
731
|
+
* Base for a service that loads, caches and saves one entity for a details view. It reads the
|
|
732
|
+
* record id from the route's `id` parameter; extend it and implement `loadModel`, `saveModel`
|
|
733
|
+
* and `getTitle`.
|
|
734
|
+
*/
|
|
534
735
|
export declare abstract class DataProviderService<TEntityModel> implements OnDestroy {
|
|
535
736
|
protected activatedRoute: ActivatedRoute;
|
|
536
737
|
protected destroy$: Subject<boolean>;
|
|
@@ -725,10 +926,16 @@ export declare abstract class MultiSelectResultDataset extends GridDataset {
|
|
|
725
926
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectResultDataset, never>;
|
|
726
927
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
727
928
|
}
|
|
929
|
+
/** An empty service with no members. Nothing in the package uses it. */
|
|
728
930
|
export declare class FormGroupService {
|
|
729
931
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupService, never>;
|
|
730
932
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
731
933
|
}
|
|
934
|
+
/**
|
|
935
|
+
* Holds the state of one form view: the form group, the loaded model, view or edit mode and the
|
|
936
|
+
* loading flag. Provide it on the view; the library's form fields read it to decide whether to
|
|
937
|
+
* show inputs or read-only values.
|
|
938
|
+
*/
|
|
732
939
|
export declare class FormService {
|
|
733
940
|
fieldRefreshed: EventEmitter<{
|
|
734
941
|
fieldName: string;
|
|
@@ -765,6 +972,36 @@ export declare class FormService {
|
|
|
765
972
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
766
973
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
767
974
|
}
|
|
975
|
+
/**
|
|
976
|
+
* The locale of the language the application shows, as a signal.
|
|
977
|
+
*
|
|
978
|
+
* Angular's `LOCALE_ID` is fixed when the application starts, but the language can change at run
|
|
979
|
+
* time through ngx-translate. Date and number fields read this service instead, so they follow the
|
|
980
|
+
* language the user picked rather than the browser's or the start-up one.
|
|
981
|
+
*
|
|
982
|
+
* The locale comes from, in order:
|
|
983
|
+
*
|
|
984
|
+
* 1. The `locale` translation key of the current language (the framework files ship `en-US` and
|
|
985
|
+
* `pt-BR`).
|
|
986
|
+
* 2. The current ngx-translate language code, when it is a valid locale tag.
|
|
987
|
+
* 3. Angular's `LOCALE_ID`.
|
|
988
|
+
*/
|
|
989
|
+
export declare class LocaleService {
|
|
990
|
+
private readonly fallbackLocale;
|
|
991
|
+
private readonly translate;
|
|
992
|
+
/** Bumped whenever the language or its translations change, so `locale` reads them again. */
|
|
993
|
+
private readonly languageChanged;
|
|
994
|
+
/** The current locale tag, such as `pt-BR`. Updates when the application language changes. */
|
|
995
|
+
readonly locale: Signal<string>;
|
|
996
|
+
constructor();
|
|
997
|
+
private resolveLocale;
|
|
998
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService, never>;
|
|
999
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Loads and tracks the menus of `lib-sidebar`: the tree, the selected item and the collapsed and
|
|
1003
|
+
* open states. Extend it and implement `loadMenus`, `getMenuFromUrl` and `getUserProfile`.
|
|
1004
|
+
*/
|
|
768
1005
|
export declare abstract class SidebarService {
|
|
769
1006
|
childrenFailed: EventEmitter<SidebarMenu>;
|
|
770
1007
|
childrenLoaded: EventEmitter<SidebarMenu>;
|
|
@@ -807,11 +1044,25 @@ export declare abstract class SidebarService {
|
|
|
807
1044
|
declare namespace data_grid_component_d_exports {
|
|
808
1045
|
export { DataGridComponent };
|
|
809
1046
|
}
|
|
1047
|
+
/**
|
|
1048
|
+
* A virtual-scrolling grid driven by the `DataGridDataset` provided around it. The dataset holds
|
|
1049
|
+
* the columns, rows, paging and selection; the grid renders them, loads the next page as the user
|
|
1050
|
+
* scrolls, and shows loading, empty and error messages.
|
|
1051
|
+
*/
|
|
810
1052
|
export declare class DataGridComponent extends BaseComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
811
1053
|
private readonly bodyElement;
|
|
812
1054
|
private readonly viewport;
|
|
1055
|
+
/** Disables the rows, so they cannot be focused or selected. Defaults to `false`. */
|
|
813
1056
|
readonly disabled: InputSignal<boolean>;
|
|
1057
|
+
/**
|
|
1058
|
+
* When `true`, the grid does not load rows on init and shows a prompt until something else
|
|
1059
|
+
* loads the dataset, such as a search. Defaults to `false`.
|
|
1060
|
+
*/
|
|
814
1061
|
readonly lazyLoadRows: InputSignal<boolean>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Shows a bar above the header for content projected with the `buttons` attribute, and drops
|
|
1064
|
+
* the grid's borders. Defaults to `false`.
|
|
1065
|
+
*/
|
|
815
1066
|
readonly showButtons: InputSignal<boolean>;
|
|
816
1067
|
protected dataGridDataset: DataGridDataset;
|
|
817
1068
|
protected readonly hasFailed: WritableSignal<boolean>;
|
|
@@ -883,9 +1134,16 @@ export declare class DataGridComponent extends BaseComponent implements OnInit,
|
|
|
883
1134
|
declare namespace data_grid_row_component_d_exports {
|
|
884
1135
|
export { DataGridRowComponent };
|
|
885
1136
|
}
|
|
1137
|
+
/**
|
|
1138
|
+
* One row of `lib-data-grid`. Renders a cell per dataset column, using the column's template when
|
|
1139
|
+
* it has one, plus a selection checkbox when the grid allows multiple selection.
|
|
1140
|
+
*/
|
|
886
1141
|
export declare class DataGridRowComponent extends BaseComponent implements OnInit {
|
|
1142
|
+
/** Disables the row, so clicking it neither focuses nor selects it. Defaults to `false`. */
|
|
887
1143
|
disabled: boolean;
|
|
1144
|
+
/** Marks the first rendered row, which measures the column widths for the header. Defaults to `false`. */
|
|
888
1145
|
isFirstRow: boolean;
|
|
1146
|
+
/** The record this row shows. Setting it refreshes the row's selected state. */
|
|
889
1147
|
set rowData(value: any);
|
|
890
1148
|
/**
|
|
891
1149
|
* The row's index in the data, which is what the zebra stripe follows. Its position among the
|
|
@@ -893,12 +1151,18 @@ export declare class DataGridRowComponent extends BaseComponent implements OnIni
|
|
|
893
1151
|
* the DOM swapped on every row whenever that window moved by an odd number of rows.
|
|
894
1152
|
*/
|
|
895
1153
|
readonly rowIndex: InputSignal<number>;
|
|
1154
|
+
/** Emits the width in pixels of the selection checkbox cell whenever it changes. */
|
|
896
1155
|
selectionResized: EventEmitter<number>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Makes this row the dataset's focused row. In a multi-select grid that selects on click, it
|
|
1158
|
+
* also syncs the checkbox. Runs on a click on the row; does nothing while disabled.
|
|
1159
|
+
*/
|
|
897
1160
|
setFocus(): void;
|
|
898
1161
|
protected dataGridDataset: DataGridDataset;
|
|
899
1162
|
protected readonly selected: WritableSignal<boolean>;
|
|
900
1163
|
private _rowData;
|
|
901
1164
|
private elementRef;
|
|
1165
|
+
/** The record this row shows. */
|
|
902
1166
|
get rowData(): any;
|
|
903
1167
|
protected get columns(): IGridColumn[];
|
|
904
1168
|
private get isLaidOut();
|
|
@@ -934,33 +1198,213 @@ export declare class DataGridRowComponent extends BaseComponent implements OnIni
|
|
|
934
1198
|
"selectionResized": "selectionResized";
|
|
935
1199
|
}, never, never, true, never>;
|
|
936
1200
|
}
|
|
1201
|
+
/** What a `lib-date-input` holds: a day, or a day and a time. */
|
|
1202
|
+
type DateInputMode = 'date' | 'datetime';
|
|
1203
|
+
/**
|
|
1204
|
+
* A date field, or a date and time field, that follows the application's language.
|
|
1205
|
+
*
|
|
1206
|
+
* The native `<input type="date">` shows dates in the operating system's format, whatever language
|
|
1207
|
+
* the application is in. This field shows and reads dates in the language the application chose
|
|
1208
|
+
* (see `LocaleService`): `05/12/2026` in Portuguese, `12/05/2026` in English. The user can type the
|
|
1209
|
+
* date or pick it from a calendar (the calendar button, or Alt+Down in the field).
|
|
1210
|
+
*
|
|
1211
|
+
* It is a form control. The value has the same shape the native inputs give, so it can replace them
|
|
1212
|
+
* without changing what the form holds:
|
|
1213
|
+
*
|
|
1214
|
+
* - `date` mode: a `yyyy-MM-dd` string, such as `2026-12-05`.
|
|
1215
|
+
* - `datetime` mode: a local `yyyy-MM-ddTHH:mm` string, such as `2026-12-05T14:30`.
|
|
1216
|
+
* - `null` when the field is empty or the text is not a valid date.
|
|
1217
|
+
*
|
|
1218
|
+
* It also accepts a `Date` as the value. It adds these validation errors: `dateInvalid` when the
|
|
1219
|
+
* text is not a date, `dateMin` and `dateMax` when the date is outside `min` and `max`.
|
|
1220
|
+
*/
|
|
1221
|
+
export declare class DateInputComponent implements ControlValueAccessor, Validator, OnDestroy {
|
|
1222
|
+
/** Whether the field holds a day (`date`) or a day and a time (`datetime`). Defaults to `date`. */
|
|
1223
|
+
readonly mode: InputSignal<DateInputMode>;
|
|
1224
|
+
/** Earliest allowed day: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
|
|
1225
|
+
readonly min: InputSignal<Date | string | null | undefined>;
|
|
1226
|
+
/** Latest allowed day: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
|
|
1227
|
+
readonly max: InputSignal<Date | string | null | undefined>;
|
|
1228
|
+
/** Lets the user see and focus the value but not change it. Defaults to `false`. */
|
|
1229
|
+
readonly readOnly: InputSignal<boolean>;
|
|
1230
|
+
/** Shows the field as invalid, for example when the form was touched. Defaults to `false`. */
|
|
1231
|
+
readonly invalid: InputSignal<boolean>;
|
|
1232
|
+
/** Accessible name of the date text field, when no visible label names it. Defaults to none. */
|
|
1233
|
+
readonly ariaLabel: InputSignal<string | undefined>;
|
|
1234
|
+
/** Emits when a text field of the input loses focus. */
|
|
1235
|
+
readonly blurred: OutputEmitterRef<void>;
|
|
1236
|
+
/** Emits when a text field of the input gains focus. */
|
|
1237
|
+
readonly focused: OutputEmitterRef<void>;
|
|
1238
|
+
/** Emits on every keystroke in a text field. */
|
|
1239
|
+
readonly inputChanged: OutputEmitterRef<void>;
|
|
1240
|
+
private readonly injector;
|
|
1241
|
+
private readonly localeService;
|
|
1242
|
+
private readonly overlay;
|
|
1243
|
+
private readonly viewContainerRef;
|
|
1244
|
+
private readonly container;
|
|
1245
|
+
private readonly dateField;
|
|
1246
|
+
private readonly calendarTemplate;
|
|
1247
|
+
private overlayRef?;
|
|
1248
|
+
private onChange;
|
|
1249
|
+
private onTouched;
|
|
1250
|
+
private onValidatorChange;
|
|
1251
|
+
/** The current value as a date, or `null`. */
|
|
1252
|
+
private readonly current;
|
|
1253
|
+
/** Set when the typed text could not be read as a date or time. */
|
|
1254
|
+
private readonly hasTypingError;
|
|
1255
|
+
/** The calendar's id, which the date field points at with `aria-controls` while it is open. */
|
|
1256
|
+
protected readonly calendarId: string;
|
|
1257
|
+
protected readonly isDisabled: WritableSignal<boolean>;
|
|
1258
|
+
protected readonly isOpen: WritableSignal<boolean>;
|
|
1259
|
+
protected readonly locale: Signal<string>;
|
|
1260
|
+
/** The text in the date field. Follows the value and the language, and the user's typing in between. */
|
|
1261
|
+
protected readonly dateText: WritableSignal<string>;
|
|
1262
|
+
/** The text in the time field. Follows the value and the language, and the user's typing in between. */
|
|
1263
|
+
protected readonly timeText: WritableSignal<string>;
|
|
1264
|
+
/** The date order in the language's own words, such as `dia/mês/ano`. */
|
|
1265
|
+
protected readonly datePlaceholder: Signal<string>;
|
|
1266
|
+
/**
|
|
1267
|
+
* Accessible name of the time field: the field's name, if any, then the word for "hour" in the
|
|
1268
|
+
* application's language, from `Intl` so the library needs no translation key.
|
|
1269
|
+
*/
|
|
1270
|
+
protected readonly timeLabel: Signal<string>;
|
|
1271
|
+
protected readonly calendarSelection: Signal<Date | null>;
|
|
1272
|
+
protected readonly isFieldInvalid: Signal<boolean>;
|
|
1273
|
+
constructor();
|
|
1274
|
+
ngOnDestroy(): void;
|
|
1275
|
+
/** Sets the value from the form. Accepts a `Date`, `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` or `null`. */
|
|
1276
|
+
writeValue(value: unknown): void;
|
|
1277
|
+
/** Registers the form's change callback. */
|
|
1278
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
1279
|
+
/** Registers the form's touched callback. */
|
|
1280
|
+
registerOnTouched(fn: () => void): void;
|
|
1281
|
+
/** Enables or disables the field from the form. */
|
|
1282
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1283
|
+
/** Reports `dateInvalid`, `dateMin` and `dateMax`. */
|
|
1284
|
+
validate(_control: AbstractControl): ValidationErrors | null;
|
|
1285
|
+
/** Registers the callback that re-runs validation. */
|
|
1286
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
1287
|
+
protected onDateTyped(event: Event): void;
|
|
1288
|
+
protected onTimeTyped(event: Event): void;
|
|
1289
|
+
protected onFieldFocus(event: FocusEvent): void;
|
|
1290
|
+
protected onFieldBlur(event: FocusEvent): void;
|
|
1291
|
+
protected onFieldKeydown(event: KeyboardEvent): void;
|
|
1292
|
+
protected onToggleClick(): void;
|
|
1293
|
+
protected onDatePicked(day: Date): void;
|
|
1294
|
+
protected onCalendarCancelled(): void;
|
|
1295
|
+
/** Opens the calendar, unless the field is disabled or read-only. */
|
|
1296
|
+
open(): void;
|
|
1297
|
+
/** Closes the calendar. With `returnFocus`, focus goes back to the date field. */
|
|
1298
|
+
close(returnFocus: boolean): void;
|
|
1299
|
+
private isInsideField;
|
|
1300
|
+
/** Reads what the user typed and turns it into the value. */
|
|
1301
|
+
private commitText;
|
|
1302
|
+
private setValue;
|
|
1303
|
+
private serialize;
|
|
1304
|
+
private disposeOverlay;
|
|
1305
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
|
|
1306
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "lib-date-input", never, {
|
|
1307
|
+
"mode": {
|
|
1308
|
+
"alias": "mode";
|
|
1309
|
+
"required": false;
|
|
1310
|
+
"isSignal": true;
|
|
1311
|
+
};
|
|
1312
|
+
"min": {
|
|
1313
|
+
"alias": "min";
|
|
1314
|
+
"required": false;
|
|
1315
|
+
"isSignal": true;
|
|
1316
|
+
};
|
|
1317
|
+
"max": {
|
|
1318
|
+
"alias": "max";
|
|
1319
|
+
"required": false;
|
|
1320
|
+
"isSignal": true;
|
|
1321
|
+
};
|
|
1322
|
+
"readOnly": {
|
|
1323
|
+
"alias": "readOnly";
|
|
1324
|
+
"required": false;
|
|
1325
|
+
"isSignal": true;
|
|
1326
|
+
};
|
|
1327
|
+
"invalid": {
|
|
1328
|
+
"alias": "invalid";
|
|
1329
|
+
"required": false;
|
|
1330
|
+
"isSignal": true;
|
|
1331
|
+
};
|
|
1332
|
+
"ariaLabel": {
|
|
1333
|
+
"alias": "ariaLabel";
|
|
1334
|
+
"required": false;
|
|
1335
|
+
"isSignal": true;
|
|
1336
|
+
};
|
|
1337
|
+
}, {
|
|
1338
|
+
"blurred": "blurred";
|
|
1339
|
+
"focused": "focused";
|
|
1340
|
+
"inputChanged": "inputChanged";
|
|
1341
|
+
}, never, never, true, never>;
|
|
1342
|
+
}
|
|
937
1343
|
declare namespace form_input_component_d_exports {
|
|
938
1344
|
export { FormInputComponent };
|
|
939
1345
|
}
|
|
1346
|
+
/**
|
|
1347
|
+
* A single form field without a label. It edits a control of the surrounding `[formGroup]` named by
|
|
1348
|
+
* `controlName`, or shows `fixedValue` when there is no control. While the form is disabled and
|
|
1349
|
+
* the `FormService` is not in edit mode, it shows the value as text instead of an input.
|
|
1350
|
+
*/
|
|
940
1351
|
export declare class FormInputComponent extends BaseComponent implements OnInit {
|
|
1352
|
+
/** Accepted for parity with `lib-form-input-group`, but this component's template does not apply it. Defaults to `false`. */
|
|
941
1353
|
readonly autofocus: InputSignal<boolean>;
|
|
1354
|
+
/** Name of the control in the surrounding form group to edit. Leave empty to show `fixedValue` instead. */
|
|
942
1355
|
readonly controlName: InputSignal<string>;
|
|
1356
|
+
/** Control whose value is shown in read-only mode instead of `controlName`'s, for example a display name next to an ID. */
|
|
943
1357
|
readonly disabledControlName: InputSignal<string | undefined>;
|
|
1358
|
+
/** Styles a read-only input like a disabled one. Defaults to `true`. */
|
|
944
1359
|
readonly displayReadOnlyAsDisabled: InputSignal<boolean>;
|
|
1360
|
+
/** Shows the field in its error style. Defaults to `false`. */
|
|
945
1361
|
readonly invalid: InputSignal<boolean>;
|
|
1362
|
+
/** Disables the input when it shows `fixedValue` (no `controlName`). Has no effect on a form control. Defaults to `true`. */
|
|
946
1363
|
readonly isDisabled: InputSignal<boolean>;
|
|
1364
|
+
/** Lets the field grow to the full height of its container, for example a tall textarea. Defaults to `false`. */
|
|
947
1365
|
readonly isFullHeight: InputSignal<boolean>;
|
|
1366
|
+
/** Maximum number of characters for text inputs and textareas. No limit by default. */
|
|
948
1367
|
readonly maxLength: InputSignal<number | undefined>;
|
|
1368
|
+
/** Minimum value for a `number` field. No minimum by default. */
|
|
949
1369
|
readonly min: InputSignal<number | undefined>;
|
|
1370
|
+
/** Makes a control-bound text-like input read-only while it stays focusable. Defaults to `false`. */
|
|
950
1371
|
readonly readOnly: InputSignal<boolean>;
|
|
1372
|
+
/** Visible number of lines for a `textarea` field. */
|
|
951
1373
|
readonly rows: InputSignal<number | undefined>;
|
|
1374
|
+
/** Increment for a `number` field. Defaults to `1`. */
|
|
952
1375
|
readonly step: InputSignal<number>;
|
|
1376
|
+
/**
|
|
1377
|
+
* Kind of field: `textarea`, `checkbox` (shown as a switch), or any native input type such as
|
|
1378
|
+
* `text`, `number`, `date` or `datetime-local`. Defaults to `text`.
|
|
1379
|
+
*
|
|
1380
|
+
* `date` and `datetime-local` render `lib-date-input`, and `number` renders `lib-number-input`, so
|
|
1381
|
+
* dates and numbers show and are typed in the application's language. The control's value keeps
|
|
1382
|
+
* the native shape: `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` or a number.
|
|
1383
|
+
*/
|
|
953
1384
|
readonly type: InputSignal<string>;
|
|
1385
|
+
/** Value shown and edited when there is no `controlName`. Supports two-way binding. */
|
|
954
1386
|
readonly fixedValue: ModelSignal<any>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Display format for the read-only value: a `DatePipe` pattern for date types, or a
|
|
1389
|
+
* `DecimalPipe` digits string for `number`, such as `1.2-2`. Without it, dates show in the
|
|
1390
|
+
* application's language (`05/12/2026` in Portuguese) and numbers with up to three decimals.
|
|
1391
|
+
*/
|
|
955
1392
|
readonly format: ModelSignal<string | undefined>;
|
|
1393
|
+
/** Emits when the input loses focus. */
|
|
956
1394
|
readonly blurred: OutputEmitterRef<void>;
|
|
1395
|
+
/** Emits the native `change` event of a checkbox that shows `fixedValue`. */
|
|
957
1396
|
readonly changed: OutputEmitterRef<any>;
|
|
1397
|
+
/** Emits the new value when the user edits `fixedValue`. */
|
|
958
1398
|
readonly fixedValueChanged: OutputEmitterRef<string>;
|
|
1399
|
+
/** Emits when the input gains focus. */
|
|
959
1400
|
readonly focused: OutputEmitterRef<void>;
|
|
1401
|
+
/** Emits on every native `input` event, that is, each time the user types or toggles. */
|
|
960
1402
|
readonly inputChanged: OutputEmitterRef<void>;
|
|
961
1403
|
protected readonly formGroupDirective: FormGroupDirective;
|
|
962
1404
|
protected readonly formGroupName: FormGroupName;
|
|
963
1405
|
protected readonly formService: FormService;
|
|
1406
|
+
private readonly angularLocale;
|
|
1407
|
+
private readonly localeService;
|
|
964
1408
|
/**
|
|
965
1409
|
* Bumped on every event the form emits -- a status change, a value change, a reset.
|
|
966
1410
|
*
|
|
@@ -980,6 +1424,15 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
|
|
|
980
1424
|
protected readonly isEditable: Signal<boolean>;
|
|
981
1425
|
/** What the read-only face shows: the fixed value, or else the control's current value. */
|
|
982
1426
|
protected readonly shownValue: Signal<any>;
|
|
1427
|
+
/** The read-only face's text, in the application's language. */
|
|
1428
|
+
protected readonly shownText: Signal<string>;
|
|
1429
|
+
/** The text of the disabled input that shows `fixedValue`, in the application's language. */
|
|
1430
|
+
protected readonly fixedText: Signal<string>;
|
|
1431
|
+
/** Fraction digits for a number field, read from `format`. */
|
|
1432
|
+
protected readonly numberDigits: Signal<{
|
|
1433
|
+
minFractionDigits: number;
|
|
1434
|
+
maxFractionDigits: number;
|
|
1435
|
+
}>;
|
|
983
1436
|
protected get formControl(): FormControl<any> | null;
|
|
984
1437
|
protected get formControlName(): string;
|
|
985
1438
|
protected get formGroup(): FormGroup;
|
|
@@ -994,6 +1447,12 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
|
|
|
994
1447
|
protected onFocus(): void;
|
|
995
1448
|
protected onInput(): void;
|
|
996
1449
|
protected onValueChanged(newText: string): void;
|
|
1450
|
+
/**
|
|
1451
|
+
* Formats a value for the read-only face. Dates and numbers follow the application's language
|
|
1452
|
+
* (`LocaleService`). An explicit `format` on a date field is still a `DatePipe` pattern; on a
|
|
1453
|
+
* number field it is a `DecimalPipe` digits string, applied in the application's language.
|
|
1454
|
+
*/
|
|
1455
|
+
private toDisplayText;
|
|
997
1456
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormInputComponent, never>;
|
|
998
1457
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "lib-form-input", never, {
|
|
999
1458
|
"autofocus": {
|
|
@@ -1084,24 +1543,49 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
|
|
|
1084
1543
|
declare namespace form_input_group_component_d_exports {
|
|
1085
1544
|
export { FormInputGroupComponent };
|
|
1086
1545
|
}
|
|
1546
|
+
/**
|
|
1547
|
+
* A labelled form field: a label, a `lib-form-input` (or your own template), its validation
|
|
1548
|
+
* messages and optional notes. It shows a placeholder while the field or the form is loading.
|
|
1549
|
+
*/
|
|
1087
1550
|
export declare class FormInputGroupComponent extends BaseComponent implements OnInit {
|
|
1551
|
+
/** Passed to the inner `lib-form-input`, which does not apply it yet. Defaults to `false`. */
|
|
1088
1552
|
readonly autofocus: InputSignal<boolean>;
|
|
1553
|
+
/** Vertical alignment of the field in its cell: `start`, `center` or `end`. Defaults to `center`. */
|
|
1089
1554
|
readonly alignContent: InputSignal<'center' | 'end' | 'start'>;
|
|
1555
|
+
/** Name of the control in the surrounding form group. Its errors and loading state drive the messages. Required. */
|
|
1090
1556
|
readonly controlName: InputSignal<string>;
|
|
1557
|
+
/** Value passed to the inner `lib-form-input` as its `fixedValue`. */
|
|
1091
1558
|
readonly fixedValue: InputSignal<any>;
|
|
1559
|
+
/** Display format passed to the inner `lib-form-input`: a date pattern or a number digits string. */
|
|
1092
1560
|
readonly format: InputSignal<string | undefined>;
|
|
1561
|
+
/** Text of the label, as a translation key. Defaults to empty. */
|
|
1093
1562
|
readonly label: InputSignal<string>;
|
|
1563
|
+
/** Passed to the inner `lib-form-input`; disables it only when it shows a fixed value. Defaults to `true`. */
|
|
1094
1564
|
readonly isDisabled: InputSignal<boolean>;
|
|
1565
|
+
/** Lets the field grow to the full height of its container. Defaults to `false`. */
|
|
1095
1566
|
readonly isFullHeight: InputSignal<boolean>;
|
|
1567
|
+
/** Maximum number of characters for text inputs and textareas. No limit by default. */
|
|
1096
1568
|
readonly maxLength: InputSignal<number | undefined>;
|
|
1569
|
+
/** Minimum value for a `number` field. No minimum by default. */
|
|
1097
1570
|
readonly min: InputSignal<number | undefined>;
|
|
1571
|
+
/** Hint shown in small italics under the field, as a translation key. Defaults to empty. */
|
|
1098
1572
|
readonly notes: InputSignal<string>;
|
|
1573
|
+
/** Makes the input read-only while it stays focusable. Defaults to `false`. */
|
|
1099
1574
|
readonly readOnly: InputSignal<boolean>;
|
|
1575
|
+
/** Visible number of lines for a `textarea` field. */
|
|
1100
1576
|
readonly rows: InputSignal<number | undefined>;
|
|
1577
|
+
/** Shows the label column. When `false`, the field spans the full width. Defaults to `true`. */
|
|
1101
1578
|
readonly showLabel: InputSignal<boolean>;
|
|
1579
|
+
/** Increment for a `number` field. Defaults to `1`. */
|
|
1102
1580
|
readonly step: InputSignal<number>;
|
|
1581
|
+
/** Your own template to render in place of the default `lib-form-input`. */
|
|
1103
1582
|
readonly template: InputSignal<TemplateRef<any> | undefined>;
|
|
1583
|
+
/** Kind of field, passed to the inner `lib-form-input`, for example `text`, `number`, `date`, `checkbox` or `textarea`. Defaults to `text`. */
|
|
1104
1584
|
readonly type: InputSignal<string>;
|
|
1585
|
+
/**
|
|
1586
|
+
* Messages per validation error key, as translation keys, for example
|
|
1587
|
+
* `{ required: 'Validation-Required' }`. Only errors listed here show a message, once the control is touched.
|
|
1588
|
+
*/
|
|
1105
1589
|
readonly validations: InputSignal<{
|
|
1106
1590
|
[id: string]: string;
|
|
1107
1591
|
}>;
|
|
@@ -1225,8 +1709,13 @@ export declare class FormInputGroupComponent extends BaseComponent implements On
|
|
|
1225
1709
|
declare namespace form_group_component_d_exports {
|
|
1226
1710
|
export { FormGroupComponent };
|
|
1227
1711
|
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Groups related form fields under an optional heading. Project the fields as content.
|
|
1714
|
+
*/
|
|
1228
1715
|
export declare class FormGroupComponent {
|
|
1716
|
+
/** Adds the `expand` class to the host so the group grows to fill the available space. Defaults to `false`. */
|
|
1229
1717
|
shouldExpand: boolean;
|
|
1718
|
+
/** Heading shown above the fields, as a translation key. No heading is shown when empty. */
|
|
1230
1719
|
label: string;
|
|
1231
1720
|
protected get hasTitle(): boolean;
|
|
1232
1721
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupComponent, never>;
|
|
@@ -1244,11 +1733,17 @@ export declare class FormGroupComponent {
|
|
|
1244
1733
|
declare namespace group_accordion_component_d_exports {
|
|
1245
1734
|
export { GroupAccordionComponent };
|
|
1246
1735
|
}
|
|
1736
|
+
/**
|
|
1737
|
+
* A titled section whose content the user can collapse and expand by clicking the title or
|
|
1738
|
+
* pressing Enter or Space on it. Starts expanded.
|
|
1739
|
+
*/
|
|
1247
1740
|
export declare class GroupAccordionComponent {
|
|
1248
1741
|
private readonly containerElementRef;
|
|
1742
|
+
/** Title of the section, shown as given. Required. */
|
|
1249
1743
|
readonly label: InputSignal<string>;
|
|
1250
1744
|
private readonly _maxHeight;
|
|
1251
1745
|
protected readonly collapsed: WritableSignal<boolean>;
|
|
1746
|
+
/** Height in pixels pinned on the content during the collapse animation, or `-1` when none is set. */
|
|
1252
1747
|
readonly maxHeight: Signal<number>;
|
|
1253
1748
|
protected onToggle(): void;
|
|
1254
1749
|
private clearMaxHeight;
|
|
@@ -1265,15 +1760,31 @@ export declare class GroupAccordionComponent {
|
|
|
1265
1760
|
declare namespace scroll_spy_directive_d_exports {
|
|
1266
1761
|
export { ScrollSpyDirective };
|
|
1267
1762
|
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Tracks which section of a scrollable element is in view. Put it on the scrolling container;
|
|
1765
|
+
* it finds the descendant elements whose tag is listed in `spiedTags` and reports the index of
|
|
1766
|
+
* the current one as the user scrolls.
|
|
1767
|
+
*/
|
|
1268
1768
|
export declare class ScrollSpyDirective implements AfterViewInit {
|
|
1769
|
+
/**
|
|
1770
|
+
* Tag names (case-insensitive) of the elements that count as sections, for example
|
|
1771
|
+
* `['lib-group-accordion']`. Read once after the view initialises. Defaults to none.
|
|
1772
|
+
*/
|
|
1269
1773
|
spiedTags: Array<string>;
|
|
1774
|
+
/** Emits the zero-based index of the section in view whenever it changes. */
|
|
1270
1775
|
activeSectionChange: EventEmitter<number>;
|
|
1271
1776
|
private _el;
|
|
1272
1777
|
private activeSection;
|
|
1273
1778
|
private sections;
|
|
1274
1779
|
ngAfterViewInit(): void;
|
|
1780
|
+
/** Handles the host's `scroll` event and selects the section at the current scroll position. */
|
|
1275
1781
|
onScroll(event: any): void;
|
|
1782
|
+
/** Scrolls the host so the section at the given zero-based index is at the top. */
|
|
1276
1783
|
scrollTo(section: number): void;
|
|
1784
|
+
/**
|
|
1785
|
+
* Marks the section at the given zero-based index as active and emits `activeSectionChange`
|
|
1786
|
+
* when it differs from the current one. Does not scroll.
|
|
1787
|
+
*/
|
|
1277
1788
|
select(section: number): void;
|
|
1278
1789
|
private updateSections;
|
|
1279
1790
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollSpyDirective, never>;
|
|
@@ -1289,14 +1800,26 @@ export declare class ScrollSpyDirective implements AfterViewInit {
|
|
|
1289
1800
|
declare namespace group_container_component_d_exports {
|
|
1290
1801
|
export { GroupContainerComponent };
|
|
1291
1802
|
}
|
|
1803
|
+
/**
|
|
1804
|
+
* A panel with a title bar, an optional icon and projected content. While `title` is empty the
|
|
1805
|
+
* title bar shows a loading spinner instead.
|
|
1806
|
+
*/
|
|
1292
1807
|
export declare class GroupContainerComponent {
|
|
1808
|
+
/** A scroll-spy directive in the view. The current template has none, so this stays unset. */
|
|
1293
1809
|
scrollSpy: ScrollSpyDirective;
|
|
1810
|
+
/** The `lib-group-accordion` sections projected into the panel, at any depth. */
|
|
1294
1811
|
sections: QueryList<GroupAccordionComponent>;
|
|
1812
|
+
/** The labels of the projected sections, in document order. */
|
|
1295
1813
|
get titles(): string[];
|
|
1814
|
+
/** Zero-based index of the active section. Starts at `0`. */
|
|
1296
1815
|
activeSection: number;
|
|
1816
|
+
/** Panel title, as a translation key. While empty, a loading spinner is shown in its place. */
|
|
1297
1817
|
title?: string;
|
|
1818
|
+
/** Font Awesome icon class shown before the title, for example `fa-user`. Shown only with a title. */
|
|
1298
1819
|
icon?: string;
|
|
1820
|
+
/** Sets the active section to the given zero-based index. */
|
|
1299
1821
|
activeSectionChanged(index: number): void;
|
|
1822
|
+
/** Scrolls to the section at the given zero-based index. Needs `scrollSpy`, which the template does not provide. */
|
|
1300
1823
|
scrollTo(section: number): void;
|
|
1301
1824
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupContainerComponent, never>;
|
|
1302
1825
|
static ɵcmp: i0.ɵɵComponentDeclaration<GroupContainerComponent, "lib-group-container", never, {
|
|
@@ -1313,12 +1836,22 @@ export declare class GroupContainerComponent {
|
|
|
1313
1836
|
declare namespace group_scroll_spy_component_d_exports {
|
|
1314
1837
|
export { GroupScrollSpyComponent };
|
|
1315
1838
|
}
|
|
1839
|
+
/**
|
|
1840
|
+
* A scrollable container with a strip of links, one per projected `lib-group-accordion`. The link
|
|
1841
|
+
* of the section in view is highlighted, and clicking a link scrolls to its section.
|
|
1842
|
+
*/
|
|
1316
1843
|
export declare class GroupScrollSpyComponent {
|
|
1844
|
+
/** The scroll-spy directive on the scrolling content area. */
|
|
1317
1845
|
readonly scrollSpy: Signal<ScrollSpyDirective | undefined>;
|
|
1846
|
+
/** The `lib-group-accordion` sections projected into the container, at any depth. */
|
|
1318
1847
|
readonly sections: Signal<readonly GroupAccordionComponent[]>;
|
|
1848
|
+
/** The section labels shown as links, in document order. */
|
|
1319
1849
|
readonly titles: Signal<string[]>;
|
|
1850
|
+
/** Zero-based index of the section in view. Starts at `0`. */
|
|
1320
1851
|
readonly activeSection: WritableSignal<number>;
|
|
1852
|
+
/** Sets the section in view to the given zero-based index. Called by the scroll spy. */
|
|
1321
1853
|
activeSectionChanged(index: number): void;
|
|
1854
|
+
/** Scrolls the content so the section at the given zero-based index is at the top. */
|
|
1322
1855
|
scrollTo(section: number): void;
|
|
1323
1856
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupScrollSpyComponent, never>;
|
|
1324
1857
|
static ɵcmp: i0.ɵɵComponentDeclaration<GroupScrollSpyComponent, "lib-group-scroll-spy", never, {}, {}, ["sections"], ["*"], true, never>;
|
|
@@ -1326,18 +1859,36 @@ export declare class GroupScrollSpyComponent {
|
|
|
1326
1859
|
declare namespace modal_component_d_exports {
|
|
1327
1860
|
export { ModalComponent };
|
|
1328
1861
|
}
|
|
1862
|
+
/**
|
|
1863
|
+
* A modal dialog with a header, a body and a footer. Project content with the `body` and `footer`
|
|
1864
|
+
* attributes, and open or close it through `toggleModal()` from a template reference or a view
|
|
1865
|
+
* query. The dialog is moved to `<body>` so it always renders above the rest of the app.
|
|
1866
|
+
*/
|
|
1329
1867
|
export declare class ModalComponent extends BaseComponent implements IModal, OnInit {
|
|
1868
|
+
/** Text of the footer's close button, shown as given. Defaults to `Close`. */
|
|
1330
1869
|
readonly closeButtonText: ModelSignal<string>;
|
|
1870
|
+
/**
|
|
1871
|
+
* When `true`, a click on the backdrop outside the dialog closes it. Escape and the close
|
|
1872
|
+
* buttons work either way. Defaults to `true`.
|
|
1873
|
+
*/
|
|
1331
1874
|
readonly dialog: InputSignal<boolean>;
|
|
1875
|
+
/**
|
|
1876
|
+
* Marks the dialog as busy. While `true` the close button is disabled and Escape and backdrop
|
|
1877
|
+
* clicks are ignored. Defaults to `false`.
|
|
1878
|
+
*/
|
|
1332
1879
|
readonly modalProcessing: ModelSignal<boolean>;
|
|
1880
|
+
/** Where the dialog sits on screen: `top`, `left`, `right`, `bottom` or `center`. Defaults to `center`. */
|
|
1333
1881
|
readonly position: InputSignal<'top' | 'left' | 'right' | 'bottom' | 'center'>;
|
|
1882
|
+
/** Width of the dialog. Defaults to `auto`, which fits the content. */
|
|
1334
1883
|
readonly size: InputSignal<ModalSize>;
|
|
1884
|
+
/** Heading of the dialog, shown as given. Without a title the header and its close icon are not shown. */
|
|
1335
1885
|
readonly title: InputSignal<string | undefined>;
|
|
1886
|
+
/** Emits after the dialog closes, however it was closed. */
|
|
1336
1887
|
readonly closed: OutputEmitterRef<void>;
|
|
1337
1888
|
private readonly _isOpen;
|
|
1338
1889
|
private clickedOutside;
|
|
1339
1890
|
private elementRef;
|
|
1340
|
-
/**
|
|
1891
|
+
/** Whether the dialog is open. */
|
|
1341
1892
|
readonly isOpen: Signal<boolean>;
|
|
1342
1893
|
constructor();
|
|
1343
1894
|
/**
|
|
@@ -1376,7 +1927,12 @@ export declare class ModalComponent extends BaseComponent implements IModal, OnI
|
|
|
1376
1927
|
* done its work.
|
|
1377
1928
|
*/
|
|
1378
1929
|
protected onFormSubmit(event: Event): void;
|
|
1930
|
+
/** Closes the dialog if it is open. Does nothing otherwise. */
|
|
1379
1931
|
closeModal(): void;
|
|
1932
|
+
/**
|
|
1933
|
+
* Opens the dialog when closed and closes it when open. Opening focuses the first element with
|
|
1934
|
+
* `autofocus`; closing emits `closed`.
|
|
1935
|
+
*/
|
|
1380
1936
|
toggleModal(): void;
|
|
1381
1937
|
protected bodyMouseDown(event: MouseEvent): void;
|
|
1382
1938
|
protected bodyMouseUp(event: MouseEvent): void;
|
|
@@ -1422,12 +1978,25 @@ export declare class ModalComponent extends BaseComponent implements IModal, OnI
|
|
|
1422
1978
|
declare namespace multi_editor_component_d_exports {
|
|
1423
1979
|
export { MultiEditorComponent };
|
|
1424
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* A modal for editing many records in one go: a grid of rows on one side and a form for the
|
|
1983
|
+
* selected row on the other. Project the form fields as content, bound to `formGroup`; changes
|
|
1984
|
+
* are kept per row and saved together through the provided `MultiEditorDataset` on Confirm.
|
|
1985
|
+
*/
|
|
1425
1986
|
export declare class MultiEditorComponent extends ModalComponent implements OnInit {
|
|
1426
1987
|
private readonly modal;
|
|
1988
|
+
/** Text of the button that adds a new row, shown as given. Defaults to `Add row`. */
|
|
1427
1989
|
readonly addButtonLabel: InputSignal<string>;
|
|
1990
|
+
/**
|
|
1991
|
+
* The form the projected fields are bound to. It is filled from the selected row, disabled while
|
|
1992
|
+
* no row is selected, and must be valid before the user can move to another row. Required.
|
|
1993
|
+
*/
|
|
1428
1994
|
readonly formGroup: InputSignal<FormGroup<any>>;
|
|
1995
|
+
/** Text of the button that removes the selected row, shown as given. Defaults to `Remove row`. */
|
|
1429
1996
|
readonly removeButtonLabel: InputSignal<string>;
|
|
1997
|
+
/** Shows the button that adds a new row. Defaults to `true`. */
|
|
1430
1998
|
readonly showAddButton: InputSignal<boolean>;
|
|
1999
|
+
/** Shows the button that removes the selected row; it appears only while a row is selected. Defaults to `true`. */
|
|
1431
2000
|
readonly showDeleteButton: InputSignal<boolean>;
|
|
1432
2001
|
protected readonly gridLoading: WritableSignal<boolean>;
|
|
1433
2002
|
private dataGridDataset;
|
|
@@ -1442,7 +2011,9 @@ export declare class MultiEditorComponent extends ModalComponent implements OnIn
|
|
|
1442
2011
|
protected onDeleteClick(): void;
|
|
1443
2012
|
protected onNewClick(): void;
|
|
1444
2013
|
protected onSaveClick(): void;
|
|
2014
|
+
/** Closes the modal if it is open, without saving. */
|
|
1445
2015
|
closeModal(): void;
|
|
2016
|
+
/** Opens or closes the modal. Opening reloads the grid and clears and disables the form. */
|
|
1446
2017
|
toggleModal(): void;
|
|
1447
2018
|
private clearAllFormArrays;
|
|
1448
2019
|
/**
|
|
@@ -1485,8 +2056,14 @@ export declare class MultiEditorComponent extends ModalComponent implements OnIn
|
|
|
1485
2056
|
declare namespace multi_select_component_d_exports {
|
|
1486
2057
|
export { MultiSelectComponent };
|
|
1487
2058
|
}
|
|
2059
|
+
/**
|
|
2060
|
+
* A modal for picking many records at once: a searchable grid on one side and the current
|
|
2061
|
+
* selection on the other. It reads both lists from the `DataGridDataset` and
|
|
2062
|
+
* `MultiSelectResultDataset` provided around it, and saves through the result dataset on Confirm.
|
|
2063
|
+
*/
|
|
1488
2064
|
export declare class MultiSelectComponent extends ModalComponent implements OnInit {
|
|
1489
2065
|
private readonly modal;
|
|
2066
|
+
/** Template that renders one selected record in the selection list. It receives the record as `rowData`. */
|
|
1490
2067
|
readonly itemTemplate: InputSignal<TemplateRef<unknown> | undefined>;
|
|
1491
2068
|
protected readonly isResultGridLoading: WritableSignal<boolean>;
|
|
1492
2069
|
protected readonly isSearchGridLoading: WritableSignal<boolean>;
|
|
@@ -1507,7 +2084,9 @@ export declare class MultiSelectComponent extends ModalComponent implements OnIn
|
|
|
1507
2084
|
* the template so the reason travels with the code.
|
|
1508
2085
|
*/
|
|
1509
2086
|
protected onSearch(event?: Event): void;
|
|
2087
|
+
/** Closes the modal if it is open, without saving. */
|
|
1510
2088
|
closeModal(): void;
|
|
2089
|
+
/** Opens or closes the modal. Opening clears the search and reloads the current selection. */
|
|
1511
2090
|
toggleModal(): void;
|
|
1512
2091
|
private clearSearch;
|
|
1513
2092
|
private updateSelectedItems;
|
|
@@ -1523,14 +2102,21 @@ export declare class MultiSelectComponent extends ModalComponent implements OnIn
|
|
|
1523
2102
|
declare namespace result_grid_component_d_exports {
|
|
1524
2103
|
export { MultiSelectResultGridComponent };
|
|
1525
2104
|
}
|
|
2105
|
+
/**
|
|
2106
|
+
* The selection list inside `lib-multi-select`. Shows the records of the `MultiSelectResultDataset`
|
|
2107
|
+
* with a remove button on each, and loads more rows as the user scrolls to the end.
|
|
2108
|
+
*/
|
|
1526
2109
|
export declare class MultiSelectResultGridComponent extends BaseComponent implements OnInit {
|
|
2110
|
+
/** Disables the remove buttons. Defaults to `false`. */
|
|
1527
2111
|
readonly isDisabled: InputSignal<boolean>;
|
|
2112
|
+
/** Template that renders one record. It receives the record as `rowData`. */
|
|
1528
2113
|
readonly template: InputSignal<TemplateRef<any> | undefined>;
|
|
1529
2114
|
protected dataGridDataset: DataGridDataset;
|
|
1530
2115
|
protected readonly isLoading: WritableSignal<boolean>;
|
|
1531
2116
|
protected resultDataset: MultiSelectResultDataset;
|
|
1532
2117
|
constructor();
|
|
1533
2118
|
ngOnInit(): void;
|
|
2119
|
+
/** Marks the record at the given displayed row index for removal and unticks it in the search grid. */
|
|
1534
2120
|
onItemRemoved(rowIndex: number): void;
|
|
1535
2121
|
protected onScrolled(event: any): void;
|
|
1536
2122
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectResultGridComponent, never>;
|
|
@@ -1547,9 +2133,187 @@ export declare class MultiSelectResultGridComponent extends BaseComponent implem
|
|
|
1547
2133
|
};
|
|
1548
2134
|
}, {}, never, never, true, never>;
|
|
1549
2135
|
}
|
|
2136
|
+
/** The symbol a currency shows and the side it sits on, in one locale. */
|
|
2137
|
+
interface CurrencyAffix {
|
|
2138
|
+
symbol: string;
|
|
2139
|
+
position: 'prefix' | 'suffix';
|
|
2140
|
+
fractionDigits: number;
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* A number field that follows the application's language.
|
|
2144
|
+
*
|
|
2145
|
+
* The native `<input type="number">` reads the decimal separator from the browser, so a user whose
|
|
2146
|
+
* browser is in English types `1.5` in an application shown in Portuguese, where `1,5` is expected.
|
|
2147
|
+
* This field reads and writes numbers in the language the application chose (see `LocaleService`):
|
|
2148
|
+
* `1.234,56` in Portuguese and `1,234.56` in English.
|
|
2149
|
+
*
|
|
2150
|
+
* While the field has focus it shows the number without thousands separators, to make editing easy.
|
|
2151
|
+
* When it loses focus it rounds to `decimals` and shows the separators again.
|
|
2152
|
+
*
|
|
2153
|
+
* It is a form control. The value is a `number`, or `null` when the field is empty or the text is
|
|
2154
|
+
* not a number. It adds these validation errors: `numberInvalid` when the text is not a number,
|
|
2155
|
+
* and `min` and `max`, with the same shape as Angular's own validators.
|
|
2156
|
+
*
|
|
2157
|
+
* The decimal key of the numeric keypad types the language's decimal separator. The arrow keys
|
|
2158
|
+
* add or subtract `step`.
|
|
2159
|
+
*/
|
|
2160
|
+
export declare class NumberInputComponent implements ControlValueAccessor, Validator {
|
|
2161
|
+
/** Smallest allowed value. Defaults to no limit. */
|
|
2162
|
+
readonly min: InputSignal<number | null | undefined>;
|
|
2163
|
+
/** Largest allowed value. Defaults to no limit. */
|
|
2164
|
+
readonly max: InputSignal<number | null | undefined>;
|
|
2165
|
+
/** How much the arrow keys add or subtract. Defaults to `1`. */
|
|
2166
|
+
readonly step: InputSignal<number>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Most digits after the decimal separator; the value is rounded to it when the field loses
|
|
2169
|
+
* focus. `0` makes an integer field. Defaults to `3`, or to the currency's digits with `currency`.
|
|
2170
|
+
*/
|
|
2171
|
+
readonly decimals: InputSignal<number | undefined>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Fewest digits shown after the decimal separator, such as `2` to show `10,00`. Defaults to `0`,
|
|
2174
|
+
* or to the currency's digits with `currency`.
|
|
2175
|
+
*/
|
|
2176
|
+
readonly minDecimals: InputSignal<number | undefined>;
|
|
2177
|
+
/** Whether to show thousands separators when the field does not have focus. Defaults to `true`. */
|
|
2178
|
+
readonly grouping: InputSignal<boolean>;
|
|
2179
|
+
/** Text shown before the number, such as `R$`. Overrides the currency symbol. Defaults to none. */
|
|
2180
|
+
readonly prefix: InputSignal<string | undefined>;
|
|
2181
|
+
/** Text shown after the number, such as `%` or `kg`. Overrides the currency symbol. Defaults to none. */
|
|
2182
|
+
readonly suffix: InputSignal<string | undefined>;
|
|
2183
|
+
/**
|
|
2184
|
+
* ISO 4217 currency code, such as `BRL` or `USD`. Shows the currency symbol on the side the
|
|
2185
|
+
* language puts it, and sets the decimals the currency uses. The value stays a plain number.
|
|
2186
|
+
* Defaults to none.
|
|
2187
|
+
*/
|
|
2188
|
+
readonly currency: InputSignal<string | undefined>;
|
|
2189
|
+
/** Lets the user see and focus the value but not change it. Defaults to `false`. */
|
|
2190
|
+
readonly readOnly: InputSignal<boolean>;
|
|
2191
|
+
/** Shows the field as invalid, for example when the form was touched. Defaults to `false`. */
|
|
2192
|
+
readonly invalid: InputSignal<boolean>;
|
|
2193
|
+
/** Accessible name of the field, when no visible label names it. Defaults to none. */
|
|
2194
|
+
readonly ariaLabel: InputSignal<string | undefined>;
|
|
2195
|
+
/** Emits when the field loses focus. */
|
|
2196
|
+
readonly blurred: OutputEmitterRef<void>;
|
|
2197
|
+
/** Emits when the field gains focus. */
|
|
2198
|
+
readonly focused: OutputEmitterRef<void>;
|
|
2199
|
+
/** Emits on every keystroke. */
|
|
2200
|
+
readonly inputChanged: OutputEmitterRef<void>;
|
|
2201
|
+
private readonly localeService;
|
|
2202
|
+
private onChange;
|
|
2203
|
+
private onTouched;
|
|
2204
|
+
private onValidatorChange;
|
|
2205
|
+
private readonly current;
|
|
2206
|
+
private readonly hasTypingError;
|
|
2207
|
+
private readonly hasFocus;
|
|
2208
|
+
/** Whether the user typed since the field gained focus. Only typed values are rounded. */
|
|
2209
|
+
private wasEdited;
|
|
2210
|
+
protected readonly isDisabled: WritableSignal<boolean>;
|
|
2211
|
+
protected readonly locale: Signal<string>;
|
|
2212
|
+
protected readonly currencyAffix: Signal<CurrencyAffix | null>;
|
|
2213
|
+
protected readonly prefixText: Signal<string | undefined>;
|
|
2214
|
+
protected readonly suffixText: Signal<string | undefined>;
|
|
2215
|
+
protected readonly maxDecimals: Signal<number>;
|
|
2216
|
+
protected readonly fixedDecimals: Signal<number>;
|
|
2217
|
+
/** The text in the field. Follows the value, the language and focus, and the user's typing in between. */
|
|
2218
|
+
protected readonly text: WritableSignal<string>;
|
|
2219
|
+
protected readonly inputMode: Signal<string>;
|
|
2220
|
+
protected readonly isFieldInvalid: Signal<boolean>;
|
|
2221
|
+
constructor();
|
|
2222
|
+
/** Sets the value from the form. Accepts a number, a numeric string such as `"12.5"`, or `null`. */
|
|
2223
|
+
writeValue(value: unknown): void;
|
|
2224
|
+
/** Registers the form's change callback. */
|
|
2225
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
2226
|
+
/** Registers the form's touched callback. */
|
|
2227
|
+
registerOnTouched(fn: () => void): void;
|
|
2228
|
+
/** Enables or disables the field from the form. */
|
|
2229
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2230
|
+
/** Reports `numberInvalid`, `min` and `max`. */
|
|
2231
|
+
validate(_control: AbstractControl): ValidationErrors | null;
|
|
2232
|
+
/** Registers the callback that re-runs validation. */
|
|
2233
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
2234
|
+
protected onFocus(): void;
|
|
2235
|
+
protected onBlur(): void;
|
|
2236
|
+
protected onTyped(event: Event): void;
|
|
2237
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2238
|
+
private setValue;
|
|
2239
|
+
private round;
|
|
2240
|
+
private clamp;
|
|
2241
|
+
private insertText;
|
|
2242
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumberInputComponent, never>;
|
|
2243
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent, "lib-number-input", never, {
|
|
2244
|
+
"min": {
|
|
2245
|
+
"alias": "min";
|
|
2246
|
+
"required": false;
|
|
2247
|
+
"isSignal": true;
|
|
2248
|
+
};
|
|
2249
|
+
"max": {
|
|
2250
|
+
"alias": "max";
|
|
2251
|
+
"required": false;
|
|
2252
|
+
"isSignal": true;
|
|
2253
|
+
};
|
|
2254
|
+
"step": {
|
|
2255
|
+
"alias": "step";
|
|
2256
|
+
"required": false;
|
|
2257
|
+
"isSignal": true;
|
|
2258
|
+
};
|
|
2259
|
+
"decimals": {
|
|
2260
|
+
"alias": "decimals";
|
|
2261
|
+
"required": false;
|
|
2262
|
+
"isSignal": true;
|
|
2263
|
+
};
|
|
2264
|
+
"minDecimals": {
|
|
2265
|
+
"alias": "minDecimals";
|
|
2266
|
+
"required": false;
|
|
2267
|
+
"isSignal": true;
|
|
2268
|
+
};
|
|
2269
|
+
"grouping": {
|
|
2270
|
+
"alias": "grouping";
|
|
2271
|
+
"required": false;
|
|
2272
|
+
"isSignal": true;
|
|
2273
|
+
};
|
|
2274
|
+
"prefix": {
|
|
2275
|
+
"alias": "prefix";
|
|
2276
|
+
"required": false;
|
|
2277
|
+
"isSignal": true;
|
|
2278
|
+
};
|
|
2279
|
+
"suffix": {
|
|
2280
|
+
"alias": "suffix";
|
|
2281
|
+
"required": false;
|
|
2282
|
+
"isSignal": true;
|
|
2283
|
+
};
|
|
2284
|
+
"currency": {
|
|
2285
|
+
"alias": "currency";
|
|
2286
|
+
"required": false;
|
|
2287
|
+
"isSignal": true;
|
|
2288
|
+
};
|
|
2289
|
+
"readOnly": {
|
|
2290
|
+
"alias": "readOnly";
|
|
2291
|
+
"required": false;
|
|
2292
|
+
"isSignal": true;
|
|
2293
|
+
};
|
|
2294
|
+
"invalid": {
|
|
2295
|
+
"alias": "invalid";
|
|
2296
|
+
"required": false;
|
|
2297
|
+
"isSignal": true;
|
|
2298
|
+
};
|
|
2299
|
+
"ariaLabel": {
|
|
2300
|
+
"alias": "ariaLabel";
|
|
2301
|
+
"required": false;
|
|
2302
|
+
"isSignal": true;
|
|
2303
|
+
};
|
|
2304
|
+
}, {
|
|
2305
|
+
"blurred": "blurred";
|
|
2306
|
+
"focused": "focused";
|
|
2307
|
+
"inputChanged": "inputChanged";
|
|
2308
|
+
}, never, never, true, never>;
|
|
2309
|
+
}
|
|
1550
2310
|
declare namespace sidebar_component_d_exports {
|
|
1551
2311
|
export { SidebarComponent };
|
|
1552
2312
|
}
|
|
2313
|
+
/**
|
|
2314
|
+
* The application's navigation sidebar. Loads its menus through `SidebarService`, groups them
|
|
2315
|
+
* into regions and closes itself on navigation, Escape or a click outside it on small screens.
|
|
2316
|
+
*/
|
|
1553
2317
|
export declare class SidebarComponent extends BaseComponent implements AfterViewInit, OnInit {
|
|
1554
2318
|
protected onBodyMouseDown(event: MouseEvent): void;
|
|
1555
2319
|
protected onBodyMouseUp(_event: MouseEvent): void;
|
|
@@ -1569,6 +2333,7 @@ export declare class SidebarComponent extends BaseComponent implements AfterView
|
|
|
1569
2333
|
constructor();
|
|
1570
2334
|
ngAfterViewInit(): void;
|
|
1571
2335
|
ngOnInit(): void;
|
|
2336
|
+
/** Toggles the sidebar between collapsed and expanded. Collapsing also clears the selected menus. */
|
|
1572
2337
|
collapse(): void;
|
|
1573
2338
|
protected trackByFn(_index: number, item: SidebarMenu): number;
|
|
1574
2339
|
protected trackByRegion(_index: number, region: SidebarRegion): string;
|
|
@@ -1590,18 +2355,45 @@ export declare class SidebarComponent extends BaseComponent implements AfterView
|
|
|
1590
2355
|
declare namespace ribbon_button_component_d_exports {
|
|
1591
2356
|
export { RibbonButtonComponent };
|
|
1592
2357
|
}
|
|
2358
|
+
/**
|
|
2359
|
+
* A large icon button for a `lib-ribbon-group`. With `options` it becomes a split button whose
|
|
2360
|
+
* chevron opens a dropdown list; it can also show a spinner and a brief success, warning or
|
|
2361
|
+
* failure state.
|
|
2362
|
+
*/
|
|
1593
2363
|
export declare class RibbonButtonComponent implements OnDestroy {
|
|
1594
2364
|
private readonly buttonContainer;
|
|
1595
2365
|
private readonly optionsDropdown;
|
|
2366
|
+
/** CSS class that colours the icon, the spinner and the chevron. Defaults to `text-primary-500`. */
|
|
1596
2367
|
readonly color: InputSignal<string>;
|
|
2368
|
+
/**
|
|
2369
|
+
* Index of the option the main button triggers directly when `options` is set. With `-1`, the
|
|
2370
|
+
* default, the main button opens the dropdown instead.
|
|
2371
|
+
*/
|
|
1597
2372
|
readonly defaultOption: InputSignal<number>;
|
|
2373
|
+
/** Disables the button and its dropdown. Defaults to `false`. */
|
|
1598
2374
|
readonly disabled: InputSignal<boolean>;
|
|
2375
|
+
/** Font Awesome icon class, for example `fa-save`. */
|
|
1599
2376
|
readonly icon: InputSignal<string | undefined>;
|
|
2377
|
+
/** Size of the icon: `small` or `large`. Defaults to `large`. */
|
|
1600
2378
|
readonly iconSize: InputSignal<'small' | 'large'>;
|
|
2379
|
+
/** Text under the icon, as a translation key. Hidden when the ribbon is narrow. Defaults to empty. */
|
|
1601
2380
|
readonly label: InputSignal<string>;
|
|
2381
|
+
/** Shows a spinner in place of the icon and blocks clicks while `true`. Defaults to `false`. */
|
|
1602
2382
|
readonly loading: ModelSignal<boolean>;
|
|
2383
|
+
/**
|
|
2384
|
+
* Entries of the dropdown list. When set, the button gets a chevron that opens the list. The
|
|
2385
|
+
* button is disabled when none of the options is visible. Defaults to none.
|
|
2386
|
+
*/
|
|
1603
2387
|
readonly options: InputSignal<IRibbonButtonOption[]>;
|
|
2388
|
+
/**
|
|
2389
|
+
* Hover text, shown as given; the translated label is shown on hover when it is empty. Also
|
|
2390
|
+
* names the button for screen readers, translated, when there is no label. Defaults to empty.
|
|
2391
|
+
*/
|
|
1604
2392
|
readonly tooltip: InputSignal<string>;
|
|
2393
|
+
/**
|
|
2394
|
+
* Emits when the button is activated. Carries the `id` of the chosen option, or `undefined` for
|
|
2395
|
+
* a button without options.
|
|
2396
|
+
*/
|
|
1605
2397
|
readonly action: OutputEmitterRef<string | undefined>;
|
|
1606
2398
|
protected bodyMouseDown(event: MouseEvent): void;
|
|
1607
2399
|
protected bodyMouseUp(event: MouseEvent): void;
|
|
@@ -1639,7 +2431,9 @@ export declare class RibbonButtonComponent implements OnDestroy {
|
|
|
1639
2431
|
protected onButtonClicked(): void;
|
|
1640
2432
|
protected onOptionClicked(option: IRibbonButtonOption): void;
|
|
1641
2433
|
protected onShowHideDropdown(): void;
|
|
2434
|
+
/** Ends the loading state and shows the given result on the button for one second. */
|
|
1642
2435
|
finishLoading(status: 'failure' | 'warning' | 'success'): void;
|
|
2436
|
+
/** Puts the button in its loading state, the same as setting `loading` to `true`. */
|
|
1643
2437
|
startLoading(): void;
|
|
1644
2438
|
protected isOptionDisabled(option: IRibbonButtonOption): boolean;
|
|
1645
2439
|
protected isOptionVisible(option: IRibbonButtonOption): boolean;
|
|
@@ -1716,6 +2510,10 @@ export declare class RibbonButtonComponent implements OnDestroy {
|
|
|
1716
2510
|
declare namespace ribbon_component_d_exports {
|
|
1717
2511
|
export { RibbonComponent };
|
|
1718
2512
|
}
|
|
2513
|
+
/**
|
|
2514
|
+
* The toolbar strip at the top of a view. Project `lib-ribbon-group` elements as content; content
|
|
2515
|
+
* marked with the `right` attribute is placed at the far end.
|
|
2516
|
+
*/
|
|
1719
2517
|
export declare class RibbonComponent {
|
|
1720
2518
|
static ɵfac: i0.ɵɵFactoryDeclaration<RibbonComponent, never>;
|
|
1721
2519
|
static ɵcmp: i0.ɵɵComponentDeclaration<RibbonComponent, "lib-ribbon", never, {}, {}, never, ["*", "[right]"], true, never>;
|
|
@@ -1723,8 +2521,15 @@ export declare class RibbonComponent {
|
|
|
1723
2521
|
declare namespace ribbon_group_component_d_exports {
|
|
1724
2522
|
export { RibbonGroupComponent };
|
|
1725
2523
|
}
|
|
2524
|
+
/**
|
|
2525
|
+
* A labelled group of buttons inside a `lib-ribbon`. The group hides itself when it holds no
|
|
2526
|
+
* visible `RibbonGroupChild`, such as the framework ribbon buttons. A plain `lib-ribbon-button` is
|
|
2527
|
+
* not one, so a group holding only those stays hidden.
|
|
2528
|
+
*/
|
|
1726
2529
|
export declare class RibbonGroupComponent {
|
|
2530
|
+
/** The `RibbonGroupChild` elements projected into the group, at any depth. */
|
|
1727
2531
|
readonly children: Signal<readonly RibbonGroupChild[]>;
|
|
2532
|
+
/** Caption shown under the group's buttons. Shown as given, not translated. Defaults to empty. */
|
|
1728
2533
|
label: string;
|
|
1729
2534
|
protected readonly hasChildren: Signal<boolean>;
|
|
1730
2535
|
static ɵfac: i0.ɵɵFactoryDeclaration<RibbonGroupComponent, never>;
|
|
@@ -1735,6 +2540,157 @@ export declare class RibbonGroupComponent {
|
|
|
1735
2540
|
};
|
|
1736
2541
|
}, {}, ["children"], ["*"], true, never>;
|
|
1737
2542
|
}
|
|
2543
|
+
/** The outline a skeleton stands in for. */
|
|
2544
|
+
export type SkeletonShape = 'text' | 'block' | 'circle';
|
|
2545
|
+
/**
|
|
2546
|
+
* A pulsing placeholder shown while content loads.
|
|
2547
|
+
*
|
|
2548
|
+
* The skeleton is decorative and hidden from screen readers. Mark the container that is loading
|
|
2549
|
+
* with `aria-busy="true"` instead, and clear it when the content arrives.
|
|
2550
|
+
*
|
|
2551
|
+
* The pulse stops when the user asks for reduced motion.
|
|
2552
|
+
*/
|
|
2553
|
+
export declare class SkeletonComponent {
|
|
2554
|
+
/**
|
|
2555
|
+
* The outline to draw: `text` for lines of text, `block` for an image or a card, `circle` for an
|
|
2556
|
+
* avatar. Defaults to `text`.
|
|
2557
|
+
*/
|
|
2558
|
+
readonly shape: InputSignal<SkeletonShape>;
|
|
2559
|
+
/**
|
|
2560
|
+
* Number of text lines. The last one is shorter when there is more than one, as a paragraph's
|
|
2561
|
+
* is. Only used by the `text` shape. Defaults to `1`.
|
|
2562
|
+
*/
|
|
2563
|
+
readonly lines: InputSignal<number>;
|
|
2564
|
+
/**
|
|
2565
|
+
* Width as a CSS length, e.g. `12rem` or `50%`. Defaults to the full width for `text` and
|
|
2566
|
+
* `block`, and to `2.5rem` for `circle`.
|
|
2567
|
+
*/
|
|
2568
|
+
readonly width: InputSignal<string | undefined>;
|
|
2569
|
+
/**
|
|
2570
|
+
* Height as a CSS length. For `text` it is the thickness of each line, `0.625rem` by default.
|
|
2571
|
+
* For `block` it defaults to `4rem`; a `circle` is as tall as it is wide.
|
|
2572
|
+
*/
|
|
2573
|
+
readonly height: InputSignal<string | undefined>;
|
|
2574
|
+
/** One entry per text line, at least one. */
|
|
2575
|
+
protected readonly lineIndexes: Signal<number[]>;
|
|
2576
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonComponent, never>;
|
|
2577
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonComponent, "lib-skeleton", never, {
|
|
2578
|
+
"shape": {
|
|
2579
|
+
"alias": "shape";
|
|
2580
|
+
"required": false;
|
|
2581
|
+
"isSignal": true;
|
|
2582
|
+
};
|
|
2583
|
+
"lines": {
|
|
2584
|
+
"alias": "lines";
|
|
2585
|
+
"required": false;
|
|
2586
|
+
"isSignal": true;
|
|
2587
|
+
};
|
|
2588
|
+
"width": {
|
|
2589
|
+
"alias": "width";
|
|
2590
|
+
"required": false;
|
|
2591
|
+
"isSignal": true;
|
|
2592
|
+
};
|
|
2593
|
+
"height": {
|
|
2594
|
+
"alias": "height";
|
|
2595
|
+
"required": false;
|
|
2596
|
+
"isSignal": true;
|
|
2597
|
+
};
|
|
2598
|
+
}, {}, never, never, true, never>;
|
|
2599
|
+
}
|
|
2600
|
+
/** Side of the trigger the tooltip prefers. `start` and `end` follow the text direction. */
|
|
2601
|
+
export type TooltipPosition = 'top' | 'bottom' | 'start' | 'end';
|
|
2602
|
+
/**
|
|
2603
|
+
* Shows a short themed hint next to an element, on hover and on keyboard focus.
|
|
2604
|
+
*
|
|
2605
|
+
* Use it instead of the native `title` attribute. `title` shows late, cannot be styled or themed,
|
|
2606
|
+
* never shows on keyboard focus and does nothing on touch.
|
|
2607
|
+
*
|
|
2608
|
+
* The tooltip follows WCAG 1.4.13. Escape dismisses it. The pointer can move onto it without
|
|
2609
|
+
* closing it. It stays until the pointer and focus leave, or Escape is pressed. On touch, a long
|
|
2610
|
+
* press shows it, and it hides shortly after the finger lifts.
|
|
2611
|
+
*
|
|
2612
|
+
* While the tooltip is open the trigger's `aria-describedby` points at it. When the directive sits
|
|
2613
|
+
* on a wrapper such as `lib-button`, the first focusable element inside gets the attribute
|
|
2614
|
+
* instead. Any id already there is kept, and the attribute is restored when the tooltip hides. A tooltip
|
|
2615
|
+
* describes; it does not name. An icon-only button still needs its own accessible name.
|
|
2616
|
+
*/
|
|
2617
|
+
export declare class TooltipDirective {
|
|
2618
|
+
/** The hint, as a translation key or plain text. An empty value shows no tooltip. */
|
|
2619
|
+
readonly text: InputSignal<string | null | undefined>;
|
|
2620
|
+
/**
|
|
2621
|
+
* Side of the trigger the tooltip prefers: `top`, `bottom`, `start` or `end`. It flips to another
|
|
2622
|
+
* side when there is no room. Defaults to `top`.
|
|
2623
|
+
*/
|
|
2624
|
+
readonly tooltipPosition: InputSignal<TooltipPosition>;
|
|
2625
|
+
/** Stops the tooltip from showing, and hides it if it is open. Defaults to `false`. */
|
|
2626
|
+
readonly tooltipDisabled: InputSignal<boolean>;
|
|
2627
|
+
/** Milliseconds between hover or focus and the tooltip showing. Defaults to `300`. */
|
|
2628
|
+
readonly tooltipDelay: InputSignal<number>;
|
|
2629
|
+
private static instances;
|
|
2630
|
+
private readonly tooltipId;
|
|
2631
|
+
private readonly host;
|
|
2632
|
+
private readonly overlay;
|
|
2633
|
+
private readonly renderer;
|
|
2634
|
+
private readonly viewContainerRef;
|
|
2635
|
+
private overlayRef?;
|
|
2636
|
+
private tooltipRef?;
|
|
2637
|
+
private removeListeners;
|
|
2638
|
+
private describedElement?;
|
|
2639
|
+
private previousDescribedBy;
|
|
2640
|
+
private showTimer?;
|
|
2641
|
+
private hideTimer?;
|
|
2642
|
+
private lastTouch;
|
|
2643
|
+
/** Hides this tooltip; also how another tooltip closes it, through `hideOpenTooltip`. */
|
|
2644
|
+
private readonly hideThis;
|
|
2645
|
+
private isHostHovered;
|
|
2646
|
+
private isTooltipHovered;
|
|
2647
|
+
private isFocused;
|
|
2648
|
+
constructor();
|
|
2649
|
+
protected onMouseEnter(): void;
|
|
2650
|
+
protected onMouseLeave(): void;
|
|
2651
|
+
protected onFocusIn(): void;
|
|
2652
|
+
protected onFocusOut(): void;
|
|
2653
|
+
protected onTouchStart(): void;
|
|
2654
|
+
protected onTouchEnd(): void;
|
|
2655
|
+
/** Shows the tooltip now, without the delay. Does nothing when disabled or empty. */
|
|
2656
|
+
show(): void;
|
|
2657
|
+
/** Hides the tooltip now and gives the trigger back its own `aria-describedby`. */
|
|
2658
|
+
hide(): void;
|
|
2659
|
+
private scheduleShow;
|
|
2660
|
+
/** Hides after a short grace, unless the pointer or focus is still on the trigger or the tooltip. */
|
|
2661
|
+
private scheduleHideIfIdle;
|
|
2662
|
+
/**
|
|
2663
|
+
* The element a screen reader announces on focus. On a wrapper such as `lib-button` that is the
|
|
2664
|
+
* native control inside it, not the wrapper itself.
|
|
2665
|
+
*/
|
|
2666
|
+
private findDescribedElement;
|
|
2667
|
+
private isEmulatedMouse;
|
|
2668
|
+
private clearShowTimer;
|
|
2669
|
+
private clearHideTimer;
|
|
2670
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
2671
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[libTooltip]", never, {
|
|
2672
|
+
"text": {
|
|
2673
|
+
"alias": "libTooltip";
|
|
2674
|
+
"required": false;
|
|
2675
|
+
"isSignal": true;
|
|
2676
|
+
};
|
|
2677
|
+
"tooltipPosition": {
|
|
2678
|
+
"alias": "tooltipPosition";
|
|
2679
|
+
"required": false;
|
|
2680
|
+
"isSignal": true;
|
|
2681
|
+
};
|
|
2682
|
+
"tooltipDisabled": {
|
|
2683
|
+
"alias": "tooltipDisabled";
|
|
2684
|
+
"required": false;
|
|
2685
|
+
"isSignal": true;
|
|
2686
|
+
};
|
|
2687
|
+
"tooltipDelay": {
|
|
2688
|
+
"alias": "tooltipDelay";
|
|
2689
|
+
"required": false;
|
|
2690
|
+
"isSignal": true;
|
|
2691
|
+
};
|
|
2692
|
+
}, {}, never, never, true, never>;
|
|
2693
|
+
}
|
|
1738
2694
|
export declare class DateHelpers {
|
|
1739
2695
|
static diffDays(initialDate: Date, finalDate: Date): number;
|
|
1740
2696
|
}
|
|
@@ -1772,9 +2728,99 @@ export declare class GuidHelper {
|
|
|
1772
2728
|
export declare abstract class RouterFormatter {
|
|
1773
2729
|
static getURL(route: ActivatedRouteSnapshot): string;
|
|
1774
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Formatting and parsing of dates and numbers for a given locale, built on the browser's `Intl`.
|
|
2733
|
+
*
|
|
2734
|
+
* `Intl` knows every locale the browser knows, so nothing here needs Angular's locale data to be
|
|
2735
|
+
* registered. That is what lets a field follow the language the application chose rather than the
|
|
2736
|
+
* one the operating system is set to.
|
|
2737
|
+
*/
|
|
2738
|
+
/** A date part, in the order a locale writes it. */
|
|
2739
|
+
export type DatePart = 'day' | 'month' | 'year';
|
|
2740
|
+
/** How a locale writes a short numeric date: the part order and the separator between parts. */
|
|
2741
|
+
export interface DatePattern {
|
|
2742
|
+
/** Parts in the order the locale writes them, e.g. `['day', 'month', 'year']` for `pt-BR`. */
|
|
2743
|
+
order: DatePart[];
|
|
2744
|
+
/** Text between parts, e.g. `/` or `.`. */
|
|
2745
|
+
separator: string;
|
|
2746
|
+
}
|
|
2747
|
+
/** Decimal and grouping separators of a locale. */
|
|
2748
|
+
export interface NumberSeparators {
|
|
2749
|
+
/** Decimal separator, e.g. `,` for `pt-BR`. */
|
|
2750
|
+
decimal: string;
|
|
2751
|
+
/** Grouping separator, e.g. `.` for `pt-BR`. May be a non-breaking space. */
|
|
2752
|
+
group: string;
|
|
2753
|
+
}
|
|
2754
|
+
/** Options for {@link formatLocaleNumber}. */
|
|
2755
|
+
export interface LocaleNumberOptions {
|
|
2756
|
+
/** Fewest digits after the decimal separator. Defaults to `0`. */
|
|
2757
|
+
minFractionDigits?: number;
|
|
2758
|
+
/** Most digits after the decimal separator. Defaults to `3`. */
|
|
2759
|
+
maxFractionDigits?: number;
|
|
2760
|
+
/** Whether to group thousands. Defaults to `true`. */
|
|
2761
|
+
grouping?: boolean;
|
|
2762
|
+
}
|
|
2763
|
+
/** Whether `locale` is a tag `Intl` accepts. */
|
|
2764
|
+
export declare function isValidLocale(locale: unknown): locale is string;
|
|
2765
|
+
/** The order and separator of a short numeric date in `locale`. */
|
|
2766
|
+
export declare function getDatePattern(locale: string): DatePattern;
|
|
2767
|
+
/** A short numeric date in `locale`, e.g. `05/12/2026` in `pt-BR` and `12/05/2026` in `en-US`. */
|
|
2768
|
+
export declare function formatDateText(date: Date, locale: string): string;
|
|
2769
|
+
/**
|
|
2770
|
+
* Reads a date typed in `locale`'s order. Accepts any non-digit separator, digits only
|
|
2771
|
+
* (`05122026`), a two-digit year (read as 20xx), and an ISO date (`2026-12-05`). Returns `null`
|
|
2772
|
+
* for empty text and for text that is not a real date.
|
|
2773
|
+
*/
|
|
2774
|
+
export declare function parseDateText(text: string, locale: string): Date | null;
|
|
2775
|
+
/** Whether `locale` shows the time on a 12-hour clock. */
|
|
2776
|
+
export declare function uses12HourClock(locale: string): boolean;
|
|
2777
|
+
/** A time of day in `locale`, e.g. `14:30` in `pt-BR` and `02:30 PM` in `en-US`. */
|
|
2778
|
+
export declare function formatTimeText(date: Date, locale: string): string;
|
|
2779
|
+
/**
|
|
2780
|
+
* Reads a typed time: `14:30`, `1430`, `9`, `2:30 pm`, `2:30 p.m.`. Returns the hours (0-23) and
|
|
2781
|
+
* minutes, or `null` for empty or invalid text.
|
|
2782
|
+
*/
|
|
2783
|
+
export declare function parseTimeText(text: string): {
|
|
2784
|
+
hours: number;
|
|
2785
|
+
minutes: number;
|
|
2786
|
+
} | null;
|
|
2787
|
+
/** A date written the way the API and the native date input write it: `yyyy-MM-dd`. */
|
|
2788
|
+
export declare function toIsoDate(date: Date): string;
|
|
2789
|
+
/** A local date and time written the way the native `datetime-local` input writes it: `yyyy-MM-ddTHH:mm`. */
|
|
2790
|
+
export declare function toIsoDateTime(date: Date): string;
|
|
2791
|
+
/**
|
|
2792
|
+
* Reads a value a form control may hold: a `Date`, `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm[:ss]`, or any
|
|
2793
|
+
* other string `Date` can parse. A date or date-time with no zone is read as local time, as the
|
|
2794
|
+
* native inputs do. Returns `null` for empty or invalid values.
|
|
2795
|
+
*/
|
|
2796
|
+
export declare function parseIsoValue(value: unknown): Date | null;
|
|
2797
|
+
/** The first day of the week in `locale`, as `Date.getDay()` numbers it: `0` is Sunday. */
|
|
2798
|
+
export declare function getFirstDayOfWeek(locale: string): number;
|
|
2799
|
+
/** The decimal and grouping separators of `locale`. */
|
|
2800
|
+
export declare function getNumberSeparators(locale: string): NumberSeparators;
|
|
2801
|
+
/** A number in `locale`, e.g. `1.234,5` in `pt-BR`. */
|
|
2802
|
+
export declare function formatLocaleNumber(value: number, locale: string, options?: LocaleNumberOptions): string;
|
|
2803
|
+
/**
|
|
2804
|
+
* Reads a number typed in `locale`. Spaces are ignored. Grouping separators are accepted only
|
|
2805
|
+
* between groups of three digits, so `1.5` in `pt-BR` is not a number rather than 15. The decimal
|
|
2806
|
+
* separator is the locale's. Returns `null` for empty text and `NaN` for text that is not a number.
|
|
2807
|
+
*/
|
|
2808
|
+
export declare function parseLocaleNumber(text: string, locale: string): number | null;
|
|
2809
|
+
/**
|
|
2810
|
+
* Reads an Angular `DecimalPipe` digits string, `{minInt}.{minFrac}-{maxFrac}`, into fraction-digit
|
|
2811
|
+
* limits. Returns `undefined` when `digitsInfo` is empty or malformed.
|
|
2812
|
+
*/
|
|
2813
|
+
export declare function parseDigitsInfo(digitsInfo: string | undefined): {
|
|
2814
|
+
minFractionDigits: number;
|
|
2815
|
+
maxFractionDigits: number;
|
|
2816
|
+
} | undefined;
|
|
1775
2817
|
declare namespace enum_d_exports {
|
|
1776
2818
|
export { EnumTranslatePipe };
|
|
1777
2819
|
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Turns a TypeScript enum into a list of `{ value, display }` options, where `display` is an
|
|
2822
|
+
* observable of the translated enum key. Use it to fill a select from an enum.
|
|
2823
|
+
*/
|
|
1778
2824
|
export declare class EnumTranslatePipe implements PipeTransform {
|
|
1779
2825
|
private translate;
|
|
1780
2826
|
transform(enumType: any): Array<{
|
|
@@ -1787,6 +2833,10 @@ export declare class EnumTranslatePipe implements PipeTransform {
|
|
|
1787
2833
|
declare namespace replace_pipe_d_exports {
|
|
1788
2834
|
export { ReplacePipe };
|
|
1789
2835
|
}
|
|
2836
|
+
/**
|
|
2837
|
+
* Replaces one substring in a string, for example `label | replace: '{0}': count`. Only the first
|
|
2838
|
+
* occurrence is replaced; a `null` or `undefined` replacement becomes an empty string.
|
|
2839
|
+
*/
|
|
1790
2840
|
export declare class ReplacePipe implements PipeTransform {
|
|
1791
2841
|
transform(message: string, searchValue: string, replaceValue?: string | null): string;
|
|
1792
2842
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
|
|
@@ -1795,6 +2845,11 @@ export declare class ReplacePipe implements PipeTransform {
|
|
|
1795
2845
|
declare namespace replace_many_pipe_d_exports {
|
|
1796
2846
|
export { ReplaceManyPipe };
|
|
1797
2847
|
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Replaces several placeholders in a string, for example
|
|
2850
|
+
* `'Hello {name}' | replaceMany: { '{name}': user.name }`. Only the first occurrence of each key
|
|
2851
|
+
* is replaced; a `null` or `undefined` value becomes an empty string.
|
|
2852
|
+
*/
|
|
1798
2853
|
export declare class ReplaceManyPipe implements PipeTransform {
|
|
1799
2854
|
transform(message: string, replaceArgs?: {
|
|
1800
2855
|
[id: string]: string | null | undefined;
|
|
@@ -1824,4 +2879,4 @@ export declare class DateValidators {
|
|
|
1824
2879
|
static maxDate(maxDate: Date): ValidatorFn;
|
|
1825
2880
|
static minDate(minDate: Date): ValidatorFn;
|
|
1826
2881
|
}
|
|
1827
|
-
export type { ButtonIntent };
|
|
2882
|
+
export type { ButtonIntent, DateInputMode };
|