autoql-fe-utils 1.11.2 → 1.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -234,9 +234,9 @@ declare const AGG_TYPES: {
234
234
  AVG: AggType;
235
235
  MIN: AggType;
236
236
  MAX: AggType;
237
+ MEDIAN: AggType;
237
238
  COUNT: AggType;
238
239
  COUNT_DISTINCT: AggType;
239
- MEDIAN: AggType;
240
240
  STD_DEV: AggType;
241
241
  VARIANCE: AggType;
242
242
  };
@@ -620,6 +620,7 @@ interface FilterLock {
620
620
  }
621
621
  interface FrontendReq {
622
622
  additional_selects?: any[];
623
+ display_overrides?: DisplayOverride[];
623
624
  session_locked_conditions: Object;
624
625
  page_size: number;
625
626
  disambiguation: any[];
@@ -1438,6 +1439,7 @@ interface QueryParams {
1438
1439
  skipQueryValidation?: boolean;
1439
1440
  newColumns?: AdditionalSelect[];
1440
1441
  displayOverrides?: DisplayOverride[];
1442
+ force?: boolean;
1441
1443
  }
1442
1444
  interface DashboardTileQueryParams extends QueryParams {
1443
1445
  queryIndex?: number;
@@ -1459,7 +1461,7 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
1459
1461
  cancelToken?: any;
1460
1462
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1461
1463
  declare const runQuery: ({ query, userSelection, userSelectionFinal, translation, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, newColumns, displayOverrides, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1462
- declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1464
+ declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1463
1465
  declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
1464
1466
  queryId?: string;
1465
1467
  domain?: string;
@@ -1544,7 +1546,7 @@ declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, ap
1544
1546
  token?: string;
1545
1547
  skipQueryValidation?: boolean;
1546
1548
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1547
- declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect }?: {
1549
+ declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect, }?: {
1548
1550
  message?: string;
1549
1551
  queryId?: string;
1550
1552
  domain?: string;
package/dist/index.d.ts CHANGED
@@ -234,9 +234,9 @@ declare const AGG_TYPES: {
234
234
  AVG: AggType;
235
235
  MIN: AggType;
236
236
  MAX: AggType;
237
+ MEDIAN: AggType;
237
238
  COUNT: AggType;
238
239
  COUNT_DISTINCT: AggType;
239
- MEDIAN: AggType;
240
240
  STD_DEV: AggType;
241
241
  VARIANCE: AggType;
242
242
  };
@@ -620,6 +620,7 @@ interface FilterLock {
620
620
  }
621
621
  interface FrontendReq {
622
622
  additional_selects?: any[];
623
+ display_overrides?: DisplayOverride[];
623
624
  session_locked_conditions: Object;
624
625
  page_size: number;
625
626
  disambiguation: any[];
@@ -1438,6 +1439,7 @@ interface QueryParams {
1438
1439
  skipQueryValidation?: boolean;
1439
1440
  newColumns?: AdditionalSelect[];
1440
1441
  displayOverrides?: DisplayOverride[];
1442
+ force?: boolean;
1441
1443
  }
1442
1444
  interface DashboardTileQueryParams extends QueryParams {
1443
1445
  queryIndex?: number;
@@ -1459,7 +1461,7 @@ declare const runQueryValidation: ({ text, domain, apiKey, token, cancelToken, }
1459
1461
  cancelToken?: any;
1460
1462
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1461
1463
  declare const runQuery: ({ query, userSelection, userSelectionFinal, translation, test, domain, apiKey, token, source, filters, orders, tableFilters, pageSize, allowSuggestions, cancelToken, enableQueryValidation, skipQueryValidation, scope, newColumns, displayOverrides, }?: QueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1462
- declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1464
+ declare const runCachedDashboardQuery: ({ query, domain, apiKey, token, source, orders, tableFilters, allowSuggestions, cancelToken, scope, newColumns, queryIndex, tileKey, dashboardId, force, }?: DashboardTileQueryParams) => Promise<TransformedAxiosResponse | axios.AxiosResponse<any, any, {}>>;
1463
1465
  declare const exportCSV: ({ queryId, domain, apiKey, token, csvProgressCallback, }?: {
1464
1466
  queryId?: string;
1465
1467
  domain?: string;
@@ -1544,7 +1546,7 @@ declare const fetchExploreQueries: ({ keywords, pageSize, pageNumber, domain, ap
1544
1546
  token?: string;
1545
1547
  skipQueryValidation?: boolean;
1546
1548
  }) => Promise<axios.AxiosResponse<any, any, {}>>;
1547
- declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect }?: {
1549
+ declare const reportProblem: ({ message, queryId, domain, apiKey, token, isCorrect, }?: {
1548
1550
  message?: string;
1549
1551
  queryId?: string;
1550
1552
  domain?: string;
@@ -14653,6 +14653,14 @@
14653
14653
  fn: max,
14654
14654
  sqlFn: (columnName) => `max(${columnName})`
14655
14655
  }),
14656
+ MEDIAN: new AggType({
14657
+ type: "MEDIAN" /* MEDIAN */,
14658
+ displayName: "Median",
14659
+ tooltip: "<strong>Median:</strong> The median (middle) value will be shown for all data points with same label.",
14660
+ // symbol: 'Median',
14661
+ icon: "median",
14662
+ fn: median
14663
+ }),
14656
14664
  COUNT: new AggType({
14657
14665
  type: "COUNT" /* COUNT */,
14658
14666
  displayName: "Count",
@@ -14679,14 +14687,6 @@
14679
14687
  },
14680
14688
  sqlFn: (columnName) => `count(distinct ${columnName})`
14681
14689
  }),
14682
- MEDIAN: new AggType({
14683
- type: "MEDIAN" /* MEDIAN */,
14684
- displayName: "Median",
14685
- tooltip: "The median (middle) value will be shown for all data points with same label.",
14686
- // symbol: 'Median',
14687
- icon: "median",
14688
- fn: median
14689
- }),
14690
14690
  STD_DEV: new AggType({
14691
14691
  type: "STD_DEV" /* STD_DEV */,
14692
14692
  displayName: "Std Dev",
@@ -15318,8 +15318,12 @@
15318
15318
  return date2.replace(/\'/g, "");
15319
15319
  };
15320
15320
  var isISODate = (str) => {
15321
+ if (!str) {
15322
+ return false;
15323
+ }
15321
15324
  var dateString = str;
15322
15325
  dateString = getDateNoQuotes(dateString);
15326
+ dateString = dateString.trim();
15323
15327
  if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
15324
15328
  return false;
15325
15329
  }
@@ -19069,16 +19073,16 @@
19069
19073
  var DARK_THEME = {
19070
19074
  "accent-color": "#193a48",
19071
19075
  "accent-color-secondary": "#1ea0d8",
19072
- "background-color-primary": "#20252A",
19073
- "background-color-secondary": "#3B3F46",
19076
+ "background-color-primary": "#15191c",
19077
+ "background-color-secondary": "#1d222b",
19074
19078
  "background-color-tertiary": "#292929",
19075
19079
  "background-color-switch-input": "#252525",
19076
19080
  "background-color-switch-thumb": "#ececec",
19077
19081
  "background-color-checkbox": "#292929",
19078
19082
  "background-color-disabled": "#5d6167",
19079
19083
  "background-color-disabled-dark": "#857d83",
19080
- "table-border-color": "#53565c",
19081
- "border-color": "#53565c",
19084
+ "table-border-color": "#2c2e32",
19085
+ "border-color": "#43464b",
19082
19086
  "hover-color": "#4a4f56",
19083
19087
  "text-color-primary": "#ececec",
19084
19088
  "text-color-secondary": "#bababa",
@@ -30254,7 +30258,8 @@
30254
30258
  newColumns,
30255
30259
  queryIndex,
30256
30260
  tileKey,
30257
- dashboardId
30261
+ dashboardId,
30262
+ force
30258
30263
  } = {}) => {
30259
30264
  if (!dashboardId) {
30260
30265
  console.error("No dashboard ID supplied in request");
@@ -30276,6 +30281,9 @@
30276
30281
  key: apiKey,
30277
30282
  query_index: (queryIndex || 0).toString()
30278
30283
  });
30284
+ if (force) {
30285
+ queryParams.set("force", "true");
30286
+ }
30279
30287
  const url2 = `${domain}/autoql/api/v1/dashboards/${dashboardId}/tiles/${tileKey}/query?${queryParams.toString()}`;
30280
30288
  const config = {
30281
30289
  headers: {