react-semaphor 0.1.464 → 0.1.466

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 (96) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +132 -130
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{analyze-result-contract-DROq4vgY.js → analyze-result-contract-CMZDRRwo.js} +1 -1
  8. package/dist/chunks/{analyze-result-contract-DSGoFuXQ.cjs → analyze-result-contract-CMwVg9w2.cjs} +1 -1
  9. package/dist/chunks/{common-types-BHVKgxRR.js → common-types-Co766x6t.js} +1 -1
  10. package/dist/chunks/{common-types-BcV9PD9D.cjs → common-types-o3LJcrpg.cjs} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-CTozRa6c.js → dashboard-briefing-launcher-C_Iy9yvg.js} +9 -9
  12. package/dist/chunks/{dashboard-briefing-launcher-BSMtcAgE.cjs → dashboard-briefing-launcher-DbLc4VV9.cjs} +1 -1
  13. package/dist/chunks/{dashboard-controls-wuo6PrDm.js → dashboard-controls-C25Pk_CY.js} +9 -9
  14. package/dist/chunks/{dashboard-controls-CmK7U1hI.cjs → dashboard-controls-Rotbld-z.cjs} +1 -1
  15. package/dist/chunks/{dashboard-filter-value-compatibility-KXIyvbhc.js → dashboard-filter-value-compatibility-B8ynE_O1.js} +255 -240
  16. package/dist/chunks/dashboard-filter-value-compatibility-Bnl2lsng.cjs +1 -0
  17. package/dist/chunks/{dashboard-input-contract-BkRFQ7Tq.cjs → dashboard-input-contract-12mPNhCF.cjs} +1 -1
  18. package/dist/chunks/{dashboard-input-contract-D5dxTWJ5.js → dashboard-input-contract-Px64VWBL.js} +1 -1
  19. package/dist/chunks/{dashboard-json-C9qvau-c.js → dashboard-json-DjMbADzW.js} +7 -7
  20. package/dist/chunks/{dashboard-json-7BQDKnHy.cjs → dashboard-json-LeJ0JD4L.cjs} +1 -1
  21. package/dist/chunks/{edit-dashboard-visual-CHlsiGOo.js → edit-dashboard-visual-BDNcPoBS.js} +2727 -2709
  22. package/dist/chunks/{edit-dashboard-visual-BSWdyT4u.cjs → edit-dashboard-visual-ryv-jOUA.cjs} +14 -14
  23. package/dist/chunks/{editor-action-buttons-B0o-qU4l.js → editor-action-buttons-CFDC0po3.js} +6 -6
  24. package/dist/chunks/{editor-action-buttons-DMnbVoBJ.cjs → editor-action-buttons-lBwd5Stw.cjs} +1 -1
  25. package/dist/chunks/{index-De_7nrwb.js → index-BlCnNcaB.js} +9 -9
  26. package/dist/chunks/{index-DQvtZ1gG.js → index-Bs9OvwM2.js} +29357 -29207
  27. package/dist/chunks/{index-DjjKJPDy.cjs → index-CQN-X1jN.cjs} +1 -1
  28. package/dist/chunks/{index-DqMJN4lZ.cjs → index-UKhl24L_.cjs} +164 -164
  29. package/dist/chunks/{matrix-result-contract-BTpPuHOc.js → matrix-result-contract-DQ9_UadF.js} +3 -3
  30. package/dist/chunks/{matrix-result-contract-ZRNfeIbI.cjs → matrix-result-contract-DiHDIyQk.cjs} +1 -1
  31. package/dist/chunks/{pivot-header-presentation-DW0gKG8g.js → pivot-header-presentation-CSf6CyOt.js} +2 -2
  32. package/dist/chunks/{pivot-header-presentation-BijPbP33.cjs → pivot-header-presentation-DyV0iOZ_.cjs} +1 -1
  33. package/dist/chunks/{pivot-result-identity-Z9tN2tEV.js → pivot-result-identity-BvT51Nog.js} +1 -1
  34. package/dist/chunks/{pivot-result-identity-DxHtiKVj.cjs → pivot-result-identity-gsOwOjHi.cjs} +1 -1
  35. package/dist/chunks/{pivot-result-lifecycle-g2U-vzQb.js → pivot-result-lifecycle--NNNPUtG.js} +7 -7
  36. package/dist/chunks/{pivot-result-lifecycle-BXzIlQVu.cjs → pivot-result-lifecycle-CEfU43GZ.cjs} +1 -1
  37. package/dist/chunks/{raw-temporal-contract-UtAqoOZO.js → raw-temporal-contract-BqVMduCs.js} +1 -1
  38. package/dist/chunks/{raw-temporal-contract-DfAvqNMo.cjs → raw-temporal-contract-UdblxoVB.cjs} +1 -1
  39. package/dist/chunks/{report-preferences-dialog-CkKbfjRg.cjs → report-preferences-dialog-DzUi-b9O.cjs} +1 -1
  40. package/dist/chunks/{report-preferences-dialog-BP4YC4D_.js → report-preferences-dialog-JCUuGAtd.js} +6 -6
  41. package/dist/chunks/{report-runtime-context-C0NfLPfc.cjs → report-runtime-context-CLtzrZdC.cjs} +1 -1
  42. package/dist/chunks/{report-runtime-context-CNncA3VD.js → report-runtime-context-CrTzKt0C.js} +1 -1
  43. package/dist/chunks/{saved-temporal-bucket-format-3QKveR3v.cjs → saved-temporal-bucket-format-Ca4hUfTo.cjs} +1 -1
  44. package/dist/chunks/{saved-temporal-bucket-format-Dd2eixTH.js → saved-temporal-bucket-format-DfqnCGCz.js} +3 -3
  45. package/dist/chunks/{switch-G_-UwdXX.js → switch-B6rFVSdw.js} +2942 -2892
  46. package/dist/chunks/{switch-CNqDn5b8.cjs → switch-BghC7eOM.cjs} +11 -11
  47. package/dist/chunks/{temporal-bucket-pMfghsLX.cjs → temporal-bucket-BDRcWdVv.cjs} +1 -1
  48. package/dist/chunks/{temporal-bucket-C85rmFmC.js → temporal-bucket-DFYIkexB.js} +18 -18
  49. package/dist/chunks/{temporal-bucket-authoring-BK1UhYpD.cjs → temporal-bucket-authoring-C6sZAVqS.cjs} +1 -1
  50. package/dist/chunks/{temporal-bucket-authoring-1fZuPAVb.js → temporal-bucket-authoring-ZxFzhTmL.js} +12 -12
  51. package/dist/chunks/{temporal-bucket-contract-DXXNZssK.js → temporal-bucket-contract-COPPwwbi.js} +1 -1
  52. package/dist/chunks/{temporal-bucket-contract-xFkvboaw.cjs → temporal-bucket-contract-vrOkax-r.cjs} +1 -1
  53. package/dist/chunks/{token-types-BYYO109W.cjs → token-types-DALtlgbG.cjs} +1 -1
  54. package/dist/chunks/{token-types-BLxc7UwR.js → token-types-p1M3SA2G.js} +1 -1
  55. package/dist/chunks/{update-policy-CB8XJIoY.js → update-policy-BKOA5S76.js} +1 -1
  56. package/dist/chunks/{update-policy-DMjjGjQY.cjs → update-policy-Cyufdviq.cjs} +1 -1
  57. package/dist/chunks/{validators-DVd8s3qY.js → validators-CCpBY1e0.js} +824 -788
  58. package/dist/chunks/validators-DO-YuzgO.cjs +1 -0
  59. package/dist/dashboard/index.cjs +1 -1
  60. package/dist/dashboard/index.js +2 -2
  61. package/dist/dashboard-authoring/index.cjs +2 -2
  62. package/dist/dashboard-authoring/index.js +6 -5
  63. package/dist/data-app-builder/index.cjs +1 -1
  64. package/dist/data-app-builder/index.js +2 -2
  65. package/dist/data-app-codegen/index.cjs +1 -1
  66. package/dist/data-app-codegen/index.js +2 -2
  67. package/dist/data-app-codegen-node/index.cjs +1 -1
  68. package/dist/data-app-codegen-node/index.js +3 -3
  69. package/dist/data-app-sdk/index.cjs +1 -1
  70. package/dist/data-app-sdk/index.js +3 -3
  71. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  72. package/dist/data-app-sdk-adapters/index.js +2 -2
  73. package/dist/data-app-sdk-validation/index.cjs +1 -1
  74. package/dist/data-app-sdk-validation/index.js +3 -3
  75. package/dist/format-utils/index.cjs +1 -1
  76. package/dist/format-utils/index.js +15 -15
  77. package/dist/index.cjs +1 -1
  78. package/dist/index.js +14 -14
  79. package/dist/report-runtime-context/index.cjs +1 -1
  80. package/dist/report-runtime-context/index.js +2 -2
  81. package/dist/surfboard/index.cjs +1 -1
  82. package/dist/surfboard/index.js +3 -3
  83. package/dist/types/analytics-protocol.d.ts +15 -0
  84. package/dist/types/briefings.d.ts +1 -0
  85. package/dist/types/dashboard-assistant.d.ts +1 -0
  86. package/dist/types/dashboard-authoring.d.ts +15 -1
  87. package/dist/types/dashboard.d.ts +1 -0
  88. package/dist/types/index.cjs +1 -1
  89. package/dist/types/index.js +4 -4
  90. package/dist/types/main.d.ts +2 -1
  91. package/dist/types/shared.d.ts +1 -0
  92. package/dist/types/surfboard.d.ts +1 -0
  93. package/dist/types/types.d.ts +1 -0
  94. package/package.json +1 -1
  95. package/dist/chunks/dashboard-filter-value-compatibility-UapptYnn.cjs +0 -1
  96. package/dist/chunks/validators-dJlwubP4.cjs +0 -1
