@cellaware/utils 8.21.0 → 9.0.0

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,3 +1,4 @@
1
+ import { DataContext } from "./client.js";
1
2
  import { DatagridStateBase } from "./datagrid.js";
2
3
  import { Tag } from "./tag.js";
3
4
  export declare const BI_STUDIO_VISIBILITY_PRIVATE = "private";
@@ -37,3 +38,65 @@ export interface BiCanvasUsage {
37
38
  datetime: Date;
38
39
  customerLevel?: boolean;
39
40
  }
41
+ export interface BIDataSourceExternal {
42
+ name: string;
43
+ displayName: string;
44
+ description: string;
45
+ tables: any[];
46
+ expressions: any[];
47
+ relationships: any[];
48
+ calendars: any[];
49
+ }
50
+ export interface BIDataSource {
51
+ dataSourceId: string;
52
+ revision: number;
53
+ dataSourceTitle: string;
54
+ dataSourceRoute: string;
55
+ contextName: DataContext;
56
+ description: string;
57
+ /** **Important:** will always be `public` for now -- we may allow `private` in the future. */
58
+ visibility: string;
59
+ readonly: boolean;
60
+ folder: string;
61
+ tags: Tag[];
62
+ views: BIDataSourceView[];
63
+ measures: BIDataSourceExpression[];
64
+ clientId: string;
65
+ userId: string;
66
+ }
67
+ export declare function initBIDataSource(): BIDataSource;
68
+ export interface BIDataSourceView {
69
+ tableName: string;
70
+ displayName: string;
71
+ description: string;
72
+ query: string;
73
+ columns: BIDataSourceColumn[];
74
+ compiledQuery: string;
75
+ disabled?: boolean;
76
+ }
77
+ export interface BIDataSourceColumnRelationship {
78
+ tableName: string;
79
+ columnName: string;
80
+ type: 'many-to-one' | 'one-to-one' | 'many-to-many';
81
+ }
82
+ export interface BIDataSourceColumnCalendar {
83
+ /** https://www.ag-grid.com/studio/angular/calendars/#fragment-reference */
84
+ fragments: string[];
85
+ }
86
+ export interface BIDataSourceColumn {
87
+ columnName: string;
88
+ dataType: string;
89
+ description: string;
90
+ comment: string;
91
+ relationship?: BIDataSourceColumnRelationship;
92
+ /** Important: a calendar represents the semantics of a **particular** date -- each date field should have its own calendar. */
93
+ calendar?: BIDataSourceColumnCalendar;
94
+ }
95
+ /** https://www.ag-grid.com/studio/angular/expressions/#api */
96
+ export interface BIDataSourceExpression {
97
+ columnName: string;
98
+ description: string;
99
+ comment: string;
100
+ /** https://www.ag-grid.com/studio/angular/expressions/#function-expression-operators */
101
+ expression: any;
102
+ }
@@ -1,3 +1,5 @@
1
+ import { CHATWMS_CONTEXT_NAME } from "./client.js";
2
+ import { chatwmsGenerateRevision } from "./revision.js";
1
3
  export const BI_STUDIO_VISIBILITY_PRIVATE = 'private';
2
4
  export const BI_STUDIO_VISIBILITY_PUBLIC = 'public';
3
5
  export const BI_STUDIO_VISIBILITY_GLOBAL = 'global';
@@ -23,3 +25,21 @@ export function initBICanvasState() {
23
25
  datagridStates: []
24
26
  };
25
27
  }
28
+ export function initBIDataSource() {
29
+ return {
30
+ dataSourceId: '',
31
+ revision: chatwmsGenerateRevision(),
32
+ dataSourceTitle: '',
33
+ dataSourceRoute: '',
34
+ contextName: CHATWMS_CONTEXT_NAME,
35
+ description: '',
36
+ visibility: BI_STUDIO_VISIBILITY_PRIVATE,
37
+ readonly: false,
38
+ folder: '',
39
+ tags: [],
40
+ views: [],
41
+ measures: [],
42
+ clientId: '',
43
+ userId: ''
44
+ };
45
+ }
@@ -0,0 +1,2 @@
1
+ export declare const CHATWMS_REVISION_DOES_NOT_EXIST = -1;
2
+ export declare function chatwmsGenerateRevision(): number;
@@ -0,0 +1,4 @@
1
+ export const CHATWMS_REVISION_DOES_NOT_EXIST = -1;
2
+ export function chatwmsGenerateRevision() {
3
+ return Date.now();
4
+ }
@@ -1,3 +1,4 @@
1
+ export declare const TAG_COLORS: string[];
1
2
  export interface Tag {
2
3
  name: string;
3
4
  color: string;
@@ -1 +1 @@
1
- export {};
1
+ export const TAG_COLORS = ['tag-red', 'tag-orange', 'tag-yellow', 'tag-green', 'tag-teal', 'tag-cyan', 'tag-blue', 'tag-indigo', 'tag-violet', 'tag-purple', 'tag-pink', 'tag-gray'];
@@ -24,6 +24,7 @@ export interface ChatWMSUserSettings {
24
24
  language: string;
25
25
  theme: ChatWMSTheme;
26
26
  analystOption?: ChatWMSAnalystOption;
27
+ /** Deprecated: this is a legacy value that can no longer be written to. It still exists here due legacy support requirements. */
27
28
  developer?: boolean;
28
29
  dateFormat?: ChatWMSDateFormat;
29
30
  clientId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.21.0",
3
+ "version": "9.0.0",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",