@alaarab/ogrid-angular-material 2.0.22 → 2.1.0

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.
@@ -55,7 +55,7 @@ ColumnChooserComponent = __decorate([
55
55
  </div>
56
56
 
57
57
  <div class="ogrid-column-chooser__footer">
58
- <button class="ogrid-column-chooser__btn" (click)="clearAll()">Clear All</button>
58
+ <button class="ogrid-column-chooser__btn" (click)="onClearAll()">Clear All</button>
59
59
  <button class="ogrid-column-chooser__btn ogrid-column-chooser__btn--primary" (click)="selectAll()">Select All</button>
60
60
  </div>
61
61
  </div>
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, signal } from '@angular/core';
8
- import { BaseDataGridTableComponent, DataGridStateService, MarchingAntsOverlayComponent, StatusBarComponent, GridContextMenuComponent, EmptyStateComponent, CHECKBOX_COLUMN_WIDTH, ROW_NUMBER_COLUMN_WIDTH, OGRID_THEME_VARS_CSS, } from '@alaarab/ogrid-angular';
8
+ import { BaseDataGridTableComponent, DataGridStateService, ColumnReorderService, VirtualScrollService, MarchingAntsOverlayComponent, StatusBarComponent, GridContextMenuComponent, EmptyStateComponent, CHECKBOX_COLUMN_WIDTH, ROW_NUMBER_COLUMN_WIDTH, OGRID_THEME_VARS_CSS, } from '@alaarab/ogrid-angular';
9
9
  import { ColumnHeaderFilterComponent } from '../column-header-filter/column-header-filter.component';
10
10
  import { ColumnHeaderMenuComponent } from '../column-header-menu/column-header-menu.component';
11
11
  import { InlineCellEditorComponent } from './inline-cell-editor.component';
@@ -49,7 +49,7 @@ DataGridTableComponent = __decorate([
49
49
  changeDetection: ChangeDetectionStrategy.OnPush,
50
50
  encapsulation: ViewEncapsulation.None,
51
51
  imports: [ColumnHeaderFilterComponent, ColumnHeaderMenuComponent, StatusBarComponent, GridContextMenuComponent, MarchingAntsOverlayComponent, EmptyStateComponent, InlineCellEditorComponent, PopoverCellEditorComponent],
52
- providers: [DataGridStateService],
52
+ providers: [DataGridStateService, ColumnReorderService, VirtualScrollService],
53
53
  template: `
54
54
  <div class="ogrid-datagrid-root">
55
55
  <div
@@ -288,7 +288,7 @@ DataGridTableComponent = __decorate([
288
288
  </table>
289
289
 
290
290
  <ogrid-marching-ants-overlay
291
- [containerEl]="tableContainerEl"
291
+ [containerEl]="tableContainerEl()"
292
292
  [selectionRange]="state().interaction.selectionRange"
293
293
  [copyRange]="state().interaction.copyRange"
294
294
  [cutRange]="state().interaction.cutRange"
@@ -4,8 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { Component, ChangeDetectionStrategy, Input, signal, effect } from '@angular/core';
8
- import { OGridService, OGridLayoutComponent, } from '@alaarab/ogrid-angular';
7
+ import { Component, ChangeDetectionStrategy } from '@angular/core';
8
+ import { OGridService, OGridLayoutComponent, BaseOGridComponent, } from '@alaarab/ogrid-angular';
9
9
  import { DataGridTableComponent } from '../datagrid-table/datagrid-table.component';
10
10
  import { ColumnChooserComponent } from '../column-chooser/column-chooser.component';
11
11
  import { PaginationControlsComponent } from '../pagination-controls/pagination-controls.component';
@@ -16,30 +16,8 @@ import { PaginationControlsComponent } from '../pagination-controls/pagination-c
16
16
  * Uses @Input with signal setter for JIT compatibility (project builds with tsc, not ngc).
17
17
  * The effect() reactively configures the service when the input signal changes.
18
18
  */
19
- let OGridComponent = class OGridComponent {
20
- set props(value) {
21
- this.propsSignal.set(value);
22
- }
23
- constructor() {
24
- this.propsSignal = signal(undefined);
25
- this.ogridService = new OGridService();
26
- effect(() => {
27
- const p = this.propsSignal();
28
- if (p)
29
- this.ogridService.configure(p);
30
- });
31
- }
32
- get showToolbar() {
33
- return this.ogridService.columnChooserPlacement() === 'toolbar' || this.ogridService.toolbar() != null;
34
- }
35
- onPageSizeChange(size) {
36
- this.ogridService.pagination().setPageSize(size);
37
- this.ogridService.pagination().setPage(1);
38
- }
19
+ let OGridComponent = class OGridComponent extends BaseOGridComponent {
39
20
  };
40
- __decorate([
41
- Input({ required: true })
42
- ], OGridComponent.prototype, "props", null);
43
21
  OGridComponent = __decorate([
44
22
  Component({
45
23
  selector: 'ogrid',
@@ -1,5 +1,4 @@
1
- import { OGridService } from '@alaarab/ogrid-angular';
2
- import type { IOGridProps } from '@alaarab/ogrid-angular';
1
+ import { BaseOGridComponent } from '@alaarab/ogrid-angular';
3
2
  /**
4
3
  * Top-level OGrid component for Angular Material.
5
4
  * Standalone component — provides OGridService and renders OGridLayout with all sub-components.
@@ -7,11 +6,5 @@ import type { IOGridProps } from '@alaarab/ogrid-angular';
7
6
  * Uses @Input with signal setter for JIT compatibility (project builds with tsc, not ngc).
8
7
  * The effect() reactively configures the service when the input signal changes.
9
8
  */
10
- export declare class OGridComponent<T> {
11
- private readonly propsSignal;
12
- readonly ogridService: OGridService<T>;
13
- set props(value: IOGridProps<T>);
14
- constructor();
15
- get showToolbar(): boolean;
16
- onPageSizeChange(size: number): void;
9
+ export declare class OGridComponent<T> extends BaseOGridComponent<T> {
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-material",
3
- "version": "2.0.22",
3
+ "version": "2.1.0",
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.0.22"
40
+ "@alaarab/ogrid-angular": "2.1.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/cdk": "^21.0.0",
@@ -68,5 +68,12 @@
68
68
  "sideEffects": false,
69
69
  "publishConfig": {
70
70
  "access": "public"
71
- }
71
+ },
72
+ "repository": {
73
+ "type": "git",
74
+ "url": "https://github.com/alaarab/ogrid.git",
75
+ "directory": "packages/angular-material"
76
+ },
77
+ "homepage": "https://ogrid.dev",
78
+ "bugs": "https://github.com/alaarab/ogrid/issues"
72
79
  }