react-semaphor 0.0.266 → 0.0.267

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.
@@ -1,4 +1,4 @@
1
- import { J as O, L as Ue, b as z, c as Cs, u as je, j as e, M as Ss, O as ws, P as F, Q as ks, R as zs, U as Fs, V as Ls, W as Ts, X as H, Y as Ce, Z as aa, _ as Xa, $ as Za, a0 as et, a1 as st, a2 as at, a3 as tt, a4 as Gs, f as J, a5 as Re, a6 as nt, a7 as ta, a8 as _e, a9 as ts, T as Ds, e as na, g as Is, aa as he, ab as me, ac as xe, ad as pe, ae as Se, af as fe, ag as Q, ah as Ms, G as c, ai as Os, aj as As, ak as Es, w as la, v as ia, t as ue, al as lt, r as it, N as ra, s as rt, am as ot, B as ct, an as oa, ao as dt, S as Vs, z as ut, n as Ks, A as ca, ap as fs, aq as re, ar as Ne, as as He, at as rs, au as da, av as ht, aw as mt, ax as ua, ay as xt, az as pt, aA as ft, aB as gt, aC as jt, aD as gs, aE as bt, aF as ha, aG as qe, aH as js, aI as De, aJ as bs, aK as Ps, aL as yt, aM as vt, aN as Nt, aO as Ct, aP as St, aQ as xs, aR as wt, aS as Ws, aT as kt, aU as Qs, aV as zt, aW as Ft, aX as Lt, aY as ma, H as Ie, aZ as xa, l as Tt, C as Dt, E as es, d as It, h as Mt, a_ as Ot, i as At, o as Et, a$ as Vt, m as qt, b0 as Rt, b1 as pa, b2 as fa, b3 as ss, b4 as ga, b5 as as, b6 as Js, b7 as Ge, b8 as Ke, b9 as Pe, ba as ja, K as _t, bb as Ht, bc as $t, bd as ba, be as ya, bf as va, bg as Na, bh as Ca, bi as Sa, bj as os, bk as Fe, bl as Bt, bm as Ut, bn as wa, bo as Gt, bp as Kt, bq as ns, br as Pt, bs as Wt, bt as Qt, bu as Ys, bv as Jt, bw as Yt, bx as Le, by as U, bz as G, bA as qs, bB as K, bC as Xt, bD as ka, bE as za, bF as Zt, bG as en, bH as sn, bI as an, bJ as tn, bK as nn, bL as ln, bM as rn, bN as on } from "./index-CmAm-Ehp.js";
1
+ import { J as O, L as Ue, b as z, c as Cs, u as je, j as e, M as Ss, O as ws, P as F, Q as ks, R as zs, U as Fs, V as Ls, W as Ts, X as H, Y as Ce, Z as aa, _ as Xa, $ as Za, a0 as et, a1 as st, a2 as at, a3 as tt, a4 as Gs, f as J, a5 as Re, a6 as nt, a7 as ta, a8 as _e, a9 as ns, T as Ds, e as na, g as Is, aa as he, ab as me, ac as xe, ad as pe, ae as Se, af as fe, ag as Q, ah as Ms, G as c, ai as Os, aj as As, ak as Es, w as la, v as ia, t as ue, al as lt, r as it, N as ra, s as rt, am as ot, B as ct, an as oa, ao as dt, S as Vs, z as ut, n as Ks, A as ca, ap as fs, aq as re, ar as Ne, as as He, at as os, au as da, av as ht, aw as mt, ax as ua, ay as xt, az as pt, aA as ft, aB as gt, aC as jt, aD as gs, aE as bt, aF as ha, aG as qe, aH as js, aI as Ie, aJ as bs, aK as Ps, aL as yt, aM as vt, aN as Nt, aO as Ct, aP as St, aQ as ps, aR as wt, aS as Ws, aT as kt, aU as Qs, aV as zt, aW as Ft, aX as Lt, aY as ma, H as Le, aZ as xa, l as Tt, C as Dt, E as es, d as It, h as Mt, a_ as Ot, i as At, o as Et, a$ as Vt, m as qt, b0 as Rt, b1 as pa, b2 as fa, b3 as ss, b4 as ga, b5 as as, b6 as Js, b7 as Ge, b8 as Ke, b9 as Pe, ba as ja, K as _t, bb as Ht, bc as $t, bd as ba, be as ya, bf as va, bg as Na, bh as Ca, bi as Sa, bj as cs, bk as Fe, bl as Bt, bm as Ut, bn as wa, bo as Gt, bp as Kt, bq as ls, br as Pt, bs as Wt, bt as Qt, bu as Ys, bv as Jt, bw as Yt, bx as Te, by as U, bz as G, bA as qs, bB as K, bC as Xt, bD as ka, bE as za, bF as Zt, bG as en, bH as sn, bI as an, bJ as tn, bK as nn, bL as ln, bM as rn, bN as on } from "./index-ck_m7HT5.js";
2
2
  import * as ys from "react";
