react-semaphor 0.1.526 → 0.1.527
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/DATA_APP_SDK.md +5 -1
- package/dist/analytics-protocol/index.js +1179 -296
- package/dist/brand-studio/index.js +15 -15
- package/dist/briefings/index.js +50 -49
- package/dist/chunks/{calculated-field-identity-D1ofR4KJ.js → calculated-field-identity-DEhjPSr-.js} +66 -65
- package/dist/chunks/{card-config-utils-9sv4e-Vb.js → card-config-utils-BlIbwkuD.js} +68 -65
- package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
- package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
- package/dist/chunks/{dashboard-briefing-launcher-DXz1GhFZ.js → dashboard-briefing-launcher-D9pFByPh.js} +372 -359
- package/dist/chunks/{dashboard-controls-Df8qOSrs.js → dashboard-controls-CJI5ZWMq.js} +739 -686
- package/dist/chunks/{dashboard-json-Xldp0qww.js → dashboard-json-DLdrFry-.js} +10 -10
- package/dist/chunks/{edit-dashboard-visual-COHBqyic.js → edit-dashboard-visual-D5LjWle1.js} +6603 -6572
- package/dist/chunks/{editor-action-buttons-DahlP57T.js → editor-action-buttons-G91NQKxU.js} +266 -267
- package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
- package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
- package/dist/chunks/{index-CbjuruKe.js → index-BvJOYbNv.js} +755 -745
- package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
- package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
- package/dist/chunks/{matrix-control-sources-2VAzGlt8.js → matrix-control-sources-BypfLZsK.js} +11 -11
- package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
- package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
- package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
- package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
- package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
- package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
- package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
- package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
- package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
- package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
- package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
- package/dist/chunks/{report-preferences-dialog-BcH-0lR-.js → report-preferences-dialog-D3hxu4sE.js} +131 -132
- package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
- package/dist/chunks/{selection-reducer-NF5C07yM.js → selection-reducer-C7Um5XN-.js} +47 -26
- package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
- package/dist/chunks/{semaphor-ready-indicator-BLRDuLr4.js → semaphor-ready-indicator-D46I_4g7.js} +49895 -46141
- package/dist/chunks/{slider-BYIH4icg.js → slider-B6LELqx6.js} +81 -82
- package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
- package/dist/chunks/switch-_7uBAbYx.js +24003 -0
- package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
- package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
- package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
- package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
- package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +138 -137
- package/dist/data-app-sdk/index.js +12 -12
- package/dist/data-app-sdk-adapters/index.js +23 -22
- package/dist/data-app-sdk-validation/index.js +27 -26
- package/dist/format-utils/index.js +247 -329
- package/dist/index.js +165 -168
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/index.d.ts +3 -0
- package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
- package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
- package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
- package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
- package/dist/types/components/surfboard/filter/types.d.ts +8 -29
- package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
- package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
- package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
- package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
- package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
- package/dist/types/index.js +5 -5
- package/dist/types/lib/api/exports-api.d.ts +3 -0
- package/dist/types/lib/csv-download.d.ts +9 -0
- package/dist/types/lib/csv-encoding-options.d.ts +6 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
- package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
- package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
- package/dist/types/lib/export-utils.d.ts +17 -15
- package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
- package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
- package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
- package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
- package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
- package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
- package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
- package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
- package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
- package/dist/types/lib/types/common-types.d.ts +5 -0
- package/dist/types/lib/types/explorer-types.d.ts +14 -0
- package/dist/types/lib/types/token-types.d.ts +0 -1
- package/dist/types/lib/utils/card-definition.d.ts +1 -1
- package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
- package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
- package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
- package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
- package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
- package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
- package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
- package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
- package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
- package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
- package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
- package/dist/types/shared/temporal/index.d.ts +5 -0
- package/dist/types/shared/temporal/relative-date.d.ts +21 -0
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
- package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
- package/package.json +1 -17
- package/src/data-app-sdk/README.md +6 -3
- package/dist/chunks/code-highlight-994tgM9v.js +0 -22265
- package/dist/chunks/dashboard-CsHvEtjN.js +0 -15
- package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
- package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
- package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
- package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
- package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
- package/dist/chunks/pre-block-Cq1RqhZX.js +0 -3987
- package/dist/chunks/search-CJz-QQ0Q.js +0 -24
- package/dist/chunks/switch-XaAACBrJ.js +0 -2234
- package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
- package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
- package/dist/data-app-builder/index.js +0 -3666
- package/dist/data-app-builder-browser-runtime/index.js +0 -8
- package/dist/data-app-codegen/index.js +0 -22
- package/dist/data-app-codegen-node/index.js +0 -1807
- package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
- package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
- package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
- package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
- package/dist/types/data-app-builder/constants.d.ts +0 -14
- package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
- package/dist/types/data-app-builder/index.d.ts +0 -1
- package/dist/types/data-app-builder/lib/api.d.ts +0 -36
- package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
- package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
- package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
- package/dist/types/data-app-builder/types.d.ts +0 -558
- package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
- package/dist/types/data-app-builder.d.ts +0 -2
- package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
- package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
- package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
- package/dist/types/data-app-codegen/index.d.ts +0 -6
- package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
- package/dist/types/data-app-codegen/node.d.ts +0 -2
- package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
- package/dist/types/data-app-codegen/validation.d.ts +0 -8
- package/dist/types/data-app-codegen-node.d.ts +0 -2
- package/dist/types/data-app-codegen.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
- package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
- package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useState as W, useEffect as ie, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as Ae, C as Qe, X as tt } from "./x-CXDkqdur.js";
|
|
2
|
+
import { useState as W, useEffect as ie, useCallback as U, useMemo as $, useRef as Se, Fragment as yt } from "react";
|
|
3
|
+
import { a3 as de, a0 as Le, u as Z, aj as j, a2 as M, n as vt, o as xt, p as Ct, c as fe, q as St, ak as kt, al as Nt, am as me, an as Re, ao as $e, ap as ke, aq as Ne, ar as wt, as as Dt, at as He, au as Et, av as It, aw as pe, ax as Tt, ay as Ke, B as q, az as at, aA as rt, aB as st, m as oe, r as nt, s as we, t as De, v as Ee, w as Ie, x as Te, aC as ot, aD as Ft, aE as Vt, aF as Pe, aG as At, aH as We, aI as Lt, aJ as _t, aK as qt, aL as Mt, aM as Fe, d as Ot, L as lt, aN as zt } from "./switch-_7uBAbYx.js";
|
|
4
|
+
import { b1 as Ut, b2 as jt, aB as Bt, az as ce, b3 as Qt, b4 as _e, b5 as Rt, b6 as $t, b7 as Ht, b8 as Kt, b9 as Pt, aD as Wt, ay as it, u as Yt, ba as Gt, bb as Xt, bc as Ye, bd as Jt, be as Zt, bf as dt, bg as ct, bh as ea, bi as ta, bj as aa, bk as ra, bl as sa, bm as na, bn as oa, bo as ut, bp as la } from "./semaphor-ready-indicator-D46I_4g7.js";
|
|
5
5
|
import { jsx as r, jsxs as f, Fragment as ee } from "react/jsx-runtime";
|
|
6
|
-
import { t as
|
|
7
|
-
import "./matrix-operation-contract-
|
|
6
|
+
import { t as ia } from "./validators-CQcG0EPN.js";
|
|
7
|
+
import "./matrix-operation-contract-BV02rLhu.js";
|
|
8
|
+
import "zod";
|
|
8
9
|
import "../value-format-preferences/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { u as ce, P as ia } from "./pre-block-Cq1RqhZX.js";
|
|
12
|
-
import { f as mt, r as da, g as ca, a as ua, b as ma } from "./index-CbjuruKe.js";
|
|
10
|
+
import { C as Ge } from "./selection-reducer-C7Um5XN-.js";
|
|
11
|
+
import { f as mt, r as da, g as ca, a as ua, b as ma } from "./index-BvJOYbNv.js";
|
|
13
12
|
import { S as pt } from "./save-DgMfP0j8.js";
|
|
14
13
|
/**
|
|
15
14
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -17,7 +16,7 @@ import { S as pt } from "./save-DgMfP0j8.js";
|
|
|
17
16
|
* This source code is licensed under the ISC license.
|
|
18
17
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
18
|
*/
|
|
20
|
-
const
|
|
19
|
+
const Qa = Ae("FilterX", [
|
|
21
20
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
22
21
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
23
22
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
@@ -28,7 +27,7 @@ const Ba = _e("FilterX", [
|
|
|
28
27
|
* This source code is licensed under the ISC license.
|
|
29
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
29
|
*/
|
|
31
|
-
const pa =
|
|
30
|
+
const pa = Ae("Library", [
|
|
32
31
|
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
33
32
|
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
34
33
|
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
@@ -40,13 +39,13 @@ const pa = _e("Library", [
|
|
|
40
39
|
* This source code is licensed under the ISC license.
|
|
41
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
41
|
*/
|
|
43
|
-
const fa =
|
|
42
|
+
const fa = Ae("Link2", [
|
|
44
43
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
45
44
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
46
45
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
47
46
|
]);
|
|
48
47
|
function ha(e) {
|
|
49
|
-
const [a, n] = W(null), [s, l] = W(null), d =
|
|
48
|
+
const [a, n] = W(null), [s, l] = W(null), d = Ut();
|
|
50
49
|
return ie(() => {
|
|
51
50
|
if (!e || e.trim() === "") {
|
|
52
51
|
n(null), l(null);
|
|
@@ -84,7 +83,7 @@ function ha(e) {
|
|
|
84
83
|
})();
|
|
85
84
|
}, [e, d]), a;
|
|
86
85
|
}
|
|
87
|
-
function
|
|
86
|
+
function ba(e, a) {
|
|
88
87
|
if (e.length === 0)
|
|
89
88
|
return "";
|
|
90
89
|
const n = e.find(
|
|
@@ -112,7 +111,7 @@ function ga(e, a) {
|
|
|
112
111
|
}
|
|
113
112
|
return e[0].id;
|
|
114
113
|
}
|
|
115
|
-
function
|
|
114
|
+
function ga(e, a) {
|
|
116
115
|
return a ? {
|
|
117
116
|
...e,
|
|
118
117
|
settings: a
|
|
@@ -153,9 +152,9 @@ function va(e, {
|
|
|
153
152
|
selectedTableName: h,
|
|
154
153
|
selectedConnectionId: u,
|
|
155
154
|
remoteChartSettings: v,
|
|
156
|
-
stripConfig:
|
|
155
|
+
stripConfig: b
|
|
157
156
|
}) {
|
|
158
|
-
const m = a ||
|
|
157
|
+
const m = a || jt(e);
|
|
159
158
|
return {
|
|
160
159
|
...e,
|
|
161
160
|
dataSource: ya(e, {
|
|
@@ -171,17 +170,17 @@ function va(e, {
|
|
|
171
170
|
connectionId: u || e.connectionId,
|
|
172
171
|
sql: m ? n || e.sql : void 0,
|
|
173
172
|
python: m ? e.python : void 0,
|
|
174
|
-
config: a || !e.config ? void 0 :
|
|
173
|
+
config: a || !e.config ? void 0 : b(e.config),
|
|
175
174
|
customCfg: s ? e.customCfg : null,
|
|
176
175
|
preferences: e.preferences,
|
|
177
|
-
customCardPreferences:
|
|
176
|
+
customCardPreferences: ga(
|
|
178
177
|
e.customCardPreferences,
|
|
179
178
|
v
|
|
180
179
|
)
|
|
181
180
|
};
|
|
182
181
|
}
|
|
183
182
|
const Ve = /* @__PURE__ */ new Set();
|
|
184
|
-
function
|
|
183
|
+
function Ra(e) {
|
|
185
184
|
return Ve.add(e), () => {
|
|
186
185
|
Ve.delete(e);
|
|
187
186
|
};
|
|
@@ -242,7 +241,7 @@ function Sa(e, a) {
|
|
|
242
241
|
const l = (p = s.cards) == null ? void 0 : p.find(
|
|
243
242
|
(h) => h.id === s.activeCardId
|
|
244
243
|
);
|
|
245
|
-
return l ? (
|
|
244
|
+
return l ? (Kt({
|
|
246
245
|
...a,
|
|
247
246
|
frame: s,
|
|
248
247
|
card: l,
|
|
@@ -256,7 +255,7 @@ function ka() {
|
|
|
256
255
|
return ((l = s.card.customCardPreferences) == null ? void 0 : l.url) || "";
|
|
257
256
|
}
|
|
258
257
|
), a = ha(e);
|
|
259
|
-
return { getUpdatedFrame:
|
|
258
|
+
return { getUpdatedFrame: U(() => {
|
|
260
259
|
var V;
|
|
261
260
|
xa();
|
|
262
261
|
const {
|
|
@@ -267,7 +266,7 @@ function ka() {
|
|
|
267
266
|
selectedSchemaName: h,
|
|
268
267
|
selectedDatamodelId: u,
|
|
269
268
|
selectedDatabaseName: v,
|
|
270
|
-
selectedTableName:
|
|
269
|
+
selectedTableName: b,
|
|
271
270
|
selectedConnectionId: m
|
|
272
271
|
} = M.getState(), x = l.sql, I = (V = a == null ? void 0 : a.getState()) == null ? void 0 : V.settings, S = va(l, {
|
|
273
272
|
isDevMode: d,
|
|
@@ -276,55 +275,55 @@ function ka() {
|
|
|
276
275
|
selectedSchemaName: h,
|
|
277
276
|
selectedDatamodelId: u,
|
|
278
277
|
selectedDatabaseName: v,
|
|
279
|
-
selectedTableName:
|
|
278
|
+
selectedTableName: b,
|
|
280
279
|
selectedConnectionId: m,
|
|
281
280
|
remoteChartSettings: I,
|
|
282
281
|
stripConfig: Ca
|
|
283
282
|
}), N = s.cards.map(
|
|
284
|
-
(
|
|
283
|
+
(B) => B.id === l.id ? S : B
|
|
285
284
|
);
|
|
286
285
|
return {
|
|
287
286
|
...s,
|
|
288
287
|
cards: N,
|
|
289
|
-
activeCardId:
|
|
288
|
+
activeCardId: ba(N, s.activeCardId)
|
|
290
289
|
};
|
|
291
290
|
}, [a]) };
|
|
292
291
|
}
|
|
293
292
|
function qe() {
|
|
294
|
-
const { authToken: e, tokenProps: a } =
|
|
293
|
+
const { authToken: e, tokenProps: a } = Bt(), n = ce(), s = Qt(), l = _e(), { selectVisual: d } = Rt(), {
|
|
295
294
|
setFrame: p,
|
|
296
295
|
setCard: h,
|
|
297
296
|
setIsDevMode: u,
|
|
298
297
|
initializeModeDrafts: v,
|
|
299
|
-
setActiveTabCardId:
|
|
298
|
+
setActiveTabCardId: b,
|
|
300
299
|
updateDataSource: m,
|
|
301
300
|
setQueryResultColumns: x,
|
|
302
301
|
setSelectedConnectionId: I,
|
|
303
302
|
setSelectedDatabaseName: S,
|
|
304
303
|
setSelectedSchemaName: N,
|
|
305
304
|
setSelectedTableName: V,
|
|
306
|
-
setSelectedDatamodelId:
|
|
305
|
+
setSelectedDatamodelId: B,
|
|
307
306
|
setFilterValues: G,
|
|
308
|
-
setInlineFilterValuesMap:
|
|
307
|
+
setInlineFilterValuesMap: Q,
|
|
309
308
|
setApplyFilters: H,
|
|
310
309
|
clearEditorContext: te
|
|
311
310
|
} = de(), {
|
|
312
311
|
setIsDashboardEditing: T,
|
|
313
312
|
setIsVisualEditing: o,
|
|
314
313
|
setSelectedFrameId: w,
|
|
315
|
-
clearSelectedFrameId:
|
|
316
|
-
} = Le(),
|
|
317
|
-
(
|
|
318
|
-
), Y =
|
|
314
|
+
clearSelectedFrameId: K
|
|
315
|
+
} = Le(), z = Z((A) => A.selectedSheetId), X = Z((A) => A.selectedFrameId), J = Z((A) => A.dashboard), ae = Z((A) => A.filterValues), O = Z(
|
|
316
|
+
(A) => A.inlineFilterValuesMap
|
|
317
|
+
), Y = $t((l == null ? void 0 : l.id) || "", {
|
|
319
318
|
enabled: !!(l != null && l.id) && !!(e != null && e.accessToken)
|
|
320
|
-
}), se =
|
|
321
|
-
async (
|
|
319
|
+
}), se = U(
|
|
320
|
+
async (A) => {
|
|
322
321
|
try {
|
|
323
|
-
d(
|
|
324
|
-
const { data: F, fromCache:
|
|
322
|
+
d(A), K(), te();
|
|
323
|
+
const { data: F, fromCache: P } = await Xe(
|
|
325
324
|
a.apiServiceUrl,
|
|
326
325
|
(e == null ? void 0 : e.accessToken) || "",
|
|
327
|
-
|
|
326
|
+
A.id,
|
|
328
327
|
n,
|
|
329
328
|
"Opening library visual..."
|
|
330
329
|
);
|
|
@@ -333,27 +332,27 @@ function qe() {
|
|
|
333
332
|
setCard: h,
|
|
334
333
|
setIsDevMode: u,
|
|
335
334
|
initializeModeDrafts: v,
|
|
336
|
-
setActiveTabCardId:
|
|
335
|
+
setActiveTabCardId: b,
|
|
337
336
|
updateDataSource: m,
|
|
338
337
|
setQueryResultColumns: x,
|
|
339
338
|
setSelectedConnectionId: I,
|
|
340
339
|
setSelectedDatabaseName: S,
|
|
341
340
|
setSelectedSchemaName: N,
|
|
342
341
|
setSelectedTableName: V,
|
|
343
|
-
setSelectedDatamodelId:
|
|
342
|
+
setSelectedDatamodelId: B,
|
|
344
343
|
setFilterValues: G,
|
|
345
|
-
setInlineFilterValuesMap:
|
|
344
|
+
setInlineFilterValuesMap: Q,
|
|
346
345
|
setApplyFilters: H,
|
|
347
346
|
setIsDashboardEditing: T,
|
|
348
347
|
setIsVisualEditing: o,
|
|
349
348
|
dashboard: J,
|
|
350
|
-
selectedSheetId:
|
|
349
|
+
selectedSheetId: z,
|
|
351
350
|
selectedFrameId: X,
|
|
352
351
|
filterValues: ae,
|
|
353
352
|
inlineFilterValuesMap: O
|
|
354
353
|
}))
|
|
355
354
|
throw new Error("Failed to setup editor with visual data");
|
|
356
|
-
return { success: !0, fromCache:
|
|
355
|
+
return { success: !0, fromCache: P };
|
|
357
356
|
} catch (F) {
|
|
358
357
|
return console.error("Error editing visual:", F), { success: !1, error: "Failed to load visual for editing" };
|
|
359
358
|
}
|
|
@@ -369,57 +368,57 @@ function qe() {
|
|
|
369
368
|
o,
|
|
370
369
|
u,
|
|
371
370
|
v,
|
|
372
|
-
|
|
371
|
+
b,
|
|
373
372
|
m,
|
|
374
373
|
x,
|
|
375
374
|
I,
|
|
376
375
|
S,
|
|
377
376
|
N,
|
|
378
377
|
V,
|
|
379
|
-
|
|
378
|
+
B,
|
|
380
379
|
G,
|
|
381
|
-
|
|
380
|
+
Q,
|
|
382
381
|
H,
|
|
383
382
|
te,
|
|
384
|
-
|
|
383
|
+
K,
|
|
385
384
|
J,
|
|
386
|
-
|
|
385
|
+
z,
|
|
387
386
|
X,
|
|
388
387
|
ae,
|
|
389
388
|
O
|
|
390
389
|
]
|
|
391
|
-
),
|
|
392
|
-
async (
|
|
393
|
-
var
|
|
394
|
-
const F = (
|
|
390
|
+
), be = U(
|
|
391
|
+
async (A) => {
|
|
392
|
+
var P;
|
|
393
|
+
const F = (_) => (j.error(_), { success: !1, error: _ });
|
|
395
394
|
try {
|
|
396
|
-
if (d(
|
|
395
|
+
if (d(A), !z)
|
|
397
396
|
return F("No sheet selected. Please select a sheet first.");
|
|
398
|
-
const { data:
|
|
397
|
+
const { data: _, fromCache: ge } = await Xe(
|
|
399
398
|
a.apiServiceUrl,
|
|
400
399
|
(e == null ? void 0 : e.accessToken) || "",
|
|
401
|
-
|
|
400
|
+
A.id,
|
|
402
401
|
n,
|
|
403
402
|
"Adding visual to dashboard..."
|
|
404
|
-
), ue = (
|
|
403
|
+
), ue = (_ == null ? void 0 : _.frameObject) ?? ((P = _ == null ? void 0 : _.visual) == null ? void 0 : P.frameObject);
|
|
405
404
|
if (!ue)
|
|
406
405
|
return F("Visual has no frame data");
|
|
407
|
-
const
|
|
408
|
-
if (!(
|
|
406
|
+
const R = ft(ue);
|
|
407
|
+
if (!(R != null && R.cards) || R.cards.length === 0)
|
|
409
408
|
return F("Visual frame is malformed");
|
|
410
409
|
const le = {
|
|
411
|
-
...
|
|
412
|
-
visualId:
|
|
410
|
+
...Ht(R),
|
|
411
|
+
visualId: A.id
|
|
413
412
|
// Link this frame to the library visual
|
|
414
413
|
};
|
|
415
414
|
return await s(
|
|
416
|
-
|
|
415
|
+
z,
|
|
417
416
|
le,
|
|
418
417
|
"end"
|
|
419
|
-
), T(!0), w(le.id), { success: !0, fromCache:
|
|
420
|
-
} catch (
|
|
421
|
-
return console.error("Error adding visual:",
|
|
422
|
-
|
|
418
|
+
), T(!0), w(le.id), { success: !0, fromCache: ge };
|
|
419
|
+
} catch (_) {
|
|
420
|
+
return console.error("Error adding visual:", _), F(
|
|
421
|
+
_ instanceof Error ? _.message : "Failed to add visual to dashboard"
|
|
423
422
|
);
|
|
424
423
|
}
|
|
425
424
|
},
|
|
@@ -428,7 +427,7 @@ function qe() {
|
|
|
428
427
|
a.apiServiceUrl,
|
|
429
428
|
n,
|
|
430
429
|
d,
|
|
431
|
-
|
|
430
|
+
z,
|
|
432
431
|
T,
|
|
433
432
|
w,
|
|
434
433
|
s
|
|
@@ -440,12 +439,12 @@ function qe() {
|
|
|
440
439
|
isError: Y.isError,
|
|
441
440
|
error: Y.error,
|
|
442
441
|
handleEditLibraryVisual: se,
|
|
443
|
-
handleAddLibraryVisual:
|
|
442
|
+
handleAddLibraryVisual: be,
|
|
444
443
|
getUpdatedFrame: ka().getUpdatedFrame,
|
|
445
444
|
refetch: Y.refetch
|
|
446
445
|
};
|
|
447
446
|
}
|
|
448
|
-
function
|
|
447
|
+
function $a() {
|
|
449
448
|
const e = M((p) => p.card.dataSource), {
|
|
450
449
|
setSelectedConnectionId: a,
|
|
451
450
|
setSelectedDatabaseName: n,
|
|
@@ -456,7 +455,7 @@ function Ha() {
|
|
|
456
455
|
ie(() => {
|
|
457
456
|
var I;
|
|
458
457
|
if (!e) return;
|
|
459
|
-
const { tableName: p, schemaName: h, databaseName: u, connectionId: v } =
|
|
458
|
+
const { tableName: p, schemaName: h, databaseName: u, connectionId: v } = Pt(e), b = (I = e.selectedEntities) == null ? void 0 : I[0], x = (b == null ? void 0 : b.type) === "model" && "id" in b ? b.id : "";
|
|
460
459
|
a(v || ""), n(u || ""), s(h || ""), l(p || ""), d(x);
|
|
461
460
|
}, [
|
|
462
461
|
e,
|
|
@@ -469,15 +468,15 @@ function Ha() {
|
|
|
469
468
|
}
|
|
470
469
|
function ht() {
|
|
471
470
|
var u, v;
|
|
472
|
-
const e = M((
|
|
471
|
+
const e = M((b) => b.card), a = M((b) => b.frame), n = $(
|
|
473
472
|
() => mt(a, e),
|
|
474
473
|
[a, e]
|
|
475
|
-
), { manifest: s } =
|
|
474
|
+
), { manifest: s } = Wt(
|
|
476
475
|
((u = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : u.url) || ""
|
|
477
476
|
), l = $(
|
|
478
477
|
() => {
|
|
479
|
-
var
|
|
480
|
-
return (
|
|
478
|
+
var b;
|
|
479
|
+
return (b = s == null ? void 0 : s.visuals) == null ? void 0 : b.find(
|
|
481
480
|
(m) => {
|
|
482
481
|
var x;
|
|
483
482
|
return m.name === ((x = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : x.componentName);
|
|
@@ -493,10 +492,10 @@ function ht() {
|
|
|
493
492
|
}),
|
|
494
493
|
[a, n, d]
|
|
495
494
|
), h = $(() => {
|
|
496
|
-
const
|
|
495
|
+
const b = p.findIndex(
|
|
497
496
|
(m) => (m == null ? void 0 : m.id) === e.id
|
|
498
497
|
);
|
|
499
|
-
return
|
|
498
|
+
return b < 0 ? -1 : ua(e, b);
|
|
500
499
|
}, [p, e]);
|
|
501
500
|
return $(() => !n || d !== "multiple" || h < 0 ? e.type : ma(
|
|
502
501
|
e,
|
|
@@ -519,44 +518,44 @@ function Na(e, a) {
|
|
|
519
518
|
};
|
|
520
519
|
}
|
|
521
520
|
function wa() {
|
|
522
|
-
const { setTempQueryData: e } = de(), a = ce(), n = M((
|
|
521
|
+
const { setTempQueryData: e } = de(), a = ce(), n = M((Q) => Q.tempQueryData), s = M((Q) => Q.card), l = ht(), d = $(() => l !== s.type ? { ...s, type: l } : s, [s, l]), { queryKey: p } = it(d), {
|
|
523
522
|
setCardSql: h,
|
|
524
523
|
setSqlGen: u,
|
|
525
524
|
setCardPython: v,
|
|
526
|
-
setCardCustomCfg:
|
|
525
|
+
setCardCustomCfg: b,
|
|
527
526
|
setCardPreferences: m,
|
|
528
527
|
clearQueryConfig: x,
|
|
529
528
|
setCardConfig: I,
|
|
530
529
|
setCardType: S,
|
|
531
530
|
setFrame: N,
|
|
532
531
|
setCard: V,
|
|
533
|
-
setActiveTabCardId:
|
|
532
|
+
setActiveTabCardId: B
|
|
534
533
|
} = de();
|
|
535
534
|
function G() {
|
|
536
|
-
var
|
|
537
|
-
const
|
|
535
|
+
var K, z, X, J;
|
|
536
|
+
const Q = a.getQueryData(p);
|
|
538
537
|
n != null && n.queryData || e({
|
|
539
538
|
queryKey: p,
|
|
540
|
-
queryData:
|
|
541
|
-
}), a.setQueryData(p, null), a.removeQueries({ queryKey: p, exact: !0 }), h(""), u({}), x(), I(void 0), v(""),
|
|
542
|
-
const H = M.getState().frame, te = M.getState().card, T = mt(H, te), o = ((
|
|
539
|
+
queryData: Q
|
|
540
|
+
}), a.setQueryData(p, null), a.removeQueries({ queryKey: p, exact: !0 }), h(""), u({}), x(), I(void 0), v(""), b(""), m({});
|
|
541
|
+
const H = M.getState().frame, te = M.getState().card, T = mt(H, te), o = ((K = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : K.visualType) === "multiple" || !!((z = T == null ? void 0 : T.customCardPreferences) != null && z.dataInputCardIds) || (((X = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : X.minInputs) || 0) > 1 || (((J = T == null ? void 0 : T.customCardPreferences) == null ? void 0 : J.maxInputs) || 0) > 1, w = Na(te, o);
|
|
543
542
|
N({
|
|
544
543
|
...H,
|
|
545
544
|
cards: H.cards.map(
|
|
546
545
|
(ae) => ae.id === w.id ? w : ae
|
|
547
546
|
)
|
|
548
|
-
}),
|
|
547
|
+
}), B(w.id), V(w), o || S("bar");
|
|
549
548
|
}
|
|
550
549
|
return G;
|
|
551
550
|
}
|
|
552
|
-
function
|
|
551
|
+
function Ha({
|
|
553
552
|
type: e,
|
|
554
553
|
isLinked: a,
|
|
555
554
|
className: n,
|
|
556
555
|
showLabel: s = !1,
|
|
557
556
|
showLocal: l = !1
|
|
558
557
|
}) {
|
|
559
|
-
const d = Z((N) => N.selectedFrameId), p =
|
|
558
|
+
const d = Z((N) => N.selectedFrameId), p = Yt((N) => N.selectedVisual), h = M((N) => N.frame);
|
|
560
559
|
let u;
|
|
561
560
|
if (e)
|
|
562
561
|
u = e;
|
|
@@ -578,7 +577,7 @@ function Pa({
|
|
|
578
577
|
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",
|
|
579
578
|
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",
|
|
580
579
|
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"
|
|
581
|
-
},
|
|
580
|
+
}, b = {
|
|
582
581
|
local: "Local to this dashboard: Changes made here only affect this dashboard copy.",
|
|
583
582
|
linked: "Linked to library: Changes made here update the library visual and all linked instances.",
|
|
584
583
|
library: "Library visual: Share and reuse this visual across multiple dashboards."
|
|
@@ -599,9 +598,9 @@ function Pa({
|
|
|
599
598
|
linked: "Linked",
|
|
600
599
|
library: "Library"
|
|
601
600
|
};
|
|
602
|
-
return /* @__PURE__ */ r(
|
|
603
|
-
/* @__PURE__ */ r(
|
|
604
|
-
|
|
601
|
+
return /* @__PURE__ */ r(vt, { children: /* @__PURE__ */ f(xt, { delayDuration: 300, children: [
|
|
602
|
+
/* @__PURE__ */ r(Ct, { asChild: !0, children: /* @__PURE__ */ f(
|
|
603
|
+
Gt,
|
|
605
604
|
{
|
|
606
605
|
variant: "outline",
|
|
607
606
|
className: fe(
|
|
@@ -616,24 +615,24 @@ function Pa({
|
|
|
616
615
|
}
|
|
617
616
|
) }),
|
|
618
617
|
/* @__PURE__ */ f(
|
|
619
|
-
|
|
618
|
+
St,
|
|
620
619
|
{
|
|
621
620
|
side: "bottom",
|
|
622
621
|
className: fe("max-w-xs", m[u]),
|
|
623
622
|
children: [
|
|
624
|
-
/* @__PURE__ */ r(
|
|
625
|
-
/* @__PURE__ */ r("p", { children:
|
|
623
|
+
/* @__PURE__ */ r(kt, { className: x[u] }),
|
|
624
|
+
/* @__PURE__ */ r("p", { children: b[u] })
|
|
626
625
|
]
|
|
627
626
|
}
|
|
628
627
|
)
|
|
629
628
|
] }) });
|
|
630
629
|
}
|
|
631
|
-
function
|
|
630
|
+
function bt(e) {
|
|
632
631
|
const { control: a, onChange: n } = e;
|
|
633
632
|
return /* @__PURE__ */ f("div", { className: "flex flex-col gap-1.5", children: [
|
|
634
633
|
/* @__PURE__ */ r(oe, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
635
634
|
/* @__PURE__ */ r(
|
|
636
|
-
|
|
635
|
+
nt,
|
|
637
636
|
{
|
|
638
637
|
size: "xs",
|
|
639
638
|
value: a.label,
|
|
@@ -691,7 +690,7 @@ function he(e) {
|
|
|
691
690
|
function Ea(e) {
|
|
692
691
|
const { control: a, scope: n, detail: s } = e;
|
|
693
692
|
return /* @__PURE__ */ f("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
|
|
694
|
-
/* @__PURE__ */ r(
|
|
693
|
+
/* @__PURE__ */ r(oa, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
|
|
695
694
|
/* @__PURE__ */ f("div", { className: "min-w-0 space-y-0.5", children: [
|
|
696
695
|
/* @__PURE__ */ r("div", { className: "text-[13px] font-medium text-foreground", children: a.label }),
|
|
697
696
|
/* @__PURE__ */ f("div", { className: "text-[12px] text-muted-foreground", children: [
|
|
@@ -718,14 +717,14 @@ function Je(e) {
|
|
|
718
717
|
onControlChange: h,
|
|
719
718
|
onLabelChange: u,
|
|
720
719
|
onDefaultValueChange: v,
|
|
721
|
-
onBack:
|
|
720
|
+
onBack: b,
|
|
722
721
|
onNext: m,
|
|
723
722
|
nextDisabled: x
|
|
724
723
|
} = e;
|
|
725
724
|
return /* @__PURE__ */ f("div", { className: "space-y-3", children: [
|
|
726
|
-
/* @__PURE__ */ r(
|
|
725
|
+
/* @__PURE__ */ r(bt, { control: a, onChange: u }),
|
|
727
726
|
/* @__PURE__ */ r(
|
|
728
|
-
|
|
727
|
+
dt,
|
|
729
728
|
{
|
|
730
729
|
control: a,
|
|
731
730
|
availableFieldChoices: s,
|
|
@@ -737,7 +736,7 @@ function Je(e) {
|
|
|
737
736
|
}
|
|
738
737
|
),
|
|
739
738
|
/* @__PURE__ */ r(
|
|
740
|
-
|
|
739
|
+
ct,
|
|
741
740
|
{
|
|
742
741
|
control: a,
|
|
743
742
|
value: n,
|
|
@@ -752,7 +751,7 @@ function Je(e) {
|
|
|
752
751
|
/* @__PURE__ */ r(
|
|
753
752
|
he,
|
|
754
753
|
{
|
|
755
|
-
secondary: /* @__PURE__ */ r(q, { type: "button", variant: "outline", size: "xs", onClick:
|
|
754
|
+
secondary: /* @__PURE__ */ r(q, { type: "button", variant: "outline", size: "xs", onClick: b, children: "Back" }),
|
|
756
755
|
primary: /* @__PURE__ */ r(
|
|
757
756
|
q,
|
|
758
757
|
{
|
|
@@ -806,7 +805,7 @@ function et(e) {
|
|
|
806
805
|
onBack: h,
|
|
807
806
|
onCancel: u,
|
|
808
807
|
onDone: v
|
|
809
|
-
} = e,
|
|
808
|
+
} = e, b = Ia.has(a.type), m = s.match(/\[\[param\.(.+?)\]\]/), x = m ? `{{ param('${m[1]}') }}` : "";
|
|
810
809
|
return /* @__PURE__ */ f("div", { className: "space-y-4", children: [
|
|
811
810
|
/* @__PURE__ */ r(
|
|
812
811
|
Ea,
|
|
@@ -819,7 +818,7 @@ function et(e) {
|
|
|
819
818
|
/* @__PURE__ */ f("div", { className: "space-y-2", children: [
|
|
820
819
|
/* @__PURE__ */ r("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
|
|
821
820
|
/* @__PURE__ */ f("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
|
|
822
|
-
|
|
821
|
+
b ? /* @__PURE__ */ f("div", { className: "space-y-1 px-3 py-2.5", children: [
|
|
823
822
|
/* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
|
|
824
823
|
/* @__PURE__ */ r("div", { className: "text-[12px] text-muted-foreground", children: l })
|
|
825
824
|
] }) : null,
|
|
@@ -876,7 +875,7 @@ function Ta(e) {
|
|
|
876
875
|
...a,
|
|
877
876
|
label: Fe[e.type]
|
|
878
877
|
} : {
|
|
879
|
-
...
|
|
878
|
+
...ot({
|
|
880
879
|
controls: [
|
|
881
880
|
{
|
|
882
881
|
...a,
|
|
@@ -905,7 +904,7 @@ function Ka({
|
|
|
905
904
|
usageByControlId: h,
|
|
906
905
|
availableFieldChoices: u,
|
|
907
906
|
availableMetricChoices: v,
|
|
908
|
-
structuralParticipants:
|
|
907
|
+
structuralParticipants: b,
|
|
909
908
|
structuralParticipantIdsByControlId: m,
|
|
910
909
|
card: x,
|
|
911
910
|
allowedControlTypes: I,
|
|
@@ -915,7 +914,7 @@ function Ka({
|
|
|
915
914
|
const V = $(
|
|
916
915
|
() => new Set(n || []),
|
|
917
916
|
[n]
|
|
918
|
-
),
|
|
917
|
+
), B = Ft(e), G = Nt(e), [Q, H] = W(
|
|
919
918
|
null
|
|
920
919
|
), [te, T] = W(
|
|
921
920
|
null
|
|
@@ -924,15 +923,15 @@ function Ka({
|
|
|
924
923
|
step: 1,
|
|
925
924
|
control: me(e, a, Array.from(V))
|
|
926
925
|
} : null
|
|
927
|
-
),
|
|
928
|
-
const t =
|
|
926
|
+
), K = Se({}), z = Se(void 0), X = Se(p), J = $(() => {
|
|
927
|
+
const t = Re({ scope: e, card: x });
|
|
929
928
|
if (!I)
|
|
930
929
|
return t;
|
|
931
930
|
const c = new Set(I);
|
|
932
931
|
return t.filter((i) => c.has(i.value));
|
|
933
|
-
}, [I, x, e]), ae =
|
|
932
|
+
}, [I, x, e]), ae = U(
|
|
934
933
|
(t) => {
|
|
935
|
-
const c =
|
|
934
|
+
const c = Re({
|
|
936
935
|
scope: e,
|
|
937
936
|
card: x,
|
|
938
937
|
includeType: I ? void 0 : t
|
|
@@ -940,18 +939,18 @@ function Ka({
|
|
|
940
939
|
if (!I)
|
|
941
940
|
return c;
|
|
942
941
|
const i = new Set(I);
|
|
943
|
-
return c.filter((
|
|
942
|
+
return c.filter((g) => i.has(g.value));
|
|
944
943
|
},
|
|
945
944
|
[I, x, e]
|
|
946
|
-
), O =
|
|
945
|
+
), O = U(
|
|
947
946
|
(t) => e === "dashboard" && (t === "field_selector" || t === "metric_selector"),
|
|
948
947
|
[e]
|
|
949
948
|
), Y = $(
|
|
950
949
|
() => o ? $e(
|
|
951
|
-
|
|
950
|
+
b || [],
|
|
952
951
|
o.control.type
|
|
953
952
|
) : [],
|
|
954
|
-
[o,
|
|
953
|
+
[o, b]
|
|
955
954
|
), se = $(() => {
|
|
956
955
|
if (!o)
|
|
957
956
|
return {
|
|
@@ -965,7 +964,7 @@ function Ka({
|
|
|
965
964
|
};
|
|
966
965
|
const t = o.selectedCardIds || [], c = ke({
|
|
967
966
|
controlType: o.control.type,
|
|
968
|
-
participants:
|
|
967
|
+
participants: b || [],
|
|
969
968
|
selectedCardIds: t
|
|
970
969
|
});
|
|
971
970
|
return {
|
|
@@ -983,7 +982,7 @@ function Ka({
|
|
|
983
982
|
v,
|
|
984
983
|
o,
|
|
985
984
|
O,
|
|
986
|
-
|
|
985
|
+
b
|
|
987
986
|
]);
|
|
988
987
|
ie(() => {
|
|
989
988
|
S == null || S(!!o);
|
|
@@ -994,7 +993,7 @@ function Ka({
|
|
|
994
993
|
control: me(e, a, Array.from(V))
|
|
995
994
|
}), T(null), H(null));
|
|
996
995
|
}, [a, p, V, e]);
|
|
997
|
-
const
|
|
996
|
+
const be = (t) => {
|
|
998
997
|
if (!O(t.type))
|
|
999
998
|
return {
|
|
1000
999
|
fields: u || [],
|
|
@@ -1008,20 +1007,20 @@ function Ka({
|
|
|
1008
1007
|
};
|
|
1009
1008
|
const i = ke({
|
|
1010
1009
|
controlType: t.type,
|
|
1011
|
-
participants:
|
|
1010
|
+
participants: b || [],
|
|
1012
1011
|
selectedCardIds: c
|
|
1013
1012
|
});
|
|
1014
1013
|
return {
|
|
1015
|
-
fields: t.type === "field_selector" ? i.choices.map((
|
|
1016
|
-
option:
|
|
1017
|
-
target: i.fieldTargetMap[
|
|
1014
|
+
fields: t.type === "field_selector" ? i.choices.map((g) => ({
|
|
1015
|
+
option: g,
|
|
1016
|
+
target: i.fieldTargetMap[g.value]
|
|
1018
1017
|
})) : [],
|
|
1019
|
-
metrics: t.type === "metric_selector" ? i.choices.map((
|
|
1020
|
-
option:
|
|
1021
|
-
target: i.metricTargetMap[
|
|
1018
|
+
metrics: t.type === "metric_selector" ? i.choices.map((g) => ({
|
|
1019
|
+
option: g,
|
|
1020
|
+
target: i.metricTargetMap[g.value]
|
|
1022
1021
|
})) : []
|
|
1023
1022
|
};
|
|
1024
|
-
},
|
|
1023
|
+
}, A = (t) => {
|
|
1025
1024
|
if (!O(t.control.type))
|
|
1026
1025
|
return {
|
|
1027
1026
|
nextControl: t.control,
|
|
@@ -1029,61 +1028,61 @@ function Ka({
|
|
|
1029
1028
|
};
|
|
1030
1029
|
const c = (m == null ? void 0 : m[t.control.id]) || [], i = ke({
|
|
1031
1030
|
controlType: t.control.type,
|
|
1032
|
-
participants:
|
|
1031
|
+
participants: b || [],
|
|
1033
1032
|
selectedCardIds: t.nextSelectedCardIds
|
|
1034
|
-
}),
|
|
1033
|
+
}), g = qt({
|
|
1035
1034
|
control: t.control,
|
|
1036
1035
|
choices: i.choices
|
|
1037
1036
|
}), C = Object.fromEntries(
|
|
1038
1037
|
c.filter((k) => !t.nextSelectedCardIds.includes(k)).map((k) => [k, void 0])
|
|
1039
1038
|
);
|
|
1040
|
-
return t.nextSelectedCardIds.length > 0 &&
|
|
1039
|
+
return t.nextSelectedCardIds.length > 0 && g.source.kind === "manual" && g.source.options.length > 0 && Object.assign(
|
|
1041
1040
|
C,
|
|
1042
1041
|
We({
|
|
1043
|
-
control:
|
|
1044
|
-
participants:
|
|
1042
|
+
control: g,
|
|
1043
|
+
participants: b || [],
|
|
1045
1044
|
selectedCardIds: t.nextSelectedCardIds,
|
|
1046
1045
|
matrixTargetIds: t.matrixTargetIds
|
|
1047
1046
|
})
|
|
1048
1047
|
), {
|
|
1049
|
-
nextControl:
|
|
1048
|
+
nextControl: g,
|
|
1050
1049
|
cardBindingsById: C
|
|
1051
1050
|
};
|
|
1052
|
-
}, F =
|
|
1051
|
+
}, F = U(
|
|
1053
1052
|
(t, c = s, i = { type: "update" }) => {
|
|
1054
|
-
const
|
|
1053
|
+
const g = t.map((C) => (Ne({
|
|
1055
1054
|
control: C,
|
|
1056
1055
|
defaultValues: c
|
|
1057
|
-
}),
|
|
1056
|
+
}), wt(
|
|
1058
1057
|
C
|
|
1059
1058
|
)));
|
|
1060
|
-
l(
|
|
1059
|
+
l(g, c, i);
|
|
1061
1060
|
},
|
|
1062
1061
|
[s, l]
|
|
1063
|
-
),
|
|
1062
|
+
), P = (t, c) => {
|
|
1064
1063
|
const i = a.find(
|
|
1065
1064
|
(E) => E.id === t
|
|
1066
1065
|
);
|
|
1067
|
-
let
|
|
1068
|
-
const C =
|
|
1066
|
+
let g = a.map((E) => E.id !== t ? E : c(E));
|
|
1067
|
+
const C = g.find(
|
|
1069
1068
|
(E) => E.id === t
|
|
1070
1069
|
);
|
|
1071
1070
|
let k, y;
|
|
1072
|
-
if (C && (!i ||
|
|
1073
|
-
const E = (m == null ? void 0 : m[C.id]) || [], ne =
|
|
1071
|
+
if (C && (!i || Lt({ control: i }, { control: C })) && e === "dashboard" && (C.type === "field_selector" || C.type === "metric_selector")) {
|
|
1072
|
+
const E = (m == null ? void 0 : m[C.id]) || [], ne = A({
|
|
1074
1073
|
control: C,
|
|
1075
1074
|
nextSelectedCardIds: E
|
|
1076
1075
|
});
|
|
1077
|
-
|
|
1076
|
+
g = g.map(
|
|
1078
1077
|
(re) => re.id === t ? ne.nextControl : re
|
|
1079
1078
|
), k = ne.cardBindingsById, y = [C.id];
|
|
1080
|
-
} else if (i && (!C || !
|
|
1079
|
+
} else if (i && (!C || !_t(C.type)) && e === "dashboard" && (i.type === "field_selector" || i.type === "metric_selector")) {
|
|
1081
1080
|
const E = (m == null ? void 0 : m[i.id]) || [];
|
|
1082
1081
|
k = Object.fromEntries(
|
|
1083
1082
|
E.map((ne) => [ne, void 0])
|
|
1084
1083
|
), y = [i.id];
|
|
1085
1084
|
}
|
|
1086
|
-
const D =
|
|
1085
|
+
const D = g.find(
|
|
1087
1086
|
(E) => E.id === t
|
|
1088
1087
|
);
|
|
1089
1088
|
let L = s;
|
|
@@ -1092,34 +1091,34 @@ function Ka({
|
|
|
1092
1091
|
control: i,
|
|
1093
1092
|
defaultValues: s
|
|
1094
1093
|
});
|
|
1095
|
-
i.source.kind === "manual" && D.source.kind === "sql_query" && (
|
|
1096
|
-
const ne = E === void 0 && i.source.kind === "sql_query" && D.source.kind === "manual" ?
|
|
1094
|
+
i.source.kind === "manual" && D.source.kind === "sql_query" && (K.current[t] = E);
|
|
1095
|
+
const ne = E === void 0 && i.source.kind === "sql_query" && D.source.kind === "manual" ? K.current[t] : E, re = Pe({
|
|
1097
1096
|
previousControl: i,
|
|
1098
1097
|
nextControl: D,
|
|
1099
1098
|
currentDefaultValue: ne
|
|
1100
1099
|
});
|
|
1101
|
-
D.source.kind === "manual" && (
|
|
1102
|
-
(
|
|
1100
|
+
D.source.kind === "manual" && (K.current[t] = re), s && (L = { ...s }, re === void 0 ? delete L[t] : L[t] = re), g = g.map(
|
|
1101
|
+
(Be) => Be.id === t ? { ...D, defaultValue: re } : Be
|
|
1103
1102
|
);
|
|
1104
1103
|
}
|
|
1105
|
-
F(
|
|
1104
|
+
F(g, L, {
|
|
1106
1105
|
type: "update",
|
|
1107
1106
|
cardBindingsById: k,
|
|
1108
1107
|
affectedBindingControlIds: y
|
|
1109
1108
|
});
|
|
1110
|
-
},
|
|
1109
|
+
}, _ = (t, c) => {
|
|
1111
1110
|
if (!c.trim())
|
|
1112
1111
|
return;
|
|
1113
|
-
const i =
|
|
1112
|
+
const i = Mt(c);
|
|
1114
1113
|
if (i === t || V.has(i) || a.some(
|
|
1115
1114
|
(k) => k.id === i && k.id !== t
|
|
1116
1115
|
))
|
|
1117
1116
|
return;
|
|
1118
|
-
const
|
|
1117
|
+
const g = a.map(
|
|
1119
1118
|
(k) => k.id === t ? { ...k, id: i } : k
|
|
1120
1119
|
);
|
|
1121
1120
|
if (!s) {
|
|
1122
|
-
F(
|
|
1121
|
+
F(g, void 0, {
|
|
1123
1122
|
type: "rename",
|
|
1124
1123
|
oldId: t,
|
|
1125
1124
|
newId: i
|
|
@@ -1127,35 +1126,35 @@ function Ka({
|
|
|
1127
1126
|
return;
|
|
1128
1127
|
}
|
|
1129
1128
|
const C = { ...s };
|
|
1130
|
-
Object.prototype.hasOwnProperty.call(C, t) && (C[i] = C[t], delete C[t]), F(
|
|
1129
|
+
Object.prototype.hasOwnProperty.call(C, t) && (C[i] = C[t], delete C[t]), F(g, C, {
|
|
1131
1130
|
type: "rename",
|
|
1132
1131
|
oldId: t,
|
|
1133
1132
|
newId: i
|
|
1134
1133
|
});
|
|
1135
|
-
},
|
|
1136
|
-
const c = a.filter((
|
|
1134
|
+
}, ge = (t) => {
|
|
1135
|
+
const c = a.filter((g) => g.id !== t);
|
|
1137
1136
|
if (!s) {
|
|
1138
1137
|
F(c, void 0, { type: "remove", controlId: t });
|
|
1139
1138
|
return;
|
|
1140
1139
|
}
|
|
1141
1140
|
const i = { ...s };
|
|
1142
1141
|
delete i[t], F(c, i, { type: "remove", controlId: t });
|
|
1143
|
-
}, ue =
|
|
1144
|
-
|
|
1142
|
+
}, ue = U(() => {
|
|
1143
|
+
z.current = void 0, w({
|
|
1145
1144
|
step: 1,
|
|
1146
1145
|
control: me(e, a, Array.from(V))
|
|
1147
1146
|
}), T(null), H(null);
|
|
1148
|
-
}, [a, V, e]),
|
|
1147
|
+
}, [a, V, e]), R = (t) => {
|
|
1149
1148
|
w(
|
|
1150
1149
|
(c) => c && (() => {
|
|
1151
1150
|
const i = t(c.control);
|
|
1152
|
-
c.control.source.kind === "manual" && i.source.kind === "sql_query" && (
|
|
1153
|
-
const
|
|
1151
|
+
c.control.source.kind === "manual" && i.source.kind === "sql_query" && (z.current = c.defaultValue);
|
|
1152
|
+
const g = c.defaultValue === void 0 && c.control.source.kind === "sql_query" && i.source.kind === "manual" ? z.current : c.defaultValue, C = Pe({
|
|
1154
1153
|
previousControl: c.control,
|
|
1155
1154
|
nextControl: i,
|
|
1156
|
-
currentDefaultValue:
|
|
1155
|
+
currentDefaultValue: g
|
|
1157
1156
|
});
|
|
1158
|
-
return i.source.kind === "manual" && (
|
|
1157
|
+
return i.source.kind === "manual" && (z.current = C), {
|
|
1159
1158
|
...c,
|
|
1160
1159
|
control: i,
|
|
1161
1160
|
defaultValue: C
|
|
@@ -1164,7 +1163,7 @@ function Ka({
|
|
|
1164
1163
|
);
|
|
1165
1164
|
}, le = (t) => {
|
|
1166
1165
|
w(
|
|
1167
|
-
(c) => c && (c.control.source.kind === "manual" && (
|
|
1166
|
+
(c) => c && (c.control.source.kind === "manual" && (z.current = t), {
|
|
1168
1167
|
...c,
|
|
1169
1168
|
defaultValue: t
|
|
1170
1169
|
})
|
|
@@ -1173,8 +1172,8 @@ function Ka({
|
|
|
1173
1172
|
if (!o)
|
|
1174
1173
|
return !1;
|
|
1175
1174
|
if (o.step === 2 && O(o.control.type))
|
|
1176
|
-
return (o.selectedCardIds || []).length > 0 &&
|
|
1177
|
-
participants:
|
|
1175
|
+
return (o.selectedCardIds || []).length > 0 && Dt({
|
|
1176
|
+
participants: b || [],
|
|
1178
1177
|
selectedCardIds: o.selectedCardIds || [],
|
|
1179
1178
|
control: o.control,
|
|
1180
1179
|
selected: o.matrixTargetIds
|
|
@@ -1182,22 +1181,22 @@ function Ka({
|
|
|
1182
1181
|
if (o.step !== 2 && o.step !== 3 || !o.control.label.trim())
|
|
1183
1182
|
return !1;
|
|
1184
1183
|
const c = o.control.source.kind === "sql_query" ? o.control : He(o.control);
|
|
1185
|
-
if (c.source.kind === "manual" && (
|
|
1186
|
-
(
|
|
1184
|
+
if (c.source.kind === "manual" && (Et(c) && c.source.options.length === 0 || c.source.options.some(
|
|
1185
|
+
(g) => g.label.trim().length === 0 || g.value.trim().length === 0
|
|
1187
1186
|
)))
|
|
1188
1187
|
return !1;
|
|
1189
1188
|
if (c.source.kind === "sql_query") {
|
|
1190
|
-
const { connectionId: i, sql:
|
|
1191
|
-
return i.trim().length > 0 &&
|
|
1189
|
+
const { connectionId: i, sql: g, valueColumn: C } = c.source;
|
|
1190
|
+
return i.trim().length > 0 && g.trim().length > 0 && C.trim().length > 0;
|
|
1192
1191
|
}
|
|
1193
|
-
return
|
|
1192
|
+
return It(
|
|
1194
1193
|
pe(c, o.defaultValue)
|
|
1195
1194
|
);
|
|
1196
1195
|
})(), Oe = () => {
|
|
1197
1196
|
var k;
|
|
1198
1197
|
if (!o)
|
|
1199
1198
|
return;
|
|
1200
|
-
const t = He(o.control), c =
|
|
1199
|
+
const t = He(o.control), c = At({
|
|
1201
1200
|
label: t.label,
|
|
1202
1201
|
fallbackId: t.id,
|
|
1203
1202
|
existingControls: a,
|
|
@@ -1205,9 +1204,9 @@ function Ka({
|
|
|
1205
1204
|
}), i = {
|
|
1206
1205
|
...t,
|
|
1207
1206
|
id: c
|
|
1208
|
-
},
|
|
1207
|
+
}, g = e === "dashboard" && (i.type === "field_selector" || i.type === "metric_selector") && ((k = o.selectedCardIds) != null && k.length) ? We({
|
|
1209
1208
|
control: i,
|
|
1210
|
-
participants:
|
|
1209
|
+
participants: b || [],
|
|
1211
1210
|
selectedCardIds: o.selectedCardIds,
|
|
1212
1211
|
matrixTargetIds: o.matrixTargetIds
|
|
1213
1212
|
}) : void 0, C = pe(
|
|
@@ -1221,11 +1220,11 @@ function Ka({
|
|
|
1221
1220
|
createdControlId: c,
|
|
1222
1221
|
selectedCardIds: o.selectedCardIds,
|
|
1223
1222
|
matrixTargetIds: o.matrixTargetIds,
|
|
1224
|
-
cardBindingsById:
|
|
1223
|
+
cardBindingsById: g
|
|
1225
1224
|
});
|
|
1226
|
-
}, ve =
|
|
1225
|
+
}, ve = U(() => {
|
|
1227
1226
|
w(null);
|
|
1228
|
-
}, []),
|
|
1227
|
+
}, []), ze = U(() => {
|
|
1229
1228
|
if (!(o != null && o.createdControlId)) {
|
|
1230
1229
|
w(null);
|
|
1231
1230
|
return;
|
|
@@ -1235,8 +1234,8 @@ function Ka({
|
|
|
1235
1234
|
o.defaultValue
|
|
1236
1235
|
);
|
|
1237
1236
|
if (s) {
|
|
1238
|
-
const
|
|
1239
|
-
i === void 0 ? delete
|
|
1237
|
+
const g = { ...s };
|
|
1238
|
+
i === void 0 ? delete g[c] : g[c] = i, F(
|
|
1240
1239
|
[
|
|
1241
1240
|
...a,
|
|
1242
1241
|
{
|
|
@@ -1244,7 +1243,7 @@ function Ka({
|
|
|
1244
1243
|
defaultValue: i
|
|
1245
1244
|
}
|
|
1246
1245
|
],
|
|
1247
|
-
|
|
1246
|
+
g,
|
|
1248
1247
|
{
|
|
1249
1248
|
type: "add",
|
|
1250
1249
|
cardBindingsById: o.cardBindingsById
|
|
@@ -1266,10 +1265,10 @@ function Ka({
|
|
|
1266
1265
|
}
|
|
1267
1266
|
);
|
|
1268
1267
|
T(c), w(null), N == null || N();
|
|
1269
|
-
}, [a, o, s, F, N]),
|
|
1268
|
+
}, [a, o, s, F, N]), gt = o ? O(o.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ue = o != null && o.createdControlId ? `[[param.${o.createdControlId}]]` : o ? `[[param.${Tt(o.control.label) || o.control.id}]]` : "", xe = Ke({
|
|
1270
1269
|
controls: a,
|
|
1271
1270
|
defaultValues: s
|
|
1272
|
-
}), Ce = o ? [...a, o.control] : a, je = o ?
|
|
1271
|
+
}), Ce = o ? [...a, o.control] : a, je = o ? Ke({
|
|
1273
1272
|
controls: Ce,
|
|
1274
1273
|
defaultValues: s,
|
|
1275
1274
|
overrides: [
|
|
@@ -1285,7 +1284,7 @@ function Ka({
|
|
|
1285
1284
|
Da,
|
|
1286
1285
|
{
|
|
1287
1286
|
currentStep: o.step,
|
|
1288
|
-
labels:
|
|
1287
|
+
labels: gt
|
|
1289
1288
|
}
|
|
1290
1289
|
),
|
|
1291
1290
|
o.step === 1 && (() => {
|
|
@@ -1301,7 +1300,7 @@ function Ka({
|
|
|
1301
1300
|
"text"
|
|
1302
1301
|
]), i = J.filter(
|
|
1303
1302
|
(k) => !t.has(k.value) && !c.has(k.value)
|
|
1304
|
-
),
|
|
1303
|
+
), g = J.filter(
|
|
1305
1304
|
(k) => t.has(k.value)
|
|
1306
1305
|
), C = (k) => /* @__PURE__ */ f(
|
|
1307
1306
|
"button",
|
|
@@ -1329,9 +1328,9 @@ function Ka({
|
|
|
1329
1328
|
/* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Input controls" }),
|
|
1330
1329
|
/* @__PURE__ */ r("div", { className: "grid gap-1.5 sm:grid-cols-2", children: i.map(C) })
|
|
1331
1330
|
] }),
|
|
1332
|
-
|
|
1331
|
+
g.length > 0 && /* @__PURE__ */ f("div", { className: "space-y-1.5", children: [
|
|
1333
1332
|
/* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Data-driven controls" }),
|
|
1334
|
-
/* @__PURE__ */ r("div", { className: "grid gap-1.5 sm:grid-cols-2", children:
|
|
1333
|
+
/* @__PURE__ */ r("div", { className: "grid gap-1.5 sm:grid-cols-2", children: g.map(C) })
|
|
1335
1334
|
] }),
|
|
1336
1335
|
/* @__PURE__ */ r(
|
|
1337
1336
|
he,
|
|
@@ -1353,10 +1352,10 @@ function Ka({
|
|
|
1353
1352
|
o.step === 2 && O(o.control.type) && /* @__PURE__ */ f("div", { className: "space-y-3", children: [
|
|
1354
1353
|
/* @__PURE__ */ f("div", { className: "space-y-3", children: [
|
|
1355
1354
|
/* @__PURE__ */ r(
|
|
1356
|
-
|
|
1355
|
+
bt,
|
|
1357
1356
|
{
|
|
1358
1357
|
control: o.control,
|
|
1359
|
-
onChange: (t) =>
|
|
1358
|
+
onChange: (t) => R((c) => ({
|
|
1360
1359
|
...c,
|
|
1361
1360
|
label: t
|
|
1362
1361
|
}))
|
|
@@ -1372,16 +1371,16 @@ function Ka({
|
|
|
1372
1371
|
className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
|
|
1373
1372
|
children: [
|
|
1374
1373
|
/* @__PURE__ */ r(
|
|
1375
|
-
|
|
1374
|
+
Xt,
|
|
1376
1375
|
{
|
|
1377
1376
|
checked: c,
|
|
1378
1377
|
onCheckedChange: (i) => w(
|
|
1379
|
-
(
|
|
1380
|
-
...
|
|
1378
|
+
(g) => g && {
|
|
1379
|
+
...g,
|
|
1381
1380
|
selectedCardIds: i === !0 ? [
|
|
1382
|
-
...
|
|
1381
|
+
...g.selectedCardIds || [],
|
|
1383
1382
|
t.cardId
|
|
1384
|
-
] : (
|
|
1383
|
+
] : (g.selectedCardIds || []).filter(
|
|
1385
1384
|
(C) => C !== t.cardId
|
|
1386
1385
|
)
|
|
1387
1386
|
}
|
|
@@ -1453,8 +1452,8 @@ function Ka({
|
|
|
1453
1452
|
availableMetricChoices: se.metrics,
|
|
1454
1453
|
previewControlDefinitions: Ce,
|
|
1455
1454
|
previewControlValues: je,
|
|
1456
|
-
onControlChange: (t) =>
|
|
1457
|
-
onLabelChange: (t) =>
|
|
1455
|
+
onControlChange: (t) => R(() => t),
|
|
1456
|
+
onLabelChange: (t) => R((c) => ({
|
|
1458
1457
|
...c,
|
|
1459
1458
|
label: t
|
|
1460
1459
|
})),
|
|
@@ -1478,8 +1477,8 @@ function Ka({
|
|
|
1478
1477
|
availableMetricChoices: se.metrics,
|
|
1479
1478
|
previewControlDefinitions: Ce,
|
|
1480
1479
|
previewControlValues: je,
|
|
1481
|
-
onControlChange: (t) =>
|
|
1482
|
-
onLabelChange: (t) =>
|
|
1480
|
+
onControlChange: (t) => R(() => t),
|
|
1481
|
+
onLabelChange: (t) => R((c) => ({
|
|
1483
1482
|
...c,
|
|
1484
1483
|
label: t
|
|
1485
1484
|
})),
|
|
@@ -1499,7 +1498,7 @@ function Ka({
|
|
|
1499
1498
|
{
|
|
1500
1499
|
control: o.control,
|
|
1501
1500
|
scope: e,
|
|
1502
|
-
createdReference:
|
|
1501
|
+
createdReference: Ue,
|
|
1503
1502
|
explorerContent: /* @__PURE__ */ f(ee, { children: [
|
|
1504
1503
|
"Open the card and use",
|
|
1505
1504
|
" ",
|
|
@@ -1515,7 +1514,7 @@ function Ka({
|
|
|
1515
1514
|
}
|
|
1516
1515
|
),
|
|
1517
1516
|
onCancel: ve,
|
|
1518
|
-
onDone:
|
|
1517
|
+
onDone: ze
|
|
1519
1518
|
}
|
|
1520
1519
|
),
|
|
1521
1520
|
o.step === 4 && O(o.control.type) && /* @__PURE__ */ r(
|
|
@@ -1523,7 +1522,7 @@ function Ka({
|
|
|
1523
1522
|
{
|
|
1524
1523
|
control: o.control,
|
|
1525
1524
|
scope: e,
|
|
1526
|
-
createdReference:
|
|
1525
|
+
createdReference: Ue,
|
|
1527
1526
|
summaryDetail: /* @__PURE__ */ f(ee, { children: [
|
|
1528
1527
|
"Used by ",
|
|
1529
1528
|
(o.selectedCardIds || []).length,
|
|
@@ -1539,13 +1538,13 @@ function Ka({
|
|
|
1539
1538
|
}
|
|
1540
1539
|
),
|
|
1541
1540
|
onCancel: ve,
|
|
1542
|
-
onDone:
|
|
1541
|
+
onDone: ze
|
|
1543
1542
|
}
|
|
1544
1543
|
)
|
|
1545
1544
|
] }) : null,
|
|
1546
1545
|
!o && a.length === 0 ? /* @__PURE__ */ r("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: d }) : null,
|
|
1547
1546
|
!o && a.map((t) => {
|
|
1548
|
-
const c =
|
|
1547
|
+
const c = be(t), i = h == null ? void 0 : h[t.id], g = Ne({
|
|
1549
1548
|
control: t,
|
|
1550
1549
|
defaultValues: s
|
|
1551
1550
|
}), C = te === t.id, k = "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";
|
|
@@ -1564,7 +1563,7 @@ function Ka({
|
|
|
1564
1563
|
(y) => y === t.id ? null : t.id
|
|
1565
1564
|
),
|
|
1566
1565
|
children: [
|
|
1567
|
-
C ? /* @__PURE__ */ r(
|
|
1566
|
+
C ? /* @__PURE__ */ r(Qe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ r(Ge, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1568
1567
|
/* @__PURE__ */ f("div", { className: "min-w-0", children: [
|
|
1569
1568
|
/* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1570
1569
|
/* @__PURE__ */ r("span", { className: "truncate text-[13px] font-medium text-foreground", children: t.label || "Untitled control" }),
|
|
@@ -1586,9 +1585,9 @@ function Ka({
|
|
|
1586
1585
|
size: "xs",
|
|
1587
1586
|
variant: "ghost",
|
|
1588
1587
|
className: "h-7 w-7 shrink-0 p-0 text-muted-foreground",
|
|
1589
|
-
onClick: () =>
|
|
1588
|
+
onClick: () => ge(t.id),
|
|
1590
1589
|
"aria-label": `Remove ${t.label}`,
|
|
1591
|
-
children: /* @__PURE__ */ r(
|
|
1590
|
+
children: /* @__PURE__ */ r(Jt, { className: "h-3.5 w-3.5" })
|
|
1592
1591
|
}
|
|
1593
1592
|
)
|
|
1594
1593
|
] }),
|
|
@@ -1597,12 +1596,12 @@ function Ka({
|
|
|
1597
1596
|
/* @__PURE__ */ f("div", { className: "flex flex-col gap-1.5", children: [
|
|
1598
1597
|
/* @__PURE__ */ r(oe, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
|
|
1599
1598
|
/* @__PURE__ */ r(
|
|
1600
|
-
|
|
1599
|
+
nt,
|
|
1601
1600
|
{
|
|
1602
1601
|
size: "xs",
|
|
1603
1602
|
value: t.label,
|
|
1604
1603
|
placeholder: "Control label",
|
|
1605
|
-
onChange: (y) =>
|
|
1604
|
+
onChange: (y) => P(t.id, (D) => ({
|
|
1606
1605
|
...D,
|
|
1607
1606
|
label: y.target.value
|
|
1608
1607
|
}))
|
|
@@ -1616,7 +1615,7 @@ function Ka({
|
|
|
1616
1615
|
{
|
|
1617
1616
|
value: t.type,
|
|
1618
1617
|
onValueChange: (y) => {
|
|
1619
|
-
const D =
|
|
1618
|
+
const D = ot({
|
|
1620
1619
|
controls: a,
|
|
1621
1620
|
controlId: t.id,
|
|
1622
1621
|
nextType: y,
|
|
@@ -1646,13 +1645,13 @@ function Ka({
|
|
|
1646
1645
|
we,
|
|
1647
1646
|
{
|
|
1648
1647
|
value: t.placement || G,
|
|
1649
|
-
onValueChange: (y) =>
|
|
1648
|
+
onValueChange: (y) => P(t.id, (D) => ({
|
|
1650
1649
|
...D,
|
|
1651
1650
|
placement: y
|
|
1652
1651
|
})),
|
|
1653
1652
|
children: [
|
|
1654
1653
|
/* @__PURE__ */ r(De, { size: "xs", children: /* @__PURE__ */ r(Ee, {}) }),
|
|
1655
|
-
/* @__PURE__ */ r(Ie, { children:
|
|
1654
|
+
/* @__PURE__ */ r(Ie, { children: B.map((y) => /* @__PURE__ */ r(Te, { value: y.value, children: y.label }, y.value)) })
|
|
1656
1655
|
]
|
|
1657
1656
|
}
|
|
1658
1657
|
)
|
|
@@ -1660,11 +1659,11 @@ function Ka({
|
|
|
1660
1659
|
] }),
|
|
1661
1660
|
O(t.type) ? /* @__PURE__ */ f(ee, { children: [
|
|
1662
1661
|
/* @__PURE__ */ r(
|
|
1663
|
-
|
|
1662
|
+
Zt,
|
|
1664
1663
|
{
|
|
1665
1664
|
type: t.type,
|
|
1666
1665
|
participants: $e(
|
|
1667
|
-
|
|
1666
|
+
b || [],
|
|
1668
1667
|
t.type
|
|
1669
1668
|
).map((y) => ({
|
|
1670
1669
|
cardId: y.cardId,
|
|
@@ -1673,7 +1672,7 @@ function Ka({
|
|
|
1673
1672
|
})),
|
|
1674
1673
|
selectedCardIds: (m == null ? void 0 : m[t.id]) || [],
|
|
1675
1674
|
onChange: (y) => {
|
|
1676
|
-
const D =
|
|
1675
|
+
const D = A({
|
|
1677
1676
|
control: t,
|
|
1678
1677
|
nextSelectedCardIds: y
|
|
1679
1678
|
}), L = a.map(
|
|
@@ -1689,11 +1688,11 @@ function Ka({
|
|
|
1689
1688
|
/* @__PURE__ */ r(
|
|
1690
1689
|
Ye,
|
|
1691
1690
|
{
|
|
1692
|
-
participants:
|
|
1691
|
+
participants: b || [],
|
|
1693
1692
|
selectedCardIds: (m == null ? void 0 : m[t.id]) || [],
|
|
1694
1693
|
control: t,
|
|
1695
1694
|
onChange: (y, D) => {
|
|
1696
|
-
const L =
|
|
1695
|
+
const L = A({
|
|
1697
1696
|
control: t,
|
|
1698
1697
|
nextSelectedCardIds: (m == null ? void 0 : m[t.id]) || [],
|
|
1699
1698
|
matrixTargetIds: { [y]: D }
|
|
@@ -1708,7 +1707,7 @@ function Ka({
|
|
|
1708
1707
|
)
|
|
1709
1708
|
] }) : null,
|
|
1710
1709
|
/* @__PURE__ */ r(
|
|
1711
|
-
|
|
1710
|
+
dt,
|
|
1712
1711
|
{
|
|
1713
1712
|
control: t,
|
|
1714
1713
|
availableFieldChoices: c.fields,
|
|
@@ -1716,14 +1715,14 @@ function Ka({
|
|
|
1716
1715
|
previewControlDefinitions: a,
|
|
1717
1716
|
previewControlValues: xe,
|
|
1718
1717
|
controlLifecycle: "edit",
|
|
1719
|
-
onChange: (y) =>
|
|
1718
|
+
onChange: (y) => P(t.id, () => y)
|
|
1720
1719
|
}
|
|
1721
1720
|
),
|
|
1722
1721
|
t.initialValueStrategy === "saved_default" && /* @__PURE__ */ r(
|
|
1723
|
-
|
|
1722
|
+
ct,
|
|
1724
1723
|
{
|
|
1725
1724
|
control: t,
|
|
1726
|
-
value:
|
|
1725
|
+
value: g,
|
|
1727
1726
|
allowNoDefault: !0,
|
|
1728
1727
|
allowCardDefault: !0,
|
|
1729
1728
|
previewControlDefinitions: a,
|
|
@@ -1732,7 +1731,7 @@ function Ka({
|
|
|
1732
1731
|
const D = a.map(
|
|
1733
1732
|
(L) => L.id === t.id ? { ...L, defaultValue: y } : L
|
|
1734
1733
|
);
|
|
1735
|
-
if (t.source.kind === "manual" && (
|
|
1734
|
+
if (t.source.kind === "manual" && (K.current[t.id] = y), s) {
|
|
1736
1735
|
const L = { ...s };
|
|
1737
1736
|
y === void 0 ? delete L[t.id] : L[t.id] = y, F(D, L);
|
|
1738
1737
|
return;
|
|
@@ -1742,12 +1741,12 @@ function Ka({
|
|
|
1742
1741
|
}
|
|
1743
1742
|
),
|
|
1744
1743
|
/* @__PURE__ */ f(
|
|
1745
|
-
|
|
1744
|
+
ea,
|
|
1746
1745
|
{
|
|
1747
|
-
open:
|
|
1746
|
+
open: Q === t.id,
|
|
1748
1747
|
onOpenChange: (y) => H(y ? t.id : null),
|
|
1749
1748
|
children: [
|
|
1750
|
-
/* @__PURE__ */ r(
|
|
1749
|
+
/* @__PURE__ */ r(ta, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1751
1750
|
q,
|
|
1752
1751
|
{
|
|
1753
1752
|
type: "button",
|
|
@@ -1755,20 +1754,20 @@ function Ka({
|
|
|
1755
1754
|
size: "xs",
|
|
1756
1755
|
className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
|
|
1757
1756
|
children: [
|
|
1758
|
-
|
|
1757
|
+
Q === t.id ? /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Ge, { className: "h-3.5 w-3.5" }),
|
|
1759
1758
|
"Advanced"
|
|
1760
1759
|
]
|
|
1761
1760
|
}
|
|
1762
1761
|
) }),
|
|
1763
|
-
/* @__PURE__ */ f(
|
|
1762
|
+
/* @__PURE__ */ f(aa, { className: "space-y-3 pt-2", children: [
|
|
1764
1763
|
/* @__PURE__ */ f("div", { className: "grid gap-3 md:grid-cols-2", children: [
|
|
1765
1764
|
/* @__PURE__ */ f("div", { className: "flex flex-col gap-1.5", children: [
|
|
1766
1765
|
/* @__PURE__ */ r(oe, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
|
|
1767
1766
|
/* @__PURE__ */ r(
|
|
1768
|
-
|
|
1767
|
+
ra,
|
|
1769
1768
|
{
|
|
1770
1769
|
controlId: t.id,
|
|
1771
|
-
onCommit: (y) =>
|
|
1770
|
+
onCommit: (y) => _(t.id, y)
|
|
1772
1771
|
},
|
|
1773
1772
|
t.id
|
|
1774
1773
|
)
|
|
@@ -1779,13 +1778,13 @@ function Ka({
|
|
|
1779
1778
|
we,
|
|
1780
1779
|
{
|
|
1781
1780
|
value: t.initialValueStrategy,
|
|
1782
|
-
onValueChange: (y) =>
|
|
1781
|
+
onValueChange: (y) => P(t.id, (D) => ({
|
|
1783
1782
|
...D,
|
|
1784
1783
|
initialValueStrategy: y
|
|
1785
1784
|
})),
|
|
1786
1785
|
children: [
|
|
1787
1786
|
/* @__PURE__ */ r(De, { size: "xs", children: /* @__PURE__ */ r(Ee, {}) }),
|
|
1788
|
-
/* @__PURE__ */ r(Ie, { children:
|
|
1787
|
+
/* @__PURE__ */ r(Ie, { children: Vt.map((y) => /* @__PURE__ */ r(
|
|
1789
1788
|
Te,
|
|
1790
1789
|
{
|
|
1791
1790
|
value: y.value,
|
|
@@ -1799,10 +1798,10 @@ function Ka({
|
|
|
1799
1798
|
] })
|
|
1800
1799
|
] }),
|
|
1801
1800
|
/* @__PURE__ */ r(
|
|
1802
|
-
|
|
1801
|
+
sa,
|
|
1803
1802
|
{
|
|
1804
1803
|
control: t,
|
|
1805
|
-
onChange: (y) =>
|
|
1804
|
+
onChange: (y) => P(t.id, () => y)
|
|
1806
1805
|
}
|
|
1807
1806
|
)
|
|
1808
1807
|
] })
|
|
@@ -1823,14 +1822,14 @@ function Ka({
|
|
|
1823
1822
|
size: "xs",
|
|
1824
1823
|
onClick: ue,
|
|
1825
1824
|
children: [
|
|
1826
|
-
/* @__PURE__ */ r(
|
|
1825
|
+
/* @__PURE__ */ r(na, { className: "h-3.5 w-3.5" }),
|
|
1827
1826
|
"Add control"
|
|
1828
1827
|
]
|
|
1829
1828
|
}
|
|
1830
1829
|
)
|
|
1831
1830
|
] });
|
|
1832
1831
|
}
|
|
1833
|
-
function
|
|
1832
|
+
function Pa(e) {
|
|
1834
1833
|
const {
|
|
1835
1834
|
open: a,
|
|
1836
1835
|
onOpenChange: n,
|
|
@@ -1838,18 +1837,18 @@ function Wa(e) {
|
|
|
1838
1837
|
dismissMode: l = "passive"
|
|
1839
1838
|
} = e, d = a !== void 0, [p, h] = W(!1), [u, v] = W(
|
|
1840
1839
|
s
|
|
1841
|
-
),
|
|
1840
|
+
), b = d ? a : p, m = U(
|
|
1842
1841
|
(S) => {
|
|
1843
1842
|
!S && u && l === "passive" || (d || h(S), S || v(!1), n == null || n(S));
|
|
1844
1843
|
},
|
|
1845
1844
|
[d, u, l, n]
|
|
1846
|
-
), x =
|
|
1845
|
+
), x = U(() => {
|
|
1847
1846
|
d || h(!1), v(!1), n == null || n(!1);
|
|
1848
1847
|
}, [d, n]);
|
|
1849
1848
|
ie(() => {
|
|
1850
|
-
|
|
1851
|
-
}, [
|
|
1852
|
-
const I =
|
|
1849
|
+
b || v(!1);
|
|
1850
|
+
}, [b]);
|
|
1851
|
+
const I = U(
|
|
1853
1852
|
(S) => {
|
|
1854
1853
|
u && S.preventDefault();
|
|
1855
1854
|
},
|
|
@@ -1860,18 +1859,18 @@ function Wa(e) {
|
|
|
1860
1859
|
handleOpenChange: m,
|
|
1861
1860
|
isCreateFlowActive: u,
|
|
1862
1861
|
preventPassiveDismissDuringCreate: I,
|
|
1863
|
-
resolvedOpen:
|
|
1862
|
+
resolvedOpen: b,
|
|
1864
1863
|
setIsCreateFlowActive: v
|
|
1865
1864
|
};
|
|
1866
1865
|
}
|
|
1867
1866
|
function Me(e) {
|
|
1868
1867
|
var a;
|
|
1869
1868
|
for (const n of e.cards)
|
|
1870
|
-
if (n.type === "matrixTable" && !
|
|
1869
|
+
if (n.type === "matrixTable" && !ia.safeParse((a = n.config) == null ? void 0 : a.matrix).success)
|
|
1871
1870
|
return j.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
|
|
1872
1871
|
return !0;
|
|
1873
1872
|
}
|
|
1874
|
-
function
|
|
1873
|
+
function Wa({
|
|
1875
1874
|
className: e,
|
|
1876
1875
|
variant: a = "outline"
|
|
1877
1876
|
}) {
|
|
@@ -1888,17 +1887,17 @@ function Ya({
|
|
|
1888
1887
|
size: "xs",
|
|
1889
1888
|
variant: a,
|
|
1890
1889
|
children: [
|
|
1891
|
-
/* @__PURE__ */ r(
|
|
1890
|
+
/* @__PURE__ */ r(Ot, { className: "h-3.5 w-3.5" }),
|
|
1892
1891
|
"Accept"
|
|
1893
1892
|
]
|
|
1894
1893
|
}
|
|
1895
1894
|
);
|
|
1896
1895
|
}
|
|
1897
|
-
function
|
|
1896
|
+
function Ya({
|
|
1898
1897
|
className: e,
|
|
1899
1898
|
variant: a = "default"
|
|
1900
1899
|
}) {
|
|
1901
|
-
const n = ce(), [s, l] = W(!1), { setIsVisualEditing: d } = Le(), { getUpdatedFrame: p } = qe(), h =
|
|
1900
|
+
const n = ce(), [s, l] = W(!1), { setIsVisualEditing: d } = Le(), { getUpdatedFrame: p } = qe(), h = _e(), u = M((m) => m.frame), v = ut();
|
|
1902
1901
|
return /* @__PURE__ */ r(
|
|
1903
1902
|
q,
|
|
1904
1903
|
{
|
|
@@ -1935,7 +1934,7 @@ function Ga({
|
|
|
1935
1934
|
size: "xs",
|
|
1936
1935
|
variant: a,
|
|
1937
1936
|
children: s ? /* @__PURE__ */ f(ee, { children: [
|
|
1938
|
-
/* @__PURE__ */ r(
|
|
1937
|
+
/* @__PURE__ */ r(lt, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1939
1938
|
"Saving"
|
|
1940
1939
|
] }) : /* @__PURE__ */ f(ee, { children: [
|
|
1941
1940
|
/* @__PURE__ */ r(pt, { className: "h-3.5 w-3.5" }),
|
|
@@ -1944,10 +1943,10 @@ function Ga({
|
|
|
1944
1943
|
}
|
|
1945
1944
|
);
|
|
1946
1945
|
}
|
|
1947
|
-
function
|
|
1946
|
+
function Ga({
|
|
1948
1947
|
className: e
|
|
1949
1948
|
}) {
|
|
1950
|
-
const a = ce(), [n, s] = W(!1), l =
|
|
1949
|
+
const a = ce(), [n, s] = W(!1), l = _e(), d = M((S) => S.frame), p = Z((S) => S.selectedSheetId), h = Z((S) => S.dashboard), { updateFrame: u, setIsVisualEditing: v } = Le(), { getUpdatedFrame: b } = qe(), m = ut(), x = la();
|
|
1951
1950
|
return /* @__PURE__ */ r(
|
|
1952
1951
|
q,
|
|
1953
1952
|
{
|
|
@@ -1963,7 +1962,7 @@ function Xa({
|
|
|
1963
1962
|
}
|
|
1964
1963
|
s(!0);
|
|
1965
1964
|
try {
|
|
1966
|
-
const N =
|
|
1965
|
+
const N = b();
|
|
1967
1966
|
if (!Me(N)) {
|
|
1968
1967
|
s(!1);
|
|
1969
1968
|
return;
|
|
@@ -1972,8 +1971,8 @@ function Xa({
|
|
|
1972
1971
|
...N,
|
|
1973
1972
|
visualId: S
|
|
1974
1973
|
// Keep the link to library visual
|
|
1975
|
-
},
|
|
1976
|
-
previousFrame:
|
|
1974
|
+
}, B = zt(h, V.id), G = await x(V, {
|
|
1975
|
+
previousFrame: B
|
|
1977
1976
|
});
|
|
1978
1977
|
await m.mutateAsync({
|
|
1979
1978
|
visualId: S,
|
|
@@ -1998,7 +1997,7 @@ function Xa({
|
|
|
1998
1997
|
variant: "default",
|
|
1999
1998
|
disabled: n,
|
|
2000
1999
|
children: n ? /* @__PURE__ */ f(ee, { children: [
|
|
2001
|
-
/* @__PURE__ */ r(
|
|
2000
|
+
/* @__PURE__ */ r(lt, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
2002
2001
|
"Saving..."
|
|
2003
2002
|
] }) : /* @__PURE__ */ f(ee, { children: [
|
|
2004
2003
|
/* @__PURE__ */ r(pt, { className: "h-3.5 w-3.5" }),
|
|
@@ -2007,9 +2006,9 @@ function Xa({
|
|
|
2007
2006
|
}
|
|
2008
2007
|
);
|
|
2009
2008
|
}
|
|
2010
|
-
function
|
|
2011
|
-
const { setTempQueryData: a, setSqlGen: n } = de(), s = ce(), l = M((m) => m.tempQueryData), d = M((m) => m.onClose), p = M((m) => m.card), h = ht(), u = $(() => h !== p.type ? { ...p, type: h } : p, [p, h]), { queryKey: v } =
|
|
2012
|
-
function
|
|
2009
|
+
function Xa({ className: e }) {
|
|
2010
|
+
const { setTempQueryData: a, setSqlGen: n } = de(), s = ce(), l = M((m) => m.tempQueryData), d = M((m) => m.onClose), p = M((m) => m.card), h = ht(), u = $(() => h !== p.type ? { ...p, type: h } : p, [p, h]), { queryKey: v } = it(u);
|
|
2011
|
+
function b() {
|
|
2013
2012
|
if (l) {
|
|
2014
2013
|
const { queryKey: m, queryData: x } = l;
|
|
2015
2014
|
m && x && s.setQueryData(m, x);
|
|
@@ -2019,7 +2018,7 @@ function Ja({ className: e }) {
|
|
|
2019
2018
|
return /* @__PURE__ */ f(
|
|
2020
2019
|
q,
|
|
2021
2020
|
{
|
|
2022
|
-
onClick:
|
|
2021
|
+
onClick: b,
|
|
2023
2022
|
className: e,
|
|
2024
2023
|
size: "xs",
|
|
2025
2024
|
variant: "outline",
|
|
@@ -2030,7 +2029,7 @@ function Ja({ className: e }) {
|
|
|
2030
2029
|
}
|
|
2031
2030
|
);
|
|
2032
2031
|
}
|
|
2033
|
-
function
|
|
2032
|
+
function Ja({
|
|
2034
2033
|
label: e = "Clear",
|
|
2035
2034
|
variant: a = "secondary",
|
|
2036
2035
|
className: n
|
|
@@ -2052,20 +2051,20 @@ function Za({
|
|
|
2052
2051
|
}
|
|
2053
2052
|
export {
|
|
2054
2053
|
Ka as C,
|
|
2055
|
-
|
|
2056
|
-
|
|
2054
|
+
Wa as E,
|
|
2055
|
+
Qa as F,
|
|
2057
2056
|
pa as L,
|
|
2058
|
-
|
|
2057
|
+
Ha as V,
|
|
2059
2058
|
qe as a,
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2059
|
+
Xa as b,
|
|
2060
|
+
Ya as c,
|
|
2061
|
+
Ga as d,
|
|
2063
2062
|
fa as e,
|
|
2064
2063
|
xa as f,
|
|
2065
|
-
|
|
2066
|
-
|
|
2064
|
+
Pa as g,
|
|
2065
|
+
$a as h,
|
|
2067
2066
|
wa as i,
|
|
2068
|
-
|
|
2069
|
-
|
|
2067
|
+
Ja as j,
|
|
2068
|
+
Ra as r,
|
|
2070
2069
|
ht as u
|
|
2071
2070
|
};
|