@po-ui/ng-components 21.12.0 → 21.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-CKJDZQRS.mjs → po-ui-ng-components-po-chart-modal-table.component-BPYsbMKd.mjs} +4 -4
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-CKJDZQRS.mjs.map → po-ui-ng-components-po-chart-modal-table.component-BPYsbMKd.mjs.map} +1 -1
- package/fesm2022/po-ui-ng-components.mjs +2538 -1449
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-button/po-button.component.d.ts +2 -0
- package/lib/components/po-calendar/po-calendar-base.component.d.ts +3 -0
- package/lib/components/po-calendar/po-calendar-mode.enum.d.ts +3 -1
- package/lib/components/po-calendar/po-calendar.component.d.ts +22 -1
- package/lib/components/po-dropdown/po-dropdown-action.interface.d.ts +7 -6
- package/lib/components/po-dropdown/po-dropdown-base.component.d.ts +29 -0
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +89 -10
- package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +30 -0
- package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +31 -6
- package/lib/components/po-field/po-timepicker/enums/po-timepicker-iso-format.enum.d.ts +1 -1
- package/lib/components/po-field/po-timepicker/po-timepicker.component.d.ts +22 -2
- package/lib/components/po-page/index.d.ts +2 -0
- package/lib/components/po-page/interfaces/po-page-action.interface.d.ts +26 -4
- package/lib/components/po-page/po-page-content/po-page-content.component.d.ts +10 -4
- package/lib/components/po-page/po-page-default/enums/po-page-actions-layout.enum.d.ts +26 -0
- package/lib/components/po-page/po-page-default/enums/po-page-header-type.enum.d.ts +25 -0
- package/lib/components/po-page/po-page-default/po-page-default-base.component.d.ts +109 -36
- package/lib/components/po-page/po-page-default/po-page-default.component.d.ts +8 -2
- package/lib/components/po-page/po-page-header/po-page-header-base.component.d.ts +2 -0
- package/lib/components/po-page/po-page.module.d.ts +3 -2
- package/lib/components/po-popup/po-popup-action.interface.d.ts +32 -57
- package/lib/components/po-timer/po-timer-base.component.d.ts +5 -0
- package/lib/components/po-timer/po-timer.component.d.ts +25 -9
- package/lib/services/po-theme/helpers/types/po-theme-dark-defaults-AA.constant.d.ts +1 -1
- package/lib/services/po-theme/helpers/types/po-theme-dark-defaults.constant.d.ts +1 -1
- package/package.json +4 -4
- package/po-ui-ng-components-21.13.1.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v20/index.js +2 -2
- package/schematics/ng-update/v21/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/types/po-ui-ng-components.d.ts +508 -148
- package/po-ui-ng-components-21.12.0.tgz +0 -0
|
@@ -21,7 +21,9 @@ import { PoButtonBaseComponent } from './po-button-base.component';
|
|
|
21
21
|
* </example>
|
|
22
22
|
*/
|
|
23
23
|
export declare class PoButtonComponent extends PoButtonBaseComponent {
|
|
24
|
+
elementRef: ElementRef;
|
|
24
25
|
buttonElement: ElementRef;
|
|
26
|
+
constructor(elementRef: ElementRef);
|
|
25
27
|
onBlur(): void;
|
|
26
28
|
/**
|
|
27
29
|
* Função que atribui foco ao componente.
|
|
@@ -207,6 +207,9 @@ export declare class PoCalendarBaseComponent {
|
|
|
207
207
|
set mode(value: PoCalendarMode);
|
|
208
208
|
get mode(): PoCalendarMode;
|
|
209
209
|
get isRange(): boolean;
|
|
210
|
+
get isMonthYear(): boolean;
|
|
211
|
+
get isYear(): boolean;
|
|
212
|
+
yearRangeLimit?: number;
|
|
210
213
|
headerTemplate?: TemplateRef<any>;
|
|
211
214
|
/**
|
|
212
215
|
* @optional
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { DoCheck, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { DoCheck, OnChanges, OnInit, SimpleChanges, QueryList } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { PoButtonComponent } from '../po-button';
|
|
3
4
|
import { PoCalendarBaseComponent } from './po-calendar-base.component';
|
|
4
5
|
import { PoCalendarRangePreset } from './interfaces/po-calendar-range-preset.interface';
|
|
5
6
|
/**
|
|
@@ -28,10 +29,19 @@ import { PoCalendarRangePreset } from './interfaces/po-calendar-range-preset.int
|
|
|
28
29
|
* </example>
|
|
29
30
|
*/
|
|
30
31
|
export declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnInit, OnChanges, DoCheck {
|
|
32
|
+
monthOptions: QueryList<PoButtonComponent>;
|
|
33
|
+
yearOptions: QueryList<PoButtonComponent>;
|
|
31
34
|
private readonly changeDetector;
|
|
32
35
|
private readonly poCalendarLangService;
|
|
33
36
|
hoverValue: Date;
|
|
34
37
|
displayToClean: string;
|
|
38
|
+
displayMonths: Array<string>;
|
|
39
|
+
displayYears: Array<number>;
|
|
40
|
+
focusedIndex: number;
|
|
41
|
+
selectedIndexMonth: number | null;
|
|
42
|
+
selectedIndexYear: number | null;
|
|
43
|
+
selectedMonth: number | null;
|
|
44
|
+
selectedYear: number | null;
|
|
35
45
|
private readonly _isRange;
|
|
36
46
|
private readonly _rangePresetsValue;
|
|
37
47
|
private readonly _rangePresetOptionsValue;
|
|
@@ -44,6 +54,15 @@ export declare class PoCalendarComponent extends PoCalendarBaseComponent impleme
|
|
|
44
54
|
ngOnInit(): void;
|
|
45
55
|
ngOnChanges(changes: SimpleChanges): void;
|
|
46
56
|
ngDoCheck(): void;
|
|
57
|
+
isMonthDisabled(monthIndex: number): boolean;
|
|
58
|
+
isYearDisabled(year: number): boolean;
|
|
59
|
+
onKeydownMonth(event: KeyboardEvent, index: number): void;
|
|
60
|
+
onKeydownYear(event: KeyboardEvent, index: number): void;
|
|
61
|
+
selectMonth(index: number, event?: KeyboardEvent, selected?: boolean): void;
|
|
62
|
+
selectYear(index: number, event?: KeyboardEvent, selected?: boolean, year?: any): void;
|
|
63
|
+
private getMonthOptions;
|
|
64
|
+
private getYearOptions;
|
|
65
|
+
private initializeYearAndMonthMode;
|
|
47
66
|
getActivateDate(partType: any): any;
|
|
48
67
|
getValue(partType: any): any;
|
|
49
68
|
onSelectDate(selectedDate: any, partType?: any): void;
|
|
@@ -75,5 +94,7 @@ export declare class PoCalendarComponent extends PoCalendarBaseComponent impleme
|
|
|
75
94
|
private convertDateToISO;
|
|
76
95
|
private convertDateFromIso;
|
|
77
96
|
private updateModel;
|
|
97
|
+
private setMonth;
|
|
98
|
+
private setYear;
|
|
78
99
|
private writeDate;
|
|
79
100
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PoPopupAction } from '../po-popup/po-popup-action.interface';
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* Interface para as ações do componente `po-dropdown`.
|
|
5
6
|
*
|
|
6
7
|
* @docsExtends PoPopupAction
|
|
7
8
|
*
|
|
@@ -9,13 +10,13 @@ import { PoPopupAction } from '../po-popup/po-popup-action.interface';
|
|
|
9
10
|
*/
|
|
10
11
|
export interface PoDropdownAction extends PoPopupAction {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* @optional
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
13
16
|
*
|
|
14
|
-
*
|
|
17
|
+
* Array de ações (`PoDropdownAction`) usado para criar agrupadores de subitens (submenus).
|
|
15
18
|
*
|
|
16
|
-
* >
|
|
17
|
-
* Recomenda-se limitar a navegação a, no máximo, três níveis hierárquicos.
|
|
18
|
-
* Isso evita sobrecarga cognitiva, facilita a memorização da estrutura e garante uma melhor experiência de uso.
|
|
19
|
+
* > Recomenda-se limitar a navegação a, no máximo, três níveis hierárquicos.
|
|
19
20
|
*/
|
|
20
21
|
subItems?: Array<PoDropdownAction>;
|
|
21
22
|
}
|
|
@@ -67,6 +67,7 @@ export declare class PoDropdownBaseComponent {
|
|
|
67
67
|
private _disabled;
|
|
68
68
|
private _size?;
|
|
69
69
|
private _initialSize?;
|
|
70
|
+
private _position;
|
|
70
71
|
/** Lista de ações que serão exibidas no componente. */
|
|
71
72
|
set actions(value: Array<PoDropdownAction>);
|
|
72
73
|
get actions(): Array<PoDropdownAction>;
|
|
@@ -97,6 +98,34 @@ export declare class PoDropdownBaseComponent {
|
|
|
97
98
|
*/
|
|
98
99
|
set size(value: string);
|
|
99
100
|
get size(): string;
|
|
101
|
+
/**
|
|
102
|
+
* @optional
|
|
103
|
+
*
|
|
104
|
+
* @description
|
|
105
|
+
*
|
|
106
|
+
* Define a posição preferencial de abertura do popup do dropdown em relação ao botão.
|
|
107
|
+
*
|
|
108
|
+
* Posições válidas:
|
|
109
|
+
* - `right`: No lado direito.
|
|
110
|
+
* - `right-bottom`: No lado direito inferior.
|
|
111
|
+
* - `right-top`: No lado direito superior.
|
|
112
|
+
* - `bottom`: Abaixo.
|
|
113
|
+
* - `bottom-left`: Abaixo e à esquerda (padrão).
|
|
114
|
+
* - `bottom-right`: Abaixo e à direita.
|
|
115
|
+
* - `left`: No lado esquerdo.
|
|
116
|
+
* - `left-top`: No lado esquerdo superior.
|
|
117
|
+
* - `left-bottom`: No lado esquerdo inferior.
|
|
118
|
+
* - `top`: Acima.
|
|
119
|
+
* - `top-right`: Acima e à direita.
|
|
120
|
+
* - `top-left`: Acima e à esquerda.
|
|
121
|
+
*
|
|
122
|
+
* > O popup será rotacionado automaticamente caso não caiba na posição definida.
|
|
123
|
+
*
|
|
124
|
+
* @default `bottom-left`
|
|
125
|
+
*/
|
|
126
|
+
set position(value: string);
|
|
127
|
+
get position(): string;
|
|
128
|
+
get popupCustomPositions(): Array<string>;
|
|
100
129
|
protected onThemeChange(): void;
|
|
101
130
|
private applySizeBasedOnA11y;
|
|
102
131
|
}
|
package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { ForceBooleanComponentEnum, ForceOptionComponentEnum } from '../../enums
|
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
10
|
import { PoDynamicField } from '../../po-dynamic-field.interface';
|
|
11
11
|
import { PoHelperOptions } from '../../../po-helper';
|
|
12
|
+
import { PoCalendarRangePreset } from '../../../po-calendar/interfaces/po-calendar-range-preset.interface';
|
|
12
13
|
/**
|
|
13
14
|
* @usedBy PoDynamicFormComponent, PoAdvancedFilterComponent, PoPageDynamicSearchComponent
|
|
14
15
|
*
|
|
@@ -55,7 +56,13 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
55
56
|
* Retorna um objeto `KeyboardEvent` com informações sobre a tecla.
|
|
56
57
|
*/
|
|
57
58
|
keydown?: Function;
|
|
58
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Define a obrigatoriedade do campo.
|
|
61
|
+
*
|
|
62
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-timepicker`, `po-input`, `po-number`,
|
|
63
|
+
* `po-decimal`, `po-select`, `po-radio-group`, `po-combo`, `po-lookup`, `po-checkbox-group`, `po-multiselect`,
|
|
64
|
+
* `po-textarea`, `po-password``, `po-upload`.
|
|
65
|
+
*/
|
|
59
66
|
required?: boolean;
|
|
60
67
|
/**
|
|
61
68
|
*
|
|
@@ -63,7 +70,7 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
63
70
|
*
|
|
64
71
|
* > Necessário que a propriedade `required` esteja habilitada.
|
|
65
72
|
*
|
|
66
|
-
* **Componentes compatíveis:** `po-datepicker`, `po-input`, `po-number`, `po-decimal`, `po-password`.
|
|
73
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-timepicker`, `po-input`, `po-number`, `po-decimal`, `po-password`.
|
|
67
74
|
*/
|
|
68
75
|
requiredFieldErrorMessage?: boolean;
|
|
69
76
|
/**
|
|
@@ -72,6 +79,10 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
72
79
|
* > A indicação não será exibida, se:
|
|
73
80
|
* - O campo for `required`, ou;
|
|
74
81
|
* - Não possuir `help` e `label`.
|
|
82
|
+
*
|
|
83
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-timepicker`, `po-input`, `po-number`,
|
|
84
|
+
* `po-decimal`, `po-select`, `po-radio-group`, `po-combo`, `po-lookup`, `po-checkbox-group`, `po-multiselect`,
|
|
85
|
+
* `po-textarea`, `po-password`.
|
|
75
86
|
*/
|
|
76
87
|
optional?: boolean;
|
|
77
88
|
/**
|
|
@@ -300,14 +311,15 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
300
311
|
* - required;
|
|
301
312
|
*
|
|
302
313
|
* > Esta mensagem pode ser exibida quando o campo estiver vazio, caso seja requerido. Em casos de componentes como
|
|
303
|
-
* `po-datepicker`, `po-input`, `po-number`, `po-decimal`, `po-password`, é necessário que a propriedade
|
|
314
|
+
* `po-datepicker`, `po-input`, `po-number`, `po-decimal`, `po-password`, `po-timepicker`, é necessário que a propriedade
|
|
304
315
|
* `requiredFieldErrorMessage` esteja como `true` para que a mensagem seja exibida com o campo vazio. Componentes
|
|
305
316
|
* como `po-datepicker-range`, `po-select`, `po-checkbox-group`, `po-radio-group`, `po-multiselect`, `po-combo`,
|
|
306
317
|
* `po-lookup` e `po-textarea` não é necessário passar a propriedade `requiredFieldErrorMessage`.
|
|
307
318
|
*
|
|
308
319
|
*
|
|
309
320
|
* **Componentes compatíveis:** `po-checkbox-group`, `po-combo`, `po-datepicker`, `po-datepicker-range`,
|
|
310
|
-
* `po-decimal`, `po-input`, `po-lookup`, `po-multiselect`, `po-number`, `po-password`, `po-radio-group`, `po-select`,
|
|
321
|
+
* `po-decimal`, `po-input`, `po-lookup`, `po-multiselect`, `po-number`, `po-password`, `po-radio-group`, `po-select`,
|
|
322
|
+
* `po-switch`, `po-textarea`, `po-timepicker`.
|
|
311
323
|
*/
|
|
312
324
|
errorMessage?: string;
|
|
313
325
|
/**
|
|
@@ -321,7 +333,8 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
321
333
|
* e um tooltip será exibido ao passar o mouse sobre a mensagem para mostrar o conteúdo completo.
|
|
322
334
|
*
|
|
323
335
|
* **Componentes compatíveis:** `po-checkbox-group`, `po-combo`, `po-datepicker`, `po-datepicker-range`,
|
|
324
|
-
* `po-decimal`, `po-input`, `po-lookup`, `po-multiselect`, `po-number`, `po-password`, `po-radio-group`, `po-select`,
|
|
336
|
+
* `po-decimal`, `po-input`, `po-lookup`, `po-multiselect`, `po-number`, `po-password`, `po-radio-group`, `po-select`,
|
|
337
|
+
* `po-switch`, `po-textarea`, `po-timepicker`.
|
|
325
338
|
*
|
|
326
339
|
* @default `false`
|
|
327
340
|
*/
|
|
@@ -362,6 +375,8 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
362
375
|
*
|
|
363
376
|
* Também pode-se utilizar em conjunto com `searchService`, informando uma lista de propriedades que será utilizado
|
|
364
377
|
* para formatação da exibição no campo, por exemplo: ["id", "name"].
|
|
378
|
+
*
|
|
379
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-timepicker`, `po-lookup`.
|
|
365
380
|
*/
|
|
366
381
|
format?: string | Array<string>;
|
|
367
382
|
/**
|
|
@@ -411,7 +426,12 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
411
426
|
* array.
|
|
412
427
|
*/
|
|
413
428
|
order?: number;
|
|
414
|
-
/**
|
|
429
|
+
/**
|
|
430
|
+
* Mensagem que será exibida enquanto o campo não estiver preenchido.
|
|
431
|
+
*
|
|
432
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-timepicker`, `po-input`, `po-number`,
|
|
433
|
+
* `po-decimal`, `po-select`, `po-combo`, `po-lookup`, `po-multiselect`, `po-textarea`, `po-password`.
|
|
434
|
+
*/
|
|
415
435
|
placeholder?: string;
|
|
416
436
|
/**
|
|
417
437
|
* Define a localidade a ser utilizada no componente.
|
|
@@ -426,7 +446,8 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
426
446
|
* ```
|
|
427
447
|
*
|
|
428
448
|
* > Para ver quais linguagens suportadas acesse [`I18n`](documentation/po-i18n)
|
|
429
|
-
*
|
|
449
|
+
*
|
|
450
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-decimal`, `po-timepicker`.
|
|
430
451
|
*/
|
|
431
452
|
locale?: string;
|
|
432
453
|
/**
|
|
@@ -437,7 +458,8 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
437
458
|
range?: boolean;
|
|
438
459
|
/** Indica que o campo será somente leitura.
|
|
439
460
|
*
|
|
440
|
-
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-
|
|
461
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-timepicker`, `po-input`, `po-number`,
|
|
462
|
+
* `po-decimal`, `po-select`, `po-textarea`, `po-password`.
|
|
441
463
|
*/
|
|
442
464
|
readonly?: boolean;
|
|
443
465
|
/**
|
|
@@ -448,13 +470,15 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
448
470
|
multiple?: boolean;
|
|
449
471
|
/** Se verdadeiro, o campo receberá um botão para ser limpo.
|
|
450
472
|
*
|
|
451
|
-
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-input`, `po-number`, `po-decimal`,
|
|
473
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-input`, `po-number`, `po-decimal`,
|
|
474
|
+
* `po-combo`, `po-lookup`, `po-password`, `po-timepicker`.
|
|
452
475
|
*/
|
|
453
476
|
clean?: boolean;
|
|
454
477
|
/**
|
|
455
478
|
* Define a propriedade nativa `autocomplete` do campo como off.
|
|
456
479
|
*
|
|
457
|
-
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-input`, `po-number`, `po-decimal`,
|
|
480
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-input`, `po-number`, `po-decimal`,
|
|
481
|
+
* `po-lookup`, `po-password`, `po-timepicker`.
|
|
458
482
|
*/
|
|
459
483
|
noAutocomplete?: boolean;
|
|
460
484
|
/**
|
|
@@ -727,6 +751,10 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
727
751
|
*
|
|
728
752
|
* > Não será exibida a indicação se:
|
|
729
753
|
* - Não possuir `p-help` e/ou `p-label`.
|
|
754
|
+
*
|
|
755
|
+
* **Componentes compatíveis:** `po-datepicker`, `po-datepicker-range`, `po-timepicker`, `po-input`, `po-number`,
|
|
756
|
+
* `po-decimal`, `po-select`, `po-radio-group`, `po-combo`, `po-lookup`, `po-checkbox-group`, `po-multiselect`,
|
|
757
|
+
* `po-textarea`, `po-password`, `po-upload`.
|
|
730
758
|
*/
|
|
731
759
|
showRequired?: boolean;
|
|
732
760
|
/**
|
|
@@ -868,4 +896,55 @@ export interface PoDynamicFormField extends PoDynamicField {
|
|
|
868
896
|
* **Compatível com todos os componentes**
|
|
869
897
|
*/
|
|
870
898
|
compactLabel?: boolean;
|
|
899
|
+
/**
|
|
900
|
+
* Define o modo de seleção do `po-datepicker`.
|
|
901
|
+
*
|
|
902
|
+
* Valores aceitos:
|
|
903
|
+
* - `'month-year'`: exibe seleção de mês e ano (formato `MM/YYYY`)
|
|
904
|
+
* - `'year'`: exibe seleção apenas de ano (formato `YYYY`)
|
|
905
|
+
*
|
|
906
|
+
* **Componente compatível:** `po-datepicker`
|
|
907
|
+
*/
|
|
908
|
+
mode?: 'month-year' | 'year';
|
|
909
|
+
/**
|
|
910
|
+
* Define o limite de anos exibidos na lista de anos do `po-datepicker` nos modos `month-year` e `year`.
|
|
911
|
+
*
|
|
912
|
+
* @default `150`
|
|
913
|
+
*
|
|
914
|
+
* **Componente compatível:** `po-datepicker`
|
|
915
|
+
*/
|
|
916
|
+
yearRangeLimit?: number;
|
|
917
|
+
/**
|
|
918
|
+
* Habilita a exibição dos presets padrão de intervalos de data no painel lateral do calendário.
|
|
919
|
+
*
|
|
920
|
+
* Aceita os seguintes valores:
|
|
921
|
+
* - `true`: exibe todos os presets padrão.
|
|
922
|
+
* - `false`: não exibe os presets padrão.
|
|
923
|
+
* - `Array<string>`: exibe apenas os presets padrão cujos labels estejam no array informado.
|
|
924
|
+
*
|
|
925
|
+
* **Componente compatível:** `po-datepicker-range`
|
|
926
|
+
*
|
|
927
|
+
* @default `false`
|
|
928
|
+
*/
|
|
929
|
+
rangePresets?: boolean | Array<string>;
|
|
930
|
+
/**
|
|
931
|
+
* Lista de presets customizados de intervalos de data exibidos no painel lateral do calendário.
|
|
932
|
+
*
|
|
933
|
+
* Para utilizar presets customizados, informe um array de objetos que implementam a interface `PoCalendarRangePreset`.
|
|
934
|
+
*
|
|
935
|
+
* **Componente compatível:** `po-datepicker-range`
|
|
936
|
+
*/
|
|
937
|
+
rangePresetOptions?: Array<PoCalendarRangePreset>;
|
|
938
|
+
/**
|
|
939
|
+
* Define a ordenação dos presets na lista.
|
|
940
|
+
*
|
|
941
|
+
* Valores aceitos:
|
|
942
|
+
* - `'asc'`: ordenação crescente (passado → futuro)
|
|
943
|
+
* - `'desc'`: ordenação decrescente (futuro → passado)
|
|
944
|
+
*
|
|
945
|
+
* **Componente compatível:** `po-datepicker-range`
|
|
946
|
+
*
|
|
947
|
+
* @default `'asc'`
|
|
948
|
+
*/
|
|
949
|
+
rangePresetsOrder?: 'asc' | 'desc';
|
|
871
950
|
}
|
|
@@ -82,6 +82,28 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
|
|
|
82
82
|
protected languageService: PoLanguageService;
|
|
83
83
|
protected cd: ChangeDetectorRef;
|
|
84
84
|
additionalHelpEventTrigger: string | undefined;
|
|
85
|
+
/** Rótulo do campo. */
|
|
86
|
+
label?: string;
|
|
87
|
+
/** Texto de apoio do campo. */
|
|
88
|
+
help?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Define o modo de operação do datepicker.
|
|
91
|
+
*
|
|
92
|
+
* Permite configurar o componente para seleção de:
|
|
93
|
+
* - Mês e ano (`month-year`);
|
|
94
|
+
* - Apenas ano (`year`).
|
|
95
|
+
*/
|
|
96
|
+
mode?: 'month-year' | 'year';
|
|
97
|
+
/**
|
|
98
|
+
* Define o limite de anos exibidos nas variações `month-year` e `year`,
|
|
99
|
+
* considerando a data atual como referência.
|
|
100
|
+
*
|
|
101
|
+
* O valor informado determina o intervalo de anos anterior e posterior
|
|
102
|
+
* à data corrente que será disponibilizado para seleção.
|
|
103
|
+
*
|
|
104
|
+
* @default 150
|
|
105
|
+
*/
|
|
106
|
+
yearRangeLimit?: number;
|
|
85
107
|
/**
|
|
86
108
|
*
|
|
87
109
|
* @deprecated v23.x.x use `p-helper`
|
|
@@ -380,6 +402,8 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
|
|
|
380
402
|
* - `mm/dd/yyyy`
|
|
381
403
|
* - `yyyy/mm/dd`
|
|
382
404
|
*
|
|
405
|
+
* Propriedade incompatível com as variações month-year e year.
|
|
406
|
+
*
|
|
383
407
|
* @default `dd/mm/yyyy`
|
|
384
408
|
*/
|
|
385
409
|
set format(value: string);
|
|
@@ -392,6 +416,8 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
|
|
|
392
416
|
* Padrão de formatação para saída do *model*, independentemente do formato de entrada.
|
|
393
417
|
*
|
|
394
418
|
* > Veja os valores válidos no *enum* `PoDatepickerIsoFormat`.
|
|
419
|
+
*
|
|
420
|
+
* Propriedade incompatível com as variações month-year e year.
|
|
395
421
|
*/
|
|
396
422
|
set isoFormat(value: PoDatepickerIsoFormat);
|
|
397
423
|
get isoFormat(): PoDatepickerIsoFormat;
|
|
@@ -450,6 +476,10 @@ export declare abstract class PoDatepickerBaseComponent implements ControlValueA
|
|
|
450
476
|
validate(c: AbstractControl): {
|
|
451
477
|
[key: string]: any;
|
|
452
478
|
};
|
|
479
|
+
private isMonthYearOrYearInvalid;
|
|
480
|
+
private isDateRangeValidForMode;
|
|
481
|
+
private validateMonthYearRange;
|
|
482
|
+
private validateYearRange;
|
|
453
483
|
protected validateModel(model: any): void;
|
|
454
484
|
protected buildMask(format?: string): PoMask;
|
|
455
485
|
formatTimezoneAndHour(offset: number): void;
|
|
@@ -18,6 +18,16 @@ import { PoHelperComponent } from '../../po-helper';
|
|
|
18
18
|
* <file name="sample-po-datepicker-labs/sample-po-datepicker-labs.component.ts"> </file>
|
|
19
19
|
* </example>
|
|
20
20
|
*
|
|
21
|
+
* <example name="po-datepicker-year" title="PO Datepicker Year">
|
|
22
|
+
* <file name="sample-po-datepicker-year/sample-po-datepicker-year.component.html"> </file>
|
|
23
|
+
* <file name="sample-po-datepicker-year/sample-po-datepicker-year.component.ts"> </file>
|
|
24
|
+
* </example>
|
|
25
|
+
*
|
|
26
|
+
* <example name="po-datepicker-month-year" title="PO Datepicker MonthYear">
|
|
27
|
+
* <file name="sample-po-datepicker-month-year/sample-po-datepicker-month-year.component.html"> </file>
|
|
28
|
+
* <file name="sample-po-datepicker-month-year/sample-po-datepicker-month-year.component.ts"> </file>
|
|
29
|
+
* </example>
|
|
30
|
+
*
|
|
21
31
|
* <example name="po-datepicker-airfare" title="PO Datepicker - Airfare">
|
|
22
32
|
* <file name="sample-po-datepicker-airfare/sample-po-datepicker-airfare.component.html"> </file>
|
|
23
33
|
* <file name="sample-po-datepicker-airfare/sample-po-datepicker-airfare.component.ts"> </file>
|
|
@@ -37,10 +47,6 @@ export declare class PoDatepickerComponent extends PoDatepickerBaseComponent imp
|
|
|
37
47
|
inputEl: ElementRef;
|
|
38
48
|
iconClean: ElementRef<HTMLElement>;
|
|
39
49
|
helperEl?: PoHelperComponent;
|
|
40
|
-
/** Rótulo do campo. */
|
|
41
|
-
label?: string;
|
|
42
|
-
/** Texto de apoio do campo. */
|
|
43
|
-
help?: string;
|
|
44
50
|
displayAdditionalHelp: boolean;
|
|
45
51
|
el: ElementRef;
|
|
46
52
|
hour: string;
|
|
@@ -85,7 +91,7 @@ export declare class PoDatepickerComponent extends PoDatepickerBaseComponent imp
|
|
|
85
91
|
getAdditionalHelpTooltip(): string;
|
|
86
92
|
togglePicker(focusInput?: boolean): void;
|
|
87
93
|
closeCalendar(focusInput?: boolean): void;
|
|
88
|
-
dateSelected(event?:
|
|
94
|
+
dateSelected(event?: any): void;
|
|
89
95
|
wasClickedOnPicker(event: any): void;
|
|
90
96
|
hasInvalidClass(): boolean;
|
|
91
97
|
getErrorPattern(): string;
|
|
@@ -95,7 +101,7 @@ export declare class PoDatepickerComponent extends PoDatepickerBaseComponent imp
|
|
|
95
101
|
eventOnClick($event: any): void;
|
|
96
102
|
onKeyDown(event: KeyboardEvent): void;
|
|
97
103
|
onKeyPress(event: any): void;
|
|
98
|
-
formatToDate(value:
|
|
104
|
+
formatToDate(value: any): string;
|
|
99
105
|
refreshValue(value: Date): void;
|
|
100
106
|
/**
|
|
101
107
|
* Método que exibe `p-helper` ou executa a ação definida em `p-helper{eventOnClick}` ou em `p-additionalHelp`.
|
|
@@ -123,13 +129,32 @@ export declare class PoDatepickerComponent extends PoDatepickerBaseComponent imp
|
|
|
123
129
|
* ```
|
|
124
130
|
*/
|
|
125
131
|
showAdditionalHelp(): boolean;
|
|
132
|
+
private handleSpecialModes;
|
|
133
|
+
private processValue;
|
|
134
|
+
private handleDateInstance;
|
|
135
|
+
private handleIsoString;
|
|
136
|
+
private clearValue;
|
|
137
|
+
private resetInput;
|
|
138
|
+
private finalizeWrite;
|
|
126
139
|
writeValue(value: any): void;
|
|
127
140
|
isValidDateIso(value: string): boolean;
|
|
128
141
|
isValidExtendedIso(value: any): boolean;
|
|
129
142
|
hasOverlayClass(element: any): any;
|
|
130
143
|
verifyErrorAsync(value: any): void;
|
|
131
144
|
verifyMobile(): RegExpMatchArray;
|
|
145
|
+
private handleMonthYearKeyup;
|
|
146
|
+
private handleYearKeyup;
|
|
147
|
+
private handleMonthYearBlur;
|
|
148
|
+
private handleYearBlur;
|
|
149
|
+
private applyMonthYearValue;
|
|
150
|
+
private applyYearValue;
|
|
151
|
+
private parseMonthYearInput;
|
|
152
|
+
private syncCalendarMonthYear;
|
|
153
|
+
private syncCalendarYear;
|
|
154
|
+
private writeMonthYearValue;
|
|
155
|
+
private writeYearValue;
|
|
132
156
|
private controlChangeEmitter;
|
|
157
|
+
private isValidInputForMode;
|
|
133
158
|
private hasAttrCalendar;
|
|
134
159
|
private initializeListeners;
|
|
135
160
|
private isAdditionalHelpEventTriggered;
|
|
@@ -71,6 +71,7 @@ export declare class PoTimepickerComponent extends PoTimepickerBaseComponent imp
|
|
|
71
71
|
get hourPlaceholder(): string;
|
|
72
72
|
get minutePlaceholder(): string;
|
|
73
73
|
get secondPlaceholder(): string;
|
|
74
|
+
get isPlaceholder(): boolean;
|
|
74
75
|
private get customPlaceholderSegments();
|
|
75
76
|
private getCustomPlaceholderSegment;
|
|
76
77
|
onHostFocusOut(event: FocusEvent): void;
|
|
@@ -130,6 +131,7 @@ export declare class PoTimepickerComponent extends PoTimepickerBaseComponent imp
|
|
|
130
131
|
writeValue(value: any): void;
|
|
131
132
|
verifyMobile(): RegExpMatchArray;
|
|
132
133
|
handleCleanKeyboardTab(event: KeyboardEvent): void;
|
|
134
|
+
handleTimepickerButtonKeyboardTab(event: KeyboardEvent): void;
|
|
133
135
|
onTimerKeyDown(event: KeyboardEvent): void;
|
|
134
136
|
onTimerBoundaryTab(payload: {
|
|
135
137
|
direction: 'forward' | 'backward';
|
|
@@ -156,9 +158,22 @@ export declare class PoTimepickerComponent extends PoTimepickerBaseComponent imp
|
|
|
156
158
|
private getDefaultPeriodDisplay;
|
|
157
159
|
/** Sincroniza os valores dos elementos input nativos com as propriedades de exibicao. */
|
|
158
160
|
private syncSegmentInputElements;
|
|
159
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Avança o foco para o próximo input de segmento ou elemento focável interno.
|
|
163
|
+
* Retorna `true` se o foco foi movido, `false` se não há próximo elemento focável.
|
|
164
|
+
*/
|
|
160
165
|
private advanceToNextSegment;
|
|
161
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Tenta focar o botão de limpar ou o botão do timer.
|
|
168
|
+
* Retorna `true` se o foco foi movido, `false` se nenhum elemento está focável.
|
|
169
|
+
*/
|
|
170
|
+
private focusCleanOrButton;
|
|
171
|
+
private focusPreviousPeriodSegment;
|
|
172
|
+
private focusNextPeriodSegment;
|
|
173
|
+
/**
|
|
174
|
+
* Retorna o foco para o input de segmento anterior.
|
|
175
|
+
* Retorna `true` se o foco foi movido, `false` se não há segmento anterior focável.
|
|
176
|
+
*/
|
|
162
177
|
private advanceToPreviousSegment;
|
|
163
178
|
/** Foca o ultimo input de segmento visivel. */
|
|
164
179
|
private focusLastSegment;
|
|
@@ -166,6 +181,11 @@ export declare class PoTimepickerComponent extends PoTimepickerBaseComponent imp
|
|
|
166
181
|
private isLastSegment;
|
|
167
182
|
/** Alterna entre AM e PM no display de periodo e atualiza o modelo. */
|
|
168
183
|
private togglePeriod;
|
|
184
|
+
/**
|
|
185
|
+
* Verifica se um período (AM/PM) está completamente fora do range min/max.
|
|
186
|
+
* AM corresponde às horas 0-11 em 24h, PM às horas 12-23.
|
|
187
|
+
*/
|
|
188
|
+
private isPeriodBlocked;
|
|
169
189
|
/** Incrementa ou decrementa o valor de um segmento na direcao indicada (+1 ou -1), respeitando limites e intervalos. */
|
|
170
190
|
private incrementSegment;
|
|
171
191
|
private incrementHourSegment;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './po-page-default/enums/po-page-actions-layout.enum';
|
|
2
|
+
export * from './po-page-default/enums/po-page-header-type.enum';
|
|
1
3
|
export * from './po-page-default/po-page-default.component';
|
|
2
4
|
export * from './po-page-default/po-page-default.interface';
|
|
3
5
|
export * from './po-page-default/po-page-default-literals.interface';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { PoDropdownAction } from '../../po-dropdown';
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
|
-
* Interface para as ações dos componentes po-page-default e po-page-list.
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Interface para as ações dos componentes `po-page-default` e `po-page-list`.
|
|
6
|
+
*
|
|
7
|
+
* As ações podem ser exibidas como botões no cabeçalho ou agrupadas em um *dropdown*,
|
|
8
|
+
* conforme o `PoPageActionsLayout` e o tamanho da tela.
|
|
9
|
+
*
|
|
10
|
+
* > As propriedades `separator`, `selected` e `subItems` possuem efeito apenas quando
|
|
11
|
+
* a ação é exibida dentro do *dropdown*.
|
|
9
12
|
*
|
|
10
13
|
* @docsExtends PoDropdownAction
|
|
11
14
|
*
|
|
@@ -14,4 +17,23 @@ import { PoDropdownAction } from '../../po-dropdown';
|
|
|
14
17
|
* @usedBy PoPageDefaultComponent, PoPageListComponent
|
|
15
18
|
*/
|
|
16
19
|
export interface PoPageAction extends PoDropdownAction {
|
|
20
|
+
/**
|
|
21
|
+
* @optional
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
*
|
|
25
|
+
* Define o estilo visual da ação quando exibida como botão fora do *dropdown*.
|
|
26
|
+
*
|
|
27
|
+
* Valores permitidos:
|
|
28
|
+
* - `primary`: botão com maior destaque visual.
|
|
29
|
+
* - `secondary`: estilo padrão.
|
|
30
|
+
*
|
|
31
|
+
* > Valores inválidos são ignorados e o componente aplica o estilo padrão da posição.
|
|
32
|
+
*
|
|
33
|
+
* > Somente uma ação pode ter `kind` igual a `primary`. Caso mais de uma defina `primary`,
|
|
34
|
+
* apenas a primeira será mantida e as demais receberão `secondary`.
|
|
35
|
+
*
|
|
36
|
+
* > Quando não definido, o estilo é determinado pelo `PoPageActionsLayout`.
|
|
37
|
+
*/
|
|
38
|
+
kind?: string;
|
|
17
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, OnDestroy
|
|
1
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { PoPageContentBaseComponent } from './po-page-content-base.component';
|
|
3
3
|
/**
|
|
4
4
|
* @docsPrivate
|
|
@@ -6,15 +6,21 @@ import { PoPageContentBaseComponent } from './po-page-content-base.component';
|
|
|
6
6
|
* @docsExtends PoPageContentBaseComponent
|
|
7
7
|
*/
|
|
8
8
|
export declare class PoPageContentComponent extends PoPageContentBaseComponent implements AfterViewInit, OnDestroy {
|
|
9
|
-
renderer
|
|
9
|
+
private readonly renderer;
|
|
10
|
+
private readonly elementRef;
|
|
11
|
+
private readonly ngZone;
|
|
10
12
|
contentOpacity: number;
|
|
11
13
|
height: string;
|
|
12
|
-
overflowY: string;
|
|
13
14
|
constructor();
|
|
14
15
|
ngAfterViewInit(): void;
|
|
15
16
|
ngOnDestroy(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Recalcula a altura do po-page-content.
|
|
19
|
+
* Chamado internamente pelo po-page-default quando inputs que afetam
|
|
20
|
+
* o tamanho do header mudam (title, subtitle, breadcrumb, headerType, theme).
|
|
21
|
+
*/
|
|
16
22
|
recalculateHeaderSize(): void;
|
|
17
|
-
setHeightContent
|
|
23
|
+
private setHeightContent;
|
|
18
24
|
private initializeListeners;
|
|
19
25
|
private removeListeners;
|
|
20
26
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoPageDefaultComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os layouts de exibição das ações no cabeçalho do `po-page-default`.
|
|
7
|
+
*
|
|
8
|
+
* > Compatível com todos os valores de `PoPageHeaderType`.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum PoPageActionsLayout {
|
|
11
|
+
/**
|
|
12
|
+
* Exibe as ações como botões (até 3 em desktop e 2 em mobile), agrupando as demais no *dropdown*.
|
|
13
|
+
*
|
|
14
|
+
* Quando `PoPageAction.kind` não é definido, a primeira ação recebe o estilo `primary`
|
|
15
|
+
* e as demais recebem `secondary`.
|
|
16
|
+
*/
|
|
17
|
+
default = "default",
|
|
18
|
+
/**
|
|
19
|
+
* Agrupa todas as ações exclusivamente dentro do menu *dropdown*.
|
|
20
|
+
*/
|
|
21
|
+
dropdown = "dropdown",
|
|
22
|
+
/**
|
|
23
|
+
* Exibe a primeira ação como botão e agrupa as demais no *dropdown*.
|
|
24
|
+
*/
|
|
25
|
+
mixed = "mixed"
|
|
26
|
+
}
|