@po-ui/ng-components 21.32.0 → 21.33.0-beta.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-DEB6M6ER.mjs → po-ui-ng-components-po-chart-modal-table.component-B4RdhBpp.mjs} +4 -4
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-DEB6M6ER.mjs.map → po-ui-ng-components-po-chart-modal-table.component-B4RdhBpp.mjs.map} +1 -1
- package/fesm2022/po-ui-ng-components.mjs +5633 -3798
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-dropdown/po-dropdown-base.component.d.ts +40 -3
- package/lib/components/po-dropdown/po-dropdown.component.d.ts +7 -0
- package/lib/components/po-field/index.d.ts +1 -0
- package/lib/components/po-field/po-lookup/interfaces/po-lookup-advanced-filter.interface.d.ts +18 -0
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +14 -0
- package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal-base.component.d.ts +1 -0
- package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.d.ts +2 -0
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +6 -0
- package/lib/components/po-list-view/enums/po-list-view-detail-display.enum.d.ts +14 -0
- package/lib/components/po-list-view/index.d.ts +2 -0
- package/lib/components/po-list-view/interfaces/po-list-view-field-properties.interface.d.ts +71 -0
- package/lib/components/po-list-view/interfaces/po-list-view-literals.interface.d.ts +2 -0
- package/lib/components/po-list-view/po-list-view-base.component.d.ts +276 -34
- package/lib/components/po-list-view/po-list-view-detail-template/po-list-view-detail-template.directive.d.ts +6 -0
- package/lib/components/po-list-view/po-list-view.component.d.ts +70 -4
- package/lib/components/po-list-view/po-list-view.module.d.ts +0 -37
- package/lib/components/po-listbox/interfaces/po-listbox-literals.interface.d.ts +6 -0
- package/lib/components/po-listbox/po-listbox-base.component.d.ts +1 -0
- package/lib/components/po-listbox/po-listbox.component.d.ts +28 -5
- package/lib/components/po-popup/po-popup-action.interface.d.ts +25 -2
- package/lib/components/po-popup/po-popup-base.component.d.ts +55 -3
- package/lib/components/po-popup/po-popup.component.d.ts +7 -1
- package/lib/components/po-tree-view/po-tree-view-base.component.d.ts +132 -51
- package/lib/components/po-tree-view/po-tree-view-item/po-tree-view-item.component.d.ts +15 -9
- package/lib/components/po-tree-view/po-tree-view-item/po-tree-view-item.interface.d.ts +92 -10
- package/lib/components/po-tree-view/po-tree-view-item-content/po-tree-view-item-content.component.d.ts +36 -0
- package/lib/components/po-tree-view/po-tree-view-item-content/po-tree-view-item-content.literals.d.ts +18 -0
- package/lib/components/po-tree-view/po-tree-view.component.d.ts +16 -5
- package/lib/components/po-tree-view/po-tree-view.literals.d.ts +26 -0
- package/lib/components/po-tree-view/po-tree-view.module.d.ts +0 -38
- package/lib/components/po-tree-view/services/po-tree-view-keyboard.service.d.ts +27 -0
- package/lib/components/po-tree-view/services/po-tree-view.service.d.ts +3 -0
- package/lib/components/po-widget/interfaces/po-widget-selection.interface.d.ts +23 -0
- package/lib/components/po-widget/po-widget-base.component.d.ts +28 -0
- package/lib/components/po-widget/po-widget.component.d.ts +6 -0
- package/lib/services/po-notification/po-notification-base.service.d.ts +1 -0
- package/package.json +4 -4
- package/po-ui-ng-components-21.33.0-beta.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 +2180 -1409
- package/lib/components/po-tree-view/po-tree-view-item-header/po-tree-view-item-header.component.d.ts +0 -14
- package/po-ui-ng-components-21.32.0.tgz +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
/**
|
|
3
4
|
* @usedBy PoPopupComponent, PoWidgetComponent
|
|
4
5
|
*
|
|
@@ -109,7 +110,29 @@ export interface PoPopupAction {
|
|
|
109
110
|
*
|
|
110
111
|
* @description
|
|
111
112
|
*
|
|
112
|
-
* Define
|
|
113
|
+
* Define os subitens de um agrupador, criando menus aninhados.
|
|
114
|
+
*
|
|
115
|
+
* Aceita dois formatos:
|
|
116
|
+
*
|
|
117
|
+
* **Estático** – um *array* de `PoPopupAction` carregado imediatamente:
|
|
118
|
+
*
|
|
119
|
+
* ```
|
|
120
|
+
* { label: 'Relatórios', subItems: [{ label: 'Mensal' }, { label: 'Anual' }] }
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* **Assíncrono (lazy loading)** – uma função que recebe o item agrupador e retorna um
|
|
124
|
+
* `Observable<Array<PoPopupAction>>`. A requisição é disparada **apenas** no momento da expansão
|
|
125
|
+
* (clique ou atalho de teclado), exibindo placeholders com `po-skeleton` enquanto os dados são carregados:
|
|
126
|
+
*
|
|
127
|
+
* ```
|
|
128
|
+
* {
|
|
129
|
+
* label: 'Relatórios',
|
|
130
|
+
* subItems: (item) => this.reportService.getReports(item)
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* > No formato assíncrono, o resultado é armazenado em cache após o primeiro carregamento bem-sucedido.
|
|
135
|
+
* Em caso de falha, é exibida uma mensagem com a opção de tentar novamente.
|
|
113
136
|
*
|
|
114
137
|
* Ao definir esta propriedade, o item exibirá um ícone indicador de subnível.
|
|
115
138
|
* Recomenda-se utilizar no máximo três níveis hierárquicos para garantir a usabilidade.
|
|
@@ -120,6 +143,6 @@ export interface PoPopupAction {
|
|
|
120
143
|
*
|
|
121
144
|
* > Em subníveis aninhados, o `icon` do agrupador é substituído pelo indicador de navegação (seta).
|
|
122
145
|
*/
|
|
123
|
-
subItems?: Array<PoPopupAction
|
|
146
|
+
subItems?: Array<PoPopupAction> | ((item: PoPopupAction) => Observable<Array<PoPopupAction>>);
|
|
124
147
|
$subItemTemplate?: TemplateRef<any>;
|
|
125
148
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { PoPopupAction } from './po-popup-action.interface';
|
|
3
4
|
/**
|
|
4
5
|
* @description
|
|
@@ -78,10 +79,16 @@ export declare class PoPopupBaseComponent {
|
|
|
78
79
|
private _position?;
|
|
79
80
|
private _size?;
|
|
80
81
|
private _target;
|
|
82
|
+
rootLazyLoad?: () => Observable<Array<PoPopupAction>>;
|
|
81
83
|
get computedListboxSubitems(): boolean;
|
|
82
84
|
templateIcon: boolean;
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Lista de ações que serão exibidas no componente.
|
|
87
|
+
*
|
|
88
|
+
* Aceita um *array* de `PoPopupAction` (carregado imediatamente) ou uma função que retorna um
|
|
89
|
+
* `Observable<Array<PoPopupAction>>`, carregando o nível raiz de forma assíncrona na abertura.
|
|
90
|
+
*/
|
|
91
|
+
set actions(value: Array<PoPopupAction> | (() => Observable<Array<PoPopupAction>>));
|
|
85
92
|
get actions(): Array<PoPopupAction>;
|
|
86
93
|
/**
|
|
87
94
|
* @optional
|
|
@@ -208,7 +215,52 @@ export declare class PoPopupBaseComponent {
|
|
|
208
215
|
*/
|
|
209
216
|
set target(value: any);
|
|
210
217
|
get target(): any;
|
|
218
|
+
/**
|
|
219
|
+
* @optional
|
|
220
|
+
*
|
|
221
|
+
* @description
|
|
222
|
+
*
|
|
223
|
+
* Evento disparado ao fechar o popup.
|
|
224
|
+
*/
|
|
211
225
|
closeEvent: EventEmitter<any>;
|
|
212
|
-
|
|
226
|
+
/**
|
|
227
|
+
* @optional
|
|
228
|
+
*
|
|
229
|
+
* @description
|
|
230
|
+
*
|
|
231
|
+
* Evento disparado a cada clique em um item do menu.
|
|
232
|
+
*
|
|
233
|
+
* Recebe o item clicado (`PoPopupAction`).
|
|
234
|
+
*
|
|
235
|
+
* > Não é disparado para a ação interna de voltar (`goBack`).
|
|
236
|
+
*/
|
|
237
|
+
clickItem: EventEmitter<PoPopupAction>;
|
|
238
|
+
/**
|
|
239
|
+
* @optional
|
|
240
|
+
*
|
|
241
|
+
* @description
|
|
242
|
+
*
|
|
243
|
+
* Evento disparado ao abrir o popup.
|
|
244
|
+
*/
|
|
213
245
|
openEvent: EventEmitter<any>;
|
|
246
|
+
/**
|
|
247
|
+
* @optional
|
|
248
|
+
*
|
|
249
|
+
* @description
|
|
250
|
+
*
|
|
251
|
+
* Evento disparado no momento em que a requisição assíncrona de um subnível é iniciada
|
|
252
|
+
* (quando `subItems` é definido como função que retorna um `Observable`).
|
|
253
|
+
*
|
|
254
|
+
* Recebe o item agrupador (`PoPopupAction`) que originou o carregamento.
|
|
255
|
+
*/
|
|
256
|
+
subItemsLoad: EventEmitter<PoPopupAction>;
|
|
257
|
+
/**
|
|
258
|
+
* @optional
|
|
259
|
+
*
|
|
260
|
+
* @description
|
|
261
|
+
*
|
|
262
|
+
* Evento disparado no momento em que a requisição assíncrona do nível raiz é iniciada
|
|
263
|
+
* (quando `p-actions` é definido como função que retorna um `Observable`).
|
|
264
|
+
*/
|
|
265
|
+
rootItemsLoad: EventEmitter<void>;
|
|
214
266
|
}
|
|
@@ -41,7 +41,10 @@ export declare class PoPopupComponent extends PoPopupBaseComponent implements Af
|
|
|
41
41
|
*
|
|
42
42
|
* > Por padrão, este comportamento é acionado somente ao clicar fora do componente ou em determinada ação / url.
|
|
43
43
|
*/
|
|
44
|
-
close(
|
|
44
|
+
close(closeEvent?: {
|
|
45
|
+
reason?: string;
|
|
46
|
+
origin?: string;
|
|
47
|
+
}): void;
|
|
45
48
|
onActionClick(popupAction: PoPopupAction): void | Promise<boolean>;
|
|
46
49
|
/**
|
|
47
50
|
* Abre o componente *popup*.
|
|
@@ -62,7 +65,9 @@ export declare class PoPopupComponent extends PoPopupBaseComponent implements Af
|
|
|
62
65
|
protected checkAllActionIsInvisible(): boolean;
|
|
63
66
|
private clickedOutDisabledItem;
|
|
64
67
|
private clickedOutHeaderTemplate;
|
|
68
|
+
private isEventInsideElement;
|
|
65
69
|
private clickedOutTarget;
|
|
70
|
+
private clickedOutPopup;
|
|
66
71
|
private closePopupOnClickout;
|
|
67
72
|
private elementContains;
|
|
68
73
|
private hasContentToShow;
|
|
@@ -72,4 +77,5 @@ export declare class PoPopupComponent extends PoPopupBaseComponent implements Af
|
|
|
72
77
|
private removeListeners;
|
|
73
78
|
private setPosition;
|
|
74
79
|
private validateInitialContent;
|
|
80
|
+
private focusTarget;
|
|
75
81
|
}
|
|
@@ -1,17 +1,55 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { PoTreeViewItem } from './po-tree-view-item/po-tree-view-item.interface';
|
|
3
2
|
/**
|
|
4
3
|
* @description
|
|
5
4
|
*
|
|
6
|
-
* O componente fornece um modelo de visualização em árvore, possibilitando a
|
|
7
|
-
* hierárquica
|
|
5
|
+
* O componente fornece um modelo de visualização em árvore, possibilitando a exibição de informações de maneira
|
|
6
|
+
* hierárquica com suporte a múltiplos níveis (configurável via `p-max-level`).
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
* por
|
|
8
|
+
* O componente permite:
|
|
9
|
+
* - Navegação completa por teclado seguindo o padrão WAI-ARIA TreeView;
|
|
10
|
+
* - Expansão e recolhimento de itens agrupadores;
|
|
11
|
+
* - Seleção múltipla (checkbox) ou única (radio) dos itens;
|
|
12
|
+
* - Exibição de ícones automáticos para agrupadores e itens finais;
|
|
13
|
+
* - Estado desabilitado global ou individual por item;
|
|
14
|
+
* - Execução de itens finais via clique ou teclado.
|
|
11
15
|
*
|
|
12
|
-
*
|
|
16
|
+
* #### Navegação por teclado
|
|
13
17
|
*
|
|
14
|
-
*
|
|
18
|
+
* | Tecla | Descrição |
|
|
19
|
+
* |-----------------------|-----------------------------------------------------------------------------------------------------------|
|
|
20
|
+
* | **Tab** | Entra no componente posicionando o foco no primeiro nó ativo. Ao pressionar novamente, sai do componente. |
|
|
21
|
+
* | **ArrowDown** | Move o foco para o próximo nó visível. |
|
|
22
|
+
* | **ArrowUp** | Move o foco para o nó visível anterior. |
|
|
23
|
+
* | **ArrowRight** | Se colapsado, expande o nó. Se expandido, move o foco para o nó filho. |
|
|
24
|
+
* | **ArrowLeft** | Se expandido, recolhe o nó. Se filho, move o foco para o nó pai. |
|
|
25
|
+
* | **Home** | Move o foco para o primeiro nó visível. |
|
|
26
|
+
* | **End** | Move o foco para o último nó visível. |
|
|
27
|
+
* | **Enter / Space** | Com `p-selectable`: alterna a seleção do item. Sem `p-selectable`: executa o item final. |
|
|
28
|
+
* | **Caractere** | Move o foco para o próximo nó cujo label inicia com o caractere pressionado (busca cíclica). |
|
|
29
|
+
*
|
|
30
|
+
* #### Tokens customizáveis
|
|
31
|
+
*
|
|
32
|
+
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
33
|
+
*
|
|
34
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
35
|
+
*
|
|
36
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
37
|
+
* |----------------------------------------|-------------------------------------------------------|-------------------------------------------------|
|
|
38
|
+
* | **Default** | | |
|
|
39
|
+
* | `--background-color` | Cor de background do item | `var(--color-neutral-light-00)` |
|
|
40
|
+
* | `--divider-color` | Cor do divider dos agrupadores de nível 0 | `var(--color-neutral-mid-40)` |
|
|
41
|
+
* | `--font-family` | Família tipográfica | `var(--font-family-theme)` |
|
|
42
|
+
* | `--font-size` | Tamanho da fonte | `var(--font-size-default)` |
|
|
43
|
+
* | `--line-height` | Altura da linha | `var(--line-height-md)` |
|
|
44
|
+
* | `--color` | Cor padrão do item | `var(--color-action-default)` |
|
|
45
|
+
* | **Hover** | | |
|
|
46
|
+
* | `--color-hover` | Cor do item em hover | `var(--color-action-hover)` |
|
|
47
|
+
* | **Pressed** | | |
|
|
48
|
+
* | `--color-pressed` | Cor do item em pressed | `var(--color-action-pressed)` |
|
|
49
|
+
* | **Disabled** | | |
|
|
50
|
+
* | `--color-disabled` | Cor do item desabilitado | `var(--color-action-disabled)` |
|
|
51
|
+
* | **Selected** | | |
|
|
52
|
+
* | `--title-color` | Cor do label quando selecionado | `var(--color-action-focus)` |
|
|
15
53
|
*/
|
|
16
54
|
export declare class PoTreeViewBaseComponent {
|
|
17
55
|
/**
|
|
@@ -19,112 +57,155 @@ export declare class PoTreeViewBaseComponent {
|
|
|
19
57
|
*
|
|
20
58
|
* @description
|
|
21
59
|
*
|
|
22
|
-
*
|
|
60
|
+
* Define o tamanho dos componentes de formulário:
|
|
61
|
+
* - `small`: aplica a medida small de cada componente (disponível apenas para acessibilidade AA).
|
|
62
|
+
* - `medium`: aplica a medida medium de cada componente.
|
|
23
63
|
*
|
|
24
|
-
* >
|
|
64
|
+
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
65
|
+
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
66
|
+
*
|
|
67
|
+
* @default `medium`
|
|
25
68
|
*/
|
|
26
|
-
|
|
69
|
+
readonly componentsSizeInput: import("@angular/core").InputSignal<string>;
|
|
27
70
|
/**
|
|
28
71
|
* @optional
|
|
29
72
|
*
|
|
30
73
|
* @description
|
|
31
74
|
*
|
|
32
|
-
*
|
|
75
|
+
* Desabilita o componente inteiro.
|
|
33
76
|
*
|
|
34
|
-
*
|
|
77
|
+
* Quando `true`, todos os itens do tree-view serão exibidos no estado desabilitado,
|
|
78
|
+
* independentemente do valor individual da propriedade `disabled` de cada item.
|
|
79
|
+
*
|
|
80
|
+
* > O botão de expansão/recolhimento (arrow) permanece interativo mesmo quando o componente está desabilitado.
|
|
81
|
+
*
|
|
82
|
+
* @default `false`
|
|
83
|
+
*/
|
|
84
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* Lista de itens do tipo `PoTreeViewItem` que será renderizada pelo componente.
|
|
87
|
+
*
|
|
88
|
+
* > Consulte a documentação de `PoTreeViewItem` para detalhes sobre as propriedades disponíveis em cada item.
|
|
35
89
|
*/
|
|
36
|
-
|
|
90
|
+
readonly inputedItems: import("@angular/core").InputSignal<PoTreeViewItem[]>;
|
|
37
91
|
/**
|
|
38
92
|
* @optional
|
|
39
93
|
*
|
|
40
94
|
* @description
|
|
41
95
|
*
|
|
42
|
-
*
|
|
96
|
+
* Define o máximo de níveis para o tree-view.
|
|
43
97
|
*
|
|
44
|
-
* >
|
|
98
|
+
* > O valor padrão é 4
|
|
99
|
+
*
|
|
100
|
+
* @default 4
|
|
45
101
|
*/
|
|
46
|
-
|
|
102
|
+
readonly maxLevel: import("@angular/core").InputSignalWithTransform<number, number>;
|
|
47
103
|
/**
|
|
48
104
|
* @optional
|
|
49
105
|
*
|
|
50
106
|
* @description
|
|
51
107
|
*
|
|
52
|
-
*
|
|
108
|
+
* Remove a borda do container do componente.
|
|
53
109
|
*
|
|
54
|
-
*
|
|
110
|
+
* @default false
|
|
55
111
|
*/
|
|
56
|
-
|
|
57
|
-
private _componentsSize;
|
|
58
|
-
private _initialComponentsSize;
|
|
59
|
-
private _items;
|
|
60
|
-
private _selectable;
|
|
61
|
-
private _maxLevel;
|
|
62
|
-
private _singleSelect;
|
|
63
|
-
selectedValue: string | number;
|
|
112
|
+
readonly noBorder: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
64
113
|
/**
|
|
65
114
|
* @optional
|
|
66
115
|
*
|
|
67
116
|
* @description
|
|
68
117
|
*
|
|
69
|
-
*
|
|
70
|
-
* - `small`: aplica a medida small de cada componente (disponível apenas para acessibilidade AA).
|
|
71
|
-
* - `medium`: aplica a medida medium de cada componente.
|
|
118
|
+
* Habilita uma caixa de seleção para selecionar e/ou desmarcar um item da lista.
|
|
72
119
|
*
|
|
73
|
-
* >
|
|
74
|
-
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
120
|
+
* > Quando habilitado, a propriedade `showIcon` dos itens não será aplicada.
|
|
75
121
|
*
|
|
76
|
-
* @default
|
|
122
|
+
* @default false
|
|
77
123
|
*/
|
|
78
|
-
|
|
79
|
-
get componentsSize(): string;
|
|
124
|
+
readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
80
125
|
/**
|
|
81
|
-
*
|
|
126
|
+
* @optional
|
|
127
|
+
*
|
|
128
|
+
* @description
|
|
129
|
+
*
|
|
130
|
+
* Habilita a seleção para item único atráves de po-radio.
|
|
131
|
+
*
|
|
132
|
+
* @default false
|
|
82
133
|
*/
|
|
83
|
-
|
|
84
|
-
set items(value: Array<PoTreeViewItem>);
|
|
85
|
-
get items(): Array<PoTreeViewItem>;
|
|
134
|
+
readonly singleSelect: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
86
135
|
/**
|
|
87
136
|
* @optional
|
|
88
137
|
*
|
|
89
138
|
* @description
|
|
90
139
|
*
|
|
91
|
-
*
|
|
140
|
+
* Ação que será disparada ao colapsar um item.
|
|
92
141
|
*
|
|
93
|
-
*
|
|
142
|
+
* > Como parâmetro o componente envia o item colapsado.
|
|
94
143
|
*/
|
|
95
|
-
|
|
96
|
-
get selectable(): boolean;
|
|
144
|
+
readonly collapsed: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
97
145
|
/**
|
|
98
146
|
* @optional
|
|
99
147
|
*
|
|
100
148
|
* @description
|
|
101
149
|
*
|
|
102
|
-
*
|
|
150
|
+
* Ação que será disparada ao expandir um item.
|
|
103
151
|
*
|
|
104
|
-
*
|
|
152
|
+
* > Como parâmetro o componente envia o item expandido.
|
|
105
153
|
*/
|
|
106
|
-
|
|
107
|
-
get singleSelect(): boolean;
|
|
154
|
+
readonly expanded: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
108
155
|
/**
|
|
109
156
|
* @optional
|
|
110
157
|
*
|
|
111
158
|
* @description
|
|
112
159
|
*
|
|
113
|
-
*
|
|
160
|
+
* Ação que será disparada ao selecionar um item.
|
|
114
161
|
*
|
|
115
|
-
* >
|
|
162
|
+
* > Como parâmetro o componente envia o item selecionado.
|
|
163
|
+
*/
|
|
164
|
+
readonly selected: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
165
|
+
/**
|
|
166
|
+
* @optional
|
|
116
167
|
*
|
|
117
|
-
* @
|
|
168
|
+
* @description
|
|
169
|
+
*
|
|
170
|
+
* Ação que será disparada ao desfazer a seleção de um item.
|
|
171
|
+
*
|
|
172
|
+
* > Como parâmetro o componente envia o item que foi desmarcado.
|
|
118
173
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
174
|
+
readonly unselected: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
175
|
+
/**
|
|
176
|
+
* @optional
|
|
177
|
+
*
|
|
178
|
+
* @description
|
|
179
|
+
*
|
|
180
|
+
* Ação que será disparada ao executar um item final (sem `subItems`).
|
|
181
|
+
*
|
|
182
|
+
* > Como parâmetro o componente envia o item executado.
|
|
183
|
+
*/
|
|
184
|
+
readonly activated: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
185
|
+
private _componentsSize;
|
|
186
|
+
private _items;
|
|
187
|
+
selectedValue: string | number;
|
|
188
|
+
protected get componentsSize(): string;
|
|
189
|
+
protected set items(value: Array<PoTreeViewItem>);
|
|
190
|
+
protected get items(): Array<PoTreeViewItem>;
|
|
191
|
+
constructor();
|
|
121
192
|
protected onThemeChange(): void;
|
|
122
193
|
protected emitExpanded(treeViewItem: PoTreeViewItem): void;
|
|
123
194
|
protected emitSelected(treeViewItem: PoTreeViewItem): void;
|
|
195
|
+
protected emitActivated(treeViewItem: PoTreeViewItem): void;
|
|
196
|
+
private selectSingleFinalItem;
|
|
197
|
+
private setSingleFinalSelection;
|
|
198
|
+
private setSingleSelectionByValue;
|
|
199
|
+
private getExpandedState;
|
|
200
|
+
private applyExpandedState;
|
|
201
|
+
private getSelectedState;
|
|
202
|
+
private applySelectedState;
|
|
203
|
+
private getLastSelectedFinalItemValue;
|
|
124
204
|
private addChildItemInParent;
|
|
125
205
|
private addItem;
|
|
126
206
|
private selectAllItems;
|
|
127
207
|
private selectItemBySubItems;
|
|
208
|
+
private getSelectableSubItems;
|
|
128
209
|
private everyItemSelected;
|
|
129
210
|
private expandParentItem;
|
|
130
211
|
private getItemsByMaxLevel;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import { AnimationCallbackEvent } from '@angular/core';
|
|
1
2
|
import { PoTreeViewItem } from './po-tree-view-item.interface';
|
|
2
3
|
export declare class PoTreeViewItemComponent {
|
|
3
4
|
private readonly treeViewService;
|
|
4
|
-
componentsSize: string
|
|
5
|
-
item: PoTreeViewItem
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
selectedValue: string | number
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
readonly componentsSize: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly item: import("@angular/core").InputSignal<PoTreeViewItem>;
|
|
7
|
+
readonly level: import("@angular/core").InputSignal<number>;
|
|
8
|
+
readonly selectable: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
readonly selectedValue: import("@angular/core").InputSignal<string | number>;
|
|
10
|
+
readonly singleSelect: import("@angular/core").InputSignal<boolean>;
|
|
11
|
+
protected animateEnter(event: AnimationCallbackEvent): void;
|
|
12
|
+
protected animateLeave(event: AnimationCallbackEvent): void;
|
|
13
|
+
protected get hasSubItems(): boolean;
|
|
14
|
+
protected onClick(): void;
|
|
15
|
+
protected onSelect(selectedItem: PoTreeViewItem): void;
|
|
16
|
+
protected onActivate(activatedItem: PoTreeViewItem): void;
|
|
17
|
+
protected trackByFunction(index: number): number;
|
|
18
|
+
private animateToggle;
|
|
13
19
|
}
|
|
@@ -6,23 +6,105 @@
|
|
|
6
6
|
* Interface para definição dos itens do componente `po-tree-view`.
|
|
7
7
|
*/
|
|
8
8
|
export interface PoTreeViewItem {
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @optional
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
*
|
|
14
|
+
* Desabilita a interação com o item.
|
|
15
|
+
*
|
|
16
|
+
* O estado é aplicado somente ao item em que a propriedade está configurada
|
|
17
|
+
* e não é propagado para seus `subItems`.
|
|
18
|
+
*
|
|
19
|
+
* > Itens disabled que não possuem `subItems` são ignorados na navegação por teclado.
|
|
20
|
+
* Itens disabled que possuem `subItems` continuam participando da navegação, permitindo expandir/recolher.
|
|
21
|
+
*
|
|
22
|
+
* @default `false`
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @optional
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
*
|
|
30
|
+
* Expande o item, exibindo seus `subItems`.
|
|
31
|
+
*
|
|
32
|
+
* Quando `true`, o item será renderizado no estado expandido.
|
|
33
|
+
*
|
|
34
|
+
* > Sem efeito em itens que não possuem `subItems`.
|
|
35
|
+
*
|
|
36
|
+
* @default `false`
|
|
37
|
+
*/
|
|
15
38
|
expanded?: boolean;
|
|
16
39
|
/**
|
|
40
|
+
* @optional
|
|
41
|
+
*
|
|
42
|
+
* @description
|
|
43
|
+
*
|
|
44
|
+
* Permite ativar ou desativar a seleção do item.
|
|
45
|
+
*
|
|
46
|
+
* Quando `false`, o item não poderá ser selecionado pelo usuário.
|
|
47
|
+
*
|
|
48
|
+
* @deprecated v23.x.x use `disabled`
|
|
49
|
+
*/
|
|
50
|
+
isSelectable?: boolean | null;
|
|
51
|
+
/**
|
|
52
|
+
* @description
|
|
53
|
+
*
|
|
54
|
+
* Texto de exibição do item.
|
|
55
|
+
*
|
|
56
|
+
* O valor é utilizado como `aria-label` do nó e como referência na navegação por caractere do teclado.
|
|
57
|
+
*/
|
|
58
|
+
label: string;
|
|
59
|
+
/**
|
|
60
|
+
* @optional
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
*
|
|
17
64
|
* Marca o item como selecionado.
|
|
18
65
|
*
|
|
19
|
-
* > Caso o item que
|
|
66
|
+
* > Caso o item que possuir `subItems` for selecionado, os seus itens filhos serão também selecionados.
|
|
67
|
+
*
|
|
68
|
+
* Quando utilizado com `p-single-select`, apenas um item pode estar selecionado por vez.
|
|
69
|
+
* Ao selecionar outro item, o anteriormente selecionado perde o estado.
|
|
70
|
+
*
|
|
71
|
+
* @default `false`
|
|
20
72
|
*/
|
|
21
73
|
selected?: boolean | null;
|
|
22
74
|
/**
|
|
23
|
-
*
|
|
75
|
+
* @optional
|
|
76
|
+
*
|
|
77
|
+
* @description
|
|
78
|
+
*
|
|
79
|
+
* Habilita a exibição de ícone no item.
|
|
80
|
+
*
|
|
81
|
+
* Quando `true`, exibe automaticamente:
|
|
82
|
+
* - `an-folder-simple` para itens agrupadores (que possuem `subItems`).
|
|
83
|
+
* - `an-file` para itens finais (sem `subItems`).
|
|
84
|
+
*
|
|
85
|
+
* > Não funciona em conjunto com `p-selectable`.
|
|
86
|
+
* Quando `p-selectable` e `showIcon` estiverem configurados como `true`,
|
|
87
|
+
* `p-selectable` terá precedência.
|
|
88
|
+
*
|
|
89
|
+
* @default `false`
|
|
90
|
+
*/
|
|
91
|
+
showIcon?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @optional
|
|
94
|
+
*
|
|
95
|
+
* @description
|
|
96
|
+
*
|
|
97
|
+
* Lista de itens do próximo nível, permitindo a construção hierárquica da árvore.
|
|
98
|
+
*
|
|
99
|
+
* A estrutura pode ser aninhada recursivamente até o limite definido pela propriedade `p-max-level` do componente.
|
|
24
100
|
*/
|
|
25
|
-
isSelectable?: boolean | null;
|
|
26
|
-
/** Lista de itens do próximo nível, e assim consecutivamente até que se atinja o quarto nível. */
|
|
27
101
|
subItems?: Array<PoTreeViewItem>;
|
|
102
|
+
/**
|
|
103
|
+
* @description
|
|
104
|
+
*
|
|
105
|
+
* Valor do item utilizado como referência para sua identificação.
|
|
106
|
+
*
|
|
107
|
+
* Em modo `p-single-select`, este valor é utilizado para determinar qual item está atualmente selecionado.
|
|
108
|
+
*/
|
|
109
|
+
value: string | number;
|
|
28
110
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { PoTreeViewItem } from '../po-tree-view-item/po-tree-view-item.interface';
|
|
3
|
+
export declare class PoTreeViewItemContentComponent {
|
|
4
|
+
private readonly keyboardService;
|
|
5
|
+
private readonly languageService;
|
|
6
|
+
protected readonly literals: any;
|
|
7
|
+
protected inputCheckbox: any;
|
|
8
|
+
protected lineElement: ElementRef<HTMLElement>;
|
|
9
|
+
readonly componentsSize: import("@angular/core").InputSignal<string>;
|
|
10
|
+
readonly item: import("@angular/core").InputSignal<PoTreeViewItem>;
|
|
11
|
+
readonly level: import("@angular/core").InputSignal<number>;
|
|
12
|
+
readonly selectable: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
readonly selectedValue: import("@angular/core").InputSignal<string | number>;
|
|
14
|
+
readonly singleSelect: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
readonly expanded: import("@angular/core").OutputEmitterRef<void>;
|
|
16
|
+
readonly selected: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
17
|
+
readonly activated: import("@angular/core").OutputEmitterRef<PoTreeViewItem>;
|
|
18
|
+
protected idRadio: string;
|
|
19
|
+
protected isLabelTruncated: boolean;
|
|
20
|
+
protected get hasSubItems(): boolean;
|
|
21
|
+
protected get expandIcon(): string;
|
|
22
|
+
protected get isDisabled(): boolean;
|
|
23
|
+
protected get isExpanded(): boolean;
|
|
24
|
+
protected get isSelected(): boolean;
|
|
25
|
+
protected get itemIcon(): string | undefined;
|
|
26
|
+
protected onLineFocus(event: FocusEvent): void;
|
|
27
|
+
protected onLineMouseEnter(event: MouseEvent): void;
|
|
28
|
+
private updateLabelTruncation;
|
|
29
|
+
protected onLineClick(event: MouseEvent): void;
|
|
30
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
31
|
+
private handleArrowRight;
|
|
32
|
+
private handleArrowLeft;
|
|
33
|
+
private handleSelect;
|
|
34
|
+
private applyPressedState;
|
|
35
|
+
private handleCharacterNavigation;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const poTreeViewItemContentLiterals: {
|
|
2
|
+
en: {
|
|
3
|
+
collapse: string;
|
|
4
|
+
expand: string;
|
|
5
|
+
};
|
|
6
|
+
es: {
|
|
7
|
+
collapse: string;
|
|
8
|
+
expand: string;
|
|
9
|
+
};
|
|
10
|
+
pt: {
|
|
11
|
+
collapse: string;
|
|
12
|
+
expand: string;
|
|
13
|
+
};
|
|
14
|
+
ru: {
|
|
15
|
+
collapse: string;
|
|
16
|
+
expand: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { PoTreeViewBaseComponent } from './po-tree-view-base.component';
|
|
3
3
|
/**
|
|
4
4
|
* @docsExtends PoTreeViewBaseComponent
|
|
@@ -25,10 +25,21 @@ import { PoTreeViewBaseComponent } from './po-tree-view-base.component';
|
|
|
25
25
|
* <file name="sample-po-tree-view-supermarket/sample-po-tree-view-supermarket.component.ts"> </file>
|
|
26
26
|
* </example>
|
|
27
27
|
*/
|
|
28
|
-
export declare class PoTreeViewComponent extends PoTreeViewBaseComponent implements OnInit,
|
|
28
|
+
export declare class PoTreeViewComponent extends PoTreeViewBaseComponent implements OnInit, AfterViewInit {
|
|
29
|
+
private readonly elementRef;
|
|
30
|
+
private readonly destroyRef;
|
|
29
31
|
private readonly treeViewService;
|
|
30
|
-
|
|
32
|
+
private readonly keyboardService;
|
|
33
|
+
private readonly languageService;
|
|
34
|
+
private readonly changeDetector;
|
|
35
|
+
protected readonly literals: any;
|
|
36
|
+
protected ariaLiveMessage: string;
|
|
37
|
+
protected get hasItems(): boolean;
|
|
38
|
+
constructor();
|
|
31
39
|
ngOnInit(): void;
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
ngAfterViewInit(): void;
|
|
41
|
+
protected onTreeFocus(event: FocusEvent): void;
|
|
42
|
+
protected onTreeKeydown(event: KeyboardEvent): void;
|
|
43
|
+
protected trackByFunction(index: number): number;
|
|
44
|
+
private announce;
|
|
34
45
|
}
|