react-semaphor 0.1.477 → 0.1.478
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 +9 -9
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/{analyze-result-contract-OgPk-zGu.cjs → analyze-result-contract-BX_nQmPN.cjs} +1 -1
- package/dist/chunks/{analyze-result-contract-C8s8EUL5.js → analyze-result-contract-DsiAzCYn.js} +1 -1
- package/dist/chunks/{saved-temporal-bucket-format-CHsXUPJI.js → card-config-utils-CyDKaPNT.js} +190 -190
- package/dist/chunks/card-config-utils-D3Xuu0ub.cjs +1 -0
- package/dist/chunks/{common-types-C1IM7gao.cjs → common-types-BCSbPclk.cjs} +1 -1
- package/dist/chunks/{common-types-BLPy5_E0.js → common-types-D3r4PILe.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CXHq6ime.cjs → dashboard-briefing-launcher-7qAW16mO.cjs} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-C9d8CPxv.js → dashboard-briefing-launcher-DAhtLQPc.js} +134 -134
- package/dist/chunks/{dashboard-controls-BqDm4ARp.js → dashboard-controls-C_CBmEwW.js} +13 -12
- package/dist/chunks/{dashboard-controls-d7Yd2fJb.cjs → dashboard-controls-CoVqAeKG.cjs} +10 -10
- package/dist/chunks/{dashboard-input-contract-JFJZgenC.cjs → dashboard-date-comparison-definition-C93wv8Ua.cjs} +1 -1
- package/dist/chunks/{dashboard-input-contract-BrGdGFz0.js → dashboard-date-comparison-definition-KohOqBqR.js} +19 -19
- package/dist/chunks/dashboard-filter-value-compatibility-BAatYtUS.js +1215 -0
- package/dist/chunks/dashboard-filter-value-compatibility-Bco2gN96.cjs +1 -0
- package/dist/chunks/{dashboard-json-CL_vgcWq.js → dashboard-json-0w58H39L.js} +7 -7
- package/dist/chunks/dashboard-json-B3XSl7b_.cjs +1 -0
- package/dist/chunks/{edit-dashboard-visual-Dklel3MC.cjs → edit-dashboard-visual-BsLRKeuO.cjs} +6 -6
- package/dist/chunks/{edit-dashboard-visual-C0Zvyo-X.js → edit-dashboard-visual-BsWEU8xf.js} +277 -277
- package/dist/chunks/{editor-action-buttons-BOyUtX9j.js → editor-action-buttons-B3CB5c__.js} +39 -39
- package/dist/chunks/{editor-action-buttons-AcaZsiDy.cjs → editor-action-buttons-DMLDvrJD.cjs} +1 -1
- package/dist/chunks/{index-Cd8qGOXl.cjs → index--0Il-Bpd.cjs} +238 -238
- package/dist/chunks/{format-types-CFHQoIuk.js → index-BS0_dp0l.js} +168 -168
- package/dist/chunks/{index-D9S3j7_z.js → index-BvRREsU9.js} +9 -9
- package/dist/chunks/index-ByQgqT9d.cjs +1 -0
- package/dist/chunks/{index-v2MZLyus.cjs → index-CXeIDdjd.cjs} +1 -1
- package/dist/chunks/{index-DrdF7QR7.js → index-DgGcVyUs.js} +30518 -31308
- package/dist/chunks/matrix-result-contract-CFPnlcLm.cjs +1 -0
- package/dist/chunks/{matrix-result-contract-BpzhImar.js → matrix-result-contract-DFfUvb1r.js} +3 -3
- package/dist/chunks/{temporal-bucket-CtP7hKLa.js → metric-comparison-CTexJ8V1.js} +705 -705
- package/dist/chunks/metric-comparison-x0lipytf.cjs +1 -0
- package/dist/chunks/pivot-header-presentation-8Ra1RfHg.cjs +4 -0
- package/dist/chunks/{pivot-header-presentation-CaERAWpl.js → pivot-header-presentation-tpb_J900.js} +118 -118
- package/dist/chunks/{pivot-result-identity-CIZXsI53.js → pivot-result-identity-BIeP9v8I.js} +1 -1
- package/dist/chunks/{pivot-result-identity-DRUlTWUq.cjs → pivot-result-identity-BVnhG2rR.cjs} +1 -1
- package/dist/chunks/pivot-result-lifecycle-D_bRCqaB.cjs +1 -0
- package/dist/chunks/{pivot-result-lifecycle-B9FTybxN.js → pivot-result-lifecycle-mjJ1rBvV.js} +7 -7
- package/dist/chunks/{raw-temporal-contract-U8J9RlEH.js → raw-temporal-contract-BuQIB31z.js} +1 -1
- package/dist/chunks/{raw-temporal-contract-D8YuxTAg.cjs → raw-temporal-contract-vnNwLy9R.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-BjygtSP3.js → report-preferences-dialog-Bytgubvz.js} +25 -25
- package/dist/chunks/report-preferences-dialog-I0Pbn_Yb.cjs +1 -0
- package/dist/chunks/{report-runtime-context-DNbgCsko.js → report-runtime-context-B_pAmqxl.js} +1 -1
- package/dist/chunks/{report-runtime-context-RFiWq4wK.cjs → report-runtime-context-BfW4qiMJ.cjs} +1 -1
- package/dist/chunks/{source-entity-resolution-BDC-Qngk.cjs → source-entity-resolution-DCAAS-y8.cjs} +1 -1
- package/dist/chunks/{source-entity-resolution-ugN3sZUk.js → source-entity-resolution-WUstJID6.js} +1 -1
- package/dist/chunks/{switch-C8NihGV4.js → switch-BsGTOjuD.js} +12342 -11110
- package/dist/chunks/switch-Cpj3DrCZ.cjs +138 -0
- package/dist/chunks/{temporal-bucket-authoring-DJ9kK2wD.js → temporal-bucket-authoring-CyTCHy1K.js} +3 -3
- package/dist/chunks/temporal-bucket-authoring-DueSgLJU.cjs +1 -0
- package/dist/chunks/{temporal-bucket-contract-CZl5D7FZ.js → temporal-bucket-contract-BeOx0uYe.js} +1 -1
- package/dist/chunks/{temporal-bucket-contract-BD862TAa.cjs → temporal-bucket-contract-Cp-usD9Z.cjs} +1 -1
- package/dist/chunks/{token-types-CoHsSJ4E.cjs → token-types-D9eN35rf.cjs} +1 -1
- package/dist/chunks/{token-types-DfDtCqlw.js → token-types-Dvomvqw0.js} +1 -1
- package/dist/chunks/{update-policy-BGNXFgBU.cjs → update-policy-Buw2LmvX.cjs} +1 -1
- package/dist/chunks/{update-policy-BybMiM61.js → update-policy-MWg0aH3d.js} +1 -1
- package/dist/chunks/{validators-D-T-2HOR.js → validators-D3AarM2T.js} +662 -663
- package/dist/chunks/validators-DqIM0B3C.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +81 -79
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +3 -3
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +3 -3
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +9 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +177 -176
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/briefings.d.ts +11 -0
- package/dist/types/dashboard-authoring.d.ts +17 -0
- package/dist/types/dashboard.d.ts +11 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/main.d.ts +12 -0
- package/dist/types/shared.d.ts +11 -0
- package/dist/types/surfboard.d.ts +11 -0
- package/dist/types/types.d.ts +11 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-value-compatibility-BCVF9IHg.js +0 -1026
- package/dist/chunks/dashboard-filter-value-compatibility-DLkdeypb.cjs +0 -1
- package/dist/chunks/dashboard-json-BYQjTmqD.cjs +0 -1
- package/dist/chunks/format-types-PSZZ7hG8.cjs +0 -1
- package/dist/chunks/matrix-result-contract-Bhg60NtS.cjs +0 -1
- package/dist/chunks/pivot-header-presentation-CePk1R6g.cjs +0 -4
- package/dist/chunks/pivot-result-lifecycle-CcGt_29N.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-DW40ECz1.cjs +0 -1
- package/dist/chunks/saved-temporal-bucket-format-DNMtD77o.cjs +0 -1
- package/dist/chunks/switch-B1mZx2k9.cjs +0 -138
- package/dist/chunks/temporal-bucket-9Wz9Ds6H.cjs +0 -1
- package/dist/chunks/temporal-bucket-authoring-DSpzgXHc.cjs +0 -1
- package/dist/chunks/validators-DcshgK7w.cjs +0 -1
package/dist/chunks/{saved-temporal-bucket-format-CHsXUPJI.js → card-config-utils-CyDKaPNT.js}
RENAMED
|
@@ -1,13 +1,156 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./analyze-result-contract-C8s8EUL5.js";
|
|
1
|
+
import { O as P, am as v, m as R, F as O } from "./validators-D3AarM2T.js";
|
|
2
|
+
import "./analyze-result-contract-DsiAzCYn.js";
|
|
4
3
|
import "../value-format-preferences/index.js";
|
|
5
|
-
import { A as g } from "./temporal-bucket-authoring-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { A as g } from "./temporal-bucket-authoring-CyTCHy1K.js";
|
|
5
|
+
import { S as D, a as k } from "./color-CJvdlFM_.js";
|
|
6
|
+
let y;
|
|
7
|
+
const U = new Uint8Array(16);
|
|
8
|
+
function I() {
|
|
9
|
+
if (!y && (y = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !y))
|
|
10
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
11
|
+
return y(U);
|
|
12
|
+
}
|
|
13
|
+
const l = [];
|
|
14
|
+
for (let e = 0; e < 256; ++e)
|
|
15
|
+
l.push((e + 256).toString(16).slice(1));
|
|
16
|
+
function G(e, r = 0) {
|
|
17
|
+
return l[e[r + 0]] + l[e[r + 1]] + l[e[r + 2]] + l[e[r + 3]] + "-" + l[e[r + 4]] + l[e[r + 5]] + "-" + l[e[r + 6]] + l[e[r + 7]] + "-" + l[e[r + 8]] + l[e[r + 9]] + "-" + l[e[r + 10]] + l[e[r + 11]] + l[e[r + 12]] + l[e[r + 13]] + l[e[r + 14]] + l[e[r + 15]];
|
|
18
|
+
}
|
|
19
|
+
const L = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), E = {
|
|
20
|
+
randomUUID: L
|
|
21
|
+
};
|
|
22
|
+
function te(e, r, a) {
|
|
23
|
+
if (E.randomUUID && !e)
|
|
24
|
+
return E.randomUUID();
|
|
25
|
+
e = e || {};
|
|
26
|
+
const t = e.random || (e.rng || I)();
|
|
27
|
+
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, G(t);
|
|
9
28
|
}
|
|
10
29
|
function oe(e) {
|
|
30
|
+
return e.format != null || e.dateFormat != null;
|
|
31
|
+
}
|
|
32
|
+
const F = {
|
|
33
|
+
"Week of MMM DD, YYYY": {
|
|
34
|
+
type: "temporal_bucket",
|
|
35
|
+
presentation: { mode: "preset", preset: "week_of_short" }
|
|
36
|
+
},
|
|
37
|
+
"Week of MMMM DD, YYYY": {
|
|
38
|
+
type: "temporal_bucket",
|
|
39
|
+
presentation: { mode: "preset", preset: "week_of_long" }
|
|
40
|
+
},
|
|
41
|
+
"Q1 YYYY": {
|
|
42
|
+
type: "temporal_bucket",
|
|
43
|
+
presentation: { mode: "preset", preset: "quarter_short" }
|
|
44
|
+
},
|
|
45
|
+
"1st Quarter YYYY": {
|
|
46
|
+
type: "temporal_bucket",
|
|
47
|
+
presentation: { mode: "preset", preset: "quarter_long" }
|
|
48
|
+
},
|
|
49
|
+
"YYYY Q1": void 0,
|
|
50
|
+
"YYYY-Q1": void 0,
|
|
51
|
+
"Quarter 1, YYYY": void 0,
|
|
52
|
+
"YYYY-WW": void 0
|
|
53
|
+
};
|
|
54
|
+
function W(e, r, a, t) {
|
|
55
|
+
return {
|
|
56
|
+
code: r,
|
|
57
|
+
severity: "warning",
|
|
58
|
+
fieldId: e.fieldId,
|
|
59
|
+
...t ? { ignoredPattern: t } : {},
|
|
60
|
+
effectiveFormat: a
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function j(e, r) {
|
|
64
|
+
if (e.dateFormat === void 0 || e.dateFormat === null)
|
|
65
|
+
return { format: g };
|
|
66
|
+
if (typeof e.dateFormat != "string")
|
|
67
|
+
return {
|
|
68
|
+
format: g,
|
|
69
|
+
repairCode: "unsupported_pattern"
|
|
70
|
+
};
|
|
71
|
+
const a = e.dateFormat === "custom" ? typeof e.customFormat == "string" ? e.customFormat.trim() : "" : e.dateFormat.trim();
|
|
72
|
+
if (!a)
|
|
73
|
+
return {
|
|
74
|
+
format: g,
|
|
75
|
+
repairCode: "missing_custom_pattern"
|
|
76
|
+
};
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(F, a)) {
|
|
78
|
+
const n = F[a];
|
|
79
|
+
return n ? v(
|
|
80
|
+
n,
|
|
81
|
+
r
|
|
82
|
+
).ok ? { format: n } : {
|
|
83
|
+
format: g,
|
|
84
|
+
repairCode: "grain_incompatible_pattern",
|
|
85
|
+
ignoredPattern: a
|
|
86
|
+
} : {
|
|
87
|
+
format: g,
|
|
88
|
+
repairCode: "unsupported_pattern",
|
|
89
|
+
ignoredPattern: a
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const t = {
|
|
93
|
+
type: "temporal_bucket",
|
|
94
|
+
presentation: { mode: "pattern", pattern: a }
|
|
95
|
+
}, d = v(
|
|
96
|
+
t,
|
|
97
|
+
r
|
|
98
|
+
);
|
|
99
|
+
return d.ok ? { format: t } : {
|
|
100
|
+
format: g,
|
|
101
|
+
repairCode: d.code === "incompatible_temporal_bucket_pattern" || d.code === "incompatible_temporal_bucket_preset" ? "grain_incompatible_pattern" : "unsupported_pattern",
|
|
102
|
+
ignoredPattern: a
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function q(e) {
|
|
106
|
+
if (R(e.granularity))
|
|
107
|
+
return { granularity: e.granularity, assumedDay: !1 };
|
|
108
|
+
if (!(e.granularity !== void 0 && e.granularity !== null))
|
|
109
|
+
return O(e.dataType) === "date" ? { granularity: "day", assumedDay: !0 } : void 0;
|
|
110
|
+
}
|
|
111
|
+
function ne(e) {
|
|
112
|
+
const r = q(e);
|
|
113
|
+
if (!r)
|
|
114
|
+
return {
|
|
115
|
+
ok: !1,
|
|
116
|
+
error: { code: "ambiguous_temporal_grain", fieldId: e.fieldId }
|
|
117
|
+
};
|
|
118
|
+
let a, t, d;
|
|
119
|
+
if (e.format !== void 0 && e.format !== null) {
|
|
120
|
+
const s = P.safeParse(e.format);
|
|
121
|
+
if (!s.success)
|
|
122
|
+
a = g, t = "unsupported_pattern";
|
|
123
|
+
else {
|
|
124
|
+
const c = v(
|
|
125
|
+
s.data,
|
|
126
|
+
r.granularity
|
|
127
|
+
);
|
|
128
|
+
a = c.ok ? s.data : g, c.ok || (t = c.code === "invalid_temporal_bucket_pattern" ? "unsupported_pattern" : "grain_incompatible_pattern", d = s.data.presentation.mode === "pattern" ? s.data.presentation.pattern : s.data.presentation.mode === "preset" ? s.data.presentation.preset : void 0);
|
|
129
|
+
}
|
|
130
|
+
} else
|
|
131
|
+
({ format: a, repairCode: t, ignoredPattern: d } = j(
|
|
132
|
+
e,
|
|
133
|
+
r.granularity
|
|
134
|
+
));
|
|
135
|
+
const n = r.assumedDay ? "missing_grain_assumed_day" : t;
|
|
136
|
+
return {
|
|
137
|
+
ok: !0,
|
|
138
|
+
format: a,
|
|
139
|
+
...n ? {
|
|
140
|
+
diagnostic: W(
|
|
141
|
+
e,
|
|
142
|
+
n,
|
|
143
|
+
a,
|
|
144
|
+
d
|
|
145
|
+
)
|
|
146
|
+
} : {}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
150
|
+
function N(e) {
|
|
151
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
152
|
+
}
|
|
153
|
+
function de(e) {
|
|
11
154
|
if (e.__esModule) return e;
|
|
12
155
|
var r = e.default;
|
|
13
156
|
if (typeof r == "function") {
|
|
@@ -26,35 +169,12 @@ function oe(e) {
|
|
|
26
169
|
});
|
|
27
170
|
}), a;
|
|
28
171
|
}
|
|
29
|
-
let y;
|
|
30
|
-
const I = new Uint8Array(16);
|
|
31
|
-
function G() {
|
|
32
|
-
if (!y && (y = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !y))
|
|
33
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
34
|
-
return y(I);
|
|
35
|
-
}
|
|
36
|
-
const l = [];
|
|
37
|
-
for (let e = 0; e < 256; ++e)
|
|
38
|
-
l.push((e + 256).toString(16).slice(1));
|
|
39
|
-
function L(e, r = 0) {
|
|
40
|
-
return l[e[r + 0]] + l[e[r + 1]] + l[e[r + 2]] + l[e[r + 3]] + "-" + l[e[r + 4]] + l[e[r + 5]] + "-" + l[e[r + 6]] + l[e[r + 7]] + "-" + l[e[r + 8]] + l[e[r + 9]] + "-" + l[e[r + 10]] + l[e[r + 11]] + l[e[r + 12]] + l[e[r + 13]] + l[e[r + 14]] + l[e[r + 15]];
|
|
41
|
-
}
|
|
42
|
-
const W = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), E = {
|
|
43
|
-
randomUUID: W
|
|
44
|
-
};
|
|
45
|
-
function ne(e, r, a) {
|
|
46
|
-
if (E.randomUUID && !e)
|
|
47
|
-
return E.randomUUID();
|
|
48
|
-
e = e || {};
|
|
49
|
-
const t = e.random || (e.rng || G)();
|
|
50
|
-
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, L(t);
|
|
51
|
-
}
|
|
52
172
|
var T = {}, B = {}, A = { exports: {} }, o = String, S = function() {
|
|
53
173
|
return { isColorSupported: !1, reset: o, bold: o, dim: o, italic: o, underline: o, inverse: o, hidden: o, strikethrough: o, black: o, red: o, green: o, yellow: o, blue: o, magenta: o, cyan: o, white: o, gray: o, bgBlack: o, bgRed: o, bgGreen: o, bgYellow: o, bgBlue: o, bgMagenta: o, bgCyan: o, bgWhite: o, blackBright: o, redBright: o, greenBright: o, yellowBright: o, blueBright: o, magentaBright: o, cyanBright: o, whiteBright: o, bgBlackBright: o, bgRedBright: o, bgGreenBright: o, bgYellowBright: o, bgBlueBright: o, bgMagentaBright: o, bgCyanBright: o, bgWhiteBright: o };
|
|
54
174
|
};
|
|
55
175
|
A.exports = S();
|
|
56
176
|
A.exports.createColors = S;
|
|
57
|
-
var
|
|
177
|
+
var V = A.exports;
|
|
58
178
|
(function(e) {
|
|
59
179
|
Object.defineProperty(e, "__esModule", {
|
|
60
180
|
value: !0
|
|
@@ -73,7 +193,7 @@ var j = A.exports;
|
|
|
73
193
|
return c;
|
|
74
194
|
}
|
|
75
195
|
});
|
|
76
|
-
const a = /* @__PURE__ */ t(
|
|
196
|
+
const a = /* @__PURE__ */ t(V);
|
|
77
197
|
function t(f) {
|
|
78
198
|
return f && f.__esModule ? f : {
|
|
79
199
|
default: f
|
|
@@ -464,21 +584,21 @@ var j = A.exports;
|
|
|
464
584
|
};
|
|
465
585
|
})(T);
|
|
466
586
|
let _ = T;
|
|
467
|
-
var
|
|
468
|
-
const i = /* @__PURE__ */
|
|
469
|
-
function
|
|
470
|
-
return e ? e.closest(
|
|
587
|
+
var Q = (_.__esModule ? _ : { default: _ }).default;
|
|
588
|
+
const i = /* @__PURE__ */ N(Q), $ = ".semaphor-scope";
|
|
589
|
+
function H(e) {
|
|
590
|
+
return e ? e.closest($) : null;
|
|
471
591
|
}
|
|
472
|
-
function
|
|
592
|
+
function K(e) {
|
|
473
593
|
if (!e) return "light";
|
|
474
594
|
const r = e.dataset.semaphorTheme;
|
|
475
595
|
return r === "dark" || r === "light" ? r : e.classList.contains("dark") ? "dark" : "light";
|
|
476
596
|
}
|
|
477
|
-
const
|
|
597
|
+
const ie = !1, se = [
|
|
478
598
|
"table",
|
|
479
599
|
"view",
|
|
480
600
|
"materialized view"
|
|
481
|
-
],
|
|
601
|
+
], le = ["_forecast"], ce = "dm", ue = "semaphor_calculated_fields", pe = "calculated_fields", ge = ["lg", "md", "sm", "xs", "xxs"], be = {
|
|
482
602
|
// dashboardHeader: ' font-mono border-b-2 border-red-700',
|
|
483
603
|
default: {
|
|
484
604
|
dashboardPanel: "",
|
|
@@ -490,7 +610,7 @@ const fe = !1, de = [
|
|
|
490
610
|
},
|
|
491
611
|
chart: {
|
|
492
612
|
font: {
|
|
493
|
-
family:
|
|
613
|
+
family: D
|
|
494
614
|
// family:
|
|
495
615
|
// 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
496
616
|
},
|
|
@@ -539,7 +659,7 @@ const fe = !1, de = [
|
|
|
539
659
|
plugins: {
|
|
540
660
|
datalabels: {
|
|
541
661
|
display: !1,
|
|
542
|
-
color:
|
|
662
|
+
color: Y
|
|
543
663
|
},
|
|
544
664
|
title: {
|
|
545
665
|
display: !0
|
|
@@ -631,7 +751,7 @@ const fe = !1, de = [
|
|
|
631
751
|
// colors.green[500],
|
|
632
752
|
// ],
|
|
633
753
|
datalables: {
|
|
634
|
-
color:
|
|
754
|
+
color: Y
|
|
635
755
|
},
|
|
636
756
|
backgroundColor: [
|
|
637
757
|
// colors.teal[900],
|
|
@@ -713,20 +833,20 @@ const fe = !1, de = [
|
|
|
713
833
|
}
|
|
714
834
|
}
|
|
715
835
|
};
|
|
716
|
-
function
|
|
836
|
+
function Y(e) {
|
|
717
837
|
var t, d, n, s, c, f, u, p, b;
|
|
718
838
|
const r = (c = (s = (n = (d = (t = e == null ? void 0 : e.chart) == null ? void 0 : t.config) == null ? void 0 : d._config) == null ? void 0 : n.options) == null ? void 0 : s.plugins) == null ? void 0 : c.datalabels;
|
|
719
839
|
let a = (f = e == null ? void 0 : e.dataset) == null ? void 0 : f.backgroundColor;
|
|
720
|
-
return (r == null ? void 0 : r.align) === "end" && (r == null ? void 0 : r.anchor) === "end" && (a = C((u = e == null ? void 0 : e.chart) == null ? void 0 : u.canvas)), (r == null ? void 0 : r.align) === "start" && (r == null ? void 0 : r.anchor) === "start" && (a = C((p = e == null ? void 0 : e.chart) == null ? void 0 : p.canvas)),
|
|
840
|
+
return (r == null ? void 0 : r.align) === "end" && (r == null ? void 0 : r.anchor) === "end" && (a = C((u = e == null ? void 0 : e.chart) == null ? void 0 : u.canvas)), (r == null ? void 0 : r.align) === "start" && (r == null ? void 0 : r.anchor) === "start" && (a = C((p = e == null ? void 0 : e.chart) == null ? void 0 : p.canvas)), z(a, {
|
|
721
841
|
baseColor: C((b = e == null ? void 0 : e.chart) == null ? void 0 : b.canvas)
|
|
722
842
|
});
|
|
723
843
|
}
|
|
724
844
|
function C(e) {
|
|
725
845
|
if (typeof document < "u") {
|
|
726
|
-
const r =
|
|
846
|
+
const r = H(e);
|
|
727
847
|
if (r) {
|
|
728
848
|
const t = window.getComputedStyle(r).getPropertyValue("--semaphor-background").trim();
|
|
729
|
-
return t ? `hsl(${t})` :
|
|
849
|
+
return t ? `hsl(${t})` : K(r) === "dark" ? "#000000" : "#FFFFFF";
|
|
730
850
|
}
|
|
731
851
|
const a = document.documentElement;
|
|
732
852
|
if (a.classList.contains("dark"))
|
|
@@ -736,7 +856,7 @@ function C(e) {
|
|
|
736
856
|
}
|
|
737
857
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "#000000" : "#FFFFFF";
|
|
738
858
|
}
|
|
739
|
-
function
|
|
859
|
+
function z(e, r = {}) {
|
|
740
860
|
let a = 0, t = 0, d = 0, n = 0;
|
|
741
861
|
const s = r.baseColor ? k(r.baseColor) : null, c = (m) => {
|
|
742
862
|
if (!m) return i.gray[500];
|
|
@@ -754,169 +874,49 @@ function $(e, r = {}) {
|
|
|
754
874
|
function M(e, r) {
|
|
755
875
|
if (e.alpha >= 1)
|
|
756
876
|
return e;
|
|
757
|
-
const a = r ? M(r, null) :
|
|
877
|
+
const a = r ? M(r, null) : J;
|
|
758
878
|
return {
|
|
759
879
|
r: e.r * e.alpha + a.r * (1 - e.alpha),
|
|
760
880
|
g: e.g * e.alpha + a.g * (1 - e.alpha),
|
|
761
881
|
b: e.b * e.alpha + a.b * (1 - e.alpha)
|
|
762
882
|
};
|
|
763
883
|
}
|
|
764
|
-
const
|
|
884
|
+
const J = {
|
|
765
885
|
r: 255,
|
|
766
886
|
g: 255,
|
|
767
887
|
b: 255
|
|
768
888
|
};
|
|
769
|
-
function
|
|
889
|
+
function Z(e) {
|
|
770
890
|
if (!e) return !1;
|
|
771
891
|
const r = e.groupByColumns && e.groupByColumns.length > 0, a = e.metricColumns && e.metricColumns.length > 0, t = e.pivotByColumns && e.pivotByColumns.length > 0, d = e.detailColumns && e.detailColumns.length > 0;
|
|
772
892
|
return !!(r || a || t || d);
|
|
773
893
|
}
|
|
774
|
-
function
|
|
894
|
+
function me(e, r) {
|
|
775
895
|
var n, s, c;
|
|
776
896
|
if (r != null && r.skipSetupCheck || e.type === "text" || (n = e.customCardPreferences) != null && n.url)
|
|
777
897
|
return !1;
|
|
778
|
-
const a = !!(e.connectionId || (s = e.dataSource) != null && s.connectionId), t = !!((c = e.sql) != null && c.trim()), d =
|
|
898
|
+
const a = !!(e.connectionId || (s = e.dataSource) != null && s.connectionId), t = !!((c = e.sql) != null && c.trim()), d = Z(e.config);
|
|
779
899
|
return !a || !d && !t;
|
|
780
900
|
}
|
|
781
|
-
function be(e) {
|
|
782
|
-
return e.format != null || e.dateFormat != null;
|
|
783
|
-
}
|
|
784
|
-
const Y = {
|
|
785
|
-
"Week of MMM DD, YYYY": {
|
|
786
|
-
type: "temporal_bucket",
|
|
787
|
-
presentation: { mode: "preset", preset: "week_of_short" }
|
|
788
|
-
},
|
|
789
|
-
"Week of MMMM DD, YYYY": {
|
|
790
|
-
type: "temporal_bucket",
|
|
791
|
-
presentation: { mode: "preset", preset: "week_of_long" }
|
|
792
|
-
},
|
|
793
|
-
"Q1 YYYY": {
|
|
794
|
-
type: "temporal_bucket",
|
|
795
|
-
presentation: { mode: "preset", preset: "quarter_short" }
|
|
796
|
-
},
|
|
797
|
-
"1st Quarter YYYY": {
|
|
798
|
-
type: "temporal_bucket",
|
|
799
|
-
presentation: { mode: "preset", preset: "quarter_long" }
|
|
800
|
-
},
|
|
801
|
-
"YYYY Q1": void 0,
|
|
802
|
-
"YYYY-Q1": void 0,
|
|
803
|
-
"Quarter 1, YYYY": void 0,
|
|
804
|
-
"YYYY-WW": void 0
|
|
805
|
-
};
|
|
806
|
-
function z(e, r, a, t) {
|
|
807
|
-
return {
|
|
808
|
-
code: r,
|
|
809
|
-
severity: "warning",
|
|
810
|
-
fieldId: e.fieldId,
|
|
811
|
-
...t ? { ignoredPattern: t } : {},
|
|
812
|
-
effectiveFormat: a
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
function J(e, r) {
|
|
816
|
-
if (e.dateFormat === void 0 || e.dateFormat === null)
|
|
817
|
-
return { format: g };
|
|
818
|
-
if (typeof e.dateFormat != "string")
|
|
819
|
-
return {
|
|
820
|
-
format: g,
|
|
821
|
-
repairCode: "unsupported_pattern"
|
|
822
|
-
};
|
|
823
|
-
const a = e.dateFormat === "custom" ? typeof e.customFormat == "string" ? e.customFormat.trim() : "" : e.dateFormat.trim();
|
|
824
|
-
if (!a)
|
|
825
|
-
return {
|
|
826
|
-
format: g,
|
|
827
|
-
repairCode: "missing_custom_pattern"
|
|
828
|
-
};
|
|
829
|
-
if (Object.prototype.hasOwnProperty.call(Y, a)) {
|
|
830
|
-
const n = Y[a];
|
|
831
|
-
return n ? v(
|
|
832
|
-
n,
|
|
833
|
-
r
|
|
834
|
-
).ok ? { format: n } : {
|
|
835
|
-
format: g,
|
|
836
|
-
repairCode: "grain_incompatible_pattern",
|
|
837
|
-
ignoredPattern: a
|
|
838
|
-
} : {
|
|
839
|
-
format: g,
|
|
840
|
-
repairCode: "unsupported_pattern",
|
|
841
|
-
ignoredPattern: a
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
const t = {
|
|
845
|
-
type: "temporal_bucket",
|
|
846
|
-
presentation: { mode: "pattern", pattern: a }
|
|
847
|
-
}, d = v(
|
|
848
|
-
t,
|
|
849
|
-
r
|
|
850
|
-
);
|
|
851
|
-
return d.ok ? { format: t } : {
|
|
852
|
-
format: g,
|
|
853
|
-
repairCode: d.code === "incompatible_temporal_bucket_pattern" || d.code === "incompatible_temporal_bucket_preset" ? "grain_incompatible_pattern" : "unsupported_pattern",
|
|
854
|
-
ignoredPattern: a
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
function Z(e) {
|
|
858
|
-
if (O(e.granularity))
|
|
859
|
-
return { granularity: e.granularity, assumedDay: !1 };
|
|
860
|
-
if (!(e.granularity !== void 0 && e.granularity !== null))
|
|
861
|
-
return D(e.dataType) === "date" ? { granularity: "day", assumedDay: !0 } : void 0;
|
|
862
|
-
}
|
|
863
|
-
function me(e) {
|
|
864
|
-
const r = Z(e);
|
|
865
|
-
if (!r)
|
|
866
|
-
return {
|
|
867
|
-
ok: !1,
|
|
868
|
-
error: { code: "ambiguous_temporal_grain", fieldId: e.fieldId }
|
|
869
|
-
};
|
|
870
|
-
let a, t, d;
|
|
871
|
-
if (e.format !== void 0 && e.format !== null) {
|
|
872
|
-
const s = R.safeParse(e.format);
|
|
873
|
-
if (!s.success)
|
|
874
|
-
a = g, t = "unsupported_pattern";
|
|
875
|
-
else {
|
|
876
|
-
const c = v(
|
|
877
|
-
s.data,
|
|
878
|
-
r.granularity
|
|
879
|
-
);
|
|
880
|
-
a = c.ok ? s.data : g, c.ok || (t = c.code === "invalid_temporal_bucket_pattern" ? "unsupported_pattern" : "grain_incompatible_pattern", d = s.data.presentation.mode === "pattern" ? s.data.presentation.pattern : s.data.presentation.mode === "preset" ? s.data.presentation.preset : void 0);
|
|
881
|
-
}
|
|
882
|
-
} else
|
|
883
|
-
({ format: a, repairCode: t, ignoredPattern: d } = J(
|
|
884
|
-
e,
|
|
885
|
-
r.granularity
|
|
886
|
-
));
|
|
887
|
-
const n = r.assumedDay ? "missing_grain_assumed_day" : t;
|
|
888
|
-
return {
|
|
889
|
-
ok: !0,
|
|
890
|
-
format: a,
|
|
891
|
-
...n ? {
|
|
892
|
-
diagnostic: z(
|
|
893
|
-
e,
|
|
894
|
-
n,
|
|
895
|
-
a,
|
|
896
|
-
d
|
|
897
|
-
)
|
|
898
|
-
} : {}
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
901
|
export {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
902
|
+
ge as B,
|
|
903
|
+
pe as C,
|
|
904
|
+
ce as D,
|
|
905
|
+
le as M,
|
|
906
|
+
oe as a,
|
|
907
|
+
ie as b,
|
|
908
908
|
i as c,
|
|
909
909
|
C as d,
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
910
|
+
N as e,
|
|
911
|
+
se as f,
|
|
912
|
+
z as g,
|
|
913
|
+
Z as h,
|
|
914
|
+
me as i,
|
|
915
|
+
be as j,
|
|
916
|
+
fe as k,
|
|
917
|
+
de as l,
|
|
918
|
+
Y as m,
|
|
919
|
+
ue as n,
|
|
920
|
+
ne as r,
|
|
921
|
+
te as v
|
|
922
922
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("./validators-DqIM0B3C.cjs");require("./analyze-result-contract-BX_nQmPN.cjs");require("../value-format-preferences/index.cjs");const g=require("./temporal-bucket-authoring-DueSgLJU.cjs"),T=require("./color-CyB5o13F.cjs");let _;const U=new Uint8Array(16);function D(){if(!_&&(_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _(U)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function I(e,r=0){return s[e[r+0]]+s[e[r+1]]+s[e[r+2]]+s[e[r+3]]+"-"+s[e[r+4]]+s[e[r+5]]+"-"+s[e[r+6]]+s[e[r+7]]+"-"+s[e[r+8]]+s[e[r+9]]+"-"+s[e[r+10]]+s[e[r+11]]+s[e[r+12]]+s[e[r+13]]+s[e[r+14]]+s[e[r+15]]}const L=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),F={randomUUID:L};function G(e,r,t){if(F.randomUUID&&!e)return F.randomUUID();e=e||{};const a=e.random||(e.rng||D)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,I(a)}function q(e){return e.format!=null||e.dateFormat!=null}const B={"Week of MMM DD, YYYY":{type:"temporal_bucket",presentation:{mode:"preset",preset:"week_of_short"}},"Week of MMMM DD, YYYY":{type:"temporal_bucket",presentation:{mode:"preset",preset:"week_of_long"}},"Q1 YYYY":{type:"temporal_bucket",presentation:{mode:"preset",preset:"quarter_short"}},"1st Quarter YYYY":{type:"temporal_bucket",presentation:{mode:"preset",preset:"quarter_long"}},"YYYY Q1":void 0,"YYYY-Q1":void 0,"Quarter 1, YYYY":void 0,"YYYY-WW":void 0};function K(e,r,t,a){return{code:r,severity:"warning",fieldId:e.fieldId,...a?{ignoredPattern:a}:{},effectiveFormat:t}}function N(e,r){if(e.dateFormat===void 0||e.dateFormat===null)return{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT};if(typeof e.dateFormat!="string")return{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,repairCode:"unsupported_pattern"};const t=e.dateFormat==="custom"?typeof e.customFormat=="string"?e.customFormat.trim():"":e.dateFormat.trim();if(!t)return{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,repairCode:"missing_custom_pattern"};if(Object.prototype.hasOwnProperty.call(B,t)){const n=B[t];return n?b.validateTemporalBucketFormatApplicability(n,r).ok?{format:n}:{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,repairCode:"grain_incompatible_pattern",ignoredPattern:t}:{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,repairCode:"unsupported_pattern",ignoredPattern:t}}const a={type:"temporal_bucket",presentation:{mode:"pattern",pattern:t}},i=b.validateTemporalBucketFormatApplicability(a,r);return i.ok?{format:a}:{format:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,repairCode:i.code==="incompatible_temporal_bucket_pattern"||i.code==="incompatible_temporal_bucket_preset"?"grain_incompatible_pattern":"unsupported_pattern",ignoredPattern:t}}function W(e){if(b.isSemaphorTimeGrain(e.granularity))return{granularity:e.granularity,assumedDay:!1};if(!(e.granularity!==void 0&&e.granularity!==null))return b.normalizeAnalyticsCatalogDataType(e.dataType)==="date"?{granularity:"day",assumedDay:!0}:void 0}function j(e){const r=W(e);if(!r)return{ok:!1,error:{code:"ambiguous_temporal_grain",fieldId:e.fieldId}};let t,a,i;if(e.format!==void 0&&e.format!==null){const l=b.temporalBucketFormatSchema.safeParse(e.format);if(!l.success)t=g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,a="unsupported_pattern";else{const c=b.validateTemporalBucketFormatApplicability(l.data,r.granularity);t=c.ok?l.data:g.AUTOMATIC_TEMPORAL_BUCKET_FORMAT,c.ok||(a=c.code==="invalid_temporal_bucket_pattern"?"unsupported_pattern":"grain_incompatible_pattern",i=l.data.presentation.mode==="pattern"?l.data.presentation.pattern:l.data.presentation.mode==="preset"?l.data.presentation.preset:void 0)}}else({format:t,repairCode:a,ignoredPattern:i}=N(e,r.granularity));const n=r.assumedDay?"missing_grain_assumed_day":a;return{ok:!0,format:t,...n?{diagnostic:K(e,n,t,i)}:{}}}var V=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Q(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}),t}var R={},k={},E={exports:{}},o=String,w=function(){return{isColorSupported:!1,reset:o,bold:o,dim:o,italic:o,underline:o,inverse:o,hidden:o,strikethrough:o,black:o,red:o,green:o,yellow:o,blue:o,magenta:o,cyan:o,white:o,gray:o,bgBlack:o,bgRed:o,bgGreen:o,bgYellow:o,bgBlue:o,bgMagenta:o,bgCyan:o,bgWhite:o,blackBright:o,redBright:o,greenBright:o,yellowBright:o,blueBright:o,magentaBright:o,cyanBright:o,whiteBright:o,bgBlackBright:o,bgRedBright:o,bgGreenBright:o,bgYellowBright:o,bgBlueBright:o,bgMagentaBright:o,bgCyanBright:o,bgWhiteBright:o}};E.exports=w();E.exports.createColors=w;var H=E.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function r(f,u){for(var p in u)Object.defineProperty(f,p,{enumerable:!0,get:u[p]})}r(e,{dim:function(){return l},default:function(){return c}});const t=a(H);function a(f){return f&&f.__esModule?f:{default:f}}let i=new Set;function n(f,u,p){typeof process<"u"&&process.env.JEST_WORKER_ID||p&&i.has(p)||(p&&i.add(p),console.warn(""),u.forEach(m=>console.warn(f,"-",m)))}function l(f){return t.default.dim(f)}const c={info(f,u){n(t.default.bold(t.default.cyan("info")),...Array.isArray(f)?[f]:[u,f])},warn(f,u){n(t.default.bold(t.default.yellow("warn")),...Array.isArray(f)?[f]:[u,f])},risk(f,u){n(t.default.bold(t.default.magenta("risk")),...Array.isArray(f)?[f]:[u,f])}}})(k);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const r=t(k);function t(n){return n&&n.__esModule?n:{default:n}}function a({version:n,from:l,to:c}){r.default.warn(`${l}-color-renamed`,[`As of Tailwind CSS ${n}, \`${l}\` has been renamed to \`${c}\`.`,"Update your configuration file to silence this warning."])}const i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return a({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return a({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return a({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return a({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return a({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(R);let A=R;var $=(A.__esModule?A:{default:A}).default;const d=O($),z=".semaphor-scope";function J(e){return e?e.closest(z):null}function Z(e){if(!e)return"light";const r=e.dataset.semaphorTheme;return r==="dark"||r==="light"?r:e.classList.contains("dark")?"dark":"light"}const X=!1,x=["table","view","materialized view"],ee=["_forecast"],re="dm",te="semaphor_calculated_fields",ae="calculated_fields",oe=["lg","md","sm","xs","xxs"],ne={default:{dashboardPanel:"",dashboardTabsContainer:"",gridLayout:{className:""},chart:{font:{family:T.SEMAPHOR_DEFAULT_FONT_FAMILY},dataset:{backgroundColor:[d.teal[500],d.teal[300],d.gray[700],d.gray[500],d.gray[300]],borderColor:[d.teal[500],d.teal[300],d.gray[700],d.gray[500],d.gray[300]]},options:{interaction:{mode:"index"},plugins:{datalabels:{display:!1,color:v},title:{display:!0},tooltip:{backgroundColor:"#fff",bodyColor:"#000",borderWidth:.25,titleColor:"#000",borderColor:"rgb(128,131,139)",cornerRadius:4,usePointStyle:!0,pointStyle:"rectRounded",boxPadding:4},legend:{position:"top",align:"center",maxHeight:0,labels:{useBorderRadius:!0,borderRadius:2}}},scales:{y:{grid:{display:!0},title:{display:!0,text:""},beginAtZero:!0,ticks:{precision:0}},x:{grid:{display:!0},title:{display:!0}}},layout:{padding:{top:-40}},borderRadius:2,responsive:!0,maintainAspectRatio:!1}}},dark:{chart:{dataset:{datalables:{color:v},backgroundColor:[d.teal[500],d.teal[300],d.gray[700],d.gray[500],d.gray[300]],borderColor:[d.teal[500],d.teal[300],d.gray[700],d.gray[500],d.gray[300]]},options:{plugins:{tooltip:{backgroundColor:"#000",bodyColor:"#fff",borderWidth:.25,titleColor:"#fff",borderColor:"rgb(128,131,139)",cornerRadius:2,boxPadding:4}},datalabels:{display:!1},scales:{x:{grid:{display:!0,color:d.slate[800]}},y:{grid:{display:!0,color:d.slate[800]}}}}}}};function v(e){var a,i,n,l,c,f,u,p,m;const r=(c=(l=(n=(i=(a=e==null?void 0:e.chart)==null?void 0:a.config)==null?void 0:i._config)==null?void 0:n.options)==null?void 0:l.plugins)==null?void 0:c.datalabels;let t=(f=e==null?void 0:e.dataset)==null?void 0:f.backgroundColor;return(r==null?void 0:r.align)==="end"&&(r==null?void 0:r.anchor)==="end"&&(t=h((u=e==null?void 0:e.chart)==null?void 0:u.canvas)),(r==null?void 0:r.align)==="start"&&(r==null?void 0:r.anchor)==="start"&&(t=h((p=e==null?void 0:e.chart)==null?void 0:p.canvas)),P(t,{baseColor:h((m=e==null?void 0:e.chart)==null?void 0:m.canvas)})}function h(e){if(typeof document<"u"){const r=J(e);if(r){const a=window.getComputedStyle(r).getPropertyValue("--semaphor-background").trim();return a?`hsl(${a})`:Z(r)==="dark"?"#000000":"#FFFFFF"}const t=document.documentElement;if(t.classList.contains("dark"))return"#000000";if(t.classList.contains("light"))return"#FFFFFF"}return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"#000000":"#FFFFFF"}function P(e,r={}){let t=0,a=0,i=0,n=0;const l=r.baseColor?T.parseRuntimeColor(r.baseColor):null,c=y=>{if(!y)return d.gray[500];const M=T.parseRuntimeColor(y);if(!M)return d.gray[500];const C=S(M,l);t+=C.r,a+=C.g,i+=C.b,n++};if(Array.isArray(e)?e.forEach(y=>{c(y)}):c(e),n===0)return d.gray[500];const f=t/n,u=a/n,p=i/n;return(f*299+u*587+p*114)/1e3>=180?"black":"white"}function S(e,r){if(e.alpha>=1)return e;const t=r?S(r,null):fe;return{r:e.r*e.alpha+t.r*(1-e.alpha),g:e.g*e.alpha+t.g*(1-e.alpha),b:e.b*e.alpha+t.b*(1-e.alpha)}}const fe={r:255,g:255,b:255};function Y(e){if(!e)return!1;const r=e.groupByColumns&&e.groupByColumns.length>0,t=e.metricColumns&&e.metricColumns.length>0,a=e.pivotByColumns&&e.pivotByColumns.length>0,i=e.detailColumns&&e.detailColumns.length>0;return!!(r||t||a||i)}function de(e,r){var n,l,c;if(r!=null&&r.skipSetupCheck||e.type==="text"||(n=e.customCardPreferences)!=null&&n.url)return!1;const t=!!(e.connectionId||(l=e.dataSource)!=null&&l.connectionId),a=!!((c=e.sql)!=null&&c.trim()),i=Y(e.config);return!t||!i&&!a}exports.BREAKPOINTS=oe;exports.CALCULATED_FIELDS_GROUP_ID=te;exports.CALCULATED_FIELDS_GROUP_NAME=ae;exports.DATABASE_ENTITY_TYPES=x;exports.DATAMODEL_NAMESPCACE=re;exports.DEFAULT_STYLE=ne;exports.METADATA_KEYS=ee;exports.colors=d;exports.commonjsGlobal=V;exports.getAugmentedNamespace=Q;exports.getCanvasBackgroundColor=h;exports.getContrastColor=P;exports.getDatalabelColor=v;exports.getDefaultExportFromCjs=O;exports.hasSavedTemporalBucketPresentation=q;exports.hasValidCardConfig=Y;exports.isCardUnconfigured=de;exports.isDevEnv=X;exports.readSavedTemporalBucketFormat=j;exports.v4=G;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./validators-
|
|
1
|
+
"use strict";require("./validators-DqIM0B3C.cjs");const t="SEMAPHOR_CALCULATED_FIELD",a="calculated_fields";function s(Y){return(Y==null?void 0:Y.sourceField)||(Y==null?void 0:Y.name)||""}const _=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm Z","YYYY-MM-DD HH:mm:ss Z","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];function D(Y){return Y.role==="metric"&&"expression"in Y&&!!Y.expression}function r(Y){return!!Y.expression}function l(Y){return!!Y.expression}function c(Y){var n,M;const e=Y;return!!(e!=null&&e.expression&&((M=(n=e.calculatedFormula)==null?void 0:n.inputFields)!=null&&M.length))}function A(Y){return!!(Y&&(Y.entityName===t||Y.entityId===t))}function E(Y){return Y?[Y.entityName,Y.entityId,Y.qualifiedEntityName].some(e=>e===t||e===a):!1}var u=(Y=>(Y.SUBTOTAL="__SUBTOTAL__",Y.TOTAL="__TOTAL__",Y.ALL="__ALL__",Y))(u||{});const L={database:null,schema:null,table:null},i="__card_default__";exports.CALCULATED_FIELD_ENTITY_MARKER=t;exports.CONTROL_CARD_DEFAULT_VALUE=i;exports.DATE_FORMAT_VALUES=_;exports.EMPTY_SELECTION=L;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=a;exports.PivotMarkerEnum=u;exports.getFieldRuntimeColumnName=s;exports.hasCalculatedFieldMarker=A;exports.hasCalculatedFormulaInputs=c;exports.hasSyntheticCalculatedFieldOwner=E;exports.isCalculatedDimension=r;exports.isCalculatedField=l;exports.isCalculatedMetric=D;
|