react-semaphor 0.1.376 → 0.1.377

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 (60) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +47 -43
  3. package/dist/brand-studio/index.cjs +4 -4
  4. package/dist/brand-studio/index.js +10 -8
  5. package/dist/chunks/braces-C2uBgj3t.js +6 -0
  6. package/dist/chunks/braces-CkXyWzRh.js +23 -0
  7. package/dist/chunks/{calendar-preferences-dialog-B6fsethx.js → calendar-preferences-dialog-C55VOTIy.js} +6 -5
  8. package/dist/chunks/calendar-preferences-dialog-DAukJOaP.js +1 -0
  9. package/dist/chunks/catalog-field-grounding-BGW0hnB9.js +1 -0
  10. package/dist/chunks/catalog-field-grounding-DHXEI7cW.js +199 -0
  11. package/dist/chunks/{chevrons-up-down-lahj6tQy.js → chevrons-up-down-BnzChFLU.js} +1 -1
  12. package/dist/chunks/{chevrons-up-down-D2fZD4N_.js → chevrons-up-down-W0nzHzx0.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-BKCRO7Qw.js → dashboard-briefing-launcher-CUyeiL_T.js} +3153 -2392
  14. package/dist/chunks/dashboard-briefing-launcher-DMKfG_z3.js +111 -0
  15. package/dist/chunks/dashboard-controls-B4hxFc3Q.js +2279 -0
  16. package/dist/chunks/dashboard-controls-D4vI0wvU.js +52 -0
  17. package/dist/chunks/dashboard-json-DQnm6daE.js +1 -0
  18. package/dist/chunks/{dashboard-json-QT0T2ad_.js → dashboard-json-pl1_mFqJ.js} +14 -13
  19. package/dist/chunks/{edit-dashboard-visual-kNoMQRmH.js → edit-dashboard-visual-CF4aSsav.js} +1489 -1488
  20. package/dist/chunks/{edit-dashboard-visual-DNzPgXMh.js → edit-dashboard-visual-CjTXY51a.js} +1 -1
  21. package/dist/chunks/{index-CPpqPJba.js → index-B2kPleRS.js} +4 -4
  22. package/dist/chunks/{index-DX_0OcRv.js → index-Bn866BBY.js} +67 -67
  23. package/dist/chunks/layout-grid-BFmJ7vmH.js +16 -0
  24. package/dist/chunks/layout-grid-CTOW9oTg.js +6 -0
  25. package/dist/chunks/{palette-BcHHAmOU.js → palette-DrhPeer-.js} +1 -1
  26. package/dist/chunks/{palette-2HWSR5wb.js → palette-OFaniMPn.js} +1 -1
  27. package/dist/chunks/{save-MoF1T13_.js → save-BxWBiQv1.js} +1 -1
  28. package/dist/chunks/{save-B-YfAPhu.js → save-Dh6gSC4x.js} +1 -1
  29. package/dist/chunks/{switch-DmE_MY3L.js → switch-C-fGjxjY.js} +1 -1
  30. package/dist/chunks/{switch-CmHP5dT7.js → switch-D5xopzFD.js} +1 -1
  31. package/dist/chunks/{use-create-flow-overlay-state-BLPQgGuz.js → use-create-flow-overlay-state-Dg2ffpCE.js} +2 -2
  32. package/dist/chunks/{use-create-flow-overlay-state-D_Ntx-_C.js → use-create-flow-overlay-state-DrKP0jWE.js} +113 -112
  33. package/dist/chunks/{validation-1V7bWmYw.js → validation-BHFaWDU-.js} +1 -1
  34. package/dist/chunks/{validation-DlrTIf1N.js → validation-bMedDBOo.js} +1 -1
  35. package/dist/dashboard/index.cjs +1 -1
  36. package/dist/dashboard/index.js +1 -1
  37. package/dist/dashboard-authoring/index.cjs +1 -1
  38. package/dist/dashboard-authoring/index.js +1 -1
  39. package/dist/data-app-builder/index.cjs +1 -1
  40. package/dist/data-app-builder/index.js +3 -3
  41. package/dist/data-app-sdk/index.cjs +1 -1
  42. package/dist/data-app-sdk/index.js +22 -21
  43. package/dist/data-app-sdk-validation/index.cjs +1 -1
  44. package/dist/data-app-sdk-validation/index.js +2 -2
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +127 -125
  47. package/dist/surfboard/index.cjs +1 -1
  48. package/dist/surfboard/index.js +2 -2
  49. package/dist/types/analytics-protocol.d.ts +84 -0
  50. package/dist/types/main.d.ts +7 -0
  51. package/package.json +1 -1
  52. package/dist/chunks/calendar-preferences-dialog-Dh1b0ytN.js +0 -1
  53. package/dist/chunks/catalog-field-grounding-DoEBOXQd.js +0 -100
  54. package/dist/chunks/catalog-field-grounding-Du6mKDcF.js +0 -1
  55. package/dist/chunks/dashboard-briefing-launcher-Gv1cwT0I.js +0 -111
  56. package/dist/chunks/dashboard-controls-BDJZarV7.js +0 -52
  57. package/dist/chunks/dashboard-controls-CchLBVDv.js +0 -3037
  58. package/dist/chunks/dashboard-json-ZhIEMXN0.js +0 -1
  59. package/dist/chunks/layout-grid-BOTLt36V.js +0 -36
  60. package/dist/chunks/layout-grid-CS6BSCJF.js +0 -11
