structra-ui 0.1.20 → 0.1.22
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/README.md +4 -4
- package/package.json +2 -5
- package/types/structra-ui.d.ts +2984 -0
|
@@ -0,0 +1,2984 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, Injector, DestroyRef, EventEmitter, OnChanges, OnInit, SimpleChanges, DoCheck, TemplateRef, OnDestroy, AfterContentInit, QueryList, AfterViewInit, ElementRef } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, AbstractControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { MatDatepicker } from '@angular/material/datepicker';
|
|
5
|
+
import * as _angular_cdk_overlay from '@angular/cdk/overlay';
|
|
6
|
+
import { ConnectedPosition, ScrollStrategy, OverlayRef } from '@angular/cdk/overlay';
|
|
7
|
+
import { ICellRendererParams, ColDef, GetRowIdParams, GridReadyEvent } from 'ag-grid-community';
|
|
8
|
+
import { ICellRendererAngularComp } from 'ag-grid-angular';
|
|
9
|
+
import { DialogRef } from '@angular/cdk/dialog';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
11
|
+
import * as structra_ui from 'structra-ui';
|
|
12
|
+
|
|
13
|
+
/** Marcador de pacote publicado como `structra-ui`. */
|
|
14
|
+
declare const STRUCTRA_UI: "structra-ui";
|
|
15
|
+
|
|
16
|
+
declare enum BaseButtonVariant {
|
|
17
|
+
Primary = "primary",
|
|
18
|
+
Secondary = "secondary",
|
|
19
|
+
/** Texto/ícone sem caixa — navegação secundária, “link” com aparência de botão acessível. */
|
|
20
|
+
Ghost = "ghost"
|
|
21
|
+
}
|
|
22
|
+
declare enum BaseButtonType {
|
|
23
|
+
Button = "button",
|
|
24
|
+
Submit = "submit",
|
|
25
|
+
Reset = "reset"
|
|
26
|
+
}
|
|
27
|
+
declare class BaseButtonComponent {
|
|
28
|
+
private nativeBtn?;
|
|
29
|
+
/** `submit` envia o `<form>` ancestral; use `button` para ações sem submit. */
|
|
30
|
+
type: BaseButtonType;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Não interage (como `disabled`), mas com aparência em cinza (tema somente leitura),
|
|
34
|
+
* distinta do estado desabilitado genérico.
|
|
35
|
+
*/
|
|
36
|
+
readonly: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* `true` (por defeito): estica à largura do contentor (útil em `app-layout-stack` com `fill`).
|
|
39
|
+
* `false`: largura só ao conteúdo (texto + padding).
|
|
40
|
+
*/
|
|
41
|
+
fullWidth: boolean;
|
|
42
|
+
/** Placeholder de carregamento (skeleton no lugar do rótulo). */
|
|
43
|
+
loading: boolean;
|
|
44
|
+
/** Estilo visual base; pode ser estendido no SCSS do projeto. */
|
|
45
|
+
variant: BaseButtonVariant;
|
|
46
|
+
/** Alias de {@link variant} (nome comum em design systems). */
|
|
47
|
+
set appearance(value: BaseButtonVariant);
|
|
48
|
+
get hostClasses(): string;
|
|
49
|
+
/** Foca o `<button>` nativo (o host do componente não é focável). */
|
|
50
|
+
focusNative(options?: FocusOptions): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseButtonComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseButtonComponent, "app-base-button", never, { "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
53
|
+
static ngAcceptInputType_disabled: unknown;
|
|
54
|
+
static ngAcceptInputType_readonly: unknown;
|
|
55
|
+
static ngAcceptInputType_fullWidth: unknown;
|
|
56
|
+
static ngAcceptInputType_loading: unknown;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Itens de menu partilhados por dropdown, context menu, action-menu e campos (`mostrarMenuContexto`).
|
|
61
|
+
* Discriminação por `kind` para renderização e navegação por teclado.
|
|
62
|
+
*/
|
|
63
|
+
type MenuItemKind = 'item' | 'divider' | 'group' | 'submenu';
|
|
64
|
+
interface MenuItemAction<T = string> {
|
|
65
|
+
kind: 'item';
|
|
66
|
+
/** Identificador estável para o evento de selecção. */
|
|
67
|
+
id: T;
|
|
68
|
+
label: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
/** Classes de ícone (ex.: Font Awesome), opcional. */
|
|
71
|
+
icon?: string;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/** Bloqueia interação e mostra indicador de carregamento (o pai atualiza o modelo). */
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
/** Acção destrutiva (ex.: eliminar) — realce semântico sem quebrar o tema. */
|
|
76
|
+
danger?: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface MenuItemDivider {
|
|
79
|
+
kind: 'divider';
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Submenu aninhado (qualquer profundidade em `items`).
|
|
83
|
+
* A navegação e o posicionamento são tratados em `menu-list` (lista recursiva + overlay CDK).
|
|
84
|
+
*/
|
|
85
|
+
interface MenuItemSubmenu<T = string> {
|
|
86
|
+
kind: 'submenu';
|
|
87
|
+
/** Identificador estável (acessibilidade, rastreio). */
|
|
88
|
+
id: T;
|
|
89
|
+
label: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
icon?: string;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
items: readonly MenuNodeItem<T>[];
|
|
94
|
+
}
|
|
95
|
+
interface MenuItemGroup<T = string> {
|
|
96
|
+
kind: 'group';
|
|
97
|
+
/** Rótulo da seção (opcional). */
|
|
98
|
+
label?: string;
|
|
99
|
+
/** Itens e submenus aninhados dentro do grupo. */
|
|
100
|
+
items: readonly MenuNodeItem<T>[];
|
|
101
|
+
}
|
|
102
|
+
/** Folha: ação ou divisor. */
|
|
103
|
+
type MenuLeafItem<T = string> = MenuItemAction<T> | MenuItemDivider;
|
|
104
|
+
/** Nó de primeiro nível ou dentro de grupos (inclui submenus). */
|
|
105
|
+
type MenuNodeItem<T = string> = MenuLeafItem<T> | MenuItemGroup<T> | MenuItemSubmenu<T>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Diretiva base abstrata: CVA, valor interno, disabled, touched e inputs comuns.
|
|
109
|
+
* Sem UI; os campos concretos envolvem o input com `BaseFieldComponent`.
|
|
110
|
+
*/
|
|
111
|
+
declare abstract class BaseFieldDirective<T> implements ControlValueAccessor {
|
|
112
|
+
protected readonly cdr: ChangeDetectorRef;
|
|
113
|
+
protected readonly injector: Injector;
|
|
114
|
+
protected readonly destroyRef: DestroyRef;
|
|
115
|
+
private formGroupDir;
|
|
116
|
+
private ngFormDir;
|
|
117
|
+
/** Identificador estável para a11y quando `id` não é informado */
|
|
118
|
+
protected readonly autoId: string;
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
label: string;
|
|
122
|
+
placeholder: string;
|
|
123
|
+
errorMessage: string;
|
|
124
|
+
/** Se `true`, exibe o parágrafo de erro; por defeito `false` (só estado inválido na borda/label). */
|
|
125
|
+
showErrorMessage: boolean;
|
|
126
|
+
required: boolean;
|
|
127
|
+
/** Se `true` e `required`, exibe o asterisco no label (`BaseFieldComponent`); por defeito `false`. */
|
|
128
|
+
showRequiredMark: boolean;
|
|
129
|
+
readonly: boolean;
|
|
130
|
+
/** Exibe ícone à esquerda (classes Font Awesome, ex.: `fa-solid fa-user`). */
|
|
131
|
+
showPrefixIcon: boolean;
|
|
132
|
+
prefixIcon: string;
|
|
133
|
+
/** Alias de {@link prefixIcon} (API alinhada a “ícone à esquerda”). */
|
|
134
|
+
set iconLeft(value: string);
|
|
135
|
+
/** Exibe botão à direita para limpar o valor quando houver texto. */
|
|
136
|
+
clearable: boolean;
|
|
137
|
+
clearAriaLabel: string;
|
|
138
|
+
/**
|
|
139
|
+
* Se `true`, o navegador pode exibir sugestões de preenchimento automático.
|
|
140
|
+
* Padrão `false` (`autocomplete="off"` em todos os campos).
|
|
141
|
+
*/
|
|
142
|
+
autocomplete: boolean;
|
|
143
|
+
/** Placeholder de carregamento no `app-base-field` (skeleton). */
|
|
144
|
+
loading: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Mostra botão «…» no sufixo que abre menu de ações (dropdown com os itens em {@link contextMenuItems}).
|
|
147
|
+
* Por defeito `false`.
|
|
148
|
+
*/
|
|
149
|
+
mostrarMenuContexto: boolean;
|
|
150
|
+
/** Itens do menu de contexto (rótulos, divisores, grupos); só o botão é mostrado se a lista não for vazia. */
|
|
151
|
+
contextMenuItems: readonly MenuNodeItem<string>[];
|
|
152
|
+
/** `id` do menu (acessibilidade); por defeito `{id do campo}-ctx`. */
|
|
153
|
+
contextMenuId: string;
|
|
154
|
+
readonly contextMenuSelect: EventEmitter<string>;
|
|
155
|
+
protected internalValue: T | null;
|
|
156
|
+
protected disabled: boolean;
|
|
157
|
+
private onChange;
|
|
158
|
+
private onTouched;
|
|
159
|
+
get controlId(): string;
|
|
160
|
+
/** Valor do atributo HTML `autocomplete` derivado de {@link autocomplete}. */
|
|
161
|
+
get autocompleteAttr(): 'on' | 'off';
|
|
162
|
+
/**
|
|
163
|
+
* Mensagem exibida quando inválido: `errorMessage` se preenchido;
|
|
164
|
+
* senão, se obrigatório, o padrão "Campo obrigatório".
|
|
165
|
+
* Campos não obrigatórios não exibem mensagem de erro da lib.
|
|
166
|
+
*/
|
|
167
|
+
getErrorMessage(): string;
|
|
168
|
+
/**
|
|
169
|
+
* Obrigatório efetivo para UI: {@link required} ou `Validators.required` no `FormControl`.
|
|
170
|
+
* Usado no asterisco do label e no atributo HTML `required`.
|
|
171
|
+
*/
|
|
172
|
+
get requiredEffective(): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* `true` se `[required]="true"` **ou** o control tiver `Validators.required`.
|
|
175
|
+
*/
|
|
176
|
+
protected isEffectiveRequired(control: AbstractControl | null | undefined): boolean;
|
|
177
|
+
/** Sobrescrito em campos com `NgControl` para ler o `FormControl`. */
|
|
178
|
+
protected resolveControlForRequired(): AbstractControl | null | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Estado visual de erro (borda/label): obrigatório efetivo + control inválido +
|
|
181
|
+
* só após interação com o valor (`dirty`) ou envio do formulário (`submitted`).
|
|
182
|
+
* Não usar `touched` sozinho: blur/tab marca touched sem alterar o valor e não deve mostrar erro.
|
|
183
|
+
*/
|
|
184
|
+
protected controlInvalidUi(control: AbstractControl | null | undefined): boolean;
|
|
185
|
+
/** Reactive: `FormGroupDirective` no `<form [formGroup]>`; template-driven: `NgForm`. */
|
|
186
|
+
protected isParentFormSubmitted(): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Campos OnPush precisam reavaliar `baseInvalid` após o submit do form
|
|
189
|
+
* (mudança de `submitted` não passa por `statusChanges`).
|
|
190
|
+
*/
|
|
191
|
+
protected registerFormSubmitRecheck(): void;
|
|
192
|
+
writeValue(value: T | null): void;
|
|
193
|
+
/** Sincroniza exibição/DOM após writeValue ou reset do form. */
|
|
194
|
+
protected afterWriteValue(_value: T | null): void;
|
|
195
|
+
registerOnChange(fn: (value: T | null) => void): void;
|
|
196
|
+
registerOnTouched(fn: () => void): void;
|
|
197
|
+
setDisabledState(isDisabled: boolean): void;
|
|
198
|
+
protected emitModelValue(value: T | null): void;
|
|
199
|
+
protected notifyTouched(): void;
|
|
200
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFieldDirective<any>, never>;
|
|
201
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFieldDirective<any>, never, never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "showErrorMessage": { "alias": "showErrorMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "showRequiredMark": { "alias": "showRequiredMark"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "showPrefixIcon": { "alias": "showPrefixIcon"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "iconLeft": { "alias": "iconLeft"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "mostrarMenuContexto": { "alias": "mostrarMenuContexto"; "required": false; }; "contextMenuItems": { "alias": "contextMenuItems"; "required": false; }; "contextMenuId": { "alias": "contextMenuId"; "required": false; }; }, { "contextMenuSelect": "contextMenuSelect"; }, never, never, true, never>;
|
|
202
|
+
static ngAcceptInputType_loading: unknown;
|
|
203
|
+
static ngAcceptInputType_mostrarMenuContexto: unknown;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Bloco genérico de skeleton (linhas, caixas, células). */
|
|
207
|
+
declare class SkeletonBlockComponent {
|
|
208
|
+
/** Largura CSS (ex.: `100%`, `6rem`, `40%`). */
|
|
209
|
+
width: string;
|
|
210
|
+
/** Altura CSS. */
|
|
211
|
+
height: string;
|
|
212
|
+
/** Raio de canto. */
|
|
213
|
+
radius: string;
|
|
214
|
+
animate: boolean;
|
|
215
|
+
get hostClass(): string;
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonBlockComponent, never>;
|
|
217
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonBlockComponent, "app-skeleton-block", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, true, never>;
|
|
218
|
+
static ngAcceptInputType_animate: unknown;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Várias linhas de texto placeholder. */
|
|
222
|
+
declare class SkeletonTextComponent {
|
|
223
|
+
lines: number;
|
|
224
|
+
/** Largura da última linha em % (1–100). */
|
|
225
|
+
lastLineWidthPct: number;
|
|
226
|
+
lineHeight: string;
|
|
227
|
+
gap: string;
|
|
228
|
+
animate: boolean;
|
|
229
|
+
lineIndexes(): number[];
|
|
230
|
+
widthForLine(i: number): string;
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonTextComponent, never>;
|
|
232
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonTextComponent, "app-skeleton-text", never, { "lines": { "alias": "lines"; "required": false; }; "lastLineWidthPct": { "alias": "lastLineWidthPct"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, true, never>;
|
|
233
|
+
static ngAcceptInputType_lines: unknown;
|
|
234
|
+
static ngAcceptInputType_lastLineWidthPct: unknown;
|
|
235
|
+
static ngAcceptInputType_animate: unknown;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** Lista vertical de linhas (ex.: opções de dropdown). */
|
|
239
|
+
declare class SkeletonListComponent {
|
|
240
|
+
rows: number;
|
|
241
|
+
/** Mostra um “leading” à esquerda (círculo pequeno). */
|
|
242
|
+
leading: boolean;
|
|
243
|
+
rowGap: string;
|
|
244
|
+
/** Altura da barra por linha (alinhada às opções de select ~0,95rem / lh 1,35). */
|
|
245
|
+
lineHeight: string;
|
|
246
|
+
animate: boolean;
|
|
247
|
+
rowIndexes(): number[];
|
|
248
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonListComponent, never>;
|
|
249
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonListComponent, "app-skeleton-list", never, { "rows": { "alias": "rows"; "required": false; }; "leading": { "alias": "leading"; "required": false; }; "rowGap": { "alias": "rowGap"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, true, never>;
|
|
250
|
+
static ngAcceptInputType_rows: unknown;
|
|
251
|
+
static ngAcceptInputType_leading: unknown;
|
|
252
|
+
static ngAcceptInputType_animate: unknown;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** Placeholder de cartão (avatar + texto + ações). */
|
|
256
|
+
declare class SkeletonCardComponent {
|
|
257
|
+
showActions: boolean;
|
|
258
|
+
animate: boolean;
|
|
259
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonCardComponent, never>;
|
|
260
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonCardComponent, "app-skeleton-card", never, { "showActions": { "alias": "showActions"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, true, never>;
|
|
261
|
+
static ngAcceptInputType_showActions: unknown;
|
|
262
|
+
static ngAcceptInputType_animate: unknown;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** Placeholder tabular (cabeçalho + linhas + faixa de paginação). */
|
|
266
|
+
declare class SkeletonTableComponent {
|
|
267
|
+
columnCount: number;
|
|
268
|
+
rowCount: number;
|
|
269
|
+
showPager: boolean;
|
|
270
|
+
animate: boolean;
|
|
271
|
+
colIndexes(): number[];
|
|
272
|
+
rowIndexes(): number[];
|
|
273
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonTableComponent, never>;
|
|
274
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonTableComponent, "app-skeleton-table", never, { "columnCount": { "alias": "columnCount"; "required": false; }; "rowCount": { "alias": "rowCount"; "required": false; }; "showPager": { "alias": "showPager"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, {}, never, never, true, never>;
|
|
275
|
+
static ngAcceptInputType_columnCount: unknown;
|
|
276
|
+
static ngAcceptInputType_rowCount: unknown;
|
|
277
|
+
static ngAcceptInputType_showPager: unknown;
|
|
278
|
+
static ngAcceptInputType_animate: unknown;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Mantido por compatibilidade; o layout do skeleton é único para todos os campos. */
|
|
282
|
+
type SkeletonFieldShellVariant = 'text' | 'select';
|
|
283
|
+
/**
|
|
284
|
+
* Placeholder de campo: barra de valor e, opcionalmente, quadrado à esquerda quando não há
|
|
285
|
+
* ícone Font Awesome na coluna de prefixo do `app-base-field`.
|
|
286
|
+
*/
|
|
287
|
+
declare class SkeletonFieldShellComponent {
|
|
288
|
+
/** @deprecated Ignorado: todos os campos usam o mesmo layout. */
|
|
289
|
+
variant: SkeletonFieldShellVariant;
|
|
290
|
+
animate: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Quando `false`, não renderiza o quadrado à esquerda (o `app-base-field` já mostra o ícone
|
|
293
|
+
* de prefixo inerte na coluna correcta durante `loading`).
|
|
294
|
+
*/
|
|
295
|
+
showLeadingIcon: boolean;
|
|
296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonFieldShellComponent, never>;
|
|
297
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonFieldShellComponent, "app-skeleton-field-shell", never, { "variant": { "alias": "variant"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "showLeadingIcon": { "alias": "showLeadingIcon"; "required": false; }; }, {}, never, never, true, never>;
|
|
298
|
+
static ngAcceptInputType_animate: unknown;
|
|
299
|
+
static ngAcceptInputType_showLeadingIcon: unknown;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Base visual do campo: caixa com label flutuante, prefixo opcional e erro.
|
|
304
|
+
* Usada dentro dos componentes de campo (texto, inteiro, decimal).
|
|
305
|
+
*/
|
|
306
|
+
declare class BaseFieldComponent implements OnChanges, OnInit {
|
|
307
|
+
label: string;
|
|
308
|
+
errorMessage: string;
|
|
309
|
+
required: boolean;
|
|
310
|
+
/** Asterisco visual do obrigatório no label (validação HTML `required` inalterada); por defeito `false`. */
|
|
311
|
+
showRequiredMark: boolean;
|
|
312
|
+
invalid: boolean;
|
|
313
|
+
filled: boolean;
|
|
314
|
+
disabled: boolean;
|
|
315
|
+
readonly: boolean;
|
|
316
|
+
inputId: string;
|
|
317
|
+
errorId: string;
|
|
318
|
+
showPrefixIcon: boolean;
|
|
319
|
+
/** Classes Font Awesome (ex.: `fa-solid fa-user`). Usado com `showPrefixIcon`. */
|
|
320
|
+
prefixIcon: string;
|
|
321
|
+
clearable: boolean;
|
|
322
|
+
clearAriaLabel: string;
|
|
323
|
+
/**
|
|
324
|
+
* Quando `true`, renderiza `ng-content` com `[appFieldSuffix]` à direita do input
|
|
325
|
+
* (antes do botão limpar, se houver).
|
|
326
|
+
*/
|
|
327
|
+
showSuffixSlot: boolean;
|
|
328
|
+
/** Alinha o texto do valor à direita no input projetado. */
|
|
329
|
+
valueAlignEnd: boolean;
|
|
330
|
+
loading: boolean;
|
|
331
|
+
/** Variante do skeleton quando {@link loading} é `true`. */
|
|
332
|
+
skeletonVariant: SkeletonFieldShellVariant;
|
|
333
|
+
mostrarMenuContexto: boolean;
|
|
334
|
+
contextMenuItems: readonly MenuNodeItem<string>[];
|
|
335
|
+
/** Sufixo do `id` do menu (ex.: `meuCampo-ctx`); por defeito deriva-se de {@link inputId}. */
|
|
336
|
+
contextMenuId: string;
|
|
337
|
+
clear: EventEmitter<void>;
|
|
338
|
+
contextMenuSelect: EventEmitter<string>;
|
|
339
|
+
/** Derivados do template (actualizados em `ngOnChanges`, não getters por CD). */
|
|
340
|
+
showErrorTpl: boolean;
|
|
341
|
+
showFloatTpl: boolean;
|
|
342
|
+
showFaTpl: boolean;
|
|
343
|
+
prefixIconClassTpl: string;
|
|
344
|
+
showClearTpl: boolean;
|
|
345
|
+
showCtxMenuTpl: boolean;
|
|
346
|
+
showSuffixTpl: boolean;
|
|
347
|
+
get resolvedContextMenuId(): string;
|
|
348
|
+
ngOnInit(): void;
|
|
349
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
350
|
+
private refreshTplFlags;
|
|
351
|
+
onClearClick(): void;
|
|
352
|
+
onContextMenuItemSelect(id: string): void;
|
|
353
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFieldComponent, never>;
|
|
354
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseFieldComponent, "app-base-field", never, { "label": { "alias": "label"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "showRequiredMark": { "alias": "showRequiredMark"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "errorId": { "alias": "errorId"; "required": false; }; "showPrefixIcon": { "alias": "showPrefixIcon"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; }; "showSuffixSlot": { "alias": "showSuffixSlot"; "required": false; }; "valueAlignEnd": { "alias": "valueAlignEnd"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "skeletonVariant": { "alias": "skeletonVariant"; "required": false; }; "mostrarMenuContexto": { "alias": "mostrarMenuContexto"; "required": false; }; "contextMenuItems": { "alias": "contextMenuItems"; "required": false; }; "contextMenuId": { "alias": "contextMenuId"; "required": false; }; }, { "clear": "clear"; "contextMenuSelect": "contextMenuSelect"; }, never, ["[appFieldPrefix]", "*", "[appFieldSuffix]"], true, never>;
|
|
355
|
+
static ngAcceptInputType_loading: unknown;
|
|
356
|
+
static ngAcceptInputType_mostrarMenuContexto: unknown;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Campos com `NgControl` + CVA: injeta o control e expõe estado de erro/a11y comuns.
|
|
361
|
+
*/
|
|
362
|
+
declare abstract class NgControlFieldDirective<T> extends BaseFieldDirective<T> implements OnInit, OnChanges, DoCheck {
|
|
363
|
+
protected ngControl: NgControl | null;
|
|
364
|
+
/** `FormGroupDirective.submitted` muda com `resetForm()` sem `ngSubmit` — OnPush precisa disto para a borda/erro. */
|
|
365
|
+
private lastParentSubmitted;
|
|
366
|
+
/**
|
|
367
|
+
* Texto do label flutuante em `app-base-field` (`label` ou `placeholder`).
|
|
368
|
+
* Mantido em campo (não getter) para reduzir trabalho por ciclo de deteção.
|
|
369
|
+
*/
|
|
370
|
+
floatLabelCaption: string;
|
|
371
|
+
/** Cache para o template (evita `getErrorMessage()` / getters a cada CD). */
|
|
372
|
+
uiErrorMessage: string;
|
|
373
|
+
uiRequiredEffective: boolean;
|
|
374
|
+
uiInvalid: boolean;
|
|
375
|
+
uiAriaDescribedBy: string | null;
|
|
376
|
+
protected resolveControlForRequired(): AbstractControl | null | undefined;
|
|
377
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
378
|
+
private refreshFloatLabelCaption;
|
|
379
|
+
ngOnInit(): void;
|
|
380
|
+
ngDoCheck(): void;
|
|
381
|
+
writeValue(value: T | null): void;
|
|
382
|
+
/**
|
|
383
|
+
* Após propagar o valor ao `FormControl`, reavalia já `uiInvalid` / a11y.
|
|
384
|
+
* Só confiar em `valueChanges` pode deixar o estado visual desfasado (ex.: select após escolha).
|
|
385
|
+
*/
|
|
386
|
+
protected emitModelValue(value: T | null): void;
|
|
387
|
+
protected registerFormSubmitRecheck(): void;
|
|
388
|
+
/**
|
|
389
|
+
* Actualiza caches usados no template após mudança de valor/estado do control
|
|
390
|
+
* ou de inputs que afectam mensagem / obrigatório.
|
|
391
|
+
*/
|
|
392
|
+
protected syncControlUi(): void;
|
|
393
|
+
get baseInvalid(): boolean;
|
|
394
|
+
get errorElementId(): string;
|
|
395
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlFieldDirective<any>, never>;
|
|
396
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlFieldDirective<any>, never, never, {}, {}, never, never, true, never>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
declare class TextFieldComponent extends NgControlFieldDirective<string | null> {
|
|
400
|
+
/** Limite de caracteres no valor do campo. */
|
|
401
|
+
maxLength: number;
|
|
402
|
+
inputText: string;
|
|
403
|
+
filledUi: boolean;
|
|
404
|
+
private refreshFilledUi;
|
|
405
|
+
protected afterWriteValue(value: string | null): void;
|
|
406
|
+
onNativeInput(event: Event): void;
|
|
407
|
+
onBlur(): void;
|
|
408
|
+
onClear(): void;
|
|
409
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldComponent, never>;
|
|
410
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "app-text-field", never, { "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
411
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
declare class PasswordFieldComponent extends NgControlFieldDirective<string | null> implements OnInit {
|
|
415
|
+
get hostInvalidClass(): boolean;
|
|
416
|
+
/** Por defeito `false`: o botão de limpar compete com o toggle de visibilidade. */
|
|
417
|
+
clearable: boolean;
|
|
418
|
+
maxLength: number;
|
|
419
|
+
/** Atributo HTML `autocomplete` (senha actual vs. nova senha). */
|
|
420
|
+
autoComplete: 'off' | 'current-password' | 'new-password';
|
|
421
|
+
/** `false` = caracteres ocultos (ícone olho aberto para revelar). */
|
|
422
|
+
passwordVisible: boolean;
|
|
423
|
+
inputText: string;
|
|
424
|
+
filledUi: boolean;
|
|
425
|
+
inputTypeUi: 'password' | 'text';
|
|
426
|
+
toggleAriaLabelUi: string;
|
|
427
|
+
toggleIconClassUi: string;
|
|
428
|
+
ngOnInit(): void;
|
|
429
|
+
private refreshFilledUi;
|
|
430
|
+
private refreshPasswordToggleUi;
|
|
431
|
+
protected afterWriteValue(value: string | null): void;
|
|
432
|
+
onNativeInput(event: Event): void;
|
|
433
|
+
onBlur(): void;
|
|
434
|
+
onClear(): void;
|
|
435
|
+
togglePasswordVisible(ev: Event): void;
|
|
436
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
|
|
437
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "app-password-field", never, { "clearable": { "alias": "clearable"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
438
|
+
static ngAcceptInputType_clearable: unknown;
|
|
439
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
declare class TextareaFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges, OnInit {
|
|
443
|
+
get hostInvalidClass(): boolean;
|
|
444
|
+
/** Limite de caracteres no valor do campo. `0` = sem limite explícito no DOM. */
|
|
445
|
+
maxLength: number;
|
|
446
|
+
rows: number;
|
|
447
|
+
/**
|
|
448
|
+
* Limite de altura em linhas (mesma lógica de `rows`). Por omissão igual a {@link rows}.
|
|
449
|
+
* O campo não é redimensionável pelo usuário (`resize: none`).
|
|
450
|
+
*/
|
|
451
|
+
maxResizeRows: number;
|
|
452
|
+
inputText: string;
|
|
453
|
+
filledUi: boolean;
|
|
454
|
+
/** Altura CSS (evita getter chamado a cada CD). */
|
|
455
|
+
textareaMaxHeightCss: string;
|
|
456
|
+
ngOnInit(): void;
|
|
457
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
458
|
+
private updateTextareaHeight;
|
|
459
|
+
private refreshFilledUi;
|
|
460
|
+
protected afterWriteValue(value: string | null): void;
|
|
461
|
+
onNativeInput(event: Event): void;
|
|
462
|
+
onBlur(): void;
|
|
463
|
+
onClear(): void;
|
|
464
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
|
|
465
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "app-textarea-field", never, { "maxLength": { "alias": "maxLength"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxResizeRows": { "alias": "maxResizeRows"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
466
|
+
static ngAcceptInputType_maxLength: unknown;
|
|
467
|
+
static ngAcceptInputType_rows: unknown;
|
|
468
|
+
static ngAcceptInputType_maxResizeRows: unknown;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
declare class IntegerFieldComponent extends NgControlFieldDirective<number | null> {
|
|
472
|
+
/** Valor máximo permitido (inclusive). */
|
|
473
|
+
max: number;
|
|
474
|
+
inputText: string;
|
|
475
|
+
filledUi: boolean;
|
|
476
|
+
private refreshFilledUi;
|
|
477
|
+
protected afterWriteValue(value: number | null): void;
|
|
478
|
+
onBeforeInput(event: Event): void;
|
|
479
|
+
onNativeInput(event: Event): void;
|
|
480
|
+
onBlur(): void;
|
|
481
|
+
onClear(): void;
|
|
482
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntegerFieldComponent, never>;
|
|
483
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IntegerFieldComponent, "app-integer-field", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
484
|
+
static ngAcceptInputType_max: unknown;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
declare class DecimalFieldComponent extends NgControlFieldDirective<number | null> {
|
|
488
|
+
/** Valor máximo permitido (inclusive), com até 2 casas decimais. */
|
|
489
|
+
max: number;
|
|
490
|
+
inputText: string;
|
|
491
|
+
filledUi: boolean;
|
|
492
|
+
private refreshFilledUi;
|
|
493
|
+
protected afterWriteValue(value: number | null): void;
|
|
494
|
+
onBeforeInput(event: Event): void;
|
|
495
|
+
onNativeInput(event: Event): void;
|
|
496
|
+
onBlur(): void;
|
|
497
|
+
onClear(): void;
|
|
498
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalFieldComponent, never>;
|
|
499
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DecimalFieldComponent, "app-decimal-field", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
500
|
+
static ngAcceptInputType_max: unknown;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
declare class DateFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges {
|
|
504
|
+
picker?: MatDatepicker<Date>;
|
|
505
|
+
/**
|
|
506
|
+
* Se `true`, a formatação inclui hh:mm (24h) e, ao escolher no calendário,
|
|
507
|
+
* usa a hora actual local no momento da selecção.
|
|
508
|
+
*/
|
|
509
|
+
showTimeHours: boolean;
|
|
510
|
+
minDate: Date | null;
|
|
511
|
+
maxDate: Date | null;
|
|
512
|
+
innerDate: Date | null;
|
|
513
|
+
filledUi: boolean;
|
|
514
|
+
/** Texto da data no span (evita getter no template). */
|
|
515
|
+
displayTextUi: string;
|
|
516
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
517
|
+
private refreshFilledUi;
|
|
518
|
+
private refreshDateDisplay;
|
|
519
|
+
protected afterWriteValue(value: string | null): void;
|
|
520
|
+
openPicker(): void;
|
|
521
|
+
onGhostInputKeydown(ev: KeyboardEvent): void;
|
|
522
|
+
onPickedDate(next: Date | null): void;
|
|
523
|
+
onBlur(): void;
|
|
524
|
+
onClear(): void;
|
|
525
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFieldComponent, never>;
|
|
526
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateFieldComponent, "app-date-field", never, { "showTimeHours": { "alias": "showTimeHours"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
527
|
+
static ngAcceptInputType_showTimeHours: unknown;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Campo de texto com máscara visual; valor do modelo = **apenas dígitos** (string), sem máscara.
|
|
532
|
+
*/
|
|
533
|
+
declare abstract class MaskedTextFieldBase extends NgControlFieldDirective<string | null> {
|
|
534
|
+
/** Padrão com `#` para cada dígito (ex.: `#####-###`). Subclasses podem sobrescrever {@link pattern}. */
|
|
535
|
+
maskPattern: string;
|
|
536
|
+
inputText: string;
|
|
537
|
+
/** Preenchido (só dígitos) para o label flutuante; actualizado com o texto mascarado. */
|
|
538
|
+
filledUi: boolean;
|
|
539
|
+
/** Padrão efetivo (permite CEP/telefone fixarem máscaras em subclasses). */
|
|
540
|
+
protected get pattern(): string;
|
|
541
|
+
/**
|
|
542
|
+
* Padrão de formatação para o valor digitado (só dígitos).
|
|
543
|
+
* Sobrescrever para máscara dinâmica (ex.: CPF até 11 dígitos, CNPJ depois).
|
|
544
|
+
*/
|
|
545
|
+
protected maskPatternFromDigits(digitsOnly: string): string;
|
|
546
|
+
protected refreshMaskFilledUi(): void;
|
|
547
|
+
protected afterWriteValue(value: string | null): void;
|
|
548
|
+
/**
|
|
549
|
+
* Dígitos abaixo do tamanho da máscara actual (fixa ou dinâmica, ex. CPF/CNPJ), com valor parcial.
|
|
550
|
+
* Aplica-se também sem obrigatório: máscara incompleta deve mostrar erro na UI (alinhado a `maskIncomplete`).
|
|
551
|
+
* Mesma regra temporal que {@link BaseFieldDirective.controlInvalidUi}: `dirty` ou submit (não só `touched`).
|
|
552
|
+
*/
|
|
553
|
+
protected isMaskIncompleteForUi(): boolean;
|
|
554
|
+
get baseInvalid(): boolean;
|
|
555
|
+
getErrorMessage(): string;
|
|
556
|
+
protected onMaskedInput(event: Event): void;
|
|
557
|
+
protected onMaskedBlur(): void;
|
|
558
|
+
protected onMaskedClear(): void;
|
|
559
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaskedTextFieldBase, never>;
|
|
560
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MaskedTextFieldBase, never, never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, never, true, never>;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Campo de texto com máscara configurável (`#` = dígito).
|
|
565
|
+
* Valor do formulário: apenas dígitos, sem máscara.
|
|
566
|
+
*/
|
|
567
|
+
declare class InputMaskFieldComponent extends MaskedTextFieldBase {
|
|
568
|
+
get hostInvalidClass(): boolean;
|
|
569
|
+
/** Ex.: `#####-###`, `(##) #####-####`. */
|
|
570
|
+
maskPattern: string;
|
|
571
|
+
onNativeInput(event: Event): void;
|
|
572
|
+
onBlur(): void;
|
|
573
|
+
onClear(): void;
|
|
574
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputMaskFieldComponent, never>;
|
|
575
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputMaskFieldComponent, "app-input-mask-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/** CEP brasileiro (8 dígitos). Valor do modelo: só dígitos, ex. `01310100`. */
|
|
579
|
+
declare class CepFieldComponent extends MaskedTextFieldBase {
|
|
580
|
+
get hostInvalidClass(): boolean;
|
|
581
|
+
maskPattern: string;
|
|
582
|
+
onNativeInput(event: Event): void;
|
|
583
|
+
onBlur(): void;
|
|
584
|
+
onClear(): void;
|
|
585
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CepFieldComponent, never>;
|
|
586
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CepFieldComponent, "app-cep-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Telefone BR: celular 11 dígitos `(##) #####-####` ou fixo 10 `(##) ####-####`.
|
|
591
|
+
* Valor do modelo: só dígitos (DDD + número), ex. `11999999999` ou `1133334444`.
|
|
592
|
+
*/
|
|
593
|
+
declare class PhoneFieldComponent extends MaskedTextFieldBase {
|
|
594
|
+
get hostInvalidClass(): boolean;
|
|
595
|
+
/** Se `true`, máscara de fixo (10 dígitos). Se `false`, celular (11). */
|
|
596
|
+
landline: boolean;
|
|
597
|
+
/**
|
|
598
|
+
* Máscara manual (com `#`). Se vazio, usa celular ou fixo conforme {@link landline}.
|
|
599
|
+
*/
|
|
600
|
+
maskPattern: string;
|
|
601
|
+
protected get pattern(): string;
|
|
602
|
+
onNativeInput(event: Event): void;
|
|
603
|
+
onBlur(): void;
|
|
604
|
+
onClear(): void;
|
|
605
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneFieldComponent, never>;
|
|
606
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneFieldComponent, "app-phone-field", never, { "landline": { "alias": "landline"; "required": false; }; "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
607
|
+
static ngAcceptInputType_landline: unknown;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* CPF (11 dígitos) ou CNPJ (14 dígitos) no mesmo campo.
|
|
612
|
+
* Até 11 dígitos: `###.###.###-##`; a partir do 12º: `##.###.###/####-##`.
|
|
613
|
+
* Valor do modelo: só dígitos, ex. `12345678901` ou `12345678000190`.
|
|
614
|
+
*/
|
|
615
|
+
declare class CpfCnpjFieldComponent extends MaskedTextFieldBase {
|
|
616
|
+
private static readonly CPF_MASK;
|
|
617
|
+
private static readonly CNPJ_MASK;
|
|
618
|
+
get hostInvalidClass(): boolean;
|
|
619
|
+
/** Ignorado: a máscara é definida dinamicamente por {@link maskPatternFromDigits}. */
|
|
620
|
+
maskPattern: string;
|
|
621
|
+
protected maskPatternFromDigits(digitsOnly: string): string;
|
|
622
|
+
onNativeInput(event: Event): void;
|
|
623
|
+
onBlur(): void;
|
|
624
|
+
onClear(): void;
|
|
625
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpfCnpjFieldComponent, never>;
|
|
626
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpfCnpjFieldComponent, "app-cpf-cnpj-field", never, { "maskPattern": { "alias": "maskPattern"; "required": false; }; }, {}, never, ["[appFieldPrefix]"], true, never>;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Máscara com `#` como placeholder de um dígito (0–9); restantes caracteres são literais.
|
|
631
|
+
* Ex.: `#####-###` (CEP), `(##) #####-####` (celular BR 11 dígitos).
|
|
632
|
+
*/
|
|
633
|
+
/** Remove tudo que não é dígito. */
|
|
634
|
+
declare function stripToDigits(s: string): string;
|
|
635
|
+
/** Conta quantos `#` existem no padrão (= número máximo de dígitos). */
|
|
636
|
+
declare function maskDigitCount(pattern: string): number;
|
|
637
|
+
/**
|
|
638
|
+
* Formata apenas dígitos segundo o padrão. Não adiciona literais à direita sem dígitos
|
|
639
|
+
* correspondentes (ex.: não fica "12345-" com 5 dígitos).
|
|
640
|
+
*/
|
|
641
|
+
declare function formatMaskDigits(digitsOnly: string, pattern: string): string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Validação alinhada às máscaras dinâmicas CPF/CNPJ: só dígitos; 11 ou 14 completos.
|
|
645
|
+
* Vazio fica para `Validators.required`; com dígitos a menos devolve `maskIncomplete`.
|
|
646
|
+
*/
|
|
647
|
+
declare function cpfCnpjMaskCompleteValidator(): ValidatorFn;
|
|
648
|
+
/**
|
|
649
|
+
* Telefone BR só dígitos (DDD + número): 10 fixo ou 11 celular, conforme {@link landline}.
|
|
650
|
+
* Usar com `app-phone-field` para que `FormControl.invalid` e ícones de grupo/aba coincidam com a UI.
|
|
651
|
+
*/
|
|
652
|
+
declare function phoneBrMaskCompleteValidator(landline: boolean): ValidatorFn;
|
|
653
|
+
/**
|
|
654
|
+
* Máscara com número fixo de dígitos (valor do modelo só dígitos, como CEP/telefone).
|
|
655
|
+
* Valor vazio: `null` (delega em `Validators.required`); com dígitos a menos: `maskIncomplete`.
|
|
656
|
+
*/
|
|
657
|
+
declare function fixedDigitsMaskCompleteValidator(expectedDigits: number): ValidatorFn;
|
|
658
|
+
/** CEP brasileiro (`app-cep-field`): 8 dígitos. Usar com `Validators.required`. */
|
|
659
|
+
declare function cepMaskCompleteValidator(): ValidatorFn;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Contrato documental de entradas visuais comuns (campos com `BaseFieldDirective`).
|
|
663
|
+
* Nem todos os membros existem em todos os componentes; use como referência de API.
|
|
664
|
+
*
|
|
665
|
+
* **Aliases estáveis:** `iconLeft` → `prefixIcon` (mesmo valor).
|
|
666
|
+
*/
|
|
667
|
+
interface FieldCommonInputs {
|
|
668
|
+
label: string;
|
|
669
|
+
placeholder: string;
|
|
670
|
+
/** Mensagem de erro sob o campo; vazia usa o texto padrão quando inválido. */
|
|
671
|
+
errorMessage: string;
|
|
672
|
+
/** Por defeito `false` na `BaseFieldDirective`. */
|
|
673
|
+
showErrorMessage?: boolean;
|
|
674
|
+
disabled: boolean;
|
|
675
|
+
readonly: boolean;
|
|
676
|
+
required: boolean;
|
|
677
|
+
/** Asterisco no label quando obrigatório; padrão `false` na `BaseFieldDirective`. */
|
|
678
|
+
showRequiredMark?: boolean;
|
|
679
|
+
id: string;
|
|
680
|
+
name: string;
|
|
681
|
+
/** Ícone Font Awesome à esquerda; use com `showPrefixIcon`. */
|
|
682
|
+
showPrefixIcon?: boolean;
|
|
683
|
+
prefixIcon?: string;
|
|
684
|
+
/** Alias de `prefixIcon`. */
|
|
685
|
+
iconLeft?: string;
|
|
686
|
+
clearable?: boolean;
|
|
687
|
+
clearAriaLabel?: string;
|
|
688
|
+
/** `true` = sugestões do navegador; padrão nos componentes é `false`. */
|
|
689
|
+
autocomplete?: boolean;
|
|
690
|
+
/** Skeleton no `app-base-field` enquanto dados externos carregam. */
|
|
691
|
+
loading?: boolean;
|
|
692
|
+
/** Botão «…» no sufixo com menu de ações; padrão `false` na `BaseFieldDirective`. */
|
|
693
|
+
mostrarMenuContexto?: boolean;
|
|
694
|
+
/** Itens do menu do sufixo; só mostra o botão se a lista tiver entradas. */
|
|
695
|
+
contextMenuItems?: readonly MenuNodeItem<string>[];
|
|
696
|
+
/** `id` ARIA do menu do sufixo; por defeito `{id do campo}-ctx`. */
|
|
697
|
+
contextMenuId?: string;
|
|
698
|
+
/** Texto: limite de caracteres (padrão no componente). */
|
|
699
|
+
maxLength?: number;
|
|
700
|
+
/** Inteiro/decimal: valor máximo numérico (padrão no componente). */
|
|
701
|
+
max?: number;
|
|
702
|
+
/** Data: formatação com hh:mm e hora atual ao escolher no calendário. */
|
|
703
|
+
showTimeHours?: boolean;
|
|
704
|
+
/** Data: limite inferior do calendário. */
|
|
705
|
+
minDate?: Date | null;
|
|
706
|
+
/** Data: limite superior do calendário. */
|
|
707
|
+
maxDate?: Date | null;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
interface UiSelectOption<T = unknown> {
|
|
711
|
+
label: string;
|
|
712
|
+
value: T;
|
|
713
|
+
disabled?: boolean;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** Unidades federativas do Brasil (nome + sigla). Ordem alfabética por nome. */
|
|
717
|
+
declare const BR_ESTADOS_NOME_SIGLA: ReadonlyArray<{
|
|
718
|
+
nome: string;
|
|
719
|
+
sigla: string;
|
|
720
|
+
}>;
|
|
721
|
+
declare function mapEstadosToOptions(slice: ReadonlyArray<{
|
|
722
|
+
nome: string;
|
|
723
|
+
sigla: string;
|
|
724
|
+
}>): UiSelectOption<string>[];
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Mantém apenas dígitos (0–9). Primeira versão sem sinal negativo.
|
|
728
|
+
*/
|
|
729
|
+
declare function sanitizeIntegerDigits(raw: string): string;
|
|
730
|
+
declare function parseIntegerString(digits: string): number | null;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Formatação pt-BR para inteiros: apenas separador de milhar com ponto.
|
|
734
|
+
* Usado pelo campo inteiro e pela parte inteira do decimal.
|
|
735
|
+
*/
|
|
736
|
+
/**
|
|
737
|
+
* Formata sequência de dígitos com pontos de milhar (ex.: 1234567 → 1.234.567).
|
|
738
|
+
* Aceita string vazia; não normaliza zeros à esquerda.
|
|
739
|
+
*/
|
|
740
|
+
declare function formatIntegerThousandsBr(intDigits: string): string;
|
|
741
|
+
/**
|
|
742
|
+
* Quantidade de dígitos à esquerda do caret na máscara (pontos ignorados).
|
|
743
|
+
*/
|
|
744
|
+
declare function semanticIntegerDigitCountLeft(display: string, caret: number): number;
|
|
745
|
+
/**
|
|
746
|
+
* Índice do caret após o enésimo dígito na string formatada (fim se não houver tantos).
|
|
747
|
+
*/
|
|
748
|
+
declare function caretIndexFromIntegerDigitCount(display: string, digitCount: number): number;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Utilitários pt-BR fixo: vírgula decimal, ponto milhar, duas casas na formatação final.
|
|
752
|
+
*/
|
|
753
|
+
|
|
754
|
+
declare function sanitizeDecimalBrInput(raw: string): string;
|
|
755
|
+
/**
|
|
756
|
+
* Remove pontos e interpreta a última vírgula como separador decimal.
|
|
757
|
+
* Retorna apenas dígitos na parte inteira e até 2 na fracionária.
|
|
758
|
+
*/
|
|
759
|
+
declare function extractDecimalBrParts(rawDisplay: string): {
|
|
760
|
+
intDigits: string;
|
|
761
|
+
fracDigits: string;
|
|
762
|
+
hasComma: boolean;
|
|
763
|
+
};
|
|
764
|
+
/**
|
|
765
|
+
* Monta o texto exibido durante a digitação (milhares com ponto, vírgula decimal).
|
|
766
|
+
*/
|
|
767
|
+
declare function buildDecimalBrDisplay(parts: {
|
|
768
|
+
intDigits: string;
|
|
769
|
+
fracDigits: string;
|
|
770
|
+
hasComma: boolean;
|
|
771
|
+
}): string;
|
|
772
|
+
/**
|
|
773
|
+
* Posição semântica do cursor para remapear após reformatar.
|
|
774
|
+
*/
|
|
775
|
+
declare function semanticCaretAt(value: string, caret: number): {
|
|
776
|
+
intCount: number;
|
|
777
|
+
afterComma: boolean;
|
|
778
|
+
fracCount: number;
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* Índice do caret no texto formatado a partir da posição semântica.
|
|
782
|
+
*/
|
|
783
|
+
declare function caretIndexFromSemantic(display: string, target: {
|
|
784
|
+
intCount: number;
|
|
785
|
+
afterComma: boolean;
|
|
786
|
+
fracCount: number;
|
|
787
|
+
}): number;
|
|
788
|
+
/**
|
|
789
|
+
* String passível de parseDecimalBr a partir das partes editáveis.
|
|
790
|
+
*/
|
|
791
|
+
declare function buildDecimalBrParseString(parts: {
|
|
792
|
+
intDigits: string;
|
|
793
|
+
fracDigits: string;
|
|
794
|
+
hasComma: boolean;
|
|
795
|
+
}): string;
|
|
796
|
+
/**
|
|
797
|
+
* Interpreta string já sanitizada e retorna número com até 2 casas decimais (arredondamento).
|
|
798
|
+
* Vazio → null. Vírgula como separador decimal; pontos são removidos da parte inteira.
|
|
799
|
+
*/
|
|
800
|
+
declare function parseDecimalBr(sanitized: string): number | null;
|
|
801
|
+
declare function formatDecimalBr(value: number): string;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Formatação e normalização de data/hora no padrão pt-BR (lib ui-fields).
|
|
805
|
+
*/
|
|
806
|
+
/**
|
|
807
|
+
* Exibe data como dd/mm/aaaa; com `showTimeHours`, dd/mm/aaaa hh:mm:ss (24h).
|
|
808
|
+
*/
|
|
809
|
+
declare function formatDateTimePtBr(date: Date, showTimeHours: boolean): string;
|
|
810
|
+
/**
|
|
811
|
+
* Interpreta valor vindo do formulário / API.
|
|
812
|
+
* Aceita data local sem fuso (`YYYY-MM-DD` ou `YYYY-MM-DDTHH:mm:ss`), `Date`, número ou ISO com `Z`.
|
|
813
|
+
*/
|
|
814
|
+
declare function parseUiFieldDateValue(value: unknown): Date | null;
|
|
815
|
+
/**
|
|
816
|
+
* Valor persistido no `FormControl`: horário de parede local, sem `Z`
|
|
817
|
+
* (evita 14:59 no input virar 17:59 no `JSON.stringify` de `Date`).
|
|
818
|
+
*/
|
|
819
|
+
declare function formatUiFieldDateValue(d: Date, showTimeHours: boolean): string;
|
|
820
|
+
/** @deprecated use {@link parseUiFieldDateValue} */
|
|
821
|
+
declare function normalizeFormDateValue(value: unknown): Date | null;
|
|
822
|
+
/**
|
|
823
|
+
* Data escolhida no calendário: meia-noite local, ou com `showTimeHours` a hora completa
|
|
824
|
+
* (h, min, s, ms) do instante da seleção.
|
|
825
|
+
*/
|
|
826
|
+
declare function applyPickedCalendarDate(picked: Date, showTimeHours: boolean): Date;
|
|
827
|
+
|
|
828
|
+
declare abstract class BooleanFieldDirective extends BaseFieldDirective<boolean | null> implements OnInit, OnChanges, DoCheck {
|
|
829
|
+
protected ngControl: NgControl | null;
|
|
830
|
+
/** Ver {@link NgControlFieldDirective.ngDoCheck} — `resetForm()` sem `ngSubmit`. */
|
|
831
|
+
private lastParentSubmitted;
|
|
832
|
+
checked: boolean;
|
|
833
|
+
/** Cache para templates OnPush (evita getters a cada CD). */
|
|
834
|
+
uiInvalid: boolean;
|
|
835
|
+
uiErrorMessage: string;
|
|
836
|
+
uiAriaDescribedBy: string | null;
|
|
837
|
+
uiRequiredEffective: boolean;
|
|
838
|
+
/** Por omissão não mostra o parágrafo de erro (checkbox/switch); alinhado à base dos campos. */
|
|
839
|
+
showErrorMessage: boolean;
|
|
840
|
+
protected resolveControlForRequired(): AbstractControl | null | undefined;
|
|
841
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
842
|
+
ngOnInit(): void;
|
|
843
|
+
ngDoCheck(): void;
|
|
844
|
+
/**
|
|
845
|
+
* Checkbox/switch: mostrar erro após alterar o valor (`dirty`), após foco (`touched`)
|
|
846
|
+
* ou após envio do formulário — ao contrário dos inputs de texto, não há “valor intermédio”
|
|
847
|
+
* e o utilizador espera feedback imediato ao marcar/desmarcar.
|
|
848
|
+
*/
|
|
849
|
+
protected boolInvalidShownAfterInteraction(control: AbstractControl | null | undefined): boolean;
|
|
850
|
+
protected controlInvalidUi(control: AbstractControl | null | undefined): boolean;
|
|
851
|
+
protected syncBoolUi(): void;
|
|
852
|
+
private registerFormSubmitRecheckBool;
|
|
853
|
+
protected afterWriteValue(value: boolean | null): void;
|
|
854
|
+
protected setChecked(next: boolean): void;
|
|
855
|
+
get baseInvalid(): boolean;
|
|
856
|
+
/**
|
|
857
|
+
* A classe base só devolvia texto quando `isEffectiveRequired` batia com o mesmo instante
|
|
858
|
+
* do `NgControl`; com `requiredTrue` + submit, o estado vermelho aparecia sem mensagem.
|
|
859
|
+
*/
|
|
860
|
+
getErrorMessage(): string;
|
|
861
|
+
get errorElementId(): string;
|
|
862
|
+
onBlur(): void;
|
|
863
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanFieldDirective, never>;
|
|
864
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanFieldDirective, never, never, { "showErrorMessage": { "alias": "showErrorMessage"; "required": false; }; }, {}, never, never, true, never>;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
declare class CheckboxFieldComponent extends BooleanFieldDirective {
|
|
868
|
+
onCheckboxClick(ev: MouseEvent): void;
|
|
869
|
+
onNativeChange(event: Event): void;
|
|
870
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
|
|
871
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxFieldComponent, "app-checkbox-field", never, {}, {}, never, never, true, never>;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
declare class SwitchFieldComponent extends BooleanFieldDirective {
|
|
875
|
+
get labelId(): string;
|
|
876
|
+
toggle(): void;
|
|
877
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchFieldComponent, never>;
|
|
878
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchFieldComponent, "app-switch-field", never, {}, {}, never, never, true, never>;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Base de overlay para **listas ligadas a campos** (select, dropdown-menu, etc.).
|
|
883
|
+
* Para tooltips/popovers genéricos ver `AnchoredOverlayComponent` em `overlay/` — mesma stack CDK e tema,
|
|
884
|
+
* API de fecho semelhante (`open`/`openChange`, Escape), mas defaults diferentes (ex.: backdrop em dropdowns).
|
|
885
|
+
*/
|
|
886
|
+
declare class DropdownBaseComponent {
|
|
887
|
+
private readonly appTheme;
|
|
888
|
+
/**
|
|
889
|
+
* O overlay do CDK fica sob `body`; sem estas classes, `var(--app-color-*)` cai no `:root`.
|
|
890
|
+
* Tem de ser **array**: uma única string com espaço quebra `classList.add` e as classes não aplicam.
|
|
891
|
+
*/
|
|
892
|
+
readonly overlayPanelClasses: i0.Signal<string[]>;
|
|
893
|
+
/**
|
|
894
|
+
* O CDK não reaplica `cdkConnectedOverlayPanelClass` quando o overlay já existe.
|
|
895
|
+
* As classes de tema no painel interno seguem o tema activo sempre.
|
|
896
|
+
*/
|
|
897
|
+
readonly panelThemeNgClass: i0.Signal<{
|
|
898
|
+
[x: string]: boolean;
|
|
899
|
+
'app-library-theme': boolean;
|
|
900
|
+
}>;
|
|
901
|
+
open: boolean;
|
|
902
|
+
readonly openChange: EventEmitter<boolean>;
|
|
903
|
+
/** Conteúdo do painel (lista, etc.) renderizado no overlay. */
|
|
904
|
+
panelTemplate: TemplateRef<unknown>;
|
|
905
|
+
/** Largura do painel em px (ex.: largura total do campo). */
|
|
906
|
+
panelWidthPx: number | null;
|
|
907
|
+
closeOnEscape: boolean;
|
|
908
|
+
hasBackdrop: boolean;
|
|
909
|
+
/**
|
|
910
|
+
* Posições do overlay ligadas ao trigger (ex.: menu com flip vertical).
|
|
911
|
+
* Por omissão mantém o alinhamento clássico «por baixo» dos campos.
|
|
912
|
+
*/
|
|
913
|
+
connectedPositions: ConnectedPosition[] | undefined;
|
|
914
|
+
/** Empurra o overlay para caber no viewport quando há espaço insuficiente. */
|
|
915
|
+
pushConnectedOverlay: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* `true`: painel sem fundo/borda/sombra próprios — o conteúdo (ex.: `app-menu-list`) define o chrome.
|
|
918
|
+
* Evita dupla moldura com `menu-surface-shell` nos menus de acção.
|
|
919
|
+
*/
|
|
920
|
+
bareOverlayPanel: boolean;
|
|
921
|
+
get overlayWidthPx(): number;
|
|
922
|
+
get effectiveConnectedPositions(): ConnectedPosition[];
|
|
923
|
+
onBackdropClick(): void;
|
|
924
|
+
/**
|
|
925
|
+
* Cliques noutros controlos (fora do painel e fora do trigger) nem sempre passam pelo backdrop;
|
|
926
|
+
* o CDK expõe `overlayOutsideClick` para o mesmo efeito de fechar.
|
|
927
|
+
*/
|
|
928
|
+
onOverlayOutsideClick(): void;
|
|
929
|
+
onOverlayKeydown(ev: KeyboardEvent): void;
|
|
930
|
+
setOpen(next: boolean): void;
|
|
931
|
+
toggle(): void;
|
|
932
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownBaseComponent, never>;
|
|
933
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownBaseComponent, "app-dropdown-base", never, { "open": { "alias": "open"; "required": false; }; "panelTemplate": { "alias": "panelTemplate"; "required": true; }; "panelWidthPx": { "alias": "panelWidthPx"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "connectedPositions": { "alias": "connectedPositions"; "required": false; }; "pushConnectedOverlay": { "alias": "pushConnectedOverlay"; "required": false; }; "bareOverlayPanel": { "alias": "bareOverlayPanel"; "required": false; }; }, { "openChange": "openChange"; }, never, ["[appDropdownTrigger]"], true, never>;
|
|
934
|
+
static ngAcceptInputType_open: unknown;
|
|
935
|
+
static ngAcceptInputType_closeOnEscape: unknown;
|
|
936
|
+
static ngAcceptInputType_hasBackdrop: unknown;
|
|
937
|
+
static ngAcceptInputType_pushConnectedOverlay: unknown;
|
|
938
|
+
static ngAcceptInputType_bareOverlayPanel: unknown;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Lógica comum de select / combobox: opções, índice ativo, comparação e
|
|
943
|
+
* `notifyTouched` após seleção (evita flicker vermelho → válido no frame em que o valor ainda não atualizou o `FormControl`).
|
|
944
|
+
*/
|
|
945
|
+
declare abstract class DropdownOptionFieldBase extends NgControlFieldDirective<unknown | null> {
|
|
946
|
+
/** Estado “tem valor” para o label flutuante (evita getter no template). */
|
|
947
|
+
filledUi: boolean;
|
|
948
|
+
private _options;
|
|
949
|
+
get options(): ReadonlyArray<UiSelectOption<unknown>>;
|
|
950
|
+
set options(value: ReadonlyArray<UiSelectOption<unknown>>);
|
|
951
|
+
/** Alias de {@link options}. */
|
|
952
|
+
set itemsInput(value: ReadonlyArray<UiSelectOption<unknown>>);
|
|
953
|
+
private _compareWith;
|
|
954
|
+
get compareWith(): (a: unknown, b: unknown) => boolean;
|
|
955
|
+
set compareWith(fn: (a: unknown, b: unknown) => boolean);
|
|
956
|
+
/** Alias de {@link compareWith}. */
|
|
957
|
+
set compareBy(fn: (a: unknown, b: unknown) => boolean);
|
|
958
|
+
/** Lista de opções ainda a carregar (painel aberto ou primeiro fetch). */
|
|
959
|
+
optionsLoading: boolean;
|
|
960
|
+
activeIndex: number;
|
|
961
|
+
protected refreshFilledUi(): void;
|
|
962
|
+
writeValue(value: unknown | null): void;
|
|
963
|
+
protected emitModelValue(value: unknown | null): void;
|
|
964
|
+
/**
|
|
965
|
+
* Opções na ordem de exibição no painel: valor atual (se existir em `options`) em primeiro lugar.
|
|
966
|
+
*/
|
|
967
|
+
get listOptions(): ReadonlyArray<UiSelectOption<unknown>>;
|
|
968
|
+
/**
|
|
969
|
+
* Chamar após `emitModelValue` + fechar painel ao **escolher** um item.
|
|
970
|
+
* Adia `notifyTouched` para o próximo microtask para o validador já ver o valor novo.
|
|
971
|
+
*/
|
|
972
|
+
protected finishSelectionTouch(): void;
|
|
973
|
+
trackOption(_index: number, opt: UiSelectOption<unknown>): unknown;
|
|
974
|
+
isSelected(opt: UiSelectOption<unknown>): boolean;
|
|
975
|
+
protected findOptionByValue(value: unknown | null): UiSelectOption<unknown> | undefined;
|
|
976
|
+
protected matches(a: unknown, b: unknown): boolean;
|
|
977
|
+
protected syncActiveIndexFromValue(value: unknown | null): void;
|
|
978
|
+
protected firstEnabledIndex(): number;
|
|
979
|
+
protected lastEnabledIndex(): number;
|
|
980
|
+
protected stepActive(delta: number): number;
|
|
981
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownOptionFieldBase, never>;
|
|
982
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownOptionFieldBase, never, never, { "options": { "alias": "options"; "required": false; }; "itemsInput": { "alias": "items"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "compareBy": { "alias": "compareBy"; "required": false; }; "optionsLoading": { "alias": "optionsLoading"; "required": false; }; }, {}, never, never, true, never>;
|
|
983
|
+
static ngAcceptInputType_optionsLoading: unknown;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Base para multiselect: valor `unknown[]`, opções, índice ativo (teclado) e comparação.
|
|
988
|
+
*/
|
|
989
|
+
declare abstract class DropdownMultiOptionFieldBase extends NgControlFieldDirective<unknown[]> {
|
|
990
|
+
filledUi: boolean;
|
|
991
|
+
private _options;
|
|
992
|
+
get options(): ReadonlyArray<UiSelectOption<unknown>>;
|
|
993
|
+
set options(value: ReadonlyArray<UiSelectOption<unknown>>);
|
|
994
|
+
/** Alias de {@link options}. */
|
|
995
|
+
set itemsInput(value: ReadonlyArray<UiSelectOption<unknown>>);
|
|
996
|
+
private _compareWith;
|
|
997
|
+
get compareWith(): (a: unknown, b: unknown) => boolean;
|
|
998
|
+
set compareWith(fn: (a: unknown, b: unknown) => boolean);
|
|
999
|
+
/** Alias de {@link compareWith}. */
|
|
1000
|
+
set compareBy(fn: (a: unknown, b: unknown) => boolean);
|
|
1001
|
+
/** Lista de opções ainda a carregar. */
|
|
1002
|
+
optionsLoading: boolean;
|
|
1003
|
+
activeIndex: number;
|
|
1004
|
+
protected refreshMultiFilledUi(): void;
|
|
1005
|
+
protected emitModelValue(value: unknown[] | null): void;
|
|
1006
|
+
/**
|
|
1007
|
+
* Opções com as selecionadas primeiro (mesma ordem relativa que em `options`).
|
|
1008
|
+
*/
|
|
1009
|
+
get listOptions(): ReadonlyArray<UiSelectOption<unknown>>;
|
|
1010
|
+
protected finishMultiTouch(): void;
|
|
1011
|
+
trackOption(_index: number, opt: UiSelectOption<unknown>): unknown;
|
|
1012
|
+
isSelected(opt: UiSelectOption<unknown>): boolean;
|
|
1013
|
+
protected findOptionByValue(value: unknown | null): UiSelectOption<unknown> | undefined;
|
|
1014
|
+
protected matches(a: unknown, b: unknown): boolean;
|
|
1015
|
+
protected syncActiveIndexToFirstEnabled(): void;
|
|
1016
|
+
protected firstEnabledIndex(): number;
|
|
1017
|
+
protected lastEnabledIndex(): number;
|
|
1018
|
+
protected stepActive(delta: number): number;
|
|
1019
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMultiOptionFieldBase, never>;
|
|
1020
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownMultiOptionFieldBase, never, never, { "options": { "alias": "options"; "required": false; }; "itemsInput": { "alias": "items"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "compareBy": { "alias": "compareBy"; "required": false; }; "optionsLoading": { "alias": "optionsLoading"; "required": false; }; }, {}, never, never, true, never>;
|
|
1021
|
+
static ngAcceptInputType_optionsLoading: unknown;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/** Evento emitido pelo select paginado ao precisar de mais dados (ex.: backend / combobox). */
|
|
1025
|
+
interface SelectPageRequested {
|
|
1026
|
+
/** Página 0-based (0 = primeiros `pageSize` itens). */
|
|
1027
|
+
page: number;
|
|
1028
|
+
pageSize: number;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
declare class SelectFieldComponent extends DropdownOptionFieldBase implements OnDestroy, OnChanges {
|
|
1032
|
+
private readonly hostRef;
|
|
1033
|
+
get hostInvalidClass(): boolean;
|
|
1034
|
+
pagination: boolean;
|
|
1035
|
+
/** Alias de {@link pagination} (listas paginadas / infinitas). */
|
|
1036
|
+
set pageableInput(value: boolean);
|
|
1037
|
+
pageSize: number;
|
|
1038
|
+
hasMore: boolean;
|
|
1039
|
+
loadingMore: boolean;
|
|
1040
|
+
readonly pageRequested: EventEmitter<SelectPageRequested>;
|
|
1041
|
+
optionsPanelTpl: TemplateRef<unknown>;
|
|
1042
|
+
private readonly dropdownTriggerRootRef;
|
|
1043
|
+
panelOpen: boolean;
|
|
1044
|
+
panelOverlayWidth: number;
|
|
1045
|
+
private scrollLoadTimer;
|
|
1046
|
+
protected afterWriteValue(value: unknown | null): void;
|
|
1047
|
+
get displayValue(): string;
|
|
1048
|
+
get optionsListId(): string;
|
|
1049
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1050
|
+
ngOnDestroy(): void;
|
|
1051
|
+
onDropdownOpenChange(next: boolean): void;
|
|
1052
|
+
/**
|
|
1053
|
+
* Com painel aberto, o foco permanece no botão (como no combobox no input):
|
|
1054
|
+
* setas / Home / End / Enter / Espaço tratados aqui; Escape fecha.
|
|
1055
|
+
*/
|
|
1056
|
+
onTriggerKeydown(ev: KeyboardEvent): void;
|
|
1057
|
+
private focusValueButtonIfFocusLost;
|
|
1058
|
+
onOptionsListScroll(ev: Event): void;
|
|
1059
|
+
private emitNextPageRequest;
|
|
1060
|
+
private tryEmitIfShortList;
|
|
1061
|
+
openToggle(): void;
|
|
1062
|
+
/** Enter/Espaço com foco na linha da opção (tabindex). */
|
|
1063
|
+
onOptionRowKeydown(ev: KeyboardEvent, opt: UiSelectOption<unknown>): void;
|
|
1064
|
+
onListKeydown(ev: KeyboardEvent): void;
|
|
1065
|
+
selectOption(opt: UiSelectOption<unknown>): void;
|
|
1066
|
+
onClear(): void;
|
|
1067
|
+
/**
|
|
1068
|
+
* Blur no valor/chevron ou na lista: fecha o painel se o foco saiu do campo e do overlay CDK.
|
|
1069
|
+
*/
|
|
1070
|
+
onDropdownBlur(ev?: FocusEvent): void;
|
|
1071
|
+
/** Escape com foco no limpar/prefixo do `base-field` (não passa pelo div da origem do overlay). */
|
|
1072
|
+
onDropdownHostEscape(ev: KeyboardEvent): void;
|
|
1073
|
+
private commitActiveOption;
|
|
1074
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectFieldComponent, never>;
|
|
1075
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectFieldComponent, "app-select-field", never, { "pagination": { "alias": "pagination"; "required": false; }; "pageableInput": { "alias": "pageable"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "hasMore": { "alias": "hasMore"; "required": false; }; "loadingMore": { "alias": "loadingMore"; "required": false; }; }, { "pageRequested": "pageRequested"; }, never, ["[appFieldPrefix]"], true, never>;
|
|
1076
|
+
static ngAcceptInputType_pagination: unknown;
|
|
1077
|
+
static ngAcceptInputType_pageableInput: unknown;
|
|
1078
|
+
static ngAcceptInputType_pageSize: unknown;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
declare class MultiselectFieldComponent extends DropdownMultiOptionFieldBase implements OnDestroy, OnChanges {
|
|
1082
|
+
private readonly hostRef;
|
|
1083
|
+
get hostInvalidClass(): boolean;
|
|
1084
|
+
/** Por omissão `true`: mesmo padrão do select com lista longa (`pageRequested` + scroll). */
|
|
1085
|
+
pagination: boolean;
|
|
1086
|
+
/** Alias de {@link pagination}. */
|
|
1087
|
+
set pageableInput(value: boolean);
|
|
1088
|
+
pageSize: number;
|
|
1089
|
+
hasMore: boolean;
|
|
1090
|
+
loadingMore: boolean;
|
|
1091
|
+
readonly pageRequested: EventEmitter<SelectPageRequested>;
|
|
1092
|
+
optionsPanelTpl: TemplateRef<unknown>;
|
|
1093
|
+
private readonly dropdownTriggerRootRef;
|
|
1094
|
+
panelOpen: boolean;
|
|
1095
|
+
panelOverlayWidth: number;
|
|
1096
|
+
private scrollLoadTimer;
|
|
1097
|
+
writeValue(value: unknown[] | null): void;
|
|
1098
|
+
protected afterWriteValue(_value: unknown[]): void;
|
|
1099
|
+
/** Texto numa linha: rótulos separados por vírgula + ellipsis no CSS. */
|
|
1100
|
+
get displaySummary(): string;
|
|
1101
|
+
get optionsListId(): string;
|
|
1102
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1103
|
+
ngOnDestroy(): void;
|
|
1104
|
+
onDropdownOpenChange(next: boolean): void;
|
|
1105
|
+
onTriggerKeydown(ev: KeyboardEvent): void;
|
|
1106
|
+
private focusValueButtonIfFocusLost;
|
|
1107
|
+
onOptionsListScroll(ev: Event): void;
|
|
1108
|
+
private emitNextPageRequest;
|
|
1109
|
+
private tryEmitIfShortList;
|
|
1110
|
+
openToggle(): void;
|
|
1111
|
+
toggleOption(opt: UiSelectOption<unknown>): void;
|
|
1112
|
+
private toggleActiveOption;
|
|
1113
|
+
onOptionRowKeydown(ev: KeyboardEvent, opt: UiSelectOption<unknown>): void;
|
|
1114
|
+
onListKeydown(ev: KeyboardEvent): void;
|
|
1115
|
+
onClear(): void;
|
|
1116
|
+
onDropdownBlur(ev?: FocusEvent): void;
|
|
1117
|
+
/** Escape com foco no limpar/prefixo do `base-field` (não passa pelo div da origem do overlay). */
|
|
1118
|
+
onDropdownHostEscape(ev: KeyboardEvent): void;
|
|
1119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiselectFieldComponent, never>;
|
|
1120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectFieldComponent, "app-multiselect-field", never, { "pagination": { "alias": "pagination"; "required": false; }; "pageableInput": { "alias": "pageable"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "hasMore": { "alias": "hasMore"; "required": false; }; "loadingMore": { "alias": "loadingMore"; "required": false; }; }, { "pageRequested": "pageRequested"; }, never, ["[appFieldPrefix]"], true, never>;
|
|
1121
|
+
static ngAcceptInputType_pagination: unknown;
|
|
1122
|
+
static ngAcceptInputType_pageableInput: unknown;
|
|
1123
|
+
static ngAcceptInputType_pageSize: unknown;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
/** Pedido de página para o campo com busca + scroll infinito. */
|
|
1127
|
+
interface DropdownSearchPageRequested {
|
|
1128
|
+
page: number;
|
|
1129
|
+
pageSize: number;
|
|
1130
|
+
/** Filtro atual (após Enter). Vazio = listar tudo paginado. */
|
|
1131
|
+
query: string;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
declare enum DropdownSearchOpenMode {
|
|
1135
|
+
Default = "default",
|
|
1136
|
+
KeepInput = "keepInput"
|
|
1137
|
+
}
|
|
1138
|
+
declare class DropdownSearchFieldComponent extends DropdownOptionFieldBase implements OnDestroy, OnChanges {
|
|
1139
|
+
private readonly hostRef;
|
|
1140
|
+
get hostInvalidClass(): boolean;
|
|
1141
|
+
pageSize: number;
|
|
1142
|
+
hasMore: boolean;
|
|
1143
|
+
loadingMore: boolean;
|
|
1144
|
+
/**
|
|
1145
|
+
* Após parar de digitar, dispara a mesma pesquisa que Enter (`pageRequested` com `query`).
|
|
1146
|
+
* `0` desativa (só Enter pesquisa).
|
|
1147
|
+
*/
|
|
1148
|
+
searchDebounceMs: number;
|
|
1149
|
+
readonly pageRequested: EventEmitter<DropdownSearchPageRequested>;
|
|
1150
|
+
optionsPanelTpl: TemplateRef<unknown>;
|
|
1151
|
+
private readonly dropdownTriggerRootRef;
|
|
1152
|
+
searchQuery: string;
|
|
1153
|
+
committedQuery: string;
|
|
1154
|
+
panelOpen: boolean;
|
|
1155
|
+
panelOverlayWidth: number;
|
|
1156
|
+
private scrollLoadTimer;
|
|
1157
|
+
private searchDebounceTimer;
|
|
1158
|
+
protected afterWriteValue(value: unknown | null): void;
|
|
1159
|
+
get displayValue(): string;
|
|
1160
|
+
get optionsListId(): string;
|
|
1161
|
+
/**
|
|
1162
|
+
* Com valor selecionado e painel fechado, o texto é só exibição do rótulo;
|
|
1163
|
+
* edição só com o painel aberto (pesquisa).
|
|
1164
|
+
*/
|
|
1165
|
+
get isLockedSelectionDisplay(): boolean;
|
|
1166
|
+
/** `readonly` nativo: prop do campo ou bloqueio de exibição da seleção. */
|
|
1167
|
+
get isNativeInputReadonly(): boolean;
|
|
1168
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1169
|
+
ngOnDestroy(): void;
|
|
1170
|
+
onDropdownOpenChange(next: boolean, openMode?: DropdownSearchOpenMode): void;
|
|
1171
|
+
onMainInput(ev: Event): void;
|
|
1172
|
+
onMainKeydown(ev: KeyboardEvent): void;
|
|
1173
|
+
/**
|
|
1174
|
+
* Ao reabrir, `committedQuery` é '' (lista sem filtro) e o texto do input é o rótulo do valor —
|
|
1175
|
+
* `q !== committedQuery` seria true sem o usuário ter pesquisado; Enter deve confirmar opção.
|
|
1176
|
+
*/
|
|
1177
|
+
private isDisplayingSelectedLabelWithUnfilteredList;
|
|
1178
|
+
onMainBlur(ev?: FocusEvent): void;
|
|
1179
|
+
/**
|
|
1180
|
+
* Sem valor no modelo: remove texto livre deixado no input (ex.: pesquisa sem escolha válida).
|
|
1181
|
+
* Não altera o `FormControl` — mantém-se `null`/vazio e o estado inválido (ex.: obrigatório) continua visível.
|
|
1182
|
+
*/
|
|
1183
|
+
private clearOrphanSearchTextAfterBlur;
|
|
1184
|
+
/** Escape com foco no limpar/prefixo do `base-field` (fora do input da origem). */
|
|
1185
|
+
onDropdownHostEscape(ev: KeyboardEvent): void;
|
|
1186
|
+
onTriggerKeydown(ev: KeyboardEvent): void;
|
|
1187
|
+
/** Enter/Espaço com foco na linha da opção (tabindex). */
|
|
1188
|
+
onOptionRowKeydown(ev: KeyboardEvent, opt: UiSelectOption<unknown>): void;
|
|
1189
|
+
/** Foco na lista (ex.: Tab): Delete/Backspace limpam a seleção. */
|
|
1190
|
+
onSearchListKeydown(ev: KeyboardEvent): void;
|
|
1191
|
+
private focusMainInputIfFocusLost;
|
|
1192
|
+
private scheduleDebouncedSearch;
|
|
1193
|
+
private clearSearchDebounce;
|
|
1194
|
+
/**
|
|
1195
|
+
* Alinha-se ao Enter: só dispara se `query` mudou em relação a `committedQuery`;
|
|
1196
|
+
* com painel fechado, só se houver texto pesquisável (como Enter sem abrir vazio).
|
|
1197
|
+
*/
|
|
1198
|
+
private applyDebouncedSearch;
|
|
1199
|
+
runSearch(): void;
|
|
1200
|
+
onOptionsListScroll(ev: Event): void;
|
|
1201
|
+
private emitNextPageRequest;
|
|
1202
|
+
private tryEmitIfShortList;
|
|
1203
|
+
openToggle(): void;
|
|
1204
|
+
private commitActiveOption;
|
|
1205
|
+
selectOption(opt: UiSelectOption<unknown>): void;
|
|
1206
|
+
onClear(): void;
|
|
1207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownSearchFieldComponent, never>;
|
|
1208
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownSearchFieldComponent, "app-dropdown-search-field", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "hasMore": { "alias": "hasMore"; "required": false; }; "loadingMore": { "alias": "loadingMore"; "required": false; }; "searchDebounceMs": { "alias": "searchDebounceMs"; "required": false; }; }, { "pageRequested": "pageRequested"; }, never, ["[appFieldPrefix]"], true, never>;
|
|
1209
|
+
static ngAcceptInputType_pageSize: unknown;
|
|
1210
|
+
static ngAcceptInputType_searchDebounceMs: unknown;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* Contrato documental para campos com lista de opções (`select`, `multiselect`, `dropdown-search`).
|
|
1215
|
+
*
|
|
1216
|
+
* **Canónicos / aliases**
|
|
1217
|
+
* - `options` | `items` — mesma lista
|
|
1218
|
+
* - `compareWith` | `compareBy` — mesma função
|
|
1219
|
+
* - `pagination` | `pageable` — só em `select` e `multiselect`
|
|
1220
|
+
*/
|
|
1221
|
+
interface DropdownListBindings<T = unknown> {
|
|
1222
|
+
options: ReadonlyArray<UiSelectOption<T>>;
|
|
1223
|
+
compareWith: (a: unknown, b: unknown) => boolean;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/** Espaçamento horizontal/vertical entre itens da linha. */
|
|
1227
|
+
declare enum FormRowGap {
|
|
1228
|
+
Xs = "xs",
|
|
1229
|
+
Sm = "sm",
|
|
1230
|
+
Md = "md",
|
|
1231
|
+
Lg = "lg"
|
|
1232
|
+
}
|
|
1233
|
+
/** Alinhamento no eixo cruzado (itens da linha). */
|
|
1234
|
+
declare enum FormRowAlign {
|
|
1235
|
+
Start = "start",
|
|
1236
|
+
Center = "center",
|
|
1237
|
+
End = "end",
|
|
1238
|
+
Stretch = "stretch"
|
|
1239
|
+
}
|
|
1240
|
+
/** Distribuição no eixo principal. */
|
|
1241
|
+
declare enum FormRowJustify {
|
|
1242
|
+
Start = "start",
|
|
1243
|
+
Center = "center",
|
|
1244
|
+
End = "end",
|
|
1245
|
+
Between = "between"
|
|
1246
|
+
}
|
|
1247
|
+
/** Variante visual do grupo. */
|
|
1248
|
+
declare enum FormGroupVariant {
|
|
1249
|
+
Default = "default",
|
|
1250
|
+
Outlined = "outlined",
|
|
1251
|
+
Subtle = "subtle"
|
|
1252
|
+
}
|
|
1253
|
+
/** Alinhamento horizontal no eixo principal (`justify-content`) em `app-layout-stack`. */
|
|
1254
|
+
declare enum LayoutStackAlign {
|
|
1255
|
+
Start = "start",
|
|
1256
|
+
Center = "center",
|
|
1257
|
+
End = "end",
|
|
1258
|
+
SpaceBetween = "space-between"
|
|
1259
|
+
}
|
|
1260
|
+
/** Alinhamento em `app-form-actions` (barra de ações de formulário). */
|
|
1261
|
+
declare enum FormActionsAlign {
|
|
1262
|
+
Start = "start",
|
|
1263
|
+
Center = "center",
|
|
1264
|
+
End = "end",
|
|
1265
|
+
SpaceBetween = "space-between"
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/** Faixa flexível com projeção de conteúdo (ex.: botões alinhados). */
|
|
1269
|
+
declare class LayoutStackComponent {
|
|
1270
|
+
/** Distribuição horizontal dos filhos (`justify-content`). */
|
|
1271
|
+
align: LayoutStackAlign;
|
|
1272
|
+
/**
|
|
1273
|
+
* Em ecrãs estreitos, aplica ajustes leves (ex.: `gap`) mantendo fila + `wrap`.
|
|
1274
|
+
* Por defeito `true`; não é necessário passar no template na maioria dos casos.
|
|
1275
|
+
*/
|
|
1276
|
+
stackOnMobile: boolean;
|
|
1277
|
+
/** Linha separadora acima da faixa. Nome explícito para evitar colisão com o esquema DOM em templates aninhados. */
|
|
1278
|
+
stackDivider: boolean;
|
|
1279
|
+
/**
|
|
1280
|
+
* Quando `true` (por defeito), os filhos repartem a largura da faixa (ex.: um botão a 100%;
|
|
1281
|
+
* vários com `flex` igual). Use `false` para faixas compactas (largura intrínseca).
|
|
1282
|
+
*/
|
|
1283
|
+
stackFill: boolean;
|
|
1284
|
+
get hostClass(): string;
|
|
1285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutStackComponent, never>;
|
|
1286
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutStackComponent, "app-layout-stack", never, { "align": { "alias": "align"; "required": false; }; "stackOnMobile": { "alias": "stackOnMobile"; "required": false; }; "stackDivider": { "alias": "stackDivider"; "required": false; }; "stackFill": { "alias": "stackFill"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1287
|
+
static ngAcceptInputType_stackOnMobile: unknown;
|
|
1288
|
+
static ngAcceptInputType_stackDivider: unknown;
|
|
1289
|
+
static ngAcceptInputType_stackFill: unknown;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/** Barra de ações de formulário (Salvar, Cancelar, Adicionar, …). Projeção de conteúdo. */
|
|
1293
|
+
declare class FormActionsComponent {
|
|
1294
|
+
align: FormActionsAlign;
|
|
1295
|
+
stackOnMobile: boolean;
|
|
1296
|
+
/**
|
|
1297
|
+
* Por omissão `true`: os botões repartem a largura da faixa (um botão ≈ 100%; vários repartem por igual).
|
|
1298
|
+
* Use `false` para faixa compacta (largura intrínseca, ex.: várias ações alinhadas à direita).
|
|
1299
|
+
*/
|
|
1300
|
+
fill: boolean;
|
|
1301
|
+
divider: boolean;
|
|
1302
|
+
/** `FormActionsAlign` e `LayoutStackAlign` partilham os mesmos valores; delegação ao `app-layout-stack`. */
|
|
1303
|
+
get layoutAlign(): LayoutStackAlign;
|
|
1304
|
+
get hostClass(): string;
|
|
1305
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormActionsComponent, never>;
|
|
1306
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormActionsComponent, "app-form-actions", never, { "align": { "alias": "align"; "required": false; }; "stackOnMobile": { "alias": "stackOnMobile"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "divider": { "alias": "divider"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1307
|
+
static ngAcceptInputType_stackOnMobile: unknown;
|
|
1308
|
+
static ngAcceptInputType_fill: unknown;
|
|
1309
|
+
static ngAcceptInputType_divider: unknown;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Coluna no sistema de 12 trilhos da {@link FormRowComponent}.
|
|
1314
|
+
* Em viewports menores que `sm`, usa `xs` (por defeito largura total).
|
|
1315
|
+
*/
|
|
1316
|
+
declare class FormColComponent {
|
|
1317
|
+
/** Colunas ocupadas em < `sm` (por defeito 12 = linha inteira). */
|
|
1318
|
+
xs: number;
|
|
1319
|
+
sm?: number;
|
|
1320
|
+
md?: number;
|
|
1321
|
+
lg?: number;
|
|
1322
|
+
xl?: number;
|
|
1323
|
+
order?: number;
|
|
1324
|
+
/** Quando `true`, a coluna pode crescer para ocupar espaço livre na linha (flex futuro / composição). */
|
|
1325
|
+
grow: boolean;
|
|
1326
|
+
get hostClass(): string;
|
|
1327
|
+
get hostVars(): string;
|
|
1328
|
+
private clampSpan;
|
|
1329
|
+
private normalizeOptionalSpan;
|
|
1330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormColComponent, never>;
|
|
1331
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormColComponent, "app-form-col", never, { "xs": { "alias": "xs"; "required": false; }; "sm": { "alias": "sm"; "required": false; }; "md": { "alias": "md"; "required": false; }; "lg": { "alias": "lg"; "required": false; }; "xl": { "alias": "xl"; "required": false; }; "order": { "alias": "order"; "required": false; }; "grow": { "alias": "grow"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1332
|
+
static ngAcceptInputType_xs: unknown;
|
|
1333
|
+
static ngAcceptInputType_order: unknown;
|
|
1334
|
+
static ngAcceptInputType_grow: unknown;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
declare class FormGroupComponent implements OnChanges, OnInit, DoCheck {
|
|
1338
|
+
private readonly cdr;
|
|
1339
|
+
private readonly destroyRef;
|
|
1340
|
+
private readonly hostRef;
|
|
1341
|
+
private readonly rootFormDir;
|
|
1342
|
+
titulo: string;
|
|
1343
|
+
subtitulo: string;
|
|
1344
|
+
collapsible: boolean;
|
|
1345
|
+
/**
|
|
1346
|
+
* Quando `true` (padrão), o cabeçalho alterna aberto/fechado (respeita {@link collapsed}).
|
|
1347
|
+
* Quando `false`, o grupo permanece **sempre expandido** (não recolhe), a seta fica só indicativa **em cinza**
|
|
1348
|
+
* e o cabeçalho deixa de ser clicável — útil para seções obrigatórias sempre visíveis.
|
|
1349
|
+
*/
|
|
1350
|
+
foldable: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* Com `collapsible`: `true` = grupo **fechado** (só cabeçalho visível), `false` = **aberto**.
|
|
1353
|
+
* O pai pode fixar o estado inicial e manter com `(collapsedChange)` ou `[collapsed]` ligado a uma variável.
|
|
1354
|
+
* Se {@link foldable} for `false`, o estado efectivo é sempre **aberto** (ignora-se `collapsed` para o corpo).
|
|
1355
|
+
*/
|
|
1356
|
+
collapsed: boolean;
|
|
1357
|
+
disabled: boolean;
|
|
1358
|
+
dense: boolean;
|
|
1359
|
+
canMoveUp: boolean;
|
|
1360
|
+
canMoveDown: boolean;
|
|
1361
|
+
showHeader: boolean;
|
|
1362
|
+
showDivider: boolean;
|
|
1363
|
+
variant: FormGroupVariant;
|
|
1364
|
+
/**
|
|
1365
|
+
* Com `collapsible` e `collapsed`: se `true`, o corpo **não** é criado no DOM enquanto o
|
|
1366
|
+
* grupo está fechado (após a primeira expansão pode voltar a fechar e voltar a desmontar).
|
|
1367
|
+
* Útil para blocos pesados inicialmente fechados; o `FormGroup` reactivo no ascendente
|
|
1368
|
+
* conserva valores — os `FormControlName` religam ao reabrir.
|
|
1369
|
+
*/
|
|
1370
|
+
destroyOnCollapse: boolean;
|
|
1371
|
+
/**
|
|
1372
|
+
* Quando `true`, o corpo não força `flex-direction: column` nos filhos projetados (ex.: conteúdo
|
|
1373
|
+
* próprio com grade ou `flex` em linha). O padrão `false` mantém o espaçamento vertical entre
|
|
1374
|
+
* várias `app-form-row` / wrapper com `formGroupName`.
|
|
1375
|
+
*/
|
|
1376
|
+
skipBodyChildStacking: boolean;
|
|
1377
|
+
/**
|
|
1378
|
+
* Quando `true`, mostra o ícone de aviso no cabeçalho. O pai deve refletir inválido **e** critério
|
|
1379
|
+
* de UX (ex. `dirty` ou formulário já submetido), não só `touched` — Tab/foco não deve acender sozinho.
|
|
1380
|
+
* Ignorado quando {@link formGroupPath} está definido (usa-se só o cálculo automático).
|
|
1381
|
+
*/
|
|
1382
|
+
groupInvalid: boolean;
|
|
1383
|
+
/**
|
|
1384
|
+
* Caminho no `FormGroup` raiz do `<form [formGroup]>` (ex.: `identificacao`, `endereco.morada`).
|
|
1385
|
+
* Quando preenchido, o ícone de aviso é calculado automaticamente a partir do estado reativo,
|
|
1386
|
+
* sem precisar de `[groupInvalid]` manual.
|
|
1387
|
+
*/
|
|
1388
|
+
formGroupPath: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* Quando `true`, o critério “já houve tentativa de envio” para o ícone automático (`formGroupPath`)
|
|
1391
|
+
* inclui este sinal (ex.: alinhar a `app-form-tabs` `[warning]` com `markAllAsTouched()` sem `submitted`
|
|
1392
|
+
* no `FormGroupDirective`, ou validação disparada por `(click)` em vez de `submit`).
|
|
1393
|
+
*/
|
|
1394
|
+
uxSubmittedPass: boolean;
|
|
1395
|
+
readonly collapsedChange: EventEmitter<boolean>;
|
|
1396
|
+
readonly moveUp: EventEmitter<void>;
|
|
1397
|
+
readonly moveDown: EventEmitter<void>;
|
|
1398
|
+
/** Estado interno espelha o input (OnPush + alterações externas). */
|
|
1399
|
+
private collapsedInternal;
|
|
1400
|
+
/** Evita `scrollIntoView` duplo no mesmo ciclo (clique + `[collapsed]` do pai). */
|
|
1401
|
+
private scrollIntoViewCoalesce;
|
|
1402
|
+
/**
|
|
1403
|
+
* `FormGroupDirective.submitted` nem sempre fica `true` no ciclo do ícone com `[formGroup]` reactivo;
|
|
1404
|
+
* o `submit` nativo do `<form>` garante aviso nos filhos após «Salvar» + `markAllAsTouched()`.
|
|
1405
|
+
* Repõe-se quando o `FormGroup` raiz volta a `VALID`.
|
|
1406
|
+
*/
|
|
1407
|
+
private formSubmitPassActive;
|
|
1408
|
+
/** Rastreia `rootFormDir.submitted` para repor {@link formSubmitPassActive} após `resetForm` com raiz ainda inválida. */
|
|
1409
|
+
private prevRootFormSubmitted;
|
|
1410
|
+
ngOnInit(): void;
|
|
1411
|
+
/**
|
|
1412
|
+
* Permite expandir o grupo a partir do exterior (ex.: resumo de validação antes de focar um campo).
|
|
1413
|
+
* `CustomEvent` no host: `ui-request-expand` (sem bubbles).
|
|
1414
|
+
*/
|
|
1415
|
+
private setupExpandRequestListener;
|
|
1416
|
+
/** Ícone de aviso: automático com `formGroupPath`, senão `groupInvalid` manual. */
|
|
1417
|
+
get invalidFlagVisible(): boolean;
|
|
1418
|
+
/**
|
|
1419
|
+
* `markAllAsTouched()` / `submitted` não passam sempre por `valueChanges`; com OnPush o getter
|
|
1420
|
+
* do ícone precisa do `submit` do `<form>` ancestral (após um tick) para atualizar.
|
|
1421
|
+
*/
|
|
1422
|
+
private setupFormPathInvalidTracking;
|
|
1423
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1424
|
+
/** Estado interno de colapso: com `foldable === false` força sempre expandido. */
|
|
1425
|
+
private applyCollapsedFromInputs;
|
|
1426
|
+
get hostClass(): string;
|
|
1427
|
+
get showHeaderBar(): boolean;
|
|
1428
|
+
get isCollapsed(): boolean;
|
|
1429
|
+
get renderBodyInDom(): boolean;
|
|
1430
|
+
get bodyVisuallyHidden(): boolean;
|
|
1431
|
+
get headerIsInteractive(): boolean;
|
|
1432
|
+
onHeaderClick(): void;
|
|
1433
|
+
onHeaderKeydown(ev: KeyboardEvent): void;
|
|
1434
|
+
onMoveUpClick(ev: Event): void;
|
|
1435
|
+
onMoveDownClick(ev: Event): void;
|
|
1436
|
+
private setCollapsed;
|
|
1437
|
+
/**
|
|
1438
|
+
* Após expandir, desloca a vista até ao grupo com scroll nativo suave, só o necessário
|
|
1439
|
+
* (`block: 'nearest'`). Executa após pintar o corpo expandido.
|
|
1440
|
+
*/
|
|
1441
|
+
private scheduleScrollIntoView;
|
|
1442
|
+
ngDoCheck(): void;
|
|
1443
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupComponent, never>;
|
|
1444
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupComponent, "app-form-group", never, { "titulo": { "alias": "titulo"; "required": true; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; "foldable": { "alias": "foldable"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "canMoveUp": { "alias": "canMoveUp"; "required": false; }; "canMoveDown": { "alias": "canMoveDown"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "showDivider": { "alias": "showDivider"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "destroyOnCollapse": { "alias": "destroyOnCollapse"; "required": false; }; "skipBodyChildStacking": { "alias": "skipBodyChildStacking"; "required": false; }; "groupInvalid": { "alias": "groupInvalid"; "required": false; }; "formGroupPath": { "alias": "formGroupPath"; "required": false; }; "uxSubmittedPass": { "alias": "uxSubmittedPass"; "required": false; }; }, { "collapsedChange": "collapsedChange"; "moveUp": "moveUp"; "moveDown": "moveDown"; }, never, ["*"], true, never>;
|
|
1445
|
+
static ngAcceptInputType_collapsible: unknown;
|
|
1446
|
+
static ngAcceptInputType_foldable: unknown;
|
|
1447
|
+
static ngAcceptInputType_collapsed: unknown;
|
|
1448
|
+
static ngAcceptInputType_disabled: unknown;
|
|
1449
|
+
static ngAcceptInputType_dense: unknown;
|
|
1450
|
+
static ngAcceptInputType_canMoveUp: unknown;
|
|
1451
|
+
static ngAcceptInputType_canMoveDown: unknown;
|
|
1452
|
+
static ngAcceptInputType_showHeader: unknown;
|
|
1453
|
+
static ngAcceptInputType_showDivider: unknown;
|
|
1454
|
+
static ngAcceptInputType_destroyOnCollapse: unknown;
|
|
1455
|
+
static ngAcceptInputType_skipBodyChildStacking: unknown;
|
|
1456
|
+
static ngAcceptInputType_groupInvalid: unknown;
|
|
1457
|
+
static ngAcceptInputType_uxSubmittedPass: unknown;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
declare class FormRowComponent {
|
|
1461
|
+
gap: FormRowGap;
|
|
1462
|
+
align: FormRowAlign;
|
|
1463
|
+
justify: FormRowJustify;
|
|
1464
|
+
wrap: boolean;
|
|
1465
|
+
stackOnMobile: boolean;
|
|
1466
|
+
get hostClass(): string;
|
|
1467
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormRowComponent, never>;
|
|
1468
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormRowComponent, "app-form-row", never, { "gap": { "alias": "gap"; "required": false; }; "align": { "alias": "align"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "stackOnMobile": { "alias": "stackOnMobile"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1469
|
+
static ngAcceptInputType_wrap: unknown;
|
|
1470
|
+
static ngAcceptInputType_stackOnMobile: unknown;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
declare class FormSectionComponent {
|
|
1474
|
+
titulo: string;
|
|
1475
|
+
subtitulo: string;
|
|
1476
|
+
dense: boolean;
|
|
1477
|
+
withDivider: boolean;
|
|
1478
|
+
get hostClass(): string;
|
|
1479
|
+
get showHeader(): boolean;
|
|
1480
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormSectionComponent, never>;
|
|
1481
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormSectionComponent, "app-form-section", never, { "titulo": { "alias": "titulo"; "required": true; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "withDivider": { "alias": "withDivider"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1482
|
+
static ngAcceptInputType_dense: unknown;
|
|
1483
|
+
static ngAcceptInputType_withDivider: unknown;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
/** Variante visual do resumo de validação. */
|
|
1487
|
+
type ValidationSummaryVariant = 'error' | 'warning' | 'info';
|
|
1488
|
+
/** Item do resumo: mensagem e destino opcional para foco / scroll / destaque. */
|
|
1489
|
+
interface ValidationSummaryItem {
|
|
1490
|
+
message: string;
|
|
1491
|
+
/** `id` HTML do controle focável (ex.: o mesmo `[id]` dos campos da lib). */
|
|
1492
|
+
fieldId?: string;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
declare class ValidationSummaryComponent implements OnChanges {
|
|
1496
|
+
private static nextTitleUid;
|
|
1497
|
+
private static nextListRegionUid;
|
|
1498
|
+
/** Troca de aba (`beforeItemActivate`) + `queueMicrotask` no `app-form-tabs` — o alvo pode ficar em `[hidden]` até o próximo CD. */
|
|
1499
|
+
private readonly navigateToFieldMaxAttempts;
|
|
1500
|
+
private readonly appRef;
|
|
1501
|
+
private readonly cdr;
|
|
1502
|
+
private readonly injector;
|
|
1503
|
+
private readonly hostRef;
|
|
1504
|
+
/** `id` único para `aria-labelledby` quando há vários resumos na página. */
|
|
1505
|
+
readonly titleElementId: string;
|
|
1506
|
+
/** `id` da região da lista (acessibilidade do botão recolher / expandir). */
|
|
1507
|
+
readonly listRegionId: string;
|
|
1508
|
+
/** Lista simples (retrocompatível). Ignorada se {@link items} tiver entradas. */
|
|
1509
|
+
messages: string[] | null;
|
|
1510
|
+
/** Lista rica com `fieldId` opcional para navegação até o controle. */
|
|
1511
|
+
items: ValidationSummaryItem[] | null;
|
|
1512
|
+
/**
|
|
1513
|
+
* Título do cabeçalho (`title="…"` no template).
|
|
1514
|
+
* Não usar a propriedade `title` na classe: colide com `HTMLElement.title` no host e o
|
|
1515
|
+
* browser pode desenhar tooltip nativo / comportamentos estranhos.
|
|
1516
|
+
*/
|
|
1517
|
+
summaryHeading: string;
|
|
1518
|
+
visible: boolean;
|
|
1519
|
+
/**
|
|
1520
|
+
* `false` (padrão): fluxo em documento (ex.: no topo do formulário) — o consumidor pode fazer scroll até o painel.
|
|
1521
|
+
* `true`: painel `position: fixed` no topo do viewport, com fade-in **sem** reservar espaço no formulário
|
|
1522
|
+
* nem alterar o scroll da página (útil em formulários muito longos).
|
|
1523
|
+
*/
|
|
1524
|
+
pinned: boolean;
|
|
1525
|
+
variant: ValidationSummaryVariant;
|
|
1526
|
+
compact: boolean;
|
|
1527
|
+
/**
|
|
1528
|
+
* Altura máxima do painel da lista (ex.: `12rem`, `min(40vh, 14rem)`).
|
|
1529
|
+
* Quando definido, a lista obtém scroll vertical interno.
|
|
1530
|
+
*/
|
|
1531
|
+
panelMaxHeight: string | null;
|
|
1532
|
+
/** Comportamento de scroll ao centrar o alvo na tela. */
|
|
1533
|
+
scrollBehavior: ScrollBehavior;
|
|
1534
|
+
/**
|
|
1535
|
+
* Chamado antes de localizar o elemento por `fieldId` (ex.: ativar a aba onde está o campo).
|
|
1536
|
+
* Mantém o contrato do resumo como fonte única de scroll/foco em `navigateToFieldId`.
|
|
1537
|
+
*/
|
|
1538
|
+
beforeItemActivate?: (item: ValidationSummaryItem) => void;
|
|
1539
|
+
/** Mostra botão que apenas fecha o painel (não altera validação nem o formulário). */
|
|
1540
|
+
showCloseButton: boolean;
|
|
1541
|
+
/**
|
|
1542
|
+
* Mostra o botão com setas (recolher / expandir) ao lado do título para esconder só a lista
|
|
1543
|
+
* e poupar espaço vertical sem fechar o painel.
|
|
1544
|
+
*/
|
|
1545
|
+
showListCollapseToggle: boolean;
|
|
1546
|
+
closeButtonLabel: string;
|
|
1547
|
+
/** Texto da dica nativa (`title`) nas linhas com destino ao campo. */
|
|
1548
|
+
fieldNavigateHint: string;
|
|
1549
|
+
readonly panelClose: EventEmitter<void>;
|
|
1550
|
+
/** Com `pinned`: breve fade-in após o painel passar a visível (sem deslocar o layout). */
|
|
1551
|
+
pinnedOpen: boolean;
|
|
1552
|
+
/** `true`: lista de erros visível; `false`: só cabeçalho + botões (menos altura). */
|
|
1553
|
+
panelBodyExpanded: boolean;
|
|
1554
|
+
private wasShown;
|
|
1555
|
+
get hostClass(): string;
|
|
1556
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
1557
|
+
get hostHidden(): true | null;
|
|
1558
|
+
get resolvedItems(): ValidationSummaryItem[];
|
|
1559
|
+
get isShown(): boolean;
|
|
1560
|
+
onCloseClick(): void;
|
|
1561
|
+
toggleListBody(): void;
|
|
1562
|
+
/**
|
|
1563
|
+
* Chave estável para `@for` — `track $index` reutiliza mal nós quando a lista muda ao vivo
|
|
1564
|
+
* e o getter `resolvedItems` devolve novas referências a cada CD.
|
|
1565
|
+
*/
|
|
1566
|
+
itemTrackKey(row: ValidationSummaryItem, index: number): string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Clique na linha com destino: primeiro alinha a linha no `list-wrap` com scroll
|
|
1569
|
+
* (itens parcialmente visíveis passam a ficar totalmente visíveis), depois navega.
|
|
1570
|
+
*/
|
|
1571
|
+
onSummaryLinkActivate(ev: Event, item: ValidationSummaryItem): void;
|
|
1572
|
+
/** Navegação até o controle com `fieldId` (chamado após {@link onSummaryLinkActivate}). */
|
|
1573
|
+
onItemActivate(item: ValidationSummaryItem): void;
|
|
1574
|
+
private navigateToFieldId;
|
|
1575
|
+
/** Após `tick()`, garante um frame de pintura antes de scroll/foco (evita foco em ramo ainda oculto). */
|
|
1576
|
+
private scheduleScrollAndFocusAfterDomFlush;
|
|
1577
|
+
private isInsideCollapsedFormGroupBody;
|
|
1578
|
+
private scrollAndFocusFieldById;
|
|
1579
|
+
/**
|
|
1580
|
+
* Dispara `ui-request-expand` em cada `app-form-group` colapsado do formulário que contém este resumo,
|
|
1581
|
+
* para montar campos com `destroyOnCollapse` antes de `getElementById(fieldId)`.
|
|
1582
|
+
* Ordem do DOM (pais antes dos filhos) alinha a expansão de grupos aninhados.
|
|
1583
|
+
*/
|
|
1584
|
+
private expandCollapsedFormGroupsInNearestForm;
|
|
1585
|
+
/** Expande do mais externo para o mais interno para o conteúdo ficar visível. */
|
|
1586
|
+
private expandCollapsedFormGroupAncestors;
|
|
1587
|
+
private resolveFocusable;
|
|
1588
|
+
private isFocusableElement;
|
|
1589
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationSummaryComponent, never>;
|
|
1590
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ValidationSummaryComponent, "app-validation-summary", never, { "messages": { "alias": "messages"; "required": false; }; "items": { "alias": "items"; "required": false; }; "summaryHeading": { "alias": "title"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "pinned": { "alias": "pinned"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; }; "beforeItemActivate": { "alias": "beforeItemActivate"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "showListCollapseToggle": { "alias": "showListCollapseToggle"; "required": false; }; "closeButtonLabel": { "alias": "closeButtonLabel"; "required": false; }; "fieldNavigateHint": { "alias": "fieldNavigateHint"; "required": false; }; }, { "panelClose": "panelClose"; }, never, never, true, never>;
|
|
1591
|
+
static ngAcceptInputType_visible: unknown;
|
|
1592
|
+
static ngAcceptInputType_pinned: unknown;
|
|
1593
|
+
static ngAcceptInputType_compact: unknown;
|
|
1594
|
+
static ngAcceptInputType_showCloseButton: unknown;
|
|
1595
|
+
static ngAcceptInputType_showListCollapseToggle: unknown;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
declare class FormTabComponent implements OnChanges {
|
|
1599
|
+
/** Sem `host: true`: o pai está no injetor normal (filho de `app-form-tabs`). */
|
|
1600
|
+
private readonly tabs;
|
|
1601
|
+
private readonly cdr;
|
|
1602
|
+
key: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Texto do separador na lista de abas.
|
|
1605
|
+
* Não usar o nome `title`: no host `<app-form-tab>` o atributo HTML `title` gera tooltip nativo
|
|
1606
|
+
* sobre o painel (ex.: ao passar o mouse sobre o conteúdo).
|
|
1607
|
+
*/
|
|
1608
|
+
tabTitle: string;
|
|
1609
|
+
disabled: boolean;
|
|
1610
|
+
warning: boolean;
|
|
1611
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1612
|
+
get isActive(): boolean;
|
|
1613
|
+
/**
|
|
1614
|
+
* Com `[keepAlive]="false"` no `app-form-tabs` pai, painéis inactivos saem do DOM (menos
|
|
1615
|
+
* custo acumulado em ecrãs com muitas abas ou conteúdo pesado).
|
|
1616
|
+
*/
|
|
1617
|
+
get detachInactivePanel(): boolean;
|
|
1618
|
+
/** Chamado por {@link FormTabsComponent} quando a aba ativa muda (OnPush). */
|
|
1619
|
+
refreshActiveState(): void;
|
|
1620
|
+
get hostClass(): string;
|
|
1621
|
+
panelId(): string;
|
|
1622
|
+
labelledById(): string;
|
|
1623
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormTabComponent, never>;
|
|
1624
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormTabComponent, "app-form-tab", never, { "key": { "alias": "key"; "required": true; }; "tabTitle": { "alias": "tabTitle"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "warning": { "alias": "warning"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1625
|
+
static ngAcceptInputType_disabled: unknown;
|
|
1626
|
+
static ngAcceptInputType_warning: unknown;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
type FormTabsVariant = 'default' | 'pill';
|
|
1630
|
+
|
|
1631
|
+
declare class FormTabsComponent implements AfterContentInit {
|
|
1632
|
+
private static nextUid;
|
|
1633
|
+
private readonly cdr;
|
|
1634
|
+
readonly uid: string;
|
|
1635
|
+
tabQuery: QueryList<FormTabComponent>;
|
|
1636
|
+
private _activeKey;
|
|
1637
|
+
set activeKey(v: string | undefined | null);
|
|
1638
|
+
get activeKey(): string;
|
|
1639
|
+
readonly activeKeyChange: EventEmitter<string>;
|
|
1640
|
+
/**
|
|
1641
|
+
* `true` (padrão): todos os painéis permanecem no DOM; inactivos usam `[hidden]` (útil para
|
|
1642
|
+
* preservar estado de UI puramente client-side dentro da aba).
|
|
1643
|
+
* `false`: só o painel da aba activa é montado — menos DOM/CD ao alternar; o modelo reactivo
|
|
1644
|
+
* (`FormGroup` no ascendente) mantém-se; ao voltar à aba, os campos remontam e religam-se.
|
|
1645
|
+
*/
|
|
1646
|
+
keepAlive: boolean;
|
|
1647
|
+
stretch: boolean;
|
|
1648
|
+
variant: FormTabsVariant;
|
|
1649
|
+
/** Rótulo acessível para a lista de separadores (ex.: “Seções do formulário”). */
|
|
1650
|
+
tablistAriaLabel: string;
|
|
1651
|
+
ngAfterContentInit(): void;
|
|
1652
|
+
get tabs(): FormTabComponent[];
|
|
1653
|
+
get hostClass(): string;
|
|
1654
|
+
baseId(): string;
|
|
1655
|
+
headerIdFor(key: string): string;
|
|
1656
|
+
panelIdFor(key: string): string;
|
|
1657
|
+
selectTab(key: string): void;
|
|
1658
|
+
private refreshTabPanels;
|
|
1659
|
+
/**
|
|
1660
|
+
* Chamado por {@link FormTabComponent} quando inputs que afetam o tablist (ex.: `warning`, `tabTitle`)
|
|
1661
|
+
* mudam — com OnPush o cabeçalho não voltava a desenhar só com alterações nos filhos projetados.
|
|
1662
|
+
*/
|
|
1663
|
+
onTabHeaderStateChanged(): void;
|
|
1664
|
+
isSelected(key: string): boolean;
|
|
1665
|
+
private syncInitialActiveKey;
|
|
1666
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormTabsComponent, never>;
|
|
1667
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormTabsComponent, "app-form-tabs", never, { "activeKey": { "alias": "activeKey"; "required": false; }; "keepAlive": { "alias": "keepAlive"; "required": false; }; "stretch": { "alias": "stretch"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "tablistAriaLabel": { "alias": "tablistAriaLabel"; "required": false; }; }, { "activeKeyChange": "activeKeyChange"; }, ["tabQuery"], ["app-form-tab"], true, never>;
|
|
1668
|
+
static ngAcceptInputType_keepAlive: unknown;
|
|
1669
|
+
static ngAcceptInputType_stretch: unknown;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Mantém ícones / getters que dependem do estado reactivo actualizados com OnPush.
|
|
1674
|
+
* `markAllAsTouched()` pode não emitir `valueChanges` no raiz; o `submit` do `<form>` (após um tick)
|
|
1675
|
+
* cobre o caso de submissão — alinhado a {@link FormGroupComponent} `setupFormPathInvalidTracking`.
|
|
1676
|
+
*/
|
|
1677
|
+
declare function subscribeMarkForCheckOnInvalidUiRefresh(rootCtrl: AbstractControl, hostElement: HTMLElement, cdr: ChangeDetectorRef, destroyRef: DestroyRef): void;
|
|
1678
|
+
|
|
1679
|
+
/** Resolve `a.b.c` a partir da raiz do formulário (normalmente o `FormGroup` do `<form [formGroup]>`). */
|
|
1680
|
+
declare function resolveControlAtPath(root: AbstractControl, path: string): AbstractControl | null;
|
|
1681
|
+
/**
|
|
1682
|
+
* Há erro “visível” na subárvore: folho inválido e (`dirty` ou `formSubmitted`).
|
|
1683
|
+
* `formSubmitted` deve incluir o equivalente a «formulário já enviado» (ex.: `FormGroupDirective.submitted`
|
|
1684
|
+
* ou passo activo após o evento `submit` do `<form>` em `app-form-group`), para acender o ícone após
|
|
1685
|
+
* «Salvar» + `markAllAsTouched()` sem exigir `dirty` em cada campo.
|
|
1686
|
+
* Não usar `touched` sozinho: Tab/blur marca touched sem alterar valor e não deve acender o ícone.
|
|
1687
|
+
*/
|
|
1688
|
+
declare function subtreeHasVisibleInvalid(control: AbstractControl, formSubmitted?: boolean): boolean;
|
|
1689
|
+
/**
|
|
1690
|
+
* Critério alinhado ao ícone automático de `app-form-group` com `formGroupPath`
|
|
1691
|
+
* (e reutilizável para aviso por separador, ex. `app-form-tab` + `formGroupName`).
|
|
1692
|
+
*/
|
|
1693
|
+
declare function sectionHasVisibleInvalid(root: AbstractControl, path: string, formSubmitted?: boolean): boolean;
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* Configuração de coluna da lib — convertida internamente para `ColDef` do AG Grid.
|
|
1697
|
+
*/
|
|
1698
|
+
interface DataGridColumn<T = unknown> {
|
|
1699
|
+
/** Campo no registro ou identificador lógico (ex.: `__actions` para coluna de ações). */
|
|
1700
|
+
key: keyof T | string;
|
|
1701
|
+
header: string;
|
|
1702
|
+
width?: number;
|
|
1703
|
+
flex?: number;
|
|
1704
|
+
type?: 'text' | 'number' | 'actions';
|
|
1705
|
+
/** Por omissão `true` para texto/número; ignorado para `actions`. */
|
|
1706
|
+
sortable?: boolean;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/** Contexto injetado pelo {@link DataGridComponent} (não exportado para consumidores). */
|
|
1710
|
+
interface DataGridActionsContext<T = unknown> {
|
|
1711
|
+
onEditRow: (row: T) => void;
|
|
1712
|
+
onRemoveRow: (row: T) => void;
|
|
1713
|
+
}
|
|
1714
|
+
declare class DataGridActionsCellRendererComponent implements ICellRendererAngularComp {
|
|
1715
|
+
params: ICellRendererParams & {
|
|
1716
|
+
context?: DataGridActionsContext;
|
|
1717
|
+
};
|
|
1718
|
+
agInit(params: ICellRendererParams): void;
|
|
1719
|
+
refresh(): boolean;
|
|
1720
|
+
/** `params.context` nem sempre vem preenchido; o grid guarda o mesmo objeto em `gridOptions.context`. */
|
|
1721
|
+
private get actionsContext();
|
|
1722
|
+
edit(): void;
|
|
1723
|
+
remove(): void;
|
|
1724
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridActionsCellRendererComponent, never>;
|
|
1725
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridActionsCellRendererComponent, "app-data-grid-actions-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
/** Emitido quando o usuário muda de página ou tamanho de página na grade paginada. */
|
|
1729
|
+
interface DataGridPaginationChangeEvent {
|
|
1730
|
+
/** Índice 0-based da página atual (API ag-Grid). */
|
|
1731
|
+
currentPage: number;
|
|
1732
|
+
newPage: boolean;
|
|
1733
|
+
newPageSize: boolean;
|
|
1734
|
+
}
|
|
1735
|
+
declare class DataGridComponent<T = unknown> implements OnInit, OnChanges, OnDestroy {
|
|
1736
|
+
private readonly ngZone;
|
|
1737
|
+
private gridApi;
|
|
1738
|
+
private paginationChangedListener?;
|
|
1739
|
+
rows: T[];
|
|
1740
|
+
columns: DataGridColumn<T>[];
|
|
1741
|
+
pageSize: number;
|
|
1742
|
+
loading: boolean;
|
|
1743
|
+
/**
|
|
1744
|
+
* Após remontar a grade (ex.: skeleton), volta a esta página (0-based).
|
|
1745
|
+
* Só aplicado em `gridReady` e quando o valor muda com a API já disponível.
|
|
1746
|
+
*/
|
|
1747
|
+
initialPaginationPage: number;
|
|
1748
|
+
height: string | null;
|
|
1749
|
+
emptyMessage: string;
|
|
1750
|
+
pagination: boolean;
|
|
1751
|
+
/** Se `false`, omite colunas com `type: 'actions'` (editar/remover). Por omissão `true`. */
|
|
1752
|
+
showActionsColumn: boolean;
|
|
1753
|
+
readonly edit: EventEmitter<T>;
|
|
1754
|
+
readonly remove: EventEmitter<T>;
|
|
1755
|
+
/** Reservado para evolução (seleção de linhas); não ligado na v1 para manter a UI minimal. */
|
|
1756
|
+
readonly selectionChange: EventEmitter<T[]>;
|
|
1757
|
+
/** Paginação interna do ag-Grid: mudança de página ou de `pageSize`. */
|
|
1758
|
+
readonly paginationChanged: EventEmitter<DataGridPaginationChangeEvent>;
|
|
1759
|
+
readonly frameworkComponents: {
|
|
1760
|
+
dataGridActions: typeof DataGridActionsCellRendererComponent;
|
|
1761
|
+
};
|
|
1762
|
+
readonly paginationPageSizeChoices: number[];
|
|
1763
|
+
/**
|
|
1764
|
+
* O AG Grid avisa se `paginationPageSize` não está em `paginationPageSizeSelector`.
|
|
1765
|
+
* Junta `pageSize` às opções base quando o consumidor usa um valor fora da lista (ex.: 8).
|
|
1766
|
+
*/
|
|
1767
|
+
get effectivePaginationPageSizeSelector(): number[];
|
|
1768
|
+
get skeletonColumnCount(): number;
|
|
1769
|
+
get skeletonRowCount(): number;
|
|
1770
|
+
readonly defaultColDef: ColDef<T>;
|
|
1771
|
+
/**
|
|
1772
|
+
* O AG Grid corre muitos callbacks fora da `NgZone`; sem `run()`, o pai com `OnPush`
|
|
1773
|
+
* não volta a renderizar e editar/remover parece “morto”.
|
|
1774
|
+
*/
|
|
1775
|
+
readonly actionsContext: DataGridActionsContext<T>;
|
|
1776
|
+
agColumnDefs: ColDef<T>[];
|
|
1777
|
+
ngOnInit(): void;
|
|
1778
|
+
/**
|
|
1779
|
+
* IDs estáveis por linha (evita `''` duplicado quando não existe `id` nos dados).
|
|
1780
|
+
* Tenta `id`, depois `sku` (comum em grades de produto), senão impressão digital do objeto.
|
|
1781
|
+
*/
|
|
1782
|
+
readonly getRowId: (params: GetRowIdParams<T>) => string;
|
|
1783
|
+
/** Identificador determinístico e curto para linhas sem chave explícita. */
|
|
1784
|
+
private stableRowFingerprint;
|
|
1785
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1786
|
+
ngOnDestroy(): void;
|
|
1787
|
+
get emptyOverlayTemplate(): string;
|
|
1788
|
+
get hostHeight(): string;
|
|
1789
|
+
onGridReady(ev: GridReadyEvent<T>): void;
|
|
1790
|
+
private applyInitialPaginationPage;
|
|
1791
|
+
/** Evita `removeEventListener` na API depois do grid destruído (ex.: `@if (loading)` remove o DOM). */
|
|
1792
|
+
private detachPaginationListenerIfLive;
|
|
1793
|
+
private columnsForGrid;
|
|
1794
|
+
private mapColumnsToColDef;
|
|
1795
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridComponent<any>, never>;
|
|
1796
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent<any>, "app-data-grid", never, { "rows": { "alias": "rows"; "required": true; }; "columns": { "alias": "columns"; "required": true; }; "pageSize": { "alias": "pageSize"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "initialPaginationPage": { "alias": "initialPaginationPage"; "required": false; }; "height": { "alias": "height"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "showActionsColumn": { "alias": "showActionsColumn"; "required": false; }; }, { "edit": "edit"; "remove": "remove"; "selectionChange": "selectionChange"; "paginationChanged": "paginationChanged"; }, never, never, true, never>;
|
|
1797
|
+
static ngAcceptInputType_initialPaginationPage: unknown;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/** Barra de consulta: pesquisa, filtros, ações e contador (slots `toolbar-start` / `toolbar-end`). */
|
|
1801
|
+
declare class DataToolbarComponent {
|
|
1802
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataToolbarComponent, never>;
|
|
1803
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataToolbarComponent, "app-data-toolbar", never, {}, {}, never, ["[toolbar-start]", "[toolbar-end]"], true, never>;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/** Vista mapeada por item para {@link CardListComponent}. */
|
|
1807
|
+
interface CardItemView {
|
|
1808
|
+
title: string;
|
|
1809
|
+
subtitle?: string;
|
|
1810
|
+
/** Texto curto para o avatar (ex.: iniciais). */
|
|
1811
|
+
avatarText?: string;
|
|
1812
|
+
}
|
|
1813
|
+
type CardListMapFn<T> = (item: T) => CardItemView;
|
|
1814
|
+
|
|
1815
|
+
/** Limite de largura para tratar como “mobile” na escolha grid vs card. */
|
|
1816
|
+
declare const ADAPTIVE_DATA_VIEW_MOBILE_QUERY = "(max-width: 767.98px)";
|
|
1817
|
+
type AdaptiveDataViewMode = 'grid' | 'card';
|
|
1818
|
+
/**
|
|
1819
|
+
* Escolhe **um** de `app-data-grid` ou `app-card-list` conforme breakpoint e preferências.
|
|
1820
|
+
* Nunca renderiza os dois em simultâneo.
|
|
1821
|
+
*/
|
|
1822
|
+
declare class AdaptiveDataViewComponent<T = unknown> implements OnInit {
|
|
1823
|
+
private readonly bp;
|
|
1824
|
+
private readonly cdr;
|
|
1825
|
+
private readonly destroyRef;
|
|
1826
|
+
items: T[];
|
|
1827
|
+
gridColumns: DataGridColumn<T>[];
|
|
1828
|
+
mapItem: CardListMapFn<T>;
|
|
1829
|
+
pageSize: number;
|
|
1830
|
+
gridHeight: string | null;
|
|
1831
|
+
cardScrollMaxHeight: string | null;
|
|
1832
|
+
emptyMessageGrid: string;
|
|
1833
|
+
emptyMessageCard: string;
|
|
1834
|
+
pagination: boolean;
|
|
1835
|
+
showActionsColumn: boolean;
|
|
1836
|
+
showCardItemActions: boolean;
|
|
1837
|
+
scrollBatchSize: number;
|
|
1838
|
+
showCardFooter: boolean;
|
|
1839
|
+
/** Estado de carregamento reposto no grid ou na lista conforme a vista ativa. */
|
|
1840
|
+
loading: boolean;
|
|
1841
|
+
/**
|
|
1842
|
+
* Mostra uma linha de contagem **abaixo** da grade ou da lista (incluindo paginação interna).
|
|
1843
|
+
* Texto padrão em português; use `{count}` como marcador do número de linhas em `items`.
|
|
1844
|
+
*/
|
|
1845
|
+
showResultCount: boolean;
|
|
1846
|
+
resultCountTemplate: string;
|
|
1847
|
+
/** Vista quando `ADAPTIVE_DATA_VIEW_MOBILE_QUERY` corresponde. Por padrão `card`. */
|
|
1848
|
+
mobileView: AdaptiveDataViewMode;
|
|
1849
|
+
/** Vista quando a tela é maior. Por padrão `grid`. */
|
|
1850
|
+
desktopView: AdaptiveDataViewMode;
|
|
1851
|
+
readonly edit: EventEmitter<T>;
|
|
1852
|
+
readonly remove: EventEmitter<T>;
|
|
1853
|
+
readonly loadMore: EventEmitter<void>;
|
|
1854
|
+
/** Corresponde ao breakpoint mobile. */
|
|
1855
|
+
isMobileLayout: boolean;
|
|
1856
|
+
ngOnInit(): void;
|
|
1857
|
+
get effectiveKind(): AdaptiveDataViewMode;
|
|
1858
|
+
get showGrid(): boolean;
|
|
1859
|
+
get showCard(): boolean;
|
|
1860
|
+
get resultCountDisplay(): string;
|
|
1861
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdaptiveDataViewComponent<any>, never>;
|
|
1862
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdaptiveDataViewComponent<any>, "app-adaptive-data-view", never, { "items": { "alias": "items"; "required": true; }; "gridColumns": { "alias": "gridColumns"; "required": true; }; "mapItem": { "alias": "mapItem"; "required": true; }; "pageSize": { "alias": "pageSize"; "required": false; }; "gridHeight": { "alias": "gridHeight"; "required": false; }; "cardScrollMaxHeight": { "alias": "cardScrollMaxHeight"; "required": false; }; "emptyMessageGrid": { "alias": "emptyMessageGrid"; "required": false; }; "emptyMessageCard": { "alias": "emptyMessageCard"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "showActionsColumn": { "alias": "showActionsColumn"; "required": false; }; "showCardItemActions": { "alias": "showCardItemActions"; "required": false; }; "scrollBatchSize": { "alias": "scrollBatchSize"; "required": false; }; "showCardFooter": { "alias": "showCardFooter"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "showResultCount": { "alias": "showResultCount"; "required": false; }; "resultCountTemplate": { "alias": "resultCountTemplate"; "required": false; }; "mobileView": { "alias": "mobileView"; "required": false; }; "desktopView": { "alias": "desktopView"; "required": false; }; }, { "edit": "edit"; "remove": "remove"; "loadMore": "loadMore"; }, never, never, true, never>;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
declare class DataCardComponent {
|
|
1866
|
+
title: string;
|
|
1867
|
+
subtitle?: string;
|
|
1868
|
+
/** 1–2 caracteres para o círculo de iniciais. */
|
|
1869
|
+
avatarText?: string;
|
|
1870
|
+
variant: 'default';
|
|
1871
|
+
showActions: boolean;
|
|
1872
|
+
readonly edit: EventEmitter<void>;
|
|
1873
|
+
readonly remove: EventEmitter<void>;
|
|
1874
|
+
onEditClick(ev: Event): void;
|
|
1875
|
+
onRemoveClick(ev: Event): void;
|
|
1876
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataCardComponent, never>;
|
|
1877
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataCardComponent, "app-data-card", never, { "title": { "alias": "title"; "required": true; }; "subtitle": { "alias": "subtitle"; "required": false; }; "avatarText": { "alias": "avatarText"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "showActions": { "alias": "showActions"; "required": false; }; }, { "edit": "edit"; "remove": "remove"; }, never, never, true, never>;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* - **memory**: `items` tem a lista completa (ex.: 500 em memória); só se mostram
|
|
1882
|
+
* `scrollBatchSize` de cada vez até o usuário fazer scroll (fatia local).
|
|
1883
|
+
* - **remote**: `items` são só as linhas já devolvidas pela API; ao fim do scroll
|
|
1884
|
+
* emite `loadMore` para pedir a próxima página (SQL OFFSET/FETCH no backend).
|
|
1885
|
+
*/
|
|
1886
|
+
type CardListDataMode = 'memory' | 'remote';
|
|
1887
|
+
declare class CardListComponent<T = unknown> implements OnChanges {
|
|
1888
|
+
private readonly cdr;
|
|
1889
|
+
items: T[];
|
|
1890
|
+
loading: boolean;
|
|
1891
|
+
/**
|
|
1892
|
+
* Com itens já visíveis: mostra **um** skeleton no fundo (próxima página remota)
|
|
1893
|
+
* para não saltar o scroll nem ocupar altura de vários cartões. O carregamento inicial
|
|
1894
|
+
* continua a usar só {@link loading} (lista vazia ou refresh completo com `loading` e sem `loadingMore`).
|
|
1895
|
+
*/
|
|
1896
|
+
loadingMore: boolean;
|
|
1897
|
+
emptyMessage: string;
|
|
1898
|
+
variant: 'default';
|
|
1899
|
+
mapItem: CardListMapFn<T>;
|
|
1900
|
+
showItemActions: boolean;
|
|
1901
|
+
trackByProp: keyof T | string;
|
|
1902
|
+
dataMode: CardListDataMode;
|
|
1903
|
+
/** Em modo `memory`: quantos itens revelar por cada passo de scroll. Por omissão `10`. */
|
|
1904
|
+
scrollBatchSize: number;
|
|
1905
|
+
scrollLoadThresholdPx: number;
|
|
1906
|
+
/** Mostra o rodapé com o resumo (“X de Y”) e dica. Por omissão `true`; com `false` oculta o footer. */
|
|
1907
|
+
showFooter: boolean;
|
|
1908
|
+
scrollMaxHeight: string | null;
|
|
1909
|
+
/**
|
|
1910
|
+
* Modo **remote**: total de registros no servidor (ex.: COUNT SQL), para o texto “X de Y”.
|
|
1911
|
+
* Se `null`, usa `items.length`.
|
|
1912
|
+
*/
|
|
1913
|
+
totalCountRemote: number | null;
|
|
1914
|
+
/** Modo **remote**: existe página seguinte para pedir ao backend. */
|
|
1915
|
+
hasNextPage: boolean;
|
|
1916
|
+
/** Modo **remote**: pedido de mais dados (próxima página). */
|
|
1917
|
+
readonly loadMore: EventEmitter<void>;
|
|
1918
|
+
readonly edit: EventEmitter<T>;
|
|
1919
|
+
readonly remove: EventEmitter<T>;
|
|
1920
|
+
/** Modo memory: quantos cartões renderizar (fatia inicial = scrollBatchSize). */
|
|
1921
|
+
visibleCount: number;
|
|
1922
|
+
private loadMorePending;
|
|
1923
|
+
/** Skeleton que ocupa a lista inteira (carregamento inicial / refresh com `loading`). */
|
|
1924
|
+
get showFullSkeleton(): boolean;
|
|
1925
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1926
|
+
get totalItemCount(): number;
|
|
1927
|
+
/** Total para o rodapé “X de Y”. */
|
|
1928
|
+
get totalForStatus(): number;
|
|
1929
|
+
get visibleItems(): T[];
|
|
1930
|
+
get scrollStatusLabel(): string;
|
|
1931
|
+
get scrollAreaStyle(): Record<string, string>;
|
|
1932
|
+
/** Há mais linhas para mostrar (memória) ou para pedir à API (remote). */
|
|
1933
|
+
get hasMoreToReveal(): boolean;
|
|
1934
|
+
viewFor(item: T): CardItemView;
|
|
1935
|
+
skeletonCardIndices(): number[];
|
|
1936
|
+
/** Um único cartão skeleton no fundo durante `loadingMore` (mantém o scroll estável). */
|
|
1937
|
+
skeletonTailIndices(): number[];
|
|
1938
|
+
trackFn: (index: number, item: T) => unknown;
|
|
1939
|
+
onScroll(ev: Event): void;
|
|
1940
|
+
private requestRemotePage;
|
|
1941
|
+
private loadMoreMemoryChunk;
|
|
1942
|
+
private resetVisibleWindow;
|
|
1943
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardListComponent<any>, never>;
|
|
1944
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardListComponent<any>, "app-card-list", never, { "items": { "alias": "items"; "required": true; }; "loading": { "alias": "loading"; "required": false; }; "loadingMore": { "alias": "loadingMore"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "mapItem": { "alias": "mapItem"; "required": true; }; "showItemActions": { "alias": "showItemActions"; "required": false; }; "trackByProp": { "alias": "trackByProp"; "required": false; }; "dataMode": { "alias": "dataMode"; "required": false; }; "scrollBatchSize": { "alias": "scrollBatchSize"; "required": false; }; "scrollLoadThresholdPx": { "alias": "scrollLoadThresholdPx"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "scrollMaxHeight": { "alias": "scrollMaxHeight"; "required": false; }; "totalCountRemote": { "alias": "totalCountRemote"; "required": false; }; "hasNextPage": { "alias": "hasNextPage"; "required": false; }; }, { "loadMore": "loadMore"; "edit": "edit"; "remove": "remove"; }, never, never, true, never>;
|
|
1945
|
+
static ngAcceptInputType_loadingMore: unknown;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
declare class EmptyStateComponent {
|
|
1949
|
+
message: string;
|
|
1950
|
+
description?: string;
|
|
1951
|
+
/** Classe Font Awesome do ícone (ex.: `fa-solid fa-inbox`). */
|
|
1952
|
+
iconClass: string;
|
|
1953
|
+
variant: 'default';
|
|
1954
|
+
/** Padding reduzido (ex.: células de tabela, listas densas). */
|
|
1955
|
+
embed: boolean;
|
|
1956
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
|
|
1957
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "app-empty-state", never, { "message": { "alias": "message"; "required": true; }; "description": { "alias": "description"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "embed": { "alias": "embed"; "required": false; }; }, {}, never, never, true, never>;
|
|
1958
|
+
static ngAcceptInputType_embed: unknown;
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* HTML injetado no AG Grid (`overlayNoRowsTemplate`) — manter alinhado ao markup de {@link EmptyStateComponent}.
|
|
1963
|
+
*/
|
|
1964
|
+
declare function escapeHtml(text: string): string;
|
|
1965
|
+
declare function buildEmptyStateOverlayHtml(message: string): string;
|
|
1966
|
+
|
|
1967
|
+
/** Variantes visuais do `app-status-badge` (cores semânticas da lib). */
|
|
1968
|
+
type StatusBadgeVariant = 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
1969
|
+
/** Tamanho do `app-status-badge`. */
|
|
1970
|
+
type StatusBadgeSize = 'sm' | 'md';
|
|
1971
|
+
/** Linha chave → valor para `app-details-view` (modo lista). */
|
|
1972
|
+
interface DetailsViewItem {
|
|
1973
|
+
label: string;
|
|
1974
|
+
value?: string | null;
|
|
1975
|
+
}
|
|
1976
|
+
/** Tom da variação opcional no `app-stat-card` (ex.: +12% vs mês anterior). */
|
|
1977
|
+
type StatCardDeltaTone = 'positive' | 'negative' | 'neutral';
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* Etiqueta de estado (Ativo, Pendente, etc.) com fundo suave e cor semântica.
|
|
1981
|
+
*/
|
|
1982
|
+
declare class StatusBadgeComponent {
|
|
1983
|
+
label: string;
|
|
1984
|
+
variant: StatusBadgeVariant;
|
|
1985
|
+
/** Classes Font Awesome (ex.: `fa-solid fa-check`). */
|
|
1986
|
+
icon: string;
|
|
1987
|
+
size: StatusBadgeSize;
|
|
1988
|
+
bordered: boolean;
|
|
1989
|
+
readonly variantClassMap: Record<StatusBadgeVariant, string>;
|
|
1990
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatusBadgeComponent, never>;
|
|
1991
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusBadgeComponent, "app-status-badge", never, { "label": { "alias": "label"; "required": true; }; "variant": { "alias": "variant"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; }, {}, never, never, true, never>;
|
|
1992
|
+
static ngAcceptInputType_bordered: unknown;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Lista de descrição (chave → valor) para detalhes, drawer ou resumo.
|
|
1997
|
+
* Modo **lista**: `[items]`; modo **composto**: projectar `app-details-field` no conteúdo.
|
|
1998
|
+
*/
|
|
1999
|
+
declare class DetailsViewComponent {
|
|
2000
|
+
items: readonly DetailsViewItem[];
|
|
2001
|
+
/**
|
|
2002
|
+
* Se `true`, ignora `items` e renderiza só `<ng-content />` dentro de um `<dl>`
|
|
2003
|
+
* (usar com `app-details-field` para valores ricos).
|
|
2004
|
+
*/
|
|
2005
|
+
projectionOnly: boolean;
|
|
2006
|
+
/** `2` ativa grade em dois tempos em telas largas. */
|
|
2007
|
+
columns: 1 | 2;
|
|
2008
|
+
loading: boolean;
|
|
2009
|
+
/** Texto quando `items` está vazio, sem `loading` e sem `projectionOnly`. */
|
|
2010
|
+
emptyMessage: string;
|
|
2011
|
+
readonly emDash = "\u2014";
|
|
2012
|
+
/** Linhas de skeleton em modo loading. */
|
|
2013
|
+
readonly skeletonPairs: number[];
|
|
2014
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsViewComponent, never>;
|
|
2015
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsViewComponent, "app-details-view", never, { "items": { "alias": "items"; "required": false; }; "projectionOnly": { "alias": "projectionOnly"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
2016
|
+
static ngAcceptInputType_projectionOnly: unknown;
|
|
2017
|
+
static ngAcceptInputType_loading: unknown;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* Uma linha chave → valor para usar **dentro** de `app-details-view` (projeção).
|
|
2022
|
+
* O host usa `display: contents` para manter `<dl>` > `<dt>`/`<dd>` válidos.
|
|
2023
|
+
*/
|
|
2024
|
+
declare class DetailsFieldComponent {
|
|
2025
|
+
label: string;
|
|
2026
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsFieldComponent, never>;
|
|
2027
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsFieldComponent, "app-details-field", never, { "label": { "alias": "label"; "required": true; }; }, {}, never, ["*"], true, never>;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Cartão de métrica (KPI) com a **mesma superfície** que `app-data-card` (mixin SCSS `data-card-shell`).
|
|
2032
|
+
* Não usa o selector `app-data-card` (esse componente é para linhas de lista com ações).
|
|
2033
|
+
*/
|
|
2034
|
+
declare class StatCardComponent {
|
|
2035
|
+
title: string;
|
|
2036
|
+
value: string;
|
|
2037
|
+
description: string;
|
|
2038
|
+
icon: string;
|
|
2039
|
+
/** Texto curto (ex.: +12% ou −3%). */
|
|
2040
|
+
delta: string;
|
|
2041
|
+
deltaTone: StatCardDeltaTone;
|
|
2042
|
+
clickable: boolean;
|
|
2043
|
+
readonly cardActivate: EventEmitter<void>;
|
|
2044
|
+
onActivate(ev: Event): void;
|
|
2045
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
2046
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatCardComponent, never>;
|
|
2047
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatCardComponent, "app-stat-card", never, { "title": { "alias": "title"; "required": true; }; "value": { "alias": "value"; "required": true; }; "description": { "alias": "description"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "delta": { "alias": "delta"; "required": false; }; "deltaTone": { "alias": "deltaTone"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; }, { "cardActivate": "cardActivate"; }, never, never, true, never>;
|
|
2048
|
+
static ngAcceptInputType_clickable: unknown;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Linha base para listas (`app-data-list`): texto, área de estado e ações projetadas.
|
|
2053
|
+
* Estrutura preparada para selecção futura (`selectable` apenas aplica classe visual).
|
|
2054
|
+
*/
|
|
2055
|
+
declare class ListItemComponent {
|
|
2056
|
+
title: string;
|
|
2057
|
+
subtitle: string;
|
|
2058
|
+
clickable: boolean;
|
|
2059
|
+
/**
|
|
2060
|
+
* Reserva visual para selecção futura (sem lógica de modelo).
|
|
2061
|
+
*/
|
|
2062
|
+
selectable: boolean;
|
|
2063
|
+
readonly itemActivate: EventEmitter<void>;
|
|
2064
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
2065
|
+
onClick(ev: MouseEvent): void;
|
|
2066
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListItemComponent, never>;
|
|
2067
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListItemComponent, "app-list-item", never, { "title": { "alias": "title"; "required": true; }; "subtitle": { "alias": "subtitle"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; }, { "itemActivate": "itemActivate"; }, never, ["*", "[list-item-status]", "[list-item-actions]"], true, never>;
|
|
2068
|
+
static ngAcceptInputType_clickable: unknown;
|
|
2069
|
+
static ngAcceptInputType_selectable: unknown;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* Lista vertical de registros com estados de loading e vazio padronizados.
|
|
2074
|
+
* O conteúdo de cada linha deve usar `app-list-item` (ou composição equivalente).
|
|
2075
|
+
*/
|
|
2076
|
+
declare class DataListComponent {
|
|
2077
|
+
loading: boolean;
|
|
2078
|
+
empty: boolean;
|
|
2079
|
+
emptyTitle: string;
|
|
2080
|
+
emptyDescription: string;
|
|
2081
|
+
emptyIconClass: string;
|
|
2082
|
+
/** Linhas de skeleton em modo loading. */
|
|
2083
|
+
skeletonRows: number;
|
|
2084
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataListComponent, never>;
|
|
2085
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataListComponent, "app-data-list", never, { "loading": { "alias": "loading"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptyDescription": { "alias": "emptyDescription"; "required": false; }; "emptyIconClass": { "alias": "emptyIconClass"; "required": false; }; "skeletonRows": { "alias": "skeletonRows"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
2086
|
+
static ngAcceptInputType_loading: unknown;
|
|
2087
|
+
static ngAcceptInputType_empty: unknown;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* Bloco de dashboard: título, ações opcionais e conteúdo (stat-cards, listas, grades).
|
|
2092
|
+
* Superfície alinhada aos cartões da lib.
|
|
2093
|
+
*/
|
|
2094
|
+
declare class DashboardSectionComponent {
|
|
2095
|
+
title: string;
|
|
2096
|
+
subtitle: string;
|
|
2097
|
+
readonly titleId: string;
|
|
2098
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardSectionComponent, never>;
|
|
2099
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardSectionComponent, "app-dashboard-section", never, { "title": { "alias": "title"; "required": true; }; "subtitle": { "alias": "subtitle"; "required": false; }; }, {}, never, ["[dashboard-section-actions]", "*"], true, never>;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* Barra auxiliar para tabelas / grades: envolve {@link DataToolbarComponent}
|
|
2104
|
+
* com áreas para pesquisa, contagem e ações.
|
|
2105
|
+
*/
|
|
2106
|
+
declare class TableToolbarComponent {
|
|
2107
|
+
/** Ex.: `128 resultados` ou `Nenhum resultado`. */
|
|
2108
|
+
resultCountLabel: string;
|
|
2109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableToolbarComponent, never>;
|
|
2110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableToolbarComponent, "app-table-toolbar", never, { "resultCountLabel": { "alias": "resultCountLabel"; "required": false; }; }, {}, never, ["[tableToolbarSearch]", "[tableToolbarFilters]", "[tableToolbarActions]"], true, never>;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Estado vazio para tabelas ou listas densas — reutiliza {@link EmptyStateComponent}
|
|
2115
|
+
* e permite uma ação opcional (ex.: limpar filtros).
|
|
2116
|
+
*/
|
|
2117
|
+
declare class TableEmptyStateComponent {
|
|
2118
|
+
title: string;
|
|
2119
|
+
description: string;
|
|
2120
|
+
iconClass: string;
|
|
2121
|
+
embed: boolean;
|
|
2122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableEmptyStateComponent, never>;
|
|
2123
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableEmptyStateComponent, "app-table-empty-state", never, { "title": { "alias": "title"; "required": true; }; "description": { "alias": "description"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "embed": { "alias": "embed"; "required": false; }; }, {}, never, ["[tableEmptyAction]"], true, never>;
|
|
2124
|
+
static ngAcceptInputType_embed: unknown;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/** Largura máxima do painel `app-dialog` (conteúdo responsivo). */
|
|
2128
|
+
declare enum LibDialogSize {
|
|
2129
|
+
Sm = "sm",
|
|
2130
|
+
Md = "md",
|
|
2131
|
+
Lg = "lg"
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* Diálogo modal declarativo com `[(open)]`, projeção de corpo e rodapé opcional (`[appDialogFooter]`).
|
|
2136
|
+
* Bloqueio de scroll com {@link lockPageScrollAppDialog} (sem deslocar o `html` como o CDK),
|
|
2137
|
+
* para o scrim `position: fixed` alinhar ao viewport em páginas com scroll no `body`.
|
|
2138
|
+
*/
|
|
2139
|
+
declare class AppDialogComponent implements OnInit, OnChanges, OnDestroy {
|
|
2140
|
+
private readonly hostEl;
|
|
2141
|
+
private readonly appTheme;
|
|
2142
|
+
/**
|
|
2143
|
+
* Com o host em `document.body`, sem isto os `--app-color-*` / `--ui-field-*` ficam só com
|
|
2144
|
+
* valores de `:root` (azul); alinhamos ao CDK Dialog (`libDialogPanelClasses`).
|
|
2145
|
+
*/
|
|
2146
|
+
get hostThemeClasses(): string;
|
|
2147
|
+
/**
|
|
2148
|
+
* Impede o tooltip nativo do browser: o `@Input('title')` alimenta só `dialogHeading`, mas o
|
|
2149
|
+
* binding `title="…"` no host ainda podia definir `HTMLElement.title` no `<app-dialog>`.
|
|
2150
|
+
*/
|
|
2151
|
+
readonly hostTitleAttr: null;
|
|
2152
|
+
open: boolean;
|
|
2153
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2154
|
+
/**
|
|
2155
|
+
* Título do cabeçalho (`<app-dialog title="…">`).
|
|
2156
|
+
* O nome da propriedade **não** pode ser `title`: no host DOM isso colide com
|
|
2157
|
+
* `HTMLElement.title` e o browser desenha o tooltip nativo por cima do overlay.
|
|
2158
|
+
*/
|
|
2159
|
+
dialogHeading: string;
|
|
2160
|
+
/** Texto de apoio abaixo do título (opcional); liga `aria-describedby` no painel. */
|
|
2161
|
+
description: string;
|
|
2162
|
+
/**
|
|
2163
|
+
* Rótulo acessível quando não há título (evita diálogo sem nome).
|
|
2164
|
+
* Ignorado se `dialogHeading` tiver texto.
|
|
2165
|
+
*/
|
|
2166
|
+
ariaLabel: string;
|
|
2167
|
+
size: LibDialogSize;
|
|
2168
|
+
/**
|
|
2169
|
+
* Quando `false`, a tecla Escape e o clique no backdrop não fecham o diálogo
|
|
2170
|
+
* (botão ✕, `[(open)]` e `requestClose()` continuam disponíveis).
|
|
2171
|
+
* Omisso: `true`.
|
|
2172
|
+
*/
|
|
2173
|
+
allowOverlayDismiss: boolean;
|
|
2174
|
+
showCloseButton: boolean;
|
|
2175
|
+
readonly LibDialogSize: typeof LibDialogSize;
|
|
2176
|
+
readonly titleId: string;
|
|
2177
|
+
readonly descriptionId: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* O modal fica no fim de `document.body` enquanto aberto, para o `backdrop-filter`
|
|
2180
|
+
* não ficar «preso» a ancestrais com `overflow: auto` (ex.: `app-shell__content`).
|
|
2181
|
+
*/
|
|
2182
|
+
private bodyRestoreParent;
|
|
2183
|
+
private bodyRestoreNext;
|
|
2184
|
+
private previousActive;
|
|
2185
|
+
private scrollLock;
|
|
2186
|
+
ngOnInit(): void;
|
|
2187
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2188
|
+
ngOnDestroy(): void;
|
|
2189
|
+
private attachHostToBody;
|
|
2190
|
+
private detachHostFromBody;
|
|
2191
|
+
onDocumentKeydown(ev: KeyboardEvent): void;
|
|
2192
|
+
onBackdropClick(): void;
|
|
2193
|
+
requestClose(): void;
|
|
2194
|
+
private restoreFocus;
|
|
2195
|
+
private stripHostNativeTitle;
|
|
2196
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppDialogComponent, never>;
|
|
2197
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppDialogComponent, "app-dialog", never, { "open": { "alias": "open"; "required": false; }; "dialogHeading": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "allowOverlayDismiss": { "alias": "allowOverlayDismiss"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*", "[appDialogFooter]"], true, never>;
|
|
2198
|
+
static ngAcceptInputType_open: unknown;
|
|
2199
|
+
static ngAcceptInputType_allowOverlayDismiss: unknown;
|
|
2200
|
+
static ngAcceptInputType_showCloseButton: unknown;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
/** Marca o conteúdo projectado no rodapé de `app-dialog`. */
|
|
2204
|
+
declare class DialogFooterDirective {
|
|
2205
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogFooterDirective, never>;
|
|
2206
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogFooterDirective, "[appDialogFooter]", never, {}, {}, never, never, true, never>;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
type ConfirmDialogVariant = 'default' | 'danger';
|
|
2210
|
+
interface ConfirmDialogData {
|
|
2211
|
+
title: string;
|
|
2212
|
+
message: string;
|
|
2213
|
+
confirmLabel?: string;
|
|
2214
|
+
cancelLabel?: string;
|
|
2215
|
+
variant?: ConfirmDialogVariant;
|
|
2216
|
+
/**
|
|
2217
|
+
* Se `true`, Escape e clique fora **não** fecham o diálogo (apenas botões do rodapé).
|
|
2218
|
+
* Omisso: `false` — permite dispensar com Esc ou backdrop (emite `undefined` no `closed`).
|
|
2219
|
+
*/
|
|
2220
|
+
blockOverlayDismiss?: boolean;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
declare class ConfirmDialogComponent implements AfterViewInit {
|
|
2224
|
+
readonly ref: DialogRef<boolean, ConfirmDialogComponent>;
|
|
2225
|
+
readonly data: ConfirmDialogData;
|
|
2226
|
+
readonly BaseButtonType: typeof BaseButtonType;
|
|
2227
|
+
readonly BaseButtonVariant: typeof BaseButtonVariant;
|
|
2228
|
+
readonly titleId: string;
|
|
2229
|
+
readonly descId: string;
|
|
2230
|
+
private cancelBtn?;
|
|
2231
|
+
private static seq;
|
|
2232
|
+
ngAfterViewInit(): void;
|
|
2233
|
+
onConfirm(): void;
|
|
2234
|
+
onCancel(): void;
|
|
2235
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
2236
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "app-confirm-dialog", never, {}, {}, never, never, true, never>;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
declare class ConfirmDialogService {
|
|
2240
|
+
private readonly dialog;
|
|
2241
|
+
private readonly theme;
|
|
2242
|
+
/**
|
|
2243
|
+
* Abre o diálogo de confirmação (CDK Dialog + `ConfirmDialogComponent`).
|
|
2244
|
+
* Emite `true` se confirmar, `false` se cancelar, `undefined` se fechar sem resultado (Esc/backdrop, quando permitido).
|
|
2245
|
+
* Por defeito permite dispensar com Esc e clique fora; use `data.blockOverlayDismiss` para exigir só botões.
|
|
2246
|
+
*/
|
|
2247
|
+
open(data: ConfirmDialogData): Observable<boolean | undefined>;
|
|
2248
|
+
/** Confirmação como Promise (adequado a `async`/`await`). */
|
|
2249
|
+
confirm(data: ConfirmDialogData): Promise<boolean>;
|
|
2250
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
|
|
2251
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmDialogService>;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
declare const APP_THEME_IDS: readonly ["blue", "green", "purple", "orange", "white", "gray", "sepia", "black"];
|
|
2255
|
+
type AppThemeId = (typeof APP_THEME_IDS)[number];
|
|
2256
|
+
/** Opção de tema para UI (selector, documentação). */
|
|
2257
|
+
interface AppThemeOption {
|
|
2258
|
+
readonly id: AppThemeId;
|
|
2259
|
+
readonly label: string;
|
|
2260
|
+
}
|
|
2261
|
+
/**
|
|
2262
|
+
* Estado global do tema da library: classe CSS `theme-*` em conjunto com `.app-library-theme`.
|
|
2263
|
+
* Os tokens `--app-color-*` são definidos em `src/app/_theme/`; paletas em `_theme-palettes.scss`.
|
|
2264
|
+
*/
|
|
2265
|
+
declare class AppThemeService {
|
|
2266
|
+
private readonly activeId;
|
|
2267
|
+
/** Identificador do tema activo (`blue`, `green`, …). */
|
|
2268
|
+
readonly activeThemeId: i0.Signal<"blue" | "green" | "purple" | "orange" | "white" | "gray" | "sepia" | "black">;
|
|
2269
|
+
/** Classe CSS do tema (ex.: `theme-green`) para `[ngClass]` no host tematizado. */
|
|
2270
|
+
readonly themeClass: i0.Signal<string>;
|
|
2271
|
+
/** Lista fixa de temas suportados pela library. */
|
|
2272
|
+
readonly themeOptions: readonly AppThemeOption[];
|
|
2273
|
+
setTheme(id: AppThemeId): void;
|
|
2274
|
+
isActive(id: AppThemeId): boolean;
|
|
2275
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppThemeService, never>;
|
|
2276
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppThemeService>;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
/** Classes aplicadas ao painel CDK Dialog + tema da app. */
|
|
2280
|
+
declare function libDialogPanelClasses(theme: AppThemeService, extra?: string | string[]): string[];
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Substituto do `BlockScrollStrategy` do CDK para modais Structra (Dialog de confirmação,
|
|
2284
|
+
* loading, etc.): activa {@link lockPageScrollAppDialog} em vez de `cdk-global-scrollblock`
|
|
2285
|
+
* com `html` deslocado — alinha o backdrop do overlay ao viewport real.
|
|
2286
|
+
*/
|
|
2287
|
+
declare class AppLibLightBlockScrollStrategy implements ScrollStrategy {
|
|
2288
|
+
private snapshot;
|
|
2289
|
+
attach(_overlayRef: OverlayRef): void;
|
|
2290
|
+
enable(): void;
|
|
2291
|
+
disable(): void;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
2295
|
+
/** Onde empilhar o toast na tela (canto superior ou inferior direito). */
|
|
2296
|
+
type ToastVerticalPosition = 'top' | 'bottom';
|
|
2297
|
+
interface ToastShowOptions {
|
|
2298
|
+
message: string;
|
|
2299
|
+
title?: string;
|
|
2300
|
+
type?: ToastType;
|
|
2301
|
+
/** Omisso: `top` (comportamento anterior). */
|
|
2302
|
+
position?: ToastVerticalPosition;
|
|
2303
|
+
/**
|
|
2304
|
+
* Duração em ms. `0` = não fecha automaticamente (só botão fechar / ação).
|
|
2305
|
+
* Omisso: 5000 ms.
|
|
2306
|
+
*/
|
|
2307
|
+
durationMs?: number;
|
|
2308
|
+
actionLabel?: string;
|
|
2309
|
+
onAction?: () => void;
|
|
2310
|
+
}
|
|
2311
|
+
interface ToastInstance {
|
|
2312
|
+
readonly id: string;
|
|
2313
|
+
readonly message: string;
|
|
2314
|
+
readonly title?: string;
|
|
2315
|
+
readonly type: ToastType;
|
|
2316
|
+
readonly durationMs: number;
|
|
2317
|
+
readonly actionLabel?: string;
|
|
2318
|
+
readonly position: ToastVerticalPosition;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
declare class ToastService {
|
|
2322
|
+
private readonly items;
|
|
2323
|
+
private readonly timers;
|
|
2324
|
+
private readonly actionHandlers;
|
|
2325
|
+
/** Lista actual (mais recente primeiro). */
|
|
2326
|
+
readonly toasts: i0.Signal<ToastInstance[]>;
|
|
2327
|
+
/** Mostra um toast; devolve o id (para `dismiss` manual). */
|
|
2328
|
+
show(options: ToastShowOptions): string;
|
|
2329
|
+
dismiss(id: string): void;
|
|
2330
|
+
clear(): void;
|
|
2331
|
+
runAction(id: string): void;
|
|
2332
|
+
private clearTimer;
|
|
2333
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
|
|
2334
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
declare class ToastHostComponent {
|
|
2338
|
+
readonly toastService: ToastService;
|
|
2339
|
+
readonly theme: AppThemeService;
|
|
2340
|
+
readonly topToasts: i0.Signal<structra_ui.ToastInstance[]>;
|
|
2341
|
+
readonly bottomToasts: i0.Signal<structra_ui.ToastInstance[]>;
|
|
2342
|
+
dismiss(id: string): void;
|
|
2343
|
+
action(id: string): void;
|
|
2344
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastHostComponent, never>;
|
|
2345
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastHostComponent, "app-toast-host", never, {}, {}, never, never, true, never>;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
declare class LoadingDialogComponent {
|
|
2349
|
+
private readonly data;
|
|
2350
|
+
readonly titleId: string;
|
|
2351
|
+
readonly message: string;
|
|
2352
|
+
private static seq;
|
|
2353
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingDialogComponent, never>;
|
|
2354
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingDialogComponent, "app-loading-dialog", never, {}, {}, never, never, true, never>;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
interface LoadingDialogData {
|
|
2358
|
+
/**
|
|
2359
|
+
* Texto sob o indicador de progresso.
|
|
2360
|
+
* Omisso: mensagem por defeito da lib (`A carregar…`).
|
|
2361
|
+
*/
|
|
2362
|
+
message?: string;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
declare class LoadingDialogService {
|
|
2366
|
+
private readonly dialog;
|
|
2367
|
+
private readonly theme;
|
|
2368
|
+
/**
|
|
2369
|
+
* Abre o diálogo de carregamento.
|
|
2370
|
+
* `disableClose: true` — não fecha com Escape nem clique fora; use `ref.close()` quando terminar.
|
|
2371
|
+
*/
|
|
2372
|
+
open(data?: LoadingDialogData): DialogRef<void, LoadingDialogComponent>;
|
|
2373
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingDialogService, never>;
|
|
2374
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LoadingDialogService>;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Posicionamento vertical preferido do dropdown em relação ao trigger.
|
|
2379
|
+
* O CDK faz flip automático se não couber no viewport quando configurado com posições múltiplas.
|
|
2380
|
+
*/
|
|
2381
|
+
declare enum MenuDropdownPlacement {
|
|
2382
|
+
/** Abre por baixo do trigger (preferencial). */
|
|
2383
|
+
Below = "below",
|
|
2384
|
+
/** Abre por cima do trigger. */
|
|
2385
|
+
Above = "above"
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
declare class DropdownMenuComponent<T = string> {
|
|
2389
|
+
private readonly host;
|
|
2390
|
+
items: readonly MenuNodeItem<T>[];
|
|
2391
|
+
placement: MenuDropdownPlacement;
|
|
2392
|
+
/** Largura mínima do painel em px (o painel pode alargar ao conteúdo). */
|
|
2393
|
+
minWidthPx: number;
|
|
2394
|
+
/** Se `true`, a largura do painel segue a do trigger. */
|
|
2395
|
+
matchTriggerWidth: boolean;
|
|
2396
|
+
menuId: string;
|
|
2397
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2398
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2399
|
+
panelTpl: TemplateRef<unknown>;
|
|
2400
|
+
private menuList?;
|
|
2401
|
+
open: boolean;
|
|
2402
|
+
private readonly generatedId;
|
|
2403
|
+
get resolvedMenuId(): string;
|
|
2404
|
+
/** Largura do painel no overlay (mínimo garantido; pode igualar ao trigger). */
|
|
2405
|
+
get effectivePanelWidth(): number;
|
|
2406
|
+
get connectedPositions(): _angular_cdk_overlay.ConnectedPosition[];
|
|
2407
|
+
onTriggerClick(ev: Event): void;
|
|
2408
|
+
toggle(): void;
|
|
2409
|
+
setOpen(next: boolean): void;
|
|
2410
|
+
onBaseOpenChange(next: boolean): void;
|
|
2411
|
+
onItemSelect(id: T): void;
|
|
2412
|
+
onCloseRequest(): void;
|
|
2413
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuComponent<any>, never>;
|
|
2414
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuComponent<any>, "app-dropdown-menu", never, { "items": { "alias": "items"; "required": true; }; "placement": { "alias": "placement"; "required": false; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; }; "matchTriggerWidth": { "alias": "matchTriggerWidth"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; }, { "itemSelect": "itemSelect"; "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
2415
|
+
static ngAcceptInputType_matchTriggerWidth: unknown;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
declare class ContextMenuComponent<T = string> implements OnDestroy {
|
|
2419
|
+
private readonly overlay;
|
|
2420
|
+
private readonly vcr;
|
|
2421
|
+
private readonly appTheme;
|
|
2422
|
+
private readonly cdr;
|
|
2423
|
+
items: readonly MenuNodeItem<T>[];
|
|
2424
|
+
disabled: boolean;
|
|
2425
|
+
menuId: string;
|
|
2426
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2427
|
+
menuTpl: TemplateRef<unknown>;
|
|
2428
|
+
private menuList?;
|
|
2429
|
+
private overlayRef;
|
|
2430
|
+
private escSub;
|
|
2431
|
+
private readonly generatedId;
|
|
2432
|
+
readonly panelThemeNgClass: i0.Signal<{
|
|
2433
|
+
[x: string]: boolean;
|
|
2434
|
+
'app-library-theme': boolean;
|
|
2435
|
+
}>;
|
|
2436
|
+
get resolvedMenuId(): string;
|
|
2437
|
+
ngOnDestroy(): void;
|
|
2438
|
+
onContextMenu(ev: MouseEvent): void;
|
|
2439
|
+
private openAt;
|
|
2440
|
+
private disposeOverlay;
|
|
2441
|
+
onItemSelect(id: T): void;
|
|
2442
|
+
onCloseRequest(): void;
|
|
2443
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuComponent<any>, never>;
|
|
2444
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent<any>, "app-context-menu", never, { "items": { "alias": "items"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["*"], true, never>;
|
|
2445
|
+
static ngAcceptInputType_disabled: unknown;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
/** Lado de ancoragem do drawer. */
|
|
2449
|
+
declare enum DrawerSide {
|
|
2450
|
+
Left = "left",
|
|
2451
|
+
Right = "right",
|
|
2452
|
+
Bottom = "bottom"
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
/** Larguras padronizadas do painel lateral (drawer). */
|
|
2456
|
+
declare enum DrawerSize {
|
|
2457
|
+
Sm = "sm",
|
|
2458
|
+
Md = "md",
|
|
2459
|
+
Lg = "lg"
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
declare class DrawerComponent implements OnChanges, OnDestroy {
|
|
2463
|
+
private readonly cdr;
|
|
2464
|
+
private readonly injector;
|
|
2465
|
+
private readonly hostEl;
|
|
2466
|
+
open: boolean;
|
|
2467
|
+
side: DrawerSide;
|
|
2468
|
+
size: DrawerSize;
|
|
2469
|
+
/** `title="…"` no template — evita colisão com `HTMLElement.title` no host. */
|
|
2470
|
+
drawerHeading: string;
|
|
2471
|
+
showCloseButton: boolean;
|
|
2472
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2473
|
+
private panelRef?;
|
|
2474
|
+
readonly DrawerSide: typeof DrawerSide;
|
|
2475
|
+
readonly DrawerSize: typeof DrawerSize;
|
|
2476
|
+
readonly titleId: string;
|
|
2477
|
+
private focusPreOpen;
|
|
2478
|
+
/** Igual ao `app-dialog`: backdrop + painel no `body` para `backdrop-filter` correcto. */
|
|
2479
|
+
private bodyRestoreParent;
|
|
2480
|
+
private bodyRestoreNext;
|
|
2481
|
+
get panelClasses(): Record<string, boolean>;
|
|
2482
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2483
|
+
ngOnDestroy(): void;
|
|
2484
|
+
private attachHostToBody;
|
|
2485
|
+
private detachHostFromBody;
|
|
2486
|
+
onBackdropClick(): void;
|
|
2487
|
+
onCloseClick(): void;
|
|
2488
|
+
onPanelKeydown(ev: KeyboardEvent): void;
|
|
2489
|
+
requestClose(): void;
|
|
2490
|
+
private restoreFocus;
|
|
2491
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DrawerComponent, never>;
|
|
2492
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrawerComponent, "app-drawer", never, { "open": { "alias": "open"; "required": false; }; "side": { "alias": "side"; "required": false; }; "size": { "alias": "size"; "required": false; }; "drawerHeading": { "alias": "title"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*", "[appDrawerFooter]"], true, never>;
|
|
2493
|
+
static ngAcceptInputType_open: unknown;
|
|
2494
|
+
static ngAcceptInputType_showCloseButton: unknown;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
interface MenuRowAction<T = string> {
|
|
2498
|
+
kind: 'action';
|
|
2499
|
+
item: MenuItemAction<T>;
|
|
2500
|
+
/** Índice na navegação por teclado; `null` se desabilitado. */
|
|
2501
|
+
focusIndex: number | null;
|
|
2502
|
+
}
|
|
2503
|
+
interface MenuRowDivider {
|
|
2504
|
+
kind: 'divider';
|
|
2505
|
+
}
|
|
2506
|
+
interface MenuRowGroup {
|
|
2507
|
+
kind: 'group';
|
|
2508
|
+
label?: string;
|
|
2509
|
+
}
|
|
2510
|
+
interface MenuRowSubmenu<T = string> {
|
|
2511
|
+
kind: 'submenu';
|
|
2512
|
+
item: MenuItemSubmenu<T>;
|
|
2513
|
+
focusIndex: number | null;
|
|
2514
|
+
}
|
|
2515
|
+
type MenuRow<T = string> = MenuRowAction<T> | MenuRowDivider | MenuRowGroup | MenuRowSubmenu<T>;
|
|
2516
|
+
|
|
2517
|
+
declare class MenuListComponent<T = string> implements OnChanges {
|
|
2518
|
+
private readonly cdr;
|
|
2519
|
+
private readonly appTheme;
|
|
2520
|
+
readonly hostRef: ElementRef<any>;
|
|
2521
|
+
items: readonly MenuNodeItem<T>[];
|
|
2522
|
+
/** Prefixo dos `id` das opções focáveis (`${menuId}-opt-${focusIndex}`). */
|
|
2523
|
+
menuId: string;
|
|
2524
|
+
dense: boolean;
|
|
2525
|
+
/** Quando `true`, o menu está dentro de um submenu — seta ← regressa um nível. */
|
|
2526
|
+
nested: boolean;
|
|
2527
|
+
/**
|
|
2528
|
+
* Destaca visualmente o item cuja `id` coincide (navegação actual / rota activa).
|
|
2529
|
+
* Só aplica a linhas `kind: 'item'` neste nível.
|
|
2530
|
+
*/
|
|
2531
|
+
selectedItemId: T | null;
|
|
2532
|
+
/**
|
|
2533
|
+
* Oculta rótulos e descrições (ex.: sidebar colapsada), mantendo ícones; define `title` nativo para hover.
|
|
2534
|
+
*/
|
|
2535
|
+
compressText: boolean;
|
|
2536
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2537
|
+
readonly closeRequest: EventEmitter<void>;
|
|
2538
|
+
readonly submenuBack: EventEmitter<void>;
|
|
2539
|
+
private nestedLists?;
|
|
2540
|
+
rows: MenuRow<T>[];
|
|
2541
|
+
private focusableCount;
|
|
2542
|
+
/** Índice entre `0` e `focusableCount - 1`, ou `-1` = nenhum realce. */
|
|
2543
|
+
activeIndex: number;
|
|
2544
|
+
/** Painel de submenu aberto (um por instância de lista). */
|
|
2545
|
+
openSubmenuKey: string | null;
|
|
2546
|
+
private submenuOpenTimer;
|
|
2547
|
+
private submenuCloseTimer;
|
|
2548
|
+
readonly submenuPositions: _angular_cdk_overlay.ConnectedPosition[];
|
|
2549
|
+
readonly panelThemeNgClass: i0.Signal<{
|
|
2550
|
+
[x: string]: boolean;
|
|
2551
|
+
'app-library-theme': boolean;
|
|
2552
|
+
}>;
|
|
2553
|
+
overlayPanelClasses(): string[];
|
|
2554
|
+
onNestedItemSelect(id: T): void;
|
|
2555
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2556
|
+
submenuRowKey(row: MenuRow<T>, index: number): string;
|
|
2557
|
+
isSubmenuOpen(row: MenuRow<T>, index: number): boolean;
|
|
2558
|
+
submenuMenuId(row: MenuRow<T>): string;
|
|
2559
|
+
onRowMouseEnter(row: MenuRow<T>): void;
|
|
2560
|
+
onSubmenuTriggerEnter(row: MenuRow<T>, index: number): void;
|
|
2561
|
+
onSubmenuTriggerLeave(_row: MenuRow<T>, index: number): void;
|
|
2562
|
+
onSubmenuPanelEnter(): void;
|
|
2563
|
+
onSubmenuPanelLeave(row: MenuRow<T>, index: number): void;
|
|
2564
|
+
private scheduleSubmenuClose;
|
|
2565
|
+
private cancelSubmenuOpenTimer;
|
|
2566
|
+
private cancelSubmenuCloseTimer;
|
|
2567
|
+
/** Fecha o submenu deste nível (seta ← no filho ou fecho de irmão). */
|
|
2568
|
+
closeOpenSubmenu(): void;
|
|
2569
|
+
onSubmenuRowClick(ev: MouseEvent, row: MenuRow<T>, index: number): void;
|
|
2570
|
+
onSubmenuOutsideClick(row: MenuRow<T>, index: number): void;
|
|
2571
|
+
private openSubmenuForRowAt;
|
|
2572
|
+
private queueFocusNestedFirst;
|
|
2573
|
+
/** Primeira opção focável (abertura por teclado). */
|
|
2574
|
+
focusFirstOption(): void;
|
|
2575
|
+
onItemClick(ev: MouseEvent, item: MenuItemAction<T>): void;
|
|
2576
|
+
optionId(focusIndex: number): string;
|
|
2577
|
+
isActiveRow(row: MenuRow<T>): boolean;
|
|
2578
|
+
/** Realce de selecção persistente (ex.: item de navegação activo). */
|
|
2579
|
+
isRowSelected(row: MenuRow<T>): boolean;
|
|
2580
|
+
resetHighlight(): void;
|
|
2581
|
+
onMenuSurfaceLeave(): void;
|
|
2582
|
+
private focusActiveDom;
|
|
2583
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
2584
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuListComponent<any>, never>;
|
|
2585
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuListComponent<any>, "app-menu-list", never, { "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "nested": { "alias": "nested"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "compressText": { "alias": "compressText"; "required": false; }; }, { "itemSelect": "itemSelect"; "closeRequest": "closeRequest"; "submenuBack": "submenuBack"; }, never, never, true, never>;
|
|
2586
|
+
static ngAcceptInputType_dense: unknown;
|
|
2587
|
+
static ngAcceptInputType_nested: unknown;
|
|
2588
|
+
static ngAcceptInputType_compressText: unknown;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* Menu de ações padrão: mesmo comportamento do `dropdown-menu` com trigger «…» (overflow).
|
|
2593
|
+
* Mantém a API de itens existente (`MenuNodeItem`).
|
|
2594
|
+
*/
|
|
2595
|
+
declare class ActionMenuComponent<T = string> {
|
|
2596
|
+
items: readonly MenuNodeItem<T>[];
|
|
2597
|
+
placement: MenuDropdownPlacement;
|
|
2598
|
+
minWidthPx: number;
|
|
2599
|
+
menuId: string;
|
|
2600
|
+
/** Texto acessível do botão de gatilho. */
|
|
2601
|
+
triggerLabel: string;
|
|
2602
|
+
/** O painel não segue a largura do botão (ícone estreito). */
|
|
2603
|
+
matchTriggerWidth: boolean;
|
|
2604
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2605
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2606
|
+
readonly MenuDropdownPlacement: typeof MenuDropdownPlacement;
|
|
2607
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionMenuComponent<any>, never>;
|
|
2608
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionMenuComponent<any>, "app-action-menu", never, { "items": { "alias": "items"; "required": true; }; "placement": { "alias": "placement"; "required": false; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; }; "matchTriggerWidth": { "alias": "matchTriggerWidth"; "required": false; }; }, { "itemSelect": "itemSelect"; "openChange": "openChange"; }, never, never, true, never>;
|
|
2609
|
+
static ngAcceptInputType_matchTriggerWidth: unknown;
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* Separador semântico reutilizável — mesma apresentação que o divisor do modelo de dados (`kind: 'divider'`).
|
|
2614
|
+
*/
|
|
2615
|
+
declare class MenuDividerComponent {
|
|
2616
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuDividerComponent, never>;
|
|
2617
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuDividerComponent, "app-menu-divider", never, {}, {}, never, never, true, never>;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* Cabeçalho opcional de grupo — alinhado a `MenuItemGroup` (`kind: 'group'`).
|
|
2622
|
+
* Os itens do grupo continuam a ser renderizados pelo `menu-list` (renderização única).
|
|
2623
|
+
*/
|
|
2624
|
+
declare class MenuGroupComponent {
|
|
2625
|
+
label?: string;
|
|
2626
|
+
/** Quando `true`, não mostra o título (ex.: sidebar colapsada só com ícones). */
|
|
2627
|
+
hideLabel: boolean;
|
|
2628
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupComponent, never>;
|
|
2629
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuGroupComponent, "app-menu-group", never, { "label": { "alias": "label"; "required": false; }; "hideLabel": { "alias": "hideLabel"; "required": false; }; }, {}, never, never, true, never>;
|
|
2630
|
+
static ngAcceptInputType_hideLabel: unknown;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* Fundação reutilizável para painéis ancorados (tooltip, popover, autocomplete, datepicker, etc.).
|
|
2635
|
+
* Usa `CdkConnectedOverlay` + tema da lib.
|
|
2636
|
+
*
|
|
2637
|
+
* @see `DropdownBaseComponent` — overlay para painéis de **campo** (menus/select): backdrop e fecho por omissão
|
|
2638
|
+
* alinhados a esse caso; mantido separado para não quebrar contratos públicos.
|
|
2639
|
+
*/
|
|
2640
|
+
declare class AnchoredOverlayComponent {
|
|
2641
|
+
private readonly appTheme;
|
|
2642
|
+
private readonly overlay;
|
|
2643
|
+
open: boolean;
|
|
2644
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2645
|
+
panelTemplate: TemplateRef<unknown>;
|
|
2646
|
+
connectedPositions: ConnectedPosition[];
|
|
2647
|
+
pushConnectedOverlay: boolean;
|
|
2648
|
+
hasBackdrop: boolean;
|
|
2649
|
+
closeOnEscape: boolean;
|
|
2650
|
+
/** Fecha ao clicar fora do painel e fora da âncora (popover, dialogs leves). */
|
|
2651
|
+
closeOnOutsideClick: boolean;
|
|
2652
|
+
panelWidthPx: number | null;
|
|
2653
|
+
panelMinWidthPx: number | null;
|
|
2654
|
+
panelMaxWidthPx: number | null;
|
|
2655
|
+
/**
|
|
2656
|
+
* Estratégia de scroll (predefinição: reposicionar; `close` para fechar ao scroll em certos modais).
|
|
2657
|
+
*/
|
|
2658
|
+
scrollStrategy: ScrollStrategy | null;
|
|
2659
|
+
readonly overlayPanelClasses: i0.Signal<string[]>;
|
|
2660
|
+
readonly panelThemeNgClass: i0.Signal<{
|
|
2661
|
+
[x: string]: boolean;
|
|
2662
|
+
'app-library-theme': boolean;
|
|
2663
|
+
}>;
|
|
2664
|
+
readonly defaultScrollStrategy: _angular_cdk_overlay.RepositionScrollStrategy;
|
|
2665
|
+
get effectiveScrollStrategy(): ScrollStrategy;
|
|
2666
|
+
get overlayWidthCss(): number | string | undefined;
|
|
2667
|
+
get overlayMinWidthCss(): number | string | undefined;
|
|
2668
|
+
onBackdropClick(): void;
|
|
2669
|
+
onOverlayOutsideClick(): void;
|
|
2670
|
+
onOverlayKeydown(ev: KeyboardEvent): void;
|
|
2671
|
+
onDetach(): void;
|
|
2672
|
+
setOpen(next: boolean): void;
|
|
2673
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnchoredOverlayComponent, never>;
|
|
2674
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AnchoredOverlayComponent, "app-anchored-overlay", never, { "open": { "alias": "open"; "required": false; }; "panelTemplate": { "alias": "panelTemplate"; "required": true; }; "connectedPositions": { "alias": "connectedPositions"; "required": false; }; "pushConnectedOverlay": { "alias": "pushConnectedOverlay"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "panelWidthPx": { "alias": "panelWidthPx"; "required": false; }; "panelMinWidthPx": { "alias": "panelMinWidthPx"; "required": false; }; "panelMaxWidthPx": { "alias": "panelMaxWidthPx"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
2675
|
+
static ngAcceptInputType_open: unknown;
|
|
2676
|
+
static ngAcceptInputType_pushConnectedOverlay: unknown;
|
|
2677
|
+
static ngAcceptInputType_hasBackdrop: unknown;
|
|
2678
|
+
static ngAcceptInputType_closeOnEscape: unknown;
|
|
2679
|
+
static ngAcceptInputType_closeOnOutsideClick: unknown;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* Posição preferencial do painel em relação à âncora (com fallbacks via CDK `push` / ordem de posições).
|
|
2684
|
+
*/
|
|
2685
|
+
declare enum OverlayPlacement {
|
|
2686
|
+
Top = "top",
|
|
2687
|
+
Bottom = "bottom",
|
|
2688
|
+
Left = "left",
|
|
2689
|
+
Right = "right"
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
/**
|
|
2693
|
+
* Tooltip ancorado ao conteúdo projectado (trigger).
|
|
2694
|
+
* — Texto: `text` ou `ng-template` com `appTooltipPanel`.
|
|
2695
|
+
*/
|
|
2696
|
+
declare class TooltipComponent {
|
|
2697
|
+
private readonly cdr;
|
|
2698
|
+
text: string;
|
|
2699
|
+
placement: OverlayPlacement;
|
|
2700
|
+
offsetPx: number;
|
|
2701
|
+
showDelayMs: number;
|
|
2702
|
+
hideDelayMs: number;
|
|
2703
|
+
disabled: boolean;
|
|
2704
|
+
private readonly panelDirective?;
|
|
2705
|
+
panelTpl: TemplateRef<unknown>;
|
|
2706
|
+
readonly placementEnum: typeof OverlayPlacement;
|
|
2707
|
+
readonly tooltipId: string;
|
|
2708
|
+
open: boolean;
|
|
2709
|
+
private showTimer;
|
|
2710
|
+
private hideTimer;
|
|
2711
|
+
get panelContentTpl(): TemplateRef<unknown> | null;
|
|
2712
|
+
get positions(): _angular_cdk_overlay.ConnectedPosition[];
|
|
2713
|
+
get describedByWhenOpen(): string | null;
|
|
2714
|
+
onTriggerMouseEnter(): void;
|
|
2715
|
+
onTriggerMouseLeave(): void;
|
|
2716
|
+
onTriggerFocusIn(): void;
|
|
2717
|
+
onTriggerFocusOut(): void;
|
|
2718
|
+
onPanelMouseEnter(): void;
|
|
2719
|
+
onPanelMouseLeave(): void;
|
|
2720
|
+
private scheduleShow;
|
|
2721
|
+
private scheduleHide;
|
|
2722
|
+
private cancelShow;
|
|
2723
|
+
private cancelHide;
|
|
2724
|
+
onAnchoredOpenChange(next: boolean): void;
|
|
2725
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
2726
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "app-tooltip", never, { "text": { "alias": "text"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "offsetPx": { "alias": "offsetPx"; "required": false; }; "showDelayMs": { "alias": "showDelayMs"; "required": false; }; "hideDelayMs": { "alias": "hideDelayMs"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["panelDirective"], ["*"], true, never>;
|
|
2727
|
+
static ngAcceptInputType_disabled: unknown;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* Marca um `ng-template` como conteúdo do painel do tooltip (em alternativa a `text`).
|
|
2732
|
+
*/
|
|
2733
|
+
declare class TooltipPanelTemplateDirective {
|
|
2734
|
+
readonly templateRef: TemplateRef<any>;
|
|
2735
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipPanelTemplateDirective, never>;
|
|
2736
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipPanelTemplateDirective, "ng-template[appTooltipPanel]", never, {}, {}, never, never, true, never>;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
declare class PopoverBodyTemplateDirective {
|
|
2740
|
+
readonly templateRef: TemplateRef<any>;
|
|
2741
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverBodyTemplateDirective, never>;
|
|
2742
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverBodyTemplateDirective, "ng-template[appPopoverBody]", never, {}, {}, never, never, true, never>;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
declare class PopoverFooterTemplateDirective {
|
|
2746
|
+
readonly templateRef: TemplateRef<any>;
|
|
2747
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverFooterTemplateDirective, never>;
|
|
2748
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverFooterTemplateDirective, "ng-template[appPopoverFooter]", never, {}, {}, never, never, true, never>;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
/**
|
|
2752
|
+
* Painel flutuante ancorado (ações contextuais, ajuda rica, mini-formulários).
|
|
2753
|
+
* Conteúdo: `ng-template appPopoverBody` obrigatório; `appPopoverFooter` opcional; trigger com `appPopoverTrigger`.
|
|
2754
|
+
*/
|
|
2755
|
+
declare class PopoverComponent {
|
|
2756
|
+
private readonly cdr;
|
|
2757
|
+
title: string;
|
|
2758
|
+
/** Modo controlado: `open` + `openChange`. */
|
|
2759
|
+
open: boolean;
|
|
2760
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2761
|
+
placement: OverlayPlacement;
|
|
2762
|
+
offsetPx: number;
|
|
2763
|
+
minWidthPx: number;
|
|
2764
|
+
maxWidthPx: number;
|
|
2765
|
+
/** Rótulo acessível quando não há título visível. */
|
|
2766
|
+
ariaLabel: string;
|
|
2767
|
+
readonly bodyDirective?: PopoverBodyTemplateDirective;
|
|
2768
|
+
readonly footerDirective?: PopoverFooterTemplateDirective;
|
|
2769
|
+
panelTpl: TemplateRef<unknown>;
|
|
2770
|
+
readonly popoverId: string;
|
|
2771
|
+
get bodyTpl(): TemplateRef<unknown> | null;
|
|
2772
|
+
get footerTpl(): TemplateRef<unknown> | null;
|
|
2773
|
+
get positions(): _angular_cdk_overlay.ConnectedPosition[];
|
|
2774
|
+
get titleId(): string;
|
|
2775
|
+
get effectiveAriaLabel(): string | null;
|
|
2776
|
+
onTriggerClick(ev: Event): void;
|
|
2777
|
+
toggle(): void;
|
|
2778
|
+
/** Sincroniza com `app-anchored-overlay` e notifica o pai (`[(open)]`). */
|
|
2779
|
+
setOpen(next: boolean): void;
|
|
2780
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverComponent, never>;
|
|
2781
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PopoverComponent, "app-popover", never, { "title": { "alias": "title"; "required": false; }; "open": { "alias": "open"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "offsetPx": { "alias": "offsetPx"; "required": false; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; }; "maxWidthPx": { "alias": "maxWidthPx"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "openChange": "openChange"; }, ["bodyDirective", "footerDirective"], ["[appPopoverTrigger]"], true, never>;
|
|
2782
|
+
static ngAcceptInputType_open: unknown;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
/** Marca o elemento que abre/fecha o popover ao clicar. */
|
|
2786
|
+
declare class PopoverTriggerDirective {
|
|
2787
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverTriggerDirective, never>;
|
|
2788
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverTriggerDirective, "[appPopoverTrigger]", never, {}, {}, never, never, true, never>;
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* Constrói posições CDK para overlay ancorado (tooltip, popover, autocomplete, etc.).
|
|
2793
|
+
* Inclui alternativas para inverter quando não há espaço (`push` no componente).
|
|
2794
|
+
*
|
|
2795
|
+
* Menus dropdown usam {@link menuConnectedPositions} em `menus/_utils` (alinhamento `start`, gap tipicamente menor).
|
|
2796
|
+
*/
|
|
2797
|
+
declare function anchoredOverlayPositions(placement: OverlayPlacement, offsetPx?: number): ConnectedPosition[];
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* Duração da animação de largura da lateral (`flex-basis` / `width` / `padding`).
|
|
2801
|
+
* Manter alinhado com `$app-sidebar-layout-duration` em `_sidebar-reveal.scss`.
|
|
2802
|
+
*/
|
|
2803
|
+
declare const APP_SIDEBAR_LAYOUT_DURATION_MS = 0;
|
|
2804
|
+
/** Folga após o layout, antes de revelar rótulos (evita texto a “comprimir”). */
|
|
2805
|
+
declare const APP_SIDEBAR_LABEL_REVEAL_LAG_MS = 48;
|
|
2806
|
+
declare const APP_SIDEBAR_NAV_REVEAL_TOTAL_MS: number;
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* Estrutura principal: barra lateral, topo e conteúdo. Em mobile a lateral projecta-se no `app-drawer`.
|
|
2810
|
+
*
|
|
2811
|
+
* Use `exportAs: 'appShell'` e `toggleMobileNav` / `toggleSidebarCollapsed` a partir da topbar.
|
|
2812
|
+
*/
|
|
2813
|
+
declare class AppShellComponent implements OnInit {
|
|
2814
|
+
private readonly bp;
|
|
2815
|
+
private readonly cdr;
|
|
2816
|
+
private readonly destroyRef;
|
|
2817
|
+
private readonly theme;
|
|
2818
|
+
protected get hostThemeClasses(): string;
|
|
2819
|
+
private readonly sidebarSlot?;
|
|
2820
|
+
/** Conteúdo lateral (obrigatório): `<ng-template appShellSidebar>...</ng-template>`. */
|
|
2821
|
+
get sidebarTemplate(): TemplateRef<unknown> | null;
|
|
2822
|
+
/** Barra lateral estreita (ícones + compressão de texto na lista). */
|
|
2823
|
+
sidebarCollapsed: boolean;
|
|
2824
|
+
readonly sidebarCollapsedChange: EventEmitter<boolean>;
|
|
2825
|
+
/** Estado do drawer mobile (usar `[(mobileNavOpen)]` para controlar o menu hamburger). */
|
|
2826
|
+
mobileNavOpen: boolean;
|
|
2827
|
+
readonly mobileNavOpenChange: EventEmitter<boolean>;
|
|
2828
|
+
/** Consulta CDK para modo mobile (por omissão igual à vista adaptativa). */
|
|
2829
|
+
mobileLayoutQuery: string;
|
|
2830
|
+
isMobileLayout: boolean;
|
|
2831
|
+
readonly DrawerSide: typeof DrawerSide;
|
|
2832
|
+
readonly DrawerSize: typeof DrawerSize;
|
|
2833
|
+
ngOnInit(): void;
|
|
2834
|
+
onMobileDrawerOpenChange(next: boolean): void;
|
|
2835
|
+
/** Emite alteração; com `[(mobileNavOpen)]` no pai o `@Input` actualiza o estado do drawer. */
|
|
2836
|
+
private emitMobileNavOpen;
|
|
2837
|
+
toggleMobileNav(): void;
|
|
2838
|
+
toggleSidebarCollapsed(): void;
|
|
2839
|
+
closeMobileNav(): void;
|
|
2840
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
|
|
2841
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "app-shell", ["appShell"], { "sidebarCollapsed": { "alias": "sidebarCollapsed"; "required": false; }; "mobileNavOpen": { "alias": "mobileNavOpen"; "required": false; }; "mobileLayoutQuery": { "alias": "mobileLayoutQuery"; "required": false; }; }, { "sidebarCollapsedChange": "sidebarCollapsedChange"; "mobileNavOpenChange": "mobileNavOpenChange"; }, ["sidebarSlot"], ["[appShellTopbar]", "*"], true, never>;
|
|
2842
|
+
static ngAcceptInputType_sidebarCollapsed: unknown;
|
|
2843
|
+
static ngAcceptInputType_mobileNavOpen: unknown;
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Marca o `ng-template` cuja instância é projectada na barra lateral (desktop) e no `app-drawer` (mobile).
|
|
2848
|
+
*
|
|
2849
|
+
* ```html
|
|
2850
|
+
* <app-shell>
|
|
2851
|
+
* <ng-template appShellSidebar>
|
|
2852
|
+
* <app-sidebar ... />
|
|
2853
|
+
* </ng-template>
|
|
2854
|
+
* ...
|
|
2855
|
+
* </app-shell>
|
|
2856
|
+
* ```
|
|
2857
|
+
*/
|
|
2858
|
+
declare class AppShellSidebarTemplateDirective {
|
|
2859
|
+
readonly templateRef: TemplateRef<any>;
|
|
2860
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellSidebarTemplateDirective, never>;
|
|
2861
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AppShellSidebarTemplateDirective, "ng-template[appShellSidebar]", never, {}, {}, never, never, true, never>;
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
/**
|
|
2865
|
+
* Navegação lateral com o mesmo modelo `MenuNodeItem` dos menus da lib (grupos, submenus, teclado).
|
|
2866
|
+
* Com `collapsed`, `app-menu-list` usa `compressText`: rótulos de grupo (ex. «Principal») ficam ocultos;
|
|
2867
|
+
* itens mostram só ícones com `title` / `aria-label` para acessibilidade.
|
|
2868
|
+
*/
|
|
2869
|
+
declare class AppSidebarComponent<T extends string = string> implements OnChanges {
|
|
2870
|
+
private readonly theme;
|
|
2871
|
+
private readonly destroyRef;
|
|
2872
|
+
/**
|
|
2873
|
+
* Garante `.app-library-theme` + `theme-*` no host para tokens `--app-color-nav-*` e lista
|
|
2874
|
+
* herdarem a paleta activa (útil fora da demo ou sem antepassado tematizado).
|
|
2875
|
+
*/
|
|
2876
|
+
protected get hostThemeClasses(): string;
|
|
2877
|
+
items: readonly MenuNodeItem<T>[];
|
|
2878
|
+
menuId: string;
|
|
2879
|
+
/** Sincronizar com o item de navegação activo (realce persistente). */
|
|
2880
|
+
selectedItemId: T | null;
|
|
2881
|
+
/** Modo estreito: só ícones + `compressText` na lista (rótulos via `title` / `aria-label`). */
|
|
2882
|
+
collapsed: boolean;
|
|
2883
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2884
|
+
/**
|
|
2885
|
+
* Valor efectivo de `compressText` em `app-menu-list`: ao expandir, mantém-se comprimido
|
|
2886
|
+
* até a lateral terminar a animação de largura (evita flicker de texto).
|
|
2887
|
+
*/
|
|
2888
|
+
readonly listCompressText: i0.WritableSignal<boolean>;
|
|
2889
|
+
private listRevealTimeoutId;
|
|
2890
|
+
constructor();
|
|
2891
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2892
|
+
private clearListRevealTimeout;
|
|
2893
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebarComponent<any>, never>;
|
|
2894
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebarComponent<any>, "app-sidebar", never, { "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "itemSelect": "itemSelect"; }, never, ["[appSidebarToolbar]"], true, never>;
|
|
2895
|
+
static ngAcceptInputType_collapsed: unknown;
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2898
|
+
/**
|
|
2899
|
+
* Marca conteúdo a projectar no topo da sidebar (ex.: botão recolher/expandir).
|
|
2900
|
+
*
|
|
2901
|
+
* ```html
|
|
2902
|
+
* <app-sidebar [items]="nav">
|
|
2903
|
+
* <app-shell-sidebar-toggle appSidebarToolbar [collapsed]="collapsed" (toggle)="onToggle()" />
|
|
2904
|
+
* </app-sidebar>
|
|
2905
|
+
* ```
|
|
2906
|
+
*/
|
|
2907
|
+
declare class AppSidebarToolbarDirective {
|
|
2908
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebarToolbarDirective, never>;
|
|
2909
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AppSidebarToolbarDirective, "[appSidebarToolbar]", never, {}, {}, never, never, true, never>;
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
/**
|
|
2913
|
+
* Botão só ícone (setas «abrir/fechar») para recolher/expandir a largura da lateral.
|
|
2914
|
+
* Na demo, usar com `appSidebarToolbar` projectado em `app-sidebar`.
|
|
2915
|
+
*/
|
|
2916
|
+
declare class AppShellSidebarToggleComponent {
|
|
2917
|
+
/** `true` quando a lateral está estreita / recolhida. */
|
|
2918
|
+
collapsed: boolean;
|
|
2919
|
+
/** Rótulos acessíveis quando `collapsed` é `true` (accção: expandir). */
|
|
2920
|
+
expandLabel: string;
|
|
2921
|
+
/** Rótulos quando `collapsed` é `false` (accção: recolher). */
|
|
2922
|
+
collapseLabel: string;
|
|
2923
|
+
readonly toggle: EventEmitter<void>;
|
|
2924
|
+
onClick(): void;
|
|
2925
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppShellSidebarToggleComponent, never>;
|
|
2926
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppShellSidebarToggleComponent, "app-shell-sidebar-toggle", never, { "collapsed": { "alias": "collapsed"; "required": false; }; "expandLabel": { "alias": "expandLabel"; "required": false; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; }; }, { "toggle": "toggle"; }, never, never, true, never>;
|
|
2927
|
+
static ngAcceptInputType_collapsed: unknown;
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* Barra superior com três zonas de projeção: início (ex.: menu), título, fim (ex.: usuário).
|
|
2932
|
+
*/
|
|
2933
|
+
declare class AppTopbarComponent {
|
|
2934
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarComponent, never>;
|
|
2935
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbarComponent, "app-topbar", never, {}, {}, never, ["[appTopbarStart]", "[appTopbarTitle]", "[appTopbarEnd]"], true, never>;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* Menu do usuário: `app-dropdown-menu` com gatilho personalizado (avatar ou ícone).
|
|
2940
|
+
*/
|
|
2941
|
+
declare class AppUserMenuComponent<T extends string = string> {
|
|
2942
|
+
items: readonly MenuNodeItem<T>[];
|
|
2943
|
+
menuId: string;
|
|
2944
|
+
placement: MenuDropdownPlacement;
|
|
2945
|
+
minWidthPx: number;
|
|
2946
|
+
/** Texto junto ao avatar (oculto em ecrãs muito estreitos via CSS). */
|
|
2947
|
+
displayName: string;
|
|
2948
|
+
/** URL de imagem para avatar; sem valor usa ícone genérico. */
|
|
2949
|
+
avatarUrl: string;
|
|
2950
|
+
triggerLabel: string;
|
|
2951
|
+
showName: boolean;
|
|
2952
|
+
readonly itemSelect: EventEmitter<T>;
|
|
2953
|
+
readonly openChange: EventEmitter<boolean>;
|
|
2954
|
+
readonly MenuDropdownPlacement: typeof MenuDropdownPlacement;
|
|
2955
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppUserMenuComponent<any>, never>;
|
|
2956
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppUserMenuComponent<any>, "app-user-menu", never, { "items": { "alias": "items"; "required": true; }; "menuId": { "alias": "menuId"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "minWidthPx": { "alias": "minWidthPx"; "required": false; }; "displayName": { "alias": "displayName"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; }; "showName": { "alias": "showName"; "required": false; }; }, { "itemSelect": "itemSelect"; "openChange": "openChange"; }, never, never, true, never>;
|
|
2957
|
+
static ngAcceptInputType_showName: unknown;
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
/**
|
|
2961
|
+
* Segmento do filo de navegação (`app-breadcrumb`).
|
|
2962
|
+
* Prioridade de navegação: se `route` estiver definido, usa-se `RouterLink`; senão, `href` (âncora nativa).
|
|
2963
|
+
*/
|
|
2964
|
+
interface BreadcrumbItem {
|
|
2965
|
+
label: string;
|
|
2966
|
+
/** Rota Angular (`routerLink`) quando o segmento é navegável dentro da app. */
|
|
2967
|
+
route?: string | readonly unknown[];
|
|
2968
|
+
/**
|
|
2969
|
+
* URL quando não se usa o router (ex.: link externo). Ignorado se `route` estiver definido.
|
|
2970
|
+
*/
|
|
2971
|
+
href?: string;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
/**
|
|
2975
|
+
* Filo hierárquico com `nav` + lista ordenada; último segmento com `aria-current="page"`.
|
|
2976
|
+
*/
|
|
2977
|
+
declare class AppBreadcrumbComponent {
|
|
2978
|
+
items: readonly BreadcrumbItem[];
|
|
2979
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppBreadcrumbComponent, never>;
|
|
2980
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, { "items": { "alias": "items"; "required": true; }; }, {}, never, never, true, never>;
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseButtonComponent, BaseButtonType, BaseButtonVariant, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormRowAlign, FormRowComponent, FormRowGap, FormRowJustify, FormSectionComponent, FormTabComponent, FormTabsComponent, InputMaskFieldComponent, IntegerFieldComponent, LayoutStackAlign, LayoutStackComponent, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fixedDigitsMaskCompleteValidator, formatDateTimePtBr, formatDecimalBr, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
2984
|
+
export type { AdaptiveDataViewMode, AppThemeId, AppThemeOption, BreadcrumbItem, CardItemView, CardListDataMode, CardListMapFn, ConfirmDialogData, ConfirmDialogVariant, DataGridColumn, DataGridPaginationChangeEvent, DetailsViewItem, DropdownListBindings, DropdownSearchPageRequested, FieldCommonInputs, FormTabsVariant, LoadingDialogData, MenuItemAction, MenuItemDivider, MenuItemGroup, MenuItemKind, MenuItemSubmenu, MenuLeafItem, MenuNodeItem, SelectPageRequested, SkeletonFieldShellVariant, StatCardDeltaTone, StatusBadgeSize, StatusBadgeVariant, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };
|