@sumaris-net/ngx-components 1.20.34 → 1.20.37
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/bundles/sumaris-net.ngx-components.umd.js +39 -20
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/account/account.js +2 -2
- package/esm2015/src/app/core/auth/form/form-auth.js +4 -2
- package/esm2015/src/app/core/form/editor.class.js +7 -1
- package/esm2015/src/app/core/form/entity-editor-modal.class.js +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +1 -1
- package/esm2015/src/app/core/form/form.class.js +4 -2
- package/esm2015/src/app/core/services/local-settings.service.js +2 -2
- package/esm2015/src/app/core/table/table.class.js +7 -7
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +5 -5
- package/esm2015/src/app/shared/observables.js +4 -5
- package/fesm2015/sumaris-net.ngx-components.js +27 -18
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/auth/form/form-auth.d.ts +1 -1
- package/src/app/core/form/editor.class.d.ts +14 -1
- package/src/app/core/form/entity-editor.class.d.ts +6 -2
- package/src/app/core/form/form.class.d.ts +1 -1
- package/src/app/core/table/table.class.d.ts +6 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -821,12 +821,11 @@ function waitFor(predicate, opts) {
|
|
|
821
821
|
}
|
|
822
822
|
function waitForTrue(observable, opts) {
|
|
823
823
|
return __awaiter(this, void 0, void 0, function* () {
|
|
824
|
-
const firstTrueObservable = firstTrue(observable);
|
|
825
824
|
// Timeout (+ dueTime)
|
|
826
825
|
if (opts && opts.timeout > 0) {
|
|
827
826
|
const $timeout = timer(opts.timeout);
|
|
828
827
|
return merge(timer(opts.dueTime || 0)
|
|
829
|
-
.pipe(switchMap(() =>
|
|
828
|
+
.pipe(switchMap(() => firstTrue(observable)), takeUntil($timeout)), $timeout
|
|
830
829
|
.pipe(map(() => {
|
|
831
830
|
throw new Error(`Timeout ready() - after ${opts.timeout}ms`);
|
|
832
831
|
})))
|
|
@@ -835,10 +834,10 @@ function waitForTrue(observable, opts) {
|
|
|
835
834
|
// dueTime (without timeout)
|
|
836
835
|
if (opts && opts.dueTime > 0) {
|
|
837
836
|
return timer(opts.dueTime)
|
|
838
|
-
.pipe(switchMap(() =>
|
|
837
|
+
.pipe(switchMap(() => firstTrue(observable)))
|
|
839
838
|
.toPromise();
|
|
840
839
|
}
|
|
841
|
-
return
|
|
840
|
+
return firstTrue(observable).toPromise();
|
|
842
841
|
});
|
|
843
842
|
}
|
|
844
843
|
|
|
@@ -1375,14 +1374,14 @@ class MatAutocompleteField {
|
|
|
1375
1374
|
// Wait a debounce time
|
|
1376
1375
|
debounceTime(this.debounceTime)
|
|
1377
1376
|
// DEBUG
|
|
1378
|
-
|
|
1377
|
+
//,tap((value) => this.debug && console.debug(this.logPrefix + ' Search text changes:', value))
|
|
1378
|
+
),
|
|
1379
1379
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
1380
1380
|
this.formControl.valueChanges
|
|
1381
1381
|
.pipe(startWith(this.formControl.value), filter(value => (isNotNil(value) && typeof value === 'object')), tap(value => {
|
|
1382
|
-
var _a;
|
|
1383
1382
|
// DEBUG
|
|
1384
|
-
if (this.debug)
|
|
1385
|
-
|
|
1383
|
+
//if (this.debug) console.debug(this.logPrefix + ' control object changes:', value);
|
|
1384
|
+
var _a;
|
|
1386
1385
|
// Update the display value (if need)
|
|
1387
1386
|
const displayValue = this.displayWith(value) || '';
|
|
1388
1387
|
if (this.displayValue !== displayValue) {
|
|
@@ -10698,7 +10697,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10698
10697
|
}
|
|
10699
10698
|
get usageMode() {
|
|
10700
10699
|
var _a;
|
|
10701
|
-
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.
|
|
10700
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.usageMode)) {
|
|
10702
10701
|
console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
|
|
10703
10702
|
return isCordova(window) ? 'FIELD' : 'DESK';
|
|
10704
10703
|
}
|
|
@@ -17522,7 +17521,9 @@ class AppForm {
|
|
|
17522
17521
|
this._$loading.unsubscribe();
|
|
17523
17522
|
}
|
|
17524
17523
|
cancel() {
|
|
17525
|
-
this
|
|
17524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17525
|
+
this.onCancel.emit();
|
|
17526
|
+
});
|
|
17526
17527
|
}
|
|
17527
17528
|
/**
|
|
17528
17529
|
*
|
|
@@ -18769,7 +18770,9 @@ class AuthForm extends AppForm {
|
|
|
18769
18770
|
}
|
|
18770
18771
|
}
|
|
18771
18772
|
cancel() {
|
|
18772
|
-
this
|
|
18773
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18774
|
+
this.onCancel.emit();
|
|
18775
|
+
});
|
|
18773
18776
|
}
|
|
18774
18777
|
doSubmit(event) {
|
|
18775
18778
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -19626,7 +19629,7 @@ class AccountPage extends AppForm {
|
|
|
19626
19629
|
cancel: { get: () => super.cancel }
|
|
19627
19630
|
});
|
|
19628
19631
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19629
|
-
_super.cancel.call(this);
|
|
19632
|
+
yield _super.cancel.call(this);
|
|
19630
19633
|
});
|
|
19631
19634
|
}
|
|
19632
19635
|
markForCheck() {
|
|
@@ -23013,7 +23016,7 @@ class AppTable {
|
|
|
23013
23016
|
.then(() => this.editRowById(event, row.id, { focusColumn: this.lastUserColumn }));
|
|
23014
23017
|
return true;
|
|
23015
23018
|
}
|
|
23016
|
-
// Edit
|
|
23019
|
+
// Edit previous row
|
|
23017
23020
|
this.editRow(event, row, { focusColumn: this.lastUserColumn });
|
|
23018
23021
|
return true;
|
|
23019
23022
|
}
|
|
@@ -23036,8 +23039,7 @@ class AppTable {
|
|
|
23036
23039
|
if (id < 0)
|
|
23037
23040
|
return;
|
|
23038
23041
|
if (id >= this.visibleRowCount) {
|
|
23039
|
-
this.
|
|
23040
|
-
this.addRow(event);
|
|
23042
|
+
this.addRow(event, undefined, opts);
|
|
23041
23043
|
}
|
|
23042
23044
|
else {
|
|
23043
23045
|
const row = yield this.dataSource.getRow(id);
|
|
@@ -23110,7 +23112,7 @@ class AppTable {
|
|
|
23110
23112
|
this.cancelExistingRow(event, row, opts);
|
|
23111
23113
|
}
|
|
23112
23114
|
}
|
|
23113
|
-
addRow(event, insertAt) {
|
|
23115
|
+
addRow(event, insertAt, opts) {
|
|
23114
23116
|
if (this.debug)
|
|
23115
23117
|
console.debug('[table] Asking for new row...');
|
|
23116
23118
|
if (!this._enabled)
|
|
@@ -23125,7 +23127,7 @@ class AppTable {
|
|
|
23125
23127
|
return false;
|
|
23126
23128
|
}
|
|
23127
23129
|
// Add new row
|
|
23128
|
-
this.addRowToTable(insertAt);
|
|
23130
|
+
this.addRowToTable(insertAt, opts);
|
|
23129
23131
|
return true;
|
|
23130
23132
|
}
|
|
23131
23133
|
save(opts) {
|
|
@@ -23790,9 +23792,10 @@ class AppTable {
|
|
|
23790
23792
|
//if (this.debug) console.debug("[table] id = " + id);
|
|
23791
23793
|
return id;
|
|
23792
23794
|
}
|
|
23793
|
-
addRowToTable(insertAt) {
|
|
23795
|
+
addRowToTable(insertAt, opts) {
|
|
23794
23796
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23795
23797
|
this.focusFirstColumn = true;
|
|
23798
|
+
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
23796
23799
|
yield this._dataSource.asyncCreateNew(insertAt);
|
|
23797
23800
|
this.editedRow = this._dataSource.getRow(-1);
|
|
23798
23801
|
// Emit start editing event
|
|
@@ -24308,6 +24311,8 @@ class AppEditor {
|
|
|
24308
24311
|
}
|
|
24309
24312
|
ready(opts) {
|
|
24310
24313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24314
|
+
if (this._$ready.value)
|
|
24315
|
+
return;
|
|
24311
24316
|
return waitForTrue(this._$ready, opts);
|
|
24312
24317
|
});
|
|
24313
24318
|
}
|
|
@@ -24601,6 +24606,10 @@ class AppTabEditor extends AppEditor {
|
|
|
24601
24606
|
this.markForCheck();
|
|
24602
24607
|
}
|
|
24603
24608
|
}
|
|
24609
|
+
realignInkBar() {
|
|
24610
|
+
var _a;
|
|
24611
|
+
(_a = this.tabGroup) === null || _a === void 0 ? void 0 : _a.realignInkBar();
|
|
24612
|
+
}
|
|
24604
24613
|
onTabChange(event, queryTabIndexParamName) {
|
|
24605
24614
|
queryTabIndexParamName = queryTabIndexParamName || this.queryTabIndexParamName;
|
|
24606
24615
|
if (!queryTabIndexParamName || !this.route)
|