autoql-fe-utils 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -1
- package/dist/index.global.js +39 -11
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +47 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,26 @@ declare enum Operators {
|
|
|
85
85
|
SUBTRACTION = "SUBTRACTION",
|
|
86
86
|
DIVISION = "DIVISION"
|
|
87
87
|
}
|
|
88
|
+
declare enum CustomColumnValues {
|
|
89
|
+
LEFT_BRACKET = "LEFT_BRACKET",
|
|
90
|
+
RIGHT_BRACKET = "RIGHT_BRACKET",
|
|
91
|
+
PERCENT_TOTAL = "PERCENT_TOTAL",
|
|
92
|
+
RANK = "RANK",
|
|
93
|
+
MOVING_AVG = "MOVING_AVG",
|
|
94
|
+
FUNCTION = "FUNCTION"
|
|
95
|
+
}
|
|
96
|
+
declare enum CustomColumnTypes {
|
|
97
|
+
COLUMN = "column",
|
|
98
|
+
NUMBER = "number",
|
|
99
|
+
OPERATOR = "operator",
|
|
100
|
+
CURRENCY = "currency",
|
|
101
|
+
FUNCTION = "function",
|
|
102
|
+
SUM = "sum"
|
|
103
|
+
}
|
|
104
|
+
declare enum CustomColumnRowRangeTypes {
|
|
105
|
+
PRECEEDING = "PRECEDING",
|
|
106
|
+
FOLLOWING = "FOLLOWING"
|
|
107
|
+
}
|
|
88
108
|
declare enum GeneralErrorTypes {
|
|
89
109
|
UNAUTHORIZED = "UNAUTHORIZED",
|
|
90
110
|
NO_PROJECT_ID_SUPPLIED = "No project id supplied"
|
|
@@ -1638,6 +1658,7 @@ declare const getFnSummary: (columnFnArray: any) => string;
|
|
|
1638
1658
|
declare const getSelectableColumns: (columns: any) => Column[];
|
|
1639
1659
|
declare const getNumericalColumns: (columns: any) => Column[];
|
|
1640
1660
|
declare const getStringColumns: (columns: any) => Column[];
|
|
1661
|
+
declare const getDateColumns: (columns: any) => Column[];
|
|
1641
1662
|
declare const getCleanColumnName: (colName: string) => string;
|
|
1642
1663
|
declare const buildPlainColumnArrayFn: (columnName: string) => string[];
|
|
1643
1664
|
|
|
@@ -2705,4 +2726,4 @@ declare function color(): {
|
|
|
2705
2726
|
on(): any;
|
|
2706
2727
|
};
|
|
2707
2728
|
|
|
2708
|
-
export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AdditionalSelect, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AvailableSelect, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnSelect, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_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, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FORMULA_CLASS, FUNCTION_OPERATORS, FilterLock, 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, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, QueryData, QueryErrorTypes, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, 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, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, 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, 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, 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, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isOperatorJs, isSingleValueResponse, isTableType, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
|
|
2729
|
+
export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AdditionalSelect, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AvailableSelect, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnSelect, ColumnType, ColumnTypes, 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, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FORMULA_CLASS, FUNCTION_OPERATORS, FilterLock, 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, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, ParsedInterpretation, ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, QueryData, QueryErrorTypes, QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, 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, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, 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, 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, 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, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isOperatorJs, isSingleValueResponse, isTableType, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
|
package/dist/index.global.js
CHANGED
|
@@ -14689,6 +14689,29 @@
|
|
|
14689
14689
|
Operators2["DIVISION"] = "DIVISION";
|
|
14690
14690
|
return Operators2;
|
|
14691
14691
|
})(Operators || {});
|
|
14692
|
+
var CustomColumnValues = /* @__PURE__ */ ((CustomColumnValues2) => {
|
|
14693
|
+
CustomColumnValues2["LEFT_BRACKET"] = "LEFT_BRACKET";
|
|
14694
|
+
CustomColumnValues2["RIGHT_BRACKET"] = "RIGHT_BRACKET";
|
|
14695
|
+
CustomColumnValues2["PERCENT_TOTAL"] = "PERCENT_TOTAL";
|
|
14696
|
+
CustomColumnValues2["RANK"] = "RANK";
|
|
14697
|
+
CustomColumnValues2["MOVING_AVG"] = "MOVING_AVG";
|
|
14698
|
+
CustomColumnValues2["FUNCTION"] = "FUNCTION";
|
|
14699
|
+
return CustomColumnValues2;
|
|
14700
|
+
})(CustomColumnValues || {});
|
|
14701
|
+
var CustomColumnTypes = /* @__PURE__ */ ((CustomColumnTypes2) => {
|
|
14702
|
+
CustomColumnTypes2["COLUMN"] = "column";
|
|
14703
|
+
CustomColumnTypes2["NUMBER"] = "number";
|
|
14704
|
+
CustomColumnTypes2["OPERATOR"] = "operator";
|
|
14705
|
+
CustomColumnTypes2["CURRENCY"] = "currency";
|
|
14706
|
+
CustomColumnTypes2["FUNCTION"] = "function";
|
|
14707
|
+
CustomColumnTypes2["SUM"] = "sum";
|
|
14708
|
+
return CustomColumnTypes2;
|
|
14709
|
+
})(CustomColumnTypes || {});
|
|
14710
|
+
var CustomColumnRowRangeTypes = /* @__PURE__ */ ((CustomColumnRowRangeTypes2) => {
|
|
14711
|
+
CustomColumnRowRangeTypes2["PRECEEDING"] = "PRECEDING";
|
|
14712
|
+
CustomColumnRowRangeTypes2["FOLLOWING"] = "FOLLOWING";
|
|
14713
|
+
return CustomColumnRowRangeTypes2;
|
|
14714
|
+
})(CustomColumnRowRangeTypes || {});
|
|
14692
14715
|
var GeneralErrorTypes = /* @__PURE__ */ ((GeneralErrorTypes2) => {
|
|
14693
14716
|
GeneralErrorTypes2["UNAUTHORIZED"] = "UNAUTHORIZED";
|
|
14694
14717
|
GeneralErrorTypes2["NO_PROJECT_ID_SUPPLIED"] = "No project id supplied";
|
|
@@ -20254,7 +20277,7 @@
|
|
|
20254
20277
|
const formatted = formatNumberFilterValue(filter3.value);
|
|
20255
20278
|
filterObj.operator = formatted.operator;
|
|
20256
20279
|
filterObj.value = formatted.value;
|
|
20257
|
-
} else if ((column == null ? void 0 : column.type) === "DATE") {
|
|
20280
|
+
} else if ((column == null ? void 0 : column.type) === "DATE" /* DATE */) {
|
|
20258
20281
|
const dates = filter3.value.split(" to ");
|
|
20259
20282
|
const precision = getPrecisionForDayJS(column.precision);
|
|
20260
20283
|
const startDate = dayjsWithPlugins_default.utc(dates[0]).startOf(precision).toISOString();
|
|
@@ -20516,7 +20539,7 @@
|
|
|
20516
20539
|
// src/HelperFns/customColumnHelpers.ts
|
|
20517
20540
|
var import_lodash7 = __toESM(require_lodash());
|
|
20518
20541
|
var GLOBAL_OPERATORS = ["LEFT_BRACKET", "RIGHT_BRACKET"];
|
|
20519
|
-
var FUNCTION_OPERATORS = ["PERCENT_TOTAL", "RANK", "FUNCTION"];
|
|
20542
|
+
var FUNCTION_OPERATORS = ["PERCENT_TOTAL", "RANK", "MOVING_AVG", "FUNCTION"];
|
|
20520
20543
|
var HIGHLIGHTED_CLASS = "highlighted-column";
|
|
20521
20544
|
var DISABLED_CLASS = "disabled-column";
|
|
20522
20545
|
var FORMULA_CLASS = "formula-column";
|
|
@@ -20803,16 +20826,18 @@
|
|
|
20803
20826
|
var _a, _b;
|
|
20804
20827
|
try {
|
|
20805
20828
|
let columnFnStr = "";
|
|
20806
|
-
const numRightBrackets = (_a = origColumnFnArray.filter(
|
|
20807
|
-
|
|
20829
|
+
const numRightBrackets = (_a = origColumnFnArray.filter(
|
|
20830
|
+
(chunk) => chunk.value === "RIGHT_BRACKET" /* RIGHT_BRACKET */
|
|
20831
|
+
)) == null ? void 0 : _a.length;
|
|
20832
|
+
const numLeftBrackets = (_b = origColumnFnArray.filter((chunk) => chunk.value === "LEFT_BRACKET" /* LEFT_BRACKET */)) == null ? void 0 : _b.length;
|
|
20808
20833
|
if (numRightBrackets !== numLeftBrackets) {
|
|
20809
20834
|
throw new ChataError("Syntax Error: Formula contains unclosed brackets");
|
|
20810
20835
|
}
|
|
20811
20836
|
origColumnFnArray.forEach((chunk, i) => {
|
|
20812
20837
|
var _a2, _b2, _c;
|
|
20813
|
-
if (chunk.type === "operator") {
|
|
20838
|
+
if (chunk.type === "operator" /* OPERATOR */) {
|
|
20814
20839
|
if (i === origColumnFnArray.length - 1) {
|
|
20815
|
-
if (chunk.value !== "RIGHT_BRACKET") {
|
|
20840
|
+
if (chunk.value !== "RIGHT_BRACKET" /* RIGHT_BRACKET */) {
|
|
20816
20841
|
throw new ChataError("Syntax Error: Formula can't end with an operator");
|
|
20817
20842
|
}
|
|
20818
20843
|
}
|
|
@@ -20822,7 +20847,7 @@
|
|
|
20822
20847
|
throw new ChataError("Syntax Error: Number input is empty");
|
|
20823
20848
|
}
|
|
20824
20849
|
columnFnStr = columnFnStr + " " + chunk.value;
|
|
20825
|
-
} else if (chunk.type === "column" && (chunk == null ? void 0 : chunk.column)) {
|
|
20850
|
+
} else if (chunk.type === "column" /* COLUMN */ && (chunk == null ? void 0 : chunk.column)) {
|
|
20826
20851
|
columnFnStr = columnFnStr + " row[" + ((_c = chunk == null ? void 0 : chunk.column) == null ? void 0 : _c.index) + "]";
|
|
20827
20852
|
}
|
|
20828
20853
|
});
|
|
@@ -20859,11 +20884,11 @@
|
|
|
20859
20884
|
let fnSummary = "";
|
|
20860
20885
|
columnFnArray.forEach((chunk, i) => {
|
|
20861
20886
|
var _a, _b;
|
|
20862
|
-
if (chunk.type === "operator") {
|
|
20887
|
+
if (chunk.type === "operator" /* OPERATOR */) {
|
|
20863
20888
|
fnSummary = `${fnSummary} ${(_a = OPERATORS[chunk.value]) == null ? void 0 : _a.js}`;
|
|
20864
|
-
} else if (chunk.type === "number") {
|
|
20889
|
+
} else if (chunk.type === "number" /* NUMBER */) {
|
|
20865
20890
|
fnSummary = `${fnSummary} ${chunk.value}`;
|
|
20866
|
-
} else if (chunk.type === "column" && (chunk == null ? void 0 : chunk.column)) {
|
|
20891
|
+
} else if (chunk.type === "column" /* COLUMN */ && (chunk == null ? void 0 : chunk.column)) {
|
|
20867
20892
|
fnSummary = `${fnSummary} ${(_b = chunk.column) == null ? void 0 : _b.display_name}`;
|
|
20868
20893
|
}
|
|
20869
20894
|
});
|
|
@@ -20882,6 +20907,9 @@
|
|
|
20882
20907
|
var getStringColumns = (columns) => {
|
|
20883
20908
|
return getVisibleColumns(columns).filter((col) => isColumnStringType(col));
|
|
20884
20909
|
};
|
|
20910
|
+
var getDateColumns = (columns) => {
|
|
20911
|
+
return getVisibleColumns(columns).filter((col) => isColumnDateType(col));
|
|
20912
|
+
};
|
|
20885
20913
|
var getCleanColumnName = (colName) => {
|
|
20886
20914
|
var _a;
|
|
20887
20915
|
return (_a = colName.replace(/\b(sum|avg|min|max|count|distinct|stddev)\b\(([^()]+)\)/g, "$2")) == null ? void 0 : _a.trim();
|
|
@@ -23600,7 +23628,7 @@
|
|
|
23600
23628
|
if (formattedValue === null) {
|
|
23601
23629
|
formattedValue = "NULL";
|
|
23602
23630
|
operator = "is";
|
|
23603
|
-
} else if ((column == null ? void 0 : column.type) === "DATE") {
|
|
23631
|
+
} else if ((column == null ? void 0 : column.type) === "DATE" /* DATE */) {
|
|
23604
23632
|
const isoDate = getDayJSObj({ value, column });
|
|
23605
23633
|
const precision = getPrecisionForDayJS(column.precision);
|
|
23606
23634
|
const isoDateStart = isoDate.startOf(precision).toISOString();
|