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.
Files changed (191) hide show
  1. package/README.md +0 -7
  2. package/dist/analytics-protocol/index.js +434 -454
  3. package/dist/appearance/index.js +6 -3
  4. package/dist/appearance-runtime/index.js +1 -1
  5. package/dist/assistant-context/index.js +1 -1
  6. package/dist/brand-studio/index.js +572 -436
  7. package/dist/briefings/index.js +4 -4
  8. package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
  9. package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
  10. package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
  11. package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
  12. package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
  13. package/dist/chunks/brand-B4BdpAB_.js +54 -0
  14. package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
  15. package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
  16. package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
  17. package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
  18. package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
  19. package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
  20. package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
  21. package/dist/chunks/edit-Bpdh_P_a.js +226 -0
  22. package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
  23. package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
  24. package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
  25. package/dist/chunks/index-BVKzKl5d.js +90 -0
  26. package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
  27. package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
  28. package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
  29. package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
  30. package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
  31. package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
  32. package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
  33. package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
  34. package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
  35. package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
  36. package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
  37. package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
  38. package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
  39. package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
  40. package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
  41. package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
  42. package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
  43. package/dist/chunks/resolver-DG_tfEpt.js +156 -0
  44. package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
  45. package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
  46. package/dist/chunks/schema-C9NPiIru.js +2568 -0
  47. package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
  48. package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
  49. package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
  50. package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
  51. package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
  52. package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
  53. package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
  54. package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
  55. package/dist/chunks/validators-B8fpdinG.js +3651 -0
  56. package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
  57. package/dist/dashboard/index.js +2 -2
  58. package/dist/dashboard-authoring/index.js +1888 -1826
  59. package/dist/format-utils/index.js +230 -231
  60. package/dist/index.js +349 -353
  61. package/dist/layouts/index.js +1 -1
  62. package/dist/report-runtime-context/index.js +1 -1
  63. package/dist/style.css +1 -1
  64. package/dist/surfboard/index.js +2 -2
  65. package/dist/types/appearance/index.d.ts +1 -0
  66. package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
  67. package/dist/types/brand-studio/index.d.ts +1 -1
  68. package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
  69. package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
  70. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
  71. package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
  72. package/dist/types/components/surfboard/filter/types.d.ts +5 -4
  73. package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
  74. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
  75. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
  76. package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
  77. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
  78. package/dist/types/index.js +9 -9
  79. package/dist/types/lib/appearance/aliases.d.ts +42 -0
  80. package/dist/types/lib/appearance/compiler.d.ts +6 -0
  81. package/dist/types/lib/appearance/defaults.d.ts +6 -0
  82. package/dist/types/lib/appearance/index.d.ts +2 -0
  83. package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
  84. package/dist/types/lib/appearance/resolver.d.ts +2 -2
  85. package/dist/types/lib/appearance/types.d.ts +38 -1
  86. package/dist/types/lib/charts/types.d.ts +6 -2
  87. package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
  88. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
  89. package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
  90. package/dist/types/lib/download-pdf.d.ts +0 -1
  91. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
  92. package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
  93. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  94. package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
  95. package/dist/types/lib/stores/editor-store.d.ts +0 -1
  96. package/dist/types/lib/stores/table-actions.d.ts +0 -1
  97. package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
  98. package/dist/types/lib/types/common-types.d.ts +3 -2
  99. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  100. package/dist/types/lib/types/index.d.ts +1 -1
  101. package/dist/types/lib/types/summary-types.d.ts +0 -5
  102. package/dist/types/lib/utils/card-definition.d.ts +7 -7
  103. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
  104. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
  105. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
  106. package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
  107. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
  108. package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
  109. package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
  110. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
  111. package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
  112. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
  113. package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
  114. package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
  115. package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
  116. package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
  117. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
  118. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
  119. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
  120. package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
  121. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
  122. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
  123. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
  124. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
  125. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
  126. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
  127. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
  128. package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
  129. package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
  130. package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
  131. package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
  132. package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
  133. package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
  134. package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
  135. package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
  136. package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
  137. package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
  138. package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  140. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
  141. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
  142. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
  144. package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
  145. package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
  146. package/dist/types/shared/temporal/index.d.ts +0 -2
  147. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
  148. package/package.json +7 -26
  149. package/DATA_APP_SDK.md +0 -339
  150. package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
  151. package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
  152. package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
  153. package/dist/chunks/color-CJvdlFM_.js +0 -2162
  154. package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
  155. package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
  156. package/dist/chunks/index-CLIro-EG.js +0 -425
  157. package/dist/chunks/index-CuHybtft.js +0 -51
  158. package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
  159. package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
  160. package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
  161. package/dist/chunks/operators-B3zZoskU.js +0 -66
  162. package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
  163. package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
  164. package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
  165. package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
  166. package/dist/chunks/validators-wtjw0aw6.js +0 -3332
  167. package/dist/data-app-sdk/index.js +0 -1412
  168. package/dist/data-app-sdk-adapters/index.js +0 -361
  169. package/dist/data-app-sdk-validation/index.js +0 -1031
  170. package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
  171. package/dist/types/data-app-sdk/adapters.d.ts +0 -35
  172. package/dist/types/data-app-sdk/builders.d.ts +0 -62
  173. package/dist/types/data-app-sdk/contracts.d.ts +0 -419
  174. package/dist/types/data-app-sdk/executor.d.ts +0 -5
  175. package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
  176. package/dist/types/data-app-sdk/hooks.d.ts +0 -11
  177. package/dist/types/data-app-sdk/index.d.ts +0 -9
  178. package/dist/types/data-app-sdk/provider.d.ts +0 -8
  179. package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
  180. package/dist/types/data-app-sdk/selection.d.ts +0 -2
  181. package/dist/types/data-app-sdk/validation.d.ts +0 -58
  182. package/dist/types/data-app-sdk-adapters.d.ts +0 -2
  183. package/dist/types/data-app-sdk-validation.d.ts +0 -2
  184. package/dist/types/data-app-sdk.d.ts +0 -2
  185. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
  186. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
  187. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
  188. package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
  189. package/dist/types/shared/temporal/relative-date.d.ts +0 -21
  190. package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
  191. package/src/data-app-sdk/README.md +0 -402
