keevo-components 2.0.216 → 2.0.218

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.
@@ -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
+ static 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
+ }
@@ -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" | "success" | "warning" | "danger" | "system" | "contrast">;
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>;
@@ -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" | "success" | "warn" | "danger" | "system" | "contrast">;
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" | "success" | "warning" | "danger" | "system" | "contrast">;
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<"success" | "warning" | "danger" | "system" | undefined>;
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.216",
3
+ "version": "2.0.218",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",
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/enum_utils.service';
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bV91dGlscy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2FwaS9zZXJ2aWNlcy9lbnVtX3V0aWxzLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFjM0MsTUFBTSxPQUFPLFNBQVM7SUFFcEIsZUFBZSxDQUFDLE1BQW9CO1FBQ2xDLE9BQU87WUFDTCxNQUFNLEVBQUUsR0FBRyxFQUFFLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUM7WUFDbkMsUUFBUSxFQUFFLENBQUMsS0FBYSxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLEVBQUUsS0FBSyxJQUFJLGNBQWM7WUFDbkUsV0FBVyxFQUFFLEN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HZhbHVlOiBzdHJpbmcpID0+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
- }