autoql-fe-utils 1.0.68 → 1.0.70

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
@@ -124,7 +124,8 @@ declare class AggType {
124
124
  symbol?: string;
125
125
  fn?: Function;
126
126
  icon?: string;
127
- constructor({ type, displayName, tooltip, unit, icon, supportsStrings, symbol, fn, }: AggTypeParams);
127
+ sqlFn?: Function;
128
+ constructor({ type, displayName, tooltip, unit, icon, supportsStrings, symbol, sqlFn, fn, }: AggTypeParams);
128
129
  }
129
130
 
130
131
  declare class DataExplorerSubject {
@@ -495,6 +496,7 @@ interface RawColumn {
495
496
  is_visible?: boolean;
496
497
  multi_series?: boolean;
497
498
  drill_down?: string;
499
+ alt_name?: string;
498
500
  }
499
501
  interface Column extends RawColumn {
500
502
  aggType?: string;
@@ -511,6 +513,16 @@ interface Column extends RawColumn {
511
513
  pivot?: boolean;
512
514
  formatter?: Function;
513
515
  drilldownGroupby?: any;
516
+ additional?: boolean;
517
+ }
518
+ interface AvailableSelect {
519
+ table_column: string;
520
+ column_type: string;
521
+ display_name: string;
522
+ }
523
+ interface AdditionalSelect {
524
+ insertion: string;
525
+ columns: string[];
514
526
  }
515
527
  interface FilterLock {
516
528
  filter_type: string;
@@ -613,6 +625,7 @@ type AggTypeParams = {
613
625
  symbol?: string;
614
626
  fn?: Function;
615
627
  icon?: string;
628
+ sqlFn?: Function;
616
629
  };
617
630
  interface SubjectSuggestion {
618
631
  name: string;
@@ -1155,6 +1168,153 @@ declare const initializeQueryValidationOptions: ({ responseBody, initialSelectio
1155
1168
  };
1156
1169
  declare const getQueryValidationQueryText: (newSelectedSuggestions: any, plainTextList: any) => string;
1157
1170
 
1171
+ declare const isError500Type: (referenceId: any) => boolean;
1172
+ declare const fetchSuggestions: ({ query, queryId, domain, apiKey, token, cancelToken, }?: {
1173
+ query?: string;
1174
+ queryId?: string;
1175
+ domain?: string;
1176
+ apiKey?: string;
1177
+ token?: string;
1178
+ cancelToken?: any;
1179
+ }) => Promise<axios.AxiosResponse<any, any>>;
1180
+ declare const runQueryNewPage: ({ queryId, domain, apiKey, token, page, cancelToken, }?: {
1181
+ queryId?: string;
1182
+ domain?: string;
1183
+ apiKey?: string;
1184
+ token?: string;
1185
+ page?: number;
1186
+ cancelToken?: any;
1187
+ }) => Promise<any>;
1188
+ interface QueryParams {
1189
+ query?: string;
1190
+ userSelection?: Object[];
1191
+ userSelectionFinal?: Object[];
1192
+ debug?: boolean;
1193
+ test?: boolean;
1194
+ domain?: string;
1195
+ apiKey?: string;
1196
+ token?: string;
1197
+ source?: string;
1198
+ filters?: Object[];
1199
+ orders?: Object[];
1200
+ tableFilters?: Object[];
1201
+ pageSize?: number;
1202
+ allowSuggestions?: boolean;
1203
+ cancelToken?: any;
1204
+ scope?: string;
1205
+ enableQueryValidation?: boolean;
1206
+ skipQueryValidation?: boolean;
1207
+ newColumns?: AdditionalSelect[];
1208
+ }
1209
+ interface ColumnSelect {
1210
+ display_name: string;
1211
+ column_type: string;
1212
+ table_column: string;
1213
+ }
1214
+ declare const runQueryOnly: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, scope, newColumns, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any>>;
1215
+ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }?: {
1216
+ text?: string;
1217
+ domain?: string;
1218
+ apiKey?: string;
1219
+ token?: string;
1220
+ cancelToken?: any;
1221
+ }) => Promise<axios.AxiosResponse<any, any>>;
1222
+ declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any>>;
1223
+ declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
1224
+ queryId?: string;
1225
+ domain?: string;
1226
+ apiKey?: string;
1227
+ token?: string;
1228
+ csvProgressCallback?: Function;
1229
+ }) => Promise<axios.AxiosResponse<any, any>>;
1230
+ declare const runDrilldown: ({ queryID, groupBys, debug, test, domain, apiKey, token, orders, source, tableFilters, cancelToken, pageSize, }?: {
1231
+ queryID?: string;
1232
+ groupBys?: Object[];
1233
+ debug?: boolean;
1234
+ test?: boolean;
1235
+ domain?: string;
1236
+ apiKey?: string;
1237
+ token?: string;
1238
+ orders?: Object[];
1239
+ source?: string;
1240
+ tableFilters?: Object[];
1241
+ cancelToken?: any;
1242
+ pageSize?: number;
1243
+ }) => Promise<TransformedAxiosResponse>;
1244
+ declare const fetchTopics: ({ domain, token, apiKey, }?: {
1245
+ domain?: string;
1246
+ apiKey?: string;
1247
+ token?: string;
1248
+ }) => Promise<axios.AxiosResponse<any, any>>;
1249
+ declare const fetchAutocomplete: ({ suggestion, domain, apiKey, token, }?: {
1250
+ suggestion?: string;
1251
+ domain?: string;
1252
+ apiKey?: string;
1253
+ token?: string;
1254
+ }) => Promise<axios.AxiosResponse<any, any>>;
1255
+ declare const fetchVLAutocomplete: ({ suggestion, domain, token, apiKey, context, filter, cancelToken, }?: {
1256
+ suggestion?: string;
1257
+ domain?: string;
1258
+ apiKey?: string;
1259
+ token?: string;
1260
+ context?: string;
1261
+ filter?: string;
1262
+ cancelToken?: any;
1263
+ }) => Promise<axios.AxiosResponse<any, any>>;
1264
+ declare const fetchFilters: ({ apiKey, token, domain, }?: {
1265
+ domain?: string;
1266
+ apiKey?: string;
1267
+ token?: string;
1268
+ }) => Promise<axios.AxiosResponse<any, any>>;
1269
+ declare const setFilters: ({ apiKey, token, domain, filters, }?: {
1270
+ domain?: string;
1271
+ apiKey?: string;
1272
+ token?: string;
1273
+ filters?: Object[];
1274
+ }) => Promise<axios.AxiosResponse<any, any>>;
1275
+ declare const unsetFilterFromAPI: ({ apiKey, token, domain, filter, }?: {
1276
+ domain?: string;
1277
+ apiKey?: string;
1278
+ token?: string;
1279
+ filter?: {
1280
+ id: string;
1281
+ };
1282
+ }) => Promise<axios.AxiosResponse<any, any>>;
1283
+ declare const setColumnVisibility: ({ apiKey, token, domain, columns, }?: {
1284
+ domain?: string;
1285
+ apiKey?: string;
1286
+ token?: string;
1287
+ columns?: any[];
1288
+ }) => Promise<axios.AxiosResponse<any, any>>;
1289
+ declare const sendSuggestion: ({ queryId, suggestion, apiKey, domain, token, }?: {
1290
+ queryId?: string;
1291
+ suggestion?: boolean;
1292
+ domain?: string;
1293
+ apiKey?: string;
1294
+ token?: string;
1295
+ }) => Promise<axios.AxiosResponse<any, any>>;
1296
+ declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, apiKey, token, skipQueryValidation, }?: {
1297
+ keywords?: string;
1298
+ pageSize?: number;
1299
+ pageNumber?: number;
1300
+ domain?: string;
1301
+ apiKey?: string;
1302
+ token?: string;
1303
+ skipQueryValidation?: boolean;
1304
+ }) => Promise<axios.AxiosResponse<any, any>>;
1305
+ declare const reportProblem: ({ message, queryId, domain, apiKey, token, }?: {
1306
+ message?: string;
1307
+ queryId?: string;
1308
+ domain?: string;
1309
+ apiKey?: string;
1310
+ token?: string;
1311
+ }) => Promise<axios.AxiosResponse<any, any>>;
1312
+
1313
+ declare const formatAdditionalSelectColumn: (column: ColumnSelect, sqlFn?: Function) => {
1314
+ insertion: string;
1315
+ columns: string[];
1316
+ };
1317
+
1158
1318
  declare const dataStructureChanged: (props: any, prevProps: any) => boolean;
