react-semaphor 0.1.525 → 0.1.527

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 (196) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1179 -296
  3. package/dist/brand-studio/index.js +31 -31
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-DEhjPSr-.js} +77 -76
  6. package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-BlIbwkuD.js} +62 -59
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-D9pFByPh.js} +274 -267
  10. package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-CJI5ZWMq.js} +740 -692
  11. package/dist/chunks/dashboard-json-DLdrFry-.js +65 -0
  12. package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-D5LjWle1.js} +6760 -6728
  13. package/dist/chunks/editor-action-buttons-G91NQKxU.js +2070 -0
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-ON7Gpvcv.js → index-BvJOYbNv.js} +760 -750
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-BypfLZsK.js} +36 -36
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/report-preferences-dialog-D3hxu4sE.js +1231 -0
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-C7Um5XN-.js} +3 -3
  35. package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
  36. package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-D46I_4g7.js} +145070 -146854
  37. package/dist/chunks/slider-B6LELqx6.js +876 -0
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/{switch-CWPcwAZ4.js → switch-_7uBAbYx.js} +7950 -8545
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +30 -29
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +435 -246
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +4 -5
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  58. package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
  59. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
  60. package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
  61. package/dist/types/components/editor/editor.d.ts +1 -1
  62. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  63. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  64. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  65. package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
  66. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  67. package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
  68. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  69. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  70. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  71. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  72. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  73. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  74. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  75. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  76. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  77. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  78. package/dist/types/components/visual/column-display-utils.d.ts +1 -1
  79. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  80. package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
  81. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  82. package/dist/types/components/visual/settings/color-format.d.ts +1 -1
  83. package/dist/types/components/visual/visual-utils.d.ts +1 -1
  84. package/dist/types/index.js +5 -5
  85. package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
  86. package/dist/types/lib/api/exports-api.d.ts +3 -0
  87. package/dist/types/lib/csv-download.d.ts +9 -0
  88. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  89. package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  91. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  92. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  93. package/dist/types/lib/export-utils.d.ts +17 -15
  94. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  95. package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
  96. package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
  97. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  98. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
  99. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  100. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  101. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  102. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  103. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  104. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  105. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  106. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  107. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  108. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  109. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  110. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  111. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  112. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  113. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  114. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  115. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  116. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  117. package/dist/types/lib/stores/table-actions.d.ts +2 -1
  118. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  119. package/dist/types/lib/types/common-types.d.ts +5 -0
  120. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  121. package/dist/types/lib/types/token-types.d.ts +0 -13
  122. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  123. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  124. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  125. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  126. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  127. package/dist/types/lib/utils.d.ts +0 -2
  128. package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
  129. package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
  130. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  131. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  132. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  133. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
  134. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  135. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  136. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  137. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  138. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  139. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  140. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  141. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  142. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  143. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  144. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  145. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  146. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  147. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  148. package/dist/types/shared/temporal/index.d.ts +5 -0
  149. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  150. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  151. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  152. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  153. package/package.json +2 -17
  154. package/src/data-app-sdk/README.md +6 -3
  155. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  156. package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
  157. package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
  158. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  159. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  160. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  161. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  162. package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
  163. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  164. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  165. package/dist/data-app-builder/index.js +0 -3666
  166. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  167. package/dist/data-app-codegen/index.js +0 -22
  168. package/dist/data-app-codegen-node/index.js +0 -1807
  169. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  170. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  171. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  172. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  173. package/dist/types/data-app-builder/constants.d.ts +0 -14
  174. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  175. package/dist/types/data-app-builder/index.d.ts +0 -1
  176. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  177. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  178. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  179. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  180. package/dist/types/data-app-builder/types.d.ts +0 -558
  181. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  182. package/dist/types/data-app-builder.d.ts +0 -2
  183. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  184. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  185. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  186. package/dist/types/data-app-codegen/index.d.ts +0 -6
  187. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  188. package/dist/types/data-app-codegen/node.d.ts +0 -2
  189. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  190. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  191. package/dist/types/data-app-codegen-node.d.ts +0 -2
  192. package/dist/types/data-app-codegen.d.ts +0 -2
  193. package/dist/types/lib/encrypt-utils.d.ts +0 -9
  194. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  195. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  196. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -1,6 +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-CsdOtZI6.js";
