@alaarab/ogrid-angular-primeng 2.5.9 → 2.6.1

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.
@@ -0,0 +1,178 @@
1
+ import { Component, inject, ChangeDetectionStrategy, Input, signal, effect, computed } from '@angular/core';
2
+ import { OGridService, OGridLayoutComponent, } from '@alaarab/ogrid-angular';
3
+ import { DataGridTableComponent } from '../datagrid-table/datagrid-table.component';
4
+ import { ColumnChooserComponent } from '../column-chooser/column-chooser.component';
5
+ import { PaginationControlsComponent } from '../pagination-controls/pagination-controls.component';
6
+ import * as i0 from "@angular/core";
7
+ const _c0 = [[["", "toolbar", ""]]];
8
+ const _c1 = ["[toolbar]"];
9
+ function OGridComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
10
+ const _r1 = i0.ɵɵgetCurrentView();
11
+ i0.ɵɵelementStart(0, "ogrid-primeng-column-chooser", 6);
12
+ i0.ɵɵlistener("visibilityChange", function OGridComponent_Conditional_3_Template_ogrid_primeng_column_chooser_visibilityChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.service.handleVisibilityChange($event.columnKey, $event.visible)); });
13
+ i0.ɵɵelementEnd();
14
+ } if (rf & 2) {
15
+ const ctx_r1 = i0.ɵɵnextContext();
16
+ i0.ɵɵproperty("columns", ctx_r1.service.columnChooser().columns)("visibleColumns", ctx_r1.service.columnChooser().visibleColumns);
17
+ } }
18
+ export class OGridComponent {
19
+ set props(value) {
20
+ this.propsSignal.set(value);
21
+ }
22
+ constructor() {
23
+ this.service = inject(OGridService);
24
+ this.propsSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "propsSignal" }] : []));
25
+ // Stable callback references (avoid re-creating every template eval)
26
+ this.onColumnSortFn = (columnKey, direction) => this.service.handleSort(columnKey, direction);
27
+ this.onColumnResizedFn = (columnId, width) => this.service.handleColumnResized(columnId, width);
28
+ this.onColumnPinnedFn = (columnId, pinned) => this.service.handleColumnPinned(columnId, pinned);
29
+ this.onSelectionChangeFn = (event) => this.service.handleSelectionChange(event);
30
+ this.onFilterChangeFn = (key, value) => this.service.handleFilterChange(key, value);
31
+ this.clearAllFiltersFn = () => this.service.setFilters({});
32
+ this.emptyStateComputed = computed(() => ({
33
+ hasActiveFilters: this.service.hasActiveFilters(),
34
+ onClearAll: this.clearAllFiltersFn,
35
+ message: this.service.emptyState()?.message,
36
+ render: this.service.emptyState()?.render,
37
+ }), ...(ngDevMode ? [{ debugName: "emptyStateComputed" }] : []));
38
+ effect(() => {
39
+ const p = this.propsSignal();
40
+ if (p)
41
+ this.service.configure(p);
42
+ });
43
+ }
44
+ get showToolbar() {
45
+ return this.service.columnChooserPlacement() === 'toolbar' || this.service.toolbar() != null || this.service.fullScreen();
46
+ }
47
+ get emptyStateObj() {
48
+ return this.emptyStateComputed();
49
+ }
50
+ onPageSizeChange(size) {
51
+ this.service.setPageSize(size);
52
+ }
53
+ static { this.ɵfac = function OGridComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OGridComponent)(); }; }
54
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OGridComponent, selectors: [["ogrid-primeng"]], inputs: { props: "props" }, features: [i0.ɵɵProvidersFeature([OGridService])], ngContentSelectors: _c1, decls: 7, vars: 60, consts: [[3, "className", "hasToolbar", "hasToolbarBelow", "hasPagination", "sideBar", "fullScreen", "showNameBox", "activeCellRef", "formulaBar", "sheetDefs", "activeSheet", "onSheetChange", "onSheetAdd"], ["toolbarEnd", ""], [3, "columns", "visibleColumns"], [3, "items", "columns", "getRowId", "sortBy", "sortDirection", "onColumnSort", "visibleColumns", "columnOrder", "onColumnOrderChange", "onColumnResized", "onColumnPinned", "editable", "cellSelection", "onCellValueChanged", "onUndo", "onRedo", "canUndo", "canRedo", "rowSelection", "selectedRows", "onSelectionChange", "statusBar", "isLoading", "filters", "onFilterChange", "filterOptions", "loadingFilterOptions", "peopleSearch", "getUserByEmail", "layoutMode", "suppressHorizontalScroll", "stickyHeaderInput", "columnReorder", "aria-label", "aria-labelledby", "emptyState", "showRowNumbers", "showColumnLetters", "showNameBox", "onActiveCellChange", "formulaReferences"], ["pagination", ""], [3, "pageChange", "pageSizeChange", "currentPage", "pageSize", "totalCount", "pageSizeOptions", "entityLabelPlural"], [3, "visibilityChange", "columns", "visibleColumns"]], template: function OGridComponent_Template(rf, ctx) { if (rf & 1) {
55
+ i0.ɵɵprojectionDef(_c0);
56
+ i0.ɵɵelementStart(0, "ogrid-layout", 0);
57
+ i0.ɵɵprojection(1, 0, ["toolbar", ""]);
58
+ i0.ɵɵelementStart(2, "div", 1);
59
+ i0.ɵɵconditionalCreate(3, OGridComponent_Conditional_3_Template, 1, 2, "ogrid-primeng-column-chooser", 2);
60
+ i0.ɵɵelementEnd();
61
+ i0.ɵɵelement(4, "ogrid-primeng-datagrid-table", 3);
62
+ i0.ɵɵelementStart(5, "div", 4)(6, "ogrid-primeng-pagination-controls", 5);
63
+ i0.ɵɵlistener("pageChange", function OGridComponent_Template_ogrid_primeng_pagination_controls_pageChange_6_listener($event) { return ctx.service.setPage($event); })("pageSizeChange", function OGridComponent_Template_ogrid_primeng_pagination_controls_pageSizeChange_6_listener($event) { return ctx.onPageSizeChange($event); });
64
+ i0.ɵɵelementEnd()()();
65
+ } if (rf & 2) {
66
+ let tmp_41_0;
67
+ let tmp_42_0;
68
+ i0.ɵɵproperty("className", ctx.service.className())("hasToolbar", ctx.showToolbar)("hasToolbarBelow", false)("hasPagination", true)("sideBar", ctx.service.sideBarProps())("fullScreen", ctx.service.fullScreen())("showNameBox", !!(ctx.service.cellReferences() && !ctx.service.formulasEnabled()))("activeCellRef", ctx.service.activeCellRef())("formulaBar", ctx.service.formulasEnabled() ? ctx.service.formulaBarState() : null)("sheetDefs", ctx.service.sheetDefs())("activeSheet", ctx.service.activeSheet())("onSheetChange", ctx.service.onSheetChange())("onSheetAdd", ctx.service.onSheetAdd());
69
+ i0.ɵɵadvance(3);
70
+ i0.ɵɵconditional(ctx.service.columnChooserPlacement() === "toolbar" ? 3 : -1);
71
+ i0.ɵɵadvance();
72
+ i0.ɵɵproperty("items", ctx.service.displayItems())("columns", ctx.service.columnsProp())("getRowId", ctx.service.getRowId())("sortBy", ctx.service.sort().field)("sortDirection", ctx.service.sort().direction)("onColumnSort", ctx.onColumnSortFn)("visibleColumns", ctx.service.visibleColumns())("columnOrder", ctx.service.columnOrder())("onColumnOrderChange", ctx.service.onColumnOrderChange())("onColumnResized", ctx.onColumnResizedFn)("onColumnPinned", ctx.onColumnPinnedFn)("editable", ctx.service.editable())("cellSelection", ctx.service.cellSelection())("onCellValueChanged", ctx.service.onCellValueChanged())("onUndo", ctx.service.onUndo())("onRedo", ctx.service.onRedo())("canUndo", ctx.service.canUndo())("canRedo", ctx.service.canRedo())("rowSelection", ctx.service.rowSelection())("selectedRows", ctx.service.effectiveSelectedRows())("onSelectionChange", ctx.onSelectionChangeFn)("statusBar", ctx.service.statusBarConfig())("isLoading", ctx.service.isLoadingResolved())("filters", ctx.service.filters())("onFilterChange", ctx.onFilterChangeFn)("filterOptions", ctx.service.clientFilterOptions())("loadingFilterOptions", ctx.service.loadingFilterOptions())("peopleSearch", (tmp_41_0 = ctx.service.dataSource()) == null ? null : tmp_41_0.searchPeople == null ? null : tmp_41_0.searchPeople.bind(ctx.service.dataSource()))("getUserByEmail", (tmp_42_0 = ctx.service.dataSource()) == null ? null : tmp_42_0.getUserByEmail == null ? null : tmp_42_0.getUserByEmail.bind(ctx.service.dataSource()))("layoutMode", ctx.service.layoutMode())("suppressHorizontalScroll", ctx.service.suppressHorizontalScroll())("stickyHeaderInput", ctx.service.stickyHeader())("columnReorder", ctx.service.columnReorder());
73
+ i0.ɵɵariaProperty("aria-label", ctx.service.ariaLabel())("aria-labelledby", ctx.service.ariaLabelledBy());
74
+ i0.ɵɵproperty("emptyState", ctx.emptyStateObj)("showRowNumbers", ctx.service.dataGridProps().showRowNumbers ?? false)("showColumnLetters", ctx.service.dataGridProps().showColumnLetters ?? false)("showNameBox", ctx.service.dataGridProps().showNameBox ?? false)("onActiveCellChange", ctx.service.dataGridProps().onActiveCellChange)("formulaReferences", ctx.service.dataGridProps().formulaReferences);
75
+ i0.ɵɵadvance(2);
76
+ i0.ɵɵproperty("currentPage", ctx.service.pagination().page)("pageSize", ctx.service.pagination().pageSize)("totalCount", ctx.service.pagination().displayTotalCount)("pageSizeOptions", ctx.service.pageSizeOptions())("entityLabelPlural", ctx.service.entityLabelPlural());
77
+ } }, dependencies: [OGridLayoutComponent,
78
+ DataGridTableComponent,
79
+ ColumnChooserComponent,
80
+ PaginationControlsComponent], styles: ["[_nghost-%COMP%] { display: block; height: 100%; }"], changeDetection: 0 }); }
81
+ }
82
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OGridComponent, [{
83
+ type: Component,
84
+ args: [{ selector: 'ogrid-primeng', standalone: true, imports: [
85
+ OGridLayoutComponent,
86
+ DataGridTableComponent,
87
+ ColumnChooserComponent,
88
+ PaginationControlsComponent,
89
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [OGridService], template: `
90
+ <ogrid-layout
91
+ [className]="service.className()"
92
+ [hasToolbar]="showToolbar"
93
+ [hasToolbarBelow]="false"
94
+ [hasPagination]="true"
95
+ [sideBar]="service.sideBarProps()"
96
+ [fullScreen]="service.fullScreen()"
97
+ [showNameBox]="!!(service.cellReferences() && !service.formulasEnabled())"
98
+ [activeCellRef]="service.activeCellRef()"
99
+ [formulaBar]="service.formulasEnabled() ? service.formulaBarState() : null"
100
+ [sheetDefs]="service.sheetDefs()"
101
+ [activeSheet]="service.activeSheet()"
102
+ [onSheetChange]="service.onSheetChange()"
103
+ [onSheetAdd]="service.onSheetAdd()"
104
+ >
105
+ <ng-content select="[toolbar]" toolbar></ng-content>
106
+
107
+ <div toolbarEnd>
108
+ @if (service.columnChooserPlacement() === 'toolbar') {
109
+ <ogrid-primeng-column-chooser
110
+ [columns]="service.columnChooser().columns"
111
+ [visibleColumns]="service.columnChooser().visibleColumns"
112
+ (visibilityChange)="service.handleVisibilityChange($event.columnKey, $event.visible)"
113
+ ></ogrid-primeng-column-chooser>
114
+ }
115
+ </div>
116
+
117
+ <ogrid-primeng-datagrid-table
118
+ [items]="service.displayItems()"
119
+ [columns]="service.columnsProp()"
120
+ [getRowId]="service.getRowId()"
121
+ [sortBy]="service.sort().field"
122
+ [sortDirection]="service.sort().direction"
123
+ [onColumnSort]="onColumnSortFn"
124
+ [visibleColumns]="service.visibleColumns()"
125
+ [columnOrder]="service.columnOrder()"
126
+ [onColumnOrderChange]="service.onColumnOrderChange()"
127
+ [onColumnResized]="onColumnResizedFn"
128
+ [onColumnPinned]="onColumnPinnedFn"
129
+ [editable]="service.editable()"
130
+ [cellSelection]="service.cellSelection()"
131
+ [onCellValueChanged]="service.onCellValueChanged()"
132
+ [onUndo]="service.onUndo()"
133
+ [onRedo]="service.onRedo()"
134
+ [canUndo]="service.canUndo()"
135
+ [canRedo]="service.canRedo()"
136
+ [rowSelection]="service.rowSelection()"
137
+ [selectedRows]="service.effectiveSelectedRows()"
138
+ [onSelectionChange]="onSelectionChangeFn"
139
+ [statusBar]="service.statusBarConfig()"
140
+ [isLoading]="service.isLoadingResolved()"
141
+ [filters]="service.filters()"
142
+ [onFilterChange]="onFilterChangeFn"
143
+ [filterOptions]="service.clientFilterOptions()"
144
+ [loadingFilterOptions]="service.loadingFilterOptions()"
145
+ [peopleSearch]="service.dataSource()?.searchPeople?.bind(service.dataSource())"
146
+ [getUserByEmail]="service.dataSource()?.getUserByEmail?.bind(service.dataSource())"
147
+ [layoutMode]="service.layoutMode()"
148
+ [suppressHorizontalScroll]="service.suppressHorizontalScroll()"
149
+ [stickyHeaderInput]="service.stickyHeader()"
150
+ [columnReorder]="service.columnReorder()"
151
+ [aria-label]="service.ariaLabel()"
152
+ [aria-labelledby]="service.ariaLabelledBy()"
153
+ [emptyState]="emptyStateObj"
154
+ [showRowNumbers]="service.dataGridProps().showRowNumbers ?? false"
155
+ [showColumnLetters]="service.dataGridProps().showColumnLetters ?? false"
156
+ [showNameBox]="service.dataGridProps().showNameBox ?? false"
157
+ [onActiveCellChange]="service.dataGridProps().onActiveCellChange"
158
+ [formulaReferences]="service.dataGridProps().formulaReferences"
159
+ ></ogrid-primeng-datagrid-table>
160
+
161
+ <div pagination>
162
+ <ogrid-primeng-pagination-controls
163
+ [currentPage]="service.pagination().page"
164
+ [pageSize]="service.pagination().pageSize"
165
+ [totalCount]="service.pagination().displayTotalCount"
166
+ [pageSizeOptions]="service.pageSizeOptions()"
167
+ [entityLabelPlural]="service.entityLabelPlural()"
168
+ (pageChange)="service.setPage($event)"
169
+ (pageSizeChange)="onPageSizeChange($event)"
170
+ ></ogrid-primeng-pagination-controls>
171
+ </div>
172
+ </ogrid-layout>
173
+ `, styles: [":host { display: block; height: 100%; }"] }]
174
+ }], () => [], { props: [{
175
+ type: Input,
176
+ args: [{ required: true }]
177
+ }] }); })();
178
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OGridComponent, { className: "OGridComponent", filePath: "ogrid/ogrid.component.ts", lineNumber: 109 }); })();
@@ -0,0 +1,212 @@
1
+ import { Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { BasePaginationControlsComponent } from '@alaarab/ogrid-angular';
3
+ import * as i0 from "@angular/core";
4
+ function PaginationControlsComponent_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
5
+ const _r3 = i0.ɵɵgetCurrentView();
6
+ i0.ɵɵdomElementStart(0, "button", 12);
7
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pageChange.emit(1)); });
8
+ i0.ɵɵtext(1, "1");
9
+ i0.ɵɵdomElementEnd();
10
+ i0.ɵɵdomElementStart(2, "span", 13);
11
+ i0.ɵɵtext(3, "\u2026");
12
+ i0.ɵɵdomElementEnd();
13
+ } }
14
+ function PaginationControlsComponent_Conditional_0_For_10_Template(rf, ctx) { if (rf & 1) {
15
+ const _r4 = i0.ɵɵgetCurrentView();
16
+ i0.ɵɵdomElementStart(0, "button", 14);
17
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_For_10_Template_button_click_0_listener() { const pageNum_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pageChange.emit(pageNum_r5)); });
18
+ i0.ɵɵtext(1);
19
+ i0.ɵɵdomElementEnd();
20
+ } if (rf & 2) {
21
+ const pageNum_r5 = ctx.$implicit;
22
+ const ctx_r1 = i0.ɵɵnextContext(2);
23
+ i0.ɵɵclassProp("p-button-outlined", ctx_r1.currentPage !== pageNum_r5);
24
+ i0.ɵɵattribute("aria-label", "Page " + pageNum_r5)("aria-current", ctx_r1.currentPage === pageNum_r5 ? "page" : null);
25
+ i0.ɵɵadvance();
26
+ i0.ɵɵtextInterpolate(pageNum_r5);
27
+ } }
28
+ function PaginationControlsComponent_Conditional_0_Conditional_11_Template(rf, ctx) { if (rf & 1) {
29
+ const _r6 = i0.ɵɵgetCurrentView();
30
+ i0.ɵɵdomElementStart(0, "span", 13);
31
+ i0.ɵɵtext(1, "\u2026");
32
+ i0.ɵɵdomElementEnd();
33
+ i0.ɵɵdomElementStart(2, "button", 15);
34
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Conditional_11_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pageChange.emit(ctx_r1.vm().totalPages)); });
35
+ i0.ɵɵtext(3);
36
+ i0.ɵɵdomElementEnd();
37
+ } if (rf & 2) {
38
+ const ctx_r1 = i0.ɵɵnextContext(2);
39
+ i0.ɵɵadvance(2);
40
+ i0.ɵɵattribute("aria-label", "Page " + ctx_r1.vm().totalPages);
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵtextInterpolate(ctx_r1.vm().totalPages);
43
+ } }
44
+ function PaginationControlsComponent_Conditional_0_For_21_Template(rf, ctx) { if (rf & 1) {
45
+ i0.ɵɵdomElementStart(0, "option", 11);
46
+ i0.ɵɵtext(1);
47
+ i0.ɵɵdomElementEnd();
48
+ } if (rf & 2) {
49
+ const opt_r7 = ctx.$implicit;
50
+ i0.ɵɵdomProperty("value", opt_r7);
51
+ i0.ɵɵadvance();
52
+ i0.ɵɵtextInterpolate(opt_r7);
53
+ } }
54
+ function PaginationControlsComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
55
+ const _r1 = i0.ɵɵgetCurrentView();
56
+ i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
57
+ i0.ɵɵtext(2);
58
+ i0.ɵɵdomElementEnd();
59
+ i0.ɵɵdomElementStart(3, "div", 2)(4, "button", 3);
60
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageChange.emit(1)); });
61
+ i0.ɵɵtext(5, "\u00AB");
62
+ i0.ɵɵdomElementEnd();
63
+ i0.ɵɵdomElementStart(6, "button", 4);
64
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageChange.emit(ctx_r1.currentPage - 1)); });
65
+ i0.ɵɵtext(7, "\u2039");
66
+ i0.ɵɵdomElementEnd();
67
+ i0.ɵɵconditionalCreate(8, PaginationControlsComponent_Conditional_0_Conditional_8_Template, 4, 0);
68
+ i0.ɵɵrepeaterCreate(9, PaginationControlsComponent_Conditional_0_For_10_Template, 2, 5, "button", 5, i0.ɵɵrepeaterTrackByIdentity);
69
+ i0.ɵɵconditionalCreate(11, PaginationControlsComponent_Conditional_0_Conditional_11_Template, 4, 2);
70
+ i0.ɵɵdomElementStart(12, "button", 6);
71
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageChange.emit(ctx_r1.currentPage + 1)); });
72
+ i0.ɵɵtext(13, "\u203A");
73
+ i0.ɵɵdomElementEnd();
74
+ i0.ɵɵdomElementStart(14, "button", 7);
75
+ i0.ɵɵdomListener("click", function PaginationControlsComponent_Conditional_0_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageChange.emit(ctx_r1.vm().totalPages)); });
76
+ i0.ɵɵtext(15, "\u00BB");
77
+ i0.ɵɵdomElementEnd()();
78
+ i0.ɵɵdomElementStart(16, "div", 8)(17, "span", 9);
79
+ i0.ɵɵtext(18, "Rows");
80
+ i0.ɵɵdomElementEnd();
81
+ i0.ɵɵdomElementStart(19, "select", 10);
82
+ i0.ɵɵdomListener("change", function PaginationControlsComponent_Conditional_0_Template_select_change_19_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onPageSizeChange($event.target.value)); });
83
+ i0.ɵɵrepeaterCreate(20, PaginationControlsComponent_Conditional_0_For_21_Template, 2, 2, "option", 11, i0.ɵɵrepeaterTrackByIdentity);
84
+ i0.ɵɵdomElementEnd()()();
85
+ } if (rf & 2) {
86
+ const ctx_r1 = i0.ɵɵnextContext();
87
+ i0.ɵɵadvance(2);
88
+ i0.ɵɵtextInterpolate4(" Showing ", ctx_r1.vm().startItem, " to ", ctx_r1.vm().endItem, " of ", ctx_r1.totalCount.toLocaleString(), " ", ctx_r1.labelPlural(), " ");
89
+ i0.ɵɵadvance(2);
90
+ i0.ɵɵdomProperty("disabled", ctx_r1.currentPage === 1);
91
+ i0.ɵɵadvance(2);
92
+ i0.ɵɵdomProperty("disabled", ctx_r1.currentPage === 1);
93
+ i0.ɵɵadvance(2);
94
+ i0.ɵɵconditional(ctx_r1.vm().showStartEllipsis ? 8 : -1);
95
+ i0.ɵɵadvance();
96
+ i0.ɵɵrepeater(ctx_r1.vm().pageNumbers);
97
+ i0.ɵɵadvance(2);
98
+ i0.ɵɵconditional(ctx_r1.vm().showEndEllipsis ? 11 : -1);
99
+ i0.ɵɵadvance();
100
+ i0.ɵɵdomProperty("disabled", ctx_r1.currentPage >= ctx_r1.vm().totalPages);
101
+ i0.ɵɵadvance(2);
102
+ i0.ɵɵdomProperty("disabled", ctx_r1.currentPage >= ctx_r1.vm().totalPages);
103
+ i0.ɵɵadvance(5);
104
+ i0.ɵɵdomProperty("value", "" + ctx_r1.pageSize);
105
+ i0.ɵɵadvance();
106
+ i0.ɵɵrepeater(ctx_r1.vm().pageSizeOptions);
107
+ } }
108
+ export class PaginationControlsComponent extends BasePaginationControlsComponent {
109
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵPaginationControlsComponent_BaseFactory; return function PaginationControlsComponent_Factory(__ngFactoryType__) { return (ɵPaginationControlsComponent_BaseFactory || (ɵPaginationControlsComponent_BaseFactory = i0.ɵɵgetInheritedFactory(PaginationControlsComponent)))(__ngFactoryType__ || PaginationControlsComponent); }; })(); }
110
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationControlsComponent, selectors: [["ogrid-primeng-pagination-controls"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[1, "ogrid-pagination", 2, "display", "flex", "align-items", "center", "justify-content", "space-between", "gap", "12px", "flex-wrap", "wrap", "font-size", "13px", "color", "var(--ogrid-fg, #242424)"], [1, "ogrid-pagination__info"], ["role", "navigation", "aria-label", "Pagination", 1, "ogrid-pagination__pages", 2, "display", "flex", "align-items", "center", "gap", "4px"], ["type", "button", "aria-label", "First page", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click", "disabled"], ["type", "button", "aria-label", "Previous page", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click", "disabled"], ["type", "button", 1, "p-button", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "p-button-outlined"], ["type", "button", "aria-label", "Next page", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click", "disabled"], ["type", "button", "aria-label", "Last page", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click", "disabled"], [1, "ogrid-pagination__size", 2, "display", "flex", "align-items", "center", "gap", "6px"], [2, "font-size", "12px"], ["aria-label", "Rows per page", 2, "padding", "4px 6px", "border", "1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))", "border-radius", "4px", "background", "var(--ogrid-bg, #fff)", "color", "var(--ogrid-fg, #242424)", 3, "change", "value"], [3, "value"], ["type", "button", "aria-label", "Page 1", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click"], ["aria-hidden", "", 2, "padding", "0 4px"], ["type", "button", 1, "p-button", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click"], ["type", "button", 1, "p-button", "p-button-text", "p-button-sm", 2, "min-width", "32px", "padding", "4px 8px", 3, "click"]], template: function PaginationControlsComponent_Template(rf, ctx) { if (rf & 1) {
111
+ i0.ɵɵconditionalCreate(0, PaginationControlsComponent_Conditional_0_Template, 22, 11, "div", 0);
112
+ } if (rf & 2) {
113
+ i0.ɵɵconditional(ctx.vm() ? 0 : -1);
114
+ } }, styles: ["[_nghost-%COMP%] { display: block; }\n @media (max-width: 576px) {\n .ogrid-pagination[_ngcontent-%COMP%] { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px; font-size: 12px; }\n .ogrid-pagination__pages[_ngcontent-%COMP%] { order: -1; justify-content: center; }\n .ogrid-pagination__info[_ngcontent-%COMP%] { text-align: center; font-size: 11px; }\n .ogrid-pagination__size[_ngcontent-%COMP%] { font-size: 11px; justify-content: center; }\n }"], changeDetection: 0 }); }
115
+ }
116
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationControlsComponent, [{
117
+ type: Component,
118
+ args: [{ selector: 'ogrid-primeng-pagination-controls', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
119
+ @if (vm()) {
120
+ <div class="ogrid-pagination" style="display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--ogrid-fg, #242424)">
121
+ <div class="ogrid-pagination__info">
122
+ Showing {{ vm()!.startItem }} to {{ vm()!.endItem }} of {{ totalCount.toLocaleString() }} {{ labelPlural() }}
123
+ </div>
124
+
125
+ <div class="ogrid-pagination__pages" style="display:flex;align-items:center;gap:4px" role="navigation" aria-label="Pagination">
126
+ <button
127
+ type="button"
128
+ class="p-button p-button-text p-button-sm"
129
+ [disabled]="currentPage === 1"
130
+ (click)="pageChange.emit(1)"
131
+ aria-label="First page"
132
+ style="min-width:32px;padding:4px 8px"
133
+ >&laquo;</button>
134
+ <button
135
+ type="button"
136
+ class="p-button p-button-text p-button-sm"
137
+ [disabled]="currentPage === 1"
138
+ (click)="pageChange.emit(currentPage - 1)"
139
+ aria-label="Previous page"
140
+ style="min-width:32px;padding:4px 8px"
141
+ >&lsaquo;</button>
142
+
143
+ @if (vm()!.showStartEllipsis) {
144
+ <button
145
+ type="button"
146
+ class="p-button p-button-text p-button-sm"
147
+ (click)="pageChange.emit(1)"
148
+ aria-label="Page 1"
149
+ style="min-width:32px;padding:4px 8px"
150
+ >1</button>
151
+ <span aria-hidden style="padding:0 4px">&hellip;</span>
152
+ }
153
+
154
+ @for (pageNum of vm()!.pageNumbers; track pageNum) {
155
+ <button
156
+ type="button"
157
+ class="p-button p-button-sm"
158
+ [class.p-button-outlined]="currentPage !== pageNum"
159
+ (click)="pageChange.emit(pageNum)"
160
+ [attr.aria-label]="'Page ' + pageNum"
161
+ [attr.aria-current]="currentPage === pageNum ? 'page' : null"
162
+ style="min-width:32px;padding:4px 8px"
163
+ >{{ pageNum }}</button>
164
+ }
165
+
166
+ @if (vm()!.showEndEllipsis) {
167
+ <span aria-hidden style="padding:0 4px">&hellip;</span>
168
+ <button
169
+ type="button"
170
+ class="p-button p-button-text p-button-sm"
171
+ (click)="pageChange.emit(vm()!.totalPages)"
172
+ [attr.aria-label]="'Page ' + vm()!.totalPages"
173
+ style="min-width:32px;padding:4px 8px"
174
+ >{{ vm()!.totalPages }}</button>
175
+ }
176
+
177
+ <button
178
+ type="button"
179
+ class="p-button p-button-text p-button-sm"
180
+ [disabled]="currentPage >= vm()!.totalPages"
181
+ (click)="pageChange.emit(currentPage + 1)"
182
+ aria-label="Next page"
183
+ style="min-width:32px;padding:4px 8px"
184
+ >&rsaquo;</button>
185
+ <button
186
+ type="button"
187
+ class="p-button p-button-text p-button-sm"
188
+ [disabled]="currentPage >= vm()!.totalPages"
189
+ (click)="pageChange.emit(vm()!.totalPages)"
190
+ aria-label="Last page"
191
+ style="min-width:32px;padding:4px 8px"
192
+ >&raquo;</button>
193
+ </div>
194
+
195
+ <div class="ogrid-pagination__size" style="display:flex;align-items:center;gap:6px">
196
+ <span style="font-size:12px">Rows</span>
197
+ <select
198
+ [value]="'' + pageSize"
199
+ (change)="onPageSizeChange($any($event.target).value)"
200
+ aria-label="Rows per page"
201
+ style="padding:4px 6px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
202
+ >
203
+ @for (opt of vm()!.pageSizeOptions; track opt) {
204
+ <option [value]="opt">{{ opt }}</option>
205
+ }
206
+ </select>
207
+ </div>
208
+ </div>
209
+ }
210
+ `, styles: ["\n :host { display: block; }\n @media (max-width: 576px) {\n .ogrid-pagination { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px; font-size: 12px; }\n .ogrid-pagination__pages { order: -1; justify-content: center; }\n .ogrid-pagination__info { text-align: center; font-size: 11px; }\n .ogrid-pagination__size { font-size: 11px; justify-content: center; }\n }\n "] }]
211
+ }], null, null); })();
212
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaginationControlsComponent, { className: "PaginationControlsComponent", filePath: "pagination-controls/pagination-controls.component.ts", lineNumber: 111 }); })();
@@ -1,4 +1,7 @@
1
1
  import { BaseColumnChooserComponent } from '@alaarab/ogrid-angular';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class ColumnChooserComponent extends BaseColumnChooserComponent {
3
4
  get open(): import("@angular/core").WritableSignal<boolean>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnChooserComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnChooserComponent, "ogrid-primeng-column-chooser", never, {}, {}, never, never, true, never>;
4
7
  }
@@ -1,5 +1,6 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import { BaseColumnHeaderFilterComponent } from '@alaarab/ogrid-angular';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class ColumnHeaderFilterComponent extends BaseColumnHeaderFilterComponent {
4
5
  private destroyRef;
5
6
  filterTrigger?: ElementRef<HTMLButtonElement>;
@@ -10,4 +11,6 @@ export declare class ColumnHeaderFilterComponent extends BaseColumnHeaderFilterC
10
11
  handleSortClick(): void;
11
12
  toggleFilter(): void;
12
13
  handleSelectAllOptions(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnHeaderFilterComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnHeaderFilterComponent, "ogrid-primeng-column-header-filter", never, {}, {}, never, never, true, never>;
13
16
  }
@@ -1,7 +1,10 @@
1
1
  import type { Menu } from 'primeng/menu';
2
2
  import type { MenuItem } from 'primeng/api';
3
3
  import { BaseColumnHeaderMenuComponent } from '@alaarab/ogrid-angular';
4
+ import * as i0 from "@angular/core";
4
5
  export declare class ColumnHeaderMenuComponent extends BaseColumnHeaderMenuComponent {
5
6
  menuRef?: Menu;
6
7
  readonly menuModel: import("@angular/core").Signal<MenuItem[]>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnHeaderMenuComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnHeaderMenuComponent, "column-header-menu", never, {}, {}, never, never, true, never>;
7
10
  }
@@ -1,6 +1,7 @@
1
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
+ import * as i0 from "@angular/core";
4
5
  export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTableComponent<T> implements OnChanges {
5
6
  private wrapperRef?;
6
7
  private tableContainerRefEl?;
@@ -107,4 +108,6 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
107
108
  getRowNumberWidth(): number;
108
109
  private buildProps;
109
110
  getColumnLetter(colIdx: number): string;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataGridTableComponent<any>, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataGridTableComponent<any>, "ogrid-primeng-datagrid-table", never, { "itemsInput": { "alias": "items"; "required": true; }; "columns": { "alias": "columns"; "required": true; }; "getRowIdInput": { "alias": "getRowId"; "required": true; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "onColumnSort": { "alias": "onColumnSort"; "required": true; }; "visibleColumns": { "alias": "visibleColumns"; "required": true; }; "columnOrder": { "alias": "columnOrder"; "required": false; }; "onColumnOrderChange": { "alias": "onColumnOrderChange"; "required": false; }; "onColumnResized": { "alias": "onColumnResized"; "required": false; }; "onColumnPinned": { "alias": "onColumnPinned"; "required": false; }; "pinnedColumnsInput": { "alias": "pinnedColumns"; "required": false; }; "initialColumnWidths": { "alias": "initialColumnWidths"; "required": false; }; "layoutMode": { "alias": "layoutMode"; "required": false; }; "suppressHorizontalScroll": { "alias": "suppressHorizontalScroll"; "required": false; }; "stickyHeaderInput": { "alias": "stickyHeaderInput"; "required": false; }; "columnReorder": { "alias": "columnReorder"; "required": false; }; "isLoadingInput": { "alias": "isLoading"; "required": false; }; "loadingMessageInput": { "alias": "loadingMessage"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "cellSelection": { "alias": "cellSelection"; "required": false; }; "onCellValueChanged": { "alias": "onCellValueChanged"; "required": false; }; "onUndoInput": { "alias": "onUndo"; "required": false; }; "onRedoInput": { "alias": "onRedo"; "required": false; }; "canUndoInput": { "alias": "canUndo"; "required": false; }; "canRedoInput": { "alias": "canRedo"; "required": false; }; "rowSelectionMode": { "alias": "rowSelection"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "onSelectionChange": { "alias": "onSelectionChange"; "required": false; }; "statusBar": { "alias": "statusBar"; "required": false; }; "filters": { "alias": "filters"; "required": true; }; "onFilterChange": { "alias": "onFilterChange"; "required": true; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "loadingFilterOptions": { "alias": "loadingFilterOptions"; "required": false; }; "peopleSearch": { "alias": "peopleSearch"; "required": false; }; "getUserByEmail": { "alias": "getUserByEmail"; "required": false; }; "emptyStateInput": { "alias": "emptyState"; "required": false; }; "onCellError": { "alias": "onCellError"; "required": false; }; "ariaLabelInput": { "alias": "aria-label"; "required": false; }; "ariaLabelledByInput": { "alias": "aria-labelledby"; "required": false; }; "showRowNumbers": { "alias": "showRowNumbers"; "required": false; }; "showColumnLettersInput": { "alias": "showColumnLetters"; "required": false; }; "showNameBoxInput": { "alias": "showNameBox"; "required": false; }; "onActiveCellChange": { "alias": "onActiveCellChange"; "required": false; }; "formulaReferencesInput": { "alias": "formulaReferences"; "required": false; }; "currentPageInput": { "alias": "currentPage"; "required": false; }; "pageSizeInput": { "alias": "pageSize"; "required": false; }; }, {}, never, never, true, never>;
110
113
  }
@@ -1,3 +1,6 @@
1
1
  import { BaseInlineCellEditorComponent } from '@alaarab/ogrid-angular';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class InlineCellEditorComponent<T = unknown> extends BaseInlineCellEditorComponent<T> {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<InlineCellEditorComponent<any>, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<InlineCellEditorComponent<any>, "ogrid-primeng-inline-cell-editor", never, {}, {}, never, never, true, never>;
3
6
  }
@@ -1,3 +1,6 @@
1
1
  import { BasePopoverCellEditorComponent } from '@alaarab/ogrid-angular';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class PopoverCellEditorComponent<T = unknown> extends BasePopoverCellEditorComponent<T> {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverCellEditorComponent<any>, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<PopoverCellEditorComponent<any>, "ogrid-primeng-popover-cell-editor", never, {}, {}, never, never, true, never>;
3
6
  }
@@ -1,5 +1,6 @@
1
1
  import { OGridService } from '@alaarab/ogrid-angular';
2
2
  import type { IOGridProps, RowId } from '@alaarab/ogrid-angular';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class OGridComponent<T = unknown> {
4
5
  readonly service: OGridService<T>;
5
6
  private readonly propsSignal;
@@ -28,4 +29,6 @@ export declare class OGridComponent<T = unknown> {
28
29
  render: unknown;
29
30
  };
30
31
  onPageSizeChange(size: number): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<OGridComponent<any>, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<OGridComponent<any>, "ogrid-primeng", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, ["[toolbar]"], true, never>;
31
34
  }
@@ -1,3 +1,6 @@
1
1
  import { BasePaginationControlsComponent } from '@alaarab/ogrid-angular';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class PaginationControlsComponent extends BasePaginationControlsComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginationControlsComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<PaginationControlsComponent, "ogrid-primeng-pagination-controls", never, {}, {}, never, never, true, never>;
3
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-primeng",
3
- "version": "2.5.9",
3
+ "version": "2.6.1",
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",
@@ -13,7 +13,7 @@
13
13
  }
14
14
  },
15
15
  "scripts": {
16
- "build": "rimraf dist && tsup && tsc -p tsconfig.build.json",
16
+ "build": "rimraf dist && ngc -p tsconfig.build.json",
17
17
  "test": "jest --passWithNoTests",
18
18
  "storybook": "ng run angular-primeng:storybook",
19
19
  "build-storybook": "ng run angular-primeng:build-storybook"
@@ -37,7 +37,7 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "dependencies": {
40
- "@alaarab/ogrid-angular": "2.5.9"
40
+ "@alaarab/ogrid-angular": "2.6.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/core": "^21.0.0",