@po-ui/ng-components 21.2.0 → 21.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/fesm2022/po-ui-ng-components.mjs +18287 -16838
  2. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  3. package/lib/components/po-avatar/po-avatar-base.component.d.ts +1 -0
  4. package/lib/components/po-calendar/po-calendar-base.component.d.ts +126 -30
  5. package/lib/components/po-calendar/po-calendar-header/po-calendar-header.component.d.ts +24 -3
  6. package/lib/components/po-calendar/po-calendar-mode.enum.d.ts +2 -2
  7. package/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.d.ts +92 -32
  8. package/lib/components/po-calendar/po-calendar.component.d.ts +3 -0
  9. package/lib/components/po-calendar/services/po-calendar.lang.service.d.ts +11 -0
  10. package/lib/components/po-calendar/services/po-calendar.service.d.ts +5 -0
  11. package/lib/components/po-field/index.d.ts +1 -0
  12. package/lib/components/po-field/po-clean/po-clean-base.component.d.ts +1 -0
  13. package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +20 -5
  14. package/lib/components/po-field/po-combo/po-combo.module.d.ts +2 -0
  15. package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +13 -0
  16. package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +8 -2
  17. package/lib/components/po-field/po-datepicker/po-datepicker.literals.d.ts +4 -0
  18. package/lib/components/po-field/po-datepicker-range/interfaces/po-datepicker-range-literals.interface.d.ts +8 -0
  19. package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +23 -0
  20. package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +11 -2
  21. package/lib/components/po-field/po-input/po-input-base.component.d.ts +11 -10
  22. package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +13 -0
  23. package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +13 -0
  24. package/lib/components/po-field/po-select/po-select.component.d.ts +13 -0
  25. package/lib/components/po-field/po-switch/po-switch.component.d.ts +13 -0
  26. package/lib/components/po-search/po-search-base.component.d.ts +18 -1
  27. package/lib/components/po-table/po-table-base.component.d.ts +1 -0
  28. package/lib/components/po-table/po-table.component.d.ts +2 -2
  29. package/lib/components/po-widget/index.d.ts +1 -0
  30. package/lib/components/po-widget/interfaces/po-widget-avatar.interface.d.ts +56 -0
  31. package/lib/components/po-widget/po-widget-base.component.d.ts +30 -3
  32. package/lib/components/po-widget/po-widget.component.d.ts +6 -2
  33. package/lib/utils/design-tokens.d.ts +17 -0
  34. package/lib/utils/util.d.ts +16 -0
  35. package/package.json +4 -4
  36. package/po-ui-ng-components-21.4.0.tgz +0 -0
  37. package/schematics/ng-add/index.js +1 -1
  38. package/schematics/ng-update/v14/index.js +1 -1
  39. package/schematics/ng-update/v15/index.js +1 -1
  40. package/schematics/ng-update/v16/index.js +1 -1
  41. package/schematics/ng-update/v17/index.js +1 -1
  42. package/schematics/ng-update/v18/index.js +2 -2
  43. package/schematics/ng-update/v19/index.js +2 -2
  44. package/schematics/ng-update/v2/index.js +1 -1
  45. package/schematics/ng-update/v20/index.js +2 -2
  46. package/schematics/ng-update/v21/index.js +1 -1
  47. package/schematics/ng-update/v3/index.js +1 -1
  48. package/schematics/ng-update/v4/index.js +1 -1
  49. package/schematics/ng-update/v5/index.js +1 -1
  50. package/schematics/ng-update/v6/index.js +1 -1
  51. package/types/po-ui-ng-components.d.ts +6695 -6251
  52. package/po-ui-ng-components-21.2.0.tgz +0 -0
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ export declare const validateAvatarSize: (value: string) => string;
2
3
  /**
3
4
  * @description
4
5
  *
@@ -1,47 +1,122 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, TemplateRef } from '@angular/core';
2
2
  import { PoDateService } from '../../services/po-date';
3
3
  import { PoLanguageService } from '../../services/po-language/po-language.service';
4
4
  import { PoCalendarMode } from './po-calendar-mode.enum';
5
5
  /**
6
6
  * @description
7
7
  *
8
- * O `po-calendar` é um componente para seleção de datas. Ele permite uma fácil navegação clicando nas setas
9
- * de direcionamento e nos *labels* do ano ou mês.
8
+ * O `po-calendar` é um componente para seleção de datas que permite a navegação entre meses por meio das setas direcionais
9
+ * e dos seletores de mês e ano exibidos no cabeçalho.
10
+ *
11
+ * O componente é recomendado para casos de seleção de datas próximas ao tempo presente. Por padrão, apresenta os dados do
12
+ * mês atual e apenas um mês por vez, podendo exibir uma data pré-estabelecida conforme o contexto.
10
13
  *
11
14
  * Este componente pode receber os seguintes formatos de data:
12
15
  *
13
- * - **Data e hora combinados (E8601DZw): yyyy-mm-ddThh:mm:ss+|-hh:mm**
14
- * ```
15
- * this.date = '2017-11-28T00:00:00-02:00';
16
- * ```
16
+ * | Formato | Exemplo |
17
+ * |--------------------------|-----------------------------|
18
+ * | `ISO 8601 (Data/Hora)` | `2017-11-28T00:00:00-02:00` |
19
+ * | `ISO 8601 (Data)` | `2017-11-28` |
20
+ * | `JavaScript Date Object` | `new Date(2017, 10, 28)` |
21
+ * > O valor é tratado internamente como **yyyy-mm-dd**.
22
+ *
23
+ * **Importante:**
24
+ * - Datas fora do intervalo (`p-min-date` / `p-max-date`) aparecem desabilitadas sem alterar o *model*.
25
+ *
26
+ * #### Boas práticas
27
+ *
28
+ * - Evite datas distantes: O uso do calendário não é recomendado para datas muito distantes (como data de nascimento), pois
29
+ * exige excesso de cliques. Nesses casos, prefira um campo de texto para digitação.
30
+ * - Impeça seleções ilógicas: Utilize as propriedades de limite para impedir que o usuário selecione períodos inválidos (ex:
31
+ * data de retorno anterior à de partida).
32
+ * - Sinalize a disponibilidade: Para datas que não podem ser selecionadas devido a um contexto específico, mantenha-as
33
+ * inativas por meio de opacidade e desabilite a opção de clique.
34
+ * - Contexto claro: Certifique-se de que o mês e o ano estejam sempre visíveis no cabeçalho para orientar a pessoa usuária
35
+ * durante a navegação.
17
36
  *
18
- * - **Data (E8601DAw.): yyyy-mm-dd**
19
- * ```
20
- * this.date = '2017-11-28';
21
- * ```
37
+ * #### Acessibilidade tratada no componente
22
38
  *
23
- * - **JavaScript Date Object:**
24
- * ```
25
- * this.date = new Date(2017, 10, 28);
26
- * ```
39
+ * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas pelo
40
+ * proprietário do conteúdo. São elas:
27
41
  *
28
- * > Independentemente do formato utilizado, o componente trata o valor do *model* internamente com o
29
- * formato **Data (E8601DAw.): yyyy-mm-dd**.
42
+ * - Navegação por teclado: O componente permite interação via tecla Tab entre os controles do cabeçalho e navegação no grid
43
+ * de dias por meio das setas direcionais.
44
+ * - Foco visual: A área de foco possui espessura de pelo menos 2 pixels CSS e não é sobreposta por outros elementos da tela,
45
+ * garantindo visibilidade para usuários que utilizam teclado. [WCAG 2.4.12: Focus Appearance](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
30
46
  *
31
- * Importante:
47
+ * #### Tokens customizáveis
32
48
  *
33
- * - Caso seja definida uma data fora do range da data mínima e data máxima via *ngModel* o componente mostrará
34
- * a data desabilitada porém o *model* não será alterado.
35
- * - Caso seja definida uma data inválida a mesma não será atribuída ao calendário porém o *model* manterá a data inválida.
49
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
50
+ *
51
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
52
+ *
53
+ * | Propriedade | Descrição | Valor Padrão |
54
+ * |----------------------------------|------------------------------------------------------|-----------------------------------|
55
+ * | **Default Values** | | |
56
+ * | `--background` | Cor de fundo | `var(--color-neutral-light-00)` |
57
+ * | `--border-color` | Cor da borda | `var(--color-neutral-light-20)` |
58
+ * | `--border-radius` | Raio da borda | `var(--border-radius-md)` |
59
+ * | `--border-width` | Largura da borda | `var(--border-width-sm)` |
60
+ * | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-md)` |
61
+ * | **Weekly cells** | | |
62
+ * | `--text-color-weekly` | Cor da fonte utilizada nas células semanais | `var(--color-neutral-dark-90)` |
63
+ * | `--font-family` | Fonte utilizada nas células semanais | `var(--font-family-text)` |
64
+ * | `--font-size` | Tamanho da fonte utilizada nas células semanais | `var(--font-size-sm)` |
65
+ * | `--font-weight-weekly` | Peso da fonte utilizada nas células semanais | `var(--font-weight-bold)` |
66
+ * | **Days cells** | | |
67
+ * | `--font-weight-days` | Peso da fonte utilizada nas células de dias | `var(--font-weight-normal)` |
68
+ * | `--text-color` | Cor da fonte utilizada nas células de dias | `var(--color-neutral-dark-90)` |
69
+ * | `--border-radius-days` | Raio da borda | `var(--border-radius-md)` |
70
+ * | `--border-width-days` | Largura da borda | `var(--border-width-sm)` |
71
+ * | `--day-cell-transition-duration` | Duração da transição | `var(--duration-extra-fast)` |
72
+ * | `--day-cell-transition-property` | Atributo da transição | `all` |
73
+ * | `--day-cell-transition-timing` | Duração da transição com o tipo de transição | `var(--timing-standart)` |
74
+ * | **Today** | | |
75
+ * | `--font-weight-today` | Peso da fonte utilizada na célula de hoje | `var(--font-weight-bold)` |
76
+ * | `--text-color-today` | Cor da fonte utilizada na célula de hoje | `var(--color-action-default)` |
77
+ * | **Focused** | | |
78
+ * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
79
+ * | **Hover** | | |
80
+ * | `--color-hover` | Cor de fundo das células ao passar o mouse | `var(--color-neutral-light-00)` |
81
+ * | `--text-color-hover` | Cor da fonte utilizada nas células ao passar o mouse | `var(--color-action-hover)` |
82
+ * | **Interval** | | |
83
+ * | `--color-interval` | Cor de fundo das células de intervalo | `var(--color-brand-01-lighter)` |
84
+ * | `--text-color-interval` | Cor da fonte utilizada nas células de intervalo | `var(--color-action-default)` |
85
+ * | **Next Month** | | |
86
+ * | `--text-color-next` | Cor da fonte utilizada nas células do próximo mês | `var(--color-action-default)` |
87
+ * | **Disabled** | | |
88
+ * | `--border-disabled` | Cor da borda das células desabilitadas | `var(--color-action-disabled)` |
89
+ * | `--text-color-disabled` | Cor da fonte utilizada nas células desabilitadas | `var(--color-action-disabled)` |
90
+ * | **Selected** | | |
91
+ * | `--color-selected` | Cor de fundo das células selecionadas | `var(--color-neutral-light-00)` |
92
+ * | `--text-color-selected` | Cor da fonte utilizada nas células selecionadas | `var(--color-action-default)` |
36
93
  */
