@alaarab/ogrid-angular-material 2.5.3 → 2.5.5

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
@@ -1,4 +1,4 @@
1
- import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,OGRID_THEME_VARS_CSS,CHECKBOX_COLUMN_WIDTH,DataGridStateService,ColumnReorderService,VirtualScrollService,StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,OGridService,OGridLayoutComponent,BaseColumnHeaderFilterComponent,BaseColumnHeaderMenuComponent,BaseInlineCellEditorComponent,BasePopoverCellEditorComponent,BaseDataGridTableComponent,formatCellReference,indexToColumnLetter,ROW_NUMBER_COLUMN_ID,BaseColumnChooserComponent,BasePaginationControlsComponent,BaseOGridComponent}from'@alaarab/ogrid-angular';export{AUTOSIZE_EXTRA_PX,AUTOSIZE_MAX_PX,BaseColumnChooserComponent,BaseColumnHeaderFilterComponent,BaseDataGridTableComponent,BaseInlineCellEditorComponent,BaseOGridComponent,BasePaginationControlsComponent,BasePopoverCellEditorComponent,CELL_PADDING,CHECKBOX_COLUMN_WIDTH,COLUMN_HEADER_MENU_ITEMS,ColumnReorderService,DEFAULT_DEBOUNCE_MS,DEFAULT_MIN_COLUMN_WIDTH,DataGridEditingHelper,DataGridInteractionHelper,DataGridLayoutHelper,DataGridStateService,EmptyStateComponent,GRID_BORDER_RADIUS,GRID_CONTEXT_MENU_ITEMS,GridContextMenuComponent,INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,MAX_PAGE_BUTTONS,MarchingAntsOverlayComponent,OGRID_THEME_VARS_CSS,OGridLayoutComponent,OGridService,PAGE_SIZE_OPTIONS,PEOPLE_SEARCH_DEBOUNCE_MS,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,ROW_NUMBER_COLUMN_WIDTH,SIDEBAR_TRANSITION_MS,SideBarComponent,StatusBarComponent,UndoRedoStack,VirtualScrollService,Z_INDEX,applyCellDeletion,applyCutClear,applyFillValues,applyPastedValues,applyRangeRowSelection,areGridRowPropsEqual,booleanParser,buildCsvHeader,buildCsvRows,buildHeaderRows,buildInlineEditorProps,buildPopoverEditorProps,calculateDropTarget,clampSelectionToBounds,computeAggregations,computeArrowNavigation,computeAutoScrollSpeed,computeNextSortState,computeRowSelectionState,computeTabNavigation,computeTotalHeight,computeVisibleRange,createDebouncedCallback,createDebouncedSignal,createLatestCallback,currencyParser,dateParser,debounce,deriveFilterOptionsFromData,emailParser,escapeCsvValue,exportToCsv,findCtrlArrowTarget,flattenColumns,formatCellValueForTsv,formatSelectionAsTsv,formatShortcut,getCellRenderDescriptor,getCellValue,getColumnHeaderMenuItems,getContextMenuHandlers,getDataGridStatusBarConfig,getFilterField,getHeaderFilterConfig,getMultiSelectFilterFields,getPaginationViewModel,getPinStateForColumn,getScrollTopForRow,getStatusBarParts,injectGlobalStyles,isFilterConfig,isInSelectionRange,isRowInRange,measureColumnContentWidth,measureRange,mergeFilter,normalizeSelectionRange,numberParser,parseTsvClipboard,parseValue,processClientSideData,rangesEqual,reorderColumnArray,resolveCellDisplayContent,resolveCellStyle,toUserLike,triggerCsvDownload,validateColumns,validateRowIds}from'@alaarab/ogrid-angular';import {ViewChild,Component,ChangeDetectionStrategy,Input,ViewEncapsulation,signal,computed,effect}from'@angular/core';import {MatMenuTrigger,MatMenuModule}from'@angular/material/menu';import {MatDividerModule}from'@angular/material/divider';var x=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var e=(t,a,r,d)=>{for(var o=d>1?void 0:d?_(a,r):a,u=t.length-1,f;u>=0;u--)(f=t[u])&&(o=(d?f(a,r,o):f(o))||o);return d&&o&&x(a,r,o),o};var n=class extends BaseColumnHeaderFilterComponent{getHeaderEl(){return this.headerEl}onDocumentClickWrapper(a){this.onDocumentClick(a,"ogrid-column-header-filter");}};e([ViewChild("headerEl")],n.prototype,"headerEl",2),n=e([Component({selector:"ogrid-column-header-filter",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:`
1
+ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,OGRID_THEME_VARS_CSS,CHECKBOX_COLUMN_WIDTH,DataGridStateService,ColumnReorderService,VirtualScrollService,StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,OGridService,OGridLayoutComponent,BaseColumnHeaderFilterComponent,BaseColumnHeaderMenuComponent,BaseInlineCellEditorComponent,BasePopoverCellEditorComponent,BaseDataGridTableComponent,formatCellReference,indexToColumnLetter,ROW_NUMBER_COLUMN_ID,BaseColumnChooserComponent,BasePaginationControlsComponent,BaseOGridComponent}from'@alaarab/ogrid-angular';export{AUTOSIZE_EXTRA_PX,AUTOSIZE_MAX_PX,BaseColumnChooserComponent,BaseColumnHeaderFilterComponent,BaseDataGridTableComponent,BaseInlineCellEditorComponent,BaseOGridComponent,BasePaginationControlsComponent,BasePopoverCellEditorComponent,CELL_PADDING,CHECKBOX_COLUMN_WIDTH,COLUMN_HEADER_MENU_ITEMS,ColumnReorderService,DEFAULT_DEBOUNCE_MS,DEFAULT_MIN_COLUMN_WIDTH,DataGridEditingHelper,DataGridInteractionHelper,DataGridLayoutHelper,DataGridStateService,EmptyStateComponent,GRID_BORDER_RADIUS,GRID_CONTEXT_MENU_ITEMS,GridContextMenuComponent,INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,MAX_PAGE_BUTTONS,MarchingAntsOverlayComponent,OGRID_THEME_VARS_CSS,OGridLayoutComponent,OGridService,PAGE_SIZE_OPTIONS,PEOPLE_SEARCH_DEBOUNCE_MS,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,ROW_NUMBER_COLUMN_WIDTH,SIDEBAR_TRANSITION_MS,SideBarComponent,StatusBarComponent,UndoRedoStack,VirtualScrollService,Z_INDEX,applyCellDeletion,applyCutClear,applyFillValues,applyPastedValues,applyRangeRowSelection,areGridRowPropsEqual,booleanParser,buildCsvHeader,buildCsvRows,buildHeaderRows,buildInlineEditorProps,buildPopoverEditorProps,calculateDropTarget,clampSelectionToBounds,computeAggregations,computeArrowNavigation,computeAutoScrollSpeed,computeNextSortState,computeRowSelectionState,computeTabNavigation,computeTotalHeight,computeVisibleRange,createDebouncedCallback,createDebouncedSignal,createLatestCallback,currencyParser,dateParser,debounce,deriveFilterOptionsFromData,emailParser,escapeCsvValue,exportToCsv,findCtrlArrowTarget,flattenColumns,formatCellValueForTsv,formatSelectionAsTsv,formatShortcut,getCellRenderDescriptor,getCellValue,getColumnHeaderMenuItems,getContextMenuHandlers,getDataGridStatusBarConfig,getFilterField,getHeaderFilterConfig,getMultiSelectFilterFields,getPaginationViewModel,getPinStateForColumn,getScrollTopForRow,getStatusBarParts,injectGlobalStyles,isFilterConfig,isInSelectionRange,isRowInRange,measureColumnContentWidth,measureRange,mergeFilter,normalizeSelectionRange,numberParser,parseTsvClipboard,parseValue,processClientSideData,rangesEqual,reorderColumnArray,resolveCellDisplayContent,resolveCellStyle,toUserLike,triggerCsvDownload,validateColumns,validateRowIds}from'@alaarab/ogrid-angular';import {ViewChild,Component,ChangeDetectionStrategy,Input,ViewEncapsulation,signal,computed,effect}from'@angular/core';import {MatMenuTrigger,MatMenuModule}from'@angular/material/menu';import {MatDividerModule}from'@angular/material/divider';var x=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var e=(t,a,r,d)=>{for(var o=d>1?void 0:d?y(a,r):a,u=t.length-1,h;u>=0;u--)(h=t[u])&&(o=(d?h(a,r,o):h(o))||o);return d&&o&&x(a,r,o),o};var n=class extends BaseColumnHeaderFilterComponent{getHeaderEl(){return this.headerEl}onDocumentClickWrapper(a){this.onDocumentClick(a,"ogrid-column-header-filter");}};e([ViewChild("headerEl")],n.prototype,"headerEl",2),n=e([Component({selector:"ogrid-column-header-filter",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:`
2
2
  <div class="ogrid-header-filter" #headerEl>
3
3
  <div class="ogrid-header-filter__label">
4
4
  <span class="ogrid-header-filter__name" [title]="columnName" data-header-label>
@@ -344,7 +344,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
344
344
  outline: 2px solid var(--ogrid-selection, #217346); outline-offset: -1px;
345
345
  z-index: 2; position: relative;
346
346
  }
347
- `]})],g);var i=class extends BaseDataGridTableComponent{constructor(){super();this.propsSignal=signal(void 0);this.showColumnLetters=computed(()=>!!this.getProps()?.showColumnLetters);this.formulaReferences=computed(()=>this.getProps()?.formulaReferences);this.initBase(),effect(()=>{let d=this.getProps()?.onActiveCellChange;if(!d)return;let o=this.activeCell();if(o){let u=o.columnIndex-this.colOffset(),f=o.rowIndex+1;d(formatCellReference(u,f));}else d(null);});}set propsInput(r){this.propsSignal.set(r);}getProps(){return this.propsSignal()}getWrapperRef(){return this.wrapperRef}getTableContainerRef(){return this.tableContainerRef}getColumnLetter(r){return indexToColumnLetter(r)}onResizeRowNumber(r){r.stopPropagation(),this.onResizeStart(r,{columnId:ROW_NUMBER_COLUMN_ID,name:"#"});}};e([Input({required:true,alias:"props"})],i.prototype,"propsInput",1),e([ViewChild("wrapperEl")],i.prototype,"wrapperRef",2),e([ViewChild("tableContainerElRef")],i.prototype,"tableContainerRef",2),i=e([Component({selector:"ogrid-datagrid-table",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,encapsulation:ViewEncapsulation.None,imports:[n,l,StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,s,g],providers:[DataGridStateService,ColumnReorderService,VirtualScrollService],template:`
347
+ `]})],g);var i=class extends BaseDataGridTableComponent{constructor(){super();this.propsSignal=signal(void 0);this.showColumnLetters=computed(()=>!!this.getProps()?.showColumnLetters);this.formulaReferences=computed(()=>this.getProps()?.formulaReferences);this.initBase(),effect(()=>{let d=this.getProps()?.onActiveCellChange;if(!d)return;let o=this.activeCell();if(o){let u=o.columnIndex-this.colOffset(),h=o.rowIndex+1;d(formatCellReference(u,h));}else d(null);});}set propsInput(r){this.propsSignal.set(r);}getProps(){return this.propsSignal()}getWrapperRef(){return this.wrapperRef}getTableContainerRef(){return this.tableContainerRef}getColumnLetter(r){return indexToColumnLetter(r)}onResizeRowNumber(r){r.stopPropagation(),this.onResizeStart(r,{columnId:ROW_NUMBER_COLUMN_ID,name:"#"});}};e([Input({required:true,alias:"props"})],i.prototype,"propsInput",1),e([ViewChild("wrapperEl")],i.prototype,"wrapperRef",2),e([ViewChild("tableContainerElRef")],i.prototype,"tableContainerRef",2),i=e([Component({selector:"ogrid-datagrid-table",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,encapsulation:ViewEncapsulation.None,imports:[n,l,StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,s,g],providers:[DataGridStateService,ColumnReorderService,VirtualScrollService],template:`
348
348
  <div class="ogrid-datagrid-root">
349
349
  <div
350
350
  #wrapperEl
@@ -362,6 +362,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
362
362
  (contextmenu)="$event.preventDefault()"
363
363
  [class.ogrid-datagrid-wrapper--overflow-x]="allowOverflowX()"
364
364
  [attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
365
+ data-ogrid-scroll-container
365
366
  >
366
367
  <div class="ogrid-datagrid-scroll-wrapper">
367
368
  <div [style.minWidth.px]="allowOverflowX() ? minTableWidth() : undefined" style="overflow-x: clip">
@@ -591,7 +592,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
591
592
  [style]="cellStyle ?? undefined"
592
593
  >
593
594
  @if (colLayout.col.type === 'boolean') {
594
- <input type="checkbox" [checked]="!!descriptor.displayValue" disabled style="margin:0;pointer-events:none" [attr.aria-label]="descriptor.displayValue ? 'True' : 'False'" />
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'" />
595
596
  } @else {
596
597
  {{ content }}
597
598
  }
@@ -1100,7 +1101,7 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
1100
1101
  .ogrid-pagination__info { text-align: center; font-size: 11px; }
1101
1102
  .ogrid-pagination__size { font-size: 11px; justify-content: center; }
1102
1103
  }
1103
- `]})],p);var h=class extends BaseOGridComponent{};h=e([Component({selector:"ogrid",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,imports:[OGridLayoutComponent,i,c,p],providers:[OGridService],styles:[":host { display: block; height: 100%; }"],template:`
1104
+ `]})],p);var f=class extends BaseOGridComponent{};f=e([Component({selector:"ogrid",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,imports:[OGridLayoutComponent,i,c,p],providers:[OGridService],styles:[":host { display: block; height: 100%; }"],template:`
1104
1105
  <ogrid-layout
1105
1106
  [className]="ogridService.className()"
1106
1107
  [sideBar]="ogridService.sideBarProps()"
@@ -1140,4 +1141,4 @@ import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITO
1140
1141
  />
1141
1142
  </ng-container>
1142
1143
  </ogrid-layout>
1143
- `})],h);export{c as ColumnChooserComponent,n as ColumnHeaderFilterComponent,l as ColumnHeaderMenuComponent,i as DataGridTableComponent,s as InlineCellEditorComponent,h as OGridComponent,p as PaginationControlsComponent,g as PopoverCellEditorComponent};
1144
+ `})],f);export{c as ColumnChooserComponent,n as ColumnHeaderFilterComponent,l as ColumnHeaderMenuComponent,i as DataGridTableComponent,s as InlineCellEditorComponent,f as OGridComponent,p as PaginationControlsComponent,g as PopoverCellEditorComponent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-material",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
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.3"
40
+ "@alaarab/ogrid-angular": "2.5.5"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/cdk": "^21.0.0",