1159
1319
  declare const onlySeriesVisibilityChanged: (props: any, prevProps: any) => boolean;
1160
1320
  declare const scaleZero: (scale: any) => any;
@@ -1324,7 +1484,7 @@ declare const getBinLinearScale: ({ columns, columnIndex, axis, buckets, bins, e
1324
1484
  dataFormatting: DataFormatting;
1325
1485
  changeNumberColumnIndices: Function;
1326
1486
  }) => any;
1327
- declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, minValue, maxValue, tickValues, numTicks, stacked, isScaled, columns, columnIndices, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, aggregated, }: {
1487
+ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, minValue, maxValue, tickValues, numTicks, stacked, isScaled, columns, originalColumns, columnIndices, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, aggregated, }: {
1328
1488
  buckets: any[];
1329
1489
  minValue: number;
1330
1490
  maxValue: number;
@@ -1336,6 +1496,7 @@ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, m
1336
1496
  stacked: boolean;
1337
1497
  isScaled: boolean;
1338
1498
  columns: Column[];
1499
+ originalColumns?: Column[];
1339
1500
  units: string;
1340
1501
  title: string;
1341
1502
  columnIndex: number;
@@ -1350,9 +1511,10 @@ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, m
1350
1511
  width: number;
1351
1512
  aggregated: boolean;
1352
1513
  }) => any;
