@datawheel/data-explorer 1.2.0 → 1.3.1
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/main.d.mts +44 -18
- package/dist/main.mjs +5807 -6741
- 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
|
}
|
|
@@ -471,6 +475,7 @@ interface ViewProps<TData extends Record<string, any> = Record<string, string |
|
|
|
471
475
|
table?: MRT_TableInstance<TData & Record<string, any>>;
|
|
472
476
|
isError?: boolean;
|
|
473
477
|
isLoading?: boolean;
|
|
478
|
+
isFetching?: boolean;
|
|
474
479
|
data?: Record<string, string | number>[];
|
|
475
480
|
columns?: MRT_ColumnDef<TData>[];
|
|
476
481
|
pagination?: MRT_PaginationState;
|
|
@@ -765,23 +770,31 @@ declare const defaultTranslation: {
|
|
|
765
770
|
title: string;
|
|
766
771
|
};
|
|
767
772
|
list: {
|
|
768
|
-
join: string;
|
|
769
|
-
suffix: string;
|
|
770
|
-
prefix: string;
|
|
771
773
|
n_more: string;
|
|
772
774
|
};
|
|
773
775
|
title: {
|
|
776
|
+
main: string;
|
|
774
777
|
main_on_period: string;
|
|
775
778
|
main_over_period: string;
|
|
776
|
-
main: string;
|
|
777
779
|
measure_on_period: string;
|
|
778
780
|
measure_over_period: string;
|
|
779
781
|
nonidealstate: string;
|
|
780
|
-
|
|
782
|
+
scale_day: string;
|
|
783
|
+
scale_month: string;
|
|
784
|
+
scale_quarter: string;
|
|
785
|
+
scale_week: string;
|
|
786
|
+
scale_year: string;
|
|
781
787
|
series: string;
|
|
788
|
+
series_members: string;
|
|
782
789
|
time_range: string;
|
|
783
790
|
total: string;
|
|
784
791
|
};
|
|
792
|
+
transient: {
|
|
793
|
+
title_one_row: string;
|
|
794
|
+
title_loading: string;
|
|
795
|
+
title_empty: string;
|
|
796
|
+
description_empty: string;
|
|
797
|
+
};
|
|
785
798
|
}>;
|
|
786
799
|
action_copy: string;
|
|
787
800
|
action_copy_done: string;
|
|
@@ -1037,6 +1050,17 @@ declare const defaultTranslation: {
|
|
|
1037
1050
|
declare const useTranslation: any;
|
|
1038
1051
|
declare const TranslationConsumer: any;
|
|
1039
1052
|
|
|
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
|
+
|
|
1040
1064
|
interface ExplorerStepType extends StepType {
|
|
1041
1065
|
actionBefore?: () => void;
|
|
1042
1066
|
}
|
|
@@ -1050,17 +1074,6 @@ interface TourStepsPropsType {
|
|
|
1050
1074
|
texts: string[] | string;
|
|
1051
1075
|
}
|
|
1052
1076
|
|
|
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
1077
|
type Pagination = {
|
|
1065
1078
|
rowsLimits: number[];
|
|
1066
1079
|
defaultLimit: Pagination["rowsLimits"][number];
|
|
@@ -1101,6 +1114,13 @@ declare function ExplorerComponent<Locale extends string>(props: {
|
|
|
1101
1114
|
* @default "en"
|
|
1102
1115
|
*/
|
|
1103
1116
|
defaultLocale?: Locale;
|
|
1117
|
+
/**
|
|
1118
|
+
* The locale to use for sorting cube items within the SelectCubes component.
|
|
1119
|
+
* This controls the sorting of subtopics and cube buttons.
|
|
1120
|
+
* If not set, the defaultLocale will be used.
|
|
1121
|
+
* @default undefined
|
|
1122
|
+
*/
|
|
1123
|
+
sortLocale?: string;
|
|
1104
1124
|
/**
|
|
1105
1125
|
* Specifies which property should be used to filter elements in the member
|
|
1106
1126
|
* selection control of the Cuts parameter area.
|
|
@@ -1159,6 +1179,10 @@ declare function ExplorerComponent<Locale extends string>(props: {
|
|
|
1159
1179
|
* The Translation labels to use in the UI.
|
|
1160
1180
|
*/
|
|
1161
1181
|
translations?: Record<Locale, Translation>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Set of settings to pass to the VizbuilderProvider.
|
|
1184
|
+
*/
|
|
1185
|
+
vizbuilderSettings?: React.ComponentProps<typeof VizbuilderProvider>;
|
|
1162
1186
|
/**
|
|
1163
1187
|
* Determines whether Explorer should be rendered within a MantineProvider
|
|
1164
1188
|
* @default true
|
|
@@ -1265,6 +1289,7 @@ declare const actions: {
|
|
|
1265
1289
|
removeDrilldown: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeDrilldown">;
|
|
1266
1290
|
removeMeasure: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeMeasure">;
|
|
1267
1291
|
removeFilter: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/removeFilter">;
|
|
1292
|
+
removeTimeComplete: _reduxjs_toolkit.ActionCreatorWithoutPayload<"explorerQueries/removeTimeComplete">;
|
|
1268
1293
|
resetAllParams: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<QueryParams>, "explorerQueries/resetAllParams">;
|
|
1269
1294
|
resetCuts: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, CutItem>, "explorerQueries/resetCuts">;
|
|
1270
1295
|
resetDrilldowns: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, DrilldownItem>, "explorerQueries/resetDrilldowns">;
|
|
@@ -1282,6 +1307,7 @@ declare const actions: {
|
|
|
1282
1307
|
}, "explorerQueries/updateCube">;
|
|
1283
1308
|
updateCut: _reduxjs_toolkit.ActionCreatorWithPayload<CutItem, "explorerQueries/updateCut">;
|
|
1284
1309
|
updateDrilldown: _reduxjs_toolkit.ActionCreatorWithPayload<DrilldownItem, "explorerQueries/updateDrilldown">;
|
|
1310
|
+
updateTimeComplete: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/updateTimeComplete">;
|
|
1285
1311
|
updateFilter: _reduxjs_toolkit.ActionCreatorWithPayload<FilterItem, "explorerQueries/updateFilter">;
|
|
1286
1312
|
updateLocale: _reduxjs_toolkit.ActionCreatorWithPayload<string, "explorerQueries/updateLocale">;
|
|
1287
1313
|
updateMeasure: _reduxjs_toolkit.ActionCreatorWithPayload<MeasureItem, "explorerQueries/updateMeasure">;
|