autoql-fe-utils 1.0.32 → 1.0.34

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
@@ -467,6 +467,7 @@ interface RawColumn {
467
467
  display_name?: string;
468
468
  is_visible?: boolean;
469
469
  multi_series?: boolean;
470
+ drill_down?: string;
470
471
  }
471
472
  interface Column extends RawColumn {
472
473
  aggType?: string;
@@ -716,10 +717,12 @@ declare const getTimeFrameTextFromChunk: (chunk: any) => string;
716
717
  declare const getStringFromSource: (source: string | number | Array<string>) => string | null;
717
718
  declare const mergeSources: (source: string | number | Array<string>, newSource: string | number | Array<string>) => string | null;
718
719
 
719
- declare const nameValueObject: (name: any, value: any) => {
720
- name: any;
721
- value: any;
722
- };
720
+ interface DrilldownColumn {
721
+ name: string;
722
+ value: string | number;
723
+ drill_down?: string;
724
+ }
725
+ declare const nameValueObject: (name: any, value: any, drill_down?: any) => DrilldownColumn;
723
726
  declare const getKeyByValue: (object: any, value: any) => string;
724
727
  declare const cloneObject: (from: any, to: any) => any;
725
728
 
@@ -1772,6 +1775,12 @@ declare const fetchDataExplorerSuggestions: ({ pageSize, pageNumber, domain, api
1772
1775
  userVLSelection?: ValueLabel[];
1773
1776
  skipQueryValidation?: boolean;
1774
1777
  }) => Promise<axios.AxiosResponse<any, any>>;
1778
+ declare const fetchSubjectListV2: ({ domain, apiKey, token, valueLabel }: {
1779
+ domain: any;
1780
+ apiKey: any;
1781
+ token: any;
1782
+ valueLabel: any;
1783
+ }) => Promise<any[]>;
1775
1784
  declare const fetchSubjectList: ({ domain, apiKey, token, valueLabel }: {
1776
1785
  domain: any;
1777
1786
  apiKey: any;
@@ -2146,4 +2155,4 @@ declare function color(): {
2146
2155
  on(): any;
2147
2156
  };
2148
2157
 
2149
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AggType, AggTypeParams, AggTypes, 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_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, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, 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_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, 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, QueryData, 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, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, 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, fetchDataExplorerSuggestions, fetchDataExplorerSuggestionsV2, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, 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, 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, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getRadiusScale, getRangeForAxis, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, 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, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, 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, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, usePivotDataForChart, uuidv4, validateExpression };
2158
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AggType, AggTypeParams, AggTypes, 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_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, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, 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_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, 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, QueryData, 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, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, 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, fetchDataExplorerSuggestions, fetchDataExplorerSuggestionsV2, 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, 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, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getRadiusScale, getRangeForAxis, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, 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, invertArray, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, 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, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, usePivotDataForChart, uuidv4, validateExpression };
@@ -14888,7 +14888,7 @@
14888
14888
  return RESET_PERIOD_OPTIONS[dataAlert.reset_period];
14889
14889
  };
