react-semaphor 0.1.315 → 0.1.316
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/brand-studio/index.js +65 -65
- package/dist/briefings/index.cjs +1 -0
- package/dist/briefings/index.js +848 -0
- package/dist/chunks/{braces-CWi8x9ww.js → braces-CDPz6CF2.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-B3JYKgek.js → calendar-preferences-dialog-9NlFzHX8.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-aODuCeYE.js → calendar-preferences-dialog-BDdxi7Xm.js} +1 -1
- package/dist/chunks/{chevrons-up-down-B2viXO2I.js → chevrons-up-down-BsdQRmJL.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-5fM_KJoT.js +7321 -0
- package/dist/chunks/dashboard-briefing-launcher-CVxLt10p.js +96 -0
- package/dist/chunks/dashboard-controls-9YV-D1tD.js +2009 -0
- package/dist/chunks/dashboard-controls-UR_m0wD1.js +57 -0
- package/dist/chunks/{dashboard-json-zKDTezgS.js → dashboard-json-CKPID8Am.js} +2 -2
- package/dist/chunks/{dashboard-json-Duea3KSa.js → dashboard-json-ws4tortP.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-CmxnZI8I.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-MZCJaPiq.js → edit-dashboard-visual-ifKJLMTS.js} +807 -822
- package/dist/chunks/index-Xdag_85e.js +1298 -0
- package/dist/chunks/{index-CjRLHvSp.js → index-gcA9Rs35.js} +41203 -46487
- package/dist/chunks/{palette-CIuwlEiG.js → palette-BlxLchHy.js} +1 -1
- package/dist/chunks/{resource-management-panel-CM3Zsk9H.js → resource-management-panel-BduJanWW.js} +1 -1
- package/dist/chunks/{resource-management-panel-S0LXyguo.js → resource-management-panel-paSAzVj2.js} +81 -81
- package/dist/chunks/{save-_ALpoMy6.js → save-DVRQBMeb.js} +1 -1
- package/dist/chunks/{switch-B6fh8nb-.js → switch-sauemjyY.js} +199 -199
- package/dist/chunks/{use-create-flow-overlay-state-Cp7PYD-t.js → use-create-flow-overlay-state-DKV6tIc5.js} +254 -225
- package/dist/chunks/use-create-flow-overlay-state-DWnzVVlP.js +26 -0
- package/dist/chunks/{use-visual-utils-DDd0pAJ_.js → use-visual-utils-C8PDxg2w.js} +1 -1
- package/dist/chunks/{use-visual-utils-D9DsvP1v.js → use-visual-utils-Cs0-baCK.js} +48 -48
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +232 -485
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings.d.ts +240 -0
- package/dist/types/dashboard.d.ts +1 -0
- package/dist/types/main.d.ts +619 -1017
- package/dist/types/surfboard.d.ts +1 -0
- package/dist/types/types.d.ts +411 -261
- package/package.json +7 -2
- package/dist/chunks/dashboard-controls-CSunAZVx.js +0 -57
- package/dist/chunks/dashboard-controls-jvJF-AJC.js +0 -2021
- package/dist/chunks/dashboard-filter-controls-launcher-B0i9xSZZ.js +0 -11
- package/dist/chunks/dashboard-filter-controls-launcher-DG6yRPmx.js +0 -1540
- package/dist/chunks/edit-dashboard-visual-QjRIAadP.js +0 -183
- package/dist/chunks/index-B7C8qBWC.js +0 -1330
- package/dist/chunks/use-create-flow-overlay-state-CqTBDwBF.js +0 -16
package/dist/chunks/{resource-management-panel-CM3Zsk9H.js → resource-management-panel-BduJanWW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./switch-DPaKnsb8.js"),x=require("react"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./switch-DPaKnsb8.js"),x=require("react"),t=require("./index-Xdag_85e.js"),oe=require("./use-visual-utils-C8PDxg2w.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-S0LXyguo.js → resource-management-panel-paSAzVj2.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as le } from "react/jsx-runtime";
|
|
2
|
-
import { c as je, u as ne,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as Ie } from "./use-visual-utils-
|
|
2
|
+
import { c as je, u as ne, G as Fe, a as X, B as I, f as se, M as we, Q as ze, L as fe, a1 as ge, X as Be, Y as He, Z as Ke, _ as _e, a0 as Ge, a8 as Qe } from "./switch-sauemjyY.js";
|
|
3
|
+
import Ye, { useState as w, useEffect as ae, useRef as qe } from "react";
|
|
4
|
+
import { af as de, aj as Je, ak as We, al as ie, am as Xe, an as Ze, ao as $e, ap as ke, aq as W, ar as et, as as tt, at as nt, au as xe, av as ce, aw as at, ax as st, ay as Ne, az as be, aA as ot, H as ye, z as Ce, aB as ve, aC as Se, aD as Ee, aE as Ve, aF as Le, aG as Ae, aH as Oe, aI as Re, aJ as Te, aK as rt, aL as ue, aM as it, x as te, u as lt, aN as Ue, b as dt, c as ct, d as ut, e as ht, f as pt, n as mt, aO as ft, aP as De, aQ as gt, aR as xt } from "./index-gcA9Rs35.js";
|
|
5
|
+
import { u as Ie } from "./use-visual-utils-Cs0-baCK.js";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-react v0.453.0 - ISC
|
|
8
8
|
*
|
|
@@ -34,24 +34,24 @@ function Me() {
|
|
|
34
34
|
m
|
|
35
35
|
)) });
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const wt = (t) => {
|
|
38
38
|
const m = ne((i) => i.isVisualEditing), p = ne((i) => i.selectedFrameId), l = Fe((i) => i.frame);
|
|
39
39
|
return !!(m && p && (l == null ? void 0 : l.visualId) === t);
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function Nt({
|
|
42
42
|
visual: t,
|
|
43
43
|
isDeleting: m,
|
|
44
44
|
isDuplicating: p,
|
|
45
45
|
onAddVisual: l,
|
|
46
46
|
onOpenVisual: i,
|
|
47
47
|
onEditDetails: h,
|
|
48
|
-
onDeleteClick:
|
|
48
|
+
onDeleteClick: N,
|
|
49
49
|
onDuplicateVisual: o,
|
|
50
|
-
onShareVisual:
|
|
50
|
+
onShareVisual: b,
|
|
51
51
|
formatDate: y
|
|
52
52
|
}) {
|
|
53
53
|
var M, U, j, F;
|
|
54
|
-
const { selectVisual: f } = de(), d = Je(t.id), u =
|
|
54
|
+
const { selectVisual: f } = de(), d = Je(t.id), u = wt(t.id), A = ne((r) => r.isVisualEditing), { isConsoleMode: T } = We(), x = Ye.useRef(null), [S, E] = w(!1), [V, O] = w(!1);
|
|
55
55
|
ae(() => {
|
|
56
56
|
p ? (E(!0), O(!0)) : V && (E(!1), O(!1));
|
|
57
57
|
}, [p, V]), ae(() => {
|
|
@@ -69,7 +69,7 @@ function wt({
|
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
ref: x,
|
|
72
|
-
className:
|
|
72
|
+
className: X(
|
|
73
73
|
"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",
|
|
74
74
|
u ? "bg-muted ring-1 ring-inset ring-foreground/20" : d && "bg-muted"
|
|
75
75
|
),
|
|
@@ -105,7 +105,7 @@ function wt({
|
|
|
105
105
|
/* @__PURE__ */ e(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className:
|
|
108
|
+
className: X(
|
|
109
109
|
"flex shrink-0 items-center transition-opacity",
|
|
110
110
|
d || u || 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"
|
|
111
111
|
),
|
|
@@ -129,20 +129,20 @@ function wt({
|
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
131
|
/* @__PURE__ */ n(
|
|
132
|
-
|
|
132
|
+
Xe,
|
|
133
133
|
{
|
|
134
134
|
modal: !1,
|
|
135
135
|
open: S,
|
|
136
136
|
onOpenChange: E,
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */ e(
|
|
138
|
+
/* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ e(
|
|
139
139
|
I,
|
|
140
140
|
{
|
|
141
141
|
size: "xs",
|
|
142
142
|
variant: "ghost",
|
|
143
143
|
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent/50",
|
|
144
144
|
"aria-label": "Open visual actions",
|
|
145
|
-
children: /* @__PURE__ */ e(
|
|
145
|
+
children: /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" })
|
|
146
146
|
}
|
|
147
147
|
) }),
|
|
148
148
|
/* @__PURE__ */ n(
|
|
@@ -152,7 +152,7 @@ function wt({
|
|
|
152
152
|
className: "z-[51] w-44 rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
153
153
|
children: [
|
|
154
154
|
/* @__PURE__ */ n(
|
|
155
|
-
|
|
155
|
+
W,
|
|
156
156
|
{
|
|
157
157
|
onClick: (r) => {
|
|
158
158
|
r.stopPropagation(), l(t);
|
|
@@ -165,7 +165,7 @@ function wt({
|
|
|
165
165
|
}
|
|
166
166
|
),
|
|
167
167
|
/* @__PURE__ */ n(
|
|
168
|
-
|
|
168
|
+
W,
|
|
169
169
|
{
|
|
170
170
|
onClick: (r) => {
|
|
171
171
|
r.stopPropagation(), i == null || i(t);
|
|
@@ -177,7 +177,7 @@ function wt({
|
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
179
|
/* @__PURE__ */ n(
|
|
180
|
-
|
|
180
|
+
W,
|
|
181
181
|
{
|
|
182
182
|
onClick: (r) => {
|
|
183
183
|
r.preventDefault(), r.stopPropagation(), o(t.id);
|
|
@@ -191,7 +191,7 @@ function wt({
|
|
|
191
191
|
),
|
|
192
192
|
t.ownership.isOwner && /* @__PURE__ */ n(le, { children: [
|
|
193
193
|
/* @__PURE__ */ n(
|
|
194
|
-
|
|
194
|
+
W,
|
|
195
195
|
{
|
|
196
196
|
onClick: (r) => {
|
|
197
197
|
r.stopPropagation(), h == null || h(t);
|
|
@@ -203,10 +203,10 @@ function wt({
|
|
|
203
203
|
}
|
|
204
204
|
),
|
|
205
205
|
/* @__PURE__ */ n(
|
|
206
|
-
|
|
206
|
+
W,
|
|
207
207
|
{
|
|
208
208
|
onClick: (r) => {
|
|
209
|
-
r.stopPropagation(),
|
|
209
|
+
r.stopPropagation(), b(t);
|
|
210
210
|
},
|
|
211
211
|
children: [
|
|
212
212
|
/* @__PURE__ */ e(nt, { className: "h-3.5 w-3.5" }),
|
|
@@ -216,10 +216,10 @@ function wt({
|
|
|
216
216
|
),
|
|
217
217
|
/* @__PURE__ */ e(xe, {}),
|
|
218
218
|
/* @__PURE__ */ n(
|
|
219
|
-
|
|
219
|
+
W,
|
|
220
220
|
{
|
|
221
221
|
onClick: (r) => {
|
|
222
|
-
r.stopPropagation(),
|
|
222
|
+
r.stopPropagation(), N(t);
|
|
223
223
|
},
|
|
224
224
|
className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
|
|
225
225
|
disabled: m,
|
|
@@ -254,10 +254,10 @@ function wt({
|
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
const [m, p] =
|
|
257
|
+
function bt({ searchQuery: t }) {
|
|
258
|
+
const [m, p] = w(!1), [l, i] = w(
|
|
259
259
|
null
|
|
260
|
-
), [h,
|
|
260
|
+
), [h, N] = w(!1), [o, b] = w(null), [y, f] = w(null), [d, u] = w(
|
|
261
261
|
null
|
|
262
262
|
), { handleEditLibraryVisual: A, handleAddLibraryVisual: T } = Ie(), {
|
|
263
263
|
resources: x,
|
|
@@ -267,8 +267,8 @@ function Nt({ searchQuery: t }) {
|
|
|
267
267
|
deleteResource: O,
|
|
268
268
|
duplicateResource: C,
|
|
269
269
|
isDeleting: v
|
|
270
|
-
} =
|
|
271
|
-
|
|
270
|
+
} = Ne(() => {
|
|
271
|
+
N(!1), b(null);
|
|
272
272
|
}), M = x.filter(
|
|
273
273
|
(s) => {
|
|
274
274
|
var R, c;
|
|
@@ -279,14 +279,14 @@ function Nt({ searchQuery: t }) {
|
|
|
279
279
|
day: "numeric",
|
|
280
280
|
year: "numeric"
|
|
281
281
|
}), j = (s) => {
|
|
282
|
-
|
|
282
|
+
b(s), N(!0);
|
|
283
283
|
}, F = () => {
|
|
284
284
|
o && O(o.id);
|
|
285
285
|
}, {
|
|
286
286
|
startUpdating: r,
|
|
287
|
-
stopUpdating:
|
|
287
|
+
stopUpdating: Q,
|
|
288
288
|
isUpdating: B
|
|
289
|
-
} =
|
|
289
|
+
} = be(), L = (s, R, c) => {
|
|
290
290
|
var ee;
|
|
291
291
|
const z = Object.fromEntries(
|
|
292
292
|
Object.entries(R).filter(([, P]) => P !== void 0)
|
|
@@ -304,15 +304,15 @@ function Nt({ searchQuery: t }) {
|
|
|
304
304
|
{
|
|
305
305
|
onSuccess: () => {
|
|
306
306
|
var P;
|
|
307
|
-
|
|
307
|
+
Q(s, K), (P = c == null ? void 0 : c.onSuccess) == null || P.call(c);
|
|
308
308
|
},
|
|
309
309
|
onError: () => {
|
|
310
310
|
var P;
|
|
311
|
-
|
|
311
|
+
Q(s, K), (P = c == null ? void 0 : c.onError) == null || P.call(c);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
|
-
},
|
|
315
|
+
}, Y = (s) => {
|
|
316
316
|
f(s), C(s, {
|
|
317
317
|
onSettled: () => f(null)
|
|
318
318
|
});
|
|
@@ -322,9 +322,9 @@ function Nt({ searchQuery: t }) {
|
|
|
322
322
|
T(s);
|
|
323
323
|
}, J = (s) => {
|
|
324
324
|
i(s), p(!0);
|
|
325
|
-
},
|
|
325
|
+
}, Z = (s) => {
|
|
326
326
|
u(s);
|
|
327
|
-
},
|
|
327
|
+
}, $ = () => {
|
|
328
328
|
u(null);
|
|
329
329
|
}, k = ({
|
|
330
330
|
title: s,
|
|
@@ -339,7 +339,7 @@ function Nt({ searchQuery: t }) {
|
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
341
|
};
|
|
342
|
-
return S ? /* @__PURE__ */ e(Me, {}) : E ? /* @__PURE__ */ e(
|
|
342
|
+
return S ? /* @__PURE__ */ e(Me, {}) : E ? /* @__PURE__ */ e(we, { 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: [
|
|
343
343
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "Failed to load visuals" }),
|
|
344
344
|
/* @__PURE__ */ e(
|
|
345
345
|
I,
|
|
@@ -356,14 +356,14 @@ function Nt({ searchQuery: t }) {
|
|
|
356
356
|
/* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: t ? "No visuals found" : "No visuals yet" }),
|
|
357
357
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: t ? "Try adjusting your search." : 'Click "New" above to add your first visual.' })
|
|
358
358
|
] }) : M.map((s) => /* @__PURE__ */ e(
|
|
359
|
-
|
|
359
|
+
Nt,
|
|
360
360
|
{
|
|
361
361
|
visual: s,
|
|
362
362
|
onAddVisual: q,
|
|
363
363
|
onOpenVisual: H,
|
|
364
|
-
onEditDetails:
|
|
364
|
+
onEditDetails: Z,
|
|
365
365
|
onDeleteClick: j,
|
|
366
|
-
onDuplicateVisual:
|
|
366
|
+
onDuplicateVisual: Y,
|
|
367
367
|
onShareVisual: J,
|
|
368
368
|
isDeleting: v,
|
|
369
369
|
isDuplicating: y === s.id,
|
|
@@ -388,7 +388,7 @@ function Nt({ searchQuery: t }) {
|
|
|
388
388
|
resourceLabel: "Visual",
|
|
389
389
|
initialTitle: d.title || "",
|
|
390
390
|
initialDescription: d.description || "",
|
|
391
|
-
onClose:
|
|
391
|
+
onClose: $,
|
|
392
392
|
onSave: k,
|
|
393
393
|
isSaving: B(d.id)
|
|
394
394
|
}
|
|
@@ -398,7 +398,7 @@ function Nt({ searchQuery: t }) {
|
|
|
398
398
|
{
|
|
399
399
|
open: h,
|
|
400
400
|
onOpenChange: (s) => {
|
|
401
|
-
!s && v || (
|
|
401
|
+
!s && v || (N(s), s || b(null));
|
|
402
402
|
},
|
|
403
403
|
children: /* @__PURE__ */ n(Ee, { children: [
|
|
404
404
|
/* @__PURE__ */ n(Ve, { children: [
|
|
@@ -437,9 +437,9 @@ function yt({
|
|
|
437
437
|
onLoadDashboard: l,
|
|
438
438
|
onEditDetails: i,
|
|
439
439
|
onDeleteClick: h,
|
|
440
|
-
onDuplicateDashboard:
|
|
440
|
+
onDuplicateDashboard: N,
|
|
441
441
|
onShareDashboard: o,
|
|
442
|
-
formatDate:
|
|
442
|
+
formatDate: b,
|
|
443
443
|
onDashboardItemClick: y
|
|
444
444
|
}) {
|
|
445
445
|
var V, O;
|
|
@@ -451,7 +451,7 @@ function yt({
|
|
|
451
451
|
return /* @__PURE__ */ n(
|
|
452
452
|
"div",
|
|
453
453
|
{
|
|
454
|
-
className:
|
|
454
|
+
className: X(
|
|
455
455
|
"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",
|
|
456
456
|
d && "bg-muted"
|
|
457
457
|
),
|
|
@@ -487,7 +487,7 @@ function yt({
|
|
|
487
487
|
/* @__PURE__ */ e(
|
|
488
488
|
"div",
|
|
489
489
|
{
|
|
490
|
-
className:
|
|
490
|
+
className: X(
|
|
491
491
|
"shrink-0 transition-opacity",
|
|
492
492
|
d ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
|
|
493
493
|
),
|
|
@@ -500,9 +500,9 @@ function yt({
|
|
|
500
500
|
shouldHideActions: x,
|
|
501
501
|
onEditDetails: i,
|
|
502
502
|
onDeleteClick: h,
|
|
503
|
-
onDuplicateDashboard:
|
|
503
|
+
onDuplicateDashboard: N,
|
|
504
504
|
onShareDashboard: o,
|
|
505
|
-
formatDate:
|
|
505
|
+
formatDate: b
|
|
506
506
|
}
|
|
507
507
|
)
|
|
508
508
|
}
|
|
@@ -512,16 +512,16 @@ function yt({
|
|
|
512
512
|
);
|
|
513
513
|
}
|
|
514
514
|
function Ct({ onRetry: t }) {
|
|
515
|
-
return /* @__PURE__ */ e(
|
|
515
|
+
return /* @__PURE__ */ e(we, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ n("div", { className: "rounded-xl border border-dashed border-border/60 bg-muted/20 px-4 py-8 text-center text-muted-foreground", children: [
|
|
516
516
|
/* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load dashboards" }),
|
|
517
517
|
/* @__PURE__ */ e(I, { variant: "outline", size: "sm", className: "mt-2", onClick: t, children: "Retry" })
|
|
518
518
|
] }) });
|
|
519
519
|
}
|
|
520
520
|
function vt(t) {
|
|
521
521
|
var he;
|
|
522
|
-
const { searchQuery: m, onLoadDashboard: p, onEditDashboard: l, onDashboardItemClick: i } = t, [h,
|
|
522
|
+
const { searchQuery: m, onLoadDashboard: p, onEditDashboard: l, onDashboardItemClick: i } = t, [h, N] = w(!1), [o, b] = w(
|
|
523
523
|
null
|
|
524
|
-
), [y, f] =
|
|
524
|
+
), [y, f] = w(!1), [d, u] = w(null), [A, T] = w(null), [x, S] = w(null), E = te(
|
|
525
525
|
(a) => a.lastSelectedDashboard
|
|
526
526
|
), V = te(
|
|
527
527
|
(a) => a.selectedDashboard
|
|
@@ -534,14 +534,14 @@ function vt(t) {
|
|
|
534
534
|
isLoading: j,
|
|
535
535
|
isError: F,
|
|
536
536
|
updateResource: r,
|
|
537
|
-
deleteResource:
|
|
537
|
+
deleteResource: Q,
|
|
538
538
|
duplicateResource: B,
|
|
539
539
|
isDeleting: L
|
|
540
540
|
} = Ue(() => {
|
|
541
541
|
f(!1);
|
|
542
542
|
const a = d == null ? void 0 : d.id;
|
|
543
543
|
u(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !M ? C() : E && E.id !== a && O(E));
|
|
544
|
-
}), { userContext:
|
|
544
|
+
}), { userContext: Y } = ue(), H = ((he = Y == null ? void 0 : Y.permissions) == null ? void 0 : he.canCreateDashboard) ?? !1, q = U.filter(
|
|
545
545
|
(a) => {
|
|
546
546
|
var _, g;
|
|
547
547
|
return ((_ = a == null ? void 0 : a.title) == null ? void 0 : _.toLowerCase().includes(m.toLowerCase())) || ((g = a == null ? void 0 : a.description) == null ? void 0 : g.toLowerCase().includes(m.toLowerCase()));
|
|
@@ -550,12 +550,12 @@ function vt(t) {
|
|
|
550
550
|
month: "short",
|
|
551
551
|
day: "numeric",
|
|
552
552
|
year: "numeric"
|
|
553
|
-
}),
|
|
553
|
+
}), Z = (a) => {
|
|
554
554
|
p == null || p(a);
|
|
555
|
-
},
|
|
555
|
+
}, $ = (a) => {
|
|
556
556
|
u(a), f(!0);
|
|
557
557
|
}, k = () => {
|
|
558
|
-
d &&
|
|
558
|
+
d && Q(d.id);
|
|
559
559
|
}, s = (a) => {
|
|
560
560
|
T(a), B(a, {
|
|
561
561
|
onSettled: () => T(null)
|
|
@@ -564,7 +564,7 @@ function vt(t) {
|
|
|
564
564
|
startUpdating: R,
|
|
565
565
|
stopUpdating: c,
|
|
566
566
|
isUpdating: z
|
|
567
|
-
} =
|
|
567
|
+
} = be(), D = (a, _, g) => {
|
|
568
568
|
var me;
|
|
569
569
|
const oe = Object.fromEntries(
|
|
570
570
|
Object.entries(_).filter(([, G]) => G !== void 0)
|
|
@@ -591,7 +591,7 @@ function vt(t) {
|
|
|
591
591
|
}
|
|
592
592
|
);
|
|
593
593
|
}, K = (a) => {
|
|
594
|
-
|
|
594
|
+
b(a), N(!0);
|
|
595
595
|
}, ee = (a) => {
|
|
596
596
|
l == null || l(a.id), S(a);
|
|
597
597
|
}, P = () => {
|
|
@@ -620,9 +620,9 @@ function vt(t) {
|
|
|
620
620
|
dashboard: a,
|
|
621
621
|
isDeleting: L,
|
|
622
622
|
isDuplicating: A === a.id,
|
|
623
|
-
onLoadDashboard:
|
|
623
|
+
onLoadDashboard: Z,
|
|
624
624
|
onEditDetails: ee,
|
|
625
|
-
onDeleteClick:
|
|
625
|
+
onDeleteClick: $,
|
|
626
626
|
onDuplicateDashboard: s,
|
|
627
627
|
onShareDashboard: K,
|
|
628
628
|
formatDate: J,
|
|
@@ -636,7 +636,7 @@ function vt(t) {
|
|
|
636
636
|
resource: o,
|
|
637
637
|
resourceType: Ce.DASHBOARD,
|
|
638
638
|
onClose: () => {
|
|
639
|
-
|
|
639
|
+
N(!1), b(null);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
),
|
|
@@ -692,8 +692,8 @@ function vt(t) {
|
|
|
692
692
|
function St(t, m = {}) {
|
|
693
693
|
const { enabled: p = !0, eventType: l = "mousedown" } = m, i = qe(null);
|
|
694
694
|
return ae(() => {
|
|
695
|
-
const h = (
|
|
696
|
-
const o =
|
|
695
|
+
const h = (N) => {
|
|
696
|
+
const o = N.target;
|
|
697
697
|
i.current && i.current.contains(o) || o instanceof Element && (o.closest("[data-radix-popper-content-wrapper]") || o.closest("[data-radix-select-content]") || o.closest("[data-radix-popover-content]") || o.closest("[data-radix-dropdown-menu-content]") || o.closest("[data-radix-tooltip-content]") || o.closest('[role="listbox"]') || o.closest('[role="option"]') || o.closest('[role="combobox"]')) || o instanceof Element && o.hasAttribute("data-radix-") || t();
|
|
698
698
|
};
|
|
699
699
|
return p && document.addEventListener(l, h), () => {
|
|
@@ -707,12 +707,12 @@ function Et({
|
|
|
707
707
|
onSubmit: p,
|
|
708
708
|
isCreating: l
|
|
709
709
|
}) {
|
|
710
|
-
const [i, h] =
|
|
710
|
+
const [i, h] = w(""), [N, o] = w("");
|
|
711
711
|
ae(() => {
|
|
712
712
|
t || (h(""), o(""));
|
|
713
713
|
}, [t]);
|
|
714
|
-
const
|
|
715
|
-
i.trim() && p({ title: i, description:
|
|
714
|
+
const b = () => {
|
|
715
|
+
i.trim() && p({ title: i, description: N });
|
|
716
716
|
}, y = (f) => {
|
|
717
717
|
m(f);
|
|
718
718
|
};
|
|
@@ -733,7 +733,7 @@ function Et({
|
|
|
733
733
|
onChange: (f) => h(f.target.value),
|
|
734
734
|
disabled: l,
|
|
735
735
|
onKeyDown: (f) => {
|
|
736
|
-
f.key === "Enter" && !f.shiftKey && (f.preventDefault(),
|
|
736
|
+
f.key === "Enter" && !f.shiftKey && (f.preventDefault(), b());
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
)
|
|
@@ -745,7 +745,7 @@ function Et({
|
|
|
745
745
|
{
|
|
746
746
|
id: "description",
|
|
747
747
|
placeholder: "Enter visual description...",
|
|
748
|
-
value:
|
|
748
|
+
value: N,
|
|
749
749
|
onChange: (f) => o(f.target.value),
|
|
750
750
|
disabled: l
|
|
751
751
|
}
|
|
@@ -765,7 +765,7 @@ function Et({
|
|
|
765
765
|
/* @__PURE__ */ e(
|
|
766
766
|
I,
|
|
767
767
|
{
|
|
768
|
-
onClick:
|
|
768
|
+
onClick: b,
|
|
769
769
|
disabled: !i.trim() || l,
|
|
770
770
|
children: l ? /* @__PURE__ */ n(le, { children: [
|
|
771
771
|
/* @__PURE__ */ e(se, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
@@ -786,23 +786,23 @@ function Tt({
|
|
|
786
786
|
var c, z;
|
|
787
787
|
const h = ne(
|
|
788
788
|
(D) => D.isDashboardEditing
|
|
789
|
-
), [
|
|
789
|
+
), [N, o] = w(!1), [b, y] = w(""), [f, d] = w(!1), { currentUser: u, userContext: A } = ue(), T = ((c = A == null ? void 0 : A.permissions) == null ? void 0 : c.canCreateDashboard) ?? !1, { onCreateSuccess: x } = ft({
|
|
790
790
|
onDashboardSelect: l
|
|
791
791
|
}), { selectVisual: S } = de(), { handleEditLibraryVisual: E } = Ie(), {
|
|
792
792
|
createResource: V,
|
|
793
793
|
isCreating: O,
|
|
794
794
|
refetch: C
|
|
795
|
-
} = Ue(), { createResource: v, isCreating: M } =
|
|
795
|
+
} = Ue(), { createResource: v, isCreating: M } = Ne(
|
|
796
796
|
void 0,
|
|
797
797
|
// onDeleteSuccess (not needed here)
|
|
798
798
|
(D) => {
|
|
799
799
|
o(!1), D && (S(D), E(D));
|
|
800
800
|
}
|
|
801
|
-
), U = i === "overlay", j = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", r = h ? "Search visuals..." : "Search dashboards...",
|
|
801
|
+
), U = i === "overlay", j = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", r = h ? "Search visuals..." : "Search dashboards...", Q = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((u == null ? void 0 : u.name) ?? "").trim(), L = ((u == null ? void 0 : u.email) ?? "").trim(), H = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", q = ((z = H.charAt(0)) == null ? void 0 : z.toUpperCase()) || "?", J = L && L.toLowerCase() !== "undefined" ? L : "", Z = St(m, {
|
|
802
802
|
enabled: t && U
|
|
803
|
-
}),
|
|
803
|
+
}), $ = X(
|
|
804
804
|
"flex h-full flex-col border-r border-border/60 bg-background",
|
|
805
|
-
U ?
|
|
805
|
+
U ? X(
|
|
806
806
|
"absolute inset-y-0 left-0 z-[51] w-60 overflow-hidden shadow-lg transition-transform duration-300 ease-in-out",
|
|
807
807
|
t ? "translate-x-0" : "pointer-events-none -translate-x-full"
|
|
808
808
|
) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden",
|
|
@@ -817,14 +817,14 @@ function Tt({
|
|
|
817
817
|
}
|
|
818
818
|
});
|
|
819
819
|
};
|
|
820
|
-
return /* @__PURE__ */ e(le, { children: (!U || t) && /* @__PURE__ */ n("div", { ref:
|
|
820
|
+
return /* @__PURE__ */ e(le, { children: (!U || t) && /* @__PURE__ */ n("div", { ref: Z, className: $, children: [
|
|
821
821
|
/* @__PURE__ */ e("div", { className: "border-b border-border/60 bg-background", children: f ? /* @__PURE__ */ n("div", { className: "flex h-10 items-center gap-1 px-3", children: [
|
|
822
822
|
/* @__PURE__ */ e(De, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
823
823
|
/* @__PURE__ */ e(
|
|
824
824
|
"input",
|
|
825
825
|
{
|
|
826
826
|
autoFocus: !0,
|
|
827
|
-
value:
|
|
827
|
+
value: b,
|
|
828
828
|
onChange: (D) => y(D.target.value),
|
|
829
829
|
onKeyDown: (D) => {
|
|
830
830
|
D.key === "Escape" && (y(""), d(!1));
|
|
@@ -881,16 +881,16 @@ function Tt({
|
|
|
881
881
|
variant: "ghost",
|
|
882
882
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
883
883
|
onClick: m,
|
|
884
|
-
"aria-label":
|
|
884
|
+
"aria-label": Q,
|
|
885
885
|
children: /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5" })
|
|
886
886
|
}
|
|
887
887
|
)
|
|
888
888
|
] })
|
|
889
889
|
] }) }),
|
|
890
|
-
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(
|
|
890
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(bt, { searchQuery: b }) : /* @__PURE__ */ e(
|
|
891
891
|
vt,
|
|
892
892
|
{
|
|
893
|
-
searchQuery:
|
|
893
|
+
searchQuery: b,
|
|
894
894
|
onLoadDashboard: k,
|
|
895
895
|
onEditDashboard: s,
|
|
896
896
|
onDashboardItemClick: l
|
|
@@ -907,14 +907,14 @@ function Tt({
|
|
|
907
907
|
u.role && /* @__PURE__ */ n("div", { className: "text-[11px] opacity-80", children: [
|
|
908
908
|
"Role:",
|
|
909
909
|
" ",
|
|
910
|
-
|
|
910
|
+
Qe(u.role.replace(/_/g, " "))
|
|
911
911
|
] })
|
|
912
912
|
] }) })
|
|
913
913
|
] }) }) }),
|
|
914
914
|
h ? /* @__PURE__ */ e(
|
|
915
915
|
Et,
|
|
916
916
|
{
|
|
917
|
-
open:
|
|
917
|
+
open: N,
|
|
918
918
|
onOpenChange: o,
|
|
919
919
|
onSubmit: v,
|
|
920
920
|
isCreating: M
|
|
@@ -922,7 +922,7 @@ function Tt({
|
|
|
922
922
|
) : /* @__PURE__ */ e(
|
|
923
923
|
xt,
|
|
924
924
|
{
|
|
925
|
-
open:
|
|
925
|
+
open: N,
|
|
926
926
|
onOpenChange: o,
|
|
927
927
|
onSubmit: R,
|
|
928
928
|
isCreating: O
|