1353
- declare const getLinearScale: ({ minValue, maxValue, axis, range, domain, tickValues, numTicks, stacked, isScaled, columns, units, title, columnIndex, columnIndices, hasDropdown, allowMultipleSeries, disableAutoScale, dataFormatting, changeNumberColumnIndices, changeColumnIndices, changeAggConfig, enableAxisDropdown, height, width, aggregated, colorScale, adjustRange, }: {
1514
+ declare const getLinearScale: ({ minValue, maxValue, axis, range, domain, tickValues, numTicks, stacked, isScaled, columns, units, title, columnIndex, columnIndices, hasDropdown, allowMultipleSeries, disableAutoScale, dataFormatting, changeNumberColumnIndices, changeColumnIndices, changeAggConfig, enableAxisDropdown, height, width, aggregated, colorScale, adjustRange, originalColumns, }: {
1354
1515
  axis: string;
1355
1516
  columns: Column[];
1517
+ originalColumns?: Column[];
1356
1518
  columnIndex: number;
1357
1519
  columnIndices: number[];
1358
1520
  height: number;
@@ -1379,7 +1541,7 @@ declare const getLinearScale: ({ minValue, maxValue, axis, range, domain, tickVa
1379
1541
  colorScale?: any;
1380
1542
  adjustRange?: boolean;
1381
1543
  }) => any;
1382
- declare const getLinearScales: ({ data, columnIndices1, columnIndices2, axis, stacked, isScaled, columns, hasDropdown, allowMultipleSeries, disableAutoScale, dataFormatting, changeNumberColumnIndices, changeAggConfig, enableAxisDropdown, stringColumnIndex, height, width, aggregated, colorScales, }: {
1544
+ declare const getLinearScales: ({ data, columnIndices1, columnIndices2, axis, stacked, isScaled, columns, originalColumns, hasDropdown, allowMultipleSeries, disableAutoScale, dataFormatting, changeNumberColumnIndices, changeAggConfig, enableAxisDropdown, stringColumnIndex, height, width, aggregated, colorScales, }: {
1383
1545
  data: Rows;
1384
1546
  columnIndices1: number[];
1385
1547
  columnIndices2: number[];
@@ -1387,6 +1549,7 @@ declare const getLinearScales: ({ data, columnIndices1, columnIndices2, axis, st
1387
1549
  stacked: boolean;
1388
1550
  isScaled: boolean;
1389
1551
  columns: Column[];
1552
+ originalColumns?: Column[];
1390
1553
  hasDropdown: boolean;
1391
1554
  allowMultipleSeries: boolean;
1392
1555
  disableAutoScale: boolean;
@@ -2059,142 +2222,6 @@ declare const removeNotificationChannel: ({ channelId, domain, apiKey, token }:
2059
2222
  token: any;
2060
2223
  }) => Promise<axios.AxiosResponse<any, any>>;
2061
2224
 
2062
- declare const isError500Type: (referenceId: any) => boolean;
2063
- declare const fetchSuggestions: ({ query, queryId, domain, apiKey, token, cancelToken, }?: {
2064
- query?: string;
2065
- queryId?: string;
2066
- domain?: string;
2067
- apiKey?: string;
2068
- token?: string;
2069
- cancelToken?: any;
2070
- }) => Promise<axios.AxiosResponse<any, any>>;
2071
- declare const runQueryNewPage: ({ queryId, domain, apiKey, token, page, cancelToken, }?: {
2072
- queryId?: string;
2073
- domain?: string;
2074
- apiKey?: string;
2075
- token?: string;
2076
- page?: number;
2077
- cancelToken?: any;
2078
- }) => Promise<any>;
2079
- interface QueryParams {
2080
- query?: string;
2081
- userSelection?: Object[];
2082
- userSelectionFinal?: Object[];
2083
- debug?: boolean;
2084
- test?: boolean;
2085
- domain?: string;
2086
- apiKey?: string;
2087
- token?: string;
2088
- source?: string;
2089
- filters?: Object[];
2090
- orders?: Object[];
2091
- tableFilters?: Object[];
2092
- pageSize?: number;
2093
- allowSuggestions?: boolean;
2094
- cancelToken?: any;
2095
- scope?: string;
2096
- enableQueryValidation?: boolean;
2097
- skipQueryValidation?: boolean;
2098
- }
2099
- declare const runQueryOnly: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, scope, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any>>;
2100
- declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }?: {
2101
- text?: string;
2102
- domain?: string;
2103
- apiKey?: string;
2104
- token?: string;
2105
- cancelToken?: any;
2106
- }) => Promise<axios.AxiosResponse<any, any>>;
2107
- declare const runQuery: ({ query, userSelection, userSelectionFinal, debug, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any>>;
2108
- declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
2109
- queryId?: string;
2110
- domain?: string;
2111
- apiKey?: string;
2112
- token?: string;
2113
- csvProgressCallback?: Function;
2114
- }) => Promise<axios.AxiosResponse<any, any>>;
2115
- declare const runDrilldown: ({ queryID, groupBys, debug, test, domain, apiKey, token, orders, source, tableFilters, cancelToken, pageSize, }?: {
2116
- queryID?: string;
2117
- groupBys?: Object[];
2118
- debug?: boolean;
2119
- test?: boolean;
2120
- domain?: string;
2121
- apiKey?: string;
2122
- token?: string;
2123
- orders?: Object[];
2124
- source?: string;
2125
- tableFilters?: Object[];
2126
- cancelToken?: any;
2127
- pageSize?: number;
2128
- }) => Promise<TransformedAxiosResponse>;
2129
- declare const fetchTopics: ({ domain, token, apiKey, }?: {
2130
- domain?: string;
2131
- apiKey?: string;
2132
- token?: string;
2133
- }) => Promise<axios.AxiosResponse<any, any>>;
2134
- declare const fetchAutocomplete: ({ suggestion, domain, apiKey, token, }?: {
2135
- suggestion?: string;
2136
- domain?: string;
2137
- apiKey?: string;
2138
- token?: string;
2139
- }) => Promise<axios.AxiosResponse<any, any>>;
2140
- declare const fetchVLAutocomplete: ({ suggestion, domain, token, apiKey, context, filter, cancelToken, }?: {
2141
- suggestion?: string;
2142
- domain?: string;
2143
- apiKey?: string;
2144
- token?: string;
2145
- context?: string;
2146
- filter?: string;
2147
- cancelToken?: any;
2148
- }) => Promise<axios.AxiosResponse<any, any>>;
2149
- declare const fetchFilters: ({ apiKey, token, domain, }?: {
2150
- domain?: string;
2151
- apiKey?: string;
2152
- token?: string;
2153
- }) => Promise<axios.AxiosResponse<any, any>>;
2154
- declare const setFilters: ({ apiKey, token, domain, filters, }?: {
2155
- domain?: string;
2156
- apiKey?: string;
2157
- token?: string;
2158
- filters?: Object[];
2159
- }) => Promise<axios.AxiosResponse<any, any>>;
2160
- declare const unsetFilterFromAPI: ({ apiKey, token, domain, filter, }?: {
2161
- domain?: string;
2162
- apiKey?: string;
2163
- token?: string;
2164
- filter?: {
2165
- id: string;
2166
- };
2167
- }) => Promise<axios.AxiosResponse<any, any>>;
2168
- declare const setColumnVisibility: ({ apiKey, token, domain, columns, }?: {
2169
- domain?: string;
2170
- apiKey?: string;
2171
- token?: string;
2172
- columns?: any[];
2173
- }) => Promise<axios.AxiosResponse<any, any>>;
2174
- declare const sendSuggestion: ({ queryId, suggestion, apiKey, domain, token, }?: {
2175
- queryId?: string;
2176
- suggestion?: boolean;
2177
- domain?: string;
2178
- apiKey?: string;
2179
- token?: string;
2180
- }) => Promise<axios.AxiosResponse<any, any>>;
2181
- declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, apiKey, token, skipQueryValidation, }?: {
2182
- keywords?: string;
2183
- pageSize?: number;
2184
- pageNumber?: number;
2185
- domain?: string;
2186
- apiKey?: string;
2187
- token?: string;
2188
- skipQueryValidation?: boolean;
2189
- }) => Promise<axios.AxiosResponse<any, any>>;
2190
- declare const reportProblem: ({ message, queryId, domain, apiKey, token, }?: {
2191
- message?: string;
2192
- queryId?: string;
2193
- domain?: string;
2194
- apiKey?: string;
2195
- token?: string;
2196
- }) => Promise<axios.AxiosResponse<any, any>>;
2197
-
2198
2225
  declare const getQueryFn: (response: TransformedAxiosResponse | undefined) => ({ authentication, autoQLConfig, originalQueryID, formattedTableParams, clickedFilter, ...args }: {
2199
2226
  [x: string]: any;
2200
2227
  authentication?: {};
@@ -2203,8 +2230,8 @@ declare const getQueryFn: (response: TransformedAxiosResponse | undefined) => ({
2203
2230
  formattedTableParams: any;
2204
2231
  clickedFilter: any;
2205
2232
  }) => any;
2206
- declare const transformQueryResponse: (response: AxiosResponse | undefined, originalQueryID?: string, isDrilldown?: boolean) => TransformedAxiosResponse;
2207
- declare const transformQueryResponseColumns: (response: AxiosResponse) => Column[];
2233
+ declare const transformQueryResponse: (response: AxiosResponse | undefined, originalQueryID?: string, isDrilldown?: boolean, newColumns?: AdditionalSelect[]) => TransformedAxiosResponse;
2234
+ declare const transformQueryResponseColumns: (response: AxiosResponse, addedColumns?: AdditionalSelect[]) => Column[];
2208
2235
 
2209
2236
  declare const sendTrainingData: ({ trainingData, apiKey, domain, token, }?: {
2210
2237
  trainingData?: object;
@@ -2269,4 +2296,4 @@ declare function color(): {
2269
2296
  on(): any;
2270
2297
  };
2271
2298
 
2272
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 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_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, QueryData, QueryErrorTypes, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
2299
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AdditionalSelect, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AvailableSelect, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnSelect, 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_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, QueryData, QueryErrorTypes, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
@@ -14345,6 +14345,7 @@
14345
14345
  icon,
14346
14346
  supportsStrings = false,
14347
14347
  symbol,
14348
+ sqlFn,
14348
14349
  fn = () => {
14349
14350
  }
14350
14351
  }) {
@@ -14356,6 +14357,7 @@
14356
14357
  this.symbol = symbol;
14357
14358
  this.fn = fn;
14358
14359
  this.icon = icon;
14360
+ this.sqlFn = sqlFn;
14359
14361
  }
14360
14362
  };
14361
14363
 
@@ -14472,28 +14474,32 @@
14472
14474
  tooltip: "<strong>Sum:</strong> Values that have the same chart axis label will be added up.",
14473
14475
  // symbol: String.fromCharCode(931),
14474
14476
  icon: "sum",
14475
- fn: sum
14477
+ fn: sum,
14478
+ sqlFn: (columnName) => `sum(${columnName})`
14476
14479
  }),
14477
14480
  AVG: new AggType({
14478
14481
  type: "AVG" /* AVG */,
14479
14482
  displayName: "Avg",
14480
14483
  tooltip: "<strong>Average:</strong> Values that have the same chart axis label will be averaged.",
14481
14484
  symbol: String.fromCharCode(956),
14482
- fn: mean
14485
+ fn: mean,
14486
+ sqlFn: (columnName) => `avg(${columnName})`
14483
14487
  }),
14484
14488
  MIN: new AggType({
14485
14489
  type: "MIN" /* MIN */,
14486
14490
  displayName: "Min",
14487
14491
  tooltip: "<strong>Minimum:</strong> The smallest value will be shown for all data points with same label.",
14488
14492
  icon: "minimum",
14489
- fn: min
14493
+ fn: min,
14494
+ sqlFn: (columnName) => `min(${columnName})`
14490
14495
  }),
14491
14496
  MAX: new AggType({
14492
14497
  type: "MAX" /* MAX */,
14493
14498
  displayName: "Max",
14494
14499
  tooltip: "<strong>Maximum:</strong> The largest value will be shown for all data points with same label.",
14495
14500
  icon: "maximum",
14496
- fn: max
14501
+ fn: max,
14502
+ sqlFn: (columnName) => `max(${columnName})`
14497
14503
  }),
14498
14504
  COUNT: new AggType({
14499
14505
  type: "COUNT" /* COUNT */,
@@ -14505,7 +14511,8 @@
14505
14511
  fn: (arr) => {
14506
14512
  var _a, _b;
14507
14513
  return (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value)) == null ? void 0 : _a.length) != null ? _b : 0;
14508
- }
14514
+ },
14515
+ sqlFn: (columnName) => `count(${columnName})`
14509
14516
  }),
14510
14517
  COUNT_DISTINCT: new AggType({
14511
14518
  type: "COUNT_DISTINCT" /* COUNT_DISTINCT */,
@@ -14517,7 +14524,8 @@
14517
14524
  fn: (arr) => {
14518
14525
  var _a, _b, _c;
14519
14526
  return (_c = (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value || value == 0)) == null ? void 0 : _a.filter(onlyUnique)) == null ? void 0 : _b.length) != null ? _c : 0;
14520
- }
14527
+ },
14528
+ sqlFn: (columnName) => `count(distinct ${columnName})`
14521
14529
  }),
