drizzle-cube 0.4.8 → 0.4.10
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 +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/{handler-odjn7MIB.js → handler-CySCodwi.js} +336 -210
- package/dist/adapters/{handler-BLcxTuwi.cjs → handler-e6zofK2k.cjs} +13 -13
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +4 -4
- package/dist/client/chunks/{analysis-builder-Bov_gLsf.js → analysis-builder-BMmWeFPr.js} +138 -138
- package/dist/client/chunks/{analysis-builder-Bov_gLsf.js.map → analysis-builder-BMmWeFPr.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-NBk6y0md.js → analysis-builder-shared-D56zYeV0.js} +713 -787
- package/dist/client/chunks/analysis-builder-shared-D56zYeV0.js.map +1 -0
- package/dist/client/chunks/{chart-area-QKKboTbq.js → chart-area-BJAgusst.js} +2 -2
- package/dist/client/chunks/{chart-area-QKKboTbq.js.map → chart-area-BJAgusst.js.map} +1 -1
- package/dist/client/chunks/chart-bar-Blypx8O4.js +267 -0
- package/dist/client/chunks/chart-bar-Blypx8O4.js.map +1 -0
- package/dist/client/chunks/{chart-line-C7YcMWBw.js → chart-line-zi6olZet.js} +2 -2
- package/dist/client/chunks/{chart-line-C7YcMWBw.js.map → chart-line-zi6olZet.js.map} +1 -1
- package/dist/client/chunks/{charts-loader-HYQFVOo4.js → charts-loader-CH0_S06T.js} +4 -4
- package/dist/client/chunks/{charts-loader-HYQFVOo4.js.map → charts-loader-CH0_S06T.js.map} +1 -1
- package/dist/client/chunks/{components-O0hh7ooo.js → components-ClQziOcT.js} +1495 -1416
- package/dist/client/chunks/components-ClQziOcT.js.map +1 -0
- package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +1 -0
- package/dist/client/components.js +8 -8
- package/dist/client/index.js +655 -584
- package/dist/client/index.js.map +1 -1
- package/dist/client/stores/notebookStore.d.ts +2 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +13 -13
- package/dist/server/index.js +1824 -1698
- package/package.json +1 -1
- package/dist/client/chunks/analysis-builder-shared-NBk6y0md.js.map +0 -1
- package/dist/client/chunks/chart-bar-HpXF42H1.js +0 -254
- package/dist/client/chunks/chart-bar-HpXF42H1.js.map +0 -1
- package/dist/client/chunks/components-O0hh7ooo.js.map +0 -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 bd } from "react";
|
|
3
3
|
import { u as gd, g as yd } from "./providers-CgxXm6Ll.js";
|
|
4
|
-
import { F as vd,
|
|
5
|
-
import {
|
|
6
|
-
import { i as Rd, L as ic } from "./charts-loader-
|
|
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-D56zYeV0.js";
|
|
5
|
+
import { a0 as Wt, a1 as Td, h as $d, a6 as Ad, $ as Ce, a7 as Gc, a8 as _c, a9 as Hc, aa as Id, ab as St } from "./components-ClQziOcT.js";
|
|
6
|
+
import { i as Rd, L as ic } from "./charts-loader-CH0_S06T.js";
|
|
7
7
|
import { useExplainQuery as mt, useExplainAI as Fd } from "../hooks.js";
|
|
8
|
-
import { a as
|
|
8
|
+
import { a as $, g as nc, h as oc } from "./icons-DAeqv1iX.js";
|
|
9
9
|
import { S as ue } from "./charts-core-DmGfleFz.js";
|
|
10
10
|
import { p as Ed, q as Od, r as Ld, D as Ut, s as ht, n as Ve, F as Kc } from "./useDirtyStateTracking-Cu1HSjmo.js";
|
|
11
11
|
import { barChartConfig as Bd } from "./chart-config-bar-C8uzktxl.js";
|
|
@@ -51,7 +51,7 @@ function on(r) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
const ln = ({ analysis: r }) => {
|
|
54
|
-
const d =
|
|
54
|
+
const d = $("info"), i = $("chevronRight"), s = $("warning"), m = $("table"), n = $("link"), x = $("success"), g = $("error"), o = [
|
|
55
55
|
{
|
|
56
56
|
label: "Type",
|
|
57
57
|
value: ft(r.querySummary.queryType)
|
|
@@ -301,7 +301,7 @@ function fn({
|
|
|
301
301
|
getFullConfig: k,
|
|
302
302
|
loadFullConfig: R
|
|
303
303
|
}) {
|
|
304
|
-
const [
|
|
304
|
+
const [A, B] = _({
|
|
305
305
|
isOpen: !1,
|
|
306
306
|
userPrompt: "",
|
|
307
307
|
isGenerating: !1,
|
|
@@ -339,13 +339,13 @@ function fn({
|
|
|
339
339
|
}, []), f = F((p) => {
|
|
340
340
|
B((L) => ({ ...L, userPrompt: p }));
|
|
341
341
|
}, []), y = F(async () => {
|
|
342
|
-
if (
|
|
342
|
+
if (A.userPrompt.trim()) {
|
|
343
343
|
B((p) => ({ ...p, isGenerating: !0, error: null }));
|
|
344
344
|
try {
|
|
345
345
|
const p = await un(
|
|
346
346
|
"",
|
|
347
347
|
// API key not needed for server-side AI
|
|
348
|
-
|
|
348
|
+
A.userPrompt,
|
|
349
349
|
b
|
|
350
350
|
), L = mn(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;
|
|
351
351
|
if (hn(S))
|
|
@@ -393,7 +393,7 @@ function fn({
|
|
|
393
393
|
}));
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
}, [
|
|
396
|
+
}, [A.userPrompt, b, d, s, o, n, l, c, h, N]), w = F(() => {
|
|
397
397
|
B({
|
|
398
398
|
isOpen: !1,
|
|
399
399
|
userPrompt: "",
|
|
@@ -404,12 +404,12 @@ function fn({
|
|
|
404
404
|
previousConfig: null
|
|
405
405
|
});
|
|
406
406
|
}, []), D = F(() => {
|
|
407
|
-
|
|
407
|
+
A.previousConfig && R ? R(A.previousConfig) : A.previousState && (d((p) => ({
|
|
408
408
|
...p,
|
|
409
|
-
metrics:
|
|
410
|
-
breakdowns:
|
|
411
|
-
filters:
|
|
412
|
-
})), s(
|
|
409
|
+
metrics: A.previousState.metrics,
|
|
410
|
+
breakdowns: A.previousState.breakdowns,
|
|
411
|
+
filters: A.previousState.filters
|
|
412
|
+
})), s(A.previousState.chartType), n(A.previousState.chartConfig), g(A.previousState.displayConfig), h && A.previousState.analysisType && h(A.previousState.analysisType)), B({
|
|
413
413
|
isOpen: !1,
|
|
414
414
|
userPrompt: "",
|
|
415
415
|
isGenerating: !1,
|
|
@@ -418,9 +418,9 @@ function fn({
|
|
|
418
418
|
previousState: null,
|
|
419
419
|
previousConfig: null
|
|
420
420
|
});
|
|
421
|
-
}, [
|
|
421
|
+
}, [A.previousState, A.previousConfig, d, s, n, g, h, R]);
|
|
422
422
|
return {
|
|
423
|
-
aiState:
|
|
423
|
+
aiState: A,
|
|
424
424
|
handleOpenAI: u,
|
|
425
425
|
handleCloseAI: a,
|
|
426
426
|
handleAIPromptChange: f,
|
|
@@ -524,7 +524,7 @@ const bn = me(function({
|
|
|
524
524
|
funnelExecutedQueries: N,
|
|
525
525
|
activeView: k = "chart",
|
|
526
526
|
onActiveViewChange: R,
|
|
527
|
-
displayLimit:
|
|
527
|
+
displayLimit: A = 100,
|
|
528
528
|
onDisplayLimitChange: B,
|
|
529
529
|
hasMetrics: u = !1,
|
|
530
530
|
// Debug props - per-query for multi-query mode
|
|
@@ -568,7 +568,7 @@ const bn = me(function({
|
|
|
568
568
|
// Query warnings from server
|
|
569
569
|
warnings: we
|
|
570
570
|
}) {
|
|
571
|
-
const ae = ee === "funnel" || pe, fe = ee === "flow", he = ee === "retention", [be, Ie] = _(!1), [ge,
|
|
571
|
+
const ae = ee === "funnel" || pe, fe = ee === "flow", he = ee === "retention", [be, Ie] = _(!1), [ge, Ae] = _(0), [Re, Se] = _(!1), [Ye, Pe] = _(!1), [O, Q] = _(!1), [J, ce] = _("idle");
|
|
572
572
|
Y(() => {
|
|
573
573
|
const C = (H) => {
|
|
574
574
|
H.key === "Shift" && Pe(!0);
|
|
@@ -581,7 +581,7 @@ const bn = me(function({
|
|
|
581
581
|
}, []);
|
|
582
582
|
const xe = Ye && O;
|
|
583
583
|
Y(() => {
|
|
584
|
-
a.length > 0 && ge >= a.length &&
|
|
584
|
+
a.length > 0 && ge >= a.length && Ae(a.length - 1);
|
|
585
585
|
}, [a.length, ge]);
|
|
586
586
|
const De = a[ge] || {
|
|
587
587
|
sql: null,
|
|
@@ -599,12 +599,12 @@ const bn = me(function({
|
|
|
599
599
|
isLoading: Ue,
|
|
600
600
|
hasRun: kt,
|
|
601
601
|
error: Tt,
|
|
602
|
-
runExplain:
|
|
602
|
+
runExplain: $t,
|
|
603
603
|
clearExplain: Xe
|
|
604
604
|
} = mt(ye, {
|
|
605
605
|
skip: ae || fe || he || !ye
|
|
606
606
|
}), {
|
|
607
|
-
explainResult:
|
|
607
|
+
explainResult: At,
|
|
608
608
|
isLoading: It,
|
|
609
609
|
hasRun: Rt,
|
|
610
610
|
error: Ft,
|
|
@@ -660,7 +660,7 @@ const bn = me(function({
|
|
|
660
660
|
...h[0],
|
|
661
661
|
measures: C
|
|
662
662
|
};
|
|
663
|
-
}, [h]), Fe =
|
|
663
|
+
}, [h]), Fe = $("success"), at = $("error"), Qe = $("warning"), $e = $("table"), Ge = $("measure"), it = $("codeBracket"), Ht = $("share"), _e = $("check"), ot = $("delete"), V = $("sparkles"), ne = $("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: [
|
|
664
664
|
/* @__PURE__ */ e(
|
|
665
665
|
"div",
|
|
666
666
|
{
|
|
@@ -848,7 +848,7 @@ const bn = me(function({
|
|
|
848
848
|
/* @__PURE__ */ e("div", { className: "dc:flex dc:border border-dc-border dc:rounded-md dc:overflow-hidden", children: a.map((C, K) => /* @__PURE__ */ t(
|
|
849
849
|
"button",
|
|
850
850
|
{
|
|
851
|
-
onClick: () =>
|
|
851
|
+
onClick: () => Ae(K),
|
|
852
852
|
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 ${ge === K ? "bg-dc-accent text-white" : "bg-dc-bg text-dc-text-secondary hover:bg-dc-bg-secondary"}`,
|
|
853
853
|
children: [
|
|
854
854
|
"Q",
|
|
@@ -911,7 +911,7 @@ const bn = me(function({
|
|
|
911
911
|
explainLoading: Ue,
|
|
912
912
|
explainHasRun: kt,
|
|
913
913
|
explainError: Tt,
|
|
914
|
-
runExplain:
|
|
914
|
+
runExplain: $t,
|
|
915
915
|
aiAnalysis: tt,
|
|
916
916
|
aiAnalysisLoading: ct,
|
|
917
917
|
aiAnalysisError: dt,
|
|
@@ -977,7 +977,7 @@ const bn = me(function({
|
|
|
977
977
|
] }),
|
|
978
978
|
debugData: I,
|
|
979
979
|
sqlPlaceholder: "Configure funnel binding key to generate SQL",
|
|
980
|
-
explainResult:
|
|
980
|
+
explainResult: At,
|
|
981
981
|
explainLoading: It,
|
|
982
982
|
explainHasRun: Rt,
|
|
983
983
|
explainError: Ft,
|
|
@@ -1112,7 +1112,7 @@ const bn = me(function({
|
|
|
1112
1112
|
let C = [], K = [];
|
|
1113
1113
|
if (!i || Array.isArray(i) && i.length === 0)
|
|
1114
1114
|
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: [
|
|
1115
|
-
/* @__PURE__ */ e(
|
|
1115
|
+
/* @__PURE__ */ e($e, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1116
1116
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No flow data to display" }),
|
|
1117
1117
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Configure flow analysis to see results" })
|
|
1118
1118
|
] }) });
|
|
@@ -1121,7 +1121,7 @@ const bn = me(function({
|
|
|
1121
1121
|
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"));
|
|
1122
1122
|
}
|
|
1123
1123
|
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: [
|
|
1124
|
-
/* @__PURE__ */ e(
|
|
1124
|
+
/* @__PURE__ */ e($e, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1125
1125
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No flow data to display" }),
|
|
1126
1126
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Configure flow analysis to see results" })
|
|
1127
1127
|
] }) }) : /* @__PURE__ */ t("div", { className: "dc:h-full dc:overflow-auto dc:p-4 dc:space-y-6", children: [
|
|
@@ -1173,11 +1173,11 @@ const bn = me(function({
|
|
|
1173
1173
|
let K, H = h?.[0];
|
|
1174
1174
|
if (lt && C !== void 0 && C >= 0 && q ? (K = q[C] || null, H = h?.[C]) : (K = i, lt && (H = ve)), !K || K.length === 0)
|
|
1175
1175
|
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: [
|
|
1176
|
-
/* @__PURE__ */ e(
|
|
1176
|
+
/* @__PURE__ */ e($e, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1177
1177
|
/* @__PURE__ */ e("div", { className: "dc:text-sm dc:font-semibold dc:mb-1", children: "No data to display" }),
|
|
1178
1178
|
/* @__PURE__ */ e("div", { className: "dc:text-xs", children: "Run a query to see table data" })
|
|
1179
1179
|
] }) });
|
|
1180
|
-
const se = K.slice(0,
|
|
1180
|
+
const se = K.slice(0, A);
|
|
1181
1181
|
return /* @__PURE__ */ e(
|
|
1182
1182
|
ic,
|
|
1183
1183
|
{
|
|
@@ -1225,7 +1225,7 @@ const bn = me(function({
|
|
|
1225
1225
|
C && k === "table" && !be && B && /* @__PURE__ */ t(
|
|
1226
1226
|
"select",
|
|
1227
1227
|
{
|
|
1228
|
-
value:
|
|
1228
|
+
value: A,
|
|
1229
1229
|
onChange: (K) => B(Number(K.target.value)),
|
|
1230
1230
|
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",
|
|
1231
1231
|
children: [
|
|
@@ -1249,7 +1249,7 @@ const bn = me(function({
|
|
|
1249
1249
|
}
|
|
1250
1250
|
),
|
|
1251
1251
|
c && C && /* @__PURE__ */ e(
|
|
1252
|
-
|
|
1252
|
+
Ad,
|
|
1253
1253
|
{
|
|
1254
1254
|
currentPalette: b || "default",
|
|
1255
1255
|
onPaletteChange: c
|
|
@@ -1340,7 +1340,7 @@ const bn = me(function({
|
|
|
1340
1340
|
}
|
|
1341
1341
|
)
|
|
1342
1342
|
] }), md = () => !we || we.length === 0 ? null : /* @__PURE__ */ e(ie, { children: we.map((C, K) => {
|
|
1343
|
-
const H =
|
|
1343
|
+
const H = $("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";
|
|
1344
1344
|
return /* @__PURE__ */ t(
|
|
1345
1345
|
"div",
|
|
1346
1346
|
{
|
|
@@ -1387,7 +1387,7 @@ const bn = me(function({
|
|
|
1387
1387
|
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"}`,
|
|
1388
1388
|
title: `Table Q${H + 1}`,
|
|
1389
1389
|
children: [
|
|
1390
|
-
/* @__PURE__ */ e(
|
|
1390
|
+
/* @__PURE__ */ e($e, { className: "dc:w-4 dc:h-4" }),
|
|
1391
1391
|
"Q",
|
|
1392
1392
|
H + 1
|
|
1393
1393
|
]
|
|
@@ -1403,7 +1403,7 @@ const bn = me(function({
|
|
|
1403
1403
|
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"}`,
|
|
1404
1404
|
title: "Merged table view",
|
|
1405
1405
|
children: [
|
|
1406
|
-
/* @__PURE__ */ e(
|
|
1406
|
+
/* @__PURE__ */ e($e, { className: "dc:w-4 dc:h-4" }),
|
|
1407
1407
|
"Merged"
|
|
1408
1408
|
]
|
|
1409
1409
|
}
|
|
@@ -1415,7 +1415,7 @@ const bn = me(function({
|
|
|
1415
1415
|
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"}`,
|
|
1416
1416
|
title: "Table view",
|
|
1417
1417
|
children: [
|
|
1418
|
-
/* @__PURE__ */ e(
|
|
1418
|
+
/* @__PURE__ */ e($e, { className: "dc:w-4 dc:h-4" }),
|
|
1419
1419
|
"Table"
|
|
1420
1420
|
]
|
|
1421
1421
|
}
|
|
@@ -1445,7 +1445,7 @@ const bn = me(function({
|
|
|
1445
1445
|
(d === "success" || fd) && hd(),
|
|
1446
1446
|
(d === "loading" || d === "refreshing") && Ee && ld(),
|
|
1447
1447
|
S && /* @__PURE__ */ e(
|
|
1448
|
-
|
|
1448
|
+
$d,
|
|
1449
1449
|
{
|
|
1450
1450
|
isOpen: Re,
|
|
1451
1451
|
onClose: () => Se(!1),
|
|
@@ -1471,7 +1471,7 @@ const bn = me(function({
|
|
|
1471
1471
|
onDragStart: l,
|
|
1472
1472
|
onDragEnd: b
|
|
1473
1473
|
}) {
|
|
1474
|
-
const c =
|
|
1474
|
+
const c = $("close"), h = $("chevronUp"), N = $("chevronDown"), k = $("chevronUpDown"), R = i?.type || "count", A = nc(R) || $("measure"), B = i?.shortTitle || i?.title || d.field.split(".").pop() || d.field, u = d.field.split(".")[0], a = () => {
|
|
1475
1475
|
switch (m) {
|
|
1476
1476
|
case "asc":
|
|
1477
1477
|
return h ? /* @__PURE__ */ e(h, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -1498,7 +1498,7 @@ const bn = me(function({
|
|
|
1498
1498
|
onDragStart: y ? (w) => l(w, g) : void 0,
|
|
1499
1499
|
onDragEnd: y ? b : void 0,
|
|
1500
1500
|
children: [
|
|
1501
|
-
/* @__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:
|
|
1501
|
+
/* @__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: A && /* @__PURE__ */ e(A, { className: "dc:w-4 dc:h-4" }) }),
|
|
1502
1502
|
/* @__PURE__ */ t("div", { className: "dc:flex-1 dc:min-w-0", children: [
|
|
1503
1503
|
/* @__PURE__ */ e("div", { className: "dc:text-sm text-dc-text dc:truncate", title: d.field, children: B }),
|
|
1504
1504
|
/* @__PURE__ */ e("div", { className: "dc:text-xs text-dc-text-muted dc:truncate", children: u })
|
|
@@ -1531,7 +1531,7 @@ const bn = me(function({
|
|
|
1531
1531
|
]
|
|
1532
1532
|
}
|
|
1533
1533
|
);
|
|
1534
|
-
}), yn =
|
|
1534
|
+
}), yn = $("add");
|
|
1535
1535
|
function vn(r, d) {
|
|
1536
1536
|
if (!d?.cubes) return null;
|
|
1537
1537
|
const [i] = r.split("."), s = d.cubes.find((m) => m.name === i);
|
|
@@ -1567,7 +1567,7 @@ const wn = me(function({
|
|
|
1567
1567
|
sortPriority: S,
|
|
1568
1568
|
index: L
|
|
1569
1569
|
};
|
|
1570
|
-
}), [d, i, n, k]),
|
|
1570
|
+
}), [d, i, n, k]), A = Z(null), B = F((p, L) => {
|
|
1571
1571
|
l(L), h.current = L, p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", JSON.stringify({ type: "metric", index: L, field: d[L].field }));
|
|
1572
1572
|
const P = p.currentTarget, S = P.cloneNode(!0);
|
|
1573
1573
|
S.style.cssText = `
|
|
@@ -1579,11 +1579,11 @@ const wn = me(function({
|
|
|
1579
1579
|
transform: rotate(2deg);
|
|
1580
1580
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
1581
1581
|
pointer-events: none;
|
|
1582
|
-
`, document.body.appendChild(S),
|
|
1582
|
+
`, document.body.appendChild(S), A.current = S;
|
|
1583
1583
|
const v = P.getBoundingClientRect(), T = p.clientX - v.left, E = p.clientY - v.top;
|
|
1584
1584
|
p.dataTransfer.setDragImage(S, T, E);
|
|
1585
1585
|
}, [d]), u = F(() => {
|
|
1586
|
-
l(null), c(null), h.current = null, N.current = null,
|
|
1586
|
+
l(null), c(null), h.current = null, N.current = null, A.current && (document.body.removeChild(A.current), A.current = null);
|
|
1587
1587
|
}, []), a = F((p, L) => {
|
|
1588
1588
|
p.preventDefault(), p.stopPropagation();
|
|
1589
1589
|
const P = h.current;
|
|
@@ -1713,7 +1713,7 @@ const wn = me(function({
|
|
|
1713
1713
|
onDragStart: h,
|
|
1714
1714
|
onDragEnd: N
|
|
1715
1715
|
}) {
|
|
1716
|
-
const k =
|
|
1716
|
+
const k = $("dimension"), R = $("timeDimension"), A = $("close"), B = $("chevronUp"), u = $("chevronDown"), a = $("chevronUpDown"), f = i?.shortTitle || i?.title || d.field.split(".").pop() || d.field, y = d.field.split(".")[0], w = d.isTimeDimension ? R : k, D = () => {
|
|
1717
1717
|
switch (g) {
|
|
1718
1718
|
case "asc":
|
|
1719
1719
|
return B ? /* @__PURE__ */ e(B, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -1789,13 +1789,13 @@ const wn = me(function({
|
|
|
1789
1789
|
onClick: s,
|
|
1790
1790
|
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",
|
|
1791
1791
|
title: "Remove breakdown",
|
|
1792
|
-
children: /* @__PURE__ */ e(
|
|
1792
|
+
children: /* @__PURE__ */ e(A, { className: "dc:w-4 dc:h-4" })
|
|
1793
1793
|
}
|
|
1794
1794
|
)
|
|
1795
1795
|
]
|
|
1796
1796
|
}
|
|
1797
1797
|
);
|
|
1798
|
-
}), Sn =
|
|
1798
|
+
}), Sn = $("add");
|
|
1799
1799
|
function Dn(r, d) {
|
|
1800
1800
|
if (!d?.cubes) return null;
|
|
1801
1801
|
const [i] = r.split("."), s = d.cubes.find((m) => m.name === i);
|
|
@@ -1824,8 +1824,8 @@ const zc = me(function({
|
|
|
1824
1824
|
onOrderChange: o,
|
|
1825
1825
|
onReorder: l
|
|
1826
1826
|
}) {
|
|
1827
|
-
const [b, c] = _(null), [h, N] = _(null), k = Z(null), R = Z(null),
|
|
1828
|
-
const T = g?.[S.field] || null, E = T ?
|
|
1827
|
+
const [b, c] = _(null), [h, N] = _(null), k = Z(null), R = Z(null), A = z(() => g ? Object.keys(g) : [], [g]), B = z(() => d.find((v) => v.isTimeDimension && v.enableComparison)?.id || null, [d]), u = z(() => d.map((S, v) => {
|
|
1828
|
+
const T = g?.[S.field] || null, E = T ? A.indexOf(S.field) + 1 : void 0;
|
|
1829
1829
|
return {
|
|
1830
1830
|
breakdown: S,
|
|
1831
1831
|
fieldMeta: Dn(S.field, i),
|
|
@@ -1833,7 +1833,7 @@ const zc = me(function({
|
|
|
1833
1833
|
sortPriority: E,
|
|
1834
1834
|
index: v
|
|
1835
1835
|
};
|
|
1836
|
-
}), [d, i, g,
|
|
1836
|
+
}), [d, i, g, A]), a = Z(null), f = F((S, v) => {
|
|
1837
1837
|
c(v), k.current = v, S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", JSON.stringify({ type: "breakdown", index: v, field: d[v].field }));
|
|
1838
1838
|
const T = S.currentTarget, E = T.cloneNode(!0);
|
|
1839
1839
|
E.style.cssText = `
|
|
@@ -1960,7 +1960,7 @@ const zc = me(function({
|
|
|
1960
1960
|
}
|
|
1961
1961
|
)
|
|
1962
1962
|
] });
|
|
1963
|
-
}), xc =
|
|
1963
|
+
}), xc = $("close"), Xt = $("chevronDown"), Tn = $("dimension"), $n = $("timeDimension"), An = $("measure");
|
|
1964
1964
|
function In({
|
|
1965
1965
|
filter: r,
|
|
1966
1966
|
schema: d,
|
|
@@ -1968,7 +1968,7 @@ function In({
|
|
|
1968
1968
|
onCancel: s,
|
|
1969
1969
|
anchorElement: m
|
|
1970
1970
|
}) {
|
|
1971
|
-
const [n, x] = _(r), [g, o] = _(!1), [l, b] = _(!1), [c, h] = _(!1), [N, k] = _("this_month"), [R,
|
|
1971
|
+
const [n, x] = _(r), [g, o] = _(!1), [l, b] = _(!1), [c, h] = _(!1), [N, k] = _("this_month"), [R, A] = _(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])(), {
|
|
1972
1972
|
values: ee,
|
|
1973
1973
|
loading: pe,
|
|
1974
1974
|
error: W,
|
|
@@ -2009,10 +2009,10 @@ function In({
|
|
|
2009
2009
|
const O = n.dateRange.match(/^last (\d+) (days|weeks|months|quarters|years)$/), Q = !O && n.dateRange.match(/^last (day|week|month|quarter|year)$/);
|
|
2010
2010
|
if (O) {
|
|
2011
2011
|
const [, J, ce] = O;
|
|
2012
|
-
k(`last_n_${ce}`),
|
|
2012
|
+
k(`last_n_${ce}`), A(parseInt(J) || 1);
|
|
2013
2013
|
} else if (Q) {
|
|
2014
2014
|
const [, J] = Q;
|
|
2015
|
-
k(`last_n_${J === "day" ? "days" : J === "week" ? "weeks" : J === "month" ? "months" : J === "quarter" ? "quarters" : "years"}`),
|
|
2015
|
+
k(`last_n_${J === "day" ? "days" : J === "week" ? "weeks" : J === "month" ? "months" : J === "quarter" ? "quarters" : "years"}`), A(1);
|
|
2016
2016
|
} else {
|
|
2017
2017
|
let J = !1;
|
|
2018
2018
|
for (const ce of Ut)
|
|
@@ -2081,7 +2081,7 @@ function In({
|
|
|
2081
2081
|
} else ht(O) ? Q = Ve(O, R) : Q = Ve(O);
|
|
2082
2082
|
x({ ...n, dateRange: Q });
|
|
2083
2083
|
}, [n, R]), he = F((O) => {
|
|
2084
|
-
if (
|
|
2084
|
+
if (A(O), ht(N)) {
|
|
2085
2085
|
const Q = Ve(N, O);
|
|
2086
2086
|
x({ ...n, dateRange: Q });
|
|
2087
2087
|
}
|
|
@@ -2091,7 +2091,7 @@ function In({
|
|
|
2091
2091
|
}, [n]), Ie = F((O) => {
|
|
2092
2092
|
const Q = O.target.value, ce = (Array.isArray(n.dateRange) ? n.dateRange : ["", n.dateRange || ""])[0] || Q;
|
|
2093
2093
|
x({ ...n, dateRange: [ce, Q] });
|
|
2094
|
-
}, [n]), ge = q.find((O) => O.operator === n.operator)?.label || n.operator,
|
|
2094
|
+
}, [n]), ge = q.find((O) => O.operator === n.operator)?.label || n.operator, Ae = Ut.find((O) => O.value === N)?.label || "Select range", Re = v ? $n : T ? An : Tn, Se = () => j?.requiresValues ? U ? /* @__PURE__ */ t("div", { className: "dc:space-y-2", children: [
|
|
2095
2095
|
/* @__PURE__ */ t("div", { className: "dc:relative", children: [
|
|
2096
2096
|
/* @__PURE__ */ t(
|
|
2097
2097
|
"button",
|
|
@@ -2101,7 +2101,7 @@ function In({
|
|
|
2101
2101
|
},
|
|
2102
2102
|
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",
|
|
2103
2103
|
children: [
|
|
2104
|
-
/* @__PURE__ */ e("span", { className: "dc:truncate", children:
|
|
2104
|
+
/* @__PURE__ */ e("span", { className: "dc:truncate", children: Ae }),
|
|
2105
2105
|
/* @__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" : ""}` })
|
|
2106
2106
|
]
|
|
2107
2107
|
}
|
|
@@ -2362,7 +2362,7 @@ function In({
|
|
|
2362
2362
|
}
|
|
2363
2363
|
) });
|
|
2364
2364
|
}
|
|
2365
|
-
const bc =
|
|
2365
|
+
const bc = $("close"), Rn = $("dimension"), Fn = $("timeDimension"), En = $("measure");
|
|
2366
2366
|
function Yc({
|
|
2367
2367
|
filter: r,
|
|
2368
2368
|
schema: d,
|
|
@@ -2425,7 +2425,7 @@ function On(r, d) {
|
|
|
2425
2425
|
const i = r.values || [];
|
|
2426
2426
|
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`;
|
|
2427
2427
|
}
|
|
2428
|
-
const Ln =
|
|
2428
|
+
const Ln = $("add"), Bn = $("close");
|
|
2429
2429
|
function Pn(r) {
|
|
2430
2430
|
return "member" in r && typeof r.member == "string";
|
|
2431
2431
|
}
|
|
@@ -2464,8 +2464,8 @@ function Jc({
|
|
|
2464
2464
|
m([]), o(!1);
|
|
2465
2465
|
}, [m]), R = F((f) => (y = []) => {
|
|
2466
2466
|
m([f, ...y]);
|
|
2467
|
-
}, [m]),
|
|
2468
|
-
return /* @__PURE__ */ t("div", { className: `dc:border ${
|
|
2467
|
+
}, [m]), A = () => 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";
|
|
2468
|
+
return /* @__PURE__ */ t("div", { className: `dc:border ${A()} dc:rounded-lg bg-dc-surface dc:w-full`, children: [
|
|
2469
2469
|
/* @__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: [
|
|
2470
2470
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:items-center dc:gap-2", children: [
|
|
2471
2471
|
/* @__PURE__ */ e(
|
|
@@ -2565,7 +2565,7 @@ function Jc({
|
|
|
2565
2565
|
) : null) })
|
|
2566
2566
|
] });
|
|
2567
2567
|
}
|
|
2568
|
-
const qn =
|
|
2568
|
+
const qn = $("add");
|
|
2569
2569
|
function Dt(r) {
|
|
2570
2570
|
return "member" in r && typeof r.member == "string";
|
|
2571
2571
|
}
|
|
@@ -2629,7 +2629,7 @@ function ze({
|
|
|
2629
2629
|
i(v), x(!1), l.current = [];
|
|
2630
2630
|
},
|
|
2631
2631
|
[r, i]
|
|
2632
|
-
),
|
|
2632
|
+
), A = F(
|
|
2633
2633
|
(w, D) => {
|
|
2634
2634
|
const p = [...r];
|
|
2635
2635
|
p[w] = D, i(p);
|
|
@@ -2661,7 +2661,7 @@ function ze({
|
|
|
2661
2661
|
{
|
|
2662
2662
|
filter: w,
|
|
2663
2663
|
schema: d,
|
|
2664
|
-
onUpdate: (P) =>
|
|
2664
|
+
onUpdate: (P) => A(D, P),
|
|
2665
2665
|
onRemove: () => B(D)
|
|
2666
2666
|
},
|
|
2667
2667
|
`filter-${L.join("-")}`
|
|
@@ -2670,7 +2670,7 @@ function ze({
|
|
|
2670
2670
|
{
|
|
2671
2671
|
group: w,
|
|
2672
2672
|
schema: d,
|
|
2673
|
-
onUpdate: (P) =>
|
|
2673
|
+
onUpdate: (P) => A(D, P),
|
|
2674
2674
|
onRemove: () => B(D),
|
|
2675
2675
|
onAddFilter: f(L),
|
|
2676
2676
|
hideRemoveButton: r.length === 1
|
|
@@ -2740,7 +2740,7 @@ function ze({
|
|
|
2740
2740
|
)
|
|
2741
2741
|
] });
|
|
2742
2742
|
}
|
|
2743
|
-
const jn =
|
|
2743
|
+
const jn = $("close"), Qn = $("dimension"), Gn = $("timeDimension"), _n = $("measure");
|
|
2744
2744
|
function Hn({
|
|
2745
2745
|
config: r,
|
|
2746
2746
|
fields: d,
|
|
@@ -2755,14 +2755,14 @@ function Hn({
|
|
|
2755
2755
|
yAxisAssignment: b,
|
|
2756
2756
|
onYAxisAssignmentChange: c
|
|
2757
2757
|
}) {
|
|
2758
|
-
const { key: h, label: N, description: k, mandatory: R, maxItems:
|
|
2758
|
+
const { key: h, label: N, description: k, mandatory: R, maxItems: A, emptyText: B } = r, [u, a] = _(null), [f, y] = _(!1), [w, D] = _(!1), p = Z(null), L = Z(null), P = Z(d);
|
|
2759
2759
|
P.current = d;
|
|
2760
2760
|
const S = Z(null), v = () => {
|
|
2761
2761
|
let I = d.length;
|
|
2762
|
-
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)),
|
|
2762
|
+
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)), !A || I < A;
|
|
2763
2763
|
}, T = () => {
|
|
2764
2764
|
let I = d.length;
|
|
2765
|
-
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)),
|
|
2765
|
+
return o && o.fromAxis === h && (I = Math.max(0, d.length - 1)), A && I >= A;
|
|
2766
2766
|
}, E = v(), M = T();
|
|
2767
2767
|
Y(() => {
|
|
2768
2768
|
const I = () => {
|
|
@@ -2838,15 +2838,15 @@ function Hn({
|
|
|
2838
2838
|
{
|
|
2839
2839
|
ref: L,
|
|
2840
2840
|
"data-axis-container": h,
|
|
2841
|
-
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 ||
|
|
2841
|
+
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 || A === 1) || w ? "dc:shadow-sm dc:border-solid" : M ? "bg-dc-surface-secondary" : "bg-dc-surface-secondary hover:bg-dc-surface-hover"}`,
|
|
2842
2842
|
style: {
|
|
2843
|
-
borderColor: f && (E ||
|
|
2844
|
-
backgroundColor: f && (E ||
|
|
2843
|
+
borderColor: f && (E || A === 1) || w ? "var(--dc-primary)" : "var(--dc-border)",
|
|
2844
|
+
backgroundColor: f && (E || A === 1) || w ? "rgba(var(--dc-primary-rgb), 0.1)" : void 0
|
|
2845
2845
|
},
|
|
2846
2846
|
onDragOver: (I) => {
|
|
2847
2847
|
if (o && o.fromAxis === h && o.fromIndex !== void 0)
|
|
2848
2848
|
return;
|
|
2849
|
-
E ||
|
|
2849
|
+
E || A === 1 ? (y(!0), x(I)) : (I.preventDefault(), I.dataTransfer.dropEffect = "none");
|
|
2850
2850
|
},
|
|
2851
2851
|
onDragLeave: (I) => {
|
|
2852
2852
|
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);
|
|
@@ -2855,7 +2855,7 @@ function Hn({
|
|
|
2855
2855
|
onDrop: (I) => {
|
|
2856
2856
|
if (o && o.fromAxis === h && o.fromIndex !== void 0)
|
|
2857
2857
|
return;
|
|
2858
|
-
E ||
|
|
2858
|
+
E || A === 1 ? i(I, h) : I.preventDefault(), y(!1), D(!1);
|
|
2859
2859
|
},
|
|
2860
2860
|
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(
|
|
2861
2861
|
"div",
|
|
@@ -3017,7 +3017,7 @@ function gc({
|
|
|
3017
3017
|
}
|
|
3018
3018
|
),
|
|
3019
3019
|
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) => {
|
|
3020
|
-
const h = dc[c], N = oc(c), k = pt(c), R = r === c,
|
|
3020
|
+
const h = dc[c], N = oc(c), k = pt(c), R = r === c, A = h?.description, B = h?.useCase, u = m?.[c], a = u?.available ?? !0, f = u?.reason, y = !a && f ? f : [A, B].filter(Boolean).join(". ");
|
|
3021
3021
|
return /* @__PURE__ */ t(
|
|
3022
3022
|
"button",
|
|
3023
3023
|
{
|
|
@@ -3060,7 +3060,7 @@ function gc({
|
|
|
3060
3060
|
}) }) }) })
|
|
3061
3061
|
] });
|
|
3062
3062
|
}
|
|
3063
|
-
const Kn =
|
|
3063
|
+
const Kn = $("measure"), Vn = $("dimension"), zn = $("timeDimension");
|
|
3064
3064
|
function Yn({
|
|
3065
3065
|
chartType: r,
|
|
3066
3066
|
chartConfig: d,
|
|
@@ -3096,7 +3096,7 @@ function Yn({
|
|
|
3096
3096
|
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);
|
|
3097
3097
|
}), T && g(E);
|
|
3098
3098
|
}, [b, d, c.dropZones, g, k, h]);
|
|
3099
|
-
const R = (v) => b.measures.includes(v) ? "measure" : b.timeDimensions.includes(v) ? "timeDimension" : "dimension",
|
|
3099
|
+
const R = (v) => b.measures.includes(v) ? "measure" : b.timeDimensions.includes(v) ? "timeDimension" : "dimension", A = (v) => {
|
|
3100
3100
|
if (!m?.cubes) return null;
|
|
3101
3101
|
const [T] = v.split("."), E = m.cubes.find((q) => q.name === T);
|
|
3102
3102
|
if (!E) return null;
|
|
@@ -3105,7 +3105,7 @@ function Yn({
|
|
|
3105
3105
|
const j = E.dimensions?.find((q) => q.name === v);
|
|
3106
3106
|
return j ? { ...j, fieldType: j.type === "time" ? "timeDimension" : "dimension" } : null;
|
|
3107
3107
|
}, B = (v) => {
|
|
3108
|
-
const T = R(v), E = v.split("."), M = E[0] || v, j = E[1] || v, q =
|
|
3108
|
+
const T = R(v), E = v.split("."), M = E[0] || v, j = E[1] || v, q = A(v), U = s.find((re) => re.field === v);
|
|
3109
3109
|
return q ? {
|
|
3110
3110
|
title: q.title || j,
|
|
3111
3111
|
shortTitle: q.shortTitle || q.title || j,
|
|
@@ -3313,7 +3313,7 @@ function Yn({
|
|
|
3313
3313
|
!N && b.measures.length === 0 && b.dimensions.length === 0 && b.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." }) })
|
|
3314
3314
|
] });
|
|
3315
3315
|
}
|
|
3316
|
-
const yc =
|
|
3316
|
+
const yc = $("chevronDown"), vc = $("check"), Nc = $("search"), Jn = me(function({
|
|
3317
3317
|
bindingKey: d,
|
|
3318
3318
|
onChange: i,
|
|
3319
3319
|
schema: s,
|
|
@@ -3340,7 +3340,7 @@ const yc = A("chevronDown"), vc = A("check"), Nc = A("search"), Jn = me(function
|
|
|
3340
3340
|
i({ dimension: f }), g(!1), l("");
|
|
3341
3341
|
},
|
|
3342
3342
|
[i]
|
|
3343
|
-
),
|
|
3343
|
+
), A = F(
|
|
3344
3344
|
(f) => {
|
|
3345
3345
|
f.stopPropagation(), i(null);
|
|
3346
3346
|
},
|
|
@@ -3381,8 +3381,8 @@ const yc = A("chevronDown"), vc = A("check"), Nc = A("search"), Jn = me(function
|
|
|
3381
3381
|
{
|
|
3382
3382
|
role: "button",
|
|
3383
3383
|
tabIndex: 0,
|
|
3384
|
-
onClick:
|
|
3385
|
-
onKeyDown: (f) => f.key === "Enter" &&
|
|
3384
|
+
onClick: A,
|
|
3385
|
+
onKeyDown: (f) => f.key === "Enter" && A(f),
|
|
3386
3386
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
3387
3387
|
title: "Clear binding key",
|
|
3388
3388
|
children: "×"
|
|
@@ -3435,7 +3435,7 @@ const yc = A("chevronDown"), vc = A("check"), Nc = A("search"), Jn = me(function
|
|
|
3435
3435
|
/* @__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)" })
|
|
3436
3436
|
] })
|
|
3437
3437
|
] }) });
|
|
3438
|
-
}), Wn =
|
|
3438
|
+
}), Wn = $("chartBar"), Un = $("chartFunnel"), Xn = $("chartSankey"), Zn = $("chartRetention"), er = [
|
|
3439
3439
|
{
|
|
3440
3440
|
type: "query",
|
|
3441
3441
|
label: "Query",
|
|
@@ -3489,7 +3489,7 @@ const yc = A("chevronDown"), vc = A("check"), Nc = A("search"), Jn = me(function
|
|
|
3489
3489
|
g.type
|
|
3490
3490
|
);
|
|
3491
3491
|
}) });
|
|
3492
|
-
}), bt =
|
|
3492
|
+
}), bt = $("chevronDown"), wc = $("chevronRight"), gt = $("check"), Cc = $("search"), cr = $("dimension"), dr = $("link"), nr = $("timeDimension");
|
|
3493
3493
|
function rr(r) {
|
|
3494
3494
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
3495
3495
|
cube: d.name,
|
|
@@ -3535,7 +3535,7 @@ const Zt = me(function({
|
|
|
3535
3535
|
D.length > 0 && (f[y] = D);
|
|
3536
3536
|
}
|
|
3537
3537
|
return f;
|
|
3538
|
-
}, [k, b]),
|
|
3538
|
+
}, [k, b]), A = F(
|
|
3539
3539
|
(a) => {
|
|
3540
3540
|
x(a), l(!1), c("");
|
|
3541
3541
|
},
|
|
@@ -3618,7 +3618,7 @@ const Zt = me(function({
|
|
|
3618
3618
|
f.map((y) => /* @__PURE__ */ t(
|
|
3619
3619
|
"button",
|
|
3620
3620
|
{
|
|
3621
|
-
onClick: () =>
|
|
3621
|
+
onClick: () => A(y.dimension),
|
|
3622
3622
|
className: `
|
|
3623
3623
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
3624
3624
|
dc:rounded dc:transition-colors
|
|
@@ -3662,7 +3662,7 @@ const Zt = me(function({
|
|
|
3662
3662
|
!i && a.bindingKey && x({ dimension: a.bindingKey }), !s && a.timeDimension && g(a.timeDimension);
|
|
3663
3663
|
}
|
|
3664
3664
|
}, [d, m, i, s, x, g]);
|
|
3665
|
-
const R = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null,
|
|
3665
|
+
const R = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null, A = F(
|
|
3666
3666
|
(u) => {
|
|
3667
3667
|
x(u ? { dimension: u } : null);
|
|
3668
3668
|
},
|
|
@@ -3706,7 +3706,7 @@ const Zt = me(function({
|
|
|
3706
3706
|
placeholder: d ? "Select binding key" : "Select cube first",
|
|
3707
3707
|
icon: dr,
|
|
3708
3708
|
options: l,
|
|
3709
|
-
onChange:
|
|
3709
|
+
onChange: A,
|
|
3710
3710
|
helpText: "Entity that connects steps (e.g., user ID, order ID)"
|
|
3711
3711
|
}
|
|
3712
3712
|
),
|
|
@@ -3724,7 +3724,7 @@ const Zt = me(function({
|
|
|
3724
3724
|
)
|
|
3725
3725
|
] })
|
|
3726
3726
|
] });
|
|
3727
|
-
}), Sc =
|
|
3727
|
+
}), Sc = $("menu"), Dc = $("close"), kc = $("chevronDown"), Tc = $("check"), $c = $("timeDimension"), Ac = [
|
|
3728
3728
|
{ value: null, label: "No limit" },
|
|
3729
3729
|
{ value: "PT1H", label: "1 hour" },
|
|
3730
3730
|
{ value: "PT6H", label: "6 hours" },
|
|
@@ -3745,14 +3745,14 @@ const Zt = me(function({
|
|
|
3745
3745
|
onRemove: g,
|
|
3746
3746
|
onUpdate: o
|
|
3747
3747
|
}) {
|
|
3748
|
-
const [l, b] = _(!1), [c, h] = _(!1), [N, k] = _(d.name), R = Z(null),
|
|
3748
|
+
const [l, b] = _(!1), [c, h] = _(!1), [N, k] = _(d.name), R = Z(null), A = Z(null);
|
|
3749
3749
|
Y(() => {
|
|
3750
3750
|
k(d.name);
|
|
3751
3751
|
}, [d.name]), Y(() => {
|
|
3752
3752
|
l && R.current && (R.current.focus(), R.current.select());
|
|
3753
3753
|
}, [l]), Y(() => {
|
|
3754
3754
|
function p(L) {
|
|
3755
|
-
|
|
3755
|
+
A.current && !A.current.contains(L.target) && h(!1);
|
|
3756
3756
|
}
|
|
3757
3757
|
if (c)
|
|
3758
3758
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
@@ -3780,7 +3780,7 @@ const Zt = me(function({
|
|
|
3780
3780
|
o({ filters: p });
|
|
3781
3781
|
},
|
|
3782
3782
|
[o]
|
|
3783
|
-
), w = d.timeToConvert ?
|
|
3783
|
+
), w = d.timeToConvert ? Ac.find((p) => p.value === d.timeToConvert)?.label || d.timeToConvert : "No limit", D = z(() => {
|
|
3784
3784
|
if (!n) return null;
|
|
3785
3785
|
const p = {
|
|
3786
3786
|
cubes: n.cubes.map((L) => ({
|
|
@@ -3850,10 +3850,10 @@ const Zt = me(function({
|
|
|
3850
3850
|
),
|
|
3851
3851
|
i > 0 && /* @__PURE__ */ t("div", { children: [
|
|
3852
3852
|
/* @__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: [
|
|
3853
|
-
|
|
3853
|
+
$c && /* @__PURE__ */ e($c, { className: "dc:w-3.5 dc:h-3.5" }),
|
|
3854
3854
|
"Time Window"
|
|
3855
3855
|
] }),
|
|
3856
|
-
/* @__PURE__ */ t("div", { ref:
|
|
3856
|
+
/* @__PURE__ */ t("div", { ref: A, className: "dc:relative", children: [
|
|
3857
3857
|
/* @__PURE__ */ t(
|
|
3858
3858
|
"button",
|
|
3859
3859
|
{
|
|
@@ -3877,7 +3877,7 @@ const Zt = me(function({
|
|
|
3877
3877
|
}
|
|
3878
3878
|
),
|
|
3879
3879
|
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: [
|
|
3880
|
-
|
|
3880
|
+
Ac.map((p) => /* @__PURE__ */ t(
|
|
3881
3881
|
"button",
|
|
3882
3882
|
{
|
|
3883
3883
|
onClick: () => f(p.value),
|
|
@@ -3914,7 +3914,7 @@ const Zt = me(function({
|
|
|
3914
3914
|
]
|
|
3915
3915
|
}
|
|
3916
3916
|
);
|
|
3917
|
-
}), Ic =
|
|
3917
|
+
}), Ic = $("add"), or = me(function({
|
|
3918
3918
|
steps: d,
|
|
3919
3919
|
activeStepIndex: i,
|
|
3920
3920
|
schema: s,
|
|
@@ -3930,7 +3930,7 @@ const Zt = me(function({
|
|
|
3930
3930
|
u.preventDefault(), l !== null && l !== a && h(a);
|
|
3931
3931
|
}, [l]), R = F(() => {
|
|
3932
3932
|
h(null);
|
|
3933
|
-
}, []),
|
|
3933
|
+
}, []), A = F((u, a) => {
|
|
3934
3934
|
u.preventDefault(), l !== null && l !== a && o(l, a), b(null), h(null);
|
|
3935
3935
|
}, [l, o]), B = F(() => {
|
|
3936
3936
|
b(null), h(null);
|
|
@@ -3964,7 +3964,7 @@ const Zt = me(function({
|
|
|
3964
3964
|
onDragStart: () => N(a),
|
|
3965
3965
|
onDragOver: (f) => k(f, a),
|
|
3966
3966
|
onDragLeave: R,
|
|
3967
|
-
onDrop: (f) =>
|
|
3967
|
+
onDrop: (f) => A(f, a),
|
|
3968
3968
|
onDragEnd: B,
|
|
3969
3969
|
className: `dc:transition-all ${l === a ? "dc:opacity-50" : ""} ${c === a ? "dc:border-t-2 border-dc-primary dc:pt-1" : ""}`,
|
|
3970
3970
|
children: /* @__PURE__ */ e(
|
|
@@ -4013,11 +4013,11 @@ const Zt = me(function({
|
|
|
4013
4013
|
onBindingKeyChange: k,
|
|
4014
4014
|
// Display props
|
|
4015
4015
|
chartType: R = "funnel",
|
|
4016
|
-
displayConfig:
|
|
4016
|
+
displayConfig: A,
|
|
4017
4017
|
colorPalette: B,
|
|
4018
4018
|
onDisplayConfigChange: u
|
|
4019
4019
|
}) {
|
|
4020
|
-
const [a, f] = _("steps"), y =
|
|
4020
|
+
const [a, f] = _("steps"), y = A && u;
|
|
4021
4021
|
return /* @__PURE__ */ t("div", { className: "dc:flex dc:flex-col dc:h-full", children: [
|
|
4022
4022
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:border-b border-dc-border dc:flex-shrink-0", children: [
|
|
4023
4023
|
/* @__PURE__ */ e(
|
|
@@ -4065,17 +4065,17 @@ const Zt = me(function({
|
|
|
4065
4065
|
onReorderSteps: h
|
|
4066
4066
|
}
|
|
4067
4067
|
) })
|
|
4068
|
-
] }) : a === "display" &&
|
|
4068
|
+
] }) : a === "display" && A && u ? /* @__PURE__ */ e("div", { className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4", children: /* @__PURE__ */ e(
|
|
4069
4069
|
St,
|
|
4070
4070
|
{
|
|
4071
4071
|
chartType: R,
|
|
4072
|
-
displayConfig:
|
|
4072
|
+
displayConfig: A,
|
|
4073
4073
|
colorPalette: B,
|
|
4074
4074
|
onDisplayConfigChange: u
|
|
4075
4075
|
}
|
|
4076
4076
|
) }) : null
|
|
4077
4077
|
] });
|
|
4078
|
-
}), yt =
|
|
4078
|
+
}), yt = $("chevronDown"), Rc = $("chevronRight"), vt = $("check"), Fc = $("search"), ur = $("dimension"), mr = $("link"), hr = $("timeDimension"), fr = $("dimension");
|
|
4079
4079
|
function pr(r) {
|
|
4080
4080
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
4081
4081
|
cube: d.name,
|
|
@@ -4132,7 +4132,7 @@ const xt = me(function({
|
|
|
4132
4132
|
D.length > 0 && (f[y] = D);
|
|
4133
4133
|
}
|
|
4134
4134
|
return f;
|
|
4135
|
-
}, [k, b]),
|
|
4135
|
+
}, [k, b]), A = F(
|
|
4136
4136
|
(a) => {
|
|
4137
4137
|
x(a), l(!1), c("");
|
|
4138
4138
|
},
|
|
@@ -4215,7 +4215,7 @@ const xt = me(function({
|
|
|
4215
4215
|
f.map((y) => /* @__PURE__ */ t(
|
|
4216
4216
|
"button",
|
|
4217
4217
|
{
|
|
4218
|
-
onClick: () =>
|
|
4218
|
+
onClick: () => A(y.dimension),
|
|
4219
4219
|
className: `
|
|
4220
4220
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
4221
4221
|
dc:rounded dc:transition-colors
|
|
@@ -4253,9 +4253,9 @@ const xt = me(function({
|
|
|
4253
4253
|
}, [n, d]), N = z(() => {
|
|
4254
4254
|
const y = br(n);
|
|
4255
4255
|
return d ? y.filter((w) => w.cube === d) : [];
|
|
4256
|
-
}, [n, d]), k = !!(d && i && s && m), [R,
|
|
4256
|
+
}, [n, d]), k = !!(d && i && s && m), [R, A] = _(!1), B = Z(!1);
|
|
4257
4257
|
Y(() => {
|
|
4258
|
-
k && !B.current && (B.current = !0,
|
|
4258
|
+
k && !B.current && (B.current = !0, A(!0));
|
|
4259
4259
|
}, [k]), Y(() => {
|
|
4260
4260
|
if (!d || !n) return;
|
|
4261
4261
|
const y = n.cubes?.find((w) => w.name === d);
|
|
@@ -4275,7 +4275,7 @@ const xt = me(function({
|
|
|
4275
4275
|
"button",
|
|
4276
4276
|
{
|
|
4277
4277
|
type: "button",
|
|
4278
|
-
onClick: () =>
|
|
4278
|
+
onClick: () => A(!R),
|
|
4279
4279
|
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",
|
|
4280
4280
|
children: [
|
|
4281
4281
|
/* @__PURE__ */ t("div", { className: "dc:flex dc:items-center dc:gap-2", children: [
|
|
@@ -4354,7 +4354,7 @@ const xt = me(function({
|
|
|
4354
4354
|
onEventDimensionChange: N,
|
|
4355
4355
|
onStartingStepFiltersChange: k,
|
|
4356
4356
|
onStepsBeforeChange: R,
|
|
4357
|
-
onStepsAfterChange:
|
|
4357
|
+
onStepsAfterChange: A,
|
|
4358
4358
|
onJoinStrategyChange: B,
|
|
4359
4359
|
// Chart type (affects query!)
|
|
4360
4360
|
chartType: u = "sankey",
|
|
@@ -4487,7 +4487,7 @@ const xt = me(function({
|
|
|
4487
4487
|
min: uc,
|
|
4488
4488
|
max: lc,
|
|
4489
4489
|
value: g,
|
|
4490
|
-
onChange: (S) =>
|
|
4490
|
+
onChange: (S) => A(parseInt(S.target.value, 10)),
|
|
4491
4491
|
className: "dc:flex-1"
|
|
4492
4492
|
}
|
|
4493
4493
|
),
|
|
@@ -4525,7 +4525,7 @@ const xt = me(function({
|
|
|
4525
4525
|
}
|
|
4526
4526
|
) }) : null
|
|
4527
4527
|
] });
|
|
4528
|
-
}), Be =
|
|
4528
|
+
}), Be = $("chevronDown"), Ec = $("chevronRight"), Nt = $("check"), Oc = $("search"), vr = $("dimension"), Nr = $("link"), wr = $("timeDimension"), Lc = $("timeDimension");
|
|
4529
4529
|
function Cr(r) {
|
|
4530
4530
|
return r?.cubes ? r.cubes.filter((d) => d.meta?.eventStream).map((d) => ({
|
|
4531
4531
|
cube: d.name,
|
|
@@ -4573,7 +4573,7 @@ const ec = me(function({
|
|
|
4573
4573
|
D.length > 0 && (f[y] = D);
|
|
4574
4574
|
}
|
|
4575
4575
|
return f;
|
|
4576
|
-
}, [k, b]),
|
|
4576
|
+
}, [k, b]), A = F(
|
|
4577
4577
|
(a) => {
|
|
4578
4578
|
x(a), l(!1), c("");
|
|
4579
4579
|
},
|
|
@@ -4656,7 +4656,7 @@ const ec = me(function({
|
|
|
4656
4656
|
f.map((y) => /* @__PURE__ */ t(
|
|
4657
4657
|
"button",
|
|
4658
4658
|
{
|
|
4659
|
-
onClick: () =>
|
|
4659
|
+
onClick: () => A(y.dimension),
|
|
4660
4660
|
className: `
|
|
4661
4661
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
4662
4662
|
dc:rounded dc:transition-colors
|
|
@@ -4693,7 +4693,7 @@ const ec = me(function({
|
|
|
4693
4693
|
}
|
|
4694
4694
|
},
|
|
4695
4695
|
[i]
|
|
4696
|
-
),
|
|
4696
|
+
), A = F(() => {
|
|
4697
4697
|
b && h && (i({ start: b, end: h }), l("custom"), g(!1));
|
|
4698
4698
|
}, [b, h, i]);
|
|
4699
4699
|
Y(() => {
|
|
@@ -4780,7 +4780,7 @@ const ec = me(function({
|
|
|
4780
4780
|
"button",
|
|
4781
4781
|
{
|
|
4782
4782
|
type: "button",
|
|
4783
|
-
onClick:
|
|
4783
|
+
onClick: A,
|
|
4784
4784
|
disabled: !b || !h,
|
|
4785
4785
|
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",
|
|
4786
4786
|
children: "Apply Custom Range"
|
|
@@ -4813,7 +4813,7 @@ const ec = me(function({
|
|
|
4813
4813
|
Y(() => {
|
|
4814
4814
|
h && !R.current && (R.current = !0, k(!0));
|
|
4815
4815
|
}, [h]);
|
|
4816
|
-
const
|
|
4816
|
+
const A = i?.dimension ? typeof i.dimension == "string" ? i.dimension : i.dimension[0]?.dimension || null : null, B = F(
|
|
4817
4817
|
(f) => {
|
|
4818
4818
|
g(f ? { dimension: f } : null);
|
|
4819
4819
|
},
|
|
@@ -4856,7 +4856,7 @@ const ec = me(function({
|
|
|
4856
4856
|
/* @__PURE__ */ e(
|
|
4857
4857
|
ec,
|
|
4858
4858
|
{
|
|
4859
|
-
value:
|
|
4859
|
+
value: A,
|
|
4860
4860
|
label: "Binding Key",
|
|
4861
4861
|
placeholder: d ? "Select user identifier" : "Select cube first",
|
|
4862
4862
|
icon: Nr,
|
|
@@ -4891,7 +4891,7 @@ function Tr(r) {
|
|
|
4891
4891
|
enableComparison: !1
|
|
4892
4892
|
}));
|
|
4893
4893
|
}
|
|
4894
|
-
const
|
|
4894
|
+
const $r = me(function({
|
|
4895
4895
|
retentionCube: d = null,
|
|
4896
4896
|
retentionBindingKey: i = null,
|
|
4897
4897
|
retentionTimeDimension: s = null,
|
|
@@ -4911,7 +4911,7 @@ const Ar = me(function({
|
|
|
4911
4911
|
},
|
|
4912
4912
|
onDateRangeChange: R = () => {
|
|
4913
4913
|
},
|
|
4914
|
-
onCohortFiltersChange:
|
|
4914
|
+
onCohortFiltersChange: A = () => {
|
|
4915
4915
|
},
|
|
4916
4916
|
onActivityFiltersChange: B = () => {
|
|
4917
4917
|
},
|
|
@@ -5006,7 +5006,7 @@ const Ar = me(function({
|
|
|
5006
5006
|
{
|
|
5007
5007
|
filters: n,
|
|
5008
5008
|
schema: q,
|
|
5009
|
-
onFiltersChange:
|
|
5009
|
+
onFiltersChange: A,
|
|
5010
5010
|
dimensionsOnly: !0
|
|
5011
5011
|
}
|
|
5012
5012
|
)
|
|
@@ -5108,7 +5108,7 @@ const Ar = me(function({
|
|
|
5108
5108
|
}
|
|
5109
5109
|
) }) : null
|
|
5110
5110
|
] });
|
|
5111
|
-
}), Bc =
|
|
5111
|
+
}), Bc = $("add"), Ar = $("close"), tc = $("info"), cc = $("warning"), Pc = $("link"), Ir = me(function({
|
|
5112
5112
|
metrics: d,
|
|
5113
5113
|
breakdowns: i,
|
|
5114
5114
|
filters: s,
|
|
@@ -5124,7 +5124,7 @@ const Ar = me(function({
|
|
|
5124
5124
|
onBreakdownComparisonToggle: N,
|
|
5125
5125
|
onReorderBreakdowns: k,
|
|
5126
5126
|
onFiltersChange: R,
|
|
5127
|
-
onDropFieldToFilter:
|
|
5127
|
+
onDropFieldToFilter: A,
|
|
5128
5128
|
// Sorting
|
|
5129
5129
|
order: B,
|
|
5130
5130
|
onOrderChange: u,
|
|
@@ -5168,7 +5168,7 @@ const Ar = me(function({
|
|
|
5168
5168
|
onAddFunnelStep: be,
|
|
5169
5169
|
onRemoveFunnelStep: Ie,
|
|
5170
5170
|
onUpdateFunnelStep: ge,
|
|
5171
|
-
onSelectFunnelStep:
|
|
5171
|
+
onSelectFunnelStep: Ae,
|
|
5172
5172
|
onReorderFunnelSteps: Re,
|
|
5173
5173
|
onFunnelTimeDimensionChange: Se,
|
|
5174
5174
|
// Funnel display config (for Display tab)
|
|
@@ -5192,10 +5192,10 @@ const Ar = me(function({
|
|
|
5192
5192
|
onStepsAfterChange: Ue,
|
|
5193
5193
|
onFlowJoinStrategyChange: kt,
|
|
5194
5194
|
flowDisplayConfig: Tt,
|
|
5195
|
-
onFlowDisplayConfigChange:
|
|
5195
|
+
onFlowDisplayConfigChange: $t,
|
|
5196
5196
|
// Retention Mode props (simplified Mixpanel-style)
|
|
5197
5197
|
retentionCube: Xe,
|
|
5198
|
-
retentionBindingKey:
|
|
5198
|
+
retentionBindingKey: At,
|
|
5199
5199
|
retentionTimeDimension: It,
|
|
5200
5200
|
retentionDateRange: Rt,
|
|
5201
5201
|
retentionCohortFilters: Ft = [],
|
|
@@ -5219,7 +5219,7 @@ const Ar = me(function({
|
|
|
5219
5219
|
retentionDisplayConfig: rt,
|
|
5220
5220
|
onRetentionDisplayConfigChange: st
|
|
5221
5221
|
}) {
|
|
5222
|
-
const ve = T > 1, Fe = oe === "funnel", at = oe === "flow", Qe = oe === "retention",
|
|
5222
|
+
const ve = T > 1, Fe = oe === "funnel", at = oe === "flow", Qe = oe === "retention", $e = oe === "funnel", Ge = F((V) => {
|
|
5223
5223
|
if (!m?.cubes) return null;
|
|
5224
5224
|
const [ne] = V.field.split("."), He = m.cubes.find((Ne) => Ne.name === ne);
|
|
5225
5225
|
return He && He.dimensions?.find((Ne) => Ne.name === V.field) || null;
|
|
@@ -5241,7 +5241,7 @@ const Ar = me(function({
|
|
|
5241
5241
|
schema: m
|
|
5242
5242
|
}
|
|
5243
5243
|
),
|
|
5244
|
-
|
|
5244
|
+
$e && he && be && Ie && ge && Ae && Re && Se && X ? /* @__PURE__ */ e(
|
|
5245
5245
|
lr,
|
|
5246
5246
|
{
|
|
5247
5247
|
funnelCube: le,
|
|
@@ -5254,7 +5254,7 @@ const Ar = me(function({
|
|
|
5254
5254
|
onAddStep: be,
|
|
5255
5255
|
onRemoveStep: Ie,
|
|
5256
5256
|
onUpdateStep: ge,
|
|
5257
|
-
onSelectStep:
|
|
5257
|
+
onSelectStep: Ae,
|
|
5258
5258
|
onReorderSteps: Re,
|
|
5259
5259
|
onTimeDimensionChange: Se,
|
|
5260
5260
|
onBindingKeyChange: X,
|
|
@@ -5289,16 +5289,16 @@ const Ar = me(function({
|
|
|
5289
5289
|
onChartTypeChange: p,
|
|
5290
5290
|
displayConfig: Tt,
|
|
5291
5291
|
colorPalette: w,
|
|
5292
|
-
onDisplayConfigChange:
|
|
5292
|
+
onDisplayConfigChange: $t
|
|
5293
5293
|
}
|
|
5294
5294
|
)
|
|
5295
5295
|
) : Qe ? (
|
|
5296
5296
|
/* Retention Mode - dedicated UI when analysisType === 'retention' (simplified Mixpanel-style) */
|
|
5297
5297
|
/* @__PURE__ */ e(
|
|
5298
|
-
|
|
5298
|
+
$r,
|
|
5299
5299
|
{
|
|
5300
5300
|
retentionCube: Xe ?? null,
|
|
5301
|
-
retentionBindingKey:
|
|
5301
|
+
retentionBindingKey: At ?? null,
|
|
5302
5302
|
retentionTimeDimension: It ?? null,
|
|
5303
5303
|
retentionDateRange: Rt ?? { start: "", end: "" },
|
|
5304
5304
|
retentionCohortFilters: Ft,
|
|
@@ -5359,7 +5359,7 @@ const Ar = me(function({
|
|
|
5359
5359
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-danger-bg hover:text-dc-error dc:transition-colors dc:ml-0.5",
|
|
5360
5360
|
title: "Remove query",
|
|
5361
5361
|
"aria-label": `Remove ${ot(ne)}`,
|
|
5362
|
-
children: /* @__PURE__ */ e(
|
|
5362
|
+
children: /* @__PURE__ */ e(Ar, { className: "dc:w-3 dc:h-3" })
|
|
5363
5363
|
}
|
|
5364
5364
|
)
|
|
5365
5365
|
]
|
|
@@ -5531,7 +5531,7 @@ const Ar = me(function({
|
|
|
5531
5531
|
filters: s,
|
|
5532
5532
|
schema: m,
|
|
5533
5533
|
onFiltersChange: R,
|
|
5534
|
-
onFieldDropped:
|
|
5534
|
+
onFieldDropped: A
|
|
5535
5535
|
}
|
|
5536
5536
|
)
|
|
5537
5537
|
] }) : n === "chart" ? (
|
|
@@ -5563,7 +5563,7 @@ const Ar = me(function({
|
|
|
5563
5563
|
) : null })
|
|
5564
5564
|
] })
|
|
5565
5565
|
] });
|
|
5566
|
-
}), Mc =
|
|
5566
|
+
}), Mc = $("sparkles"), Rr = $("error");
|
|
5567
5567
|
function Fr({
|
|
5568
5568
|
userPrompt: r,
|
|
5569
5569
|
onPromptChange: d,
|
|
@@ -5661,7 +5661,7 @@ function Fr({
|
|
|
5661
5661
|
}
|
|
5662
5662
|
);
|
|
5663
5663
|
}
|
|
5664
|
-
const qc =
|
|
5664
|
+
const qc = $("warning"), jc = $("refresh");
|
|
5665
5665
|
class Er extends xd {
|
|
5666
5666
|
constructor(d) {
|
|
5667
5667
|
super(d), this.state = {
|
|
@@ -5754,7 +5754,7 @@ const Zc = Qc(
|
|
|
5754
5754
|
aiState: N,
|
|
5755
5755
|
handleOpenAI: k,
|
|
5756
5756
|
handleCloseAI: R,
|
|
5757
|
-
handleAIPromptChange:
|
|
5757
|
+
handleAIPromptChange: A,
|
|
5758
5758
|
handleGenerateAI: B,
|
|
5759
5759
|
handleAcceptAI: u,
|
|
5760
5760
|
handleCancelAI: a
|
|
@@ -5866,7 +5866,7 @@ const Zc = Qc(
|
|
|
5866
5866
|
Fr,
|
|
5867
5867
|
{
|
|
5868
5868
|
userPrompt: N.userPrompt,
|
|
5869
|
-
onPromptChange:
|
|
5869
|
+
onPromptChange: A,
|
|
5870
5870
|
isGenerating: N.isGenerating,
|
|
5871
5871
|
error: N.error,
|
|
5872
5872
|
hasGeneratedQuery: N.hasGeneratedQuery,
|
|
@@ -6115,7 +6115,7 @@ const Or = Qc(
|
|
|
6115
6115
|
flowChartConfig: a?.chartConfig || {},
|
|
6116
6116
|
flowDisplayConfig: a?.displayConfig || {}
|
|
6117
6117
|
};
|
|
6118
|
-
})(),
|
|
6118
|
+
})(), A = (() => {
|
|
6119
6119
|
if (!c || c.analysisType !== "retention") return;
|
|
6120
6120
|
const u = "retention" in c.query ? c.query.retention : null;
|
|
6121
6121
|
if (!u) return;
|
|
@@ -6148,7 +6148,7 @@ const Or = Qc(
|
|
|
6148
6148
|
initialAnalysisType: m || N,
|
|
6149
6149
|
initialFunnelState: n || k,
|
|
6150
6150
|
initialFlowState: x || R,
|
|
6151
|
-
initialRetentionState: g ||
|
|
6151
|
+
initialRetentionState: g || A,
|
|
6152
6152
|
initialActiveView: h,
|
|
6153
6153
|
disableLocalStorage: o || !!i || !!n || !!x || !!g || !!b,
|
|
6154
6154
|
children: /* @__PURE__ */ e(Zc, { ref: d, ...l, hideShare: !!i || !!n || !!x || !!g })
|
|
@@ -6160,4 +6160,4 @@ Or.displayName = "AnalysisBuilder";
|
|
|
6160
6160
|
export {
|
|
6161
6161
|
Or as default
|
|
6162
6162
|
};
|
|
6163
|
-
//# sourceMappingURL=analysis-builder-
|
|
6163
|
+
//# sourceMappingURL=analysis-builder-BMmWeFPr.js.map
|