@cellaware/utils 8.6.6 → 8.6.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.
@@ -148,7 +148,7 @@ interface TeamsColumnStyle {
148
148
  }
149
149
  export declare function mapTeamsStyles(columnNames: string[], htmlRowStyles: string[], htmlColumnStyles: HtmlColumnStyle[], teamsRowStyles: string[], teamsColumnStyles: TeamsColumnStyle[]): [string[], TeamsColumnStyle[]];
150
150
  /**
151
- * **Important:** `html` and `teamsRows` output will be limited to **1,000 rows** and **8 columns**.
151
+ * **Important:** `html` and `teamsRows` output will be limited to **200 rows** and **8 columns**.
152
152
  *
153
153
  * All outputs respect and will be filtered by optional `condition` argument.
154
154
  */
@@ -1036,12 +1036,12 @@ function createTeamsTableRow(columnNames, values, oddRow, rowStyles, columnStyle
1036
1036
  };
1037
1037
  }
1038
1038
  /**
1039
- * **Important:** `html` and `teamsRows` output will be limited to **1,000 rows** and **8 columns**.
1039
+ * **Important:** `html` and `teamsRows` output will be limited to **200 rows** and **8 columns**.
1040
1040
  *
1041
1041
  * All outputs respect and will be filtered by optional `condition` argument.
1042
1042
  */
1043
1043
  export function transformDatagrid(rows, datagridState, locale, condition) {
1044
- const HTML_ROWS = 1000;
1044
+ const HTML_ROWS = 200;
1045
1045
  const HTML_COLS = 8;
1046
1046
  const columnState = datagridState.columnState ?? [];
1047
1047
  const filterModel = datagridState.filterModel ?? {};
@@ -1108,7 +1108,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
1108
1108
  let teamsColumnStyles = [];
1109
1109
  columnFormats.forEach(columnFormat => {
1110
1110
  if (columnFormat.name in row) {
1111
- const formattedValue = evaluateValueFormat(columnFormat, row[columnFormat.name], locale);
1111
+ const formattedValue = evaluateValueFormat(columnFormat, row[columnFormat.displayName], locale);
1112
1112
  chartRow[columnFormat.displayName] = formatNumberEnabled(columnFormat.valueFormat) ? stripNumericValueFormat(formattedValue) : formattedValue;
1113
1113
  htmlRowValues.push(formattedValue);
1114
1114
  [htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
@@ -1124,10 +1124,11 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
1124
1124
  for (const mappedColumnName of mappedColumnNamesArr) {
1125
1125
  if (mappedColumnName in row) {
1126
1126
  const adjDisplayName = mappedColumnName.replace(columnFormat.name, columnFormat.displayName);
1127
- const formattedValue = evaluateValueFormat(columnFormat, row[mappedColumnName], locale);
1127
+ const formattedValue = row[adjDisplayName];
1128
1128
  chartRow[adjDisplayName] = formatNumberEnabled(columnFormat.valueFormat) ? stripNumericValueFormat(formattedValue) : formattedValue;
1129
1129
  htmlRowValues.push(formattedValue);
1130
1130
  [htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
1131
+ [teamsRowStyles, teamsColumnStyles] = mapTeamsStyles(htmlColumnNames, htmlRowStyles, htmlColumnStyles, teamsRowStyles, teamsColumnStyles);
1131
1132
  if (rowIdx === 0) {
1132
1133
  htmlColumnNames.push(columnFormat.displayName);
1133
1134
  }
@@ -1174,10 +1175,11 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
1174
1175
  let teamsRowStyles = [];
1175
1176
  let teamsColumnStyles = [];
1176
1177
  visibleColumnFormats.forEach(columnFormat => {
1177
- const formattedValue = evaluateValueFormat(columnFormat, row[columnFormat.name], locale);
1178
+ const formattedValue = row[columnFormat.displayName];
1178
1179
  chartRow[columnFormat.displayName] = formatNumberEnabled(columnFormat.valueFormat) ? stripNumericValueFormat(formattedValue) : formattedValue;
1179
1180
  htmlRowValues.push(formattedValue);
1180
1181
  [htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
1182
+ [teamsRowStyles, teamsColumnStyles] = mapTeamsStyles(htmlColumnNames, htmlRowStyles, htmlColumnStyles, teamsRowStyles, teamsColumnStyles);
1181
1183
  if (rowIdx === 0) {
1182
1184
  htmlColumnNames.push(columnFormat.displayName);
1183
1185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.6.6",
3
+ "version": "8.6.7",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",