14522
14530
  MEDIAN: new AggType({
14523
14531
  type: "MEDIAN" /* MEDIAN */,
@@ -14533,7 +14541,8 @@
14533
14541
  unit: "none",
14534
14542
  tooltip: "The standard deviation will be shown for all data points with the same label.",
14535
14543
  symbol: "\u03C3",
14536
- fn: deviation
14544
+ fn: deviation,
14545
+ sqlFn: (columnName) => `stddev(${columnName})`
14537
14546
  }),
14538
14547
  VARIANCE: new AggType({
14539
14548
  type: "VARIANCE" /* VARIANCE */,
@@ -19608,6 +19617,18 @@
19608
19617
  return queryValidationQueryText;
19609
19618
  };
19610
19619
 
19620
+ // src/HelperFns/queryHelpers.ts
19621
+ var formatAdditionalSelectColumn = (column, sqlFn) => {
19622
+ let columnName = column.table_column;
19623
+ if (sqlFn) {
19624
+ columnName = sqlFn(columnName);
19625
+ }
19626
+ return {
19627
+ insertion: "OPTIONAL",
19628
+ columns: [columnName]
19629
+ };
19630
+ };
19631
+
19611
19632
  // src/Charts/chartHelpers.ts
19612
19633
  var import_lodash7 = __toESM(require_lodash2());
19613
19634
  var import_lodash8 = __toESM(require_lodash());
@@ -22922,6 +22943,7 @@
22922
22943
  stacked,
22923
22944
  isScaled,
22924
22945
  columns,
22946
+ originalColumns,
22925
22947
  columnIndices,
22926
22948
  dataFormatting,
22927
22949
  changeNumberColumnIndices,
@@ -22963,7 +22985,8 @@
22963
22985
  height,
22964
22986
  width,
22965
22987
  aggregated,
22966
- adjustRange: false
22988
+ adjustRange: false,
22989
+ originalColumns
22967
22990
  });
