autoql-fe-utils 1.11.18 → 1.11.21

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.mts CHANGED
@@ -75,7 +75,8 @@ declare enum DisplayTypes {
75
75
  HISTOGRAM = "histogram",
76
76
  SCATTERPLOT = "scatterplot",
77
77
  COLUMN_LINE = "column_line",
78
- NETWORK_GRAPH = "network_graph"
78
+ NETWORK_GRAPH = "network_graph",
79
+ SANKEY = "sankey"
79
80
  }
80
81
  declare enum QueryErrorTypes {
81
82
  UNAUTHENTICATED = "Unauthenticated",
@@ -597,6 +598,7 @@ interface Column extends RawColumn {
597
598
  custom?: boolean;
598
599
  id?: string;
599
600
  is_timestamp?: boolean;
601
+ quantity_type?: 'integer' | 'float';
600
602
  }
601
603
  interface AvailableSelect {
602
604
  table_column: string;
@@ -1000,6 +1002,12 @@ declare const findNetworkColumns: (columns: any) => {
1000
1002
  targetColumnIndex: number;
1001
1003
  weightColumnIndex: number;
1002
1004
  };
1005
+ /**
1006
+ * Determines if the dataset supports rendering a Sankey visualization
1007
+ * Sankey charts require a source string column, a target string column, and a numeric weight column.
1008
+ * The dataset must also contain at least one valid flow (source -> target) with a positive weight.
1009
+ */
1010
+ declare const supportsSankey: (rows: any, columns: any) => boolean;
1003
1011
  declare const getSupportedDisplayTypes: ({ response, columns, dataLength, pivotDataLength, isDataLimited, allowNumericStringColumns, }?: getSupportedDisplayTypesParams) => string[];
1004
1012
  declare const getFirstChartDisplayType: (supportedDisplayTypes: any, fallback: any) => any;
1005
1013
  declare const getDefaultDisplayType: (response?: AxiosResponse, defaultToChart?: boolean, columns?: Column[], dataLength?: number, pivotDataLength?: number, preferredDisplayType?: string, isDataLimited?: boolean, preferRegularTable?: boolean) => string;
@@ -1472,12 +1480,16 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
1472
1480
  declare const runQuery: ({ query, userSelection, userSelectionFinal, translation, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, newColumns, displayOverrides, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1473
1481
  declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1474
1482
  declare const runCachedDashboardQueryPost: ({ query, domain, apiKey, token, source, orders, filters, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1475
- declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
1483
+ declare const exportCSV: ({ queryId, domain, apiKey, token, filters, tableFilters, csvProgressCallback, source, scope, }?: {
1476
1484
  queryId?: string;
1477
1485
  domain?: string;
1478
1486
  apiKey?: string;
1479
1487
  token?: string;
1488
+ filters?: Object[];
1489
+ tableFilters?: Object[];
1480
1490
  csvProgressCallback?: Function;
1491
+ source?: string;
1492
+ scope?: string;
1481
1493
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1482
1494
  declare const runDrilldown: ({ queryID, groupBys, translation, test, domain, apiKey, token, orders, source, tableFilters, cancelToken, pageSize, newColumns, displayOverrides, }?: {
1483
1495
  queryID?: string;
@@ -1556,7 +1568,7 @@ declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, ap
1556
1568
  token?: string;
1557
1569
  skipQueryValidation?: boolean;
1558
1570
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1559
- declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect }?: {
1571
+ declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect, }?: {
1560
1572
  message?: string;
1561
1573
  queryId?: string;
1562
1574
  domain?: string;
@@ -2977,4 +2989,4 @@ declare function color(): {
2977
2989
  on(): any;
2978
2990
  };
2979
2991
 
2980
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type 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, type CancelTokenLike, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, 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_COLUMN_NAME, 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, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, 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, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, attachCancelToConfig, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createRequestController, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchLLMSummaryEstimate, fetchLLMSummaryQuote, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runCachedDashboardQueryPost, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
2992
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type 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, type CancelTokenLike, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, 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_COLUMN_NAME, 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, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, 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, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, attachCancelToConfig, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createRequestController, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchLLMSummaryEstimate, fetchLLMSummaryQuote, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runCachedDashboardQueryPost, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, supportsSankey, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
package/dist/index.d.ts CHANGED
@@ -75,7 +75,8 @@ declare enum DisplayTypes {
75
75
  HISTOGRAM = "histogram",
76
76
  SCATTERPLOT = "scatterplot",
77
77
  COLUMN_LINE = "column_line",
78
- NETWORK_GRAPH = "network_graph"
78
+ NETWORK_GRAPH = "network_graph",
79
+ SANKEY = "sankey"
79
80
  }
80
81
  declare enum QueryErrorTypes {
81
82
  UNAUTHENTICATED = "Unauthenticated",
@@ -597,6 +598,7 @@ interface Column extends RawColumn {
597
598
  custom?: boolean;
598
599
  id?: string;
599
600
  is_timestamp?: boolean;
601
+ quantity_type?: 'integer' | 'float';
600
602
  }
601
603
  interface AvailableSelect {
602
604
  table_column: string;
@@ -1000,6 +1002,12 @@ declare const findNetworkColumns: (columns: any) => {
1000
1002
  targetColumnIndex: number;
1001
1003
  weightColumnIndex: number;
1002
1004
  };
1005
+ /**
1006
+ * Determines if the dataset supports rendering a Sankey visualization
1007
+ * Sankey charts require a source string column, a target string column, and a numeric weight column.
1008
+ * The dataset must also contain at least one valid flow (source -> target) with a positive weight.
1009
+ */
1010
+ declare const supportsSankey: (rows: any, columns: any) => boolean;
1003
1011
  declare const getSupportedDisplayTypes: ({ response, columns, dataLength, pivotDataLength, isDataLimited, allowNumericStringColumns, }?: getSupportedDisplayTypesParams) => string[];
1004
1012
  declare const getFirstChartDisplayType: (supportedDisplayTypes: any, fallback: any) => any;
1005
1013
  declare const getDefaultDisplayType: (response?: AxiosResponse, defaultToChart?: boolean, columns?: Column[], dataLength?: number, pivotDataLength?: number, preferredDisplayType?: string, isDataLimited?: boolean, preferRegularTable?: boolean) => string;
@@ -1472,12 +1480,16 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
1472
1480
  declare const runQuery: ({ query, userSelection, userSelectionFinal, translation, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, newColumns, displayOverrides, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1473
1481
  declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1474
1482
  declare const runCachedDashboardQueryPost: ({ query, domain, apiKey, token, source, orders, filters, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1475
- declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
1483
+ declare const exportCSV: ({ queryId, domain, apiKey, token, filters, tableFilters, csvProgressCallback, source, scope, }?: {
1476
1484
  queryId?: string;
1477
1485
  domain?: string;
1478
1486
  apiKey?: string;
1479
1487
  token?: string;
1488
+ filters?: Object[];
1489
+ tableFilters?: Object[];
1480
1490
  csvProgressCallback?: Function;
1491
+ source?: string;
1492
+ scope?: string;
1481
1493
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1482
1494
  declare const runDrilldown: ({ queryID, groupBys, translation, test, domain, apiKey, token, orders, source, tableFilters, cancelToken, pageSize, newColumns, displayOverrides, }?: {
1483
1495
  queryID?: string;
@@ -1556,7 +1568,7 @@ declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, ap
1556
1568
  token?: string;
1557
1569
  skipQueryValidation?: boolean;
1558
1570
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1559
- declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect }?: {
1571
+ declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect, }?: {
1560
1572
  message?: string;
1561
1573
  queryId?: string;
1562
1574
  domain?: string;
@@ -2977,4 +2989,4 @@ declare function color(): {
2977
2989
  on(): any;
2978
2990
  };
2979
2991
 
2980
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type 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, type CancelTokenLike, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, 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_COLUMN_NAME, 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, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, 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, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, attachCancelToConfig, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createRequestController, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchLLMSummaryEstimate, fetchLLMSummaryQuote, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runCachedDashboardQueryPost, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
2992
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type 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, type CancelTokenLike, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, 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_COLUMN_NAME, 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, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, 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, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, attachCancelToConfig, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createRequestController, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchLLMSummaryEstimate, fetchLLMSummaryQuote, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runCachedDashboardQueryPost, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, supportsSankey, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
@@ -14310,6 +14310,7 @@
14310
14310
  DisplayTypes2["SCATTERPLOT"] = "scatterplot";
14311
14311
  DisplayTypes2["COLUMN_LINE"] = "column_line";
14312
14312
  DisplayTypes2["NETWORK_GRAPH"] = "network_graph";
14313
+ DisplayTypes2["SANKEY"] = "sankey";
14313
14314
  return DisplayTypes2;
14314
14315
  })(DisplayTypes || {});
14315
14316
  var QueryErrorTypes = /* @__PURE__ */ ((QueryErrorTypes2) => {
@@ -14510,7 +14511,8 @@
14510
14511
  "column_line" /* COLUMN_LINE */,
14511
14512
  "histogram" /* HISTOGRAM */,
14512
14513
  "scatterplot" /* SCATTERPLOT */,
14513
- "network_graph" /* NETWORK_GRAPH */
14514
+ "network_graph" /* NETWORK_GRAPH */,
14515
+ "sankey" /* SANKEY */
14514
14516
  ];
14515
14517
  var CHARTS_WITHOUT_LEGENDS = [
14516
14518
  "pie" /* PIE */,
@@ -14518,16 +14520,18 @@
14518
14520
  "bubble" /* BUBBLE */,
14519
14521
  "scatterplot" /* SCATTERPLOT */,
14520
14522
  "histogram" /* HISTOGRAM */,
14521
- "network_graph" /* NETWORK_GRAPH */
14523
+ "network_graph" /* NETWORK_GRAPH */,
14524
+ "sankey" /* SANKEY */
14522
14525
  ];
14523
14526
  var CHARTS_WITHOUT_AGGREGATED_DATA = [
14524
14527
  "histogram" /* HISTOGRAM */,
14525
14528
  "scatterplot" /* SCATTERPLOT */,
14526
- "network_graph" /* NETWORK_GRAPH */
14529
+ "network_graph" /* NETWORK_GRAPH */,
14530
+ "sankey" /* SANKEY */
14527
14531
  ];
14528
14532
  var DATE_ONLY_CHART_TYPES = ["line" /* LINE */, "stacked_line" /* STACKED_LINE */];
14529
14533
  var DOUBLE_AXIS_CHART_TYPES = ["column_line" /* COLUMN_LINE */];
14530
- var CHARTS_WITHOUT_AXES = ["pie" /* PIE */, "network_graph" /* NETWORK_GRAPH */];
14534
+ var CHARTS_WITHOUT_AXES = ["pie" /* PIE */, "network_graph" /* NETWORK_GRAPH */, "sankey" /* SANKEY */];
14531
14535
  var DEFAULT_CHART_CONFIG = {
14532
14536
  isScaled: false
14533
14537
  };
@@ -15633,18 +15637,33 @@
15633
15637
  return uniqueYears;
15634
15638
  };
15635
15639
  var supportsNetworkGraph = (data, columns) => {
15636
- if (!data || data.length < 2) return false;
15637
- if (!columns || columns.length < 2) return false;
15640
+ var _a2, _b2;
15641
+ const logUnsupportedReason = (message) => {
15642
+ console.warn(`[supportsNetworkGraph] ${message}`);
15643
+ };
15644
+ if (!data || data.length < 2) {
15645
+ logUnsupportedReason(`Insufficient rows (${(_a2 = data == null ? void 0 : data.length) != null ? _a2 : 0}). Need at least 2 rows.`);
15646
+ return false;
15647
+ }
15648
+ if (!columns || columns.length < 2) {
15649
+ logUnsupportedReason(`Insufficient columns (${(_b2 = columns == null ? void 0 : columns.length) != null ? _b2 : 0}). Need at least 2 visible columns.`);
15650
+ return false;
15651
+ }
15638
15652
  const networkColumns = findNetworkColumns(columns);
15639
- if (!networkColumns || networkColumns.sourceColumnIndex === -1 || networkColumns.targetColumnIndex === -1)
15653
+ if (!networkColumns || networkColumns.sourceColumnIndex === -1 || networkColumns.targetColumnIndex === -1) {
15654
+ logUnsupportedReason("Unable to determine source/target columns from provided metadata.");
15640
15655
  return false;
15656
+ }
15641
15657
  const { sourceColumnIndex, targetColumnIndex } = networkColumns;
15642
15658
  const sourceValues = data.map((row) => row[sourceColumnIndex]).filter(Boolean);
15643
15659
  const targetValues = data.map((row) => row[targetColumnIndex]).filter(Boolean);
15644
15660
  const uniqueSources = new Set(sourceValues);
15645
15661
  const uniqueTargets = new Set(targetValues);
15646
15662
  const totalUniqueEntities = (/* @__PURE__ */ new Set([...uniqueSources, ...uniqueTargets])).size;
15647
- if (totalUniqueEntities < 1) return false;
15663
+ if (totalUniqueEntities < 2) {
15664
+ logUnsupportedReason(`Found only ${totalUniqueEntities} unique node(s). Need at least 2.`);
15665
+ return false;
15666
+ }
15648
15667
  const sourceCounts = {};
15649
15668
  const targetCounts = {};
15650
15669
  const relationshipPairs = /* @__PURE__ */ new Set();
@@ -15658,9 +15677,18 @@
15658
15677
  }
15659
15678
  });
15660
15679
  const actualConnections = relationshipPairs.size;
15661
- if (actualConnections === 0) return false;
15680
+ if (actualConnections === 0) {
15681
+ logUnsupportedReason("No valid source\u2192target connections detected in dataset.");
15682
+ return false;
15683
+ }
15662
15684
  const MAX_UNIQUE_ENTITIES = 5e4;
15663
- return totalUniqueEntities <= MAX_UNIQUE_ENTITIES;
15685
+ if (totalUniqueEntities > MAX_UNIQUE_ENTITIES) {
15686
+ logUnsupportedReason(
15687
+ `Too many unique nodes (${totalUniqueEntities}). Limit is ${MAX_UNIQUE_ENTITIES} for performance reasons.`
15688
+ );
15689
+ return false;
15690
+ }
15691
+ return true;
15664
15692
  };
15665
15693
  var findNetworkColumns = (columns) => {
15666
15694
  if (!columns || columns.length < 2) {
@@ -15737,6 +15765,78 @@
15737
15765
  }
15738
15766
  return { sourceColumnIndex, targetColumnIndex, weightColumnIndex };
15739
15767
  };
15768
+ var supportsSankey = (rows, columns) => {
15769
+ var _a2, _b2;
15770
+ try {
15771
+ const logUnsupportedReason = (message) => {
15772
+ console.warn(`[supportsSankey] ${message}`);
15773
+ };
15774
+ if (!(rows == null ? void 0 : rows.length) || !(columns == null ? void 0 : columns.length)) {
15775
+ logUnsupportedReason(
15776
+ `Missing required data. rows=${(_a2 = rows == null ? void 0 : rows.length) != null ? _a2 : 0}, columns=${(_b2 = columns == null ? void 0 : columns.length) != null ? _b2 : 0}. Need at least 1 row and 3 columns.`
15777
+ );
15778
+ return false;
15779
+ }
15780
+ const { sourceColumnIndex, targetColumnIndex, weightColumnIndex } = findNetworkColumns(columns);
15781
+ if (sourceColumnIndex === -1 || targetColumnIndex === -1 || weightColumnIndex === -1) {
15782
+ logUnsupportedReason("Unable to determine source, target, and weight columns required for Sankey.");
15783
+ return false;
15784
+ }
15785
+ const uniqueNodes = /* @__PURE__ */ new Set();
15786
+ const uniqueLinks = /* @__PURE__ */ new Set();
15787
+ let skippedRows = 0;
15788
+ const normalizeNodeValue = (value) => {
15789
+ if (value === void 0 || value === null) {
15790
+ return void 0;
15791
+ }
15792
+ const sanitized = `${value}`.trim();
15793
+ return sanitized.length ? sanitized : void 0;
15794
+ };
15795
+ const toFinitePositiveNumber = (value) => {
15796
+ if (typeof value === "number") {
15797
+ return Number.isFinite(value) ? value : NaN;
15798
+ }
15799
+ if (typeof value === "string") {
15800
+ const cleaned = value.replace(/[^0-9.-]/g, "");
15801
+ if (!cleaned.length) {
15802
+ return NaN;
15803
+ }
15804
+ const parsed = Number(cleaned);
15805
+ return Number.isFinite(parsed) ? parsed : NaN;
15806
+ }
15807
+ return NaN;
15808
+ };
15809
+ for (const row of rows) {
15810
+ if (!row) {
15811
+ continue;
15812
+ }
15813
+ const source = normalizeNodeValue(row[sourceColumnIndex]);
15814
+ const target = normalizeNodeValue(row[targetColumnIndex]);
15815
+ if (!source || !target || source === target) {
15816
+ skippedRows += 1;
15817
+ continue;
15818
+ }
15819
+ const weight = toFinitePositiveNumber(row[weightColumnIndex]);
15820
+ if (!Number.isFinite(weight) || weight <= 0) {
15821
+ skippedRows += 1;
15822
+ continue;
15823
+ }
15824
+ uniqueNodes.add(source);
15825
+ uniqueNodes.add(target);
15826
+ uniqueLinks.add(`${source}__${target}`);
15827
+ }
15828
+ if (!uniqueLinks.size || uniqueNodes.size < 2) {
15829
+ logUnsupportedReason(
15830
+ `Insufficient valid flows. uniqueNodes=${uniqueNodes.size}, uniqueLinks=${uniqueLinks.size}, skippedRows=${skippedRows}.`
15831
+ );
15832
+ return false;
15833
+ }
15834
+ return true;
15835
+ } catch (error) {
15836
+ console.error("[supportsSankey] Unexpected error determining support", error);
15837
+ return false;
15838
+ }
15839
+ };
15740
15840
  var getSupportedDisplayTypes = ({
15741
15841
  response,
15742
15842
  columns,
@@ -15825,6 +15925,9 @@
15825
15925
  if (supportsNetworkGraph(rows, visibleColumns)) {
15826
15926
  supportedDisplayTypes.push("network_graph");
15827
15927
  }
15928
+ if (supportsSankey(rows, visibleColumns)) {
15929
+ supportedDisplayTypes.push("sankey");
15930
+ }
15828
15931
  return supportedDisplayTypes;
15829
15932
  } catch (error) {
15830
15933
  console.error(error);
@@ -18332,13 +18435,20 @@
18332
18435
  const validatedQuantityDecimals = !isNaN(quantityDecimals) ? quantityDecimals : 2;
18333
18436
  const elementNumber = parseFloat(`${element}`);
18334
18437
  if (!isNaN(elementNumber)) {
18335
- const numDecimals = elementNumber % 1 !== 0 ? validatedQuantityDecimals : 0;
18438
+ let numDecimals;
18439
+ if ((column == null ? void 0 : column.quantity_type) === "integer") {
18440
+ numDecimals = 0;
18441
+ } else if ((column == null ? void 0 : column.quantity_type) === "float") {
18442
+ numDecimals = validatedQuantityDecimals;
18443
+ } else {
18444
+ numDecimals = elementNumber % 1 !== 0 ? validatedQuantityDecimals : 0;
18445
+ }
18336
18446
  formattedElement = new Intl.NumberFormat(languageCode, {
18337
18447
  minimumFractionDigits: numDecimals,
18338
18448
  maximumFractionDigits: numDecimals
18339
18449
  }).format(elementNumber);
18340
- if (formattedElement.endsWith(".00")) {
18341
- formattedElement = formattedElement.replace(".00", "");
18450
+ if ((column == null ? void 0 : column.quantity_type) !== "float" && `${formattedElement}`.endsWith(".00")) {
18451
+ formattedElement = `${formattedElement}`.replace(".00", "");
18342
18452
  }
18343
18453
  }
18344
18454
  break;
@@ -30982,16 +31092,27 @@
30982
31092
  }
30983
31093
  return transformedResponse;
30984
31094
  };
31095
+ var detectQuantityType = (rows, colIndex) => {
31096
+ if (!(rows == null ? void 0 : rows.length)) return "float";
31097
+ for (const row of rows) {
31098
+ const val = row == null ? void 0 : row[colIndex];
31099
+ if (val === null || val === void 0) continue;
31100
+ const num = typeof val === "number" ? val : parseFloat(val);
31101
+ if (!isNaN(num) && num % 1 !== 0) return "float";
31102
+ }
31103
+ return "integer";
31104
+ };
30985
31105
  var transformQueryResponseColumns = (response, addedColumns) => {
30986
- var _a2, _b2;
31106
+ var _a2, _b2, _c, _d;
30987
31107
  const columns = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns;
31108
+ const rows = (_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.rows;
30988
31109
  if (!(columns == null ? void 0 : columns.length)) {
30989
31110
  return columns;
30990
31111
  }
30991
31112
  const isSingleValue = isSingleValueResponse(response);
30992
31113
  const transformedColumns = columns.map((col, i) => {
30993
- var _a3, _b3, _c, _d;
30994
- const dataSample = (_d = (_c = (_b3 = (_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.rows) == null ? void 0 : _c.find((row) => row[i])) == null ? void 0 : _d[i];
31114
+ var _a3;
31115
+ const dataSample = (_a3 = rows == null ? void 0 : rows.find((row) => row[i])) == null ? void 0 : _a3[i];
30995
31116
  const drilldownGroupby = getDrilldownGroupby(response, col);
30996
31117
  let additional = false;
30997
31118
  let is_timestamp = false;
@@ -31008,6 +31129,7 @@
31008
31129
  if (isSingleValue) {
31009
31130
  is_visible = true;
31010
31131
  }
31132
+ const quantity_type = col.type === "QUANTITY" /* QUANTITY */ ? detectQuantityType(rows, i) : void 0;
31011
31133
  return new Column({
31012
31134
  ...col,
31013
31135
  field: `${i}`,
@@ -31015,7 +31137,8 @@
31015
31137
  drilldownGroupby,
31016
31138
  additional,
31017
31139
  is_visible,
31018
- is_timestamp
31140
+ is_timestamp,
31141
+ quantity_type
31019
31142
  });
31020
31143
  });
31021
31144
  return transformedColumns;
@@ -31463,12 +31586,22 @@
31463
31586
  domain,
31464
31587
  apiKey,
31465
31588
  token,
31466
- csvProgressCallback
31589
+ filters,
31590
+ tableFilters,
31591
+ csvProgressCallback,
31592
+ source = DEFAULT_SOURCE,
31593
+ scope = "null"
31467
31594
  } = {}) => {
31468
31595
  if (!token || !domain || !apiKey) {
31469
31596
  return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
31470
31597
  }
31471
31598
  const url2 = `${domain}/autoql/api/v1/query/${queryId}/export?key=${apiKey}`;
31599
+ const data = {
31600
+ session_filter_locks: filters,
31601
+ filters: tableFilters,
31602
+ source,
31603
+ scope
31604
+ };
31472
31605
  const config = {
31473
31606
  headers: {
31474
31607
  Authorization: `Bearer ${token}`
@@ -31481,7 +31614,7 @@
31481
31614
  }
31482
31615
  }
31483
31616
  };
31484
- return axios_default.post(url2, {}, config).then((response) => Promise.resolve(response)).catch((error) => Promise.reject(error == null ? void 0 : error.response));
31617
+ return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => Promise.reject(error == null ? void 0 : error.response));
31485
31618
  };
31486
31619
  var runDrilldown = ({
31487
31620
  queryID,