@zambon-dev/ui 1.5.0 → 1.6.1

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.
@@ -1,9 +1,44 @@
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
+ }
7
42
  /**
8
43
  * Abstract base for the library's components. Gives subclasses a `destroy$` subject that emits
9
44
  * and completes when the component is destroyed, for ending subscriptions with `takeUntil`.
@@ -96,6 +131,105 @@ export declare class ButtonComponent {
96
131
  };
97
132
  }, {}, never, ["*"], true, never>;
98
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
+ }
99
233
  export interface IBatchUpdate<TEntity, TKey> {
100
234
  entitiesToDelete: Array<TKey>;
101
235
  entitiesToInsertOrUpdate: Array<TEntity>;
@@ -129,6 +263,7 @@ export type GridConfigs = {
129
263
  rowsToDisplay: number;
130
264
  };
131
265
  export type DataGridConfigs = GridConfigs & {
266
+ /** Drops the grid's outline and rounded corner, for a grid that sits inside a card of its own. */
132
267
  hideBorders?: boolean;
133
268
  hideColumnHeaders?: boolean;
134
269
  multiSelect?: boolean;
@@ -311,9 +446,16 @@ declare namespace catalog_select_component_d_exports {
311
446
  export { CatalogSelectComponent };
312
447
  }
313
448
  /**
314
- * A labelled searchable dropdown. It lists entries from a static `entriesList` or from a
315
- * `searchEndpoint`, writes the chosen value to `controlName` and its text to `displayControlName`
316
- * in the surrounding form group.
449
+ * A labelled field that picks one entry from a catalog. It works in one of two modes:
450
+ *
451
+ * - **Fixed list.** Pass the entries in `entriesList`, such as the members of an enum or
452
+ * Yes/No/Maybe. No backend call is made. For a short list, set `searchable` to `false` and the
453
+ * field becomes a plain picker.
454
+ * - **Search endpoint.** Set `searchEndpoint`, and the entries are searched on your API as the
455
+ * user types.
456
+ *
457
+ * Either way it writes the chosen value to `controlName` and its text to `displayControlName` in
458
+ * the surrounding form group.
317
459
  */
