@alaarab/ogrid-angular-primeng 2.0.8 → 2.0.11
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/dist/esm/column-chooser/column-chooser.component.js +8 -28
- package/dist/esm/column-header-filter/column-header-filter.component.js +44 -162
- package/dist/esm/column-header-menu/column-header-menu.component.js +77 -44
- package/dist/esm/datagrid-table/datagrid-table.component.js +286 -115
- package/dist/esm/datagrid-table/inline-cell-editor.component.js +32 -14
- package/dist/esm/datagrid-table/popover-cell-editor.component.js +38 -18
- package/dist/esm/index.js +2 -0
- package/dist/esm/ogrid/ogrid.component.js +22 -10
- package/dist/esm/pagination-controls/pagination-controls.component.js +13 -27
- package/dist/types/column-chooser/column-chooser.component.d.ts +3 -19
- package/dist/types/column-header-filter/column-header-filter.component.d.ts +5 -62
- package/dist/types/column-header-menu/column-header-menu.component.d.ts +11 -12
- package/dist/types/datagrid-table/datagrid-table.component.d.ts +64 -50
- package/dist/types/datagrid-table/inline-cell-editor.component.d.ts +9 -9
- package/dist/types/datagrid-table/popover-cell-editor.component.d.ts +9 -9
- package/dist/types/index.d.ts +0 -2
- package/dist/types/ogrid/ogrid.component.d.ts +6 -5
- package/dist/types/pagination-controls/pagination-controls.component.d.ts +2 -11
- package/package.json +2 -2
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { BaseDataGridTableComponent } from '@alaarab/ogrid-angular';
|
|
3
3
|
import type { IOGridDataGridProps, IColumnDef, IColumnGroupDef, RowId } from '@alaarab/ogrid-angular';
|
|
4
|
-
export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTableComponent<T> {
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTableComponent<T> implements OnChanges {
|
|
5
|
+
private wrapperRef?;
|
|
6
|
+
private tableContainerRefEl?;
|
|
7
|
+
itemsInput: T[];
|
|
8
|
+
columns: (IColumnDef<T> | IColumnGroupDef<T>)[];
|
|
9
|
+
getRowIdInput: (item: T) => RowId;
|
|
10
|
+
sortBy: string | undefined;
|
|
11
|
+
sortDirection: 'asc' | 'desc';
|
|
12
|
+
onColumnSort: (columnKey: string) => void;
|
|
13
|
+
visibleColumns: Set<string>;
|
|
14
|
+
columnOrder: string[] | undefined;
|
|
15
|
+
onColumnOrderChange: ((order: string[]) => void) | undefined;
|
|
16
|
+
onColumnResized: ((columnId: string, width: number) => void) | undefined;
|
|
17
|
+
onColumnPinned: ((columnId: string, pinned: 'left' | 'right' | null) => void) | undefined;
|
|
18
|
+
pinnedColumnsInput: Record<string, 'left' | 'right'> | undefined;
|
|
19
|
+
initialColumnWidths: Record<string, number> | undefined;
|
|
20
|
+
freezeRowsInput: number | undefined;
|
|
21
|
+
freezeColsInput: number | undefined;
|
|
22
|
+
layoutMode: 'content' | 'fill';
|
|
23
|
+
suppressHorizontalScroll: boolean | undefined;
|
|
24
|
+
isLoadingInput: boolean;
|
|
25
|
+
loadingMessageInput: string;
|
|
26
|
+
editable: boolean | undefined;
|
|
27
|
+
cellSelection: boolean | undefined;
|
|
28
|
+
onCellValueChanged: ((event: {
|
|
29
29
|
item: T;
|
|
30
30
|
columnId: string;
|
|
31
31
|
oldValue: unknown;
|
|
32
32
|
newValue: unknown;
|
|
33
33
|
rowIndex: number;
|
|
34
|
-
}) => void) | undefined
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
}) => void) | undefined;
|
|
35
|
+
onUndoInput: (() => void) | undefined;
|
|
36
|
+
onRedoInput: (() => void) | undefined;
|
|
37
|
+
canUndoInput: boolean | undefined;
|
|
38
|
+
canRedoInput: boolean | undefined;
|
|
39
|
+
rowSelectionMode: 'none' | 'single' | 'multiple';
|
|
40
|
+
selectedRows: Set<RowId> | undefined;
|
|
41
|
+
onSelectionChange: ((event: {
|
|
42
42
|
selectedRowIds: RowId[];
|
|
43
43
|
selectedItems: T[];
|
|
44
|
-
}) => void) | undefined
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
}) => void) | undefined;
|
|
45
|
+
statusBar: unknown;
|
|
46
|
+
filters: Record<string, unknown>;
|
|
47
|
+
onFilterChange: (key: string, value: unknown) => void;
|
|
48
|
+
filterOptions: Record<string, string[]>;
|
|
49
|
+
loadingFilterOptions: Record<string, boolean>;
|
|
50
|
+
peopleSearch: ((query: string) => Promise<unknown[]>) | undefined;
|
|
51
|
+
getUserByEmail: ((email: string) => Promise<unknown>) | undefined;
|
|
52
|
+
emptyStateInput: {
|
|
53
53
|
onClearAll: () => void;
|
|
54
54
|
hasActiveFilters: boolean;
|
|
55
55
|
message?: string;
|
|
56
56
|
render?: unknown;
|
|
57
|
-
} | undefined
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
} | undefined;
|
|
58
|
+
onCellError: ((error: Error) => void) | undefined;
|
|
59
|
+
ariaLabelInput: string | undefined;
|
|
60
|
+
ariaLabelledByInput: string | undefined;
|
|
61
|
+
showRowNumbers: boolean;
|
|
62
|
+
currentPageInput: number;
|
|
63
|
+
pageSizeInput: number;
|
|
64
64
|
readonly defaultMinWidth = 80;
|
|
65
65
|
readonly statusBarClasses: {
|
|
66
66
|
statusBar: string;
|
|
@@ -69,10 +69,13 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
|
|
|
69
69
|
statusBarValue: string;
|
|
70
70
|
};
|
|
71
71
|
private readonly primengColumnSizingOverrides;
|
|
72
|
+
private readonly propsSignal;
|
|
72
73
|
private resizeStartX;
|
|
73
74
|
private resizeColumnId;
|
|
74
75
|
private resizeStartWidth;
|
|
76
|
+
readonly cancelEditHandler: () => void;
|
|
75
77
|
constructor();
|
|
78
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
76
79
|
protected getProps(): IOGridDataGridProps<T> | undefined;
|
|
77
80
|
protected getWrapperRef(): ElementRef<HTMLElement> | undefined;
|
|
78
81
|
protected getTableContainerRef(): ElementRef<HTMLElement> | undefined;
|
|
@@ -98,6 +101,17 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
|
|
|
98
101
|
onCellEditorCommit(item: T, col: IColumnDef<T>, rowIndex: number, colIdx: number, newValue: unknown): void;
|
|
99
102
|
onSelectAllChangePrimeng(checked: boolean): void;
|
|
100
103
|
onRowClickPrimeng(e: MouseEvent, item: T): void;
|
|
104
|
+
getColumnHeaderMenuHandlers(columnId: string): {
|
|
105
|
+
onPinLeft: () => void;
|
|
106
|
+
onPinRight: () => void;
|
|
107
|
+
onUnpin: () => void;
|
|
108
|
+
onSortAsc: () => void;
|
|
109
|
+
onSortDesc: () => void;
|
|
110
|
+
onClearSort: () => void;
|
|
111
|
+
onAutosizeThis: () => void;
|
|
112
|
+
onAutosizeAll: () => void;
|
|
113
|
+
onClose: () => void;
|
|
114
|
+
};
|
|
101
115
|
onRowCheckboxChangePrimeng(item: T, checked: boolean, rowIndex: number, _e: Event): void;
|
|
102
116
|
onResizeStartPrimeng(e: MouseEvent, col: IColumnDef<T>): void;
|
|
103
117
|
private buildProps;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ElementRef, AfterViewInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import type { IColumnDef } from '@alaarab/ogrid-angular';
|
|
3
3
|
export declare class InlineCellEditorComponent<T = unknown> implements AfterViewInit {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
value: unknown;
|
|
5
|
+
item: T;
|
|
6
|
+
column: IColumnDef<T>;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
editorType: 'text' | 'select' | 'checkbox' | 'date' | 'richSelect';
|
|
9
|
+
commit: EventEmitter<unknown>;
|
|
10
|
+
cancel: EventEmitter<void>;
|
|
11
|
+
inputEl?: ElementRef<HTMLInputElement | HTMLSelectElement>;
|
|
12
12
|
readonly localValue: import("@angular/core").WritableSignal<unknown>;
|
|
13
13
|
readonly selectOptions: import("@angular/core").WritableSignal<unknown[]>;
|
|
14
14
|
constructor();
|
|
@@ -4,15 +4,15 @@ import type { IColumnDef, ICellEditorProps } from '@alaarab/ogrid-core';
|
|
|
4
4
|
* Renders custom popover editor when anchor element is set.
|
|
5
5
|
*/
|
|
6
6
|
export declare class PopoverCellEditorComponent<T> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
private
|
|
7
|
+
item: T;
|
|
8
|
+
column: IColumnDef<T>;
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
globalColIndex: number;
|
|
11
|
+
displayValue: unknown;
|
|
12
|
+
editorProps: ICellEditorProps<T>;
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
private anchorRef?;
|
|
15
|
+
private editorContainerRef?;
|
|
16
16
|
private readonly injector;
|
|
17
17
|
private readonly envInjector;
|
|
18
18
|
protected readonly showEditor: import("@angular/core").WritableSignal<boolean>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ export { DataGridTableComponent } from './datagrid-table/datagrid-table.componen
|
|
|
4
4
|
export { InlineCellEditorComponent } from './datagrid-table/inline-cell-editor.component';
|
|
5
5
|
export { PopoverCellEditorComponent } from './datagrid-table/popover-cell-editor.component';
|
|
6
6
|
export { ColumnHeaderFilterComponent } from './column-header-filter/column-header-filter.component';
|
|
7
|
-
export type { IColumnHeaderFilterProps } from './column-header-filter/column-header-filter.component';
|
|
8
7
|
export { ColumnChooserComponent } from './column-chooser/column-chooser.component';
|
|
9
|
-
export type { IColumnChooserProps } from './column-chooser/column-chooser.component';
|
|
10
8
|
export { PaginationControlsComponent } from './pagination-controls/pagination-controls.component';
|
|
11
9
|
export { ColumnHeaderMenuComponent } from './column-header-menu/column-header-menu.component';
|
|
@@ -2,7 +2,8 @@ import { OGridService } from '@alaarab/ogrid-angular';
|
|
|
2
2
|
import type { IOGridProps, RowId } from '@alaarab/ogrid-angular';
|
|
3
3
|
export declare class OGridComponent<T = unknown> {
|
|
4
4
|
readonly service: OGridService<T>;
|
|
5
|
-
readonly
|
|
5
|
+
private readonly propsSignal;
|
|
6
|
+
set props(value: IOGridProps<T>);
|
|
6
7
|
readonly onColumnSortFn: (columnKey: string) => void;
|
|
7
8
|
readonly onColumnResizedFn: (columnId: string, width: number) => void;
|
|
8
9
|
readonly onColumnPinnedFn: (columnId: string, pinned: "left" | "right" | null) => void;
|
|
@@ -11,13 +12,13 @@ export declare class OGridComponent<T = unknown> {
|
|
|
11
12
|
selectedItems: T[];
|
|
12
13
|
}) => void;
|
|
13
14
|
readonly onFilterChangeFn: (key: string, value: unknown) => void;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
constructor();
|
|
16
|
+
get showToolbar(): boolean;
|
|
17
|
+
get emptyStateObj(): {
|
|
16
18
|
hasActiveFilters: boolean;
|
|
17
19
|
onClearAll: () => void;
|
|
18
20
|
message: string | undefined;
|
|
19
21
|
render: unknown;
|
|
20
|
-
}
|
|
21
|
-
constructor();
|
|
22
|
+
};
|
|
22
23
|
onPageSizeChange(size: number): void;
|
|
23
24
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly pageSize: import("@angular/core").InputSignal<number>;
|
|
4
|
-
readonly totalCount: import("@angular/core").InputSignal<number>;
|
|
5
|
-
readonly pageSizeOptions: import("@angular/core").InputSignal<number[] | undefined>;
|
|
6
|
-
readonly entityLabelPlural: import("@angular/core").InputSignal<string>;
|
|
7
|
-
readonly pageChange: import("@angular/core").OutputEmitterRef<number>;
|
|
8
|
-
readonly pageSizeChange: import("@angular/core").OutputEmitterRef<number>;
|
|
9
|
-
protected readonly labelPlural: import("@angular/core").Signal<string>;
|
|
10
|
-
protected readonly vm: import("@angular/core").Signal<import("@alaarab/ogrid-core").PaginationViewModel | null>;
|
|
11
|
-
onPageSizeChange(value: string): void;
|
|
1
|
+
import { BasePaginationControlsComponent } from '@alaarab/ogrid-angular';
|
|
2
|
+
export declare class PaginationControlsComponent extends BasePaginationControlsComponent {
|
|
12
3
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-angular-primeng",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "OGrid PrimeNG – PrimeNG Table-based data grid with sorting, filtering, pagination, column chooser, and CSV export.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@alaarab/ogrid-angular": "2.0.
|
|
38
|
+
"@alaarab/ogrid-angular": "2.0.11"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@angular/core": "^21.0.0",
|