react-semaphor 0.1.568 → 0.1.569
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +10 -12
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → _commonjsHelpers-Bid1ZNYj.js} +271 -222
- package/dist/chunks/{assistant-chat-BN5I8KuN.js → assistant-chat-Dzf2Mbph.js} +107 -109
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-Czg6FGt5.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-BS982X7x.js} +986 -985
- package/dist/chunks/{code-editor-DJNOsgJH.js → code-editor-BsxHzm9u.js} +43 -45
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-lLTgzOkM.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-BiYSbxZv.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-Bdj7luOr.js} +158 -159
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-TViDsnb8.js} +17 -19
- package/dist/chunks/dashboard-json-Dg9dQd9U.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-BsPrWZIP.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-C6hoIeEJ.js} +20 -21
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-hcQ4os0u.js} +695 -699
- package/dist/chunks/filter-value-text-CVxEEDVl.js +146 -0
- package/dist/chunks/{index-CPNZW0mu.js → index-G4q89J6O.js} +74 -76
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-BIcoFfdS.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C6tYkHyv.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/{palette-4vf2BEEg.js → palette-NjHOE_6B.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-DkmueDTW.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Xc8_GFju.js} +26 -28
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-KqvcLcTM.js} +4784 -4764
- package/dist/chunks/{save-D6pHmSSP.js → save-C6VmEJTA.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-BeXXyoD4.js} +6 -6
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-BNkaANsG.js} +28395 -28384
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-C_issPBA.js} +18 -20
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-B6_StAty.js} +263 -265
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-BWP2joD1.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-scSWQXAB.js} +4 -4
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-BRW4Mwrd.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-BQ3OMjvy.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1527 -1517
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +236 -237
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/index.js +9 -9
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +155 -1753
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +74 -74
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +2 -24
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as u, useState as f, useRef as p, useEffect as b } from "react";
|
|
3
|
-
import { u as a } from "./semaphor-ready-indicator-BSEdUq40.js";
|
|
4
|
-
import { B as S, X as N, C as D } from "./code-editor-DJNOsgJH.js";
|
|
5
|
-
import "./index-CuHybtft.js";
|
|
6
|
-
import "./validators-wtjw0aw6.js";
|
|
7
|
-
import "./matrix-operation-contract-Eb6elidS.js";
|
|
8
|
-
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
9
|
-
import "zod";
|
|
10
|
-
import "../value-format-preferences/index.js";
|
|
11
|
-
import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
|
|
12
|
-
function B() {
|
|
13
|
-
const r = a((s) => s.dashboard), c = a((s) => s.actions.setDashboard), h = a(
|
|
14
|
-
(s) => s.showDashboardJSON
|
|
15
|
-
), l = a(
|
|
16
|
-
(s) => s.actions.setShowDashboardJSON
|
|
17
|
-
), o = u(
|
|
18
|
-
() => r ? JSON.stringify(r, null, 2) : "",
|
|
19
|
-
[r]
|
|
20
|
-
), [m, i] = f(o), t = p(o);
|
|
21
|
-
return b(() => {
|
|
22
|
-
o !== t.current && (i(o), t.current = o);
|
|
23
|
-
}, [o]), /* @__PURE__ */ d(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
className: J("relative p-2", {
|
|
27
|
-
hidden: !h
|
|
28
|
-
}),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ d(
|
|
31
|
-
S,
|
|
32
|
-
{
|
|
33
|
-
variant: "secondary",
|
|
34
|
-
size: "sm",
|
|
35
|
-
className: "absolute right-2 top-2 z-10 h-8",
|
|
36
|
-
onClick: () => l(!1),
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ e(N, { className: "mr-2 h-4 w-4" }),
|
|
39
|
-
"Close"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ e("div", { className: "h-[550px] overflow-hidden", children: /* @__PURE__ */ e(
|
|
44
|
-
D,
|
|
45
|
-
{
|
|
46
|
-
value: m,
|
|
47
|
-
onValueChange: (s) => {
|
|
48
|
-
i(s);
|
|
49
|
-
try {
|
|
50
|
-
const n = JSON.parse(s);
|
|
51
|
-
t.current = JSON.stringify(
|
|
52
|
-
n,
|
|
53
|
-
null,
|
|
54
|
-
2
|
|
55
|
-
), c(n);
|
|
56
|
-
} catch {
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
language: "json"
|
|
60
|
-
}
|
|
61
|
-
) })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
B as default
|
|
68
|
-
};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { u as y, v as N } from "./validators-wtjw0aw6.js";
|
|
2
|
-
import { g as k, c as D } from "./raw-temporal-value-Bqz8wc7L.js";
|
|
3
|
-
import "../value-format-preferences/index.js";
|
|
4
|
-
import { a9 as T, a8 as L } from "./temporal-input-presentation--2r9BLr0.js";
|
|
5
|
-
const d = { kind: "plain" }, g = { kind: "temporal" }, O = {
|
|
6
|
-
"=": "=",
|
|
7
|
-
"!=": "!=",
|
|
8
|
-
">": ">",
|
|
9
|
-
">=": ">=",
|
|
10
|
-
"<": "<",
|
|
11
|
-
"<=": "<=",
|
|
12
|
-
in: "in",
|
|
13
|
-
"not in": "not in",
|
|
14
|
-
between: "between",
|
|
15
|
-
"not between": "not between",
|
|
16
|
-
contains: "contains (ignoring case)",
|
|
17
|
-
startsWith: "starts with (ignoring case)",
|
|
18
|
-
endsWith: "ends with (ignoring case)",
|
|
19
|
-
like: "matches the LIKE pattern (ignoring case)",
|
|
20
|
-
"not like": "does not match the LIKE pattern (ignoring case)",
|
|
21
|
-
isNull: "is empty",
|
|
22
|
-
isNotNull: "is not empty"
|
|
23
|
-
}, S = { between: "in", "not between": "not in" };
|
|
24
|
-
function V(t, n = {}) {
|
|
25
|
-
const { operator: e, values: i, reading: r } = t, o = r.kind === "bucket" ? `${t.subject} (${T(r.bucket)})` : t.subject, s = O[e], u = t.shownAs ? ` (shown as ${JSON.stringify(t.shownAs)})` : "", c = (a, f = 0) => ({ text: a, omittedValues: f });
|
|
26
|
-
if (e === "isNull" || e === "isNotNull") return c(`${o} ${s}`);
|
|
27
|
-
if (t.latestValue)
|
|
28
|
-
return c(`${o} ${s} the latest value of this field (resolved at run time)`);
|
|
29
|
-
if (e === "between" || e === "not between") {
|
|
30
|
-
const a = i.length === 2 ? A(i[0], i[1], r, n.timeZone) : void 0;
|
|
31
|
-
if (t.relative)
|
|
32
|
-
return c(`${o} ${S[e]} ${R(t.relative, a)}`);
|
|
33
|
-
if (a) {
|
|
34
|
-
const f = a.wholeDaysIn ? ` (whole days in ${a.wholeDaysIn})` : "";
|
|
35
|
-
return c(`${o} ${s} ${a.from} and ${a.to}${f}${u}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return e === "in" || e === "not in" || i.length !== 1 ? c(
|
|
39
|
-
`${o} ${s} (${I(i, r, n.maxListedValues)})${u}`,
|
|
40
|
-
b(i.length, n.maxListedValues)
|
|
41
|
-
) : c(`${o} ${s} ${l(i[0], r)}${u}`);
|
|
42
|
-
}
|
|
43
|
-
function W(t, n = {}) {
|
|
44
|
-
return t == null ? { text: "no value", omittedValues: 0 } : Array.isArray(t) ? {
|
|
45
|
-
text: I(t, d, n.maxListedValues),
|
|
46
|
-
omittedValues: b(t.length, n.maxListedValues)
|
|
47
|
-
} : { text: l(t), omittedValues: 0 };
|
|
48
|
-
}
|
|
49
|
-
function l(t, n = d) {
|
|
50
|
-
if (n.kind !== "plain") {
|
|
51
|
-
const e = w(t, n);
|
|
52
|
-
if (e !== void 0) return e;
|
|
53
|
-
}
|
|
54
|
-
return t instanceof Date ? w(t, g) ?? JSON.stringify(String(t)) : t === void 0 ? "null" : typeof t == "number" || typeof t == "boolean" || t === null ? String(t) : JSON.stringify(t) ?? String(t);
|
|
55
|
-
}
|
|
56
|
-
function I(t, n = d, e = Number.POSITIVE_INFINITY) {
|
|
57
|
-
const i = t.slice(0, Number.isFinite(e) ? e : void 0).map((o) => l(o, n)).join(", "), r = b(t.length, e);
|
|
58
|
-
return r > 0 ? `${i}, and ${r} more values` : i;
|
|
59
|
-
}
|
|
60
|
-
function b(t, n = Number.POSITIVE_INFINITY) {
|
|
61
|
-
return Math.max(0, t - n);
|
|
62
|
-
}
|
|
63
|
-
function m(t) {
|
|
64
|
-
if (t instanceof Date)
|
|
65
|
-
return Number.isNaN(t.getTime()) ? void 0 : { kind: "instant", instant: t };
|
|
66
|
-
if (typeof t != "string") return;
|
|
67
|
-
const n = D(t);
|
|
68
|
-
return n === "instant" ? { kind: n, instant: new Date(t) } : n ? { kind: n, text: t } : void 0;
|
|
69
|
-
}
|
|
70
|
-
function w(t, n) {
|
|
71
|
-
if (n.kind === "bucket")
|
|
72
|
-
return typeof t == "string" && L(t, n.bucket).ok ? t : void 0;
|
|
73
|
-
const e = m(t);
|
|
74
|
-
if (e)
|
|
75
|
-
return e.kind === "instant" ? e.instant.toISOString() : e.text;
|
|
76
|
-
}
|
|
77
|
-
function A(t, n, e, i) {
|
|
78
|
-
const r = e.kind === "temporal" ? m(t) : void 0, o = e.kind === "temporal" ? m(n) : void 0;
|
|
79
|
-
if (i && (r == null ? void 0 : r.kind) === "instant" && (o == null ? void 0 : o.kind) === "instant") {
|
|
80
|
-
const s = p(r.instant, i), u = p(o.instant, i);
|
|
81
|
-
if (s && u && s.time === "00:00:00" && r.instant.getUTCMilliseconds() === 0 && u.time === "23:59:59" && [0, 999].includes(o.instant.getUTCMilliseconds()))
|
|
82
|
-
return { from: s.date, to: u.date, wholeDaysIn: i };
|
|
83
|
-
}
|
|
84
|
-
return { from: l(t, e), to: l(n, e) };
|
|
85
|
-
}
|
|
86
|
-
function p(t, n) {
|
|
87
|
-
try {
|
|
88
|
-
const e = Object.fromEntries(
|
|
89
|
-
new Intl.DateTimeFormat("en-CA", {
|
|
90
|
-
timeZone: n,
|
|
91
|
-
year: "numeric",
|
|
92
|
-
month: "2-digit",
|
|
93
|
-
day: "2-digit",
|
|
94
|
-
hour: "2-digit",
|
|
95
|
-
minute: "2-digit",
|
|
96
|
-
second: "2-digit",
|
|
97
|
-
hourCycle: "h23"
|
|
98
|
-
}).formatToParts(t).map((i) => [i.type, i.value])
|
|
99
|
-
);
|
|
100
|
-
return {
|
|
101
|
-
date: `${e.year}-${e.month}-${e.day}`,
|
|
102
|
-
time: `${e.hour}:${e.minute}:${e.second}`
|
|
103
|
-
};
|
|
104
|
-
} catch {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
const $ = (t, n) => `${t} ${n}${Math.abs(t) === 1 ? "" : "s"}`;
|
|
109
|
-
function h(t, n) {
|
|
110
|
-
return t === 0 ? `the current ${n}` : t < 0 ? `${$(-t, n)} before the current one` : `${$(t, n)} after the current one`;
|
|
111
|
-
}
|
|
112
|
-
function F(t) {
|
|
113
|
-
switch (t.mode) {
|
|
114
|
-
case "last": {
|
|
115
|
-
const n = $(t.n, t.unit);
|
|
116
|
-
return y(t) ? t.complete ? `the ${n} before the ${t.unit} of the latest date in the data, whole ${t.unit}s only` : `the last ${n}, up to the latest date in the data` : t.complete ? `the ${n} before the current ${t.unit}, whole ${t.unit}s only` : `the last ${n}, up to now`;
|
|
117
|
-
}
|
|
118
|
-
case "this":
|
|
119
|
-
return t.boundary === "first_day" ? "the first day of the current month" : t.boundary === "last_day" ? "the last day of the current month" : t.toDate ? `the current ${t.unit} up to now` : `the whole current ${t.unit}`;
|
|
120
|
-
case "previous":
|
|
121
|
-
return `the ${t.unit} before the current one`;
|
|
122
|
-
case "between":
|
|
123
|
-
return t.from === t.to ? h(t.from, t.unit) : `from ${h(t.from, t.unit)} through ${h(t.to, t.unit)}`;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function R(t, n) {
|
|
127
|
-
const e = k(t), i = n && !y(t) ? `; last resolved here as ${n.from} to ${n.to}${n.wholeDaysIn ? `, whole days in ${n.wholeDaysIn}` : ""}` : "";
|
|
128
|
-
return `${e ? `${JSON.stringify(e)} ` : ""}(relative window: ${F(t)}; resolved again at run time${i})`;
|
|
129
|
-
}
|
|
130
|
-
const E = {
|
|
131
|
-
"=": "=",
|
|
132
|
-
"!=": "!=",
|
|
133
|
-
">": ">",
|
|
134
|
-
">=": ">=",
|
|
135
|
-
"<": "<",
|
|
136
|
-
"<=": "<=",
|
|
137
|
-
in: "in",
|
|
138
|
-
"not in": "not in",
|
|
139
|
-
like: "like",
|
|
140
|
-
"not like": "not like",
|
|
141
|
-
between: "between",
|
|
142
|
-
"not between": "not between",
|
|
143
|
-
"is null": "isNull",
|
|
144
|
-
"is not null": "isNotNull"
|
|
145
|
-
};
|
|
146
|
-
function M(t, n, e = {}) {
|
|
147
|
-
const i = t.valueType === "date";
|
|
148
|
-
return V({
|
|
149
|
-
subject: n,
|
|
150
|
-
operator: E[t.operation],
|
|
151
|
-
values: t.values,
|
|
152
|
-
reading: i ? g : d,
|
|
153
|
-
...i ? { relative: N(t.relativeMeta) } : {}
|
|
154
|
-
}, e);
|
|
155
|
-
}
|
|
156
|
-
export {
|
|
157
|
-
d as P,
|
|
158
|
-
g as T,
|
|
159
|
-
V as a,
|
|
160
|
-
W as b,
|
|
161
|
-
M as d,
|
|
162
|
-
b as o
|
|
163
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
class o extends Error {
|
|
2
|
-
}
|
|
3
|
-
o.prototype.name = "InvalidTokenError";
|
|
4
|
-
function i(t) {
|
|
5
|
-
return decodeURIComponent(atob(t).replace(/(.)/g, (e, r) => {
|
|
6
|
-
let n = r.charCodeAt(0).toString(16).toUpperCase();
|
|
7
|
-
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
8
|
-
}));
|
|
9
|
-
}
|
|
10
|
-
function s(t) {
|
|
11
|
-
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
12
|
-
switch (e.length % 4) {
|
|
13
|
-
case 0:
|
|
14
|
-
break;
|
|
15
|
-
case 2:
|
|
16
|
-
e += "==";
|
|
17
|
-
break;
|
|
18
|
-
case 3:
|
|
19
|
-
e += "=";
|
|
20
|
-
break;
|
|
21
|
-
default:
|
|
22
|
-
throw new Error("base64 string is not of the correct length");
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
return i(e);
|
|
26
|
-
} catch {
|
|
27
|
-
return atob(e);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function d(t, e) {
|
|
31
|
-
if (typeof t != "string")
|
|
32
|
-
throw new o("Invalid token specified: must be a string");
|
|
33
|
-
e || (e = {});
|
|
34
|
-
const r = e.header === !0 ? 0 : 1, n = t.split(".")[r];
|
|
35
|
-
if (typeof n != "string")
|
|
36
|
-
throw new o(`Invalid token specified: missing part #${r + 1}`);
|
|
37
|
-
let c;
|
|
38
|
-
try {
|
|
39
|
-
c = s(n);
|
|
40
|
-
} catch (a) {
|
|
41
|
-
throw new o(`Invalid token specified: invalid base64 for part #${r + 1} (${a.message})`);
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
return JSON.parse(c);
|
|
45
|
-
} catch (a) {
|
|
46
|
-
throw new o(`Invalid token specified: invalid json for part #${r + 1} (${a.message})`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
d as j
|
|
51
|
-
};
|