318
460
  export declare class CatalogSelectComponent extends BaseComponent implements OnInit, AfterViewInit, OnDestroy {
319
461
  protected bodyMouseDown(event: MouseEvent): void;
@@ -329,7 +471,8 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
329
471
  /** Property of each `entriesList` item that holds its text. Defaults to `display`. */
330
472
  readonly displayProperty: InputSignal<string>;
331
473
  /**
332
- * Static entries to choose from when there is no `searchEndpoint`. Each item's text and value
474
+ * The entries of the fixed-list mode, used when there is no `searchEndpoint`. No backend call is
475
+ * made for them. Each item's text and value
333
476
  * are read from `displayProperty` and `valueProperty`; the text may be an observable, such as
334
477
  * a translation. Setting a new list refreshes the dropdown.
335
478
  */
@@ -374,8 +517,9 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
374
517
  */
375
518
  readonly searchable: InputSignal<boolean>;
376
519
  /**
377
- * URL the entries are searched from, with a POST of `{ maxResults, criteria, filters }`. When
378
- * empty, `entriesList` is used instead. Changing it starts the search over.
520
+ * URL of the search-endpoint mode. The entries are searched there with a POST of
521
+ * `{ maxResults, criteria, filters }`. When empty, the field uses the fixed `entriesList` and
522
+ * calls no backend. Changing it starts the search over.
379
523
  */
380
524
  set searchEndpoint(value: string | undefined);
381
525
  /** Messages per validation error key of `controlName`, as translation keys. Defaults to none. */
@@ -829,6 +973,32 @@ export declare class FormService {
829
973
  static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
830
974
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
831
975
  }
976
+ /**
977
+ * The locale of the language the application shows, as a signal.
978
+ *
979
+ * Angular's `LOCALE_ID` is fixed when the application starts, but the language can change at run
980
+ * time through ngx-translate. Date and number fields read this service instead, so they follow the
981
+ * language the user picked rather than the browser's or the start-up one.
982
+ *
983
+ * The locale comes from, in order:
984
+ *
985
+ * 1. The `locale` translation key of the current language (the framework files ship `en-US` and
986
+ * `pt-BR`).
987
+ * 2. The current ngx-translate language code, when it is a valid locale tag.
988
+ * 3. Angular's `LOCALE_ID`.
989
+ */
990
+ export declare class LocaleService {
991
+ private readonly fallbackLocale;
992
+ private readonly translate;
993
+ /** Bumped whenever the language or its translations change, so `locale` reads them again. */
994
+ private readonly languageChanged;
995
+ /** The current locale tag, such as `pt-BR`. Updates when the application language changes. */
996
+ readonly locale: Signal<string>;
997
+ constructor();
998
+ private resolveLocale;
999
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService, never>;
1000
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1001
+ }
832
1002
  /**
833
1003
  * Loads and tracks the menus of `lib-sidebar`: the tree, the selected item and the collapsed and
834
1004
  * open states. Extend it and implement `loadMenus`, `getMenuFromUrl` and `getUserProfile`.
@@ -1029,6 +1199,148 @@ export declare class DataGridRowComponent extends BaseComponent implements OnIni
1029
1199
  "selectionResized": "selectionResized";
1030
1200
  }, never, never, true, never>;
1031
1201
  }
1202
+ /** What a `lib-date-input` holds: a day, or a day and a time. */
1203
+ type DateInputMode = 'date' | 'datetime';
1204
+ /**
1205
+ * A date field, or a date and time field, that follows the application's language.
1206
+ *
1207
+ * The native `<input type="date">` shows dates in the operating system's format, whatever language
1208
+ * the application is in. This field shows and reads dates in the language the application chose
1209
+ * (see `LocaleService`): `05/12/2026` in Portuguese, `12/05/2026` in English. The user can type the
1210
+ * date or pick it from a calendar (the calendar button, or Alt+Down in the field).
1211
+ *
1212
+ * It is a form control. The value has the same shape the native inputs give, so it can replace them
1213
+ * without changing what the form holds:
1214
+ *
1215
+ * - `date` mode: a `yyyy-MM-dd` string, such as `2026-12-05`.
1216
+ * - `datetime` mode: a local `yyyy-MM-ddTHH:mm` string, such as `2026-12-05T14:30`.
1217
+ * - `null` when the field is empty or the text is not a valid date.
1218
+ *
1219
+ * It also accepts a `Date` as the value. It adds these validation errors: `dateInvalid` when the
1220
+ * text is not a date, `dateMin` and `dateMax` when the date is outside `min` and `max`.
1221
+ */
1222
+ export declare class DateInputComponent implements ControlValueAccessor, Validator, OnDestroy {
1223
+ /** Whether the field holds a day (`date`) or a day and a time (`datetime`). Defaults to `date`. */
1224
+ readonly mode: InputSignal<DateInputMode>;
1225
+ /** Earliest allowed day: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
1226
+ readonly min: InputSignal<Date | string | null | undefined>;
1227
+ /** Latest allowed day: a `Date` or a `yyyy-MM-dd` string. Defaults to no limit. */
1228
+ readonly max: InputSignal<Date | string | null | undefined>;
1229
+ /** Lets the user see and focus the value but not change it. Defaults to `false`. */
1230
+ readonly readOnly: InputSignal<boolean>;
1231
+ /** Shows the field as invalid, for example when the form was touched. Defaults to `false`. */
1232
+ readonly invalid: InputSignal<boolean>;
1233
+ /** Accessible name of the date text field, when no visible label names it. Defaults to none. */
1234
+ readonly ariaLabel: InputSignal<string | undefined>;
1235
+ /** Emits when a text field of the input loses focus. */
1236
+ readonly blurred: OutputEmitterRef<void>;
1237
+ /** Emits when a text field of the input gains focus. */
1238
+ readonly focused: OutputEmitterRef<void>;
1239
+ /** Emits on every keystroke in a text field. */
1240
+ readonly inputChanged: OutputEmitterRef<void>;
1241
+ private readonly injector;
1242
+ private readonly localeService;
1243
+ private readonly overlay;
1244
+ private readonly viewContainerRef;
1245
+ private readonly container;
1246
+ private readonly dateField;
1247
+ private readonly calendarTemplate;
1248
+ private overlayRef?;
1249
+ private onChange;
1250
+ private onTouched;
1251
+ private onValidatorChange;
1252
+ /** The current value as a date, or `null`. */
1253
+ private readonly current;
1254
+ /** Set when the typed text could not be read as a date or time. */
1255
+ private readonly hasTypingError;
1256
+ /** The calendar's id, which the date field points at with `aria-controls` while it is open. */
1257
+ protected readonly calendarId: string;
1258
+ protected readonly isDisabled: WritableSignal<boolean>;
1259
+ protected readonly isOpen: WritableSignal<boolean>;
1260
+ protected readonly locale: Signal<string>;
1261
+ /** The text in the date field. Follows the value and the language, and the user's typing in between. */
1262
+ protected readonly dateText: WritableSignal<string>;
1263
+ /** The text in the time field. Follows the value and the language, and the user's typing in between. */
1264
+ protected readonly timeText: WritableSignal<string>;
1265
+ /** The date order in the language's own words, such as `dia/mês/ano`. */
1266
+ protected readonly datePlaceholder: Signal<string>;
1267
+ /**
1268
+ * Accessible name of the time field: the field's name, if any, then the word for "hour" in the
1269
+ * application's language, from `Intl` so the library needs no translation key.
1270
+ */
1271
+ protected readonly timeLabel: Signal<string>;
1272
+ protected readonly calendarSelection: Signal<Date | null>;
1273
+ protected readonly isFieldInvalid: Signal<boolean>;
1274
+ constructor();
1275
+ ngOnDestroy(): void;
1276
+ /** Sets the value from the form. Accepts a `Date`, `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` or `null`. */
1277
+ writeValue(value: unknown): void;
1278
+ /** Registers the form's change callback. */
1279
+ registerOnChange(fn: (value: string | null) => void): void;
1280
+ /** Registers the form's touched callback. */
1281
+ registerOnTouched(fn: () => void): void;
1282
+ /** Enables or disables the field from the form. */
1283
+ setDisabledState(isDisabled: boolean): void;
1284
+ /** Reports `dateInvalid`, `dateMin` and `dateMax`. */
1285
+ validate(_control: AbstractControl): ValidationErrors | null;
1286
+ /** Registers the callback that re-runs validation. */
1287
+ registerOnValidatorChange(fn: () => void): void;
1288
+ protected onDateTyped(event: Event): void;
1289
+ protected onTimeTyped(event: Event): void;
1290
+ protected onFieldFocus(event: FocusEvent): void;
1291
+ protected onFieldBlur(event: FocusEvent): void;
1292
+ protected onFieldKeydown(event: KeyboardEvent): void;
1293
+ protected onToggleClick(): void;
1294
+ protected onDatePicked(day: Date): void;
1295
+ protected onCalendarCancelled(): void;
1296
+ /** Opens the calendar, unless the field is disabled or read-only. */
1297
+ open(): void;
1298
+ /** Closes the calendar. With `returnFocus`, focus goes back to the date field. */
1299
+ close(returnFocus: boolean): void;
1300
+ private isInsideField;
1301
+ /** Reads what the user typed and turns it into the value. */
1302
+ private commitText;
1303
+ private setValue;
1304
+ private serialize;
1305
+ private disposeOverlay;
1306
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
1307
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "lib-date-input", never, {
1308
+ "mode": {
1309
+ "alias": "mode";
1310
+ "required": false;
1311
+ "isSignal": true;
1312
+ };
1313
+ "min": {
1314
+ "alias": "min";
1315
+ "required": false;
1316
+ "isSignal": true;
1317
+ };
1318
+ "max": {
1319
+ "alias": "max";
1320
+ "required": false;
1321
+ "isSignal": true;
1322
+ };
1323
+ "readOnly": {
1324
+ "alias": "readOnly";
1325
+ "required": false;
1326
+ "isSignal": true;
1327
+ };
1328
+ "invalid": {
1329
+ "alias": "invalid";
1330
+ "required": false;
1331
+ "isSignal": true;
1332
+ };
1333
+ "ariaLabel": {
1334
+ "alias": "ariaLabel";
1335
+ "required": false;
1336
+ "isSignal": true;
1337
+ };
1338
+ }, {
1339
+ "blurred": "blurred";
1340
+ "focused": "focused";
1341
+ "inputChanged": "inputChanged";
1342
+ }, never, never, true, never>;
1343
+ }
1032
1344
  declare namespace form_input_component_d_exports {
1033
1345
  export { FormInputComponent };
1034
1346
  }
@@ -1065,13 +1377,18 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
1065
1377
  /**
1066
1378
  * Kind of field: `textarea`, `checkbox` (shown as a switch), or any native input type such as
1067
1379
  * `text`, `number`, `date` or `datetime-local`. Defaults to `text`.
1380
+ *
1381
+ * `date` and `datetime-local` render `lib-date-input`, and `number` renders `lib-number-input`, so
1382
+ * dates and numbers show and are typed in the application's language. The control's value keeps
1383
+ * the native shape: `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` or a number.
1068
1384
  */
1069
1385
  readonly type: InputSignal<string>;
1070
1386
  /** Value shown and edited when there is no `controlName`. Supports two-way binding. */
1071
1387
  readonly fixedValue: ModelSignal<any>;
1072
1388
  /**
1073
1389
  * Display format for the read-only value: a `DatePipe` pattern for date types, or a
1074
- * `DecimalPipe` digits string for `number`. A `date` field defaults to `yyyy-MM-dd`.
1390
+ * `DecimalPipe` digits string for `number`, such as `1.2-2`. Without it, dates show in the
1391
+ * application's language (`05/12/2026` in Portuguese) and numbers with up to three decimals.
1075
1392
  */
1076
1393
  readonly format: ModelSignal<string | undefined>;
1077
1394
  /** Emits when the input loses focus. */
@@ -1087,6 +1404,8 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
1087
1404
  protected readonly formGroupDirective: FormGroupDirective;
1088
1405
  protected readonly formGroupName: FormGroupName;
1089
1406
  protected readonly formService: FormService;
1407
+ private readonly angularLocale;
1408
+ private readonly localeService;
1090
1409
  /**
1091
1410
  * Bumped on every event the form emits -- a status change, a value change, a reset.
1092
1411
  *
@@ -1106,6 +1425,15 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
1106
1425
  protected readonly isEditable: Signal<boolean>;
1107
1426
  /** What the read-only face shows: the fixed value, or else the control's current value. */
1108
1427
  protected readonly shownValue: Signal<any>;
1428
+ /** The read-only face's text, in the application's language. */
1429
+ protected readonly shownText: Signal<string>;
1430
+ /** The text of the disabled input that shows `fixedValue`, in the application's language. */
1431
+ protected readonly fixedText: Signal<string>;
1432
+ /** Fraction digits for a number field, read from `format`. */
1433
+ protected readonly numberDigits: Signal<{
1434
+ minFractionDigits: number;
1435
+ maxFractionDigits: number;
1436
+ }>;
1109
1437
  protected get formControl(): FormControl<any> | null;
1110
1438
  protected get formControlName(): string;
1111
1439
  protected get formGroup(): FormGroup;
@@ -1120,6 +1448,12 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
1120
1448
  protected onFocus(): void;
1121
1449
  protected onInput(): void;
1122
1450
  protected onValueChanged(newText: string): void;
1451
+ /**
1452
+ * Formats a value for the read-only face. Dates and numbers follow the application's language
1453
+ * (`LocaleService`). An explicit `format` on a date field is still a `DatePipe` pattern; on a
1454
+ * number field it is a `DecimalPipe` digits string, applied in the application's language.
1455
+ */
1456
+ private toDisplayText;
1123
1457
  static ɵfac: i0.ɵɵFactoryDeclaration<FormInputComponent, never>;
1124
1458
  static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "lib-form-input", never, {
1125
1459
  "autofocus": {
@@ -1800,6 +2134,180 @@ export declare class MultiSelectResultGridComponent extends BaseComponent implem
1800
2134
  };
1801
2135
  }, {}, never, never, true, never>;
1802
2136
  }
