ui-core-abv 0.7.6 → 0.7.7

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.
@@ -8938,10 +8938,11 @@ class UicExcelTableComponent {
8938
8938
  });
8939
8939
  const headers = rawHeaders.map((header) => this.formatHeader(header, headerFormat));
8940
8940
  const dataRows = sheetData.slice(1);
8941
- const rows = dataRows.map((row) => {
8941
+ const rows = dataRows.map((row, dataRowIndex) => {
8942
8942
  const record = {};
8943
+ const sheetRowIndex = dataRowIndex + 1;
8943
8944
  headers.forEach((header, index) => {
8944
- record[header] = this.normalizeImportedCellValue(sheet, row[index], index + 1, index);
8945
+ record[header] = this.normalizeImportedCellValue(sheet, row[index], sheetRowIndex, index);
8945
8946
  });
8946
8947
  return record;
8947
8948
  });
@@ -8984,6 +8985,9 @@ class UicExcelTableComponent {
8984
8985
  if (cell.t === 'd' && cell.v instanceof Date) {
8985
8986
  return this.formatDate(cell.v);
8986
8987
  }
8988
+ if (typeof cell.w === 'string' && this.isDateLikeText(cell.w)) {
8989
+ return cell.w;
8990
+ }
8987
8991
  if (cell.t === 'n' && typeof cell.v === 'number' && this.isDateLikeCellFormat(cell.z)) {
8988
8992
  if (typeof cell.w === 'string' && cell.w.trim() !== '') {
8989
8993
  return cell.w;
@@ -9008,6 +9012,15 @@ class UicExcelTableComponent {
9008
9012
  const hasDateSeparator = /[\/-]/.test(cleanFormat);
9009
9013
  return hasDateToken && hasDateSeparator;
9010
9014
  }
9015
+ isDateLikeText(value) {
9016
+ const trimmedValue = value.trim();
9017
+ if (!trimmedValue) {
9018
+ return false;
9019
+ }
9020
+ const isoDatePattern = /^\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2})?)?$/;
9021
+ const slashDatePattern = /^\d{1,2}\/\d{1,2}\/\d{2,4}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/;
9022
+ return isoDatePattern.test(trimmedValue) || slashDatePattern.test(trimmedValue);
9023
+ }
9011
9024
  formatParsedDate(date) {
9012
9025
  const year = String(date.y).padStart(4, '0');
9013
9026
  const month = String(date.m).padStart(2, '0');