react-semaphor 0.1.567 → 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.
Files changed (128) hide show
  1. package/README.md +0 -7
  2. package/dist/analytics-protocol/index.js +434 -454
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +10 -12
  5. package/dist/briefings/index.js +4 -4
  6. package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → _commonjsHelpers-Bid1ZNYj.js} +271 -222
  7. package/dist/chunks/{assistant-chat-D-IuHHwh.js → assistant-chat-Dzf2Mbph.js} +107 -109
  8. package/dist/chunks/{bookmark-impact-B0estCHn.js → bookmark-impact-Czg6FGt5.js} +2 -2
  9. package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
  10. package/dist/chunks/{card-filter-builder-DbSmzvem.js → card-filter-builder-BS982X7x.js} +1001 -1000
  11. package/dist/chunks/{code-editor-DJNOsgJH.js → code-editor-BsxHzm9u.js} +43 -45
  12. package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-lLTgzOkM.js} +252 -253
  13. package/dist/chunks/{dashboard-f8J9DHh5.js → dashboard-BiYSbxZv.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-DunvZYsU.js → dashboard-briefing-launcher-Bdj7luOr.js} +119 -120
  15. package/dist/chunks/{dashboard-controls-B09cN2Dz.js → dashboard-controls-TViDsnb8.js} +17 -19
  16. package/dist/chunks/dashboard-json-Dg9dQd9U.js +66 -0
  17. package/dist/chunks/{dates-BsJcyoC_.js → dates-BsPrWZIP.js} +8 -8
  18. package/dist/chunks/{edit-dashboard-visual-Cwzbpty8.js → edit-dashboard-visual-C6hoIeEJ.js} +20 -21
  19. package/dist/chunks/{filter-reach-copy-P-kDwUpY.js → filter-reach-copy-hcQ4os0u.js} +862 -852
  20. package/dist/chunks/filter-value-text-CVxEEDVl.js +146 -0
  21. package/dist/chunks/{index-BcXw0CpM.js → index-G4q89J6O.js} +74 -76
  22. package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-BIcoFfdS.js} +1 -1
  23. package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C6tYkHyv.js} +1 -1
  24. package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
  25. package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
  26. package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
  27. package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
  28. package/dist/chunks/{palette-4vf2BEEg.js → palette-NjHOE_6B.js} +1 -1
  29. package/dist/chunks/pivot-result-contract-expectations-DkmueDTW.js +55 -0
  30. package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
  31. package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
  32. package/dist/chunks/{report-preferences-dialog-CbgmdWeZ.js → report-preferences-dialog-Xc8_GFju.js} +26 -28
  33. package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
  34. package/dist/chunks/{resolve-dashboard-input-context-DPKSF3qj.js → resolve-dashboard-input-context-KqvcLcTM.js} +5956 -5880
  35. package/dist/chunks/{save-D6pHmSSP.js → save-C6VmEJTA.js} +1 -1
  36. package/dist/chunks/{saved-dashboard-context-CNudmm9U.js → saved-dashboard-context-BeXXyoD4.js} +6 -6
  37. package/dist/chunks/{semaphor-ready-indicator-CQd-PCCZ.js → semaphor-ready-indicator-BNkaANsG.js} +31011 -30850
  38. package/dist/chunks/{shelf-drop-preview-context-CWS3e20y.js → shelf-drop-preview-context-C_issPBA.js} +18 -20
  39. package/dist/chunks/{stored-dashboard-CrQFT27O.js → stored-dashboard-B6_StAty.js} +232 -234
  40. package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-BWP2joD1.js} +1 -1
  41. package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-scSWQXAB.js} +4 -4
  42. package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
  43. package/dist/chunks/{upload-Cf3wXZT8.js → upload-BRW4Mwrd.js} +1 -1
  44. package/dist/chunks/validators-B8fpdinG.js +3651 -0
  45. package/dist/chunks/{variable-draft-BDxlD0dM.js → variable-draft-BQ3OMjvy.js} +4 -4
  46. package/dist/dashboard/index.js +2 -2
  47. package/dist/dashboard-authoring/index.js +1778 -1741
  48. package/dist/format-utils/index.js +230 -231
  49. package/dist/index.js +236 -237
  50. package/dist/report-runtime-context/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/surfboard/index.js +2 -2
  53. package/dist/types/components/surfboard/filter/types.d.ts +5 -4
  54. package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
  55. package/dist/types/index.js +9 -9
  56. package/dist/types/lib/document/document-edits.d.ts +8 -3
  57. package/dist/types/lib/document/document-text-style.d.ts +54 -0
  58. package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
  59. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  60. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  61. package/dist/types/lib/types/index.d.ts +1 -1
  62. package/dist/types/lib/utils/card-definition.d.ts +7 -7
  63. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
  64. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
  65. package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
  66. package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
  67. package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
  68. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +4 -4
  69. package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
  70. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
  71. package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
  72. package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
  73. package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
  74. package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
  75. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
  76. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
  77. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
  78. package/dist/types/shared/assistant-protocol/context.d.ts +12 -12
  79. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +176 -1756
  81. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
  82. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +74 -74
  83. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
  84. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +8 -2
  85. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
  86. package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
  87. package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
  88. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  89. package/dist/types/shared/temporal/index.d.ts +0 -2
  90. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
  91. package/package.json +2 -24
  92. package/DATA_APP_SDK.md +0 -339
  93. package/dist/chunks/dashboard-json-BNNCaKEc.js +0 -68
  94. package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
  95. package/dist/chunks/index-CuHybtft.js +0 -51
  96. package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
  97. package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
  98. package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
  99. package/dist/chunks/operators-B3zZoskU.js +0 -66
  100. package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
  101. package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
  102. package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
  103. package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
  104. package/dist/chunks/validators-wtjw0aw6.js +0 -3332
  105. package/dist/data-app-sdk/index.js +0 -1412
  106. package/dist/data-app-sdk-adapters/index.js +0 -361
  107. package/dist/data-app-sdk-validation/index.js +0 -1031
  108. package/dist/types/data-app-sdk/adapters.d.ts +0 -35
  109. package/dist/types/data-app-sdk/builders.d.ts +0 -62
  110. package/dist/types/data-app-sdk/contracts.d.ts +0 -419
  111. package/dist/types/data-app-sdk/executor.d.ts +0 -5
  112. package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
  113. package/dist/types/data-app-sdk/hooks.d.ts +0 -11
  114. package/dist/types/data-app-sdk/index.d.ts +0 -9
  115. package/dist/types/data-app-sdk/provider.d.ts +0 -8
  116. package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
  117. package/dist/types/data-app-sdk/selection.d.ts +0 -2
  118. package/dist/types/data-app-sdk/validation.d.ts +0 -58
  119. package/dist/types/data-app-sdk-adapters.d.ts +0 -2
  120. package/dist/types/data-app-sdk-validation.d.ts +0 -2
  121. package/dist/types/data-app-sdk.d.ts +0 -2
  122. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
  123. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
  124. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
  125. package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
  126. package/dist/types/shared/temporal/relative-date.d.ts +0 -21
  127. package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
  128. 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-CQd-PCCZ.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
- };