react-semaphor 0.1.427 → 0.1.429

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 (96) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +72 -71
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +5 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +1031 -622
  7. package/dist/chunks/analyze-result-contract-BswhsmWT.js +1 -0
  8. package/dist/chunks/{analyze-result-contract-DnfF8kBb.js → analyze-result-contract-CfOBEwaC.js} +681 -759
  9. package/dist/chunks/{code-editor-CojfM3qp.js → code-editor-C65eEYyU.js} +2980 -2960
  10. package/dist/chunks/code-editor-DOh3aYEh.js +138 -0
  11. package/dist/chunks/{comparison-document-migration-b6c3xiWh.js → comparison-document-migration-DbU_BTxR.js} +1 -1
  12. package/dist/chunks/{comparison-document-migration-BJH1idOd.js → comparison-document-migration-Dj6xZMCb.js} +2 -2
  13. package/dist/chunks/csv-utils-Co0WxHke.js +4 -0
  14. package/dist/chunks/csv-utils-suxSkJGj.js +376 -0
  15. package/dist/chunks/dashboard-CQfAvRYI.js +1401 -0
  16. package/dist/chunks/{dashboard-DSxho2LN.js → dashboard-agBXhvKo.js} +45651 -42951
  17. package/dist/chunks/{dashboard-briefing-launcher-CguxcHIl.js → dashboard-briefing-launcher-CkH_pthg.js} +1 -1
  18. package/dist/chunks/{dashboard-briefing-launcher-BFIw5BOf.js → dashboard-briefing-launcher-gBNNKqoH.js} +100 -99
  19. package/dist/chunks/{dashboard-controls-Cl0LagTr.js → dashboard-controls-CAZnIGfT.js} +2 -2
  20. package/dist/chunks/{dashboard-controls-jD-HpCNK.js → dashboard-controls-CoIxUTvH.js} +207 -202
  21. package/dist/chunks/{dashboard-json-BovTt0uu.js → dashboard-json-BMcPjL8-.js} +18 -17
  22. package/dist/chunks/dashboard-json-D4hFrMkX.js +1 -0
  23. package/dist/chunks/{edit-dashboard-visual-dlm8F_Qu.js → edit-dashboard-visual-Bc8qNfSr.js} +8721 -8481
  24. package/dist/chunks/edit-dashboard-visual-onhUUXlw.js +182 -0
  25. package/dist/chunks/{metric-comparison-CWweq9RG.js → metric-comparison-CPoDx56y.js} +1 -1
  26. package/dist/chunks/{metric-comparison-BKgkMy9r.js → metric-comparison-DVy3fll_.js} +1 -1
  27. package/dist/chunks/numeric-presentation-CGTcqocU.js +517 -0
  28. package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +1 -0
  29. package/dist/chunks/report-preferences-dialog-CPptr_V9.js +690 -0
  30. package/dist/chunks/report-preferences-dialog-DV_5aHrS.js +1 -0
  31. package/dist/chunks/source-identity-5OPV4gvg.js +92 -0
  32. package/dist/chunks/source-identity-Cbo2LOHQ.js +1 -0
  33. package/dist/chunks/{update-policy-CY2k-pJP.js → update-policy-De2NswtM.js} +1 -1
  34. package/dist/chunks/{update-policy-BgONreNd.js → update-policy-DnF_74zC.js} +1 -1
  35. package/dist/chunks/{use-create-flow-overlay-state-kbl6avDY.js → use-create-flow-overlay-state-Bs6gqgjo.js} +1 -1
  36. package/dist/chunks/{use-create-flow-overlay-state-BU0ROMSm.js → use-create-flow-overlay-state-CgQbCrni.js} +97 -96
  37. package/dist/chunks/validators-B2vUAqTf.js +1 -0
  38. package/dist/chunks/{validators-Cz-XuORM.js → validators-Bce_J7Vd.js} +19 -13
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/dashboard-authoring/index.cjs +3 -3
  42. package/dist/dashboard-authoring/index.js +20 -19
  43. package/dist/data-app-builder/index.cjs +1 -1
  44. package/dist/data-app-builder/index.js +50 -50
  45. package/dist/data-app-codegen/index.cjs +1 -1
  46. package/dist/data-app-codegen/index.js +2 -2
  47. package/dist/data-app-codegen-node/index.cjs +1 -1
  48. package/dist/data-app-codegen-node/index.js +3 -3
  49. package/dist/data-app-sdk/index.cjs +2 -2
  50. package/dist/data-app-sdk/index.js +27 -26
  51. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  52. package/dist/data-app-sdk-adapters/index.js +25 -24
  53. package/dist/data-app-sdk-validation/index.cjs +1 -1
  54. package/dist/data-app-sdk-validation/index.js +57 -55
  55. package/dist/format-utils/index.cjs +2 -5
  56. package/dist/format-utils/index.js +136 -161
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.js +158 -155
  59. package/dist/report-runtime-context/index.cjs +1 -0
  60. package/dist/report-runtime-context/index.js +394 -0
  61. package/dist/style.css +1 -1
  62. package/dist/surfboard/index.cjs +1 -1
  63. package/dist/surfboard/index.js +7 -6
  64. package/dist/types/analytics-protocol.d.ts +0 -4
  65. package/dist/types/briefings.d.ts +216 -19
  66. package/dist/types/dashboard-assistant.d.ts +0 -2
  67. package/dist/types/dashboard-authoring.d.ts +34 -9
  68. package/dist/types/dashboard.d.ts +93 -9
  69. package/dist/types/data-app-builder.d.ts +0 -1
  70. package/dist/types/data-app-codegen-node.d.ts +6 -28
  71. package/dist/types/data-app-codegen.d.ts +6 -28
  72. package/dist/types/data-app-sdk-adapters.d.ts +6 -28
  73. package/dist/types/data-app-sdk-validation.d.ts +6 -29
  74. package/dist/types/data-app-sdk.d.ts +6 -31
  75. package/dist/types/format-utils.d.ts +128 -4
  76. package/dist/types/index.cjs +1 -1
  77. package/dist/types/index.js +10 -13
  78. package/dist/types/main.d.ts +249 -89
  79. package/dist/types/report-runtime-context.d.ts +99 -0
  80. package/dist/types/shared.d.ts +34 -9
  81. package/dist/types/surfboard.d.ts +119 -16
  82. package/dist/types/types.d.ts +156 -73
  83. package/dist/types/value-format-preferences.d.ts +126 -0
  84. package/dist/value-format-preferences/index.cjs +1 -0
  85. package/dist/value-format-preferences/index.js +635 -0
  86. package/package.json +11 -1
  87. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +0 -1
  88. package/dist/chunks/calendar-preferences-dialog-DE4tk3t3.js +0 -457
  89. package/dist/chunks/calendar-preferences-dialog-DuGX1NPV.js +0 -1
  90. package/dist/chunks/code-editor-BoowcKU0.js +0 -138
  91. package/dist/chunks/dashboard-json-7mpQsizF.js +0 -1
  92. package/dist/chunks/dashboard-ogxedhSY.js +0 -1402
  93. package/dist/chunks/date-formatter-BTTYdAik.js +0 -1
  94. package/dist/chunks/date-formatter-D-89jTjG.js +0 -514
  95. package/dist/chunks/edit-dashboard-visual-B7wLrHeF.js +0 -182
  96. package/dist/chunks/validators-B4VMLX3_.js +0 -1
