@datawheel/data-explorer 1.0.11 → 1.0.13
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.mjs +11 -12
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -382,7 +382,7 @@ var explorerTranslation = {
|
|
|
382
382
|
},
|
|
383
383
|
locale: {
|
|
384
384
|
title: "Multilingual",
|
|
385
|
-
text1: "The Data Explorer makes data available multiple languages.",
|
|
385
|
+
text1: "The Data Explorer makes data available in multiple languages.",
|
|
386
386
|
text2: "Use the dropdown menu to change the output language of the data."
|
|
387
387
|
},
|
|
388
388
|
dataset: {
|
|
@@ -3311,16 +3311,14 @@ function TableView({
|
|
|
3311
3311
|
setPagination,
|
|
3312
3312
|
result
|
|
3313
3313
|
}) {
|
|
3314
|
-
var _a;
|
|
3315
3314
|
const isData = Boolean(table.getRowModel().rows.length);
|
|
3316
3315
|
const viewport = useRef(null);
|
|
3317
3316
|
const rowRef = useRef(null);
|
|
3317
|
+
const url = (result == null ? void 0 : result.url) || "";
|
|
3318
3318
|
useEffect(() => {
|
|
3319
|
-
var
|
|
3320
|
-
(
|
|
3319
|
+
var _a;
|
|
3320
|
+
(_a = viewport.current) == null ? void 0 : _a.scrollTo({ top: 0, behavior: "smooth" });
|
|
3321
3321
|
}, [pagination == null ? void 0 : pagination.pageIndex, pagination == null ? void 0 : pagination.pageSize]);
|
|
3322
|
-
const { data: serverSchema } = useServerSchema();
|
|
3323
|
-
const url = (_a = serverSchema == null ? void 0 : serverSchema.url) != null ? _a : "";
|
|
3324
3322
|
return /* @__PURE__ */ React13__default.createElement(Box, { sx: { height: "100%" } }, /* @__PURE__ */ React13__default.createElement(Flex, { direction: "column", justify: "space-between", sx: { height: "100%", flex: "1 1 auto" } }, /* @__PURE__ */ React13__default.createElement(MRT_ProgressBar, { isTopToolbar: false, table }), /* @__PURE__ */ React13__default.createElement(
|
|
3325
3323
|
ScrollArea,
|
|
3326
3324
|
{
|
|
@@ -3357,7 +3355,7 @@ function TableView({
|
|
|
3357
3355
|
}
|
|
3358
3356
|
},
|
|
3359
3357
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React13__default.createElement(Box, { component: "tr", key: headerGroup.id, sx: { fontWeight: "normal" } }, headerGroup.headers.map((header) => {
|
|
3360
|
-
var
|
|
3358
|
+
var _a;
|
|
3361
3359
|
const column = table.getColumn(header.id);
|
|
3362
3360
|
const isNumeric = column.columnDef.dataType === "number";
|
|
3363
3361
|
const isRowIndex = column.id === "#";
|
|
@@ -3399,7 +3397,7 @@ function TableView({
|
|
|
3399
3397
|
}
|
|
3400
3398
|
},
|
|
3401
3399
|
header.isPlaceholder ? null : flexRender(
|
|
3402
|
-
(
|
|
3400
|
+
(_a = header.column.columnDef.Header) != null ? _a : header.column.columnDef.header,
|
|
3403
3401
|
header.getContext()
|
|
3404
3402
|
),
|
|
3405
3403
|
!isRowIndex && /* @__PURE__ */ React13__default.createElement(ColumnFilterCell, { isNumeric, header, table })
|
|
@@ -3507,9 +3505,10 @@ function MultiFilter({ header }) {
|
|
|
3507
3505
|
data: drilldown.members.map((m) => {
|
|
3508
3506
|
const idFormatter = idFormatters[`${localeLabel} ID`];
|
|
3509
3507
|
const formattedKey = idFormatter ? idFormatter(m.key) : m.key;
|
|
3508
|
+
const key = formattedKey ? `(${formattedKey})` : formattedKey;
|
|
3510
3509
|
return {
|
|
3511
3510
|
value: `${m.key}`,
|
|
3512
|
-
label: m.caption ? `${m.caption}
|
|
3511
|
+
label: m.caption ? `${m.caption} ${key}` : `${key}`
|
|
3513
3512
|
};
|
|
3514
3513
|
}),
|
|
3515
3514
|
clearButtonProps: { "aria-label": "Clear selection" },
|
|
@@ -3775,9 +3774,10 @@ function LevelItem({
|
|
|
3775
3774
|
data: currentDrilldown.members.map((m) => {
|
|
3776
3775
|
const idFormatter = idFormatters[`${label} ID`];
|
|
3777
3776
|
const formattedKey = idFormatter ? idFormatter(m.key) : m.key;
|
|
3777
|
+
const key = formattedKey ? `(${formattedKey})` : formattedKey;
|
|
3778
3778
|
return {
|
|
3779
3779
|
value: `${m.key}`,
|
|
3780
|
-
label: m.caption ? `${m.caption}
|
|
3780
|
+
label: m.caption ? `${m.caption} ${key}` : `${key}`
|
|
3781
3781
|
};
|
|
3782
3782
|
}),
|
|
3783
3783
|
clearable: true,
|
|
@@ -4505,7 +4505,7 @@ function SuccessResult(props) {
|
|
|
4505
4505
|
h: "fit-content"
|
|
4506
4506
|
},
|
|
4507
4507
|
/* @__PURE__ */ React13__default.createElement(ExplorerTabs, { panels, onChange: tabHandler, value: panelKey }),
|
|
4508
|
-
(!queryItem.panel || queryItem.panel === "table") && /* @__PURE__ */ React13__default.createElement(Group, { sx: { display: "flex", flex: "0 1 auto", gap: "0.5rem" }, mr: "sm", noWrap: true },
|
|
4508
|
+
(!queryItem.panel || queryItem.panel === "table") && /* @__PURE__ */ React13__default.createElement(Group, { sx: { display: "flex", flex: "0 1 auto", gap: "0.5rem" }, mr: "sm", noWrap: true }, table && /* @__PURE__ */ React13__default.createElement(Toolbar, { table, fullscreen }), /* @__PURE__ */ React13__default.createElement(DrawerMenu_default, null))
|
|
4509
4509
|
),
|
|
4510
4510
|
isPreviewMode && /* @__PURE__ */ React13__default.createElement(Alert, { id: "alert-load-all-results", color: "yellow", radius: 0, sx: { flex: "0 0 auto" } }, /* @__PURE__ */ React13__default.createElement(Group, { position: "apart" }, /* @__PURE__ */ React13__default.createElement(Text, null, /* @__PURE__ */ React13__default.createElement(Text, { fw: 700, span: true }, t("previewMode.title_preview"), ":", " "), /* @__PURE__ */ React13__default.createElement(Text, { span: true }, t("previewMode.description_preview", { limit: previewLimit }))), /* @__PURE__ */ React13__default.createElement(PreviewModeSwitch, null))),
|
|
4511
4511
|
/* @__PURE__ */ React13__default.createElement(
|
|
@@ -7750,7 +7750,6 @@ function VizbuilderView(props) {
|
|
|
7750
7750
|
init_esm_shims();
|
|
7751
7751
|
function RawResponseView(props) {
|
|
7752
7752
|
const { result, isLoading, isFetching } = props;
|
|
7753
|
-
console.log(result);
|
|
7754
7753
|
const theme = useMantineTheme();
|
|
7755
7754
|
const token = "tokenValue";
|
|
7756
7755
|
const tokenizedUrl = (result == null ? void 0 : result.url) ? `${result.url}${`&token=${token}` }` : "";
|