autoql-fe-utils 1.0.3 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,201 @@
1
1
  import dayjs from 'dayjs';
2
2
  import * as axios from 'axios';
3
3
 
4
+ declare const capitalizeFirstChar: (string: any) => any;
5
+ declare const isNumber: (str: any) => boolean;
6
+
7
+ declare enum PrecisionTypes {
8
+ DAY = "DAY",
9
+ MONTH = "MONTH",
10
+ YEAR = "YEAR",
11
+ WEEK = "WEEK",
12
+ QUARTER = "QUARTER",
13
+ DATE_HOUR = "DATE_HOUR",
14
+ DATE_MINUTE = "DATE_MINUTE",
15
+ HOUR = "HOUR",
16
+ MINUTE = "MINUTE"
17
+ }
18
+ declare enum AggTypes {
19
+ SUM = "SUM",
20
+ AVG = "AVG",
21
+ MIN = "MIN",
22
+ MAX = "MAX",
23
+ COUNT = "COUNT",
24
+ COUNT_DISTINCT = "COUNT_DISTINCT"
25
+ }
26
+ declare enum ColumnTypes {
27
+ DOLLAR_AMT = "DOLLAR_AMT",
28
+ QUANTITY = "QUANTITY",
29
+ RATIO = "RATIO",
30
+ PERCENT = "PERCENT",
31
+ STRING = "STRING",
32
+ DATE = "DATE",
33
+ DATE_STRING = "DATE_STRING"
34
+ }
35
+ declare enum DataExplorerTypes {
36
+ SUBJECT_TYPE = "subject",
37
+ VL_TYPE = "VL"
38
+ }
39
+ declare enum DisplayTypes {
40
+ TABLE = "table",
41
+ PIVOT_TABLE = "pivot_table",
42
+ BAR = "bar",
43
+ COLUMN = "column",
44
+ LINE = "line",
45
+ STACKED_COLUMN = "stacked_column",
46
+ STACKED_BAR = "stacked_bar",
47
+ STACKED_LINE = "stacked_line",
48
+ BUBBLE = "bubble",
49
+ HEATMAP = "heatmap",
50
+ PIE = "pie",
51
+ HISTOGRAM = "histogram",
52
+ SCATTERPLOT = "scatterplot",
53
+ COLUMN_LINE = "column_line"
54
+ }
55
+
56
+ interface Column$1 {
57
+ type: ColumnTypes;
58
+ precision?: string;
59
+ dow_style?: string;
60
+ groupable?: boolean;
61
+ name?: string;
62
+ display_name?: string;
63
+ is_visible?: boolean;
64
+ multi_series?: boolean;
65
+ aggType?: string;
66
+ title?: string;
67
+ origColumn?: Column$1;
68
+ origPivotColumn?: Column$1;
69
+ origValues?: any;
70
+ headerFilter?: boolean;
71
+ frozen?: boolean;
72
+ visible?: boolean;
73
+ field?: string;
74
+ cssClass?: string;
75
+ pivot?: boolean;
76
+ formatter?: Function;
77
+ }
78
+ interface FilterLock {
79
+ filter_type: string;
80
+ key: string;
81
+ value: string;
82
+ show_message: string;
83
+ }
84
+ interface FrontendReq {
85
+ session_locked_conditions: Object;
86
+ page_size: number;
87
+ debug: false;
88
+ disambiguation: any[];
89
+ chart_images: string;
90
+ orders: any[];
91
+ filters: any[];
92
+ translation: string;
93
+ text: string;
94
+ date_format: string;
95
+ scope: string;
96
+ source: string;
97
+ test: boolean;
98
+ session_filter_locks: any[];
99
+ v2_dates: number;
100
+ persistent_filter_locks: FilterLock[];
101
+ columns?: Column$1[];
102
+ }
103
+ type Rows = Array<Array<string | number>>;
104
+ type ParsedInterpretationChunk = {
105
+ eng: string;
106
+ c_type?: string;
107
+ for?: string;
108
+ dateArray?: string[];
109
+ operator?: string;
110
+ type?: string;
111
+ };
112
+ type ParsedInterpretation = ParsedInterpretationChunk[];
113
+ interface QueryData {
114
+ session_locked_conditions: any[];
115
+ count_rows: number;
116
+ fe_req: FrontendReq;
117
+ query_id: string;
118
+ row_limit: number;
119
+ rows: Rows;
120
+ chart_images: null;
121
+ display_type: string;
122
+ columns: Column$1[];
123
+ interpretation: string;
124
+ text: string;
125
+ parsed_interpretation: ParsedInterpretation;
126
+ persistent_locked_conditions: any[];
127
+ condition_filter: any[];
128
+ sql: any[];
129
+ }
130
+ interface QueryResponse {
131
+ data: QueryData;
132
+ message: string;
133
+ reference_id: string;
134
+ }
135
+ interface AxiosResponse {
136
+ data: QueryResponse;
137
+ }
138
+ interface DataFormatting {
139
+ currencyCode: string;
140
+ languageCode: string;
141
+ currencyDecimals: number;
142
+ quantityDecimals: number;
143
+ ratioDecimals: number;
144
+ comparisonDisplay: string;
145
+ monthYearFormat: string;
146
+ dayMonthYearFormat: string;
147
+ }
148
+ interface Scale {
149
+ }
150
+ interface ValueLabel {
151
+ keyword: string;
152
+ show_message: string;
153
+ canonical: string;
154
+ }
155
+ interface DataExplorerSuggestion {
156
+ name: string;
157
+ alias_name: string;
158
+ canonical: string;
159
+ }
160
+ type AggTypeParams = {
161
+ type: string;
162
+ displayName?: string;
163
+ tooltip?: string;
164
+ unit?: string;
165
+ supportsStrings?: boolean;
166
+ symbol?: string;
167
+ fn?: Function;
168
+ };
169
+ declare class AggType {
170
+ type: string;
171
+ displayName?: string;
172
+ tooltip?: string;
173
+ unit?: string;
174
+ supportsStrings?: boolean;
175
+ symbol?: string;
176
+ fn?: Function;
177
+ constructor({ type, displayName, tooltip, unit, supportsStrings, symbol, fn }: AggTypeParams);
178
+ }
179
+ type tableFilterParams = {
180
+ name: string;
181
+ columnName: string;
182
+ value: string | number;
183
+ operator: string;
184
+ displayValue?: string;
185
+ };
186
+ type TableConfig = {
187
+ stringColumnIndex: number;
188
+ numberColumnIndex: number;
189
+ numberColumnIndex2: number;
190
+ legendColumnIndex: number;
191
+ stringColumnIndices: number[];
192
+ numberColumnIndices: number[];
193
+ numberColumnIndices2: number[];
194
+ };
195
+
4
196
  declare const TABLE_TYPES: string[];
