@cellaware/utils 8.11.19 → 8.11.20
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.
- package/dist/azure/cosmos.d.ts +112 -0
- package/dist/azure/cosmos.js +305 -0
- package/dist/azure/email.d.ts +3 -0
- package/dist/azure/email.js +20 -0
- package/dist/azure/function.d.ts +14 -0
- package/dist/azure/function.js +124 -0
- package/dist/azure/slot.d.ts +1 -0
- package/dist/azure/slot.js +4 -0
- package/dist/azure/storage.d.ts +14 -0
- package/dist/azure/storage.js +81 -0
- package/dist/chatwms/alert.d.ts +97 -0
- package/dist/chatwms/alert.js +74 -0
- package/dist/chatwms/azure/cosmos.d.ts +25 -0
- package/dist/chatwms/azure/cosmos.js +43 -0
- package/dist/chatwms/azure/function.d.ts +21 -0
- package/dist/chatwms/azure/function.js +29 -0
- package/dist/chatwms/azure/storage.d.ts +15 -0
- package/dist/chatwms/azure/storage.js +27 -0
- package/dist/chatwms/client.d.ts +18 -0
- package/dist/chatwms/client.js +48 -0
- package/dist/chatwms/cosmos.d.ts +24 -0
- package/dist/chatwms/cosmos.js +532 -0
- package/dist/chatwms/dashboard.d.ts +80 -0
- package/dist/chatwms/dashboard.js +17 -0
- package/dist/chatwms/datagrid.d.ts +215 -0
- package/dist/chatwms/datagrid.js +1454 -0
- package/dist/chatwms/developer.d.ts +27 -0
- package/dist/chatwms/developer.js +12 -0
- package/dist/chatwms/github/issue.d.ts +1 -0
- package/dist/chatwms/github/issue.js +4 -0
- package/dist/chatwms/instance.d.ts +16 -0
- package/dist/chatwms/instance.js +18 -0
- package/dist/chatwms/integration.d.ts +24 -0
- package/dist/chatwms/integration.js +19 -0
- package/dist/chatwms/pdf.d.ts +95 -0
- package/dist/chatwms/pdf.js +147 -0
- package/dist/chatwms/report.d.ts +126 -0
- package/dist/chatwms/report.js +55 -0
- package/dist/chatwms/response.d.ts +18 -0
- package/dist/chatwms/response.js +25 -0
- package/dist/chatwms/search.d.ts +12 -0
- package/dist/chatwms/search.js +9 -0
- package/dist/chatwms/teams.d.ts +237 -0
- package/dist/chatwms/teams.js +205 -0
- package/dist/chatwms/user.d.ts +31 -0
- package/dist/chatwms/user.js +42 -0
- package/dist/chatwms/warehouse.d.ts +3 -0
- package/dist/chatwms/warehouse.js +3 -0
- package/dist/github/issue.d.ts +1 -0
- package/dist/github/issue.js +23 -0
- package/dist/llm/chain-store.d.ts +49 -0
- package/dist/llm/chain-store.js +284 -0
- package/dist/llm/cost.d.ts +3 -0
- package/dist/llm/cost.js +42 -0
- package/dist/llm/model.d.ts +12 -0
- package/dist/llm/model.js +1 -0
- package/dist/stopwatch.d.ts +8 -0
- package/dist/stopwatch.js +36 -0
- package/dist/util.d.ts +45 -0
- package/dist/util.js +288 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
export declare const DATAGRID_HTML_ROWS = 1000;
|
|
2
|
+
export declare const DATAGRID_HTML_COLS = 8;
|
|
3
|
+
export declare const DATAGRID_TEAMS_ROWS = 24;
|
|
4
|
+
export interface DatagridStateBase {
|
|
5
|
+
columnState?: ColumnState[];
|
|
6
|
+
columnGroupState?: any[];
|
|
7
|
+
isPivotMode?: boolean;
|
|
8
|
+
filterModel?: FilterModel;
|
|
9
|
+
columnFormats?: ColumnFormat[];
|
|
10
|
+
}
|
|
11
|
+
export interface DatagridState extends DatagridStateBase {
|
|
12
|
+
adjRows: any[];
|
|
13
|
+
}
|
|
14
|
+
export declare function initDatagridState(): DatagridState;
|
|
15
|
+
export interface VisualDatagridState extends DatagridState {
|
|
16
|
+
chartRows: any[];
|
|
17
|
+
html: string;
|
|
18
|
+
teamsRows: any[];
|
|
19
|
+
htmlTranspose: string;
|
|
20
|
+
teamsTranspose: any[];
|
|
21
|
+
}
|
|
22
|
+
export declare function initVisualDatagridState(): VisualDatagridState;
|
|
23
|
+
export type ColumnState = {
|
|
24
|
+
/** Maps to ColumnFormat `name`. */
|
|
25
|
+
colId: string;
|
|
26
|
+
hide?: boolean | null;
|
|
27
|
+
sort?: 'asc' | 'desc' | null;
|
|
28
|
+
sortIndex?: number | null;
|
|
29
|
+
aggFunc?: string | null;
|
|
30
|
+
pivot?: boolean;
|
|
31
|
+
pivotIndex?: number | null;
|
|
32
|
+
rowGroup?: boolean;
|
|
33
|
+
rowGroupIndex?: number | null;
|
|
34
|
+
pinned?: 'left' | 'right' | null;
|
|
35
|
+
};
|
|
36
|
+
type FilterType = 'text' | 'number' | 'set';
|
|
37
|
+
type Operator = 'AND' | 'OR';
|
|
38
|
+
type SimpleCondition = {
|
|
39
|
+
filterType: FilterType;
|
|
40
|
+
type: string;
|
|
41
|
+
filter?: any;
|
|
42
|
+
filterTo?: any;
|
|
43
|
+
values?: any[];
|
|
44
|
+
};
|
|
45
|
+
type CompoundFilter = {
|
|
46
|
+
filterType: FilterType;
|
|
47
|
+
operator: Operator;
|
|
48
|
+
conditions: SimpleCondition[];
|
|
49
|
+
};
|
|
50
|
+
type ColumnFilter = SimpleCondition | CompoundFilter;
|
|
51
|
+
type FilterModel = Record<string, ColumnFilter>;
|
|
52
|
+
export interface ColumnFormat {
|
|
53
|
+
/** Maps to ColumnState `colId`. */
|
|
54
|
+
name: string;
|
|
55
|
+
displayName: string;
|
|
56
|
+
/** `text` | `number` | `date` | `boolean` */
|
|
57
|
+
type: string;
|
|
58
|
+
valueFormat: ValueFormat;
|
|
59
|
+
conditionalFormats: ConditionalFormat[];
|
|
60
|
+
}
|
|
61
|
+
export declare const DEFAULT_VALUE_FORMAT_VALUE = "none";
|
|
62
|
+
export interface ValueFormat {
|
|
63
|
+
/** `none` | `lower` | `upper` | `title` */
|
|
64
|
+
txtCaseVal: string;
|
|
65
|
+
/** `none` | `0` | `1` | `2` | `3` | `4` */
|
|
66
|
+
numRoundVal: string;
|
|
67
|
+
/** `none` | `on` */
|
|
68
|
+
numCommaVal: string;
|
|
69
|
+
/** `none` | `dollar` */
|
|
70
|
+
numCurrencyVal: string;
|
|
71
|
+
/** `none` | `1` | `100` */
|
|
72
|
+
numPercentVal: string;
|
|
73
|
+
/** `none` | `slash` | `dash` */
|
|
74
|
+
dteSeparatorVal: string;
|
|
75
|
+
/** `none` | `numeric` | `2-digit` */
|
|
76
|
+
dteYearVal: string;
|
|
77
|
+
/** `none` | `numeric` | `2-digit` | `long` | `short` */
|
|
78
|
+
dteMonthVal: string;
|
|
79
|
+
/** `none` | `numeric` | `2-digit` */
|
|
80
|
+
dteDayVal: string;
|
|
81
|
+
/** `none` | `long` | `short` */
|
|
82
|
+
dteWeekdayVal: string;
|
|
83
|
+
/** `none` | `h12` | `h24` (we will translate to `h23`) */
|
|
84
|
+
dteHourcycleVal: string;
|
|
85
|
+
/** `none` | `numeric` | `2-digit` */
|
|
86
|
+
dteHourVal: string;
|
|
87
|
+
/** `none` | `numeric` | `2-digit` */
|
|
88
|
+
dteMinuteVal: string;
|
|
89
|
+
/** `none` | `numeric` | `2-digit` */
|
|
90
|
+
dteSecondVal: string;
|
|
91
|
+
}
|
|
92
|
+
export declare function evaluateValueFormat(colFmt: ColumnFormat, value: any, locale: string): any;
|
|
93
|
+
export declare function formatNumberEnabled(fmt: ValueFormat): boolean;
|
|
94
|
+
export declare enum ConditionalFormatRule {
|
|
95
|
+
CONTAINS = "conditional-format-rule-contains",
|
|
96
|
+
DOES_NOT_CONTAIN = "conditional-format-rule-does-not-contain",
|
|
97
|
+
BEGINS_WITH = "conditional-format-rule-begins-with",
|
|
98
|
+
ENDS_WITH = "conditional-format-rule-ends-with",
|
|
99
|
+
GREATER_THAN = "conditional-format-rule-greater-than",
|
|
100
|
+
GREATER_THAN_OR_EQUAL_TO = "conditional-format-rule-greater-than-or-equal-to",
|
|
101
|
+
LESS_THAN = "conditional-format-rule-less-than",
|
|
102
|
+
LESS_THAN_OR_EQUAL_TO = "conditional-format-rule-less-than-or-equal-to",
|
|
103
|
+
BETWEEN = "conditional-format-rule-between",
|
|
104
|
+
EQUALS = "conditional-format-rule-equals",
|
|
105
|
+
DOES_NOT_EQUAL = "conditional-format-rule-does-not-equal",
|
|
106
|
+
BLANK = "conditional-format-rule-blank",
|
|
107
|
+
NOT_BLANK = "conditional-format-rule-not-blank"
|
|
108
|
+
}
|
|
109
|
+
export declare const CONDITIONAL_FORMAT_RULES: string[];
|
|
110
|
+
export declare const CONDITIONAL_FORMAT_RULES_TEXT: string[];
|
|
111
|
+
export declare const CONDITIONAL_FORMAT_RULES_NUMBER: string[];
|
|
112
|
+
export declare const CONDITIONAL_FORMAT_RULES_BOOLEAN: string[];
|
|
113
|
+
export declare enum ConditionalFormatStyle {
|
|
114
|
+
NONE = "conditional-format-style-none",
|
|
115
|
+
GREEN_BACKGROUND = "conditional-format-style-green-background",
|
|
116
|
+
YELLOW_BACKGROUND = "conditional-format-style-yellow-background",
|
|
117
|
+
RED_BACKGROUND = "conditional-format-style-red-background",
|
|
118
|
+
BLUE_BACKGROUND = "conditional-format-style-blue-background",
|
|
119
|
+
PURPLE_BACKGROUND = "conditional-format-style-purple-background",
|
|
120
|
+
BOLD = "conditional-format-style-bold",
|
|
121
|
+
GREEN_BOLD = "conditional-format-style-green-bold",
|
|
122
|
+
YELLOW_BOLD = "conditional-format-style-yellow-bold",
|
|
123
|
+
RED_BOLD = "conditional-format-style-red-bold",
|
|
124
|
+
BLUE_BOLD = "conditional-format-style-blue-bold",
|
|
125
|
+
PURPLE_BOLD = "conditional-format-style-purple-bold",
|
|
126
|
+
NOT_IMPORTANT = "conditional-format-style-not-important"
|
|
127
|
+
}
|
|
128
|
+
export interface ConditionalFormat {
|
|
129
|
+
sequence: number;
|
|
130
|
+
rule: string;
|
|
131
|
+
value: string;
|
|
132
|
+
value2?: string;
|
|
133
|
+
style: string;
|
|
134
|
+
row: boolean;
|
|
135
|
+
}
|
|
136
|
+
export declare function evaluateConditionalFormat(condFmt: ConditionalFormat, dataType: string, value: any): boolean;
|
|
137
|
+
export declare function evaluateValueStyles(datagridState: DatagridStateBase, columnName: string, value: any): string[];
|
|
138
|
+
export interface DatagridCondition {
|
|
139
|
+
columnName: string;
|
|
140
|
+
/** `text` | `number` | `date` | `boolean` */
|
|
141
|
+
dataType: string;
|
|
142
|
+
rule: string;
|
|
143
|
+
value: string;
|
|
144
|
+
value2?: string;
|
|
145
|
+
}
|
|
146
|
+
export declare function initDatagridCondition(): DatagridCondition;
|
|
147
|
+
export declare function summarizeCondition(condition: DatagridCondition, localeMessageFn: (language: string, messageId: string) => Promise<string>): Promise<string>;
|
|
148
|
+
export declare function summarizeConditionMarkdown(condition: DatagridCondition, localeMessageFn: (language: string, messageId: string) => Promise<string>): Promise<string>;
|
|
149
|
+
export declare function summarizeConditionHtml(condition: DatagridCondition, localeMessageFn: (language: string, messageId: string) => Promise<string>): Promise<string>;
|
|
150
|
+
export declare function codifyCondition(condition: DatagridCondition): string;
|
|
151
|
+
/**
|
|
152
|
+
* Equivalent of `parseNumeric` in front end
|
|
153
|
+
*
|
|
154
|
+
* https://github.com/cellaware/chatwms-az-swa-ng/blob/development/src/app/utils/data.ts#L126
|
|
155
|
+
*/
|
|
156
|
+
export declare function stripNumericValueFormat(value: string | number | null | undefined): any;
|
|
157
|
+
interface HtmlColumnStyle {
|
|
158
|
+
columnName: string;
|
|
159
|
+
styles: string[];
|
|
160
|
+
}
|
|
161
|
+
interface TeamsColumnStyleAttributes {
|
|
162
|
+
color?: string;
|
|
163
|
+
style?: string;
|
|
164
|
+
weight?: string;
|
|
165
|
+
isSubtle?: boolean;
|
|
166
|
+
italic?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export interface TeamsColumnStyle {
|
|
169
|
+
columnName: string;
|
|
170
|
+
styles: TeamsColumnStyleAttributes[];
|
|
171
|
+
}
|
|
172
|
+
export declare function mapTeamsStyles(columnNames: string[], htmlRowStyles: string[], htmlColumnStyles: HtmlColumnStyle[], teamsRowStyles: string[], teamsColumnStyles: TeamsColumnStyle[]): [string[], TeamsColumnStyle[]];
|
|
173
|
+
export declare function mapTeamsTransposeStyles(htmlColumnStyle: HtmlColumnStyle): TeamsColumnStyle;
|
|
174
|
+
export declare function createTeamsTableColumns(columnNames: string[]): {
|
|
175
|
+
type: string;
|
|
176
|
+
cells: {
|
|
177
|
+
type: string;
|
|
178
|
+
items: {
|
|
179
|
+
type: string;
|
|
180
|
+
text: any;
|
|
181
|
+
size: string;
|
|
182
|
+
weight: string;
|
|
183
|
+
}[];
|
|
184
|
+
}[];
|
|
185
|
+
};
|
|
186
|
+
export declare function createTeamsTableRow(columnNames: string[], values: any[], rowStyles?: string[], columnStyles?: TeamsColumnStyle[]): {
|
|
187
|
+
type: string;
|
|
188
|
+
style: string | undefined;
|
|
189
|
+
cells: {
|
|
190
|
+
type: string;
|
|
191
|
+
style: string | undefined;
|
|
192
|
+
items: {
|
|
193
|
+
type: string;
|
|
194
|
+
text: any;
|
|
195
|
+
size: string;
|
|
196
|
+
color: string | undefined;
|
|
197
|
+
weight: string | undefined;
|
|
198
|
+
isSubtle: true | undefined;
|
|
199
|
+
}[];
|
|
200
|
+
}[];
|
|
201
|
+
};
|
|
202
|
+
export declare function createTeamsTransposeTableRow(row: {
|
|
203
|
+
key: string;
|
|
204
|
+
value: any;
|
|
205
|
+
}, columnStyle: TeamsColumnStyle): {
|
|
206
|
+
type: string;
|
|
207
|
+
cells: any[];
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* **Important:** `html` and `teamsRows` output will be limited to **1,000 rows/24 rows** and **8 columns**, respectively.
|
|
211
|
+
*
|
|
212
|
+
* ~All outputs respect and will be filtered by optional `condition` argument.~
|
|
213
|
+
*/
|
|
214
|
+
export declare function transformDatagrid(rows: any[], datagridState: DatagridStateBase, locale: string, condition?: DatagridCondition): VisualDatagridState;
|
|
215
|
+
export {};
|