react-semaphor 0.1.568 → 0.1.570
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/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +572 -436
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
- package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
- package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.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/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.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-Yvhv3WX2.js} +95 -97
- 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-Lkbwycwe.js} +5491 -5683
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
- package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1888 -1826
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +349 -353
- package/dist/layouts/index.js +1 -1
- 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/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- 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/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/index.js +9 -9
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- 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/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- 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/types/summary-types.d.ts +0 -5
- 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/analytics-base-schemas.d.ts +4 -4
- 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/execution-input-schemas.d.ts +10 -10
- 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 +72 -72
- 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 +30 -30
- 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 +344 -1772
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -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 +10 -10
- 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 +7 -26
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CLIro-EG.js +0 -425
- 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/components/sharing-and-management/utils/group-types.d.ts +0 -105
- 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,42 +0,0 @@
|
|
|
1
|
-
import { l as s, o as f, q as u } from "./validators-wtjw0aw6.js";
|
|
2
|
-
import "./matrix-operation-contract-Eb6elidS.js";
|
|
3
|
-
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
4
|
-
import "zod";
|
|
5
|
-
function c(i, r = {}) {
|
|
6
|
-
var o, e;
|
|
7
|
-
if (i.type !== "matrixTable" || !i.config || typeof i.config != "object" || !("matrix" in i.config)) return { status: "absent" };
|
|
8
|
-
if ((o = i.sql) != null && o.trim() || (e = i.python) != null && e.trim())
|
|
9
|
-
return { status: "invalid", error: new Error("A Matrix definition requires a config-only Matrix card.") };
|
|
10
|
-
if ("matrixIntent" in i.config && i.config.matrixIntent !== void 0) return { status: "invalid", error: new Error("A Matrix card cannot contain two definitions.") };
|
|
11
|
-
const t = (r.authoringDraft ? s : f).safeParse(i.config.matrix);
|
|
12
|
-
return t.success ? { status: "ready", config: t.data } : { status: "invalid", error: t.error };
|
|
13
|
-
}
|
|
14
|
-
function p(i) {
|
|
15
|
-
const r = c(i);
|
|
16
|
-
if (r.status === "invalid") throw r.error;
|
|
17
|
-
return r.status === "ready" ? r.config : void 0;
|
|
18
|
-
}
|
|
19
|
-
function d(i) {
|
|
20
|
-
const r = [], n = (t, o, e) => {
|
|
21
|
-
r.push({ field: t, place: o, ownerId: e }), t.derivedField && Object.values(t.derivedField.inputs).forEach((a) => n(a.field, "input", e));
|
|
22
|
-
};
|
|
23
|
-
return i.rows.forEach((t) => n(t.field, "row", t.id)), i.columns.forEach((t) => n(t.field, "column", t.id)), i.measures.forEach((t) => {
|
|
24
|
-
t.kind === "aggregate" ? n(t.field, "measure", t.id) : Object.values(t.definition.inputs).forEach((o) => n(o.field, "input", t.id));
|
|
25
|
-
}), r;
|
|
26
|
-
}
|
|
27
|
-
function m(i) {
|
|
28
|
-
return d(i).map((r) => r.field);
|
|
29
|
-
}
|
|
30
|
-
function v(i) {
|
|
31
|
-
return u([
|
|
32
|
-
i.source,
|
|
33
|
-
...m(i).map((r) => r.source ?? i.source)
|
|
34
|
-
]);
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
d as a,
|
|
38
|
-
v as b,
|
|
39
|
-
c as i,
|
|
40
|
-
m,
|
|
41
|
-
p as r
|
|
42
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { t as d } from "./validators-wtjw0aw6.js";
|
|
2
|
-
const h = [
|
|
3
|
-
"=",
|
|
4
|
-
"!=",
|
|
5
|
-
">",
|
|
6
|
-
"<",
|
|
7
|
-
">=",
|
|
8
|
-
"<=",
|
|
9
|
-
"like",
|
|
10
|
-
"not like",
|
|
11
|
-
"between",
|
|
12
|
-
"not between",
|
|
13
|
-
"in",
|
|
14
|
-
"not in",
|
|
15
|
-
"is null",
|
|
16
|
-
"is not null"
|
|
17
|
-
], m = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
|
|
18
|
-
function v(t) {
|
|
19
|
-
return typeof t == "string" && h.includes(t);
|
|
20
|
-
}
|
|
21
|
-
function b(t, e) {
|
|
22
|
-
switch (t) {
|
|
23
|
-
case "is null":
|
|
24
|
-
case "is not null":
|
|
25
|
-
return e.length === 0;
|
|
26
|
-
case "between":
|
|
27
|
-
case "not between":
|
|
28
|
-
return e.length === 2;
|
|
29
|
-
case "in":
|
|
30
|
-
case "not in":
|
|
31
|
-
return e.length >= 1;
|
|
32
|
-
default:
|
|
33
|
-
return e.length === 1;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function y(t) {
|
|
37
|
-
if (!t || typeof t != "object" || Array.isArray(t))
|
|
38
|
-
return;
|
|
39
|
-
const e = t, i = {};
|
|
40
|
-
for (const n of g)
|
|
41
|
-
e[n] !== void 0 && (i[n] = e[n]);
|
|
42
|
-
return i;
|
|
43
|
-
}
|
|
44
|
-
const g = [
|
|
45
|
-
"operation",
|
|
46
|
-
"values",
|
|
47
|
-
"valueType",
|
|
48
|
-
"temporalBucket",
|
|
49
|
-
"relativeMeta",
|
|
50
|
-
"temporalPrecision"
|
|
51
|
-
];
|
|
52
|
-
function P(t) {
|
|
53
|
-
const e = y(t);
|
|
54
|
-
if (!e) return;
|
|
55
|
-
const { operation: i, values: n } = e;
|
|
56
|
-
if (!v(i) || !Array.isArray(n) || !b(i, n)) return;
|
|
57
|
-
const r = typeof e.valueType == "string" && m.has(e.valueType) ? e.valueType : void 0;
|
|
58
|
-
return {
|
|
59
|
-
operation: i,
|
|
60
|
-
values: n,
|
|
61
|
-
...r ? { valueType: r } : {},
|
|
62
|
-
...e.temporalBucket !== void 0 ? { temporalBucket: e.temporalBucket } : {},
|
|
63
|
-
...e.relativeMeta !== void 0 ? { relativeMeta: e.relativeMeta } : {},
|
|
64
|
-
...e.temporalPrecision !== void 0 ? { temporalPrecision: e.temporalPrecision } : {}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function A(t) {
|
|
68
|
-
const e = P(t);
|
|
69
|
-
if (!e)
|
|
70
|
-
throw new Error(
|
|
71
|
-
`Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`
|
|
72
|
-
);
|
|
73
|
-
return e;
|
|
74
|
-
}
|
|
75
|
-
function T(t) {
|
|
76
|
-
return t.operation === "is null" || t.operation === "is not null";
|
|
77
|
-
}
|
|
78
|
-
function E(t, e) {
|
|
79
|
-
var n;
|
|
80
|
-
if (e === null) return !0;
|
|
81
|
-
if (e.overrides.length === 0) return t.length <= e.depth;
|
|
82
|
-
const i = d(t);
|
|
83
|
-
return ((n = e.overrides.find((r) => r.path.length === t.length && d(r.path) === i)) == null ? void 0 : n.expanded) ?? t.length <= e.depth;
|
|
84
|
-
}
|
|
85
|
-
function k(t) {
|
|
86
|
-
var u;
|
|
87
|
-
const { path: e, levelCount: i, expansion: n, total: r, axis: p } = t, s = e.length >= i || ((u = e[e.length - 1]) == null ? void 0 : u.member.kind) === "others", l = !s && !t.childrenEmpty, o = l && E(e, n), c = p === "rows" && t.rowLayout !== "tabular", f = o && !!t.skipRedundant && !!t.singleChild, a = !!(r != null && r.visible) && !f;
|
|
88
|
-
return {
|
|
89
|
-
expandable: l,
|
|
90
|
-
expanded: o,
|
|
91
|
-
memberVisible: c || !o,
|
|
92
|
-
valueVisible: s || a && (!o || r.position === "before"),
|
|
93
|
-
subtotalBefore: !c && o && a && r.position === "before",
|
|
94
|
-
subtotalAfter: o && a && r.position === "after"
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
h as N,
|
|
99
|
-
P as a,
|
|
100
|
-
E as b,
|
|
101
|
-
T as i,
|
|
102
|
-
y as p,
|
|
103
|
-
k as r,
|
|
104
|
-
A as t
|
|
105
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
function r(n) {
|
|
2
|
-
const t = o(n);
|
|
3
|
-
return e(t) ? t : void 0;
|
|
4
|
-
}
|
|
5
|
-
function o(n) {
|
|
6
|
-
if (typeof n != "string" || n.trim().length === 0)
|
|
7
|
-
return;
|
|
8
|
-
const t = n.trim().toLowerCase();
|
|
9
|
-
switch (t) {
|
|
10
|
-
case "=":
|
|
11
|
-
return "=";
|
|
12
|
-
case "!=":
|
|
13
|
-
return "!=";
|
|
14
|
-
case "in":
|
|
15
|
-
return "in";
|
|
16
|
-
case "not_in":
|
|
17
|
-
return "not_in";
|
|
18
|
-
case "contains":
|
|
19
|
-
return "contains";
|
|
20
|
-
case "not_contains":
|
|
21
|
-
return "not_contains";
|
|
22
|
-
case "between":
|
|
23
|
-
return "between";
|
|
24
|
-
case "not_between":
|
|
25
|
-
return "not_between";
|
|
26
|
-
case ">":
|
|
27
|
-
case ">=":
|
|
28
|
-
case "<":
|
|
29
|
-
case "<=":
|
|
30
|
-
return t;
|
|
31
|
-
case "is_null":
|
|
32
|
-
return "is_null";
|
|
33
|
-
case "is_not_null":
|
|
34
|
-
return "is_not_null";
|
|
35
|
-
default:
|
|
36
|
-
return i(n) ? n : void 0;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function e(n) {
|
|
40
|
-
return n === "=" || n === "!=" || n === "in" || n === "not_in" || n === "contains" || n === "not_contains" || n === "between" || n === "not_between" || n === ">" || n === ">=" || n === "<" || n === "<=";
|
|
41
|
-
}
|
|
42
|
-
function i(n) {
|
|
43
|
-
return e(n) || n === "not_contains" || n === "is_null" || n === "is_not_null";
|
|
44
|
-
}
|
|
45
|
-
function s(n) {
|
|
46
|
-
switch (n) {
|
|
47
|
-
case "not in":
|
|
48
|
-
return "not_in";
|
|
49
|
-
case "like":
|
|
50
|
-
return "contains";
|
|
51
|
-
case "not like":
|
|
52
|
-
return "not_contains";
|
|
53
|
-
case "not between":
|
|
54
|
-
return "not_between";
|
|
55
|
-
case "is null":
|
|
56
|
-
case "is not null":
|
|
57
|
-
return;
|
|
58
|
-
default:
|
|
59
|
-
return r(n);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
o as a,
|
|
64
|
-
r as n,
|
|
65
|
-
s as t
|
|
66
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var c = Object.defineProperty;
|
|
2
|
-
var d = (r, e, t) => e in r ? c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
-
var l = (r, e, t) => d(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { ad as u } from "./temporal-input-presentation--2r9BLr0.js";
|
|
5
|
-
import "./validators-wtjw0aw6.js";
|
|
6
|
-
import "./matrix-operation-contract-Eb6elidS.js";
|
|
7
|
-
import { r as v } from "./metric-comparison-ChXUFaZu.js";
|
|
8
|
-
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
9
|
-
import "zod";
|
|
10
|
-
class m extends Error {
|
|
11
|
-
constructor(t, a) {
|
|
12
|
-
super(`${t}: ${a}`);
|
|
13
|
-
l(this, "deliveryBlocking", !0);
|
|
14
|
-
this.code = t, this.name = "PivotHeaderPresentationError";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function k(r) {
|
|
18
|
-
var i;
|
|
19
|
-
const e = r.mode ?? "formatted", t = r.members.map((o) => {
|
|
20
|
-
var n;
|
|
21
|
-
if (e === "canonical" || !o.temporalBucket)
|
|
22
|
-
return o.value === null ? "" : String(o.value);
|
|
23
|
-
const s = (n = r.resolveTemporalFormat) == null ? void 0 : n.call(r, o.fieldId);
|
|
24
|
-
if (!s)
|
|
25
|
-
throw new m(
|
|
26
|
-
"missing_resolved_temporal_format",
|
|
27
|
-
`Missing resolved temporal presentation for pivot field "${o.fieldId}"`
|
|
28
|
-
);
|
|
29
|
-
return u({
|
|
30
|
-
value: o.value,
|
|
31
|
-
metadata: o.temporalBucket,
|
|
32
|
-
format: s
|
|
33
|
-
});
|
|
34
|
-
}), a = ((i = r.metricLabel) == null ? void 0 : i.trim()) || void 0;
|
|
35
|
-
return {
|
|
36
|
-
memberLabels: t,
|
|
37
|
-
...a ? { metricLabel: a } : {},
|
|
38
|
-
flattenedLabel: [
|
|
39
|
-
...t,
|
|
40
|
-
...a ? [a] : []
|
|
41
|
-
].join(" / ")
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function B(r) {
|
|
45
|
-
const e = /* @__PURE__ */ new Map();
|
|
46
|
-
return r.forEach((t) => {
|
|
47
|
-
t.id && e.set(t.id, (e.get(t.id) ?? 0) + 1);
|
|
48
|
-
}), r.flatMap(
|
|
49
|
-
(t) => t.id && (e.get(t.id) ?? 0) > 1 ? [v(t)] : []
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
m as P,
|
|
54
|
-
B as d,
|
|
55
|
-
k as p
|
|
56
|
-
};
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
var b = Object.defineProperty;
|
|
2
|
-
var _ = (t, e, r) => e in t ? b(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var f = (t, e, r) => _(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { R as v } from "./analytics-base-schemas-BaIQrEzX.js";
|
|
5
|
-
class s extends Error {
|
|
6
|
-
constructor(r) {
|
|
7
|
-
super(r);
|
|
8
|
-
f(this, "code");
|
|
9
|
-
this.name = "RawTemporalMetadataContractError", this.code = v.invalidMetadata;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function R(t) {
|
|
13
|
-
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
14
|
-
return !1;
|
|
15
|
-
const e = Object.getPrototypeOf(t);
|
|
16
|
-
return e === null || e === Object.prototype;
|
|
17
|
-
}
|
|
18
|
-
function g(t) {
|
|
19
|
-
if (!R(t))
|
|
20
|
-
throw new s(
|
|
21
|
-
"Raw temporal metadata must be an object."
|
|
22
|
-
);
|
|
23
|
-
const e = Object.keys(t);
|
|
24
|
-
if (e.length !== 2 || !e.includes("kind") || !e.includes("valueKind"))
|
|
25
|
-
throw new s(
|
|
26
|
-
"Raw temporal metadata must contain only kind and valueKind."
|
|
27
|
-
);
|
|
28
|
-
if (t.kind !== "raw_temporal")
|
|
29
|
-
throw new s(
|
|
30
|
-
"Raw temporal metadata kind must be raw_temporal."
|
|
31
|
-
);
|
|
32
|
-
if (t.valueKind !== "date" && t.valueKind !== "wall_datetime" && t.valueKind !== "instant")
|
|
33
|
-
throw new s(
|
|
34
|
-
"Raw temporal valueKind must be date, wall_datetime, or instant."
|
|
35
|
-
);
|
|
36
|
-
return {
|
|
37
|
-
kind: "raw_temporal",
|
|
38
|
-
valueKind: t.valueKind
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function S(t, e) {
|
|
42
|
-
if (!t.rawTemporal) {
|
|
43
|
-
if (e.metadataRequired)
|
|
44
|
-
throw new s(
|
|
45
|
-
"Activated raw temporal result is missing metadata."
|
|
46
|
-
);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (t.temporalBucket)
|
|
50
|
-
throw new s(
|
|
51
|
-
"A result column cannot carry both raw and grouped temporal metadata."
|
|
52
|
-
);
|
|
53
|
-
const r = g(t.rawTemporal), n = r.valueKind === "date" ? "date" : "datetime";
|
|
54
|
-
if (t.dataType !== n)
|
|
55
|
-
throw new s(
|
|
56
|
-
`${r.valueKind} raw temporal values require dataType ${n}.`
|
|
57
|
-
);
|
|
58
|
-
return r;
|
|
59
|
-
}
|
|
60
|
-
function $(t) {
|
|
61
|
-
if (!t) return null;
|
|
62
|
-
for (const [e, r] of Object.entries(C))
|
|
63
|
-
if (k(r, t))
|
|
64
|
-
return e;
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const l = (t, e) => Math.abs(t) === 1 ? e : `${e}s`;
|
|
68
|
-
function p(t, e) {
|
|
69
|
-
if (t === 0)
|
|
70
|
-
return e === "day" ? "today" : `this ${e}`;
|
|
71
|
-
if (t === -1)
|
|
72
|
-
return e === "day" ? "yesterday" : `last ${e}`;
|
|
73
|
-
if (t === 1)
|
|
74
|
-
return e === "day" ? "tomorrow" : `next ${e}`;
|
|
75
|
-
const r = Math.abs(t);
|
|
76
|
-
return t < 0 ? `${r} ${l(r, e)} ago` : `${r} ${l(r, e)} ahead`;
|
|
77
|
-
}
|
|
78
|
-
const N = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
79
|
-
function h(t, e) {
|
|
80
|
-
return N(p(t, e));
|
|
81
|
-
}
|
|
82
|
-
function A(t) {
|
|
83
|
-
if (!t) return null;
|
|
84
|
-
if (t.mode === "last" && t.relativeTo === "latest_data") {
|
|
85
|
-
const { relativeTo: r, ...n } = t, a = A(n);
|
|
86
|
-
return a ? `${a} of data` : null;
|
|
87
|
-
}
|
|
88
|
-
const e = $(t);
|
|
89
|
-
return e || (t.mode === "this" ? t.boundary === "first_day" ? "First day of the month" : t.boundary === "last_day" ? "Last day of the month" : `This ${t.unit}${t.toDate ? " to date" : ""}` : t.mode === "previous" ? `Last ${t.unit}` : t.mode === "last" ? `Last ${t.n} ${l(t.n, t.unit)}` : t.mode === "between" ? t.from === t.to ? h(t.from, t.unit) : `${h(t.from, t.unit)} to ${p(
|
|
90
|
-
t.to,
|
|
91
|
-
t.unit
|
|
92
|
-
)}` : null);
|
|
93
|
-
}
|
|
94
|
-
function k(t, e) {
|
|
95
|
-
return !(t.mode !== e.mode || t.unit !== e.unit || t.mode === "last" && e.mode === "last" && (t.n !== e.n || !!t.complete != !!e.complete || t.relativeTo !== e.relativeTo) || t.mode === "this" && e.mode === "this" && (!!t.toDate != !!e.toDate || t.boundary !== e.boundary) || t.mode === "between" && e.mode === "between" && (t.from !== e.from || t.to !== e.to));
|
|
96
|
-
}
|
|
97
|
-
const C = {
|
|
98
|
-
// Sub-day presets
|
|
99
|
-
"Last 30 minutes": { mode: "last", n: 30, unit: "minute" },
|
|
100
|
-
"Last 1 hour": { mode: "last", n: 1, unit: "hour" },
|
|
101
|
-
"Last 4 hours": { mode: "last", n: 4, unit: "hour" },
|
|
102
|
-
"Last 12 hours": { mode: "last", n: 12, unit: "hour" },
|
|
103
|
-
"Last 24 hours": { mode: "last", n: 24, unit: "hour" },
|
|
104
|
-
// Day presets
|
|
105
|
-
Today: { mode: "this", unit: "day" },
|
|
106
|
-
Yesterday: { mode: "previous", unit: "day" },
|
|
107
|
-
"First day of the month": {
|
|
108
|
-
mode: "this",
|
|
109
|
-
unit: "month",
|
|
110
|
-
boundary: "first_day"
|
|
111
|
-
},
|
|
112
|
-
"Last day of the month": {
|
|
113
|
-
mode: "this",
|
|
114
|
-
unit: "month",
|
|
115
|
-
boundary: "last_day"
|
|
116
|
-
},
|
|
117
|
-
"Last 7 days": { mode: "between", unit: "day", from: -6, to: 0 },
|
|
118
|
-
"Last 30 days": { mode: "between", unit: "day", from: -29, to: 0 },
|
|
119
|
-
"Last 90 days": { mode: "between", unit: "day", from: -89, to: 0 },
|
|
120
|
-
// Week presets
|
|
121
|
-
"This week": { mode: "this", unit: "week" },
|
|
122
|
-
"Last week": { mode: "previous", unit: "week" },
|
|
123
|
-
"Last 2 weeks": { mode: "last", n: 2, unit: "week", complete: !0 },
|
|
124
|
-
// Month presets
|
|
125
|
-
"This month": { mode: "this", unit: "month" },
|
|
126
|
-
"Last month": { mode: "previous", unit: "month" },
|
|
127
|
-
"Last 3 months": { mode: "last", n: 3, unit: "month", complete: !0 },
|
|
128
|
-
"Last 6 months": { mode: "last", n: 6, unit: "month", complete: !0 },
|
|
129
|
-
"Last 9 months": { mode: "last", n: 9, unit: "month", complete: !0 },
|
|
130
|
-
"Last 12 months": { mode: "last", n: 12, unit: "month", complete: !0 },
|
|
131
|
-
// Quarter presets
|
|
132
|
-
"This quarter": { mode: "this", unit: "quarter" },
|
|
133
|
-
"Last quarter": { mode: "previous", unit: "quarter" },
|
|
134
|
-
"Last 4 quarters": { mode: "last", n: 4, unit: "quarter", complete: !0 },
|
|
135
|
-
// Year presets
|
|
136
|
-
"This year": { mode: "this", unit: "year" },
|
|
137
|
-
"Last year": { mode: "previous", unit: "year" }
|
|
138
|
-
}, y = /* @__PURE__ */ new Map();
|
|
139
|
-
function D(t, e) {
|
|
140
|
-
let r = y.get(e);
|
|
141
|
-
r || (r = new Intl.DateTimeFormat("en-CA", {
|
|
142
|
-
calendar: "gregory",
|
|
143
|
-
numberingSystem: "latn",
|
|
144
|
-
timeZone: e,
|
|
145
|
-
year: "numeric",
|
|
146
|
-
month: "2-digit",
|
|
147
|
-
day: "2-digit",
|
|
148
|
-
hour: "2-digit",
|
|
149
|
-
minute: "2-digit",
|
|
150
|
-
second: "2-digit",
|
|
151
|
-
hourCycle: "h23"
|
|
152
|
-
}), y.set(e, r));
|
|
153
|
-
const n = r.formatToParts(t), a = (o) => {
|
|
154
|
-
var i;
|
|
155
|
-
return Number((i = n.find((d) => d.type === o)) == null ? void 0 : i.value);
|
|
156
|
-
};
|
|
157
|
-
return {
|
|
158
|
-
year: a("year"),
|
|
159
|
-
month: a("month"),
|
|
160
|
-
day: a("day"),
|
|
161
|
-
hour: a("hour"),
|
|
162
|
-
minute: a("minute"),
|
|
163
|
-
second: a("second")
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function c(t) {
|
|
167
|
-
const e = /* @__PURE__ */ new Date(0);
|
|
168
|
-
return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(t.hour, t.minute, t.second, t.millisecond ?? 0), e.getTime();
|
|
169
|
-
}
|
|
170
|
-
function u(t, e) {
|
|
171
|
-
const r = t - (t % 1e3 + 1e3) % 1e3;
|
|
172
|
-
return c(D(new Date(r), e)) - r;
|
|
173
|
-
}
|
|
174
|
-
const m = 864e5;
|
|
175
|
-
function j(t, e) {
|
|
176
|
-
const r = M(t, e);
|
|
177
|
-
if (r.length) return r[0];
|
|
178
|
-
const n = c(t);
|
|
179
|
-
return new Date(n - u(n - m, e));
|
|
180
|
-
}
|
|
181
|
-
function M(t, e) {
|
|
182
|
-
const r = c(t), n = u(r - m, e), a = u(r + m, e);
|
|
183
|
-
return [.../* @__PURE__ */ new Set([n, a])].map((o) => r - o).filter((o) => u(o, e) === r - o).sort((o, i) => o - i).map((o) => new Date(o));
|
|
184
|
-
}
|
|
185
|
-
const w = /^(\d{4})-(\d{2})-(\d{2})$/, T = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, L = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
186
|
-
function F(t) {
|
|
187
|
-
if (w.test(t)) return "date";
|
|
188
|
-
if (L.test(t)) return "instant";
|
|
189
|
-
if (T.test(t)) return "wall_datetime";
|
|
190
|
-
}
|
|
191
|
-
function E(t) {
|
|
192
|
-
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
193
|
-
}
|
|
194
|
-
function O(t, e) {
|
|
195
|
-
return e === 2 ? E(t) ? 29 : 28 : [4, 6, 9, 11].includes(e) ? 30 : 31;
|
|
196
|
-
}
|
|
197
|
-
function K(t) {
|
|
198
|
-
return t.year >= 1 && t.year <= 9999 && t.month >= 1 && t.month <= 12 && t.day >= 1 && t.day <= O(t.year, t.month) && t.hour >= 0 && t.hour <= 23 && t.minute >= 0 && t.minute <= 59 && t.second >= 0 && t.second <= 59;
|
|
199
|
-
}
|
|
200
|
-
function q(t) {
|
|
201
|
-
return {
|
|
202
|
-
year: Number(t[1]),
|
|
203
|
-
month: Number(t[2]),
|
|
204
|
-
day: Number(t[3]),
|
|
205
|
-
hour: Number(t[4] ?? 0),
|
|
206
|
-
minute: Number(t[5] ?? 0),
|
|
207
|
-
second: Number(t[6] ?? 0),
|
|
208
|
-
fraction: t[7] ?? ""
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
function W(t, e) {
|
|
212
|
-
const r = e === "date" ? t.match(w) : e === "wall_datetime" ? t.match(T) : t.match(L);
|
|
213
|
-
if (!r) return { status: "invalid_shape" };
|
|
214
|
-
const n = q(r);
|
|
215
|
-
if (!K(n)) return { status: "out_of_range" };
|
|
216
|
-
if (e === "instant") {
|
|
217
|
-
const a = r[8];
|
|
218
|
-
if (a && a !== "Z") {
|
|
219
|
-
const [i, d] = a.slice(1).split(":").map(Number);
|
|
220
|
-
if (i > 23 || d > 59) return { status: "out_of_range" };
|
|
221
|
-
}
|
|
222
|
-
const o = new Date(t.replace(" ", "T"));
|
|
223
|
-
return Number.isNaN(o.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: n, instant: o };
|
|
224
|
-
}
|
|
225
|
-
return { status: "valid", fields: n };
|
|
226
|
-
}
|
|
227
|
-
export {
|
|
228
|
-
s as R,
|
|
229
|
-
W as a,
|
|
230
|
-
h as b,
|
|
231
|
-
F as c,
|
|
232
|
-
C as d,
|
|
233
|
-
D as e,
|
|
234
|
-
$ as f,
|
|
235
|
-
A as g,
|
|
236
|
-
j as h,
|
|
237
|
-
g as p,
|
|
238
|
-
k as r,
|
|
239
|
-
S as v,
|
|
240
|
-
c as w,
|
|
241
|
-
M as z
|
|
242
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { s as p, S as h } from "./matrix-operation-contract-Eb6elidS.js";
|
|
2
|
-
function f(e, l, t) {
|
|
3
|
-
return e.length === 1 && t(e[0]) === t(l) ? { tuples: [], outcome: "cleared" } : { tuples: [l], outcome: "selected" };
|
|
4
|
-
}
|
|
5
|
-
function S(e, l) {
|
|
6
|
-
const t = /* @__PURE__ */ new Set();
|
|
7
|
-
return e.filter((n) => {
|
|
8
|
-
const r = l(n);
|
|
9
|
-
return t.has(r) ? !1 : (t.add(r), !0);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function x(e, l, t, n) {
|
|
13
|
-
const r = n.limit ?? h, o = n.tupleKey ?? p;
|
|
14
|
-
if (t.kind === "clear") return { tuples: [], outcome: "cleared" };
|
|
15
|
-
if (t.kind === "replace" || !n.multipleSelection)
|
|
16
|
-
return f(e, l, o);
|
|
17
|
-
if (t.kind === "toggle") {
|
|
18
|
-
const a = e.findIndex(
|
|
19
|
-
(c) => o(c) === o(l)
|
|
20
|
-
);
|
|
21
|
-
if (a >= 0) {
|
|
22
|
-
const c = e.filter((y, m) => m !== a);
|
|
23
|
-
return { tuples: c, outcome: c.length ? "removed" : "cleared" };
|
|
24
|
-
}
|
|
25
|
-
return e.length >= r ? { tuples: e, outcome: "limitReached" } : { tuples: [...e, l], outcome: "added" };
|
|
26
|
-
}
|
|
27
|
-
const d = (a) => t.ordered.findIndex(
|
|
28
|
-
(c) => o(c) === o(a)
|
|
29
|
-
), i = d(t.anchor), u = d(l);
|
|
30
|
-
if (i < 0 || u < 0) return f(e, l, o);
|
|
31
|
-
const s = S(
|
|
32
|
-
t.ordered.slice(Math.min(i, u), Math.max(i, u) + 1),
|
|
33
|
-
o
|
|
34
|
-
);
|
|
35
|
-
return s.length <= r ? { tuples: s, outcome: "rangeSelected" } : {
|
|
36
|
-
tuples: i <= u ? s.slice(0, r) : s.slice(-r),
|
|
37
|
-
outcome: "limitReached"
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function k(e, l, t) {
|
|
41
|
-
return t.multipleSelection ? e.metaKey || e.ctrlKey ? "toggle" : e.shiftKey ? l === "table" && t.hasAnchor ? "range" : "toggle" : e.pointerType === "touch" && t.checkboxesShown ? "toggle" : "replace" : "replace";
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
k as g,
|
|
45
|
-
x as r
|
|
46
|
-
};
|