@alaarab/ogrid-angular-material 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 +5 -34
- package/dist/esm/column-header-filter/column-header-filter.component.js +67 -213
- package/dist/esm/column-header-menu/column-header-menu.component.js +91 -58
- package/dist/esm/datagrid-table/datagrid-table.component.js +74 -30
- package/dist/esm/datagrid-table/inline-cell-editor.component.js +48 -20
- 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 +25 -17
- package/dist/esm/pagination-controls/pagination-controls.component.js +14 -31
- package/dist/types/column-chooser/column-chooser.component.d.ts +2 -20
- package/dist/types/column-header-filter/column-header-filter.component.d.ts +6 -68
- package/dist/types/column-header-menu/column-header-menu.component.d.ts +13 -13
- package/dist/types/datagrid-table/datagrid-table.component.d.ts +16 -3
- package/dist/types/datagrid-table/inline-cell-editor.component.d.ts +13 -10
- 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 +7 -4
- package/dist/types/pagination-controls/pagination-controls.component.d.ts +2 -10
- package/package.json +2 -2
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface IColumnChooserProps {
|
|
3
|
-
columns: IColumnDefinition[];
|
|
4
|
-
visibleColumns: Set<string>;
|
|
5
|
-
onVisibilityChange: (columnKey: string, visible: boolean) => void;
|
|
6
|
-
}
|
|
1
|
+
import { BaseColumnChooserComponent } from '@alaarab/ogrid-angular';
|
|
7
2
|
/**
|
|
8
3
|
* Column visibility chooser dropdown using Angular Material styling.
|
|
9
4
|
* Standalone component with inline template.
|
|
10
5
|
*/
|
|
11
|
-
export declare class ColumnChooserComponent {
|
|
12
|
-
readonly columns: import("@angular/core").InputSignal<IColumnDefinition[]>;
|
|
13
|
-
readonly visibleColumns: import("@angular/core").InputSignal<Set<string>>;
|
|
14
|
-
readonly visibilityChange: import("@angular/core").OutputEmitterRef<{
|
|
15
|
-
columnKey: string;
|
|
16
|
-
visible: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
-
readonly visibleCount: import("@angular/core").Signal<number>;
|
|
20
|
-
readonly totalCount: import("@angular/core").Signal<number>;
|
|
21
|
-
toggle(): void;
|
|
22
|
-
onCheckboxChange(columnKey: string, event: Event): void;
|
|
23
|
-
selectAll(): void;
|
|
24
|
-
clearAll(): void;
|
|
6
|
+
export declare class ColumnChooserComponent extends BaseColumnChooserComponent {
|
|
25
7
|
onDocumentClick(event: MouseEvent): void;
|
|
26
8
|
}
|
|
@@ -1,73 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
columnKey: string;
|
|
4
|
-
columnName: string;
|
|
5
|
-
filterType: ColumnFilterType;
|
|
6
|
-
isSorted?: boolean;
|
|
7
|
-
isSortedDescending?: boolean;
|
|
8
|
-
onSort?: () => void;
|
|
9
|
-
selectedValues?: string[];
|
|
10
|
-
onFilterChange?: (values: string[]) => void;
|
|
11
|
-
options?: string[];
|
|
12
|
-
isLoadingOptions?: boolean;
|
|
13
|
-
textValue?: string;
|
|
14
|
-
onTextChange?: (value: string) => void;
|
|
15
|
-
selectedUser?: UserLike;
|
|
16
|
-
onUserChange?: (user: UserLike | undefined) => void;
|
|
17
|
-
peopleSearch?: (query: string) => Promise<UserLike[]>;
|
|
18
|
-
dateValue?: IDateFilterValue;
|
|
19
|
-
onDateChange?: (value: IDateFilterValue | undefined) => void;
|
|
20
|
-
}
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { BaseColumnHeaderFilterComponent } from '@alaarab/ogrid-angular';
|
|
21
3
|
/**
|
|
22
4
|
* Column header filter component with sort + filter icon + popover.
|
|
23
5
|
* Standalone component with inline template.
|
|
24
6
|
*/
|
|
25
|
-
export declare class ColumnHeaderFilterComponent {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
readonly isSorted: import("@angular/core").InputSignal<boolean>;
|
|
30
|
-
readonly isSortedDescending: import("@angular/core").InputSignal<boolean>;
|
|
31
|
-
readonly onSort: import("@angular/core").InputSignal<(() => void) | undefined>;
|
|
32
|
-
readonly selectedValues: import("@angular/core").InputSignal<string[] | undefined>;
|
|
33
|
-
readonly onFilterChange: import("@angular/core").InputSignal<((values: string[]) => void) | undefined>;
|
|
34
|
-
readonly options: import("@angular/core").InputSignal<string[] | undefined>;
|
|
35
|
-
readonly isLoadingOptions: import("@angular/core").InputSignal<boolean>;
|
|
36
|
-
readonly textValue: import("@angular/core").InputSignal<string>;
|
|
37
|
-
readonly onTextChange: import("@angular/core").InputSignal<((value: string) => void) | undefined>;
|
|
38
|
-
readonly selectedUser: import("@angular/core").InputSignal<UserLike | undefined>;
|
|
39
|
-
readonly onUserChange: import("@angular/core").InputSignal<((user: UserLike | undefined) => void) | undefined>;
|
|
40
|
-
readonly peopleSearch: import("@angular/core").InputSignal<((query: string) => Promise<UserLike[]>) | undefined>;
|
|
41
|
-
readonly dateValue: import("@angular/core").InputSignal<IDateFilterValue | undefined>;
|
|
42
|
-
readonly onDateChange: import("@angular/core").InputSignal<((value: IDateFilterValue | undefined) => void) | undefined>;
|
|
43
|
-
private readonly headerEl;
|
|
44
|
-
readonly isFilterOpen: import("@angular/core").WritableSignal<boolean>;
|
|
45
|
-
readonly tempTextValue: import("@angular/core").WritableSignal<string>;
|
|
46
|
-
readonly searchText: import("@angular/core").WritableSignal<string>;
|
|
47
|
-
readonly tempSelected: import("@angular/core").WritableSignal<Set<string>>;
|
|
48
|
-
readonly peopleSearchText: import("@angular/core").WritableSignal<string>;
|
|
49
|
-
readonly peopleSuggestions: import("@angular/core").WritableSignal<UserLike[]>;
|
|
50
|
-
readonly isPeopleLoading: import("@angular/core").WritableSignal<boolean>;
|
|
51
|
-
readonly tempDateFrom: import("@angular/core").WritableSignal<string>;
|
|
52
|
-
readonly tempDateTo: import("@angular/core").WritableSignal<string>;
|
|
53
|
-
readonly popoverTop: import("@angular/core").WritableSignal<number>;
|
|
54
|
-
readonly popoverLeft: import("@angular/core").WritableSignal<number>;
|
|
55
|
-
private peopleDebounceTimer;
|
|
56
|
-
readonly hasActiveFilter: import("@angular/core").Signal<boolean>;
|
|
57
|
-
readonly filteredOptions: import("@angular/core").Signal<string[]>;
|
|
58
|
-
asInputValue(event: Event): string;
|
|
59
|
-
toggleFilter(event: MouseEvent): void;
|
|
60
|
-
onTextKeydown(event: KeyboardEvent): void;
|
|
61
|
-
handleTextApply(): void;
|
|
62
|
-
handleTextClear(): void;
|
|
63
|
-
handleCheckboxChange(option: string, event: Event): void;
|
|
64
|
-
handleSelectAllFiltered(): void;
|
|
65
|
-
handleClearSelection(): void;
|
|
66
|
-
handleApplyMultiSelect(): void;
|
|
67
|
-
onPeopleSearchInput(event: Event): void;
|
|
68
|
-
handleUserSelect(user: UserLike): void;
|
|
69
|
-
handleClearUser(): void;
|
|
70
|
-
handleDateApply(): void;
|
|
71
|
-
handleDateClear(): void;
|
|
72
|
-
onDocumentClick(event: MouseEvent): void;
|
|
7
|
+
export declare class ColumnHeaderFilterComponent extends BaseColumnHeaderFilterComponent {
|
|
8
|
+
private headerEl?;
|
|
9
|
+
protected getHeaderEl(): ElementRef<HTMLElement> | undefined;
|
|
10
|
+
onDocumentClickWrapper(event: MouseEvent): void;
|
|
73
11
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
2
|
+
import { type IColumnHeaderMenuItem, type ColumnHeaderMenuHandlers } from '@alaarab/ogrid-core';
|
|
2
3
|
/**
|
|
3
|
-
* Column header dropdown menu for pin/unpin actions.
|
|
4
|
+
* Column header dropdown menu for pin/unpin, sort, and autosize actions.
|
|
4
5
|
* Uses Angular Material MatMenu.
|
|
5
6
|
*/
|
|
6
7
|
export declare class ColumnHeaderMenuComponent {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
handleUnpin(): void;
|
|
8
|
+
columnId: string;
|
|
9
|
+
canPinLeft: boolean;
|
|
10
|
+
canPinRight: boolean;
|
|
11
|
+
canUnpin: boolean;
|
|
12
|
+
currentSort: 'asc' | 'desc' | null;
|
|
13
|
+
isSortable: boolean;
|
|
14
|
+
isResizable: boolean;
|
|
15
|
+
handlers: Partial<ColumnHeaderMenuHandlers>;
|
|
16
|
+
menuTrigger?: MatMenuTrigger;
|
|
17
|
+
readonly menuItems: import("@angular/core").Signal<IColumnHeaderMenuItem[]>;
|
|
18
|
+
handleMenuItemClick(itemId: string): void;
|
|
19
19
|
}
|
|
@@ -6,11 +6,24 @@ import type { IOGridDataGridProps } from '@alaarab/ogrid-angular';
|
|
|
6
6
|
* Standalone component — this is the workhorse of the grid.
|
|
7
7
|
*/
|
|
8
8
|
export declare class DataGridTableComponent<T> extends BaseDataGridTableComponent<T> {
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
private
|
|
9
|
+
private readonly propsSignal;
|
|
10
|
+
set propsInput(value: IOGridDataGridProps<T>);
|
|
11
|
+
private wrapperRef?;
|
|
12
|
+
private tableContainerRef?;
|
|
12
13
|
constructor();
|
|
13
14
|
protected getProps(): IOGridDataGridProps<T> | undefined;
|
|
14
15
|
protected getWrapperRef(): ElementRef<HTMLElement> | undefined;
|
|
15
16
|
protected getTableContainerRef(): ElementRef<HTMLElement> | undefined;
|
|
17
|
+
/** Build column header menu handlers for a given column */
|
|
18
|
+
protected getColumnMenuHandlers(columnId: string): {
|
|
19
|
+
onPinLeft: () => void;
|
|
20
|
+
onPinRight: () => void;
|
|
21
|
+
onUnpin: () => void;
|
|
22
|
+
onSortAsc: () => void;
|
|
23
|
+
onSortDesc: () => void;
|
|
24
|
+
onClearSort: () => void;
|
|
25
|
+
onAutosizeThis: () => void;
|
|
26
|
+
onAutosizeAll: () => void;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
};
|
|
16
29
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { ElementRef, AfterViewInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, ElementRef, AfterViewInit } 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
|
+
private _initialized;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnChanges(): void;
|
|
17
|
+
private syncFromInputs;
|
|
15
18
|
ngAfterViewInit(): void;
|
|
16
19
|
commitValue(value: unknown): void;
|
|
17
20
|
onTextKeyDown(e: KeyboardEvent): void;
|
|
@@ -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
|
@@ -2,9 +2,7 @@ export * from '@alaarab/ogrid-angular';
|
|
|
2
2
|
export { OGridComponent } from './ogrid/ogrid.component';
|
|
3
3
|
export { DataGridTableComponent } from './datagrid-table/datagrid-table.component';
|
|
4
4
|
export { ColumnHeaderFilterComponent } from './column-header-filter/column-header-filter.component';
|
|
5
|
-
export type { IColumnHeaderFilterProps } from './column-header-filter/column-header-filter.component';
|
|
6
5
|
export { ColumnChooserComponent } from './column-chooser/column-chooser.component';
|
|
7
|
-
export type { IColumnChooserProps } from './column-chooser/column-chooser.component';
|
|
8
6
|
export { PaginationControlsComponent } from './pagination-controls/pagination-controls.component';
|
|
9
7
|
export { ColumnHeaderMenuComponent } from './column-header-menu/column-header-menu.component';
|
|
10
8
|
export { InlineCellEditorComponent } from './datagrid-table/inline-cell-editor.component';
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { OGridService } from '@alaarab/ogrid-angular';
|
|
2
|
-
import type { IOGridProps
|
|
2
|
+
import type { IOGridProps } from '@alaarab/ogrid-angular';
|
|
3
3
|
/**
|
|
4
4
|
* Top-level OGrid component for Angular Material.
|
|
5
|
-
* Equivalent to the React MaterialDataTable/OGrid component.
|
|
6
5
|
* Standalone component — provides OGridService and renders OGridLayout with all sub-components.
|
|
6
|
+
*
|
|
7
|
+
* Uses @Input with signal setter for JIT compatibility (project builds with tsc, not ngc).
|
|
8
|
+
* The effect() reactively configures the service when the input signal changes.
|
|
7
9
|
*/
|
|
8
10
|
export declare class OGridComponent<T> {
|
|
9
|
-
readonly
|
|
11
|
+
private readonly propsSignal;
|
|
10
12
|
readonly ogridService: OGridService<T>;
|
|
11
|
-
|
|
13
|
+
set props(value: IOGridProps<T>);
|
|
12
14
|
constructor();
|
|
15
|
+
get showToolbar(): boolean;
|
|
13
16
|
onPageSizeChange(size: number): void;
|
|
14
17
|
}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
+
import { BasePaginationControlsComponent } from '@alaarab/ogrid-angular';
|
|
1
2
|
/**
|
|
2
3
|
* Pagination controls component using Angular Material styling.
|
|
3
4
|
* Standalone component with inline template — no Angular Material dependency for pagination.
|
|
4
5
|
*/
|
|
5
|
-
export declare class PaginationControlsComponent {
|
|
6
|
-
readonly currentPage: import("@angular/core").InputSignal<number>;
|
|
7
|
-
readonly pageSize: import("@angular/core").InputSignal<number>;
|
|
8
|
-
readonly totalCount: import("@angular/core").InputSignal<number>;
|
|
9
|
-
readonly pageSizeOptions: import("@angular/core").InputSignal<number[] | undefined>;
|
|
10
|
-
readonly entityLabelPlural: import("@angular/core").InputSignal<string>;
|
|
11
|
-
readonly pageChange: import("@angular/core").OutputEmitterRef<number>;
|
|
12
|
-
readonly pageSizeChange: import("@angular/core").OutputEmitterRef<number>;
|
|
13
|
-
readonly vm: import("@angular/core").Signal<import("@alaarab/ogrid-core").PaginationViewModel | null>;
|
|
14
|
-
onPageSizeSelect(event: Event): void;
|
|
6
|
+
export declare class PaginationControlsComponent extends BasePaginationControlsComponent {
|
|
15
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-angular-material",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "OGrid Angular Material – MatTable-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/cdk": "^21.0.0",
|