react-semaphor 0.1.555 → 0.1.557
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/DATA_APP_SDK.md +6 -29
- package/dist/analytics-protocol/index.js +20 -21
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +426 -444
- package/dist/briefings/index.js +56 -57
- package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
- package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-WMTpYirZ.js} +79 -81
- package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-PjQpxbG7.js} +3 -3
- package/dist/chunks/{braces-o9UiRQes.js → braces-BOErQVyi.js} +1 -1
- package/dist/chunks/comparison-window-caption-Dc7BaCMz.js +1218 -0
- package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-CxYI-gFa.js} +31 -33
- package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-4D8Vy4pL.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-C4EmOfxs.js} +149 -151
- package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-DBWykmvL.js} +171 -173
- package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-DiX-p0F7.js} +21 -22
- package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-DP5hquBR.js} +32 -32
- package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-n1jLV_7V.js} +5842 -5955
- package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BB9iakLA.js} +915 -986
- package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CUBpotVN.js} +5 -5
- package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-Cc5tqkoW.js} +2908 -3112
- package/dist/chunks/{index-B2k6KtUN.js → index-CgjhzkKM.js} +72 -80
- package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
- package/dist/chunks/{layout-grid-Bgzth8vd.js → layout-grid-CcNklCwL.js} +1 -1
- package/dist/chunks/{list-filter-DsaTbM3J.js → list-filter-Ds_4UTpD.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-4GTUDheD.js} +22 -22
- package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-fS_4O7zA.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-Dj7HaAHC.js} +1 -1
- package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-CpgLZ7E5.js} +52 -52
- package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-C8LY7GG5.js} +4 -4
- package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
- package/dist/chunks/{palette-D10o_yYX.js → palette-DMkIhagj.js} +1 -1
- package/dist/chunks/{matrix-formatter-K2OVPJQI.js → pivot-result-contract-expectations-DMk-mKhG.js} +451 -402
- package/dist/chunks/pivot-result-identity-CrQ54Xbj.js +77 -0
- package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DdEpgPRB.js} +25 -26
- package/dist/chunks/report-preferences-dialog-CFg5VFLk.js +2109 -0
- package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-CohdtiMg.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Djl3kCFL.js} +1396 -1550
- package/dist/chunks/{save-CfJpQQ68.js → save-D1EpMcwT.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-umlQFevH.js} +9 -9
- package/dist/chunks/selection-reducer-_d6aKJnj.js +46 -0
- package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-4cOp6sla.js} +54479 -63899
- package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-DAtRuvR7.js} +7 -7
- package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-DXW1HpKf.js} +1 -1
- package/dist/chunks/{switch-B-UTI6v-.js → switch-9CJt5EF_.js} +1431 -1342
- package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-CTCTA_bd.js} +1 -1
- package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-DF1gdVQR.js} +3 -3
- package/dist/chunks/temporal-input-presentation-DoSniQj1.js +2939 -0
- package/dist/chunks/{token-types-DYECHYGH.js → token-types-DFyLflLY.js} +1 -1
- package/dist/chunks/{upload-BFX7apKV.js → upload-LSNKpt0w.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-esyMT9vU.js} +125 -127
- package/dist/chunks/{validators-ClKLGDGZ.js → validators-hmfNNQz8.js} +305 -307
- package/dist/chunks/zoned-wall-clock-E35Frf9v.js +191 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +168 -169
- package/dist/data-app-sdk/index.js +789 -4154
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +234 -253
- package/dist/index.js +233 -235
- package/dist/layouts/index.js +1 -1
- package/dist/pdf-export-policy/index.js +9 -11
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
- package/dist/types/data-app-sdk/contracts.d.ts +0 -146
- package/dist/types/data-app-sdk/index.d.ts +0 -2
- package/dist/types/index.js +27 -28
- package/dist/types/lib/api/exports-api.d.ts +1 -1
- package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
- package/dist/types/lib/charts/types.d.ts +2 -2
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
- package/dist/types/lib/document/document-edits.d.ts +1 -1
- package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
- package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
- package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
- package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
- package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
- package/dist/types/lib/types/common-types.d.ts +0 -7
- package/dist/types/lib/types/explorer-types.d.ts +1 -14
- package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +1 -7
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
- package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
- package/dist/types/shared/format-utils/index.d.ts +0 -2
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
- package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
- package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
- package/package.json +2 -4
- package/src/data-app-sdk/README.md +7 -31
- package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
- package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
- package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
- package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
- package/dist/chunks/raw-temporal-contract-WuXA8jBP.js +0 -64
- package/dist/chunks/report-preferences-dialog-D_KyuEFx.js +0 -2261
- package/dist/chunks/selection-reducer-yw_JgICP.js +0 -111
- package/dist/chunks/temporal-bucket-C4rqmwaQ.js +0 -2071
- package/dist/chunks/x-4f5U2XwU.js +0 -100
- package/dist/chunks/zoned-wall-clock-MulfA26h.js +0 -129
- package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
- package/dist/types/data-app-sdk/devtools/index.d.ts +0 -49
- package/dist/types/data-app-sdk/devtools.d.ts +0 -1
- package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
- package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var L = (t, e, r) => e in t ? w(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var m = (t, e, r) => L(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { R as v } from "./analytics-base-schemas-BUFUoO6G.js";
|
|
5
|
+
class s extends Error {
|
|
6
|
+
constructor(r) {
|
|
7
|
+
super(r);
|
|
8
|
+
m(this, "code");
|
|
9
|
+
this.name = "RawTemporalMetadataContractError", this.code = v.invalidMetadata;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function T(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 b(t) {
|
|
19
|
+
if (!T(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 O(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 = b(t.rawTemporal), o = r.valueKind === "date" ? "date" : "datetime";
|
|
54
|
+
if (t.dataType !== o)
|
|
55
|
+
throw new s(
|
|
56
|
+
`${r.valueKind} raw temporal values require dataType ${o}.`
|
|
57
|
+
);
|
|
58
|
+
return r;
|
|
59
|
+
}
|
|
60
|
+
function R(t) {
|
|
61
|
+
if (!t) return null;
|
|
62
|
+
for (const [e, r] of Object.entries(_))
|
|
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 y(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 g = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
79
|
+
function f(t, e) {
|
|
80
|
+
return g(y(t, e));
|
|
81
|
+
}
|
|
82
|
+
function $(t) {
|
|
83
|
+
if (!t) return null;
|
|
84
|
+
if (t.mode === "last" && t.relativeTo === "latest_data") {
|
|
85
|
+
const { relativeTo: r, ...o } = t, a = $(o);
|
|
86
|
+
return a ? `${a} of data` : null;
|
|
87
|
+
}
|
|
88
|
+
const e = R(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 ? f(t.from, t.unit) : `${f(t.from, t.unit)} to ${y(
|
|
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 _ = {
|
|
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
|
+
}, c = /* @__PURE__ */ new Map();
|
|
139
|
+
function C(t, e) {
|
|
140
|
+
let r = c.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
|
+
}), c.set(e, r));
|
|
153
|
+
const o = r.formatToParts(t), a = (i) => {
|
|
154
|
+
var n;
|
|
155
|
+
return Number((n = o.find((u) => u.type === i)) == null ? void 0 : n.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 p(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 d(t, e) {
|
|
171
|
+
const r = t - (t % 1e3 + 1e3) % 1e3;
|
|
172
|
+
return p(C(new Date(r), e)) - r;
|
|
173
|
+
}
|
|
174
|
+
const h = 864e5;
|
|
175
|
+
function A(t, e) {
|
|
176
|
+
const r = p(t), o = d(r - h, e), a = d(r + h, e), i = [.../* @__PURE__ */ new Set([o, a])].map((n) => r - n).filter((n) => d(n, e) === r - n).sort((n, u) => n - u);
|
|
177
|
+
return new Date(i.length ? i[0] : r - o);
|
|
178
|
+
}
|
|
179
|
+
export {
|
|
180
|
+
s as R,
|
|
181
|
+
f as a,
|
|
182
|
+
_ as b,
|
|
183
|
+
A as c,
|
|
184
|
+
R as f,
|
|
185
|
+
$ as g,
|
|
186
|
+
b as p,
|
|
187
|
+
k as r,
|
|
188
|
+
O as v,
|
|
189
|
+
p as w,
|
|
190
|
+
C as z
|
|
191
|
+
};
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as o } from "../chunks/dashboard-
|
|
2
|
-
import { C as s, E as C } from "../chunks/table-settings-
|
|
1
|
+
import { D as o } from "../chunks/dashboard-4D8Vy4pL.js";
|
|
2
|
+
import { C as s, E as C } from "../chunks/table-settings-DF1gdVQR.js";
|
|
3
3
|
export {
|
|
4
4
|
s as CONTROL_CARD_DEFAULT_VALUE,
|
|
5
5
|
o as Dashboard,
|