react-semaphor 0.1.561 → 0.1.562

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 (138) hide show
  1. package/dist/analytics-protocol/index.js +452 -429
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CB3oFAXk.js → analytics-base-schemas-BaIQrEzX.js} +139 -134
  7. package/dist/chunks/{assistant-chat-DiVHY3Hw.js → assistant-chat-R_yT8xH4.js} +104 -104
  8. package/dist/chunks/{bookmark-impact-CR09dpkn.js → bookmark-impact-D4Kl4amw.js} +2 -2
  9. package/dist/chunks/{bookmark-state-BusLpkb7.js → bookmark-state-CWeoGbrx.js} +25 -25
  10. package/dist/chunks/{braces-u8VorWJc.js → braces-DzgoQC64.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-DDsIWJYT.js → comparison-window-caption-D1EUXzaR.js} +562 -437
  12. package/dist/chunks/{context-TUjw9eqr.js → context-R31TSL5V.js} +1 -1
  13. package/dist/chunks/{dashboard-BRdZBPqr.js → dashboard-Bp1y5oun.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CgvTLndW.js → dashboard-briefing-launcher-S5FB3aUW.js} +155 -154
  15. package/dist/chunks/{dashboard-controls-B4vfSzTF.js → dashboard-controls-CfC_6Ztn.js} +970 -968
  16. package/dist/chunks/{dashboard-json-Y3MF59g7.js → dashboard-json-gYZT7ZQY.js} +5 -5
  17. package/dist/chunks/dates-DFY7Gfss.js +91 -0
  18. package/dist/chunks/{edit-dashboard-visual-DwjZcxj-.js → edit-dashboard-visual-u7OI_g8Q.js} +4636 -4681
  19. package/dist/chunks/{filter-reach-copy-bijwf_-b.js → filter-reach-copy-CvV7W5dd.js} +1470 -1101
  20. package/dist/chunks/{filter-value-text-DFnhwuEW.js → filter-value-text-CPwFkrMz.js} +11 -10
  21. package/dist/chunks/{global-date-filter-utils-BXgCpvQM.js → global-date-filter-utils-N1kcsOFE.js} +8997 -7417
  22. package/dist/chunks/{index-ClwbY3BL.js → index-CNGkfUp4.js} +91 -85
  23. package/dist/chunks/{layout-grid-CtvCBfOm.js → layout-grid-BM65viQh.js} +1 -1
  24. package/dist/chunks/{list-filter-BklYgciR.js → list-filter-BoeLBfL3.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-pU51-JmY.js → matrix-analytical-definition-hEucouWM.js} +4 -4
  26. package/dist/chunks/{matrix-card-CUorIB7Q.js → matrix-card-CCh9JjP1.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Df5UgCGN.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-BSiGEXVC.js → matrix-operation-contract-DsLdFdSa.js} +339 -330
  29. package/dist/chunks/{metric-comparison-95aC0uEO.js → metric-comparison-Bnso1cm1.js} +2 -2
  30. package/dist/chunks/{model-change-B5wQhg5G.js → model-change-T1cRkh3m.js} +1 -1
  31. package/dist/chunks/{palette-DTnMhipt.js → palette-p1XSJFgB.js} +1 -1
  32. package/dist/chunks/{pivot-result-contract-expectations-Bo-86vwS.js → pivot-result-contract-expectations-B53jqszr.js} +5 -5
  33. package/dist/chunks/{pivot-result-identity-olvXJoB9.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
  34. package/dist/chunks/{zoned-wall-clock-CGLVI40Q.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
  35. package/dist/chunks/{report-preferences-dialog-C2YUIwKG.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
  36. package/dist/chunks/{report-runtime-context-DoIUr3MP.js → report-runtime-context-BITkNSDa.js} +2 -2
  37. package/dist/chunks/{resolve-dashboard-input-context-q_iiNXE1.js → resolve-dashboard-input-context-DaDrZGuA.js} +3455 -1744
  38. package/dist/chunks/{save-DH4RyrnG.js → save-CHV1B1fL.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-8jqfI7hI.js → saved-dashboard-context-DFYBrE6O.js} +94 -95
  40. package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
  41. package/dist/chunks/{selection-reducer-CV7K4FI6.js → selection-reducer-Bz5aywT4.js} +1 -1
  42. package/dist/chunks/{semaphor-ready-indicator-E2XWyibu.js → semaphor-ready-indicator-Cfuafnem.js} +37067 -38400
  43. package/dist/chunks/{shelf-drop-preview-context-C29EUzDp.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
  44. package/dist/chunks/{source-entity-resolution-BXI3nQ5Z.js → source-entity-resolution-DdDVXFB8.js} +6 -6
  45. package/dist/chunks/{switch-balDSHc7.js → switch-BW4yXSYs.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-CK8tvh4d.js → table-export-sheet-bSXxGn-v.js} +1 -1
  47. package/dist/chunks/{temporal-input-presentation-B77JsAzU.js → temporal-input-presentation-sk9gqLi6.js} +699 -741
  48. package/dist/chunks/{token-types-DhYH5YKb.js → token-types-BUK06hU2.js} +1 -1
  49. package/dist/chunks/{upload-Ufj8vjyn.js → upload-BnmuyPqW.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-9WsnzEO5.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
  51. package/dist/chunks/{validators-BtaCFIEB.js → validators-BIM0FE31.js} +764 -885
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2278 -3030
  54. package/dist/data-app-sdk/index.js +43 -43
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +22 -22
  57. package/dist/format-utils/index.js +215 -209
  58. package/dist/index.js +225 -224
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
  64. package/dist/types/components/index.d.ts +1 -2
  65. package/dist/types/components/surfboard/filter/types.d.ts +3 -1
  66. package/dist/types/index.js +5 -5
  67. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
  68. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
  69. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
  70. package/dist/types/lib/print/print-inputs.d.ts +2 -1
  71. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
  72. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
  73. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  74. package/dist/types/lib/types/common-types.d.ts +6 -0
  75. package/dist/types/lib/types/explorer-types.d.ts +7 -1
  76. package/dist/types/lib/types/interaction-types.d.ts +3 -1
  77. package/dist/types/lib/types/token-types.d.ts +0 -1
  78. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +3 -1
  79. package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
  80. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
  81. package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
  82. package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
  83. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
  84. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  86. package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
  87. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +4 -2
  88. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +15 -0
  89. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +12 -1
  90. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -3
  91. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3230 -4658
  92. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +24 -2
  93. package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
  94. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
  95. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +27 -1
  96. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
  97. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
  98. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  99. package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
  100. package/dist/types/shared/dashboard-authoring/index.d.ts +8 -6
  101. package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
  102. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
  103. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
  105. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
  106. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
  107. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
  108. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
  109. package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
  110. package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
  111. package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
  112. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
  113. package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
  114. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
  115. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
  116. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +52 -2
  117. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +13 -1
  118. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
  119. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
  120. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
  121. package/dist/types/shared/format-utils/document-print.d.ts +82 -0
  122. package/dist/types/shared/format-utils/index.d.ts +1 -0
  123. package/dist/types/shared/format-utils/raw-temporal.d.ts +2 -7
  124. package/dist/types/shared/temporal/index.d.ts +1 -0
  125. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
  126. package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
  127. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
  128. package/package.json +1 -1
  129. package/dist/chunks/custom-visual-inputs-DfolidZ9.js +0 -292
  130. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +0 -1718
  131. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
  132. package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
  133. package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
  134. package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
  135. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
  136. package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
  137. package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
  138. package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
@@ -1,14 +1,14 @@
1
- import { toSemaphorInputSnapshots as ce, toSemaphorInputBinding as le, toSemaphorSelectionSnapshots as de, toSemaphorActiveInputSnapshots as q, toSemaphorMatrixIntent as fe, toSemaphorSqlIntent as me, toSemaphorInputOptionsIntent as pe, toSemaphorRecordsIntent as ye, toSemaphorAnalysisQueryOptions as he, toSemaphorAnalysisIntent as ve, toSemaphorMetricIntent as ge, hasSemaphorInputValue as b, normalizeSemaphorInputOptions as X, toSemaphorInputSpec as Z } from "../data-app-sdk-adapters/index.js";
1
+ import { toSemaphorInputSnapshots as ce, toSemaphorInputBinding as le, toSemaphorSelectionSnapshots as de, toSemaphorActiveInputSnapshots as q, toSemaphorMatrixIntent as fe, toSemaphorSqlIntent as me, toSemaphorInputOptionsIntent as pe, toSemaphorRecordsIntent as ye, toSemaphorAnalysisQueryOptions as he, toSemaphorAnalysisIntent as ve, toSemaphorMetricIntent as ge, hasSemaphorInputValue as b, normalizeSemaphorInputOptions as G, toSemaphorInputSpec as Z } from "../data-app-sdk-adapters/index.js";
2
2
  import { j as Se } from "../chunks/index-CuHybtft.js";
3
- import { ab as qe, az as _, s as Ie } from "../chunks/validators-BtaCFIEB.js";
4
- import { a as Tt, aE as Nt } from "../chunks/validators-BtaCFIEB.js";
5
- import { _ as Ae, an as we, am as be, y as F, S as W, G as ke } from "../chunks/matrix-operation-contract-BSiGEXVC.js";
6
- import "../chunks/analytics-base-schemas-CB3oFAXk.js";
3
+ import { J as qe, K as x, s as Ie } from "../chunks/validators-BIM0FE31.js";
4
+ import { a as Tt, aD as Nt } from "../chunks/validators-BIM0FE31.js";
5
+ import { m as Ae, ao as we, an as be, A as F, S as W, I as ke } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
6
+ import "../chunks/analytics-base-schemas-BaIQrEzX.js";
7
7
  import "zod";
8
- import { createContext as Ee, useContext as Ke, useMemo as h, useEffect as M, useState as x, useCallback as S, useRef as D } from "react";
9
- import { r as J } from "../chunks/selection-reducer-CV7K4FI6.js";
8
+ import { createContext as Ke, useContext as Ee, useMemo as h, useEffect as M, useState as _, useCallback as S, useRef as D } from "react";
9
+ import { r as J } from "../chunks/selection-reducer-Bz5aywT4.js";
10
10
  import { jsx as De } from "react/jsx-runtime";
11
- function K(e, t, r) {
11
+ function E(e, t, r) {
12
12
  return {
13
13
  ...r,
14
14
  name: e,
@@ -21,7 +21,7 @@ function bt(e) {
21
21
  function kt(e) {
22
22
  return e;
23
23
  }
24
- const Et = {
24
+ const Kt = {
25
25
  source: {
26
26
  semantic(e) {
27
27
  return {
@@ -38,16 +38,16 @@ const Et = {
38
38
  },
39
39
  field: {
40
40
  measure(e, t = {}) {
41
- return K(e, "measure", t);
41
+ return E(e, "measure", t);
42
42
  },
43
43
  dimension(e, t = {}) {
44
- return K(e, "dimension", t);
44
+ return E(e, "dimension", t);
45
45
  },
46
46
  date(e, t = {}) {
47
- return K(e, "date", t);
47
+ return E(e, "date", t);
48
48
  },
49
49
  id(e, t = {}) {
50
- return K(e, "id", t);
50
+ return E(e, "id", t);
51
51
  }
52
52
  },
53
53
  filter(e) {
@@ -151,7 +151,7 @@ const Et = {
151
151
  "largestPositiveChanges",
152
152
  "largestNegativeDrivers",
153
153
  "largestPositiveDrivers"
154
- ], _e = [
154
+ ], xe = [
155
155
  "primary",
156
156
  "records",
157
157
  "periodChanges",
@@ -169,7 +169,7 @@ const Et = {
169
169
  function ee(e) {
170
170
  if (!e)
171
171
  return {};
172
- const t = Ne(e.executionResult), r = xe(e, t), n = Re(r), s = te(
172
+ const t = Ne(e.executionResult), r = _e(e, t), n = Re(r), s = te(
173
173
  L(e.analysisWarnings),
174
174
  Me(r)
175
175
  );
@@ -184,7 +184,7 @@ function ee(e) {
184
184
  } : {}
185
185
  };
186
186
  }
187
- function xe(e, t) {
187
+ function _e(e, t) {
188
188
  const r = $e(e.resultSets);
189
189
  for (const s of Oe) {
190
190
  if (r[s])
@@ -237,7 +237,7 @@ function Ce(e, t = e.id || e.role || "resultSet") {
237
237
  }
238
238
  function Re(e) {
239
239
  var t;
240
- for (const r of _e)
240
+ for (const r of xe)
241
241
  if ((t = e[r]) != null && t.records.length)
242
242
  return e[r];
243
243
  return Object.values(e).find((r) => r.records.length) || Object.values(e)[0];
@@ -603,7 +603,7 @@ function A(e, t = e.kind) {
603
603
  }
604
604
  function re(e, t, r) {
605
605
  return {
606
- ..._(e) ? { intentId: _(e) } : {},
606
+ ...x(e) ? { intentId: x(e) } : {},
607
607
  ...e ? { intent: e } : {},
608
608
  status: "failed",
609
609
  resultShape: t,
@@ -648,7 +648,7 @@ function f(e, t, r, n) {
648
648
  error: r == null ? void 0 : r.message
649
649
  });
650
650
  }
651
- function Ge() {
651
+ function Xe() {
652
652
  return {
653
653
  executeAnalysis: (e, t, r) => w(
654
654
  e,
@@ -661,7 +661,7 @@ function Ge() {
661
661
  executeSql: (e, t) => w(e, t),
662
662
  executeMatrix: async (e, t) => {
663
663
  var n, s;
664
- const r = await Xe(e, t);
664
+ const r = await Ge(e, t);
665
665
  if (r.status === "failed")
666
666
  throw ie(
667
667
  ((n = r.metadata.matrixFailure) == null ? void 0 : n.message) ?? "Matrix execution failed.",
@@ -709,7 +709,7 @@ function ne(e, t, r) {
709
709
  body: JSON.stringify(e)
710
710
  });
711
711
  }
712
- async function Xe(e, t, r) {
712
+ async function Ge(e, t, r) {
713
713
  const n = we.parse(e), s = await ne({
714
714
  ...n,
715
715
  activeInputs: t.activeInputs,
@@ -736,7 +736,7 @@ function Ze(e) {
736
736
  function et(e, t) {
737
737
  return [
738
738
  `Semaphor ${e.kind} query`,
739
- _(e) ? `id=${_(e)}` : void 0,
739
+ x(e) ? `id=${x(e)}` : void 0,
740
740
  "label" in e && e.label ? `label=${e.label}` : void 0,
741
741
  tt(e),
742
742
  `endpoint=${rt(t)}`
@@ -807,17 +807,17 @@ function it(e) {
807
807
  return "";
808
808
  }
809
809
  }
810
- const ae = Ee({});
810
+ const ae = Ke({});
811
811
  function st() {
812
812
  if (!(typeof window > "u"))
813
813
  return window.__SEMAPHOR_DATA_APP_RUNTIME__;
814
814
  }
815
815
  function ot() {
816
- return Ke(ae);
816
+ return Ee(ae);
817
817
  }
818
- function Kt(e) {
819
- const [t, r] = x(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), s = n ? e.value : t, o = h(
820
- () => X(e.options),
818
+ function Et(e) {
819
+ const [t, r] = _(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), s = n ? e.value : t, o = h(
820
+ () => G(e.options),
821
821
  [e.options]
822
822
  ), a = S(
823
823
  (u) => {
@@ -857,7 +857,7 @@ function Kt(e) {
857
857
  }, [c, o, a, e, s]);
858
858
  }
859
859
  function Dt(e) {
860
- const [t, r] = x(() => pt(e));
860
+ const [t, r] = _(() => pt(e));
861
861
  return M(() => {
862
862
  r((n) => {
863
863
  let s = n;
@@ -870,7 +870,7 @@ function Dt(e) {
870
870
  const s = Object.prototype.hasOwnProperty.call(
871
871
  n,
872
872
  "value"
873
- ), o = s ? n.value : t[n.id], a = X(n.options), c = (i) => {
873
+ ), o = s ? n.value : t[n.id], a = G(n.options), c = (i) => {
874
874
  var l;
875
875
  (l = n.onValueChange) == null || l.call(n, i), s || r((m) => ({
876
876
  ...m,
@@ -928,7 +928,7 @@ function ut(e) {
928
928
  function Y(e) {
929
929
  return `${typeof e}:${String(e)}`;
930
930
  }
931
- function _t(e, t = {}) {
931
+ function xt(e, t = {}) {
932
932
  const r = h(
933
933
  () => t.inputs ? {
934
934
  ...e,
@@ -990,7 +990,7 @@ function _t(e, t = {}) {
990
990
  }
991
991
  })(), [r, t.selections]), s = S(
992
992
  (i) => {
993
- var m, p, B, z, U, k, H, E, Q;
993
+ var m, p, B, z, U, k, H, K, Q;
994
994
  const l = n.request;
995
995
  if (l.intent)
996
996
  switch (n.queryKind) {
@@ -1024,8 +1024,8 @@ function _t(e, t = {}) {
1024
1024
  );
1025
1025
  case "matrix":
1026
1026
  if (!l.matrixWindowRequest) throw new Error("Matrix window request is required.");
1027
- return (Q = (E = i.executor) == null ? void 0 : E.executeMatrix) == null ? void 0 : Q.call(
1028
- E,
1027
+ return (Q = (K = i.executor) == null ? void 0 : K.executeMatrix) == null ? void 0 : Q.call(
1028
+ K,
1029
1029
  { intent: l.intent, matrixWindowRequest: l.matrixWindowRequest },
1030
1030
  i
1031
1031
  );
@@ -1246,7 +1246,7 @@ function y(e) {
1246
1246
  return Array.isArray(e) && e.length > 0;
1247
1247
  }
1248
1248
  function mt(e, t, r, n, s) {
1249
- const o = ot(), a = D(t), c = D(n), u = D(s), [d, i] = x({
1249
+ const o = ot(), a = D(t), c = D(n), u = D(s), [d, i] = _({
1250
1250
  status: "idle",
1251
1251
  data: r,
1252
1252
  error: null,
@@ -1301,8 +1301,8 @@ function pt(e) {
1301
1301
  function O(e) {
1302
1302
  throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
1303
1303
  }
1304
- function xt(e) {
1305
- const [t, r] = x(() => G(e, e.defaultTuples || [])), n = Object.prototype.hasOwnProperty.call(e, "tuples"), s = G(
1304
+ function _t(e) {
1305
+ const [t, r] = _(() => X(e, e.defaultTuples || [])), n = Object.prototype.hasOwnProperty.call(e, "tuples"), s = X(
1306
1306
  e,
1307
1307
  n ? e.tuples || [] : t
1308
1308
  ), o = D(s);
@@ -1352,7 +1352,7 @@ function xt(e) {
1352
1352
  [u, c, e.fields, e.id, e.label, s]
1353
1353
  );
1354
1354
  }
1355
- function G(e, t) {
1355
+ function X(e, t) {
1356
1356
  if (e.fields.length === 0)
1357
1357
  throw new Error(`Semaphor selection "${e.id}" requires at least one field.`);
1358
1358
  if (t.length > W)
@@ -1384,7 +1384,7 @@ function $t({
1384
1384
  children: s
1385
1385
  }) {
1386
1386
  var m;
1387
- const o = st(), a = ((m = o == null ? void 0 : o.authToken) == null ? void 0 : m.accessToken) || e, c = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || t, u = (o == null ? void 0 : o.debug) ?? n, d = h(() => Ge(), []), i = r || d, l = h(
1387
+ const o = st(), a = ((m = o == null ? void 0 : o.authToken) == null ? void 0 : m.accessToken) || e, c = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || t, u = (o == null ? void 0 : o.debug) ?? n, d = h(() => Xe(), []), i = r || d, l = h(
1388
1388
  () => ({
1389
1389
  token: a,
1390
1390
  apiBaseUrl: c,
@@ -1397,16 +1397,16 @@ function $t({
1397
1397
  }
1398
1398
  export {
1399
1399
  $t as SemaphorDataAppProvider,
1400
- Ge as createSemaphorQueryExecutor,
1400
+ Xe as createSemaphorQueryExecutor,
1401
1401
  bt as defineSemaphorDataApp,
1402
1402
  kt as defineSemaphorInput,
1403
1403
  at as isSemaphorInputValueValidForOptions,
1404
- Et as semaphor,
1404
+ Kt as semaphor,
1405
1405
  Tt as semaphorMetricAggregate,
1406
1406
  Nt as semaphorMetricMeasureBindingKey,
1407
1407
  Ot as useClearInvalidSemaphorInputValue,
1408
- Kt as useSemaphorInput,
1408
+ Et as useSemaphorInput,
1409
1409
  Dt as useSemaphorInputs,
1410
- _t as useSemaphorQuery,
1411
- xt as useSemaphorSelection
1410
+ xt as useSemaphorQuery,
1411
+ _t as useSemaphorSelection
1412
1412
  };
@@ -1,7 +1,7 @@
1
1
  import { n as y } from "../chunks/operators-B3zZoskU.js";
2
- import { m as v, s as m, p as I, a as S } from "../chunks/validators-BtaCFIEB.js";
3
- import { a as F, c as b } from "../chunks/matrix-operation-contract-BSiGEXVC.js";
4
- import "../chunks/analytics-base-schemas-CB3oFAXk.js";
2
+ import { m as v, s as m, p as I, a as S } from "../chunks/validators-BIM0FE31.js";
3
+ import { a as F, c as b } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
4
+ import "../chunks/analytics-base-schemas-BaIQrEzX.js";
5
5
  import "zod";
6
6
  function w(i) {
7
7
  var n, r, o;
@@ -1,11 +1,11 @@
1
- import { ag as b, aj as N, s as O, aC as v, q as E, ab as K, az as l } from "../chunks/validators-BtaCFIEB.js";
2
- import { _ as Q } from "../chunks/matrix-operation-contract-BSiGEXVC.js";
3
- import "../chunks/analytics-base-schemas-CB3oFAXk.js";
1
+ import { G as b, H as N, s as O, I as v, q as E, J as K, K as l } from "../chunks/validators-BIM0FE31.js";
2
+ import { m as Q } from "../chunks/matrix-operation-contract-DsLdFdSa.js";
3
+ import "../chunks/analytics-base-schemas-BaIQrEzX.js";
4
4
  import "zod";
5
- import { p as W } from "../chunks/report-runtime-context-DoIUr3MP.js";
6
- import { d as U } from "../chunks/source-entity-resolution-BXI3nQ5Z.js";
7
- import { toSemaphorMetricIntent as J, toSemaphorAnalysisIntent as V, toSemaphorRecordsIntent as G, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
8
- import { m as Z } from "../chunks/matrix-card-CUorIB7Q.js";
5
+ import { p as W } from "../chunks/report-runtime-context-BITkNSDa.js";
6
+ import { r as J } from "../chunks/source-entity-resolution-DdDVXFB8.js";
7
+ import { toSemaphorMetricIntent as U, toSemaphorAnalysisIntent as G, toSemaphorRecordsIntent as V, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
8
+ import { m as Z } from "../chunks/matrix-card-CCh9JjP1.js";
9
9
  function ee({
10
10
  intent: e,
11
11
  field: r,
@@ -22,7 +22,7 @@ function ee({
22
22
  const n = q(
23
23
  r,
24
24
  i.selectedField
25
- ), s = P(t), c = y(n);
25
+ ), s = H(t), c = y(n);
26
26
  return re(
27
27
  s,
28
28
  i.allowedRelatedRoles
@@ -31,7 +31,7 @@ function ee({
31
31
  function Ne(e) {
32
32
  return e.kind === "records" ? ae(e) : e.kind === "metric" ? ne(e) : [];
33
33
  }
34
- function P(e) {
34
+ function H(e) {
35
35
  const r = b(e.role);
36
36
  if (r === "measure")
37
37
  return "measure";
@@ -107,7 +107,7 @@ function ie(e, r, t) {
107
107
  function ae(e) {
108
108
  var o, i;
109
109
  const r = w(e), t = (o = e.orderBy) != null && o.field ? I(r, e.orderBy.field) : void 0;
110
- return H([
110
+ return P([
111
111
  ...r.map(
112
112
  (n) => p(
113
113
  n,
@@ -135,7 +135,7 @@ function ne(e) {
135
135
  e.dimensions || [],
136
136
  e.orderBy.field
137
137
  ) : void 0;
138
- return H([
138
+ return P([
139
139
  ...e.measures.map((i) => p(i, [])),
140
140
  ...e.primaryMeasure ? [p(e.primaryMeasure, [])] : [],
141
141
  ...(e.dimensions || []).map(
@@ -168,7 +168,7 @@ function p(e, r, t = {}) {
168
168
  ...t
169
169
  };
170
170
  }
171
- function H(e) {
171
+ function P(e) {
172
172
  const r = [];
173
173
  return e.forEach((t) => {
174
174
  r.some(
@@ -198,7 +198,7 @@ function de(e, r) {
198
198
  return !!(e && (!r || e === r));
199
199
  }
200
200
  function y(e) {
201
- return P(e);
201
+ return H(e);
202
202
  }
203
203
  function j({
204
204
  intent: e,
@@ -342,7 +342,7 @@ function fe(e) {
342
342
  )
343
343
  );
344
344
  else {
345
- const d = U({
345
+ const d = J({
346
346
  entities: i,
347
347
  semanticDomainId: t.kind === "semantic" ? t.domainId : void 0,
348
348
  connectionId: t.connectionId,
@@ -450,7 +450,7 @@ function Oe(e) {
450
450
  function pe(e, r, t) {
451
451
  const o = `queries.${r}`;
452
452
  try {
453
- const i = ge(e), n = He(e, i), s = K(i), c = [
453
+ const i = ge(e), n = Pe(e, i), s = K(i), c = [
454
454
  ...Re({
455
455
  querySpec: e,
456
456
  queryId: n,
@@ -490,7 +490,7 @@ function pe(e, r, t) {
490
490
  pathPrefix: o,
491
491
  validateTimezone: t.validateTimezone
492
492
  })
493
- ], a = Pe(s, c);
493
+ ], a = He(s, c);
494
494
  return {
495
495
  queryHook: e.queryHook,
496
496
  queryId: n,
@@ -573,11 +573,11 @@ function ve(e) {
573
573
  if (!M(e))
574
574
  throw new Error("useSemaphorQuery spec must be an object.");
575
575
  if (e.queryKind === "metric")
576
- return J(e);
576
+ return U(e);
577
577
  if (e.queryKind === "analysis")
578
- return V(e);
579
- if (e.queryKind === "records")
580
578
  return G(e);
579
+ if (e.queryKind === "records")
580
+ return V(e);
581
581
  if (e.queryKind === "sql")
582
582
  return L(e);
583
583
  if (e.queryKind === "matrix")
@@ -924,7 +924,7 @@ function _(e, r) {
924
924
  source: r.intent.source
925
925
  };
926
926
  }
927
- function Pe(e, r) {
927
+ function He(e, r) {
928
928
  const t = D(r);
929
929
  return {
930
930
  ok: t.ok && e.ok,
@@ -1011,7 +1011,7 @@ function x(e) {
1011
1011
  }
1012
1012
  };
1013
1013
  }
1014
- function He(e, r) {
1014
+ function Pe(e, r) {
1015
1015
  return l(r) || z(e.spec);
1016
1016
  }
1017
1017
  function z(e) {
@@ -1025,7 +1025,7 @@ export {
1025
1025
  I as findMatchingRelatedProjectionField,
1026
1026
  re as isAllowedRelatedProjectionRole,
1027
1027
  me as normalizeSemaphorAnalysisQueryOptions,
1028
- P as normalizeSemaphorFieldRole,
1028
+ H as normalizeSemaphorFieldRole,
1029
1029
  Ne as relatedProjectionFieldCandidatesForIntent,
1030
1030
  Oe as validateSemaphorDataAppQuerySpecs
1031
1031
  };