react-semaphor 0.1.293 → 0.1.294
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/{braces-C7GP95Fp.js → braces-DR-GdaLC.js} +1 -1
- package/dist/chunks/{braces-BwW2HFlB.js → braces-DfDQiR3J.js} +1 -1
- package/dist/chunks/{dashboard-controls-jrkoCSY_.js → dashboard-controls-C3Z9bpYE.js} +504 -472
- package/dist/chunks/{dashboard-controls-DgUc38Tn.js → dashboard-controls-DGEVXgP5.js} +9 -9
- package/dist/chunks/dashboard-filter-controls-button-BIYT1ucX.js +11 -0
- package/dist/chunks/dashboard-filter-controls-button-DxgGUl00.js +1152 -0
- package/dist/chunks/{dashboard-json-COjT-zjQ.js → dashboard-json-BvTeHePu.js} +1 -1
- package/dist/chunks/{dashboard-json-C0NiRL-A.js → dashboard-json-DQW8TN0I.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CXqaN_zj.js → dashboard-summary-settings-dialog-BsmKiGud.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CGuFl7Xe.js → dashboard-summary-settings-dialog-q7fx3YAK.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-ChKj-Lzr.js +183 -0
- package/dist/chunks/{edit-dashboard-visual-ppdXk86H.js → edit-dashboard-visual-RVl9nbDZ.js} +2175 -2160
- package/dist/chunks/index-BlspGR07.js +1435 -0
- package/dist/chunks/{index-9z-jMqN8.js → index-DerPpfv0.js} +32720 -31308
- package/dist/chunks/{resource-management-panel-CP8cegZP.js → resource-management-panel-DnZ1rw1A.js} +64 -64
- package/dist/chunks/{resource-management-panel-os6AuEKT.js → resource-management-panel-epydPwyM.js} +1 -1
- package/dist/chunks/use-create-flow-overlay-state-Bcg4EgoD.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-wpuqRZX5.js → use-create-flow-overlay-state-C5vdfXhM.js} +430 -425
- package/dist/chunks/use-visual-utils-D9Kknvjl.js +337 -0
- package/dist/chunks/use-visual-utils-Dw_yw9zU.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +258 -253
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +28 -0
- package/dist/types/main.d.ts +42 -4
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/surfboard.d.ts +28 -0
- package/dist/types/types.d.ts +28 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-B19UWmsK.js +0 -11
- package/dist/chunks/dashboard-filter-controls-button-DGH4DxJ8.js +0 -1109
- package/dist/chunks/edit-dashboard-visual-CDOz4LWO.js +0 -183
- package/dist/chunks/index-K25f5Rqr.js +0 -1435
- package/dist/chunks/use-create-flow-overlay-state-CecnMS_v.js +0 -21
- package/dist/chunks/use-visual-utils-BTfG-ppd.js +0 -1
- package/dist/chunks/use-visual-utils-BhRKGJql.js +0 -334
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { jsx as t, jsxs as d, Fragment as
|
|
3
|
-
import { useMemo as A, useState as M, useRef as
|
|
4
|
-
import { u as we } from "./use-visual-utils-
|
|
1
|
+
import { c as ie, W as _, bO as Ke, bP as pt, bQ as mt, bR as ft, bS as ht, bT as bt, u as le, ai as gt, bU as yt, bV as xt, bW as vt, af as Ct, b as ne, bX as kt, bY as Nt, B as V, t as St, J as de, Q as Pe, M as Ye, bZ as Xe, x as Ge, b_ as Dt, O as Se, b$ as He, X as Je, y as O, c0 as wt, c1 as Tt, c2 as It, c3 as re, c4 as Le, c5 as Ae, c6 as he, c7 as be, c8 as Vt, c9 as ze, ca as Et, cb as qt, cc as se, cd as Ft, ce as Oe, cf as _t, a9 as Me, cg as Be, ch as We, ci as Ze, cj as et, ck as Lt, L as X, I as tt, z as ge, A as ye, E as xe, F as ve, G as Ce, cl as at, cm as At, cn as zt, co as rt, cp as st, cq as Ot, cr as Mt, cs as Bt, ct as Qt, cu as Rt, cv as jt, cw as Ut, cx as Qe, cy as $t, cz as Re, cA as Kt, cB as ke, cC as Pt } from "./index-DerPpfv0.js";
|
|
2
|
+
import { jsx as t, jsxs as d, Fragment as $ } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as A, useState as M, useRef as Ne, useCallback as z, useEffect as De, Fragment as Yt } from "react";
|
|
4
|
+
import { u as we } from "./use-visual-utils-D9Kknvjl.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.453.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const la = ie("CircleX", [
|
|
12
12
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
13
13
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
14
14
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -19,7 +19,7 @@ const ra = le("CircleX", [
|
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const Xt = ie("Library", [
|
|
23
23
|
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
24
24
|
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
25
25
|
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
@@ -31,7 +31,7 @@ const Yt = le("Library", [
|
|
|
31
31
|
* This source code is licensed under the ISC license.
|
|
32
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
33
|
*/
|
|
34
|
-
const
|
|
34
|
+
const Gt = ie("Link2", [
|
|
35
35
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
36
36
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
37
37
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
@@ -42,7 +42,7 @@ const Xt = le("Link2", [
|
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
const lt =
|
|
45
|
+
const lt = ie("Save", [
|
|
46
46
|
[
|
|
47
47
|
"path",
|
|
48
48
|
{
|
|
@@ -55,18 +55,18 @@ const lt = le("Save", [
|
|
|
55
55
|
]);
|
|
56
56
|
function nt() {
|
|
57
57
|
var h, C;
|
|
58
|
-
const s =
|
|
58
|
+
const s = _((y) => y.card), r = _((y) => y.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
63
|
), f = A(
|
|
64
64
|
() => {
|
|
65
|
-
var
|
|
66
|
-
return (
|
|
65
|
+
var y;
|
|
66
|
+
return (y = i == null ? void 0 : i.visuals) == null ? void 0 : y.find(
|
|
67
67
|
(m) => {
|
|
68
|
-
var
|
|
69
|
-
return m.name === ((
|
|
68
|
+
var v;
|
|
69
|
+
return m.name === ((v = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : v.componentName);
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
72
|
},
|
|
@@ -78,36 +78,36 @@ function nt() {
|
|
|
78
78
|
isMultiInputVisual: u === "multiple"
|
|
79
79
|
}),
|
|
80
80
|
[r, o, u]
|
|
81
|
-
),
|
|
82
|
-
const
|
|
81
|
+
), x = A(() => {
|
|
82
|
+
const y = b.findIndex(
|
|
83
83
|
(m) => (m == null ? void 0 : m.id) === s.id
|
|
84
84
|
);
|
|
85
|
-
return
|
|
85
|
+
return y < 0 ? -1 : ht(s, y);
|
|
86
86
|
}, [b, s]);
|
|
87
|
-
return A(() => !o || u !== "multiple" ||
|
|
87
|
+
return A(() => !o || u !== "multiple" || x < 0 ? s.type : bt(
|
|
88
88
|
s,
|
|
89
|
-
|
|
89
|
+
x,
|
|
90
90
|
f == null ? void 0 : f.slots
|
|
91
|
-
) ?? s.type, [o, u,
|
|
91
|
+
) ?? s.type, [o, u, x, s, f == null ? void 0 : f.slots]);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function na({
|
|
94
94
|
type: s,
|
|
95
95
|
isLinked: r,
|
|
96
96
|
className: o,
|
|
97
97
|
showLabel: i = !1,
|
|
98
98
|
showLocal: f = !1
|
|
99
99
|
}) {
|
|
100
|
-
const u =
|
|
100
|
+
const u = le((N) => N.selectedFrameId), b = gt((N) => N.selectedVisual), x = _((N) => N.frame);
|
|
101
101
|
let h;
|
|
102
102
|
if (s)
|
|
103
103
|
h = s;
|
|
104
104
|
else if (r !== void 0)
|
|
105
105
|
h = r ? "linked" : "library";
|
|
106
|
-
else if (!!!(
|
|
106
|
+
else if (!!!(x != null && x.visualId || b != null && b.id) && u)
|
|
107
107
|
h = "local";
|
|
108
108
|
else if (b && !u)
|
|
109
109
|
h = "library";
|
|
110
|
-
else if (
|
|
110
|
+
else if (x != null && x.visualId && u)
|
|
111
111
|
h = "linked";
|
|
112
112
|
else if (b != null && b.id && u)
|
|
113
113
|
h = "library";
|
|
@@ -119,7 +119,7 @@ function sa({
|
|
|
119
119
|
local: "border-slate-200/70 bg-slate-50/80 text-slate-700 shadow-sm hover:bg-slate-100/80 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-200 dark:hover:bg-slate-800/80",
|
|
120
120
|
linked: "border-purple-200/70 bg-gradient-to-r from-purple-50/50 to-purple-100/30 text-purple-900 shadow-sm hover:from-purple-100/60 hover:to-purple-100/50 hover:shadow-md dark:border-purple-800/50 dark:from-purple-950/40 dark:to-purple-900/30 dark:text-purple-100 dark:hover:from-purple-950/60 dark:hover:to-purple-900/50",
|
|
121
121
|
library: "border-blue-200/70 bg-gradient-to-r from-blue-50/50 to-blue-100/30 text-blue-900 shadow-sm hover:from-blue-100/60 hover:to-blue-100/50 hover:shadow-md dark:border-blue-800/50 dark:from-blue-950/40 dark:to-blue-900/30 dark:text-blue-100 dark:hover:from-blue-950/60 dark:hover:to-blue-900/50"
|
|
122
|
-
},
|
|
122
|
+
}, y = {
|
|
123
123
|
local: "Local to this dashboard: Changes made here only affect this dashboard copy.",
|
|
124
124
|
linked: "Linked to library: Changes made here update the library visual and all linked instances.",
|
|
125
125
|
library: "Library visual: Share and reuse this visual across multiple dashboards."
|
|
@@ -127,15 +127,15 @@ function sa({
|
|
|
127
127
|
local: "border-slate-200 bg-slate-50 text-slate-900 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100",
|
|
128
128
|
linked: "border-purple-200 bg-purple-50 text-purple-900 dark:border-purple-800 dark:bg-purple-950 dark:text-purple-100",
|
|
129
129
|
library: "border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100"
|
|
130
|
-
},
|
|
130
|
+
}, v = {
|
|
131
131
|
local: "fill-slate-50 dark:fill-slate-900",
|
|
132
132
|
linked: "fill-purple-50 dark:fill-purple-950",
|
|
133
133
|
library: "fill-blue-50 dark:fill-blue-950"
|
|
134
|
-
},
|
|
134
|
+
}, E = {
|
|
135
135
|
local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
|
|
136
|
-
linked: /* @__PURE__ */ t(
|
|
137
|
-
library: /* @__PURE__ */ t(
|
|
138
|
-
},
|
|
136
|
+
linked: /* @__PURE__ */ t(Gt, { className: "h-3.5 w-3.5" }),
|
|
137
|
+
library: /* @__PURE__ */ t(Xt, { className: "h-3.5 w-3.5" })
|
|
138
|
+
}, k = {
|
|
139
139
|
local: "Local",
|
|
140
140
|
linked: "Linked",
|
|
141
141
|
library: "Library"
|
|
@@ -145,14 +145,14 @@ function sa({
|
|
|
145
145
|
Ct,
|
|
146
146
|
{
|
|
147
147
|
variant: "outline",
|
|
148
|
-
className:
|
|
148
|
+
className: ne(
|
|
149
149
|
"cursor-help select-none transition-all",
|
|
150
150
|
C[h],
|
|
151
151
|
o
|
|
152
152
|
),
|
|
153
153
|
children: [
|
|
154
|
-
|
|
155
|
-
i && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children:
|
|
154
|
+
E[h],
|
|
155
|
+
i && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children: k[h] })
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
) }),
|
|
@@ -160,16 +160,16 @@ function sa({
|
|
|
160
160
|
kt,
|
|
161
161
|
{
|
|
162
162
|
side: "bottom",
|
|
163
|
-
className:
|
|
163
|
+
className: ne("max-w-xs", m[h]),
|
|
164
164
|
children: [
|
|
165
|
-
/* @__PURE__ */ t(Nt, { className:
|
|
166
|
-
/* @__PURE__ */ t("p", { children:
|
|
165
|
+
/* @__PURE__ */ t(Nt, { className: v[h] }),
|
|
166
|
+
/* @__PURE__ */ t("p", { children: y[h] })
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
)
|
|
170
170
|
] }) });
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Ht(s, r) {
|
|
173
173
|
return {
|
|
174
174
|
...s,
|
|
175
175
|
sql: "",
|
|
@@ -186,20 +186,20 @@ function Gt(s, r) {
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function Te(s) {
|
|
189
|
-
const r =
|
|
189
|
+
const r = Tt(s);
|
|
190
190
|
return r ? (O.error(r), !1) : !0;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function oa({
|
|
193
193
|
className: s,
|
|
194
194
|
variant: r = "outline"
|
|
195
195
|
}) {
|
|
196
|
-
const o =
|
|
196
|
+
const o = _((u) => u.onSave), { getUpdatedFrame: i } = we();
|
|
197
197
|
function f() {
|
|
198
198
|
const u = i();
|
|
199
199
|
Te(u) && (o == null || o(u));
|
|
200
200
|
}
|
|
201
201
|
return /* @__PURE__ */ d(
|
|
202
|
-
|
|
202
|
+
V,
|
|
203
203
|
{
|
|
204
204
|
onClick: f,
|
|
205
205
|
className: s,
|
|
@@ -212,36 +212,36 @@ function la({
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function ia({
|
|
216
216
|
className: s,
|
|
217
217
|
variant: r = "default"
|
|
218
218
|
}) {
|
|
219
|
-
const o =
|
|
220
|
-
(
|
|
221
|
-
), { setIsVisualEditing: b } =
|
|
219
|
+
const o = de(), [i, f] = M(!1), u = le(
|
|
220
|
+
(v) => v.actions.setIsDashboardPanelOpen
|
|
221
|
+
), { setIsVisualEditing: b } = Pe(), { getUpdatedFrame: x } = we(), h = Ye(), C = _((v) => v.frame), y = Xe();
|
|
222
222
|
return /* @__PURE__ */ t(
|
|
223
|
-
|
|
223
|
+
V,
|
|
224
224
|
{
|
|
225
225
|
onClick: () => {
|
|
226
|
-
const
|
|
227
|
-
if (!Te(
|
|
226
|
+
const v = x();
|
|
227
|
+
if (!Te(v))
|
|
228
228
|
return;
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
229
|
+
const E = (C == null ? void 0 : C.visualId) || (h == null ? void 0 : h.id);
|
|
230
|
+
if (!E) {
|
|
231
231
|
O.error("No visual to save");
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
f(!0),
|
|
234
|
+
f(!0), y.mutate(
|
|
235
235
|
{
|
|
236
|
-
visualId:
|
|
236
|
+
visualId: E,
|
|
237
237
|
data: {
|
|
238
|
-
frameObject:
|
|
238
|
+
frameObject: v
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
onSuccess: () => {
|
|
243
243
|
f(!1), u(!0), O.success("Visual updated successfully"), o.invalidateQueries({
|
|
244
|
-
queryKey: ["resource-by-id", "visual",
|
|
244
|
+
queryKey: ["resource-by-id", "visual", E],
|
|
245
245
|
exact: !0
|
|
246
246
|
});
|
|
247
247
|
},
|
|
@@ -254,56 +254,61 @@ function na({
|
|
|
254
254
|
className: s,
|
|
255
255
|
size: "xs",
|
|
256
256
|
variant: r,
|
|
257
|
-
children: i ? /* @__PURE__ */ d(
|
|
258
|
-
/* @__PURE__ */ t(
|
|
257
|
+
children: i ? /* @__PURE__ */ d($, { children: [
|
|
258
|
+
/* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
259
259
|
"Saving"
|
|
260
|
-
] }) : /* @__PURE__ */ d(
|
|
260
|
+
] }) : /* @__PURE__ */ d($, { children: [
|
|
261
261
|
/* @__PURE__ */ t(lt, { className: "h-3.5 w-3.5" }),
|
|
262
262
|
"Save to Library"
|
|
263
263
|
] })
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function da({
|
|
268
268
|
className: s
|
|
269
269
|
}) {
|
|
270
|
-
const r =
|
|
270
|
+
const r = de(), [o, i] = M(!1), f = Ye(), u = _((k) => k.frame), b = le((k) => k.selectedSheetId), x = le((k) => k.dashboard), { updateFrame: h, setIsVisualEditing: C } = Pe(), { getUpdatedFrame: y } = we(), m = Xe(), v = Dt();
|
|
271
271
|
return /* @__PURE__ */ t(
|
|
272
|
-
|
|
272
|
+
V,
|
|
273
273
|
{
|
|
274
274
|
onClick: async () => {
|
|
275
275
|
if (!b) {
|
|
276
276
|
O.error("No sheet selected");
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
279
|
+
const k = (u == null ? void 0 : u.visualId) || (f == null ? void 0 : f.id);
|
|
280
|
+
if (!k) {
|
|
281
281
|
O.error("No visual to update");
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
284
|
i(!0);
|
|
285
285
|
try {
|
|
286
|
-
const N =
|
|
286
|
+
const N = y();
|
|
287
287
|
if (!Te(N)) {
|
|
288
288
|
i(!1);
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
const B = {
|
|
292
|
+
...N,
|
|
293
|
+
visualId: k
|
|
294
|
+
// Keep the link to library visual
|
|
295
|
+
}, G = wt(x, B.id), K = await v(B, {
|
|
296
|
+
previousFrame: G
|
|
297
|
+
});
|
|
298
|
+
await m.mutateAsync({
|
|
299
|
+
visualId: k,
|
|
293
300
|
data: {
|
|
294
301
|
frameObject: N
|
|
295
302
|
}
|
|
296
|
-
})
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
// Keep the link to library visual
|
|
301
|
-
};
|
|
302
|
-
v(b, V), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", g] }), O.success("Saved to library and applied locally"), setTimeout(() => {
|
|
303
|
-
h(!1);
|
|
303
|
+
}), h(b, B, {
|
|
304
|
+
semanticExecutionPayload: K
|
|
305
|
+
}), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", k] }), O.success("Saved to library and applied locally"), setTimeout(() => {
|
|
306
|
+
C(!1);
|
|
304
307
|
}, 300);
|
|
305
308
|
} catch (N) {
|
|
306
|
-
console.error("Failed to save and apply:", N), O.error(
|
|
309
|
+
console.error("Failed to save and apply:", N), O.error(
|
|
310
|
+
N instanceof Error ? N.message : "Failed to save and apply changes"
|
|
311
|
+
);
|
|
307
312
|
} finally {
|
|
308
313
|
i(!1);
|
|
309
314
|
}
|
|
@@ -312,29 +317,29 @@ function oa({
|
|
|
312
317
|
size: "xs",
|
|
313
318
|
variant: "default",
|
|
314
319
|
disabled: o,
|
|
315
|
-
children: o ? /* @__PURE__ */ d(
|
|
316
|
-
/* @__PURE__ */ t(
|
|
320
|
+
children: o ? /* @__PURE__ */ d($, { children: [
|
|
321
|
+
/* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
317
322
|
"Saving..."
|
|
318
|
-
] }) : /* @__PURE__ */ d(
|
|
323
|
+
] }) : /* @__PURE__ */ d($, { children: [
|
|
319
324
|
/* @__PURE__ */ t(lt, { className: "h-3.5 w-3.5" }),
|
|
320
325
|
"Save & Apply"
|
|
321
326
|
] })
|
|
322
327
|
}
|
|
323
328
|
);
|
|
324
329
|
}
|
|
325
|
-
function
|
|
326
|
-
const { setTempQueryData: r, setSqlGen: o } =
|
|
327
|
-
function
|
|
330
|
+
function ca({ className: s }) {
|
|
331
|
+
const { setTempQueryData: r, setSqlGen: o } = Se(), i = de(), f = _((m) => m.tempQueryData), u = _((m) => m.onClose), b = _((m) => m.card), x = nt(), h = A(() => x !== b.type ? { ...b, type: x } : b, [b, x]), { queryKey: C } = He(h);
|
|
332
|
+
function y() {
|
|
328
333
|
if (f) {
|
|
329
|
-
const { queryKey: m, queryData:
|
|
330
|
-
m &&
|
|
334
|
+
const { queryKey: m, queryData: v } = f;
|
|
335
|
+
m && v && i.setQueryData(m, v);
|
|
331
336
|
}
|
|
332
337
|
o({}), u == null || u();
|
|
333
338
|
}
|
|
334
339
|
return /* @__PURE__ */ d(
|
|
335
|
-
|
|
340
|
+
V,
|
|
336
341
|
{
|
|
337
|
-
onClick:
|
|
342
|
+
onClick: y,
|
|
338
343
|
className: s,
|
|
339
344
|
size: "xs",
|
|
340
345
|
variant: "outline",
|
|
@@ -345,43 +350,43 @@ function ia({ className: s }) {
|
|
|
345
350
|
}
|
|
346
351
|
);
|
|
347
352
|
}
|
|
348
|
-
function
|
|
353
|
+
function ua({
|
|
349
354
|
label: s = "Clear",
|
|
350
355
|
variant: r = "secondary",
|
|
351
356
|
className: o
|
|
352
357
|
} = {}) {
|
|
353
|
-
const { setTempQueryData: i } =
|
|
354
|
-
setCardSql:
|
|
358
|
+
const { setTempQueryData: i } = Se(), f = de(), u = _((a) => a.tempQueryData), b = _((a) => a.card), x = nt(), h = A(() => x !== b.type ? { ...b, type: x } : b, [b, x]), { queryKey: C } = He(h), {
|
|
359
|
+
setCardSql: y,
|
|
355
360
|
setSqlGen: m,
|
|
356
|
-
setCardPython:
|
|
357
|
-
setCardCustomCfg:
|
|
358
|
-
setCardPreferences:
|
|
359
|
-
clearQueryConfig:
|
|
360
|
-
setCardConfig:
|
|
361
|
-
setCardType:
|
|
362
|
-
setFrame:
|
|
363
|
-
setCard:
|
|
364
|
-
setActiveTabCardId:
|
|
365
|
-
} =
|
|
366
|
-
function
|
|
367
|
-
var
|
|
361
|
+
setCardPython: v,
|
|
362
|
+
setCardCustomCfg: E,
|
|
363
|
+
setCardPreferences: k,
|
|
364
|
+
clearQueryConfig: N,
|
|
365
|
+
setCardConfig: B,
|
|
366
|
+
setCardType: G,
|
|
367
|
+
setFrame: K,
|
|
368
|
+
setCard: H,
|
|
369
|
+
setActiveTabCardId: ce
|
|
370
|
+
} = Se();
|
|
371
|
+
function P() {
|
|
372
|
+
var q, W, j, ae;
|
|
368
373
|
const a = f.getQueryData(C);
|
|
369
374
|
u != null && u.queryData || i({
|
|
370
375
|
queryKey: C,
|
|
371
376
|
queryData: a
|
|
372
|
-
}), f.setQueryData(C, null), f.removeQueries({ queryKey: C, exact: !0 }),
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
...
|
|
376
|
-
cards:
|
|
377
|
-
(
|
|
377
|
+
}), f.setQueryData(C, null), f.removeQueries({ queryKey: C, exact: !0 }), y(""), m({}), N(), B(void 0), v(""), E(""), k({});
|
|
378
|
+
const D = _.getState().frame, Q = _.getState().card, I = Ke(D, Q), J = ((q = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : q.visualType) === "multiple" || !!((W = I == null ? void 0 : I.customCardPreferences) != null && W.dataInputCardIds) || (((j = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : j.minInputs) || 0) > 1 || (((ae = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : ae.maxInputs) || 0) > 1, R = Ht(Q, J);
|
|
379
|
+
K({
|
|
380
|
+
...D,
|
|
381
|
+
cards: D.cards.map(
|
|
382
|
+
(Z) => Z.id === R.id ? R : Z
|
|
378
383
|
)
|
|
379
|
-
}),
|
|
384
|
+
}), ce(R.id), H(R), J || G("bar");
|
|
380
385
|
}
|
|
381
386
|
return /* @__PURE__ */ d(
|
|
382
|
-
|
|
387
|
+
V,
|
|
383
388
|
{
|
|
384
|
-
onClick:
|
|
389
|
+
onClick: P,
|
|
385
390
|
className: o,
|
|
386
391
|
size: "xs",
|
|
387
392
|
variant: r,
|
|
@@ -395,7 +400,7 @@ function da({
|
|
|
395
400
|
function ot(s) {
|
|
396
401
|
const { control: r, onChange: o } = s;
|
|
397
402
|
return /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
398
|
-
/* @__PURE__ */ t(
|
|
403
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
399
404
|
/* @__PURE__ */ t(
|
|
400
405
|
tt,
|
|
401
406
|
{
|
|
@@ -407,18 +412,18 @@ function ot(s) {
|
|
|
407
412
|
)
|
|
408
413
|
] });
|
|
409
414
|
}
|
|
410
|
-
function
|
|
415
|
+
function Jt(s) {
|
|
411
416
|
const { currentStep: r, labels: o } = s;
|
|
412
417
|
return /* @__PURE__ */ t("div", { className: "sticky top-0 z-10 -mx-1 border-b border-border/60 bg-background/95 px-1 pb-2.5 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2 sm:gap-2.5", children: o.map((i, f) => {
|
|
413
|
-
const u = f + 1, b = u === r,
|
|
414
|
-
return /* @__PURE__ */ d(
|
|
418
|
+
const u = f + 1, b = u === r, x = u < r;
|
|
419
|
+
return /* @__PURE__ */ d(Yt, { children: [
|
|
415
420
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-1.5", children: [
|
|
416
421
|
/* @__PURE__ */ t(
|
|
417
422
|
"span",
|
|
418
423
|
{
|
|
419
|
-
className:
|
|
424
|
+
className: ne(
|
|
420
425
|
"flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
|
|
421
|
-
b ? "border-foreground bg-foreground text-background" :
|
|
426
|
+
b ? "border-foreground bg-foreground text-background" : x ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
|
|
422
427
|
),
|
|
423
428
|
children: u
|
|
424
429
|
}
|
|
@@ -426,7 +431,7 @@ function Ht(s) {
|
|
|
426
431
|
/* @__PURE__ */ t(
|
|
427
432
|
"span",
|
|
428
433
|
{
|
|
429
|
-
className:
|
|
434
|
+
className: ne(
|
|
430
435
|
"text-[12px]",
|
|
431
436
|
b ? "font-medium text-foreground" : "text-muted-foreground"
|
|
432
437
|
),
|
|
@@ -444,7 +449,7 @@ function Ht(s) {
|
|
|
444
449
|
] }, i);
|
|
445
450
|
}) }) });
|
|
446
451
|
}
|
|
447
|
-
function
|
|
452
|
+
function oe(s) {
|
|
448
453
|
const { secondary: r, tertiary: o, primary: i } = s;
|
|
449
454
|
return /* @__PURE__ */ d("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
|
|
450
455
|
r,
|
|
@@ -452,10 +457,10 @@ function se(s) {
|
|
|
452
457
|
i
|
|
453
458
|
] });
|
|
454
459
|
}
|
|
455
|
-
function
|
|
460
|
+
function Wt(s) {
|
|
456
461
|
const { control: r, scope: o, detail: i } = s;
|
|
457
462
|
return /* @__PURE__ */ d("div", { className: "flex items-start gap-2.5 rounded-[6px] border border-border/60 bg-muted/30 px-3 py-2.5", children: [
|
|
458
|
-
/* @__PURE__ */ t(
|
|
463
|
+
/* @__PURE__ */ t(Pt, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
|
|
459
464
|
/* @__PURE__ */ d("div", { className: "min-w-0 space-y-0.5", children: [
|
|
460
465
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: r.label }),
|
|
461
466
|
/* @__PURE__ */ d("div", { className: "text-[12px] text-muted-foreground", children: [
|
|
@@ -471,7 +476,7 @@ function Pt(s) {
|
|
|
471
476
|
] })
|
|
472
477
|
] });
|
|
473
478
|
}
|
|
474
|
-
function
|
|
479
|
+
function je(s) {
|
|
475
480
|
const {
|
|
476
481
|
control: r,
|
|
477
482
|
defaultValue: o,
|
|
@@ -479,12 +484,12 @@ function Re(s) {
|
|
|
479
484
|
availableMetricChoices: f,
|
|
480
485
|
previewControlDefinitions: u,
|
|
481
486
|
previewControlValues: b,
|
|
482
|
-
onControlChange:
|
|
487
|
+
onControlChange: x,
|
|
483
488
|
onLabelChange: h,
|
|
484
489
|
onDefaultValueChange: C,
|
|
485
|
-
onBack:
|
|
490
|
+
onBack: y,
|
|
486
491
|
onNext: m,
|
|
487
|
-
nextDisabled:
|
|
492
|
+
nextDisabled: v
|
|
488
493
|
} = s;
|
|
489
494
|
return /* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
490
495
|
/* @__PURE__ */ t(ot, { control: r, onChange: h }),
|
|
@@ -497,7 +502,7 @@ function Re(s) {
|
|
|
497
502
|
previewControlDefinitions: u,
|
|
498
503
|
previewControlValues: b,
|
|
499
504
|
controlLifecycle: "create",
|
|
500
|
-
onChange:
|
|
505
|
+
onChange: x
|
|
501
506
|
}
|
|
502
507
|
),
|
|
503
508
|
/* @__PURE__ */ t(
|
|
@@ -514,25 +519,25 @@ function Re(s) {
|
|
|
514
519
|
}
|
|
515
520
|
),
|
|
516
521
|
/* @__PURE__ */ t(
|
|
517
|
-
|
|
522
|
+
oe,
|
|
518
523
|
{
|
|
519
524
|
secondary: /* @__PURE__ */ t(
|
|
520
|
-
|
|
525
|
+
V,
|
|
521
526
|
{
|
|
522
527
|
type: "button",
|
|
523
528
|
variant: "outline",
|
|
524
529
|
size: "xs",
|
|
525
|
-
onClick:
|
|
530
|
+
onClick: y,
|
|
526
531
|
children: "Back"
|
|
527
532
|
}
|
|
528
533
|
),
|
|
529
534
|
primary: /* @__PURE__ */ t(
|
|
530
|
-
|
|
535
|
+
V,
|
|
531
536
|
{
|
|
532
537
|
type: "button",
|
|
533
538
|
size: "xs",
|
|
534
539
|
onClick: m,
|
|
535
|
-
disabled:
|
|
540
|
+
disabled: v,
|
|
536
541
|
children: "Next"
|
|
537
542
|
}
|
|
538
543
|
)
|
|
@@ -540,7 +545,7 @@ function Re(s) {
|
|
|
540
545
|
)
|
|
541
546
|
] });
|
|
542
547
|
}
|
|
543
|
-
const
|
|
548
|
+
const Zt = /* @__PURE__ */ new Set([
|
|
544
549
|
"grain_selector",
|
|
545
550
|
"aggregation_selector",
|
|
546
551
|
"field_selector",
|
|
@@ -576,13 +581,13 @@ function $e(s) {
|
|
|
576
581
|
explorerContent: f,
|
|
577
582
|
sqlDescription: u,
|
|
578
583
|
summaryDetail: b,
|
|
579
|
-
onBack:
|
|
584
|
+
onBack: x,
|
|
580
585
|
onCancel: h,
|
|
581
586
|
onDone: C
|
|
582
|
-
} = s,
|
|
587
|
+
} = s, y = Zt.has(r.type), m = i.match(/\[\[param\.(.+?)\]\]/), v = m ? `{{ param('${m[1]}') }}` : "";
|
|
583
588
|
return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
584
589
|
/* @__PURE__ */ t(
|
|
585
|
-
|
|
590
|
+
Wt,
|
|
586
591
|
{
|
|
587
592
|
control: r,
|
|
588
593
|
scope: o,
|
|
@@ -592,7 +597,7 @@ function $e(s) {
|
|
|
592
597
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
593
598
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
|
|
594
599
|
/* @__PURE__ */ d("div", { className: "divide-y divide-border/60 overflow-hidden rounded-[6px] border border-border/60", children: [
|
|
595
|
-
|
|
600
|
+
y ? /* @__PURE__ */ d("div", { className: "space-y-1 px-3 py-2.5", children: [
|
|
596
601
|
/* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
|
|
597
602
|
/* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: f })
|
|
598
603
|
] }) : null,
|
|
@@ -605,10 +610,10 @@ function $e(s) {
|
|
|
605
610
|
ariaLabel: "Copy SQL control reference"
|
|
606
611
|
}
|
|
607
612
|
),
|
|
608
|
-
|
|
613
|
+
v ? /* @__PURE__ */ t(
|
|
609
614
|
Ue,
|
|
610
615
|
{
|
|
611
|
-
text:
|
|
616
|
+
text: v,
|
|
612
617
|
ariaLabel: "Copy Jinja control reference"
|
|
613
618
|
}
|
|
614
619
|
) : null,
|
|
@@ -631,20 +636,20 @@ function $e(s) {
|
|
|
631
636
|
] })
|
|
632
637
|
] }),
|
|
633
638
|
/* @__PURE__ */ t(
|
|
634
|
-
|
|
639
|
+
oe,
|
|
635
640
|
{
|
|
636
641
|
secondary: /* @__PURE__ */ t(
|
|
637
|
-
|
|
642
|
+
V,
|
|
638
643
|
{
|
|
639
644
|
type: "button",
|
|
640
645
|
variant: "outline",
|
|
641
646
|
size: "xs",
|
|
642
|
-
onClick:
|
|
647
|
+
onClick: x,
|
|
643
648
|
children: "Back"
|
|
644
649
|
}
|
|
645
650
|
),
|
|
646
651
|
tertiary: /* @__PURE__ */ t(
|
|
647
|
-
|
|
652
|
+
V,
|
|
648
653
|
{
|
|
649
654
|
type: "button",
|
|
650
655
|
variant: "outline",
|
|
@@ -653,39 +658,39 @@ function $e(s) {
|
|
|
653
658
|
children: "Cancel"
|
|
654
659
|
}
|
|
655
660
|
),
|
|
656
|
-
primary: /* @__PURE__ */ t(
|
|
661
|
+
primary: /* @__PURE__ */ t(V, { type: "button", size: "xs", onClick: C, children: "Done" })
|
|
657
662
|
}
|
|
658
663
|
)
|
|
659
664
|
] });
|
|
660
665
|
}
|
|
661
|
-
function
|
|
662
|
-
const r =
|
|
666
|
+
function ea(s) {
|
|
667
|
+
const r = re(
|
|
663
668
|
s.scope,
|
|
664
669
|
s.existingControls,
|
|
665
670
|
s.reservedIds
|
|
666
671
|
), o = s.type === r.type ? {
|
|
667
672
|
...r,
|
|
668
|
-
label:
|
|
673
|
+
label: ke[s.type]
|
|
669
674
|
} : {
|
|
670
675
|
...at({
|
|
671
676
|
controls: [
|
|
672
677
|
{
|
|
673
678
|
...r,
|
|
674
|
-
label:
|
|
679
|
+
label: ke[s.type]
|
|
675
680
|
}
|
|
676
681
|
],
|
|
677
682
|
controlId: r.id,
|
|
678
683
|
nextType: s.type
|
|
679
684
|
}).controls[0],
|
|
680
|
-
label:
|
|
685
|
+
label: ke[s.type]
|
|
681
686
|
};
|
|
682
687
|
return {
|
|
683
688
|
step: 2,
|
|
684
689
|
control: o,
|
|
685
|
-
defaultValue:
|
|
690
|
+
defaultValue: se(o, void 0)
|
|
686
691
|
};
|
|
687
692
|
}
|
|
688
|
-
function
|
|
693
|
+
function pa({
|
|
689
694
|
scope: s,
|
|
690
695
|
controls: r,
|
|
691
696
|
reservedControlIds: o,
|
|
@@ -693,53 +698,53 @@ function ca({
|
|
|
693
698
|
onChange: f,
|
|
694
699
|
emptyMessage: u,
|
|
695
700
|
initialCreateFlow: b = !1,
|
|
696
|
-
usageByControlId:
|
|
701
|
+
usageByControlId: x,
|
|
697
702
|
availableFieldChoices: h,
|
|
698
703
|
availableMetricChoices: C,
|
|
699
|
-
structuralParticipants:
|
|
704
|
+
structuralParticipants: y,
|
|
700
705
|
structuralParticipantIdsByControlId: m,
|
|
701
|
-
card:
|
|
702
|
-
onCreateFlowActiveChange:
|
|
703
|
-
onCreateFlowComplete:
|
|
706
|
+
card: v,
|
|
707
|
+
onCreateFlowActiveChange: E,
|
|
708
|
+
onCreateFlowComplete: k
|
|
704
709
|
}) {
|
|
705
|
-
const
|
|
710
|
+
const N = A(
|
|
706
711
|
() => new Set(o || []),
|
|
707
712
|
[o]
|
|
708
|
-
),
|
|
713
|
+
), B = At(s), G = It(s), [K, H] = M(
|
|
709
714
|
null
|
|
710
|
-
), [
|
|
715
|
+
), [ce, P] = M(
|
|
711
716
|
null
|
|
712
|
-
), [a,
|
|
717
|
+
), [a, D] = M(
|
|
713
718
|
() => b ? {
|
|
714
719
|
step: 1,
|
|
715
|
-
control:
|
|
720
|
+
control: re(s, r, Array.from(N))
|
|
716
721
|
} : null
|
|
717
|
-
),
|
|
718
|
-
() =>
|
|
719
|
-
[
|
|
720
|
-
),
|
|
722
|
+
), Q = Ne({}), I = Ne(void 0), J = Ne(b), R = A(
|
|
723
|
+
() => Le({ scope: s, card: v }),
|
|
724
|
+
[v, s]
|
|
725
|
+
), q = z(
|
|
721
726
|
(e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
|
|
722
727
|
[s]
|
|
723
|
-
),
|
|
728
|
+
), W = A(
|
|
724
729
|
() => a ? Ae(
|
|
725
|
-
|
|
730
|
+
y || [],
|
|
726
731
|
a.control.type
|
|
727
732
|
) : [],
|
|
728
|
-
[a,
|
|
733
|
+
[a, y]
|
|
729
734
|
), j = A(() => {
|
|
730
735
|
if (!a)
|
|
731
736
|
return {
|
|
732
737
|
fields: h || [],
|
|
733
738
|
metrics: C || []
|
|
734
739
|
};
|
|
735
|
-
if (!
|
|
740
|
+
if (!q(a.control.type))
|
|
736
741
|
return {
|
|
737
742
|
fields: h || [],
|
|
738
743
|
metrics: C || []
|
|
739
744
|
};
|
|
740
|
-
const e = a.selectedCardIds || [], n =
|
|
745
|
+
const e = a.selectedCardIds || [], n = he({
|
|
741
746
|
controlType: a.control.type,
|
|
742
|
-
participants:
|
|
747
|
+
participants: y || [],
|
|
743
748
|
selectedCardIds: e
|
|
744
749
|
});
|
|
745
750
|
return {
|
|
@@ -756,20 +761,20 @@ function ca({
|
|
|
756
761
|
h,
|
|
757
762
|
C,
|
|
758
763
|
a,
|
|
759
|
-
|
|
760
|
-
|
|
764
|
+
q,
|
|
765
|
+
y
|
|
761
766
|
]);
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}, [a,
|
|
765
|
-
const e = b && !
|
|
766
|
-
|
|
767
|
+
De(() => {
|
|
768
|
+
E == null || E(!!a);
|
|
769
|
+
}, [a, E]), De(() => {
|
|
770
|
+
const e = b && !J.current;
|
|
771
|
+
J.current = b, e && (D({
|
|
767
772
|
step: 1,
|
|
768
|
-
control:
|
|
769
|
-
}),
|
|
770
|
-
}, [r, b,
|
|
771
|
-
const
|
|
772
|
-
if (!
|
|
773
|
+
control: re(s, r, Array.from(N))
|
|
774
|
+
}), P(null), H(null));
|
|
775
|
+
}, [r, b, N, s]);
|
|
776
|
+
const ae = (e) => {
|
|
777
|
+
if (!q(e.type))
|
|
773
778
|
return {
|
|
774
779
|
fields: h || [],
|
|
775
780
|
metrics: C || []
|
|
@@ -780,9 +785,9 @@ function ca({
|
|
|
780
785
|
fields: h || [],
|
|
781
786
|
metrics: C || []
|
|
782
787
|
};
|
|
783
|
-
const l =
|
|
788
|
+
const l = he({
|
|
784
789
|
controlType: e.type,
|
|
785
|
-
participants:
|
|
790
|
+
participants: y || [],
|
|
786
791
|
selectedCardIds: n
|
|
787
792
|
});
|
|
788
793
|
return {
|
|
@@ -795,107 +800,107 @@ function ca({
|
|
|
795
800
|
target: l.metricTargetMap[c.value]
|
|
796
801
|
})) : []
|
|
797
802
|
};
|
|
798
|
-
},
|
|
799
|
-
if (!
|
|
803
|
+
}, Z = (e) => {
|
|
804
|
+
if (!q(e.control.type))
|
|
800
805
|
return {
|
|
801
806
|
nextControl: e.control,
|
|
802
807
|
cardBindingsById: void 0
|
|
803
808
|
};
|
|
804
|
-
const n = (m == null ? void 0 : m[e.control.id]) || [], l =
|
|
809
|
+
const n = (m == null ? void 0 : m[e.control.id]) || [], l = he({
|
|
805
810
|
controlType: e.control.type,
|
|
806
|
-
participants:
|
|
811
|
+
participants: y || [],
|
|
807
812
|
selectedCardIds: e.nextSelectedCardIds
|
|
808
|
-
}), c =
|
|
813
|
+
}), c = Kt({
|
|
809
814
|
control: e.control,
|
|
810
815
|
choices: l.choices
|
|
811
|
-
}),
|
|
812
|
-
n.filter((
|
|
816
|
+
}), g = Object.fromEntries(
|
|
817
|
+
n.filter((w) => !e.nextSelectedCardIds.includes(w)).map((w) => [w, void 0])
|
|
813
818
|
);
|
|
814
819
|
return e.nextSelectedCardIds.length > 0 && c.source.kind === "manual" && c.source.options.length > 0 && Object.assign(
|
|
815
|
-
|
|
816
|
-
|
|
820
|
+
g,
|
|
821
|
+
Re({
|
|
817
822
|
control: c,
|
|
818
|
-
participants:
|
|
823
|
+
participants: y || [],
|
|
819
824
|
selectedCardIds: e.nextSelectedCardIds
|
|
820
825
|
})
|
|
821
826
|
), {
|
|
822
827
|
nextControl: c,
|
|
823
|
-
cardBindingsById:
|
|
828
|
+
cardBindingsById: g
|
|
824
829
|
};
|
|
825
|
-
},
|
|
826
|
-
const c = e.map((
|
|
827
|
-
control:
|
|
830
|
+
}, L = z((e, n = i, l = { type: "update" }) => {
|
|
831
|
+
const c = e.map((g) => (be({
|
|
832
|
+
control: g,
|
|
828
833
|
defaultValues: n
|
|
829
|
-
}),
|
|
830
|
-
|
|
834
|
+
}), Vt(
|
|
835
|
+
g
|
|
831
836
|
)));
|
|
832
837
|
f(c, n, l);
|
|
833
|
-
}, [i, f]),
|
|
838
|
+
}, [i, f]), ee = (e, n) => {
|
|
834
839
|
const l = r.find(
|
|
835
|
-
(
|
|
840
|
+
(T) => T.id === e
|
|
836
841
|
);
|
|
837
|
-
let c = r.map((
|
|
838
|
-
const
|
|
839
|
-
(
|
|
842
|
+
let c = r.map((T) => T.id !== e ? T : n(T));
|
|
843
|
+
const g = c.find(
|
|
844
|
+
(T) => T.id === e
|
|
840
845
|
);
|
|
841
|
-
let
|
|
842
|
-
if (
|
|
843
|
-
const
|
|
844
|
-
control:
|
|
845
|
-
nextSelectedCardIds:
|
|
846
|
+
let w, p;
|
|
847
|
+
if (g && s === "dashboard" && (g.type === "field_selector" || g.type === "metric_selector")) {
|
|
848
|
+
const T = (m == null ? void 0 : m[g.id]) || [], Y = Z({
|
|
849
|
+
control: g,
|
|
850
|
+
nextSelectedCardIds: T
|
|
846
851
|
});
|
|
847
852
|
c = c.map(
|
|
848
|
-
(
|
|
849
|
-
),
|
|
853
|
+
(U) => U.id === e ? Y.nextControl : U
|
|
854
|
+
), w = Y.cardBindingsById, p = [g.id];
|
|
850
855
|
} else if (l && s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector")) {
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
|
|
856
|
+
const T = (m == null ? void 0 : m[l.id]) || [];
|
|
857
|
+
w = Object.fromEntries(
|
|
858
|
+
T.map((Y) => [Y, void 0])
|
|
854
859
|
), p = [l.id];
|
|
855
860
|
}
|
|
856
|
-
const
|
|
857
|
-
(
|
|
861
|
+
const S = c.find(
|
|
862
|
+
(T) => T.id === e
|
|
858
863
|
);
|
|
859
|
-
let
|
|
860
|
-
if (l &&
|
|
861
|
-
const
|
|
864
|
+
let F = i;
|
|
865
|
+
if (l && S) {
|
|
866
|
+
const T = be({
|
|
862
867
|
control: l,
|
|
863
868
|
defaultValues: i
|
|
864
869
|
});
|
|
865
|
-
l.source.kind === "manual" &&
|
|
866
|
-
const
|
|
870
|
+
l.source.kind === "manual" && S.source.kind === "sql_query" && (Q.current[e] = T);
|
|
871
|
+
const Y = T === void 0 && l.source.kind === "sql_query" && S.source.kind === "manual" ? Q.current[e] : T, U = Qe({
|
|
867
872
|
previousControl: l,
|
|
868
|
-
nextControl:
|
|
869
|
-
currentDefaultValue:
|
|
873
|
+
nextControl: S,
|
|
874
|
+
currentDefaultValue: Y
|
|
870
875
|
});
|
|
871
|
-
|
|
872
|
-
(
|
|
876
|
+
S.source.kind === "manual" && (Q.current[e] = U), i && (F = { ...i }, U === void 0 ? delete F[e] : F[e] = U), c = c.map(
|
|
877
|
+
(_e) => _e.id === e ? { ...S, defaultValue: U } : _e
|
|
873
878
|
);
|
|
874
879
|
}
|
|
875
|
-
|
|
880
|
+
L(c, F, {
|
|
876
881
|
type: "update",
|
|
877
|
-
cardBindingsById:
|
|
882
|
+
cardBindingsById: w,
|
|
878
883
|
affectedBindingControlIds: p
|
|
879
884
|
});
|
|
880
885
|
}, it = (e, n) => {
|
|
881
886
|
const l = n.trim();
|
|
882
|
-
if (l.length === 0 || l === e ||
|
|
883
|
-
(
|
|
887
|
+
if (l.length === 0 || l === e || N.has(l) || r.some(
|
|
888
|
+
(w) => w.id === l && w.id !== e
|
|
884
889
|
))
|
|
885
890
|
return;
|
|
886
891
|
const c = r.map(
|
|
887
|
-
(
|
|
892
|
+
(w) => w.id === e ? { ...w, id: l } : w
|
|
888
893
|
);
|
|
889
894
|
if (!i) {
|
|
890
|
-
|
|
895
|
+
L(c, void 0, {
|
|
891
896
|
type: "rename",
|
|
892
897
|
oldId: e,
|
|
893
898
|
newId: l
|
|
894
899
|
});
|
|
895
900
|
return;
|
|
896
901
|
}
|
|
897
|
-
const
|
|
898
|
-
Object.prototype.hasOwnProperty.call(
|
|
902
|
+
const g = { ...i };
|
|
903
|
+
Object.prototype.hasOwnProperty.call(g, e) && (g[l] = g[e], delete g[e]), L(c, g, {
|
|
899
904
|
type: "rename",
|
|
900
905
|
oldId: e,
|
|
901
906
|
newId: l
|
|
@@ -903,101 +908,101 @@ function ca({
|
|
|
903
908
|
}, dt = (e) => {
|
|
904
909
|
const n = r.filter((c) => c.id !== e);
|
|
905
910
|
if (!i) {
|
|
906
|
-
|
|
911
|
+
L(n, void 0, { type: "remove", controlId: e });
|
|
907
912
|
return;
|
|
908
913
|
}
|
|
909
914
|
const l = { ...i };
|
|
910
|
-
delete l[e],
|
|
915
|
+
delete l[e], L(n, l, { type: "remove", controlId: e });
|
|
911
916
|
}, ct = z(() => {
|
|
912
|
-
|
|
917
|
+
I.current = void 0, D({
|
|
913
918
|
step: 1,
|
|
914
|
-
control:
|
|
915
|
-
}),
|
|
916
|
-
}, [r,
|
|
917
|
-
|
|
919
|
+
control: re(s, r, Array.from(N))
|
|
920
|
+
}), P(null), H(null);
|
|
921
|
+
}, [r, N, s]), te = (e) => {
|
|
922
|
+
D(
|
|
918
923
|
(n) => n && (() => {
|
|
919
924
|
const l = e(n.control);
|
|
920
|
-
n.control.source.kind === "manual" && l.source.kind === "sql_query" && (
|
|
921
|
-
const c = n.defaultValue === void 0 && n.control.source.kind === "sql_query" && l.source.kind === "manual" ?
|
|
925
|
+
n.control.source.kind === "manual" && l.source.kind === "sql_query" && (I.current = n.defaultValue);
|
|
926
|
+
const c = n.defaultValue === void 0 && n.control.source.kind === "sql_query" && l.source.kind === "manual" ? I.current : n.defaultValue, g = Qe({
|
|
922
927
|
previousControl: n.control,
|
|
923
928
|
nextControl: l,
|
|
924
929
|
currentDefaultValue: c
|
|
925
930
|
});
|
|
926
|
-
return l.source.kind === "manual" && (
|
|
931
|
+
return l.source.kind === "manual" && (I.current = g), {
|
|
927
932
|
...n,
|
|
928
933
|
control: l,
|
|
929
|
-
defaultValue:
|
|
934
|
+
defaultValue: g
|
|
930
935
|
};
|
|
931
936
|
})()
|
|
932
937
|
);
|
|
933
|
-
},
|
|
934
|
-
|
|
935
|
-
(n) => n && (n.control.source.kind === "manual" && (
|
|
938
|
+
}, Ie = (e) => {
|
|
939
|
+
D(
|
|
940
|
+
(n) => n && (n.control.source.kind === "manual" && (I.current = e), {
|
|
936
941
|
...n,
|
|
937
942
|
defaultValue: e
|
|
938
943
|
})
|
|
939
944
|
);
|
|
940
|
-
},
|
|
945
|
+
}, ue = (() => {
|
|
941
946
|
if (!a)
|
|
942
947
|
return !1;
|
|
943
|
-
if (a.step === 2 &&
|
|
948
|
+
if (a.step === 2 && q(a.control.type))
|
|
944
949
|
return (a.selectedCardIds || []).length > 0;
|
|
945
950
|
if (a.step !== 2 && a.step !== 3 || !a.control.label.trim())
|
|
946
951
|
return !1;
|
|
947
952
|
const n = a.control.source.kind === "sql_query" ? a.control : ze(a.control);
|
|
948
|
-
if (n.source.kind === "manual" && (
|
|
953
|
+
if (n.source.kind === "manual" && (Et(n) && n.source.options.length === 0 || n.source.options.some(
|
|
949
954
|
(c) => c.label.trim().length === 0 || c.value.trim().length === 0
|
|
950
955
|
)))
|
|
951
956
|
return !1;
|
|
952
957
|
if (n.source.kind === "sql_query") {
|
|
953
|
-
const { connectionId: l, sql: c, valueColumn:
|
|
954
|
-
return l.trim().length > 0 && c.trim().length > 0 &&
|
|
958
|
+
const { connectionId: l, sql: c, valueColumn: g } = n.source;
|
|
959
|
+
return l.trim().length > 0 && c.trim().length > 0 && g.trim().length > 0;
|
|
955
960
|
}
|
|
956
|
-
return
|
|
957
|
-
|
|
961
|
+
return qt(
|
|
962
|
+
se(n, a.defaultValue)
|
|
958
963
|
);
|
|
959
|
-
})(),
|
|
960
|
-
var
|
|
964
|
+
})(), Ve = () => {
|
|
965
|
+
var w;
|
|
961
966
|
if (!a)
|
|
962
967
|
return;
|
|
963
|
-
const e = ze(a.control), n =
|
|
968
|
+
const e = ze(a.control), n = $t({
|
|
964
969
|
label: e.label,
|
|
965
970
|
fallbackId: e.id,
|
|
966
971
|
existingControls: r,
|
|
967
|
-
reservedIds: Array.from(
|
|
972
|
+
reservedIds: Array.from(N)
|
|
968
973
|
}), l = {
|
|
969
974
|
...e,
|
|
970
975
|
id: n
|
|
971
|
-
}, c = s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") && ((
|
|
976
|
+
}, c = s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") && ((w = a.selectedCardIds) != null && w.length) ? Re({
|
|
972
977
|
control: l,
|
|
973
|
-
participants:
|
|
978
|
+
participants: y || [],
|
|
974
979
|
selectedCardIds: a.selectedCardIds
|
|
975
|
-
}) : void 0,
|
|
980
|
+
}) : void 0, g = se(
|
|
976
981
|
l,
|
|
977
982
|
a.defaultValue
|
|
978
983
|
);
|
|
979
|
-
|
|
984
|
+
D({
|
|
980
985
|
step: s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") ? 4 : 3,
|
|
981
986
|
control: l,
|
|
982
|
-
defaultValue:
|
|
987
|
+
defaultValue: g,
|
|
983
988
|
createdControlId: n,
|
|
984
989
|
selectedCardIds: a.selectedCardIds,
|
|
985
990
|
cardBindingsById: c
|
|
986
991
|
});
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
}, []),
|
|
992
|
+
}, pe = z(() => {
|
|
993
|
+
D(null);
|
|
994
|
+
}, []), Ee = z(() => {
|
|
990
995
|
if (!(a != null && a.createdControlId)) {
|
|
991
|
-
|
|
996
|
+
D(null);
|
|
992
997
|
return;
|
|
993
998
|
}
|
|
994
|
-
const e = a.control, n = a.createdControlId, l =
|
|
999
|
+
const e = a.control, n = a.createdControlId, l = se(
|
|
995
1000
|
e,
|
|
996
1001
|
a.defaultValue
|
|
997
1002
|
);
|
|
998
1003
|
if (i) {
|
|
999
1004
|
const c = { ...i };
|
|
1000
|
-
l === void 0 ? delete c[n] : c[n] = l,
|
|
1005
|
+
l === void 0 ? delete c[n] : c[n] = l, L(
|
|
1001
1006
|
[
|
|
1002
1007
|
...r,
|
|
1003
1008
|
{
|
|
@@ -1012,7 +1017,7 @@ function ca({
|
|
|
1012
1017
|
}
|
|
1013
1018
|
);
|
|
1014
1019
|
} else
|
|
1015
|
-
|
|
1020
|
+
L(
|
|
1016
1021
|
[
|
|
1017
1022
|
...r,
|
|
1018
1023
|
{
|
|
@@ -1026,12 +1031,12 @@ function ca({
|
|
|
1026
1031
|
cardBindingsById: a.cardBindingsById
|
|
1027
1032
|
}
|
|
1028
1033
|
);
|
|
1029
|
-
|
|
1030
|
-
}, [r, a, i,
|
|
1034
|
+
P(n), D(null), k == null || k();
|
|
1035
|
+
}, [r, a, i, L, k]), ut = a ? q(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], qe = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${Ft(a.control.label) || a.control.id}]]` : "", me = Oe({
|
|
1031
1036
|
controls: r,
|
|
1032
1037
|
defaultValues: i
|
|
1033
|
-
}),
|
|
1034
|
-
controls:
|
|
1038
|
+
}), fe = a ? [...r, a.control] : r, Fe = a ? Oe({
|
|
1039
|
+
controls: fe,
|
|
1035
1040
|
defaultValues: i,
|
|
1036
1041
|
overrides: [
|
|
1037
1042
|
{
|
|
@@ -1039,11 +1044,11 @@ function ca({
|
|
|
1039
1044
|
value: a.defaultValue
|
|
1040
1045
|
}
|
|
1041
1046
|
]
|
|
1042
|
-
}) :
|
|
1047
|
+
}) : me;
|
|
1043
1048
|
return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1044
1049
|
a ? /* @__PURE__ */ d("div", { className: "space-y-4 pb-1", children: [
|
|
1045
1050
|
/* @__PURE__ */ t(
|
|
1046
|
-
|
|
1051
|
+
Jt,
|
|
1047
1052
|
{
|
|
1048
1053
|
currentStep: a.step,
|
|
1049
1054
|
labels: ut
|
|
@@ -1055,32 +1060,32 @@ function ca({
|
|
|
1055
1060
|
"aggregation_selector",
|
|
1056
1061
|
"field_selector",
|
|
1057
1062
|
"metric_selector"
|
|
1058
|
-
]), n =
|
|
1059
|
-
(
|
|
1060
|
-
), l =
|
|
1061
|
-
(
|
|
1062
|
-
), c = (
|
|
1063
|
+
]), n = R.filter(
|
|
1064
|
+
(g) => !e.has(g.value)
|
|
1065
|
+
), l = R.filter(
|
|
1066
|
+
(g) => e.has(g.value)
|
|
1067
|
+
), c = (g) => /* @__PURE__ */ d(
|
|
1063
1068
|
"button",
|
|
1064
1069
|
{
|
|
1065
1070
|
type: "button",
|
|
1066
1071
|
className: "rounded-[6px] border border-border/60 bg-background px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:outline-none",
|
|
1067
|
-
onClick: () =>
|
|
1068
|
-
|
|
1072
|
+
onClick: () => D(
|
|
1073
|
+
ea({
|
|
1069
1074
|
scope: s,
|
|
1070
1075
|
existingControls: r,
|
|
1071
|
-
reservedIds: Array.from(
|
|
1072
|
-
type:
|
|
1076
|
+
reservedIds: Array.from(N),
|
|
1077
|
+
type: g.value
|
|
1073
1078
|
})
|
|
1074
1079
|
),
|
|
1075
1080
|
children: [
|
|
1076
|
-
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children:
|
|
1077
|
-
/* @__PURE__ */ t("p", { className: "mt-0.5 text-[12px] text-muted-foreground", children:
|
|
1081
|
+
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: g.label }),
|
|
1082
|
+
/* @__PURE__ */ t("p", { className: "mt-0.5 text-[12px] text-muted-foreground", children: g.description })
|
|
1078
1083
|
]
|
|
1079
1084
|
},
|
|
1080
|
-
|
|
1085
|
+
g.value
|
|
1081
1086
|
);
|
|
1082
1087
|
return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1083
|
-
s === "card" && (
|
|
1088
|
+
s === "card" && (v == null ? void 0 : v.sql) == null ? /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Explorer cards support displayed metric, group by field, aggregation, and time grain controls here." }) : null,
|
|
1084
1089
|
n.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-1.5", children: [
|
|
1085
1090
|
/* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Input controls" }),
|
|
1086
1091
|
/* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: n.map(c) })
|
|
@@ -1090,15 +1095,15 @@ function ca({
|
|
|
1090
1095
|
/* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: l.map(c) })
|
|
1091
1096
|
] }),
|
|
1092
1097
|
/* @__PURE__ */ t(
|
|
1093
|
-
|
|
1098
|
+
oe,
|
|
1094
1099
|
{
|
|
1095
1100
|
secondary: /* @__PURE__ */ t(
|
|
1096
|
-
|
|
1101
|
+
V,
|
|
1097
1102
|
{
|
|
1098
1103
|
type: "button",
|
|
1099
1104
|
variant: "outline",
|
|
1100
1105
|
size: "xs",
|
|
1101
|
-
onClick:
|
|
1106
|
+
onClick: pe,
|
|
1102
1107
|
children: "Back to controls"
|
|
1103
1108
|
}
|
|
1104
1109
|
)
|
|
@@ -1106,13 +1111,13 @@ function ca({
|
|
|
1106
1111
|
)
|
|
1107
1112
|
] });
|
|
1108
1113
|
})(),
|
|
1109
|
-
a.step === 2 &&
|
|
1114
|
+
a.step === 2 && q(a.control.type) && /* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
1110
1115
|
/* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
1111
1116
|
/* @__PURE__ */ t(
|
|
1112
1117
|
ot,
|
|
1113
1118
|
{
|
|
1114
1119
|
control: a.control,
|
|
1115
|
-
onChange: (e) =>
|
|
1120
|
+
onChange: (e) => te((n) => ({
|
|
1116
1121
|
...n,
|
|
1117
1122
|
label: e
|
|
1118
1123
|
}))
|
|
@@ -1120,7 +1125,7 @@ function ca({
|
|
|
1120
1125
|
),
|
|
1121
1126
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
|
|
1122
1127
|
] }),
|
|
1123
|
-
|
|
1128
|
+
W.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: W.map((e) => {
|
|
1124
1129
|
const n = (a.selectedCardIds || []).includes(e.cardId);
|
|
1125
1130
|
return /* @__PURE__ */ d(
|
|
1126
1131
|
"label",
|
|
@@ -1128,17 +1133,17 @@ function ca({
|
|
|
1128
1133
|
className: "flex items-start gap-2 rounded-[4px] px-1.5 py-1 text-[13px] hover:bg-muted/40",
|
|
1129
1134
|
children: [
|
|
1130
1135
|
/* @__PURE__ */ t(
|
|
1131
|
-
|
|
1136
|
+
_t,
|
|
1132
1137
|
{
|
|
1133
1138
|
checked: n,
|
|
1134
|
-
onCheckedChange: (l) =>
|
|
1139
|
+
onCheckedChange: (l) => D(
|
|
1135
1140
|
(c) => c && {
|
|
1136
1141
|
...c,
|
|
1137
1142
|
selectedCardIds: l === !0 ? [
|
|
1138
1143
|
...c.selectedCardIds || [],
|
|
1139
1144
|
e.cardId
|
|
1140
1145
|
] : (c.selectedCardIds || []).filter(
|
|
1141
|
-
(
|
|
1146
|
+
(g) => g !== e.cardId
|
|
1142
1147
|
)
|
|
1143
1148
|
}
|
|
1144
1149
|
)
|
|
@@ -1154,15 +1159,15 @@ function ca({
|
|
|
1154
1159
|
);
|
|
1155
1160
|
}) }),
|
|
1156
1161
|
/* @__PURE__ */ t(
|
|
1157
|
-
|
|
1162
|
+
oe,
|
|
1158
1163
|
{
|
|
1159
1164
|
secondary: /* @__PURE__ */ t(
|
|
1160
|
-
|
|
1165
|
+
V,
|
|
1161
1166
|
{
|
|
1162
1167
|
type: "button",
|
|
1163
1168
|
variant: "outline",
|
|
1164
1169
|
size: "xs",
|
|
1165
|
-
onClick: () =>
|
|
1170
|
+
onClick: () => D(
|
|
1166
1171
|
(e) => e && {
|
|
1167
1172
|
...e,
|
|
1168
1173
|
step: 1,
|
|
@@ -1173,80 +1178,80 @@ function ca({
|
|
|
1173
1178
|
}
|
|
1174
1179
|
),
|
|
1175
1180
|
primary: /* @__PURE__ */ t(
|
|
1176
|
-
|
|
1181
|
+
V,
|
|
1177
1182
|
{
|
|
1178
1183
|
type: "button",
|
|
1179
1184
|
size: "xs",
|
|
1180
|
-
onClick: () =>
|
|
1185
|
+
onClick: () => D(
|
|
1181
1186
|
(e) => e && {
|
|
1182
1187
|
...e,
|
|
1183
1188
|
step: 3
|
|
1184
1189
|
}
|
|
1185
1190
|
),
|
|
1186
|
-
disabled: !
|
|
1191
|
+
disabled: !ue,
|
|
1187
1192
|
children: "Next"
|
|
1188
1193
|
}
|
|
1189
1194
|
)
|
|
1190
1195
|
}
|
|
1191
1196
|
)
|
|
1192
1197
|
] }),
|
|
1193
|
-
a.step === 2 && !
|
|
1194
|
-
|
|
1198
|
+
a.step === 2 && !q(a.control.type) && /* @__PURE__ */ t(
|
|
1199
|
+
je,
|
|
1195
1200
|
{
|
|
1196
1201
|
control: a.control,
|
|
1197
1202
|
defaultValue: a.defaultValue,
|
|
1198
1203
|
availableFieldChoices: j.fields,
|
|
1199
1204
|
availableMetricChoices: j.metrics,
|
|
1200
|
-
previewControlDefinitions:
|
|
1201
|
-
previewControlValues:
|
|
1202
|
-
onControlChange: (e) =>
|
|
1203
|
-
onLabelChange: (e) =>
|
|
1205
|
+
previewControlDefinitions: fe,
|
|
1206
|
+
previewControlValues: Fe,
|
|
1207
|
+
onControlChange: (e) => te(() => e),
|
|
1208
|
+
onLabelChange: (e) => te((n) => ({
|
|
1204
1209
|
...n,
|
|
1205
1210
|
label: e
|
|
1206
1211
|
})),
|
|
1207
|
-
onDefaultValueChange:
|
|
1208
|
-
onBack: () =>
|
|
1212
|
+
onDefaultValueChange: Ie,
|
|
1213
|
+
onBack: () => D(
|
|
1209
1214
|
(e) => e && {
|
|
1210
1215
|
...e,
|
|
1211
1216
|
step: 1
|
|
1212
1217
|
}
|
|
1213
1218
|
),
|
|
1214
|
-
onNext:
|
|
1215
|
-
nextDisabled: !
|
|
1219
|
+
onNext: Ve,
|
|
1220
|
+
nextDisabled: !ue
|
|
1216
1221
|
}
|
|
1217
1222
|
),
|
|
1218
|
-
a.step === 3 &&
|
|
1219
|
-
|
|
1223
|
+
a.step === 3 && q(a.control.type) && /* @__PURE__ */ t(
|
|
1224
|
+
je,
|
|
1220
1225
|
{
|
|
1221
1226
|
control: a.control,
|
|
1222
1227
|
defaultValue: a.defaultValue,
|
|
1223
1228
|
availableFieldChoices: j.fields,
|
|
1224
1229
|
availableMetricChoices: j.metrics,
|
|
1225
|
-
previewControlDefinitions:
|
|
1226
|
-
previewControlValues:
|
|
1227
|
-
onControlChange: (e) =>
|
|
1228
|
-
onLabelChange: (e) =>
|
|
1230
|
+
previewControlDefinitions: fe,
|
|
1231
|
+
previewControlValues: Fe,
|
|
1232
|
+
onControlChange: (e) => te(() => e),
|
|
1233
|
+
onLabelChange: (e) => te((n) => ({
|
|
1229
1234
|
...n,
|
|
1230
1235
|
label: e
|
|
1231
1236
|
})),
|
|
1232
|
-
onDefaultValueChange:
|
|
1233
|
-
onBack: () =>
|
|
1237
|
+
onDefaultValueChange: Ie,
|
|
1238
|
+
onBack: () => D(
|
|
1234
1239
|
(e) => e && {
|
|
1235
1240
|
...e,
|
|
1236
1241
|
step: 2
|
|
1237
1242
|
}
|
|
1238
1243
|
),
|
|
1239
|
-
onNext:
|
|
1240
|
-
nextDisabled: !
|
|
1244
|
+
onNext: Ve,
|
|
1245
|
+
nextDisabled: !ue
|
|
1241
1246
|
}
|
|
1242
1247
|
),
|
|
1243
|
-
a.step === 3 && !
|
|
1248
|
+
a.step === 3 && !q(a.control.type) && /* @__PURE__ */ t(
|
|
1244
1249
|
$e,
|
|
1245
1250
|
{
|
|
1246
1251
|
control: a.control,
|
|
1247
1252
|
scope: s,
|
|
1248
|
-
createdReference:
|
|
1249
|
-
explorerContent: /* @__PURE__ */ d(
|
|
1253
|
+
createdReference: qe,
|
|
1254
|
+
explorerContent: /* @__PURE__ */ d($, { children: [
|
|
1250
1255
|
"Open the card and use",
|
|
1251
1256
|
" ",
|
|
1252
1257
|
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
|
|
@@ -1254,48 +1259,48 @@ function ca({
|
|
|
1254
1259
|
"to choose what this control changes."
|
|
1255
1260
|
] }),
|
|
1256
1261
|
sqlDescription: "Reference this control directly in the SQL editor.",
|
|
1257
|
-
onBack: () =>
|
|
1262
|
+
onBack: () => D(
|
|
1258
1263
|
(e) => e && {
|
|
1259
1264
|
...e,
|
|
1260
1265
|
step: 2
|
|
1261
1266
|
}
|
|
1262
1267
|
),
|
|
1263
|
-
onCancel:
|
|
1264
|
-
onDone:
|
|
1268
|
+
onCancel: pe,
|
|
1269
|
+
onDone: Ee
|
|
1265
1270
|
}
|
|
1266
1271
|
),
|
|
1267
|
-
a.step === 4 &&
|
|
1272
|
+
a.step === 4 && q(a.control.type) && /* @__PURE__ */ t(
|
|
1268
1273
|
$e,
|
|
1269
1274
|
{
|
|
1270
1275
|
control: a.control,
|
|
1271
1276
|
scope: s,
|
|
1272
|
-
createdReference:
|
|
1273
|
-
summaryDetail: /* @__PURE__ */ d(
|
|
1277
|
+
createdReference: qe,
|
|
1278
|
+
summaryDetail: /* @__PURE__ */ d($, { children: [
|
|
1274
1279
|
"Used by ",
|
|
1275
1280
|
(a.selectedCardIds || []).length,
|
|
1276
1281
|
" ",
|
|
1277
1282
|
"selected card",
|
|
1278
1283
|
(a.selectedCardIds || []).length === 1 ? "" : "s"
|
|
1279
1284
|
] }),
|
|
1280
|
-
explorerContent: /* @__PURE__ */ t(
|
|
1285
|
+
explorerContent: /* @__PURE__ */ t($, { children: "Selected cards have been set up to respond to this control automatically." }),
|
|
1281
1286
|
sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
|
|
1282
|
-
onBack: () =>
|
|
1287
|
+
onBack: () => D(
|
|
1283
1288
|
(e) => e && {
|
|
1284
1289
|
...e,
|
|
1285
1290
|
step: 3
|
|
1286
1291
|
}
|
|
1287
1292
|
),
|
|
1288
|
-
onCancel:
|
|
1289
|
-
onDone:
|
|
1293
|
+
onCancel: pe,
|
|
1294
|
+
onDone: Ee
|
|
1290
1295
|
}
|
|
1291
1296
|
)
|
|
1292
1297
|
] }) : null,
|
|
1293
1298
|
!a && r.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: u }) : null,
|
|
1294
1299
|
!a && r.map((e) => {
|
|
1295
|
-
const n =
|
|
1300
|
+
const n = ae(e), l = x == null ? void 0 : x[e.id], c = be({
|
|
1296
1301
|
control: e,
|
|
1297
1302
|
defaultValues: i
|
|
1298
|
-
}),
|
|
1303
|
+
}), g = ce === e.id, w = "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";
|
|
1299
1304
|
return /* @__PURE__ */ d("div", { className: "rounded-[6px] border border-border/60", children: [
|
|
1300
1305
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 px-3 py-2.5", children: [
|
|
1301
1306
|
/* @__PURE__ */ d(
|
|
@@ -1303,16 +1308,16 @@ function ca({
|
|
|
1303
1308
|
{
|
|
1304
1309
|
type: "button",
|
|
1305
1310
|
className: "flex min-w-0 flex-1 items-start gap-2 rounded-[4px] text-left focus:outline-none focus-visible:bg-muted/40",
|
|
1306
|
-
onClick: () =>
|
|
1311
|
+
onClick: () => P(
|
|
1307
1312
|
(p) => p === e.id ? null : e.id
|
|
1308
1313
|
),
|
|
1309
1314
|
children: [
|
|
1310
|
-
|
|
1315
|
+
g ? /* @__PURE__ */ t(Me, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Be, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1311
1316
|
/* @__PURE__ */ d("div", { className: "min-w-0", children: [
|
|
1312
1317
|
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1313
1318
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
|
|
1314
|
-
/* @__PURE__ */ t("span", { className:
|
|
1315
|
-
/* @__PURE__ */ t("span", { className:
|
|
1319
|
+
/* @__PURE__ */ t("span", { className: w, children: We(e.type).label }),
|
|
1320
|
+
/* @__PURE__ */ t("span", { className: w, children: Ze(s, e.placement) })
|
|
1316
1321
|
] }),
|
|
1317
1322
|
/* @__PURE__ */ d("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
|
|
1318
1323
|
et(e),
|
|
@@ -1323,7 +1328,7 @@ function ca({
|
|
|
1323
1328
|
}
|
|
1324
1329
|
),
|
|
1325
1330
|
/* @__PURE__ */ t(
|
|
1326
|
-
|
|
1331
|
+
V,
|
|
1327
1332
|
{
|
|
1328
1333
|
type: "button",
|
|
1329
1334
|
size: "xs",
|
|
@@ -1331,77 +1336,77 @@ function ca({
|
|
|
1331
1336
|
className: "h-7 w-7 shrink-0 p-0 text-muted-foreground",
|
|
1332
1337
|
onClick: () => dt(e.id),
|
|
1333
1338
|
"aria-label": `Remove ${e.label}`,
|
|
1334
|
-
children: /* @__PURE__ */ t(
|
|
1339
|
+
children: /* @__PURE__ */ t(Lt, { className: "h-3.5 w-3.5" })
|
|
1335
1340
|
}
|
|
1336
1341
|
)
|
|
1337
1342
|
] }),
|
|
1338
|
-
|
|
1343
|
+
g && /* @__PURE__ */ d("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
|
|
1339
1344
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-3", children: [
|
|
1340
1345
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1341
|
-
/* @__PURE__ */ t(
|
|
1346
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
1342
1347
|
/* @__PURE__ */ t(
|
|
1343
1348
|
tt,
|
|
1344
1349
|
{
|
|
1345
1350
|
size: "xs",
|
|
1346
1351
|
value: e.label,
|
|
1347
1352
|
placeholder: "Control label",
|
|
1348
|
-
onChange: (p) =>
|
|
1349
|
-
...
|
|
1353
|
+
onChange: (p) => ee(e.id, (S) => ({
|
|
1354
|
+
...S,
|
|
1350
1355
|
label: p.target.value
|
|
1351
1356
|
}))
|
|
1352
1357
|
}
|
|
1353
1358
|
)
|
|
1354
1359
|
] }),
|
|
1355
1360
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1356
|
-
/* @__PURE__ */ t(
|
|
1361
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
|
|
1357
1362
|
/* @__PURE__ */ d(
|
|
1358
|
-
|
|
1363
|
+
ge,
|
|
1359
1364
|
{
|
|
1360
1365
|
value: e.type,
|
|
1361
1366
|
onValueChange: (p) => {
|
|
1362
|
-
const
|
|
1367
|
+
const S = at({
|
|
1363
1368
|
controls: r,
|
|
1364
1369
|
controlId: e.id,
|
|
1365
1370
|
nextType: p,
|
|
1366
1371
|
defaultValues: i
|
|
1367
1372
|
});
|
|
1368
|
-
|
|
1373
|
+
L(S.controls, S.defaultValues);
|
|
1369
1374
|
},
|
|
1370
1375
|
children: [
|
|
1371
|
-
/* @__PURE__ */ t(
|
|
1372
|
-
/* @__PURE__ */ t(
|
|
1376
|
+
/* @__PURE__ */ t(ye, { size: "xs", children: /* @__PURE__ */ t(xe, {}) }),
|
|
1377
|
+
/* @__PURE__ */ t(ve, { children: Le({
|
|
1373
1378
|
scope: s,
|
|
1374
|
-
card:
|
|
1379
|
+
card: v,
|
|
1375
1380
|
includeType: e.type
|
|
1376
|
-
}).map((p) => /* @__PURE__ */ t(
|
|
1381
|
+
}).map((p) => /* @__PURE__ */ t(Ce, { value: p.value, children: p.label }, p.value)) })
|
|
1377
1382
|
]
|
|
1378
1383
|
}
|
|
1379
1384
|
)
|
|
1380
1385
|
] }),
|
|
1381
1386
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1382
|
-
/* @__PURE__ */ t(
|
|
1387
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
|
|
1383
1388
|
/* @__PURE__ */ d(
|
|
1384
|
-
|
|
1389
|
+
ge,
|
|
1385
1390
|
{
|
|
1386
|
-
value: e.placement ||
|
|
1387
|
-
onValueChange: (p) =>
|
|
1388
|
-
...
|
|
1391
|
+
value: e.placement || G,
|
|
1392
|
+
onValueChange: (p) => ee(e.id, (S) => ({
|
|
1393
|
+
...S,
|
|
1389
1394
|
placement: p
|
|
1390
1395
|
})),
|
|
1391
1396
|
children: [
|
|
1392
|
-
/* @__PURE__ */ t(
|
|
1393
|
-
/* @__PURE__ */ t(
|
|
1397
|
+
/* @__PURE__ */ t(ye, { size: "xs", children: /* @__PURE__ */ t(xe, {}) }),
|
|
1398
|
+
/* @__PURE__ */ t(ve, { children: B.map((p) => /* @__PURE__ */ t(Ce, { value: p.value, children: p.label }, p.value)) })
|
|
1394
1399
|
]
|
|
1395
1400
|
}
|
|
1396
1401
|
)
|
|
1397
1402
|
] })
|
|
1398
1403
|
] }),
|
|
1399
|
-
|
|
1400
|
-
|
|
1404
|
+
q(e.type) ? /* @__PURE__ */ t(
|
|
1405
|
+
zt,
|
|
1401
1406
|
{
|
|
1402
1407
|
type: e.type,
|
|
1403
1408
|
participants: Ae(
|
|
1404
|
-
|
|
1409
|
+
y || [],
|
|
1405
1410
|
e.type
|
|
1406
1411
|
).map((p) => ({
|
|
1407
1412
|
cardId: p.cardId,
|
|
@@ -1410,15 +1415,15 @@ function ca({
|
|
|
1410
1415
|
})),
|
|
1411
1416
|
selectedCardIds: (m == null ? void 0 : m[e.id]) || [],
|
|
1412
1417
|
onChange: (p) => {
|
|
1413
|
-
const
|
|
1418
|
+
const S = Z({
|
|
1414
1419
|
control: e,
|
|
1415
1420
|
nextSelectedCardIds: p
|
|
1416
|
-
}),
|
|
1417
|
-
(
|
|
1421
|
+
}), F = r.map(
|
|
1422
|
+
(T) => T.id === e.id ? S.nextControl : T
|
|
1418
1423
|
);
|
|
1419
|
-
F
|
|
1424
|
+
L(F, i, {
|
|
1420
1425
|
type: "update",
|
|
1421
|
-
cardBindingsById:
|
|
1426
|
+
cardBindingsById: S.cardBindingsById
|
|
1422
1427
|
});
|
|
1423
1428
|
}
|
|
1424
1429
|
}
|
|
@@ -1430,9 +1435,9 @@ function ca({
|
|
|
1430
1435
|
availableFieldChoices: n.fields,
|
|
1431
1436
|
availableMetricChoices: n.metrics,
|
|
1432
1437
|
previewControlDefinitions: r,
|
|
1433
|
-
previewControlValues:
|
|
1438
|
+
previewControlValues: me,
|
|
1434
1439
|
controlLifecycle: "edit",
|
|
1435
|
-
onChange: (p) =>
|
|
1440
|
+
onChange: (p) => ee(e.id, () => p)
|
|
1436
1441
|
}
|
|
1437
1442
|
),
|
|
1438
1443
|
e.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
|
|
@@ -1443,45 +1448,45 @@ function ca({
|
|
|
1443
1448
|
allowNoDefault: !0,
|
|
1444
1449
|
allowCardDefault: !0,
|
|
1445
1450
|
previewControlDefinitions: r,
|
|
1446
|
-
previewControlValues:
|
|
1451
|
+
previewControlValues: me,
|
|
1447
1452
|
onChange: (p) => {
|
|
1448
|
-
const
|
|
1449
|
-
(
|
|
1453
|
+
const S = r.map(
|
|
1454
|
+
(F) => F.id === e.id ? { ...F, defaultValue: p } : F
|
|
1450
1455
|
);
|
|
1451
|
-
if (e.source.kind === "manual" && (
|
|
1452
|
-
const
|
|
1453
|
-
p === void 0 ? delete
|
|
1456
|
+
if (e.source.kind === "manual" && (Q.current[e.id] = p), i) {
|
|
1457
|
+
const F = { ...i };
|
|
1458
|
+
p === void 0 ? delete F[e.id] : F[e.id] = p, L(S, F);
|
|
1454
1459
|
return;
|
|
1455
1460
|
}
|
|
1456
|
-
|
|
1461
|
+
L(S, void 0);
|
|
1457
1462
|
}
|
|
1458
1463
|
}
|
|
1459
1464
|
),
|
|
1460
1465
|
/* @__PURE__ */ d(
|
|
1461
|
-
|
|
1466
|
+
Ot,
|
|
1462
1467
|
{
|
|
1463
|
-
open:
|
|
1464
|
-
onOpenChange: (p) =>
|
|
1468
|
+
open: K === e.id,
|
|
1469
|
+
onOpenChange: (p) => H(p ? e.id : null),
|
|
1465
1470
|
children: [
|
|
1466
|
-
/* @__PURE__ */ t(
|
|
1467
|
-
|
|
1471
|
+
/* @__PURE__ */ t(Mt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
1472
|
+
V,
|
|
1468
1473
|
{
|
|
1469
1474
|
type: "button",
|
|
1470
1475
|
variant: "ghost",
|
|
1471
1476
|
size: "xs",
|
|
1472
1477
|
className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
|
|
1473
1478
|
children: [
|
|
1474
|
-
|
|
1479
|
+
K === e.id ? /* @__PURE__ */ t(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Be, { className: "h-3.5 w-3.5" }),
|
|
1475
1480
|
"Advanced"
|
|
1476
1481
|
]
|
|
1477
1482
|
}
|
|
1478
1483
|
) }),
|
|
1479
|
-
/* @__PURE__ */ d(
|
|
1484
|
+
/* @__PURE__ */ d(Bt, { className: "space-y-3 pt-2", children: [
|
|
1480
1485
|
/* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
1481
1486
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1482
|
-
/* @__PURE__ */ t(
|
|
1487
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Control ID" }),
|
|
1483
1488
|
/* @__PURE__ */ t(
|
|
1484
|
-
|
|
1489
|
+
Qt,
|
|
1485
1490
|
{
|
|
1486
1491
|
controlId: e.id,
|
|
1487
1492
|
onCommit: (p) => it(e.id, p)
|
|
@@ -1490,19 +1495,19 @@ function ca({
|
|
|
1490
1495
|
)
|
|
1491
1496
|
] }),
|
|
1492
1497
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
|
|
1493
|
-
/* @__PURE__ */ t(
|
|
1498
|
+
/* @__PURE__ */ t(X, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
|
|
1494
1499
|
/* @__PURE__ */ d(
|
|
1495
|
-
|
|
1500
|
+
ge,
|
|
1496
1501
|
{
|
|
1497
1502
|
value: e.initialValueStrategy,
|
|
1498
|
-
onValueChange: (p) =>
|
|
1499
|
-
...
|
|
1503
|
+
onValueChange: (p) => ee(e.id, (S) => ({
|
|
1504
|
+
...S,
|
|
1500
1505
|
initialValueStrategy: p
|
|
1501
1506
|
})),
|
|
1502
1507
|
children: [
|
|
1503
|
-
/* @__PURE__ */ t(
|
|
1504
|
-
/* @__PURE__ */ t(
|
|
1505
|
-
|
|
1508
|
+
/* @__PURE__ */ t(ye, { size: "xs", children: /* @__PURE__ */ t(xe, {}) }),
|
|
1509
|
+
/* @__PURE__ */ t(ve, { children: Rt.map((p) => /* @__PURE__ */ t(
|
|
1510
|
+
Ce,
|
|
1506
1511
|
{
|
|
1507
1512
|
value: p.value,
|
|
1508
1513
|
children: p.label
|
|
@@ -1515,10 +1520,10 @@ function ca({
|
|
|
1515
1520
|
] })
|
|
1516
1521
|
] }),
|
|
1517
1522
|
/* @__PURE__ */ t(
|
|
1518
|
-
|
|
1523
|
+
jt,
|
|
1519
1524
|
{
|
|
1520
1525
|
control: e,
|
|
1521
|
-
onChange: (p) =>
|
|
1526
|
+
onChange: (p) => ee(e.id, () => p)
|
|
1522
1527
|
}
|
|
1523
1528
|
)
|
|
1524
1529
|
] })
|
|
@@ -1529,66 +1534,66 @@ function ca({
|
|
|
1529
1534
|
] }, e.id);
|
|
1530
1535
|
}),
|
|
1531
1536
|
!a && /* @__PURE__ */ d(
|
|
1532
|
-
|
|
1537
|
+
V,
|
|
1533
1538
|
{
|
|
1534
1539
|
type: "button",
|
|
1535
1540
|
variant: "outline",
|
|
1536
1541
|
size: "xs",
|
|
1537
1542
|
onClick: ct,
|
|
1538
1543
|
children: [
|
|
1539
|
-
/* @__PURE__ */ t(
|
|
1544
|
+
/* @__PURE__ */ t(Ut, { className: "h-3.5 w-3.5" }),
|
|
1540
1545
|
"Add control"
|
|
1541
1546
|
]
|
|
1542
1547
|
}
|
|
1543
1548
|
)
|
|
1544
1549
|
] });
|
|
1545
1550
|
}
|
|
1546
|
-
function
|
|
1551
|
+
function ma(s) {
|
|
1547
1552
|
const {
|
|
1548
1553
|
open: r,
|
|
1549
1554
|
onOpenChange: o,
|
|
1550
1555
|
initialCreateFlowActive: i = !1,
|
|
1551
1556
|
dismissMode: f = "passive"
|
|
1552
|
-
} = s, u = r !== void 0, [b,
|
|
1557
|
+
} = s, u = r !== void 0, [b, x] = M(!1), [h, C] = M(
|
|
1553
1558
|
i
|
|
1554
|
-
),
|
|
1555
|
-
(
|
|
1556
|
-
!
|
|
1559
|
+
), y = u ? r : b, m = z(
|
|
1560
|
+
(k) => {
|
|
1561
|
+
!k && h && f === "passive" || (u || x(k), k || C(!1), o == null || o(k));
|
|
1557
1562
|
},
|
|
1558
1563
|
[u, h, f, o]
|
|
1559
|
-
),
|
|
1560
|
-
u ||
|
|
1564
|
+
), v = z(() => {
|
|
1565
|
+
u || x(!1), C(!1), o == null || o(!1);
|
|
1561
1566
|
}, [u, o]);
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
}, [
|
|
1565
|
-
const
|
|
1566
|
-
(
|
|
1567
|
-
h &&
|
|
1567
|
+
De(() => {
|
|
1568
|
+
y || C(!1);
|
|
1569
|
+
}, [y]);
|
|
1570
|
+
const E = z(
|
|
1571
|
+
(k) => {
|
|
1572
|
+
h && k.preventDefault();
|
|
1568
1573
|
},
|
|
1569
1574
|
[h]
|
|
1570
1575
|
);
|
|
1571
1576
|
return {
|
|
1572
|
-
forceClose:
|
|
1577
|
+
forceClose: v,
|
|
1573
1578
|
handleOpenChange: m,
|
|
1574
1579
|
isCreateFlowActive: h,
|
|
1575
|
-
preventPassiveDismissDuringCreate:
|
|
1576
|
-
resolvedOpen:
|
|
1580
|
+
preventPassiveDismissDuringCreate: E,
|
|
1581
|
+
resolvedOpen: y,
|
|
1577
1582
|
setIsCreateFlowActive: C
|
|
1578
1583
|
};
|
|
1579
1584
|
}
|
|
1580
1585
|
export {
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1586
|
+
la as C,
|
|
1587
|
+
oa as E,
|
|
1588
|
+
Xt as L,
|
|
1584
1589
|
lt as S,
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1590
|
+
na as V,
|
|
1591
|
+
ia as a,
|
|
1592
|
+
da as b,
|
|
1593
|
+
Gt as c,
|
|
1594
|
+
ca as d,
|
|
1595
|
+
pa as e,
|
|
1591
1596
|
nt as f,
|
|
1592
|
-
|
|
1593
|
-
|
|
1597
|
+
ua as g,
|
|
1598
|
+
ma as u
|
|
1594
1599
|
};
|