@sumaris-net/ngx-components 2.4.47 → 2.4.49
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 -0
- package/esm2020/src/app/core/table/async-table.class.mjs +7 -3
- package/esm2020/src/app/core/table/table.class.mjs +13 -5
- package/esm2020/src/app/shared/functions.mjs +3 -8
- package/esm2020/src/app/shared/pipes/highlight.pipe.mjs +3 -3
- package/esm2020/src/app/social/job/job.module.mjs +5 -3
- package/esm2020/src/app/social/user-event/testing/user-event.testing.mjs +1 -3
- package/esm2020/src/environments/environment.mjs +7 -2
- package/fesm2015/sumaris-net.ngx-components.mjs +36 -19
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +34 -21
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/functions.d.ts +2 -6
- package/src/app/social/job/job.module.d.ts +1 -1
|
@@ -613,15 +613,10 @@ class Beans {
|
|
|
613
613
|
}) === -1;
|
|
614
614
|
}
|
|
615
615
|
static collectById(array) {
|
|
616
|
-
return
|
|
617
|
-
}
|
|
618
|
-
static collectByProperty(array, propertyName) {
|
|
619
|
-
return (array || []).reduce((res, item) => {
|
|
620
|
-
res['' + propertyName] = item;
|
|
621
|
-
return res;
|
|
622
|
-
}, {});
|
|
616
|
+
return collectByProperty(array, 'id');
|
|
623
617
|
}
|
|
624
618
|
}
|
|
619
|
+
Beans.collectByProperty = collectByProperty;
|
|
625
620
|
function findParentWithClass(elem, className) {
|
|
626
621
|
if (!className)
|
|
627
622
|
return undefined;
|
|
@@ -1569,8 +1564,8 @@ class HighlightPipe {
|
|
|
1569
1564
|
const cleanedSearchText = removeDiacritics(searchRegexp).toUpperCase();
|
|
1570
1565
|
const index = removeDiacritics(value.toUpperCase()).indexOf(cleanedSearchText);
|
|
1571
1566
|
if (index !== -1) {
|
|
1572
|
-
return value.substring(0, index
|
|
1573
|
-
'<b>' + value.substring(index, cleanedSearchText.length) + '</b>' +
|
|
1567
|
+
return value.substring(0, index) +
|
|
1568
|
+
'<b>' + value.substring(index, index + cleanedSearchText.length) + '</b>' +
|
|
1574
1569
|
value.substring(index + cleanedSearchText.length);
|
|
1575
1570
|
}
|
|
1576
1571
|
return value;
|
|
@@ -2714,7 +2709,7 @@ function unwrapESModule(commonJSModule) {
|
|
|
2714
2709
|
}
|
|
2715
2710
|
|
|
2716
2711
|
// // Workaround for issue https://github.com/ng-packagr/ng-packagr/issues/2215
|
|
2717
|
-
const moment
|
|
2712
|
+
const moment = unwrapESModule(momentImported);
|
|
2718
2713
|
const momentTZ = unwrapESModule(momentTZImported);
|
|
2719
2714
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2720
2715
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2786,7 +2781,7 @@ class DateUtils {
|
|
|
2786
2781
|
return momentDate.day() === weekday;
|
|
2787
2782
|
}
|
|
2788
2783
|
}
|
|
2789
|
-
DateUtils.moment = moment
|
|
2784
|
+
DateUtils.moment = moment;
|
|
2790
2785
|
DateUtils.momentTZ = momentTZ;
|
|
2791
2786
|
DateUtils.toDateISOString = toDateISOString;
|
|
2792
2787
|
DateUtils.fromDateISOString = fromDateISOString;
|
|
@@ -11468,6 +11463,10 @@ const environment = Object.freeze({
|
|
|
11468
11463
|
// TODO: make this works
|
|
11469
11464
|
//offline: true,
|
|
11470
11465
|
peerMinVersion: '1.8.0',
|
|
11466
|
+
defaultPeer: {
|
|
11467
|
+
host: '192.168.0.45',
|
|
11468
|
+
port: 8080
|
|
11469
|
+
},
|
|
11471
11470
|
defaultPeers: [
|
|
11472
11471
|
{
|
|
11473
11472
|
host: 'localhost',
|
|
@@ -11518,7 +11517,8 @@ const environment = Object.freeze({
|
|
|
11518
11517
|
// Basic auth (using Person.username)
|
|
11519
11518
|
// username: 'admq2', password: 'q22006'
|
|
11520
11519
|
// Token auth (using Person.pubkey)
|
|
11521
|
-
username: 'admin@sumaris.net', password: 'admin',
|
|
11520
|
+
//username: 'admin@sumaris.net', password: 'admin',
|
|
11521
|
+
username: 'benoit.lavenier@e-is.pro', password: 'priezPourMoi!',
|
|
11522
11522
|
},
|
|
11523
11523
|
account: {
|
|
11524
11524
|
enableListenChanges: true,
|
|
@@ -26445,7 +26445,7 @@ class AppTable {
|
|
|
26445
26445
|
if (row.id === -1) {
|
|
26446
26446
|
this.deleteNewRow(event, row);
|
|
26447
26447
|
}
|
|
26448
|
-
// Delete existing (
|
|
26448
|
+
// Delete existing (but not editing) row
|
|
26449
26449
|
else if (!row.editing) {
|
|
26450
26450
|
this.deleteExistingRow(event, row, opts);
|
|
26451
26451
|
}
|
|
@@ -26573,8 +26573,11 @@ class AppTable {
|
|
|
26573
26573
|
rows.forEach(row => this.selection.select(row));
|
|
26574
26574
|
}
|
|
26575
26575
|
}
|
|
26576
|
-
deleteSelection(event, opts) {
|
|
26577
|
-
|
|
26576
|
+
async deleteSelection(event, opts) {
|
|
26577
|
+
const deleteCount = await this.deleteRows(event, this.selection.selected, opts);
|
|
26578
|
+
if (deleteCount > 0)
|
|
26579
|
+
this.selection.clear();
|
|
26580
|
+
return deleteCount;
|
|
26578
26581
|
}
|
|
26579
26582
|
/**
|
|
26580
26583
|
*
|
|
@@ -26584,7 +26587,11 @@ class AppTable {
|
|
|
26584
26587
|
* And to force deletion even if table is busy
|
|
26585
26588
|
*/
|
|
26586
26589
|
async deleteRow(event, row, opts) {
|
|
26590
|
+
const isSelected = this.selection.isSelected(row);
|
|
26587
26591
|
const deleteCount = await this.deleteRows(event, [row], opts);
|
|
26592
|
+
// Unselect the deleted row
|
|
26593
|
+
if (deleteCount && isSelected)
|
|
26594
|
+
this.selection.deselect(row);
|
|
26588
26595
|
return deleteCount === 1;
|
|
26589
26596
|
}
|
|
26590
26597
|
/**
|
|
@@ -26601,6 +26608,7 @@ class AppTable {
|
|
|
26601
26608
|
if (event?.defaultPrevented)
|
|
26602
26609
|
return 0; // SKip
|
|
26603
26610
|
event?.preventDefault();
|
|
26611
|
+
this.resetError();
|
|
26604
26612
|
if (!this._enabled || isEmptyArray(rows))
|
|
26605
26613
|
return 0; // Skip is disabled, or no rows to delete
|
|
26606
26614
|
if (this.loading && (!opts || opts.interactive !== false)) {
|
|
@@ -27309,8 +27317,8 @@ class AppTable {
|
|
|
27309
27317
|
this.selection.clear();
|
|
27310
27318
|
this.editedRow = undefined; // unselect row
|
|
27311
27319
|
this._dataSource.cancelOrDelete(row);
|
|
27312
|
-
this.onCancelOrDeleteRow.next(row);
|
|
27313
27320
|
this.resetError();
|
|
27321
|
+
this.onCancelOrDeleteRow.next(row);
|
|
27314
27322
|
this.totalRowCount--;
|
|
27315
27323
|
this.visibleRowCount--;
|
|
27316
27324
|
}
|
|
@@ -30271,8 +30279,11 @@ class AppAsyncTable {
|
|
|
30271
30279
|
rows.forEach(row => this.selection.select(row));
|
|
30272
30280
|
}
|
|
30273
30281
|
}
|
|
30274
|
-
deleteSelection(event, opts) {
|
|
30275
|
-
|
|
30282
|
+
async deleteSelection(event, opts) {
|
|
30283
|
+
const deleteCount = await this.deleteRows(event, this.selection.selected, opts);
|
|
30284
|
+
if (deleteCount > 0)
|
|
30285
|
+
this.selection.clear();
|
|
30286
|
+
return deleteCount;
|
|
30276
30287
|
}
|
|
30277
30288
|
/**
|
|
30278
30289
|
*
|
|
@@ -30299,6 +30310,7 @@ class AppAsyncTable {
|
|
|
30299
30310
|
if (event?.defaultPrevented)
|
|
30300
30311
|
return 0; // SKip
|
|
30301
30312
|
event?.preventDefault();
|
|
30313
|
+
this.resetError();
|
|
30302
30314
|
if (!this._enabled || isEmptyArray(rows))
|
|
30303
30315
|
return 0; // Skip is disabled, or no rows to delete
|
|
30304
30316
|
if (this.loading && (!opts || opts.interactive !== false)) {
|
|
@@ -32637,7 +32649,8 @@ class JobModule {
|
|
|
32637
32649
|
JobModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: JobModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32638
32650
|
JobModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: JobModule, declarations: [JobProgressionIcon,
|
|
32639
32651
|
JobProgressionList], imports: [CommonModule,
|
|
32640
|
-
SharedModule, i1$2.TranslateModule], exports: [JobProgressionIcon
|
|
32652
|
+
SharedModule, i1$2.TranslateModule], exports: [JobProgressionIcon,
|
|
32653
|
+
JobProgressionList] });
|
|
32641
32654
|
JobModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: JobModule, imports: [CommonModule,
|
|
32642
32655
|
SharedModule,
|
|
32643
32656
|
TranslateModule.forChild()] });
|
|
@@ -32654,7 +32667,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
32654
32667
|
JobProgressionList
|
|
32655
32668
|
],
|
|
32656
32669
|
exports: [
|
|
32657
|
-
JobProgressionIcon
|
|
32670
|
+
JobProgressionIcon,
|
|
32671
|
+
JobProgressionList
|
|
32658
32672
|
]
|
|
32659
32673
|
}]
|
|
32660
32674
|
}] });
|
|
@@ -35587,7 +35601,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
35587
35601
|
args: [ENVIRONMENT]
|
|
35588
35602
|
}] }]; } });
|
|
35589
35603
|
|
|
35590
|
-
const moment = momentImported;
|
|
35591
35604
|
class UserEventTestingPage {
|
|
35592
35605
|
constructor(userEventService, router, alertController, translateService) {
|
|
35593
35606
|
this.userEventService = userEventService;
|