@bluemarble/bi 0.6.2 → 0.6.4
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/{DashboardDevtools-BT9mJrmJ.js → DashboardDevtools-CSRt9lib.js} +16 -6
- package/dist/DashboardDevtools-CSRt9lib.js.map +1 -0
- package/dist/{ModelDictionary-BlDeDyAE.js → ModelDictionary-Dib4Vk3i.js} +63 -9
- package/dist/ModelDictionary-Dib4Vk3i.js.map +1 -0
- package/dist/client/index.d.ts +24 -6
- package/dist/client/index.js +213 -57
- package/dist/client/index.js.map +1 -1
- package/dist/{layout-B7eYgNyR.d.ts → layout-CoGyGWYM.d.ts} +46 -5
- package/dist/{layout-DAFeHIuP.js → layout-nViz3MdU.js} +31 -3
- package/dist/layout-nViz3MdU.js.map +1 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +162 -5
- package/dist/server/index.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/DashboardDevtools-BT9mJrmJ.js.map +0 -1
- package/dist/ModelDictionary-BlDeDyAE.js.map +0 -1
- package/dist/layout-DAFeHIuP.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as toModelCode, c as VALUE_FORMATS, f as validateModel, g as parseColumnRef, h as modelEdges, m as measureHome, o as AGGREGATIONS, s as AGGREGATION_LABEL, t as canonicalJson, u as isAggregate, v as referencedTables } from "./codegen-DkfI6UJr.js";
|
|
2
2
|
import { n as diffRows } from "./compare-DloZhg1T.js";
|
|
3
|
-
import { C as RULE_OPERATOR_LABEL, S as RULE_OPERATORS, _ as tableColumns, a as FILTER_FIELDS, b as COLUMN_VERTICAL_ALIGNS, c as chartOfType, d as filterReferences, h as percentColumn, i as CARD_FIELDS, l as chartReferences, m as layoutModelWarnings, n as CANVAS_PRESETS, p as layoutFileContent, r as CARDS_FIELDS, s as chartColumns, t as BUILTIN_CHART_TYPES, v as validateLayout, w as UNARY_OPERATORS, x as NUMERIC_OPERATORS, y as COLUMN_ALIGNS } from "./layout-
|
|
4
|
-
import { d as useDashboard, f as errorMessage, h as parseLayoutItemKey, m as layoutItemKey, n as INSPECT_ATTRIBUTE, o as formatMeasure, p as LAYOUT_ITEM_ATTRIBUTE, t as ModelDictionary } from "./ModelDictionary-
|
|
3
|
+
import { C as RULE_OPERATOR_LABEL, S as RULE_OPERATORS, _ as tableColumns, a as FILTER_FIELDS, b as COLUMN_VERTICAL_ALIGNS, c as chartOfType, d as filterReferences, h as percentColumn, i as CARD_FIELDS, l as chartReferences, m as layoutModelWarnings, n as CANVAS_PRESETS, p as layoutFileContent, r as CARDS_FIELDS, s as chartColumns, t as BUILTIN_CHART_TYPES, v as validateLayout, w as UNARY_OPERATORS, x as NUMERIC_OPERATORS, y as COLUMN_ALIGNS } from "./layout-nViz3MdU.js";
|
|
4
|
+
import { d as useDashboard, f as errorMessage, h as parseLayoutItemKey, m as layoutItemKey, n as INSPECT_ATTRIBUTE, o as formatMeasure, p as LAYOUT_ITEM_ATTRIBUTE, t as ModelDictionary } from "./ModelDictionary-Dib4Vk3i.js";
|
|
5
5
|
import { Alert, Autocomplete, Box, Button, Checkbox, Chip, CircularProgress, Collapse, Dialog, DialogActions, DialogContent, DialogTitle, Divider, FormControlLabel, IconButton, List, ListItemButton, ListSubheader, Menu, MenuItem, MenuList, Paper, Popover, Popper, Portal, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, Tabs, TextField, ThemeProvider, ToggleButton, ToggleButtonGroup, Tooltip, Typography, createTheme } from "@mui/material";
|
|
6
6
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1910,6 +1910,8 @@ function FieldsForm({ fields, values, onSet: set, onSetMany, model, formatters,
|
|
|
1910
1910
|
const formattersKey = columnOptions ? keyOf("formatters") : void 0;
|
|
1911
1911
|
const single = (kind) => entries.filter(([, spec]) => spec.kind === kind);
|
|
1912
1912
|
const formatterKey = columnOptions && single("dimension").length === 1 && single("formatter").length === 1 ? single("formatter")[0]?.[0] : void 0;
|
|
1913
|
+
const formatterOf = (fieldKey) => columnOptions && fieldKey && entries.find(([, spec]) => spec.kind === "formatter" && spec.of === fieldKey)?.[0] || formatterKey;
|
|
1914
|
+
const pairedFormatters = columnOptions ? entries.filter(([, spec]) => spec.kind === "formatter" && spec.of).map(([key]) => key) : [];
|
|
1913
1915
|
const labels = labelsKey && values[labelsKey] || {};
|
|
1914
1916
|
const formats = formatsKey && values[formatsKey] || {};
|
|
1915
1917
|
const aligns = alignsKey && values[alignsKey] || {};
|
|
@@ -1930,8 +1932,9 @@ function FieldsForm({ fields, values, onSet: set, onSetMany, model, formatters,
|
|
|
1930
1932
|
else for (const [key, value] of Object.entries(changes)) set(key, value);
|
|
1931
1933
|
};
|
|
1932
1934
|
const dimensionFormatters = formattersKey && values[formattersKey] || {};
|
|
1933
|
-
const optionsButton = (kind, name) => {
|
|
1935
|
+
const optionsButton = (kind, name, fieldKey) => {
|
|
1934
1936
|
if (!columnOptions || !name) return null;
|
|
1937
|
+
const formatterKey = formatterOf(fieldKey);
|
|
1935
1938
|
if (kind === "percent") {
|
|
1936
1939
|
if (!alignsKey && !verticalKey) return null;
|
|
1937
1940
|
const column = percentColumn(name);
|
|
@@ -2206,7 +2209,7 @@ function FieldsForm({ fields, values, onSet: set, onSetMany, model, formatters,
|
|
|
2206
2209
|
emptyLabel: spec.kind === "enum" && spec.default ? `padrão (${spec.labels?.[spec.default] ?? spec.default})` : void 0,
|
|
2207
2210
|
onChange: (name) => set(key, name === spec.default ? void 0 : name)
|
|
2208
2211
|
});
|
|
2209
|
-
const button = spec.kind === "dimension" || spec.kind === "measure" ? optionsButton(spec.kind, value) : null;
|
|
2212
|
+
const button = spec.kind === "dimension" || spec.kind === "measure" ? optionsButton(spec.kind, value, key) : null;
|
|
2210
2213
|
return button ? /* @__PURE__ */ jsxs(Box, {
|
|
2211
2214
|
sx: {
|
|
2212
2215
|
display: "flex",
|
|
@@ -2227,7 +2230,8 @@ function FieldsForm({ fields, values, onSet: set, onSetMany, model, formatters,
|
|
|
2227
2230
|
alignsKey,
|
|
2228
2231
|
verticalKey,
|
|
2229
2232
|
formattersKey,
|
|
2230
|
-
formatterKey
|
|
2233
|
+
formatterKey,
|
|
2234
|
+
...pairedFormatters
|
|
2231
2235
|
].filter(Boolean));
|
|
2232
2236
|
const sections = [...new Set(entries.filter(([key]) => !hidden.has(key)).map(([, spec]) => spec.section))];
|
|
2233
2237
|
const fullRow = (spec) => spec.kind === "dimensions" || spec.kind === "measures" || spec.kind === "formatters" || spec.kind === "formatRules";
|
|
@@ -6621,6 +6625,7 @@ function QueriesPanel({ devtools, capabilities, selected, onSelect, onHover, onC
|
|
|
6621
6625
|
run.status === "loading" ? "carregando…" : `${run.durationMs} ms`,
|
|
6622
6626
|
run.rows && ` · ${run.rows.length} linhas`,
|
|
6623
6627
|
run.debug?.cached && " · cache",
|
|
6628
|
+
run.batched && ` · lote de ${run.batched}`,
|
|
6624
6629
|
view === "active" && ` · ${instance?.runs ?? 1}×`
|
|
6625
6630
|
]
|
|
6626
6631
|
})]
|
|
@@ -6703,6 +6708,11 @@ function RunDetail({ run, devtools, capabilities, mounted }) {
|
|
|
6703
6708
|
color: "warning",
|
|
6704
6709
|
label: "rodou no rascunho"
|
|
6705
6710
|
}),
|
|
6711
|
+
run.batched && /* @__PURE__ */ jsx(Chip, {
|
|
6712
|
+
size: "small",
|
|
6713
|
+
label: `lote de ${run.batched}`,
|
|
6714
|
+
title: "Saiu da mesma SQL que outras consultas (mesmas dimensões, filtros e fatos): o SQL e o tempo são os do conjunto"
|
|
6715
|
+
}),
|
|
6706
6716
|
mounted && /* @__PURE__ */ jsx(Button, {
|
|
6707
6717
|
size: "small",
|
|
6708
6718
|
onClick: () => scrollToQuery(run.instanceId),
|
|
@@ -8187,4 +8197,4 @@ function ToggleButton$1({ draft, loading, problems, inspecting, onOpen }) {
|
|
|
8187
8197
|
//#endregion
|
|
8188
8198
|
export { DashboardDevtools as default };
|
|
8189
8199
|
|
|
8190
|
-
//# sourceMappingURL=DashboardDevtools-
|
|
8200
|
+
//# sourceMappingURL=DashboardDevtools-CSRt9lib.js.map
|