@c80/ui 1.0.49 → 1.0.51
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/index.js +1 -0
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/card-level/card-level.component.js +12 -14
- package/esm2022/lib/card-level/card-level.component.js.map +1 -1
- package/esm2022/lib/icon/icon.component.js +3 -3
- package/esm2022/lib/icon/icon.component.js.map +1 -1
- package/esm2022/lib/icon/icon.constants.js +71 -13
- package/esm2022/lib/icon/icon.constants.js.map +1 -1
- package/esm2022/lib/icon/icon.types.js.map +1 -1
- package/esm2022/lib/modal/modal.component.js +7 -7
- package/esm2022/lib/modal/modal.component.js.map +1 -1
- package/esm2022/lib/modal/modal.service.js +2 -2
- package/esm2022/lib/modal/modal.service.js.map +1 -1
- package/esm2022/lib/select/select.component.js +2 -3
- package/esm2022/lib/select/select.component.js.map +1 -1
- package/esm2022/lib/snackbar/index.js +2 -0
- package/esm2022/lib/snackbar/index.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.component.js +57 -0
- package/esm2022/lib/snackbar/snackbar.component.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.model.js +2 -0
- package/esm2022/lib/snackbar/snackbar.model.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.service.js +43 -0
- package/esm2022/lib/snackbar/snackbar.service.js.map +1 -0
- package/esm2022/lib/stat-card/stat-card.component.js +3 -3
- package/esm2022/lib/stat-card/stat-card.component.js.map +1 -1
- package/esm2022/lib/table/table-column-visibility.service.js.map +1 -1
- package/esm2022/lib/table/table-crud-state.service.js.map +1 -1
- package/esm2022/lib/table/table-data-converter.service.js.map +1 -1
- package/esm2022/lib/table/table-data-utils.service.js.map +1 -1
- package/esm2022/lib/table/table-selection.service.js.map +1 -1
- package/esm2022/lib/table/table.component.js +4 -4
- package/esm2022/lib/table/table.component.js.map +1 -1
- package/esm2022/lib/table/table.utils.js +2 -2
- package/esm2022/lib/table/table.utils.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/card-level/card-level.component.d.ts +3 -4
- package/lib/icon/icon.component.d.ts +2 -2
- package/lib/icon/icon.constants.d.ts +12 -2
- package/lib/icon/icon.types.d.ts +1 -1
- package/lib/modal/modal.service.d.ts +1 -1
- package/lib/select/select.component.d.ts +2 -2
- package/lib/snackbar/index.d.ts +2 -0
- package/lib/snackbar/snackbar.component.d.ts +17 -0
- package/lib/snackbar/snackbar.model.d.ts +11 -0
- package/lib/snackbar/snackbar.service.d.ts +11 -0
- package/lib/stat-card/stat-card.component.d.ts +1 -1
- package/lib/table/table-column-visibility.service.d.ts +1 -1
- package/lib/table/table-crud-state.service.d.ts +1 -1
- package/lib/table/table-data-converter.service.d.ts +1 -1
- package/lib/table/table-data-utils.service.d.ts +1 -1
- package/lib/table/table-selection.service.d.ts +1 -1
- package/lib/table/table.component.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.utils.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/table/table.utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAuB;IACtD,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,MAAM,KAAK,GAAG,GAA2B,CAAC;IAC1C,OAAO,KAAK,EAAE,OAAO,IAAI,uBAAuB,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY,EAAE,GAAoB;IAC9D,IAAI,GAAG,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAQ,KAAK,CAAC,MAA2B,CAAC,OAAO,CAAC;IACpD,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,MAA8C,CAAC;IACpE,MAAM,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B,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAoC,KAAa,EAAE,GAAM;IAChF,MAAM,EAAE,GAAG,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAI,IAAI,GAAG;QACtD,CAAC,CAAE,GAA+B,CAAC,IAAI,CAAC;QACxC,CAAC,CAAC,SAAS,CAAC;IACd,OAAO,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAyB,EACzB,GAAM;IAEN,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAyB;IACxD,OAAO,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC;AACvC,CAAC","sourcesContent":["import type { C80TableColDef, CustomTableAction } from './table.types';\n\n/**\n * Transform function para convertir valores string/boolean a boolean\n * Usado en @Input() con transform para habilitar sintaxis de atributos booleanos\n * @example [searchable]=\"true\" o simplemente searchable\n */\nexport function booleanAttribute(value: boolean | string): boolean {\n return value === '' || value === true || value === 'true';\n}\n\n/**\n * Extrae mensaje de error de forma segura desde un objeto unknown\n * @param err - Error desconocido (puede ser Error, string, object, etc.)\n * @returns Mensaje de error legible\n */\nexport function getErrorMessage(err: unknown): string {\n const error = err as { message?: string };\n return error?.message
|
|
1
|
+
{"version":3,"file":"table.utils.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/table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C,GAAG,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAyB;IACxD,OAAO,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC;AACvC,CAAC","sourcesContent":["import type { C80TableColDef, CustomTableAction } from './table.types';\n\n/**\n * Transform function para convertir valores string/boolean a boolean\n * Usado en @Input() con transform para habilitar sintaxis de atributos booleanos\n * @example [searchable]=\"true\" o simplemente searchable\n */\nexport function booleanAttribute(value: boolean | string): boolean {\n return value === '' || value === true || value === 'true';\n}\n\n/**\n * Extrae mensaje de error de forma segura desde un objeto unknown\n * @param err - Error desconocido (puede ser Error, string, object, etc.)\n * @returns Mensaje de error legible\n */\nexport function getErrorMessage(err: unknown): string {\n const error = err as { message?: string };\n return error?.message ?? 'Error al cargar datos';\n}\n\n/**\n * Obtiene el valor de un input HTML según el tipo de columna\n * IMPORTANTE: Convierte el valor al tipo correcto antes de retornarlo\n * @param event - Evento del input\n * @param col - Definición de columna (opcional)\n * @returns Valor extraído y convertido según el tipo de columna\n */\nexport function getInputValue(event: Event, col?: C80TableColDef): unknown {\n if (col?.type === 'boolean') {\n return (event.target as HTMLInputElement).checked;\n }\n\n const target = event.target as HTMLInputElement | HTMLSelectElement;\n const rawValue = target?.value;\n\n if (!col) {\n return rawValue;\n }\n\n return convertInputValueByType(rawValue, col.type);\n}\n\n/**\n * Convierte un valor de input según el tipo de columna especificado\n * @param rawValue - Valor crudo del input (string)\n * @param type - Tipo de columna\n * @returns Valor convertido al tipo apropiado\n */\nfunction convertInputValueByType(\n rawValue: string,\n type?: 'string' | 'number' | 'integer' | 'boolean' | 'password' | 'enum' | 'date'\n): unknown {\n if (!type || type === 'string' || type === 'password' || type === 'date') {\n return rawValue;\n }\n\n if (type === 'integer' || type === 'number') {\n return convertToNumber(rawValue, type === 'integer');\n }\n\n if (type === 'enum') {\n return convertEnumValue(rawValue);\n }\n\n return rawValue;\n}\n\n/**\n * Convierte string a number o integer\n */\nfunction convertToNumber(value: string, isInteger: boolean): number | undefined {\n if (value === '' || value === null || value === undefined) {\n return undefined;\n }\n const num = Number(value);\n if (Number.isNaN(num)) {\n return undefined;\n }\n return isInteger ? Math.floor(num) : num;\n}\n\n/**\n * Convierte valor de enum (intenta convertir a número si es posible)\n */\nfunction convertEnumValue(value: string): string | number {\n const num = Number(value);\n return Number.isNaN(num) ? value : num;\n}\n\n/**\n * Extrae el ID de una fila para usar como trackBy en ngFor\n * @param index - Índice de la fila\n * @param row - Fila de datos\n * @returns ID como string o índice como fallback\n */\nexport function trackById<T extends Record<string, unknown>>(index: number, row: T): string | number {\n const id = row && typeof row === 'object' && 'id' in row\n ? (row as Record<string, unknown>)['id']\n : undefined;\n return typeof id === 'string' ? id : index;\n}\n\n/**\n * Verifica si una acción debe mostrarse para una fila específica\n * CREATE se excluye porque se maneja con el botón \"+\" en el header\n * @param action - Acción a verificar\n * @param row - Fila de datos\n * @returns true si la acción debe mostrarse\n */\nexport function shouldShowAction<T extends Record<string, unknown>>(\n action: CustomTableAction,\n row: T\n): boolean {\n if (action.name === 'create') {\n return false;\n }\n return !action.condition || action.condition(row);\n}\n\n/**\n * Obtiene el tooltip de una acción (usa tooltip personalizado o name por defecto)\n * @param action - Acción\n * @returns Texto del tooltip\n */\nexport function getActionTooltip(action: CustomTableAction): string {\n return action.tooltip ?? action.name;\n}\n"]}
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { CardLevelData } from './card-level.interface';
|
|
1
|
+
import type { CardLevelData } from './card-level.interface';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class CardLevelComponent {
|
|
4
4
|
cardLevelData: import("@angular/core").InputSignal<CardLevelData>;
|
|
5
5
|
size: import("@angular/core").InputSignal<number>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get cardWidth(): string;
|
|
6
|
+
readonly generatedId: import("@angular/core").Signal<string>;
|
|
7
|
+
readonly cardWidth: import("@angular/core").Signal<string>;
|
|
9
8
|
isBidirectional: import("@angular/core").Signal<boolean>;
|
|
10
9
|
bidirectionalFillPercent: import("@angular/core").Signal<number>;
|
|
11
10
|
fillDirection: import("@angular/core").Signal<"right" | "left">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ColorType, ButtonType } from './icon.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class C80IconComponent {
|
|
4
|
-
readonly icon: import("@angular/core").InputSignal<"
|
|
4
|
+
readonly icon: import("@angular/core").InputSignal<"check" | "cancel" | "edit" | "delete" | "add" | "view" | "get" | "settings" | "schedule" | "refresh" | "checkCircle" | "cancelCircle" | "error" | "queue" | "arrowUp" | "arrowDown" | "toggleOn" | "toggleOff" | "search" | "upload" | "pendingActions" | "playCircle" | "play" | "stop" | "tune" | "visibility" | "visibilityOff" | "close" | "record" | "star" | "xCircle" | "key" | "exclamationTriangle" | "clipboard" | "download" | "shield" | "person" | "envelope" | "infoCircle" | "checkSquare" | "square" | "dashSquare" | "people" | "boxSeam" | "personBadge" | "listTask" | "shuffle" | "motor" | "box" | "bell" | "message" | "send" | "file" | "folder" | "save" | "print" | "clock" | "calendar" | "timer" | "lock" | "unlock" | "chart" | "table" | "database" | "home" | "menu" | "arrowLeft" | "arrowRight" | "copy" | "filter" | "sort" | "help" | "warning" | "dashboard" | "settingsApplications" | "route" | "developerBoard" | "directions" | "category" | "logout" | "default">;
|
|
5
5
|
readonly color: import("@angular/core").InputSignal<ColorType>;
|
|
6
6
|
readonly customColor: import("@angular/core").InputSignal<string | undefined>;
|
|
7
7
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
@@ -14,7 +14,7 @@ export declare class C80IconComponent {
|
|
|
14
14
|
readonly iconClick: import("@angular/core").OutputEmitterRef<Event>;
|
|
15
15
|
readonly iconSize: import("@angular/core").Signal<number>;
|
|
16
16
|
readonly iconColor: import("@angular/core").Signal<string>;
|
|
17
|
-
readonly iconOpacity: import("@angular/core").Signal<
|
|
17
|
+
readonly iconOpacity: import("@angular/core").Signal<0.5 | 0.7 | 1>;
|
|
18
18
|
readonly iconPath: import("@angular/core").Signal<string>;
|
|
19
19
|
readonly additionalShapes: import("@angular/core").Signal<import("@c80/ui").ShapeAttributes[]>;
|
|
20
20
|
onButtonClick(event: Event): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColorType, ShapeAttributes } from './icon.types';
|
|
2
|
-
export declare const ICON_NAMES: readonly ["check", "cancel", "edit", "delete", "add", "view", "get", "settings", "schedule", "refresh", "checkCircle", "cancelCircle", "error", "queue", "arrowUp", "arrowDown", "toggleOn", "toggleOff", "search", "upload", "pendingActions", "playCircle", "play", "stop", "tune", "visibility", "visibilityOff", "close", "record", "star", "xCircle", "key", "exclamationTriangle", "clipboard", "download", "shield", "person", "envelope", "infoCircle", "checkSquare", "square", "dashSquare", "people", "boxSeam", "personBadge", "listTask", "shuffle", "
|
|
1
|
+
import type { ColorType, ShapeAttributes } from './icon.types';
|
|
2
|
+
export declare const ICON_NAMES: readonly ["check", "cancel", "edit", "delete", "add", "view", "get", "settings", "schedule", "refresh", "checkCircle", "cancelCircle", "error", "queue", "arrowUp", "arrowDown", "toggleOn", "toggleOff", "search", "upload", "pendingActions", "playCircle", "play", "stop", "tune", "visibility", "visibilityOff", "close", "record", "star", "xCircle", "key", "exclamationTriangle", "clipboard", "download", "shield", "person", "envelope", "infoCircle", "checkSquare", "square", "dashSquare", "people", "boxSeam", "personBadge", "listTask", "shuffle", "motor", "box", "bell", "message", "send", "file", "folder", "save", "print", "clock", "calendar", "timer", "lock", "unlock", "chart", "table", "database", "home", "menu", "arrowLeft", "arrowRight", "copy", "filter", "sort", "help", "warning", "dashboard", "settingsApplications", "route", "developerBoard", "directions", "category", "logout", "default"];
|
|
3
3
|
export declare const BASE_ICON_COLORS: Readonly<Record<ColorType, string>>;
|
|
4
4
|
export declare const DISABLED_COLOR = "#bdbdbd";
|
|
5
5
|
export declare const DEFAULT_ICON_COLOR = "#222";
|
|
@@ -7,5 +7,15 @@ export declare const DISABLED_OPACITY = 0.5;
|
|
|
7
7
|
export declare const SECONDARY_WARN_OPACITY = 0.7;
|
|
8
8
|
export declare const DEFAULT_OPACITY = 1;
|
|
9
9
|
export declare const BASE_ICON_SIZE = 24;
|
|
10
|
+
/**
|
|
11
|
+
* ICON PATHS - SVG path definitions
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANTE: Al crear o modificar iconos, SIEMPRE buscar primero en Material Design Icons oficial:
|
|
14
|
+
* - Repositorio: https://github.com/google/material-design-icons
|
|
15
|
+
* - Navegador: https://fonts.google.com/icons
|
|
16
|
+
* - Usar paths oficiales de Material Design siempre que sea posible
|
|
17
|
+
* - ViewBox: 24x24 (compatible con BASE_ICON_SIZE)
|
|
18
|
+
* - Máximo 300 caracteres por línea (usar concatenación con + si es necesario)
|
|
19
|
+
*/
|
|
10
20
|
export declare const ICON_PATHS: Readonly<Record<string, string>>;
|
|
11
21
|
export declare const ICON_ADDITIONAL_SHAPES: Readonly<Record<string, ShapeAttributes[]>>;
|
package/lib/icon/icon.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICON_NAMES } from './icon.constants';
|
|
1
|
+
import type { ICON_NAMES } from './icon.constants';
|
|
2
2
|
export type IconType = (typeof ICON_NAMES)[number];
|
|
3
3
|
export type ColorType = 'primary' | 'secondary' | 'warn' | 'success';
|
|
4
4
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { SelectOption } from './select.model';
|
|
1
|
+
import { type ElementRef } from '@angular/core';
|
|
2
|
+
import type { SelectOption } from './select.model';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SelectComponent<T = string> {
|
|
5
5
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SnackbarData } from './snackbar.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarComponent {
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
private readonly renderer;
|
|
6
|
+
private readonly cdr;
|
|
7
|
+
readonly data: import("@angular/core").WritableSignal<SnackbarData | null>;
|
|
8
|
+
readonly visible: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
private timerId?;
|
|
10
|
+
readonly panelClasses: import("@angular/core").Signal<string>;
|
|
11
|
+
show(data: SnackbarData): void;
|
|
12
|
+
dismiss(): void;
|
|
13
|
+
private clearTimer;
|
|
14
|
+
private applyPosition;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "k-snackbar", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SnackbarConfig {
|
|
2
|
+
duration?: number;
|
|
3
|
+
horizontalPosition?: 'left' | 'center' | 'right';
|
|
4
|
+
verticalPosition?: 'top' | 'bottom';
|
|
5
|
+
panelClass?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface SnackbarData {
|
|
8
|
+
message: string;
|
|
9
|
+
action?: string;
|
|
10
|
+
config: Required<SnackbarConfig>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SnackbarConfig } from './snackbar.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarService {
|
|
4
|
+
private readonly appRef;
|
|
5
|
+
private readonly injector;
|
|
6
|
+
private componentRef?;
|
|
7
|
+
private readonly defaultConfig;
|
|
8
|
+
open(message: string, action?: string, config?: SnackbarConfig): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { C80TableColDef, CustomTableAction } from './table.types';
|
|
1
|
+
import { type OnInit, type OnDestroy } from '@angular/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { C80TableColDef, CustomTableAction } from './table.types';
|
|
4
4
|
import { getActionTooltip } from './table.utils';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|