@sumaris-net/ngx-components 2.8.2-beta5 → 2.8.3-beta7
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/doc/changelog.md +3 -2
- package/esm2022/src/app/core/table/async-table.class.mjs +82 -74
- package/esm2022/src/app/core/table/table.class.mjs +15 -19
- package/fesm2022/sumaris-net.ngx-components.mjs +94 -90
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/async-table.class.d.ts +11 -9
- package/src/app/core/table/table.class.d.ts +2 -2
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { MatTable } from '@angular/material/table';
|
|
|
5
5
|
import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';
|
|
6
6
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
7
7
|
import { IEntity } from '../services/model/entity.model';
|
|
8
|
-
import { AlertController, ModalController, ToastController } from '@ionic/angular';
|
|
8
|
+
import { AlertController, ModalController, NavController, ToastController } from '@ionic/angular';
|
|
9
9
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
10
10
|
import { ColumnItem } from './table-select-columns.component';
|
|
11
11
|
import { Location } from '@angular/common';
|
|
@@ -36,6 +36,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
36
36
|
protected allowRowDetail: boolean;
|
|
37
37
|
protected route: ActivatedRoute;
|
|
38
38
|
protected router: Router;
|
|
39
|
+
protected navController: NavController;
|
|
39
40
|
protected location: Location;
|
|
40
41
|
protected settings: LocalSettingsService;
|
|
41
42
|
protected translate: TranslateService;
|
|
@@ -260,11 +261,12 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
260
261
|
}): Promise<number>;
|
|
261
262
|
selectRowById(id: number): Promise<boolean>;
|
|
262
263
|
/**
|
|
263
|
-
* Try to select row by data. Will use
|
|
264
|
+
* Try to select row by data. Will use equals() to find same row's data
|
|
264
265
|
*
|
|
265
266
|
* @param data
|
|
266
267
|
*/
|
|
267
268
|
selectRowByData(data: T): Promise<boolean>;
|
|
269
|
+
toggleSelectRow(event: Event, row: AsyncTableElement<T>): void;
|
|
268
270
|
clickRow(event: Event | undefined, row: AsyncTableElement<T>): Promise<boolean>;
|
|
269
271
|
moveRow(id: number, direction: number): Promise<void>;
|
|
270
272
|
ready(opts?: WaitForOptions): Promise<void>;
|
|
@@ -347,7 +349,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
347
349
|
emitEvent?: boolean;
|
|
348
350
|
}): void;
|
|
349
351
|
/**
|
|
350
|
-
* Compare data equality (default by id)
|
|
352
|
+
* Compare data equality (default by id, using EntityUtils.equals())
|
|
351
353
|
* Can be overridden to add additional properties to compare
|
|
352
354
|
*
|
|
353
355
|
* @param d1
|
|
@@ -362,6 +364,12 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
362
364
|
protected getPageSettings<T = any>(propertyName?: string): T;
|
|
363
365
|
protected savePageSettings(value: any, propertyName?: string): Promise<void>;
|
|
364
366
|
protected emitRefresh(value?: any): void;
|
|
367
|
+
/**
|
|
368
|
+
* Initialize the permanent selection model
|
|
369
|
+
*
|
|
370
|
+
* @protected
|
|
371
|
+
*/
|
|
372
|
+
protected initPermanentSelection(): void;
|
|
365
373
|
private listenSortAndPaginationEvents;
|
|
366
374
|
private editRowById;
|
|
367
375
|
private setLoading;
|
|
@@ -374,12 +382,6 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
374
382
|
private listenDatasourceLoading;
|
|
375
383
|
private startCellValueChanges;
|
|
376
384
|
private stopCellValueChanges;
|
|
377
|
-
/**
|
|
378
|
-
* Initialize the permanent selection model
|
|
379
|
-
*
|
|
380
|
-
* @protected
|
|
381
|
-
*/
|
|
382
|
-
private initPermanentSelection;
|
|
383
385
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppAsyncTable<any, any, any>, never>;
|
|
384
386
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AppAsyncTable<any, any, any>, never, never, { "settingsId": { "alias": "settingsId"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "i18nColumnPrefix": { "alias": "i18nColumnPrefix"; "required": false; }; "i18nColumnSuffix": { "alias": "i18nColumnSuffix"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "inlineEdition": { "alias": "inlineEdition"; "required": false; }; "focusFirstColumn": { "alias": "focusFirstColumn"; "required": false; }; "confirmBeforeDelete": { "alias": "confirmBeforeDelete"; "required": false; }; "confirmBeforeCancel": { "alias": "confirmBeforeCancel"; "required": false; }; "undoableDeletion": { "alias": "undoableDeletion"; "required": false; }; "saveBeforeDelete": { "alias": "saveBeforeDelete"; "required": false; }; "keepEditedRowOnSave": { "alias": "keepEditedRowOnSave"; "required": false; }; "saveBeforeSort": { "alias": "saveBeforeSort"; "required": false; }; "saveBeforeFilter": { "alias": "saveBeforeFilter"; "required": false; }; "propagateRowError": { "alias": "propagateRowError"; "required": false; }; "permanentSelectionAllowed": { "alias": "permanentSelectionAllowed"; "required": false; }; "defaultSortBy": { "alias": "defaultSortBy"; "required": false; }; "defaultSortDirection": { "alias": "defaultSortDirection"; "required": false; }; "defaultPageSize": { "alias": "defaultPageSize"; "required": false; }; "defaultPageSizeOptions": { "alias": "defaultPageSizeOptions"; "required": false; }; "focusColumn": { "alias": "focusColumn"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; }, { "onRefresh": "onRefresh"; "onOpenRow": "onOpenRow"; "onNewRow": "onNewRow"; "onStartEditingRow": "onStartEditingRow"; "onConfirmEditCreateRow": "onConfirmEditCreateRow"; "onCancelOrDeleteRow": "onCancelOrDeleteRow"; "onBeforeDeleteRows": "onBeforeDeleteRows"; "onBeforeCancelRows": "onBeforeCancelRows"; "onBeforeSave": "onBeforeSave"; "onAfterDeletedRows": "onAfterDeletedRows"; "onSort": "onSort"; "onDirty": "onDirty"; "onError": "onError"; }, never, never, false, never>;
|
|
385
387
|
}
|
|
@@ -276,7 +276,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
276
276
|
moveRow(id: number, direction: number): void;
|
|
277
277
|
ready(opts?: WaitForOptions): Promise<void>;
|
|
278
278
|
waitIdle(opts?: WaitForOptions): Promise<void>;
|
|
279
|
-
openSelectColumnsModal(
|
|
279
|
+
openSelectColumnsModal(event?: Event): Promise<any>;
|
|
280
280
|
trackByFn(index: number, row: TableElement<T>): number;
|
|
281
281
|
doRefresh(event?: CompletableEvent): void;
|
|
282
282
|
getCurrentColumns(): ColumnItem[];
|
|
@@ -306,7 +306,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
306
306
|
protected saveBeforeAction(saveAction: SaveActionType): Promise<boolean>;
|
|
307
307
|
/**
|
|
308
308
|
* Open a row detail view. By default, will to open row detail page.
|
|
309
|
-
* Can be
|
|
309
|
+
* Can be overridden by subclasses, BUT prefer to subscribe on onOpenRow
|
|
310
310
|
*
|
|
311
311
|
* @param id
|
|
312
312
|
* @param row
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "2.8.
|
|
5
|
+
"version": "2.8.3-beta7",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|