@sumaris-net/ngx-components 1.19.14-rc1 → 1.19.15-rc2
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 +29 -23
- 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/table/table.class.js +7 -2
- package/esm2015/src/app/shared/pipes/number-format.pipe.js +6 -3
- package/fesm2015/sumaris-net.ngx-components.js +11 -3
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +1 -1
- package/src/app/shared/pipes/number-format.pipe.d.ts +3 -1
- package/src/assets/i18n/fr.json +2 -2
- package/src/theme/_ngx-components.scss +11 -4
|
@@ -2649,11 +2649,14 @@
|
|
|
2649
2649
|
var NumberFormatPipe = /** @class */ (function () {
|
|
2650
2650
|
function NumberFormatPipe() {
|
|
2651
2651
|
}
|
|
2652
|
-
NumberFormatPipe.prototype.transform = function (val,
|
|
2652
|
+
NumberFormatPipe.prototype.transform = function (val, opts) {
|
|
2653
2653
|
// Format the output to display any way you want here.
|
|
2654
2654
|
// For instance:
|
|
2655
2655
|
if (val !== undefined && val !== null) {
|
|
2656
|
-
|
|
2656
|
+
if (opts === null || opts === void 0 ? void 0 : opts.fixedDecimals) {
|
|
2657
|
+
return val.toFixed(opts.fixedDecimals);
|
|
2658
|
+
}
|
|
2659
|
+
return val.toLocaleString(undefined, opts);
|
|
2657
2660
|
}
|
|
2658
2661
|
else {
|
|
2659
2662
|
return '';
|
|
@@ -26066,8 +26069,14 @@
|
|
|
26066
26069
|
return true;
|
|
26067
26070
|
};
|
|
26068
26071
|
AppTable.prototype.confirmAndForward = function (event, row) {
|
|
26072
|
+
var _this = this;
|
|
26073
|
+
var _a;
|
|
26069
26074
|
row = row || this.editedRow;
|
|
26070
26075
|
if (!this.confirmEditCreate(event, row)) {
|
|
26076
|
+
// If pending: Wait end of validation, then loop
|
|
26077
|
+
if ((_a = row.validator) === null || _a === void 0 ? void 0 : _a.pending) {
|
|
26078
|
+
return AppFormUtils.waitWhilePending(row.validator).then(function () { return _this.confirmAndForward(event, row); });
|
|
26079
|
+
}
|
|
26071
26080
|
return false;
|
|
26072
26081
|
}
|
|
26073
26082
|
// Edit next row
|
|
@@ -26885,28 +26894,25 @@
|
|
|
26885
26894
|
AppTable.prototype.openRow = function (id, row) {
|
|
26886
26895
|
return __awaiter(this, void 0, void 0, function () {
|
|
26887
26896
|
return __generator(this, function (_e) {
|
|
26888
|
-
|
|
26889
|
-
|
|
26890
|
-
|
|
26891
|
-
|
|
26892
|
-
|
|
26893
|
-
}
|
|
26894
|
-
|
|
26895
|
-
|
|
26896
|
-
|
|
26897
|
-
|
|
26898
|
-
|
|
26899
|
-
|
|
26900
|
-
|
|
26901
|
-
|
|
26902
|
-
|
|
26903
|
-
|
|
26904
|
-
|
|
26905
|
-
queryParams: {}
|
|
26906
|
-
})];
|
|
26907
|
-
case 1: return [2 /*return*/, _e.sent()];
|
|
26908
|
-
case 2: return [2 /*return*/, false];
|
|
26897
|
+
if (this.allowRowDetail) {
|
|
26898
|
+
if (this.debug && this.dirty) {
|
|
26899
|
+
console.warn('[table] Opening row details, but table has unsaved changes!');
|
|
26900
|
+
}
|
|
26901
|
+
if (this.onOpenRow.observers.length) {
|
|
26902
|
+
this.onOpenRow.emit({ id: id, row: row });
|
|
26903
|
+
return [2 /*return*/, true];
|
|
26904
|
+
}
|
|
26905
|
+
// No ID defined: unable to open details
|
|
26906
|
+
if (isNil(id)) {
|
|
26907
|
+
console.warn('[table] Opening row details, but data has no id!');
|
|
26908
|
+
return [2 /*return*/, false];
|
|
26909
|
+
}
|
|
26910
|
+
return [2 /*return*/, this.router.navigate(['.', id.toString()], {
|
|
26911
|
+
relativeTo: this.route,
|
|
26912
|
+
queryParams: {}
|
|
26913
|
+
})];
|
|
26909
26914
|
}
|
|
26915
|
+
return [2 /*return*/, false];
|
|
26910
26916
|
});
|
|
26911
26917
|
});
|
|
26912
26918
|
};
|