@po-ui/ng-components 21.30.0 → 21.31.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-BEh4YifL.mjs → po-ui-ng-components-po-chart-modal-table.component-yOf0a_2R.mjs} +4 -4
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-BEh4YifL.mjs.map → po-ui-ng-components-po-chart-modal-table.component-yOf0a_2R.mjs.map} +1 -1
- package/fesm2022/po-ui-ng-components.mjs +1873 -1286
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +5 -0
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +15 -0
- package/lib/components/po-listbox/po-listbox-base.component.d.ts +1 -1
- package/lib/components/po-listbox/po-listbox.component.d.ts +6 -0
- package/lib/components/po-page/po-page-slide/index.d.ts +1 -0
- package/lib/components/po-page/po-page-slide/interfaces/po-page-slide-literals.interface.d.ts +2 -0
- package/lib/components/po-page/po-page-slide/po-page-slide-base.component.d.ts +13 -3
- package/lib/components/po-page/po-page-slide/po-page-slide-size.type.d.ts +16 -0
- package/lib/components/po-page/po-page-slide/po-page-slide.component.d.ts +4 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/po-drag-drop/index.d.ts +6 -0
- package/lib/directives/po-drag-drop/interfaces/po-draggable-item.interface.d.ts +77 -0
- package/lib/directives/po-drag-drop/po-drag-base.directive.d.ts +52 -0
- package/lib/directives/po-drag-drop/po-drag-drop.module.d.ts +9 -0
- package/lib/directives/po-drag-drop/po-drag-handle-button/po-drag-handle-button.component.d.ts +31 -0
- package/lib/directives/po-drag-drop/po-drag.directive.d.ts +55 -0
- package/lib/directives/po-drag-drop/po-drop-list-base.directive.d.ts +90 -0
- package/lib/directives/po-drag-drop/po-drop-list.directive.d.ts +33 -0
- package/package.json +4 -4
- package/po-ui-ng-components-21.31.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 +389 -13
- package/po-ui-ng-components-21.30.0.tgz +0 -0
|
@@ -220,6 +220,11 @@ export declare abstract class PoLookupBaseComponent implements ControlValueAcces
|
|
|
220
220
|
*
|
|
221
221
|
* > Caso não seja passado um objeto ou então ele esteja em branco o link de busca avançada ficará escondido.
|
|
222
222
|
*
|
|
223
|
+
* > A busca avançada é construída a partir do `po-dynamic-form`. Em aplicações que não importam o `PoModule`,
|
|
224
|
+
* como projetos *standalone* ou que utilizam módulos específicos, é necessário importar o `PoDynamicModule`
|
|
225
|
+
* no componente ou módulo onde o `po-lookup` é utilizado, caso contrário será lançado o erro
|
|
226
|
+
* `NG0201: No provider found for _TitleCasePipe` ao abrir a busca avançada.
|
|
227
|
+
*
|
|
223
228
|
* Exemplo de URL com busca avançada:
|
|
224
229
|
*
|
|
225
230
|
* ```
|
|
@@ -22,6 +22,21 @@ import { PoHelperComponent } from '../../po-helper';
|
|
|
22
22
|
* </po-lookup>
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
+
* - Ao utilizar a propriedade `p-advanced-filters`, a janela de busca avançada é construída
|
|
26
|
+
* a partir do `po-dynamic-form`. Em aplicações que não importam o `PoModule`, como projetos
|
|
27
|
+
* *standalone* ou que utilizam módulos específicos, é necessário importar o `PoDynamicModule`
|
|
28
|
+
* no componente ou módulo onde o `po-lookup` é utilizado, caso contrário será lançado o erro
|
|
29
|
+
* `NG0201: No provider found for _TitleCasePipe` ao abrir a busca avançada.
|
|
30
|
+
* ```
|
|
31
|
+
* import { PoDynamicModule, PoFieldModule } from '@po-ui/ng-components';
|
|
32
|
+
*
|
|
33
|
+
* @Component({
|
|
34
|
+
* standalone: true,
|
|
35
|
+
* imports: [PoFieldModule, PoDynamicModule]
|
|
36
|
+
* })
|
|
37
|
+
* export class MyComponent {}
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
25
40
|
* #### Tokens customizáveis
|
|
26
41
|
*
|
|
27
42
|
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
@@ -24,7 +24,7 @@ export declare class PoListBoxBaseComponent {
|
|
|
24
24
|
private _size?;
|
|
25
25
|
private _initialSize?;
|
|
26
26
|
listboxSubitems: boolean;
|
|
27
|
-
visible: boolean
|
|
27
|
+
visible: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
28
28
|
set type(value: string);
|
|
29
29
|
get type(): PoItemListType;
|
|
30
30
|
set items(items: Array<PoItemListAction | PoItemListOption | PoItemListOptionGroup | any>);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { CdkListbox, CdkOption } from '@angular/cdk/listbox';
|
|
2
3
|
import { PoListBoxBaseComponent } from './po-listbox-base.component';
|
|
3
4
|
import { PoItemListOptionGroup } from './po-item-list/interfaces/po-item-list-option-group.interface';
|
|
4
5
|
import { PoItemListOption } from './po-item-list/interfaces/po-item-list-option.interface';
|
|
@@ -19,6 +20,8 @@ export declare class PoListBoxComponent extends PoListBoxBaseComponent implement
|
|
|
19
20
|
searchElement: PoSearchListComponent;
|
|
20
21
|
popupHeaderContainer: ElementRef;
|
|
21
22
|
listboxItems: QueryList<ElementRef>;
|
|
23
|
+
cdkListbox?: CdkListbox;
|
|
24
|
+
cdkOptions?: QueryList<CdkOption>;
|
|
22
25
|
private scrollEvent$;
|
|
23
26
|
private subscriptionScrollEvent;
|
|
24
27
|
constructor();
|
|
@@ -49,6 +52,9 @@ export declare class PoListBoxComponent extends PoListBoxBaseComponent implement
|
|
|
49
52
|
}): void;
|
|
50
53
|
scrollListener(componentListner: HTMLElement): Observable<any>;
|
|
51
54
|
setFocus(): void;
|
|
55
|
+
private getSelectedItem;
|
|
56
|
+
scrollToAndSelectCurrentItem(): void;
|
|
57
|
+
protected onListboxFocusIn(event: FocusEvent): void;
|
|
52
58
|
protected checkInfiniteScroll(): void;
|
|
53
59
|
protected getSizeLoading(): "xs" | "sm" | "md";
|
|
54
60
|
protected getTextLoading(): "" | " ";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { PoPageSlideSize } from './po-page-slide-size.type';
|
|
2
3
|
/**
|
|
3
4
|
* @description
|
|
4
5
|
*
|
|
@@ -103,7 +104,10 @@ export declare class PoPageSlideBaseComponent {
|
|
|
103
104
|
*
|
|
104
105
|
* Oculta o botão de encerramento da página.
|
|
105
106
|
*
|
|
106
|
-
*
|
|
107
|
+
* > Para evitar que o usuário fique sem forma de fechar, esta opção só é mantida quando houver uma
|
|
108
|
+
* > ação alternativa de fechamento: `p-click-out` habilitado ou, no modo `full`, um
|
|
109
|
+
* > [`po-page-slide-footer`](/documentation/po-page-slide-footer) com ação de fechar.
|
|
110
|
+
* > Caso contrário, o botão de fechar é reexibido automaticamente ao abrir.
|
|
107
111
|
*
|
|
108
112
|
* @default `false`
|
|
109
113
|
*/
|
|
@@ -153,13 +157,18 @@ export declare class PoPageSlideBaseComponent {
|
|
|
153
157
|
* - `lg` (grande)
|
|
154
158
|
* - `xl` (extra-grande)
|
|
155
159
|
* - `auto` (automático)
|
|
160
|
+
* - `full` (tela cheia): a página ocupa 100% da largura da tela e o overlay de fundo não é renderizado.
|
|
156
161
|
*
|
|
157
|
-
* > Todas as opções de tamanho, exceto `auto`, possuem uma largura máxima de **768px**.
|
|
162
|
+
* > Todas as opções de tamanho, exceto `auto` e `full`, possuem uma largura máxima de **768px**.
|
|
163
|
+
*
|
|
164
|
+
* > No modo `full`, como não há overlay, o fechamento por clique fora (`p-click-out`) não é aplicável.
|
|
165
|
+
* > O encerramento continua disponível pelo botão do cabeçalho, pela tecla `Escape`, pelo método `#close()`
|
|
166
|
+
* > ou por um botão no [`po-page-slide-footer`](/documentation/po-page-slide-footer).
|
|
158
167
|
*
|
|
159
168
|
* @default `md`
|
|
160
169
|
*/
|
|
161
170
|
set size(value: string);
|
|
162
|
-
get size():
|
|
171
|
+
get size(): PoPageSlideSize;
|
|
163
172
|
/**
|
|
164
173
|
* @optional
|
|
165
174
|
*
|
|
@@ -197,6 +206,7 @@ export declare class PoPageSlideBaseComponent {
|
|
|
197
206
|
* ```
|
|
198
207
|
*/
|
|
199
208
|
open(): void;
|
|
209
|
+
protected hasAlternativeCloseAction(): boolean;
|
|
200
210
|
/**
|
|
201
211
|
* Encerra a visualização da página.
|
|
202
212
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoPageSlide
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os tamanhos válidos para a largura do `po-page-slide`.
|
|
7
|
+
*
|
|
8
|
+
* Valores válidos:
|
|
9
|
+
* - `sm`: pequeno.
|
|
10
|
+
* - `md`: médio (padrão).
|
|
11
|
+
* - `lg`: grande.
|
|
12
|
+
* - `xl`: extra-grande.
|
|
13
|
+
* - `auto`: automático.
|
|
14
|
+
* - `full`: ocupa 100% da largura da tela e oculta o overlay de fundo.
|
|
15
|
+
*/
|
|
16
|
+
export type PoPageSlideSize = 'sm' | 'md' | 'lg' | 'xl' | 'auto' | 'full';
|
|
@@ -37,6 +37,7 @@ export declare class PoPageSlideComponent extends PoPageSlideBaseComponent {
|
|
|
37
37
|
private readonly loadingCompleted;
|
|
38
38
|
private sourceElement;
|
|
39
39
|
buttonAriaLabel: string;
|
|
40
|
+
defaultDialogLabel: string;
|
|
40
41
|
duration: string;
|
|
41
42
|
timing: string;
|
|
42
43
|
private focusEvent;
|
|
@@ -44,11 +45,14 @@ export declare class PoPageSlideComponent extends PoPageSlideBaseComponent {
|
|
|
44
45
|
set pageContent(pageContent: ElementRef);
|
|
45
46
|
get pageContent(): ElementRef;
|
|
46
47
|
constructor();
|
|
48
|
+
get titleId(): string;
|
|
47
49
|
open(): void;
|
|
50
|
+
protected hasAlternativeCloseAction(): boolean;
|
|
48
51
|
close(): void;
|
|
49
52
|
onClickOut(event: MouseEvent): void;
|
|
50
53
|
private setTimeFromCSS;
|
|
51
54
|
private getTextDefault;
|
|
55
|
+
private getLabelDefault;
|
|
52
56
|
private handleFocus;
|
|
53
57
|
private initFocus;
|
|
54
58
|
private loadFirstElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './interfaces/po-draggable-item.interface';
|
|
2
|
+
export * from './po-drag-base.directive';
|
|
3
|
+
export * from './po-drag.directive';
|
|
4
|
+
export * from './po-drop-list-base.directive';
|
|
5
|
+
export * from './po-drop-list.directive';
|
|
6
|
+
export * from './po-drag-drop.module';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoDropListDirective, PoDragDirective
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define a estrutura de um item arrastável genérico utilizado pelas diretivas
|
|
7
|
+
* `PoDropListDirective` e `PoDragDirective`.
|
|
8
|
+
*
|
|
9
|
+
* A interface é intencionalmente leve — contém apenas os campos essenciais para
|
|
10
|
+
* qualquer componente arrastável.
|
|
11
|
+
*/
|
|
12
|
+
export interface PoDraggableItem {
|
|
13
|
+
/** Identificador único do item. */
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* @optional
|
|
17
|
+
* @description
|
|
18
|
+
*
|
|
19
|
+
* Dados arbitrários do consumidor. Útil para associar informações extras
|
|
20
|
+
* ao item sem estender a interface.
|
|
21
|
+
*/
|
|
22
|
+
data?: any;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @usedBy PoDropListDirective
|
|
26
|
+
*
|
|
27
|
+
* @description
|
|
28
|
+
*
|
|
29
|
+
* Evento emitido quando um item é solto em um container (`p-drop-list`), contendo os índices,
|
|
30
|
+
* o item movido e os identificadores dos containers envolvidos.
|
|
31
|
+
*/
|
|
32
|
+
export interface PoDropEvent {
|
|
33
|
+
/** Índice original do item antes do drop. */
|
|
34
|
+
previousIndex: number;
|
|
35
|
+
/** Índice final do item após o drop. */
|
|
36
|
+
currentIndex: number;
|
|
37
|
+
/** O item que foi movido. */
|
|
38
|
+
item: PoDraggableItem;
|
|
39
|
+
/**
|
|
40
|
+
* @description
|
|
41
|
+
* Array resultante após o drop, já com a nova ordem aplicada.
|
|
42
|
+
* Use este valor para atualizar o signal ou array do consumidor.
|
|
43
|
+
*/
|
|
44
|
+
items: Array<PoDraggableItem>;
|
|
45
|
+
/** Identificador do container de destino. */
|
|
46
|
+
container: string;
|
|
47
|
+
/**
|
|
48
|
+
* @optional
|
|
49
|
+
* @description
|
|
50
|
+
* Identificador do container de origem. Preenchido apenas quando o item
|
|
51
|
+
* foi transferido entre containers distintos.
|
|
52
|
+
*/
|
|
53
|
+
previousContainer?: string;
|
|
54
|
+
dropPoint?: any;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @usedBy PoDropListDirective
|
|
58
|
+
*
|
|
59
|
+
* @description
|
|
60
|
+
*
|
|
61
|
+
* Evento emitido quando um item entra em um container `p-drop-list`.
|
|
62
|
+
*/
|
|
63
|
+
export interface PoDragEnterEvent<T = any> {
|
|
64
|
+
/** O item que entrou no container. */
|
|
65
|
+
item: T;
|
|
66
|
+
/** Identificador do container que recebeu o item. */
|
|
67
|
+
container: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @usedBy PoDragDirective
|
|
71
|
+
*
|
|
72
|
+
* @description
|
|
73
|
+
*
|
|
74
|
+
* Evento emitido continuamente enquanto o item está sendo arrastado.
|
|
75
|
+
* Contém a posição do ponteiro e a distância percorrida desde o início do arraste.
|
|
76
|
+
*/
|
|
77
|
+
export { CdkDragMove as PoDragMovedEvent } from '@angular/cdk/drag-drop';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PoDraggableItem, PoDragMovedEvent } from './interfaces/po-draggable-item.interface';
|
|
2
|
+
export declare abstract class PoDragBaseDirective {
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Dado associado ao item arrastável. O valor é emitido nos eventos
|
|
7
|
+
* `p-drag-started` e `p-drag-ended`.
|
|
8
|
+
*/
|
|
9
|
+
data: import("@angular/core").InputSignal<PoDraggableItem>;
|
|
10
|
+
/**
|
|
11
|
+
* @optional
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
*
|
|
15
|
+
* Desabilita o arraste do item. Quando `true`, o usuário não pode iniciar
|
|
16
|
+
* um gesto de arrastar neste elemento, mas o item continua participando do
|
|
17
|
+
* cálculo de posições dos vizinhos dentro do `p-drop-list`.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
dragDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* @optional
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
*
|
|
27
|
+
* Evento emitido quando o arraste do item é iniciado.
|
|
28
|
+
* O valor emitido é o dado associado ao item (propriedade `p-drag`).
|
|
29
|
+
*/
|
|
30
|
+
dragStarted: import("@angular/core").OutputEmitterRef<PoDraggableItem>;
|
|
31
|
+
/**
|
|
32
|
+
* @optional
|
|
33
|
+
*
|
|
34
|
+
* @description
|
|
35
|
+
*
|
|
36
|
+
* Evento emitido quando o arraste do item é encerrado.
|
|
37
|
+
* O valor emitido é o dado associado ao item (propriedade `p-drag`).
|
|
38
|
+
*/
|
|
39
|
+
dragEnded: import("@angular/core").OutputEmitterRef<PoDraggableItem>;
|
|
40
|
+
/**
|
|
41
|
+
* @optional
|
|
42
|
+
*
|
|
43
|
+
* @description
|
|
44
|
+
*
|
|
45
|
+
* Evento emitido continuamente enquanto o item está sendo arrastado.
|
|
46
|
+
* Contém a posição do ponteiro, a distância percorrida e a direção do movimento.
|
|
47
|
+
*
|
|
48
|
+
* > **Atenção:** Este evento é disparado em alta frequência (a cada frame de movimento).
|
|
49
|
+
* > Evite operações custosas no handler ou aplique técnicas de throttle/debounce.
|
|
50
|
+
*/
|
|
51
|
+
dragMoved: import("@angular/core").OutputEmitterRef<PoDragMovedEvent<any>>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
*
|
|
4
|
+
* Módulo que exporta as diretivas de drag & drop do PO UI:
|
|
5
|
+
* - `PoDropListDirective` (`p-drop-list`) — define um container de drop.
|
|
6
|
+
* - `PoDragDirective` (`p-drag`) — torna um elemento arrastável.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PoDragDropModule {
|
|
9
|
+
}
|
package/lib/directives/po-drag-drop/po-drag-handle-button/po-drag-handle-button.component.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PoButtonSize } from '../../../components/po-button/enums/po-button-size.enum';
|
|
2
|
+
export declare const poDragHandleButtonLiteralsDefault: {
|
|
3
|
+
en: {
|
|
4
|
+
dragToReorder: string;
|
|
5
|
+
};
|
|
6
|
+
es: {
|
|
7
|
+
dragToReorder: string;
|
|
8
|
+
};
|
|
9
|
+
pt: {
|
|
10
|
+
dragToReorder: string;
|
|
11
|
+
};
|
|
12
|
+
ru: {
|
|
13
|
+
dragToReorder: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @docsPrivate
|
|
18
|
+
*
|
|
19
|
+
* Componente interno criado programaticamente pela diretiva `poDrag`.
|
|
20
|
+
* Renderiza o botão de handle de arraste posicionado absolutamente sobre o
|
|
21
|
+
* elemento arrastável. Visível apenas no hover, via CSS da diretiva.
|
|
22
|
+
*
|
|
23
|
+
* Não deve ser instanciado diretamente pelo consumidor.
|
|
24
|
+
*/
|
|
25
|
+
export declare class PoDragHandleButtonComponent {
|
|
26
|
+
readonly sizeInput: import("@angular/core").InputSignal<string>;
|
|
27
|
+
readonly literals: any;
|
|
28
|
+
private readonly themeChangeSignal;
|
|
29
|
+
readonly resolvedSize: import("@angular/core").Signal<PoButtonSize>;
|
|
30
|
+
protected onThemeChange(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { PoDragBaseDirective } from './po-drag-base.directive';
|
|
3
|
+
/**
|
|
4
|
+
* @docsExtends PoDragBaseDirective
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
*
|
|
8
|
+
* A diretiva `p-drag` torna um elemento arrastável, encapsulando o `CdkDrag` do Angular CDK.
|
|
9
|
+
*
|
|
10
|
+
* Ela pode ser usada em conjunto com a diretiva `p-drop-list`. O valor atribuído ao seletor (`p-drag`)
|
|
11
|
+
* corresponde ao dado do item, que é emitido nos eventos de drag.
|
|
12
|
+
*
|
|
13
|
+
* > Atualmente validada com o componente `po-widget`. O suporte a outros componentes
|
|
14
|
+
* > PO UI será avaliado em versões futuras.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* <example name="po-drag-basic" title="PO Drag Basic" >
|
|
19
|
+
* <file name="sample-po-drag-basic/sample-po-drag-basic.component.html"> </file>
|
|
20
|
+
* <file name="sample-po-drag-basic/sample-po-drag-basic.component.ts"> </file>
|
|
21
|
+
* </example>
|
|
22
|
+
*
|
|
23
|
+
* <example name="po-drop-list-vertical" title="PO Drop List - Vertical (Kanban)" >
|
|
24
|
+
* <file name="sample-po-drop-list-vertical/sample-po-drop-list-vertical.component.html"> </file>
|
|
25
|
+
* <file name="sample-po-drop-list-vertical/sample-po-drop-list-vertical.component.ts"> </file>
|
|
26
|
+
* </example>
|
|
27
|
+
*
|
|
28
|
+
* <example name="po-drop-list-horizontal" title="PO Drop List - Horizontal (Pipeline)" >
|
|
29
|
+
* <file name="sample-po-drop-list-horizontal/sample-po-drop-list-horizontal.component.html"> </file>
|
|
30
|
+
* <file name="sample-po-drop-list-horizontal/sample-po-drop-list-horizontal.component.ts"> </file>
|
|
31
|
+
* </example>
|
|
32
|
+
*
|
|
33
|
+
* <example name="po-drop-list-mixed" title="PO Drop List - Mixed (Dashboard)" >
|
|
34
|
+
* <file name="sample-po-drop-list-mixed/sample-po-drop-list-mixed.component.html"> </file>
|
|
35
|
+
* <file name="sample-po-drop-list-mixed/sample-po-drop-list-mixed.component.ts"> </file>
|
|
36
|
+
* </example>
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export declare class PoDragDirective extends PoDragBaseDirective implements OnInit, OnDestroy {
|
|
40
|
+
private readonly cdkDrag;
|
|
41
|
+
private readonly el;
|
|
42
|
+
private readonly renderer;
|
|
43
|
+
private readonly injector;
|
|
44
|
+
private readonly envInjector;
|
|
45
|
+
private readonly appRef;
|
|
46
|
+
private readonly parentDropList;
|
|
47
|
+
private handleRef;
|
|
48
|
+
constructor();
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
ngOnDestroy(): void;
|
|
51
|
+
private appendHandle;
|
|
52
|
+
private destroyHandle;
|
|
53
|
+
private removeTooltipOnDragStart;
|
|
54
|
+
private appendItemHover;
|
|
55
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { PoDragEnterEvent, PoDraggableItem, PoDropEvent } from './interfaces/po-draggable-item.interface';
|
|
2
|
+
export declare abstract class PoDropListBaseDirective {
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Lista de itens gerenciada pelo container. A diretiva muta este array
|
|
7
|
+
* diretamente ao reordenar ou transferir itens entre containers.
|
|
8
|
+
*
|
|
9
|
+
* O array atualizado é refletido no evento `p-dropped`.
|
|
10
|
+
*/
|
|
11
|
+
items: import("@angular/core").InputSignal<PoDraggableItem[]>;
|
|
12
|
+
/**
|
|
13
|
+
* @optional
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
*
|
|
17
|
+
* Identificador único do container. Utilizado para conectar múltiplos
|
|
18
|
+
* containers via `p-drop-list-connected-to`.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
dropListId: import("@angular/core").InputSignal<string>;
|
|
22
|
+
/**
|
|
23
|
+
* @optional
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
*
|
|
27
|
+
* Desabilita o drag para os elementos dentro do container.
|
|
28
|
+
* Quando `true`, seus elementos não poderão ser arrastados, porém elementos de outros containers poderão ser arrastados para dentro dele.
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
dropListDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* @optional
|
|
35
|
+
*
|
|
36
|
+
* @description
|
|
37
|
+
*
|
|
38
|
+
* Lista de containers conectados. Aceita um array de ids (`string`). Quando configurado,
|
|
39
|
+
* itens podem ser arrastados entre os containers listados.
|
|
40
|
+
*/
|
|
41
|
+
dropListConnectedTo: import("@angular/core").InputSignal<string[]>;
|
|
42
|
+
/**
|
|
43
|
+
* @optional
|
|
44
|
+
*
|
|
45
|
+
* @description
|
|
46
|
+
*
|
|
47
|
+
* Orientação dos itens dentro do container. Afeta a lógica de sombra de
|
|
48
|
+
* posicionamento do Angular CDK durante o arraste.
|
|
49
|
+
*
|
|
50
|
+
* Valores aceitos: `'horizontal'` | `'vertical'` | `'mixed'`.
|
|
51
|
+
*
|
|
52
|
+
* @default `'vertical'`
|
|
53
|
+
*/
|
|
54
|
+
dropListOrientation: import("@angular/core").InputSignal<"horizontal" | "vertical" | "mixed">;
|
|
55
|
+
/**
|
|
56
|
+
* @optional
|
|
57
|
+
*
|
|
58
|
+
* @description
|
|
59
|
+
*
|
|
60
|
+
* Desabilita a reordenação automática dos itens durante o arraste.
|
|
61
|
+
*
|
|
62
|
+
* Quando `true`, permite arrastar o item sem alterar sua posição na lista de origem.
|
|
63
|
+
* A transferência de itens entre containers conectados continua funcionando.
|
|
64
|
+
*
|
|
65
|
+
* Use esta propriedade quando a reordenação dos itens for realizada por uma lógica
|
|
66
|
+
* personalizada do consumidor.
|
|
67
|
+
*
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
dropSortingDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
71
|
+
/**
|
|
72
|
+
* @optional
|
|
73
|
+
*
|
|
74
|
+
* @description
|
|
75
|
+
*
|
|
76
|
+
* Evento emitido quando um item é solto dentro deste container.
|
|
77
|
+
* Contém os índices anterior e atual, o item movido e os ids dos
|
|
78
|
+
* containers de origem e destino.
|
|
79
|
+
*/
|
|
80
|
+
dropped: import("@angular/core").OutputEmitterRef<PoDropEvent>;
|
|
81
|
+
/**
|
|
82
|
+
* @optional
|
|
83
|
+
*
|
|
84
|
+
* @description
|
|
85
|
+
*
|
|
86
|
+
* Evento emitido quando um item externo entra neste container durante o arraste.
|
|
87
|
+
* Contém o item que entrou e o id do container de origem.
|
|
88
|
+
*/
|
|
89
|
+
dragEntered: import("@angular/core").OutputEmitterRef<PoDragEnterEvent<PoDraggableItem>>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { PoDropListBaseDirective } from './po-drop-list-base.directive';
|
|
3
|
+
/**
|
|
4
|
+
* @docsExtends PoDropListBaseDirective
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
*
|
|
8
|
+
* A diretiva `p-drop-list` define um container onde componentes `po-widget` podem ser
|
|
9
|
+
* arrastados e reorganizados, encapsulando o `CdkDropList` do Angular CDK.
|
|
10
|
+
*
|
|
11
|
+
* Permite:
|
|
12
|
+
* - Reordenação de `po-widget` dentro de um único container.
|
|
13
|
+
* - Transferência de `po-widget` entre containers conectados via `p-drop-list-connected-to`.
|
|
14
|
+
* - Itens individuais desabilitados via `p-drag-disabled` na diretiva `p-drag`.
|
|
15
|
+
*
|
|
16
|
+
* > Atualmente esta diretiva é suportada para uso com `po-widget`.
|
|
17
|
+
* > O suporte a outros componentes será avaliado em versões futuras.
|
|
18
|
+
*
|
|
19
|
+
* > A diretiva não impõe nenhum estilo de layout (flex, grid etc.). O layout
|
|
20
|
+
* > é responsabilidade do consumidor.
|
|
21
|
+
*/
|
|
22
|
+
export declare class PoDropListDirective extends PoDropListBaseDirective implements OnInit, OnDestroy {
|
|
23
|
+
private readonly cdkDropList;
|
|
24
|
+
private readonly subscriptions;
|
|
25
|
+
/** Último índice confirmado pelo evento sorted. Usado para corrigir o currentIndex
|
|
26
|
+
* do dropped, que pode ficar dessincronizado em listas horizontais com itens de
|
|
27
|
+
* tamanhos diferentes (ping-pong do CDK). */
|
|
28
|
+
private lastSortedIndex;
|
|
29
|
+
constructor();
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
private handleDrop;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.31.0",
|
|
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.14",
|
|
25
|
-
"@po-ui/style": "21.
|
|
26
|
-
"@po-ui/ng-schematics": "21.
|
|
25
|
+
"@po-ui/style": "21.31.0",
|
|
26
|
+
"@po-ui/ng-schematics": "21.31.0",
|
|
27
27
|
"driver.js": "~1.4.0",
|
|
28
28
|
"echarts": "^6.1.0",
|
|
29
29
|
"tslib": "^2.6.2"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@angular/platform-browser-dynamic": "^21",
|
|
40
40
|
"@angular/router": "^21",
|
|
41
41
|
"@angular-devkit/schematics": "^21",
|
|
42
|
-
"@po-ui/style": "21.
|
|
42
|
+
"@po-ui/style": "21.31.0",
|
|
43
43
|
"rxjs": "~7.8.1",
|
|
44
44
|
"zone.js": "~0.15.0"
|
|
45
45
|
},
|
|
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.31.0');
|
|
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.31.0', 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.31.0', 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.31.0', 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.31.0', 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.31.0', 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.31.0', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -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.31.0', 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.31.0', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|