@sumaris-net/ngx-components 2.8.11 → 2.8.13
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 +6 -0
- package/esm2022/src/app/core/services/model/person.model.mjs +1 -1
- package/esm2022/src/app/core/services/model/referential.model.mjs +5 -5
- package/esm2022/src/app/core/services/pipes/person-to-string.pipe.mjs +1 -1
- package/esm2022/src/app/core/services/pipes/referential-to-string.pipe.mjs +4 -4
- package/esm2022/src/app/core/table/async-table.class.mjs +6 -13
- package/fesm2022/sumaris-net.ngx-components.mjs +12 -19
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/person.model.d.ts +4 -11
- package/src/app/core/services/model/referential.model.d.ts +2 -2
- package/src/app/core/services/pipes/person-to-string.pipe.d.ts +2 -2
- package/src/app/core/services/pipes/referential-to-string.pipe.d.ts +1 -0
- package/src/app/core/table/async-table.class.d.ts +2 -3
- package/src/assets/manifest.json +1 -1
|
@@ -16976,11 +16976,11 @@ const StatusIds = {
|
|
|
16976
16976
|
};
|
|
16977
16977
|
|
|
16978
16978
|
var ReferentialRef_1;
|
|
16979
|
-
function referentialToString(obj, properties) {
|
|
16980
|
-
return (obj && isNotNil(obj.id) && joinPropertiesPath(obj, properties || ['label', 'name'])) || undefined;
|
|
16979
|
+
function referentialToString(obj, properties, separator) {
|
|
16980
|
+
return (obj && isNotNil(obj.id) && joinPropertiesPath(obj, properties || ['label', 'name'], separator)) || undefined;
|
|
16981
16981
|
}
|
|
16982
|
-
function referentialsToString(values, properties,
|
|
16983
|
-
return (values || []).map((v) => referentialToString(v, properties)).join(
|
|
16982
|
+
function referentialsToString(values, properties, valueSeparator, propertySeparator) {
|
|
16983
|
+
return (values || []).map((v) => referentialToString(v, properties, propertySeparator)).join(valueSeparator || ', ');
|
|
16984
16984
|
}
|
|
16985
16985
|
const StatusList = Object.freeze([
|
|
16986
16986
|
{
|
|
@@ -32019,9 +32019,6 @@ class AppAsyncTable {
|
|
|
32019
32019
|
get dataSource() {
|
|
32020
32020
|
return this._dataSource;
|
|
32021
32021
|
}
|
|
32022
|
-
set filter(value) {
|
|
32023
|
-
this.setFilter(value);
|
|
32024
|
-
}
|
|
32025
32022
|
get filter() {
|
|
32026
32023
|
return this._filter;
|
|
32027
32024
|
}
|
|
@@ -32397,7 +32394,7 @@ class AppAsyncTable {
|
|
|
32397
32394
|
removeColumnDef(column) {
|
|
32398
32395
|
this.table.removeColumnDef(column);
|
|
32399
32396
|
}
|
|
32400
|
-
setFilter(filter, opts) {
|
|
32397
|
+
async setFilter(filter, opts) {
|
|
32401
32398
|
opts = opts || { emitEvent: true };
|
|
32402
32399
|
// Prevent permanent selection change events
|
|
32403
32400
|
this.permanentSelectionChangedPrevented = toBoolean(opts.permanentSelectionChangedPrevented, this.permanentSelectionChangedPrevented);
|
|
@@ -32405,12 +32402,10 @@ class AppAsyncTable {
|
|
|
32405
32402
|
// if a dirty table is to be saved before filter
|
|
32406
32403
|
if (this.dirty) {
|
|
32407
32404
|
// Save
|
|
32408
|
-
this.saveBeforeAction('filter')
|
|
32405
|
+
if (await this.saveBeforeAction('filter')) {
|
|
32409
32406
|
// Apply filter only if user didn't cancel the save or the save is ok
|
|
32410
|
-
|
|
32411
|
-
|
|
32412
|
-
}
|
|
32413
|
-
});
|
|
32407
|
+
this.applyFilter(filter, opts);
|
|
32408
|
+
}
|
|
32414
32409
|
}
|
|
32415
32410
|
else {
|
|
32416
32411
|
// apply filter on non-dirty table
|
|
@@ -33563,7 +33558,7 @@ class AppAsyncTable {
|
|
|
33563
33558
|
}
|
|
33564
33559
|
}
|
|
33565
33560
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AppAsyncTable, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
33566
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: AppAsyncTable, inputs: { settingsId: "settingsId", debug: "debug", i18nColumnPrefix: "i18nColumnPrefix", i18nColumnSuffix: "i18nColumnSuffix", autoLoad: "autoLoad", readOnly: "readOnly", inlineEdition: "inlineEdition", focusFirstColumn: "focusFirstColumn", confirmBeforeDelete: "confirmBeforeDelete", confirmBeforeCancel: "confirmBeforeCancel", undoableDeletion: "undoableDeletion", saveBeforeDelete: "saveBeforeDelete", keepEditedRowOnSave: "keepEditedRowOnSave", saveBeforeSort: "saveBeforeSort", saveBeforeFilter: "saveBeforeFilter", propagateRowError: "propagateRowError", permanentSelectionAllowed: "permanentSelectionAllowed", defaultSortBy: "defaultSortBy", defaultSortDirection: "defaultSortDirection", defaultPageSize: "defaultPageSize", defaultPageSizeOptions: "defaultPageSizeOptions", focusColumn: "focusColumn", dataSource: "dataSource",
|
|
33561
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.4", type: AppAsyncTable, inputs: { settingsId: "settingsId", debug: "debug", i18nColumnPrefix: "i18nColumnPrefix", i18nColumnSuffix: "i18nColumnSuffix", autoLoad: "autoLoad", readOnly: "readOnly", inlineEdition: "inlineEdition", focusFirstColumn: "focusFirstColumn", confirmBeforeDelete: "confirmBeforeDelete", confirmBeforeCancel: "confirmBeforeCancel", undoableDeletion: "undoableDeletion", saveBeforeDelete: "saveBeforeDelete", keepEditedRowOnSave: "keepEditedRowOnSave", saveBeforeSort: "saveBeforeSort", saveBeforeFilter: "saveBeforeFilter", propagateRowError: "propagateRowError", permanentSelectionAllowed: "permanentSelectionAllowed", defaultSortBy: "defaultSortBy", defaultSortDirection: "defaultSortDirection", defaultPageSize: "defaultPageSize", defaultPageSizeOptions: "defaultPageSizeOptions", focusColumn: "focusColumn", dataSource: "dataSource", disabled: "disabled", paginator: "paginator" }, outputs: { 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" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "childPaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0 });
|
|
33567
33562
|
}
|
|
33568
33563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: AppAsyncTable, decorators: [{
|
|
33569
33564
|
type: Directive
|
|
@@ -33613,8 +33608,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
33613
33608
|
type: Input
|
|
33614
33609
|
}], dataSource: [{
|
|
33615
33610
|
type: Input
|
|
33616
|
-
}], filter: [{
|
|
33617
|
-
type: Input
|
|
33618
33611
|
}], onRefresh: [{
|
|
33619
33612
|
type: Output
|
|
33620
33613
|
}], onOpenRow: [{
|
|
@@ -35505,10 +35498,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
35505
35498
|
class ReferentialToStringPipe {
|
|
35506
35499
|
constructor() { }
|
|
35507
35500
|
transform(value, opts) {
|
|
35508
|
-
const properties = Array.isArray(opts) ? opts : opts
|
|
35501
|
+
const properties = Array.isArray(opts) ? opts : opts?.properties;
|
|
35509
35502
|
if (Array.isArray(value))
|
|
35510
|
-
return referentialsToString(value, properties, opts
|
|
35511
|
-
return referentialToString(value, properties);
|
|
35503
|
+
return referentialsToString(value, properties, opts?.['separator'], opts?.['propertySeparator']);
|
|
35504
|
+
return referentialToString(value, properties, opts?.['propertySeparator']);
|
|
35512
35505
|
}
|
|
35513
35506
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: ReferentialToStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
35514
35507
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.4", ngImport: i0, type: ReferentialToStringPipe, name: "referentialToString" });
|