@sumaris-net/ngx-components 0.26.0 → 0.26.1
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 +8 -10
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +9 -11
- package/fesm2015/sumaris-net.ngx-components.js +8 -10
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -25999,7 +25999,7 @@
|
|
|
25999
25999
|
.then(function () { return _this.updateTitle(data); });
|
|
26000
26000
|
}
|
|
26001
26001
|
else {
|
|
26002
|
-
// Update the
|
|
26002
|
+
// Update the next tab
|
|
26003
26003
|
this.updateTabIndex(opts.openTabIndex);
|
|
26004
26004
|
// Update the title.
|
|
26005
26005
|
this.updateTitle(data);
|
|
@@ -26034,7 +26034,7 @@
|
|
|
26034
26034
|
switch (_b.label) {
|
|
26035
26035
|
case 0:
|
|
26036
26036
|
this.queryParams = this.queryParams || {};
|
|
26037
|
-
// Open the tab
|
|
26037
|
+
// Open the next tab
|
|
26038
26038
|
this.updateTabIndex(opts && opts.openTabIndex);
|
|
26039
26039
|
// Save the opened tab into the queryParams
|
|
26040
26040
|
this.queryParams.tab = this.selectedTabIndex;
|
|
@@ -26067,12 +26067,9 @@
|
|
|
26067
26067
|
* Update the route location, and open the next tab
|
|
26068
26068
|
*/
|
|
26069
26069
|
AppEntityEditor.prototype.updateTabIndex = function (tabIndex) {
|
|
26070
|
-
|
|
26071
|
-
|
|
26072
|
-
|
|
26073
|
-
this.selectedTabIndex = tabIndex;
|
|
26074
|
-
this.markForCheck();
|
|
26075
|
-
}
|
|
26070
|
+
if (isNotNil(tabIndex) && tabIndex > this.selectedTabIndex) {
|
|
26071
|
+
this.selectedTabIndex = tabIndex;
|
|
26072
|
+
this.markForCheck();
|
|
26076
26073
|
}
|
|
26077
26074
|
};
|
|
26078
26075
|
AppEntityEditor.prototype.saveAndClose = function (event, options) {
|
|
@@ -26315,7 +26312,7 @@
|
|
|
26315
26312
|
});
|
|
26316
26313
|
};
|
|
26317
26314
|
AppEntityEditor.prototype.setError = function (err) {
|
|
26318
|
-
console.error('[
|
|
26315
|
+
console.error('[entity-editor] Error: ' + err && err.message || '', err);
|
|
26319
26316
|
var userMessage = err && err.message && this.translate.instant(err.message) || err;
|
|
26320
26317
|
// Add details error (if any) under the main message
|
|
26321
26318
|
var detailMessage = err && err.details && (err.details.message || err.details) || undefined;
|
|
@@ -26328,7 +26325,8 @@
|
|
|
26328
26325
|
};
|
|
26329
26326
|
/* -- protected methods -- */
|
|
26330
26327
|
AppEntityEditor.prototype.computeNextTabIndex = function () {
|
|
26331
|
-
|
|
26328
|
+
var nextTabIndex = this.selectedTabIndex + 1;
|
|
26329
|
+
return nextTabIndex < this.tabCount ? nextTabIndex : this.selectedTabIndex;
|
|
26332
26330
|
};
|
|
26333
26331
|
AppEntityEditor.prototype.unload = function () {
|
|
26334
26332
|
return __awaiter(this, void 0, void 0, function () {
|