react-semaphor 0.1.582 → 0.1.584

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 (88) hide show
  1. package/dist/analytics-protocol/index.js +183 -178
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +7 -7
  4. package/dist/briefings/index.js +4 -4
  5. package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
  6. package/dist/chunks/{assistant-chat-CVtxjVEH.js → assistant-chat-nmycV1Se.js} +12 -12
  7. package/dist/chunks/{bookmark-impact-BDSeeRy7.js → bookmark-impact-CI3gmxi0.js} +2 -2
  8. package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-D9-RFkDg.js} +22 -22
  9. package/dist/chunks/{card-filter-builder-CMZ5nwdC.js → card-filter-builder-C7QyPqRy.js} +145 -145
  10. package/dist/chunks/{comparison-window-caption-sRFtnX1q.js → comparison-window-caption-BAnsTI8y.js} +291 -305
  11. package/dist/chunks/{dashboard-briefing-launcher-C9wf8KhD.js → dashboard-briefing-launcher-DXs0XA1O.js} +13 -13
  12. package/dist/chunks/{dashboard-controls-PDb9Gap5.js → dashboard-controls-6Zoo8d8Y.js} +84 -84
  13. package/dist/chunks/{dashboard-BNn7fpDY.js → dashboard-inJy_V78.js} +1 -1
  14. package/dist/chunks/{dashboard-json-CvtVy2UH.js → dashboard-json-D5eJhVA9.js} +4 -4
  15. package/dist/chunks/{dates-B42fboJU.js → dates-B3_GWc_Y.js} +8 -8
  16. package/dist/chunks/{edit-dashboard-visual-Cat0RWPp.js → edit-dashboard-visual-DR03SYeW.js} +17 -17
  17. package/dist/chunks/{filter-reach-copy-C-RH1rVx.js → filter-reach-copy-CZwzrxBp.js} +1403 -1240
  18. package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-DtOvqcjn.js} +8 -8
  19. package/dist/chunks/{index-JWLo4R_t.js → index-BgT1L0p5.js} +5 -5
  20. package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
  21. package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
  22. package/dist/chunks/{matrix-analytical-definition-dkS8szLM.js → matrix-analytical-definition-Cs2v43FM.js} +3 -3
  23. package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
  24. package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
  25. package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-Be4uS3Ql.js} +1 -1
  26. package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
  27. package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
  28. package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-uH06jiZD.js} +1 -1
  29. package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-DvZY4eJM.js} +779 -765
  30. package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-BZexMfmL.js} +1 -1
  31. package/dist/chunks/{report-preferences-dialog-CwbsD6t6.js → report-preferences-dialog-DWeVe2so.js} +171 -170
  32. package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
  33. package/dist/chunks/{resolve-dashboard-input-context-6FP1-7aU.js → resolve-dashboard-input-context-uATCuOP7.js} +5083 -4973
  34. package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
  35. package/dist/chunks/{saved-dashboard-context-D2G0uLji.js → saved-dashboard-context-DSVV9iqW.js} +6 -6
  36. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
  37. package/dist/chunks/{semaphor-ready-indicator-UhNS27Gy.js → semaphor-ready-indicator-B9vvRMnJ.js} +46773 -45614
  38. package/dist/chunks/{shelf-drop-preview-context-DPksW68k.js → shelf-drop-preview-context-BHOnp5Bo.js} +5 -5
  39. package/dist/chunks/{stored-dashboard-KpTy4umJ.js → stored-dashboard-xc5iidHL.js} +210 -221
  40. package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
  41. package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Cv_94obr.js} +1 -1
  42. package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
  43. package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
  44. package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
  45. package/dist/chunks/{variable-draft-CP5I66_J.js → variable-draft-C3CjhsJQ.js} +4 -4
  46. package/dist/dashboard/index.js +2 -2
  47. package/dist/dashboard-authoring/index.js +1391 -1364
  48. package/dist/format-utils/index.js +140 -140
  49. package/dist/index.js +234 -231
  50. package/dist/report-runtime-context/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/surfboard/index.js +2 -2
  53. package/dist/types/components/ui-custom/date-range-presets.d.ts +7 -0
  54. package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
  55. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
  56. package/dist/types/index.js +5 -5
  57. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  58. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
  59. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
  60. package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
  61. package/dist/types/lib/see-records/click.d.ts +79 -0
  62. package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
  63. package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
  64. package/dist/types/lib/types/common-types.d.ts +6 -0
  65. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
  66. package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
  67. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  68. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -0
  70. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  71. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  72. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -0
  73. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  74. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  75. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  76. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  77. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +11 -0
  78. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -0
  79. package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
  80. package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
  81. package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
  82. package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
  83. package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +46 -0
  84. package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
  85. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +61 -0
  86. package/dist/types/shared/usage-events/envelope.d.ts +4 -4
  87. package/package.json +1 -1
  88. package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
