@databrainhq/plugin 0.17.9-beta.33 → 0.17.9-beta.34
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/{Accordion-BdGcYoH_.mjs → Accordion-DtzU-kv3.mjs} +1 -1
- package/dist/{Chart-D3fn0ghg.mjs → Chart-BKjKglnR.mjs} +760 -760
- package/dist/{CreateGlobalFilter-8t6GSGyT.mjs → CreateGlobalFilter-COJr9pxx.mjs} +195 -195
- package/dist/{CreateMetricV2-BJoSn42i.mjs → CreateMetricV2-CfcDgw3E.mjs} +146 -146
- package/dist/{DraggableItem-CzPHM5Ek.mjs → DraggableItem-B8IW0_no.mjs} +139 -139
- package/dist/{HorizontalStackTable-DNBbrIFn.mjs → HorizontalStackTable-BgTor_KQ.mjs} +48 -48
- package/dist/{ManageMetricsV2-1fBC-FFm.mjs → ManageMetricsV2-DM8gofxF.mjs} +3 -3
- package/dist/{MetricCardV2-D7p6yAv5.mjs → MetricCardV2-Ff__3yWl.mjs} +146 -146
- package/dist/{NoDataFound-1gLzunO6.mjs → NoDataFound-Ifpvns9-.mjs} +1 -1
- package/dist/{NoDataState-rNtw1p0V.mjs → NoDataState-DPVhHP6M.mjs} +2 -2
- package/dist/{Panel-DQXH8IBE.mjs → Panel-BUwtA4r-.mjs} +1 -1
- package/dist/{PivotTableV2-DfzyY9RC.mjs → PivotTableV2-DQU2H33d.mjs} +2 -2
- package/dist/{PivotTableV3-B97O3ZLD.mjs → PivotTableV3-BLp5-cQr.mjs} +4 -4
- package/dist/{Portal-DE_CdG2S.mjs → Portal-BP2ivXF8.mjs} +2480 -2388
- package/dist/{RadioButton-BOkJ0ZLZ.mjs → RadioButton-oGBMxhHq.mjs} +2 -2
- package/dist/{ScheduleEmail-BpdnxS9q.mjs → ScheduleEmail-CiO6PMLd.mjs} +517 -517
- package/dist/{SearchMetricData-sBWIMhvT.mjs → SearchMetricData-C4stwNY9.mjs} +1272 -1272
- package/dist/{SortPanel-CNjSmhPX.mjs → SortPanel-Cy82r5dX.mjs} +1332 -1332
- package/dist/{Table-ODMPh1l7.mjs → Table-Cg4EZCAG.mjs} +296 -296
- package/dist/{TagInputField-DYDsUtvi.mjs → TagInputField-DuY_whs7.mjs} +9 -9
- package/dist/{TextAreaField-D4VprIA4.mjs → TextAreaField-D5O-kEVL.mjs} +297 -297
- package/dist/{TimeSeriesSettings-BTj3ofRS.mjs → TimeSeriesSettings-TXu0_07R.mjs} +11 -11
- package/dist/{arrayToCsvString-D9T6ms_d.mjs → arrayToCsvString-Bj2E5XgM.mjs} +1 -1
- package/dist/{cardActions-BLBLsjcd.mjs → cardActions-BPRHHm2G.mjs} +21 -7
- package/dist/{cardQueryError-tZcXyRqS.mjs → cardQueryError-DFKFCfFx.mjs} +1274 -1274
- package/dist/{charts-CY0Vq7Bn.mjs → charts-C2loGjFP.mjs} +3 -3
- package/dist/{chevron-down-mMC3ps2h.mjs → chevron-down-BWD1dxqC.mjs} +6 -6
- package/dist/{conditionalFormatting-LaI9Vca7.mjs → conditionalFormatting-Ca-leGbK.mjs} +1 -1
- package/dist/{contrast-Clo5ZlPI.mjs → contrast-EppiiunY.mjs} +117 -112
- package/dist/{createGlobalFilter.module-CWkuVq9m.mjs → createGlobalFilter.module-B3yI7_04.mjs} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{echarts-mz_HZpET.mjs → echarts-CsSfDZ5q.mjs} +2 -2
- package/dist/{metric.mutation-B8OUNYhj.mjs → metric.mutation-hYspHj1p.mjs} +1 -1
- package/dist/{option-ywDB8mz_.mjs → option-B1zeYJnm.mjs} +1 -1
- package/dist/{permissions-Rp1874rG.mjs → permissions-Bc9NDT2w.mjs} +359 -359
- package/dist/{pluginV3Request-CK6p_HfU.mjs → pluginV3Request-DFy6TETh.mjs} +1 -1
- package/dist/{renderer-DEc5om01.mjs → renderer-Bk8GbA94.mjs} +2 -2
- package/dist/{theme-CU-AvQm_.mjs → theme-BA-MvZE0.mjs} +1 -1
- package/dist/{timeseries-BBiiZaG9.mjs → timeseries-kGhqoQ6V.mjs} +1948 -1942
- package/dist/{toTasteAppearance-BnmM-nar.mjs → toTasteAppearance-CGUd4zvZ.mjs} +1 -1
- package/dist/{useGuesTokenUsageLog-CTqOyx82.mjs → useGuesTokenUsageLog-CVeQacbL.mjs} +1 -1
- package/dist/{usePublishArchivedMetrics-BsHt2ki1.mjs → usePublishArchivedMetrics-BGEBFLub.mjs} +2 -2
- package/dist/{useQuery-B_9KK0aG.mjs → useQuery-CNVFkkjT.mjs} +1 -1
- package/dist/webcomponents.es.js +3942 -3939
- package/dist/webcomponents.umd.js +184 -184
- package/package.json +2 -2
|
@@ -2,18 +2,18 @@ import "react";
|
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { n as e } from "./cardStates-DiUMQ7_o.mjs";
|
|
5
|
-
import { dn as t, g as n, on as r } from "./pluginV3Request-
|
|
6
|
-
import { K as i } from "./metric.mutation-
|
|
7
|
-
import {
|
|
8
|
-
import { n as C } from "./charts-
|
|
9
|
-
import { i as w, n as T, o as E, r as D, t as ee } from "./chevron-down-
|
|
10
|
-
import { E as te, t as O, v as k, w as A, y as j } from "./TextAreaField-
|
|
11
|
-
import { i as M, n as N, o as P, t as ne } from "./permissions-
|
|
12
|
-
import { a as re } from "./RadioButton-
|
|
13
|
-
import { a as F, c as I, i as L, l as ie, n as R, o as ae, r as z, t as oe } from "./SortPanel-
|
|
14
|
-
import { n as B } from "./Accordion-
|
|
5
|
+
import { dn as t, g as n, on as r } from "./pluginV3Request-DFy6TETh.mjs";
|
|
6
|
+
import { K as i } from "./metric.mutation-hYspHj1p.mjs";
|
|
7
|
+
import { Ar as a, Bi as o, Ci as s, Dr as c, Ei as l, Gi as u, Ha as d, Na as f, Zt as p, ci as m, di as h, ea as g, ja as _, li as v, lr as y, q as b, si as x, ui as S } from "./Portal-BP2ivXF8.mjs";
|
|
8
|
+
import { n as C } from "./charts-C2loGjFP.mjs";
|
|
9
|
+
import { i as w, n as T, o as E, r as D, t as ee } from "./chevron-down-BWD1dxqC.mjs";
|
|
10
|
+
import { E as te, t as O, v as k, w as A, y as j } from "./TextAreaField-D5O-kEVL.mjs";
|
|
11
|
+
import { i as M, n as N, o as P, t as ne } from "./permissions-Bc9NDT2w.mjs";
|
|
12
|
+
import { a as re } from "./RadioButton-oGBMxhHq.mjs";
|
|
13
|
+
import { a as F, c as I, i as L, l as ie, n as R, o as ae, r as z, t as oe } from "./SortPanel-Cy82r5dX.mjs";
|
|
14
|
+
import { n as B } from "./Accordion-DtzU-kv3.mjs";
|
|
15
15
|
import { t as V } from "./createLucideIcon-C-N26TaJ.mjs";
|
|
16
|
-
import { A as se, B as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, U as H, V as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, l as Ae, m as je, n as Me, o as Ne, p as Pe, r as U, s as Fe, t as W, u as G, v as Ie, y as Le, z as Re } from "./NoDataState-
|
|
16
|
+
import { A as se, B as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, U as H, V as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, l as Ae, m as je, n as Me, o as Ne, p as Pe, r as U, s as Fe, t as W, u as G, v as Ie, y as Le, z as Re } from "./NoDataState-DPVhHP6M.mjs";
|
|
17
17
|
import { A as ze, B as Be, C as Ve, E as He, L as Ue, M as K, N as We, O as Ge, R as Ke, S as qe, a as Je, i as Ye, j as Xe, n as Ze, o as Qe, r as q, t as J, w as $e } from "./qaSelectors-BfSWLSdW.mjs";
|
|
18
18
|
import { n as et, t as tt } from "./x-DDC7VFx5.mjs";
|
|
19
19
|
import { t as Y } from "./dist-C0uxSp1k.mjs";
|
|
@@ -1120,9 +1120,9 @@ var zr = Ar, Br = Mr, Vr = Pr, Hr = Ir, Ur = ({ className: e, orientation: t = "
|
|
|
1120
1120
|
className: Y("flex-1 text-sm outline-hidden", e),
|
|
1121
1121
|
...t
|
|
1122
1122
|
}), Jr = [
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
...Object.values(
|
|
1123
|
+
_.pivotV2,
|
|
1124
|
+
_.funnelV2,
|
|
1125
|
+
...Object.values(f)
|
|
1126
1126
|
];
|
|
1127
1127
|
function Yr(e, t) {
|
|
1128
1128
|
return e && t;
|
|
@@ -1131,7 +1131,7 @@ function Xr({ isLoading: e, hasData: t, hasSelectedFields: n, chartSettings: r }
|
|
|
1131
1131
|
return !e && t && n && !Jr.includes(r.chartType);
|
|
1132
1132
|
}
|
|
1133
1133
|
function Zr(e) {
|
|
1134
|
-
return !(e?.tableSettings?.isServerSidePagination && e?.chartType ===
|
|
1134
|
+
return !(e?.tableSettings?.isServerSidePagination && e?.chartType === _.table);
|
|
1135
1135
|
}
|
|
1136
1136
|
var Qr = "relative h-7 gap-1.5 border-(--border) bg-(--muted) px-2 text-xs font-medium text-(--muted-foreground) hover:text-(--foreground)", $r = "size-7 border-(--border) bg-(--muted) text-(--muted-foreground) hover:text-(--foreground)", ei = "bg-(--accent) text-(--foreground)", ti = () => /* @__PURE__ */ Z("span", {
|
|
1137
1137
|
"aria-hidden": "true",
|
|
@@ -1160,7 +1160,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1160
1160
|
}), /* @__PURE__ */ Q("span", {
|
|
1161
1161
|
className: "sr-only",
|
|
1162
1162
|
children: [" ", t]
|
|
1163
|
-
})] }), ai = ({ chartSettings: e, hasData: t, hasSelectedFields: n, isLoading: r = !1, limit: i, setLimit: a, onChangeLimit: o, onOpenFilters:
|
|
1163
|
+
})] }), ai = ({ chartSettings: e, hasData: t, hasSelectedFields: n, isLoading: r = !1, limit: i, setLimit: a, onChangeLimit: o, onOpenFilters: c, onOpenSort: l, onOpenChartType: u, onOpenChartAppearance: d, hasActiveFilters: f = !1, hasActiveSort: p = !1, onClearAll: m, showChartTypeTrigger: h = !0, filtersPanelProps: g, sortPanelProps: _, chartTypePanelProps: v, chartAppearancePanelProps: y, className: b }) => {
|
|
1164
1164
|
let x = Yr(t, n), S = Xr({
|
|
1165
1165
|
isLoading: r,
|
|
1166
1166
|
hasData: t,
|
|
@@ -1184,7 +1184,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1184
1184
|
size: "sm",
|
|
1185
1185
|
...J("builder-toolbar", "filters"),
|
|
1186
1186
|
"aria-expanded": g.isOpen,
|
|
1187
|
-
onClick:
|
|
1187
|
+
onClick: c,
|
|
1188
1188
|
className: Y(Qr, f && ei),
|
|
1189
1189
|
children: [
|
|
1190
1190
|
/* @__PURE__ */ Z(et, { "aria-hidden": "true" }),
|
|
@@ -1201,7 +1201,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1201
1201
|
size: "sm",
|
|
1202
1202
|
...J("builder-toolbar", "sort"),
|
|
1203
1203
|
"aria-expanded": _.isOpen,
|
|
1204
|
-
onClick:
|
|
1204
|
+
onClick: l,
|
|
1205
1205
|
className: Y(Qr, p && ei),
|
|
1206
1206
|
children: [
|
|
1207
1207
|
/* @__PURE__ */ Z(de, { "aria-hidden": "true" }),
|
|
@@ -1231,7 +1231,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1231
1231
|
className: "text-(--muted-foreground)",
|
|
1232
1232
|
children: "Row limit"
|
|
1233
1233
|
}), /* @__PURE__ */ Z(Pe, { placeholder: "-" })]
|
|
1234
|
-
}), /* @__PURE__ */ Z(G, { children:
|
|
1234
|
+
}), /* @__PURE__ */ Z(G, { children: s.map((e) => /* @__PURE__ */ Z(we, {
|
|
1235
1235
|
value: e.value,
|
|
1236
1236
|
children: e.label
|
|
1237
1237
|
}, e.value)) })]
|
|
@@ -1812,14 +1812,14 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1812
1812
|
})]
|
|
1813
1813
|
})
|
|
1814
1814
|
});
|
|
1815
|
-
}, Fi = new Set(
|
|
1815
|
+
}, Fi = new Set(x), Ii = new Set(o), Li = new Set(u), Ri = (e) => {
|
|
1816
1816
|
let t = e.helperFunction?.trim();
|
|
1817
1817
|
return !t || t.toUpperCase() === "NONE" ? null : t.toUpperCase();
|
|
1818
1818
|
}, zi = ({ label: e }) => /* @__PURE__ */ Z("span", {
|
|
1819
1819
|
className: "inline-block max-w-40 truncate rounded-(--radius-sm) bg-(--popover) px-2 py-1 text-xs font-medium text-(--popover-foreground) shadow-md ring-1 ring-(--border)",
|
|
1820
1820
|
children: e
|
|
1821
|
-
}), Bi = "group inline-flex h-7 max-w-full shrink-0 cursor-grab items-center gap-1 rounded-(--radius-sm) border border-(--border) bg-(--muted) px-1 text-xs font-medium text-(--foreground) transition-colors hover:border-(--muted-foreground) active:cursor-grabbing focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Vi = "cursor-grabbing border-dashed opacity-50", Hi = "flex h-6 shrink-0 items-center justify-center rounded-(--radius-sm) text-(--muted-foreground) transition-colors hover:bg-(--accent) hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Ui = "h-6 max-w-36 min-w-0 shrink truncate rounded-(--radius-sm) px-1 text-left leading-6 text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Wi = ({ column: e, type: t, zoneId: n, index: r, functionOptions: i, onChangeHelperFunction:
|
|
1822
|
-
let
|
|
1821
|
+
}), Bi = "group inline-flex h-7 max-w-full shrink-0 cursor-grab items-center gap-1 rounded-(--radius-sm) border border-(--border) bg-(--muted) px-1 text-xs font-medium text-(--foreground) transition-colors hover:border-(--muted-foreground) active:cursor-grabbing focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Vi = "cursor-grabbing border-dashed opacity-50", Hi = "flex h-6 shrink-0 items-center justify-center rounded-(--radius-sm) text-(--muted-foreground) transition-colors hover:bg-(--accent) hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Ui = "h-6 max-w-36 min-w-0 shrink truncate rounded-(--radius-sm) px-1 text-left leading-6 text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", Wi = ({ column: e, type: t, zoneId: n, index: r, functionOptions: i, onChangeHelperFunction: o, onChangeAlias: s, onRemove: c, isPartitionByColumnEnabled: l = !1, partitionColumnList: u = [], selectedDims: d = [], dbName: f, className: m }) => {
|
|
1822
|
+
let g = p(e) || e.alias || e.name, _ = Fi.has(e.type), y = X.useMemo(() => [h, v].includes((f || "").toLowerCase()), [f]), b = X.useMemo(() => {
|
|
1823
1823
|
if (_) return [];
|
|
1824
1824
|
let n = i(e);
|
|
1825
1825
|
if (t === "DIMENSION") return n.filter((e) => !Ii.has(e.value));
|
|
@@ -1827,14 +1827,14 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1827
1827
|
value: "NONE",
|
|
1828
1828
|
label: "Original Value"
|
|
1829
1829
|
}];
|
|
1830
|
-
return
|
|
1830
|
+
return y && (r = r.filter((e) => !Li.has(e.value))), r;
|
|
1831
1831
|
}, [
|
|
1832
1832
|
_,
|
|
1833
1833
|
i,
|
|
1834
1834
|
e,
|
|
1835
1835
|
t,
|
|
1836
|
-
|
|
1837
|
-
]),
|
|
1836
|
+
y
|
|
1837
|
+
]), x = Ri(e), S = t === "DIMENSION" ? e.type === "HELPER_FUNCTION" ? "aggregate_dimensions" : "dimensions" : e.configType === "AGGREGATE" ? "aggregate_metrics" : "metrics", C = X.useMemo(() => ({
|
|
1838
1838
|
...e.draggableItemData,
|
|
1839
1839
|
column: {
|
|
1840
1840
|
...e.draggableItemData.column,
|
|
@@ -1847,33 +1847,33 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1847
1847
|
},
|
|
1848
1848
|
data: C,
|
|
1849
1849
|
modifiers: { highlightDrop: { onDrag: !0 } },
|
|
1850
|
-
CustomDragPreview: /* @__PURE__ */ Z(zi, { label:
|
|
1850
|
+
CustomDragPreview: /* @__PURE__ */ Z(zi, { label: g })
|
|
1851
1851
|
}), E = li(e.datatype), D = ui[E], [te, O] = X.useState(!1), [A, j] = X.useState("list"), M = X.useRef(null), [N, P] = X.useState(e.percentileValue ?? .5), [ne, re] = X.useState([]), [F, I] = X.useState(e.functionConfiguration?.dateFormat ?? ""), L = (e) => {
|
|
1852
1852
|
O(e), e || (j("list"), M.current = null);
|
|
1853
1853
|
}, ie = (n, r) => {
|
|
1854
1854
|
if (Li.has(n.value)) {
|
|
1855
|
-
r.preventDefault(), M.current = n, P(e.percentileValue ?? .5),
|
|
1855
|
+
r.preventDefault(), M.current = n, P(e.percentileValue ?? .5), l && d.length && ne.length === 0 && re(u.filter((e) => d.some((t) => t.name === e.dimension?.columnName))), j("percentile");
|
|
1856
1856
|
return;
|
|
1857
1857
|
}
|
|
1858
1858
|
if (t === "DIMENSION" && n.value === "date format") {
|
|
1859
1859
|
r.preventDefault(), M.current = n, I(e.functionConfiguration?.dateFormat ?? ""), j("dateFormat");
|
|
1860
1860
|
return;
|
|
1861
1861
|
}
|
|
1862
|
-
|
|
1862
|
+
o({
|
|
1863
1863
|
column: e,
|
|
1864
1864
|
helperFunction: n,
|
|
1865
1865
|
type: t
|
|
1866
1866
|
});
|
|
1867
1867
|
}, R = () => {
|
|
1868
1868
|
let t = M.current;
|
|
1869
|
-
t && (
|
|
1869
|
+
t && (o({
|
|
1870
1870
|
column: e,
|
|
1871
1871
|
helperFunction: t,
|
|
1872
1872
|
type: "METRIC",
|
|
1873
1873
|
percentileValue: N,
|
|
1874
1874
|
partitionByColumns: ne.map((e) => {
|
|
1875
1875
|
if (!e.dimension) return;
|
|
1876
|
-
let t =
|
|
1876
|
+
let t = d.find((t) => t.name === e.dimension?.columnName);
|
|
1877
1877
|
return {
|
|
1878
1878
|
...e.dimension,
|
|
1879
1879
|
parentAlias: t?.parentAlias || e.dimension.parentAlias
|
|
@@ -1882,16 +1882,16 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1882
1882
|
}), L(!1));
|
|
1883
1883
|
}, ae = () => {
|
|
1884
1884
|
let t = M.current;
|
|
1885
|
-
t && (
|
|
1885
|
+
t && (o({
|
|
1886
1886
|
column: e,
|
|
1887
1887
|
helperFunction: t,
|
|
1888
1888
|
type: "DIMENSION",
|
|
1889
1889
|
functionConfiguration: { dateFormat: F }
|
|
1890
1890
|
}), L(!1));
|
|
1891
|
-
}, z = !["ARITHMETIC", "CUSTOM"].includes(e.type), [oe, B] = X.useState(!1), [V, se] = X.useState(e.alias), [ce, ue] = X.useState(e.cast ??
|
|
1892
|
-
B(t), t && (se(e.alias), ue(e.cast ??
|
|
1891
|
+
}, z = !["ARITHMETIC", "CUSTOM"].includes(e.type), [oe, B] = X.useState(!1), [V, se] = X.useState(e.alias), [ce, ue] = X.useState(e.cast ?? a[a.length - 1]), de = X.useRef(!1), fe = X.useId(), pe = `${fe}-rename-input`, me = `${fe}-partition`, he = `${fe}-percentile-value`, ge = `${fe}-date-format-value`, _e = (t) => {
|
|
1892
|
+
B(t), t && (se(e.alias), ue(e.cast ?? a[a.length - 1]), de.current = !1);
|
|
1893
1893
|
}, ve = () => {
|
|
1894
|
-
|
|
1894
|
+
s({
|
|
1895
1895
|
alias: V || e.alias,
|
|
1896
1896
|
column: e,
|
|
1897
1897
|
type: t,
|
|
@@ -1908,7 +1908,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1908
1908
|
...q(...H),
|
|
1909
1909
|
"data-slot": "field-chip",
|
|
1910
1910
|
"data-dbn-sorting-index": r,
|
|
1911
|
-
className: Y(Bi, T && Vi,
|
|
1911
|
+
className: Y(Bi, T && Vi, m),
|
|
1912
1912
|
children: [
|
|
1913
1913
|
/* @__PURE__ */ Z("span", {
|
|
1914
1914
|
"aria-hidden": "true",
|
|
@@ -1934,9 +1934,9 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1934
1934
|
children: /* @__PURE__ */ Z("button", {
|
|
1935
1935
|
type: "button",
|
|
1936
1936
|
...J(...H, "name"),
|
|
1937
|
-
title:
|
|
1937
|
+
title: g,
|
|
1938
1938
|
className: Ui,
|
|
1939
|
-
children:
|
|
1939
|
+
children: g
|
|
1940
1940
|
})
|
|
1941
1941
|
}), /* @__PURE__ */ Z(De, {
|
|
1942
1942
|
align: "start",
|
|
@@ -1968,7 +1968,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1968
1968
|
}), /* @__PURE__ */ Q(Ae, {
|
|
1969
1969
|
value: ce.value,
|
|
1970
1970
|
onValueChange: (e) => {
|
|
1971
|
-
let t =
|
|
1971
|
+
let t = a.find((t) => t.value === e);
|
|
1972
1972
|
t && (ue(t), de.current = !0);
|
|
1973
1973
|
},
|
|
1974
1974
|
children: [/* @__PURE__ */ Z(Te, {
|
|
@@ -1977,7 +1977,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
1977
1977
|
className: "h-7 w-full text-xs",
|
|
1978
1978
|
...q(...H, "cast-select"),
|
|
1979
1979
|
children: /* @__PURE__ */ Z(Pe, {})
|
|
1980
|
-
}), /* @__PURE__ */ Z(G, { children:
|
|
1980
|
+
}), /* @__PURE__ */ Z(G, { children: a.map((e) => /* @__PURE__ */ Z(we, {
|
|
1981
1981
|
value: e.value,
|
|
1982
1982
|
children: e.label
|
|
1983
1983
|
}, e.value)) })]
|
|
@@ -2008,10 +2008,10 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2008
2008
|
})]
|
|
2009
2009
|
}) : /* @__PURE__ */ Z("span", {
|
|
2010
2010
|
className: "h-6 max-w-36 min-w-0 shrink cursor-default truncate px-1 leading-6",
|
|
2011
|
-
title:
|
|
2012
|
-
children:
|
|
2011
|
+
title: g,
|
|
2012
|
+
children: g
|
|
2013
2013
|
}),
|
|
2014
|
-
|
|
2014
|
+
b.length > 0 ? /* @__PURE__ */ Q(be, {
|
|
2015
2015
|
open: te,
|
|
2016
2016
|
onOpenChange: L,
|
|
2017
2017
|
children: [/* @__PURE__ */ Z(le, {
|
|
@@ -2019,12 +2019,12 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2019
2019
|
children: /* @__PURE__ */ Z("button", {
|
|
2020
2020
|
type: "button",
|
|
2021
2021
|
...J(...H, "function"),
|
|
2022
|
-
"aria-label":
|
|
2023
|
-
title:
|
|
2024
|
-
className: Y(Hi, "border border-(--border) bg-(--background) hover:border-(--muted-foreground)",
|
|
2025
|
-
children:
|
|
2022
|
+
"aria-label": x ? `Change function for ${g} (currently ${x})` : `Set a function for ${g} (none set)`,
|
|
2023
|
+
title: x ?? "Set a function",
|
|
2024
|
+
className: Y(Hi, "border border-(--border) bg-(--background) hover:border-(--muted-foreground)", x ? "min-w-6 max-w-24 gap-1 px-2 text-caption font-semibold tracking-wide uppercase" : "size-6"),
|
|
2025
|
+
children: x ? /* @__PURE__ */ Z("span", {
|
|
2026
2026
|
className: "min-w-0 truncate",
|
|
2027
|
-
children:
|
|
2027
|
+
children: x
|
|
2028
2028
|
}) : /* @__PURE__ */ Z(ee, {
|
|
2029
2029
|
"aria-hidden": "true",
|
|
2030
2030
|
className: "size-3"
|
|
@@ -2032,24 +2032,24 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2032
2032
|
})
|
|
2033
2033
|
}), /* @__PURE__ */ Z(Ie, {
|
|
2034
2034
|
align: "start",
|
|
2035
|
-
children: A === "list" ?
|
|
2035
|
+
children: A === "list" ? b.map((e) => /* @__PURE__ */ Z(Se, {
|
|
2036
2036
|
...J(...H, "function", e.value),
|
|
2037
2037
|
onSelect: (t) => ie(e, t),
|
|
2038
2038
|
children: e.label
|
|
2039
2039
|
}, e.value)) : A === "percentile" ? /* @__PURE__ */ Q("div", {
|
|
2040
2040
|
className: "flex w-56 flex-col gap-2 p-1",
|
|
2041
2041
|
children: [
|
|
2042
|
-
|
|
2042
|
+
l ? /* @__PURE__ */ Q("div", {
|
|
2043
2043
|
className: "flex flex-col gap-1",
|
|
2044
2044
|
children: [/* @__PURE__ */ Z("span", {
|
|
2045
2045
|
className: "text-xs font-medium text-(--muted-foreground)",
|
|
2046
2046
|
children: "Partition by"
|
|
2047
2047
|
}), /* @__PURE__ */ Z("div", {
|
|
2048
2048
|
className: "flex max-h-32 flex-col gap-1 overflow-y-auto rounded-(--radius-sm) border border-(--border) p-1",
|
|
2049
|
-
children:
|
|
2049
|
+
children: u.length === 0 ? /* @__PURE__ */ Z("p", {
|
|
2050
2050
|
className: "px-1 py-1 text-xs text-(--muted-foreground)",
|
|
2051
2051
|
children: "No dimensions available"
|
|
2052
|
-
}) :
|
|
2052
|
+
}) : u.map((e) => {
|
|
2053
2053
|
let t = ne.some((t) => t.value === e.value), n = `${me}-${e.value}`;
|
|
2054
2054
|
return /* @__PURE__ */ Q("label", {
|
|
2055
2055
|
htmlFor: n,
|
|
@@ -2103,7 +2103,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2103
2103
|
variant: "secondary",
|
|
2104
2104
|
size: "sm",
|
|
2105
2105
|
className: "cta-primary",
|
|
2106
|
-
disabled:
|
|
2106
|
+
disabled: l && ne.length === 0,
|
|
2107
2107
|
...J(...H, "percentile-save"),
|
|
2108
2108
|
onClick: R,
|
|
2109
2109
|
children: "Save"
|
|
@@ -2163,8 +2163,8 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2163
2163
|
/* @__PURE__ */ Z("button", {
|
|
2164
2164
|
type: "button",
|
|
2165
2165
|
...J(...H, "remove"),
|
|
2166
|
-
"aria-label": `Remove ${
|
|
2167
|
-
onClick:
|
|
2166
|
+
"aria-label": `Remove ${g}`,
|
|
2167
|
+
onClick: c,
|
|
2168
2168
|
className: Y(Hi, "size-6 transition", "pointer-fine:opacity-0 pointer-fine:group-hover:opacity-100 pointer-fine:group-focus-within:opacity-100 pointer-fine:focus-visible:opacity-100"),
|
|
2169
2169
|
children: /* @__PURE__ */ Z(tt, {
|
|
2170
2170
|
className: "size-3.5",
|
|
@@ -2211,13 +2211,13 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2211
2211
|
"metrics",
|
|
2212
2212
|
"aggregate_metrics"
|
|
2213
2213
|
]
|
|
2214
|
-
}, ia = [], aa = [], oa = ({ table: e, columns: t, selectedDims: n, selectedMetrics: r, onDropColumn: i, onRemoveColumn: a, onChangeHelperFunction: o, onChangeAlias:
|
|
2215
|
-
let [C, w] = X.useState(!1), [T, E] = X.useState(), D = r.length > 0 && !!
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
].includes((
|
|
2214
|
+
}, ia = [], aa = [], oa = ({ table: e, columns: t, selectedDims: n, selectedMetrics: r, onDropColumn: i, onRemoveColumn: a, onChangeHelperFunction: o, onChangeAlias: s, functionOptions: u, dimModifiers: d, metricModifiers: f, chartSettings: p, dbName: h, partitionColumnList: g = aa, measuresPickerDefaultOpen: _, dimensionsPickerDefaultOpen: v, arithmeticColumnOptions: y = ia, onSaveArithMetricOption: b, className: x }) => {
|
|
2215
|
+
let [C, w] = X.useState(!1), [T, E] = X.useState(), D = r.length > 0 && !!b, ee = X.useMemo(() => [
|
|
2216
|
+
S,
|
|
2217
|
+
l,
|
|
2218
|
+
c,
|
|
2219
|
+
m
|
|
2220
|
+
].includes((h || "").toLowerCase()), [h]), te = X.useCallback((e) => (t, a) => {
|
|
2221
2221
|
let o = a.active?.data, s = o?.column, c = o?.table;
|
|
2222
2222
|
if (!s || !c) return;
|
|
2223
2223
|
let { sorting: l } = a, u = a.active?.identifier, d = e === "DIMENSION" ? ["dimensions", "aggregate_dimensions"].includes(u?.type || "") : ["metrics", "aggregate_metrics"].includes(u?.type || ""), f = () => i({
|
|
@@ -2291,7 +2291,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2291
2291
|
};
|
|
2292
2292
|
return /* @__PURE__ */ Q("div", {
|
|
2293
2293
|
...q("field-zones"),
|
|
2294
|
-
className: Y("flex w-full flex-col gap-2",
|
|
2294
|
+
className: Y("flex w-full flex-col gap-2", x),
|
|
2295
2295
|
children: [/* @__PURE__ */ Q("div", {
|
|
2296
2296
|
className: qi,
|
|
2297
2297
|
children: [
|
|
@@ -2336,17 +2336,17 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2336
2336
|
type: "METRIC",
|
|
2337
2337
|
zoneId: "measures",
|
|
2338
2338
|
index: t,
|
|
2339
|
-
functionOptions:
|
|
2339
|
+
functionOptions: u,
|
|
2340
2340
|
onChangeHelperFunction: o,
|
|
2341
|
-
onChangeAlias:
|
|
2341
|
+
onChangeAlias: s,
|
|
2342
2342
|
onRemove: () => a({
|
|
2343
2343
|
column: e,
|
|
2344
2344
|
type: "METRIC"
|
|
2345
2345
|
}),
|
|
2346
2346
|
isPartitionByColumnEnabled: ee,
|
|
2347
|
-
partitionColumnList:
|
|
2347
|
+
partitionColumnList: g,
|
|
2348
2348
|
selectedDims: n,
|
|
2349
|
-
dbName:
|
|
2349
|
+
dbName: h
|
|
2350
2350
|
}, e.uniqueId || e.alias)),
|
|
2351
2351
|
/* @__PURE__ */ Z(Ki, {
|
|
2352
2352
|
columns: t,
|
|
@@ -2356,7 +2356,7 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2356
2356
|
disabled: !se,
|
|
2357
2357
|
disabledReason: B.warning,
|
|
2358
2358
|
emptyLabel: le,
|
|
2359
|
-
defaultOpen:
|
|
2359
|
+
defaultOpen: _,
|
|
2360
2360
|
className: "ml-auto"
|
|
2361
2361
|
})
|
|
2362
2362
|
]
|
|
@@ -2377,12 +2377,12 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2377
2377
|
"aria-hidden": "true",
|
|
2378
2378
|
className: "size-3.5"
|
|
2379
2379
|
})
|
|
2380
|
-
}),
|
|
2380
|
+
}), b ? /* @__PURE__ */ Z(ae, { props: {
|
|
2381
2381
|
isDisabled: !D,
|
|
2382
2382
|
columnOptions: y,
|
|
2383
2383
|
isHovered: !1,
|
|
2384
2384
|
type: "METRIC",
|
|
2385
|
-
onSaveArithMetricOption:
|
|
2385
|
+
onSaveArithMetricOption: b,
|
|
2386
2386
|
customColumn: "METRIC",
|
|
2387
2387
|
isOpenCalculatedPanel: C,
|
|
2388
2388
|
setOpenCalculatedPanel: w,
|
|
@@ -2435,9 +2435,9 @@ var ri = ({ field: e }) => /* @__PURE__ */ Q("span", {
|
|
|
2435
2435
|
type: "DIMENSION",
|
|
2436
2436
|
zoneId: "dimensions",
|
|
2437
2437
|
index: t,
|
|
2438
|
-
functionOptions:
|
|
2438
|
+
functionOptions: u,
|
|
2439
2439
|
onChangeHelperFunction: o,
|
|
2440
|
-
onChangeAlias:
|
|
2440
|
+
onChangeAlias: s,
|
|
2441
2441
|
onRemove: () => a({
|
|
2442
2442
|
column: e,
|
|
2443
2443
|
type: "DIMENSION"
|
|
@@ -2694,25 +2694,25 @@ var ma = ({ rows: e, qaEntity: t }) => {
|
|
|
2694
2694
|
})]
|
|
2695
2695
|
}) : null]
|
|
2696
2696
|
});
|
|
2697
|
-
}, ha = X.lazy(async () => ({ default: (await import("./charts-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2697
|
+
}, ha = X.lazy(async () => ({ default: (await import("./charts-C2loGjFP.mjs").then((e) => e.t)).DbnChart })), ga = /* @__PURE__ */ new Set([
|
|
2698
|
+
_.table,
|
|
2699
|
+
_.trendAnalyzer,
|
|
2700
|
+
_.pivot,
|
|
2701
|
+
_.pivotV2,
|
|
2702
|
+
_.pivotV3,
|
|
2703
|
+
_.horizontalStackTable
|
|
2704
2704
|
]), _a = /* @__PURE__ */ new Set([
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2705
|
+
_.horizontalStackTable,
|
|
2706
|
+
_.pivot,
|
|
2707
|
+
_.treeMap,
|
|
2708
|
+
_.sankey,
|
|
2709
|
+
_.pivotV2,
|
|
2710
|
+
_.pivotV3
|
|
2711
2711
|
]);
|
|
2712
2712
|
function va(e) {
|
|
2713
2713
|
return !!e && ga.has(e);
|
|
2714
2714
|
}
|
|
2715
|
-
var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dimensions: a, metrics: o, isCustomTable: s, isDrillEnableGroupBy: c, drillLevel: l, onDrillLevelClick: u, onResetDrill: d, chartColors: f, chartAppearance: p, appearanceOptions: m, customMessages:
|
|
2715
|
+
var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dimensions: a, metrics: o, isCustomTable: s, isDrillEnableGroupBy: c, drillLevel: l, onDrillLevelClick: u, onResetDrill: d, chartColors: f, chartAppearance: p, appearanceOptions: m, customMessages: h, translationDictionary: g, selectedLanguage: _, noDataImg: v, onAddField: b, colorScheme: x = "light", onRetry: S, className: C, isActive: ee = !0 }) => {
|
|
2716
2716
|
let te = X.useMemo(() => Qn({
|
|
2717
2717
|
chartSettings: i,
|
|
2718
2718
|
dimensions: a,
|
|
@@ -2757,9 +2757,9 @@ var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dim
|
|
|
2757
2757
|
N,
|
|
2758
2758
|
P?.type
|
|
2759
2759
|
]), re = X.useMemo(() => va(i.chartType) ? void 0 : w(N), [i.chartType, N]), F = a.map((e) => e.label || e.alias || e.name), I = M && c && F.length > 0 && !_a.has(i.chartType), L = {
|
|
2760
|
-
customMessages:
|
|
2761
|
-
translationDictionary:
|
|
2762
|
-
selectedLanguage:
|
|
2760
|
+
customMessages: h,
|
|
2761
|
+
translationDictionary: g,
|
|
2762
|
+
selectedLanguage: _
|
|
2763
2763
|
}, ie = U("Build your first view", "empty", void 0, L), R;
|
|
2764
2764
|
if (n) R = /* @__PURE__ */ Z(sa, { children: /* @__PURE__ */ Z("div", {
|
|
2765
2765
|
className: "contents",
|
|
@@ -2790,7 +2790,7 @@ var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dim
|
|
|
2790
2790
|
type: P.type,
|
|
2791
2791
|
data: P.data,
|
|
2792
2792
|
appearance: ne,
|
|
2793
|
-
applyDensity:
|
|
2793
|
+
applyDensity: y(),
|
|
2794
2794
|
colorBy: P.colorBy,
|
|
2795
2795
|
valueFormatter: re,
|
|
2796
2796
|
chartColors: N.chartColors,
|
|
@@ -2820,7 +2820,7 @@ var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dim
|
|
|
2820
2820
|
headline: ie
|
|
2821
2821
|
}) }) : /* @__PURE__ */ Q(sa, { children: [/* @__PURE__ */ Z(W, {
|
|
2822
2822
|
className: "p-0",
|
|
2823
|
-
noDataImg:
|
|
2823
|
+
noDataImg: v,
|
|
2824
2824
|
...L
|
|
2825
2825
|
}), /* @__PURE__ */ Z(la, {})] });
|
|
2826
2826
|
return /* @__PURE__ */ Z("div", {
|
|
@@ -2868,7 +2868,7 @@ var ya = ({ data: e, isLoading: t, error: n, errorView: r, chartSettings: i, dim
|
|
|
2868
2868
|
//#region src/v2/surfaces/CreateMetric/PreviewTable.tsx
|
|
2869
2869
|
function xa(e) {
|
|
2870
2870
|
if (!e) return "Chart type";
|
|
2871
|
-
for (let t of
|
|
2871
|
+
for (let t of g) for (let n of t.value) if (String(n.name).toLowerCase() === String(e).toLowerCase()) return n.label;
|
|
2872
2872
|
return String(e).replace(/\b\w/g, (e) => e.toUpperCase());
|
|
2873
2873
|
}
|
|
2874
2874
|
var Sa = (e) => {
|
|
@@ -3023,7 +3023,7 @@ function Ea(e, t) {
|
|
|
3023
3023
|
return e ? t ? "configure-fields" : "ready-to-save" : "select-table";
|
|
3024
3024
|
}
|
|
3025
3025
|
var Da = (e) => {
|
|
3026
|
-
let { clientId: i, companyId: a, isLiveMode:
|
|
3026
|
+
let { clientId: i, companyId: a, isLiveMode: o, externalDashboardId: s, userProvidedDashboardId: c, chartColors: l, colorPalettes: u, setShowMetricCreateModal: f, isShowMetricCreateModal: p, metric: m, metricData: h, workspaceId: g, token: v, clientColumnType: y, tenancyType: x, datasourceId: S, setEditMetric: C, shouldFitFullScreen: w, onServerEvent: T, refetchDashboardData: E, saveDashLayout: D, isIncrementalJoin: ee, customChartSettings: O, showAllChartSettings: k, showChartClickSettings: j, allowedChartTypes: M, filters: re } = e, F = X.useRef(!1), I = X.useRef(null), L = X.useCallback((e) => {
|
|
3027
3027
|
if (e === !1 && F.current) {
|
|
3028
3028
|
let e = I.current == null ? 0 : Math.round(performance.now() - I.current);
|
|
3029
3029
|
yr(wa, vr.CREATE_METRIC_SAVED, {
|
|
@@ -3031,22 +3031,22 @@ var Da = (e) => {
|
|
|
3031
3031
|
latencyMs: e
|
|
3032
3032
|
}), F.current = !1, I.current = null;
|
|
3033
3033
|
}
|
|
3034
|
-
|
|
3035
|
-
}, [
|
|
3034
|
+
f(e);
|
|
3035
|
+
}, [f]), { metricConfig: ie, dataset: R } = xr({
|
|
3036
3036
|
clientId: i,
|
|
3037
3037
|
companyId: a,
|
|
3038
|
-
isLiveMode:
|
|
3039
|
-
externalDashboardId:
|
|
3040
|
-
userProvidedDashboardId:
|
|
3041
|
-
chartColors:
|
|
3042
|
-
colorPalettes:
|
|
3043
|
-
isShowMetricCreateModal:
|
|
3038
|
+
isLiveMode: o,
|
|
3039
|
+
externalDashboardId: s,
|
|
3040
|
+
userProvidedDashboardId: c,
|
|
3041
|
+
chartColors: l,
|
|
3042
|
+
colorPalettes: u,
|
|
3043
|
+
isShowMetricCreateModal: p,
|
|
3044
3044
|
setShowMetricCreateModal: L,
|
|
3045
|
-
metric:
|
|
3046
|
-
metricData:
|
|
3047
|
-
workspaceId:
|
|
3045
|
+
metric: m,
|
|
3046
|
+
metricData: h,
|
|
3047
|
+
workspaceId: g,
|
|
3048
3048
|
token: v,
|
|
3049
|
-
clientColumnType:
|
|
3049
|
+
clientColumnType: y,
|
|
3050
3050
|
tenancyType: x,
|
|
3051
3051
|
datasourceId: S,
|
|
3052
3052
|
setEditMetric: C,
|
|
@@ -3059,13 +3059,13 @@ var Da = (e) => {
|
|
|
3059
3059
|
showAllChartSettings: k,
|
|
3060
3060
|
allowedChartTypes: M,
|
|
3061
3061
|
filters: re
|
|
3062
|
-
}), { isLoading: ae, chartSettings: z, setShowSaveMetricModal: oe, data: B, error: V, setShowChartCustomProperties: se, isShowChartType: ce, setShowChartType: le, isShowSaveMetricModal: ue, updateExternalMetric: de, createExternalMetric: fe, saveError: pe, setChartSettings: me, isShowChartCustomProperties: he, setBarRadius: ge, isShowSortPanel: _e, setShowSortPanel: ve, isShowFilters: H, setShowFilters: ye, isCreatingMetric: be, enabledCharts: xe, setResetPallete: Se, dbName: Ce, drillDownSettings: we, limit: Te, setLimit: Ee, clickBehaviourConfigs: De, setClickBehaviourConfigs: Oe } = ie, { currentSelectedTable: ke, joinTableOption: Ae, setCurrentSelectedTable: je, configuration: Me, functionOptions: Ne, companySubsetTableList: Pe, selectedMainTable: U, setSelectedMainTable: Fe, selectedDims: W, selectedMetrics: G, onDropColumn: Ie, dimModifiers: Le, metricModifiers: Re, onChangeAlias: ze, onChangeHelperFunction: Be, onRemoveColumn: Ve, selectedTable: He, createdSorts: Ue, setCreatedSorts: K, filterColumnOptions: We, onApplyFilter: Ge, onApplySort: Ke, sortColumnOptions: qe, setCreatedFilters: Je, createdFilters: Ye, editorRef: Xe, getFilterDropDownType: Ze, setChartFields: Qe, resetCharSettings: q, onSelectPivotTable: J, onChangeDrillDown: $e, drillFilters: et, selectedJoinColumnOptions: tt, onChangeLimit: rt, onChangeChartType: it, arithmeticColumnOptions: at, onSaveArithMetricOption: ot, builderError: st } = R, ct = X.useMemo(() =>
|
|
3062
|
+
}), { isLoading: ae, chartSettings: z, setShowSaveMetricModal: oe, data: B, error: V, setShowChartCustomProperties: se, isShowChartType: ce, setShowChartType: le, isShowSaveMetricModal: ue, updateExternalMetric: de, createExternalMetric: fe, saveError: pe, setChartSettings: me, isShowChartCustomProperties: he, setBarRadius: ge, isShowSortPanel: _e, setShowSortPanel: ve, isShowFilters: H, setShowFilters: ye, isCreatingMetric: be, enabledCharts: xe, setResetPallete: Se, dbName: Ce, drillDownSettings: we, limit: Te, setLimit: Ee, clickBehaviourConfigs: De, setClickBehaviourConfigs: Oe } = ie, { currentSelectedTable: ke, joinTableOption: Ae, setCurrentSelectedTable: je, configuration: Me, functionOptions: Ne, companySubsetTableList: Pe, selectedMainTable: U, setSelectedMainTable: Fe, selectedDims: W, selectedMetrics: G, onDropColumn: Ie, dimModifiers: Le, metricModifiers: Re, onChangeAlias: ze, onChangeHelperFunction: Be, onRemoveColumn: Ve, selectedTable: He, createdSorts: Ue, setCreatedSorts: K, filterColumnOptions: We, onApplyFilter: Ge, onApplySort: Ke, sortColumnOptions: qe, setCreatedFilters: Je, createdFilters: Ye, editorRef: Xe, getFilterDropDownType: Ze, setChartFields: Qe, resetCharSettings: q, onSelectPivotTable: J, onChangeDrillDown: $e, drillFilters: et, selectedJoinColumnOptions: tt, onChangeLimit: rt, onChangeChartType: it, arithmeticColumnOptions: at, onSaveArithMetricOption: ot, builderError: st } = R, ct = X.useMemo(() => u ? u.some((e) => te(e.colors, l)) ? u : [{
|
|
3063
3063
|
name: "Default",
|
|
3064
|
-
colors:
|
|
3065
|
-
}, ...
|
|
3064
|
+
colors: l ?? []
|
|
3065
|
+
}, ...u] : [{
|
|
3066
3066
|
name: "Default",
|
|
3067
|
-
colors:
|
|
3068
|
-
}], [
|
|
3067
|
+
colors: l ?? []
|
|
3068
|
+
}], [l, u]), lt = X.useMemo(() => !!Me.filters.some((e) => e.type !== "client"), [Me.filters]), ut = X.useMemo(() => Qn({
|
|
3069
3069
|
chartSettings: z,
|
|
3070
3070
|
dimensions: W,
|
|
3071
3071
|
metrics: G,
|
|
@@ -3075,34 +3075,34 @@ var Da = (e) => {
|
|
|
3075
3075
|
W,
|
|
3076
3076
|
G
|
|
3077
3077
|
]), dt = X.useCallback((e) => {
|
|
3078
|
-
e ===
|
|
3078
|
+
e === _.pivotV2 ? (q(e), J(e, [])) : e === _.table ? Qe({
|
|
3079
3079
|
chartType: e,
|
|
3080
3080
|
seriesName: "",
|
|
3081
3081
|
isRemoveGroupBy: !0
|
|
3082
3082
|
}) : [
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3083
|
+
_.line,
|
|
3084
|
+
_.bar,
|
|
3085
|
+
_.stack,
|
|
3086
|
+
_.row,
|
|
3087
|
+
_.horizontalStack
|
|
3088
3088
|
].includes(e) && W.length === 2 && G.length === 1 ? it(e) : Qe({ chartType: e });
|
|
3089
3089
|
let t = [
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3090
|
+
_.singleValue,
|
|
3091
|
+
_.gaugeV2,
|
|
3092
|
+
_.progressBarV2,
|
|
3093
|
+
_.funnelV2,
|
|
3094
|
+
_.waterfall,
|
|
3095
|
+
_.treeMap
|
|
3096
3096
|
].includes(e) && G.length > 1 || [
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
].includes(e) && !!W.length, r = ![
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3097
|
+
_.rose,
|
|
3098
|
+
_.pie,
|
|
3099
|
+
_.doughnut
|
|
3100
|
+
].includes(e) && !!W.length, r = ![_.table, _.pivotV2].includes(e) && !([
|
|
3101
|
+
_.line,
|
|
3102
|
+
_.bar,
|
|
3103
|
+
_.stack,
|
|
3104
|
+
_.row,
|
|
3105
|
+
_.horizontalStack
|
|
3106
3106
|
].includes(e) && W.length === 2 && G.length === 1) && W.length > 1;
|
|
3107
3107
|
(t || r) && it(e), le(!1), T?.(n, e.toUpperCase().replaceAll(" ", "_"));
|
|
3108
3108
|
}, [
|
|
@@ -3119,9 +3119,9 @@ var Da = (e) => {
|
|
|
3119
3119
|
}, [Fe, T]), pt = X.useCallback(() => {
|
|
3120
3120
|
T?.(r);
|
|
3121
3121
|
}, [T]), mt = X.useCallback((e, t) => {
|
|
3122
|
-
F.current = !0, I.current = performance.now(),
|
|
3122
|
+
F.current = !0, I.current = performance.now(), m ? de(e, t) : fe(e);
|
|
3123
3123
|
}, [
|
|
3124
|
-
|
|
3124
|
+
m,
|
|
3125
3125
|
de,
|
|
3126
3126
|
fe
|
|
3127
3127
|
]);
|
|
@@ -3142,9 +3142,9 @@ var Da = (e) => {
|
|
|
3142
3142
|
ut,
|
|
3143
3143
|
L,
|
|
3144
3144
|
C
|
|
3145
|
-
]), gt = d(), _t = X.useMemo(() => ne(gt.data), [gt.data]), vt = gt.data ?
|
|
3146
|
-
if (!
|
|
3147
|
-
let yt = !!B, bt = !!(W.length || G.length), xt = z.chartColors?.length ? z.chartColors :
|
|
3145
|
+
]), gt = d(), _t = X.useMemo(() => ne(gt.data), [gt.data]), vt = gt.data ? m ? _t.canEditMetric : _t.canCreateMetric : !0;
|
|
3146
|
+
if (!p || !vt) return null;
|
|
3147
|
+
let yt = !!B, bt = !!(W.length || G.length), xt = z.chartColors?.length ? z.chartColors : l;
|
|
3148
3148
|
return /* @__PURE__ */ Q(nt, { children: [/* @__PURE__ */ Q("div", {
|
|
3149
3149
|
...Ca,
|
|
3150
3150
|
style: { display: "contents" },
|
|
@@ -3153,7 +3153,7 @@ var Da = (e) => {
|
|
|
3153
3153
|
"data-slot": "create-metric-shell",
|
|
3154
3154
|
className: Y(w ? "absolute" : "fixed", "inset-0 z-(--dbn-zIndex-overlay,9999) flex flex-col overflow-hidden bg-(--background) text-(--foreground)"),
|
|
3155
3155
|
children: [/* @__PURE__ */ Z(ci, {
|
|
3156
|
-
title:
|
|
3156
|
+
title: m ? "Update Metric" : "Create Metric",
|
|
3157
3157
|
onBack: ht,
|
|
3158
3158
|
onSave: () => oe(!0),
|
|
3159
3159
|
isLoading: ae,
|
|
@@ -3162,8 +3162,8 @@ var Da = (e) => {
|
|
|
3162
3162
|
metrics: G,
|
|
3163
3163
|
isCustomTable: Ta,
|
|
3164
3164
|
rows: B,
|
|
3165
|
-
metricName:
|
|
3166
|
-
isSaved: !!
|
|
3165
|
+
metricName: m?.name,
|
|
3166
|
+
isSaved: !!m
|
|
3167
3167
|
}), /* @__PURE__ */ Q("div", {
|
|
3168
3168
|
className: "flex min-h-0 w-full flex-1",
|
|
3169
3169
|
children: [/* @__PURE__ */ Z(ki, {
|
|
@@ -3211,7 +3211,7 @@ var Da = (e) => {
|
|
|
3211
3211
|
filtersPanelProps: {
|
|
3212
3212
|
token: v,
|
|
3213
3213
|
globalFilters: re,
|
|
3214
|
-
clientColumnType:
|
|
3214
|
+
clientColumnType: y,
|
|
3215
3215
|
clientId: i,
|
|
3216
3216
|
joinTableOption: Ae,
|
|
3217
3217
|
setCurrentSelectedTable: je,
|
|
@@ -3225,7 +3225,7 @@ var Da = (e) => {
|
|
|
3225
3225
|
columnOptions: We,
|
|
3226
3226
|
getFilterDropDownType: Ze,
|
|
3227
3227
|
editorRef: Xe,
|
|
3228
|
-
workspaceId:
|
|
3228
|
+
workspaceId: g,
|
|
3229
3229
|
onApplyFilter: Ge,
|
|
3230
3230
|
savedFilterListOptions: [],
|
|
3231
3231
|
currentSelectedTable: ke
|
|
@@ -3296,7 +3296,7 @@ var Da = (e) => {
|
|
|
3296
3296
|
})]
|
|
3297
3297
|
})]
|
|
3298
3298
|
})]
|
|
3299
|
-
}), /* @__PURE__ */ Z(
|
|
3299
|
+
}), /* @__PURE__ */ Z(b, {
|
|
3300
3300
|
isOpen: ue,
|
|
3301
3301
|
onClose: () => oe(!1),
|
|
3302
3302
|
headerTitle: "Save To Dashboard",
|
|
@@ -3304,11 +3304,11 @@ var Da = (e) => {
|
|
|
3304
3304
|
onCancel: () => oe(!1),
|
|
3305
3305
|
onSubmit: mt,
|
|
3306
3306
|
error: pe,
|
|
3307
|
-
defaultValues:
|
|
3308
|
-
name:
|
|
3309
|
-
description:
|
|
3310
|
-
isLive:
|
|
3311
|
-
metricId:
|
|
3307
|
+
defaultValues: m ? {
|
|
3308
|
+
name: m.name,
|
|
3309
|
+
description: m.description,
|
|
3310
|
+
isLive: m.isLive,
|
|
3311
|
+
metricId: m.isCreatedByClient ? m.metricId : `update_${m.metricId}_by_${i}_${Date.now()}`
|
|
3312
3312
|
} : void 0,
|
|
3313
3313
|
isCreatingMetric: be
|
|
3314
3314
|
})
|