@@ -1,68 +0,0 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useMemo as u, useState as f, useRef as p, useEffect as b } from "react";
3
- import { u as a } from "./semaphor-ready-indicator-BSEdUq40.js";
4
- import { B as S, X as N, C as D } from "./code-editor-DJNOsgJH.js";
5
- import "./index-CuHybtft.js";
6
- import "./validators-wtjw0aw6.js";
7
- import "./matrix-operation-contract-Eb6elidS.js";
8
- import "./analytics-base-schemas-BaIQrEzX.js";
9
- import "zod";
10
- import "../value-format-preferences/index.js";
11
- import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
12
- function B() {
13
- const r = a((s) => s.dashboard), c = a((s) => s.actions.setDashboard), h = a(
14
- (s) => s.showDashboardJSON
15
- ), l = a(
16
- (s) => s.actions.setShowDashboardJSON
17
- ), o = u(
18
- () => r ? JSON.stringify(r, null, 2) : "",
19
- [r]
20
- ), [m, i] = f(o), t = p(o);
21
- return b(() => {
22
- o !== t.current && (i(o), t.current = o);
23
- }, [o]), /* @__PURE__ */ d(
24
- "div",
25
- {
26
- className: J("relative p-2", {
27
- hidden: !h
28
- }),
29
- children: [
30
- /* @__PURE__ */ d(
31
- S,
32
- {
33
- variant: "secondary",
34
- size: "sm",
35
- className: "absolute right-2 top-2 z-10 h-8",
36
- onClick: () => l(!1),
37
- children: [
38
- /* @__PURE__ */ e(N, { className: "mr-2 h-4 w-4" }),
39
- "Close"
40
- ]
41
- }
42
- ),
43
- /* @__PURE__ */ e("div", { className: "h-[550px] overflow-hidden", children: /* @__PURE__ */ e(
44
- D,
45
- {
46
- value: m,
47
- onValueChange: (s) => {
48
- i(s);
49
- try {
50
- const n = JSON.parse(s);
51
- t.current = JSON.stringify(
52
- n,
53
- null,
54
- 2
55
- ), c(n);
56
- } catch {
57
- }
58
- },
59
- language: "json"
60
- }
61
- ) })
62
- ]
63
- }
64
- );
65
- }
66
- export {
67
- B as default
68
- };
@@ -1,163 +0,0 @@
1
- import { u as y, v as N } from "./validators-wtjw0aw6.js";
2
- import { g as k, c as D } from "./raw-temporal-value-Bqz8wc7L.js";
3
- import "../value-format-preferences/index.js";
4
- import { a9 as T, a8 as L } from "./temporal-input-presentation--2r9BLr0.js";
5
- const d = { kind: "plain" }, g = { kind: "temporal" }, O = {
6
- "=": "=",
7
- "!=": "!=",
8
- ">": ">",
9
- ">=": ">=",
10
- "<": "<",
11
- "<=": "<=",
12
- in: "in",
13
- "not in": "not in",
14
- between: "between",
15
- "not between": "not between",
16
- contains: "contains (ignoring case)",
17
- startsWith: "starts with (ignoring case)",
18
- endsWith: "ends with (ignoring case)",
19
- like: "matches the LIKE pattern (ignoring case)",
20
- "not like": "does not match the LIKE pattern (ignoring case)",
21
- isNull: "is empty",
22
- isNotNull: "is not empty"
23
- }, S = { between: "in", "not between": "not in" };
24
- function V(t, n = {}) {
25
- const { operator: e, values: i, reading: r } = t, o = r.kind === "bucket" ? `${t.subject} (${T(r.bucket)})` : t.subject, s = O[e], u = t.shownAs ? ` (shown as ${JSON.stringify(t.shownAs)})` : "", c = (a, f = 0) => ({ text: a, omittedValues: f });
26
- if (e === "isNull" || e === "isNotNull") return c(`${o} ${s}`);
27
- if (t.latestValue)
28
- return c(`${o} ${s} the latest value of this field (resolved at run time)`);
29
- if (e === "between" || e === "not between") {
30
- const a = i.length === 2 ? A(i[0], i[1], r, n.timeZone) : void 0;
31
- if (t.relative)
32
- return c(`${o} ${S[e]} ${R(t.relative, a)}`);
33
- if (a) {
34
- const f = a.wholeDaysIn ? ` (whole days in ${a.wholeDaysIn})` : "";
35
- return c(`${o} ${s} ${a.from} and ${a.to}${f}${u}`);
36
- }
37
- }
38
- return e === "in" || e === "not in" || i.length !== 1 ? c(
39
- `${o} ${s} (${I(i, r, n.maxListedValues)})${u}`,
40
- b(i.length, n.maxListedValues)
41
- ) : c(`${o} ${s} ${l(i[0], r)}${u}`);
42
- }
43
- function W(t, n = {}) {
44
- return t == null ? { text: "no value", omittedValues: 0 } : Array.isArray(t) ? {
45
- text: I(t, d, n.maxListedValues),
46
- omittedValues: b(t.length, n.maxListedValues)
47
- } : { text: l(t), omittedValues: 0 };
48
- }
49
- function l(t, n = d) {
50
- if (n.kind !== "plain") {
51
- const e = w(t, n);
52
- if (e !== void 0) return e;
53
- }
54
- return t instanceof Date ? w(t, g) ?? JSON.stringify(String(t)) : t === void 0 ? "null" : typeof t == "number" || typeof t == "boolean" || t === null ? String(t) : JSON.stringify(t) ?? String(t);
55
- }
56
- function I(t, n = d, e = Number.POSITIVE_INFINITY) {
57
- const i = t.slice(0, Number.isFinite(e) ? e : void 0).map((o) => l(o, n)).join(", "), r = b(t.length, e);
58
- return r > 0 ? `${i}, and ${r} more values` : i;
59
- }
60
- function b(t, n = Number.POSITIVE_INFINITY) {
61
- return Math.max(0, t - n);
62
- }
63
- function m(t) {
64
- if (t instanceof Date)
65
- return Number.isNaN(t.getTime()) ? void 0 : { kind: "instant", instant: t };
66
- if (typeof t != "string") return;
67
- const n = D(t);
68
- return n === "instant" ? { kind: n, instant: new Date(t) } : n ? { kind: n, text: t } : void 0;
69
- }
70
- function w(t, n) {
71
- if (n.kind === "bucket")
72
- return typeof t == "string" && L(t, n.bucket).ok ? t : void 0;
73
- const e = m(t);
74
- if (e)
75
- return e.kind === "instant" ? e.instant.toISOString() : e.text;
76
- }
77
- function A(t, n, e, i) {
78
- const r = e.kind === "temporal" ? m(t) : void 0, o = e.kind === "temporal" ? m(n) : void 0;
79
- if (i && (r == null ? void 0 : r.kind) === "instant" && (o == null ? void 0 : o.kind) === "instant") {
80
- const s = p(r.instant, i), u = p(o.instant, i);
81
- if (s && u && s.time === "00:00:00" && r.instant.getUTCMilliseconds() === 0 && u.time === "23:59:59" && [0, 999].includes(o.instant.getUTCMilliseconds()))
82
- return { from: s.date, to: u.date, wholeDaysIn: i };
83
- }
84
- return { from: l(t, e), to: l(n, e) };
85
- }
86
- function p(t, n) {
87
- try {
88
- const e = Object.fromEntries(
89
- new Intl.DateTimeFormat("en-CA", {
90
- timeZone: n,
91
- year: "numeric",
92
- month: "2-digit",
93
- day: "2-digit",
94
- hour: "2-digit",
95
- minute: "2-digit",
96
- second: "2-digit",
97
- hourCycle: "h23"
98
- }).formatToParts(t).map((i) => [i.type, i.value])
99
- );
100
- return {
101
- date: `${e.year}-${e.month}-${e.day}`,
102
- time: `${e.hour}:${e.minute}:${e.second}`
103
- };
104
- } catch {
105
- return;
106
- }
107
- }
108
- const $ = (t, n) => `${t} ${n}${Math.abs(t) === 1 ? "" : "s"}`;
109
- function h(t, n) {
110
- return t === 0 ? `the current ${n}` : t < 0 ? `${$(-t, n)} before the current one` : `${$(t, n)} after the current one`;
111
- }
112
- function F(t) {
113
- switch (t.mode) {
114
- case "last": {
115
- const n = $(t.n, t.unit);
116
- return y(t) ? t.complete ? `the ${n} before the ${t.unit} of the latest date in the data, whole ${t.unit}s only` : `the last ${n}, up to the latest date in the data` : t.complete ? `the ${n} before the current ${t.unit}, whole ${t.unit}s only` : `the last ${n}, up to now`;
117
- }
118
- case "this":
119
- return t.boundary === "first_day" ? "the first day of the current month" : t.boundary === "last_day" ? "the last day of the current month" : t.toDate ? `the current ${t.unit} up to now` : `the whole current ${t.unit}`;
120
- case "previous":
121
- return `the ${t.unit} before the current one`;
122
- case "between":
123
- return t.from === t.to ? h(t.from, t.unit) : `from ${h(t.from, t.unit)} through ${h(t.to, t.unit)}`;
124
- }
125
- }
126
- function R(t, n) {
127
- const e = k(t), i = n && !y(t) ? `; last resolved here as ${n.from} to ${n.to}${n.wholeDaysIn ? `, whole days in ${n.wholeDaysIn}` : ""}` : "";
128
- return `${e ? `${JSON.stringify(e)} ` : ""}(relative window: ${F(t)}; resolved again at run time${i})`;
129
- }
130
- const E = {
131
- "=": "=",
132
- "!=": "!=",
133
- ">": ">",
134
- ">=": ">=",
135
- "<": "<",
136
- "<=": "<=",
137
- in: "in",
138
- "not in": "not in",
139
- like: "like",
140
- "not like": "not like",
141
- between: "between",
142
- "not between": "not between",
143
- "is null": "isNull",
144
- "is not null": "isNotNull"
145
- };
146
- function M(t, n, e = {}) {
147
- const i = t.valueType === "date";
148
- return V({
149
- subject: n,
150
- operator: E[t.operation],
151
- values: t.values,
152
- reading: i ? g : d,
153
- ...i ? { relative: N(t.relativeMeta) } : {}
154
- }, e);
155
- }
156
- export {
157
- d as P,
158
- g as T,
159
- V as a,
160
- W as b,
161
- M as d,
162
- b as o
163
- };
@@ -1,425 +0,0 @@
1
- import { b as y, d as A, S as F, p as N } from "./color-CJvdlFM_.js";
2
- const S = [
3
- "#3b82f6",
4
- "#10b981",
5
- "#f59e0b",
6
- "#ef4444",
7
- "#8b5cf6",
8
- "#06b6d4",
9
- "#84cc16",
10
- "#f97316"
11
- ], R = {
12
- version: 1,
13
- mode: "system",
14
- schemes: {
15
- light: {
16
- tokens: {
17
- color: {
18
- background: "hsl(0 0% 100%)",
19
- foreground: "hsl(240 5.9% 10%)",
20
- muted: "hsl(0 0% 98%)",
21
- mutedForeground: "hsl(240 3.8% 46.1%)",
22
- border: "hsl(240 5.9% 90%)",
23
- input: "hsl(240 5.9% 90%)",
24
- primary: "hsl(240 5.9% 10%)",
25
- primaryForeground: "hsl(0 0% 98%)",
26
- accent: "hsl(240 4.8% 95.9%)",
27
- accentForeground: "hsl(240 5.9% 10%)",
28
- selection: "hsl(217 91% 53%)",
29
- card: "hsl(0 0% 100%)",
30
- cardForeground: "hsl(240 5.9% 10%)",
31
- positive: "#16a34a",
32
- negative: "#dc2626",
33
- warning: "#d97706",
34
- info: "#0284c7",
35
- destructive: "hsl(0 72.2% 50.6%)",
36
- destructiveForeground: "hsl(0 0% 98%)"
37
- },
38
- typography: {
39
- fontFamily: F,
40
- headingFontFamily: A,
41
- monoFontFamily: y,
42
- baseFontSize: 14,
43
- density: "comfortable"
44
- },
45
- radius: {
46
- control: 5,
47
- card: 5,
48
- table: 5,
49
- badge: 999
50
- },
51
- spacing: {
52
- dashboardPadding: 16,
53
- gridGap: 12,
54
- cardPadding: 16,
55
- controlGap: 8,
56
- tableCellX: 12,
57
- tableCellY: 8
58
- },
59
- shadow: {
60
- card: "0 1px 2px rgba(15, 23, 42, 0.08)",
61
- popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
62
- focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
63
- }
64
- },
65
- components: {
66
- chart: {
67
- palette: S
68
- },
69
- table: {
70
- density: "compact"
71
- }
72
- }
73
- },
74
- dark: {
75
- tokens: {
76
- color: {
77
- background: "hsl(240 10% 3.9%)",
78
- foreground: "hsl(0 0% 93%)",
79
- muted: "hsl(240 5.9% 10%)",
80
- mutedForeground: "hsl(240 5% 64.9%)",
81
- border: "hsl(240 3.7% 15.9%)",
82
- input: "hsl(240 3.7% 15.9%)",
83
- primary: "hsl(0 0% 98%)",
84
- primaryForeground: "hsl(240 5.9% 10%)",
85
- accent: "hsl(240 3.7% 15.9%)",
86
- accentForeground: "hsl(0 0% 93%)",
87
- selection: "hsl(217 91% 64%)",
88
- card: "hsl(240 10% 3.9%)",
89
- cardForeground: "hsl(0 0% 93%)",
90
- positive: "#22c55e",
91
- negative: "#f87171",
92
- warning: "#fbbf24",
93
- info: "#38bdf8",
94
- destructive: "hsl(0 62.8% 30.6%)",
95
- destructiveForeground: "hsl(0 0% 93%)"
96
- },
97
- typography: {
98
- fontFamily: F,
99
- headingFontFamily: A,
100
- monoFontFamily: y,
101
- baseFontSize: 14,
102
- density: "comfortable"
103
- },
104
- radius: {
105
- control: 5,
106
- card: 5,
107
- table: 5,
108
- badge: 999
109
- },
110
- spacing: {
111
- dashboardPadding: 16,
112
- gridGap: 12,
113
- cardPadding: 16,
114
- controlGap: 8,
115
- tableCellX: 12,
116
- tableCellY: 8
117
- },
118
- shadow: {
119
- card: "0 1px 2px rgba(0, 0, 0, 0.3)",
120
- popover: "0 12px 32px rgba(0, 0, 0, 0.45)",
121
- focusRing: "0 0 0 2px rgba(96, 165, 250, 0.35)"
122
- }
123
- },
124
- components: {
125
- chart: {
126
- palette: S
127
- },
128
- table: {
129
- density: "compact"
130
- }
131
- }
132
- }
133
- }
134
- }, _ = E(
135
- R
136
- );
137
- function E(e) {
138
- if (typeof e != "object" || e === null || Object.isFrozen(e))
139
- return e;
140
- Object.freeze(e);
141
- for (const o of Object.values(e))
142
- E(o);
143
- return e;
144
- }
145
- const k = 1, T = /* @__PURE__ */ new Set(["light", "dark", "system"]), j = /* @__PURE__ */ new Set([
146
- "compact",
147
- "comfortable",
148
- "spacious"
149
- ]), M = Object.fromEntries(
150
- [
151
- "background",
152
- "foreground",
153
- "muted",
154
- "mutedForeground",
155
- "border",
156
- "input",
157
- "primary",
158
- "primaryForeground",
159
- "accent",
160
- "accentForeground",
161
- "selection",
162
- "card",
163
- "cardForeground",
164
- "positive",
165
- "negative",
166
- "warning",
167
- "info",
168
- "destructive",
169
- "destructiveForeground"
170
- ].map((e) => [e, n])
171
- ), z = {
172
- fontFamily: d,
173
- headingFontFamily: d,
174
- monoFontFamily: d,
175
- baseFontSize: p,
176
- density: P
177
- }, L = {
178
- control: c,
179
- card: c,
180
- table: c,
181
- badge: c
182
- }, I = {
183
- dashboardPadding: c,
184
- gridGap: c,
185
- cardPadding: c,
186
- controlGap: c,
187
- tableCellX: c,
188
- tableCellY: c
189
- }, V = {
190
- card: d,
191
- popover: d,
192
- focusRing: d
193
- }, f = {
194
- background: n,
195
- foreground: n,
196
- borderColor: n,
197
- borderRadius: c,
198
- shadow: d,
199
- padding: c
200
- }, $ = {
201
- ...f,
202
- toolbarBackground: n
203
- }, D = {
204
- palette: Q,
205
- background: n,
206
- foreground: n,
207
- gridColor: n,
208
- axisColor: n
209
- }, Y = {
210
- background: n,
211
- borderColor: n,
212
- borderRadius: c,
213
- shadow: d
214
- }, u = {
215
- density: P,
216
- container: t(Y),
217
- header: t({
218
- background: n,
219
- foreground: n,
220
- dividerColor: n,
221
- fontWeight: p,
222
- uppercase: g,
223
- sticky: g
224
- }),
225
- row: t({
226
- height: p,
227
- dividerColor: n,
228
- zebra: g,
229
- zebraBackground: n,
230
- hoverBackground: n,
231
- selectedBackground: n
232
- }),
233
- cell: t({
234
- paddingX: c,
235
- paddingY: c,
236
- verticalAlign: J,
237
- wrap: K
238
- }),
239
- subtotal: t({
240
- background: n,
241
- foreground: n,
242
- fontWeight: p
243
- }),
244
- grandTotal: t({
245
- background: n,
246
- foreground: n,
247
- fontWeight: p,
248
- borderColor: n
249
- }),
250
- pagination: t({
251
- background: n,
252
- foreground: n,
253
- borderColor: n
254
- })
255
- }, G = {
256
- color: t(M),
257
- typography: t(z),
258
- radius: t(L),
259
- spacing: t(I),
260
- shadow: t(V)
261
- }, H = {
262
- dashboard: t(f),
263
- card: t(f),
264
- interactive: t($),
265
- chart: t(D),
266
- table: t(u),
267
- pivotTable: t(u),
268
- matrixTable: t(u),
269
- aggregateTable: t(u),
270
- pagination: t(f)
271
- }, v = {
272
- tokens: t(G),
273
- components: t(H)
274
- }, U = {
275
- light: t(v),
276
- dark: t(v)
277
- }, B = {
278
- version: X,
279
- mode: q,
280
- schemes: t(U)
281
- };
282
- function W(e) {
283
- const o = [];
284
- return t(B)(e, "$", o), O(e) && !("version" in e) && i(o, "$.version", "invalid_version", "version must be 1"), o.length > 0 ? { success: !1, issues: o } : {
285
- success: !0,
286
- value: e,
287
- issues: []
288
- };
289
- }
290
- function C(e) {
291
- const o = W(e);
292
- if (o.success) return;
293
- const r = o.issues[0];
294
- throw new Error(
295
- `Invalid AppearanceSpec at ${r.path}: ${r.message}`
296
- );
297
- }
298
- function t(e) {
299
- return (o, r, a) => {
300
- if (!O(o)) {
301
- i(a, r, "invalid_type", "expected an object");
302
- return;
303
- }
304
- for (const s of Object.keys(o)) {
305
- const m = e[s], h = `${r}.${s}`;
306
- if (!m) {
307
- i(a, h, "unsupported_field", "field is not supported in AppearanceSpec V1");
308
- continue;
309
- }
310
- m(o[s], h, a);
311
- }
312
- };
313
- }
314
- function X(e, o, r) {
315
- e !== k && i(r, o, "invalid_version", "version must be 1");
316
- }
317
- function q(e, o, r) {
318
- (typeof e != "string" || !T.has(e)) && i(r, o, "invalid_value", "mode must be light, dark, or system");
319
- }
320
- function P(e, o, r) {
321
- (typeof e != "string" || !j.has(e)) && i(r, o, "invalid_value", "density must be compact, comfortable, or spacious");
322
- }
323
- function J(e, o, r) {
324
- e !== "top" && e !== "middle" && e !== "bottom" && i(r, o, "invalid_value", "verticalAlign must be top, middle, or bottom");
325
- }
326
- function K(e, o, r) {
327
- e !== "wrap" && e !== "nowrap" && i(r, o, "invalid_value", "wrap must be wrap or nowrap");
328
- }
329
- function g(e, o, r) {
330
- typeof e != "boolean" && i(r, o, "invalid_type", "expected a boolean");
331
- }
332
- function n(e, o, r) {
333
- if (typeof e != "string" || e.trim() === "") {
334
- i(r, o, "invalid_type", "color must be a non-empty string");
335
- return;
336
- }
337
- N(e) || i(r, o, "invalid_color", "color must be a valid opaque CSS color");
338
- }
339
- function Q(e, o, r) {
340
- if (!Array.isArray(e)) {
341
- i(r, o, "invalid_type", "expected an array of colors");
342
- return;
343
- }
344
- if (e.length === 0) {
345
- i(r, o, "invalid_value", "palette must contain at least one color");
346
- return;
347
- }
348
- e.forEach((a, s) => n(a, `${o}[${s}]`, r));
349
- }
350
- function d(e, o, r) {
351
- (typeof e != "string" || e.trim() === "") && i(r, o, "invalid_type", "expected a non-empty string");
352
- }
353
- function p(e, o, r) {
354
- (typeof e != "number" || !Number.isFinite(e) || e <= 0) && i(r, o, "invalid_value", "expected a positive number");
355
- }
356
- function c(e, o, r) {
357
- (typeof e != "number" || !Number.isFinite(e) || e < 0) && i(r, o, "invalid_value", "expected a non-negative number");
358
- }
359
- function i(e, o, r, a) {
360
- e.push({ path: o, code: r, message: a });
361
- }
362
- function O(e) {
363
- if (typeof e != "object" || e === null || Array.isArray(e))
364
- return !1;
365
- const o = Object.getPrototypeOf(e);
366
- return o === Object.prototype || o === null;
367
- }
368
- function Z(e, o = _) {
369
- return C(e), w(o, e);
370
- }
371
- function ee(e, o) {
372
- return C(o), w(e, o);
373
- }
374
- function w(e, o) {
375
- return x(e, o);
376
- }
377
- function x(e, o) {
378
- if (o === void 0) return l(e);
379
- if (Array.isArray(e) || Array.isArray(o))
380
- return l(o);
381
- if (b(e) && b(o)) {
382
- const r = l(e);
383
- for (const [a, s] of Object.entries(o)) {
384
- if (a === "version") {
385
- r[a] = s;
386
- continue;
387
- }
388
- r[a] = a in r ? x(r[a], s) : l(s);
389
- }
390
- return r;
391
- }
392
- return l(o);
393
- }
394
- function l(e) {
395
- return Array.isArray(e) ? e.map((o) => l(o)) : b(e) ? Object.fromEntries(
396
- Object.entries(e).map(([o, r]) => [o, l(r)])
397
- ) : e;
398
- }
399
- function b(e) {
400
- return typeof e == "object" && e !== null && !Array.isArray(e);
401
- }
402
- function re(e = {}) {
403
- const o = e.defaults ?? _;
404
- let r = Z(
405
- { version: k },
406
- o
407
- );
408
- for (const a of [
409
- e.organizationAppearance,
410
- e.tokenAppearance,
411
- e.reactAppearance
412
- ])
413
- a && (r = ee(r, a));
414
- return r;
415
- }
416
- export {
417
- k as A,
418
- _ as S,
419
- S as a,
420
- C as b,
421
- ee as m,
422
- Z as n,
423
- re as r,
424
- W as v
425
- };
@@ -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
- };