2137
+ /** The symbol a currency shows and the side it sits on, in one locale. */
2138
+ interface CurrencyAffix {
2139
+ symbol: string;
2140
+ position: 'prefix' | 'suffix';
2141
+ fractionDigits: number;
2142
+ }
2143
+ /**
2144
+ * A number field that follows the application's language.
2145
+ *
2146
+ * The native `<input type="number">` reads the decimal separator from the browser, so a user whose
2147
+ * browser is in English types `1.5` in an application shown in Portuguese, where `1,5` is expected.
2148
+ * This field reads and writes numbers in the language the application chose (see `LocaleService`):
2149
+ * `1.234,56` in Portuguese and `1,234.56` in English.
2150
+ *
2151
+ * While the field has focus it shows the number without thousands separators, to make editing easy.
2152
+ * When it loses focus it rounds to `decimals` and shows the separators again.
2153
+ *
2154
+ * It is a form control. The value is a `number`, or `null` when the field is empty or the text is
2155
+ * not a number. It adds these validation errors: `numberInvalid` when the text is not a number,
2156
+ * and `min` and `max`, with the same shape as Angular's own validators.
2157
+ *
2158
+ * The decimal key of the numeric keypad types the language's decimal separator. The arrow keys
2159
+ * add or subtract `step`.
2160
+ */
2161
+ export declare class NumberInputComponent implements ControlValueAccessor, Validator {
2162
+ /** Smallest allowed value. Defaults to no limit. */
2163
+ readonly min: InputSignal<number | null | undefined>;
2164
+ /** Largest allowed value. Defaults to no limit. */
2165
+ readonly max: InputSignal<number | null | undefined>;
2166
+ /** How much the arrow keys add or subtract. Defaults to `1`. */
2167
+ readonly step: InputSignal<number>;
2168
+ /**
2169
+ * Most digits after the decimal separator; the value is rounded to it when the field loses
2170
+ * focus. `0` makes an integer field. Defaults to `3`, or to the currency's digits with `currency`.
2171
+ */
2172
+ readonly decimals: InputSignal<number | undefined>;
2173
+ /**
2174
+ * Fewest digits shown after the decimal separator, such as `2` to show `10,00`. Defaults to `0`,
2175
+ * or to the currency's digits with `currency`.
2176
+ */
2177
+ readonly minDecimals: InputSignal<number | undefined>;
2178
+ /** Whether to show thousands separators when the field does not have focus. Defaults to `true`. */
2179
+ readonly grouping: InputSignal<boolean>;
2180
+ /** Text shown before the number, such as `R$`. Overrides the currency symbol. Defaults to none. */
2181
+ readonly prefix: InputSignal<string | undefined>;
2182
+ /** Text shown after the number, such as `%` or `kg`. Overrides the currency symbol. Defaults to none. */
2183
+ readonly suffix: InputSignal<string | undefined>;
2184
+ /**
2185
+ * ISO 4217 currency code, such as `BRL` or `USD`. Shows the currency symbol on the side the
2186
+ * language puts it, and sets the decimals the currency uses. The value stays a plain number.
2187
+ * Defaults to none.
2188
+ */
2189
+ readonly currency: InputSignal<string | undefined>;
2190
+ /** Lets the user see and focus the value but not change it. Defaults to `false`. */
2191
+ readonly readOnly: InputSignal<boolean>;
2192
+ /** Shows the field as invalid, for example when the form was touched. Defaults to `false`. */
2193
+ readonly invalid: InputSignal<boolean>;
2194
+ /** Accessible name of the field, when no visible label names it. Defaults to none. */
2195
+ readonly ariaLabel: InputSignal<string | undefined>;
2196
+ /** Emits when the field loses focus. */
2197
+ readonly blurred: OutputEmitterRef<void>;
2198
+ /** Emits when the field gains focus. */
2199
+ readonly focused: OutputEmitterRef<void>;
2200
+ /** Emits on every keystroke. */
2201
+ readonly inputChanged: OutputEmitterRef<void>;
2202
+ private readonly localeService;
2203
+ private onChange;
2204
+ private onTouched;
2205
+ private onValidatorChange;
2206
+ private readonly current;
2207
+ private readonly hasTypingError;
2208
+ private readonly hasFocus;
2209
+ /** Whether the user typed since the field gained focus. Only typed values are rounded. */
2210
+ private wasEdited;
2211
+ protected readonly isDisabled: WritableSignal<boolean>;
2212
+ protected readonly locale: Signal<string>;
2213
+ protected readonly currencyAffix: Signal<CurrencyAffix | null>;
2214
+ protected readonly prefixText: Signal<string | undefined>;
2215
+ protected readonly suffixText: Signal<string | undefined>;
2216
+ protected readonly maxDecimals: Signal<number>;
2217
+ protected readonly fixedDecimals: Signal<number>;
2218
+ /** The text in the field. Follows the value, the language and focus, and the user's typing in between. */
2219
+ protected readonly text: WritableSignal<string>;
2220
+ protected readonly inputMode: Signal<string>;
2221
+ protected readonly isFieldInvalid: Signal<boolean>;
2222
+ constructor();
2223
+ /** Sets the value from the form. Accepts a number, a numeric string such as `"12.5"`, or `null`. */
2224
+ writeValue(value: unknown): void;
2225
+ /** Registers the form's change callback. */
2226
+ registerOnChange(fn: (value: number | null) => void): void;
2227
+ /** Registers the form's touched callback. */
2228
+ registerOnTouched(fn: () => void): void;
2229
+ /** Enables or disables the field from the form. */
2230
+ setDisabledState(isDisabled: boolean): void;
2231
+ /** Reports `numberInvalid`, `min` and `max`. */
2232
+ validate(_control: AbstractControl): ValidationErrors | null;
2233
+ /** Registers the callback that re-runs validation. */
2234
+ registerOnValidatorChange(fn: () => void): void;
2235
+ protected onFocus(): void;
2236
+ protected onBlur(): void;
2237
+ protected onTyped(event: Event): void;
2238
+ protected onKeydown(event: KeyboardEvent): void;
2239
+ private setValue;
2240
+ private round;
2241
+ private clamp;
2242
+ private insertText;
2243
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberInputComponent, never>;
2244
+ static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent, "lib-number-input", never, {
2245
+ "min": {
2246
+ "alias": "min";
2247
+ "required": false;
2248
+ "isSignal": true;
2249
+ };
2250
+ "max": {
2251
+ "alias": "max";
2252
+ "required": false;
2253
+ "isSignal": true;
2254
+ };
2255
+ "step": {
2256
+ "alias": "step";
2257
+ "required": false;
2258
+ "isSignal": true;
2259
+ };
2260
+ "decimals": {
2261
+ "alias": "decimals";
2262
+ "required": false;
2263
+ "isSignal": true;
2264
+ };
2265
+ "minDecimals": {
2266
+ "alias": "minDecimals";
2267
+ "required": false;
2268
+ "isSignal": true;
2269
+ };
2270
+ "grouping": {
2271
+ "alias": "grouping";
2272
+ "required": false;
2273
+ "isSignal": true;
2274
+ };
2275
+ "prefix": {
2276
+ "alias": "prefix";
2277
+ "required": false;
2278
+ "isSignal": true;
2279
+ };
2280
+ "suffix": {
2281
+ "alias": "suffix";
2282
+ "required": false;
2283
+ "isSignal": true;
2284
+ };
2285
+ "currency": {
2286
+ "alias": "currency";
2287
+ "required": false;
2288
+ "isSignal": true;
2289
+ };
2290
+ "readOnly": {
2291
+ "alias": "readOnly";
2292
+ "required": false;
2293
+ "isSignal": true;
2294
+ };
2295
+ "invalid": {
2296
+ "alias": "invalid";
2297
+ "required": false;
2298
+ "isSignal": true;
2299
+ };
2300
+ "ariaLabel": {
2301
+ "alias": "ariaLabel";
2302
+ "required": false;
2303
+ "isSignal": true;
2304
+ };
2305
+ }, {
2306
+ "blurred": "blurred";
2307
+ "focused": "focused";
2308
+ "inputChanged": "inputChanged";
2309
+ }, never, never, true, never>;
2310
+ }
1803
2311
  declare namespace sidebar_component_d_exports {
1804
2312
  export { SidebarComponent };
1805
2313
  }
