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
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { forwardRef as c, createElement as a } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.453.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
const w = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), i = (...e) => e.filter((r, t, o) => !!r && o.indexOf(r) === t).join(" ");
|
|
9
|
-
/**
|
|
10
|
-
* @license lucide-react v0.453.0 - ISC
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the ISC license.
|
|
13
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
var k = {
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
-
width: 24,
|
|
18
|
-
height: 24,
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
fill: "none",
|
|
21
|
-
stroke: "currentColor",
|
|
22
|
-
strokeWidth: 2,
|
|
23
|
-
strokeLinecap: "round",
|
|
24
|
-
strokeLinejoin: "round"
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* @license lucide-react v0.453.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/
|
|
32
|
-
const C = c(
|
|
33
|
-
({
|
|
34
|
-
color: e = "currentColor",
|
|
35
|
-
size: r = 24,
|
|
36
|
-
strokeWidth: t = 2,
|
|
37
|
-
absoluteStrokeWidth: o,
|
|
38
|
-
className: s = "",
|
|
39
|
-
children: n,
|
|
40
|
-
iconNode: u,
|
|
41
|
-
...d
|
|
42
|
-
}, m) => a(
|
|
43
|
-
"svg",
|
|
44
|
-
{
|
|
45
|
-
ref: m,
|
|
46
|
-
...k,
|
|
47
|
-
width: r,
|
|
48
|
-
height: r,
|
|
49
|
-
stroke: e,
|
|
50
|
-
strokeWidth: o ? Number(t) * 24 / Number(r) : t,
|
|
51
|
-
className: i("lucide", s),
|
|
52
|
-
...d
|
|
53
|
-
},
|
|
54
|
-
[
|
|
55
|
-
...u.map(([h, p]) => a(h, p)),
|
|
56
|
-
...Array.isArray(n) ? n : [n]
|
|
57
|
-
]
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
/**
|
|
61
|
-
* @license lucide-react v0.453.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/
|
|
66
|
-
const l = (e, r) => {
|
|
67
|
-
const t = c(
|
|
68
|
-
({ className: o, ...s }, n) => a(C, {
|
|
69
|
-
ref: n,
|
|
70
|
-
iconNode: r,
|
|
71
|
-
className: i(`lucide-${w(e)}`, o),
|
|
72
|
-
...s
|
|
73
|
-
})
|
|
74
|
-
);
|
|
75
|
-
return t.displayName = `${e}`, t;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* @license lucide-react v0.453.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/
|
|
83
|
-
const b = l("ChevronDown", [
|
|
84
|
-
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
85
|
-
]);
|
|
86
|
-
/**
|
|
87
|
-
* @license lucide-react v0.453.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/
|
|
92
|
-
const g = l("X", [
|
|
93
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
94
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
95
|
-
]);
|
|
96
|
-
export {
|
|
97
|
-
b as C,
|
|
98
|
-
g as X,
|
|
99
|
-
l as c
|
|
100
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
function y(t) {
|
|
2
|
-
if (!t) return null;
|
|
3
|
-
for (const [e, o] of Object.entries(T))
|
|
4
|
-
if (w(o, t))
|
|
5
|
-
return e;
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
const d = (t, e) => Math.abs(t) === 1 ? e : `${e}s`;
|
|
9
|
-
function h(t, e) {
|
|
10
|
-
if (t === 0)
|
|
11
|
-
return e === "day" ? "today" : `this ${e}`;
|
|
12
|
-
if (t === -1)
|
|
13
|
-
return e === "day" ? "yesterday" : `last ${e}`;
|
|
14
|
-
if (t === 1)
|
|
15
|
-
return e === "day" ? "tomorrow" : `next ${e}`;
|
|
16
|
-
const o = Math.abs(t);
|
|
17
|
-
return t < 0 ? `${o} ${d(o, e)} ago` : `${o} ${d(o, e)} ahead`;
|
|
18
|
-
}
|
|
19
|
-
const L = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
20
|
-
function l(t, e) {
|
|
21
|
-
return L(h(t, e));
|
|
22
|
-
}
|
|
23
|
-
function p(t) {
|
|
24
|
-
if (!t) return null;
|
|
25
|
-
if (t.mode === "last" && t.relativeTo === "latest_data") {
|
|
26
|
-
const { relativeTo: o, ...s } = t, n = p(s);
|
|
27
|
-
return n ? `${n} of data` : null;
|
|
28
|
-
}
|
|
29
|
-
const e = y(t);
|
|
30
|
-
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} ${d(t.n, t.unit)}` : t.mode === "between" ? t.from === t.to ? l(t.from, t.unit) : `${l(t.from, t.unit)} to ${h(
|
|
31
|
-
t.to,
|
|
32
|
-
t.unit
|
|
33
|
-
)}` : null);
|
|
34
|
-
}
|
|
35
|
-
function w(t, e) {
|
|
36
|
-
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));
|
|
37
|
-
}
|
|
38
|
-
const T = {
|
|
39
|
-
// Sub-day presets
|
|
40
|
-
"Last 30 minutes": { mode: "last", n: 30, unit: "minute" },
|
|
41
|
-
"Last 1 hour": { mode: "last", n: 1, unit: "hour" },
|
|
42
|
-
"Last 4 hours": { mode: "last", n: 4, unit: "hour" },
|
|
43
|
-
"Last 12 hours": { mode: "last", n: 12, unit: "hour" },
|
|
44
|
-
"Last 24 hours": { mode: "last", n: 24, unit: "hour" },
|
|
45
|
-
// Day presets
|
|
46
|
-
Today: { mode: "this", unit: "day" },
|
|
47
|
-
Yesterday: { mode: "previous", unit: "day" },
|
|
48
|
-
"First day of the month": {
|
|
49
|
-
mode: "this",
|
|
50
|
-
unit: "month",
|
|
51
|
-
boundary: "first_day"
|
|
52
|
-
},
|
|
53
|
-
"Last day of the month": {
|
|
54
|
-
mode: "this",
|
|
55
|
-
unit: "month",
|
|
56
|
-
boundary: "last_day"
|
|
57
|
-
},
|
|
58
|
-
"Last 7 days": { mode: "between", unit: "day", from: -6, to: 0 },
|
|
59
|
-
"Last 30 days": { mode: "between", unit: "day", from: -29, to: 0 },
|
|
60
|
-
"Last 90 days": { mode: "between", unit: "day", from: -89, to: 0 },
|
|
61
|
-
// Week presets
|
|
62
|
-
"This week": { mode: "this", unit: "week" },
|
|
63
|
-
"Last week": { mode: "previous", unit: "week" },
|
|
64
|
-
"Last 2 weeks": { mode: "last", n: 2, unit: "week", complete: !0 },
|
|
65
|
-
// Month presets
|
|
66
|
-
"This month": { mode: "this", unit: "month" },
|
|
67
|
-
"Last month": { mode: "previous", unit: "month" },
|
|
68
|
-
"Last 3 months": { mode: "last", n: 3, unit: "month", complete: !0 },
|
|
69
|
-
"Last 6 months": { mode: "last", n: 6, unit: "month", complete: !0 },
|
|
70
|
-
"Last 9 months": { mode: "last", n: 9, unit: "month", complete: !0 },
|
|
71
|
-
"Last 12 months": { mode: "last", n: 12, unit: "month", complete: !0 },
|
|
72
|
-
// Quarter presets
|
|
73
|
-
"This quarter": { mode: "this", unit: "quarter" },
|
|
74
|
-
"Last quarter": { mode: "previous", unit: "quarter" },
|
|
75
|
-
"Last 4 quarters": { mode: "last", n: 4, unit: "quarter", complete: !0 },
|
|
76
|
-
// Year presets
|
|
77
|
-
"This year": { mode: "this", unit: "year" },
|
|
78
|
-
"Last year": { mode: "previous", unit: "year" }
|
|
79
|
-
}, m = /* @__PURE__ */ new Map();
|
|
80
|
-
function v(t, e) {
|
|
81
|
-
let o = m.get(e);
|
|
82
|
-
o || (o = new Intl.DateTimeFormat("en-CA", {
|
|
83
|
-
calendar: "gregory",
|
|
84
|
-
numberingSystem: "latn",
|
|
85
|
-
timeZone: e,
|
|
86
|
-
year: "numeric",
|
|
87
|
-
month: "2-digit",
|
|
88
|
-
day: "2-digit",
|
|
89
|
-
hour: "2-digit",
|
|
90
|
-
minute: "2-digit",
|
|
91
|
-
second: "2-digit",
|
|
92
|
-
hourCycle: "h23"
|
|
93
|
-
}), m.set(e, o));
|
|
94
|
-
const s = o.formatToParts(t), n = (i) => {
|
|
95
|
-
var r;
|
|
96
|
-
return Number((r = s.find((a) => a.type === i)) == null ? void 0 : r.value);
|
|
97
|
-
};
|
|
98
|
-
return {
|
|
99
|
-
year: n("year"),
|
|
100
|
-
month: n("month"),
|
|
101
|
-
day: n("day"),
|
|
102
|
-
hour: n("hour"),
|
|
103
|
-
minute: n("minute"),
|
|
104
|
-
second: n("second")
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function c(t) {
|
|
108
|
-
const e = /* @__PURE__ */ new Date(0);
|
|
109
|
-
return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(t.hour, t.minute, t.second, t.millisecond ?? 0), e.getTime();
|
|
110
|
-
}
|
|
111
|
-
function u(t, e) {
|
|
112
|
-
const o = t - (t % 1e3 + 1e3) % 1e3;
|
|
113
|
-
return c(v(new Date(o), e)) - o;
|
|
114
|
-
}
|
|
115
|
-
const f = 864e5;
|
|
116
|
-
function $(t, e) {
|
|
117
|
-
const o = c(t), s = u(o - f, e), n = u(o + f, e), i = [.../* @__PURE__ */ new Set([s, n])].map((r) => o - r).filter((r) => u(r, e) === o - r).sort((r, a) => r - a);
|
|
118
|
-
return new Date(i.length ? i[0] : o - s);
|
|
119
|
-
}
|
|
120
|
-
export {
|
|
121
|
-
l as a,
|
|
122
|
-
$ as b,
|
|
123
|
-
y as f,
|
|
124
|
-
p as g,
|
|
125
|
-
T as p,
|
|
126
|
-
w as r,
|
|
127
|
-
c as w,
|
|
128
|
-
v as z
|
|
129
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { AggregateFunction, GroupByField, QueryColumnKeyMap } from '../../../lib/types/explorer-types.js';
|
|
2
|
-
import { ComparisonMetadataMap } from '../../../lib/types/query-types.js';
|
|
3
|
-
import { SemaphorResultColumn } from '../../../shared/analytics-protocol/index.js';
|
|
4
|
-
import { CanonicalPivotResultContract, CanonicalPivotResultState } from '../../../shared/format-utils/index.js';
|
|
5
|
-
import { TemporalResultOwner } from '../../../shared/dashboard-authoring/index.js';
|
|
6
|
-
export type { AggregateFunction } from '../../../lib/types/explorer-types.js';
|
|
7
|
-
export declare enum PivotMarkerEnum {
|
|
8
|
-
SUBTOTAL = "__SUBTOTAL__",
|
|
9
|
-
TOTAL = "__TOTAL__"
|
|
10
|
-
}
|
|
11
|
-
export interface ColumnAggregate {
|
|
12
|
-
function: AggregateFunction;
|
|
13
|
-
pivotLevel: string | 'ALL';
|
|
14
|
-
}
|
|
15
|
-
export interface RowAggregate {
|
|
16
|
-
function: AggregateFunction;
|
|
17
|
-
groupLevel?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface PivotCardConfig {
|
|
20
|
-
columnAggregates?: ColumnAggregate[];
|
|
21
|
-
rowAggregates?: RowAggregate[];
|
|
22
|
-
}
|
|
23
|
-
export interface PivotRowMetadata {
|
|
24
|
-
isSubtotal?: boolean;
|
|
25
|
-
isGrandTotal?: boolean;
|
|
26
|
-
subtotalLevel?: string | 'grandTotal';
|
|
27
|
-
aggregate?: AggregateFunction;
|
|
28
|
-
subtotalContext?: {
|
|
29
|
-
fieldAlias: string;
|
|
30
|
-
value: string;
|
|
31
|
-
groupByValues: Record<string, any>;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface ColumnSubtotalMeta {
|
|
35
|
-
columnName: string;
|
|
36
|
-
isSubtotal: boolean;
|
|
37
|
-
subtotalLevel: string;
|
|
38
|
-
aggregate: AggregateFunction;
|
|
39
|
-
pivotFieldId?: string | 'ALL';
|
|
40
|
-
pivotFieldIds?: string[];
|
|
41
|
-
pivotPath?: (string | null)[];
|
|
42
|
-
subtotalScope?: 'pivot-value' | 'grand-total';
|
|
43
|
-
}
|
|
44
|
-
export interface PivotColumnSchema {
|
|
45
|
-
alias: string;
|
|
46
|
-
metricAlias?: string;
|
|
47
|
-
metricId: string;
|
|
48
|
-
metricName: string;
|
|
49
|
-
metricLabel: string;
|
|
50
|
-
pivotValues: (string | null)[];
|
|
51
|
-
pivotFieldIds?: string[];
|
|
52
|
-
pivotFields: string[];
|
|
53
|
-
displayLabel?: string;
|
|
54
|
-
isPivotColumn?: boolean;
|
|
55
|
-
isMetricColumn?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface ColumnMetadata {
|
|
58
|
-
metricAlias: string;
|
|
59
|
-
metricId: string;
|
|
60
|
-
pivotValues: (string | null)[];
|
|
61
|
-
pivotFieldIds?: string[];
|
|
62
|
-
isSubtotal: boolean;
|
|
63
|
-
aggregateFunction?: string;
|
|
64
|
-
subtotalScope?: 'base' | 'pivot-value' | 'grand-total';
|
|
65
|
-
}
|
|
66
|
-
export interface PivotTableResponse {
|
|
67
|
-
records: (Record<string, any> & PivotRowMetadata)[];
|
|
68
|
-
resultOwner?: TemporalResultOwner;
|
|
69
|
-
pivotResultState?: CanonicalPivotResultState;
|
|
70
|
-
pivotResultContract?: CanonicalPivotResultContract;
|
|
71
|
-
pivotSchema: PivotColumnSchema[];
|
|
72
|
-
subtotalColumns: string[];
|
|
73
|
-
columnSubtotalMeta?: ColumnSubtotalMeta[];
|
|
74
|
-
groupByColumns?: GroupByField[];
|
|
75
|
-
columnMetadata?: Record<string, ColumnMetadata>;
|
|
76
|
-
comparisonMetadata?: ComparisonMetadataMap;
|
|
77
|
-
columns?: SemaphorResultColumn[];
|
|
78
|
-
columnKeyMap?: QueryColumnKeyMap;
|
|
79
|
-
}
|
|
80
|
-
export type PivotTableData = (Record<string, any> & PivotRowMetadata)[];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { SemaphorActiveInput, SemaphorDataAppDebugConfig, SemaphorDataAppDevtoolsState, SemaphorDataAppTrace, SemaphorQueryDebugOptions, SemaphorQueryDefinition } from '../contracts.js';
|
|
3
|
-
import { SemaphorAnalyticsIntent } from '../../shared/analytics-protocol/index.js';
|
|
4
|
-
export type SemaphorDataAppQueryTraceController<TData> = {
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
queryId: string;
|
|
7
|
-
trace?: SemaphorDataAppTrace;
|
|
8
|
-
start(): void;
|
|
9
|
-
success(data: TData, durationMs: number): void;
|
|
10
|
-
failure(error: unknown, durationMs: number): void;
|
|
11
|
-
ignored(reason: 'newer_inputs' | 'unmounted' | 'superseded'): void;
|
|
12
|
-
validationFailure(error: Error): void;
|
|
13
|
-
};
|
|
14
|
-
type UseSemaphorQueryTraceOptions = {
|
|
15
|
-
spec: SemaphorQueryDefinition;
|
|
16
|
-
queryKind: SemaphorQueryDefinition['queryKind'];
|
|
17
|
-
queryKey: string;
|
|
18
|
-
intent?: SemaphorAnalyticsIntent;
|
|
19
|
-
activeInputs?: SemaphorActiveInput[];
|
|
20
|
-
debug?: SemaphorQueryDebugOptions;
|
|
21
|
-
};
|
|
22
|
-
export type SemaphorDevtoolsProps = {
|
|
23
|
-
buttonPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative';
|
|
24
|
-
initialIsOpen?: boolean;
|
|
25
|
-
panelPosition?: 'bottom' | 'right';
|
|
26
|
-
className?: string;
|
|
27
|
-
style?: CSSProperties;
|
|
28
|
-
};
|
|
29
|
-
export type SemaphorDevtoolsInspectButtonProps = {
|
|
30
|
-
queryId?: string;
|
|
31
|
-
viewId?: string;
|
|
32
|
-
label?: string;
|
|
33
|
-
className?: string;
|
|
34
|
-
style?: CSSProperties;
|
|
35
|
-
};
|
|
36
|
-
export declare function SemaphorDataAppDevtoolsProvider({ debug, children, }: {
|
|
37
|
-
debug?: SemaphorDataAppDebugConfig;
|
|
38
|
-
children: ReactNode;
|
|
39
|
-
}): import("react").JSX.Element;
|
|
40
|
-
export declare function SemaphorViewBoundary({ id, title, children, }: {
|
|
41
|
-
id: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
children: ReactNode;
|
|
44
|
-
}): ReactElement;
|
|
45
|
-
export declare function SemaphorDevtools({ buttonPosition, initialIsOpen, panelPosition, className, style, }?: SemaphorDevtoolsProps): ReactElement | null;
|
|
46
|
-
export declare function SemaphorDevtoolsInspectButton({ queryId, viewId, label, className, style, }?: SemaphorDevtoolsInspectButtonProps): ReactElement | null;
|
|
47
|
-
export declare function useSemaphorDevtools(): SemaphorDataAppDevtoolsState;
|
|
48
|
-
export declare function useSemaphorQueryTrace<TData>({ spec, queryKind, queryKey, intent, activeInputs, debug, }: UseSemaphorQueryTraceOptions): SemaphorDataAppQueryTraceController<TData>;
|
|
49
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SemaphorDataAppDevtoolsProvider, SemaphorDevtools, SemaphorDevtoolsInspectButton, SemaphorViewBoundary, useSemaphorDevtools, useSemaphorQueryTrace, type SemaphorDataAppQueryTraceController, type SemaphorDevtoolsInspectButtonProps, type SemaphorDevtoolsProps, } from './devtools/index.js';
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React-free aggregate-table row presentation policy shared by browser and
|
|
3
|
-
* delivery adapters. Canonical tuple values and row metadata remain identity;
|
|
4
|
-
* this module owns authoritative group keys and group-cell placement.
|
|
5
|
-
*/
|
|
6
|
-
export { PDF_GROUP_CONTINUATION_CLASS as AGGREGATE_PDF_CONTINUATION_CLASS, } from './grouped-table-presentation.js';
|
|
7
|
-
export interface AggregateSubtotalLabelInput {
|
|
8
|
-
aggregateFunction: string;
|
|
9
|
-
customLabel?: string;
|
|
10
|
-
levelValue: unknown;
|
|
11
|
-
formatValue?: (value: unknown) => string;
|
|
12
|
-
}
|
|
13
|
-
export declare const AGGREGATE_TOTAL_MEMBER_MARKER: "__TOTAL__";
|
|
14
|
-
export interface AggregateTablePresentationContext {
|
|
15
|
-
groupColumnKeys: string[];
|
|
16
|
-
rowAggregates: Array<{
|
|
17
|
-
function: string;
|
|
18
|
-
groupLevel: string;
|
|
19
|
-
label?: string;
|
|
20
|
-
}>;
|
|
21
|
-
}
|
|
22
|
-
export type AggregateGroupCellPlacement = 'value' | 'label' | 'empty';
|
|
23
|
-
export interface AggregateGroupCellPresentation<T = string> {
|
|
24
|
-
columnKey: string;
|
|
25
|
-
text: T | string;
|
|
26
|
-
placement: AggregateGroupCellPlacement;
|
|
27
|
-
colSpan: number;
|
|
28
|
-
}
|
|
29
|
-
export interface AggregateGroupRowPresentation<T = string> {
|
|
30
|
-
kind: 'data' | 'subtotal' | 'grand-total';
|
|
31
|
-
cells: AggregateGroupCellPresentation<T>[];
|
|
32
|
-
}
|
|
33
|
-
export interface AggregateTablePresentationColumnKeyMap {
|
|
34
|
-
byRole: Readonly<{
|
|
35
|
-
groupby?: Readonly<Record<string, {
|
|
36
|
-
rawKey: string;
|
|
37
|
-
outputKey?: string;
|
|
38
|
-
}>>;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
export declare function isAggregateTotalMemberMarker(value: unknown): value is typeof AGGREGATE_TOTAL_MEMBER_MARKER;
|
|
42
|
-
/**
|
|
43
|
-
* Resolves saved field identity into the physical result keys used by rows.
|
|
44
|
-
* Missing groupByColumns is a valid metric-only aggregate-table shape.
|
|
45
|
-
*/
|
|
46
|
-
export declare function resolveAggregateTablePresentationContext(input: {
|
|
47
|
-
groupByColumns?: readonly unknown[];
|
|
48
|
-
rowAggregates?: readonly unknown[];
|
|
49
|
-
columnKeyMap?: AggregateTablePresentationColumnKeyMap;
|
|
50
|
-
}): AggregateTablePresentationContext;
|
|
51
|
-
export declare function formatAggregateSubtotalLabel(input: AggregateSubtotalLabelInput): string;
|
|
52
|
-
export declare function formatAggregateGrandTotalLabel(aggregateFunction: string, customLabel?: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Returns whether an aggregate group value starts a new visible group at its
|
|
55
|
-
* hierarchy level. A nested value repeats only when its complete parent prefix
|
|
56
|
-
* also repeats. Subtotals and grand totals are presentation boundaries.
|
|
57
|
-
*/
|
|
58
|
-
export declare function shouldPresentAggregateGroupValue(input: {
|
|
59
|
-
row: Record<string, unknown>;
|
|
60
|
-
previousRow?: Record<string, unknown>;
|
|
61
|
-
context: AggregateTablePresentationContext;
|
|
62
|
-
columnKey: string;
|
|
63
|
-
}): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Formats one physical aggregate group cell. Row metadata alone determines
|
|
66
|
-
* subtotal/grand-total ownership; null is always passed to the value formatter
|
|
67
|
-
* as a genuine blank member.
|
|
68
|
-
*/
|
|
69
|
-
export declare function presentAggregateGroupRow<T = string>(input: {
|
|
70
|
-
row: Record<string, unknown>;
|
|
71
|
-
context: AggregateTablePresentationContext;
|
|
72
|
-
formatValue: (value: unknown, columnKey: string) => T;
|
|
73
|
-
formatLabelValue?: (value: unknown, columnKey: string) => string;
|
|
74
|
-
}): AggregateGroupRowPresentation<T>;
|
|
75
|
-
export declare function formatAggregateGroupCell(input: {
|
|
76
|
-
row: Record<string, unknown>;
|
|
77
|
-
context: AggregateTablePresentationContext;
|
|
78
|
-
columnKey: string;
|
|
79
|
-
formatValue: (value: unknown, columnKey: string) => string;
|
|
80
|
-
}): string;
|
|
81
|
-
export declare function formatAggregateGroupRow(input: {
|
|
82
|
-
row: Record<string, unknown>;
|
|
83
|
-
context: AggregateTablePresentationContext;
|
|
84
|
-
formatValue: (value: unknown, columnKey: string) => string;
|
|
85
|
-
}): string[];
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { SemaphorResultColumn } from '../analytics-protocol/contracts.js';
|
|
2
|
-
import { PivotResultColumnClassification, QueryColumnKeyMap, QueryColumnKeyRole } from './pivot-result-identity.js';
|
|
3
|
-
export type CanonicalPivotResultState = 'loaded_empty' | 'loaded_valid';
|
|
4
|
-
type CanonicalPivotResultBase = {
|
|
5
|
-
columns: SemaphorResultColumn[];
|
|
6
|
-
columnKeyMap: QueryColumnKeyMap;
|
|
7
|
-
pivotResultContract: CanonicalPivotResultContract;
|
|
8
|
-
};
|
|
9
|
-
export type LoadedEmptyPivotResult = CanonicalPivotResultBase & {
|
|
10
|
-
pivotResultState: 'loaded_empty';
|
|
11
|
-
records: [];
|
|
12
|
-
};
|
|
13
|
-
export type LoadedValidPivotResult = CanonicalPivotResultBase & {
|
|
14
|
-
pivotResultState: 'loaded_valid';
|
|
15
|
-
records: [Record<string, unknown>, ...Record<string, unknown>[]];
|
|
16
|
-
};
|
|
17
|
-
export type CanonicalPivotResultTransport = LoadedEmptyPivotResult | LoadedValidPivotResult;
|
|
18
|
-
export declare class PivotResultLifecycleError extends Error {
|
|
19
|
-
readonly cause?: unknown | undefined;
|
|
20
|
-
readonly code: "invalid_pivot_result_lifecycle";
|
|
21
|
-
readonly deliveryBlocking = true;
|
|
22
|
-
constructor(message: string, cause?: unknown | undefined);
|
|
23
|
-
}
|
|
24
|
-
type PivotResultLifecycleInput = {
|
|
25
|
-
pivotResultState?: unknown;
|
|
26
|
-
pivotResultContract?: unknown;
|
|
27
|
-
records?: unknown;
|
|
28
|
-
columns?: unknown;
|
|
29
|
-
columnKeyMap?: unknown;
|
|
30
|
-
};
|
|
31
|
-
export type PivotResultExpectedRoleFieldIds = Readonly<Partial<Record<QueryColumnKeyRole, readonly string[]>>>;
|
|
32
|
-
export type PivotResultColumnKind = 'row' | 'pivot_metric' | 'value';
|
|
33
|
-
export type CanonicalPivotResultContract = {
|
|
34
|
-
version: 1;
|
|
35
|
-
expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
|
|
36
|
-
expectedMetricAliases: readonly string[];
|
|
37
|
-
columnKinds: Readonly<Record<string, PivotResultColumnKind>>;
|
|
38
|
-
columnClassifications: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Parses the canonical pivot wire shape once. Downstream presentation and
|
|
42
|
-
* delivery consumers receive this discriminated result and do not infer
|
|
43
|
-
* lifecycle or repeat physical-member validation.
|
|
44
|
-
*/
|
|
45
|
-
export declare function parseCanonicalPivotResultTransport(input: PivotResultLifecycleInput): CanonicalPivotResultTransport;
|
|
46
|
-
export declare function createCanonicalPivotResultTransport(input: {
|
|
47
|
-
records: Record<string, unknown>[];
|
|
48
|
-
columns: SemaphorResultColumn[];
|
|
49
|
-
columnKeyMap: QueryColumnKeyMap;
|
|
50
|
-
expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
|
|
51
|
-
expectedMetricAliases?: readonly string[];
|
|
52
|
-
physicalPivotColumnKeys: readonly string[];
|
|
53
|
-
columnMetadata?: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
|
|
54
|
-
}): CanonicalPivotResultTransport;
|
|
55
|
-
export {};
|