5
197
  declare const CHART_TYPES: string[];
198
+ declare const CHARTS_WITHOUT_AGGREGATED_DATA: string[];
6
199
  declare const DATE_ONLY_CHART_TYPES: string[];
7
200
  declare const DOUBLE_AXIS_CHART_TYPES: string[];
8
201
  declare const MONTH_NAMES: string[];
@@ -19,15 +212,25 @@ declare const DAYJS_PRECISION_FORMATS: {
19
212
  DATE_HOUR: string;
20
213
  DATE_MINUTE: string;
21
214
  };
22
- declare const DEFAULT_AGG_TYPE = "sum";
23
- declare const AGG_TYPES: {
24
- displayName: string;
25
- value: string;
26
- unit: string;
27
- tooltip: string;
28
- }[];
215
+ declare const PRECISION_TYPES: {
216
+ DAY: string;
217
+ MONTH: string;
218
+ YEAR: string;
219
+ WEEK: string;
220
+ QUARTER: string;
221
+ DATE_HOUR: string;
222
+ DATE_MINUTE: string;
223
+ HOUR: string;
224
+ MINUTE: string;
225
+ };
29
226
  declare const MAX_LEGEND_LABELS = 22;
30
227
  declare const MIN_HISTOGRAM_SAMPLE = 20;
228
+ declare const DEFAULT_AGG_TYPE = AggTypes.SUM;
229
+ declare const AGG_TYPES: {
230
+ SUM: AggType;
231
+ AVG: AggType;
232
+ COUNT: AggType;
233
+ };
31
234
 
32
235
  declare const CUSTOM_TYPE = "CUSTOM";
33
236
  declare const PROJECT_TYPE = "PROJECT";
@@ -197,118 +400,52 @@ declare const EVALUATION_FREQUENCY_OPTIONS: {
197
400
  };
198
401
  };
199
402
 
