@alaarab/ogrid-angular-primeng 2.1.1 → 2.1.3

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.
@@ -23,6 +23,7 @@ let DataGridTableComponent = class DataGridTableComponent extends BaseDataGridTa
23
23
  this.initialColumnWidths = undefined;
24
24
  this.layoutMode = 'fill';
25
25
  this.suppressHorizontalScroll = undefined;
26
+ this.stickyHeaderInput = undefined;
26
27
  this.columnReorder = undefined;
27
28
  this.isLoadingInput = false;
28
29
  this.loadingMessageInput = 'Loading\u2026';
@@ -232,6 +233,7 @@ let DataGridTableComponent = class DataGridTableComponent extends BaseDataGridTa
232
233
  getUserByEmail: this.getUserByEmail,
233
234
  emptyState: this.emptyStateInput,
234
235
  onCellError: this.onCellError,
236
+ stickyHeader: this.stickyHeaderInput,
235
237
  'aria-label': this.ariaLabelInput,
236
238
  'aria-labelledby': this.ariaLabelledByInput,
237
239
  };
@@ -288,6 +290,9 @@ __decorate([
288
290
  __decorate([
289
291
  Input()
290
292
  ], DataGridTableComponent.prototype, "suppressHorizontalScroll", void 0);
293
+ __decorate([
294
+ Input()
295
+ ], DataGridTableComponent.prototype, "stickyHeaderInput", void 0);
291
296
  __decorate([
292
297
  Input()
293
298
  ], DataGridTableComponent.prototype, "columnReorder", void 0);
@@ -413,7 +418,7 @@ DataGridTableComponent = __decorate([
413
418
  <div [class.loading-dimmed]="isLoading() && items().length > 0" class="ogrid-table-wrapper">
414
419
  <div #tableContainer class="ogrid-table-wrapper">
415
420
  <table class="ogrid-table">
416
- <thead class="ogrid-thead">
421
+ <thead [class]="stickyHeader() ? 'ogrid-thead ogrid-sticky-header' : 'ogrid-thead'">
417
422
  @for (row of headerRows(); track $index; let rowIdx = $index) {
418
423
  <tr>
419
424
  @if (rowIdx === headerRows().length - 1 && hasCheckboxCol()) {
@@ -726,9 +731,10 @@ DataGridTableComponent = __decorate([
726
731
  .ogrid-thead {
727
732
  z-index: 3;
728
733
  background: var(--ogrid-header-bg, #f5f5f5);
729
- position: sticky;
730
- top: 0;
731
734
  }
735
+ .ogrid-sticky-header { position: sticky; top: 0; }
736
+ .ogrid-sticky-header .ogrid-checkbox-header,
737
+ .ogrid-sticky-header .ogrid-row-number-header { position: sticky; top: 0; }
732
738
  .ogrid-checkbox-header {
733
739
  width: 48px;
734
740
  min-width: 48px;
@@ -736,8 +742,6 @@ DataGridTableComponent = __decorate([
736
742
  text-align: center;
737
743
  background: var(--ogrid-header-bg, #f5f5f5);
738
744
  border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
739
- position: sticky;
740
- top: 0;
741
745
  z-index: 3;
742
746
  }
743
747
  .ogrid-row-number-header {
@@ -748,8 +752,6 @@ DataGridTableComponent = __decorate([
748
752
  font-weight: 600;
749
753
  background: var(--ogrid-header-bg, #f5f5f5);
750
754
  border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
751
- position: sticky;
752
- top: 0;
753
755
  z-index: 3;
754
756
  }
755
757
  .ogrid-row-number-spacer {
@@ -888,7 +890,8 @@ DataGridTableComponent = __decorate([
888
890
  left: 0;
889
891
  z-index: 10;
890
892
  background: var(--ogrid-header-bg, #f5f5f5);
891
- border-left: 2px solid var(--ogrid-primary, #217346);
893
+ border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
894
+ box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
892
895
  }
893
896
  .ogrid-th-pinned-right {
894
897
  position: sticky;
@@ -896,21 +899,24 @@ DataGridTableComponent = __decorate([
896
899
  right: 0;
897
900
  z-index: 10;
898
901
  background: var(--ogrid-header-bg, #f5f5f5);
899
- border-right: 2px solid var(--ogrid-primary, #217346);
902
+ border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
903
+ box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);
900
904
  }
901
905
  .ogrid-td-pinned-left {
902
906
  position: sticky;
903
907
  left: 0;
904
908
  z-index: 5;
905
909
  background: var(--ogrid-bg, #fff);
906
- border-left: 2px solid var(--ogrid-primary, #217346);
910
+ border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
911
+ box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
907
912
  }
908
913
  .ogrid-td-pinned-right {
909
914
  position: sticky;
910
915
  right: 0;
911
916
  z-index: 5;
912
917
  background: var(--ogrid-bg, #fff);
913
- border-right: 2px solid var(--ogrid-primary, #217346);
918
+ border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
919
+ box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);
914
920
  }
915
921
  ::ng-deep th:focus-visible,
916
922
  ::ng-deep td:focus-visible {
@@ -36,7 +36,7 @@ let OGridComponent = class OGridComponent {
36
36
  });
37
37
  }
38
38
  get showToolbar() {
39
- return this.service.columnChooserPlacement() === 'toolbar' || this.service.toolbar() != null;
39
+ return this.service.columnChooserPlacement() === 'toolbar' || this.service.toolbar() != null || this.service.fullScreen();
40
40
  }
41
41
  get emptyStateObj() {
42
42
  return this.emptyStateComputed();
@@ -68,6 +68,7 @@ OGridComponent = __decorate([
68
68
  [hasToolbarBelow]="false"
69
69
  [hasPagination]="true"
70
70
  [sideBar]="service.sideBarProps()"
71
+ [fullScreen]="service.fullScreen()"
71
72
  >
72
73
  <ng-content select="[toolbar]" toolbar></ng-content>
73
74
 
@@ -113,6 +114,7 @@ OGridComponent = __decorate([
113
114
  [getUserByEmail]="service.dataSource()?.getUserByEmail?.bind(service.dataSource())"
114
115
  [layoutMode]="service.layoutMode()"
115
116
  [suppressHorizontalScroll]="service.suppressHorizontalScroll()"
117
+ [stickyHeaderInput]="service.stickyHeader()"
116
118
  [columnReorder]="service.columnReorder()"
117
119
  [aria-label]="service.ariaLabel()"
118
120
  [aria-labelledby]="service.ariaLabelledBy()"
@@ -19,6 +19,7 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
19
19
  initialColumnWidths: Record<string, number> | undefined;
20
20
  layoutMode: 'content' | 'fill';
21
21
  suppressHorizontalScroll: boolean | undefined;
22
+ stickyHeaderInput: boolean | undefined;
22
23
  columnReorder: boolean | undefined;
23
24
  isLoadingInput: boolean;
24
25
  loadingMessageInput: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-primeng",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
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",
@@ -37,7 +37,7 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "dependencies": {
40
- "@alaarab/ogrid-angular": "2.1.1"
40
+ "@alaarab/ogrid-angular": "2.1.3"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/core": "^21.0.0",