react-semaphor 0.1.334 → 0.1.336
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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +100 -242
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +435 -391
- package/dist/chunks/{braces-DlW7C5BH.js → braces-BLa_lORs.js} +1 -1
- package/dist/chunks/{braces-DYx37F5Z.js → braces-Q86XHDaD.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-CB5MA9gF.js → calendar-preferences-dialog-Bm7ji3k9.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-BLz4PrDX.js → calendar-preferences-dialog-Cocogo9H.js} +3 -3
- package/dist/chunks/catalog-field-grounding-DmT7aGUA.js +191 -0
- package/dist/chunks/catalog-field-grounding-VgVzDd25.js +1 -0
- package/dist/chunks/{chevrons-up-down-CP6oFMrt.js → chevrons-up-down-BBTZ5pAY.js} +1 -1
- package/dist/chunks/{chevrons-up-down-B_66pVv5.js → chevrons-up-down-CYuWasy_.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Bwz4mKOI.js → dashboard-briefing-launcher-BtqtLx1-.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-B7AxiecS.js → dashboard-briefing-launcher-DF4CoaRn.js} +4 -4
- package/dist/chunks/{dashboard-controls-DlN7FGW-.js → dashboard-controls-0VMAeMoa.js} +1 -1
- package/dist/chunks/{dashboard-controls-CbuKeeeP.js → dashboard-controls-B5U-VUxs.js} +6 -6
- package/dist/chunks/{dashboard-json-CeVrYTnR.js → dashboard-json-CqbLOfnr.js} +1 -1
- package/dist/chunks/{dashboard-json-gcpeSd5I.js → dashboard-json-Hmc0Ri5z.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-Kn1wtj-Z.js → edit-dashboard-visual-C0EDM0QB.js} +3 -3
- package/dist/chunks/{edit-dashboard-visual-BggRcCO2.js → edit-dashboard-visual-D4VVu-QQ.js} +1302 -1302
- package/dist/chunks/{index-CP3_hN7P.js → index-DE0vIuYG.js} +4 -4
- package/dist/chunks/{index-TA0tBZ1g.js → index-DzyUhzV3.js} +262 -270
- package/dist/chunks/{palette-BW7lzLOY.js → palette-B9AbDw0n.js} +1 -1
- package/dist/chunks/{palette-BueS2ZEM.js → palette-DalASD28.js} +1 -1
- package/dist/chunks/{resource-management-panel-vDrPcmXs.js → resource-management-panel-C4YydU9I.js} +3 -3
- package/dist/chunks/{resource-management-panel-DBYcMHVL.js → resource-management-panel-P9iNqBM1.js} +1 -1
- package/dist/chunks/{switch-B6fK1sl9.js → switch-BAYfpAEb.js} +1967 -2008
- package/dist/chunks/{switch-BT7khJGF.js → switch-CyRoZr5T.js} +35 -35
- package/dist/chunks/{use-create-flow-overlay-state-T8Su6dzu.js → use-create-flow-overlay-state-CbhjxI3W.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DPYHfe-S.js → use-create-flow-overlay-state-P1LMwQ89.js} +3 -3
- package/dist/chunks/{use-visual-utils-wqosOqyY.js → use-visual-utils-CV6_-y4p.js} +1 -1
- package/dist/chunks/{use-visual-utils-Daov8_1p.js → use-visual-utils-lB-3Zk0b.js} +2 -2
- package/dist/chunks/validators-BOqiGymD.js +660 -0
- package/dist/chunks/validators-BtFXY3S_.js +2 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +476 -453
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-builder-browser-runtime/index.cjs +1 -1
- package/dist/data-app-builder-browser-runtime/index.js +4 -9
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +89 -80
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +183 -5
- package/dist/types/briefings.d.ts +12 -0
- package/dist/types/dashboard-authoring.d.ts +33 -4
- package/dist/types/data-app-builder.d.ts +30 -3
- package/dist/types/data-app-sdk.d.ts +32 -5
- package/dist/types/main.d.ts +34 -3
- package/package.json +1 -1
- package/dist/chunks/validators-DDAweCzB.js +0 -371
- package/dist/chunks/validators-odlRJblR.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../chunks/validators-BtFXY3S_.js"),t=require("../chunks/catalog-field-grounding-VgVzDd25.js");function d(e,a={}){const i=o(e),r={connectionId:a.connectionId,connectionType:e,path:["database","schema","table"],labels:{database:"Database",schema:"Schema",table:"Table"},prefixLevels:["database","schema","table"],dialect:"postgres",supportsFilterClause:!0};return i.includes("postgres")?{...r,prefixLevels:["schema","table"],dialect:"postgres"}:i.includes("mysql")?{...r,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:i.includes("mssql")||i.includes("sqlserver")?{...r,dialect:"mssql",supportsFilterClause:!1}:i.includes("redshift")?{...r,prefixLevels:["schema","table"],dialect:"redshift"}:i.includes("snowflake")?{...r,dialect:"snowflake"}:i.includes("clickhouse")?{connectionId:a.connectionId,connectionType:e,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:i==="s3"||i==="api"?{connectionId:a.connectionId,connectionType:e,path:["table"],labels:{table:i==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:i==="googlesheets"||i==="fileupload"?{connectionId:a.connectionId,connectionType:e,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:i==="s3tables"?{...r,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:i==="bigquery"?{...r,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:r}function c(e){const a=o(e);switch(a){case"mysql":case"bigquery":case"redshift":case"snowflake":case"clickhouse":case"duckdb":case"sqlite":return a;case"mssql":case"sqlserver":return"mssql";case"postgres":case"postgresql":return"postgres";case"semantic":return"semantic";default:return"unknown"}}function u(e){return e.capabilities.prefixLevels.every(a=>!!l(e.source,a))}function m(e){const a=e.quoteIdentifier??p;return e.capabilities.prefixLevels.map(i=>l(e.source,i)).filter(i=>!!i).map(i=>a(i,e.capabilities.dialect)).join(".")}function l(e,a){return a==="database"?e.databaseName:a==="schema"?e.schemaName:e.tableName}function p(e,a){return a==="mysql"||a==="bigquery"||a==="clickhouse"||a==="duckdb"?`\`${e.replace(/`/g,"``")}\``:a==="mssql"?`[${e.replace(/]/g,"]]")}]`:`"${e.replace(/"/g,'""')}"`}function o(e){if(typeof e!="string")return"";const a=[];for(const i of e.trim().toLowerCase())b(i)&&a.push(i);return a.join("")}function b(e){const a=e.charCodeAt(0);return a>=48&&a<=57||a>=97&&a<=122}const s={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},f={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:s,metrics:["revenue"],primaryMetric:"revenue",comparison:{kind:"previous_period"},limit:1},revenueTrend:{version:1,kind:"records",id:"revenue-trend",label:"Revenue trend",source:s,fields:[{name:"order_date",role:"date",dataType:"date",label:"Order Date"}],measures:["revenue"],dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"month",limit:100},topCustomersRecords:{version:1,kind:"records",id:"top-customers",label:"Top customers",source:s,fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"segment",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}],measures:["revenue"],orderBy:{field:"revenue",direction:"desc"},limit:20},regionInputOptions:{version:1,kind:"inputOptions",id:"region-options",label:"Region options",source:s,field:{name:"region",role:"dimension",dataType:"string"},limit:100},previousPeriodRevenueComparison:{version:1,kind:"metric",id:"revenue-previous-period",label:"Revenue previous period comparison",source:s,metrics:["revenue"],primaryMetric:"revenue",dateField:{name:"order_date",role:"date",dataType:"date"},timeGrain:"week",comparison:{kind:"previous_period"},limit:100},inboundSupplierConcentration:{version:1,kind:"metric",id:"inbound-supplier-concentration",label:"Inbound supplier concentration",source:s,metrics:["net_tons","ticket_value"],primaryMetric:"net_tons",dateField:{name:"ticket_date",role:"date",dataType:"date"},timeWindow:{unit:"month",value:6,anchor:"latest_available"},dimensions:[{name:"supplier_id",role:"dimension",dataType:"number"}],filters:[{field:{name:"direction",role:"dimension",dataType:"string"},operator:"=",value:"Inbound"}],limit:15},boundedSqlRanking:{version:1,kind:"sql",id:"top-customer-ranking-sql",label:"Top customer ranking SQL",source:{kind:"physical",connectionId:"conn_sales",databaseName:"warehouse",schemaName:"public",tableName:"orders",dialect:"postgres"},sql:"SELECT customer_name, SUM(revenue) AS revenue FROM public.orders GROUP BY customer_name ORDER BY revenue DESC LIMIT 20",limit:20,rationale:"Ranking is SQL-natural because it requires ordering grouped aggregate rows.",fields:[{name:"customer_name",role:"dimension",dataType:"string"},{name:"revenue",role:"measure",dataType:"number"}]}};exports.validateSemaphorAnalyticsIntent=n.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=n.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=n.validateSemaphorDashboardIntent;exports.validateSemaphorOperationIntent=n.validateSemaphorOperationIntent;exports.buildAnalyticsCatalogFieldSummary=t.buildAnalyticsCatalogFieldSummary;exports.getAnalyticsCatalogFieldCandidates=t.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=t.getAnalyticsCatalogFieldName;exports.inferAnalyticsMetricFormat=t.inferAnalyticsMetricFormat;exports.isAnalyticsCatalogDateField=t.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=t.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=t.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=t.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=t.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=t.isAnalyticsTechnicalIdentifierField;exports.normalizeAnalyticsCatalogDataType=t.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=t.normalizeAnalyticsCatalogName;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=f;exports.buildSemaphorQualifiedSourcePath=m;exports.getSemaphorConnectionCapabilities=d;exports.normalizeSemaphorDialect=c;exports.semaphorSourceHasRequiredCoordinates=u;
|
|
@@ -1,174 +1,8 @@
|
|
|
1
|
-
import { v as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return String(e.column_name || e.name || e.qualifiedFieldName || "");
|
|
7
|
-
}
|
|
8
|
-
function v(e) {
|
|
9
|
-
return Array.from(
|
|
10
|
-
new Set(
|
|
11
|
-
[
|
|
12
|
-
e.column_name,
|
|
13
|
-
e.name,
|
|
14
|
-
e.qualifiedFieldName,
|
|
15
|
-
e.alias
|
|
16
|
-
].filter(
|
|
17
|
-
(t) => typeof t == "string" && t.trim().length > 0
|
|
18
|
-
).map((t) => t.trim())
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function d(e) {
|
|
23
|
-
const t = c(e);
|
|
24
|
-
return t ? t.includes("int") || t.includes("numeric") || t.includes("decimal") || t.includes("double") || t.includes("float") || t.includes("number") || t.includes("real") || t.includes("money") ? "number" : t.includes("timestamp") || t.includes("datetime") || t === "time" || t.startsWith("time ") ? "datetime" : t.includes("date") ? "date" : t.includes("bool") ? "boolean" : "string" : "unknown";
|
|
25
|
-
}
|
|
26
|
-
function C(e) {
|
|
27
|
-
const t = d(e);
|
|
28
|
-
return t === "date" || t === "datetime";
|
|
29
|
-
}
|
|
30
|
-
function m(e) {
|
|
31
|
-
return C(e.dataType || e.data_type);
|
|
32
|
-
}
|
|
33
|
-
function p(e) {
|
|
34
|
-
const t = f(e);
|
|
35
|
-
return t === "id" || t === "row_id";
|
|
36
|
-
}
|
|
37
|
-
function u(e) {
|
|
38
|
-
const t = f(e);
|
|
39
|
-
return p(e) || t.endsWith("_id") || t.endsWith("_key") || t.endsWith("_number");
|
|
40
|
-
}
|
|
41
|
-
function f(e) {
|
|
42
|
-
return c(
|
|
43
|
-
h(e) || e.name || e.alias
|
|
44
|
-
).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
45
|
-
}
|
|
46
|
-
function b(e, t = {}) {
|
|
47
|
-
const a = c(e.role);
|
|
48
|
-
return a === "metric" || a === "measure" ? !t.excludeIdentifiers || !u(e) : a === "groupby" || a === "dimension" || a === "date" || a === "id" ? !1 : d(
|
|
49
|
-
e.dataType || e.data_type
|
|
50
|
-
) === "number" && (!t.excludeIdentifiers || !u(e));
|
|
51
|
-
}
|
|
52
|
-
function q(e) {
|
|
53
|
-
return !b(e) && !m(e);
|
|
54
|
-
}
|
|
55
|
-
function k(e) {
|
|
56
|
-
return [
|
|
57
|
-
e.column_name,
|
|
58
|
-
e.name,
|
|
59
|
-
e.label,
|
|
60
|
-
e.alias,
|
|
61
|
-
e.qualifiedFieldName
|
|
62
|
-
].filter(
|
|
63
|
-
(t) => typeof t == "string" && t.trim().length > 0
|
|
64
|
-
).map(
|
|
65
|
-
(t) => c(t).replace(/[^a-z0-9]+/g, " ")
|
|
66
|
-
).join(" ");
|
|
67
|
-
}
|
|
68
|
-
function l(e, t) {
|
|
69
|
-
return t.some((a) => {
|
|
70
|
-
const r = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
71
|
-
return new RegExp(`(^|\\s)${r}(\\s|$)`, "i").test(e);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function D(e) {
|
|
75
|
-
const t = k(e);
|
|
76
|
-
if (t)
|
|
77
|
-
return l(t, [
|
|
78
|
-
"pct",
|
|
79
|
-
"percent",
|
|
80
|
-
"percentage",
|
|
81
|
-
"rate",
|
|
82
|
-
"ratio",
|
|
83
|
-
"share",
|
|
84
|
-
"conversion",
|
|
85
|
-
"retention",
|
|
86
|
-
"churn",
|
|
87
|
-
"growth",
|
|
88
|
-
"margin rate",
|
|
89
|
-
"margin pct",
|
|
90
|
-
"margin percent",
|
|
91
|
-
"margin percentage"
|
|
92
|
-
]) ? {
|
|
93
|
-
type: "percent",
|
|
94
|
-
minimumFractionDigits: 0,
|
|
95
|
-
maximumFractionDigits: 1,
|
|
96
|
-
percentValueMode: "fraction"
|
|
97
|
-
} : l(t, [
|
|
98
|
-
"revenue",
|
|
99
|
-
"sales",
|
|
100
|
-
"profit",
|
|
101
|
-
"arr",
|
|
102
|
-
"mrr",
|
|
103
|
-
"gmv",
|
|
104
|
-
"amount",
|
|
105
|
-
"price",
|
|
106
|
-
"cost",
|
|
107
|
-
"spend",
|
|
108
|
-
"expense",
|
|
109
|
-
"budget",
|
|
110
|
-
"income",
|
|
111
|
-
"value",
|
|
112
|
-
"booking",
|
|
113
|
-
"bookings"
|
|
114
|
-
]) ? {
|
|
115
|
-
type: "currency",
|
|
116
|
-
currency: "USD",
|
|
117
|
-
minimumFractionDigits: 0,
|
|
118
|
-
maximumFractionDigits: 1,
|
|
119
|
-
compact: !0
|
|
120
|
-
} : l(t, [
|
|
121
|
-
"count",
|
|
122
|
-
"quantity",
|
|
123
|
-
"orders",
|
|
124
|
-
"order",
|
|
125
|
-
"users",
|
|
126
|
-
"customers",
|
|
127
|
-
"tickets",
|
|
128
|
-
"units",
|
|
129
|
-
"sessions",
|
|
130
|
-
"visits",
|
|
131
|
-
"items",
|
|
132
|
-
"rows"
|
|
133
|
-
]) ? {
|
|
134
|
-
type: "number",
|
|
135
|
-
minimumFractionDigits: 0,
|
|
136
|
-
maximumFractionDigits: 0,
|
|
137
|
-
compact: !0
|
|
138
|
-
} : {
|
|
139
|
-
type: "number",
|
|
140
|
-
minimumFractionDigits: 0,
|
|
141
|
-
maximumFractionDigits: 1,
|
|
142
|
-
compact: !0
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function I(e) {
|
|
146
|
-
const t = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
147
|
-
for (const s of e) {
|
|
148
|
-
if (p(s))
|
|
149
|
-
continue;
|
|
150
|
-
const o = v(s);
|
|
151
|
-
if (o.length !== 0) {
|
|
152
|
-
if (m(s)) {
|
|
153
|
-
o.forEach((i) => a.add(i));
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
if (b(s, { excludeIdentifiers: !0 })) {
|
|
157
|
-
o.forEach((i) => t.add(i));
|
|
158
|
-
continue;
|
|
159
|
-
}
|
|
160
|
-
o.forEach((i) => r.add(i));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
validMetricCandidates: Array.from(t).sort(),
|
|
165
|
-
validDateCandidates: Array.from(a).sort(),
|
|
166
|
-
validDimensionCandidates: Array.from(r).sort()
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function S(e, t = {}) {
|
|
170
|
-
const a = y(e), r = {
|
|
171
|
-
connectionId: t.connectionId,
|
|
1
|
+
import { v, b as g, c as h, a as y } from "../chunks/validators-BOqiGymD.js";
|
|
2
|
+
import { k as C, a as I, g as T, j as q, c as S, h as F, f as A, i as _, e as L, d as R, b as N, n as D } from "../chunks/catalog-field-grounding-DmT7aGUA.js";
|
|
3
|
+
function d(e, a = {}) {
|
|
4
|
+
const i = n(e), t = {
|
|
5
|
+
connectionId: a.connectionId,
|
|
172
6
|
connectionType: e,
|
|
173
7
|
path: ["database", "schema", "table"],
|
|
174
8
|
labels: {
|
|
@@ -180,28 +14,28 @@ function S(e, t = {}) {
|
|
|
180
14
|
dialect: "postgres",
|
|
181
15
|
supportsFilterClause: !0
|
|
182
16
|
};
|
|
183
|
-
return
|
|
184
|
-
...
|
|
17
|
+
return i.includes("postgres") ? {
|
|
18
|
+
...t,
|
|
185
19
|
prefixLevels: ["schema", "table"],
|
|
186
20
|
dialect: "postgres"
|
|
187
|
-
} :
|
|
188
|
-
...
|
|
21
|
+
} : i.includes("mysql") ? {
|
|
22
|
+
...t,
|
|
189
23
|
prefixLevels: ["database", "table"],
|
|
190
24
|
dialect: "mysql",
|
|
191
25
|
supportsFilterClause: !1
|
|
192
|
-
} :
|
|
193
|
-
...
|
|
26
|
+
} : i.includes("mssql") || i.includes("sqlserver") ? {
|
|
27
|
+
...t,
|
|
194
28
|
dialect: "mssql",
|
|
195
29
|
supportsFilterClause: !1
|
|
196
|
-
} :
|
|
197
|
-
...
|
|
30
|
+
} : i.includes("redshift") ? {
|
|
31
|
+
...t,
|
|
198
32
|
prefixLevels: ["schema", "table"],
|
|
199
33
|
dialect: "redshift"
|
|
200
|
-
} :
|
|
201
|
-
...
|
|
34
|
+
} : i.includes("snowflake") ? {
|
|
35
|
+
...t,
|
|
202
36
|
dialect: "snowflake"
|
|
203
|
-
} :
|
|
204
|
-
connectionId:
|
|
37
|
+
} : i.includes("clickhouse") ? {
|
|
38
|
+
connectionId: a.connectionId,
|
|
205
39
|
connectionType: e,
|
|
206
40
|
path: ["database", "table"],
|
|
207
41
|
labels: {
|
|
@@ -211,18 +45,18 @@ function S(e, t = {}) {
|
|
|
211
45
|
prefixLevels: ["database", "table"],
|
|
212
46
|
dialect: "clickhouse",
|
|
213
47
|
supportsFilterClause: !1
|
|
214
|
-
} :
|
|
215
|
-
connectionId:
|
|
48
|
+
} : i === "s3" || i === "api" ? {
|
|
49
|
+
connectionId: a.connectionId,
|
|
216
50
|
connectionType: e,
|
|
217
51
|
path: ["table"],
|
|
218
52
|
labels: {
|
|
219
|
-
table:
|
|
53
|
+
table: i === "api" ? "API Table" : "File Table"
|
|
220
54
|
},
|
|
221
55
|
prefixLevels: ["table"],
|
|
222
56
|
dialect: "duckdb",
|
|
223
57
|
supportsFilterClause: !0
|
|
224
|
-
} :
|
|
225
|
-
connectionId:
|
|
58
|
+
} : i === "googlesheets" || i === "fileupload" ? {
|
|
59
|
+
connectionId: a.connectionId,
|
|
226
60
|
connectionType: e,
|
|
227
61
|
path: ["table"],
|
|
228
62
|
labels: {
|
|
@@ -231,16 +65,16 @@ function S(e, t = {}) {
|
|
|
231
65
|
prefixLevels: ["table"],
|
|
232
66
|
dialect: "postgres",
|
|
233
67
|
supportsFilterClause: !0
|
|
234
|
-
} :
|
|
235
|
-
...
|
|
68
|
+
} : i === "s3tables" ? {
|
|
69
|
+
...t,
|
|
236
70
|
labels: {
|
|
237
71
|
database: "Database",
|
|
238
72
|
schema: "Namespace",
|
|
239
73
|
table: "Table"
|
|
240
74
|
},
|
|
241
75
|
dialect: "duckdb"
|
|
242
|
-
} :
|
|
243
|
-
...
|
|
76
|
+
} : i === "bigquery" ? {
|
|
77
|
+
...t,
|
|
244
78
|
labels: {
|
|
245
79
|
database: "Project",
|
|
246
80
|
schema: "Dataset",
|
|
@@ -249,11 +83,11 @@ function S(e, t = {}) {
|
|
|
249
83
|
prefixLevels: ["schema", "table"],
|
|
250
84
|
dialect: "bigquery",
|
|
251
85
|
supportsFilterClause: !1
|
|
252
|
-
} :
|
|
86
|
+
} : t;
|
|
253
87
|
}
|
|
254
|
-
function
|
|
255
|
-
const
|
|
256
|
-
switch (
|
|
88
|
+
function c(e) {
|
|
89
|
+
const a = n(e);
|
|
90
|
+
switch (a) {
|
|
257
91
|
case "mysql":
|
|
258
92
|
case "bigquery":
|
|
259
93
|
case "redshift":
|
|
@@ -261,7 +95,7 @@ function _(e) {
|
|
|
261
95
|
case "clickhouse":
|
|
262
96
|
case "duckdb":
|
|
263
97
|
case "sqlite":
|
|
264
|
-
return
|
|
98
|
+
return a;
|
|
265
99
|
case "mssql":
|
|
266
100
|
case "sqlserver":
|
|
267
101
|
return "mssql";
|
|
@@ -274,47 +108,48 @@ function _(e) {
|
|
|
274
108
|
return "unknown";
|
|
275
109
|
}
|
|
276
110
|
}
|
|
277
|
-
function
|
|
111
|
+
function u(e) {
|
|
278
112
|
return e.capabilities.prefixLevels.every(
|
|
279
|
-
(
|
|
113
|
+
(a) => !!s(e.source, a)
|
|
280
114
|
);
|
|
281
115
|
}
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
return e.capabilities.prefixLevels.map((
|
|
116
|
+
function m(e) {
|
|
117
|
+
const a = e.quoteIdentifier ?? l;
|
|
118
|
+
return e.capabilities.prefixLevels.map((i) => s(e.source, i)).filter((i) => !!i).map((i) => a(i, e.capabilities.dialect)).join(".");
|
|
285
119
|
}
|
|
286
|
-
function
|
|
287
|
-
return
|
|
120
|
+
function s(e, a) {
|
|
121
|
+
return a === "database" ? e.databaseName : a === "schema" ? e.schemaName : e.tableName;
|
|
288
122
|
}
|
|
289
|
-
function
|
|
290
|
-
return
|
|
123
|
+
function l(e, a) {
|
|
124
|
+
return a === "mysql" || a === "bigquery" || a === "clickhouse" || a === "duckdb" ? `\`${e.replace(/`/g, "``")}\`` : a === "mssql" ? `[${e.replace(/]/g, "]]")}]` : `"${e.replace(/"/g, '""')}"`;
|
|
291
125
|
}
|
|
292
|
-
function
|
|
126
|
+
function n(e) {
|
|
293
127
|
if (typeof e != "string")
|
|
294
128
|
return "";
|
|
295
|
-
const
|
|
296
|
-
for (const
|
|
297
|
-
|
|
298
|
-
return
|
|
129
|
+
const a = [];
|
|
130
|
+
for (const i of e.trim().toLowerCase())
|
|
131
|
+
o(i) && a.push(i);
|
|
132
|
+
return a.join("");
|
|
299
133
|
}
|
|
300
|
-
function
|
|
301
|
-
const
|
|
302
|
-
return
|
|
134
|
+
function o(e) {
|
|
135
|
+
const a = e.charCodeAt(0);
|
|
136
|
+
return a >= 48 && a <= 57 || a >= 97 && a <= 122;
|
|
303
137
|
}
|
|
304
|
-
const
|
|
138
|
+
const r = {
|
|
305
139
|
kind: "semantic",
|
|
306
140
|
domainId: "domain_sales",
|
|
307
141
|
datasetName: "orders",
|
|
308
142
|
connectionId: "conn_sales",
|
|
309
143
|
label: "Orders"
|
|
310
|
-
},
|
|
144
|
+
}, p = {
|
|
311
145
|
revenueKpi: {
|
|
312
146
|
version: 1,
|
|
313
147
|
kind: "metric",
|
|
314
148
|
id: "revenue-kpi",
|
|
315
149
|
label: "Revenue",
|
|
316
|
-
source:
|
|
317
|
-
|
|
150
|
+
source: r,
|
|
151
|
+
metrics: ["revenue"],
|
|
152
|
+
primaryMetric: "revenue",
|
|
318
153
|
comparison: { kind: "previous_period" },
|
|
319
154
|
limit: 1
|
|
320
155
|
},
|
|
@@ -323,7 +158,7 @@ const n = {
|
|
|
323
158
|
kind: "records",
|
|
324
159
|
id: "revenue-trend",
|
|
325
160
|
label: "Revenue trend",
|
|
326
|
-
source:
|
|
161
|
+
source: r,
|
|
327
162
|
fields: [
|
|
328
163
|
{ name: "order_date", role: "date", dataType: "date", label: "Order Date" }
|
|
329
164
|
],
|
|
@@ -337,7 +172,7 @@ const n = {
|
|
|
337
172
|
kind: "records",
|
|
338
173
|
id: "top-customers",
|
|
339
174
|
label: "Top customers",
|
|
340
|
-
source:
|
|
175
|
+
source: r,
|
|
341
176
|
fields: [
|
|
342
177
|
{ name: "customer_name", role: "dimension", dataType: "string" },
|
|
343
178
|
{ name: "segment", role: "dimension", dataType: "string" },
|
|
@@ -352,7 +187,7 @@ const n = {
|
|
|
352
187
|
kind: "inputOptions",
|
|
353
188
|
id: "region-options",
|
|
354
189
|
label: "Region options",
|
|
355
|
-
source:
|
|
190
|
+
source: r,
|
|
356
191
|
field: { name: "region", role: "dimension", dataType: "string" },
|
|
357
192
|
limit: 100
|
|
358
193
|
},
|
|
@@ -361,13 +196,34 @@ const n = {
|
|
|
361
196
|
kind: "metric",
|
|
362
197
|
id: "revenue-previous-period",
|
|
363
198
|
label: "Revenue previous period comparison",
|
|
364
|
-
source:
|
|
365
|
-
|
|
199
|
+
source: r,
|
|
200
|
+
metrics: ["revenue"],
|
|
201
|
+
primaryMetric: "revenue",
|
|
366
202
|
dateField: { name: "order_date", role: "date", dataType: "date" },
|
|
367
203
|
timeGrain: "week",
|
|
368
204
|
comparison: { kind: "previous_period" },
|
|
369
205
|
limit: 100
|
|
370
206
|
},
|
|
207
|
+
inboundSupplierConcentration: {
|
|
208
|
+
version: 1,
|
|
209
|
+
kind: "metric",
|
|
210
|
+
id: "inbound-supplier-concentration",
|
|
211
|
+
label: "Inbound supplier concentration",
|
|
212
|
+
source: r,
|
|
213
|
+
metrics: ["net_tons", "ticket_value"],
|
|
214
|
+
primaryMetric: "net_tons",
|
|
215
|
+
dateField: { name: "ticket_date", role: "date", dataType: "date" },
|
|
216
|
+
timeWindow: { unit: "month", value: 6, anchor: "latest_available" },
|
|
217
|
+
dimensions: [{ name: "supplier_id", role: "dimension", dataType: "number" }],
|
|
218
|
+
filters: [
|
|
219
|
+
{
|
|
220
|
+
field: { name: "direction", role: "dimension", dataType: "string" },
|
|
221
|
+
operator: "=",
|
|
222
|
+
value: "Inbound"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
limit: 15
|
|
226
|
+
},
|
|
371
227
|
boundedSqlRanking: {
|
|
372
228
|
version: 1,
|
|
373
229
|
kind: "sql",
|
|
@@ -391,23 +247,25 @@ const n = {
|
|
|
391
247
|
}
|
|
392
248
|
};
|
|
393
249
|
export {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
250
|
+
p as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
|
|
251
|
+
C as buildAnalyticsCatalogFieldSummary,
|
|
252
|
+
m as buildSemaphorQualifiedSourcePath,
|
|
253
|
+
I as getAnalyticsCatalogFieldCandidates,
|
|
254
|
+
T as getAnalyticsCatalogFieldName,
|
|
255
|
+
d as getSemaphorConnectionCapabilities,
|
|
256
|
+
q as inferAnalyticsMetricFormat,
|
|
257
|
+
S as isAnalyticsCatalogDateField,
|
|
258
|
+
F as isAnalyticsCatalogDimensionField,
|
|
259
|
+
A as isAnalyticsCatalogMetricField,
|
|
260
|
+
_ as isAnalyticsDateLikeDataType,
|
|
261
|
+
L as isAnalyticsMetricIdentifierField,
|
|
262
|
+
R as isAnalyticsTechnicalIdentifierField,
|
|
263
|
+
N as normalizeAnalyticsCatalogDataType,
|
|
264
|
+
D as normalizeAnalyticsCatalogName,
|
|
265
|
+
c as normalizeSemaphorDialect,
|
|
266
|
+
u as semaphorSourceHasRequiredCoordinates,
|
|
267
|
+
v as validateSemaphorAnalyticsIntent,
|
|
268
|
+
g as validateSemaphorAnalyticsRecoveryPlan,
|
|
269
|
+
h as validateSemaphorDashboardIntent,
|
|
270
|
+
y as validateSemaphorOperationIntent
|
|
413
271
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),d=require("../chunks/switch-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),d=require("../chunks/switch-CyRoZr5T.js"),A=require("../chunks/index-DRlMUglg.js");require("../chunks/index-BxM99sFL.js");const V=require("../chunks/palette-DalASD28.js"),ge=require("../chunks/braces-BLa_lORs.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { c as $, a as K, P as ge, b as be, B as C, d as fe, U as De, C as Ie, R as me, f as le, S as Je, X as je, J as se, e as Le, T as $e, K as _e, M, N as Ve, O as G, Q as Ue, V as Me, W as Ge, Y as We, L as E, Z as Q, _ as ee, $ as re, a0 as he, a1 as oe, a2 as ae, a3 as xe, a4 as ye, a5 as ke, a6 as ve, a7 as Ce, a8 as He } from "../chunks/switch-
|
|
3
|
+
import { c as $, a as K, P as ge, b as be, B as C, d as fe, U as De, C as Ie, R as me, f as le, S as Je, X as je, J as se, e as Le, T as $e, K as _e, M, N as Ve, O as G, Q as Ue, V as Me, W as Ge, Y as We, L as E, Z as Q, _ as ee, $ as re, a0 as he, a1 as oe, a2 as ae, a3 as xe, a4 as ye, a5 as ke, a6 as ve, a7 as Ce, a8 as He } from "../chunks/switch-BAYfpAEb.js";
|
|
4
4
|
import { r as Ye, v as Xe, A as Ze, a as qe, p as Ke } from "../chunks/index-CJdxSyQq.js";
|
|
5
5
|
import "../chunks/index-CuHybtft.js";
|
|
6
|
-
import { P as W } from "../chunks/palette-
|
|
7
|
-
import { B as Qe } from "../chunks/braces-
|
|
6
|
+
import { P as W } from "../chunks/palette-B9AbDw0n.js";
|
|
7
|
+
import { B as Qe } from "../chunks/braces-Q86XHDaD.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license lucide-react v0.453.0 - ISC
|
|
10
10
|
*
|