ps-toolkit-ui 1.20.20 → 1.20.22
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/ps-toolkit-ui.umd.js +16 -1
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/excel.class.js +13 -1
- package/esm2015/lib/classes/table.class.js +5 -2
- package/fesm2015/ps-toolkit-ui.js +16 -1
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -9154,6 +9154,18 @@
|
|
|
9154
9154
|
ExcelClass.prototype.exportAsExcelFile = function (json, excelFileName, opts) {
|
|
9155
9155
|
if (opts === void 0) { opts = null; }
|
|
9156
9156
|
var worksheet = XLSX.utils.json_to_sheet(json, opts);
|
|
9157
|
+
// tslint:disable-next-line:no-non-null-assertion
|
|
9158
|
+
var range = XLSX.utils.decode_range(worksheet['!ref']);
|
|
9159
|
+
for (var R = range.s.r; R <= range.e.r; ++R) {
|
|
9160
|
+
for (var C = range.s.c; C <= range.e.c; ++C) {
|
|
9161
|
+
var cellRef = XLSX.utils.encode_cell({ r: R, c: C });
|
|
9162
|
+
var cell = worksheet[cellRef];
|
|
9163
|
+
if (cell && typeof cell.v === 'number') {
|
|
9164
|
+
cell.t = 'n';
|
|
9165
|
+
cell.z = '#,##0';
|
|
9166
|
+
}
|
|
9167
|
+
}
|
|
9168
|
+
}
|
|
9157
9169
|
var workbook = {
|
|
9158
9170
|
Sheets: { data: worksheet },
|
|
9159
9171
|
SheetNames: ['data']
|
|
@@ -9360,6 +9372,7 @@
|
|
|
9360
9372
|
}
|
|
9361
9373
|
else if (res.status === exports.ResultStatusEnum.NotPermission) {
|
|
9362
9374
|
m = 'FormBaseErrorPermission';
|
|
9375
|
+
_this.permission = false;
|
|
9363
9376
|
}
|
|
9364
9377
|
else {
|
|
9365
9378
|
if (typeof res.message === 'string') {
|
|
@@ -9829,7 +9842,9 @@
|
|
|
9829
9842
|
_this.cols.forEach(function (col) {
|
|
9830
9843
|
var txt = _this.getText(_this.getCell(row, col));
|
|
9831
9844
|
if (col.type === exports.TableCollType.Price) {
|
|
9832
|
-
|
|
9845
|
+
var tr = txt.replace('ریال', '').replace(/,/g, '').trim();
|
|
9846
|
+
txt = parseInt(tr, 10);
|
|
9847
|
+
txt = isNaN(txt) ? 0 : txt;
|
|
9833
9848
|
}
|
|
9834
9849
|
x[_this.l(col.name)] = txt;
|
|
9835
9850
|
});
|