@alaarab/ogrid-angular-primeng 2.0.23 → 2.1.1
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.
|
@@ -175,7 +175,7 @@ ColumnHeaderFilterComponent = __decorate([
|
|
|
175
175
|
<input
|
|
176
176
|
type="text"
|
|
177
177
|
[value]="peopleSearchText()"
|
|
178
|
-
(input)="onPeopleSearchInput($
|
|
178
|
+
(input)="onPeopleSearchInput($event)"
|
|
179
179
|
placeholder="Search people..."
|
|
180
180
|
style="width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;font-size:13px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
|
|
181
181
|
[attr.aria-label]="'Search people for ' + columnName"
|
|
@@ -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, Input, signal, computed, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, } from '@angular/core';
|
|
8
|
-
import { BaseDataGridTableComponent, DataGridStateService, StatusBarComponent, GridContextMenuComponent, MarchingAntsOverlayComponent, EmptyStateComponent, DEFAULT_MIN_COLUMN_WIDTH, OGRID_THEME_VARS_CSS, } from '@alaarab/ogrid-angular';
|
|
8
|
+
import { BaseDataGridTableComponent, DataGridStateService, ColumnReorderService, VirtualScrollService, StatusBarComponent, GridContextMenuComponent, MarchingAntsOverlayComponent, EmptyStateComponent, DEFAULT_MIN_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';
|
|
@@ -160,8 +160,8 @@ let DataGridTableComponent = class DataGridTableComponent extends BaseDataGridTa
|
|
|
160
160
|
onResizeStartPrimeng(e, col) {
|
|
161
161
|
e.preventDefault();
|
|
162
162
|
// Clear cell selection before resize so selection outlines don't persist during drag
|
|
163
|
-
this.state().interaction.setActiveCell(null);
|
|
164
|
-
this.state().interaction.setSelectionRange(null);
|
|
163
|
+
this.state().interaction.setActiveCell?.(null);
|
|
164
|
+
this.state().interaction.setSelectionRange?.(null);
|
|
165
165
|
this.getWrapperRef()?.nativeElement.focus({ preventScroll: true });
|
|
166
166
|
this.resizeStartX = e.clientX;
|
|
167
167
|
this.resizeColumnId = col.columnId;
|
|
@@ -385,7 +385,7 @@ DataGridTableComponent = __decorate([
|
|
|
385
385
|
],
|
|
386
386
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
387
387
|
encapsulation: ViewEncapsulation.None,
|
|
388
|
-
providers: [DataGridStateService],
|
|
388
|
+
providers: [DataGridStateService, ColumnReorderService, VirtualScrollService],
|
|
389
389
|
template: `
|
|
390
390
|
<div class="ogrid-root">
|
|
391
391
|
<div
|
|
@@ -662,13 +662,13 @@ DataGridTableComponent = __decorate([
|
|
|
662
662
|
[canUndoProp]="canUndo()"
|
|
663
663
|
[canRedoProp]="canRedo()"
|
|
664
664
|
[classNames]="contextMenuClasses"
|
|
665
|
-
(
|
|
666
|
-
(
|
|
667
|
-
(
|
|
668
|
-
(
|
|
665
|
+
(copyAction)="handleCopy()"
|
|
666
|
+
(cutAction)="handleCut()"
|
|
667
|
+
(pasteAction)="handlePaste()"
|
|
668
|
+
(selectAllAction)="handleSelectAllCells()"
|
|
669
669
|
(undoAction)="onUndo()"
|
|
670
670
|
(redoAction)="onRedo()"
|
|
671
|
-
(
|
|
671
|
+
(closeAction)="closeContextMenu()"
|
|
672
672
|
></ogrid-context-menu>
|
|
673
673
|
}
|
|
674
674
|
|
|
@@ -4,7 +4,7 @@ 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, inject, ChangeDetectionStrategy, Input, signal, effect } from '@angular/core';
|
|
7
|
+
import { Component, inject, ChangeDetectionStrategy, Input, signal, effect, computed } from '@angular/core';
|
|
8
8
|
import { OGridService, OGridLayoutComponent, } from '@alaarab/ogrid-angular';
|
|
9
9
|
import { DataGridTableComponent } from '../datagrid-table/datagrid-table.component';
|
|
10
10
|
import { ColumnChooserComponent } from '../column-chooser/column-chooser.component';
|
|
@@ -22,6 +22,13 @@ let OGridComponent = class OGridComponent {
|
|
|
22
22
|
this.onColumnPinnedFn = (columnId, pinned) => this.service.handleColumnPinned(columnId, pinned);
|
|
23
23
|
this.onSelectionChangeFn = (event) => this.service.handleSelectionChange(event);
|
|
24
24
|
this.onFilterChangeFn = (key, value) => this.service.handleFilterChange(key, value);
|
|
25
|
+
this.clearAllFiltersFn = () => this.service.setFilters({});
|
|
26
|
+
this.emptyStateComputed = computed(() => ({
|
|
27
|
+
hasActiveFilters: this.service.hasActiveFilters(),
|
|
28
|
+
onClearAll: this.clearAllFiltersFn,
|
|
29
|
+
message: this.service.emptyState()?.message,
|
|
30
|
+
render: this.service.emptyState()?.render,
|
|
31
|
+
}));
|
|
25
32
|
effect(() => {
|
|
26
33
|
const p = this.propsSignal();
|
|
27
34
|
if (p)
|
|
@@ -32,12 +39,7 @@ let OGridComponent = class OGridComponent {
|
|
|
32
39
|
return this.service.columnChooserPlacement() === 'toolbar' || this.service.toolbar() != null;
|
|
33
40
|
}
|
|
34
41
|
get emptyStateObj() {
|
|
35
|
-
return
|
|
36
|
-
hasActiveFilters: this.service.hasActiveFilters(),
|
|
37
|
-
onClearAll: () => this.service.setFilters({}),
|
|
38
|
-
message: this.service.emptyState()?.message,
|
|
39
|
-
render: this.service.emptyState()?.render,
|
|
40
|
-
};
|
|
42
|
+
return this.emptyStateComputed();
|
|
41
43
|
}
|
|
42
44
|
onPageSizeChange(size) {
|
|
43
45
|
this.service.setPageSize(size);
|
|
@@ -14,6 +14,13 @@ export declare class OGridComponent<T = unknown> {
|
|
|
14
14
|
readonly onFilterChangeFn: (key: string, value: unknown) => void;
|
|
15
15
|
constructor();
|
|
16
16
|
get showToolbar(): boolean;
|
|
17
|
+
private readonly clearAllFiltersFn;
|
|
18
|
+
readonly emptyStateComputed: import("@angular/core").Signal<{
|
|
19
|
+
hasActiveFilters: boolean;
|
|
20
|
+
onClearAll: () => void;
|
|
21
|
+
message: string | undefined;
|
|
22
|
+
render: unknown;
|
|
23
|
+
}>;
|
|
17
24
|
get emptyStateObj(): {
|
|
18
25
|
hasActiveFilters: boolean;
|
|
19
26
|
onClearAll: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-angular-primeng",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
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.
|
|
40
|
+
"@alaarab/ogrid-angular": "2.1.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@angular/core": "^21.0.0",
|
|
@@ -67,5 +67,12 @@
|
|
|
67
67
|
"sideEffects": false,
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"repository": {
|
|
72
|
+
"type": "git",
|
|
73
|
+
"url": "https://github.com/alaarab/ogrid.git",
|
|
74
|
+
"directory": "packages/angular-primeng"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://ogrid.dev",
|
|
77
|
+
"bugs": "https://github.com/alaarab/ogrid/issues"
|
|
71
78
|
}
|