pdm-ui-kit 0.1.50 → 0.3.0
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/README.md +356 -4
- package/esm2020/lib/components/alert-dialog/alert-dialog.component.mjs +3 -3
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +37 -4
- package/esm2020/lib/components/button-group/button-group.component.mjs +208 -182
- package/esm2020/lib/components/calendar/calendar.component.mjs +3 -3
- package/esm2020/lib/components/card/card.component.mjs +36 -53
- package/esm2020/lib/components/combobox/combobox.component.mjs +136 -14
- package/esm2020/lib/components/command/command.component.mjs +3 -3
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +121 -42
- package/esm2020/lib/components/data-table/data-table.component.mjs +214 -16
- package/esm2020/lib/components/date-picker/date-picker.component.mjs +66 -54
- package/esm2020/lib/components/dialog/dialog.component.mjs +171 -38
- package/esm2020/lib/components/draggable-table/draggable-table.component.mjs +300 -0
- package/esm2020/lib/components/drawer/drawer.component.mjs +123 -16
- package/esm2020/lib/components/dropdown-menu/dropdown-menu.component.mjs +3 -2
- package/esm2020/lib/components/hover-card/hover-card.component.mjs +185 -24
- package/esm2020/lib/components/input/input.component.mjs +15 -15
- package/esm2020/lib/components/input-group/input-group.component.mjs +14 -14
- package/esm2020/lib/components/menubar/menubar.component.mjs +105 -29
- package/esm2020/lib/components/navigation-menu/navigation-menu.component.mjs +25 -3
- package/esm2020/lib/components/pagination/pagination.component.mjs +3 -3
- package/esm2020/lib/components/popover/popover.component.mjs +107 -73
- package/esm2020/lib/components/select/select.component.mjs +26 -23
- package/esm2020/lib/components/sheet/sheet.component.mjs +68 -12
- package/esm2020/lib/components/sidebar/sidebar.component.mjs +52 -5
- package/esm2020/lib/components/table/table.component.mjs +165 -192
- package/esm2020/lib/components/tabs/tabs.component.mjs +6 -6
- package/esm2020/lib/components/toggle-group/toggle-group.component.mjs +6 -6
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +162 -19
- package/esm2020/lib/overlay/z-index-helper.mjs +69 -0
- package/esm2020/lib/pdm-ui-kit.module.mjs +5 -1
- package/esm2020/lib/utils/responsive.mjs +143 -0
- package/esm2020/lib/utils/z-index.mjs +90 -0
- package/esm2020/public-api.mjs +67 -63
- package/fesm2015/pdm-ui-kit.mjs +2628 -847
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit.mjs +2630 -845
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +23 -1
- package/lib/components/button-group/button-group.component.d.ts +8 -2
- package/lib/components/card/card.component.d.ts +32 -19
- package/lib/components/combobox/combobox.component.d.ts +20 -3
- package/lib/components/context-menu/context-menu.component.d.ts +17 -8
- package/lib/components/data-table/data-table.component.d.ts +172 -14
- package/lib/components/date-picker/date-picker.component.d.ts +5 -6
- package/lib/components/dialog/dialog.component.d.ts +38 -4
- package/lib/components/draggable-table/draggable-table.component.d.ts +74 -0
- package/lib/components/drawer/drawer.component.d.ts +65 -7
- package/lib/components/hover-card/hover-card.component.d.ts +27 -4
- package/lib/components/input/input.component.d.ts +3 -3
- package/lib/components/input-group/input-group.component.d.ts +1 -1
- package/lib/components/menubar/menubar.component.d.ts +16 -8
- package/lib/components/navigation-menu/navigation-menu.component.d.ts +22 -1
- package/lib/components/popover/popover.component.d.ts +13 -12
- package/lib/components/select/select.component.d.ts +4 -5
- package/lib/components/sheet/sheet.component.d.ts +30 -3
- package/lib/components/sidebar/sidebar.component.d.ts +39 -1
- package/lib/components/table/table.component.d.ts +47 -26
- package/lib/components/tabs/tabs.component.d.ts +1 -1
- package/lib/components/toggle-group/toggle-group.component.d.ts +1 -1
- package/lib/components/tooltip/tooltip.component.d.ts +21 -3
- package/lib/overlay/z-index-helper.d.ts +36 -0
- package/lib/pdm-ui-kit.module.d.ts +42 -41
- package/lib/utils/responsive.d.ts +107 -0
- package/lib/utils/z-index.d.ts +69 -0
- package/package.json +10 -8
- package/public-api.d.ts +66 -62
- package/src/lib/styles/tokens.css +182 -0
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare type PdmBreadcrumbMode = 'custom-separator' | 'dropdown' | 'collapsed' | 'link-component' | 'responsive';
|
|
3
|
+
/**
|
|
4
|
+
* Breadcrumb component con soporte responsive
|
|
5
|
+
*
|
|
6
|
+
* MEJORADO en v0.2.0:
|
|
7
|
+
* - Modo responsive real con overflow-x-auto
|
|
8
|
+
* - Collapse inteligente en mobile
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <pdm-breadcrumb
|
|
12
|
+
* mode="responsive"
|
|
13
|
+
* [items]="['Home', 'Products', 'Electronics', 'Laptops']">
|
|
14
|
+
* </pdm-breadcrumb>
|
|
15
|
+
*/
|
|
3
16
|
export declare class PdmBreadcrumbComponent {
|
|
4
17
|
mode: PdmBreadcrumbMode;
|
|
5
18
|
items: string[];
|
|
6
19
|
className: string;
|
|
20
|
+
/**
|
|
21
|
+
* Cantidad mínima de items para mostrar en mobile cuando mode="responsive"
|
|
22
|
+
* Default: 2 (primer y último item)
|
|
23
|
+
*/
|
|
24
|
+
minItemsMobile: number;
|
|
7
25
|
get renderedItems(): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Determina si un item debe estar visible en mobile (modo responsive)
|
|
28
|
+
*/
|
|
29
|
+
shouldShowInMobile(index: number): boolean;
|
|
8
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmBreadcrumbComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmBreadcrumbComponent, "pdm-breadcrumb", never, { "mode": "mode"; "items": "items"; "className": "className"; }, {}, never, never, false>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmBreadcrumbComponent, "pdm-breadcrumb", never, { "mode": "mode"; "items": "items"; "className": "className"; "minItemsMobile": "minItemsMobile"; }, {}, never, never, false>;
|
|
10
32
|
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare type PdmButtonGroupVariant =
|
|
3
|
-
export declare type PdmButtonGroupOrientation =
|
|
2
|
+
export declare type PdmButtonGroupVariant = "default" | "group" | "orientation" | "separator";
|
|
3
|
+
export declare type PdmButtonGroupOrientation = "horizontal" | "vertical";
|
|
4
|
+
declare type Axis = "horizontal" | "vertical";
|
|
4
5
|
export declare class PdmButtonGroupComponent {
|
|
5
6
|
variant: PdmButtonGroupVariant;
|
|
6
7
|
orientation?: PdmButtonGroupOrientation;
|
|
7
8
|
direction?: PdmButtonGroupOrientation;
|
|
8
9
|
separated: boolean;
|
|
9
10
|
className: string;
|
|
11
|
+
get axis(): Axis;
|
|
12
|
+
get isVertical(): boolean;
|
|
13
|
+
get shouldAttach(): boolean;
|
|
14
|
+
get ariaOrientation(): PdmButtonGroupOrientation;
|
|
10
15
|
get rootClasses(): string[];
|
|
11
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmButtonGroupComponent, never>;
|
|
12
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<PdmButtonGroupComponent, "pdm-button-group", never, { "variant": "variant"; "orientation": "orientation"; "direction": "direction"; "separated": "separated"; "className": "className"; }, {}, never, ["*"], false>;
|
|
13
18
|
}
|
|
19
|
+
export {};
|
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Card component - Visual container primitivo
|
|
4
|
+
*
|
|
5
|
+
* BREAKING CHANGE en v0.2.0: variant="login" eliminado.
|
|
6
|
+
* Card es ahora un componente UI puro sin lógica de negocio.
|
|
7
|
+
*
|
|
8
|
+
* Para crear un login form, componer con primitivos:
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <pdm-card>
|
|
12
|
+
* <div pdmCardHeader>
|
|
13
|
+
* <h3 class="text-lg font-semibold">Login</h3>
|
|
14
|
+
* <p class="text-sm text-muted-foreground">Enter your credentials</p>
|
|
15
|
+
* </div>
|
|
16
|
+
* <div pdmCardContent>
|
|
17
|
+
* <form [formGroup]="form">
|
|
18
|
+
* <pdm-field>
|
|
19
|
+
* <pdm-label>Email</pdm-label>
|
|
20
|
+
* <pdm-input type="email" formControlName="email" />
|
|
21
|
+
* </pdm-field>
|
|
22
|
+
* <pdm-field>
|
|
23
|
+
* <pdm-label>Password</pdm-label>
|
|
24
|
+
* <pdm-input-password formControlName="password" />
|
|
25
|
+
* </pdm-field>
|
|
26
|
+
* </form>
|
|
27
|
+
* </div>
|
|
28
|
+
* <div pdmCardFooter>
|
|
29
|
+
* <pdm-button (click)="onLogin()">Login</pdm-button>
|
|
30
|
+
* </div>
|
|
31
|
+
* </pdm-card>
|
|
32
|
+
*/
|
|
4
33
|
export declare class PdmCardComponent {
|
|
5
|
-
variant: PdmCardVariant;
|
|
6
34
|
className: string;
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
actionText: string;
|
|
10
|
-
emailLabel: string;
|
|
11
|
-
emailPlaceholder: string;
|
|
12
|
-
passwordLabel: string;
|
|
13
|
-
passwordHint: string;
|
|
14
|
-
primaryActionText: string;
|
|
15
|
-
secondaryActionText: string;
|
|
16
|
-
primaryAction: EventEmitter<void>;
|
|
17
|
-
secondaryAction: EventEmitter<void>;
|
|
18
|
-
actionPressed: EventEmitter<void>;
|
|
19
|
-
onPrimaryAction(): void;
|
|
20
|
-
onSecondaryAction(): void;
|
|
21
|
-
onActionPressed(): void;
|
|
22
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmCardComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmCardComponent, "pdm-card", never, { "
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmCardComponent, "pdm-card", never, { "className": "className"; }, {}, never, ["[pdmCardHeader]", "[pdmCardContent]", "[pdmCardFooter]"], false>;
|
|
24
37
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, ViewContainerRef } from "@angular/core";
|
|
2
|
+
import { Overlay } from "@angular/cdk/overlay";
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class PdmComboboxComponent {
|
|
4
|
+
export declare class PdmComboboxComponent implements OnDestroy {
|
|
5
|
+
private readonly overlay;
|
|
6
|
+
private readonly viewContainerRef;
|
|
7
|
+
private readonly elementRef;
|
|
8
|
+
private readonly cdr;
|
|
4
9
|
open: boolean;
|
|
5
10
|
placeholder: string;
|
|
6
11
|
searchPlaceholder: string;
|
|
@@ -8,11 +13,23 @@ export declare class PdmComboboxComponent {
|
|
|
8
13
|
options: string[];
|
|
9
14
|
value: string;
|
|
10
15
|
width: number;
|
|
16
|
+
panelClassName: string;
|
|
11
17
|
openChange: EventEmitter<boolean>;
|
|
12
18
|
valueChange: EventEmitter<string>;
|
|
19
|
+
triggerRef?: ElementRef<HTMLElement>;
|
|
20
|
+
panelTemplateRef: any;
|
|
21
|
+
private overlayRef;
|
|
22
|
+
private outsideClickSub;
|
|
23
|
+
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
|
|
24
|
+
ngOnDestroy(): void;
|
|
13
25
|
get selectedLabel(): string;
|
|
14
26
|
toggle(): void;
|
|
15
27
|
select(option: string): void;
|
|
28
|
+
onEscape(): void;
|
|
29
|
+
private openPanel;
|
|
30
|
+
private close;
|
|
31
|
+
private destroyOverlay;
|
|
32
|
+
private getPositionConfigs;
|
|
16
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmComboboxComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmComboboxComponent, "pdm-combobox", never, { "open": "open"; "placeholder": "placeholder"; "searchPlaceholder": "searchPlaceholder"; "className": "className"; "options": "options"; "value": "value"; "width": "width"; }, { "openChange": "openChange"; "valueChange": "valueChange"; }, never, never, false>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmComboboxComponent, "pdm-combobox", never, { "open": "open"; "placeholder": "placeholder"; "searchPlaceholder": "searchPlaceholder"; "className": "className"; "options": "options"; "value": "value"; "width": "width"; "panelClassName": "panelClassName"; }, { "openChange": "openChange"; "valueChange": "valueChange"; }, never, never, false>;
|
|
18
35
|
}
|
|
@@ -1,29 +1,38 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnDestroy, OnInit } from
|
|
2
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from "@angular/core";
|
|
2
|
+
import { Overlay } from "@angular/cdk/overlay";
|
|
3
|
+
import { PdmMenuItem } from "../dropdown-menu/dropdown-menu.component";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export interface PdmContextMenuItem extends PdmMenuItem {
|
|
5
6
|
checked?: boolean;
|
|
6
7
|
selectedDot?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare class PdmContextMenuComponent implements OnInit, OnDestroy {
|
|
9
|
-
private readonly
|
|
10
|
+
private readonly overlay;
|
|
11
|
+
private readonly viewContainerRef;
|
|
12
|
+
private readonly _elementRef;
|
|
13
|
+
private readonly cdr;
|
|
10
14
|
items: PdmContextMenuItem[];
|
|
11
15
|
className: string;
|
|
12
16
|
triggerLabel: string;
|
|
13
17
|
width: number;
|
|
14
18
|
height: number;
|
|
19
|
+
panelClassName: string;
|
|
15
20
|
itemSelect: EventEmitter<string>;
|
|
16
21
|
open: boolean;
|
|
17
22
|
x: number;
|
|
18
23
|
y: number;
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
menuTemplateRef: any;
|
|
25
|
+
private overlayRef;
|
|
26
|
+
private outsideClickSub;
|
|
27
|
+
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, _elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
|
|
21
28
|
ngOnInit(): void;
|
|
22
29
|
ngOnDestroy(): void;
|
|
23
30
|
onContextMenu(event: MouseEvent): void;
|
|
24
31
|
select(item: PdmContextMenuItem): void;
|
|
25
|
-
|
|
26
|
-
private
|
|
32
|
+
onDocumentClick(event: MouseEvent): void;
|
|
33
|
+
private createOverlay;
|
|
34
|
+
private close;
|
|
35
|
+
private destroyOverlay;
|
|
27
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmContextMenuComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmContextMenuComponent, "pdm-context-menu", never, { "items": "items"; "className": "className"; "triggerLabel": "triggerLabel"; "width": "width"; "height": "height"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmContextMenuComponent, "pdm-context-menu", never, { "items": "items"; "className": "className"; "triggerLabel": "triggerLabel"; "width": "width"; "height": "height"; "panelClassName": "panelClassName"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
|
|
29
38
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { TableResponsiveStrategy } from '../../utils/responsive';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* DEPRECATED: Esta interfaz es para backward compatibility
|
|
6
|
+
* Usar PdmDataTableColumn<T> con tipo genérico en su lugar
|
|
7
|
+
*/
|
|
3
8
|
export interface PdmDataTableRow {
|
|
4
9
|
id: string;
|
|
5
10
|
status: string;
|
|
@@ -7,36 +12,189 @@ export interface PdmDataTableRow {
|
|
|
7
12
|
amount: string;
|
|
8
13
|
selected?: boolean;
|
|
9
14
|
}
|
|
10
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Definición de columna para data-table genérico
|
|
17
|
+
*/
|
|
18
|
+
export interface PdmDataTableColumn<T = any> {
|
|
19
|
+
/**
|
|
20
|
+
* Key del campo en el objeto de datos
|
|
21
|
+
* Usado para acceder al valor: row[key]
|
|
22
|
+
*/
|
|
23
|
+
key: keyof T;
|
|
24
|
+
/**
|
|
25
|
+
* Label a mostrar en el header
|
|
26
|
+
*/
|
|
27
|
+
label: string;
|
|
28
|
+
/**
|
|
29
|
+
* Ancho de la columna (CSS width)
|
|
30
|
+
* Ej: '100px', '20%', 'auto'
|
|
31
|
+
*/
|
|
32
|
+
width?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Si la columna es sortable
|
|
35
|
+
*/
|
|
36
|
+
sortable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Alineación del contenido
|
|
39
|
+
*/
|
|
40
|
+
align?: 'left' | 'center' | 'right';
|
|
41
|
+
/**
|
|
42
|
+
* Función custom para renderizar el valor
|
|
43
|
+
* Si no se provee, se usa toString() del valor
|
|
44
|
+
*/
|
|
45
|
+
render?: (value: any, row: T) => string;
|
|
46
|
+
/**
|
|
47
|
+
* Template personalizado para la celda
|
|
48
|
+
* Tiene prioridad sobre render()
|
|
49
|
+
*/
|
|
50
|
+
cellTemplate?: TemplateRef<{
|
|
51
|
+
$implicit: T;
|
|
52
|
+
value: any;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Si es true, la columna se oculta en mobile
|
|
56
|
+
* Solo se muestra en breakpoint md+ (768px)
|
|
57
|
+
*/
|
|
58
|
+
hideOnMobile?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* CSS classes adicionales para las celdas de esta columna
|
|
61
|
+
*/
|
|
62
|
+
cellClass?: string;
|
|
63
|
+
/**
|
|
64
|
+
* CSS classes adicionales para el header de esta columna
|
|
65
|
+
*/
|
|
66
|
+
headerClass?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Data-table genérico con paginación, filtrado y selección
|
|
70
|
+
*
|
|
71
|
+
* NUEVO: Ahora es genérico y configurable via columnas
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* // Definir columnas
|
|
75
|
+
* columns: PdmDataTableColumn<User>[] = [
|
|
76
|
+
* { key: 'name', label: 'Name', sortable: true },
|
|
77
|
+
* { key: 'email', label: 'Email', sortable: true },
|
|
78
|
+
* { key: 'role', label: 'Role', hideOnMobile: true },
|
|
79
|
+
* { key: 'createdAt', label: 'Created', render: (val) => formatDate(val) }
|
|
80
|
+
* ];
|
|
81
|
+
*
|
|
82
|
+
* // En el template
|
|
83
|
+
* <pdm-data-table
|
|
84
|
+
* [columns]="columns"
|
|
85
|
+
* [rows]="users"
|
|
86
|
+
* [selectable]="true"
|
|
87
|
+
* (selectionChange)="onSelect($event)">
|
|
88
|
+
* </pdm-data-table>
|
|
89
|
+
*/
|
|
90
|
+
export declare class PdmDataTableComponent<T = any> {
|
|
11
91
|
className: string;
|
|
92
|
+
/**
|
|
93
|
+
* Columnas a mostrar
|
|
94
|
+
* Si no se provee, intenta inferir del primer row (legacy mode)
|
|
95
|
+
*/
|
|
96
|
+
columns: PdmDataTableColumn<T>[];
|
|
97
|
+
/**
|
|
98
|
+
* Estrategia responsive de la tabla
|
|
99
|
+
*/
|
|
100
|
+
responsiveStrategy: TableResponsiveStrategy;
|
|
101
|
+
/**
|
|
102
|
+
* Si es true, muestra checkbox de selección en cada fila
|
|
103
|
+
*/
|
|
104
|
+
selectable: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Si es true, muestra botón de acciones (tres puntos) en cada fila
|
|
107
|
+
*/
|
|
108
|
+
showActions: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Si es true, muestra filtro de búsqueda
|
|
111
|
+
*/
|
|
112
|
+
showFilter: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Si es true, muestra controles de paginación
|
|
115
|
+
*/
|
|
116
|
+
showPagination: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Si es true, muestra selector de columnas
|
|
119
|
+
*/
|
|
120
|
+
showColumnSelector: boolean;
|
|
12
121
|
filterPlaceholder: string;
|
|
13
122
|
columnsLabel: string;
|
|
14
|
-
statusLabel: string;
|
|
15
|
-
emailLabel: string;
|
|
16
|
-
amountLabel: string;
|
|
17
123
|
previousLabel: string;
|
|
18
124
|
nextLabel: string;
|
|
19
125
|
emptyLabel: string;
|
|
20
|
-
|
|
126
|
+
rowsSelectedLabel: string;
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated Use columns configuration instead
|
|
129
|
+
*/
|
|
130
|
+
statusLabel: string;
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated Use columns configuration instead
|
|
133
|
+
*/
|
|
134
|
+
emailLabel: string;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Use columns configuration instead
|
|
137
|
+
*/
|
|
138
|
+
amountLabel: string;
|
|
139
|
+
/**
|
|
140
|
+
* Datos a mostrar
|
|
141
|
+
*/
|
|
142
|
+
rows: T[];
|
|
143
|
+
/**
|
|
144
|
+
* Página actual (1-indexed)
|
|
145
|
+
*/
|
|
21
146
|
page: number;
|
|
147
|
+
/**
|
|
148
|
+
* Cantidad de filas por página
|
|
149
|
+
*/
|
|
22
150
|
pageSize: number;
|
|
151
|
+
/**
|
|
152
|
+
* Query de filtrado
|
|
153
|
+
*/
|
|
23
154
|
query: string;
|
|
155
|
+
/**
|
|
156
|
+
* Función custom de filtrado
|
|
157
|
+
* Si no se provee, busca en todos los campos string
|
|
158
|
+
*/
|
|
159
|
+
filterFn?: (row: T, query: string) => boolean;
|
|
24
160
|
queryChange: EventEmitter<string>;
|
|
25
|
-
rowAction: EventEmitter<
|
|
161
|
+
rowAction: EventEmitter<T>;
|
|
26
162
|
pageChange: EventEmitter<number>;
|
|
27
163
|
selectionChange: EventEmitter<{
|
|
28
|
-
|
|
164
|
+
row: T;
|
|
29
165
|
selected: boolean;
|
|
30
166
|
}>;
|
|
31
|
-
|
|
32
|
-
|
|
167
|
+
columnSort: EventEmitter<{
|
|
168
|
+
column: PdmDataTableColumn<T>;
|
|
169
|
+
direction: 'asc' | 'desc';
|
|
170
|
+
}>;
|
|
171
|
+
selectedRows: Set<T>;
|
|
172
|
+
sortColumn?: PdmDataTableColumn<T>;
|
|
173
|
+
sortDirection: 'asc' | 'desc';
|
|
174
|
+
/**
|
|
175
|
+
* Backward compatibility: si no hay columnas definidas, inferir del primer row
|
|
176
|
+
*/
|
|
177
|
+
get effectiveColumns(): PdmDataTableColumn<T>[];
|
|
178
|
+
/**
|
|
179
|
+
* LEGACY: mapeo de keys a labels hardcodeados
|
|
180
|
+
*/
|
|
181
|
+
private getLegacyLabel;
|
|
182
|
+
get filteredRows(): T[];
|
|
183
|
+
get pagedRows(): T[];
|
|
33
184
|
get totalPages(): number;
|
|
34
185
|
get selectedCount(): number;
|
|
35
186
|
onQueryInput(event: Event): void;
|
|
36
|
-
onToggleRow(row:
|
|
187
|
+
onToggleRow(row: T, event: Event): void;
|
|
188
|
+
onToggleAll(event: Event): void;
|
|
189
|
+
isSelected(row: T): boolean;
|
|
37
190
|
previous(): void;
|
|
38
191
|
next(): void;
|
|
39
|
-
onAction(row:
|
|
40
|
-
|
|
41
|
-
|
|
192
|
+
onAction(row: T): void;
|
|
193
|
+
onSort(column: PdmDataTableColumn<T>): void;
|
|
194
|
+
getCellValue(row: T, column: PdmDataTableColumn<T>): any;
|
|
195
|
+
getCellClass(column: PdmDataTableColumn<T>): string;
|
|
196
|
+
getHeaderClass(column: PdmDataTableColumn<T>): string;
|
|
197
|
+
getColumnStyle(column: PdmDataTableColumn<T>): any;
|
|
198
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDataTableComponent<any>, never>;
|
|
199
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDataTableComponent<any>, "pdm-data-table", never, { "className": "className"; "columns": "columns"; "responsiveStrategy": "responsiveStrategy"; "selectable": "selectable"; "showActions": "showActions"; "showFilter": "showFilter"; "showPagination": "showPagination"; "showColumnSelector": "showColumnSelector"; "filterPlaceholder": "filterPlaceholder"; "columnsLabel": "columnsLabel"; "previousLabel": "previousLabel"; "nextLabel": "nextLabel"; "emptyLabel": "emptyLabel"; "rowsSelectedLabel": "rowsSelectedLabel"; "statusLabel": "statusLabel"; "emailLabel": "emailLabel"; "amountLabel": "amountLabel"; "rows": "rows"; "page": "page"; "pageSize": "pageSize"; "query": "query"; "filterFn": "filterFn"; }, { "queryChange": "queryChange"; "rowAction": "rowAction"; "pageChange": "pageChange"; "selectionChange": "selectionChange"; "columnSort": "columnSort"; }, never, never, false>;
|
|
42
200
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ChangeDetectorRef,
|
|
2
|
-
import { Overlay } from
|
|
3
|
-
import { PdmCalendarRange, PdmCalendarVariant } from
|
|
4
|
-
import { PdmOverlayOptions } from
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy, ViewContainerRef } from "@angular/core";
|
|
2
|
+
import { Overlay } from "@angular/cdk/overlay";
|
|
3
|
+
import { PdmCalendarRange, PdmCalendarVariant } from "../calendar/calendar.component";
|
|
4
|
+
import { PdmOverlayOptions } from "../../overlay/pdm-overlay-options";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class PdmDatePickerComponent implements OnDestroy {
|
|
7
|
-
private readonly elementRef;
|
|
8
7
|
private readonly cdr;
|
|
9
8
|
private readonly overlay;
|
|
10
9
|
private readonly viewContainerRef;
|
|
@@ -17,7 +16,7 @@ export declare class PdmDatePickerComponent implements OnDestroy {
|
|
|
17
16
|
private backdropSub;
|
|
18
17
|
private triggerRef?;
|
|
19
18
|
private panelTemplateRef;
|
|
20
|
-
constructor(
|
|
19
|
+
constructor(cdr: ChangeDetectorRef, overlay: Overlay, viewContainerRef: ViewContainerRef);
|
|
21
20
|
id: string;
|
|
22
21
|
variant: PdmCalendarVariant | string;
|
|
23
22
|
label: string;
|
|
@@ -1,11 +1,43 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare type PdmDialogVariant =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare type PdmDialogVariant = "default" | "custom-close";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use 'responsive' mode instead. Will be removed in v0.3.0
|
|
6
|
+
*/
|
|
7
|
+
export declare type PdmDialogSize = "desktop" | "mobile" | "mobile-fullscreen" | "sm" | "md" | "lg" | "xl" | "responsive";
|
|
8
|
+
export declare type PdmDialogFooterAlign = "right" | "full-width" | "left";
|
|
9
|
+
/**
|
|
10
|
+
* Modal/Dialog component con soporte responsive
|
|
11
|
+
*
|
|
12
|
+
* MEJORADO en v0.2.0:
|
|
13
|
+
* - Modo 'responsive' (default): fullscreen en mobile, modal en desktop
|
|
14
|
+
* - Tamaños predefinidos: sm, md, lg, xl
|
|
15
|
+
* - Mejor manejo de scroll en mobile
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Responsive (recomendado)
|
|
19
|
+
* <pdm-dialog [open]="isOpen" size="responsive">
|
|
20
|
+
* <p>Content</p>
|
|
21
|
+
* </pdm-dialog>
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // Tamaño fijo
|
|
25
|
+
* <pdm-dialog [open]="isOpen" size="lg">
|
|
26
|
+
* <p>Content</p>
|
|
27
|
+
* </pdm-dialog>
|
|
28
|
+
*/
|
|
6
29
|
export declare class PdmDialogComponent {
|
|
7
30
|
open: boolean;
|
|
8
31
|
variant: PdmDialogVariant;
|
|
32
|
+
/**
|
|
33
|
+
* Tamaño del dialog
|
|
34
|
+
* - responsive: fullscreen mobile, modal desktop (recomendado)
|
|
35
|
+
* - sm: 400px max
|
|
36
|
+
* - md: 500px max
|
|
37
|
+
* - lg: 640px max (default)
|
|
38
|
+
* - xl: 800px max
|
|
39
|
+
* - desktop/mobile/mobile-fullscreen: legacy, deprecado
|
|
40
|
+
*/
|
|
9
41
|
size: PdmDialogSize;
|
|
10
42
|
title: string;
|
|
11
43
|
description: string;
|
|
@@ -30,9 +62,11 @@ export declare class PdmDialogComponent {
|
|
|
30
62
|
onSecondaryAction(): void;
|
|
31
63
|
onBackdropClick(): void;
|
|
32
64
|
get panelClassName(): string;
|
|
65
|
+
private buildPanelClasses;
|
|
33
66
|
get bodyWrapperClassName(): string;
|
|
34
67
|
get headerWrapperClassName(): string;
|
|
35
68
|
get footerWrapperClassName(): string;
|
|
69
|
+
get containerClassName(): string;
|
|
36
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDialogComponent, never>;
|
|
37
71
|
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDialogComponent, "pdm-dialog", never, { "open": "open"; "variant": "variant"; "size": "size"; "title": "title"; "description": "description"; "closeOnBackdrop": "closeOnBackdrop"; "closeOnEsc": "closeOnEsc"; "showCloseButton": "showCloseButton"; "showHeader": "showHeader"; "showFooter": "showFooter"; "primaryActionText": "primaryActionText"; "secondaryActionText": "secondaryActionText"; "alignFooter": "alignFooter"; "headerClassName": "headerClassName"; "bodyClassName": "bodyClassName"; "footerClassName": "footerClassName"; "className": "className"; }, { "openChange": "openChange"; "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; }, never, ["*"], false>;
|
|
38
72
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { PdmTableVariant } from '../table/table.component';
|
|
3
|
+
import { TableResponsiveStrategy } from '../../utils/responsive';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Tabla con funcionalidad de reordenamiento de filas mediante drag & drop
|
|
7
|
+
*
|
|
8
|
+
* Extiende pdm-table agregando la capacidad de reordenar filas.
|
|
9
|
+
* Si no necesitás drag & drop, usá pdm-table directamente (más simple y liviano).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <pdm-draggable-table
|
|
13
|
+
* variant="interactive"
|
|
14
|
+
* [reorderRows]="true"
|
|
15
|
+
* (rowOrderChange)="onOrderChange($event)">
|
|
16
|
+
* <tbody>
|
|
17
|
+
* <tr data-row-id="1"><td>Row 1</td></tr>
|
|
18
|
+
* <tr data-row-id="2"><td>Row 2</td></tr>
|
|
19
|
+
* </tbody>
|
|
20
|
+
* </pdm-draggable-table>
|
|
21
|
+
*
|
|
22
|
+
* IMPORTANTE: Cada <tr> debe tener un atributo data-row-id único
|
|
23
|
+
*/
|
|
24
|
+
export declare class PdmDraggableTableComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
25
|
+
private readonly renderer;
|
|
26
|
+
variant: PdmTableVariant;
|
|
27
|
+
responsiveStrategy: TableResponsiveStrategy;
|
|
28
|
+
className: string;
|
|
29
|
+
fullBleed: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Habilita el reordenamiento de filas mediante drag & drop
|
|
32
|
+
*/
|
|
33
|
+
reorderRows: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Selector CSS para identificar los handles de drag
|
|
36
|
+
* Por defecto busca: [data-drag-handle], [data-slot=row-drag-handle], .row-drag-handle
|
|
37
|
+
* Si no encuentra ninguno, inserta un handle automático
|
|
38
|
+
*/
|
|
39
|
+
dragHandleSelector: string;
|
|
40
|
+
/**
|
|
41
|
+
* Emite el nuevo orden de las filas cuando el usuario termina de arrastrar
|
|
42
|
+
* Array de data-row-id en el nuevo orden
|
|
43
|
+
*/
|
|
44
|
+
rowOrderChange: EventEmitter<string[]>;
|
|
45
|
+
tableElement?: ElementRef<HTMLTableElement>;
|
|
46
|
+
private cleanupListeners;
|
|
47
|
+
private observer?;
|
|
48
|
+
private draggedRow;
|
|
49
|
+
constructor(renderer: Renderer2);
|
|
50
|
+
ngAfterViewInit(): void;
|
|
51
|
+
get wrapperClasses(): string[];
|
|
52
|
+
get tableClasses(): string[];
|
|
53
|
+
private getResponsiveStrategyClasses;
|
|
54
|
+
private getVariantWrapperClasses;
|
|
55
|
+
private getVariantTableClasses;
|
|
56
|
+
private getCellClasses;
|
|
57
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
58
|
+
ngOnDestroy(): void;
|
|
59
|
+
private syncReorderBehavior;
|
|
60
|
+
private cleanupReorderBehavior;
|
|
61
|
+
private getTbody;
|
|
62
|
+
private setRowsDraggable;
|
|
63
|
+
/**
|
|
64
|
+
* Inserta un handle de drag automático si no existe uno custom
|
|
65
|
+
*/
|
|
66
|
+
private syncAutoDragHandle;
|
|
67
|
+
private onDragStart;
|
|
68
|
+
private onDragOver;
|
|
69
|
+
private onDrop;
|
|
70
|
+
private onDragEnd;
|
|
71
|
+
private armDragFromHandle;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDraggableTableComponent, never>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDraggableTableComponent, "pdm-draggable-table", never, { "variant": "variant"; "responsiveStrategy": "responsiveStrategy"; "className": "className"; "fullBleed": "fullBleed"; "reorderRows": "reorderRows"; "dragHandleSelector": "dragHandleSelector"; }, { "rowOrderChange": "rowOrderChange"; }, never, ["*"], false>;
|
|
74
|
+
}
|