drizzle-cube 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/{mcp-app-html-CNp0VqS_.cjs → mcp-app-html-BCkzy3a2.cjs} +1 -1
- package/dist/adapters/{mcp-app-html-CvWoYMO3.js → mcp-app-html-WiSFu1oD.js} +1 -1
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +1 -1
- package/dist/cjs/client/components/AnalysisBuilder/types.d.ts +4 -0
- package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +6 -1
- package/dist/cjs/client/components/charts/MarkdownChart.helpers.d.ts +5 -0
- package/dist/cjs/client/components/markdownOverrides.d.ts +2 -0
- package/dist/cjs/client/types.d.ts +2 -0
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{DashboardEditModal-CIR4aqr7.js → DashboardEditModal-BrZuaG5z.js} +5 -5
- package/dist/client/chunks/DashboardEditModal-BrZuaG5z.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-DJNYt7CF.js → analysis-builder-CwKFNoe7.js} +5 -5
- package/dist/client/chunks/analysis-builder-CwKFNoe7.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-DPLR8upd.js → analysis-builder-shared-D1SsD4qC.js} +56 -45
- package/dist/client/chunks/analysis-builder-shared-D1SsD4qC.js.map +1 -0
- package/dist/client/chunks/{chart-markdown-DtgpU3xd.js → chart-markdown-XWU1MyCy.js} +2 -1
- package/dist/client/chunks/{chart-markdown-DtgpU3xd.js.map → chart-markdown-XWU1MyCy.js.map} +1 -1
- package/dist/client/chunks/{charts-loader-DoLQqFXg.js → charts-loader-DMdE-Azc.js} +2 -2
- package/dist/client/chunks/{charts-loader-DoLQqFXg.js.map → charts-loader-DMdE-Azc.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-DSkxAJ29.js → useDirtyStateTracking-DUyYwuN_.js} +2 -2
- package/dist/client/chunks/useDirtyStateTracking-DUyYwuN_.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-DRCIVcbu.js → useExplainAI-BtoS3tb5.js} +2 -2
- package/dist/client/chunks/{useExplainAI-DRCIVcbu.js.map → useExplainAI-BtoS3tb5.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/types.d.ts +4 -0
- package/dist/client/components/AnalysisBuilder/utils/queryUtils.d.ts +6 -1
- package/dist/client/components/charts/MarkdownChart.helpers.d.ts +5 -0
- package/dist/client/components/markdownOverrides.d.ts +2 -0
- package/dist/client/components.js +1 -1
- package/dist/client/hooks.js +2 -2
- package/dist/client/index.js +37 -31
- package/dist/client/index.js.map +1 -1
- package/dist/client/types.d.ts +2 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +1 -1
- package/package.json +1 -1
- package/dist/client/chunks/DashboardEditModal-CIR4aqr7.js.map +0 -1
- package/dist/client/chunks/analysis-builder-DJNYt7CF.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-DPLR8upd.js.map +0 -1
- package/dist/client/chunks/useDirtyStateTracking-DSkxAJ29.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vendor-BfBpNmMa.js";
|
|
2
2
|
import { A as s, B as c, d as l, u, y as d } from "./chart-data-table-Cxd0cdAl.js";
|
|
3
|
-
import { C as f, D as p, M as m, _ as h, b as g, d as _, f as v, it as y, nt as b, rt as x, u as S, v as C, w, x as T, y as E } from "./DashboardEditModal-
|
|
3
|
+
import { C as f, D as p, M as m, _ as h, b as g, d as _, f as v, it as y, nt as b, rt as x, u as S, v as C, w, x as T, y as E } from "./DashboardEditModal-BrZuaG5z.js";
|
|
4
4
|
import { a as D, s as O, t as k } from "./retention-ChW9jYdy.js";
|
|
5
5
|
import { O as A, k as j } from "./dashboardExport-Db3rmUP1.js";
|
|
6
|
-
import { A as ee, D as M, F as N, I as te, M as P, N as ne, O as re, P as ie, S as F, T as I, a as ae, d as oe, j as L, k as R, l as se, n as ce, r as le, s as ue } from "./useDirtyStateTracking-
|
|
6
|
+
import { A as ee, D as M, F as N, I as te, M as P, N as ne, O as re, P as ie, S as F, T as I, a as ae, d as oe, j as L, k as R, l as se, n as ce, r as le, s as ue } from "./useDirtyStateTracking-DUyYwuN_.js";
|
|
7
7
|
import { B as de, F as z } from "./chart-activity-grid-Ly_-2B-f.js";
|
|
8
8
|
import { a as fe, i as B, r as pe } from "./gapFilling-DKBRHcQL.js";
|
|
9
|
-
import { a as me, i as he } from "./useExplainAI-
|
|
9
|
+
import { a as me, i as he } from "./useExplainAI-BtoS3tb5.js";
|
|
10
10
|
import { r as ge, s as _e } from "./chart-funnel-71Kn4eeF.js";
|
|
11
11
|
import { n as ve } from "./charts-core-BdEQgbqN.js";
|
|
12
12
|
import V, { createContext as ye, memo as be, useCallback as H, useContext as xe, useEffect as U, useMemo as W, useRef as G, useState as K } from "react";
|
|
@@ -25,30 +25,32 @@ function we(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/client/components/AnalysisBuilder/utils/queryUtils.ts
|
|
28
|
-
function Te(e, t, n, r, i = !1, a, o = !1) {
|
|
29
|
-
let
|
|
30
|
-
if (!i) for (let e of
|
|
31
|
-
|
|
32
|
-
let
|
|
28
|
+
function Te(e, t, n, r, i = !1, a, o = !1, s) {
|
|
29
|
+
let c = (e) => e.isTimeDimension && e.enableComparison && !o, l = t.filter(c).map((e) => e.field), u = n;
|
|
30
|
+
if (!i) for (let e of l) u = we(u, e);
|
|
31
|
+
u = u.filter((e) => b(e));
|
|
32
|
+
let d = {
|
|
33
33
|
measures: e.map((e) => e.field),
|
|
34
34
|
dimensions: t.filter((e) => !e.isTimeDimension).map((e) => e.field),
|
|
35
35
|
timeDimensions: t.filter((e) => e.isTimeDimension).map((e) => {
|
|
36
36
|
let t = {
|
|
37
37
|
dimension: e.field,
|
|
38
|
-
granularity: e.granularity || "day"
|
|
38
|
+
granularity: e.granularity || "day",
|
|
39
|
+
...e.fillMissingDates !== void 0 && !(o && e.fillMissingDates) && { fillMissingDates: e.fillMissingDates }
|
|
39
40
|
};
|
|
40
|
-
if (e
|
|
41
|
+
if (c(e)) {
|
|
41
42
|
let r = Ce(e.field, n);
|
|
42
43
|
r && (t.compareDateRange = r);
|
|
43
44
|
}
|
|
44
45
|
return t;
|
|
45
46
|
}),
|
|
46
|
-
filters:
|
|
47
|
+
filters: u.length > 0 ? u : void 0,
|
|
47
48
|
order: r && Object.keys(r).length > 0 ? r : void 0,
|
|
48
49
|
limit: a ?? void 0,
|
|
49
|
-
ungrouped: o || void 0
|
|
50
|
+
ungrouped: o || void 0,
|
|
51
|
+
...s !== void 0 && { fillMissingDatesValue: s }
|
|
50
52
|
};
|
|
51
|
-
return
|
|
53
|
+
return d.measures?.length === 0 && delete d.measures, d.dimensions?.length === 0 && delete d.dimensions, d.timeDimensions?.length === 0 && delete d.timeDimensions, d;
|
|
52
54
|
}
|
|
53
55
|
function Y() {
|
|
54
56
|
return {
|
|
@@ -1453,30 +1455,31 @@ function Rt() {
|
|
|
1453
1455
|
function zt(e) {
|
|
1454
1456
|
return e.map((e) => e.field);
|
|
1455
1457
|
}
|
|
1456
|
-
function Bt(e, t) {
|
|
1457
|
-
let
|
|
1458
|
-
for (let
|
|
1458
|
+
function Bt(e, t, n) {
|
|
1459
|
+
let r = [], i = [];
|
|
1460
|
+
for (let a of e) if (a.isTimeDimension) {
|
|
1459
1461
|
let e = {
|
|
1460
|
-
dimension:
|
|
1461
|
-
granularity:
|
|
1462
|
+
dimension: a.field,
|
|
1463
|
+
granularity: a.granularity || "day",
|
|
1464
|
+
...a.fillMissingDates !== void 0 && !(n && a.fillMissingDates) && { fillMissingDates: a.fillMissingDates }
|
|
1462
1465
|
};
|
|
1463
|
-
if (
|
|
1464
|
-
let n = Ce(
|
|
1466
|
+
if (a.enableComparison && !n) {
|
|
1467
|
+
let n = Ce(a.field, t);
|
|
1465
1468
|
n && (e.compareDateRange = n);
|
|
1466
1469
|
}
|
|
1467
|
-
|
|
1468
|
-
} else
|
|
1470
|
+
i.push(e);
|
|
1471
|
+
} else r.push(a.field);
|
|
1469
1472
|
return {
|
|
1470
|
-
dimensions:
|
|
1471
|
-
timeDimensions:
|
|
1473
|
+
dimensions: r,
|
|
1474
|
+
timeDimensions: i
|
|
1472
1475
|
};
|
|
1473
1476
|
}
|
|
1474
|
-
function Vt(e) {
|
|
1475
|
-
let { dimensions:
|
|
1477
|
+
function Vt(e, t) {
|
|
1478
|
+
let { dimensions: n, timeDimensions: r } = Bt(e.breakdowns, e.filters, t), i = {
|
|
1476
1479
|
measures: zt(e.metrics),
|
|
1477
|
-
dimensions:
|
|
1480
|
+
dimensions: n
|
|
1478
1481
|
};
|
|
1479
|
-
return
|
|
1482
|
+
return r.length > 0 && (i.timeDimensions = r), e.filters.length > 0 && (i.filters = e.filters), e.order && Object.keys(e.order).length > 0 && (i.order = e.order), e.limit != null && (i.limit = e.limit), e.fillMissingDatesValue !== void 0 && (i.fillMissingDatesValue = e.fillMissingDatesValue), t && (i.ungrouped = !0), i;
|
|
1480
1483
|
}
|
|
1481
1484
|
function Ht(e) {
|
|
1482
1485
|
return e.map((e, t) => ({
|
|
@@ -1499,7 +1502,8 @@ function Ut(e) {
|
|
|
1499
1502
|
field: n.dimension,
|
|
1500
1503
|
granularity: n.granularity,
|
|
1501
1504
|
isTimeDimension: !0,
|
|
1502
|
-
enableComparison: e
|
|
1505
|
+
enableComparison: e,
|
|
1506
|
+
...n.fillMissingDates !== void 0 && { fillMissingDates: n.fillMissingDates }
|
|
1503
1507
|
});
|
|
1504
1508
|
}
|
|
1505
1509
|
return t;
|
|
@@ -1511,6 +1515,7 @@ function Wt(e) {
|
|
|
1511
1515
|
filters: e.filters || [],
|
|
1512
1516
|
order: e.order,
|
|
1513
1517
|
limit: e.limit,
|
|
1518
|
+
...e.fillMissingDatesValue !== void 0 && { fillMissingDatesValue: e.fillMissingDatesValue },
|
|
1514
1519
|
validationStatus: "idle",
|
|
1515
1520
|
validationError: null
|
|
1516
1521
|
};
|
|
@@ -1557,16 +1562,16 @@ var X = {
|
|
|
1557
1562
|
};
|
|
1558
1563
|
},
|
|
1559
1564
|
save(e, t, n) {
|
|
1560
|
-
let r =
|
|
1561
|
-
queries: r,
|
|
1562
|
-
mergeStrategy: e.mergeStrategy
|
|
1563
|
-
};
|
|
1565
|
+
let r = t.query || this.getDefaultChartConfig(), i = l(r.chartType), a = e.queryStates.map((e) => Vt(e, i));
|
|
1564
1566
|
return {
|
|
1565
1567
|
version: 1,
|
|
1566
1568
|
analysisType: "query",
|
|
1567
1569
|
activeView: n,
|
|
1568
|
-
charts: { query:
|
|
1569
|
-
query:
|
|
1570
|
+
charts: { query: r },
|
|
1571
|
+
query: a.length === 1 && e.mergeStrategy === "concat" ? a[0] : {
|
|
1572
|
+
queries: a,
|
|
1573
|
+
mergeStrategy: e.mergeStrategy
|
|
1574
|
+
}
|
|
1570
1575
|
};
|
|
1571
1576
|
},
|
|
1572
1577
|
validate(e) {
|
|
@@ -1869,7 +1874,8 @@ var Q = {
|
|
|
1869
1874
|
...Y(),
|
|
1870
1875
|
metrics: [...t.metrics],
|
|
1871
1876
|
breakdowns: [...t.breakdowns],
|
|
1872
|
-
filters: [...t.filters]
|
|
1877
|
+
filters: [...t.filters],
|
|
1878
|
+
...t.fillMissingDatesValue !== void 0 && { fillMissingDatesValue: t.fillMissingDatesValue }
|
|
1873
1879
|
};
|
|
1874
1880
|
return {
|
|
1875
1881
|
queryStates: [...e.queryStates, n],
|
|
@@ -2097,11 +2103,11 @@ var Q = {
|
|
|
2097
2103
|
},
|
|
2098
2104
|
buildCurrentQuery: () => {
|
|
2099
2105
|
let e = t(), n = e.queryStates[e.activeQueryIndex] || Y(), r = l(e.charts[e.analysisType]?.chartType ?? "");
|
|
2100
|
-
return Te(n.metrics, n.breakdowns, n.filters, n.order, !1, n.limit, r);
|
|
2106
|
+
return Te(n.metrics, n.breakdowns, n.filters, n.order, !1, n.limit, r, n.fillMissingDatesValue);
|
|
2101
2107
|
},
|
|
2102
2108
|
buildAllQueries: () => {
|
|
2103
2109
|
let e = t(), n = e.queryStates[0]?.breakdowns || [], r = l(e.charts[e.analysisType]?.chartType ?? "");
|
|
2104
|
-
return e.queryStates.map((t, i) => Te(t.metrics, e.mergeStrategy === "merge" && i > 0 ? n : t.breakdowns, t.filters, t.order, !1, t.limit, r));
|
|
2110
|
+
return e.queryStates.map((t, i) => Te(t.metrics, e.mergeStrategy === "merge" && i > 0 ? n : t.breakdowns, t.filters, t.order, !1, t.limit, r, t.fillMissingDatesValue));
|
|
2105
2111
|
},
|
|
2106
2112
|
buildMultiQueryConfig: () => {
|
|
2107
2113
|
let e = t();
|
|
@@ -2464,7 +2470,8 @@ function cn(e) {
|
|
|
2464
2470
|
field: e.dimension,
|
|
2465
2471
|
granularity: e.granularity,
|
|
2466
2472
|
isTimeDimension: !0,
|
|
2467
|
-
enableComparison: !!(e.compareDateRange && e.compareDateRange.length > 0)
|
|
2473
|
+
enableComparison: !!(e.compareDateRange && e.compareDateRange.length > 0),
|
|
2474
|
+
...e.fillMissingDates !== void 0 && { fillMissingDates: e.fillMissingDates }
|
|
2468
2475
|
}))], i = t;
|
|
2469
2476
|
for (let e of n) {
|
|
2470
2477
|
if (!e.compareDateRange || e.compareDateRange.length === 0) continue;
|
|
@@ -2494,7 +2501,8 @@ function cn(e) {
|
|
|
2494
2501
|
})),
|
|
2495
2502
|
breakdowns: r,
|
|
2496
2503
|
filters: i,
|
|
2497
|
-
order: e.order
|
|
2504
|
+
order: e.order,
|
|
2505
|
+
...e.fillMissingDatesValue !== void 0 && { fillMissingDatesValue: e.fillMissingDatesValue }
|
|
2498
2506
|
};
|
|
2499
2507
|
}
|
|
2500
2508
|
function ln(e) {
|
|
@@ -2872,7 +2880,7 @@ function Vn(e) {
|
|
|
2872
2880
|
function Hn(e = {}) {
|
|
2873
2881
|
let { externalColorPalette: t } = e, r = Cn(), i = $((e) => e.queryStates), a = $((e) => e.activeQueryIndex), o = $((e) => e.mergeStrategy), s = $((e) => e.setActiveQueryIndex), c = $((e) => e.setMergeStrategy), u = $((e) => e.addQuery), d = $((e) => e.removeQuery), f = $((e) => e.getCurrentState), m = $((e) => e.getMergeKeys), h = $((e) => e.isMultiQueryMode), g = f(), _ = h(), v = m(), y = $((e) => l(e.charts[e.analysisType]?.chartType ?? "")), b = W(() => {
|
|
2874
2882
|
let e = i[a] || g;
|
|
2875
|
-
return Te(e.metrics, e.breakdowns, e.filters, e.order, !1, e.limit, y);
|
|
2883
|
+
return Te(e.metrics, e.breakdowns, e.filters, e.order, !1, e.limit, y, e.fillMissingDatesValue);
|
|
2876
2884
|
}, [
|
|
2877
2885
|
i,
|
|
2878
2886
|
a,
|
|
@@ -2880,7 +2888,7 @@ function Hn(e = {}) {
|
|
|
2880
2888
|
y
|
|
2881
2889
|
]), x = W(() => {
|
|
2882
2890
|
let e = i[0]?.breakdowns || [];
|
|
2883
|
-
return i.map((t, n) => Te(t.metrics, o === "merge" && n > 0 ? e : t.breakdowns, t.filters, t.order, !1, t.limit, y));
|
|
2891
|
+
return i.map((t, n) => Te(t.metrics, o === "merge" && n > 0 ? e : t.breakdowns, t.filters, t.order, !1, t.limit, y, t.fillMissingDatesValue));
|
|
2884
2892
|
}, [
|
|
2885
2893
|
i,
|
|
2886
2894
|
o,
|
|
@@ -3661,7 +3669,8 @@ function ur(e) {
|
|
|
3661
3669
|
breakdowns: n.breakdowns,
|
|
3662
3670
|
filters: n.filters,
|
|
3663
3671
|
order: n.order,
|
|
3664
|
-
limit: n.limit
|
|
3672
|
+
limit: n.limit,
|
|
3673
|
+
fillMissingDatesValue: n.fillMissingDatesValue
|
|
3665
3674
|
};
|
|
3666
3675
|
});
|
|
3667
3676
|
}, [o, t.activeQueryIndex]), T = H((e) => {
|
|
@@ -3751,11 +3760,13 @@ function ur(e) {
|
|
|
3751
3760
|
id: f(),
|
|
3752
3761
|
field: e.dimension,
|
|
3753
3762
|
granularity: e.granularity,
|
|
3763
|
+
...e.fillMissingDates !== void 0 && { fillMissingDates: e.fillMissingDates },
|
|
3754
3764
|
isTimeDimension: !0
|
|
3755
3765
|
}))],
|
|
3756
3766
|
filters: c.filters || [],
|
|
3757
3767
|
order: c.order || void 0,
|
|
3758
|
-
limit: c.limit ?? void 0
|
|
3768
|
+
limit: c.limit ?? void 0,
|
|
3769
|
+
fillMissingDatesValue: c.fillMissingDatesValue
|
|
3759
3770
|
})), t.analysisType === "funnel" && s.setAnalysisType("query"), a && s.setChartType(a), o && s.setChartConfig(o), s.setActiveView("chart"), S((e) => ({
|
|
3760
3771
|
...e,
|
|
3761
3772
|
isGenerating: !1,
|
|
@@ -4146,4 +4157,4 @@ function br(e) {
|
|
|
4146
4157
|
//#endregion
|
|
4147
4158
|
export { kn as A, En as C, jn as D, Dn as E, Ye as F, Cn as M, Lt as N, Tn as O, it as P, Sn as S, wn as T, Vn as _, hr as a, Ln as b, dr as c, rr as d, tr as f, Fn as g, In as h, fr as i, $ as j, An as k, $n as l, or as m, br as n, _r as o, ir as p, vr as r, pr as s, yr as t, er as u, zn as v, On as w, Nn as x, Pn as y };
|
|
4148
4159
|
|
|
4149
|
-
//# sourceMappingURL=analysis-builder-shared-
|
|
4160
|
+
//# sourceMappingURL=analysis-builder-shared-D1SsD4qC.js.map
|