37
94
  export declare class PoCalendarBaseComponent {
38
95
  poDate: PoDateService;
39
96
  private languageService;
40
- /** Evento disparado ao selecionar um dia do calendário. */
97
+ /**
98
+ * @optional
99
+ *
100
+ * @description
101
+ *
102
+ * Evento disparado ao alterar o valor do model.
103
+ * Em modo padrão, retorna uma `string` no formato ISO 8601 (`yyyy-mm-dd`).
104
+ * Em modo *range*, retorna um objeto contendo as datas de início (`start`) e fim (`end`).
105
+ */
41
106
  change: EventEmitter<string | {
42
107
  start: any;
43
108
  end: any;
44
109
  }>;
110
+ /**
111
+ * @description
112
+ *
113
+ * Evento disparado ao alterar o mês ou o ano no cabeçalho do calendário.
114
+ * Retorna um objeto contendo os valores numéricos:
115
+ * - `month`: Mês selecionado (variando de 1 a 12).
116
+ * - `year`: Ano selecionado.
117
+ */
118
+ changeMonthYear: EventEmitter<any>;
119
+ close: EventEmitter<void>;
45
120
  activateDate: any;
46
121
  value: any;
47
122
  protected onTouched: any;
@@ -52,14 +127,15 @@ export declare class PoCalendarBaseComponent {
52
127
  private _maxDate;
53
128
  private _minDate;
54
129
  private _mode;
130
+ private _size?;
55
131
  /**
56
132
  * @optional
57
133
  *
58
134
  * @description
59
135
  *
60
- * Idioma do calendário.
136
+ * Idioma do componente.
61
137
  *
62
- * > O locale padrão sera recuperado com base no [`PoI18nService`](/documentation/po-i18n) ou *browser*.
138
+ * > O locale padrão será recuperado com base no [`PoI18nService`](/documentation/po-i18n) ou *browser*.
63
139
  */
64
140
  set locale(locale: string);
65
141
  get locale(): string;
@@ -68,9 +144,10 @@ export declare class PoCalendarBaseComponent {
68
144
  *
69
145
  * @description
70
146
  *
71
- * Define a data máxima possível de ser selecionada.
147
+ * Define a data máxima permitida para seleção. As datas posteriores ao limite definido permanecem visíveis, mas ficam
148
+ * desabilitadas para clique.
72
149
  *
73
- * Pode receber os seguintes formatos de data:
150
+ * Aceita os seguintes formatos:
74
151
  *
75
152
  * - **Data e hora combinados (E8601DZw): yyyy-mm-ddThh:mm:ss+|-hh:mm**
76
153
  * ```
@@ -94,9 +171,9 @@ export declare class PoCalendarBaseComponent {
94
171
  *
95
172
  * @description
96
173
  *
97
- * Define a data mínima possível de ser selecionada.
174
+ * Define a data mínima para seleção. As datas anteriores ao limite permanecem visíveis, mas desabilitadas para clique.
98
175
  *
99
- * Pode receber os seguintes formatos de data:
176
+ * Aceita os seguintes formatos:
100
177
  *
101
178
  * - **Data e hora combinados (E8601DZw): yyyy-mm-ddThh:mm:ss+|-hh:mm**
102
179
  * ```
@@ -116,13 +193,32 @@ export declare class PoCalendarBaseComponent {
116
193
  set minDate(minDate: any);
117
194
  get minDate(): any;
118
195
  /**
119
- * Propriedade que permite informar o modo de exibição do calendar.
196
+ * @optional
120
197
  *
121
- * Implementa o enum `PoCalendarMode`.
198
+ * @description
199
+ *
200
+ * Define o modo de exibição do calendário.
201
+ * Caso não seja informado, o componente operará no modo padrão de seleção única.
202
+ * Para permitir a seleção de um intervalo de datas, deve ser utilizado o valor `PoCalendarMode.Range`.
122
203
  */
123
204
  set mode(value: PoCalendarMode);
124
205
  get mode(): PoCalendarMode;
125
206
  get isRange(): boolean;
207
+ headerTemplate?: TemplateRef<any>;
208
+ /**
209
+ * @optional
210
+ *
211
+ * @description
212
+ *
213
+ * Define o tamanho do componente.
214
+ *
215
+ * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
216
+ * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
217
+ *
218
+ * @default `medium`
219
+ */
220
+ set size(value: string);
221
+ get size(): string;
126
222
  constructor(poDate: PoDateService, languageService: PoLanguageService);
127
223
  protected setActivateDate(date?: Date | string): void;
128
224
  private verifyActivateDate;
@@ -1,8 +1,29 @@
1
- import { EventEmitter } from '@angular/core';
2
- export declare class PoCalendarHeaderComponent {
1
+ import { EventEmitter, TemplateRef, OnChanges, SimpleChanges, ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { PoComboOption } from '../../po-field/po-combo/interfaces/po-combo-option.interface';
3
+ import { PoCalendarLangService } from '../services/po-calendar.lang.service';
4
+ export declare class PoCalendarHeaderComponent implements OnInit, OnChanges {
5
+ readonly cdr: ChangeDetectorRef;
6
+ readonly poCalendarLangService: PoCalendarLangService;
3
7
  hidePrevious: boolean;
4
8
  hideNext: boolean;
9
+ displayMonth: number;
10
+ displayYear: number;
11
+ displayMonthLabel: string;
12
+ monthOptions?: Array<PoComboOption>;
13
+ headerTemplate?: TemplateRef<any>;
14
+ templateContext: any;
15
+ size: string;
16
+ private _locale;
17
+ set locale(value: string);
18
+ get locale(): string;
5
19
  previous: EventEmitter<void>;
6
20
  next: EventEmitter<void>;
7
- constructor();
21
+ selectMonth: EventEmitter<number>;
22
+ selectYear: EventEmitter<number>;
23
+ previousMonthLabel: string;
24
+ nextMonthLabel: string;
25
+ private labelsInitialized;
26
+ ngOnInit(): void;
27
+ private setupLabels;
28
+ ngOnChanges(changes: SimpleChanges): void;
8
29
  }
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * @description
5
5
  *
6
- * *Enum* `PoCalendarMode` para especificar os modos de visualização do calendário.
6
+ * Define os modos de exibição do `po-calendar`.
7
7
  */
8
8
  export declare enum PoCalendarMode {
9
- /** Define que o calendário será exibido em modo faixa de seleção. */
9
+ /** Modo de seleção de intervalo (data inicial e final). */
10
10
  Range = "range"
11
11
  }
@@ -1,8 +1,11 @@
1
- import { OnChanges, OnInit, EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, TemplateRef, ChangeDetectorRef, SimpleChanges, ElementRef } from '@angular/core';
2
+ import { Subject } from 'rxjs';
2
3
  export declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
3
4
  private poCalendarService;
4
5
  private poCalendarLangService;
5
6
  private poDate;
7
+ readonly cdr: ChangeDetectorRef;
8
+ readonly elementRef: ElementRef<any>;
6
9
  value: any;
7
10
  mode: 'day' | 'month' | 'year';
8
11
  responsive: boolean;
@@ -13,27 +16,42 @@ export declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
13
16
  minDate: any;
14
17
  maxDate: any;
15
18
  hoverValue: Date;
19
+ size: string;
20
+ headerTemplate?: TemplateRef<any>;
21
+ private _locale;
22
+ set locale(value: string);
23
+ get locale(): string;
16
24
  headerChange: EventEmitter<any>;
17
25
  selectDate: EventEmitter<any>;
26
+ readonly hoverDateSource: Subject<Date>;
18
27
  hoverDate: import("rxjs").Observable<Date>;
28
+ closeCalendar: EventEmitter<void>;
19
29
  currentYear: number;
20
- displayDays: Array<number>;
21
- displayDecade: Array<number>;
22
- displayFinalDecade: number;
23
- displayMonth: any;
30
+ displayYear: number;
24
31
  displayMonthNumber: number;
25
- displayMonths: Array<any>;
32
+ displayMonth: string;
33
+ displayDays: Array<Date>;
34
+ displayWeekDays: Array<string>;
35
+ displayMonths: Array<string>;
36
+ displayDecade: Array<number>;
26
37
  displayStartDecade: number;
27
- displayWeekDays: Array<any>;
28
- displayYear: number;
38
+ displayFinalDecade: number;
29
39
  displayToday: string;
40
+ displayToClean: string;
30
41
  today: Date;
42
+ comboMonthsOptions: Array<{
43
+ label: string;
44
+ value: number;
45
+ }>;
46
+ comboYearsOptions: Array<{
47
+ label: string;
48
+ value: number;
49
+ }>;
50
+ comboKey: number;
51
+ focusedDayIndex: number;
52
+ templateContext: any;
31
53
  protected currentMonthNumber: number;
32
- protected date: Date;
33
54
  protected lastDisplay: string;
34
- private _locale;
35
- set locale(value: string);
36
- get locale(): string;
37
55
  get monthLabel(): any;
38
56
  get yearLabel(): any;
39
57
  get isDayVisible(): boolean;
@@ -41,33 +59,75 @@ export declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
41
59
  get isYearVisible(): boolean;
42
60
  get isStartPart(): boolean;
43
61
  get isEndPart(): boolean;
62
+ private get date();
44
63
  ngOnInit(): void;
45
- ngOnChanges(changes: any): void;
46
- getBackgroundColor(displayValue: number, propertyValue: number): "po-calendar-box-background-selected" | "po-calendar-box-background";
47
- getDayBackgroundColor(date: Date): string;
48
- getDayForegroundColor(date: Date): string;
49
- getForegroundColor(displayValue: number, propertyValue: number): "po-calendar-box-foreground-selected" | "po-calendar-box-foreground";
50
- isTodayUnavailable(): boolean;
64
+ ngOnChanges(changes: SimpleChanges): void;
65
+ private getDateToUse;
66
+ private initializeData;
67
+ private setupOptions;
68
+ onHeaderDateChange(event: {
69
+ year: number;
70
+ month: number;
71
+ }): void;
72
+ private updateTemplateContext;
73
+ updateDate(year: number, month: number, comboComponent?: any): void;
74
+ onComboBlur(comboComponent?: any): void;
75
+ private updateDisplay;
76
+ private setInitialFocusedDay;
77
+ private ensureValidFocusedDay;
78
+ getDayTabIndex(day: Date, index: number): number;
51
79
  onNextMonth(): void;
52
80
  onPreviousMonth(): void;
53
- onMouseEnter(day: any): void;
54
- onMouseLeave(): void;
55
- onSelectDate(date: Date): void;
81
+ updateYear(value: number): void;
56
82
  onSelectMonth(year: number, month: number): void;
57
83
  onSelectYear(year: number, month: number): void;
58
84
  selectDisplayMode(mode: 'month' | 'day' | 'year'): void;
59
- updateYear(value: number): void;
60
- private addAllYearsInDecade;
85
+ onSelectDate(date: Date): void;
86
+ onMouseEnter(day: any): void;
87
+ onMouseLeave(): void;
88
+ onSelectToday(): void;
89
+ onTodayKeydown(event: KeyboardEvent): void;
90
+ onHostKeydown(event: KeyboardEvent): void;
91
+ private restoreOriginalDisplay;
92
+ onTodayKeydownEnter(event: KeyboardEvent): void;
93
+ onTodayKeydownSpace(event: KeyboardEvent): void;
94
+ onDayKeydown(event: KeyboardEvent, day: Date, index: number): void;
95
+ private isSelectionKey;
96
+ private handleSelectKey;
97
+ private handleNavigationKey;
98
+ private getNextNavigationIndex;
99
+ private getFirstAvailableDayInWeek;
100
+ private getLastAvailableDayInWeek;
101
+ private getNavigationDirection;
102
+ private findNextAvailableDay;
103
+ private handlePageNavigation;
104
+ private hasAvailableDaysInMonth;
105
+ private applyPageNavigation;
106
+ private focusElement;
107
+ private focusOnSameDayAndWeek;
108
+ private queryDayElement;
109
+ private findTargetDayIndex;
110
+ private isValidCalendarDate;
111
+ onClear(): void;
112
+ getDayBackgroundColor(date: Date): string;
113
+ getDayForegroundColor(date: Date): string;
114
+ getBackgroundColor(displayValue: number, propertyValue: number): "po-calendar-box-background-selected" | "po-calendar-box-background";
115
+ getForegroundColor(displayValue: number, propertyValue: number): "po-calendar-box-foreground-selected" | "po-calendar-box-foreground";
116
+ isTodayUnavailable(): boolean;
117
+ isDayDisabled(date: Date): boolean;
118
+ private getDayColor;
119
+ private getRangeColor;
120
+ getColorForDate(date: Date, type: 'background' | 'foreground'): string;
121
+ getColorForDefaultDate(date: Date, type: 'background' | 'foreground'): string;
122
+ getColorForToday(date: Date, type: 'background' | 'foreground'): string;
123
+ getColorForDateRange(date: Date, type: 'background' | 'foreground'): string;
124
+ getColorState(date: Date, prefix: string, state: string): string;
61
125
  private equalsDate;
62
126
  private getDecadeArray;
63
- private getColorForDate;
64
- private getColorForDefaultDate;
65
- private getColorForToday;
66
- private getColorForDateRange;
67
- private getDayColor;
68
- private init;
69
- private initializeLanguage;
70
- private updateDate;
71
127
  private updateDecade;
72
- private updateDisplay;
128
+ private addAllYearsInDecade;
129
+ trackByYear(index: number, year: number): number;
130
+ trackByMonth(index: number, month: string): number;
131
+ trackByDay(index: number, day: Date): string;
132
+ trackByWeekDay(index: number, weekDay: string): string;
73
133
  }
@@ -36,6 +36,7 @@ export declare class PoCalendarComponent extends PoCalendarBaseComponent impleme
36
36
  month: any;
37
37
  year: any;
38
38
  }, partType: any): void;
39
+ onCloseCalendar(): void;
39
40
  registerOnChange(fn: any): void;
40
41
  registerOnTouched(func: any): void;
41
42
  validate(c: AbstractControl): {
@@ -44,6 +45,8 @@ export declare class PoCalendarComponent extends PoCalendarBaseComponent impleme
44
45
  writeValue(value: any): void;
45
46
  private getValidateStartDate;
46
47
  private getValueFromSelectedDate;
48
+ private updateActivateDateFromHeaderChange;
49
+ private buildDateWithMonthYear;
47
50
  private convertDateToISO;
48
51
  private convertDateFromIso;
49
52
  private updateModel;
@@ -5,6 +5,14 @@ export declare class PoCalendarLangService {
5
5
  private monthLabel;
6
6
  private yearLabel;
7
7
  private todayLabel;
8
+ private previousMonthLabel;
9
+ private nextMonthLabel;
10
+ readonly toCleanLabel: {
11
+ pt: string;
12
+ en: string;
13
+ es: string;
14
+ ru: string;
15
+ };
8
16
  getMonth(month: number): any;
9
17
  getMonthLabel(): any;
10
18
  getMonthsArray(): any[];
@@ -12,5 +20,8 @@ export declare class PoCalendarLangService {
12
20
  getWeekDaysArray(): any[];
13
21
  getYearLabel(): any;
14
22
  getTodayLabel(): any;
23
+ getPreviousMonthLabel(): any;
24
+ getNextMonthLabel(): any;
25
+ getToCleanLabel(): any;
15
26
  setLanguage(language: string): void;
16
27
  }
@@ -1,4 +1,9 @@
1
1
  export declare class PoCalendarService {
2
+ private parseDate;
3
+ getYearOptions(minDate?: Date | string, maxDate?: Date | string): Array<{
4
+ label: string;
5
+ value: number;
6
+ }>;
2
7
  monthDates(year: any, month: any, dayFormatter?: any, weekFormatter?: any): any[];
3
8
  monthDays(year: any, month: any): any[];
4
9
  weekStartDate(date: any): Date;
@@ -58,6 +58,7 @@ export * from './po-datepicker/po-datepicker.module';
58
58
  export * from './po-checkbox/po-checkbox.module';
59
59
  export * from './po-radio-group/po-radio-group.module';
60
60
  export * from './po-radio/po-radio.module';
61
+ export * from './po-combo/po-combo.module';
61
62
  export * from './po-field.module';
62
63
  export * from './po-switch/index';
63
64
  export * from './po-field-container/index';
@@ -13,6 +13,7 @@ export declare abstract class PoCleanBaseComponent {
13
13
  inputRef: ElementRef;
14
14
  /** Valor que será atribuído ao campo quando for clicado no po-clean. */
15
15
  defaultValue?: string;
16
+ icon?: string;
16
17
  set size(value: string);
17
18
  get size(): string;
18
19
  /**
@@ -220,14 +220,15 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
220
220
  *
221
221
  * @description
222
222
  *
223
- * Define que o filtro no primeiro clique será removido.
223
+ * Define se o filtro inicial será removido no primeiro clique do campo.
224
224
  *
225
- * > Caso o combo tenha um valor padrão de inicialização, o primeiro clique
226
- * no componente retornará todos os itens da lista e não apenas o item inicialiazado.
225
+ * Quando habilitado e o combo possui um valor padrão, o primeiro clique
226
+ * exibirá todos os itens da lista ao invés de apenas o item inicializado.
227
227
  *
228
228
  * @default `false`
229
229
  */
230
- removeInitialFilter: boolean;
230
+ set removeInitialFilter(value: boolean);
231
+ get removeInitialFilter(): boolean;
231
232
  /**
232
233
  * @optional
233
234
  *
@@ -368,7 +369,6 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
368
369
  visibleOptions: Array<any>;
369
370
  page: number;
370
371
  pageSize: number;
371
- loading: boolean;
372
372
  displayAdditionalHelp: boolean;
373
373
  dynamicLabel: string;
374
374
  dynamicValue: string;
@@ -387,6 +387,7 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
387
387
  private _filterMode?;
388
388
  private _filterParams?;
389
389
  private _literals?;
390
+ private _loading;
390
391
  private _options;
391
392
  private _placeholder;
392
393
  private _required?;
@@ -395,6 +396,8 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
395
396
  private language;
396
397
  private _infiniteScrollDistance?;
397
398
  private _infiniteScroll?;
399
+ private _removeInitialFilter;
400
+ private isRemoveInitialFilterSetByInput;
398
401
  private fromWriteValue;
399
402
  private validatorChange;
400
403
  /** Mensagem apresentada enquanto o campo estiver vazio. */
@@ -513,6 +516,17 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
513
516
  */
514
517
  set disabled(disabled: boolean);
515
518
  get disabled(): boolean;
519
+ /**
520
+ * @optional
521
+ *
522
+ * @description
523
+ * Exibe um ícone de carregamento no lado direito do campo para sinalizar que uma operação está em andamento.
524
+ *
525
+ * @default `false`
526
+ */
527
+ set loading(value: boolean);
528
+ get loading(): boolean;
529
+ get isDisabled(): boolean;
516
530
  /** Indica que a lista definida na propriedade p-options será ordenada pela descrição. */
517
531
  set sort(sort: boolean);
518
532
  get sort(): boolean;
@@ -625,6 +639,7 @@ export declare abstract class PoComboBaseComponent implements ControlValueAccess
625
639
  updateSelectedValue(option: any, isUpdateModel?: boolean): void;
626
640
  callModelChange(value: any): any;
627
641
  isEqual(value: any, inputValue: any): boolean;
642
+ mapSizeToIcon(size: string): string;
628
643
  searchForLabel(search: string, options: Array<any>, filterMode: PoComboFilterMode): void;
629
644
  updateComboList(options?: Array<any>): void;
630
645
  getNextOption(value: any, options: Array<any>, reverse?: boolean): any;
@@ -0,0 +1,2 @@
1
+ export declare class PoComboModule {
2
+ }
@@ -246,6 +246,7 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
246
246
  private _minDate;
247
247
  private _noAutocomplete?;
248
248
  private _placeholder?;
249
+ private _loading?;
249
250
  private previousValue;
250
251
  private _size?;
251
252
  private subscription;
@@ -370,6 +371,17 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
370
371
  _locale?: string;
371
372
  set locale(value: string);
372
373
  get locale(): string;
374
+ /**
375
+ * @optional
376
+ *
377
+ * @description
378
+ * Exibe um ícone de carregamento no lado direito do campo para sinalizar que uma operação está em andamento.
379
+ *
380
+ * @default `false`
381
+ */
382
+ set loading(value: boolean);
383
+ get loading(): boolean;
384
+ get isDisabled(): boolean;
373
385
  /**
374
386
  * @optional
375
387
  *
@@ -393,6 +405,7 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
393
405
  formatToDate(value: Date): string;
394
406
  controlModel(date: Date): void;
395
407
  callOnChange(value: any, retry?: boolean): void;
408
+ mapSizeToIcon(size: string): string;
396
409
  setDisabledState(isDisabled: boolean): void;
397
410
  registerOnChange(func: any): void;
398
411
  registerOnTouched(func: any): void;