react-semaphor 0.1.372 → 0.1.373
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 +1 -1
- package/dist/chunks/{calendar-preferences-dialog-Dn6o2r2Y.js → calendar-preferences-dialog-BCO0I6Q2.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-ClBAkMmF.js → calendar-preferences-dialog-CAcqW83Q.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BO-kXtEd.js → dashboard-briefing-launcher-CxozwqgX.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D3Xfc_26.js → dashboard-briefing-launcher-DTp4KNI1.js} +104 -104
- package/dist/chunks/{dashboard-controls-B3sdy_Zx.js → dashboard-controls-Bc4E4Cky.js} +167 -167
- package/dist/chunks/{dashboard-controls-DcXMFgGR.js → dashboard-controls-Dkct7mpD.js} +1 -1
- package/dist/chunks/{dashboard-json-CFURS_OR.js → dashboard-json-BFB5jFmm.js} +1 -1
- package/dist/chunks/{dashboard-json-BWfkEy48.js → dashboard-json-BmCwILfI.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BD2AJLiT.js → edit-dashboard-visual-BBlY9tKB.js} +37 -37
- package/dist/chunks/{edit-dashboard-visual-DjdhKiP2.js → edit-dashboard-visual-BXLuXKFc.js} +6592 -6565
- package/dist/chunks/{index-C0Qnfr_7.js → index-Clqr43Sr.js} +36742 -34869
- package/dist/chunks/index-D5Pp-5LR.js +1361 -0
- package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-BbkbAlPo.js} +1 -1
- package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-DJUr47Bb.js} +51 -51
- package/dist/chunks/{use-create-flow-overlay-state-CwIG1Ekp.js → use-create-flow-overlay-state-B4EAcL2v.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BETXykC9.js → use-create-flow-overlay-state-DZI7VYBs.js} +35 -35
- package/dist/chunks/{use-visual-utils-Bk135OgA.js → use-visual-utils-Bl3ltNL9.js} +12 -12
- package/dist/chunks/{use-visual-utils-BzFjIykb.js → use-visual-utils-djsPEgF1.js} +1 -1
- package/dist/chunks/{validation-D4Zz6WPD.js → validation-1V7bWmYw.js} +1 -1
- package/dist/chunks/{validation-CQFpcSSP.js → validation-DlrTIf1N.js} +1 -1
- package/dist/chunks/{validators-CuKnUZFO.js → validators-CtNmgsvG.js} +409 -314
- package/dist/chunks/validators-jpoYhpHh.js +1 -0
- 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 +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +32 -32
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +127 -126
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +102 -11
- package/dist/types/dashboard-assistant.d.ts +117 -103
- package/dist/types/dashboard-authoring.d.ts +63 -2
- package/dist/types/dashboard.d.ts +263 -2
- package/dist/types/data-app-builder.d.ts +40 -1
- package/dist/types/data-app-sdk-validation.d.ts +94 -102
- package/dist/types/data-app-sdk.d.ts +106 -11
- package/dist/types/main.d.ts +473 -2
- package/dist/types/shared.d.ts +263 -2
- package/dist/types/surfboard.d.ts +263 -2
- package/dist/types/types.d.ts +529 -2
- package/package.json +1 -1
- package/dist/chunks/index-DlLvzmJF.js +0 -1361
- package/dist/chunks/validators-DHee9kM2.js +0 -1
package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-BbkbAlPo.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./switch-fIkmwzUt.js"),x=require("react"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./switch-fIkmwzUt.js"),x=require("react"),t=require("./index-D5Pp-5LR.js");require("./index-BxM99sFL.js");const oe=require("./use-visual-utils-djsPEgF1.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-DJUr47Bb.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { c as _e, u as se, G as ke, a as
|
|
2
|
+
import { c as _e, u as se, G as ke, a as X, B as O, f as te, M as be, Q as Ge, L as ie, a1 as de, X as Ye, Y as qe, Z as Qe, _ as We, a0 as Xe, ay as Ze } from "./switch-Dkx2qEOr.js";
|
|
3
3
|
import $e, { useState as b, useEffect as ee, useRef as Je } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { ah as ue, b7 as et, b8 as tt, ay as ce, b9 as nt, ba as at, bb as st, bc as it, bd as W, aD as ot, be as rt, bf as lt, bg as xe, aY as he, bh as dt, bi as ct, bj as we, bk as Ne, bl as ut, H as ye, z as Ce, bm as ve, ao as Se, ar as Ee, as as Ve, at as Le, au as Ae, av as Oe, aw as Te, ax as Re, bn as ht, bo as pe, bp as pt, x as ae, u as mt, bq as Ue, b as Ie, c as Me, d as ze, e as Pe, f as je, br as ft, n as Fe, bs as gt, aI as De, aB as xt } from "./index-Clqr43Sr.js";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
|
-
import { u as Be } from "./use-visual-utils-
|
|
6
|
+
import { u as Be } from "./use-visual-utils-Bl3ltNL9.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
@@ -19,7 +19,7 @@ const Dt = _e("FolderOpen", [
|
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
]);
|
|
22
|
-
function
|
|
22
|
+
function Ke() {
|
|
23
23
|
return /* @__PURE__ */ e("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((t, f) => /* @__PURE__ */ n(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
@@ -70,7 +70,7 @@ function wt({
|
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
72
|
ref: N,
|
|
73
|
-
className:
|
|
73
|
+
className: X(
|
|
74
74
|
"group flex cursor-pointer items-start gap-1 rounded-[5px] px-2 py-1.5 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",
|
|
75
75
|
p ? "bg-muted ring-1 ring-inset ring-foreground/20" : c && "bg-muted"
|
|
76
76
|
),
|
|
@@ -106,7 +106,7 @@ function wt({
|
|
|
106
106
|
/* @__PURE__ */ e(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
className:
|
|
109
|
+
className: X(
|
|
110
110
|
"flex shrink-0 items-center transition-opacity",
|
|
111
111
|
c || p || S ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100"
|
|
112
112
|
),
|
|
@@ -153,7 +153,7 @@ function wt({
|
|
|
153
153
|
className: "z-[51] w-44 rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
154
154
|
children: [
|
|
155
155
|
/* @__PURE__ */ n(
|
|
156
|
-
|
|
156
|
+
W,
|
|
157
157
|
{
|
|
158
158
|
onClick: (d) => {
|
|
159
159
|
d.stopPropagation(), r(t);
|
|
@@ -166,7 +166,7 @@ function wt({
|
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
/* @__PURE__ */ n(
|
|
169
|
-
|
|
169
|
+
W,
|
|
170
170
|
{
|
|
171
171
|
onClick: (d) => {
|
|
172
172
|
d.stopPropagation(), o == null || o(t);
|
|
@@ -178,7 +178,7 @@ function wt({
|
|
|
178
178
|
}
|
|
179
179
|
),
|
|
180
180
|
/* @__PURE__ */ n(
|
|
181
|
-
|
|
181
|
+
W,
|
|
182
182
|
{
|
|
183
183
|
onClick: (d) => {
|
|
184
184
|
d.preventDefault(), d.stopPropagation(), i(t.id);
|
|
@@ -192,7 +192,7 @@ function wt({
|
|
|
192
192
|
),
|
|
193
193
|
t.ownership.isOwner && /* @__PURE__ */ n(oe, { children: [
|
|
194
194
|
/* @__PURE__ */ n(
|
|
195
|
-
|
|
195
|
+
W,
|
|
196
196
|
{
|
|
197
197
|
onClick: (d) => {
|
|
198
198
|
d.stopPropagation(), h == null || h(t);
|
|
@@ -204,7 +204,7 @@ function wt({
|
|
|
204
204
|
}
|
|
205
205
|
),
|
|
206
206
|
/* @__PURE__ */ n(
|
|
207
|
-
|
|
207
|
+
W,
|
|
208
208
|
{
|
|
209
209
|
onClick: (d) => {
|
|
210
210
|
d.stopPropagation(), D(t);
|
|
@@ -217,7 +217,7 @@ function wt({
|
|
|
217
217
|
),
|
|
218
218
|
/* @__PURE__ */ e(xe, {}),
|
|
219
219
|
/* @__PURE__ */ n(
|
|
220
|
-
|
|
220
|
+
W,
|
|
221
221
|
{
|
|
222
222
|
onClick: (d) => {
|
|
223
223
|
d.stopPropagation(), x(t);
|
|
@@ -296,8 +296,8 @@ function Nt({ searchQuery: t }) {
|
|
|
296
296
|
(ne = u == null ? void 0 : u.onSuccess) == null || ne.call(u);
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
|
-
const y = Object.keys(F),
|
|
300
|
-
d(s,
|
|
299
|
+
const y = Object.keys(F), H = y.length === 1 ? y[0] : void 0;
|
|
300
|
+
d(s, H), V(
|
|
301
301
|
{
|
|
302
302
|
resourceId: s,
|
|
303
303
|
data: F
|
|
@@ -305,23 +305,23 @@ function Nt({ searchQuery: t }) {
|
|
|
305
305
|
{
|
|
306
306
|
onSuccess: () => {
|
|
307
307
|
var z;
|
|
308
|
-
G(s,
|
|
308
|
+
G(s, H), (z = u == null ? void 0 : u.onSuccess) == null || z.call(u);
|
|
309
309
|
},
|
|
310
310
|
onError: () => {
|
|
311
311
|
var z;
|
|
312
|
-
G(s,
|
|
312
|
+
G(s, H), (z = u == null ? void 0 : u.onError) == null || z.call(u);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
|
-
},
|
|
316
|
+
}, Y = (s) => {
|
|
317
317
|
l(s), C(s, {
|
|
318
318
|
onSettled: () => l(null)
|
|
319
319
|
});
|
|
320
|
-
},
|
|
320
|
+
}, K = (s) => {
|
|
321
321
|
A(s);
|
|
322
|
-
},
|
|
322
|
+
}, q = (s) => {
|
|
323
323
|
U(s);
|
|
324
|
-
},
|
|
324
|
+
}, Q = (s) => {
|
|
325
325
|
o(s), m(!0);
|
|
326
326
|
}, Z = (s) => {
|
|
327
327
|
p(s);
|
|
@@ -340,7 +340,7 @@ function Nt({ searchQuery: t }) {
|
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
342
|
};
|
|
343
|
-
return S ? /* @__PURE__ */ e(
|
|
343
|
+
return S ? /* @__PURE__ */ e(Ke, {}) : E ? /* @__PURE__ */ e(be, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
|
|
344
344
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "Failed to load visuals" }),
|
|
345
345
|
/* @__PURE__ */ e(
|
|
346
346
|
O,
|
|
@@ -360,12 +360,12 @@ function Nt({ searchQuery: t }) {
|
|
|
360
360
|
wt,
|
|
361
361
|
{
|
|
362
362
|
visual: s,
|
|
363
|
-
onAddVisual:
|
|
364
|
-
onOpenVisual:
|
|
363
|
+
onAddVisual: q,
|
|
364
|
+
onOpenVisual: K,
|
|
365
365
|
onEditDetails: Z,
|
|
366
366
|
onDeleteClick: P,
|
|
367
|
-
onDuplicateVisual:
|
|
368
|
-
onShareVisual:
|
|
367
|
+
onDuplicateVisual: Y,
|
|
368
|
+
onShareVisual: Q,
|
|
369
369
|
isDeleting: v,
|
|
370
370
|
isDuplicating: w === s.id,
|
|
371
371
|
formatDate: I
|
|
@@ -452,7 +452,7 @@ function yt({
|
|
|
452
452
|
return /* @__PURE__ */ n(
|
|
453
453
|
"div",
|
|
454
454
|
{
|
|
455
|
-
className:
|
|
455
|
+
className: X(
|
|
456
456
|
"group flex cursor-pointer items-start gap-1 rounded-[5px] px-2 py-1.5 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",
|
|
457
457
|
c && "bg-muted"
|
|
458
458
|
),
|
|
@@ -488,7 +488,7 @@ function yt({
|
|
|
488
488
|
/* @__PURE__ */ e(
|
|
489
489
|
"div",
|
|
490
490
|
{
|
|
491
|
-
className:
|
|
491
|
+
className: X(
|
|
492
492
|
"shrink-0 transition-opacity",
|
|
493
493
|
c ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
|
|
494
494
|
),
|
|
@@ -542,12 +542,12 @@ function vt(t) {
|
|
|
542
542
|
l(!1);
|
|
543
543
|
const a = c == null ? void 0 : c.id;
|
|
544
544
|
p(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !M ? C() : E && E.id !== a && T(E));
|
|
545
|
-
}), { userContext:
|
|
545
|
+
}), { userContext: Y } = pe(), K = ((me = Y == null ? void 0 : Y.permissions) == null ? void 0 : me.canCreateDashboard) ?? !1, q = I.filter(
|
|
546
546
|
(a) => {
|
|
547
547
|
var _, g;
|
|
548
548
|
return ((_ = a == null ? void 0 : a.title) == null ? void 0 : _.toLowerCase().includes(f.toLowerCase())) || ((g = a == null ? void 0 : a.description) == null ? void 0 : g.toLowerCase().includes(f.toLowerCase()));
|
|
549
549
|
}
|
|
550
|
-
),
|
|
550
|
+
), Q = (a) => new Date(a).toLocaleDateString("en-US", {
|
|
551
551
|
month: "short",
|
|
552
552
|
day: "numeric",
|
|
553
553
|
year: "numeric"
|
|
@@ -591,13 +591,13 @@ function vt(t) {
|
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
|
-
},
|
|
594
|
+
}, H = (a) => {
|
|
595
595
|
D(a), x(!0);
|
|
596
596
|
}, ne = (a) => {
|
|
597
597
|
r == null || r(a.id), S(a);
|
|
598
598
|
}, z = () => {
|
|
599
599
|
S(null);
|
|
600
|
-
},
|
|
600
|
+
}, He = ({
|
|
601
601
|
title: a,
|
|
602
602
|
description: _
|
|
603
603
|
}) => {
|
|
@@ -610,12 +610,12 @@ function vt(t) {
|
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
612
|
};
|
|
613
|
-
return P ? /* @__PURE__ */ e(
|
|
614
|
-
/* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children:
|
|
613
|
+
return P ? /* @__PURE__ */ e(Ke, {}) : j ? /* @__PURE__ */ e(Ct, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
|
|
614
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: q.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
|
|
615
615
|
/* @__PURE__ */ e(Ge, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
616
616
|
/* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: f ? "No dashboards found" : "No dashboards yet" }),
|
|
617
|
-
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: f ? "Try adjusting your search." :
|
|
618
|
-
] }) :
|
|
617
|
+
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: f ? "Try adjusting your search." : K ? 'Click "New" above to add your first dashboard.' : "No dashboards have been shared with you yet." })
|
|
618
|
+
] }) : q.map((a) => /* @__PURE__ */ e(
|
|
619
619
|
yt,
|
|
620
620
|
{
|
|
621
621
|
dashboard: a,
|
|
@@ -625,8 +625,8 @@ function vt(t) {
|
|
|
625
625
|
onEditDetails: ne,
|
|
626
626
|
onDeleteClick: $,
|
|
627
627
|
onDuplicateDashboard: s,
|
|
628
|
-
onShareDashboard:
|
|
629
|
-
formatDate:
|
|
628
|
+
onShareDashboard: H,
|
|
629
|
+
formatDate: Q,
|
|
630
630
|
onDashboardItemClick: o
|
|
631
631
|
},
|
|
632
632
|
a.id
|
|
@@ -684,7 +684,7 @@ function vt(t) {
|
|
|
684
684
|
initialTitle: N.title || "",
|
|
685
685
|
initialDescription: N.description || "",
|
|
686
686
|
onClose: z,
|
|
687
|
-
onSave:
|
|
687
|
+
onSave: He,
|
|
688
688
|
isSaving: F(N.id)
|
|
689
689
|
}
|
|
690
690
|
)
|
|
@@ -881,11 +881,11 @@ function It({
|
|
|
881
881
|
(y) => {
|
|
882
882
|
i(!1), y && (S(y), E(y));
|
|
883
883
|
}
|
|
884
|
-
), I = o === "overlay", P = h ? "New Visual" : "New", j = h ? "New Visual" : "New Dashboard", d = h ? "Search visuals..." : "Search dashboards...", G = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((p == null ? void 0 : p.name) ?? "").trim(), L = ((p == null ? void 0 : p.email) ?? "").trim(),
|
|
884
|
+
), I = o === "overlay", P = h ? "New Visual" : "New", j = h ? "New Visual" : "New Dashboard", d = h ? "Search visuals..." : "Search dashboards...", G = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((p == null ? void 0 : p.name) ?? "").trim(), L = ((p == null ? void 0 : p.email) ?? "").trim(), K = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", q = ((F = K.charAt(0)) == null ? void 0 : F.toUpperCase()) || "?", Q = L && L.toLowerCase() !== "undefined" ? L : "", Z = St(f, {
|
|
885
885
|
enabled: t && I
|
|
886
|
-
}), $ =
|
|
886
|
+
}), $ = X(
|
|
887
887
|
"flex h-full flex-col border-r border-border/60 bg-background",
|
|
888
|
-
I ?
|
|
888
|
+
I ? X(
|
|
889
889
|
"absolute inset-y-0 left-0 z-[51] w-60 overflow-hidden shadow-lg transition-transform duration-300 ease-in-out",
|
|
890
890
|
t ? "translate-x-0" : "pointer-events-none -translate-x-full"
|
|
891
891
|
) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden",
|
|
@@ -895,8 +895,8 @@ function It({
|
|
|
895
895
|
console.log("Editing dashboard:", y);
|
|
896
896
|
}, R = (y) => {
|
|
897
897
|
V(y, {
|
|
898
|
-
onSuccess: (
|
|
899
|
-
i(!1), N(
|
|
898
|
+
onSuccess: (H) => {
|
|
899
|
+
i(!1), N(H, C);
|
|
900
900
|
}
|
|
901
901
|
});
|
|
902
902
|
};
|
|
@@ -927,7 +927,7 @@ function It({
|
|
|
927
927
|
w(""), c(!1);
|
|
928
928
|
},
|
|
929
929
|
"aria-label": "Close search",
|
|
930
|
-
children: /* @__PURE__ */ e(
|
|
930
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
|
|
931
931
|
}
|
|
932
932
|
)
|
|
933
933
|
] }) : /* @__PURE__ */ n("div", { className: "flex h-10 items-center justify-between gap-2 px-3", children: [
|
|
@@ -979,14 +979,14 @@ function It({
|
|
|
979
979
|
onDashboardItemClick: r
|
|
980
980
|
}
|
|
981
981
|
) }),
|
|
982
|
-
p && /* @__PURE__ */ e(
|
|
983
|
-
/* @__PURE__ */ e(
|
|
984
|
-
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground", children:
|
|
985
|
-
/* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children:
|
|
982
|
+
p && /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(Qe, { children: [
|
|
983
|
+
/* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
|
|
984
|
+
/* @__PURE__ */ e("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground", children: q }),
|
|
985
|
+
/* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children: K })
|
|
986
986
|
] }) }),
|
|
987
|
-
/* @__PURE__ */ e(
|
|
988
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
989
|
-
|
|
987
|
+
/* @__PURE__ */ e(Xe, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
988
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: K }),
|
|
989
|
+
Q && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: Q }),
|
|
990
990
|
p.role && /* @__PURE__ */ n("div", { className: "text-[11px] opacity-80", children: [
|
|
991
991
|
"Role:",
|
|
992
992
|
" ",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./switch-fIkmwzUt.js"),v=require("react"),p=require("./index-
|
|
1
|
+
"use strict";const s=require("./switch-fIkmwzUt.js"),v=require("react"),p=require("./index-D5Pp-5LR.js"),e=require("react/jsx-runtime");require("./index-BxM99sFL.js");const re=require("./use-visual-utils-djsPEgF1.js"),he=require("./save-D3YYinDz.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as te, G as L, H as ne, u as oe, Y as ft, Z as ht, _ as bt, a as ie, a0 as gt, a8 as yt, B as V, e as xt, X as He, E as
|
|
1
|
+
import { c as te, G as L, H as ne, u as oe, Y as ft, Z as ht, _ as bt, a as ie, a0 as gt, a8 as yt, B as V, e as xt, X as He, E as Ye, f as Ke, a9 as vt, aa as Ct, ab as se, ac as Ae, ad as ze, ae as ge, af as ye, ag as kt, ah as Me, ai as Nt, aj as St, ak as le, al as Dt, am as Oe, g as Be, an as Ge, ao as Xe, ap as Ze, L as Y, a1 as Je, a2 as xe, a3 as ve, a4 as Ce, a5 as ke, a6 as Ne, aq as We, ar as wt, as as It, at as Re, au as Tt, av as Qe, aw as Et, ax as Se } from "./switch-Dkx2qEOr.js";
|
|
2
2
|
import { useEffect as de, useMemo as z, useState as Q, useRef as De, useCallback as O, Fragment as Vt } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { aL as _t, aM as et, aN as qt, aO as Ft, aP as Lt, aQ as At, aR as zt, x as Mt, aS as Ot, ae as ue, aT as tt, ag as at, aU as rt, aV as Bt, o as R, aW as Rt, aX as Qt, aG as je, aY as jt, aZ as Ut, a_ as st, a$ as lt, b0 as Pt, b1 as $t, b2 as Ht, b3 as Yt, b4 as Kt, ay as Gt, b5 as Xt, b6 as Zt } from "./index-Clqr43Sr.js";
|
|
4
4
|
import { jsx as t, jsxs as d, Fragment as $ } from "react/jsx-runtime";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
|
-
import { u as we } from "./use-visual-utils-
|
|
6
|
+
import { u as we } from "./use-visual-utils-Bl3ltNL9.js";
|
|
7
7
|
import { S as nt } from "./save-kkBEBeLg.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -253,7 +253,7 @@ function ya({
|
|
|
253
253
|
}) {
|
|
254
254
|
const o = ue(), [i, p] = Q(!1), u = oe(
|
|
255
255
|
(x) => x.actions.setIsDashboardPanelOpen
|
|
256
|
-
), { setIsVisualEditing: h } =
|
|
256
|
+
), { setIsVisualEditing: h } = Ye(), { getUpdatedFrame: y } = we(), b = at(), v = L((x) => x.frame), g = rt();
|
|
257
257
|
return /* @__PURE__ */ t(
|
|
258
258
|
V,
|
|
259
259
|
{
|
|
@@ -290,7 +290,7 @@ function ya({
|
|
|
290
290
|
size: "xs",
|
|
291
291
|
variant: r,
|
|
292
292
|
children: i ? /* @__PURE__ */ d($, { children: [
|
|
293
|
-
/* @__PURE__ */ t(
|
|
293
|
+
/* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
294
294
|
"Saving"
|
|
295
295
|
] }) : /* @__PURE__ */ d($, { children: [
|
|
296
296
|
/* @__PURE__ */ t(nt, { className: "h-3.5 w-3.5" }),
|
|
@@ -302,7 +302,7 @@ function ya({
|
|
|
302
302
|
function xa({
|
|
303
303
|
className: s
|
|
304
304
|
}) {
|
|
305
|
-
const r = ue(), [o, i] = Q(!1), p = at(), u = L((N) => N.frame), h = oe((N) => N.selectedSheetId), y = oe((N) => N.dashboard), { updateFrame: b, setIsVisualEditing: v } =
|
|
305
|
+
const r = ue(), [o, i] = Q(!1), p = at(), u = L((N) => N.frame), h = oe((N) => N.selectedSheetId), y = oe((N) => N.dashboard), { updateFrame: b, setIsVisualEditing: v } = Ye(), { getUpdatedFrame: g } = we(), m = rt(), x = Bt();
|
|
306
306
|
return /* @__PURE__ */ t(
|
|
307
307
|
V,
|
|
308
308
|
{
|
|
@@ -327,8 +327,8 @@ function xa({
|
|
|
327
327
|
...D,
|
|
328
328
|
visualId: N
|
|
329
329
|
// Keep the link to library visual
|
|
330
|
-
},
|
|
331
|
-
previousFrame:
|
|
330
|
+
}, K = Rt(y, q.id), G = await x(q, {
|
|
331
|
+
previousFrame: K
|
|
332
332
|
});
|
|
333
333
|
await m.mutateAsync({
|
|
334
334
|
visualId: N,
|
|
@@ -336,7 +336,7 @@ function xa({
|
|
|
336
336
|
frameObject: D
|
|
337
337
|
}
|
|
338
338
|
}), b(h, q, {
|
|
339
|
-
semanticExecutionPayload:
|
|
339
|
+
semanticExecutionPayload: G
|
|
340
340
|
}), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", N] }), R.success("Saved to library and applied locally"), setTimeout(() => {
|
|
341
341
|
v(!1);
|
|
342
342
|
}, 300);
|
|
@@ -353,7 +353,7 @@ function xa({
|
|
|
353
353
|
variant: "default",
|
|
354
354
|
disabled: o,
|
|
355
355
|
children: o ? /* @__PURE__ */ d($, { children: [
|
|
356
|
-
/* @__PURE__ */ t(
|
|
356
|
+
/* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
357
357
|
"Saving..."
|
|
358
358
|
] }) : /* @__PURE__ */ d($, { children: [
|
|
359
359
|
/* @__PURE__ */ t(nt, { className: "h-3.5 w-3.5" }),
|
|
@@ -398,10 +398,10 @@ function Ca({
|
|
|
398
398
|
setCardPreferences: N,
|
|
399
399
|
clearQueryConfig: D,
|
|
400
400
|
setCardConfig: q,
|
|
401
|
-
setCardType:
|
|
402
|
-
setFrame:
|
|
401
|
+
setCardType: K,
|
|
402
|
+
setFrame: G,
|
|
403
403
|
setCard: ae,
|
|
404
|
-
setActiveTabCardId:
|
|
404
|
+
setActiveTabCardId: X
|
|
405
405
|
} = ne();
|
|
406
406
|
function pe() {
|
|
407
407
|
var Z, re, _, J;
|
|
@@ -411,12 +411,12 @@ function Ca({
|
|
|
411
411
|
queryData: M
|
|
412
412
|
}), p.setQueryData(v, null), p.removeQueries({ queryKey: v, exact: !0 }), g(""), m({}), D(), q(void 0), x(""), S(""), N({});
|
|
413
413
|
const a = L.getState().frame, T = L.getState().card, E = et(a, T), B = ((Z = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : Z.visualType) === "multiple" || !!((re = E == null ? void 0 : E.customCardPreferences) != null && re.dataInputCardIds) || (((_ = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : _.minInputs) || 0) > 1 || (((J = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : J.maxInputs) || 0) > 1, j = ea(T, B);
|
|
414
|
-
|
|
414
|
+
G({
|
|
415
415
|
...a,
|
|
416
416
|
cards: a.cards.map(
|
|
417
417
|
(U) => U.id === j.id ? j : U
|
|
418
418
|
)
|
|
419
|
-
}),
|
|
419
|
+
}), X(j.id), ae(j), B || K("bar");
|
|
420
420
|
}
|
|
421
421
|
return /* @__PURE__ */ d(
|
|
422
422
|
V,
|
|
@@ -435,7 +435,7 @@ function Ca({
|
|
|
435
435
|
function it(s) {
|
|
436
436
|
const { control: r, onChange: o } = s;
|
|
437
437
|
return /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
438
|
-
/* @__PURE__ */ t(
|
|
438
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
439
439
|
/* @__PURE__ */ t(
|
|
440
440
|
Je,
|
|
441
441
|
{
|
|
@@ -499,13 +499,13 @@ function aa(s) {
|
|
|
499
499
|
/* @__PURE__ */ d("div", { className: "min-w-0 space-y-0.5", children: [
|
|
500
500
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: r.label }),
|
|
501
501
|
/* @__PURE__ */ d("div", { className: "text-[12px] text-muted-foreground", children: [
|
|
502
|
-
|
|
502
|
+
Ge(r.type).label,
|
|
503
503
|
" ·",
|
|
504
504
|
" ",
|
|
505
505
|
Ze(r),
|
|
506
506
|
" ·",
|
|
507
507
|
" ",
|
|
508
|
-
|
|
508
|
+
Xe(o, r.placement)
|
|
509
509
|
] }),
|
|
510
510
|
i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
|
|
511
511
|
] })
|
|
@@ -719,7 +719,7 @@ function ka({
|
|
|
719
719
|
const q = z(
|
|
720
720
|
() => new Set(o || []),
|
|
721
721
|
[o]
|
|
722
|
-
),
|
|
722
|
+
), K = wt(s), G = Ct(s), [ae, X] = Q(
|
|
723
723
|
null
|
|
724
724
|
), [pe, M] = Q(
|
|
725
725
|
null
|
|
@@ -796,7 +796,7 @@ function ka({
|
|
|
796
796
|
j.current = h, e && (T({
|
|
797
797
|
step: 1,
|
|
798
798
|
control: se(s, r, Array.from(q))
|
|
799
|
-
}), M(null),
|
|
799
|
+
}), M(null), X(null));
|
|
800
800
|
}, [r, h, q, s]);
|
|
801
801
|
const dt = (e) => {
|
|
802
802
|
if (!_(e.type))
|
|
@@ -913,7 +913,7 @@ function ka({
|
|
|
913
913
|
}, ct = (e, n) => {
|
|
914
914
|
if (!n.trim())
|
|
915
915
|
return;
|
|
916
|
-
const l =
|
|
916
|
+
const l = Xt(n);
|
|
917
917
|
if (l === e || q.has(l) || r.some(
|
|
918
918
|
(k) => k.id === l && k.id !== e
|
|
919
919
|
))
|
|
@@ -947,7 +947,7 @@ function ka({
|
|
|
947
947
|
B.current = void 0, T({
|
|
948
948
|
step: 1,
|
|
949
949
|
control: se(s, r, Array.from(q))
|
|
950
|
-
}), M(null),
|
|
950
|
+
}), M(null), X(null);
|
|
951
951
|
}, [r, q, s]), ee = (e) => {
|
|
952
952
|
T(
|
|
953
953
|
(n) => n && (() => {
|
|
@@ -1354,8 +1354,8 @@ function ka({
|
|
|
1354
1354
|
/* @__PURE__ */ d("div", { className: "min-w-0", children: [
|
|
1355
1355
|
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1356
1356
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
|
|
1357
|
-
/* @__PURE__ */ t("span", { className: k, children:
|
|
1358
|
-
/* @__PURE__ */ t("span", { className: k, children:
|
|
1357
|
+
/* @__PURE__ */ t("span", { className: k, children: Ge(e.type).label }),
|
|
1358
|
+
/* @__PURE__ */ t("span", { className: k, children: Xe(s, e.placement) })
|
|
1359
1359
|
] }),
|
|
1360
1360
|
/* @__PURE__ */ d("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
|
|
1361
1361
|
Ze(e),
|
|
@@ -1381,7 +1381,7 @@ function ka({
|
|
|
1381
1381
|
C && /* @__PURE__ */ d("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
|
|
1382
1382
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-3", children: [
|
|
1383
1383
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1384
|
-
/* @__PURE__ */ t(
|
|
1384
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
1385
1385
|
/* @__PURE__ */ t(
|
|
1386
1386
|
Je,
|
|
1387
1387
|
{
|
|
@@ -1396,7 +1396,7 @@ function ka({
|
|
|
1396
1396
|
)
|
|
1397
1397
|
] }),
|
|
1398
1398
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1399
|
-
/* @__PURE__ */ t(
|
|
1399
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
|
|
1400
1400
|
/* @__PURE__ */ d(
|
|
1401
1401
|
xe,
|
|
1402
1402
|
{
|
|
@@ -1427,18 +1427,18 @@ function ka({
|
|
|
1427
1427
|
)
|
|
1428
1428
|
] }),
|
|
1429
1429
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1430
|
-
/* @__PURE__ */ t(
|
|
1430
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
|
|
1431
1431
|
/* @__PURE__ */ d(
|
|
1432
1432
|
xe,
|
|
1433
1433
|
{
|
|
1434
|
-
value: e.placement ||
|
|
1434
|
+
value: e.placement || G,
|
|
1435
1435
|
onValueChange: (f) => W(e.id, (w) => ({
|
|
1436
1436
|
...w,
|
|
1437
1437
|
placement: f
|
|
1438
1438
|
})),
|
|
1439
1439
|
children: [
|
|
1440
1440
|
/* @__PURE__ */ t(ve, { size: "xs", children: /* @__PURE__ */ t(Ce, {}) }),
|
|
1441
|
-
/* @__PURE__ */ t(ke, { children:
|
|
1441
|
+
/* @__PURE__ */ t(ke, { children: K.map((f) => /* @__PURE__ */ t(Ne, { value: f.value, children: f.label }, f.value)) })
|
|
1442
1442
|
]
|
|
1443
1443
|
}
|
|
1444
1444
|
)
|
|
@@ -1509,7 +1509,7 @@ function ka({
|
|
|
1509
1509
|
Pt,
|
|
1510
1510
|
{
|
|
1511
1511
|
open: ae === e.id,
|
|
1512
|
-
onOpenChange: (f) =>
|
|
1512
|
+
onOpenChange: (f) => X(f ? e.id : null),
|
|
1513
1513
|
children: [
|
|
1514
1514
|
/* @__PURE__ */ t($t, { asChild: !0, children: /* @__PURE__ */ d(
|
|
1515
1515
|
V,
|
|
@@ -1527,9 +1527,9 @@ function ka({
|
|
|
1527
1527
|
/* @__PURE__ */ d(Ht, { className: "space-y-3 pt-2", children: [
|
|
1528
1528
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
1529
1529
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1530
|
-
/* @__PURE__ */ t(
|
|
1530
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
|
|
1531
1531
|
/* @__PURE__ */ t(
|
|
1532
|
-
|
|
1532
|
+
Yt,
|
|
1533
1533
|
{
|
|
1534
1534
|
controlId: e.id,
|
|
1535
1535
|
onCommit: (f) => ct(e.id, f)
|
|
@@ -1538,7 +1538,7 @@ function ka({
|
|
|
1538
1538
|
)
|
|
1539
1539
|
] }),
|
|
1540
1540
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1541
|
-
/* @__PURE__ */ t(
|
|
1541
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
|
|
1542
1542
|
/* @__PURE__ */ d(
|
|
1543
1543
|
xe,
|
|
1544
1544
|
{
|
|
@@ -1563,7 +1563,7 @@ function ka({
|
|
|
1563
1563
|
] })
|
|
1564
1564
|
] }),
|
|
1565
1565
|
/* @__PURE__ */ t(
|
|
1566
|
-
|
|
1566
|
+
Kt,
|
|
1567
1567
|
{
|
|
1568
1568
|
control: e,
|
|
1569
1569
|
onChange: (f) => W(e.id, () => f)
|
|
@@ -1587,7 +1587,7 @@ function ka({
|
|
|
1587
1587
|
size: "xs",
|
|
1588
1588
|
onClick: pt,
|
|
1589
1589
|
children: [
|
|
1590
|
-
/* @__PURE__ */ t(
|
|
1590
|
+
/* @__PURE__ */ t(Gt, { className: "h-3.5 w-3.5" }),
|
|
1591
1591
|
"Add control"
|
|
1592
1592
|
]
|
|
1593
1593
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as X, u as Y, ae as Z, af as ee, ag as te, ah as re, ai as se, aj as ae, o as V, ak as oe } from "./index-Clqr43Sr.js";
|
|
2
2
|
import { H as ne, E as ie, u as b, G as H, I as ce } from "./switch-Dkx2qEOr.js";
|
|
3
3
|
import { useState as z, useEffect as de, useCallback as A } from "react";
|
|
4
4
|
function le(e) {
|
|
@@ -194,12 +194,12 @@ function be() {
|
|
|
194
194
|
setSelectedDatamodelId: g,
|
|
195
195
|
setFilterValues: P,
|
|
196
196
|
setInlineFilterValuesMap: j,
|
|
197
|
-
setApplyFilters:
|
|
198
|
-
clearEditorContext:
|
|
197
|
+
setApplyFilters: k,
|
|
198
|
+
clearEditorContext: D
|
|
199
199
|
} = ne(), {
|
|
200
200
|
setIsDashboardEditing: U,
|
|
201
|
-
setIsVisualEditing:
|
|
202
|
-
setSelectedFrameId:
|
|
201
|
+
setIsVisualEditing: L,
|
|
202
|
+
setSelectedFrameId: T,
|
|
203
203
|
clearSelectedFrameId: N,
|
|
204
204
|
setIsDashboardPanelOpen: W
|
|
205
205
|
} = ie(), E = b((c) => c.selectedSheetId), $ = b((c) => c.selectedFrameId), R = b((c) => c.dashboard), x = b((c) => c.filterValues), O = b(
|
|
@@ -209,7 +209,7 @@ function be() {
|
|
|
209
209
|
}), G = A(
|
|
210
210
|
async (c) => {
|
|
211
211
|
try {
|
|
212
|
-
o(c), N(),
|
|
212
|
+
o(c), N(), D();
|
|
213
213
|
const { data: u, fromCache: v } = await Q(
|
|
214
214
|
a.apiServiceUrl,
|
|
215
215
|
(e == null ? void 0 : e.accessToken) || "",
|
|
@@ -231,9 +231,9 @@ function be() {
|
|
|
231
231
|
setSelectedDatamodelId: g,
|
|
232
232
|
setFilterValues: P,
|
|
233
233
|
setInlineFilterValuesMap: j,
|
|
234
|
-
setApplyFilters:
|
|
234
|
+
setApplyFilters: k,
|
|
235
235
|
setIsDashboardEditing: U,
|
|
236
|
-
setIsVisualEditing:
|
|
236
|
+
setIsVisualEditing: L,
|
|
237
237
|
dashboard: R,
|
|
238
238
|
selectedSheetId: E,
|
|
239
239
|
selectedFrameId: $,
|
|
@@ -254,7 +254,7 @@ function be() {
|
|
|
254
254
|
l,
|
|
255
255
|
n,
|
|
256
256
|
U,
|
|
257
|
-
|
|
257
|
+
L,
|
|
258
258
|
i,
|
|
259
259
|
f,
|
|
260
260
|
h,
|
|
@@ -267,8 +267,8 @@ function be() {
|
|
|
267
267
|
g,
|
|
268
268
|
P,
|
|
269
269
|
j,
|
|
270
|
+
k,
|
|
270
271
|
D,
|
|
271
|
-
L,
|
|
272
272
|
N,
|
|
273
273
|
R,
|
|
274
274
|
E,
|
|
@@ -303,7 +303,7 @@ function be() {
|
|
|
303
303
|
E,
|
|
304
304
|
B,
|
|
305
305
|
"end"
|
|
306
|
-
), U(!0),
|
|
306
|
+
), U(!0), T(B.id), W(!1), { success: !0, fromCache: K };
|
|
307
307
|
} catch (d) {
|
|
308
308
|
return console.error("Error adding visual:", d), u(
|
|
309
309
|
d instanceof Error ? d.message : "Failed to add visual to dashboard"
|
|
@@ -317,7 +317,7 @@ function be() {
|
|
|
317
317
|
o,
|
|
318
318
|
E,
|
|
319
319
|
U,
|
|
320
|
-
|
|
320
|
+
T,
|
|
321
321
|
W,
|
|
322
322
|
r
|
|
323
323
|
]
|