@datawheel/data-explorer 1.0.16 → 1.0.18

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 CHANGED
@@ -1187,8 +1187,7 @@ declare namespace ExplorerComponent {
1187
1187
  var displayName: string;
1188
1188
  }
1189
1189
 
1190
- /** */
1191
- declare function PivotView<TData extends Record<string, unknown>>(props: {} & ViewProps<TData> & MRT_TableOptions<TData>): React.JSX.Element | null;
1190
+ declare function PivotView<TData extends Record<string, unknown>>(props: {} & ViewProps<TData> & MRT_TableOptions<TData>): React.JSX.Element;
1192
1191
 
1193
1192
  type TData = Record<string, string | number> & Record<string, any>;
1194
1193
  type TableView = {
package/dist/main.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { keyframes, createStyles, Select, rem, Input, Box, Text, Stack, Group, Button, SimpleGrid, Flex, ScrollArea, LoadingOverlay, Table, MultiSelect, Center, NumberInput, Menu, ActionIcon, UnstyledButton, Alert, Loader, Container, Title, useMantineTheme, TextInput, CopyButton, MantineProvider, Modal, Space, useComponentDefaultProps, Anchor, Paper, Accordion, Tooltip, Tabs, Switch, ThemeIcon, CloseButton, Drawer, Divider, Checkbox, packSx, Affix, Popover } from '@mantine/core';
1
+ import { keyframes, createStyles, Select, rem, Input, Box, Text, Stack, Group, Button, SimpleGrid, Flex, ScrollArea, LoadingOverlay, Table, MultiSelect, Center, NumberInput, Menu, ActionIcon, UnstyledButton, Loader, Container, Title, useMantineTheme, TextInput, CopyButton, Alert, MantineProvider, Modal, Space, useComponentDefaultProps, Paper, Anchor, Accordion, Tooltip, Tabs, Switch, ThemeIcon, CloseButton, Drawer, Divider, Checkbox, packSx, Affix, Popover } from '@mantine/core';
2
2
  import { useClipboard, useFullscreen, useDebouncedState, useMediaQuery, useDisclosure } from '@mantine/hooks';
3
- import { IconWorld, IconExternalLink, IconClipboard, IconSettings, IconMathGreater, IconMathLower, IconArrowsLeftRight, IconAlertCircle, IconAlertTriangle, IconWorldWww, IconClipboardCheck, IconCopy, IconDownload, IconDotsVertical, IconBox, IconArrowRight, IconArrowLeft, IconBrandGithub, IconCheck, IconShare, IconLanguage, IconTrash, IconInfoCircleFilled, IconChevronLeft, IconChevronRight, IconSearch, IconArrowsMinimize, IconArrowsMaximize, IconCircleOff, IconArrowsSort, IconSortDescendingNumbers, IconSortDescendingLetters, IconSortAscendingNumbers, IconSortAscendingLetters, IconPlus, IconStack3, IconFilterOff, IconFilter, IconAdjustments, IconClock, IconHelpCircle, IconPhotoDown, IconVectorTriangle } from '@tabler/icons-react';
3
+ import { IconWorld, IconExternalLink, IconClipboard, IconSettings, IconMathGreater, IconMathLower, IconArrowsLeftRight, IconWorldWww, IconClipboardCheck, IconAlertCircle, IconAlertTriangle, IconCopy, IconDownload, IconDotsVertical, IconBox, IconArrowRight, IconArrowLeft, IconBrandGithub, IconCheck, IconShare, IconLanguage, IconTrash, IconInfoCircleFilled, IconChevronLeft, IconChevronRight, IconSearch, IconArrowsMinimize, IconArrowsMaximize, IconCircleOff, IconArrowsSort, IconSortDescendingNumbers, IconSortDescendingLetters, IconSortAscendingNumbers, IconSortAscendingLetters, IconPlus, IconStack3, IconFilterOff, IconFilter, IconAdjustments, IconClock, IconHelpCircle, IconPhotoDown, IconVectorTriangle } from '@tabler/icons-react';
4
4
  import * as React13 from 'react';
5
5
  import React13__default, { createContext, forwardRef, useMemo, useCallback, useContext, useRef, useEffect, useState, Suspense, Component, useLayoutEffect } from 'react';
6
6
  import { translationFactory } from '@datawheel/use-translation';
@@ -1397,11 +1397,14 @@ function httpFetch(url, params) {
1397
1397
  return fetch(url, params).then((response) => {
1398
1398
  if (!response.ok) {
1399
1399
  return response.json().then((content) => {
1400
+ var _a;
1400
1401
  console.debug("CONTENT", content);
1401
1402
  if (response.status === 500) {
1402
1403
  throw new Error("");
1403
1404
  }
1404
- throw new Error(`Request failed with error code ${response.status}`);
1405
+ throw new Error(
1406
+ `${(_a = content.detail) != null ? _a : `Request failed with error code ${response.status}`} `
1407
+ );
1405
1408
  });
1406
1409
  }
1407
1410
  return response;
@@ -2317,8 +2320,9 @@ function useDownloadQuery() {
2317
2320
  throw new Error("The current query is not valid.");
2318
2321
  }
2319
2322
  const queryParams = { ...params, pagiLimit: 0, pagiOffset: 0 };
2323
+ const request = queryParamsToRequest(queryParams);
2320
2324
  const response = await tesseract.fetchData({
2321
- request: queryParamsToRequest(queryParams),
2325
+ request,
2322
2326
  format: format2
2323
2327
  });
2324
2328
  const blob = await response.blob();
@@ -2579,13 +2583,49 @@ var DownloadQuery = ({ data }) => {
2579
2583
  const { translate: t } = useTranslation();
2580
2584
  const formats = Object.values(Format);
2581
2585
  const components = [];
2582
- const { mutateAsync: downloadQuery } = useDownloadQuery();
2586
+ const { mutateAsync: downloadQuery, isError, error } = useDownloadQuery();
2587
+ const [showError, setShowError] = useState(false);
2588
+ useEffect(() => {
2589
+ if (isError && error) {
2590
+ setShowError(true);
2591
+ const timer = setTimeout(() => {
2592
+ setShowError(false);
2593
+ }, 7e3);
2594
+ return () => clearTimeout(timer);
2595
+ }
2596
+ }, [isError, error]);
2597
+ const errorAlert = isError && error && showError ? /* @__PURE__ */ React13__default.createElement(
2598
+ Paper,
2599
+ {
2600
+ sx: {
2601
+ position: "absolute",
2602
+ bottom: "calc(100% + 15px)",
2603
+ right: 0,
2604
+ minWidth: "400px",
2605
+ maxWidth: "700px",
2606
+ width: "fit-content",
2607
+ zIndex: 1e3
2608
+ },
2609
+ shadow: "md"
2610
+ },
2611
+ /* @__PURE__ */ React13__default.createElement(
2612
+ Alert,
2613
+ {
2614
+ icon: /* @__PURE__ */ React13__default.createElement(IconAlertCircle, { size: "1rem" }),
2615
+ color: "red",
2616
+ p: "xs",
2617
+ withCloseButton: true,
2618
+ onClose: () => setShowError(false)
2619
+ },
2620
+ error.message
2621
+ )
2622
+ ) : null;
2583
2623
  components.push(
2584
2624
  /* @__PURE__ */ React13__default.createElement(
2585
2625
  ButtonDownload,
2586
2626
  {
2587
2627
  leftIcon: /* @__PURE__ */ React13__default.createElement(IconDownload, { size: 20 }),
2588
- sx: { height: 30 },
2628
+ sx: { height: 30, position: "relative" },
2589
2629
  key: "download_csv",
2590
2630
  provider: () => downloadQuery({ format: "csv" })
2591
2631
  },
@@ -2595,7 +2635,7 @@ var DownloadQuery = ({ data }) => {
2595
2635
  if (components.length === 0 || data.length === 0) {
2596
2636
  return null;
2597
2637
  }
2598
- return /* @__PURE__ */ React13__default.createElement(Box, { id: "dex-btn-group-download" }, /* @__PURE__ */ React13__default.createElement(Group, { spacing: "xs" }, components, /* @__PURE__ */ React13__default.createElement(MenuOpts, { formats: formats.filter((f) => f !== "csv") })));
2638
+ return /* @__PURE__ */ React13__default.createElement(Box, { id: "dex-btn-group-download", sx: { position: "relative" } }, errorAlert, /* @__PURE__ */ React13__default.createElement(Group, { spacing: "xs" }, components, /* @__PURE__ */ React13__default.createElement(MenuOpts, { formats: formats.filter((f) => f !== "csv") })));
2599
2639
  };
2600
2640
  var mimeTypes = {
2601
2641
  csv: "text/csv",
@@ -2688,19 +2728,30 @@ function MenuOpts({ formats }) {
2688
2728
  },
2689
2729
  /* @__PURE__ */ React13__default.createElement(Text, { size: "xs" }, t(`formats.${format2}`))
2690
2730
  ));
2691
- return /* @__PURE__ */ React13__default.createElement(Menu, { shadow: "md", width: 200, opened }, /* @__PURE__ */ React13__default.createElement(Menu.Target, null, /* @__PURE__ */ React13__default.createElement(
2692
- ActionIcon,
2731
+ return /* @__PURE__ */ React13__default.createElement(
2732
+ Menu,
2693
2733
  {
2694
- onClick: () => setOpened((o) => !o),
2695
- variant: "filled",
2696
- color: "primary",
2697
- sx: {
2698
- width: 20,
2699
- minWidth: 0
2700
- }
2734
+ shadow: "md",
2735
+ width: 200,
2736
+ opened,
2737
+ onClose: () => setOpened(false),
2738
+ closeOnItemClick: false
2701
2739
  },
2702
- /* @__PURE__ */ React13__default.createElement(IconDotsVertical, { size: "0.8rem" })
2703
- )), /* @__PURE__ */ React13__default.createElement(Menu.Dropdown, null, /* @__PURE__ */ React13__default.createElement(Menu.Label, null, t("params.title_downloaddata")), buttons));
2740
+ /* @__PURE__ */ React13__default.createElement(Menu.Target, null, /* @__PURE__ */ React13__default.createElement(
2741
+ ActionIcon,
2742
+ {
2743
+ onClick: () => setOpened((o) => !o),
2744
+ variant: "filled",
2745
+ color: "primary",
2746
+ sx: {
2747
+ width: 20,
2748
+ minWidth: 0
2749
+ }
2750
+ },
2751
+ /* @__PURE__ */ React13__default.createElement(IconDotsVertical, { size: "0.8rem" })
2752
+ )),
2753
+ /* @__PURE__ */ React13__default.createElement(Menu.Dropdown, null, /* @__PURE__ */ React13__default.createElement(Menu.Label, null, t("params.title_downloaddata")), buttons)
2754
+ );
2704
2755
  }
2705
2756
  var TableFooter_default = TableFooter;
2706
2757
 
@@ -4247,28 +4298,56 @@ function QueryProvider({ children, defaultCube }) {
4247
4298
  let newQuery = parsePermalink(cubeMap[cube], searchParams);
4248
4299
  newQuery = isValidQuery(newQuery == null ? void 0 : newQuery.params) ? newQuery : buildQuery({ params: { cube } });
4249
4300
  newQuery.params.locale = defaultLocale || newQuery.params.locale;
4301
+ const dimensions = {};
4302
+ const hierarchies = {};
4303
+ const levels = Object.fromEntries(
4304
+ cubeMap[cube].dimensions.flatMap(
4305
+ (dim) => dim.hierarchies.flatMap(
4306
+ (hie) => hie.levels.map((lvl) => {
4307
+ dimensions[lvl.name] = dim.name;
4308
+ hierarchies[lvl.name] = hie.name;
4309
+ return [lvl.name, lvl];
4310
+ })
4311
+ )
4312
+ )
4313
+ );
4314
+ const restDrilldownsKeys = Object.keys(levels).filter(
4315
+ (key) => !newQuery.params.drilldowns[key]
4316
+ );
4317
+ const restDrilldowns = restDrilldownsKeys.map((name4) => {
4318
+ const lvl = levels[name4];
4319
+ return buildDrilldown({
4320
+ active: false,
4321
+ key: lvl.name,
4322
+ dimension: dimensions[name4],
4323
+ hierarchy: hierarchies[name4],
4324
+ level: name4
4325
+ });
4326
+ });
4250
4327
  if (newQuery) {
4251
- const promises = Object.values(newQuery.params.drilldowns).map((dd) => {
4252
- const currentDrilldown = queryItem.params.drilldowns[dd.key];
4253
- const localeChanged = prevLocaleRef.current !== (newQuery == null ? void 0 : newQuery.params.locale);
4254
- if (currentDrilldown && currentDrilldown.members && currentDrilldown.members.length > 0 && !localeChanged) {
4255
- return Promise.resolve({
4256
- drilldown: currentDrilldown,
4257
- cut: buildCut({ ...currentDrilldown, active: false })
4258
- });
4259
- } else {
4260
- return fetchMembers(dd.level, newQuery == null ? void 0 : newQuery.params.locale, cube).then((levelMeta) => {
4261
- const cut = buildCut({ ...dd, active: false });
4262
- return {
4263
- drilldown: {
4264
- ...dd,
4265
- members: levelMeta.members
4266
- },
4267
- cut
4268
- };
4269
- });
4328
+ const promises = [...restDrilldowns, ...Object.values(newQuery.params.drilldowns)].map(
4329
+ (dd) => {
4330
+ const currentDrilldown = queryItem.params.drilldowns[dd.key];
4331
+ const localeChanged = prevLocaleRef.current !== (newQuery == null ? void 0 : newQuery.params.locale);
4332
+ if (currentDrilldown && currentDrilldown.members && currentDrilldown.members.length > 0 && !localeChanged) {
4333
+ return Promise.resolve({
4334
+ drilldown: currentDrilldown,
4335
+ cut: buildCut({ ...currentDrilldown, active: false })
4336
+ });
4337
+ } else {
4338
+ return fetchMembers(dd.level, newQuery == null ? void 0 : newQuery.params.locale, cube).then((levelMeta) => {
4339
+ const cut = buildCut({ ...dd, active: false });
4340
+ return {
4341
+ drilldown: {
4342
+ ...dd,
4343
+ members: levelMeta.members
4344
+ },
4345
+ cut
4346
+ };
4347
+ });
4348
+ }
4270
4349
  }
4271
- });
4350
+ );
4272
4351
  runFetchMembers(Promise.all(promises)).then((data) => {
4273
4352
  setTransintionLocaleLoading(false);
4274
4353
  prevLocaleRef.current = newQuery == null ? void 0 : newQuery.params.locale;
@@ -5310,6 +5389,20 @@ function ExplorerContent(props) {
5310
5389
  // src/components/PivotView.tsx
5311
5390
  init_esm_shims();
5312
5391
 
5392
+ // src/vizbuilder/hooks/usePivotTableData.ts
5393
+ init_esm_shims();
5394
+ function usePivotTableData() {
5395
+ const queryItem = useSelector$1(selectCurrentQueryItem);
5396
+ const queryLink = queryItem.link;
5397
+ const query = useFetchQuery(queryItem.params, queryLink, {
5398
+ withoutPagination: true
5399
+ });
5400
+ return query;
5401
+ }
5402
+
5403
+ // src/components/PivotViewTable.tsx
5404
+ init_esm_shims();
5405
+
5313
5406
  // src/hooks/pivot.ts
5314
5407
  init_esm_shims();
5315
5408
 
@@ -5528,16 +5621,27 @@ function useFormatParams(measures, valueProperty) {
5528
5621
  function usePivottedData(data, colProp, rowProp, valProp, initialState4 = null) {
5529
5622
  const [pivottedData, setPivottedData] = useState(initialState4);
5530
5623
  const [error, setError] = useState(null);
5624
+ const [isProcessing, setIsProcessing] = useState(false);
5531
5625
  useEffect(() => {
5532
5626
  setPivottedData(initialState4);
5533
5627
  setError(null);
5534
- serializeToArray(data, { colProp, rowProp, valProp }).then(setPivottedData, setError);
5628
+ if (data.length !== 0) {
5629
+ setIsProcessing(true);
5630
+ serializeToArray(data, { colProp, rowProp, valProp }).then((result) => {
5631
+ setPivottedData(result);
5632
+ setIsProcessing(false);
5633
+ }).catch((err) => {
5634
+ setError(err);
5635
+ setIsProcessing(false);
5636
+ });
5637
+ }
5535
5638
  return () => {
5536
5639
  setPivottedData(null);
5537
5640
  setError(null);
5641
+ setIsProcessing(false);
5538
5642
  };
5539
- }, [data, colProp, rowProp, valProp]);
5540
- return [pivottedData, error];
5643
+ }, [data, colProp, rowProp, valProp, initialState4]);
5644
+ return [pivottedData, error, isProcessing];
5541
5645
  }
5542
5646
  function serializeToArray(data, sides) {
5543
5647
  return new Promise((resolve, reject) => {
@@ -5619,7 +5723,7 @@ var NonIdealState = (props) => /* @__PURE__ */ React13__default.createElement(
5619
5723
  /* @__PURE__ */ React13__default.createElement(Stack, { align: "center", spacing: "xs" }, props.icon && props.icon, props.title && /* @__PURE__ */ React13__default.createElement(Title, { order: 5 }, props.title), props.description && /* @__PURE__ */ React13__default.createElement(Text, null, props.description), props.children && props.children, props.action && props.action)
5620
5724
  );
5621
5725
 
5622
- // src/components/PivotView.tsx
5726
+ // src/components/PivotViewTable.tsx
5623
5727
  var SelectOption = forwardRef(
5624
5728
  (props, ref) => {
5625
5729
  return /* @__PURE__ */ React13__default.createElement(SelectObject, { ref, ...props });
@@ -5645,50 +5749,44 @@ var useStyles5 = createStyles((theme) => ({
5645
5749
  }
5646
5750
  }
5647
5751
  }));
5648
- function PivotView(props) {
5752
+ function PivotViewTable(props) {
5649
5753
  var _a;
5650
- const { cube, params, result, isLoading, ...mantineReactTableProps } = props;
5651
- const locale = params.locale;
5754
+ const { cube, params, className, panelKey, data: result, ...mantineReactTableProps } = props;
5652
5755
  const { translate: t } = useTranslation();
5653
5756
  const { data: schema } = useServerSchema();
5654
- const measures = (_a = schema == null ? void 0 : schema.cubeMap[cube.name]) == null ? void 0 : _a.measures;
5655
- if (!result || !measures) return null;
5656
- const measureMap = Object.fromEntries(measures.map((item) => [item.name, item]));
5657
5757
  const { classes, cx } = useStyles5();
5658
- const measureOptions = useMemo(
5659
- () => filterMap(Object.values(params.measures), (item) => {
5660
- const entity = measureMap[item.name];
5661
- return !isActiveItem(item) ? null : {
5662
- value: item.name,
5663
- label: getCaption(entity, locale),
5664
- type: entity.aggregator
5665
- };
5666
- }),
5667
- [measureMap, params.measures, locale]
5668
- );
5669
- const drilldownOptions = useMemo(() => {
5670
- const levelMap = mapDimensionHierarchyLevels(cube);
5671
- return Object.values(params.drilldowns).filter(isActiveItem).flatMap((item) => {
5672
- const [level, hierarchy, dimension] = levelMap[item.level];
5673
- const caption = getCaption(level, locale);
5674
- const type = dimension.type;
5675
- const propertyMap = keyBy(level.properties, "name");
5676
- const levelOptions = [{ value: item.level, label: caption, type }];
5677
- if (result.data.length && `${item.level} ID` in result.data[0]) {
5678
- levelOptions.push({ value: `${item.level} ID`, label: `${caption} ID`, type });
5679
- }
5680
- return levelOptions.concat(
5681
- filterMap(item.properties, (item2) => {
5682
- const entity = propertyMap[item2.name];
5683
- return !isActiveItem(item2) ? null : {
5684
- value: item2.name,
5685
- label: `${caption} \u203A ${getCaption(entity, locale)}`,
5686
- type: "prop"
5687
- };
5688
- })
5689
- );
5690
- });
5691
- }, [cube, params.drilldowns, locale]);
5758
+ const locale = params.locale;
5759
+ const measures = ((_a = schema == null ? void 0 : schema.cubeMap[cube.name]) == null ? void 0 : _a.measures) || [];
5760
+ const measureMap = Object.fromEntries(measures.map((item) => [item.name, item]));
5761
+ const measureOptions = filterMap(Object.values(params.measures), (item) => {
5762
+ const entity = measureMap[item.name];
5763
+ return !isActiveItem(item) ? null : {
5764
+ value: item.name,
5765
+ label: getCaption(entity, locale),
5766
+ type: entity.aggregator
5767
+ };
5768
+ });
5769
+ const levelMap = mapDimensionHierarchyLevels(cube);
5770
+ const drilldownOptions = Object.values(params.drilldowns).filter(isActiveItem).flatMap((item) => {
5771
+ const [level, hierarchy, dimension] = levelMap[item.level];
5772
+ const caption = getCaption(level, locale);
5773
+ const type = dimension.type;
5774
+ const propertyMap = keyBy(level.properties, "name");
5775
+ const levelOptions = [{ value: item.level, label: caption, type }];
5776
+ if (result.length && `${item.level} ID` in result[0]) {
5777
+ levelOptions.push({ value: `${item.level} ID`, label: `${caption} ID`, type });
5778
+ }
5779
+ return levelOptions.concat(
5780
+ filterMap(item.properties, (item2) => {
5781
+ const entity = propertyMap[item2.name];
5782
+ return !isActiveItem(item2) ? null : {
5783
+ value: item2.name,
5784
+ label: `${caption} \u203A ${getCaption(entity, locale)}`,
5785
+ type: "prop"
5786
+ };
5787
+ })
5788
+ );
5789
+ });
5692
5790
  const [colProp, setColumnProp] = useState(
5693
5791
  () => drilldownOptions.find((item) => item.type === "time") || drilldownOptions[0]
5694
5792
  );
@@ -5697,8 +5795,8 @@ function PivotView(props) {
5697
5795
  );
5698
5796
  const [valProp, setValueProp] = useState(() => measureOptions[0]);
5699
5797
  const fileName = [params.cube, colProp.label, rowProp.label, valProp.value].join("_");
5700
- const [pivottedData, pivottingError] = usePivottedData(
5701
- result.data,
5798
+ const [pivottedData, pivottingError, isProcessing] = usePivottedData(
5799
+ result,
5702
5800
  colProp.value,
5703
5801
  rowProp.value,
5704
5802
  valProp.value
@@ -5798,7 +5896,7 @@ function PivotView(props) {
5798
5896
  data: pivottedData.data,
5799
5897
  headers: pivottedData.headers,
5800
5898
  formatter: formatter2,
5801
- tableProps: mantineReactTableProps
5899
+ tableProps: { ...mantineReactTableProps, data: result }
5802
5900
  }
5803
5901
  );
5804
5902
  }
@@ -5875,7 +5973,7 @@ function MatrixTable(props) {
5875
5973
  }
5876
5974
  })
5877
5975
  ),
5878
- [headers]
5976
+ [headers, formatter2]
5879
5977
  );
5880
5978
  const tableProps = useMemo(
5881
5979
  () => ({
@@ -5944,6 +6042,30 @@ function stringifyMatrix(matrix, formatter2, format2) {
5944
6042
  ].join("\n");
5945
6043
  }
5946
6044
 
6045
+ // src/components/PivotView.tsx
6046
+ function PivotView(props) {
6047
+ const { translate: t } = useTranslation();
6048
+ const { isLoading, data: result } = usePivotTableData();
6049
+ const { isLoading: schemaLoading } = useServerSchema();
6050
+ if (isLoading || schemaLoading) {
6051
+ return /* @__PURE__ */ React13__default.createElement(
6052
+ NonIdealState,
6053
+ {
6054
+ icon: /* @__PURE__ */ React13__default.createElement(Loader, { size: "xl" }),
6055
+ title: t("pivot_view.loading_title"),
6056
+ description: t("pivot_view.loading_details")
6057
+ }
6058
+ );
6059
+ }
6060
+ return /* @__PURE__ */ React13__default.createElement(
6061
+ PivotViewTable,
6062
+ {
6063
+ ...props,
6064
+ data: (result == null ? void 0 : result.data) || []
6065
+ }
6066
+ );
6067
+ }
6068
+
5947
6069
  // src/components/tour/ExplorerTour.tsx
5948
6070
  init_esm_shims();
5949
6071
 
@@ -7701,7 +7823,7 @@ function useVizbuilderData() {
7701
7823
 
7702
7824
  // src/components/LoadingOverlay.jsx
7703
7825
  init_esm_shims();
7704
- var LoadingOverlay2 = () => {
7826
+ var LoadingOverlay3 = () => {
7705
7827
  const { translate: t } = useTranslation();
7706
7828
  const { loading: isLoading, message } = useSelector$1(selectLoadingState);
7707
7829
  const description = !message ? void 0 : message.type === "HEAVY_QUERY" ? t("loading.message_heavyquery", message) : (
@@ -7740,7 +7862,7 @@ function VizbuilderView(props) {
7740
7862
  const { cube, params } = props;
7741
7863
  const query = useVizbuilderData();
7742
7864
  if (query.isLoading) {
7743
- return /* @__PURE__ */ React13__default.createElement(LoadingOverlay2, { visible: true });
7865
+ return /* @__PURE__ */ React13__default.createElement(LoadingOverlay3, { visible: true });
7744
7866
  }
7745
7867
  const data = query.data;
7746
7868
  const types = (_a = query.data) == null ? void 0 : _a.types;
@@ -7752,7 +7874,7 @@ function VizbuilderView(props) {
7752
7874
  data: (data == null ? void 0 : data.data) || [],
7753
7875
  locale: params.locale || "en"
7754
7876
  };
7755
- return !query.isLoading && /* @__PURE__ */ React13__default.createElement(React13__default.Fragment, null, /* @__PURE__ */ React13__default.createElement(
7877
+ return /* @__PURE__ */ React13__default.createElement(React13__default.Fragment, null, /* @__PURE__ */ React13__default.createElement(
7756
7878
  Vizbuilder,
7757
7879
  {
7758
7880
  datasets: dataset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datawheel/data-explorer",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "main": "./dist/main.mjs",
5
5
  "types": "./dist/main.d.mts",
6
6
  "files": [