@amirjalili1374/ui-kit 1.6.1 → 1.6.2
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/dist/ui-kit.es.js
CHANGED
|
@@ -38896,12 +38896,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
38896
38896
|
if (header.formatter) {
|
|
38897
38897
|
value2 = header.formatter(value2, item);
|
|
38898
38898
|
} else if (header.type === "date" || header.isDate) {
|
|
38899
|
-
if (value2
|
|
38899
|
+
if (value2) {
|
|
38900
38900
|
try {
|
|
38901
|
-
|
|
38902
|
-
value2 =
|
|
38901
|
+
console.log("is date format excel");
|
|
38902
|
+
value2 = DateConverter.toShamsi(value2);
|
|
38903
38903
|
} catch {
|
|
38904
|
-
value2 = "" + value2;
|
|
38905
38904
|
}
|
|
38906
38905
|
}
|
|
38907
38906
|
} else if (header.type === "money") {
|
|
@@ -38923,13 +38922,23 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
|
38923
38922
|
const moneyColumns = validHeaders.map((h2, i) => h2.type === "money" ? i : -1).filter((i) => i !== -1);
|
|
38924
38923
|
moneyColumns.forEach((colIdx) => {
|
|
38925
38924
|
for (let rowIdx = 1; rowIdx <= excelData.length; rowIdx++) {
|
|
38926
|
-
const
|
|
38927
|
-
const cell = worksheet[
|
|
38925
|
+
const addr = utils.encode_cell({ r: rowIdx, c: colIdx });
|
|
38926
|
+
const cell = worksheet[addr];
|
|
38928
38927
|
if (cell && typeof cell.v === "number") {
|
|
38929
38928
|
cell.z = "#,##0";
|
|
38930
38929
|
}
|
|
38931
38930
|
}
|
|
38932
38931
|
});
|
|
38932
|
+
const dateColumns = validHeaders.map((h2, i) => h2.isDate || h2.type === "date" ? i : -1).filter((i) => i !== -1);
|
|
38933
|
+
dateColumns.forEach((colIdx) => {
|
|
38934
|
+
for (let rowIdx = 1; rowIdx <= excelData.length; rowIdx++) {
|
|
38935
|
+
const addr = utils.encode_cell({ r: rowIdx, c: colIdx });
|
|
38936
|
+
const cell = worksheet[addr];
|
|
38937
|
+
if (cell) {
|
|
38938
|
+
cell.t = "s";
|
|
38939
|
+
}
|
|
38940
|
+
}
|
|
38941
|
+
});
|
|
38933
38942
|
const workbook = utils.book_new();
|
|
38934
38943
|
utils.book_append_sheet(workbook, worksheet, "Data Export");
|
|
38935
38944
|
const safeName = (props.exportFileName || "export-data").trim();
|