@cellaware/utils 8.5.4 → 8.5.6

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.
@@ -127,7 +127,7 @@ export declare function codifyCondition(condition: DatagridCondition): string;
127
127
  */
128
128
  export declare function stripNumericValueFormat(value: string | number | undefined): any;
129
129
  /**
130
- * **Important:** `html` output will be limited to **500 rows** and **6 columns**.
130
+ * **Important:** `html` output will be limited to **1,000 rows** and **8 columns**.
131
131
  */
132
132
  export declare function transformDatagrid(rows: any[], datagridState: DatagridStateBase, locale: string, condition?: DatagridCondition): DatagridState;
133
133
  export {};
@@ -804,6 +804,9 @@ function buildHtmlRow(rowValues, rowStyles, columnStyles, columnCount) {
804
804
  // Write cell values with styles.
805
805
  let colIdx = 0;
806
806
  for (const rowValue of rowValues) {
807
+ if (colIdx >= columnCount) {
808
+ break;
809
+ }
807
810
  if (columnStyles[colIdx].styles.length > 0) {
808
811
  buf += `\n\t\t\t<td class="${columnStyles[colIdx].styles.join(' ')}">${rowValue}</td>`;
809
812
  }
@@ -816,11 +819,11 @@ function buildHtmlRow(rowValues, rowStyles, columnStyles, columnCount) {
816
819
  return buf;
817
820
  }
818
821
  /**
819
- * **Important:** `html` output will be limited to **500 rows** and **6 columns**.
822
+ * **Important:** `html` output will be limited to **1,000 rows** and **8 columns**.
820
823
  */
821
824
  export function transformDatagrid(rows, datagridState, locale, condition) {
822
- const HTML_ROWS = 500;
823
- const HTML_COLS = 6;
825
+ const HTML_ROWS = 1000;
826
+ const HTML_COLS = 8;
824
827
  const columnState = datagridState.columnState ?? [];
825
828
  const filterModel = datagridState.filterModel ?? {};
826
829
  const isPivotMode = !!datagridState.isPivotMode;
@@ -949,6 +952,6 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
949
952
  ...datagridState,
950
953
  adjRowData: rows,
951
954
  chartRowData,
952
- html: `${buildHtmlTableHeader(htmlColumnNames)}${htmlBuf}${buildHtmlTableFooter()}`
955
+ html: `${buildHtmlTableHeader(htmlColumnNames.slice(0, HTML_COLS))}${htmlBuf}${buildHtmlTableFooter()}`
953
956
  };
954
957
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.5.4",
3
+ "version": "8.5.6",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",