22968
22991
  };
22969
22992
  var getLinearScale = ({
@@ -22993,9 +23016,10 @@
22993
23016
  width,
22994
23017
  aggregated = false,
22995
23018
  colorScale,
22996
- adjustRange = true
23019
+ adjustRange = true,
23020
+ originalColumns
22997
23021
  }) => {
22998
- var _a, _b, _c, _d;
23022
+ var _a, _b, _c, _d, _e;
22999
23023
  let domainFinal = domain;
23000
23024
  if (!domain) {
23001
23025
  let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
@@ -23025,7 +23049,7 @@
23025
23049
  scale.columnIndex = columnIndex;
23026
23050
  scale.column = columns == null ? void 0 : columns[columnIndex];
23027
23051
  scale.fields = axisColumns;
23028
- scale.allFields = (_d = getNumberColumnIndices(columns)) == null ? void 0 : _d.allNumberColumnIndices;
23052
+ scale.allFields = aggregated ? (_d = getNumberColumnIndices(originalColumns)) == null ? void 0 : _d.allNumberColumnIndices : (_e = getNumberColumnIndices(columns)) == null ? void 0 : _e.allNumberColumnIndices;
23029
23053
  scale.dataFormatting = config;
23030
23054
  scale.hasDropdown = hasDropdown != null ? hasDropdown : enableAxisDropdown;
23031
23055
  scale.stacked = !!stacked;
@@ -23060,6 +23084,7 @@
23060
23084
  stacked,
23061
23085
  isScaled,
23062
23086
  columns,
23087
+ originalColumns,
23063
23088
  hasDropdown,
23064
23089
  allowMultipleSeries,
23065
23090
  disableAutoScale,
@@ -23088,7 +23113,8 @@
23088
23113
  height,
23089
23114
  width,
23090
23115
  aggregated,
23091
- changeAggConfig
23116
+ changeAggConfig,
23117
+ originalColumns
23092
23118
  };
23093
23119
  const minMax = getMinAndMaxValues(data, columnIndices1, isScaled, stacked, stringColumnIndex);
23094
23120
  const minValue = minMax.minValue;
@@ -27578,11 +27604,11 @@
27578
27604
  }
