@datawheel/data-explorer 1.0.11 → 1.0.12
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 +6 -9
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -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 })
|
|
@@ -4505,7 +4503,7 @@ function SuccessResult(props) {
|
|
|
4505
4503
|
h: "fit-content"
|
|
4506
4504
|
},
|
|
4507
4505
|
/* @__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 },
|
|
4506
|
+
(!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
4507
|
),
|
|
4510
4508
|
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
4509
|
/* @__PURE__ */ React13__default.createElement(
|
|
@@ -7750,7 +7748,6 @@ function VizbuilderView(props) {
|
|
|
7750
7748
|
init_esm_shims();
|
|
7751
7749
|
function RawResponseView(props) {
|
|
7752
7750
|
const { result, isLoading, isFetching } = props;
|
|
7753
|
-
console.log(result);
|
|
7754
7751
|
const theme = useMantineTheme();
|
|
7755
7752
|
const token = "tokenValue";
|
|
7756
7753
|
const tokenizedUrl = (result == null ? void 0 : result.url) ? `${result.url}${`&token=${token}` }` : "";
|