@cellaware/utils 8.0.1 → 8.0.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.
Files changed (53) hide show
  1. package/package.json +1 -1
  2. package/dist/azure/cosmos.d.ts +0 -98
  3. package/dist/azure/cosmos.js +0 -276
  4. package/dist/azure/email.d.ts +0 -3
  5. package/dist/azure/email.js +0 -20
  6. package/dist/azure/function.d.ts +0 -14
  7. package/dist/azure/function.js +0 -124
  8. package/dist/azure/slot.d.ts +0 -1
  9. package/dist/azure/slot.js +0 -4
  10. package/dist/azure/storage.d.ts +0 -4
  11. package/dist/azure/storage.js +0 -67
  12. package/dist/chatwms/alert.d.ts +0 -86
  13. package/dist/chatwms/alert.js +0 -62
  14. package/dist/chatwms/azure/cosmos.d.ts +0 -21
  15. package/dist/chatwms/azure/cosmos.js +0 -34
  16. package/dist/chatwms/azure/function.d.ts +0 -21
  17. package/dist/chatwms/azure/function.js +0 -29
  18. package/dist/chatwms/azure/storage.d.ts +0 -5
  19. package/dist/chatwms/azure/storage.js +0 -17
  20. package/dist/chatwms/client.d.ts +0 -18
  21. package/dist/chatwms/client.js +0 -48
  22. package/dist/chatwms/dashboard.d.ts +0 -80
  23. package/dist/chatwms/dashboard.js +0 -17
  24. package/dist/chatwms/datagrid.d.ts +0 -120
  25. package/dist/chatwms/datagrid.js +0 -781
  26. package/dist/chatwms/developer.d.ts +0 -27
  27. package/dist/chatwms/developer.js +0 -12
  28. package/dist/chatwms/github/issue.d.ts +0 -1
  29. package/dist/chatwms/github/issue.js +0 -4
  30. package/dist/chatwms/instance.d.ts +0 -16
  31. package/dist/chatwms/instance.js +0 -18
  32. package/dist/chatwms/report.d.ts +0 -66
  33. package/dist/chatwms/report.js +0 -24
  34. package/dist/chatwms/response.d.ts +0 -12
  35. package/dist/chatwms/response.js +0 -13
  36. package/dist/chatwms/search.d.ts +0 -12
  37. package/dist/chatwms/search.js +0 -9
  38. package/dist/chatwms/user.d.ts +0 -27
  39. package/dist/chatwms/user.js +0 -40
  40. package/dist/github/issue.d.ts +0 -1
  41. package/dist/github/issue.js +0 -23
  42. package/dist/llm/chain-store.d.ts +0 -49
  43. package/dist/llm/chain-store.js +0 -284
  44. package/dist/llm/cost.d.ts +0 -3
  45. package/dist/llm/cost.js +0 -78
  46. package/dist/llm/model.d.ts +0 -12
  47. package/dist/llm/model.js +0 -1
  48. package/dist/stopwatch.d.ts +0 -8
  49. package/dist/stopwatch.js +0 -36
  50. package/dist/util.d.ts +0 -36
  51. package/dist/util.js +0 -257
  52. package/dist/version.d.ts +0 -4
  53. package/dist/version.js +0 -12