@@ -2033,6 +2541,157 @@ export declare class RibbonGroupComponent {
2033
2541
  };
2034
2542
  }, {}, ["children"], ["*"], true, never>;
2035
2543
  }
2544
+ /** The outline a skeleton stands in for. */
2545
+ export type SkeletonShape = 'text' | 'block' | 'circle';
2546
+ /**
2547
+ * A pulsing placeholder shown while content loads.
2548
+ *
2549
+ * The skeleton is decorative and hidden from screen readers. Mark the container that is loading
2550
+ * with `aria-busy="true"` instead, and clear it when the content arrives.
2551
+ *
2552
+ * The pulse stops when the user asks for reduced motion.
2553
+ */
2554
+ export declare class SkeletonComponent {
2555
+ /**
2556
+ * The outline to draw: `text` for lines of text, `block` for an image or a card, `circle` for an
2557
+ * avatar. Defaults to `text`.
2558
+ */
2559
+ readonly shape: InputSignal<SkeletonShape>;
2560
+ /**
2561
+ * Number of text lines. The last one is shorter when there is more than one, as a paragraph's
2562
+ * is. Only used by the `text` shape. Defaults to `1`.
2563
+ */
2564
+ readonly lines: InputSignal<number>;
2565
+ /**
2566
+ * Width as a CSS length, e.g. `12rem` or `50%`. Defaults to the full width for `text` and
2567
+ * `block`, and to `2.5rem` for `circle`.
2568
+ */
2569
+ readonly width: InputSignal<string | undefined>;
2570
+ /**
2571
+ * Height as a CSS length. For `text` it is the thickness of each line, `0.625rem` by default.
2572
+ * For `block` it defaults to `4rem`; a `circle` is as tall as it is wide.
2573
+ */
2574
+ readonly height: InputSignal<string | undefined>;
2575
+ /** One entry per text line, at least one. */
2576
+ protected readonly lineIndexes: Signal<number[]>;
2577
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonComponent, never>;
2578
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonComponent, "lib-skeleton", never, {
2579
+ "shape": {
2580
+ "alias": "shape";
2581
+ "required": false;
2582
+ "isSignal": true;
2583
+ };
2584
+ "lines": {
2585
+ "alias": "lines";
2586
+ "required": false;
2587
+ "isSignal": true;
2588
+ };
2589
+ "width": {
2590
+ "alias": "width";
2591
+ "required": false;
2592
+ "isSignal": true;
2593
+ };
2594
+ "height": {
2595
+ "alias": "height";
2596
+ "required": false;
2597
+ "isSignal": true;
2598
+ };
2599
+ }, {}, never, never, true, never>;
2600
+ }
2601
+ /** Side of the trigger the tooltip prefers. `start` and `end` follow the text direction. */
2602
+ export type TooltipPosition = 'top' | 'bottom' | 'start' | 'end';
2603
+ /**
2604
+ * Shows a short themed hint next to an element, on hover and on keyboard focus.
2605
+ *
2606
+ * Use it instead of the native `title` attribute. `title` shows late, cannot be styled or themed,
2607
+ * never shows on keyboard focus and does nothing on touch.
2608
+ *
2609
+ * The tooltip follows WCAG 1.4.13. Escape dismisses it. The pointer can move onto it without
2610
+ * closing it. It stays until the pointer and focus leave, or Escape is pressed. On touch, a long
2611
+ * press shows it, and it hides shortly after the finger lifts.
2612
+ *
2613
+ * While the tooltip is open the trigger's `aria-describedby` points at it. When the directive sits
2614
+ * on a wrapper such as `lib-button`, the first focusable element inside gets the attribute
2615
+ * instead. Any id already there is kept, and the attribute is restored when the tooltip hides. A tooltip
2616
+ * describes; it does not name. An icon-only button still needs its own accessible name.
2617
+ */
2618
+ export declare class TooltipDirective {
2619
+ /** The hint, as a translation key or plain text. An empty value shows no tooltip. */
2620
+ readonly text: InputSignal<string | null | undefined>;
2621
+ /**
2622
+ * Side of the trigger the tooltip prefers: `top`, `bottom`, `start` or `end`. It flips to another
2623
+ * side when there is no room. Defaults to `top`.
2624
+ */
2625
+ readonly tooltipPosition: InputSignal<TooltipPosition>;
2626
+ /** Stops the tooltip from showing, and hides it if it is open. Defaults to `false`. */
2627
+ readonly tooltipDisabled: InputSignal<boolean>;
2628
+ /** Milliseconds between hover or focus and the tooltip showing. Defaults to `300`. */
2629
+ readonly tooltipDelay: InputSignal<number>;
2630
+ private static instances;
2631
+ private readonly tooltipId;
2632
+ private readonly host;
2633
+ private readonly overlay;
2634
+ private readonly renderer;
2635
+ private readonly viewContainerRef;
2636
+ private overlayRef?;
2637
+ private tooltipRef?;
2638
+ private removeListeners;
2639
+ private describedElement?;
2640
+ private previousDescribedBy;
2641
+ private showTimer?;
2642
+ private hideTimer?;
2643
+ private lastTouch;
2644
+ /** Hides this tooltip; also how another tooltip closes it, through `hideOpenTooltip`. */
2645
+ private readonly hideThis;
2646
+ private isHostHovered;
2647
+ private isTooltipHovered;
2648
+ private isFocused;
2649
+ constructor();
2650
+ protected onMouseEnter(): void;
2651
+ protected onMouseLeave(): void;
2652
+ protected onFocusIn(): void;
2653
+ protected onFocusOut(): void;
2654
+ protected onTouchStart(): void;
2655
+ protected onTouchEnd(): void;
2656
+ /** Shows the tooltip now, without the delay. Does nothing when disabled or empty. */
2657
+ show(): void;
2658
+ /** Hides the tooltip now and gives the trigger back its own `aria-describedby`. */
2659
+ hide(): void;
2660
+ private scheduleShow;
2661
+ /** Hides after a short grace, unless the pointer or focus is still on the trigger or the tooltip. */
2662
+ private scheduleHideIfIdle;
2663
+ /**
2664
+ * The element a screen reader announces on focus. On a wrapper such as `lib-button` that is the
2665
+ * native control inside it, not the wrapper itself.
2666
+ */
2667
+ private findDescribedElement;
2668
+ private isEmulatedMouse;
2669
+ private clearShowTimer;
2670
+ private clearHideTimer;
2671
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
2672
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[libTooltip]", never, {
2673
+ "text": {
2674
+ "alias": "libTooltip";
2675
+ "required": false;
2676
+ "isSignal": true;
2677
+ };
2678
+ "tooltipPosition": {
2679
+ "alias": "tooltipPosition";
2680
+ "required": false;
2681
+ "isSignal": true;
2682
+ };
2683
+ "tooltipDisabled": {
2684
+ "alias": "tooltipDisabled";
2685
+ "required": false;
2686
+ "isSignal": true;
2687
+ };
2688
+ "tooltipDelay": {
2689
+ "alias": "tooltipDelay";
2690
+ "required": false;
2691
+ "isSignal": true;
2692
+ };
2693
+ }, {}, never, never, true, never>;
2694
+ }
2036
2695
  export declare class DateHelpers {
2037
2696
  static diffDays(initialDate: Date, finalDate: Date): number;
2038
2697
  }
