@alaarab/ogrid-angular-primeng 2.1.10 → 2.1.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/index.js CHANGED
@@ -82,6 +82,8 @@ ColumnHeaderFilterComponent = __decorateClass([
82
82
  #filterTrigger
83
83
  (click)="toggleFilter()"
84
84
  [attr.aria-label]="'Filter ' + columnName"
85
+ [attr.aria-expanded]="isFilterOpen()"
86
+ aria-haspopup="dialog"
85
87
  [title]="'Filter ' + columnName"
86
88
  style="border:none;background:transparent;cursor:pointer;padding:2px 4px;font-size:12px;position:relative;color:var(--ogrid-fg, #242424)"
87
89
  [style.font-weight]="hasActiveFilter() ? 'bold' : 'normal'"
@@ -471,16 +473,9 @@ var DataGridTableComponent = class extends BaseDataGridTableComponent {
471
473
  );
472
474
  this.tableWidthStyle = computed(() => {
473
475
  if (this.showEmptyInGrid()) return "100%";
474
- if (this.allowOverflowX()) return "fit-content";
475
476
  if (this.layoutMode === "content") return "fit-content";
476
477
  return "100%";
477
478
  });
478
- this.tableMinWidthStyle = computed(() => {
479
- if (this.showEmptyInGrid()) return "100%";
480
- if (this.allowOverflowX()) return "max-content";
481
- if (this.layoutMode === "content") return "max-content";
482
- return "100%";
483
- });
484
479
  this.initBase();
485
480
  }
486
481
  ngOnChanges(changes) {
@@ -786,21 +781,19 @@ DataGridTableComponent = __decorateClass([
786
781
  [attr.aria-labelledby]="ariaLabelledBy()"
787
782
  [attr.data-empty]="showEmptyInGrid() ? 'true' : null"
788
783
  [attr.data-column-count]="state().layout.totalColCount"
789
- [attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
784
+ [attr.data-suppress-scroll]="getProps()?.suppressHorizontalScroll ? 'true' : null"
790
785
  [attr.data-has-selection]="rowSelectionMode !== 'none' ? 'true' : null"
791
786
  (contextmenu)="$event.preventDefault()"
792
787
  (keydown)="onGridKeyDown($event)"
793
788
  (mousedown)="onWrapperMouseDown($event)"
794
789
  (scroll)="onWrapperScroll($event)"
795
790
  [style.--data-table-column-count]="state().layout.totalColCount"
796
- [style.--data-table-width]="tableWidthStyle()"
797
- [style.--data-table-min-width]="tableMinWidthStyle()"
798
791
  [style.--ogrid-row-height]="rowHeightCssVar()"
799
792
  >
800
793
  <div class="ogrid-table-wrapper">
801
794
  <div [class.loading-dimmed]="isLoading() && items().length > 0" class="ogrid-table-wrapper">
802
- <div #tableContainer class="ogrid-table-wrapper">
803
- <table class="ogrid-table">
795
+ <div #tableContainer class="ogrid-table-anchor">
796
+ <table class="ogrid-table" role="grid">
804
797
  <thead [class]="stickyHeader() ? 'ogrid-thead ogrid-sticky-header' : 'ogrid-thead'">
805
798
  @for (row of headerRows(); track $index; let rowIdx = $index) {
806
799
  <tr>
@@ -912,6 +905,7 @@ DataGridTableComponent = __decorateClass([
912
905
  @let isSelected = selectedRowIds().has(rowId);
913
906
  <tr
914
907
  [attr.data-row-id]="rowId"
908
+ [attr.aria-selected]="isSelected || null"
915
909
  [style.background]="isSelected ? 'var(--ogrid-selected-bg, #e8f0fe)' : null"
916
910
  (click)="onRowClickPrimeng($event, item)"
917
911
  >
@@ -1100,13 +1094,20 @@ DataGridTableComponent = __decorateClass([
1100
1094
  background: var(--ogrid-bg, #ffffff);
1101
1095
  color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1102
1096
  }
1097
+ .ogrid-scroll-wrapper[data-suppress-scroll='true'] { overflow-x: hidden; }
1103
1098
  .ogrid-scroll-wrapper--loading-empty { min-height: 200px; }
1104
1099
  .ogrid-table-wrapper {
1105
1100
  position: relative;
1106
1101
  }
1102
+ .ogrid-table-anchor {
1103
+ position: relative;
1104
+ width: max-content;
1105
+ min-width: 100%;
1106
+ overflow: clip;
1107
+ }
1107
1108
  .ogrid-table {
1108
- width: var(--data-table-width, 100%);
1109
- min-width: var(--data-table-min-width, 100%);
1109
+ width: 100%;
1110
+ min-width: max-content;
1110
1111
  border-collapse: collapse;
1111
1112
  table-layout: fixed;
1112
1113
  }
@@ -1200,7 +1201,7 @@ DataGridTableComponent = __decorateClass([
1200
1201
  position: relative;
1201
1202
  }
1202
1203
  .ogrid-cell-content {
1203
- padding: 6px 10px;
1204
+ padding: var(--ogrid-cell-padding, 6px 10px);
1204
1205
  min-height: 20px;
1205
1206
  cursor: default;
1206
1207
  overflow: hidden;
@@ -1212,7 +1213,7 @@ DataGridTableComponent = __decorateClass([
1212
1213
  outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;
1213
1214
  z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: visible; padding: 0;
1214
1215
  }
1215
- .ogrid-scroll-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important; }
1216
+ .ogrid-scroll-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)); }
1216
1217
  .ogrid-fill-handle {
1217
1218
  position: absolute;
1218
1219
  bottom: -3px;
@@ -1362,35 +1363,36 @@ DataGridTableComponent = __decorateClass([
1362
1363
  outline-offset: 2px;
1363
1364
  }
1364
1365
 
1365
- /* PrimeNG Menu popup overrides \u2014 must use !important to win over PrimeNG's CSS-variable-based defaults */
1366
- .p-menu {
1367
- background: var(--ogrid-bg, #ffffff) !important;
1368
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87)) !important;
1369
- border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12)) !important;
1370
- border-radius: 4px !important;
1371
- padding: 4px 0 !important;
1366
+ /* PrimeNG Menu popup overrides.
1367
+ Double-class selectors (0,2,0) beat PrimeNG's single-class (0,1,0) defaults. */
1368
+ .p-menu.p-menu {
1369
+ background: var(--ogrid-bg, #ffffff);
1370
+ color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1371
+ border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
1372
+ border-radius: 4px;
1373
+ padding: 4px 0;
1372
1374
  }
1373
- .p-menu-overlay {
1374
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ogrid-border, rgba(0, 0, 0, 0.12)) !important;
1375
+ .p-menu-overlay.p-menu-overlay {
1376
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ogrid-border, rgba(0, 0, 0, 0.12));
1375
1377
  }
1376
- .p-menu-item-content {
1377
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87)) !important;
1378
+ .p-menu-item-content.p-menu-item-content {
1379
+ color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1378
1380
  }
1379
- .p-menu-item-link {
1380
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87)) !important;
1381
- padding: 6px 12px !important;
1381
+ .p-menu-item-link.p-menu-item-link {
1382
+ color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1383
+ padding: 6px 12px;
1382
1384
  }
1383
- .p-menu-item-label {
1384
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87)) !important;
1385
- font-size: 0.875rem !important;
1385
+ .p-menu-item-label.p-menu-item-label {
1386
+ color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1387
+ font-size: 0.875rem;
1386
1388
  }
1387
- .p-menu-item:not(.p-disabled) .p-menu-item-content:hover {
1388
- background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04)) !important;
1389
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87)) !important;
1389
+ .p-menu-item:not(.p-disabled) .p-menu-item-content.p-menu-item-content:hover {
1390
+ background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
1391
+ color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1390
1392
  }
1391
- .p-menu-separator {
1392
- border-color: var(--ogrid-border, rgba(0, 0, 0, 0.12)) !important;
1393
- margin: 4px 0 !important;
1393
+ .p-menu-separator.p-menu-separator {
1394
+ border-color: var(--ogrid-border, rgba(0, 0, 0, 0.12));
1395
+ margin: 4px 0;
1394
1396
  }
1395
1397
  `]
1396
1398
  })
@@ -90,7 +90,6 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
90
90
  protected getTableContainerRef(): ElementRef<HTMLElement> | undefined;
91
91
  readonly resolvedAriaLabel: import("@angular/core").Signal<string | undefined>;
92
92
  readonly tableWidthStyle: import("@angular/core").Signal<"100%" | "fit-content">;
93
- readonly tableMinWidthStyle: import("@angular/core").Signal<"100%" | "max-content">;
94
93
  getColumnWidth(col: IColumnDef<T>): number;
95
94
  trackByRowId(_index: number, item: T): RowId;
96
95
  onSelectAllChangePrimeng(checked: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-primeng",
3
- "version": "2.1.10",
3
+ "version": "2.1.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",
@@ -37,7 +37,7 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "dependencies": {
40
- "@alaarab/ogrid-angular": "2.1.10"
40
+ "@alaarab/ogrid-angular": "2.1.11"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/core": "^21.0.0",