@@ -1,9 +1,10 @@
1
1
  import { useState as H, useEffect as ie, useCallback as B, useMemo as P, useRef as Se, Fragment as gt } from "react";
2
- import { E as de, D as _e, u as Z, F as M, a4 as yt, Q as vt, V as xt, W as Ct, c as fe, Y as St, a5 as kt, B as q, d as Nt, e as Ze, a6 as wt, a7 as Dt, a8 as Et, a9 as pe, aa as je, ab as Re, ac as ke, ad as Ne, ae as It, af as Qe, ag as Ft, ah as Vt, ai as me, aj as Tt, ak as $e, al as et, am as tt, an as rt, L as oe, Z as at, _ as we, $ as De, a0 as Ee, a1 as Ie, a2 as Fe, ao as st, ap as _t, aq as Pe, ar as Lt, as as We, at as At, au as qt, av as Ve } from "./code-editor-CojfM3qp.js";
3
- import { b5 as Mt, u as Ot, b6 as ce, b7 as Ut, b8 as Le, b9 as zt, ba as Bt, bb as jt, p as j, bc as Rt, bd as Qt, be as nt, bf as $t, bg as Pt, bh as Wt, bi as Kt, bj as Ht, aG as Yt, bk as Gt, bl as ot, bm as lt, bn as Xt, bo as Jt, bp as Zt, bq as er, br as it, bs as dt, bt as tr, bu as rr, bv as ar, bw as sr, bx as nr, aX as or, by as lr, bz as ir } from "./dashboard-DSxho2LN.js";
2
+ import { D as de, A as _e, u as Z, E as M, a4 as yt, Q as vt, V as xt, W as Ct, c as fe, Y as St, a5 as kt, B as q, d as Nt, L as Ze, a6 as wt, a7 as Dt, a8 as Et, a9 as pe, aa as je, ab as Re, ac as ke, ad as Ne, ae as It, af as Qe, ag as Ft, ah as Vt, ai as me, aj as Tt, ak as $e, al as et, am as tt, an as rt, O as oe, Z as at, _ as we, $ as De, a0 as Ee, a1 as Ie, a2 as Fe, ao as st, ap as _t, aq as Pe, ar as At, as as We, at as Lt, au as qt, av as Ve } from "./code-editor-C65eEYyU.js";
3
+ import { b7 as Mt, az as Ot, b8 as ce, b9 as zt, ba as Ae, bb as Ut, bc as Bt, bd as jt, aG as j, be as Rt, bf as Qt, bg as nt, bh as $t, bi as Pt, bj as Wt, bk as Kt, bl as Ht, av as Yt, bm as Gt, bn as ot, bo as lt, bp as Jt, bq as Xt, br as Zt, bs as er, bt as it, bu as dt, bv as tr, bw as rr, bx as ar, by as sr, bz as nr, aZ as or, bA as lr, bB as ir } from "./dashboard-agBXhvKo.js";
4
4
  import { jsx as r, jsxs as m, Fragment as ae } from "react/jsx-runtime";
