@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
|
@@ -1092,14 +1092,13 @@
|
|
|
1092
1092
|
}
|
|
1093
1093
|
function waitForTrue(observable, opts) {
|
|
1094
1094
|
return __awaiter(this, void 0, void 0, function () {
|
|
1095
|
-
var
|
|
1095
|
+
var $timeout;
|
|
1096
1096
|
return __generator(this, function (_a) {
|
|
1097
|
-
firstTrueObservable = firstTrue(observable);
|
|
1098
1097
|
// Timeout (+ dueTime)
|
|
1099
1098
|
if (opts && opts.timeout > 0) {
|
|
1100
1099
|
$timeout = rxjs.timer(opts.timeout);
|
|
1101
1100
|
return [2 /*return*/, rxjs.merge(rxjs.timer(opts.dueTime || 0)
|
|
1102
|
-
.pipe(operators.switchMap(function () { return
|
|
1101
|
+
.pipe(operators.switchMap(function () { return firstTrue(observable); }), operators.takeUntil($timeout)), $timeout
|
|
1103
1102
|
.pipe(operators.map(function () {
|
|
1104
1103
|
throw new Error("Timeout ready() - after " + opts.timeout + "ms");
|
|
1105
1104
|
})))
|
|
@@ -1108,10 +1107,10 @@
|
|
|
1108
1107
|
// dueTime (without timeout)
|
|
1109
1108
|
if (opts && opts.dueTime > 0) {
|
|
1110
1109
|
return [2 /*return*/, rxjs.timer(opts.dueTime)
|
|
1111
|
-
.pipe(operators.switchMap(function () { return
|
|
1110
|
+
.pipe(operators.switchMap(function () { return firstTrue(observable); }))
|
|
1112
1111
|
.toPromise()];
|
|
1113
1112
|
}
|
|
1114
|
-
return [2 /*return*/,
|
|
1113
|
+
return [2 /*return*/, firstTrue(observable).toPromise()];
|
|
1115
1114
|
});
|
|
1116
1115
|
});
|
|
1117
1116
|
}
|
|
@@ -1712,14 +1711,14 @@
|
|
|
1712
1711
|
// Wait a debounce time
|
|
1713
1712
|
operators.debounceTime(this.debounceTime)
|
|
1714
1713
|
// DEBUG
|
|
1715
|
-
|
|
1714
|
+
//,tap((value) => this.debug && console.debug(this.logPrefix + ' Search text changes:', value))
|
|
1715
|
+
),
|
|
1716
1716
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
1717
1717
|
this.formControl.valueChanges
|
|
1718
1718
|
.pipe(operators.startWith(this.formControl.value), operators.filter(function (value) { return (isNotNil(value) && typeof value === 'object'); }), operators.tap(function (value) {
|
|
1719
|
-
var _a;
|
|
1720
1719
|
// DEBUG
|
|
1721
|
-
if (
|
|
1722
|
-
|
|
1720
|
+
//if (this.debug) console.debug(this.logPrefix + ' control object changes:', value);
|
|
1721
|
+
var _a;
|
|
1723
1722
|
// Update the display value (if need)
|
|
1724
1723
|
var displayValue = _this.displayWith(value) || '';
|
|
1725
1724
|
if (_this.displayValue !== displayValue) {
|
|
@@ -12024,7 +12023,7 @@
|
|
|
12024
12023
|
Object.defineProperty(LocalSettingsService.prototype, "usageMode", {
|
|
12025
12024
|
get: function () {
|
|
12026
12025
|
var _a;
|
|
12027
|
-
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.
|
|
12026
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.usageMode)) {
|
|
12028
12027
|
console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
|
|
12029
12028
|
return isCordova(window) ? 'FIELD' : 'DESK';
|
|
12030
12029
|
}
|
|
@@ -20082,7 +20081,12 @@
|
|
|
20082
20081
|
this._$loading.unsubscribe();
|
|
20083
20082
|
};
|
|
20084
20083
|
AppForm.prototype.cancel = function () {
|
|
20085
|
-
this
|
|
20084
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20085
|
+
return __generator(this, function (_b) {
|
|
20086
|
+
this.onCancel.emit();
|
|
20087
|
+
return [2 /*return*/];
|
|
20088
|
+
});
|
|
20089
|
+
});
|
|
20086
20090
|
};
|
|
20087
20091
|
/**
|
|
20088
20092
|
*
|
|
@@ -21522,7 +21526,12 @@
|
|
|
21522
21526
|
}
|
|
21523
21527
|
};
|
|
21524
21528
|
AuthForm.prototype.cancel = function () {
|
|
21525
|
-
this
|
|
21529
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21530
|
+
return __generator(this, function (_a) {
|
|
21531
|
+
this.onCancel.emit();
|
|
21532
|
+
return [2 /*return*/];
|
|
21533
|
+
});
|
|
21534
|
+
});
|
|
21526
21535
|
};
|
|
21527
21536
|
AuthForm.prototype.doSubmit = function (event) {
|
|
21528
21537
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -22541,8 +22550,12 @@
|
|
|
22541
22550
|
});
|
|
22542
22551
|
return __awaiter(this, void 0, void 0, function () {
|
|
22543
22552
|
return __generator(this, function (_c) {
|
|
22544
|
-
|
|
22545
|
-
|
|
22553
|
+
switch (_c.label) {
|
|
22554
|
+
case 0: return [4 /*yield*/, _super.cancel.call(this)];
|
|
22555
|
+
case 1:
|
|
22556
|
+
_c.sent();
|
|
22557
|
+
return [2 /*return*/];
|
|
22558
|
+
}
|
|
22546
22559
|
});
|
|
22547
22560
|
});
|
|
22548
22561
|
};
|
|
@@ -26600,7 +26613,7 @@
|
|
|
26600
26613
|
.then(function () { return _this.editRowById(event, row.id, { focusColumn: _this.lastUserColumn }); });
|
|
26601
26614
|
return true;
|
|
26602
26615
|
}
|
|
26603
|
-
// Edit
|
|
26616
|
+
// Edit previous row
|
|
26604
26617
|
this.editRow(event, row, { focusColumn: this.lastUserColumn });
|
|
26605
26618
|
return true;
|
|
26606
26619
|
};
|
|
@@ -26628,8 +26641,7 @@
|
|
|
26628
26641
|
if (id < 0)
|
|
26629
26642
|
return [2 /*return*/];
|
|
26630
26643
|
if (!(id >= this.visibleRowCount)) return [3 /*break*/, 1];
|
|
26631
|
-
this.
|
|
26632
|
-
this.addRow(event);
|
|
26644
|
+
this.addRow(event, undefined, opts);
|
|
26633
26645
|
return [3 /*break*/, 3];
|
|
26634
26646
|
case 1: return [4 /*yield*/, this.dataSource.getRow(id)];
|
|
26635
26647
|
case 2:
|
|
@@ -26707,7 +26719,7 @@
|
|
|
26707
26719
|
this.cancelExistingRow(event, row, opts);
|
|
26708
26720
|
}
|
|
26709
26721
|
};
|
|
26710
|
-
AppTable.prototype.addRow = function (event, insertAt) {
|
|
26722
|
+
AppTable.prototype.addRow = function (event, insertAt, opts) {
|
|
26711
26723
|
if (this.debug)
|
|
26712
26724
|
console.debug('[table] Asking for new row...');
|
|
26713
26725
|
if (!this._enabled)
|
|
@@ -26722,7 +26734,7 @@
|
|
|
26722
26734
|
return false;
|
|
26723
26735
|
}
|
|
26724
26736
|
// Add new row
|
|
26725
|
-
this.addRowToTable(insertAt);
|
|
26737
|
+
this.addRowToTable(insertAt, opts);
|
|
26726
26738
|
return true;
|
|
26727
26739
|
};
|
|
26728
26740
|
AppTable.prototype.save = function (opts) {
|
|
@@ -27545,12 +27557,13 @@
|
|
|
27545
27557
|
//if (this.debug) console.debug("[table] id = " + id);
|
|
27546
27558
|
return id;
|
|
27547
27559
|
};
|
|
27548
|
-
AppTable.prototype.addRowToTable = function (insertAt) {
|
|
27560
|
+
AppTable.prototype.addRowToTable = function (insertAt, opts) {
|
|
27549
27561
|
return __awaiter(this, void 0, void 0, function () {
|
|
27550
27562
|
return __generator(this, function (_e) {
|
|
27551
27563
|
switch (_e.label) {
|
|
27552
27564
|
case 0:
|
|
27553
27565
|
this.focusFirstColumn = true;
|
|
27566
|
+
this.focusColumn = (opts === null || opts === void 0 ? void 0 : opts.focusColumn) || this.firstUserColumn;
|
|
27554
27567
|
return [4 /*yield*/, this._dataSource.asyncCreateNew(insertAt)];
|
|
27555
27568
|
case 1:
|
|
27556
27569
|
_e.sent();
|
|
@@ -28151,6 +28164,8 @@
|
|
|
28151
28164
|
AppEditor.prototype.ready = function (opts) {
|
|
28152
28165
|
return __awaiter(this, void 0, void 0, function () {
|
|
28153
28166
|
return __generator(this, function (_b) {
|
|
28167
|
+
if (this._$ready.value)
|
|
28168
|
+
return [2 /*return*/];
|
|
28154
28169
|
return [2 /*return*/, waitForTrue(this._$ready, opts)];
|
|
28155
28170
|
});
|
|
28156
28171
|
});
|
|
@@ -28507,6 +28522,10 @@
|
|
|
28507
28522
|
this.markForCheck();
|
|
28508
28523
|
}
|
|
28509
28524
|
};
|
|
28525
|
+
AppTabEditor.prototype.realignInkBar = function () {
|
|
28526
|
+
var _a;
|
|
28527
|
+
(_a = this.tabGroup) === null || _a === void 0 ? void 0 : _a.realignInkBar();
|
|
28528
|
+
};
|
|
28510
28529
|
AppTabEditor.prototype.onTabChange = function (event, queryTabIndexParamName) {
|
|
28511
28530
|
queryTabIndexParamName = queryTabIndexParamName || this.queryTabIndexParamName;
|
|
28512
28531
|
if (!queryTabIndexParamName || !this.route)
|