@alaarab/ogrid-angular-material 2.5.6 → 2.5.8

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.
Files changed (2) hide show
  1. package/dist/esm/index.js +21 -4
  2. package/package.json +2 -2
package/dist/esm/index.js CHANGED
@@ -331,6 +331,12 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
331
331
  color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.54));
332
332
  }
333
333
 
334
+ /* Always reserve space; hide on hover-capable devices until column is hovered.
335
+ The th:hover rule lives in the parent (ViewEncapsulation.None) styles. */
336
+ @media (hover: hover) {
337
+ .column-header-menu-trigger { visibility: hidden; }
338
+ }
339
+
334
340
  .column-header-menu-trigger:hover {
335
341
  background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.08));
336
342
  color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
@@ -362,6 +368,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
362
368
  (contextmenu)="$event.preventDefault()"
363
369
  [class.ogrid-datagrid-wrapper--overflow-x]="allowOverflowX()"
364
370
  [attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
371
+ [attr.data-virtual-scroll]="vsEnabled() ? '' : null"
365
372
  data-ogrid-scroll-container
366
373
  >
367
374
  <div class="ogrid-datagrid-scroll-wrapper">
@@ -592,7 +599,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
592
599
  [style]="cellStyle ?? undefined"
593
600
  >
594
601
  @if (colLayout.col.type === 'boolean') {
595
- <input type="checkbox" [checked]="!!descriptor.displayValue" [disabled]="!descriptor.canEditAny" (change)="descriptor.canEditAny ? commitEdit(item, colLayout.col.columnId, !!descriptor.displayValue, !descriptor.displayValue, rowIndex, descriptor.globalColIndex) : null" (click)="$event.stopPropagation()" style="margin:0;outline:none" [style.cursor]="descriptor.canEditAny ? 'pointer' : 'default'" [attr.aria-label]="descriptor.displayValue ? 'Checked' : 'Unchecked'" />
602
+ <input type="checkbox" [checked]="!!descriptor.displayValue" [disabled]="!descriptor.canEditAny" (change)="descriptor.canEditAny ? commitBooleanEdit(item, colLayout.col.columnId, !!descriptor.displayValue, rowIndex, descriptor.globalColIndex) : null" (pointerdown)="onBooleanCheckboxPointerDown($event, rowIndex, descriptor.globalColIndex)" (click)="$event.stopPropagation()" style="margin:0;outline:none" [style.cursor]="descriptor.canEditAny ? 'pointer' : 'default'" [attr.aria-label]="descriptor.displayValue ? 'Checked' : 'Unchecked'" />
596
603
  } @else {
597
604
  {{ content }}
598
605
  }
@@ -709,12 +716,14 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
709
716
  :host { display: block; }
710
717
  .ogrid-datagrid-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
711
718
  .ogrid-datagrid-wrapper {
712
- position: relative; flex: 1; min-height: 0; width: 100%; max-width: 100%;
719
+ position: relative; width: 100%; max-width: 100%;
713
720
  overflow-x: hidden; overflow-y: auto; background: var(--ogrid-bg, #ffffff);
714
721
  color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
715
722
  will-change: scroll-position; outline: none;
716
723
  }
724
+ .ogrid-datagrid-wrapper[data-virtual-scroll] { flex: 1; min-height: 0; }
717
725
  .ogrid-datagrid-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)); }
726
+ .ogrid-datagrid-cell--active[data-drag-range] { outline: none; }
718
727
  .ogrid-datagrid-wrapper--fit { width: fit-content; }
719
728
  .ogrid-datagrid-wrapper--overflow-x { overflow-x: auto; }
720
729
  .ogrid-datagrid-wrapper--loading-empty { min-height: 200px; }
@@ -723,6 +732,8 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
723
732
  .ogrid-datagrid-table {
724
733
  width: 100%; min-width: max-content; border-collapse: collapse; table-layout: fixed;
725
734
  }
735
+ .ogrid-datagrid-table tr th:first-child,
736
+ .ogrid-datagrid-table tr td:first-child { border-left: none; }
726
737
  .ogrid-datagrid-table tbody tr { height: var(--ogrid-row-height, auto); }
727
738
  .ogrid-datagrid-thead {
728
739
  z-index: 8; background: var(--ogrid-header-bg, rgba(0, 0, 0, 0.04));
@@ -791,7 +802,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
791
802
  outline: 2px solid var(--mat-sys-primary, #1976d2); outline-offset: -2px; z-index: 3;
792
803
  }
793
804
  .ogrid-datagrid-cell--numeric { justify-content: flex-end; text-align: right; }
794
- .ogrid-datagrid-cell--boolean { justify-content: center; text-align: center; }
805
+ .ogrid-datagrid-cell--boolean { justify-content: flex-start; }
795
806
  .ogrid-datagrid-cell--editable { cursor: cell; }
796
807
  .ogrid-datagrid-cell--active {
797
808
  outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;
@@ -806,7 +817,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
806
817
  .ogrid-editing-cell {
807
818
  width: 100%; height: 100%; display: flex; align-items: center; box-sizing: border-box;
808
819
  outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;
809
- z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: visible; padding: 0;
820
+ z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: hidden; padding: 0;
810
821
  }
811
822
  .ogrid-datagrid-editor-input {
812
823
  width: 100%; height: 100%; padding: 6px 10px; border: 2px solid var(--ogrid-selection-color, #217346);
@@ -889,6 +900,12 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
889
900
  font-variant-numeric: tabular-nums;
890
901
  }
891
902
 
903
+ /* Reveal column menu trigger on header hover without layout shift.
904
+ The button always takes up space (visibility: hidden); shown when column is hovered. */
905
+ @media (hover: hover) {
906
+ th:hover .column-header-menu-trigger { visibility: visible; }
907
+ }
908
+
892
909
  /* Angular Material Menu popup dark mode overrides.
893
910
  Double-class selector (0,2,0) beats MUI's single-class (0,1,0) defaults. */
894
911
  .mat-mdc-menu-panel.mat-mdc-menu-panel {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-material",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
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",
@@ -37,7 +37,7 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "dependencies": {
40
- "@alaarab/ogrid-angular": "2.5.5"
40
+ "@alaarab/ogrid-angular": "2.5.7"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/cdk": "^21.0.0",