@datawheel/data-explorer 1.2.0 → 1.3.0

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.
Files changed (3) hide show
  1. package/dist/main.d.mts +43 -18
  2. package/dist/main.mjs +5542 -6479
  3. package/package.json +11 -8
package/dist/main.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { MRT_TableInstance, MRT_ColumnDef, MRT_PaginationState, MRT_TableOptions } from 'mantine-react-table';
3
3
  import { TranslationDict, TranslationContextProps } from '@datawheel/use-translation';
4
+ import { Translation as Translation$1, VizbuilderProvider } from '@datawheel/vizbuilder/react';
4
5
  import { CSSObject } from '@mantine/core';
5
- import { Translation as Translation$1 } from '@datawheel/vizbuilder/react';
6
6
  import { StepType, TourProps } from '@reactour/tour';
7
7
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
8
8
  import { StateFromReducersMapObject } from '@reduxjs/toolkit';
@@ -204,6 +204,7 @@ interface TesseractDimension {
204
204
  type: DimensionType;
205
205
  hierarchies: TesseractHierarchy[];
206
206
  default_hierarchy: string;
207
+ required?: boolean;
207
208
  }
208
209
  interface TesseractHierarchy {
209
210
  name: string;
@@ -392,6 +393,7 @@ interface QueryParams {
392
393
  pagiOffset: number;
393
394
  sortDir: "asc" | "desc";
394
395
  sortKey: string | undefined;
396
+ timeComplete: string | undefined;
395
397
  }
396
398
  interface QueryResult<D = Record<string, unknown>> {
397
399
  data: D[];
@@ -406,7 +408,9 @@ interface QueryResult<D = Record<string, unknown>> {
406
408
  url: string;
407
409
  }
408
410
  interface ResultEntityType {
409
- level: TesseractLevel;
411
+ level: TesseractLevel & {
412
+ dimension?: string;
413
+ };
410
414
  property: TesseractProperty;
411
415
  measure: TesseractMeasure;
412
416
  }
@@ -765,23 +769,31 @@ declare const defaultTranslation: {
765
769
  title: string;
766
770
  };
767
771
  list: {
768
- join: string;
769
- suffix: string;
770
- prefix: string;
771
772
  n_more: string;
772
773
  };
773
774
  title: {
775
+ main: string;
774
776
  main_on_period: string;
775
777
  main_over_period: string;
776
- main: string;
777
778
  measure_on_period: string;
778
779
  measure_over_period: string;
779
780
  nonidealstate: string;
780
- series_members: string;
781
+ scale_day: string;
782
+ scale_month: string;
783
+ scale_quarter: string;
784
+ scale_week: string;
785
+ scale_year: string;
781
786
  series: string;
787
+ series_members: string;
782
788
  time_range: string;
783
789
  total: string;
784
790
  };
791
+ transient: {
792
+ title_one_row: string;
793
+ title_loading: string;
794
+ title_empty: string;
795
+ description_empty: string;
796
+ };
785
797
  }>;
786
798
  action_copy: string;
787
799
  action_copy_done: string;
@@ -1037,6 +1049,17 @@ declare const defaultTranslation: {
1037
1049
  declare const useTranslation: any;
1038
1050
  declare const TranslationConsumer: any;
1039
1051
 
1052
+ interface ToolBarButtonProps {
1053
+ icon: ReactNode;
1054
+ label?: string;
1055
+ onClick?: () => void;
1056
+ }
1057
+ interface ToolbarConfigType {
1058
+ buttons: ToolBarButtonProps[];
1059
+ showLabels: Boolean;
1060
+ }
1061
+ declare function ToolbarButton({ icon, label, onClick }: ToolBarButtonProps): React.JSX.Element;
1062
+
1040
1063
  interface ExplorerStepType extends StepType {
1041
1064
  actionBefore?: () => void;
1042
1065
  }
@@ -1050,17 +1073,6 @@ interface TourStepsPropsType {
1050
1073
  texts: string[] | string;
1051
1074
  }
1052
1075
 
1053
- interface ToolBarButtonProps {
1054
- icon: ReactNode;
1055
- label?: string;
1056
- onClick?: () => void;
1057
- }
1058
- interface ToolbarConfigType {
1059
- buttons: ToolBarButtonProps[];
1060
- showLabels: Boolean;
1061
- }
1062
- declare function ToolbarButton({ icon, label, onClick }: ToolBarButtonProps): React.JSX.Element;
1063
-
1064
1076
  type Pagination = {
1065
1077
  rowsLimits: number[];
1066
1078
  defaultLimit: Pagination["rowsLimits"][number];
@@ -1101,6 +1113,13 @@ declare function ExplorerComponent<Locale extends string>(props: {
1101
1113
  * @default "en"
1102
1114
  */
1103
1115
  defaultLocale?: Locale;
1116
+ /**
1117
+ * The locale to use for sorting cube items within the SelectCubes component.
1118
+ * This controls the sorting of subtopics and cube buttons.
1119
+ * If not set, the defaultLocale will be used.
1120
+ * @default undefined
1121
+ */
1122
+ sortLocale?: string;
1104
1123
  /**
1105
1124
  * Specifies which property should be used to filter elements in the member
1106
1125
  * selection control of the Cuts parameter area.
@@ -1159,6 +1178,10 @@ declare function ExplorerComponent<Locale extends string>(props: {
1159
1178
  * The Translation labels to use in the UI.
1160
1179
  */
1161
1180
  translations?: Record<Locale, Translation>;
1181
+ /**
1182
+ * Set of settings to pass to the VizbuilderProvider.
1183
+ */
1184
+ vizbuilderSettings?: React.ComponentProps<typeof VizbuilderProvider>;
1162
1185
  /**
1163
1186
  * Determines whether Explorer should be rendered within a MantineProvider
1164
1187
  * @default true
@@ -1265,6 +1288,7 @@ declare const actions: {
1265
1288
  removeDrilldown: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeDrilldown">;
1266
1289
  removeMeasure: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeMeasure">;
1267
1290
  removeFilter: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeFilter">;
1291
+ removeTimeComplete: _reduxjs_toolkit.ActionCreatorWithoutPayload<"explorerQueries/removeTimeComplete">;
1268
1292
  resetAllParams: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<QueryParams>, "explorerQueries/resetAllParams">;
1269
1293
  resetCuts: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, CutItem>, "explorerQueries/resetCuts">;
1270
1294
  resetDrilldowns: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, DrilldownItem>, "explorerQueries/resetDrilldowns">;
@@ -1282,6 +1306,7 @@ declare const actions: {
1282
1306
  }, "explorerQueries/updateCube">;
1283
1307
  updateCut: _reduxjs_toolkit.ActionCreatorWithPayload<CutItem, "explorerQueries/updateCut">;
1284
1308
  updateDrilldown: _reduxjs_toolkit.ActionCreatorWithPayload<DrilldownItem, "explorerQueries/updateDrilldown">;
1309
+ updateTimeComplete: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/updateTimeComplete">;
1285
1310
  updateFilter: _reduxjs_toolkit.ActionCreatorWithPayload<FilterItem, "explorerQueries/updateFilter">;
1286
1311
  updateLocale: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/updateLocale">;
1287
1312
  updateMeasure: _reduxjs_toolkit.ActionCreatorWithPayload<MeasureItem, "explorerQueries/updateMeasure">;