react-semaphor 0.1.600 → 0.1.602
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.
- package/dist/analytics-protocol/index.js +9 -9
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/briefings/index.js +48 -45
- package/dist/chunks/{assistant-chat-BULOkG9j.js → assistant-chat-BWF3GYip.js} +12 -12
- package/dist/chunks/{bookmark-impact-kdvXke8n.js → bookmark-impact-BF3iRx5a.js} +3 -3
- package/dist/chunks/{bookmark-state-h1OLXVjE.js → bookmark-state-CBSTdW6q.js} +4 -4
- package/dist/chunks/{card-filter-builder-CSCdSQQy.js → card-filter-builder-B8XHwMY6.js} +394 -394
- package/dist/chunks/comparison-window-caption-W83qB4V5.js +741 -0
- package/dist/chunks/{dashboard-y9ON19ge.js → dashboard-DG5EIYYB.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-9YwUclHA.js → dashboard-briefing-launcher-CBSrhyWZ.js} +727 -718
- package/dist/chunks/{dashboard-controls-O6PNXMCp.js → dashboard-controls-D6ECO4N1.js} +15 -15
- package/dist/chunks/{dashboard-json-Bxf91TYq.js → dashboard-json-DrJftBSL.js} +4 -4
- package/dist/chunks/{dates-DPTbpNxK.js → dates-Bz-qM5px.js} +10 -10
- package/dist/chunks/{edit-dashboard-visual-CKwaW8H_.js → edit-dashboard-visual-BDYAJIbb.js} +1569 -1548
- package/dist/chunks/filter-line-BXT6y303.js +703 -0
- package/dist/chunks/{filter-reach-copy-ClzNcNhP.js → filter-reach-copy-BukhZmzm.js} +1688 -1806
- package/dist/chunks/{filter-value-text-CXyuLW9Q.js → filter-value-text-D3-bf3_b.js} +6 -6
- package/dist/chunks/{index-CRo5--Y6.js → index-BW0yozjs.js} +386 -360
- package/dist/chunks/{layout-grid-DSrBSfPM.js → layout-grid-Ds0diMeY.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-i9PQY066.js → matrix-analytical-definition-CgQgVeeI.js} +35 -35
- package/dist/chunks/{matrix-member-presentation-B_2beBc0.js → matrix-member-presentation-DSBIIudt.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-DdK0J_KU.js → matrix-operation-contract--DkNCOzd.js} +517 -514
- package/dist/chunks/{metric-comparison-Bhz0V841.js → metric-comparison-zMylnIkc.js} +3 -3
- package/dist/chunks/{paintbrush-1UiU-uTz.js → paintbrush-CX8pao1j.js} +1 -1
- package/dist/chunks/{palette-DFIFf_-m.js → palette-CuA0HlzF.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Dk7WFR_u.js → pivot-result-contract-expectations-C8KL7hPx.js} +14 -14
- package/dist/chunks/{pivot-result-identity-CzzrJpEm.js → pivot-result-identity-C1AOH1PS.js} +1 -1
- package/dist/chunks/{raw-temporal-value-BLvdaMng.js → raw-temporal-value-E416F-0L.js} +16 -16
- package/dist/chunks/{report-preferences-dialog-DiDsYpng.js → report-preferences-dialog-CbuVNDGi.js} +13 -13
- package/dist/chunks/{report-runtime-context-CEGluufW.js → report-runtime-context-E7USjN7E.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-BAv33KGg.js → resolve-dashboard-input-context-CULCE_hM.js} +8419 -7054
- package/dist/chunks/{save-CWQ02kHo.js → save-BKHlDONy.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CvzYqADe.js → saved-dashboard-context-C1WlOx5z.js} +24 -24
- package/dist/chunks/{selection-filter-compiler-SwrBvyyJ.js → selection-filter-compiler-ifT8JCXS.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-1PRI9Yh2.js → semaphor-ready-indicator-CBIRcDWs.js} +33810 -32067
- package/dist/chunks/{shelf-drop-preview-context-BLk5Nc6K.js → shelf-drop-preview-context-xR69SMA8.js} +53 -53
- package/dist/chunks/{stored-dashboard-xhYYKBsO.js → stored-dashboard-BuM8vnWf.js} +679 -657
- package/dist/chunks/{style-sheet-parts-BX7d7-2-.js → style-sheet-parts-Bt9ZNre8.js} +2 -2
- package/dist/chunks/{table-export-sheet-BWSVTclx.js → table-export-sheet-DVljtHkG.js} +1 -1
- package/dist/chunks/{token-types-CnlEiAdS.js → token-types-D_xKgyVS.js} +1 -1
- package/dist/chunks/{upload-DsqUSS8l.js → upload-Dll_M7XQ.js} +1 -1
- package/dist/chunks/{validators-D2Hm57lJ.js → validators-ClWHpYql.js} +80 -80
- package/dist/chunks/{variable-draft-DcKj8T1b.js → variable-draft-CDGGl53R.js} +27 -28
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +3086 -2573
- package/dist/format-utils/index.js +238 -237
- package/dist/index.js +71 -73
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +45 -4
- package/dist/types/briefings/index.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-web-component.d.ts +7 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
- package/dist/types/lib/export-utils.d.ts +72 -0
- package/dist/types/lib/formatters/dashboard-temporal-presentation.d.ts +10 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
- package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/card-data-file.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +144 -2
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +21 -2
- package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +10 -1
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +133 -0
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +18 -5
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/comparison-window-caption-DJDwP9XO.js +0 -1309
- package/dist/chunks/filter-line-Dkg3yuOX.js +0 -134
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { c as nt, B as G, X as ce, x as Ne, q as
|
|
2
|
-
import { jsx as t, jsxs as i, Fragment as
|
|
1
|
+
import { c as nt, B as G, X as ce, x as Ne, q as fn, a3 as xn, t as at, u as rt, v as st, w as ot, a4 as Ft, F as _e, s as ie, y as xe, z as ge, A as be, D as ve, E as re, e as lt, f as it, h as dt, L as gn, d as bn } from "./style-sheet-parts-Bt9ZNre8.js";
|
|
2
|
+
import { jsx as t, jsxs as i, Fragment as he } from "react/jsx-runtime";
|
|
3
3
|
import * as Fe from "react";
|
|
4
4
|
import bt, { useMemo as P, useState as Y, useRef as $e, useCallback as ne, useEffect as de, forwardRef as vn, Fragment as yn } from "react";
|
|
5
|
-
import { b8 as ct, u as ut, am as se, bL as Vt, bM as J, bN as Nn, bO as Te, bP as Ue, bQ as Rt, bR as Cn, bS as Ve, bT as wn, an as Et, bG as kn, bH as Sn, bJ as Dn, bU as Tn, bV as In, o as Ln, bW as $n, bX as An, bY as vt, bZ as zt, b_ as On, b$ as Mt, c0 as
|
|
6
|
-
import { D as Xn } from "./token-types-
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import "./matrix-operation-contract
|
|
5
|
+
import { b8 as ct, u as ut, am as se, bL as Vt, bM as J, bN as Nn, bO as Te, bP as Ue, bQ as Rt, bR as Cn, bS as Ve, bT as wn, an as Et, bG as kn, bH as Sn, bJ as Dn, bU as Tn, bV as In, o as Ln, bW as $n, bX as An, bY as vt, bZ as zt, b_ as On, b$ as Mt, c0 as qt, c1 as _n, c2 as Fn, c3 as Vn, c4 as Rn, c5 as En, c6 as zn, c7 as Mn, bz as qn, c8 as yt, c9 as jt, ca as Nt, bC as jn, cb as Un, cc as Gn, cd as Bn, ce as ye, cf as Ut, cg as Wn, ch as Qn, ci as Kn, cj as Pn, ck as Hn, cl as Je, cm as fe, cn as Ze, co as et, cp as tt, cq as Yn, cr as Re, cs as Ee, ct as ze, cu as Me, cv as Gt, cw as Bt, cx as Wt } from "./semaphor-ready-indicator-CBIRcDWs.js";
|
|
6
|
+
import { D as Xn } from "./token-types-D_xKgyVS.js";
|
|
7
|
+
import { hn as Qt, cL as Kt, cK as Pt, ho as Jn, hp as Zn, hq as Ae, hr as Ct, hs as wt, ht as Qe, hu as Ke, hv as ea, hw as ta, hx as kt, hy as na, hz as aa, hA as Oe, hB as ra, hC as St, hD as Ht, hE as Yt, hF as Xt, hG as Jt, hH as sa, hI as oa, hJ as Dt, hK as la, hL as Tt, hM as ia, hN as da, hO as ca, hP as ua, hQ as Pe, e as qe, hR as ma, hS as It, hT as pa, hU as He, aQ as ha, hV as fa, hW as xa, hX as ga, hY as ba } from "./resolve-dashboard-input-context-CULCE_hM.js";
|
|
8
|
+
import { c as q } from "./pickers-DkqmtnTL.js";
|
|
9
|
+
import { k as Zt, r as va, aE as en, aF as tn } from "./validators-ClWHpYql.js";
|
|
10
|
+
import "./matrix-operation-contract--DkNCOzd.js";
|
|
11
11
|
import "./analytics-base-schemas-DevrgqQb.js";
|
|
12
12
|
import "../value-format-preferences/index.js";
|
|
13
|
-
import { U as ya } from "./upload-
|
|
14
|
-
import {
|
|
15
|
-
import { r as Na, j as Ca } from "./raw-temporal-value-
|
|
13
|
+
import { U as ya } from "./upload-Dll_M7XQ.js";
|
|
14
|
+
import { a as nn } from "./metric-comparison-zMylnIkc.js";
|
|
15
|
+
import { r as Na, j as Ca } from "./raw-temporal-value-E416F-0L.js";
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v0.453.0 - ISC
|
|
18
18
|
*
|
|
@@ -101,8 +101,8 @@ function an(e) {
|
|
|
101
101
|
(s) => s.selectedConnectionId
|
|
102
102
|
), se(
|
|
103
103
|
(s) => {
|
|
104
|
-
var c,
|
|
105
|
-
return (
|
|
104
|
+
var c, x;
|
|
105
|
+
return (x = (c = s == null ? void 0 : s.card) == null ? void 0 : c.dataSource) == null ? void 0 : x.connectionId;
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
const {
|
|
@@ -162,7 +162,7 @@ function La({
|
|
|
162
162
|
selectedEntities: o,
|
|
163
163
|
onSelectionChange: m
|
|
164
164
|
}) {
|
|
165
|
-
const { semanticDomains: d, isSemanticDomainsLoading: u } = an(), l = P(() => Aa(d, e), [d, e]), s = P(() => a ? l.filter((
|
|
165
|
+
const { semanticDomains: d, isSemanticDomainsLoading: u } = an(), l = P(() => Aa(d, e), [d, e]), s = P(() => a ? l.filter((x) => x.id === a) : l, [l, a]);
|
|
166
166
|
if (u && s.length === 0)
|
|
167
167
|
return /* @__PURE__ */ t("div", { className: "px-3 py-4 text-[11px] text-muted-foreground", children: "Loading semantic domains…" });
|
|
168
168
|
if (s.length === 0)
|
|
@@ -170,16 +170,16 @@ function La({
|
|
|
170
170
|
const c = !!a;
|
|
171
171
|
return /* @__PURE__ */ i("div", { children: [
|
|
172
172
|
/* @__PURE__ */ t(rn, { label: "Semantic Domains" }),
|
|
173
|
-
s.map((
|
|
173
|
+
s.map((x) => /* @__PURE__ */ t(
|
|
174
174
|
$a,
|
|
175
175
|
{
|
|
176
|
-
domain:
|
|
176
|
+
domain: x,
|
|
177
177
|
search: n,
|
|
178
178
|
forceExpanded: c,
|
|
179
179
|
selectedEntities: o,
|
|
180
180
|
onSelectionChange: m
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
x.id
|
|
183
183
|
))
|
|
184
184
|
] });
|
|
185
185
|
}
|
|
@@ -192,19 +192,19 @@ function $a({
|
|
|
192
192
|
}) {
|
|
193
193
|
const [d, u] = Y(!1), l = d || n.length > 0 || !!a, { datasets: s, isPending: c } = Nn(
|
|
194
194
|
l ? e.id : void 0
|
|
195
|
-
),
|
|
195
|
+
), x = P(() => {
|
|
196
196
|
if (!n) return s;
|
|
197
197
|
const C = n.trim().toLowerCase();
|
|
198
198
|
return s.filter(
|
|
199
199
|
(T) => `${T.label ?? ""} ${T.name ?? ""} ${T.description ?? ""}`.toLowerCase().includes(C)
|
|
200
200
|
);
|
|
201
|
-
}, [s, n]), k = n.length > 0 &&
|
|
201
|
+
}, [s, n]), k = n.length > 0 && x.length > 0, y = d || k || !!a, f = s.length, N = P(() => x.filter(
|
|
202
202
|
(C) => o.some(
|
|
203
203
|
(T) => J(T, Le(C))
|
|
204
204
|
)
|
|
205
|
-
).length, [
|
|
206
|
-
() =>
|
|
207
|
-
[
|
|
205
|
+
).length, [x, o]), S = P(
|
|
206
|
+
() => x.map(Le),
|
|
207
|
+
[x]
|
|
208
208
|
), V = S.length > 0 && S.every(
|
|
209
209
|
(C) => o.some((T) => J(T, C))
|
|
210
210
|
), F = () => {
|
|
@@ -247,7 +247,7 @@ function $a({
|
|
|
247
247
|
/* @__PURE__ */ t(
|
|
248
248
|
Te,
|
|
249
249
|
{
|
|
250
|
-
className:
|
|
250
|
+
className: q(
|
|
251
251
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
252
252
|
y && "rotate-90"
|
|
253
253
|
),
|
|
@@ -255,11 +255,11 @@ function $a({
|
|
|
255
255
|
}
|
|
256
256
|
),
|
|
257
257
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || e.name }),
|
|
258
|
-
|
|
258
|
+
f > 0 && /* @__PURE__ */ i("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: [
|
|
259
259
|
"· ",
|
|
260
|
-
|
|
260
|
+
f,
|
|
261
261
|
" dataset",
|
|
262
|
-
|
|
262
|
+
f === 1 ? "" : "s",
|
|
263
263
|
" · curated"
|
|
264
264
|
] })
|
|
265
265
|
]
|
|
@@ -276,7 +276,7 @@ function $a({
|
|
|
276
276
|
),
|
|
277
277
|
/* @__PURE__ */ t("span", { className: "ml-auto font-mono text-[10px] tabular-nums text-muted-foreground", children: N > 0 ? N : "" })
|
|
278
278
|
] }),
|
|
279
|
-
y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: c && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) :
|
|
279
|
+
y && /* @__PURE__ */ t("ul", { className: "space-y-px pb-1", children: c && s.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "Loading datasets…" }) : x.length === 0 ? /* @__PURE__ */ t("li", { className: "px-9 py-1.5 text-[11px] text-muted-foreground", children: "No datasets in this domain." }) : x.map((C) => {
|
|
280
280
|
const T = Le(C), U = o.some(
|
|
281
281
|
(Z) => J(Z, T)
|
|
282
282
|
);
|
|
@@ -362,7 +362,7 @@ function _a({
|
|
|
362
362
|
onSelectionChange: m
|
|
363
363
|
}) {
|
|
364
364
|
var N;
|
|
365
|
-
const [d, u] = Y(!1), l = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], c = s.includes("database"),
|
|
365
|
+
const [d, u] = Y(!1), l = d || n.length > 0 || !!a, s = ((N = e.capabilities) == null ? void 0 : N.path) ?? [], c = s.includes("database"), x = s.includes("schema"), k = e.type === "upload", y = e.type === "url", f = P(
|
|
366
366
|
() => o.filter((S) => S.connectionId === e.id).length,
|
|
367
367
|
[o, e.id]
|
|
368
368
|
);
|
|
@@ -377,7 +377,7 @@ function _a({
|
|
|
377
377
|
/* @__PURE__ */ t(
|
|
378
378
|
Te,
|
|
379
379
|
{
|
|
380
|
-
className:
|
|
380
|
+
className: q(
|
|
381
381
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
382
382
|
l && "rotate-90"
|
|
383
383
|
),
|
|
@@ -389,11 +389,11 @@ function _a({
|
|
|
389
389
|
"· ",
|
|
390
390
|
e.type
|
|
391
391
|
] }),
|
|
392
|
-
/* @__PURE__ */ t("span", { className: "ml-auto shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground", children:
|
|
392
|
+
/* @__PURE__ */ t("span", { className: "ml-auto shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground", children: f > 0 ? f : "" })
|
|
393
393
|
]
|
|
394
394
|
}
|
|
395
395
|
),
|
|
396
|
-
l && /* @__PURE__ */ i(
|
|
396
|
+
l && /* @__PURE__ */ i(he, { children: [
|
|
397
397
|
k ? /* @__PURE__ */ t(
|
|
398
398
|
Fa,
|
|
399
399
|
{
|
|
@@ -412,12 +412,12 @@ function _a({
|
|
|
412
412
|
Ra,
|
|
413
413
|
{
|
|
414
414
|
connection: e,
|
|
415
|
-
requiresSchema:
|
|
415
|
+
requiresSchema: x,
|
|
416
416
|
search: n,
|
|
417
417
|
selectedEntities: o,
|
|
418
418
|
onSelectionChange: m
|
|
419
419
|
}
|
|
420
|
-
) :
|
|
420
|
+
) : x ? /* @__PURE__ */ t(
|
|
421
421
|
sn,
|
|
422
422
|
{
|
|
423
423
|
connection: e,
|
|
@@ -537,9 +537,9 @@ function Va({
|
|
|
537
537
|
}) {
|
|
538
538
|
const [o, m] = Y(""), [d, u] = Y(""), [l, s] = Y("api"), c = n.filter(
|
|
539
539
|
(y) => y.connectionId === e.id && y.type === "url"
|
|
540
|
-
),
|
|
541
|
-
const y = o.trim(),
|
|
542
|
-
if (!y || !
|
|
540
|
+
), x = () => {
|
|
541
|
+
const y = o.trim(), f = d.trim();
|
|
542
|
+
if (!y || !f) return;
|
|
543
543
|
const N = {
|
|
544
544
|
id: `url-${Date.now()}-${Math.random()}`,
|
|
545
545
|
name: y,
|
|
@@ -549,14 +549,14 @@ function Va({
|
|
|
549
549
|
label: y,
|
|
550
550
|
description: `URL source of type ${l}`,
|
|
551
551
|
originalName: y,
|
|
552
|
-
url:
|
|
552
|
+
url: f,
|
|
553
553
|
sourceType: l
|
|
554
554
|
};
|
|
555
555
|
a([...n, N]), m(""), u(""), s("api");
|
|
556
556
|
}, k = (y) => {
|
|
557
557
|
a(
|
|
558
558
|
n.filter(
|
|
559
|
-
(
|
|
559
|
+
(f) => !("id" in f && f.id === y && f.connectionId === e.id && f.type === "url")
|
|
560
560
|
)
|
|
561
561
|
);
|
|
562
562
|
};
|
|
@@ -601,7 +601,7 @@ function Va({
|
|
|
601
601
|
size: "sm",
|
|
602
602
|
className: "h-7 text-[12px]",
|
|
603
603
|
disabled: !o.trim() || !d.trim(),
|
|
604
|
-
onClick:
|
|
604
|
+
onClick: x,
|
|
605
605
|
children: [
|
|
606
606
|
/* @__PURE__ */ t(Ve, { className: "mr-1 h-3 w-3" }),
|
|
607
607
|
"Add"
|
|
@@ -740,18 +740,18 @@ function mt({
|
|
|
740
740
|
["tables", e.id, n, a]
|
|
741
741
|
), l = P(() => {
|
|
742
742
|
var S;
|
|
743
|
-
const
|
|
744
|
-
if (!o) return
|
|
743
|
+
const f = ((S = u.data) == null ? void 0 : S.tables) ?? [];
|
|
744
|
+
if (!o) return f;
|
|
745
745
|
const N = o.trim().toLowerCase();
|
|
746
|
-
return
|
|
747
|
-
}, [u.data, o]), s = (
|
|
746
|
+
return f.filter((V) => V.table_name.toLowerCase().includes(N));
|
|
747
|
+
}, [u.data, o]), s = (f, N) => ({
|
|
748
748
|
connectionId: e.id,
|
|
749
749
|
connectionType: e.type,
|
|
750
750
|
type: "table",
|
|
751
751
|
dialect: e.dialect,
|
|
752
752
|
database: n || void 0,
|
|
753
753
|
schema: a || void 0,
|
|
754
|
-
name:
|
|
754
|
+
name: f,
|
|
755
755
|
dbObjectType: N == null ? void 0 : N.toLowerCase()
|
|
756
756
|
});
|
|
757
757
|
if (u.isLoading)
|
|
@@ -759,11 +759,11 @@ function mt({
|
|
|
759
759
|
if (l.length === 0)
|
|
760
760
|
return o ? null : /* @__PURE__ */ t("div", { className: "px-10 py-1.5 text-[11px] text-muted-foreground", children: "No tables." });
|
|
761
761
|
const c = l.map(
|
|
762
|
-
(
|
|
763
|
-
),
|
|
764
|
-
(
|
|
765
|
-
), k = (
|
|
766
|
-
const S = s(
|
|
762
|
+
(f) => s(f.table_name, f.table_type)
|
|
763
|
+
), x = c.length > 0 && c.every(
|
|
764
|
+
(f) => m.some((N) => J(N, f))
|
|
765
|
+
), k = (f, N) => {
|
|
766
|
+
const S = s(f, N), V = m.some(
|
|
767
767
|
(F) => J(F, S)
|
|
768
768
|
);
|
|
769
769
|
d(
|
|
@@ -771,7 +771,7 @@ function mt({
|
|
|
771
771
|
);
|
|
772
772
|
}, y = () => {
|
|
773
773
|
if (c.length === 0) return;
|
|
774
|
-
if (
|
|
774
|
+
if (x) {
|
|
775
775
|
d(
|
|
776
776
|
m.filter(
|
|
777
777
|
(N) => !c.some(
|
|
@@ -781,10 +781,10 @@ function mt({
|
|
|
781
781
|
);
|
|
782
782
|
return;
|
|
783
783
|
}
|
|
784
|
-
const
|
|
784
|
+
const f = [...m];
|
|
785
785
|
for (const N of c)
|
|
786
|
-
|
|
787
|
-
d(
|
|
786
|
+
f.some((S) => J(S, N)) || f.push(N);
|
|
787
|
+
d(f);
|
|
788
788
|
};
|
|
789
789
|
return /* @__PURE__ */ i("ul", { children: [
|
|
790
790
|
/* @__PURE__ */ i("li", { className: "flex items-center justify-between gap-2 py-1 pl-12 pr-4", children: [
|
|
@@ -799,12 +799,12 @@ function mt({
|
|
|
799
799
|
type: "button",
|
|
800
800
|
onClick: y,
|
|
801
801
|
className: "rounded-[3px] px-1.5 py-0.5 text-[10.5px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
802
|
-
children:
|
|
802
|
+
children: x ? "Clear" : "Select all"
|
|
803
803
|
}
|
|
804
804
|
)
|
|
805
805
|
] }),
|
|
806
|
-
l.map((
|
|
807
|
-
const N = s(
|
|
806
|
+
l.map((f) => {
|
|
807
|
+
const N = s(f.table_name, f.table_type), S = m.some(
|
|
808
808
|
(V) => J(V, N)
|
|
809
809
|
);
|
|
810
810
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ i("label", { className: "flex cursor-pointer items-center gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
|
|
@@ -812,22 +812,22 @@ function mt({
|
|
|
812
812
|
Ue,
|
|
813
813
|
{
|
|
814
814
|
checked: S,
|
|
815
|
-
onCheckedChange: () => k(
|
|
815
|
+
onCheckedChange: () => k(f.table_name, f.table_type),
|
|
816
816
|
className: "h-3.5 w-3.5 shrink-0"
|
|
817
817
|
}
|
|
818
818
|
),
|
|
819
819
|
/* @__PURE__ */ t(
|
|
820
|
-
|
|
820
|
+
fn,
|
|
821
821
|
{
|
|
822
822
|
className: "h-3.5 w-3.5 shrink-0 text-muted-foreground",
|
|
823
823
|
strokeWidth: 1.75
|
|
824
824
|
}
|
|
825
825
|
),
|
|
826
826
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-baseline gap-1.5", children: [
|
|
827
|
-
/* @__PURE__ */ t("span", { className: "truncate text-[13px] text-foreground/90", children:
|
|
828
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[10px] uppercase tracking-[0.06em] text-muted-foreground/70", children:
|
|
827
|
+
/* @__PURE__ */ t("span", { className: "truncate text-[13px] text-foreground/90", children: f.table_name }),
|
|
828
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 font-mono text-[10px] uppercase tracking-[0.06em] text-muted-foreground/70", children: f.table_type ?? "table" })
|
|
829
829
|
] })
|
|
830
|
-
] }) },
|
|
830
|
+
] }) }, f.table_name);
|
|
831
831
|
})
|
|
832
832
|
] });
|
|
833
833
|
}
|
|
@@ -846,7 +846,7 @@ function Ea({
|
|
|
846
846
|
if (!n) return l;
|
|
847
847
|
const s = n.trim().toLowerCase();
|
|
848
848
|
return l.filter(
|
|
849
|
-
(
|
|
849
|
+
(x) => `${x.label ?? ""} ${x.name ?? ""} ${x.description ?? ""}`.toLowerCase().includes(s)
|
|
850
850
|
);
|
|
851
851
|
}, [m.data, n]);
|
|
852
852
|
if (m.isLoading || d.length === 0) return null;
|
|
@@ -863,10 +863,10 @@ function Ea({
|
|
|
863
863
|
database: l.database || "",
|
|
864
864
|
schema: l.schema || ""
|
|
865
865
|
}, c = a.some(
|
|
866
|
-
(
|
|
866
|
+
(x) => J(x, s)
|
|
867
867
|
);
|
|
868
868
|
o(
|
|
869
|
-
c ? a.filter((
|
|
869
|
+
c ? a.filter((x) => !J(x, s)) : [...a, s]
|
|
870
870
|
);
|
|
871
871
|
};
|
|
872
872
|
return /* @__PURE__ */ i("div", { children: [
|
|
@@ -884,7 +884,7 @@ function Ea({
|
|
|
884
884
|
database: l.database || "",
|
|
885
885
|
schema: l.schema || ""
|
|
886
886
|
}, c = a.some(
|
|
887
|
-
(
|
|
887
|
+
(x) => J(x, s)
|
|
888
888
|
);
|
|
889
889
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ i("label", { className: "flex cursor-pointer items-start gap-2.5 py-1.5 pl-12 pr-4 transition-colors hover:bg-muted/40", children: [
|
|
890
890
|
/* @__PURE__ */ t(
|
|
@@ -926,7 +926,7 @@ function on({
|
|
|
926
926
|
{
|
|
927
927
|
type: "button",
|
|
928
928
|
onClick: () => d((s) => !s),
|
|
929
|
-
className:
|
|
929
|
+
className: q(
|
|
930
930
|
"flex h-6 w-full items-center gap-1.5 pr-4 text-left transition-colors hover:bg-muted/40",
|
|
931
931
|
n === 1 ? "pl-8" : "pl-10"
|
|
932
932
|
),
|
|
@@ -934,7 +934,7 @@ function on({
|
|
|
934
934
|
/* @__PURE__ */ t(
|
|
935
935
|
Te,
|
|
936
936
|
{
|
|
937
|
-
className:
|
|
937
|
+
className: q(
|
|
938
938
|
"h-2.5 w-2.5 shrink-0 text-muted-foreground transition-transform",
|
|
939
939
|
u && "rotate-90"
|
|
940
940
|
),
|
|
@@ -972,13 +972,13 @@ function Ma(e, n) {
|
|
|
972
972
|
if (!(e.type !== "dataset" || !e.domainId || !n))
|
|
973
973
|
return n.get(e.domainId);
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function qa({
|
|
976
976
|
selectedEntities: e,
|
|
977
977
|
onDeselectEntity: n,
|
|
978
978
|
semanticDomainLabels: a
|
|
979
979
|
}) {
|
|
980
980
|
return e.length === 0 ? null : /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: e.map((o, m) => /* @__PURE__ */ t(
|
|
981
|
-
|
|
981
|
+
ja,
|
|
982
982
|
{
|
|
983
983
|
entity: o,
|
|
984
984
|
semanticDomainLabels: a,
|
|
@@ -987,7 +987,7 @@ function ja({
|
|
|
987
987
|
`${o.type}-${o.name}-${m}`
|
|
988
988
|
)) });
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function ja({
|
|
991
991
|
entity: e,
|
|
992
992
|
semanticDomainLabels: n,
|
|
993
993
|
onDeselect: a
|
|
@@ -1036,7 +1036,7 @@ function Sr({
|
|
|
1036
1036
|
onDataSourceChange: m
|
|
1037
1037
|
}) {
|
|
1038
1038
|
var Se, me;
|
|
1039
|
-
const { tokenProps: d } = ct(), u = d.config, l = d.semanticDomainAccess || Xn, [s, c] = Y([]), [
|
|
1039
|
+
const { tokenProps: d } = ct(), u = d.config, l = d.semanticDomainAccess || Xn, [s, c] = Y([]), [x, k] = Y(""), [y, f] = Y("all"), [N, S] = Y(
|
|
1040
1040
|
void 0
|
|
1041
1041
|
), V = $e(!1), { updateDataSource: F } = Et(), K = m ?? F, C = l.mode, T = (u == null ? void 0 : u.showDirectSource) !== !1, U = C === "include" || C === "exclude" || !T, Z = C !== "all", p = T && !U, I = U ? "semanticDomain" : a.mode, $ = !T, D = C === "include" && (((Se = l.domainIds) == null ? void 0 : Se.length) || 0) === 1 ? (me = l.domainIds) == null ? void 0 : me[0] : void 0, v = ne(
|
|
1042
1042
|
(A) => {
|
|
@@ -1050,7 +1050,7 @@ function Sr({
|
|
|
1050
1050
|
});
|
|
1051
1051
|
},
|
|
1052
1052
|
[a, K]
|
|
1053
|
-
),
|
|
1053
|
+
), h = ne(
|
|
1054
1054
|
(A) => {
|
|
1055
1055
|
K({
|
|
1056
1056
|
...a,
|
|
@@ -1072,7 +1072,7 @@ function Sr({
|
|
|
1072
1072
|
currentDomainId: a.semanticDomainId,
|
|
1073
1073
|
scopedDomainIds: A,
|
|
1074
1074
|
hasSelectedEntities: ae
|
|
1075
|
-
}) && (
|
|
1075
|
+
}) && (h({
|
|
1076
1076
|
semanticDomainId: void 0,
|
|
1077
1077
|
selectedEntities: []
|
|
1078
1078
|
}), r && c([]));
|
|
@@ -1086,13 +1086,13 @@ function Sr({
|
|
|
1086
1086
|
s,
|
|
1087
1087
|
l.domainIds,
|
|
1088
1088
|
C,
|
|
1089
|
-
|
|
1089
|
+
h,
|
|
1090
1090
|
v
|
|
1091
1091
|
]), de(() => {
|
|
1092
|
-
D && !a.semanticDomainId &&
|
|
1093
|
-
}, [D, a.semanticDomainId,
|
|
1092
|
+
D && !a.semanticDomainId && h({ semanticDomainId: D });
|
|
1093
|
+
}, [D, a.semanticDomainId, h]), de(() => {
|
|
1094
1094
|
if (!e) {
|
|
1095
|
-
V.current = !1, k(""), S(void 0),
|
|
1095
|
+
V.current = !1, k(""), S(void 0), f(U ? "semantic" : "all");
|
|
1096
1096
|
return;
|
|
1097
1097
|
}
|
|
1098
1098
|
V.current || (c([...o || []]), S(
|
|
@@ -1114,33 +1114,33 @@ function Sr({
|
|
|
1114
1114
|
var ae, r;
|
|
1115
1115
|
const A = Ye(s) ?? N ?? I;
|
|
1116
1116
|
if (A === "semanticDomain") {
|
|
1117
|
-
const
|
|
1117
|
+
const g = Kt(s) || a.semanticDomainId, b = ((ae = s == null ? void 0 : s[0]) == null ? void 0 : ae.connectionId) || a.connectionId, L = ((r = s == null ? void 0 : s[0]) == null ? void 0 : r.connectionType) || a.connectionType;
|
|
1118
1118
|
K({
|
|
1119
1119
|
...a,
|
|
1120
1120
|
mode: "semanticDomain",
|
|
1121
|
-
semanticDomainId:
|
|
1121
|
+
semanticDomainId: g,
|
|
1122
1122
|
connectionId: b,
|
|
1123
1123
|
connectionType: L,
|
|
1124
1124
|
selectedEntities: s
|
|
1125
1125
|
});
|
|
1126
1126
|
} else if (A === "upload" || A === "url") {
|
|
1127
|
-
const
|
|
1127
|
+
const g = s == null ? void 0 : s[0];
|
|
1128
1128
|
K({
|
|
1129
1129
|
...a,
|
|
1130
1130
|
mode: A,
|
|
1131
1131
|
semanticDomainId: void 0,
|
|
1132
|
-
connectionId: (
|
|
1133
|
-
connectionType: (
|
|
1132
|
+
connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
|
|
1133
|
+
connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
|
|
1134
1134
|
selectedEntities: s
|
|
1135
1135
|
});
|
|
1136
1136
|
} else {
|
|
1137
|
-
const
|
|
1137
|
+
const g = s == null ? void 0 : s[0];
|
|
1138
1138
|
K({
|
|
1139
1139
|
...a,
|
|
1140
1140
|
mode: "database",
|
|
1141
1141
|
semanticDomainId: void 0,
|
|
1142
|
-
connectionId: (
|
|
1143
|
-
connectionType: (
|
|
1142
|
+
connectionId: (g == null ? void 0 : g.connectionId) || a.connectionId,
|
|
1143
|
+
connectionType: (g == null ? void 0 : g.connectionType) || a.connectionType,
|
|
1144
1144
|
selectedEntities: s
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
@@ -1153,8 +1153,8 @@ function Sr({
|
|
|
1153
1153
|
])
|
|
1154
1154
|
),
|
|
1155
1155
|
[_]
|
|
1156
|
-
),
|
|
1157
|
-
|
|
1156
|
+
), j = (A) => {
|
|
1157
|
+
f(A), A === "semantic" || A.startsWith("domain:") ? a.mode !== "semanticDomain" && v("semanticDomain") : (A === "direct" || A.startsWith("conn:")) && a.mode === "semanticDomain" && v("database");
|
|
1158
1158
|
}, 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, Ie = T && !U && (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 = $ ? "Select dataset" : "Add data";
|
|
1159
1159
|
return /* @__PURE__ */ t(kn, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(
|
|
1160
1160
|
Sn,
|
|
@@ -1162,7 +1162,7 @@ function Sr({
|
|
|
1162
1162
|
showCloseButton: !1,
|
|
1163
1163
|
className: "flex h-[560px] w-[620px] max-w-[620px] flex-col gap-0 overflow-hidden rounded-[6px] border border-border bg-popover p-0",
|
|
1164
1164
|
children: [
|
|
1165
|
-
/* @__PURE__ */ t(
|
|
1165
|
+
/* @__PURE__ */ t(xn, { children: /* @__PURE__ */ t(Dn, { children: ke }) }),
|
|
1166
1166
|
/* @__PURE__ */ i("div", { className: "flex items-start justify-between border-b border-border px-4 py-2.5", children: [
|
|
1167
1167
|
/* @__PURE__ */ i("div", { children: [
|
|
1168
1168
|
/* @__PURE__ */ t("p", { className: "text-[14px] font-semibold text-foreground", children: ke }),
|
|
@@ -1186,13 +1186,13 @@ function Sr({
|
|
|
1186
1186
|
"input",
|
|
1187
1187
|
{
|
|
1188
1188
|
type: "text",
|
|
1189
|
-
value:
|
|
1189
|
+
value: x,
|
|
1190
1190
|
onChange: (A) => k(A.target.value),
|
|
1191
1191
|
placeholder: "Search datasets, tables, views, models",
|
|
1192
1192
|
className: "h-full w-full bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground/60 focus:outline-none"
|
|
1193
1193
|
}
|
|
1194
1194
|
),
|
|
1195
|
-
|
|
1195
|
+
x && /* @__PURE__ */ t(
|
|
1196
1196
|
"button",
|
|
1197
1197
|
{
|
|
1198
1198
|
type: "button",
|
|
@@ -1212,16 +1212,16 @@ function Sr({
|
|
|
1212
1212
|
{
|
|
1213
1213
|
label: "All",
|
|
1214
1214
|
active: y === "all",
|
|
1215
|
-
onClick: () =>
|
|
1215
|
+
onClick: () => j("all")
|
|
1216
1216
|
}
|
|
1217
1217
|
),
|
|
1218
|
-
(_.length > 0 || z.length > 0) && /* @__PURE__ */ i(
|
|
1218
|
+
(_.length > 0 || z.length > 0) && /* @__PURE__ */ i(he, { children: [
|
|
1219
1219
|
/* @__PURE__ */ t(
|
|
1220
1220
|
De,
|
|
1221
1221
|
{
|
|
1222
1222
|
label: "Semantic",
|
|
1223
1223
|
active: y === "semantic",
|
|
1224
|
-
onClick: () =>
|
|
1224
|
+
onClick: () => j("semantic")
|
|
1225
1225
|
}
|
|
1226
1226
|
),
|
|
1227
1227
|
/* @__PURE__ */ t(
|
|
@@ -1229,7 +1229,7 @@ function Sr({
|
|
|
1229
1229
|
{
|
|
1230
1230
|
label: "Direct",
|
|
1231
1231
|
active: y === "direct",
|
|
1232
|
-
onClick: () =>
|
|
1232
|
+
onClick: () => j("direct")
|
|
1233
1233
|
}
|
|
1234
1234
|
),
|
|
1235
1235
|
/* @__PURE__ */ t("span", { className: "shrink-0 px-0.5 text-muted-foreground/50", children: "·" })
|
|
@@ -1239,7 +1239,7 @@ function Sr({
|
|
|
1239
1239
|
{
|
|
1240
1240
|
label: A.label || A.name,
|
|
1241
1241
|
active: y === `domain:${A.id}`,
|
|
1242
|
-
onClick: () =>
|
|
1242
|
+
onClick: () => j(`domain:${A.id}`)
|
|
1243
1243
|
},
|
|
1244
1244
|
`domain:${A.id}`
|
|
1245
1245
|
)),
|
|
@@ -1248,7 +1248,7 @@ function Sr({
|
|
|
1248
1248
|
{
|
|
1249
1249
|
label: A.name,
|
|
1250
1250
|
active: y === `conn:${A.id}`,
|
|
1251
|
-
onClick: () =>
|
|
1251
|
+
onClick: () => j(`conn:${A.id}`)
|
|
1252
1252
|
},
|
|
1253
1253
|
`conn:${A.id}`
|
|
1254
1254
|
))
|
|
@@ -1259,7 +1259,7 @@ function Sr({
|
|
|
1259
1259
|
La,
|
|
1260
1260
|
{
|
|
1261
1261
|
domainAccess: l,
|
|
1262
|
-
search:
|
|
1262
|
+
search: x,
|
|
1263
1263
|
scopeDomainId: Be,
|
|
1264
1264
|
selectedEntities: s,
|
|
1265
1265
|
onSelectionChange: (A) => w(A, "semanticDomain")
|
|
@@ -1268,7 +1268,7 @@ function Sr({
|
|
|
1268
1268
|
Ie && /* @__PURE__ */ t(
|
|
1269
1269
|
Oa,
|
|
1270
1270
|
{
|
|
1271
|
-
search:
|
|
1271
|
+
search: x,
|
|
1272
1272
|
scopeConnectionId: We,
|
|
1273
1273
|
selectedEntities: s,
|
|
1274
1274
|
onSelectionChange: (A) => w(A)
|
|
@@ -1300,7 +1300,7 @@ function Sr({
|
|
|
1300
1300
|
type: "button",
|
|
1301
1301
|
onClick: H,
|
|
1302
1302
|
disabled: Ce,
|
|
1303
|
-
className:
|
|
1303
|
+
className: q(
|
|
1304
1304
|
"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",
|
|
1305
1305
|
Ce && "cursor-not-allowed opacity-50 hover:bg-primary"
|
|
1306
1306
|
),
|
|
@@ -1316,7 +1316,7 @@ function Sr({
|
|
|
1316
1316
|
] })
|
|
1317
1317
|
] }),
|
|
1318
1318
|
s.length > 0 && /* @__PURE__ */ t(
|
|
1319
|
-
|
|
1319
|
+
qa,
|
|
1320
1320
|
{
|
|
1321
1321
|
selectedEntities: s,
|
|
1322
1322
|
onDeselectEntity: E,
|
|
@@ -1339,7 +1339,7 @@ function De({
|
|
|
1339
1339
|
type: "button",
|
|
1340
1340
|
onClick: a,
|
|
1341
1341
|
"aria-pressed": n,
|
|
1342
|
-
className:
|
|
1342
|
+
className: q(
|
|
1343
1343
|
"inline-flex h-6 shrink-0 items-center whitespace-nowrap rounded-control px-2 text-[11px] font-medium transition-colors",
|
|
1344
1344
|
n ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1345
1345
|
),
|
|
@@ -1356,9 +1356,9 @@ function Dr() {
|
|
|
1356
1356
|
setSelectedDatamodelId: d
|
|
1357
1357
|
} = Et();
|
|
1358
1358
|
de(() => {
|
|
1359
|
-
var
|
|
1359
|
+
var f;
|
|
1360
1360
|
if (!e) return;
|
|
1361
|
-
const { tableName: u, schemaName: l, databaseName: s, connectionId: c } = In(e),
|
|
1361
|
+
const { tableName: u, schemaName: l, databaseName: s, connectionId: c } = In(e), x = (f = e.selectedEntities) == null ? void 0 : f[0], y = (x == null ? void 0 : x.type) === "model" && "id" in x ? x.id : "";
|
|
1362
1362
|
n(c || ""), a(s || ""), o(l || ""), m(u || ""), d(y);
|
|
1363
1363
|
}, [
|
|
1364
1364
|
e,
|
|
@@ -1398,7 +1398,7 @@ function Tr({
|
|
|
1398
1398
|
local: "border-slate-200/70 bg-slate-50/80 text-slate-700 shadow-sm hover:bg-slate-100/80 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-200 dark:hover:bg-slate-800/80",
|
|
1399
1399
|
linked: "border-purple-200/70 bg-gradient-to-r from-purple-50/50 to-purple-100/30 text-purple-900 shadow-sm hover:from-purple-100/60 hover:to-purple-100/50 hover:shadow-md dark:border-purple-800/50 dark:from-purple-950/40 dark:to-purple-900/30 dark:text-purple-100 dark:hover:from-purple-950/60 dark:hover:to-purple-900/50",
|
|
1400
1400
|
library: "border-blue-200/70 bg-gradient-to-r from-blue-50/50 to-blue-100/30 text-blue-900 shadow-sm hover:from-blue-100/60 hover:to-blue-100/50 hover:shadow-md dark:border-blue-800/50 dark:from-blue-950/40 dark:to-blue-900/30 dark:text-blue-100 dark:hover:from-blue-950/60 dark:hover:to-blue-900/50"
|
|
1401
|
-
},
|
|
1401
|
+
}, x = {
|
|
1402
1402
|
local: "Local to this dashboard: Changes made here only affect this dashboard copy.",
|
|
1403
1403
|
linked: "Linked to library: Changes made here update the library visual and all linked instances.",
|
|
1404
1404
|
library: "Library visual: Share and reuse this visual across multiple dashboards."
|
|
@@ -1410,7 +1410,7 @@ function Tr({
|
|
|
1410
1410
|
local: "fill-slate-50 dark:fill-slate-900",
|
|
1411
1411
|
linked: "fill-purple-50 dark:fill-purple-950",
|
|
1412
1412
|
library: "fill-blue-50 dark:fill-blue-950"
|
|
1413
|
-
},
|
|
1413
|
+
}, f = {
|
|
1414
1414
|
local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
|
|
1415
1415
|
linked: /* @__PURE__ */ t(An, { className: "h-3.5 w-3.5" }),
|
|
1416
1416
|
library: /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" })
|
|
@@ -1424,13 +1424,13 @@ function Tr({
|
|
|
1424
1424
|
$n,
|
|
1425
1425
|
{
|
|
1426
1426
|
variant: "outline",
|
|
1427
|
-
className:
|
|
1427
|
+
className: q(
|
|
1428
1428
|
"cursor-help select-none transition-all",
|
|
1429
1429
|
c[s],
|
|
1430
1430
|
a
|
|
1431
1431
|
),
|
|
1432
1432
|
children: [
|
|
1433
|
-
|
|
1433
|
+
f[s],
|
|
1434
1434
|
o && /* @__PURE__ */ t("span", { className: "ml-1 text-xs font-medium leading-none", children: N[s] })
|
|
1435
1435
|
]
|
|
1436
1436
|
}
|
|
@@ -1439,10 +1439,10 @@ function Tr({
|
|
|
1439
1439
|
ot,
|
|
1440
1440
|
{
|
|
1441
1441
|
side: "bottom",
|
|
1442
|
-
className:
|
|
1442
|
+
className: q("max-w-xs", k[s]),
|
|
1443
1443
|
children: [
|
|
1444
1444
|
/* @__PURE__ */ t(Ft, { className: y[s] }),
|
|
1445
|
-
/* @__PURE__ */ t("p", { children:
|
|
1445
|
+
/* @__PURE__ */ t("p", { children: x[s] })
|
|
1446
1446
|
]
|
|
1447
1447
|
}
|
|
1448
1448
|
)
|
|
@@ -1470,7 +1470,7 @@ const Ua = vn(
|
|
|
1470
1470
|
onClick: m,
|
|
1471
1471
|
...s,
|
|
1472
1472
|
...u,
|
|
1473
|
-
className:
|
|
1473
|
+
className: q(`${Jn}`, a),
|
|
1474
1474
|
children: n
|
|
1475
1475
|
}
|
|
1476
1476
|
) }),
|
|
@@ -1479,7 +1479,7 @@ const Ua = vn(
|
|
|
1479
1479
|
{
|
|
1480
1480
|
side: e,
|
|
1481
1481
|
sideOffset: 10,
|
|
1482
|
-
className:
|
|
1482
|
+
className: q(
|
|
1483
1483
|
"border-foreground/20 bg-foreground text-background"
|
|
1484
1484
|
),
|
|
1485
1485
|
children: [
|
|
@@ -1515,7 +1515,7 @@ function Ga(e) {
|
|
|
1515
1515
|
/* @__PURE__ */ t(
|
|
1516
1516
|
"span",
|
|
1517
1517
|
{
|
|
1518
|
-
className:
|
|
1518
|
+
className: q(
|
|
1519
1519
|
"flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
|
|
1520
1520
|
u ? "border-foreground bg-foreground text-background" : l ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
|
|
1521
1521
|
),
|
|
@@ -1525,7 +1525,7 @@ function Ga(e) {
|
|
|
1525
1525
|
/* @__PURE__ */ t(
|
|
1526
1526
|
"span",
|
|
1527
1527
|
{
|
|
1528
|
-
className:
|
|
1528
|
+
className: q(
|
|
1529
1529
|
"text-[12px]",
|
|
1530
1530
|
u ? "font-medium text-foreground" : "text-muted-foreground"
|
|
1531
1531
|
),
|
|
@@ -1543,7 +1543,7 @@ function Ga(e) {
|
|
|
1543
1543
|
] }, o);
|
|
1544
1544
|
}) }) });
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function je(e) {
|
|
1547
1547
|
const { secondary: n, tertiary: a, primary: o } = e;
|
|
1548
1548
|
return /* @__PURE__ */ i("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
|
|
1549
1549
|
n,
|
|
@@ -1581,7 +1581,7 @@ function Lt(e) {
|
|
|
1581
1581
|
onControlChange: l,
|
|
1582
1582
|
onLabelChange: s,
|
|
1583
1583
|
onDefaultValueChange: c,
|
|
1584
|
-
onBack:
|
|
1584
|
+
onBack: x,
|
|
1585
1585
|
onNext: k,
|
|
1586
1586
|
nextDisabled: y
|
|
1587
1587
|
} = e;
|
|
@@ -1600,7 +1600,7 @@ function Lt(e) {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
),
|
|
1602
1602
|
/* @__PURE__ */ t(
|
|
1603
|
-
|
|
1603
|
+
qt,
|
|
1604
1604
|
{
|
|
1605
1605
|
control: n,
|
|
1606
1606
|
value: a,
|
|
@@ -1613,9 +1613,9 @@ function Lt(e) {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
1615
|
/* @__PURE__ */ t(
|
|
1616
|
-
|
|
1616
|
+
je,
|
|
1617
1617
|
{
|
|
1618
|
-
secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick:
|
|
1618
|
+
secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
|
|
1619
1619
|
primary: /* @__PURE__ */ t(
|
|
1620
1620
|
G,
|
|
1621
1621
|
{
|
|
@@ -1669,7 +1669,7 @@ function At(e) {
|
|
|
1669
1669
|
onBack: l,
|
|
1670
1670
|
onCancel: s,
|
|
1671
1671
|
onDone: c
|
|
1672
|
-
} = e,
|
|
1672
|
+
} = e, x = Wa.has(n.type), k = o.match(/\[\[param\.(.+?)\]\]/), y = k ? `{{ param('${k[1]}') }}` : "";
|
|
1673
1673
|
return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
|
|
1674
1674
|
/* @__PURE__ */ t(
|
|
1675
1675
|
Ba,
|
|
@@ -1682,7 +1682,7 @@ function At(e) {
|
|
|
1682
1682
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
1683
1683
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
|
|
1684
1684
|
/* @__PURE__ */ i("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
|
|
1685
|
-
|
|
1685
|
+
x ? /* @__PURE__ */ i("div", { className: "space-y-1 px-3 py-2.5", children: [
|
|
1686
1686
|
/* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
|
|
1687
1687
|
/* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: m })
|
|
1688
1688
|
] }) : null,
|
|
@@ -1721,7 +1721,7 @@ function At(e) {
|
|
|
1721
1721
|
] })
|
|
1722
1722
|
] }),
|
|
1723
1723
|
/* @__PURE__ */ t(
|
|
1724
|
-
|
|
1724
|
+
je,
|
|
1725
1725
|
{
|
|
1726
1726
|
secondary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: l, children: "Back" }),
|
|
1727
1727
|
tertiary: /* @__PURE__ */ t(G, { type: "button", variant: "outline", size: "xs", onClick: s, children: "Cancel" }),
|
|
@@ -1768,10 +1768,10 @@ function Ir({
|
|
|
1768
1768
|
usageByControlId: l,
|
|
1769
1769
|
availableFieldChoices: s,
|
|
1770
1770
|
availableMetricChoices: c,
|
|
1771
|
-
structuralParticipants:
|
|
1771
|
+
structuralParticipants: x,
|
|
1772
1772
|
structuralParticipantIdsByControlId: k,
|
|
1773
1773
|
card: y,
|
|
1774
|
-
allowedControlTypes:
|
|
1774
|
+
allowedControlTypes: f,
|
|
1775
1775
|
onCreateFlowActiveChange: N,
|
|
1776
1776
|
onCreateFlowComplete: S
|
|
1777
1777
|
}) {
|
|
@@ -1787,34 +1787,34 @@ function Ir({
|
|
|
1787
1787
|
step: 1,
|
|
1788
1788
|
control: Ae(e, n, Array.from(V))
|
|
1789
1789
|
} : null
|
|
1790
|
-
), $ = $e({}), D = $e(void 0), v = $e(u),
|
|
1790
|
+
), $ = $e({}), D = $e(void 0), v = $e(u), h = P(() => {
|
|
1791
1791
|
const r = Ct({ scope: e, card: y });
|
|
1792
|
-
if (!
|
|
1792
|
+
if (!f)
|
|
1793
1793
|
return r;
|
|
1794
|
-
const
|
|
1795
|
-
return r.filter((b) =>
|
|
1796
|
-
}, [
|
|
1794
|
+
const g = new Set(f);
|
|
1795
|
+
return r.filter((b) => g.has(b.value));
|
|
1796
|
+
}, [f, y, e]), E = ne(
|
|
1797
1797
|
(r) => {
|
|
1798
|
-
const
|
|
1798
|
+
const g = Ct({
|
|
1799
1799
|
scope: e,
|
|
1800
1800
|
card: y,
|
|
1801
|
-
includeType:
|
|
1801
|
+
includeType: f ? void 0 : r
|
|
1802
1802
|
});
|
|
1803
|
-
if (!
|
|
1804
|
-
return
|
|
1805
|
-
const b = new Set(
|
|
1806
|
-
return
|
|
1803
|
+
if (!f)
|
|
1804
|
+
return g;
|
|
1805
|
+
const b = new Set(f);
|
|
1806
|
+
return g.filter((L) => b.has(L.value));
|
|
1807
1807
|
},
|
|
1808
|
-
[
|
|
1808
|
+
[f, y, e]
|
|
1809
1809
|
), w = ne(
|
|
1810
1810
|
(r) => e === "dashboard" && (r === "field_selector" || r === "metric_selector"),
|
|
1811
1811
|
[e]
|
|
1812
1812
|
), H = P(
|
|
1813
1813
|
() => p ? wt(
|
|
1814
|
-
|
|
1814
|
+
x || [],
|
|
1815
1815
|
p.control.type
|
|
1816
1816
|
) : [],
|
|
1817
|
-
[p,
|
|
1817
|
+
[p, x]
|
|
1818
1818
|
), _ = P(() => {
|
|
1819
1819
|
if (!p)
|
|
1820
1820
|
return {
|
|
@@ -1826,19 +1826,19 @@ function Ir({
|
|
|
1826
1826
|
fields: s || [],
|
|
1827
1827
|
metrics: c || []
|
|
1828
1828
|
};
|
|
1829
|
-
const r = p.selectedCardIds || [],
|
|
1829
|
+
const r = p.selectedCardIds || [], g = Qe({
|
|
1830
1830
|
controlType: p.control.type,
|
|
1831
|
-
participants:
|
|
1831
|
+
participants: x || [],
|
|
1832
1832
|
selectedCardIds: r
|
|
1833
1833
|
});
|
|
1834
1834
|
return {
|
|
1835
|
-
fields: p.control.type === "field_selector" ?
|
|
1835
|
+
fields: p.control.type === "field_selector" ? g.choices.map((b) => ({
|
|
1836
1836
|
option: b,
|
|
1837
|
-
target:
|
|
1837
|
+
target: g.fieldTargetMap[b.value]
|
|
1838
1838
|
})) : [],
|
|
1839
|
-
metrics: p.control.type === "metric_selector" ?
|
|
1839
|
+
metrics: p.control.type === "metric_selector" ? g.choices.map((b) => ({
|
|
1840
1840
|
option: b,
|
|
1841
|
-
target:
|
|
1841
|
+
target: g.metricTargetMap[b.value]
|
|
1842
1842
|
})) : []
|
|
1843
1843
|
};
|
|
1844
1844
|
}, [
|
|
@@ -1846,7 +1846,7 @@ function Ir({
|
|
|
1846
1846
|
c,
|
|
1847
1847
|
p,
|
|
1848
1848
|
w,
|
|
1849
|
-
|
|
1849
|
+
x
|
|
1850
1850
|
]);
|
|
1851
1851
|
de(() => {
|
|
1852
1852
|
N == null || N(!!p);
|
|
@@ -1863,16 +1863,16 @@ function Ir({
|
|
|
1863
1863
|
fields: s || [],
|
|
1864
1864
|
metrics: c || []
|
|
1865
1865
|
};
|
|
1866
|
-
const
|
|
1867
|
-
if (
|
|
1866
|
+
const g = (k == null ? void 0 : k[r.id]) || [];
|
|
1867
|
+
if (g.length === 0)
|
|
1868
1868
|
return {
|
|
1869
1869
|
fields: s || [],
|
|
1870
1870
|
metrics: c || []
|
|
1871
1871
|
};
|
|
1872
1872
|
const b = Qe({
|
|
1873
1873
|
controlType: r.type,
|
|
1874
|
-
participants:
|
|
1875
|
-
selectedCardIds:
|
|
1874
|
+
participants: x || [],
|
|
1875
|
+
selectedCardIds: g
|
|
1876
1876
|
});
|
|
1877
1877
|
return {
|
|
1878
1878
|
fields: r.type === "field_selector" ? b.choices.map((L) => ({
|
|
@@ -1890,21 +1890,21 @@ function Ir({
|
|
|
1890
1890
|
nextControl: r.control,
|
|
1891
1891
|
cardBindingsById: void 0
|
|
1892
1892
|
};
|
|
1893
|
-
const
|
|
1893
|
+
const g = (k == null ? void 0 : k[r.control.id]) || [], b = Qe({
|
|
1894
1894
|
controlType: r.control.type,
|
|
1895
|
-
participants:
|
|
1895
|
+
participants: x || [],
|
|
1896
1896
|
selectedCardIds: r.nextSelectedCardIds
|
|
1897
1897
|
}), L = ca({
|
|
1898
1898
|
control: r.control,
|
|
1899
1899
|
choices: b.choices
|
|
1900
1900
|
}), R = Object.fromEntries(
|
|
1901
|
-
|
|
1901
|
+
g.filter((M) => !r.nextSelectedCardIds.includes(M)).map((M) => [M, void 0])
|
|
1902
1902
|
);
|
|
1903
1903
|
return r.nextSelectedCardIds.length > 0 && L.source.kind === "manual" && L.source.options.length > 0 && Object.assign(
|
|
1904
1904
|
R,
|
|
1905
1905
|
Tt({
|
|
1906
1906
|
control: L,
|
|
1907
|
-
participants:
|
|
1907
|
+
participants: x || [],
|
|
1908
1908
|
selectedCardIds: r.nextSelectedCardIds,
|
|
1909
1909
|
matrixTargetIds: r.matrixTargetIds
|
|
1910
1910
|
})
|
|
@@ -1912,22 +1912,22 @@ function Ir({
|
|
|
1912
1912
|
nextControl: L,
|
|
1913
1913
|
cardBindingsById: R
|
|
1914
1914
|
};
|
|
1915
|
-
},
|
|
1916
|
-
(r,
|
|
1915
|
+
}, j = ne(
|
|
1916
|
+
(r, g = o, b = { type: "update" }) => {
|
|
1917
1917
|
const L = r.map((R) => (Ke({
|
|
1918
1918
|
control: R,
|
|
1919
|
-
defaultValues:
|
|
1919
|
+
defaultValues: g
|
|
1920
1920
|
}), ea(
|
|
1921
1921
|
R
|
|
1922
1922
|
)));
|
|
1923
|
-
m(L,
|
|
1923
|
+
m(L, g, b);
|
|
1924
1924
|
},
|
|
1925
1925
|
[o, m]
|
|
1926
|
-
), ee = (r,
|
|
1926
|
+
), ee = (r, g) => {
|
|
1927
1927
|
const b = n.find(
|
|
1928
1928
|
(Q) => Q.id === r
|
|
1929
1929
|
);
|
|
1930
|
-
let L = n.map((Q) => Q.id !== r ? Q :
|
|
1930
|
+
let L = n.map((Q) => Q.id !== r ? Q : g(Q));
|
|
1931
1931
|
const R = L.find(
|
|
1932
1932
|
(Q) => Q.id === r
|
|
1933
1933
|
);
|
|
@@ -1962,18 +1962,18 @@ function Ir({
|
|
|
1962
1962
|
currentDefaultValue: pe
|
|
1963
1963
|
});
|
|
1964
1964
|
W.source.kind === "manual" && ($.current[r] = le), o && (X = { ...o }, le === void 0 ? delete X[r] : X[r] = le), L = L.map(
|
|
1965
|
-
(
|
|
1965
|
+
(gt) => gt.id === r ? { ...W, defaultValue: le } : gt
|
|
1966
1966
|
);
|
|
1967
1967
|
}
|
|
1968
|
-
|
|
1968
|
+
j(L, X, {
|
|
1969
1969
|
type: "update",
|
|
1970
1970
|
cardBindingsById: M,
|
|
1971
1971
|
affectedBindingControlIds: O
|
|
1972
1972
|
});
|
|
1973
|
-
}, te = (r,
|
|
1974
|
-
if (!
|
|
1973
|
+
}, te = (r, g) => {
|
|
1974
|
+
if (!g.trim())
|
|
1975
1975
|
return;
|
|
1976
|
-
const b = ua(
|
|
1976
|
+
const b = ua(g);
|
|
1977
1977
|
if (b === r || V.has(b) || n.some(
|
|
1978
1978
|
(M) => M.id === b && M.id !== r
|
|
1979
1979
|
))
|
|
@@ -1982,7 +1982,7 @@ function Ir({
|
|
|
1982
1982
|
(M) => M.id === r ? { ...M, id: b } : M
|
|
1983
1983
|
);
|
|
1984
1984
|
if (!o) {
|
|
1985
|
-
|
|
1985
|
+
j(L, void 0, {
|
|
1986
1986
|
type: "rename",
|
|
1987
1987
|
oldId: r,
|
|
1988
1988
|
newId: b
|
|
@@ -1990,19 +1990,19 @@ function Ir({
|
|
|
1990
1990
|
return;
|
|
1991
1991
|
}
|
|
1992
1992
|
const R = { ...o };
|
|
1993
|
-
Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]),
|
|
1993
|
+
Object.prototype.hasOwnProperty.call(R, r) && (R[b] = R[r], delete R[r]), j(L, R, {
|
|
1994
1994
|
type: "rename",
|
|
1995
1995
|
oldId: r,
|
|
1996
1996
|
newId: b
|
|
1997
1997
|
});
|
|
1998
1998
|
}, Be = (r) => {
|
|
1999
|
-
const
|
|
1999
|
+
const g = n.filter((L) => L.id !== r);
|
|
2000
2000
|
if (!o) {
|
|
2001
|
-
|
|
2001
|
+
j(g, void 0, { type: "remove", controlId: r });
|
|
2002
2002
|
return;
|
|
2003
2003
|
}
|
|
2004
2004
|
const b = { ...o };
|
|
2005
|
-
delete b[r],
|
|
2005
|
+
delete b[r], j(g, b, { type: "remove", controlId: r });
|
|
2006
2006
|
}, We = ne(() => {
|
|
2007
2007
|
D.current = void 0, I({
|
|
2008
2008
|
step: 1,
|
|
@@ -2010,16 +2010,16 @@ function Ir({
|
|
|
2010
2010
|
}), Z(null), T(null);
|
|
2011
2011
|
}, [n, V, e]), oe = (r) => {
|
|
2012
2012
|
I(
|
|
2013
|
-
(
|
|
2014
|
-
const b = r(
|
|
2015
|
-
|
|
2016
|
-
const L =
|
|
2017
|
-
previousControl:
|
|
2013
|
+
(g) => g && (() => {
|
|
2014
|
+
const b = r(g.control);
|
|
2015
|
+
g.control.source.kind === "manual" && b.source.kind === "sql_query" && (D.current = g.defaultValue);
|
|
2016
|
+
const L = g.defaultValue === void 0 && g.control.source.kind === "sql_query" && b.source.kind === "manual" ? D.current : g.defaultValue, R = Dt({
|
|
2017
|
+
previousControl: g.control,
|
|
2018
2018
|
nextControl: b,
|
|
2019
2019
|
currentDefaultValue: L
|
|
2020
2020
|
});
|
|
2021
2021
|
return b.source.kind === "manual" && (D.current = R), {
|
|
2022
|
-
...
|
|
2022
|
+
...g,
|
|
2023
2023
|
control: b,
|
|
2024
2024
|
defaultValue: R
|
|
2025
2025
|
};
|
|
@@ -2027,8 +2027,8 @@ function Ir({
|
|
|
2027
2027
|
);
|
|
2028
2028
|
}, Ie = (r) => {
|
|
2029
2029
|
I(
|
|
2030
|
-
(
|
|
2031
|
-
...
|
|
2030
|
+
(g) => g && (g.control.source.kind === "manual" && (D.current = r), {
|
|
2031
|
+
...g,
|
|
2032
2032
|
defaultValue: r
|
|
2033
2033
|
})
|
|
2034
2034
|
);
|
|
@@ -2037,40 +2037,40 @@ function Ir({
|
|
|
2037
2037
|
return !1;
|
|
2038
2038
|
if (p.step === 2 && w(p.control.type))
|
|
2039
2039
|
return (p.selectedCardIds || []).length > 0 && ta({
|
|
2040
|
-
participants:
|
|
2040
|
+
participants: x || [],
|
|
2041
2041
|
selectedCardIds: p.selectedCardIds || [],
|
|
2042
2042
|
control: p.control,
|
|
2043
2043
|
selected: p.matrixTargetIds
|
|
2044
2044
|
});
|
|
2045
2045
|
if (p.step !== 2 && p.step !== 3 || !p.control.label.trim())
|
|
2046
2046
|
return !1;
|
|
2047
|
-
const
|
|
2048
|
-
if (
|
|
2047
|
+
const g = p.control.source.kind === "sql_query" ? p.control : kt(p.control);
|
|
2048
|
+
if (g.source.kind === "manual" && (na(g) && g.source.options.length === 0 || g.source.options.some(
|
|
2049
2049
|
(L) => L.label.trim().length === 0 || L.value.trim().length === 0
|
|
2050
2050
|
)))
|
|
2051
2051
|
return !1;
|
|
2052
|
-
if (
|
|
2053
|
-
const { connectionId: b, sql: L, valueColumn: R } =
|
|
2052
|
+
if (g.source.kind === "sql_query") {
|
|
2053
|
+
const { connectionId: b, sql: L, valueColumn: R } = g.source;
|
|
2054
2054
|
return b.trim().length > 0 && L.trim().length > 0 && R.trim().length > 0;
|
|
2055
2055
|
}
|
|
2056
2056
|
return aa(
|
|
2057
|
-
Oe(
|
|
2057
|
+
Oe(g, p.defaultValue)
|
|
2058
2058
|
);
|
|
2059
2059
|
})(), Ce = () => {
|
|
2060
2060
|
var M;
|
|
2061
2061
|
if (!p)
|
|
2062
2062
|
return;
|
|
2063
|
-
const r = kt(p.control),
|
|
2063
|
+
const r = kt(p.control), g = la({
|
|
2064
2064
|
label: r.label,
|
|
2065
2065
|
fallbackId: r.id,
|
|
2066
2066
|
existingControls: n,
|
|
2067
2067
|
reservedIds: Array.from(V)
|
|
2068
2068
|
}), b = {
|
|
2069
2069
|
...r,
|
|
2070
|
-
id:
|
|
2070
|
+
id: g
|
|
2071
2071
|
}, L = e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") && ((M = p.selectedCardIds) != null && M.length) ? Tt({
|
|
2072
2072
|
control: b,
|
|
2073
|
-
participants:
|
|
2073
|
+
participants: x || [],
|
|
2074
2074
|
selectedCardIds: p.selectedCardIds,
|
|
2075
2075
|
matrixTargetIds: p.matrixTargetIds
|
|
2076
2076
|
}) : void 0, R = Oe(
|
|
@@ -2081,7 +2081,7 @@ function Ir({
|
|
|
2081
2081
|
step: e === "dashboard" && (b.type === "field_selector" || b.type === "metric_selector") ? 4 : 3,
|
|
2082
2082
|
control: b,
|
|
2083
2083
|
defaultValue: R,
|
|
2084
|
-
createdControlId:
|
|
2084
|
+
createdControlId: g,
|
|
2085
2085
|
selectedCardIds: p.selectedCardIds,
|
|
2086
2086
|
matrixTargetIds: p.matrixTargetIds,
|
|
2087
2087
|
cardBindingsById: L
|
|
@@ -2093,13 +2093,13 @@ function Ir({
|
|
|
2093
2093
|
I(null);
|
|
2094
2094
|
return;
|
|
2095
2095
|
}
|
|
2096
|
-
const r = p.control,
|
|
2096
|
+
const r = p.control, g = p.createdControlId, b = Oe(
|
|
2097
2097
|
r,
|
|
2098
2098
|
p.defaultValue
|
|
2099
2099
|
);
|
|
2100
2100
|
if (o) {
|
|
2101
2101
|
const L = { ...o };
|
|
2102
|
-
b === void 0 ? delete L[
|
|
2102
|
+
b === void 0 ? delete L[g] : L[g] = b, j(
|
|
2103
2103
|
[
|
|
2104
2104
|
...n,
|
|
2105
2105
|
{
|
|
@@ -2114,7 +2114,7 @@ function Ir({
|
|
|
2114
2114
|
}
|
|
2115
2115
|
);
|
|
2116
2116
|
} else
|
|
2117
|
-
|
|
2117
|
+
j(
|
|
2118
2118
|
[
|
|
2119
2119
|
...n,
|
|
2120
2120
|
{
|
|
@@ -2128,8 +2128,8 @@ function Ir({
|
|
|
2128
2128
|
cardBindingsById: p.cardBindingsById
|
|
2129
2129
|
}
|
|
2130
2130
|
);
|
|
2131
|
-
Z(
|
|
2132
|
-
}, [n, p, o,
|
|
2131
|
+
Z(g), I(null), S == null || S();
|
|
2132
|
+
}, [n, p, o, j, S]), xt = p ? w(p.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Se = p != null && p.createdControlId ? `[[param.${p.createdControlId}]]` : p ? `[[param.${ra(p.control.label) || p.control.id}]]` : "", me = St({
|
|
2133
2133
|
controls: n,
|
|
2134
2134
|
defaultValues: o
|
|
2135
2135
|
}), A = p ? [...n, p.control] : n, ae = p ? St({
|
|
@@ -2148,7 +2148,7 @@ function Ir({
|
|
|
2148
2148
|
Ga,
|
|
2149
2149
|
{
|
|
2150
2150
|
currentStep: p.step,
|
|
2151
|
-
labels:
|
|
2151
|
+
labels: xt
|
|
2152
2152
|
}
|
|
2153
2153
|
),
|
|
2154
2154
|
p.step === 1 && (() => {
|
|
@@ -2157,14 +2157,14 @@ function Ir({
|
|
|
2157
2157
|
"aggregation_selector",
|
|
2158
2158
|
"field_selector",
|
|
2159
2159
|
"metric_selector"
|
|
2160
|
-
]),
|
|
2160
|
+
]), g = /* @__PURE__ */ new Set([
|
|
2161
2161
|
// Temporarily hide these from the add-control dialog while
|
|
2162
2162
|
// keeping the shared definitions for existing controls.
|
|
2163
2163
|
"date",
|
|
2164
2164
|
"text"
|
|
2165
|
-
]), b =
|
|
2166
|
-
(M) => !r.has(M.value) && !
|
|
2167
|
-
), L =
|
|
2165
|
+
]), b = h.filter(
|
|
2166
|
+
(M) => !r.has(M.value) && !g.has(M.value)
|
|
2167
|
+
), L = h.filter(
|
|
2168
2168
|
(M) => r.has(M.value)
|
|
2169
2169
|
), R = (M) => /* @__PURE__ */ i(
|
|
2170
2170
|
"button",
|
|
@@ -2197,7 +2197,7 @@ function Ir({
|
|
|
2197
2197
|
/* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: L.map(R) })
|
|
2198
2198
|
] }),
|
|
2199
2199
|
/* @__PURE__ */ t(
|
|
2200
|
-
|
|
2200
|
+
je,
|
|
2201
2201
|
{
|
|
2202
2202
|
secondary: /* @__PURE__ */ t(
|
|
2203
2203
|
G,
|
|
@@ -2219,8 +2219,8 @@ function Ir({
|
|
|
2219
2219
|
ln,
|
|
2220
2220
|
{
|
|
2221
2221
|
control: p.control,
|
|
2222
|
-
onChange: (r) => oe((
|
|
2223
|
-
...
|
|
2222
|
+
onChange: (r) => oe((g) => ({
|
|
2223
|
+
...g,
|
|
2224
2224
|
label: r
|
|
2225
2225
|
}))
|
|
2226
2226
|
}
|
|
@@ -2228,7 +2228,7 @@ function Ir({
|
|
|
2228
2228
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
|
|
2229
2229
|
] }),
|
|
2230
2230
|
H.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: H.map((r) => {
|
|
2231
|
-
const
|
|
2231
|
+
const g = (p.selectedCardIds || []).includes(r.cardId);
|
|
2232
2232
|
return /* @__PURE__ */ i(
|
|
2233
2233
|
"label",
|
|
2234
2234
|
{
|
|
@@ -2237,7 +2237,7 @@ function Ir({
|
|
|
2237
2237
|
/* @__PURE__ */ t(
|
|
2238
2238
|
Ue,
|
|
2239
2239
|
{
|
|
2240
|
-
checked:
|
|
2240
|
+
checked: g,
|
|
2241
2241
|
onCheckedChange: (b) => I(
|
|
2242
2242
|
(L) => L && {
|
|
2243
2243
|
...L,
|
|
@@ -2267,11 +2267,11 @@ function Ir({
|
|
|
2267
2267
|
selectedCardIds: p.selectedCardIds || [],
|
|
2268
2268
|
control: p.control,
|
|
2269
2269
|
selected: p.matrixTargetIds,
|
|
2270
|
-
onChange: (r,
|
|
2270
|
+
onChange: (r, g) => I((b) => b && { ...b, matrixTargetIds: { ...b.matrixTargetIds, [r]: g } })
|
|
2271
2271
|
}
|
|
2272
2272
|
),
|
|
2273
2273
|
/* @__PURE__ */ t(
|
|
2274
|
-
|
|
2274
|
+
je,
|
|
2275
2275
|
{
|
|
2276
2276
|
secondary: /* @__PURE__ */ t(
|
|
2277
2277
|
G,
|
|
@@ -2317,8 +2317,8 @@ function Ir({
|
|
|
2317
2317
|
previewControlDefinitions: A,
|
|
2318
2318
|
previewControlValues: ae,
|
|
2319
2319
|
onControlChange: (r) => oe(() => r),
|
|
2320
|
-
onLabelChange: (r) => oe((
|
|
2321
|
-
...
|
|
2320
|
+
onLabelChange: (r) => oe((g) => ({
|
|
2321
|
+
...g,
|
|
2322
2322
|
label: r
|
|
2323
2323
|
})),
|
|
2324
2324
|
onDefaultValueChange: Ie,
|
|
@@ -2342,8 +2342,8 @@ function Ir({
|
|
|
2342
2342
|
previewControlDefinitions: A,
|
|
2343
2343
|
previewControlValues: ae,
|
|
2344
2344
|
onControlChange: (r) => oe(() => r),
|
|
2345
|
-
onLabelChange: (r) => oe((
|
|
2346
|
-
...
|
|
2345
|
+
onLabelChange: (r) => oe((g) => ({
|
|
2346
|
+
...g,
|
|
2347
2347
|
label: r
|
|
2348
2348
|
})),
|
|
2349
2349
|
onDefaultValueChange: Ie,
|
|
@@ -2363,7 +2363,7 @@ function Ir({
|
|
|
2363
2363
|
control: p.control,
|
|
2364
2364
|
scope: e,
|
|
2365
2365
|
createdReference: Se,
|
|
2366
|
-
explorerContent: /* @__PURE__ */ i(
|
|
2366
|
+
explorerContent: /* @__PURE__ */ i(he, { children: [
|
|
2367
2367
|
"Open the card and use",
|
|
2368
2368
|
" ",
|
|
2369
2369
|
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
|
|
@@ -2387,13 +2387,13 @@ function Ir({
|
|
|
2387
2387
|
control: p.control,
|
|
2388
2388
|
scope: e,
|
|
2389
2389
|
createdReference: Se,
|
|
2390
|
-
summaryDetail: /* @__PURE__ */ i(
|
|
2390
|
+
summaryDetail: /* @__PURE__ */ i(he, { children: [
|
|
2391
2391
|
"Used by ",
|
|
2392
2392
|
(p.selectedCardIds || []).length,
|
|
2393
2393
|
" selected card",
|
|
2394
2394
|
(p.selectedCardIds || []).length === 1 ? "" : "s"
|
|
2395
2395
|
] }),
|
|
2396
|
-
explorerContent: /* @__PURE__ */ t(
|
|
2396
|
+
explorerContent: /* @__PURE__ */ t(he, { children: "Selected cards have been set up to respond to this control automatically." }),
|
|
2397
2397
|
sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
|
|
2398
2398
|
onBack: () => I(
|
|
2399
2399
|
(r) => r && {
|
|
@@ -2408,7 +2408,7 @@ function Ir({
|
|
|
2408
2408
|
] }) : null,
|
|
2409
2409
|
!p && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: d }) : null,
|
|
2410
2410
|
!p && n.map((r) => {
|
|
2411
|
-
const
|
|
2411
|
+
const g = z(r), b = l == null ? void 0 : l[r.id], L = Ke({
|
|
2412
2412
|
control: r,
|
|
2413
2413
|
defaultValues: o
|
|
2414
2414
|
}), R = U === r.id, M = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
|
|
@@ -2475,7 +2475,7 @@ function Ir({
|
|
|
2475
2475
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
|
|
2476
2476
|
/* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
|
|
2477
2477
|
/* @__PURE__ */ i(
|
|
2478
|
-
|
|
2478
|
+
xe,
|
|
2479
2479
|
{
|
|
2480
2480
|
value: r.type,
|
|
2481
2481
|
onValueChange: (O) => {
|
|
@@ -2485,10 +2485,10 @@ function Ir({
|
|
|
2485
2485
|
nextType: O,
|
|
2486
2486
|
defaultValues: o
|
|
2487
2487
|
});
|
|
2488
|
-
|
|
2488
|
+
j(W.controls, W.defaultValues);
|
|
2489
2489
|
},
|
|
2490
2490
|
children: [
|
|
2491
|
-
/* @__PURE__ */ t(
|
|
2491
|
+
/* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
|
|
2492
2492
|
/* @__PURE__ */ t(ve, { children: E(r.type).map(
|
|
2493
2493
|
(O) => /* @__PURE__ */ t(
|
|
2494
2494
|
re,
|
|
@@ -2506,7 +2506,7 @@ function Ir({
|
|
|
2506
2506
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
|
|
2507
2507
|
/* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
|
|
2508
2508
|
/* @__PURE__ */ i(
|
|
2509
|
-
|
|
2509
|
+
xe,
|
|
2510
2510
|
{
|
|
2511
2511
|
value: r.placement || K,
|
|
2512
2512
|
onValueChange: (O) => ee(r.id, (W) => ({
|
|
@@ -2514,20 +2514,20 @@ function Ir({
|
|
|
2514
2514
|
placement: O
|
|
2515
2515
|
})),
|
|
2516
2516
|
children: [
|
|
2517
|
-
/* @__PURE__ */ t(
|
|
2517
|
+
/* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
|
|
2518
2518
|
/* @__PURE__ */ t(ve, { children: F.map((O) => /* @__PURE__ */ t(re, { value: O.value, children: O.label }, O.value)) })
|
|
2519
2519
|
]
|
|
2520
2520
|
}
|
|
2521
2521
|
)
|
|
2522
2522
|
] })
|
|
2523
2523
|
] }),
|
|
2524
|
-
w(r.type) ? /* @__PURE__ */ i(
|
|
2524
|
+
w(r.type) ? /* @__PURE__ */ i(he, { children: [
|
|
2525
2525
|
/* @__PURE__ */ t(
|
|
2526
2526
|
On,
|
|
2527
2527
|
{
|
|
2528
2528
|
type: r.type,
|
|
2529
2529
|
participants: wt(
|
|
2530
|
-
|
|
2530
|
+
x || [],
|
|
2531
2531
|
r.type
|
|
2532
2532
|
).map((O) => ({
|
|
2533
2533
|
cardId: O.cardId,
|
|
@@ -2542,7 +2542,7 @@ function Ir({
|
|
|
2542
2542
|
}), X = n.map(
|
|
2543
2543
|
(Q) => Q.id === r.id ? W.nextControl : Q
|
|
2544
2544
|
);
|
|
2545
|
-
|
|
2545
|
+
j(X, o, {
|
|
2546
2546
|
type: "update",
|
|
2547
2547
|
cardBindingsById: W.cardBindingsById
|
|
2548
2548
|
});
|
|
@@ -2552,7 +2552,7 @@ function Ir({
|
|
|
2552
2552
|
/* @__PURE__ */ t(
|
|
2553
2553
|
vt,
|
|
2554
2554
|
{
|
|
2555
|
-
participants:
|
|
2555
|
+
participants: x || [],
|
|
2556
2556
|
selectedCardIds: (k == null ? void 0 : k[r.id]) || [],
|
|
2557
2557
|
control: r,
|
|
2558
2558
|
onChange: (O, W) => {
|
|
@@ -2561,7 +2561,7 @@ function Ir({
|
|
|
2561
2561
|
nextSelectedCardIds: (k == null ? void 0 : k[r.id]) || [],
|
|
2562
2562
|
matrixTargetIds: { [O]: W }
|
|
2563
2563
|
});
|
|
2564
|
-
|
|
2564
|
+
j(
|
|
2565
2565
|
n.map((Q) => Q.id === r.id ? X.nextControl : Q),
|
|
2566
2566
|
o,
|
|
2567
2567
|
{ type: "update", cardBindingsById: X.cardBindingsById }
|
|
@@ -2574,8 +2574,8 @@ function Ir({
|
|
|
2574
2574
|
Mt,
|
|
2575
2575
|
{
|
|
2576
2576
|
control: r,
|
|
2577
|
-
availableFieldChoices:
|
|
2578
|
-
availableMetricChoices:
|
|
2577
|
+
availableFieldChoices: g.fields,
|
|
2578
|
+
availableMetricChoices: g.metrics,
|
|
2579
2579
|
previewControlDefinitions: n,
|
|
2580
2580
|
previewControlValues: me,
|
|
2581
2581
|
controlLifecycle: "edit",
|
|
@@ -2583,7 +2583,7 @@ function Ir({
|
|
|
2583
2583
|
}
|
|
2584
2584
|
),
|
|
2585
2585
|
r.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
|
|
2586
|
-
|
|
2586
|
+
qt,
|
|
2587
2587
|
{
|
|
2588
2588
|
control: r,
|
|
2589
2589
|
value: L,
|
|
@@ -2597,10 +2597,10 @@ function Ir({
|
|
|
2597
2597
|
);
|
|
2598
2598
|
if (r.source.kind === "manual" && ($.current[r.id] = O), o) {
|
|
2599
2599
|
const X = { ...o };
|
|
2600
|
-
O === void 0 ? delete X[r.id] : X[r.id] = O,
|
|
2600
|
+
O === void 0 ? delete X[r.id] : X[r.id] = O, j(W, X);
|
|
2601
2601
|
return;
|
|
2602
2602
|
}
|
|
2603
|
-
|
|
2603
|
+
j(W, void 0);
|
|
2604
2604
|
}
|
|
2605
2605
|
}
|
|
2606
2606
|
),
|
|
@@ -2639,7 +2639,7 @@ function Ir({
|
|
|
2639
2639
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
|
|
2640
2640
|
/* @__PURE__ */ t(ie, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
|
|
2641
2641
|
/* @__PURE__ */ i(
|
|
2642
|
-
|
|
2642
|
+
xe,
|
|
2643
2643
|
{
|
|
2644
2644
|
value: r.initialValueStrategy,
|
|
2645
2645
|
onValueChange: (O) => ee(r.id, (W) => ({
|
|
@@ -2647,7 +2647,7 @@ function Ir({
|
|
|
2647
2647
|
initialValueStrategy: O
|
|
2648
2648
|
})),
|
|
2649
2649
|
children: [
|
|
2650
|
-
/* @__PURE__ */ t(
|
|
2650
|
+
/* @__PURE__ */ t(ge, { size: "xs", children: /* @__PURE__ */ t(be, {}) }),
|
|
2651
2651
|
/* @__PURE__ */ t(ve, { children: oa.map((O) => /* @__PURE__ */ t(
|
|
2652
2652
|
re,
|
|
2653
2653
|
{
|
|
@@ -2701,7 +2701,7 @@ function Lr(e) {
|
|
|
2701
2701
|
dismissMode: m = "passive"
|
|
2702
2702
|
} = e, d = n !== void 0, [u, l] = Y(!1), [s, c] = Y(
|
|
2703
2703
|
o
|
|
2704
|
-
),
|
|
2704
|
+
), x = d ? n : u, k = ne(
|
|
2705
2705
|
(N) => {
|
|
2706
2706
|
!N && s && m === "passive" || (d || l(N), N || c(!1), a == null || a(N));
|
|
2707
2707
|
},
|
|
@@ -2710,9 +2710,9 @@ function Lr(e) {
|
|
|
2710
2710
|
d || l(!1), c(!1), a == null || a(!1);
|
|
2711
2711
|
}, [d, a]);
|
|
2712
2712
|
de(() => {
|
|
2713
|
-
|
|
2714
|
-
}, [
|
|
2715
|
-
const
|
|
2713
|
+
x || c(!1);
|
|
2714
|
+
}, [x]);
|
|
2715
|
+
const f = ne(
|
|
2716
2716
|
(N) => {
|
|
2717
2717
|
s && N.preventDefault();
|
|
2718
2718
|
},
|
|
@@ -2722,8 +2722,8 @@ function Lr(e) {
|
|
|
2722
2722
|
forceClose: y,
|
|
2723
2723
|
handleOpenChange: k,
|
|
2724
2724
|
isCreateFlowActive: s,
|
|
2725
|
-
preventPassiveDismissDuringCreate:
|
|
2726
|
-
resolvedOpen:
|
|
2725
|
+
preventPassiveDismissDuringCreate: f,
|
|
2726
|
+
resolvedOpen: x,
|
|
2727
2727
|
setIsCreateFlowActive: c
|
|
2728
2728
|
};
|
|
2729
2729
|
}
|
|
@@ -2744,7 +2744,7 @@ function Ka(e, n) {
|
|
|
2744
2744
|
return pt({ ...e, operator: n }, { value: a });
|
|
2745
2745
|
}
|
|
2746
2746
|
function Pa(e, n) {
|
|
2747
|
-
const a =
|
|
2747
|
+
const a = qe(n.dataType) === "date";
|
|
2748
2748
|
return pt(
|
|
2749
2749
|
{ ...e, field: n, operator: a ? "between" : "=" },
|
|
2750
2750
|
{ value: "" }
|
|
@@ -2776,10 +2776,10 @@ function Ha({
|
|
|
2776
2776
|
entityId: "default",
|
|
2777
2777
|
entityName: "Default",
|
|
2778
2778
|
entityType: "table"
|
|
2779
|
-
},
|
|
2779
|
+
}, x = (I) => {
|
|
2780
2780
|
const $ = (D) => {
|
|
2781
2781
|
if (D.id === I) {
|
|
2782
|
-
const v = s[0] || c,
|
|
2782
|
+
const v = s[0] || c, h = qe(v.dataType) === "date";
|
|
2783
2783
|
return {
|
|
2784
2784
|
...D,
|
|
2785
2785
|
conditions: [
|
|
@@ -2787,8 +2787,8 @@ function Ha({
|
|
|
2787
2787
|
{
|
|
2788
2788
|
id: `condition-${Date.now()}`,
|
|
2789
2789
|
field: v,
|
|
2790
|
-
operator:
|
|
2791
|
-
value:
|
|
2790
|
+
operator: h ? "between" : "=",
|
|
2791
|
+
value: h ? [] : ""
|
|
2792
2792
|
}
|
|
2793
2793
|
]
|
|
2794
2794
|
};
|
|
@@ -2802,7 +2802,7 @@ function Ha({
|
|
|
2802
2802
|
}, k = (I) => {
|
|
2803
2803
|
const $ = (D) => {
|
|
2804
2804
|
if (D.id === I) {
|
|
2805
|
-
const v = s[0] || c,
|
|
2805
|
+
const v = s[0] || c, h = qe(v.dataType) === "date";
|
|
2806
2806
|
return {
|
|
2807
2807
|
...D,
|
|
2808
2808
|
groups: [
|
|
@@ -2815,8 +2815,8 @@ function Ha({
|
|
|
2815
2815
|
{
|
|
2816
2816
|
id: `condition-${Date.now()}`,
|
|
2817
2817
|
field: v,
|
|
2818
|
-
operator:
|
|
2819
|
-
value:
|
|
2818
|
+
operator: h ? "between" : "=",
|
|
2819
|
+
value: h ? [] : ""
|
|
2820
2820
|
}
|
|
2821
2821
|
],
|
|
2822
2822
|
groups: []
|
|
@@ -2833,36 +2833,36 @@ function Ha({
|
|
|
2833
2833
|
}, y = (I, $) => {
|
|
2834
2834
|
const D = (v) => v.id === I ? {
|
|
2835
2835
|
...v,
|
|
2836
|
-
conditions: v.conditions.filter((
|
|
2836
|
+
conditions: v.conditions.filter((h) => h.id !== $)
|
|
2837
2837
|
} : {
|
|
2838
2838
|
...v,
|
|
2839
2839
|
groups: v.groups.map(D)
|
|
2840
2840
|
};
|
|
2841
2841
|
d(D(o));
|
|
2842
|
-
},
|
|
2842
|
+
}, f = (I, $) => {
|
|
2843
2843
|
const D = (v) => v.id === I ? {
|
|
2844
2844
|
...v,
|
|
2845
|
-
groups: v.groups.filter((
|
|
2845
|
+
groups: v.groups.filter((h) => h.id !== $)
|
|
2846
2846
|
} : {
|
|
2847
2847
|
...v,
|
|
2848
2848
|
groups: v.groups.map(D)
|
|
2849
2849
|
};
|
|
2850
2850
|
d(D(o));
|
|
2851
2851
|
}, N = (I, $, D) => {
|
|
2852
|
-
const v = (
|
|
2853
|
-
...
|
|
2854
|
-
conditions:
|
|
2852
|
+
const v = (h) => h.id === I ? {
|
|
2853
|
+
...h,
|
|
2854
|
+
conditions: h.conditions.map(
|
|
2855
2855
|
(E) => E.id === $ ? D(E) : E
|
|
2856
2856
|
)
|
|
2857
2857
|
} : {
|
|
2858
|
-
...
|
|
2859
|
-
groups:
|
|
2858
|
+
...h,
|
|
2859
|
+
groups: h.groups.map(v)
|
|
2860
2860
|
};
|
|
2861
2861
|
d(v(o));
|
|
2862
2862
|
}, S = (I, $, D) => N(I, $, (v) => ({
|
|
2863
2863
|
..."value" in D || "operator" in D || "field" in D ? dn(v) : v,
|
|
2864
2864
|
...D
|
|
2865
|
-
})), V = (I, $, D) => N(I, $, () => D), F =
|
|
2865
|
+
})), V = (I, $, D) => N(I, $, () => D), F = qn(), K = (I, $) => {
|
|
2866
2866
|
const D = (v) => v.id === I ? {
|
|
2867
2867
|
...v,
|
|
2868
2868
|
logicalOperator: $
|
|
@@ -2881,45 +2881,45 @@ function Ha({
|
|
|
2881
2881
|
};
|
|
2882
2882
|
d(D(o));
|
|
2883
2883
|
}, T = (I, $, D) => {
|
|
2884
|
-
const v = (
|
|
2885
|
-
...
|
|
2886
|
-
conditions: yt(
|
|
2884
|
+
const v = (h) => h.id === I ? {
|
|
2885
|
+
...h,
|
|
2886
|
+
conditions: yt(h.conditions, $, D)
|
|
2887
2887
|
} : {
|
|
2888
|
-
...
|
|
2889
|
-
groups:
|
|
2888
|
+
...h,
|
|
2889
|
+
groups: h.groups.map(v)
|
|
2890
2890
|
};
|
|
2891
2891
|
d(v(o));
|
|
2892
2892
|
}, U = (I, $, D) => {
|
|
2893
|
-
const v = (
|
|
2894
|
-
...
|
|
2895
|
-
groups: yt(
|
|
2893
|
+
const v = (h) => h.id === I ? {
|
|
2894
|
+
...h,
|
|
2895
|
+
groups: yt(h.groups, $, D)
|
|
2896
2896
|
} : {
|
|
2897
|
-
...
|
|
2898
|
-
groups:
|
|
2897
|
+
...h,
|
|
2898
|
+
groups: h.groups.map(v)
|
|
2899
2899
|
};
|
|
2900
2900
|
d(v(o));
|
|
2901
2901
|
}, Z = (I) => {
|
|
2902
2902
|
if (!I || I.conditions.length === 0 && I.groups.length === 0)
|
|
2903
2903
|
return "-- No filters defined";
|
|
2904
2904
|
const $ = (v) => {
|
|
2905
|
-
let
|
|
2906
|
-
typeof v.field == "object" ?
|
|
2905
|
+
let h = "";
|
|
2906
|
+
typeof v.field == "object" ? h = v.field.entityName ? `${v.field.entityName}.${v.field.name}` : v.field.name : h = String(v.field);
|
|
2907
2907
|
const E = v.operator;
|
|
2908
2908
|
let w = v.value;
|
|
2909
2909
|
if (v.latestValue && E === "=")
|
|
2910
|
-
return `${
|
|
2910
|
+
return `${h} = ${jt} /* the latest value each time the card runs */`;
|
|
2911
2911
|
const H = Zt(v.relativeMeta);
|
|
2912
2912
|
if (H && va(E) && en(E, H)) {
|
|
2913
2913
|
const _ = Na(E, H), { label: z, range: B } = Nt(H, {
|
|
2914
2914
|
tz: (F == null ? void 0 : F.tz) ?? "UTC",
|
|
2915
2915
|
weekStart: (F == null ? void 0 : F.weekStart) ?? 1,
|
|
2916
2916
|
anchor: (F == null ? void 0 : F.anchor) ?? "now"
|
|
2917
|
-
}),
|
|
2917
|
+
}), j = _ ? Ca(_) : z;
|
|
2918
2918
|
if (B) {
|
|
2919
2919
|
const [ee] = tn(E, [B.start, B.end]);
|
|
2920
|
-
return `${
|
|
2920
|
+
return `${h} ${E} '${ee.toISOString()}' /* ${j}: the date updates each time the card runs */`;
|
|
2921
2921
|
}
|
|
2922
|
-
return `${
|
|
2922
|
+
return `${h} ${E} ${j} /* the date follows your calendar each time the card runs */`;
|
|
2923
2923
|
}
|
|
2924
2924
|
if (H && (E === "between" || E === "not between")) {
|
|
2925
2925
|
const _ = E === "between" ? "BETWEEN" : "NOT BETWEEN", { label: z, range: B } = Nt(H, {
|
|
@@ -2927,17 +2927,17 @@ function Ha({
|
|
|
2927
2927
|
weekStart: (F == null ? void 0 : F.weekStart) ?? 1,
|
|
2928
2928
|
anchor: (F == null ? void 0 : F.anchor) ?? "now"
|
|
2929
2929
|
});
|
|
2930
|
-
return B ? `${
|
|
2930
|
+
return B ? `${h} ${_} '${B.start.toISOString()}' AND '${B.end.toISOString()}' /* ${z}: dates update each time the card runs */` : nn(H).dataAnchored ? `${h} ${_} ${z} /* dates count back from the latest data each time the card runs */` : `${h} ${_} ${z} /* dates follow your calendar each time the card runs */`;
|
|
2931
2931
|
}
|
|
2932
2932
|
if (v.field.dataType === "string" && !["in", "not in"].includes(v.operator))
|
|
2933
2933
|
typeof w == "string" ? w = `'${w}'` : Array.isArray(w) && (w = `'${w.join(", ")}'`);
|
|
2934
2934
|
else if (v.field.dataType === "date" || v.field.dataType === "datetime" || v.field.dataType === "timestamp")
|
|
2935
2935
|
if (v.operator === "between" && Array.isArray(w) && w.length === 2) {
|
|
2936
2936
|
const _ = w[0] ? `'${w[0]}'` : "NULL", z = w[1] ? `'${w[1]}'` : "NULL";
|
|
2937
|
-
return `${
|
|
2937
|
+
return `${h} BETWEEN ${_} AND ${z}`;
|
|
2938
2938
|
} else if ((v.operator === "in" || v.operator === "not in") && Array.isArray(w)) {
|
|
2939
2939
|
const _ = w.map((z) => z ? `'${z}'` : "NULL").join(", ");
|
|
2940
|
-
return `${
|
|
2940
|
+
return `${h} ${E} (${_})`;
|
|
2941
2941
|
} else typeof w == "string" || w instanceof Date ? w = `'${w}'` : Array.isArray(w) && w.length > 0 && (w = `'${w[0]}'`);
|
|
2942
2942
|
else if (["in", "not in"].includes(v.operator)) {
|
|
2943
2943
|
let _ = [];
|
|
@@ -2950,22 +2950,22 @@ function Ha({
|
|
|
2950
2950
|
}
|
|
2951
2951
|
switch (E) {
|
|
2952
2952
|
case "contains":
|
|
2953
|
-
return typeof w == "string" ? `${
|
|
2953
|
+
return typeof w == "string" ? `${h} LIKE '%${w.replace(/'/g, "")}'` : `${h} LIKE '%${String(w)}'`;
|
|
2954
2954
|
case "startsWith":
|
|
2955
|
-
return typeof w == "string" ? `${
|
|
2955
|
+
return typeof w == "string" ? `${h} LIKE '${w.replace(/'/g, "")}%'` : `${h} LIKE '${String(w)}%'`;
|
|
2956
2956
|
case "endsWith":
|
|
2957
|
-
return typeof w == "string" ? `${
|
|
2957
|
+
return typeof w == "string" ? `${h} LIKE '%${w.replace(/'/g, "")}'` : `${h} LIKE '%${String(w)}'`;
|
|
2958
2958
|
case "isNull":
|
|
2959
|
-
return `${
|
|
2959
|
+
return `${h} IS NULL`;
|
|
2960
2960
|
case "isNotNull":
|
|
2961
|
-
return `${
|
|
2961
|
+
return `${h} IS NOT NULL`;
|
|
2962
2962
|
default:
|
|
2963
|
-
return `${
|
|
2963
|
+
return `${h} ${E} ${w}`;
|
|
2964
2964
|
}
|
|
2965
2965
|
}, D = (v) => {
|
|
2966
|
-
const
|
|
2966
|
+
const h = v.conditions.map($), E = v.groups.map(
|
|
2967
2967
|
(z) => D(z)
|
|
2968
|
-
), w = [...
|
|
2968
|
+
), w = [...h, ...E].filter(Boolean);
|
|
2969
2969
|
if (w.length === 0) return "";
|
|
2970
2970
|
const H = w.join(` ${v.logicalOperator} `), _ = w.length > 1 ? `(${H})` : H;
|
|
2971
2971
|
return v.negate ? `NOT ${_}` : _;
|
|
@@ -2977,10 +2977,10 @@ function Ha({
|
|
|
2977
2977
|
setCurrentFilters: d,
|
|
2978
2978
|
availableFields: s,
|
|
2979
2979
|
isLoading: l,
|
|
2980
|
-
addCondition:
|
|
2980
|
+
addCondition: x,
|
|
2981
2981
|
addGroup: k,
|
|
2982
2982
|
removeCondition: y,
|
|
2983
|
-
removeGroup:
|
|
2983
|
+
removeGroup: f,
|
|
2984
2984
|
updateConditionFields: S,
|
|
2985
2985
|
replaceCondition: V,
|
|
2986
2986
|
updateGroupOperator: K,
|
|
@@ -3000,7 +3000,7 @@ function Ya({
|
|
|
3000
3000
|
/* @__PURE__ */ t(st, { asChild: !0, children: /* @__PURE__ */ t(
|
|
3001
3001
|
"div",
|
|
3002
3002
|
{
|
|
3003
|
-
className:
|
|
3003
|
+
className: q(
|
|
3004
3004
|
"w-[200px] overflow-hidden text-ellipsis whitespace-nowrap text-sm",
|
|
3005
3005
|
n
|
|
3006
3006
|
),
|
|
@@ -3030,14 +3030,14 @@ function Xa({
|
|
|
3030
3030
|
role: "combobox",
|
|
3031
3031
|
"aria-expanded": d,
|
|
3032
3032
|
title: e ? `${e.entityName}.${e.name}` : void 0,
|
|
3033
|
-
className:
|
|
3033
|
+
className: q(
|
|
3034
3034
|
"min-w-0 justify-between gap-1.5 font-normal",
|
|
3035
3035
|
!e && "text-muted-foreground",
|
|
3036
3036
|
m
|
|
3037
3037
|
),
|
|
3038
3038
|
children: [
|
|
3039
3039
|
s ? /* @__PURE__ */ t(Ya, { className: "w-auto min-w-0 flex-1 text-left text-[12px]", children: s }) : /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-left", children: o }),
|
|
3040
|
-
/* @__PURE__ */ t(
|
|
3040
|
+
/* @__PURE__ */ t(jn, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
|
|
3041
3041
|
]
|
|
3042
3042
|
}
|
|
3043
3043
|
) }),
|
|
@@ -3047,8 +3047,8 @@ function Xa({
|
|
|
3047
3047
|
className: "flex w-80 flex-col rounded-control p-1.5",
|
|
3048
3048
|
align: "start",
|
|
3049
3049
|
onOpenAutoFocus: (c) => {
|
|
3050
|
-
var
|
|
3051
|
-
c.preventDefault(), (k = (
|
|
3050
|
+
var x, k;
|
|
3051
|
+
c.preventDefault(), (k = (x = c.currentTarget) == null ? void 0 : x.querySelector('input[type="text"]')) == null || k.focus();
|
|
3052
3052
|
},
|
|
3053
3053
|
children: /* @__PURE__ */ t(
|
|
3054
3054
|
Un,
|
|
@@ -3096,17 +3096,17 @@ function Ja({
|
|
|
3096
3096
|
className: d
|
|
3097
3097
|
}) {
|
|
3098
3098
|
const [u, l] = Fe.useState(!1), s = cn(e, n), c = Fe.useMemo(
|
|
3099
|
-
() => new Set(a.map((
|
|
3099
|
+
() => new Set(a.map((f) => ye(f))),
|
|
3100
3100
|
[a]
|
|
3101
|
-
),
|
|
3101
|
+
), x = (f) => {
|
|
3102
3102
|
var N, S;
|
|
3103
|
-
return ((S = (N = s.allRecords.find((V) => ye(V.value) === ye(
|
|
3104
|
-
}, k = (
|
|
3105
|
-
o(a.filter((N) => N !==
|
|
3106
|
-
}, y = (
|
|
3107
|
-
l(
|
|
3103
|
+
return ((S = (N = s.allRecords.find((V) => ye(V.value) === ye(f))) == null ? void 0 : N.label) == null ? void 0 : S.toString()) ?? f;
|
|
3104
|
+
}, k = (f) => {
|
|
3105
|
+
o(a.filter((N) => N !== f));
|
|
3106
|
+
}, y = (f) => {
|
|
3107
|
+
l(f), !f && s.query && s.setQuery("");
|
|
3108
3108
|
};
|
|
3109
|
-
return /* @__PURE__ */ t("div", { className:
|
|
3109
|
+
return /* @__PURE__ */ t("div", { className: q("w-full", d), children: /* @__PURE__ */ i(lt, { open: u, onOpenChange: y, modal: !0, children: [
|
|
3110
3110
|
/* @__PURE__ */ t(it, { asChild: !0, children: /* @__PURE__ */ i(
|
|
3111
3111
|
G,
|
|
3112
3112
|
{
|
|
@@ -3116,8 +3116,8 @@ function Ja({
|
|
|
3116
3116
|
"aria-expanded": u,
|
|
3117
3117
|
className: "h-auto min-h-7 w-full justify-between gap-1.5 px-2 py-0.5 font-normal",
|
|
3118
3118
|
children: [
|
|
3119
|
-
/* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-wrap gap-1", children: a.length > 0 ? a.map((
|
|
3120
|
-
const N =
|
|
3119
|
+
/* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-wrap gap-1", children: a.length > 0 ? a.map((f) => {
|
|
3120
|
+
const N = x(f);
|
|
3121
3121
|
return (
|
|
3122
3122
|
// Selected values render as small square chips (4px
|
|
3123
3123
|
// radius), not pills. Pill badges are reserved for
|
|
@@ -3136,20 +3136,20 @@ function Ja({
|
|
|
3136
3136
|
"aria-label": `Remove ${N}`,
|
|
3137
3137
|
className: "shrink-0 rounded-[2px] text-muted-foreground outline-none hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring",
|
|
3138
3138
|
onKeyDown: (S) => {
|
|
3139
|
-
S.key === "Enter" && k(
|
|
3139
|
+
S.key === "Enter" && k(f);
|
|
3140
3140
|
},
|
|
3141
3141
|
onMouseDown: (S) => {
|
|
3142
3142
|
S.preventDefault(), S.stopPropagation();
|
|
3143
3143
|
},
|
|
3144
3144
|
onClick: (S) => {
|
|
3145
|
-
S.stopPropagation(), k(
|
|
3145
|
+
S.stopPropagation(), k(f);
|
|
3146
3146
|
},
|
|
3147
3147
|
children: /* @__PURE__ */ t(ce, { className: "h-3 w-3" })
|
|
3148
3148
|
}
|
|
3149
3149
|
)
|
|
3150
3150
|
]
|
|
3151
3151
|
},
|
|
3152
|
-
|
|
3152
|
+
f
|
|
3153
3153
|
)
|
|
3154
3154
|
);
|
|
3155
3155
|
}) : /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: m }) }),
|
|
@@ -3162,17 +3162,17 @@ function Ja({
|
|
|
3162
3162
|
{
|
|
3163
3163
|
className: "w-[var(--radix-popover-trigger-width)] min-w-[240px] rounded-control p-1.5",
|
|
3164
3164
|
align: "start",
|
|
3165
|
-
onOpenAutoFocus: (
|
|
3165
|
+
onOpenAutoFocus: (f) => {
|
|
3166
3166
|
var N, S;
|
|
3167
|
-
|
|
3167
|
+
f.preventDefault(), (S = (N = f.currentTarget) == null ? void 0 : N.querySelector('input[type="text"]')) == null || S.focus();
|
|
3168
3168
|
},
|
|
3169
3169
|
children: /* @__PURE__ */ t(
|
|
3170
3170
|
Ut,
|
|
3171
3171
|
{
|
|
3172
3172
|
records: s.displayRecords,
|
|
3173
3173
|
selectedIdentities: c,
|
|
3174
|
-
onToggle: (
|
|
3175
|
-
const N = String(
|
|
3174
|
+
onToggle: (f) => {
|
|
3175
|
+
const N = String(f.value);
|
|
3176
3176
|
a.includes(N) ? k(N) : o([...a, N]);
|
|
3177
3177
|
},
|
|
3178
3178
|
browse: s,
|
|
@@ -3193,13 +3193,13 @@ function Za({
|
|
|
3193
3193
|
placeholder: m = "Select value…",
|
|
3194
3194
|
className: d
|
|
3195
3195
|
}) {
|
|
3196
|
-
var y,
|
|
3196
|
+
var y, f;
|
|
3197
3197
|
const [u, l] = Fe.useState(!1), s = cn(e, n), c = Fe.useMemo(
|
|
3198
3198
|
() => new Set(a ? [ye(a)] : []),
|
|
3199
3199
|
[a]
|
|
3200
|
-
),
|
|
3200
|
+
), x = a ? ((f = (y = s.allRecords.find(
|
|
3201
3201
|
(N) => ye(N.value) === ye(a)
|
|
3202
|
-
)) == null ? void 0 : y.label) == null ? void 0 :
|
|
3202
|
+
)) == null ? void 0 : y.label) == null ? void 0 : f.toString()) ?? a : "", k = (N) => {
|
|
3203
3203
|
l(N), !N && s.query && s.setQuery("");
|
|
3204
3204
|
};
|
|
3205
3205
|
return /* @__PURE__ */ i(lt, { open: u, onOpenChange: k, modal: !0, children: [
|
|
@@ -3210,7 +3210,7 @@ function Za({
|
|
|
3210
3210
|
size: "xs",
|
|
3211
3211
|
role: "combobox",
|
|
3212
3212
|
"aria-expanded": u,
|
|
3213
|
-
className:
|
|
3213
|
+
className: q(
|
|
3214
3214
|
"min-w-0 flex-1 justify-between gap-1.5 px-2 font-normal",
|
|
3215
3215
|
d
|
|
3216
3216
|
),
|
|
@@ -3218,8 +3218,8 @@ function Za({
|
|
|
3218
3218
|
/* @__PURE__ */ t(
|
|
3219
3219
|
"span",
|
|
3220
3220
|
{
|
|
3221
|
-
className:
|
|
3222
|
-
children: a ?
|
|
3221
|
+
className: q("truncate", !a && "text-muted-foreground"),
|
|
3222
|
+
children: a ? x : m
|
|
3223
3223
|
}
|
|
3224
3224
|
),
|
|
3225
3225
|
/* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5 shrink-0 opacity-50" })
|
|
@@ -3263,14 +3263,14 @@ function er({
|
|
|
3263
3263
|
onChange: d,
|
|
3264
3264
|
className: u
|
|
3265
3265
|
}) {
|
|
3266
|
-
const l = Wn(), s = Qn(), c = n === "between" || n === "not between",
|
|
3266
|
+
const l = Wn(), s = Qn(), c = n === "between" || n === "not between", x = en(n), k = x ? a : void 0, y = P(() => {
|
|
3267
3267
|
if (!c || !a) return;
|
|
3268
3268
|
const C = s(a);
|
|
3269
3269
|
return {
|
|
3270
3270
|
...C,
|
|
3271
3271
|
tooltip: C.dates ? void 0 : nn(a).dataAnchored ? Kn : Pn
|
|
3272
3272
|
};
|
|
3273
|
-
}, [c, a, s]),
|
|
3273
|
+
}, [c, a, s]), f = P(() => {
|
|
3274
3274
|
if (c) {
|
|
3275
3275
|
if (y) {
|
|
3276
3276
|
const { range: C } = y;
|
|
@@ -3286,14 +3286,14 @@ function er({
|
|
|
3286
3286
|
if (!e || c || o) return;
|
|
3287
3287
|
const C = Array.isArray(e) ? e[0] : e;
|
|
3288
3288
|
return He(C, l, "start");
|
|
3289
|
-
}, [e, c, o, l]), S = (C) => n === "<=" || n === ">" ?
|
|
3289
|
+
}, [e, c, o, l]), S = (C) => n === "<=" || n === ">" ? xa(C, l) : ga(C, l);
|
|
3290
3290
|
return /* @__PURE__ */ t(
|
|
3291
3291
|
Hn,
|
|
3292
3292
|
{
|
|
3293
|
-
value: c ?
|
|
3293
|
+
value: c ? f : void 0,
|
|
3294
3294
|
selectionMode: c ? "range" : "single",
|
|
3295
3295
|
singleValue: c ? void 0 : N,
|
|
3296
|
-
singleValueLabel: !c && o ?
|
|
3296
|
+
singleValueLabel: !c && o ? jt : void 0,
|
|
3297
3297
|
onChange: (C) => {
|
|
3298
3298
|
if (C != null && C.from && C.to) {
|
|
3299
3299
|
d({ value: [C.from.toISOString(), C.to.toISOString()] });
|
|
@@ -3306,12 +3306,12 @@ function er({
|
|
|
3306
3306
|
d({ value: "" });
|
|
3307
3307
|
return;
|
|
3308
3308
|
}
|
|
3309
|
-
const T = S(C), U =
|
|
3309
|
+
const T = S(C), U = fa(T, n, {
|
|
3310
3310
|
timezone: l
|
|
3311
3311
|
});
|
|
3312
3312
|
d({ value: typeof U == "string" ? U : U.toISOString() });
|
|
3313
3313
|
},
|
|
3314
|
-
onRelativeSelect:
|
|
3314
|
+
onRelativeSelect: x ? (C, T) => {
|
|
3315
3315
|
if (!C.from || !C.to) {
|
|
3316
3316
|
d({ value: c ? [] : "" });
|
|
3317
3317
|
return;
|
|
@@ -3326,21 +3326,21 @@ function er({
|
|
|
3326
3326
|
});
|
|
3327
3327
|
} : void 0,
|
|
3328
3328
|
relativeValue: k,
|
|
3329
|
-
comparisonValue: !c &&
|
|
3330
|
-
relativePoints: !c &&
|
|
3329
|
+
comparisonValue: !c && x ? n : void 0,
|
|
3330
|
+
relativePoints: !c && x ? { operator: n } : "none",
|
|
3331
3331
|
relativeSummary: y,
|
|
3332
|
-
supplementalFooter:
|
|
3332
|
+
supplementalFooter: x ? /* @__PURE__ */ t("p", { className: "border-t border-border px-3 py-2 text-[11px] text-muted-foreground", children: "Presets and Relative update each time the card runs. Static dates stay fixed." }) : void 0,
|
|
3333
3333
|
timezone: l,
|
|
3334
|
-
enableTimePrecision:
|
|
3334
|
+
enableTimePrecision: ha(m),
|
|
3335
3335
|
staticTimeInputs: !1,
|
|
3336
|
-
showRelativeTab:
|
|
3337
|
-
className:
|
|
3336
|
+
showRelativeTab: x,
|
|
3337
|
+
className: q("min-w-0", u),
|
|
3338
3338
|
buttonClassName: "h-7 text-[12px] [&>span]:text-[12px]",
|
|
3339
3339
|
placeholder: "Select date…"
|
|
3340
3340
|
}
|
|
3341
3341
|
);
|
|
3342
3342
|
}
|
|
3343
|
-
const tr = (e) => e.conditions.length > 0 || e.groups.length > 0,
|
|
3343
|
+
const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ht = [
|
|
3344
3344
|
"contains",
|
|
3345
3345
|
"startsWith",
|
|
3346
3346
|
"endsWith",
|
|
@@ -3353,7 +3353,7 @@ const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
|
|
|
3353
3353
|
">=",
|
|
3354
3354
|
"<",
|
|
3355
3355
|
"<=",
|
|
3356
|
-
...
|
|
3356
|
+
...ht,
|
|
3357
3357
|
"in",
|
|
3358
3358
|
"not in",
|
|
3359
3359
|
"isNull",
|
|
@@ -3361,7 +3361,7 @@ const tr = (e) => e.conditions.length > 0 || e.groups.length > 0, ft = [
|
|
|
3361
3361
|
], ar = [
|
|
3362
3362
|
"=",
|
|
3363
3363
|
"!=",
|
|
3364
|
-
...
|
|
3364
|
+
...ht,
|
|
3365
3365
|
"in",
|
|
3366
3366
|
"not in",
|
|
3367
3367
|
"isNull",
|
|
@@ -3424,24 +3424,24 @@ function ir(e) {
|
|
|
3424
3424
|
return nr;
|
|
3425
3425
|
}
|
|
3426
3426
|
}
|
|
3427
|
-
const un = "w-[68px] shrink-0", Ot = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink",
|
|
3427
|
+
const un = "w-[68px] shrink-0", Ot = "group-data-[inline]/filters:w-auto group-data-[inline]/filters:min-w-0 group-data-[inline]/filters:flex-1 group-data-[inline]/filters:shrink", ft = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
3428
3428
|
function mn({
|
|
3429
3429
|
value: e,
|
|
3430
3430
|
onValueChange: n,
|
|
3431
3431
|
"aria-label": a
|
|
3432
3432
|
}) {
|
|
3433
3433
|
return /* @__PURE__ */ i(
|
|
3434
|
-
|
|
3434
|
+
xe,
|
|
3435
3435
|
{
|
|
3436
3436
|
value: e,
|
|
3437
3437
|
onValueChange: (o) => n(o),
|
|
3438
3438
|
children: [
|
|
3439
3439
|
/* @__PURE__ */ t(
|
|
3440
|
-
|
|
3440
|
+
ge,
|
|
3441
3441
|
{
|
|
3442
3442
|
size: "xs",
|
|
3443
3443
|
"aria-label": a,
|
|
3444
|
-
className:
|
|
3444
|
+
className: q(un, "font-medium"),
|
|
3445
3445
|
children: /* @__PURE__ */ t(be, {})
|
|
3446
3446
|
}
|
|
3447
3447
|
),
|
|
@@ -3466,22 +3466,22 @@ function pn({
|
|
|
3466
3466
|
replaceCondition: c
|
|
3467
3467
|
}) {
|
|
3468
3468
|
const {
|
|
3469
|
-
attributes:
|
|
3469
|
+
attributes: x,
|
|
3470
3470
|
listeners: k,
|
|
3471
3471
|
setNodeRef: y,
|
|
3472
|
-
transform:
|
|
3472
|
+
transform: f,
|
|
3473
3473
|
transition: N,
|
|
3474
3474
|
isDragging: S
|
|
3475
3475
|
} = Gt({ id: e.id }), V = {
|
|
3476
|
-
transform: Bt.Transform.toString(
|
|
3476
|
+
transform: Bt.Transform.toString(f),
|
|
3477
3477
|
transition: N
|
|
3478
|
-
}, F =
|
|
3478
|
+
}, F = qe(e.field.dataType), K = e.operator === "isNull" || e.operator === "isNotNull", C = e.operator === "in" || e.operator === "not in";
|
|
3479
3479
|
return /* @__PURE__ */ i(
|
|
3480
3480
|
"div",
|
|
3481
3481
|
{
|
|
3482
3482
|
ref: y,
|
|
3483
3483
|
style: V,
|
|
3484
|
-
className:
|
|
3484
|
+
className: q(
|
|
3485
3485
|
"flex items-center gap-2 rounded-control px-1.5 py-1 transition-colors hover:bg-muted/40",
|
|
3486
3486
|
S && "z-50 opacity-50"
|
|
3487
3487
|
),
|
|
@@ -3490,7 +3490,7 @@ function pn({
|
|
|
3490
3490
|
"button",
|
|
3491
3491
|
{
|
|
3492
3492
|
type: "button",
|
|
3493
|
-
...
|
|
3493
|
+
...x,
|
|
3494
3494
|
...k,
|
|
3495
3495
|
"aria-label": "Drag to reorder condition",
|
|
3496
3496
|
className: "flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded-control text-muted-foreground/60 hover:text-foreground focus-visible:outline-none active:cursor-grabbing",
|
|
@@ -3504,7 +3504,7 @@ function pn({
|
|
|
3504
3504
|
onValueChange: (T) => d(a, T),
|
|
3505
3505
|
"aria-label": "Logical operator"
|
|
3506
3506
|
}
|
|
3507
|
-
) : /* @__PURE__ */ t("span", { className:
|
|
3507
|
+
) : /* @__PURE__ */ t("span", { className: q(un, "text-center", ft), children: "Where" }),
|
|
3508
3508
|
/* @__PURE__ */ t(
|
|
3509
3509
|
Xa,
|
|
3510
3510
|
{
|
|
@@ -3518,11 +3518,11 @@ function pn({
|
|
|
3518
3518
|
},
|
|
3519
3519
|
availableFields: u,
|
|
3520
3520
|
placeholder: "Select field",
|
|
3521
|
-
className:
|
|
3521
|
+
className: q("w-60 shrink-0", Ot)
|
|
3522
3522
|
}
|
|
3523
3523
|
),
|
|
3524
3524
|
/* @__PURE__ */ i(
|
|
3525
|
-
|
|
3525
|
+
xe,
|
|
3526
3526
|
{
|
|
3527
3527
|
value: e.operator,
|
|
3528
3528
|
onValueChange: (T) => c(
|
|
@@ -3532,11 +3532,11 @@ function pn({
|
|
|
3532
3532
|
),
|
|
3533
3533
|
children: [
|
|
3534
3534
|
/* @__PURE__ */ t(
|
|
3535
|
-
|
|
3535
|
+
ge,
|
|
3536
3536
|
{
|
|
3537
3537
|
size: "xs",
|
|
3538
3538
|
"aria-label": "Operator",
|
|
3539
|
-
className:
|
|
3539
|
+
className: q("w-40 shrink-0", Ot),
|
|
3540
3540
|
children: /* @__PURE__ */ t(be, { children: e.operator ? Xe(e.operator) : "" })
|
|
3541
3541
|
}
|
|
3542
3542
|
),
|
|
@@ -3556,7 +3556,7 @@ function pn({
|
|
|
3556
3556
|
placeholder: "Select values…",
|
|
3557
3557
|
className: "min-w-0 flex-1"
|
|
3558
3558
|
}
|
|
3559
|
-
) :
|
|
3559
|
+
) : ht.includes(e.operator) ? /* @__PURE__ */ t(
|
|
3560
3560
|
Ne,
|
|
3561
3561
|
{
|
|
3562
3562
|
size: "xs",
|
|
@@ -3578,14 +3578,14 @@ function pn({
|
|
|
3578
3578
|
className: "min-w-0 flex-1"
|
|
3579
3579
|
}
|
|
3580
3580
|
) : F === "boolean" ? /* @__PURE__ */ i(
|
|
3581
|
-
|
|
3581
|
+
xe,
|
|
3582
3582
|
{
|
|
3583
3583
|
value: typeof e.value == "boolean" ? String(e.value) : "",
|
|
3584
3584
|
onValueChange: (T) => s(a, e.id, {
|
|
3585
3585
|
value: T === "true"
|
|
3586
3586
|
}),
|
|
3587
3587
|
children: [
|
|
3588
|
-
/* @__PURE__ */ t(
|
|
3588
|
+
/* @__PURE__ */ t(ge, { size: "xs", className: "min-w-0 flex-1", children: /* @__PURE__ */ t(be, { placeholder: "Select value…" }) }),
|
|
3589
3589
|
/* @__PURE__ */ i(ve, { children: [
|
|
3590
3590
|
/* @__PURE__ */ t(re, { value: "true", children: "True" }),
|
|
3591
3591
|
/* @__PURE__ */ t(re, { value: "false", children: "False" })
|
|
@@ -3641,7 +3641,7 @@ function pn({
|
|
|
3641
3641
|
);
|
|
3642
3642
|
}
|
|
3643
3643
|
const _t = "group-data-[inline]/filters:h-auto group-data-[inline]/filters:gap-1 group-data-[inline]/filters:border-0 group-data-[inline]/filters:bg-transparent group-data-[inline]/filters:px-0 group-data-[inline]/filters:py-0.5 group-data-[inline]/filters:text-[11px] group-data-[inline]/filters:font-medium group-data-[inline]/filters:text-muted-foreground group-data-[inline]/filters:shadow-none group-data-[inline]/filters:underline-offset-2 group-data-[inline]/filters:hover:bg-transparent group-data-[inline]/filters:hover:text-foreground group-data-[inline]/filters:hover:underline";
|
|
3644
|
-
function
|
|
3644
|
+
function hn({
|
|
3645
3645
|
onAddCondition: e,
|
|
3646
3646
|
onAddGroup: n
|
|
3647
3647
|
}) {
|
|
@@ -3652,7 +3652,7 @@ function fn({
|
|
|
3652
3652
|
type: "button",
|
|
3653
3653
|
size: "xs",
|
|
3654
3654
|
variant: "outline",
|
|
3655
|
-
className:
|
|
3655
|
+
className: q("gap-1.5", _t),
|
|
3656
3656
|
onClick: e,
|
|
3657
3657
|
children: [
|
|
3658
3658
|
/* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
|
|
@@ -3666,7 +3666,7 @@ function fn({
|
|
|
3666
3666
|
type: "button",
|
|
3667
3667
|
size: "xs",
|
|
3668
3668
|
variant: "ghost",
|
|
3669
|
-
className:
|
|
3669
|
+
className: q("gap-1.5 text-muted-foreground hover:text-foreground", _t),
|
|
3670
3670
|
onClick: n,
|
|
3671
3671
|
children: [
|
|
3672
3672
|
/* @__PURE__ */ t(Ve, { className: "h-3 w-3" }),
|
|
@@ -3687,10 +3687,10 @@ function dr({
|
|
|
3687
3687
|
onReorderConditions: l,
|
|
3688
3688
|
onReorderGroups: s,
|
|
3689
3689
|
onAddCondition: c,
|
|
3690
|
-
onAddGroup:
|
|
3690
|
+
onAddGroup: x,
|
|
3691
3691
|
availableFields: k,
|
|
3692
3692
|
source: y,
|
|
3693
|
-
renderFilterGroup:
|
|
3693
|
+
renderFilterGroup: f,
|
|
3694
3694
|
updateConditionFields: N,
|
|
3695
3695
|
replaceCondition: S
|
|
3696
3696
|
}) {
|
|
@@ -3707,18 +3707,18 @@ function dr({
|
|
|
3707
3707
|
}, p = ($) => {
|
|
3708
3708
|
const { active: D, over: v } = $;
|
|
3709
3709
|
if (v && D.id !== v.id) {
|
|
3710
|
-
const
|
|
3710
|
+
const h = e.conditions.findIndex(
|
|
3711
3711
|
(w) => w.id === D.id
|
|
3712
3712
|
), E = e.conditions.findIndex(
|
|
3713
3713
|
(w) => w.id === v.id
|
|
3714
3714
|
);
|
|
3715
|
-
|
|
3715
|
+
h !== -1 && E !== -1 && l(e.id, h, E);
|
|
3716
3716
|
}
|
|
3717
3717
|
}, I = ($) => {
|
|
3718
3718
|
const { active: D, over: v } = $;
|
|
3719
3719
|
if (v && D.id !== v.id && a) {
|
|
3720
|
-
const
|
|
3721
|
-
|
|
3720
|
+
const h = e.groups.findIndex((w) => w.id === D.id), E = e.groups.findIndex((w) => w.id === v.id);
|
|
3721
|
+
h !== -1 && E !== -1 && s(a, h, E);
|
|
3722
3722
|
}
|
|
3723
3723
|
};
|
|
3724
3724
|
return /* @__PURE__ */ i(
|
|
@@ -3726,7 +3726,7 @@ function dr({
|
|
|
3726
3726
|
{
|
|
3727
3727
|
ref: K,
|
|
3728
3728
|
style: Z,
|
|
3729
|
-
className:
|
|
3729
|
+
className: q(
|
|
3730
3730
|
n > 0 && "mt-2 overflow-hidden rounded-[6px] border border-border/60",
|
|
3731
3731
|
U && "z-50 opacity-50"
|
|
3732
3732
|
),
|
|
@@ -3764,7 +3764,7 @@ function dr({
|
|
|
3764
3764
|
"aria-label": "Group logical operator"
|
|
3765
3765
|
}
|
|
3766
3766
|
),
|
|
3767
|
-
/* @__PURE__ */ t("span", { className:
|
|
3767
|
+
/* @__PURE__ */ t("span", { className: ft, children: "Group" })
|
|
3768
3768
|
] }),
|
|
3769
3769
|
/* @__PURE__ */ t(
|
|
3770
3770
|
G,
|
|
@@ -3779,13 +3779,13 @@ function dr({
|
|
|
3779
3779
|
}
|
|
3780
3780
|
)
|
|
3781
3781
|
] }),
|
|
3782
|
-
/* @__PURE__ */ i("div", { className:
|
|
3782
|
+
/* @__PURE__ */ i("div", { className: q(n > 0 && "p-2"), children: [
|
|
3783
3783
|
/* @__PURE__ */ t(
|
|
3784
3784
|
Re,
|
|
3785
3785
|
{
|
|
3786
3786
|
sensors: Je(
|
|
3787
|
-
|
|
3788
|
-
|
|
3787
|
+
fe(tt),
|
|
3788
|
+
fe(et, {
|
|
3789
3789
|
coordinateGetter: Ze
|
|
3790
3790
|
})
|
|
3791
3791
|
),
|
|
@@ -3820,8 +3820,8 @@ function dr({
|
|
|
3820
3820
|
Re,
|
|
3821
3821
|
{
|
|
3822
3822
|
sensors: Je(
|
|
3823
|
-
|
|
3824
|
-
|
|
3823
|
+
fe(tt),
|
|
3824
|
+
fe(et, {
|
|
3825
3825
|
coordinateGetter: Ze
|
|
3826
3826
|
})
|
|
3827
3827
|
),
|
|
@@ -3833,7 +3833,7 @@ function dr({
|
|
|
3833
3833
|
items: e.groups.map(($) => $.id),
|
|
3834
3834
|
strategy: Me,
|
|
3835
3835
|
children: e.groups.map(
|
|
3836
|
-
($) =>
|
|
3836
|
+
($) => f($, n + 1, e.id)
|
|
3837
3837
|
)
|
|
3838
3838
|
}
|
|
3839
3839
|
)
|
|
@@ -3841,10 +3841,10 @@ function dr({
|
|
|
3841
3841
|
),
|
|
3842
3842
|
e.conditions.length === 0 && e.groups.length === 0 && /* @__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 conditions in this group." }),
|
|
3843
3843
|
/* @__PURE__ */ t(
|
|
3844
|
-
|
|
3844
|
+
hn,
|
|
3845
3845
|
{
|
|
3846
3846
|
onAddCondition: () => c(e.id),
|
|
3847
|
-
onAddGroup: () =>
|
|
3847
|
+
onAddGroup: () => x(e.id)
|
|
3848
3848
|
}
|
|
3849
3849
|
)
|
|
3850
3850
|
] })
|
|
@@ -3864,10 +3864,10 @@ function $r({
|
|
|
3864
3864
|
const l = u !== void 0, {
|
|
3865
3865
|
currentFilters: s,
|
|
3866
3866
|
availableFields: c,
|
|
3867
|
-
isLoading:
|
|
3867
|
+
isLoading: x,
|
|
3868
3868
|
addCondition: k,
|
|
3869
3869
|
addGroup: y,
|
|
3870
|
-
removeCondition:
|
|
3870
|
+
removeCondition: f,
|
|
3871
3871
|
removeGroup: N,
|
|
3872
3872
|
updateConditionFields: S,
|
|
3873
3873
|
replaceCondition: V,
|
|
@@ -3881,16 +3881,16 @@ function $r({
|
|
|
3881
3881
|
initialFilters: e,
|
|
3882
3882
|
availableFields: n,
|
|
3883
3883
|
...u ? {
|
|
3884
|
-
onChange: (
|
|
3884
|
+
onChange: (h) => u(tr(h) ? h : null)
|
|
3885
3885
|
} : {}
|
|
3886
3886
|
}), p = Je(
|
|
3887
|
-
|
|
3888
|
-
|
|
3887
|
+
fe(tt),
|
|
3888
|
+
fe(et, {
|
|
3889
3889
|
coordinateGetter: Ze
|
|
3890
3890
|
})
|
|
3891
|
-
), [I, $] = Y(!1), D = (
|
|
3891
|
+
), [I, $] = Y(!1), D = (h, E = 0, w) => {
|
|
3892
3892
|
if (E === 0) {
|
|
3893
|
-
const H =
|
|
3893
|
+
const H = h.conditions.length === 0 && h.groups.length === 0;
|
|
3894
3894
|
return /* @__PURE__ */ i("div", { children: [
|
|
3895
3895
|
/* @__PURE__ */ t(
|
|
3896
3896
|
Re,
|
|
@@ -3900,27 +3900,27 @@ function $r({
|
|
|
3900
3900
|
onDragEnd: (_) => {
|
|
3901
3901
|
const { active: z, over: B } = _;
|
|
3902
3902
|
if (B && z.id !== B.id) {
|
|
3903
|
-
const
|
|
3903
|
+
const j = h.conditions.findIndex(
|
|
3904
3904
|
(te) => te.id === z.id
|
|
3905
|
-
), ee =
|
|
3905
|
+
), ee = h.conditions.findIndex(
|
|
3906
3906
|
(te) => te.id === B.id
|
|
3907
3907
|
);
|
|
3908
|
-
|
|
3908
|
+
j !== -1 && ee !== -1 && C(h.id, j, ee);
|
|
3909
3909
|
}
|
|
3910
3910
|
},
|
|
3911
3911
|
children: /* @__PURE__ */ t(
|
|
3912
3912
|
ze,
|
|
3913
3913
|
{
|
|
3914
|
-
items:
|
|
3914
|
+
items: h.conditions.map((_) => _.id),
|
|
3915
3915
|
strategy: Me,
|
|
3916
|
-
children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children:
|
|
3916
|
+
children: /* @__PURE__ */ t("div", { className: "space-y-0.5", children: h.conditions.map((_, z) => /* @__PURE__ */ t(
|
|
3917
3917
|
pn,
|
|
3918
3918
|
{
|
|
3919
3919
|
condition: _,
|
|
3920
3920
|
index: z,
|
|
3921
|
-
groupId:
|
|
3922
|
-
groupLogicalOperator:
|
|
3923
|
-
onRemoveCondition:
|
|
3921
|
+
groupId: h.id,
|
|
3922
|
+
groupLogicalOperator: h.logicalOperator,
|
|
3923
|
+
onRemoveCondition: f,
|
|
3924
3924
|
onUpdateGroupOperator: F,
|
|
3925
3925
|
availableFields: c,
|
|
3926
3926
|
source: a,
|
|
@@ -3941,21 +3941,21 @@ function $r({
|
|
|
3941
3941
|
onDragEnd: (_) => {
|
|
3942
3942
|
const { active: z, over: B } = _;
|
|
3943
3943
|
if (B && z.id !== B.id) {
|
|
3944
|
-
const
|
|
3944
|
+
const j = h.groups.findIndex(
|
|
3945
3945
|
(te) => te.id === z.id
|
|
3946
|
-
), ee =
|
|
3946
|
+
), ee = h.groups.findIndex(
|
|
3947
3947
|
(te) => te.id === B.id
|
|
3948
3948
|
);
|
|
3949
|
-
|
|
3949
|
+
j !== -1 && ee !== -1 && T(h.id, j, ee);
|
|
3950
3950
|
}
|
|
3951
3951
|
},
|
|
3952
3952
|
children: /* @__PURE__ */ t(
|
|
3953
3953
|
ze,
|
|
3954
3954
|
{
|
|
3955
|
-
items:
|
|
3955
|
+
items: h.groups.map((_) => _.id),
|
|
3956
3956
|
strategy: Me,
|
|
3957
|
-
children:
|
|
3958
|
-
(_) => D(_, E + 1,
|
|
3957
|
+
children: h.groups.map(
|
|
3958
|
+
(_) => D(_, E + 1, h.id)
|
|
3959
3959
|
)
|
|
3960
3960
|
}
|
|
3961
3961
|
)
|
|
@@ -3963,28 +3963,28 @@ function $r({
|
|
|
3963
3963
|
),
|
|
3964
3964
|
H && !l && /* @__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." }),
|
|
3965
3965
|
/* @__PURE__ */ t(
|
|
3966
|
-
|
|
3966
|
+
hn,
|
|
3967
3967
|
{
|
|
3968
|
-
onAddCondition: () => k(
|
|
3968
|
+
onAddCondition: () => k(h.id),
|
|
3969
3969
|
onAddGroup: (
|
|
3970
3970
|
// In place, grouping is offered once there are two conditions to group,
|
|
3971
3971
|
// not as a mode to switch on first.
|
|
3972
|
-
(l ?
|
|
3972
|
+
(l ? h.conditions.length + h.groups.length >= 2 : I) ? () => y(h.id) : void 0
|
|
3973
3973
|
)
|
|
3974
3974
|
}
|
|
3975
3975
|
)
|
|
3976
|
-
] },
|
|
3976
|
+
] }, h.id);
|
|
3977
3977
|
}
|
|
3978
3978
|
return /* @__PURE__ */ t(
|
|
3979
3979
|
dr,
|
|
3980
3980
|
{
|
|
3981
|
-
group:
|
|
3981
|
+
group: h,
|
|
3982
3982
|
depth: E,
|
|
3983
3983
|
parentGroupId: w,
|
|
3984
3984
|
onUpdateGroupOperator: F,
|
|
3985
3985
|
onUpdateGroupNegate: K,
|
|
3986
3986
|
onRemoveGroup: N,
|
|
3987
|
-
onRemoveCondition:
|
|
3987
|
+
onRemoveCondition: f,
|
|
3988
3988
|
onReorderConditions: C,
|
|
3989
3989
|
onReorderGroups: T,
|
|
3990
3990
|
onAddCondition: k,
|
|
@@ -3995,13 +3995,13 @@ function $r({
|
|
|
3995
3995
|
updateConditionFields: S,
|
|
3996
3996
|
replaceCondition: V
|
|
3997
3997
|
},
|
|
3998
|
-
|
|
3998
|
+
h.id
|
|
3999
3999
|
);
|
|
4000
4000
|
}, v = Yn(e);
|
|
4001
|
-
return /* @__PURE__ */ i("div", { className:
|
|
4001
|
+
return /* @__PURE__ */ i("div", { className: q("group/filters", l ? "flex flex-col" : "flex min-h-0 flex-1 flex-col"), "data-inline": l || void 0, children: [
|
|
4002
4002
|
/* @__PURE__ */ i("div", { className: l ? "" : "min-h-0 flex-1 overflow-y-auto px-3 py-3", children: [
|
|
4003
|
-
|
|
4004
|
-
/* @__PURE__ */ t(
|
|
4003
|
+
x ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2 py-6 text-[12px] text-muted-foreground", children: [
|
|
4004
|
+
/* @__PURE__ */ t(gn, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
4005
4005
|
"Loading columns…"
|
|
4006
4006
|
] }) : D(s),
|
|
4007
4007
|
!l && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border/60 pt-3", children: [
|
|
@@ -4011,7 +4011,7 @@ function $r({
|
|
|
4011
4011
|
size: "xs",
|
|
4012
4012
|
id: "advanced-mode",
|
|
4013
4013
|
checked: I,
|
|
4014
|
-
onCheckedChange: (
|
|
4014
|
+
onCheckedChange: (h) => $(h)
|
|
4015
4015
|
}
|
|
4016
4016
|
),
|
|
4017
4017
|
/* @__PURE__ */ t(
|
|
@@ -4025,7 +4025,7 @@ function $r({
|
|
|
4025
4025
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-muted-foreground", children: "Nest conditions in groups" })
|
|
4026
4026
|
] }),
|
|
4027
4027
|
Z && !l && /* @__PURE__ */ i("div", { className: "mt-3 border-t border-border/60 pt-3", children: [
|
|
4028
|
-
/* @__PURE__ */ t("div", { className:
|
|
4028
|
+
/* @__PURE__ */ t("div", { className: q("mb-1.5", ft), children: "Where clause" }),
|
|
4029
4029
|
/* @__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: U(s) })
|
|
4030
4030
|
] })
|
|
4031
4031
|
] }),
|