@quillsql/admin 1.8.3 → 1.8.5
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/index.cjs +8910 -6478
- package/dist/index.d.cts +623 -7
- package/dist/index.d.ts +623 -7
- package/dist/index.js +7891 -5468
- package/package.json +14 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { CSSProperties, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
import { EventTracking, InternalFilter, QuillReport as QuillReport$1, QuillTheme as QuillTheme$1 } from '@quillsql/react';
|
|
4
5
|
|
|
6
|
+
type QuillTenant = {
|
|
7
|
+
name: string;
|
|
8
|
+
tenantField: string;
|
|
9
|
+
clientId: string;
|
|
10
|
+
id: string;
|
|
11
|
+
query?: string;
|
|
12
|
+
mappings?: {
|
|
13
|
+
[key: string]: {
|
|
14
|
+
query: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
flags?: string[];
|
|
18
|
+
tenantIds?: {
|
|
19
|
+
id: string | number;
|
|
20
|
+
flag: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
23
|
+
scope: 'row' | 'schema' | 'database';
|
|
24
|
+
defaultId?: string | number;
|
|
25
|
+
fieldType?: 'string' | 'number';
|
|
26
|
+
tenantIdField?: string;
|
|
27
|
+
tenantLabelField?: string;
|
|
28
|
+
tenantFlagField?: string;
|
|
29
|
+
} & ({
|
|
30
|
+
tenantTable?: string;
|
|
31
|
+
tenantTableQuery?: never;
|
|
32
|
+
} | {
|
|
33
|
+
tenantTable?: never;
|
|
34
|
+
tenantTableQuery?: string;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
interface ClientFeatures {
|
|
38
|
+
cloudCache?: boolean;
|
|
39
|
+
[key: string]: boolean | undefined;
|
|
40
|
+
}
|
|
5
41
|
interface QuillTheme {
|
|
6
42
|
fontFamily?: string;
|
|
7
43
|
backgroundColor?: string;
|
|
@@ -25,10 +61,32 @@ interface QuillTheme {
|
|
|
25
61
|
barChartCornerRadius?: number;
|
|
26
62
|
barChartCornerRadiusRatio?: number;
|
|
27
63
|
}
|
|
64
|
+
interface QuillProviderClient {
|
|
65
|
+
name: string;
|
|
66
|
+
clientId: string;
|
|
67
|
+
publicKey: string;
|
|
68
|
+
queryEndpoint: string;
|
|
69
|
+
queryHeaders?: HeadersInit;
|
|
70
|
+
withCredentials: boolean;
|
|
71
|
+
databaseType?: string;
|
|
72
|
+
features?: ClientFeatures;
|
|
73
|
+
featureFlags?: {
|
|
74
|
+
[key: string]: boolean;
|
|
75
|
+
};
|
|
76
|
+
customerFieldType?: string;
|
|
77
|
+
allTenantTypes?: QuillTenant[];
|
|
78
|
+
defaultDashboard?: {
|
|
79
|
+
name: string;
|
|
80
|
+
owner: string;
|
|
81
|
+
};
|
|
82
|
+
ownerTenantFields?: string[];
|
|
83
|
+
schemaNames?: string[];
|
|
84
|
+
adminCustomerId?: string | number;
|
|
85
|
+
}
|
|
28
86
|
|
|
29
87
|
interface BaseQuillProviderProps {
|
|
30
88
|
publicKey?: string;
|
|
31
|
-
children?:
|
|
89
|
+
children?: React__default.ReactNode;
|
|
32
90
|
/** @deprecated Use clerkOrgId instead */
|
|
33
91
|
domainName?: string;
|
|
34
92
|
clerkOrgId?: string | null;
|
|
@@ -38,9 +96,11 @@ interface BaseQuillProviderProps {
|
|
|
38
96
|
theme?: QuillTheme;
|
|
39
97
|
eventTracking?: EventTracking | null;
|
|
40
98
|
onRequestAddVirtualTable?: () => void;
|
|
99
|
+
/** When set, managers hide their built-in environment dropdown (see `State.hideEnvDropdown`). */
|
|
100
|
+
hideEnvDropdown?: boolean;
|
|
41
101
|
}
|
|
42
102
|
interface QuillCloudProviderProps extends BaseQuillProviderProps {
|
|
43
|
-
queryEndpoint
|
|
103
|
+
queryEndpoint: never;
|
|
44
104
|
queryHeaders?: never;
|
|
45
105
|
withCredentials?: never;
|
|
46
106
|
}
|
|
@@ -50,7 +110,398 @@ interface SelfHostedProviderProps extends BaseQuillProviderProps {
|
|
|
50
110
|
withCredentials?: boolean;
|
|
51
111
|
}
|
|
52
112
|
type QuillProviderProps = QuillCloudProviderProps | SelfHostedProviderProps;
|
|
53
|
-
declare function AdminProvider({ children, publicKey, queryEndpoint, queryHeaders, withCredentials, clerkOrgId, onOnboardComplete, flagsList, getAuthorizationToken, theme, eventTracking, onRequestAddVirtualTable, }: QuillProviderProps): react_jsx_runtime.JSX.Element;
|
|
113
|
+
declare function AdminProvider({ children, publicKey, queryEndpoint, queryHeaders, withCredentials, clerkOrgId, onOnboardComplete, flagsList, getAuthorizationToken, theme, eventTracking, onRequestAddVirtualTable, hideEnvDropdown, }: QuillProviderProps): react_jsx_runtime.JSX.Element;
|
|
114
|
+
|
|
115
|
+
interface QuillFetchOptions {
|
|
116
|
+
client: Pick<QuillProviderClient, 'clientId' | 'queryEndpoint' | 'queryHeaders' | 'withCredentials'>;
|
|
117
|
+
task: string;
|
|
118
|
+
method?: string;
|
|
119
|
+
metadata: any;
|
|
120
|
+
abortSignal?: AbortSignal;
|
|
121
|
+
credentials?: RequestCredentials;
|
|
122
|
+
urlParameters?: string;
|
|
123
|
+
getToken: () => Promise<string>;
|
|
124
|
+
adminMode?: boolean;
|
|
125
|
+
}
|
|
126
|
+
interface QuillResults {
|
|
127
|
+
data?: any;
|
|
128
|
+
queries?: any;
|
|
129
|
+
status?: string;
|
|
130
|
+
error?: string;
|
|
131
|
+
message?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
interface ColumnsByTable {
|
|
135
|
+
tableName: string;
|
|
136
|
+
displayName: string;
|
|
137
|
+
columns: {
|
|
138
|
+
columnName: string;
|
|
139
|
+
displayName: string;
|
|
140
|
+
fieldType: string;
|
|
141
|
+
dataTypeId: number;
|
|
142
|
+
field: string;
|
|
143
|
+
}[];
|
|
144
|
+
}
|
|
145
|
+
interface Column {
|
|
146
|
+
field: string;
|
|
147
|
+
label: string;
|
|
148
|
+
format: AxisFormat;
|
|
149
|
+
name?: string;
|
|
150
|
+
}
|
|
151
|
+
interface ColumnInternal extends Column {
|
|
152
|
+
fieldType: string;
|
|
153
|
+
dataTypeID: number;
|
|
154
|
+
jsType: string;
|
|
155
|
+
table?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A set of valid format values for the x and y axes of dashboard items.
|
|
159
|
+
*/
|
|
160
|
+
type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy';
|
|
161
|
+
type Table = {
|
|
162
|
+
_id: string;
|
|
163
|
+
isSelectStar: boolean;
|
|
164
|
+
displayName: string;
|
|
165
|
+
name: string;
|
|
166
|
+
columns: ColumnInternal[];
|
|
167
|
+
viewQuery: string;
|
|
168
|
+
customFieldInfo: any;
|
|
169
|
+
broken?: boolean;
|
|
170
|
+
error?: string;
|
|
171
|
+
ownerTenantFields?: string[];
|
|
172
|
+
};
|
|
173
|
+
type Pivot = SingleAggregationPivot | MultiAggregationPivot;
|
|
174
|
+
interface BasePivot {
|
|
175
|
+
rowField?: string;
|
|
176
|
+
rowFieldType?: string;
|
|
177
|
+
columnField?: string;
|
|
178
|
+
columnFieldType?: string;
|
|
179
|
+
sort?: boolean;
|
|
180
|
+
sortDirection?: 'ASC' | 'DESC';
|
|
181
|
+
sortField?: string;
|
|
182
|
+
sortFieldType?: string;
|
|
183
|
+
title?: string;
|
|
184
|
+
triggerButtonText?: string;
|
|
185
|
+
rowLimit?: number;
|
|
186
|
+
columnValues?: string[];
|
|
187
|
+
}
|
|
188
|
+
interface SingleAggregationPivot extends BasePivot {
|
|
189
|
+
aggregationType: AggregationType;
|
|
190
|
+
valueField?: string;
|
|
191
|
+
valueField2?: string;
|
|
192
|
+
valueField2Type?: string;
|
|
193
|
+
valueFieldType?: string;
|
|
194
|
+
aggregations?: never;
|
|
195
|
+
}
|
|
196
|
+
interface MultiAggregationPivot extends BasePivot {
|
|
197
|
+
aggregationType?: never;
|
|
198
|
+
valueField?: never;
|
|
199
|
+
valueField2?: never;
|
|
200
|
+
valueField2Type?: never;
|
|
201
|
+
valueFieldType?: never;
|
|
202
|
+
aggregations: {
|
|
203
|
+
valueField?: string;
|
|
204
|
+
valueFieldType?: string;
|
|
205
|
+
valueField2?: string;
|
|
206
|
+
valueField2Type?: string;
|
|
207
|
+
aggregationType: AggregationType;
|
|
208
|
+
}[];
|
|
209
|
+
}
|
|
210
|
+
type AggregationType = 'sum' | 'average' | 'min' | 'max' | 'count' | 'avg' | 'percentage';
|
|
211
|
+
interface Pagination {
|
|
212
|
+
rowsPerPage: number;
|
|
213
|
+
rowsPerRequest: number;
|
|
214
|
+
page?: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* ## QuillReport
|
|
219
|
+
* Represents an individual item on a dashboard.
|
|
220
|
+
*
|
|
221
|
+
* Dashboard items can be charts, metric tiles, tables, etc. and can be styled
|
|
222
|
+
* however you'd like.
|
|
223
|
+
*
|
|
224
|
+
* ### API Reference
|
|
225
|
+
* @see https://docs.quillsql.com/components/quill-provider#quill-report
|
|
226
|
+
*/
|
|
227
|
+
interface QuillReport {
|
|
228
|
+
/** The report's unique id. */
|
|
229
|
+
id: string;
|
|
230
|
+
/** The name of the report. */
|
|
231
|
+
name: string;
|
|
232
|
+
/** The name of the dashboard this report belongs to. */
|
|
233
|
+
dashboardName: string;
|
|
234
|
+
/** The rows of data returned from this report's query. */
|
|
235
|
+
rows: {
|
|
236
|
+
[key: string]: string;
|
|
237
|
+
}[];
|
|
238
|
+
/** The columns data returned from this report's query. */
|
|
239
|
+
columns: Column[];
|
|
240
|
+
/** The type of this chart. */
|
|
241
|
+
chartType: string;
|
|
242
|
+
/** The table and field this report uses for date filtering, if any. */
|
|
243
|
+
dateField?: {
|
|
244
|
+
table: string;
|
|
245
|
+
field: string;
|
|
246
|
+
};
|
|
247
|
+
/** The pivot used in this query, if any. */
|
|
248
|
+
pivot: Pivot | null;
|
|
249
|
+
/** The label of the xAxis. */
|
|
250
|
+
xAxisLabel: string;
|
|
251
|
+
/** The field to use for this report's xAxis. */
|
|
252
|
+
xAxisField: string;
|
|
253
|
+
/** The format for this report's xAxis. */
|
|
254
|
+
xAxisFormat: AxisFormat;
|
|
255
|
+
/** The template flag for a report */
|
|
256
|
+
template?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* A list of metadata about the yAxes of this report.
|
|
259
|
+
*/
|
|
260
|
+
yAxisFields: {
|
|
261
|
+
/** The field for this yAxis. */
|
|
262
|
+
field: string;
|
|
263
|
+
/** The label to use for this yAxis. */
|
|
264
|
+
label: string;
|
|
265
|
+
/** The format of the data in this yAxis. */
|
|
266
|
+
format: AxisFormat;
|
|
267
|
+
}[];
|
|
268
|
+
/**
|
|
269
|
+
* The relative ordering of this report in relation to its siblings. Ordering
|
|
270
|
+
* starts at 1 and counts up (eg. 1, 2, 3, etc.).
|
|
271
|
+
*
|
|
272
|
+
* Also note that reports in the same section are first grouped by `chartType`
|
|
273
|
+
* and then each group is sorted by `order`. Currently, the first group is the
|
|
274
|
+
* `metric` reports and the last group is the `table` reports with the rest of
|
|
275
|
+
* the reports in between.
|
|
276
|
+
*/
|
|
277
|
+
order: number;
|
|
278
|
+
/**
|
|
279
|
+
* The rows of data returned from this report's query over the comparison date
|
|
280
|
+
* range as opposed to the primary date range.
|
|
281
|
+
*/
|
|
282
|
+
compareRows: {
|
|
283
|
+
[key: string]: string;
|
|
284
|
+
}[];
|
|
285
|
+
/** An array of filters that have been applied to this query. */
|
|
286
|
+
filtersApplied?: InternalFilter[];
|
|
287
|
+
pagination?: Pagination;
|
|
288
|
+
sort?: {
|
|
289
|
+
field: string;
|
|
290
|
+
direction: string;
|
|
291
|
+
};
|
|
292
|
+
rowCount: number;
|
|
293
|
+
queryString: string;
|
|
294
|
+
filterMap?: {
|
|
295
|
+
[key: string]: {
|
|
296
|
+
table: string;
|
|
297
|
+
field: string;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
/** The pivot row info. */
|
|
301
|
+
pivotRows?: {
|
|
302
|
+
[key: string]: string;
|
|
303
|
+
}[];
|
|
304
|
+
/**
|
|
305
|
+
* A list of metadata about the pivot yAxes of this report.
|
|
306
|
+
*/
|
|
307
|
+
pivotColumns?: ColumnInternal[];
|
|
308
|
+
}
|
|
309
|
+
interface QuillReportInternal extends QuillReport {
|
|
310
|
+
/** An array of queries that are used to construct the unprocessed report THIS WILL BE REMOVED SOON */
|
|
311
|
+
itemQuery?: string[];
|
|
312
|
+
/** An array of tables referenced by the report used */
|
|
313
|
+
referencedTables?: string[];
|
|
314
|
+
/** An mapping of table to the columns referenced in the table. */
|
|
315
|
+
referencedColumns?: {
|
|
316
|
+
[table: string]: string[];
|
|
317
|
+
};
|
|
318
|
+
/** An error message used for internal purposes */
|
|
319
|
+
error?: string;
|
|
320
|
+
/** An admin error message used for internal purposes */
|
|
321
|
+
adminError?: string;
|
|
322
|
+
/** An internal flag to force a report to trigger a reload from the backend */
|
|
323
|
+
triggerReload?: boolean;
|
|
324
|
+
/** An internal flag to force a report to trigger a reload from the backend */
|
|
325
|
+
columnInternal: ColumnInternal[];
|
|
326
|
+
/** Represents if the report is currently loading rows */
|
|
327
|
+
loading?: boolean;
|
|
328
|
+
/** Flags on this report */
|
|
329
|
+
flags?: {
|
|
330
|
+
[tenantField: string]: string[] | 'QUILL_ALL_TENANTS';
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
interface State {
|
|
335
|
+
loading: boolean;
|
|
336
|
+
publicKey: string;
|
|
337
|
+
queryEndpoint: string;
|
|
338
|
+
queryHeaders: object | undefined;
|
|
339
|
+
withCredentials: boolean | undefined;
|
|
340
|
+
client: any;
|
|
341
|
+
clients: any[];
|
|
342
|
+
activeQuery: string;
|
|
343
|
+
activeSavedQueryReportId: string;
|
|
344
|
+
activeEditItem: QuillReportInternal | undefined;
|
|
345
|
+
tables: Table[];
|
|
346
|
+
schema: any[];
|
|
347
|
+
databaseSchema: {
|
|
348
|
+
schema: ColumnsByTable[];
|
|
349
|
+
id: string;
|
|
350
|
+
loading: boolean;
|
|
351
|
+
} | undefined;
|
|
352
|
+
activeComponent: string;
|
|
353
|
+
reportId: any;
|
|
354
|
+
report: any;
|
|
355
|
+
theme: QuillTheme;
|
|
356
|
+
selectedDashboard: string | null;
|
|
357
|
+
dateFilter: any;
|
|
358
|
+
isSelfHosted: boolean;
|
|
359
|
+
navigateToDashboardManager?: () => void;
|
|
360
|
+
navigateToDashboardBuilder?: () => void;
|
|
361
|
+
navigateToVirtualTableBuilder?: (element: any) => void;
|
|
362
|
+
/** @deprecated Use clerkOrgId instead */
|
|
363
|
+
domainName?: string;
|
|
364
|
+
clerkOrgId?: string;
|
|
365
|
+
databaseTypeMismatch: {
|
|
366
|
+
show: boolean;
|
|
367
|
+
backendDatabaseType: string;
|
|
368
|
+
};
|
|
369
|
+
templateDashboard?: string;
|
|
370
|
+
selectedTenantField?: string;
|
|
371
|
+
selectedTenantValues?: (string | number)[];
|
|
372
|
+
selectedDashboardTenantIds?: (string | number)[];
|
|
373
|
+
mappableDashboardTenantIds?: (string | number)[];
|
|
374
|
+
mappableDashboardTenantIdsLoading?: boolean;
|
|
375
|
+
currentTenantIdentity?: {
|
|
376
|
+
tenantField: string;
|
|
377
|
+
tenantIds: (string | number)[];
|
|
378
|
+
}[] | (string | number)[];
|
|
379
|
+
activeSandboxId?: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* When true, dashboard / virtual-table surfaces omit the in-page environment
|
|
382
|
+
* selector (e.g. when the host app renders env selection in a global header).
|
|
383
|
+
*/
|
|
384
|
+
hideEnvDropdown?: boolean;
|
|
385
|
+
}
|
|
386
|
+
type Action = {
|
|
387
|
+
type: 'SET_CLIENT';
|
|
388
|
+
payload: any;
|
|
389
|
+
} | {
|
|
390
|
+
type: 'SET_CLIENT_AND_TENANTS';
|
|
391
|
+
payload: any;
|
|
392
|
+
} | {
|
|
393
|
+
type: 'SET_CLIENTS';
|
|
394
|
+
payload: any[];
|
|
395
|
+
} | {
|
|
396
|
+
type: 'UPDATE_CLIENTS';
|
|
397
|
+
payload: any;
|
|
398
|
+
} | {
|
|
399
|
+
type: 'SET_ACTIVE_QUERY';
|
|
400
|
+
payload: string;
|
|
401
|
+
} | {
|
|
402
|
+
type: 'SET_ACTIVE_SAVED_QUERY_REPORT_ID';
|
|
403
|
+
payload: string;
|
|
404
|
+
} | {
|
|
405
|
+
type: 'SET_ACTIVE_EDIT_ITEM';
|
|
406
|
+
payload: any;
|
|
407
|
+
} | {
|
|
408
|
+
type: 'SET_TABLES';
|
|
409
|
+
payload: Table[];
|
|
410
|
+
} | {
|
|
411
|
+
type: 'SET_ACTIVE_COMPONENT';
|
|
412
|
+
payload: string;
|
|
413
|
+
} | {
|
|
414
|
+
type: 'SET_REPORT_ID';
|
|
415
|
+
payload: any;
|
|
416
|
+
} | {
|
|
417
|
+
type: 'SET_SELECTED_DASHBOARD_NAME';
|
|
418
|
+
payload: {
|
|
419
|
+
dashboard: string | null;
|
|
420
|
+
reportId?: string | null;
|
|
421
|
+
} | null;
|
|
422
|
+
} | {
|
|
423
|
+
type: 'SET_NAVIGATE_TO_DASHBOARD_MANAGER';
|
|
424
|
+
payload: () => void;
|
|
425
|
+
} | {
|
|
426
|
+
type: 'SET_NAVIGATE_TO_DASHBOARD_BUILDER';
|
|
427
|
+
payload: () => void;
|
|
428
|
+
} | {
|
|
429
|
+
type: 'SET_NAVIGATE_TO_VIRTUAL_TABLE_BUILDER';
|
|
430
|
+
payload: () => void;
|
|
431
|
+
} | {
|
|
432
|
+
type: 'SET_DATABASE_TYPE_MISMATCH';
|
|
433
|
+
payload: {
|
|
434
|
+
show: boolean;
|
|
435
|
+
backendDatabaseType: string;
|
|
436
|
+
};
|
|
437
|
+
} | {
|
|
438
|
+
type: 'SET_DATABASE_SCHEMA';
|
|
439
|
+
payload: {
|
|
440
|
+
schema: ColumnsByTable[];
|
|
441
|
+
id: string;
|
|
442
|
+
loading: boolean;
|
|
443
|
+
};
|
|
444
|
+
} | {
|
|
445
|
+
type: 'SET_TEMPLATE_DASHBOARD';
|
|
446
|
+
payload: string;
|
|
447
|
+
} | {
|
|
448
|
+
type: 'SET_SELECTED_TENANT_FOREIGN_KEY';
|
|
449
|
+
payload: string | undefined;
|
|
450
|
+
} | {
|
|
451
|
+
type: 'SET_SELECTED_TENANT_VALUES';
|
|
452
|
+
payload: (string | number)[] | undefined;
|
|
453
|
+
} | {
|
|
454
|
+
type: 'SET_SELECTED_DASHBOARD_TENANT_IDS';
|
|
455
|
+
payload: (string | number)[] | undefined;
|
|
456
|
+
} | {
|
|
457
|
+
type: 'SET_MAPPABLE_DASHBOARD_TENANT_IDS';
|
|
458
|
+
payload: (string | number)[] | undefined;
|
|
459
|
+
} | {
|
|
460
|
+
type: 'SET_MAPPABLE_DASHBOARD_TENANT_IDS_LOADING';
|
|
461
|
+
payload: boolean;
|
|
462
|
+
} | {
|
|
463
|
+
type: 'SET_CURRENT_TENANT_IDENTITY';
|
|
464
|
+
payload: {
|
|
465
|
+
tenantField: string;
|
|
466
|
+
tenantIds: (string | number)[];
|
|
467
|
+
}[] | (string | number)[] | undefined;
|
|
468
|
+
} | {
|
|
469
|
+
type: 'SET_QUERY_HEADERS';
|
|
470
|
+
payload: object | undefined;
|
|
471
|
+
} | {
|
|
472
|
+
type: 'SET_PUBLIC_KEY';
|
|
473
|
+
payload: string;
|
|
474
|
+
} | {
|
|
475
|
+
type: 'SET_CLERK_ORG_ID';
|
|
476
|
+
payload: string;
|
|
477
|
+
} | {
|
|
478
|
+
type: 'SET_ALL_STATE';
|
|
479
|
+
payload: any;
|
|
480
|
+
} | {
|
|
481
|
+
type: 'SET_ACTIVE_SANDBOX_ID';
|
|
482
|
+
payload: string | null;
|
|
483
|
+
} | {
|
|
484
|
+
type: 'SET_HIDE_ENV_DROPDOWN';
|
|
485
|
+
payload: boolean;
|
|
486
|
+
} | {
|
|
487
|
+
type: 'SET_ASK_AI_BUTTON';
|
|
488
|
+
payload: React.ComponentType<{
|
|
489
|
+
label: string;
|
|
490
|
+
prompt: string;
|
|
491
|
+
}> | undefined;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
declare const useAdmin: () => {
|
|
495
|
+
state: State;
|
|
496
|
+
dispatch: React.Dispatch<Action>;
|
|
497
|
+
clientLoading: boolean;
|
|
498
|
+
setClient: (client: QuillProviderClient, fetchTenantInfo?: boolean, preserveSelectedDashboard?: boolean) => void;
|
|
499
|
+
getToken: () => Promise<string>;
|
|
500
|
+
quillFetchWithToken: (options: Omit<QuillFetchOptions, "getToken">) => Promise<QuillResults>;
|
|
501
|
+
eventTracking: EventTracking | null;
|
|
502
|
+
onOnboardComplete?: (client: any) => void;
|
|
503
|
+
onRequestAddVirtualTable?: () => void;
|
|
504
|
+
};
|
|
54
505
|
|
|
55
506
|
declare function DashboardManager({ navigateToVirtualTableManager: navigateToVirtualTableManager, containerStyle, }: {
|
|
56
507
|
navigateToVirtualTableManager?: () => void;
|
|
@@ -59,7 +510,7 @@ declare function DashboardManager({ navigateToVirtualTableManager: navigateToVir
|
|
|
59
510
|
|
|
60
511
|
declare function ChartQueryBuilder({ activeComponent, onExit, containerStyle, destinationDashboard, }: {
|
|
61
512
|
activeComponent: string;
|
|
62
|
-
onExit?: (report?: QuillReport) => void;
|
|
513
|
+
onExit?: (report?: QuillReport$1) => void;
|
|
63
514
|
containerStyle?: CSSProperties;
|
|
64
515
|
destinationDashboard: string;
|
|
65
516
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -75,4 +526,169 @@ declare function CreateEnvironment({ onOnboardComplete, containerStyle, }: {
|
|
|
75
526
|
containerStyle?: CSSProperties;
|
|
76
527
|
}): react_jsx_runtime.JSX.Element;
|
|
77
528
|
|
|
78
|
-
|
|
529
|
+
interface EnvSelectPopoverProps {
|
|
530
|
+
clients: any[];
|
|
531
|
+
setClient: (client: any) => void;
|
|
532
|
+
client: any;
|
|
533
|
+
theme: any;
|
|
534
|
+
onSelectedEditEnvironment?: (environment: string) => void;
|
|
535
|
+
parentRef: React.RefObject<HTMLDivElement | null>;
|
|
536
|
+
isLoading?: boolean;
|
|
537
|
+
onCreateNewEnvironment?: () => void;
|
|
538
|
+
hideLabel?: boolean;
|
|
539
|
+
triggerStyle?: React.CSSProperties;
|
|
540
|
+
}
|
|
541
|
+
declare function EnvSelectPopover({ clients, setClient, client, theme, onSelectedEditEnvironment, parentRef, isLoading, onCreateNewEnvironment, hideLabel, triggerStyle, }: EnvSelectPopoverProps): react_jsx_runtime.JSX.Element;
|
|
542
|
+
|
|
543
|
+
declare function CreateEnvironmentModal({ showCreateEnvironmentModal, setShowCreateEnvironmentModal, }: {
|
|
544
|
+
showCreateEnvironmentModal: boolean;
|
|
545
|
+
setShowCreateEnvironmentModal: (show: boolean) => void;
|
|
546
|
+
}): react_jsx_runtime.JSX.Element;
|
|
547
|
+
|
|
548
|
+
interface TextInputPrimitiveProps {
|
|
549
|
+
onChange: (e: any) => void;
|
|
550
|
+
value: string;
|
|
551
|
+
placeholder?: string;
|
|
552
|
+
theme?: QuillTheme;
|
|
553
|
+
disabled?: boolean;
|
|
554
|
+
width?: string;
|
|
555
|
+
password?: boolean;
|
|
556
|
+
style?: React__default.CSSProperties;
|
|
557
|
+
number?: boolean;
|
|
558
|
+
min?: number;
|
|
559
|
+
max?: number;
|
|
560
|
+
step?: number;
|
|
561
|
+
}
|
|
562
|
+
declare const TextInputPrimitive: React__default.ForwardRefExoticComponent<TextInputPrimitiveProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
563
|
+
|
|
564
|
+
interface SelectComponentProps {
|
|
565
|
+
value: string | number | null | undefined;
|
|
566
|
+
label?: string;
|
|
567
|
+
width: number;
|
|
568
|
+
options: {
|
|
569
|
+
value: string | number;
|
|
570
|
+
label: string;
|
|
571
|
+
}[];
|
|
572
|
+
onChange: (event: React__default.ChangeEvent<HTMLSelectElement>) => void;
|
|
573
|
+
isLoading?: boolean;
|
|
574
|
+
hideEmptyOption?: boolean;
|
|
575
|
+
disabled?: boolean;
|
|
576
|
+
badge?: string;
|
|
577
|
+
mimicReactSelect?: boolean;
|
|
578
|
+
testLabel?: string;
|
|
579
|
+
displayValue?: boolean;
|
|
580
|
+
size?: 'default' | 'small';
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* A robust select component that implements the new minimal Select interface.
|
|
584
|
+
*/
|
|
585
|
+
declare function QuillSelectComponentWithCombo({ options, value, width, onChange, label, isLoading, hideEmptyOption, disabled, badge, mimicReactSelect, testLabel, displayValue, size, }: SelectComponentProps): react_jsx_runtime.JSX.Element;
|
|
586
|
+
|
|
587
|
+
declare function EditEnvironmentModal({ isOpen, setIsOpen, onSave, ModalComponent, TextInputComponent, ButtonComponent, HeaderComponent, SecondaryButtonComponent, }: {
|
|
588
|
+
isOpen: boolean;
|
|
589
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
590
|
+
onSave: () => void;
|
|
591
|
+
ModalComponent: any;
|
|
592
|
+
TextInputComponent: ForwardRefExoticComponent<TextInputPrimitiveProps & RefAttributes<HTMLInputElement>> | ((props: TextInputPrimitiveProps) => React__default.JSX.Element);
|
|
593
|
+
ButtonComponent: any;
|
|
594
|
+
SelectComponent: (props: SelectComponentProps) => React__default.JSX.Element;
|
|
595
|
+
HeaderComponent: any;
|
|
596
|
+
SecondaryButtonComponent: any;
|
|
597
|
+
}): react_jsx_runtime.JSX.Element;
|
|
598
|
+
|
|
599
|
+
type ButtonPrimitiveProps = {
|
|
600
|
+
onClick: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
601
|
+
label: string;
|
|
602
|
+
theme?: QuillTheme;
|
|
603
|
+
style?: React__default.CSSProperties;
|
|
604
|
+
variant?: 'primary' | 'secondary' | 'danger';
|
|
605
|
+
disabled?: boolean;
|
|
606
|
+
type?: 'submit' | 'button' | 'reset';
|
|
607
|
+
};
|
|
608
|
+
declare const ButtonPrimitive: React__default.FC<ButtonPrimitiveProps & {
|
|
609
|
+
isLoading?: boolean;
|
|
610
|
+
}>;
|
|
611
|
+
|
|
612
|
+
type SecondaryButtonPrimitiveProps = {
|
|
613
|
+
onClick: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
614
|
+
label: string;
|
|
615
|
+
theme?: QuillTheme;
|
|
616
|
+
disabled?: boolean;
|
|
617
|
+
style?: React__default.CSSProperties;
|
|
618
|
+
};
|
|
619
|
+
declare const SecondaryButtonPrimitive: React__default.FC<SecondaryButtonPrimitiveProps>;
|
|
620
|
+
|
|
621
|
+
interface ModalComponentProps {
|
|
622
|
+
children: any;
|
|
623
|
+
isOpen: boolean;
|
|
624
|
+
onClose?: () => void;
|
|
625
|
+
title?: string;
|
|
626
|
+
theme?: QuillTheme$1;
|
|
627
|
+
style?: CSSProperties;
|
|
628
|
+
showHeaderBorder?: boolean;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
declare const ModalPrimitive: React$1.ForwardRefExoticComponent<ModalComponentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
632
|
+
|
|
633
|
+
type HeaderPrimitiveProps = {
|
|
634
|
+
label: string;
|
|
635
|
+
theme?: QuillTheme;
|
|
636
|
+
};
|
|
637
|
+
declare const HeaderPrimitive: React__default.FC<HeaderPrimitiveProps>;
|
|
638
|
+
|
|
639
|
+
interface AgentChatProps {
|
|
640
|
+
sandboxClientId: string;
|
|
641
|
+
sourceClientId: string;
|
|
642
|
+
agentSessionId: string;
|
|
643
|
+
getToken: () => Promise<string>;
|
|
644
|
+
}
|
|
645
|
+
declare function AgentChat({ agentSessionId, sandboxClientId, sourceClientId, getToken, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
646
|
+
|
|
647
|
+
declare function AgentChatPanel(): react_jsx_runtime.JSX.Element | null;
|
|
648
|
+
|
|
649
|
+
interface ToolCall {
|
|
650
|
+
id: string;
|
|
651
|
+
type: 'function';
|
|
652
|
+
function: {
|
|
653
|
+
name: string;
|
|
654
|
+
arguments: string;
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
type ChatMessage = {
|
|
658
|
+
role: 'user' | 'assistant' | 'tool';
|
|
659
|
+
content: string | null;
|
|
660
|
+
isError?: boolean;
|
|
661
|
+
isWelcome?: boolean;
|
|
662
|
+
isHiddenContext?: boolean;
|
|
663
|
+
tool_calls?: ToolCall[];
|
|
664
|
+
tool_call_id?: string;
|
|
665
|
+
};
|
|
666
|
+
interface SessionInfo {
|
|
667
|
+
sessionId: string;
|
|
668
|
+
sourceClientId: string;
|
|
669
|
+
sourceClientName: string;
|
|
670
|
+
sandboxClientId: string;
|
|
671
|
+
sandboxClientName: string;
|
|
672
|
+
status: string;
|
|
673
|
+
}
|
|
674
|
+
interface AgentChatState {
|
|
675
|
+
messages: ChatMessage[];
|
|
676
|
+
setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
|
|
677
|
+
session: SessionInfo | null;
|
|
678
|
+
setSession: React.Dispatch<React.SetStateAction<SessionInfo | null>>;
|
|
679
|
+
sessionInitializedForClientId: string | null;
|
|
680
|
+
setSessionInitializedForClientId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
681
|
+
showToolOutputs: boolean;
|
|
682
|
+
setShowToolOutputs: React.Dispatch<React.SetStateAction<boolean>>;
|
|
683
|
+
}
|
|
684
|
+
declare function useAgentChat(): AgentChatState;
|
|
685
|
+
|
|
686
|
+
declare function exportChatAsMarkdown(messages: ChatMessage[]): void;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Environment selector plus create / edit environment modals.
|
|
690
|
+
* Used in GlobalHeader and can be mounted in host app nav when managers use hideEnvDropdown.
|
|
691
|
+
*/
|
|
692
|
+
declare function EnvironmentSwitcherWithModals(): react_jsx_runtime.JSX.Element;
|
|
693
|
+
|
|
694
|
+
export { AdminProvider, AgentChat, AgentChatPanel, type AgentChatProps, ButtonPrimitive, ChartQueryBuilder as ChartBuilder, type ChatMessage, CreateEnvironment, CreateEnvironmentModal, DashboardManager, EditEnvironmentModal, EnvSelectPopover, EnvironmentSwitcherWithModals, HeaderPrimitive, ModalPrimitive, QuillSelectComponentWithCombo, SecondaryButtonPrimitive, type SessionInfo, TextInputPrimitive, type ToolCall, VirtualTableManager, exportChatAsMarkdown, useAdmin, useAgentChat };
|