@@ -2070,6 +2729,92 @@ export declare class GuidHelper {
2070
2729
  export declare abstract class RouterFormatter {
2071
2730
  static getURL(route: ActivatedRouteSnapshot): string;
2072
2731
  }
2732
+ /**
2733
+ * Formatting and parsing of dates and numbers for a given locale, built on the browser's `Intl`.
2734
+ *
2735
+ * `Intl` knows every locale the browser knows, so nothing here needs Angular's locale data to be
2736
+ * registered. That is what lets a field follow the language the application chose rather than the
2737
+ * one the operating system is set to.
2738
+ */
2739
+ /** A date part, in the order a locale writes it. */
2740
+ export type DatePart = 'day' | 'month' | 'year';
2741
+ /** How a locale writes a short numeric date: the part order and the separator between parts. */
2742
+ export interface DatePattern {
2743
+ /** Parts in the order the locale writes them, e.g. `['day', 'month', 'year']` for `pt-BR`. */
2744
+ order: DatePart[];
2745
+ /** Text between parts, e.g. `/` or `.`. */
2746
+ separator: string;
2747
+ }
2748
+ /** Decimal and grouping separators of a locale. */
2749
+ export interface NumberSeparators {
2750
+ /** Decimal separator, e.g. `,` for `pt-BR`. */
2751
+ decimal: string;
2752
+ /** Grouping separator, e.g. `.` for `pt-BR`. May be a non-breaking space. */
2753
+ group: string;
2754
+ }
2755
+ /** Options for {@link formatLocaleNumber}. */
2756
+ export interface LocaleNumberOptions {
2757
+ /** Fewest digits after the decimal separator. Defaults to `0`. */
2758
+ minFractionDigits?: number;
2759
+ /** Most digits after the decimal separator. Defaults to `3`. */
2760
+ maxFractionDigits?: number;
2761
+ /** Whether to group thousands. Defaults to `true`. */
2762
+ grouping?: boolean;
2763
+ }
2764
+ /** Whether `locale` is a tag `Intl` accepts. */
2765
+ export declare function isValidLocale(locale: unknown): locale is string;
2766
+ /** The order and separator of a short numeric date in `locale`. */
2767
+ export declare function getDatePattern(locale: string): DatePattern;
2768
+ /** A short numeric date in `locale`, e.g. `05/12/2026` in `pt-BR` and `12/05/2026` in `en-US`. */
2769
+ export declare function formatDateText(date: Date, locale: string): string;
2770
+ /**
2771
+ * Reads a date typed in `locale`'s order. Accepts any non-digit separator, digits only
2772
+ * (`05122026`), a two-digit year (read as 20xx), and an ISO date (`2026-12-05`). Returns `null`
2773
+ * for empty text and for text that is not a real date.
2774
+ */
2775
+ export declare function parseDateText(text: string, locale: string): Date | null;
2776
+ /** Whether `locale` shows the time on a 12-hour clock. */
2777
+ export declare function uses12HourClock(locale: string): boolean;
2778
+ /** A time of day in `locale`, e.g. `14:30` in `pt-BR` and `02:30 PM` in `en-US`. */
2779
+ export declare function formatTimeText(date: Date, locale: string): string;
2780
+ /**
2781
+ * Reads a typed time: `14:30`, `1430`, `9`, `2:30 pm`, `2:30 p.m.`. Returns the hours (0-23) and
2782
+ * minutes, or `null` for empty or invalid text.
2783
+ */
2784
+ export declare function parseTimeText(text: string): {
2785
+ hours: number;
2786
+ minutes: number;
2787
+ } | null;
2788
+ /** A date written the way the API and the native date input write it: `yyyy-MM-dd`. */
2789
+ export declare function toIsoDate(date: Date): string;
2790
+ /** A local date and time written the way the native `datetime-local` input writes it: `yyyy-MM-ddTHH:mm`. */
2791
+ export declare function toIsoDateTime(date: Date): string;
2792
+ /**
2793
+ * Reads a value a form control may hold: a `Date`, `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm[:ss]`, or any
2794
+ * other string `Date` can parse. A date or date-time with no zone is read as local time, as the
2795
+ * native inputs do. Returns `null` for empty or invalid values.
2796
+ */
2797
+ export declare function parseIsoValue(value: unknown): Date | null;
2798
+ /** The first day of the week in `locale`, as `Date.getDay()` numbers it: `0` is Sunday. */
2799
+ export declare function getFirstDayOfWeek(locale: string): number;
2800
+ /** The decimal and grouping separators of `locale`. */
2801
+ export declare function getNumberSeparators(locale: string): NumberSeparators;
2802
+ /** A number in `locale`, e.g. `1.234,5` in `pt-BR`. */
2803
+ export declare function formatLocaleNumber(value: number, locale: string, options?: LocaleNumberOptions): string;
2804
+ /**
2805
+ * Reads a number typed in `locale`. Spaces are ignored. Grouping separators are accepted only
2806
+ * between groups of three digits, so `1.5` in `pt-BR` is not a number rather than 15. The decimal
2807
+ * separator is the locale's. Returns `null` for empty text and `NaN` for text that is not a number.
2808
+ */
2809
+ export declare function parseLocaleNumber(text: string, locale: string): number | null;
2810
+ /**
2811
+ * Reads an Angular `DecimalPipe` digits string, `{minInt}.{minFrac}-{maxFrac}`, into fraction-digit
2812
+ * limits. Returns `undefined` when `digitsInfo` is empty or malformed.
2813
+ */
2814
+ export declare function parseDigitsInfo(digitsInfo: string | undefined): {
2815
+ minFractionDigits: number;
2816
+ maxFractionDigits: number;
2817
+ } | undefined;
2073
2818
  declare namespace enum_d_exports {
2074
2819
  export { EnumTranslatePipe };
2075
2820
  }
@@ -2135,4 +2880,4 @@ export declare class DateValidators {
2135
2880
  static maxDate(maxDate: Date): ValidatorFn;
2136
2881
  static minDate(minDate: Date): ValidatorFn;
2137
2882
  }
2138
- export type { ButtonIntent };
2883
+ export type { ButtonIntent, DateInputMode };