ps-toolkit-ui 1.20.20 → 1.20.21
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 +15 -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 +4 -2
- package/fesm2015/ps-toolkit-ui.js +15 -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']
|
|
@@ -9829,7 +9841,9 @@
|
|
|
9829
9841
|
_this.cols.forEach(function (col) {
|
|
9830
9842
|
var txt = _this.getText(_this.getCell(row, col));
|
|
9831
9843
|
if (col.type === exports.TableCollType.Price) {
|
|
9832
|
-
|
|
9844
|
+
var tr = txt.replace('ریال', '').replace(/,/g, '').trim();
|
|
9845
|
+
txt = parseInt(tr, 10);
|
|
9846
|
+
txt = isNaN(txt) ? 0 : txt;
|
|
9833
9847
|
}
|
|
9834
9848
|
x[_this.l(col.name)] = txt;
|
|
9835
9849
|
});
|