react-semaphor 0.1.368 → 0.1.369
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.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +24 -23
- package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
- package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
- package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
- package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
- package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
- package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
- package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
- package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
- package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
- package/dist/chunks/index-BtqYNH_S.js +1361 -0
- package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
- package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
- package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
- package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
- package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
- package/dist/chunks/save-D3YYinDz.js +6 -0
- package/dist/chunks/save-kkBEBeLg.js +21 -0
- package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
- package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
- package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
- package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
- package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
- package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
- package/dist/chunks/validation-Dsf7PydY.js +1 -0
- package/dist/chunks/validation-nOPr0mTk.js +803 -0
- package/dist/chunks/{validators-L0xEXtjf.js → validators-CVuWOHYv.js} +225 -158
- package/dist/chunks/validators-oc8qtP4q.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +51 -1
- package/dist/data-app-builder/index.js +3666 -2
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +589 -388
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +21 -1
- package/dist/types/dashboard-assistant.d.ts +21 -1
- package/dist/types/dashboard-authoring.d.ts +11 -1
- package/dist/types/data-app-builder.d.ts +11 -1
- package/dist/types/data-app-sdk-validation.d.ts +107 -23
- package/dist/types/data-app-sdk.d.ts +168 -35
- package/dist/types/main.d.ts +11 -1
- package/package.json +1 -1
- package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
- package/dist/chunks/index-HjDeEytV.js +0 -1411
- package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
- package/dist/chunks/validation-CrUjNWby.js +0 -689
- package/dist/chunks/validation-DGl8wnTt.js +0 -1
- package/dist/chunks/validators-Dq5X4mp0.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { j as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { v as
|
|
7
|
-
const
|
|
1
|
+
import { t as g, a as U, b as z, c as L, d as B, e as Q, f as M, n as P, g as T, h as A } from "../chunks/validation-nOPr0mTk.js";
|
|
2
|
+
import { l as Ve, i as $e, j as Ne, k as Ue, v as ze } from "../chunks/validation-nOPr0mTk.js";
|
|
3
|
+
import { j as J } from "../chunks/index-CuHybtft.js";
|
|
4
|
+
import { createContext as Y, useContext as H, useMemo as p, useState as R, useCallback as O, useEffect as j, useRef as _ } from "react";
|
|
5
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
6
|
+
import { v as F } from "../chunks/validators-CVuWOHYv.js";
|
|
7
|
+
const G = [
|
|
8
8
|
"records",
|
|
9
9
|
"changes",
|
|
10
10
|
"drivers",
|
|
@@ -12,7 +12,7 @@ const z = [
|
|
|
12
12
|
"largestPositiveChanges",
|
|
13
13
|
"largestNegativeDrivers",
|
|
14
14
|
"largestPositiveDrivers"
|
|
15
|
-
],
|
|
15
|
+
], X = [
|
|
16
16
|
"records",
|
|
17
17
|
"changes",
|
|
18
18
|
"drivers",
|
|
@@ -21,542 +21,743 @@ const z = [
|
|
|
21
21
|
"largestNegativeDrivers",
|
|
22
22
|
"largestPositiveDrivers"
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
if (!t)
|
|
24
|
+
function V(e) {
|
|
25
|
+
if (!e)
|
|
27
26
|
return {};
|
|
28
|
-
const
|
|
27
|
+
const t = ne(e.executionResult), n = Z(e, t), r = te(n);
|
|
29
28
|
return {
|
|
30
|
-
...
|
|
29
|
+
...e,
|
|
31
30
|
...Object.keys(n).length ? { resultSets: n } : {},
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
...r ? {
|
|
32
|
+
columns: r.columns,
|
|
33
|
+
records: r.records,
|
|
34
|
+
rowCount: r.rowCount
|
|
35
|
+
} : {}
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
const n =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (n[r]) {
|
|
43
|
-
n[r] = Q(n[r]);
|
|
38
|
+
function Z(e, t) {
|
|
39
|
+
const n = ee(e.resultSets);
|
|
40
|
+
for (const i of G) {
|
|
41
|
+
if (n[i]) {
|
|
42
|
+
n[i] = $(n[i]);
|
|
44
43
|
continue;
|
|
45
44
|
}
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
45
|
+
const u = oe(e[i]);
|
|
46
|
+
if (!u.length)
|
|
48
47
|
continue;
|
|
49
|
-
const
|
|
50
|
-
n[
|
|
51
|
-
records:
|
|
52
|
-
columns:
|
|
53
|
-
rowCount:
|
|
48
|
+
const s = t.length ? t : ie(u);
|
|
49
|
+
n[i] = {
|
|
50
|
+
records: b(u, s),
|
|
51
|
+
columns: s,
|
|
52
|
+
rowCount: u.length
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
|
-
const
|
|
57
|
-
return
|
|
55
|
+
const r = re(e.executionResult);
|
|
56
|
+
return r && r.records.length > 0 && !n.records && (n.records = r), n;
|
|
58
57
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
58
|
+
function ee(e) {
|
|
59
|
+
return Object.fromEntries(
|
|
60
|
+
Object.entries(e || {}).map(([t, n]) => [
|
|
61
|
+
t,
|
|
62
|
+
$(n)
|
|
63
|
+
])
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function $(e) {
|
|
67
|
+
var t;
|
|
61
68
|
return {
|
|
62
|
-
...
|
|
63
|
-
records:
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
...e,
|
|
70
|
+
records: b(
|
|
71
|
+
e.records || [],
|
|
72
|
+
e.columns || []
|
|
66
73
|
),
|
|
67
|
-
rowCount:
|
|
74
|
+
rowCount: e.rowCount ?? ((t = e.records) == null ? void 0 : t.length) ?? 0
|
|
68
75
|
};
|
|
69
76
|
}
|
|
70
|
-
function
|
|
71
|
-
var
|
|
72
|
-
for (const n of
|
|
73
|
-
if ((
|
|
74
|
-
return
|
|
75
|
-
return Object.values(
|
|
77
|
+
function te(e) {
|
|
78
|
+
var t;
|
|
79
|
+
for (const n of X)
|
|
80
|
+
if ((t = e[n]) != null && t.records.length)
|
|
81
|
+
return e[n];
|
|
82
|
+
return Object.values(e).find((n) => n.records.length) || Object.values(e)[0];
|
|
76
83
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
if (!(!
|
|
84
|
+
function re(e) {
|
|
85
|
+
const t = e == null ? void 0 : e.result;
|
|
86
|
+
if (!(!t || t.kind !== "records" && t.kind !== "sql"))
|
|
80
87
|
return {
|
|
81
|
-
records:
|
|
82
|
-
columns:
|
|
83
|
-
rowCount:
|
|
88
|
+
records: b(t.records, t.columns),
|
|
89
|
+
columns: t.columns,
|
|
90
|
+
rowCount: t.rowCount ?? t.records.length
|
|
84
91
|
};
|
|
85
92
|
}
|
|
86
|
-
function
|
|
87
|
-
const
|
|
88
|
-
return !
|
|
93
|
+
function ne(e) {
|
|
94
|
+
const t = e == null ? void 0 : e.result;
|
|
95
|
+
return !t || t.kind !== "records" && t.kind !== "sql" ? [] : t.columns;
|
|
89
96
|
}
|
|
90
|
-
function
|
|
91
|
-
return Array.isArray(
|
|
92
|
-
(
|
|
97
|
+
function oe(e) {
|
|
98
|
+
return Array.isArray(e) ? e.filter(
|
|
99
|
+
(t) => !!(t && typeof t == "object" && !Array.isArray(t))
|
|
93
100
|
) : [];
|
|
94
101
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
97
|
-
const
|
|
98
|
-
return
|
|
99
|
-
const
|
|
100
|
-
name:
|
|
101
|
-
label:
|
|
102
|
-
fallbackNames: [
|
|
102
|
+
function b(e, t) {
|
|
103
|
+
return t.length ? e.map((n) => {
|
|
104
|
+
const r = {};
|
|
105
|
+
return t.forEach((i, u) => {
|
|
106
|
+
const s = ue(n, {
|
|
107
|
+
name: i.key,
|
|
108
|
+
label: i.label,
|
|
109
|
+
fallbackNames: [i.name, Object.keys(n)[u]]
|
|
103
110
|
});
|
|
104
|
-
|
|
105
|
-
}), Object.keys(
|
|
106
|
-
}) :
|
|
111
|
+
s !== void 0 && (r[i.key] = s);
|
|
112
|
+
}), Object.keys(r).length ? r : n;
|
|
113
|
+
}) : e;
|
|
107
114
|
}
|
|
108
|
-
function
|
|
115
|
+
function ie(e) {
|
|
109
116
|
return Array.from(
|
|
110
|
-
new Set(
|
|
117
|
+
new Set(e.flatMap((n) => Object.keys(n)))
|
|
111
118
|
).map((n) => ({
|
|
112
119
|
key: n,
|
|
113
120
|
name: n,
|
|
114
121
|
label: n
|
|
115
122
|
}));
|
|
116
123
|
}
|
|
117
|
-
function
|
|
124
|
+
function ue(e, t) {
|
|
118
125
|
const n = [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
...
|
|
122
|
-
].filter((
|
|
123
|
-
for (const
|
|
124
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
125
|
-
return
|
|
126
|
-
}
|
|
127
|
-
function
|
|
126
|
+
t.name,
|
|
127
|
+
t.label,
|
|
128
|
+
...t.fallbackNames || []
|
|
129
|
+
].filter((r) => !!r);
|
|
130
|
+
for (const r of n)
|
|
131
|
+
if (Object.prototype.hasOwnProperty.call(e, r))
|
|
132
|
+
return e[r];
|
|
133
|
+
}
|
|
134
|
+
function be(e) {
|
|
135
|
+
return e;
|
|
136
|
+
}
|
|
137
|
+
function Ke(e) {
|
|
138
|
+
return e;
|
|
139
|
+
}
|
|
140
|
+
const xe = {
|
|
141
|
+
filter(e) {
|
|
142
|
+
return {
|
|
143
|
+
...e,
|
|
144
|
+
kind: "filter"
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
control(e) {
|
|
148
|
+
return {
|
|
149
|
+
...e,
|
|
150
|
+
kind: "control"
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
sqlParam(e) {
|
|
154
|
+
return {
|
|
155
|
+
...e,
|
|
156
|
+
kind: "control",
|
|
157
|
+
role: "sqlParam"
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
metric(e) {
|
|
161
|
+
return {
|
|
162
|
+
...e,
|
|
163
|
+
queryKind: "metric"
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
analysis(e) {
|
|
167
|
+
return {
|
|
168
|
+
...e,
|
|
169
|
+
queryKind: "analysis"
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
records(e) {
|
|
173
|
+
return {
|
|
174
|
+
...e,
|
|
175
|
+
queryKind: "records"
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
inputOptions(e) {
|
|
179
|
+
return {
|
|
180
|
+
...e,
|
|
181
|
+
queryKind: "inputOptions"
|
|
182
|
+
};
|
|
183
|
+
},
|
|
184
|
+
sql(e) {
|
|
185
|
+
return {
|
|
186
|
+
...e,
|
|
187
|
+
queryKind: "sql"
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
function se() {
|
|
128
192
|
return {
|
|
129
|
-
executeAnalysis: (
|
|
130
|
-
t,
|
|
193
|
+
executeAnalysis: (e, t, n) => h(
|
|
131
194
|
e,
|
|
195
|
+
t,
|
|
132
196
|
n ?? {}
|
|
133
|
-
).then(
|
|
134
|
-
executeMetric: (
|
|
135
|
-
executeRecords: (
|
|
136
|
-
executeInputOptions: (
|
|
197
|
+
).then(V),
|
|
198
|
+
executeMetric: (e, t) => h(e, t),
|
|
199
|
+
executeRecords: (e, t) => h(e, t),
|
|
200
|
+
executeInputOptions: (e, t) => h(e, t),
|
|
201
|
+
executeSql: (e, t) => h(e, t)
|
|
137
202
|
};
|
|
138
203
|
}
|
|
139
|
-
async function h(
|
|
140
|
-
if (!
|
|
204
|
+
async function h(e, t, n) {
|
|
205
|
+
if (!t.token)
|
|
141
206
|
throw new Error("SemaphorDataAppProvider needs a token to execute queries.");
|
|
142
|
-
const
|
|
207
|
+
const r = await fetch(le(t), {
|
|
143
208
|
method: "POST",
|
|
144
209
|
headers: {
|
|
145
210
|
"Content-Type": "application/json",
|
|
146
|
-
Authorization: `Bearer ${
|
|
211
|
+
Authorization: `Bearer ${t.token}`
|
|
147
212
|
},
|
|
148
213
|
body: JSON.stringify({
|
|
149
|
-
intent:
|
|
150
|
-
activeInputs:
|
|
214
|
+
intent: e,
|
|
215
|
+
activeInputs: t.activeInputs,
|
|
151
216
|
...n ? { analysisOptions: n } : {},
|
|
152
|
-
resultShape:
|
|
217
|
+
resultShape: e.kind
|
|
153
218
|
})
|
|
154
|
-
}),
|
|
155
|
-
if (!
|
|
219
|
+
}), i = await ae(r);
|
|
220
|
+
if (!r.ok || i.error)
|
|
156
221
|
throw new Error(
|
|
157
|
-
|
|
222
|
+
i.error || `Semaphor Data App execution failed with status ${r.status}.`
|
|
158
223
|
);
|
|
159
|
-
return
|
|
224
|
+
return i;
|
|
160
225
|
}
|
|
161
|
-
async function
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
164
|
-
return
|
|
226
|
+
async function ae(e) {
|
|
227
|
+
const t = await e.text().catch(() => "");
|
|
228
|
+
if (!t.trim())
|
|
229
|
+
return e.ok ? {
|
|
165
230
|
error: "Semaphor Data App execution returned an empty response."
|
|
166
231
|
} : {};
|
|
167
232
|
try {
|
|
168
|
-
return JSON.parse(
|
|
233
|
+
return JSON.parse(t);
|
|
169
234
|
} catch {
|
|
170
|
-
return
|
|
235
|
+
return e.ok ? {
|
|
171
236
|
error: "Semaphor Data App execution returned invalid JSON.",
|
|
172
|
-
details:
|
|
237
|
+
details: t
|
|
173
238
|
} : {
|
|
174
|
-
error:
|
|
175
|
-
details:
|
|
239
|
+
error: ce(e, t),
|
|
240
|
+
details: t
|
|
176
241
|
};
|
|
177
242
|
}
|
|
178
243
|
}
|
|
179
|
-
function
|
|
180
|
-
const n =
|
|
181
|
-
return
|
|
244
|
+
function ce(e, t) {
|
|
245
|
+
const n = e.statusText ? ` ${e.statusText}` : "", r = t.replace(/\s+/g, " ").trim();
|
|
246
|
+
return r ? `Semaphor Data App execution failed with status ${e.status}${n}: ${r.slice(0, 240)}` : `Semaphor Data App execution failed with status ${e.status}${n}.`;
|
|
182
247
|
}
|
|
183
|
-
function
|
|
184
|
-
const
|
|
185
|
-
return
|
|
248
|
+
function le(e) {
|
|
249
|
+
const t = de(e).replace(/\/+$/, "");
|
|
250
|
+
return t ? t.endsWith("/api") ? `${t}/v1/data-app/execute` : `${t}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
|
|
186
251
|
}
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
190
|
-
if (!
|
|
252
|
+
function de(e) {
|
|
253
|
+
if (e.apiBaseUrl)
|
|
254
|
+
return e.apiBaseUrl;
|
|
255
|
+
if (!e.token)
|
|
191
256
|
return "";
|
|
192
257
|
try {
|
|
193
|
-
return
|
|
258
|
+
return J(e.token).apiServiceUrl || "";
|
|
194
259
|
} catch {
|
|
195
260
|
return "";
|
|
196
261
|
}
|
|
197
262
|
}
|
|
198
|
-
const
|
|
199
|
-
function
|
|
263
|
+
const N = Y({});
|
|
264
|
+
function fe() {
|
|
200
265
|
if (!(typeof window > "u"))
|
|
201
266
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
202
267
|
}
|
|
203
|
-
function
|
|
204
|
-
return N
|
|
268
|
+
function pe() {
|
|
269
|
+
return H(N);
|
|
205
270
|
}
|
|
206
|
-
function
|
|
207
|
-
token:
|
|
208
|
-
apiBaseUrl:
|
|
271
|
+
function we({
|
|
272
|
+
token: e,
|
|
273
|
+
apiBaseUrl: t,
|
|
209
274
|
executor: n,
|
|
210
|
-
children:
|
|
275
|
+
children: r
|
|
211
276
|
}) {
|
|
212
|
-
var
|
|
213
|
-
const
|
|
277
|
+
var o;
|
|
278
|
+
const i = fe(), u = ((o = i == null ? void 0 : i.authToken) == null ? void 0 : o.accessToken) || e, s = (i == null ? void 0 : i.dataApiBaseUrl) || (i == null ? void 0 : i.apiBaseUrl) || t, d = p(() => se(), []), a = n || d, c = p(
|
|
214
279
|
() => ({
|
|
215
|
-
token:
|
|
216
|
-
apiBaseUrl:
|
|
217
|
-
executor:
|
|
280
|
+
token: u,
|
|
281
|
+
apiBaseUrl: s,
|
|
282
|
+
executor: a
|
|
218
283
|
}),
|
|
219
|
-
[
|
|
284
|
+
[s, a, u]
|
|
220
285
|
);
|
|
221
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ W(N.Provider, { value: c, children: r });
|
|
222
287
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
225
|
-
const
|
|
288
|
+
const k = { value: null }, I = {}, me = { records: [] }, E = { options: [] }, he = { records: [] };
|
|
289
|
+
function ve(e) {
|
|
290
|
+
const t = g(e.inputs), n = B(e);
|
|
226
291
|
try {
|
|
227
|
-
const
|
|
228
|
-
return
|
|
229
|
-
error:
|
|
230
|
-
activeInputs:
|
|
292
|
+
const r = Q(e), i = v(r);
|
|
293
|
+
return i ? {
|
|
294
|
+
error: i,
|
|
295
|
+
activeInputs: t,
|
|
231
296
|
analysisOptions: n,
|
|
232
|
-
queryKey:
|
|
233
|
-
idleData:
|
|
297
|
+
queryKey: f(void 0, t, i, n),
|
|
298
|
+
idleData: I
|
|
234
299
|
} : {
|
|
235
|
-
intent:
|
|
300
|
+
intent: r,
|
|
236
301
|
error: null,
|
|
237
|
-
activeInputs:
|
|
302
|
+
activeInputs: t,
|
|
238
303
|
analysisOptions: n,
|
|
239
|
-
queryKey:
|
|
240
|
-
idleData:
|
|
304
|
+
queryKey: f(r, t, void 0, n),
|
|
305
|
+
idleData: I
|
|
241
306
|
};
|
|
242
|
-
} catch (
|
|
243
|
-
const
|
|
307
|
+
} catch (r) {
|
|
308
|
+
const i = m(r);
|
|
244
309
|
return {
|
|
245
|
-
error:
|
|
246
|
-
activeInputs:
|
|
310
|
+
error: i,
|
|
311
|
+
activeInputs: t,
|
|
247
312
|
analysisOptions: n,
|
|
248
|
-
queryKey:
|
|
249
|
-
idleData:
|
|
313
|
+
queryKey: f(void 0, t, i, n),
|
|
314
|
+
idleData: I
|
|
250
315
|
};
|
|
251
316
|
}
|
|
252
317
|
}
|
|
253
|
-
function
|
|
254
|
-
const
|
|
318
|
+
function ye(e) {
|
|
319
|
+
const t = g(e.inputs);
|
|
255
320
|
try {
|
|
256
|
-
const n =
|
|
257
|
-
return
|
|
258
|
-
error:
|
|
259
|
-
activeInputs:
|
|
260
|
-
queryKey:
|
|
261
|
-
idleData:
|
|
321
|
+
const n = M(e), r = v(n);
|
|
322
|
+
return r ? {
|
|
323
|
+
error: r,
|
|
324
|
+
activeInputs: t,
|
|
325
|
+
queryKey: f(void 0, t, r),
|
|
326
|
+
idleData: k
|
|
262
327
|
} : {
|
|
263
328
|
intent: n,
|
|
264
329
|
error: null,
|
|
265
|
-
activeInputs:
|
|
266
|
-
queryKey:
|
|
267
|
-
idleData:
|
|
330
|
+
activeInputs: t,
|
|
331
|
+
queryKey: f(n, t),
|
|
332
|
+
idleData: k
|
|
268
333
|
};
|
|
269
334
|
} catch (n) {
|
|
270
|
-
const
|
|
335
|
+
const r = m(n);
|
|
271
336
|
return {
|
|
272
|
-
error:
|
|
273
|
-
activeInputs:
|
|
274
|
-
queryKey:
|
|
275
|
-
idleData:
|
|
337
|
+
error: r,
|
|
338
|
+
activeInputs: t,
|
|
339
|
+
queryKey: f(void 0, t, r),
|
|
340
|
+
idleData: k
|
|
276
341
|
};
|
|
277
342
|
}
|
|
278
343
|
}
|
|
279
|
-
function
|
|
280
|
-
const
|
|
344
|
+
function qe(e) {
|
|
345
|
+
const t = g(e.inputs), n = me;
|
|
281
346
|
try {
|
|
282
|
-
const
|
|
283
|
-
return
|
|
284
|
-
error:
|
|
285
|
-
activeInputs:
|
|
286
|
-
queryKey:
|
|
347
|
+
const r = L(e), i = v(r);
|
|
348
|
+
return i ? {
|
|
349
|
+
error: i,
|
|
350
|
+
activeInputs: t,
|
|
351
|
+
queryKey: f(void 0, t, i),
|
|
287
352
|
idleData: n
|
|
288
353
|
} : {
|
|
289
|
-
intent:
|
|
354
|
+
intent: r,
|
|
290
355
|
error: null,
|
|
291
|
-
activeInputs:
|
|
292
|
-
queryKey:
|
|
356
|
+
activeInputs: t,
|
|
357
|
+
queryKey: f(r, t),
|
|
293
358
|
idleData: n
|
|
294
359
|
};
|
|
295
|
-
} catch (
|
|
296
|
-
const
|
|
360
|
+
} catch (r) {
|
|
361
|
+
const i = m(r);
|
|
297
362
|
return {
|
|
298
|
-
error:
|
|
299
|
-
activeInputs:
|
|
300
|
-
queryKey:
|
|
363
|
+
error: i,
|
|
364
|
+
activeInputs: t,
|
|
365
|
+
queryKey: f(void 0, t, i),
|
|
301
366
|
idleData: n
|
|
302
367
|
};
|
|
303
368
|
}
|
|
304
369
|
}
|
|
305
|
-
function
|
|
370
|
+
function Se(e) {
|
|
306
371
|
try {
|
|
307
|
-
const
|
|
372
|
+
const t = z(e), n = v(t);
|
|
308
373
|
return n ? {
|
|
309
374
|
error: n,
|
|
310
|
-
queryKey:
|
|
311
|
-
idleData:
|
|
375
|
+
queryKey: f(void 0, void 0, n),
|
|
376
|
+
idleData: E
|
|
312
377
|
} : {
|
|
313
|
-
intent:
|
|
378
|
+
intent: t,
|
|
314
379
|
error: null,
|
|
315
|
-
queryKey:
|
|
316
|
-
idleData:
|
|
380
|
+
queryKey: f(t),
|
|
381
|
+
idleData: E
|
|
317
382
|
};
|
|
318
|
-
} catch (
|
|
319
|
-
const n = m(
|
|
383
|
+
} catch (t) {
|
|
384
|
+
const n = m(t);
|
|
320
385
|
return {
|
|
321
386
|
error: n,
|
|
322
|
-
queryKey:
|
|
323
|
-
idleData:
|
|
387
|
+
queryKey: f(void 0, void 0, n),
|
|
388
|
+
idleData: E
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
function Ae(e) {
|
|
393
|
+
const t = g(e.inputs), n = he;
|
|
394
|
+
try {
|
|
395
|
+
const r = U(e), i = v(r);
|
|
396
|
+
return i ? {
|
|
397
|
+
error: i,
|
|
398
|
+
activeInputs: t,
|
|
399
|
+
queryKey: f(void 0, t, i),
|
|
400
|
+
idleData: n
|
|
401
|
+
} : {
|
|
402
|
+
intent: r,
|
|
403
|
+
error: null,
|
|
404
|
+
activeInputs: t,
|
|
405
|
+
queryKey: f(r, t),
|
|
406
|
+
idleData: n
|
|
407
|
+
};
|
|
408
|
+
} catch (r) {
|
|
409
|
+
const i = m(r);
|
|
410
|
+
return {
|
|
411
|
+
error: i,
|
|
412
|
+
activeInputs: t,
|
|
413
|
+
queryKey: f(void 0, t, i),
|
|
414
|
+
idleData: n
|
|
324
415
|
};
|
|
325
416
|
}
|
|
326
417
|
}
|
|
327
|
-
function m(
|
|
328
|
-
return
|
|
418
|
+
function m(e) {
|
|
419
|
+
return e instanceof Error ? e : new Error(String(e));
|
|
329
420
|
}
|
|
330
|
-
function v(
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
421
|
+
function v(e) {
|
|
422
|
+
const t = F(e);
|
|
423
|
+
if (t.ok)
|
|
333
424
|
return null;
|
|
334
|
-
const n =
|
|
335
|
-
(
|
|
425
|
+
const n = t.errors.map(
|
|
426
|
+
(r) => r.path ? `${r.code} at ${r.path}: ${r.message}` : `${r.code}: ${r.message}`
|
|
336
427
|
).join("; ");
|
|
337
428
|
return new Error(`Invalid Semaphor analytics intent. ${n}`);
|
|
338
429
|
}
|
|
339
|
-
function
|
|
430
|
+
function f(e, t, n, r) {
|
|
340
431
|
return JSON.stringify({
|
|
341
|
-
intent:
|
|
342
|
-
activeInputs:
|
|
343
|
-
analysisOptions:
|
|
432
|
+
intent: e,
|
|
433
|
+
activeInputs: t,
|
|
434
|
+
analysisOptions: r,
|
|
344
435
|
error: n == null ? void 0 : n.message
|
|
345
436
|
});
|
|
346
437
|
}
|
|
347
|
-
function
|
|
348
|
-
const [
|
|
349
|
-
() =>
|
|
350
|
-
[
|
|
351
|
-
),
|
|
352
|
-
(
|
|
353
|
-
var
|
|
354
|
-
const
|
|
355
|
-
(
|
|
438
|
+
function Ce(e) {
|
|
439
|
+
const [t, n] = R(e.defaultValue), r = Object.prototype.hasOwnProperty.call(e, "value"), i = r ? e.value : t, u = p(
|
|
440
|
+
() => P(e.options),
|
|
441
|
+
[e.options]
|
|
442
|
+
), s = O(
|
|
443
|
+
(a) => {
|
|
444
|
+
var o;
|
|
445
|
+
const c = a;
|
|
446
|
+
(o = e.onValueChange) == null || o.call(e, c), r || n(c);
|
|
356
447
|
},
|
|
357
|
-
[
|
|
358
|
-
),
|
|
359
|
-
return
|
|
360
|
-
const
|
|
448
|
+
[r, e]
|
|
449
|
+
), d = O(() => s(void 0), [s]);
|
|
450
|
+
return p(() => {
|
|
451
|
+
const a = T(e);
|
|
361
452
|
return {
|
|
362
|
-
id:
|
|
363
|
-
kind:
|
|
364
|
-
label:
|
|
365
|
-
field:
|
|
366
|
-
operator:
|
|
367
|
-
controlRole:
|
|
368
|
-
value:
|
|
369
|
-
options:
|
|
370
|
-
isActive:
|
|
371
|
-
setValue:
|
|
372
|
-
clear:
|
|
453
|
+
id: e.id,
|
|
454
|
+
kind: e.kind,
|
|
455
|
+
label: e.label,
|
|
456
|
+
field: a.field,
|
|
457
|
+
operator: a.operator,
|
|
458
|
+
controlRole: e.kind === "control" ? e.role : void 0,
|
|
459
|
+
value: i,
|
|
460
|
+
options: u,
|
|
461
|
+
isActive: A(i),
|
|
462
|
+
setValue: s,
|
|
463
|
+
clear: d,
|
|
373
464
|
toAnalyticsInput: () => ({
|
|
374
|
-
inputId:
|
|
375
|
-
field:
|
|
376
|
-
kind:
|
|
377
|
-
label:
|
|
378
|
-
value:
|
|
379
|
-
isActive:
|
|
380
|
-
operator:
|
|
381
|
-
controlRole:
|
|
465
|
+
inputId: a.inputId,
|
|
466
|
+
field: a.field,
|
|
467
|
+
kind: e.kind,
|
|
468
|
+
label: e.label,
|
|
469
|
+
value: i,
|
|
470
|
+
isActive: A(i),
|
|
471
|
+
operator: a.operator,
|
|
472
|
+
controlRole: e.kind === "control" ? e.role : void 0
|
|
382
473
|
})
|
|
383
474
|
};
|
|
384
|
-
}, [
|
|
385
|
-
}
|
|
386
|
-
function
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
475
|
+
}, [d, u, s, e, i]);
|
|
476
|
+
}
|
|
477
|
+
function _e(e) {
|
|
478
|
+
const [t, n] = R(() => ke(e));
|
|
479
|
+
return j(() => {
|
|
480
|
+
n((r) => {
|
|
481
|
+
let i = r;
|
|
482
|
+
for (const u of e)
|
|
483
|
+
!Object.prototype.hasOwnProperty.call(i, u.id) && u.defaultValue !== void 0 && (i = { ...i, [u.id]: u.defaultValue });
|
|
484
|
+
return i;
|
|
485
|
+
});
|
|
486
|
+
}, [e]), p(
|
|
487
|
+
() => e.map((r) => {
|
|
488
|
+
const i = Object.prototype.hasOwnProperty.call(
|
|
489
|
+
r,
|
|
490
|
+
"value"
|
|
491
|
+
), u = i ? r.value : t[r.id], s = P(r.options), d = (o) => {
|
|
492
|
+
var l;
|
|
493
|
+
(l = r.onValueChange) == null || l.call(r, o), i || n((y) => ({
|
|
494
|
+
...y,
|
|
495
|
+
[r.id]: o
|
|
496
|
+
}));
|
|
497
|
+
}, a = () => d(void 0), c = T(r);
|
|
498
|
+
return {
|
|
499
|
+
id: r.id,
|
|
500
|
+
kind: r.kind,
|
|
501
|
+
label: r.label,
|
|
502
|
+
field: c.field,
|
|
503
|
+
operator: c.operator,
|
|
504
|
+
controlRole: r.kind === "control" ? r.role : void 0,
|
|
505
|
+
value: u,
|
|
506
|
+
options: s,
|
|
507
|
+
isActive: A(u),
|
|
508
|
+
setValue: d,
|
|
509
|
+
clear: a,
|
|
510
|
+
toAnalyticsInput: () => ({
|
|
511
|
+
inputId: c.inputId,
|
|
512
|
+
field: c.field,
|
|
513
|
+
kind: r.kind,
|
|
514
|
+
label: r.label,
|
|
515
|
+
value: u,
|
|
516
|
+
isActive: A(u),
|
|
517
|
+
operator: c.operator,
|
|
518
|
+
controlRole: r.kind === "control" ? r.role : void 0
|
|
519
|
+
})
|
|
520
|
+
};
|
|
521
|
+
}),
|
|
522
|
+
[e, t]
|
|
408
523
|
);
|
|
409
|
-
return {
|
|
410
|
-
id: t.id,
|
|
411
|
-
intent: e.intent,
|
|
412
|
-
...r || {},
|
|
413
|
-
status: e.error ? "error" : o.status,
|
|
414
|
-
isLoading: !e.error && o.status === "loading",
|
|
415
|
-
error: e.error || o.error
|
|
416
|
-
};
|
|
417
524
|
}
|
|
418
|
-
function
|
|
419
|
-
const
|
|
420
|
-
(
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
},
|
|
424
|
-
[e
|
|
425
|
-
),
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
525
|
+
function Pe(e, t = {}) {
|
|
526
|
+
const n = p(
|
|
527
|
+
() => t.inputs ? {
|
|
528
|
+
...e,
|
|
529
|
+
inputs: t.inputs
|
|
530
|
+
} : e,
|
|
531
|
+
[t.inputs, e]
|
|
532
|
+
), r = p(() => {
|
|
533
|
+
switch (n.queryKind) {
|
|
534
|
+
case "metric":
|
|
535
|
+
return {
|
|
536
|
+
queryKind: n.queryKind,
|
|
537
|
+
request: ye(n)
|
|
538
|
+
};
|
|
539
|
+
case "analysis":
|
|
540
|
+
return {
|
|
541
|
+
queryKind: n.queryKind,
|
|
542
|
+
request: ve(n)
|
|
543
|
+
};
|
|
544
|
+
case "records":
|
|
545
|
+
return {
|
|
546
|
+
queryKind: n.queryKind,
|
|
547
|
+
request: qe(n)
|
|
548
|
+
};
|
|
549
|
+
case "inputOptions":
|
|
550
|
+
return {
|
|
551
|
+
queryKind: n.queryKind,
|
|
552
|
+
request: Se(n)
|
|
553
|
+
};
|
|
554
|
+
case "sql":
|
|
555
|
+
return {
|
|
556
|
+
queryKind: n.queryKind,
|
|
557
|
+
request: Ae(n)
|
|
558
|
+
};
|
|
559
|
+
default:
|
|
560
|
+
return D(n);
|
|
561
|
+
}
|
|
562
|
+
}, [n]), i = O(
|
|
563
|
+
(o) => {
|
|
564
|
+
var y, q, K, x, w, S, C;
|
|
565
|
+
const l = r.request;
|
|
566
|
+
if (l.intent)
|
|
567
|
+
switch (r.queryKind) {
|
|
568
|
+
case "metric":
|
|
569
|
+
return (y = o.executor) == null ? void 0 : y.executeMetric(
|
|
570
|
+
l.intent,
|
|
571
|
+
o
|
|
572
|
+
);
|
|
573
|
+
case "analysis":
|
|
574
|
+
return (K = (q = o.executor) == null ? void 0 : q.executeAnalysis) == null ? void 0 : K.call(
|
|
575
|
+
q,
|
|
576
|
+
l.intent,
|
|
577
|
+
o,
|
|
578
|
+
l.analysisOptions
|
|
579
|
+
);
|
|
580
|
+
case "records":
|
|
581
|
+
return (x = o.executor) == null ? void 0 : x.executeRecords(
|
|
582
|
+
l.intent,
|
|
583
|
+
o
|
|
584
|
+
);
|
|
585
|
+
case "inputOptions":
|
|
586
|
+
return (w = o.executor) == null ? void 0 : w.executeInputOptions(
|
|
587
|
+
l.intent,
|
|
588
|
+
o
|
|
589
|
+
);
|
|
590
|
+
case "sql":
|
|
591
|
+
return (C = (S = o.executor) == null ? void 0 : S.executeSql) == null ? void 0 : C.call(
|
|
592
|
+
S,
|
|
593
|
+
l.intent,
|
|
594
|
+
o
|
|
595
|
+
);
|
|
596
|
+
default:
|
|
597
|
+
return D(r);
|
|
598
|
+
}
|
|
476
599
|
},
|
|
477
|
-
[
|
|
478
|
-
),
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
600
|
+
[r]
|
|
601
|
+
), u = ge(
|
|
602
|
+
r.request.queryKey,
|
|
603
|
+
i,
|
|
604
|
+
r.request.idleData,
|
|
605
|
+
r.request.activeInputs
|
|
606
|
+
), s = r.request.error ? r.request.idleData : u.data, d = r.request.error ? "error" : u.status, a = !r.request.error && u.status === "loading", c = r.request.error || u.error;
|
|
607
|
+
switch (r.queryKind) {
|
|
608
|
+
case "metric": {
|
|
609
|
+
const o = s;
|
|
610
|
+
return {
|
|
611
|
+
id: n.id,
|
|
612
|
+
intent: r.request.intent,
|
|
613
|
+
value: (o == null ? void 0 : o.value) ?? null,
|
|
614
|
+
metrics: o == null ? void 0 : o.metrics,
|
|
615
|
+
comparisonValue: o == null ? void 0 : o.comparisonValue,
|
|
616
|
+
delta: o == null ? void 0 : o.delta,
|
|
617
|
+
deltaPercent: o == null ? void 0 : o.deltaPercent,
|
|
618
|
+
records: o == null ? void 0 : o.records,
|
|
619
|
+
executionResult: o == null ? void 0 : o.executionResult,
|
|
620
|
+
status: d,
|
|
621
|
+
isLoading: a,
|
|
622
|
+
error: c
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
case "analysis": {
|
|
626
|
+
const o = V(s);
|
|
627
|
+
return {
|
|
628
|
+
id: n.id,
|
|
629
|
+
intent: r.request.intent,
|
|
630
|
+
...o || {},
|
|
631
|
+
status: d,
|
|
632
|
+
isLoading: a,
|
|
633
|
+
error: c
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
case "records": {
|
|
637
|
+
const o = s;
|
|
638
|
+
return {
|
|
639
|
+
id: n.id,
|
|
640
|
+
intent: r.request.intent,
|
|
641
|
+
records: (o == null ? void 0 : o.records) || [],
|
|
642
|
+
columns: o == null ? void 0 : o.columns,
|
|
643
|
+
rowCount: o == null ? void 0 : o.rowCount,
|
|
644
|
+
pagination: o == null ? void 0 : o.pagination,
|
|
645
|
+
executionResult: o == null ? void 0 : o.executionResult,
|
|
646
|
+
status: d,
|
|
647
|
+
isLoading: a,
|
|
648
|
+
error: c
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
case "inputOptions": {
|
|
652
|
+
const o = s;
|
|
653
|
+
return {
|
|
654
|
+
id: n.id,
|
|
655
|
+
intent: r.request.intent,
|
|
656
|
+
options: (o == null ? void 0 : o.options) || [],
|
|
657
|
+
executionResult: o == null ? void 0 : o.executionResult,
|
|
658
|
+
status: d,
|
|
659
|
+
isLoading: a,
|
|
660
|
+
error: c
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
case "sql": {
|
|
664
|
+
const o = s;
|
|
665
|
+
return {
|
|
666
|
+
id: n.id,
|
|
667
|
+
intent: r.request.intent,
|
|
668
|
+
records: (o == null ? void 0 : o.records) || [],
|
|
669
|
+
columns: o == null ? void 0 : o.columns,
|
|
670
|
+
rowCount: o == null ? void 0 : o.rowCount,
|
|
671
|
+
pagination: o == null ? void 0 : o.pagination,
|
|
672
|
+
output: o == null ? void 0 : o.output,
|
|
673
|
+
rowLimitExceeded: o == null ? void 0 : o.rowLimitExceeded,
|
|
674
|
+
executionResult: o == null ? void 0 : o.executionResult,
|
|
675
|
+
status: d,
|
|
676
|
+
isLoading: a,
|
|
677
|
+
error: c
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
default:
|
|
681
|
+
return D(r);
|
|
682
|
+
}
|
|
492
683
|
}
|
|
493
|
-
function
|
|
494
|
-
const
|
|
684
|
+
function ge(e, t, n, r) {
|
|
685
|
+
const i = pe(), u = _(t), s = _(r), [d, a] = R({
|
|
495
686
|
status: "idle",
|
|
496
687
|
data: n,
|
|
497
688
|
error: null
|
|
498
689
|
});
|
|
499
|
-
return
|
|
500
|
-
let
|
|
690
|
+
return u.current = t, s.current = r, j(() => {
|
|
691
|
+
let c;
|
|
501
692
|
try {
|
|
502
|
-
|
|
503
|
-
...
|
|
504
|
-
activeInputs:
|
|
693
|
+
c = u.current({
|
|
694
|
+
...i,
|
|
695
|
+
activeInputs: s.current
|
|
505
696
|
});
|
|
506
|
-
} catch (
|
|
507
|
-
|
|
697
|
+
} catch (l) {
|
|
698
|
+
a({
|
|
508
699
|
status: "error",
|
|
509
700
|
data: n,
|
|
510
|
-
error: m(
|
|
701
|
+
error: m(l)
|
|
511
702
|
});
|
|
512
703
|
return;
|
|
513
704
|
}
|
|
514
|
-
if (!
|
|
515
|
-
|
|
705
|
+
if (!c) {
|
|
706
|
+
a({ status: "idle", data: n, error: null });
|
|
516
707
|
return;
|
|
517
708
|
}
|
|
518
|
-
let
|
|
519
|
-
return
|
|
709
|
+
let o = !1;
|
|
710
|
+
return a((l) => ({
|
|
520
711
|
status: "loading",
|
|
521
|
-
data:
|
|
712
|
+
data: l.data,
|
|
522
713
|
error: null
|
|
523
|
-
})),
|
|
524
|
-
|
|
525
|
-
}).catch((
|
|
526
|
-
|
|
714
|
+
})), c.then((l) => {
|
|
715
|
+
o || a({ status: "success", data: l, error: null });
|
|
716
|
+
}).catch((l) => {
|
|
717
|
+
o || a({
|
|
527
718
|
status: "error",
|
|
528
719
|
data: n,
|
|
529
|
-
error: m(
|
|
720
|
+
error: m(l)
|
|
530
721
|
});
|
|
531
722
|
}), () => {
|
|
532
|
-
|
|
723
|
+
o = !0;
|
|
533
724
|
};
|
|
534
|
-
}, [n,
|
|
725
|
+
}, [n, e, i]), d;
|
|
726
|
+
}
|
|
727
|
+
function ke(e) {
|
|
728
|
+
return Object.fromEntries(
|
|
729
|
+
e.filter((t) => t.defaultValue !== void 0).map((t) => [t.id, t.defaultValue])
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
function D(e) {
|
|
733
|
+
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
535
734
|
}
|
|
536
735
|
export {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
736
|
+
N as SemaphorDataAppContext,
|
|
737
|
+
we as SemaphorDataAppProvider,
|
|
738
|
+
se as createSemaphorQueryExecutor,
|
|
739
|
+
be as defineSemaphorDataApp,
|
|
740
|
+
Ke as defineSemaphorInput,
|
|
741
|
+
A as hasSemaphorInputValue,
|
|
742
|
+
V as normalizeSemaphorAnalysisPayload,
|
|
743
|
+
Ve as normalizeSemaphorAnalysisQueryOptions,
|
|
744
|
+
P as normalizeSemaphorInputOptions,
|
|
745
|
+
fe as readWindowRuntime,
|
|
746
|
+
xe as semaphor,
|
|
747
|
+
g as toSemaphorActiveInputSnapshots,
|
|
748
|
+
Q as toSemaphorAnalysisIntent,
|
|
749
|
+
B as toSemaphorAnalysisQueryOptions,
|
|
750
|
+
$e as toSemaphorInputBinding,
|
|
751
|
+
Ne as toSemaphorInputBindings,
|
|
752
|
+
z as toSemaphorInputOptionsIntent,
|
|
753
|
+
Ue as toSemaphorInputSnapshots,
|
|
754
|
+
T as toSemaphorInputSpec,
|
|
755
|
+
M as toSemaphorMetricIntent,
|
|
756
|
+
L as toSemaphorRecordsIntent,
|
|
757
|
+
U as toSemaphorSqlIntent,
|
|
758
|
+
pe as useSemaphorDataAppRuntime,
|
|
759
|
+
Ce as useSemaphorInput,
|
|
760
|
+
_e as useSemaphorInputs,
|
|
761
|
+
Pe as useSemaphorQuery,
|
|
762
|
+
ze as validateSemaphorDataAppQuerySpecs
|
|
562
763
|
};
|