react-semaphor 0.1.368 → 0.1.370

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.
Files changed (65) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/brand-studio/index.cjs +5 -5
  4. package/dist/brand-studio/index.js +24 -23
  5. package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
  6. package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
  9. package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
  10. package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
  13. package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
  14. package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
  15. package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
  16. package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
  17. package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
  18. package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
  19. package/dist/chunks/index-BtqYNH_S.js +1361 -0
  20. package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
  21. package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
  22. package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
  23. package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
  24. package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
  25. package/dist/chunks/save-D3YYinDz.js +6 -0
  26. package/dist/chunks/save-kkBEBeLg.js +21 -0
  27. package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
  28. package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
  29. package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
  30. package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
  31. package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
  32. package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
  33. package/dist/chunks/validation-DYL3ArlL.js +1 -0
  34. package/dist/chunks/validation-PPSpYtVf.js +900 -0
  35. package/dist/chunks/validators-CgxWT8UX.js +1 -0
  36. package/dist/chunks/validators-DBNa-eb1.js +1799 -0
  37. package/dist/dashboard/index.cjs +1 -1
  38. package/dist/dashboard/index.js +1 -1
  39. package/dist/dashboard-authoring/index.cjs +1 -1
  40. package/dist/dashboard-authoring/index.js +1 -1
  41. package/dist/data-app-builder/index.cjs +51 -1
  42. package/dist/data-app-builder/index.js +3666 -2
  43. package/dist/data-app-sdk/index.cjs +1 -1
  44. package/dist/data-app-sdk/index.js +661 -389
  45. package/dist/data-app-sdk-validation/index.cjs +1 -1
  46. package/dist/data-app-sdk-validation/index.js +4 -4
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +14 -14
  49. package/dist/surfboard/index.cjs +1 -1
  50. package/dist/surfboard/index.js +2 -2
  51. package/dist/types/analytics-protocol.d.ts +472 -3
  52. package/dist/types/dashboard-assistant.d.ts +469 -3
  53. package/dist/types/dashboard-authoring.d.ts +170 -2
  54. package/dist/types/data-app-builder.d.ts +167 -2
  55. package/dist/types/data-app-sdk-validation.d.ts +576 -25
  56. package/dist/types/data-app-sdk.d.ts +655 -37
  57. package/dist/types/main.d.ts +167 -2
  58. package/package.json +1 -1
  59. package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
  60. package/dist/chunks/index-HjDeEytV.js +0 -1411
  61. package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
  62. package/dist/chunks/validation-CrUjNWby.js +0 -689
  63. package/dist/chunks/validation-DGl8wnTt.js +0 -1
  64. package/dist/chunks/validators-Dq5X4mp0.js +0 -1
  65. package/dist/chunks/validators-L0xEXtjf.js +0 -965
@@ -1,16 +1,17 @@
1
- import { c as te, G as L, H as ne, u as oe, Z as ft, _ as ht, $ as gt, a as ie, a1 as bt, a9 as yt, B as V, e as xt, X as Ke, E as Pe, f as Ye, S as Ge, aa as vt, ab as Ct, ac as se, ad as Ae, ae as ze, af as be, ag as ye, ah as kt, ai as Me, aj as Nt, ak as St, al as le, am as Dt, an as Oe, g as Be, ao as Xe, ap as Je, aq as Ze, L as P, a2 as We, a3 as xe, a4 as ve, a5 as Ce, a6 as ke, a7 as Ne, ar as et, as as wt, at as It, au as Re, av as Et, aw as Qe, ax as Tt, ay as Se } from "./switch-xcWLtWs0.js";
1
+ import { c as te, G as L, H as ne, u as oe, Y as ft, Z as ht, _ as bt, a as ie, a0 as gt, a8 as yt, B as V, e as xt, X as He, E as Ke, f as Ye, a9 as vt, aa as Ct, ab as se, ac as Ae, ad as ze, ae as ge, af as ye, ag as kt, ah as Me, ai as Nt, aj as St, ak as le, al as Dt, am as Oe, g as Be, an as Xe, ao as Ge, ap as Ze, L as K, a1 as Je, a2 as xe, a3 as ve, a4 as Ce, a5 as ke, a6 as Ne, aq as We, ar as wt, as as It, at as Re, au as Tt, av as Qe, aw as Et, ax as Se } from "./switch-Dkx2qEOr.js";
2
2
  import { useEffect as de, useMemo as z, useState as Q, useRef as De, useCallback as O, Fragment as Vt } from "react";
3
- import { al as _t, am as tt, an as qt, ao as Ft, ap as Lt, aq as At, ar as zt, y as Mt, as as Ot, ae as ue, at, ag as rt, au as st, av as Bt, p as R, aw as Rt, ax as Qt, ay as je, az as jt, aA as Ut, aB as lt, aC as nt, aD as Ht, aE as $t, aF as Kt, aG as Pt, aH as Yt, aI as Gt, aJ as Xt, aK as Jt } from "./index-BVEIk-rB.js";
3
+ import { aK as _t, aL as et, aM as qt, aN as Ft, aO as Lt, aP as At, aQ as zt, x as Mt, aR as Ot, ad as ue, aS as tt, af as at, aT as rt, aU as Bt, o as R, aV as Rt, aW as Qt, aF as je, aX as jt, aY as Ut, aZ as st, a_ as lt, a$ as Pt, b0 as $t, b1 as Ht, b2 as Kt, b3 as Yt, ax as Xt, b4 as Gt, b5 as Zt } from "./index-CPyEi9gS.js";
4
4
  import { jsx as t, jsxs as d, Fragment as $ } from "react/jsx-runtime";
5
5
  import "./index-CuHybtft.js";
6
- import { u as we } from "./use-visual-utils-CszWnFBW.js";
6
+ import { u as we } from "./use-visual-utils-NN0e3fBP.js";
7
+ import { S as nt } from "./save-kkBEBeLg.js";
7
8
  /**
8
9
  * @license lucide-react v0.453.0 - ISC
9
10
  *
10
11
  * This source code is licensed under the ISC license.
11
12
  * See the LICENSE file in the root directory of this source tree.
12
13
  */