@@ -1,18 +1,18 @@
1
- import { c as nt, B as U, X as ce, x as Ne, q as mn, a8 as pn, t as at, u as rt, v as st, w as ot, a9 as Ot, F as Oe, s as le, y as xe, z as ge, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-C7qGZuH1.js";
1
+ import { c as nt, B as G, X as ce, x as Ne, q as mn, a8 as pn, t as at, u as rt, v as st, w as ot, a9 as Ot, F as Oe, s as le, y as xe, z as ge, A as be, D as ve, E as re, e as it, f as lt, h as dt, L as fn, d as hn } from "./style-sheet-parts-_dGSFzDi.js";
2
2
  import { jsx as t, jsxs as l, Fragment as fe } from "react/jsx-runtime";
3
3
  import * as _e from "react";
4
4
  import vt, { useMemo as Q, useState as H, useRef as Ae, useCallback as ne, useEffect as de, forwardRef as xn, Fragment as gn } from "react";
5
- import { b1 as ct, u as ut, af as se, c4 as _t, cB as J, cC as bn, c0 as Ie, cD as Ge, cE as Vt, cF as vn, bW as Ve, cG as yn, ag as Rt, bD as Nn, bE as Cn, bG as wn, bw as kn, cH as Sn, h as Dn, cI as In, cJ as Tn, cK as yt, bV as Et, cL as Ln, cM as zt, cN as Mt, cO as An, cP as $n, cQ as Fn, cR as On, cS as _n, cT as Vn, cU as Rn, bx as En, cV as Nt, cW as qt, cX as zn, bA as Mn, cY as qn, cZ as jn, c_ as Gn, c$ as ye, d0 as jt, d1 as Un, d2 as Bn, d3 as Wn, d4 as Kn, d5 as Qn, d6 as Xe, d7 as he, d8 as Ze, d9 as et, da as tt, db as Hn, dc as Re, dd as Ee, de as ze, df as Me, dg as Gt, dh as Ut, di as Bt } from "./semaphor-ready-indicator-UhNS27Gy.js";
6
- import { D as Pn } from "./token-types-iKMplaBL.js";
7
- import { fl as Wt, fm as Yn, fn as Jn, fo as Xn, fp as Zn, fq as ea, fr as $e, fs as Ct, ft as wt, fu as Ke, fv as Qe, fw as ta, fx as na, fy as kt, fz as aa, fA as ra, fB as Fe, fC as sa, fD as St, fE as Kt, fF as Qt, fG as Ht, fH as Pt, fI as oa, fJ as ia, fK as Dt, fL as la, fM as It, fN as da, fO as ca, fP as ua, fQ as ma, fR as He, a as qe, fS as Pe, bb as pa, fT as fa, fU as ha, fV as xa, fW as ga } from "./resolve-dashboard-input-context-6FP1-7aU.js";
5
+ import { b2 as ct, u as ut, ag as se, c5 as _t, cC as X, cD as bn, c1 as Ie, cE as Ue, cF as Vt, cG as vn, bX as Ve, cH as yn, ah as Rt, bE as Nn, bF as Cn, bH as wn, bx as kn, cI as Sn, i as Dn, cJ as In, cK as Tn, cL as yt, bW as Et, cM as Ln, cN as zt, cO as Mt, cP as An, cQ as $n, cR as Fn, cS as On, cT as _n, cU as Vn, cV as Rn, by as En, cW as Nt, cX as qt, cY as zn, bB as Mn, cZ as qn, c_ as jn, c$ as Un, d0 as ye, d1 as jt, d2 as Gn, d3 as Bn, d4 as Wn, d5 as Kn, d6 as Qn, d7 as Ze, d8 as he, d9 as Je, da as et, db as tt, dc as Hn, dd as Re, de as Ee, df as ze, dg as Me, dh as Ut, di as Gt, dj as Bt } from "./semaphor-ready-indicator-B9vvRMnJ.js";
6
+ import { D as Pn } from "./token-types-DEe_FP4l.js";
7
+ import { fs as Wt, ft as Yn, fu as Xn, fv as Zn, fw as Jn, fx as ea, fy as $e, fz as Ct, fA as wt, fB as Ke, fC as Qe, fD as ta, fE as na, fF as kt, fG as aa, fH as ra, fI as Fe, fJ as sa, fK as St, fL as Kt, fM as Qt, fN as Ht, fO as Pt, fP as oa, fQ as ia, fR as Dt, fS as la, fT as It, fU as da, fV as ca, fW as ua, fX as ma, fY as He, a as qe, fZ as Pe, bb as pa, f_ as fa, f$ as ha, g0 as xa, g1 as ga } from "./resolve-dashboard-input-context-uATCuOP7.js";
8
8
  import { c as M } from "./pickers-DkqmtnTL.js";
9
- import { r as Yt } from "./validators-B8fpdinG.js";
10
- import "./matrix-operation-contract-DCVinw1o.js";
9
+ import { r as Yt } from "./validators-CJ8Jh0E8.js";
10
+ import "./matrix-operation-contract-BM5TveR3.js";
11
11
  import "./analytics-base-schemas-BaIQrEzX.js";
12
12
  import "../value-format-preferences/index.js";
13
- import { U as ba } from "./upload-CiGNKJ_0.js";
14
- import { a as Jt } from "./metric-comparison-n9NsIa-2.js";
15
- import { S as Xt } from "./filter-reach-copy-C-RH1rVx.js";
13
+ import { U as ba } from "./upload-CtyOkU_B.js";
14
+ import { a as Xt } from "./metric-comparison-Be4uS3Ql.js";
15
+ import { Z as Zt } from "./filter-reach-copy-CZwzrxBp.js";
16
16
  /**
17
17
  * @license lucide-react v0.453.0 - ISC
18
18
  *
@@ -95,7 +95,7 @@ function Ca({
95
95
  }) {
96
96
  return e === "all" ? !1 : e === "none" ? !!n || o : n ? !Na(e, n, a) : o;
97
97
  }
98
- function Zt(e) {
98
+ function Jt(e) {
99
99
  const { tokenProps: n } = ct(), a = ut((s) => s.authToken) || e;
100
100
  se(
101
101
  (s) => s.selectedConnectionId
@@ -142,10 +142,10 @@ function mt(e) {
142
142
  }
143
143
  function wa(e, n) {
144
144
  if (e.some(
145
- (d) => J(d, n)
145
+ (d) => X(d, n)
146
146
  ))
147
147
  return e.filter(
148
- (d) => !J(d, n)
148
+ (d) => !X(d, n)
149
149
  );
150
150
  const o = mt(e);
151
151
  return e.some(
@@ -162,7 +162,7 @@ function ka(e, n) {
162
162
  return n;
163
163
  const d = [...e];
164
164
  for (const c of n)
165
- d.some((i) => J(i, c)) || d.push(c);
165
+ d.some((i) => X(i, c)) || d.push(c);
166
166
  return d;
167
167
  }
168
168
  function Sa({
@@ -172,7 +172,7 @@ function Sa({
172
172
  selectedEntities: o,
173
173
  onSelectionChange: u
174
174
  }) {
175
- const { semanticDomains: d, isSemanticDomainsLoading: c } = Zt(), i = Q(() => Ia(d, e), [d, e]), s = Q(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
175
+ const { semanticDomains: d, isSemanticDomainsLoading: c } = Jt(), i = Q(() => Ia(d, e), [d, e]), s = Q(() => a ? i.filter((f) => f.id === a) : i, [i, a]);
176
176
  if (c && s.length === 0)
177
177
  return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading semantic domains…" });
178
178
  if (s.length === 0)
@@ -210,20 +210,20 @@ function Da({
210
210
  );
211
211
  }, [s, n]), w = n.length > 0 && f.length > 0, y = d || w || !!a, h = s.length, N = Q(() => f.filter(
212
212
  (O) => o.some(
213
- (T) => J(T, Le(O))
213
+ (T) => X(T, Le(O))
214
214
  )
215
215
  ).length, [f, o]), k = Q(
216
216
  () => f.map(Le),
217
217
  [f]
218
218
  ), _ = k.length > 0 && k.every(
219
- (O) => o.some((T) => J(T, O))
219
+ (O) => o.some((T) => X(T, O))
220
220
  ), D = () => {
221
221
  if (k.length !== 0) {
222
222
  if (_) {
223
223
  u(
224
224
  o.filter(
225
225
  (O) => !k.some(
226
- (T) => J(O, T)
226
+ (T) => X(O, T)
227
227
  )
228
228
  )
229
229
  );
@@ -288,11 +288,11 @@ function Da({
288
288
  ] }),
289
289
  y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: m && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : f.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : f.map((O) => {
290
290
  const T = Le(O), P = o.some(
291
- (X) => J(X, T)
291
+ (Z) => X(Z, T)
292
292
  );
293
293
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-start gap-2 rounded-[4px] px-9 py-1.5 transition-colors hover:bg-muted/40", children: [
294
294
  /* @__PURE__ */ t(
295
- Ge,
295
+ Ue,
296
296
  {
297
297
  checked: P,
298
298
  onCheckedChange: () => j(O),
@@ -503,7 +503,7 @@ function Aa({
503
503
  }
504
504
  ),
505
505
  /* @__PURE__ */ t(
506
- U,
506
+ G,
507
507
  {
508
508
  type: "button",
509
509
  variant: "outline",
@@ -605,7 +605,7 @@ function $a({
605
605
  }
606
606
  ),
607
607
  /* @__PURE__ */ l(
608
- U,
608
+ G,
609
609
  {
610
610
  type: "button",
611
611
  size: "sm",
@@ -654,7 +654,7 @@ function Fa({
654
654
  onSelectionChange: u
655
655
  }) {
656
656
  var i;
657
- const d = Ue("/v1/databases", { connection_id: e.id }, [
657
+ const d = Ge("/v1/databases", { connection_id: e.id }, [
658
658
  "databases",
659
659
  e.id
660
660
  ]);
@@ -699,7 +699,7 @@ function nn({
699
699
  onSelectionChange: u
700
700
  }) {
701
701
  var i;
702
- const d = Ue(
702
+ const d = Ge(
703
703
  "/v1/schemas",
704
704
  {
705
705
  connection_id: e.id,
@@ -740,7 +740,7 @@ function pt({
740
740
  selectedEntities: u,
741
741
  onSelectionChange: d
742
742
  }) {
743
- const c = Ue(
743
+ const c = Ge(
744
744
  "/v1/tables",
745
745
  {
746
746
  connection_id: e.id,
@@ -771,13 +771,13 @@ function pt({
771
771
  const m = i.map(
772
772
  (h) => s(h.table_name, h.table_type)
773
773
  ), f = m.length > 0 && m.every(
774
- (h) => u.some((N) => J(N, h))
774
+ (h) => u.some((N) => X(N, h))
775
775
  ), w = (h, N) => {
776
776
  const k = s(h, N), _ = u.some(
777
- (D) => J(D, k)
777
+ (D) => X(D, k)
778
778
  );
779
779
  d(
780
- _ ? u.filter((D) => !J(D, k)) : [...u, k]
780
+ _ ? u.filter((D) => !X(D, k)) : [...u, k]
781
781
  );
782
782
  }, y = () => {
783
783
  if (m.length === 0) return;
@@ -785,7 +785,7 @@ function pt({
785
785
  d(
786
786
  u.filter(
787
787
  (N) => !m.some(
788
- (k) => J(N, k)
788
+ (k) => X(N, k)
789
789
  )
790
790
  )
791
791
  );
@@ -793,7 +793,7 @@ function pt({
793
793
  }
794
794
  const h = [...u];
795
795
  for (const N of m)
796
- h.some((k) => J(k, N)) || h.push(N);
796
+ h.some((k) => X(k, N)) || h.push(N);
797
797
  d(h);
798
798
  };
799
799
  return /* @__PURE__ */ l("ul", { children: [
@@ -815,11 +815,11 @@ function pt({
815
815
  ] }),
816
816
  i.map((h) => {
817
817
  const N = s(h.table_name, h.table_type), k = u.some(
818
- (_) => J(_, N)
818
+ (_) => X(_, N)
819
819
  );
820
820
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-center gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
821
821
  /* @__PURE__ */ t(
822
- Ge,
822
+ Ue,
823
823
  {
824
824
  checked: k,
825
825
  onCheckedChange: () => w(h.table_name, h.table_type),
@@ -847,7 +847,7 @@ function Oa({
847
847
  selectedEntities: a,
848
848
  onSelectionChange: o
849
849
  }) {
850
- const u = Ue("/v1/datamodels", { connection_id: e.id }, [
850
+ const u = Ge("/v1/datamodels", { connection_id: e.id }, [
851
851
  "datamodels",
852
852
  e.id
853
853
  ]), d = Q(() => {
@@ -873,10 +873,10 @@ function Oa({
873
873
  database: i.database || "",
874
874
  schema: i.schema || ""
875
875
  }, m = a.some(
876
- (f) => J(f, s)
876
+ (f) => X(f, s)
877
877
  );
878
878
  o(
879
- m ? a.filter((f) => !J(f, s)) : [...a, s]
879
+ m ? a.filter((f) => !X(f, s)) : [...a, s]
880
880
  );
881
881
  };
882
882
  return /* @__PURE__ */ l("div", { children: [
@@ -894,11 +894,11 @@ function Oa({
894
894
  database: i.database || "",
895
895
  schema: i.schema || ""
896
896
  }, m = a.some(
897
- (f) => J(f, s)
897
+ (f) => X(f, s)
898
898
  );
899
899
  return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l("label", { className: "flex cursor-pointer items-start gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
900
900
  /* @__PURE__ */ t(
901
- Ge,
901
+ Ue,
902
902
  {
903
903
  checked: m,
904
904
  onCheckedChange: () => c(i),
@@ -958,7 +958,7 @@ function an({
958
958
  o(c)
959
959
  ] });
960
960
  }
961
- function Ue(e, n, a, o = !0) {
961
+ function Ge(e, n, a, o = !0) {
962
962
  const { tokenProps: u } = ct(), d = ut((i) => i.authToken), c = Q(
963
963
  () => Object.fromEntries(
964
964
  Object.entries(n).filter(([, i]) => i !== void 0)
@@ -1048,7 +1048,7 @@ function Cr({
1048
1048
  var Se, me;
1049
1049
  const { tokenProps: d } = ct(), c = d.config, i = d.semanticDomainAccess || Pn, [s, m] = H([]), [f, w] = H(""), [y, h] = H("all"), [N, k] = H(
1050
1050
  void 0
1051
- ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, P = O === "include" || O === "exclude" || !T, X = O !== "all", p = T && !P, I = P ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1051
+ ), _ = Ae(!1), { updateDataSource: D } = Rt(), j = u ?? D, O = i.mode, T = (c == null ? void 0 : c.showDirectSource) !== !1, P = O === "include" || O === "exclude" || !T, Z = O !== "all", p = T && !P, I = P ? "semanticDomain" : a.mode, A = !T, S = O === "include" && (((Se = i.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = i.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
1052
1052
  ($) => {
1053
1053
  _.current = !0, j({
1054
1054
  ...a,
@@ -1075,7 +1075,7 @@ function Cr({
1075
1075
  v("semanticDomain");
1076
1076
  return;
1077
1077
  }
1078
- if (!X || I !== "semanticDomain") return;
1078
+ if (!Z || I !== "semanticDomain") return;
1079
1079
  const $ = i.domainIds ?? [], ae = (((b = a.selectedEntities) == null ? void 0 : b.length) ?? 0) > 0, r = ((s == null ? void 0 : s.length) ?? 0) > 0;
1080
1080
  Ca({
1081
1081
  mode: O,
@@ -1088,7 +1088,7 @@ function Cr({
1088
1088
  }), r && m([]));
1089
1089
  }, [
1090
1090
  P,
1091
- X,
1091
+ Z,
1092
1092
  I,
1093
1093
  a.mode,
1094
1094
  a.semanticDomainId,
@@ -1111,7 +1111,7 @@ function Cr({
1111
1111
  }, [e, o, P]);
1112
1112
  const q = ($) => {
1113
1113
  _.current = !0, m(
1114
- s.filter((ae) => !J(ae, $))
1114
+ s.filter((ae) => !X(ae, $))
1115
1115
  );
1116
1116
  }, C = ne(
1117
1117
  ($, ae) => {
@@ -1120,7 +1120,7 @@ function Cr({
1120
1120
  );
1121
1121
  },
1122
1122
  []
1123
- ), Z = () => {
1123
+ ), J = () => {
1124
1124
  var ae, r;
1125
1125
  const $ = Ye(s) ?? N ?? I;
1126
1126
  if ($ === "semanticDomain") {
@@ -1155,7 +1155,7 @@ function Cr({
1155
1155
  });
1156
1156
  }
1157
1157
  n(!1);
1158
- }, { semanticDomains: V } = Zt(), { connections: z } = Vt(), K = Q(
1158
+ }, { semanticDomains: V } = Jt(), { connections: z } = Vt(), K = Q(
1159
1159
  () => new Map(
1160
1160
  V.map(($) => [
1161
1161
  $.id,
@@ -1163,7 +1163,7 @@ function Cr({
1163
1163
  ])
1164
1164
  ),
1165
1165
  [V]
1166
- ), G = ($) => {
1166
+ ), U = ($) => {
1167
1167
  h($), $ === "semantic" || $.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : ($ === "direct" || $.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
1168
1168
  }, ee = y.startsWith("domain:"), te = y.startsWith("conn:"), Be = ee ? y.slice(7) : void 0, We = te ? y.slice(5) : void 0, oe = !p || y === "all" || y === "semantic" || ee, Te = T && !P && (y === "all" || y === "direct" || te), ue = ((o == null ? void 0 : o.length) ?? 0) > 0, Ce = s.length === 0 && !ue, we = s.length === 0 && ue ? "Clear" : "Add", ke = A ? "Select dataset" : "Add data";
1169
1169
  return /* @__PURE__ */ t(Nn, { open: e, onOpenChange: n, children: /* @__PURE__ */ l(
@@ -1222,7 +1222,7 @@ function Cr({
1222
1222
  {
1223
1223
  label: "All",
1224
1224
  active: y === "all",
1225
- onClick: () => G("all")
1225
+ onClick: () => U("all")
1226
1226
  }
1227
1227
  ),
1228
1228
  (V.length > 0 || z.length > 0) && /* @__PURE__ */ l(fe, { children: [
@@ -1231,7 +1231,7 @@ function Cr({
1231
1231
  {
1232
1232
  label: "Semantic",
1233
1233
  active: y === "semantic",
1234
- onClick: () => G("semantic")
1234
+ onClick: () => U("semantic")
1235
1235
  }
1236
1236
  ),
1237
1237
  /* @__PURE__ */ t(
@@ -1239,7 +1239,7 @@ function Cr({
1239
1239
  {
1240
1240
  label: "Direct",
1241
1241
  active: y === "direct",
1242
- onClick: () => G("direct")
1242
+ onClick: () => U("direct")
1243
1243
  }
1244
1244
  ),
1245
1245
  /* @__PURE__ */ t("span", { className: "shrink-0 px-0.5 text-muted-foreground/50", children: "·" })
@@ -1249,7 +1249,7 @@ function Cr({
1249
1249
  {
1250
1250
  label: $.label || $.name,
1251
1251
  active: y === `domain:${$.id}`,
1252
- onClick: () => G(`domain:${$.id}`)
1252
+ onClick: () => U(`domain:${$.id}`)
1253
1253
  },
1254
1254
  `domain:${$.id}`
1255
1255
  )),
@@ -1258,7 +1258,7 @@ function Cr({
1258
1258
  {
1259
1259
  label: $.name,
1260
1260
  active: y === `conn:${$.id}`,
1261
- onClick: () => G(`conn:${$.id}`)
1261
+ onClick: () => U(`conn:${$.id}`)
1262
1262
  },
1263
1263
  `conn:${$.id}`
1264
1264
  ))
@@ -1308,7 +1308,7 @@ function Cr({
1308
1308
  "button",
1309
1309
  {
1310
1310
  type: "button",
1311
- onClick: Z,
1311
+ onClick: J,
1312
1312
  disabled: Ce,
1313
1313
  className: M(
1314
1314
  "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-2.5 text-[12px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
@@ -1471,7 +1471,7 @@ const za = xn(
1471
1471
  ...s
1472
1472
  }, m) => /* @__PURE__ */ t(at, { children: /* @__PURE__ */ l(rt, { delayDuration: d, children: [
1473
1473
  /* @__PURE__ */ t(st, { asChild: !0, children: /* @__PURE__ */ t(
1474
- U,
1474
+ G,
1475
1475
  {
1476
1476
  disabled: i,
1477
1477
  ref: m,
@@ -1503,17 +1503,17 @@ const za = xn(
1503
1503
  za.displayName = "IconButton";
1504
1504
  function Ma(e, n) {
1505
1505
  var s, m;
1506
- const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Jn(e), c = Xn(
1506
+ const a = e.qualifiedFieldName || e.name, o = e.qualifiedFieldName ? e.qualifiedFieldName.split(".").slice(0, -1).join(".") : e.qualifiedEntityName || e.entityName, u = n.connectionId || ((s = n.dataSource) == null ? void 0 : s.connectionId) || "", d = Xn(e), c = Zn(
1507
1507
  n.dataSource,
1508
1508
  {
1509
1509
  connectionId: u,
1510
1510
  connectionType: (m = n.dataSource) == null ? void 0 : m.connectionType
1511
1511
  },
1512
1512
  e
1513
- ), i = Zn(n.dataSource, c, e) || "";
1513
+ ), i = Jn(n.dataSource, c, e) || "";
1514
1514
  return {
1515
1515
  column: a,
1516
- title: Xt(e),
1516
+ title: Zt(e),
1517
1517
  dataType: e.dataType,
1518
1518
  ...e.nativeDataType ? { nativeDataType: e.nativeDataType } : {},
1519
1519
  table: e.entityName || "",
@@ -1650,9 +1650,9 @@ function Tt(e) {
1650
1650
  /* @__PURE__ */ t(
1651
1651
  je,
1652
1652
  {
1653
- secondary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: f, children: "Back" }),
1653
+ secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: f, children: "Back" }),
1654
1654
  primary: /* @__PURE__ */ t(
1655
- U,
1655
+ G,
1656
1656
  {
1657
1657
  type: "button",
1658
1658
  size: "xs",
@@ -1665,7 +1665,7 @@ function Tt(e) {
1665
1665
  )
1666
1666
  ] });
1667
1667
  }
1668
- const Ga = /* @__PURE__ */ new Set([
1668
+ const Ua = /* @__PURE__ */ new Set([
1669
1669
  "grain_selector",
1670
1670
  "aggregation_selector",
1671
1671
  "field_selector",
@@ -1704,7 +1704,7 @@ function At(e) {
1704
1704
  onBack: i,
1705
1705
  onCancel: s,
1706
1706
  onDone: m
1707
- } = e, f = Ga.has(n.type), w = o.match(/\[\[param\.(.+?)\]\]/), y = w ? `{{ param('${w[1]}') }}` : "";
1707
+ } = e, f = Ua.has(n.type), w = o.match(/\[\[param\.(.+?)\]\]/), y = w ? `{{ param('${w[1]}') }}` : "";
1708
1708
  return /* @__PURE__ */ l("div", { className: "space-y-4", children: [
1709
1709
  /* @__PURE__ */ t(
1710
1710
  ja,
@@ -1758,14 +1758,14 @@ function At(e) {
1758
1758
  /* @__PURE__ */ t(
1759
1759
  je,
1760
1760
  {
1761
- secondary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: i, children: "Back" }),
1762
- tertiary: /* @__PURE__ */ t(U, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
1763
- primary: /* @__PURE__ */ t(U, { type: "button", size: "xs", onClick: m, children: "Done" })
1761
+ secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: i, children: "Back" }),
1762
+ tertiary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
1763
+ primary: /* @__PURE__ */ t(G, { type: "button", size: "xs", onClick: m, children: "Done" })
1764
1764
  }
1765
1765
  )
1766
1766
  ] });
1767
1767
  }
1768
- function Ua(e) {
1768
+ function Ga(e) {
1769
1769
  const n = $e(
1770
1770
  e.scope,
1771
1771
  e.existingControls,
@@ -1815,7 +1815,7 @@ function Sr({
1815
1815
  [a]
1816
1816
  ), D = oa(e), j = ea(e), [O, T] = H(
1817
1817
  null
1818
- ), [P, X] = H(
1818
+ ), [P, Z] = H(
1819
1819
  null
1820
1820
  ), [p, I] = H(
1821
1821
  () => c ? {
@@ -1844,7 +1844,7 @@ function Sr({
1844
1844
  ), C = ne(
1845
1845
  (r) => e === "dashboard" && (r === "field_selector" || r === "metric_selector"),
1846
1846
  [e]
1847
- ), Z = Q(
1847
+ ), J = Q(
1848
1848
  () => p ? wt(
1849
1849
  f || [],
1850
1850
  p.control.type
@@ -1890,7 +1890,7 @@ function Sr({
1890
1890
  v.current = c, r && (I({
1891
1891
  step: 1,
1892
1892
  control: $e(e, n, Array.from(_))
1893
- }), X(null), T(null));
1893
+ }), Z(null), T(null));
1894
1894
  }, [n, c, _, e]);
1895
1895
  const z = (r) => {
1896
1896
  if (!C(r.type))
@@ -1947,7 +1947,7 @@ function Sr({
1947
1947
  nextControl: L,
1948
1948
  cardBindingsById: R
1949
1949
  };
1950
- }, G = ne(
1950
+ }, U = ne(
1951
1951
  (r, g = o, b = { type: "update" }) => {
1952
1952
  const L = r.map((R) => (Qe({
1953
1953
  control: R,
@@ -2000,7 +2000,7 @@ function Sr({
2000
2000
  (bt) => bt.id === r ? { ...B, defaultValue: ie } : bt
2001
2001
  );
2002
2002
  }
2003
- G(L, Y, {
2003
+ U(L, Y, {
2004
2004
  type: "update",
2005
2005
  cardBindingsById: E,
2006
2006
  affectedBindingControlIds: F
@@ -2017,7 +2017,7 @@ function Sr({
2017
2017
  (E) => E.id === r ? { ...E, id: b } : E
2018
2018
  );
2019
2019
  if (!o) {
2020
- G(L, void 0, {
2020
+ U(L, void 0, {
2021
2021
  type: "rename",
2022
2022
  oldId: r,
2023
2023
  newId: b
@@ -2025,7 +2025,7 @@ function Sr({
2025
2025
  return;
2026
2026
  }
2027
2027
  const R = { ...o };
2028
- Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]), G(L, R, {
2028
+ Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]), U(L, R, {
2029
2029
  type: "rename",
2030
2030
  oldId: r,
2031
2031
  newId: b
@@ -2033,16 +2033,16 @@ function Sr({
2033
2033
  }, Be = (r) => {
2034
2034
  const g = n.filter((L) => L.id !== r);
2035
2035
  if (!o) {
2036
- G(g, void 0, { type: "remove", controlId: r });
2036
+ U(g, void 0, { type: "remove", controlId: r });
2037
2037
  return;
2038
2038
  }
2039
2039
  const b = { ...o };
2040
- delete b[r], G(g, b, { type: "remove", controlId: r });
2040
+ delete b[r], U(g, b, { type: "remove", controlId: r });
2041
2041
  }, We = ne(() => {
2042
2042
  S.current = void 0, I({
2043
2043
  step: 1,
2044
2044
  control: $e(e, n, Array.from(_))
2045
- }), X(null), T(null);
2045
+ }), Z(null), T(null);
2046
2046
  }, [n, _, e]), oe = (r) => {
2047
2047
  I(
2048
2048
  (g) => g && (() => {
@@ -2134,7 +2134,7 @@ function Sr({
2134
2134
  );
2135
2135
  if (o) {
2136
2136
  const L = { ...o };
2137
- b === void 0 ? delete L[g] : L[g] = b, G(
2137
+ b === void 0 ? delete L[g] : L[g] = b, U(
2138
2138
  [
2139
2139
  ...n,
2140
2140
  {
@@ -2149,7 +2149,7 @@ function Sr({
2149
2149
  }
2150
2150
  );
2151
2151
  } else
2152
- G(
2152
+ U(
2153
2153
  [
2154
2154
  ...n,
2155
2155
  {
@@ -2163,8 +2163,8 @@ function Sr({
2163
2163
  cardBindingsById: p.cardBindingsById
2164
2164
  }
2165
2165
  );
2166
- X(g), I(null), k == null || k();
2167
- }, [n, p, o, G, k]), gt = p ? C(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${sa(p.control.label) || p.control.id}]]` : "", me = St({
2166
+ Z(g), I(null), k == null || k();
2167
+ }, [n, p, o, U, k]), gt = p ? C(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${sa(p.control.label) || p.control.id}]]` : "", me = St({
2168
2168
  controls: n,
2169
2169
  defaultValues: o
2170
2170
  }), $ = p ? [...n, p.control] : n, ae = p ? St({
@@ -2207,7 +2207,7 @@ function Sr({
2207
2207
  type: "button",
2208
2208
  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",
2209
2209
  onClick: () => I(
2210
- Ua({
2210
+ Ga({
2211
2211
  scope: e,
2212
2212
  existingControls: n,
2213
2213
  reservedIds: Array.from(_),
@@ -2235,7 +2235,7 @@ function Sr({
2235
2235
  je,
2236
2236
  {
2237
2237
  secondary: /* @__PURE__ */ t(
2238
- U,
2238
+ G,
2239
2239
  {
2240
2240
  type: "button",
2241
2241
  variant: "outline",
@@ -2262,7 +2262,7 @@ function Sr({
2262
2262
  ),
2263
2263
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
2264
2264
  ] }),
2265
- 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((r) => {
2265
+ 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((r) => {
2266
2266
  const g = (p.selectedCardIds || []).includes(r.cardId);
2267
2267
  return /* @__PURE__ */ l(
2268
2268
  "label",
@@ -2270,7 +2270,7 @@ function Sr({
2270
2270
  className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
2271
2271
  children: [
2272
2272
  /* @__PURE__ */ t(
2273
- Ge,
2273
+ Ue,
2274
2274
  {
2275
2275
  checked: g,
2276
2276
  onCheckedChange: (b) => I(
@@ -2298,7 +2298,7 @@ function Sr({
2298
2298
  /* @__PURE__ */ t(
2299
2299
  yt,
2300
2300
  {
2301
- participants: Z,
2301
+ participants: J,
2302
2302
  selectedCardIds: p.selectedCardIds || [],
2303
2303
  control: p.control,
2304
2304
  selected: p.matrixTargetIds,
@@ -2309,7 +2309,7 @@ function Sr({
2309
2309
  je,
2310
2310
  {
2311
2311
  secondary: /* @__PURE__ */ t(
2312
- U,
2312
+ G,
2313
2313
  {
2314
2314
  type: "button",
2315
2315
  variant: "outline",
@@ -2325,7 +2325,7 @@ function Sr({
2325
2325
  }
2326
2326
  ),
2327
2327
  primary: /* @__PURE__ */ t(
2328
- U,
2328
+ G,
2329
2329
  {
2330
2330
  type: "button",
2331
2331
  size: "xs",
@@ -2458,7 +2458,7 @@ function Sr({
2458
2458
  {
2459
2459
  type: "button",
2460
2460
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
2461
- onClick: () => X(
2461
+ onClick: () => Z(
2462
2462
  (F) => F === r.id ? null : r.id
2463
2463
  ),
2464
2464
  children: [
@@ -2478,7 +2478,7 @@ function Sr({
2478
2478
  }
2479
2479
  ),
2480
2480
  /* @__PURE__ */ t(
2481
- U,
2481
+ G,
2482
2482
  {
2483
2483
  type: "button",
2484
2484
  size: "xs",
@@ -2520,7 +2520,7 @@ function Sr({
2520
2520
  nextType: F,
2521
2521
  defaultValues: o
2522
2522
  });
2523
- G(B.controls, B.defaultValues);
2523
+ U(B.controls, B.defaultValues);
2524
2524
  },
2525
2525
  children: [
2526
2526
  /* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
@@ -2577,7 +2577,7 @@ function Sr({
2577
2577
  }), Y = n.map(
2578
2578
  (W) => W.id === r.id ? B.nextControl : W
2579
2579
  );
2580
- G(Y, o, {
2580
+ U(Y, o, {
2581
2581
  type: "update",
2582
2582
  cardBindingsById: B.cardBindingsById
2583
2583
  });
@@ -2596,7 +2596,7 @@ function Sr({
2596
2596
  nextSelectedCardIds: (w == null ? void 0 : w[r.id]) || [],
2597
2597
  matrixTargetIds: { [F]: B }
2598
2598
  });
2599
- G(
2599
+ U(
2600
2600
  n.map((W) => W.id === r.id ? Y.nextControl : W),
2601
2601
  o,
2602
2602
  { type: "update", cardBindingsById: Y.cardBindingsById }
@@ -2632,10 +2632,10 @@ function Sr({
2632
2632
  );
2633
2633
  if (r.source.kind === "manual" && (A.current[r.id] = F), o) {
2634
2634
  const Y = { ...o };
2635
- F === void 0 ? delete Y[r.id] : Y[r.id] = F, G(B, Y);
2635
+ F === void 0 ? delete Y[r.id] : Y[r.id] = F, U(B, Y);
2636
2636
  return;
2637
2637
  }
2638
- G(B, void 0);
2638
+ U(B, void 0);
2639
2639
  }
2640
2640
  }
2641
2641
  ),
@@ -2646,7 +2646,7 @@ function Sr({
2646
2646
  onOpenChange: (F) => T(F ? r.id : null),
2647
2647
  children: [
2648
2648
  /* @__PURE__ */ t($n, { asChild: !0, children: /* @__PURE__ */ l(
2649
- U,
2649
+ G,
2650
2650
  {
2651
2651
  type: "button",
2652
2652
  variant: "ghost",
@@ -2714,7 +2714,7 @@ function Sr({
2714
2714
  );
2715
2715
  }),
2716
2716
  !p && /* @__PURE__ */ l(
2717
- U,
2717
+ G,
2718
2718
  {
2719
2719
  type: "button",
2720
2720
  variant: "outline",
@@ -2933,7 +2933,7 @@ function Ka({
2933
2933
  groups: x.groups.map(v)
2934
2934
  };
2935
2935
  d(v(o));
2936
- }, X = (I) => {
2936
+ }, Z = (I) => {
2937
2937
  if (!I || I.conditions.length === 0 && I.groups.length === 0)
2938
2938
  return "-- No filters defined";
2939
2939
  const A = (v) => {
@@ -2943,14 +2943,14 @@ function Ka({
2943
2943
  let C = v.value;
2944
2944
  if (v.latestValue && q === "=")
2945
2945
  return `${x} = ${qt} /* the latest value each time the card runs */`;
2946
- const Z = Yt(v.relativeMeta);
2947
- if (Z && (q === "between" || q === "not between")) {
2948
- const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: K } = zn(Z, {
2946
+ const J = Yt(v.relativeMeta);
2947
+ if (J && (q === "between" || q === "not between")) {
2948
+ const V = q === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: K } = zn(J, {
2949
2949
  tz: (D == null ? void 0 : D.tz) ?? "UTC",
2950
2950
  weekStart: (D == null ? void 0 : D.weekStart) ?? 1,
2951
2951
  anchor: (D == null ? void 0 : D.anchor) ?? "now"
2952
2952
  });
2953
- return K ? `${x} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${z}: dates update each time the card runs */` : Jt(Z).dataAnchored ? `${x} ${V} ${z} /* dates count back from the latest data each time the card runs */` : `${x} ${V} ${z} /* dates follow your calendar each time the card runs */`;
2953
+ return K ? `${x} ${V} '${K.start.toISOString()}' AND '${K.end.toISOString()}' /* ${z}: dates update each time the card runs */` : Xt(J).dataAnchored ? `${x} ${V} ${z} /* dates count back from the latest data each time the card runs */` : `${x} ${V} ${z} /* dates follow your calendar each time the card runs */`;
2954
2954
  }
2955
2955
  if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
2956
2956
  typeof C == "string" ? C = `'${C}'` : Array.isArray(C) && (C = `'${C.join(", ")}'`);
@@ -2990,7 +2990,7 @@ function Ka({
2990
2990
  (z) => S(z)
2991
2991
  ), C = [...x, ...q].filter(Boolean);
2992
2992
  if (C.length === 0) return "";
2993
- const Z = C.join(` ${v.logicalOperator} `), V = C.length > 1 ? `(${Z})` : Z;
2993
+ const J = C.join(` ${v.logicalOperator} `), V = C.length > 1 ? `(${J})` : J;
2994
2994
  return v.negate ? `NOT ${V}` : V;
2995
2995
  };
2996
2996
  return S(I);
@@ -3010,7 +3010,7 @@ function Ka({
3010
3010
  updateGroupNegate: O,
3011
3011
  reorderConditions: T,
3012
3012
  reorderGroups: P,
3013
- generateSQLPreview: X,
3013
+ generateSQLPreview: Z,
3014
3014
  hasAnyFilters: p
3015
3015
  };
3016
3016
  }
@@ -3043,10 +3043,10 @@ function Ha({
3043
3043
  const [d, c] = vt.useState(!1), i = vt.useMemo(
3044
3044
  () => new Set(e ? [e.id] : []),
3045
3045
  [e]
3046
- ), s = e ? Xt(e) : null;
3046
+ ), s = e ? Zt(e) : null;
3047
3047
  return /* @__PURE__ */ l(it, { modal: !0, open: d, onOpenChange: c, children: [
3048
3048
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3049
- U,
3049
+ G,
3050
3050
  {
3051
3051
  variant: "outline",
3052
3052
  size: "xs",
@@ -3106,7 +3106,7 @@ function on(e, n) {
3106
3106
  () => jn({ filter: i }),
3107
3107
  [i]
3108
3108
  );
3109
- return Gn(i, {
3109
+ return Un(i, {
3110
3110
  inputContext: s,
3111
3111
  currentSelectionPolicy: "exclude"
3112
3112
  });
@@ -3132,7 +3132,7 @@ function Pa({
3132
3132
  };
3133
3133
  return /* @__PURE__ */ t("div", { className: M("w-full", d), children: /* @__PURE__ */ l(it, { open: c, onOpenChange: y, modal: !0, children: [
3134
3134
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3135
- U,
3135
+ G,
3136
3136
  {
3137
3137
  variant: "outline",
3138
3138
  size: "xs",
@@ -3228,7 +3228,7 @@ function Ya({
3228
3228
  };
3229
3229
  return /* @__PURE__ */ l(it, { open: c, onOpenChange: w, modal: !0, children: [
3230
3230
  /* @__PURE__ */ t(lt, { asChild: !0, children: /* @__PURE__ */ l(
3231
- U,
3231
+ G,
3232
3232
  {
3233
3233
  variant: "outline",
3234
3234
  size: "xs",
@@ -3278,7 +3278,7 @@ function Ya({
3278
3278
  )
3279
3279
  ] });
3280
3280
  }
3281
- function Ja({
3281
+ function Xa({
3282
3282
  value: e,
3283
3283
  operator: n,
3284
3284
  relativeMeta: a,
@@ -3287,12 +3287,12 @@ function Ja({
3287
3287
  onChange: d,
3288
3288
  className: c
3289
3289
  }) {
3290
- const i = Un(), s = Bn(), m = n === "between" || n === "not between", f = Q(() => {
3290
+ const i = Gn(), s = Bn(), m = n === "between" || n === "not between", f = Q(() => {
3291
3291
  if (!m || !a) return;
3292
3292
  const D = s(a);
3293
3293
  return {
3294
3294
  ...D,
3295
- tooltip: D.dates ? void 0 : Jt(a).dataAnchored ? Wn : Kn
3295
+ tooltip: D.dates ? void 0 : Xt(a).dataAnchored ? Wn : Kn
3296
3296
  };
3297
3297
  }, [m, a, s]), w = Q(() => {
3298
3298
  if (m) {
@@ -3358,13 +3358,13 @@ function Ja({
3358
3358
  }
3359
3359
  );
3360
3360
  }
3361
- const Xa = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3361
+ const Za = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3362
3362
  "contains",
3363
3363
  "startsWith",
3364
3364
  "endsWith",
3365
3365
  "like",
3366
3366
  "not like"
3367
- ], Za = [
3367
+ ], Ja = [
3368
3368
  "=",
3369
3369
  "!=",
3370
3370
  ">",
@@ -3425,7 +3425,7 @@ const Xa = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
3425
3425
  isNotNull: "Is not null",
3426
3426
  "not between": "Not between"
3427
3427
  };
3428
- function Je(e) {
3428
+ function Xe(e) {
3429
3429
  return rr[e] || ga(e);
3430
3430
  }
3431
3431
  function sr(e) {
@@ -3439,7 +3439,7 @@ function sr(e) {
3439
3439
  case "date":
3440
3440
  return ar;
3441
3441
  default:
3442
- return Za;
3442
+ return Ja;
3443
3443
  }
3444
3444
  }
3445
3445
  const ln = "w-[68px] shrink-0", $t = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", xt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
@@ -3490,8 +3490,8 @@ function cn({
3490
3490
  transform: h,
3491
3491
  transition: N,
3492
3492
  isDragging: k
3493
- } = Gt({ id: e.id }), _ = {
3494
- transform: Ut.Transform.toString(h),
3493
+ } = Ut({ id: e.id }), _ = {
3494
+ transform: Gt.Transform.toString(h),
3495
3495
  transition: N
3496
3496
  }, D = qe(e.field.dataType), j = e.operator === "isNull" || e.operator === "isNotNull", O = e.operator === "in" || e.operator === "not in";
3497
3497
  return /* @__PURE__ */ l(
@@ -3555,10 +3555,10 @@ function cn({
3555
3555
  size: "xs",
3556
3556
  "aria-label": "Operator",
3557
3557
  className: M("w-40 shrink-0", $t),
3558
- children: /* @__PURE__ */ t(be, { children: e.operator ? Je(e.operator) : "" })
3558
+ children: /* @__PURE__ */ t(be, { children: e.operator ? Xe(e.operator) : "" })
3559
3559
  }
3560
3560
  ),
3561
- /* @__PURE__ */ t(ve, { children: sr(D).map((T) => /* @__PURE__ */ t(re, { value: T, children: Je(T) }, T)) })
3561
+ /* @__PURE__ */ t(ve, { children: sr(D).map((T) => /* @__PURE__ */ t(re, { value: T, children: Xe(T) }, T)) })
3562
3562
  ]
3563
3563
  }
3564
3564
  ),
@@ -3583,7 +3583,7 @@ function cn({
3583
3583
  value: T.target.value
3584
3584
  }),
3585
3585
  className: "min-w-0 flex-1",
3586
- placeholder: `${Je(e.operator)}…`
3586
+ placeholder: `${Xe(e.operator)}…`
3587
3587
  }
3588
3588
  ) : /* @__PURE__ */ t(
3589
3589
  Ya,
@@ -3616,7 +3616,7 @@ function cn({
3616
3616
  // - Handles different operators (=, !=, >, <, between, in, etc.)
3617
3617
  // - Saves relative choices ("This month") with the range
3618
3618
  /* @__PURE__ */ t(
3619
- Ja,
3619
+ Xa,
3620
3620
  {
3621
3621
  value: e.value,
3622
3622
  operator: e.operator,
@@ -3644,7 +3644,7 @@ function cn({
3644
3644
  }
3645
3645
  ),
3646
3646
  /* @__PURE__ */ t(
3647
- U,
3647
+ G,
3648
3648
  {
3649
3649
  variant: "ghost",
3650
3650
  size: "xs",
@@ -3665,7 +3665,7 @@ function un({
3665
3665
  }) {
3666
3666
  return /* @__PURE__ */ l("div", { className: "mt-2 flex items-center gap-1.5 group-data-[inline]/filters:mt-1 group-data-[inline]/filters:gap-3", children: [
3667
3667
  /* @__PURE__ */ l(
3668
- U,
3668
+ G,
3669
3669
  {
3670
3670
  type: "button",
3671
3671
  size: "xs",
@@ -3679,7 +3679,7 @@ function un({
3679
3679
  }
3680
3680
  ),
3681
3681
  n && /* @__PURE__ */ l(
3682
- U,
3682
+ G,
3683
3683
  {
3684
3684
  type: "button",
3685
3685
  size: "xs",
@@ -3719,8 +3719,8 @@ function or({
3719
3719
  transform: O,
3720
3720
  transition: T,
3721
3721
  isDragging: P
3722
- } = Gt({ id: e.id }), X = {
3723
- transform: Ut.Transform.toString(O),
3722
+ } = Ut({ id: e.id }), Z = {
3723
+ transform: Gt.Transform.toString(O),
3724
3724
  transition: T
3725
3725
  }, p = (A) => {
3726
3726
  const { active: S, over: v } = A;
@@ -3743,7 +3743,7 @@ function or({
3743
3743
  "div",
3744
3744
  {
3745
3745
  ref: j,
3746
- style: X,
3746
+ style: Z,
3747
3747
  className: M(
3748
3748
  n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
3749
3749
  P && "z-50 opacity-50"
@@ -3763,7 +3763,7 @@ function or({
3763
3763
  }
3764
3764
  ),
3765
3765
  /* @__PURE__ */ t(
3766
- U,
3766
+ G,
3767
3767
  {
3768
3768
  type: "button",
3769
3769
  variant: e.negate ? "default" : "outline",
@@ -3785,7 +3785,7 @@ function or({
3785
3785
  /* @__PURE__ */ t("span", { className: xt, children: "Group" })
3786
3786
  ] }),
3787
3787
  /* @__PURE__ */ t(
3788
- U,
3788
+ G,
3789
3789
  {
3790
3790
  type: "button",
3791
3791
  variant: "ghost",
@@ -3801,10 +3801,10 @@ function or({
3801
3801
  /* @__PURE__ */ t(
3802
3802
  Re,
3803
3803
  {
3804
- sensors: Xe(
3804
+ sensors: Ze(
3805
3805
  he(tt),
3806
3806
  he(et, {
3807
- coordinateGetter: Ze
3807
+ coordinateGetter: Je
3808
3808
  })
3809
3809
  ),
3810
3810
  collisionDetection: Ee,
@@ -3837,10 +3837,10 @@ function or({
3837
3837
  /* @__PURE__ */ t(
3838
3838
  Re,
3839
3839
  {
3840
- sensors: Xe(
3840
+ sensors: Ze(
3841
3841
  he(tt),
3842
3842
  he(et, {
3843
- coordinateGetter: Ze
3843
+ coordinateGetter: Je
3844
3844
  })
3845
3845
  ),
3846
3846
  collisionDetection: Ee,
@@ -3894,21 +3894,21 @@ function Ir({
3894
3894
  reorderConditions: O,
3895
3895
  reorderGroups: T,
3896
3896
  generateSQLPreview: P,
3897
- hasAnyFilters: X
3897
+ hasAnyFilters: Z
3898
3898
  } = Ka({
3899
3899
  initialFilters: e,
3900
3900
  availableFields: n,
3901
3901
  ...c ? {
3902
- onChange: (x) => c(Xa(x) ? x : null)
3902
+ onChange: (x) => c(Za(x) ? x : null)
3903
3903
  } : {}
3904
- }), p = Xe(
3904
+ }), p = Ze(
3905
3905
  he(tt),
3906
3906
  he(et, {
3907
- coordinateGetter: Ze
3907
+ coordinateGetter: Je
3908
3908
  })
3909
3909
  ), [I, A] = H(!1), S = (x, q = 0, C) => {
3910
3910
  if (q === 0) {
3911
- const Z = x.conditions.length === 0 && x.groups.length === 0;
3911
+ const J = x.conditions.length === 0 && x.groups.length === 0;
3912
3912
  return /* @__PURE__ */ l("div", { children: [
3913
3913
  /* @__PURE__ */ t(
3914
3914
  Re,
@@ -3918,12 +3918,12 @@ function Ir({
3918
3918
  onDragEnd: (V) => {
3919
3919
  const { active: z, over: K } = V;
3920
3920
  if (K && z.id !== K.id) {
3921
- const G = x.conditions.findIndex(
3921
+ const U = x.conditions.findIndex(
3922
3922
  (te) => te.id === z.id
3923
3923
  ), ee = x.conditions.findIndex(
3924
3924
  (te) => te.id === K.id
3925
3925
  );
3926
- G !== -1 && ee !== -1 && O(x.id, G, ee);
3926
+ U !== -1 && ee !== -1 && O(x.id, U, ee);
3927
3927
  }
3928
3928
  },
3929
3929
  children: /* @__PURE__ */ t(
@@ -3959,12 +3959,12 @@ function Ir({
3959
3959
  onDragEnd: (V) => {
3960
3960
  const { active: z, over: K } = V;
3961
3961
  if (K && z.id !== K.id) {
3962
- const G = x.groups.findIndex(
3962
+ const U = x.groups.findIndex(
3963
3963
  (te) => te.id === z.id
3964
3964
  ), ee = x.groups.findIndex(
3965
3965
  (te) => te.id === K.id
3966
3966
  );
3967
- G !== -1 && ee !== -1 && T(x.id, G, ee);
3967
+ U !== -1 && ee !== -1 && T(x.id, U, ee);
3968
3968
  }
3969
3969
  },
3970
3970
  children: /* @__PURE__ */ t(
@@ -3979,7 +3979,7 @@ function Ir({
3979
3979
  )
3980
3980
  }
3981
3981
  ),
3982
- Z && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
3982
+ J && !i && /* @__PURE__ */ t("p", { className: "rounded-control border border-dashed border-border/60 px-3 py-2 text-center text-[11.5px] text-muted-foreground", children: "No filters yet. Add a condition to limit the rows this card shows." }),
3983
3983
  /* @__PURE__ */ t(
3984
3984
  un,
3985
3985
  {
@@ -4042,14 +4042,14 @@ function Ir({
4042
4042
  ),
4043
4043
  /* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
4044
4044
  ] }),
4045
- X && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4045
+ Z && !i && /* @__PURE__ */ l("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
4046
4046
  /* @__PURE__ */ t("div", { className: M("mb-1.5", xt), children: "Where clause" }),
4047
4047
  /* @__PURE__ */ t("pre", { className: "overflow-x-auto whitespace-pre-wrap break-words rounded-[6px] border border-border bg-muted/40 px-3 py-2 font-mono text-[12px] leading-[1.55] text-foreground", children: P(s) })
4048
4048
  ] })
4049
4049
  ] }),
4050
4050
  i ? null : /* @__PURE__ */ l("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border px-3 py-2.5", children: [
4051
4051
  /* @__PURE__ */ t("div", { children: v > 0 && /* @__PURE__ */ t(
4052
- U,
4052
+ G,
4053
4053
  {
4054
4054
  size: "xs",
4055
4055
  variant: "ghost",
@@ -4059,12 +4059,12 @@ function Ir({
4059
4059
  }
4060
4060
  ) }),
4061
4061
  /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
4062
- /* @__PURE__ */ t(U, { size: "xs", variant: "ghost", onClick: () => d == null ? void 0 : d(), children: "Cancel" }),
4062
+ /* @__PURE__ */ t(G, { size: "xs", variant: "ghost", onClick: () => d == null ? void 0 : d(), children: "Cancel" }),
4063
4063
  /* @__PURE__ */ t(
4064
- U,
4064
+ G,
4065
4065
  {
4066
4066
  size: "xs",
4067
- onClick: () => o == null ? void 0 : o(X ? s : null),
4067
+ onClick: () => o == null ? void 0 : o(Z ? s : null),
4068
4068
  children: "Apply filters"
4069
4069
  }
4070
4070
  )
@@ -4081,7 +4081,7 @@ export {
4081
4081
  kr as V,
4082
4082
  wr as a,
4083
4083
  Ir as b,
4084
- Zt as c,
4084
+ Jt as c,
4085
4085
  Ma as d,
4086
4086
  Va as g,
4087
4087
  en as i,