27579
27605
  };
27580
27606
  };
27581
- var transformQueryResponse = (response, originalQueryID, isDrilldown2 = false) => {
27607
+ var transformQueryResponse = (response, originalQueryID, isDrilldown2 = false, newColumns) => {
27582
27608
  var _a, _b;
27583
27609
  const transformedResponse = (0, import_lodash9.default)(response);
27584
27610
  if ((_b = (_a = transformedResponse == null ? void 0 : transformedResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) {
27585
- const transformedColumns = transformQueryResponseColumns(transformedResponse);
27611
+ const transformedColumns = transformQueryResponseColumns(transformedResponse, newColumns);
27586
27612
  if (transformedColumns) {
27587
27613
  transformedResponse.data.data.columns = transformedColumns;
27588
27614
  }
@@ -27596,7 +27622,7 @@
27596
27622
  }
27597
27623
  return transformedResponse;
27598
27624
  };
27599
- var transformQueryResponseColumns = (response) => {
27625
+ var transformQueryResponseColumns = (response, addedColumns) => {
27600
27626
  var _a, _b;
27601
27627
  const columns = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns;
27602
27628
  if (!(columns == null ? void 0 : columns.length)) {
@@ -27604,11 +27630,16 @@
27604
27630
  }
27605
27631
  const transformedColumns = columns.map((col, i) => {
27606
27632
  const drilldownGroupby = getDrilldownGroupby(response, col);
27633
+ let additional = false;
27634
+ if (addedColumns == null ? void 0 : addedColumns.find((select) => select.columns.includes(col.alt_name || col.name))) {
27635
+ additional = true;
27636
+ }
27607
27637
  return new Column({
27608
27638
  ...col,
27609
27639
  field: `${i}`,
27610
27640
  index: i,
27611
- drilldownGroupby
27641
+ drilldownGroupby,
27642
+ additional
27612
27643
  });
27613
27644
  });
27614
27645
  return transformedColumns;
@@ -27758,7 +27789,8 @@
27758
27789
  pageSize = DEFAULT_DATA_PAGE_SIZE,
27759
27790
  allowSuggestions = true,
27760
27791
  cancelToken,
27761
- scope = "null"
27792
+ scope = "null",
27793
+ newColumns
27762
27794
  } = {}) => {
27763
27795
  const url2 = `${domain}/autoql/api/v1/query?key=${apiKey}`;
27764
27796
  const finalUserSelection = userSelectionFinal || transformUserSelection(userSelection);
@@ -27777,7 +27809,8 @@
27777
27809
  filters: tableFilters,
27778
27810
  page_size: pageSize,
27779
27811
  date_format: "ISO8601",
27780
- scope: finalScope
27812
+ scope: finalScope,
27813
+ additional_selects: newColumns
27781
27814
  };
27782
27815
  if (!query || !query.trim()) {
27783
27816
  console.error("No query supplied in request");
@@ -27798,7 +27831,7 @@
27798
27831
  if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
27799
27832
  throw new Error("Parse error" /* PARSE_ERROR */);
27800
27833
  }
27801
- return Promise.resolve(transformQueryResponse(response));
27834
+ return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
27802
27835
  }).catch((error) => {
27803
27836
  var _a, _b, _c, _d, _e;
27804
27837
  const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;