@cellaware/utils 9.4.2 → 9.4.4

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.
@@ -1,5 +1,5 @@
1
1
  import { DataContext } from "./client.js";
2
- import { DatagridStateBase } from "./datagrid.js";
2
+ import { ColumnFormat } from "./datagrid.js";
3
3
  import { Tag } from "./tag.js";
4
4
  export declare const BI_STUDIO_VISIBILITY_PRIVATE = "private";
5
5
  export declare const BI_STUDIO_VISIBILITY_PUBLIC = "public";
@@ -19,14 +19,14 @@ export interface BICanvas {
19
19
  customerLevel?: boolean;
20
20
  }
21
21
  export declare function initBICanvas(): BICanvas;
22
- export interface BICanvasCustomWidgetDatagridState extends DatagridStateBase {
22
+ export interface BICanvasCustomWidget {
23
23
  widgetId: string;
24
+ columnFormats: ColumnFormat[];
24
25
  }
25
26
  export interface BICanvasState {
26
27
  pages: any[];
27
28
  selectedPageId: string;
28
- /** Custom widget datagrid states */
29
- datagridStates: BICanvasCustomWidgetDatagridState[];
29
+ customWidgets: BICanvasCustomWidget[];
30
30
  }
31
31
  export declare function initBICanvasState(): BICanvasState;
32
32
  export interface BiCanvasUsage {
@@ -22,7 +22,7 @@ export function initBICanvasState() {
22
22
  return {
23
23
  pages: [{ id: 'page-1' }],
24
24
  selectedPageId: 'page-1',
25
- datagridStates: []
25
+ customWidgets: []
26
26
  };
27
27
  }
28
28
  export function initBIDataSource() {
@@ -125,13 +125,16 @@ export declare enum ConditionalFormatStyle {
125
125
  RED_BACKGROUND = "conditional-format-style-red-background",
126
126
  BLUE_BACKGROUND = "conditional-format-style-blue-background",
127
127
  PURPLE_BACKGROUND = "conditional-format-style-purple-background",
128
+ GRAY_BACKGROUND = "conditional-format-style-gray-background",
128
129
  BOLD = "conditional-format-style-bold",
129
130
  GREEN_BOLD = "conditional-format-style-green-bold",
130
131
  YELLOW_BOLD = "conditional-format-style-yellow-bold",
131
132
  RED_BOLD = "conditional-format-style-red-bold",
132
133
  BLUE_BOLD = "conditional-format-style-blue-bold",
133
134
  PURPLE_BOLD = "conditional-format-style-purple-bold",
134
- 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"
135
138
  }
136
139
  export interface ConditionalFormat {
137
140
  sequence: number;
@@ -272,13 +272,16 @@ export var ConditionalFormatStyle;
272
272
  ConditionalFormatStyle["RED_BACKGROUND"] = "conditional-format-style-red-background";
273
273
  ConditionalFormatStyle["BLUE_BACKGROUND"] = "conditional-format-style-blue-background";
274
274
  ConditionalFormatStyle["PURPLE_BACKGROUND"] = "conditional-format-style-purple-background";
275
+ ConditionalFormatStyle["GRAY_BACKGROUND"] = "conditional-format-style-gray-background";
275
276
  ConditionalFormatStyle["BOLD"] = "conditional-format-style-bold";
276
277
  ConditionalFormatStyle["GREEN_BOLD"] = "conditional-format-style-green-bold";
277
278
  ConditionalFormatStyle["YELLOW_BOLD"] = "conditional-format-style-yellow-bold";
278
279
  ConditionalFormatStyle["RED_BOLD"] = "conditional-format-style-red-bold";
279
280
  ConditionalFormatStyle["BLUE_BOLD"] = "conditional-format-style-blue-bold";
280
281
  ConditionalFormatStyle["PURPLE_BOLD"] = "conditional-format-style-purple-bold";
282
+ ConditionalFormatStyle["GRAY_BOLD"] = "conditional-format-style-gray-bold";
281
283
  ConditionalFormatStyle["NOT_IMPORTANT"] = "conditional-format-style-not-important";
284
+ ConditionalFormatStyle["STRIKETHROUGH"] = "conditional-format-style-strikethrough";
282
285
  })(ConditionalFormatStyle || (ConditionalFormatStyle = {}));
283
286
  export function evaluateConditionalFormat(condFmt, dataType, value) {
284
287
  const isBlank = (v) => v === null || v === undefined || (dataType !== 'number' && dataType !== 'boolean' && v === '');
@@ -931,6 +934,11 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
931
934
  color: 'Accent',
932
935
  style: 'accent'
933
936
  };
937
+ case ConditionalFormatStyle.GRAY_BACKGROUND:
938
+ return {
939
+ color: 'Default',
940
+ isSubtle: true
941
+ };
934
942
  case ConditionalFormatStyle.BOLD:
935
943
  return {
936
944
  weight: 'Bolder'
@@ -956,12 +964,24 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
956
964
  color: 'Accent',
957
965
  weight: 'Bolder'
958
966
  };
967
+ case ConditionalFormatStyle.GRAY_BOLD:
968
+ return {
969
+ color: 'Default',
970
+ isSubtle: true,
971
+ weight: 'Bolder'
972
+ };
959
973
  case ConditionalFormatStyle.NOT_IMPORTANT:
960
974
  return {
961
975
  isSubtle: true,
962
976
  italic: true,
963
977
  weight: 'Lighter'
964
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
+ };
965
985
  default:
966
986
  return {};
967
987
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "9.4.2",
3
+ "version": "9.4.4",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",