5
5
  import { c as ct, X as ut, C as Ke } from "./index-xHCrHprY.js";
6
- import "./analyze-result-contract-DnfF8kBb.js";
6
+ import "./analyze-result-contract-CfOBEwaC.js";
7
+ import "../value-format-preferences/index.js";
7
8
  import { S as pt } from "./save-HCJjjzdX.js";
8
9
  import { C as He } from "./search-DHZCro8B.js";
9
10
  /**
@@ -97,7 +98,7 @@ function pr(t, a) {
97
98
  return t[0].id;
98
99
  }
99
100
  const Te = /* @__PURE__ */ new Set();
100
- function Vr(t) {
101
+ function Tr(t) {
101
102
  return Te.add(t), () => {
102
103
  Te.delete(t);
103
104
  };
@@ -206,8 +207,8 @@ function br() {
206
207
  };
207
208
  }, [a]) };
208
209
  }
209
- function Ae() {
210
- const { authToken: t, tokenProps: a } = Ot(), n = ce(), s = Ut(), l = Le(), { selectVisual: d } = zt(), {
210
+ function Le() {
211
+ const { authToken: t, tokenProps: a } = Ot(), n = ce(), s = zt(), l = Ae(), { selectVisual: d } = Ut(), {
211
212
  setFrame: p,
212
213
  setCard: f,
213
214
  setIsDevMode: u,
@@ -222,14 +223,14 @@ function Ae() {
222
223
  setSelectedDatamodelId: R,
223
224
  setFilterValues: G,
224
225
  setInlineFilterValuesMap: ee,
225
- setApplyFilters: X,
226
+ setApplyFilters: J,
226
227
  clearEditorContext: se
227
228
  } = de(), {
228
229
  setIsDashboardEditing: O,
229
230
  setIsVisualEditing: o,
230
231
  setSelectedFrameId: D,
231
232
  clearSelectedFrameId: V
232
- } = _e(), U = Z((_) => _.selectedSheetId), W = Z((_) => _.selectedFrameId), J = Z((_) => _.dashboard), te = Z((_) => _.filterValues), L = Z(
233
+ } = _e(), z = Z((_) => _.selectedSheetId), W = Z((_) => _.selectedFrameId), X = Z((_) => _.dashboard), te = Z((_) => _.filterValues), A = Z(
233
234
  (_) => _.inlineFilterValuesMap
234
235
  ), Q = Bt((l == null ? void 0 : l.id) || "", {
235
236
  enabled: !!(l != null && l.id) && !!(t != null && t.accessToken)
@@ -259,14 +260,14 @@ function Ae() {
259
260
  setSelectedDatamodelId: R,
260
261
  setFilterValues: G,
261
262
  setInlineFilterValuesMap: ee,
262
- setApplyFilters: X,
263
+ setApplyFilters: J,
263
264
  setIsDashboardEditing: O,
264
265
  setIsVisualEditing: o,
265
- dashboard: J,
266
- selectedSheetId: U,
266
+ dashboard: X,
267
+ selectedSheetId: z,
267
268
  selectedFrameId: W,
268
269
  filterValues: te,
269
- inlineFilterValuesMap: L
270
+ inlineFilterValuesMap: A
270
271
  }))
271
272
  throw new Error("Failed to setup editor with visual data");
272
273
  return { success: !0, fromCache: K };
@@ -295,29 +296,29 @@ function Ae() {
295
296
  R,
296
297
  G,
297
298
  ee,
298
- X,
299
+ J,
299
300
  se,
300
301
  V,
301
- J,
302
- U,
302
+ X,
303
+ z,
303
304
  W,
304
305
  te,
305
- L
306
+ A
306
307
  ]
307
308
  ), be = B(
308
309
  async (_) => {
309
310
  var K;
310
- const E = (A) => (j.error(A), { success: !1, error: A });
311
+ const E = (L) => (j.error(L), { success: !1, error: L });
311
312
  try {
312
- if (d(_), !U)
313
+ if (d(_), !z)
313
314
  return E("No sheet selected. Please select a sheet first.");
314
- const { data: A, fromCache: ge } = await Ye(
315
+ const { data: L, fromCache: ge } = await Ye(
315
316
  a.apiServiceUrl,
316
317
  (t == null ? void 0 : t.accessToken) || "",
317
318
  _.id,
318
319
  n,
319
320
  "Adding visual to dashboard..."
320
- ), ue = (A == null ? void 0 : A.frameObject) ?? ((K = A == null ? void 0 : A.visual) == null ? void 0 : K.frameObject);
321
+ ), ue = (L == null ? void 0 : L.frameObject) ?? ((K = L == null ? void 0 : L.visual) == null ? void 0 : K.frameObject);
321
322
  if (!ue)
322
323
  return E("Visual has no frame data");
323
324
  const $ = mt(ue);
@@ -329,13 +330,13 @@ function Ae() {
329
330
  // Link this frame to the library visual
330
331
  };
331
332
  return await s(
332
- U,
333
+ z,
333
334
  le,
334
335
  "end"
335
336
  ), O(!0), D(le.id), { success: !0, fromCache: ge };
336
- } catch (A) {
337
- return console.error("Error adding visual:", A), E(
338
- A instanceof Error ? A.message : "Failed to add visual to dashboard"
337
+ } catch (L) {
338
+ return console.error("Error adding visual:", L), E(
339
+ L instanceof Error ? L.message : "Failed to add visual to dashboard"
339
340
  );
340
341
  }
341
342
  },
@@ -344,7 +345,7 @@ function Ae() {
344
345
  a.apiServiceUrl,
345
346
  n,
346
347
  d,
347
- U,
348
+ z,
348
349
  O,
349
350
  D,
350
351
  s
@@ -361,7 +362,7 @@ function Ae() {
361
362
  refetch: Q.refetch
362
363
  };
363
364
  }
364
- function Tr() {
365
+ function _r() {
365
366
  const t = M((p) => p.card.dataSource), {
366
367
  setSelectedConnectionId: a,
367
368
  setSelectedDatabaseName: n,
@@ -420,7 +421,7 @@ function ft() {
420
421
  l == null ? void 0 : l.slots
421
422
  ) ?? t.type, [n, d, f, t, l == null ? void 0 : l.slots]);
422
423
  }
423
- function _r({
424
+ function Ar({
424
425
  type: t,
425
426
  isLinked: a,
426
427
  className: n,
@@ -523,7 +524,7 @@ function Lr({
523
524
  className: t,
524
525
  variant: a = "outline"
525
526
  }) {
526
- const n = M((d) => d.onSave), { getUpdatedFrame: s } = Ae();
527
+ const n = M((d) => d.onSave), { getUpdatedFrame: s } = Le();
527
528
  function l() {
528
529
  const d = s();
529
530
  qe(d) && (n == null || n(d));
@@ -542,11 +543,11 @@ function Lr({
542
543
  }
543
544
  );
544
545
  }
545
- function Ar({
546
+ function qr({
546
547
  className: t,
547
548
  variant: a = "default"
548
549
  }) {
549
- const n = ce(), [s, l] = H(!1), { setIsVisualEditing: d } = _e(), { getUpdatedFrame: p } = Ae(), f = Le(), u = M((h) => h.frame), v = lt();
550
+ const n = ce(), [s, l] = H(!1), { setIsVisualEditing: d } = _e(), { getUpdatedFrame: p } = Le(), f = Ae(), u = M((h) => h.frame), v = lt();
550
551
  return /* @__PURE__ */ r(
551
552
  q,
552
553
  {
@@ -592,10 +593,10 @@ function Ar({
592
593
  }
593
594
  );
594
595
  }
595
- function qr({
596
+ function Mr({
596
597
  className: t
597
598
  }) {
598
- const a = ce(), [n, s] = H(!1), l = Le(), d = M((S) => S.frame), p = Z((S) => S.selectedSheetId), f = Z((S) => S.dashboard), { updateFrame: u, setIsVisualEditing: v } = _e(), { getUpdatedFrame: g } = Ae(), h = lt(), x = Xt();
599
+ const a = ce(), [n, s] = H(!1), l = Ae(), d = M((S) => S.frame), p = Z((S) => S.selectedSheetId), f = Z((S) => S.dashboard), { updateFrame: u, setIsVisualEditing: v } = _e(), { getUpdatedFrame: g } = Le(), h = lt(), x = Jt();
599
600
  return /* @__PURE__ */ r(
600
601
  q,
601
602
  {
@@ -655,7 +656,7 @@ function qr({
655
656
  }
656
657
  );
657
658
  }
658
- function Mr({ className: t }) {
659
+ function Or({ className: t }) {
659
660
  const { setTempQueryData: a, setSqlGen: n } = de(), s = ce(), l = M((h) => h.tempQueryData), d = M((h) => h.onClose), p = M((h) => h.card), f = ft(), u = P(() => f !== p.type ? { ...p, type: f } : p, [p, f]), { queryKey: v } = ot(u);
660
661
  function g() {
661
662
  if (l) {
@@ -678,7 +679,7 @@ function Mr({ className: t }) {
678
679
  }
679
680
  );
680
681
  }
681
- function Or({
682
+ function zr({
682
683
  label: t = "Clear",
683
684
  variant: a = "secondary",
684
685
  className: n
@@ -694,22 +695,22 @@ function Or({
694
695
  setCardType: R,
695
696
  setFrame: G,
696
697
  setCard: ee,
697
- setActiveTabCardId: X
698
+ setActiveTabCardId: J
698
699
  } = de();
699
700
  function se() {
700
- var J, te, L, Q;
701
+ var X, te, A, Q;
701
702
  const O = l.getQueryData(v);
702
703
  d != null && d.queryData || s({
703
704
  queryKey: v,
704
705
  queryData: O
705
706
  }), l.setQueryData(v, null), l.removeQueries({ queryKey: v, exact: !0 }), g(""), h({}), N(), F(void 0), x(""), w(""), S({});
706
- const o = M.getState().frame, D = M.getState().card, V = nt(o, D), U = ((J = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : J.visualType) === "multiple" || !!((te = V == null ? void 0 : V.customCardPreferences) != null && te.dataInputCardIds) || (((L = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : L.minInputs) || 0) > 1 || (((Q = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : Q.maxInputs) || 0) > 1, W = gr(D, U);
707
+ const o = M.getState().frame, D = M.getState().card, V = nt(o, D), z = ((X = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : X.visualType) === "multiple" || !!((te = V == null ? void 0 : V.customCardPreferences) != null && te.dataInputCardIds) || (((A = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : A.minInputs) || 0) > 1 || (((Q = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : Q.maxInputs) || 0) > 1, W = gr(D, z);
707
708
  G({
708
709
  ...o,
709
710
  cards: o.cards.map(
710
711
  (Y) => Y.id === W.id ? W : Y
711
712
  )
712
- }), X(W.id), ee(W), U || R("bar");
713
+ }), J(W.id), ee(W), z || R("bar");
713
714
  }
714
715
  return /* @__PURE__ */ m(
715
716
  q,
@@ -870,7 +871,7 @@ const xr = /* @__PURE__ */ new Set([
870
871
  "field_selector",
871
872
  "metric_selector"
872
873
  ]);
873
- function Xe(t) {
874
+ function Je(t) {
874
875
  const { text: a, ariaLabel: n } = t, [s, l] = H(!1);
875
876
  return /* @__PURE__ */ m(
876
877
  "button",
@@ -892,7 +893,7 @@ function Xe(t) {
892
893
  }
893
894
  );
894
895
  }
895
- function Je(t) {
896
+ function Xe(t) {
896
897
  const {
897
898
  control: a,
898
899
  scope: n,
@@ -923,14 +924,14 @@ function Je(t) {
923
924
  /* @__PURE__ */ m("div", { className: "space-y-1.5 px-3 py-2.5", children: [
924
925
  /* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
925
926
  /* @__PURE__ */ r(
926
- Xe,
927
+ Je,
927
928
  {
928
929
  text: s,
929
930
  ariaLabel: "Copy SQL control reference"
930
931
  }
931
932
  ),
932
933
  x ? /* @__PURE__ */ r(
933
- Xe,
934
+ Je,
934
935
  {
935
936
  text: x,
936
937
  ariaLabel: "Copy Jinja control reference"
@@ -1012,7 +1013,7 @@ function Ur({
1012
1013
  const F = P(
1013
1014
  () => new Set(n || []),
1014
1015
  [n]
1015
- ), R = At(t), G = Et(t), [ee, X] = H(
1016
+ ), R = Lt(t), G = Et(t), [ee, J] = H(
1016
1017
  null
1017
1018
  ), [se, O] = H(
1018
1019
  null
@@ -1021,7 +1022,7 @@ function Ur({
1021
1022
  step: 1,
1022
1023
  control: pe(t, a, Array.from(F))
1023
1024
  } : null
1024
- ), V = Se({}), U = Se(void 0), W = Se(p), J = P(() => {
1025
+ ), V = Se({}), z = Se(void 0), W = Se(p), X = P(() => {
1025
1026
  const e = je({ scope: t, card: x });
1026
1027
  if (!w)
1027
1028
  return e;
@@ -1040,7 +1041,7 @@ function Ur({
1040
1041
  return c.filter((b) => i.has(b.value));
1041
1042
  },
1042
1043
  [w, x, t]
1043
- ), L = B(
1044
+ ), A = B(
1044
1045
  (e) => t === "dashboard" && (e === "field_selector" || e === "metric_selector"),
1045
1046
  [t]
1046
1047
  ), Q = P(
@@ -1055,7 +1056,7 @@ function Ur({
1055
1056
  fields: u || [],
1056
1057
  metrics: v || []
1057
1058
  };
1058
- if (!L(o.control.type))
1059
+ if (!A(o.control.type))
1059
1060
  return {
1060
1061
  fields: u || [],
1061
1062
  metrics: v || []
@@ -1079,7 +1080,7 @@ function Ur({
1079
1080
  u,
1080
1081
  v,
1081
1082
  o,
1082
- L,
1083
+ A,
1083
1084
  g
1084
1085
  ]);
1085
1086
  ie(() => {
@@ -1089,10 +1090,10 @@ function Ur({
1089
1090
  W.current = p, e && (D({
1090
1091
  step: 1,
1091
1092
  control: pe(t, a, Array.from(F))
1092
- }), O(null), X(null));
1093
+ }), O(null), J(null));
1093
1094
  }, [a, p, F, t]);
1094
1095
  const be = (e) => {
1095
- if (!L(e.type))
1096
+ if (!A(e.type))
1096
1097
  return {
1097
1098
  fields: u || [],
1098
1099
  metrics: v || []
@@ -1119,7 +1120,7 @@ function Ur({
1119
1120
  })) : []
1120
1121
  };
1121
1122
  }, _ = (e) => {
1122
- if (!L(e.control.type))
1123
+ if (!A(e.control.type))
1123
1124
  return {
1124
1125
  nextControl: e.control,
1125
1126
  cardBindingsById: void 0
@@ -1182,7 +1183,7 @@ function Ur({
1182
1183
  const I = b.find(
1183
1184
  (T) => T.id === e
1184
1185
  );
1185
- let z = s;
1186
+ let U = s;
1186
1187
  if (i && I) {
1187
1188
  const T = Ne({
1188
1189
  control: i,
@@ -1194,16 +1195,16 @@ function Ur({
1194
1195
  nextControl: I,
1195
1196
  currentDefaultValue: ne
1196
1197
  });
1197
- I.source.kind === "manual" && (V.current[e] = re), s && (z = { ...s }, re === void 0 ? delete z[e] : z[e] = re), b = b.map(
1198
+ I.source.kind === "manual" && (V.current[e] = re), s && (U = { ...s }, re === void 0 ? delete U[e] : U[e] = re), b = b.map(
1198
1199
  (Be) => Be.id === e ? { ...I, defaultValue: re } : Be
1199
1200
  );
1200
1201
  }
1201
- E(b, z, {
1202
+ E(b, U, {
1202
1203
  type: "update",
1203
1204
  cardBindingsById: k,
1204
1205
  affectedBindingControlIds: y
1205
1206
  });
1206
- }, A = (e, c) => {
1207
+ }, L = (e, c) => {
1207
1208
  if (!c.trim())
1208
1209
  return;
1209
1210
  const i = lr(c);
@@ -1237,21 +1238,21 @@ function Ur({
1237
1238
  const i = { ...s };
1238
1239
  delete i[e], E(c, i, { type: "remove", controlId: e });
1239
1240
  }, ue = B(() => {
1240
- U.current = void 0, D({
1241
+ z.current = void 0, D({
1241
1242
  step: 1,
1242
1243
  control: pe(t, a, Array.from(F))
1243
- }), O(null), X(null);
1244
+ }), O(null), J(null);
1244
1245
  }, [a, F, t]), $ = (e) => {
1245
1246
  D(
1246
1247
  (c) => c && (() => {
1247
1248
  const i = e(c.control);
1248
- c.control.source.kind === "manual" && i.source.kind === "sql_query" && (U.current = c.defaultValue);
1249
- const b = c.defaultValue === void 0 && c.control.source.kind === "sql_query" && i.source.kind === "manual" ? U.current : c.defaultValue, C = Pe({
1249
+ c.control.source.kind === "manual" && i.source.kind === "sql_query" && (z.current = c.defaultValue);
1250
+ const b = c.defaultValue === void 0 && c.control.source.kind === "sql_query" && i.source.kind === "manual" ? z.current : c.defaultValue, C = Pe({
1250
1251
  previousControl: c.control,
1251
1252
  nextControl: i,
1252
1253
  currentDefaultValue: b
1253
1254
  });
1254
- return i.source.kind === "manual" && (U.current = C), {
1255
+ return i.source.kind === "manual" && (z.current = C), {
1255
1256
  ...c,
1256
1257
  control: i,
1257
1258
  defaultValue: C
@@ -1260,7 +1261,7 @@ function Ur({
1260
1261
  );
1261
1262
  }, le = (e) => {
1262
1263
  D(
1263
- (c) => c && (c.control.source.kind === "manual" && (U.current = e), {
1264
+ (c) => c && (c.control.source.kind === "manual" && (z.current = e), {
1264
1265
  ...c,
1265
1266
  defaultValue: e
1266
1267
  })
@@ -1268,7 +1269,7 @@ function Ur({
1268
1269
  }, ye = (() => {
1269
1270
  if (!o)
1270
1271
  return !1;
1271
- if (o.step === 2 && L(o.control.type))
1272
+ if (o.step === 2 && A(o.control.type))
1272
1273
  return (o.selectedCardIds || []).length > 0;
1273
1274
  if (o.step !== 2 && o.step !== 3 || !o.control.label.trim())
1274
1275
  return !1;
@@ -1288,7 +1289,7 @@ function Ur({
1288
1289
  var k;
1289
1290
  if (!o)
1290
1291
  return;
1291
- const e = Qe(o.control), c = Lt({
1292
+ const e = Qe(o.control), c = At({
1292
1293
  label: e.label,
1293
1294
  fallbackId: e.id,
1294
1295
  existingControls: a,
@@ -1355,10 +1356,10 @@ function Ur({
1355
1356
  }
1356
1357
  );
1357
1358
  O(c), D(null), N == null || N();
1358
- }, [a, o, s, E, N]), bt = o ? L(o.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ue = o != null && o.createdControlId ? `[[param.${o.createdControlId}]]` : o ? `[[param.${Tt(o.control.label) || o.control.id}]]` : "", xe = $e({
1359
+ }, [a, o, s, E, N]), bt = o ? A(o.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], ze = o != null && o.createdControlId ? `[[param.${o.createdControlId}]]` : o ? `[[param.${Tt(o.control.label) || o.control.id}]]` : "", xe = $e({
1359
1360
  controls: a,
1360
1361
  defaultValues: s
1361
- }), Ce = o ? [...a, o.control] : a, ze = o ? $e({
1362
+ }), Ce = o ? [...a, o.control] : a, Ue = o ? $e({
1362
1363
  controls: Ce,
1363
1364
  defaultValues: s,
1364
1365
  overrides: [
@@ -1388,9 +1389,9 @@ function Ur({
1388
1389
  // keeping the shared definitions for existing controls.
1389
1390
  "date",
1390
1391
  "text"
1391
- ]), i = J.filter(
1392
+ ]), i = X.filter(
1392
1393
  (k) => !e.has(k.value) && !c.has(k.value)
1393
- ), b = J.filter(
1394
+ ), b = X.filter(
1394
1395
  (k) => e.has(k.value)
1395
1396
  ), C = (k) => /* @__PURE__ */ m(
1396
1397
  "button",
@@ -1439,7 +1440,7 @@ function Ur({
1439
1440
  )
1440
1441
  ] });
1441
1442
  })(),
1442
- o.step === 2 && L(o.control.type) && /* @__PURE__ */ m("div", { className: "space-y-3", children: [
1443
+ o.step === 2 && A(o.control.type) && /* @__PURE__ */ m("div", { className: "space-y-3", children: [
1443
1444
  /* @__PURE__ */ m("div", { className: "space-y-3", children: [
1444
1445
  /* @__PURE__ */ r(
1445
1446
  ht,
@@ -1461,7 +1462,7 @@ function Ur({
1461
1462
  className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
1462
1463
  children: [
1463
1464
  /* @__PURE__ */ r(
1464
- Jt,
1465
+ Xt,
1465
1466
  {
1466
1467
  checked: c,
1467
1468
  onCheckedChange: (i) => D(
@@ -1523,7 +1524,7 @@ function Ur({
1523
1524
  }
1524
1525
  )
1525
1526
  ] }),
1526
- o.step === 2 && !L(o.control.type) && /* @__PURE__ */ r(
1527
+ o.step === 2 && !A(o.control.type) && /* @__PURE__ */ r(
1527
1528
  Ge,
1528
1529
  {
1529
1530
  control: o.control,
@@ -1531,7 +1532,7 @@ function Ur({
1531
1532
  availableFieldChoices: Y.fields,
1532
1533
  availableMetricChoices: Y.metrics,
1533
1534
  previewControlDefinitions: Ce,
1534
- previewControlValues: ze,
1535
+ previewControlValues: Ue,
1535
1536
  onControlChange: (e) => $(() => e),
1536
1537
  onLabelChange: (e) => $((c) => ({
1537
1538
  ...c,
@@ -1548,7 +1549,7 @@ function Ur({
1548
1549
  nextDisabled: !ye
1549
1550
  }
1550
1551
  ),
1551
- o.step === 3 && L(o.control.type) && /* @__PURE__ */ r(
1552
+ o.step === 3 && A(o.control.type) && /* @__PURE__ */ r(
1552
1553
  Ge,
1553
1554
  {
1554
1555
  control: o.control,
@@ -1556,7 +1557,7 @@ function Ur({
1556
1557
  availableFieldChoices: Y.fields,
1557
1558
  availableMetricChoices: Y.metrics,
1558
1559
  previewControlDefinitions: Ce,
1559
- previewControlValues: ze,
1560
+ previewControlValues: Ue,
1560
1561
  onControlChange: (e) => $(() => e),
1561
1562
  onLabelChange: (e) => $((c) => ({
1562
1563
  ...c,
@@ -1573,12 +1574,12 @@ function Ur({
1573
1574
  nextDisabled: !ye
1574
1575
  }
1575
1576
  ),
1576
- o.step === 3 && !L(o.control.type) && /* @__PURE__ */ r(
1577
- Je,
1577
+ o.step === 3 && !A(o.control.type) && /* @__PURE__ */ r(
1578
+ Xe,
1578
1579
  {
1579
1580
  control: o.control,
1580
1581
  scope: t,
1581
- createdReference: Ue,
1582
+ createdReference: ze,
1582
1583
  explorerContent: /* @__PURE__ */ m(ae, { children: [
1583
1584
  "Open the card and use",
1584
1585
  " ",
@@ -1597,12 +1598,12 @@ function Ur({
1597
1598
  onDone: Oe
1598
1599
  }
1599
1600
  ),
1600
- o.step === 4 && L(o.control.type) && /* @__PURE__ */ r(
1601
- Je,
1601
+ o.step === 4 && A(o.control.type) && /* @__PURE__ */ r(
1602
+ Xe,
1602
1603
  {
1603
1604
  control: o.control,
1604
1605
  scope: t,
1605
- createdReference: Ue,
1606
+ createdReference: ze,
1606
1607
  summaryDetail: /* @__PURE__ */ m(ae, { children: [
1607
1608
  "Used by ",
1608
1609
  (o.selectedCardIds || []).length,
@@ -1737,7 +1738,7 @@ function Ur({
1737
1738
  )
1738
1739
  ] })
1739
1740
  ] }),
1740
- L(e.type) ? /* @__PURE__ */ r(
1741
+ A(e.type) ? /* @__PURE__ */ r(
1741
1742
  er,
1742
1743
  {
1743
1744
  type: e.type,
@@ -1754,10 +1755,10 @@ function Ur({
1754
1755
  const I = _({
1755
1756
  control: e,
1756
1757
  nextSelectedCardIds: y
1757
- }), z = a.map(
1758
+ }), U = a.map(
1758
1759
  (T) => T.id === e.id ? I.nextControl : T
1759
1760
  );
1760
- E(z, s, {
1761
+ E(U, s, {
1761
1762
  type: "update",
1762
1763
  cardBindingsById: I.cardBindingsById
1763
1764
  });
@@ -1787,11 +1788,11 @@ function Ur({
1787
1788
  previewControlValues: xe,
1788
1789
  onChange: (y) => {
1789
1790
  const I = a.map(
1790
- (z) => z.id === e.id ? { ...z, defaultValue: y } : z
1791
+ (U) => U.id === e.id ? { ...U, defaultValue: y } : U
1791
1792
  );
1792
1793
  if (e.source.kind === "manual" && (V.current[e.id] = y), s) {
1793
- const z = { ...s };
1794
- y === void 0 ? delete z[e.id] : z[e.id] = y, E(I, z);
1794
+ const U = { ...s };
1795
+ y === void 0 ? delete U[e.id] : U[e.id] = y, E(I, U);
1795
1796
  return;
1796
1797
  }
1797
1798
  E(I, void 0);
@@ -1802,7 +1803,7 @@ function Ur({
1802
1803
  tr,
1803
1804
  {
1804
1805
  open: ee === e.id,
1805
- onOpenChange: (y) => X(y ? e.id : null),
1806
+ onOpenChange: (y) => J(y ? e.id : null),
1806
1807
  children: [
1807
1808
  /* @__PURE__ */ r(rr, { asChild: !0, children: /* @__PURE__ */ m(
1808
1809
  q,
@@ -1825,7 +1826,7 @@ function Ur({
1825
1826
  sr,
1826
1827
  {
1827
1828
  controlId: e.id,
1828
- onCommit: (y) => A(e.id, y)
1829
+ onCommit: (y) => L(e.id, y)
1829
1830
  },
1830
1831
  e.id
1831
1832
  )
@@ -1887,7 +1888,7 @@ function Ur({
1887
1888
  )
1888
1889
  ] });
1889
1890
  }
1890
- function zr(t) {
1891
+ function Br(t) {
1891
1892
  const {
1892
1893
  open: a,
1893
1894
  onOpenChange: n,
@@ -1925,16 +1926,16 @@ export {
1925
1926
  Ur as C,
1926
1927
  Lr as E,
1927
1928
  dr as L,
1928
- _r as V,
1929
- Mr as a,
1930
- Ar as b,
1931
- qr as c,
1929
+ Ar as V,
1930
+ Or as a,
1931
+ qr as b,
1932
+ Mr as c,
1932
1933
  cr as d,
1933
- zr as e,
1934
- Tr as f,
1934
+ Br as e,
1935
+ _r as f,
1935
1936
  ft as g,
1936
1937
  mr as h,
1937
- Or as i,
1938
- Vr as r,
1939
- Ae as u
1938
+ zr as i,
1939
+ Tr as r,
1940
+ Le as u
1940
1941
  };