react-semaphor 0.1.320 → 0.1.322
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.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +278 -208
- package/dist/chunks/{braces-NfG5hX2c.js → braces-C7BeIXvM.js} +1 -1
- package/dist/chunks/{braces-CDPz6CF2.js → braces-ZjRH2Kl7.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-CFXQBJ4A.js → calendar-preferences-dialog-CZqePF6B.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-B7Z8OnuZ.js → calendar-preferences-dialog-t0OOALVd.js} +3 -3
- package/dist/chunks/{chevrons-up-down-BsdQRmJL.js → chevrons-up-down-CA-XvN1o.js} +1 -1
- package/dist/chunks/{chevrons-up-down-DiWloubI.js → chevrons-up-down-Cuilz9aY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DB16djcj.js → dashboard-briefing-launcher-BYbnbZ9e.js} +933 -910
- package/dist/chunks/{dashboard-briefing-launcher-DjDpGyD7.js → dashboard-briefing-launcher-d1_fm91W.js} +17 -17
- package/dist/chunks/dashboard-controls-B3HHMRPC.js +52 -0
- package/dist/chunks/dashboard-controls-BuChCKDm.js +2246 -0
- package/dist/chunks/{dashboard-json-C8-kkiyT.js → dashboard-json-DgoYjD0O.js} +2 -2
- package/dist/chunks/{dashboard-json-2nyFJ_-w.js → dashboard-json-M5-VFCtZ.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BP77bJFI.js → edit-dashboard-visual-BH8DP1qq.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-D6oiTlXr.js → edit-dashboard-visual-DP31ytwJ.js} +6 -6
- package/dist/chunks/{index-Clw0hJzi.js → index-ChmS5nsv.js} +28873 -28145
- package/dist/chunks/{index-D8eouWYC.js → index-CodH6sqg.js} +217 -212
- package/dist/chunks/{palette-CJTdBzJB.js → palette-CanPG11m.js} +1 -1
- package/dist/chunks/{palette-BlxLchHy.js → palette-D96DOM7E.js} +1 -1
- package/dist/chunks/resource-management-panel-D3vO68dH.js +6 -0
- package/dist/chunks/{resource-management-panel-HcRJRZHO.js → resource-management-panel-gt__S0Pb.js} +451 -369
- package/dist/chunks/{save-B8x5Vi0W.js → save-CqrBQKG6.js} +1 -1
- package/dist/chunks/{save-DVRQBMeb.js → save-DxkSzUTZ.js} +1 -1
- package/dist/chunks/{switch-DPaKnsb8.js → switch-BXICAlvS.js} +2 -2
- package/dist/chunks/{switch-sauemjyY.js → switch-Deo2Ltmj.js} +133 -133
- package/dist/chunks/{use-create-flow-overlay-state-CdCldE6J.js → use-create-flow-overlay-state-BZaSpL-c.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-75l5mrVp.js → use-create-flow-overlay-state-OA3iI54p.js} +104 -104
- package/dist/chunks/{use-visual-utils-CMdEUnM5.js → use-visual-utils-CMucAqbS.js} +1 -1
- package/dist/chunks/{use-visual-utils-Bd4Cf9_B.js → use-visual-utils-CsXS-Zeh.js} +20 -20
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -0
- package/dist/dashboard-authoring/index.js +532 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +131 -130
- 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 +15 -0
- package/dist/types/dashboard-authoring.d.ts +2703 -0
- package/dist/types/main.d.ts +145 -0
- package/package.json +6 -1
- package/dist/chunks/dashboard-controls-BisfskDD.js +0 -52
- package/dist/chunks/dashboard-controls-DPStW1kd.js +0 -1999
- package/dist/chunks/resource-management-panel-DTvY5OIq.js +0 -6
package/dist/chunks/{resource-management-panel-HcRJRZHO.js → resource-management-panel-gt__S0Pb.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
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 Ge, a as Z, B as A, f as te, M as be, Q as Ye, L as ie, a1 as de, X as ke, Y as Qe, Z as We, _ as Xe, a0 as Ze, ay as $e } from "./switch-Deo2Ltmj.js";
|
|
3
|
+
import qe, { useState as b, useEffect as ee, useRef as Je } from "react";
|
|
4
|
+
import { ag as ue, aK as et, aL as tt, aH as ce, aM as nt, aN as at, aO as st, aP as it, aQ as X, aR as ot, aS as rt, aT as lt, aU as xe, ay as he, aV as dt, aW as ct, aX as we, aY as Ne, aZ as ut, H as ye, z as Ce, a_ as ve, a$ as Se, b0 as Ee, b1 as Ve, b2 as Le, b3 as Oe, b4 as Ae, b5 as Te, b6 as Re, b7 as ht, b8 as pe, b9 as pt, x as ae, u as mt, ba as Ue, b as Ie, c as Me, d as Pe, e as ze, f as Fe, bb as ft, n as je, bc as gt, bd as De, be as xt } from "./index-ChmS5nsv.js";
|
|
5
|
+
import { u as Be } from "./use-visual-utils-CsXS-Zeh.js";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-react v0.453.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
const Dt =
|
|
12
|
+
const Dt = _e("FolderOpen", [
|
|
13
13
|
[
|
|
14
14
|
"path",
|
|
15
15
|
{
|
|
@@ -18,8 +18,8 @@ const Dt = je("FolderOpen", [
|
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
]);
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */ e("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((t,
|
|
21
|
+
function Ke() {
|
|
22
|
+
return /* @__PURE__ */ e("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((t, f) => /* @__PURE__ */ n(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: "flex animate-pulse items-start gap-3 rounded-xl border border-transparent px-2.5 py-2.5",
|
|
@@ -31,47 +31,47 @@ function Me() {
|
|
|
31
31
|
] })
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
f
|
|
35
35
|
)) });
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
return !!(
|
|
37
|
+
const bt = (t) => {
|
|
38
|
+
const f = se((o) => o.isVisualEditing), m = se((o) => o.selectedFrameId), r = Ge((o) => o.frame);
|
|
39
|
+
return !!(f && m && (r == null ? void 0 : r.visualId) === t);
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function wt({
|
|
42
42
|
visual: t,
|
|
43
|
-
isDeleting:
|
|
44
|
-
isDuplicating:
|
|
45
|
-
onAddVisual:
|
|
46
|
-
onOpenVisual:
|
|
43
|
+
isDeleting: f,
|
|
44
|
+
isDuplicating: m,
|
|
45
|
+
onAddVisual: r,
|
|
46
|
+
onOpenVisual: o,
|
|
47
47
|
onEditDetails: h,
|
|
48
|
-
onDeleteClick:
|
|
49
|
-
onDuplicateVisual:
|
|
50
|
-
onShareVisual:
|
|
51
|
-
formatDate:
|
|
48
|
+
onDeleteClick: x,
|
|
49
|
+
onDuplicateVisual: i,
|
|
50
|
+
onShareVisual: D,
|
|
51
|
+
formatDate: w
|
|
52
52
|
}) {
|
|
53
|
-
var M,
|
|
54
|
-
const { selectVisual:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
|
|
53
|
+
var M, I, z, F;
|
|
54
|
+
const { selectVisual: l } = ue(), c = et(t.id), p = bt(t.id), O = se((d) => d.isVisualEditing), { isConsoleMode: U } = tt(), N = qe.useRef(null), [S, E] = b(!1), [V, T] = b(!1);
|
|
55
|
+
ee(() => {
|
|
56
|
+
m ? (E(!0), T(!0)) : V && (E(!1), T(!1));
|
|
57
|
+
}, [m, V]), ee(() => {
|
|
58
|
+
p && N.current && N.current.scrollIntoView({
|
|
59
59
|
behavior: "smooth",
|
|
60
60
|
block: "center"
|
|
61
61
|
});
|
|
62
|
-
}, [
|
|
62
|
+
}, [p]);
|
|
63
63
|
const C = () => {
|
|
64
|
-
|
|
65
|
-
}, v = (
|
|
66
|
-
|
|
64
|
+
l(t), o == null || o(t);
|
|
65
|
+
}, v = (d) => {
|
|
66
|
+
d.currentTarget === d.target && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), C());
|
|
67
67
|
};
|
|
68
68
|
return /* @__PURE__ */ n(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
|
-
ref:
|
|
72
|
-
className:
|
|
71
|
+
ref: N,
|
|
72
|
+
className: Z(
|
|
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
|
+
p ? "bg-muted ring-1 ring-inset ring-foreground/20" : c && "bg-muted"
|
|
75
75
|
),
|
|
76
76
|
onClick: C,
|
|
77
77
|
children: [
|
|
@@ -105,70 +105,70 @@ function Nt({
|
|
|
105
105
|
/* @__PURE__ */ e(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className:
|
|
108
|
+
className: Z(
|
|
109
109
|
"flex shrink-0 items-center transition-opacity",
|
|
110
|
-
|
|
110
|
+
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"
|
|
111
111
|
),
|
|
112
|
-
onClick: (
|
|
112
|
+
onClick: (d) => d.stopPropagation(),
|
|
113
113
|
children: /* @__PURE__ */ n("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-[5px] border border-border/60 bg-background", children: [
|
|
114
114
|
/* @__PURE__ */ n(
|
|
115
|
-
|
|
115
|
+
A,
|
|
116
116
|
{
|
|
117
117
|
size: "xs",
|
|
118
118
|
variant: "ghost",
|
|
119
119
|
className: "h-full rounded-none border-0 shadow-none hover:bg-accent/50",
|
|
120
|
-
disabled:
|
|
121
|
-
onClick: (
|
|
122
|
-
|
|
120
|
+
disabled: O,
|
|
121
|
+
onClick: (d) => {
|
|
122
|
+
d.stopPropagation(), r(t);
|
|
123
123
|
},
|
|
124
124
|
"aria-label": `Add ${t.title || "visual"}`,
|
|
125
125
|
children: [
|
|
126
|
-
/* @__PURE__ */ e(
|
|
126
|
+
/* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }),
|
|
127
127
|
"Add"
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
131
|
/* @__PURE__ */ n(
|
|
132
|
-
|
|
132
|
+
nt,
|
|
133
133
|
{
|
|
134
134
|
modal: !1,
|
|
135
135
|
open: S,
|
|
136
136
|
onOpenChange: E,
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
|
|
138
|
+
/* @__PURE__ */ e(at, { asChild: !0, children: /* @__PURE__ */ e(
|
|
139
|
+
A,
|
|
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(st, { className: "h-3.5 w-3.5" })
|
|
146
146
|
}
|
|
147
147
|
) }),
|
|
148
148
|
/* @__PURE__ */ n(
|
|
149
|
-
|
|
149
|
+
it,
|
|
150
150
|
{
|
|
151
151
|
align: "end",
|
|
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
|
+
X,
|
|
156
156
|
{
|
|
157
|
-
onClick: (
|
|
158
|
-
|
|
157
|
+
onClick: (d) => {
|
|
158
|
+
d.stopPropagation(), r(t);
|
|
159
159
|
},
|
|
160
|
-
disabled:
|
|
160
|
+
disabled: O,
|
|
161
161
|
children: [
|
|
162
|
-
/* @__PURE__ */ e(
|
|
162
|
+
/* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }),
|
|
163
163
|
"Add"
|
|
164
164
|
]
|
|
165
165
|
}
|
|
166
166
|
),
|
|
167
167
|
/* @__PURE__ */ n(
|
|
168
|
-
|
|
168
|
+
X,
|
|
169
169
|
{
|
|
170
|
-
onClick: (
|
|
171
|
-
|
|
170
|
+
onClick: (d) => {
|
|
171
|
+
d.stopPropagation(), o == null || o(t);
|
|
172
172
|
},
|
|
173
173
|
children: [
|
|
174
174
|
/* @__PURE__ */ e(Dt, { className: "h-3.5 w-3.5" }),
|
|
@@ -177,68 +177,68 @@ function Nt({
|
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
179
|
/* @__PURE__ */ n(
|
|
180
|
-
|
|
180
|
+
X,
|
|
181
181
|
{
|
|
182
|
-
onClick: (
|
|
183
|
-
|
|
182
|
+
onClick: (d) => {
|
|
183
|
+
d.preventDefault(), d.stopPropagation(), i(t.id);
|
|
184
184
|
},
|
|
185
|
-
disabled:
|
|
185
|
+
disabled: m,
|
|
186
186
|
children: [
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
m ? /* @__PURE__ */ e(te, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(ot, { className: "h-3.5 w-3.5" }),
|
|
188
|
+
m ? "Duplicating…" : "Duplicate"
|
|
189
189
|
]
|
|
190
190
|
}
|
|
191
191
|
),
|
|
192
|
-
t.ownership.isOwner && /* @__PURE__ */ n(
|
|
192
|
+
t.ownership.isOwner && /* @__PURE__ */ n(oe, { children: [
|
|
193
193
|
/* @__PURE__ */ n(
|
|
194
|
-
|
|
194
|
+
X,
|
|
195
195
|
{
|
|
196
|
-
onClick: (
|
|
197
|
-
|
|
196
|
+
onClick: (d) => {
|
|
197
|
+
d.stopPropagation(), h == null || h(t);
|
|
198
198
|
},
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ e(
|
|
200
|
+
/* @__PURE__ */ e(rt, { className: "h-3.5 w-3.5" }),
|
|
201
201
|
"Edit details"
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
),
|
|
205
205
|
/* @__PURE__ */ n(
|
|
206
|
-
|
|
206
|
+
X,
|
|
207
207
|
{
|
|
208
|
-
onClick: (
|
|
209
|
-
|
|
208
|
+
onClick: (d) => {
|
|
209
|
+
d.stopPropagation(), D(t);
|
|
210
210
|
},
|
|
211
211
|
children: [
|
|
212
|
-
/* @__PURE__ */ e(
|
|
212
|
+
/* @__PURE__ */ e(lt, { className: "h-3.5 w-3.5" }),
|
|
213
213
|
"Share"
|
|
214
214
|
]
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
217
|
/* @__PURE__ */ e(xe, {}),
|
|
218
218
|
/* @__PURE__ */ n(
|
|
219
|
-
|
|
219
|
+
X,
|
|
220
220
|
{
|
|
221
|
-
onClick: (
|
|
222
|
-
|
|
221
|
+
onClick: (d) => {
|
|
222
|
+
d.stopPropagation(), x(t);
|
|
223
223
|
},
|
|
224
224
|
className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
|
|
225
|
-
disabled:
|
|
225
|
+
disabled: f,
|
|
226
226
|
children: [
|
|
227
|
-
/* @__PURE__ */ e(
|
|
228
|
-
|
|
227
|
+
/* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
|
|
228
|
+
f ? "Deleting…" : "Delete"
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
)
|
|
232
232
|
] }),
|
|
233
233
|
/* @__PURE__ */ e(xe, {}),
|
|
234
234
|
/* @__PURE__ */ n("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
|
|
235
|
-
(((
|
|
236
|
-
/* @__PURE__ */ e(
|
|
235
|
+
(((I = t.ownership.createdBy) == null ? void 0 : I.type) === "tenant" || ((z = t.ownership.createdBy) == null ? void 0 : z.type) === "organization" && U) && /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
|
|
236
|
+
/* @__PURE__ */ e(dt, { className: "h-3 w-3" }),
|
|
237
237
|
/* @__PURE__ */ e("span", { children: ((F = t.ownership.createdBy) == null ? void 0 : F.name) || "Unknown" })
|
|
238
238
|
] }),
|
|
239
239
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
|
|
240
|
-
/* @__PURE__ */ e(
|
|
241
|
-
/* @__PURE__ */ e("span", { children:
|
|
240
|
+
/* @__PURE__ */ e(ct, { className: "h-3 w-3" }),
|
|
241
|
+
/* @__PURE__ */ e("span", { children: w(t.lastModified) })
|
|
242
242
|
] })
|
|
243
243
|
] })
|
|
244
244
|
]
|
|
@@ -254,95 +254,95 @@ function Nt({
|
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
const [
|
|
257
|
+
function Nt({ searchQuery: t }) {
|
|
258
|
+
const [f, m] = b(!1), [r, o] = b(
|
|
259
259
|
null
|
|
260
|
-
), [h,
|
|
260
|
+
), [h, x] = b(!1), [i, D] = b(null), [w, l] = b(null), [c, p] = b(
|
|
261
261
|
null
|
|
262
|
-
), { handleEditLibraryVisual:
|
|
263
|
-
resources:
|
|
262
|
+
), { handleEditLibraryVisual: O, handleAddLibraryVisual: U } = Be(), {
|
|
263
|
+
resources: N,
|
|
264
264
|
isLoading: S,
|
|
265
265
|
isError: E,
|
|
266
266
|
updateResource: V,
|
|
267
|
-
deleteResource:
|
|
267
|
+
deleteResource: T,
|
|
268
268
|
duplicateResource: C,
|
|
269
269
|
isDeleting: v
|
|
270
|
-
} =
|
|
271
|
-
|
|
272
|
-
}), M =
|
|
270
|
+
} = we(() => {
|
|
271
|
+
x(!1), D(null);
|
|
272
|
+
}), M = N.filter(
|
|
273
273
|
(s) => {
|
|
274
|
-
var R,
|
|
275
|
-
return ((R = s == null ? void 0 : s.title) == null ? void 0 : R.toLowerCase().includes(t.toLowerCase())) || ((
|
|
274
|
+
var R, u;
|
|
275
|
+
return ((R = s == null ? void 0 : s.title) == null ? void 0 : R.toLowerCase().includes(t.toLowerCase())) || ((u = s == null ? void 0 : s.description) == null ? void 0 : u.toLowerCase().includes(t.toLowerCase()));
|
|
276
276
|
}
|
|
277
|
-
),
|
|
277
|
+
), I = (s) => new Date(s).toLocaleDateString("en-US", {
|
|
278
278
|
month: "short",
|
|
279
279
|
day: "numeric",
|
|
280
280
|
year: "numeric"
|
|
281
|
-
}),
|
|
282
|
-
|
|
281
|
+
}), z = (s) => {
|
|
282
|
+
D(s), x(!0);
|
|
283
283
|
}, F = () => {
|
|
284
|
-
|
|
284
|
+
i && T(i.id);
|
|
285
285
|
}, {
|
|
286
|
-
startUpdating:
|
|
287
|
-
stopUpdating:
|
|
286
|
+
startUpdating: d,
|
|
287
|
+
stopUpdating: Y,
|
|
288
288
|
isUpdating: B
|
|
289
|
-
} =
|
|
290
|
-
var
|
|
291
|
-
const
|
|
289
|
+
} = Ne(), L = (s, R, u) => {
|
|
290
|
+
var ne;
|
|
291
|
+
const j = Object.fromEntries(
|
|
292
292
|
Object.entries(R).filter(([, P]) => P !== void 0)
|
|
293
293
|
);
|
|
294
|
-
if (Object.keys(
|
|
295
|
-
(
|
|
294
|
+
if (Object.keys(j).length === 0) {
|
|
295
|
+
(ne = u == null ? void 0 : u.onSuccess) == null || ne.call(u);
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
const
|
|
299
|
-
|
|
298
|
+
const y = Object.keys(j), H = y.length === 1 ? y[0] : void 0;
|
|
299
|
+
d(s, H), V(
|
|
300
300
|
{
|
|
301
301
|
resourceId: s,
|
|
302
|
-
data:
|
|
302
|
+
data: j
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
onSuccess: () => {
|
|
306
306
|
var P;
|
|
307
|
-
|
|
307
|
+
Y(s, H), (P = u == null ? void 0 : u.onSuccess) == null || P.call(u);
|
|
308
308
|
},
|
|
309
309
|
onError: () => {
|
|
310
310
|
var P;
|
|
311
|
-
|
|
311
|
+
Y(s, H), (P = u == null ? void 0 : u.onError) == null || P.call(u);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
);
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
onSettled: () =>
|
|
315
|
+
}, k = (s) => {
|
|
316
|
+
l(s), C(s, {
|
|
317
|
+
onSettled: () => l(null)
|
|
318
318
|
});
|
|
319
|
-
},
|
|
320
|
-
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
},
|
|
319
|
+
}, K = (s) => {
|
|
320
|
+
O(s);
|
|
321
|
+
}, Q = (s) => {
|
|
322
|
+
U(s);
|
|
323
|
+
}, W = (s) => {
|
|
324
|
+
o(s), m(!0);
|
|
325
|
+
}, $ = (s) => {
|
|
326
|
+
p(s);
|
|
327
|
+
}, q = () => {
|
|
328
|
+
p(null);
|
|
329
|
+
}, J = ({
|
|
330
330
|
title: s,
|
|
331
331
|
description: R
|
|
332
332
|
}) => {
|
|
333
|
-
if (!
|
|
333
|
+
if (!c)
|
|
334
334
|
return;
|
|
335
|
-
const
|
|
336
|
-
s !==
|
|
335
|
+
const u = {};
|
|
336
|
+
s !== c.title && (u.title = s), (c.description || "") !== R && (u.description = R), L(c.id, u, {
|
|
337
337
|
onSuccess: () => {
|
|
338
|
-
|
|
338
|
+
p(null);
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
341
|
};
|
|
342
|
-
return S ? /* @__PURE__ */ e(
|
|
342
|
+
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: [
|
|
343
343
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "Failed to load visuals" }),
|
|
344
344
|
/* @__PURE__ */ e(
|
|
345
|
-
|
|
345
|
+
A,
|
|
346
346
|
{
|
|
347
347
|
variant: "outline",
|
|
348
348
|
size: "xs",
|
|
@@ -352,45 +352,45 @@ function bt({ searchQuery: t }) {
|
|
|
352
352
|
)
|
|
353
353
|
] }) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
|
|
354
354
|
/* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: M.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
|
|
355
|
-
/* @__PURE__ */ e(
|
|
355
|
+
/* @__PURE__ */ e(ut, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
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
|
+
wt,
|
|
360
360
|
{
|
|
361
361
|
visual: s,
|
|
362
|
-
onAddVisual:
|
|
363
|
-
onOpenVisual:
|
|
364
|
-
onEditDetails:
|
|
365
|
-
onDeleteClick:
|
|
366
|
-
onDuplicateVisual:
|
|
367
|
-
onShareVisual:
|
|
362
|
+
onAddVisual: Q,
|
|
363
|
+
onOpenVisual: K,
|
|
364
|
+
onEditDetails: $,
|
|
365
|
+
onDeleteClick: z,
|
|
366
|
+
onDuplicateVisual: k,
|
|
367
|
+
onShareVisual: W,
|
|
368
368
|
isDeleting: v,
|
|
369
|
-
isDuplicating:
|
|
370
|
-
formatDate:
|
|
369
|
+
isDuplicating: w === s.id,
|
|
370
|
+
formatDate: I
|
|
371
371
|
},
|
|
372
372
|
s.id
|
|
373
373
|
)) }),
|
|
374
|
-
|
|
374
|
+
f && r && /* @__PURE__ */ e(
|
|
375
375
|
ye,
|
|
376
376
|
{
|
|
377
|
-
resource:
|
|
377
|
+
resource: r,
|
|
378
378
|
resourceType: Ce.VISUAL,
|
|
379
379
|
onClose: () => {
|
|
380
|
-
|
|
380
|
+
m(!1), o(null);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
),
|
|
384
|
-
|
|
384
|
+
c && /* @__PURE__ */ e(
|
|
385
385
|
ve,
|
|
386
386
|
{
|
|
387
|
-
open: !!
|
|
387
|
+
open: !!c,
|
|
388
388
|
resourceLabel: "Visual",
|
|
389
|
-
initialTitle:
|
|
390
|
-
initialDescription:
|
|
391
|
-
onClose:
|
|
392
|
-
onSave:
|
|
393
|
-
isSaving: B(
|
|
389
|
+
initialTitle: c.title || "",
|
|
390
|
+
initialDescription: c.description || "",
|
|
391
|
+
onClose: q,
|
|
392
|
+
onSave: J,
|
|
393
|
+
isSaving: B(c.id)
|
|
394
394
|
}
|
|
395
395
|
),
|
|
396
396
|
/* @__PURE__ */ e(
|
|
@@ -398,28 +398,28 @@ function bt({ searchQuery: t }) {
|
|
|
398
398
|
{
|
|
399
399
|
open: h,
|
|
400
400
|
onOpenChange: (s) => {
|
|
401
|
-
!s && v || (
|
|
401
|
+
!s && v || (x(s), s || D(null));
|
|
402
402
|
},
|
|
403
403
|
children: /* @__PURE__ */ n(Ee, { children: [
|
|
404
404
|
/* @__PURE__ */ n(Ve, { children: [
|
|
405
405
|
/* @__PURE__ */ e(Le, { children: "Delete Visual" }),
|
|
406
|
-
/* @__PURE__ */ n(
|
|
406
|
+
/* @__PURE__ */ n(Oe, { children: [
|
|
407
407
|
'Are you sure you want to delete "',
|
|
408
|
-
|
|
408
|
+
i == null ? void 0 : i.title,
|
|
409
409
|
'"? This action cannot be undone.'
|
|
410
410
|
] })
|
|
411
411
|
] }),
|
|
412
|
-
/* @__PURE__ */ n(
|
|
413
|
-
/* @__PURE__ */ e(
|
|
412
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
413
|
+
/* @__PURE__ */ e(Te, { disabled: v, children: "Cancel" }),
|
|
414
414
|
/* @__PURE__ */ n(
|
|
415
|
-
|
|
415
|
+
Re,
|
|
416
416
|
{
|
|
417
417
|
onClick: (s) => {
|
|
418
418
|
s.preventDefault(), s.stopPropagation(), F();
|
|
419
419
|
},
|
|
420
420
|
disabled: v,
|
|
421
421
|
children: [
|
|
422
|
-
v ? /* @__PURE__ */ e(
|
|
422
|
+
v ? /* @__PURE__ */ e(te, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
|
|
423
423
|
v ? "Deleting…" : "Delete"
|
|
424
424
|
]
|
|
425
425
|
}
|
|
@@ -432,28 +432,28 @@ function bt({ searchQuery: t }) {
|
|
|
432
432
|
}
|
|
433
433
|
function yt({
|
|
434
434
|
dashboard: t,
|
|
435
|
-
isDeleting:
|
|
436
|
-
isDuplicating:
|
|
437
|
-
onLoadDashboard:
|
|
438
|
-
onEditDetails:
|
|
435
|
+
isDeleting: f,
|
|
436
|
+
isDuplicating: m,
|
|
437
|
+
onLoadDashboard: r,
|
|
438
|
+
onEditDetails: o,
|
|
439
439
|
onDeleteClick: h,
|
|
440
|
-
onDuplicateDashboard:
|
|
441
|
-
onShareDashboard:
|
|
442
|
-
formatDate:
|
|
443
|
-
onDashboardItemClick:
|
|
440
|
+
onDuplicateDashboard: x,
|
|
441
|
+
onShareDashboard: i,
|
|
442
|
+
formatDate: D,
|
|
443
|
+
onDashboardItemClick: w
|
|
444
444
|
}) {
|
|
445
|
-
var V,
|
|
446
|
-
const { selectDashboard:
|
|
447
|
-
|
|
445
|
+
var V, T;
|
|
446
|
+
const { selectDashboard: l } = ue(), c = ht(t.id), { userContext: p, isLoading: O } = pe(), U = ((V = p == null ? void 0 : p.permissions) == null ? void 0 : V.canEdit) ?? !1, N = O || !U, S = () => {
|
|
447
|
+
l(t), r(t.id), w == null || w(t.id);
|
|
448
448
|
}, E = (C) => {
|
|
449
449
|
C.currentTarget === C.target && (C.key === "Enter" || C.key === " ") && (C.preventDefault(), S());
|
|
450
450
|
};
|
|
451
451
|
return /* @__PURE__ */ n(
|
|
452
452
|
"div",
|
|
453
453
|
{
|
|
454
|
-
className:
|
|
454
|
+
className: Z(
|
|
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
|
+
c && "bg-muted"
|
|
457
457
|
),
|
|
458
458
|
onClick: S,
|
|
459
459
|
children: [
|
|
@@ -478,7 +478,7 @@ function yt({
|
|
|
478
478
|
{
|
|
479
479
|
className: "truncate text-[11px] leading-4 text-muted-foreground",
|
|
480
480
|
title: t.description || "No description",
|
|
481
|
-
children: (
|
|
481
|
+
children: (T = t.description) != null && T.trim() ? t.description : "No description"
|
|
482
482
|
}
|
|
483
483
|
)
|
|
484
484
|
]
|
|
@@ -487,22 +487,22 @@ function yt({
|
|
|
487
487
|
/* @__PURE__ */ e(
|
|
488
488
|
"div",
|
|
489
489
|
{
|
|
490
|
-
className:
|
|
490
|
+
className: Z(
|
|
491
491
|
"shrink-0 transition-opacity",
|
|
492
|
-
|
|
492
|
+
c ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
|
|
493
493
|
),
|
|
494
494
|
children: /* @__PURE__ */ e(
|
|
495
|
-
|
|
495
|
+
pt,
|
|
496
496
|
{
|
|
497
497
|
dashboard: t,
|
|
498
|
-
isDeleting:
|
|
499
|
-
isDuplicating:
|
|
500
|
-
shouldHideActions:
|
|
501
|
-
onEditDetails:
|
|
498
|
+
isDeleting: f,
|
|
499
|
+
isDuplicating: m,
|
|
500
|
+
shouldHideActions: N,
|
|
501
|
+
onEditDetails: o,
|
|
502
502
|
onDeleteClick: h,
|
|
503
|
-
onDuplicateDashboard:
|
|
504
|
-
onShareDashboard:
|
|
505
|
-
formatDate:
|
|
503
|
+
onDuplicateDashboard: x,
|
|
504
|
+
onShareDashboard: i,
|
|
505
|
+
formatDate: D
|
|
506
506
|
}
|
|
507
507
|
)
|
|
508
508
|
}
|
|
@@ -512,161 +512,161 @@ function yt({
|
|
|
512
512
|
);
|
|
513
513
|
}
|
|
514
514
|
function Ct({ onRetry: t }) {
|
|
515
|
-
return /* @__PURE__ */ e(
|
|
515
|
+
return /* @__PURE__ */ e(be, { 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
|
-
/* @__PURE__ */ e(
|
|
517
|
+
/* @__PURE__ */ e(A, { variant: "outline", size: "sm", className: "mt-2", onClick: t, children: "Retry" })
|
|
518
518
|
] }) });
|
|
519
519
|
}
|
|
520
520
|
function vt(t) {
|
|
521
|
-
var
|
|
522
|
-
const { searchQuery:
|
|
521
|
+
var me;
|
|
522
|
+
const { searchQuery: f, onLoadDashboard: m, onEditDashboard: r, onDashboardItemClick: o } = t, [h, x] = b(!1), [i, D] = b(
|
|
523
523
|
null
|
|
524
|
-
), [
|
|
524
|
+
), [w, l] = b(!1), [c, p] = b(null), [O, U] = b(null), [N, S] = b(null), E = ae(
|
|
525
525
|
(a) => a.lastSelectedDashboard
|
|
526
|
-
), V =
|
|
526
|
+
), V = ae(
|
|
527
527
|
(a) => a.selectedDashboard
|
|
528
|
-
),
|
|
528
|
+
), T = ae(
|
|
529
529
|
(a) => a.actions.selectDashboard
|
|
530
|
-
), C =
|
|
530
|
+
), C = ae(
|
|
531
531
|
(a) => a.actions.clearSelectedDashboard
|
|
532
|
-
), { tokenProps: v, id: M } =
|
|
533
|
-
resources:
|
|
534
|
-
isLoading:
|
|
532
|
+
), { tokenProps: v, id: M } = mt(), {
|
|
533
|
+
resources: I,
|
|
534
|
+
isLoading: z,
|
|
535
535
|
isError: F,
|
|
536
|
-
updateResource:
|
|
537
|
-
deleteResource:
|
|
536
|
+
updateResource: d,
|
|
537
|
+
deleteResource: Y,
|
|
538
538
|
duplicateResource: B,
|
|
539
539
|
isDeleting: L
|
|
540
540
|
} = Ue(() => {
|
|
541
|
-
|
|
542
|
-
const a =
|
|
543
|
-
|
|
544
|
-
}), { userContext:
|
|
541
|
+
l(!1);
|
|
542
|
+
const a = c == null ? void 0 : c.id;
|
|
543
|
+
p(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !M ? C() : E && E.id !== a && T(E));
|
|
544
|
+
}), { userContext: k } = pe(), K = ((me = k == null ? void 0 : k.permissions) == null ? void 0 : me.canCreateDashboard) ?? !1, Q = I.filter(
|
|
545
545
|
(a) => {
|
|
546
546
|
var _, g;
|
|
547
|
-
return ((_ = a == null ? void 0 : a.title) == null ? void 0 : _.toLowerCase().includes(
|
|
547
|
+
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()));
|
|
548
548
|
}
|
|
549
|
-
),
|
|
549
|
+
), W = (a) => new Date(a).toLocaleDateString("en-US", {
|
|
550
550
|
month: "short",
|
|
551
551
|
day: "numeric",
|
|
552
552
|
year: "numeric"
|
|
553
|
-
}),
|
|
554
|
-
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
|
|
553
|
+
}), $ = (a) => {
|
|
554
|
+
m == null || m(a);
|
|
555
|
+
}, q = (a) => {
|
|
556
|
+
p(a), l(!0);
|
|
557
|
+
}, J = () => {
|
|
558
|
+
c && Y(c.id);
|
|
559
559
|
}, s = (a) => {
|
|
560
|
-
|
|
561
|
-
onSettled: () =>
|
|
560
|
+
U(a), B(a, {
|
|
561
|
+
onSettled: () => U(null)
|
|
562
562
|
});
|
|
563
563
|
}, {
|
|
564
564
|
startUpdating: R,
|
|
565
|
-
stopUpdating:
|
|
566
|
-
isUpdating:
|
|
567
|
-
} =
|
|
568
|
-
var
|
|
569
|
-
const
|
|
565
|
+
stopUpdating: u,
|
|
566
|
+
isUpdating: j
|
|
567
|
+
} = Ne(), y = (a, _, g) => {
|
|
568
|
+
var ge;
|
|
569
|
+
const re = Object.fromEntries(
|
|
570
570
|
Object.entries(_).filter(([, G]) => G !== void 0)
|
|
571
571
|
);
|
|
572
|
-
if (Object.keys(
|
|
573
|
-
(
|
|
572
|
+
if (Object.keys(re).length === 0) {
|
|
573
|
+
(ge = g == null ? void 0 : g.onSuccess) == null || ge.call(g);
|
|
574
574
|
return;
|
|
575
575
|
}
|
|
576
|
-
const
|
|
577
|
-
R(a,
|
|
576
|
+
const fe = Object.keys(re), le = fe.length === 1 ? fe[0] : void 0;
|
|
577
|
+
R(a, le), d(
|
|
578
578
|
{
|
|
579
579
|
resourceId: a,
|
|
580
|
-
data:
|
|
580
|
+
data: re
|
|
581
581
|
},
|
|
582
582
|
{
|
|
583
583
|
onSuccess: () => {
|
|
584
584
|
var G;
|
|
585
|
-
|
|
585
|
+
u(a, le), (G = g == null ? void 0 : g.onSuccess) == null || G.call(g);
|
|
586
586
|
},
|
|
587
587
|
onError: () => {
|
|
588
588
|
var G;
|
|
589
|
-
|
|
589
|
+
u(a, le), (G = g == null ? void 0 : g.onError) == null || G.call(g);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
);
|
|
593
|
-
},
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
|
|
593
|
+
}, H = (a) => {
|
|
594
|
+
D(a), x(!0);
|
|
595
|
+
}, ne = (a) => {
|
|
596
|
+
r == null || r(a.id), S(a);
|
|
597
597
|
}, P = () => {
|
|
598
598
|
S(null);
|
|
599
|
-
},
|
|
599
|
+
}, He = ({
|
|
600
600
|
title: a,
|
|
601
601
|
description: _
|
|
602
602
|
}) => {
|
|
603
|
-
if (!
|
|
603
|
+
if (!N)
|
|
604
604
|
return;
|
|
605
605
|
const g = {};
|
|
606
|
-
a !==
|
|
606
|
+
a !== N.title && (g.title = a), (N.description || "") !== _ && (g.description = _), y(N.id, g, {
|
|
607
607
|
onSuccess: () => {
|
|
608
608
|
S(null);
|
|
609
609
|
}
|
|
610
610
|
});
|
|
611
611
|
};
|
|
612
|
-
return
|
|
613
|
-
/* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children:
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
/* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children:
|
|
616
|
-
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children:
|
|
617
|
-
] }) :
|
|
612
|
+
return z ? /* @__PURE__ */ e(Ke, {}) : F ? /* @__PURE__ */ e(Ct, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
|
|
613
|
+
/* @__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: [
|
|
614
|
+
/* @__PURE__ */ e(Ye, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
615
|
+
/* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: f ? "No dashboards found" : "No dashboards yet" }),
|
|
616
|
+
/* @__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." })
|
|
617
|
+
] }) : Q.map((a) => /* @__PURE__ */ e(
|
|
618
618
|
yt,
|
|
619
619
|
{
|
|
620
620
|
dashboard: a,
|
|
621
621
|
isDeleting: L,
|
|
622
|
-
isDuplicating:
|
|
623
|
-
onLoadDashboard:
|
|
624
|
-
onEditDetails:
|
|
625
|
-
onDeleteClick:
|
|
622
|
+
isDuplicating: O === a.id,
|
|
623
|
+
onLoadDashboard: $,
|
|
624
|
+
onEditDetails: ne,
|
|
625
|
+
onDeleteClick: q,
|
|
626
626
|
onDuplicateDashboard: s,
|
|
627
|
-
onShareDashboard:
|
|
628
|
-
formatDate:
|
|
629
|
-
onDashboardItemClick:
|
|
627
|
+
onShareDashboard: H,
|
|
628
|
+
formatDate: W,
|
|
629
|
+
onDashboardItemClick: o
|
|
630
630
|
},
|
|
631
631
|
a.id
|
|
632
632
|
)) }),
|
|
633
|
-
h &&
|
|
633
|
+
h && i && /* @__PURE__ */ e(
|
|
634
634
|
ye,
|
|
635
635
|
{
|
|
636
|
-
resource:
|
|
636
|
+
resource: i,
|
|
637
637
|
resourceType: Ce.DASHBOARD,
|
|
638
638
|
onClose: () => {
|
|
639
|
-
|
|
639
|
+
x(!1), D(null);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
),
|
|
643
643
|
/* @__PURE__ */ e(
|
|
644
644
|
Se,
|
|
645
645
|
{
|
|
646
|
-
open:
|
|
646
|
+
open: w,
|
|
647
647
|
onOpenChange: (a) => {
|
|
648
|
-
!a && L || (
|
|
648
|
+
!a && L || (l(a), a || p(null));
|
|
649
649
|
},
|
|
650
650
|
children: /* @__PURE__ */ n(Ee, { children: [
|
|
651
651
|
/* @__PURE__ */ n(Ve, { children: [
|
|
652
652
|
/* @__PURE__ */ e(Le, { children: "Delete Dashboard" }),
|
|
653
|
-
/* @__PURE__ */ n(
|
|
653
|
+
/* @__PURE__ */ n(Oe, { children: [
|
|
654
654
|
'Are you sure you want to delete "',
|
|
655
|
-
|
|
655
|
+
c == null ? void 0 : c.title,
|
|
656
656
|
'"? This action cannot be undone.'
|
|
657
657
|
] })
|
|
658
658
|
] }),
|
|
659
|
-
/* @__PURE__ */ n(
|
|
660
|
-
/* @__PURE__ */ e(
|
|
659
|
+
/* @__PURE__ */ n(Ae, { children: [
|
|
660
|
+
/* @__PURE__ */ e(Te, { disabled: L, children: "Cancel" }),
|
|
661
661
|
/* @__PURE__ */ n(
|
|
662
|
-
|
|
662
|
+
Re,
|
|
663
663
|
{
|
|
664
664
|
onClick: (a) => {
|
|
665
|
-
a.preventDefault(), a.stopPropagation(),
|
|
665
|
+
a.preventDefault(), a.stopPropagation(), J();
|
|
666
666
|
},
|
|
667
667
|
disabled: L,
|
|
668
668
|
children: [
|
|
669
|
-
L ? /* @__PURE__ */ e(
|
|
669
|
+
L ? /* @__PURE__ */ e(te, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
|
|
670
670
|
L ? "Deleting…" : "Delete"
|
|
671
671
|
]
|
|
672
672
|
}
|
|
@@ -675,100 +675,182 @@ function vt(t) {
|
|
|
675
675
|
] })
|
|
676
676
|
}
|
|
677
677
|
),
|
|
678
|
-
|
|
678
|
+
N && /* @__PURE__ */ e(
|
|
679
679
|
ve,
|
|
680
680
|
{
|
|
681
|
-
open: !!
|
|
681
|
+
open: !!N,
|
|
682
682
|
resourceLabel: "Dashboard",
|
|
683
|
-
initialTitle:
|
|
684
|
-
initialDescription:
|
|
683
|
+
initialTitle: N.title || "",
|
|
684
|
+
initialDescription: N.description || "",
|
|
685
685
|
onClose: P,
|
|
686
|
-
onSave:
|
|
687
|
-
isSaving:
|
|
686
|
+
onSave: He,
|
|
687
|
+
isSaving: j(N.id)
|
|
688
688
|
}
|
|
689
689
|
)
|
|
690
690
|
] });
|
|
691
691
|
}
|
|
692
|
-
function St(t,
|
|
693
|
-
const { enabled:
|
|
694
|
-
return
|
|
695
|
-
const h = (
|
|
696
|
-
const
|
|
697
|
-
|
|
692
|
+
function St(t, f = {}) {
|
|
693
|
+
const { enabled: m = !0, eventType: r = "mousedown" } = f, o = Je(null);
|
|
694
|
+
return ee(() => {
|
|
695
|
+
const h = (x) => {
|
|
696
|
+
const i = x.target;
|
|
697
|
+
o.current && o.current.contains(i) || i instanceof Element && (i.closest("[data-radix-popper-content-wrapper]") || i.closest("[data-radix-select-content]") || i.closest("[data-radix-popover-content]") || i.closest("[data-radix-dropdown-menu-content]") || i.closest("[data-radix-tooltip-content]") || i.closest('[role="listbox"]') || i.closest('[role="option"]') || i.closest('[role="combobox"]')) || i instanceof Element && i.hasAttribute("data-radix-") || t();
|
|
698
698
|
};
|
|
699
|
-
return
|
|
700
|
-
document.removeEventListener(
|
|
699
|
+
return m && document.addEventListener(r, h), () => {
|
|
700
|
+
document.removeEventListener(r, h);
|
|
701
701
|
};
|
|
702
|
-
}, [t,
|
|
702
|
+
}, [t, m, r]), o;
|
|
703
703
|
}
|
|
704
704
|
function Et({
|
|
705
705
|
open: t,
|
|
706
|
-
onOpenChange:
|
|
707
|
-
onSubmit:
|
|
708
|
-
isCreating:
|
|
706
|
+
onOpenChange: f,
|
|
707
|
+
onSubmit: m,
|
|
708
|
+
isCreating: r
|
|
709
709
|
}) {
|
|
710
|
-
const [
|
|
711
|
-
|
|
712
|
-
t || (h(""),
|
|
710
|
+
const [o, h] = b(""), [x, i] = b("");
|
|
711
|
+
ee(() => {
|
|
712
|
+
t || (h(""), i(""));
|
|
713
713
|
}, [t]);
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
},
|
|
717
|
-
|
|
714
|
+
const D = () => {
|
|
715
|
+
o.trim() && m({ title: o, description: x });
|
|
716
|
+
}, w = (l) => {
|
|
717
|
+
f(l);
|
|
718
718
|
};
|
|
719
|
-
return /* @__PURE__ */ e(
|
|
720
|
-
/* @__PURE__ */ n(
|
|
721
|
-
/* @__PURE__ */ e(
|
|
722
|
-
/* @__PURE__ */ e(
|
|
719
|
+
return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: w, children: /* @__PURE__ */ n(Me, { className: "sm:max-w-[480px]", children: [
|
|
720
|
+
/* @__PURE__ */ n(Pe, { children: [
|
|
721
|
+
/* @__PURE__ */ e(ze, { className: "text-[15px]", children: "New dashboard" }),
|
|
722
|
+
/* @__PURE__ */ e(Fe, { className: "text-[13px]", children: "Give it a name and an optional description." })
|
|
723
|
+
] }),
|
|
724
|
+
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
725
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
726
|
+
/* @__PURE__ */ e(ie, { htmlFor: "title", className: "text-[13px] font-medium", children: "Title" }),
|
|
727
|
+
/* @__PURE__ */ e(
|
|
728
|
+
de,
|
|
729
|
+
{
|
|
730
|
+
id: "title",
|
|
731
|
+
size: "xs",
|
|
732
|
+
placeholder: "e.g. Sales analytics, User engagement",
|
|
733
|
+
value: o,
|
|
734
|
+
onChange: (l) => h(l.target.value),
|
|
735
|
+
disabled: r,
|
|
736
|
+
onKeyDown: (l) => {
|
|
737
|
+
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), D());
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
] }),
|
|
742
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
|
|
743
|
+
/* @__PURE__ */ e(ie, { htmlFor: "description", className: "text-[13px] font-medium", children: "Description" }),
|
|
744
|
+
/* @__PURE__ */ e(
|
|
745
|
+
ft,
|
|
746
|
+
{
|
|
747
|
+
id: "description",
|
|
748
|
+
placeholder: "Optional — briefly describe what this dashboard tracks",
|
|
749
|
+
rows: 3,
|
|
750
|
+
value: x,
|
|
751
|
+
onChange: (l) => i(l.target.value),
|
|
752
|
+
disabled: r,
|
|
753
|
+
className: "resize-none text-[12px]"
|
|
754
|
+
}
|
|
755
|
+
)
|
|
756
|
+
] })
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ n(je, { className: "gap-1.5", children: [
|
|
759
|
+
/* @__PURE__ */ e(
|
|
760
|
+
A,
|
|
761
|
+
{
|
|
762
|
+
type: "button",
|
|
763
|
+
variant: "outline",
|
|
764
|
+
size: "xs",
|
|
765
|
+
onClick: () => w(!1),
|
|
766
|
+
disabled: r,
|
|
767
|
+
children: "Cancel"
|
|
768
|
+
}
|
|
769
|
+
),
|
|
770
|
+
/* @__PURE__ */ e(
|
|
771
|
+
A,
|
|
772
|
+
{
|
|
773
|
+
type: "button",
|
|
774
|
+
size: "xs",
|
|
775
|
+
onClick: D,
|
|
776
|
+
disabled: !o.trim() || r,
|
|
777
|
+
children: r ? /* @__PURE__ */ n(oe, { children: [
|
|
778
|
+
/* @__PURE__ */ e(te, { className: "h-3 w-3 animate-spin" }),
|
|
779
|
+
"Creating…"
|
|
780
|
+
] }) : "Create dashboard"
|
|
781
|
+
}
|
|
782
|
+
)
|
|
783
|
+
] })
|
|
784
|
+
] }) });
|
|
785
|
+
}
|
|
786
|
+
function Vt({
|
|
787
|
+
open: t,
|
|
788
|
+
onOpenChange: f,
|
|
789
|
+
onSubmit: m,
|
|
790
|
+
isCreating: r
|
|
791
|
+
}) {
|
|
792
|
+
const [o, h] = b(""), [x, i] = b("");
|
|
793
|
+
ee(() => {
|
|
794
|
+
t || (h(""), i(""));
|
|
795
|
+
}, [t]);
|
|
796
|
+
const D = () => {
|
|
797
|
+
o.trim() && m({ title: o, description: x });
|
|
798
|
+
}, w = (l) => {
|
|
799
|
+
f(l);
|
|
800
|
+
};
|
|
801
|
+
return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: w, children: /* @__PURE__ */ n(Me, { children: [
|
|
802
|
+
/* @__PURE__ */ n(Pe, { children: [
|
|
803
|
+
/* @__PURE__ */ e(ze, { children: "Create New Visual" }),
|
|
804
|
+
/* @__PURE__ */ e(Fe, { children: "Add a new visual to your library. You can configure it after creation." })
|
|
723
805
|
] }),
|
|
724
806
|
/* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
|
|
725
807
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
726
|
-
/* @__PURE__ */ e(
|
|
808
|
+
/* @__PURE__ */ e(ie, { htmlFor: "title", children: "Visual Title" }),
|
|
727
809
|
/* @__PURE__ */ e(
|
|
728
|
-
|
|
810
|
+
de,
|
|
729
811
|
{
|
|
730
812
|
id: "title",
|
|
731
813
|
placeholder: "Enter visual title...",
|
|
732
|
-
value:
|
|
733
|
-
onChange: (
|
|
734
|
-
disabled:
|
|
735
|
-
onKeyDown: (
|
|
736
|
-
|
|
814
|
+
value: o,
|
|
815
|
+
onChange: (l) => h(l.target.value),
|
|
816
|
+
disabled: r,
|
|
817
|
+
onKeyDown: (l) => {
|
|
818
|
+
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), D());
|
|
737
819
|
}
|
|
738
820
|
}
|
|
739
821
|
)
|
|
740
822
|
] }),
|
|
741
823
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
742
|
-
/* @__PURE__ */ e(
|
|
824
|
+
/* @__PURE__ */ e(ie, { htmlFor: "description", children: "Description (optional)" }),
|
|
743
825
|
/* @__PURE__ */ e(
|
|
744
|
-
|
|
826
|
+
de,
|
|
745
827
|
{
|
|
746
828
|
id: "description",
|
|
747
829
|
placeholder: "Enter visual description...",
|
|
748
|
-
value:
|
|
749
|
-
onChange: (
|
|
750
|
-
disabled:
|
|
830
|
+
value: x,
|
|
831
|
+
onChange: (l) => i(l.target.value),
|
|
832
|
+
disabled: r
|
|
751
833
|
}
|
|
752
834
|
)
|
|
753
835
|
] })
|
|
754
836
|
] }),
|
|
755
|
-
/* @__PURE__ */ n(
|
|
837
|
+
/* @__PURE__ */ n(je, { children: [
|
|
756
838
|
/* @__PURE__ */ e(
|
|
757
|
-
|
|
839
|
+
A,
|
|
758
840
|
{
|
|
759
841
|
variant: "outline",
|
|
760
|
-
onClick: () =>
|
|
761
|
-
disabled:
|
|
842
|
+
onClick: () => w(!1),
|
|
843
|
+
disabled: r,
|
|
762
844
|
children: "Cancel"
|
|
763
845
|
}
|
|
764
846
|
),
|
|
765
847
|
/* @__PURE__ */ e(
|
|
766
|
-
|
|
848
|
+
A,
|
|
767
849
|
{
|
|
768
|
-
onClick:
|
|
769
|
-
disabled: !
|
|
770
|
-
children:
|
|
771
|
-
/* @__PURE__ */ e(
|
|
850
|
+
onClick: D,
|
|
851
|
+
disabled: !o.trim() || r,
|
|
852
|
+
children: r ? /* @__PURE__ */ n(oe, { children: [
|
|
853
|
+
/* @__PURE__ */ e(te, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
772
854
|
"Creating..."
|
|
773
855
|
] }) : "Create Visual"
|
|
774
856
|
}
|
|
@@ -776,160 +858,160 @@ function Et({
|
|
|
776
858
|
] })
|
|
777
859
|
] }) });
|
|
778
860
|
}
|
|
779
|
-
function
|
|
861
|
+
function Ut({
|
|
780
862
|
isOpen: t,
|
|
781
|
-
onClose:
|
|
782
|
-
className:
|
|
783
|
-
onDashboardItemClick:
|
|
784
|
-
variant:
|
|
863
|
+
onClose: f,
|
|
864
|
+
className: m,
|
|
865
|
+
onDashboardItemClick: r,
|
|
866
|
+
variant: o = "inline"
|
|
785
867
|
}) {
|
|
786
|
-
var
|
|
787
|
-
const h =
|
|
788
|
-
(
|
|
789
|
-
), [
|
|
790
|
-
onDashboardSelect:
|
|
791
|
-
}), { selectVisual: S } =
|
|
868
|
+
var u, j;
|
|
869
|
+
const h = se(
|
|
870
|
+
(y) => y.isDashboardEditing
|
|
871
|
+
), [x, i] = b(!1), [D, w] = b(""), [l, c] = b(!1), { currentUser: p, userContext: O } = pe(), U = ((u = O == null ? void 0 : O.permissions) == null ? void 0 : u.canCreateDashboard) ?? !1, { onCreateSuccess: N } = gt({
|
|
872
|
+
onDashboardSelect: r
|
|
873
|
+
}), { selectVisual: S } = ue(), { handleEditLibraryVisual: E } = Be(), {
|
|
792
874
|
createResource: V,
|
|
793
|
-
isCreating:
|
|
875
|
+
isCreating: T,
|
|
794
876
|
refetch: C
|
|
795
|
-
} = Ue(), { createResource: v, isCreating: M } =
|
|
877
|
+
} = Ue(), { createResource: v, isCreating: M } = we(
|
|
796
878
|
void 0,
|
|
797
879
|
// onDeleteSuccess (not needed here)
|
|
798
|
-
(
|
|
799
|
-
|
|
880
|
+
(y) => {
|
|
881
|
+
i(!1), y && (S(y), E(y));
|
|
800
882
|
}
|
|
801
|
-
),
|
|
802
|
-
enabled: t &&
|
|
803
|
-
}),
|
|
883
|
+
), I = o === "overlay", z = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", d = h ? "Search visuals..." : "Search dashboards...", Y = 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 = ((j = K.charAt(0)) == null ? void 0 : j.toUpperCase()) || "?", W = L && L.toLowerCase() !== "undefined" ? L : "", $ = St(f, {
|
|
884
|
+
enabled: t && I
|
|
885
|
+
}), q = Z(
|
|
804
886
|
"flex h-full flex-col border-r border-border/60 bg-background",
|
|
805
|
-
|
|
887
|
+
I ? Z(
|
|
806
888
|
"absolute inset-y-0 left-0 z-[51] w-60 overflow-hidden shadow-lg transition-transform duration-300 ease-in-out",
|
|
807
889
|
t ? "translate-x-0" : "pointer-events-none -translate-x-full"
|
|
808
890
|
) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden",
|
|
809
|
-
|
|
810
|
-
),
|
|
811
|
-
}, s = (
|
|
812
|
-
console.log("Editing dashboard:",
|
|
813
|
-
}, R = (
|
|
814
|
-
V(
|
|
815
|
-
onSuccess: (
|
|
816
|
-
|
|
891
|
+
m
|
|
892
|
+
), J = (y) => {
|
|
893
|
+
}, s = (y) => {
|
|
894
|
+
console.log("Editing dashboard:", y);
|
|
895
|
+
}, R = (y) => {
|
|
896
|
+
V(y, {
|
|
897
|
+
onSuccess: (H) => {
|
|
898
|
+
i(!1), N(H, C);
|
|
817
899
|
}
|
|
818
900
|
});
|
|
819
901
|
};
|
|
820
|
-
return /* @__PURE__ */ e(
|
|
821
|
-
/* @__PURE__ */ e("div", { className: "border-b border-border/60 bg-background", children:
|
|
902
|
+
return /* @__PURE__ */ e(oe, { children: (!I || t) && /* @__PURE__ */ n("div", { ref: $, className: q, children: [
|
|
903
|
+
/* @__PURE__ */ e("div", { className: "border-b border-border/60 bg-background", children: l ? /* @__PURE__ */ n("div", { className: "flex h-10 items-center gap-1 px-3", children: [
|
|
822
904
|
/* @__PURE__ */ e(De, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
823
905
|
/* @__PURE__ */ e(
|
|
824
906
|
"input",
|
|
825
907
|
{
|
|
826
908
|
autoFocus: !0,
|
|
827
|
-
value:
|
|
828
|
-
onChange: (
|
|
829
|
-
onKeyDown: (
|
|
830
|
-
|
|
909
|
+
value: D,
|
|
910
|
+
onChange: (y) => w(y.target.value),
|
|
911
|
+
onKeyDown: (y) => {
|
|
912
|
+
y.key === "Escape" && (w(""), c(!1));
|
|
831
913
|
},
|
|
832
|
-
placeholder:
|
|
914
|
+
placeholder: d,
|
|
833
915
|
className: "h-7 min-w-0 flex-1 bg-transparent text-[13px] text-foreground placeholder:text-muted-foreground focus:outline-none",
|
|
834
|
-
"aria-label":
|
|
916
|
+
"aria-label": d
|
|
835
917
|
}
|
|
836
918
|
),
|
|
837
919
|
/* @__PURE__ */ e(
|
|
838
|
-
|
|
920
|
+
A,
|
|
839
921
|
{
|
|
840
922
|
size: "xs",
|
|
841
923
|
variant: "ghost",
|
|
842
924
|
className: "w-7 shrink-0 px-0 text-muted-foreground hover:text-foreground",
|
|
843
925
|
onClick: () => {
|
|
844
|
-
|
|
926
|
+
w(""), c(!1);
|
|
845
927
|
},
|
|
846
928
|
"aria-label": "Close search",
|
|
847
|
-
children: /* @__PURE__ */ e(
|
|
929
|
+
children: /* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5" })
|
|
848
930
|
}
|
|
849
931
|
)
|
|
850
932
|
] }) : /* @__PURE__ */ n("div", { className: "flex h-10 items-center justify-between gap-2 px-3", children: [
|
|
851
933
|
/* @__PURE__ */ e("h2", { className: "whitespace-nowrap text-[13px] font-medium text-foreground", children: h ? "Visuals" : "Dashboards" }),
|
|
852
934
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-0.5", children: [
|
|
853
935
|
/* @__PURE__ */ e(
|
|
854
|
-
|
|
936
|
+
A,
|
|
855
937
|
{
|
|
856
938
|
size: "xs",
|
|
857
939
|
variant: "ghost",
|
|
858
|
-
onClick: () =>
|
|
940
|
+
onClick: () => c(!0),
|
|
859
941
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
860
942
|
"aria-label": "Search",
|
|
861
943
|
children: /* @__PURE__ */ e(De, { className: "h-3.5 w-3.5" })
|
|
862
944
|
}
|
|
863
945
|
),
|
|
864
|
-
(h ||
|
|
865
|
-
|
|
946
|
+
(h || U) && /* @__PURE__ */ n(
|
|
947
|
+
A,
|
|
866
948
|
{
|
|
867
949
|
size: "xs",
|
|
868
950
|
variant: "outline",
|
|
869
|
-
onClick: () =>
|
|
951
|
+
onClick: () => i(!0),
|
|
870
952
|
"aria-label": F,
|
|
871
953
|
children: [
|
|
872
|
-
/* @__PURE__ */ e(
|
|
873
|
-
|
|
954
|
+
/* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }),
|
|
955
|
+
z
|
|
874
956
|
]
|
|
875
957
|
}
|
|
876
958
|
),
|
|
877
959
|
/* @__PURE__ */ e(
|
|
878
|
-
|
|
960
|
+
A,
|
|
879
961
|
{
|
|
880
962
|
size: "xs",
|
|
881
963
|
variant: "ghost",
|
|
882
964
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
883
|
-
onClick:
|
|
884
|
-
"aria-label":
|
|
885
|
-
children: /* @__PURE__ */ e(
|
|
965
|
+
onClick: f,
|
|
966
|
+
"aria-label": Y,
|
|
967
|
+
children: /* @__PURE__ */ e(xt, { className: "h-3.5 w-3.5" })
|
|
886
968
|
}
|
|
887
969
|
)
|
|
888
970
|
] })
|
|
889
971
|
] }) }),
|
|
890
|
-
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(
|
|
972
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(Nt, { searchQuery: D }) : /* @__PURE__ */ e(
|
|
891
973
|
vt,
|
|
892
974
|
{
|
|
893
|
-
searchQuery:
|
|
894
|
-
onLoadDashboard:
|
|
975
|
+
searchQuery: D,
|
|
976
|
+
onLoadDashboard: J,
|
|
895
977
|
onEditDashboard: s,
|
|
896
|
-
onDashboardItemClick:
|
|
978
|
+
onDashboardItemClick: r
|
|
897
979
|
}
|
|
898
980
|
) }),
|
|
899
|
-
|
|
900
|
-
/* @__PURE__ */ e(
|
|
901
|
-
/* @__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:
|
|
902
|
-
/* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children:
|
|
981
|
+
p && /* @__PURE__ */ e(Qe, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(We, { children: [
|
|
982
|
+
/* @__PURE__ */ e(Xe, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
|
|
983
|
+
/* @__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 }),
|
|
984
|
+
/* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children: K })
|
|
903
985
|
] }) }),
|
|
904
|
-
/* @__PURE__ */ e(
|
|
905
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
906
|
-
|
|
907
|
-
|
|
986
|
+
/* @__PURE__ */ e(Ze, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
987
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: K }),
|
|
988
|
+
W && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: W }),
|
|
989
|
+
p.role && /* @__PURE__ */ n("div", { className: "text-[11px] opacity-80", children: [
|
|
908
990
|
"Role:",
|
|
909
991
|
" ",
|
|
910
|
-
|
|
992
|
+
$e(p.role.replace(/_/g, " "))
|
|
911
993
|
] })
|
|
912
994
|
] }) })
|
|
913
995
|
] }) }) }),
|
|
914
996
|
h ? /* @__PURE__ */ e(
|
|
915
|
-
|
|
997
|
+
Vt,
|
|
916
998
|
{
|
|
917
|
-
open:
|
|
918
|
-
onOpenChange:
|
|
999
|
+
open: x,
|
|
1000
|
+
onOpenChange: i,
|
|
919
1001
|
onSubmit: v,
|
|
920
1002
|
isCreating: M
|
|
921
1003
|
}
|
|
922
1004
|
) : /* @__PURE__ */ e(
|
|
923
|
-
|
|
1005
|
+
Et,
|
|
924
1006
|
{
|
|
925
|
-
open:
|
|
926
|
-
onOpenChange:
|
|
1007
|
+
open: x,
|
|
1008
|
+
onOpenChange: i,
|
|
927
1009
|
onSubmit: R,
|
|
928
|
-
isCreating:
|
|
1010
|
+
isCreating: T
|
|
929
1011
|
}
|
|
930
1012
|
)
|
|
931
1013
|
] }) });
|
|
932
1014
|
}
|
|
933
1015
|
export {
|
|
934
|
-
|
|
1016
|
+
Ut as ResourceManagementPanel
|
|
935
1017
|
};
|