@@ -0,0 +1,199 @@
1
+ const o = {
2
+ answerSummary: "string",
3
+ responseDetail: "responseDetail",
4
+ mode: "string",
5
+ comparisonType: "string",
6
+ executionResult: "unknown",
7
+ compiledQuery: "unknown",
8
+ data: "unknown",
9
+ resultSets: "record",
10
+ columns: "unknownArray",
11
+ records: "recordArray",
12
+ rowCount: "number",
13
+ rowLimitExceeded: "boolean",
14
+ output: "string",
15
+ querySpec: "unknown",
16
+ metadata: "record",
17
+ validation: "unknown",
18
+ coverage: "unknown",
19
+ missingFields: "stringArray",
20
+ warnings: "unknownArray",
21
+ comparison: "unknown",
22
+ population: "unknown",
23
+ comparisons: "recordArray",
24
+ fieldsUsed: "unknown",
25
+ changes: "recordArray",
26
+ largestNegativeChanges: "recordArray",
27
+ largestPositiveChanges: "recordArray",
28
+ drivers: "recordArray",
29
+ absoluteDeltaDrivers: "recordArray",
30
+ largestNegativeDrivers: "recordArray",
31
+ largestPositiveDrivers: "recordArray",
32
+ periodRows: "recordArray",
33
+ sql: "unknown",
34
+ omitted: "stringArray"
35
+ }, g = new Set(
36
+ Object.keys(o)
37
+ ), w = /* @__PURE__ */ new Set([
38
+ "compact",
39
+ "standard",
40
+ "debug"
41
+ ]);
42
+ function _() {
43
+ return Object.keys(
44
+ o
45
+ );
46
+ }
47
+ function h(e) {
48
+ return g.has(e);
49
+ }
50
+ function E(e) {
51
+ if (!e || typeof e != "object" || Array.isArray(e))
52
+ throw new Error("Semaphor analyze result must be an object.");
53
+ const n = e, r = Object.keys(n).filter(
54
+ (t) => !h(t)
55
+ );
56
+ if (r.length)
57
+ throw new Error(
58
+ `Semaphor analyze result contains unsupported top-level field(s): ${r.join(", ")}.`
59
+ );
60
+ for (const [t, a] of Object.entries(n)) {
61
+ if (a === void 0)
62
+ continue;
63
+ const i = o[t];
64
+ if (!b(a, i))
65
+ throw new Error(
66
+ `Semaphor analyze result field "${t}" does not match contract kind "${i}".`
67
+ );
68
+ }
69
+ return n;
70
+ }
71
+ function b(e, n) {
72
+ switch (n) {
73
+ case "boolean":
74
+ return typeof e == "boolean";
75
+ case "number":
76
+ return typeof e == "number" && Number.isFinite(e);
77
+ case "record":
78
+ return d(e);
79
+ case "recordArray":
80
+ return Array.isArray(e) && e.every(d);
81
+ case "responseDetail":
82
+ return typeof e == "string" && w.has(e);
83
+ case "string":
84
+ return typeof e == "string";
85
+ case "stringArray":
86
+ return Array.isArray(e) && e.every((r) => typeof r == "string");
87
+ case "unknown":
88
+ return !0;
89
+ case "unknownArray":
90
+ return Array.isArray(e);
91
+ }
92
+ }
93
+ function d(e) {
94
+ return !!(e && typeof e == "object" && !Array.isArray(e));
95
+ }
96
+ function c(e) {
97
+ return typeof e == "string" ? e.trim().toLowerCase() : "";
98
+ }
99
+ function S(e) {
100
+ return String(e.column_name || e.name || e.qualifiedFieldName || "");
101
+ }
102
+ function k(e) {
103
+ return Array.from(
104
+ new Set(
105
+ [
106
+ e.column_name,
107
+ e.name,
108
+ e.qualifiedFieldName,
109
+ e.alias
110
+ ].filter(
111
+ (n) => typeof n == "string" && n.trim().length > 0
112
+ ).map((n) => n.trim())
113
+ )
114
+ );
115
+ }
116
+ function y(e) {
117
+ const n = C(e);
118
+ return n ? n.includes("int") || n.includes("uint") || n.includes("bigint") || n.includes("smallint") || n.includes("tinyint") || n.includes("numeric") || n.includes("decimal") || n.includes("double") || n.includes("float") || n.includes("number") || n.includes("real") || n.includes("money") || n.includes("currency") || n.includes("percent") ? "number" : n.includes("timestamp") || n.includes("datetime") || n.startsWith("time") ? "datetime" : n.includes("date") ? "date" : n.includes("bool") ? "boolean" : "string" : "unknown";
119
+ }
120
+ function C(e) {
121
+ let n = c(e), r = "";
122
+ for (; n && n !== r; )
123
+ r = n, n = u(n, "nullable"), n = u(n, "lowcardinality");
124
+ return n;
125
+ }
126
+ function u(e, n) {
127
+ const r = `${n}(`;
128
+ return !e.startsWith(r) || !e.endsWith(")") ? e : e.slice(r.length, -1).trim();
129
+ }
130
+ function D(e) {
131
+ const n = y(e);
132
+ return n === "date" || n === "datetime";
133
+ }
134
+ function m(e) {
135
+ return D(e.dataType || e.data_type);
136
+ }
137
+ function f(e) {
138
+ const n = p(e);
139
+ return n === "id" || n === "row_id";
140
+ }
141
+ function l(e) {
142
+ const n = p(e);
143
+ return f(e) || n.endsWith("_id") || n.endsWith("_key") || n.endsWith("_number");
144
+ }
145
+ function p(e) {
146
+ return c(
147
+ S(e) || e.name || e.alias
148
+ ).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
149
+ }
150
+ function A(e, n = {}) {
151
+ const r = c(e.role);
152
+ return r === "metric" || r === "measure" ? !n.excludeIdentifiers || !l(e) : r === "groupby" || r === "dimension" || r === "date" || r === "id" ? !1 : y(
153
+ e.dataType || e.data_type
154
+ ) === "number" && (!n.excludeIdentifiers || !l(e));
155
+ }
156
+ function F(e) {
157
+ return !A(e) && !m(e);
158
+ }
159
+ function T(e) {
160
+ const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
161
+ for (const a of e) {
162
+ if (f(a))
163
+ continue;
164
+ const i = k(a);
165
+ if (i.length !== 0) {
166
+ if (m(a)) {
167
+ i.forEach((s) => r.add(s));
168
+ continue;
169
+ }
170
+ if (A(a, { excludeIdentifiers: !0 })) {
171
+ i.forEach((s) => n.add(s));
172
+ continue;
173
+ }
174
+ i.forEach((s) => t.add(s));
175
+ }
176
+ }
177
+ return {
178
+ validMetricCandidates: Array.from(n).sort(),
179
+ validDateCandidates: Array.from(r).sort(),
180
+ validDimensionCandidates: Array.from(t).sort()
181
+ };
182
+ }
183
+ export {
184
+ o as S,
185
+ S as a,
186
+ k as b,
187
+ y as c,
188
+ D as d,
189
+ m as e,
190
+ f,
191
+ _ as g,
192
+ l as h,
193
+ h as i,
194
+ A as j,
195
+ F as k,
196
+ T as l,
197
+ c as n,
198
+ E as p
199
+ };
@@ -1,4 +1,4 @@
1
- import { c as o } from "./switch-DmE_MY3L.js";
1
+ import { c as o } from "./switch-C-fGjxjY.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./switch-CmHP5dT7.js");/**
1
+ "use strict";const e=require("./switch-D5xopzFD.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.