react-semaphor 0.1.564 → 0.1.565

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 (132) hide show
  1. package/DATA_APP_SDK.md +3 -3
  2. package/README.md +2 -2
  3. package/dist/analytics-protocol/index.js +8 -8
  4. package/dist/assistant-context/index.js +3 -2
  5. package/dist/brand-studio/index.js +28 -29
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{assistant-chat-D1BEEHUF.js → assistant-chat-DNfb5fbF.js} +204 -204
  8. package/dist/chunks/{bookmark-impact-XOsVUAqW.js → bookmark-impact-CHr7b1J2.js} +2 -2
  9. package/dist/chunks/bookmark-state-ByODVqee.js +1613 -0
  10. package/dist/chunks/card-filter-builder-CcEcfaYz.js +4100 -0
  11. package/dist/chunks/{switch-BW4yXSYs.js → code-editor-DJNOsgJH.js} +463 -442
  12. package/dist/chunks/{comparison-window-caption-D1EUXzaR.js → comparison-window-caption-CMLb3mut.js} +451 -419
  13. package/dist/chunks/{dashboard-DfYsASNd.js → dashboard-CtIfxycc.js} +1 -1
  14. package/dist/chunks/dashboard-briefing-launcher-D3mc6peE.js +4910 -0
  15. package/dist/chunks/{dashboard-controls-CJ8Dz50D.js → dashboard-controls-BFv0zdws.js} +692 -682
  16. package/dist/chunks/{dashboard-json-D3uZxGO-.js → dashboard-json-CXn_3OYb.js} +4 -4
  17. package/dist/chunks/{dates-EvDtT25n.js → dates-DcRxw17S.js} +12 -12
  18. package/dist/chunks/{edit-dashboard-visual-CgHJXBQv.js → edit-dashboard-visual-Y6HatqBd.js} +7704 -10337
  19. package/dist/chunks/filter-reach-copy-DbggA5B7.js +4673 -0
  20. package/dist/chunks/{filter-value-text-CPwFkrMz.js → filter-value-text-7zhmth1S.js} +2 -2
  21. package/dist/chunks/{index-CAgf2x4E.js → index-DDa_rklN.js} +68 -63
  22. package/dist/chunks/{layout-grid-BM65viQh.js → layout-grid-0hIlqEtk.js} +1 -1
  23. package/dist/chunks/{list-filter-BoeLBfL3.js → list-filter-DkgoCeBm.js} +1 -1
  24. package/dist/chunks/{matrix-analytical-definition-hEucouWM.js → matrix-analytical-definition-C9xB_T84.js} +18 -18
  25. package/dist/chunks/{matrix-card-CCh9JjP1.js → matrix-card-BSUeSXpD.js} +2 -2
  26. package/dist/chunks/{matrix-member-presentation-DsAUbuoL.js → matrix-member-presentation-DZNgQpUq.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract-DsLdFdSa.js → matrix-operation-contract-Eb6elidS.js} +1 -1
  28. package/dist/chunks/{metric-comparison-Bnso1cm1.js → metric-comparison-ChXUFaZu.js} +1 -1
  29. package/dist/chunks/{palette-p1XSJFgB.js → palette-4vf2BEEg.js} +1 -1
  30. package/dist/chunks/{pivot-result-contract-expectations-B53jqszr.js → pivot-result-contract-expectations-Ddh1rNz5.js} +4 -4
  31. package/dist/chunks/{pivot-result-identity-Dq5jm-EC.js → pivot-result-identity-BlbLrqaC.js} +1 -1
  32. package/dist/chunks/{report-preferences-dialog-DMqxSU4X.js → report-preferences-dialog-Db-b04B4.js} +122 -131
  33. package/dist/chunks/{report-runtime-context-BITkNSDa.js → report-runtime-context-DnA_PiKo.js} +1 -1
  34. package/dist/chunks/resolve-dashboard-input-context-C18J-YZC.js +21394 -0
  35. package/dist/chunks/{save-CHV1B1fL.js → save-D6pHmSSP.js} +1 -1
  36. package/dist/chunks/saved-dashboard-context-DhC_EVus.js +629 -0
  37. package/dist/chunks/{selection-reducer-Bz5aywT4.js → selection-reducer-OaJ-N5uN.js} +1 -1
  38. package/dist/chunks/{semaphor-ready-indicator-CFeCIuaw.js → semaphor-ready-indicator-T6TsiBMT.js} +80634 -80503
  39. package/dist/chunks/{shelf-drop-preview-context-cEyVkKTF.js → shelf-drop-preview-context-CNWL_b0S.js} +407 -407
  40. package/dist/chunks/{source-entity-resolution-DdDVXFB8.js → source-entity-resolution-DF6GulDn.js} +1 -1
  41. package/dist/chunks/stored-dashboard-IdmtrNkA.js +5026 -0
  42. package/dist/chunks/{table-export-sheet-bSXxGn-v.js → table-export-sheet--DUKWk6o.js} +1 -1
  43. package/dist/chunks/{temporal-input-presentation-sk9gqLi6.js → temporal-input-presentation--2r9BLr0.js} +392 -377
  44. package/dist/chunks/{token-types-BUK06hU2.js → token-types-C8JymO8s.js} +1 -1
  45. package/dist/chunks/{upload-BnmuyPqW.js → upload-Cf3wXZT8.js} +1 -1
  46. package/dist/chunks/{validators-BIM0FE31.js → validators-wtjw0aw6.js} +7 -7
  47. package/dist/chunks/variable-draft-3xseULxR.js +241 -0
  48. package/dist/dashboard/index.js +2 -2
  49. package/dist/dashboard-authoring/index.js +2206 -1705
  50. package/dist/data-app-sdk/index.js +4 -4
  51. package/dist/data-app-sdk-adapters/index.js +2 -2
  52. package/dist/data-app-sdk-validation/index.js +5 -5
  53. package/dist/format-utils/index.js +174 -167
  54. package/dist/index.js +189 -187
  55. package/dist/pdf-export-policy/index.js +80 -28
  56. package/dist/pdf-table-layout/index.js +65 -65
  57. package/dist/report-runtime-context/index.js +1 -1
  58. package/dist/style.css +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  61. package/dist/types/components/dashboard-variables/data-variables-menu.d.ts +8 -0
  62. package/dist/types/components/dashboard-variables/variable-editor-host.d.ts +1 -0
  63. package/dist/types/components/index.d.ts +2 -0
  64. package/dist/types/index.js +5 -5
  65. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +62 -0
  66. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +33 -2
  67. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +7 -2
  68. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +4 -2
  69. package/dist/types/lib/dashboard-variables/data-text.d.ts +33 -0
  70. package/dist/types/lib/dashboard-variables/types.d.ts +207 -0
  71. package/dist/types/lib/document/document-edits.d.ts +16 -1
  72. package/dist/types/lib/document/document-panel-target.d.ts +1 -1
  73. package/dist/types/lib/document/document-section-query-options.d.ts +29 -0
  74. package/dist/types/lib/document/document-table-data-policy.d.ts +0 -1
  75. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +92 -0
  76. package/dist/types/lib/query-context/build-card-query-context.d.ts +6 -0
  77. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +1 -0
  78. package/dist/types/lib/query-context/use-semantic-execution-payload-for-cards.d.ts +24 -0
  79. package/dist/types/lib/stores/dashboard-store.d.ts +36 -0
  80. package/dist/types/lib/text-variables/temporal-input-text.d.ts +28 -0
  81. package/dist/types/lib/text-variables/text-variable-types.d.ts +72 -0
  82. package/dist/types/lib/types/common-types.d.ts +155 -51
  83. package/dist/types/lib/utils/card-definition.d.ts +2 -2
  84. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  85. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +51 -1
  86. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +7 -1
  87. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +10 -0
  88. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  89. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1087 -430
  90. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +18 -1
  91. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -1
  92. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +10 -0
  93. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +40 -40
  94. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -16
  95. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +1 -0
  96. package/dist/types/shared/dashboard-authoring/dashboard-filter-targets.d.ts +29 -0
  97. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +7 -4
  98. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +159 -0
  99. package/dist/types/shared/dashboard-authoring/dashboard-variable-changes.d.ts +61 -0
  100. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +7 -0
  101. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  102. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +10 -0
  103. package/dist/types/shared/dashboard-authoring/index.d.ts +6 -0
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +2 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +1 -1
  106. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +50 -3
  107. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +48 -1
  108. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -2
  109. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +87 -13
  110. package/dist/types/shared/dashboard-authoring/text-card-words/chip-colors.d.ts +23 -0
  111. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +90 -8
  112. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +31 -3
  113. package/dist/types/shared/dashboard-authoring/text-card-words/variable-words.d.ts +8 -0
  114. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +125 -0
  115. package/dist/types/shared/dashboard-authoring/variable-editability.d.ts +24 -0
  116. package/dist/types/shared/dashboard-authoring/variable-references.d.ts +39 -0
  117. package/dist/types/shared/format-utils/document-print.d.ts +4 -2
  118. package/dist/types/shared/format-utils/index.d.ts +1 -0
  119. package/dist/types/shared/format-utils/pdf-capacity-lines.d.ts +17 -0
  120. package/dist/types/shared/format-utils/pdf-delivery.d.ts +8 -1
  121. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +74 -6
  122. package/dist/types/shared/format-utils/presentation-execution.d.ts +9 -0
  123. package/package.json +2 -2
  124. package/src/data-app-sdk/README.md +3 -3
  125. package/dist/chunks/bookmark-state-CWeoGbrx.js +0 -743
  126. package/dist/chunks/braces-DzgoQC64.js +0 -23
  127. package/dist/chunks/dashboard-briefing-launcher-lvYfJoUQ.js +0 -3878
  128. package/dist/chunks/filter-reach-copy-Cmb05jlE.js +0 -3965
  129. package/dist/chunks/global-date-filter-utils-ruJYwjgZ.js +0 -16733
  130. package/dist/chunks/resolve-dashboard-input-context-i_jCSYae.js +0 -8214
  131. package/dist/chunks/saved-dashboard-context-Dg3oDmH_.js +0 -564
  132. package/dist/chunks/use-create-flow-overlay-state-Dl6DCxh8.js +0 -1436
