autoql-fe-utils 1.11.8 → 1.11.10
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 +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.global.js +277 -54
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +285 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +281 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1856,6 +1856,10 @@ declare const getDateColumns: (columns: any) => Column[];
|
|
|
1856
1856
|
declare const getCleanColumnName: (colName: string) => string;
|
|
1857
1857
|
declare const buildPlainColumnArrayFn: (columnName: string) => string[];
|
|
1858
1858
|
declare function normalizeCoalesceParentheses(s: string): string;
|
|
1859
|
+
declare const getProtectedRanges: (text: string, funcs: string[]) => Array<[
|
|
1860
|
+
number,
|
|
1861
|
+
number
|
|
1862
|
+
]>;
|
|
1859
1863
|
declare function transformDivisionExpression(input: string): string;
|
|
1860
1864
|
|
|
1861
1865
|
declare const isSelectableNumberColumn: (col?: Partial<Column> | any) => boolean;
|
|
@@ -2228,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
|
|
|
2228
2232
|
pieChartFn: any;
|
|
2229
2233
|
legendScale: any;
|
|
2230
2234
|
};
|
|
2235
|
+
/** Retry measuring element size until stable (browser-only, returns current rect in tests) */
|
|
2236
|
+
declare const waitForStableRect: (el: Element | null, opts?: {
|
|
2237
|
+
retries?: number;
|
|
2238
|
+
stableThreshold?: number;
|
|
2239
|
+
delayMs?: number;
|
|
2240
|
+
}) => Promise<{
|
|
2241
|
+
width: number;
|
|
2242
|
+
height: number;
|
|
2243
|
+
}>;
|
|
2244
|
+
/** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
|
|
2245
|
+
declare const observeAndRender: (container: Element | null, renderFn: (rect: {
|
|
2246
|
+
width: number;
|
|
2247
|
+
height: number;
|
|
2248
|
+
}) => void | Promise<void>, opts?: {
|
|
2249
|
+
debounceMs?: number;
|
|
2250
|
+
}) => () => void;
|
|
2231
2251
|
declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
|
|
2232
2252
|
bucketSize: any;
|
|
2233
2253
|
minBucketSize: any;
|
|
@@ -2977,4 +2997,4 @@ declare function color(): {
|
|
|
2977
2997
|
on(): any;
|
|
2978
2998
|
};
|
|
2979
2999
|
|
|
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 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, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, 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, 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, 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, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
|
|
3000
|
+
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 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, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, 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, 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, getProtectedRanges, 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, observeAndRender, 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, 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, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1856,6 +1856,10 @@ declare const getDateColumns: (columns: any) => Column[];
|
|
|
1856
1856
|
declare const getCleanColumnName: (colName: string) => string;
|
|
1857
1857
|
declare const buildPlainColumnArrayFn: (columnName: string) => string[];
|
|
1858
1858
|
declare function normalizeCoalesceParentheses(s: string): string;
|
|
1859
|
+
declare const getProtectedRanges: (text: string, funcs: string[]) => Array<[
|
|
1860
|
+
number,
|
|
1861
|
+
number
|
|
1862
|
+
]>;
|
|
1859
1863
|
declare function transformDivisionExpression(input: string): string;
|
|
1860
1864
|
|
|
1861
1865
|
declare const isSelectableNumberColumn: (col?: Partial<Column> | any) => boolean;
|
|
@@ -2228,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
|
|
|
2228
2232
|
pieChartFn: any;
|
|
2229
2233
|
legendScale: any;
|
|
2230
2234
|
};
|
|
2235
|
+
/** Retry measuring element size until stable (browser-only, returns current rect in tests) */
|
|
2236
|
+
declare const waitForStableRect: (el: Element | null, opts?: {
|
|
2237
|
+
retries?: number;
|
|
2238
|
+
stableThreshold?: number;
|
|
2239
|
+
delayMs?: number;
|
|
2240
|
+
}) => Promise<{
|
|
2241
|
+
width: number;
|
|
2242
|
+
height: number;
|
|
2243
|
+
}>;
|
|
2244
|
+
/** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
|
|
2245
|
+
declare const observeAndRender: (container: Element | null, renderFn: (rect: {
|
|
2246
|
+
width: number;
|
|
2247
|
+
height: number;
|
|
2248
|
+
}) => void | Promise<void>, opts?: {
|
|
2249
|
+
debounceMs?: number;
|
|
2250
|
+
}) => () => void;
|
|
2231
2251
|
declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
|
|
2232
2252
|
bucketSize: any;
|
|
2233
2253
|
minBucketSize: any;
|
|
@@ -2977,4 +2997,4 @@ declare function color(): {
|
|
|
2977
2997
|
on(): any;
|
|
2978
2998
|
};
|
|
2979
2999
|
|
|
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 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, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, 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, 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, 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, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
|
|
3000
|
+
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 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, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, 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, 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, getProtectedRanges, 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, observeAndRender, 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, 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, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
|
package/dist/index.global.js
CHANGED
|
@@ -2053,36 +2053,54 @@
|
|
|
2053
2053
|
elementBBoxesCache = /* @__PURE__ */ new WeakMap();
|
|
2054
2054
|
}
|
|
2055
2055
|
function getElementBBoxes(element) {
|
|
2056
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
2056
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
2057
2057
|
if (!element) return { bbox: { x: 0, y: 0, width: 0, height: 0 }, clientRect: {} };
|
|
2058
|
+
const tagName = (_b = (_a = element == null ? void 0 : element.tagName) == null ? void 0 : _a.toLowerCase) == null ? void 0 : _b.call(_a);
|
|
2059
|
+
const shouldBypassCache = tagName === "text" || tagName === "tspan";
|
|
2058
2060
|
try {
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2061
|
+
if (!shouldBypassCache) {
|
|
2062
|
+
const cached = elementBBoxesCache.get(element);
|
|
2063
|
+
const now = Date.now();
|
|
2064
|
+
if (cached && now - cached.ts < CACHE_TTL) return { bbox: cached.bbox, clientRect: cached.clientRect };
|
|
2065
|
+
}
|
|
2062
2066
|
} catch (e) {
|
|
2063
2067
|
}
|
|
2064
2068
|
const bbox = getBBoxSafe(element) || { x: 0, y: 0, width: 0, height: 0 };
|
|
2065
2069
|
let clientRect;
|
|
2070
|
+
let clientRectsLength = -1;
|
|
2066
2071
|
try {
|
|
2067
2072
|
if (element && typeof element.getBoundingClientRect === "function")
|
|
2068
2073
|
clientRect = element.getBoundingClientRect();
|
|
2069
2074
|
} catch (e) {
|
|
2070
2075
|
}
|
|
2076
|
+
try {
|
|
2077
|
+
if (element && typeof element.getClientRects === "function")
|
|
2078
|
+
clientRectsLength = element.getClientRects().length;
|
|
2079
|
+
} catch (e) {
|
|
2080
|
+
}
|
|
2071
2081
|
if (!clientRect) {
|
|
2072
2082
|
clientRect = {
|
|
2073
|
-
x: (
|
|
2074
|
-
y: (
|
|
2075
|
-
width: (
|
|
2076
|
-
height: (
|
|
2077
|
-
left: (
|
|
2078
|
-
top: (
|
|
2079
|
-
right: ((
|
|
2080
|
-
bottom: ((
|
|
2083
|
+
x: (_d = (_c = bbox.x) != null ? _c : bbox.left) != null ? _d : 0,
|
|
2084
|
+
y: (_f = (_e = bbox.y) != null ? _e : bbox.top) != null ? _f : 0,
|
|
2085
|
+
width: (_g = bbox.width) != null ? _g : 0,
|
|
2086
|
+
height: (_h = bbox.height) != null ? _h : 0,
|
|
2087
|
+
left: (_j = (_i = bbox.x) != null ? _i : bbox.left) != null ? _j : 0,
|
|
2088
|
+
top: (_l = (_k = bbox.y) != null ? _k : bbox.top) != null ? _l : 0,
|
|
2089
|
+
right: ((_n = (_m = bbox.x) != null ? _m : bbox.left) != null ? _n : 0) + ((_o = bbox.width) != null ? _o : 0),
|
|
2090
|
+
bottom: ((_q = (_p = bbox.y) != null ? _p : bbox.top) != null ? _q : 0) + ((_r = bbox.height) != null ? _r : 0)
|
|
2081
2091
|
};
|
|
2082
2092
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2093
|
+
const isDisconnected = typeof element.isConnected === "boolean" ? !element.isConnected : false;
|
|
2094
|
+
const bboxW = (_s = bbox == null ? void 0 : bbox.width) != null ? _s : 0;
|
|
2095
|
+
const bboxH = (_t = bbox == null ? void 0 : bbox.height) != null ? _t : 0;
|
|
2096
|
+
const rectW = (_u = clientRect == null ? void 0 : clientRect.width) != null ? _u : 0;
|
|
2097
|
+
const rectH = (_v = clientRect == null ? void 0 : clientRect.height) != null ? _v : 0;
|
|
2098
|
+
const isHidden = clientRectsLength === 0 && rectW === 0 && rectH === 0 && bboxW === 0 && bboxH === 0;
|
|
2099
|
+
if (!shouldBypassCache && !isDisconnected && !isHidden) {
|
|
2100
|
+
try {
|
|
2101
|
+
elementBBoxesCache.set(element, { bbox, clientRect, ts: Date.now() });
|
|
2102
|
+
} catch (e) {
|
|
2103
|
+
}
|
|
2086
2104
|
}
|
|
2087
2105
|
return { bbox, clientRect };
|
|
2088
2106
|
}
|
|
@@ -2099,6 +2117,20 @@
|
|
|
2099
2117
|
} catch (e) {
|
|
2100
2118
|
}
|
|
2101
2119
|
});
|
|
2120
|
+
window.addEventListener("pageshow", () => {
|
|
2121
|
+
try {
|
|
2122
|
+
clearElementBBoxesCache();
|
|
2123
|
+
} catch (e) {
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
if (typeof document !== "undefined" && typeof document.addEventListener === "function") {
|
|
2128
|
+
document.addEventListener("visibilitychange", () => {
|
|
2129
|
+
try {
|
|
2130
|
+
clearElementBBoxesCache();
|
|
2131
|
+
} catch (e) {
|
|
2132
|
+
}
|
|
2133
|
+
});
|
|
2102
2134
|
}
|
|
2103
2135
|
}
|
|
2104
2136
|
});
|
|
@@ -21581,7 +21613,7 @@
|
|
|
21581
21613
|
}
|
|
21582
21614
|
});
|
|
21583
21615
|
const returnStr = "return" + columnFnStr;
|
|
21584
|
-
const fn = Function("row", returnStr);
|
|
21616
|
+
const fn = new Function("row", returnStr);
|
|
21585
21617
|
return { fn };
|
|
21586
21618
|
} catch (error) {
|
|
21587
21619
|
if (error instanceof ChataError || error && error.name === "ChataError") {
|
|
@@ -21658,32 +21690,127 @@
|
|
|
21658
21690
|
function normalizeCoalesceParentheses(s) {
|
|
21659
21691
|
if (!s || typeof s !== "string") return s;
|
|
21660
21692
|
try {
|
|
21661
|
-
|
|
21662
|
-
const idx = s.indexOf(token);
|
|
21663
|
-
if (idx === -1) return s;
|
|
21664
|
-
const before = s.slice(0, idx);
|
|
21665
|
-
const after = s.slice(idx + token.length);
|
|
21666
|
-
if (after.endsWith("))")) return before + "COALESCE(" + after.slice(0, -2) + ")";
|
|
21667
|
-
return s.replace(/COALESCE\(\(/, "COALESCE(").replace(/\)\)$/, ")");
|
|
21693
|
+
return s.replace(/COALESCE\(\(\s*([\s\S]*?)\s*\)\)/g, "COALESCE($1)");
|
|
21668
21694
|
} catch (e) {
|
|
21669
21695
|
console.warn(e);
|
|
21670
21696
|
return s;
|
|
21671
21697
|
}
|
|
21672
21698
|
}
|
|
21699
|
+
var getProtectedRanges = (text, funcs) => {
|
|
21700
|
+
const ranges = [];
|
|
21701
|
+
if (!text) return ranges;
|
|
21702
|
+
const escaped = funcs.map((f) => f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
21703
|
+
const fnRe = new RegExp("(" + escaped + ")\\s*\\(", "gi");
|
|
21704
|
+
let m;
|
|
21705
|
+
while ((m = fnRe.exec(text)) !== null) {
|
|
21706
|
+
const openIdx = m.index + m[0].length - 1;
|
|
21707
|
+
let depth = 0;
|
|
21708
|
+
let j = openIdx;
|
|
21709
|
+
while (j < text.length) {
|
|
21710
|
+
if (text[j] === "(") depth++;
|
|
21711
|
+
else if (text[j] === ")") {
|
|
21712
|
+
depth--;
|
|
21713
|
+
if (depth === 0) {
|
|
21714
|
+
ranges.push([openIdx, j]);
|
|
21715
|
+
break;
|
|
21716
|
+
}
|
|
21717
|
+
}
|
|
21718
|
+
j++;
|
|
21719
|
+
}
|
|
21720
|
+
}
|
|
21721
|
+
return ranges;
|
|
21722
|
+
};
|
|
21673
21723
|
function transformDivisionExpression(input) {
|
|
21674
21724
|
if (!input || typeof input !== "string") return input;
|
|
21675
|
-
const
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21725
|
+
const s = input;
|
|
21726
|
+
let out = "";
|
|
21727
|
+
let i = 0;
|
|
21728
|
+
let lastAppended = 0;
|
|
21729
|
+
const isIdentChar = (c) => !!c && /[A-Za-z0-9_.$]/.test(c);
|
|
21730
|
+
const protectedRanges = getProtectedRanges(s, ["COALESCE", "NULLIF"]);
|
|
21731
|
+
const isInProtectedRange = (idx) => protectedRanges.some(([a, b]) => idx > a && idx < b);
|
|
21732
|
+
const stripSingleTokenParens = (x) => /^\([A-Za-z0-9_.]+\)$/.test(x) ? x.slice(1, -1) : x;
|
|
21733
|
+
const isAdjChar = (c) => !!c && /[0-9A-Za-z_()$.]/.test(c);
|
|
21734
|
+
while (i < s.length) {
|
|
21735
|
+
if (s[i] !== "/") {
|
|
21736
|
+
i++;
|
|
21737
|
+
continue;
|
|
21738
|
+
}
|
|
21739
|
+
let l = i - 1;
|
|
21740
|
+
while (l >= 0 && /\s/.test(s[l])) l--;
|
|
21741
|
+
if (l < 0) {
|
|
21742
|
+
i++;
|
|
21743
|
+
continue;
|
|
21744
|
+
}
|
|
21745
|
+
let numStart = l;
|
|
21746
|
+
if (s[l] === ")") {
|
|
21747
|
+
let depth = 0;
|
|
21748
|
+
while (numStart >= 0) {
|
|
21749
|
+
if (s[numStart] === ")") depth++;
|
|
21750
|
+
else if (s[numStart] === "(") {
|
|
21751
|
+
depth--;
|
|
21752
|
+
if (depth === 0) break;
|
|
21753
|
+
}
|
|
21754
|
+
numStart--;
|
|
21755
|
+
}
|
|
21756
|
+
let fnStart = numStart - 1;
|
|
21757
|
+
while (fnStart >= 0 && isIdentChar(s[fnStart])) fnStart--;
|
|
21758
|
+
numStart = fnStart + 1;
|
|
21759
|
+
} else {
|
|
21760
|
+
while (numStart >= 0 && /[^\s(),+\-*/]/.test(s[numStart])) numStart--;
|
|
21761
|
+
numStart++;
|
|
21762
|
+
}
|
|
21763
|
+
let r = i + 1;
|
|
21764
|
+
while (r < s.length && /\s/.test(s[r])) r++;
|
|
21765
|
+
if (r >= s.length) {
|
|
21766
|
+
i++;
|
|
21767
|
+
continue;
|
|
21768
|
+
}
|
|
21769
|
+
let denEnd = r;
|
|
21770
|
+
if (s[r] === "(") {
|
|
21771
|
+
let depth = 0;
|
|
21772
|
+
while (denEnd < s.length) {
|
|
21773
|
+
if (s[denEnd] === "(") depth++;
|
|
21774
|
+
else if (s[denEnd] === ")") {
|
|
21775
|
+
depth--;
|
|
21776
|
+
if (depth === 0) break;
|
|
21777
|
+
}
|
|
21778
|
+
denEnd++;
|
|
21779
|
+
}
|
|
21780
|
+
denEnd++;
|
|
21781
|
+
} else {
|
|
21782
|
+
while (denEnd < s.length && /[^\s(),+\-*/]/.test(s[denEnd])) denEnd++;
|
|
21783
|
+
}
|
|
21784
|
+
if (isInProtectedRange(i)) {
|
|
21785
|
+
i = denEnd;
|
|
21786
|
+
continue;
|
|
21787
|
+
}
|
|
21788
|
+
let nextPos = denEnd;
|
|
21789
|
+
while (nextPos < s.length && /\s/.test(s[nextPos])) nextPos++;
|
|
21790
|
+
if (s[nextPos] === ",") {
|
|
21791
|
+
i = denEnd;
|
|
21792
|
+
continue;
|
|
21793
|
+
}
|
|
21794
|
+
out += s.slice(lastAppended, numStart);
|
|
21795
|
+
const rawN = s.slice(numStart, l + 1).trim();
|
|
21796
|
+
const rawD = s.slice(r, denEnd).trim();
|
|
21797
|
+
const n = stripSingleTokenParens(rawN);
|
|
21798
|
+
const d = stripSingleTokenParens(rawD);
|
|
21799
|
+
const coalesce = `COALESCE(${n} / NULLIF(${d}, 0), 0)`;
|
|
21800
|
+
let prev = numStart - 1;
|
|
21801
|
+
while (prev >= 0 && /\s/.test(s[prev])) prev--;
|
|
21802
|
+
const prevChar = prev >= 0 ? s[prev] : null;
|
|
21803
|
+
let next = denEnd;
|
|
21804
|
+
while (next < s.length && /\s/.test(s[next])) next++;
|
|
21805
|
+
const nextChar = next < s.length ? s[next] : null;
|
|
21806
|
+
const needParens = prevChar && nextChar && isAdjChar(prevChar) && isAdjChar(nextChar);
|
|
21807
|
+
out += needParens ? `(${coalesce})` : coalesce;
|
|
21808
|
+
lastAppended = denEnd;
|
|
21809
|
+
i = denEnd;
|
|
21810
|
+
}
|
|
21811
|
+
if (lastAppended < s.length) out += s.slice(lastAppended);
|
|
21812
|
+
if (/COALESCE\(\(/i.test(out) && out.trim().endsWith("))")) return normalizeCoalesceParentheses(out);
|
|
21813
|
+
return out;
|
|
21687
21814
|
}
|
|
21688
21815
|
|
|
21689
21816
|
// src/HelperFns/selectorsHelpers.ts
|
|
@@ -24538,6 +24665,9 @@
|
|
|
24538
24665
|
maxValue = 0;
|
|
24539
24666
|
}
|
|
24540
24667
|
}
|
|
24668
|
+
if (maxValue >= 0 && minValue >= 0) {
|
|
24669
|
+
minValue = 0;
|
|
24670
|
+
}
|
|
24541
24671
|
return {
|
|
24542
24672
|
maxValue,
|
|
24543
24673
|
minValue,
|
|
@@ -24593,13 +24723,11 @@
|
|
|
24593
24723
|
let newMinValue = minValue;
|
|
24594
24724
|
let newMaxValue = maxValue;
|
|
24595
24725
|
const disableScale = isScaled && shouldDisableChartScale(minValue, maxValue);
|
|
24596
|
-
if (
|
|
24597
|
-
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
}
|
|
24602
|
-
} else if (!isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
|
|
24726
|
+
if (maxValue >= 0 && minValue >= 0) {
|
|
24727
|
+
newMinValue = 0;
|
|
24728
|
+
} else if (maxValue < 0 && minValue < 0) {
|
|
24729
|
+
newMaxValue = 0;
|
|
24730
|
+
} else if (isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
|
|
24603
24731
|
const range2 = maxValue - minValue;
|
|
24604
24732
|
newMinValue = minValue - range2 * 0.05;
|
|
24605
24733
|
newMaxValue = maxValue + range2 * 0.05;
|
|
@@ -25083,41 +25211,48 @@
|
|
|
25083
25211
|
originalColumns,
|
|
25084
25212
|
isDataAggregated
|
|
25085
25213
|
}) => {
|
|
25086
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
25214
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
25087
25215
|
let domainFinal = domain;
|
|
25088
25216
|
if (!domain) {
|
|
25089
25217
|
let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
|
|
25090
25218
|
let max2 = (_b = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b : 0;
|
|
25091
25219
|
if (adjustRange) {
|
|
25092
25220
|
const { newMinValue, newMaxValue } = adjustMinAndMaxForScaleRatio(min2, max2, isScaled);
|
|
25093
|
-
if (newMinValue) min2 = newMinValue;
|
|
25094
|
-
if (newMaxValue) max2 = newMaxValue;
|
|
25221
|
+
if (newMinValue !== void 0) min2 = newMinValue;
|
|
25222
|
+
if (newMaxValue !== void 0) max2 = newMaxValue;
|
|
25095
25223
|
}
|
|
25096
25224
|
domainFinal = [min2, max2];
|
|
25097
25225
|
}
|
|
25098
25226
|
const config = getDataFormatting(dataFormatting);
|
|
25099
25227
|
const colIndices = columnIndices != null ? columnIndices : [columnIndex];
|
|
25100
25228
|
const scaleRange = range2 != null ? range2 : getRangeForAxis({ axis: axis2, height, width });
|
|
25101
|
-
|
|
25229
|
+
let finalScaleRange = scaleRange;
|
|
25230
|
+
if (typeof window !== "undefined") {
|
|
25231
|
+
const delta = Math.abs(((_c = scaleRange == null ? void 0 : scaleRange[1]) != null ? _c : 0) - ((_d = scaleRange == null ? void 0 : scaleRange[0]) != null ? _d : 0));
|
|
25232
|
+
if (delta < 30) {
|
|
25233
|
+
finalScaleRange = axis2 === "x" ? [(_e = scaleRange == null ? void 0 : scaleRange[0]) != null ? _e : 0, ((_f = scaleRange == null ? void 0 : scaleRange[0]) != null ? _f : 0) + 30] : [((_g = scaleRange == null ? void 0 : scaleRange[1]) != null ? _g : 0) + 30, (_h = scaleRange == null ? void 0 : scaleRange[1]) != null ? _h : 0];
|
|
25234
|
+
}
|
|
25235
|
+
}
|
|
25236
|
+
const axisColumns = (_i = colIndices == null ? void 0 : colIndices.map((index) => columns == null ? void 0 : columns[index])) != null ? _i : [];
|
|
25102
25237
|
const axisTitle = title != null ? title : getLinearAxisTitle({
|
|
25103
25238
|
numberColumns: axisColumns,
|
|
25104
25239
|
aggregated,
|
|
25105
25240
|
isDataAggregated
|
|
25106
25241
|
});
|
|
25107
|
-
const disableScale = isScaled && shouldDisableChartScale((
|
|
25108
|
-
const scale = linear2().domain(domainFinal).range(
|
|
25242
|
+
const disableScale = isScaled && shouldDisableChartScale((_j = domainFinal == null ? void 0 : domainFinal[0]) != null ? _j : 0, (_k = domainFinal == null ? void 0 : domainFinal[1]) != null ? _k : 0);
|
|
25243
|
+
const scale = linear2().domain(domainFinal).range(finalScaleRange);
|
|
25109
25244
|
scale.disableAutoScale = disableAutoScale != null ? disableAutoScale : disableScale;
|
|
25110
|
-
scale.minValue = (
|
|
25111
|
-
scale.maxValue = (
|
|
25245
|
+
scale.minValue = (_l = domainFinal == null ? void 0 : domainFinal[0]) != null ? _l : 0;
|
|
25246
|
+
scale.maxValue = (_m = domainFinal == null ? void 0 : domainFinal[1]) != null ? _m : 0;
|
|
25112
25247
|
scale.columnIndex = columnIndex;
|
|
25113
25248
|
scale.column = columns == null ? void 0 : columns[columnIndex];
|
|
25114
25249
|
scale.fields = axisColumns;
|
|
25115
|
-
scale.allFields = aggregated ? (
|
|
25250
|
+
scale.allFields = aggregated ? (_n = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _n.allNumberColumnIndices : (_o = getNumberColumnIndices(columns)) == null ? void 0 : _o.allNumberColumnIndices;
|
|
25116
25251
|
scale.dataFormatting = config;
|
|
25117
25252
|
scale.hasDropdown = shouldShowAxisSelector({
|
|
25118
25253
|
scaleType: "LINEAR",
|
|
25119
25254
|
enableAxisDropdown: hasDropdown != null ? hasDropdown : enableAxisDropdown,
|
|
25120
|
-
numAllFields: (
|
|
25255
|
+
numAllFields: (_q = (_p = scale.allFields) == null ? void 0 : _p.length) != null ? _q : 0
|
|
25121
25256
|
});
|
|
25122
25257
|
scale.stacked = !!stacked;
|
|
25123
25258
|
scale.type = "LINEAR";
|
|
@@ -25166,7 +25301,7 @@
|
|
|
25166
25301
|
colorScales,
|
|
25167
25302
|
isDataAggregated
|
|
25168
25303
|
}) => {
|
|
25169
|
-
var _a, _b;
|
|
25304
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
25170
25305
|
const commonParams = {
|
|
25171
25306
|
stacked,
|
|
25172
25307
|
isScaled,
|
|
@@ -25202,6 +25337,17 @@
|
|
|
25202
25337
|
...scaleColumnConfig,
|
|
25203
25338
|
...commonParams
|
|
25204
25339
|
});
|
|
25340
|
+
try {
|
|
25341
|
+
console.debug("[chartHelpers] tempScale1", {
|
|
25342
|
+
range: (_a = tempScale1.range) == null ? void 0 : _a.call(tempScale1),
|
|
25343
|
+
domain: (_b = tempScale1.domain) == null ? void 0 : _b.call(tempScale1),
|
|
25344
|
+
minValue: tempScale1.minValue,
|
|
25345
|
+
maxValue: tempScale1.maxValue,
|
|
25346
|
+
height,
|
|
25347
|
+
width
|
|
25348
|
+
});
|
|
25349
|
+
} catch (e) {
|
|
25350
|
+
}
|
|
25205
25351
|
if (!hasSecondAxis) {
|
|
25206
25352
|
return {
|
|
25207
25353
|
scale: tempScale1
|
|
@@ -25222,7 +25368,7 @@
|
|
|
25222
25368
|
maxValue: maxValue2,
|
|
25223
25369
|
disableAutoScale: disableAutoScale != null ? disableAutoScale : disableScale2,
|
|
25224
25370
|
range: tempScale1.range(),
|
|
25225
|
-
numTicks: (
|
|
25371
|
+
numTicks: (_d = (_c = tempScale1.tickLabels) == null ? void 0 : _c.length) != null ? _d : void 0,
|
|
25226
25372
|
...scaleColumnConfig2,
|
|
25227
25373
|
...commonParams
|
|
25228
25374
|
});
|
|
@@ -25263,6 +25409,23 @@
|
|
|
25263
25409
|
});
|
|
25264
25410
|
scale.secondScale = scale2;
|
|
25265
25411
|
scale2.secondScale = scale;
|
|
25412
|
+
try {
|
|
25413
|
+
console.debug("[chartHelpers] pairedScales", {
|
|
25414
|
+
scale1: {
|
|
25415
|
+
range: (_e = scale.range) == null ? void 0 : _e.call(scale),
|
|
25416
|
+
domain: (_f = scale.domain) == null ? void 0 : _f.call(scale),
|
|
25417
|
+
minValue: scale.minValue,
|
|
25418
|
+
maxValue: scale.maxValue
|
|
25419
|
+
},
|
|
25420
|
+
scale2: {
|
|
25421
|
+
range: (_g = scale2.range) == null ? void 0 : _g.call(scale2),
|
|
25422
|
+
domain: (_h = scale2.domain) == null ? void 0 : _h.call(scale2),
|
|
25423
|
+
minValue: scale2.minValue,
|
|
25424
|
+
maxValue: scale2.maxValue
|
|
25425
|
+
}
|
|
25426
|
+
});
|
|
25427
|
+
} catch (e) {
|
|
25428
|
+
}
|
|
25266
25429
|
return { scale, scale2 };
|
|
25267
25430
|
};
|
|
25268
25431
|
var doesElementOverflowContainer = (element, container) => {
|
|
@@ -25779,6 +25942,66 @@
|
|
|
25779
25942
|
const legendScale = getLegendScale(legendLabels);
|
|
25780
25943
|
return { pieChartFn, legendScale };
|
|
25781
25944
|
};
|
|
25945
|
+
var waitForStableRect = async (el, opts = {}) => {
|
|
25946
|
+
var _a, _b;
|
|
25947
|
+
const { retries = 10, stableThreshold = 3, delayMs = 80 } = opts;
|
|
25948
|
+
if (!el || typeof window === "undefined") {
|
|
25949
|
+
return { width: (_a = el == null ? void 0 : el.clientWidth) != null ? _a : 0, height: (_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0 };
|
|
25950
|
+
}
|
|
25951
|
+
let lastW = el.clientWidth;
|
|
25952
|
+
let lastH = el.clientHeight;
|
|
25953
|
+
for (let i = 0; i < retries; i++) {
|
|
25954
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
25955
|
+
const w = el.clientWidth;
|
|
25956
|
+
const h = el.clientHeight;
|
|
25957
|
+
if (Math.abs(w - lastW) <= stableThreshold && Math.abs(h - lastH) <= stableThreshold) {
|
|
25958
|
+
return { width: w, height: h };
|
|
25959
|
+
}
|
|
25960
|
+
lastW = w;
|
|
25961
|
+
lastH = h;
|
|
25962
|
+
if (delayMs > 0) await new Promise((r) => setTimeout(r, delayMs));
|
|
25963
|
+
}
|
|
25964
|
+
return { width: el.clientWidth, height: el.clientHeight };
|
|
25965
|
+
};
|
|
25966
|
+
var observeAndRender = (container, renderFn, opts = {}) => {
|
|
25967
|
+
var _a, _b;
|
|
25968
|
+
const { debounceMs = 100 } = opts;
|
|
25969
|
+
if (!container || typeof window === "undefined" || typeof ResizeObserver === "undefined") {
|
|
25970
|
+
const rect = { width: (_a = container == null ? void 0 : container.clientWidth) != null ? _a : 0, height: (_b = container == null ? void 0 : container.clientHeight) != null ? _b : 0 };
|
|
25971
|
+
void Promise.resolve(renderFn(rect));
|
|
25972
|
+
return () => {
|
|
25973
|
+
};
|
|
25974
|
+
}
|
|
25975
|
+
let timer = null;
|
|
25976
|
+
let initialRenderDone = false;
|
|
25977
|
+
const runRender = async () => {
|
|
25978
|
+
if (!initialRenderDone) {
|
|
25979
|
+
initialRenderDone = true;
|
|
25980
|
+
const rect2 = await waitForStableRect(container, { retries: 15, stableThreshold: 3, delayMs: 50 });
|
|
25981
|
+
await Promise.resolve(renderFn(rect2));
|
|
25982
|
+
return;
|
|
25983
|
+
}
|
|
25984
|
+
const rect = { width: container.clientWidth, height: container.clientHeight };
|
|
25985
|
+
await Promise.resolve(renderFn(rect));
|
|
25986
|
+
};
|
|
25987
|
+
const schedule = () => {
|
|
25988
|
+
if (timer) clearTimeout(timer);
|
|
25989
|
+
timer = setTimeout(runRender, debounceMs);
|
|
25990
|
+
};
|
|
25991
|
+
const ro = new ResizeObserver(() => schedule());
|
|
25992
|
+
ro.observe(container);
|
|
25993
|
+
const onWindowResize = () => schedule();
|
|
25994
|
+
const onPageShow = (e) => (e == null ? void 0 : e.persisted) && schedule();
|
|
25995
|
+
window.addEventListener("resize", onWindowResize);
|
|
25996
|
+
window.addEventListener("pageshow", onPageShow);
|
|
25997
|
+
schedule();
|
|
25998
|
+
return () => {
|
|
25999
|
+
ro.disconnect();
|
|
26000
|
+
window.removeEventListener("resize", onWindowResize);
|
|
26001
|
+
window.removeEventListener("pageshow", onPageShow);
|
|
26002
|
+
if (timer) clearTimeout(timer);
|
|
26003
|
+
};
|
|
26004
|
+
};
|
|
25782
26005
|
var getDefaultBucketConfig = (data, bucketSize) => {
|
|
25783
26006
|
const DEFAULT_MIN_NUM_BUCKETS = 5;
|
|
25784
26007
|
const DEFAULT_MAX_NUM_BUCKETS = 20;
|