react-semaphor 0.1.370 → 0.1.371
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 +40 -38
- package/dist/chunks/{calendar-preferences-dialog-6q51A6XC.js → calendar-preferences-dialog-ClBAkMmF.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-CUGzkNcE.js → calendar-preferences-dialog-Dn6o2r2Y.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BEZnvIla.js → dashboard-briefing-launcher-BO-kXtEd.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ptERmNJr.js → dashboard-briefing-launcher-D3Xfc_26.js} +3 -3
- package/dist/chunks/{dashboard-controls-CqKC5oEk.js → dashboard-controls-B3sdy_Zx.js} +3 -3
- package/dist/chunks/{dashboard-controls-CGt6_hMf.js → dashboard-controls-DcXMFgGR.js} +1 -1
- package/dist/chunks/{dashboard-json-6SgPm_QW.js → dashboard-json-BWfkEy48.js} +1 -1
- package/dist/chunks/{dashboard-json-CYSbOdmE.js → dashboard-json-CFURS_OR.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-w6hKbjlw.js → edit-dashboard-visual-BD2AJLiT.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-ByQx_M2i.js → edit-dashboard-visual-DjdhKiP2.js} +3 -3
- package/dist/chunks/{index-CPyEi9gS.js → index-C0Qnfr_7.js} +5 -4
- package/dist/chunks/{index-BtqYNH_S.js → index-DlLvzmJF.js} +2 -2
- package/dist/chunks/{resource-management-panel-Bf8-3eUf.js → resource-management-panel-DytUMSGA.js} +1 -1
- package/dist/chunks/{resource-management-panel-mJ84NxzC.js → resource-management-panel-YvIfaphX.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-BfoXDDrd.js → use-create-flow-overlay-state-BETXykC9.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-c6rCm36x.js → use-create-flow-overlay-state-CwIG1Ekp.js} +1 -1
- package/dist/chunks/{use-visual-utils-NN0e3fBP.js → use-visual-utils-Bk135OgA.js} +1 -1
- package/dist/chunks/{use-visual-utils-C_c-aiqi.js → use-visual-utils-BzFjIykb.js} +1 -1
- package/dist/chunks/{validation-PPSpYtVf.js → validation-CQFpcSSP.js} +295 -192
- package/dist/chunks/validation-D4Zz6WPD.js +1 -0
- package/dist/chunks/{validators-DBNa-eb1.js → validators-CuKnUZFO.js} +717 -345
- package/dist/chunks/validators-DHee9kM2.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 +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +56 -49
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +5 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +91 -0
- package/dist/types/dashboard-assistant.d.ts +60 -2
- package/dist/types/dashboard-authoring.d.ts +58 -2
- package/dist/types/dashboard.d.ts +67 -2
- package/dist/types/data-app-builder.d.ts +41 -0
- package/dist/types/data-app-sdk-validation.d.ts +50 -3
- package/dist/types/data-app-sdk.d.ts +53 -3
- package/dist/types/main.d.ts +59 -2
- package/dist/types/shared.d.ts +66 -2
- package/dist/types/surfboard.d.ts +67 -2
- package/dist/types/types.d.ts +67 -2
- package/package.json +1 -1
- package/dist/chunks/validation-DYL3ArlL.js +0 -1
- package/dist/chunks/validators-CgxWT8UX.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as y, a as M, b as B, c as Q, d as J, e as Y, f as
|
|
2
|
-
import { m as
|
|
3
|
-
import { j as
|
|
4
|
-
import { createContext as X, useContext as G, useMemo as m, useState as O, useCallback as R, useEffect as
|
|
1
|
+
import { t as y, a as M, b as B, c as Q, d as J, e as Y, f as F, g as H, n as V, h as $, i as k } from "../chunks/validation-CQFpcSSP.js";
|
|
2
|
+
import { m as ze, j as Me, k as Be, l as Qe, v as Je } from "../chunks/validation-CQFpcSSP.js";
|
|
3
|
+
import { j as W } from "../chunks/index-CuHybtft.js";
|
|
4
|
+
import { createContext as X, useContext as G, useMemo as m, useState as O, useCallback as R, useEffect as L, useRef as j } from "react";
|
|
5
5
|
import { jsx as Z } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { c as ee } from "../chunks/validators-CuKnUZFO.js";
|
|
7
7
|
const te = [
|
|
8
8
|
"records",
|
|
9
9
|
"changes",
|
|
@@ -21,7 +21,7 @@ const te = [
|
|
|
21
21
|
"largestNegativeDrivers",
|
|
22
22
|
"largestPositiveDrivers"
|
|
23
23
|
];
|
|
24
|
-
function
|
|
24
|
+
function N(e) {
|
|
25
25
|
if (!e)
|
|
26
26
|
return {};
|
|
27
27
|
const t = se(e.executionResult), n = ne(e, t), r = ie(n);
|
|
@@ -39,7 +39,7 @@ function ne(e, t) {
|
|
|
39
39
|
const n = oe(e.resultSets);
|
|
40
40
|
for (const i of te) {
|
|
41
41
|
if (n[i]) {
|
|
42
|
-
n[i] =
|
|
42
|
+
n[i] = U(n[i]);
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
45
|
const u = ae(e[i]);
|
|
@@ -59,11 +59,11 @@ function oe(e) {
|
|
|
59
59
|
return Object.fromEntries(
|
|
60
60
|
Object.entries(e || {}).map(([t, n]) => [
|
|
61
61
|
t,
|
|
62
|
-
|
|
62
|
+
U(n)
|
|
63
63
|
])
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function U(e) {
|
|
67
67
|
var t;
|
|
68
68
|
return {
|
|
69
69
|
...e,
|
|
@@ -157,6 +157,13 @@ const Pe = {
|
|
|
157
157
|
role: "sqlParam"
|
|
158
158
|
};
|
|
159
159
|
},
|
|
160
|
+
derivedField(e) {
|
|
161
|
+
return {
|
|
162
|
+
...e,
|
|
163
|
+
kind: "derived_field",
|
|
164
|
+
expressionLanguage: e.expressionLanguage || "semaphor_sql_template"
|
|
165
|
+
};
|
|
166
|
+
},
|
|
160
167
|
metric(e) {
|
|
161
168
|
return {
|
|
162
169
|
...e,
|
|
@@ -200,7 +207,7 @@ function de() {
|
|
|
200
207
|
e,
|
|
201
208
|
t,
|
|
202
209
|
n ?? {}
|
|
203
|
-
).then(
|
|
210
|
+
).then(N),
|
|
204
211
|
executeMetric: (e, t) => h(e, t),
|
|
205
212
|
executeRecords: (e, t) => h(e, t),
|
|
206
213
|
executeInputOptions: (e, t) => h(e, t),
|
|
@@ -264,18 +271,18 @@ function he(e) {
|
|
|
264
271
|
if (!e.token)
|
|
265
272
|
return "";
|
|
266
273
|
try {
|
|
267
|
-
return
|
|
274
|
+
return W(e.token).apiServiceUrl || "";
|
|
268
275
|
} catch {
|
|
269
276
|
return "";
|
|
270
277
|
}
|
|
271
278
|
}
|
|
272
|
-
const
|
|
279
|
+
const z = X({});
|
|
273
280
|
function ve() {
|
|
274
281
|
if (!(typeof window > "u"))
|
|
275
282
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
276
283
|
}
|
|
277
284
|
function ye() {
|
|
278
|
-
return G(
|
|
285
|
+
return G(z);
|
|
279
286
|
}
|
|
280
287
|
function je({
|
|
281
288
|
token: e,
|
|
@@ -292,13 +299,13 @@ function je({
|
|
|
292
299
|
}),
|
|
293
300
|
[s, a, u]
|
|
294
301
|
);
|
|
295
|
-
return /* @__PURE__ */ Z(
|
|
302
|
+
return /* @__PURE__ */ Z(z.Provider, { value: c, children: r });
|
|
296
303
|
}
|
|
297
|
-
const
|
|
304
|
+
const I = { value: null }, x = {}, qe = { records: [] }, D = { options: [] }, Se = { records: [] }, E = {};
|
|
298
305
|
function Ae(e) {
|
|
299
306
|
const t = y(e.inputs), n = Y(e);
|
|
300
307
|
try {
|
|
301
|
-
const r =
|
|
308
|
+
const r = F(e), i = v(r);
|
|
302
309
|
return i ? {
|
|
303
310
|
error: i,
|
|
304
311
|
activeInputs: t,
|
|
@@ -309,14 +316,14 @@ function Ae(e) {
|
|
|
309
316
|
i,
|
|
310
317
|
n
|
|
311
318
|
),
|
|
312
|
-
idleData:
|
|
319
|
+
idleData: x
|
|
313
320
|
} : {
|
|
314
321
|
intent: r,
|
|
315
322
|
error: null,
|
|
316
323
|
activeInputs: t,
|
|
317
324
|
analysisOptions: n,
|
|
318
325
|
queryKey: d(r, t, void 0, n),
|
|
319
|
-
idleData:
|
|
326
|
+
idleData: x
|
|
320
327
|
};
|
|
321
328
|
} catch (r) {
|
|
322
329
|
const i = p(r);
|
|
@@ -330,25 +337,25 @@ function Ae(e) {
|
|
|
330
337
|
i,
|
|
331
338
|
n
|
|
332
339
|
),
|
|
333
|
-
idleData:
|
|
340
|
+
idleData: x
|
|
334
341
|
};
|
|
335
342
|
}
|
|
336
343
|
}
|
|
337
344
|
function ge(e) {
|
|
338
345
|
const t = y(e.inputs);
|
|
339
346
|
try {
|
|
340
|
-
const n =
|
|
347
|
+
const n = H(e), r = v(n);
|
|
341
348
|
return r ? {
|
|
342
349
|
error: r,
|
|
343
350
|
activeInputs: t,
|
|
344
351
|
queryKey: d(void 0, t, r),
|
|
345
|
-
idleData:
|
|
352
|
+
idleData: I
|
|
346
353
|
} : {
|
|
347
354
|
intent: n,
|
|
348
355
|
error: null,
|
|
349
356
|
activeInputs: t,
|
|
350
357
|
queryKey: d(n, t),
|
|
351
|
-
idleData:
|
|
358
|
+
idleData: I
|
|
352
359
|
};
|
|
353
360
|
} catch (n) {
|
|
354
361
|
const r = p(n);
|
|
@@ -356,11 +363,11 @@ function ge(e) {
|
|
|
356
363
|
error: r,
|
|
357
364
|
activeInputs: t,
|
|
358
365
|
queryKey: d(void 0, t, r),
|
|
359
|
-
idleData:
|
|
366
|
+
idleData: I
|
|
360
367
|
};
|
|
361
368
|
}
|
|
362
369
|
}
|
|
363
|
-
function
|
|
370
|
+
function ke(e) {
|
|
364
371
|
const t = y(e.inputs), n = qe;
|
|
365
372
|
try {
|
|
366
373
|
const r = J(e), i = v(r);
|
|
@@ -386,29 +393,29 @@ function Ie(e) {
|
|
|
386
393
|
};
|
|
387
394
|
}
|
|
388
395
|
}
|
|
389
|
-
function
|
|
396
|
+
function Ie(e) {
|
|
390
397
|
try {
|
|
391
398
|
const t = Q(e), n = v(t);
|
|
392
399
|
return n ? {
|
|
393
400
|
error: n,
|
|
394
401
|
queryKey: d(void 0, void 0, n),
|
|
395
|
-
idleData:
|
|
402
|
+
idleData: D
|
|
396
403
|
} : {
|
|
397
404
|
intent: t,
|
|
398
405
|
error: null,
|
|
399
406
|
queryKey: d(t),
|
|
400
|
-
idleData:
|
|
407
|
+
idleData: D
|
|
401
408
|
};
|
|
402
409
|
} catch (t) {
|
|
403
410
|
const n = p(t);
|
|
404
411
|
return {
|
|
405
412
|
error: n,
|
|
406
413
|
queryKey: d(void 0, void 0, n),
|
|
407
|
-
idleData:
|
|
414
|
+
idleData: D
|
|
408
415
|
};
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
|
-
function
|
|
418
|
+
function xe(e) {
|
|
412
419
|
const t = y(e.inputs), n = Se;
|
|
413
420
|
try {
|
|
414
421
|
const r = B(e), i = v(r);
|
|
@@ -434,7 +441,7 @@ function De(e) {
|
|
|
434
441
|
};
|
|
435
442
|
}
|
|
436
443
|
}
|
|
437
|
-
function
|
|
444
|
+
function De(e) {
|
|
438
445
|
const t = y(e.inputs);
|
|
439
446
|
try {
|
|
440
447
|
const n = M(e), r = v(n);
|
|
@@ -503,7 +510,7 @@ function Ve(e) {
|
|
|
503
510
|
controlRole: e.kind === "control" ? e.role : void 0,
|
|
504
511
|
value: i,
|
|
505
512
|
options: u,
|
|
506
|
-
isActive:
|
|
513
|
+
isActive: k(i),
|
|
507
514
|
setValue: s,
|
|
508
515
|
clear: f,
|
|
509
516
|
toAnalyticsInput: () => ({
|
|
@@ -512,7 +519,7 @@ function Ve(e) {
|
|
|
512
519
|
kind: e.kind,
|
|
513
520
|
label: e.label,
|
|
514
521
|
value: i,
|
|
515
|
-
isActive:
|
|
522
|
+
isActive: k(i),
|
|
516
523
|
operator: a.operator,
|
|
517
524
|
controlRole: e.kind === "control" ? e.role : void 0
|
|
518
525
|
})
|
|
@@ -521,7 +528,7 @@ function Ve(e) {
|
|
|
521
528
|
}
|
|
522
529
|
function $e(e) {
|
|
523
530
|
const [t, n] = O(() => Ke(e));
|
|
524
|
-
return
|
|
531
|
+
return L(() => {
|
|
525
532
|
n((r) => {
|
|
526
533
|
let i = r;
|
|
527
534
|
for (const u of e)
|
|
@@ -549,7 +556,7 @@ function $e(e) {
|
|
|
549
556
|
controlRole: r.kind === "control" ? r.role : void 0,
|
|
550
557
|
value: u,
|
|
551
558
|
options: s,
|
|
552
|
-
isActive:
|
|
559
|
+
isActive: k(u),
|
|
553
560
|
setValue: f,
|
|
554
561
|
clear: a,
|
|
555
562
|
toAnalyticsInput: () => ({
|
|
@@ -558,7 +565,7 @@ function $e(e) {
|
|
|
558
565
|
kind: r.kind,
|
|
559
566
|
label: r.label,
|
|
560
567
|
value: u,
|
|
561
|
-
isActive:
|
|
568
|
+
isActive: k(u),
|
|
562
569
|
operator: c.operator,
|
|
563
570
|
controlRole: r.kind === "control" ? r.role : void 0
|
|
564
571
|
})
|
|
@@ -567,7 +574,7 @@ function $e(e) {
|
|
|
567
574
|
[e, t]
|
|
568
575
|
);
|
|
569
576
|
}
|
|
570
|
-
function
|
|
577
|
+
function Le(e, t = {}) {
|
|
571
578
|
const n = m(
|
|
572
579
|
() => t.inputs ? {
|
|
573
580
|
...e,
|
|
@@ -589,22 +596,22 @@ function Ne(e, t = {}) {
|
|
|
589
596
|
case "records":
|
|
590
597
|
return {
|
|
591
598
|
queryKind: n.queryKind,
|
|
592
|
-
request:
|
|
599
|
+
request: ke(n)
|
|
593
600
|
};
|
|
594
601
|
case "inputOptions":
|
|
595
602
|
return {
|
|
596
603
|
queryKind: n.queryKind,
|
|
597
|
-
request:
|
|
604
|
+
request: Ie(n)
|
|
598
605
|
};
|
|
599
606
|
case "sql":
|
|
600
607
|
return {
|
|
601
608
|
queryKind: n.queryKind,
|
|
602
|
-
request:
|
|
609
|
+
request: xe(n)
|
|
603
610
|
};
|
|
604
611
|
case "matrix":
|
|
605
612
|
return {
|
|
606
613
|
queryKind: n.queryKind,
|
|
607
|
-
request:
|
|
614
|
+
request: De(n)
|
|
608
615
|
};
|
|
609
616
|
default:
|
|
610
617
|
return K(n);
|
|
@@ -679,7 +686,7 @@ function Ne(e, t = {}) {
|
|
|
679
686
|
};
|
|
680
687
|
}
|
|
681
688
|
case "analysis": {
|
|
682
|
-
const o =
|
|
689
|
+
const o = N(s);
|
|
683
690
|
return {
|
|
684
691
|
id: n.id,
|
|
685
692
|
intent: r.request.intent,
|
|
@@ -757,7 +764,7 @@ function Ee(e, t, n, r) {
|
|
|
757
764
|
data: n,
|
|
758
765
|
error: null
|
|
759
766
|
});
|
|
760
|
-
return u.current = t, s.current = r,
|
|
767
|
+
return u.current = t, s.current = r, L(() => {
|
|
761
768
|
let c;
|
|
762
769
|
try {
|
|
763
770
|
c = u.current({
|
|
@@ -803,19 +810,19 @@ function K(e) {
|
|
|
803
810
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
804
811
|
}
|
|
805
812
|
export {
|
|
806
|
-
|
|
813
|
+
z as SemaphorDataAppContext,
|
|
807
814
|
je as SemaphorDataAppProvider,
|
|
808
815
|
de as createSemaphorQueryExecutor,
|
|
809
816
|
_e as defineSemaphorDataApp,
|
|
810
817
|
Te as defineSemaphorInput,
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
818
|
+
k as hasSemaphorInputValue,
|
|
819
|
+
N as normalizeSemaphorAnalysisPayload,
|
|
820
|
+
ze as normalizeSemaphorAnalysisQueryOptions,
|
|
814
821
|
V as normalizeSemaphorInputOptions,
|
|
815
822
|
ve as readWindowRuntime,
|
|
816
823
|
Pe as semaphor,
|
|
817
824
|
y as toSemaphorActiveInputSnapshots,
|
|
818
|
-
|
|
825
|
+
F as toSemaphorAnalysisIntent,
|
|
819
826
|
Y as toSemaphorAnalysisQueryOptions,
|
|
820
827
|
Me as toSemaphorInputBinding,
|
|
821
828
|
Be as toSemaphorInputBindings,
|
|
@@ -823,12 +830,12 @@ export {
|
|
|
823
830
|
Qe as toSemaphorInputSnapshots,
|
|
824
831
|
$ as toSemaphorInputSpec,
|
|
825
832
|
M as toSemaphorMatrixIntent,
|
|
826
|
-
|
|
833
|
+
H as toSemaphorMetricIntent,
|
|
827
834
|
J as toSemaphorRecordsIntent,
|
|
828
835
|
B as toSemaphorSqlIntent,
|
|
829
836
|
ye as useSemaphorDataAppRuntime,
|
|
830
837
|
Ve as useSemaphorInput,
|
|
831
838
|
$e as useSemaphorInputs,
|
|
832
|
-
|
|
839
|
+
Le as useSemaphorQuery,
|
|
833
840
|
Je as validateSemaphorDataAppQuerySpecs
|
|
834
841
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/validators-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/validators-DHee9kM2.js");require("../chunks/catalog-field-grounding-Du6mKDcF.js");require("../chunks/source-identity-C-xaeE_I.js");const e=require("../chunks/validation-D4Zz6WPD.js");exports.normalizeSemaphorAnalysisQueryOptions=e.normalizeSemaphorAnalysisQueryOptions;exports.validateSemaphorDataAppQuerySpecs=e.validateSemaphorDataAppQuerySpecs;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "../chunks/validators-
|
|
1
|
+
import "../chunks/validators-CuKnUZFO.js";
|
|
2
|
+
import "../chunks/catalog-field-grounding-DoEBOXQd.js";
|
|
2
3
|
import "../chunks/source-identity-Dj3dryN9.js";
|
|
3
|
-
import { m
|
|
4
|
+
import { m, v as i } from "../chunks/validation-CQFpcSSP.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
m as normalizeSemaphorAnalysisQueryOptions,
|
|
7
|
+
i as validateSemaphorDataAppQuerySpecs
|
|
7
8
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-BtqYNH_S.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-CUGzkNcE.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-fIkmwzUt.js"),C=require("react"),N=require("./chunks/resource-management-panel-Bf8-3eUf.js"),y=require("./types/index.cjs"),_=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const r=require("./chunks/dashboard-briefing-launcher-BEZnvIla.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");require("./chunks/index-BxM99sFL.js");function R(o){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(i,n,u.get?u:{enumerable:!0,get:()=>o[n]})}}return i.default=o,Object.freeze(i)}const h=R(C);function j(o){const{displayPreferences:i,cardId:n,...u}=o,s={...u,id:o.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:s,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:o.cardId}),t.jsx(e.UXProvider,{appearance:o.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",cardId:n,...s,children:t.jsx(w,{cardId:n})})})})]})})}function w({cardId:o}){const i=a.useDashboardStore(s=>{var c;return(c=s.dashboard)==null?void 0:c.sheets}),{card:n,frame:u}=C.useMemo(()=>{const s=i==null?void 0:i.flatMap(l=>l.frames),c=s==null?void 0:s.flatMap(l=>l==null?void 0:l.cards),D=c==null?void 0:c.find(l=>(l==null?void 0:l.id)===o),E=s==null?void 0:s.find(l=>{var p;return(p=l==null?void 0:l.cards)==null?void 0:p.find(g=>(g==null?void 0:g.id)===o)});return{card:D,frame:E}},[i,o]);return!n||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${o}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:s,resetErrorBoundary:c})=>t.jsx(e.FallbackVisual,{error:s,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:u})})})}function M(o,i,n,u){C.useEffect(()=>{o&&!n&&i&&u(e.cloneDeep(i))},[o,n,i,u])}function L({name:o,items:i,value:n,onChange:u,isLoading:s,isError:c,refetch:D,className:E,icon:l,showNone:p=!1}){const g=h.useRef(null),[b,T]=h.useState(!1),[B,A]=h.useState("100%"),x=p?[...i||[],{id:"none",name:"None"}]:i;h.useLayoutEffect(()=>{g.current&&A(g.current.offsetWidth)},[]);function F(){var f;return s?"Loading...":c?"Error":n?(f=i==null?void 0:i.find(m=>m.id===n))==null?void 0:f.name:`Select ${o}`}function v(f,m){u(m),T(!1)}return t.jsxs(a.Popover,{open:b,onOpenChange:T,children:[t.jsx(a.PopoverTrigger,{asChild:!0,children:t.jsxs(a.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:a.cn("flex h-9 w-full justify-between",E),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[l&&t.jsx("div",{className:"mr-2",children:l}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),t.jsx(a.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(a.PopoverContent,{className:"w-full p-0",style:{minWidth:B},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:D,children:t.jsx(e.RefreshCw,{className:a.cn("size-3.5 opacity-50",s&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",o==null?void 0:o.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:m=>v(m,f.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(a.Check,{className:a.cn("size-4",n===f.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function I(o,i){C.useEffect(()=>(o&&i&&(window.__SEMAPHOR_PRINT_STATE__={...i}),()=>{o&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[o,i])}exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createExport=e.createExport;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.CalendarPreferencesDialog=P.CalendarPreferencesDialog;exports.createEmptyKpiConfig=a.createEmptyKpiConfig;exports.createSqlGenConfig=a.createSqlGenConfig;exports.emitDashboardLoad=a.emitDashboardLoad;exports.emitDashboardUnload=a.emitDashboardUnload;exports.fmt=a.fmt;exports.getColumnDataType=a.getColumnDataType;exports.getFilterValueType=a.getFilterValueType;exports.getFormattedTableNameForQuery=a.getFormattedTableNameForQuery;exports.getQualifiedTableName=a.getQualifiedTableName;exports.getSql=a.getSql;exports.invalidateToken=a.invalidateToken;exports.isBooleanDataType=a.isBooleanDataType;exports.isColumnInSqlGen=a.isColumnInSqlGen;exports.isDateDataType=a.isDateDataType;exports.isNumberDataType=a.isNumberDataType;exports.isTextDataType=a.isTextDataType;exports.resolveDataType=a.resolveDataType;exports.resolveDatamodelName=a.resolveDatamodelName;exports.useCurrentActiveCard=a.useCurrentActiveCard;exports.useCurrentCardConfig=a.useCurrentCardConfig;exports.useCurrentSheetActiveCards=a.useCurrentSheetActiveCards;exports.useDashboardActions=a.useDashboardActions;exports.useDashboardStore=a.useDashboardStore;exports.useEditorActions=a.useEditorActions;exports.useEditorStore=a.useEditorStore;exports.ResourceManagementPanel=N.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=y.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=y.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=_.useDebouncedDirtyCheck;exports.AdvancedModeToggle=r.AdvancedModeToggle;exports.BriefingAuthor=r.BriefingAuthor;exports.BriefingsApiError=r.BriefingsApiError;exports.DashboardBriefingLauncher=r.DashboardBriefingLauncher;exports.DashboardControlsSettings=r.DashboardControlsSettings;exports.DashboardFilterControlsButton=r.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=r.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=r.DocumentControlsSettings;exports.ExportNotificationItem=r.ExportNotificationItem;exports.ExportNotificationList=r.ExportNotificationList;exports.NotificationBell=r.NotificationBell;exports.UnsavedChangesAlert=r.UnsavedChangesAlert;exports.VisualEditingControls=r.VisualEditingControls;exports.WatchDashboardButton=r.WatchDashboardButton;exports.applyBriefingFormPatch=r.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=r.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=r.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=r.briefingToFormDraft;exports.cancelBriefingRun=r.cancelBriefingRun;exports.createBriefing=r.createBriefing;exports.createBriefingFormDraft=r.createBriefingFormDraft;exports.deleteBriefing=r.deleteBriefing;exports.deleteBriefingRun=r.deleteBriefingRun;exports.getBriefing=r.getBriefing;exports.getBriefingArtifact=r.getBriefingArtifact;exports.getBriefingEvidence=r.getBriefingEvidence;exports.getBriefingPreviewRun=r.getBriefingPreviewRun;exports.getBriefingRun=r.getBriefingRun;exports.listBriefingRuns=r.listBriefingRuns;exports.listBriefingTenantSummaries=r.listBriefingTenantSummaries;exports.listBriefings=r.listBriefings;exports.pauseBriefing=r.pauseBriefing;exports.polishBriefingText=r.polishBriefingText;exports.previewBriefingPlan=r.previewBriefingPlan;exports.resumeBriefing=r.resumeBriefing;exports.runBriefingNow=r.runBriefingNow;exports.runBriefingPreview=r.runBriefingPreview;exports.updateBriefing=r.updateBriefing;exports.useExportPolling=r.useExportPolling;exports.useExportRecovery=r.useExportRecovery;exports.validateBriefingFormDraft=r.validateBriefingFormDraft;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=L;exports.Visual=j;exports.useExposePrintState=I;exports.usePristineSnapshotInitializer=M;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DlLvzmJF.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-Dn6o2r2Y.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-fIkmwzUt.js"),C=require("react"),N=require("./chunks/resource-management-panel-DytUMSGA.js"),y=require("./types/index.cjs"),_=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const r=require("./chunks/dashboard-briefing-launcher-BO-kXtEd.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");require("./chunks/index-BxM99sFL.js");function R(o){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(i,n,u.get?u:{enumerable:!0,get:()=>o[n]})}}return i.default=o,Object.freeze(i)}const h=R(C);function j(o){const{displayPreferences:i,cardId:n,...u}=o,s={...u,id:o.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:s,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:o.cardId}),t.jsx(e.UXProvider,{appearance:o.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",cardId:n,...s,children:t.jsx(w,{cardId:n})})})})]})})}function w({cardId:o}){const i=a.useDashboardStore(s=>{var c;return(c=s.dashboard)==null?void 0:c.sheets}),{card:n,frame:u}=C.useMemo(()=>{const s=i==null?void 0:i.flatMap(l=>l.frames),c=s==null?void 0:s.flatMap(l=>l==null?void 0:l.cards),D=c==null?void 0:c.find(l=>(l==null?void 0:l.id)===o),E=s==null?void 0:s.find(l=>{var p;return(p=l==null?void 0:l.cards)==null?void 0:p.find(g=>(g==null?void 0:g.id)===o)});return{card:D,frame:E}},[i,o]);return!n||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${o}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:s,resetErrorBoundary:c})=>t.jsx(e.FallbackVisual,{error:s,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:u})})})}function M(o,i,n,u){C.useEffect(()=>{o&&!n&&i&&u(e.cloneDeep(i))},[o,n,i,u])}function L({name:o,items:i,value:n,onChange:u,isLoading:s,isError:c,refetch:D,className:E,icon:l,showNone:p=!1}){const g=h.useRef(null),[b,T]=h.useState(!1),[B,A]=h.useState("100%"),x=p?[...i||[],{id:"none",name:"None"}]:i;h.useLayoutEffect(()=>{g.current&&A(g.current.offsetWidth)},[]);function F(){var f;return s?"Loading...":c?"Error":n?(f=i==null?void 0:i.find(m=>m.id===n))==null?void 0:f.name:`Select ${o}`}function v(f,m){u(m),T(!1)}return t.jsxs(a.Popover,{open:b,onOpenChange:T,children:[t.jsx(a.PopoverTrigger,{asChild:!0,children:t.jsxs(a.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:a.cn("flex h-9 w-full justify-between",E),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[l&&t.jsx("div",{className:"mr-2",children:l}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),t.jsx(a.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(a.PopoverContent,{className:"w-full p-0",style:{minWidth:B},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:D,children:t.jsx(e.RefreshCw,{className:a.cn("size-3.5 opacity-50",s&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",o==null?void 0:o.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:m=>v(m,f.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(a.Check,{className:a.cn("size-4",n===f.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function I(o,i){C.useEffect(()=>(o&&i&&(window.__SEMAPHOR_PRINT_STATE__={...i}),()=>{o&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[o,i])}exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createExport=e.createExport;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.CalendarPreferencesDialog=P.CalendarPreferencesDialog;exports.createEmptyKpiConfig=a.createEmptyKpiConfig;exports.createSqlGenConfig=a.createSqlGenConfig;exports.emitDashboardLoad=a.emitDashboardLoad;exports.emitDashboardUnload=a.emitDashboardUnload;exports.fmt=a.fmt;exports.getColumnDataType=a.getColumnDataType;exports.getFilterValueType=a.getFilterValueType;exports.getFormattedTableNameForQuery=a.getFormattedTableNameForQuery;exports.getQualifiedTableName=a.getQualifiedTableName;exports.getSql=a.getSql;exports.invalidateToken=a.invalidateToken;exports.isBooleanDataType=a.isBooleanDataType;exports.isColumnInSqlGen=a.isColumnInSqlGen;exports.isDateDataType=a.isDateDataType;exports.isNumberDataType=a.isNumberDataType;exports.isTextDataType=a.isTextDataType;exports.resolveDataType=a.resolveDataType;exports.resolveDatamodelName=a.resolveDatamodelName;exports.useCurrentActiveCard=a.useCurrentActiveCard;exports.useCurrentCardConfig=a.useCurrentCardConfig;exports.useCurrentSheetActiveCards=a.useCurrentSheetActiveCards;exports.useDashboardActions=a.useDashboardActions;exports.useDashboardStore=a.useDashboardStore;exports.useEditorActions=a.useEditorActions;exports.useEditorStore=a.useEditorStore;exports.ResourceManagementPanel=N.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=y.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=y.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=_.useDebouncedDirtyCheck;exports.AdvancedModeToggle=r.AdvancedModeToggle;exports.BriefingAuthor=r.BriefingAuthor;exports.BriefingsApiError=r.BriefingsApiError;exports.DashboardBriefingLauncher=r.DashboardBriefingLauncher;exports.DashboardControlsSettings=r.DashboardControlsSettings;exports.DashboardFilterControlsButton=r.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=r.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=r.DocumentControlsSettings;exports.ExportNotificationItem=r.ExportNotificationItem;exports.ExportNotificationList=r.ExportNotificationList;exports.NotificationBell=r.NotificationBell;exports.UnsavedChangesAlert=r.UnsavedChangesAlert;exports.VisualEditingControls=r.VisualEditingControls;exports.WatchDashboardButton=r.WatchDashboardButton;exports.applyBriefingFormPatch=r.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=r.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=r.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=r.briefingToFormDraft;exports.cancelBriefingRun=r.cancelBriefingRun;exports.createBriefing=r.createBriefing;exports.createBriefingFormDraft=r.createBriefingFormDraft;exports.deleteBriefing=r.deleteBriefing;exports.deleteBriefingRun=r.deleteBriefingRun;exports.getBriefing=r.getBriefing;exports.getBriefingArtifact=r.getBriefingArtifact;exports.getBriefingEvidence=r.getBriefingEvidence;exports.getBriefingPreviewRun=r.getBriefingPreviewRun;exports.getBriefingRun=r.getBriefingRun;exports.listBriefingRuns=r.listBriefingRuns;exports.listBriefingTenantSummaries=r.listBriefingTenantSummaries;exports.listBriefings=r.listBriefings;exports.pauseBriefing=r.pauseBriefing;exports.polishBriefingText=r.polishBriefingText;exports.previewBriefingPlan=r.previewBriefingPlan;exports.resumeBriefing=r.resumeBriefing;exports.runBriefingNow=r.runBriefingNow;exports.runBriefingPreview=r.runBriefingPreview;exports.updateBriefing=r.updateBriefing;exports.useExportPolling=r.useExportPolling;exports.useExportRecovery=r.useExportRecovery;exports.validateBriefingFormDraft=r.validateBriefingFormDraft;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=L;exports.Visual=j;exports.useExposePrintState=I;exports.usePristineSnapshotInitializer=M;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { E as T, F as N, S, p as P, U as _, q as w, r as F, s as x, t as R, v as I, C as M, h as L, I as k, w as U, i as O, j as z, k as V, l as q } from "./chunks/index-
|
|
2
|
-
import { V as ca, D as fa, Q as ma, P as pa, M as ha, a8 as ga, z as Ca, G as Da, G as Ea, H as xa, T as Ta, a as ba, a7 as ya, a3 as va, O as Aa, N as Ba, ab as Na, a6 as Sa, a5 as Pa, a4 as _a, aa as wa, a9 as Fa, a0 as Ra, Z as Ia, L as Ma, X as La, K as ka, y as Ua, W as Oa, Y as za, A as Va, a2 as qa, $ as Ha, _ as Wa, a1 as ja, x as Ga, J as Qa, B as Ka } from "./chunks/index-
|
|
1
|
+
import { E as T, F as N, S, p as P, U as _, q as w, r as F, s as x, t as R, v as I, C as M, h as L, I as k, w as U, i as O, j as z, k as V, l as q } from "./chunks/index-C0Qnfr_7.js";
|
|
2
|
+
import { V as ca, D as fa, Q as ma, P as pa, M as ha, a8 as ga, z as Ca, G as Da, G as Ea, H as xa, T as Ta, a as ba, a7 as ya, a3 as va, O as Aa, N as Ba, ab as Na, a6 as Sa, a5 as Pa, a4 as _a, aa as wa, a9 as Fa, a0 as Ra, Z as Ia, L as Ma, X as La, K as ka, y as Ua, W as Oa, Y as za, A as Va, a2 as qa, $ as Ha, _ as Wa, a1 as ja, x as Ga, J as Qa, B as Ka } from "./chunks/index-C0Qnfr_7.js";
|
|
3
3
|
import { a as Ya, C as $a, D as Ja, E as Za, P as ae, g as ee, d as se, h as re, b as oe, c as te, i as ne } from "./chunks/common-types-4bjoIgvm.js";
|
|
4
|
-
import { C as le } from "./chunks/calendar-preferences-dialog-
|
|
4
|
+
import { C as le } from "./chunks/calendar-preferences-dialog-ClBAkMmF.js";
|
|
5
5
|
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
6
6
|
import { u as H, P as W, b as j, B as G, a as C, g as Q, d as K, e as X } from "./chunks/switch-Dkx2qEOr.js";
|
|
7
7
|
import { F as ue, q as ce, h as fe, i as me, k as pe, s as he, r as ge, w as Ce, x as De, p as Ee, j as xe, o as Te, t as be, n as ye, m as ve, l as Ae, y as Be, v as Ne, z as Se, D as Pe, A as _e, E as we, H as Fe, G as Re } from "./chunks/switch-Dkx2qEOr.js";
|
|
8
8
|
import * as m from "react";
|
|
9
9
|
import { useMemo as Y, useEffect as b } from "react";
|
|
10
|
-
import { ResourceManagementPanel as Me } from "./chunks/resource-management-panel-
|
|
10
|
+
import { ResourceManagementPanel as Me } from "./chunks/resource-management-panel-YvIfaphX.js";
|
|
11
11
|
import { DEFAULT_CALENDAR_CONTEXT as ke, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Ue } from "./types/index.js";
|
|
12
12
|
import { u as ze } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
|
|
13
13
|
import "react-dom";
|
|
14
14
|
import "./chunks/index-CJdxSyQq.js";
|
|
15
|
-
import { A as qe, J as He, B as We, K as je, D as Ge, d as Qe, e as Ke, c as Xe, a as Ye, E as $e, N as Je, U as Ze, V as as, W as es, C as ss, G as rs, H as os, F as ts, t as ns, h as is, z as ls, j as ds, v as us, g as cs, w as fs, x as ms, o as ps, s as hs, q as gs, f as Cs, l as Ds, p as Es, y as xs, m as Ts, r as bs, k as ys, n as vs, i as As, u as Bs, b as Ns, I as Ss } from "./chunks/dashboard-briefing-launcher-
|
|
15
|
+
import { A as qe, J as He, B as We, K as je, D as Ge, d as Qe, e as Ke, c as Xe, a as Ye, E as $e, N as Je, U as Ze, V as as, W as es, C as ss, G as rs, H as os, F as ts, t as ns, h as is, z as ls, j as ds, v as us, g as cs, w as fs, x as ms, o as ps, s as hs, q as gs, f as Cs, l as Ds, p as Es, y as xs, m as Ts, r as bs, k as ys, n as vs, i as As, u as Bs, b as Ns, I as Ss } from "./chunks/dashboard-briefing-launcher-D3Xfc_26.js";
|
|
16
16
|
import { n as _s, s as ws } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
17
17
|
import "./chunks/index-CuHybtft.js";
|
|
18
18
|
function ta(e) {
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-DlLvzmJF.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-Dn6o2r2Y.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e } from "../chunks/index-
|
|
1
|
+
import { a as e } from "../chunks/index-C0Qnfr_7.js";
|
|
2
2
|
import { C, E } from "../chunks/common-types-4bjoIgvm.js";
|
|
3
|
-
import { C as s } from "../chunks/calendar-preferences-dialog-
|
|
3
|
+
import { C as s } from "../chunks/calendar-preferences-dialog-ClBAkMmF.js";
|
|
4
4
|
export {
|
|
5
5
|
C as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
s as CalendarPreferencesDialog,
|
|
@@ -789,12 +789,51 @@ export declare type SemaphorDashboardViewIntent = {
|
|
|
789
789
|
text?: string;
|
|
790
790
|
};
|
|
791
791
|
|
|
792
|
+
export declare type SemaphorDerivedFieldAggregationBehavior = 'additive' | 'non_additive' | 'ratio_of_sums' | 'weighted' | 'pre_aggregated' | 'snapshot';
|
|
793
|
+
|
|
794
|
+
export declare type SemaphorDerivedFieldAggregationStrategy = 'default' | 'symmetric_aggregate' | 'aggregate_then_join' | 'weighted';
|
|
795
|
+
|
|
796
|
+
export declare type SemaphorDerivedFieldComputeStage = 'row' | 'aggregate';
|
|
797
|
+
|
|
798
|
+
export declare type SemaphorDerivedFieldDefinition = {
|
|
799
|
+
kind: 'derived_field';
|
|
800
|
+
name: string;
|
|
801
|
+
label: string;
|
|
802
|
+
description?: string;
|
|
803
|
+
resultRole: SemaphorDerivedFieldResultRole;
|
|
804
|
+
dataType: NonNullable<SemaphorFieldRef['dataType']>;
|
|
805
|
+
computeStage: SemaphorDerivedFieldComputeStage;
|
|
806
|
+
expression: string;
|
|
807
|
+
expressionLanguage?: 'semaphor_sql_template';
|
|
808
|
+
inputs: Record<string, SemaphorDerivedFieldInput>;
|
|
809
|
+
defaultAggregate?: SemaphorAggregateFunction;
|
|
810
|
+
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
811
|
+
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
812
|
+
format?: unknown;
|
|
813
|
+
tags?: string[];
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
export declare type SemaphorDerivedFieldInput = {
|
|
817
|
+
kind: 'field';
|
|
818
|
+
field: SemaphorFieldRef;
|
|
819
|
+
aggregate?: SemaphorAggregateFunction;
|
|
820
|
+
} | {
|
|
821
|
+
kind: 'metric';
|
|
822
|
+
metric: SemaphorFieldRef;
|
|
823
|
+
} | {
|
|
824
|
+
kind: 'dimension';
|
|
825
|
+
dimension: SemaphorFieldRef;
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
export declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id' | 'filter';
|
|
829
|
+
|
|
792
830
|
export declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
793
831
|
|
|
794
832
|
export declare type SemaphorExecutionFieldRef = SemaphorFieldRef & {
|
|
795
833
|
semanticAggregate?: SemaphorAggregateFunction;
|
|
796
834
|
effectiveAggregate?: SemaphorAggregateFunction;
|
|
797
835
|
aggregateSource?: SemaphorMetricAggregateSource;
|
|
836
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
798
837
|
};
|
|
799
838
|
|
|
800
839
|
export declare type SemaphorExperienceIntent = SemaphorDashboardIntent;
|
|
@@ -841,6 +880,7 @@ export declare type SemaphorInputOptionsIntent = {
|
|
|
841
880
|
field: SemaphorFieldRef;
|
|
842
881
|
search?: string;
|
|
843
882
|
limit?: number;
|
|
883
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
844
884
|
};
|
|
845
885
|
|
|
846
886
|
export declare type SemaphorInputOptionsResult = SemaphorAnalyticsResultBase & {
|
|
@@ -1059,6 +1099,7 @@ export declare type SemaphorMetricIntent = {
|
|
|
1059
1099
|
};
|
|
1060
1100
|
inputs?: SemaphorInputBinding[];
|
|
1061
1101
|
limit?: number;
|
|
1102
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
1062
1103
|
};
|
|
1063
1104
|
|
|
1064
1105
|
export declare type SemaphorMetricResult = SemaphorAnalyticsResultBase & {
|
|
@@ -1135,6 +1176,7 @@ export declare type SemaphorRecordsIntent = {
|
|
|
1135
1176
|
direction: 'asc' | 'desc';
|
|
1136
1177
|
};
|
|
1137
1178
|
inputs?: SemaphorInputBinding[];
|
|
1179
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
1138
1180
|
};
|
|
1139
1181
|
|
|
1140
1182
|
export declare type SemaphorRecordsResult = SemaphorAnalyticsResultBase & {
|
|
@@ -1180,6 +1222,44 @@ export declare type SemaphorRelativeTimeWindow = {
|
|
|
1180
1222
|
completeness?: 'include_partial' | 'complete_periods';
|
|
1181
1223
|
};
|
|
1182
1224
|
|
|
1225
|
+
export declare type SemaphorResultCalculation = {
|
|
1226
|
+
id: string;
|
|
1227
|
+
label: string;
|
|
1228
|
+
kind: 'percent_of_total';
|
|
1229
|
+
input: SemaphorResultColumnRef;
|
|
1230
|
+
denominator?: SemaphorResultCalculationDenominator;
|
|
1231
|
+
output: SemaphorResultCalculationOutput;
|
|
1232
|
+
} | {
|
|
1233
|
+
id: string;
|
|
1234
|
+
label: string;
|
|
1235
|
+
kind: 'rank';
|
|
1236
|
+
input: SemaphorResultColumnRef;
|
|
1237
|
+
order?: 'asc' | 'desc';
|
|
1238
|
+
output: SemaphorResultCalculationOutput;
|
|
1239
|
+
} | {
|
|
1240
|
+
id: string;
|
|
1241
|
+
label: string;
|
|
1242
|
+
kind: 'running_total' | 'previous_row_delta';
|
|
1243
|
+
input: SemaphorResultColumnRef;
|
|
1244
|
+
orderBy?: SemaphorResultColumnRef;
|
|
1245
|
+
output: SemaphorResultCalculationOutput;
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
export declare type SemaphorResultCalculationDenominator = {
|
|
1249
|
+
scope: 'returned_result';
|
|
1250
|
+
} | {
|
|
1251
|
+
scope: 'population';
|
|
1252
|
+
metric: SemaphorFieldRef;
|
|
1253
|
+
filters?: SemaphorAnalyticsFilter[];
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
export declare type SemaphorResultCalculationOutput = {
|
|
1257
|
+
key: string;
|
|
1258
|
+
label?: string;
|
|
1259
|
+
dataType?: SemaphorFieldRef['dataType'];
|
|
1260
|
+
format?: unknown;
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1183
1263
|
export declare type SemaphorResultColumn = {
|
|
1184
1264
|
/**
|
|
1185
1265
|
* Stable row accessor for this result. Consumers should read values with
|
|
@@ -1198,6 +1278,13 @@ export declare type SemaphorResultColumn = {
|
|
|
1198
1278
|
dataType?: SemaphorFieldRef['dataType'];
|
|
1199
1279
|
aggregate?: SemaphorFieldRef['aggregate'];
|
|
1200
1280
|
source?: SemaphorFieldRef['source'];
|
|
1281
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
export declare type SemaphorResultColumnRef = {
|
|
1285
|
+
columnKey: string;
|
|
1286
|
+
} | {
|
|
1287
|
+
field: SemaphorFieldRef;
|
|
1201
1288
|
};
|
|
1202
1289
|
|
|
1203
1290
|
export declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
@@ -1306,6 +1393,10 @@ export declare function validateSemaphorAnalyticsRecoveryPlan(plan: SemaphorAnal
|
|
|
1306
1393
|
|
|
1307
1394
|
export declare function validateSemaphorDashboardIntent(intent: SemaphorDashboardIntent): SemaphorValidationResult;
|
|
1308
1395
|
|
|
1396
|
+
export declare function validateSemaphorDerivedFieldDefinition(definition: SemaphorDerivedFieldDefinition): SemaphorValidationResult;
|
|
1397
|
+
|
|
1309
1398
|
export declare function validateSemaphorOperationIntent(intent: SemaphorOperationIntent): SemaphorAnalyticsValidationResult;
|
|
1310
1399
|
|
|
1400
|
+
export declare function validateSemaphorResultCalculation(calculation: SemaphorResultCalculation): SemaphorValidationResult;
|
|
1401
|
+
|
|
1311
1402
|
export { }
|