@cellaware/utils 8.6.19 → 8.6.21

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.
@@ -157,7 +157,7 @@ interface TeamsColumnStyleAttributes {
157
157
  isSubtle?: boolean;
158
158
  italic?: boolean;
159
159
  }
160
- interface TeamsColumnStyle {
160
+ export interface TeamsColumnStyle {
161
161
  columnName: string;
162
162
  styles: TeamsColumnStyleAttributes[];
163
163
  }
@@ -51,6 +51,7 @@ export declare function createTeamsValueCard(title: string, columnName: string,
51
51
  size: string;
52
52
  color: string | undefined;
53
53
  weight: string | undefined;
54
+ isSubtle: true | undefined;
54
55
  }[];
55
56
  })[];
56
57
  };
@@ -35,31 +35,33 @@ export function createTeamsTableCard(title, table, summary) {
35
35
  };
36
36
  }
37
37
  export function createTeamsValueCard(title, columnName, value, styles, summary) {
38
+ // NOTE: we only care about mapping style string (represented as row styles) to column styles.
38
39
  let rowStyles = [];
39
40
  let columnStyles = [];
40
41
  [rowStyles, columnStyles] = mapTeamsStyles([columnName], styles, [], rowStyles, columnStyles);
41
- console.log(styles);
42
- console.log(columnStyles);
43
42
  let color = undefined;
44
43
  let style = undefined;
45
44
  let weight = undefined;
46
45
  let isSubtle = undefined;
47
46
  let italic = undefined;
48
- for (const styles of columnStyles) {
49
- if (!!styles.color) {
50
- color = styles.color;
51
- }
52
- if (!!styles.style) {
53
- style = styles.style;
54
- }
55
- if (!!styles.weight) {
56
- weight = styles.weight;
57
- }
58
- if (!!styles.isSubtle) {
59
- isSubtle = styles.isSubtle;
60
- }
61
- if (!!styles.italic) {
62
- italic = styles.italic;
47
+ if (columnStyles.length > 0) {
48
+ const columnStyle = columnStyles[0];
49
+ for (const columnStyleAttributes of columnStyle.styles) {
50
+ if (!!columnStyleAttributes.color) {
51
+ color = columnStyleAttributes.color;
52
+ }
53
+ if (!!columnStyleAttributes.style) {
54
+ style = columnStyleAttributes.style;
55
+ }
56
+ if (!!columnStyleAttributes.weight) {
57
+ weight = columnStyleAttributes.weight;
58
+ }
59
+ if (!!columnStyleAttributes.isSubtle) {
60
+ isSubtle = columnStyleAttributes.isSubtle;
61
+ }
62
+ if (!!columnStyleAttributes.italic) {
63
+ italic = columnStyleAttributes.italic;
64
+ }
63
65
  }
64
66
  }
65
67
  return {
@@ -79,7 +81,8 @@ export function createTeamsValueCard(title, columnName, value, styles, summary)
79
81
  wrap: true,
80
82
  size: "ExtraLarge",
81
83
  color,
82
- weight
84
+ weight,
85
+ isSubtle
83
86
  }
84
87
  ]
85
88
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.6.19",
3
+ "version": "8.6.21",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",