@@ -1,86 +0,0 @@
1
- import { DataContext } from "./client.js";
2
- import { DatagridCondition, DatagridStateBase } from "./datagrid.js";
3
- export declare const ALERT_VISIBILITY_PRIVATE = "private";
4
- export declare const ALERT_VISIBILITY_PUBLIC = "public";
5
- /**
6
- * Alert Strategy
7
- *
8
- * The strategy influences alert sending behavior when the previous alert execution
9
- * resulted in the condition being met/alert being sent. Traditionally, alert systems
10
- * will just send notifications over and over while the condition is met. This may be
11
- * good sometimes, but could be very annoying otherwise. The strategy allows users to
12
- * configure this behavior.
13
- *
14
- * - once: will send once when the condition is met and will not send again until the condition
15
- * is no longer met
16
- * - change: if the condition is met, will send if there was a meaningful change in the data
17
- * since last execution
18
- * - always: sends every time as long as the condition is met
19
- */
20
- export declare const ALERT_STRATEGY_ONCE = "once";
21
- export declare const ALERT_STRATEGY_CHANGE = "change";
22
- export declare const ALERT_STRATEGY_ALWAYS = "always";
23
- export interface Alert {
24
- alertId: string;
25
- alertTitle: string;
26
- enabled: boolean;
27
- visibility: string;
28
- readonly: boolean;
29
- folder: string;
30
- strategy: string;
31
- contentInfo: AlertContentInfo;
32
- conditionInfo: DatagridCondition;
33
- clientId: string;
34
- userId: string;
35
- }
36
- export declare function initAlert(): Alert;
37
- export interface InstanceAlert extends Alert {
38
- subscriptions: AlertSubscription[];
39
- }
40
- export interface AlertWithSubscriptions extends Alert {
41
- subscriptions: AlertSubscriptionType[];
42
- lastMet: string;
43
- lastSent: string;
44
- }
45
- export interface AlertContentInfo extends DatagridStateBase {
46
- contextName: DataContext;
47
- specification: string;
48
- query: string;
49
- summary: string;
50
- reviewOk?: boolean;
51
- reviewConfidence?: string;
52
- reviewFeedback?: string;
53
- tableGroups?: string[];
54
- developer?: boolean;
55
- }
56
- export interface AlertTestResult {
57
- met: boolean;
58
- rows: any[];
59
- hashedRows: string[];
60
- }
61
- export declare function initAlertTestResult(): AlertTestResult;
62
- export interface AlertExecution {
63
- alertId: string;
64
- alertTitle: string;
65
- strategy: string;
66
- conditionInfo: DatagridCondition;
67
- met: boolean;
68
- hashedRows: string[];
69
- error: string;
70
- sent: boolean;
71
- clientId: string;
72
- customer: string;
73
- warehouse: string;
74
- userId: string;
75
- datetime: Date;
76
- }
77
- export type AlertSubscriptionType = 'popup' | 'email' | 'teams';
78
- export declare const ALERT_SUBSCRIPTION_TYPES: string[];
79
- export interface AlertSubscription {
80
- alertId: string;
81
- type: AlertSubscriptionType;
82
- clientId: string;
83
- userId: string;
84
- userDetails: string;
85
- }
86
- export declare function initAlertSubscription(): AlertSubscription;
@@ -1,62 +0,0 @@
1
- import { CHATWMS_CONTEXT_NAME } from "./client.js";
2
- import { initDatagridCondition } from "./datagrid.js";
3
- export const ALERT_VISIBILITY_PRIVATE = 'private';
4
- export const ALERT_VISIBILITY_PUBLIC = 'public';
5
- /**
6
- * Alert Strategy
7
- *
8
- * The strategy influences alert sending behavior when the previous alert execution
9
- * resulted in the condition being met/alert being sent. Traditionally, alert systems
10
- * will just send notifications over and over while the condition is met. This may be
11
- * good sometimes, but could be very annoying otherwise. The strategy allows users to
12
- * configure this behavior.
13
- *
14
- * - once: will send once when the condition is met and will not send again until the condition
15
- * is no longer met
16
- * - change: if the condition is met, will send if there was a meaningful change in the data
17
- * since last execution
18
- * - always: sends every time as long as the condition is met
19
- */
20
- export const ALERT_STRATEGY_ONCE = 'once';
21
- export const ALERT_STRATEGY_CHANGE = 'change';
22
- export const ALERT_STRATEGY_ALWAYS = 'always';
23
- export function initAlert() {
24
- return {
25
- alertId: '',
26
- alertTitle: '',
27
- enabled: false,
28
- visibility: ALERT_VISIBILITY_PRIVATE,
29
- readonly: false,
30
- folder: '',
31
- strategy: ALERT_STRATEGY_ONCE,
32
- contentInfo: initAlertContentInfo(),
33
- conditionInfo: initDatagridCondition(),
34
- clientId: '',
35
- userId: ''
36
- };
37
- }
38
- function initAlertContentInfo() {
39
- return {
40
- contextName: CHATWMS_CONTEXT_NAME,
41
- specification: '',
42
- query: '',
43
- summary: ''
44
- };
45
- }
46
- export function initAlertTestResult() {
47
- return {
48
- met: false,
49
- rows: [],
50
- hashedRows: []
51
- };
52
- }
53
- export const ALERT_SUBSCRIPTION_TYPES = ['popup', 'email', 'teams'];
54
- export function initAlertSubscription() {
55
- return {
56
- alertId: '',
57
- type: 'email',
58
- clientId: '',
59
- userId: '',
60
- userDetails: ''
61
- };
62
- }
@@ -1,21 +0,0 @@
1
- export declare const PRODUCT_PARTITION_KEY = "/productId";
2
- /**
3
- * Default `partitionKey` is '/clientId'
4
- */
5
- export declare function chatwmsCosmosSelect(collectionId: string, query: string, partitionKey?: string): Promise<any[]>;
6
- /**
7
- * Default `partitionKey` is '/clientId'
8
- */
9
- export declare function chatwmsCosmosInsert(collectionId: string, data: any, partitionKey?: string): Promise<boolean>;
10
- /**
11
- * Default `partitionKey` is '/clientId'
12
- */
13
- export declare function chatwmsCosmosDelete(collectionId: string, query: string, partitionKey?: string): Promise<boolean>;
14
- /**
15
- * Default `partitionKey` is '/clientId'
16
- */
17
- export declare function chatwmsCosmosUpdate(collectionId: string, query: string, data: any, partitionKey?: string): Promise<boolean>;
18
- /**
19
- * Default `partitionKey` is '/clientId'
20
- */
21
- export declare function chatwmsCosmosUpsert(collectionId: string, query: string, data: any, partitionKey?: string): Promise<boolean>;
@@ -1,34 +0,0 @@
1
- import { cosmosDelete, cosmosInsert, cosmosSelect, cosmosUpdate, cosmosUpsert } from "../../azure/cosmos.js";
2
- const DATABASE_ID = 'chatwms';
3
- const PARTITION_KEY = '/clientId';
4
- export const PRODUCT_PARTITION_KEY = '/productId';
5
- /**
6
- * Default `partitionKey` is '/clientId'
7
- */
8
- export async function chatwmsCosmosSelect(collectionId, query, partitionKey) {
9
- return cosmosSelect(DATABASE_ID, collectionId, partitionKey ?? PARTITION_KEY, query);
10
- }
11
- /**
12
- * Default `partitionKey` is '/clientId'
13
- */
14
- export async function chatwmsCosmosInsert(collectionId, data, partitionKey) {
15
- return cosmosInsert(DATABASE_ID, collectionId, partitionKey ?? PARTITION_KEY, data);
16
- }
17
- /**
18
- * Default `partitionKey` is '/clientId'
19
- */
20
- export async function chatwmsCosmosDelete(collectionId, query, partitionKey) {
21
- return cosmosDelete(DATABASE_ID, collectionId, partitionKey ?? PARTITION_KEY, query);
22
- }
23
- /**
24
- * Default `partitionKey` is '/clientId'
25
- */
26
- export async function chatwmsCosmosUpdate(collectionId, query, data, partitionKey) {
27
- return cosmosUpdate(DATABASE_ID, collectionId, partitionKey ?? PARTITION_KEY, query, data);
28
- }
29
- /**
30
- * Default `partitionKey` is '/clientId'
31
- */
32
- export async function chatwmsCosmosUpsert(collectionId, query, data, partitionKey) {
33
- return cosmosUpsert(DATABASE_ID, collectionId, partitionKey ?? PARTITION_KEY, query, data);
34
- }
@@ -1,21 +0,0 @@
1
- export declare function chatwmsFunctionFetch(path: string, method: string, principal: string, body?: any): Promise<Response>;
2
- export declare function chatwmsFunctionFetchText(path: string, method: string, principal: string, body?: any): Promise<Response>;
3
- export declare function chatwmsFunctionStream(path: string, method: string, principal: string, body?: any): Promise<{
4
- headers: {
5
- "Content-Type": string;
6
- "Cache-Control": string;
7
- "Transfer-Encoding": string;
8
- };
9
- body: import("stream").Readable;
10
- }>;
11
- export declare function chatwmsGatewayFunctionFetch(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
12
- export declare function chatwmsGatewayFunctionFetchWithText(url: string, method: string, key: string, principal: string, text: string): Promise<Response>;
13
- export declare function chatwmsGatewayFunctionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
14
- export declare function chatwmsGatewayFunctionStream(url: string, method: string, key: string, principal: string, body?: any): Promise<{
15
- headers: {
16
- "Content-Type": string;
17
- "Cache-Control": string;
18
- "Transfer-Encoding": string;
19
- };
20
- body: import("stream").Readable;
21
- }>;
@@ -1,29 +0,0 @@
1
- import { functionFetchJson, functionFetchJsonWithText, functionFetchText, functionStreamJson } from "../../azure/function.js";
2
- const STREAM_ERROR_BODY = {
3
- answer: 'chatwms-unavailable-error',
4
- error: 'chatwms-unavailable-error'
5
- };
6
- export function chatwmsFunctionFetch(path, method, principal, body) {
7
- const url = `${process.env['CHATWMS_URL']}/${path}`;
8
- return functionFetchJson(url, method, process.env['CHATWMS_KEY'] ?? '', principal, body);
9
- }
10
- export function chatwmsFunctionFetchText(path, method, principal, body) {
11
- const url = `${process.env['CHATWMS_URL']}/${path}`;
12
- return functionFetchText(url, method, process.env['CHATWMS_KEY'] ?? '', principal, body);
13
- }
14
- export function chatwmsFunctionStream(path, method, principal, body) {
15
- const url = `${process.env['CHATWMS_URL']}/${path}`;
16
- return functionStreamJson(url, method, process.env['CHATWMS_KEY'] ?? '', principal, body, STREAM_ERROR_BODY);
17
- }
18
- export function chatwmsGatewayFunctionFetch(url, method, key, principal, body) {
19
- return functionFetchJson(url, method, key, principal, body);
20
- }
21
- export function chatwmsGatewayFunctionFetchWithText(url, method, key, principal, text) {
22
- return functionFetchJsonWithText(url, method, key, principal, text);
23
- }
24
- export function chatwmsGatewayFunctionFetchText(url, method, key, principal, body) {
25
- return functionFetchText(url, method, key, principal, body);
26
- }
27
- export function chatwmsGatewayFunctionStream(url, method, key, principal, body) {
28
- return functionStreamJson(url, method, key, principal, body, STREAM_ERROR_BODY);
29
- }
@@ -1,5 +0,0 @@
1
- export declare function chatwmsStorageGetBlobId(clientId: string, blobName: string): string;
2
- export declare function chatwmsStorageContainerCreate(): Promise<void>;
3
- export declare function chatwmsStorageBlobUpload(blobId: string, data: any): Promise<void>;
4
- export declare function chatwmsStorageBlobDelete(blobId: string): Promise<void>;
5
- export declare function chatwmsStorageBlobDownload(blobId: string): Promise<any[]>;
@@ -1,17 +0,0 @@
1
- import { storageBlobDelete, storageBlobDownload, storageBlobUpload, storageContainerCreate } from "../../azure/storage.js";
2
- const CONTAINER_CLIENT_ID = 'chatwms';
3
- export function chatwmsStorageGetBlobId(clientId, blobName) {
4
- return clientId.replaceAll('_', '-') + '-' + blobName;
5
- }
6
- export async function chatwmsStorageContainerCreate() {
7
- return storageContainerCreate(CONTAINER_CLIENT_ID);
8
- }
9
- export async function chatwmsStorageBlobUpload(blobId, data) {
10
- return storageBlobUpload(CONTAINER_CLIENT_ID, blobId, data);
11
- }
12
- export async function chatwmsStorageBlobDelete(blobId) {
13
- return storageBlobDelete(CONTAINER_CLIENT_ID, blobId);
14
- }
15
- export async function chatwmsStorageBlobDownload(blobId) {
16
- return storageBlobDownload(CONTAINER_CLIENT_ID, blobId);
17
- }
@@ -1,18 +0,0 @@
1
- export declare const CHATWMS_GENERIC_CLIENT_ID = "chatwms";
2
- export declare const CHATWMS_CONTEXT_NAME = "chatwms";
3
- export declare const DATABASE_CONTEXT_NAME = "database";
4
- export declare const COSMOS_CONTEXT_NAME = "cosmos";
5
- export type DataContext = 'chatwms' | 'database' | 'cosmos';
6
- export declare function chatwmsGetClientId(customer: string, warehouse: string): string;
7
- export declare function chatwmsGetWarehouseFromClientId(clientId: string, customer: string): string;
8
- export declare function chatwmsGetWarehouse(warehouse: string, organization?: string): string;
9
- export declare function chatwmsGetOrganizationFromWarehouse(warehouse: string): string | undefined;
10
- export declare function chatwmsGetOrganizationFromClientId(clientId: string, customer: string): string | undefined;
11
- export declare function chatwmsExtractWarehouseAndOrganizationFromWarehouse(warehouse: string): {
12
- warehouse: string;
13
- organization: string | undefined;
14
- };
15
- export declare function chatwmsExtractWarehouseAndOrganizationFromClientId(clientId: string, customer: string): {
16
- warehouse: string;
17
- organization: string | undefined;
18
- };
@@ -1,48 +0,0 @@
1
- export const CHATWMS_GENERIC_CLIENT_ID = 'chatwms';
2
- export const CHATWMS_CONTEXT_NAME = 'chatwms';
3
- export const DATABASE_CONTEXT_NAME = 'database';
4
- export const COSMOS_CONTEXT_NAME = 'cosmos';
5
- export function chatwmsGetClientId(customer, warehouse) {
6
- return `${customer}_${warehouse}`;
7
- }
8
- export function chatwmsGetWarehouseFromClientId(clientId, customer) {
9
- const prefix = `${customer}_`;
10
- return clientId.substring(clientId.indexOf(prefix) + prefix.length);
11
- }
12
- export function chatwmsGetWarehouse(warehouse, organization) {
13
- return !!organization ? `${organization}_${warehouse}` : warehouse;
14
- }
15
- export function chatwmsGetOrganizationFromWarehouse(warehouse) {
16
- const lastIdx = warehouse.lastIndexOf('_');
17
- if (lastIdx === -1) {
18
- return undefined;
19
- }
20
- const organization = warehouse.substring(0, lastIdx);
21
- // We could have multiple organization levels.
22
- const startIdx = organization.lastIndexOf('_');
23
- if (startIdx > -1) {
24
- return organization.substring(startIdx + 1);
25
- }
26
- return organization;
27
- }
28
- export function chatwmsGetOrganizationFromClientId(clientId, customer) {
29
- return chatwmsGetOrganizationFromWarehouse(chatwmsGetWarehouseFromClientId(clientId, customer));
30
- }
31
- export function chatwmsExtractWarehouseAndOrganizationFromWarehouse(warehouse) {
32
- const organization = chatwmsGetOrganizationFromWarehouse(warehouse);
33
- if (!!organization) {
34
- return {
35
- warehouse: warehouse.substring(warehouse.lastIndexOf('_') + 1),
36
- organization
37
- };
38
- }
39
- else {
40
- return {
41
- warehouse,
42
- organization: undefined
43
- };
44
- }
45
- }
46
- export function chatwmsExtractWarehouseAndOrganizationFromClientId(clientId, customer) {
47
- return chatwmsExtractWarehouseAndOrganizationFromWarehouse(chatwmsGetWarehouseFromClientId(clientId, customer));
48
- }
@@ -1,80 +0,0 @@
1
- import { DataContext } from "./client.js";
2
- import { DatagridStateBase } from "./datagrid.js";
3
- export declare const DASHBOARD_VISIBILITY_PRIVATE = "private";
4
- export declare const DASHBOARD_VISIBILITY_PUBLIC = "public";
5
- export declare const DASHBOARD_VISIBILITY_GLOBAL = "global";
6
- export interface DashboardFilter {
7
- sequence: number;
8
- name: string;
9
- sortDescending: boolean;
10
- defaultValue: boolean;
11
- }
12
- export interface DashboardParameter {
13
- sequence: number;
14
- name: string;
15
- required: boolean;
16
- exampleValue: string;
17
- }
18
- export interface Dashboard {
19
- dashboardId: string;
20
- dashboardTitle: string;
21
- dashboardRoute: string;
22
- visibility: string;
23
- readonly: boolean;
24
- filters: DashboardFilter[];
25
- parameters: DashboardParameter[];
26
- folder: string;
27
- clientId: string;
28
- userId: string;
29
- }
30
- export declare function initDashboard(): Dashboard;
31
- export interface WidgetDashboardFilter {
32
- sequence: number;
33
- filterName: string;
34
- columnName: string;
35
- }
36
- export interface WidgetDashboardParameter {
37
- sequence: number;
38
- parameterName: string;
39
- columnName: string;
40
- }
41
- export interface DashboardWidgetContentInfo extends DatagridStateBase {
42
- visualizationOption: string;
43
- dashboardFilters: WidgetDashboardFilter[];
44
- dashboardParameters: WidgetDashboardParameter[];
45
- contextName: DataContext;
46
- specification: string;
47
- query: string;
48
- summary: string;
49
- reviewOk?: boolean;
50
- reviewConfidence?: string;
51
- reviewFeedback?: string;
52
- tableGroups?: string[];
53
- developer?: boolean;
54
- archive?: boolean;
55
- referenceWidgetId?: string;
56
- }
57
- export interface DashboardWidgetLayoutInfo {
58
- id: string;
59
- x: number;
60
- y: number;
61
- w: number;
62
- h: number;
63
- }
64
- export interface DashboardWidget {
65
- widgetId: string;
66
- widgetTitle: string;
67
- dashboardId: string;
68
- contentInfo: DashboardWidgetContentInfo;
69
- layoutInfo: DashboardWidgetLayoutInfo;
70
- clientId: string;
71
- userId: string;
72
- }
73
- export interface DashboardUsage {
74
- dashboardId: string;
75
- dashboardTitle: string;
76
- visibility: string;
77
- clientId: string;
78
- userId: string;
79
- datetime: Date;
80
- }
@@ -1,17 +0,0 @@
1
- export const DASHBOARD_VISIBILITY_PRIVATE = 'private';
2
- export const DASHBOARD_VISIBILITY_PUBLIC = 'public';
3
- export const DASHBOARD_VISIBILITY_GLOBAL = 'global';
4
- export function initDashboard() {
5
- return {
6
- dashboardId: '',
7
- dashboardTitle: '',
8
- dashboardRoute: '',
9
- visibility: DASHBOARD_VISIBILITY_PRIVATE,
10
- readonly: false,
11
- filters: [],
12
- parameters: [],
13
- folder: '',
14
- clientId: '',
15
- userId: ''
16
- };
17
- }
@@ -1,120 +0,0 @@
1
- export interface DatagridStateBase {
2
- columnState?: ColumnState[];
3
- columnGroupState?: any[];
4
- isPivotMode?: boolean;
5
- filterModel?: FilterModel;
6
- columnFormats?: ColumnFormat[];
7
- }
8
- export interface DatagridState extends DatagridStateBase {
9
- adjRowData: any[];
10
- chartRowData: any[];
11
- }
12
- export declare function initDatagridState(): DatagridState;
13
- export type ColumnState = {
14
- colId: string;
15
- hide?: boolean | null;
16
- sort?: 'asc' | 'desc' | null;
17
- sortIndex?: number | null;
18
- aggFunc?: string | null;
19
- pivot?: boolean;
20
- pivotIndex?: number | null;
21
- rowGroup?: boolean;
22
- rowGroupIndex?: number | null;
23
- };
24
- type FilterType = 'text' | 'number' | 'set';
25
- type Operator = 'AND' | 'OR';
26
- type SimpleCondition = {
27
- filterType: FilterType;
28
- type: string;
29
- filter?: any;
30
- filterTo?: any;
31
- values?: any[];
32
- };
33
- type CompoundFilter = {
34
- filterType: FilterType;
35
- operator: Operator;
36
- conditions: SimpleCondition[];
37
- };
38
- type ColumnFilter = SimpleCondition | CompoundFilter;
39
- type FilterModel = Record<string, ColumnFilter>;
40
- export interface ColumnFormat {
41
- name: string;
42
- displayName: string;
43
- /** `text` | `number` | `date` | `boolean` */
44
- type: string;
45
- valueFormat: ValueFormat;
46
- conditionalFormats: ConditionalFormat[];
47
- }
48
- export declare const DEFAULT_VALUE_FORMAT_VALUE = "none";
49
- export interface ValueFormat {
50
- /** `none` | `lower` | `upper` | `title` */
51
- txtCaseVal: string;
52
- /** `none` | `0` | `1` | `2` | `3` | `4` */
53
- numRoundVal: string;
54
- /** `none` | `on` */
55
- numCommaVal: string;
56
- /** `none` | `dollar` */
57
- numCurrencyVal: string;
58
- /** `none` | `1` | `100` */
59
- numPercentVal: string;
60
- /** `none` | `slash` | `dash` */
61
- dteSeparatorVal: string;
62
- /** `none` | `numeric` | `2-digit` */
63
- dteYearVal: string;
64
- /** `none` | `numeric` | `2-digit` | `long` | `short` */
65
- dteMonthVal: string;
66
- /** `none` | `numeric` | `2-digit` */
67
- dteDayVal: string;
68
- /** `none` | `long` | `short` */
69
- dteWeekdayVal: string;
70
- /** `none` | `h12` | `h24` (we will translate to `h23`) */
71
- dteHourcycleVal: string;
72
- /** `none` | `numeric` | `2-digit` */
73
- dteHourVal: string;
74
- /** `none` | `numeric` | `2-digit` */
75
- dteMinuteVal: string;
76
- /** `none` | `numeric` | `2-digit` */
77
- dteSecondVal: string;
78
- }
79
- export declare function evaluateValueFormat(colFmt: ColumnFormat, value: any, locale: string): any;
80
- export declare function formatNumberEnabled(fmt: ValueFormat): boolean;
81
- export declare enum ConditionalFormatRule {
82
- CONTAINS = "conditional-format-rule-contains",
83
- DOES_NOT_CONTAIN = "conditional-format-rule-does-not-contain",
84
- BEGINS_WITH = "conditional-format-rule-begins-with",
85
- ENDS_WITH = "conditional-format-rule-ends-with",
86
- GREATER_THAN = "conditional-format-rule-greater-than",
87
- GREATER_THAN_OR_EQUAL_TO = "conditional-format-rule-greater-than-or-equal-to",
88
- LESS_THAN = "conditional-format-rule-less-than",
89
- LESS_THAN_OR_EQUAL_TO = "conditional-format-rule-less-than-or-equal-to",
90
- BETWEEN = "conditional-format-rule-between",
91
- EQUALS = "conditional-format-rule-equals",
92
- DOES_NOT_EQUAL = "conditional-format-rule-does-not-equal",
93
- BLANK = "conditional-format-rule-blank",
94
- NOT_BLANK = "conditional-format-rule-not-blank"
95
- }
96
- export declare const CONDITIONAL_FORMAT_RULES: string[];
97
- export declare const CONDITIONAL_FORMAT_RULES_TEXT: string[];
98
- export declare const CONDITIONAL_FORMAT_RULES_NUMBER: string[];
99
- export declare const CONDITIONAL_FORMAT_RULES_BOOLEAN: string[];
100
- export interface ConditionalFormat {
101
- sequence: number;
102
- rule: string;
103
- value: string;
104
- value2?: string;
105
- style: string;
106
- row: boolean;
107
- }
108
- export interface DatagridCondition {
109
- columnName: string;
110
- /** `text` | `number` | `date` | `boolean` */
111
- dataType: string;
112
- rule: string;
113
- value: string;
114
- value2?: string;
115
- }
116
- export declare function initDatagridCondition(): DatagridCondition;
117
- export declare function summarizeCondition(condition: DatagridCondition, localeMessageFn: (language: string, messageId: string) => Promise<string>): Promise<string>;
118
- export declare function codifyCondition(condition: DatagridCondition): string;
119
- export declare function transformDatagrid(rows: any[], datagridState: DatagridStateBase, locale: string, condition?: DatagridCondition): DatagridState;
120
- export {};