@@ -1,5 +1,5 @@
1
1
  import "../value-format-preferences/index.js";
2
- import "./validators-BIM0FE31.js";
2
+ import "./validators-wtjw0aw6.js";
3
3
  const A = {
4
4
  mode: "all"
5
5
  };
@@ -1,4 +1,4 @@
1
- import { c as o } from "./switch-BW4yXSYs.js";
1
+ import { c as o } from "./code-editor-DJNOsgJH.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -3235,7 +3235,7 @@ export {
3235
3235
  st as Z,
3236
3236
  Ci as _,
3237
3237
  pt as a,
3238
- Ca as a$,
3238
+ $a as a$,
3239
3239
  ot as a0,
3240
3240
  j as a1,
3241
3241
  ke as a2,
@@ -3272,7 +3272,7 @@ export {
3272
3272
  R as aX,
3273
3273
  Ra as aY,
3274
3274
  L as aZ,
3275
- $a as a_,
3275
+ ja as a_,
3276
3276
  oe as aa,
3277
3277
  Ft as ab,
3278
3278
  Dt as ac,
@@ -3300,11 +3300,11 @@ export {
3300
3300
  an as ay,
3301
3301
  nn as az,
3302
3302
  Ba as b,
3303
- ja as b0,
3304
- Yi as b1,
3305
- le as b2,
3306
- Ot as b3,
3307
- we as b4,
3303
+ Yi as b0,
3304
+ le as b1,
3305
+ Ot as b2,
3306
+ we as b3,
3307
+ Ca as b4,
3308
3308
  ui as c,
3309
3309
  ze as d,
3310
3310
  Va as e,
@@ -0,0 +1,241 @@
1
+ import { c as v, g as N, a as y, b as D } from "./resolve-dashboard-input-context-C18J-YZC.js";
2
+ import { e as M } from "./validators-wtjw0aw6.js";
3
+ import { g as A, a as q, b as w, c as E } from "./filter-reach-copy-DbggA5B7.js";
4
+ import { g as L, m as x } from "./matrix-analytical-definition-C9xB_T84.js";
5
+ const O = [
6
+ {
7
+ value: "only",
8
+ label: "The only value",
9
+ hint: "Shows the value when exactly one matches. When more than one matches, readers see nothing."
10
+ },
11
+ { value: "first", label: "First by…", hint: "Shows the first value by the order you choose." },
12
+ { value: "list", label: "List", hint: "Shows the distinct values in order, joined with a separator." }
13
+ ], k = {
14
+ SUM: { number: "Total", date: "Total", other: "Total" },
15
+ AVG: { number: "Average", date: "Average", other: "Average" },
16
+ MIN: { number: "Lowest", date: "Earliest", other: "Min" },
17
+ MAX: { number: "Highest", date: "Latest", other: "Max" },
18
+ MEDIAN: { number: "Median", date: "Median", other: "Median" },
19
+ COUNT: { number: "Count", date: "Count", other: "Count" },
20
+ DISTINCT: { number: "Count distinct", date: "Count distinct", other: "Count distinct" }
21
+ };
22
+ function h(e) {
23
+ return M(e) === "aggregate";
24
+ }
25
+ function H(e) {
26
+ const t = e == null ? void 0 : e.dataType;
27
+ if (h(e))
28
+ return [
29
+ { value: "calculation", label: "The calculation’s value", hint: "Shows the calculation over the rows the filters keep; it aggregates itself." }
30
+ ];
31
+ const a = y(t), i = a === "number" ? "number" : a === "date" ? "date" : "other", o = [...D(t)];
32
+ return i === "date" && o.push({ value: "MIN", label: "Min" }, { value: "MAX", label: "Max" }), [
33
+ ...O,
34
+ ...o.map(({ value: l }) => {
35
+ var n, r;
36
+ return {
37
+ value: l,
38
+ label: ((n = k[l]) == null ? void 0 : n[i]) ?? l,
39
+ hint: `Shows the ${(((r = k[l]) == null ? void 0 : r[i]) ?? l).toLowerCase()} of the rows the filters keep.`
40
+ };
41
+ })
42
+ ];
43
+ }
44
+ function z(e) {
45
+ return h(e) ? "calculation" : y(e.dataType) === "number" ? E(y(e.dataType)) : "only";
46
+ }
47
+ function b(e) {
48
+ return e !== "only" && e !== "first" && e !== "list";
49
+ }
50
+ function B(e) {
51
+ return e.mode !== "data" || !e.field || !b(e.get) ? !1 : e.get === "COUNT" || e.get === "DISTINCT" ? !0 : y(e.field.dataType) === "number";
52
+ }
53
+ function G() {
54
+ var e, t;
55
+ return ((t = (e = globalThis.crypto) == null ? void 0 : e.randomUUID) == null ? void 0 : t.call(e).replace(/-/g, "").slice(0, 10)) ?? Math.random().toString(36).slice(2, 12);
56
+ }
57
+ function V() {
58
+ return `var_${G()}`;
59
+ }
60
+ function K() {
61
+ return { id: V(), name: "", mode: "data", sql: "", get: "only", sortDirection: "asc" };
62
+ }
63
+ const _ = {
64
+ id: "catalog",
65
+ name: "catalog",
66
+ label: "catalog",
67
+ derivedLabel: "catalog",
68
+ alias: "catalog",
69
+ sourceField: "catalog",
70
+ source: "catalog",
71
+ qualifiedFieldName: "catalog",
72
+ dataType: "catalog",
73
+ nativeDataType: "catalog",
74
+ description: "catalog",
75
+ qualifiedEntityName: "catalog",
76
+ dateFormat: "catalog",
77
+ customFormat: "catalog",
78
+ granularity: "catalog",
79
+ entityId: "catalog",
80
+ entityName: "catalog",
81
+ entityType: "catalog",
82
+ expression: "catalog",
83
+ calculatedFormula: "catalog",
84
+ derivedField: "catalog",
85
+ format: "catalog",
86
+ semanticTemporalPresentation: "catalog",
87
+ calculationRepresentation: "catalog",
88
+ calculatedFieldOrigin: "catalog",
89
+ labelOrigin: "catalog",
90
+ formatOrigin: "catalog",
91
+ fieldScope: "catalog",
92
+ timeDrillPath: "catalog",
93
+ aliasTemplate: "catalog",
94
+ valueAliases: "catalog",
95
+ isPreAggregated: "catalog",
96
+ role: "shelf",
97
+ aggregate: "shelf",
98
+ aggregateOrigin: "shelf",
99
+ semanticAggregate: "shelf",
100
+ effectiveAggregate: "shelf",
101
+ aggregateSource: "shelf",
102
+ comparison: "shelf",
103
+ comparisonPolarity: "shelf",
104
+ semanticComparisonPolarity: "shelf",
105
+ parameters: "shelf",
106
+ direction: "shelf"
107
+ };
108
+ function T(e) {
109
+ return Object.fromEntries(
110
+ Object.entries(e).filter(([t]) => _[t] !== "shelf")
111
+ );
112
+ }
113
+ function Q(e) {
114
+ var g, u, m, d, p;
115
+ const { query: t, get: a } = e, i = t.config ?? {}, o = (g = i.metricColumns) == null ? void 0 : g[0], l = (u = i.groupByColumns) == null ? void 0 : u[0], n = (m = i.sortByColumns) == null ? void 0 : m[0], r = n ? T(o && n.id === o.id ? o : n) : void 0, s = (d = t.sql) != null && d.trim() ? t.sql : "";
116
+ return {
117
+ id: e.id,
118
+ name: e.name,
119
+ ...e.label ? { label: e.label } : {},
120
+ mode: s ? "sql" : "data",
121
+ dataSource: t.dataSource,
122
+ connectionId: t.connectionId,
123
+ sql: s,
124
+ field: o && a.kind === "aggregate" ? T(o) : l ? T(l) : void 0,
125
+ get: a.kind === "aggregate" ? h(o) ? "calculation" : (o == null ? void 0 : o.aggregate) ?? "SUM" : a.kind,
126
+ sortField: r,
127
+ sortDirection: (n == null ? void 0 : n.direction) ?? "asc",
128
+ ...a.kind === "list" ? { listLimit: a.limit, listSeparator: a.separator } : {},
129
+ conditions: i.filters ?? null,
130
+ calculatedFields: t.calculatedFields,
131
+ presentation: e.presentation,
132
+ emptyText: e.emptyText,
133
+ ...a.kind === "aggregate" && ((p = o == null ? void 0 : o.comparison) == null ? void 0 : p.mode) === "explicit" ? { comparison: o.comparison } : {}
134
+ };
135
+ }
136
+ function P(e, t) {
137
+ var n;
138
+ const a = t.name.trim();
139
+ if (a) return a;
140
+ const i = (n = t.label) != null && n.trim() ? v(t.label) : t.field ? v(t.field.name || t.field.label) : t.mode === "sql" ? "sql_value" : "variable", o = new Set(
141
+ N(
142
+ e,
143
+ { source: "dataVariable", variableId: t.id },
144
+ { cardInputs: "taken" }
145
+ )
146
+ );
147
+ let l = i;
148
+ for (let r = 2; o.has(l); r += 1) l = `${i}_${r}`;
149
+ return l;
150
+ }
151
+ function Y(e, t) {
152
+ var g, u, m, d, p, f, F, I;
153
+ const a = P(t, e), i = {
154
+ id: e.id,
155
+ name: a,
156
+ ...(g = e.label) != null && g.trim() ? { label: e.label.trim() } : {},
157
+ ...e.presentation ? { presentation: e.presentation } : {},
158
+ ...(u = e.emptyText) != null && u.trim() ? { emptyText: e.emptyText } : {}
159
+ };
160
+ if (e.mode === "sql")
161
+ return {
162
+ ...i,
163
+ query: {
164
+ ...e.connectionId ? { connectionId: e.connectionId } : {},
165
+ ...e.dataSource ? { dataSource: e.dataSource } : {},
166
+ sql: e.sql
167
+ },
168
+ get: e.get === "first" ? { kind: "first" } : { kind: "only" }
169
+ };
170
+ const o = ((m = e.dataSource) == null ? void 0 : m.connectionId) || ((f = (p = (d = e.dataSource) == null ? void 0 : d.selectedEntities) == null ? void 0 : p[0]) == null ? void 0 : f.connectionId), l = {
171
+ ...o ? { connectionId: o } : {},
172
+ ...e.dataSource ? { dataSource: e.dataSource } : {},
173
+ ...(F = e.calculatedFields) != null && F.length ? { calculatedFields: e.calculatedFields } : {},
174
+ config: {
175
+ ...e.conditions ? { filters: e.conditions } : {}
176
+ }
177
+ }, n = l.config, r = e.field;
178
+ let s;
179
+ if (!r)
180
+ s = b(e.get) ? { kind: "aggregate" } : { kind: e.get };
181
+ else if (b(e.get)) {
182
+ const { comparison: S, ...c } = C(r, e.get);
183
+ n.metricColumns = [
184
+ ((I = e.comparison) == null ? void 0 : I.mode) === "explicit" && e.comparison.spec.kind !== "target" && B(e) ? { ...c, comparison: e.comparison } : c
185
+ ], s = { kind: "aggregate" };
186
+ } else if (h(r))
187
+ n.metricColumns = [C(r, "calculation")], s = { kind: "aggregate" };
188
+ else if (n.groupByColumns = [U(r)], e.get === "list" ? s = {
189
+ kind: "list",
190
+ ...e.listLimit ? { limit: e.listLimit } : {},
191
+ ...e.listSeparator !== void 0 && e.listSeparator !== ", " ? { separator: e.listSeparator } : {}
192
+ } : s = { kind: e.get }, e.get !== "only") {
193
+ const S = e.sortField ?? r;
194
+ if (R(S, r)) {
195
+ const c = n.groupByColumns[0];
196
+ n.sortByColumns = [{ ...c, role: "sortby", direction: e.sortDirection }];
197
+ } else {
198
+ const c = C(S, e.sortDirection === "desc" ? "MAX" : "MIN");
199
+ n.metricColumns = [c], n.sortByColumns = [{ ...c, role: "sortby", direction: e.sortDirection }];
200
+ }
201
+ }
202
+ return { ...i, query: l, get: s };
203
+ }
204
+ function C(e, t) {
205
+ const a = A(e, "metrics", [], q("metrics", e));
206
+ return h(e) || t === "calculation" || !b(t) ? a : {
207
+ ...a,
208
+ ...x(a, t, "explicit"),
209
+ ...L(a, w(e.name, t))
210
+ };
211
+ }
212
+ function U(e) {
213
+ const t = A(e, "groupBy", [], q("groupBy", e));
214
+ if (e.granularity || !("granularity" in t)) return t;
215
+ const { granularity: a, ...i } = t;
216
+ return i;
217
+ }
218
+ function R(e, t) {
219
+ return e.name === t.name && (e.qualifiedEntityName ?? e.entityName ?? "") === (t.qualifiedEntityName ?? t.entityName ?? "");
220
+ }
221
+ function J(e) {
222
+ var t, a;
223
+ if (e.mode === "sql")
224
+ return e.connectionId ? e.sql.trim() ? void 0 : "Write the SQL that returns the value." : "Choose a connection.";
225
+ if (!((a = (t = e.dataSource) == null ? void 0 : t.selectedEntities) != null && a.length)) return "Choose a source.";
226
+ if (!e.field) return "Choose a field.";
227
+ }
228
+ export {
229
+ _ as S,
230
+ H as a,
231
+ Q as b,
232
+ B as c,
233
+ z as d,
234
+ K as e,
235
+ P as f,
236
+ J as g,
237
+ b as i,
238
+ V as n,
239
+ h as o,
240
+ Y as v
241
+ };
@@ -1,5 +1,5 @@
1
- import { D as o } from "../chunks/dashboard-DfYsASNd.js";
2
- import { C as s, E as C } from "../chunks/bookmark-state-CWeoGbrx.js";
1
+ import { D as o } from "../chunks/dashboard-CtIfxycc.js";
2
+ import { C as s, E as C } from "../chunks/bookmark-state-ByODVqee.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
5
5
  o as Dashboard,