keevo-components 2.0.215 → 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 +23 -13
- 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 +2 -2
- package/public-api.d.ts +1 -1
- package/esm2022/lib/api/base-components/base_enum.mjs +0 -12
- package/lib/api/base-components/base_enum.d.ts +0 -14
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keevo-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.217",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.3.8",
|
|
6
6
|
"@angular/core": "^17.3.8",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.3.0"
|
|
26
26
|
},
|
|
27
|
+
"sideEffects": true,
|
|
27
28
|
"description": "Componentes utilizados no frontend dos sistemas da Keevo Software.",
|
|
28
29
|
"exports": {
|
|
29
30
|
"./webpack/mfe-shared.js": "./webpack/mfe-shared.js",
|
|
@@ -37,7 +38,6 @@
|
|
|
37
38
|
"default": "./fesm2022/keevo-components.mjs"
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
|
-
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"files": [
|
|
43
43
|
"webpack/**"
|
package/public-api.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export * from './lib/api/base-components/base-component-input';
|
|
|
12
12
|
export * from './lib/api/base-components/base-component-multi-select';
|
|
13
13
|
export * from './lib/api/base-components/base-component-table';
|
|
14
14
|
export * from './lib/api/base-components/base-component';
|
|
15
|
-
export { createEnumUtils, KvEnumConfig } from './lib/api/base-components/base_enum';
|
|
16
15
|
/**
|
|
17
16
|
* Types
|
|
18
17
|
*/
|
|
@@ -44,6 +43,7 @@ export * from './lib/api/services/notification.service';
|
|
|
44
43
|
export * from './lib/api/services/object.service';
|
|
45
44
|
export * from './lib/api/services/chat.service';
|
|
46
45
|
export * from './lib/api/services/image.cutter.service';
|
|
46
|
+
export * from './lib/api/services/EnumUtils.service';
|
|
47
47
|
/**
|
|
48
48
|
* PrimeNG
|
|
49
49
|
*/
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
;
|
|
2
|
-
// Utilitário para criar funções auxiliares para enums
|
|
3
|
-
export const createEnumUtils = (config) => {
|
|
4
|
-
return {
|
|
5
|
-
listar: () => Object.values(config), // Lista todos os valores do enum
|
|
6
|
-
getLabel: (value) => config[value]?.label ?? 'Desconhecido', // Retorna o label do valor
|
|
7
|
-
getSeverity: (value) => config[value]?.severity, // Retorna a severidade do valor
|
|
8
|
-
getHexColor: (value) => config[value]?.hexColor, // Retorna a cor hexadecimal do valor
|
|
9
|
-
isValid: (value) => Object.keys(config).includes(value) // Valida se o val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4Q29sb3I6ICh2YWx1ZTogVFtrZXlvZiBUXSk6IHN0cmluZyB8IHVuZGVmaW5lZCA9PiBjb25maWdbdmFsdWVdPy5oZXhDb2xvciwgLy8gUmV0b3JuYSBhIGNvciBoZXhhZGVjaW1hbCBkbyB2YWxvclxyXG4gICAgaXNWYWxpZDogKHZhbHVlOiB1bmtub3duKTogdmFsdWUgaXMgVFtrZXlvZiBUXSA9PiBPYmplY3Qua2V5cyhjb25maWcpLmluY2x1ZGVzKHZhbHVlIGFzIHN0cmluZykgLy8gVmFsaWRhIHNlIG8gdmFsb3IgZXhpc3RlIG5vIGVudW1cclxuICB9O1xyXG59O1xyXG4iXX0=
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { KvSeverity } from "../types/kv-sverity";
|
|
2
|
-
export interface KvEnumConfig<ValueType = number> {
|
|
3
|
-
value: ValueType;
|
|
4
|
-
label: string;
|
|
5
|
-
severity?: KvSeverity;
|
|
6
|
-
hexColor?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const createEnumUtils: <T extends Record<string, string | number>, V extends KvEnumConfig<string | number>>(config: Record<T[keyof T], V>) => {
|
|
9
|
-
listar: () => V[];
|
|
10
|
-
getLabel: (value: T[keyof T]) => string;
|
|
11
|
-
getSeverity: (value: T[keyof T]) => KvSeverity;
|
|
12
|
-
getHexColor: (value: T[keyof T]) => string | undefined;
|
|
13
|
-
isValid: (value: unknown) => value is T[keyof T];
|
|
14
|
-
};
|