3
- import { b as F, c as b } from "../chunks/matrix-operation-contract-D32U2CSw.js";
2
+ import { m as v, s as m, p as I, a as S } from "../chunks/validators-CQcG0EPN.js";
3
+ import { a as F, c as b } from "../chunks/matrix-operation-contract-BV02rLhu.js";
4
+ import "zod";
4
5
  function w(i) {
5
6
  var n, r, o;
6
7
  const t = R(i);
@@ -27,14 +28,14 @@ function w(i) {
27
28
  ...(o = i.derivedFields) != null && o.length ? { derivedFields: i.derivedFields } : {}
28
29
  };
29
30
  }
30
- function _(i) {
31
+ function G(i) {
31
32
  return {
32
33
  ...w(i),
33
34
  ...i.timeWindow ? { timeWindow: i.timeWindow } : {},
34
35
  ...i.analysis ? { analysis: i.analysis } : {}
35
36
  };
36
37
  }
37
- function G(i) {
38
+ function j(i) {
38
39
  return {
39
40
  ...i.chartTitle ? { chartTitle: i.chartTitle } : {},
40
41
  ...i.chartType ? { chartType: i.chartType } : {},
@@ -98,7 +99,7 @@ function f(i, t) {
98
99
  aggregate: i.aggregate || t.aggregate
99
100
  };
100
101
  }
101
- function j(i) {
102
+ function K(i) {
102
103
  var n, r;
103
104
  if ("sort" in i)
104
105
  throw new Error(
@@ -147,7 +148,7 @@ function O(i) {
147
148
  return n;
148
149
  });
149
150
  }
150
- function K(i) {
151
+ function V(i) {
151
152
  var n, r, o;
152
153
  const t = s(i);
153
154
  if (t.kind === "sql")
@@ -177,7 +178,7 @@ function K(i) {
177
178
  ...(o = i.derivedFields) != null && o.length ? { derivedFields: i.derivedFields } : {}
178
179
  };
179
180
  }
180
- function V(i) {
181
+ function Q(i) {
181
182
  var t;
182
183
  return {
183
184
  version: 1,
@@ -195,7 +196,7 @@ function V(i) {
195
196
  rationale: i.rationale
196
197
  };
197
198
  }
198
- function Q(i) {
199
+ function D(i) {
199
200
  const { id: t, label: n, inputs: r, matrixWindowRequest: o, ...e } = i, { queryKind: T, ...p } = e;
200
201
  return v.parse({ ...p, kind: "matrix" });
201
202
  }
@@ -235,17 +236,17 @@ function h(i) {
235
236
  function z(i) {
236
237
  return i === "grain" || i === "measure" || i === "dimension" || i === "aggregation" || i === "sqlParam";
237
238
  }
238
- function D(i) {
239
+ function J(i) {
239
240
  const t = d(i);
240
241
  return t.length > 0 ? t : void 0;
241
242
  }
242
243
  function C(i) {
243
244
  return (i || []).map(P);
244
245
  }
245
- function J(i) {
246
+ function L(i) {
246
247
  return C(i).filter((t) => t.isActive);
247
248
  }
248
- function L(i) {
249
+ function N(i) {
249
250
  const t = (i || []).flatMap((n) => {
250
251
  const r = "toAnalyticsSelection" in n ? n.toAnalyticsSelection() : n;
251
252
  return r ? [F.parse(r)] : [];
@@ -271,7 +272,7 @@ function g(i) {
271
272
  controlRole: i.role
272
273
  };
273
274
  }
274
- function N(i = []) {
275
+ function U(i = []) {
275
276
  return i.map(
276
277
  (t) => typeof t == "object" ? t : {
277
278
  label: String(t),
@@ -342,18 +343,18 @@ function c(i, t) {
342
343
  }
343
344
  export {
344
345
  u as hasSemaphorInputValue,
345
- N as normalizeSemaphorInputOptions,
346
- J as toSemaphorActiveInputSnapshots,
347
- _ as toSemaphorAnalysisIntent,
348
- G as toSemaphorAnalysisQueryOptions,
346
+ U as normalizeSemaphorInputOptions,
347
+ L as toSemaphorActiveInputSnapshots,
348
+ G as toSemaphorAnalysisIntent,
349
+ j as toSemaphorAnalysisQueryOptions,
349
350
  h as toSemaphorInputBinding,
350
- D as toSemaphorInputBindings,
351
- K as toSemaphorInputOptionsIntent,
351
+ J as toSemaphorInputBindings,
352
+ V as toSemaphorInputOptionsIntent,
352
353
  C as toSemaphorInputSnapshots,
353
354
  g as toSemaphorInputSpec,
354
- Q as toSemaphorMatrixIntent,
355
+ D as toSemaphorMatrixIntent,
355
356
  w as toSemaphorMetricIntent,
356
- j as toSemaphorRecordsIntent,
357
- L as toSemaphorSelectionSnapshots,
358
- V as toSemaphorSqlIntent
357
+ K as toSemaphorRecordsIntent,
358
+ N as toSemaphorSelectionSnapshots,
359
+ Q as toSemaphorSqlIntent
359
360
  };
@@ -1,9 +1,10 @@
1
- import { ai as b, al as N, s as O, a$ as v, u as E, ad as K, aX as l } from "../chunks/validators-CsdOtZI6.js";
2
- import { Q } from "../chunks/matrix-operation-contract-D32U2CSw.js";
3
- import { p as W } from "../chunks/report-runtime-context-CxIoGyNM.js";
4
- import { o as U } from "../chunks/source-entity-resolution-Bzefiive.js";
5
- 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";
6
- import { m as Z } from "../chunks/matrix-card-CIlz0Dnp.js";
1
+ import { E as b, F as N, s as E, G as v, u as O, H as K, I as l } from "../chunks/validators-CQcG0EPN.js";
2
+ import { m as Q } from "../chunks/matrix-operation-contract-BV02rLhu.js";
3
+ import "zod";
4
+ import { p as W } from "../chunks/report-runtime-context-CtaGGlit.js";
5
+ import { r as U } from "../chunks/source-entity-resolution-Bde29mqE.js";
6
+ import { toSemaphorMetricIntent as G, toSemaphorAnalysisIntent as J, toSemaphorRecordsIntent as V, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
7
+ import { m as Z } from "../chunks/matrix-card-DY45yiUM.js";
7
8
  function ee({
8
9
  intent: e,
9
10
  field: r,
@@ -20,16 +21,16 @@ function ee({
20
21
  const n = q(
21
22
  r,
22
23
  i.selectedField
23
- ), s = P(t), c = y(n);
24
+ ), s = H(t), c = y(n);
24
25
  return re(
25
26
  s,
26
27
  i.allowedRelatedRoles
27
28
  ) ? c === s : !1;
28
29
  }
29
- function De(e) {
30
+ function ze(e) {
30
31
  return e.kind === "records" ? ae(e) : e.kind === "metric" ? ne(e) : [];
31
32
  }
32
- function P(e) {
33
+ function H(e) {
33
34
  const r = b(e.role);
34
35
  if (r === "measure")
35
36
  return "measure";
@@ -105,7 +106,7 @@ function ie(e, r, t) {
105
106
  function ae(e) {
106
107
  var o, i;
107
108
  const r = w(e), t = (o = e.orderBy) != null && o.field ? I(r, e.orderBy.field) : void 0;
108
- return H([
109
+ return P([
109
110
  ...r.map(
110
111
  (n) => p(
111
112
  n,
@@ -133,7 +134,7 @@ function ne(e) {
133
134
  e.dimensions || [],
134
135
  e.orderBy.field
135
136
  ) : void 0;
136
- return H([
137
+ return P([
137
138
  ...e.measures.map((i) => p(i, [])),
138
139
  ...e.primaryMeasure ? [p(e.primaryMeasure, [])] : [],
139
140
  ...(e.dimensions || []).map(
@@ -166,7 +167,7 @@ function p(e, r, t = {}) {
166
167
  ...t
167
168
  };
168
169
  }
169
- function H(e) {
170
+ function P(e) {
170
171
  const r = [];
171
172
  return e.forEach((t) => {
172
173
  r.some(
@@ -184,7 +185,7 @@ function se(e, r) {
184
185
  return T(e.field, r.field) && e.allowedRelatedRoles.join("|") === r.allowedRelatedRoles.join("|") && (e.unsupportedRelatedRoleMessage || "") === (r.unsupportedRelatedRoleMessage || "") && (e.recommendedNextStep || "") === (r.recommendedNextStep || "");
185
186
  }
186
187
  function A(e, r) {
187
- return O(e, r);
188
+ return E(e, r);
188
189
  }
189
190
  function T(e, r) {
190
191
  return A(e, r) && de(
@@ -196,7 +197,7 @@ function de(e, r) {
196
197
  return !!(e && (!r || e === r));
197
198
  }
198
199
  function y(e) {
199
- return P(e);
200
+ return H(e);
200
201
  }
201
202
  function j({
202
203
  intent: e,
@@ -296,7 +297,7 @@ function ue(e, r) {
296
297
  function fe(e) {
297
298
  const r = [];
298
299
  if (!e.intent.filters) return r;
299
- const t = e.intent.source, i = E(
300
+ const t = e.intent.source, i = O(
300
301
  e.fieldCatalogs.flatMap((a) => [
301
302
  a.source,
302
303
  ...a.sourceAliases ?? []
@@ -427,7 +428,7 @@ function me(e, r = {}) {
427
428
  }
428
429
  return { ok: !0, analysisOptions: i };
429
430
  }
430
- function ze(e) {
431
+ function Ne(e) {
431
432
  const r = e.queries.map(
432
433
  (i, n) => pe(i, n, {
433
434
  fieldCatalogs: e.fieldCatalogs || [],
@@ -448,7 +449,7 @@ function ze(e) {
448
449
  function pe(e, r, t) {
449
450
  const o = `queries.${r}`;
450
451
  try {
451
- const i = ge(e), n = He(e, i), s = K(i), c = [
452
+ const i = ge(e), n = Pe(e, i), s = K(i), c = [
452
453
  ...Re({
453
454
  querySpec: e,
454
455
  queryId: n,
@@ -488,7 +489,7 @@ function pe(e, r, t) {
488
489
  pathPrefix: o,
489
490
  validateTimezone: t.validateTimezone
490
491
  })
491
- ], a = Pe(s, c);
492
+ ], a = He(s, c);
492
493
  return {
493
494
  queryHook: e.queryHook,
494
495
  queryId: n,
@@ -571,11 +572,11 @@ function ve(e) {
571
572
  if (!M(e))
572
573
  throw new Error("useSemaphorQuery spec must be an object.");
573
574
  if (e.queryKind === "metric")
574
- return J(e);
575
+ return G(e);
575
576
  if (e.queryKind === "analysis")
576
- return V(e);
577
+ return J(e);
577
578
  if (e.queryKind === "records")
578
- return G(e);
579
+ return V(e);
579
580
  if (e.queryKind === "sql")
580
581
  return L(e);
581
582
  if (e.queryKind === "matrix")
@@ -922,7 +923,7 @@ function _(e, r) {
922
923
  source: r.intent.source
923
924
  };
924
925
  }
925
- function Pe(e, r) {
926
+ function He(e, r) {
926
927
  const t = D(r);
927
928
  return {
928
929
  ok: t.ok && e.ok,
@@ -1009,7 +1010,7 @@ function x(e) {
1009
1010
  }
1010
1011
  };
1011
1012
  }
1012
- function He(e, r) {
1013
+ function Pe(e, r) {
1013
1014
  return l(r) || z(e.spec);
1014
1015
  }
1015
1016
  function z(e) {
@@ -1023,7 +1024,7 @@ export {
1023
1024
  I as findMatchingRelatedProjectionField,
1024
1025
  re as isAllowedRelatedProjectionRole,
1025
1026
  me as normalizeSemaphorAnalysisQueryOptions,
1026
- P as normalizeSemaphorFieldRole,
1027
- De as relatedProjectionFieldCandidatesForIntent,
1028
- ze as validateSemaphorDataAppQuerySpecs
1027
+ H as normalizeSemaphorFieldRole,
1028
+ ze as relatedProjectionFieldCandidatesForIntent,
1029
+ Ne as validateSemaphorDataAppQuerySpecs
1029
1030
  };