drizzle-cube 0.4.41 → 0.4.42
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/client/charts.js +9 -9
- package/dist/client/chunks/{DashboardEditModal-D_7J62sG.js → DashboardEditModal-4zzjtZRR.js} +7 -7
- package/dist/client/chunks/{DashboardEditModal-D_7J62sG.js.map → DashboardEditModal-4zzjtZRR.js.map} +1 -1
- package/dist/client/chunks/{FieldSearchModal-5Qz6vvTz.js → FieldSearchModal-trURu9Sa.js} +2 -2
- package/dist/client/chunks/{FieldSearchModal-5Qz6vvTz.js.map → FieldSearchModal-trURu9Sa.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-DPJJiHVx.js → analysis-builder-B7XSIMkr.js} +381 -372
- package/dist/client/chunks/analysis-builder-B7XSIMkr.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-C-C-rOgu.js → analysis-builder-shared-DaqtrLxd.js} +6 -6
- package/dist/client/chunks/{analysis-builder-shared-C-C-rOgu.js.map → analysis-builder-shared-DaqtrLxd.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-DVzmau1G.js → chart-bar-CPt67rLR.js} +1 -1
- package/dist/client/chunks/{chart-bar-DVzmau1G.js.map → chart-bar-CPt67rLR.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CCmbHv1Y.js → chart-box-plot-Dp_nqQen.js} +1 -1
- package/dist/client/chunks/{chart-box-plot-CCmbHv1Y.js.map → chart-box-plot-Dp_nqQen.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-S6qSwWdK.js → chart-bubble-CYQ8loeS.js} +1 -1
- package/dist/client/chunks/{chart-bubble-S6qSwWdK.js.map → chart-bubble-CYQ8loeS.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BNKbDruo.js → chart-candlestick-DTeSf7C5.js} +1 -1
- package/dist/client/chunks/{chart-candlestick-BNKbDruo.js.map → chart-candlestick-DTeSf7C5.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-D4s27-U3.js → chart-data-table-BZ7StNWv.js} +18 -18
- package/dist/client/chunks/{chart-data-table-D4s27-U3.js.map → chart-data-table-BZ7StNWv.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-BFhc4i_f.js → chart-gauge-_Xdgk_qI.js} +1 -1
- package/dist/client/chunks/{chart-gauge-BFhc4i_f.js.map → chart-gauge-_Xdgk_qI.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DzGNnIcW.js → chart-kpi-delta-C2tdpWki.js} +2 -2
- package/dist/client/chunks/{chart-kpi-delta-DzGNnIcW.js.map → chart-kpi-delta-C2tdpWki.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-sHtgbE_f.js → chart-kpi-number-BUNKM7yg.js} +3 -3
- package/dist/client/chunks/{chart-kpi-number-sHtgbE_f.js.map → chart-kpi-number-BUNKM7yg.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-Bmk-GzVJ.js → chart-kpi-text-COF8iN0K.js} +2 -2
- package/dist/client/chunks/{chart-kpi-text-Bmk-GzVJ.js.map → chart-kpi-text-COF8iN0K.js.map} +1 -1
- package/dist/client/chunks/{chart-line-Bkl5WQAw.js → chart-line-D3SEwXDS.js} +1 -1
- package/dist/client/chunks/{chart-line-Bkl5WQAw.js.map → chart-line-D3SEwXDS.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-7MNetRtX.js → chart-markdown-DMekYkKz.js} +647 -644
- package/dist/client/chunks/chart-markdown-DMekYkKz.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-B7h6vQo4.js → chart-measure-profile-BPhI1Z9s.js} +1 -1
- package/dist/client/chunks/{chart-measure-profile-B7h6vQo4.js.map → chart-measure-profile-BPhI1Z9s.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-Do2YnCxl.js → chart-pie-COl3Rmdk.js} +1 -1
- package/dist/client/chunks/{chart-pie-Do2YnCxl.js.map → chart-pie-COl3Rmdk.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-C7gQkH70.js → chart-radar-BKZXylBB.js} +1 -1
- package/dist/client/chunks/{chart-radar-C7gQkH70.js.map → chart-radar-BKZXylBB.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DHqCck3x.js → chart-radial-bar-CMfC7SPd.js} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DHqCck3x.js.map → chart-radial-bar-CMfC7SPd.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-YSHOUfXf.js → chart-scatter-xQMa3dUt.js} +1 -1
- package/dist/client/chunks/{chart-scatter-YSHOUfXf.js.map → chart-scatter-xQMa3dUt.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-BlhcXK1F.js → chart-tree-map-Cn1pmrAw.js} +1 -1
- package/dist/client/chunks/{chart-tree-map-BlhcXK1F.js.map → chart-tree-map-Cn1pmrAw.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-BWCAzlPq.js → chart-waterfall-C2nVN4pn.js} +1 -1
- package/dist/client/chunks/{chart-waterfall-BWCAzlPq.js.map → chart-waterfall-C2nVN4pn.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-BJ8HrNqB.js → schema-visualization-DVdfx6N8.js} +85 -89
- package/dist/client/chunks/schema-visualization-DVdfx6N8.js.map +1 -0
- package/dist/client/chunks/{useDebounce-EWynD0lC.js → useDebounce-Bel8J05v.js} +2 -2
- package/dist/client/chunks/{useDebounce-EWynD0lC.js.map → useDebounce-Bel8J05v.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-BBTJWQVu.js → useExplainAI-CxdzY2N0.js} +4 -4
- package/dist/client/chunks/{useExplainAI-BBTJWQVu.js.map → useExplainAI-CxdzY2N0.js.map} +1 -1
- package/dist/client/chunks/{utils-DMyRayr_.js → utils-CMkS7h9x.js} +2 -2
- package/dist/client/chunks/{utils-DMyRayr_.js.map → utils-CMkS7h9x.js.map} +1 -1
- package/dist/client/chunks/{vendor-iY25ogTA.js → vendor-BoWEubRu.js} +2 -2
- package/dist/client/chunks/{vendor-iY25ogTA.js.map → vendor-BoWEubRu.js.map} +1 -1
- package/dist/client/components.js +3 -3
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +139 -140
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.d.ts +13 -0
- package/dist/client/schema.js +2 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/package.json +5 -1
- package/dist/client/chunks/analysis-builder-DPJJiHVx.js.map +0 -1
- package/dist/client/chunks/chart-markdown-7MNetRtX.js.map +0 -1
- package/dist/client/chunks/schema-visualization-BJ8HrNqB.js.map +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { A as e, J as t, O as n, P as r, T as i, V as a, b as o, l as s, u as c, x as l } from "./chart-data-table-
|
|
2
|
-
import { r as u, t as d } from "./useExplainAI-
|
|
1
|
+
import { A as e, J as t, O as n, P as r, T as i, V as a, b as o, l as s, u as c, x as l } from "./chart-data-table-BZ7StNWv.js";
|
|
2
|
+
import { r as u, t as d } from "./useExplainAI-CxdzY2N0.js";
|
|
3
3
|
import { A as f } from "./chart-activity-grid-wR2Twpo7.js";
|
|
4
4
|
import { i as p, n as m, o as h, r as g, s as _ } from "./retention-YhT1Oohi.js";
|
|
5
|
-
import { d as v, f as y, g as b, i as x, n as S, r as C, t as w, u as T } from "./FieldSearchModal-
|
|
6
|
-
import { C as E, I as D, N as O, P as ee, c as te, d as k, m as A, n as ne, t as j, u as M } from "./analysis-builder-shared-
|
|
5
|
+
import { d as v, f as y, g as b, i as x, n as S, r as C, t as w, u as T } from "./FieldSearchModal-trURu9Sa.js";
|
|
6
|
+
import { C as E, I as D, N as O, P as ee, c as te, d as k, m as A, n as ne, t as j, u as M } from "./analysis-builder-shared-DaqtrLxd.js";
|
|
7
7
|
import { n as N } from "./charts-core-Cy3rHADX.js";
|
|
8
|
-
import {
|
|
9
|
-
import { Component as re, forwardRef as ie, memo as F, useCallback as I, useEffect as L, useImperativeHandle as ae, useMemo as R, useRef as z, useState as B, useSyncExternalStore as oe } from "react";
|
|
8
|
+
import P, { Component as re, forwardRef as ie, memo as F, useCallback as I, useEffect as L, useImperativeHandle as ae, useMemo as R, useRef as z, useState as B, useSyncExternalStore as oe } from "react";
|
|
10
9
|
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
11
10
|
//#region src/client/shared/components/QueryAnalysisPanel.tsx
|
|
12
11
|
function W(e) {
|
|
@@ -556,7 +555,8 @@ function fe({ isValidQuery: e, getAnalysisConfig: t }) {
|
|
|
556
555
|
}
|
|
557
556
|
//#endregion
|
|
558
557
|
//#region src/client/components/AnalysisBuilder/AnalysisResultsPanel.tsx
|
|
559
|
-
|
|
558
|
+
var pe = P.lazy(() => import("./schema-visualization-DVdfx6N8.js").then((e) => e.r).then((e) => ({ default: e.SchemaVisualizationLazy })));
|
|
559
|
+
function me(e, t, n) {
|
|
560
560
|
let r = [];
|
|
561
561
|
if (r.push("# Query Execution Plan"), r.push(""), t && (r.push("## Cube Query"), r.push(""), r.push("```json"), r.push(JSON.stringify(t, null, 2)), r.push("```"), r.push("")), r.push("## Query Summary"), r.push(""), r.push(`- **Cubes:** ${e.cubesInvolved.join(", ")}`), r.push(`- **Query Type:** ${e.querySummary.queryType.replace(/_/g, " ")}`), r.push(`- **Joins:** ${e.querySummary.joinCount}`), r.push(`- **CTEs:** ${e.querySummary.cteCount}`), r.push(""), r.push("## Primary Cube Selection"), r.push(""), r.push(`**Selected:** ${e.primaryCube.selectedCube}`), r.push(`**Reason:** ${e.primaryCube.reason.replace(/_/g, " ")}`), r.push(`**Explanation:** ${e.primaryCube.explanation}`), r.push(""), e.primaryCube.candidates && e.primaryCube.candidates.length > 1) {
|
|
562
562
|
r.push("### Candidates Considered"), r.push(""), r.push("| Cube | Dimensions | Joins | Can Reach All |"), r.push("|------|------------|-------|---------------|");
|
|
@@ -600,23 +600,23 @@ function pe(e, t, n) {
|
|
|
600
600
|
}
|
|
601
601
|
return n?.sql && (r.push("## Generated SQL"), r.push(""), r.push("```sql"), r.push(n.sql), r.push("```")), r.join("\n");
|
|
602
602
|
}
|
|
603
|
-
var
|
|
604
|
-
let q = le === "funnel" || ue, J = le === "flow", Y = le === "retention", { features:
|
|
603
|
+
var he = F(function({ executionStatus: t, executionResults: n, executionError: r, totalRowCount: o, resultsStale: s = !1, chartType: c = "line", chartConfig: f = {}, displayConfig: p = {}, colorPalette: m, currentPaletteName: h, onColorPaletteChange: g, allQueries: _, funnelExecutedQueries: v, activeView: y = "chart", onActiveViewChange: x, displayLimit: w = 100, onDisplayLimitChange: T, hasMetrics: E = !1, debugDataPerQuery: D = [], onShareClick: O, canShare: te = !1, shareButtonState: k = "idle", onRefreshClick: A, canRefresh: ne = !1, isRefreshing: j = !1, needsRefresh: M = !1, onClearClick: N, canClear: re = !1, enableAI: ie = !1, isAIOpen: F = !1, onAIToggle: ae, queryCount: oe = 1, perQueryResults: W, activeTableIndex: G = 0, onActiveTableChange: ce, analysisType: le, isFunnelMode: ue = !1, funnelServerQuery: de, funnelDebugData: fe, flowServerQuery: he, flowDebugData: ge, retentionServerQuery: _e, retentionDebugData: ve, retentionChartData: K, retentionValidation: ye, warnings: be, highlightedFields: xe, onSchemaFieldClick: Se }) {
|
|
604
|
+
let q = le === "funnel" || ue, J = le === "flow", Y = le === "retention", { features: Ce } = a(), [X, we] = B(!1), [Z, Te] = B(!1), [Q, Ee] = B(0), [De, Oe] = B(!1), [ke, Ae] = B(!1), [je, Me] = B(!1), [Ne, Pe] = B("idle");
|
|
605
605
|
L(() => {
|
|
606
606
|
let e = (e) => {
|
|
607
|
-
e.key === "Shift" &&
|
|
607
|
+
e.key === "Shift" && Ae(!0);
|
|
608
608
|
}, t = (e) => {
|
|
609
|
-
e.key === "Shift" &&
|
|
609
|
+
e.key === "Shift" && Ae(!1);
|
|
610
610
|
};
|
|
611
611
|
return window.addEventListener("keydown", e), window.addEventListener("keyup", t), () => {
|
|
612
612
|
window.removeEventListener("keydown", e), window.removeEventListener("keyup", t);
|
|
613
613
|
};
|
|
614
614
|
}, []);
|
|
615
|
-
let
|
|
615
|
+
let Fe = ke && je;
|
|
616
616
|
L(() => {
|
|
617
|
-
D.length > 0 && Q >= D.length &&
|
|
617
|
+
D.length > 0 && Q >= D.length && Ee(D.length - 1);
|
|
618
618
|
}, [D.length, Q]);
|
|
619
|
-
let
|
|
619
|
+
let Ie = D[Q] || {
|
|
620
620
|
sql: null,
|
|
621
621
|
analysis: null,
|
|
622
622
|
mode: null,
|
|
@@ -626,28 +626,28 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
626
626
|
modeMetadata: void 0,
|
|
627
627
|
loading: !1,
|
|
628
628
|
error: null
|
|
629
|
-
},
|
|
630
|
-
if (!
|
|
631
|
-
let e =
|
|
629
|
+
}, Le = Ie.sql, Re = Ie.analysis, ze = Ie.loading, Be = Ie.error, Ve = v?.[Q] ?? _?.[Q] ?? null, He = !!(v?.length && v[Q]), Ue = I(() => {
|
|
630
|
+
if (!Re) return;
|
|
631
|
+
let e = me(Re, Ve, Le);
|
|
632
632
|
navigator.clipboard.writeText(e).then(() => {
|
|
633
|
-
|
|
633
|
+
Pe("copied"), setTimeout(() => Pe("idle"), 2e3);
|
|
634
634
|
});
|
|
635
635
|
}, [
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
]), { explainResult:
|
|
636
|
+
Re,
|
|
637
|
+
Ve,
|
|
638
|
+
Le
|
|
639
|
+
]), { explainResult: We, isLoading: Ge, hasRun: Ke, error: qe, runExplain: Je, clearExplain: Ye } = u(Ve, { skip: q || J || Y || !Ve }), { explainResult: Xe, isLoading: Ze, hasRun: Qe, error: $e, runExplain: et, clearExplain: tt } = u(de, { skip: !q || !de }), { explainResult: nt, isLoading: rt, hasRun: it, error: at, runExplain: ot, clearExplain: st } = u(he, { skip: !J || !he }), { explainResult: ct, isLoading: lt, hasRun: $, error: ut, runExplain: dt } = u(_e, { skip: !Y || !_e }), { analysis: ft, isAnalyzing: pt, error: mt, analyze: ht, clearAnalysis: gt } = d();
|
|
640
640
|
L(() => {
|
|
641
|
-
|
|
642
|
-
}, [Q,
|
|
643
|
-
|
|
644
|
-
}, [de,
|
|
645
|
-
|
|
646
|
-
}, [
|
|
647
|
-
let
|
|
641
|
+
Ye();
|
|
642
|
+
}, [Q, Ye]), L(() => {
|
|
643
|
+
tt();
|
|
644
|
+
}, [de, tt]), L(() => {
|
|
645
|
+
st();
|
|
646
|
+
}, [he, st]);
|
|
647
|
+
let _t = z(!0);
|
|
648
648
|
L(() => {
|
|
649
|
-
if (
|
|
650
|
-
|
|
649
|
+
if (_t.current) {
|
|
650
|
+
_t.current = !1;
|
|
651
651
|
return;
|
|
652
652
|
}
|
|
653
653
|
le === "funnel" || le === "flow" || le === "retention" || q || !E && y === "chart" && x("table");
|
|
@@ -658,7 +658,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
658
658
|
q,
|
|
659
659
|
le
|
|
660
660
|
]);
|
|
661
|
-
let
|
|
661
|
+
let vt = R(() => {
|
|
662
662
|
if (!_ || _.length === 0) return;
|
|
663
663
|
if (_.length === 1) return _[0];
|
|
664
664
|
let e = _.flatMap((e) => e?.measures || []);
|
|
@@ -666,7 +666,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
666
666
|
..._[0],
|
|
667
667
|
measures: e
|
|
668
668
|
};
|
|
669
|
-
}, [_]),
|
|
669
|
+
}, [_]), yt = e("success"), bt = e("error"), xt = e("warning"), St = e("table"), Ct = e("measure"), wt = e("codeBracket"), Tt = e("share"), Et = e("check"), Dt = e("delete"), Ot = e("sparkles"), kt = e("arrowPath"), At = e("schemaGraph"), jt = () => /* @__PURE__ */ H("div", {
|
|
670
670
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
671
671
|
children: /* @__PURE__ */ U("div", {
|
|
672
672
|
className: "dc:text-center",
|
|
@@ -685,24 +685,27 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
685
685
|
})
|
|
686
686
|
]
|
|
687
687
|
})
|
|
688
|
-
}),
|
|
688
|
+
}), Mt = () => /* @__PURE__ */ U("div", {
|
|
689
689
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
690
|
-
children: [
|
|
690
|
+
children: [Zt(), /* @__PURE__ */ H("div", {
|
|
691
691
|
className: "dc:flex-1 dc:flex dc:items-center dc:justify-center dc:p-4",
|
|
692
692
|
children: Z ? /* @__PURE__ */ H("div", {
|
|
693
693
|
className: "dc:w-full dc:h-full",
|
|
694
|
-
children: /* @__PURE__ */ H(P, {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
694
|
+
children: /* @__PURE__ */ H(P.Suspense, {
|
|
695
|
+
fallback: null,
|
|
696
|
+
children: /* @__PURE__ */ H(pe, {
|
|
697
|
+
height: "100%",
|
|
698
|
+
highlightedFields: xe,
|
|
699
|
+
onFieldClick: Se
|
|
700
|
+
})
|
|
698
701
|
})
|
|
699
702
|
}) : X ? /* @__PURE__ */ H("div", {
|
|
700
703
|
className: "dc:w-full dc:h-full dc:overflow-auto",
|
|
701
|
-
children:
|
|
704
|
+
children: Kt()
|
|
702
705
|
}) : /* @__PURE__ */ U("div", {
|
|
703
706
|
className: "dc:text-center dc:max-w-md",
|
|
704
707
|
children: [
|
|
705
|
-
/* @__PURE__ */ H(
|
|
708
|
+
/* @__PURE__ */ H(bt, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-error dc:mb-4" }),
|
|
706
709
|
/* @__PURE__ */ H("div", {
|
|
707
710
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
708
711
|
children: "Query Execution Failed"
|
|
@@ -721,15 +724,15 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
721
724
|
]
|
|
722
725
|
})
|
|
723
726
|
})]
|
|
724
|
-
}),
|
|
727
|
+
}), Nt = !!_?.some((e) => e?.measures && e.measures.length > 0 || e?.dimensions && e.dimensions.length > 0 || e?.timeDimensions && e.timeDimensions.length > 0), Pt = R(() => Y ? _e !== null : q ? de !== null : J ? he !== null : Nt, [
|
|
725
728
|
Y,
|
|
726
729
|
q,
|
|
727
730
|
J,
|
|
728
|
-
|
|
731
|
+
_e,
|
|
729
732
|
de,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
]),
|
|
733
|
+
he,
|
|
734
|
+
Nt
|
|
735
|
+
]), Ft = () => /* @__PURE__ */ H("div", {
|
|
733
736
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
734
737
|
children: /* @__PURE__ */ U("div", {
|
|
735
738
|
className: "dc:text-center",
|
|
@@ -748,7 +751,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
748
751
|
})
|
|
749
752
|
]
|
|
750
753
|
})
|
|
751
|
-
}),
|
|
754
|
+
}), It = () => /* @__PURE__ */ H("div", {
|
|
752
755
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
753
756
|
children: /* @__PURE__ */ U("div", {
|
|
754
757
|
className: "dc:text-center",
|
|
@@ -791,14 +794,14 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
791
794
|
})
|
|
792
795
|
]
|
|
793
796
|
})
|
|
794
|
-
}),
|
|
797
|
+
}), Lt = () => {
|
|
795
798
|
let e = "Add metrics or breakdowns from the panel on the right to see results";
|
|
796
799
|
return Y ? e = "Select a cube and configure retention settings to see results" : q ? e = "Add funnel steps to see conversion analysis" : J && (e = "Configure flow analysis to see user journey paths"), /* @__PURE__ */ H("div", {
|
|
797
800
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center dc:pt-6",
|
|
798
801
|
children: /* @__PURE__ */ U("div", {
|
|
799
802
|
className: "dc:text-center dc:mb-16",
|
|
800
803
|
children: [
|
|
801
|
-
/* @__PURE__ */ H(
|
|
804
|
+
/* @__PURE__ */ H(Ct, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-text-muted dc:mb-3" }),
|
|
802
805
|
/* @__PURE__ */ H("div", {
|
|
803
806
|
className: "dc:text-sm dc:font-semibold text-dc-text-secondary dc:mb-1",
|
|
804
807
|
children: "No Results Yet"
|
|
@@ -810,17 +813,17 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
810
813
|
ie && ae && !Y && !q && !J && /* @__PURE__ */ U("button", {
|
|
811
814
|
onClick: ae,
|
|
812
815
|
className: "dc:inline-flex dc:items-center dc:gap-2 dc:px-4 dc:py-2 dc:text-sm dc:font-medium text-white bg-dc-accent hover:bg-dc-accent dc:rounded-lg dc:transition-colors dc:shadow-sm",
|
|
813
|
-
children: [/* @__PURE__ */ H(
|
|
816
|
+
children: [/* @__PURE__ */ H(Ot, { className: "dc:w-4 dc:h-4" }), "Analyse with AI"]
|
|
814
817
|
})
|
|
815
818
|
]
|
|
816
819
|
})
|
|
817
820
|
});
|
|
818
|
-
},
|
|
821
|
+
}, Rt = () => /* @__PURE__ */ H("div", {
|
|
819
822
|
className: "dc:h-full dc:flex dc:items-center dc:justify-center",
|
|
820
823
|
children: /* @__PURE__ */ U("div", {
|
|
821
824
|
className: "dc:text-center",
|
|
822
825
|
children: [
|
|
823
|
-
/* @__PURE__ */ H(
|
|
826
|
+
/* @__PURE__ */ H(yt, { className: "dc:w-12 dc:h-12 dc:mx-auto text-dc-success dc:mb-3" }),
|
|
824
827
|
/* @__PURE__ */ H("div", {
|
|
825
828
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-1",
|
|
826
829
|
children: "Query Successful"
|
|
@@ -831,13 +834,13 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
831
834
|
})
|
|
832
835
|
]
|
|
833
836
|
})
|
|
834
|
-
}),
|
|
837
|
+
}), zt = () => {
|
|
835
838
|
if (!n || n.length === 0) return /* @__PURE__ */ H("div", {
|
|
836
839
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
837
840
|
children: /* @__PURE__ */ U("div", {
|
|
838
841
|
className: "dc:text-center",
|
|
839
842
|
children: [
|
|
840
|
-
/* @__PURE__ */ H(
|
|
843
|
+
/* @__PURE__ */ H(Ct, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
841
844
|
/* @__PURE__ */ H("div", {
|
|
842
845
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
843
846
|
children: "No data to display"
|
|
@@ -856,7 +859,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
856
859
|
chartConfig: f,
|
|
857
860
|
displayConfig: p,
|
|
858
861
|
colorPalette: m,
|
|
859
|
-
queryObject:
|
|
862
|
+
queryObject: vt,
|
|
860
863
|
height: "100%",
|
|
861
864
|
fallback: /* @__PURE__ */ H("div", {
|
|
862
865
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full",
|
|
@@ -867,7 +870,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
867
870
|
children: /* @__PURE__ */ U("div", {
|
|
868
871
|
className: "dc:text-center",
|
|
869
872
|
children: [
|
|
870
|
-
/* @__PURE__ */ H(
|
|
873
|
+
/* @__PURE__ */ H(xt, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
871
874
|
/* @__PURE__ */ H("div", {
|
|
872
875
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
873
876
|
children: "Unsupported chart type"
|
|
@@ -879,7 +882,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
879
882
|
]
|
|
880
883
|
})
|
|
881
884
|
});
|
|
882
|
-
},
|
|
885
|
+
}, Bt = () => r ? /* @__PURE__ */ U("div", {
|
|
883
886
|
className: "bg-dc-danger-bg dark:bg-dc-danger-bg dc:border border-dc-error dark:border-dc-error dc:rounded dc:p-3",
|
|
884
887
|
children: [/* @__PURE__ */ H("h4", {
|
|
885
888
|
className: "dc:text-sm dc:font-semibold text-dc-error dark:text-dc-error dc:mb-1",
|
|
@@ -888,7 +891,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
888
891
|
className: "dc:text-sm text-dc-error dark:text-dc-error",
|
|
889
892
|
children: r
|
|
890
893
|
})]
|
|
891
|
-
}) : null,
|
|
894
|
+
}) : null, Vt = () => /* @__PURE__ */ U("div", {
|
|
892
895
|
className: "dc:grid dc:grid-cols-1 dc:md:grid-cols-2 dc:gap-4",
|
|
893
896
|
children: [/* @__PURE__ */ H("div", { children: /* @__PURE__ */ H(b, {
|
|
894
897
|
code: JSON.stringify(f, null, 2),
|
|
@@ -901,7 +904,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
901
904
|
title: "Display Config",
|
|
902
905
|
height: "16rem"
|
|
903
906
|
}) })]
|
|
904
|
-
}),
|
|
907
|
+
}), Ht = (e) => /* @__PURE__ */ H("div", { children: n ? /* @__PURE__ */ H(b, {
|
|
905
908
|
code: JSON.stringify(n, null, 2),
|
|
906
909
|
language: "json",
|
|
907
910
|
title: e || `Server Response (${n.length} rows)`,
|
|
@@ -912,12 +915,12 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
912
915
|
}), /* @__PURE__ */ H("div", {
|
|
913
916
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:p-3 text-dc-text-muted dc:text-sm",
|
|
914
917
|
children: "No results yet"
|
|
915
|
-
})] }) }),
|
|
918
|
+
})] }) }), Ut = () => /* @__PURE__ */ H("div", { children: K ? /* @__PURE__ */ H(b, {
|
|
916
919
|
code: JSON.stringify(K, null, 2),
|
|
917
920
|
language: "json",
|
|
918
921
|
title: `Server Response (${K.rows.length} rows, ${K.periods.length} periods)`,
|
|
919
922
|
maxHeight: "24rem"
|
|
920
|
-
}) :
|
|
923
|
+
}) : Ht() }), Wt = (e) => {
|
|
921
924
|
let t = e.debugData?.sql, n = e.debugData?.loading || !1, r = e.debugData?.error || null;
|
|
922
925
|
return /* @__PURE__ */ U("div", {
|
|
923
926
|
className: "dc:p-4 dc:space-y-4 dc:overflow-auto dc:h-full",
|
|
@@ -939,7 +942,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
939
942
|
})
|
|
940
943
|
]
|
|
941
944
|
}),
|
|
942
|
-
|
|
945
|
+
Bt(),
|
|
943
946
|
/* @__PURE__ */ H("div", { children: e.serverQuery ? /* @__PURE__ */ H(b, {
|
|
944
947
|
code: JSON.stringify(e.serverQuery, null, 2),
|
|
945
948
|
language: "json",
|
|
@@ -956,11 +959,11 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
956
959
|
explainHasRun: e.explainHasRun,
|
|
957
960
|
explainError: e.explainError,
|
|
958
961
|
runExplain: e.runExplain,
|
|
959
|
-
aiAnalysis:
|
|
960
|
-
aiAnalysisLoading:
|
|
961
|
-
aiAnalysisError:
|
|
962
|
-
runAIAnalysis:
|
|
963
|
-
clearAIAnalysis:
|
|
962
|
+
aiAnalysis: ft,
|
|
963
|
+
aiAnalysisLoading: pt,
|
|
964
|
+
aiAnalysisError: mt,
|
|
965
|
+
runAIAnalysis: ht,
|
|
966
|
+
clearAIAnalysis: gt,
|
|
964
967
|
enableAI: ie,
|
|
965
968
|
query: e.serverQuery,
|
|
966
969
|
title: "Generated SQL",
|
|
@@ -974,11 +977,11 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
974
977
|
children: e.metadataSection
|
|
975
978
|
})] }),
|
|
976
979
|
e.extraSection,
|
|
977
|
-
|
|
980
|
+
Vt(),
|
|
978
981
|
e.responseSection
|
|
979
982
|
]
|
|
980
983
|
});
|
|
981
|
-
},
|
|
984
|
+
}, Gt = () => /* @__PURE__ */ U("div", {
|
|
982
985
|
className: "dc:p-4 dc:space-y-4 dc:overflow-auto dc:h-full",
|
|
983
986
|
children: [
|
|
984
987
|
D.length > 1 && /* @__PURE__ */ U("div", {
|
|
@@ -989,7 +992,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
989
992
|
}), /* @__PURE__ */ H("div", {
|
|
990
993
|
className: "dc:flex dc:border border-dc-border dc:rounded-md dc:overflow-hidden",
|
|
991
994
|
children: D.map((e, t) => /* @__PURE__ */ U("button", {
|
|
992
|
-
onClick: () =>
|
|
995
|
+
onClick: () => Ee(t),
|
|
993
996
|
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 ${Q === t ? "bg-dc-accent text-white" : "bg-dc-bg text-dc-text-secondary hover:bg-dc-bg-secondary"}`,
|
|
994
997
|
children: [
|
|
995
998
|
"Q",
|
|
@@ -1021,31 +1024,31 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1021
1024
|
children: [/* @__PURE__ */ H("h4", {
|
|
1022
1025
|
className: "dc:text-sm dc:font-semibold text-dc-text",
|
|
1023
1026
|
children: "Query Analysis"
|
|
1024
|
-
}),
|
|
1025
|
-
onClick:
|
|
1027
|
+
}), Re && /* @__PURE__ */ H("button", {
|
|
1028
|
+
onClick: Ue,
|
|
1026
1029
|
className: "dc:px-2 dc:py-1 dc:text-xs dc:font-medium dc:rounded dc:border border-dc-border bg-dc-surface hover:bg-dc-surface-hover text-dc-text-secondary hover:text-dc-text dc:transition-colors dc:flex dc:items-center dc:gap-1",
|
|
1027
1030
|
title: "Copy query, analysis, and SQL as markdown",
|
|
1028
|
-
children:
|
|
1031
|
+
children: Ne === "copied" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("span", {
|
|
1029
1032
|
className: "text-dc-success",
|
|
1030
1033
|
children: "✓"
|
|
1031
1034
|
}), "Copied!"] }) : /* @__PURE__ */ H(V, { children: "📋 Copy as Markdown" })
|
|
1032
1035
|
})]
|
|
1033
|
-
}),
|
|
1036
|
+
}), ze ? /* @__PURE__ */ H("div", {
|
|
1034
1037
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:p-3 text-dc-text-muted dc:text-sm",
|
|
1035
1038
|
children: "Loading..."
|
|
1036
|
-
}) :
|
|
1039
|
+
}) : Re ? /* @__PURE__ */ H("div", {
|
|
1037
1040
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:p-3",
|
|
1038
|
-
children: /* @__PURE__ */ H(se, { analysis:
|
|
1041
|
+
children: /* @__PURE__ */ H(se, { analysis: Re })
|
|
1039
1042
|
}) : /* @__PURE__ */ H("div", {
|
|
1040
1043
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:p-3 text-dc-text-muted dc:text-sm",
|
|
1041
|
-
children:
|
|
1044
|
+
children: Be ? "Analysis unavailable due to error" : "Add metrics to see analysis"
|
|
1042
1045
|
})] }),
|
|
1043
|
-
/* @__PURE__ */ H("div", { children:
|
|
1044
|
-
code: JSON.stringify(
|
|
1046
|
+
/* @__PURE__ */ H("div", { children: Ve ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(b, {
|
|
1047
|
+
code: JSON.stringify(Ve, null, 2),
|
|
1045
1048
|
language: "json",
|
|
1046
|
-
title:
|
|
1049
|
+
title: He ? "Executed Query (with funnel filters)" : "Cube Query",
|
|
1047
1050
|
height: "16rem"
|
|
1048
|
-
}),
|
|
1051
|
+
}), He && Q > 0 && /* @__PURE__ */ U("div", {
|
|
1049
1052
|
className: "dc:mt-1 dc:text-xs text-dc-text-muted",
|
|
1050
1053
|
children: [/* @__PURE__ */ H("span", {
|
|
1051
1054
|
className: "text-dc-accent",
|
|
@@ -1059,22 +1062,22 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1059
1062
|
children: "No query"
|
|
1060
1063
|
})] }) }),
|
|
1061
1064
|
/* @__PURE__ */ H(ee, {
|
|
1062
|
-
sql:
|
|
1063
|
-
sqlLoading:
|
|
1064
|
-
sqlError:
|
|
1065
|
+
sql: Le,
|
|
1066
|
+
sqlLoading: ze,
|
|
1067
|
+
sqlError: Be,
|
|
1065
1068
|
sqlPlaceholder: "Add metrics to generate SQL",
|
|
1066
|
-
explainResult:
|
|
1067
|
-
explainLoading:
|
|
1068
|
-
explainHasRun:
|
|
1069
|
-
explainError:
|
|
1070
|
-
runExplain:
|
|
1071
|
-
aiAnalysis:
|
|
1072
|
-
aiAnalysisLoading:
|
|
1073
|
-
aiAnalysisError:
|
|
1074
|
-
runAIAnalysis:
|
|
1075
|
-
clearAIAnalysis:
|
|
1069
|
+
explainResult: We,
|
|
1070
|
+
explainLoading: Ge,
|
|
1071
|
+
explainHasRun: Ke,
|
|
1072
|
+
explainError: qe,
|
|
1073
|
+
runExplain: Je,
|
|
1074
|
+
aiAnalysis: ft,
|
|
1075
|
+
aiAnalysisLoading: pt,
|
|
1076
|
+
aiAnalysisError: mt,
|
|
1077
|
+
runAIAnalysis: ht,
|
|
1078
|
+
clearAIAnalysis: gt,
|
|
1076
1079
|
enableAI: ie,
|
|
1077
|
-
query:
|
|
1080
|
+
query: Ve,
|
|
1078
1081
|
title: "Generated SQL",
|
|
1079
1082
|
height: "16rem"
|
|
1080
1083
|
}),
|
|
@@ -1105,7 +1108,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1105
1108
|
children: "No results yet"
|
|
1106
1109
|
})] }) })
|
|
1107
1110
|
]
|
|
1108
|
-
}),
|
|
1111
|
+
}), Kt = () => {
|
|
1109
1112
|
if (q) {
|
|
1110
1113
|
let e = fe?.modeMetadata, t = e ? /* @__PURE__ */ H("div", {
|
|
1111
1114
|
className: "dc:flex dc:flex-wrap dc:gap-2",
|
|
@@ -1131,7 +1134,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1131
1134
|
]
|
|
1132
1135
|
}, t))
|
|
1133
1136
|
}) : null;
|
|
1134
|
-
return
|
|
1137
|
+
return Wt({
|
|
1135
1138
|
label: "Funnel Query",
|
|
1136
1139
|
badgeText: e?.stepCount ? `${e.stepCount} steps` : void 0,
|
|
1137
1140
|
serverQuery: de,
|
|
@@ -1145,18 +1148,18 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1145
1148
|
})] }),
|
|
1146
1149
|
debugData: fe,
|
|
1147
1150
|
sqlPlaceholder: "Configure funnel binding key to generate SQL",
|
|
1148
|
-
explainResult:
|
|
1149
|
-
explainLoading:
|
|
1150
|
-
explainHasRun:
|
|
1151
|
-
explainError:
|
|
1152
|
-
runExplain:
|
|
1151
|
+
explainResult: Xe,
|
|
1152
|
+
explainLoading: Ze,
|
|
1153
|
+
explainHasRun: Qe,
|
|
1154
|
+
explainError: $e,
|
|
1155
|
+
runExplain: et,
|
|
1153
1156
|
metadataTitle: t ? "Funnel Steps" : void 0,
|
|
1154
1157
|
metadataSection: t,
|
|
1155
|
-
responseSection:
|
|
1158
|
+
responseSection: Ht()
|
|
1156
1159
|
});
|
|
1157
1160
|
}
|
|
1158
1161
|
if (Y) {
|
|
1159
|
-
let e =
|
|
1162
|
+
let e = ve?.modeMetadata, t = e ? /* @__PURE__ */ U("div", {
|
|
1160
1163
|
className: "dc:grid dc:grid-cols-2 dc:gap-4 dc:text-sm",
|
|
1161
1164
|
children: [
|
|
1162
1165
|
/* @__PURE__ */ U("div", { children: [
|
|
@@ -1248,10 +1251,10 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1248
1251
|
]
|
|
1249
1252
|
})
|
|
1250
1253
|
})] }) : null;
|
|
1251
|
-
return
|
|
1254
|
+
return Wt({
|
|
1252
1255
|
label: "Retention Query",
|
|
1253
1256
|
badgeText: e ? `${e.segmentCount || 1} segment(s), ${e.totalUsers} users` : void 0,
|
|
1254
|
-
serverQuery:
|
|
1257
|
+
serverQuery: _e,
|
|
1255
1258
|
serverQueryTitle: "Retention Server Query",
|
|
1256
1259
|
serverQueryMissing: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("h4", {
|
|
1257
1260
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
@@ -1261,29 +1264,29 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1261
1264
|
children: [/* @__PURE__ */ H("div", {
|
|
1262
1265
|
className: "text-dc-warning dc:font-medium dc:mb-2",
|
|
1263
1266
|
children: "Configuration Incomplete"
|
|
1264
|
-
}),
|
|
1267
|
+
}), ye && ye.errors.length > 0 ? /* @__PURE__ */ H("ul", {
|
|
1265
1268
|
className: "list-disc dc:list-inside text-dc-text-secondary dc:space-y-1",
|
|
1266
|
-
children:
|
|
1269
|
+
children: ye.errors.map((e, t) => /* @__PURE__ */ H("li", { children: e }, t))
|
|
1267
1270
|
}) : /* @__PURE__ */ H("p", {
|
|
1268
1271
|
className: "text-dc-text-muted",
|
|
1269
1272
|
children: "Configure the retention analysis settings to generate a query."
|
|
1270
1273
|
})]
|
|
1271
1274
|
})] }),
|
|
1272
|
-
debugData:
|
|
1275
|
+
debugData: ve,
|
|
1273
1276
|
sqlPlaceholder: "Configure retention to generate SQL",
|
|
1274
|
-
explainResult:
|
|
1275
|
-
explainLoading:
|
|
1276
|
-
explainHasRun:
|
|
1277
|
-
explainError:
|
|
1278
|
-
runExplain:
|
|
1277
|
+
explainResult: ct,
|
|
1278
|
+
explainLoading: lt,
|
|
1279
|
+
explainHasRun: $,
|
|
1280
|
+
explainError: ut,
|
|
1281
|
+
runExplain: dt,
|
|
1279
1282
|
metadataTitle: t ? "Retention Configuration" : void 0,
|
|
1280
1283
|
metadataSection: t,
|
|
1281
1284
|
extraSection: n,
|
|
1282
|
-
responseSection:
|
|
1285
|
+
responseSection: Ut()
|
|
1283
1286
|
});
|
|
1284
1287
|
}
|
|
1285
1288
|
if (J) {
|
|
1286
|
-
let e =
|
|
1289
|
+
let e = ge?.modeMetadata, t = e ? /* @__PURE__ */ U("div", {
|
|
1287
1290
|
className: "dc:grid dc:grid-cols-2 dc:gap-4 dc:text-sm",
|
|
1288
1291
|
children: [
|
|
1289
1292
|
/* @__PURE__ */ U("div", { children: [
|
|
@@ -1332,10 +1335,10 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1332
1335
|
] })
|
|
1333
1336
|
]
|
|
1334
1337
|
}) : null;
|
|
1335
|
-
return
|
|
1338
|
+
return Wt({
|
|
1336
1339
|
label: "Flow Query",
|
|
1337
1340
|
badgeText: e ? `${e.stepsBefore} before, ${e.stepsAfter} after` : void 0,
|
|
1338
|
-
serverQuery:
|
|
1341
|
+
serverQuery: he,
|
|
1339
1342
|
serverQueryTitle: "Flow Server Query",
|
|
1340
1343
|
serverQueryMissing: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("h4", {
|
|
1341
1344
|
className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2",
|
|
@@ -1344,27 +1347,27 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1344
1347
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:p-3 text-dc-text-muted dc:text-sm dc:h-64 dc:overflow-auto",
|
|
1345
1348
|
children: "No flow query configured"
|
|
1346
1349
|
})] }),
|
|
1347
|
-
debugData:
|
|
1350
|
+
debugData: ge,
|
|
1348
1351
|
sqlPlaceholder: "Configure flow to generate SQL",
|
|
1349
|
-
explainResult:
|
|
1350
|
-
explainLoading:
|
|
1351
|
-
explainHasRun:
|
|
1352
|
-
explainError:
|
|
1353
|
-
runExplain:
|
|
1352
|
+
explainResult: nt,
|
|
1353
|
+
explainLoading: rt,
|
|
1354
|
+
explainHasRun: it,
|
|
1355
|
+
explainError: at,
|
|
1356
|
+
runExplain: ot,
|
|
1354
1357
|
metadataTitle: t ? "Flow Configuration" : void 0,
|
|
1355
1358
|
metadataSection: t,
|
|
1356
|
-
responseSection:
|
|
1359
|
+
responseSection: Ht("Server Response (Sankey Data)")
|
|
1357
1360
|
});
|
|
1358
1361
|
}
|
|
1359
|
-
return
|
|
1360
|
-
},
|
|
1362
|
+
return Gt();
|
|
1363
|
+
}, qt = !q && oe > 1 && W && W.length > 1, Jt = () => {
|
|
1361
1364
|
let e = [], t = [];
|
|
1362
1365
|
if (!n || Array.isArray(n) && n.length === 0) return /* @__PURE__ */ H("div", {
|
|
1363
1366
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
1364
1367
|
children: /* @__PURE__ */ U("div", {
|
|
1365
1368
|
className: "dc:text-center",
|
|
1366
1369
|
children: [
|
|
1367
|
-
/* @__PURE__ */ H(
|
|
1370
|
+
/* @__PURE__ */ H(St, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1368
1371
|
/* @__PURE__ */ H("div", {
|
|
1369
1372
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1370
1373
|
children: "No flow data to display"
|
|
@@ -1385,7 +1388,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1385
1388
|
children: /* @__PURE__ */ U("div", {
|
|
1386
1389
|
className: "dc:text-center",
|
|
1387
1390
|
children: [
|
|
1388
|
-
/* @__PURE__ */ H(
|
|
1391
|
+
/* @__PURE__ */ H(St, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1389
1392
|
/* @__PURE__ */ H("div", {
|
|
1390
1393
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1391
1394
|
children: "No flow data to display"
|
|
@@ -1510,14 +1513,14 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1510
1513
|
})
|
|
1511
1514
|
})] })]
|
|
1512
1515
|
});
|
|
1513
|
-
},
|
|
1516
|
+
}, Yt = (e) => {
|
|
1514
1517
|
let t, r = _?.[0];
|
|
1515
|
-
return
|
|
1518
|
+
return qt && e !== void 0 && e >= 0 && W ? (t = W[e] || null, r = _?.[e]) : (t = n, qt && (r = vt)), !t || t.length === 0 ? /* @__PURE__ */ H("div", {
|
|
1516
1519
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full text-dc-text-muted",
|
|
1517
1520
|
children: /* @__PURE__ */ U("div", {
|
|
1518
1521
|
className: "dc:text-center",
|
|
1519
1522
|
children: [
|
|
1520
|
-
/* @__PURE__ */ H(
|
|
1523
|
+
/* @__PURE__ */ H(St, { className: "dc:w-12 dc:h-12 dc:mx-auto dc:mb-3 dc:opacity-50" }),
|
|
1521
1524
|
/* @__PURE__ */ H("div", {
|
|
1522
1525
|
className: "dc:text-sm dc:font-semibold dc:mb-1",
|
|
1523
1526
|
children: "No data to display"
|
|
@@ -1539,7 +1542,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1539
1542
|
children: /* @__PURE__ */ H("div", { className: "dc:animate-pulse bg-dc-surface-secondary dc:rounded dc:w-full dc:h-full" })
|
|
1540
1543
|
})
|
|
1541
1544
|
});
|
|
1542
|
-
},
|
|
1545
|
+
}, Xt = () => /* @__PURE__ */ H("div", {
|
|
1543
1546
|
className: "dc:absolute dc:inset-0 dc:flex dc:items-center dc:justify-center bg-dc-surface bg-opacity-75 dc:z-10",
|
|
1544
1547
|
children: /* @__PURE__ */ U("div", {
|
|
1545
1548
|
className: "dc:text-center",
|
|
@@ -1551,7 +1554,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1551
1554
|
children: "Refreshing results..."
|
|
1552
1555
|
})]
|
|
1553
1556
|
})
|
|
1554
|
-
}),
|
|
1557
|
+
}), Zt = () => {
|
|
1555
1558
|
let e = n && n.length > 0;
|
|
1556
1559
|
return /* @__PURE__ */ U("div", {
|
|
1557
1560
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-surface-secondary dc:flex-shrink-0",
|
|
@@ -1562,7 +1565,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1562
1565
|
children: [t === "refreshing" ? /* @__PURE__ */ H("div", {
|
|
1563
1566
|
className: "dc:w-4 dc:h-4 dc:mr-2 dc:rounded-full dc:border-b-2 dc:animate-spin",
|
|
1564
1567
|
style: { borderBottomColor: "var(--dc-primary)" }
|
|
1565
|
-
}) : e ? /* @__PURE__ */ H(
|
|
1568
|
+
}) : e ? /* @__PURE__ */ H(yt, { className: "dc:w-4 dc:h-4 text-dc-success dc:mr-2" }) : t === "error" ? /* @__PURE__ */ H(bt, { className: "dc:w-4 dc:h-4 text-dc-error dc:mr-2" }) : /* @__PURE__ */ H(xt, { className: "dc:w-4 dc:h-4 text-dc-text-muted dc:mr-2" }), /* @__PURE__ */ H("span", {
|
|
1566
1569
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1567
1570
|
children: e ? /* @__PURE__ */ U(V, { children: [
|
|
1568
1571
|
n.length,
|
|
@@ -1608,7 +1611,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1608
1611
|
onClick: ae,
|
|
1609
1612
|
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:transition-colors ${F ? "text-white bg-dc-accent dc:border border-dc-accent" : "text-dc-accent dark:text-dc-accent bg-dc-accent-bg dark:bg-dc-accent-bg dc:border border-dc-accent dark:border-dc-accent hover:bg-dc-accent-bg dark:hover:bg-dc-accent-bg"}`,
|
|
1610
1613
|
title: F ? "Close AI assistant" : "Analyse with AI",
|
|
1611
|
-
children: [/* @__PURE__ */ H(
|
|
1614
|
+
children: [/* @__PURE__ */ H(Ot, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ H("span", {
|
|
1612
1615
|
className: "dc:hidden dc:sm:inline",
|
|
1613
1616
|
children: "Analyse with AI"
|
|
1614
1617
|
})]
|
|
@@ -1622,14 +1625,14 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1622
1625
|
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:transition-colors ${k === "idle" && te ? "text-dc-accent dark:text-dc-accent bg-dc-accent-bg dark:bg-dc-accent-bg dc:border border-dc-accent dark:border-dc-accent hover:bg-dc-accent-bg dark:hover:bg-dc-accent-bg" : k === "idle" ? "text-dc-text-muted bg-dc-surface-secondary dc:border border-dc-border dc:cursor-not-allowed" : "text-dc-success dark:text-dc-success bg-dc-success-bg dark:bg-dc-success-bg dc:border border-dc-success dark:border-dc-success"}`,
|
|
1623
1626
|
title: k === "idle" ? "Share this analysis" : "Link copied!",
|
|
1624
1627
|
disabled: !te || k !== "idle",
|
|
1625
|
-
children: k === "idle" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(
|
|
1628
|
+
children: k === "idle" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Tt, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ H("span", {
|
|
1626
1629
|
className: "dc:hidden dc:sm:inline",
|
|
1627
1630
|
children: "Share"
|
|
1628
|
-
})] }) : k === "copied" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(
|
|
1631
|
+
})] }) : k === "copied" ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Et, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ H("span", {
|
|
1629
1632
|
className: "dc:hidden dc:sm:inline",
|
|
1630
1633
|
children: "Copied!"
|
|
1631
1634
|
})] }) : /* @__PURE__ */ U(V, { children: [
|
|
1632
|
-
/* @__PURE__ */ H(
|
|
1635
|
+
/* @__PURE__ */ H(Et, { className: "dc:w-3 dc:h-3" }),
|
|
1633
1636
|
/* @__PURE__ */ H("span", {
|
|
1634
1637
|
className: "dc:hidden dc:sm:inline",
|
|
1635
1638
|
children: "Copied!"
|
|
@@ -1642,46 +1645,46 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1642
1645
|
}),
|
|
1643
1646
|
A && ne && /* @__PURE__ */ U("button", {
|
|
1644
1647
|
onClick: (e) => A({ bustCache: e.shiftKey }),
|
|
1645
|
-
onMouseEnter: () =>
|
|
1646
|
-
onMouseLeave: () =>
|
|
1648
|
+
onMouseEnter: () => Me(!0),
|
|
1649
|
+
onMouseLeave: () => Me(!1),
|
|
1647
1650
|
disabled: j,
|
|
1648
|
-
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:transition-colors ${j ? "text-dc-text-muted bg-dc-surface-secondary dc:border border-dc-border dc:cursor-wait" :
|
|
1649
|
-
title: j ? "Refreshing..." :
|
|
1650
|
-
children: [/* @__PURE__ */ H(
|
|
1651
|
+
className: `dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:transition-colors ${j ? "text-dc-text-muted bg-dc-surface-secondary dc:border border-dc-border dc:cursor-wait" : Fe ? "text-dc-warning bg-dc-warning-bg dc:border border-dc-warning dc:font-semibold" : "text-dc-accent bg-dc-accent-bg dc:border border-dc-accent hover:bg-dc-accent-bg"}`,
|
|
1652
|
+
title: j ? "Refreshing..." : Fe ? "Click to refresh and bypass cache" : "Refresh data (Shift+click to bypass cache)",
|
|
1653
|
+
children: [/* @__PURE__ */ H(kt, { className: `dc:w-3 dc:h-3 ${j ? "dc:animate-spin" : ""}` }), /* @__PURE__ */ H("span", {
|
|
1651
1654
|
className: "dc:hidden dc:sm:inline",
|
|
1652
1655
|
children: j ? "Refreshing" : "Refresh"
|
|
1653
1656
|
})]
|
|
1654
1657
|
}),
|
|
1655
1658
|
N && re && /* @__PURE__ */ U("button", {
|
|
1656
|
-
onClick: () =>
|
|
1659
|
+
onClick: () => Oe(!0),
|
|
1657
1660
|
className: "dc:flex dc:items-center dc:gap-1 dc:px-2 dc:py-1.5 dc:text-xs dc:font-medium text-dc-text-secondary hover:text-dc-text bg-dc-surface hover:bg-dc-surface-hover dc:border border-dc-border dc:rounded dc:transition-colors",
|
|
1658
1661
|
title: q ? "Clear funnel" : "Clear all query data",
|
|
1659
|
-
children: [/* @__PURE__ */ H(
|
|
1662
|
+
children: [/* @__PURE__ */ H(Dt, { className: "dc:w-3 dc:h-3" }), /* @__PURE__ */ H("span", {
|
|
1660
1663
|
className: "dc:hidden dc:sm:inline",
|
|
1661
1664
|
children: "Clear"
|
|
1662
1665
|
})]
|
|
1663
1666
|
}),
|
|
1664
|
-
|
|
1667
|
+
Ce.showSchemaDiagram && /* @__PURE__ */ H("button", {
|
|
1665
1668
|
onClick: () => {
|
|
1666
|
-
|
|
1669
|
+
Te(!Z), Z || we(!1);
|
|
1667
1670
|
},
|
|
1668
1671
|
className: `dc:p-1.5 dc:rounded dc:transition-colors dc:relative ${Z ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:text-dc-text hover:bg-dc-surface-hover"}`,
|
|
1669
1672
|
title: Z ? "Hide schema diagram" : "Show schema diagram",
|
|
1670
|
-
children: /* @__PURE__ */ H(
|
|
1673
|
+
children: /* @__PURE__ */ H(At, { className: "dc:w-4 dc:h-4" })
|
|
1671
1674
|
}),
|
|
1672
1675
|
/* @__PURE__ */ U("button", {
|
|
1673
1676
|
onClick: () => {
|
|
1674
|
-
|
|
1677
|
+
we(!X), X || Te(!1);
|
|
1675
1678
|
},
|
|
1676
1679
|
className: `dc:p-1.5 dc:rounded dc:transition-colors dc:relative ${X ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:text-dc-text hover:bg-dc-surface-hover"}`,
|
|
1677
1680
|
title: X ? "Hide debug info" : "Show debug info",
|
|
1678
|
-
children: [/* @__PURE__ */ H(
|
|
1681
|
+
children: [/* @__PURE__ */ H(wt, { className: "dc:w-4 dc:h-4" }), (r || D.some((e) => e.error)) && !X && /* @__PURE__ */ H("span", { className: "dc:absolute dc:-top-0.5 dc:-right-0.5 dc:w-2 dc:h-2 bg-dc-danger-bg0 dc:rounded-full" })]
|
|
1679
1682
|
})
|
|
1680
1683
|
]
|
|
1681
1684
|
})]
|
|
1682
1685
|
}), e && o !== null && o > 1e3 && /* @__PURE__ */ U("div", {
|
|
1683
1686
|
className: "dc:mt-2 bg-dc-warning-bg dc:border border-dc-warning dc:rounded-lg dc:p-2 dc:flex dc:items-start",
|
|
1684
|
-
children: [/* @__PURE__ */ H(
|
|
1687
|
+
children: [/* @__PURE__ */ H(xt, { className: "dc:w-4 dc:h-4 text-dc-warning dc:mr-2 dc:shrink-0 dc:mt-0.5" }), /* @__PURE__ */ U("div", {
|
|
1685
1688
|
className: "dc:text-xs text-dc-warning",
|
|
1686
1689
|
children: [
|
|
1687
1690
|
/* @__PURE__ */ H("span", {
|
|
@@ -1695,7 +1698,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1695
1698
|
})]
|
|
1696
1699
|
})]
|
|
1697
1700
|
});
|
|
1698
|
-
},
|
|
1701
|
+
}, Qt = () => !M || !A ? null : /* @__PURE__ */ U("div", {
|
|
1699
1702
|
className: "dc:px-4 dc:py-2 bg-dc-warning-bg dc:border-b border-dc-warning dc:flex dc:items-center dc:justify-between dc:gap-3 dc:flex-shrink-0",
|
|
1700
1703
|
children: [/* @__PURE__ */ U("div", {
|
|
1701
1704
|
className: "dc:flex dc:items-center dc:gap-2 text-dc-warning",
|
|
@@ -1719,7 +1722,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1719
1722
|
className: "dc:px-3 dc:py-1 dc:text-xs dc:font-medium bg-dc-warning text-white dc:rounded hover:bg-dc-warning/90 dc:transition-colors",
|
|
1720
1723
|
children: "Refresh Now"
|
|
1721
1724
|
})]
|
|
1722
|
-
}),
|
|
1725
|
+
}), $t = () => !be || be.length === 0 ? null : /* @__PURE__ */ H(V, { children: be.map((t, n) => {
|
|
1723
1726
|
let r = e("warning"), i = t.severity === "error", a = i ? "bg-dc-danger-bg" : "bg-dc-warning-bg", o = i ? "border-dc-error" : "border-dc-warning", s = i ? "text-dc-error" : "text-dc-warning";
|
|
1724
1727
|
return /* @__PURE__ */ U("div", {
|
|
1725
1728
|
className: `dc:px-4 dc:py-2 ${a} dc:border-b ${o} dc:flex dc:items-start dc:gap-3 dc:flex-shrink-0`,
|
|
@@ -1734,30 +1737,33 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1734
1737
|
})]
|
|
1735
1738
|
})]
|
|
1736
1739
|
}, `${t.code}-${n}`);
|
|
1737
|
-
}) }),
|
|
1740
|
+
}) }), en = () => n && n.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1738
1741
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
1739
1742
|
children: [
|
|
1740
|
-
Xt(),
|
|
1741
1743
|
Zt(),
|
|
1742
1744
|
Qt(),
|
|
1745
|
+
$t(),
|
|
1743
1746
|
/* @__PURE__ */ H("div", {
|
|
1744
1747
|
className: "dc:flex-1 dc:min-h-0 dc:relative dc:overflow-auto",
|
|
1745
|
-
children: Z ? /* @__PURE__ */ H(P, {
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1748
|
+
children: Z ? /* @__PURE__ */ H(P.Suspense, {
|
|
1749
|
+
fallback: null,
|
|
1750
|
+
children: /* @__PURE__ */ H(pe, {
|
|
1751
|
+
height: "100%",
|
|
1752
|
+
highlightedFields: xe,
|
|
1753
|
+
onFieldClick: Se
|
|
1754
|
+
})
|
|
1755
|
+
}) : X ? Kt() : y === "chart" ? /* @__PURE__ */ H("div", {
|
|
1750
1756
|
className: "dc:p-4 dc:h-full",
|
|
1751
|
-
children:
|
|
1757
|
+
children: zt()
|
|
1752
1758
|
}) : J ? /* @__PURE__ */ H("div", {
|
|
1753
1759
|
className: "dc:h-full",
|
|
1754
|
-
children:
|
|
1755
|
-
}, "table-flow") :
|
|
1760
|
+
children: Jt()
|
|
1761
|
+
}, "table-flow") : qt ? /* @__PURE__ */ H("div", {
|
|
1756
1762
|
className: "dc:h-full",
|
|
1757
|
-
children:
|
|
1763
|
+
children: Yt(G)
|
|
1758
1764
|
}, `table-${G}`) : /* @__PURE__ */ H("div", {
|
|
1759
1765
|
className: "dc:h-full",
|
|
1760
|
-
children:
|
|
1766
|
+
children: Yt()
|
|
1761
1767
|
}, "table-single")
|
|
1762
1768
|
}),
|
|
1763
1769
|
!X && !Z && /* @__PURE__ */ H("div", {
|
|
@@ -1769,15 +1775,15 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1769
1775
|
disabled: !E && !J && !q && !Y,
|
|
1770
1776
|
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 ${y === "chart" ? "bg-dc-primary text-white" : !E && !J && !q && !Y ? "text-dc-text-disabled bg-dc-surface-tertiary dc:cursor-not-allowed" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1771
1777
|
title: E || J || q || Y ? "Chart view" : "Add metrics to enable chart view",
|
|
1772
|
-
children: [/* @__PURE__ */ H(
|
|
1773
|
-
}),
|
|
1778
|
+
children: [/* @__PURE__ */ H(Ct, { className: "dc:w-4 dc:h-4" }), "Chart"]
|
|
1779
|
+
}), qt ? /* @__PURE__ */ U(V, { children: [Array.from({ length: oe }).map((e, t) => /* @__PURE__ */ U("button", {
|
|
1774
1780
|
onClick: () => {
|
|
1775
1781
|
x("table"), ce?.(t);
|
|
1776
1782
|
},
|
|
1777
1783
|
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 ${y === "table" && G === t ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1778
1784
|
title: `Table Q${t + 1}`,
|
|
1779
1785
|
children: [
|
|
1780
|
-
/* @__PURE__ */ H(
|
|
1786
|
+
/* @__PURE__ */ H(St, { className: "dc:w-4 dc:h-4" }),
|
|
1781
1787
|
"Q",
|
|
1782
1788
|
t + 1
|
|
1783
1789
|
]
|
|
@@ -1787,27 +1793,30 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1787
1793
|
},
|
|
1788
1794
|
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 ${y === "table" && G === -1 ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1789
1795
|
title: "Merged table view",
|
|
1790
|
-
children: [/* @__PURE__ */ H(
|
|
1796
|
+
children: [/* @__PURE__ */ H(St, { className: "dc:w-4 dc:h-4" }), "Merged"]
|
|
1791
1797
|
})] }) : /* @__PURE__ */ U("button", {
|
|
1792
1798
|
onClick: () => x("table"),
|
|
1793
1799
|
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 ${y === "table" ? "bg-dc-primary text-white" : "text-dc-text-secondary hover:bg-dc-surface-hover"}`,
|
|
1794
1800
|
title: "Table view",
|
|
1795
|
-
children: [/* @__PURE__ */ H(
|
|
1801
|
+
children: [/* @__PURE__ */ H(St, { className: "dc:w-4 dc:h-4" }), "Table"]
|
|
1796
1802
|
})]
|
|
1797
1803
|
})
|
|
1798
1804
|
})
|
|
1799
1805
|
]
|
|
1800
1806
|
}) : /* @__PURE__ */ U("div", {
|
|
1801
1807
|
className: "dc:h-full dc:flex dc:flex-col",
|
|
1802
|
-
children: [
|
|
1808
|
+
children: [Zt(), /* @__PURE__ */ H("div", {
|
|
1803
1809
|
className: "dc:flex-1 dc:min-h-0 dc:relative dc:overflow-auto",
|
|
1804
|
-
children: Z ? /* @__PURE__ */ H(P, {
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1810
|
+
children: Z ? /* @__PURE__ */ H(P.Suspense, {
|
|
1811
|
+
fallback: null,
|
|
1812
|
+
children: /* @__PURE__ */ H(pe, {
|
|
1813
|
+
height: "100%",
|
|
1814
|
+
highlightedFields: xe,
|
|
1815
|
+
onFieldClick: Se
|
|
1816
|
+
})
|
|
1817
|
+
}) : X ? Kt() : Rt()
|
|
1809
1818
|
})]
|
|
1810
|
-
}),
|
|
1819
|
+
}), tn = R(() => {
|
|
1811
1820
|
if (n === null) return !1;
|
|
1812
1821
|
if (!Array.isArray(n)) return !0;
|
|
1813
1822
|
if (n.length === 0) return !1;
|
|
@@ -1821,24 +1830,24 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1821
1830
|
J,
|
|
1822
1831
|
Y,
|
|
1823
1832
|
K
|
|
1824
|
-
]),
|
|
1825
|
-
return M && !
|
|
1833
|
+
]), nn = tn && (t !== "idle" || Pt);
|
|
1834
|
+
return M && !tn ? /* @__PURE__ */ H("div", {
|
|
1826
1835
|
className: "dc:h-full dc:min-h-[400px] dc:flex dc:flex-col bg-dc-surface dc:relative",
|
|
1827
|
-
children:
|
|
1836
|
+
children: It()
|
|
1828
1837
|
}) : /* @__PURE__ */ U("div", {
|
|
1829
1838
|
className: "dc:h-full dc:min-h-[400px] dc:flex dc:flex-col bg-dc-surface dc:relative",
|
|
1830
1839
|
children: [
|
|
1831
|
-
t === "idle" && !
|
|
1832
|
-
t === "idle" &&
|
|
1833
|
-
t === "loading" && !
|
|
1834
|
-
t === "error" && !
|
|
1835
|
-
(t === "success" ||
|
|
1836
|
-
(t === "loading" || t === "refreshing") &&
|
|
1840
|
+
t === "idle" && !Pt && Lt(),
|
|
1841
|
+
t === "idle" && Pt && !tn && Ft(),
|
|
1842
|
+
t === "loading" && !tn && jt(),
|
|
1843
|
+
t === "error" && !tn && Mt(),
|
|
1844
|
+
(t === "success" || nn) && en(),
|
|
1845
|
+
(t === "loading" || t === "refreshing") && tn && Xt(),
|
|
1837
1846
|
N && /* @__PURE__ */ H(C, {
|
|
1838
|
-
isOpen:
|
|
1839
|
-
onClose: () =>
|
|
1847
|
+
isOpen: De,
|
|
1848
|
+
onClose: () => Oe(!1),
|
|
1840
1849
|
onConfirm: () => {
|
|
1841
|
-
N(),
|
|
1850
|
+
N(), Oe(!1);
|
|
1842
1851
|
},
|
|
1843
1852
|
title: q ? "Clear Funnel" : "Clear Query",
|
|
1844
1853
|
message: /* @__PURE__ */ H(V, { children: q ? "Are you sure you want to clear this funnel? This action cannot be undone." : "Are you sure you want to clear this query? This action cannot be undone." }),
|
|
@@ -1847,7 +1856,7 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1847
1856
|
})
|
|
1848
1857
|
]
|
|
1849
1858
|
});
|
|
1850
|
-
}),
|
|
1859
|
+
}), ge = F(function({ metric: t, fieldMeta: n, onRemove: i, sortDirection: a, sortPriority: o, onToggleSort: s, index: c, isDragging: l, onDragStart: u, onDragEnd: d }) {
|
|
1851
1860
|
let f = e("close"), p = e("chevronUp"), m = e("chevronDown"), h = e("chevronUpDown"), g = r(n?.type || "count") || e("measure"), _ = n?.shortTitle || n?.title || t.field.split(".").pop() || t.field, v = t.field.split(".")[0], y = () => {
|
|
1852
1861
|
switch (a) {
|
|
1853
1862
|
case "asc": return p ? /* @__PURE__ */ H(p, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -1903,8 +1912,8 @@ var me = F(function({ executionStatus: t, executionResults: n, executionError: r
|
|
|
1903
1912
|
})
|
|
1904
1913
|
]
|
|
1905
1914
|
});
|
|
1906
|
-
}),
|
|
1907
|
-
function
|
|
1915
|
+
}), _e = e("add");
|
|
1916
|
+
function ve(e, t) {
|
|
1908
1917
|
if (!t?.cubes) return null;
|
|
1909
1918
|
let [n] = e.split("."), r = t.cubes.find((e) => e.name === n);
|
|
1910
1919
|
return r && r.measures?.find((t) => t.name === e) || null;
|
|
@@ -1917,12 +1926,12 @@ function K(e) {
|
|
|
1917
1926
|
default: return "asc";
|
|
1918
1927
|
}
|
|
1919
1928
|
}
|
|
1920
|
-
var
|
|
1929
|
+
var ye = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, onOrderChange: a, onReorder: o }) {
|
|
1921
1930
|
let [s, c] = B(null), [l, u] = B(null), d = z(null), f = z(null), p = R(() => i ? Object.keys(i) : [], [i]), m = R(() => e.map((e, n) => {
|
|
1922
1931
|
let r = i?.[e.field] || null, a = r ? p.indexOf(e.field) + 1 : void 0;
|
|
1923
1932
|
return {
|
|
1924
1933
|
metric: e,
|
|
1925
|
-
fieldMeta:
|
|
1934
|
+
fieldMeta: ve(e.field, t),
|
|
1926
1935
|
sortDirection: r,
|
|
1927
1936
|
sortPriority: a,
|
|
1928
1937
|
index: n
|
|
@@ -1981,7 +1990,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
1981
1990
|
onClick: n,
|
|
1982
1991
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-3 dc:w-full dc:py-1 dc:px-2 dc:-ml-2 dc:rounded-lg hover:bg-dc-primary/10 dc:transition-colors dc:group",
|
|
1983
1992
|
title: "Add metric",
|
|
1984
|
-
children: [/* @__PURE__ */ H(N, { children: "Metrics" }), /* @__PURE__ */ H(
|
|
1993
|
+
children: [/* @__PURE__ */ H(N, { children: "Metrics" }), /* @__PURE__ */ H(_e, { className: "dc:w-5 dc:h-5 text-dc-text-secondary group-hover:text-dc-primary dc:transition-colors" })]
|
|
1985
1994
|
}), /* @__PURE__ */ U("div", {
|
|
1986
1995
|
className: "dc:space-y-2",
|
|
1987
1996
|
onDragLeave: o ? b : void 0,
|
|
@@ -2001,7 +2010,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
2001
2010
|
children: [u && /* @__PURE__ */ H("div", {
|
|
2002
2011
|
className: "dc:absolute dc:-top-5 dc:left-0 dc:right-0 dc:flex dc:items-center dc:justify-center dc:pointer-events-none dc:z-10",
|
|
2003
2012
|
children: /* @__PURE__ */ H("div", { className: "dc:h-0.5 dc:w-full bg-dc-primary dc:rounded-full" })
|
|
2004
|
-
}), /* @__PURE__ */ H(
|
|
2013
|
+
}), /* @__PURE__ */ H(ge, {
|
|
2005
2014
|
metric: e,
|
|
2006
2015
|
fieldMeta: t,
|
|
2007
2016
|
onRemove: () => r(e.id),
|
|
@@ -2036,7 +2045,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
2036
2045
|
})
|
|
2037
2046
|
]
|
|
2038
2047
|
})] });
|
|
2039
|
-
}),
|
|
2048
|
+
}), be = [
|
|
2040
2049
|
{
|
|
2041
2050
|
value: "hour",
|
|
2042
2051
|
label: "Hour"
|
|
@@ -2061,7 +2070,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
2061
2070
|
value: "year",
|
|
2062
2071
|
label: "Year"
|
|
2063
2072
|
}
|
|
2064
|
-
],
|
|
2073
|
+
], xe = F(function({ breakdown: t, fieldMeta: n, onRemove: r, onGranularityChange: i, onComparisonToggle: a, comparisonDisabled: o, sortDirection: s, sortPriority: c, onToggleSort: l, index: u, isDragging: d, onDragStart: f, onDragEnd: p }) {
|
|
2065
2074
|
let m = e("dimension"), h = e("timeDimension"), g = e("close"), _ = e("chevronUp"), v = e("chevronDown"), y = e("chevronUpDown"), b = n?.shortTitle || n?.title || t.field.split(".").pop() || t.field, x = t.field.split(".")[0], S = t.isTimeDimension ? h : m, C = () => {
|
|
2066
2075
|
switch (s) {
|
|
2067
2076
|
case "asc": return _ ? /* @__PURE__ */ H(_, { className: "dc:w-4 dc:h-4" }) : "↑";
|
|
@@ -2101,7 +2110,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
2101
2110
|
onChange: (e) => i(e.target.value),
|
|
2102
2111
|
onClick: (e) => e.stopPropagation(),
|
|
2103
2112
|
className: "dc:text-xs bg-dc-surface dc:border border-dc-border dc:rounded dc:px-2 dc:py-1 text-dc-text dc:focus:outline-none dc:focus:ring-1 focus:ring-dc-primary dc:flex-shrink-0",
|
|
2104
|
-
children:
|
|
2113
|
+
children: be.map((e) => /* @__PURE__ */ H("option", {
|
|
2105
2114
|
value: e.value,
|
|
2106
2115
|
children: e.label
|
|
2107
2116
|
}, e.value))
|
|
@@ -2136,7 +2145,7 @@ var ve = F(function({ metrics: e, schema: t, onAdd: n, onRemove: r, order: i, on
|
|
|
2136
2145
|
})
|
|
2137
2146
|
]
|
|
2138
2147
|
});
|
|
2139
|
-
}),
|
|
2148
|
+
}), Se = e("add");
|
|
2140
2149
|
function q(e, t) {
|
|
2141
2150
|
if (!t?.cubes) return null;
|
|
2142
2151
|
let [n] = e.split("."), r = t.cubes.find((e) => e.name === n);
|
|
@@ -2214,7 +2223,7 @@ var Y = F(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranular
|
|
|
2214
2223
|
onClick: n,
|
|
2215
2224
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-3 dc:w-full dc:py-1 dc:px-2 dc:-ml-2 dc:rounded-lg hover:bg-dc-primary/10 dc:transition-colors dc:group",
|
|
2216
2225
|
title: "Add breakdown",
|
|
2217
|
-
children: [/* @__PURE__ */ H(N, { children: "Breakdown" }), /* @__PURE__ */ H(
|
|
2226
|
+
children: [/* @__PURE__ */ H(N, { children: "Breakdown" }), /* @__PURE__ */ H(Se, { className: "dc:w-5 dc:h-5 text-dc-text-secondary group-hover:text-dc-primary dc:transition-colors" })]
|
|
2218
2227
|
}), /* @__PURE__ */ U("div", {
|
|
2219
2228
|
className: "dc:space-y-2",
|
|
2220
2229
|
onDragLeave: c ? C : void 0,
|
|
@@ -2234,7 +2243,7 @@ var Y = F(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranular
|
|
|
2234
2243
|
children: [f && /* @__PURE__ */ H("div", {
|
|
2235
2244
|
className: "dc:absolute dc:-top-5 dc:left-0 dc:right-0 dc:flex dc:items-center dc:justify-center dc:pointer-events-none dc:z-10",
|
|
2236
2245
|
children: /* @__PURE__ */ H("div", { className: "dc:h-0.5 dc:w-full bg-dc-primary dc:rounded-full" })
|
|
2237
|
-
}), /* @__PURE__ */ H(
|
|
2246
|
+
}), /* @__PURE__ */ H(xe, {
|
|
2238
2247
|
breakdown: e,
|
|
2239
2248
|
fieldMeta: t,
|
|
2240
2249
|
onRemove: () => r(e.id),
|
|
@@ -2272,7 +2281,7 @@ var Y = F(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranular
|
|
|
2272
2281
|
})
|
|
2273
2282
|
]
|
|
2274
2283
|
})] });
|
|
2275
|
-
}),
|
|
2284
|
+
}), Ce = [
|
|
2276
2285
|
5,
|
|
2277
2286
|
10,
|
|
2278
2287
|
25,
|
|
@@ -2282,11 +2291,11 @@ var Y = F(function({ breakdowns: e, schema: t, onAdd: n, onRemove: r, onGranular
|
|
|
2282
2291
|
1e3
|
|
2283
2292
|
];
|
|
2284
2293
|
function X({ limit: e, onLimitChange: t }) {
|
|
2285
|
-
let n = e != null && !
|
|
2294
|
+
let n = e != null && !Ce.includes(e), [r, i] = B(n), [a, o] = B(n ? String(e) : ""), s = z(null);
|
|
2286
2295
|
L(() => {
|
|
2287
2296
|
r && s.current && (s.current.focus(), s.current.select());
|
|
2288
2297
|
}, [r]), L(() => {
|
|
2289
|
-
e != null && !
|
|
2298
|
+
e != null && !Ce.includes(e) && (o(String(e)), i(!0));
|
|
2290
2299
|
}, [e]);
|
|
2291
2300
|
let c = (e) => {
|
|
2292
2301
|
i(!1), t(e);
|
|
@@ -2324,7 +2333,7 @@ function X({ limit: e, onLimitChange: t }) {
|
|
|
2324
2333
|
})]
|
|
2325
2334
|
}), /* @__PURE__ */ U("div", {
|
|
2326
2335
|
className: "dc:flex dc:flex-wrap dc:gap-1",
|
|
2327
|
-
children: [
|
|
2336
|
+
children: [Ce.map((t) => /* @__PURE__ */ H("button", {
|
|
2328
2337
|
onClick: () => c(t),
|
|
2329
2338
|
className: `dc:px-2 dc:py-0.5 dc:text-xs dc:rounded dc:border dc:transition-colors ${e === t && !r ? "bg-dc-primary/10 border-dc-primary text-dc-primary dc:font-medium" : "border-dc-border text-dc-text-secondary dc:hover:border-dc-primary/50 dc:hover:text-dc-primary"}`,
|
|
2330
2339
|
children: t >= 1e3 ? `${t / 1e3}k` : t
|
|
@@ -2349,8 +2358,8 @@ function X({ limit: e, onLimitChange: t }) {
|
|
|
2349
2358
|
}
|
|
2350
2359
|
//#endregion
|
|
2351
2360
|
//#region src/client/components/AnalysisBuilder/AnalysisAxisDropZone.tsx
|
|
2352
|
-
var
|
|
2353
|
-
function
|
|
2361
|
+
var we = e("close"), Z = e("dimension"), Te = e("timeDimension"), Q = e("measure");
|
|
2362
|
+
function Ee({ config: e, fields: t, onDrop: n, onRemove: i, onDragStart: a, onDragEnd: o, onDragOver: s, onReorder: c, draggedItem: l, getFieldMeta: u, yAxisAssignment: d, onYAxisAssignmentChange: f }) {
|
|
2354
2363
|
let { key: p, label: m, description: h, mandatory: g, maxItems: _, emptyText: v } = e, [y, b] = B(null), [x, S] = B(!1), [C, w] = B(!1), T = z(null), E = z(null), D = z(t);
|
|
2355
2364
|
D.current = t;
|
|
2356
2365
|
let O = z(null), ee = () => {
|
|
@@ -2431,7 +2440,7 @@ function Te({ config: e, fields: t, onDrop: n, onRemove: i, onDragStart: a, onDr
|
|
|
2431
2440
|
children: /* @__PURE__ */ H(r(e.measureType || "count") || Q, { className: "dc:w-4 dc:h-4" })
|
|
2432
2441
|
}) : e.type === "timeDimension" ? /* @__PURE__ */ H("span", {
|
|
2433
2442
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-time-dimension text-dc-time-dimension-text dc:flex-shrink-0",
|
|
2434
|
-
children: /* @__PURE__ */ H(
|
|
2443
|
+
children: /* @__PURE__ */ H(Te, { className: "dc:w-4 dc:h-4" })
|
|
2435
2444
|
}) : /* @__PURE__ */ H("span", {
|
|
2436
2445
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-dimension text-dc-dimension-text dc:flex-shrink-0",
|
|
2437
2446
|
children: /* @__PURE__ */ H(Z, { className: "dc:w-4 dc:h-4" })
|
|
@@ -2529,7 +2538,7 @@ function Te({ config: e, fields: t, onDrop: n, onRemove: i, onDragStart: a, onDr
|
|
|
2529
2538
|
onClick: () => i(t, p),
|
|
2530
2539
|
className: "dc:p-1 text-dc-text-muted hover:text-dc-danger dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity dc:flex-shrink-0",
|
|
2531
2540
|
title: `Remove from ${m}`,
|
|
2532
|
-
children: /* @__PURE__ */ H(
|
|
2541
|
+
children: /* @__PURE__ */ H(we, { className: "dc:w-4 dc:h-4" })
|
|
2533
2542
|
})
|
|
2534
2543
|
]
|
|
2535
2544
|
})]
|
|
@@ -2565,11 +2574,11 @@ function Te({ config: e, fields: t, onDrop: n, onRemove: i, onDragStart: a, onDr
|
|
|
2565
2574
|
}
|
|
2566
2575
|
//#endregion
|
|
2567
2576
|
//#region src/client/components/ChartTypeSelector.tsx
|
|
2568
|
-
function
|
|
2577
|
+
function De(e) {
|
|
2569
2578
|
return c[e]?.label || e;
|
|
2570
2579
|
}
|
|
2571
|
-
function
|
|
2572
|
-
let [l, u] = B(!1), d = R(() => Object.keys(c).filter((e) => !o.includes(e)).sort((e, t) =>
|
|
2580
|
+
function Oe({ selectedType: e, onTypeChange: t, className: r = "", compact: i = !1, availability: a, excludeTypes: o = [] }) {
|
|
2581
|
+
let [l, u] = B(!1), d = R(() => Object.keys(c).filter((e) => !o.includes(e)).sort((e, t) => De(e).localeCompare(De(t))), [o, oe(s.subscribe, s.getSnapshot)]), f = n(e), p = De(e);
|
|
2573
2582
|
return /* @__PURE__ */ U("div", {
|
|
2574
2583
|
className: `${r} dc:relative`,
|
|
2575
2584
|
children: [/* @__PURE__ */ U("button", {
|
|
@@ -2601,7 +2610,7 @@ function De({ selectedType: e, onTypeChange: t, className: r = "", compact: i =
|
|
|
2601
2610
|
children: /* @__PURE__ */ H("div", {
|
|
2602
2611
|
className: `dc:grid dc:gap-1.5 ${i ? "dc:grid-cols-2" : "dc:grid-cols-2 dc:sm:grid-cols-3 dc:lg:grid-cols-4"}`,
|
|
2603
2612
|
children: d.map((r) => {
|
|
2604
|
-
let i = c[r], o = n(r), s =
|
|
2613
|
+
let i = c[r], o = n(r), s = De(r), l = e === r, d = i?.description, f = i?.useCase, p = a?.[r], m = p?.available ?? !0, h = p?.reason, g = !m && h ? h : [d, f].filter(Boolean).join(". ");
|
|
2605
2614
|
return /* @__PURE__ */ U("button", {
|
|
2606
2615
|
type: "button",
|
|
2607
2616
|
onClick: () => {
|
|
@@ -2638,8 +2647,8 @@ function De({ selectedType: e, onTypeChange: t, className: r = "", compact: i =
|
|
|
2638
2647
|
}
|
|
2639
2648
|
//#endregion
|
|
2640
2649
|
//#region src/client/components/AnalysisBuilder/AnalysisChartConfigPanel.tsx
|
|
2641
|
-
var
|
|
2642
|
-
function
|
|
2650
|
+
var ke = e("measure"), Ae = e("dimension"), je = e("timeDimension");
|
|
2651
|
+
function Me({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a, chartAvailability: s, onChartTypeChange: c, onChartConfigChange: l }) {
|
|
2643
2652
|
let [u, d] = B(null), f = R(() => ({
|
|
2644
2653
|
measures: n.map((e) => e.field),
|
|
2645
2654
|
dimensions: i.filter((e) => !e.isTimeDimension).map((e) => e.field),
|
|
@@ -2764,7 +2773,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2764
2773
|
children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H(N, {
|
|
2765
2774
|
className: "dc:mb-2",
|
|
2766
2775
|
children: "Chart Type"
|
|
2767
|
-
}), /* @__PURE__ */ H(
|
|
2776
|
+
}), /* @__PURE__ */ H(Oe, {
|
|
2768
2777
|
selectedType: e,
|
|
2769
2778
|
onTypeChange: c,
|
|
2770
2779
|
availability: s,
|
|
@@ -2797,7 +2806,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2797
2806
|
/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H(N, {
|
|
2798
2807
|
className: "dc:mb-2",
|
|
2799
2808
|
children: "Chart Type"
|
|
2800
|
-
}), /* @__PURE__ */ H(
|
|
2809
|
+
}), /* @__PURE__ */ H(Oe, {
|
|
2801
2810
|
selectedType: e,
|
|
2802
2811
|
onTypeChange: c,
|
|
2803
2812
|
availability: s,
|
|
@@ -2815,7 +2824,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2815
2824
|
children: "Chart Configuration"
|
|
2816
2825
|
}), /* @__PURE__ */ H("div", {
|
|
2817
2826
|
className: "dc:space-y-1",
|
|
2818
|
-
children: p.dropZones.map((e) => /* @__PURE__ */ H(
|
|
2827
|
+
children: p.dropZones.map((e) => /* @__PURE__ */ H(Ee, {
|
|
2819
2828
|
config: e,
|
|
2820
2829
|
fields: g(e.key),
|
|
2821
2830
|
onDrop: C,
|
|
@@ -2842,7 +2851,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2842
2851
|
className: "dc:space-y-2",
|
|
2843
2852
|
children: [
|
|
2844
2853
|
D.measures.map((e) => {
|
|
2845
|
-
let t = y(e), n = u && u.field === e && u.fromAxis === "available", i = r(t.measureType || "count") ||
|
|
2854
|
+
let t = y(e), n = u && u.field === e && u.fromAxis === "available", i = r(t.measureType || "count") || ke;
|
|
2846
2855
|
return /* @__PURE__ */ U("div", {
|
|
2847
2856
|
draggable: !0,
|
|
2848
2857
|
onDragStart: (t) => b(t, e, "available"),
|
|
@@ -2874,7 +2883,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2874
2883
|
title: e,
|
|
2875
2884
|
children: [/* @__PURE__ */ H("span", {
|
|
2876
2885
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-dimension text-dc-dimension-text dc:flex-shrink-0",
|
|
2877
|
-
children: /* @__PURE__ */ H(
|
|
2886
|
+
children: /* @__PURE__ */ H(Ae, { className: "dc:w-4 dc:h-4" })
|
|
2878
2887
|
}), /* @__PURE__ */ U("div", {
|
|
2879
2888
|
className: "dc:flex-1 dc:min-w-0",
|
|
2880
2889
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -2897,7 +2906,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2897
2906
|
title: e,
|
|
2898
2907
|
children: [/* @__PURE__ */ H("span", {
|
|
2899
2908
|
className: "dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded bg-dc-time-dimension text-dc-time-dimension-text dc:flex-shrink-0",
|
|
2900
|
-
children: /* @__PURE__ */ H(
|
|
2909
|
+
children: /* @__PURE__ */ H(je, { className: "dc:w-4 dc:h-4" })
|
|
2901
2910
|
}), /* @__PURE__ */ U("div", {
|
|
2902
2911
|
className: "dc:flex-1 dc:min-w-0",
|
|
2903
2912
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -2922,7 +2931,7 @@ function je({ chartType: e, chartConfig: t, metrics: n, breakdowns: i, schema: a
|
|
|
2922
2931
|
}
|
|
2923
2932
|
//#endregion
|
|
2924
2933
|
//#region src/client/components/AnalysisBuilder/FunnelBindingKeySelector.tsx
|
|
2925
|
-
var
|
|
2934
|
+
var Ne = e("chevronDown"), Pe = e("check"), Fe = e("search"), Ie = F(function({ bindingKey: e, onChange: t, schema: n, disabled: r = !1, className: i = "" }) {
|
|
2926
2935
|
let [a, o] = B(!1), [s, c] = B(""), l = z(null), u = z(null), d = R(() => j(n), [n]), f = R(() => {
|
|
2927
2936
|
let e = {};
|
|
2928
2937
|
for (let t of d) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -2978,7 +2987,7 @@ var Me = e("chevronDown"), Ne = e("check"), Pe = e("search"), Fe = F(function({
|
|
|
2978
2987
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
2979
2988
|
title: "Clear binding key",
|
|
2980
2989
|
children: "×"
|
|
2981
|
-
}),
|
|
2990
|
+
}), Ne && /* @__PURE__ */ H(Ne, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${a ? "dc:rotate-180" : ""}` })]
|
|
2982
2991
|
})]
|
|
2983
2992
|
}), a && /* @__PURE__ */ U("div", {
|
|
2984
2993
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:right-0 dc:w-[280px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -2987,7 +2996,7 @@ var Me = e("chevronDown"), Ne = e("check"), Pe = e("search"), Fe = F(function({
|
|
|
2987
2996
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
2988
2997
|
children: /* @__PURE__ */ U("div", {
|
|
2989
2998
|
className: "dc:relative",
|
|
2990
|
-
children: [
|
|
2999
|
+
children: [Fe && /* @__PURE__ */ H(Fe, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ H("input", {
|
|
2991
3000
|
ref: u,
|
|
2992
3001
|
type: "text",
|
|
2993
3002
|
value: s,
|
|
@@ -3014,7 +3023,7 @@ var Me = e("chevronDown"), Ne = e("check"), Pe = e("search"), Fe = F(function({
|
|
|
3014
3023
|
dc:rounded dc:transition-colors
|
|
3015
3024
|
${g(e.dimension) ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
3016
3025
|
`,
|
|
3017
|
-
children: [/* @__PURE__ */ H("span", { children: e.label }), g(e.dimension) &&
|
|
3026
|
+
children: [/* @__PURE__ */ H("span", { children: e.label }), g(e.dimension) && Pe && /* @__PURE__ */ H(Pe, { className: "dc:w-4 dc:h-4" })]
|
|
3018
3027
|
}, e.dimension))]
|
|
3019
3028
|
}, e))
|
|
3020
3029
|
}),
|
|
@@ -3026,36 +3035,36 @@ var Me = e("chevronDown"), Ne = e("check"), Pe = e("search"), Fe = F(function({
|
|
|
3026
3035
|
})]
|
|
3027
3036
|
})
|
|
3028
3037
|
});
|
|
3029
|
-
}),
|
|
3038
|
+
}), Le = e("chartBar"), Re = e("chartFunnel"), ze = e("chartSankey"), Be = e("chartRetention"), Ve = [
|
|
3030
3039
|
{
|
|
3031
3040
|
type: "query",
|
|
3032
3041
|
label: "Query",
|
|
3033
3042
|
description: "Standard analysis (single or multi-query)",
|
|
3034
|
-
icon:
|
|
3043
|
+
icon: Le
|
|
3035
3044
|
},
|
|
3036
3045
|
{
|
|
3037
3046
|
type: "funnel",
|
|
3038
3047
|
label: "Funnel",
|
|
3039
3048
|
description: "Sequential conversion analysis",
|
|
3040
|
-
icon:
|
|
3049
|
+
icon: Re
|
|
3041
3050
|
},
|
|
3042
3051
|
{
|
|
3043
3052
|
type: "flow",
|
|
3044
3053
|
label: "Flow",
|
|
3045
3054
|
description: "Bidirectional path analysis with Sankey visualization",
|
|
3046
|
-
icon:
|
|
3055
|
+
icon: ze
|
|
3047
3056
|
},
|
|
3048
3057
|
{
|
|
3049
3058
|
type: "retention",
|
|
3050
3059
|
label: "Retention",
|
|
3051
3060
|
description: "Cohort-based retention analysis over time periods",
|
|
3052
|
-
icon:
|
|
3061
|
+
icon: Be
|
|
3053
3062
|
}
|
|
3054
|
-
],
|
|
3063
|
+
], He = F(function({ value: e, onChange: t, disabled: n = !1, schema: r }) {
|
|
3055
3064
|
let i = R(() => r?.cubes?.some((e) => e.meta?.eventStream) ?? !1, [r]);
|
|
3056
3065
|
return /* @__PURE__ */ H("div", {
|
|
3057
3066
|
className: "dc:flex dc:items-center dc:gap-0.5 dc:p-1.5 dc:border-b border-dc-border bg-dc-surface",
|
|
3058
|
-
children: R(() =>
|
|
3067
|
+
children: R(() => Ve.filter((e) => e.type === "query" ? !0 : i), [i]).map((r) => {
|
|
3059
3068
|
let i = e === r.type, a = r.icon;
|
|
3060
3069
|
return /* @__PURE__ */ U("button", {
|
|
3061
3070
|
onClick: () => !n && t(r.type),
|
|
@@ -3074,8 +3083,8 @@ var Me = e("chevronDown"), Ne = e("check"), Pe = e("search"), Fe = F(function({
|
|
|
3074
3083
|
}, r.type);
|
|
3075
3084
|
})
|
|
3076
3085
|
});
|
|
3077
|
-
}),
|
|
3078
|
-
function
|
|
3086
|
+
}), Ue = e("chevronDown"), We = e("chevronRight"), Ge = e("check"), Ke = e("search"), qe = e("dimension"), Je = e("link"), Ye = e("timeDimension");
|
|
3087
|
+
function Xe(e) {
|
|
3079
3088
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
3080
3089
|
cube: e.name,
|
|
3081
3090
|
dimension: e.name,
|
|
@@ -3083,7 +3092,7 @@ function Ye(e) {
|
|
|
3083
3092
|
eventStream: e.meta?.eventStream
|
|
3084
3093
|
})) : [];
|
|
3085
3094
|
}
|
|
3086
|
-
function
|
|
3095
|
+
function Ze(e) {
|
|
3087
3096
|
if (!e?.cubes) return [];
|
|
3088
3097
|
let t = [];
|
|
3089
3098
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -3093,7 +3102,7 @@ function Xe(e) {
|
|
|
3093
3102
|
});
|
|
3094
3103
|
return t;
|
|
3095
3104
|
}
|
|
3096
|
-
var
|
|
3105
|
+
var Qe = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
3097
3106
|
let [s, c] = B(!1), [l, u] = B(""), d = z(null), f = z(null), p = R(() => {
|
|
3098
3107
|
let e = {};
|
|
3099
3108
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -3150,7 +3159,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3150
3159
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
3151
3160
|
title: "Clear",
|
|
3152
3161
|
children: "×"
|
|
3153
|
-
}),
|
|
3162
|
+
}), Ue && /* @__PURE__ */ H(Ue, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
3154
3163
|
})]
|
|
3155
3164
|
}), s && /* @__PURE__ */ U("div", {
|
|
3156
3165
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -3159,7 +3168,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3159
3168
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
3160
3169
|
children: /* @__PURE__ */ U("div", {
|
|
3161
3170
|
className: "dc:relative",
|
|
3162
|
-
children: [
|
|
3171
|
+
children: [Ke && /* @__PURE__ */ H(Ke, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ H("input", {
|
|
3163
3172
|
ref: f,
|
|
3164
3173
|
type: "text",
|
|
3165
3174
|
value: l,
|
|
@@ -3186,7 +3195,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3186
3195
|
dc:rounded dc:transition-colors
|
|
3187
3196
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
3188
3197
|
`,
|
|
3189
|
-
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension &&
|
|
3198
|
+
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension && Ge && /* @__PURE__ */ H(Ge, { className: "dc:w-4 dc:h-4" })]
|
|
3190
3199
|
}, t.dimension))]
|
|
3191
3200
|
}, t))
|
|
3192
3201
|
}),
|
|
@@ -3198,12 +3207,12 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3198
3207
|
})]
|
|
3199
3208
|
})]
|
|
3200
3209
|
});
|
|
3201
|
-
}),
|
|
3202
|
-
let s = R(() =>
|
|
3210
|
+
}), $e = F(function({ selectedCube: e, bindingKey: t, timeDimension: n, schema: r, onCubeChange: i, onBindingKeyChange: a, onTimeDimensionChange: o }) {
|
|
3211
|
+
let s = R(() => Xe(r), [r]), c = R(() => {
|
|
3203
3212
|
let t = j(r);
|
|
3204
3213
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3205
3214
|
}, [r, e]), l = R(() => {
|
|
3206
|
-
let t =
|
|
3215
|
+
let t = Ze(r);
|
|
3207
3216
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3208
3217
|
}, [r, e]), u = !!(e && t && n), [d, f] = B(!1), p = z(!1);
|
|
3209
3218
|
L(() => {
|
|
@@ -3235,14 +3244,14 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3235
3244
|
children: [/* @__PURE__ */ U("div", {
|
|
3236
3245
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
3237
3246
|
children: [
|
|
3238
|
-
d ?
|
|
3247
|
+
d ? We && /* @__PURE__ */ H(We, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : Ue && /* @__PURE__ */ H(Ue, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
3239
3248
|
/* @__PURE__ */ H(N, {
|
|
3240
3249
|
className: "dc:mb-0",
|
|
3241
3250
|
children: "Configuration"
|
|
3242
3251
|
}),
|
|
3243
3252
|
u && /* @__PURE__ */ H("span", {
|
|
3244
3253
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
3245
|
-
children:
|
|
3254
|
+
children: Ge && /* @__PURE__ */ H(Ge, { className: "dc:w-3.5 dc:h-3.5" })
|
|
3246
3255
|
})
|
|
3247
3256
|
]
|
|
3248
3257
|
}), d && u && /* @__PURE__ */ H("span", {
|
|
@@ -3252,29 +3261,29 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3252
3261
|
}), !d && /* @__PURE__ */ U("div", {
|
|
3253
3262
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
3254
3263
|
children: [
|
|
3255
|
-
/* @__PURE__ */ H(
|
|
3264
|
+
/* @__PURE__ */ H(Qe, {
|
|
3256
3265
|
value: e,
|
|
3257
3266
|
label: "Cube",
|
|
3258
3267
|
placeholder: "Select event stream cube",
|
|
3259
|
-
icon:
|
|
3268
|
+
icon: qe,
|
|
3260
3269
|
options: s,
|
|
3261
3270
|
onChange: i,
|
|
3262
3271
|
helpText: "Select a cube configured for funnel analysis"
|
|
3263
3272
|
}),
|
|
3264
|
-
/* @__PURE__ */ H(
|
|
3273
|
+
/* @__PURE__ */ H(Qe, {
|
|
3265
3274
|
value: m,
|
|
3266
3275
|
label: "Binding Key",
|
|
3267
3276
|
placeholder: e ? "Select binding key" : "Select cube first",
|
|
3268
|
-
icon:
|
|
3277
|
+
icon: Je,
|
|
3269
3278
|
options: c,
|
|
3270
3279
|
onChange: h,
|
|
3271
3280
|
helpText: "Entity that connects steps (e.g., user ID, order ID)"
|
|
3272
3281
|
}),
|
|
3273
|
-
/* @__PURE__ */ H(
|
|
3282
|
+
/* @__PURE__ */ H(Qe, {
|
|
3274
3283
|
value: n,
|
|
3275
3284
|
label: "Time Dimension",
|
|
3276
3285
|
placeholder: e ? "Select time dimension" : "Select cube first",
|
|
3277
|
-
icon:
|
|
3286
|
+
icon: Ye,
|
|
3278
3287
|
options: l,
|
|
3279
3288
|
onChange: o,
|
|
3280
3289
|
helpText: "Timestamp field for step ordering"
|
|
@@ -3282,7 +3291,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3282
3291
|
]
|
|
3283
3292
|
})]
|
|
3284
3293
|
});
|
|
3285
|
-
}),
|
|
3294
|
+
}), et = e("menu"), tt = e("close"), nt = e("chevronDown"), rt = e("check"), it = e("timeDimension"), at = [
|
|
3286
3295
|
{
|
|
3287
3296
|
value: null,
|
|
3288
3297
|
label: "No limit"
|
|
@@ -3323,7 +3332,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3323
3332
|
value: "P90D",
|
|
3324
3333
|
label: "90 days"
|
|
3325
3334
|
}
|
|
3326
|
-
],
|
|
3335
|
+
], ot = F(function({ step: e, stepIndex: t, isActive: n, canRemove: r, schema: i, onSelect: a, onRemove: o, onUpdate: s }) {
|
|
3327
3336
|
let [c, l] = B(!1), [u, d] = B(!1), [f, p] = B(e.name), m = z(null), h = z(null);
|
|
3328
3337
|
L(() => {
|
|
3329
3338
|
p(e.name);
|
|
@@ -3351,7 +3360,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3351
3360
|
s({ timeToConvert: e || void 0 }), d(!1);
|
|
3352
3361
|
}, [s]), b = I((e) => {
|
|
3353
3362
|
s({ filters: e });
|
|
3354
|
-
}, [s]), x = e.timeToConvert ?
|
|
3363
|
+
}, [s]), x = e.timeToConvert ? at.find((t) => t.value === e.timeToConvert)?.label || e.timeToConvert : "No limit", S = R(() => {
|
|
3355
3364
|
if (!i) return null;
|
|
3356
3365
|
let t = { cubes: i.cubes.map((e) => ({
|
|
3357
3366
|
...e,
|
|
@@ -3371,7 +3380,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3371
3380
|
children: [
|
|
3372
3381
|
/* @__PURE__ */ H("div", {
|
|
3373
3382
|
className: "dc:cursor-grab dc:active:cursor-grabbing text-dc-text-muted hover:text-dc-text",
|
|
3374
|
-
children:
|
|
3383
|
+
children: et && /* @__PURE__ */ H(et, { className: "dc:w-4 dc:h-4" })
|
|
3375
3384
|
}),
|
|
3376
3385
|
/* @__PURE__ */ H("span", {
|
|
3377
3386
|
className: "dc:flex-shrink-0 dc:w-6 dc:h-6 dc:flex dc:items-center dc:justify-center dc:rounded-full bg-dc-primary/10 text-dc-primary dc:text-xs dc:font-medium",
|
|
@@ -3401,7 +3410,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3401
3410
|
},
|
|
3402
3411
|
className: "dc:p-1 dc:rounded hover:bg-dc-danger-bg text-dc-text-muted hover:text-dc-error dc:transition-colors",
|
|
3403
3412
|
title: "Remove step",
|
|
3404
|
-
children:
|
|
3413
|
+
children: tt && /* @__PURE__ */ H(tt, { className: "dc:w-4 dc:h-4" })
|
|
3405
3414
|
})
|
|
3406
3415
|
]
|
|
3407
3416
|
}),
|
|
@@ -3415,7 +3424,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3415
3424
|
dimensionsOnly: !0
|
|
3416
3425
|
}), t > 0 && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("label", {
|
|
3417
3426
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:text-xs dc:font-medium text-dc-text-muted dc:mb-1",
|
|
3418
|
-
children: [
|
|
3427
|
+
children: [it && /* @__PURE__ */ H(it, { className: "dc:w-3.5 dc:h-3.5" }), "Time Window"]
|
|
3419
3428
|
}), /* @__PURE__ */ U("div", {
|
|
3420
3429
|
ref: h,
|
|
3421
3430
|
className: "dc:relative",
|
|
@@ -3431,17 +3440,17 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3431
3440
|
children: [/* @__PURE__ */ H("span", {
|
|
3432
3441
|
className: e.timeToConvert ? "text-dc-text" : "text-dc-text-muted",
|
|
3433
3442
|
children: x
|
|
3434
|
-
}),
|
|
3443
|
+
}), nt && /* @__PURE__ */ H(nt, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${u ? "dc:rotate-180" : ""}` })]
|
|
3435
3444
|
}), u && /* @__PURE__ */ U("div", {
|
|
3436
3445
|
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",
|
|
3437
|
-
children: [
|
|
3446
|
+
children: [at.map((t) => /* @__PURE__ */ U("button", {
|
|
3438
3447
|
onClick: () => y(t.value),
|
|
3439
3448
|
className: `
|
|
3440
3449
|
dc:flex dc:items-center dc:justify-between dc:w-full dc:px-3 dc:py-1.5 dc:text-sm
|
|
3441
3450
|
dc:transition-colors
|
|
3442
3451
|
${e.timeToConvert === t.value || !e.timeToConvert && t.value === null ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
3443
3452
|
`,
|
|
3444
|
-
children: [/* @__PURE__ */ H("span", { children: t.label }), (e.timeToConvert === t.value || !e.timeToConvert && t.value === null) &&
|
|
3453
|
+
children: [/* @__PURE__ */ H("span", { children: t.label }), (e.timeToConvert === t.value || !e.timeToConvert && t.value === null) && rt && /* @__PURE__ */ H(rt, { className: "dc:w-4 dc:h-4" })]
|
|
3445
3454
|
}, t.value || "none")), /* @__PURE__ */ H("div", {
|
|
3446
3455
|
className: "dc:px-3 dc:py-2 dc:border-t border-dc-border dc:text-xs text-dc-text-muted",
|
|
3447
3456
|
children: "Max time from previous step to qualify"
|
|
@@ -3473,7 +3482,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3473
3482
|
})
|
|
3474
3483
|
]
|
|
3475
3484
|
});
|
|
3476
|
-
}),
|
|
3485
|
+
}), st = e("add"), ct = F(function({ steps: e, activeStepIndex: t, schema: n, onAddStep: r, onRemoveStep: i, onUpdateStep: a, onSelectStep: o, onReorderSteps: s }) {
|
|
3477
3486
|
let [c, l] = B(null), [u, d] = B(null), f = I((e) => {
|
|
3478
3487
|
l(e);
|
|
3479
3488
|
}, []), p = I((e, t) => {
|
|
@@ -3507,7 +3516,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3507
3516
|
}), /* @__PURE__ */ U("button", {
|
|
3508
3517
|
onClick: r,
|
|
3509
3518
|
className: "dc:inline-flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium text-dc-primary bg-dc-primary/10 dc:rounded-md hover:bg-dc-primary/20 dc:transition-colors",
|
|
3510
|
-
children: [/* @__PURE__ */ H(
|
|
3519
|
+
children: [/* @__PURE__ */ H(st, { className: "dc:w-4 dc:h-4" }), "Add First Step"]
|
|
3511
3520
|
})]
|
|
3512
3521
|
}) : /* @__PURE__ */ H("div", {
|
|
3513
3522
|
className: "dc:space-y-2",
|
|
@@ -3519,7 +3528,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3519
3528
|
onDrop: (e) => h(e, s),
|
|
3520
3529
|
onDragEnd: g,
|
|
3521
3530
|
className: `dc:transition-all ${c === s ? "dc:opacity-50" : ""} ${u === s ? "dc:border-t-2 border-dc-primary dc:pt-1" : ""}`,
|
|
3522
|
-
children: /* @__PURE__ */ H(
|
|
3531
|
+
children: /* @__PURE__ */ H(ot, {
|
|
3523
3532
|
step: r,
|
|
3524
3533
|
stepIndex: s,
|
|
3525
3534
|
isActive: s === t,
|
|
@@ -3534,7 +3543,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3534
3543
|
e.length > 0 && /* @__PURE__ */ U("button", {
|
|
3535
3544
|
onClick: r,
|
|
3536
3545
|
className: "dc:flex dc:items-center dc:justify-center dc:gap-1.5 dc:w-full dc:py-2 dc:text-sm dc:font-medium text-dc-text-secondary bg-dc-surface dc:border-2 dc:border-dashed border-dc-border dc:rounded-lg hover:border-dc-primary hover:text-dc-primary hover:bg-dc-primary/5 dc:transition-colors",
|
|
3537
|
-
children: [/* @__PURE__ */ H(
|
|
3546
|
+
children: [/* @__PURE__ */ H(st, { className: "dc:w-4 dc:h-4" }), "Add Step"]
|
|
3538
3547
|
}),
|
|
3539
3548
|
e.length === 1 && /* @__PURE__ */ H("p", {
|
|
3540
3549
|
className: "dc:text-xs text-dc-warning dc:text-center",
|
|
@@ -3542,7 +3551,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3542
3551
|
})
|
|
3543
3552
|
]
|
|
3544
3553
|
});
|
|
3545
|
-
}),
|
|
3554
|
+
}), lt = F(function({ funnelCube: e, funnelSteps: t, activeFunnelStepIndex: n, funnelTimeDimension: r, funnelBindingKey: i, schema: a, onCubeChange: o, onAddStep: s, onRemoveStep: c, onUpdateStep: l, onSelectStep: u, onReorderSteps: d, onTimeDimensionChange: f, onBindingKeyChange: p, chartType: m = "funnel", displayConfig: h, colorPalette: g, onDisplayConfigChange: _ }) {
|
|
3546
3555
|
let [v, y] = B("steps"), b = h && _;
|
|
3547
3556
|
return /* @__PURE__ */ U("div", {
|
|
3548
3557
|
className: "dc:flex dc:flex-col dc:h-full",
|
|
@@ -3561,7 +3570,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3561
3570
|
})]
|
|
3562
3571
|
}), v === "steps" ? /* @__PURE__ */ U("div", {
|
|
3563
3572
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
3564
|
-
children: [/* @__PURE__ */ H(
|
|
3573
|
+
children: [/* @__PURE__ */ H($e, {
|
|
3565
3574
|
selectedCube: e,
|
|
3566
3575
|
bindingKey: i,
|
|
3567
3576
|
timeDimension: r,
|
|
@@ -3571,7 +3580,7 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3571
3580
|
onTimeDimensionChange: f
|
|
3572
3581
|
}), /* @__PURE__ */ H("div", {
|
|
3573
3582
|
className: "dc:flex-1 dc:min-h-0 dc:overflow-auto dc:p-4 dc:pb-24",
|
|
3574
|
-
children: /* @__PURE__ */ H(
|
|
3583
|
+
children: /* @__PURE__ */ H(ct, {
|
|
3575
3584
|
steps: t,
|
|
3576
3585
|
activeStepIndex: n,
|
|
3577
3586
|
schema: a,
|
|
@@ -3592,8 +3601,8 @@ var Ze = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3592
3601
|
})
|
|
3593
3602
|
}) : null]
|
|
3594
3603
|
});
|
|
3595
|
-
}),
|
|
3596
|
-
function
|
|
3604
|
+
}), $ = e("chevronDown"), ut = e("chevronRight"), dt = e("check"), ft = e("search"), pt = e("dimension"), mt = e("link"), ht = e("timeDimension"), gt = e("dimension");
|
|
3605
|
+
function _t(e) {
|
|
3597
3606
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
3598
3607
|
cube: e.name,
|
|
3599
3608
|
dimension: e.name,
|
|
@@ -3601,7 +3610,7 @@ function gt(e) {
|
|
|
3601
3610
|
eventStream: e.meta?.eventStream
|
|
3602
3611
|
})) : [];
|
|
3603
3612
|
}
|
|
3604
|
-
function
|
|
3613
|
+
function vt(e) {
|
|
3605
3614
|
if (!e?.cubes) return [];
|
|
3606
3615
|
let t = [];
|
|
3607
3616
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -3611,7 +3620,7 @@ function _t(e) {
|
|
|
3611
3620
|
});
|
|
3612
3621
|
return t;
|
|
3613
3622
|
}
|
|
3614
|
-
function
|
|
3623
|
+
function yt(e) {
|
|
3615
3624
|
if (!e?.cubes) return [];
|
|
3616
3625
|
let t = [];
|
|
3617
3626
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "string" && t.push({
|
|
@@ -3621,7 +3630,7 @@ function vt(e) {
|
|
|
3621
3630
|
});
|
|
3622
3631
|
return t;
|
|
3623
3632
|
}
|
|
3624
|
-
var
|
|
3633
|
+
var bt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
3625
3634
|
let [s, c] = B(!1), [l, u] = B(""), d = z(null), f = z(null), p = R(() => {
|
|
3626
3635
|
let e = {};
|
|
3627
3636
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -3678,7 +3687,7 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3678
3687
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
3679
3688
|
title: "Clear",
|
|
3680
3689
|
children: "x"
|
|
3681
|
-
}),
|
|
3690
|
+
}), $ && /* @__PURE__ */ H($, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
3682
3691
|
})]
|
|
3683
3692
|
}), s && /* @__PURE__ */ U("div", {
|
|
3684
3693
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -3687,7 +3696,7 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3687
3696
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
3688
3697
|
children: /* @__PURE__ */ U("div", {
|
|
3689
3698
|
className: "dc:relative",
|
|
3690
|
-
children: [
|
|
3699
|
+
children: [ft && /* @__PURE__ */ H(ft, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ H("input", {
|
|
3691
3700
|
ref: f,
|
|
3692
3701
|
type: "text",
|
|
3693
3702
|
value: l,
|
|
@@ -3714,7 +3723,7 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3714
3723
|
dc:rounded dc:transition-colors
|
|
3715
3724
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
3716
3725
|
`,
|
|
3717
|
-
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension &&
|
|
3726
|
+
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension && dt && /* @__PURE__ */ H(dt, { className: "dc:w-4 dc:h-4" })]
|
|
3718
3727
|
}, t.dimension))]
|
|
3719
3728
|
}, t))
|
|
3720
3729
|
}),
|
|
@@ -3726,15 +3735,15 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3726
3735
|
})]
|
|
3727
3736
|
})]
|
|
3728
3737
|
});
|
|
3729
|
-
}),
|
|
3730
|
-
let l = R(() =>
|
|
3738
|
+
}), xt = F(function({ selectedCube: e, bindingKey: t, timeDimension: n, eventDimension: r, schema: i, onCubeChange: a, onBindingKeyChange: o, onTimeDimensionChange: s, onEventDimensionChange: c }) {
|
|
3739
|
+
let l = R(() => _t(i), [i]), u = R(() => {
|
|
3731
3740
|
let t = j(i);
|
|
3732
3741
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3733
3742
|
}, [i, e]), d = R(() => {
|
|
3734
|
-
let t =
|
|
3743
|
+
let t = vt(i);
|
|
3735
3744
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3736
3745
|
}, [i, e]), f = R(() => {
|
|
3737
|
-
let t =
|
|
3746
|
+
let t = yt(i);
|
|
3738
3747
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
3739
3748
|
}, [i, e]), p = !!(e && t && n && r), [m, h] = B(!1), g = z(!1);
|
|
3740
3749
|
L(() => {
|
|
@@ -3766,14 +3775,14 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3766
3775
|
children: [/* @__PURE__ */ U("div", {
|
|
3767
3776
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
3768
3777
|
children: [
|
|
3769
|
-
m ?
|
|
3778
|
+
m ? ut && /* @__PURE__ */ H(ut, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : $ && /* @__PURE__ */ H($, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
3770
3779
|
/* @__PURE__ */ H(N, {
|
|
3771
3780
|
className: "dc:mb-0",
|
|
3772
3781
|
children: "Configuration"
|
|
3773
3782
|
}),
|
|
3774
3783
|
p && /* @__PURE__ */ H("span", {
|
|
3775
3784
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
3776
|
-
children:
|
|
3785
|
+
children: dt && /* @__PURE__ */ H(dt, { className: "dc:w-3.5 dc:h-3.5" })
|
|
3777
3786
|
})
|
|
3778
3787
|
]
|
|
3779
3788
|
}), m && p && /* @__PURE__ */ H("span", {
|
|
@@ -3783,38 +3792,38 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3783
3792
|
}), !m && /* @__PURE__ */ U("div", {
|
|
3784
3793
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
3785
3794
|
children: [
|
|
3786
|
-
/* @__PURE__ */ H(
|
|
3795
|
+
/* @__PURE__ */ H(bt, {
|
|
3787
3796
|
value: e,
|
|
3788
3797
|
label: "Cube",
|
|
3789
3798
|
placeholder: "Select event stream cube",
|
|
3790
|
-
icon:
|
|
3799
|
+
icon: pt,
|
|
3791
3800
|
options: l,
|
|
3792
3801
|
onChange: a,
|
|
3793
3802
|
helpText: "Select a cube configured for flow analysis"
|
|
3794
3803
|
}),
|
|
3795
|
-
/* @__PURE__ */ H(
|
|
3804
|
+
/* @__PURE__ */ H(bt, {
|
|
3796
3805
|
value: _,
|
|
3797
3806
|
label: "Binding Key",
|
|
3798
3807
|
placeholder: e ? "Select binding key" : "Select cube first",
|
|
3799
|
-
icon:
|
|
3808
|
+
icon: mt,
|
|
3800
3809
|
options: u,
|
|
3801
3810
|
onChange: v,
|
|
3802
3811
|
helpText: "Entity that links events together (e.g., user ID)"
|
|
3803
3812
|
}),
|
|
3804
|
-
/* @__PURE__ */ H(
|
|
3813
|
+
/* @__PURE__ */ H(bt, {
|
|
3805
3814
|
value: n,
|
|
3806
3815
|
label: "Time Dimension",
|
|
3807
3816
|
placeholder: e ? "Select time dimension" : "Select cube first",
|
|
3808
|
-
icon:
|
|
3817
|
+
icon: ht,
|
|
3809
3818
|
options: d,
|
|
3810
3819
|
onChange: s,
|
|
3811
3820
|
helpText: "Timestamp field for event ordering"
|
|
3812
3821
|
}),
|
|
3813
|
-
/* @__PURE__ */ H(
|
|
3822
|
+
/* @__PURE__ */ H(bt, {
|
|
3814
3823
|
value: r,
|
|
3815
3824
|
label: "Event Dimension",
|
|
3816
3825
|
placeholder: e ? "Select event dimension" : "Select cube first",
|
|
3817
|
-
icon:
|
|
3826
|
+
icon: gt,
|
|
3818
3827
|
options: f,
|
|
3819
3828
|
onChange: c,
|
|
3820
3829
|
helpText: "Dimension that categorizes events (node labels in Sankey)"
|
|
@@ -3822,7 +3831,7 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3822
3831
|
]
|
|
3823
3832
|
})]
|
|
3824
3833
|
});
|
|
3825
|
-
}),
|
|
3834
|
+
}), St = F(function({ flowCube: e, flowBindingKey: t, flowTimeDimension: n, eventDimension: r, startingStep: i, stepsBefore: a, stepsAfter: o, joinStrategy: s = "auto", schema: c, onCubeChange: l, onBindingKeyChange: u, onTimeDimensionChange: d, onEventDimensionChange: f, onStartingStepFiltersChange: p, onStepsBeforeChange: m, onStepsAfterChange: h, onJoinStrategyChange: g, chartType: _ = "sankey", onChartTypeChange: v, displayConfig: y, colorPalette: b, onDisplayConfigChange: S }) {
|
|
3826
3835
|
let [C, w] = B("config"), T = y && S, E = I((e) => {
|
|
3827
3836
|
p(e);
|
|
3828
3837
|
}, [p]);
|
|
@@ -3843,7 +3852,7 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3843
3852
|
})]
|
|
3844
3853
|
}), C === "config" ? /* @__PURE__ */ U("div", {
|
|
3845
3854
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
3846
|
-
children: [/* @__PURE__ */ H(
|
|
3855
|
+
children: [/* @__PURE__ */ H(xt, {
|
|
3847
3856
|
selectedCube: e,
|
|
3848
3857
|
bindingKey: t,
|
|
3849
3858
|
timeDimension: n,
|
|
@@ -3996,8 +4005,8 @@ var yt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
3996
4005
|
})
|
|
3997
4006
|
}) : null]
|
|
3998
4007
|
});
|
|
3999
|
-
}),
|
|
4000
|
-
function
|
|
4008
|
+
}), Ct = e("chevronDown"), wt = e("chevronRight"), Tt = e("check"), Et = e("search"), Dt = e("dimension"), Ot = e("link"), kt = e("timeDimension"), At = e("timeDimension");
|
|
4009
|
+
function jt(e) {
|
|
4001
4010
|
return e?.cubes ? e.cubes.filter((e) => e.meta?.eventStream).map((e) => ({
|
|
4002
4011
|
cube: e.name,
|
|
4003
4012
|
dimension: e.name,
|
|
@@ -4005,7 +4014,7 @@ function At(e) {
|
|
|
4005
4014
|
eventStream: e.meta?.eventStream
|
|
4006
4015
|
})) : [];
|
|
4007
4016
|
}
|
|
4008
|
-
function
|
|
4017
|
+
function Mt(e) {
|
|
4009
4018
|
if (!e?.cubes) return [];
|
|
4010
4019
|
let t = [];
|
|
4011
4020
|
for (let n of e.cubes) for (let e of n.dimensions || []) e.type === "time" && t.push({
|
|
@@ -4015,13 +4024,13 @@ function jt(e) {
|
|
|
4015
4024
|
});
|
|
4016
4025
|
return t;
|
|
4017
4026
|
}
|
|
4018
|
-
function
|
|
4027
|
+
function Nt(e) {
|
|
4019
4028
|
return e ? new Date(e).toLocaleDateString("en-US", {
|
|
4020
4029
|
month: "short",
|
|
4021
4030
|
day: "numeric"
|
|
4022
4031
|
}) : "";
|
|
4023
4032
|
}
|
|
4024
|
-
var
|
|
4033
|
+
var Pt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, onChange: a, helpText: o }) {
|
|
4025
4034
|
let [s, c] = B(!1), [l, u] = B(""), d = z(null), f = z(null), p = R(() => {
|
|
4026
4035
|
let e = {};
|
|
4027
4036
|
for (let t of i) e[t.cube] || (e[t.cube] = []), e[t.cube].push(t);
|
|
@@ -4078,7 +4087,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4078
4087
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-surface-hover text-dc-text-muted hover:text-dc-text",
|
|
4079
4088
|
title: "Clear",
|
|
4080
4089
|
children: "×"
|
|
4081
|
-
}),
|
|
4090
|
+
}), Ct && /* @__PURE__ */ H(Ct, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform ${s ? "dc:rotate-180" : ""}` })]
|
|
4082
4091
|
})]
|
|
4083
4092
|
}), s && /* @__PURE__ */ U("div", {
|
|
4084
4093
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[200px] bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg",
|
|
@@ -4087,7 +4096,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4087
4096
|
className: "dc:p-2 dc:border-b border-dc-border",
|
|
4088
4097
|
children: /* @__PURE__ */ U("div", {
|
|
4089
4098
|
className: "dc:relative",
|
|
4090
|
-
children: [
|
|
4099
|
+
children: [Et && /* @__PURE__ */ H(Et, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-4 dc:h-4 text-dc-text-muted" }), /* @__PURE__ */ H("input", {
|
|
4091
4100
|
ref: f,
|
|
4092
4101
|
type: "text",
|
|
4093
4102
|
value: l,
|
|
@@ -4114,7 +4123,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4114
4123
|
dc:rounded dc:transition-colors
|
|
4115
4124
|
${e === t.dimension ? "bg-dc-primary-bg text-dc-primary" : "text-dc-text hover:bg-dc-surface-hover"}
|
|
4116
4125
|
`,
|
|
4117
|
-
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension &&
|
|
4126
|
+
children: [/* @__PURE__ */ H("span", { children: t.label }), e === t.dimension && Tt && /* @__PURE__ */ H(Tt, { className: "dc:w-4 dc:h-4" })]
|
|
4118
4127
|
}, t.dimension))]
|
|
4119
4128
|
}, t))
|
|
4120
4129
|
}),
|
|
@@ -4126,7 +4135,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4126
4135
|
})]
|
|
4127
4136
|
})]
|
|
4128
4137
|
});
|
|
4129
|
-
}),
|
|
4138
|
+
}), Ft = F(function({ dateRange: e, onDateRangeChange: t }) {
|
|
4130
4139
|
let n = e ?? {
|
|
4131
4140
|
start: "",
|
|
4132
4141
|
end: ""
|
|
@@ -4163,13 +4172,13 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4163
4172
|
let t = m.find((e) => e.value === s);
|
|
4164
4173
|
if (t && s !== "custom") return t.label;
|
|
4165
4174
|
let n = e?.start ?? "", r = e?.end ?? "";
|
|
4166
|
-
return !n || !r ? "Select date range" : `${
|
|
4175
|
+
return !n || !r ? "Select date range" : `${Nt(n)} - ${Nt(r)}`;
|
|
4167
4176
|
}, [s, e]);
|
|
4168
4177
|
return /* @__PURE__ */ U("div", {
|
|
4169
4178
|
className: "dc:flex-1 dc:min-w-0",
|
|
4170
4179
|
children: [/* @__PURE__ */ U("label", {
|
|
4171
4180
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:text-xs dc:font-medium text-dc-text-muted dc:mb-1",
|
|
4172
|
-
children: [
|
|
4181
|
+
children: [At && /* @__PURE__ */ H(At, { className: "dc:w-3.5 dc:h-3.5" }), "Date Range"]
|
|
4173
4182
|
}), /* @__PURE__ */ U("div", {
|
|
4174
4183
|
ref: p,
|
|
4175
4184
|
className: "dc:relative",
|
|
@@ -4185,7 +4194,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4185
4194
|
children: [/* @__PURE__ */ H("span", {
|
|
4186
4195
|
className: "text-dc-text dc:truncate",
|
|
4187
4196
|
children: y
|
|
4188
|
-
}),
|
|
4197
|
+
}), Ct && /* @__PURE__ */ H(Ct, { className: `dc:w-4 dc:h-4 text-dc-text-muted dc:transition-transform dc:ml-2 ${a ? "dc:rotate-180" : ""}` })]
|
|
4189
4198
|
}), a && /* @__PURE__ */ U("div", {
|
|
4190
4199
|
className: "dc:absolute dc:z-50 dc:mt-1 dc:left-0 dc:right-0 dc:min-w-[280px] bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:shadow-lg dc:p-3",
|
|
4191
4200
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -4240,15 +4249,15 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4240
4249
|
})]
|
|
4241
4250
|
})]
|
|
4242
4251
|
});
|
|
4243
|
-
}),
|
|
4252
|
+
}), It = F(function({ selectedCube: e = null, bindingKey: t = null, timeDimension: n = null, dateRange: r = {
|
|
4244
4253
|
start: "",
|
|
4245
4254
|
end: ""
|
|
4246
4255
|
}, schema: i = null, onCubeChange: a = () => {}, onBindingKeyChange: o = () => {}, onTimeDimensionChange: s = () => {} }) {
|
|
4247
|
-
let c = R(() =>
|
|
4256
|
+
let c = R(() => jt(i), [i]), l = R(() => {
|
|
4248
4257
|
let t = j(i);
|
|
4249
4258
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
4250
4259
|
}, [i, e]), u = R(() => {
|
|
4251
|
-
let t =
|
|
4260
|
+
let t = Mt(i);
|
|
4252
4261
|
return e ? t.filter((t) => t.cube === e) : [];
|
|
4253
4262
|
}, [i, e]), d = !!(e && t?.dimension && n && r?.start && r?.end), [f, p] = B(!1), m = z(!1);
|
|
4254
4263
|
L(() => {
|
|
@@ -4256,7 +4265,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4256
4265
|
}, [d]);
|
|
4257
4266
|
let h = t?.dimension ? typeof t.dimension == "string" ? t.dimension : t.dimension[0]?.dimension || null : null, g = I((e) => {
|
|
4258
4267
|
o(e ? { dimension: e } : null);
|
|
4259
|
-
}, [o]), _ = c.find((t) => t.dimension === e)?.label || e, v = r?.start ? `${
|
|
4268
|
+
}, [o]), _ = c.find((t) => t.dimension === e)?.label || e, v = r?.start ? `${Nt(r.start)} - ${Nt(r.end)}` : "";
|
|
4260
4269
|
return /* @__PURE__ */ U("div", {
|
|
4261
4270
|
className: "bg-dc-surface-secondary dc:border-b border-dc-border",
|
|
4262
4271
|
children: [/* @__PURE__ */ U("button", {
|
|
@@ -4266,14 +4275,14 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4266
4275
|
children: [/* @__PURE__ */ U("div", {
|
|
4267
4276
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
4268
4277
|
children: [
|
|
4269
|
-
f ?
|
|
4278
|
+
f ? wt && /* @__PURE__ */ H(wt, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }) : Ct && /* @__PURE__ */ H(Ct, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
|
|
4270
4279
|
/* @__PURE__ */ H(N, {
|
|
4271
4280
|
className: "dc:mb-0",
|
|
4272
4281
|
children: "Configuration"
|
|
4273
4282
|
}),
|
|
4274
4283
|
d && /* @__PURE__ */ H("span", {
|
|
4275
4284
|
className: "dc:flex dc:items-center dc:gap-1 dc:text-xs text-dc-success",
|
|
4276
|
-
children:
|
|
4285
|
+
children: Tt && /* @__PURE__ */ H(Tt, { className: "dc:w-3.5 dc:h-3.5" })
|
|
4277
4286
|
})
|
|
4278
4287
|
]
|
|
4279
4288
|
}), f && d && /* @__PURE__ */ U("span", {
|
|
@@ -4287,29 +4296,29 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4287
4296
|
}), !f && /* @__PURE__ */ U("div", {
|
|
4288
4297
|
className: "dc:flex dc:flex-col dc:gap-3 dc:px-4 dc:pb-3",
|
|
4289
4298
|
children: [
|
|
4290
|
-
/* @__PURE__ */ H(
|
|
4299
|
+
/* @__PURE__ */ H(Pt, {
|
|
4291
4300
|
value: e,
|
|
4292
4301
|
label: "Cube",
|
|
4293
4302
|
placeholder: "Select cube",
|
|
4294
|
-
icon:
|
|
4303
|
+
icon: Dt,
|
|
4295
4304
|
options: c,
|
|
4296
4305
|
onChange: a,
|
|
4297
4306
|
helpText: "Select the cube containing your user events"
|
|
4298
4307
|
}),
|
|
4299
|
-
/* @__PURE__ */ H(
|
|
4308
|
+
/* @__PURE__ */ H(Pt, {
|
|
4300
4309
|
value: h,
|
|
4301
4310
|
label: "Binding Key",
|
|
4302
4311
|
placeholder: e ? "Select user identifier" : "Select cube first",
|
|
4303
|
-
icon:
|
|
4312
|
+
icon: Ot,
|
|
4304
4313
|
options: l,
|
|
4305
4314
|
onChange: g,
|
|
4306
4315
|
helpText: "Dimension that identifies entities across events (e.g., user ID, customer ID)"
|
|
4307
4316
|
}),
|
|
4308
|
-
/* @__PURE__ */ H(
|
|
4317
|
+
/* @__PURE__ */ H(Pt, {
|
|
4309
4318
|
value: n,
|
|
4310
4319
|
label: "Timestamp",
|
|
4311
4320
|
placeholder: e ? "Select timestamp" : "Select cube first",
|
|
4312
|
-
icon:
|
|
4321
|
+
icon: kt,
|
|
4313
4322
|
options: u,
|
|
4314
4323
|
onChange: s,
|
|
4315
4324
|
helpText: "Timestamp field for cohort entry and activity"
|
|
@@ -4320,7 +4329,7 @@ var Nt = F(function({ value: e, label: t, placeholder: n, icon: r, options: i, o
|
|
|
4320
4329
|
});
|
|
4321
4330
|
//#endregion
|
|
4322
4331
|
//#region src/client/components/AnalysisBuilder/RetentionModeContent.tsx
|
|
4323
|
-
function
|
|
4332
|
+
function Lt(e) {
|
|
4324
4333
|
return !e || !Array.isArray(e) ? [] : e.map((e) => ({
|
|
4325
4334
|
id: e.field,
|
|
4326
4335
|
field: e.field,
|
|
@@ -4329,14 +4338,14 @@ function It(e) {
|
|
|
4329
4338
|
enableComparison: !1
|
|
4330
4339
|
}));
|
|
4331
4340
|
}
|
|
4332
|
-
var
|
|
4341
|
+
var Rt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, retentionTimeDimension: n = null, retentionDateRange: r = {
|
|
4333
4342
|
start: "",
|
|
4334
4343
|
end: ""
|
|
4335
4344
|
}, retentionCohortFilters: i = [], retentionActivityFilters: a = [], retentionBreakdowns: o = [], retentionViewGranularity: s = "week", retentionPeriods: c = 12, retentionType: l = "classic", schema: u = null, onCubeChange: d = () => {}, onBindingKeyChange: f = () => {}, onTimeDimensionChange: m = () => {}, onDateRangeChange: h = () => {}, onCohortFiltersChange: _ = () => {}, onActivityFiltersChange: v = () => {}, onBreakdownsChange: y = () => {}, onAddBreakdown: b = () => {}, onRemoveBreakdown: S = () => {}, onGranularityChange: C = () => {}, onPeriodsChange: w = () => {}, onRetentionTypeChange: T = () => {}, onOpenFieldModal: E = () => {}, chartType: O = "retentionCombined", onChartTypeChange: ee, displayConfig: te, colorPalette: k, onDisplayConfigChange: A }) {
|
|
4336
4345
|
let [ne, j] = B("config"), M = te && A, P = R(() => !u || !e ? u : {
|
|
4337
4346
|
...u,
|
|
4338
4347
|
cubes: u.cubes?.filter((t) => t.name === e) || []
|
|
4339
|
-
}, [u, e]), re = R(() =>
|
|
4348
|
+
}, [u, e]), re = R(() => Lt(o), [o]), ie = I((e) => {
|
|
4340
4349
|
S(e);
|
|
4341
4350
|
}, [S]), F = I(() => {
|
|
4342
4351
|
E && E();
|
|
@@ -4358,7 +4367,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4358
4367
|
})]
|
|
4359
4368
|
}), ne === "config" ? /* @__PURE__ */ U("div", {
|
|
4360
4369
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-h-0",
|
|
4361
|
-
children: [/* @__PURE__ */ H(
|
|
4370
|
+
children: [/* @__PURE__ */ H(It, {
|
|
4362
4371
|
selectedCube: e,
|
|
4363
4372
|
bindingKey: t,
|
|
4364
4373
|
timeDimension: n,
|
|
@@ -4376,7 +4385,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4376
4385
|
className: "dc:text-xs text-dc-text-muted dc:mb-3",
|
|
4377
4386
|
children: "Select the date range for cohort entry. Users who first appear within this range will be analyzed."
|
|
4378
4387
|
}),
|
|
4379
|
-
/* @__PURE__ */ H(
|
|
4388
|
+
/* @__PURE__ */ H(Ft, {
|
|
4380
4389
|
dateRange: r,
|
|
4381
4390
|
onDateRangeChange: h
|
|
4382
4391
|
})
|
|
@@ -4508,7 +4517,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4508
4517
|
})
|
|
4509
4518
|
}) : null]
|
|
4510
4519
|
});
|
|
4511
|
-
}),
|
|
4520
|
+
}), zt = e("add"), Bt = e("close"), Vt = e("info"), Ht = e("warning"), Ut = e("link"), Wt = F(function({ metrics: e, breakdowns: t, filters: n, schema: r, activeTab: i, onActiveTabChange: a, onAddMetric: o, onRemoveMetric: s, onReorderMetrics: c, onAddBreakdown: l, onRemoveBreakdown: u, onBreakdownGranularityChange: d, onBreakdownComparisonToggle: f, onReorderBreakdowns: p, onFiltersChange: m, onDropFieldToFilter: h, order: g, onOrderChange: _, limit: v, onLimitChange: y, chartType: b, chartConfig: S, displayConfig: C, colorPalette: w, chartAvailability: T, onChartTypeChange: E, onChartConfigChange: O, onDisplayConfigChange: ee, validationStatus: te, validationError: k, queryCount: A = 1, activeQueryIndex: ne = 0, mergeStrategy: j = "concat", onActiveQueryChange: M, onAddQuery: N, onRemoveQuery: P, onMergeStrategyChange: re, breakdownsLocked: ie = !1, combinedMetrics: F, combinedBreakdowns: ae, multiQueryValidation: z, adapterValidation: B, funnelBindingKey: oe, onFunnelBindingKeyChange: W, analysisType: G = "query", onAnalysisTypeChange: se, funnelCube: ce = null, funnelSteps: le = [], activeFunnelStepIndex: ue = 0, funnelTimeDimension: de, onFunnelCubeChange: fe, onAddFunnelStep: pe, onRemoveFunnelStep: me, onUpdateFunnelStep: he, onSelectFunnelStep: ge, onReorderFunnelSteps: _e, onFunnelTimeDimensionChange: ve, funnelDisplayConfig: K, onFunnelDisplayConfigChange: be, flowCube: Se, flowBindingKey: q, flowTimeDimension: J, eventDimension: Ce, startingStep: we, stepsBefore: Z = 3, stepsAfter: Te = 3, flowJoinStrategy: Q = "auto", onFlowCubeChange: Ee, onFlowBindingKeyChange: De, onFlowTimeDimensionChange: Oe, onEventDimensionChange: ke, onStartingStepFiltersChange: Ae, onStepsBeforeChange: je, onStepsAfterChange: Ne, onFlowJoinStrategyChange: Pe, flowDisplayConfig: Fe, onFlowDisplayConfigChange: Le, retentionCube: Re, retentionBindingKey: ze, retentionTimeDimension: Be, retentionDateRange: Ve, retentionCohortFilters: Ue = [], retentionActivityFilters: We = [], retentionBreakdowns: Ge = [], retentionViewGranularity: Ke = "week", retentionPeriods: qe = 12, retentionType: Je = "classic", onRetentionCubeChange: Ye, onRetentionBindingKeyChange: Xe, onRetentionTimeDimensionChange: Ze, onRetentionDateRangeChange: Qe, onRetentionCohortFiltersChange: $e, onRetentionActivityFiltersChange: et, onRetentionBreakdownsChange: tt, onAddRetentionBreakdown: nt, onRemoveRetentionBreakdown: rt, onRetentionViewGranularityChange: it, onRetentionPeriodsChange: at, onRetentionTypeChange: ot, retentionDisplayConfig: st, onRetentionDisplayConfigChange: ct }) {
|
|
4512
4521
|
let $ = A > 1, ut = G === "funnel", dt = G === "flow", ft = G === "retention", pt = G === "funnel", mt = I((e) => {
|
|
4513
4522
|
if (!r?.cubes) return null;
|
|
4514
4523
|
let [t] = e.field.split("."), n = r.cubes.find((e) => e.name === t);
|
|
@@ -4532,11 +4541,11 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4532
4541
|
}, [P]), vt = (e) => $ ? ut ? `S${e + 1}` : `Q${e + 1}` : "Query";
|
|
4533
4542
|
return /* @__PURE__ */ U("div", {
|
|
4534
4543
|
className: "dc:h-full dc:flex dc:flex-col bg-dc-surface",
|
|
4535
|
-
children: [se && /* @__PURE__ */ H(
|
|
4544
|
+
children: [se && /* @__PURE__ */ H(He, {
|
|
4536
4545
|
value: G,
|
|
4537
4546
|
onChange: se,
|
|
4538
4547
|
schema: r
|
|
4539
|
-
}), pt && fe && pe && me && he && ge && _e &&
|
|
4548
|
+
}), pt && fe && pe && me && he && ge && _e && ve && W ? /* @__PURE__ */ H(lt, {
|
|
4540
4549
|
funnelCube: ce,
|
|
4541
4550
|
funnelSteps: le,
|
|
4542
4551
|
activeFunnelStepIndex: ue,
|
|
@@ -4549,40 +4558,40 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4549
4558
|
onUpdateStep: he,
|
|
4550
4559
|
onSelectStep: ge,
|
|
4551
4560
|
onReorderSteps: _e,
|
|
4552
|
-
onTimeDimensionChange:
|
|
4561
|
+
onTimeDimensionChange: ve,
|
|
4553
4562
|
onBindingKeyChange: W,
|
|
4554
4563
|
chartType: "funnel",
|
|
4555
|
-
displayConfig:
|
|
4564
|
+
displayConfig: K,
|
|
4556
4565
|
colorPalette: w,
|
|
4557
|
-
onDisplayConfigChange:
|
|
4558
|
-
}) : dt && Ee && De && Oe && ke && Ae &&
|
|
4559
|
-
flowCube:
|
|
4560
|
-
flowBindingKey:
|
|
4561
|
-
flowTimeDimension:
|
|
4566
|
+
onDisplayConfigChange: be
|
|
4567
|
+
}) : dt && Ee && De && Oe && ke && Ae && je && Ne && we ? /* @__PURE__ */ H(St, {
|
|
4568
|
+
flowCube: Se ?? null,
|
|
4569
|
+
flowBindingKey: q ?? null,
|
|
4570
|
+
flowTimeDimension: J ?? null,
|
|
4562
4571
|
eventDimension: Ce ?? null,
|
|
4563
|
-
startingStep:
|
|
4564
|
-
stepsBefore:
|
|
4565
|
-
stepsAfter:
|
|
4566
|
-
joinStrategy:
|
|
4572
|
+
startingStep: we,
|
|
4573
|
+
stepsBefore: Z,
|
|
4574
|
+
stepsAfter: Te,
|
|
4575
|
+
joinStrategy: Q,
|
|
4567
4576
|
schema: r,
|
|
4568
4577
|
onCubeChange: Ee,
|
|
4569
4578
|
onBindingKeyChange: De,
|
|
4570
4579
|
onTimeDimensionChange: Oe,
|
|
4571
4580
|
onEventDimensionChange: ke,
|
|
4572
4581
|
onStartingStepFiltersChange: Ae,
|
|
4573
|
-
onStepsBeforeChange:
|
|
4582
|
+
onStepsBeforeChange: je,
|
|
4574
4583
|
onStepsAfterChange: Ne,
|
|
4575
4584
|
onJoinStrategyChange: Pe,
|
|
4576
4585
|
chartType: b,
|
|
4577
4586
|
onChartTypeChange: E,
|
|
4578
|
-
displayConfig:
|
|
4587
|
+
displayConfig: Fe,
|
|
4579
4588
|
colorPalette: w,
|
|
4580
4589
|
onDisplayConfigChange: Le
|
|
4581
|
-
}) : ft ? /* @__PURE__ */ H(
|
|
4590
|
+
}) : ft ? /* @__PURE__ */ H(Rt, {
|
|
4582
4591
|
retentionCube: Re ?? null,
|
|
4583
4592
|
retentionBindingKey: ze ?? null,
|
|
4584
4593
|
retentionTimeDimension: Be ?? null,
|
|
4585
|
-
retentionDateRange:
|
|
4594
|
+
retentionDateRange: Ve ?? {
|
|
4586
4595
|
start: "",
|
|
4587
4596
|
end: ""
|
|
4588
4597
|
},
|
|
@@ -4609,7 +4618,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4609
4618
|
chartType: b,
|
|
4610
4619
|
displayConfig: st,
|
|
4611
4620
|
colorPalette: w,
|
|
4612
|
-
onDisplayConfigChange:
|
|
4621
|
+
onDisplayConfigChange: ct
|
|
4613
4622
|
}) : /* @__PURE__ */ U(V, { children: [
|
|
4614
4623
|
/* @__PURE__ */ U("div", {
|
|
4615
4624
|
className: "dc:flex dc:border-b border-dc-border dc:flex-shrink-0",
|
|
@@ -4627,14 +4636,14 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4627
4636
|
className: "dc:p-0.5 dc:rounded hover:bg-dc-danger-bg hover:text-dc-error dc:transition-colors dc:ml-0.5",
|
|
4628
4637
|
title: "Remove query",
|
|
4629
4638
|
"aria-label": `Remove ${vt(t)}`,
|
|
4630
|
-
children: /* @__PURE__ */ H(
|
|
4639
|
+
children: /* @__PURE__ */ H(Bt, { className: "dc:w-3 dc:h-3" })
|
|
4631
4640
|
})]
|
|
4632
4641
|
}, `q${t}`)), /* @__PURE__ */ H("button", {
|
|
4633
4642
|
onClick: N,
|
|
4634
4643
|
className: "dc:flex dc:items-center dc:justify-center dc:px-2 dc:py-3 text-dc-text-secondary hover:text-dc-text dc:transition-colors dc:flex-shrink-0",
|
|
4635
4644
|
title: "Add query",
|
|
4636
4645
|
"aria-label": "Add new query",
|
|
4637
|
-
children: /* @__PURE__ */ H(
|
|
4646
|
+
children: /* @__PURE__ */ H(zt, { className: "dc:w-4 dc:h-4" })
|
|
4638
4647
|
})]
|
|
4639
4648
|
}) : /* @__PURE__ */ U("button", {
|
|
4640
4649
|
onClick: () => a("query"),
|
|
@@ -4651,7 +4660,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4651
4660
|
className: "dc:ml-2 dc:p-0.5 dc:rounded hover:bg-dc-surface-hover dc:transition-colors dc:inline-flex dc:items-center",
|
|
4652
4661
|
title: "Add another query",
|
|
4653
4662
|
"aria-label": "Add another query",
|
|
4654
|
-
children: /* @__PURE__ */ H(
|
|
4663
|
+
children: /* @__PURE__ */ H(zt, { className: "dc:w-3 dc:h-3" })
|
|
4655
4664
|
})]
|
|
4656
4665
|
}),
|
|
4657
4666
|
/* @__PURE__ */ H("button", {
|
|
@@ -4673,7 +4682,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4673
4682
|
$ && i === "query" && /* @__PURE__ */ U("div", {
|
|
4674
4683
|
className: "dc:flex dc:items-center dc:gap-2 dc:px-4 dc:py-1.5 dc:text-sm bg-dc-surface-secondary dc:border-b border-dc-border",
|
|
4675
4684
|
children: [
|
|
4676
|
-
|
|
4685
|
+
Ut && /* @__PURE__ */ H(Ut, { className: "dc:w-3.5 dc:h-3.5 text-dc-text-muted dc:flex-shrink-0" }),
|
|
4677
4686
|
/* @__PURE__ */ U("select", {
|
|
4678
4687
|
value: j,
|
|
4679
4688
|
onChange: (e) => re?.(e.target.value),
|
|
@@ -4693,7 +4702,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4693
4702
|
})
|
|
4694
4703
|
]
|
|
4695
4704
|
}),
|
|
4696
|
-
ut && W && /* @__PURE__ */ H(
|
|
4705
|
+
ut && W && /* @__PURE__ */ H(Ie, {
|
|
4697
4706
|
bindingKey: oe ?? null,
|
|
4698
4707
|
onChange: W,
|
|
4699
4708
|
schema: r,
|
|
@@ -4705,20 +4714,20 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4705
4714
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-warning-bg dc:space-y-1",
|
|
4706
4715
|
children: [B.errors.map((e, t) => /* @__PURE__ */ U("div", {
|
|
4707
4716
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-error",
|
|
4708
|
-
children: [/* @__PURE__ */ H(
|
|
4717
|
+
children: [/* @__PURE__ */ H(Ht, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ H("span", { children: e })]
|
|
4709
4718
|
}, `adapter-error-${t}`)), B.warnings.map((e, t) => /* @__PURE__ */ U("div", {
|
|
4710
4719
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-warning",
|
|
4711
|
-
children: [/* @__PURE__ */ H(
|
|
4720
|
+
children: [/* @__PURE__ */ H(Vt, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ H("span", { children: e })]
|
|
4712
4721
|
}, `adapter-warning-${t}`))]
|
|
4713
4722
|
}),
|
|
4714
4723
|
z && !ut && (z.warnings.length > 0 || z.errors.length > 0) && i === "query" && /* @__PURE__ */ U("div", {
|
|
4715
4724
|
className: "dc:px-4 dc:py-2 dc:border-b border-dc-border bg-dc-warning-bg",
|
|
4716
4725
|
children: [z.errors.map((e, t) => /* @__PURE__ */ U("div", {
|
|
4717
4726
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-error",
|
|
4718
|
-
children: [/* @__PURE__ */ H(
|
|
4727
|
+
children: [/* @__PURE__ */ H(Ht, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ H("span", { children: e.message })]
|
|
4719
4728
|
}, `error-${t}`)), z.warnings.map((e, t) => /* @__PURE__ */ U("div", {
|
|
4720
4729
|
className: "dc:flex dc:items-start dc:gap-2 dc:text-xs text-dc-warning",
|
|
4721
|
-
children: [/* @__PURE__ */ H(
|
|
4730
|
+
children: [/* @__PURE__ */ H(Ht, { className: "dc:w-3.5 dc:h-3.5 dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ H("span", { children: e.message })]
|
|
4722
4731
|
}, `warning-${t}`))]
|
|
4723
4732
|
}),
|
|
4724
4733
|
/* @__PURE__ */ H("div", {
|
|
@@ -4726,7 +4735,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4726
4735
|
children: i === "query" ? /* @__PURE__ */ U("div", {
|
|
4727
4736
|
className: "dc:space-y-6",
|
|
4728
4737
|
children: [
|
|
4729
|
-
/* @__PURE__ */ H(
|
|
4738
|
+
/* @__PURE__ */ H(ye, {
|
|
4730
4739
|
metrics: e,
|
|
4731
4740
|
schema: r,
|
|
4732
4741
|
onAdd: o,
|
|
@@ -4747,7 +4756,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4747
4756
|
}),
|
|
4748
4757
|
/* @__PURE__ */ U("div", {
|
|
4749
4758
|
className: "dc:flex dc:items-start dc:gap-2 dc:px-3 dc:py-2 dc:mb-3 bg-dc-surface-secondary dc:rounded dc:border border-dc-border dc:text-xs",
|
|
4750
|
-
children: [
|
|
4759
|
+
children: [Vt && /* @__PURE__ */ H(Vt, { className: "dc:w-4 dc:h-4 text-dc-text-muted dc:flex-shrink-0 dc:mt-0.5" }), /* @__PURE__ */ U("span", {
|
|
4751
4760
|
className: "text-dc-text-muted",
|
|
4752
4761
|
children: ["In merge mode, dimensions are shared from Q1.", re && /* @__PURE__ */ H("button", {
|
|
4753
4762
|
onClick: () => re("concat"),
|
|
@@ -4758,7 +4767,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4758
4767
|
}),
|
|
4759
4768
|
t.length > 0 && /* @__PURE__ */ H("div", {
|
|
4760
4769
|
className: "dc:space-y-1",
|
|
4761
|
-
children: t.map((e) => /* @__PURE__ */ H(
|
|
4770
|
+
children: t.map((e) => /* @__PURE__ */ H(xe, {
|
|
4762
4771
|
breakdown: e,
|
|
4763
4772
|
fieldMeta: mt(e),
|
|
4764
4773
|
onRemove: () => {},
|
|
@@ -4790,7 +4799,7 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4790
4799
|
onLimitChange: y
|
|
4791
4800
|
})
|
|
4792
4801
|
]
|
|
4793
|
-
}) : i === "chart" ? /* @__PURE__ */ H(
|
|
4802
|
+
}) : i === "chart" ? /* @__PURE__ */ H(Me, {
|
|
4794
4803
|
chartType: b,
|
|
4795
4804
|
chartConfig: S,
|
|
4796
4805
|
metrics: $ && F ? F : e,
|
|
@@ -4808,8 +4817,8 @@ var Lt = F(function({ retentionCube: e = null, retentionBindingKey: t = null, re
|
|
|
4808
4817
|
})
|
|
4809
4818
|
] })]
|
|
4810
4819
|
});
|
|
4811
|
-
}),
|
|
4812
|
-
function
|
|
4820
|
+
}), Gt = e("sparkles"), Kt = e("error");
|
|
4821
|
+
function qt({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGeneratedQuery: i, onGenerate: a, onAccept: o, onCancel: s }) {
|
|
4813
4822
|
let c = I((e) => {
|
|
4814
4823
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), a());
|
|
4815
4824
|
}, [a]);
|
|
@@ -4821,7 +4830,7 @@ function Kt({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4821
4830
|
children: [/* @__PURE__ */ U("div", {
|
|
4822
4831
|
className: "dc:flex dc:items-center dc:gap-2",
|
|
4823
4832
|
children: [
|
|
4824
|
-
/* @__PURE__ */ H(
|
|
4833
|
+
/* @__PURE__ */ H(Gt, { className: "dc:w-4 dc:h-4 text-dc-accent" }),
|
|
4825
4834
|
/* @__PURE__ */ H("span", {
|
|
4826
4835
|
className: "dc:text-sm dc:font-medium text-dc-text",
|
|
4827
4836
|
children: "AI Query Generator"
|
|
@@ -4868,13 +4877,13 @@ function Kt({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4868
4877
|
onClick: a,
|
|
4869
4878
|
disabled: n || !e.trim(),
|
|
4870
4879
|
className: `dc:px-4 dc:py-2 dc:text-sm dc:font-medium dc:rounded-md dc:transition-colors dc:flex dc:items-center dc:gap-2 ${n || !e.trim() ? "bg-dc-surface-tertiary text-dc-text-disabled dc:cursor-not-allowed" : "bg-dc-accent hover:bg-dc-accent-hover text-white"}`,
|
|
4871
|
-
children: n ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("div", { className: "dc:w-4 dc:h-4 dc:border-2 border-white border-t-transparent dc:rounded-full dc:animate-spin" }), /* @__PURE__ */ H("span", { children: "Generating..." })] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(
|
|
4880
|
+
children: n ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("div", { className: "dc:w-4 dc:h-4 dc:border-2 border-white border-t-transparent dc:rounded-full dc:animate-spin" }), /* @__PURE__ */ H("span", { children: "Generating..." })] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Gt, { className: "dc:w-4 dc:h-4" }), /* @__PURE__ */ H("span", { children: "Generate" })] })
|
|
4872
4881
|
})
|
|
4873
4882
|
})]
|
|
4874
4883
|
}),
|
|
4875
4884
|
r && /* @__PURE__ */ U("div", {
|
|
4876
4885
|
className: "dc:mt-3 dc:flex dc:items-start dc:gap-2 dc:p-3 bg-dc-error-bg dc:border border-dc-error-border dc:rounded-md",
|
|
4877
|
-
children: [/* @__PURE__ */ H(
|
|
4886
|
+
children: [/* @__PURE__ */ H(Kt, { className: "dc:w-4 dc:h-4 text-dc-error dc:mt-0.5 dc:flex-shrink-0" }), /* @__PURE__ */ H("div", {
|
|
4878
4887
|
className: "dc:text-sm text-dc-error",
|
|
4879
4888
|
children: r
|
|
4880
4889
|
})]
|
|
@@ -4899,7 +4908,7 @@ function Kt({ userPrompt: e, onPromptChange: t, isGenerating: n, error: r, hasGe
|
|
|
4899
4908
|
}
|
|
4900
4909
|
//#endregion
|
|
4901
4910
|
//#region src/client/components/AnalysisBuilder/AnalysisModeErrorBoundary.tsx
|
|
4902
|
-
var
|
|
4911
|
+
var Jt = e("warning"), Yt = e("refresh"), Xt = class extends re {
|
|
4903
4912
|
constructor(e) {
|
|
4904
4913
|
super(e), this.state = {
|
|
4905
4914
|
hasError: !1,
|
|
@@ -4930,7 +4939,7 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
4930
4939
|
children: [
|
|
4931
4940
|
/* @__PURE__ */ H("div", {
|
|
4932
4941
|
className: "dc:h-10 dc:w-10 dc:mb-3 text-dc-warning",
|
|
4933
|
-
children:
|
|
4942
|
+
children: Jt && /* @__PURE__ */ H(Jt, { className: "dc:w-10 dc:h-10" })
|
|
4934
4943
|
}),
|
|
4935
4944
|
/* @__PURE__ */ H("h3", {
|
|
4936
4945
|
className: "dc:text-base dc:font-semibold dc:mb-2 text-dc-text",
|
|
@@ -4959,7 +4968,7 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
4959
4968
|
children: [/* @__PURE__ */ U("button", {
|
|
4960
4969
|
onClick: this.handleReset,
|
|
4961
4970
|
className: "dc:px-3 dc:py-1.5 dc:border border-dc-border dc:rounded dc:text-sm text-dc-text hover:bg-dc-surface-hover dc:transition-colors dc:flex dc:items-center dc:gap-1",
|
|
4962
|
-
children: [
|
|
4971
|
+
children: [Yt && /* @__PURE__ */ H(Yt, { className: "dc:w-4 dc:h-4" }), "Try Again"]
|
|
4963
4972
|
}), this.props.onSwitchToSafeMode && /* @__PURE__ */ H("button", {
|
|
4964
4973
|
onClick: this.handleSwitchToSafeMode,
|
|
4965
4974
|
className: "dc:px-3 dc:py-1.5 bg-dc-primary text-white dc:rounded dc:text-sm dc:hover:opacity-90 dc:transition-opacity",
|
|
@@ -4969,7 +4978,7 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
4969
4978
|
]
|
|
4970
4979
|
}) : this.props.children;
|
|
4971
4980
|
}
|
|
4972
|
-
},
|
|
4981
|
+
}, Zt = ie(({ className: e = "", maxHeight: t, initialData: n, colorPalette: r, hideSettings: i = !1, hideShare: o = !1, onQueryChange: s, onChartConfigChange: c }, l) => {
|
|
4973
4982
|
let { meta: u } = f(), { features: d } = a(), p = te({
|
|
4974
4983
|
initialData: n,
|
|
4975
4984
|
externalColorPalette: r,
|
|
@@ -5070,7 +5079,7 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
5070
5079
|
children: [
|
|
5071
5080
|
/* @__PURE__ */ U("div", {
|
|
5072
5081
|
className: "dc:h-[60vh] dc:lg:h-auto dc:lg:flex-1 dc:min-w-0 dc:border-b dc:lg:border-b-0 dc:lg:border-r border-dc-border dc:overflow-auto dc:flex dc:flex-col",
|
|
5073
|
-
children: [h.isOpen && /* @__PURE__ */ H(
|
|
5082
|
+
children: [h.isOpen && /* @__PURE__ */ H(qt, {
|
|
5074
5083
|
userPrompt: h.userPrompt,
|
|
5075
5084
|
onPromptChange: v,
|
|
5076
5085
|
isGenerating: h.isGenerating,
|
|
@@ -5081,7 +5090,7 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
5081
5090
|
onCancel: x
|
|
5082
5091
|
}), /* @__PURE__ */ H("div", {
|
|
5083
5092
|
className: "dc:flex-1 dc:overflow-auto",
|
|
5084
|
-
children: /* @__PURE__ */ H(
|
|
5093
|
+
children: /* @__PURE__ */ H(he, {
|
|
5085
5094
|
executionStatus: p.executionStatus,
|
|
5086
5095
|
executionResults: p.executionResults,
|
|
5087
5096
|
executionError: p.error?.message || null,
|
|
@@ -5143,10 +5152,10 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
5143
5152
|
}),
|
|
5144
5153
|
/* @__PURE__ */ H("div", {
|
|
5145
5154
|
className: "dc:w-full dc:lg:w-96 dc:flex-shrink-0 dc:lg:h-full dc:overflow-auto dc:lg:overflow-hidden",
|
|
5146
|
-
children: /* @__PURE__ */ H(
|
|
5155
|
+
children: /* @__PURE__ */ H(Xt, {
|
|
5147
5156
|
analysisType: p.analysisType,
|
|
5148
5157
|
onSwitchToSafeMode: () => p.actions.setAnalysisType("query"),
|
|
5149
|
-
children: /* @__PURE__ */ H(
|
|
5158
|
+
children: /* @__PURE__ */ H(Wt, {
|
|
5150
5159
|
metrics: p.queryState.metrics,
|
|
5151
5160
|
breakdowns: p.effectiveBreakdowns,
|
|
5152
5161
|
filters: p.queryState.filters,
|
|
@@ -5269,8 +5278,8 @@ var qt = e("warning"), Jt = e("refresh"), Yt = class extends re {
|
|
|
5269
5278
|
]
|
|
5270
5279
|
});
|
|
5271
5280
|
});
|
|
5272
|
-
|
|
5273
|
-
var
|
|
5281
|
+
Zt.displayName = "AnalysisBuilderInner";
|
|
5282
|
+
var Qt = ie((e, t) => {
|
|
5274
5283
|
let { initialQuery: n, initialChartConfig: r, initialAnalysisType: i, initialFunnelState: a, initialFlowState: o, initialRetentionState: s, disableLocalStorage: c = !1, storageKey: l, ...u } = e, d = A(), f = d ? k(d) : null, p = f?.activeView, m = f?.analysisType, h = (() => {
|
|
5275
5284
|
if (!f || f.analysisType !== "funnel") return;
|
|
5276
5285
|
let e = "funnel" in f.query ? f.query.funnel : null;
|
|
@@ -5342,15 +5351,15 @@ var Zt = ie((e, t) => {
|
|
|
5342
5351
|
initialActiveView: p,
|
|
5343
5352
|
disableLocalStorage: c || !!n || !!a || !!o || !!s || !!d,
|
|
5344
5353
|
storageKey: l,
|
|
5345
|
-
children: /* @__PURE__ */ H(
|
|
5354
|
+
children: /* @__PURE__ */ H(Zt, {
|
|
5346
5355
|
ref: t,
|
|
5347
5356
|
...u,
|
|
5348
5357
|
hideShare: v
|
|
5349
5358
|
})
|
|
5350
5359
|
});
|
|
5351
5360
|
});
|
|
5352
|
-
|
|
5361
|
+
Qt.displayName = "AnalysisBuilder";
|
|
5353
5362
|
//#endregion
|
|
5354
|
-
export {
|
|
5363
|
+
export { Qt as default };
|
|
5355
5364
|
|
|
5356
|
-
//# sourceMappingURL=analysis-builder-
|
|
5365
|
+
//# sourceMappingURL=analysis-builder-B7XSIMkr.js.map
|