react-semaphor 0.1.285 → 0.1.287
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/chunks/{dashboard-controls-DSwmmI8w.js → dashboard-controls-B8xnCPTZ.js} +318 -341
- package/dist/chunks/{dashboard-controls-B8f_BKTb.js → dashboard-controls-C25JMBLV.js} +4 -4
- package/dist/chunks/dashboard-filter-controls-button-BOJUiKGk.js +11 -0
- package/dist/chunks/{dashboard-filter-controls-button-BqmNXVoa.js → dashboard-filter-controls-button-D-o6ofi2.js} +476 -442
- package/dist/chunks/{dashboard-json-D0H5w5WI.js → dashboard-json-BYCWtm_z.js} +1 -1
- package/dist/chunks/{dashboard-json-qT21EDMm.js → dashboard-json-DFuRB4cG.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BRI5dAfz.js → dashboard-summary-settings-dialog-CFTJNcmp.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-Mq8T35Qv.js → dashboard-summary-settings-dialog-CsnHeIhi.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DLpQykTX.js → edit-dashboard-visual-DU3NzdD5.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-gSIS7RGI.js → edit-dashboard-visual-YmESbDUP.js} +4 -4
- package/dist/chunks/{index-Celt_oJr.js → index-BDE8cMG8.js} +170 -170
- package/dist/chunks/{index-r_DA-pny.js → index-Bz0-3JKw.js} +10194 -10218
- package/dist/chunks/resource-management-panel-C6qnO0ID.js +6 -0
- package/dist/chunks/resource-management-panel-Lxjcn4i0.js +933 -0
- package/dist/chunks/use-create-flow-overlay-state-AXNDXDqV.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-C1xhazfY.js → use-create-flow-overlay-state-CJiyn4FY.js} +142 -145
- package/dist/chunks/{use-visual-utils-CWcTBBvd.js → use-visual-utils-BygqTxyR.js} +1 -1
- package/dist/chunks/{use-visual-utils-CqL5PNOR.js → use-visual-utils-CWVz-eYg.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +18 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-DXKJ-0iV.js +0 -11
- package/dist/chunks/resource-management-panel-Brj3iNyX.js +0 -6
- package/dist/chunks/resource-management-panel-DXLca9OX.js +0 -920
- package/dist/chunks/use-create-flow-overlay-state-DVyd9L7O.js +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { bM as le, U as L, bN as Ke, bO as pt, bP as mt, bQ as ft, bR as ht, bS as bt, u as De, af as gt, bT as yt, bU as xt, bV as vt, ac as Ct, c as
|
|
2
|
-
import { jsx as t, jsxs as d, Fragment as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { u as we } from "./use-visual-utils-
|
|
1
|
+
import { bM as le, U as L, bN as Ke, bO as pt, bP as mt, bQ as ft, bR as ht, bS as bt, u as De, af as gt, bT as yt, bU as xt, bV as vt, ac as Ct, c as re, bW as kt, bX as Nt, B as q, s as St, H as ne, N as Ye, J as He, bY as Xe, w as Pe, M as Ne, bZ as Ge, X as Je, x as M, b_ as Dt, b$ as wt, c0 as te, c1 as Fe, c2 as Ae, c3 as fe, c4 as he, c5 as Tt, c6 as ze, c7 as Vt, c8 as It, c9 as ae, ca as qt, cb as Me, cc as Et, a6 as Oe, cd as Be, ce as We, cf as Ze, cg as et, ch as _t, L as Y, I as tt, y as be, z as ge, A as ye, E as xe, F as ve, ci as at, cj as Lt, ck as Ft, cl as rt, cm as st, cn as At, co as zt, cp as Mt, cq as Ot, cr as Bt, cs as Qt, ct as jt, cu as Qe, cv as Rt, cw as je, cx as Ut, cy as Ce, cz as $t } from "./index-Bz0-3JKw.js";
|
|
2
|
+
import { jsx as t, jsxs as d, Fragment as U } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as A, useState as O, useRef as ke, useCallback as z, useEffect as Se, Fragment as Kt } from "react";
|
|
4
|
+
import { u as we } from "./use-visual-utils-CWVz-eYg.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.453.0 - ISC
|
|
7
7
|
*
|
|
@@ -55,12 +55,12 @@ const lt = le("Save", [
|
|
|
55
55
|
]);
|
|
56
56
|
function nt() {
|
|
57
57
|
var h, C;
|
|
58
|
-
const s = L((x) => x.card), r = L((x) => x.frame), o =
|
|
58
|
+
const s = L((x) => x.card), r = L((x) => x.frame), o = A(
|
|
59
59
|
() => Ke(r, s),
|
|
60
60
|
[r, s]
|
|
61
61
|
), { manifest: i } = pt(
|
|
62
62
|
((h = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : h.url) || ""
|
|
63
|
-
), f =
|
|
63
|
+
), f = A(
|
|
64
64
|
() => {
|
|
65
65
|
var x;
|
|
66
66
|
return (x = i == null ? void 0 : i.visuals) == null ? void 0 : x.find(
|
|
@@ -71,20 +71,20 @@ function nt() {
|
|
|
71
71
|
);
|
|
72
72
|
},
|
|
73
73
|
[i, (C = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : C.componentName]
|
|
74
|
-
), u = mt(o, f), b =
|
|
74
|
+
), u = mt(o, f), b = A(
|
|
75
75
|
() => ft({
|
|
76
76
|
frame: r,
|
|
77
77
|
configCard: o,
|
|
78
78
|
isMultiInputVisual: u === "multiple"
|
|
79
79
|
}),
|
|
80
80
|
[r, o, u]
|
|
81
|
-
), v =
|
|
81
|
+
), v = A(() => {
|
|
82
82
|
const x = b.findIndex(
|
|
83
83
|
(m) => (m == null ? void 0 : m.id) === s.id
|
|
84
84
|
);
|
|
85
85
|
return x < 0 ? -1 : ht(s, x);
|
|
86
86
|
}, [b, s]);
|
|
87
|
-
return
|
|
87
|
+
return A(() => !o || u !== "multiple" || v < 0 ? s.type : bt(
|
|
88
88
|
s,
|
|
89
89
|
v,
|
|
90
90
|
f == null ? void 0 : f.slots
|
|
@@ -145,7 +145,7 @@ function sa({
|
|
|
145
145
|
Ct,
|
|
146
146
|
{
|
|
147
147
|
variant: "outline",
|
|
148
|
-
className:
|
|
148
|
+
className: re(
|
|
149
149
|
"cursor-help select-none transition-all",
|
|
150
150
|
C[h],
|
|
151
151
|
o
|
|
@@ -160,7 +160,7 @@ function sa({
|
|
|
160
160
|
kt,
|
|
161
161
|
{
|
|
162
162
|
side: "bottom",
|
|
163
|
-
className:
|
|
163
|
+
className: re("max-w-xs", m[h]),
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ t(Nt, { className: g[h] }),
|
|
166
166
|
/* @__PURE__ */ t("p", { children: x[h] })
|
|
@@ -187,7 +187,7 @@ function Xt(s, r) {
|
|
|
187
187
|
}
|
|
188
188
|
function Te(s) {
|
|
189
189
|
const r = Dt(s);
|
|
190
|
-
return r ? (
|
|
190
|
+
return r ? (M.error(r), !1) : !0;
|
|
191
191
|
}
|
|
192
192
|
function la({
|
|
193
193
|
className: s,
|
|
@@ -202,11 +202,11 @@ function la({
|
|
|
202
202
|
q,
|
|
203
203
|
{
|
|
204
204
|
onClick: f,
|
|
205
|
-
className:
|
|
206
|
-
size: "
|
|
205
|
+
className: s,
|
|
206
|
+
size: "xs",
|
|
207
207
|
variant: r,
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */ t(St, { className: "
|
|
209
|
+
/* @__PURE__ */ t(St, { className: "h-3.5 w-3.5" }),
|
|
210
210
|
"Accept"
|
|
211
211
|
]
|
|
212
212
|
}
|
|
@@ -216,10 +216,10 @@ function na({
|
|
|
216
216
|
className: s,
|
|
217
217
|
variant: r = "default"
|
|
218
218
|
}) {
|
|
219
|
-
const o = ne(), [i, f] =
|
|
219
|
+
const o = ne(), [i, f] = O(!1), u = De(
|
|
220
220
|
(g) => g.actions.setIsDashboardPanelOpen
|
|
221
221
|
), { setIsVisualEditing: b } = Ye(), { getUpdatedFrame: v } = we(), h = He(), C = L((g) => g.frame), x = Xe();
|
|
222
|
-
return /* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ t(
|
|
223
223
|
q,
|
|
224
224
|
{
|
|
225
225
|
onClick: () => {
|
|
@@ -228,7 +228,7 @@ function na({
|
|
|
228
228
|
return;
|
|
229
229
|
const N = (C == null ? void 0 : C.visualId) || (h == null ? void 0 : h.id);
|
|
230
230
|
if (!N) {
|
|
231
|
-
|
|
231
|
+
M.error("No visual to save");
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
f(!0), x.mutate(
|
|
@@ -240,48 +240,45 @@ function na({
|
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
onSuccess: () => {
|
|
243
|
-
f(!1), u(!0),
|
|
243
|
+
f(!1), u(!0), M.success("Visual updated successfully"), o.invalidateQueries({
|
|
244
244
|
queryKey: ["resource-by-id", "visual", N],
|
|
245
245
|
exact: !0
|
|
246
246
|
});
|
|
247
247
|
},
|
|
248
248
|
onError: () => {
|
|
249
|
-
f(!1),
|
|
249
|
+
f(!1), M.error("Failed to update visual");
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
);
|
|
253
253
|
},
|
|
254
|
-
className:
|
|
255
|
-
size: "
|
|
254
|
+
className: s,
|
|
255
|
+
size: "xs",
|
|
256
256
|
variant: r,
|
|
257
|
-
children: [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
"Save to Library"
|
|
265
|
-
] })
|
|
266
|
-
]
|
|
257
|
+
children: i ? /* @__PURE__ */ d(U, { children: [
|
|
258
|
+
/* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
259
|
+
"Saving"
|
|
260
|
+
] }) : /* @__PURE__ */ d(U, { children: [
|
|
261
|
+
/* @__PURE__ */ t(lt, { className: "h-3.5 w-3.5" }),
|
|
262
|
+
"Save to Library"
|
|
263
|
+
] })
|
|
267
264
|
}
|
|
268
265
|
);
|
|
269
266
|
}
|
|
270
267
|
function oa({
|
|
271
268
|
className: s
|
|
272
269
|
}) {
|
|
273
|
-
const r = ne(), [o, i] =
|
|
270
|
+
const r = ne(), [o, i] = O(!1), f = He(), u = L((g) => g.frame), b = De((g) => g.selectedSheetId), { updateFrame: v, setIsVisualEditing: h } = Ye(), { getUpdatedFrame: C } = we(), x = Xe();
|
|
274
271
|
return /* @__PURE__ */ t(
|
|
275
272
|
q,
|
|
276
273
|
{
|
|
277
274
|
onClick: async () => {
|
|
278
275
|
if (!b) {
|
|
279
|
-
|
|
276
|
+
M.error("No sheet selected");
|
|
280
277
|
return;
|
|
281
278
|
}
|
|
282
279
|
const g = (u == null ? void 0 : u.visualId) || (f == null ? void 0 : f.id);
|
|
283
280
|
if (!g) {
|
|
284
|
-
|
|
281
|
+
M.error("No visual to update");
|
|
285
282
|
return;
|
|
286
283
|
}
|
|
287
284
|
i(!0);
|
|
@@ -302,31 +299,31 @@ function oa({
|
|
|
302
299
|
visualId: g
|
|
303
300
|
// Keep the link to library visual
|
|
304
301
|
};
|
|
305
|
-
v(b, V), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", g] }),
|
|
302
|
+
v(b, V), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", g] }), M.success("Saved to library and applied locally"), setTimeout(() => {
|
|
306
303
|
h(!1);
|
|
307
304
|
}, 300);
|
|
308
305
|
} catch (N) {
|
|
309
|
-
console.error("Failed to save and apply:", N),
|
|
306
|
+
console.error("Failed to save and apply:", N), M.error("Failed to save and apply changes");
|
|
310
307
|
} finally {
|
|
311
308
|
i(!1);
|
|
312
309
|
}
|
|
313
310
|
},
|
|
314
|
-
className:
|
|
315
|
-
size: "
|
|
311
|
+
className: s,
|
|
312
|
+
size: "xs",
|
|
316
313
|
variant: "default",
|
|
317
314
|
disabled: o,
|
|
318
|
-
children: o ? /* @__PURE__ */ d(
|
|
319
|
-
/* @__PURE__ */ t(Pe, { className: "
|
|
320
|
-
"
|
|
321
|
-
] }) : /* @__PURE__ */ d(
|
|
322
|
-
/* @__PURE__ */ t(lt, { className: "
|
|
315
|
+
children: o ? /* @__PURE__ */ d(U, { children: [
|
|
316
|
+
/* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
317
|
+
"Saving..."
|
|
318
|
+
] }) : /* @__PURE__ */ d(U, { children: [
|
|
319
|
+
/* @__PURE__ */ t(lt, { className: "h-3.5 w-3.5" }),
|
|
323
320
|
"Save & Apply"
|
|
324
321
|
] })
|
|
325
322
|
}
|
|
326
323
|
);
|
|
327
324
|
}
|
|
328
325
|
function ia({ className: s }) {
|
|
329
|
-
const { setTempQueryData: r, setSqlGen: o } = Ne(), i = ne(), f = L((m) => m.tempQueryData), u = L((m) => m.onClose), b = L((m) => m.card), v = nt(), h =
|
|
326
|
+
const { setTempQueryData: r, setSqlGen: o } = Ne(), i = ne(), f = L((m) => m.tempQueryData), u = L((m) => m.onClose), b = L((m) => m.card), v = nt(), h = A(() => v !== b.type ? { ...b, type: v } : b, [b, v]), { queryKey: C } = Ge(h);
|
|
330
327
|
function x() {
|
|
331
328
|
if (f) {
|
|
332
329
|
const { queryKey: m, queryData: g } = f;
|
|
@@ -338,11 +335,11 @@ function ia({ className: s }) {
|
|
|
338
335
|
q,
|
|
339
336
|
{
|
|
340
337
|
onClick: x,
|
|
341
|
-
className:
|
|
342
|
-
size: "
|
|
338
|
+
className: s,
|
|
339
|
+
size: "xs",
|
|
343
340
|
variant: "outline",
|
|
344
341
|
children: [
|
|
345
|
-
/* @__PURE__ */ t(Je, { className: "
|
|
342
|
+
/* @__PURE__ */ t(Je, { className: "h-3.5 w-3.5" }),
|
|
346
343
|
"Close"
|
|
347
344
|
]
|
|
348
345
|
}
|
|
@@ -353,7 +350,7 @@ function da({
|
|
|
353
350
|
variant: r = "secondary",
|
|
354
351
|
className: o
|
|
355
352
|
} = {}) {
|
|
356
|
-
const { setTempQueryData: i } = Ne(), f = ne(), u = L((a) => a.tempQueryData), b = L((a) => a.card), v = nt(), h =
|
|
353
|
+
const { setTempQueryData: i } = Ne(), f = ne(), u = L((a) => a.tempQueryData), b = L((a) => a.card), v = nt(), h = A(() => v !== b.type ? { ...b, type: v } : b, [b, v]), { queryKey: C } = Ge(h), {
|
|
357
354
|
setCardSql: x,
|
|
358
355
|
setSqlGen: m,
|
|
359
356
|
setCardPython: g,
|
|
@@ -362,34 +359,34 @@ function da({
|
|
|
362
359
|
clearQueryConfig: I,
|
|
363
360
|
setCardConfig: oe,
|
|
364
361
|
setCardType: ie,
|
|
365
|
-
setFrame:
|
|
366
|
-
setCard:
|
|
362
|
+
setFrame: Z,
|
|
363
|
+
setCard: H,
|
|
367
364
|
setActiveTabCardId: de
|
|
368
365
|
} = Ne();
|
|
369
|
-
function
|
|
370
|
-
var E,
|
|
366
|
+
function $() {
|
|
367
|
+
var E, P, j, ee;
|
|
371
368
|
const a = f.getQueryData(C);
|
|
372
369
|
u != null && u.queryData || i({
|
|
373
370
|
queryKey: C,
|
|
374
371
|
queryData: a
|
|
375
372
|
}), f.setQueryData(C, null), f.removeQueries({ queryKey: C, exact: !0 }), x(""), m({}), I(), oe(void 0), g(""), N(""), V({});
|
|
376
|
-
const S = L.getState().frame,
|
|
377
|
-
|
|
373
|
+
const S = L.getState().frame, B = L.getState().card, T = Ke(S, B), X = ((E = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : E.visualType) === "multiple" || !!((P = T == null ? void 0 : T.customCardPreferences) != null && P.dataInputCardIds) || (((j = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : j.minInputs) || 0) > 1 || (((ee = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : ee.maxInputs) || 0) > 1, Q = Xt(B, X);
|
|
374
|
+
Z({
|
|
378
375
|
...S,
|
|
379
376
|
cards: S.cards.map(
|
|
380
|
-
(
|
|
377
|
+
(G) => G.id === Q.id ? Q : G
|
|
381
378
|
)
|
|
382
|
-
}), de(
|
|
379
|
+
}), de(Q.id), H(Q), X || ie("bar");
|
|
383
380
|
}
|
|
384
381
|
return /* @__PURE__ */ d(
|
|
385
382
|
q,
|
|
386
383
|
{
|
|
387
|
-
onClick:
|
|
388
|
-
className:
|
|
389
|
-
size: "
|
|
384
|
+
onClick: $,
|
|
385
|
+
className: o,
|
|
386
|
+
size: "xs",
|
|
390
387
|
variant: r,
|
|
391
388
|
children: [
|
|
392
|
-
/* @__PURE__ */ t(Je, { className: "
|
|
389
|
+
/* @__PURE__ */ t(Je, { className: "h-3.5 w-3.5" }),
|
|
393
390
|
s
|
|
394
391
|
]
|
|
395
392
|
}
|
|
@@ -398,7 +395,7 @@ function da({
|
|
|
398
395
|
function ot(s) {
|
|
399
396
|
const { control: r, onChange: o } = s;
|
|
400
397
|
return /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
401
|
-
/* @__PURE__ */ t(
|
|
398
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
402
399
|
/* @__PURE__ */ t(
|
|
403
400
|
tt,
|
|
404
401
|
{
|
|
@@ -419,7 +416,7 @@ function Pt(s) {
|
|
|
419
416
|
/* @__PURE__ */ t(
|
|
420
417
|
"span",
|
|
421
418
|
{
|
|
422
|
-
className:
|
|
419
|
+
className: re(
|
|
423
420
|
"flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
|
|
424
421
|
b ? "border-foreground bg-foreground text-background" : v ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
|
|
425
422
|
),
|
|
@@ -429,7 +426,7 @@ function Pt(s) {
|
|
|
429
426
|
/* @__PURE__ */ t(
|
|
430
427
|
"span",
|
|
431
428
|
{
|
|
432
|
-
className:
|
|
429
|
+
className: re(
|
|
433
430
|
"text-[12px]",
|
|
434
431
|
b ? "font-medium text-foreground" : "text-muted-foreground"
|
|
435
432
|
),
|
|
@@ -550,7 +547,7 @@ const Jt = /* @__PURE__ */ new Set([
|
|
|
550
547
|
"metric_selector"
|
|
551
548
|
]);
|
|
552
549
|
function Ue(s) {
|
|
553
|
-
const { text: r, ariaLabel: o } = s, [i, f] =
|
|
550
|
+
const { text: r, ariaLabel: o } = s, [i, f] = O(!1);
|
|
554
551
|
return /* @__PURE__ */ d(
|
|
555
552
|
"button",
|
|
556
553
|
{
|
|
@@ -662,7 +659,7 @@ function $e(s) {
|
|
|
662
659
|
] });
|
|
663
660
|
}
|
|
664
661
|
function Wt(s) {
|
|
665
|
-
const r =
|
|
662
|
+
const r = te(
|
|
666
663
|
s.scope,
|
|
667
664
|
s.existingControls,
|
|
668
665
|
s.reservedIds
|
|
@@ -685,7 +682,7 @@ function Wt(s) {
|
|
|
685
682
|
return {
|
|
686
683
|
step: 2,
|
|
687
684
|
control: o,
|
|
688
|
-
defaultValue:
|
|
685
|
+
defaultValue: ae(o, void 0)
|
|
689
686
|
};
|
|
690
687
|
}
|
|
691
688
|
function ca({
|
|
@@ -705,31 +702,31 @@ function ca({
|
|
|
705
702
|
onCreateFlowActiveChange: N,
|
|
706
703
|
onCreateFlowComplete: V
|
|
707
704
|
}) {
|
|
708
|
-
const I =
|
|
705
|
+
const I = A(
|
|
709
706
|
() => new Set(o || []),
|
|
710
707
|
[o]
|
|
711
|
-
), oe = Lt(s), ie = wt(s), [
|
|
708
|
+
), oe = Lt(s), ie = wt(s), [Z, H] = O(
|
|
712
709
|
null
|
|
713
|
-
), [de,
|
|
710
|
+
), [de, $] = O(
|
|
714
711
|
null
|
|
715
|
-
), [a, S] =
|
|
712
|
+
), [a, S] = O(
|
|
716
713
|
() => b ? {
|
|
717
714
|
step: 1,
|
|
718
|
-
control:
|
|
715
|
+
control: te(s, r, Array.from(I))
|
|
719
716
|
} : null
|
|
720
|
-
),
|
|
717
|
+
), B = ke({}), T = ke(void 0), X = ke(b), Q = A(
|
|
721
718
|
() => Fe({ scope: s, card: g }),
|
|
722
719
|
[g, s]
|
|
723
|
-
), E =
|
|
720
|
+
), E = z(
|
|
724
721
|
(e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
|
|
725
722
|
[s]
|
|
726
|
-
),
|
|
727
|
-
() => a ?
|
|
723
|
+
), P = A(
|
|
724
|
+
() => a ? Ae(
|
|
728
725
|
x || [],
|
|
729
726
|
a.control.type
|
|
730
727
|
) : [],
|
|
731
728
|
[a, x]
|
|
732
|
-
),
|
|
729
|
+
), j = A(() => {
|
|
733
730
|
if (!a)
|
|
734
731
|
return {
|
|
735
732
|
fields: h || [],
|
|
@@ -765,13 +762,13 @@ function ca({
|
|
|
765
762
|
Se(() => {
|
|
766
763
|
N == null || N(!!a);
|
|
767
764
|
}, [a, N]), Se(() => {
|
|
768
|
-
const e = b && !
|
|
769
|
-
|
|
765
|
+
const e = b && !X.current;
|
|
766
|
+
X.current = b, e && (S({
|
|
770
767
|
step: 1,
|
|
771
|
-
control:
|
|
772
|
-
}),
|
|
768
|
+
control: te(s, r, Array.from(I))
|
|
769
|
+
}), $(null), H(null));
|
|
773
770
|
}, [r, b, I, s]);
|
|
774
|
-
const
|
|
771
|
+
const ee = (e) => {
|
|
775
772
|
if (!E(e.type))
|
|
776
773
|
return {
|
|
777
774
|
fields: h || [],
|
|
@@ -798,7 +795,7 @@ function ca({
|
|
|
798
795
|
target: l.metricTargetMap[c.value]
|
|
799
796
|
})) : []
|
|
800
797
|
};
|
|
801
|
-
},
|
|
798
|
+
}, G = (e) => {
|
|
802
799
|
if (!E(e.control.type))
|
|
803
800
|
return {
|
|
804
801
|
nextControl: e.control,
|
|
@@ -825,7 +822,7 @@ function ca({
|
|
|
825
822
|
nextControl: c,
|
|
826
823
|
cardBindingsById: y
|
|
827
824
|
};
|
|
828
|
-
}, F =
|
|
825
|
+
}, F = z((e, n = i, l = { type: "update" }) => {
|
|
829
826
|
const c = e.map((y) => (he({
|
|
830
827
|
control: y,
|
|
831
828
|
defaultValues: n
|
|
@@ -833,7 +830,7 @@ function ca({
|
|
|
833
830
|
y
|
|
834
831
|
)));
|
|
835
832
|
f(c, n, l);
|
|
836
|
-
}, [i, f]),
|
|
833
|
+
}, [i, f]), J = (e, n) => {
|
|
837
834
|
const l = r.find(
|
|
838
835
|
(w) => w.id === e
|
|
839
836
|
);
|
|
@@ -843,17 +840,17 @@ function ca({
|
|
|
843
840
|
);
|
|
844
841
|
let D, p;
|
|
845
842
|
if (y && s === "dashboard" && (y.type === "field_selector" || y.type === "metric_selector")) {
|
|
846
|
-
const w = (m == null ? void 0 : m[y.id]) || [],
|
|
843
|
+
const w = (m == null ? void 0 : m[y.id]) || [], K = G({
|
|
847
844
|
control: y,
|
|
848
845
|
nextSelectedCardIds: w
|
|
849
846
|
});
|
|
850
847
|
c = c.map(
|
|
851
|
-
(
|
|
852
|
-
), D =
|
|
848
|
+
(R) => R.id === e ? K.nextControl : R
|
|
849
|
+
), D = K.cardBindingsById, p = [y.id];
|
|
853
850
|
} else if (l && s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector")) {
|
|
854
851
|
const w = (m == null ? void 0 : m[l.id]) || [];
|
|
855
852
|
D = Object.fromEntries(
|
|
856
|
-
w.map((
|
|
853
|
+
w.map((K) => [K, void 0])
|
|
857
854
|
), p = [l.id];
|
|
858
855
|
}
|
|
859
856
|
const k = c.find(
|
|
@@ -865,14 +862,14 @@ function ca({
|
|
|
865
862
|
control: l,
|
|
866
863
|
defaultValues: i
|
|
867
864
|
});
|
|
868
|
-
l.source.kind === "manual" && k.source.kind === "sql_query" && (
|
|
869
|
-
const
|
|
865
|
+
l.source.kind === "manual" && k.source.kind === "sql_query" && (B.current[e] = w);
|
|
866
|
+
const K = w === void 0 && l.source.kind === "sql_query" && k.source.kind === "manual" ? B.current[e] : w, R = Qe({
|
|
870
867
|
previousControl: l,
|
|
871
868
|
nextControl: k,
|
|
872
|
-
currentDefaultValue:
|
|
869
|
+
currentDefaultValue: K
|
|
873
870
|
});
|
|
874
|
-
k.source.kind === "manual" && (
|
|
875
|
-
(Le) => Le.id === e ? { ...k, defaultValue:
|
|
871
|
+
k.source.kind === "manual" && (B.current[e] = R), i && (_ = { ...i }, R === void 0 ? delete _[e] : _[e] = R), c = c.map(
|
|
872
|
+
(Le) => Le.id === e ? { ...k, defaultValue: R } : Le
|
|
876
873
|
);
|
|
877
874
|
}
|
|
878
875
|
F(c, _, {
|
|
@@ -911,12 +908,12 @@ function ca({
|
|
|
911
908
|
}
|
|
912
909
|
const l = { ...i };
|
|
913
910
|
delete l[e], F(n, l, { type: "remove", controlId: e });
|
|
914
|
-
}, ct =
|
|
911
|
+
}, ct = z(() => {
|
|
915
912
|
T.current = void 0, S({
|
|
916
913
|
step: 1,
|
|
917
|
-
control:
|
|
918
|
-
}),
|
|
919
|
-
}, [r, I, s]),
|
|
914
|
+
control: te(s, r, Array.from(I))
|
|
915
|
+
}), $(null), H(null);
|
|
916
|
+
}, [r, I, s]), W = (e) => {
|
|
920
917
|
S(
|
|
921
918
|
(n) => n && (() => {
|
|
922
919
|
const l = e(n.control);
|
|
@@ -947,7 +944,7 @@ function ca({
|
|
|
947
944
|
return (a.selectedCardIds || []).length > 0;
|
|
948
945
|
if (a.step !== 2 && a.step !== 3 || !a.control.label.trim())
|
|
949
946
|
return !1;
|
|
950
|
-
const n = a.control.source.kind === "sql_query" ? a.control :
|
|
947
|
+
const n = a.control.source.kind === "sql_query" ? a.control : ze(a.control);
|
|
951
948
|
if (n.source.kind === "manual" && (Vt(n) && n.source.options.length === 0 || n.source.options.some(
|
|
952
949
|
(c) => c.label.trim().length === 0 || c.value.trim().length === 0
|
|
953
950
|
)))
|
|
@@ -957,13 +954,13 @@ function ca({
|
|
|
957
954
|
return l.trim().length > 0 && c.trim().length > 0 && y.trim().length > 0;
|
|
958
955
|
}
|
|
959
956
|
return It(
|
|
960
|
-
|
|
957
|
+
ae(n, a.defaultValue)
|
|
961
958
|
);
|
|
962
959
|
})(), Ie = () => {
|
|
963
960
|
var D;
|
|
964
961
|
if (!a)
|
|
965
962
|
return;
|
|
966
|
-
const e =
|
|
963
|
+
const e = ze(a.control), n = Rt({
|
|
967
964
|
label: e.label,
|
|
968
965
|
fallbackId: e.id,
|
|
969
966
|
existingControls: r,
|
|
@@ -975,7 +972,7 @@ function ca({
|
|
|
975
972
|
control: l,
|
|
976
973
|
participants: x || [],
|
|
977
974
|
selectedCardIds: a.selectedCardIds
|
|
978
|
-
}) : void 0, y =
|
|
975
|
+
}) : void 0, y = ae(
|
|
979
976
|
l,
|
|
980
977
|
a.defaultValue
|
|
981
978
|
);
|
|
@@ -987,14 +984,14 @@ function ca({
|
|
|
987
984
|
selectedCardIds: a.selectedCardIds,
|
|
988
985
|
cardBindingsById: c
|
|
989
986
|
});
|
|
990
|
-
}, ue =
|
|
987
|
+
}, ue = z(() => {
|
|
991
988
|
S(null);
|
|
992
|
-
}, []), qe =
|
|
989
|
+
}, []), qe = z(() => {
|
|
993
990
|
if (!(a != null && a.createdControlId)) {
|
|
994
991
|
S(null);
|
|
995
992
|
return;
|
|
996
993
|
}
|
|
997
|
-
const e = a.control, n = a.createdControlId, l =
|
|
994
|
+
const e = a.control, n = a.createdControlId, l = ae(
|
|
998
995
|
e,
|
|
999
996
|
a.defaultValue
|
|
1000
997
|
);
|
|
@@ -1029,7 +1026,7 @@ function ca({
|
|
|
1029
1026
|
cardBindingsById: a.cardBindingsById
|
|
1030
1027
|
}
|
|
1031
1028
|
);
|
|
1032
|
-
|
|
1029
|
+
$(n), S(null), V == null || V();
|
|
1033
1030
|
}, [r, a, i, F, V]), ut = a ? E(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ee = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${qt(a.control.label) || a.control.id}]]` : "", pe = Me({
|
|
1034
1031
|
controls: r,
|
|
1035
1032
|
defaultValues: i
|
|
@@ -1058,9 +1055,9 @@ function ca({
|
|
|
1058
1055
|
"aggregation_selector",
|
|
1059
1056
|
"field_selector",
|
|
1060
1057
|
"metric_selector"
|
|
1061
|
-
]), n =
|
|
1058
|
+
]), n = Q.filter(
|
|
1062
1059
|
(y) => !e.has(y.value)
|
|
1063
|
-
), l =
|
|
1060
|
+
), l = Q.filter(
|
|
1064
1061
|
(y) => e.has(y.value)
|
|
1065
1062
|
), c = (y) => /* @__PURE__ */ d(
|
|
1066
1063
|
"button",
|
|
@@ -1115,7 +1112,7 @@ function ca({
|
|
|
1115
1112
|
ot,
|
|
1116
1113
|
{
|
|
1117
1114
|
control: a.control,
|
|
1118
|
-
onChange: (e) =>
|
|
1115
|
+
onChange: (e) => W((n) => ({
|
|
1119
1116
|
...n,
|
|
1120
1117
|
label: e
|
|
1121
1118
|
}))
|
|
@@ -1123,7 +1120,7 @@ function ca({
|
|
|
1123
1120
|
),
|
|
1124
1121
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
|
|
1125
1122
|
] }),
|
|
1126
|
-
|
|
1123
|
+
P.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-[6px] border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-[6px] border border-border/60 bg-background p-2", children: P.map((e) => {
|
|
1127
1124
|
const n = (a.selectedCardIds || []).includes(e.cardId);
|
|
1128
1125
|
return /* @__PURE__ */ d(
|
|
1129
1126
|
"label",
|
|
@@ -1198,12 +1195,12 @@ function ca({
|
|
|
1198
1195
|
{
|
|
1199
1196
|
control: a.control,
|
|
1200
1197
|
defaultValue: a.defaultValue,
|
|
1201
|
-
availableFieldChoices:
|
|
1202
|
-
availableMetricChoices:
|
|
1198
|
+
availableFieldChoices: j.fields,
|
|
1199
|
+
availableMetricChoices: j.metrics,
|
|
1203
1200
|
previewControlDefinitions: me,
|
|
1204
1201
|
previewControlValues: _e,
|
|
1205
|
-
onControlChange: (e) =>
|
|
1206
|
-
onLabelChange: (e) =>
|
|
1202
|
+
onControlChange: (e) => W(() => e),
|
|
1203
|
+
onLabelChange: (e) => W((n) => ({
|
|
1207
1204
|
...n,
|
|
1208
1205
|
label: e
|
|
1209
1206
|
})),
|
|
@@ -1223,12 +1220,12 @@ function ca({
|
|
|
1223
1220
|
{
|
|
1224
1221
|
control: a.control,
|
|
1225
1222
|
defaultValue: a.defaultValue,
|
|
1226
|
-
availableFieldChoices:
|
|
1227
|
-
availableMetricChoices:
|
|
1223
|
+
availableFieldChoices: j.fields,
|
|
1224
|
+
availableMetricChoices: j.metrics,
|
|
1228
1225
|
previewControlDefinitions: me,
|
|
1229
1226
|
previewControlValues: _e,
|
|
1230
|
-
onControlChange: (e) =>
|
|
1231
|
-
onLabelChange: (e) =>
|
|
1227
|
+
onControlChange: (e) => W(() => e),
|
|
1228
|
+
onLabelChange: (e) => W((n) => ({
|
|
1232
1229
|
...n,
|
|
1233
1230
|
label: e
|
|
1234
1231
|
})),
|
|
@@ -1249,7 +1246,7 @@ function ca({
|
|
|
1249
1246
|
control: a.control,
|
|
1250
1247
|
scope: s,
|
|
1251
1248
|
createdReference: Ee,
|
|
1252
|
-
explorerContent: /* @__PURE__ */ d(
|
|
1249
|
+
explorerContent: /* @__PURE__ */ d(U, { children: [
|
|
1253
1250
|
"Open the card and use",
|
|
1254
1251
|
" ",
|
|
1255
1252
|
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
|
|
@@ -1273,14 +1270,14 @@ function ca({
|
|
|
1273
1270
|
control: a.control,
|
|
1274
1271
|
scope: s,
|
|
1275
1272
|
createdReference: Ee,
|
|
1276
|
-
summaryDetail: /* @__PURE__ */ d(
|
|
1273
|
+
summaryDetail: /* @__PURE__ */ d(U, { children: [
|
|
1277
1274
|
"Used by ",
|
|
1278
1275
|
(a.selectedCardIds || []).length,
|
|
1279
1276
|
" ",
|
|
1280
1277
|
"selected card",
|
|
1281
1278
|
(a.selectedCardIds || []).length === 1 ? "" : "s"
|
|
1282
1279
|
] }),
|
|
1283
|
-
explorerContent: /* @__PURE__ */ t(
|
|
1280
|
+
explorerContent: /* @__PURE__ */ t(U, { children: "Selected cards have been set up to respond to this control automatically." }),
|
|
1284
1281
|
sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
|
|
1285
1282
|
onBack: () => S(
|
|
1286
1283
|
(e) => e && {
|
|
@@ -1295,7 +1292,7 @@ function ca({
|
|
|
1295
1292
|
] }) : null,
|
|
1296
1293
|
!a && r.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: u }) : null,
|
|
1297
1294
|
!a && r.map((e) => {
|
|
1298
|
-
const n =
|
|
1295
|
+
const n = ee(e), l = v == null ? void 0 : v[e.id], c = he({
|
|
1299
1296
|
control: e,
|
|
1300
1297
|
defaultValues: i
|
|
1301
1298
|
}), y = de === e.id, D = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
|
|
@@ -1306,7 +1303,7 @@ function ca({
|
|
|
1306
1303
|
{
|
|
1307
1304
|
type: "button",
|
|
1308
1305
|
className: "flex min-w-0 flex-1 items-start gap-2 rounded-[4px] text-left focus:outline-none focus-visible:bg-muted/40",
|
|
1309
|
-
onClick: () =>
|
|
1306
|
+
onClick: () => $(
|
|
1310
1307
|
(p) => p === e.id ? null : e.id
|
|
1311
1308
|
),
|
|
1312
1309
|
children: [
|
|
@@ -1341,14 +1338,14 @@ function ca({
|
|
|
1341
1338
|
y && /* @__PURE__ */ d("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
|
|
1342
1339
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-3", children: [
|
|
1343
1340
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1344
|
-
/* @__PURE__ */ t(
|
|
1341
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
1345
1342
|
/* @__PURE__ */ t(
|
|
1346
1343
|
tt,
|
|
1347
1344
|
{
|
|
1348
1345
|
size: "xs",
|
|
1349
1346
|
value: e.label,
|
|
1350
1347
|
placeholder: "Control label",
|
|
1351
|
-
onChange: (p) =>
|
|
1348
|
+
onChange: (p) => J(e.id, (k) => ({
|
|
1352
1349
|
...k,
|
|
1353
1350
|
label: p.target.value
|
|
1354
1351
|
}))
|
|
@@ -1356,7 +1353,7 @@ function ca({
|
|
|
1356
1353
|
)
|
|
1357
1354
|
] }),
|
|
1358
1355
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1359
|
-
/* @__PURE__ */ t(
|
|
1356
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
|
|
1360
1357
|
/* @__PURE__ */ d(
|
|
1361
1358
|
be,
|
|
1362
1359
|
{
|
|
@@ -1382,12 +1379,12 @@ function ca({
|
|
|
1382
1379
|
)
|
|
1383
1380
|
] }),
|
|
1384
1381
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1385
|
-
/* @__PURE__ */ t(
|
|
1382
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
|
|
1386
1383
|
/* @__PURE__ */ d(
|
|
1387
1384
|
be,
|
|
1388
1385
|
{
|
|
1389
1386
|
value: e.placement || ie,
|
|
1390
|
-
onValueChange: (p) =>
|
|
1387
|
+
onValueChange: (p) => J(e.id, (k) => ({
|
|
1391
1388
|
...k,
|
|
1392
1389
|
placement: p
|
|
1393
1390
|
})),
|
|
@@ -1403,7 +1400,7 @@ function ca({
|
|
|
1403
1400
|
Ft,
|
|
1404
1401
|
{
|
|
1405
1402
|
type: e.type,
|
|
1406
|
-
participants:
|
|
1403
|
+
participants: Ae(
|
|
1407
1404
|
x || [],
|
|
1408
1405
|
e.type
|
|
1409
1406
|
).map((p) => ({
|
|
@@ -1413,7 +1410,7 @@ function ca({
|
|
|
1413
1410
|
})),
|
|
1414
1411
|
selectedCardIds: (m == null ? void 0 : m[e.id]) || [],
|
|
1415
1412
|
onChange: (p) => {
|
|
1416
|
-
const k =
|
|
1413
|
+
const k = G({
|
|
1417
1414
|
control: e,
|
|
1418
1415
|
nextSelectedCardIds: p
|
|
1419
1416
|
}), _ = r.map(
|
|
@@ -1435,7 +1432,7 @@ function ca({
|
|
|
1435
1432
|
previewControlDefinitions: r,
|
|
1436
1433
|
previewControlValues: pe,
|
|
1437
1434
|
controlLifecycle: "edit",
|
|
1438
|
-
onChange: (p) =>
|
|
1435
|
+
onChange: (p) => J(e.id, () => p)
|
|
1439
1436
|
}
|
|
1440
1437
|
),
|
|
1441
1438
|
e.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
|
|
@@ -1451,7 +1448,7 @@ function ca({
|
|
|
1451
1448
|
const k = r.map(
|
|
1452
1449
|
(_) => _.id === e.id ? { ..._, defaultValue: p } : _
|
|
1453
1450
|
);
|
|
1454
|
-
if (e.source.kind === "manual" && (
|
|
1451
|
+
if (e.source.kind === "manual" && (B.current[e.id] = p), i) {
|
|
1455
1452
|
const _ = { ...i };
|
|
1456
1453
|
p === void 0 ? delete _[e.id] : _[e.id] = p, F(k, _);
|
|
1457
1454
|
return;
|
|
@@ -1461,12 +1458,12 @@ function ca({
|
|
|
1461
1458
|
}
|
|
1462
1459
|
),
|
|
1463
1460
|
/* @__PURE__ */ d(
|
|
1464
|
-
|
|
1461
|
+
At,
|
|
1465
1462
|
{
|
|
1466
|
-
open:
|
|
1467
|
-
onOpenChange: (p) =>
|
|
1463
|
+
open: Z === e.id,
|
|
1464
|
+
onOpenChange: (p) => H(p ? e.id : null),
|
|
1468
1465
|
children: [
|
|
1469
|
-
/* @__PURE__ */ t(
|
|
1466
|
+
/* @__PURE__ */ t(zt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
1470
1467
|
q,
|
|
1471
1468
|
{
|
|
1472
1469
|
type: "button",
|
|
@@ -1474,7 +1471,7 @@ function ca({
|
|
|
1474
1471
|
size: "xs",
|
|
1475
1472
|
className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
|
|
1476
1473
|
children: [
|
|
1477
|
-
|
|
1474
|
+
Z === e.id ? /* @__PURE__ */ t(Oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Be, { className: "h-3.5 w-3.5" }),
|
|
1478
1475
|
"Advanced"
|
|
1479
1476
|
]
|
|
1480
1477
|
}
|
|
@@ -1482,7 +1479,7 @@ function ca({
|
|
|
1482
1479
|
/* @__PURE__ */ d(Mt, { className: "space-y-3 pt-2", children: [
|
|
1483
1480
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
1484
1481
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1485
|
-
/* @__PURE__ */ t(
|
|
1482
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Control ID" }),
|
|
1486
1483
|
/* @__PURE__ */ t(
|
|
1487
1484
|
Ot,
|
|
1488
1485
|
{
|
|
@@ -1493,12 +1490,12 @@ function ca({
|
|
|
1493
1490
|
)
|
|
1494
1491
|
] }),
|
|
1495
1492
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1496
|
-
/* @__PURE__ */ t(
|
|
1493
|
+
/* @__PURE__ */ t(Y, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
|
|
1497
1494
|
/* @__PURE__ */ d(
|
|
1498
1495
|
be,
|
|
1499
1496
|
{
|
|
1500
1497
|
value: e.initialValueStrategy,
|
|
1501
|
-
onValueChange: (p) =>
|
|
1498
|
+
onValueChange: (p) => J(e.id, (k) => ({
|
|
1502
1499
|
...k,
|
|
1503
1500
|
initialValueStrategy: p
|
|
1504
1501
|
})),
|
|
@@ -1521,7 +1518,7 @@ function ca({
|
|
|
1521
1518
|
Qt,
|
|
1522
1519
|
{
|
|
1523
1520
|
control: e,
|
|
1524
|
-
onChange: (p) =>
|
|
1521
|
+
onChange: (p) => J(e.id, () => p)
|
|
1525
1522
|
}
|
|
1526
1523
|
)
|
|
1527
1524
|
] })
|
|
@@ -1552,20 +1549,20 @@ function ua(s) {
|
|
|
1552
1549
|
onOpenChange: o,
|
|
1553
1550
|
initialCreateFlowActive: i = !1,
|
|
1554
1551
|
dismissMode: f = "passive"
|
|
1555
|
-
} = s, u = r !== void 0, [b, v] =
|
|
1552
|
+
} = s, u = r !== void 0, [b, v] = O(!1), [h, C] = O(
|
|
1556
1553
|
i
|
|
1557
|
-
), x = u ? r : b, m =
|
|
1554
|
+
), x = u ? r : b, m = z(
|
|
1558
1555
|
(V) => {
|
|
1559
1556
|
!V && h && f === "passive" || (u || v(V), V || C(!1), o == null || o(V));
|
|
1560
1557
|
},
|
|
1561
1558
|
[u, h, f, o]
|
|
1562
|
-
), g =
|
|
1559
|
+
), g = z(() => {
|
|
1563
1560
|
u || v(!1), C(!1), o == null || o(!1);
|
|
1564
1561
|
}, [u, o]);
|
|
1565
1562
|
Se(() => {
|
|
1566
1563
|
x || C(!1);
|
|
1567
1564
|
}, [x]);
|
|
1568
|
-
const N =
|
|
1565
|
+
const N = z(
|
|
1569
1566
|
(V) => {
|
|
1570
1567
|
h && V.preventDefault();
|
|
1571
1568
|
},
|