@amirjalili1374/ui-kit 1.6.0 → 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,8 +38896,9 @@ 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 !== null && value2 !== void 0 && value2 !== "") {
38899
+ if (value2) {
38900
38900
  try {
38901
+ console.log("is date format excel");
38901
38902
  value2 = DateConverter.toShamsi(value2);
38902
38903
  } catch {
38903
38904
  }
@@ -38921,13 +38922,23 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
38921
38922
  const moneyColumns = validHeaders.map((h2, i) => h2.type === "money" ? i : -1).filter((i) => i !== -1);
38922
38923
  moneyColumns.forEach((colIdx) => {
38923
38924
  for (let rowIdx = 1; rowIdx <= excelData.length; rowIdx++) {
38924
- const cellAddress = utils.encode_cell({ r: rowIdx, c: colIdx });
38925
- const cell = worksheet[cellAddress];
38925
+ const addr = utils.encode_cell({ r: rowIdx, c: colIdx });
38926
+ const cell = worksheet[addr];
38926
38927
  if (cell && typeof cell.v === "number") {
38927
38928
  cell.z = "#,##0";
38928
38929
  }
38929
38930
  }
38930
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
+ });
38931
38942
  const workbook = utils.book_new();
38932
38943
  utils.book_append_sheet(workbook, worksheet, "Data Export");
38933
38944
  const safeName = (props.exportFileName || "export-data").trim();