@po-ui/ng-components 21.11.0 → 21.13.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.
- 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 +2826 -1478
- 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-chart/interfaces/po-chart-options.interface.d.ts +15 -0
- package/lib/components/po-chart/po-chart-base.component.d.ts +2 -0
- 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 +21 -31
- 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-progress/enums/po-progress-shape.enum.d.ts +13 -0
- package/lib/components/po-progress/enums/po-progress-status.enum.d.ts +1 -1
- package/lib/components/po-progress/index.d.ts +1 -0
- package/lib/components/po-progress/po-progress-bar/po-progress-bar.component.d.ts +1 -0
- package/lib/components/po-progress/po-progress-base.component.d.ts +70 -0
- package/lib/components/po-progress/po-progress-circle/po-progress-circle.component.d.ts +31 -0
- package/lib/components/po-progress/po-progress.component.d.ts +19 -2
- 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.0.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 +656 -178
- package/po-ui-ng-components-21.11.0.tgz +0 -0
|
@@ -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
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoProgressComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Enum `PoProgressShape` para definir o formato visual do componente de progresso.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoProgressShape {
|
|
9
|
+
/** Formato barra de progresso (padrão). */
|
|
10
|
+
bar = "bar",
|
|
11
|
+
/** Formato circular de progresso. */
|
|
12
|
+
circle = "circle"
|
|
13
|
+
}
|