react-semaphor 0.1.502 → 0.1.503

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 (33) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/chunks/dashboard-briefing-launcher-CHMQi0pU.cjs +21 -0
  4. package/dist/chunks/{dashboard-briefing-launcher-BeSH0Fcx.js → dashboard-briefing-launcher-COqlnnQ2.js} +716 -686
  5. package/dist/chunks/{dashboard-controls-CMrdk5DH.js → dashboard-controls-Bp6XzVvx.js} +102 -101
  6. package/dist/chunks/{dashboard-controls-CJKV_UEh.cjs → dashboard-controls-D8z05ZfX.cjs} +3 -3
  7. package/dist/chunks/{dashboard-json-Dtt-ZcDP.cjs → dashboard-json-DcvkxkL3.cjs} +1 -1
  8. package/dist/chunks/{dashboard-json-Hp3rxYdE.js → dashboard-json-Dw7kHCe5.js} +2 -2
  9. package/dist/chunks/{edit-dashboard-visual-DriCPFXz.js → edit-dashboard-visual-D5vvLzkS.js} +3 -3
  10. package/dist/chunks/{edit-dashboard-visual-BxsmmZ0X.cjs → edit-dashboard-visual-olfXEK5D.cjs} +1 -1
  11. package/dist/chunks/{editor-action-buttons-aAD93tZz.cjs → editor-action-buttons-BsWibSiV.cjs} +1 -1
  12. package/dist/chunks/{editor-action-buttons-Ld5MY-XV.js → editor-action-buttons-DYiJr5u3.js} +2 -2
  13. package/dist/chunks/index-C3rUIii0.cjs +1417 -0
  14. package/dist/chunks/{index-tzbGUY7m.js → index-ZKSLtc9_.js} +30168 -29888
  15. package/dist/chunks/{report-preferences-dialog-CabpgTu7.js → report-preferences-dialog-BXaILrOK.js} +2 -2
  16. package/dist/chunks/{report-preferences-dialog-Dtz8hYSB.cjs → report-preferences-dialog-BZvi_3DV.cjs} +1 -1
  17. package/dist/chunks/{switch-Lw3Hbryg.js → switch-DWM8d-UR.js} +5 -0
  18. package/dist/chunks/{switch-6The8BTM.cjs → switch-Dej7zCoP.cjs} +1 -1
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/data-app-builder/index.cjs +1 -1
  22. package/dist/data-app-builder/index.js +2 -2
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +6 -6
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/dashboard.d.ts +11 -0
  28. package/dist/types/main.d.ts +14 -1
  29. package/dist/types/surfboard.d.ts +11 -0
  30. package/dist/types/types.d.ts +11 -0
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-briefing-launcher-CkyDaDQm.cjs +0 -21
  33. package/dist/chunks/index-CriMt9Bn.cjs +0 -1417
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as o, Fragment as T } from "react/jsx-runtime";
2
- import { u as S, B as U, aB as lt, z as nr, O as aa, Z as na, c as ie, aC as sa, aD as oa, aE as nt, a4 as C, aF as ye, aG as ut, aH as sr, L as Be, aI as or, aJ as ia, D as Ft, Q as $t, V as Gt, W as Bt, Y as Ht, X as da, i as ca, aK as la } from "./switch-Lw3Hbryg.js";
3
- import { bw as ua, bx as ma, ay as q, aF as ir, by as pa, aX as Q, aG as dr, aH as ha, aI as st, aJ as ot, aE as fa, bz as ve, bA as Ge, bB as ga, bC as zt, bD as cr, bE as lr, bF as ba, bG as mt, bH as xa, bI as va, bJ as ya, bK as wa, bL as Na, bM as Sa, b6 as we, bN as Ne, bO as Da, bP as ur, bk as pt, bQ as Ca, bR as ka, bS as mr, bT as Ea, bU as pr, bV as V, bW as La, ao as Ia, bX as Ma, bY as Aa, bZ as Pa, b_ as Oa, m as _a, u as Fe, s as Ra, n as tt, b$ as Ua, c0 as Va, c1 as Ta, c2 as Fa, L as $a, c3 as Ga, c4 as Ba, I as jt, c5 as Ha, c6 as za, c7 as ja, c8 as qa, c9 as qt, ca as Kt, cb as Qt, cc as Ka, cd as Qa, ce as Wa, cf as Ja, a$ as Wt, cg as Xa, ch as Ya, ci as Za, r as en, cj as tn, aN as rn, aQ as an, aR as nn, aS as sn, aT as on, aU as dn, aV as cn, aW as Jt } from "./index-tzbGUY7m.js";
2
+ import { u as S, B as U, aB as lt, z as nr, O as aa, Z as na, c as ie, aC as sa, aD as oa, aE as nt, a4 as C, aF as ye, aG as ut, aH as sr, L as Be, aI as or, aJ as ia, D as Ft, Q as $t, V as Gt, W as Bt, Y as Ht, X as da, i as ca, aK as la } from "./switch-DWM8d-UR.js";
3
+ import { bw as ua, bx as ma, ay as q, aF as ir, by as pa, aX as Q, aG as dr, aH as ha, aI as st, aJ as ot, aE as fa, bz as ve, bA as Ge, bB as ga, bC as zt, bD as cr, bE as lr, bF as ba, bG as mt, bH as xa, bI as va, bJ as ya, bK as wa, bL as Na, bM as Sa, b6 as we, bN as Ne, bO as Da, bP as ur, bk as pt, bQ as Ca, bR as ka, bS as mr, bT as Ea, bU as pr, bV as V, bW as La, ao as Ia, bX as Ma, bY as Aa, bZ as Pa, b_ as Oa, m as _a, u as Fe, s as Ra, n as tt, b$ as Ua, c0 as Va, c1 as Ta, c2 as Fa, L as $a, c3 as Ga, c4 as Ba, I as jt, c5 as Ha, c6 as za, c7 as ja, c8 as qa, c9 as qt, ca as Kt, cb as Qt, cc as Ka, cd as Qa, ce as Wa, cf as Ja, a$ as Wt, cg as Xa, ch as Ya, ci as Za, r as en, cj as tn, aN as rn, aQ as an, aR as nn, aS as sn, aT as on, aU as dn, aV as cn, aW as Jt } from "./index-ZKSLtc9_.js";
4
4
  import { c as te, X as hr, C as ln } from "./x-CXDkqdur.js";
