react-semaphor 0.1.561 → 0.1.562
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +452 -429
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{analytics-base-schemas-CB3oFAXk.js → analytics-base-schemas-BaIQrEzX.js} +139 -134
- package/dist/chunks/{assistant-chat-DiVHY3Hw.js → assistant-chat-R_yT8xH4.js} +104 -104
- package/dist/chunks/{bookmark-impact-CR09dpkn.js → bookmark-impact-D4Kl4amw.js} +2 -2
- package/dist/chunks/{bookmark-state-BusLpkb7.js → bookmark-state-CWeoGbrx.js} +25 -25
- package/dist/chunks/{braces-u8VorWJc.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-DDsIWJYT.js → comparison-window-caption-D1EUXzaR.js} +562 -437
- package/dist/chunks/{context-TUjw9eqr.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-BRdZBPqr.js → dashboard-Bp1y5oun.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CgvTLndW.js → dashboard-briefing-launcher-S5FB3aUW.js} +155 -154
- package/dist/chunks/{dashboard-controls-B4vfSzTF.js → dashboard-controls-CfC_6Ztn.js} +970 -968
- package/dist/chunks/{dashboard-json-Y3MF59g7.js → dashboard-json-gYZT7ZQY.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-DwjZcxj-.js → edit-dashboard-visual-u7OI_g8Q.js} +4636 -4681
- package/dist/chunks/{filter-reach-copy-bijwf_-b.js → filter-reach-copy-CvV7W5dd.js} +1470 -1101
- package/dist/chunks/{filter-value-text-DFnhwuEW.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/{global-date-filter-utils-BXgCpvQM.js → global-date-filter-utils-N1kcsOFE.js} +8997 -7417
- package/dist/chunks/{index-ClwbY3BL.js → index-CNGkfUp4.js} +91 -85
- package/dist/chunks/{layout-grid-CtvCBfOm.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-BklYgciR.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-pU51-JmY.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-CUorIB7Q.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Df5UgCGN.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-BSiGEXVC.js → matrix-operation-contract-DsLdFdSa.js} +339 -330
- package/dist/chunks/{metric-comparison-95aC0uEO.js → metric-comparison-Bnso1cm1.js} +2 -2
- package/dist/chunks/{model-change-B5wQhg5G.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-DTnMhipt.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Bo-86vwS.js → pivot-result-contract-expectations-B53jqszr.js} +5 -5
- package/dist/chunks/{pivot-result-identity-olvXJoB9.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-CGLVI40Q.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-C2YUIwKG.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
- package/dist/chunks/{report-runtime-context-DoIUr3MP.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-q_iiNXE1.js → resolve-dashboard-input-context-DaDrZGuA.js} +3455 -1744
- package/dist/chunks/{save-DH4RyrnG.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-8jqfI7hI.js → saved-dashboard-context-DFYBrE6O.js} +94 -95
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-CV7K4FI6.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-E2XWyibu.js → semaphor-ready-indicator-Cfuafnem.js} +37067 -38400
- package/dist/chunks/{shelf-drop-preview-context-C29EUzDp.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
- package/dist/chunks/{source-entity-resolution-BXI3nQ5Z.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-balDSHc7.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-CK8tvh4d.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-B77JsAzU.js → temporal-input-presentation-sk9gqLi6.js} +699 -741
- package/dist/chunks/{token-types-DhYH5YKb.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-Ufj8vjyn.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-9WsnzEO5.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
- package/dist/chunks/{validators-BtaCFIEB.js → validators-BIM0FE31.js} +764 -885
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2278 -3030
- package/dist/data-app-sdk/index.js +43 -43
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +22 -22
- package/dist/format-utils/index.js +215 -209
- package/dist/index.js +225 -224
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
- package/dist/types/components/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +5 -5
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
- package/dist/types/lib/print/print-inputs.d.ts +2 -1
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/lib/types/explorer-types.d.ts +7 -1
- package/dist/types/lib/types/interaction-types.d.ts +3 -1
- package/dist/types/lib/types/token-types.d.ts +0 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +3 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
- package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3230 -4658
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +24 -2
- package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +27 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +8 -6
- package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +52 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +13 -1
- package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
- package/dist/types/shared/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +2 -7
- package/dist/types/shared/temporal/index.d.ts +1 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
- package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
- package/package.json +1 -1
- package/dist/chunks/custom-visual-inputs-DfolidZ9.js +0 -292
- package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +0 -1718
- package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
- package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
- package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
- package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
- package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
- package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { toSemaphorInputSnapshots as ce, toSemaphorInputBinding as le, toSemaphorSelectionSnapshots as de, toSemaphorActiveInputSnapshots as q, toSemaphorMatrixIntent as fe, toSemaphorSqlIntent as me, toSemaphorInputOptionsIntent as pe, toSemaphorRecordsIntent as ye, toSemaphorAnalysisQueryOptions as he, toSemaphorAnalysisIntent as ve, toSemaphorMetricIntent as ge, hasSemaphorInputValue as b, normalizeSemaphorInputOptions as
|
|
1
|
+
import { toSemaphorInputSnapshots as ce, toSemaphorInputBinding as le, toSemaphorSelectionSnapshots as de, toSemaphorActiveInputSnapshots as q, toSemaphorMatrixIntent as fe, toSemaphorSqlIntent as me, toSemaphorInputOptionsIntent as pe, toSemaphorRecordsIntent as ye, toSemaphorAnalysisQueryOptions as he, toSemaphorAnalysisIntent as ve, toSemaphorMetricIntent as ge, hasSemaphorInputValue as b, normalizeSemaphorInputOptions as G, toSemaphorInputSpec as Z } from "../data-app-sdk-adapters/index.js";
|
|
2
2
|
import { j as Se } from "../chunks/index-CuHybtft.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as Tt,
|
|
5
|
-
import {
|
|
6
|
-
import "../chunks/analytics-base-schemas-
|
|
3
|
+
import { J as qe, K as x, s as Ie } from "../chunks/validators-BIM0FE31.js";
|
|
4
|
+
import { a as Tt, aD as Nt } from "../chunks/validators-BIM0FE31.js";
|
|
5
|
+
import { m as Ae, ao as we, an as be, A as F, S as W, I as ke } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
|
|
6
|
+
import "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
7
7
|
import "zod";
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { r as J } from "../chunks/selection-reducer-
|
|
8
|
+
import { createContext as Ke, useContext as Ee, useMemo as h, useEffect as M, useState as _, useCallback as S, useRef as D } from "react";
|
|
9
|
+
import { r as J } from "../chunks/selection-reducer-Bz5aywT4.js";
|
|
10
10
|
import { jsx as De } from "react/jsx-runtime";
|
|
11
|
-
function
|
|
11
|
+
function E(e, t, r) {
|
|
12
12
|
return {
|
|
13
13
|
...r,
|
|
14
14
|
name: e,
|
|
@@ -21,7 +21,7 @@ function bt(e) {
|
|
|
21
21
|
function kt(e) {
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const Kt = {
|
|
25
25
|
source: {
|
|
26
26
|
semantic(e) {
|
|
27
27
|
return {
|
|
@@ -38,16 +38,16 @@ const Et = {
|
|
|
38
38
|
},
|
|
39
39
|
field: {
|
|
40
40
|
measure(e, t = {}) {
|
|
41
|
-
return
|
|
41
|
+
return E(e, "measure", t);
|
|
42
42
|
},
|
|
43
43
|
dimension(e, t = {}) {
|
|
44
|
-
return
|
|
44
|
+
return E(e, "dimension", t);
|
|
45
45
|
},
|
|
46
46
|
date(e, t = {}) {
|
|
47
|
-
return
|
|
47
|
+
return E(e, "date", t);
|
|
48
48
|
},
|
|
49
49
|
id(e, t = {}) {
|
|
50
|
-
return
|
|
50
|
+
return E(e, "id", t);
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
filter(e) {
|
|
@@ -151,7 +151,7 @@ const Et = {
|
|
|
151
151
|
"largestPositiveChanges",
|
|
152
152
|
"largestNegativeDrivers",
|
|
153
153
|
"largestPositiveDrivers"
|
|
154
|
-
],
|
|
154
|
+
], xe = [
|
|
155
155
|
"primary",
|
|
156
156
|
"records",
|
|
157
157
|
"periodChanges",
|
|
@@ -169,7 +169,7 @@ const Et = {
|
|
|
169
169
|
function ee(e) {
|
|
170
170
|
if (!e)
|
|
171
171
|
return {};
|
|
172
|
-
const t = Ne(e.executionResult), r =
|
|
172
|
+
const t = Ne(e.executionResult), r = _e(e, t), n = Re(r), s = te(
|
|
173
173
|
L(e.analysisWarnings),
|
|
174
174
|
Me(r)
|
|
175
175
|
);
|
|
@@ -184,7 +184,7 @@ function ee(e) {
|
|
|
184
184
|
} : {}
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function _e(e, t) {
|
|
188
188
|
const r = $e(e.resultSets);
|
|
189
189
|
for (const s of Oe) {
|
|
190
190
|
if (r[s])
|
|
@@ -237,7 +237,7 @@ function Ce(e, t = e.id || e.role || "resultSet") {
|
|
|
237
237
|
}
|
|
238
238
|
function Re(e) {
|
|
239
239
|
var t;
|
|
240
|
-
for (const r of
|
|
240
|
+
for (const r of xe)
|
|
241
241
|
if ((t = e[r]) != null && t.records.length)
|
|
242
242
|
return e[r];
|
|
243
243
|
return Object.values(e).find((r) => r.records.length) || Object.values(e)[0];
|
|
@@ -603,7 +603,7 @@ function A(e, t = e.kind) {
|
|
|
603
603
|
}
|
|
604
604
|
function re(e, t, r) {
|
|
605
605
|
return {
|
|
606
|
-
...
|
|
606
|
+
...x(e) ? { intentId: x(e) } : {},
|
|
607
607
|
...e ? { intent: e } : {},
|
|
608
608
|
status: "failed",
|
|
609
609
|
resultShape: t,
|
|
@@ -648,7 +648,7 @@ function f(e, t, r, n) {
|
|
|
648
648
|
error: r == null ? void 0 : r.message
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function Xe() {
|
|
652
652
|
return {
|
|
653
653
|
executeAnalysis: (e, t, r) => w(
|
|
654
654
|
e,
|
|
@@ -661,7 +661,7 @@ function Ge() {
|
|
|
661
661
|
executeSql: (e, t) => w(e, t),
|
|
662
662
|
executeMatrix: async (e, t) => {
|
|
663
663
|
var n, s;
|
|
664
|
-
const r = await
|
|
664
|
+
const r = await Ge(e, t);
|
|
665
665
|
if (r.status === "failed")
|
|
666
666
|
throw ie(
|
|
667
667
|
((n = r.metadata.matrixFailure) == null ? void 0 : n.message) ?? "Matrix execution failed.",
|
|
@@ -709,7 +709,7 @@ function ne(e, t, r) {
|
|
|
709
709
|
body: JSON.stringify(e)
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
async function
|
|
712
|
+
async function Ge(e, t, r) {
|
|
713
713
|
const n = we.parse(e), s = await ne({
|
|
714
714
|
...n,
|
|
715
715
|
activeInputs: t.activeInputs,
|
|
@@ -736,7 +736,7 @@ function Ze(e) {
|
|
|
736
736
|
function et(e, t) {
|
|
737
737
|
return [
|
|
738
738
|
`Semaphor ${e.kind} query`,
|
|
739
|
-
|
|
739
|
+
x(e) ? `id=${x(e)}` : void 0,
|
|
740
740
|
"label" in e && e.label ? `label=${e.label}` : void 0,
|
|
741
741
|
tt(e),
|
|
742
742
|
`endpoint=${rt(t)}`
|
|
@@ -807,17 +807,17 @@ function it(e) {
|
|
|
807
807
|
return "";
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
const ae =
|
|
810
|
+
const ae = Ke({});
|
|
811
811
|
function st() {
|
|
812
812
|
if (!(typeof window > "u"))
|
|
813
813
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
814
814
|
}
|
|
815
815
|
function ot() {
|
|
816
|
-
return
|
|
816
|
+
return Ee(ae);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
const [t, r] =
|
|
820
|
-
() =>
|
|
818
|
+
function Et(e) {
|
|
819
|
+
const [t, r] = _(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), s = n ? e.value : t, o = h(
|
|
820
|
+
() => G(e.options),
|
|
821
821
|
[e.options]
|
|
822
822
|
), a = S(
|
|
823
823
|
(u) => {
|
|
@@ -857,7 +857,7 @@ function Kt(e) {
|
|
|
857
857
|
}, [c, o, a, e, s]);
|
|
858
858
|
}
|
|
859
859
|
function Dt(e) {
|
|
860
|
-
const [t, r] =
|
|
860
|
+
const [t, r] = _(() => pt(e));
|
|
861
861
|
return M(() => {
|
|
862
862
|
r((n) => {
|
|
863
863
|
let s = n;
|
|
@@ -870,7 +870,7 @@ function Dt(e) {
|
|
|
870
870
|
const s = Object.prototype.hasOwnProperty.call(
|
|
871
871
|
n,
|
|
872
872
|
"value"
|
|
873
|
-
), o = s ? n.value : t[n.id], a =
|
|
873
|
+
), o = s ? n.value : t[n.id], a = G(n.options), c = (i) => {
|
|
874
874
|
var l;
|
|
875
875
|
(l = n.onValueChange) == null || l.call(n, i), s || r((m) => ({
|
|
876
876
|
...m,
|
|
@@ -928,7 +928,7 @@ function ut(e) {
|
|
|
928
928
|
function Y(e) {
|
|
929
929
|
return `${typeof e}:${String(e)}`;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function xt(e, t = {}) {
|
|
932
932
|
const r = h(
|
|
933
933
|
() => t.inputs ? {
|
|
934
934
|
...e,
|
|
@@ -990,7 +990,7 @@ function _t(e, t = {}) {
|
|
|
990
990
|
}
|
|
991
991
|
})(), [r, t.selections]), s = S(
|
|
992
992
|
(i) => {
|
|
993
|
-
var m, p, B, z, U, k, H,
|
|
993
|
+
var m, p, B, z, U, k, H, K, Q;
|
|
994
994
|
const l = n.request;
|
|
995
995
|
if (l.intent)
|
|
996
996
|
switch (n.queryKind) {
|
|
@@ -1024,8 +1024,8 @@ function _t(e, t = {}) {
|
|
|
1024
1024
|
);
|
|
1025
1025
|
case "matrix":
|
|
1026
1026
|
if (!l.matrixWindowRequest) throw new Error("Matrix window request is required.");
|
|
1027
|
-
return (Q = (
|
|
1028
|
-
|
|
1027
|
+
return (Q = (K = i.executor) == null ? void 0 : K.executeMatrix) == null ? void 0 : Q.call(
|
|
1028
|
+
K,
|
|
1029
1029
|
{ intent: l.intent, matrixWindowRequest: l.matrixWindowRequest },
|
|
1030
1030
|
i
|
|
1031
1031
|
);
|
|
@@ -1246,7 +1246,7 @@ function y(e) {
|
|
|
1246
1246
|
return Array.isArray(e) && e.length > 0;
|
|
1247
1247
|
}
|
|
1248
1248
|
function mt(e, t, r, n, s) {
|
|
1249
|
-
const o = ot(), a = D(t), c = D(n), u = D(s), [d, i] =
|
|
1249
|
+
const o = ot(), a = D(t), c = D(n), u = D(s), [d, i] = _({
|
|
1250
1250
|
status: "idle",
|
|
1251
1251
|
data: r,
|
|
1252
1252
|
error: null,
|
|
@@ -1301,8 +1301,8 @@ function pt(e) {
|
|
|
1301
1301
|
function O(e) {
|
|
1302
1302
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
const [t, r] =
|
|
1304
|
+
function _t(e) {
|
|
1305
|
+
const [t, r] = _(() => X(e, e.defaultTuples || [])), n = Object.prototype.hasOwnProperty.call(e, "tuples"), s = X(
|
|
1306
1306
|
e,
|
|
1307
1307
|
n ? e.tuples || [] : t
|
|
1308
1308
|
), o = D(s);
|
|
@@ -1352,7 +1352,7 @@ function xt(e) {
|
|
|
1352
1352
|
[u, c, e.fields, e.id, e.label, s]
|
|
1353
1353
|
);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function X(e, t) {
|
|
1356
1356
|
if (e.fields.length === 0)
|
|
1357
1357
|
throw new Error(`Semaphor selection "${e.id}" requires at least one field.`);
|
|
1358
1358
|
if (t.length > W)
|
|
@@ -1384,7 +1384,7 @@ function $t({
|
|
|
1384
1384
|
children: s
|
|
1385
1385
|
}) {
|
|
1386
1386
|
var m;
|
|
1387
|
-
const o = st(), a = ((m = o == null ? void 0 : o.authToken) == null ? void 0 : m.accessToken) || e, c = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || t, u = (o == null ? void 0 : o.debug) ?? n, d = h(() =>
|
|
1387
|
+
const o = st(), a = ((m = o == null ? void 0 : o.authToken) == null ? void 0 : m.accessToken) || e, c = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || t, u = (o == null ? void 0 : o.debug) ?? n, d = h(() => Xe(), []), i = r || d, l = h(
|
|
1388
1388
|
() => ({
|
|
1389
1389
|
token: a,
|
|
1390
1390
|
apiBaseUrl: c,
|
|
@@ -1397,16 +1397,16 @@ function $t({
|
|
|
1397
1397
|
}
|
|
1398
1398
|
export {
|
|
1399
1399
|
$t as SemaphorDataAppProvider,
|
|
1400
|
-
|
|
1400
|
+
Xe as createSemaphorQueryExecutor,
|
|
1401
1401
|
bt as defineSemaphorDataApp,
|
|
1402
1402
|
kt as defineSemaphorInput,
|
|
1403
1403
|
at as isSemaphorInputValueValidForOptions,
|
|
1404
|
-
|
|
1404
|
+
Kt as semaphor,
|
|
1405
1405
|
Tt as semaphorMetricAggregate,
|
|
1406
1406
|
Nt as semaphorMetricMeasureBindingKey,
|
|
1407
1407
|
Ot as useClearInvalidSemaphorInputValue,
|
|
1408
|
-
|
|
1408
|
+
Et as useSemaphorInput,
|
|
1409
1409
|
Dt as useSemaphorInputs,
|
|
1410
|
-
|
|
1411
|
-
|
|
1410
|
+
xt as useSemaphorQuery,
|
|
1411
|
+
_t as useSemaphorSelection
|
|
1412
1412
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as y } from "../chunks/operators-B3zZoskU.js";
|
|
2
|
-
import { m as v, s as m, p as I, a as S } from "../chunks/validators-
|
|
3
|
-
import { a as F, c as b } from "../chunks/matrix-operation-contract-
|
|
4
|
-
import "../chunks/analytics-base-schemas-
|
|
2
|
+
import { m as v, s as m, p as I, a as S } from "../chunks/validators-BIM0FE31.js";
|
|
3
|
+
import { a as F, c as b } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
|
|
4
|
+
import "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
5
5
|
import "zod";
|
|
6
6
|
function w(i) {
|
|
7
7
|
var n, r, o;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../chunks/analytics-base-schemas-
|
|
1
|
+
import { G as b, H as N, s as O, I as v, q as E, J as K, K as l } from "../chunks/validators-BIM0FE31.js";
|
|
2
|
+
import { m as Q } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
|
|
3
|
+
import "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
4
4
|
import "zod";
|
|
5
|
-
import { p as W } from "../chunks/report-runtime-context-
|
|
6
|
-
import {
|
|
7
|
-
import { toSemaphorMetricIntent as
|
|
8
|
-
import { m as Z } from "../chunks/matrix-card-
|
|
5
|
+
import { p as W } from "../chunks/report-runtime-context-BITkNSDa.js";
|
|
6
|
+
import { r as J } from "../chunks/source-entity-resolution-DdDVXFB8.js";
|
|
7
|
+
import { toSemaphorMetricIntent as U, toSemaphorAnalysisIntent as G, toSemaphorRecordsIntent as V, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
|
|
8
|
+
import { m as Z } from "../chunks/matrix-card-CCh9JjP1.js";
|
|
9
9
|
function ee({
|
|
10
10
|
intent: e,
|
|
11
11
|
field: r,
|
|
@@ -22,7 +22,7 @@ function ee({
|
|
|
22
22
|
const n = q(
|
|
23
23
|
r,
|
|
24
24
|
i.selectedField
|
|
25
|
-
), s =
|
|
25
|
+
), s = H(t), c = y(n);
|
|
26
26
|
return re(
|
|
27
27
|
s,
|
|
28
28
|
i.allowedRelatedRoles
|
|
@@ -31,7 +31,7 @@ function ee({
|
|
|
31
31
|
function Ne(e) {
|
|
32
32
|
return e.kind === "records" ? ae(e) : e.kind === "metric" ? ne(e) : [];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function H(e) {
|
|
35
35
|
const r = b(e.role);
|
|
36
36
|
if (r === "measure")
|
|
37
37
|
return "measure";
|
|
@@ -107,7 +107,7 @@ function ie(e, r, t) {
|
|
|
107
107
|
function ae(e) {
|
|
108
108
|
var o, i;
|
|
109
109
|
const r = w(e), t = (o = e.orderBy) != null && o.field ? I(r, e.orderBy.field) : void 0;
|
|
110
|
-
return
|
|
110
|
+
return P([
|
|
111
111
|
...r.map(
|
|
112
112
|
(n) => p(
|
|
113
113
|
n,
|
|
@@ -135,7 +135,7 @@ function ne(e) {
|
|
|
135
135
|
e.dimensions || [],
|
|
136
136
|
e.orderBy.field
|
|
137
137
|
) : void 0;
|
|
138
|
-
return
|
|
138
|
+
return P([
|
|
139
139
|
...e.measures.map((i) => p(i, [])),
|
|
140
140
|
...e.primaryMeasure ? [p(e.primaryMeasure, [])] : [],
|
|
141
141
|
...(e.dimensions || []).map(
|
|
@@ -168,7 +168,7 @@ function p(e, r, t = {}) {
|
|
|
168
168
|
...t
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function P(e) {
|
|
172
172
|
const r = [];
|
|
173
173
|
return e.forEach((t) => {
|
|
174
174
|
r.some(
|
|
@@ -198,7 +198,7 @@ function de(e, r) {
|
|
|
198
198
|
return !!(e && (!r || e === r));
|
|
199
199
|
}
|
|
200
200
|
function y(e) {
|
|
201
|
-
return
|
|
201
|
+
return H(e);
|
|
202
202
|
}
|
|
203
203
|
function j({
|
|
204
204
|
intent: e,
|
|
@@ -342,7 +342,7 @@ function fe(e) {
|
|
|
342
342
|
)
|
|
343
343
|
);
|
|
344
344
|
else {
|
|
345
|
-
const d =
|
|
345
|
+
const d = J({
|
|
346
346
|
entities: i,
|
|
347
347
|
semanticDomainId: t.kind === "semantic" ? t.domainId : void 0,
|
|
348
348
|
connectionId: t.connectionId,
|
|
@@ -450,7 +450,7 @@ function Oe(e) {
|
|
|
450
450
|
function pe(e, r, t) {
|
|
451
451
|
const o = `queries.${r}`;
|
|
452
452
|
try {
|
|
453
|
-
const i = ge(e), n =
|
|
453
|
+
const i = ge(e), n = Pe(e, i), s = K(i), c = [
|
|
454
454
|
...Re({
|
|
455
455
|
querySpec: e,
|
|
456
456
|
queryId: n,
|
|
@@ -490,7 +490,7 @@ function pe(e, r, t) {
|
|
|
490
490
|
pathPrefix: o,
|
|
491
491
|
validateTimezone: t.validateTimezone
|
|
492
492
|
})
|
|
493
|
-
], a =
|
|
493
|
+
], a = He(s, c);
|
|
494
494
|
return {
|
|
495
495
|
queryHook: e.queryHook,
|
|
496
496
|
queryId: n,
|
|
@@ -573,11 +573,11 @@ function ve(e) {
|
|
|
573
573
|
if (!M(e))
|
|
574
574
|
throw new Error("useSemaphorQuery spec must be an object.");
|
|
575
575
|
if (e.queryKind === "metric")
|
|
576
|
-
return
|
|
576
|
+
return U(e);
|
|
577
577
|
if (e.queryKind === "analysis")
|
|
578
|
-
return V(e);
|
|
579
|
-
if (e.queryKind === "records")
|
|
580
578
|
return G(e);
|
|
579
|
+
if (e.queryKind === "records")
|
|
580
|
+
return V(e);
|
|
581
581
|
if (e.queryKind === "sql")
|
|
582
582
|
return L(e);
|
|
583
583
|
if (e.queryKind === "matrix")
|
|
@@ -924,7 +924,7 @@ function _(e, r) {
|
|
|
924
924
|
source: r.intent.source
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function He(e, r) {
|
|
928
928
|
const t = D(r);
|
|
929
929
|
return {
|
|
930
930
|
ok: t.ok && e.ok,
|
|
@@ -1011,7 +1011,7 @@ function x(e) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function Pe(e, r) {
|
|
1015
1015
|
return l(r) || z(e.spec);
|
|
1016
1016
|
}
|
|
1017
1017
|
function z(e) {
|
|
@@ -1025,7 +1025,7 @@ export {
|
|
|
1025
1025
|
I as findMatchingRelatedProjectionField,
|
|
1026
1026
|
re as isAllowedRelatedProjectionRole,
|
|
1027
1027
|
me as normalizeSemaphorAnalysisQueryOptions,
|
|
1028
|
-
|
|
1028
|
+
H as normalizeSemaphorFieldRole,
|
|
1029
1029
|
Ne as relatedProjectionFieldCandidatesForIntent,
|
|
1030
1030
|
Oe as validateSemaphorDataAppQuerySpecs
|
|
1031
1031
|
};
|