react-semaphor 0.1.495 → 0.1.496
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 +233 -218
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/calculated-field-identity-Cq9GwHfE.js +1266 -0
- package/dist/chunks/calculated-field-identity-DTfyvvLC.cjs +1 -0
- package/dist/chunks/{constants-BjGBVFbu.js → constants-CC3WKmqC.js} +14 -14
- package/dist/chunks/{constants-C-GvudXp.cjs → constants-DIuhVR6J.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-tYTkfNPj.js → dashboard-briefing-launcher-Bbz4cwHb.js} +9 -9
- package/dist/chunks/{dashboard-briefing-launcher-DyYVbfXp.cjs → dashboard-briefing-launcher-CM6LTGw5.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-Hwo4ZnW4.cjs → dashboard-controls-B2nrczJl.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-BR7hSzDh.js → dashboard-controls-BsgADy-S.js} +11 -11
- package/dist/chunks/{dashboard-date-comparison-definition-CpCZAGIz.js → dashboard-date-comparison-definition-Bqti6YAo.js} +1 -1
- package/dist/chunks/{dashboard-date-comparison-definition-1NBx_7QQ.cjs → dashboard-date-comparison-definition-C69F-zaC.cjs} +1 -1
- package/dist/chunks/{dashboard-json-FDNan6Lc.js → dashboard-json-CA-BChbt.js} +7 -7
- package/dist/chunks/{dashboard-json-B3CuJo_G.cjs → dashboard-json-CwRRBSSL.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-aqW4Jtrr.cjs → edit-dashboard-visual-BlS27LDw.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DTJwFkdX.js → edit-dashboard-visual-CEiPgdkX.js} +15 -15
- package/dist/chunks/{editor-action-buttons-DSGiwWur.js → editor-action-buttons-6HBjjcfK.js} +6 -6
- package/dist/chunks/{editor-action-buttons-B3Dpnink.cjs → editor-action-buttons-kk2BNiTe.cjs} +1 -1
- package/dist/chunks/{field-aggregations-Cy4hBBqe.js → field-aggregations-C8kZqMTD.js} +11 -11
- package/dist/chunks/{field-aggregations-U54X9_Rt.cjs → field-aggregations-naKZ7S2Q.cjs} +1 -1
- package/dist/chunks/{index-a9nBmD-v.cjs → index-BSRwdFTN.cjs} +222 -222
- package/dist/chunks/{index-B9FLuTyx.cjs → index-CCa-A-Yx.cjs} +1 -1
- package/dist/chunks/{index-Ne0-ePdz.js → index-Cgoz65yM.js} +39098 -38334
- package/dist/chunks/{index-zKj-mqbS.js → index-oll4m-qi.js} +11 -11
- package/dist/chunks/{matrix-analytical-definition-DSRmzber.js → matrix-analytical-definition-B1xhoCak.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-B5oWAePu.cjs → matrix-analytical-definition-BK5y9XHH.cjs} +1 -1
- package/dist/chunks/{matrix-card-CxTCV9HF.js → matrix-card-BEb6hr8i.js} +2 -2
- package/dist/chunks/{matrix-card-BV7OPtq_.cjs → matrix-card-Ii8yYSnw.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-BLGlb4S9.cjs → matrix-control-sources-CdegRBcA.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-DYMzccBY.js → matrix-control-sources-cbYmqWNg.js} +5 -5
- package/dist/chunks/{matrix-definition-jy7ygO6J.cjs → matrix-definition-CSNthxru.cjs} +1 -1
- package/dist/chunks/{matrix-definition-Djesv_9v.js → matrix-definition-CZM5-YJX.js} +1 -1
- package/dist/chunks/{matrix-formatter-CuRTrMP2.cjs → matrix-formatter-C19PZAal.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-BhkdDosE.js → matrix-formatter-CiXzpX6X.js} +27 -27
- package/dist/chunks/matrix-member-presentation-CQHvq18l.cjs +1 -0
- package/dist/chunks/matrix-member-presentation-CabW8mJc.js +105 -0
- package/dist/chunks/{matrix-operation-contract-4q53iAUW.js → matrix-operation-contract-0Nor-C71.js} +21 -21
- package/dist/chunks/{matrix-operation-contract-CbavkrJj.cjs → matrix-operation-contract-o9GXbiHw.cjs} +1 -1
- package/dist/chunks/{metric-comparison-CPx_2iqI.js → metric-comparison-Br8l0WkK.js} +1 -1
- package/dist/chunks/{metric-comparison-l2X7Reol.cjs → metric-comparison-DeiOjEm5.cjs} +1 -1
- package/dist/chunks/{operators-C8TxpM4C.js → operators-B3zZoskU.js} +28 -10
- package/dist/chunks/operators-DEfKaU_V.cjs +1 -0
- package/dist/chunks/{pivot-header-presentation-BDMb1Wlc.cjs → pivot-header-presentation-DRv-cSIP.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-utM9JrgD.js → pivot-header-presentation-DW-ti5ek.js} +3 -3
- package/dist/chunks/{pivot-result-identity-Hm1sO9KE.cjs → pivot-result-identity-DEenUrMj.cjs} +1 -1
- package/dist/chunks/{pivot-result-identity-BDntll93.js → pivot-result-identity-sZc1RaIz.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-QiOUMsYd.cjs → pivot-result-lifecycle-D81qcCcZ.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-Cu9hRFAp.js → pivot-result-lifecycle-DJ40gdwk.js} +7 -7
- package/dist/chunks/{raw-temporal-DWuF9bt7.cjs → raw-temporal-DDTt2yv5.cjs} +1 -1
- package/dist/chunks/{raw-temporal-CknUT-Fp.js → raw-temporal-DHCZrFe7.js} +15 -15
- package/dist/chunks/{raw-temporal-contract-B3YGcvzw.cjs → raw-temporal-contract-BcbV56Rc.cjs} +1 -1
- package/dist/chunks/{raw-temporal-contract-BVcDonCB.js → raw-temporal-contract-CkvdtPYA.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-DsjMwa3m.js → report-preferences-dialog-CVRJOCQu.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-BP_EdVHP.cjs → report-preferences-dialog-DGEq-iBF.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-DTxVBKqP.js → report-runtime-context-BlDpc-F-.js} +1 -1
- package/dist/chunks/{report-runtime-context-C-As8sq_.cjs → report-runtime-context-lSIvyKm2.cjs} +1 -1
- package/dist/chunks/{semantic-format-CyJWf8gZ.cjs → semantic-format--_VEin18.cjs} +1 -1
- package/dist/chunks/{semantic-format-BTEhH9ga.js → semantic-format-ew5zviaT.js} +2 -2
- package/dist/chunks/{source-entity-resolution-DXjCZPuO.js → source-entity-resolution-79Rihbk3.js} +121 -107
- package/dist/chunks/source-entity-resolution-DPjslVgx.cjs +1 -0
- package/dist/chunks/{switch-BmCGBb2F.js → switch-BmyuyM7e.js} +4736 -4697
- package/dist/chunks/switch-nDjQC2y3.cjs +139 -0
- package/dist/chunks/{temporal-bucket-contract-pW4c6N2M.cjs → temporal-bucket-contract-BYR6tj6F.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-Bhsl_j4B.js → temporal-bucket-contract-C-kKQ_W4.js} +1 -1
- package/dist/chunks/{token-types-DpYncMPp.js → token-types-BIYFAsGq.js} +1 -1
- package/dist/chunks/{token-types-CsKRtJp0.cjs → token-types-CkAGFhiW.cjs} +1 -1
- package/dist/chunks/{update-policy-CtLb9ish.cjs → update-policy-BCtFr2Qh.cjs} +1 -1
- package/dist/chunks/{update-policy-BoB26XrS.js → update-policy-CP_A1IVD.js} +2 -2
- package/dist/chunks/{validators-DgmJaRF4.js → validators-D-_IT-Xw.js} +1132 -1013
- package/dist/chunks/validators-ux2obZB9.cjs +1 -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 +157 -150
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +2 -2
- package/dist/data-app-codegen-node/index.js +33 -36
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +232 -230
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +26 -26
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -15
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +256 -1
- package/dist/types/briefings.d.ts +46 -0
- package/dist/types/dashboard-assistant.d.ts +46 -1
- package/dist/types/dashboard-authoring.d.ts +131 -2
- package/dist/types/dashboard.d.ts +48 -0
- package/dist/types/data-app-builder.d.ts +23 -1
- package/dist/types/data-app-codegen-node.d.ts +23 -1
- package/dist/types/data-app-codegen.d.ts +23 -1
- package/dist/types/data-app-sdk-adapters.d.ts +23 -1
- package/dist/types/data-app-sdk-validation.d.ts +46 -1
- package/dist/types/data-app-sdk.d.ts +51 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/main.d.ts +111 -1
- package/dist/types/shared.d.ts +46 -0
- package/dist/types/surfboard.d.ts +48 -0
- package/dist/types/types.d.ts +48 -0
- package/package.json +1 -1
- package/dist/chunks/calculated-field-identity-Cc-RlE-0.cjs +0 -1
- package/dist/chunks/calculated-field-identity-D7ygZ7oN.js +0 -1117
- package/dist/chunks/matrix-member-presentation-BN6VD-fr.js +0 -24
- package/dist/chunks/matrix-member-presentation-D82rMVDG.cjs +0 -1
- package/dist/chunks/operators-DrTQsJXv.cjs +0 -1
- package/dist/chunks/source-entity-resolution-BA8sdBbL.cjs +0 -1
- package/dist/chunks/switch-COujiMcB.cjs +0 -139
- package/dist/chunks/validators-CueUwVE4.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-BSRwdFTN.cjs"),w=require("../chunks/switch-nDjQC2y3.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -2,8 +2,8 @@ import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
|
|
|
2
2
|
import * as Zn from "react";
|
|
3
3
|
import { useContext as qn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
|
|
4
4
|
import * as Xn from "react-dom/client";
|
|
5
|
-
import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-
|
|
6
|
-
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-
|
|
5
|
+
import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-Cgoz65yM.js";
|
|
6
|
+
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-BmyuyM7e.js";
|
|
7
7
|
import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
|
|
8
8
|
import { c as Ve, X as He } from "../chunks/x-CXDkqdur.js";
|
|
9
9
|
import { S as fa } from "../chunks/save-DgMfP0j8.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/matrix-operation-contract-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/matrix-operation-contract-o9GXbiHw.cjs"),e=require("../chunks/update-policy-BCtFr2Qh.cjs");exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.isSemaphorDataAppCodegenSummary=a.isSemaphorDataAppCodegenSummary;exports.validateSemaphorDataAppCodegenSummary=a.validateSemaphorDataAppCodegenSummary;exports.CODEGEN_SUMMARY_SCHEMA_VERSION=e.CODEGEN_SUMMARY_SCHEMA_VERSION;exports.CODEGEN_SUMMARY_VALIDATOR_VERSION=e.CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.CONTRACT_MANIFEST_SCHEMA_VERSION=e.CONTRACT_MANIFEST_SCHEMA_VERSION;exports.GENERATED_CONTRACT_SCHEMA_VERSION=e.GENERATED_CONTRACT_SCHEMA_VERSION;exports.GENERATED_CONTRACT_TYPESCRIPT_FILES=e.GENERATED_CONTRACT_TYPESCRIPT_FILES;exports.REQUIRED_GENERATED_CONTRACT_FILES=e.REQUIRED_GENERATED_CONTRACT_FILES;exports.assertValidCodegenSummary=e.assertValidCodegenSummary;exports.buildSemaphorGeneratedActiveInput=e.buildSemaphorGeneratedActiveInput;exports.buildSemaphorGeneratedInputOptionIntent=e.buildSemaphorGeneratedInputOptionIntent;exports.buildSemaphorGeneratedViewExecutionRequest=e.buildSemaphorGeneratedViewExecutionRequest;exports.buildSemaphorGeneratedViewExecutionRequests=e.buildSemaphorGeneratedViewExecutionRequests;exports.evaluateSemaphorDataAppContractUpdatePolicy=e.evaluateSemaphorDataAppContractUpdatePolicy;exports.validateCodegenSummary=e.validateCodegenSummary;exports.validateSemaphorGeneratedContract=e.validateSemaphorGeneratedContract;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as E, a as S, i as A, v as t } from "../chunks/matrix-operation-contract-
|
|
2
|
-
import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-
|
|
1
|
+
import { S as E, a as S, i as A, v as t } from "../chunks/matrix-operation-contract-0Nor-C71.js";
|
|
2
|
+
import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-CP_A1IVD.js";
|
|
3
3
|
export {
|
|
4
4
|
R as CODEGEN_SUMMARY_SCHEMA_VERSION,
|
|
5
5
|
r as CODEGEN_SUMMARY_VALIDATOR_VERSION,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../chunks/matrix-operation-contract-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../chunks/matrix-operation-contract-o9GXbiHw.cjs"),R=require("../chunks/update-policy-BCtFr2Qh.cjs"),he=require("node:crypto"),Ce="src/semaphor/generated",H=`// Generated by Semaphor Agent Plugin. Do not hand-edit analytics wiring here.
|
|
2
2
|
// Regenerate from the accepted semaphor_plan_data_app codegenSummary when the plan changes.
|
|
3
3
|
`;function Oe(e,n={}){R.assertValidCodegenSummary(e);const r=Me(e);if(r.views.length===0&&!n.allowEmpty)throw new Error("Contract generation produced zero executable views. Stop and ask for a different domain/goal or semantic model improvement; pass --allow-empty only for an explicit model-gap report.");const t=ke(r),o=Ne({contract:r,files:t,generatorName:n.generatorName||"react-semaphor/data-app-codegen/node",generatorVersion:n.generatorVersion||"unknown"}),a={...t,"contract.manifest.json":`${JSON.stringify(o,null,2)}
|
|
4
4
|
`};return{schemaVersion:R.GENERATED_CONTRACT_SCHEMA_VERSION,files:a,manifest:o,contentHash:String(o.generatedContentHash||""),usageExample:Te(r),warnings:r.warnings,stats:{inputCount:r.inputs.length,executableViewCount:r.views.length,presentationViewCount:r.presentationViews.length,queryCount:r.views.length,optionQueryCount:r.optionQueries.length}}}function Me(e){var d,p,m,i,l,g,h,I,$,M,b,E;const n=[],r=[];for(const s of e.inputs){S(r,s.fieldRef);for(const V of s.bindings||[])S(r,V.fieldRef);S(r,(d=s.optionQuery)==null?void 0:d.valueFieldRef),S(r,(p=s.optionQuery)==null?void 0:p.labelFieldRef),S(r,(m=s.optionQuery)==null?void 0:m.filterFieldRef),D(r,(i=s.optionQuery)==null?void 0:i.spec)}for(const s of e.filterContracts){S(r,s.fieldRef),S(r,(l=s.optionQuery)==null?void 0:l.valueFieldRef),S(r,(g=s.optionQuery)==null?void 0:g.labelFieldRef),S(r,(h=s.optionQuery)==null?void 0:h.filterFieldRef),D(r,(I=s.optionQuery)==null?void 0:I.spec);for(const V of s.bindings||[])S(r,V.fieldRef)}for(const s of e.views){for(const V of s.fields||[])S(r,V);D(r,($=s.sdkSpec)==null?void 0:$.spec),D(r,s.visualSpec)}const t=e.implementationChecklist||{};for(const s of Object.values(t.bindingsByView||{}))for(const V of Array.isArray(s)?s:[])S(r,V.fieldRef),S(r,V.optionValueField),S(r,V.optionLabelField);for(const s of t.requiredInputOptions||[])S(r,s.visibleLabelField),S(r,s.optionValueField),S(r,s.runtimeFilterField);const o=pn([...e.sources.map(s=>({raw:s,key:Ie(s),aliases:Ve(s),name:""})),...r.map(s=>an(s)).filter(x)]);P(o,s=>{const V=F(s.raw);return j(s.raw.label||(V==null?void 0:V.datasetName)||(V==null?void 0:V.datasetId)||(V==null?void 0:V.name)||s.raw.kind||"source")});const a=ln(o),u=ne(r.filter(s=>s.name).map(s=>({raw:s,key:X(s),name:""})),s=>s.key);P(u,s=>j([s.raw.sourceKey?yn(s.raw.sourceKey):"",s.raw.aggregate?s.raw.aggregate.toLowerCase():"",s.raw.name].filter(Boolean).join("_")));const c=new Map(u.map(s=>[s.key,s.name])),w=e.inputs.map(s=>({raw:s,name:j(s.id||s.label||"input")}));P(w,s=>s.name);const f=w.filter(s=>!!s.raw.optionQuery).map(s=>({input:s,name:`${s.name}Options`,raw:s.raw.optionQuery}));P(f,s=>s.name);for(const s of f)un(s.raw.labelFieldRef,s.raw.valueFieldRef)&&dn(s.raw.valueFieldRef)&&n.push(`Input option query ${((M=s.raw.spec)==null?void 0:M.inputId)||s.input.raw.id||s.name} uses identifier field ${s.raw.valueFieldRef.name} as both label and value. It can execute, but the UI will show key values unless the semantic model exposes a human-readable label through a modeled relationship.`);const y=e.views.filter(s=>{var V,K;return!!((V=s.sdkSpec)!=null&&V.builder&&((K=s.sdkSpec)!=null&&K.spec))}).map(s=>({raw:s,name:j(s.id||s.title||"query")}));P(y,s=>s.name);const k=e.views.filter(s=>fe(s)&&!("sdkSpec"in s)).map(s=>sn(s));for(const s of e.views)(!("sdkSpec"in s)||!((b=s.sdkSpec)!=null&&b.builder)||!((E=s.sdkSpec)!=null&&E.spec))&&!fe(s)&&n.push(`Skipped view ${s.id||s.title||"unknown"} because it has no sdkSpec.`);return Ee({inputs:w,views:y,filterContracts:e.filterContracts}),{summary:e,title:e.title||"Semaphor Data App",sources:o,fields:u,inputs:w,optionQueries:f,views:y,presentationViews:k,filterContracts:e.filterContracts,checklist:t,sourceNameByKey:a,fieldNameByKey:c,warnings:n}}function Ee({inputs:e,views:n,filterContracts:r}){const t=new Set(e.map(a=>a.raw.id).filter(Boolean)),o=new Set(n.map(a=>a.raw.id).filter(Boolean));for(const[a,u]of r.entries()){if(!t.has(u.inputId))throw new Error(`filterContracts.${a}.inputId must reference a generated input.`);const c=new Set(u.appliesToViewIds||[]),w=new Set(u.notAppliedToViewIds||[]);for(const[f,y]of(u.appliesToViewIds||[]).entries())if(!o.has(y))throw new Error(`filterContracts.${a}.appliesToViewIds.${f} must reference an executable generated view.`);for(const[f,y]of(u.notAppliedToViewIds||[]).entries())if(!o.has(y))throw new Error(`filterContracts.${a}.notAppliedToViewIds.${f} must reference an executable generated view.`);for(const[f,y]of(u.bindings||[]).entries()){if(!o.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must reference an executable generated view.`);if(!c.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must be included in appliesToViewIds.`);if(w.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must not be listed in notAppliedToViewIds.`)}}}function ke(e){return{"sources.ts":ve(e),"fields.ts":qe(e),"inputs.ts":De(e),"queries.ts":Pe(e),"bindings.ts":Le(e),"accessors.ts":Ye(e),"metadata.ts":We(e),"index.ts":Xe(),"USAGE.md":Ae(e)}}function Ne({contract:e,files:n,generatorName:r,generatorVersion:t}){return{schemaVersion:R.CONTRACT_MANIFEST_SCHEMA_VERSION,generatedContractSchemaVersion:R.GENERATED_CONTRACT_SCHEMA_VERSION,generator:{name:r,version:t},generatedContentHash:Ge(n),codegenSummaryValidatorVersion:R.CODEGEN_SUMMARY_VALIDATOR_VERSION,codegenSummaryHash:xe(e.summary),codegenSummary:e.summary}}function Ge(e){const n=he.createHash("sha256");for(const r of Object.keys(e).filter(t=>t.endsWith(".ts")).sort())n.update(r),n.update("\0"),n.update(e[r]),n.update("\0");return`sha256:${n.digest("hex")}`}function Ae(e){const n=["# Semaphor Generated Data App Contract","","Generated files in this directory are governed Semaphor analytics wiring. Do not hand-edit them.","","Use the app-facing exports from `index.ts`:","","- `queries`: generated governed query factories.","- `queryOptionsForView`: active-input wiring for each generated view.","- `rowsForView`: table/records row readers.","- `rowValuesForView`: friendly row object readers for chart/table views.","- `metricValuesForView`: friendly metric-value readers.","- `kpiPropsForView`: KPI component props derived from runtime metric results.","- `roleValuesForView`: canonical dimension/measure/date/id role readers.","- `appInputSpecs`: generated input/filter specs.","- `inputOptionQueries`: option-list query factories for generated inputs.","- `semaphorGeneratedContractMetadata`: generated view/input metadata and presentation-only views.","","Start with these exports before opening large generated internals such as `metadata.ts`.",""];return e.views.length>0&&(n.push("Generated executable views:"),e.views.forEach(r=>{n.push(`- \`${r.raw.id}\`: ${r.raw.title||r.name}`)}),n.push("")),e.inputs.length>0&&(n.push("Generated inputs:"),e.inputs.forEach(r=>{n.push(`- \`${r.raw.id}\`: ${r.raw.label||r.name}`)}),n.push("")),`${n.join(`
|
|
@@ -81,7 +81,7 @@ ${c}
|
|
|
81
81
|
}
|
|
82
82
|
throw new Error(\`Unknown generated Semaphor input option query id: \${${y}}\`);
|
|
83
83
|
}
|
|
84
|
-
`}function Be(e,n){const r=ge(n);if(!r
|
|
84
|
+
`}function Be(e,n){const r=ge(n);if(!(r!=null&&r.mode)||r.mode==="independent")return[];const t=new Set(r.includeInputIds||[]);return e.inputs.filter(o=>o.raw.id!==n.input.raw.id&&(r.mode==="all_applicable"||t.has(o.raw.id)))}function ge(e){var n;return e.raw.dependencies||((n=e.raw.spec)==null?void 0:n.dependencies)}function Pe(e){const n=e.views.map(p=>{var l,g,h,I,$,M;const m=q(p.raw.sdkSpec.builder),i=Qe(p);if(Z(p)&&He(p)){const b=(l=p.raw.visualSpec)==null?void 0:l.tableBehavior,E=F(i.pagination),s=_(p),V=T(p),K=((g=b==null?void 0:b.pagination)==null?void 0:g.pageSize)||L(E==null?void 0:E.pageSize)||L(i.limit)||100,re=V?z(p,e):[],J=V?Ue({view:p,contract:e,sortFields:re,defaultField:(h=b==null?void 0:b.sorting)==null?void 0:h.defaultField}):void 0,te=V?(I=b==null?void 0:b.sorting)==null?void 0:I.defaultDirection:void 0,oe=Je({viewName:p.name,supportsPagination:s,supportsSort:V}),se=V?` const orderBy = resolveRecordsOrderBy(
|
|
85
85
|
recordsSortFieldsForView.${p.name},
|
|
86
86
|
params.sort,
|
|
87
87
|
${G(J,e)},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/matrix-operation-contract-
|
|
2
|
-
import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-
|
|
3
|
-
import { C as Mn, e as Cn, R as On, f as
|
|
1
|
+
import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/matrix-operation-contract-0Nor-C71.js";
|
|
2
|
+
import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-CP_A1IVD.js";
|
|
3
|
+
import { C as Mn, e as Cn, R as On, f as Gn, g as xn, h as Nn, i as En, j as An, v as jn, d as vn } from "../chunks/update-policy-CP_A1IVD.js";
|
|
4
4
|
import { createHash as ye } from "node:crypto";
|
|
5
5
|
const wn = "src/semaphor/generated", v = `// Generated by Semaphor Agent Plugin. Do not hand-edit analytics wiring here.
|
|
6
6
|
// Regenerate from the accepted semaphor_plan_data_app codegenSummary when the plan changes.
|
|
@@ -12,7 +12,7 @@ function Sn(e, n = {}) {
|
|
|
12
12
|
throw new Error(
|
|
13
13
|
"Contract generation produced zero executable views. Stop and ask for a different domain/goal or semantic model improvement; pass --allow-empty only for an explicit model-gap report."
|
|
14
14
|
);
|
|
15
|
-
const t =
|
|
15
|
+
const t = Ge(r), o = xe({
|
|
16
16
|
contract: r,
|
|
17
17
|
files: t,
|
|
18
18
|
generatorName: n.generatorName || "react-semaphor/data-app-codegen/node",
|
|
@@ -180,7 +180,7 @@ function Oe({
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Ge(e) {
|
|
184
184
|
return {
|
|
185
185
|
"sources.ts": Ke(e),
|
|
186
186
|
"fields.ts": Te(e),
|
|
@@ -193,7 +193,7 @@ function xe(e) {
|
|
|
193
193
|
"USAGE.md": Ee(e)
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function xe({
|
|
197
197
|
contract: e,
|
|
198
198
|
files: n,
|
|
199
199
|
generatorName: r,
|
|
@@ -432,7 +432,7 @@ function Be(e, n) {
|
|
|
432
432
|
throw new Error(
|
|
433
433
|
`Field ${e.name} references source ${t}, but that source is not renderable. Include the source in codegenSummary.sources or provide field.source.`
|
|
434
434
|
);
|
|
435
|
-
const a = Object.entries(N(r)).map(([u, c]) => `${JSON.stringify(u)}: ${
|
|
435
|
+
const a = Object.entries(N(r)).map(([u, c]) => `${JSON.stringify(u)}: ${x(c, n)}`);
|
|
436
436
|
return o && a.push(`"source": sources.${o}`), `{ ${a.join(", ")} }`;
|
|
437
437
|
}
|
|
438
438
|
function Qe(e) {
|
|
@@ -471,7 +471,7 @@ function Qe(e) {
|
|
|
471
471
|
};
|
|
472
472
|
if (!ne || !re || !te)
|
|
473
473
|
throw new Error(`Input option query ${l.id || `${i.id}-options`} is missing source, valueField, or labelField.`);
|
|
474
|
-
const Ve = Object.entries(N(se)).map(([Fe, be]) => `${JSON.stringify(Fe)}: ${
|
|
474
|
+
const Ve = Object.entries(N(se)).map(([Fe, be]) => `${JSON.stringify(Fe)}: ${x(be, e)}`);
|
|
475
475
|
return ` ${m.name}: semaphor.inputOptions({ ${Ve.join(", ")} }),`;
|
|
476
476
|
}).join(`
|
|
477
477
|
`), a = e.optionQueries.map((m) => {
|
|
@@ -555,15 +555,12 @@ ${c}
|
|
|
555
555
|
}
|
|
556
556
|
function Pe(e, n) {
|
|
557
557
|
const r = he(n);
|
|
558
|
-
if (!r || r.mode === "independent")
|
|
558
|
+
if (!(r != null && r.mode) || r.mode === "independent")
|
|
559
559
|
return [];
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
...r.excludeInputIds || []
|
|
565
|
-
]);
|
|
566
|
-
return e.inputs.filter((a) => o.has(a.raw.id) ? !1 : t.has(a.raw.id));
|
|
560
|
+
const t = new Set(r.includeInputIds || []);
|
|
561
|
+
return e.inputs.filter(
|
|
562
|
+
(o) => o.raw.id !== n.input.raw.id && (r.mode === "all_applicable" || t.has(o.raw.id))
|
|
563
|
+
);
|
|
567
564
|
}
|
|
568
565
|
function he(e) {
|
|
569
566
|
var n;
|
|
@@ -586,8 +583,8 @@ function De(e) {
|
|
|
586
583
|
}), te = V ? ` const orderBy = resolveRecordsOrderBy(
|
|
587
584
|
recordsSortFieldsForView.${p.name},
|
|
588
585
|
params.sort,
|
|
589
|
-
${
|
|
590
|
-
${
|
|
586
|
+
${x(U, e)},
|
|
587
|
+
${x(ne, e)},
|
|
591
588
|
);
|
|
592
589
|
` : "", oe = V ? ` ...(orderBy ? { orderBy } : {}),
|
|
593
590
|
` : "", se = s ? ` pagination: resolveServerTablePagination(params, ${JSON.stringify(T)}),
|
|
@@ -596,7 +593,7 @@ function De(e) {
|
|
|
596
593
|
params: ${re} = {},
|
|
597
594
|
) {
|
|
598
595
|
${te} return semaphor.${m}({
|
|
599
|
-
...${
|
|
596
|
+
...${x(i, e)},
|
|
600
597
|
${oe}${se} });
|
|
601
598
|
},`;
|
|
602
599
|
}
|
|
@@ -606,12 +603,12 @@ ${oe}${se} });
|
|
|
606
603
|
params: SemaphorGeneratedServerPaginationParams = {},
|
|
607
604
|
) {
|
|
608
605
|
return semaphor.${m}({
|
|
609
|
-
...${
|
|
606
|
+
...${x(i, e)},
|
|
610
607
|
pagination: resolveServerTablePagination(params, ${JSON.stringify(s)}),
|
|
611
608
|
});
|
|
612
609
|
},`;
|
|
613
610
|
}
|
|
614
|
-
return ` ${p.name}: () => semaphor.${m}(${
|
|
611
|
+
return ` ${p.name}: () => semaphor.${m}(${x(i, e)}),`;
|
|
615
612
|
}).join(`
|
|
616
613
|
`), r = e.views.filter((p) => A(p)).map((p) => {
|
|
617
614
|
const i = L(p, e).map((l) => ` ${JSON.stringify(l.key)}: fields.${l.fieldName},`).join(`
|
|
@@ -1440,7 +1437,7 @@ function B(e, n) {
|
|
|
1440
1437
|
for (const r of n) B(e, r);
|
|
1441
1438
|
return;
|
|
1442
1439
|
}
|
|
1443
|
-
|
|
1440
|
+
G(n) && w(e, Y(n));
|
|
1444
1441
|
for (const r of Object.values(n))
|
|
1445
1442
|
B(e, r);
|
|
1446
1443
|
}
|
|
@@ -1550,7 +1547,7 @@ function pe(e) {
|
|
|
1550
1547
|
}
|
|
1551
1548
|
function le(e, n) {
|
|
1552
1549
|
var r;
|
|
1553
|
-
if (
|
|
1550
|
+
if (G(n)) {
|
|
1554
1551
|
w(e, n);
|
|
1555
1552
|
return;
|
|
1556
1553
|
}
|
|
@@ -1577,7 +1574,7 @@ function sn(e) {
|
|
|
1577
1574
|
});
|
|
1578
1575
|
}
|
|
1579
1576
|
function w(e, n) {
|
|
1580
|
-
|
|
1577
|
+
G(n) && e.push(Y(n));
|
|
1581
1578
|
}
|
|
1582
1579
|
function Y(e) {
|
|
1583
1580
|
return {
|
|
@@ -1605,7 +1602,7 @@ function an(e) {
|
|
|
1605
1602
|
name: ""
|
|
1606
1603
|
};
|
|
1607
1604
|
}
|
|
1608
|
-
function
|
|
1605
|
+
function G(e) {
|
|
1609
1606
|
const n = F(e);
|
|
1610
1607
|
return !!(n && typeof n.name == "string" && (typeof n.role == "string" || typeof n.dataType == "string" || typeof n.aggregate == "string" || n.source || n.sourceKey));
|
|
1611
1608
|
}
|
|
@@ -1613,14 +1610,14 @@ function we(e) {
|
|
|
1613
1610
|
const n = F(e);
|
|
1614
1611
|
return !!(n && (typeof n.sourceKey == "string" || n.kind === "semantic" || typeof n.datasetName == "string" && typeof n.domainId == "string"));
|
|
1615
1612
|
}
|
|
1616
|
-
function
|
|
1613
|
+
function x(e, n) {
|
|
1617
1614
|
if (e === void 0)
|
|
1618
1615
|
return "undefined";
|
|
1619
1616
|
if (e === null || typeof e == "number" || typeof e == "boolean" || typeof e == "string")
|
|
1620
1617
|
return JSON.stringify(e);
|
|
1621
1618
|
if (Array.isArray(e))
|
|
1622
|
-
return `[${e.map((o) =>
|
|
1623
|
-
if (
|
|
1619
|
+
return `[${e.map((o) => x(o, n)).join(", ")}]`;
|
|
1620
|
+
if (G(e)) {
|
|
1624
1621
|
const o = R(Y(e), n);
|
|
1625
1622
|
if (o) return `fields.${o}`;
|
|
1626
1623
|
}
|
|
@@ -1629,13 +1626,13 @@ function G(e, n) {
|
|
|
1629
1626
|
if (o) return `sources.${o}`;
|
|
1630
1627
|
}
|
|
1631
1628
|
const r = F(e);
|
|
1632
|
-
return r ? `{ ${Object.entries(r).filter(([, o]) => o !== void 0).map(([o, a]) => `${JSON.stringify(o)}: ${
|
|
1629
|
+
return r ? `{ ${Object.entries(r).filter(([, o]) => o !== void 0).map(([o, a]) => `${JSON.stringify(o)}: ${x(a, n)}`).join(", ")} }` : JSON.stringify(e);
|
|
1633
1630
|
}
|
|
1634
1631
|
function k(e) {
|
|
1635
1632
|
return JSON.stringify(e, null, 2);
|
|
1636
1633
|
}
|
|
1637
1634
|
function R(e, n) {
|
|
1638
|
-
if (
|
|
1635
|
+
if (G(e))
|
|
1639
1636
|
return n.fieldNameByKey.get(Z(Y(e)));
|
|
1640
1637
|
}
|
|
1641
1638
|
function Se(e, n) {
|
|
@@ -1655,12 +1652,12 @@ function Z(e) {
|
|
|
1655
1652
|
].join("|");
|
|
1656
1653
|
}
|
|
1657
1654
|
function un(e, n) {
|
|
1658
|
-
return !
|
|
1655
|
+
return !G(e) || !G(n) || e.name !== n.name ? !1 : ie(e).some(
|
|
1659
1656
|
(r) => ie(n).includes(r)
|
|
1660
1657
|
);
|
|
1661
1658
|
}
|
|
1662
1659
|
function dn(e) {
|
|
1663
|
-
return
|
|
1660
|
+
return G(e) && e.role === "id";
|
|
1664
1661
|
}
|
|
1665
1662
|
function pn(e) {
|
|
1666
1663
|
const n = [], r = /* @__PURE__ */ new Map();
|
|
@@ -1712,10 +1709,10 @@ function de(e) {
|
|
|
1712
1709
|
return n ? typeof n.sourceKey == "string" ? n.sourceKey : JSON.stringify(n) : "";
|
|
1713
1710
|
}
|
|
1714
1711
|
function cn(e) {
|
|
1715
|
-
return
|
|
1712
|
+
return G(e) && ie(e)[0] || "";
|
|
1716
1713
|
}
|
|
1717
1714
|
function ie(e) {
|
|
1718
|
-
return
|
|
1715
|
+
return G(e) ? _([
|
|
1719
1716
|
...typeof e.sourceKey == "string" ? [e.sourceKey] : [],
|
|
1720
1717
|
...e.source ? W(e.source) : []
|
|
1721
1718
|
]) : [];
|
|
@@ -1793,8 +1790,8 @@ export {
|
|
|
1793
1790
|
Vn as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
|
|
1794
1791
|
Fn as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
|
|
1795
1792
|
ke as assertValidCodegenSummary,
|
|
1796
|
-
|
|
1797
|
-
|
|
1793
|
+
Gn as buildSemaphorGeneratedActiveInput,
|
|
1794
|
+
xn as buildSemaphorGeneratedInputOptionIntent,
|
|
1798
1795
|
Nn as buildSemaphorGeneratedViewExecutionRequest,
|
|
1799
1796
|
En as buildSemaphorGeneratedViewExecutionRequests,
|
|
1800
1797
|
An as evaluateSemaphorDataAppContractUpdatePolicy,
|