5
5
  import "./constants-CTRduy1g.js";
6
6
  import "./validators-CHlnnHuS.js";
@@ -17,11 +17,11 @@ import "./color-CJvdlFM_.js";
17
17
  import { createPortal as mn } from "react-dom";
18
18
  import "./index-BVIet238.js";
19
19
  import "./appearance-runtime-provider-D0xVQWnH.js";
20
- import { d as pn, c as hn, u as fn, A as gn, a as bn, g as xn, V as vn, N as yn, h as wn, U as Nn } from "./dashboard-briefing-launcher-BeSH0Fcx.js";
20
+ import { d as pn, c as hn, u as fn, A as gn, a as bn, g as xn, V as vn, N as yn, h as wn, U as Nn } from "./dashboard-briefing-launcher-COqlnnQ2.js";
21
21
  import { S as Sn, C as Dn } from "./search-BHsQIWBV.js";
22
22
  import { d as gr } from "./semantic-format-PKQt2EAz.js";
23
23
  import { c as it } from "./calculated-field-identity-BC2NViZZ.js";
24
- import { R as Cn } from "./report-preferences-dialog-CabpgTu7.js";
24
+ import { R as Cn } from "./report-preferences-dialog-BXaILrOK.js";
25
25
  import { u as kn } from "./use-debounced-dirty-check-BwAbnX_5.js";
26
26
  import { s as En } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
27
27
  import { S as Yt } from "./save-DgMfP0j8.js";
@@ -134,7 +134,7 @@ function Un() {
134
134
  function n(l, f) {
135
135
  return l === f && (l !== 0 || 1 / l === 1 / f) || l !== l && f !== f;
136
136
  }
137
- var a = typeof Object.is == "function" ? Object.is : n, r = t.useState, s = t.useEffect, c = t.useLayoutEffect, p = t.useDebugValue;
137
+ var a = typeof Object.is == "function" ? Object.is : n, r = t.useState, s = t.useEffect, c = t.useLayoutEffect, m = t.useDebugValue;
138
138
  function h(l, f) {
139
139
  var i = f(), x = r({ inst: { value: i, getSnapshot: f } }), v = x[0].inst, w = x[1];
140
140
  return c(
@@ -149,7 +149,7 @@ function Un() {
149
149
  });
150
150
  },
151
151
  [l]
152
- ), p(i), i;
152
+ ), m(i), i;
153
153
  }
154
154
  function b(l) {
155
155
  var f = l.getSnapshot;
@@ -194,7 +194,7 @@ function Vn() {
194
194
  "The result of getSnapshot should be cached to avoid an infinite loop"
195
195
  ), l = !0);
196
196
  }
197
- w = p({
197
+ w = m({
198
198
  inst: { value: v, getSnapshot: x }
199
199
  });
200
200
  var D = w[0].inst, E = w[1];
@@ -226,7 +226,7 @@ function Vn() {
226
226
  return x();
227
227
  }
228
228
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
229
- var s = fr, c = typeof Object.is == "function" ? Object.is : t, p = s.useState, h = s.useEffect, b = s.useLayoutEffect, g = s.useDebugValue, u = !1, l = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
229
+ var s = fr, c = typeof Object.is == "function" ? Object.is : t, m = s.useState, h = s.useEffect, b = s.useLayoutEffect, g = s.useDebugValue, u = !1, l = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
230
230
  at.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
231
231
  }()), at;
232
232
  }
@@ -235,10 +235,10 @@ var Tn = dt.exports;
235
235
  const $e = ["light", "dark", "system"];