13
- const ua = te("CircleX", [
14
+ const pa = te("CircleX", [
14
15
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
16
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
16
17
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -21,7 +22,7 @@ const ua = te("CircleX", [
21
22
  * This source code is licensed under the ISC license.
22
23
  * See the LICENSE file in the root directory of this source tree.
23
24
  */
24
- const Zt = te("Library", [
25
+ const Jt = te("Library", [
25
26
  ["path", { d: "m16 6 4 14", key: "ji33uf" }],
26
27
  ["path", { d: "M12 6v14", key: "1n7gus" }],
27
28
  ["path", { d: "M8 8v12", key: "1gg7y9" }],
@@ -44,7 +45,7 @@ const Wt = te("Link2", [
44
45
  * This source code is licensed under the ISC license.
45
46
  * See the LICENSE file in the root directory of this source tree.
46
47
  */
47
- const pa = te("Rows3", [
48
+ const ma = te("Rows3", [
48
49
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
49
50
  ["path", { d: "M21 9H3", key: "1338ky" }],
50
51
  ["path", { d: "M21 15H3", key: "9uk58r" }]
@@ -55,7 +56,7 @@ const pa = te("Rows3", [
55
56
  * This source code is licensed under the ISC license.
56
57
  * See the LICENSE file in the root directory of this source tree.
57
58
  */
58
- const ma = te("SendHorizontal", [
59
+ const fa = te("SendHorizontal", [
59
60
  [
60
61
  "path",
61
62
  {
@@ -65,7 +66,7 @@ const ma = te("SendHorizontal", [
65
66
  ],
66
67
  ["path", { d: "M6 12h16", key: "s4cdu5" }]
67
68
  ]);
68
- function fa() {
69
+ function ha() {
69
70
  const s = L((h) => h.card.dataSource), {
70
71
  setSelectedConnectionId: r,
71
72
  setSelectedDatabaseName: o,
@@ -76,8 +77,8 @@ function fa() {
76
77
  de(() => {
77
78
  var S;
78
79
  if (!s) return;
79
- const { tableName: h, schemaName: y, databaseName: g, connectionId: v } = _t(s), b = (S = s.selectedEntities) == null ? void 0 : S[0], x = (b == null ? void 0 : b.type) === "model" && "id" in b ? b.id : "";
80
- r(v || ""), o(g || ""), i(y || ""), p(h || ""), u(x);
80
+ const { tableName: h, schemaName: y, databaseName: b, connectionId: v } = _t(s), g = (S = s.selectedEntities) == null ? void 0 : S[0], x = (g == null ? void 0 : g.type) === "model" && "id" in g ? g.id : "";
81
+ r(v || ""), o(b || ""), i(y || ""), p(h || ""), u(x);
81
82
  }, [
82
83
  s,
83
84
  r,
@@ -88,16 +89,16 @@ function fa() {
88
89
  ]);
89
90
  }
90
91
  function ot() {
91
- var g, v;
92
- const s = L((b) => b.card), r = L((b) => b.frame), o = z(
93
- () => tt(r, s),
92
+ var b, v;
93
+ const s = L((g) => g.card), r = L((g) => g.frame), o = z(
94
+ () => et(r, s),
94
95
  [r, s]
95
96
  ), { manifest: i } = qt(
96
- ((g = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : g.url) || ""
97
+ ((b = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : b.url) || ""
97
98
  ), p = z(
98
99
  () => {
99
- var b;
100
- return (b = i == null ? void 0 : i.visuals) == null ? void 0 : b.find(
100
+ var g;
101
+ return (g = i == null ? void 0 : i.visuals) == null ? void 0 : g.find(
101
102
  (m) => {
102
103
  var x;
103
104
  return m.name === ((x = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : x.componentName);
@@ -113,10 +114,10 @@ function ot() {
113
114
  }),
114
115
  [r, o, u]
115
116
  ), y = z(() => {
116
- const b = h.findIndex(
117
+ const g = h.findIndex(
117
118
  (m) => (m == null ? void 0 : m.id) === s.id
118
119
  );
119
- return b < 0 ? -1 : At(s, b);
120
+ return g < 0 ? -1 : At(s, g);
120
121
  }, [h, s]);
121
122
  return z(() => !o || u !== "multiple" || y < 0 ? s.type : zt(
122
123
  s,
@@ -124,7 +125,7 @@ function ot() {
124
125
  p == null ? void 0 : p.slots
125
126
  ) ?? s.type, [o, u, y, s, p == null ? void 0 : p.slots]);
126
127
  }
127
- function ha({
128
+ function ba({
128
129
  type: s,
129
130
  isLinked: r,
130
131
  className: o,
@@ -132,28 +133,28 @@ function ha({
132
133
  showLocal: p = !1
133
134
  }) {
134
135
  const u = oe((D) => D.selectedFrameId), h = Mt((D) => D.selectedVisual), y = L((D) => D.frame);
135
- let g;
136
+ let b;
136
137
  if (s)
137
- g = s;
138
+ b = s;
138
139
  else if (r !== void 0)
139
- g = r ? "linked" : "library";
140
+ b = r ? "linked" : "library";
140
141
  else if (!!!(y != null && y.visualId || h != null && h.id) && u)
141
- g = "local";
142
+ b = "local";
142
143
  else if (h && !u)
143
- g = "library";
144
+ b = "library";
144
145
  else if (y != null && y.visualId && u)
145
- g = "linked";
146
+ b = "linked";
146
147
  else if (h != null && h.id && u)
147
- g = "library";
148
+ b = "library";
148
149
  else
149
150
  return null;
150
- if (g === "local" && !p)
151
+ if (b === "local" && !p)
151
152
  return null;
152
153
  const v = {
153
154
  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",
154
155
  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",
155
156
  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"
156
- }, b = {
157
+ }, g = {
157
158
  local: "Local to this dashboard: Changes made here only affect this dashboard copy.",
158
159
  linked: "Linked to library: Changes made here update the library visual and all linked instances.",
159
160
  library: "Library visual: Share and reuse this visual across multiple dashboards."
@@ -168,36 +169,36 @@ function ha({
168
169
  }, S = {
169
170
  local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
170
171
  linked: /* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" }),
171
- library: /* @__PURE__ */ t(Zt, { className: "h-3.5 w-3.5" })
172
+ library: /* @__PURE__ */ t(Jt, { className: "h-3.5 w-3.5" })
172
173
  }, N = {
173
174
  local: "Local",
174
175
  linked: "Linked",
175
176
  library: "Library"
176
177
  };
177
178
  return /* @__PURE__ */ t(ft, { children: /* @__PURE__ */ d(ht, { delayDuration: 300, children: [
178
- /* @__PURE__ */ t(gt, { asChild: !0, children: /* @__PURE__ */ d(
179
+ /* @__PURE__ */ t(bt, { asChild: !0, children: /* @__PURE__ */ d(
179
180
  Ot,
180
181
  {
181
182
  variant: "outline",
182
183
  className: ie(
183
184
  "cursor-help select-none transition-all",
184
- v[g],
185
+ v[b],
185
186
  o
186
187
  ),
187
188
  children: [
188
- S[g],
189
- i && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children: N[g] })
189
+ S[b],
190
+ i && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children: N[b] })
190
191
  ]
191
192
  }
192
193
  ) }),
193
194
  /* @__PURE__ */ d(
194
- bt,
195
+ gt,
195
196
  {
196
197
  side: "bottom",
197
- className: ie("max-w-xs", m[g]),
198
+ className: ie("max-w-xs", m[b]),
198
199
  children: [
199
- /* @__PURE__ */ t(yt, { className: x[g] }),
200
- /* @__PURE__ */ t("p", { children: b[g] })
200
+ /* @__PURE__ */ t(yt, { className: x[b] }),
201
+ /* @__PURE__ */ t("p", { children: g[b] })
201
202
  ]
202
203
  }
203
204
  )
@@ -246,13 +247,13 @@ function ga({
246
247
  }
247
248
  );
248
249
  }
249
- function ba({
250
+ function ya({
250
251
  className: s,
251
252
  variant: r = "default"
252
253
  }) {
253
254
  const o = ue(), [i, p] = Q(!1), u = oe(
254
255
  (x) => x.actions.setIsDashboardPanelOpen
255
- ), { setIsVisualEditing: h } = Pe(), { getUpdatedFrame: y } = we(), g = rt(), v = L((x) => x.frame), b = st();
256
+ ), { setIsVisualEditing: h } = Ke(), { getUpdatedFrame: y } = we(), b = at(), v = L((x) => x.frame), g = rt();
256
257
  return /* @__PURE__ */ t(
257
258
  V,
258
259
  {
@@ -260,12 +261,12 @@ function ba({
260
261
  const x = y();
261
262
  if (!Ie(x))
262
263
  return;
263
- const S = (v == null ? void 0 : v.visualId) || (g == null ? void 0 : g.id);
264
+ const S = (v == null ? void 0 : v.visualId) || (b == null ? void 0 : b.id);
264
265
  if (!S) {
265
266
  R.error("No visual to save");
266
267
  return;
267
268
  }
268
- p(!0), b.mutate(
269
+ p(!0), g.mutate(
269
270
  {
270
271
  visualId: S,
271
272
  data: {
@@ -292,16 +293,16 @@ function ba({
292
293
  /* @__PURE__ */ t(Ye, { className: "h-3.5 w-3.5 animate-spin" }),
293
294
  "Saving"
294
295
  ] }) : /* @__PURE__ */ d($, { children: [
295
- /* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5" }),
296
+ /* @__PURE__ */ t(nt, { className: "h-3.5 w-3.5" }),
296
297
  "Save to Library"
297
298
  ] })
298
299
  }
299
300
  );
300
301
  }
301
- function ya({
302
+ function xa({
302
303
  className: s
303
304
  }) {
304
- const r = ue(), [o, i] = Q(!1), p = rt(), u = L((N) => N.frame), h = oe((N) => N.selectedSheetId), y = oe((N) => N.dashboard), { updateFrame: g, setIsVisualEditing: v } = Pe(), { getUpdatedFrame: b } = we(), m = st(), x = Bt();
305
+ const r = ue(), [o, i] = Q(!1), p = at(), u = L((N) => N.frame), h = oe((N) => N.selectedSheetId), y = oe((N) => N.dashboard), { updateFrame: b, setIsVisualEditing: v } = Ke(), { getUpdatedFrame: g } = we(), m = rt(), x = Bt();
305
306
  return /* @__PURE__ */ t(
306
307
  V,
307
308
  {
@@ -317,7 +318,7 @@ function ya({
317
318
  }
318
319
  i(!0);
319
320
  try {
320
- const D = b();
321
+ const D = g();
321
322
  if (!Ie(D)) {
322
323
  i(!1);
323
324
  return;
@@ -326,7 +327,7 @@ function ya({
326
327
  ...D,
327
328
  visualId: N
328
329
  // Keep the link to library visual
329
- }, Y = Rt(y, q.id), G = await x(q, {
330
+ }, Y = Rt(y, q.id), X = await x(q, {
330
331
  previousFrame: Y
331
332
  });
332
333
  await m.mutateAsync({
@@ -334,8 +335,8 @@ function ya({
334
335
  data: {
335
336
  frameObject: D
336
337
  }
337
- }), g(h, q, {
338
- semanticExecutionPayload: G
338
+ }), b(h, q, {
339
+ semanticExecutionPayload: X
339
340
  }), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", N] }), R.success("Saved to library and applied locally"), setTimeout(() => {
340
341
  v(!1);
341
342
  }, 300);
@@ -355,15 +356,15 @@ function ya({
355
356
  /* @__PURE__ */ t(Ye, { className: "h-3.5 w-3.5 animate-spin" }),
356
357
  "Saving..."
357
358
  ] }) : /* @__PURE__ */ d($, { children: [
358
- /* @__PURE__ */ t(Ge, { className: "h-3.5 w-3.5" }),
359
+ /* @__PURE__ */ t(nt, { className: "h-3.5 w-3.5" }),
359
360
  "Save & Apply"
360
361
  ] })
361
362
  }
362
363
  );
363
364
  }
364
- function xa({ className: s }) {
365
- const { setTempQueryData: r, setSqlGen: o } = ne(), i = ue(), p = L((m) => m.tempQueryData), u = L((m) => m.onClose), h = L((m) => m.card), y = ot(), g = z(() => y !== h.type ? { ...h, type: y } : h, [h, y]), { queryKey: v } = at(g);
366
- function b() {
365
+ function va({ className: s }) {
366
+ const { setTempQueryData: r, setSqlGen: o } = ne(), i = ue(), p = L((m) => m.tempQueryData), u = L((m) => m.onClose), h = L((m) => m.card), y = ot(), b = z(() => y !== h.type ? { ...h, type: y } : h, [h, y]), { queryKey: v } = tt(b);
367
+ function g() {
367
368
  if (p) {
368
369
  const { queryKey: m, queryData: x } = p;
369
370
  m && x && i.setQueryData(m, x);
@@ -373,24 +374,24 @@ function xa({ className: s }) {
373
374
  return /* @__PURE__ */ d(
374
375
  V,
375
376
  {
376
- onClick: b,
377
+ onClick: g,
377
378
  className: s,
378
379
  size: "xs",
379
380
  variant: "outline",
380
381
  children: [
381
- /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" }),
382
+ /* @__PURE__ */ t(He, { className: "h-3.5 w-3.5" }),
382
383
  "Close"
383
384
  ]
384
385
  }
385
386
  );
386
387
  }
387
- function va({
388
+ function Ca({
388
389
  label: s = "Clear",
389
390
  variant: r = "secondary",
390
391
  className: o
391
392
  } = {}) {
392
- const { setTempQueryData: i } = ne(), p = ue(), u = L((M) => M.tempQueryData), h = L((M) => M.card), y = ot(), g = z(() => y !== h.type ? { ...h, type: y } : h, [h, y]), { queryKey: v } = at(g), {
393
- setCardSql: b,
393
+ const { setTempQueryData: i } = ne(), p = ue(), u = L((M) => M.tempQueryData), h = L((M) => M.card), y = ot(), b = z(() => y !== h.type ? { ...h, type: y } : h, [h, y]), { queryKey: v } = tt(b), {
394
+ setCardSql: g,
394
395
  setSqlGen: m,
395
396
  setCardPython: x,
396
397
  setCardCustomCfg: S,
@@ -398,24 +399,24 @@ function va({
398
399
  clearQueryConfig: D,
399
400
  setCardConfig: q,
400
401
  setCardType: Y,
401
- setFrame: G,
402
+ setFrame: X,
402
403
  setCard: ae,
403
- setActiveTabCardId: X
404
+ setActiveTabCardId: G
404
405
  } = ne();
405
406
  function pe() {
406
- var J, re, _, Z;
407
+ var Z, re, _, J;
407
408
  const M = p.getQueryData(v);
408
409
  u != null && u.queryData || i({
409
410
  queryKey: v,
410
411
  queryData: M
411
- }), p.setQueryData(v, null), p.removeQueries({ queryKey: v, exact: !0 }), b(""), m({}), D(), q(void 0), x(""), S(""), N({});
412
- const a = L.getState().frame, E = L.getState().card, T = tt(a, E), B = ((J = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : J.visualType) === "multiple" || !!((re = T == null ? void 0 : T.customCardPreferences) != null && re.dataInputCardIds) || (((_ = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : _.minInputs) || 0) > 1 || (((Z = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : Z.maxInputs) || 0) > 1, j = ea(E, B);
413
- G({
412
+ }), p.setQueryData(v, null), p.removeQueries({ queryKey: v, exact: !0 }), g(""), m({}), D(), q(void 0), x(""), S(""), N({});
413
+ const a = L.getState().frame, T = L.getState().card, E = et(a, T), B = ((Z = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : Z.visualType) === "multiple" || !!((re = E == null ? void 0 : E.customCardPreferences) != null && re.dataInputCardIds) || (((_ = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : _.minInputs) || 0) > 1 || (((J = E == null ? void 0 : E.customCardPreferences) == null ? void 0 : J.maxInputs) || 0) > 1, j = ea(T, B);
414
+ X({
414
415
  ...a,
415
416
  cards: a.cards.map(
416
417
  (U) => U.id === j.id ? j : U
417
418
  )
418
- }), X(j.id), ae(j), B || Y("bar");
419
+ }), G(j.id), ae(j), B || Y("bar");
419
420
  }
420
421
  return /* @__PURE__ */ d(
421
422
  V,
@@ -425,7 +426,7 @@ function va({
425
426
  size: "xs",
426
427
  variant: r,
427
428
  children: [
428
- /* @__PURE__ */ t(Ke, { className: "h-3.5 w-3.5" }),
429
+ /* @__PURE__ */ t(He, { className: "h-3.5 w-3.5" }),
429
430
  s
430
431
  ]
431
432
  }
@@ -434,9 +435,9 @@ function va({
434
435
  function it(s) {
435
436
  const { control: r, onChange: o } = s;
436
437
  return /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
437
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
438
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
438
439
  /* @__PURE__ */ t(
439
- We,
440
+ Je,
440
441
  {
441
442
  size: "xs",
442
443
  value: r.label,
@@ -494,7 +495,7 @@ function ce(s) {
494
495
  function aa(s) {
495
496
  const { control: r, scope: o, detail: i } = s;
496
497
  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: [
497
- /* @__PURE__ */ t(Jt, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
498
+ /* @__PURE__ */ t(Zt, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
498
499
  /* @__PURE__ */ d("div", { className: "min-w-0 space-y-0.5", children: [
499
500
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: r.label }),
500
501
  /* @__PURE__ */ d("div", { className: "text-[12px] text-muted-foreground", children: [
@@ -504,7 +505,7 @@ function aa(s) {
504
505
  Ze(r),
505
506
  " ·",
506
507
  " ",
507
- Je(o, r.placement)
508
+ Ge(o, r.placement)
508
509
  ] }),
509
510
  i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
510
511
  ] })
@@ -519,16 +520,16 @@ function Ue(s) {
519
520
  previewControlDefinitions: u,
520
521
  previewControlValues: h,
521
522
  onControlChange: y,
522
- onLabelChange: g,
523
+ onLabelChange: b,
523
524
  onDefaultValueChange: v,
524
- onBack: b,
525
+ onBack: g,
525
526
  onNext: m,
526
527
  nextDisabled: x
527
528
  } = s;
528
529
  return /* @__PURE__ */ d("div", { className: "space-y-3", children: [
529
- /* @__PURE__ */ t(it, { control: r, onChange: g }),
530
+ /* @__PURE__ */ t(it, { control: r, onChange: b }),
530
531
  /* @__PURE__ */ t(
531
- lt,
532
+ st,
532
533
  {
533
534
  control: r,
534
535
  availableFieldChoices: i,
@@ -540,7 +541,7 @@ function Ue(s) {
540
541
  }
541
542
  ),
542
543
  /* @__PURE__ */ t(
543
- nt,
544
+ lt,
544
545
  {
545
546
  control: r,
546
547
  value: o,
@@ -555,7 +556,7 @@ function Ue(s) {
555
556
  /* @__PURE__ */ t(
556
557
  ce,
557
558
  {
558
- secondary: /* @__PURE__ */ t(V, { type: "button", variant: "outline", size: "xs", onClick: b, children: "Back" }),
559
+ secondary: /* @__PURE__ */ t(V, { type: "button", variant: "outline", size: "xs", onClick: g, children: "Back" }),
559
560
  primary: /* @__PURE__ */ t(
560
561
  V,
561
562
  {
@@ -576,7 +577,7 @@ const ra = /* @__PURE__ */ new Set([
576
577
  "field_selector",
577
578
  "metric_selector"
578
579
  ]);
579
- function He(s) {
580
+ function Pe(s) {
580
581
  const { text: r, ariaLabel: o } = s, [i, p] = Q(!1);
581
582
  return /* @__PURE__ */ d(
582
583
  "button",
@@ -607,9 +608,9 @@ function $e(s) {
607
608
  sqlDescription: u,
608
609
  summaryDetail: h,
609
610
  onBack: y,
610
- onCancel: g,
611
+ onCancel: b,
611
612
  onDone: v
612
- } = s, b = ra.has(r.type), m = i.match(/\[\[param\.(.+?)\]\]/), x = m ? `{{ param('${m[1]}') }}` : "";
613
+ } = s, g = ra.has(r.type), m = i.match(/\[\[param\.(.+?)\]\]/), x = m ? `{{ param('${m[1]}') }}` : "";
613
614
  return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
614
615
  /* @__PURE__ */ t(
615
616
  aa,
@@ -622,21 +623,21 @@ function $e(s) {
622
623
  /* @__PURE__ */ d("div", { className: "space-y-2", children: [
623
624
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
624
625
  /* @__PURE__ */ d("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
625
- b ? /* @__PURE__ */ d("div", { className: "space-y-1 px-3 py-2.5", children: [
626
+ g ? /* @__PURE__ */ d("div", { className: "space-y-1 px-3 py-2.5", children: [
626
627
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
627
628
  /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: p })
628
629
  ] }) : null,
629
630
  /* @__PURE__ */ d("div", { className: "space-y-1.5 px-3 py-2.5", children: [
630
631
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
631
632
  /* @__PURE__ */ t(
632
- He,
633
+ Pe,
633
634
  {
634
635
  text: i,
635
636
  ariaLabel: "Copy SQL control reference"
636
637
  }
637
638
  ),
638
639
  x ? /* @__PURE__ */ t(
639
- He,
640
+ Pe,
640
641
  {
641
642
  text: x,
642
643
  ariaLabel: "Copy Jinja control reference"
@@ -664,7 +665,7 @@ function $e(s) {
664
665
  ce,
665
666
  {
666
667
  secondary: /* @__PURE__ */ t(V, { type: "button", variant: "outline", size: "xs", onClick: y, children: "Back" }),
667
- tertiary: /* @__PURE__ */ t(V, { type: "button", variant: "outline", size: "xs", onClick: g, children: "Cancel" }),
668
+ tertiary: /* @__PURE__ */ t(V, { type: "button", variant: "outline", size: "xs", onClick: b, children: "Cancel" }),
668
669
  primary: /* @__PURE__ */ t(V, { type: "button", size: "xs", onClick: v, children: "Done" })
669
670
  }
670
671
  )
@@ -679,7 +680,7 @@ function sa(s) {
679
680
  ...r,
680
681
  label: Se[s.type]
681
682
  } : {
682
- ...et({
683
+ ...We({
683
684
  controls: [
684
685
  {
685
686
  ...r,
@@ -697,7 +698,7 @@ function sa(s) {
697
698
  defaultValue: le(o, void 0)
698
699
  };
699
700
  }
700
- function Ca({
701
+ function ka({
701
702
  scope: s,
702
703
  controls: r,
703
704
  reservedControlIds: o,
@@ -706,9 +707,9 @@ function Ca({
706
707
  emptyMessage: u,
707
708
  initialCreateFlow: h = !1,
708
709
  usageByControlId: y,
709
- availableFieldChoices: g,
710
+ availableFieldChoices: b,
710
711
  availableMetricChoices: v,
711
- structuralParticipants: b,
712
+ structuralParticipants: g,
712
713
  structuralParticipantIdsByControlId: m,
713
714
  card: x,
714
715
  allowedControlTypes: S,
@@ -718,16 +719,16 @@ function Ca({
718
719
  const q = z(
719
720
  () => new Set(o || []),
720
721
  [o]
721
- ), Y = wt(s), G = Ct(s), [ae, X] = Q(
722
+ ), Y = wt(s), X = Ct(s), [ae, G] = Q(
722
723
  null
723
724
  ), [pe, M] = Q(
724
725
  null
725
- ), [a, E] = Q(
726
+ ), [a, T] = Q(
726
727
  () => h ? {
727
728
  step: 1,
728
729
  control: se(s, r, Array.from(q))
729
730
  } : null
730
- ), T = De({}), B = De(void 0), j = De(h), J = z(() => {
731
+ ), E = De({}), B = De(void 0), j = De(h), Z = z(() => {
731
732
  const e = Ae({ scope: s, card: x });
732
733
  if (!S)
733
734
  return e;
@@ -749,26 +750,26 @@ function Ca({
749
750
  ), _ = O(
750
751
  (e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
751
752
  [s]
752
- ), Z = z(
753
+ ), J = z(
753
754
  () => a ? ze(
754
- b || [],
755
+ g || [],
755
756
  a.control.type
756
757
  ) : [],
757
- [a, b]
758
+ [a, g]
758
759
  ), U = z(() => {
759
760
  if (!a)
760
761
  return {
761
- fields: g || [],
762
+ fields: b || [],
762
763
  metrics: v || []
763
764
  };
764
765
  if (!_(a.control.type))
765
766
  return {
766
- fields: g || [],
767
+ fields: b || [],
767
768
  metrics: v || []
768
769
  };
769
- const e = a.selectedCardIds || [], n = be({
770
+ const e = a.selectedCardIds || [], n = ge({
770
771
  controlType: a.control.type,
771
- participants: b || [],
772
+ participants: g || [],
772
773
  selectedCardIds: e
773
774
  });
774
775
  return {
@@ -782,36 +783,36 @@ function Ca({
782
783
  })) : []
783
784
  };
784
785
  }, [
785
- g,
786
+ b,
786
787
  v,
787
788
  a,
788
789
  _,
789
- b
790
+ g
790
791
  ]);
791
792
  de(() => {
792
793
  N == null || N(!!a);
793
794
  }, [a, N]), de(() => {
794
795
  const e = h && !j.current;
795
- j.current = h, e && (E({
796
+ j.current = h, e && (T({
796
797
  step: 1,
797
798
  control: se(s, r, Array.from(q))
798
- }), M(null), X(null));
799
+ }), M(null), G(null));
799
800
  }, [r, h, q, s]);
800
801
  const dt = (e) => {
801
802
  if (!_(e.type))
802
803
  return {
803
- fields: g || [],
804
+ fields: b || [],
804
805
  metrics: v || []
805
806
  };
806
807
  const n = (m == null ? void 0 : m[e.id]) || [];
807
808
  if (n.length === 0)
808
809
  return {
809
- fields: g || [],
810
+ fields: b || [],
810
811
  metrics: v || []
811
812
  };
812
- const l = be({
813
+ const l = ge({
813
814
  controlType: e.type,
814
- participants: b || [],
815
+ participants: g || [],
815
816
  selectedCardIds: n
816
817
  });
817
818
  return {
@@ -824,17 +825,17 @@ function Ca({
824
825
  target: l.metricTargetMap[c.value]
825
826
  })) : []
826
827
  };
827
- }, Ee = (e) => {
828
+ }, Te = (e) => {
828
829
  if (!_(e.control.type))
829
830
  return {
830
831
  nextControl: e.control,
831
832
  cardBindingsById: void 0
832
833
  };
833
- const n = (m == null ? void 0 : m[e.control.id]) || [], l = be({
834
+ const n = (m == null ? void 0 : m[e.control.id]) || [], l = ge({
834
835
  controlType: e.control.type,
835
- participants: b || [],
836
+ participants: g || [],
836
837
  selectedCardIds: e.nextSelectedCardIds
837
- }), c = Tt({
838
+ }), c = Et({
838
839
  control: e.control,
839
840
  choices: l.choices
840
841
  }), C = Object.fromEntries(
@@ -844,7 +845,7 @@ function Ca({
844
845
  C,
845
846
  Qe({
846
847
  control: c,
847
- participants: b || [],
848
+ participants: g || [],
848
849
  selectedCardIds: e.nextSelectedCardIds
849
850
  })
850
851
  ), {
@@ -872,17 +873,17 @@ function Ca({
872
873
  );
873
874
  let k, f;
874
875
  if (C && s === "dashboard" && (C.type === "field_selector" || C.type === "metric_selector")) {
875
- const I = (m == null ? void 0 : m[C.id]) || [], K = Ee({
876
+ const I = (m == null ? void 0 : m[C.id]) || [], H = Te({
876
877
  control: C,
877
878
  nextSelectedCardIds: I
878
879
  });
879
880
  c = c.map(
880
- (H) => H.id === e ? K.nextControl : H
881
- ), k = K.cardBindingsById, f = [C.id];
881
+ (P) => P.id === e ? H.nextControl : P
882
+ ), k = H.cardBindingsById, f = [C.id];
882
883
  } else if (l && s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector")) {
883
884
  const I = (m == null ? void 0 : m[l.id]) || [];
884
885
  k = Object.fromEntries(
885
- I.map((K) => [K, void 0])
886
+ I.map((H) => [H, void 0])
886
887
  ), f = [l.id];
887
888
  }
888
889
  const w = c.find(
@@ -894,14 +895,14 @@ function Ca({
894
895
  control: l,
895
896
  defaultValues: i
896
897
  });
897
- l.source.kind === "manual" && w.source.kind === "sql_query" && (T.current[e] = I);
898
- const K = I === void 0 && l.source.kind === "sql_query" && w.source.kind === "manual" ? T.current[e] : I, H = Re({
898
+ l.source.kind === "manual" && w.source.kind === "sql_query" && (E.current[e] = I);
899
+ const H = I === void 0 && l.source.kind === "sql_query" && w.source.kind === "manual" ? E.current[e] : I, P = Re({
899
900
  previousControl: l,
900
901
  nextControl: w,
901
- currentDefaultValue: K
902
+ currentDefaultValue: H
902
903
  });
903
- w.source.kind === "manual" && (T.current[e] = H), i && (F = { ...i }, H === void 0 ? delete F[e] : F[e] = H), c = c.map(
904
- (Le) => Le.id === e ? { ...w, defaultValue: H } : Le
904
+ w.source.kind === "manual" && (E.current[e] = P), i && (F = { ...i }, P === void 0 ? delete F[e] : F[e] = P), c = c.map(
905
+ (Le) => Le.id === e ? { ...w, defaultValue: P } : Le
905
906
  );
906
907
  }
907
908
  A(c, F, {
@@ -912,7 +913,7 @@ function Ca({
912
913
  }, ct = (e, n) => {
913
914
  if (!n.trim())
914
915
  return;
915
- const l = Xt(n);
916
+ const l = Gt(n);
916
917
  if (l === e || q.has(l) || r.some(
917
918
  (k) => k.id === l && k.id !== e
918
919
  ))
@@ -943,12 +944,12 @@ function Ca({
943
944
  const l = { ...i };
944
945
  delete l[e], A(n, l, { type: "remove", controlId: e });
945
946
  }, pt = O(() => {
946
- B.current = void 0, E({
947
+ B.current = void 0, T({
947
948
  step: 1,
948
949
  control: se(s, r, Array.from(q))
949
- }), M(null), X(null);
950
+ }), M(null), G(null);
950
951
  }, [r, q, s]), ee = (e) => {
951
- E(
952
+ T(
952
953
  (n) => n && (() => {
953
954
  const l = e(n.control);
954
955
  n.control.source.kind === "manual" && l.source.kind === "sql_query" && (B.current = n.defaultValue);
@@ -964,8 +965,8 @@ function Ca({
964
965
  };
965
966
  })()
966
967
  );
967
- }, Te = (e) => {
968
- E(
968
+ }, Ee = (e) => {
969
+ T(
969
970
  (n) => n && (n.control.source.kind === "manual" && (B.current = e), {
970
971
  ...n,
971
972
  defaultValue: e
@@ -994,7 +995,7 @@ function Ca({
994
995
  var k;
995
996
  if (!a)
996
997
  return;
997
- const e = Me(a.control), n = Et({
998
+ const e = Me(a.control), n = Tt({
998
999
  label: e.label,
999
1000
  fallbackId: e.id,
1000
1001
  existingControls: r,
@@ -1004,13 +1005,13 @@ function Ca({
1004
1005
  id: n
1005
1006
  }, c = s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") && ((k = a.selectedCardIds) != null && k.length) ? Qe({
1006
1007
  control: l,
1007
- participants: b || [],
1008
+ participants: g || [],
1008
1009
  selectedCardIds: a.selectedCardIds
1009
1010
  }) : void 0, C = le(
1010
1011
  l,
1011
1012
  a.defaultValue
1012
1013
  );
1013
- E({
1014
+ T({
1014
1015
  step: s === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") ? 4 : 3,
1015
1016
  control: l,
1016
1017
  defaultValue: C,
@@ -1019,10 +1020,10 @@ function Ca({
1019
1020
  cardBindingsById: c
1020
1021
  });
1021
1022
  }, fe = O(() => {
1022
- E(null);
1023
+ T(null);
1023
1024
  }, []), _e = O(() => {
1024
1025
  if (!(a != null && a.createdControlId)) {
1025
- E(null);
1026
+ T(null);
1026
1027
  return;
1027
1028
  }
1028
1029
  const e = a.control, n = a.createdControlId, l = le(
@@ -1060,12 +1061,12 @@ function Ca({
1060
1061
  cardBindingsById: a.cardBindingsById
1061
1062
  }
1062
1063
  );
1063
- M(n), E(null), D == null || D();
1064
+ M(n), T(null), D == null || D();
1064
1065
  }, [r, a, i, A, D]), mt = a ? _(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], qe = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${Dt(a.control.label) || a.control.id}]]` : "", he = Oe({
1065
1066
  controls: r,
1066
1067
  defaultValues: i
1067
- }), ge = a ? [...r, a.control] : r, Fe = a ? Oe({
1068
- controls: ge,
1068
+ }), be = a ? [...r, a.control] : r, Fe = a ? Oe({
1069
+ controls: be,
1069
1070
  defaultValues: i,
1070
1071
  overrides: [
1071
1072
  {
@@ -1094,16 +1095,16 @@ function Ca({
1094
1095
  // keeping the shared definitions for existing controls.
1095
1096
  "date",
1096
1097
  "text"
1097
- ]), l = J.filter(
1098
+ ]), l = Z.filter(
1098
1099
  (k) => !e.has(k.value) && !n.has(k.value)
1099
- ), c = J.filter(
1100
+ ), c = Z.filter(
1100
1101
  (k) => e.has(k.value)
1101
1102
  ), C = (k) => /* @__PURE__ */ d(
1102
1103
  "button",
1103
1104
  {
1104
1105
  type: "button",
1105
1106
  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",
1106
- onClick: () => E(
1107
+ onClick: () => T(
1107
1108
  sa({
1108
1109
  scope: s,
1109
1110
  existingControls: r,
@@ -1159,7 +1160,7 @@ function Ca({
1159
1160
  ),
1160
1161
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
1161
1162
  ] }),
1162
- Z.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: Z.map((e) => {
1163
+ J.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: J.map((e) => {
1163
1164
  const n = (a.selectedCardIds || []).includes(e.cardId);
1164
1165
  return /* @__PURE__ */ d(
1165
1166
  "label",
@@ -1170,7 +1171,7 @@ function Ca({
1170
1171
  Qt,
1171
1172
  {
1172
1173
  checked: n,
1173
- onCheckedChange: (l) => E(
1174
+ onCheckedChange: (l) => T(
1174
1175
  (c) => c && {
1175
1176
  ...c,
1176
1177
  selectedCardIds: l === !0 ? [
@@ -1201,7 +1202,7 @@ function Ca({
1201
1202
  type: "button",
1202
1203
  variant: "outline",
1203
1204
  size: "xs",
1204
- onClick: () => E(
1205
+ onClick: () => T(
1205
1206
  (e) => e && {
1206
1207
  ...e,
1207
1208
  step: 1,
@@ -1216,7 +1217,7 @@ function Ca({
1216
1217
  {
1217
1218
  type: "button",
1218
1219
  size: "xs",
1219
- onClick: () => E(
1220
+ onClick: () => T(
1220
1221
  (e) => e && {
1221
1222
  ...e,
1222
1223
  step: 3
@@ -1236,15 +1237,15 @@ function Ca({
1236
1237
  defaultValue: a.defaultValue,
1237
1238
  availableFieldChoices: U.fields,
1238
1239
  availableMetricChoices: U.metrics,
1239
- previewControlDefinitions: ge,
1240
+ previewControlDefinitions: be,
1240
1241
  previewControlValues: Fe,
1241
1242
  onControlChange: (e) => ee(() => e),
1242
1243
  onLabelChange: (e) => ee((n) => ({
1243
1244
  ...n,
1244
1245
  label: e
1245
1246
  })),
1246
- onDefaultValueChange: Te,
1247
- onBack: () => E(
1247
+ onDefaultValueChange: Ee,
1248
+ onBack: () => T(
1248
1249
  (e) => e && {
1249
1250
  ...e,
1250
1251
  step: 1
@@ -1261,15 +1262,15 @@ function Ca({
1261
1262
  defaultValue: a.defaultValue,
1262
1263
  availableFieldChoices: U.fields,
1263
1264
  availableMetricChoices: U.metrics,
1264
- previewControlDefinitions: ge,
1265
+ previewControlDefinitions: be,
1265
1266
  previewControlValues: Fe,
1266
1267
  onControlChange: (e) => ee(() => e),
1267
1268
  onLabelChange: (e) => ee((n) => ({
1268
1269
  ...n,
1269
1270
  label: e
1270
1271
  })),
1271
- onDefaultValueChange: Te,
1272
- onBack: () => E(
1272
+ onDefaultValueChange: Ee,
1273
+ onBack: () => T(
1273
1274
  (e) => e && {
1274
1275
  ...e,
1275
1276
  step: 2
@@ -1293,7 +1294,7 @@ function Ca({
1293
1294
  "to choose what this control changes."
1294
1295
  ] }),
1295
1296
  sqlDescription: "Reference this control directly in the SQL editor.",
1296
- onBack: () => E(
1297
+ onBack: () => T(
1297
1298
  (e) => e && {
1298
1299
  ...e,
1299
1300
  step: 2
@@ -1317,7 +1318,7 @@ function Ca({
1317
1318
  ] }),
1318
1319
  explorerContent: /* @__PURE__ */ t($, { children: "Selected cards have been set up to respond to this control automatically." }),
1319
1320
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
1320
- onBack: () => E(
1321
+ onBack: () => T(
1321
1322
  (e) => e && {
1322
1323
  ...e,
1323
1324
  step: 3
@@ -1354,7 +1355,7 @@ function Ca({
1354
1355
  /* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1355
1356
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1356
1357
  /* @__PURE__ */ t("span", { className: k, children: Xe(e.type).label }),
1357
- /* @__PURE__ */ t("span", { className: k, children: Je(s, e.placement) })
1358
+ /* @__PURE__ */ t("span", { className: k, children: Ge(s, e.placement) })
1358
1359
  ] }),
1359
1360
  /* @__PURE__ */ d("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1360
1361
  Ze(e),
@@ -1380,9 +1381,9 @@ function Ca({
1380
1381
  C && /* @__PURE__ */ d("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
1381
1382
  /* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-3", children: [
1382
1383
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
1383
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1384
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1384
1385
  /* @__PURE__ */ t(
1385
- We,
1386
+ Je,
1386
1387
  {
1387
1388
  size: "xs",
1388
1389
  value: e.label,
@@ -1395,13 +1396,13 @@ function Ca({
1395
1396
  )
1396
1397
  ] }),
1397
1398
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
1398
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1399
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1399
1400
  /* @__PURE__ */ d(
1400
1401
  xe,
1401
1402
  {
1402
1403
  value: e.type,
1403
1404
  onValueChange: (f) => {
1404
- const w = et({
1405
+ const w = We({
1405
1406
  controls: r,
1406
1407
  controlId: e.id,
1407
1408
  nextType: f,
@@ -1426,11 +1427,11 @@ function Ca({
1426
1427
  )
1427
1428
  ] }),
1428
1429
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
1429
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1430
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1430
1431
  /* @__PURE__ */ d(
1431
1432
  xe,
1432
1433
  {
1433
- value: e.placement || G,
1434
+ value: e.placement || X,
1434
1435
  onValueChange: (f) => W(e.id, (w) => ({
1435
1436
  ...w,
1436
1437
  placement: f
@@ -1448,7 +1449,7 @@ function Ca({
1448
1449
  {
1449
1450
  type: e.type,
1450
1451
  participants: ze(
1451
- b || [],
1452
+ g || [],
1452
1453
  e.type
1453
1454
  ).map((f) => ({
1454
1455
  cardId: f.cardId,
@@ -1457,7 +1458,7 @@ function Ca({
1457
1458
  })),
1458
1459
  selectedCardIds: (m == null ? void 0 : m[e.id]) || [],
1459
1460
  onChange: (f) => {
1460
- const w = Ee({
1461
+ const w = Te({
1461
1462
  control: e,
1462
1463
  nextSelectedCardIds: f
1463
1464
  }), F = r.map(
@@ -1471,7 +1472,7 @@ function Ca({
1471
1472
  }
1472
1473
  ) : null,
1473
1474
  /* @__PURE__ */ t(
1474
- lt,
1475
+ st,
1475
1476
  {
1476
1477
  control: e,
1477
1478
  availableFieldChoices: n.fields,
@@ -1483,7 +1484,7 @@ function Ca({
1483
1484
  }
1484
1485
  ),
1485
1486
  e.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
1486
- nt,
1487
+ lt,
1487
1488
  {
1488
1489
  control: e,
1489
1490
  value: c,
@@ -1495,7 +1496,7 @@ function Ca({
1495
1496
  const w = r.map(
1496
1497
  (F) => F.id === e.id ? { ...F, defaultValue: f } : F
1497
1498
  );
1498
- if (e.source.kind === "manual" && (T.current[e.id] = f), i) {
1499
+ if (e.source.kind === "manual" && (E.current[e.id] = f), i) {
1499
1500
  const F = { ...i };
1500
1501
  f === void 0 ? delete F[e.id] : F[e.id] = f, A(w, F);
1501
1502
  return;
@@ -1505,10 +1506,10 @@ function Ca({
1505
1506
  }
1506
1507
  ),
1507
1508
  /* @__PURE__ */ d(
1508
- Ht,
1509
+ Pt,
1509
1510
  {
1510
1511
  open: ae === e.id,
1511
- onOpenChange: (f) => X(f ? e.id : null),
1512
+ onOpenChange: (f) => G(f ? e.id : null),
1512
1513
  children: [
1513
1514
  /* @__PURE__ */ t($t, { asChild: !0, children: /* @__PURE__ */ d(
1514
1515
  V,
@@ -1523,12 +1524,12 @@ function Ca({
1523
1524
  ]
1524
1525
  }
1525
1526
  ) }),
1526
- /* @__PURE__ */ d(Kt, { className: "space-y-3 pt-2", children: [
1527
+ /* @__PURE__ */ d(Ht, { className: "space-y-3 pt-2", children: [
1527
1528
  /* @__PURE__ */ d("div", { className: "grid gap-3 md:grid-cols-2", children: [
1528
1529
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
1529
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1530
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1530
1531
  /* @__PURE__ */ t(
1531
- Pt,
1532
+ Kt,
1532
1533
  {
1533
1534
  controlId: e.id,
1534
1535
  onCommit: (f) => ct(e.id, f)
@@ -1537,7 +1538,7 @@ function Ca({
1537
1538
  )
1538
1539
  ] }),
1539
1540
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5", children: [
1540
- /* @__PURE__ */ t(P, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1541
+ /* @__PURE__ */ t(K, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1541
1542
  /* @__PURE__ */ d(
1542
1543
  xe,
1543
1544
  {
@@ -1586,61 +1587,61 @@ function Ca({
1586
1587
  size: "xs",
1587
1588
  onClick: pt,
1588
1589
  children: [
1589
- /* @__PURE__ */ t(Gt, { className: "h-3.5 w-3.5" }),
1590
+ /* @__PURE__ */ t(Xt, { className: "h-3.5 w-3.5" }),
1590
1591
  "Add control"
1591
1592
  ]
1592
1593
  }
1593
1594
  )
1594
1595
  ] });
1595
1596
  }
1596
- function ka(s) {
1597
+ function Na(s) {
1597
1598
  const {
1598
1599
  open: r,
1599
1600
  onOpenChange: o,
1600
1601
  initialCreateFlowActive: i = !1,
1601
1602
  dismissMode: p = "passive"
1602
- } = s, u = r !== void 0, [h, y] = Q(!1), [g, v] = Q(
1603
+ } = s, u = r !== void 0, [h, y] = Q(!1), [b, v] = Q(
1603
1604
  i
1604
- ), b = u ? r : h, m = O(
1605
+ ), g = u ? r : h, m = O(
1605
1606
  (N) => {
1606
- !N && g && p === "passive" || (u || y(N), N || v(!1), o == null || o(N));
1607
+ !N && b && p === "passive" || (u || y(N), N || v(!1), o == null || o(N));
1607
1608
  },
1608
- [u, g, p, o]
1609
+ [u, b, p, o]
1609
1610
  ), x = O(() => {
1610
1611
  u || y(!1), v(!1), o == null || o(!1);
1611
1612
  }, [u, o]);
1612
1613
  de(() => {
1613
- b || v(!1);
1614
- }, [b]);
1614
+ g || v(!1);
1615
+ }, [g]);
1615
1616
  const S = O(
1616
1617
  (N) => {
1617
- g && N.preventDefault();
1618
+ b && N.preventDefault();
1618
1619
  },
1619
- [g]
1620
+ [b]
1620
1621
  );
1621
1622
  return {
1622
1623
  forceClose: x,
1623
1624
  handleOpenChange: m,
1624
- isCreateFlowActive: g,
1625
+ isCreateFlowActive: b,
1625
1626
  preventPassiveDismissDuringCreate: S,
1626
- resolvedOpen: b,
1627
+ resolvedOpen: g,
1627
1628
  setIsCreateFlowActive: v
1628
1629
  };
1629
1630
  }
1630
1631
  export {
1631
- ua as C,
1632
+ pa as C,
1632
1633
  ga as E,
1633
- Zt as L,
1634
- pa as R,
1635
- ma as S,
1636
- ha as V,
1637
- xa as a,
1638
- ba as b,
1639
- ya as c,
1634
+ Jt as L,
1635
+ ma as R,
1636
+ fa as S,
1637
+ ba as V,
1638
+ va as a,
1639
+ ya as b,
1640
+ xa as c,
1640
1641
  Wt as d,
1641
- Ca as e,
1642
- fa as f,
1642
+ ka as e,
1643
+ ha as f,
1643
1644
  ot as g,
1644
- va as h,
1645
- ka as u
1645
+ Ca as h,
1646
+ Na as u
1646
1647
  };