@cellaware/utils 8.6.15 → 8.6.16

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.
@@ -879,15 +879,12 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
879
879
  return {};
880
880
  }
881
881
  };
882
- console.log('COUNT: ' + htmlColumnStyles.length);
883
882
  for (const htmlColumnStyle of htmlColumnStyles) {
884
883
  teamsColumnStyles.push({
885
884
  columnName: htmlColumnStyle.columnName,
886
885
  styles: htmlColumnStyle.styles.map(style => getColumnStyle(style))
887
886
  });
888
887
  }
889
- console.log('A.');
890
- console.log(JSON.stringify(teamsColumnStyles));
891
888
  const applyRowStyleToColumns = (style) => {
892
889
  for (const columnName of columnNames) {
893
890
  const columnStyle = getColumnStyle(style);
@@ -1020,6 +1017,9 @@ function createTeamsTableCellText(value, columnStyle) {
1020
1017
  if (!!styles.isSubtle) {
1021
1018
  isSubtle = styles.isSubtle;
1022
1019
  }
1020
+ if (!!styles.italic) {
1021
+ italic = styles.italic;
1022
+ }
1023
1023
  }
1024
1024
  return {
1025
1025
  type: "TextBlock",
@@ -1038,16 +1038,12 @@ function createTeamsTableRow(columnNames, values, rowStyles, columnStyles) {
1038
1038
  for (const style of rowStyles) {
1039
1039
  rowStyle = style;
1040
1040
  }
1041
- console.log('B.');
1042
- console.log(JSON.stringify(columnStyles));
1043
1041
  return {
1044
1042
  type: "TableRow",
1045
1043
  style: rowStyle,
1046
1044
  cells: values.map((value, idx) => {
1047
1045
  const columnName = columnNames[idx];
1048
1046
  const columnStyle = columnStyles.find(cs => cs.columnName === columnName);
1049
- console.log('C.');
1050
- console.log(columnStyle);
1051
1047
  let style = undefined;
1052
1048
  for (const styles of columnStyle?.styles ?? []) {
1053
1049
  if (!!styles.style) {
@@ -35,14 +35,18 @@ export function createTeamsTableCard(title, table, summary) {
35
35
  };
36
36
  }
37
37
  export function createTeamsValueCard(title, columnName, value, styles, summary) {
38
- let teamsStyles = [];
39
- let _ = [];
40
- [teamsStyles, _] = mapTeamsStyles([columnName], styles, [], _, teamsStyles);
38
+ let rowStyles = [];
39
+ let columnStyles = [];
40
+ [rowStyles, columnStyles] = mapTeamsStyles([columnName], styles, [], rowStyles, columnStyles);
41
+ console.log(styles);
42
+ console.log('--==--==--==--==--==--==--==--==--');
43
+ console.log(columnStyles);
41
44
  let color = undefined;
42
45
  let style = undefined;
43
46
  let weight = undefined;
44
47
  let isSubtle = undefined;
45
- for (const styles of teamsStyles) {
48
+ let italic = undefined;
49
+ for (const styles of columnStyles) {
46
50
  if (!!styles.color) {
47
51
  color = styles.color;
48
52
  }
@@ -55,6 +59,9 @@ export function createTeamsValueCard(title, columnName, value, styles, summary)
55
59
  if (!!styles.isSubtle) {
56
60
  isSubtle = styles.isSubtle;
57
61
  }
62
+ if (!!styles.italic) {
63
+ italic = styles.italic;
64
+ }
58
65
  }
59
66
  return {
60
67
  type: "AdaptiveCard",
@@ -68,7 +75,7 @@ export function createTeamsValueCard(title, columnName, value, styles, summary)
68
75
  items: [
69
76
  {
70
77
  type: "TextBlock",
71
- text: value,
78
+ text: italic ? `*${value}*` : value,
72
79
  wrap: true,
73
80
  size: "ExtraLarge",
74
81
  color,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.6.15",
3
+ "version": "8.6.16",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",