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