200
- declare const DEFAULT_SOURCE = "widgets";
201
-
202
- declare enum TimestampFormats {
203
- epoch = "EPOCH",
204
- iso8601 = "ISO8601"
205
- }
206
- declare enum PrecisionTypes {
207
- DAY = "DAY",
208
- MONTH = "MONTH",
209
- YEAR = "YEAR",
210
- WEEK = "WEEK",
211
- QUARTER = "QUARTER",
212
- DATE_HOUR = "DATE_HOUR",
213
- DATE_MINUTE = "DATE_MINUTE",
214
- HOUR = "HOUR",
215
- MINUTE = "MINUTE"
216
- }
217
- declare enum NumberColumnTypes {
218
- CURRENCY = "DOLLAR_AMT",
219
- QUANTITY = "QUANTITY",
220
- RATIO = "RATIO",
221
- PERCENT = "PERCENT"
222
- }
223
- declare enum NumberColumnTypeDisplayNames {
224
- DOLLAR_AMT = "Currency",
225
- QUANTITY = "Quantity",
226
- RATIO = "Ratio",
227
- PERCENT = "Percent"
228
- }
229
- declare enum DataExplorerTypes {
230
- SUBJECT_TYPE = "subject",
231
- VL_TYPE = "VL"
232
- }
233
-
234
- interface Column {
235
- dow_style: string;
403
+ type ColumnTypeParams = {
236
404
  type: string;
237
- groupable: boolean;
238
- precision: string;
239
- name: string;
240
- display_name: string;
241
- is_visible: boolean;
242
- multi_series: boolean;
243
- aggType?: string;
244
- title?: string;
245
- }
246
- type Columns = Column[];
247
- interface FilterLock {
248
- filter_type: string;
249
- key: string;
250
- value: string;
251
- show_message: string;
252
- }
253
- interface FrontendReq {
254
- session_locked_conditions: Object;
255
- page_size: number;
256
- debug: false;
257
- disambiguation: any[];
258
- chart_images: string;
259
- orders: any[];
260
- filters: any[];
261
- translation: string;
262
- text: string;
263
- date_format: string;
264
- scope: string;
265
- source: string;
266
- test: boolean;
267
- session_filter_locks: any[];
268
- v2_dates: number;
269
- persistent_filter_locks: FilterLock[];
270
- columns?: Columns;
271
- }
272
- type Rows = Array<Array<string | number>>;
273
- interface QueryData {
274
- session_locked_conditions: any[];
275
- count_rows: number;
276
- fe_req: FrontendReq;
277
- query_id: string;
278
- row_limit: number;
279
- rows: Rows;
280
- chart_images: null;
281
- display_type: string;
282
- columns: Columns;
283
- interpretation: string;
284
- text: string;
285
- parsed_interpretation: Object[];
286
- persistent_locked_conditions: any[];
287
- condition_filter: any[];
288
- sql: any[];
289
- }
290
- interface QueryResponse {
291
- data: QueryData;
292
- message: string;
293
- reference_id: string;
294
- }
295
- interface AxiosResponse {
296
- data: QueryResponse;
405
+ description: string;
406
+ continuous?: boolean;
407
+ ordinal?: boolean;
408
+ aggOptions?: string[];
409
+ aggregable?: boolean;
410
+ isNumber?: boolean;
411
+ icon?: string;
412
+ unit?: string;
413
+ };
414
+ declare class ColumnType {
415
+ type: string;
416
+ description: string;
417
+ continuous?: boolean;
418
+ ordinal?: boolean;
419
+ aggOptions?: string[];
420
+ aggregable?: boolean;
421
+ isNumber?: boolean;
422
+ icon?: string;
423
+ unit?: string;
424
+ constructor({ type, description, continuous, ordinal, aggOptions, aggregable, isNumber, icon, unit, }: ColumnTypeParams);
297
425
  }
298
- interface DataFormatting {
299
- timestampFormat: TimestampFormats;
300
- currencyCode: string;
301
- languageCode: string;
302
- currencyDecimals: number;
303
- quantityDecimals: number;
304
- ratioDecimals: number;
305
- comparisonDisplay: string;
306
- monthYearFormat: string;
307
- dayMonthYearFormat: string;
426
+
427
+ declare class Column {
428
+ type: ColumnTypes;
429
+ isNumberType: boolean;
430
+ isStringType: boolean;
431
+ isDateType: boolean;
432
+ constructor(options: Column$1);
308
433
  }
309
- interface Scale {
434
+ interface Column extends Column$1 {
310
435
  }
311
436
 
437
+ declare const COLUMN_TYPES: {
438
+ DOLLAR_AMT: ColumnType;
439
+ QUANTITY: ColumnType;
440
+ RATIO: ColumnType;
441
+ PERCENT: ColumnType;
442
+ STRING: ColumnType;
443
+ DATE: ColumnType;
444
+ DATE_STRING: ColumnType;
445
+ };
446
+
447
+ declare const DEFAULT_SOURCE = "widgets";
448
+
312
449
  declare const authenticationDefault: {
313
450
  token: any;
314
451
  apiKey: any;
@@ -317,7 +454,6 @@ declare const authenticationDefault: {
317
454
  dprDomain: any;
318
455
  };
319
456
  declare const dataFormattingDefault: {
320
- timestampFormat: TimestampFormats;
321
457
  currencyCode: string;
322
458
  languageCode: string;
323
459
  currencyDecimals: number;
@@ -376,13 +512,188 @@ declare const getDataConfig: (prop?: {}) => {
376
512
  numberColumnIndex: number;
377
513
  };
378
514
 
515
+ declare const constructRTArray: (interpretation: ParsedInterpretation) => ParsedInterpretationChunk[];
516
+ declare const getDatesFromRT: (queryResponse: AxiosResponse) => string[];
517
+ declare const getTimeRangeFromDateArray: (dates: any) => "DAY" | "MONTH" | "WEEK";
518
+ declare const getTimeRangeFromRT: (queryResponse: any) => "DAY" | "MONTH" | "WEEK";
519
+ declare const getTimeFrameTextFromChunk: (chunk: any) => string;
520
+
521
+ declare const getStringFromSource: (source: string | number | Array<string>) => string | null;
522
+ declare const mergeSources: (source: string | number | Array<string>, newSource: string | number | Array<string>) => string | null;
523
+
524
+ declare const nameValueObject: (name: any, value: any) => {
525
+ name: any;
526
+ value: any;
527
+ };
528
+ declare const getKeyByValue: (object: any, value: any) => string;
529
+
530
+ declare const roundToNearestMultiple: (value: any, multiple?: number) => number;
531
+ declare const roundDownToNearestMultiple: (value: any, multiple?: number) => number;
532
+ declare const roundUpToNearestMultiple: (value: any, multiple?: number) => number;
533
+ declare const roundToNearestLog10: (number: any) => number;
534
+
535
+ declare const currentEventLoopEnd: () => Promise<unknown>;
536
+ declare const animateInputText: ({ text, inputRef, callback, totalAnimationTime }: {
537
+ text?: string;
538
+ inputRef: any;
539
+ callback?: () => void;
540
+ totalAnimationTime?: number;
541
+ }) => Promise<void>;
542
+ declare const handleTooltipBoundaryCollision: (e: any, self: any) => void;
543
+ declare const removeFromDOM: (elem: any) => void;
544
+ declare const setCaretPosition: (elem: any, caretPos: any) => void;
545
+ declare const getPadding: (element: any) => {
546
+ left: number;
547
+ right: number;
548
+ top: number;
549
+ bottom: number;
550
+ };
551
+ declare const getQueryParams: (url: any) => {};
552
+ /**
553
+ * converts an svg string to base64 png using the domUrl
554
+ * @param {string} svgElement the svgElement
555
+ * @param {number} [margin=0] the width of the border - the image size will be height+margin by width+margin
556
+ * @param {string} [fill] optionally backgrund canvas fill
557
+ * @return {Promise} a promise to the bas64 png image
558
+ */
559
+ declare const svgToPng: (svgElement: any, scale?: number) => Promise<unknown>;
560
+ declare const getBBoxFromRef: (ref: any) => any;
561
+ declare const getSVGBase64: (svgElement: any) => string;
562
+
563
+ interface getSupportedDisplayTypesParams {
564
+ response?: AxiosResponse;
565
+ columns?: Column$1[];
566
+ dataLength?: number;
567
+ pivotDataLength?: number;
568
+ isDataLimited?: boolean;
569
+ }
570
+ declare const isChartType: (type: any) => boolean;
571
+ declare const isTableType: (type: any) => boolean;
572
+ declare const isDisplayTypeValid: (response: AxiosResponse, displayType: string, dataLength: number, pivotDataLength: number, columns: Column$1[], isDataLimited: boolean) => boolean;
573
+ declare const shouldPlotMultiSeries: (columns: any) => boolean;
574
+ declare const supportsPieChart: (columns: any, chartData: any) => boolean;
575
+ declare const supports2DCharts: (columns: any, dataLength: any) => boolean;
576
+ declare const getPotentialDisplayTypes: (response: AxiosResponse) => string[];
577
+ declare const potentiallySupportsPivot: (response: AxiosResponse) => boolean;
578
+ declare const potentiallySupportsDatePivot: (response: any) => boolean;
579
+ declare const usePivotDataForChart: (response: any) => boolean;
580
+ declare const supportsRegularPivotTable: (columns: any, data?: any, dataLength?: any) => boolean;
581
+ declare const supportsDatePivotTable: (columns: any) => boolean;
582
+ declare const isSingleValueResponse: (response: any) => boolean;
583
+ declare const getUniqueYearsForColumn: (data: any, columns: any, index: any) => any[];
584
+ declare const getSupportedDisplayTypes: ({ response, columns, dataLength, pivotDataLength, isDataLimited, }?: getSupportedDisplayTypesParams) => string[];
585
+ declare const getFirstChartDisplayType: (supportedDisplayTypes: any, fallback: any) => any;
586
+ declare const getDefaultDisplayType: (response?: AxiosResponse, defaultToChart?: boolean, columns?: Column$1[], dataLength?: number, pivotDataLength?: number, preferredDisplayType?: string, isDataLimited?: boolean) => string;
587
+ declare const hasData: (response: any) => any;
588
+ declare const hasMoreData: (response: any, currentNumRows: any) => boolean;
589
+
590
+ declare const isISODate: (str: any) => boolean;
591
+ declare const getDateRangeIntersection: (aRange: any, bRange: any) => {
592
+ startDate: any;
593
+ endDate: any;
594
+ };
595
+ declare const getColumnNameForDateRange: (chunkEng: any) => any;
596
+ declare const getFilterPrecision: (col: Column$1) => PrecisionTypes.DAY | PrecisionTypes.MONTH | PrecisionTypes.YEAR;
597
+ declare const getPrecisionForDayJS: (colPrecision: any) => "month" | "minute" | "hour" | "day" | "year" | "quarter" | "week";
598
+ declare const getStartAndEndDateFromDateStrs: (dateRangeStrs: any) => {
599
+ startDate: Date;
600
+ endDate: Date;
601
+ };
602
+ declare const getDateRangesFromInterpretation: (parsedInterpretation: any) => any[];
603
+ declare const getColumnDateRanges: (response: any) => any[];
604
+ declare const getEpochFromDate: (date: any, precision?: any, precisionFrame?: any) => any;
605
+ declare const getDayjsObjForStringType: (value: any, col: any) => dayjs.Dayjs;
606
+ declare const getDayJSObj: ({ value, column }: {
607
+ value: number | string;
608
+ column: Column$1;
609
+ }) => dayjs.Dayjs;
610
+
611
+ declare const formatStringDateWithPrecision: (value: any, col: any) => any;
612
+ declare const formatStringDate: (value: any, config?: DataFormatting) => any;
613
+ declare const formatDateType: (element: any, column: Column$1, config?: DataFormatting) => any;
614
+ declare const formatDateStringType: (element: any, column: Column$1, config?: DataFormatting) => any;
615
+ declare const formatISODateWithPrecision: (value: any, col: Column$1, config?: DataFormatting) => any;
616
+ declare const formatEpochDate: (value: any, col: Column$1, config?: DataFormatting) => any;
617
+ declare const dateStringSortFn: (a: any, b: any, col: Column$1) => number;
618
+ declare const dateSortFn: (a: any, b: any, col: Column$1, isTable: any) => number;
619
+ declare const sortDataByDate: (data: any, tableColumns: any, sortDirection: string, isTable: any) => any;
620
+ interface formatElementParams {
621
+ element: string | number;
622
+ column: Column$1;
623
+ config?: DataFormatting;
624
+ htmlElement?: HTMLElement;
625
+ isChart?: boolean;
626
+ }
627
+ declare const formatElement: ({ element, column, config, htmlElement, isChart, }: formatElementParams) => string | number;
628
+ declare const getNumberFormatConfig: (d: number, scale: any) => {
629
+ minimumFractionDigits: number;
630
+ maximumFractionDigits: number;
631
+ notation: any;
632
+ };
633
+ declare const countDecimals: (number: any) => any;
634
+ declare const formatChartLabel: ({ d, scale, column, dataFormatting, maxLabelWidth, sigDigits, }: {
635
+ d: number | string;
636
+ scale?: any;
637
+ column: Column$1;
638
+ dataFormatting?: DataFormatting;
639
+ maxLabelWidth?: number;
640
+ sigDigits?: number;
641
+ }) => {
642
+ fullWidthLabel: string | number;
643
+ formattedLabel: string | number;
644
+ };
645
+ declare const getCurrencySymbol: (dataFormatting?: {
646
+ currencyCode: string;
647
+ languageCode: string;
648
+ currencyDecimals: number;
649
+ quantityDecimals: number;
650
+ ratioDecimals: number;
651
+ comparisonDisplay: string;
652
+ monthYearFormat: string;
653
+ dayMonthYearFormat: string;
654
+ }) => string;
655
+
656
+ declare const getScheduleFrequencyObject: (dataAlert: any) => any;
657
+ declare const getSupportedConditionTypes: (expression: any, queryResponse: any) => string[];
658
+ declare const showEvaluationFrequencySetting: (notificationType: any) => boolean;
659
+ declare const resetDateIsFuture: (dataAlert: any) => boolean;
660
+ declare const formatResetDate: (dataAlert: any, short: any) => string;
661
+ declare const formatNextScheduleDate: (schedules: any, short: any) => string;
662
+ declare const getTimeObjFromTimeStamp: (timestamp: any, timezone: any) => {
663
+ ampm: string;
664
+ value: string;
665
+ value24hr: string;
666
+ minute: number;
667
+ hour24: number;
668
+ hour: number;
669
+ };
670
+ declare const getWeekdayFromTimeStamp: (timestamp: any, timezone: any) => string;
671
+ declare const getDayLocalStartDate: ({ timeObj, timezone, daysToAdd }: {
672
+ timeObj: any;
673
+ timezone: any;
674
+ daysToAdd?: number;
675
+ }) => string;
676
+ declare const getWeekLocalStartDate: ({ weekDay, timeObj, timezone }: {
677
+ weekDay: any;
678
+ timeObj: any;
679
+ timezone: any;
680
+ }) => string;
681
+ declare const getMonthLocalStartDate: ({ monthDay, timeObj, timezone }: {
682
+ monthDay: any;
683
+ timeObj: any;
684
+ timezone: any;
685
+ }) => string;
686
+
379
687
  declare const isColumnNumberType: (col: any) => boolean;
380
688
  declare const isColumnStringType: (col: any) => boolean;
381
689
  declare const isColumnDateType: (col: any) => boolean;
382
690
  declare const hasNumberColumn: (columns: any) => boolean;
383
691
  declare const hasStringColumn: (columns: any) => boolean;
384
692
  declare const hasDateColumn: (columns: any) => boolean;
385
- declare const getVisibleColumns: (columns: any) => Columns;
693
+ declare const getVisibleColumns: (columns: any) => Column$1[];
694
+ declare const getHiddenColumns: (columns: Column$1[]) => Column$1[];
695
+ declare const areSomeColumnsHidden: (columns: Column$1[]) => boolean;
696
+ declare const areAllColumnsHidden: (columns: Column$1[]) => boolean;
386
697
  declare const getGroupableColumns: (columns: any) => any[];
387
698
  declare const getGroupBys: (row: any, columns: any) => {
388
699
  groupBys: any[];
@@ -408,7 +719,7 @@ declare const getDateColumnIndex: (columns: any) => any;
408
719
  declare const getNumberOfGroupables: (columns: any) => number;
409
720
  declare const isListQuery: (columns: any) => boolean;
410
721
  declare const setFilterFunction: ({ column, dataFormatting, onErrorCallback, }: {
411
- column: Column;
722
+ column: Column$1;
412
723
  dataFormatting: DataFormatting;
413
724
  onErrorCallback: Function;
414
725
  }) => (headerValue: any, rowValue: any) => boolean;
@@ -417,118 +728,45 @@ declare const setHeaderFilterPlaceholder: (col: any) => "Pick range" | "Filter";
417
728
  declare const getAggConfig: (columns: any) => {};
418
729
  declare const getDrilldownGroupby: (queryResponse: any, newCol: any) => any;
419
730
  declare const formatQueryColumns: ({ columns, aggConfig, queryResponse, onTableHeaderClick, enableTableSorting, dataFormatting, }: {
420
- columns: Columns;
731
+ columns: Column$1[];
421
732
  aggConfig?: Object;
422
733
  queryResponse?: AxiosResponse;
423
734
  onTableHeaderClick?: Function;
424
735
  enableTableSorting?: boolean;
425
736
  dataFormatting?: DataFormatting;
426
- }) => Columns;
427
-
428
- declare const formatStringDateWithPrecision: (value: any, col: any) => any;
429
- declare const formatStringDate: (value: any, config?: DataFormatting) => any;
430
- declare const formatDateType: (element: any, column: Column, config?: DataFormatting) => any;
431
- declare const formatDateStringType: (element: any, column: Column, config?: DataFormatting) => any;
432
- declare const formatISODateWithPrecision: (value: any, col: Column, config?: DataFormatting) => any;
433
- declare const formatEpochDate: (value: any, col: Column, config?: DataFormatting) => any;
434
- declare const dateStringSortFn: (a: any, b: any, col: Column) => number;
435
- declare const dateSortFn: (a: any, b: any, col: Column, isTable: any) => number;
436
- declare const sortDataByDate: (data: any, tableColumns: any, sortDirection: string, isTable: any) => any;
437
- interface formatElementParams {
438
- element: string | number;
439
- column: Column;
440
- config: DataFormatting;
441
- htmlElement?: HTMLElement;
442
- isChart?: boolean;
443
- }
444
- declare const formatElement: ({ element, column, config, htmlElement, isChart, }: formatElementParams) => string | number;
445
- declare const getNumberFormatConfig: (d: any, scale: any) => {
446
- minimumFractionDigits: number;
447
- maximumFractionDigits: number;
448
- notation: any;
737
+ }) => Column$1[];
738
+ declare const getStringColumnIndices: (columns: any, supportsPivot?: boolean) => {
739
+ stringColumnIndices: any[];
740
+ stringColumnIndex: any;
449
741
  };
450
- declare const formatChartLabel: ({ d, scale, column, dataFormatting, maxLabelWidth }: {
451
- d: any;
452
- scale: any;
453
- column: any;
454
- dataFormatting: any;
455
- maxLabelWidth: any;
456
- }) => {
457
- fullWidthLabel: any;
458
- formattedLabel: any;
742
+ declare const getNumberColumnIndices: (columns: any, isPivot: any) => {
743
+ numberColumnIndex: any;
744
+ numberColumnIndices: any[];
745
+ numberColumnIndices2: any[];
746
+ numberColumnIndex2: any;
747
+ currencyColumnIndices: any[];
748
+ currencyColumnIndex: any;
749
+ quantityColumnIndices: any[];
750
+ quantityColumnIndex: any;
751
+ ratioColumnIndices: any[];
752
+ ratioColumnIndex: any;
459
753
  };
460
- declare const getCurrencySymbol: (dataFormatting?: {
461
- timestampFormat: TimestampFormats;
462
- currencyCode: string;
463
- languageCode: string;
464
- currencyDecimals: number;
465
- quantityDecimals: number;
466
- ratioDecimals: number;
467
- comparisonDisplay: string;
468
- monthYearFormat: string;
469
- dayMonthYearFormat: string;
470
- }) => string;
471
-
472
- interface getSupportedDisplayTypesParams {
754
+ declare const getMultiSeriesColumnIndex: (columns: any) => any;
755
+ declare const isColumnIndexValid: (index: any, columns: any) => boolean;
756
+ declare const isColumnIndicesValid: (indices: any, columns: any) => any;
757
+ declare const numberIndicesArraysOverlap: (tableConfig: any) => any;
758
+ declare const hasColumnIndex: (indices: any, index: any) => boolean;
759
+ declare const getTableConfig: ({ response, columns, currentTableConfig, }?: {
473
760
  response?: AxiosResponse;
474
- columns?: Columns;
475
- dataLength?: number;
476
- pivotDataLength?: number;
477
- isDataLimited?: boolean;
478
- }
479
- declare const isChartType: (type: any) => boolean;
480
- declare const isTableType: (type: any) => boolean;
481
- declare const isDisplayTypeValid: (response: AxiosResponse, displayType: string, dataLength: number, pivotDataLength: number, columns: Columns, isDataLimited: boolean) => boolean;
482
- declare const shouldPlotMultiSeries: (columns: any) => boolean;
483
- declare const supportsPieChart: (columns: any, chartData: any) => boolean;
484
- declare const supports2DCharts: (columns: any, dataLength: any) => boolean;
485
- declare const supportsRegularPivotTable: (columns: any, dataLength: any, data: any) => boolean;
486
- declare const supportsDatePivotTable: (columns: any) => boolean;
487
- declare const isSingleValueResponse: (response: any) => boolean;
488
- declare const getSupportedDisplayTypes: ({ response, columns, dataLength, pivotDataLength, isDataLimited, }?: getSupportedDisplayTypesParams) => string[];
489
- declare const getFirstChartDisplayType: (supportedDisplayTypes: any, fallback: any) => any;
490
- declare const getDefaultDisplayType: (response?: AxiosResponse, defaultToChart?: boolean, columns?: Columns, dataLength?: number, pivotDataLength?: number, preferredDisplayType?: string, isDataLimited?: boolean) => string;
491
- declare const hasData: (response: any) => any;
492
-
493
- declare const currentEventLoopEnd: () => Promise<unknown>;
494
- declare const animateInputText: ({ text, inputRef, callback, totalAnimationTime }: {
495
- text?: string;
496
- inputRef: any;
497
- callback?: () => void;
498
- totalAnimationTime?: number;
499
- }) => Promise<void>;
500
- declare const handleTooltipBoundaryCollision: (e: any, self: any) => void;
501
- declare const removeFromDOM: (elem: any) => void;
502
- declare const setCaretPosition: (elem: any, caretPos: any) => void;
503
- declare const getPadding: (element: any) => {
504
- left: number;
505
- right: number;
506
- top: number;
507
- bottom: number;
508
- };
509
- declare const getQueryParams: (url: any) => {};
510
- /**
511
- * converts an svg string to base64 png using the domUrl
512
- * @param {string} svgElement the svgElement
513
- * @param {number} [margin=0] the width of the border - the image size will be height+margin by width+margin
514
- * @param {string} [fill] optionally backgrund canvas fill
515
- * @return {Promise} a promise to the bas64 png image
516
- */
517
- declare const svgToPng: (svgElement: any, scale?: number) => Promise<unknown>;
518
- declare const getBBoxFromRef: (ref: any) => any;
519
- declare const getSVGBase64: (svgElement: any) => string;
520
-
521
- declare const nameValueObject: (name: any, value: any) => {
522
- name: any;
523
- value: any;
524
- };
525
- declare const getKeyByValue: (object: any, value: any) => string;
526
-
527
- declare const getStringFromSource: (source: string | number | Array<string>) => string | null;
528
- declare const mergeSources: (source: string | number | Array<string>, newSource: string | number | Array<string>) => string | null;
529
-
530
- declare const capitalizeFirstChar: (string: any) => any;
531
- declare const isNumber: (str: any) => boolean;
761
+ columns?: Column$1[];
762
+ currentTableConfig?: TableConfig;
763
+ }) => any;
764
+ declare const isTableConfigValid: ({ response, tableConfig, columns, displayType }: {
765
+ response: any;
766
+ tableConfig: any;
767
+ columns: any;
768
+ displayType: any;
769
+ }) => boolean;
532
770
 
533
771
  declare const invertArray: (array: any[]) => any[];
534
772
  declare const functionsEqual: (a: Function, b: Function) => boolean;
@@ -538,27 +776,39 @@ declare const difference: (objA: Object, objB: Object) => any[];
538
776
  declare const rotateArray: (array: any, n: any) => any[];
539
777
  declare const onlyUnique: (value: any, index: any, self: any) => boolean;
540
778
  declare const makeEmptyArray: (w: any, h: any, value?: string) => any[];
779
+ declare const removeElementAtIndex: (array: any, index: any) => any;
541
780
 
542
- declare const isISODate: (str: any) => boolean;
543
- declare const getDateRangeIntersection: (aRange: any, bRange: any) => {
544
- startDate: any;
545
- endDate: any;
546
- };
547
- declare const getColumnNameForDateRange: (chunkEng: any) => any;
548
- declare const getFilterPrecision: (col: Column) => PrecisionTypes.DAY | PrecisionTypes.MONTH | PrecisionTypes.YEAR;
549
- declare const getPrecisionForDayJS: (colPrecision: any) => "minute" | "hour" | "day" | "month" | "year" | "quarter" | "week";
550
- declare const getStartAndEndDateFromDateStrs: (dateRangeStrs: any) => {
551
- startDate: Date;
552
- endDate: Date;
781
+ declare const aggregateData: ({ data, aggColIndex, columns, numberIndices, dataFormatting }: {
782
+ data: any;
783
+ aggColIndex: any;
784
+ columns: any;
785
+ numberIndices: any;
786
+ dataFormatting: any;
787
+ }) => any;
788
+ type CreatePivotDataParams = {
789
+ rows?: (string | number)[][];
790
+ columns?: Column$1[];
791
+ tableConfig?: TableConfig;
792
+ dataFormatting?: DataFormatting;
793
+ isFirstGeneration?: boolean;
553
794
  };
554
- declare const getDateRangesFromInterpretation: (parsedInterpretation: any) => any[];
555
- declare const getColumnDateRanges: (response: any) => any[];
556
- declare const getEpochFromDate: (date: any, precision?: any, precisionFrame?: any) => any;
557
- declare const getDayjsObjForStringType: (value: any, col: any) => dayjs.Dayjs;
558
- declare const getDayJSObj: ({ value, column }: {
795
+ declare const generatePivotTableData: ({ isFirstGeneration, rows, columns, tableConfig, dataFormatting, }?: CreatePivotDataParams) => {};
796
+ declare const formatDatePivotYear: ({ dateValue, dateColumn }: {
797
+ dateValue: any;
798
+ dateColumn: any;
799
+ }) => string;
800
+ declare const formatDatePivotMonth: ({ dateValue, dateColumn }: {
801
+ dateValue: any;
802
+ dateColumn: any;
803
+ }) => string;
804
+ declare const generateDatePivotData: ({ rows, columns, tableConfig, dataFormatting }?: CreatePivotDataParams) => {};
805
+ declare const generatePivotData: (params?: CreatePivotDataParams) => {};
806
+ declare const generateFilterDrilldownResponse: ({ response, rows, index, value }: {
807
+ response: any;
808
+ rows: any;
809
+ index: any;
559
810
  value: any;
560
- column: any;
561
- }) => dayjs.Dayjs;
811
+ }) => any;
562
812
 
563
813
  declare const dataStructureChanged: (props: any, prevProps: any) => boolean;
564
814
  declare const onlySeriesVisibilityChanged: (props: any, prevProps: any) => boolean;
@@ -602,7 +852,7 @@ declare const getRangeForAxis: ({ axis, height, width }: {
602
852
  }) => any[];
603
853
  declare const getTimeScale: ({ data, columns, columnIndex, axis, domain, dataFormatting, outerPadding, innerPadding, height, width, stringColumnIndices, changeColumnIndices, enableAxisDropdown, changeStringColumnIndex, }: {
604
854
  data: Rows;
605
- columns: Columns;
855
+ columns: Column$1[];
606
856
  columnIndex: number;
607
857
  axis: string;
608
858
  domain: number[];
@@ -618,7 +868,7 @@ declare const getTimeScale: ({ data, columns, columnIndex, axis, domain, dataFor
618
868
  }) => any;
619
869
  declare const getBandScale: ({ data, columns, columnIndex, axis, domain, dataFormatting, outerPadding, innerPadding, height, width, stringColumnIndices, changeColumnIndices, enableAxisDropdown, changeStringColumnIndex, }: {
620
870
  data: Rows;
621
- columns: Columns;
871
+ columns: Column$1[];
622
872
  columnIndex: number;
623
873
  axis: string;
624
874
  domain: number[];
@@ -632,18 +882,18 @@ declare const getBandScale: ({ data, columns, columnIndex, axis, domain, dataFor
632
882
  enableAxisDropdown: boolean;
633
883
  changeStringColumnIndex: Function;
634
884
  }) => any;
635
- declare const getUnitsForColumn: (column: Column, useAgg?: boolean) => "none" | "currency" | "percent";
885
+ declare const getUnitsForColumn: (column: any, useAgg?: boolean) => any;
636
886
  declare const getUnitSymbol: ({ column, dataFormatting, }: {
637
- column: Column;
887
+ column: Column$1;
638
888
  dataFormatting: DataFormatting;
639
889
  }) => string;
640
890
  declare const getLinearAxisTitle: ({ numberColumns, aggregated, }: {
641
- numberColumns: Columns;
891
+ numberColumns: Column$1[];
642
892
  aggregated: boolean;
643
893
  }) => string;
644
894
  declare const getNumberAxisUnits: (numberColumns: any) => any;
645
895
  declare const getBinLinearScale: ({ columns, columnIndex, axis, buckets, bins, changeColumnIndices, enableAxisDropdown, innerHeight, innerWidth, height, width, dataFormatting, changeNumberColumnIndices, }: {
646
- columns: Columns;
896
+ columns: Column$1[];
647
897
  columnIndex: number;
648
898
  axis: string;
649
899
  buckets: any[];
@@ -668,7 +918,7 @@ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, m
668
918
  numTicks: number;
669
919
  stacked: boolean;
670
920
  isScaled: boolean;
671
- columns: Columns;
921
+ columns: Column$1[];
672
922
  units: string;
673
923
  title: string;
674
924
  columnIndex: number;
@@ -686,7 +936,7 @@ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, m
686
936
  }) => any;
687
937
  declare const getLinearScale: ({ minValue, maxValue, axis, range, domain, tickValues, numTicks, stacked, isScaled, columns, units, title, columnIndex, columnIndices, hasDropdown, allowMultipleSeries, changeColumnIndices, disableAutoScale, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, height, width, aggregated, }: {
688
938
  axis: string;
689
- columns: Columns;
939
+ columns: Column$1[];
690
940
  columnIndex: number;
691
941
  columnIndices: number[];
692
942
  height: number;
@@ -717,7 +967,7 @@ declare const getLinearScales: ({ data, columnIndices1, columnIndices2, axis, st
717
967
  axis: string;
718
968
  stacked: boolean;
719
969
  isScaled: boolean;
720
- columns: Columns;
970
+ columns: Column$1[];
721
971
  hasDropdown: boolean;
722
972
  allowMultipleSeries: boolean;
723
973
  changeColumnIndices: Function;
@@ -759,6 +1009,12 @@ declare const getTickValues: ({ scale, initialTicks, numTicks, innerPadding, out
759
1009
  innerPadding?: number;
760
1010
  outerPadding?: number;
761
1011
  }) => any;
1012
+ declare const mergeBoundingClientRects: (boundingBoxes: any) => {
1013
+ x: any;
1014
+ y: any;
1015
+ height: number;
1016
+ width: number;
1017
+ };
762
1018
  declare const mergeBboxes: (boundingBoxes: any) => {
763
1019
  x: any;
764
1020
  y: any;
@@ -787,8 +1043,8 @@ declare const fetchDataExplorerSuggestions: ({ pageSize, pageNumber, domain, api
787
1043
  token?: string;
788
1044
  text?: string;
789
1045
  context?: string;
790
- selectedVL?: any;
791
- userVLSelection?: Object[];
1046
+ selectedVL?: ValueLabel;
1047
+ userVLSelection?: ValueLabel[];
792
1048
  skipQueryValidation?: boolean;
793
1049
  }) => Promise<axios.AxiosResponse<any>>;
794
1050
 
@@ -985,7 +1241,7 @@ interface QueryParams {
985
1241
  enableQueryValidation?: boolean;
986
1242
  skipQueryValidation?: boolean;
987
1243
  }
988
- declare const runQueryOnly: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, scope, }?: QueryParams) => Promise<axios.AxiosResponse<any>>;
1244
+ declare const runQueryOnly: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, scope, }?: QueryParams) => Promise<AxiosResponse | axios.AxiosResponse<any>>;
989
1245
  declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }?: {
990
1246
  text?: string;
991
1247
  domain?: string;
@@ -993,7 +1249,7 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
993
1249
  token?: string;
994
1250
  cancelToken?: any;
995
1251
  }) => Promise<axios.AxiosResponse<any>>;
996
- declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<axios.AxiosResponse<any>>;
1252
+ declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<AxiosResponse | axios.AxiosResponse<any>>;
997
1253
  declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
998
1254
  queryId?: string;
999
1255
  domain?: string;
@@ -1096,4 +1352,62 @@ declare const fetchDataPreview: ({ subject, domain, apiKey, token, source, numRo
1096
1352
  cancelToken?: any;
1097
1353
  }) => Promise<axios.AxiosResponse<any>>;
1098
1354
 
1099
- export { AGG_TYPES, AxiosResponse, CHART_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Columns, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_SOURCE, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerTypes, DataFormatting, DateUTC, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, NumberColumnTypeDisplayNames, NumberColumnTypes, PERIODIC_TYPE, PROJECT_TYPE, PrecisionTypes, QUERY_TERM_TYPE, QueryData, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, Scale, TABLE_TYPES, TimestampFormats, UNAUTHENTICATED_ERROR, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addUserToProjectRule, animateInputText, authenticationDefault, autoQLConfigDefault, calculateMinAndMaxSums, capitalizeFirstChar, convertToNumber, createDataAlert, createNotificationChannel, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSuggestions, fetchTopics, fetchVLAutocomplete, formatChartLabel, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatISODateWithPrecision, formatQueryColumns, formatStringDate, formatStringDateWithPrecision, functionsEqual, getAggConfig, getAuthentication, getAutoQLConfig, getBBoxFromRef, getBandScale, getBinLinearScale, getColumnDateRanges, getColumnNameForDateRange, getColumnTypeAmounts, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDayJSObj, getDayjsObjForStringType, getDefaultDisplayType, getDrilldownGroupby, getEpochFromDate, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHistogramScale, getKey, getKeyByValue, getLegendLabelsForMultiSeries, getLegendLocation, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getPadding, getPrecisionForDayJS, getQueryParams, getRangeForAxis, getSVGBase64, getStartAndEndDateFromDateStrs, getStringFromSource, getSupportedDisplayTypes, getTickSizeFromNumTicks, getTickValues, getTimeScale, getTooltipContent, getUnitSymbol, getUnitsForColumn, getVisibleColumns, handleTooltipBoundaryCollision, hasData, hasDateColumn, hasNumberColumn, hasStringColumn, initializeAlert, invertArray, isAggregation, isChartType, isColumnDateType, isColumnNumberType, isColumnStringType, isDisplayTypeValid, isError500Type, isExpressionQueryValid, isISODate, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeSources, nameValueObject, onlySeriesVisibilityChanged, onlyUnique, removeFromDOM, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetNotificationCount, rotateArray, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setSorterFunction, shouldLabelsRotate, shouldPlotMultiSeries, sortDataByDate, supports2DCharts, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgToPng, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, validateExpression };
1355
+ declare const transformQueryResponse: (response: AxiosResponse | undefined) => AxiosResponse;
1356
+ declare const transformQueryResponseColumns: (columns: Column$1[] | undefined) => Column$1[];
1357
+
1358
+ declare enum ThemeType {
1359
+ LIGHT = "light",
1360
+ DARK = "dark"
1361
+ }
1362
+ type Theme = {
1363
+ theme?: ThemeType;
1364
+ chartColors?: string[];
1365
+ accentColor?: string;
1366
+ fontFamily?: string;
1367
+ textColor?: string;
1368
+ accentTextColor?: string;
1369
+ dashboardTitleColor?: string;
1370
+ backgroundColorPrimary?: string;
1371
+ backgroundColorSecondary?: string;
1372
+ };
1373
+ declare const getThemeValue: (property: string) => string;
1374
+ declare const getThemeType: () => ThemeType;
1375
+ type chartColorVarsResponse = {
1376
+ chartColors: string[];
1377
+ chartColorsDark: string[];
1378
+ };
1379
+ declare const getChartColorVars: () => chartColorVarsResponse;
1380
+ declare const configureTheme: (customThemeConfig?: Theme) => void;
1381
+
1382
+ declare function color(): {
1383
+ (svg: any): void;
1384
+ scale(_: any): any;
1385
+ cells(_: any): number[] | any;
1386
+ cellFilter(_: any): any;
1387
+ shape(_: any): string | any;
1388
+ path(_: any): any;
1389
+ shapeWidth(_: any): number | any;
1390
+ shapeHeight(_: any): number | any;
1391
+ shapeRadius(_: any): number | any;
1392
+ shapePadding(_: any): number | any;
1393
+ labels(_: any): any[] | any;
1394
+ labelAlign(_: any): string | any;
1395
+ locale(_?: any): {
1396
+ format: any;
1397
+ formatPrefix: any;
1398
+ } | any;
1399
+ labelFormat(_: any): any;
1400
+ labelOffset(_: any): number | any;
1401
+ labelDelimiter(_: any): string | any;
1402
+ labelWrap(_: any): any;
1403
+ useClass(_: any): boolean | any;
1404
+ orient(_: any): string | any;
1405
+ ascending(_: any): boolean | any;
1406
+ classPrefix(_: any): string | any;
1407
+ title(_: any): string | any;
1408
+ titleWidth(_: any): any;
1409
+ textWrap(_: any): any;
1410
+ on(): any;
1411
+ };
1412
+
1413
+ export { AGG_TYPES, AggType, AggTypeParams, AggTypes, AxiosResponse, CHARTS_WITHOUT_AGGREGATED_DATA, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column$1 as Column, Column as ColumnObj, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_SOURCE, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, PERIODIC_TYPE, PRECISION_TYPES, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QueryData, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, Scale, TABLE_TYPES, TableConfig, Theme, ThemeType, UNAUTHENTICATED_ERROR, ValueLabel, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addUserToProjectRule, aggregateData, animateInputText, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, calculateMinAndMaxSums, capitalizeFirstChar, configureTheme, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSuggestions, fetchTopics, fetchVLAutocomplete, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatISODateWithPrecision, formatNextScheduleDate, formatQueryColumns, formatResetDate, formatStringDate, formatStringDateWithPrecision, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getBBoxFromRef, getBandScale, getBinLinearScale, getChartColorVars, getColumnDateRanges, getColumnNameForDateRange, getColumnTypeAmounts, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultDisplayType, getDrilldownGroupby, getEpochFromDate, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHiddenColumns, getHistogramScale, getKey, getKeyByValue, getLegendLabelsForMultiSeries, getLegendLocation, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getPadding, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryParams, getRangeForAxis, getSVGBase64, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSupportedConditionTypes, getSupportedDisplayTypes, getTableConfig, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTooltipContent, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, invertArray, isAggregation, isChartType, isColumnDateType, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDisplayTypeValid, isError500Type, isExpressionQueryValid, isISODate, isListQuery, isNumber, isObject, isSingleValueResponse, isTableConfigValid, isTableType, color as legendColor, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, onlySeriesVisibilityChanged, onlyUnique, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setSorterFunction, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByDate, supports2DCharts, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, usePivotDataForChart, validateExpression };