structra-ui 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/structra-ui.mjs +418 -246
- package/fesm2022/structra-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/structra-ui.d.ts +96 -22
package/package.json
CHANGED
package/types/structra-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectorRef, Injector, DestroyRef, EventEmitter, OnChanges, OnInit, SimpleChanges, DoCheck, TemplateRef, OnDestroy, AfterContentInit, QueryList,
|
|
2
|
+
import { ChangeDetectorRef, Injector, DestroyRef, EventEmitter, OnChanges, OnInit, SimpleChanges, DoCheck, AfterViewInit, TemplateRef, OnDestroy, AfterContentInit, QueryList, Signal, ElementRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, AbstractControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
4
4
|
import { MatDatepicker } from '@angular/material/datepicker';
|
|
5
5
|
import * as _angular_cdk_overlay from '@angular/cdk/overlay';
|
|
@@ -13,6 +13,25 @@ import { Observable } from 'rxjs';
|
|
|
13
13
|
/** Marcador de pacote publicado como `structra-ui`. */
|
|
14
14
|
declare const STRUCTRA_UI: "structra-ui";
|
|
15
15
|
|
|
16
|
+
type AlertType = 'error' | 'success' | 'warning' | 'info';
|
|
17
|
+
/**
|
|
18
|
+
* Feedback visual inline (erro, sucesso, aviso, informação). Reutiliza tokens semânticos da lib.
|
|
19
|
+
*/
|
|
20
|
+
declare class AlertComponent {
|
|
21
|
+
type: AlertType;
|
|
22
|
+
message: string;
|
|
23
|
+
closable: boolean;
|
|
24
|
+
/** Quando `closable`, o alerta deixa de renderizar após fechar. */
|
|
25
|
+
protected readonly visible: i0.WritableSignal<boolean>;
|
|
26
|
+
protected get hasMessage(): boolean;
|
|
27
|
+
private readonly modifierByType;
|
|
28
|
+
protected get alertHostClass(): string;
|
|
29
|
+
protected onClose(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "app-alert", never, { "type": { "alias": "type"; "required": false; }; "message": { "alias": "message"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
32
|
+
static ngAcceptInputType_closable: unknown;
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
declare const ButtonVariant: {
|
|
17
36
|
readonly Primary: "primary";
|
|
18
37
|
readonly Secondary: "secondary";
|
|
@@ -81,8 +100,10 @@ declare class BaseButtonComponent {
|
|
|
81
100
|
size: ButtonSize;
|
|
82
101
|
/** Arredondamento semântico do botão (design system). */
|
|
83
102
|
radius: ButtonRadius;
|
|
84
|
-
/**
|
|
103
|
+
/** Carregamento: spinner + `disabled` nativo + `aria-busy`; o rótulo projectado mantém-se visível. */
|
|
85
104
|
loading: boolean;
|
|
105
|
+
/** `disabled` efectivo do `<button>` (inclui `readonly` e `loading`). */
|
|
106
|
+
get isDisabled(): boolean;
|
|
86
107
|
/** Estilo visual base; pode ser estendido no SCSS do projeto. */
|
|
87
108
|
variant: ButtonVariant;
|
|
88
109
|
/** Alias de {@link variant} (nome comum em design systems). */
|
|
@@ -175,6 +196,11 @@ declare abstract class BaseFieldDirective<T> implements ControlValueAccessor {
|
|
|
175
196
|
errorMessage: string;
|
|
176
197
|
/** Se `true`, exibe o parágrafo de erro; por defeito `false` (só estado inválido na borda/label). */
|
|
177
198
|
showErrorMessage: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Com campo inválido, aplica fundo semântico de erro (`--ui-field-invalid-input-bg`).
|
|
201
|
+
* Por defeito `false`: fundo igual ao válido (normal ou só leitura); só borda/foco/prefixo denunciam erro.
|
|
202
|
+
*/
|
|
203
|
+
invalidThemed: boolean;
|
|
178
204
|
required: boolean;
|
|
179
205
|
/** Se `true` e `required`, exibe o asterisco no label (`BaseFieldComponent`); por defeito `false`. */
|
|
180
206
|
showRequiredMark: boolean;
|
|
@@ -194,6 +220,11 @@ declare abstract class BaseFieldDirective<T> implements ControlValueAccessor {
|
|
|
194
220
|
autocomplete: boolean;
|
|
195
221
|
/** Placeholder de carregamento no `app-base-field` (skeleton). */
|
|
196
222
|
loading: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Se `true`, foca o controlo nativo após a vista estar montada (ignora se `disabled`, `readonly` ou `loading`).
|
|
225
|
+
* Por defeito `false`.
|
|
226
|
+
*/
|
|
227
|
+
autofocus: boolean;
|
|
197
228
|
/**
|
|
198
229
|
* Mostra botão «…» no sufixo que abre menu de ações (dropdown com os itens em {@link contextMenuItems}).
|
|
199
230
|
* Por defeito `false`.
|
|
@@ -252,10 +283,16 @@ declare abstract class BaseFieldDirective<T> implements ControlValueAccessor {
|
|
|
252
283
|
setDisabledState(isDisabled: boolean): void;
|
|
253
284
|
protected emitModelValue(value: T | null): void;
|
|
254
285
|
protected notifyTouched(): void;
|
|
286
|
+
/**
|
|
287
|
+
* Chamado em `ngAfterViewInit` dos campos concretos com o elemento focável (input, textarea, combobox, etc.).
|
|
288
|
+
*/
|
|
289
|
+
protected applyAutofocusIfNeeded(resolve: () => HTMLElement | null | undefined): void;
|
|
255
290
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFieldDirective<any>, never>;
|
|
256
|
-
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>;
|
|
291
|
+
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; }; "invalidThemed": { "alias": "invalidThemed"; "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; }; "autofocus": { "alias": "autofocus"; "required": false; }; "mostrarMenuContexto": { "alias": "mostrarMenuContexto"; "required": false; }; "contextMenuItems": { "alias": "contextMenuItems"; "required": false; }; "contextMenuId": { "alias": "contextMenuId"; "required": false; }; }, { "contextMenuSelect": "contextMenuSelect"; }, never, never, true, never>;
|
|
292
|
+
static ngAcceptInputType_invalidThemed: unknown;
|
|
257
293
|
static ngAcceptInputType_autocomplete: unknown;
|
|
258
294
|
static ngAcceptInputType_loading: unknown;
|
|
295
|
+
static ngAcceptInputType_autofocus: unknown;
|
|
259
296
|
static ngAcceptInputType_mostrarMenuContexto: unknown;
|
|
260
297
|
}
|
|
261
298
|
|
|
@@ -334,14 +371,14 @@ declare class SkeletonTableComponent {
|
|
|
334
371
|
static ngAcceptInputType_animate: unknown;
|
|
335
372
|
}
|
|
336
373
|
|
|
337
|
-
/**
|
|
338
|
-
type SkeletonFieldShellVariant = 'text' | 'select';
|
|
374
|
+
/** Layout do placeholder no `app-base-field` quando `loading` é `true`. */
|
|
375
|
+
type SkeletonFieldShellVariant = 'text' | 'select' | 'textarea';
|
|
339
376
|
/**
|
|
340
377
|
* Placeholder de campo: barra de valor e, opcionalmente, quadrado à esquerda quando não há
|
|
341
378
|
* ícone Font Awesome na coluna de prefixo do `app-base-field`.
|
|
342
379
|
*/
|
|
343
380
|
declare class SkeletonFieldShellComponent {
|
|
344
|
-
/**
|
|
381
|
+
/** `textarea`: várias barras (multilinha); restantes: uma barra estreita ao estilo «valor». */
|
|
345
382
|
variant: SkeletonFieldShellVariant;
|
|
346
383
|
animate: boolean;
|
|
347
384
|
/**
|
|
@@ -366,6 +403,8 @@ declare class BaseFieldComponent implements OnChanges, OnInit {
|
|
|
366
403
|
/** Asterisco visual do obrigatório no label (validação HTML `required` inalterada); por defeito `false`. */
|
|
367
404
|
showRequiredMark: boolean;
|
|
368
405
|
invalid: boolean;
|
|
406
|
+
/** Fundo semântico de erro no involúcro; só com `invalid` + este `true`. */
|
|
407
|
+
invalidThemed: boolean;
|
|
369
408
|
filled: boolean;
|
|
370
409
|
disabled: boolean;
|
|
371
410
|
readonly: boolean;
|
|
@@ -407,7 +446,8 @@ declare class BaseFieldComponent implements OnChanges, OnInit {
|
|
|
407
446
|
onClearClick(): void;
|
|
408
447
|
onContextMenuItemSelect(id: string): void;
|
|
409
448
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFieldComponent, never>;
|
|
410
|
-
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>;
|
|
449
|
+
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; }; "invalidThemed": { "alias": "invalidThemed"; "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>;
|
|
450
|
+
static ngAcceptInputType_invalidThemed: unknown;
|
|
411
451
|
static ngAcceptInputType_loading: unknown;
|
|
412
452
|
static ngAcceptInputType_mostrarMenuContexto: unknown;
|
|
413
453
|
}
|
|
@@ -452,12 +492,14 @@ declare abstract class NgControlFieldDirective<T> extends BaseFieldDirective<T>
|
|
|
452
492
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlFieldDirective<any>, never, never, {}, {}, never, never, true, never>;
|
|
453
493
|
}
|
|
454
494
|
|
|
455
|
-
declare class TextFieldComponent extends NgControlFieldDirective<string | null> {
|
|
495
|
+
declare class TextFieldComponent extends NgControlFieldDirective<string | null> implements AfterViewInit {
|
|
496
|
+
private readonly nativeInputRef?;
|
|
456
497
|
/** Limite de caracteres no valor do campo. */
|
|
457
498
|
maxLength: number;
|
|
458
499
|
inputText: string;
|
|
459
500
|
filledUi: boolean;
|
|
460
501
|
private refreshFilledUi;
|
|
502
|
+
ngAfterViewInit(): void;
|
|
461
503
|
protected afterWriteValue(value: string | null): void;
|
|
462
504
|
onNativeInput(event: Event): void;
|
|
463
505
|
onBlur(): void;
|
|
@@ -467,7 +509,8 @@ declare class TextFieldComponent extends NgControlFieldDirective<string | null>
|
|
|
467
509
|
static ngAcceptInputType_maxLength: unknown;
|
|
468
510
|
}
|
|
469
511
|
|
|
470
|
-
declare class PasswordFieldComponent extends NgControlFieldDirective<string | null> implements OnInit {
|
|
512
|
+
declare class PasswordFieldComponent extends NgControlFieldDirective<string | null> implements AfterViewInit, OnInit {
|
|
513
|
+
private readonly nativeInputRef?;
|
|
471
514
|
/** Password já nasce com ícone de chave no prefixo; pode ser sobrescrito via `prefixIcon`. */
|
|
472
515
|
showPrefixIcon: boolean;
|
|
473
516
|
prefixIcon: string;
|
|
@@ -488,6 +531,7 @@ declare class PasswordFieldComponent extends NgControlFieldDirective<string | nu
|
|
|
488
531
|
toggleAriaLabelUi: string;
|
|
489
532
|
toggleIconClassUi: string;
|
|
490
533
|
ngOnInit(): void;
|
|
534
|
+
ngAfterViewInit(): void;
|
|
491
535
|
private refreshFilledUi;
|
|
492
536
|
private refreshPasswordToggleUi;
|
|
493
537
|
protected afterWriteValue(value: string | null): void;
|
|
@@ -502,7 +546,8 @@ declare class PasswordFieldComponent extends NgControlFieldDirective<string | nu
|
|
|
502
546
|
static ngAcceptInputType_maxLength: unknown;
|
|
503
547
|
}
|
|
504
548
|
|
|
505
|
-
declare class TextareaFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges, OnInit {
|
|
549
|
+
declare class TextareaFieldComponent extends NgControlFieldDirective<string | null> implements AfterViewInit, OnChanges, OnInit {
|
|
550
|
+
private readonly nativeInputRef?;
|
|
506
551
|
get hostInvalidClass(): boolean;
|
|
507
552
|
/** Limite de caracteres no valor do campo. `0` = sem limite explícito no DOM. */
|
|
508
553
|
maxLength: number;
|
|
@@ -517,6 +562,7 @@ declare class TextareaFieldComponent extends NgControlFieldDirective<string | nu
|
|
|
517
562
|
/** Altura CSS (evita getter chamado a cada CD). */
|
|
518
563
|
textareaMaxHeightCss: string;
|
|
519
564
|
ngOnInit(): void;
|
|
565
|
+
ngAfterViewInit(): void;
|
|
520
566
|
ngOnChanges(changes: SimpleChanges): void;
|
|
521
567
|
private updateTextareaHeight;
|
|
522
568
|
private refreshFilledUi;
|
|
@@ -531,11 +577,13 @@ declare class TextareaFieldComponent extends NgControlFieldDirective<string | nu
|
|
|
531
577
|
static ngAcceptInputType_maxResizeRows: unknown;
|
|
532
578
|
}
|
|
533
579
|
|
|
534
|
-
declare class IntegerFieldComponent extends NgControlFieldDirective<number | null> {
|
|
580
|
+
declare class IntegerFieldComponent extends NgControlFieldDirective<number | null> implements AfterViewInit {
|
|
581
|
+
private readonly nativeInputRef?;
|
|
535
582
|
/** Valor máximo permitido (inclusive). */
|
|
536
583
|
max: number;
|
|
537
584
|
inputText: string;
|
|
538
585
|
filledUi: boolean;
|
|
586
|
+
ngAfterViewInit(): void;
|
|
539
587
|
private refreshFilledUi;
|
|
540
588
|
protected afterWriteValue(value: number | null): void;
|
|
541
589
|
onBeforeInput(event: Event): void;
|
|
@@ -547,11 +595,13 @@ declare class IntegerFieldComponent extends NgControlFieldDirective<number | nul
|
|
|
547
595
|
static ngAcceptInputType_max: unknown;
|
|
548
596
|
}
|
|
549
597
|
|
|
550
|
-
declare class DecimalFieldComponent extends NgControlFieldDirective<number | null> {
|
|
598
|
+
declare class DecimalFieldComponent extends NgControlFieldDirective<number | null> implements AfterViewInit {
|
|
599
|
+
private readonly nativeInputRef?;
|
|
551
600
|
/** Valor máximo permitido (inclusive), com até 2 casas decimais. */
|
|
552
601
|
max: number;
|
|
553
602
|
inputText: string;
|
|
554
603
|
filledUi: boolean;
|
|
604
|
+
ngAfterViewInit(): void;
|
|
555
605
|
private refreshFilledUi;
|
|
556
606
|
protected afterWriteValue(value: number | null): void;
|
|
557
607
|
onBeforeInput(event: Event): void;
|
|
@@ -563,7 +613,8 @@ declare class DecimalFieldComponent extends NgControlFieldDirective<number | nul
|
|
|
563
613
|
static ngAcceptInputType_max: unknown;
|
|
564
614
|
}
|
|
565
615
|
|
|
566
|
-
declare class DateFieldComponent extends NgControlFieldDirective<string | null> implements OnChanges {
|
|
616
|
+
declare class DateFieldComponent extends NgControlFieldDirective<string | null> implements AfterViewInit, OnChanges {
|
|
617
|
+
private readonly nativeInputRef?;
|
|
567
618
|
picker?: MatDatepicker<Date>;
|
|
568
619
|
/**
|
|
569
620
|
* Se `true`, a formatação inclui hh:mm (24h) e, ao escolher no calendário,
|
|
@@ -584,6 +635,7 @@ declare class DateFieldComponent extends NgControlFieldDirective<string | null>
|
|
|
584
635
|
onGhostInputKeydown(ev: KeyboardEvent): void;
|
|
585
636
|
onPickedDate(next: Date | null): void;
|
|
586
637
|
onBlur(): void;
|
|
638
|
+
ngAfterViewInit(): void;
|
|
587
639
|
onClear(): void;
|
|
588
640
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateFieldComponent, never>;
|
|
589
641
|
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>;
|
|
@@ -593,7 +645,8 @@ declare class DateFieldComponent extends NgControlFieldDirective<string | null>
|
|
|
593
645
|
/**
|
|
594
646
|
* Campo de texto com máscara visual; valor do modelo = **apenas dígitos** (string), sem máscara.
|
|
595
647
|
*/
|
|
596
|
-
declare abstract class MaskedTextFieldBase extends NgControlFieldDirective<string | null> {
|
|
648
|
+
declare abstract class MaskedTextFieldBase extends NgControlFieldDirective<string | null> implements AfterViewInit {
|
|
649
|
+
private readonly nativeInputRef?;
|
|
597
650
|
/** Padrão com `#` para cada dígito (ex.: `#####-###`). Subclasses podem sobrescrever {@link pattern}. */
|
|
598
651
|
maskPattern: string;
|
|
599
652
|
inputText: string;
|
|
@@ -601,6 +654,7 @@ declare abstract class MaskedTextFieldBase extends NgControlFieldDirective<strin
|
|
|
601
654
|
filledUi: boolean;
|
|
602
655
|
/** Padrão efetivo (permite CEP/telefone fixarem máscaras em subclasses). */
|
|
603
656
|
protected get pattern(): string;
|
|
657
|
+
ngAfterViewInit(): void;
|
|
604
658
|
/**
|
|
605
659
|
* Padrão de formatação para o valor digitado (só dígitos).
|
|
606
660
|
* Sobrescrever para máscara dinâmica (ex.: CPF até 11 dígitos, CNPJ depois).
|
|
@@ -752,6 +806,8 @@ interface FieldCommonInputs {
|
|
|
752
806
|
autocomplete?: boolean;
|
|
753
807
|
/** Skeleton no `app-base-field` enquanto dados externos carregam. */
|
|
754
808
|
loading?: boolean;
|
|
809
|
+
/** Foco inicial no controlo nativo; padrão `false`. */
|
|
810
|
+
autofocus?: boolean;
|
|
755
811
|
/** Botão «…» no sufixo com menu de ações; padrão `false` na `BaseFieldDirective`. */
|
|
756
812
|
mostrarMenuContexto?: boolean;
|
|
757
813
|
/** Itens do menu do sufixo; só mostra o botão se a lista tiver entradas. */
|
|
@@ -927,10 +983,12 @@ declare abstract class BooleanFieldDirective extends BaseFieldDirective<boolean
|
|
|
927
983
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanFieldDirective, never, never, { "showErrorMessage": { "alias": "showErrorMessage"; "required": false; }; }, {}, never, never, true, never>;
|
|
928
984
|
}
|
|
929
985
|
|
|
930
|
-
declare class CheckboxFieldComponent extends BooleanFieldDirective {
|
|
986
|
+
declare class CheckboxFieldComponent extends BooleanFieldDirective implements AfterViewInit {
|
|
987
|
+
private readonly nativeInputRef?;
|
|
931
988
|
/** `false` (padrão): host usa largura intrínseca. Com `true`, ocupa 100%. */
|
|
932
989
|
fullWidth: boolean;
|
|
933
990
|
get fullWidthClass(): boolean;
|
|
991
|
+
ngAfterViewInit(): void;
|
|
934
992
|
onCheckboxClick(ev: MouseEvent): void;
|
|
935
993
|
onNativeChange(event: Event): void;
|
|
936
994
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
|
|
@@ -938,8 +996,10 @@ declare class CheckboxFieldComponent extends BooleanFieldDirective {
|
|
|
938
996
|
static ngAcceptInputType_fullWidth: unknown;
|
|
939
997
|
}
|
|
940
998
|
|
|
941
|
-
declare class SwitchFieldComponent extends BooleanFieldDirective {
|
|
999
|
+
declare class SwitchFieldComponent extends BooleanFieldDirective implements AfterViewInit {
|
|
1000
|
+
private readonly nativeInputRef?;
|
|
942
1001
|
get labelId(): string;
|
|
1002
|
+
ngAfterViewInit(): void;
|
|
943
1003
|
toggle(): void;
|
|
944
1004
|
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchFieldComponent, never>;
|
|
945
1005
|
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchFieldComponent, "app-switch-field", never, {}, {}, never, never, true, never>;
|
|
@@ -1094,7 +1154,7 @@ interface SelectPageRequested {
|
|
|
1094
1154
|
pageSize: number;
|
|
1095
1155
|
}
|
|
1096
1156
|
|
|
1097
|
-
declare class SelectFieldComponent extends DropdownOptionFieldBase implements OnDestroy, OnChanges {
|
|
1157
|
+
declare class SelectFieldComponent extends DropdownOptionFieldBase implements AfterViewInit, OnDestroy, OnChanges {
|
|
1098
1158
|
private readonly hostRef;
|
|
1099
1159
|
get hostInvalidClass(): boolean;
|
|
1100
1160
|
pagination: boolean;
|
|
@@ -1106,9 +1166,11 @@ declare class SelectFieldComponent extends DropdownOptionFieldBase implements On
|
|
|
1106
1166
|
readonly pageRequested: EventEmitter<SelectPageRequested>;
|
|
1107
1167
|
optionsPanelTpl: TemplateRef<unknown>;
|
|
1108
1168
|
private readonly dropdownTriggerRootRef;
|
|
1169
|
+
private readonly nativeInputRef?;
|
|
1109
1170
|
panelOpen: boolean;
|
|
1110
1171
|
panelOverlayWidth: number;
|
|
1111
1172
|
private scrollLoadTimer;
|
|
1173
|
+
ngAfterViewInit(): void;
|
|
1112
1174
|
protected afterWriteValue(value: unknown | null): void;
|
|
1113
1175
|
get displayValue(): string;
|
|
1114
1176
|
get optionsListId(): string;
|
|
@@ -1144,7 +1206,7 @@ declare class SelectFieldComponent extends DropdownOptionFieldBase implements On
|
|
|
1144
1206
|
static ngAcceptInputType_pageSize: unknown;
|
|
1145
1207
|
}
|
|
1146
1208
|
|
|
1147
|
-
declare class MultiselectFieldComponent extends DropdownMultiOptionFieldBase implements OnDestroy, OnChanges {
|
|
1209
|
+
declare class MultiselectFieldComponent extends DropdownMultiOptionFieldBase implements AfterViewInit, OnDestroy, OnChanges {
|
|
1148
1210
|
private readonly hostRef;
|
|
1149
1211
|
get hostInvalidClass(): boolean;
|
|
1150
1212
|
/** Por omissão `true`: mesmo padrão do select com lista longa (`pageRequested` + scroll). */
|
|
@@ -1157,9 +1219,11 @@ declare class MultiselectFieldComponent extends DropdownMultiOptionFieldBase imp
|
|
|
1157
1219
|
readonly pageRequested: EventEmitter<SelectPageRequested>;
|
|
1158
1220
|
optionsPanelTpl: TemplateRef<unknown>;
|
|
1159
1221
|
private readonly dropdownTriggerRootRef;
|
|
1222
|
+
private readonly nativeInputRef?;
|
|
1160
1223
|
panelOpen: boolean;
|
|
1161
1224
|
panelOverlayWidth: number;
|
|
1162
1225
|
private scrollLoadTimer;
|
|
1226
|
+
ngAfterViewInit(): void;
|
|
1163
1227
|
writeValue(value: unknown[] | null): void;
|
|
1164
1228
|
protected afterWriteValue(_value: unknown[]): void;
|
|
1165
1229
|
/** Texto numa linha: rótulos separados por vírgula + ellipsis no CSS. */
|
|
@@ -1215,12 +1279,14 @@ declare class DropdownSearchFieldComponent extends DropdownOptionFieldBase imple
|
|
|
1215
1279
|
readonly pageRequested: EventEmitter<DropdownSearchPageRequested>;
|
|
1216
1280
|
optionsPanelTpl: TemplateRef<unknown>;
|
|
1217
1281
|
private readonly dropdownTriggerRootRef;
|
|
1282
|
+
private readonly nativeInputRef?;
|
|
1218
1283
|
searchQuery: string;
|
|
1219
1284
|
committedQuery: string;
|
|
1220
1285
|
panelOpen: boolean;
|
|
1221
1286
|
panelOverlayWidth: number;
|
|
1222
1287
|
private scrollLoadTimer;
|
|
1223
1288
|
private searchDebounceTimer;
|
|
1289
|
+
ngAfterViewInit(): void;
|
|
1224
1290
|
protected afterWriteValue(value: unknown | null): void;
|
|
1225
1291
|
get displayValue(): string;
|
|
1226
1292
|
get optionsListId(): string;
|
|
@@ -1289,7 +1355,7 @@ interface DropdownListBindings<T = unknown> {
|
|
|
1289
1355
|
compareWith: (a: unknown, b: unknown) => boolean;
|
|
1290
1356
|
}
|
|
1291
1357
|
|
|
1292
|
-
declare class FileUploadFieldComponent implements OnChanges, OnDestroy {
|
|
1358
|
+
declare class FileUploadFieldComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
1293
1359
|
private readonly cdr;
|
|
1294
1360
|
private readonly confirmDialog;
|
|
1295
1361
|
label?: string | undefined;
|
|
@@ -1305,6 +1371,10 @@ declare class FileUploadFieldComponent implements OnChanges, OnDestroy {
|
|
|
1305
1371
|
*/
|
|
1306
1372
|
maxFiles: number;
|
|
1307
1373
|
disabled: boolean;
|
|
1374
|
+
/** Skeleton na zona de drop (sem interação até voltar a `false`). */
|
|
1375
|
+
loading: boolean;
|
|
1376
|
+
/** Foca o `<input type="file">` nativo quando a zona está visível (não em `loading`). */
|
|
1377
|
+
autofocus: boolean;
|
|
1308
1378
|
multiple: boolean;
|
|
1309
1379
|
value: File | File[] | null;
|
|
1310
1380
|
/**
|
|
@@ -1329,6 +1399,8 @@ declare class FileUploadFieldComponent implements OnChanges, OnDestroy {
|
|
|
1329
1399
|
private fileInputRef?;
|
|
1330
1400
|
private readonly autoId;
|
|
1331
1401
|
get fieldId(): string;
|
|
1402
|
+
get loadingAriaLabel(): string;
|
|
1403
|
+
ngAfterViewInit(): void;
|
|
1332
1404
|
get hostDataControlId(): string;
|
|
1333
1405
|
isDragging: boolean;
|
|
1334
1406
|
hasHover: boolean;
|
|
@@ -1380,10 +1452,12 @@ declare class FileUploadFieldComponent implements OnChanges, OnDestroy {
|
|
|
1380
1452
|
private syncFilePreviewObjectUrls;
|
|
1381
1453
|
private releaseAllFilePreviewObjectUrls;
|
|
1382
1454
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadFieldComponent, never>;
|
|
1383
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadFieldComponent, "app-file-upload-field", never, { "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "acceptLabel": { "alias": "acceptLabel"; "required": false; }; "maxSizeMb": { "alias": "maxSizeMb"; "required": false; }; "maxFiles": { "alias": "maxFiles"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "fileItemRowClickable": { "alias": "fileItemRowClickable"; "required": false; }; "showFileDownload": { "alias": "showFileDownload"; "required": false; }; }, { "valueChange": "valueChange"; "fileRejected": "fileRejected"; "fileItemClick": "fileItemClick"; }, never, never, true, never>;
|
|
1455
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadFieldComponent, "app-file-upload-field", never, { "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "acceptLabel": { "alias": "acceptLabel"; "required": false; }; "maxSizeMb": { "alias": "maxSizeMb"; "required": false; }; "maxFiles": { "alias": "maxFiles"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "fileItemRowClickable": { "alias": "fileItemRowClickable"; "required": false; }; "showFileDownload": { "alias": "showFileDownload"; "required": false; }; }, { "valueChange": "valueChange"; "fileRejected": "fileRejected"; "fileItemClick": "fileItemClick"; }, never, never, true, never>;
|
|
1384
1456
|
static ngAcceptInputType_maxSizeMb: unknown;
|
|
1385
1457
|
static ngAcceptInputType_maxFiles: unknown;
|
|
1386
1458
|
static ngAcceptInputType_disabled: unknown;
|
|
1459
|
+
static ngAcceptInputType_loading: unknown;
|
|
1460
|
+
static ngAcceptInputType_autofocus: unknown;
|
|
1387
1461
|
static ngAcceptInputType_multiple: unknown;
|
|
1388
1462
|
static ngAcceptInputType_fileItemRowClickable: unknown;
|
|
1389
1463
|
}
|
|
@@ -3446,5 +3520,5 @@ declare class AppBreadcrumbComponent {
|
|
|
3446
3520
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppBreadcrumbComponent, "app-breadcrumb", never, { "items": { "alias": "items"; "required": true; }; }, {}, never, never, true, never>;
|
|
3447
3521
|
}
|
|
3448
3522
|
|
|
3449
|
-
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_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
3450
|
-
export type { AdaptiveDataViewMode, AppThemeId, AppThemeOption, BreadcrumbItem, CardItemView, CardListDataMode, CardListMapFn, ConfirmDialogData, ConfirmDialogVariant, DataGridColumn, DataGridPaginationChangeEvent, DetailsViewItem, DropdownListBindings, DropdownSearchPageRequested, FieldCommonInputs, FilePreviewKind, FormTabsVariant, LoadingDialogData, MenuItemAction, MenuItemDivider, MenuItemGroup, MenuItemKind, MenuItemSubmenu, MenuLeafItem, MenuNodeItem, SelectPageRequested, SkeletonFieldShellVariant, StatCardDeltaTone, StatusBadgeSize, StatusBadgeVariant, StructraTheme, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };
|
|
3523
|
+
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_BASE_CLASS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AlertComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonRadius, ButtonSize, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DividerComponent, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionAlign, FormSectionComponent, FormSectionRadius, FormSectionVariant, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_THEME_IDS, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ThemeDirective, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, getThemeClass, getThemeClassList, getThemeTokenClass, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, normalizeStructraTheme, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
3524
|
+
export type { AdaptiveDataViewMode, AlertType, AppThemeId, AppThemeOption, BreadcrumbItem, CardItemView, CardListDataMode, CardListMapFn, ConfirmDialogData, ConfirmDialogVariant, DataGridColumn, DataGridPaginationChangeEvent, DetailsViewItem, DropdownListBindings, DropdownSearchPageRequested, FieldCommonInputs, FilePreviewKind, FormTabsVariant, LoadingDialogData, MenuItemAction, MenuItemDivider, MenuItemGroup, MenuItemKind, MenuItemSubmenu, MenuLeafItem, MenuNodeItem, SelectPageRequested, SkeletonFieldShellVariant, StatCardDeltaTone, StatusBadgeSize, StatusBadgeVariant, StructraTheme, ToastInstance, ToastShowOptions, ToastType, ToastVerticalPosition, UiSelectOption, ValidationSummaryItem, ValidationSummaryVariant };
|