@cauca-911/datagrid 20.0.16 → 20.2.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.
- package/fesm2022/cauca-911-datagrid.mjs +92 -87
- package/fesm2022/cauca-911-datagrid.mjs.map +1 -1
- package/index.d.ts +14 -13
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, OnInit, EventEmitter, AfterContentInit, OnChanges, QueryList, SimpleChanges, TemplateRef, ModelSignal, InputSignal, Provider, EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { OnDestroy, OnInit, EventEmitter, AfterContentInit, OnChanges, QueryList, SimpleChanges, TemplateRef, ModelSignal, InputSignal, Type, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { MatTable, MatColumnDef, MatCellDef, MatHeaderCellDef, MatFooterCellDef, MatHeaderRowDef, MatFooterRowDef, MatRowDef, MatNoDataRow, MatTableDataSource } from '@angular/material/table';
|
|
4
4
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
5
5
|
import { MatPaginator } from '@angular/material/paginator';
|
|
@@ -8,7 +8,6 @@ import { Subject, BehaviorSubject, Observable } from 'rxjs';
|
|
|
8
8
|
import { MatSort } from '@angular/material/sort';
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
10
|
import { ODataDataSource, ODataFilter } from 'odata-data-source';
|
|
11
|
-
import { TranslateService as TranslateService$1 } from '@cauca-911/core';
|
|
12
11
|
import { HttpClient } from '@angular/common/http';
|
|
13
12
|
|
|
14
13
|
declare class DataGridRowDropEvent {
|
|
@@ -80,22 +79,18 @@ declare class GridConfiguration {
|
|
|
80
79
|
visibleColumns: string[];
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
interface BasePreferenceService {
|
|
84
83
|
preference: BehaviorSubject<Preference>;
|
|
85
84
|
gridConfiguration: GridConfiguration[];
|
|
86
|
-
constructor();
|
|
87
85
|
getPreference(): Preference;
|
|
88
86
|
setPreferenceDensity(density: Density): void;
|
|
89
87
|
addOrUpdatePreference(): void;
|
|
90
88
|
getPreferenceForGrid(gridName: string): Observable<GridConfiguration>;
|
|
91
89
|
addOrUpdateGridPreference(gridName: string, visibleColumns: string[]): Observable<void>;
|
|
92
|
-
private getPreferenceForGridNotObservable;
|
|
93
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PreferenceService, never>;
|
|
94
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PreferenceService>;
|
|
95
90
|
}
|
|
96
91
|
|
|
97
92
|
declare abstract class BaseDataGridComponent implements AfterContentInit, OnChanges {
|
|
98
|
-
private
|
|
93
|
+
private preferenceService;
|
|
99
94
|
resourceName: string;
|
|
100
95
|
displayedColumns: string[];
|
|
101
96
|
showAddButton: boolean;
|
|
@@ -122,7 +117,7 @@ declare abstract class BaseDataGridComponent implements AfterContentInit, OnChan
|
|
|
122
117
|
preference: Preference;
|
|
123
118
|
protected sort: MatSort;
|
|
124
119
|
get density(): typeof Density;
|
|
125
|
-
constructor(translateService: TranslateService, preferenceService:
|
|
120
|
+
constructor(translateService: TranslateService, preferenceService: BasePreferenceService);
|
|
126
121
|
ngAfterContentInit(): void;
|
|
127
122
|
ngOnChanges(changes: SimpleChanges): void;
|
|
128
123
|
onExpand(element: any): void;
|
|
@@ -162,7 +157,7 @@ declare class DataGridComponent extends BaseDataGridComponent implements OnChang
|
|
|
162
157
|
dataSource: MatTableDataSource<unknown[]>;
|
|
163
158
|
dragDisabled: boolean;
|
|
164
159
|
currentFilter: string;
|
|
165
|
-
constructor(translateService: TranslateService
|
|
160
|
+
constructor(translateService: TranslateService);
|
|
166
161
|
onRefreshData(): void;
|
|
167
162
|
applyFilter(filter: string): void;
|
|
168
163
|
setUpSort(sort: MatSort): void;
|
|
@@ -242,7 +237,7 @@ declare class OdataGridComponent extends BaseDataGridComponent implements OnChan
|
|
|
242
237
|
rowDetailTemplate: TemplateRef<any>;
|
|
243
238
|
paginator: MatPaginator;
|
|
244
239
|
private readonly baseUrl;
|
|
245
|
-
constructor(translateService: TranslateService
|
|
240
|
+
constructor(translateService: TranslateService, listing: OdataListingService);
|
|
246
241
|
ngOnDestroy(): void;
|
|
247
242
|
refreshData(): void;
|
|
248
243
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -394,6 +389,12 @@ declare class TranslationGridColumnComponent extends BaseGridColumnComponent imp
|
|
|
394
389
|
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationGridColumnComponent, "cauca-translation-grid-column", never, { "prefix": { "alias": "prefix"; "required": false; }; }, {}, never, never, true, never>;
|
|
395
390
|
}
|
|
396
391
|
|
|
397
|
-
|
|
392
|
+
interface CaucaGridOptions {
|
|
393
|
+
/** If not provided, a default implementation will be used which will use localStorage to store the grid preferences. */
|
|
394
|
+
gridPreferenceService?: Type<BasePreferenceService>;
|
|
395
|
+
}
|
|
396
|
+
declare const PREFERENCE_SERVICE_TOKEN: InjectionToken<BasePreferenceService>;
|
|
397
|
+
declare function provideCaucaGrid(options?: CaucaGridOptions): (Provider | EnvironmentProviders);
|
|
398
398
|
|
|
399
|
-
export { BaseGridColumnComponent, ColorDataGridColumnComponent, DataGridCheckColumnComponent, DataGridColumnComponent, DataGridCommandIconColumnComponent, DataGridCommandsColumnComponent, DataGridComponent, DataGridIconColumnComponent, DataGridMenuColumnComponent, DateGridColumnComponent, OdataGridComponent, SortableDataGridCheckColumnComponent, SortableDataGridColumnComponent, TranslationGridColumnComponent, provideCaucaGrid };
|
|
399
|
+
export { BaseGridColumnComponent, ColorDataGridColumnComponent, DataGridCheckColumnComponent, DataGridColumnComponent, DataGridCommandIconColumnComponent, DataGridCommandsColumnComponent, DataGridComponent, DataGridIconColumnComponent, DataGridMenuColumnComponent, DateGridColumnComponent, OdataGridComponent, PREFERENCE_SERVICE_TOKEN, SortableDataGridCheckColumnComponent, SortableDataGridColumnComponent, TranslationGridColumnComponent, provideCaucaGrid };
|
|
400
|
+
export type { CaucaGridOptions };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cauca-911/datagrid",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.2.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": ">=20.1
|
|
6
|
-
"@angular/core": ">=20.1
|
|
7
|
-
"@angular/material": ">=20.
|
|
8
|
-
"@cauca-911/material": ">=20.0
|
|
5
|
+
"@angular/common": ">=20.2.1",
|
|
6
|
+
"@angular/core": ">=20.2.1",
|
|
7
|
+
"@angular/material": ">=20.2.0",
|
|
8
|
+
"@cauca-911/material": ">=20.2.0",
|
|
9
9
|
"odata-data-source": ">=16.4.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|