3
3
  import ge, { useState as V, useMemo as vs, useEffect as Z, useRef as $e, Suspense as cn } from "react";
4
4
  import "react-dom";
@@ -798,7 +798,7 @@ function Gn() {
798
798
  template: q,
799
799
  filterValues: d
800
800
  };
801
- await Ns($, s == null ? void 0 : s.accessToken), ts.success("Lens saved"), y == null || y(b), r(!1);
801
+ await Ns($, s == null ? void 0 : s.accessToken), ns.success("Lens saved"), y == null || y(b), r(!1);
802
802
  }
803
803
  return p ? null : /* @__PURE__ */ e.jsxs(
804
804
  "div",
@@ -1067,7 +1067,7 @@ function Pn({
1067
1067
  (W) => W.connectinonId === R.connectinonId && W.tableName === R.tableName
1068
1068
  ) === B
1069
1069
  );
1070
- y($), ts.success(`Added '${d}' to AI Scope`, {
1070
+ y($), ns.success(`Added '${d}' to AI Scope`, {
1071
1071
  position: "top-right",
1072
1072
  duration: 2500,
1073
1073
  richColors: !0
@@ -1076,7 +1076,7 @@ function Pn({
1076
1076
  const b = (h || []).filter(
1077
1077
  (q) => q.connectinonId !== o && q.tableName !== d
1078
1078
  );
1079
- y(b), ts(`Removed '${d}' from AI Scope`, {
1079
+ y(b), ns(`Removed '${d}' from AI Scope`, {
1080
1080
  position: "top-right",
1081
1081
  duration: 2e3,
1082
1082
  richColors: !0
@@ -1375,39 +1375,39 @@ function Me(s, n) {
1375
1375
  ...C,
1376
1376
  data_type: C.data_type.toLowerCase()
1377
1377
  }))), W && (a = []), (Y || A) && (a = []);
1378
- const Te = N == null ? void 0 : N.connections.map(
1378
+ const De = N == null ? void 0 : N.connections.map(
1379
1379
  (C) => ({
1380
1380
  id: C.id,
1381
1381
  name: C.name,
1382
1382
  type: C.type
1383
1383
  })
1384
- ), ds = (g = j == null ? void 0 : j.datamodels) == null ? void 0 : g.map((C) => ({
1384
+ ), us = (g = j == null ? void 0 : j.datamodels) == null ? void 0 : g.map((C) => ({
1385
1385
  id: C.id,
1386
1386
  name: C.name
1387
1387
  })), We = R == null ? void 0 : R.databases.map((C) => ({
1388
1388
  id: C.database_name,
1389
1389
  name: C.database_name
1390
- })), us = P == null ? void 0 : P.schemas.map((C) => ({
1390
+ })), hs = P == null ? void 0 : P.schemas.map((C) => ({
1391
1391
  id: C.schema_name,
1392
1392
  name: C.schema_name
1393
- })), hs = T == null ? void 0 : T.tables.map((C) => ({
1393
+ })), ms = T == null ? void 0 : T.tables.map((C) => ({
1394
1394
  id: C.table_name,
1395
1395
  name: C.table_name
1396
1396
  }));
1397
1397
  return {
1398
- connectionItems: Te,
1398
+ connectionItems: De,
1399
1399
  isConnectionsLoading: M,
1400
1400
  isConnectionsError: A,
1401
- modelItems: ds,
1401
+ modelItems: us,
1402
1402
  isModelsLoading: S,
1403
1403
  isModelsError: v,
1404
1404
  databaseItems: We,
1405
1405
  isDatabasesLoadingOrFetching: B || ee,
1406
1406
  isDatabaseError: W,
1407
- schemaItems: us,
1407
+ schemaItems: hs,
1408
1408
  isSchemaLoadingOrFetching: ie || w,
1409
1409
  isSchemaError: E,
1410
- tableItems: hs,
1410
+ tableItems: ms,
1411
1411
  isTableLoadingOrFetching: L || se,
1412
1412
  isTableError: _,
1413
1413
  columns: a,
@@ -1638,7 +1638,7 @@ function Jn({
1638
1638
  checked: a
1639
1639
  }) {
1640
1640
  return /* @__PURE__ */ e.jsxs("div", { className: "xbg-red-100 ml-6 flex items-center gap-2", children: [
1641
- /* @__PURE__ */ e.jsx(rs, { checked: a, onCheckedChange: n }),
1641
+ /* @__PURE__ */ e.jsx(os, { checked: a, onCheckedChange: n }),
1642
1642
  /* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
1643
1643
  ] });
1644
1644
  }
@@ -1990,15 +1990,15 @@ function tl(s, n) {
1990
1990
  i = t[o], !(n.indexOf(i) >= 0) && (a[i] = s[i]);
1991
1991
  return a;
1992
1992
  }
1993
- function ls() {
1994
- return ls = Object.assign ? Object.assign.bind() : function(s) {
1993
+ function is() {
1994
+ return is = Object.assign ? Object.assign.bind() : function(s) {
1995
1995
  for (var n = 1; n < arguments.length; n++) {
1996
1996
  var a = arguments[n];
1997
1997
  for (var t in a)
1998
1998
  Object.prototype.hasOwnProperty.call(a, t) && (s[t] = a[t]);
1999
1999
  }
2000
2000
  return s;
2001
- }, ls.apply(this, arguments);
2001
+ }, is.apply(this, arguments);
2002
2002
  }
2003
2003
  function Zs(s, n) {
2004
2004
  var a = Object.keys(s);
@@ -2010,7 +2010,7 @@ function Zs(s, n) {
2010
2010
  }
2011
2011
  return a;
2012
2012
  }
2013
- function is(s) {
2013
+ function rs(s) {
2014
2014
  for (var n = 1; n < arguments.length; n++) {
2015
2015
  var a = arguments[n] != null ? arguments[n] : {};
2016
2016
  n % 2 ? Zs(Object(a), !0).forEach(function(t) {
@@ -2041,13 +2041,13 @@ function il(s, n) {
2041
2041
  return (n === "string" ? String : Number)(s);
2042
2042
  }
2043
2043
  function Va(s) {
2044
- return s && s.map((n, a) => /* @__PURE__ */ ge.createElement(n.tag, is({
2044
+ return s && s.map((n, a) => /* @__PURE__ */ ge.createElement(n.tag, rs({
2045
2045
  key: a
2046
2046
  }, n.attr), Va(n.child)));
2047
2047
  }
2048
2048
  function be(s) {
2049
- return (n) => /* @__PURE__ */ ge.createElement(rl, ls({
2050
- attr: is({}, s.attr)
2049
+ return (n) => /* @__PURE__ */ ge.createElement(rl, is({
2050
+ attr: rs({}, s.attr)
2051
2051
  }, n), Va(s.child));
2052
2052
  }
2053
2053
  function rl(s) {
@@ -2057,13 +2057,13 @@ function rl(s) {
2057
2057
  size: i,
2058
2058
  title: o
2059
2059
  } = s, l = al(s, sl), r = i || a.size || "1em", d;
2060
- return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ ge.createElement("svg", ls({
2060
+ return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ ge.createElement("svg", is({
2061
2061
  stroke: "currentColor",
2062
2062
  fill: "currentColor",
2063
2063
  strokeWidth: "0"
2064
2064
  }, a.attr, t, l, {
2065
2065
  className: d,
2066
- style: is(is({
2066
+ style: rs(rs({
2067
2067
  color: s.color || a.color
2068
2068
  }, a.style), s.style),
2069
2069
  height: r,
@@ -2114,7 +2114,7 @@ function cl() {
2114
2114
  isError: de,
2115
2115
  error: ve,
2116
2116
  status: Bs,
2117
- refetch: Te
2117
+ refetch: De
2118
2118
  } = re({
2119
2119
  queryKey: [b, v],
2120
2120
  queryFn: () => Ue(
@@ -2131,7 +2131,7 @@ function cl() {
2131
2131
  retry: !1
2132
2132
  });
2133
2133
  Z(() => {
2134
- if (Y && (_(Y.records), Y.rowLimitExceeded && ts.error("Row limit (10,000) exceeded. Refine your query.", {
2134
+ if (Y && (_(Y.records), Y.rowLimitExceeded && ns.error("Row limit (10,000) exceeded. Refine your query.", {
2135
2135
  position: "top-center",
2136
2136
  richColors: !0
2137
2137
  }), E((Y == null ? void 0 : Y.output) || ""), Y.records.length > 0)) {
@@ -2139,8 +2139,8 @@ function cl() {
2139
2139
  W(g);
2140
2140
  }
2141
2141
  }, [Y, _, W, E]), Z(() => {
2142
- te && (Te(), we(!1));
2143
- }, [te, Te, we]), Z(() => {
2142
+ te && (De(), we(!1));
2143
+ }, [te, De, we]), Z(() => {
2144
2144
  (oe || ce) && ye(!0), (de || ke) && ye(!1), de ? (w(ve.message), _([]), W([]), E("")) : w("");
2145
2145
  }, [
2146
2146
  oe,
@@ -2155,13 +2155,13 @@ function cl() {
2155
2155
  w,
2156
2156
  ve
2157
2157
  ]);
2158
- function ds() {
2158
+ function us() {
2159
2159
  P(""), _([]), ae({}), ee(""), X({});
2160
2160
  }
2161
2161
  const We = (g) => {
2162
2162
  a.current = g;
2163
2163
  };
2164
- function us(g, C) {
2164
+ function hs(g, C) {
2165
2165
  if (g.length === 0)
2166
2166
  return "";
2167
2167
  if (C) {
@@ -2181,7 +2181,7 @@ function cl() {
2181
2181
  }
2182
2182
  return g[0].id;
2183
2183
  }
2184
- function hs() {
2184
+ function ms() {
2185
2185
  let g = S;
2186
2186
  S && !S.includes("{{") && (g = Wn(S), P(g));
2187
2187
  const C = {
@@ -2195,11 +2195,11 @@ function cl() {
2195
2195
  sql: g,
2196
2196
  customCfg: D ? u.customCfg : null
2197
2197
  }, ze = $.cards.map(
2198
- (ms) => ms.id === u.id ? C : ms
2198
+ (xs) => xs.id === u.id ? C : xs
2199
2199
  ), ne = {
2200
2200
  ...$,
2201
2201
  cards: ze,
2202
- activeCardId: us(ze, $.activeCardId)
2202
+ activeCardId: hs(ze, $.activeCardId)
2203
2203
  };
2204
2204
  T == null || T(ne);
2205
2205
  }
@@ -2224,7 +2224,7 @@ function cl() {
2224
2224
  return C && g && C.addCommand(
2225
2225
  g.KeyMod.Shift | g.KeyCode.Enter,
2226
2226
  function() {
2227
- return console.log("Executing query..."), Te(), !1;
2227
+ return console.log("Executing query..."), De(), !1;
2228
2228
  }
2229
2229
  ), () => {
2230
2230
  };
@@ -2315,7 +2315,7 @@ function cl() {
2315
2315
  role: "editor-resizable-group",
2316
2316
  children: [
2317
2317
  /* @__PURE__ */ e.jsxs(
2318
- De,
2318
+ Ie,
2319
2319
  {
2320
2320
  id: "1",
2321
2321
  order: 1,
@@ -2362,7 +2362,7 @@ function cl() {
2362
2362
  t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2363
2363
  /* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
2364
2364
  /* @__PURE__ */ e.jsxs(
2365
- De,
2365
+ Ie,
2366
2366
  {
2367
2367
  id: "2",
2368
2368
  order: 2,
@@ -2443,7 +2443,7 @@ function cl() {
2443
2443
  title: "Shift + Enter",
2444
2444
  disabled: oe || ce,
2445
2445
  onClick: () => {
2446
- Te();
2446
+ De();
2447
2447
  },
2448
2448
  className: "shrink-0",
2449
2449
  size: "sm",
@@ -2466,7 +2466,7 @@ function cl() {
2466
2466
  /* @__PURE__ */ e.jsxs(
2467
2467
  F,
2468
2468
  {
2469
- onClick: ds,
2469
+ onClick: us,
2470
2470
  className: "",
2471
2471
  size: "sm",
2472
2472
  variant: "outline",
@@ -2503,7 +2503,7 @@ function cl() {
2503
2503
  /* @__PURE__ */ e.jsxs(
2504
2504
  F,
2505
2505
  {
2506
- onClick: hs,
2506
+ onClick: ms,
2507
2507
  size: "sm",
2508
2508
  variant: "outline",
2509
2509
  children: [
@@ -2566,26 +2566,26 @@ function dl({ data: s }) {
2566
2566
  }
2567
2567
  });
2568
2568
  return /* @__PURE__ */ e.jsxs(Ct, { children: [
2569
- /* @__PURE__ */ e.jsx(St, { children: o.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(xs, { children: r.headers.map((d) => /* @__PURE__ */ e.jsx(wt, { className: "sticky top-0 bg-muted", children: d.isPlaceholder ? null : Ws(
2569
+ /* @__PURE__ */ e.jsx(St, { children: o.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(ps, { children: r.headers.map((d) => /* @__PURE__ */ e.jsx(wt, { className: "sticky top-0 bg-muted", children: d.isPlaceholder ? null : Ws(
2570
2570
  d.column.columnDef.header,
2571
2571
  d.getContext()
2572
2572
  ) }, d.id)) }, r.id)) }),
2573
2573
  /* @__PURE__ */ e.jsx(kt, { children: (l = o.getRowModel().rows) != null && l.length ? o.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
2574
- xs,
2574
+ ps,
2575
2575
  {
2576
2576
  className: "whitespace-nowrap py-2",
2577
2577
  "data-state": r.getIsSelected() && "selected",
2578
2578
  children: r.getVisibleCells().map((d) => /* @__PURE__ */ e.jsx(Qs, { children: Ws(d.column.columnDef.cell, d.getContext()) }, d.id))
2579
2579
  },
2580
2580
  r.id
2581
- )) : /* @__PURE__ */ e.jsx(xs, { children: /* @__PURE__ */ e.jsx(Qs, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
2581
+ )) : /* @__PURE__ */ e.jsx(ps, { children: /* @__PURE__ */ e.jsx(Qs, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
2582
2582
  ] });
2583
2583
  }
2584
2584
  function ul({ card: s }) {
2585
2585
  var r, d, p, h, y, x, m, f;
2586
2586
  (r = s.customCardPreferences) != null && r.inputData;
2587
2587
  const { getCard: n } = ma(((d = s.customCardPreferences) == null ? void 0 : d.url) || ""), a = ((p = s.customCardPreferences) == null ? void 0 : p.visualType) || "single", t = c((u) => u.frame);
2588
- if (Ie(), !((h = s.customCardPreferences) != null && h.componentName))
2588
+ if (Le(), !((h = s.customCardPreferences) != null && h.componentName))
2589
2589
  return null;
2590
2590
  const i = n(
2591
2591
  (y = s.customCardPreferences) == null ? void 0 : y.componentName
@@ -2725,7 +2725,7 @@ function qa({
2725
2725
  function hl() {
2726
2726
  const [s, n] = V(!1), [a, t] = V(""), [i, o] = V(""), [l, r] = V(""), [d, p] = V(""), h = c((N) => N.card), y = c(
2727
2727
  (N) => N.card.customCfg
2728
- ), { setCardCustomCfg: x, setCustomVisualCode: m } = Ie();
2728
+ ), { setCardCustomCfg: x, setCustomVisualCode: m } = Le();
2729
2729
  function f(N) {
2730
2730
  var j, S;
2731
2731
  const M = {
@@ -3133,7 +3133,7 @@ function xl({ chartType: s, className: n }) {
3133
3133
  function ea() {
3134
3134
  const s = c((j) => j.frame), n = c((j) => j.card), a = c((j) => j.card.data), t = c((j) => j.isShowingVisual), i = c((j) => j.isSqlRunning), o = c((j) => j.queryError), l = c((j) => j.pythonStdOut), r = c((j) => j.actions.setRunSql);
3135
3135
  c((j) => j.onSave), c((j) => j.onClose), c((j) => j.actions.setCardSql), c((j) => j.actions.setCardType), c((j) => j.actions.setSqlGen);
3136
- const { setFrame: d, setCard: p, updateCardInFrame: h } = Ie();
3136
+ const { setFrame: d, setCard: p, updateCardInFrame: h } = Le();
3137
3137
  if (!n)
3138
3138
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
3139
3139
  function y() {
@@ -3394,7 +3394,7 @@ function jl({
3394
3394
  onValueChange: a
3395
3395
  }) {
3396
3396
  return /* @__PURE__ */ e.jsx(
3397
- os,
3397
+ cs,
3398
3398
  {
3399
3399
  value: n,
3400
3400
  onValueChange: a,
@@ -3407,7 +3407,7 @@ function jl({
3407
3407
  }
3408
3408
  );
3409
3409
  }
3410
- function ps({
3410
+ function ts({
3411
3411
  label: s,
3412
3412
  options: n,
3413
3413
  value: a,
@@ -3442,7 +3442,7 @@ function yl() {
3442
3442
  (u) => u.card.customCardPreferences
3443
3443
  ), { data: n } = bl(), a = (n == null ? void 0 : n.plugins) || [];
3444
3444
  c((u) => u.card);
3445
- const t = c((u) => u.frame), i = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: o } = Ie(), { components: l, manifest: r } = ma(
3445
+ const t = c((u) => u.frame), i = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: o } = Le(), { components: l, manifest: r } = ma(
3446
3446
  (s == null ? void 0 : s.url) || ""
3447
3447
  ), d = (f = r == null ? void 0 : r.visuals) == null ? void 0 : f.find(
3448
3448
  (u) => u.name === (s == null ? void 0 : s.componentName)
@@ -3480,7 +3480,7 @@ function yl() {
3480
3480
  children: [
3481
3481
  /* @__PURE__ */ e.jsx("div", { className: "col-span-4 flex items-center", children: N }),
3482
3482
  /* @__PURE__ */ e.jsx(
3483
- ps,
3483
+ ts,
3484
3484
  {
3485
3485
  className: "col-span-6 h-8 w-full justify-between",
3486
3486
  label: "",
@@ -3514,7 +3514,7 @@ function yl() {
3514
3514
  },
3515
3515
  k
3516
3516
  ) : u === "select" ? /* @__PURE__ */ e.jsx(
3517
- ps,
3517
+ ts,
3518
3518
  {
3519
3519
  className: "h-8 w-full",
3520
3520
  label: "",
@@ -3551,7 +3551,7 @@ function yl() {
3551
3551
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3552
3552
  /* @__PURE__ */ e.jsx(H, { children: `${(s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0 ? "Plugin ID" : "Website URL"}` }),
3553
3553
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
3554
- ps,
3554
+ ts,
3555
3555
  {
3556
3556
  className: "h-8 w-full",
3557
3557
  label: "",
@@ -3688,7 +3688,7 @@ function Oe() {
3688
3688
  children: /* @__PURE__ */ e.jsxs("div", { className: "grow", children: [
3689
3689
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 py-2", children: [
3690
3690
  /* @__PURE__ */ e.jsx(
3691
- rs,
3691
+ os,
3692
3692
  {
3693
3693
  checked: !!((x = a == null ? void 0 : a.onClickFilter) != null && x.find(
3694
3694
  (f) => f.columnIndex === y
@@ -3726,7 +3726,7 @@ function Oe() {
3726
3726
  })
3727
3727
  ] });
3728
3728
  }
3729
- function cs() {
3729
+ function ds() {
3730
3730
  var l, r, d;
3731
3731
  const s = c((p) => p.card.preferences), n = c(
3732
3732
  (p) => p.card.cfg
@@ -3736,7 +3736,7 @@ function cs() {
3736
3736
  i(p);
3737
3737
  }
3738
3738
  return /* @__PURE__ */ e.jsxs(
3739
- os,
3739
+ cs,
3740
3740
  {
3741
3741
  value: ((r = s == null ? void 0 : s.chartOptions) == null ? void 0 : r.indexAxis) || ((d = n == null ? void 0 : n.options) == null ? void 0 : d.indexAxis) || "x",
3742
3742
  onValueChange: o,
@@ -3777,7 +3777,7 @@ function Pa() {
3777
3777
  ((X = (E = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : E[i]) == null ? void 0 : X.max) || ""
3778
3778
  ), [y, x] = V(r || p ? "custom" : "auto"), [m, f] = V(""), [u, k] = V(0), [D, I] = V(""), [N, M] = V(""), [A, j] = V(""), S = c(
3779
3779
  (T) => T.actions.setCardPreferences
3780
- ), { updateCardInFrame: v } = Ie(), b = c((T) => T.card), q = c((T) => {
3780
+ ), { updateCardInFrame: v } = Le(), b = c((T) => T.card), q = c((T) => {
3781
3781
  var L;
3782
3782
  return (L = T.card) == null ? void 0 : L.type;
3783
3783
  }), $ = ["pie", "doughnut", "polarArea"].includes(q);
@@ -3794,7 +3794,7 @@ function Pa() {
3794
3794
  }
3795
3795
  function B() {
3796
3796
  const T = [
3797
- ...new Set(ns.map((L) => L.currency))
3797
+ ...new Set(ls.map((L) => L.currency))
3798
3798
  ];
3799
3799
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3800
3800
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
@@ -3838,7 +3838,7 @@ function Pa() {
3838
3838
  ),
3839
3839
  /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
3840
3840
  /* @__PURE__ */ e.jsx(fe, { children: "Locale" }),
3841
- ns.map((L) => /* @__PURE__ */ e.jsx(Q, { value: L.locale, children: L.locale }, L.locale))
3841
+ ls.map((L) => /* @__PURE__ */ e.jsx(Q, { value: L.locale, children: L.locale }, L.locale))
3842
3842
  ] }) })
3843
3843
  ] })
3844
3844
  ] }),
@@ -3960,7 +3960,7 @@ function Pa() {
3960
3960
  o == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
3961
3961
  /* @__PURE__ */ e.jsx(H, { htmlFor: "scale-option", children: "Setup" }),
3962
3962
  /* @__PURE__ */ e.jsxs(
3963
- os,
3963
+ cs,
3964
3964
  {
3965
3965
  disabled: $,
3966
3966
  id: "scale-option",
@@ -4279,7 +4279,7 @@ function Qa() {
4279
4279
  function Ae() {
4280
4280
  const s = z(
4281
4281
  (r) => r.dashboard.filters
4282
- ), n = c((r) => r.frame), { setFrame: a } = Ie(), { columns: t } = Me(), { assignFilter: i } = Qa();
4282
+ ), n = c((r) => r.frame), { setFrame: a } = Le(), { columns: t } = Me(), { assignFilter: i } = Qa();
4283
4283
  function o(r) {
4284
4284
  const d = i(r, "frame");
4285
4285
  a({ ...n, filterId: d });
@@ -4346,7 +4346,7 @@ function Cl({
4346
4346
  function Sl({
4347
4347
  cardType: s
4348
4348
  }) {
4349
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4349
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Te, { defaultValue: ["item-2"], type: "multiple", children: [
4350
4350
  /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4351
4351
  /* @__PURE__ */ e.jsx(G, { children: `${qs(s)} Chart` }),
4352
4352
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 font-mono text-xs", children: [
@@ -4375,7 +4375,7 @@ function Sl({
4375
4375
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
4376
4376
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
4377
4377
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
4378
- /* @__PURE__ */ e.jsx(cs, {}),
4378
+ /* @__PURE__ */ e.jsx(ds, {}),
4379
4379
  /* @__PURE__ */ e.jsx(Wa, {})
4380
4380
  ] })
4381
4381
  ] }),
@@ -4469,7 +4469,7 @@ function wl({
4469
4469
  ] })
4470
4470
  ] });
4471
4471
  }
4472
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4472
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Te, { defaultValue: ["item-2"], type: "multiple", children: [
4473
4473
  /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4474
4474
  /* @__PURE__ */ e.jsx(G, { children: `${qs(s)} Chart` }),
4475
4475
  /* @__PURE__ */ e.jsx(K, { className: "space-y-4 font-mono text-xs", children: n(s) })
@@ -4514,7 +4514,7 @@ function Fl() {
4514
4514
  const s = c((n) => n.card.type);
4515
4515
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
4516
4516
  /* @__PURE__ */ e.jsx(
4517
- Le,
4517
+ Te,
4518
4518
  {
4519
4519
  className: " ",
4520
4520
  type: "single",
@@ -4522,7 +4522,7 @@ function Fl() {
4522
4522
  children: Ll(s)
4523
4523
  }
4524
4524
  ),
4525
- /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(cs, {}) }),
4525
+ /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ds, {}) }),
4526
4526
  !["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4527
4527
  /* @__PURE__ */ e.jsx($s, {}),
4528
4528
  /* @__PURE__ */ e.jsx(Oe, {}),
@@ -4661,11 +4661,11 @@ function Tl() {
4661
4661
  }
4662
4662
  ) || [], l = c(
4663
4663
  (m) => m.actions.setColorRanges
4664
- ), r = [...new Set(ns.map((m) => m.currency))];
4664
+ ), r = [...new Set(ls.map((m) => m.currency))];
4665
4665
  return /* @__PURE__ */ e.jsxs("div", { children: [
4666
4666
  /* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
4667
4667
  /* @__PURE__ */ e.jsx(
4668
- rs,
4668
+ os,
4669
4669
  {
4670
4670
  checked: !!((d = s == null ? void 0 : s.formatNumber) != null && d.enabled),
4671
4671
  onCheckedChange: (m) => {
@@ -4703,7 +4703,7 @@ function Tl() {
4703
4703
  /* @__PURE__ */ e.jsx(me, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
4704
4704
  /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
4705
4705
  /* @__PURE__ */ e.jsx(fe, { children: "Format" }),
4706
- ns.map((m) => /* @__PURE__ */ e.jsx(Q, { value: m.locale, children: m.locale }, m.locale))
4706
+ ls.map((m) => /* @__PURE__ */ e.jsx(Q, { value: m.locale, children: m.locale }, m.locale))
4707
4707
  ] }) })
4708
4708
  ]
4709
4709
  }
@@ -4794,7 +4794,7 @@ function Tl() {
4794
4794
  }
4795
4795
  function Dl() {
4796
4796
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
4797
- /* @__PURE__ */ e.jsx(Le, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4797
+ /* @__PURE__ */ e.jsx(Te, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4798
4798
  /* @__PURE__ */ e.jsx(G, { className: "", children: "KPI Query" }),
4799
4799
  /* @__PURE__ */ e.jsxs(K, { className: "font-mono", children: [
4800
4800
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
@@ -4836,7 +4836,7 @@ function Il() {
4836
4836
  });
4837
4837
  }
4838
4838
  return /* @__PURE__ */ e.jsxs(
4839
- os,
4839
+ cs,
4840
4840
  {
4841
4841
  value: (t = s == null ? void 0 : s.textVisualOptions) != null && t.isDynamicText ? "dynamic" : "static",
4842
4842
  onValueChange: a,
@@ -4860,7 +4860,7 @@ function Ze({
4860
4860
  docContent: n,
4861
4861
  suffix: a = "Chart"
4862
4862
  }) {
4863
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4863
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Te, { defaultValue: ["item-2"], type: "multiple", children: [
4864
4864
  /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4865
4865
  /* @__PURE__ */ e.jsx(G, { children: `${qs(s)} ${a}` }),
4866
4866
  /* @__PURE__ */ e.jsx(K, { children: n || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
@@ -4888,7 +4888,7 @@ function Ze({
4888
4888
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
4889
4889
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
4890
4890
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
4891
- s === "range" && /* @__PURE__ */ e.jsx(cs, {}),
4891
+ s === "range" && /* @__PURE__ */ e.jsx(ds, {}),
4892
4892
  s !== "text" && /* @__PURE__ */ e.jsx($s, {}),
4893
4893
  s === "text" && /* @__PURE__ */ e.jsx(Il, {})
4894
4894
  ] })
@@ -4903,7 +4903,43 @@ function Ze({
4903
4903
  ] }) });
4904
4904
  }
4905
4905
  function Ml() {
4906
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
4906
+ const s = c(
4907
+ (t) => {
4908
+ var i, o;
4909
+ return (o = (i = t == null ? void 0 : t.card) == null ? void 0 : i.preferences) == null ? void 0 : o.sortChart;
4910
+ }
4911
+ ), { setSortChart: n } = Le();
4912
+ function a() {
4913
+ return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4914
+ /* @__PURE__ */ e.jsx(H, { children: "Sort" }),
4915
+ /* @__PURE__ */ e.jsx(
4916
+ ts,
4917
+ {
4918
+ className: "h-8",
4919
+ label: "Sort Chart",
4920
+ options: [
4921
+ {
4922
+ label: "None",
4923
+ value: "none"
4924
+ },
4925
+ {
4926
+ label: "ASC",
4927
+ value: "asc"
4928
+ },
4929
+ {
4930
+ label: "DESC",
4931
+ value: "desc"
4932
+ }
4933
+ ],
4934
+ value: s || "none",
4935
+ onValueChange: (t) => {
4936
+ n(t);
4937
+ }
4938
+ }
4939
+ )
4940
+ ] });
4941
+ }
4942
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Te, { defaultValue: ["item-2"], type: "multiple", children: [
4907
4943
  /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4908
4944
  /* @__PURE__ */ e.jsx(G, { children: "Stacked Chart" }),
4909
4945
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 font-mono text-xs", children: [
@@ -4919,7 +4955,7 @@ function Ml() {
4919
4955
  "a",
4920
4956
  {
4921
4957
  target: "_blank",
4922
- onClick: (s) => s.stopPropagation(),
4958
+ onClick: (t) => t.stopPropagation(),
4923
4959
  className: "text-blue-700",
4924
4960
  href: "https://docs.semaphor.cloud/concepts/visuals#stacked-chart",
4925
4961
  children: "example"
@@ -4932,7 +4968,8 @@ function Ml() {
4932
4968
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
4933
4969
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
4934
4970
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
4935
- /* @__PURE__ */ e.jsx(cs, {}),
4971
+ /* @__PURE__ */ e.jsx(ds, {}),
4972
+ a(),
4936
4973
  /* @__PURE__ */ e.jsx(Wa, {})
4937
4974
  ] })
4938
4975
  ] }),
@@ -4958,7 +4995,7 @@ function Ol({}) {
4958
4995
  });
4959
4996
  };
4960
4997
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
4961
- /* @__PURE__ */ e.jsx(Le, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(U, { value: "item-3", children: [
4998
+ /* @__PURE__ */ e.jsx(Te, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(U, { value: "item-3", children: [
4962
4999
  /* @__PURE__ */ e.jsx(G, { children: "Filters" }),
4963
5000
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
4964
5001
  /* @__PURE__ */ e.jsx(Oe, {}),
@@ -4966,7 +5003,7 @@ function Ol({}) {
4966
5003
  ] })
4967
5004
  ] }) }),
4968
5005
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
4969
- /* @__PURE__ */ e.jsx(rs, { onCheckedChange: a, id: "allow-download" }),
5006
+ /* @__PURE__ */ e.jsx(os, { onCheckedChange: a, id: "allow-download" }),
4970
5007
  /* @__PURE__ */ e.jsx(
4971
5008
  "label",
4972
5009
  {
@@ -5079,7 +5116,7 @@ function Rl() {
5079
5116
  className: "min-h-[250px] min-w-full max-w-lg",
5080
5117
  children: [
5081
5118
  /* @__PURE__ */ e.jsx(
5082
- De,
5119
+ Ie,
5083
5120
  {
5084
5121
  role: "query-section",
5085
5122
  className: "flex",
@@ -5090,7 +5127,7 @@ function Rl() {
5090
5127
  ),
5091
5128
  /* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
5092
5129
  /* @__PURE__ */ e.jsx(
5093
- De,
5130
+ Ie,
5094
5131
  {
5095
5132
  className: "pb-1",
5096
5133
  role: "visual-section",
@@ -5098,7 +5135,7 @@ function Rl() {
5098
5135
  defaultSize: 60,
5099
5136
  children: s ? /* @__PURE__ */ e.jsxs(js, { direction: "horizontal", children: [
5100
5137
  /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
5101
- De,
5138
+ Ie,
5102
5139
  {
5103
5140
  className: "flex min-w-[275px]",
5104
5141
  minSize: 20,
@@ -5108,7 +5145,7 @@ function Rl() {
5108
5145
  }
5109
5146
  ) }),
5110
5147
  /* @__PURE__ */ e.jsx(bs, { className: "border" }),
5111
- /* @__PURE__ */ e.jsx(De, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ea, {}) })
5148
+ /* @__PURE__ */ e.jsx(Ie, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ea, {}) })
5112
5149
  ] }) : /* @__PURE__ */ e.jsx(ea, {})
5113
5150
  }
5114
5151
  )