keevo-components 1.8.348 → 1.8.350
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/esm2022/lib/api/components/chart/orchart.config.mjs +1 -1
- package/esm2022/lib/api/components/chart/orchartnode.mjs +2 -0
- package/esm2022/lib/api/services/image.cutter.service.mjs +20 -15
- package/esm2022/lib/api/services/orgchart.service.mjs +64 -0
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.component.mjs +139 -66
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.module.mjs +16 -5
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/keevo-components.mjs +229 -82
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/components/chart/orchart.config.d.ts +12 -12
- package/lib/api/components/chart/{orchart.item.d.ts → orchartnode.d.ts} +13 -5
- package/lib/api/services/orgchart.service.d.ts +20 -0
- package/lib/components/kv-orgchart/kv-orgchart.component.d.ts +23 -15
- package/lib/components/kv-orgchart/kv-orgchart.module.d.ts +3 -1
- package/lib/components/kv-table/kv-table.component.d.ts +1 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/api/components/chart/orchart.item.mjs +0 -2
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
export default interface OrgChartConfig {
|
|
2
|
-
/**
|
|
3
|
-
* @type {string}
|
|
4
|
-
* Esse item espera uma string html template
|
|
5
|
-
* (no formato angular com interpolação de variaveis via {{data.'PROPIEDADE DESEJADA'}})
|
|
6
|
-
* Todos os dados expostos na propiedade data de
|
|
7
|
-
* cada item estão acessiveis pelo objeto data;
|
|
8
|
-
* Para realizar interpolação, referencie data entre {{}} e a chave desejada;
|
|
9
|
-
** Exemplo: ` <h1> Nome: {{data.nome}} </h1> `
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
templateItem: string;
|
|
13
2
|
/**
|
|
14
3
|
* @type {number}
|
|
15
4
|
* Esse item espera receber a largura media do card, para calculo do icone de collapse
|
|
@@ -19,7 +8,12 @@ export default interface OrgChartConfig {
|
|
|
19
8
|
* @type {number}
|
|
20
9
|
* Esse item espera receber a altura media do card, para calculo do icone de collapse
|
|
21
10
|
*/
|
|
22
|
-
cardHeight: number;
|
|
11
|
+
cardHeight: number | string;
|
|
12
|
+
/**
|
|
13
|
+
* @type {number}
|
|
14
|
+
* Esse item espera receber a altura media do card, para calculo do icone de collapse
|
|
15
|
+
*/
|
|
16
|
+
cardExpandedHeight?: number | string;
|
|
23
17
|
/**
|
|
24
18
|
* @type {string}
|
|
25
19
|
* Esse item espera receber a cor das connections
|
|
@@ -32,4 +26,10 @@ export default interface OrgChartConfig {
|
|
|
32
26
|
* * Default { 2 }
|
|
33
27
|
*/
|
|
34
28
|
conectionWidth?: number;
|
|
29
|
+
/**
|
|
30
|
+
* @type {string[]}
|
|
31
|
+
* Esse item espera receber o sletores css para emissão do evento de click
|
|
32
|
+
* * Default { 2 }
|
|
33
|
+
*/
|
|
34
|
+
clicks?: string[];
|
|
35
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import OrgChartConfig from "./orchart.config";
|
|
2
|
+
export default interface OrgChartNode {
|
|
2
3
|
/**
|
|
3
4
|
* @type {number}
|
|
4
5
|
* Esse item espera receber o identificador do card
|
|
@@ -12,15 +13,22 @@ export default interface OrgChartItem {
|
|
|
12
13
|
* @warning Caso tenha mais de um objeto com {{ parentId: null }} havera um erro de multiplos roots
|
|
13
14
|
*/
|
|
14
15
|
parentId: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* @type {T[]}
|
|
18
|
+
* Nós filhos desse nó
|
|
19
|
+
*/
|
|
20
|
+
children?: any[];
|
|
15
21
|
/**
|
|
16
22
|
* @type {object}
|
|
17
23
|
* Esse item espera receber os dados do card
|
|
18
24
|
* @warning Mantenha a consistencia de dados, caso tente acessar um dado que não exista em outro objeto havera um erro
|
|
19
25
|
*/
|
|
20
|
-
data:
|
|
26
|
+
data: any;
|
|
21
27
|
/**
|
|
22
|
-
* @type {object
|
|
23
|
-
* Esse item espera receber
|
|
28
|
+
* @type {object}
|
|
29
|
+
* Esse item espera receber os dados do card
|
|
30
|
+
* @warning Mantenha a consistencia de dados, caso tente acessar um dado que não exista em outro objeto havera um erro
|
|
24
31
|
*/
|
|
25
|
-
|
|
32
|
+
expanded: any;
|
|
33
|
+
orgConfig: OrgChartConfig;
|
|
26
34
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import OrgChartNode from '../components/chart/orchartnode';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class OrgChartService {
|
|
5
|
+
private nodeAddSubject;
|
|
6
|
+
nodeAdd$: import("rxjs").Observable<OrgChartNode>;
|
|
7
|
+
private nodeRemoveSubject;
|
|
8
|
+
nodeRemove$: import("rxjs").Observable<number>;
|
|
9
|
+
nodeRemove: EventEmitter<number>;
|
|
10
|
+
nodeClick: EventEmitter<{
|
|
11
|
+
node: OrgChartNode;
|
|
12
|
+
seletorCss: string;
|
|
13
|
+
}>;
|
|
14
|
+
adicionarNode(node: OrgChartNode): void;
|
|
15
|
+
removerNode(id: number): void;
|
|
16
|
+
setNodeExpanded(orgSource: OrgChartNode[], nodeId: number, expanded: boolean): OrgChartNode[];
|
|
17
|
+
modificarCampDataNode<T>(orgSource: OrgChartNode[], nodeId: number, field: keyof OrgChartNode['data'], value: T): OrgChartNode[];
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrgChartService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrgChartService>;
|
|
20
|
+
}
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import { ElementRef,
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import OrgChartConfig from '../../api/components/chart/orchart.config';
|
|
3
|
-
import
|
|
3
|
+
import OrgChartNode from '../../api/components/chart/orchartnode';
|
|
4
|
+
import { OrgChartService } from '../../api/services/orgchart.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class KvOrgchartComponent
|
|
6
|
-
private
|
|
7
|
-
|
|
6
|
+
export declare class KvOrgchartComponent {
|
|
7
|
+
private cdr;
|
|
8
|
+
private service;
|
|
8
9
|
chart: any;
|
|
9
|
-
dataSource:
|
|
10
|
+
dataSource: import("@angular/core").ModelSignal<OrgChartNode[] | null>;
|
|
10
11
|
config: OrgChartConfig;
|
|
11
|
-
|
|
12
|
+
chartContainer: ElementRef;
|
|
13
|
+
viewContainerRef: ViewContainerRef;
|
|
12
14
|
nodeTemplate: TemplateRef<any>;
|
|
13
|
-
|
|
14
|
-
templateFuncion: boolean;
|
|
15
|
-
corDeFundo: string;
|
|
15
|
+
onNodeClick: EventEmitter<any>;
|
|
16
16
|
compact: boolean;
|
|
17
17
|
mostraMenu: boolean;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(cdr: ChangeDetectorRef, service: OrgChartService);
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
ngAfterViewInit(): void;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
iniciarChart(): void;
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
renderNodeTemplate(node: OrgChartNode): string;
|
|
24
|
+
private nodeClickSubscription;
|
|
25
|
+
private nodeAddSubscription;
|
|
26
|
+
private nodeRemoveSubscription;
|
|
27
|
+
iniciarHandlersDeEventos(): void;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
emitirClick(node: Node, seletorCss?: string): void;
|
|
30
|
+
adicionarNode(node: OrgChartNode): void;
|
|
31
|
+
removerNode(id: number): void;
|
|
24
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvOrgchartComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KvOrgchartComponent, "kv-orgchart", never, { "dataSource": { "alias": "dataSource"; "required": false;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvOrgchartComponent, "kv-orgchart", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; }; }, { "dataSource": "dataSourceChange"; "onNodeClick": "onNodeClick"; }, never, never, false, never>;
|
|
26
34
|
}
|
|
@@ -2,8 +2,10 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./kv-orgchart.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "../../api/modules/primeng.module";
|
|
5
|
+
import * as i4 from "../kv-error/kv-error.module";
|
|
6
|
+
import * as i5 from "primeng/organizationchart";
|
|
5
7
|
export declare class KvOrgchartModule {
|
|
6
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvOrgchartModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KvOrgchartModule, [typeof i1.KvOrgchartComponent], [typeof i2.CommonModule, typeof i3.PrimeNgModule], [typeof i1.KvOrgchartComponent]>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KvOrgchartModule, [typeof i1.KvOrgchartComponent], [typeof i2.CommonModule, typeof i3.PrimeNgModule, typeof i4.kvErrorModule, typeof i3.PrimeNgModule, typeof i5.OrganizationChartModule], [typeof i1.KvOrgchartComponent]>;
|
|
8
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<KvOrgchartModule>;
|
|
9
11
|
}
|
|
@@ -132,7 +132,7 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
132
132
|
onClickEvent(event: any): void;
|
|
133
133
|
styleSetter(style: string, data: string): void;
|
|
134
134
|
checkMenuFiltro(col: any): void;
|
|
135
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
135
|
+
sortByPosition(): (elem1: any, elem2: any) => 0 | 1 | -1;
|
|
136
136
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
137
137
|
checkHideColumns(): void;
|
|
138
138
|
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
@@ -64,7 +64,7 @@ export declare class KvTableExpandableComponent implements OnInit, DoCheck {
|
|
|
64
64
|
onGlobalFilter(table: Table, event: Event): void;
|
|
65
65
|
executeCollapsed(): void;
|
|
66
66
|
checkMenuFiltro(col: any): void;
|
|
67
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
67
|
+
sortByPosition(): (elem1: any, elem2: any) => 0 | 1 | -1;
|
|
68
68
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
69
69
|
dinamicColumnSet(e: any, col: any): void;
|
|
70
70
|
addColumn(field: string): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export * from './lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.co
|
|
|
92
92
|
*/
|
|
93
93
|
export * from './lib/components/kv-orgchart/kv-orgchart.component';
|
|
94
94
|
export * from './lib/components/kv-orgchart/kv-orgchart.module';
|
|
95
|
+
export * from './lib/api/services/orgchart.service';
|
|
95
96
|
/**
|
|
96
97
|
* Picklist
|
|
97
98
|
*/
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JjaGFydC5pdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2FwaS9jb21wb25lbnRzL2NoYXJ0L29yY2hhcnQuaXRlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1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