autoql-fe-utils 1.0.93 → 1.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -538,6 +538,7 @@ interface Column extends RawColumn {
538
538
  drilldownGroupby?: any;
539
539
  additional?: boolean;
540
540
  custom?: boolean;
541
+ id?: string;
541
542
  }
542
543
  interface AvailableSelect {
543
544
  table_column: string;
@@ -922,8 +923,18 @@ declare const formatEpochDate: (value: any, col: Column, config?: DataFormatting
922
923
  declare const dateStringSortFn: (a: any, b: any, col: Column) => number;
923
924
  declare const numberSortFn: (a: any, b: any) => number;
924
925
  declare const dateSortFn: (a: any, b: any, col: Column, isTable: any) => number;
926
+ declare const filterDataByColumn: (data: any, columns: any, columnIndex: any, value: any, operator?: string, dataFormatting?: {
927
+ currencyCode: string;
928
+ languageCode: string;
929
+ currencyDecimals: number;
930
+ quantityDecimals: number;
931
+ ratioDecimals: number;
932
+ comparisonDisplay: string;
933
+ monthYearFormat: string;
934
+ dayMonthYearFormat: string;
935
+ }) => any;
925
936
  declare const sortDataByColumn: (data: any, columns: any, columnIndex: any, sortDirection?: string) => any;
926
- declare const sortDataByDate: (data: any, tableColumns: any, sortDirection: string, isTable: any) => any;
937
+ declare const sortDataByDate: (data: any, tableColumns: any, sortDirection: string, reverse: any) => any;
927
938
  declare const sortDataByAlphabet: (data: any, tableColumns: any, sortDirection: string, isTable: any) => any;
928
939
  interface formatElementParams {
929
940
  element: string | number;
@@ -2307,4 +2318,4 @@ declare function color(): {
2307
2318
  on(): any;
2308
2319
  };
2309
2320
 
2310
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AdditionalSelect, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AvailableSelect, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnSelect, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, 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, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
2321
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, AdditionalSelect, AggType, AggTypeParams, AggTypes, Authentication, AutoQLJWT, AvailableSelect, AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, Column, Column$1 as ColumnObj, ColumnSelect, ColumnType, ColumnTypes, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataExplorerSubject, DataExplorerSubjectFilter, DataExplorerSubjectGroups, DataExplorerSubjectInterface, DataExplorerSuggestion, DataExplorerTypes, DataFormatting, DateStringPrecisionTypes, DateUTC, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FilterLock, FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GROUP_TERM_TYPE, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, NUMBER_TERM_TYPE, 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, RawColumn, Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, Scale, SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, TableConfig, Theme, ThemeType, TransformedAxiosResponse, TransformedQueryResponse, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, ValueLabel, ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, authenticationDefault, autoQLConfigDefault, bezierCommand, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToNumber, countDecimals, createDataAlert, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteDataAlert, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, 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, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getColorScale, getColorScales, getColumnDateRanges, getColumnIndexConfig, getColumnNameForDateRange, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDataConfig, getDataFormatting, getDateColumnIndex, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getOpacityScale, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getQueryFn, getQueryParams, getQueryRequestParams, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseJwt, potentiallySupportsDatePivot, potentiallySupportsPivot, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setFilterFunction, setFilters, setHeaderFilterPlaceholder, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, tableFilterParams, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformLabels, transformQueryResponse, transformQueryResponseColumns, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
@@ -15979,7 +15979,7 @@
15979
15979
  return false;
15980
15980
  }
15981
15981
  };
15982
- } else if (column.type === "DOLLAR_AMT" /* DOLLAR_AMT */ || column.type === "QUANTITY" /* QUANTITY */ || column.type === "PERCENT" /* PERCENT */ || column.type === "RATIO" /* RATIO */) {
15982
+ } else if (isColumnNumberType(column)) {
15983
15983
  return (headerValue, rowValue) => {
15984
15984
  try {
15985
15985
  if (!rowValue) {
@@ -16054,8 +16054,9 @@
16054
16054
  }
16055
16055
  const isListQuery2 = getNumberOfGroupables(columns) === 0;
16056
16056
  const formattedColumns = columns.map((col, i) => {
16057
+ var _a;
16057
16058
  const newCol = (0, import_lodash2.default)(col);
16058
- newCol.id = v4_default();
16059
+ newCol.id = (_a = col.id) != null ? _a : v4_default();
16059
16060
  newCol.field = `${i}`;
16060
16061
  newCol.index = i;
16061
16062
  newCol.title = col.display_name;
@@ -16889,28 +16890,114 @@
16889
16890
  return -1;
16890
16891
  }
16891
16892
  };
16893
+ var filterDataByColumn = (data, columns, columnIndex, value, operator = "like", dataFormatting = dataFormattingDefault) => {
16894
+ let filteredData;
16895
+ const column = columns[columnIndex];
16896
+ if (column.type === "DATE" /* DATE */) {
16897
+ filteredData = data.concat().filter((row) => {
16898
+ var _a;
16899
+ try {
16900
+ const rowValue = row[columnIndex];
16901
+ if (!rowValue) {
16902
+ return false;
16903
+ }
16904
+ const rowValueDayJS = getDayJSObj({ value: rowValue, column });
16905
+ const dates = value.split(",");
16906
+ const precision = getPrecisionForDayJS(getFilterPrecision(column));
16907
+ const startDate = dayjsWithPlugins_default.utc(dates[0]).startOf(precision);
16908
+ const endDate = dayjsWithPlugins_default.utc((_a = dates[1]) != null ? _a : dates[0]).endOf(precision);
16909
+ const isAfterStartDate = startDate.isSameOrBefore(rowValueDayJS);
16910
+ const isBeforeEndDate = rowValueDayJS == null ? void 0 : rowValueDayJS.isSameOrBefore(endDate);
16911
+ return isAfterStartDate && isBeforeEndDate;
16912
+ } catch (error) {
16913
+ console.error(error);
16914
+ return false;
16915
+ }
16916
+ });
16917
+ } else if (column.type === "DATE_STRING" /* DATE_STRING */) {
16918
+ filteredData = data.concat().filter((row) => {
16919
+ try {
16920
+ const rowValue = row[columnIndex];
16921
+ if (!rowValue) {
16922
+ return false;
16923
+ }
16924
+ const formattedElement = formatElement({
16925
+ element: rowValue,
16926
+ column,
16927
+ config: dataFormatting
16928
+ });
16929
+ const shouldFilter = `${formattedElement}`.toLowerCase().includes(`${value}`.toLowerCase());
16930
+ return shouldFilter;
16931
+ } catch (error) {
16932
+ console.error(error);
16933
+ return false;
16934
+ }
16935
+ });
16936
+ } else if (isColumnNumberType(column)) {
16937
+ filteredData = data.concat().filter((row) => {
16938
+ try {
16939
+ const rowValue = row[columnIndex];
16940
+ if (!rowValue) {
16941
+ return false;
16942
+ }
16943
+ const filterValue = parseFloat(value == null ? void 0 : value.replace(/[^0-9.]/g, ""));
16944
+ if (operator === ">=") {
16945
+ return rowValue >= filterValue;
16946
+ } else if (operator === ">") {
16947
+ return rowValue > filterValue;
16948
+ } else if (operator === "<=") {
16949
+ return rowValue <= filterValue;
16950
+ } else if (operator === "<") {
16951
+ return rowValue < filterValue;
16952
+ } else if (operator === "!=") {
16953
+ return rowValue !== filterValue;
16954
+ } else if (operator === "=") {
16955
+ return rowValue === filterValue;
16956
+ } else if (operator === "between") {
16957
+ return rowValue;
16958
+ }
16959
+ return !isNaN(filterValue) && filterValue === rowValue;
16960
+ } catch (error) {
16961
+ console.error(error);
16962
+ return false;
16963
+ }
16964
+ });
16965
+ } else if (operator === "like") {
16966
+ filteredData = data == null ? void 0 : data.concat().filter((row) => {
16967
+ var _a, _b;
16968
+ return (_b = `${row[columnIndex]}`) == null ? void 0 : _b.toLowerCase().includes((_a = `${value}`) == null ? void 0 : _a.toLowerCase());
16969
+ });
16970
+ }
16971
+ return filteredData != null ? filteredData : data.concat();
16972
+ };
16892
16973
  var sortDataByColumn = (data, columns, columnIndex, sortDirection = "asc") => {
16893
16974
  try {
16894
16975
  if (!data || typeof data !== "object") {
16895
- throw new Error("Could not sort data by date - no data supplied");
16976
+ throw new Error("Could not sort data - no data supplied");
16896
16977
  }
16897
16978
  const column = columns[columnIndex];
16979
+ const multiplier = sortDirection === "desc" ? -1 : 1;
16898
16980
  if (!column) {
16899
- throw new Error("Could not sort data by date - no column found from index and column list");
16981
+ throw new Error("Could not sort data - no column found from index and column list");
16900
16982
  }
16901
- const isNumberType = isColumnNumberType(column);
16902
- if (isNumberType) {
16903
- let multiplier = sortDirection === "desc" ? -1 : 1;
16983
+ if (isColumnDateType(column)) {
16984
+ const sortedData = data.concat().sort((a, b) => multiplier * dateSortFn(a[columnIndex], b[columnIndex], column, true));
16985
+ return sortedData;
16986
+ } else if (isColumnNumberType(column)) {
16904
16987
  const sortedData = data.concat().sort((a, b) => multiplier * numberSortFn(a[columnIndex], b[columnIndex]));
16905
16988
  return sortedData;
16989
+ } else {
16990
+ const sortedData = data.concat().sort(
16991
+ (a, b) => multiplier * `${a[columnIndex]}`.localeCompare(`${b[columnIndex]}`, "en", { ignorePunctuation: true })
16992
+ );
16993
+ return sortedData;
16906
16994
  }
16907
- return data.concat().sort((a, b) => a - b);
16908
16995
  } catch (error) {
16909
16996
  console.error(error);
16910
16997
  }
16911
16998
  return data;
16912
16999
  };
16913
- var sortDataByDate = (data, tableColumns, sortDirection = "desc", isTable) => {
17000
+ var sortDataByDate = (data, tableColumns, sortDirection = "desc", reverse) => {
16914
17001
  try {
16915
17002
  if (!data || typeof data !== "object") {
16916
17003
  throw new Error("Could not sort data by date - no data supplied");
@@ -16919,7 +17006,7 @@
16919
17006
  const dateColumn = tableColumns[dateColumnIndex];
16920
17007
  if (dateColumnIndex >= 0) {
16921
17008
  let multiplier = sortDirection === "desc" ? -1 : 1;
16922
- const sortedData = data.concat().sort((a, b) => multiplier * dateSortFn(a[dateColumnIndex], b[dateColumnIndex], dateColumn, isTable));
17009
+ const sortedData = data.concat().sort((a, b) => multiplier * dateSortFn(a[dateColumnIndex], b[dateColumnIndex], dateColumn, reverse));
16923
17010
  return sortedData;
16924
17011
  }
16925
17012
  } catch (error) {
@@ -18833,7 +18920,7 @@
18833
18920
  return RESET_PERIOD_OPTIONS[dataAlert.reset_period];
18834
18921
  };
18835
18922
  var getSupportedConditionTypes = (expression, queryResponse) => {
18836
- var _a, _b, _c;
18923
+ var _a, _b, _c, _d, _e, _f, _g, _h;
18837
18924
  try {
18838
18925
  if (expression == null ? void 0 : expression[0]) {
18839
18926
  const firstCondition = (_a = expression == null ? void 0 : expression[0]) == null ? void 0 : _a.condition;
@@ -18845,7 +18932,12 @@
18845
18932
  if (isSingleValueResponse(queryResponse)) {
18846
18933
  return [COMPARE_TYPE];
18847
18934
  } else if (isAggregation((_c = (_b = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b.data) == null ? void 0 : _c.columns)) {
18848
- return [COMPARE_TYPE];
18935
+ if ((_f = (_e = (_d = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _d.data) == null ? void 0 : _e.columns) == null ? void 0 : _f.find((col) => col.is_visible && isColumnNumberType(col))) {
18936
+ return [COMPARE_TYPE, EXISTS_TYPE];
18937
+ }
18938
+ return [EXISTS_TYPE];
18939
+ } else if (isListQuery((_h = (_g = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _g.data) == null ? void 0 : _h.columns)) {
18940
+ return [EXISTS_TYPE];
18849
18941
  }
18850
18942
  return [EXISTS_TYPE];
18851
18943
  } catch (error) {