react-semaphor 0.1.468 → 0.1.469
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 +55 -52
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Bo4GmnB7.cjs → dashboard-briefing-launcher-BqxcYhO2.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DjBmkS6v.js → dashboard-briefing-launcher-kKSBCRLE.js} +3 -3
- package/dist/chunks/{dashboard-controls-CvrCyVPZ.js → dashboard-controls-DP2rftVR.js} +4 -4
- package/dist/chunks/{dashboard-controls-CstKugeB.cjs → dashboard-controls-Z8ow3GV6.cjs} +1 -1
- package/dist/chunks/{dashboard-filter-value-compatibility-o-kufPZB.js → dashboard-filter-value-compatibility-Ce7jUVh-.js} +1 -1
- package/dist/chunks/{dashboard-filter-value-compatibility-Bnl2lsng.cjs → dashboard-filter-value-compatibility-iCPBcrRS.cjs} +1 -1
- package/dist/chunks/{dashboard-json-D9r_xere.js → dashboard-json-3qT123Xa.js} +2 -2
- package/dist/chunks/{dashboard-json-ZGqzmExU.cjs → dashboard-json-CPq7IMvR.cjs} +1 -1
- package/dist/chunks/edit-dashboard-visual-7eUCTZnx.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-D64tmqA4.js → edit-dashboard-visual-Clz6LQOX.js} +7280 -7414
- package/dist/chunks/{editor-action-buttons-C2msc_en.js → editor-action-buttons-CFbMRQSE.js} +2 -2
- package/dist/chunks/{editor-action-buttons-BXJlZl7z.cjs → editor-action-buttons-WJFWflfs.cjs} +1 -1
- package/dist/chunks/{index-B6cfDHwn.js → index-8Cm77joZ.js} +33430 -33420
- package/dist/chunks/index-DKaQRhKm.cjs +1404 -0
- package/dist/chunks/matrix-result-contract-ClC6Pd_g.js +822 -0
- package/dist/chunks/matrix-result-contract-DF-qt0jx.cjs +1 -0
- package/dist/chunks/{report-preferences-dialog-B89ypIJ-.cjs → report-preferences-dialog-C5UOCTwt.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-Dvy818KV.js → report-preferences-dialog-D-NDYRrk.js} +2 -2
- package/dist/chunks/{switch-8PklEEN1.js → switch-BagpmPNw.js} +16 -1
- package/dist/chunks/{switch-DykyqM66.cjs → switch-DyE2_OmQ.cjs} +2 -2
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +56 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-BzVDWVyZ.cjs +0 -172
- package/dist/chunks/index-DZdmd5AL.cjs +0 -1392
- package/dist/chunks/matrix-result-contract-C3cGHj_y.js +0 -598
- package/dist/chunks/matrix-result-contract-CkRVx693.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/validators-DO-YuzgO.cjs"),A=require("../chunks/operators-DrTQsJXv.cjs"),h=require("../chunks/analyze-result-contract-CMwVg9w2.cjs"),l=require("../chunks/matrix-result-contract-CkRVx693.cjs"),n=require("../chunks/temporal-bucket-BDRcWdVv.cjs"),d=require("../chunks/dashboard-input-contract-12mPNhCF.cjs"),R=require("../chunks/temporal-bucket-contract-vrOkax-r.cjs"),C=require("../chunks/raw-temporal-contract-UdblxoVB.cjs"),p={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},T={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:p,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},comparison:{kind:"previous_period"},limit:1},revenueTrend:{version:1,kind:"records",id:"revenue-trend",label:"Revenue trend",source:p,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:p,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",inputId:"region",source:p,labelField:{name:"region",role:"dimension",dataType:"string"},valueField:{name:"region",role:"dimension",dataType:"string"},limit:100},previousPeriodRevenueComparison:{version:1,kind:"metric",id:"revenue-previous-period",label:"Revenue previous period comparison",source:p,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{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:p,measures:[{name:"net_tons",role:"measure"},{name:"ticket_value",role:"measure"}],primaryMeasure:{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"}]}},_={visibleAxis:{source:{kind:"semantic",domainId:"commerce",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"timestamp with time zone"},expected:{status:"resolved",bindingSource:"visible_axis",name:"order_date",dataType:"datetime"}},invalidSource:{source:{kind:"semantic",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"date"},expected:{status:"unavailable",reason:"temporal_binding_invalid"}}};function S(a){return!!(a.name.trim()&&e.hasCompleteSemaphorSourceIdentity(a.source)&&(a.role==="date"||a.dataType==="date"||a.dataType==="datetime"))}function u(a){return a.filter((t,i)=>a.findIndex(s=>e.semaphorFieldRefsMatch(t.field,s.field))===i)}function y(a){return new Set(a.map(e.semaphorSourceIdentityKey).filter(Boolean)).size}function g(a){const t=u(a.candidates.filter(r=>r.kind==="visible_axis")),i=u(a.candidates.filter(r=>r.kind==="explicit_hidden"));if([...t,...i].some(r=>!S(r.field)))return"invalid";if(t.length>1||i.length>1)return"ambiguous";const s=t[0],m=i[0];if(s)return m&&!e.semaphorFieldRefsMatch(s.field,m.field)?"invalid":s;if(m)return m;if(y(a.querySources??[])>1)return"ambiguous";const c=u(a.candidates.filter(r=>r.kind==="semantic_primary"));return c.some(r=>!S(r.field))?"invalid":c.length>1?"ambiguous":c[0]??"missing"}function v(a){const t=new Date(a.startInclusive),i=new Date(a.endExclusive);return a.timezone.trim()?Number.isFinite(t.getTime())&&Number.isFinite(i.getTime())&&t.getTime()<i.getTime():!1}function I(a){const t=a.ranges??[];if(a.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((a.querySources??[]).some(o=>!e.hasCompleteSemaphorSourceIdentity(o))||t.some(o=>!S(o.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const i=g(a);if(typeof i=="string")return{status:"unavailable",reason:`temporal_binding_${i}`,constraints:t};const s=t.filter(o=>e.semaphorFieldRefsMatch(o.field,i.field));if(s.some(o=>!v(o.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const m=s.filter(o=>o.source==="global_date"),c=s.filter(o=>o.source==="card");if(m.length>1||m.length===0&&c.length>1)return{status:"unavailable",reason:"temporal_binding_ambiguous",constraints:t};const r=m[0]??c[0];return{status:"resolved",field:i.field,bindingSource:i.kind,...r?{currentWindow:r.window,governingWindowSource:r.source,governingRangeId:r.id}:{},constraints:t.filter(o=>o.id!==(r==null?void 0:r.id))}}exports.RAW_TEMPORAL_CONTRACT_ERROR_CODES=e.RAW_TEMPORAL_CONTRACT_ERROR_CODES;exports.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT=e.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.SEMAPHOR_GENERATED_COUNT_METRIC_ID=e.SEMAPHOR_GENERATED_COUNT_METRIC_ID;exports.SEMAPHOR_MATRIX_TIME_GRAINS=e.SEMAPHOR_MATRIX_TIME_GRAINS;exports.SEMAPHOR_TIME_GRAINS=e.SEMAPHOR_TIME_GRAINS;exports.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES=e.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES;exports.TEMPORAL_BUCKET_PRESETS=e.TEMPORAL_BUCKET_PRESETS;exports.buildAnalyticsCatalogFieldSummary=e.buildAnalyticsCatalogFieldSummary;exports.canonicalDashboardRecordsPayloadSchema=e.canonicalDashboardRecordsPayloadSchema;exports.canonicalizeSemaphorSourceIdentity=e.canonicalizeSemaphorSourceIdentity;exports.dashboardRecordsPayloadSchema=e.dashboardRecordsPayloadSchema;exports.getAnalyticsCatalogFieldCandidates=e.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=e.getAnalyticsCatalogFieldName;exports.getSemaphorNonRedundantDatasetId=e.getSemaphorNonRedundantDatasetId;exports.hasCompleteSemaphorSourceIdentity=e.hasCompleteSemaphorSourceIdentity;exports.isAnalyticsCatalogDateField=e.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=e.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=e.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=e.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=e.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=e.isAnalyticsTechnicalIdentifierField;exports.isSemaphorDataAppCodegenSummary=e.isSemaphorDataAppCodegenSummary;exports.isSemaphorMatrixTimeGrain=e.isSemaphorMatrixTimeGrain;exports.isSemaphorTimeGrain=e.isSemaphorTimeGrain;exports.mergeSemaphorSourcesByIdentity=e.mergeSemaphorSourcesByIdentity;exports.normalizeAnalyticsCatalogDataType=e.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=e.normalizeAnalyticsCatalogName;exports.parseSemaphorIsoInstant=e.parseSemaphorIsoInstant;exports.parseSemaphorIsoTimeWindowBoundary=e.parseSemaphorIsoTimeWindowBoundary;exports.preferSemaphorFieldRefMetadata=e.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=e.preferSemaphorSourceMetadata;exports.rawTemporalValueMetadataSchema=e.rawTemporalValueMetadataSchema;exports.semaphorAnalyticsCoverageSchema=e.semaphorAnalyticsCoverageSchema;exports.semaphorAnalyticsDiagnosticFeedbackSchema=e.semaphorAnalyticsDiagnosticFeedbackSchema;exports.semaphorAnalyticsExecutionResultSchema=e.semaphorAnalyticsExecutionResultSchema;exports.semaphorAnalyticsPopulationSchema=e.semaphorAnalyticsPopulationSchema;exports.semaphorAnalyticsResultSchema=e.semaphorAnalyticsResultSchema;exports.semaphorAnalyticsValidationIssueSchema=e.semaphorAnalyticsValidationIssueSchema;exports.semaphorAnalyticsValidationResultSchema=e.semaphorAnalyticsValidationResultSchema;exports.semaphorAnalyzeResultSchema=e.semaphorAnalyzeResultSchema;exports.semaphorAnalyzeResultShape=e.semaphorAnalyzeResultShape;exports.semaphorDataAppCodegenSummarySchema=e.semaphorDataAppCodegenSummarySchema;exports.semaphorDerivedFieldDefinitionSchema=e.semaphorDerivedFieldDefinitionSchema;exports.semaphorExecutionFieldRefSchema=e.semaphorExecutionFieldRefSchema;exports.semaphorFieldRefSchema=e.semaphorFieldRefSchema;exports.semaphorFieldRefsMatch=e.semaphorFieldRefsMatch;exports.semaphorInputOptionsResultSchema=e.semaphorInputOptionsResultSchema;exports.semaphorMatrixResultSchema=e.semaphorMatrixResultSchema;exports.semaphorMetricAggregate=e.semaphorMetricAggregate;exports.semaphorMetricMeasureBindingKey=e.semaphorMetricMeasureBindingKey;exports.semaphorMetricResultSchema=e.semaphorMetricResultSchema;exports.semaphorPhysicalSourceRefSchema=e.semaphorPhysicalSourceRefSchema;exports.semaphorRecordsResultSchema=e.semaphorRecordsResultSchema;exports.semaphorRelationshipDiagnosticsSchema=e.semaphorRelationshipDiagnosticsSchema;exports.semaphorResultColumnSchema=e.semaphorResultColumnSchema;exports.semaphorSemanticSourceRefSchema=e.semaphorSemanticSourceRefSchema;exports.semaphorSourceIdentityKey=e.semaphorSourceIdentityKey;exports.semaphorSourceRefSchema=e.semaphorSourceRefSchema;exports.semaphorSourcesReferToSameDataset=e.semaphorSourcesReferToSameDataset;exports.semaphorSqlResultSchema=e.semaphorSqlResultSchema;exports.semaphorSqlSourceRefSchema=e.semaphorSqlSourceRefSchema;exports.semaphorTimeGrainSchema=e.semaphorTimeGrainSchema;exports.temporalBucketDataTypeForGrain=e.temporalBucketDataTypeForGrain;exports.temporalBucketFormatSchema=e.temporalBucketFormatSchema;exports.temporalBucketMetadataSchema=e.temporalBucketMetadataSchema;exports.validateSemaphorAnalyticsIntent=e.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=e.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=e.validateSemaphorDashboardIntent;exports.validateSemaphorDataAppCodegenSummary=e.validateSemaphorDataAppCodegenSummary;exports.validateSemaphorDerivedFieldDefinition=e.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=e.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=e.validateSemaphorResultCalculation;exports.normalizeSemaphorAnalyticsFilterOperator=A.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=A.normalizeSemaphorInputOperator;exports.getSemaphorAnalyzeResultFieldNames=h.getSemaphorAnalyzeResultFieldNames;exports.isSemaphorAnalyzeResultFieldName=h.isSemaphorAnalyzeResultFieldName;exports.parseSemaphorAnalyzeResult=h.parseSemaphorAnalyzeResult;exports.MatrixResultContractError=l.MatrixResultContractError;exports.buildSemaphorQualifiedSourcePath=l.buildSemaphorQualifiedSourcePath;exports.canonicalizeSemaphorQualifiedSourcePath=l.canonicalizeSemaphorQualifiedSourcePath;exports.getSemaphorConnectionCapabilities=l.getSemaphorConnectionCapabilities;exports.normalizeSemaphorDialect=l.normalizeSemaphorDialect;exports.parseCanonicalMatrixResult=l.parseCanonicalMatrixResult;exports.parseSemaphorQualifiedSourcePath=l.parseSemaphorQualifiedSourcePath;exports.semaphorPhysicalSourceCoordinatesAreCompatible=l.semaphorPhysicalSourceCoordinatesAreCompatible;exports.semaphorSourceHasRequiredCoordinates=l.semaphorSourceHasRequiredCoordinates;exports.COMPARISON_PRESENTATION_DEFAULTS=n.COMPARISON_PRESENTATION_DEFAULTS;exports.DEFAULT_METRIC_COMPARISON_POLARITY=n.DEFAULT_METRIC_COMPARISON_POLARITY;exports.evaluateMetricComparison=n.evaluateMetricComparison;exports.resolveMetricComparisonRequest=n.resolveMetricComparisonRequest;exports.resolveMetricResultAlias=n.resolveMetricResultAlias;exports.validateComparisonPresentationSpec=n.validateComparisonPresentationSpec;exports.validateGlobalDateComparisonContext=n.validateGlobalDateComparisonContext;exports.validateGlobalDateComparisonSelection=n.validateGlobalDateComparisonSelection;exports.validateMetricComparisonConfig=n.validateMetricComparisonConfig;exports.validateMetricComparisonPolarity=n.validateMetricComparisonPolarity;exports.validateMetricComparisonSpec=n.validateMetricComparisonSpec;exports.getCardControlCompatInputId=d.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=d.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=d.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=d.getDashboardFilterCompatInputId;exports.isComparisonCapableDashboardDateInputDefinition=d.isComparisonCapableDashboardDateInputDefinition;exports.resolveDashboardDateComparisonFilterDefinition=d.resolveDashboardDateComparisonFilterDefinition;exports.resolveDashboardDateComparisonInputDefinition=d.resolveDashboardDateComparisonInputDefinition;exports.semanticDatasetMatchesFieldCoordinates=d.semanticDatasetMatchesFieldCoordinates;exports.validateActivatedTemporalBucketResultColumns=R.validateActivatedTemporalBucketResultColumns;exports.validateTemporalBucketMetadata=R.validateTemporalBucketMetadata;exports.validateTemporalBucketResultColumn=R.validateTemporalBucketResultColumn;exports.RawTemporalMetadataContractError=C.RawTemporalMetadataContractError;exports.parseRawTemporalValueMetadata=C.parseRawTemporalValueMetadata;exports.validateRawTemporalResultColumn=C.validateRawTemporalResultColumn;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=T;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=_;exports.resolveTemporalContext=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/validators-DO-YuzgO.cjs"),A=require("../chunks/operators-DrTQsJXv.cjs"),h=require("../chunks/analyze-result-contract-CMwVg9w2.cjs"),n=require("../chunks/matrix-result-contract-DF-qt0jx.cjs"),s=require("../chunks/temporal-bucket-BDRcWdVv.cjs"),d=require("../chunks/dashboard-input-contract-12mPNhCF.cjs"),R=require("../chunks/temporal-bucket-contract-vrOkax-r.cjs"),C=require("../chunks/raw-temporal-contract-UdblxoVB.cjs"),p={kind:"semantic",domainId:"domain_sales",datasetName:"orders",connectionId:"conn_sales",label:"Orders"},T={revenueKpi:{version:1,kind:"metric",id:"revenue-kpi",label:"Revenue",source:p,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{name:"revenue",role:"measure"},comparison:{kind:"previous_period"},limit:1},revenueTrend:{version:1,kind:"records",id:"revenue-trend",label:"Revenue trend",source:p,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:p,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",inputId:"region",source:p,labelField:{name:"region",role:"dimension",dataType:"string"},valueField:{name:"region",role:"dimension",dataType:"string"},limit:100},previousPeriodRevenueComparison:{version:1,kind:"metric",id:"revenue-previous-period",label:"Revenue previous period comparison",source:p,measures:[{name:"revenue",role:"measure"}],primaryMeasure:{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:p,measures:[{name:"net_tons",role:"measure"},{name:"ticket_value",role:"measure"}],primaryMeasure:{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"}]}},y={visibleAxis:{source:{kind:"semantic",domainId:"commerce",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"timestamp with time zone"},expected:{status:"resolved",bindingSource:"visible_axis",name:"order_date",dataType:"datetime"}},invalidSource:{source:{kind:"semantic",datasetName:"orders"},field:{name:"order_date",label:"Order date",dataType:"date"},expected:{status:"unavailable",reason:"temporal_binding_invalid"}}};function S(a){return!!(a.name.trim()&&e.hasCompleteSemaphorSourceIdentity(a.source)&&(a.role==="date"||a.dataType==="date"||a.dataType==="datetime"))}function u(a){return a.filter((t,i)=>a.findIndex(l=>e.semaphorFieldRefsMatch(t.field,l.field))===i)}function _(a){return new Set(a.map(e.semaphorSourceIdentityKey).filter(Boolean)).size}function v(a){const t=u(a.candidates.filter(r=>r.kind==="visible_axis")),i=u(a.candidates.filter(r=>r.kind==="explicit_hidden"));if([...t,...i].some(r=>!S(r.field)))return"invalid";if(t.length>1||i.length>1)return"ambiguous";const l=t[0],m=i[0];if(l)return m&&!e.semaphorFieldRefsMatch(l.field,m.field)?"invalid":l;if(m)return m;if(_(a.querySources??[])>1)return"ambiguous";const c=u(a.candidates.filter(r=>r.kind==="semantic_primary"));return c.some(r=>!S(r.field))?"invalid":c.length>1?"ambiguous":c[0]??"missing"}function g(a){const t=new Date(a.startInclusive),i=new Date(a.endExclusive);return a.timezone.trim()?Number.isFinite(t.getTime())&&Number.isFinite(i.getTime())&&t.getTime()<i.getTime():!1}function I(a){const t=a.ranges??[];if(a.rawSql)return{status:"unavailable",reason:"unsupported_raw_sql",constraints:t};if((a.querySources??[]).some(o=>!e.hasCompleteSemaphorSourceIdentity(o))||t.some(o=>!S(o.field)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const i=v(a);if(typeof i=="string")return{status:"unavailable",reason:`temporal_binding_${i}`,constraints:t};const l=t.filter(o=>e.semaphorFieldRefsMatch(o.field,i.field));if(l.some(o=>!g(o.window)))return{status:"unavailable",reason:"temporal_binding_invalid",constraints:t};const m=l.filter(o=>o.source==="global_date"),c=l.filter(o=>o.source==="card");if(m.length>1||m.length===0&&c.length>1)return{status:"unavailable",reason:"temporal_binding_ambiguous",constraints:t};const r=m[0]??c[0];return{status:"resolved",field:i.field,bindingSource:i.kind,...r?{currentWindow:r.window,governingWindowSource:r.source,governingRangeId:r.id}:{},constraints:t.filter(o=>o.id!==(r==null?void 0:r.id))}}exports.RAW_TEMPORAL_CONTRACT_ERROR_CODES=e.RAW_TEMPORAL_CONTRACT_ERROR_CODES;exports.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT=e.SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=e.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.SEMAPHOR_GENERATED_COUNT_METRIC_ID=e.SEMAPHOR_GENERATED_COUNT_METRIC_ID;exports.SEMAPHOR_MATRIX_TIME_GRAINS=e.SEMAPHOR_MATRIX_TIME_GRAINS;exports.SEMAPHOR_TIME_GRAINS=e.SEMAPHOR_TIME_GRAINS;exports.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES=e.TEMPORAL_BUCKET_CONTRACT_ERROR_CODES;exports.TEMPORAL_BUCKET_PRESETS=e.TEMPORAL_BUCKET_PRESETS;exports.buildAnalyticsCatalogFieldSummary=e.buildAnalyticsCatalogFieldSummary;exports.canonicalDashboardRecordsPayloadSchema=e.canonicalDashboardRecordsPayloadSchema;exports.canonicalizeSemaphorSourceIdentity=e.canonicalizeSemaphorSourceIdentity;exports.dashboardRecordsPayloadSchema=e.dashboardRecordsPayloadSchema;exports.getAnalyticsCatalogFieldCandidates=e.getAnalyticsCatalogFieldCandidates;exports.getAnalyticsCatalogFieldName=e.getAnalyticsCatalogFieldName;exports.getSemaphorNonRedundantDatasetId=e.getSemaphorNonRedundantDatasetId;exports.hasCompleteSemaphorSourceIdentity=e.hasCompleteSemaphorSourceIdentity;exports.isAnalyticsCatalogDateField=e.isAnalyticsCatalogDateField;exports.isAnalyticsCatalogDimensionField=e.isAnalyticsCatalogDimensionField;exports.isAnalyticsCatalogMetricField=e.isAnalyticsCatalogMetricField;exports.isAnalyticsDateLikeDataType=e.isAnalyticsDateLikeDataType;exports.isAnalyticsMetricIdentifierField=e.isAnalyticsMetricIdentifierField;exports.isAnalyticsTechnicalIdentifierField=e.isAnalyticsTechnicalIdentifierField;exports.isSemaphorDataAppCodegenSummary=e.isSemaphorDataAppCodegenSummary;exports.isSemaphorMatrixTimeGrain=e.isSemaphorMatrixTimeGrain;exports.isSemaphorTimeGrain=e.isSemaphorTimeGrain;exports.mergeSemaphorSourcesByIdentity=e.mergeSemaphorSourcesByIdentity;exports.normalizeAnalyticsCatalogDataType=e.normalizeAnalyticsCatalogDataType;exports.normalizeAnalyticsCatalogName=e.normalizeAnalyticsCatalogName;exports.parseSemaphorIsoInstant=e.parseSemaphorIsoInstant;exports.parseSemaphorIsoTimeWindowBoundary=e.parseSemaphorIsoTimeWindowBoundary;exports.preferSemaphorFieldRefMetadata=e.preferSemaphorFieldRefMetadata;exports.preferSemaphorSourceMetadata=e.preferSemaphorSourceMetadata;exports.rawTemporalValueMetadataSchema=e.rawTemporalValueMetadataSchema;exports.semaphorAnalyticsCoverageSchema=e.semaphorAnalyticsCoverageSchema;exports.semaphorAnalyticsDiagnosticFeedbackSchema=e.semaphorAnalyticsDiagnosticFeedbackSchema;exports.semaphorAnalyticsExecutionResultSchema=e.semaphorAnalyticsExecutionResultSchema;exports.semaphorAnalyticsPopulationSchema=e.semaphorAnalyticsPopulationSchema;exports.semaphorAnalyticsResultSchema=e.semaphorAnalyticsResultSchema;exports.semaphorAnalyticsValidationIssueSchema=e.semaphorAnalyticsValidationIssueSchema;exports.semaphorAnalyticsValidationResultSchema=e.semaphorAnalyticsValidationResultSchema;exports.semaphorAnalyzeResultSchema=e.semaphorAnalyzeResultSchema;exports.semaphorAnalyzeResultShape=e.semaphorAnalyzeResultShape;exports.semaphorDataAppCodegenSummarySchema=e.semaphorDataAppCodegenSummarySchema;exports.semaphorDerivedFieldDefinitionSchema=e.semaphorDerivedFieldDefinitionSchema;exports.semaphorExecutionFieldRefSchema=e.semaphorExecutionFieldRefSchema;exports.semaphorFieldRefSchema=e.semaphorFieldRefSchema;exports.semaphorFieldRefsMatch=e.semaphorFieldRefsMatch;exports.semaphorInputOptionsResultSchema=e.semaphorInputOptionsResultSchema;exports.semaphorMatrixResultSchema=e.semaphorMatrixResultSchema;exports.semaphorMetricAggregate=e.semaphorMetricAggregate;exports.semaphorMetricMeasureBindingKey=e.semaphorMetricMeasureBindingKey;exports.semaphorMetricResultSchema=e.semaphorMetricResultSchema;exports.semaphorPhysicalSourceRefSchema=e.semaphorPhysicalSourceRefSchema;exports.semaphorRecordsResultSchema=e.semaphorRecordsResultSchema;exports.semaphorRelationshipDiagnosticsSchema=e.semaphorRelationshipDiagnosticsSchema;exports.semaphorResultColumnSchema=e.semaphorResultColumnSchema;exports.semaphorSemanticSourceRefSchema=e.semaphorSemanticSourceRefSchema;exports.semaphorSourceIdentityKey=e.semaphorSourceIdentityKey;exports.semaphorSourceRefSchema=e.semaphorSourceRefSchema;exports.semaphorSourcesReferToSameDataset=e.semaphorSourcesReferToSameDataset;exports.semaphorSqlResultSchema=e.semaphorSqlResultSchema;exports.semaphorSqlSourceRefSchema=e.semaphorSqlSourceRefSchema;exports.semaphorTimeGrainSchema=e.semaphorTimeGrainSchema;exports.temporalBucketDataTypeForGrain=e.temporalBucketDataTypeForGrain;exports.temporalBucketFormatSchema=e.temporalBucketFormatSchema;exports.temporalBucketMetadataSchema=e.temporalBucketMetadataSchema;exports.validateSemaphorAnalyticsIntent=e.validateSemaphorAnalyticsIntent;exports.validateSemaphorAnalyticsRecoveryPlan=e.validateSemaphorAnalyticsRecoveryPlan;exports.validateSemaphorDashboardIntent=e.validateSemaphorDashboardIntent;exports.validateSemaphorDataAppCodegenSummary=e.validateSemaphorDataAppCodegenSummary;exports.validateSemaphorDerivedFieldDefinition=e.validateSemaphorDerivedFieldDefinition;exports.validateSemaphorOperationIntent=e.validateSemaphorOperationIntent;exports.validateSemaphorResultCalculation=e.validateSemaphorResultCalculation;exports.normalizeSemaphorAnalyticsFilterOperator=A.normalizeSemaphorAnalyticsFilterOperator;exports.normalizeSemaphorInputOperator=A.normalizeSemaphorInputOperator;exports.getSemaphorAnalyzeResultFieldNames=h.getSemaphorAnalyzeResultFieldNames;exports.isSemaphorAnalyzeResultFieldName=h.isSemaphorAnalyzeResultFieldName;exports.parseSemaphorAnalyzeResult=h.parseSemaphorAnalyzeResult;exports.MatrixResultContractError=n.MatrixResultContractError;exports.buildSemaphorQualifiedSourcePath=n.buildSemaphorQualifiedSourcePath;exports.canonicalizeSemaphorQualifiedSourcePath=n.canonicalizeSemaphorQualifiedSourcePath;exports.getSemaphorConnectionCapabilities=n.getSemaphorConnectionCapabilities;exports.isSemaphorPhysicalSourceEntity=n.isSemaphorPhysicalSourceEntity;exports.normalizeSemaphorDialect=n.normalizeSemaphorDialect;exports.parseCanonicalMatrixResult=n.parseCanonicalMatrixResult;exports.parseSemaphorQualifiedSourcePath=n.parseSemaphorQualifiedSourcePath;exports.resolveSemaphorPhysicalSourceEntity=n.resolveSemaphorPhysicalSourceEntity;exports.semaphorPhysicalSourceCoordinatesAreCompatible=n.semaphorPhysicalSourceCoordinatesAreCompatible;exports.semaphorPhysicalSourceCoordinatesCover=n.semaphorPhysicalSourceCoordinatesCover;exports.semaphorSourceHasRequiredCoordinates=n.semaphorSourceHasRequiredCoordinates;exports.COMPARISON_PRESENTATION_DEFAULTS=s.COMPARISON_PRESENTATION_DEFAULTS;exports.DEFAULT_METRIC_COMPARISON_POLARITY=s.DEFAULT_METRIC_COMPARISON_POLARITY;exports.evaluateMetricComparison=s.evaluateMetricComparison;exports.resolveMetricComparisonRequest=s.resolveMetricComparisonRequest;exports.resolveMetricResultAlias=s.resolveMetricResultAlias;exports.validateComparisonPresentationSpec=s.validateComparisonPresentationSpec;exports.validateGlobalDateComparisonContext=s.validateGlobalDateComparisonContext;exports.validateGlobalDateComparisonSelection=s.validateGlobalDateComparisonSelection;exports.validateMetricComparisonConfig=s.validateMetricComparisonConfig;exports.validateMetricComparisonPolarity=s.validateMetricComparisonPolarity;exports.validateMetricComparisonSpec=s.validateMetricComparisonSpec;exports.getCardControlCompatInputId=d.getCardControlCompatInputId;exports.getCardInlineFilterCompatInputId=d.getCardInlineFilterCompatInputId;exports.getDashboardControlCompatInputId=d.getDashboardControlCompatInputId;exports.getDashboardFilterCompatInputId=d.getDashboardFilterCompatInputId;exports.isComparisonCapableDashboardDateInputDefinition=d.isComparisonCapableDashboardDateInputDefinition;exports.resolveDashboardDateComparisonFilterDefinition=d.resolveDashboardDateComparisonFilterDefinition;exports.resolveDashboardDateComparisonInputDefinition=d.resolveDashboardDateComparisonInputDefinition;exports.semanticDatasetMatchesFieldCoordinates=d.semanticDatasetMatchesFieldCoordinates;exports.validateActivatedTemporalBucketResultColumns=R.validateActivatedTemporalBucketResultColumns;exports.validateTemporalBucketMetadata=R.validateTemporalBucketMetadata;exports.validateTemporalBucketResultColumn=R.validateTemporalBucketResultColumn;exports.RawTemporalMetadataContractError=C.RawTemporalMetadataContractError;exports.parseRawTemporalValueMetadata=C.parseRawTemporalValueMetadata;exports.validateRawTemporalResultColumn=C.validateRawTemporalResultColumn;exports.SEMAPHOR_ANALYTICS_INTENT_FIXTURES=T;exports.TEMPORAL_CONTEXT_ADAPTER_PARITY_FIXTURES=y;exports.resolveTemporalContext=I;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { h as c, s as u, j as p } from "../chunks/validators-DhTaCK1O.js";
|
|
2
|
-
import { R as
|
|
2
|
+
import { R as y, e as A, S as b, a as I, q as E, m as M, k as D, T as O, o as F, L as P, $ as k, ag as N, _ as x, D as w, C as B, af as L, G as q, K as z, J as G, F as U, I as H, H as V, i as Y, n as W, l as K, aj as Q, E as X, B as j, g as Z, r as $, p as J, ai as ee, O as ae, ab as re, a9 as ie, ac as se, aa as te, a7 as ne, a0 as oe, a1 as le, f as de, ad as me, ae as ue, X as ce, Y as pe, W as Se, a4 as he, a6 as Re, c as ve, ak as ge, a2 as _e, Q as Ce, a3 as Te, a8 as fe, Z as ye, P as Ae, V as be, ah as Ie, a5 as Ee, U as Me, M as De, d as Oe, N as Fe, t as Pe, x as ke, z as Ne, A as xe, v as we, u as Be, y as Le, w as qe } from "../chunks/validators-DhTaCK1O.js";
|
|
3
3
|
import { a as Ge, n as Ue } from "../chunks/operators-C8TxpM4C.js";
|
|
4
4
|
import { g as Ve, i as Ye, p as We } from "../chunks/analyze-result-contract-kaCNxjA7.js";
|
|
5
|
-
import { M as Qe,
|
|
6
|
-
import { C as
|
|
7
|
-
import { d as
|
|
8
|
-
import { b as
|
|
9
|
-
import { R as
|
|
5
|
+
import { M as Qe, d as Xe, c as je, g as Ze, i as $e, n as Je, e as ea, p as aa, r as ra, s as ia, a as sa, b as ta } from "../chunks/matrix-result-contract-ClC6Pd_g.js";
|
|
6
|
+
import { C as oa, D as la, g as da, r as ma, a as ua, f as ca, d as pa, c as Sa, b as ha, e as Ra, v as va } from "../chunks/temporal-bucket-Cc9fmx8s.js";
|
|
7
|
+
import { d as _a, c as Ca, b as Ta, g as fa, i as ya, r as Aa, a as ba, s as Ia } from "../chunks/dashboard-input-contract-Ciboc347.js";
|
|
8
|
+
import { b as Ma, v as Da, a as Oa } from "../chunks/temporal-bucket-contract-DT4kU0VY.js";
|
|
9
|
+
import { R as Pa, p as ka, v as Na } from "../chunks/raw-temporal-contract-r_EMdR85.js";
|
|
10
10
|
const l = {
|
|
11
11
|
kind: "semantic",
|
|
12
12
|
domainId: "domain_sales",
|
|
13
13
|
datasetName: "orders",
|
|
14
14
|
connectionId: "conn_sales",
|
|
15
15
|
label: "Orders"
|
|
16
|
-
},
|
|
16
|
+
}, g = {
|
|
17
17
|
revenueKpi: {
|
|
18
18
|
version: 1,
|
|
19
19
|
kind: "metric",
|
|
@@ -193,7 +193,7 @@ function R(e) {
|
|
|
193
193
|
const a = new Date(e.startInclusive), i = new Date(e.endExclusive);
|
|
194
194
|
return e.timezone.trim() ? Number.isFinite(a.getTime()) && Number.isFinite(i.getTime()) && a.getTime() < i.getTime() : !1;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function C(e) {
|
|
197
197
|
const a = e.ranges ?? [];
|
|
198
198
|
if (e.rawSql)
|
|
199
199
|
return {
|
|
@@ -248,17 +248,17 @@ function T(e) {
|
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
250
|
export {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
oa as COMPARISON_PRESENTATION_DEFAULTS,
|
|
252
|
+
la as DEFAULT_METRIC_COMPARISON_POLARITY,
|
|
253
253
|
Qe as MatrixResultContractError,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
y as RAW_TEMPORAL_CONTRACT_ERROR_CODES,
|
|
255
|
+
Pa as RawTemporalMetadataContractError,
|
|
256
|
+
g as SEMAPHOR_ANALYTICS_INTENT_FIXTURES,
|
|
257
|
+
A as SEMAPHOR_ANALYZE_RESULT_FIELD_CONTRACT,
|
|
258
258
|
b as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,
|
|
259
259
|
I as SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
E as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
|
|
261
|
+
M as SEMAPHOR_MATRIX_TIME_GRAINS,
|
|
262
262
|
D as SEMAPHOR_TIME_GRAINS,
|
|
263
263
|
O as TEMPORAL_BUCKET_CONTRACT_ERROR_CODES,
|
|
264
264
|
F as TEMPORAL_BUCKET_PRESETS,
|
|
@@ -269,13 +269,13 @@ export {
|
|
|
269
269
|
je as canonicalizeSemaphorQualifiedSourcePath,
|
|
270
270
|
N as canonicalizeSemaphorSourceIdentity,
|
|
271
271
|
x as dashboardRecordsPayloadSchema,
|
|
272
|
-
|
|
272
|
+
da as evaluateMetricComparison,
|
|
273
273
|
w as getAnalyticsCatalogFieldCandidates,
|
|
274
274
|
B as getAnalyticsCatalogFieldName,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
_a as getCardControlCompatInputId,
|
|
276
|
+
Ca as getCardInlineFilterCompatInputId,
|
|
277
|
+
Ta as getDashboardControlCompatInputId,
|
|
278
|
+
fa as getDashboardFilterCompatInputId,
|
|
279
279
|
Ve as getSemaphorAnalyzeResultFieldNames,
|
|
280
280
|
Ze as getSemaphorConnectionCapabilities,
|
|
281
281
|
L as getSemaphorNonRedundantDatasetId,
|
|
@@ -286,32 +286,34 @@ export {
|
|
|
286
286
|
U as isAnalyticsDateLikeDataType,
|
|
287
287
|
H as isAnalyticsMetricIdentifierField,
|
|
288
288
|
V as isAnalyticsTechnicalIdentifierField,
|
|
289
|
-
|
|
289
|
+
ya as isComparisonCapableDashboardDateInputDefinition,
|
|
290
290
|
Ye as isSemaphorAnalyzeResultFieldName,
|
|
291
291
|
Y as isSemaphorDataAppCodegenSummary,
|
|
292
292
|
W as isSemaphorMatrixTimeGrain,
|
|
293
|
+
$e as isSemaphorPhysicalSourceEntity,
|
|
293
294
|
K as isSemaphorTimeGrain,
|
|
294
295
|
Q as mergeSemaphorSourcesByIdentity,
|
|
295
296
|
X as normalizeAnalyticsCatalogDataType,
|
|
296
297
|
j as normalizeAnalyticsCatalogName,
|
|
297
298
|
Ge as normalizeSemaphorAnalyticsFilterOperator,
|
|
298
|
-
|
|
299
|
+
Je as normalizeSemaphorDialect,
|
|
299
300
|
Ue as normalizeSemaphorInputOperator,
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
ea as parseCanonicalMatrixResult,
|
|
302
|
+
ka as parseRawTemporalValueMetadata,
|
|
302
303
|
We as parseSemaphorAnalyzeResult,
|
|
303
304
|
Z as parseSemaphorIsoInstant,
|
|
304
305
|
$ as parseSemaphorIsoTimeWindowBoundary,
|
|
305
|
-
|
|
306
|
+
aa as parseSemaphorQualifiedSourcePath,
|
|
306
307
|
J as preferSemaphorFieldRefMetadata,
|
|
307
308
|
ee as preferSemaphorSourceMetadata,
|
|
308
309
|
ae as rawTemporalValueMetadataSchema,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
310
|
+
Aa as resolveDashboardDateComparisonFilterDefinition,
|
|
311
|
+
ba as resolveDashboardDateComparisonInputDefinition,
|
|
312
|
+
ma as resolveMetricComparisonRequest,
|
|
313
|
+
ua as resolveMetricResultAlias,
|
|
314
|
+
ra as resolveSemaphorPhysicalSourceEntity,
|
|
315
|
+
C as resolveTemporalContext,
|
|
316
|
+
Ia as semanticDatasetMatchesFieldCoordinates,
|
|
315
317
|
re as semaphorAnalyticsCoverageSchema,
|
|
316
318
|
ie as semaphorAnalyticsDiagnosticFeedbackSchema,
|
|
317
319
|
se as semaphorAnalyticsExecutionResultSchema,
|
|
@@ -328,33 +330,34 @@ export {
|
|
|
328
330
|
u as semaphorFieldRefsMatch,
|
|
329
331
|
he as semaphorInputOptionsResultSchema,
|
|
330
332
|
Re as semaphorMatrixResultSchema,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
+
ve as semaphorMetricAggregate,
|
|
334
|
+
ge as semaphorMetricMeasureBindingKey,
|
|
333
335
|
_e as semaphorMetricResultSchema,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
Ce as
|
|
336
|
+
ia as semaphorPhysicalSourceCoordinatesAreCompatible,
|
|
337
|
+
sa as semaphorPhysicalSourceCoordinatesCover,
|
|
338
|
+
Ce as semaphorPhysicalSourceRefSchema,
|
|
339
|
+
Te as semaphorRecordsResultSchema,
|
|
337
340
|
fe as semaphorRelationshipDiagnosticsSchema,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
+
ye as semaphorResultColumnSchema,
|
|
342
|
+
Ae as semaphorSemanticSourceRefSchema,
|
|
343
|
+
ta as semaphorSourceHasRequiredCoordinates,
|
|
341
344
|
p as semaphorSourceIdentityKey,
|
|
342
345
|
be as semaphorSourceRefSchema,
|
|
343
346
|
Ie as semaphorSourcesReferToSameDataset,
|
|
344
|
-
|
|
345
|
-
|
|
347
|
+
Ee as semaphorSqlResultSchema,
|
|
348
|
+
Me as semaphorSqlSourceRefSchema,
|
|
346
349
|
De as semaphorTimeGrainSchema,
|
|
347
350
|
Oe as temporalBucketDataTypeForGrain,
|
|
348
351
|
Fe as temporalBucketFormatSchema,
|
|
349
352
|
Pe as temporalBucketMetadataSchema,
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
353
|
+
Ma as validateActivatedTemporalBucketResultColumns,
|
|
354
|
+
ca as validateComparisonPresentationSpec,
|
|
355
|
+
pa as validateGlobalDateComparisonContext,
|
|
356
|
+
Sa as validateGlobalDateComparisonSelection,
|
|
357
|
+
ha as validateMetricComparisonConfig,
|
|
358
|
+
Ra as validateMetricComparisonPolarity,
|
|
359
|
+
va as validateMetricComparisonSpec,
|
|
360
|
+
Na as validateRawTemporalResultColumn,
|
|
358
361
|
ke as validateSemaphorAnalyticsIntent,
|
|
359
362
|
Ne as validateSemaphorAnalyticsRecoveryPlan,
|
|
360
363
|
xe as validateSemaphorDashboardIntent,
|
|
@@ -362,6 +365,6 @@ export {
|
|
|
362
365
|
Be as validateSemaphorDerivedFieldDefinition,
|
|
363
366
|
Le as validateSemaphorOperationIntent,
|
|
364
367
|
qe as validateSemaphorResultCalculation,
|
|
365
|
-
|
|
366
|
-
|
|
368
|
+
Da as validateTemporalBucketMetadata,
|
|
369
|
+
Oa as validateTemporalBucketResultColumn
|
|
367
370
|
};
|
|
@@ -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-DyE2_OmQ.cjs"),oe=require("../chunks/color-CyB5o13F.cjs"),L=require("../chunks/x-B6ghREd2.cjs");require("../chunks/saved-temporal-bucket-format-Ca4hUfTo.cjs");require("../chunks/validators-DO-YuzgO.cjs");require("../chunks/analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");const W=require("../chunks/index-ByFbacH7.cjs"),_=require("../chunks/palette-BN-jYtaK.cjs"),fe=require("../chunks/braces-v55uLCAK.cjs"),me=require("../chunks/save-3dYRmehL.cjs"),xe=require("../chunks/layout-grid-xm8pqtx0.cjs");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,6 +1,6 @@
|
|
|
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 q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as Je, T as je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-
|
|
3
|
+
import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as Je, T as je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-BagpmPNw.js";
|
|
4
4
|
import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
|
|
5
5
|
import { c as ae, X as Xe } from "../chunks/x-CXDkqdur.js";
|
|
6
6
|
import "../chunks/saved-temporal-bucket-format-hylaofsQ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),p=require("react"),s=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("react"),s=require("./index-DKaQRhKm.cjs"),n=require("./switch-DyE2_OmQ.cjs"),Ce=require("./layout-grid-xm8pqtx0.cjs"),K=require("./x-B6ghREd2.cjs"),V=require("./editor-action-buttons-WJFWflfs.cjs"),we=require("./saved-temporal-bucket-format-Ca4hUfTo.cjs");require("./validators-DO-YuzgO.cjs");require("./analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");const Ue=require("./search-BqqhaMx9.cjs"),Oe=require("./mouse-pointer-2-DX4A_XZw.cjs"),Ne=require("./pivot-header-presentation-DyV0iOZ_.cjs");require("./appearance-runtime-provider-BgNYdUYH.cjs");require("./appearance-context-DhyjbQk1.cjs");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-C6sZAVqS.cjs");require("./color-CyB5o13F.cjs");require("react-dom");const X=require("./index-CQN-X1jN.cjs");/**
|
|
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 { jsx as e, jsxs as r, Fragment as W } from "react/jsx-runtime";
|
|
2
2
|
import Wt, { useState as E, useEffect as Q, useMemo as ee, useContext as Ht, useRef as he, useCallback as K } from "react";
|
|
3
|
-
import { cm as et, aH as De, aI as ke, aK as Ae, bb as wt, bY as Gt, cn as Kt, co as qt, aZ as fe, ca as Nt, bl as Pe, s as Xt, o as Zt, cp as Qt, aP as tt, aS as rt, aT as at, aU as nt, aV as st, aW as ot, aX as it, aY as St, bk as lt, aG as O, cq as Yt, cr as Jt, cs as qe, cb as $e, cc as je, ct as Dt, cd as We, bW as G, b1 as er, bB as Me, cu as tr, bV as rr, aJ as ct, aL as dt, cv as ar, aF as nr, ba as sr, bw as kt, cw as or, bZ as ir, u as lr, aM as cr, b3 as dr, az as He, O as ue, aw as ut, as as At, at as ht, P as Et, ar as ur, ay as hr, ch as mr, cx as pr, bu as fr, au as gt, R as gr, T as br, cy as xr, cz as vr, cA as yr, cB as Cr, cC as wr, cD as Nr, cE as It, cF as Sr, b4 as Dr, cG as kr, ce as Ft, cH as Ar, cI as Er, cJ as Re, cK as Ir, cL as Fr, cM as Lr, an as Br, ap as Tr, a3 as Vr, a2 as Rr, a1 as Ur, a0 as Pr, Z as Mr, X as Or, cN as _r, cO as zr, cP as $r, cQ as jr, cR as Wr, al as Hr, cS as Gr, cT as Kr, a9 as qr, cU as Xr, cV as Zr, cW as Qr } from "./index-
|
|
4
|
-
import { B, O as Se, Z as Ye, L as te, M as Lt, d as Bt, c as q, K as Yr, D as ge, u as P, z as be, aw as Tt, av as Je, E as Vt, P as Oe, a as _e, b as ze, aH as Jr, aI as ea, S as Rt, aJ as ta, aK as ra, aL as aa, aM as na, aF as sa } from "./switch-
|
|
3
|
+
import { cm as et, aH as De, aI as ke, aK as Ae, bb as wt, bY as Gt, cn as Kt, co as qt, aZ as fe, ca as Nt, bl as Pe, s as Xt, o as Zt, cp as Qt, aP as tt, aS as rt, aT as at, aU as nt, aV as st, aW as ot, aX as it, aY as St, bk as lt, aG as O, cq as Yt, cr as Jt, cs as qe, cb as $e, cc as je, ct as Dt, cd as We, bW as G, b1 as er, bB as Me, cu as tr, bV as rr, aJ as ct, aL as dt, cv as ar, aF as nr, ba as sr, bw as kt, cw as or, bZ as ir, u as lr, aM as cr, b3 as dr, az as He, O as ue, aw as ut, as as At, at as ht, P as Et, ar as ur, ay as hr, ch as mr, cx as pr, bu as fr, au as gt, R as gr, T as br, cy as xr, cz as vr, cA as yr, cB as Cr, cC as wr, cD as Nr, cE as It, cF as Sr, b4 as Dr, cG as kr, ce as Ft, cH as Ar, cI as Er, cJ as Re, cK as Ir, cL as Fr, cM as Lr, an as Br, ap as Tr, a3 as Vr, a2 as Rr, a1 as Ur, a0 as Pr, Z as Mr, X as Or, cN as _r, cO as zr, cP as $r, cQ as jr, cR as Wr, al as Hr, cS as Gr, cT as Kr, a9 as qr, cU as Xr, cV as Zr, cW as Qr } from "./index-8Cm77joZ.js";
|
|
4
|
+
import { B, O as Se, Z as Ye, L as te, M as Lt, d as Bt, c as q, K as Yr, D as ge, u as P, z as be, aw as Tt, av as Je, E as Vt, P as Oe, a as _e, b as ze, aH as Jr, aI as ea, S as Rt, aJ as ta, aK as ra, aL as aa, aM as na, aF as sa } from "./switch-BagpmPNw.js";
|
|
5
5
|
import { L as mt } from "./layout-grid-CiubineE.js";
|
|
6
6
|
import { c as Ee, X as Ge, C as Ut } from "./x-CXDkqdur.js";
|
|
7
|
-
import { u as pt, V as oa, E as Xe, a as Ze, b as ia, c as la, L as ca, d as da, e as Pt, C as Mt, F as ua, f as ha } from "./editor-action-buttons-
|
|
7
|
+
import { u as pt, V as oa, E as Xe, a as Ze, b as ia, c as la, L as ca, d as da, e as Pt, C as Mt, F as ua, f as ha } from "./editor-action-buttons-CFbMRQSE.js";
|
|
8
8
|
import { v as bt } from "./saved-temporal-bucket-format-hylaofsQ.js";
|
|
9
9
|
import "./validators-DhTaCK1O.js";
|
|
10
10
|
import "./analyze-result-contract-kaCNxjA7.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import { u as S, B as R, ax as mt, z as sr, O as na, Z as sa, c as be, ay as oa, az as ia, aA as ot, aB as xe, aC as pt, aD as or, L as Be, aE as ir, aF as da, D as $t, Q as Gt, V as Bt, W as zt, Y as Ht, X as la, i as ca, aG as ua } from "./switch-
|
|
3
|
-
import { bx as ma, by as pa, az as q, aH as dr, bz as ha, aZ as K, aI as lr, aJ as fa, aK as it, aL as dt, aF as ga, bA as ge, bB as Ge, bC as ba, bD as jt, bE as cr, bF as ur, bG as xa, bH as ht, bI as va, bJ as ya, bK as wa, bL as Na, bM as Sa, bN as Da, b8 as ve, bO as ye, aG as C, bP as Ca, bQ as mr, bl as ft, bR as ka, bS as Ea, bT as pr, bU as La, bV as hr, bW as V, bX as Ia, ap as Ma, bY as Aa, bZ as Pa, b_ as Oa, b$ as _a, n as Ra, u as Fe, t as Ua, o as rt, c0 as Va, c1 as Ta, c2 as Fa, c3 as $a, N as Ga, c4 as Ba, c5 as za, I as qt, c6 as Ha, c7 as ja, c8 as qa, c9 as Ka, ca as Wa, cb as Kt, cc as Wt, cd as Qt, ce as Qa, cf as Ja, cg as Ya, ch as Xa, b1 as Jt, ci as Za, cj as en, ck as tn, s as rn, cl as an, aP as nn, aS as sn, aT as on, aU as dn, aV as ln, aW as cn, aX as un, aY as Yt, g as lt } from "./index-
|
|
2
|
+
import { u as S, B as R, ax as mt, z as sr, O as na, Z as sa, c as be, ay as oa, az as ia, aA as ot, aB as xe, aC as pt, aD as or, L as Be, aE as ir, aF as da, D as $t, Q as Gt, V as Bt, W as zt, Y as Ht, X as la, i as ca, aG as ua } from "./switch-BagpmPNw.js";
|
|
3
|
+
import { bx as ma, by as pa, az as q, aH as dr, bz as ha, aZ as K, aI as lr, aJ as fa, aK as it, aL as dt, aF as ga, bA as ge, bB as Ge, bC as ba, bD as jt, bE as cr, bF as ur, bG as xa, bH as ht, bI as va, bJ as ya, bK as wa, bL as Na, bM as Sa, bN as Da, b8 as ve, bO as ye, aG as C, bP as Ca, bQ as mr, bl as ft, bR as ka, bS as Ea, bT as pr, bU as La, bV as hr, bW as V, bX as Ia, ap as Ma, bY as Aa, bZ as Pa, b_ as Oa, b$ as _a, n as Ra, u as Fe, t as Ua, o as rt, c0 as Va, c1 as Ta, c2 as Fa, c3 as $a, N as Ga, c4 as Ba, c5 as za, I as qt, c6 as Ha, c7 as ja, c8 as qa, c9 as Ka, ca as Wa, cb as Kt, cc as Wt, cd as Qt, ce as Qa, cf as Ja, cg as Ya, ch as Xa, b1 as Jt, ci as Za, cj as en, ck as tn, s as rn, cl as an, aP as nn, aS as sn, aT as on, aU as dn, aV as ln, aW as cn, aX as un, aY as Yt, g as lt } from "./index-8Cm77joZ.js";
|
|
4
4
|
import { c as ee, X as fr, C as mn } from "./x-CXDkqdur.js";
|
|
5
5
|
import "./saved-temporal-bucket-format-hylaofsQ.js";
|
|
6
6
|
import "./validators-DhTaCK1O.js";
|
|
@@ -15,10 +15,10 @@ import "./color-CJvdlFM_.js";
|
|
|
15
15
|
import { createPortal as fn } from "react-dom";
|
|
16
16
|
import "./index-DO4BESNy.js";
|
|
17
17
|
import "./appearance-runtime-provider-CjmE4gBY.js";
|
|
18
|
-
import { c as gn, u as bn, A as xn, a as vn, f as yn, V as wn, N as Nn, g as Sn, U as Dn } from "./dashboard-briefing-launcher-
|
|
18
|
+
import { c as gn, u as bn, A as xn, a as vn, f as yn, V as wn, N as Nn, g as Sn, U as Dn } from "./dashboard-briefing-launcher-kKSBCRLE.js";
|
|
19
19
|
import { S as Cn, C as kn } from "./search-BHsQIWBV.js";
|
|
20
20
|
import { d as br } from "./format-types-CFHQoIuk.js";
|
|
21
|
-
import { R as En } from "./report-preferences-dialog-
|
|
21
|
+
import { R as En } from "./report-preferences-dialog-D-NDYRrk.js";
|
|
22
22
|
import { u as Ln } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
23
23
|
import { s as at } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
24
24
|
import { S as Zt } from "./save-DgMfP0j8.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./switch-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./switch-DyE2_OmQ.cjs"),s=require("./index-DKaQRhKm.cjs"),U=require("./x-B6ghREd2.cjs");require("./saved-temporal-bucket-format-Ca4hUfTo.cjs");require("./validators-DO-YuzgO.cjs");require("./analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");const y=require("react");require("./appearance-context-DhyjbQk1.cjs");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-C6sZAVqS.cjs");require("./color-CyB5o13F.cjs");const cs=require("react-dom");require("./index-CQN-X1jN.cjs");require("./appearance-runtime-provider-BgNYdUYH.cjs");const $=require("./dashboard-briefing-launcher-BqxcYhO2.cjs"),wt=require("./search-BqqhaMx9.cjs"),St=require("./format-types-PSZZ7hG8.cjs"),us=require("./report-preferences-dialog-C5UOCTwt.cjs"),ms=require("./use-debounced-dirty-check-XHSwAefL.cjs"),qe=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),xt=require("./save-3dYRmehL.cjs"),hs=require("./palette-BN-jYtaK.cjs"),ps=require("./braces-v55uLCAK.cjs");function fs(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const M=fs(y);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -662,7 +662,7 @@ const de = {
|
|
|
662
662
|
"is null",
|
|
663
663
|
"is not null"
|
|
664
664
|
]),
|
|
665
|
-
boolean: /* @__PURE__ */ new Set(["=", "!=", "is null", "is not null"])
|
|
665
|
+
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
666
666
|
};
|
|
667
667
|
function ae(e) {
|
|
668
668
|
const n = D(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var H=Object.defineProperty;var L=(e,n,i)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>L(e,typeof n!="symbol"?n+"":n,i);const f=require("./validators-DO-YuzgO.cjs");require("./analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");function p(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function k(e){return p(e)&&typeof e.name=="string"}function F(e){return!p(e)||e.kind!=="semantic"&&e.kind!=="physical"||(e.kind==="semantic"?[e.datasetId,e.datasetName,e.connectionId]:[e.databaseName,e.schemaName]).some(i=>i!==void 0&&typeof i!="string")?!1:f.hasCompleteSemaphorSourceIdentity(e)}function v(e,n){var c,o;if((n==null?void 0:n.mode)!=="database"&&e.type==="dataset"&&"domainId"in e&&e.domainId){const s=e,d={kind:"semantic",domainId:s.domainId,datasetId:s.id,datasetName:s.name,connectionId:s.connectionId||(n==null?void 0:n.connectionId),label:s.label};return F(d)?f.canonicalizeSemaphorSourceIdentity(d):void 0}const i=e.connectionId||(n==null?void 0:n.connectionId),a=e.type==="dataset"&&"table"in e&&e.table?e.table:e.name;if(!i||!a)return;const t={kind:"physical",connectionId:i,connectionType:e.connectionType||(n==null?void 0:n.connectionType),tableName:a,databaseName:e.database||((c=n==null?void 0:n.dbSelection)==null?void 0:c.database),schemaName:e.schema||((o=n==null?void 0:n.dbSelection)==null?void 0:o.schema),dialect:e.dialect};return F(t)?t:void 0}function V(e,n){var s,d;const i=v(e,n);if(!i)return;const a=e.type==="dataset"&&"table"in e&&typeof e.table=="string"?e.table.trim():void 0,t=i.kind==="physical"?i.tableName:a,c=e.connectionId||(n==null?void 0:n.connectionId),o=t&&c?{connectionId:c,databaseName:e.database||((s=n==null?void 0:n.dbSelection)==null?void 0:s.database),schemaName:e.schema||((d=n==null?void 0:n.dbSelection)==null?void 0:d.schema),tableName:t}:void 0;return{source:i,...o?{executionTable:o}:{}}}function x(e){const n=p(e.dataSource)?e.dataSource:void 0;if(typeof e.sql=="string"&&e.sql.trim()){const o=[],s=Array.isArray(n==null?void 0:n.selectedEntities)?n.selectedEntities:[];for(const d of s){if(!k(d))continue;const r=V(d,n);r&&!o.some(T=>f.semaphorSourcesReferToSameDataset(T.source,r.source))&&o.push(r)}return{cardId:e.id,kind:"sql",pinnedCatalogSources:o}}if(!p(e.config))return{cardId:e.id,kind:"unconfigured"};const i=[],a=p(e.config.matrixIntent)?e.config.matrixIntent:void 0,t=e.type==="matrixTable"?(a==null?void 0:a.kind)==="matrix"?a.source:e.config.source:void 0;F(t)&&i.push(t);const c=p(e.config.joinPlan)?e.config.joinPlan:void 0;if(c){const o=Array.isArray(c.joins)?c.joins:[],s=[c.baseEntity];for(const d of o)p(d)&&s.push(d.source,d.target);for(const d of s){if(!k(d))continue;const r=v(d,n);r&&i.push(r)}}else if(e.type!=="matrixTable"){const o=Array.isArray(n==null?void 0:n.selectedEntities)?n.selectedEntities:[];if(o.length===1&&k(o[0])){const s=v(o[0],n);s&&i.push(s)}}if(!i.length&&!c&&e.type!=="matrixTable"){const o=e.config.queryBaseSource;F(o)&&i.push(o)}return{cardId:e.id,kind:"config",executableSources:f.mergeSemaphorSourcesByIdentity(i)}}function w(e,n){return(e.kind==="config"?e.executableSources:e.kind==="sql"?e.pinnedCatalogSources.map(a=>a.source):[]).some(a=>f.semaphorSourcesReferToSameDataset(a,n))}function U(e,n){if(e.kind==="config")return e.executableSources.find(i=>f.semaphorSourcesReferToSameDataset(i,n))}function W(e,n){var i;return(i=C(e,n))==null?void 0:i.source}function C(e,n){if(e.kind==="sql")return e.pinnedCatalogSources.find(i=>f.semaphorSourcesReferToSameDataset(i.source,n))}function R(e){const n=new Set;for(const i of[e.name,e.sourceField]){if(!i)continue;const a=f.normalizeAnalyticsCatalogName(i);if(!a)continue;n.add(a);const t=a.split("."),c=t[t.length-1];c&&n.add(c)}return n}function z(e,n){const i=f.normalizeAnalyticsCatalogDataType(e),a=f.normalizeAnalyticsCatalogDataType(n);return i==="unknown"||a==="unknown"?!1:(i==="date"||i==="datetime")&&(a==="date"||a==="datetime")?!0:i===a}function K(e,n){return f.semaphorSourcesReferToSameDataset(e.field.source,n.field.source)&&f.normalizeAnalyticsCatalogName(e.field.name)===f.normalizeAnalyticsCatalogName(n.field.name)&&f.normalizeAnalyticsCatalogName(e.field.sourceField||e.field.name)===f.normalizeAnalyticsCatalogName(n.field.sourceField||n.field.name)}function P(e,n){if(e.kind!=="field")return!1;const i=R(n),a=R(e.field);return z(n.dataType,e.field.dataType)&&[...a].some(t=>i.has(t))}function Y(e){const n=e.candidates.filter(i=>P(i,e.logicalValueField));return n.length===1?{status:"matched",target:n[0]}:n.length>1?{status:"ambiguous"}:{status:"notApplicable"}}function G(e){const n=[];for(const i of e.acceptedTargets)!z(e.logicalValueField.dataType,i.field.dataType)||n.some(a=>K(a,i))||n.push(i);return n.length===1?{status:"matched",target:n[0]}:n.length>1?{status:"ambiguous"}:{status:"notApplicable"}}const J=/\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i,Q=/\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i,X=/\bwhere\b/i;function B(e){return e!=null&&e.trim()?J.test(e)||Q.test(e):!1}function Z(e){return!(e!=null&&e.trim())||B(e)?null:X.test(e)?{helper:"{{ filters | and }}",description:"For queries with an existing WHERE clause."}:{helper:"{{ filters | where }}",description:"For queries without a WHERE clause."}}function ee(e){return(e.field.sourceField||e.field.name).trim()||void 0}function ne(e){if(e.inventory.kind!=="sql"||e.target.kind!=="field")return{status:"ineligible"};const n=C(e.inventory,e.target.field.source),i=ee(e.target);if(!n||!i)return{status:"ineligible"};if(n.executionTable){const o=[n.executionTable.databaseName,n.executionTable.schemaName,n.executionTable.tableName,i].filter(Boolean).join(".");return{status:"eligible",source:n.source,executionIdentifier:o}}if(e.inventory.pinnedCatalogSources.length!==1)return{status:"ineligible"};const a=f.normalizeAnalyticsCatalogName(i),t=(e.candidateTargets||[]).filter(o=>f.normalizeAnalyticsCatalogName(o.field.sourceField||o.field.name)===a),c=[];for(const o of t)c.some(s=>f.semaphorSourcesReferToSameDataset(s,o.field.source))||c.push(o.field.source);return c.length>1?{status:"ineligible"}:{status:"eligible",source:n.source,executionIdentifier:i}}class j extends Error{constructor(i){super(i.map(a=>a.message).join(" "));N(this,"issues");this.name="DashboardFilterMappingContractError",this.issues=i}}const ie={string:!0,number:!0,boolean:!0,date:!0,datetime:!0};function b(e){return typeof e=="string"&&e.trim().length>0}function m(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function I(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function te(e){if(!m(e))return!1;switch(e.kind){case"allSheets":return e.sheetKinds===void 0||I(e.sheetKinds)&&e.sheetKinds.every(n=>n==="dashboard"||n==="document");case"sheets":return I(e.sheetIds);case"cards":return I(e.cardIds);case"documentSections":return b(e.sheetId)&&I(e.sectionIds);default:return!1}}function re(e){return e==="shared"||e==="perSheet"||e==="perCard"||e==="perDocumentSection"}function se(e){return m(e)?b(e.id)&&b(e.column)&&b(e.dataType):!1}function oe(e,n,i,a){var s;if(!m(n)){a.push({code:"invalid_option_source",path:i,message:`${i} must be a semantic or physical option source.`,inputId:e});return}const t=n.source,c=[["labelField",n.labelField],["valueField",n.valueField],["searchField",n.searchField]];if(!m(t)||t.kind!=="semantic"&&t.kind!=="physical"||!f.hasCompleteSemaphorSourceIdentity(t)||!m(n.labelField)||!m(n.valueField)||n.searchField!==void 0&&!m(n.searchField)||n.disambiguationFields!==void 0&&(!Array.isArray(n.disambiguationFields)||!n.disambiguationFields.every(m))){a.push({code:"invalid_option_source",path:i,message:`${i} must contain a valid semantic or physical source and field references.`,inputId:e});return}for(const[d,r]of c)r!==void 0&&m(r)&&(!b(r.name)||r.source!==void 0&&!f.semaphorSourcesReferToSameDataset(r.source,t))&&a.push({code:"invalid_option_source",path:`${i}.${d}`,message:`${i}.${d} must be a named field belonging to the declared option source.`,inputId:e});for(const[d,r]of((s=n.disambiguationFields)==null?void 0:s.entries())||[])(!m(r)||!b(r.name)||r.source!==void 0&&!f.semaphorSourcesReferToSameDataset(r.source,t))&&a.push({code:"invalid_option_source",path:`${i}.disambiguationFields[${d}]`,message:`${i}.disambiguationFields[${d}] must be a named field belonging to the declared option source.`,inputId:e});const o=n.valueField;["string","number","boolean","date","datetime"].includes(String(o.dataType))||a.push({code:"invalid_option_source",path:`${i}.valueField.dataType`,message:`${i}.valueField.dataType must be a known option-value datatype.`,inputId:e})}function ae(e,n,i,a,t,c){var r;if(b(n.bindingId)||t.push({code:"invalid_binding_id",path:`${i}.bindingId`,message:`${i}.bindingId must be an opaque non-empty id.`,inputId:e,cardId:n.cardId}),((r=n.target)==null?void 0:r.kind)!=="field"){t.push({code:"unsupported_target",path:`${i}.target`,message:`${i}.target must be one direct field target.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}const o=n.target.field;if(!b(o==null?void 0:o.name)||!o.source||o.source.kind!=="semantic"&&o.source.kind!=="physical"||!f.hasCompleteSemaphorSourceIdentity(o.source)){t.push({code:"invalid_target_field",path:`${i}.target.field`,message:`${i}.target.field must have a name and a source-qualified semantic or physical identity.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}if(Object.prototype.hasOwnProperty.call(ie,o.dataType)||t.push({code:"unknown_target_data_type",path:`${i}.target.field.dataType`,message:`${i}.target.field.dataType must be known.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId}),o.sourceField!==void 0&&!b(o.sourceField)&&t.push({code:"invalid_target_field",path:`${i}.target.field.sourceField`,message:`${i}.target.field.sourceField must be a non-empty catalog-grounded column when provided.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId}),!c)return;const s=a.get(n.cardId);if(!s){t.push({code:"unknown_card",path:`${i}.cardId`,message:`${i}.cardId '${n.cardId}' does not exist.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}const d=x(s);(d.kind==="unconfigured"||!w(d,o.source))&&t.push({code:"unavailable_card_source",path:`${i}.target.field.source`,message:`${i}.target field source is not declared by card '${s.id}'.`,inputId:e,cardId:s.id,bindingId:n.bindingId})}function de(e,n,i,a,t,c){if(n===void 0)return;if(!m(n)||n.kind!=="cardMappings"||!Array.isArray(n.cards)){t.push({code:"invalid_application",path:i,message:`${i} must be a cardMappings application with a cards array.`,inputId:e});return}const o=new Set;n.cards.forEach((s,d)=>{const r=`${i}.cards[${d}]`;if(!b(s==null?void 0:s.cardId)){t.push({code:"unknown_card",path:`${r}.cardId`,message:`${r}.cardId is required.`,inputId:e});return}if(o.has(s.cardId)){t.push({code:"duplicate_card_application",path:`${r}.cardId`,message:`${i} contains more than one entry for card '${s.cardId}'.`,inputId:e,cardId:s.cardId});return}if(o.add(s.cardId),c&&!a.has(s.cardId)){t.push({code:"unknown_card",path:`${r}.cardId`,message:`${r}.cardId '${s.cardId}' does not exist.`,inputId:e,cardId:s.cardId});return}s.kind==="bound"?ae(e,s,r,a,t,c):s.kind!=="excluded"&&t.push({code:"invalid_application",path:r,message:`${r}.kind must be 'bound' or 'excluded'.`,inputId:e,cardId:s.cardId})})}function q({inputs:e,dashboardFilters:n,cards:i=[],validateCardTargets:a=!1}){const t=[],c=new Map((n||[]).map(r=>[r.id,r])),o=new Map(a?i.map(r=>[r.id,r]):[]),s=[],d=new Map;return e!=null&&!Array.isArray(e)?(t.push({code:"invalid_input",path:"dashboard.inputs",message:"dashboard.inputs must be an array when present."}),{ok:!1,inputs:s,issues:t}):((Array.isArray(e)?e:[]).forEach((r,T)=>{const u=`dashboard.inputs[${T}]`;if(!m(r)||r.kind!=="filter"&&r.kind!=="control"||!b(r.id)||!b(r.label)||!b(r.variableName)||!te(r.scope)||!re(r.runtimeScope)){t.push({code:"invalid_input",path:u,message:`${u} must be a complete filter or control Dashboard Input envelope.`,inputId:m(r)&&typeof r.id=="string"?r.id:void 0});return}if(r.kind==="control"&&!m(r.control)){t.push({code:"invalid_input",path:`${u}.control`,message:`${u}.control must be a control definition.`,inputId:r.id});return}const l=r;if(l.kind==="control"){s.push(l);return}const $=l.filter,g=l.filterReference,y=$!==void 0,E=!!g;if(y&&E){t.push({code:"both_filter_definitions",path:u,message:`${u} must contain either filter or filterReference, not both.`,inputId:l.id});return}if(!y&&!E){t.push({code:"missing_filter_definition",path:u,message:`${u} must contain filter or filterReference.`,inputId:l.id});return}if(y&&!se($)){t.push({code:"invalid_input",path:`${u}.filter`,message:`${u}.filter must be a complete dashboard filter definition.`,inputId:l.id});return}let h,_;if(y)h=$,_="embedded";else{if((g==null?void 0:g.kind)!=="dashboardFilter"){t.push({code:"invalid_filter_reference",path:`${u}.filterReference.kind`,message:`${u}.filterReference.kind must be 'dashboardFilter'.`,inputId:l.id});return}const D=typeof(g==null?void 0:g.filterId)=="string"?g.filterId:void 0;if(h=D?c.get(D):void 0,_="dashboardFilter",!h){t.push({code:"orphaned_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference cannot resolve dashboard filter '${D||""}'.`,inputId:l.id});return}if(h.kind==="global-date"){t.push({code:"global_date_reference",path:`${u}.filterReference`,message:`${u}.filterReference cannot reference the Global Date filter.`,inputId:l.id});return}const A=d.get(h.id);if(A){t.push({code:"duplicate_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference duplicates dashboard filter '${h.id}' already owned by Dashboard Input '${A}'.`,inputId:l.id});return}d.set(h.id,l.id)}if(!h)return;if(l.optionSource!==void 0&&oe(l.id,l.optionSource,`${u}.optionSource`,t),l.application&&h.kind==="global-date"){t.push({code:"global_date_reference",path:`${u}.application`,message:`${u}.application cannot map the Global Date filter.`,inputId:l.id});return}l.application&&l.scope.kind!=="allSheets"&&l.scope.kind!=="sheets"&&t.push({code:"unsupported_mapped_scope",path:`${u}.scope`,message:`${u}.scope must be allSheets or sheets when cardMappings are present.`,inputId:l.id}),de(l.id,l.application,`${u}.application`,o,t,a);const{filter:me,filterReference:be,compatibility:S,...O}=l;s.push({...O,filter:h,...y&&S?{compatibility:S}:{},...l.optionSource?{optionSource:l.optionSource}:{},definitionOrigin:_})}),t.length?{ok:!1,inputs:s,issues:t}:{ok:!0,inputs:s})}function ce(e){const n=q(e);if(!n.ok)throw new j(n.issues);return n.inputs}function le(e=()=>globalThis.crypto.randomUUID()){return e()}const ue={date:new Set(["between","not between","=","!=",">",">=","<","<=","is null","is not null"]),number:new Set(["between","not between","=","!=",">",">=","<","<=","in","not in","is null","is not null"]),string:new Set(["=","!=","in","not in","like","not like","is null","is not null"]),boolean:new Set(["=","!=","is null","is not null"])};function M(e){const n=f.normalizeAnalyticsCatalogDataType(e);return n==="number"||n==="boolean"?n:n==="date"||n==="datetime"?"date":"string"}function fe(e,n){return typeof n!="string"?!1:ue[M(e)].has(n)}exports.DashboardFilterMappingContractError=j;exports.buildDashboardCardSourceIndex=x;exports.createDashboardFilterBindingId=le;exports.dashboardCardFilterSourceInventoryContains=w;exports.dashboardFilterTargetMatchesLogicalValue=P;exports.dashboardFilterValueTypeForDataType=M;exports.findDashboardCardExecutableSource=U;exports.findDashboardCardPinnedCatalogSource=W;exports.findDashboardSqlPinnedCatalogSource=C;exports.getDashboardFilterSubscriptionHint=Z;exports.hasDashboardFilterSubscription=B;exports.isDashboardFilterOperationCompatible=fe;exports.normalizeDashboardInputs=q;exports.requireNormalizedDashboardInputs=ce;exports.resolveDashboardFilterAutomaticTarget=Y;exports.resolveDashboardFilterInheritedTarget=G;exports.resolveDashboardSqlFilterTarget=ne;
|
|
1
|
+
"use strict";var H=Object.defineProperty;var L=(e,n,i)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var N=(e,n,i)=>L(e,typeof n!="symbol"?n+"":n,i);const f=require("./validators-DO-YuzgO.cjs");require("./analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");function p(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function k(e){return p(e)&&typeof e.name=="string"}function F(e){return!p(e)||e.kind!=="semantic"&&e.kind!=="physical"||(e.kind==="semantic"?[e.datasetId,e.datasetName,e.connectionId]:[e.databaseName,e.schemaName]).some(i=>i!==void 0&&typeof i!="string")?!1:f.hasCompleteSemaphorSourceIdentity(e)}function v(e,n){var c,o;if((n==null?void 0:n.mode)!=="database"&&e.type==="dataset"&&"domainId"in e&&e.domainId){const s=e,d={kind:"semantic",domainId:s.domainId,datasetId:s.id,datasetName:s.name,connectionId:s.connectionId||(n==null?void 0:n.connectionId),label:s.label};return F(d)?f.canonicalizeSemaphorSourceIdentity(d):void 0}const i=e.connectionId||(n==null?void 0:n.connectionId),a=e.type==="dataset"&&"table"in e&&e.table?e.table:e.name;if(!i||!a)return;const t={kind:"physical",connectionId:i,connectionType:e.connectionType||(n==null?void 0:n.connectionType),tableName:a,databaseName:e.database||((c=n==null?void 0:n.dbSelection)==null?void 0:c.database),schemaName:e.schema||((o=n==null?void 0:n.dbSelection)==null?void 0:o.schema),dialect:e.dialect};return F(t)?t:void 0}function V(e,n){var s,d;const i=v(e,n);if(!i)return;const a=e.type==="dataset"&&"table"in e&&typeof e.table=="string"?e.table.trim():void 0,t=i.kind==="physical"?i.tableName:a,c=e.connectionId||(n==null?void 0:n.connectionId),o=t&&c?{connectionId:c,databaseName:e.database||((s=n==null?void 0:n.dbSelection)==null?void 0:s.database),schemaName:e.schema||((d=n==null?void 0:n.dbSelection)==null?void 0:d.schema),tableName:t}:void 0;return{source:i,...o?{executionTable:o}:{}}}function x(e){const n=p(e.dataSource)?e.dataSource:void 0;if(typeof e.sql=="string"&&e.sql.trim()){const o=[],s=Array.isArray(n==null?void 0:n.selectedEntities)?n.selectedEntities:[];for(const d of s){if(!k(d))continue;const r=V(d,n);r&&!o.some(T=>f.semaphorSourcesReferToSameDataset(T.source,r.source))&&o.push(r)}return{cardId:e.id,kind:"sql",pinnedCatalogSources:o}}if(!p(e.config))return{cardId:e.id,kind:"unconfigured"};const i=[],a=p(e.config.matrixIntent)?e.config.matrixIntent:void 0,t=e.type==="matrixTable"?(a==null?void 0:a.kind)==="matrix"?a.source:e.config.source:void 0;F(t)&&i.push(t);const c=p(e.config.joinPlan)?e.config.joinPlan:void 0;if(c){const o=Array.isArray(c.joins)?c.joins:[],s=[c.baseEntity];for(const d of o)p(d)&&s.push(d.source,d.target);for(const d of s){if(!k(d))continue;const r=v(d,n);r&&i.push(r)}}else if(e.type!=="matrixTable"){const o=Array.isArray(n==null?void 0:n.selectedEntities)?n.selectedEntities:[];if(o.length===1&&k(o[0])){const s=v(o[0],n);s&&i.push(s)}}if(!i.length&&!c&&e.type!=="matrixTable"){const o=e.config.queryBaseSource;F(o)&&i.push(o)}return{cardId:e.id,kind:"config",executableSources:f.mergeSemaphorSourcesByIdentity(i)}}function w(e,n){return(e.kind==="config"?e.executableSources:e.kind==="sql"?e.pinnedCatalogSources.map(a=>a.source):[]).some(a=>f.semaphorSourcesReferToSameDataset(a,n))}function U(e,n){if(e.kind==="config")return e.executableSources.find(i=>f.semaphorSourcesReferToSameDataset(i,n))}function W(e,n){var i;return(i=C(e,n))==null?void 0:i.source}function C(e,n){if(e.kind==="sql")return e.pinnedCatalogSources.find(i=>f.semaphorSourcesReferToSameDataset(i.source,n))}function R(e){const n=new Set;for(const i of[e.name,e.sourceField]){if(!i)continue;const a=f.normalizeAnalyticsCatalogName(i);if(!a)continue;n.add(a);const t=a.split("."),c=t[t.length-1];c&&n.add(c)}return n}function z(e,n){const i=f.normalizeAnalyticsCatalogDataType(e),a=f.normalizeAnalyticsCatalogDataType(n);return i==="unknown"||a==="unknown"?!1:(i==="date"||i==="datetime")&&(a==="date"||a==="datetime")?!0:i===a}function K(e,n){return f.semaphorSourcesReferToSameDataset(e.field.source,n.field.source)&&f.normalizeAnalyticsCatalogName(e.field.name)===f.normalizeAnalyticsCatalogName(n.field.name)&&f.normalizeAnalyticsCatalogName(e.field.sourceField||e.field.name)===f.normalizeAnalyticsCatalogName(n.field.sourceField||n.field.name)}function P(e,n){if(e.kind!=="field")return!1;const i=R(n),a=R(e.field);return z(n.dataType,e.field.dataType)&&[...a].some(t=>i.has(t))}function Y(e){const n=e.candidates.filter(i=>P(i,e.logicalValueField));return n.length===1?{status:"matched",target:n[0]}:n.length>1?{status:"ambiguous"}:{status:"notApplicable"}}function G(e){const n=[];for(const i of e.acceptedTargets)!z(e.logicalValueField.dataType,i.field.dataType)||n.some(a=>K(a,i))||n.push(i);return n.length===1?{status:"matched",target:n[0]}:n.length>1?{status:"ambiguous"}:{status:"notApplicable"}}const J=/\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i,Q=/\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i,X=/\bwhere\b/i;function B(e){return e!=null&&e.trim()?J.test(e)||Q.test(e):!1}function Z(e){return!(e!=null&&e.trim())||B(e)?null:X.test(e)?{helper:"{{ filters | and }}",description:"For queries with an existing WHERE clause."}:{helper:"{{ filters | where }}",description:"For queries without a WHERE clause."}}function ee(e){return(e.field.sourceField||e.field.name).trim()||void 0}function ne(e){if(e.inventory.kind!=="sql"||e.target.kind!=="field")return{status:"ineligible"};const n=C(e.inventory,e.target.field.source),i=ee(e.target);if(!n||!i)return{status:"ineligible"};if(n.executionTable){const o=[n.executionTable.databaseName,n.executionTable.schemaName,n.executionTable.tableName,i].filter(Boolean).join(".");return{status:"eligible",source:n.source,executionIdentifier:o}}if(e.inventory.pinnedCatalogSources.length!==1)return{status:"ineligible"};const a=f.normalizeAnalyticsCatalogName(i),t=(e.candidateTargets||[]).filter(o=>f.normalizeAnalyticsCatalogName(o.field.sourceField||o.field.name)===a),c=[];for(const o of t)c.some(s=>f.semaphorSourcesReferToSameDataset(s,o.field.source))||c.push(o.field.source);return c.length>1?{status:"ineligible"}:{status:"eligible",source:n.source,executionIdentifier:i}}class j extends Error{constructor(i){super(i.map(a=>a.message).join(" "));N(this,"issues");this.name="DashboardFilterMappingContractError",this.issues=i}}const ie={string:!0,number:!0,boolean:!0,date:!0,datetime:!0};function b(e){return typeof e=="string"&&e.trim().length>0}function m(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function I(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function te(e){if(!m(e))return!1;switch(e.kind){case"allSheets":return e.sheetKinds===void 0||I(e.sheetKinds)&&e.sheetKinds.every(n=>n==="dashboard"||n==="document");case"sheets":return I(e.sheetIds);case"cards":return I(e.cardIds);case"documentSections":return b(e.sheetId)&&I(e.sectionIds);default:return!1}}function re(e){return e==="shared"||e==="perSheet"||e==="perCard"||e==="perDocumentSection"}function se(e){return m(e)?b(e.id)&&b(e.column)&&b(e.dataType):!1}function oe(e,n,i,a){var s;if(!m(n)){a.push({code:"invalid_option_source",path:i,message:`${i} must be a semantic or physical option source.`,inputId:e});return}const t=n.source,c=[["labelField",n.labelField],["valueField",n.valueField],["searchField",n.searchField]];if(!m(t)||t.kind!=="semantic"&&t.kind!=="physical"||!f.hasCompleteSemaphorSourceIdentity(t)||!m(n.labelField)||!m(n.valueField)||n.searchField!==void 0&&!m(n.searchField)||n.disambiguationFields!==void 0&&(!Array.isArray(n.disambiguationFields)||!n.disambiguationFields.every(m))){a.push({code:"invalid_option_source",path:i,message:`${i} must contain a valid semantic or physical source and field references.`,inputId:e});return}for(const[d,r]of c)r!==void 0&&m(r)&&(!b(r.name)||r.source!==void 0&&!f.semaphorSourcesReferToSameDataset(r.source,t))&&a.push({code:"invalid_option_source",path:`${i}.${d}`,message:`${i}.${d} must be a named field belonging to the declared option source.`,inputId:e});for(const[d,r]of((s=n.disambiguationFields)==null?void 0:s.entries())||[])(!m(r)||!b(r.name)||r.source!==void 0&&!f.semaphorSourcesReferToSameDataset(r.source,t))&&a.push({code:"invalid_option_source",path:`${i}.disambiguationFields[${d}]`,message:`${i}.disambiguationFields[${d}] must be a named field belonging to the declared option source.`,inputId:e});const o=n.valueField;["string","number","boolean","date","datetime"].includes(String(o.dataType))||a.push({code:"invalid_option_source",path:`${i}.valueField.dataType`,message:`${i}.valueField.dataType must be a known option-value datatype.`,inputId:e})}function ae(e,n,i,a,t,c){var r;if(b(n.bindingId)||t.push({code:"invalid_binding_id",path:`${i}.bindingId`,message:`${i}.bindingId must be an opaque non-empty id.`,inputId:e,cardId:n.cardId}),((r=n.target)==null?void 0:r.kind)!=="field"){t.push({code:"unsupported_target",path:`${i}.target`,message:`${i}.target must be one direct field target.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}const o=n.target.field;if(!b(o==null?void 0:o.name)||!o.source||o.source.kind!=="semantic"&&o.source.kind!=="physical"||!f.hasCompleteSemaphorSourceIdentity(o.source)){t.push({code:"invalid_target_field",path:`${i}.target.field`,message:`${i}.target.field must have a name and a source-qualified semantic or physical identity.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}if(Object.prototype.hasOwnProperty.call(ie,o.dataType)||t.push({code:"unknown_target_data_type",path:`${i}.target.field.dataType`,message:`${i}.target.field.dataType must be known.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId}),o.sourceField!==void 0&&!b(o.sourceField)&&t.push({code:"invalid_target_field",path:`${i}.target.field.sourceField`,message:`${i}.target.field.sourceField must be a non-empty catalog-grounded column when provided.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId}),!c)return;const s=a.get(n.cardId);if(!s){t.push({code:"unknown_card",path:`${i}.cardId`,message:`${i}.cardId '${n.cardId}' does not exist.`,inputId:e,cardId:n.cardId,bindingId:n.bindingId});return}const d=x(s);(d.kind==="unconfigured"||!w(d,o.source))&&t.push({code:"unavailable_card_source",path:`${i}.target.field.source`,message:`${i}.target field source is not declared by card '${s.id}'.`,inputId:e,cardId:s.id,bindingId:n.bindingId})}function de(e,n,i,a,t,c){if(n===void 0)return;if(!m(n)||n.kind!=="cardMappings"||!Array.isArray(n.cards)){t.push({code:"invalid_application",path:i,message:`${i} must be a cardMappings application with a cards array.`,inputId:e});return}const o=new Set;n.cards.forEach((s,d)=>{const r=`${i}.cards[${d}]`;if(!b(s==null?void 0:s.cardId)){t.push({code:"unknown_card",path:`${r}.cardId`,message:`${r}.cardId is required.`,inputId:e});return}if(o.has(s.cardId)){t.push({code:"duplicate_card_application",path:`${r}.cardId`,message:`${i} contains more than one entry for card '${s.cardId}'.`,inputId:e,cardId:s.cardId});return}if(o.add(s.cardId),c&&!a.has(s.cardId)){t.push({code:"unknown_card",path:`${r}.cardId`,message:`${r}.cardId '${s.cardId}' does not exist.`,inputId:e,cardId:s.cardId});return}s.kind==="bound"?ae(e,s,r,a,t,c):s.kind!=="excluded"&&t.push({code:"invalid_application",path:r,message:`${r}.kind must be 'bound' or 'excluded'.`,inputId:e,cardId:s.cardId})})}function q({inputs:e,dashboardFilters:n,cards:i=[],validateCardTargets:a=!1}){const t=[],c=new Map((n||[]).map(r=>[r.id,r])),o=new Map(a?i.map(r=>[r.id,r]):[]),s=[],d=new Map;return e!=null&&!Array.isArray(e)?(t.push({code:"invalid_input",path:"dashboard.inputs",message:"dashboard.inputs must be an array when present."}),{ok:!1,inputs:s,issues:t}):((Array.isArray(e)?e:[]).forEach((r,T)=>{const u=`dashboard.inputs[${T}]`;if(!m(r)||r.kind!=="filter"&&r.kind!=="control"||!b(r.id)||!b(r.label)||!b(r.variableName)||!te(r.scope)||!re(r.runtimeScope)){t.push({code:"invalid_input",path:u,message:`${u} must be a complete filter or control Dashboard Input envelope.`,inputId:m(r)&&typeof r.id=="string"?r.id:void 0});return}if(r.kind==="control"&&!m(r.control)){t.push({code:"invalid_input",path:`${u}.control`,message:`${u}.control must be a control definition.`,inputId:r.id});return}const l=r;if(l.kind==="control"){s.push(l);return}const $=l.filter,g=l.filterReference,y=$!==void 0,E=!!g;if(y&&E){t.push({code:"both_filter_definitions",path:u,message:`${u} must contain either filter or filterReference, not both.`,inputId:l.id});return}if(!y&&!E){t.push({code:"missing_filter_definition",path:u,message:`${u} must contain filter or filterReference.`,inputId:l.id});return}if(y&&!se($)){t.push({code:"invalid_input",path:`${u}.filter`,message:`${u}.filter must be a complete dashboard filter definition.`,inputId:l.id});return}let h,_;if(y)h=$,_="embedded";else{if((g==null?void 0:g.kind)!=="dashboardFilter"){t.push({code:"invalid_filter_reference",path:`${u}.filterReference.kind`,message:`${u}.filterReference.kind must be 'dashboardFilter'.`,inputId:l.id});return}const D=typeof(g==null?void 0:g.filterId)=="string"?g.filterId:void 0;if(h=D?c.get(D):void 0,_="dashboardFilter",!h){t.push({code:"orphaned_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference cannot resolve dashboard filter '${D||""}'.`,inputId:l.id});return}if(h.kind==="global-date"){t.push({code:"global_date_reference",path:`${u}.filterReference`,message:`${u}.filterReference cannot reference the Global Date filter.`,inputId:l.id});return}const A=d.get(h.id);if(A){t.push({code:"duplicate_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference duplicates dashboard filter '${h.id}' already owned by Dashboard Input '${A}'.`,inputId:l.id});return}d.set(h.id,l.id)}if(!h)return;if(l.optionSource!==void 0&&oe(l.id,l.optionSource,`${u}.optionSource`,t),l.application&&h.kind==="global-date"){t.push({code:"global_date_reference",path:`${u}.application`,message:`${u}.application cannot map the Global Date filter.`,inputId:l.id});return}l.application&&l.scope.kind!=="allSheets"&&l.scope.kind!=="sheets"&&t.push({code:"unsupported_mapped_scope",path:`${u}.scope`,message:`${u}.scope must be allSheets or sheets when cardMappings are present.`,inputId:l.id}),de(l.id,l.application,`${u}.application`,o,t,a);const{filter:me,filterReference:be,compatibility:S,...O}=l;s.push({...O,filter:h,...y&&S?{compatibility:S}:{},...l.optionSource?{optionSource:l.optionSource}:{},definitionOrigin:_})}),t.length?{ok:!1,inputs:s,issues:t}:{ok:!0,inputs:s})}function ce(e){const n=q(e);if(!n.ok)throw new j(n.issues);return n.inputs}function le(e=()=>globalThis.crypto.randomUUID()){return e()}const ue={date:new Set(["between","not between","=","!=",">",">=","<","<=","is null","is not null"]),number:new Set(["between","not between","=","!=",">",">=","<","<=","in","not in","is null","is not null"]),string:new Set(["=","!=","in","not in","like","not like","is null","is not null"]),boolean:new Set(["=","!=","in","not in","is null","is not null"])};function M(e){const n=f.normalizeAnalyticsCatalogDataType(e);return n==="number"||n==="boolean"?n:n==="date"||n==="datetime"?"date":"string"}function fe(e,n){return typeof n!="string"?!1:ue[M(e)].has(n)}exports.DashboardFilterMappingContractError=j;exports.buildDashboardCardSourceIndex=x;exports.createDashboardFilterBindingId=le;exports.dashboardCardFilterSourceInventoryContains=w;exports.dashboardFilterTargetMatchesLogicalValue=P;exports.dashboardFilterValueTypeForDataType=M;exports.findDashboardCardExecutableSource=U;exports.findDashboardCardPinnedCatalogSource=W;exports.findDashboardSqlPinnedCatalogSource=C;exports.getDashboardFilterSubscriptionHint=Z;exports.hasDashboardFilterSubscription=B;exports.isDashboardFilterOperationCompatible=fe;exports.normalizeDashboardInputs=q;exports.requireNormalizedDashboardInputs=ce;exports.resolveDashboardFilterAutomaticTarget=Y;exports.resolveDashboardFilterInheritedTarget=G;exports.resolveDashboardSqlFilterTarget=ne;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as p, useState as u, useRef as f, useEffect as b } from "react";
|
|
3
3
|
import { X as S } from "./x-CXDkqdur.js";
|
|
4
|
-
import { u as a, c as N, B as D, C as J } from "./switch-
|
|
4
|
+
import { u as a, c as N, B as D, C as J } from "./switch-BagpmPNw.js";
|
|
5
5
|
import "./saved-temporal-bucket-format-hylaofsQ.js";
|
|
6
6
|
import "./validators-DhTaCK1O.js";
|
|
7
7
|
import "./analyze-result-contract-kaCNxjA7.js";
|
|
8
8
|
import "../value-format-preferences/index.js";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-8Cm77joZ.js";
|
|
10
10
|
import "./appearance-runtime-provider-CjmE4gBY.js";
|
|
11
11
|
import "./appearance-context-DVXt8qjW.js";
|
|
12
12
|
import "./index-DSKR3nKn.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B6ghREd2.cjs"),r=require("./switch-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B6ghREd2.cjs"),r=require("./switch-DyE2_OmQ.cjs");require("./saved-temporal-bucket-format-Ca4hUfTo.cjs");require("./validators-DO-YuzgO.cjs");require("./analyze-result-contract-CMwVg9w2.cjs");require("../value-format-preferences/index.cjs");require("./index-DKaQRhKm.cjs");require("./appearance-runtime-provider-BgNYdUYH.cjs");require("./appearance-context-DhyjbQk1.cjs");require("./index-ByFbacH7.cjs");require("./temporal-bucket-authoring-C6sZAVqS.cjs");require("./color-CyB5o13F.cjs");require("react-dom");require("./index-CQN-X1jN.cjs");function S(){const t=r.useDashboardStore(e=>e.dashboard),d=r.useDashboardStore(e=>e.actions.setDashboard),c=r.useDashboardStore(e=>e.showDashboardJSON),h=r.useDashboardStore(e=>e.actions.setShowDashboardJSON),s=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,n]=o.useState(s),i=o.useRef(s);return o.useEffect(()=>{s!==i.current&&(n(s),i.current=s)},[s]),a.jsxs("div",{className:r.cn("relative p-2",{hidden:!c}),children:[a.jsxs(r.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(b.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(r.CodeEditor,{value:l,onValueChange:e=>{n(e);try{const u=JSON.parse(e);i.current=JSON.stringify(u,null,2),d(u)}catch{}},language:"json"})})]})}exports.default=S;
|