@@ -1,169 +1,183 @@
1
1
  var O = Object.defineProperty;
2
- var z = (e, n, i) => n in e ? O(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
- var w = (e, n, i) => z(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { af as p, ah as M, j as N, C as E, F as D } from "./validators-DVd8s3qY.js";
5
- import "./analyze-result-contract-DROq4vgY.js";
2
+ var M = (e, n, i) => n in e ? O(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
+ var w = (e, n, i) => M(e, typeof n != "symbol" ? n + "" : n, i);
4
+ import { ah as h, aj as S, j as N, ag as q, C as I, F as D } from "./validators-CCpBY1e0.js";
5
+ import "./analyze-result-contract-CMZDRRwo.js";
6
6
  import "../value-format-preferences/index.js";
7
- function h(e) {
7
+ function p(e) {
8
8
  return !!e && typeof e == "object" && !Array.isArray(e);
9
9
  }
10
- function v(e) {
11
- return h(e) && typeof e.name == "string";
10
+ function E(e) {
11
+ return p(e) && typeof e.name == "string";
12
12
  }
13
- function $(e) {
14
- return !h(e) || e.kind !== "semantic" && e.kind !== "physical" || (e.kind === "semantic" ? [e.datasetId, e.datasetName, e.connectionId] : [e.databaseName, e.schemaName]).some(
13
+ function _(e) {
14
+ return !p(e) || e.kind !== "semantic" && e.kind !== "physical" || (e.kind === "semantic" ? [e.datasetId, e.datasetName, e.connectionId] : [e.databaseName, e.schemaName]).some(
15
15
  (i) => i !== void 0 && typeof i != "string"
16
16
  ) ? !1 : N(
17
17
  e
18
18
  );
19
19
  }
20
20
  function x(e, n) {
21
- var c, d;
21
+ var c, o;
22
22
  if ((n == null ? void 0 : n.mode) !== "database" && e.type === "dataset" && "domainId" in e && e.domainId) {
23
- const s = e, a = {
23
+ const r = e, a = {
24
24
  kind: "semantic",
25
- domainId: s.domainId,
26
- datasetId: s.id,
27
- datasetName: s.name,
28
- connectionId: s.connectionId || (n == null ? void 0 : n.connectionId),
29
- label: s.label
25
+ domainId: r.domainId,
26
+ datasetId: r.id,
27
+ datasetName: r.name,
28
+ connectionId: r.connectionId || (n == null ? void 0 : n.connectionId),
29
+ label: r.label
30
30
  };
31
- return $(a) ? a : void 0;
31
+ return _(a) ? q(a) : void 0;
32
32
  }
33
- const i = e.connectionId || (n == null ? void 0 : n.connectionId), o = e.type === "dataset" && "table" in e && e.table ? e.table : e.name;
34
- if (!i || !o)
33
+ const i = e.connectionId || (n == null ? void 0 : n.connectionId), d = e.type === "dataset" && "table" in e && e.table ? e.table : e.name;
34
+ if (!i || !d)
35
35
  return;
36
36
  const t = {
37
37
  kind: "physical",
38
38
  connectionId: i,
39
39
  connectionType: e.connectionType || (n == null ? void 0 : n.connectionType),
40
- tableName: o,
40
+ tableName: d,
41
41
  databaseName: e.database || ((c = n == null ? void 0 : n.dbSelection) == null ? void 0 : c.database),
42
- schemaName: e.schema || ((d = n == null ? void 0 : n.dbSelection) == null ? void 0 : d.schema),
42
+ schemaName: e.schema || ((o = n == null ? void 0 : n.dbSelection) == null ? void 0 : o.schema),
43
43
  dialect: e.dialect
44
44
  };
45
- return $(t) ? t : void 0;
45
+ return _(t) ? t : void 0;
46
46
  }
47
- function S(e, n) {
48
- var s, a;
47
+ function H(e, n) {
48
+ var r, a;
49
49
  const i = x(e, n);
50
50
  if (!i) return;
51
- const o = e.type === "dataset" && "table" in e && typeof e.table == "string" ? e.table.trim() : void 0, t = i.kind === "physical" ? i.tableName : o, c = e.connectionId || (n == null ? void 0 : n.connectionId), d = t && c ? {
51
+ const d = e.type === "dataset" && "table" in e && typeof e.table == "string" ? e.table.trim() : void 0, t = i.kind === "physical" ? i.tableName : d, c = e.connectionId || (n == null ? void 0 : n.connectionId), o = t && c ? {
52
52
  connectionId: c,
53
- databaseName: e.database || ((s = n == null ? void 0 : n.dbSelection) == null ? void 0 : s.database),
53
+ databaseName: e.database || ((r = n == null ? void 0 : n.dbSelection) == null ? void 0 : r.database),
54
54
  schemaName: e.schema || ((a = n == null ? void 0 : n.dbSelection) == null ? void 0 : a.schema),
55
55
  tableName: t
56
56
  } : void 0;
57
- return { source: i, ...d ? { executionTable: d } : {} };
57
+ return { source: i, ...o ? { executionTable: o } : {} };
58
58
  }
59
- function q(e) {
60
- const n = h(e.dataSource) ? e.dataSource : void 0;
59
+ function L(e) {
60
+ const n = p(e.dataSource) ? e.dataSource : void 0;
61
61
  if (typeof e.sql == "string" && e.sql.trim()) {
62
- const d = [], s = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities : [];
63
- for (const a of s) {
64
- if (!v(a)) continue;
65
- const r = S(a, n);
66
- r && !d.some(
67
- (_) => p(
68
- _.source,
69
- r.source
62
+ const o = [], r = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities : [];
63
+ for (const a of r) {
64
+ if (!E(a)) continue;
65
+ const s = H(a, n);
66
+ s && !o.some(
67
+ (F) => h(
68
+ F.source,
69
+ s.source
70
70
  )
71
- ) && d.push(r);
71
+ ) && o.push(s);
72
72
  }
73
73
  return {
74
74
  cardId: e.id,
75
75
  kind: "sql",
76
- pinnedCatalogSources: d
76
+ pinnedCatalogSources: o
77
77
  };
78
78
  }
79
- if (!h(e.config))
79
+ if (!p(e.config))
80
80
  return { cardId: e.id, kind: "unconfigured" };
81
- const i = [], o = h(e.config.matrixIntent) ? e.config.matrixIntent : void 0, t = e.type === "matrixTable" ? (o == null ? void 0 : o.kind) === "matrix" ? o.source : e.config.source : void 0;
82
- $(t) && i.push(t);
83
- const c = h(e.config.joinPlan) ? e.config.joinPlan : void 0;
81
+ const i = [], d = p(e.config.matrixIntent) ? e.config.matrixIntent : void 0, t = e.type === "matrixTable" ? (d == null ? void 0 : d.kind) === "matrix" ? d.source : e.config.source : void 0;
82
+ _(t) && i.push(t);
83
+ const c = p(e.config.joinPlan) ? e.config.joinPlan : void 0;
84
84
  if (c) {
85
- const d = Array.isArray(c.joins) ? c.joins : [], s = [c.baseEntity];
86
- for (const a of d)
87
- h(a) && s.push(a.source, a.target);
88
- for (const a of s) {
89
- if (!v(a)) continue;
90
- const r = x(a, n);
91
- r && i.push(r);
85
+ const o = Array.isArray(c.joins) ? c.joins : [], r = [c.baseEntity];
86
+ for (const a of o)
87
+ p(a) && r.push(a.source, a.target);
88
+ for (const a of r) {
89
+ if (!E(a)) continue;
90
+ const s = x(a, n);
91
+ s && i.push(s);
92
92
  }
93
93
  } else if (e.type !== "matrixTable") {
94
- const d = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities : [];
95
- if (d.length === 1 && v(d[0])) {
96
- const s = x(d[0], n);
97
- s && i.push(s);
94
+ const o = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities : [];
95
+ if (o.length === 1 && E(o[0])) {
96
+ const r = x(o[0], n);
97
+ r && i.push(r);
98
98
  }
99
99
  }
100
100
  if (!i.length && !c && e.type !== "matrixTable") {
101
- const d = e.config.queryBaseSource;
102
- $(d) && i.push(d);
101
+ const o = e.config.queryBaseSource;
102
+ _(o) && i.push(o);
103
103
  }
104
104
  return {
105
105
  cardId: e.id,
106
106
  kind: "config",
107
- executableSources: M(i)
107
+ executableSources: S(i)
108
108
  };
109
109
  }
110
- function H(e, n) {
111
- return (e.kind === "config" ? e.executableSources : e.kind === "sql" ? e.pinnedCatalogSources.map((o) => o.source) : []).some(
112
- (o) => p(o, n)
110
+ function V(e, n) {
111
+ return (e.kind === "config" ? e.executableSources : e.kind === "sql" ? e.pinnedCatalogSources.map((d) => d.source) : []).some(
112
+ (d) => h(d, n)
113
113
  );
114
114
  }
115
- function me(e, n) {
115
+ function ge(e, n) {
116
116
  if (e.kind === "config")
117
117
  return e.executableSources.find(
118
- (i) => p(i, n)
118
+ (i) => h(i, n)
119
119
  );
120
120
  }
121
- function be(e, n) {
121
+ function he(e, n) {
122
122
  var i;
123
123
  return (i = j(e, n)) == null ? void 0 : i.source;
124
124
  }
125
125
  function j(e, n) {
126
126
  if (e.kind === "sql")
127
127
  return e.pinnedCatalogSources.find(
128
- (i) => p(i.source, n)
128
+ (i) => h(i.source, n)
129
129
  );
130
130
  }
131
131
  function P(e) {
132
132
  const n = /* @__PURE__ */ new Set();
133
133
  for (const i of [e.name, e.sourceField]) {
134
134
  if (!i) continue;
135
- const o = E(i);
136
- if (!o) continue;
137
- n.add(o);
138
- const t = o.split("."), c = t[t.length - 1];
135
+ const d = I(i);
136
+ if (!d) continue;
137
+ n.add(d);
138
+ const t = d.split("."), c = t[t.length - 1];
139
139
  c && n.add(c);
140
140
  }
141
141
  return n;
142
142
  }
143
- function L(e, n) {
144
- const i = D(e), o = D(n);
145
- return i === "unknown" || o === "unknown" ? !1 : (i === "date" || i === "datetime") && (o === "date" || o === "datetime") ? !0 : i === o;
143
+ function B(e, n) {
144
+ const i = D(e), d = D(n);
145
+ return i === "unknown" || d === "unknown" ? !1 : (i === "date" || i === "datetime") && (d === "date" || d === "datetime") ? !0 : i === d;
146
146
  }
147
147
  function U(e, n) {
148
+ return h(e.field.source, n.field.source) && I(e.field.name) === I(n.field.name) && I(e.field.sourceField || e.field.name) === I(n.field.sourceField || n.field.name);
149
+ }
150
+ function W(e, n) {
148
151
  if (e.kind !== "field") return !1;
149
- const i = P(n), o = P(e.field);
150
- return L(n.dataType, e.field.dataType) && [...o].some((t) => i.has(t));
152
+ const i = P(n), d = P(e.field);
153
+ return B(n.dataType, e.field.dataType) && [...d].some((t) => i.has(t));
151
154
  }
152
- function ge(e) {
155
+ function pe(e) {
153
156
  const n = e.candidates.filter(
154
- (i) => U(
157
+ (i) => W(
155
158
  i,
156
159
  e.logicalValueField
157
160
  )
158
161
  );
159
162
  return n.length === 1 ? { status: "matched", target: n[0] } : n.length > 1 ? { status: "ambiguous" } : { status: "notApplicable" };
160
163
  }
161
- const V = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, W = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, K = /\bwhere\b/i;
162
- function Y(e) {
163
- return e != null && e.trim() ? V.test(e) || W.test(e) : !1;
164
+ function Ie(e) {
165
+ const n = [];
166
+ for (const i of e.acceptedTargets)
167
+ !B(
168
+ e.logicalValueField.dataType,
169
+ i.field.dataType
170
+ ) || n.some(
171
+ (d) => U(d, i)
172
+ ) || n.push(i);
173
+ return n.length === 1 ? { status: "matched", target: n[0] } : n.length > 1 ? { status: "ambiguous" } : { status: "notApplicable" };
164
174
  }
165
- function he(e) {
166
- return !(e != null && e.trim()) || Y(e) ? null : K.test(e) ? {
175
+ const K = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, Y = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, G = /\bwhere\b/i;
176
+ function J(e) {
177
+ return e != null && e.trim() ? K.test(e) || Y.test(e) : !1;
178
+ }
179
+ function ye(e) {
180
+ return !(e != null && e.trim()) || J(e) ? null : G.test(e) ? {
167
181
  helper: "{{ filters | and }}",
168
182
  description: "For queries with an existing WHERE clause."
169
183
  } : {
@@ -171,19 +185,19 @@ function he(e) {
171
185
  description: "For queries without a WHERE clause."
172
186
  };
173
187
  }
174
- function G(e) {
188
+ function Q(e) {
175
189
  return (e.field.sourceField || e.field.name).trim() || void 0;
176
190
  }
177
- function pe(e) {
191
+ function $e(e) {
178
192
  if (e.inventory.kind !== "sql" || e.target.kind !== "field")
179
193
  return { status: "ineligible" };
180
194
  const n = j(
181
195
  e.inventory,
182
196
  e.target.field.source
183
- ), i = G(e.target);
197
+ ), i = Q(e.target);
184
198
  if (!n || !i) return { status: "ineligible" };
185
199
  if (n.executionTable) {
186
- const d = [
200
+ const o = [
187
201
  n.executionTable.databaseName,
188
202
  n.executionTable.schemaName,
189
203
  n.executionTable.tableName,
@@ -192,34 +206,34 @@ function pe(e) {
192
206
  return {
193
207
  status: "eligible",
194
208
  source: n.source,
195
- executionIdentifier: d
209
+ executionIdentifier: o
196
210
  };
197
211
  }
198
212
  if (e.inventory.pinnedCatalogSources.length !== 1)
199
213
  return { status: "ineligible" };
200
- const o = E(i), t = (e.candidateTargets || []).filter(
201
- (d) => E(
202
- d.field.sourceField || d.field.name
203
- ) === o
214
+ const d = I(i), t = (e.candidateTargets || []).filter(
215
+ (o) => I(
216
+ o.field.sourceField || o.field.name
217
+ ) === d
204
218
  ), c = [];
205
- for (const d of t)
219
+ for (const o of t)
206
220
  c.some(
207
- (s) => p(s, d.field.source)
208
- ) || c.push(d.field.source);
221
+ (r) => h(r, o.field.source)
222
+ ) || c.push(o.field.source);
209
223
  return c.length > 1 ? { status: "ineligible" } : {
210
224
  status: "eligible",
211
225
  source: n.source,
212
226
  executionIdentifier: i
213
227
  };
214
228
  }
215
- class J extends Error {
229
+ class X extends Error {
216
230
  constructor(i) {
217
- super(i.map((o) => o.message).join(" "));
231
+ super(i.map((d) => d.message).join(" "));
218
232
  w(this, "issues");
219
233
  this.name = "DashboardFilterMappingContractError", this.issues = i;
220
234
  }
221
235
  }
222
- const Q = {
236
+ const Z = {
223
237
  string: !0,
224
238
  number: !0,
225
239
  boolean: !0,
@@ -229,39 +243,39 @@ const Q = {
229
243
  function m(e) {
230
244
  return typeof e == "string" && e.trim().length > 0;
231
245
  }
232
- function u(e) {
246
+ function f(e) {
233
247
  return !!e && typeof e == "object" && !Array.isArray(e);
234
248
  }
235
- function y(e) {
249
+ function $(e) {
236
250
  return Array.isArray(e) && e.every((n) => typeof n == "string");
237
251
  }
238
- function X(e) {
239
- if (!u(e)) return !1;
252
+ function ee(e) {
253
+ if (!f(e)) return !1;
240
254
  switch (e.kind) {
241
255
  case "allSheets":
242
- return e.sheetKinds === void 0 || y(e.sheetKinds) && e.sheetKinds.every(
256
+ return e.sheetKinds === void 0 || $(e.sheetKinds) && e.sheetKinds.every(
243
257
  (n) => n === "dashboard" || n === "document"
244
258
  );
245
259
  case "sheets":
246
- return y(e.sheetIds);
260
+ return $(e.sheetIds);
247
261
  case "cards":
248
- return y(e.cardIds);
262
+ return $(e.cardIds);
249
263
  case "documentSections":
250
- return m(e.sheetId) && y(e.sectionIds);
264
+ return m(e.sheetId) && $(e.sectionIds);
251
265
  default:
252
266
  return !1;
253
267
  }
254
268
  }
255
- function Z(e) {
269
+ function ne(e) {
256
270
  return e === "shared" || e === "perSheet" || e === "perCard" || e === "perDocumentSection";
257
271
  }
258
- function ee(e) {
259
- return u(e) ? m(e.id) && m(e.column) && m(e.dataType) : !1;
272
+ function ie(e) {
273
+ return f(e) ? m(e.id) && m(e.column) && m(e.dataType) : !1;
260
274
  }
261
- function ne(e, n, i, o) {
262
- var s;
263
- if (!u(n)) {
264
- o.push({
275
+ function te(e, n, i, d) {
276
+ var r;
277
+ if (!f(n)) {
278
+ d.push({
265
279
  code: "invalid_option_source",
266
280
  path: i,
267
281
  message: `${i} must be a semantic or physical option source.`,
@@ -274,8 +288,8 @@ function ne(e, n, i, o) {
274
288
  ["valueField", n.valueField],
275
289
  ["searchField", n.searchField]
276
290
  ];
277
- if (!u(t) || t.kind !== "semantic" && t.kind !== "physical" || !N(t) || !u(n.labelField) || !u(n.valueField) || n.searchField !== void 0 && !u(n.searchField) || n.disambiguationFields !== void 0 && (!Array.isArray(n.disambiguationFields) || !n.disambiguationFields.every(u))) {
278
- o.push({
291
+ if (!f(t) || t.kind !== "semantic" && t.kind !== "physical" || !N(t) || !f(n.labelField) || !f(n.valueField) || n.searchField !== void 0 && !f(n.searchField) || n.disambiguationFields !== void 0 && (!Array.isArray(n.disambiguationFields) || !n.disambiguationFields.every(f))) {
292
+ d.push({
279
293
  code: "invalid_option_source",
280
294
  path: i,
281
295
  message: `${i} must contain a valid semantic or physical source and field references.`,
@@ -283,45 +297,45 @@ function ne(e, n, i, o) {
283
297
  });
284
298
  return;
285
299
  }
286
- for (const [a, r] of c)
287
- r !== void 0 && u(r) && (!m(r.name) || r.source !== void 0 && !p(
288
- r.source,
300
+ for (const [a, s] of c)
301
+ s !== void 0 && f(s) && (!m(s.name) || s.source !== void 0 && !h(
302
+ s.source,
289
303
  t
290
- )) && o.push({
304
+ )) && d.push({
291
305
  code: "invalid_option_source",
292
306
  path: `${i}.${a}`,
293
307
  message: `${i}.${a} must be a named field belonging to the declared option source.`,
294
308
  inputId: e
295
309
  });
296
- for (const [a, r] of ((s = n.disambiguationFields) == null ? void 0 : s.entries()) || [])
297
- (!u(r) || !m(r.name) || r.source !== void 0 && !p(
298
- r.source,
310
+ for (const [a, s] of ((r = n.disambiguationFields) == null ? void 0 : r.entries()) || [])
311
+ (!f(s) || !m(s.name) || s.source !== void 0 && !h(
312
+ s.source,
299
313
  t
300
- )) && o.push({
314
+ )) && d.push({
301
315
  code: "invalid_option_source",
302
316
  path: `${i}.disambiguationFields[${a}]`,
303
317
  message: `${i}.disambiguationFields[${a}] must be a named field belonging to the declared option source.`,
304
318
  inputId: e
305
319
  });
306
- const d = n.valueField;
320
+ const o = n.valueField;
307
321
  ["string", "number", "boolean", "date", "datetime"].includes(
308
- String(d.dataType)
309
- ) || o.push({
322
+ String(o.dataType)
323
+ ) || d.push({
310
324
  code: "invalid_option_source",
311
325
  path: `${i}.valueField.dataType`,
312
326
  message: `${i}.valueField.dataType must be a known option-value datatype.`,
313
327
  inputId: e
314
328
  });
315
329
  }
316
- function ie(e, n, i, o, t, c) {
317
- var r;
330
+ function se(e, n, i, d, t, c) {
331
+ var s;
318
332
  if (m(n.bindingId) || t.push({
319
333
  code: "invalid_binding_id",
320
334
  path: `${i}.bindingId`,
321
335
  message: `${i}.bindingId must be an opaque non-empty id.`,
322
336
  inputId: e,
323
337
  cardId: n.cardId
324
- }), ((r = n.target) == null ? void 0 : r.kind) !== "field") {
338
+ }), ((s = n.target) == null ? void 0 : s.kind) !== "field") {
325
339
  t.push({
326
340
  code: "unsupported_target",
327
341
  path: `${i}.target`,
@@ -332,8 +346,8 @@ function ie(e, n, i, o, t, c) {
332
346
  });
333
347
  return;
334
348
  }
335
- const d = n.target.field;
336
- if (!m(d == null ? void 0 : d.name) || !d.source || d.source.kind !== "semantic" && d.source.kind !== "physical" || !N(d.source)) {
349
+ const o = n.target.field;
350
+ if (!m(o == null ? void 0 : o.name) || !o.source || o.source.kind !== "semantic" && o.source.kind !== "physical" || !N(o.source)) {
337
351
  t.push({
338
352
  code: "invalid_target_field",
339
353
  path: `${i}.target.field`,
@@ -345,8 +359,8 @@ function ie(e, n, i, o, t, c) {
345
359
  return;
346
360
  }
347
361
  if (Object.prototype.hasOwnProperty.call(
348
- Q,
349
- d.dataType
362
+ Z,
363
+ o.dataType
350
364
  ) || t.push({
351
365
  code: "unknown_target_data_type",
352
366
  path: `${i}.target.field.dataType`,
@@ -354,7 +368,7 @@ function ie(e, n, i, o, t, c) {
354
368
  inputId: e,
355
369
  cardId: n.cardId,
356
370
  bindingId: n.bindingId
357
- }), d.sourceField !== void 0 && !m(d.sourceField) && t.push({
371
+ }), o.sourceField !== void 0 && !m(o.sourceField) && t.push({
358
372
  code: "invalid_target_field",
359
373
  path: `${i}.target.field.sourceField`,
360
374
  message: `${i}.target.field.sourceField must be a non-empty catalog-grounded column when provided.`,
@@ -362,8 +376,8 @@ function ie(e, n, i, o, t, c) {
362
376
  cardId: n.cardId,
363
377
  bindingId: n.bindingId
364
378
  }), !c) return;
365
- const s = o.get(n.cardId);
366
- if (!s) {
379
+ const r = d.get(n.cardId);
380
+ if (!r) {
367
381
  t.push({
368
382
  code: "unknown_card",
369
383
  path: `${i}.cardId`,
@@ -374,19 +388,19 @@ function ie(e, n, i, o, t, c) {
374
388
  });
375
389
  return;
376
390
  }
377
- const a = q(s);
378
- (a.kind === "unconfigured" || !H(a, d.source)) && t.push({
391
+ const a = L(r);
392
+ (a.kind === "unconfigured" || !V(a, o.source)) && t.push({
379
393
  code: "unavailable_card_source",
380
394
  path: `${i}.target.field.source`,
381
- message: `${i}.target field source is not declared by card '${s.id}'.`,
395
+ message: `${i}.target field source is not declared by card '${r.id}'.`,
382
396
  inputId: e,
383
- cardId: s.id,
397
+ cardId: r.id,
384
398
  bindingId: n.bindingId
385
399
  });
386
400
  }
387
- function te(e, n, i, o, t, c) {
401
+ function re(e, n, i, d, t, c) {
388
402
  if (n === void 0) return;
389
- if (!u(n) || n.kind !== "cardMappings" || !Array.isArray(n.cards)) {
403
+ if (!f(n) || n.kind !== "cardMappings" || !Array.isArray(n.cards)) {
390
404
  t.push({
391
405
  code: "invalid_application",
392
406
  path: i,
@@ -395,141 +409,141 @@ function te(e, n, i, o, t, c) {
395
409
  });
396
410
  return;
397
411
  }
398
- const d = /* @__PURE__ */ new Set();
399
- n.cards.forEach((s, a) => {
400
- const r = `${i}.cards[${a}]`;
401
- if (!m(s == null ? void 0 : s.cardId)) {
412
+ const o = /* @__PURE__ */ new Set();
413
+ n.cards.forEach((r, a) => {
414
+ const s = `${i}.cards[${a}]`;
415
+ if (!m(r == null ? void 0 : r.cardId)) {
402
416
  t.push({
403
417
  code: "unknown_card",
404
- path: `${r}.cardId`,
405
- message: `${r}.cardId is required.`,
418
+ path: `${s}.cardId`,
419
+ message: `${s}.cardId is required.`,
406
420
  inputId: e
407
421
  });
408
422
  return;
409
423
  }
410
- if (d.has(s.cardId)) {
424
+ if (o.has(r.cardId)) {
411
425
  t.push({
412
426
  code: "duplicate_card_application",
413
- path: `${r}.cardId`,
414
- message: `${i} contains more than one entry for card '${s.cardId}'.`,
427
+ path: `${s}.cardId`,
428
+ message: `${i} contains more than one entry for card '${r.cardId}'.`,
415
429
  inputId: e,
416
- cardId: s.cardId
430
+ cardId: r.cardId
417
431
  });
418
432
  return;
419
433
  }
420
- if (d.add(s.cardId), c && !o.has(s.cardId)) {
434
+ if (o.add(r.cardId), c && !d.has(r.cardId)) {
421
435
  t.push({
422
436
  code: "unknown_card",
423
- path: `${r}.cardId`,
424
- message: `${r}.cardId '${s.cardId}' does not exist.`,
437
+ path: `${s}.cardId`,
438
+ message: `${s}.cardId '${r.cardId}' does not exist.`,
425
439
  inputId: e,
426
- cardId: s.cardId
440
+ cardId: r.cardId
427
441
  });
428
442
  return;
429
443
  }
430
- s.kind === "bound" ? ie(
444
+ r.kind === "bound" ? se(
431
445
  e,
432
- s,
433
446
  r,
434
- o,
447
+ s,
448
+ d,
435
449
  t,
436
450
  c
437
- ) : s.kind !== "excluded" && t.push({
451
+ ) : r.kind !== "excluded" && t.push({
438
452
  code: "invalid_application",
439
- path: r,
440
- message: `${r}.kind must be 'bound' or 'excluded'.`,
453
+ path: s,
454
+ message: `${s}.kind must be 'bound' or 'excluded'.`,
441
455
  inputId: e,
442
- cardId: s.cardId
456
+ cardId: r.cardId
443
457
  });
444
458
  });
445
459
  }
446
- function re({
460
+ function oe({
447
461
  inputs: e,
448
462
  dashboardFilters: n,
449
463
  cards: i = [],
450
- validateCardTargets: o = !1
464
+ validateCardTargets: d = !1
451
465
  }) {
452
466
  const t = [], c = new Map(
453
- (n || []).map((r) => [r.id, r])
454
- ), d = new Map(
455
- o ? i.map((r) => [r.id, r]) : []
456
- ), s = [], a = /* @__PURE__ */ new Map();
467
+ (n || []).map((s) => [s.id, s])
468
+ ), o = new Map(
469
+ d ? i.map((s) => [s.id, s]) : []
470
+ ), r = [], a = /* @__PURE__ */ new Map();
457
471
  return e != null && !Array.isArray(e) ? (t.push({
458
472
  code: "invalid_input",
459
473
  path: "dashboard.inputs",
460
474
  message: "dashboard.inputs must be an array when present."
461
- }), { ok: !1, inputs: s, issues: t }) : ((Array.isArray(e) ? e : []).forEach((r, _) => {
462
- const f = `dashboard.inputs[${_}]`;
463
- if (!u(r) || r.kind !== "filter" && r.kind !== "control" || !m(r.id) || !m(r.label) || !m(r.variableName) || !X(r.scope) || !Z(r.runtimeScope)) {
475
+ }), { ok: !1, inputs: r, issues: t }) : ((Array.isArray(e) ? e : []).forEach((s, F) => {
476
+ const u = `dashboard.inputs[${F}]`;
477
+ if (!f(s) || s.kind !== "filter" && s.kind !== "control" || !m(s.id) || !m(s.label) || !m(s.variableName) || !ee(s.scope) || !ne(s.runtimeScope)) {
464
478
  t.push({
465
479
  code: "invalid_input",
466
- path: f,
467
- message: `${f} must be a complete filter or control Dashboard Input envelope.`,
468
- inputId: u(r) && typeof r.id == "string" ? r.id : void 0
480
+ path: u,
481
+ message: `${u} must be a complete filter or control Dashboard Input envelope.`,
482
+ inputId: f(s) && typeof s.id == "string" ? s.id : void 0
469
483
  });
470
484
  return;
471
485
  }
472
- if (r.kind === "control" && !u(r.control)) {
486
+ if (s.kind === "control" && !f(s.control)) {
473
487
  t.push({
474
488
  code: "invalid_input",
475
- path: `${f}.control`,
476
- message: `${f}.control must be a control definition.`,
477
- inputId: r.id
489
+ path: `${u}.control`,
490
+ message: `${u}.control must be a control definition.`,
491
+ inputId: s.id
478
492
  });
479
493
  return;
480
494
  }
481
- const l = r;
495
+ const l = s;
482
496
  if (l.kind === "control") {
483
- s.push(l);
497
+ r.push(l);
484
498
  return;
485
499
  }
486
- const F = l.filter, g = l.filterReference, I = F !== void 0, R = !!g;
487
- if (I && R) {
500
+ const T = l.filter, g = l.filterReference, y = T !== void 0, R = !!g;
501
+ if (y && R) {
488
502
  t.push({
489
503
  code: "both_filter_definitions",
490
- path: f,
491
- message: `${f} must contain either filter or filterReference, not both.`,
504
+ path: u,
505
+ message: `${u} must contain either filter or filterReference, not both.`,
492
506
  inputId: l.id
493
507
  });
494
508
  return;
495
509
  }
496
- if (!I && !R) {
510
+ if (!y && !R) {
497
511
  t.push({
498
512
  code: "missing_filter_definition",
499
- path: f,
500
- message: `${f} must contain filter or filterReference.`,
513
+ path: u,
514
+ message: `${u} must contain filter or filterReference.`,
501
515
  inputId: l.id
502
516
  });
503
517
  return;
504
518
  }
505
- if (I && !ee(F)) {
519
+ if (y && !ie(T)) {
506
520
  t.push({
507
521
  code: "invalid_input",
508
- path: `${f}.filter`,
509
- message: `${f}.filter must be a complete dashboard filter definition.`,
522
+ path: `${u}.filter`,
523
+ message: `${u}.filter must be a complete dashboard filter definition.`,
510
524
  inputId: l.id
511
525
  });
512
526
  return;
513
527
  }
514
528
  let b, k;
515
- if (I)
516
- b = F, k = "embedded";
529
+ if (y)
530
+ b = T, k = "embedded";
517
531
  else {
518
532
  if ((g == null ? void 0 : g.kind) !== "dashboardFilter") {
519
533
  t.push({
520
534
  code: "invalid_filter_reference",
521
- path: `${f}.filterReference.kind`,
522
- message: `${f}.filterReference.kind must be 'dashboardFilter'.`,
535
+ path: `${u}.filterReference.kind`,
536
+ message: `${u}.filterReference.kind must be 'dashboardFilter'.`,
523
537
  inputId: l.id
524
538
  });
525
539
  return;
526
540
  }
527
- const T = typeof (g == null ? void 0 : g.filterId) == "string" ? g.filterId : void 0;
528
- if (b = T ? c.get(T) : void 0, k = "dashboardFilter", !b) {
541
+ const v = typeof (g == null ? void 0 : g.filterId) == "string" ? g.filterId : void 0;
542
+ if (b = v ? c.get(v) : void 0, k = "dashboardFilter", !b) {
529
543
  t.push({
530
544
  code: "orphaned_filter_reference",
531
- path: `${f}.filterReference.filterId`,
532
- message: `${f}.filterReference cannot resolve dashboard filter '${T || ""}'.`,
545
+ path: `${u}.filterReference.filterId`,
546
+ message: `${u}.filterReference cannot resolve dashboard filter '${v || ""}'.`,
533
547
  inputId: l.id
534
548
  });
535
549
  return;
@@ -537,8 +551,8 @@ function re({
537
551
  if (b.kind === "global-date") {
538
552
  t.push({
539
553
  code: "global_date_reference",
540
- path: `${f}.filterReference`,
541
- message: `${f}.filterReference cannot reference the Global Date filter.`,
554
+ path: `${u}.filterReference`,
555
+ message: `${u}.filterReference cannot reference the Global Date filter.`,
542
556
  inputId: l.id
543
557
  });
544
558
  return;
@@ -547,8 +561,8 @@ function re({
547
561
  if (C) {
548
562
  t.push({
549
563
  code: "duplicate_filter_reference",
550
- path: `${f}.filterReference.filterId`,
551
- message: `${f}.filterReference duplicates dashboard filter '${b.id}' already owned by Dashboard Input '${C}'.`,
564
+ path: `${u}.filterReference.filterId`,
565
+ message: `${u}.filterReference duplicates dashboard filter '${b.id}' already owned by Dashboard Input '${C}'.`,
552
566
  inputId: l.id
553
567
  });
554
568
  return;
@@ -556,62 +570,62 @@ function re({
556
570
  a.set(b.id, l.id);
557
571
  }
558
572
  if (!b) return;
559
- if (l.optionSource !== void 0 && ne(
573
+ if (l.optionSource !== void 0 && te(
560
574
  l.id,
561
575
  l.optionSource,
562
- `${f}.optionSource`,
576
+ `${u}.optionSource`,
563
577
  t
564
578
  ), l.application && b.kind === "global-date") {
565
579
  t.push({
566
580
  code: "global_date_reference",
567
- path: `${f}.application`,
568
- message: `${f}.application cannot map the Global Date filter.`,
581
+ path: `${u}.application`,
582
+ message: `${u}.application cannot map the Global Date filter.`,
569
583
  inputId: l.id
570
584
  });
571
585
  return;
572
586
  }
573
587
  l.application && l.scope.kind !== "allSheets" && l.scope.kind !== "sheets" && t.push({
574
588
  code: "unsupported_mapped_scope",
575
- path: `${f}.scope`,
576
- message: `${f}.scope must be allSheets or sheets when cardMappings are present.`,
589
+ path: `${u}.scope`,
590
+ message: `${u}.scope must be allSheets or sheets when cardMappings are present.`,
577
591
  inputId: l.id
578
- }), te(
592
+ }), re(
579
593
  l.id,
580
594
  l.application,
581
- `${f}.application`,
582
- d,
595
+ `${u}.application`,
596
+ o,
583
597
  t,
584
- o
598
+ d
585
599
  );
586
600
  const {
587
- filter: oe,
588
- filterReference: ae,
601
+ filter: ce,
602
+ filterReference: le,
589
603
  // A reference-backed authored input must shadow the generated
590
604
  // dashboard-filter compatibility input. Older writers may have copied
591
605
  // the compatibility marker onto the reference; never preserve it.
592
606
  compatibility: A,
593
- ...B
607
+ ...z
594
608
  } = l;
595
- s.push({
596
- ...B,
609
+ r.push({
610
+ ...z,
597
611
  filter: b,
598
- ...I && A ? { compatibility: A } : {},
612
+ ...y && A ? { compatibility: A } : {},
599
613
  ...l.optionSource ? {
600
614
  optionSource: l.optionSource
601
615
  } : {},
602
616
  definitionOrigin: k
603
617
  });
604
- }), t.length ? { ok: !1, inputs: s, issues: t } : { ok: !0, inputs: s });
618
+ }), t.length ? { ok: !1, inputs: r, issues: t } : { ok: !0, inputs: r });
605
619
  }
606
- function Ie(e) {
607
- const n = re(e);
608
- if (!n.ok) throw new J(n.issues);
620
+ function _e(e) {
621
+ const n = oe(e);
622
+ if (!n.ok) throw new X(n.issues);
609
623
  return n.inputs;
610
624
  }
611
- function ye(e = () => globalThis.crypto.randomUUID()) {
625
+ function Fe(e = () => globalThis.crypto.randomUUID()) {
612
626
  return e();
613
627
  }
614
- const se = {
628
+ const de = {
615
629
  date: /* @__PURE__ */ new Set([
616
630
  "between",
617
631
  "not between",
@@ -650,28 +664,29 @@ const se = {
650
664
  ]),
651
665
  boolean: /* @__PURE__ */ new Set(["=", "!=", "is null", "is not null"])
652
666
  };
653
- function de(e) {
667
+ function ae(e) {
654
668
  const n = D(e);
655
669
  return n === "number" || n === "boolean" ? n : n === "date" || n === "datetime" ? "date" : "string";
656
670
  }
657
- function $e(e, n) {
658
- return typeof n != "string" ? !1 : se[de(e)].has(n);
671
+ function Te(e, n) {
672
+ return typeof n != "string" ? !1 : de[ae(e)].has(n);
659
673
  }
660
674
  export {
661
- J as D,
662
- be as a,
663
- q as b,
675
+ X as D,
676
+ he as a,
677
+ L as b,
664
678
  j as c,
665
- H as d,
666
- U as e,
667
- me as f,
668
- he as g,
669
- Y as h,
670
- pe as i,
671
- Ie as j,
672
- ye as k,
673
- de as l,
674
- $e as m,
675
- re as n,
676
- ge as r
679
+ V as d,
680
+ W as e,
681
+ ge as f,
682
+ Ie as g,
683
+ J as h,
684
+ ye as i,
685
+ $e as j,
686
+ _e as k,
687
+ Fe as l,
688
+ ae as m,
689
+ oe as n,
690
+ Te as o,
691
+ pe as r
677
692
  };