drizzle-cube 0.4.22 → 0.4.24
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/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +2 -2
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +2 -2
- package/dist/adapters/{handler-9Rdn7zM2.js → handler-BV2_dul8.js} +2 -2
- package/dist/adapters/{handler-B-tEntiU.cjs → handler-LMRPeTNJ.cjs} +2 -2
- package/dist/adapters/hono/index.cjs +6 -6
- package/dist/adapters/hono/index.d.ts +13 -6
- package/dist/adapters/hono/index.js +65 -65
- package/dist/{server/index-CFEJ62GJ.js → adapters/index-C3PskWTr.js} +209 -193
- package/dist/{server/index-BIMhF5KZ.cjs → adapters/index-ht4NPca9.cjs} +11 -11
- package/dist/adapters/{mcp-transport-m1X1GtwG.js → mcp-transport-B6ZudTSk.js} +7 -0
- package/dist/adapters/{mcp-transport-8u9G5oNa.cjs → mcp-transport-DCiSGtp1.cjs} +1 -1
- package/dist/adapters/nextjs/index.cjs +2 -2
- package/dist/adapters/nextjs/index.js +2 -2
- package/dist/adapters/{openai-mLo2MCat.cjs → openai-BvA6eLs8.cjs} +1 -1
- package/dist/adapters/{openai-CUSRuKTk.js → openai-mcE24du8.js} +1 -1
- package/dist/client/chunks/{analysis-builder-DVrv9Q4n.js → analysis-builder-KeTsXp1G.js} +141 -141
- package/dist/client/chunks/{analysis-builder-DVrv9Q4n.js.map → analysis-builder-KeTsXp1G.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-CrENEvEk.js → analysis-builder-shared-KSvGUzx6.js} +2 -2
- package/dist/client/chunks/{analysis-builder-shared-CrENEvEk.js.map → analysis-builder-shared-KSvGUzx6.js.map} +1 -1
- package/dist/client/chunks/{components-GzooQM5J.js → components-Dz6XHgnZ.js} +49 -49
- package/dist/client/chunks/{components-GzooQM5J.js.map → components-Dz6XHgnZ.js.map} +1 -1
- package/dist/client/components/AgenticNotebook/NotebookCanvas.d.ts +4 -1
- package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +2 -0
- package/dist/client/components.js +3 -3
- package/dist/client/index.js +678 -672
- package/dist/client/index.js.map +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/{adapters/index-CFEJ62GJ.js → server/index-C3PskWTr.js} +209 -193
- package/dist/{adapters/index-BIMhF5KZ.cjs → server/index-ht4NPca9.cjs} +11 -11
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +8 -1
- package/dist/server/{openai-mLo2MCat.cjs → openai-BvA6eLs8.cjs} +1 -1
- package/dist/server/{openai-CUSRuKTk.js → openai-mcE24du8.js} +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e, Fragment as ie } from "react/jsx-runtime";
|
|
2
2
|
import { useState as _, useCallback as F, memo as me, useEffect as Y, useRef as Z, useMemo as z, Component as xd, forwardRef as Qc, useImperativeHandle as gd } from "react";
|
|
3
3
|
import { u as bd, g as yd } from "./providers-CCw8Kjlc.js";
|
|
4
|
-
import { F as vd, E as ac, C as Ct, D as Nd, G as wd, q as Cd, H as Sd, u as Dd, I as kd } from "./analysis-builder-shared-
|
|
5
|
-
import {
|
|
4
|
+
import { F as vd, E as ac, C as Ct, D as Nd, G as wd, q as Cd, H as Sd, u as Dd, I as kd } from "./analysis-builder-shared-KSvGUzx6.js";
|
|
5
|
+
import { a1 as Wt, a2 as Td, i as Ad, a6 as $d, a0 as Ce, a7 as Gc, a8 as _c, a9 as Hc, aa as Id, ab as St } from "./components-Dz6XHgnZ.js";
|
|
6
6
|
import { i as Rd, L as ic } from "./charts-loader-DbrwgvCK.js";
|
|
7
7
|
import { c as mt, e as Fd } from "./useExplainAI-IiW55BaQ.js";
|
|
8
|
-
import { a as
|
|
8
|
+
import { a as A, g as nc, b as oc } from "./icons-DFJw-2HU.js";
|
|
9
9
|
import { S as ue } from "./charts-core-B4Rbfdcn.js";
|
|
10
10
|
import { q as Ed, r as Od, t as Ld, D as Ut, w as ht, o as Ve, F as Kc } from "./useDirtyStateTracking-CjhwBXRw.js";
|
|
11
11
|
import { barChartConfig as Bd } from "./chart-config-bar-C8uzktxl.js";
|
|
@@ -55,7 +55,7 @@ function hn(r) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
const fn = ({ analysis: r }) => {
|
|
58
|
-
const d =
|
|
58
|
+
const d = A("info"), i = A("chevronRight"), s = A("warning"), m = A("table"), n = A("link"), x = A("success"), b = A("error"), o = [
|
|
59
59
|
{
|
|
60
60
|
label: "Type",
|
|
61
61
|
value: ft(r.querySummary.queryType)
|
|
@@ -305,7 +305,7 @@ function bn({
|
|
|
305
305
|
getFullConfig: k,
|
|
306
306
|
loadFullConfig: R
|
|
307
307
|
}) {
|
|
308
|
-
const [
|
|
308
|
+
const [$, B] = _({
|
|
309
309
|
isOpen: !1,
|
|
310
310
|
userPrompt: "",
|
|
311
311
|
isGenerating: !1,
|
|
@@ -343,13 +343,13 @@ function bn({
|
|
|
343
343
|
}, []), f = F((p) => {
|
|
344
344
|
B((L) => ({ ...L, userPrompt: p }));
|
|
345
345
|
}, []), y = F(async () => {
|
|
346
|
-
if (
|
|
346
|
+
if ($.userPrompt.trim()) {
|
|
347
347
|
B((p) => ({ ...p, isGenerating: !0, error: null }));
|
|
348
348
|
try {
|
|
349
349
|
const p = await pn(
|
|
350
350
|
"",
|
|
351
351
|
// API key not needed for server-side AI
|
|
352
|
-
|
|
352
|
+
$.userPrompt,
|
|
353
353
|
g
|
|
354
354
|
), L = xn(p), P = JSON.parse(L), S = "query" in P && P.query ? P.query : P, v = "chartType" in P ? P.chartType : void 0, T = "chartConfig" in P ? P.chartConfig : void 0;
|
|
355
355
|
if (gn(S))
|
|
@@ -397,7 +397,7 @@ function bn({
|
|
|
397
397
|
}));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
}, [
|
|
400
|
+
}, [$.userPrompt, g, d, s, o, n, l, c, h, N]), w = F(() => {
|
|
401
401
|
B({
|
|
402
402
|
isOpen: !1,
|
|
403
403
|
userPrompt: "",
|
|
@@ -408,12 +408,12 @@ function bn({
|
|
|
408
408
|
previousConfig: null
|
|
409
409
|
});
|
|
410
410
|
}, []), D = F(() => {
|
|
411
|
-
|
|
411
|
+
$.previousConfig && R ? R($.previousConfig) : $.previousState && (d((p) => ({
|
|
412
412
|
...p,
|
|
413
|
-
metrics:
|
|
414
|
-
breakdowns:
|
|
415
|
-
filters:
|
|
416
|
-
})), s(
|
|
413
|
+
metrics: $.previousState.metrics,
|
|
414
|
+
breakdowns: $.previousState.breakdowns,
|
|
415
|
+
filters: $.previousState.filters
|
|
416
|
+
})), s($.previousState.chartType), n($.previousState.chartConfig), b($.previousState.displayConfig), h && $.previousState.analysisType && h($.previousState.analysisType)), B({
|
|
417
417
|
isOpen: !1,
|
|
418
418
|
userPrompt: "",
|
|
419
419
|
isGenerating: !1,
|
|
@@ -422,9 +422,9 @@ function bn({
|
|
|
422
422
|
previousState: null,
|
|
423
423
|
previousConfig: null
|
|
424
424
|
});
|
|
425
|
-
}, [
|
|
425
|
+
}, [$.previousState, $.previousConfig, d, s, n, b, h, R]);
|
|
426
426
|
return {
|
|
427
|
-
aiState:
|
|
427
|
+
aiState: $,
|
|
428
428
|
handleOpenAI: u,
|
|
429
429
|
handleCloseAI: a,
|
|
430
430
|
handleAIPromptChange: f,
|
|
@@ -528,7 +528,7 @@ const Nn = me(function({
|
|
|
528
528
|
funnelExecutedQueries: N,
|
|
529
529
|
activeView: k = "chart",
|
|
530
530
|
onActiveViewChange: R,
|
|
531
|
-
displayLimit:
|
|
531
|
+
displayLimit: $ = 100,
|
|
532
532
|
onDisplayLimitChange: B,
|
|
533
533
|
hasMetrics: u = !1,
|
|
534
534
|
// Debug props - per-query for multi-query mode
|
|
@@ -572,7 +572,7 @@ const Nn = me(function({
|
|
|
572
572
|
// Query warnings from server
|
|
573
573
|
warnings: we
|
|
574
574
|
}) {
|
|
575
|
-
const ae = ee === "funnel" || pe, fe = ee === "flow", he = ee === "retention", [ge, Ie] = _(!1), [be,
|
|
575
|
+
const ae = ee === "funnel" || pe, fe = ee === "flow", he = ee === "retention", [ge, Ie] = _(!1), [be, $e] = _(0), [Re, Se] = _(!1), [Ye, Pe] = _(!1), [O, Q] = _(!1), [J, ce] = _("idle");
|
|
576
576
|
Y(() => {
|
|
577
577
|
const C = (H) => {
|
|
578
578
|
H.key === "Shift" && Pe(!0);
|
|
@@ -585,7 +585,7 @@ const Nn = me(function({
|
|
|
585
585
|
}, []);
|
|
586
586
|
const xe = Ye && O;
|
|
587
587
|
Y(() => {
|
|
588
|
-
a.length > 0 && be >= a.length &&
|
|
588
|
+
a.length > 0 && be >= a.length && $e(a.length - 1);
|
|
589
589
|
}, [a.length, be]);
|
|
590
590
|
const De = a[be] || {
|
|
591
591
|
sql: null,
|
|
@@ -603,12 +603,12 @@ const Nn = me(function({
|
|
|
603
603
|
isLoading: Ue,
|
|
604
604
|
hasRun: kt,
|
|
605
605
|
error: Tt,
|
|
606
|
-
runExplain:
|
|
606
|
+
runExplain: At,
|
|
607
607
|
clearExplain: Xe
|
|
608
608
|
} = mt(ye, {
|
|
609
609
|
skip: ae || fe || he || !ye
|
|
610
610
|
}), {
|
|
611
|
-
explainResult:
|
|
611
|
+
explainResult: $t,
|
|
612
612
|
isLoading: It,
|
|
613
613
|
hasRun: Rt,
|
|
614
614
|
error: Ft,
|
|
@@ -664,7 +664,7 @@ const Nn = me(function({
|
|
|
664
664
|
...h[0],
|
|
665
665
|
measures: C
|
|
666
666
|
};
|
|
667
|
-
}, [h]), Fe =
|
|
667
|
+
}, [h]), Fe = A("success"), at = A("error"), Qe = A("warning"), Ae = A("table"), Ge = A("measure"), it = A("codeBracket"), Ht = A("share"), _e = A("check"), ot = A("delete"), V = A("sparkles"), ne = A("arrowPath"), He = () => /* @__PURE__ */ e("div", { className: "dc:h-full dc:flex dc:items-center dc:justify-center", children: /* @__PURE__ */ t("div", { className: "dc:text-center", children: [
|
|
668
668
|
/* @__PURE__ */ e(
|
|
669
669
|
"div",
|
|
670
670
|
{
|
|
@@ -852,7 +852,7 @@ const Nn = me(function({
|
|
|
852
852
|
/* @__PURE__ */ e("div", { className: "dc:flex dc:border border-dc-border dc:rounded-md dc:overflow-hidden", children: a.map((C, K) => /* @__PURE__ */ t(
|
|
853
853
|
"button",
|
|
854
854
|
{
|
|
855
|
-
onClick: () =>
|
|
855
|
+
onClick: () => $e(K),
|
|
856
856
|
className: `dc:px-3 dc:py-1 dc:text-xs dc:font-medium dc:transition-colors dc:border-r dc:last:border-r-0 border-dc-border ${be === K ? "bg-dc-accent text-white" : "bg-dc-bg text-dc-text-secondary hover:bg-dc-bg-secondary"}`,
|
|
857
857
|
children: [
|
|
858
858
|
"Q",
|
|
@@ -915,7 +915,7 @@ const Nn = me(function({
|
|
|
915
915
|
explainLoading: Ue,
|
|
916
916
|
explainHasRun: kt,
|
|
917
917
|
explainError: Tt,
|
|
918
|
-
runExplain:
|
|
918
|
+
runExplain: At,
|
|
919
919
|
aiAnalysis: tt,
|
|
920
920
|
aiAnalysisLoading: ct,
|
|
921
921
|
aiAnalysisError: dt,
|
|
@@ -981,7 +981,7 @@ const Nn = me(function({
|
|
|
981
981
|
] }),
|
|
982
982
|
debugData: I,
|
|
983
983
|
sqlPlaceholder: "Configure funnel binding key to generate SQL",
|
|
984
|
-
explainResult:
|
|
984
|
+
explainResult: $t,
|
|
985
985
|
explainLoading: It,
|
|
986
986
|
explainHasRun: Rt,
|
|
987
987
|
explainError: Ft,
|
|
@@ -1116,7 +1116,7 @@ const Nn = me(function({
|
|
|
1116
1116
|
let C = [], K = [];
|
|
1117
1117
|
if (!i || Array.isArray(i) && i.length === 0)
|
|
1118
1118
|
return /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted", children: /* @__PURE__ */ t("div", { className: "dc:text-center", children: [
|
|
1119
|
-
/* @__PURE__ */ e(
|
|
1119
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1120
1120
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No flow data to display" }),
|
|
1121
1121
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Configure flow analysis to see results" })
|
|
1122
1122
|
] }) });
|
|
@@ -1125,7 +1125,7 @@ const Nn = me(function({
|
|
|
1125
1125
|
H && "nodes" in H && "links" in H ? (C = H.nodes || [], K = H.links || []) : "record_type" in H && (C = i.filter((se) => se.record_type === "node"), K = i.filter((se) => se.record_type === "link"));
|
|
1126
1126
|
}
|
|
1127
1127
|
return C.length === 0 && K.length === 0 ? /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted", children: /* @__PURE__ */ t("div", { className: "dc:text-center", children: [
|
|
1128
|
-
/* @__PURE__ */ e(
|
|
1128
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1129
1129
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No flow data to display" }),
|
|
1130
1130
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Configure flow analysis to see results" })
|
|
1131
1131
|
] }) }) : /* @__PURE__ */ t("div", { className: "dc:h-full dc:overflow-auto dc:p-4 dc:space-y-6", children: [
|
|
@@ -1177,11 +1177,11 @@ const Nn = me(function({
|
|
|
1177
1177
|
let K, H = h?.[0];
|
|
1178
1178
|
if (lt && C !== void 0 && C >= 0 && q ? (K = q[C] || null, H = h?.[C]) : (K = i, lt && (H = ve)), !K || K.length === 0)
|
|
1179
1179
|
return /* @__PURE__ */ e("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted", children: /* @__PURE__ */ t("div", { className: "dc:text-center", children: [
|
|
1180
|
-
/* @__PURE__ */ e(
|
|
1180
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1181
1181
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No data to display" }),
|
|
1182
1182
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Run a query to see table data" })
|
|
1183
1183
|
] }) });
|
|
1184
|
-
const se = K.slice(0,
|
|
1184
|
+
const se = K.slice(0, $);
|
|
1185
1185
|
return /* @__PURE__ */ e(
|
|
1186
1186
|
ic,
|
|
1187
1187
|
{
|
|
@@ -1229,7 +1229,7 @@ const Nn = me(function({
|
|
|
1229
1229
|
C && k === "table" && !ge && B && /* @__PURE__ */ t(
|
|
1230
1230
|
"select",
|
|
1231
1231
|
{
|
|
1232
|
-
value:
|
|
1232
|
+
value: $,
|
|
1233
1233
|
onChange: (K) => B(Number(K.target.value)),
|
|
1234
1234
|
className: "dc:text-xs dc:border border-dc-border dc:rounded dc:px-2 dc:py-1 bg-dc-surface text-dc-text dc:focus:outline-none dc:focus:ring-1 focus:ring-dc-primary",
|
|
1235
1235
|
children: [
|
|
@@ -1253,7 +1253,7 @@ const Nn = me(function({
|
|
|
1253
1253
|
}
|
|
1254
1254
|
),
|
|
1255
1255
|
c && C && /* @__PURE__ */ e(
|
|
1256
|
-
|
|
1256
|
+
$d,
|
|
1257
1257
|
{
|
|
1258
1258
|
currentPalette: g || "default",
|
|
1259
1259
|
onPaletteChange: c
|
|
@@ -1344,7 +1344,7 @@ const Nn = me(function({
|
|
|
1344
1344
|
}
|
|
1345
1345
|
)
|
|
1346
1346
|
] }), md = () => !we || we.length === 0 ? null : /* @__PURE__ */ e(ie, { children: we.map((C, K) => {
|
|
1347
|
-
const H =
|
|
1347
|
+
const H = A("warning"), se = C.severity === "error", Oe = se ? "bg-dc-danger-bg" : "bg-dc-warning-bg", ut = se ? "border-dc-error" : "border-dc-warning", Ke = se ? "text-dc-error" : "text-dc-warning";
|
|
1348
1348
|
return /* @__PURE__ */ t(
|
|
1349
1349
|
"div",
|
|
1350
1350
|
{
|
|
@@ -1391,7 +1391,7 @@ const Nn = me(function({
|
|
|
1391
1391
|
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${k === "table" && U === H ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1392
1392
|
title: `Table Q${H + 1}`,
|
|
1393
1393
|
children: [
|
|
1394
|
-
/* @__PURE__ */ e(
|
|
1394
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-4 dc:h-4" }),
|
|
1395
1395
|
"Q",
|
|
1396
1396
|
H + 1
|
|
1397
1397
|
]
|
|
@@ -1407,7 +1407,7 @@ const Nn = me(function({
|
|
|
1407
1407
|
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${k === "table" && U === -1 ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1408
1408
|
title: "Merged table view",
|
|
1409
1409
|
children: [
|
|
1410
|
-
/* @__PURE__ */ e(
|
|
1410
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-4 dc:h-4" }),
|
|
1411
1411
|
"Merged"
|
|
1412
1412
|
]
|
|
1413
1413
|
}
|
|
@@ -1419,7 +1419,7 @@ const Nn = me(function({
|
|
|
1419
1419
|
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-4 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${k === "table" ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1420
1420
|
title: "Table view",
|
|
1421
1421
|
children: [
|
|
1422
|
-
/* @__PURE__ */ e(
|
|
1422
|
+
/* @__PURE__ */ e(Ae, { className: "dc:w-4 dc:h-4" }),
|
|
1423
1423
|
"Table"
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
@@ -1449,7 +1449,7 @@ const Nn = me(function({
|
|
|
1449
1449
|
(d === "success" || fd) && hd(),
|
|
1450
1450
|
(d === "loading" || d === "refreshing") && Ee && ld(),
|
|
1451
1451
|
S && /* @__PURE__ */ e(
|
|
1452
|
-
|
|
1452
|
+
Ad,
|
|
1453
1453
|
{
|
|
1454
1454
|
isOpen: Re,
|
|
1455
1455
|
onClose: () => Se(!1),
|
|
@@ -1475,7 +1475,7 @@ const Nn = me(function({
|
|
|
1475
1475
|
onDragStart: l,
|
|
1476
1476
|
onDragEnd: g
|
|
1477
1477
|
}) {
|
|
1478
|
-
const c =
|
|
1478
|
+
const c = A("close"), h = A("chevronUp"), N = A("chevronDown"), k = A("chevronUpDown"), R = i?.type || "count", $ = nc(R) || A("measure"), B = i?.shortTitle || i?.title || d.field.split(".").pop() || d.field, u = d.field.split(".")[0], a = () => {
|
|
1479
1479
|
switch (m) {
|
|
1480
1480
|
case "asc":
|
|
1481
1481
|
return h ? /* @__PURE__ */ e(h, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -1502,7 +1502,7 @@ const Nn = me(function({
|
|
|
1502
1502
|
onDragStart: y ? (w) => l(w, b) : void 0,
|
|
1503
1503
|
onDragEnd: y ? g : void 0,
|
|
1504
1504
|
children: [
|
|
1505
|
-
/* @__PURE__ */ e("span", { className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-measure text-dc-measure-text dc:flex-shrink-0", children:
|
|
1505
|
+
/* @__PURE__ */ e("span", { className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-measure text-dc-measure-text dc:flex-shrink-0", children: $ && /* @__PURE__ */ e($, { className: "dc:w-4 dc:h-4" }) }),
|
|
1506
1506
|
/* @__PURE__ */ t("div", { className: "dc:flex-1 dc:min-w-0", children: [
|
|
1507
1507
|
/* @__PURE__ */ e("div", { className: "dc:text-sm text-dc-text dc:truncate", title: d.field, children: B }),
|
|
1508
1508
|
/* @__PURE__ */ e("div", { className: "dc:text-xs text-dc-text-muted dc:truncate", children: u })
|
|
@@ -1535,7 +1535,7 @@ const Nn = me(function({
|
|
|
1535
1535
|
]
|
|
1536
1536
|
}
|
|
1537
1537
|
);
|
|
1538
|
-
}), Cn =
|
|
1538
|
+
}), Cn = A("add");
|
|
1539
1539
|
function Sn(r, d) {
|
|
1540
1540
|
if (!d?.cubes) return null;
|
|
1541
1541
|
const [i] = r.split("."), s = d.cubes.find((m) => m.name === i);
|
|
@@ -1571,7 +1571,7 @@ const kn = me(function({
|
|
|
1571
1571
|
sortPriority: S,
|
|
1572
1572
|
index: L
|
|
1573
1573
|
};
|
|
1574
|
-
}), [d, i, n, k]),
|
|
1574
|
+
}), [d, i, n, k]), $ = Z(null), B = F((p, L) => {
|
|
1575
1575
|
l(L), h.current = L, p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", JSON.stringify({ type: "metric", index: L, field: d[L].field }));
|
|
1576
1576
|
const P = p.currentTarget, S = P.cloneNode(!0);
|
|
1577
1577
|
S.style.cssText = `
|
|
@@ -1583,11 +1583,11 @@ const kn = me(function({
|
|
|
1583
1583
|
transform: rotate(2deg);
|
|
1584
1584
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
1585
1585
|
pointer-events: none;
|
|
1586
|
-
`, document.body.appendChild(S),
|
|
1586
|
+
`, document.body.appendChild(S), $.current = S;
|
|
1587
1587
|
const v = P.getBoundingClientRect(), T = p.clientX - v.left, E = p.clientY - v.top;
|
|
1588
1588
|
p.dataTransfer.setDragImage(S, T, E);
|
|
1589
1589
|
}, [d]), u = F(() => {
|
|
1590
|
-
l(null), c(null), h.current = null, N.current = null,
|
|
1590
|
+
l(null), c(null), h.current = null, N.current = null, $.current && (document.body.removeChild($.current), $.current = null);
|
|
1591
1591
|
}, []), a = F((p, L) => {
|
|
1592
1592
|
p.preventDefault(), p.stopPropagation();
|
|
1593
1593
|
const P = h.current;
|
|
@@ -1717,7 +1717,7 @@ const kn = me(function({
|
|
|
1717
1717
|
onDragStart: h,
|
|
1718
1718
|
onDragEnd: N
|
|
1719
1719
|
}) {
|
|
1720
|
-
const k =
|
|
1720
|
+
const k = A("dimension"), R = A("timeDimension"), $ = A("close"), B = A("chevronUp"), u = A("chevronDown"), a = A("chevronUpDown"), f = i?.shortTitle || i?.title || d.field.split(".").pop() || d.field, y = d.field.split(".")[0], w = d.isTimeDimension ? R : k, D = () => {
|
|
1721
1721
|
switch (b) {
|
|
1722
1722
|
case "asc":
|
|
1723
1723
|
return B ? /* @__PURE__ */ e(B, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -1793,14 +1793,14 @@ const kn = me(function({
|
|
|
1793
1793
|
onClick: s,
|
|
1794
1794
|
className: "dc:p-1 text-dc-text-muted hover:text-dc-danger dc:opacity-100 dc:sm:opacity-0 dc:sm:group-hover:opacity-100 dc:transition-opacity dc:flex-shrink-0",
|
|
1795
1795
|
title: "Remove breakdown",
|
|
1796
|
-
children: /* @__PURE__ */ e(
|
|
1796
|
+
children: /* @__PURE__ */ e($, { className: "dc:w-4 dc:h-4" })
|
|
1797
1797
|
}
|
|
1798
1798
|
)
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
|
-
}),
|
|
1803
|
-
function
|
|
1802
|
+
}), An = A("add");
|
|
1803
|
+
function $n(r, d) {
|
|
1804
1804
|
if (!d?.cubes) return null;
|
|
1805
1805
|
const [i] = r.split("."), s = d.cubes.find((m) => m.name === i);
|
|
1806
1806
|
return s && s.dimensions?.find((m) => m.name === r) || null;
|
|
@@ -1828,16 +1828,16 @@ const zc = me(function({
|
|
|
1828
1828
|
onOrderChange: o,
|
|
1829
1829
|
onReorder: l
|
|
1830
1830
|
}) {
|
|
1831
|
-
const [g, c] = _(null), [h, N] = _(null), k = Z(null), R = Z(null),
|
|
1832
|
-
const T = b?.[S.field] || null, E = T ?
|
|
1831
|
+
const [g, c] = _(null), [h, N] = _(null), k = Z(null), R = Z(null), $ = z(() => b ? Object.keys(b) : [], [b]), B = z(() => d.find((v) => v.isTimeDimension && v.enableComparison)?.id || null, [d]), u = z(() => d.map((S, v) => {
|
|
1832
|
+
const T = b?.[S.field] || null, E = T ? $.indexOf(S.field) + 1 : void 0;
|
|
1833
1833
|
return {
|
|
1834
1834
|
breakdown: S,
|
|
1835
|
-
fieldMeta:
|
|
1835
|
+
fieldMeta: $n(S.field, i),
|
|
1836
1836
|
sortDirection: T,
|
|
1837
1837
|
sortPriority: E,
|
|
1838
1838
|
index: v
|
|
1839
1839
|
};
|
|
1840
|
-
}), [d, i, b,
|
|
1840
|
+
}), [d, i, b, $]), a = Z(null), f = F((S, v) => {
|
|
1841
1841
|
c(v), k.current = v, S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", JSON.stringify({ type: "breakdown", index: v, field: d[v].field }));
|
|
1842
1842
|
const T = S.currentTarget, E = T.cloneNode(!0);
|
|
1843
1843
|
E.style.cssText = `
|
|
@@ -1895,7 +1895,7 @@ const zc = me(function({
|
|
|
1895
1895
|
title: "Add breakdown",
|
|
1896
1896
|
children: [
|
|
1897
1897
|
/* @__PURE__ */ e(ue, { children: "Breakdown" }),
|
|
1898
|
-
/* @__PURE__ */ e(
|
|
1898
|
+
/* @__PURE__ */ e(An, { className: "dc:w-5 dc:h-5 text-dc-text-secondary group-hover:text-dc-primary dc:transition-colors" })
|
|
1899
1899
|
]
|
|
1900
1900
|
}
|
|
1901
1901
|
),
|
|
@@ -1964,7 +1964,7 @@ const zc = me(function({
|
|
|
1964
1964
|
}
|
|
1965
1965
|
)
|
|
1966
1966
|
] });
|
|
1967
|
-
}), xc =
|
|
1967
|
+
}), xc = A("close"), Xt = A("chevronDown"), Rn = A("dimension"), Fn = A("timeDimension"), En = A("measure");
|
|
1968
1968
|
function On({
|
|
1969
1969
|
filter: r,
|
|
1970
1970
|
schema: d,
|
|
@@ -1972,7 +1972,7 @@ function On({
|
|
|
1972
1972
|
onCancel: s,
|
|
1973
1973
|
anchorElement: m
|
|
1974
1974
|
}) {
|
|
1975
|
-
const [n, x] = _(r), [b, o] = _(!1), [l, g] = _(!1), [c, h] = _(!1), [N, k] = _("this_month"), [R,
|
|
1975
|
+
const [n, x] = _(r), [b, o] = _(!1), [l, g] = _(!1), [c, h] = _(!1), [N, k] = _("this_month"), [R, $] = _(1), [B, u] = _(""), [a, f] = _(null), [y, w] = _(-1), D = Z(null), p = Z(null), L = Ed(B, 300), P = Gc(n.member, d), S = P?.field.type || "string", v = S === "time", T = P?.fieldType === "measure", E = P?.fieldType === "dimension", M = _c(n.member, d), j = Kc[n.operator], q = Od(S), U = v && n.operator === "inDateRange", re = F(() => ["equals", "notEquals", "in", "notIn"].includes(n.operator) && E && !v, [n.operator, E, v])(), {
|
|
1976
1976
|
values: ee,
|
|
1977
1977
|
loading: pe,
|
|
1978
1978
|
error: W,
|
|
@@ -2013,10 +2013,10 @@ function On({
|
|
|
2013
2013
|
const O = n.dateRange.match(/^last (\d+) (days|weeks|months|quarters|years)$/), Q = !O && n.dateRange.match(/^last (day|week|month|quarter|year)$/);
|
|
2014
2014
|
if (O) {
|
|
2015
2015
|
const [, J, ce] = O;
|
|
2016
|
-
k(`last_n_${ce}`),
|
|
2016
|
+
k(`last_n_${ce}`), $(parseInt(J) || 1);
|
|
2017
2017
|
} else if (Q) {
|
|
2018
2018
|
const [, J] = Q;
|
|
2019
|
-
k(`last_n_${J === "day" ? "days" : J === "week" ? "weeks" : J === "month" ? "months" : J === "quarter" ? "quarters" : "years"}`),
|
|
2019
|
+
k(`last_n_${J === "day" ? "days" : J === "week" ? "weeks" : J === "month" ? "months" : J === "quarter" ? "quarters" : "years"}`), $(1);
|
|
2020
2020
|
} else {
|
|
2021
2021
|
let J = !1;
|
|
2022
2022
|
for (const ce of Ut)
|
|
@@ -2085,7 +2085,7 @@ function On({
|
|
|
2085
2085
|
} else ht(O) ? Q = Ve(O, R) : Q = Ve(O);
|
|
2086
2086
|
x({ ...n, dateRange: Q });
|
|
2087
2087
|
}, [n, R]), he = F((O) => {
|
|
2088
|
-
if (
|
|
2088
|
+
if ($(O), ht(N)) {
|
|
2089
2089
|
const Q = Ve(N, O);
|
|
2090
2090
|
x({ ...n, dateRange: Q });
|
|
2091
2091
|
}
|
|
@@ -2095,7 +2095,7 @@ function On({
|
|
|
2095
2095
|
}, [n]), Ie = F((O) => {
|
|
2096
2096
|
const Q = O.target.value, ce = (Array.isArray(n.dateRange) ? n.dateRange : ["", n.dateRange || ""])[0] || Q;
|
|
2097
2097
|
x({ ...n, dateRange: [ce, Q] });
|
|
2098
|
-
}, [n]), be = q.find((O) => O.operator === n.operator)?.label || n.operator,
|
|
2098
|
+
}, [n]), be = q.find((O) => O.operator === n.operator)?.label || n.operator, $e = Ut.find((O) => O.value === N)?.label || "Select range", Re = v ? Fn : T ? En : Rn, Se = () => j?.requiresValues ? U ? /* @__PURE__ */ t("div", { className: "dc:space-y-2", children: [
|
|
2099
2099
|
/* @__PURE__ */ t("div", { className: "dc:relative", children: [
|
|
2100
2100
|
/* @__PURE__ */ t(
|
|
2101
2101
|
"button",
|
|
@@ -2105,7 +2105,7 @@ function On({
|
|
|
2105
2105
|
},
|
|
2106
2106
|
className: "dc:w-full dc:flex dc:items-center dc:justify-between dc:text-left dc:text-sm dc:border border-dc-border dc:rounded dc:px-3 dc:py-2 bg-dc-surface text-dc-text hover:bg-dc-surface-hover",
|
|
2107
2107
|
children: [
|
|
2108
|
-
/* @__PURE__ */ e("span", { className: "dc:truncate", children:
|
|
2108
|
+
/* @__PURE__ */ e("span", { className: "dc:truncate", children: $e }),
|
|
2109
2109
|
/* @__PURE__ */ e(Xt, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:shrink-0 dc:ml-2 dc:transition-transform ${c ? "dc:rotate-180" : ""}` })
|
|
2110
2110
|
]
|
|
2111
2111
|
}
|
|
@@ -2366,7 +2366,7 @@ function On({
|
|
|
2366
2366
|
}
|
|
2367
2367
|
) });
|
|
2368
2368
|
}
|
|
2369
|
-
const gc =
|
|
2369
|
+
const gc = A("close"), Ln = A("dimension"), Bn = A("timeDimension"), Pn = A("measure");
|
|
2370
2370
|
function Yc({
|
|
2371
2371
|
filter: r,
|
|
2372
2372
|
schema: d,
|
|
@@ -2429,7 +2429,7 @@ function Mn(r, d) {
|
|
|
2429
2429
|
const i = r.values || [];
|
|
2430
2430
|
return i.length === 0 ? "(empty)" : i.length === 1 ? String(i[0]) : i.length === 2 ? `${i[0]}, ${i[1]}` : `${i[0]}, ${i[1]}, +${i.length - 2} more`;
|
|
2431
2431
|
}
|
|
2432
|
-
const qn =
|
|
2432
|
+
const qn = A("add"), jn = A("close");
|
|
2433
2433
|
function Qn(r) {
|
|
2434
2434
|
return "member" in r && typeof r.member == "string";
|
|
2435
2435
|
}
|
|
@@ -2468,8 +2468,8 @@ function Jc({
|
|
|
2468
2468
|
m([]), o(!1);
|
|
2469
2469
|
}, [m]), R = F((f) => (y = []) => {
|
|
2470
2470
|
m([f, ...y]);
|
|
2471
|
-
}, [m]),
|
|
2472
|
-
return /* @__PURE__ */ t("div", { className: `dc:border ${
|
|
2471
|
+
}, [m]), $ = () => n % 2 === 0 ? "border-dc-border" : "border-dc-border dark:border-dc-border", B = () => r.type === "and" ? "bg-dc-info-bg/50" : "bg-dc-warning-bg/50", u = r.filters.length, a = u === 1 ? "condition" : "conditions";
|
|
2472
|
+
return /* @__PURE__ */ t("div", { className: `dc:border ${$()} dc:rounded-lg bg-dc-surface dc:w-full`, children: [
|
|
2473
2473
|
/* @__PURE__ */ t("div", { className: `dc:flex dc:items-center dc:justify-between dc:px-2 dc:py-1.5 dc:border-b border-dc-border/50 dc:rounded-t-lg ${B()}`, children: [
|
|
2474
2474
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:items-center dc:gap-2", children: [
|
|
2475
2475
|
/* @__PURE__ */ e(
|
|
@@ -2569,7 +2569,7 @@ function Jc({
|
|
|
2569
2569
|
) : null) })
|
|
2570
2570
|
] });
|
|
2571
2571
|
}
|
|
2572
|
-
const _n =
|
|
2572
|
+
const _n = A("add");
|
|
2573
2573
|
function Dt(r) {
|
|
2574
2574
|
return "member" in r && typeof r.member == "string";
|
|
2575
2575
|
}
|
|
@@ -2633,7 +2633,7 @@ function ze({
|
|
|
2633
2633
|
i(v), x(!1), l.current = [];
|
|
2634
2634
|
},
|
|
2635
2635
|
[r, i]
|
|
2636
|
-
),
|
|
2636
|
+
), $ = F(
|
|
2637
2637
|
(w, D) => {
|
|
2638
2638
|
const p = [...r];
|
|
2639
2639
|
p[w] = D, i(p);
|
|
@@ -2665,7 +2665,7 @@ function ze({
|
|
|
2665
2665
|
{
|
|
2666
2666
|
filter: w,
|
|
2667
2667
|
schema: d,
|
|
2668
|
-
onUpdate: (P) =>
|
|
2668
|
+
onUpdate: (P) => $(D, P),
|
|
2669
2669
|
onRemove: () => B(D)
|
|
2670
2670
|
},
|
|
2671
2671
|
`filter-${L.join("-")}`
|
|
@@ -2674,7 +2674,7 @@ function ze({
|
|
|
2674
2674
|
{
|
|
2675
2675
|
group: w,
|
|
2676
2676
|
schema: d,
|
|
2677
|
-
onUpdate: (P) =>
|
|
2677
|
+
onUpdate: (P) => $(D, P),
|
|
2678
2678
|
onRemove: () => B(D),
|
|
2679
2679
|
onAddFilter: f(L),
|
|
2680
2680
|
hideRemoveButton: r.length === 1
|
|
@@ -2744,7 +2744,7 @@ function ze({
|
|
|
2744
2744
|
)
|
|
2745
2745
|
] });
|
|
2746
2746
|
}
|
|
2747
|
-
const Hn =
|
|
2747
|
+
const Hn = A("close"), Kn = A("dimension"), Vn = A("timeDimension"), zn = A("measure");
|
|
2748
2748
|
function Yn({
|
|
2749
2749
|
config: r,
|
|
2750
2750
|
fields: d,
|
|
@@ -2759,14 +2759,14 @@ function Yn({
|
|
|
2759
2759
|
yAxisAssignment: g,
|
|
2760
2760
|
onYAxisAssignmentChange: c
|
|
2761
2761
|
}) {
|
|
2762
|
-
const { key: h, label: N, description: k, mandatory: R, maxItems:
|
|
2762
|
+
const { key: h, label: N, description: k, mandatory: R, maxItems: $, emptyText: B } = r, [u, a] = _(null), [f, y] = _(!1), [w, D] = _(!1), p = Z(null), L = Z(null), P = Z(d);
|
|
2763
2763
|
P.current = d;
|
|
2764
2764
|
const S = Z(null), v = () => {
|
|
2765
2765
|
let I = d.length;
|
|
2766
|
-
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)),
|
|
2766
|
+
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)), !$ || I < $;
|
|
2767
2767
|
}, T = () => {
|
|
2768
2768
|
let I = d.length;
|
|
2769
|
-
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)),
|
|
2769
|
+
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)), $ && I >= $;
|
|
2770
2770
|
}, E = v(), M = T();
|
|
2771
2771
|
Y(() => {
|
|
2772
2772
|
const I = () => {
|
|
@@ -2842,15 +2842,15 @@ function Yn({
|
|
|
2842
2842
|
{
|
|
2843
2843
|
ref: L,
|
|
2844
2844
|
"data-axis-container": h,
|
|
2845
|
-
className: `dc:min-h-[48px] dc:border-2 dc:border-dashed dc:rounded-lg dc:p-2 dc:transition-all dc:duration-200 ${f && (E ||
|
|
2845
|
+
className: `dc:min-h-[48px] dc:border-2 dc:border-dashed dc:rounded-lg dc:p-2 dc:transition-all dc:duration-200 ${f && (E || $ === 1) || w ? "dc:shadow-sm dc:border-solid" : M ? "bg-dc-surface-secondary" : "bg-dc-surface-secondary hover:bg-dc-surface-hover"}`,
|
|
2846
2846
|
style: {
|
|
2847
|
-
borderColor: f && (E ||
|
|
2848
|
-
backgroundColor: f && (E ||
|
|
2847
|
+
borderColor: f && (E || $ === 1) || w ? "var(--dc-primary)" : "var(--dc-border)",
|
|
2848
|
+
backgroundColor: f && (E || $ === 1) || w ? "rgba(var(--dc-primary-rgb), 0.1)" : void 0
|
|
2849
2849
|
},
|
|
2850
2850
|
onDragOver: (I) => {
|
|
2851
2851
|
if (o && o.fromAxis === h && o.fromIndex !== void 0)
|
|
2852
2852
|
return;
|
|
2853
|
-
E ||
|
|
2853
|
+
E || $ === 1 ? (y(!0), x(I)) : (I.preventDefault(), I.dataTransfer.dropEffect = "none");
|
|
2854
2854
|
},
|
|
2855
2855
|
onDragLeave: (I) => {
|
|
2856
2856
|
const G = I.currentTarget.getBoundingClientRect(), te = I.clientX < G.left || I.clientX > G.right || I.clientY < G.top || I.clientY > G.bottom, X = I.relatedTarget, oe = X && !I.currentTarget.contains(X);
|
|
@@ -2859,7 +2859,7 @@ function Yn({
|
|
|
2859
2859
|
onDrop: (I) => {
|
|
2860
2860
|
if (o && o.fromAxis === h && o.fromIndex !== void 0)
|
|
2861
2861
|
return;
|
|
2862
|
-
E ||
|
|
2862
|
+
E || $ === 1 ? i(I, h) : I.preventDefault(), y(!1), D(!1);
|
|
2863
2863
|
},
|
|
2864
2864
|
children: d.length === 0 ? /* @__PURE__ */ e("div", { className: "dc:text-sm text-dc-text-muted dc:text-center dc:py-2", children: M ? "Maximum items reached" : B || "Drop fields here" }) : /* @__PURE__ */ t(
|
|
2865
2865
|
"div",
|
|
@@ -3025,7 +3025,7 @@ function bc({
|
|
|
3025
3025
|
}
|
|
3026
3026
|
),
|
|
3027
3027
|
x && /* @__PURE__ */ e("div", { className: `dc:absolute dc:z-10 dc:mt-1 dc:w-full bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg dc:max-h-80 dc:overflow-auto ${s ? "" : "dc:min-w-max"}`, children: /* @__PURE__ */ e("div", { className: "dc:p-2", children: /* @__PURE__ */ e("div", { className: `dc:grid dc:gap-1.5 ${s ? "dc:grid-cols-2" : "dc:grid-cols-2 dc:sm:grid-cols-3 dc:lg:grid-cols-4"}`, children: o.map((c) => {
|
|
3028
|
-
const h = dc[c], N = oc(c), k = pt(c), R = r === c,
|
|
3028
|
+
const h = dc[c], N = oc(c), k = pt(c), R = r === c, $ = h?.description, B = h?.useCase, u = m?.[c], a = u?.available ?? !0, f = u?.reason, y = !a && f ? f : [$, B].filter(Boolean).join(". ");
|
|
3029
3029
|
return /* @__PURE__ */ t(
|
|
3030
3030
|
"button",
|
|
3031
3031
|
{
|
|
@@ -3068,7 +3068,7 @@ function bc({
|
|
|
3068
3068
|
}) }) }) })
|
|
3069
3069
|
] });
|
|
3070
3070
|
}
|
|
3071
|
-
const Jn =
|
|
3071
|
+
const Jn = A("measure"), Wn = A("dimension"), Un = A("timeDimension");
|
|
3072
3072
|
function Xn({
|
|
3073
3073
|
chartType: r,
|
|
3074
3074
|
chartConfig: d,
|
|
@@ -3104,7 +3104,7 @@ function Xn({
|
|
|
3104
3104
|
q.length !== j.length && (T = !0, q.length === 0 ? delete E[M.key] : M.maxItems === 1 ? E[M.key] = q[0] : E[M.key] = q);
|
|
3105
3105
|
}), T && b(E);
|
|
3106
3106
|
}, [g, d, c.dropZones, b, k, h]);
|
|
3107
|
-
const R = (v) => g.measures.includes(v) ? "measure" : g.timeDimensions.includes(v) ? "timeDimension" : "dimension",
|
|
3107
|
+
const R = (v) => g.measures.includes(v) ? "measure" : g.timeDimensions.includes(v) ? "timeDimension" : "dimension", $ = (v) => {
|
|
3108
3108
|
if (!m?.cubes) return null;
|
|
3109
3109
|
const [T] = v.split("."), E = m.cubes.find((q) => q.name === T);
|
|
3110
3110
|
if (!E) return null;
|
|
@@ -3113,7 +3113,7 @@ function Xn({
|
|
|
3113
3113
|
const j = E.dimensions?.find((q) => q.name === v);
|
|
3114
3114
|
return j ? { ...j, fieldType: j.type === "time" ? "timeDimension" : "dimension" } : null;
|
|
3115
3115
|
}, B = (v) => {
|
|
3116
|
-
const T = R(v), E = v.split("."), M = E[0] || v, j = E[1] || v, q =
|
|
3116
|
+
const T = R(v), E = v.split("."), M = E[0] || v, j = E[1] || v, q = $(v), U = s.find((re) => re.field === v);
|
|
3117
3117
|
return q ? {
|
|
3118
3118
|
title: q.title || j,
|
|
3119
3119
|
shortTitle: q.shortTitle || q.title || j,
|
|
@@ -3321,7 +3321,7 @@ function Xn({
|
|
|
3321
3321
|
!N && g.measures.length === 0 && g.dimensions.length === 0 && g.timeDimensions.length === 0 && /* @__PURE__ */ e("div", { className: "dc:text-center text-dc-text-muted dc:text-sm dc:py-4", children: /* @__PURE__ */ e("p", { children: "Add metrics and breakdowns in the Query tab to configure your chart." }) })
|
|
3322
3322
|
] });
|
|
3323
3323
|
}
|
|
3324
|
-
const yc =
|
|
3324
|
+
const yc = A("chevronDown"), vc = A("check"), Nc = A("search"), Zn = me(function({
|
|
3325
3325
|
bindingKey: d,
|
|
3326
3326
|
onChange: i,
|
|
3327
3327
|
schema: s,
|
|
@@ -3348,7 +3348,7 @@ const yc = $("chevronDown"), vc = $("check"), Nc = $("search"), Zn = me(function
|
|
|
3348
3348
|
i({ dimension: f }), b(!1), l("");
|
|
3349
3349
|
},
|
|
3350
3350
|
[i]
|
|
3351
|
-
),
|
|
3351
|
+
), $ = F(
|
|
3352
3352
|
(f) => {
|
|
3353
3353
|
f.stopPropagation(), i(null);
|
|
3354
3354
|
},
|
|
@@ -3389,8 +3389,8 @@ const yc = $("chevronDown"), vc = $("check"), Nc = $("search"), Zn = me(function
|
|
|
3389
3389
|
{
|
|
3390
3390
|
role: "button",
|
|
3391
3391
|
tabIndex: 0,
|
|
3392
|
-
onClick:
|
|
3393
|
-
onKeyDown: (f) => f.key === "Enter" &&
|
|
3392
|
+
onClick: $,
|
|
3393
|
+
onKeyDown: (f) => f.key === "Enter" && $(f),
|
|
3394
3394
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
3395
3395
|
title: "Clear binding key",
|
|
3396
3396
|
children: "×"
|
|
@@ -3443,7 +3443,7 @@ const yc = $("chevronDown"), vc = $("check"), Nc = $("search"), Zn = me(function
|
|
|
3443
3443
|
/* @__PURE__ */ e("div", { className: "dc:px-3 dc:py-2 dc:border-t border-dc-border dc:text-xs text-dc-text-muted", children: "Select a dimension that identifies entities across funnel steps (e.g., user ID, order ID)" })
|
|
3444
3444
|
] })
|
|
3445
3445
|
] }) });
|
|
3446
|
-
}), er =
|
|
3446
|
+
}), er = A("chartBar"), tr = A("chartFunnel"), cr = A("chartSankey"), dr = A("chartRetention"), nr = [
|
|
3447
3447
|
{
|
|
3448
3448
|
type: "query",
|
|
3449
3449
|
label: "Query",
|
|
@@ -3497,7 +3497,7 @@ const yc = $("chevronDown"), vc = $("check"), Nc = $("search"), Zn = me(function
|
|
|
3497
3497
|
b.type
|
|
3498
3498
|
);
|
|
3499
3499
|
}) });
|
|
3500
|
-
}), gt =
|
|
3500
|
+
}), gt = A("chevronDown"), wc = A("chevronRight"), bt = A("check"), Cc = A("search"), sr = A("dimension"), ar = A("link"), ir = A("timeDimension");
|
|
3501
3501
|
function or(r) {
|
|
3502
3502
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
3503
3503
|
cube: d.name,
|
|
@@ -3543,7 +3543,7 @@ const Zt = me(function({
|
|
|
3543
3543
|
D.length > 0 && (f[y] = D);
|
|
3544
3544
|
}
|
|
3545
3545
|
return f;
|
|
3546
|
-
}, [k, g]),
|
|
3546
|
+
}, [k, g]), $ = F(
|
|
3547
3547
|
(a) => {
|
|
3548
3548
|
x(a), l(!1), c("");
|
|
3549
3549
|
},
|
|
@@ -3626,7 +3626,7 @@ const Zt = me(function({
|
|
|
3626
3626
|
f.map((y) => /* @__PURE__ */ t(
|
|
3627
3627
|
"button",
|
|
3628
3628
|
{
|
|
3629
|
-
onClick: () =>
|
|
3629
|
+
onClick: () => $(y.dimension),
|
|
3630
3630
|
className: `
|
|
3631
3631
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
3632
3632
|
dc:rounded dc:transition-colors
|
|
@@ -3670,7 +3670,7 @@ const Zt = me(function({
|
|
|
3670
3670
|
!i && a.bindingKey && x({ dimension: a.bindingKey }), !s && a.timeDimension && b(a.timeDimension);
|
|
3671
3671
|
}
|
|
3672
3672
|
}, [d, m, i, s, x, b]);
|
|
3673
|
-
const R = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null,
|
|
3673
|
+
const R = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null, $ = F(
|
|
3674
3674
|
(u) => {
|
|
3675
3675
|
x(u ? { dimension: u } : null);
|
|
3676
3676
|
},
|
|
@@ -3714,7 +3714,7 @@ const Zt = me(function({
|
|
|
3714
3714
|
placeholder: d ? "Select binding key" : "Select cube first",
|
|
3715
3715
|
icon: ar,
|
|
3716
3716
|
options: l,
|
|
3717
|
-
onChange:
|
|
3717
|
+
onChange: $,
|
|
3718
3718
|
helpText: "Entity that connects steps (e.g., user ID, order ID)"
|
|
3719
3719
|
}
|
|
3720
3720
|
),
|
|
@@ -3732,7 +3732,7 @@ const Zt = me(function({
|
|
|
3732
3732
|
)
|
|
3733
3733
|
] })
|
|
3734
3734
|
] });
|
|
3735
|
-
}), Sc =
|
|
3735
|
+
}), Sc = A("menu"), Dc = A("close"), kc = A("chevronDown"), Tc = A("check"), Ac = A("timeDimension"), $c = [
|
|
3736
3736
|
{ value: null, label: "No limit" },
|
|
3737
3737
|
{ value: "PT1H", label: "1 hour" },
|
|
3738
3738
|
{ value: "PT6H", label: "6 hours" },
|
|
@@ -3753,14 +3753,14 @@ const Zt = me(function({
|
|
|
3753
3753
|
onRemove: b,
|
|
3754
3754
|
onUpdate: o
|
|
3755
3755
|
}) {
|
|
3756
|
-
const [l, g] = _(!1), [c, h] = _(!1), [N, k] = _(d.name), R = Z(null),
|
|
3756
|
+
const [l, g] = _(!1), [c, h] = _(!1), [N, k] = _(d.name), R = Z(null), $ = Z(null);
|
|
3757
3757
|
Y(() => {
|
|
3758
3758
|
k(d.name);
|
|
3759
3759
|
}, [d.name]), Y(() => {
|
|
3760
3760
|
l && R.current && (R.current.focus(), R.current.select());
|
|
3761
3761
|
}, [l]), Y(() => {
|
|
3762
3762
|
function p(L) {
|
|
3763
|
-
|
|
3763
|
+
$.current && !$.current.contains(L.target) && h(!1);
|
|
3764
3764
|
}
|
|
3765
3765
|
if (c)
|
|
3766
3766
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
@@ -3788,7 +3788,7 @@ const Zt = me(function({
|
|
|
3788
3788
|
o({ filters: p });
|
|
3789
3789
|
},
|
|
3790
3790
|
[o]
|
|
3791
|
-
), w = d.timeToConvert ?
|
|
3791
|
+
), w = d.timeToConvert ? $c.find((p) => p.value === d.timeToConvert)?.label || d.timeToConvert : "No limit", D = z(() => {
|
|
3792
3792
|
if (!n) return null;
|
|
3793
3793
|
const p = {
|
|
3794
3794
|
cubes: n.cubes.map((L) => ({
|
|
@@ -3858,10 +3858,10 @@ const Zt = me(function({
|
|
|
3858
3858
|
),
|
|
3859
3859
|
i > 0 && /* @__PURE__ */ t("div", { children: [
|
|
3860
3860
|
/* @__PURE__ */ t("label", { className: "dc:flex dc:items-center dc:gap-1.5 dc:text-xs dc:font-medium text-dc-text-muted dc:mb-1", children: [
|
|
3861
|
-
|
|
3861
|
+
Ac && /* @__PURE__ */ e(Ac, { className: "dc:w-3.5 dc:h-3.5" }),
|
|
3862
3862
|
"Time Window"
|
|
3863
3863
|
] }),
|
|
3864
|
-
/* @__PURE__ */ t("div", { ref:
|
|
3864
|
+
/* @__PURE__ */ t("div", { ref: $, className: "dc:relative", children: [
|
|
3865
3865
|
/* @__PURE__ */ t(
|
|
3866
3866
|
"button",
|
|
3867
3867
|
{
|
|
@@ -3885,7 +3885,7 @@ const Zt = me(function({
|
|
|
3885
3885
|
}
|
|
3886
3886
|
),
|
|
3887
3887
|
c && /* @__PURE__ */ t("div", { className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg dc:max-h-48 dc:overflow-y-auto", children: [
|
|
3888
|
-
|
|
3888
|
+
$c.map((p) => /* @__PURE__ */ t(
|
|
3889
3889
|
"button",
|
|
3890
3890
|
{
|
|
3891
3891
|
onClick: () => f(p.value),
|
|
@@ -3922,7 +3922,7 @@ const Zt = me(function({
|
|
|
3922
3922
|
]
|
|
3923
3923
|
}
|
|
3924
3924
|
);
|
|
3925
|
-
}), Ic =
|
|
3925
|
+
}), Ic = A("add"), hr = me(function({
|
|
3926
3926
|
steps: d,
|
|
3927
3927
|
activeStepIndex: i,
|
|
3928
3928
|
schema: s,
|
|
@@ -3938,7 +3938,7 @@ const Zt = me(function({
|
|
|
3938
3938
|
u.preventDefault(), l !== null && l !== a && h(a);
|
|
3939
3939
|
}, [l]), R = F(() => {
|
|
3940
3940
|
h(null);
|
|
3941
|
-
}, []),
|
|
3941
|
+
}, []), $ = F((u, a) => {
|
|
3942
3942
|
u.preventDefault(), l !== null && l !== a && o(l, a), g(null), h(null);
|
|
3943
3943
|
}, [l, o]), B = F(() => {
|
|
3944
3944
|
g(null), h(null);
|
|
@@ -3972,7 +3972,7 @@ const Zt = me(function({
|
|
|
3972
3972
|
onDragStart: () => N(a),
|
|
3973
3973
|
onDragOver: (f) => k(f, a),
|
|
3974
3974
|
onDragLeave: R,
|
|
3975
|
-
onDrop: (f) =>
|
|
3975
|
+
onDrop: (f) => $(f, a),
|
|
3976
3976
|
onDragEnd: B,
|
|
3977
3977
|
className: `dc:transition-all ${l === a ? "dc:opacity-50" : ""} ${c === a ? "dc:border-t-2 border-dc-primary dc:pt-1" : ""}`,
|
|
3978
3978
|
children: /* @__PURE__ */ e(
|
|
@@ -4021,11 +4021,11 @@ const Zt = me(function({
|
|
|
4021
4021
|
onBindingKeyChange: k,
|
|
4022
4022
|
// Display props
|
|
4023
4023
|
chartType: R = "funnel",
|
|
4024
|
-
displayConfig:
|
|
4024
|
+
displayConfig: $,
|
|
4025
4025
|
colorPalette: B,
|
|
4026
4026
|
onDisplayConfigChange: u
|
|
4027
4027
|
}) {
|
|
4028
|
-
const [a, f] = _("steps"), y =
|
|
4028
|
+
const [a, f] = _("steps"), y = $ && u;
|
|
4029
4029
|
return /* @__PURE__ */ t("div", { className: "dc:flex dc:flex-col dc:h-full", children: [
|
|
4030
4030
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:border-b border-dc-border dc:flex-shrink-0", children: [
|
|
4031
4031
|
/* @__PURE__ */ e(
|
|
@@ -4073,17 +4073,17 @@ const Zt = me(function({
|
|
|
4073
4073
|
onReorderSteps: h
|
|
4074
4074
|
}
|
|
4075
4075
|
) })
|
|
4076
|
-
] }) : a === "display" &&
|
|
4076
|
+
] }) : a === "display" && $ && u ? /* @__PURE__ */ e("div", { className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4", children: /* @__PURE__ */ e(
|
|
4077
4077
|
St,
|
|
4078
4078
|
{
|
|
4079
4079
|
chartType: R,
|
|
4080
|
-
displayConfig:
|
|
4080
|
+
displayConfig: $,
|
|
4081
4081
|
colorPalette: B,
|
|
4082
4082
|
onDisplayConfigChange: u
|
|
4083
4083
|
}
|
|
4084
4084
|
) }) : null
|
|
4085
4085
|
] });
|
|
4086
|
-
}), yt =
|
|
4086
|
+
}), yt = A("chevronDown"), Rc = A("chevronRight"), vt = A("check"), Fc = A("search"), pr = A("dimension"), xr = A("link"), gr = A("timeDimension"), br = A("dimension");
|
|
4087
4087
|
function yr(r) {
|
|
4088
4088
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
4089
4089
|
cube: d.name,
|
|
@@ -4140,7 +4140,7 @@ const xt = me(function({
|
|
|
4140
4140
|
D.length > 0 && (f[y] = D);
|
|
4141
4141
|
}
|
|
4142
4142
|
return f;
|
|
4143
|
-
}, [k, g]),
|
|
4143
|
+
}, [k, g]), $ = F(
|
|
4144
4144
|
(a) => {
|
|
4145
4145
|
x(a), l(!1), c("");
|
|
4146
4146
|
},
|
|
@@ -4223,7 +4223,7 @@ const xt = me(function({
|
|
|
4223
4223
|
f.map((y) => /* @__PURE__ */ t(
|
|
4224
4224
|
"button",
|
|
4225
4225
|
{
|
|
4226
|
-
onClick: () =>
|
|
4226
|
+
onClick: () => $(y.dimension),
|
|
4227
4227
|
className: `
|
|
4228
4228
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
4229
4229
|
dc:rounded dc:transition-colors
|
|
@@ -4261,9 +4261,9 @@ const xt = me(function({
|
|
|
4261
4261
|
}, [n, d]), N = z(() => {
|
|
4262
4262
|
const y = Nr(n);
|
|
4263
4263
|
return d ? y.filter((w) => w.cube === d) : [];
|
|
4264
|
-
}, [n, d]), k = !!(d && i && s && m), [R,
|
|
4264
|
+
}, [n, d]), k = !!(d && i && s && m), [R, $] = _(!1), B = Z(!1);
|
|
4265
4265
|
Y(() => {
|
|
4266
|
-
k && !B.current && (B.current = !0,
|
|
4266
|
+
k && !B.current && (B.current = !0, $(!0));
|
|
4267
4267
|
}, [k]), Y(() => {
|
|
4268
4268
|
if (!d || !n) return;
|
|
4269
4269
|
const y = n.cubes?.find((w) => w.name === d);
|
|
@@ -4283,7 +4283,7 @@ const xt = me(function({
|
|
|
4283
4283
|
"button",
|
|
4284
4284
|
{
|
|
4285
4285
|
type: "button",
|
|
4286
|
-
onClick: () =>
|
|
4286
|
+
onClick: () => $(!R),
|
|
4287
4287
|
className: "dc:flex dc:items-center dc:justify-between dc:w-full dc:px-4 dc:py-2.5 hover:bg-dc-surface-hover dc:transition-colors",
|
|
4288
4288
|
children: [
|
|
4289
4289
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:items-center dc:gap-2", children: [
|
|
@@ -4362,7 +4362,7 @@ const xt = me(function({
|
|
|
4362
4362
|
onEventDimensionChange: N,
|
|
4363
4363
|
onStartingStepFiltersChange: k,
|
|
4364
4364
|
onStepsBeforeChange: R,
|
|
4365
|
-
onStepsAfterChange:
|
|
4365
|
+
onStepsAfterChange: $,
|
|
4366
4366
|
onJoinStrategyChange: B,
|
|
4367
4367
|
// Chart type (affects query!)
|
|
4368
4368
|
chartType: u = "sankey",
|
|
@@ -4495,7 +4495,7 @@ const xt = me(function({
|
|
|
4495
4495
|
min: uc,
|
|
4496
4496
|
max: lc,
|
|
4497
4497
|
value: b,
|
|
4498
|
-
onChange: (S) =>
|
|
4498
|
+
onChange: (S) => $(parseInt(S.target.value, 10)),
|
|
4499
4499
|
className: "dc:flex-1"
|
|
4500
4500
|
}
|
|
4501
4501
|
),
|
|
@@ -4533,7 +4533,7 @@ const xt = me(function({
|
|
|
4533
4533
|
}
|
|
4534
4534
|
) }) : null
|
|
4535
4535
|
] });
|
|
4536
|
-
}), Be =
|
|
4536
|
+
}), Be = A("chevronDown"), Ec = A("chevronRight"), Nt = A("check"), Oc = A("search"), Sr = A("dimension"), Dr = A("link"), kr = A("timeDimension"), Lc = A("timeDimension");
|
|
4537
4537
|
function Tr(r) {
|
|
4538
4538
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
4539
4539
|
cube: d.name,
|
|
@@ -4542,7 +4542,7 @@ function Tr(r) {
|
|
|
4542
4542
|
eventStream: d.meta?.eventStream
|
|
4543
4543
|
})) : [];
|
|
4544
4544
|
}
|
|
4545
|
-
function
|
|
4545
|
+
function Ar(r) {
|
|
4546
4546
|
if (!r?.cubes) return [];
|
|
4547
4547
|
const d = [];
|
|
4548
4548
|
for (const i of r.cubes)
|
|
@@ -4581,7 +4581,7 @@ const ec = me(function({
|
|
|
4581
4581
|
D.length > 0 && (f[y] = D);
|
|
4582
4582
|
}
|
|
4583
4583
|
return f;
|
|
4584
|
-
}, [k, g]),
|
|
4584
|
+
}, [k, g]), $ = F(
|
|
4585
4585
|
(a) => {
|
|
4586
4586
|
x(a), l(!1), c("");
|
|
4587
4587
|
},
|
|
@@ -4664,7 +4664,7 @@ const ec = me(function({
|
|
|
4664
4664
|
f.map((y) => /* @__PURE__ */ t(
|
|
4665
4665
|
"button",
|
|
4666
4666
|
{
|
|
4667
|
-
onClick: () =>
|
|
4667
|
+
onClick: () => $(y.dimension),
|
|
4668
4668
|
className: `
|
|
4669
4669
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
4670
4670
|
dc:rounded dc:transition-colors
|
|
@@ -4682,7 +4682,7 @@ const ec = me(function({
|
|
|
4682
4682
|
] })
|
|
4683
4683
|
] })
|
|
4684
4684
|
] });
|
|
4685
|
-
}),
|
|
4685
|
+
}), $r = me(function({
|
|
4686
4686
|
dateRange: d,
|
|
4687
4687
|
onDateRangeChange: i
|
|
4688
4688
|
}) {
|
|
@@ -4701,7 +4701,7 @@ const ec = me(function({
|
|
|
4701
4701
|
}
|
|
4702
4702
|
},
|
|
4703
4703
|
[i]
|
|
4704
|
-
),
|
|
4704
|
+
), $ = F(() => {
|
|
4705
4705
|
g && h && (i({ start: g, end: h }), l("custom"), b(!1));
|
|
4706
4706
|
}, [g, h, i]);
|
|
4707
4707
|
Y(() => {
|
|
@@ -4788,7 +4788,7 @@ const ec = me(function({
|
|
|
4788
4788
|
"button",
|
|
4789
4789
|
{
|
|
4790
4790
|
type: "button",
|
|
4791
|
-
onClick:
|
|
4791
|
+
onClick: $,
|
|
4792
4792
|
disabled: !g || !h,
|
|
4793
4793
|
className: "dc:w-full dc:px-3 dc:py-1.5 dc:text-xs bg-dc-primary text-white dc:rounded hover:bg-dc-primary-hover dc:disabled:opacity-50 dc:disabled:cursor-not-allowed dc:transition-colors",
|
|
4794
4794
|
children: "Apply Custom Range"
|
|
@@ -4815,13 +4815,13 @@ const ec = me(function({
|
|
|
4815
4815
|
const f = Ct(n);
|
|
4816
4816
|
return d ? f.filter((y) => y.cube === d) : [];
|
|
4817
4817
|
}, [n, d]), c = z(() => {
|
|
4818
|
-
const f =
|
|
4818
|
+
const f = Ar(n);
|
|
4819
4819
|
return d ? f.filter((y) => y.cube === d) : [];
|
|
4820
4820
|
}, [n, d]), h = !!(d && i?.dimension && s && m?.start && m?.end), [N, k] = _(!1), R = Z(!1);
|
|
4821
4821
|
Y(() => {
|
|
4822
4822
|
h && !R.current && (R.current = !0, k(!0));
|
|
4823
4823
|
}, [h]);
|
|
4824
|
-
const
|
|
4824
|
+
const $ = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null, B = F(
|
|
4825
4825
|
(f) => {
|
|
4826
4826
|
b(f ? { dimension: f } : null);
|
|
4827
4827
|
},
|
|
@@ -4864,7 +4864,7 @@ const ec = me(function({
|
|
|
4864
4864
|
/* @__PURE__ */ e(
|
|
4865
4865
|
ec,
|
|
4866
4866
|
{
|
|
4867
|
-
value:
|
|
4867
|
+
value: $,
|
|
4868
4868
|
label: "Binding Key",
|
|
4869
4869
|
placeholder: d ? "Select user identifier" : "Select cube first",
|
|
4870
4870
|
icon: Dr,
|
|
@@ -4919,7 +4919,7 @@ const Fr = me(function({
|
|
|
4919
4919
|
},
|
|
4920
4920
|
onDateRangeChange: R = () => {
|
|
4921
4921
|
},
|
|
4922
|
-
onCohortFiltersChange:
|
|
4922
|
+
onCohortFiltersChange: $ = () => {
|
|
4923
4923
|
},
|
|
4924
4924
|
onActivityFiltersChange: B = () => {
|
|
4925
4925
|
},
|
|
@@ -4999,7 +4999,7 @@ const Fr = me(function({
|
|
|
4999
4999
|
/* @__PURE__ */ e(ue, { children: "Date Range" }),
|
|
5000
5000
|
/* @__PURE__ */ e("p", { className: "dc:text-xs text-dc-text-muted dc:mb-3", children: "Select the date range for cohort entry. Users who first appear within this range will be analyzed." }),
|
|
5001
5001
|
/* @__PURE__ */ e(
|
|
5002
|
-
|
|
5002
|
+
$r,
|
|
5003
5003
|
{
|
|
5004
5004
|
dateRange: m,
|
|
5005
5005
|
onDateRangeChange: R
|
|
@@ -5014,7 +5014,7 @@ const Fr = me(function({
|
|
|
5014
5014
|
{
|
|
5015
5015
|
filters: n,
|
|
5016
5016
|
schema: q,
|
|
5017
|
-
onFiltersChange:
|
|
5017
|
+
onFiltersChange: $,
|
|
5018
5018
|
dimensionsOnly: !0
|
|
5019
5019
|
}
|
|
5020
5020
|
)
|
|
@@ -5116,7 +5116,7 @@ const Fr = me(function({
|
|
|
5116
5116
|
}
|
|
5117
5117
|
) }) : null
|
|
5118
5118
|
] });
|
|
5119
|
-
}), Bc =
|
|
5119
|
+
}), Bc = A("add"), Er = A("close"), tc = A("info"), cc = A("warning"), Pc = A("link"), Or = me(function({
|
|
5120
5120
|
metrics: d,
|
|
5121
5121
|
breakdowns: i,
|
|
5122
5122
|
filters: s,
|
|
@@ -5132,7 +5132,7 @@ const Fr = me(function({
|
|
|
5132
5132
|
onBreakdownComparisonToggle: N,
|
|
5133
5133
|
onReorderBreakdowns: k,
|
|
5134
5134
|
onFiltersChange: R,
|
|
5135
|
-
onDropFieldToFilter:
|
|
5135
|
+
onDropFieldToFilter: $,
|
|
5136
5136
|
// Sorting
|
|
5137
5137
|
order: B,
|
|
5138
5138
|
onOrderChange: u,
|
|
@@ -5176,7 +5176,7 @@ const Fr = me(function({
|
|
|
5176
5176
|
onAddFunnelStep: ge,
|
|
5177
5177
|
onRemoveFunnelStep: Ie,
|
|
5178
5178
|
onUpdateFunnelStep: be,
|
|
5179
|
-
onSelectFunnelStep:
|
|
5179
|
+
onSelectFunnelStep: $e,
|
|
5180
5180
|
onReorderFunnelSteps: Re,
|
|
5181
5181
|
onFunnelTimeDimensionChange: Se,
|
|
5182
5182
|
// Funnel display config (for Display tab)
|
|
@@ -5200,10 +5200,10 @@ const Fr = me(function({
|
|
|
5200
5200
|
onStepsAfterChange: Ue,
|
|
5201
5201
|
onFlowJoinStrategyChange: kt,
|
|
5202
5202
|
flowDisplayConfig: Tt,
|
|
5203
|
-
onFlowDisplayConfigChange:
|
|
5203
|
+
onFlowDisplayConfigChange: At,
|
|
5204
5204
|
// Retention Mode props (simplified Mixpanel-style)
|
|
5205
5205
|
retentionCube: Xe,
|
|
5206
|
-
retentionBindingKey:
|
|
5206
|
+
retentionBindingKey: $t,
|
|
5207
5207
|
retentionTimeDimension: It,
|
|
5208
5208
|
retentionDateRange: Rt,
|
|
5209
5209
|
retentionCohortFilters: Ft = [],
|
|
@@ -5227,7 +5227,7 @@ const Fr = me(function({
|
|
|
5227
5227
|
retentionDisplayConfig: rt,
|
|
5228
5228
|
onRetentionDisplayConfigChange: st
|
|
5229
5229
|
}) {
|
|
5230
|
-
const ve = T > 1, Fe = oe === "funnel", at = oe === "flow", Qe = oe === "retention",
|
|
5230
|
+
const ve = T > 1, Fe = oe === "funnel", at = oe === "flow", Qe = oe === "retention", Ae = oe === "funnel", Ge = F((V) => {
|
|
5231
5231
|
if (!m?.cubes) return null;
|
|
5232
5232
|
const [ne] = V.field.split("."), He = m.cubes.find((Ne) => Ne.name === ne);
|
|
5233
5233
|
return He && He.dimensions?.find((Ne) => Ne.name === V.field) || null;
|
|
@@ -5249,7 +5249,7 @@ const Fr = me(function({
|
|
|
5249
5249
|
schema: m
|
|
5250
5250
|
}
|
|
5251
5251
|
),
|
|
5252
|
-
|
|
5252
|
+
Ae && he && ge && Ie && be && $e && Re && Se && X ? /* @__PURE__ */ e(
|
|
5253
5253
|
fr,
|
|
5254
5254
|
{
|
|
5255
5255
|
funnelCube: le,
|
|
@@ -5262,7 +5262,7 @@ const Fr = me(function({
|
|
|
5262
5262
|
onAddStep: ge,
|
|
5263
5263
|
onRemoveStep: Ie,
|
|
5264
5264
|
onUpdateStep: be,
|
|
5265
|
-
onSelectStep:
|
|
5265
|
+
onSelectStep: $e,
|
|
5266
5266
|
onReorderSteps: Re,
|
|
5267
5267
|
onTimeDimensionChange: Se,
|
|
5268
5268
|
onBindingKeyChange: X,
|
|
@@ -5297,7 +5297,7 @@ const Fr = me(function({
|
|
|
5297
5297
|
onChartTypeChange: p,
|
|
5298
5298
|
displayConfig: Tt,
|
|
5299
5299
|
colorPalette: w,
|
|
5300
|
-
onDisplayConfigChange:
|
|
5300
|
+
onDisplayConfigChange: At
|
|
5301
5301
|
}
|
|
5302
5302
|
)
|
|
5303
5303
|
) : Qe ? (
|
|
@@ -5306,7 +5306,7 @@ const Fr = me(function({
|
|
|
5306
5306
|
Fr,
|
|
5307
5307
|
{
|
|
5308
5308
|
retentionCube: Xe ?? null,
|
|
5309
|
-
retentionBindingKey:
|
|
5309
|
+
retentionBindingKey: $t ?? null,
|
|
5310
5310
|
retentionTimeDimension: It ?? null,
|
|
5311
5311
|
retentionDateRange: Rt ?? { start: "", end: "" },
|
|
5312
5312
|
retentionCohortFilters: Ft,
|
|
@@ -5539,7 +5539,7 @@ const Fr = me(function({
|
|
|
5539
5539
|
filters: s,
|
|
5540
5540
|
schema: m,
|
|
5541
5541
|
onFiltersChange: R,
|
|
5542
|
-
onFieldDropped:
|
|
5542
|
+
onFieldDropped: $
|
|
5543
5543
|
}
|
|
5544
5544
|
)
|
|
5545
5545
|
] }) : n === "chart" ? (
|
|
@@ -5571,7 +5571,7 @@ const Fr = me(function({
|
|
|
5571
5571
|
) : null })
|
|
5572
5572
|
] })
|
|
5573
5573
|
] });
|
|
5574
|
-
}), Mc =
|
|
5574
|
+
}), Mc = A("sparkles"), Lr = A("error");
|
|
5575
5575
|
function Br({
|
|
5576
5576
|
userPrompt: r,
|
|
5577
5577
|
onPromptChange: d,
|
|
@@ -5669,7 +5669,7 @@ function Br({
|
|
|
5669
5669
|
}
|
|
5670
5670
|
);
|
|
5671
5671
|
}
|
|
5672
|
-
const qc =
|
|
5672
|
+
const qc = A("warning"), jc = A("refresh");
|
|
5673
5673
|
class Pr extends xd {
|
|
5674
5674
|
constructor(d) {
|
|
5675
5675
|
super(d), this.state = {
|
|
@@ -5762,7 +5762,7 @@ const Zc = Qc(
|
|
|
5762
5762
|
aiState: N,
|
|
5763
5763
|
handleOpenAI: k,
|
|
5764
5764
|
handleCloseAI: R,
|
|
5765
|
-
handleAIPromptChange:
|
|
5765
|
+
handleAIPromptChange: $,
|
|
5766
5766
|
handleGenerateAI: B,
|
|
5767
5767
|
handleAcceptAI: u,
|
|
5768
5768
|
handleCancelAI: a
|
|
@@ -5874,7 +5874,7 @@ const Zc = Qc(
|
|
|
5874
5874
|
Br,
|
|
5875
5875
|
{
|
|
5876
5876
|
userPrompt: N.userPrompt,
|
|
5877
|
-
onPromptChange:
|
|
5877
|
+
onPromptChange: $,
|
|
5878
5878
|
isGenerating: N.isGenerating,
|
|
5879
5879
|
error: N.error,
|
|
5880
5880
|
hasGeneratedQuery: N.hasGeneratedQuery,
|
|
@@ -6123,7 +6123,7 @@ const Mr = Qc(
|
|
|
6123
6123
|
flowChartConfig: a?.chartConfig || {},
|
|
6124
6124
|
flowDisplayConfig: a?.displayConfig || {}
|
|
6125
6125
|
};
|
|
6126
|
-
})(),
|
|
6126
|
+
})(), $ = (() => {
|
|
6127
6127
|
if (!c || c.analysisType !== "retention") return;
|
|
6128
6128
|
const u = "retention" in c.query ? c.query.retention : null;
|
|
6129
6129
|
if (!u) return;
|
|
@@ -6156,7 +6156,7 @@ const Mr = Qc(
|
|
|
6156
6156
|
initialAnalysisType: m || N,
|
|
6157
6157
|
initialFunnelState: n || k,
|
|
6158
6158
|
initialFlowState: x || R,
|
|
6159
|
-
initialRetentionState: b ||
|
|
6159
|
+
initialRetentionState: b || $,
|
|
6160
6160
|
initialActiveView: h,
|
|
6161
6161
|
disableLocalStorage: o || !!i || !!n || !!x || !!b || !!g,
|
|
6162
6162
|
children: /* @__PURE__ */ e(Zc, { ref: d, ...l, hideShare: !!i || !!n || !!x || !!b })
|
|
@@ -6168,4 +6168,4 @@ Mr.displayName = "AnalysisBuilder";
|
|
|
6168
6168
|
export {
|
|
6169
6169
|
Mr as default
|
|
6170
6170
|
};
|
|
6171
|
-
//# sourceMappingURL=analysis-builder-
|
|
6171
|
+
//# sourceMappingURL=analysis-builder-KeTsXp1G.js.map
|