@c80/ui 1.0.54 → 1.0.57
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 +5 -0
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/action-list/action-list.component.js +23 -0
- package/esm2022/lib/action-list/action-list.component.js.map +1 -0
- package/esm2022/lib/action-list/action-list.types.js +2 -0
- package/esm2022/lib/action-list/action-list.types.js.map +1 -0
- package/esm2022/lib/action-list/index.js +3 -0
- package/esm2022/lib/action-list/index.js.map +1 -0
- package/esm2022/lib/card-level/card-level.component.js +7 -0
- package/esm2022/lib/card-level/card-level.component.js.map +1 -1
- package/esm2022/lib/header/header.component.js +18 -0
- package/esm2022/lib/header/header.component.js.map +1 -0
- package/esm2022/lib/header/header.types.js +2 -0
- package/esm2022/lib/header/header.types.js.map +1 -0
- package/esm2022/lib/header/index.js +3 -0
- package/esm2022/lib/header/index.js.map +1 -0
- package/esm2022/lib/icon/icon.component.js +22 -11
- package/esm2022/lib/icon/icon.component.js.map +1 -1
- package/esm2022/lib/icon/icon.constants.js +3 -1
- package/esm2022/lib/icon/icon.constants.js.map +1 -1
- package/esm2022/lib/icon/icon.definitions.js +19 -5
- package/esm2022/lib/icon/icon.definitions.js.map +1 -1
- package/esm2022/lib/icon/icon.types.js.map +1 -1
- package/esm2022/lib/icon/icon.utils.js +3 -0
- package/esm2022/lib/icon/icon.utils.js.map +1 -1
- package/esm2022/lib/icon/index.js +1 -0
- package/esm2022/lib/icon/index.js.map +1 -1
- package/esm2022/lib/icon/theme.service.js +39 -0
- package/esm2022/lib/icon/theme.service.js.map +1 -0
- package/esm2022/lib/info-list/index.js +3 -0
- package/esm2022/lib/info-list/index.js.map +1 -0
- package/esm2022/lib/info-list/info-list.component.js +12 -0
- package/esm2022/lib/info-list/info-list.component.js.map +1 -0
- package/esm2022/lib/info-list/info-list.types.js +2 -0
- package/esm2022/lib/info-list/info-list.types.js.map +1 -0
- package/esm2022/lib/input-field/index.js +2 -0
- package/esm2022/lib/input-field/index.js.map +1 -0
- package/esm2022/lib/input-field/input-field.component.js +37 -0
- package/esm2022/lib/input-field/input-field.component.js.map +1 -0
- package/esm2022/lib/modal/modal.component.js +6 -6
- package/esm2022/lib/modal/modal.component.js.map +1 -1
- package/esm2022/lib/profile-stats/index.js +3 -0
- package/esm2022/lib/profile-stats/index.js.map +1 -0
- package/esm2022/lib/profile-stats/profile-stats.component.js +12 -0
- package/esm2022/lib/profile-stats/profile-stats.component.js.map +1 -0
- package/esm2022/lib/profile-stats/profile-stats.types.js +2 -0
- package/esm2022/lib/profile-stats/profile-stats.types.js.map +1 -0
- package/esm2022/lib/snackbar/snackbar.component.js +2 -2
- package/esm2022/lib/snackbar/snackbar.component.js.map +1 -1
- package/esm2022/lib/stat-card/stat-card.component.js +6 -6
- package/esm2022/lib/stat-card/stat-card.component.js.map +1 -1
- package/esm2022/lib/tab/c80-tab.component.js +7 -7
- package/esm2022/lib/tab/c80-tab.component.js.map +1 -1
- package/esm2022/lib/tab/directives/c80-tab-item.directive.js.map +1 -0
- package/esm2022/lib/tab/directives/c80-tab-label.directive.js.map +1 -0
- package/esm2022/lib/tab/index.js +3 -3
- package/esm2022/lib/tab/index.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.component.js +26 -7
- package/esm2022/lib/table/table.component.js.map +1 -1
- package/esm2022/lib/table/table.types.js.map +1 -1
- package/esm2022/lib/table/table.utils.js.map +1 -1
- package/index.d.ts +5 -0
- package/lib/action-list/action-list.component.d.ts +10 -0
- package/lib/action-list/action-list.types.d.ts +8 -0
- package/lib/action-list/index.d.ts +2 -0
- package/lib/card-level/card-level.component.d.ts +1 -1
- package/lib/header/header.component.d.ts +9 -0
- package/lib/header/header.types.d.ts +3 -0
- package/lib/header/index.d.ts +2 -0
- package/lib/icon/icon.component.d.ts +7 -4
- package/lib/icon/icon.constants.d.ts +2 -0
- package/lib/icon/icon.types.d.ts +3 -1
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/theme.service.d.ts +10 -0
- package/lib/info-list/index.d.ts +2 -0
- package/lib/info-list/info-list.component.d.ts +7 -0
- package/lib/info-list/info-list.types.d.ts +4 -0
- package/lib/input-field/index.d.ts +1 -0
- package/lib/input-field/input-field.component.d.ts +19 -0
- package/lib/modal/modal.component.d.ts +3 -3
- package/lib/profile-stats/index.d.ts +2 -0
- package/lib/profile-stats/profile-stats.component.d.ts +7 -0
- package/lib/profile-stats/profile-stats.types.d.ts +4 -0
- package/lib/snackbar/snackbar.component.d.ts +1 -1
- package/lib/stat-card/stat-card.component.d.ts +3 -3
- package/lib/tab/c80-tab.component.d.ts +5 -5
- package/lib/tab/index.d.ts +3 -3
- package/lib/table/table-column-visibility.service.d.ts +5 -5
- package/lib/table/table-crud-state.service.d.ts +3 -3
- package/lib/table/table-data-converter.service.d.ts +2 -2
- package/lib/table/table-data-utils.service.d.ts +6 -6
- package/lib/table/table.component.d.ts +14 -14
- package/lib/table/table.types.d.ts +1 -1
- package/lib/table/table.utils.d.ts +2 -2
- package/package.json +1 -1
- package/esm2022/lib/tab/c80-tab-item.directive.js.map +0 -1
- package/esm2022/lib/tab/c80-tab-label.directive.js.map +0 -1
- /package/esm2022/lib/tab/{c80-tab-item.directive.js → directives/c80-tab-item.directive.js} +0 -0
- /package/esm2022/lib/tab/{c80-tab-label.directive.js → directives/c80-tab-label.directive.js} +0 -0
- /package/lib/tab/{c80-tab-item.directive.d.ts → directives/c80-tab-item.directive.d.ts} +0 -0
- /package/lib/tab/{c80-tab-label.directive.d.ts → directives/c80-tab-label.directive.d.ts} +0 -0
|
@@ -7,7 +7,7 @@ export declare class CardLevelComponent {
|
|
|
7
7
|
readonly cardWidth: import("@angular/core").Signal<string>;
|
|
8
8
|
isBidirectional: import("@angular/core").Signal<boolean>;
|
|
9
9
|
bidirectionalFillPercent: import("@angular/core").Signal<number>;
|
|
10
|
-
fillDirection: import("@angular/core").Signal<"
|
|
10
|
+
fillDirection: import("@angular/core").Signal<"left" | "right">;
|
|
11
11
|
fillColor: import("@angular/core").Signal<"var(--color-danger)" | "var(--color-warning)" | "var(--color-success)">;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<CardLevelComponent, never>;
|
|
13
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<CardLevelComponent, "c80-card-level", never, { "cardLevelData": { "alias": "cardLevelData"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HeaderConfig } from './header.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HeaderComponent {
|
|
4
|
+
private readonly location;
|
|
5
|
+
config: import("@angular/core").InputSignal<HeaderConfig>;
|
|
6
|
+
protected onBackClick(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent, "c80-header", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ColorType, ButtonType } from './icon.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class IconComponent {
|
|
4
|
+
private readonly themeService;
|
|
4
5
|
readonly icon: import("@angular/core").InputSignal<string>;
|
|
5
|
-
readonly color: import("@angular/core").InputSignal<ColorType>;
|
|
6
|
+
readonly color: import("@angular/core").InputSignal<ColorType | undefined>;
|
|
6
7
|
readonly customColor: import("@angular/core").InputSignal<string | undefined>;
|
|
7
8
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
8
9
|
readonly size: import("@angular/core").InputSignal<number>;
|
|
@@ -11,8 +12,10 @@ export declare class C80IconComponent {
|
|
|
11
12
|
readonly type: import("@angular/core").InputSignal<ButtonType>;
|
|
12
13
|
readonly textLeft: import("@angular/core").InputSignal<string | undefined>;
|
|
13
14
|
readonly textRight: import("@angular/core").InputSignal<string | undefined>;
|
|
15
|
+
readonly dark: import("@angular/core").InputSignalWithTransform<boolean, string | boolean | null | undefined>;
|
|
14
16
|
readonly iconClick: import("@angular/core").OutputEmitterRef<Event>;
|
|
15
17
|
readonly iconSize: import("@angular/core").Signal<number>;
|
|
18
|
+
readonly isDarkMode: import("@angular/core").Signal<boolean>;
|
|
16
19
|
readonly iconColor: import("@angular/core").Signal<string>;
|
|
17
20
|
readonly iconOpacity: import("@angular/core").Signal<0.5 | 0.7 | 1>;
|
|
18
21
|
readonly iconDefinition: import("@angular/core").Signal<import("@c80/ui").IconDefinition>;
|
|
@@ -27,6 +30,6 @@ export declare class C80IconComponent {
|
|
|
27
30
|
readonly strokeLinejoin: "round";
|
|
28
31
|
};
|
|
29
32
|
onButtonClick(event: Event): void;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "c80-icon", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "customColor": { "alias": "customColor"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "button": { "alias": "button"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "textLeft": { "alias": "textLeft"; "required": false; "isSignal": true; }; "textRight": { "alias": "textRight"; "required": false; "isSignal": true; }; "dark": { "alias": "dark"; "required": false; "isSignal": true; }; }, { "iconClick": "iconClick"; }, never, never, true, never>;
|
|
32
35
|
}
|
|
@@ -6,6 +6,8 @@ export declare const DISABLED_OPACITY = 0.5;
|
|
|
6
6
|
export declare const SECONDARY_WARN_OPACITY = 0.7;
|
|
7
7
|
export declare const DEFAULT_OPACITY = 1;
|
|
8
8
|
export declare const BASE_ICON_SIZE = 24;
|
|
9
|
+
export declare const THEME_LIGHT_COLOR = "#111827";
|
|
10
|
+
export declare const THEME_DARK_COLOR = "#f1f5f9";
|
|
9
11
|
export declare const OPACITY_REDUCED_COLORS: readonly ColorType[];
|
|
10
12
|
export declare const SVG_STROKE_ATTRS: {
|
|
11
13
|
readonly strokeWidth: "1";
|
package/lib/icon/icon.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ICON_DEFINITIONS } from './icon.definitions';
|
|
2
|
-
export type ColorType = 'primary' | 'secondary' | 'warn' | 'success'
|
|
2
|
+
export type ColorType = 'primary' | 'secondary' | 'warn' | 'success';
|
|
3
3
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
4
4
|
interface CircleAttributes {
|
|
5
5
|
type: 'circle';
|
|
@@ -38,6 +38,8 @@ export interface IconDefinition {
|
|
|
38
38
|
additionalShapes?: ShapeAttributes[];
|
|
39
39
|
/** Configuración para iconos multi-color como Google, Microsoft, etc. */
|
|
40
40
|
multiColor?: MultiColorIconConfig;
|
|
41
|
+
/** Especifica si el path principal debe ser relleno (fill) en lugar de outline (stroke) */
|
|
42
|
+
fill?: boolean;
|
|
41
43
|
}
|
|
42
44
|
export type IconType = keyof typeof ICON_DEFINITIONS;
|
|
43
45
|
export {};
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ThemeService {
|
|
3
|
+
readonly isDark: import("@angular/core").WritableSignal<boolean>;
|
|
4
|
+
private getInitialTheme;
|
|
5
|
+
toggle(): void;
|
|
6
|
+
private applyTheme;
|
|
7
|
+
initialize(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InfoItem } from './info-list.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InfoListComponent {
|
|
4
|
+
readonly items: import("@angular/core").InputSignal<InfoItem[]>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfoListComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoListComponent, "c80-info-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-field.component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class InputFieldComponent {
|
|
3
|
+
readonly label: import("@angular/core").WritableSignal<string>;
|
|
4
|
+
readonly value: import("@angular/core").WritableSignal<string>;
|
|
5
|
+
readonly placeholder: import("@angular/core").WritableSignal<string>;
|
|
6
|
+
readonly type: import("@angular/core").WritableSignal<"text" | "email" | "password">;
|
|
7
|
+
readonly maxLength: import("@angular/core").WritableSignal<number | undefined>;
|
|
8
|
+
readonly readonly: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
readonly required: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
valueChange: import("@angular/core").OutputEmitterRef<string>;
|
|
11
|
+
enterPressed: import("@angular/core").OutputEmitterRef<void>;
|
|
12
|
+
protected readonly isFocused: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
+
protected onValueChange(event: Event): void;
|
|
14
|
+
protected onFocus(): void;
|
|
15
|
+
protected onBlur(): void;
|
|
16
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputFieldComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputFieldComponent, "c80-input-field", never, {}, { "valueChange": "valueChange"; "enterPressed": "enterPressed"; }, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -14,7 +14,7 @@ export interface ModalResult {
|
|
|
14
14
|
action: 'confirm' | 'cancel' | 'yes' | 'no';
|
|
15
15
|
confirmed: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class ModalComponent {
|
|
18
18
|
private readonly modalService;
|
|
19
19
|
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
20
20
|
readonly config: import("@angular/core").Signal<ModalConfig>;
|
|
@@ -34,6 +34,6 @@ export declare class C80ModalComponent {
|
|
|
34
34
|
getCancelText(): string;
|
|
35
35
|
getYesText(): string;
|
|
36
36
|
getNoText(): string;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "c80-modal", never, {}, {}, never, never, true, never>;
|
|
39
39
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StatItem } from './profile-stats.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ProfileStatsComponent {
|
|
4
|
+
stats: import("@angular/core").InputSignal<StatItem[]>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileStatsComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileStatsComponent, "c80-profile-stats", never, { "stats": { "alias": "stats"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -13,5 +13,5 @@ export declare class SnackbarComponent {
|
|
|
13
13
|
private clearTimer;
|
|
14
14
|
private applyPosition;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "c80-snackbar", never, {}, {}, never, never, true, never>;
|
|
17
17
|
}
|
|
@@ -6,8 +6,8 @@ export interface CardDef {
|
|
|
6
6
|
text: string;
|
|
7
7
|
count: number;
|
|
8
8
|
}
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class StatCardComponent {
|
|
10
10
|
readonly cards: import("@angular/core").InputSignal<CardDef[]>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatCardComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatCardComponent, "c80-stat-card", never, { "cards": { "alias": "cards"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type TemplateRef } from '@angular/core';
|
|
2
|
-
import { C80TabItemDirective } from './c80-tab-item.directive';
|
|
3
|
-
import { C80TabLabelDirective } from './c80-tab-label.directive';
|
|
2
|
+
import { C80TabItemDirective } from './directives/c80-tab-item.directive';
|
|
3
|
+
import { C80TabLabelDirective } from './directives/c80-tab-label.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class TabComponent {
|
|
6
6
|
readonly tabs: import("@angular/core").Signal<readonly C80TabItemDirective[]>;
|
|
7
7
|
readonly labels: import("@angular/core").Signal<readonly C80TabLabelDirective[]>;
|
|
8
8
|
readonly selectedIndex: import("@angular/core").ModelSignal<number>;
|
|
@@ -10,6 +10,6 @@ export declare class C80TabComponent {
|
|
|
10
10
|
onTabClick(index: number): void;
|
|
11
11
|
getTabContent(index: number): TemplateRef<unknown> | null;
|
|
12
12
|
getTabLabel(index: number): TemplateRef<unknown> | null;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "c80-tab", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "selectedIndexChange": "selectedIndexChange"; }, ["tabs", "labels"], never, true, never>;
|
|
15
15
|
}
|
package/lib/tab/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { C80TabItemDirective } from './c80-tab-item.directive';
|
|
3
|
-
export { C80TabLabelDirective } from './c80-tab-label.directive';
|
|
1
|
+
export { TabComponent } from './c80-tab.component';
|
|
2
|
+
export { C80TabItemDirective } from './directives/c80-tab-item.directive';
|
|
3
|
+
export { C80TabLabelDirective } from './directives/c80-tab-label.directive';
|
|
4
4
|
export type { C80Tab } from './c80-tab.model';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableColDef } from './table.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Servicio para gestionar la lógica de visibilidad de columnas en tablas C80
|
|
@@ -19,7 +19,7 @@ export declare class TableColumnVisibilityService {
|
|
|
19
19
|
* @param editing - ID de fila en edición (null si no hay edición)
|
|
20
20
|
* @returns Array de accessors de columnas visibles
|
|
21
21
|
*/
|
|
22
|
-
updateVisibleKeys<T extends Record<string, unknown>>(columns:
|
|
22
|
+
updateVisibleKeys<T extends Record<string, unknown>>(columns: TableColDef[], data: T[], creating: boolean, editing: string | null): string[];
|
|
23
23
|
/**
|
|
24
24
|
* Determina si una columna debe ser visible basándose en su configuración y datos
|
|
25
25
|
* Método unificado que maneja todos los casos de visibilidad
|
|
@@ -28,7 +28,7 @@ export declare class TableColumnVisibilityService {
|
|
|
28
28
|
* @param options - Opciones de contexto (creación, edición, fila específica)
|
|
29
29
|
* @returns true si la columna debe ser visible
|
|
30
30
|
*/
|
|
31
|
-
isColumnVisible<T extends Record<string, unknown>>(column:
|
|
31
|
+
isColumnVisible<T extends Record<string, unknown>>(column: TableColDef, data: T[], options?: {
|
|
32
32
|
forceShowInCreation?: boolean;
|
|
33
33
|
creating?: boolean;
|
|
34
34
|
editing?: string | null;
|
|
@@ -38,12 +38,12 @@ export declare class TableColumnVisibilityService {
|
|
|
38
38
|
* Determina si una columna debe ser visible en los headers
|
|
39
39
|
* Wrapper para mantener compatibilidad con API existente
|
|
40
40
|
*/
|
|
41
|
-
isColumnVisibleInHeader<T extends Record<string, unknown>>(column:
|
|
41
|
+
isColumnVisibleInHeader<T extends Record<string, unknown>>(column: TableColDef, data: T[], creating: boolean, editing: string | null): boolean;
|
|
42
42
|
/**
|
|
43
43
|
* Determina si una columna debe ser visible en una fila específica
|
|
44
44
|
* Wrapper para mantener compatibilidad con API existente
|
|
45
45
|
*/
|
|
46
|
-
isColumnVisibleForRow<T extends Record<string, unknown>>(column:
|
|
46
|
+
isColumnVisibleForRow<T extends Record<string, unknown>>(column: TableColDef, row: T, data: T[], editing: string | null): boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Verifica si todos los valores de una columna están vacíos/nulos
|
|
49
49
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableColDef } from './table.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Servicio para gestionar el estado CRUD (Crear, Leer, Actualizar, Eliminar) en tablas C80
|
|
@@ -33,10 +33,10 @@ export declare class TableCrudStateService {
|
|
|
33
33
|
newRow: import("@angular/core").Signal<Partial<T> | null>;
|
|
34
34
|
editing: import("@angular/core").Signal<string | null>;
|
|
35
35
|
editRow: import("@angular/core").Signal<Partial<T> | null>;
|
|
36
|
-
startCreate: (columns:
|
|
36
|
+
startCreate: (columns: TableColDef[], data: T[]) => void;
|
|
37
37
|
cancelCreate: () => void;
|
|
38
38
|
updateNewRow: (key: string, value: unknown) => void;
|
|
39
|
-
startEdit: (row: T, columns:
|
|
39
|
+
startEdit: (row: T, columns: TableColDef[], data: T[]) => void;
|
|
40
40
|
cancelEdit: () => void;
|
|
41
41
|
updateEditRow: (key: string, value: unknown) => void;
|
|
42
42
|
applyInputValues: (partialValues: Partial<T>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableColDef } from './table.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Servicio para conversión y validación de tipos de datos en tablas C80
|
|
@@ -14,7 +14,7 @@ export declare class TableDataConverterService {
|
|
|
14
14
|
* @param sampleValue - Valor de muestra para inferir el tipo (opcional)
|
|
15
15
|
* @returns Valor convertido al tipo apropiado
|
|
16
16
|
*/
|
|
17
|
-
convertCellValue(value: unknown, col:
|
|
17
|
+
convertCellValue(value: unknown, col: TableColDef, sampleValue?: unknown): unknown;
|
|
18
18
|
/**
|
|
19
19
|
* Convierte un valor a boolean usando mejores prácticas
|
|
20
20
|
* @param value - Valor a convertir
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableColDef } from './table.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Servicio para utilidades de manipulación de datos en tablas C80
|
|
@@ -30,7 +30,7 @@ export declare class TableDataUtilsService {
|
|
|
30
30
|
* @param col - Definición de columna (opcional) para formateo específico por tipo
|
|
31
31
|
* @returns Cadena formateada para display
|
|
32
32
|
*/
|
|
33
|
-
getDisplayValue(value: unknown, col?:
|
|
33
|
+
getDisplayValue(value: unknown, col?: TableColDef): string;
|
|
34
34
|
private formatValueByType;
|
|
35
35
|
private formatPrimitiveValue;
|
|
36
36
|
/**
|
|
@@ -46,13 +46,13 @@ export declare class TableDataUtilsService {
|
|
|
46
46
|
* @param col - Definición de la columna
|
|
47
47
|
* @returns Texto formateado del enum
|
|
48
48
|
*/
|
|
49
|
-
getEnumDisplayValue(value: unknown, col:
|
|
49
|
+
getEnumDisplayValue(value: unknown, col: TableColDef): string;
|
|
50
50
|
/**
|
|
51
51
|
* Obtiene las opciones del enum como array para dropdowns select
|
|
52
52
|
* @param col - Definición de la columna
|
|
53
53
|
* @returns Array de opciones con value y label
|
|
54
54
|
*/
|
|
55
|
-
getEnumOptions(col:
|
|
55
|
+
getEnumOptions(col: TableColDef): {
|
|
56
56
|
value: string | number;
|
|
57
57
|
label: string;
|
|
58
58
|
}[];
|
|
@@ -62,13 +62,13 @@ export declare class TableDataUtilsService {
|
|
|
62
62
|
* @param col - Definición de la columna
|
|
63
63
|
* @returns Color CSS o undefined si no hay configuración
|
|
64
64
|
*/
|
|
65
|
-
getCellColor(value: unknown, col:
|
|
65
|
+
getCellColor(value: unknown, col: TableColDef): string | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Aplica ordenamiento a los items basándose en las columnas con configuración de orden
|
|
68
68
|
* @param items - Array de items a ordenar (se modifica in-place)
|
|
69
69
|
* @param columns - Definiciones de columnas
|
|
70
70
|
*/
|
|
71
|
-
applySorting<T extends Record<string, unknown>>(items: T[], columns:
|
|
71
|
+
applySorting<T extends Record<string, unknown>>(items: T[], columns: TableColDef[]): void;
|
|
72
72
|
/**
|
|
73
73
|
* Calcula el max-height de la tabla basado en el tamaño
|
|
74
74
|
* @param size - Tamaño configurado (0 = sin límite)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type OnInit, type OnDestroy } from '@angular/core';
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TableColDef, CustomTableAction } from './table.types';
|
|
4
4
|
import { getActionTooltip } from './table.utils';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -125,7 +125,7 @@ import * as i0 from "@angular/core";
|
|
|
125
125
|
* - customActions con CREATE → Muestra botón "+" en header
|
|
126
126
|
* - customActions con UPDATE → Botón "edit" activa modo edición
|
|
127
127
|
* - customActions con custom → Botón personalizado emite evento
|
|
128
|
-
*/ export declare class
|
|
128
|
+
*/ export declare class TableComponent<T extends Record<string, unknown>> implements OnInit, OnDestroy {
|
|
129
129
|
private readonly modalService;
|
|
130
130
|
private readonly visibilityService;
|
|
131
131
|
private readonly dataUtils;
|
|
@@ -133,7 +133,7 @@ import * as i0 from "@angular/core";
|
|
|
133
133
|
private readonly selectionService;
|
|
134
134
|
private readonly crudService;
|
|
135
135
|
readonly data$: import("@angular/core").InputSignal<Observable<T[]>>;
|
|
136
|
-
readonly columns: import("@angular/core").InputSignal<
|
|
136
|
+
readonly columns: import("@angular/core").InputSignal<TableColDef[]>;
|
|
137
137
|
readonly inputValues$: import("@angular/core").InputSignal<Observable<Partial<T>> | undefined>;
|
|
138
138
|
readonly customActions: import("@angular/core").InputSignal<CustomTableAction[]>;
|
|
139
139
|
readonly size: import("@angular/core").InputSignal<number>;
|
|
@@ -178,8 +178,8 @@ import * as i0 from "@angular/core";
|
|
|
178
178
|
private handleConfirmAction;
|
|
179
179
|
ngOnInit(): void;
|
|
180
180
|
ngOnDestroy(): void;
|
|
181
|
-
onInput(event: Event, key: string, col?:
|
|
182
|
-
onEditInput(event: Event, key: string, col?:
|
|
181
|
+
onInput(event: Event, key: string, col?: TableColDef): void;
|
|
182
|
+
onEditInput(event: Event, key: string, col?: TableColDef): void;
|
|
183
183
|
onDelete(row: T): Promise<void>;
|
|
184
184
|
onCancel(row: T): Promise<void>;
|
|
185
185
|
startCreate(): void;
|
|
@@ -224,13 +224,13 @@ import * as i0 from "@angular/core";
|
|
|
224
224
|
*/
|
|
225
225
|
clearSearch(): void;
|
|
226
226
|
readonly getCellValue: <T_1 extends Record<string, unknown>>(row: T_1, accessor: string) => unknown;
|
|
227
|
-
readonly getDisplayValue: (value: unknown, col?:
|
|
228
|
-
readonly getEnumDisplayValue: (value: unknown, col:
|
|
229
|
-
readonly getEnumOptions: (col:
|
|
227
|
+
readonly getDisplayValue: (value: unknown, col?: TableColDef) => string;
|
|
228
|
+
readonly getEnumDisplayValue: (value: unknown, col: TableColDef) => string;
|
|
229
|
+
readonly getEnumOptions: (col: TableColDef) => {
|
|
230
230
|
value: string | number;
|
|
231
231
|
label: string;
|
|
232
232
|
}[];
|
|
233
|
-
readonly getCellColor: (value: unknown, col:
|
|
233
|
+
readonly getCellColor: (value: unknown, col: TableColDef) => string | undefined;
|
|
234
234
|
/**
|
|
235
235
|
* Selection methods
|
|
236
236
|
*/
|
|
@@ -243,14 +243,14 @@ import * as i0 from "@angular/core";
|
|
|
243
243
|
toggleSelectAll(): void;
|
|
244
244
|
toggleItemSelection(item: T): void;
|
|
245
245
|
isItemSelected(item: T): boolean;
|
|
246
|
-
isColumnVisible(column:
|
|
247
|
-
isColumnVisibleInHeader(column:
|
|
248
|
-
isColumnVisibleForRow(column:
|
|
246
|
+
isColumnVisible(column: TableColDef): boolean;
|
|
247
|
+
isColumnVisibleInHeader(column: TableColDef): boolean;
|
|
248
|
+
isColumnVisibleForRow(column: TableColDef, row: T): boolean;
|
|
249
249
|
/**
|
|
250
250
|
* Obtiene el color de una acción considerando el tema actual.
|
|
251
251
|
* Si la acción tiene color explícito, lo usa. Si no, aplica color por tema.
|
|
252
252
|
*/
|
|
253
253
|
getActionColor(action: CustomTableAction): string | undefined;
|
|
254
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
255
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
254
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
255
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "c80-table", never, { "data$": { "alias": "data$"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "inputValues$": { "alias": "inputValues$"; "required": false; "isSignal": true; }; "customActions": { "alias": "customActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "allowSelection": { "alias": "allowSelection"; "required": false; "isSignal": true; }; "noConfirm": { "alias": "noConfirm"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "searchTerm": "searchTerm"; "errorEvent": "errorEvent"; "selectable": "selectable"; }, never, never, true, never>;
|
|
256
256
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableColDef, CustomTableAction } from './table.types';
|
|
2
2
|
/**
|
|
3
3
|
* Transform function para convertir valores string/boolean a boolean
|
|
4
4
|
* Usado en @Input() con transform para habilitar sintaxis de atributos booleanos
|
|
@@ -18,7 +18,7 @@ export declare function getErrorMessage(err: unknown): string;
|
|
|
18
18
|
* @param col - Definición de columna (opcional)
|
|
19
19
|
* @returns Valor extraído y convertido según el tipo de columna
|
|
20
20
|
*/
|
|
21
|
-
export declare function getInputValue(event: Event, col?:
|
|
21
|
+
export declare function getInputValue(event: Event, col?: TableColDef): unknown;
|
|
22
22
|
/**
|
|
23
23
|
* Extrae el ID de una fila para usar como trackBy en ngFor
|
|
24
24
|
* @param index - Índice de la fila
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"c80-tab-item.directive.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/tab/c80-tab-item.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;AAO/D,MAAM,OAAO,mBAAmB;IACrB,OAAO,GAAG,MAAM,CAAC,CAAA,WAAoB,CAAA,CAAC,CAAC;wGADrC,mBAAmB;4FAAnB,mBAAmB;;4FAAnB,mBAAmB;kBAL/B,SAAS;mBAAC;oBACT,8DAA8D;oBAC9D,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;iBACjB","sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tabItem]',\n standalone: true,\n})\nexport class C80TabItemDirective {\n readonly content = inject(TemplateRef<unknown>);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"c80-tab-label.directive.js","sourceRoot":"","sources":["../../../../../libs/ui/src/lib/tab/c80-tab-label.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;AAO/D,MAAM,OAAO,oBAAoB;IACtB,QAAQ,GAAG,MAAM,CAAC,CAAA,WAAoB,CAAA,CAAC,CAAC;wGADtC,oBAAoB;4FAApB,oBAAoB;;4FAApB,oBAAoB;kBALhC,SAAS;mBAAC;oBACT,8DAA8D;oBAC9D,QAAQ,EAAE,YAAY;oBACtB,UAAU,EAAE,IAAI;iBACjB","sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tabLabel]',\n standalone: true,\n})\nexport class C80TabLabelDirective {\n readonly template = inject(TemplateRef<unknown>);\n}\n"]}
|
|
File without changes
|
/package/esm2022/lib/tab/{c80-tab-label.directive.js → directives/c80-tab-label.directive.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|