react-semaphor 0.1.525 → 0.1.526
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/brand-studio/index.js +37 -37
- package/dist/briefings/index.js +3 -3
- package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-D1ofR4KJ.js} +28 -28
- package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-9sv4e-Vb.js} +15 -15
- package/dist/chunks/{switch-CWPcwAZ4.js → code-highlight-994tgM9v.js} +6309 -8642
- package/dist/chunks/dashboard-CsHvEtjN.js +15 -0
- package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-DXz1GhFZ.js} +364 -370
- package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-Df8qOSrs.js} +163 -168
- package/dist/chunks/dashboard-json-Xldp0qww.js +65 -0
- package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-COHBqyic.js} +1108 -1107
- package/dist/chunks/editor-action-buttons-DahlP57T.js +2071 -0
- package/dist/chunks/{index-ON7Gpvcv.js → index-CbjuruKe.js} +40 -40
- package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-2VAzGlt8.js} +29 -29
- package/dist/chunks/pre-block-Cq1RqhZX.js +3987 -0
- package/dist/chunks/report-preferences-dialog-BcH-0lR-.js +1232 -0
- package/dist/chunks/search-CJz-QQ0Q.js +24 -0
- package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-NF5C07yM.js} +25 -46
- package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-BLRDuLr4.js} +142229 -147767
- package/dist/chunks/slider-BYIH4icg.js +877 -0
- package/dist/chunks/switch-XaAACBrJ.js +2234 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +4 -4
- package/dist/data-app-builder/index.js +67 -67
- package/dist/data-app-sdk/index.js +33 -32
- package/dist/index.js +435 -243
- package/dist/surfboard/index.js +4 -5
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
- package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
- package/dist/types/components/editor/editor.d.ts +1 -1
- package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
- package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
- package/dist/types/components/providers/theme-provider.d.ts +1 -1
- package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
- package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
- package/dist/types/components/visual/column-display-utils.d.ts +1 -1
- package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
- package/dist/types/components/visual/settings/color-format.d.ts +1 -1
- package/dist/types/components/visual/visual-utils.d.ts +1 -1
- package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
- package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
- package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
- package/dist/types/lib/stores/editor-store.d.ts +1 -2
- package/dist/types/lib/stores/table-actions.d.ts +2 -1
- package/dist/types/lib/types/token-types.d.ts +0 -12
- package/dist/types/lib/utils.d.ts +0 -2
- package/package.json +2 -1
- package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
- package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
- package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
- package/dist/types/lib/encrypt-utils.d.ts +0 -9
|
@@ -9,7 +9,7 @@ import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as he } from "../value-format
|
|
|
9
9
|
import { k as It, i as Ct, g as Tt, j as wt, e as $t, M as xt, c as kt, b as Et, P as G } from "./pivot-result-lifecycle-BFO354lk.js";
|
|
10
10
|
import { z as T } from "zod";
|
|
11
11
|
import { r as St } from "./matrix-definition-E5gXXSTZ.js";
|
|
12
|
-
import { h as De, i as ge, r as Me, a as Pe, v as _t, b as Ft } from "./card-config-utils-
|
|
12
|
+
import { h as De, i as ge, r as Me, a as Pe, v as _t, b as Ft } from "./card-config-utils-9sv4e-Vb.js";
|
|
13
13
|
import { r as Rt } from "./matrix-card-CIlz0Dnp.js";
|
|
14
14
|
import { a as Be, s as At, i as Dt, o as Mt } from "./field-aggregations-BQjogiI1.js";
|
|
15
15
|
import { h as re, r as W, c as Pt, R as Bt, v as Ot } from "./raw-temporal-7bFbXd2a.js";
|
|
@@ -4001,7 +4001,7 @@ function mt(e) {
|
|
|
4001
4001
|
return typeof e == "string" && Jr.has(e);
|
|
4002
4002
|
}
|
|
4003
4003
|
export {
|
|
4004
|
-
|
|
4004
|
+
Pr as $,
|
|
4005
4005
|
fo as A,
|
|
4006
4006
|
$o as B,
|
|
4007
4007
|
Er as C,
|
|
@@ -4017,38 +4017,38 @@ export {
|
|
|
4017
4017
|
er as M,
|
|
4018
4018
|
tr as N,
|
|
4019
4019
|
ur as O,
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4020
|
+
Yt as P,
|
|
4021
|
+
mr as Q,
|
|
4022
|
+
be as R,
|
|
4023
|
+
ir as S,
|
|
4024
|
+
po as T,
|
|
4025
|
+
ao as U,
|
|
4026
|
+
so as V,
|
|
4027
|
+
mo as W,
|
|
4028
|
+
uo as X,
|
|
4029
|
+
Ve as Y,
|
|
4030
|
+
S as Z,
|
|
4031
|
+
xo as _,
|
|
4032
|
+
vr as a,
|
|
4033
|
+
Je as a0,
|
|
4034
|
+
Ro as a1,
|
|
4035
|
+
q as a2,
|
|
4036
|
+
Do as a3,
|
|
4037
|
+
jr as a4,
|
|
4038
|
+
Mo as a5,
|
|
4039
|
+
Qe as a6,
|
|
4040
|
+
Fo as a7,
|
|
4041
|
+
Wr as a8,
|
|
4042
|
+
Po as a9,
|
|
4043
4043
|
Eo as aA,
|
|
4044
4044
|
_r as aB,
|
|
4045
4045
|
Sr as aC,
|
|
4046
4046
|
Yr as aD,
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4047
|
+
sr as aa,
|
|
4048
|
+
pr as ab,
|
|
4049
|
+
Ue as ac,
|
|
4050
|
+
go as ad,
|
|
4051
|
+
_o as ae,
|
|
4052
4052
|
fe as af,
|
|
4053
4053
|
Zr as ag,
|
|
4054
4054
|
pe as ah,
|
|
@@ -4070,19 +4070,19 @@ export {
|
|
|
4070
4070
|
Uo as ax,
|
|
4071
4071
|
jo as ay,
|
|
4072
4072
|
mt as az,
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4073
|
+
Io as b,
|
|
4074
|
+
br as c,
|
|
4075
|
+
Oo as d,
|
|
4076
|
+
Ao as e,
|
|
4077
4077
|
Cr as f,
|
|
4078
|
-
|
|
4079
|
-
|
|
4078
|
+
Ir as g,
|
|
4079
|
+
Bo as h,
|
|
4080
4080
|
Se as i,
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4081
|
+
Z as j,
|
|
4082
|
+
To as k,
|
|
4083
|
+
Co as l,
|
|
4084
4084
|
Ge as m,
|
|
4085
|
-
|
|
4085
|
+
wo as n,
|
|
4086
4086
|
vo as o,
|
|
4087
4087
|
Ie as p,
|
|
4088
4088
|
bo as q,
|
package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-2VAzGlt8.js}
RENAMED
|
@@ -4,7 +4,7 @@ var x = (e, t, o) => re(e, typeof t != "symbol" ? t + "" : t, o);
|
|
|
4
4
|
import { h as oe, f as ne, U as ie, F as ae, a$ as G, G as se, an as P, al as ce, u as j, a0 as le } from "./validators-CsdOtZI6.js";
|
|
5
5
|
import { C as A } from "./common-types-C6cAQgyh.js";
|
|
6
6
|
import "./matrix-operation-contract-D32U2CSw.js";
|
|
7
|
-
import {
|
|
7
|
+
import { u as de, x as ue } from "./calculated-field-identity-D1ofR4KJ.js";
|
|
8
8
|
import { B as ge } from "./field-aggregations-BQjogiI1.js";
|
|
9
9
|
import { ZodError as fe } from "zod";
|
|
10
10
|
import { a as H } from "./matrix-card-CIlz0Dnp.js";
|
|
@@ -76,7 +76,7 @@ function Te(e, t) {
|
|
|
76
76
|
if (!o) return /* @__PURE__ */ new Date(NaN);
|
|
77
77
|
const r = !!o[4], i = R(o[1]), a = R(o[2]) - 1, d = R(o[3]), u = R(o[4]), g = R(o[5]) - 1;
|
|
78
78
|
if (r)
|
|
79
|
-
return Re(t, u, g) ?
|
|
79
|
+
return Re(t, u, g) ? Ce(t, u, g) : /* @__PURE__ */ new Date(NaN);
|
|
80
80
|
{
|
|
81
81
|
const O = /* @__PURE__ */ new Date(0);
|
|
82
82
|
return !we(t, a, d) || !Ee(t, i) ? /* @__PURE__ */ new Date(NaN) : (O.setUTCFullYear(t, a, Math.max(i, d)), O);
|
|
@@ -101,18 +101,18 @@ function he(e) {
|
|
|
101
101
|
const o = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), i = t[3] && parseInt(t[3]) || 0;
|
|
102
102
|
return Ae(r, i) ? o * (r * Y + i * Z) : NaN;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Ce(e, t, o) {
|
|
105
105
|
const r = /* @__PURE__ */ new Date(0);
|
|
106
106
|
r.setUTCFullYear(e, 0, 4);
|
|
107
107
|
const i = r.getUTCDay() || 7, a = (t - 1) * 7 + o + 1 - i;
|
|
108
108
|
return r.setUTCDate(r.getUTCDate() + a), r;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const ye = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
111
111
|
function W(e) {
|
|
112
112
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
113
113
|
}
|
|
114
114
|
function we(e, t, o) {
|
|
115
|
-
return t >= 0 && t <= 11 && o >= 1 && o <= (
|
|
115
|
+
return t >= 0 && t <= 11 && o >= 1 && o <= (ye[t] || (W(e) ? 29 : 28));
|
|
116
116
|
}
|
|
117
117
|
function Ee(e, t) {
|
|
118
118
|
return t >= 1 && t <= (W(e) ? 366 : 365);
|
|
@@ -166,7 +166,7 @@ function ot(e, t, o) {
|
|
|
166
166
|
function nt(e, t) {
|
|
167
167
|
return `${e}-${t}`;
|
|
168
168
|
}
|
|
169
|
-
const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED",
|
|
169
|
+
const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED", Ve = "CONTROL_DEFINITION_DUPLICATE", ve = "CONTROL_DEFINITION_INVALID", V = "CONTROL_BINDING_MAPPING_MISSING", Me = "CONTROL_BINDING_TARGET_INVALID", q = "CONTROL_BINDING_VALUE_INVALID";
|
|
170
170
|
class I extends Error {
|
|
171
171
|
constructor(o, r) {
|
|
172
172
|
super(o);
|
|
@@ -182,14 +182,14 @@ function X(e, t) {
|
|
|
182
182
|
throw new I(
|
|
183
183
|
"Malformed control definition was provided for query execution.",
|
|
184
184
|
{
|
|
185
|
-
code:
|
|
185
|
+
code: ve
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
if (o.get(r.id))
|
|
189
189
|
throw new I(
|
|
190
190
|
`Duplicate control definition '${r.id}' was provided for query execution.`,
|
|
191
191
|
{
|
|
192
|
-
code:
|
|
192
|
+
code: Ve,
|
|
193
193
|
controlId: r.id
|
|
194
194
|
}
|
|
195
195
|
);
|
|
@@ -357,7 +357,7 @@ function z(e) {
|
|
|
357
357
|
throw new I(
|
|
358
358
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}'.`,
|
|
359
359
|
{
|
|
360
|
-
code:
|
|
360
|
+
code: V,
|
|
361
361
|
controlId: e.binding.controlId
|
|
362
362
|
}
|
|
363
363
|
);
|
|
@@ -369,7 +369,7 @@ function Ge(e) {
|
|
|
369
369
|
throw new I(
|
|
370
370
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid group-by field.`,
|
|
371
371
|
{
|
|
372
|
-
code:
|
|
372
|
+
code: V,
|
|
373
373
|
controlId: e.binding.controlId
|
|
374
374
|
}
|
|
375
375
|
);
|
|
@@ -381,7 +381,7 @@ function Pe(e) {
|
|
|
381
381
|
throw new I(
|
|
382
382
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid metric field.`,
|
|
383
383
|
{
|
|
384
|
-
code:
|
|
384
|
+
code: V,
|
|
385
385
|
controlId: e.binding.controlId
|
|
386
386
|
}
|
|
387
387
|
);
|
|
@@ -495,7 +495,7 @@ function lt(e) {
|
|
|
495
495
|
c.set(l.id, [...f, l]);
|
|
496
496
|
}
|
|
497
497
|
return g = { refs: n, byId: c }, g;
|
|
498
|
-
},
|
|
498
|
+
}, y = (n, c) => {
|
|
499
499
|
throw new I(n, {
|
|
500
500
|
code: Me,
|
|
501
501
|
...c ? { controlId: c } : {}
|
|
@@ -504,12 +504,12 @@ function lt(e) {
|
|
|
504
504
|
var f;
|
|
505
505
|
if (n.derivedField) return n.derivedField.dataType;
|
|
506
506
|
const l = O().refs.filter((h) => h.field.name === n.name && G(h.field.source ?? e.spec.source, n.source ?? e.spec.source));
|
|
507
|
-
return l.length > 1 ?
|
|
508
|
-
},
|
|
509
|
-
if (!D.success) return
|
|
507
|
+
return l.length > 1 ? y("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
|
|
508
|
+
}, v = (n, c) => de(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
|
|
509
|
+
if (!D.success) return y(D.error.message);
|
|
510
510
|
t = D.data;
|
|
511
511
|
const K = [...i, ...a].map((n) => {
|
|
512
|
-
const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ?
|
|
512
|
+
const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? v(D.data, n) : [];
|
|
513
513
|
return {
|
|
514
514
|
binding: n,
|
|
515
515
|
selectedValue: c,
|
|
@@ -519,7 +519,7 @@ function lt(e) {
|
|
|
519
519
|
for (const { binding: n, targetId: c, selectedValue: l } of K) {
|
|
520
520
|
if (l === void 0 || l === A)
|
|
521
521
|
continue;
|
|
522
|
-
const f = (s) =>
|
|
522
|
+
const f = (s) => y(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = v(t, n);
|
|
523
523
|
(!c || !ee.some((s) => s.id === c)) && f("Choose a valid Matrix level or measure target for this control.");
|
|
524
524
|
const M = `${n.target}:${c}`;
|
|
525
525
|
d.has(M) && f("Multiple controls cannot replace the same Matrix target."), d.add(M);
|
|
@@ -528,13 +528,13 @@ function lt(e) {
|
|
|
528
528
|
if (m.length !== 1) return f(m.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
|
|
529
529
|
const N = se.safeParse(m[0].field);
|
|
530
530
|
return N.success ? N.data : f(N.error.message);
|
|
531
|
-
}, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0,
|
|
531
|
+
}, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, C = w && typeof w == "object" && "kind" in w && w.kind === "matrix_instance" ? w.id : void 0;
|
|
532
532
|
if (h) {
|
|
533
533
|
u.set(c, n.controlId);
|
|
534
|
-
const s =
|
|
535
|
-
(p) => p.id ===
|
|
534
|
+
const s = C === void 0 ? void 0 : D.data.measures.find(
|
|
535
|
+
(p) => p.id === C && p.kind === "aggregate"
|
|
536
536
|
);
|
|
537
|
-
|
|
537
|
+
C !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
|
|
538
538
|
const m = n.target === "config_metric_selector" && !s ? Pe({ binding: n, selectedValue: l }) : void 0, N = ((s == null ? void 0 : s.kind) === "aggregate" ? s.aggregate : m == null ? void 0 : m.aggregate) ?? (n.target === "config_aggregation" ? z({ binding: n, selectedValue: l }) : void 0), _ = N === void 0 ? void 0 : ae.safeParse(N);
|
|
539
539
|
_ && !_.success && f("This aggregation is not supported by Matrix."), t = {
|
|
540
540
|
...t,
|
|
@@ -548,10 +548,10 @@ function lt(e) {
|
|
|
548
548
|
)
|
|
549
549
|
};
|
|
550
550
|
} else {
|
|
551
|
-
const s =
|
|
552
|
-
(p) => p.id ===
|
|
551
|
+
const s = C === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
|
|
552
|
+
(p) => p.id === C
|
|
553
553
|
);
|
|
554
|
-
|
|
554
|
+
C !== void 0 && !s && f("The selected Matrix level is no longer available.");
|
|
555
555
|
const m = n.target === "config_field_selector" && !s ? Ge({ binding: n, selectedValue: l }) : void 0, N = n.target === "config_grain" ? z({ binding: n, selectedValue: l }) : s ? s.grain : m == null ? void 0 : m.granularity;
|
|
556
556
|
N !== void 0 && !je.has(N) && f("This time grain is not supported by Matrix.");
|
|
557
557
|
const _ = (p) => p.map((E) => {
|
|
@@ -570,12 +570,12 @@ function lt(e) {
|
|
|
570
570
|
const l = t.measures.find((h) => h.id === n);
|
|
571
571
|
if (!l || l.kind !== "aggregate") continue;
|
|
572
572
|
const f = S(l.field, c);
|
|
573
|
-
ge(f).some((h) => h.value === l.aggregate) ||
|
|
573
|
+
ge(f).some((h) => h.value === l.aggregate) || y(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
|
|
574
574
|
}
|
|
575
575
|
try {
|
|
576
576
|
return ue(D.data, t);
|
|
577
577
|
} catch (n) {
|
|
578
|
-
if (n instanceof fe) return
|
|
578
|
+
if (n instanceof fe) return y(n.message);
|
|
579
579
|
throw n;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
@@ -615,9 +615,9 @@ export {
|
|
|
615
615
|
at as f,
|
|
616
616
|
nt as g,
|
|
617
617
|
st as h,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
Ve as i,
|
|
619
|
+
ve as j,
|
|
620
|
+
V as k,
|
|
621
621
|
Me as l,
|
|
622
622
|
dt as m,
|
|
623
623
|
q as n,
|