@cellaware/utils 8.11.4 → 8.11.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.
@@ -170,6 +170,7 @@ export declare function mapTeamsStyles(columnNames: string[], htmlRowStyles: str
170
170
  export declare function mapTeamsTransposeStyles(htmlColumnStyle: HtmlColumnStyle): TeamsColumnStyle;
171
171
  export declare function createTeamsTableColumns(columnNames: string[]): {
172
172
  type: string;
173
+ separator: boolean;
173
174
  cells: {
174
175
  type: string;
175
176
  items: {
@@ -1108,6 +1108,7 @@ function createTeamsTableColumnText(columnName) {
1108
1108
  export function createTeamsTableColumns(columnNames) {
1109
1109
  return {
1110
1110
  type: "TableRow",
1111
+ separator: true,
1111
1112
  cells: columnNames.map((columnName) => ({
1112
1113
  type: "TableCell",
1113
1114
  items: [createTeamsTableColumnText(columnName)]
@@ -1143,7 +1144,7 @@ function createTeamsTableCellText(value, columnStyle) {
1143
1144
  isSubtle
1144
1145
  };
1145
1146
  }
1146
- function createTeamsTransposeTableCellText(value, columnStyle) {
1147
+ function createTeamsTransposeTableCellText(value, key, columnStyle) {
1147
1148
  // Same as ^^^, just a couple minor tweaks.
1148
1149
  let color = undefined;
1149
1150
  let weight = undefined;
@@ -1167,7 +1168,7 @@ function createTeamsTransposeTableCellText(value, columnStyle) {
1167
1168
  return {
1168
1169
  type: "TextBlock",
1169
1170
  text: italic ? `*${truncValue}*` : truncValue,
1170
- size: "Medium",
1171
+ size: key ? "Medium" : "Large",
1171
1172
  color,
1172
1173
  weight,
1173
1174
  isSubtle
@@ -1201,7 +1202,7 @@ export function createTeamsTableRow(columnNames, values, rowStyles, columnStyles
1201
1202
  export function createTeamsTransposeTableRow(row, columnStyle) {
1202
1203
  const keyCell = {
1203
1204
  type: "TableCell",
1204
- items: [createTeamsTransposeTableCellText(row.key, {
1205
+ items: [createTeamsTransposeTableCellText(row.key, true, {
1205
1206
  columnName: 'key',
1206
1207
  styles: [{ weight: 'Bolder' }]
1207
1208
  })]
@@ -1215,7 +1216,7 @@ export function createTeamsTransposeTableRow(row, columnStyle) {
1215
1216
  const valueCell = {
1216
1217
  type: "TableCell",
1217
1218
  style,
1218
- items: [createTeamsTransposeTableCellText(row.value, columnStyle)]
1219
+ items: [createTeamsTransposeTableCellText(row.value, false, columnStyle)]
1219
1220
  };
1220
1221
  return {
1221
1222
  type: "TableRow",
@@ -1,5 +1,6 @@
1
1
  export declare function createTeamsTableItem(rows: any[]): ({
2
2
  type: string;
3
+ separator: boolean;
3
4
  cells: {
4
5
  type: string;
5
6
  items: {
@@ -138,9 +139,11 @@ export declare function createTeamsReportRowCard(lineTitle: string, table: any[]
138
139
  wrap: boolean;
139
140
  } | {
140
141
  type: string;
142
+ showGridLines: boolean;
141
143
  roundedCorners: boolean;
142
- firstRowAsHeaders: boolean;
143
- columns: any;
144
+ columns: {
145
+ width: number;
146
+ }[];
144
147
  rows: any[];
145
148
  })[];
146
149
  };
@@ -194,6 +197,7 @@ export declare function createTeamsAlertTableCard(condition: string, rows: any[]
194
197
  }[];
195
198
  rows: ({
196
199
  type: string;
200
+ separator: boolean;
197
201
  cells: {
198
202
  type: string;
199
203
  items: {
@@ -145,9 +145,9 @@ export function createTeamsReportRowCard(lineTitle, table, summary, reportTitle)
145
145
  createTeamsTitleItem(reportTitle, lineTitle),
146
146
  {
147
147
  type: "Table",
148
+ showGridLines: false,
148
149
  roundedCorners: true,
149
- firstRowAsHeaders: true,
150
- columns: table.length === 0 ? [] : table[0].cells.map(() => ({ width: 3 })),
150
+ columns: [{ width: 1 }, { width: 2 }],
151
151
  rows: table
152
152
  },
153
153
  createTeamsSummaryItem(summary)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.11.4",
3
+ "version": "8.11.6",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",