react-semaphor 0.1.364 → 0.1.366
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 +26 -24
- package/dist/chunks/{calendar-preferences-dialog-CgBwWqfY.js → calendar-preferences-dialog-BOFlzOJg.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CK_6KGFV.js → dashboard-briefing-launcher-D2lBFqAd.js} +3 -3
- package/dist/chunks/{dashboard-controls-CsIEj0Vm.js → dashboard-controls-BIk094Ah.js} +3 -3
- package/dist/chunks/{dashboard-json-OhYs9GOx.js → dashboard-json-DImOf512.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-q_XG4oWg.js → edit-dashboard-visual-DTxkV6Fl.js} +3 -3
- package/dist/chunks/{index-Ds3_EAla.js → index-BVEIk-rB.js} +5 -5
- package/dist/chunks/{resource-management-panel-CYXyE2js.js → resource-management-panel-BOfbSf48.js} +2 -2
- package/dist/chunks/{source-identity-qAmkNtEK.js → source-identity-Dj3dryN9.js} +3 -3
- package/dist/chunks/{use-create-flow-overlay-state-CRQcqLs3.js → use-create-flow-overlay-state-B5FygfQL.js} +2 -2
- package/dist/chunks/{use-visual-utils-CpZplRpR.js → use-visual-utils-CszWnFBW.js} +1 -1
- package/dist/chunks/validation-DiCE3_4O.js +1 -0
- package/dist/chunks/{validation-B4_hBuYu.js → validation-WGWJOQsV.js} +115 -94
- package/dist/chunks/{validators-BnLhuIhd.js → validators-Bxc1OmZK.js} +296 -237
- package/dist/chunks/validators-BxhJ_NtM.js +1 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +135 -134
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +3 -3
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +3 -3
- package/dist/index.js +5 -5
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +11 -1
- package/dist/types/dashboard-assistant.d.ts +2 -0
- package/dist/types/dashboard-authoring.d.ts +7 -1
- package/dist/types/data-app-builder.d.ts +2 -0
- package/dist/types/data-app-sdk-validation.d.ts +4 -0
- package/dist/types/data-app-sdk.d.ts +21 -6
- package/dist/types/main.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunks/validation-CsK42Vbq.js +0 -1
- package/dist/chunks/validators-Cu_w8ZEP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../chunks/validators-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../chunks/validators-BxhJ_NtM.js"),i=require("../chunks/catalog-field-grounding-Du6mKDcF.js"),l=require("../chunks/source-identity-C-xaeE_I.js");function c(e,a={}){const r=d(e),t={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 r.includes("postgres")?{...t,prefixLevels:["schema","table"],dialect:"postgres"}:r.includes("mysql")?{...t,prefixLevels:["database","table"],dialect:"mysql",supportsFilterClause:!1}:r.includes("mssql")||r.includes("sqlserver")?{...t,dialect:"mssql",supportsFilterClause:!1}:r.includes("redshift")?{...t,prefixLevels:["schema","table"],dialect:"redshift"}:r.includes("snowflake")?{...t,dialect:"snowflake"}:r.includes("clickhouse")?{connectionId:a.connectionId,connectionType:e,path:["database","table"],labels:{database:"Database",table:"Table"},prefixLevels:["database","table"],dialect:"clickhouse",supportsFilterClause:!1}:r==="s3"||r==="api"?{connectionId:a.connectionId,connectionType:e,path:["table"],labels:{table:r==="api"?"API Table":"File Table"},prefixLevels:["table"],dialect:"duckdb",supportsFilterClause:!0}:r==="googlesheets"||r==="fileupload"?{connectionId:a.connectionId,connectionType:e,path:["table"],labels:{table:"Table"},prefixLevels:["table"],dialect:"postgres",supportsFilterClause:!0}:r==="s3tables"?{...t,labels:{database:"Database",schema:"Namespace",table:"Table"},dialect:"duckdb"}:r==="bigquery"?{...t,labels:{database:"Project",schema:"Dataset",table:"Table"},prefixLevels:["schema","table"],dialect:"bigquery",supportsFilterClause:!1}:t}function u(e){const a=d(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";default:return"unknown"}}function m(e){return e.capabilities.prefixLevels.every(a=>!!o(e.source,a))}function p(e){const a=e.quoteIdentifier??b;return e.capabilities.prefixLevels.map(r=>o(e.source,r)).filter(r=>!!r).map(r=>a(r,e.capabilities.dialect)).join(".")}function o(e,a){return a==="database"?e.databaseName:a==="schema"?e.schemaName:e.tableName}function b(e,a){return a==="mysql"||a==="bigquery"||a==="clickhouse"||a==="duckdb"?`\`${e.replace(/`/g,"``")}\``:a==="mssql"?`[${e.replace(/]/g,"]]")}]`:`"${e.replace(/"/g,'""')}"`}function d(e){if(typeof e!="string")return"";const a=[];for(const r of e.trim().toLowerCase())f(r)&&a.push(r);return a.join("")}function f(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"},h={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:s,metrics:[{name:"revenue",role:"measure"}],primaryMetric:{name:"revenue",role:"measure"},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"},{name:"revenue",role:"measure",dataType:"number"}],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"}],orderBy:{field:{name:"revenue",role:"measure"},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:[{name:"revenue",role:"measure"}],primaryMetric:{name:"revenue",role:"measure"},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:[{name:"net_tons",role:"measure"},{name:"ticket_value",role:"measure"}],primaryMetric:{name:"net_tons",role:"measure"},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:"=",values:["Inbound"]}],limit:15},boundedSqlRanking:{version:1,kind:"sql",id:"top-customer-ranking-sql",label:"Top customer ranking SQL",source:{kind:"sql",connectionId:"conn_sales",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.normalizeSemaphorAnalyticsFilterOperator=n.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=n.normalizeSemaphorInputOperator;exports.parseSemaphorIsoTimeWindowBoundary=n.parseSemaphorIsoTimeWindowBoundary;exports.validateSemaphorAnalyticsIntent=n.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=n.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=n.validateSemaphorDashboardIntent;exports.validateSemaphorOperationIntent=n.validateSemaphorOperationIntent;exports.buildAnalyticsCatalogFieldSummary=i.buildAnalyticsCatalogFieldSummary;exports.getAnalyticsCatalogFieldCandidates=i.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=i.getAnalyticsCatalogFieldName;exports.isAnalyticsCatalogDateField=i.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=i.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=i.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=i.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=i.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=i.isAnalyticsTechnicalIdentifierField;exports.normalizeAnalyticsCatalogDataType=i.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=i.normalizeAnalyticsCatalogName;exports.preferSemaphorFieldRefMetadata=l.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=l.preferSemaphorSourceMetadata;exports.semaphorFieldRefsMatch=l.semaphorFieldRefsMatch;exports.semaphorSourceIdentityKey=l.semaphorSourceIdentityKey;exports.semaphorSourcesReferToSameDataset=l.semaphorSourcesReferToSameDataset;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=h;exports.buildSemaphorQualifiedSourcePath=p;exports.getSemaphorConnectionCapabilities=c;exports.normalizeSemaphorDialect=u;exports.semaphorSourceHasRequiredCoordinates=m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { j as
|
|
3
|
-
import { c as
|
|
1
|
+
import { a as h, n as v, p as g, v as y, c as k, d as S, b as I } from "../chunks/validators-Bxc1OmZK.js";
|
|
2
|
+
import { j as T, a as q, g as F, c as A, h as _, f as R, i as L, e as D, d as x, b as M, n as N } from "../chunks/catalog-field-grounding-DoEBOXQd.js";
|
|
3
|
+
import { c as w, p as z, b as E, s as P, a as B } from "../chunks/source-identity-Dj3dryN9.js";
|
|
4
4
|
function d(e, a = {}) {
|
|
5
5
|
const r = n(e), t = {
|
|
6
6
|
connectionId: a.connectionId,
|
|
@@ -246,29 +246,31 @@ const i = {
|
|
|
246
246
|
};
|
|
247
247
|
export {
|
|
248
248
|
p as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
|
|
249
|
-
|
|
249
|
+
T as buildAnalyticsCatalogFieldSummary,
|
|
250
250
|
m as buildSemaphorQualifiedSourcePath,
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
q as getAnalyticsCatalogFieldCandidates,
|
|
252
|
+
F as getAnalyticsCatalogFieldName,
|
|
253
253
|
d as getSemaphorConnectionCapabilities,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
254
|
+
A as isAnalyticsCatalogDateField,
|
|
255
|
+
_ as isAnalyticsCatalogDimensionField,
|
|
256
|
+
R as isAnalyticsCatalogMetricField,
|
|
257
|
+
L as isAnalyticsDateLikeDataType,
|
|
258
|
+
D as isAnalyticsMetricIdentifierField,
|
|
259
|
+
x as isAnalyticsTechnicalIdentifierField,
|
|
260
|
+
M as normalizeAnalyticsCatalogDataType,
|
|
261
|
+
N as normalizeAnalyticsCatalogName,
|
|
262
|
+
h as normalizeSemaphorAnalyticsFilterOperator,
|
|
262
263
|
c as normalizeSemaphorDialect,
|
|
263
|
-
v as
|
|
264
|
-
|
|
265
|
-
w as
|
|
266
|
-
|
|
264
|
+
v as normalizeSemaphorInputOperator,
|
|
265
|
+
g as parseSemaphorIsoTimeWindowBoundary,
|
|
266
|
+
w as preferSemaphorFieldRefMetadata,
|
|
267
|
+
z as preferSemaphorSourceMetadata,
|
|
268
|
+
E as semaphorFieldRefsMatch,
|
|
267
269
|
u as semaphorSourceHasRequiredCoordinates,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
P as semaphorSourceIdentityKey,
|
|
271
|
+
B as semaphorSourcesReferToSameDataset,
|
|
272
|
+
y as validateSemaphorAnalyticsIntent,
|
|
273
|
+
k as validateSemaphorAnalyticsRecoveryPlan,
|
|
274
|
+
S as validateSemaphorDashboardIntent,
|
|
275
|
+
I as validateSemaphorOperationIntent
|
|
274
276
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s, Fragment as X } from "react/jsx-runtime";
|
|
2
2
|
import ee, { useState as h, useCallback as F, useEffect as ae, useMemo as H } from "react";
|
|
3
|
-
import { u as re, c as te, d as se, e as ne, f as le, g as oe, R as W, h as O, C as ie, i as ce, j as de, k as ue, l as _, m as R, n as me, o as fe, p as N } from "./index-
|
|
3
|
+
import { u as re, c as te, d as se, e as ne, f as le, g as oe, R as W, h as O, C as ie, i as ce, j as de, k as ue, l as _, m as R, n as me, o as fe, p as N } from "./index-BVEIk-rB.js";
|
|
4
4
|
import { a as S, L as G, P as he, b as pe, B as j, d as ge, e as V, f as ve } from "./switch-xcWLtWs0.js";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
6
|
import { C as be } from "./chevrons-up-down-qQMadOWA.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import { c as Ie, L as wn, a2 as io, B as ge, f as ne, G as ct, u as H, E as bt, aK as Fr, aa as ba, g as ze, e as Ke, H as xa, a as v, J as Fn, X as Ce, P as Re, b as tt, d as nt, aL as lo, aM as co, aI as ya, aN as va, a3 as Qe, a4 as Ye, a5 as Xe, a6 as Ze, a7 as he, V as uo, aO as Na, aP as wa, a0 as et, T as mo, K as ho, M as Pr, aQ as po } from "./switch-xcWLtWs0.js";
|
|
3
|
-
import { c as ut, d as mt, e as ht, f as pt, g as ft, bc as fo, o as Ca, ag as go, ah as bo, av as ka, bO as xo, p as fe, aw as Cn, y as yo, aN as Pn, aO as Mn, aQ as Bn, aR as je, aV as Sa, aI as Kt, bP as vo, bQ as No, b0 as On, b1 as Vn, b2 as $n, b3 as Un, b4 as _n, b5 as jn, b6 as zn, u as It, $ as ot, aa as Kn, a6 as Aa, a7 as Hn, a0 as Ea, a5 as wo, ac as Co, bJ as ko, bR as So, aK as Ao, a8 as Mr, x as Vt, a2 as Eo, bS as Io, bT as Do, bU as To, bV as Lo, bW as Ro, bX as Fo, bY as Po, bZ as Mo, b_ as Ia, b$ as Bo, c0 as Oo, c1 as Vo, c2 as $o, c3 as Uo, c4 as gt, c5 as _o, bI as Da, ax as Ta, c6 as jo, c7 as zo, c8 as Ko, c9 as Ho, ca as qo, cb as Wo, cc as Go, cd as La, ce as Jo, cf as Qo, cg as Ra, ch as Fa, ci as Pa, cj as Yo, ck as Xo, b9 as Ma, by as Zo, bv as ei, cl as ti, aW as ni, cm as Ba, cn as ri, co as ai, aX as Br, cp as si, cq as oi, cr as kn, cs as ii, ct as li, cu as Oa, cv as qn, cw as di, cx as ci, cy as ui, cz as Va, cA as Dt, cB as $a, az as Sn, b7 as Ua, cC as mi, cD as hi, ay as An, cE as pi, cF as _a, cG as fi, cH as gi, cI as bi, cJ as xi, cK as yi, cL as vi, cM as Ni, cN as wi } from "./index-
|
|
4
|
-
import { V as Ci, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei, C as Ii, u as ja, e as za, f as Di, R as Ti, S as Li } from "./use-create-flow-overlay-state-
|
|
3
|
+
import { c as ut, d as mt, e as ht, f as pt, g as ft, bc as fo, o as Ca, ag as go, ah as bo, av as ka, bO as xo, p as fe, aw as Cn, y as yo, aN as Pn, aO as Mn, aQ as Bn, aR as je, aV as Sa, aI as Kt, bP as vo, bQ as No, b0 as On, b1 as Vn, b2 as $n, b3 as Un, b4 as _n, b5 as jn, b6 as zn, u as It, $ as ot, aa as Kn, a6 as Aa, a7 as Hn, a0 as Ea, a5 as wo, ac as Co, bJ as ko, bR as So, aK as Ao, a8 as Mr, x as Vt, a2 as Eo, bS as Io, bT as Do, bU as To, bV as Lo, bW as Ro, bX as Fo, bY as Po, bZ as Mo, b_ as Ia, b$ as Bo, c0 as Oo, c1 as Vo, c2 as $o, c3 as Uo, c4 as gt, c5 as _o, bI as Da, ax as Ta, c6 as jo, c7 as zo, c8 as Ko, c9 as Ho, ca as qo, cb as Wo, cc as Go, cd as La, ce as Jo, cf as Qo, cg as Ra, ch as Fa, ci as Pa, cj as Yo, ck as Xo, b9 as Ma, by as Zo, bv as ei, cl as ti, aW as ni, cm as Ba, cn as ri, co as ai, aX as Br, cp as si, cq as oi, cr as kn, cs as ii, ct as li, cu as Oa, cv as qn, cw as di, cx as ci, cy as ui, cz as Va, cA as Dt, cB as $a, az as Sn, b7 as Ua, cC as mi, cD as hi, ay as An, cE as pi, cF as _a, cG as fi, cH as gi, cI as bi, cJ as xi, cK as yi, cL as vi, cM as Ni, cN as wi } from "./index-BVEIk-rB.js";
|
|
4
|
+
import { V as Ci, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei, C as Ii, u as ja, e as za, f as Di, R as Ti, S as Li } from "./use-create-flow-overlay-state-B5FygfQL.js";
|
|
5
5
|
import Ri, { useState as A, useContext as Fi, useRef as Ee, useCallback as pe, useEffect as ue, useMemo as O } from "react";
|
|
6
|
-
import { u as Ka } from "./use-visual-utils-
|
|
6
|
+
import { u as Ka } from "./use-visual-utils-CszWnFBW.js";
|
|
7
7
|
import "./index-CuHybtft.js";
|
|
8
8
|
import { l as $r } from "./date-formatter-CzcPZx39.js";
|
|
9
9
|
import "./index-CJdxSyQq.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import { c as B, u as N, B as _, aA as dt, E as Vt, L as jr, a2 as qr, a as te, aB as Hr, aC as Vr, aD as rt, aE as me, aF as ct, aG as Kt, f as $e, X as Qt, aH as Wt, aI as Kr, G as Rt, Z as Qr, _ as Wr, $ as Jr, a1 as Xr, S as Ut, j as Yr, aJ as Zr } from "./switch-xcWLtWs0.js";
|
|
3
|
-
import { bg as ea, u as G, c as Jt, bh as ta, aI as re, d as Xt, e as ra, f as at, g as nt, o as aa, bi as ue, aV as Fe, bj as na, bk as Tt, bl as Yt, bm as Zt, bn as sa, b9 as lt, bo as oa, bp as ia, bq as da, br as ca, bs as la, bt as ua, ae as pe, bu as he, p as C, bv as ma, bw as er, az as ut, be as pa, bx as ha, by as fa, aU as tr, aX as rr, ay as ga, aM as ba, bz as xa, bA as va, z as ya, y as Ue, K as wa, A as Xe, bB as Na, bC as Sa, bD as Da, _ as ka, bE as Ca, I as Ye, bF as Ea, bG as La, bH as Ia, bI as Aa, aN as Ma, aO as Pa, aP as Oa, aQ as _a, aR as $, bJ as Ra, aS as Ft, bK as Ua, bL as Ta, bM as Fa, J as $a, bN as Ga, b0 as Ba, b1 as za, b2 as ja, b3 as qa, b4 as Ha, b5 as Va, b6 as Ka, b7 as $t, w as st } from "./index-
|
|
3
|
+
import { bg as ea, u as G, c as Jt, bh as ta, aI as re, d as Xt, e as ra, f as at, g as nt, o as aa, bi as ue, aV as Fe, bj as na, bk as Tt, bl as Yt, bm as Zt, bn as sa, b9 as lt, bo as oa, bp as ia, bq as da, br as ca, bs as la, bt as ua, ae as pe, bu as he, p as C, bv as ma, bw as er, az as ut, be as pa, bx as ha, by as fa, aU as tr, aX as rr, ay as ga, aM as ba, bz as xa, bA as va, z as ya, y as Ue, K as wa, A as Xe, bB as Na, bC as Sa, bD as Da, _ as ka, bE as Ca, I as Ye, bF as Ea, bG as La, bH as Ia, bI as Aa, aN as Ma, aO as Pa, aP as Oa, aQ as _a, aR as $, bJ as Ra, aS as Ft, bK as Ua, bL as Ta, bM as Fa, J as $a, bN as Ga, b0 as Ba, b1 as za, b2 as ja, b3 as qa, b4 as Ha, b5 as Va, b6 as Ka, b7 as $t, w as st } from "./index-BVEIk-rB.js";
|
|
4
4
|
import "./index-CuHybtft.js";
|
|
5
5
|
import * as I from "react";
|
|
6
6
|
import ar, { useState as w, useMemo as K, useEffect as Ge, useRef as Gt, useLayoutEffect as Qa, useCallback as Wa } from "react";
|
|
7
7
|
import "./index-CJdxSyQq.js";
|
|
8
8
|
import "react-dom/client";
|
|
9
9
|
import { createPortal as Ja } from "react-dom";
|
|
10
|
-
import { L as Xa, b as Ya, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-
|
|
10
|
+
import { L as Xa, b as Ya, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-D2lBFqAd.js";
|
|
11
11
|
import { d as nr } from "./index-DFOb_6HB.js";
|
|
12
|
-
import { C as dn } from "./calendar-preferences-dialog-
|
|
12
|
+
import { C as dn } from "./calendar-preferences-dialog-BOFlzOJg.js";
|
|
13
13
|
import { u as cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
14
14
|
import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
15
15
|
import { P as ln } from "./palette-DPuAc82h.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo as m, useState as b, useRef as f, useEffect as p } from "react";
|
|
3
3
|
import "./index-CuHybtft.js";
|
|
4
4
|
import { u as o, a as S, B as N, X as D, C as J } from "./switch-xcWLtWs0.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-BVEIk-rB.js";
|
|
6
6
|
import "./index-CJdxSyQq.js";
|
|
7
7
|
import "react-dom/client";
|
|
8
8
|
import "react-dom";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import * as vc from "react";
|
|
3
3
|
import en, { useState as K, useEffect as Se, useRef as Fe, useCallback as Oe, useMemo as ce, useContext as Nr, Suspense as yc } from "react";
|
|
4
|
-
import { cO as Di, c as On, d as Mn, e as Fn, f as Rn, g as Zn, o as ms, as as St, ax as Ct, cP as Ei, cQ as ls, p as nt, cR as Ai, cx as is, c4 as Da, aI as bt, ay as $t, bI as Cr, cm as ra, az as $a, at as vt, cS as hs, cE as wr, cT as Nc, cU as Oi, cV as Cc, ae as vs, cW as wc, cX as Sc, cY as dr, cZ as os, u as bn, z as Mi, c_ as Tc, c$ as kc, d0 as Fi, d1 as Ri, d2 as Ic, d3 as Dc, d4 as Ec, am as Bn, an as vn, ao as yn, ap as qa, aq as tn, ar as Jn, d5 as ur, bF as Ta, d6 as Li, d7 as an, d8 as ht, d9 as Ac, da as Pi, b_ as hn, cF as Vi, db as Sr, dc as Bi, dd as Oc, de as Mc, df as Fc, dg as Rc, dh as Lc, di as Pc, dj as Vc, dk as Bc, dl as _c, dm as Bs, dn as zc, dp as Bl, dq as $c, dr as _l, ds as qc, dt as jc, du as Kc, dv as Yn, aD as Qt, aF as Jt, dw as _i, dx as Tr, b9 as kr, bP as Ir, dy as Dr, dz as Uc, dA as zi, dB as $i, dC as qi, dD as Ht, dE as Gc, dF as Hc, dG as Wc, dH as Qc, dI as ji, dJ as Ki, W as Ui, dK as Gi, dL as Jc, dM as Yc, dN as Xc, dO as Ea, dP as Zc, dQ as ed, dR as zl, dS as td, E as ys, t as Er, dT as nd, dU as Ar, bh as ad, dV as $l, I as pt, dW as sd, dX as rd, dY as Hi, dZ as Wi, bG as ld, d_ as Or, d$ as Mr, be as Ns, e0 as Qi, e1 as Ji, e2 as ql, e3 as ja, e4 as id, e5 as od, e6 as cd, e7 as dd, e8 as ud, a_ as Fr, e9 as md, ea as hd, eb as Yi, ec as Xi, ed as pd, ee as fd, ef as gd, eg as xd, eh as Zi, ei as bd, ej as vd, ek as Cs, el as ws, aN as la, aO as ia, aQ as oa, bi as Aa, aV as Wt, em as cn, en as Ln, eo as Pn, ep as pn, eq as ea, er as yd, es as Nd, et as Cd, eu as wd, ev as Sd, ew as Td, ex as kd, ey as Id, ez as jl, aE as nn, eA as Dd, eB as Ed, eC as Ad, eD as Od, eE as eo, eF as Md, eG as Fd, eH as Rd, eI as Ld, eJ as Pd, eK as mr, eL as Vd, eM as Bd, eN as hr, eO as pr, eP as _d, eQ as zd, eR as $d, eS as qd, eT as Kl, bQ as fr, eU as fn, b0 as jd, eV as Kd, b1 as Ud, b2 as Gd, b3 as Hd, b4 as Wd, b5 as Qd, b6 as Jd, b7 as Yd, aR as ct, aM as Xd, eW as Zd, eX as ta, eY as na, eZ as aa, aP as Rr, bJ as eu, aS as tu, e_ as nu, e$ as au, f0 as su, f1 as Ss, f2 as st, f3 as rt, f4 as lt, cC as ru, cD as lu, f5 as to, f6 as no, cz as iu, f7 as ou, f8 as cu, f9 as du, fa as uu, fb as mu, fc as hu, fd as pu, fe as fu, ff as gu, fg as xu, fh as bu, fi as vu, fj as kn, fk as Na, fl as Xn, fm as yu, fn as Ul, fo as Nu, fp as Cu, fq as _s, fr as Gl, fs as wu, ft as Su, fu as Tu, fv as ku, fw as Iu, R as Lr, h as Oa, fx as zs, fy as ao, fz as Du, fA as ps, fB as Eu, fC as so, fD as Au, fE as ro, ci as Ou, fF as Mu, a3 as Fu, fG as ns, fH as Ru, fI as Hl, fJ as Lu, fK as Pu, fL as Wl, fM as Vu, fN as Bu, fO as _u, fP as zu, fQ as $u, cy as qu, cA as ju, fR as lo, fS as Ku, fT as Uu, fU as Gu, fV as Hu, fW as Wu, fX as Qu, fY as Ju, fZ as Yu, f_ as Xu, f$ as io, g0 as Zu, g1 as Ts, b$ as ks, g2 as oo, g3 as em, g4 as tm, g5 as co, g6 as nm, g7 as am, g8 as Is, g9 as $s, ga as sm, gb as rm, gc as lm, gd as im, ge as om, gf as Ql, gg as sa, gh as uo, gi as cm, cB as dm, gj as mo, gk as ho, gl as cs, gm as po, gn as fo, go as Jl, gp as um, gq as mm, gr as ds, gs as hm, gt as Pr, gu as pm, gv as fs, C as Ma, i as Fa, k as Ra, j as La, l as Pa, m as Va, gw as fm, gx as Ba, gy as dn, gz as gr, gA as xr, gB as _a, gC as go, gD as gm, gE as qs, gF as js, gG as xm, gH as Ks, gI as bm, gJ as Yl, gK as Xl, cI as vm, gL as ym, cJ as Nm, cL as Cm, cM as wm, y as Sm, gM as Tm, gN as km, gO as Im, bK as Dm, bL as Em, bM as Am, aX as Ds, cv as Es, gP as Zl, gQ as xo, c6 as Us, gR as Om, gS as Mm, gT as Fm, F as Rm, av as Lm, gU as Pm, gV as Vm, aw as Bm } from "./index-
|
|
4
|
+
import { cO as Di, c as On, d as Mn, e as Fn, f as Rn, g as Zn, o as ms, as as St, ax as Ct, cP as Ei, cQ as ls, p as nt, cR as Ai, cx as is, c4 as Da, aI as bt, ay as $t, bI as Cr, cm as ra, az as $a, at as vt, cS as hs, cE as wr, cT as Nc, cU as Oi, cV as Cc, ae as vs, cW as wc, cX as Sc, cY as dr, cZ as os, u as bn, z as Mi, c_ as Tc, c$ as kc, d0 as Fi, d1 as Ri, d2 as Ic, d3 as Dc, d4 as Ec, am as Bn, an as vn, ao as yn, ap as qa, aq as tn, ar as Jn, d5 as ur, bF as Ta, d6 as Li, d7 as an, d8 as ht, d9 as Ac, da as Pi, b_ as hn, cF as Vi, db as Sr, dc as Bi, dd as Oc, de as Mc, df as Fc, dg as Rc, dh as Lc, di as Pc, dj as Vc, dk as Bc, dl as _c, dm as Bs, dn as zc, dp as Bl, dq as $c, dr as _l, ds as qc, dt as jc, du as Kc, dv as Yn, aD as Qt, aF as Jt, dw as _i, dx as Tr, b9 as kr, bP as Ir, dy as Dr, dz as Uc, dA as zi, dB as $i, dC as qi, dD as Ht, dE as Gc, dF as Hc, dG as Wc, dH as Qc, dI as ji, dJ as Ki, W as Ui, dK as Gi, dL as Jc, dM as Yc, dN as Xc, dO as Ea, dP as Zc, dQ as ed, dR as zl, dS as td, E as ys, t as Er, dT as nd, dU as Ar, bh as ad, dV as $l, I as pt, dW as sd, dX as rd, dY as Hi, dZ as Wi, bG as ld, d_ as Or, d$ as Mr, be as Ns, e0 as Qi, e1 as Ji, e2 as ql, e3 as ja, e4 as id, e5 as od, e6 as cd, e7 as dd, e8 as ud, a_ as Fr, e9 as md, ea as hd, eb as Yi, ec as Xi, ed as pd, ee as fd, ef as gd, eg as xd, eh as Zi, ei as bd, ej as vd, ek as Cs, el as ws, aN as la, aO as ia, aQ as oa, bi as Aa, aV as Wt, em as cn, en as Ln, eo as Pn, ep as pn, eq as ea, er as yd, es as Nd, et as Cd, eu as wd, ev as Sd, ew as Td, ex as kd, ey as Id, ez as jl, aE as nn, eA as Dd, eB as Ed, eC as Ad, eD as Od, eE as eo, eF as Md, eG as Fd, eH as Rd, eI as Ld, eJ as Pd, eK as mr, eL as Vd, eM as Bd, eN as hr, eO as pr, eP as _d, eQ as zd, eR as $d, eS as qd, eT as Kl, bQ as fr, eU as fn, b0 as jd, eV as Kd, b1 as Ud, b2 as Gd, b3 as Hd, b4 as Wd, b5 as Qd, b6 as Jd, b7 as Yd, aR as ct, aM as Xd, eW as Zd, eX as ta, eY as na, eZ as aa, aP as Rr, bJ as eu, aS as tu, e_ as nu, e$ as au, f0 as su, f1 as Ss, f2 as st, f3 as rt, f4 as lt, cC as ru, cD as lu, f5 as to, f6 as no, cz as iu, f7 as ou, f8 as cu, f9 as du, fa as uu, fb as mu, fc as hu, fd as pu, fe as fu, ff as gu, fg as xu, fh as bu, fi as vu, fj as kn, fk as Na, fl as Xn, fm as yu, fn as Ul, fo as Nu, fp as Cu, fq as _s, fr as Gl, fs as wu, ft as Su, fu as Tu, fv as ku, fw as Iu, R as Lr, h as Oa, fx as zs, fy as ao, fz as Du, fA as ps, fB as Eu, fC as so, fD as Au, fE as ro, ci as Ou, fF as Mu, a3 as Fu, fG as ns, fH as Ru, fI as Hl, fJ as Lu, fK as Pu, fL as Wl, fM as Vu, fN as Bu, fO as _u, fP as zu, fQ as $u, cy as qu, cA as ju, fR as lo, fS as Ku, fT as Uu, fU as Gu, fV as Hu, fW as Wu, fX as Qu, fY as Ju, fZ as Yu, f_ as Xu, f$ as io, g0 as Zu, g1 as Ts, b$ as ks, g2 as oo, g3 as em, g4 as tm, g5 as co, g6 as nm, g7 as am, g8 as Is, g9 as $s, ga as sm, gb as rm, gc as lm, gd as im, ge as om, gf as Ql, gg as sa, gh as uo, gi as cm, cB as dm, gj as mo, gk as ho, gl as cs, gm as po, gn as fo, go as Jl, gp as um, gq as mm, gr as ds, gs as hm, gt as Pr, gu as pm, gv as fs, C as Ma, i as Fa, k as Ra, j as La, l as Pa, m as Va, gw as fm, gx as Ba, gy as dn, gz as gr, gA as xr, gB as _a, gC as go, gD as gm, gE as qs, gF as js, gG as xm, gH as Ks, gI as bm, gJ as Yl, gK as Xl, cI as vm, gL as ym, cJ as Nm, cL as Cm, cM as wm, y as Sm, gM as Tm, gN as km, gO as Im, bK as Dm, bL as Em, bM as Am, aX as Ds, cv as Es, gP as Zl, gQ as xo, c6 as Us, gR as Om, gS as Mm, gT as Fm, F as Rm, av as Lm, gU as Pm, gV as Vm, aw as Bm } from "./index-BVEIk-rB.js";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
6
|
import { c as ze, H as Ne, B as ee, Y as gs, N as Ka, a as Y, aR as _m, L as $, a3 as ne, a4 as ae, a5 as se, a6 as re, a7 as j, g as Dt, X as et, G as O, a1 as Tt, Z as Pt, _ as kt, $ as It, P as Et, b as Ft, d as At, C as gn, aS as zm, aJ as ka, aT as Vr, aU as bo, aG as Br, aE as $m, a2 as Re, aV as qm, f as xn, u as Ee, e as Nn, aW as _r, aX as Ua, E as vo, T as Ga, K as Ha, M as Yt, O as En, a0 as Xt, W as As, J as Vn, k as jm, aK as An, aY as Km, aZ as Um, a_ as yo, ai as Gm, aM as Hm, a$ as Wm, b0 as Qm, b1 as ei, b2 as Jm, b3 as Ym, b4 as Xm, b5 as Zm, aQ as eh, b6 as th, b7 as ti, b8 as nh, b9 as ni, R as br, ba as ca, bb as ah, a8 as Je, bc as sh, bd as za, be as xs, bf as un, bg as as, bh as ai, bi as rh, bj as Lt, bk as lh, V as No, bl as at, v as si, bm as ih, bn as oh, bo as ch, bp as dh, bq as uh, br as mh, bs as hh, bt as ph, bu as fh, bv as gh, bw as xh, bx as bh, az as ri, by as vh, bz as yh, bA as Nh, Q as Os } from "./switch-xcWLtWs0.js";
|
|
7
|
-
import { f as Ch, g as ft, S as wh, h as Co, V as wo, u as Sh, e as Th, R as Ms, C as li } from "./use-create-flow-overlay-state-
|
|
8
|
-
import { r as So, f as Wa } from "./use-visual-utils-
|
|
7
|
+
import { f as Ch, g as ft, S as wh, h as Co, V as wo, u as Sh, e as Th, R as Ms, C as li } from "./use-create-flow-overlay-state-B5FygfQL.js";
|
|
8
|
+
import { r as So, f as Wa } from "./use-visual-utils-CszWnFBW.js";
|
|
9
9
|
import { C as To } from "./chevrons-up-down-qQMadOWA.js";
|
|
10
10
|
import { createPortal as kh } from "react-dom";
|
|
11
11
|
import "./index-CJdxSyQq.js";
|
|
@@ -29,7 +29,7 @@ import { i as eye, g as tye, c as PR, d as nye, f as qf, a as jw, b as xm, j as
|
|
|
29
29
|
import { t as PO, c as rye, j as FO, k as vK, f as uo, i as oye, h as F6, d as wK } from "./index-DFOb_6HB.js";
|
|
30
30
|
import { a as xs, b as O6 } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
31
31
|
import { a as Ss, c as L6, C as hf, i as CK, b as iye, d as aye } from "./common-types-4bjoIgvm.js";
|
|
32
|
-
import {
|
|
32
|
+
import { a as sye } from "./source-identity-Dj3dryN9.js";
|
|
33
33
|
import { isDashboardAssistantVisualToolPartType as SK } from "../dashboard-assistant/index.js";
|
|
34
34
|
import { D as lye } from "./contracts-CoCOpd_i.js";
|
|
35
35
|
import { createFrameLayouts as cye } from "../layouts/index.js";
|
|
@@ -144156,10 +144156,10 @@ function vkt() {
|
|
|
144156
144156
|
}
|
|
144157
144157
|
);
|
|
144158
144158
|
}
|
|
144159
|
-
const wkt = Fw(() => import("./dashboard-controls-
|
|
144160
|
-
() => import("./edit-dashboard-visual-
|
|
144161
|
-
), Skt = Fw(() => import("./dashboard-json-
|
|
144162
|
-
() => import("./resource-management-panel-
|
|
144159
|
+
const wkt = Fw(() => import("./dashboard-controls-BIk094Ah.js")), Ckt = Fw(
|
|
144160
|
+
() => import("./edit-dashboard-visual-DTxkV6Fl.js")
|
|
144161
|
+
), Skt = Fw(() => import("./dashboard-json-DImOf512.js")), Nkt = Fw(
|
|
144162
|
+
() => import("./resource-management-panel-BOfbSf48.js").then(
|
|
144163
144163
|
(e) => ({ default: e.ResourceManagementPanel })
|
|
144164
144164
|
)
|
|
144165
144165
|
);
|
package/dist/chunks/{resource-management-panel-CYXyE2js.js → resource-management-panel-BOfbSf48.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as oe } from "react/jsx-runtime";
|
|
2
2
|
import { c as He, u as se, G as Ge, a as Z, B as O, f as te, N as be, V as $e, L as ie, a2 as de, X as ke, Z as We, _ as Xe, $ as Ye, a1 as Ze, az as Je } from "./switch-xcWLtWs0.js";
|
|
3
3
|
import Qe, { useState as b, useEffect as ee, useRef as qe } from "react";
|
|
4
|
-
import { ah as ue, aL as et, aM as tt, aI as ce, aN as nt, aO as at, aP as st, aQ as it, aR as Y, aS as ot, aT as rt, aU as lt, aV as xe, az as he, aW as dt, aX as ct, aY as Ne, aZ as we, a_ as ut, J as ye, A as Ce, a$ as ve, b0 as Se, b1 as Ee, b2 as Ve, b3 as Le, b4 as Ae, b5 as Oe, b6 as Te, b7 as Re, b8 as ht, b9 as pe, ba as pt, y as ae, u as mt, bb as Ue, c as Ie, d as ze, e as Me, f as Pe, g as Fe, bc as ft, o as je, bd as gt, be as De, bf as xt } from "./index-
|
|
4
|
+
import { ah as ue, aL as et, aM as tt, aI as ce, aN as nt, aO as at, aP as st, aQ as it, aR as Y, aS as ot, aT as rt, aU as lt, aV as xe, az as he, aW as dt, aX as ct, aY as Ne, aZ as we, a_ as ut, J as ye, A as Ce, a$ as ve, b0 as Se, b1 as Ee, b2 as Ve, b3 as Le, b4 as Ae, b5 as Oe, b6 as Te, b7 as Re, b8 as ht, b9 as pe, ba as pt, y as ae, u as mt, bb as Ue, c as Ie, d as ze, e as Me, f as Pe, g as Fe, bc as ft, o as je, bd as gt, be as De, bf as xt } from "./index-BVEIk-rB.js";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
|
-
import { u as Be } from "./use-visual-utils-
|
|
6
|
+
import { u as Be } from "./use-visual-utils-CszWnFBW.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as te, G as L, H as ne, u as oe, Z as ft, _ as ht, $ as gt, a as ie, a1 as bt, a9 as yt, B as V, e as xt, X as Ke, E as Pe, f as Ye, S as Ge, aa as vt, ab as Ct, ac as se, ad as Ae, ae as ze, af as be, ag as ye, ah as kt, ai as Me, aj as Nt, ak as St, al as le, am as Dt, an as Oe, g as Be, ao as Xe, ap as Je, aq as Ze, L as P, a2 as We, a3 as xe, a4 as ve, a5 as Ce, a6 as ke, a7 as Ne, ar as et, as as wt, at as It, au as Re, av as Et, aw as Qe, ax as Tt, ay as Se } from "./switch-xcWLtWs0.js";
|
|
2
2
|
import { useEffect as de, useMemo as z, useState as Q, useRef as De, useCallback as O, Fragment as Vt } from "react";
|
|
3
|
-
import { al as _t, am as tt, an as qt, ao as Ft, ap as Lt, aq as At, ar as zt, y as Mt, as as Ot, ae as ue, at, ag as rt, au as st, av as Bt, p as R, aw as Rt, ax as Qt, ay as je, az as jt, aA as Ut, aB as lt, aC as nt, aD as Ht, aE as $t, aF as Kt, aG as Pt, aH as Yt, aI as Gt, aJ as Xt, aK as Jt } from "./index-
|
|
3
|
+
import { al as _t, am as tt, an as qt, ao as Ft, ap as Lt, aq as At, ar as zt, y as Mt, as as Ot, ae as ue, at, ag as rt, au as st, av as Bt, p as R, aw as Rt, ax as Qt, ay as je, az as jt, aA as Ut, aB as lt, aC as nt, aD as Ht, aE as $t, aF as Kt, aG as Pt, aH as Yt, aI as Gt, aJ as Xt, aK as Jt } from "./index-BVEIk-rB.js";
|
|
4
4
|
import { jsx as t, jsxs as d, Fragment as $ } from "react/jsx-runtime";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
|
-
import { u as we } from "./use-visual-utils-
|
|
6
|
+
import { u as we } from "./use-visual-utils-CszWnFBW.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as X, u as Y, ae as Z, af as ee, ag as te, ah as re, ai as se, aj as ae, p as V, ak as oe } from "./index-
|
|
1
|
+
import { ad as X, u as Y, ae as Z, af as ee, ag as te, ah as re, ai as se, aj as ae, p as V, ak as oe } from "./index-BVEIk-rB.js";
|
|
2
2
|
import { H as ne, E as ie, u as b, G as H, I as ce } from "./switch-xcWLtWs0.js";
|
|
3
3
|
import { useState as z, useEffect as de, useCallback as A } from "react";
|
|
4
4
|
function le(e) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M=require("./validators-BxhJ_NtM.js"),c=require("./source-identity-C-xaeE_I.js");function g(e){var r;const t=O(e);return{version:1,kind:"metric",id:e.id,label:e.label,source:y(e),metrics:t,primaryMetric:D(e,t),dateField:e.dateField?a(e.dateField,"date"):void 0,timeGrain:e.timeGrain,dimensions:(r=e.dimensions)==null?void 0:r.map(o=>a(o,"dimension")),comparison:J(e.comparison),orderBy:e.orderBy?{field:a(e.orderBy.field),direction:e.orderBy.direction}:void 0,inputs:v(e.inputs),limit:e.limit}}function w(e){var r;return{...g(e),...e.timeWindow?{timeWindow:e.timeWindow}:{},...(r=e.filters)!=null&&r.length?{filters:e.filters}:{},...e.analysis?{analysis:e.analysis}:{}}}function B(e){return{...e.chartTitle?{chartTitle:e.chartTitle}:{},...e.chartType?{chartType:e.chartType}:{},...e.driverMode?{driverMode:e.driverMode}:{},...e.includePopulation!==void 0?{includePopulation:e.includePopulation}:{},...e.calendarContext?{calendarContext:e.calendarContext}:{}}}function D(e,t){if(!e.primaryMetric)return t[0]||{name:"",role:"measure"};const r=a(e.primaryMetric,"measure"),o=N(r,t),i=o.length===1?o[0]:void 0;return i?b(r,i):r}function O(e){const t=[];for(const r of e.metrics.map(o=>a(o,"measure"))){if(!r.name)continue;const o=t.findIndex(i=>H(i,r));if(o===-1){t.push(r);continue}t[o]=b(t[o],r)}return t}function H(e,t){return c.semaphorFieldRefsMatch(e,t)&&u(e)===u(t)}function j(e,t){return u(t)===u(e)}function q(e,t){return t.name!==e.name||e.source&&!c.semaphorFieldRefsMatch(t,e)?!1:j(e,t)}function N(e,t){const r=t.filter(o=>q(e,o));return e.aggregate!==void 0,r}function u(e){return(e.aggregate||"SUM").toUpperCase()}function b(e,t){if(e.aggregate&&t.aggregate&&e.aggregate!==t.aggregate)throw new Error(`Metric "${e.name}" was requested with conflicting aggregate semantics: ${e.aggregate} and ${t.aggregate}.`);return{...c.preferSemaphorFieldRefMetadata(e,t),aggregate:e.aggregate||t.aggregate}}function _(e){var r;if("sort"in e)throw new Error("useSemaphorRecords supports orderBy for a single deterministic sort. Multiple sort clauses are not supported by the analytics protocol yet.");if(!K(e))throw new Error("useSemaphorRecords needs at least one field.");const t=E(e.fields);return{version:1,kind:"records",id:e.id,label:e.label,source:y(e),fields:t,dateField:e.dateField?a(e.dateField,"date"):void 0,timeGrain:e.timeGrain,...e.timeWindow?{timeWindow:e.timeWindow}:{},...(r=e.filters)!=null&&r.length?{filters:e.filters}:{},orderBy:e.orderBy?{field:a(e.orderBy.field),direction:e.orderBy.direction}:void 0,inputs:v(e.inputs),limit:e.limit}}function E(e){return e.map(t=>{const r=a(t);if(!r.role)throw new Error(`useSemaphorRecords field "${r.name}" needs an explicit role.`);return r})}function $(e){return{version:1,kind:"inputOptions",id:e.id,label:e.label,source:y(e),field:a(e.field,"dimension"),search:e.search,limit:e.limit}}function C(e){if("toAnalyticsInput"in e){const t=e.toAnalyticsInput();return{inputId:t.inputId,...t.field?{field:t.field}:{}}}return{inputId:e.inputId,...e.field?{field:e.field}:{}}}function W(e){const t=v(e);return t.length>0?t:void 0}function F(e){return(e||[]).map(Q)}function U(e){return F(e).filter(t=>t.isActive)}function V(e){if(e.kind==="filter"){const t=L(e.operator,e.id);return{inputId:e.id,kind:e.kind,label:e.label,field:a(e.field,"dimension"),operator:t||"in"}}return{inputId:e.id,kind:e.kind,label:e.label}}function G(e=[]){return e.map(t=>typeof t=="object"?t:{label:String(t),value:t})}function T(e){return e==null?!1:Array.isArray(e)?e.length>0:typeof e=="string"?e.trim().length>0:!0}function Q(e){return"toAnalyticsInput"in e?e.toAnalyticsInput():"kind"in e&&"isActive"in e?e:{...e,kind:"filter",isActive:T(e.value),value:e.value}}function y(e){return e.source}function K(e){var t;return!!((t=e.fields)!=null&&t.length)}function a(e,t){return{...e,role:e.role||t}}function v(e){return(e||[]).map(C)}function J(e){if(e)return e}function L(e,t){if(e===void 0)return;const r=M.normalizeSemaphorInputOperator(e);if(!r)throw new Error(`useSemaphorInput "${t}" uses unsupported filter operator "${e}".`);return r}function x(e,t={}){const r=t.pathPrefix||"analysisOptions";if(e===void 0)return{ok:!0};if(!e||typeof e!="object"||Array.isArray(e))return s(r,"Data App analysis options must be an object.");const o=e,i={};if(o.chartTitle!==void 0){if(typeof o.chartTitle!="string")return s(`${r}.chartTitle`,'Data App analysis option "chartTitle" must be a string.');i.chartTitle=o.chartTitle}if(o.chartType!==void 0){if(typeof o.chartType!="string")return s(`${r}.chartType`,'Data App analysis option "chartType" must be a string.');i.chartType=o.chartType}if(o.driverMode!==void 0){if(!Z(o.driverMode))return s(`${r}.driverMode`,'Data App analysis option "driverMode" must be absolute_delta, largest_negative, largest_positive, positive_and_negative, or all.');i.driverMode=o.driverMode}if(o.includePopulation!==void 0){if(typeof o.includePopulation!="boolean")return s(`${r}.includePopulation`,'Data App analysis option "includePopulation" must be a boolean.');i.includePopulation=o.includePopulation}if(o.calendarContext!==void 0){const n=te(o.calendarContext,{pathPrefix:`${r}.calendarContext`,validateTimezone:t.validateTimezone});if(!n.ok)return n;i.calendarContext=n.calendarContext}return{ok:!0,analysisOptions:i}}function X(e){const t=e.hooks.map((i,n)=>Y(i,n,{fieldCatalogs:e.fieldCatalogs||[],requireFieldCatalog:!!e.requireFieldCatalog,validateTimezone:e.validateTimezone})),r=t.flatMap(i=>i.diagnostics),o=t.map(i=>i.executionResult);return{ok:r.every(i=>i.severity!=="error"),diagnostics:r,hooks:t,intents:t.flatMap(i=>i.intent?[i.intent]:[]),executionResults:o}}function Y(e,t,r){const o=`hooks.${t}`;try{const i=re(e),n=fe(e,i),d=M.validateSemaphorAnalyticsIntent(i),l=[...d.errors.map(m=>I(m,{hook:e.hook,hookId:n,pathPrefix:o,severity:"error",intent:i})),...d.warnings.map(m=>I(m,{hook:e.hook,hookId:n,pathPrefix:o,severity:"warning",intent:i})),...ie({hookSpec:e,hookId:n,intent:i,pathPrefix:o,fieldCatalogs:r.fieldCatalogs,requireFieldCatalog:r.requireFieldCatalog}),...ae({hookSpec:e,hookId:n,intent:i,pathPrefix:o,validateTimezone:r.validateTimezone})],f=ce(d,l);return{hook:e.hook,hookId:n,intent:i,diagnostics:l,executionResult:A({intent:i,validation:f,diagnostics:l})}}catch(i){const n={severity:"error",code:"invalid_hook_spec",message:i instanceof Error?i.message:String(i),path:o,hook:e.hook,hookId:P(e.spec)},d=z([n]);return{hook:e.hook,hookId:n.hookId,diagnostics:[n],executionResult:A({validation:d,diagnostics:[n]})}}}function s(e,t){return{ok:!1,issues:[{code:"invalid_analysis_option",message:t,path:e}]}}function Z(e){return e==="absolute_delta"||e==="largest_negative"||e==="largest_positive"||e==="positive_and_negative"||e==="all"}function ee(e){return e.trim().length>0&&!Number.isNaN(Date.parse(e))}function te(e,t){var f;if(!e||typeof e!="object"||Array.isArray(e))return s(t.pathPrefix,'Data App analysis option "calendarContext" must be an object.');const r=e,o=r.tz,i=r.weekStart,n=r.anchor,d=n&&typeof n=="object"&&!Array.isArray(n)?n.iso:void 0,l=typeof o=="string"?((f=t.validateTimezone)==null?void 0:f.call(t,o))??o:null;return l?typeof i!="number"||!Number.isInteger(i)||i<0||i>6?s(`${t.pathPrefix}.weekStart`,'Data App analysis option "calendarContext.weekStart" must be an integer from 0 to 6.'):n!=="now"&&!(typeof d=="string"&&ee(d))?s(`${t.pathPrefix}.anchor`,'Data App analysis option "calendarContext.anchor" must be "now" or an object with a valid iso string.'):{ok:!0,calendarContext:{tz:l,weekStart:i,anchor:n}}:s(`${t.pathPrefix}.tz`,'Data App analysis option "calendarContext.tz" must be a valid timezone string.')}function re(e){return e.hook==="useSemaphorMetric"?g(e.spec):e.hook==="useSemaphorAnalysis"?w(e.spec):e.hook==="useSemaphorRecords"?_(e.spec):$(e.spec)}function ie(e){if(e.fieldCatalogs.length===0&&!e.requireFieldCatalog)return[];const t=de(e.fieldCatalogs,e.intent.source);return t?[...oe({...e,catalog:t}),...ne({...e,catalog:t})]:[{severity:"error",code:"invalid_source_ref",message:`Source ref for ${e.hookSpec.hook} does not match a visible Semaphor source.`,path:`${e.pathPrefix}.spec.source`,hook:e.hookSpec.hook,hookId:e.hookId,intentId:e.intent.id,source:e.intent.source}]}function oe(e){return se(e.intent).flatMap(({field:t,path:r})=>R(e.catalog,t,e.intent.source)?[]:[{severity:"error",code:"missing_field",message:`Field "${t.name}" is not visible on the selected Semaphor source.`,path:`${e.pathPrefix}.${r}`,hook:e.hookSpec.hook,hookId:e.hookId,intentId:e.intent.id,source:h(t,e.intent.source),field:t}])}function ne(e){return("inputs"in e.intent?e.intent.inputs||[]:[]).flatMap((r,o)=>{if(!r.field)return[];const i=h(r.field,e.intent.source);return c.semaphorSourcesReferToSameDataset(i,e.intent.source)?R(e.catalog,r.field,e.intent.source)?[]:[{severity:"error",code:"missing_field",message:`Input "${r.inputId}" references field "${r.field.name}", which is not visible on the selected Semaphor source.`,path:`${e.pathPrefix}.spec.inputs.${o}.field`,hook:e.hookSpec.hook,hookId:e.hookId,intentId:e.intent.id,source:i,field:r.field}]:[{severity:"error",code:"unsupported_input_filter_composition",message:`Input "${r.inputId}" filters a different Semaphor source than the query. Cross-source Data App inputs are not supported yet.`,path:`${e.pathPrefix}.spec.inputs.${o}.field`,hook:e.hookSpec.hook,hookId:e.hookId,intentId:e.intent.id,source:i,field:r.field}]})}function ae(e){if(e.hookSpec.hook!=="useSemaphorAnalysis")return[];const t=x(e.hookSpec.spec,{pathPrefix:`${e.pathPrefix}.spec`,validateTimezone:e.validateTimezone});return t.ok?[]:t.issues.map(r=>({severity:"error",code:r.code,message:r.message,path:r.path,hook:e.hookSpec.hook,hookId:e.hookId,intentId:e.intent.id,source:e.intent.source}))}function se(e){return e.kind==="metric"?[...e.metrics.map((t,r)=>({field:t,path:`spec.metrics.${r}`})),...e.primaryMetric?[{field:e.primaryMetric,path:"spec.primaryMetric"}]:[],...e.dateField?[{field:e.dateField,path:"spec.dateField"}]:[],...(e.dimensions||[]).map((t,r)=>({field:t,path:`spec.dimensions.${r}`})),...e.orderBy?[{field:e.orderBy.field,path:"spec.orderBy.field"}]:[],...(e.filters||[]).map((t,r)=>({field:t.field,path:`spec.filters.${r}.field`}))]:e.kind==="records"?[...e.fields.map((t,r)=>({field:t,path:`spec.fields.${r}`})),...e.dateField?[{field:e.dateField,path:"spec.dateField"}]:[],...e.orderBy?[{field:e.orderBy.field,path:"spec.orderBy.field"}]:[],...(e.filters||[]).map((t,r)=>({field:t.field,path:`spec.filters.${r}.field`}))]:e.kind==="inputOptions"?[{field:e.field,path:"spec.field"}]:[]}function de(e,t){return e.find(r=>p(r,t))}function R(e,t,r){const o=h(t,r);if(p(e,o))return e.fields.find(i=>le(i,t)&&p(e,h(i,e.source)))}function p(e,t){return[e.source,...e.sourceAliases||[]].some(r=>c.semaphorSourcesReferToSameDataset(r,t))}function h(e,t){return e.source||t}function le(e,t){return!!(e.name&&t.name&&e.name===t.name)}function I(e,t){return{severity:t.severity,code:e.code||"invalid_analytics_intent",message:e.message,path:e.path?`${t.pathPrefix}.spec.${e.path}`:t.pathPrefix,hook:t.hook,hookId:t.hookId,intentId:t.intent.id,source:t.intent.source}}function ce(e,t){const r=z(t);return{ok:r.ok&&e.ok,errors:S([...e.errors,...r.errors]),warnings:S([...e.warnings,...r.warnings]),repairHints:[...e.repairHints,...r.repairHints]}}function z(e){const t=e.filter(o=>o.severity==="error").map(k),r=e.filter(o=>o.severity==="warning").map(k);return{ok:t.length===0,errors:t,warnings:r,repairHints:t.map(o=>{var i,n;return{code:o.code,message:o.message,fieldRole:o.fieldRole,invalidField:(i=o.repairHint)==null?void 0:i.invalidField,recommendedNextStep:((n=o.repairHint)==null?void 0:n.recommendedNextStep)||"Update the Data App SDK hook spec to use visible Semaphor source and field refs."}})}}function k(e){var t;return{code:e.code,message:e.message,path:e.path,fieldRole:e.code==="invalid_source_ref"?"source":void 0,repairHint:{code:e.code,message:e.message,invalidField:(t=e.field)==null?void 0:t.name,fieldRole:e.code==="invalid_source_ref"?"source":void 0,recommendedNextStep:e.code==="unsupported_input_filter_composition"?"Use an input field from the same Semaphor source as the query, or split the query into separate source-scoped hooks.":"Update the hook spec to use a visible Semaphor source and field ref."}}}function S(e){const t=new Set;return e.filter(r=>{const o=`${r.code}:${r.path||""}:${r.message}`;return t.has(o)?!1:(t.add(o),!0)})}function A(e){var r,o;const t=e.diagnostics.filter(i=>i.severity==="error");return{intentId:(r=e.intent)==null?void 0:r.id,status:t.length?"failed":"answered",resultShape:(o=e.intent)==null?void 0:o.kind,intent:e.intent,validation:e.validation,coverage:{answeredObligations:t.length?[]:["hook_spec_validation"],missingObligations:t.length?["hook_spec_validation"]:[],warnings:e.validation.warnings},missingFields:t.filter(i=>i.code==="missing_field").flatMap(i=>{var n;return(n=i.field)!=null&&n.name?[i.field.name]:[]}),warnings:e.diagnostics.filter(i=>i.severity==="warning").map(i=>i.message),metadata:{validationKind:"data_app_sdk_hook_spec"}}}function fe(e,t){return t.id||P(e.spec)}function P(e){if(!e||typeof e!="object"||!("id"in e))return;const t=e.id;return typeof t=="string"&&t.trim()?t:void 0}exports.hasSemaphorInputValue=T;exports.normalizeSemaphorAnalysisQueryOptions=x;exports.normalizeSemaphorInputOptions=G;exports.toSemaphorActiveInputSnapshots=U;exports.toSemaphorAnalysisIntent=w;exports.toSemaphorAnalysisQueryOptions=B;exports.toSemaphorInputBinding=C;exports.toSemaphorInputBindings=W;exports.toSemaphorInputOptionsIntent=$;exports.toSemaphorInputSnapshots=F;exports.toSemaphorInputSpec=V;exports.toSemaphorMetricIntent=g;exports.toSemaphorRecordsIntent=_;exports.validateSemaphorDataAppHookSpecs=X;
|