react-semaphor 0.1.543 → 0.1.545
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/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useEffect as K, forwardRef as nt, useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as t, jsxs as o, Fragment as
|
|
1
|
+
import { c as fe, C as Se } from "./x-4f5U2XwU.js";
|
|
2
|
+
import { useEffect as K, forwardRef as nt, useMemo as Y, useState as z, useRef as ne, useCallback as A, Fragment as st } from "react";
|
|
3
|
+
import { $ as qe, a0 as ot, aG as dt, u as it, i as ct, aH as ut, aI as mt, aJ as De, aK as pt, aL as ft, aM as Me, aN as ze, aO as ht, aP as gt, aQ as bt, aR as xt, aS as vt, aT as yt, aU as Ct } from "./semaphor-ready-indicator-BxF96Yhv.js";
|
|
4
|
+
import { jsx as t, jsxs as o, Fragment as G } from "react/jsx-runtime";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
6
|
import "./validators-DMHTpf7a.js";
|
|
7
7
|
import "./matrix-operation-contract-8OIO4gob.js";
|
|
8
8
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
9
9
|
import "zod";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
|
-
import { c as R } from "./
|
|
12
|
-
import { m as Re, n as je, o as Be, p as $e, x as Qe, B as E, l as M, q as Ue, r as
|
|
13
|
-
import {
|
|
11
|
+
import { c as R } from "./_commonjsHelpers-DimLPMtv.js";
|
|
12
|
+
import { m as Re, n as je, o as Be, p as $e, x as Qe, B as E, l as M, q as Ue, r as se, s as oe, t as de, u as ie, v as ce } from "./switch-uDtPgQlQ.js";
|
|
13
|
+
import { ar as kt, as as Nt, at as J, au as we, av as Te, aw as ue, ax as me, ay as St, az as Dt, aA as _e, aB as wt, aC as Tt, aD as X, aE as _t, aF as Le, aG as He, aH as Ye, aI as Ge, aJ as Je, aK as Lt, aL as Vt, aM as Ve, aN as Et, aO as Ee, aP as It, aQ as At, aR as Ft, aS as Ot, aT as pe } from "./resolve-dashboard-input-context-DJ2tICwz.js";
|
|
14
14
|
import { C as Ie } from "./selection-reducer-Dj_8xD69.js";
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -18,17 +18,7 @@ import { C as Ie } from "./selection-reducer-Dj_8xD69.js";
|
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
22
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
23
|
-
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
24
|
-
]);
|
|
25
|
-
/**
|
|
26
|
-
* @license lucide-react v0.453.0 - ISC
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the ISC license.
|
|
29
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/
|
|
31
|
-
const ra = W("FilterX", [
|
|
21
|
+
const ra = fe("FilterX", [
|
|
32
22
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
33
23
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
34
24
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
@@ -39,7 +29,7 @@ const ra = W("FilterX", [
|
|
|
39
29
|
* This source code is licensed under the ISC license.
|
|
40
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
31
|
*/
|
|
42
|
-
const qt =
|
|
32
|
+
const qt = fe("Library", [
|
|
43
33
|
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
44
34
|
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
45
35
|
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
@@ -51,7 +41,7 @@ const qt = W("Library", [
|
|
|
51
41
|
* This source code is licensed under the ISC license.
|
|
52
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
43
|
*/
|
|
54
|
-
const Mt =
|
|
44
|
+
const Mt = fe("Link2", [
|
|
55
45
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
56
46
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
57
47
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
@@ -179,7 +169,7 @@ const zt = nt(
|
|
|
179
169
|
onClick: k,
|
|
180
170
|
...p,
|
|
181
171
|
...g,
|
|
182
|
-
className: R(`${
|
|
172
|
+
className: R(`${kt}`, u),
|
|
183
173
|
children: n
|
|
184
174
|
}
|
|
185
175
|
) }),
|
|
@@ -200,7 +190,7 @@ const zt = nt(
|
|
|
200
190
|
] }) })
|
|
201
191
|
);
|
|
202
192
|
zt.displayName = "IconButton";
|
|
203
|
-
function
|
|
193
|
+
function Xe(s) {
|
|
204
194
|
const { control: n, onChange: u } = s;
|
|
205
195
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
206
196
|
/* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
@@ -252,7 +242,7 @@ function Rt(s) {
|
|
|
252
242
|
] }, i);
|
|
253
243
|
}) }) });
|
|
254
244
|
}
|
|
255
|
-
function
|
|
245
|
+
function W(s) {
|
|
256
246
|
const { secondary: n, tertiary: u, primary: i } = s;
|
|
257
247
|
return /* @__PURE__ */ o("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: [
|
|
258
248
|
n,
|
|
@@ -263,23 +253,23 @@ function Z(s) {
|
|
|
263
253
|
function jt(s) {
|
|
264
254
|
const { control: n, scope: u, detail: i } = s;
|
|
265
255
|
return /* @__PURE__ */ o("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
|
|
266
|
-
/* @__PURE__ */ t(
|
|
256
|
+
/* @__PURE__ */ t(Ct, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
|
|
267
257
|
/* @__PURE__ */ o("div", { className: "min-w-0 space-y-0.5", children: [
|
|
268
258
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: n.label }),
|
|
269
259
|
/* @__PURE__ */ o("div", { className: "text-[12px] text-muted-foreground", children: [
|
|
270
|
-
|
|
260
|
+
He(n.type).label,
|
|
271
261
|
" ·",
|
|
272
262
|
" ",
|
|
273
|
-
|
|
263
|
+
Ge(n),
|
|
274
264
|
" ·",
|
|
275
265
|
" ",
|
|
276
|
-
|
|
266
|
+
Ye(u, n.placement)
|
|
277
267
|
] }),
|
|
278
268
|
i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
|
|
279
269
|
] })
|
|
280
270
|
] });
|
|
281
271
|
}
|
|
282
|
-
function
|
|
272
|
+
function Ae(s) {
|
|
283
273
|
const {
|
|
284
274
|
control: n,
|
|
285
275
|
defaultValue: u,
|
|
@@ -295,7 +285,7 @@ function Fe(s) {
|
|
|
295
285
|
nextDisabled: S
|
|
296
286
|
} = s;
|
|
297
287
|
return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
|
|
298
|
-
/* @__PURE__ */ t(
|
|
288
|
+
/* @__PURE__ */ t(Xe, { control: n, onChange: p }),
|
|
299
289
|
/* @__PURE__ */ t(
|
|
300
290
|
Me,
|
|
301
291
|
{
|
|
@@ -322,7 +312,7 @@ function Fe(s) {
|
|
|
322
312
|
}
|
|
323
313
|
),
|
|
324
314
|
/* @__PURE__ */ t(
|
|
325
|
-
|
|
315
|
+
W,
|
|
326
316
|
{
|
|
327
317
|
secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
|
|
328
318
|
primary: /* @__PURE__ */ t(
|
|
@@ -345,7 +335,7 @@ const Bt = /* @__PURE__ */ new Set([
|
|
|
345
335
|
"field_selector",
|
|
346
336
|
"metric_selector"
|
|
347
337
|
]);
|
|
348
|
-
function
|
|
338
|
+
function Fe(s) {
|
|
349
339
|
const { text: n, ariaLabel: u } = s, [i, k] = z(!1);
|
|
350
340
|
return /* @__PURE__ */ o(
|
|
351
341
|
"button",
|
|
@@ -367,7 +357,7 @@ function Oe(s) {
|
|
|
367
357
|
}
|
|
368
358
|
);
|
|
369
359
|
}
|
|
370
|
-
function
|
|
360
|
+
function Oe(s) {
|
|
371
361
|
const {
|
|
372
362
|
control: n,
|
|
373
363
|
scope: u,
|
|
@@ -398,14 +388,14 @@ function Ae(s) {
|
|
|
398
388
|
/* @__PURE__ */ o("div", { className: "space-y-1.5 px-3 py-2.5", children: [
|
|
399
389
|
/* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
|
|
400
390
|
/* @__PURE__ */ t(
|
|
401
|
-
|
|
391
|
+
Fe,
|
|
402
392
|
{
|
|
403
393
|
text: i,
|
|
404
394
|
ariaLabel: "Copy SQL control reference"
|
|
405
395
|
}
|
|
406
396
|
),
|
|
407
397
|
S ? /* @__PURE__ */ t(
|
|
408
|
-
|
|
398
|
+
Fe,
|
|
409
399
|
{
|
|
410
400
|
text: S,
|
|
411
401
|
ariaLabel: "Copy Jinja control reference"
|
|
@@ -430,7 +420,7 @@ function Ae(s) {
|
|
|
430
420
|
] })
|
|
431
421
|
] }),
|
|
432
422
|
/* @__PURE__ */ t(
|
|
433
|
-
|
|
423
|
+
W,
|
|
434
424
|
{
|
|
435
425
|
secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: v, children: "Back" }),
|
|
436
426
|
tertiary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: p, children: "Cancel" }),
|
|
@@ -440,30 +430,30 @@ function Ae(s) {
|
|
|
440
430
|
] });
|
|
441
431
|
}
|
|
442
432
|
function $t(s) {
|
|
443
|
-
const n =
|
|
433
|
+
const n = J(
|
|
444
434
|
s.scope,
|
|
445
435
|
s.existingControls,
|
|
446
436
|
s.reservedIds
|
|
447
437
|
), u = s.type === n.type ? {
|
|
448
438
|
...n,
|
|
449
|
-
label:
|
|
439
|
+
label: pe[s.type]
|
|
450
440
|
} : {
|
|
451
|
-
...
|
|
441
|
+
...Je({
|
|
452
442
|
controls: [
|
|
453
443
|
{
|
|
454
444
|
...n,
|
|
455
|
-
label:
|
|
445
|
+
label: pe[s.type]
|
|
456
446
|
}
|
|
457
447
|
],
|
|
458
448
|
controlId: n.id,
|
|
459
449
|
nextType: s.type
|
|
460
450
|
}).controls[0],
|
|
461
|
-
label:
|
|
451
|
+
label: pe[s.type]
|
|
462
452
|
};
|
|
463
453
|
return {
|
|
464
454
|
step: 2,
|
|
465
455
|
control: u,
|
|
466
|
-
defaultValue:
|
|
456
|
+
defaultValue: X(u, void 0)
|
|
467
457
|
};
|
|
468
458
|
}
|
|
469
459
|
function sa({
|
|
@@ -484,25 +474,25 @@ function sa({
|
|
|
484
474
|
onCreateFlowActiveChange: _,
|
|
485
475
|
onCreateFlowComplete: I
|
|
486
476
|
}) {
|
|
487
|
-
const
|
|
477
|
+
const F = Y(
|
|
488
478
|
() => new Set(u || []),
|
|
489
479
|
[u]
|
|
490
|
-
), Ke =
|
|
480
|
+
), Ke = Lt(s), We = Nt(s), [he, Z] = z(
|
|
491
481
|
null
|
|
492
|
-
), [
|
|
482
|
+
), [Ze, Q] = z(
|
|
493
483
|
null
|
|
494
484
|
), [a, D] = z(
|
|
495
485
|
() => g ? {
|
|
496
486
|
step: 1,
|
|
497
|
-
control:
|
|
487
|
+
control: J(s, n, Array.from(F))
|
|
498
488
|
} : null
|
|
499
|
-
), U =
|
|
489
|
+
), U = ne({}), j = ne(void 0), ge = ne(g), be = Y(() => {
|
|
500
490
|
const e = we({ scope: s, card: S });
|
|
501
491
|
if (!T)
|
|
502
492
|
return e;
|
|
503
493
|
const l = new Set(T);
|
|
504
494
|
return e.filter((r) => l.has(r.value));
|
|
505
|
-
}, [T, S, s]), Pe =
|
|
495
|
+
}, [T, S, s]), Pe = A(
|
|
506
496
|
(e) => {
|
|
507
497
|
const l = we({
|
|
508
498
|
scope: s,
|
|
@@ -515,27 +505,27 @@ function sa({
|
|
|
515
505
|
return l.filter((d) => r.has(d.value));
|
|
516
506
|
},
|
|
517
507
|
[T, S, s]
|
|
518
|
-
),
|
|
508
|
+
), V = A(
|
|
519
509
|
(e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
|
|
520
510
|
[s]
|
|
521
|
-
),
|
|
511
|
+
), P = Y(
|
|
522
512
|
() => a ? Te(
|
|
523
513
|
x || [],
|
|
524
514
|
a.control.type
|
|
525
515
|
) : [],
|
|
526
516
|
[a, x]
|
|
527
|
-
),
|
|
517
|
+
), H = Y(() => {
|
|
528
518
|
if (!a)
|
|
529
519
|
return {
|
|
530
520
|
fields: p || [],
|
|
531
521
|
metrics: N || []
|
|
532
522
|
};
|
|
533
|
-
if (!
|
|
523
|
+
if (!V(a.control.type))
|
|
534
524
|
return {
|
|
535
525
|
fields: p || [],
|
|
536
526
|
metrics: N || []
|
|
537
527
|
};
|
|
538
|
-
const e = a.selectedCardIds || [], l =
|
|
528
|
+
const e = a.selectedCardIds || [], l = ue({
|
|
539
529
|
controlType: a.control.type,
|
|
540
530
|
participants: x || [],
|
|
541
531
|
selectedCardIds: e
|
|
@@ -554,7 +544,7 @@ function sa({
|
|
|
554
544
|
p,
|
|
555
545
|
N,
|
|
556
546
|
a,
|
|
557
|
-
|
|
547
|
+
V,
|
|
558
548
|
x
|
|
559
549
|
]);
|
|
560
550
|
K(() => {
|
|
@@ -563,11 +553,11 @@ function sa({
|
|
|
563
553
|
const e = g && !ge.current;
|
|
564
554
|
ge.current = g, e && (D({
|
|
565
555
|
step: 1,
|
|
566
|
-
control:
|
|
567
|
-
}), Q(null),
|
|
568
|
-
}, [n, g,
|
|
556
|
+
control: J(s, n, Array.from(F))
|
|
557
|
+
}), Q(null), Z(null));
|
|
558
|
+
}, [n, g, F, s]);
|
|
569
559
|
const et = (e) => {
|
|
570
|
-
if (!
|
|
560
|
+
if (!V(e.type))
|
|
571
561
|
return {
|
|
572
562
|
fields: p || [],
|
|
573
563
|
metrics: N || []
|
|
@@ -578,7 +568,7 @@ function sa({
|
|
|
578
568
|
fields: p || [],
|
|
579
569
|
metrics: N || []
|
|
580
570
|
};
|
|
581
|
-
const r =
|
|
571
|
+
const r = ue({
|
|
582
572
|
controlType: e.type,
|
|
583
573
|
participants: x || [],
|
|
584
574
|
selectedCardIds: l
|
|
@@ -593,13 +583,13 @@ function sa({
|
|
|
593
583
|
target: r.metricTargetMap[d.value]
|
|
594
584
|
})) : []
|
|
595
585
|
};
|
|
596
|
-
},
|
|
597
|
-
if (!
|
|
586
|
+
}, ee = (e) => {
|
|
587
|
+
if (!V(e.control.type))
|
|
598
588
|
return {
|
|
599
589
|
nextControl: e.control,
|
|
600
590
|
cardBindingsById: void 0
|
|
601
591
|
};
|
|
602
|
-
const l = (f == null ? void 0 : f[e.control.id]) || [], r =
|
|
592
|
+
const l = (f == null ? void 0 : f[e.control.id]) || [], r = ue({
|
|
603
593
|
controlType: e.control.type,
|
|
604
594
|
participants: x || [],
|
|
605
595
|
selectedCardIds: e.nextSelectedCardIds
|
|
@@ -621,12 +611,12 @@ function sa({
|
|
|
621
611
|
nextControl: d,
|
|
622
612
|
cardBindingsById: m
|
|
623
613
|
};
|
|
624
|
-
},
|
|
614
|
+
}, L = A(
|
|
625
615
|
(e, l = i, r = { type: "update" }) => {
|
|
626
|
-
const d = e.map((m) => (
|
|
616
|
+
const d = e.map((m) => (me({
|
|
627
617
|
control: m,
|
|
628
618
|
defaultValues: l
|
|
629
|
-
}),
|
|
619
|
+
}), St(
|
|
630
620
|
m
|
|
631
621
|
)));
|
|
632
622
|
k(d, l, r);
|
|
@@ -641,15 +631,15 @@ function sa({
|
|
|
641
631
|
(C) => C.id === e
|
|
642
632
|
);
|
|
643
633
|
let h, c;
|
|
644
|
-
if (m && (!r ||
|
|
645
|
-
const C = (f == null ? void 0 : f[m.id]) || [], q =
|
|
634
|
+
if (m && (!r || It({ control: r }, { control: m })) && s === "dashboard" && (m.type === "field_selector" || m.type === "metric_selector")) {
|
|
635
|
+
const C = (f == null ? void 0 : f[m.id]) || [], q = ee({
|
|
646
636
|
control: m,
|
|
647
637
|
nextSelectedCardIds: C
|
|
648
638
|
});
|
|
649
639
|
d = d.map(
|
|
650
|
-
(
|
|
640
|
+
(O) => O.id === e ? q.nextControl : O
|
|
651
641
|
), h = q.cardBindingsById, c = [m.id];
|
|
652
|
-
} else if (r && (!m || !
|
|
642
|
+
} else if (r && (!m || !At(m.type)) && s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector")) {
|
|
653
643
|
const C = (f == null ? void 0 : f[r.id]) || [];
|
|
654
644
|
h = Object.fromEntries(
|
|
655
645
|
C.map((q) => [q, void 0])
|
|
@@ -660,21 +650,21 @@ function sa({
|
|
|
660
650
|
);
|
|
661
651
|
let w = i;
|
|
662
652
|
if (r && y) {
|
|
663
|
-
const C =
|
|
653
|
+
const C = me({
|
|
664
654
|
control: r,
|
|
665
655
|
defaultValues: i
|
|
666
656
|
});
|
|
667
657
|
r.source.kind === "manual" && y.source.kind === "sql_query" && (U.current[e] = C);
|
|
668
|
-
const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C,
|
|
658
|
+
const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C, O = Ve({
|
|
669
659
|
previousControl: r,
|
|
670
660
|
nextControl: y,
|
|
671
661
|
currentDefaultValue: q
|
|
672
662
|
});
|
|
673
|
-
y.source.kind === "manual" && (U.current[e] =
|
|
674
|
-
(Ne) => Ne.id === e ? { ...y, defaultValue:
|
|
663
|
+
y.source.kind === "manual" && (U.current[e] = O), i && (w = { ...i }, O === void 0 ? delete w[e] : w[e] = O), d = d.map(
|
|
664
|
+
(Ne) => Ne.id === e ? { ...y, defaultValue: O } : Ne
|
|
675
665
|
);
|
|
676
666
|
}
|
|
677
|
-
|
|
667
|
+
L(d, w, {
|
|
678
668
|
type: "update",
|
|
679
669
|
cardBindingsById: h,
|
|
680
670
|
affectedBindingControlIds: c
|
|
@@ -683,7 +673,7 @@ function sa({
|
|
|
683
673
|
if (!l.trim())
|
|
684
674
|
return;
|
|
685
675
|
const r = Ot(l);
|
|
686
|
-
if (r === e ||
|
|
676
|
+
if (r === e || F.has(r) || n.some(
|
|
687
677
|
(h) => h.id === r && h.id !== e
|
|
688
678
|
))
|
|
689
679
|
return;
|
|
@@ -691,7 +681,7 @@ function sa({
|
|
|
691
681
|
(h) => h.id === e ? { ...h, id: r } : h
|
|
692
682
|
);
|
|
693
683
|
if (!i) {
|
|
694
|
-
|
|
684
|
+
L(d, void 0, {
|
|
695
685
|
type: "rename",
|
|
696
686
|
oldId: e,
|
|
697
687
|
newId: r
|
|
@@ -699,7 +689,7 @@ function sa({
|
|
|
699
689
|
return;
|
|
700
690
|
}
|
|
701
691
|
const m = { ...i };
|
|
702
|
-
Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]),
|
|
692
|
+
Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), L(d, m, {
|
|
703
693
|
type: "rename",
|
|
704
694
|
oldId: e,
|
|
705
695
|
newId: r
|
|
@@ -707,22 +697,22 @@ function sa({
|
|
|
707
697
|
}, at = (e) => {
|
|
708
698
|
const l = n.filter((d) => d.id !== e);
|
|
709
699
|
if (!i) {
|
|
710
|
-
|
|
700
|
+
L(l, void 0, { type: "remove", controlId: e });
|
|
711
701
|
return;
|
|
712
702
|
}
|
|
713
703
|
const r = { ...i };
|
|
714
|
-
delete r[e],
|
|
715
|
-
}, rt =
|
|
704
|
+
delete r[e], L(l, r, { type: "remove", controlId: e });
|
|
705
|
+
}, rt = A(() => {
|
|
716
706
|
j.current = void 0, D({
|
|
717
707
|
step: 1,
|
|
718
|
-
control:
|
|
719
|
-
}), Q(null),
|
|
720
|
-
}, [n,
|
|
708
|
+
control: J(s, n, Array.from(F))
|
|
709
|
+
}), Q(null), Z(null);
|
|
710
|
+
}, [n, F, s]), $ = (e) => {
|
|
721
711
|
D(
|
|
722
712
|
(l) => l && (() => {
|
|
723
713
|
const r = e(l.control);
|
|
724
714
|
l.control.source.kind === "manual" && r.source.kind === "sql_query" && (j.current = l.defaultValue);
|
|
725
|
-
const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m =
|
|
715
|
+
const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Ve({
|
|
726
716
|
previousControl: l.control,
|
|
727
717
|
nextControl: r,
|
|
728
718
|
currentDefaultValue: d
|
|
@@ -741,11 +731,11 @@ function sa({
|
|
|
741
731
|
defaultValue: e
|
|
742
732
|
})
|
|
743
733
|
);
|
|
744
|
-
},
|
|
734
|
+
}, te = (() => {
|
|
745
735
|
if (!a)
|
|
746
736
|
return !1;
|
|
747
|
-
if (a.step === 2 &&
|
|
748
|
-
return (a.selectedCardIds || []).length > 0 &&
|
|
737
|
+
if (a.step === 2 && V(a.control.type))
|
|
738
|
+
return (a.selectedCardIds || []).length > 0 && Dt({
|
|
749
739
|
participants: x || [],
|
|
750
740
|
selectedCardIds: a.selectedCardIds || [],
|
|
751
741
|
control: a.control,
|
|
@@ -754,7 +744,7 @@ function sa({
|
|
|
754
744
|
if (a.step !== 2 && a.step !== 3 || !a.control.label.trim())
|
|
755
745
|
return !1;
|
|
756
746
|
const l = a.control.source.kind === "sql_query" ? a.control : _e(a.control);
|
|
757
|
-
if (l.source.kind === "manual" && (
|
|
747
|
+
if (l.source.kind === "manual" && (wt(l) && l.source.options.length === 0 || l.source.options.some(
|
|
758
748
|
(d) => d.label.trim().length === 0 || d.value.trim().length === 0
|
|
759
749
|
)))
|
|
760
750
|
return !1;
|
|
@@ -762,18 +752,18 @@ function sa({
|
|
|
762
752
|
const { connectionId: r, sql: d, valueColumn: m } = l.source;
|
|
763
753
|
return r.trim().length > 0 && d.trim().length > 0 && m.trim().length > 0;
|
|
764
754
|
}
|
|
765
|
-
return
|
|
766
|
-
|
|
755
|
+
return Tt(
|
|
756
|
+
X(l, a.defaultValue)
|
|
767
757
|
);
|
|
768
758
|
})(), ve = () => {
|
|
769
759
|
var h;
|
|
770
760
|
if (!a)
|
|
771
761
|
return;
|
|
772
|
-
const e = _e(a.control), l =
|
|
762
|
+
const e = _e(a.control), l = Et({
|
|
773
763
|
label: e.label,
|
|
774
764
|
fallbackId: e.id,
|
|
775
765
|
existingControls: n,
|
|
776
|
-
reservedIds: Array.from(
|
|
766
|
+
reservedIds: Array.from(F)
|
|
777
767
|
}), r = {
|
|
778
768
|
...e,
|
|
779
769
|
id: l
|
|
@@ -782,7 +772,7 @@ function sa({
|
|
|
782
772
|
participants: x || [],
|
|
783
773
|
selectedCardIds: a.selectedCardIds,
|
|
784
774
|
matrixTargetIds: a.matrixTargetIds
|
|
785
|
-
}) : void 0, m =
|
|
775
|
+
}) : void 0, m = X(
|
|
786
776
|
r,
|
|
787
777
|
a.defaultValue
|
|
788
778
|
);
|
|
@@ -795,20 +785,20 @@ function sa({
|
|
|
795
785
|
matrixTargetIds: a.matrixTargetIds,
|
|
796
786
|
cardBindingsById: d
|
|
797
787
|
});
|
|
798
|
-
},
|
|
788
|
+
}, ae = A(() => {
|
|
799
789
|
D(null);
|
|
800
|
-
}, []), ye =
|
|
790
|
+
}, []), ye = A(() => {
|
|
801
791
|
if (!(a != null && a.createdControlId)) {
|
|
802
792
|
D(null);
|
|
803
793
|
return;
|
|
804
794
|
}
|
|
805
|
-
const e = a.control, l = a.createdControlId, r =
|
|
795
|
+
const e = a.control, l = a.createdControlId, r = X(
|
|
806
796
|
e,
|
|
807
797
|
a.defaultValue
|
|
808
798
|
);
|
|
809
799
|
if (i) {
|
|
810
800
|
const d = { ...i };
|
|
811
|
-
r === void 0 ? delete d[l] : d[l] = r,
|
|
801
|
+
r === void 0 ? delete d[l] : d[l] = r, L(
|
|
812
802
|
[
|
|
813
803
|
...n,
|
|
814
804
|
{
|
|
@@ -823,7 +813,7 @@ function sa({
|
|
|
823
813
|
}
|
|
824
814
|
);
|
|
825
815
|
} else
|
|
826
|
-
|
|
816
|
+
L(
|
|
827
817
|
[
|
|
828
818
|
...n,
|
|
829
819
|
{
|
|
@@ -838,11 +828,11 @@ function sa({
|
|
|
838
828
|
}
|
|
839
829
|
);
|
|
840
830
|
Q(l), D(null), I == null || I();
|
|
841
|
-
}, [n, a, i,
|
|
831
|
+
}, [n, a, i, L, I]), lt = a ? V(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ce = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${_t(a.control.label) || a.control.id}]]` : "", re = Le({
|
|
842
832
|
controls: n,
|
|
843
833
|
defaultValues: i
|
|
844
|
-
}),
|
|
845
|
-
controls:
|
|
834
|
+
}), le = a ? [...n, a.control] : n, ke = a ? Le({
|
|
835
|
+
controls: le,
|
|
846
836
|
defaultValues: i,
|
|
847
837
|
overrides: [
|
|
848
838
|
{
|
|
@@ -850,7 +840,7 @@ function sa({
|
|
|
850
840
|
value: a.defaultValue
|
|
851
841
|
}
|
|
852
842
|
]
|
|
853
|
-
}) :
|
|
843
|
+
}) : re;
|
|
854
844
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
855
845
|
a ? /* @__PURE__ */ o("div", { className: "space-y-4 pb-1", children: [
|
|
856
846
|
/* @__PURE__ */ t(
|
|
@@ -884,7 +874,7 @@ function sa({
|
|
|
884
874
|
$t({
|
|
885
875
|
scope: s,
|
|
886
876
|
existingControls: n,
|
|
887
|
-
reservedIds: Array.from(
|
|
877
|
+
reservedIds: Array.from(F),
|
|
888
878
|
type: h.value
|
|
889
879
|
})
|
|
890
880
|
),
|
|
@@ -906,7 +896,7 @@ function sa({
|
|
|
906
896
|
/* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: d.map(m) })
|
|
907
897
|
] }),
|
|
908
898
|
/* @__PURE__ */ t(
|
|
909
|
-
|
|
899
|
+
W,
|
|
910
900
|
{
|
|
911
901
|
secondary: /* @__PURE__ */ t(
|
|
912
902
|
E,
|
|
@@ -914,7 +904,7 @@ function sa({
|
|
|
914
904
|
type: "button",
|
|
915
905
|
variant: "outline",
|
|
916
906
|
size: "xs",
|
|
917
|
-
onClick:
|
|
907
|
+
onClick: ae,
|
|
918
908
|
children: "Back to controls"
|
|
919
909
|
}
|
|
920
910
|
)
|
|
@@ -922,10 +912,10 @@ function sa({
|
|
|
922
912
|
)
|
|
923
913
|
] });
|
|
924
914
|
})(),
|
|
925
|
-
a.step === 2 &&
|
|
915
|
+
a.step === 2 && V(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
|
|
926
916
|
/* @__PURE__ */ o("div", { className: "space-y-3", children: [
|
|
927
917
|
/* @__PURE__ */ t(
|
|
928
|
-
|
|
918
|
+
Xe,
|
|
929
919
|
{
|
|
930
920
|
control: a.control,
|
|
931
921
|
onChange: (e) => $((l) => ({
|
|
@@ -936,7 +926,7 @@ function sa({
|
|
|
936
926
|
),
|
|
937
927
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
|
|
938
928
|
] }),
|
|
939
|
-
|
|
929
|
+
P.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: P.map((e) => {
|
|
940
930
|
const l = (a.selectedCardIds || []).includes(e.cardId);
|
|
941
931
|
return /* @__PURE__ */ o(
|
|
942
932
|
"label",
|
|
@@ -972,7 +962,7 @@ function sa({
|
|
|
972
962
|
/* @__PURE__ */ t(
|
|
973
963
|
De,
|
|
974
964
|
{
|
|
975
|
-
participants:
|
|
965
|
+
participants: P,
|
|
976
966
|
selectedCardIds: a.selectedCardIds || [],
|
|
977
967
|
control: a.control,
|
|
978
968
|
selected: a.matrixTargetIds,
|
|
@@ -980,7 +970,7 @@ function sa({
|
|
|
980
970
|
}
|
|
981
971
|
),
|
|
982
972
|
/* @__PURE__ */ t(
|
|
983
|
-
|
|
973
|
+
W,
|
|
984
974
|
{
|
|
985
975
|
secondary: /* @__PURE__ */ t(
|
|
986
976
|
E,
|
|
@@ -1009,21 +999,21 @@ function sa({
|
|
|
1009
999
|
step: 3
|
|
1010
1000
|
}
|
|
1011
1001
|
),
|
|
1012
|
-
disabled: !
|
|
1002
|
+
disabled: !te,
|
|
1013
1003
|
children: "Next"
|
|
1014
1004
|
}
|
|
1015
1005
|
)
|
|
1016
1006
|
}
|
|
1017
1007
|
)
|
|
1018
1008
|
] }),
|
|
1019
|
-
a.step === 2 && !
|
|
1020
|
-
|
|
1009
|
+
a.step === 2 && !V(a.control.type) && /* @__PURE__ */ t(
|
|
1010
|
+
Ae,
|
|
1021
1011
|
{
|
|
1022
1012
|
control: a.control,
|
|
1023
1013
|
defaultValue: a.defaultValue,
|
|
1024
|
-
availableFieldChoices:
|
|
1025
|
-
availableMetricChoices:
|
|
1026
|
-
previewControlDefinitions:
|
|
1014
|
+
availableFieldChoices: H.fields,
|
|
1015
|
+
availableMetricChoices: H.metrics,
|
|
1016
|
+
previewControlDefinitions: le,
|
|
1027
1017
|
previewControlValues: ke,
|
|
1028
1018
|
onControlChange: (e) => $(() => e),
|
|
1029
1019
|
onLabelChange: (e) => $((l) => ({
|
|
@@ -1038,17 +1028,17 @@ function sa({
|
|
|
1038
1028
|
}
|
|
1039
1029
|
),
|
|
1040
1030
|
onNext: ve,
|
|
1041
|
-
nextDisabled: !
|
|
1031
|
+
nextDisabled: !te
|
|
1042
1032
|
}
|
|
1043
1033
|
),
|
|
1044
|
-
a.step === 3 &&
|
|
1045
|
-
|
|
1034
|
+
a.step === 3 && V(a.control.type) && /* @__PURE__ */ t(
|
|
1035
|
+
Ae,
|
|
1046
1036
|
{
|
|
1047
1037
|
control: a.control,
|
|
1048
1038
|
defaultValue: a.defaultValue,
|
|
1049
|
-
availableFieldChoices:
|
|
1050
|
-
availableMetricChoices:
|
|
1051
|
-
previewControlDefinitions:
|
|
1039
|
+
availableFieldChoices: H.fields,
|
|
1040
|
+
availableMetricChoices: H.metrics,
|
|
1041
|
+
previewControlDefinitions: le,
|
|
1052
1042
|
previewControlValues: ke,
|
|
1053
1043
|
onControlChange: (e) => $(() => e),
|
|
1054
1044
|
onLabelChange: (e) => $((l) => ({
|
|
@@ -1063,16 +1053,16 @@ function sa({
|
|
|
1063
1053
|
}
|
|
1064
1054
|
),
|
|
1065
1055
|
onNext: ve,
|
|
1066
|
-
nextDisabled: !
|
|
1056
|
+
nextDisabled: !te
|
|
1067
1057
|
}
|
|
1068
1058
|
),
|
|
1069
|
-
a.step === 3 && !
|
|
1070
|
-
|
|
1059
|
+
a.step === 3 && !V(a.control.type) && /* @__PURE__ */ t(
|
|
1060
|
+
Oe,
|
|
1071
1061
|
{
|
|
1072
1062
|
control: a.control,
|
|
1073
1063
|
scope: s,
|
|
1074
1064
|
createdReference: Ce,
|
|
1075
|
-
explorerContent: /* @__PURE__ */ o(
|
|
1065
|
+
explorerContent: /* @__PURE__ */ o(G, { children: [
|
|
1076
1066
|
"Open the card and use",
|
|
1077
1067
|
" ",
|
|
1078
1068
|
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
|
|
@@ -1086,23 +1076,23 @@ function sa({
|
|
|
1086
1076
|
step: 2
|
|
1087
1077
|
}
|
|
1088
1078
|
),
|
|
1089
|
-
onCancel:
|
|
1079
|
+
onCancel: ae,
|
|
1090
1080
|
onDone: ye
|
|
1091
1081
|
}
|
|
1092
1082
|
),
|
|
1093
|
-
a.step === 4 &&
|
|
1094
|
-
|
|
1083
|
+
a.step === 4 && V(a.control.type) && /* @__PURE__ */ t(
|
|
1084
|
+
Oe,
|
|
1095
1085
|
{
|
|
1096
1086
|
control: a.control,
|
|
1097
1087
|
scope: s,
|
|
1098
1088
|
createdReference: Ce,
|
|
1099
|
-
summaryDetail: /* @__PURE__ */ o(
|
|
1089
|
+
summaryDetail: /* @__PURE__ */ o(G, { children: [
|
|
1100
1090
|
"Used by ",
|
|
1101
1091
|
(a.selectedCardIds || []).length,
|
|
1102
1092
|
" selected card",
|
|
1103
1093
|
(a.selectedCardIds || []).length === 1 ? "" : "s"
|
|
1104
1094
|
] }),
|
|
1105
|
-
explorerContent: /* @__PURE__ */ t(
|
|
1095
|
+
explorerContent: /* @__PURE__ */ t(G, { children: "Selected cards have been set up to respond to this control automatically." }),
|
|
1106
1096
|
sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
|
|
1107
1097
|
onBack: () => D(
|
|
1108
1098
|
(e) => e && {
|
|
@@ -1110,17 +1100,17 @@ function sa({
|
|
|
1110
1100
|
step: 3
|
|
1111
1101
|
}
|
|
1112
1102
|
),
|
|
1113
|
-
onCancel:
|
|
1103
|
+
onCancel: ae,
|
|
1114
1104
|
onDone: ye
|
|
1115
1105
|
}
|
|
1116
1106
|
)
|
|
1117
1107
|
] }) : null,
|
|
1118
1108
|
!a && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: b }) : null,
|
|
1119
1109
|
!a && n.map((e) => {
|
|
1120
|
-
const l = et(e), r = v == null ? void 0 : v[e.id], d =
|
|
1110
|
+
const l = et(e), r = v == null ? void 0 : v[e.id], d = me({
|
|
1121
1111
|
control: e,
|
|
1122
1112
|
defaultValues: i
|
|
1123
|
-
}), m =
|
|
1113
|
+
}), m = Ze === e.id, h = "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";
|
|
1124
1114
|
return /* @__PURE__ */ o(
|
|
1125
1115
|
"div",
|
|
1126
1116
|
{
|
|
@@ -1140,11 +1130,11 @@ function sa({
|
|
|
1140
1130
|
/* @__PURE__ */ o("div", { className: "min-w-0", children: [
|
|
1141
1131
|
/* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1142
1132
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
|
|
1143
|
-
/* @__PURE__ */ t("span", { className: h, children:
|
|
1144
|
-
/* @__PURE__ */ t("span", { className: h, children:
|
|
1133
|
+
/* @__PURE__ */ t("span", { className: h, children: He(e.type).label }),
|
|
1134
|
+
/* @__PURE__ */ t("span", { className: h, children: Ye(s, e.placement) })
|
|
1145
1135
|
] }),
|
|
1146
1136
|
/* @__PURE__ */ o("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
|
|
1147
|
-
|
|
1137
|
+
Ge(e),
|
|
1148
1138
|
r != null && r.status ? ` · ${r.status}` : ""
|
|
1149
1139
|
] })
|
|
1150
1140
|
] })
|
|
@@ -1184,23 +1174,23 @@ function sa({
|
|
|
1184
1174
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
1185
1175
|
/* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
|
|
1186
1176
|
/* @__PURE__ */ o(
|
|
1187
|
-
|
|
1177
|
+
se,
|
|
1188
1178
|
{
|
|
1189
1179
|
value: e.type,
|
|
1190
1180
|
onValueChange: (c) => {
|
|
1191
|
-
const y =
|
|
1181
|
+
const y = Je({
|
|
1192
1182
|
controls: n,
|
|
1193
1183
|
controlId: e.id,
|
|
1194
1184
|
nextType: c,
|
|
1195
1185
|
defaultValues: i
|
|
1196
1186
|
});
|
|
1197
|
-
|
|
1187
|
+
L(y.controls, y.defaultValues);
|
|
1198
1188
|
},
|
|
1199
1189
|
children: [
|
|
1200
|
-
/* @__PURE__ */ t(
|
|
1201
|
-
/* @__PURE__ */ t(
|
|
1190
|
+
/* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
|
|
1191
|
+
/* @__PURE__ */ t(ie, { children: Pe(e.type).map(
|
|
1202
1192
|
(c) => /* @__PURE__ */ t(
|
|
1203
|
-
|
|
1193
|
+
ce,
|
|
1204
1194
|
{
|
|
1205
1195
|
value: c.value,
|
|
1206
1196
|
children: c.label
|
|
@@ -1215,22 +1205,22 @@ function sa({
|
|
|
1215
1205
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
1216
1206
|
/* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
|
|
1217
1207
|
/* @__PURE__ */ o(
|
|
1218
|
-
|
|
1208
|
+
se,
|
|
1219
1209
|
{
|
|
1220
|
-
value: e.placement ||
|
|
1210
|
+
value: e.placement || We,
|
|
1221
1211
|
onValueChange: (c) => B(e.id, (y) => ({
|
|
1222
1212
|
...y,
|
|
1223
1213
|
placement: c
|
|
1224
1214
|
})),
|
|
1225
1215
|
children: [
|
|
1226
|
-
/* @__PURE__ */ t(
|
|
1227
|
-
/* @__PURE__ */ t(
|
|
1216
|
+
/* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
|
|
1217
|
+
/* @__PURE__ */ t(ie, { children: Ke.map((c) => /* @__PURE__ */ t(ce, { value: c.value, children: c.label }, c.value)) })
|
|
1228
1218
|
]
|
|
1229
1219
|
}
|
|
1230
1220
|
)
|
|
1231
1221
|
] })
|
|
1232
1222
|
] }),
|
|
1233
|
-
|
|
1223
|
+
V(e.type) ? /* @__PURE__ */ o(G, { children: [
|
|
1234
1224
|
/* @__PURE__ */ t(
|
|
1235
1225
|
ft,
|
|
1236
1226
|
{
|
|
@@ -1245,13 +1235,13 @@ function sa({
|
|
|
1245
1235
|
})),
|
|
1246
1236
|
selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
|
|
1247
1237
|
onChange: (c) => {
|
|
1248
|
-
const y =
|
|
1238
|
+
const y = ee({
|
|
1249
1239
|
control: e,
|
|
1250
1240
|
nextSelectedCardIds: c
|
|
1251
1241
|
}), w = n.map(
|
|
1252
1242
|
(C) => C.id === e.id ? y.nextControl : C
|
|
1253
1243
|
);
|
|
1254
|
-
|
|
1244
|
+
L(w, i, {
|
|
1255
1245
|
type: "update",
|
|
1256
1246
|
cardBindingsById: y.cardBindingsById
|
|
1257
1247
|
});
|
|
@@ -1265,12 +1255,12 @@ function sa({
|
|
|
1265
1255
|
selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
|
|
1266
1256
|
control: e,
|
|
1267
1257
|
onChange: (c, y) => {
|
|
1268
|
-
const w =
|
|
1258
|
+
const w = ee({
|
|
1269
1259
|
control: e,
|
|
1270
1260
|
nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
|
|
1271
1261
|
matrixTargetIds: { [c]: y }
|
|
1272
1262
|
});
|
|
1273
|
-
|
|
1263
|
+
L(
|
|
1274
1264
|
n.map((C) => C.id === e.id ? w.nextControl : C),
|
|
1275
1265
|
i,
|
|
1276
1266
|
{ type: "update", cardBindingsById: w.cardBindingsById }
|
|
@@ -1286,7 +1276,7 @@ function sa({
|
|
|
1286
1276
|
availableFieldChoices: l.fields,
|
|
1287
1277
|
availableMetricChoices: l.metrics,
|
|
1288
1278
|
previewControlDefinitions: n,
|
|
1289
|
-
previewControlValues:
|
|
1279
|
+
previewControlValues: re,
|
|
1290
1280
|
controlLifecycle: "edit",
|
|
1291
1281
|
onChange: (c) => B(e.id, () => c)
|
|
1292
1282
|
}
|
|
@@ -1299,17 +1289,17 @@ function sa({
|
|
|
1299
1289
|
allowNoDefault: !0,
|
|
1300
1290
|
allowCardDefault: !0,
|
|
1301
1291
|
previewControlDefinitions: n,
|
|
1302
|
-
previewControlValues:
|
|
1292
|
+
previewControlValues: re,
|
|
1303
1293
|
onChange: (c) => {
|
|
1304
1294
|
const y = n.map(
|
|
1305
1295
|
(w) => w.id === e.id ? { ...w, defaultValue: c } : w
|
|
1306
1296
|
);
|
|
1307
1297
|
if (e.source.kind === "manual" && (U.current[e.id] = c), i) {
|
|
1308
1298
|
const w = { ...i };
|
|
1309
|
-
c === void 0 ? delete w[e.id] : w[e.id] = c,
|
|
1299
|
+
c === void 0 ? delete w[e.id] : w[e.id] = c, L(y, w);
|
|
1310
1300
|
return;
|
|
1311
1301
|
}
|
|
1312
|
-
|
|
1302
|
+
L(y, void 0);
|
|
1313
1303
|
}
|
|
1314
1304
|
}
|
|
1315
1305
|
),
|
|
@@ -1317,7 +1307,7 @@ function sa({
|
|
|
1317
1307
|
ht,
|
|
1318
1308
|
{
|
|
1319
1309
|
open: he === e.id,
|
|
1320
|
-
onOpenChange: (c) =>
|
|
1310
|
+
onOpenChange: (c) => Z(c ? e.id : null),
|
|
1321
1311
|
children: [
|
|
1322
1312
|
/* @__PURE__ */ t(gt, { asChild: !0, children: /* @__PURE__ */ o(
|
|
1323
1313
|
E,
|
|
@@ -1348,7 +1338,7 @@ function sa({
|
|
|
1348
1338
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
1349
1339
|
/* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
|
|
1350
1340
|
/* @__PURE__ */ o(
|
|
1351
|
-
|
|
1341
|
+
se,
|
|
1352
1342
|
{
|
|
1353
1343
|
value: e.initialValueStrategy,
|
|
1354
1344
|
onValueChange: (c) => B(e.id, (y) => ({
|
|
@@ -1356,9 +1346,9 @@ function sa({
|
|
|
1356
1346
|
initialValueStrategy: c
|
|
1357
1347
|
})),
|
|
1358
1348
|
children: [
|
|
1359
|
-
/* @__PURE__ */ t(
|
|
1360
|
-
/* @__PURE__ */ t(
|
|
1361
|
-
|
|
1349
|
+
/* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
|
|
1350
|
+
/* @__PURE__ */ t(ie, { children: Vt.map((c) => /* @__PURE__ */ t(
|
|
1351
|
+
ce,
|
|
1362
1352
|
{
|
|
1363
1353
|
value: c.value,
|
|
1364
1354
|
children: c.label
|
|
@@ -1410,18 +1400,18 @@ function oa(s) {
|
|
|
1410
1400
|
dismissMode: k = "passive"
|
|
1411
1401
|
} = s, b = n !== void 0, [g, v] = z(!1), [p, N] = z(
|
|
1412
1402
|
i
|
|
1413
|
-
), x = b ? n : g, f =
|
|
1403
|
+
), x = b ? n : g, f = A(
|
|
1414
1404
|
(_) => {
|
|
1415
1405
|
!_ && p && k === "passive" || (b || v(_), _ || N(!1), u == null || u(_));
|
|
1416
1406
|
},
|
|
1417
1407
|
[b, p, k, u]
|
|
1418
|
-
), S =
|
|
1408
|
+
), S = A(() => {
|
|
1419
1409
|
b || v(!1), N(!1), u == null || u(!1);
|
|
1420
1410
|
}, [b, u]);
|
|
1421
1411
|
K(() => {
|
|
1422
1412
|
x || N(!1);
|
|
1423
1413
|
}, [x]);
|
|
1424
|
-
const T =
|
|
1414
|
+
const T = A(
|
|
1425
1415
|
(_) => {
|
|
1426
1416
|
p && _.preventDefault();
|
|
1427
1417
|
},
|
|
@@ -1444,6 +1434,5 @@ export {
|
|
|
1444
1434
|
na as V,
|
|
1445
1435
|
Mt as a,
|
|
1446
1436
|
la as b,
|
|
1447
|
-
At as c,
|
|
1448
1437
|
oa as u
|
|
1449
1438
|
};
|