14890
14890
  var getSupportedConditionTypes = (expression, queryResponse) => {
14891
- var _a;
14891
+ var _a, _b, _c;
14892
14892
  try {
14893
14893
  if (expression == null ? void 0 : expression[0]) {
14894
14894
  const firstCondition = (_a = expression == null ? void 0 : expression[0]) == null ? void 0 : _a.condition;
@@ -14899,6 +14899,8 @@
14899
14899
  }
14900
14900
  if (isSingleValueResponse(queryResponse)) {
14901
14901
  return [COMPARE_TYPE];
14902
+ } else if (isAggregation((_c = (_b = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b.data) == null ? void 0 : _c.columns)) {
14903
+ return [COMPARE_TYPE];
14902
14904
  }
14903
14905
  return [EXISTS_TYPE];
14904
14906
  } catch (error) {
@@ -15627,11 +15629,15 @@
15627
15629
  };
15628
15630
 
15629
15631
  // src/HelperFns/objectHelpers.ts
15630
- var nameValueObject = (name, value) => {
15631
- return {
15632
+ var nameValueObject = (name, value, drill_down) => {
15633
+ const nameValueObj = {
15632
15634
  name,
15633
15635
  value
15634
15636
  };
15637
+ if (drill_down) {
15638
+ nameValueObj.drill_down = drill_down;
15639
+ }
15640
+ return nameValueObj;
15635
15641
  };
15636
15642
  var getKeyByValue = (object, value) => {
15637
15643
  return Object.keys(object).find((key) => object[key] === value);
@@ -15725,7 +15731,8 @@
15725
15731
  groupableColumns.forEach((colIndex) => {
15726
15732
  const groupByName = columns[colIndex].name;
15727
15733
  const groupByValue = `${row[colIndex]}`;
15728
- groupBys.push(nameValueObject(groupByName, groupByValue));
15734
+ const groupByDrilldown = columns[colIndex].drill_down;
15735
+ groupBys.push(nameValueObject(groupByName, groupByValue, groupByDrilldown));
15729
15736
  });
15730
15737
  return { groupBys, supportedByAPI: true };
15731
15738
  };
@@ -15743,7 +15750,8 @@
15743
15750
  groupableColumns.forEach((colIndex) => {
15744
15751
  const groupByName = tableColumns[colIndex].name;
15745
15752
  const groupByValue = `${rowData[colIndex]}`;
15746
- groupByArray.push(nameValueObject(groupByName, groupByValue));
15753
+ const groupByDrilldown = tableColumns[colIndex].drill_down;
15754
+ groupByArray.push(nameValueObject(groupByName, groupByValue, groupByDrilldown));
15747
15755
  });
15748
15756
  return groupByArray;
15749
15757
  };
@@ -15754,13 +15762,13 @@
15754
15762
  rowHeaderDefinition,
15755
15763
  columnHeaderDefinition
15756
15764
  }) => {
15757
- var _a;
15765
+ var _a, _b;
15758
15766
  try {
15759
- const columnName = columnHeaderDefinition.name;
15767
+ const columnName = (_a = columnHeaderDefinition.drill_down) != null ? _a : columnHeaderDefinition.name;
15760
15768
  const columnField = Number(cell.getField()) - 1;
15761
15769
  const columnValue = getKeyByValue(columnHeaders, columnField);
15762
15770
  const rowName = rowHeaderDefinition.name;
15763
- const rowIndex = ((_a = cell == null ? void 0 : cell.getRow()) == null ? void 0 : _a.getPosition()) - 1;
15771
+ const rowIndex = ((_b = cell == null ? void 0 : cell.getRow()) == null ? void 0 : _b.getPosition()) - 1;
15764
15772
  const rowValue = getKeyByValue(rowHeaders, rowIndex);
15765
15773
  if (columnName && rowName && columnValue !== void 0 && rowValue !== void 0) {
15766
15774
  return [
@@ -17348,7 +17356,7 @@
17348
17356
  "background-color-checkbox": "#FFFFFF",
17349
17357
  "border-color": "#D8D8D8",
17350
17358
  "table-border-color": "#EFEFEF",
17351
- "hover-color": "#F6F7F9",
17359
+ "hover-color": "#FAFAFA",
17352
17360
  "text-color-primary": "#343434",
17353
17361
  "text-color-secondary": "#8b8b8b",
17354
17362
  "text-color-accent": "#FFFFFF",
@@ -19039,7 +19047,7 @@
19039
19047
  return filters;
19040
19048
  };
19041
19049
  var onTableCellClick = ({ cell, columns, tableConfig, pivotData }) => {
19042
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
19050
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
19043
19051
  try {
19044
19052
  if ((_b = (_a = cell == null ? void 0 : cell.getColumn()) == null ? void 0 : _a.getDefinition()) == null ? void 0 : _b.pivot) {
19045
19053
  return;
@@ -19059,7 +19067,7 @@
19059
19067
  const value = (_h = (_g = pivotData.pivotOriginalColumnData) == null ? void 0 : _g[year]) == null ? void 0 : _h[month];
19060
19068
  groupBys = [
19061
19069
  {
19062
- name: (_i = columns[dateColumnIndex]) == null ? void 0 : _i.name,
19070
+ name: (_k = (_i = columns[dateColumnIndex]) == null ? void 0 : _i.drill_down) != null ? _k : (_j = columns[dateColumnIndex]) == null ? void 0 : _j.name,
19063
19071
  value
19064
19072
  }
19065
19073
  ];
@@ -21670,11 +21678,13 @@
21670
21678
  const value = `${(_d = pivotOriginalColumnData == null ? void 0 : pivotOriginalColumnData[year]) == null ? void 0 : _d[month]}`;
21671
21679
  groupBys.push({
21672
21680
  name: stringColumn.name,
21681
+ drill_down: stringColumn.drill_down,
21673
21682
  value
21674
21683
  });
21675
21684
  } else if (stringColumn == null ? void 0 : stringColumn.groupable) {
21676
21685
  groupBys.push({
21677
21686
  name: stringColumn.name,
21687
+ drill_down: stringColumn.drill_down,
21678
21688
  value: `${row == null ? void 0 : row[stringColumnIndex]}`
21679
21689
  });
21680
21690
  }
@@ -21682,6 +21692,7 @@
21682
21692
  if (column.origColumn) {
21683
21693
  groupBys.push({
21684
21694
  name: legendColumn.name,
21695
+ drill_down: legendColumn.drill_down,
21685
21696
  value: `${column == null ? void 0 : column.name}`
21686
21697
  });
21687
21698
  }
@@ -27189,7 +27200,7 @@
27189
27200
  if (error.message === "Parse error") {
27190
27201
  return Promise.reject({ error: "Parse error" });
27191
27202
  }
27192
- if (error.response === 401 || !((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27203
+ if (!((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27193
27204
  return Promise.reject({ error: "Unauthenticated" });
27194
27205
  }
27195
27206
  return Promise.reject(error == null ? void 0 : error.response);
@@ -27261,7 +27272,7 @@
27261
27272
  if ((error == null ? void 0 : error.message) === "Parse error") {
27262
27273
  return Promise.reject({ error: "Parse error" });
27263
27274
  }
27264
- if ((error == null ? void 0 : error.response) === 401 || !((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27275
+ if (!((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data)) {
27265
27276
  return Promise.reject({ error: "Unauthenticated" });
27266
27277
  }
27267
27278
  const referenceId = (_c = (_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.reference_id;
@@ -27917,7 +27928,7 @@
27917
27928
  return Promise.resolve(queryValidationResponse);
27918
27929
  }
27919
27930
  }
27920
- const exploreQueriesUrl = `${domain}/autoql/api/v1/query/query-builder?key=${apiKey}`;
27931
+ const url2 = `${domain}/autoql/api/v1/query/query-builder?key=${apiKey}`;
27921
27932
  const config = {
27922
27933
  headers: {
27923
27934
  Authorization: `Bearer ${token}`
@@ -27934,9 +27945,11 @@
27934
27945
  const data = {
27935
27946
  page: pageNumber,
27936
27947
  page_size: pageSize,
27937
- search_terms: text,
27948
+ query_to_start: text,
27938
27949
  context,
27939
- value_label_info: vlInfo
27950
+ columns
27951
+ // {"public.customer_dimension.customer_name": {"value": "inistar"}}
27952
+ // value_label_info: vlInfo,
27940
27953
  };
27941
27954
  const suggestionsMock = [
27942
27955
  {
@@ -28054,6 +28067,35 @@
28054
28067
  return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
28055
28068
  });
28056
28069
  };
28070
+ var fetchSubjectListV2 = ({ domain, apiKey, token, valueLabel }) => {
28071
+ if (!token || !domain || !apiKey) {
28072
+ return Promise.reject(new Error("Unauthenticated"));
28073
+ }
28074
+ let url2 = `${domain}/autoql/api/v1/query/subjectsV2?key=${apiKey}`;
28075
+ if (valueLabel) {
28076
+ url2 += `&value_label=${valueLabel}`;
28077
+ }
28078
+ const config = {
28079
+ headers: {
28080
+ Authorization: `Bearer ${token}`
28081
+ }
28082
+ };
28083
+ return axios_default.get(url2, config).then((response) => {
28084
+ var _a, _b;
28085
+ let subjectList = [];
28086
+ if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.subjects) {
28087
+ subjectList = response.data.data.subjects.sort((a, b) => {
28088
+ const aName = a.subject;
28089
+ const bName = b.subject;
28090
+ aName.localeCompare(bName);
28091
+ });
28092
+ }
28093
+ return Promise.resolve(subjectList);
28094
+ }).catch((error) => {
28095
+ var _a;
28096
+ return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
28097
+ });
28098
+ };
28057
28099
  var fetchSubjectList = ({ domain, apiKey, token, valueLabel }) => {
28058
28100
  if (!token || !domain || !apiKey) {
28059
28101
  return Promise.reject(new Error("Unauthenticated"));