@cellaware/utils 9.4.1 → 9.4.3

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.
@@ -12,6 +12,7 @@ export interface DatagridStateBase {
12
12
  export interface ChartSettings {
13
13
  labels: boolean;
14
14
  trendline: boolean;
15
+ palette: 'single' | 'palette' | 'divergent';
15
16
  }
16
17
  /** Since chart settings were added late, we need to make sure the structure is full/complete at any given time. */
17
18
  export declare function initChartSettings(chartSettings?: ChartSettings): ChartSettings;
@@ -124,13 +125,16 @@ export declare enum ConditionalFormatStyle {
124
125
  RED_BACKGROUND = "conditional-format-style-red-background",
125
126
  BLUE_BACKGROUND = "conditional-format-style-blue-background",
126
127
  PURPLE_BACKGROUND = "conditional-format-style-purple-background",
128
+ GRAY_BACKGROUND = "conditional-format-style-gray-background",
127
129
  BOLD = "conditional-format-style-bold",
128
130
  GREEN_BOLD = "conditional-format-style-green-bold",
129
131
  YELLOW_BOLD = "conditional-format-style-yellow-bold",
130
132
  RED_BOLD = "conditional-format-style-red-bold",
131
133
  BLUE_BOLD = "conditional-format-style-blue-bold",
132
134
  PURPLE_BOLD = "conditional-format-style-purple-bold",
133
- NOT_IMPORTANT = "conditional-format-style-not-important"
135
+ GRAY_BOLD = "conditional-format-style-gray-bold",
136
+ NOT_IMPORTANT = "conditional-format-style-not-important",
137
+ STRIKETHROUGH = "conditional-format-style-strikethrough"
134
138
  }
135
139
  export interface ConditionalFormat {
136
140
  sequence: number;
@@ -14,7 +14,8 @@ export function initChartSettings(chartSettings) {
14
14
  else {
15
15
  return {
16
16
  labels: false,
17
- trendline: false
17
+ trendline: false,
18
+ palette: 'single'
18
19
  };
19
20
  }
20
21
  }
@@ -271,13 +272,16 @@ export var ConditionalFormatStyle;
271
272
  ConditionalFormatStyle["RED_BACKGROUND"] = "conditional-format-style-red-background";
272
273
  ConditionalFormatStyle["BLUE_BACKGROUND"] = "conditional-format-style-blue-background";
273
274
  ConditionalFormatStyle["PURPLE_BACKGROUND"] = "conditional-format-style-purple-background";
275
+ ConditionalFormatStyle["GRAY_BACKGROUND"] = "conditional-format-style-gray-background";
274
276
  ConditionalFormatStyle["BOLD"] = "conditional-format-style-bold";
275
277
  ConditionalFormatStyle["GREEN_BOLD"] = "conditional-format-style-green-bold";
276
278
  ConditionalFormatStyle["YELLOW_BOLD"] = "conditional-format-style-yellow-bold";
277
279
  ConditionalFormatStyle["RED_BOLD"] = "conditional-format-style-red-bold";
278
280
  ConditionalFormatStyle["BLUE_BOLD"] = "conditional-format-style-blue-bold";
279
281
  ConditionalFormatStyle["PURPLE_BOLD"] = "conditional-format-style-purple-bold";
282
+ ConditionalFormatStyle["GRAY_BOLD"] = "conditional-format-style-gray-bold";
280
283
  ConditionalFormatStyle["NOT_IMPORTANT"] = "conditional-format-style-not-important";
284
+ ConditionalFormatStyle["STRIKETHROUGH"] = "conditional-format-style-strikethrough";
281
285
  })(ConditionalFormatStyle || (ConditionalFormatStyle = {}));
282
286
  export function evaluateConditionalFormat(condFmt, dataType, value) {
283
287
  const isBlank = (v) => v === null || v === undefined || (dataType !== 'number' && dataType !== 'boolean' && v === '');
@@ -930,6 +934,11 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
930
934
  color: 'Accent',
931
935
  style: 'accent'
932
936
  };
937
+ case ConditionalFormatStyle.GRAY_BACKGROUND:
938
+ return {
939
+ color: 'Default',
940
+ isSubtle: true
941
+ };
933
942
  case ConditionalFormatStyle.BOLD:
934
943
  return {
935
944
  weight: 'Bolder'
@@ -955,12 +964,24 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
955
964
  color: 'Accent',
956
965
  weight: 'Bolder'
957
966
  };
967
+ case ConditionalFormatStyle.GRAY_BOLD:
968
+ return {
969
+ color: 'Default',
970
+ isSubtle: true,
971
+ weight: 'Bolder'
972
+ };
958
973
  case ConditionalFormatStyle.NOT_IMPORTANT:
959
974
  return {
960
975
  isSubtle: true,
961
976
  italic: true,
962
977
  weight: 'Lighter'
963
978
  };
979
+ case ConditionalFormatStyle.STRIKETHROUGH:
980
+ // Adaptive Card TextBlock does not support strikethrough.
981
+ // Handle this when constructing the TextBlock text if desired.
982
+ return {
983
+ isSubtle: true
984
+ };
964
985
  default:
965
986
  return {};
966
987
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "9.4.1",
3
+ "version": "9.4.3",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",