pdm-ui-kit 0.1.49 → 0.2.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 +189 -2
- package/esm2020/lib/components/alert-dialog/alert-dialog.component.mjs +25 -7
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +37 -4
- package/esm2020/lib/components/calendar/calendar.component.mjs +3 -3
- package/esm2020/lib/components/card/card.component.mjs +36 -53
- package/esm2020/lib/components/command/command.component.mjs +3 -3
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +16 -8
- package/esm2020/lib/components/data-table/data-table.component.mjs +214 -16
- package/esm2020/lib/components/dialog/dialog.component.mjs +133 -17
- package/esm2020/lib/components/draggable-table/draggable-table.component.mjs +300 -0
- package/esm2020/lib/components/drawer/drawer.component.mjs +138 -10
- package/esm2020/lib/components/dropdown-menu/dropdown-menu.component.mjs +6 -3
- package/esm2020/lib/components/hover-card/hover-card.component.mjs +3 -3
- package/esm2020/lib/components/menubar/menubar.component.mjs +38 -7
- 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 +19 -11
- package/esm2020/lib/components/select/select.component.mjs +8 -4
- package/esm2020/lib/components/sheet/sheet.component.mjs +88 -11
- package/esm2020/lib/components/sidebar/sidebar.component.mjs +52 -5
- package/esm2020/lib/components/table/table.component.mjs +152 -188
- package/esm2020/lib/components/tabs/tabs.component.mjs +3 -3
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +3 -3
- package/esm2020/lib/overlay/pdm-outside-click.directive.mjs +86 -0
- package/esm2020/lib/pdm-ui-kit.module.mjs +9 -1
- package/esm2020/lib/utils/responsive.mjs +143 -0
- package/esm2020/lib/utils/z-index.mjs +93 -0
- package/esm2020/public-api.mjs +5 -1
- package/fesm2015/pdm-ui-kit.mjs +1625 -370
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit.mjs +1620 -367
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/lib/components/alert-dialog/alert-dialog.component.d.ts +9 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +23 -1
- package/lib/components/card/card.component.d.ts +32 -19
- package/lib/components/context-menu/context-menu.component.d.ts +6 -3
- package/lib/components/data-table/data-table.component.d.ts +172 -14
- package/lib/components/dialog/dialog.component.d.ts +35 -1
- package/lib/components/draggable-table/draggable-table.component.d.ts +74 -0
- package/lib/components/drawer/drawer.component.d.ts +67 -3
- package/lib/components/menubar/menubar.component.d.ts +10 -2
- package/lib/components/navigation-menu/navigation-menu.component.d.ts +22 -1
- package/lib/components/popover/popover.component.d.ts +6 -3
- package/lib/components/sheet/sheet.component.d.ts +34 -1
- package/lib/components/sidebar/sidebar.component.d.ts +39 -1
- package/lib/components/table/table.component.d.ts +46 -25
- package/lib/overlay/pdm-outside-click.directive.d.ts +40 -0
- package/lib/pdm-ui-kit.module.d.ts +42 -40
- package/lib/utils/responsive.d.ts +107 -0
- package/lib/utils/z-index.d.ts +73 -0
- package/package.json +5 -3
- package/public-api.d.ts +4 -0
|
@@ -9,13 +9,21 @@ export declare class PdmAlertDialogComponent {
|
|
|
9
9
|
confirmText: string;
|
|
10
10
|
cancelText: string;
|
|
11
11
|
className: string;
|
|
12
|
+
/** Close when the ESC key is pressed. Default: `true`. */
|
|
13
|
+
closeOnEsc: boolean;
|
|
12
14
|
openChange: EventEmitter<boolean>;
|
|
13
15
|
confirm: EventEmitter<void>;
|
|
14
16
|
cancel: EventEmitter<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns `true` when at least one consumer listens to `openChange`.
|
|
19
|
+
* - **Controlled** (has observers): parent manages `open` via two-way binding → only emit.
|
|
20
|
+
* - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.
|
|
21
|
+
*/
|
|
22
|
+
private get isControlled();
|
|
15
23
|
onTriggerClick(): void;
|
|
16
24
|
onCancel(): void;
|
|
17
25
|
onConfirm(): void;
|
|
18
26
|
onEsc(): void;
|
|
19
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmAlertDialogComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmAlertDialogComponent, "pdm-alert-dialog", never, { "open": "open"; "showTrigger": "showTrigger"; "triggerText": "triggerText"; "title": "title"; "description": "description"; "confirmText": "confirmText"; "cancelText": "cancelText"; "className": "className"; }, { "openChange": "openChange"; "confirm": "confirm"; "cancel": "cancel"; }, never, never, false>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmAlertDialogComponent, "pdm-alert-dialog", never, { "open": "open"; "showTrigger": "showTrigger"; "triggerText": "triggerText"; "title": "title"; "description": "description"; "confirmText": "confirmText"; "cancelText": "cancelText"; "className": "className"; "closeOnEsc": "closeOnEsc"; }, { "openChange": "openChange"; "confirm": "confirm"; "cancel": "cancel"; }, never, never, false>;
|
|
21
29
|
}
|
|
@@ -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,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,11 +1,11 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { PdmMenuItem } from '../dropdown-menu/dropdown-menu.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface PdmContextMenuItem extends PdmMenuItem {
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
selectedDot?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare class PdmContextMenuComponent {
|
|
8
|
+
export declare class PdmContextMenuComponent implements OnInit, OnDestroy {
|
|
9
9
|
private readonly elementRef;
|
|
10
10
|
items: PdmContextMenuItem[];
|
|
11
11
|
className: string;
|
|
@@ -16,11 +16,14 @@ export declare class PdmContextMenuComponent {
|
|
|
16
16
|
open: boolean;
|
|
17
17
|
x: number;
|
|
18
18
|
y: number;
|
|
19
|
+
private boundPointerDown;
|
|
19
20
|
constructor(elementRef: ElementRef<HTMLElement>);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
20
23
|
onContextMenu(event: MouseEvent): void;
|
|
21
24
|
select(item: PdmContextMenuItem): void;
|
|
22
25
|
onEsc(): void;
|
|
23
|
-
|
|
26
|
+
private onDocumentPointerDown;
|
|
24
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmContextMenuComponent, never>;
|
|
25
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>;
|
|
26
29
|
}
|
|
@@ -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,11 +1,43 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare type PdmDialogVariant = 'default' | 'custom-close';
|
|
4
|
-
|
|
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';
|
|
5
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 buildClasses;
|
|
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
|
+
}
|
|
@@ -1,12 +1,70 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
export declare type PdmDrawerPosition = 'bottom' | 'left' | 'right' | 'top';
|
|
4
|
+
export declare type PdmDrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use specific drawer types. Will be removed in v0.3.0
|
|
7
|
+
*/
|
|
3
8
|
export declare type PdmDrawerVariant = 'drawer' | 'responsive-dialog';
|
|
9
|
+
/**
|
|
10
|
+
* Drawer/Sheet component con soporte responsive
|
|
11
|
+
*
|
|
12
|
+
* MEJORADO en v0.2.0:
|
|
13
|
+
* - Posicionamiento configurable (bottom, left, right, top)
|
|
14
|
+
* - Tamaños predefinidos
|
|
15
|
+
* - Responsive: bottom sheet en mobile, side panel en desktop
|
|
16
|
+
* - Contenido genérico via ng-content
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Drawer simple desde el bottom
|
|
20
|
+
* <pdm-drawer [open]="isOpen" position="bottom">
|
|
21
|
+
* <h3>Title</h3>
|
|
22
|
+
* <p>Content</p>
|
|
23
|
+
* </pdm-drawer>
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Side panel desde la right
|
|
27
|
+
* <pdm-drawer [open]="isOpen" position="right" size="md">
|
|
28
|
+
* <p>Content</p>
|
|
29
|
+
* </pdm-drawer>
|
|
30
|
+
*/
|
|
4
31
|
export declare class PdmDrawerComponent {
|
|
5
32
|
open: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Posición del drawer
|
|
35
|
+
* - bottom: desde abajo (default, mejor para mobile)
|
|
36
|
+
* - left: side panel desde izquierda
|
|
37
|
+
* - right: side panel desde derecha
|
|
38
|
+
* - top: desde arriba (poco común)
|
|
39
|
+
*/
|
|
40
|
+
position: PdmDrawerPosition;
|
|
41
|
+
/**
|
|
42
|
+
* Tamaño del drawer
|
|
43
|
+
* - sm: 400px (side) / 50vh (bottom/top)
|
|
44
|
+
* - md: 500px (side) / 66vh (bottom/top) (default)
|
|
45
|
+
* - lg: 640px (side) / 80vh (bottom/top)
|
|
46
|
+
* - full: 100% ancho/alto
|
|
47
|
+
*/
|
|
48
|
+
size: PdmDrawerSize;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Use position="bottom" instead
|
|
51
|
+
*/
|
|
6
52
|
variant: PdmDrawerVariant;
|
|
7
53
|
className: string;
|
|
8
54
|
title: string;
|
|
9
55
|
description: string;
|
|
56
|
+
/**
|
|
57
|
+
* Mostrar handle visual (línea para arrastrar)
|
|
58
|
+
* Solo tiene sentido en position="bottom"
|
|
59
|
+
*/
|
|
60
|
+
showHandle: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Mostrar botón de cerrar
|
|
63
|
+
*/
|
|
64
|
+
showCloseButton: boolean;
|
|
65
|
+
closeOnEsc: boolean;
|
|
66
|
+
closeOnBackdropClick: boolean;
|
|
67
|
+
openChange: EventEmitter<boolean>;
|
|
10
68
|
value: number | string;
|
|
11
69
|
unit: string;
|
|
12
70
|
decrementLabel: string;
|
|
@@ -20,13 +78,19 @@ export declare class PdmDrawerComponent {
|
|
|
20
78
|
usernameLabel: string;
|
|
21
79
|
usernameValue: string;
|
|
22
80
|
responsivePrimaryLabel: string;
|
|
23
|
-
|
|
81
|
+
bars: number[];
|
|
24
82
|
primaryAction: EventEmitter<void>;
|
|
25
83
|
secondaryAction: EventEmitter<void>;
|
|
26
|
-
|
|
84
|
+
onEsc(): void;
|
|
85
|
+
onBackdropClick(): void;
|
|
27
86
|
close(): void;
|
|
28
87
|
onPrimaryAction(): void;
|
|
29
88
|
onSecondaryAction(): void;
|
|
89
|
+
get containerClassName(): string;
|
|
90
|
+
get panelClassName(): string;
|
|
91
|
+
private getPositionClasses;
|
|
92
|
+
private getSizeClasses;
|
|
93
|
+
get showLegacyContent(): boolean;
|
|
30
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDrawerComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDrawerComponent, "pdm-drawer", never, { "open": "open"; "variant": "variant"; "className": "className"; "title": "title"; "description": "description"; "value": "value"; "unit": "unit"; "decrementLabel": "decrementLabel"; "incrementLabel": "incrementLabel"; "primaryLabel": "primaryLabel"; "secondaryLabel": "secondaryLabel"; "profileTitle": "profileTitle"; "profileDescription": "profileDescription"; "nameLabel": "nameLabel"; "nameValue": "nameValue"; "usernameLabel": "usernameLabel"; "usernameValue": "usernameValue"; "responsivePrimaryLabel": "responsivePrimaryLabel"; "bars": "bars"; }, { "openChange": "openChange"; "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; }, never,
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDrawerComponent, "pdm-drawer", never, { "open": "open"; "position": "position"; "size": "size"; "variant": "variant"; "className": "className"; "title": "title"; "description": "description"; "showHandle": "showHandle"; "showCloseButton": "showCloseButton"; "closeOnEsc": "closeOnEsc"; "closeOnBackdropClick": "closeOnBackdropClick"; "value": "value"; "unit": "unit"; "decrementLabel": "decrementLabel"; "incrementLabel": "incrementLabel"; "primaryLabel": "primaryLabel"; "secondaryLabel": "secondaryLabel"; "profileTitle": "profileTitle"; "profileDescription": "profileDescription"; "nameLabel": "nameLabel"; "nameValue": "nameValue"; "usernameLabel": "usernameLabel"; "usernameValue": "usernameValue"; "responsivePrimaryLabel": "responsivePrimaryLabel"; "bars": "bars"; }, { "openChange": "openChange"; "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; }, never, ["*"], false>;
|
|
32
96
|
}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { PdmMenuItem } from '../dropdown-menu/dropdown-menu.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface PdmMenubarItem {
|
|
5
5
|
label: string;
|
|
6
6
|
items: PdmMenuItem[];
|
|
7
7
|
}
|
|
8
|
-
export declare class PdmMenubarComponent {
|
|
8
|
+
export declare class PdmMenubarComponent implements OnInit, OnDestroy {
|
|
9
|
+
private readonly elementRef;
|
|
10
|
+
private readonly cdr;
|
|
9
11
|
menus: PdmMenubarItem[];
|
|
10
12
|
className: string;
|
|
11
13
|
itemSelect: EventEmitter<string>;
|
|
12
14
|
openIndex: number;
|
|
15
|
+
private boundPointerDown;
|
|
16
|
+
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
onEsc(): void;
|
|
13
20
|
toggle(index: number): void;
|
|
14
21
|
select(value: string): void;
|
|
15
22
|
selectItem(item: PdmMenuItem): void;
|
|
23
|
+
private onDocumentPointerDown;
|
|
16
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmMenubarComponent, never>;
|
|
17
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<PdmMenubarComponent, "pdm-menubar", never, { "menus": "menus"; "className": "className"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
|
|
18
26
|
}
|
|
@@ -4,9 +4,30 @@ export interface PdmNavigationItem {
|
|
|
4
4
|
href?: string;
|
|
5
5
|
active?: boolean;
|
|
6
6
|
}
|
|
7
|
+
export declare type PdmNavigationMobileMode = 'scroll' | 'compact';
|
|
8
|
+
/**
|
|
9
|
+
* Navigation Menu component - Navegación horizontal responsive
|
|
10
|
+
*
|
|
11
|
+
* MEJORAS en v0.2.0:
|
|
12
|
+
* - Modo scroll: overflow-x-auto con scroll indicators en mobile
|
|
13
|
+
* - Modo compact: items abreviados en mobile, completos en desktop
|
|
14
|
+
* - Scroll smooth automático al item activo
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <!-- Scroll horizontal (default) -->
|
|
18
|
+
* <pdm-navigation-menu [items]="navItems"></pdm-navigation-menu>
|
|
19
|
+
*
|
|
20
|
+
* <!-- Compact mode -->
|
|
21
|
+
* <pdm-navigation-menu [items]="navItems" mobileMode="compact"></pdm-navigation-menu>
|
|
22
|
+
*/
|
|
7
23
|
export declare class PdmNavigationMenuComponent {
|
|
8
24
|
items: PdmNavigationItem[];
|
|
9
25
|
className: string;
|
|
26
|
+
/**
|
|
27
|
+
* Mobile behavior: 'scroll' (horizontal scroll) o 'compact' (items reducidos)
|
|
28
|
+
* @default 'scroll'
|
|
29
|
+
*/
|
|
30
|
+
mobileMode: PdmNavigationMobileMode;
|
|
10
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmNavigationMenuComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmNavigationMenuComponent, "pdm-navigation-menu", never, { "items": "items"; "className": "className"; }, {}, never, never, false>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmNavigationMenuComponent, "pdm-navigation-menu", never, { "items": "items"; "className": "className"; "mobileMode": "mobileMode"; }, {}, never, never, false>;
|
|
12
33
|
}
|