236
236
  function Fn() {
237
237
  const { theme: t, setTheme: n } = ua(), a = S(
238
- (p) => p.actions.setDashboardTheme
238
+ (m) => m.actions.setDashboardTheme
239
239
  );
240
240
  function r() {
241
- const p = $e.includes(t) ? t : "system", h = $e[($e.indexOf(p) + 1) % $e.length];
241
+ const m = $e.includes(t) ? t : "system", h = $e[($e.indexOf(m) + 1) % $e.length];
242
242
  n(h), a(h);
243
243
  }
244
244
  const s = t === "light" ? _n : t === "dark" ? Pn : An, c = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
@@ -279,10 +279,10 @@ function xr(t) {
279
279
  async function $n(t, n, a, r, s, c) {
280
280
  if (!c)
281
281
  return null;
282
- const p = JSON.stringify(a), h = `${t}/v1/lens`;
282
+ const m = JSON.stringify(a), h = `${t}/v1/lens`;
283
283
  return await lt(h, c, {
284
284
  name: n,
285
- template: p,
285
+ template: m,
286
286
  filterValues: r,
287
287
  inputValues: s,
288
288
  operation: "create"
@@ -295,7 +295,7 @@ async function ct(t, n, a) {
295
295
  id: r,
296
296
  template: s,
297
297
  filterValues: c,
298
- inputValues: p,
298
+ inputValues: m,
299
299
  isDefault: h,
300
300
  shared: b
301
301
  } = n, g = `${t}/v1/lens`;
@@ -303,7 +303,7 @@ async function ct(t, n, a) {
303
303
  lensId: r,
304
304
  template: s,
305
305
  filterValues: c,
306
- inputValues: p,
306
+ inputValues: m,
307
307
  isDefault: h,
308
308
  shared: b,
309
309
  operation: "update"
@@ -323,18 +323,18 @@ function Hn({
323
323
  open: t,
324
324
  onOpenChange: n
325
325
  } = {}) {
326
- const [a, r] = N(""), [s, c] = N(!1), p = S((m) => m.lenses), { setLenses: h, setSelectedLensId: b } = nr(), [g, u] = N(!1), [l, f] = N(!1), i = t !== void 0, x = i ? t : l, v = (m) => {
327
- i || f(m), n == null || n(m);
328
- }, w = S((m) => m.dashboard), D = S((m) => m.filterValues), { authToken: E, tokenProps: $ } = q();
326
+ const [a, r] = N(""), [s, c] = N(!1), m = S((p) => p.lenses), { setLenses: h, setSelectedLensId: b } = nr(), [g, u] = N(!1), [l, f] = N(!1), i = t !== void 0, x = i ? t : l, v = (p) => {
327
+ i || f(p), n == null || n(p);
328
+ }, w = S((p) => p.dashboard), D = S((p) => p.filterValues), { authToken: E, tokenProps: $ } = q();
329
329
  async function I() {
330
330
  u(!0);
331
- const m = S.getState(), G = xr({
331
+ const p = S.getState(), G = xr({
332
332
  dashboard: w,
333
- dashboardInputValues: m.dashboardInputValues,
333
+ dashboardInputValues: p.dashboardInputValues,
334
334
  filterValues: D,
335
- controlValues: m.controlValues,
336
- inlineFilterValuesMap: m.inlineFilterValuesMap,
337
- cardControlValuesMap: m.cardControlValuesMap
335
+ controlValues: p.controlValues,
336
+ inlineFilterValuesMap: p.inlineFilterValuesMap,
337
+ cardControlValuesMap: p.cardControlValuesMap
338
338
  }), F = await $n(
339
339
  $.apiServiceUrl,
340
340
  a,
@@ -343,7 +343,7 @@ function Hn({
343
343
  G,
344
344
  E == null ? void 0 : E.accessToken
345
345
  );
346
- F && (h([...p || [], F]), b(F.id), v(!1)), u(!1);
346
+ F && (h([...m || [], F]), b(F.id), v(!1)), u(!1);
347
347
  }
348
348
  return /* @__PURE__ */ o(ir, { open: x, onOpenChange: v, children: [
349
349
  i ? null : /* @__PURE__ */ e(pa, { asChild: !0, children: /* @__PURE__ */ o(U, { variant: "secondary", size: "xs", children: [
@@ -364,7 +364,7 @@ function Hn({
364
364
  size: "xs",
365
365
  value: a,
366
366
  placeholder: "Monthly review, West region, …",
367
- onChange: (m) => r(m.target.value)
367
+ onChange: (p) => r(p.target.value)
368
368
  }
369
369
  ),
370
370
  s && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
@@ -386,12 +386,12 @@ function Hn({
386
386
  ] });
387
387
  }
388
388
  function zn({ includeLabel: t = !1 } = {}) {
389
- const n = S((u) => u.lenses), a = S((u) => u.selectedLensId), { setLenses: r, setSelectedLensId: s } = nr(), { authToken: c, tokenProps: p } = q();
389
+ const n = S((u) => u.lenses), a = S((u) => u.selectedLensId), { setLenses: r, setSelectedLensId: s } = nr(), { authToken: c, tokenProps: m } = q();
390
390
  async function h(u) {
391
391
  s(u);
392
392
  }
393
393
  async function b(u) {
394
- if (await Gn(p.apiServiceUrl, u, c == null ? void 0 : c.accessToken)) {
394
+ if (await Gn(m.apiServiceUrl, u, c == null ? void 0 : c.accessToken)) {
395
395
  const f = n == null ? void 0 : n.filter((i) => i.id !== u);
396
396
  r(f || []), s("original");
397
397
  }
@@ -409,14 +409,14 @@ function zn({ includeLabel: t = !1 } = {}) {
409
409
  ...u,
410
410
  isDefault: !u.isDefault
411
411
  };
412
- await ct(p.apiServiceUrl, f, c == null ? void 0 : c.accessToken);
412
+ await ct(m.apiServiceUrl, f, c == null ? void 0 : c.accessToken);
413
413
  const i = n == null ? void 0 : n.find((x) => x.isDefault);
414
414
  if (i && i.id !== u.id) {
415
415
  const x = {
416
416
  ...i,
417
417
  isDefault: !1
418
418
  };
419
- await ct(p.apiServiceUrl, x, c == null ? void 0 : c.accessToken);
419
+ await ct(m.apiServiceUrl, x, c == null ? void 0 : c.accessToken);
420
420
  }
421
421
  }
422
422
  return /* @__PURE__ */ o(T, { children: [
@@ -479,7 +479,7 @@ function jn() {
479
479
  const { displayPreferences: t, shouldShowElement: n } = ba(), { currentUser: a, userContext: r } = mt(), s = ee(
480
480
  () => xa(a),
481
481
  [a]
482
- ), c = ee(() => (h) => s && s[h] !== void 0 && s[h] === !1 ? !1 : n(h), [s, n, t]), p = ee(
482
+ ), c = ee(() => (h) => s && s[h] !== void 0 && s[h] === !1 ? !1 : n(h), [s, n, t]), m = ee(
483
483
  () => {
484
484
  var h, b, g, u, l;
485
485
  return {
@@ -495,17 +495,17 @@ function jn() {
495
495
  return {
496
496
  displayPreferences: t,
497
497
  shouldShowElement: c,
498
- permissions: p,
498
+ permissions: m,
499
499
  currentUser: a
500
500
  };
501
501
  }
502
502
  function qn(t, n = []) {
503
503
  let a = [];
504
- function r(c, p) {
505
- const h = M.createContext(p);
504
+ function r(c, m) {
505
+ const h = M.createContext(m);
506
506
  h.displayName = c + "Context";
507
507
  const b = a.length;
508
- a = [...a, p];
508
+ a = [...a, m];
509
509
  const g = (l) => {
510
510
  var D;
511
511
  const { scope: f, children: i, ...x } = l, v = ((D = f == null ? void 0 : f[t]) == null ? void 0 : D[b]) || h, w = M.useMemo(() => x, Object.values(x));
@@ -516,13 +516,13 @@ function qn(t, n = []) {
516
516
  var v;
517
517
  const i = ((v = f == null ? void 0 : f[t]) == null ? void 0 : v[b]) || h, x = M.useContext(i);
518
518
  if (x) return x;
519
- if (p !== void 0) return p;
519
+ if (m !== void 0) return m;
520
520
  throw new Error(`\`${l}\` must be used within \`${c}\``);
521
521
  }
522
522
  return [g, u];
523
523
  }
524
524
  const s = () => {
525
- const c = a.map((p) => M.createContext(p));
525
+ const c = a.map((m) => M.createContext(m));
526
526
  return function(h) {
527
527
  const b = (h == null ? void 0 : h[t]) || c;
528
528
  return M.useMemo(
@@ -542,11 +542,11 @@ function Kn(...t) {
542
542
  scopeName: s.scopeName
543
543
  }));
544
544
  return function(c) {
545
- const p = r.reduce((h, { useScope: b, scopeName: g }) => {
545
+ const m = r.reduce((h, { useScope: b, scopeName: g }) => {
546
546
  const l = b(c)[`__scope${g}`];
547
547
  return { ...h, ...l };
548
548
  }, {});
549
- return M.useMemo(() => ({ [`__scope${n.scopeName}`]: p }), [p]);
549
+ return M.useMemo(() => ({ [`__scope${n.scopeName}`]: m }), [m]);
550
550
  };
551
551
  };
552
552
  return a.scopeName = n.scopeName, a;
@@ -571,7 +571,7 @@ var Qn = [
571
571
  "ul"
572
572
  ], ht = Qn.reduce((t, n) => {
573
573
  const a = sa(`Primitive.${n}`), r = M.forwardRef((s, c) => {
574
- const { asChild: p, ...h } = s, b = p ? a : n;
574
+ const { asChild: m, ...h } = s, b = m ? a : n;
575
575
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(b, { ...h, ref: c });
576
576
  });
577
577
  return r.displayName = `Primitive.${n}`, { ...t, [n]: r };
@@ -605,8 +605,8 @@ yr.displayName = ft;
605
605
  var wr = "AvatarImage", Nr = M.forwardRef(
606
606
  (t, n) => {
607
607
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: s = () => {
608
- }, ...c } = t, p = vr(wr, a), h = Zn(r, c), b = oa((g) => {
609
- s(g), p.onImageLoadingStatusChange(g);
608
+ }, ...c } = t, m = vr(wr, a), h = Zn(r, c), b = oa((g) => {
609
+ s(g), m.onImageLoadingStatusChange(g);
610
610
  });
611
611
  return nt(() => {
612
612
  h !== "idle" && b(h);
@@ -616,13 +616,13 @@ var wr = "AvatarImage", Nr = M.forwardRef(
616
616
  Nr.displayName = wr;
617
617
  var Sr = "AvatarFallback", Dr = M.forwardRef(
618
618
  (t, n) => {
619
- const { __scopeAvatar: a, delayMs: r, ...s } = t, c = vr(Sr, a), [p, h] = M.useState(r === void 0);
619
+ const { __scopeAvatar: a, delayMs: r, ...s } = t, c = vr(Sr, a), [m, h] = M.useState(r === void 0);
620
620
  return M.useEffect(() => {
621
621
  if (r !== void 0) {
622
622
  const b = window.setTimeout(() => h(!0), r);
623
623
  return () => window.clearTimeout(b);
624
624
  }
625
- }, [r]), p && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(ht.span, { ...s, ref: n }) : null;
625
+ }, [r]), m && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(ht.span, { ...s, ref: n }) : null;
626
626
  }
627
627
  );
628
628
  Dr.displayName = Sr;
@@ -630,7 +630,7 @@ function tr(t, n) {
630
630
  return t ? n ? (t.src !== n && (t.src = n), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
631
631
  }
632
632
  function Zn(t, { referrerPolicy: n, crossOrigin: a }) {
633
- const r = Wn(), s = M.useRef(null), c = r ? (s.current || (s.current = new window.Image()), s.current) : null, [p, h] = M.useState(
633
+ const r = Wn(), s = M.useRef(null), c = r ? (s.current || (s.current = new window.Image()), s.current) : null, [m, h] = M.useState(
634
634
  () => tr(c, t)
635
635
  );
636
636
  return nt(() => {
@@ -644,7 +644,7 @@ function Zn(t, { referrerPolicy: n, crossOrigin: a }) {
644
644
  return c.addEventListener("load", g), c.addEventListener("error", u), n && (c.referrerPolicy = n), typeof a == "string" && (c.crossOrigin = a), () => {
645
645
  c.removeEventListener("load", g), c.removeEventListener("error", u);
646
646
  };
647
- }, [c, a, n]), p;
647
+ }, [c, a, n]), m;
648
648
  }
649
649
  var Cr = yr, kr = Nr, Er = Dr;
650
650
  const Lr = M.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
@@ -786,7 +786,7 @@ function ms({
786
786
  }) {
787
787
  var E, $, I;
788
788
  const { tokenProps: a } = q(), { currentUser: r } = mt(), s = (r == null ? void 0 : r.type) === "tenant", c = a == null ? void 0 : a.tenantId, {
789
- groups: p,
789
+ groups: m,
790
790
  isLoading: h,
791
791
  error: b,
792
792
  refetch: g
@@ -798,7 +798,7 @@ function ms({
798
798
  He(() => {
799
799
  t || (f({ kind: "list" }), x(null));
800
800
  }, [t]);
801
- const w = l.kind === "members" && p.find((m) => m.id === l.groupId) || null, D = async () => {
801
+ const w = l.kind === "members" && m.find((p) => p.id === l.groupId) || null, D = async () => {
802
802
  if (i)
803
803
  try {
804
804
  await v.mutateAsync(i.id), x(null), f({ kind: "list" }), g();
@@ -826,14 +826,14 @@ function ms({
826
826
  l.kind === "list" && /* @__PURE__ */ e(
827
827
  ps,
828
828
  {
829
- groups: p,
829
+ groups: m,
830
830
  isLoading: h,
831
831
  errorMessage: u,
832
832
  onRetry: () => g(),
833
833
  currentUserId: r == null ? void 0 : r.id,
834
- onOpenGroup: (m) => f({ kind: "members", groupId: m }),
834
+ onOpenGroup: (p) => f({ kind: "members", groupId: p }),
835
835
  onCreate: () => f({ kind: "create" }),
836
- onDeleteRequest: (m) => x(m)
836
+ onDeleteRequest: (p) => x(p)
837
837
  }
838
838
  ),
839
839
  l.kind === "members" && w && /* @__PURE__ */ e(
@@ -857,8 +857,8 @@ function ms({
857
857
  isTenantUser: s,
858
858
  tenantId: c,
859
859
  onCancel: () => f({ kind: "list" }),
860
- onCreated: (m) => {
861
- g(), f({ kind: "members", groupId: m });
860
+ onCreated: (p) => {
861
+ g(), f({ kind: "members", groupId: p });
862
862
  }
863
863
  }
864
864
  ),
@@ -904,7 +904,7 @@ function ps({
904
904
  onRetry: r,
905
905
  currentUserId: s,
906
906
  onOpenGroup: c,
907
- onCreate: p,
907
+ onCreate: m,
908
908
  onDeleteRequest: h
909
909
  }) {
910
910
  const [b, g] = N(""), u = ee(
@@ -940,7 +940,7 @@ function ps({
940
940
  "button",
941
941
  {
942
942
  type: "button",
943
- onClick: p,
943
+ onClick: m,
944
944
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90",
945
945
  children: [
946
946
  /* @__PURE__ */ e(Q, { className: "h-3 w-3" }),
@@ -962,7 +962,7 @@ function ps({
962
962
  message: a,
963
963
  onRetry: r
964
964
  }
965
- ) : u.length === 0 && t.length === 0 ? /* @__PURE__ */ e(fs, { onCreate: p }) : u.length === 0 ? /* @__PURE__ */ o("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
965
+ ) : u.length === 0 && t.length === 0 ? /* @__PURE__ */ e(fs, { onCreate: m }) : u.length === 0 ? /* @__PURE__ */ o("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
966
966
  /* @__PURE__ */ o("div", { className: "text-[12px] text-foreground", children: [
967
967
  'No groups match "',
968
968
  b,
@@ -1075,7 +1075,7 @@ function gs({
1075
1075
  canDelete: r,
1076
1076
  canManageMembers: s,
1077
1077
  onBack: c,
1078
- onMembersChanged: p,
1078
+ onMembersChanged: m,
1079
1079
  onUpdated: h,
1080
1080
  onRequestDelete: b
1081
1081
  }) {
@@ -1092,7 +1092,7 @@ function gs({
1092
1092
  }), D = ee(
1093
1093
  () => new Set(i.map((y) => y.userId)),
1094
1094
  [i]
1095
- ), E = cs(), $ = ls(), I = is(), [m, G] = N(!1), [F, B] = N(t.name), [O, k] = N(!1), [re, ae] = N(t.description || ""), [W, Se] = N(""), [De, Ce] = N(!1), ke = ee(() => {
1095
+ ), E = cs(), $ = ls(), I = is(), [p, G] = N(!1), [F, B] = N(t.name), [O, k] = N(!1), [re, ae] = N(t.description || ""), [W, Se] = N(""), [De, Ce] = N(!1), ke = ee(() => {
1096
1096
  const y = W.trim().toLowerCase();
1097
1097
  return w.filter((H) => !D.has(H.id)).filter(
1098
1098
  (H) => !y || (H.name || "").toLowerCase().includes(y) || (H.email || "").toLowerCase().includes(y)
@@ -1127,7 +1127,7 @@ function gs({
1127
1127
  userIds: [y.id],
1128
1128
  userType: v === "tenant" ? "tenant" : "org"
1129
1129
  }
1130
- }), f(), p();
1130
+ }), f(), m();
1131
1131
  } catch {
1132
1132
  }
1133
1133
  }
@@ -1137,7 +1137,7 @@ function gs({
1137
1137
  await $.mutateAsync({
1138
1138
  groupId: t.id,
1139
1139
  data: { userIds: [y] }
1140
- }), f(), p();
1140
+ }), f(), m();
1141
1141
  } catch {
1142
1142
  }
1143
1143
  };
@@ -1159,7 +1159,7 @@ function gs({
1159
1159
  children: /* @__PURE__ */ e(ur, { className: "h-3.5 w-3.5" })
1160
1160
  }
1161
1161
  ),
1162
- m ? /* @__PURE__ */ e(
1162
+ p ? /* @__PURE__ */ e(
1163
1163
  "input",
1164
1164
  {
1165
1165
  autoFocus: !0,
@@ -1332,12 +1332,12 @@ function bs({
1332
1332
  onCancel: a,
1333
1333
  onCreated: r
1334
1334
  }) {
1335
- const [s, c] = N(""), [p, h] = N(""), [b, g] = N(null), u = os(), l = s.trim().length >= 3 && s.trim().length <= 50, f = async () => {
1335
+ const [s, c] = N(""), [m, h] = N(""), [b, g] = N(null), u = os(), l = s.trim().length >= 3 && s.trim().length <= 50, f = async () => {
1336
1336
  if (!l) return;
1337
1337
  g(null);
1338
1338
  const i = {
1339
1339
  name: s.trim(),
1340
- description: p.trim() || void 0,
1340
+ description: m.trim() || void 0,
1341
1341
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
1342
1342
  ...t && n ? { tenantId: n } : {}
1343
1343
  };
@@ -1369,7 +1369,7 @@ function bs({
1369
1369
  "textarea",
1370
1370
  {
1371
1371
  rows: 2,
1372
- value: p,
1372
+ value: m,
1373
1373
  onChange: (i) => h(i.target.value),
1374
1374
  maxLength: 200,
1375
1375
  placeholder: "What is this group for?",
@@ -1377,7 +1377,7 @@ function bs({
1377
1377
  }
1378
1378
  ),
1379
1379
  /* @__PURE__ */ o("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1380
- p.length,
1380
+ m.length,
1381
1381
  "/200"
1382
1382
  ] })
1383
1383
  ] }),
@@ -1420,7 +1420,7 @@ function xs({
1420
1420
  setOpen: r,
1421
1421
  candidates: s,
1422
1422
  showKindChip: c,
1423
- onAdd: p,
1423
+ onAdd: m,
1424
1424
  busy: h
1425
1425
  }) {
1426
1426
  const b = Xt(null), g = Xt(null), [u, l] = N(null);
@@ -1494,7 +1494,7 @@ function xs({
1494
1494
  "button",
1495
1495
  {
1496
1496
  type: "button",
1497
- onClick: () => p(i),
1497
+ onClick: () => m(i),
1498
1498
  className: "flex w-full items-center gap-2 border-b border-border/60 px-2.5 py-2 text-left last:border-b-0 hover:bg-accent",
1499
1499
  children: [
1500
1500
  /* @__PURE__ */ e(Pr, { name: i.name || i.email || "?" }),
@@ -1548,13 +1548,13 @@ function Pr({ name: t }) {
1548
1548
  return /* @__PURE__ */ e(Lr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(Ir, { className: "text-[9px] font-semibold", children: n || "?" }) });
1549
1549
  }
1550
1550
  function be(t, n, a) {
1551
- var c, p;
1551
+ var c, m;
1552
1552
  const r = (t.controls || []).find(
1553
1553
  (h) => h.id === a
1554
1554
  );
1555
1555
  if (r)
1556
1556
  return r.label;
1557
- const s = (p = (c = or(t, n)) == null ? void 0 : c.controls) == null ? void 0 : p.find(
1557
+ const s = (m = (c = or(t, n)) == null ? void 0 : c.controls) == null ? void 0 : m.find(
1558
1558
  (h) => h.id === a
1559
1559
  );
1560
1560
  return (s == null ? void 0 : s.label) || a;
@@ -1584,11 +1584,11 @@ function vs(t) {
1584
1584
  );
1585
1585
  continue;
1586
1586
  }
1587
- const p = s.match(
1587
+ const m = s.match(
1588
1588
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1589
1589
  );
1590
- if (p) {
1591
- const [, u, l] = p, f = `${u}:${l}:missing-group-by`;
1590
+ if (m) {
1591
+ const [, u, l] = m, f = `${u}:${l}:missing-group-by`;
1592
1592
  r.has(f) || r.set(
1593
1593
  f,
1594
1594
  `"${xe(a, u)}" has an outdated "${be(
@@ -1692,14 +1692,14 @@ function Xs() {
1692
1692
  id: a,
1693
1693
  showBriefings: r
1694
1694
  } = q(), s = Ia(), { isLocalDev: c } = Ma(), {
1695
- canEditDashboard: p,
1695
+ canEditDashboard: m,
1696
1696
  hasInspectionUser: h,
1697
1697
  inspectionMessage: b,
1698
1698
  isInspectionMode: g,
1699
1699
  isInspectionSurface: u
1700
1700
  } = Aa(), { openBrandStudioPreview: l } = Pa(), { permissions: f } = jn(), i = Oa(), { isLoading: x } = _a(), v = S((d) => d.theme), w = S((d) => d.isDownloadingPdf), D = S(
1701
1701
  (d) => d.dashboardAssistantDraftScopeKey
1702
- ), E = S((d) => d.lenses), $ = S((d) => d.selectedLensId), I = E == null ? void 0 : E.find((d) => d.id === $), m = S((d) => d.dashboard), G = S((d) => d.selectedSheetId), F = (Ot = m == null ? void 0 : m.sheets) == null ? void 0 : Ot.find(
1702
+ ), E = S((d) => d.lenses), $ = S((d) => d.selectedLensId), I = E == null ? void 0 : E.find((d) => d.id === $), p = S((d) => d.dashboard), G = S((d) => d.selectedSheetId), F = (Ot = p == null ? void 0 : p.sheets) == null ? void 0 : Ot.find(
1703
1703
  (d) => d.id === G
1704
1704
  ), B = ia(F), O = B ? (_t = F == null ? void 0 : F.document) == null ? void 0 : _t.page : void 0, k = S(
1705
1705
  (d) => d.isDashboardEditing
@@ -1724,26 +1724,26 @@ function Xs() {
1724
1724
  canManageGroups: $r
1725
1725
  }), Dt = z ? {
1726
1726
  id: z.id,
1727
- title: (m == null ? void 0 : m.title) || z.title || "Dashboard"
1727
+ title: (p == null ? void 0 : p.title) || z.title || "Dashboard"
1728
1728
  } : null, { handleAddNewFrame: Gr } = $a(), [Ke, Qe] = N(!1), [Br, me] = N(!1), [We, Oe] = N("close"), pe = Ga(tt.DASHBOARD), [P, he] = N(null), Hr = async (d, A) => {
1729
1729
  if (!g) {
1730
- if (!(m != null && m.id)) {
1730
+ if (!(p != null && p.id)) {
1731
1731
  console.log("No dashboard ID found");
1732
1732
  return;
1733
1733
  }
1734
1734
  console.log("Updating dashboard title:", {
1735
- dashboardId: m.id,
1735
+ dashboardId: p.id,
1736
1736
  newTitle: d,
1737
1737
  previousTitle: A
1738
1738
  }), pe.mutate(
1739
1739
  {
1740
- resourceId: m.id,
1740
+ resourceId: p.id,
1741
1741
  data: { title: d }
1742
1742
  },
1743
1743
  {
1744
1744
  onSuccess: () => {
1745
1745
  he(
1746
- (L) => (L == null ? void 0 : L.dashboard.id) === m.id ? {
1746
+ (L) => (L == null ? void 0 : L.dashboard.id) === p.id ? {
1747
1747
  ...L,
1748
1748
  dashboard: { ...L.dashboard, title: d }
1749
1749
  } : L
@@ -1752,7 +1752,7 @@ function Xs() {
1752
1752
  onError: (L) => {
1753
1753
  console.error("Failed to update dashboard title:", L), C.error("Failed to update dashboard title");
1754
1754
  const K = S.getState().dashboard;
1755
- (K == null ? void 0 : K.id) === m.id && K.title === d && re(A);
1755
+ (K == null ? void 0 : K.id) === p.id && K.title === d && re(A);
1756
1756
  }
1757
1757
  }
1758
1758
  );
@@ -1760,7 +1760,7 @@ function Xs() {
1760
1760
  };
1761
1761
  He(() => {
1762
1762
  if (Pe && Pe.length > 0) {
1763
- const d = m == null ? void 0 : m.id;
1763
+ const d = p == null ? void 0 : p.id;
1764
1764
  if (d) {
1765
1765
  const A = Pe.find(
1766
1766
  (L) => L.id === d
@@ -1768,11 +1768,11 @@ function Xs() {
1768
1768
  A && St(A);
1769
1769
  }
1770
1770
  }
1771
- }, [Pe, m == null ? void 0 : m.id, St]);
1771
+ }, [Pe, p == null ? void 0 : p.id, St]);
1772
1772
  const fe = n.orgUserId || n.tenantId, Je = ee(
1773
1773
  () => Ns({
1774
1774
  accessToken: t == null ? void 0 : t.accessToken,
1775
- dashboardId: (m == null ? void 0 : m.id) || a || n.dashboard_id,
1775
+ dashboardId: (p == null ? void 0 : p.id) || a || n.dashboard_id,
1776
1776
  selectedSheetId: B ? G : void 0,
1777
1777
  pageSize: O == null ? void 0 : O.size,
1778
1778
  orientation: O == null ? void 0 : O.orientation,
@@ -1781,7 +1781,7 @@ function Xs() {
1781
1781
  [
1782
1782
  t == null ? void 0 : t.accessToken,
1783
1783
  a,
1784
- m == null ? void 0 : m.id,
1784
+ p == null ? void 0 : p.id,
1785
1785
  B,
1786
1786
  O == null ? void 0 : O.orientation,
1787
1787
  O == null ? void 0 : O.size,
@@ -1789,7 +1789,7 @@ function Xs() {
1789
1789
  v,
1790
1790
  n.dashboard_id
1791
1791
  ]
1792
- ), Ct = k && !_ && !g && fe && p, { setDashboard: Xe } = S((d) => d.actions), kt = S(
1792
+ ), Ct = k && !_ && !g && fe && m, { setDashboard: Xe } = S((d) => d.actions), kt = S(
1793
1793
  (d) => d.semanticExecutionPayload
1794
1794
  ), zr = () => {
1795
1795
  wt(!0);
@@ -1801,28 +1801,29 @@ function Xs() {
1801
1801
  P && he(null);
1802
1802
  return;
1803
1803
  }
1804
- P || !m || x || he(
1804
+ P || !p || x || he(
1805
1805
  ar(
1806
- m,
1806
+ p,
1807
1807
  kt
1808
1808
  )
1809
1809
  );
1810
1810
  }, [
1811
- m,
1811
+ p,
1812
1812
  P,
1813
1813
  k,
1814
1814
  x,
1815
1815
  kt
1816
1816
  ]);
1817
1817
  const Et = (P == null ? void 0 : P.dashboard) ?? null, { isDirty: Lt, isDirtyPending: jr, resetDirty: ge } = kn(
1818
- m,
1818
+ p,
1819
1819
  Et,
1820
1820
  300,
1821
1821
  1e3,
1822
1822
  En
1823
1823
  ), It = fn(
1824
1824
  Et,
1825
- g
1825
+ g,
1826
+ m
1826
1827
  ), Mt = Lt || jr, Re = Ke || pe.isPending, qr = () => {
1827
1828
  if (g) {
1828
1829
  P && Xe(P.dashboard, {
@@ -1932,14 +1933,14 @@ function Xs() {
1932
1933
  t == null ? void 0 : t.accessToken
1933
1934
  ), C.success("Lens saved"), ze == null || ze(d), W(!1);
1934
1935
  }
1935
- const At = (I == null ? void 0 : I.name) || m.title;
1936
+ const At = (I == null ? void 0 : I.name) || p.title;
1936
1937
  pe.isPending && console.log("Title during update:", {
1937
1938
  title: At,
1938
- dashboardStateTitle: m.title,
1939
- dashboardId: m == null ? void 0 : m.id,
1939
+ dashboardStateTitle: p.title,
1940
+ dashboardId: p == null ? void 0 : p.id,
1940
1941
  currentLensName: I == null ? void 0 : I.name
1941
1942
  });
1942
- const Yr = ue && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Zr = !g && se.showDashboardHub && Yr, ea = !g && i && se.showDashboardHub, j = (m == null ? void 0 : m.id) || null, Pt = Ba(
1943
+ const Yr = ue && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Zr = !g && se.showDashboardHub && Yr, ea = !g && i && se.showDashboardHub, j = (p == null ? void 0 : p.id) || null, Pt = Ba(
1943
1944
  (Vt = n.config) == null ? void 0 : Vt.showBriefings,
1944
1945
  r
1945
1946
  ), oe = !!j && Ur === j, ta = () => {
@@ -1981,15 +1982,15 @@ function Xs() {
1981
1982
  onSave: (d) => {
1982
1983
  console.log("EditableText onSave called:", {
1983
1984
  newTitle: d,
1984
- canEditDashboard: p,
1985
- dashboardId: m == null ? void 0 : m.id
1985
+ canEditDashboard: m,
1986
+ dashboardId: p == null ? void 0 : p.id
1986
1987
  });
1987
- const A = (m == null ? void 0 : m.title) || "";
1988
+ const A = (p == null ? void 0 : p.title) || "";
1988
1989
  re(d), Hr(d, A);
1989
1990
  },
1990
1991
  isEditable: ja({
1991
1992
  isDashboardEditing: k,
1992
- canEditDashboard: p === !0 && !g,
1993
+ canEditDashboard: m === !0 && !g,
1993
1994
  hasCurrentLens: !!I
1994
1995
  }),
1995
1996
  displayClassName: "text-[13px] font-medium",
@@ -2105,7 +2106,7 @@ function Xs() {
2105
2106
  }
2106
2107
  )
2107
2108
  ] }),
2108
- !_ && !k && (p || g) && (!u || !h || p !== void 0) && i && /* @__PURE__ */ o("div", { className: "inline-flex items-center gap-1", children: [
2109
+ !_ && !k && (m || g) && (!u || !h || m !== void 0) && i && /* @__PURE__ */ o("div", { className: "inline-flex items-center gap-1", children: [
2109
2110
  /* @__PURE__ */ o(U, { size: "xs", onClick: zr, children: [
2110
2111
  /* @__PURE__ */ e(Ka, { className: "h-3.5 w-3.5" }),
2111
2112
  g ? "Inspect" : "Edit"
@@ -2328,7 +2329,7 @@ function Xs() {
2328
2329
  wn,
2329
2330
  {
2330
2331
  dashboardId: j,
2331
- dashboardTitle: (m == null ? void 0 : m.title) || (z == null ? void 0 : z.title),
2332
+ dashboardTitle: (p == null ? void 0 : p.title) || (z == null ? void 0 : z.title),
2332
2333
  open: !0,
2333
2334
  onOpenChange: (d) => {
2334
2335
  d || ce(null);
@@ -2419,10 +2420,10 @@ function Ns({
2419
2420
  }) {
2420
2421
  if (!t || !a)
2421
2422
  return null;
2422
- const p = new URL("http://localhost:5173/print-document");
2423
- p.searchParams.set("token", t), n && p.searchParams.set("dashboardId", n), p.searchParams.set("selectedSheetId", a), c && p.searchParams.set("theme", c);
2423
+ const m = new URL("http://localhost:5173/print-document");
2424
+ m.searchParams.set("token", t), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), c && m.searchParams.set("theme", c);
2424
2425
  const h = new URL("http://127.0.0.1:3002/");
2425
- return h.searchParams.set("pdfMode", "document"), h.searchParams.set("pageSize", r || "letter"), h.searchParams.set("orientation", s || "portrait"), h.searchParams.set("url", p.toString()), h.toString();
2426
+ return h.searchParams.set("pdfMode", "document"), h.searchParams.set("pageSize", r || "letter"), h.searchParams.set("orientation", s || "portrait"), h.searchParams.set("url", m.toString()), h.toString();
2426
2427
  }
2427
2428
  export {
2428
2429
  Xs as default