@sumaris-net/ngx-components 1.19.22 → 1.19.23
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 +11 -5
- 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/doc/changelog.md +8 -0
- package/esm2015/src/app/core/form/entity-editor.class.js +11 -5
- package/fesm2015/sumaris-net.ngx-components.js +10 -4
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -28381,7 +28381,7 @@
|
|
|
28381
28381
|
idChanged = isNotNil(data.id)
|
|
28382
28382
|
&& this.previousDataId !== undefined // Ignore if first loading (=undefined)
|
|
28383
28383
|
&& this.previousDataId !== data.id;
|
|
28384
|
-
opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading
|
|
28384
|
+
opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading }, opts);
|
|
28385
28385
|
this.data = data;
|
|
28386
28386
|
this.previousDataId = data.id || null;
|
|
28387
28387
|
return [4 /*yield*/, this.ready()];
|
|
@@ -28447,7 +28447,8 @@
|
|
|
28447
28447
|
if (!isNotNil(data === null || data === void 0 ? void 0 : data.id)) return [3 /*break*/, 2];
|
|
28448
28448
|
queryParams = Object.assign({}, this.queryParams);
|
|
28449
28449
|
queryParams[this._pathIdAttribute] = data.id;
|
|
28450
|
-
|
|
28450
|
+
if (this.debug)
|
|
28451
|
+
console.debug('[entity-editor] Updating route using params: ', queryParams);
|
|
28451
28452
|
return [4 /*yield*/, this.router.navigate(['.'], {
|
|
28452
28453
|
relativeTo: this.route,
|
|
28453
28454
|
queryParams: queryParams
|
|
@@ -28458,7 +28459,8 @@
|
|
|
28458
28459
|
case 2:
|
|
28459
28460
|
queryParams = Object.assign({}, this.queryParams);
|
|
28460
28461
|
queryParams[this._pathIdAttribute] = 'new';
|
|
28461
|
-
|
|
28462
|
+
if (this.debug)
|
|
28463
|
+
console.debug('[entity-editor] Updating route to \'../new\' using params: ', queryParams);
|
|
28462
28464
|
return [4 /*yield*/, this.router.navigate(['..', 'new'], {
|
|
28463
28465
|
relativeTo: this.route,
|
|
28464
28466
|
queryParams: queryParams
|
|
@@ -28522,7 +28524,7 @@
|
|
|
28522
28524
|
*/
|
|
28523
28525
|
AppEntityEditor.prototype.save = function (event, opts) {
|
|
28524
28526
|
return __awaiter(this, void 0, void 0, function () {
|
|
28525
|
-
var data, updatedData, err_3;
|
|
28527
|
+
var nextTabIndex, data, updatedData, err_3;
|
|
28526
28528
|
return __generator(this, function (_c) {
|
|
28527
28529
|
switch (_c.label) {
|
|
28528
28530
|
case 0:
|
|
@@ -28554,6 +28556,7 @@
|
|
|
28554
28556
|
_c.label = 2;
|
|
28555
28557
|
case 2:
|
|
28556
28558
|
_c.trys.push([2, 7, 8, 9]);
|
|
28559
|
+
nextTabIndex = this._autoOpenNextTab && isNil(this.previousDataId) && this.computeNextTabIndex();
|
|
28557
28560
|
return [4 /*yield*/, this.getValue()];
|
|
28558
28561
|
case 3:
|
|
28559
28562
|
data = _c.sent();
|
|
@@ -28565,7 +28568,10 @@
|
|
|
28565
28568
|
case 5:
|
|
28566
28569
|
_c.sent();
|
|
28567
28570
|
// Update the view (e.g metadata)
|
|
28568
|
-
return [4 /*yield*/, this.updateView(updatedData,
|
|
28571
|
+
return [4 /*yield*/, this.updateView(updatedData, Object.assign({
|
|
28572
|
+
// Open next tab only if user has not changed it
|
|
28573
|
+
openTabIndex: nextTabIndex > this._selectedTabIndex ? nextTabIndex : undefined
|
|
28574
|
+
}, opts))];
|
|
28569
28575
|
case 6:
|
|
28570
28576
|
// Update the view (e.g metadata)
|
|
28571
28577
|
_c.sent();
|