react-semaphor 0.1.390 → 0.1.392
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +120 -252
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/chunks/analyze-result-contract-C9Gv2_qW.js +1585 -0
- package/dist/chunks/analyze-result-contract-Zgg-Bbpj.js +1 -0
- package/dist/chunks/{braces--20GzUQh.js → braces-8TRlDwDw.js} +1 -1
- package/dist/chunks/{braces-C0Vh_Mft.js → braces-D2tStQjF.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-B-VsxhsA.js → calendar-preferences-dialog-49fcEPXS.js} +4 -4
- package/dist/chunks/{calendar-preferences-dialog-DE67Z3oQ.js → calendar-preferences-dialog-DwLeBLy2.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-CgkSKkZR.js +80 -0
- package/dist/chunks/{dashboard-briefing-launcher-BIj3X7b3.js → dashboard-briefing-launcher-cgPKz1yX.js} +252 -252
- package/dist/chunks/dashboard-controls-D12ZSUP_.js +52 -0
- package/dist/chunks/{dashboard-controls-BXxucM4f.js → dashboard-controls-VMFm3OP4.js} +87 -87
- package/dist/chunks/{dashboard-json-C6oZuipD.js → dashboard-json-C-GG5yC7.js} +4 -4
- package/dist/chunks/{dashboard-json-BNwshkK2.js → dashboard-json-CvK0oI24.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CmfrI_L3.js → edit-dashboard-visual-B5KB7dx4.js} +977 -977
- package/dist/chunks/edit-dashboard-visual-ql99faTz.js +178 -0
- package/dist/chunks/{index-icb12JV1.js → index-CQmKDEbe.js} +735 -741
- package/dist/chunks/{index-4W_ElSBJ.js → index-DXCBPLDu.js} +218 -223
- package/dist/chunks/{layout-grid-B7-klXiK.js → layout-grid-C0OI-MRn.js} +1 -1
- package/dist/chunks/{layout-grid-DV89AC9_.js → layout-grid-CiubineE.js} +1 -1
- package/dist/chunks/{palette-Dj-dgPYh.js → palette-C4KTXOug.js} +1 -1
- package/dist/chunks/{palette-5IwhMbSF.js → palette-Cp1hqZtm.js} +1 -1
- package/dist/chunks/{save-C5fwVdTF.js → save-C__QggEE.js} +1 -1
- package/dist/chunks/{save-16C6YSW2.js → save-DgMfP0j8.js} +1 -1
- package/dist/chunks/{search-0LmWwZzW.js → search-BHsQIWBV.js} +17 -7
- package/dist/chunks/{search-Dq1Mbb03.js → search-DNCejM7Z.js} +9 -4
- package/dist/chunks/source-identity-uMaUe036.js +1 -0
- package/dist/chunks/{source-identity-CN4xiyKJ.js → source-identity-y0VSSreA.js} +33 -15
- package/dist/chunks/{switch-bdJp0Bkw.js → switch-B79Hn4Qh.js} +27 -32
- package/dist/chunks/{switch-DUdaHFZQ.js → switch-BXQAlSuW.js} +637 -647
- package/dist/chunks/use-create-flow-overlay-state-7MFN3PWX.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-YvqCp6Zo.js → use-create-flow-overlay-state-Bw5LRkf9.js} +93 -92
- package/dist/chunks/{validators-CHPH6ORs.js → validators-4EGCWWga.js} +1 -1
- package/dist/chunks/{validators-lWo8m0Q7.js → validators-CPtkrola.js} +1 -1
- package/dist/chunks/{x-B_cx7LwM.js → x-B6ghREd2.js} +10 -5
- package/dist/chunks/{x-IdR_js6f.js → x-CXDkqdur.js} +28 -18
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +3 -3
- package/dist/data-app-builder/index.cjs +13 -13
- package/dist/data-app-builder/index.js +11 -11
- package/dist/data-app-sdk/index.cjs +5 -5
- package/dist/data-app-sdk/index.js +1698 -1121
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +6 -7
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +13 -13
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +2107 -43
- package/dist/types/dashboard-assistant.d.ts +3 -1
- package/dist/types/data-app-sdk-adapters.d.ts +1 -1
- package/dist/types/data-app-sdk-validation.d.ts +4 -2
- package/dist/types/data-app-sdk.d.ts +73 -5
- package/package.json +2 -1
- package/src/data-app-sdk/README.md +55 -0
- package/dist/chunks/analyze-result-contract-CtXfp3nv.js +0 -1
- package/dist/chunks/analyze-result-contract-DuhlklhI.js +0 -102
- package/dist/chunks/dashboard-briefing-launcher-Czx6BcXW.js +0 -80
- package/dist/chunks/dashboard-controls-BP-DcPFs.js +0 -52
- package/dist/chunks/edit-dashboard-visual-BAprin3J.js +0 -178
- package/dist/chunks/source-identity-C-xaeE_I.js +0 -1
- package/dist/chunks/use-create-flow-overlay-state-BIHKf_XK.js +0 -21
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as ge, X as et } from "./x-
|
|
2
|
-
import { useState as K, useEffect as ie, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as ge, X as et, C as je } from "./x-CXDkqdur.js";
|
|
2
|
+
import { useState as K, useEffect as ie, useCallback as B, useMemo as P, useRef as Se, Fragment as bt } from "react";
|
|
3
|
+
import { F as de, A as Le, u as Z, E as M, a4 as yt, Q as vt, V as xt, W as Ct, c as fe, Y as kt, a5 as St, B as q, d as Nt, e as tt, a6 as wt, a7 as Dt, a8 as pe, a9 as Qe, aa as $e, ab as Ne, ac as we, ad as Et, ae as Pe, af as It, ag as Ft, ah as me, ai as Vt, aj as He, ak as at, al as rt, am as st, L as oe, Z as nt, _ as De, $ as Ee, a0 as Ie, a1 as Fe, a2 as Ve, an as ot, ao as Tt, ap as _t, aq as We, ar as Lt, as as Ke, at as At, au as Te } from "./switch-BXQAlSuW.js";
|
|
4
|
+
import { aB as qt, u as Mt, aC as ce, aD as Ot, aE as Ae, aF as zt, aG as Ut, aH as Bt, p as R, aI as Rt, aJ as jt, aK as lt, aL as Qt, aM as $t, aN as Pt, aO as Ht, aP as Wt, y as Kt, aQ as Yt, aR as it, aS as dt, aT as Gt, aU as Jt, aV as Xt, aW as Zt, aX as ea, aY as ct, aZ as ut, a_ as ta, a$ as aa, b0 as ra, b1 as sa, b2 as na, ar as oa, b3 as la, b4 as ia } from "./index-CQmKDEbe.js";
|
|
5
5
|
import { jsx as a, jsxs as m, Fragment as re } from "react/jsx-runtime";
|
|
6
|
-
import "./analyze-result-contract-
|
|
7
|
-
import { S as pt } from "./save-
|
|
6
|
+
import "./analyze-result-contract-C9Gv2_qW.js";
|
|
7
|
+
import { S as pt } from "./save-DgMfP0j8.js";
|
|
8
|
+
import { C as Ye } from "./search-BHsQIWBV.js";
|
|
8
9
|
/**
|
|
9
10
|
* @license lucide-react v0.453.0 - ISC
|
|
10
11
|
*
|
|
@@ -34,7 +35,7 @@ const ca = ge("Link2", [
|
|
|
34
35
|
* This source code is licensed under the ISC license.
|
|
35
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
37
|
*/
|
|
37
|
-
const
|
|
38
|
+
const Va = ge("Rows3", [
|
|
38
39
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
39
40
|
["path", { d: "M21 9H3", key: "1338ky" }],
|
|
40
41
|
["path", { d: "M21 15H3", key: "9uk58r" }]
|
|
@@ -45,7 +46,7 @@ const Fa = ge("Rows3", [
|
|
|
45
46
|
* This source code is licensed under the ISC license.
|
|
46
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
48
|
*/
|
|
48
|
-
const
|
|
49
|
+
const Ta = ge("SendHorizontal", [
|
|
49
50
|
[
|
|
50
51
|
"path",
|
|
51
52
|
{
|
|
@@ -123,7 +124,7 @@ function pa(t, r) {
|
|
|
123
124
|
return t[0].id;
|
|
124
125
|
}
|
|
125
126
|
const _e = /* @__PURE__ */ new Set();
|
|
126
|
-
function
|
|
127
|
+
function _a(t) {
|
|
127
128
|
return _e.add(t), () => {
|
|
128
129
|
_e.delete(t);
|
|
129
130
|
};
|
|
@@ -146,7 +147,7 @@ async function Ge(t, r, n, s, l = "Opening library visual...") {
|
|
|
146
147
|
if (p)
|
|
147
148
|
return console.log("Using cached visual data for:", n), { data: p, fromCache: !0 };
|
|
148
149
|
console.log("Fetching visual data from network for:", n);
|
|
149
|
-
const f =
|
|
150
|
+
const f = R.loading(l, {
|
|
150
151
|
position: "top-center"
|
|
151
152
|
});
|
|
152
153
|
try {
|
|
@@ -161,9 +162,9 @@ async function Ge(t, r, n, s, l = "Opening library visual...") {
|
|
|
161
162
|
if (!u.ok)
|
|
162
163
|
throw new Error("Failed to load visual");
|
|
163
164
|
const v = await u.json();
|
|
164
|
-
return s.setQueryData(d, v),
|
|
165
|
+
return s.setQueryData(d, v), R.dismiss(f), { data: v, fromCache: !1 };
|
|
165
166
|
} catch (u) {
|
|
166
|
-
throw
|
|
167
|
+
throw R.dismiss(f), u;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
function mt(t) {
|
|
@@ -184,7 +185,7 @@ function ha(t, r) {
|
|
|
184
185
|
const l = (p = s.cards) == null ? void 0 : p.find(
|
|
185
186
|
(f) => f.id === s.activeCardId
|
|
186
187
|
);
|
|
187
|
-
return l ? (
|
|
188
|
+
return l ? (Rt({
|
|
188
189
|
...r,
|
|
189
190
|
frame: s,
|
|
190
191
|
card: l,
|
|
@@ -198,7 +199,7 @@ function ga() {
|
|
|
198
199
|
return ((l = s.card.customCardPreferences) == null ? void 0 : l.url) || "";
|
|
199
200
|
}
|
|
200
201
|
), r = ua(t);
|
|
201
|
-
return { getUpdatedFrame:
|
|
202
|
+
return { getUpdatedFrame: B(() => {
|
|
202
203
|
var F;
|
|
203
204
|
ma();
|
|
204
205
|
const {
|
|
@@ -248,18 +249,18 @@ function qe() {
|
|
|
248
249
|
setSelectedDatamodelId: j,
|
|
249
250
|
setFilterValues: G,
|
|
250
251
|
setInlineFilterValuesMap: ee,
|
|
251
|
-
setApplyFilters:
|
|
252
|
+
setApplyFilters: J,
|
|
252
253
|
clearEditorContext: se
|
|
253
254
|
} = de(), {
|
|
254
255
|
setIsDashboardEditing: O,
|
|
255
256
|
setIsVisualEditing: o,
|
|
256
257
|
setSelectedFrameId: D,
|
|
257
258
|
clearSelectedFrameId: V
|
|
258
|
-
} = Le(), z = Z((_) => _.selectedSheetId), H = Z((_) => _.selectedFrameId),
|
|
259
|
+
} = Le(), z = Z((_) => _.selectedSheetId), H = Z((_) => _.selectedFrameId), X = Z((_) => _.dashboard), te = Z((_) => _.filterValues), L = Z(
|
|
259
260
|
(_) => _.inlineFilterValuesMap
|
|
260
261
|
), Q = Ut((l == null ? void 0 : l.id) || "", {
|
|
261
262
|
enabled: !!(l != null && l.id) && !!(t != null && t.accessToken)
|
|
262
|
-
}), Y =
|
|
263
|
+
}), Y = B(
|
|
263
264
|
async (_) => {
|
|
264
265
|
try {
|
|
265
266
|
d(_), V(), se();
|
|
@@ -285,10 +286,10 @@ function qe() {
|
|
|
285
286
|
setSelectedDatamodelId: j,
|
|
286
287
|
setFilterValues: G,
|
|
287
288
|
setInlineFilterValuesMap: ee,
|
|
288
|
-
setApplyFilters:
|
|
289
|
+
setApplyFilters: J,
|
|
289
290
|
setIsDashboardEditing: O,
|
|
290
291
|
setIsVisualEditing: o,
|
|
291
|
-
dashboard:
|
|
292
|
+
dashboard: X,
|
|
292
293
|
selectedSheetId: z,
|
|
293
294
|
selectedFrameId: H,
|
|
294
295
|
filterValues: te,
|
|
@@ -321,19 +322,19 @@ function qe() {
|
|
|
321
322
|
j,
|
|
322
323
|
G,
|
|
323
324
|
ee,
|
|
324
|
-
|
|
325
|
+
J,
|
|
325
326
|
se,
|
|
326
327
|
V,
|
|
327
|
-
|
|
328
|
+
X,
|
|
328
329
|
z,
|
|
329
330
|
H,
|
|
330
331
|
te,
|
|
331
332
|
L
|
|
332
333
|
]
|
|
333
|
-
), be =
|
|
334
|
+
), be = B(
|
|
334
335
|
async (_) => {
|
|
335
336
|
var W;
|
|
336
|
-
const E = (A) => (
|
|
337
|
+
const E = (A) => (R.error(A), { success: !1, error: A });
|
|
337
338
|
try {
|
|
338
339
|
if (d(_), !z)
|
|
339
340
|
return E("No sheet selected. Please select a sheet first.");
|
|
@@ -350,7 +351,7 @@ function qe() {
|
|
|
350
351
|
if (!($ != null && $.cards) || $.cards.length === 0)
|
|
351
352
|
return E("Visual frame is malformed");
|
|
352
353
|
const le = {
|
|
353
|
-
...
|
|
354
|
+
...Bt($),
|
|
354
355
|
visualId: _.id
|
|
355
356
|
// Link this frame to the library visual
|
|
356
357
|
};
|
|
@@ -387,7 +388,7 @@ function qe() {
|
|
|
387
388
|
refetch: Q.refetch
|
|
388
389
|
};
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
+
function La() {
|
|
391
392
|
const t = M((p) => p.card.dataSource), {
|
|
392
393
|
setSelectedConnectionId: r,
|
|
393
394
|
setSelectedDatabaseName: n,
|
|
@@ -446,7 +447,7 @@ function ft() {
|
|
|
446
447
|
l == null ? void 0 : l.slots
|
|
447
448
|
) ?? t.type, [n, d, f, t, l == null ? void 0 : l.slots]);
|
|
448
449
|
}
|
|
449
|
-
function
|
|
450
|
+
function Aa({
|
|
450
451
|
type: t,
|
|
451
452
|
isLinked: r,
|
|
452
453
|
className: n,
|
|
@@ -543,9 +544,9 @@ function ba(t, r) {
|
|
|
543
544
|
}
|
|
544
545
|
function Me(t) {
|
|
545
546
|
const r = wt(t);
|
|
546
|
-
return r ? (
|
|
547
|
+
return r ? (R.error(r), !1) : !0;
|
|
547
548
|
}
|
|
548
|
-
function
|
|
549
|
+
function qa({
|
|
549
550
|
className: t,
|
|
550
551
|
variant: r = "outline"
|
|
551
552
|
}) {
|
|
@@ -568,7 +569,7 @@ function Aa({
|
|
|
568
569
|
}
|
|
569
570
|
);
|
|
570
571
|
}
|
|
571
|
-
function
|
|
572
|
+
function Ma({
|
|
572
573
|
className: t,
|
|
573
574
|
variant: r = "default"
|
|
574
575
|
}) {
|
|
@@ -582,7 +583,7 @@ function qa({
|
|
|
582
583
|
return;
|
|
583
584
|
const x = (u == null ? void 0 : u.visualId) || (f == null ? void 0 : f.id);
|
|
584
585
|
if (!x) {
|
|
585
|
-
|
|
586
|
+
R.error("No visual to save");
|
|
586
587
|
return;
|
|
587
588
|
}
|
|
588
589
|
l(!0), v.mutate(
|
|
@@ -594,13 +595,13 @@ function qa({
|
|
|
594
595
|
},
|
|
595
596
|
{
|
|
596
597
|
onSuccess: () => {
|
|
597
|
-
l(!1),
|
|
598
|
+
l(!1), R.success("Visual updated successfully"), n.invalidateQueries({
|
|
598
599
|
queryKey: ["resource-by-id", "visual", x],
|
|
599
600
|
exact: !0
|
|
600
601
|
});
|
|
601
602
|
},
|
|
602
603
|
onError: () => {
|
|
603
|
-
l(!1),
|
|
604
|
+
l(!1), R.error("Failed to update visual");
|
|
604
605
|
}
|
|
605
606
|
}
|
|
606
607
|
);
|
|
@@ -618,7 +619,7 @@ function qa({
|
|
|
618
619
|
}
|
|
619
620
|
);
|
|
620
621
|
}
|
|
621
|
-
function
|
|
622
|
+
function Oa({
|
|
622
623
|
className: t
|
|
623
624
|
}) {
|
|
624
625
|
const r = ce(), [n, s] = K(!1), l = Ae(), d = M((k) => k.frame), p = Z((k) => k.selectedSheetId), f = Z((k) => k.dashboard), { updateFrame: u, setIsVisualEditing: v } = Le(), { getUpdatedFrame: b } = qe(), h = dt(), x = Gt();
|
|
@@ -627,12 +628,12 @@ function Ma({
|
|
|
627
628
|
{
|
|
628
629
|
onClick: async () => {
|
|
629
630
|
if (!p) {
|
|
630
|
-
|
|
631
|
+
R.error("No sheet selected");
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
634
|
const k = (d == null ? void 0 : d.visualId) || (l == null ? void 0 : l.id);
|
|
634
635
|
if (!k) {
|
|
635
|
-
|
|
636
|
+
R.error("No visual to update");
|
|
636
637
|
return;
|
|
637
638
|
}
|
|
638
639
|
s(!0);
|
|
@@ -646,7 +647,7 @@ function Ma({
|
|
|
646
647
|
...N,
|
|
647
648
|
visualId: k
|
|
648
649
|
// Keep the link to library visual
|
|
649
|
-
}, j =
|
|
650
|
+
}, j = Jt(f, F.id), G = await x(F, {
|
|
650
651
|
previousFrame: j
|
|
651
652
|
});
|
|
652
653
|
await h.mutateAsync({
|
|
@@ -656,11 +657,11 @@ function Ma({
|
|
|
656
657
|
}
|
|
657
658
|
}), u(p, F, {
|
|
658
659
|
semanticExecutionPayload: G
|
|
659
|
-
}), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", k] }),
|
|
660
|
+
}), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", k] }), R.success("Saved to library and applied locally"), setTimeout(() => {
|
|
660
661
|
v(!1);
|
|
661
662
|
}, 300);
|
|
662
663
|
} catch (N) {
|
|
663
|
-
console.error("Failed to save and apply:", N),
|
|
664
|
+
console.error("Failed to save and apply:", N), R.error(
|
|
664
665
|
N instanceof Error ? N.message : "Failed to save and apply changes"
|
|
665
666
|
);
|
|
666
667
|
} finally {
|
|
@@ -681,7 +682,7 @@ function Ma({
|
|
|
681
682
|
}
|
|
682
683
|
);
|
|
683
684
|
}
|
|
684
|
-
function
|
|
685
|
+
function za({ className: t }) {
|
|
685
686
|
const { setTempQueryData: r, setSqlGen: n } = de(), s = ce(), l = M((h) => h.tempQueryData), d = M((h) => h.onClose), p = M((h) => h.card), f = ft(), u = P(() => f !== p.type ? { ...p, type: f } : p, [p, f]), { queryKey: v } = it(u);
|
|
686
687
|
function b() {
|
|
687
688
|
if (l) {
|
|
@@ -704,7 +705,7 @@ function Oa({ className: t }) {
|
|
|
704
705
|
}
|
|
705
706
|
);
|
|
706
707
|
}
|
|
707
|
-
function
|
|
708
|
+
function Ua({
|
|
708
709
|
label: t = "Clear",
|
|
709
710
|
variant: r = "secondary",
|
|
710
711
|
className: n
|
|
@@ -720,22 +721,22 @@ function za({
|
|
|
720
721
|
setCardType: j,
|
|
721
722
|
setFrame: G,
|
|
722
723
|
setCard: ee,
|
|
723
|
-
setActiveTabCardId:
|
|
724
|
+
setActiveTabCardId: J
|
|
724
725
|
} = de();
|
|
725
726
|
function se() {
|
|
726
|
-
var
|
|
727
|
+
var X, te, L, Q;
|
|
727
728
|
const O = l.getQueryData(v);
|
|
728
729
|
d != null && d.queryData || s({
|
|
729
730
|
queryKey: v,
|
|
730
731
|
queryData: O
|
|
731
732
|
}), l.setQueryData(v, null), l.removeQueries({ queryKey: v, exact: !0 }), b(""), h({}), N(), F(void 0), x(""), w(""), k({});
|
|
732
|
-
const o = M.getState().frame, D = M.getState().card, V = lt(o, D), z = ((
|
|
733
|
+
const o = M.getState().frame, D = M.getState().card, V = lt(o, D), z = ((X = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : X.visualType) === "multiple" || !!((te = V == null ? void 0 : V.customCardPreferences) != null && te.dataInputCardIds) || (((L = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : L.minInputs) || 0) > 1 || (((Q = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : Q.maxInputs) || 0) > 1, H = ba(D, z);
|
|
733
734
|
G({
|
|
734
735
|
...o,
|
|
735
736
|
cards: o.cards.map(
|
|
736
737
|
(Y) => Y.id === H.id ? H : Y
|
|
737
738
|
)
|
|
738
|
-
}),
|
|
739
|
+
}), J(H.id), ee(H), z || j("bar");
|
|
739
740
|
}
|
|
740
741
|
return /* @__PURE__ */ m(
|
|
741
742
|
q,
|
|
@@ -830,7 +831,7 @@ function va(t) {
|
|
|
830
831
|
] })
|
|
831
832
|
] });
|
|
832
833
|
}
|
|
833
|
-
function
|
|
834
|
+
function Je(t) {
|
|
834
835
|
const {
|
|
835
836
|
control: r,
|
|
836
837
|
defaultValue: n,
|
|
@@ -896,7 +897,7 @@ const xa = /* @__PURE__ */ new Set([
|
|
|
896
897
|
"field_selector",
|
|
897
898
|
"metric_selector"
|
|
898
899
|
]);
|
|
899
|
-
function
|
|
900
|
+
function Xe(t) {
|
|
900
901
|
const { text: r, ariaLabel: n } = t, [s, l] = K(!1);
|
|
901
902
|
return /* @__PURE__ */ m(
|
|
902
903
|
"button",
|
|
@@ -949,14 +950,14 @@ function Ze(t) {
|
|
|
949
950
|
/* @__PURE__ */ m("div", { className: "space-y-1.5 px-3 py-2.5", children: [
|
|
950
951
|
/* @__PURE__ */ a("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
|
|
951
952
|
/* @__PURE__ */ a(
|
|
952
|
-
|
|
953
|
+
Xe,
|
|
953
954
|
{
|
|
954
955
|
text: s,
|
|
955
956
|
ariaLabel: "Copy SQL control reference"
|
|
956
957
|
}
|
|
957
958
|
),
|
|
958
959
|
x ? /* @__PURE__ */ a(
|
|
959
|
-
|
|
960
|
+
Xe,
|
|
960
961
|
{
|
|
961
962
|
text: x,
|
|
962
963
|
ariaLabel: "Copy Jinja control reference"
|
|
@@ -1017,7 +1018,7 @@ function Ca(t) {
|
|
|
1017
1018
|
defaultValue: me(n, void 0)
|
|
1018
1019
|
};
|
|
1019
1020
|
}
|
|
1020
|
-
function
|
|
1021
|
+
function Ba({
|
|
1021
1022
|
scope: t,
|
|
1022
1023
|
controls: r,
|
|
1023
1024
|
reservedControlIds: n,
|
|
@@ -1038,7 +1039,7 @@ function Ua({
|
|
|
1038
1039
|
const F = P(
|
|
1039
1040
|
() => new Set(n || []),
|
|
1040
1041
|
[n]
|
|
1041
|
-
), j = Tt(t), G = Dt(t), [ee,
|
|
1042
|
+
), j = Tt(t), G = Dt(t), [ee, J] = K(
|
|
1042
1043
|
null
|
|
1043
1044
|
), [se, O] = K(
|
|
1044
1045
|
null
|
|
@@ -1047,15 +1048,15 @@ function Ua({
|
|
|
1047
1048
|
step: 1,
|
|
1048
1049
|
control: pe(t, r, Array.from(F))
|
|
1049
1050
|
} : null
|
|
1050
|
-
), V = Se({}), z = Se(void 0), H = Se(p),
|
|
1051
|
-
const e =
|
|
1051
|
+
), V = Se({}), z = Se(void 0), H = Se(p), X = P(() => {
|
|
1052
|
+
const e = Qe({ scope: t, card: x });
|
|
1052
1053
|
if (!w)
|
|
1053
1054
|
return e;
|
|
1054
1055
|
const c = new Set(w);
|
|
1055
1056
|
return e.filter((i) => c.has(i.value));
|
|
1056
|
-
}, [w, x, t]), te =
|
|
1057
|
+
}, [w, x, t]), te = B(
|
|
1057
1058
|
(e) => {
|
|
1058
|
-
const c =
|
|
1059
|
+
const c = Qe({
|
|
1059
1060
|
scope: t,
|
|
1060
1061
|
card: x,
|
|
1061
1062
|
includeType: w ? void 0 : e
|
|
@@ -1066,11 +1067,11 @@ function Ua({
|
|
|
1066
1067
|
return c.filter((g) => i.has(g.value));
|
|
1067
1068
|
},
|
|
1068
1069
|
[w, x, t]
|
|
1069
|
-
), L =
|
|
1070
|
+
), L = B(
|
|
1070
1071
|
(e) => t === "dashboard" && (e === "field_selector" || e === "metric_selector"),
|
|
1071
1072
|
[t]
|
|
1072
1073
|
), Q = P(
|
|
1073
|
-
() => o ?
|
|
1074
|
+
() => o ? $e(
|
|
1074
1075
|
b || [],
|
|
1075
1076
|
o.control.type
|
|
1076
1077
|
) : [],
|
|
@@ -1115,7 +1116,7 @@ function Ua({
|
|
|
1115
1116
|
H.current = p, e && (D({
|
|
1116
1117
|
step: 1,
|
|
1117
1118
|
control: pe(t, r, Array.from(F))
|
|
1118
|
-
}), O(null),
|
|
1119
|
+
}), O(null), J(null));
|
|
1119
1120
|
}, [r, p, F, t]);
|
|
1120
1121
|
const be = (e) => {
|
|
1121
1122
|
if (!L(e.type))
|
|
@@ -1171,7 +1172,7 @@ function Ua({
|
|
|
1171
1172
|
nextControl: g,
|
|
1172
1173
|
cardBindingsById: C
|
|
1173
1174
|
};
|
|
1174
|
-
}, E =
|
|
1175
|
+
}, E = B(
|
|
1175
1176
|
(e, c = s, i = { type: "update" }) => {
|
|
1176
1177
|
const g = e.map((C) => (we({
|
|
1177
1178
|
control: C,
|
|
@@ -1221,7 +1222,7 @@ function Ua({
|
|
|
1221
1222
|
currentDefaultValue: ne
|
|
1222
1223
|
});
|
|
1223
1224
|
I.source.kind === "manual" && (V.current[e] = ae), s && (U = { ...s }, ae === void 0 ? delete U[e] : U[e] = ae), g = g.map(
|
|
1224
|
-
(
|
|
1225
|
+
(Re) => Re.id === e ? { ...I, defaultValue: ae } : Re
|
|
1225
1226
|
);
|
|
1226
1227
|
}
|
|
1227
1228
|
E(g, U, {
|
|
@@ -1262,11 +1263,11 @@ function Ua({
|
|
|
1262
1263
|
}
|
|
1263
1264
|
const i = { ...s };
|
|
1264
1265
|
delete i[e], E(c, i, { type: "remove", controlId: e });
|
|
1265
|
-
}, ue =
|
|
1266
|
+
}, ue = B(() => {
|
|
1266
1267
|
z.current = void 0, D({
|
|
1267
1268
|
step: 1,
|
|
1268
1269
|
control: pe(t, r, Array.from(F))
|
|
1269
|
-
}), O(null),
|
|
1270
|
+
}), O(null), J(null);
|
|
1270
1271
|
}, [r, F, t]), $ = (e) => {
|
|
1271
1272
|
D(
|
|
1272
1273
|
(c) => c && (() => {
|
|
@@ -1298,7 +1299,7 @@ function Ua({
|
|
|
1298
1299
|
return (o.selectedCardIds || []).length > 0;
|
|
1299
1300
|
if (o.step !== 2 && o.step !== 3 || !o.control.label.trim())
|
|
1300
1301
|
return !1;
|
|
1301
|
-
const c = o.control.source.kind === "sql_query" ? o.control :
|
|
1302
|
+
const c = o.control.source.kind === "sql_query" ? o.control : Pe(o.control);
|
|
1302
1303
|
if (c.source.kind === "manual" && (It(c) && c.source.options.length === 0 || c.source.options.some(
|
|
1303
1304
|
(g) => g.label.trim().length === 0 || g.value.trim().length === 0
|
|
1304
1305
|
)))
|
|
@@ -1314,7 +1315,7 @@ function Ua({
|
|
|
1314
1315
|
var S;
|
|
1315
1316
|
if (!o)
|
|
1316
1317
|
return;
|
|
1317
|
-
const e =
|
|
1318
|
+
const e = Pe(o.control), c = Lt({
|
|
1318
1319
|
label: e.label,
|
|
1319
1320
|
fallbackId: e.id,
|
|
1320
1321
|
existingControls: r,
|
|
@@ -1338,9 +1339,9 @@ function Ua({
|
|
|
1338
1339
|
selectedCardIds: o.selectedCardIds,
|
|
1339
1340
|
cardBindingsById: g
|
|
1340
1341
|
});
|
|
1341
|
-
}, xe =
|
|
1342
|
+
}, xe = B(() => {
|
|
1342
1343
|
D(null);
|
|
1343
|
-
}, []), ze =
|
|
1344
|
+
}, []), ze = B(() => {
|
|
1344
1345
|
if (!(o != null && o.createdControlId)) {
|
|
1345
1346
|
D(null);
|
|
1346
1347
|
return;
|
|
@@ -1381,10 +1382,10 @@ function Ua({
|
|
|
1381
1382
|
}
|
|
1382
1383
|
);
|
|
1383
1384
|
O(c), D(null), N == null || N();
|
|
1384
|
-
}, [r, o, s, E, N]), gt = o ? L(o.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ue = o != null && o.createdControlId ? `[[param.${o.createdControlId}]]` : o ? `[[param.${Vt(o.control.label) || o.control.id}]]` : "", Ce =
|
|
1385
|
+
}, [r, o, s, E, N]), gt = o ? L(o.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ue = o != null && o.createdControlId ? `[[param.${o.createdControlId}]]` : o ? `[[param.${Vt(o.control.label) || o.control.id}]]` : "", Ce = He({
|
|
1385
1386
|
controls: r,
|
|
1386
1387
|
defaultValues: s
|
|
1387
|
-
}), ke = o ? [...r, o.control] : r,
|
|
1388
|
+
}), ke = o ? [...r, o.control] : r, Be = o ? He({
|
|
1388
1389
|
controls: ke,
|
|
1389
1390
|
defaultValues: s,
|
|
1390
1391
|
overrides: [
|
|
@@ -1414,9 +1415,9 @@ function Ua({
|
|
|
1414
1415
|
// keeping the shared definitions for existing controls.
|
|
1415
1416
|
"date",
|
|
1416
1417
|
"text"
|
|
1417
|
-
]), i =
|
|
1418
|
+
]), i = X.filter(
|
|
1418
1419
|
(S) => !e.has(S.value) && !c.has(S.value)
|
|
1419
|
-
), g =
|
|
1420
|
+
), g = X.filter(
|
|
1420
1421
|
(S) => e.has(S.value)
|
|
1421
1422
|
), C = (S) => /* @__PURE__ */ m(
|
|
1422
1423
|
"button",
|
|
@@ -1487,7 +1488,7 @@ function Ua({
|
|
|
1487
1488
|
className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
|
|
1488
1489
|
children: [
|
|
1489
1490
|
/* @__PURE__ */ a(
|
|
1490
|
-
|
|
1491
|
+
Xt,
|
|
1491
1492
|
{
|
|
1492
1493
|
checked: c,
|
|
1493
1494
|
onCheckedChange: (i) => D(
|
|
@@ -1550,14 +1551,14 @@ function Ua({
|
|
|
1550
1551
|
)
|
|
1551
1552
|
] }),
|
|
1552
1553
|
o.step === 2 && !L(o.control.type) && /* @__PURE__ */ a(
|
|
1553
|
-
|
|
1554
|
+
Je,
|
|
1554
1555
|
{
|
|
1555
1556
|
control: o.control,
|
|
1556
1557
|
defaultValue: o.defaultValue,
|
|
1557
1558
|
availableFieldChoices: Y.fields,
|
|
1558
1559
|
availableMetricChoices: Y.metrics,
|
|
1559
1560
|
previewControlDefinitions: ke,
|
|
1560
|
-
previewControlValues:
|
|
1561
|
+
previewControlValues: Be,
|
|
1561
1562
|
onControlChange: (e) => $(() => e),
|
|
1562
1563
|
onLabelChange: (e) => $((c) => ({
|
|
1563
1564
|
...c,
|
|
@@ -1575,14 +1576,14 @@ function Ua({
|
|
|
1575
1576
|
}
|
|
1576
1577
|
),
|
|
1577
1578
|
o.step === 3 && L(o.control.type) && /* @__PURE__ */ a(
|
|
1578
|
-
|
|
1579
|
+
Je,
|
|
1579
1580
|
{
|
|
1580
1581
|
control: o.control,
|
|
1581
1582
|
defaultValue: o.defaultValue,
|
|
1582
1583
|
availableFieldChoices: Y.fields,
|
|
1583
1584
|
availableMetricChoices: Y.metrics,
|
|
1584
1585
|
previewControlDefinitions: ke,
|
|
1585
|
-
previewControlValues:
|
|
1586
|
+
previewControlValues: Be,
|
|
1586
1587
|
onControlChange: (e) => $(() => e),
|
|
1587
1588
|
onLabelChange: (e) => $((c) => ({
|
|
1588
1589
|
...c,
|
|
@@ -1669,7 +1670,7 @@ function Ua({
|
|
|
1669
1670
|
(y) => y === e.id ? null : e.id
|
|
1670
1671
|
),
|
|
1671
1672
|
children: [
|
|
1672
|
-
C ? /* @__PURE__ */ a(
|
|
1673
|
+
C ? /* @__PURE__ */ a(je, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ a(Ye, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1673
1674
|
/* @__PURE__ */ m("div", { className: "min-w-0", children: [
|
|
1674
1675
|
/* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1675
1676
|
/* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
|
|
@@ -1767,7 +1768,7 @@ function Ua({
|
|
|
1767
1768
|
ea,
|
|
1768
1769
|
{
|
|
1769
1770
|
type: e.type,
|
|
1770
|
-
participants:
|
|
1771
|
+
participants: $e(
|
|
1771
1772
|
b || [],
|
|
1772
1773
|
e.type
|
|
1773
1774
|
).map((y) => ({
|
|
@@ -1828,7 +1829,7 @@ function Ua({
|
|
|
1828
1829
|
ta,
|
|
1829
1830
|
{
|
|
1830
1831
|
open: ee === e.id,
|
|
1831
|
-
onOpenChange: (y) =>
|
|
1832
|
+
onOpenChange: (y) => J(y ? e.id : null),
|
|
1832
1833
|
children: [
|
|
1833
1834
|
/* @__PURE__ */ a(aa, { asChild: !0, children: /* @__PURE__ */ m(
|
|
1834
1835
|
q,
|
|
@@ -1838,7 +1839,7 @@ function Ua({
|
|
|
1838
1839
|
size: "xs",
|
|
1839
1840
|
className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
|
|
1840
1841
|
children: [
|
|
1841
|
-
ee === e.id ? /* @__PURE__ */ a(
|
|
1842
|
+
ee === e.id ? /* @__PURE__ */ a(je, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Ye, { className: "h-3.5 w-3.5" }),
|
|
1842
1843
|
"Advanced"
|
|
1843
1844
|
]
|
|
1844
1845
|
}
|
|
@@ -1921,18 +1922,18 @@ function Ra(t) {
|
|
|
1921
1922
|
dismissMode: l = "passive"
|
|
1922
1923
|
} = t, d = r !== void 0, [p, f] = K(!1), [u, v] = K(
|
|
1923
1924
|
s
|
|
1924
|
-
), b = d ? r : p, h =
|
|
1925
|
+
), b = d ? r : p, h = B(
|
|
1925
1926
|
(k) => {
|
|
1926
1927
|
!k && u && l === "passive" || (d || f(k), k || v(!1), n == null || n(k));
|
|
1927
1928
|
},
|
|
1928
1929
|
[d, u, l, n]
|
|
1929
|
-
), x =
|
|
1930
|
+
), x = B(() => {
|
|
1930
1931
|
d || f(!1), v(!1), n == null || n(!1);
|
|
1931
1932
|
}, [d, n]);
|
|
1932
1933
|
ie(() => {
|
|
1933
1934
|
b || v(!1);
|
|
1934
1935
|
}, [b]);
|
|
1935
|
-
const w =
|
|
1936
|
+
const w = B(
|
|
1936
1937
|
(k) => {
|
|
1937
1938
|
u && k.preventDefault();
|
|
1938
1939
|
},
|
|
@@ -1948,21 +1949,21 @@ function Ra(t) {
|
|
|
1948
1949
|
};
|
|
1949
1950
|
}
|
|
1950
1951
|
export {
|
|
1951
|
-
|
|
1952
|
-
|
|
1952
|
+
Ba as C,
|
|
1953
|
+
qa as E,
|
|
1953
1954
|
da as L,
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1955
|
+
Va as R,
|
|
1956
|
+
Ta as S,
|
|
1957
|
+
Aa as V,
|
|
1958
|
+
za as a,
|
|
1959
|
+
Ma as b,
|
|
1960
|
+
Oa as c,
|
|
1960
1961
|
ca as d,
|
|
1961
1962
|
Ra as e,
|
|
1962
|
-
|
|
1963
|
+
La as f,
|
|
1963
1964
|
ft as g,
|
|
1964
1965
|
ma as h,
|
|
1965
|
-
|
|
1966
|
-
|
|
1966
|
+
Ua as i,
|
|
1967
|
+
_a as r,
|
|
1967
1968
|
qe as u
|
|
1968
1969
|
};
|