@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoPageDefaultComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os tipos de cabeçalho disponíveis no `po-page-default`.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoPageHeaderType {
|
|
9
|
+
/**
|
|
10
|
+
* Layout padrão com suporte a `p-breadcrumb`.
|
|
11
|
+
*/
|
|
12
|
+
primary = "primary",
|
|
13
|
+
/**
|
|
14
|
+
* Exibe um botão de retorno ao lado do título.
|
|
15
|
+
*
|
|
16
|
+
* > Incompatível com `p-breadcrumb`.
|
|
17
|
+
*/
|
|
18
|
+
secondary = "secondary",
|
|
19
|
+
/**
|
|
20
|
+
* Layout simplificado sem botão de retorno.
|
|
21
|
+
*
|
|
22
|
+
* > Incompatível com `p-breadcrumb`.
|
|
23
|
+
*/
|
|
24
|
+
tertiary = "tertiary"
|
|
25
|
+
}
|
|
@@ -2,6 +2,8 @@ import { PoLanguageService } from './../../../services/po-language/po-language.s
|
|
|
2
2
|
import { PoBreadcrumb } from '../../po-breadcrumb/po-breadcrumb.interface';
|
|
3
3
|
import { PoPageAction } from '../interfaces/po-page-action.interface';
|
|
4
4
|
import { PoPageContentComponent } from '../po-page-content/po-page-content.component';
|
|
5
|
+
import { PoPageActionsLayout } from './enums/po-page-actions-layout.enum';
|
|
6
|
+
import { PoPageHeaderType } from './enums/po-page-header-type.enum';
|
|
5
7
|
import { PoPageDefaultLiterals } from './po-page-default-literals.interface';
|
|
6
8
|
export declare const poPageDefaultLiteralsDefault: {
|
|
7
9
|
en: PoPageDefaultLiterals;
|
|
@@ -9,45 +11,78 @@ export declare const poPageDefaultLiteralsDefault: {
|
|
|
9
11
|
pt: PoPageDefaultLiterals;
|
|
10
12
|
ru: PoPageDefaultLiterals;
|
|
11
13
|
};
|
|
14
|
+
export declare const backNavigationAriaLabels: {
|
|
15
|
+
en: string;
|
|
16
|
+
es: string;
|
|
17
|
+
pt: string;
|
|
18
|
+
ru: string;
|
|
19
|
+
};
|
|
12
20
|
/**
|
|
13
21
|
* @description
|
|
14
22
|
*
|
|
15
|
-
* O
|
|
23
|
+
* O `po-page-default` é utilizado como container principal para telas sem um template definido.
|
|
24
|
+
*
|
|
25
|
+
* Oferece suporte a cabeçalhos dinâmicos via `p-page-header-type`, navegação por *breadcrumb*
|
|
26
|
+
* e gerenciamento de ações com agrupamento responsivo via `p-page-actions-layout`.
|
|
16
27
|
*
|
|
17
28
|
* #### Tokens customizáveis
|
|
18
29
|
*
|
|
19
30
|
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
20
31
|
*
|
|
21
|
-
* | Propriedade
|
|
22
|
-
*
|
|
23
|
-
* | **
|
|
24
|
-
* | `--
|
|
25
|
-
* |
|
|
26
|
-
* | `--
|
|
27
|
-
* | `--
|
|
28
|
-
* |
|
|
29
|
-
* |
|
|
32
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
33
|
+
* |----------------------------------------------------|---------------------------------------------|---------------------------------------|
|
|
34
|
+
* | **Página (po-page-default)** | | |
|
|
35
|
+
* | `--background` | Background da página (header e body) | `var(--color-page-background-color-page)` |
|
|
36
|
+
* | **Header (po-page-header)** | | |
|
|
37
|
+
* | `--padding` | Espaçamento do header | `var(--spacing-xs) var(--spacing-md)` |
|
|
38
|
+
* | `--gap` | Espaçamento entre os breadcrumbs e o título | `var(--spacing-md)` |
|
|
39
|
+
* | `--gap-actions` | Espaçamento entre as ações | `var(--spacing-xs)` |
|
|
40
|
+
* | **Header (po-page-header .po-page-header-title)** | | |
|
|
41
|
+
* | `--font-family` | Família tipográfica do título | `var(--font-family-theme)` |
|
|
42
|
+
* | **Content (po-page-content)** | | |
|
|
43
|
+
* | `--padding-content` | Espaçamento do conteúdo | `var(--spacing-xs) var(--spacing-sm)` |
|
|
30
44
|
*/
|
|
31
45
|
export declare abstract class PoPageDefaultBaseComponent {
|
|
32
46
|
poPageContent: PoPageContentComponent;
|
|
33
|
-
/** Objeto com propriedades do breadcrumb. */
|
|
34
|
-
breadcrumb?: PoBreadcrumb;
|
|
35
47
|
visibleActions: Array<PoPageAction>;
|
|
36
48
|
protected language: string;
|
|
37
49
|
private _actions?;
|
|
50
|
+
private _breadcrumb?;
|
|
38
51
|
private _componentsSize?;
|
|
39
52
|
private _initialComponentsSize?;
|
|
40
53
|
private _literals;
|
|
54
|
+
private _pageActionsLayout;
|
|
55
|
+
private _pageHeaderType;
|
|
56
|
+
private _subtitle;
|
|
41
57
|
private _title;
|
|
42
58
|
/**
|
|
43
59
|
* @optional
|
|
44
60
|
*
|
|
45
61
|
* @description
|
|
46
62
|
*
|
|
47
|
-
*
|
|
63
|
+
* Define a lista de ações que serão exibidas no cabeçalho da página.
|
|
64
|
+
*
|
|
65
|
+
* Recebe um array de objetos que implementam a interface `PoPageAction`.
|
|
66
|
+
*
|
|
67
|
+
* > O comportamento de exibição pode ser customizado através da propriedade `p-page-actions-layout`.
|
|
68
|
+
*
|
|
69
|
+
* @default `[]`
|
|
48
70
|
*/
|
|
49
71
|
set actions(actions: Array<PoPageAction>);
|
|
50
72
|
get actions(): Array<PoPageAction>;
|
|
73
|
+
/**
|
|
74
|
+
* @optional
|
|
75
|
+
*
|
|
76
|
+
* @description
|
|
77
|
+
*
|
|
78
|
+
* Define o sistema de navegação que indica o caminho da página atual na hierarquia da aplicação.
|
|
79
|
+
*
|
|
80
|
+
* Recebe um objeto que implementa a interface `PoBreadcrumb`.
|
|
81
|
+
*
|
|
82
|
+
* > Compatível com o cabeçalho (`p-page-header-type`) do tipo `primary`.
|
|
83
|
+
*/
|
|
84
|
+
set breadcrumb(value: PoBreadcrumb);
|
|
85
|
+
get breadcrumb(): PoBreadcrumb;
|
|
51
86
|
/**
|
|
52
87
|
* @optional
|
|
53
88
|
*
|
|
@@ -69,37 +104,62 @@ export declare abstract class PoPageDefaultBaseComponent {
|
|
|
69
104
|
*
|
|
70
105
|
* @description
|
|
71
106
|
*
|
|
72
|
-
*
|
|
107
|
+
* Permite a customização das literais utilizadas no componente.
|
|
73
108
|
*
|
|
74
|
-
*
|
|
109
|
+
* Para customizar, basta passar um objeto parcial ou completo que implemente a interface `PoPageDefaultLiterals`.
|
|
75
110
|
*
|
|
76
|
-
*
|
|
77
|
-
* const customLiterals: PoPageDefaultLiterals = {
|
|
78
|
-
* otherActions: 'Mais ações'
|
|
79
|
-
* };
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* Ou passando apenas as literais que deseja customizar:
|
|
111
|
+
* Exemplo de uso:
|
|
83
112
|
*
|
|
113
|
+
* ```html
|
|
114
|
+
* <po-page-default [p-literals]="customLiterals"></po-page-default>
|
|
84
115
|
* ```
|
|
85
|
-
* const customLiterals: PoPageDefaultLiterals = {
|
|
86
|
-
* otherActions: 'Ações da página'
|
|
87
|
-
* };
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
|
-
* E para carregar as literais customizadas, basta apenas passar o objeto para o componente.
|
|
91
116
|
*
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const customLiterals: PoPageDefaultLiterals = {
|
|
119
|
+
* otherActions: 'Mais opções'
|
|
120
|
+
* };
|
|
96
121
|
* ```
|
|
97
122
|
*
|
|
98
|
-
* > O valor padrão será traduzido de acordo com o idioma configurado no [`PoI18nService`](/documentation/po-i18n) ou
|
|
123
|
+
* > O valor padrão será traduzido de acordo com o idioma configurado no [`PoI18nService`](/documentation/po-i18n) ou navegador.
|
|
99
124
|
*/
|
|
100
125
|
set literals(value: PoPageDefaultLiterals);
|
|
101
126
|
get literals(): PoPageDefaultLiterals;
|
|
102
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* @optional
|
|
129
|
+
*
|
|
130
|
+
* @description
|
|
131
|
+
*
|
|
132
|
+
* Define o layout de exibição das ações no cabeçalho.
|
|
133
|
+
*
|
|
134
|
+
* Aceita valores do enum `PoPageActionsLayout`.
|
|
135
|
+
*
|
|
136
|
+
* > Em telas reduzidas (< 480px) as ações fora do *dropdown* que possuam a propriedade `PoPageAction.icon` definida
|
|
137
|
+
* exibirão apenas o ícone.
|
|
138
|
+
*
|
|
139
|
+
* @default `default`
|
|
140
|
+
*/
|
|
141
|
+
set pageActionsLayout(value: string | PoPageActionsLayout);
|
|
142
|
+
get pageActionsLayout(): string;
|
|
143
|
+
/**
|
|
144
|
+
* @optional
|
|
145
|
+
*
|
|
146
|
+
* @description
|
|
147
|
+
*
|
|
148
|
+
* Define o tipo de cabeçalho da página.
|
|
149
|
+
*
|
|
150
|
+
* Aceita valores do enum `PoPageHeaderType`.
|
|
151
|
+
*
|
|
152
|
+
* @default `primary`
|
|
153
|
+
*/
|
|
154
|
+
set pageHeaderType(value: string | PoPageHeaderType);
|
|
155
|
+
get pageHeaderType(): string;
|
|
156
|
+
/**
|
|
157
|
+
* @optional
|
|
158
|
+
*
|
|
159
|
+
* @description
|
|
160
|
+
*
|
|
161
|
+
* Define o título principal da página.
|
|
162
|
+
*/
|
|
103
163
|
set title(title: string);
|
|
104
164
|
get title(): string;
|
|
105
165
|
/**
|
|
@@ -107,9 +167,22 @@ export declare abstract class PoPageDefaultBaseComponent {
|
|
|
107
167
|
*
|
|
108
168
|
* @description
|
|
109
169
|
*
|
|
110
|
-
*
|
|
170
|
+
* Define um texto de apoio ou informações adicionais logo abaixo do título principal.
|
|
171
|
+
*
|
|
172
|
+
* > Requer que`p-title` esteja definido.
|
|
173
|
+
*/
|
|
174
|
+
set subtitle(value: string);
|
|
175
|
+
get subtitle(): string;
|
|
176
|
+
/**
|
|
177
|
+
* @optional
|
|
178
|
+
*
|
|
179
|
+
* @description
|
|
180
|
+
*
|
|
181
|
+
* Evento disparado ao clicar no botão voltar exibido no cabeçalho.
|
|
182
|
+
*
|
|
183
|
+
* > Botão exibido apenas quando a propriedade `p-page-header-type` está configurada como `secondary`.
|
|
111
184
|
*/
|
|
112
|
-
|
|
185
|
+
back: import("@angular/core").OutputEmitterRef<void>;
|
|
113
186
|
constructor(languageService: PoLanguageService);
|
|
114
187
|
protected onThemeChange(): void;
|
|
115
188
|
private applySizeBasedOnA11y;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterContentInit, OnChanges, SimpleChange } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, OnChanges, OnDestroy, SimpleChange } from '@angular/core';
|
|
2
2
|
import { PoPageAction } from '../interfaces/po-page-action.interface';
|
|
3
3
|
import { PoPageDefaultBaseComponent } from './po-page-default-base.component';
|
|
4
4
|
/**
|
|
@@ -23,24 +23,30 @@ import { PoPageDefaultBaseComponent } from './po-page-default-base.component';
|
|
|
23
23
|
* <file name="sample-po-page-default-dashboard/sample-po-page-default-dashboard.service.ts"> </file>
|
|
24
24
|
* </example>
|
|
25
25
|
*/
|
|
26
|
-
export declare class PoPageDefaultComponent extends PoPageDefaultBaseComponent implements AfterContentInit, OnChanges {
|
|
26
|
+
export declare class PoPageDefaultComponent extends PoPageDefaultBaseComponent implements AfterContentInit, OnChanges, OnDestroy {
|
|
27
27
|
private readonly renderer;
|
|
28
28
|
private readonly router;
|
|
29
|
+
readonly backIcon: string;
|
|
30
|
+
readonly backNavigationLabel: string;
|
|
29
31
|
limitPrimaryActions: number;
|
|
30
32
|
dropdownActions: Array<PoPageAction>;
|
|
31
33
|
isMobile: boolean;
|
|
32
34
|
private readonly maxWidthMobile;
|
|
35
|
+
private _primaryKindUsed;
|
|
36
|
+
private resizeUnlisten;
|
|
33
37
|
constructor();
|
|
34
38
|
ngAfterContentInit(): void;
|
|
35
39
|
ngOnChanges(changes: {
|
|
36
40
|
[propName: string]: SimpleChange;
|
|
37
41
|
}): void;
|
|
42
|
+
ngOnDestroy(): void;
|
|
38
43
|
actionIsDisabled(action: any): any;
|
|
39
44
|
actionIsVisible(action: any): any;
|
|
40
45
|
callAction(item: PoPageAction): void;
|
|
41
46
|
hasPageHeader(): boolean;
|
|
42
47
|
setDropdownActions(): void;
|
|
43
48
|
getVisibleActions(): PoPageAction[];
|
|
49
|
+
getActionKind(action: PoPageAction, fallback: string): string;
|
|
44
50
|
private onResize;
|
|
45
51
|
private setIsMobile;
|
|
46
52
|
}
|
|
@@ -14,6 +14,8 @@ export declare class PoPageHeaderBaseComponent {
|
|
|
14
14
|
size: string;
|
|
15
15
|
/** Subtítulo da página. */
|
|
16
16
|
subtitle: string;
|
|
17
|
+
/** Define o tipo de header: `primary`, `secondary` ou `tertiary`. */
|
|
18
|
+
type: string;
|
|
17
19
|
private _breadcrumb;
|
|
18
20
|
/** Objeto com propriedades do breadcrumb. */
|
|
19
21
|
set breadcrumb(value: PoBreadcrumb);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @description
|
|
3
|
-
*
|
|
4
|
-
* po-page-
|
|
3
|
+
*
|
|
4
|
+
* Módulo responsável pelos componentes de estrutura de página: `po-page-default`, `po-page-detail`,
|
|
5
|
+
* `po-page-edit`, `po-page-list` e `po-page-slide`.
|
|
5
6
|
*/
|
|
6
7
|
export declare class PoPageModule {
|
|
7
8
|
}
|
|
@@ -16,115 +16,90 @@ export interface PoPopupAction {
|
|
|
16
16
|
*/
|
|
17
17
|
label: string;
|
|
18
18
|
/**
|
|
19
|
+
* @optional
|
|
20
|
+
*
|
|
19
21
|
* @description
|
|
20
22
|
*
|
|
21
23
|
* Ação que será executada, sendo possível passar o nome ou a referência da função.
|
|
22
24
|
*
|
|
23
25
|
* No componente `po-dropdown`, a action também pode ser executada para o agrupador de subitens.
|
|
24
26
|
*
|
|
25
|
-
* > Para que a função seja executada no contexto do
|
|
26
|
-
*
|
|
27
|
-
* Exemplo: `action: this.myFunction.bind(this)`
|
|
27
|
+
* > Para que a função seja executada no contexto do componente, utilize *bind*:
|
|
28
|
+
* `action: this.myFunction.bind(this)`
|
|
28
29
|
*/
|
|
29
30
|
action?: Function;
|
|
30
31
|
/**
|
|
32
|
+
* @optional
|
|
33
|
+
*
|
|
31
34
|
* @description
|
|
32
35
|
*
|
|
33
|
-
*
|
|
36
|
+
* Ícone exibido ao lado esquerdo do rótulo.
|
|
34
37
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* <po-component
|
|
38
|
-
* [p-property]="[{ label: 'PHOSPHOR ICON', icon: 'an an-newspaper' }]">
|
|
39
|
-
* </po-component>
|
|
40
|
-
* ```
|
|
38
|
+
* Aceita ícones da [Biblioteca de ícones](https://po-ui.io/icons), fontes externas (ex: Font Awesome)
|
|
39
|
+
* ou um `TemplateRef` para ícones customizados.
|
|
41
40
|
*
|
|
42
|
-
* Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca Font Awesome, da seguinte forma:
|
|
43
|
-
* ```
|
|
44
|
-
* <po-component
|
|
45
|
-
* [p-property]="[{ label: 'FA ICON', icon: 'fa fa-icon-podcast' }]">
|
|
46
|
-
* </po-component>
|
|
47
41
|
* ```
|
|
48
|
-
*
|
|
49
|
-
* Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
|
|
50
|
-
* component.html:
|
|
51
|
-
* ```
|
|
52
|
-
* <ng-template #iconTemplate>
|
|
53
|
-
* <ion-icon name="heart"></ion-icon>
|
|
54
|
-
* </ng-template>
|
|
55
|
-
*
|
|
56
|
-
* <po-component [p-property]="myProperty"></po-component>
|
|
57
|
-
* ```
|
|
58
|
-
* component.ts:
|
|
59
|
-
* ```
|
|
60
|
-
* @ViewChild('iconTemplate', { static: true } ) iconTemplate : TemplateRef<void>;
|
|
61
|
-
*
|
|
62
|
-
* myProperty = [
|
|
63
|
-
* {
|
|
64
|
-
* label: 'FA ICON',
|
|
65
|
-
* icon: this.iconTemplate
|
|
66
|
-
* }
|
|
67
|
-
* ];
|
|
42
|
+
* { label: 'Ação', icon: 'an an-newspaper' }
|
|
68
43
|
* ```
|
|
69
44
|
*/
|
|
70
45
|
icon?: string | TemplateRef<void>;
|
|
71
46
|
/**
|
|
47
|
+
* @optional
|
|
48
|
+
*
|
|
72
49
|
* @description
|
|
73
50
|
*
|
|
74
51
|
* Atribui uma linha separadora acima do item.
|
|
75
|
-
|
|
76
|
-
* */
|
|
52
|
+
*/
|
|
77
53
|
separator?: boolean;
|
|
78
54
|
/**
|
|
79
|
-
* @
|
|
55
|
+
* @optional
|
|
80
56
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* Também é possível informar diretamente um valor booleano que vai habilitar ou desabilitar a ação para todos os registros.
|
|
57
|
+
* @description
|
|
84
58
|
*
|
|
59
|
+
* Desabilita a ação. Aceita um valor booleano ou uma função que retorna booleano.
|
|
85
60
|
*/
|
|
86
61
|
disabled?: boolean | Function;
|
|
87
62
|
/**
|
|
63
|
+
* @optional
|
|
64
|
+
*
|
|
88
65
|
* @description
|
|
89
66
|
*
|
|
90
|
-
* Define a cor do item
|
|
67
|
+
* Define a cor do item.
|
|
91
68
|
*
|
|
92
69
|
* Valores válidos:
|
|
93
70
|
* - `default`
|
|
94
|
-
* - `danger`
|
|
71
|
+
* - `danger`
|
|
95
72
|
*/
|
|
96
73
|
type?: string;
|
|
97
74
|
/**
|
|
75
|
+
* @optional
|
|
76
|
+
*
|
|
98
77
|
* @description
|
|
99
78
|
*
|
|
100
|
-
* URL
|
|
79
|
+
* URL para redirecionamento. Aceita rotas internas e links externos.
|
|
101
80
|
*
|
|
102
|
-
* No componente `po-dropdown`,
|
|
103
|
-
*
|
|
104
|
-
* tratado como um link e o redirecionamento terá prioridade sobre a exibição da lista.
|
|
81
|
+
* No componente `po-dropdown`, quando informada em um agrupador com `subItems`, o clique
|
|
82
|
+
* redireciona ao invés de abrir os subitens.
|
|
105
83
|
*
|
|
84
|
+
* > Quando informada, tem prioridade sobre a propriedade `action`.
|
|
106
85
|
*/
|
|
107
86
|
url?: string;
|
|
108
87
|
/**
|
|
88
|
+
* @optional
|
|
89
|
+
*
|
|
109
90
|
* @description
|
|
110
91
|
*
|
|
111
92
|
* Define se a ação está selecionada.
|
|
112
|
-
*
|
|
113
93
|
*/
|
|
114
94
|
selected?: boolean;
|
|
115
95
|
/**
|
|
116
|
-
* @
|
|
117
|
-
*
|
|
118
|
-
* Define se a ação será visível.
|
|
96
|
+
* @optional
|
|
119
97
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* Opções para tornar a ação visível ou não:
|
|
123
|
-
*
|
|
124
|
-
* - Função que deve retornar um booleano.
|
|
98
|
+
* @description
|
|
125
99
|
*
|
|
126
|
-
*
|
|
100
|
+
* Define a visibilidade da ação. Aceita um valor booleano ou uma função que retorna booleano.
|
|
127
101
|
*
|
|
102
|
+
* @default `true`
|
|
128
103
|
*/
|
|
129
104
|
visible?: boolean | Function;
|
|
130
105
|
$id?: string;
|
|
@@ -226,6 +226,11 @@ export declare class PoTimerBaseComponent implements ControlValueAccessor {
|
|
|
226
226
|
protected formatValue(value: number): string;
|
|
227
227
|
/** Verifica se uma hora está desabilitada com base nos limites min/max. */
|
|
228
228
|
protected isHourDisabled(hour: number): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Verifica se um período (AM/PM) está completamente desabilitado.
|
|
231
|
+
* Retorna `true` quando todas as horas do período estão fora do range min/max.
|
|
232
|
+
*/
|
|
233
|
+
protected isPeriodDisabled(targetPeriod: string): boolean;
|
|
229
234
|
/** Verifica se um minuto está desabilitado com base nos limites min/max e hora selecionada. */
|
|
230
235
|
protected isMinuteDisabled(minute: number): boolean;
|
|
231
236
|
/** Verifica se um segundo está desabilitado com base nos limites min/max, hora e minuto selecionados. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, AfterViewChecked, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { PoButtonComponent } from '../po-button/po-button.component';
|
|
2
3
|
import { PoTimerBaseComponent } from './po-timer-base.component';
|
|
3
4
|
/** Tipo dos eixos das colunas. */
|
|
4
5
|
type PoTimerColumnType = 'hour' | 'minute' | 'second' | 'period';
|
|
@@ -30,10 +31,10 @@ type PoTimerColumnType = 'hour' | 'minute' | 'second' | 'period';
|
|
|
30
31
|
* </example>
|
|
31
32
|
*/
|
|
32
33
|
export declare class PoTimerComponent extends PoTimerBaseComponent implements OnInit, OnChanges, AfterViewInit, AfterViewChecked, OnDestroy {
|
|
33
|
-
hourCells: QueryList<
|
|
34
|
-
minuteCells: QueryList<
|
|
35
|
-
secondCells: QueryList<
|
|
36
|
-
periodCells: QueryList<
|
|
34
|
+
hourCells: QueryList<PoButtonComponent>;
|
|
35
|
+
minuteCells: QueryList<PoButtonComponent>;
|
|
36
|
+
secondCells: QueryList<PoButtonComponent>;
|
|
37
|
+
periodCells: QueryList<PoButtonComponent>;
|
|
37
38
|
hourItemsRefs: QueryList<ElementRef<HTMLElement>>;
|
|
38
39
|
minuteItemsRefs: QueryList<ElementRef<HTMLElement>>;
|
|
39
40
|
secondItemsRefs: QueryList<ElementRef<HTMLElement>>;
|
|
@@ -68,6 +69,8 @@ export declare class PoTimerComponent extends PoTimerBaseComponent implements On
|
|
|
68
69
|
activeDescendantIds: Record<PoTimerColumnType, string>;
|
|
69
70
|
disabledMinuteCache: Set<number>;
|
|
70
71
|
disabledSecondCache: Set<number>;
|
|
72
|
+
private ariaSyncNeeded;
|
|
73
|
+
private cachedCellPairs;
|
|
71
74
|
constructor();
|
|
72
75
|
ngOnInit(): void;
|
|
73
76
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -139,7 +142,10 @@ export declare class PoTimerComponent extends PoTimerBaseComponent implements On
|
|
|
139
142
|
* o foco diretamente pois nao usam o padrao de roving focus.
|
|
140
143
|
*/
|
|
141
144
|
private getVisibleColumnTypes;
|
|
142
|
-
private
|
|
145
|
+
private updateAllCachedCellPairs;
|
|
146
|
+
private subscribeToCellChanges;
|
|
147
|
+
private updateCachedCellPairs;
|
|
148
|
+
private markAriaSyncNeeded;
|
|
143
149
|
/** Atualiza aria-activedescendant para o indice focado no displayArray. */
|
|
144
150
|
private updateActiveDescendant;
|
|
145
151
|
/**
|
|
@@ -186,16 +192,26 @@ export declare class PoTimerComponent extends PoTimerBaseComponent implements On
|
|
|
186
192
|
* ele substitui o item equivalente na secao fixa para manter exatamente
|
|
187
193
|
* sourceLength itens com role="option".
|
|
188
194
|
*
|
|
189
|
-
*
|
|
190
|
-
* (
|
|
191
|
-
*
|
|
195
|
+
* Todos os botoes nativos recebem os atributos ARIA corretos
|
|
196
|
+
* (role, aria-selected, aria-setsize, aria-posinset) propagados
|
|
197
|
+
* dos data-attributes do host <po-button>.
|
|
198
|
+
*
|
|
199
|
+
* Nao usa `inert` — o infinity scroll repete o array 3x e marcar
|
|
200
|
+
* secoes como inert causava botoes desabilitados durante transicoes
|
|
201
|
+
* de scroll. Em vez disso, duplicatas recebem role="none" e
|
|
202
|
+
* aria-hidden="true" no <button> nativo para que NVDA nao as conte,
|
|
203
|
+
* mas permanecem clicaveis visualmente.
|
|
204
|
+
*
|
|
205
|
+
* A secao canonica e determinada pela secao do item focado,
|
|
206
|
+
* garantindo que exatamente sourceLength itens tenham role="option".
|
|
192
207
|
*/
|
|
193
208
|
private syncAriaToNativeButtons;
|
|
194
209
|
/**
|
|
195
210
|
* Determina se um item do displayArray e canonico para fins de ARIA.
|
|
196
211
|
*
|
|
197
212
|
* - Sem infinity scroll: todos sao canonicos.
|
|
198
|
-
* - Com infinity scroll:
|
|
213
|
+
* - Com infinity scroll: apenas itens na secao canonica (determinada
|
|
214
|
+
* pelo offset visivel) recebem role="option".
|
|
199
215
|
*/
|
|
200
216
|
private isCanonicalDisplayItem;
|
|
201
217
|
/**
|
|
@@ -38,7 +38,7 @@ declare const poThemeDefaultDarkValuesAA: {
|
|
|
38
38
|
'po-container': {
|
|
39
39
|
'--background': string;
|
|
40
40
|
};
|
|
41
|
-
'div.po-lookup-filter-content input.po-input, input.po-input, po-datepicker, po-datepicker-range, po-decimal, po-email, po-input, po-login, po-lookup, po-number, po-password, po-url, po-combo, po-search, po-select, po-multiselect': {
|
|
41
|
+
'div.po-lookup-filter-content input.po-input, input.po-input, po-datepicker, po-datepicker-range, po-decimal, po-email, po-input, po-login, po-lookup, po-number, po-password, po-url, po-combo, po-search, po-select, po-multiselect, po-timepicker': {
|
|
42
42
|
'--background-disabled': string;
|
|
43
43
|
};
|
|
44
44
|
'po-input input:-webkit-autofill, po-datepicker input:-webkit-autofill, po-datepicker-range input:-webkit-autofill, po-decimal input:-webkit-autofill, po-email input:-webkit-autofill, po-input input:-webkit-autofill, po-login input:-webkit-autofill, po-lookup input:-webkit-autofill, po-number input:-webkit-autofill, po-password input:-webkit-autofill, po-url input:-webkit-autofill, po-combo input:-webkit-autofill': {
|
|
@@ -56,7 +56,7 @@ declare const poThemeDefaultDarkValues: {
|
|
|
56
56
|
'po-container': {
|
|
57
57
|
'--background': string;
|
|
58
58
|
};
|
|
59
|
-
'div.po-lookup-filter-content input.po-input, input.po-input, po-datepicker, po-datepicker-range, po-decimal, po-email, po-input, po-login, po-lookup, po-number, po-password, po-url, po-combo, po-search, po-select, po-multiselect': {
|
|
59
|
+
'div.po-lookup-filter-content input.po-input, input.po-input, po-datepicker, po-datepicker-range, po-decimal, po-email, po-input, po-login, po-lookup, po-number, po-password, po-url, po-combo, po-search, po-select, po-multiselect, po-timepicker': {
|
|
60
60
|
'--background-disabled': string;
|
|
61
61
|
};
|
|
62
62
|
'po-input input:-webkit-autofill, po-datepicker input:-webkit-autofill, po-datepicker-range input:-webkit-autofill, po-decimal input:-webkit-autofill, po-email input:-webkit-autofill, po-input input:-webkit-autofill, po-login input:-webkit-autofill, po-lookup input:-webkit-autofill, po-number input:-webkit-autofill, po-password input:-webkit-autofill, po-url input:-webkit-autofill, po-combo input:-webkit-autofill': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.13.1",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@angular/cdk": "~21.2.4",
|
|
25
|
-
"@po-ui/style": "21.
|
|
26
|
-
"@po-ui/ng-schematics": "21.
|
|
25
|
+
"@po-ui/style": "21.13.1",
|
|
26
|
+
"@po-ui/ng-schematics": "21.13.1",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
28
|
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@angular/platform-browser-dynamic": "^21",
|
|
39
39
|
"@angular/router": "^21",
|
|
40
40
|
"@angular-devkit/schematics": "^21",
|
|
41
|
-
"@po-ui/style": "21.
|
|
41
|
+
"@po-ui/style": "21.13.1",
|
|
42
42
|
"rxjs": "~7.8.1",
|
|
43
43
|
"zone.js": "~0.15.0"
|
|
44
44
|
},
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ function default_1(options) {
|
|
|
18
18
|
}
|
|
19
19
|
function addPoPackageAndInstall() {
|
|
20
20
|
return (tree, context) => {
|
|
21
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '21.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '21.13.1');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -11,7 +11,7 @@ const changes_1 = require("./changes");
|
|
|
11
11
|
const httpClientModuleName = 'HttpClientModule';
|
|
12
12
|
const httpClientModuleSourcePath = '@angular/common/http';
|
|
13
13
|
function default_1() {
|
|
14
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
15
15
|
}
|
|
16
16
|
function postUpdate() {
|
|
17
17
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -40,11 +40,11 @@ function main(options) {
|
|
|
40
40
|
configureNewIcon.toLowerCase() === 'y' ||
|
|
41
41
|
configureNewIcon.toLowerCase() === 'sim' ||
|
|
42
42
|
configureNewIcon.toLowerCase() === '') {
|
|
43
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('21.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('21.13.1', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|