keevo-components 2.0.216 → 2.0.217
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/services/EnumUtils.service.mjs +24 -0
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/keevo-components.mjs +7 -5
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/services/EnumUtils.service.d.ts +19 -0
- package/lib/components/kv-button/kv-button.component.d.ts +1 -1
- package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +1 -1
- package/lib/components/kv-icon/kv-icon.component.d.ts +1 -1
- package/lib/components/kv-table/kv-table.component.d.ts +1 -1
- package/lib/components/kv-table-draggable/kv-table-draggable.component.d.ts +1 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/lib/components/kv-tag/kv-tag.component.d.ts +1 -1
- package/lib/components/kv-widget-card/kv-widget-card.component.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/api/services/enum_utils.service.mjs +0 -22
- package/lib/api/services/enum_utils.service.d.ts +0 -24
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KvSeverity } from '../types/kv-sverity';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface KvEnumConfig<ValueType = number> {
|
|
4
|
+
value: ValueType;
|
|
5
|
+
label: string;
|
|
6
|
+
severity?: KvSeverity;
|
|
7
|
+
hexColor?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class EnumUtils {
|
|
10
|
+
createEnumUtils<T extends Record<string, number | string>, V extends KvEnumConfig<number | string>>(config: Record<T[keyof T], V>): {
|
|
11
|
+
listar: () => V[];
|
|
12
|
+
getLabel: (value: T[keyof T]) => string;
|
|
13
|
+
getSeverity: (value: T[keyof T]) => KvSeverity;
|
|
14
|
+
getHexColor: (value: T[keyof T]) => string | undefined;
|
|
15
|
+
isValid: (value: unknown) => value is T[keyof T];
|
|
16
|
+
};
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnumUtils, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EnumUtils>;
|
|
19
|
+
}
|
|
@@ -9,7 +9,7 @@ export declare class KvButtonComponent {
|
|
|
9
9
|
severity: import("@angular/core").InputSignal<"primary" | "secondary" | "tertiary" | "danger">;
|
|
10
10
|
size: import("@angular/core").InputSignal<"small" | "normal" | "large">;
|
|
11
11
|
icon: import("@angular/core").ModelSignal<string>;
|
|
12
|
-
iconPosition: import("@angular/core").InputSignal<"
|
|
12
|
+
iconPosition: import("@angular/core").InputSignal<"right" | "left">;
|
|
13
13
|
label: import("@angular/core").InputSignal<string>;
|
|
14
14
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
onClick: import("@angular/core").OutputEmitterRef<any>;
|
|
@@ -8,7 +8,7 @@ export declare class KvButtonPopupComponent extends BaseComponentButton {
|
|
|
8
8
|
items: MenuItem[];
|
|
9
9
|
classBtn: string;
|
|
10
10
|
size: import("@angular/core").InputSignal<"small" | "normal" | "large">;
|
|
11
|
-
type: import("@angular/core").InputSignal<"
|
|
11
|
+
type: import("@angular/core").InputSignal<"text" | "normal" | "outline">;
|
|
12
12
|
icon: string;
|
|
13
13
|
constructor();
|
|
14
14
|
handleShow(): void;
|
|
@@ -16,7 +16,7 @@ import * as i0 from "@angular/core";
|
|
|
16
16
|
export declare class KvIconComponent {
|
|
17
17
|
icon: import("@angular/core").InputSignal<string>;
|
|
18
18
|
shape: import("@angular/core").InputSignal<"circle" | "square" | "hexagon">;
|
|
19
|
-
severity: import("@angular/core").InputSignal<"info" | "
|
|
19
|
+
severity: import("@angular/core").InputSignal<"info" | "warning" | "danger" | "success" | "system" | "contrast">;
|
|
20
20
|
size: import("@angular/core").InputSignal<"small" | "large" | "medium">;
|
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvIconComponent, never>;
|
|
22
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<KvIconComponent, "kv-icon", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "shape": { "alias": "shape"; "required": true; "isSignal": true; }; "severity": { "alias": "severity"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
@@ -144,7 +144,7 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
144
144
|
onClickEvent(event: any): void;
|
|
145
145
|
styleSetter(style: string, data: string): void;
|
|
146
146
|
checkMenuFiltro(col: TableConfigColumn): void;
|
|
147
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
147
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
148
148
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
149
149
|
checkHideColumns(): void;
|
|
150
150
|
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
@@ -139,7 +139,7 @@ export declare class KvTableDraggableComponent implements OnInit, DoCheck, After
|
|
|
139
139
|
onClickEvent(event: any): void;
|
|
140
140
|
styleSetter(style: string, data: string): void;
|
|
141
141
|
checkMenuFiltro(col: TableConfigColumn): void;
|
|
142
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
142
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
143
143
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
144
144
|
checkHideColumns(): void;
|
|
145
145
|
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
@@ -68,7 +68,7 @@ export declare class KvTableExpandableComponent implements OnInit, DoCheck {
|
|
|
68
68
|
onGlobalFilter(table: Table, event: Event): void;
|
|
69
69
|
executeCollapsed(): void;
|
|
70
70
|
checkMenuFiltro(col: any): void;
|
|
71
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
71
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
72
72
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
73
73
|
dinamicColumnSet(e: any, col: any): void;
|
|
74
74
|
addColumn(field: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class KvTagComponent {
|
|
3
|
-
severity: import("@angular/core").InputSignal<"info" | "
|
|
3
|
+
severity: import("@angular/core").InputSignal<"info" | "danger" | "success" | "warn" | "system" | "contrast">;
|
|
4
4
|
border: import("@angular/core").InputSignal<boolean>;
|
|
5
5
|
color: import("@angular/core").InputSignal<string | null>;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvTagComponent, never>;
|
|
@@ -19,7 +19,7 @@ export declare class KvWidgetCardComponent {
|
|
|
19
19
|
* Define a cor do ícone do card.
|
|
20
20
|
* @required
|
|
21
21
|
*/
|
|
22
|
-
iconSeverity: import("@angular/core").InputSignal<"info" | "
|
|
22
|
+
iconSeverity: import("@angular/core").InputSignal<"info" | "warning" | "danger" | "success" | "system" | "contrast">;
|
|
23
23
|
/**
|
|
24
24
|
* Título do card.
|
|
25
25
|
* @required
|
|
@@ -39,7 +39,7 @@ export declare class KvWidgetCardComponent {
|
|
|
39
39
|
* Define o background-color do card.
|
|
40
40
|
* @default true
|
|
41
41
|
*/
|
|
42
|
-
severity: import("@angular/core").InputSignal<"
|
|
42
|
+
severity: import("@angular/core").InputSignal<"warning" | "danger" | "success" | "system" | undefined>;
|
|
43
43
|
/**
|
|
44
44
|
* Valor do indicador principal do card.
|
|
45
45
|
* @default
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export * from './lib/api/services/notification.service';
|
|
|
43
43
|
export * from './lib/api/services/object.service';
|
|
44
44
|
export * from './lib/api/services/chat.service';
|
|
45
45
|
export * from './lib/api/services/image.cutter.service';
|
|
46
|
-
export * from './lib/api/services/
|
|
46
|
+
export * from './lib/api/services/EnumUtils.service';
|
|
47
47
|
/**
|
|
48
48
|
* PrimeNG
|
|
49
49
|
*/
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class EnumUtils {
|
|
4
|
-
createEnumUtils(config) {
|
|
5
|
-
return {
|
|
6
|
-
listar: () => Object.values(config),
|
|
7
|
-
getLabel: (value) => config[value]?.label ?? 'Desconhecido',
|
|
8
|
-
getSeverity: (value) => config[value]?.severity,
|
|
9
|
-
getHexColor: (value) => config[value]?.hexColor,
|
|
10
|
-
isValid: (value) => Object.keys(config).includes(value),
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EnumUtils, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
14
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EnumUtils, providedIn: 'root' }); }
|
|
15
|
-
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EnumUtils, decorators: [{
|
|
17
|
-
type: Injectable,
|
|
18
|
-
args: [{
|
|
19
|
-
providedIn: 'root'
|
|
20
|
-
}]
|
|
21
|
-
}] });
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bV91dGlscy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2FwaS9zZXJ2aWNlcy9lbnVtX3V0aWxzLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFjM0MsTUFBTSxPQUFPLFNBQVM7SUF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qZWN0YWJsZSh7XHJcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBFbnVtVXRpbHMge1xyXG5cclxuICBjcmVhdGVFbnVtVXRpbHMoY29uZmlnOiBLdkVudW1Db25maWcpIHtcclxuICAgIHJldHVybiB7XHJcbiAgICAgIGxpc3RhcjogKCkgPT4gT2JqZWN0LnZhbHVlcyhjb25maWcpLFxyXG4gICAgICBnZXRMYWJlbDogKHZhbHVlOiBzdHJpbmcpID0+IGNvbmZpZ1t2YWx1ZV0/LmxhYmVsID8/ICdEZXNjb25oZWNpZG8nLFxyXG4gICAgICBnZXRTZXZlcml0eTogKHZhbHVlOiBzdHJpbmcpID0+IGNvbmZpZ1t2YWx1ZV0/LnNldmVyaXR5IGFzIEt2U2V2ZXJpdHksXHJcbiAgICAgIGdldEhleENvbG9yOiAodmFsdWU6IHN0cmluZykgPT4gY29uZmlnW3ZhbHVlXT8uaGV4Q29sb3IsXHJcbiAgICAgIGlzVmFsaWQ6ICh2YWx1ZTogc3RyaW5nKSA9PiBPYmplY3Qua2V5cyhjb25maWcpLmluY2x1ZGVzKHZhbHVlKSxcclxuICAgIH07XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { KvSeverity } from '../types/kv-sverity';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export interface KvEnumConfig {
|
|
4
|
-
[key: string]: {
|
|
5
|
-
label: string;
|
|
6
|
-
severity?: KvSeverity;
|
|
7
|
-
hexColor?: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare class EnumUtils {
|
|
11
|
-
createEnumUtils(config: KvEnumConfig): {
|
|
12
|
-
listar: () => {
|
|
13
|
-
label: string;
|
|
14
|
-
severity?: KvSeverity | undefined;
|
|
15
|
-
hexColor?: string | undefined;
|
|
16
|
-
}[];
|
|
17
|
-
getLabel: (value: string) => string;
|
|
18
|
-
getSeverity: (value: string) => KvSeverity;
|
|
19
|
-
getHexColor: (value: string) => string | undefined;
|
|
20
|
-
isValid: (value: string) => boolean;
|
|
21
|
-
};
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EnumUtils, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EnumUtils>;
|
|
24
|
-
}
|