react-semaphor 0.1.470 → 0.1.472
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/README.md +10 -0
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/chunks/dashboard-briefing-launcher-8vxGyexK.cjs +26 -0
- package/dist/chunks/{dashboard-briefing-launcher-DEVbQCQE.js → dashboard-briefing-launcher-Lw4gjW_M.js} +5 -5
- package/dist/chunks/{dashboard-controls-8D1m_ECN.cjs → dashboard-controls-BKR8g3M9.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-DPK-CRWL.js → dashboard-controls-CRgDlxdt.js} +4 -4
- package/dist/chunks/dashboard-filter-value-compatibility-Dmh-NaPK.cjs +1 -0
- package/dist/chunks/dashboard-filter-value-compatibility-ilbH2A31.js +836 -0
- package/dist/chunks/{dashboard-json-DVWLTmIJ.js → dashboard-json-BhhVg9mI.js} +2 -2
- package/dist/chunks/{dashboard-json-DhKOoHwK.cjs → dashboard-json-CUgAzrYq.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-B6zidwTu.cjs → edit-dashboard-visual-BxmanBVo.cjs} +33 -33
- package/dist/chunks/{edit-dashboard-visual-CxEC3bPx.js → edit-dashboard-visual-DlQtYQOO.js} +3609 -3711
- package/dist/chunks/{editor-action-buttons-HfJ-Bohl.js → editor-action-buttons-CRWacpxi.js} +2 -2
- package/dist/chunks/{editor-action-buttons-B3S00DsB.cjs → editor-action-buttons-DKcD0UQy.cjs} +1 -1
- package/dist/chunks/{index-tsB3LfTQ.js → index-0fmECZL2.js} +28713 -28753
- package/dist/chunks/{index-DVBYvkj0.cjs → index-xdqe-Zvd.cjs} +224 -224
- package/dist/chunks/{pivot-header-presentation-BW0Ay7WV.js → pivot-header-presentation-7XrwJYDm.js} +101 -94
- package/dist/chunks/pivot-header-presentation-Cr6pU5JL.cjs +4 -0
- package/dist/chunks/{report-preferences-dialog-DvNWNrlj.cjs → report-preferences-dialog-8KYKazoG.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-D-VpoQJz.js → report-preferences-dialog-Dxt9XMpd.js} +2 -2
- package/dist/chunks/{switch-NAbuOQNg.cjs → switch-CQN9Hzho.cjs} +19 -19
- package/dist/chunks/{switch-DnbD-yCM.js → switch-n2yUNY8i.js} +383 -370
- 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/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +71 -68
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/format-utils.d.ts +9 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-briefing-launcher-exfJnSop.cjs +0 -26
- package/dist/chunks/dashboard-filter-value-compatibility-BAaqJGjt.js +0 -692
- package/dist/chunks/dashboard-filter-value-compatibility-CYrWe1U6.cjs +0 -1
- package/dist/chunks/pivot-header-presentation-DVBTHug2.cjs +0 -4
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../chunks/index-xdqe-Zvd.cjs"),e=require("../chunks/common-types-C1IM7gao.cjs");exports.Dashboard=o.Dashboard;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../chunks/contracts-CtB2VONT.cjs"),A=require("../chunks/temporal-bucket-authoring-DSpzgXHc.cjs"),w=require("../chunks/validators-DcshgK7w.cjs");require("../chunks/analyze-result-contract-OgPk-zGu.cjs");require("../value-format-preferences/index.cjs");const Te=require("../chunks/operators-DrTQsJXv.cjs"),X=require("../chunks/canonical-result-keys-Cb96edol.cjs"),m=require("../chunks/dashboard-filter-value-compatibility-CYrWe1U6.cjs");function S(e){return e&&typeof e=="object"?e:null}function T(e){return typeof e=="string"?e:null}function de(e){var t,r,a;return!!(e&&typeof e=="object")&&(((t=S(e))==null?void 0:t.kind)==="semantic"||((r=S(e))==null?void 0:r.kind)==="physical"||((a=S(e))==null?void 0:a.kind)==="sql")}function M(e){return de(e)?e.kind==="semantic"?!!(e.domainId&&e.datasetName):e.kind==="physical"?!!(e.connectionId&&e.tableName):!1:!1}function Fe(e){return w.semaphorSourceIdentityKey(e)}function Y(e,t){return w.semaphorSourcesReferToSameDataset(e,t)}function ce(e,t){return w.preferSemaphorSourceMetadata(e,t)}function B(e){const t=[];for(const r of e){const a=t.findIndex(o=>Y(o,r));a===-1?t.push(r):t[a]=ce(t[a],r)}return t}function ke(e){return B(e)[0]}function K(e,t){return e.kind!=="semantic"||e.connectionId||(t==null?void 0:t.kind)!=="semantic"||!w.semaphorSourcesReferToSameDataset(e,t)||!t.connectionId?e:{...e,connectionId:t.connectionId}}function U(e){return M(e)?e:void 0}function oe(e,t){if(!(e.kind!=="semantic"||e.connectionId))return t.find(r=>(r==null?void 0:r.kind)==="semantic"&&w.semaphorSourcesReferToSameDataset(e,r)&&!!r.connectionId)}function v(e,t){const r=U(e==null?void 0:e.source);return r?K(r,t):void 0}function le({explicitSource:e,field:t,defaultSource:r,fallbackSources:a}){const o=[r,...a||[]],n=U(e),i=n?K(n,oe(n,o)):void 0;if(i)return i;if(e!==void 0)return;const d=v(t,r),s=d?K(d,oe(d,o)):void 0;if(s)return s;if((t==null?void 0:t.source)===void 0)return U(r)}function xe(e,t){if(!(e!=null&&e.name)||!(t!=null&&t.name)||e.name!==t.name)return!1;const r=v(e),a=v(t);return!r||!a?!0:Y(r,a)}function x(e){var t;return T((t=S(e))==null?void 0:t.kind)}function ue(e){var t,r;return x(e)!=="semantic"?null:((r=T((t=S(e))==null?void 0:t.domainId))==null?void 0:r.trim())||null}function Re(e){var t;return x(e)!=="semantic"?null:T((t=S(e))==null?void 0:t.datasetName)}function Me(e){var t;return x(e)!=="semantic"?null:T((t=S(e))==null?void 0:t.datasetId)}function Ne(e){var t;return x(e)!=="physical"?null:T((t=S(e))==null?void 0:t.connectionId)}function Oe(e){var t;return x(e)!=="physical"?null:T((t=S(e))==null?void 0:t.tableName)}function Be(e){var t;return x(e)!=="physical"?"":T((t=S(e))==null?void 0:t.databaseName)||""}function $e(e){var t;return x(e)!=="physical"?"":T((t=S(e))==null?void 0:t.schemaName)||""}function fe(e){if(e.analyticsIntent&&typeof e.analyticsIntent=="object"&&"source"in e.analyticsIntent)return e.analyticsIntent.source}function pe({datasets:e,requireAtLeastOne:t}){if(t&&e.length<1)return{ok:!1,issue:"invalid_dataset_count"};if(e.length<=1)return{ok:!0};const r=e.map(ue),a=new Set(r.filter(Boolean));return r.some(o=>!o)||a.size!==1?{ok:!1,issue:"invalid_multi_dataset_scope"}:{ok:!0}}function z(e,t){if(!t)return!1;if(t.kind==="semantic"){const r=Me(e);return ue(e)===t.domainId?r&&t.datasetId?r===t.datasetId:Re(e)===t.datasetName:!1}return t.kind==="physical"?Ne(e)===t.connectionId&&Oe(e)===t.tableName&&Be(e)===(t.databaseName||"")&&$e(e)===(t.schemaName||""):!1}function Pe(e,t){return e.find(r=>z(r,t))}function p(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function E(e){const t=new Set;for(const r of e){if(t.has(r))return r;t.add(r)}return null}function he({card:e,datasets:t,errors:r}){if(e.type==="text")return;const a=fe(e);if(!a){if(t.length<=1)return;r.push(p("missing_card_analytics_source","Multi-dataset dashboard cards must include analytics intent with a source so the materializer can choose the correct dataset.",e.id));return}t.some(o=>z(o,a))||r.push(p("invalid_card_analytics_source","Dashboard cards with an explicit analytics source must use one of the selected datasets.",e.id))}function q(e){return e.map(t=>t==null?void 0:t.source).filter(t=>!!t)}function L(e){return Array.isArray(e)?e.filter(t=>!!(t&&typeof t=="object")):[]}function se(e){return Array.isArray(e)?e.filter(t=>!!(t&&typeof t=="object")):[]}function Ee(e){var r,a;if(!e)return[];const t=[e.source];return e.kind==="metric"?t.push(...q([...L(e.measures),e.primaryMeasure,e.dateField,...L(e.dimensions),...se(e.filters).map(o=>o.field)])):e.kind==="records"?t.push(...q([...L(e.fields),e.dateField,(r=e.orderBy)==null?void 0:r.field,...se(e.filters).map(o=>o.field)])):e.kind==="inputOptions"?(((a=e.population)==null?void 0:a.kind)==="related_population"&&t.push(e.population.baseSource),t.push(...q([e.labelField,e.valueField,e.searchField,...e.disambiguationFields||[]]))):e.kind==="sql"&&t.push(...q(e.fields||[])),t}function me({card:e,datasets:t,errors:r}){if(e.type!=="text"){for(const a of Ee(e.analyticsIntent))if(a&&!t.some(o=>z(o,a))){r.push(p("invalid_card_query_source","Dashboard card query field references must use one of the selected datasets.",e.id));return}}}function be({card:e,errors:t}){if(e.type==="text"||!e.analyticsIntent)return;const r=w.validateSemaphorAnalyticsIntent(e.analyticsIntent);if(!r.ok)for(const a of r.errors)t.push(p(a.code,a.path?`${a.path}: ${a.message}`:a.message,e.id))}function ge({datasets:e,errors:t,requireAtLeastOne:r}){const a=pe({datasets:e,requireAtLeastOne:r});if(!a.ok){if(a.issue==="invalid_dataset_count"){t.push(p("invalid_dataset_count","Dashboard authoring requires at least one selected dataset."));return}t.push(p("invalid_multi_dataset_scope","Multi-dataset dashboard authoring is limited to semantic datasets from one domain."))}}function Ie({input:e,errors:t}){var r;(r=e.filter.sql)!=null&&r.trim()&&t.push(p("generated_filter_sql_out_of_scope",`Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`))}function ye(e){var f,g;const t=[];if(!e||typeof e!="object")return{ok:!1,errors:[p("invalid_plan","Dashboard plan must be a structured object.")],warnings:[]};const r=e,a=[...r.warnings||[]];r.version!==1&&t.push(p("invalid_version","Dashboard plan version must be 1.")),(f=r.title)!=null&&f.trim()||t.push(p("missing_title","Dashboard plan needs a title."));const o=Array.isArray(r.datasets)?r.datasets:[],n=Array.isArray(r.sheets)?r.sheets:[];ge({datasets:o,errors:t,requireAtLeastOne:!0}),n.length!==1&&t.push(p("invalid_sheet_count","MVP dashboard authoring creates exactly one dashboard sheet."));const i=n[0];i&&i.kind!=="dashboard"&&t.push(p("invalid_sheet_kind",'Generated sheet must use kind "dashboard".'));const d=(i==null?void 0:i.cards)||[];d.length>k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS&&t.push(p("too_many_cards",`Generated dashboards can contain at most ${k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS} cards.`));const s=E(d.map(l=>l.id));s&&t.push(p("duplicate_card_id",`Duplicate generated card id: ${s}.`));const u=E(d.map(l=>l.frameId));u&&t.push(p("duplicate_frame_id",`Duplicate generated frame id: ${u}.`));for(const l of d)(g=l.title)!=null&&g.trim()||t.push(p("missing_card_title","Card title is required.",l.id)),l.type==="custom"&&t.push(p("custom_visual_out_of_scope","Whole-dashboard authoring supports built-in visual types only.",l.id)),l.type!=="text"&&!l.analyticsIntent&&a.push(p("missing_analytics_intent","Non-text card has no analytics intent and may be skipped by the app layer.",l.id)),he({card:l,datasets:o,errors:t}),be({card:l,errors:t}),me({card:l,datasets:o,errors:t});const h=Array.isArray(r.filterInputs)?r.filterInputs:[],y=h.map(l=>l.id),D=E(y);D&&t.push(p("duplicate_input_id",`Duplicate dashboard input id: ${D}.`));const C=h.map(l=>l.variableName).filter(Boolean)||[],_=E(C);_&&t.push(p("duplicate_input_variable",`Duplicate dashboard input variable name: ${_}.`));for(const l of h)Ie({input:l,errors:t});const c=Array.isArray(r.calculatedFields)?r.calculatedFields:[];for(const l of c)l.scope==="domain"&&l.reuseOnly!==!0&&t.push(p("domain_calculated_field_create_out_of_scope",`Creating domain calculated field "${l.name}" is outside MVP.`));return{ok:t.length===0,errors:t,warnings:a}}function _e(e){var i;const t=[];if(!e||typeof e!="object")return{ok:!1,errors:[p("invalid_change_plan","Dashboard change plan must be a structured object.")],warnings:[]};const r=e,a=[...r.warnings||[]];r.version!==1&&t.push(p("invalid_version","Dashboard change plan version must be 1.")),(i=r.dashboardId)!=null&&i.trim()||t.push(p("missing_dashboard_id","Dashboard change plan needs a dashboard id."));const o=Array.isArray(r.datasets)?r.datasets:[],n=Array.isArray(r.operations)?r.operations:[];ge({datasets:o,errors:t,requireAtLeastOne:!1});for(const d of n){if(d.kind==="unsupported"){a.push(p("unsupported_operation",d.reason||d.requestedAction));continue}d.kind==="addCard"&&d.card.type==="custom"&&t.push(p("custom_visual_out_of_scope","Whole-dashboard authoring supports built-in visual types only.",d.card.id)),d.kind==="addCard"&&(he({card:d.card,datasets:o,errors:t}),be({card:d.card,errors:t}),me({card:d.card,datasets:o,errors:t})),d.kind==="addFilterInput"&&Ie({input:d.input,errors:t}),d.kind==="addCalculatedField"&&d.field.scope==="domain"&&d.field.reuseOnly!==!0&&t.push(p("domain_calculated_field_create_out_of_scope",`Creating domain calculated field "${d.field.name}" is outside MVP.`))}return{ok:t.length===0,errors:t,warnings:a}}const qe={lg:48,md:36,sm:24,xs:12,xxs:6};function ze(e,t){let r=0,a=0,o=0;return e.map(n=>{const i=Math.min(n.w,t);r>0&&r+i>t&&(r=0,a+=o,o=0);const d={i:n.frameId,x:r,y:a,w:i,h:n.h,minW:Math.min(n.minW,t),minH:n.minH,static:!1};return r+=i,o=Math.max(o,n.h),d})}function He(e){const t=[...e].sort((s,u)=>s.priority-u.priority),r=t.filter(s=>s.role==="kpi"),a=t.filter(s=>s.role==="chart"),o=t.filter(s=>s.role==="table"),n=t.filter(s=>s.role==="text"),i=n.slice(0,1),d=n.slice(i.length);return{kpis:r,introText:i,charts:a,tables:o,supportingText:d}}function Ve(e,t,r){return t==="xxs"||t==="xs"?r:t==="sm"?Math.min(12,r):t==="md"?e<=1||e===2?18:12:e<=1||e===2?24:e===3?16:12}function Le(e,t,r,a){return r==="xxs"||r==="xs"||r==="sm"||r==="md"||t===1||t%2===1&&e===0?a:a/2}function je(e){const{item:t,band:r,index:a,bandCount:o,breakpoint:n,columns:i}=e;return r==="kpi"?{...t,band:r,w:Ve(o,n,i),h:15,minW:Math.min(6,i),minH:12}:r==="table"?{...t,band:r,w:i,h:n==="xxs"||n==="xs"?34:38,minW:Math.min(12,i),minH:18}:r==="introText"?{...t,band:r,w:i,h:n==="xxs"||n==="xs"?12:10,minW:Math.min(12,i),minH:8}:r==="supportingText"?{...t,band:r,w:n==="lg"?i/2:i,h:n==="xxs"||n==="xs"?12:10,minW:Math.min(12,i),minH:8}:{...t,band:r,w:Le(a,o,n,i),h:n==="xxs"||n==="xs"?28:30,minW:Math.min(12,i),minH:16}}function N(e,t,r,a){return e.map((o,n)=>je({item:o,band:t,index:n,bandCount:e.length,breakpoint:r,columns:a}))}function H(e){const t=He(e);return Object.fromEntries(k.DASHBOARD_AUTHORING_BREAKPOINTS.map(r=>{const a=qe[r],o=[...N(t.introText,"introText",r,a),...N(t.kpis,"kpi",r,a),...N(t.charts,"chart",r,a),...N(t.tables,"table",r,a),...N(t.supportingText,"supportingText",r,a)];return[r,ze(o,a)]}))}function Ge(e){const t=w.normalizeAnalyticsCatalogDataType(e);return t==="datetime"?"date":t==="unknown"?"string":t}function Ke(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Ue(e){return Ke(e)&&typeof e.filterId=="string"&&typeof e.operation=="string"&&Array.isArray(e.values)}function We(e){return e.filter(t=>typeof t=="string"||typeof t=="number")}function Xe(e){return e.filter(t=>t instanceof Date||typeof t=="string")}function Q(e,t){if(t===void 0)return;const r=Ge(e.dataType),a=e.operation||"in";if(Ue(t))return{...t,filterId:e.id,name:t.name||e.column,valueType:r,dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext};if(a==="is null"||a==="is not null")return{filterId:e.id,name:e.column,operation:a,valueType:r,values:[],dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext};const o=Array.isArray(t)?t:[t],n=r==="date"?Xe(o):We(o);if(n.length!==0&&!((a==="between"||a==="not between")&&n.length<2))return{filterId:e.id,name:e.column,operation:a,valueType:r,values:n,dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext}}function Se(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function Ye(e,t,r){const a=(t||[]).filter(o=>o.scope==="card"&&o.targetCardId===r).map(o=>o.field).filter(Boolean);return a.length===0?e:{...e,calculatedFields:[...e.calculatedFields||[],...a]}}function W(e,t){return Array.from(new Set((e||[]).map(r=>t.get(r)).filter(r=>!!r)))}function Qe(e,t){if((e==null?void 0:e.kind)!=="cards")return e;const r=W(e.cardIds,t);return r.length>0?{...e,cardIds:r}:null}function Je(e,t){return!e.applyToCardIds&&!e.excludeCardIds?e:{...e,...e.applyToCardIds?{applyToCardIds:W(e.applyToCardIds,t)}:{},...e.excludeCardIds?{excludeCardIds:W(e.excludeCardIds,t)}:{}}}function Ze(e,t){const r={},a=[];return{inputs:(e.filterInputs||[]).flatMap((n,i)=>{const d=Qe(n.scope,t);if(d===null)return a.push(Se("filter_input_scope_empty",`Filter input "${n.label}" was skipped because all scoped cards were skipped during query validation.`)),[];const s=Q(n.filter,n.defaultValue);return s&&(r.shared??(r.shared={}),r.shared[n.id]={status:"set",value:{kind:"filter",filterValue:s}}),[{id:n.id,kind:"filter",label:n.label,variableName:n.variableName,scope:d||{kind:"allSheets",sheetKinds:["dashboard"]},runtimeScope:"shared",presentation:{placement:"toolbar",order:i},exports:["label","value","start","end","range"],filter:Je(n.filter,t)}]}),warnings:a,defaultInputValues:r.shared&&Object.keys(r.shared).length>0?r:void 0}}function et(e){var C,_;const t=ye(e.plan);if(!t.ok)throw new Error(t.errors.map(c=>c.message).join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../chunks/contracts-CtB2VONT.cjs"),A=require("../chunks/temporal-bucket-authoring-DSpzgXHc.cjs"),w=require("../chunks/validators-DcshgK7w.cjs");require("../chunks/analyze-result-contract-OgPk-zGu.cjs");require("../value-format-preferences/index.cjs");const Te=require("../chunks/operators-DrTQsJXv.cjs"),X=require("../chunks/canonical-result-keys-Cb96edol.cjs"),m=require("../chunks/dashboard-filter-value-compatibility-Dmh-NaPK.cjs");function S(e){return e&&typeof e=="object"?e:null}function T(e){return typeof e=="string"?e:null}function de(e){var t,r,a;return!!(e&&typeof e=="object")&&(((t=S(e))==null?void 0:t.kind)==="semantic"||((r=S(e))==null?void 0:r.kind)==="physical"||((a=S(e))==null?void 0:a.kind)==="sql")}function M(e){return de(e)?e.kind==="semantic"?!!(e.domainId&&e.datasetName):e.kind==="physical"?!!(e.connectionId&&e.tableName):!1:!1}function Fe(e){return w.semaphorSourceIdentityKey(e)}function Y(e,t){return w.semaphorSourcesReferToSameDataset(e,t)}function ce(e,t){return w.preferSemaphorSourceMetadata(e,t)}function B(e){const t=[];for(const r of e){const a=t.findIndex(o=>Y(o,r));a===-1?t.push(r):t[a]=ce(t[a],r)}return t}function ke(e){return B(e)[0]}function K(e,t){return e.kind!=="semantic"||e.connectionId||(t==null?void 0:t.kind)!=="semantic"||!w.semaphorSourcesReferToSameDataset(e,t)||!t.connectionId?e:{...e,connectionId:t.connectionId}}function U(e){return M(e)?e:void 0}function oe(e,t){if(!(e.kind!=="semantic"||e.connectionId))return t.find(r=>(r==null?void 0:r.kind)==="semantic"&&w.semaphorSourcesReferToSameDataset(e,r)&&!!r.connectionId)}function v(e,t){const r=U(e==null?void 0:e.source);return r?K(r,t):void 0}function le({explicitSource:e,field:t,defaultSource:r,fallbackSources:a}){const o=[r,...a||[]],n=U(e),i=n?K(n,oe(n,o)):void 0;if(i)return i;if(e!==void 0)return;const d=v(t,r),s=d?K(d,oe(d,o)):void 0;if(s)return s;if((t==null?void 0:t.source)===void 0)return U(r)}function xe(e,t){if(!(e!=null&&e.name)||!(t!=null&&t.name)||e.name!==t.name)return!1;const r=v(e),a=v(t);return!r||!a?!0:Y(r,a)}function x(e){var t;return T((t=S(e))==null?void 0:t.kind)}function ue(e){var t,r;return x(e)!=="semantic"?null:((r=T((t=S(e))==null?void 0:t.domainId))==null?void 0:r.trim())||null}function Re(e){var t;return x(e)!=="semantic"?null:T((t=S(e))==null?void 0:t.datasetName)}function Me(e){var t;return x(e)!=="semantic"?null:T((t=S(e))==null?void 0:t.datasetId)}function Ne(e){var t;return x(e)!=="physical"?null:T((t=S(e))==null?void 0:t.connectionId)}function Oe(e){var t;return x(e)!=="physical"?null:T((t=S(e))==null?void 0:t.tableName)}function Be(e){var t;return x(e)!=="physical"?"":T((t=S(e))==null?void 0:t.databaseName)||""}function $e(e){var t;return x(e)!=="physical"?"":T((t=S(e))==null?void 0:t.schemaName)||""}function fe(e){if(e.analyticsIntent&&typeof e.analyticsIntent=="object"&&"source"in e.analyticsIntent)return e.analyticsIntent.source}function pe({datasets:e,requireAtLeastOne:t}){if(t&&e.length<1)return{ok:!1,issue:"invalid_dataset_count"};if(e.length<=1)return{ok:!0};const r=e.map(ue),a=new Set(r.filter(Boolean));return r.some(o=>!o)||a.size!==1?{ok:!1,issue:"invalid_multi_dataset_scope"}:{ok:!0}}function z(e,t){if(!t)return!1;if(t.kind==="semantic"){const r=Me(e);return ue(e)===t.domainId?r&&t.datasetId?r===t.datasetId:Re(e)===t.datasetName:!1}return t.kind==="physical"?Ne(e)===t.connectionId&&Oe(e)===t.tableName&&Be(e)===(t.databaseName||"")&&$e(e)===(t.schemaName||""):!1}function Pe(e,t){return e.find(r=>z(r,t))}function p(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function E(e){const t=new Set;for(const r of e){if(t.has(r))return r;t.add(r)}return null}function he({card:e,datasets:t,errors:r}){if(e.type==="text")return;const a=fe(e);if(!a){if(t.length<=1)return;r.push(p("missing_card_analytics_source","Multi-dataset dashboard cards must include analytics intent with a source so the materializer can choose the correct dataset.",e.id));return}t.some(o=>z(o,a))||r.push(p("invalid_card_analytics_source","Dashboard cards with an explicit analytics source must use one of the selected datasets.",e.id))}function q(e){return e.map(t=>t==null?void 0:t.source).filter(t=>!!t)}function L(e){return Array.isArray(e)?e.filter(t=>!!(t&&typeof t=="object")):[]}function se(e){return Array.isArray(e)?e.filter(t=>!!(t&&typeof t=="object")):[]}function Ee(e){var r,a;if(!e)return[];const t=[e.source];return e.kind==="metric"?t.push(...q([...L(e.measures),e.primaryMeasure,e.dateField,...L(e.dimensions),...se(e.filters).map(o=>o.field)])):e.kind==="records"?t.push(...q([...L(e.fields),e.dateField,(r=e.orderBy)==null?void 0:r.field,...se(e.filters).map(o=>o.field)])):e.kind==="inputOptions"?(((a=e.population)==null?void 0:a.kind)==="related_population"&&t.push(e.population.baseSource),t.push(...q([e.labelField,e.valueField,e.searchField,...e.disambiguationFields||[]]))):e.kind==="sql"&&t.push(...q(e.fields||[])),t}function me({card:e,datasets:t,errors:r}){if(e.type!=="text"){for(const a of Ee(e.analyticsIntent))if(a&&!t.some(o=>z(o,a))){r.push(p("invalid_card_query_source","Dashboard card query field references must use one of the selected datasets.",e.id));return}}}function be({card:e,errors:t}){if(e.type==="text"||!e.analyticsIntent)return;const r=w.validateSemaphorAnalyticsIntent(e.analyticsIntent);if(!r.ok)for(const a of r.errors)t.push(p(a.code,a.path?`${a.path}: ${a.message}`:a.message,e.id))}function ge({datasets:e,errors:t,requireAtLeastOne:r}){const a=pe({datasets:e,requireAtLeastOne:r});if(!a.ok){if(a.issue==="invalid_dataset_count"){t.push(p("invalid_dataset_count","Dashboard authoring requires at least one selected dataset."));return}t.push(p("invalid_multi_dataset_scope","Multi-dataset dashboard authoring is limited to semantic datasets from one domain."))}}function Ie({input:e,errors:t}){var r;(r=e.filter.sql)!=null&&r.trim()&&t.push(p("generated_filter_sql_out_of_scope",`Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`))}function ye(e){var f,g;const t=[];if(!e||typeof e!="object")return{ok:!1,errors:[p("invalid_plan","Dashboard plan must be a structured object.")],warnings:[]};const r=e,a=[...r.warnings||[]];r.version!==1&&t.push(p("invalid_version","Dashboard plan version must be 1.")),(f=r.title)!=null&&f.trim()||t.push(p("missing_title","Dashboard plan needs a title."));const o=Array.isArray(r.datasets)?r.datasets:[],n=Array.isArray(r.sheets)?r.sheets:[];ge({datasets:o,errors:t,requireAtLeastOne:!0}),n.length!==1&&t.push(p("invalid_sheet_count","MVP dashboard authoring creates exactly one dashboard sheet."));const i=n[0];i&&i.kind!=="dashboard"&&t.push(p("invalid_sheet_kind",'Generated sheet must use kind "dashboard".'));const d=(i==null?void 0:i.cards)||[];d.length>k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS&&t.push(p("too_many_cards",`Generated dashboards can contain at most ${k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS} cards.`));const s=E(d.map(l=>l.id));s&&t.push(p("duplicate_card_id",`Duplicate generated card id: ${s}.`));const u=E(d.map(l=>l.frameId));u&&t.push(p("duplicate_frame_id",`Duplicate generated frame id: ${u}.`));for(const l of d)(g=l.title)!=null&&g.trim()||t.push(p("missing_card_title","Card title is required.",l.id)),l.type==="custom"&&t.push(p("custom_visual_out_of_scope","Whole-dashboard authoring supports built-in visual types only.",l.id)),l.type!=="text"&&!l.analyticsIntent&&a.push(p("missing_analytics_intent","Non-text card has no analytics intent and may be skipped by the app layer.",l.id)),he({card:l,datasets:o,errors:t}),be({card:l,errors:t}),me({card:l,datasets:o,errors:t});const h=Array.isArray(r.filterInputs)?r.filterInputs:[],y=h.map(l=>l.id),D=E(y);D&&t.push(p("duplicate_input_id",`Duplicate dashboard input id: ${D}.`));const C=h.map(l=>l.variableName).filter(Boolean)||[],_=E(C);_&&t.push(p("duplicate_input_variable",`Duplicate dashboard input variable name: ${_}.`));for(const l of h)Ie({input:l,errors:t});const c=Array.isArray(r.calculatedFields)?r.calculatedFields:[];for(const l of c)l.scope==="domain"&&l.reuseOnly!==!0&&t.push(p("domain_calculated_field_create_out_of_scope",`Creating domain calculated field "${l.name}" is outside MVP.`));return{ok:t.length===0,errors:t,warnings:a}}function _e(e){var i;const t=[];if(!e||typeof e!="object")return{ok:!1,errors:[p("invalid_change_plan","Dashboard change plan must be a structured object.")],warnings:[]};const r=e,a=[...r.warnings||[]];r.version!==1&&t.push(p("invalid_version","Dashboard change plan version must be 1.")),(i=r.dashboardId)!=null&&i.trim()||t.push(p("missing_dashboard_id","Dashboard change plan needs a dashboard id."));const o=Array.isArray(r.datasets)?r.datasets:[],n=Array.isArray(r.operations)?r.operations:[];ge({datasets:o,errors:t,requireAtLeastOne:!1});for(const d of n){if(d.kind==="unsupported"){a.push(p("unsupported_operation",d.reason||d.requestedAction));continue}d.kind==="addCard"&&d.card.type==="custom"&&t.push(p("custom_visual_out_of_scope","Whole-dashboard authoring supports built-in visual types only.",d.card.id)),d.kind==="addCard"&&(he({card:d.card,datasets:o,errors:t}),be({card:d.card,errors:t}),me({card:d.card,datasets:o,errors:t})),d.kind==="addFilterInput"&&Ie({input:d.input,errors:t}),d.kind==="addCalculatedField"&&d.field.scope==="domain"&&d.field.reuseOnly!==!0&&t.push(p("domain_calculated_field_create_out_of_scope",`Creating domain calculated field "${d.field.name}" is outside MVP.`))}return{ok:t.length===0,errors:t,warnings:a}}const qe={lg:48,md:36,sm:24,xs:12,xxs:6};function ze(e,t){let r=0,a=0,o=0;return e.map(n=>{const i=Math.min(n.w,t);r>0&&r+i>t&&(r=0,a+=o,o=0);const d={i:n.frameId,x:r,y:a,w:i,h:n.h,minW:Math.min(n.minW,t),minH:n.minH,static:!1};return r+=i,o=Math.max(o,n.h),d})}function He(e){const t=[...e].sort((s,u)=>s.priority-u.priority),r=t.filter(s=>s.role==="kpi"),a=t.filter(s=>s.role==="chart"),o=t.filter(s=>s.role==="table"),n=t.filter(s=>s.role==="text"),i=n.slice(0,1),d=n.slice(i.length);return{kpis:r,introText:i,charts:a,tables:o,supportingText:d}}function Ve(e,t,r){return t==="xxs"||t==="xs"?r:t==="sm"?Math.min(12,r):t==="md"?e<=1||e===2?18:12:e<=1||e===2?24:e===3?16:12}function Le(e,t,r,a){return r==="xxs"||r==="xs"||r==="sm"||r==="md"||t===1||t%2===1&&e===0?a:a/2}function je(e){const{item:t,band:r,index:a,bandCount:o,breakpoint:n,columns:i}=e;return r==="kpi"?{...t,band:r,w:Ve(o,n,i),h:15,minW:Math.min(6,i),minH:12}:r==="table"?{...t,band:r,w:i,h:n==="xxs"||n==="xs"?34:38,minW:Math.min(12,i),minH:18}:r==="introText"?{...t,band:r,w:i,h:n==="xxs"||n==="xs"?12:10,minW:Math.min(12,i),minH:8}:r==="supportingText"?{...t,band:r,w:n==="lg"?i/2:i,h:n==="xxs"||n==="xs"?12:10,minW:Math.min(12,i),minH:8}:{...t,band:r,w:Le(a,o,n,i),h:n==="xxs"||n==="xs"?28:30,minW:Math.min(12,i),minH:16}}function N(e,t,r,a){return e.map((o,n)=>je({item:o,band:t,index:n,bandCount:e.length,breakpoint:r,columns:a}))}function H(e){const t=He(e);return Object.fromEntries(k.DASHBOARD_AUTHORING_BREAKPOINTS.map(r=>{const a=qe[r],o=[...N(t.introText,"introText",r,a),...N(t.kpis,"kpi",r,a),...N(t.charts,"chart",r,a),...N(t.tables,"table",r,a),...N(t.supportingText,"supportingText",r,a)];return[r,ze(o,a)]}))}function Ge(e){const t=w.normalizeAnalyticsCatalogDataType(e);return t==="datetime"?"date":t==="unknown"?"string":t}function Ke(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Ue(e){return Ke(e)&&typeof e.filterId=="string"&&typeof e.operation=="string"&&Array.isArray(e.values)}function We(e){return e.filter(t=>typeof t=="string"||typeof t=="number")}function Xe(e){return e.filter(t=>t instanceof Date||typeof t=="string")}function Q(e,t){if(t===void 0)return;const r=Ge(e.dataType),a=e.operation||"in";if(Ue(t))return{...t,filterId:e.id,name:t.name||e.column,valueType:r,dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext};if(a==="is null"||a==="is not null")return{filterId:e.id,name:e.column,operation:a,valueType:r,values:[],dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext};const o=Array.isArray(t)?t:[t],n=r==="date"?Xe(o):We(o);if(n.length!==0&&!((a==="between"||a==="not between")&&n.length<2))return{filterId:e.id,name:e.column,operation:a,valueType:r,values:n,dataType:e.dataType,fieldMeta:e.fieldMeta,semanticContext:e.semanticContext}}function Se(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function Ye(e,t,r){const a=(t||[]).filter(o=>o.scope==="card"&&o.targetCardId===r).map(o=>o.field).filter(Boolean);return a.length===0?e:{...e,calculatedFields:[...e.calculatedFields||[],...a]}}function W(e,t){return Array.from(new Set((e||[]).map(r=>t.get(r)).filter(r=>!!r)))}function Qe(e,t){if((e==null?void 0:e.kind)!=="cards")return e;const r=W(e.cardIds,t);return r.length>0?{...e,cardIds:r}:null}function Je(e,t){return!e.applyToCardIds&&!e.excludeCardIds?e:{...e,...e.applyToCardIds?{applyToCardIds:W(e.applyToCardIds,t)}:{},...e.excludeCardIds?{excludeCardIds:W(e.excludeCardIds,t)}:{}}}function Ze(e,t){const r={},a=[];return{inputs:(e.filterInputs||[]).flatMap((n,i)=>{const d=Qe(n.scope,t);if(d===null)return a.push(Se("filter_input_scope_empty",`Filter input "${n.label}" was skipped because all scoped cards were skipped during query validation.`)),[];const s=Q(n.filter,n.defaultValue);return s&&(r.shared??(r.shared={}),r.shared[n.id]={status:"set",value:{kind:"filter",filterValue:s}}),[{id:n.id,kind:"filter",label:n.label,variableName:n.variableName,scope:d||{kind:"allSheets",sheetKinds:["dashboard"]},runtimeScope:"shared",presentation:{placement:"toolbar",order:i},exports:["label","value","start","end","range"],filter:Je(n.filter,t)}]}),warnings:a,defaultInputValues:r.shared&&Object.keys(r.shared).length>0?r:void 0}}function et(e){var C,_;const t=ye(e.plan);if(!t.ok)throw new Error(t.errors.map(c=>c.message).join(`
|
|
2
2
|
`)||"Dashboard plan is invalid.");const r=e.plan.sheets[0],a=[...t.warnings],o=[],n=new Map(e.cardArtifacts.map(c=>[c.planCardId,c])),i=new Map(e.cardArtifacts.map(c=>[c.planCardId,c.card.id])),d=[];for(const c of r.cards){const f=n.get(c.id);if(!f){const l=Se("missing_card_artifact",`Card "${c.title}" was skipped because no generated artifact was supplied.`,c.id);o.push(l);continue}a.push(...f.warnings||[]);const g=Ye(f.card,e.plan.calculatedFields,c.id);d.push({id:c.frameId,cards:[g],activeCardId:g.id})}if(d.length===0)throw new Error("Dashboard plan did not produce any persistable cards.");const{inputs:s,defaultInputValues:u,warnings:h}=Ze(e.plan,i);a.push(...h);const y=H(r.cards.filter(c=>d.some(f=>f.id===c.frameId)).map(c=>({frameId:c.frameId,priority:c.priority,role:c.role})));return{dashboard:{id:e.dashboardId,title:e.plan.title,description:e.plan.description||"",sheets:[{id:r.id,kind:"dashboard",title:r.title,description:r.description,frames:d,layouts:y,calculatedFields:(C=e.plan.calculatedFields)==null?void 0:C.filter(c=>c.scope==="sheet"&&c.field).map(c=>c.field)}],calculatedFields:(_=e.plan.calculatedFields)==null?void 0:_.filter(c=>c.scope==="dashboard"&&c.field).map(c=>c.field),inputs:s,...u?{defaultInputValues:u}:{}},warnings:a,skippedOperations:o}}function R(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function tt(e){return JSON.parse(JSON.stringify(e))}function rt(e){var t;return(t=e.sheets)==null?void 0:t.find(r=>(r.kind||"dashboard")==="dashboard")}function j(e,t){var r;for(const a of e.sheets||[])for(const o of a.frames||[]){const n=(r=o.cards)==null?void 0:r.find(i=>i.id===t);if(n)return{sheet:a,frame:o,card:n}}return null}function Ae(e){var r,a;const t=(a=(r=e.cards)==null?void 0:r[0])==null?void 0:a.type;return t==="kpi"?"kpi":t==="table"||t==="detailTable"||t==="pivotTable"?"table":t==="text"?"text":"chart"}function at(e){var t;return new Map((((t=e.layouts)==null?void 0:t.lg)||[]).map((r,a)=>[r.i,a]))}function De(e,t=new Map){const r=at(e),a=Math.max(r.size,t.size),o=(e.frames||[]).map((n,i)=>({frameId:n.id,role:Ae(n),priority:t.get(n.id)??r.get(n.id)??a+i}));e.layouts=H(o)}function nt(e){return Object.values(e.layouts||{}).some(t=>t.length>0)}function it(e,t){if(!nt(e)){De(e);return}const r=H([{frameId:t.id,role:Ae(t),priority:0}]);e.layouts??(e.layouts={});for(const[a,o]of Object.entries(r)){const n=e.layouts[a]||[];if(n.some(s=>s.i===t.id))continue;const i=o[0];if(!i)continue;const d=n.reduce((s,u)=>Math.max(s,u.y+u.h),0);e.layouts[a]=[...n,{...i,y:d}]}}function ot(e,t){var a;const r=Q(t.filter,t.defaultValue);r&&(e.defaultInputValues??(e.defaultInputValues={}),(a=e.defaultInputValues).shared??(a.shared={}),e.defaultInputValues.shared[t.id]={status:"set",value:{kind:"filter",filterValue:r}})}function st(e){var d;const t=_e(e.changePlan);if(!t.ok)throw new Error(t.errors.map(s=>s.message).join(`
|
|
3
3
|
`)||"Dashboard change plan is invalid.");const r=tt(e.dashboard),a=[...t.warnings],o=[],n=new Map(e.cardArtifacts.map(s=>[s.planCardId,s])),i=rt(r);if(!i)throw new Error("Dashboard has no editable dashboard sheet.");i.frames??(i.frames=[]);for(const s of e.changePlan.operations)switch(s.kind){case"addCard":{if((i.frames||[]).reduce((D,C)=>{var _;return D+(((_=C.cards)==null?void 0:_.length)||0)},0)>=k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS){o.push(R("generated_card_limit_reached",`AI refinement is capped at ${k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS} cards.`,s.card.id));break}const h=n.get(s.card.id);if(!h){o.push(R("missing_card_artifact",`Card "${s.card.title}" was skipped because no generated artifact was supplied.`,s.card.id));break}const y={id:s.card.frameId,cards:[h.card],activeCardId:h.card.id};i.frames.push(y),it(i,y);break}case"addFilterInput":{r.inputs??(r.inputs=[]);const u={id:s.input.id,kind:"filter",label:s.input.label,variableName:s.input.variableName,scope:s.input.scope||{kind:"allSheets",sheetKinds:["dashboard"]},runtimeScope:"shared",presentation:{placement:"toolbar",order:r.inputs.length},exports:["label","value","start","end","range"],filter:s.input.filter};r.inputs.push(u),ot(r,s.input);break}case"addCalculatedField":{if(s.field.scope==="dashboard"&&s.field.field)r.calculatedFields??(r.calculatedFields=[]),r.calculatedFields.push(s.field.field);else if(s.field.scope==="sheet"&&s.field.field)i.calculatedFields??(i.calculatedFields=[]),i.calculatedFields.push(s.field.field);else if(s.field.scope==="card"&&s.field.field){const u=s.field.targetCardId?j(r,s.field.targetCardId):null;u?((d=u.card).calculatedFields??(d.calculatedFields=[]),u.card.calculatedFields.push(s.field.field)):o.push(R("missing_calculated_field_target",`Calculated field "${s.field.name}" needs a valid target card.`))}break}case"renameCard":{const u=j(r,s.cardId);if(!u){o.push(R("card_not_found",`Card "${s.cardId}" could not be renamed because it was not found.`,s.cardId));break}u.card.title=s.title,s.description!==void 0&&(u.card.description=s.description);break}case"reorderCards":{const u=new Map;for(let h=0;h<s.cardIds.length;h+=1){const y=s.cardIds[h],D=j(r,y);D&&u.set(D.frame.id,h)}De(i,u);break}case"reuseCalculatedField":a.push(R("reused_calculated_field",`Calculated field "${s.fieldId}" is reused by reference.`));break;case"unsupported":o.push(R("unsupported_operation",s.reason||s.requestedAction));break}return{dashboard:r,warnings:a,skippedOperations:o}}function I(e,t,r){return r?{code:e,message:t,cardId:r}:{code:e,message:t}}function O(e,t){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function Ce(e,t){if(!t.has(e))return t.add(e),e;let r=2,a=`${e}-${r}`;for(;t.has(a);)r+=1,a=`${e}-${r}`;return t.add(a),a}function $(e){return!!(e&&typeof e=="object")}function ve(e){return Array.isArray(e.inputs)?e.inputs.filter(t=>$(t)&&typeof t.id=="string"):[]}function J(e){return Array.isArray(e.sections)?e.sections.filter(t=>$(t)):[]}function Z(e){return Array.isArray(e.views)?e.views.filter(t=>$(t)):[]}function F(e){if(!Array.isArray(e))return[];const t=[];for(const r of e){const a=v(r);a&&t.push(a)}return t}function dt(e){var a,o,n;if(!e)return[];const t=[];if(M(e.source)&&t.push(e.source),e.kind==="metric"){t.push(...F(e.measures));const i=v(e.dateField);i&&t.push(i),t.push(...F(e.dimensions)),t.push(...F((a=e.filters)==null?void 0:a.map(d=>d.field)))}else if(e.kind==="records"){const i=v(e.dateField);i&&t.push(i),t.push(...F(e.fields)),t.push(...F((o=e.filters)==null?void 0:o.map(d=>d.field)))}else e.kind==="inputOptions"?(((n=e.population)==null?void 0:n.kind)==="related_population"&&M(e.population.baseSource)&&t.push(e.population.baseSource),t.push(...F([e.labelField,e.valueField,e.searchField,...e.disambiguationFields||[]].filter(i=>!!i)))):e.kind==="sql"&&t.push(...F(e.fields));const r="inputs"in e&&Array.isArray(e.inputs)?e.inputs:[];for(const i of r){const d=v(i.field);d&&t.push(d)}return t}function ct(e){const t=[];for(const r of ve(e)){const a=v(r.field);a&&t.push(a)}for(const r of J(e))for(const a of Z(r))t.push(...dt(a.analytics));return t}function lt(e){var r;const t=[];for(const a of J(e))for(const o of Z(a))M((r=o.analytics)==null?void 0:r.source)&&t.push(o.analytics.source);return t}function ut(e,t){const r=B(e).filter(M);if(r.length===0)return t.push(I("missing_materializable_dataset","No semantic or physical source could be converted into the current dashboard authoring dataset reference.")),[];const a=r.every(n=>n.kind==="semantic"),o=Array.from(new Set(r.filter(n=>n.kind==="semantic").map(n=>n.domainId)));return r.length>1&&(!a||o.length!==1)?(t.push(I("multiple_datasets_out_of_scope","The dashboard authoring compiler supports multiple datasets only within one semantic domain; using the first source and deferring the rest.")),[r[0]]):r}function ft(e,t){const r=J(e),a=ve(e),o=B(ct(e)),n=B(lt(e));return{sections:r,inputs:a,sources:o,primarySources:n,defaultSource:n.length===1?n[0]:void 0,datasets:ut(o,t)}}function pt(e){return e&&w.validateSemaphorAnalyticsIntent(e).ok?e:void 0}function ht(e){var t;switch((t=e.presentation)==null?void 0:t.kind){case"kpi":return"kpi";case"lineChart":return"line";case"barChart":return"bar";case"areaChart":return"area";case"table":return"table";case"text":return"text";default:return null}}function mt(e){var t,r,a;return((t=e.presentation)==null?void 0:t.kind)==="kpi"?"kpi":((r=e.presentation)==null?void 0:r.kind)==="table"?"table":((a=e.presentation)==null?void 0:a.kind)==="text"?"text":"chart"}function bt(e){const t=Te.normalizeSemaphorInputOperator(e);switch(t){case"not_in":return"not in";case"not_between":return"not between";case"contains":return"like";case"not_contains":return"not like";default:return t||"in"}}function gt(e){return $(e.field)?e.field.dataType==="datetime"?"date":e.field.dataType||"string":"string"}function It(e){if(!(!e||e.kind!=="physical"))return[e.databaseName,e.schemaName,e.tableName].filter(Boolean).join(".")}function yt(e,t,r,a,o,n){if(e.kind!=="filter")return n.push(I("control_inputs_deferred",`Control input "${e.label}" is represented in the protocol but not yet materialized by the dashboard authoring adapter.`)),null;if(!$(e.field)||typeof e.field.name!="string")return n.push(I("filter_requires_field",`Filter "${e.label||e.id}" needs a field before the dashboard compiler can materialize it.`)),null;const i=le({explicitSource:void 0,field:e.field,defaultSource:t,fallbackSources:r}),d=(i==null?void 0:i.kind)==="semantic"||(i==null?void 0:i.kind)==="physical"?i.connectionId:void 0;if(!d)return n.push(I("filter_requires_connection_id",`Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`)),null;const h={id:`filter-${Ce(O(e.id,e.field.name),o)}`,variableName:e.id,connectionId:d,title:e.label,column:e.field.name,dataType:gt(e),qualifiedTableName:It(i),sql:"",operation:bt(e.operator),type:e.multi===!1?"single":"multiple",location:"dashboard",displayMode:"toolbar",fieldMeta:(i==null?void 0:i.kind)==="semantic"?{name:e.field.name,qualifiedFieldName:e.field.name,dataType:e.field.dataType,role:e.field.role==="measure"?"metric":"groupby"}:void 0,semanticContext:(i==null?void 0:i.kind)==="semantic"?{semanticDomainId:i.domainId,connectionId:i.connectionId}:void 0};return{id:e.id,label:e.label,variableName:e.id,scope:a,filter:h,defaultValue:Q(h,e.defaultValue)}}function G(e){const t=[],r=[];for(const a of e.viewIds){const o=e.viewIdToCardId.get(a);o?t.push(o):r.push(a)}return r.length>0&&e.warnings.push(I("input_scope_view_not_found",`Filter "${e.inputLabel}" referenced unknown view ids: ${r.join(", ")}.`)),Array.from(new Set(t))}function _t(e){var a,o;if(!e.protocolScope){const n=Array.from(new Set(e.boundCardIds));return n.length>0&&n.length<e.allCardIds.length?{kind:"cards",cardIds:n}:void 0}if(e.protocolScope.level==="dashboard"){if(!((a=e.protocolScope.excludeViewIds)!=null&&a.length))return;const n=new Set(G({inputLabel:e.inputLabel,viewIds:e.protocolScope.excludeViewIds,viewIdToCardId:e.viewIdToCardId,warnings:e.warnings}));return{kind:"cards",cardIds:e.allCardIds.filter(i=>!n.has(i))}}if(e.protocolScope.level==="view"){const n=G({inputLabel:e.inputLabel,viewIds:e.protocolScope.viewIds,viewIdToCardId:e.viewIdToCardId,warnings:e.warnings});return n.length===0?(e.warnings.push(I("input_scope_has_no_materialized_cards",`Filter "${e.inputLabel}" was deferred because its view scope does not match any materialized cards.`)),null):{kind:"cards",cardIds:n}}const t=e.sectionIdToCardIds.get(e.protocolScope.sectionId)||[];if(t.length===0)return e.warnings.push(I("input_scope_section_not_found",`Filter "${e.inputLabel}" was deferred because section "${e.protocolScope.sectionId}" does not match any materialized cards.`)),null;if(!((o=e.protocolScope.excludeViewIds)!=null&&o.length))return{kind:"cards",cardIds:t};const r=new Set(G({inputLabel:e.inputLabel,viewIds:e.protocolScope.excludeViewIds,viewIdToCardId:e.viewIdToCardId,warnings:e.warnings}));return{kind:"cards",cardIds:t.filter(n=>!r.has(n))}}function St(e){var C,_,c;const t=[],r=w.validateSemaphorDashboardIntent(e);for(const f of r.warnings)t.push(I(f.code,f.message));for(const f of r.errors)t.push(I(f.code,f.message));const a=ft(e,t),o=[],n=new Map,i=new Map,d=new Map,s=new Set,u=new Set;let h=0;for(const[f,g]of a.sections.entries()){const l=typeof g.title=="string"?g.title:`Section ${f+1}`,ee=g.id||O(l,`section-${f+1}`);i.set(ee,[]);for(const[te,b]of Z(g).entries()){const re=ht(b),V=O(b.id||`${l}-${b.title||`View ${te+1}`}`,`card-${f+1}-${te+1}`);if(!re){t.push(I("unsupported_presentation",`Dashboard presentation "${((C=b.presentation)==null?void 0:C.kind)||"unknown"}" is not supported by the dashboard authoring adapter.`,`card-${V}`));continue}if(((_=b.analytics)==null?void 0:_.kind)==="sql"){t.push(I("sql_intent_deferred","SQL analytics intent is valid protocol, but the current dashboard authoring adapter only materializes semantic and physical config-card intents.",`card-${V}`));continue}const ae=Ce(V,s),P=`card-${ae}`;b.id&&n.set(b.id,P),(c=i.get(ee))==null||c.push(P);const we=b.analytics&&"inputs"in b.analytics?b.analytics.inputs:void 0;for(const ne of we||[]){const ie=d.get(ne.inputId)||[];ie.push(P),d.set(ne.inputId,ie)}o.push({id:P,frameId:`frame-${ae}`,title:b.title,description:b.description,type:re,role:mt(b),priority:h,section:l,analyticsIntent:pt(b.analytics),text:b.text}),h+=1}}const y=a.inputs.map(f=>{const g=_t({protocolScope:f.scope,inputLabel:f.label,allCardIds:o.map(l=>l.id),boundCardIds:d.get(f.id)||[],viewIdToCardId:n,sectionIdToCardIds:i,warnings:t});return g===null?null:yt(f,a.defaultSource,a.sources,g,u,t)}).filter(f=>!!f);return{plan:{version:1,id:`plan-${O(e.title,"dashboard")}`,title:e.title,description:e.description,datasets:a.datasets,sheets:[{id:`sheet-${O(e.title,"dashboard")}`,title:e.title,description:e.description,kind:"dashboard",cards:o}],filterInputs:y.length?y:void 0,warnings:t.length?t:void 0,unresolvedRequests:r.ok?void 0:r.errors.map(f=>f.message)},warnings:t}}exports.DASHBOARD_AUTHORING_BREAKPOINTS=k.DASHBOARD_AUTHORING_BREAKPOINTS;exports.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS=k.DASHBOARD_AUTHORING_MAX_GENERATED_CARDS;exports.AUTOMATIC_TEMPORAL_BUCKET_FORMAT=A.AUTOMATIC_TEMPORAL_BUCKET_FORMAT;exports.SEMAPHOR_CARTESIAN_CHART_TYPES=A.SEMAPHOR_CARTESIAN_CHART_TYPES;exports.getTemporalBucketAuthoringOptions=A.getTemporalBucketAuthoringOptions;exports.getTemporalBucketAuthoringSelection=A.getTemporalBucketAuthoringSelection;exports.isSemaphorCartesianChartType=A.isSemaphorCartesianChartType;exports.previewTemporalBucketAuthoringFormat=A.previewTemporalBucketAuthoringFormat;exports.reconcileTemporalBucketAuthoringFormat=A.reconcileTemporalBucketAuthoringFormat;exports.resolveTemporalBucketAuthoringFormat=A.resolveTemporalBucketAuthoringFormat;exports.resolveTemporalResultOwner=A.resolveTemporalResultOwner;exports.supportsCanonicalDashboardTemporalResult=A.supportsCanonicalDashboardTemporalResult;exports.transformComparisonDocument=A.transformComparisonDocument;exports.resolveCanonicalDetailResultRawKey=X.resolveCanonicalDetailResultRawKey;exports.resolveCanonicalResultOutputKey=X.resolveCanonicalResultOutputKey;exports.resolveCanonicalResultRawKey=X.resolveCanonicalResultRawKey;exports.DashboardFilterMappingContractError=m.DashboardFilterMappingContractError;exports.buildDashboardCardSourceIndex=m.buildDashboardCardSourceIndex;exports.createDashboardFilterBindingId=m.createDashboardFilterBindingId;exports.dashboardCardFilterSourceInventoryContains=m.dashboardCardFilterSourceInventoryContains;exports.dashboardFilterTargetMatchesLogicalValue=m.dashboardFilterTargetMatchesLogicalValue;exports.dashboardFilterValueTypeForDataType=m.dashboardFilterValueTypeForDataType;exports.findDashboardCardExecutableSource=m.findDashboardCardExecutableSource;exports.findDashboardCardPinnedCatalogSource=m.findDashboardCardPinnedCatalogSource;exports.findDashboardSqlPinnedCatalogSource=m.findDashboardSqlPinnedCatalogSource;exports.getDashboardFilterSubscriptionHint=m.getDashboardFilterSubscriptionHint;exports.hasDashboardFilterSubscription=m.hasDashboardFilterSubscription;exports.isDashboardFilterOperationCompatible=m.isDashboardFilterOperationCompatible;exports.normalizeDashboardInputs=m.normalizeDashboardInputs;exports.requireNormalizedDashboardInputs=m.requireNormalizedDashboardInputs;exports.resolveDashboardFilterAutomaticTarget=m.resolveDashboardFilterAutomaticTarget;exports.resolveDashboardFilterInheritedTarget=m.resolveDashboardFilterInheritedTarget;exports.resolveDashboardSqlFilterTarget=m.resolveDashboardSqlFilterTarget;exports.applyDashboardChangePlan=st;exports.compileDashboardFromPlan=et;exports.compileResponsiveDashboardLayouts=H;exports.dashboardAuthoringDatasetMatchesSource=z;exports.dashboardAuthoringFieldsReferToSameTarget=xe;exports.dashboardAuthoringSourceFromField=v;exports.dashboardAuthoringSourceKey=Fe;exports.dashboardAuthoringSourcesReferToSameDataset=Y;exports.dashboardPlanFromSemaphorDashboardIntent=St;exports.findDashboardAuthoringDatasetForSource=Pe;exports.getDashboardAuthoringCardSource=fe;exports.isMaterializableDashboardAuthoringSource=M;exports.isSemaphorSourceRef=de;exports.mergeDashboardAuthoringSources=B;exports.preferDashboardAuthoringSourceMetadata=ce;exports.preferredDashboardAuthoringSource=ke;exports.resolveDashboardAuthoringSource=le;exports.validateDashboardAuthoringDatasetScope=pe;exports.validateDashboardChangePlan=_e;exports.validateDashboardPlan=ye;
|
|
@@ -5,7 +5,7 @@ import "../chunks/analyze-result-contract-B3agc2XU.js";
|
|
|
5
5
|
import "../value-format-preferences/index.js";
|
|
6
6
|
import { n as Se } from "../chunks/operators-C8TxpM4C.js";
|
|
7
7
|
import { a as Ht, b as Wt, r as Kt } from "../chunks/canonical-result-keys-CEQefvdO.js";
|
|
8
|
-
import { D as Ut, b as Qt, l as Yt, d as Jt, e as Xt, m as Zt, f as er, a as tr, c as rr, i as nr, h as ar, o as ir, n as or, k as sr, r as dr, g as cr, j as lr } from "../chunks/dashboard-filter-value-compatibility-
|
|
8
|
+
import { D as Ut, b as Qt, l as Yt, d as Jt, e as Xt, m as Zt, f as er, a as tr, c as rr, i as nr, h as ar, o as ir, n as or, k as sr, r as dr, g as cr, j as lr } from "../chunks/dashboard-filter-value-compatibility-ilbH2A31.js";
|
|
9
9
|
function _(e) {
|
|
10
10
|
return e && typeof e == "object" ? e : null;
|
|
11
11
|
}
|
|
@@ -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-xdqe-Zvd.cjs"),w=require("../chunks/switch-CQN9Hzho.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 { aM as ea, aN as ta, aO as Ir, aP as jr, aQ as zr, aR as ra, aS as Wr, aT as Hr, aU as Jr, aV as Vr, aW as _r, aX as Ur, aY as Gr, aZ as na, a_ as aa, a$ as oa, b0 as Ht, b1 as on, R as Kr, b2 as sa, b3 as Vt, b4 as sn, b5 as ia, b6 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 { aM as ea, aN as ta, aO as Ir, aP as jr, aQ as zr, aR as ra, aS as Wr, aT as Hr, aU as Jr, aV as Vr, aW as _r, aX as Ur, aY as Gr, aZ as na, a_ as aa, a$ as oa, b0 as Ht, b1 as on, R as Kr, b2 as sa, b3 as Vt, b4 as sn, b5 as ia, b6 as la } from "../chunks/index-0fmECZL2.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-n2yUNY8i.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,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../chunks/format-types-PSZZ7hG8.cjs"),n=require("../chunks/pivot-result-lifecycle-DJgO2P0H.cjs"),s=require("../chunks/pivot-header-presentation-
|
|
2
|
-
`){return
|
|
3
|
-
`}exports.isNumericCanonicalFormat=g.isNumericCanonicalFormat;exports.MissingResolvedRawTemporalFormatError=n.MissingResolvedRawTemporalFormatError;exports.PivotResultLifecycleError=n.PivotResultLifecycleError;exports.PresentationExecutionSnapshotError=n.PresentationExecutionSnapshotError;exports.RawTemporalFormatContractError=n.RawTemporalFormatContractError;exports.assertRawTemporalChunkClassificationAgreement=n.assertRawTemporalChunkClassificationAgreement;exports.classifyDeclaredSqlTemporalColumn=n.classifyDeclaredSqlTemporalColumn;exports.createCanonicalPivotResultTransport=n.createCanonicalPivotResultTransport;exports.createPresentationExecutionSnapshot=n.createPresentationExecutionSnapshot;exports.createRawTemporalChunkClassificationEvidence=n.createRawTemporalChunkClassificationEvidence;exports.deriveMetricInstanceAliasExpectations=n.deriveMetricInstanceAliasExpectations;exports.derivePivotResultContractExpectations=n.derivePivotResultContractExpectations;exports.findResolvedNumericFormat=n.findResolvedNumericFormat;exports.findResolvedRawTemporalFormat=n.findResolvedRawTemporalFormat;exports.findResolvedTemporalBucketFormat=n.findResolvedTemporalBucketFormat;exports.formatCurrency=n.formatCurrency;exports.formatNumber=n.formatNumber;exports.formatNumberCustom=n.formatNumberCustom;exports.formatNumberWithColumnSettings=n.formatNumberWithColumnSettings;exports.formatNumericCanonical=n.formatNumericCanonical;exports.formatPercent=n.formatPercent;exports.formatRawTemporalValue=n.formatRawTemporalValue;exports.formatScientific=n.formatScientific;exports.parseCanonicalPivotResultTransport=n.parseCanonicalPivotResultTransport;exports.parseNumericCanonicalFormat=n.parseNumericCanonicalFormat;exports.parsePresentationExecutionSnapshot=n.parsePresentationExecutionSnapshot;exports.parsePresentationScope=n.parsePresentationScope;exports.parseRawTemporalChunkClassificationEvidence=n.parseRawTemporalChunkClassificationEvidence;exports.parseResolvedNumericCanonicalFormat=n.parseResolvedNumericCanonicalFormat;exports.parseResolvedPresentationEntries=n.parseResolvedPresentationEntries;exports.parseResolvedRawTemporalFormat=n.parseResolvedRawTemporalFormat;exports.prepareRawTemporalFormatter=n.prepareRawTemporalFormatter;exports.resolveCurrencyFractionDigits=n.resolveCurrencyFractionDigits;exports.resolveNumericPresentation=n.resolveNumericPresentation;exports.resolveRawTemporalFormat=n.resolveRawTemporalFormat;exports.validateCardExportNumericPresentationSnapshot=n.validateCardExportNumericPresentationSnapshot;exports.validateCardExportPresentationSnapshot=n.validateCardExportPresentationSnapshot;exports.AGGREGATE_TOTAL_MEMBER_MARKER=s.AGGREGATE_TOTAL_MEMBER_MARKER;exports.PivotHeaderPresentationError=s.PivotHeaderPresentationError;exports.arrayToCSV=s.arrayToCSV;exports.arrayToCSVRow=s.arrayToCSVRow;exports.escapeCSVValue=s.escapeCSVValue;exports.formatAggregateGrandTotalLabel=s.formatAggregateGrandTotalLabel;exports.formatAggregateGroupCell=s.formatAggregateGroupCell;exports.formatAggregateGroupRow=s.formatAggregateGroupRow;exports.formatAggregateSubtotalLabel=s.formatAggregateSubtotalLabel;exports.formatDate=s.formatDate;exports.formatDuration=s.formatDuration;exports.formatMetricComparison=s.formatMetricComparison;exports.formatRelativeTime=s.formatRelativeTime;exports.getTimezoneAbbreviation=s.getTimezoneAbbreviation;exports.getTimezoneName=s.getTimezoneName;exports.isAggregateTotalMemberMarker=s.isAggregateTotalMemberMarker;exports.objectsToCSV=s.objectsToCSV;exports.parseWithSourceTimezone=s.parseWithSourceTimezone;exports.presentAggregateGroupRow=s.presentAggregateGroupRow;exports.presentPivotHeader=s.presentPivotHeader;exports.resolveAggregateTablePresentationContext=s.resolveAggregateTablePresentationContext;exports.resolveTimezone=s.resolveTimezone;exports.SEMAPHOR_GENERATED_COUNT_METRIC_ID=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../chunks/format-types-PSZZ7hG8.cjs"),n=require("../chunks/pivot-result-lifecycle-DJgO2P0H.cjs"),s=require("../chunks/pivot-header-presentation-Cr6pU5JL.cjs"),T=require("../chunks/validators-DcshgK7w.cjs"),c=require("../chunks/temporal-bucket-9Wz9Ds6H.cjs"),p=require("../chunks/pivot-result-identity-DRUlTWUq.cjs"),v=require("../chunks/raw-temporal-contract-D8YuxTAg.cjs");function V(r,e,t,o){const a=r instanceof Date?r.toISOString():String(r),i=(o==null?void 0:o.browserTimezone)||t,l=(o==null?void 0:o.isSqlCard)??!1;if(e!=null&&e.useRelativeTime)return s.formatRelativeTime(a,(e==null?void 0:e.sourceTimezone)||"auto");const m=e!=null&&e.useCustomFormat&&(e!=null&&e.customFormat)?e.customFormat:(e==null?void 0:e.format)||"MM/dd/yyyy";return s.formatDate(a,m,e!=null&&e.timezone&&(e==null?void 0:e.timezone)!=="auto"?e.timezone:l?i:t,(e==null?void 0:e.sourceTimezone)||"auto")}function S(r,e,t){if(r==null)return"";if(!t.useFormattedValues||!e)return String(r);switch(e.type){case"number":return typeof r=="number"?n.formatNumberWithColumnSettings(r,e.numberFormat,t.locale):String(r);case"date":return V(r,e.dateFormat,t.timezone,{browserTimezone:t.browserTimezone,isSqlCard:t.isSqlCard});case"progress":return typeof r=="number"?`${r}%`:String(r);case"badge":case"link":case"text":case"none":default:return String(r)}}function y(r,e){return e.visibleColumns.map(t=>{const o=r[t],a=e.columnSettings[t];return S(o,a,{useFormattedValues:e.useFormattedValues,timezone:e.timezone,locale:e.locale})})}function h(r,e){const t=[];e.includeHeaders&&t.push(s.arrayToCSVRow(e.visibleColumns,e.delimiter));for(const o of r){const a=y(o,e);t.push(a.map(i=>s.escapeCSVValue(i,e.delimiter)).join(e.delimiter))}return t}function _(r,e,t=`
|
|
2
|
+
`){return h(r,e).join(t)}function d(r,e,t){for(const o of r){if(o.level<t){e[o.level].push(o.name);for(let a=1;a<o.colspan;a++)e[o.level].push("")}o.children?d(o.children,e,t):o.columnKey&&e[t].push(o.name)}}function A(r){const e=r.pivotByColumns.length,t=r.groupByColumns.length,o=Array.from({length:e+1},()=>[]);for(let a=0;a<e;a++)o[a].push(...Array(t).fill(""));if(o[e].push(...r.groupByColumns.map(a=>a.label||a.name)),d(r.columnHeadersTree,o,e),r.showRowTotals){for(let a=0;a<e;a++)o[a].push("");o[e].push("Total")}return o}function M(r,e,t){if(r==null)return"";if(!t.useFormattedValues)return String(r);const o=t.columnSettings[e];return typeof r=="number"&&(o==null?void 0:o.type)==="number"?n.formatNumberWithColumnSettings(r,o.numberFormat,t.locale):typeof r=="number"?r.toLocaleString(t.locale):String(r)}function P(r,e,t){const o=[];r.fieldValues.forEach((i,l)=>{r.isSubtotal&&l===0?o.push(`${i} Total`):r.isSubtotal?o.push(""):o.push(String(i??""))});let a=0;return e.columnHeaders.forEach(i=>{var u;const l=(u=r.cells[i])==null?void 0:u.value,m=M(l,i,t);o.push(m),e.showRowTotals&&typeof l=="number"&&(a+=l)}),e.showRowTotals&&o.push(a.toLocaleString(t.locale)),o}function k(r,e,t){const o=[];if(t.includeHeaders){const a=A(e);for(const i of a)o.push(s.arrayToCSVRow(i,t.delimiter))}for(const a of r){const i=P(a,e,t);o.push(i.map(l=>s.escapeCSVValue(l,t.delimiter)).join(t.delimiter))}return o}function R(r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;const e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function w(r,e,t){const o=new Set(e),a=Object.keys(r).find(i=>!o.has(i));if(a)throw new Error(`${t} contains unknown property "${a}"`)}function N(r,e="tableTotalsRequest"){if(!R(r))throw new Error(`${e} must be an object`);if(w(r,["source","columns"],e),r.source!=="documentFlatTable")throw new Error(`${e}.source must be documentFlatTable`);if(!Array.isArray(r.columns)||r.columns.length===0)throw new Error(`${e}.columns must be a non-empty array`);let t=0;const o=r.columns.map((l,m)=>{const u=`${e}.columns.${m}`;if(!R(l))throw new Error(`${u} must be an object`);w(l,["fieldId","role","behavior","metricAlias","label"],u);const C=typeof l.fieldId=="string"?l.fieldId.trim():"";if(!C)throw new Error(`${u}.fieldId must be a non-empty string`);if(l.role!=="detail"&&l.role!=="groupby"&&l.role!=="metric")throw new Error(`${u}.role is invalid`);const f=l.role;if(l.behavior!=="sum"&&l.behavior!=="avg"&&l.behavior!=="count"&&l.behavior!=="label")throw new Error(`${u}.behavior is invalid`);const E=l.behavior,b=typeof l.metricAlias=="string"?l.metricAlias.trim():void 0;if(l.metricAlias!==void 0&&!b)throw new Error(`${u}.metricAlias must be a non-empty string`);if(b&&f!=="metric")throw new Error(`${u}.metricAlias requires metric role`);if(E==="label"){if(t+=1,f==="metric")throw new Error(`${u}.behavior label requires a non-metric role`)}else if(f!=="metric")throw new Error(`${u}.${E} requires metric role`);if(l.label!==void 0&&typeof l.label!="string")throw new Error(`${u}.label must be a string`);return{fieldId:C,role:f,behavior:E,...b?{metricAlias:b}:{},...l.label!==void 0?{label:l.label}:{}}}),a=new Map,i=new Set;for(const l of o){if(l.metricAlias){if(i.has(l.metricAlias))throw new Error(`${e}.columns duplicates metricAlias "${l.metricAlias}"`);i.add(l.metricAlias)}const m=a.get(l.fieldId)??[];m.push(l),a.set(l.fieldId,m)}for(const[l,m]of a)if(m.length!==1){for(const u of m)if(u.role!=="metric"||!u.metricAlias)throw new Error(`${e}.columns duplicates fieldId "${l}" without distinct metricAlias values`)}if(t>1)throw new Error(`${e}.columns may contain at most one label`);return{source:"documentFlatTable",columns:o}}function B(r,e="tableTotalsByColumnId"){if(!R(r))throw new Error(`${e} must be an object`);const t={};for(const[o,a]of Object.entries(r)){if(!o.trim())throw new Error(`${e} contains an empty column id`);if(a!==null&&typeof a!="string"&&(typeof a!="number"||!Number.isFinite(a)))throw new Error(`${e}.${o} must be a string, finite number, or null`);t[o]=a}if(Object.keys(t).length===0)throw new Error(`${e} must not be empty`);return t}function O(r){if(typeof r=="number")return Number.isFinite(r)?r:null;if(!r.trim())return null;const e=Number(r);return Number.isFinite(e)?e:null}function $(r){const e=r.visibleColumns.map(t=>{const a=Object.prototype.hasOwnProperty.call(r.totalsByColumnId,t)?r.totalsByColumnId[t]:t===r.labelColumnKey?"Total":null;if(a===null)return"";if(!r.useFormattedValues)return String(a);const i=n.findResolvedNumericFormat({snapshot:r.snapshot,scope:r.scope,target:{kind:"column",columnKey:t}}),l=i?O(a):null;return i&&l!==null?n.formatNumericCanonical(l,i):String(a)});return`${s.arrayToCSVRow(e,r.delimiter)}
|
|
3
|
+
`}exports.isNumericCanonicalFormat=g.isNumericCanonicalFormat;exports.MissingResolvedRawTemporalFormatError=n.MissingResolvedRawTemporalFormatError;exports.PivotResultLifecycleError=n.PivotResultLifecycleError;exports.PresentationExecutionSnapshotError=n.PresentationExecutionSnapshotError;exports.RawTemporalFormatContractError=n.RawTemporalFormatContractError;exports.assertRawTemporalChunkClassificationAgreement=n.assertRawTemporalChunkClassificationAgreement;exports.classifyDeclaredSqlTemporalColumn=n.classifyDeclaredSqlTemporalColumn;exports.createCanonicalPivotResultTransport=n.createCanonicalPivotResultTransport;exports.createPresentationExecutionSnapshot=n.createPresentationExecutionSnapshot;exports.createRawTemporalChunkClassificationEvidence=n.createRawTemporalChunkClassificationEvidence;exports.deriveMetricInstanceAliasExpectations=n.deriveMetricInstanceAliasExpectations;exports.derivePivotResultContractExpectations=n.derivePivotResultContractExpectations;exports.findResolvedNumericFormat=n.findResolvedNumericFormat;exports.findResolvedRawTemporalFormat=n.findResolvedRawTemporalFormat;exports.findResolvedTemporalBucketFormat=n.findResolvedTemporalBucketFormat;exports.formatCurrency=n.formatCurrency;exports.formatNumber=n.formatNumber;exports.formatNumberCustom=n.formatNumberCustom;exports.formatNumberWithColumnSettings=n.formatNumberWithColumnSettings;exports.formatNumericCanonical=n.formatNumericCanonical;exports.formatPercent=n.formatPercent;exports.formatRawTemporalValue=n.formatRawTemporalValue;exports.formatScientific=n.formatScientific;exports.parseCanonicalPivotResultTransport=n.parseCanonicalPivotResultTransport;exports.parseNumericCanonicalFormat=n.parseNumericCanonicalFormat;exports.parsePresentationExecutionSnapshot=n.parsePresentationExecutionSnapshot;exports.parsePresentationScope=n.parsePresentationScope;exports.parseRawTemporalChunkClassificationEvidence=n.parseRawTemporalChunkClassificationEvidence;exports.parseResolvedNumericCanonicalFormat=n.parseResolvedNumericCanonicalFormat;exports.parseResolvedPresentationEntries=n.parseResolvedPresentationEntries;exports.parseResolvedRawTemporalFormat=n.parseResolvedRawTemporalFormat;exports.prepareRawTemporalFormatter=n.prepareRawTemporalFormatter;exports.resolveCurrencyFractionDigits=n.resolveCurrencyFractionDigits;exports.resolveNumericPresentation=n.resolveNumericPresentation;exports.resolveRawTemporalFormat=n.resolveRawTemporalFormat;exports.validateCardExportNumericPresentationSnapshot=n.validateCardExportNumericPresentationSnapshot;exports.validateCardExportPresentationSnapshot=n.validateCardExportPresentationSnapshot;exports.AGGREGATE_TOTAL_MEMBER_MARKER=s.AGGREGATE_TOTAL_MEMBER_MARKER;exports.DIRECT_CSV_EXPORT_MAX_ROWS=s.DIRECT_CSV_EXPORT_MAX_ROWS;exports.FULL_DATASET_CSV_EXPORT_MAX_ROWS=s.FULL_DATASET_CSV_EXPORT_MAX_ROWS;exports.PivotHeaderPresentationError=s.PivotHeaderPresentationError;exports.arrayToCSV=s.arrayToCSV;exports.arrayToCSVRow=s.arrayToCSVRow;exports.escapeCSVValue=s.escapeCSVValue;exports.formatAggregateGrandTotalLabel=s.formatAggregateGrandTotalLabel;exports.formatAggregateGroupCell=s.formatAggregateGroupCell;exports.formatAggregateGroupRow=s.formatAggregateGroupRow;exports.formatAggregateSubtotalLabel=s.formatAggregateSubtotalLabel;exports.formatDate=s.formatDate;exports.formatDuration=s.formatDuration;exports.formatMetricComparison=s.formatMetricComparison;exports.formatRelativeTime=s.formatRelativeTime;exports.getTimezoneAbbreviation=s.getTimezoneAbbreviation;exports.getTimezoneName=s.getTimezoneName;exports.isAggregateTotalMemberMarker=s.isAggregateTotalMemberMarker;exports.objectsToCSV=s.objectsToCSV;exports.parseWithSourceTimezone=s.parseWithSourceTimezone;exports.presentAggregateGroupRow=s.presentAggregateGroupRow;exports.presentPivotHeader=s.presentPivotHeader;exports.requiresChunkedCsvExport=s.requiresChunkedCsvExport;exports.resolveAggregateTablePresentationContext=s.resolveAggregateTablePresentationContext;exports.resolveTimezone=s.resolveTimezone;exports.SEMAPHOR_GENERATED_COUNT_METRIC_ID=T.SEMAPHOR_GENERATED_COUNT_METRIC_ID;exports.TEMPORAL_BUCKET_PATTERN_TOKENS=T.TEMPORAL_BUCKET_PATTERN_TOKENS;exports.isTemporalBucketPreset=T.isTemporalBucketPreset;exports.resolveApplicableTemporalBucketFormat=T.resolveApplicableTemporalBucketFormat;exports.tokenizeTemporalBucketPattern=T.tokenizeTemporalBucketPattern;exports.validateTemporalBucketFormatApplicability=T.validateTemporalBucketFormatApplicability;exports.DEFAULT_RESOLVED_TEMPORAL_STYLE_SET=c.DEFAULT_RESOLVED_TEMPORAL_STYLE_SET;exports.TemporalBucketContractError=c.TemporalBucketContractError;exports.formatTemporalBucket=c.formatTemporalBucket;exports.parseResolvedTemporalBucketFormat=c.parseResolvedTemporalBucketFormat;exports.parseTemporalBucketValue=c.parseTemporalBucketValue;exports.resolveMetricResultAlias=c.resolveMetricResultAlias;exports.resolveTemporalBucketPresentation=c.resolveTemporalBucketPresentation;exports.PivotResultIdentityError=p.PivotResultIdentityError;exports.isPivotEmptyTupleAllowed=p.isPivotEmptyTupleAllowed;exports.isPivotSubtotalPrefix=p.isPivotSubtotalPrefix;exports.requirePivotHeaderMembers=p.requirePivotHeaderMembers;exports.requirePivotResultColumnIdentities=p.requirePivotResultColumnIdentities;exports.resolveQueryColumnKeyMapEntry=p.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=p.resolveUniqueQueryColumnKeyMapEntry;exports.parseRawTemporalValueMetadata=v.parseRawTemporalValueMetadata;exports.validateRawTemporalResultColumn=v.validateRawTemporalResultColumn;exports.buildFlatTableExportTotalsFooter=$;exports.formatCellValue=S;exports.formatPivotDataRow=P;exports.formatPivotTableForCSV=k;exports.formatRowForExport=y;exports.formatTableForCSV=h;exports.generatePivotHeaders=A;exports.generateTableCSV=_;exports.parseFlatTableExportTotalsByColumnId=B;exports.parseFlatTableExportTotalsRequest=N;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as z } from "../chunks/format-types-CFHQoIuk.js";
|
|
2
2
|
import { f as w, a as y, b as R } from "../chunks/pivot-result-lifecycle-O_roVguV.js";
|
|
3
|
-
import { M as L, E as G, P as H, R as K, z as U, w as W, G as
|
|
4
|
-
import { f as C, a as
|
|
5
|
-
import { A as
|
|
6
|
-
import { q as
|
|
7
|
-
import { i as
|
|
8
|
-
import { P as
|
|
9
|
-
import { p as
|
|
3
|
+
import { M as L, E as G, P as H, R as K, z as U, w as W, G as X, n as F, x as Q, C as Y, D as J, o as Z, q as ee, d as re, c as oe, h as te, e as se, B as ne, g as le, F as ae, p as ie, m as ue, k as me, y as ce, i as fe, l as pe, t as be, A as Te, r as we, j as he, u as Ee, v as ye, s as Re } from "../chunks/pivot-result-lifecycle-O_roVguV.js";
|
|
4
|
+
import { f as C, a as S, b as p, e as h } from "../chunks/pivot-header-presentation-7XrwJYDm.js";
|
|
5
|
+
import { A as Se, D as Ae, F as ve, P as Pe, i as de, n as ge, s as $e, t as Ve, m as ke, c as Me, d as xe, g as _e, h as Be, k as Ie, o as Ne, p as Oe, q as qe, u as je, j as ze, l as De, r as Le } from "../chunks/pivot-header-presentation-7XrwJYDm.js";
|
|
6
|
+
import { q as He, ap as Ke, an as Ue, aq as We, ao as Xe, am as Fe } from "../chunks/validators-B5t1s8oh.js";
|
|
7
|
+
import { i as Ye, T as Je, h as Ze, j as er, p as rr, a as or, k as tr } from "../chunks/temporal-bucket-CUKJktCl.js";
|
|
8
|
+
import { P as nr, b as lr, i as ar, c as ir, d as ur, r as mr, a as cr } from "../chunks/pivot-result-identity-5v4hRVbc.js";
|
|
9
|
+
import { p as pr, v as br } from "../chunks/raw-temporal-contract-BEMf3avg.js";
|
|
10
10
|
function A(r, e, t, o) {
|
|
11
11
|
const s = r instanceof Date ? r.toISOString() : String(r), l = (o == null ? void 0 : o.browserTimezone) || t, n = (o == null ? void 0 : o.isSqlCard) ?? !1;
|
|
12
12
|
if (e != null && e.useRelativeTime)
|
|
@@ -15,14 +15,14 @@ function A(r, e, t, o) {
|
|
|
15
15
|
(e == null ? void 0 : e.sourceTimezone) || "auto"
|
|
16
16
|
);
|
|
17
17
|
const i = e != null && e.useCustomFormat && (e != null && e.customFormat) ? e.customFormat : (e == null ? void 0 : e.format) || "MM/dd/yyyy";
|
|
18
|
-
return
|
|
18
|
+
return S(
|
|
19
19
|
s,
|
|
20
20
|
i,
|
|
21
21
|
e != null && e.timezone && (e == null ? void 0 : e.timezone) !== "auto" ? e.timezone : n ? l : t,
|
|
22
22
|
(e == null ? void 0 : e.sourceTimezone) || "auto"
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function v(r, e, t) {
|
|
26
26
|
if (r == null)
|
|
27
27
|
return "";
|
|
28
28
|
if (!t.useFormattedValues || !e)
|
|
@@ -57,7 +57,7 @@ function S(r, e, t) {
|
|
|
57
57
|
function P(r, e) {
|
|
58
58
|
return e.visibleColumns.map((t) => {
|
|
59
59
|
const o = r[t], s = e.columnSettings[t];
|
|
60
|
-
return
|
|
60
|
+
return v(o, s, {
|
|
61
61
|
useFormattedValues: e.useFormattedValues,
|
|
62
62
|
timezone: e.timezone,
|
|
63
63
|
locale: e.locale
|
|
@@ -75,7 +75,7 @@ function d(r, e) {
|
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function _(r, e, t = `
|
|
79
79
|
`) {
|
|
80
80
|
return d(r, e).join(t);
|
|
81
81
|
}
|
|
@@ -129,7 +129,7 @@ function V(r, e, t) {
|
|
|
129
129
|
o.push(i), e.showRowTotals && typeof n == "number" && (s += n);
|
|
130
130
|
}), e.showRowTotals && o.push(s.toLocaleString(t.locale)), o;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function B(r, e, t) {
|
|
133
133
|
const o = [];
|
|
134
134
|
if (t.includeHeaders) {
|
|
135
135
|
const s = g(e);
|
|
@@ -159,7 +159,7 @@ function T(r, e, t) {
|
|
|
159
159
|
if (s)
|
|
160
160
|
throw new Error(`${t} contains unknown property "${s}"`);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function I(r, e = "tableTotalsRequest") {
|
|
163
163
|
if (!f(r))
|
|
164
164
|
throw new Error(`${e} must be an object`);
|
|
165
165
|
if (T(r, ["source", "columns"], e), r.source !== "documentFlatTable")
|
|
@@ -227,7 +227,7 @@ function N(r, e = "tableTotalsRequest") {
|
|
|
227
227
|
throw new Error(`${e}.columns may contain at most one label`);
|
|
228
228
|
return { source: "documentFlatTable", columns: o };
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function N(r, e = "tableTotalsByColumnId") {
|
|
231
231
|
if (!f(r))
|
|
232
232
|
throw new Error(`${e} must be an object`);
|
|
233
233
|
const t = {};
|
|
@@ -250,7 +250,7 @@ function k(r) {
|
|
|
250
250
|
const e = Number(r);
|
|
251
251
|
return Number.isFinite(e) ? e : null;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function O(r) {
|
|
254
254
|
const e = r.visibleColumns.map((t) => {
|
|
255
255
|
const s = Object.prototype.hasOwnProperty.call(
|
|
256
256
|
r.totalsByColumnId,
|
|
@@ -271,95 +271,98 @@ function q(r) {
|
|
|
271
271
|
`;
|
|
272
272
|
}
|
|
273
273
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
Se as AGGREGATE_TOTAL_MEMBER_MARKER,
|
|
275
|
+
Ye as DEFAULT_RESOLVED_TEMPORAL_STYLE_SET,
|
|
276
|
+
Ae as DIRECT_CSV_EXPORT_MAX_ROWS,
|
|
277
|
+
ve as FULL_DATASET_CSV_EXPORT_MAX_ROWS,
|
|
276
278
|
L as MissingResolvedRawTemporalFormatError,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
+
Pe as PivotHeaderPresentationError,
|
|
280
|
+
nr as PivotResultIdentityError,
|
|
279
281
|
G as PivotResultLifecycleError,
|
|
280
282
|
H as PresentationExecutionSnapshotError,
|
|
281
283
|
K as RawTemporalFormatContractError,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
He as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
|
|
285
|
+
Ke as TEMPORAL_BUCKET_PATTERN_TOKENS,
|
|
286
|
+
Je as TemporalBucketContractError,
|
|
287
|
+
de as arrayToCSV,
|
|
286
288
|
p as arrayToCSVRow,
|
|
287
289
|
U as assertRawTemporalChunkClassificationAgreement,
|
|
288
|
-
|
|
290
|
+
O as buildFlatTableExportTotalsFooter,
|
|
289
291
|
W as classifyDeclaredSqlTemporalColumn,
|
|
290
|
-
|
|
292
|
+
X as createCanonicalPivotResultTransport,
|
|
291
293
|
F as createPresentationExecutionSnapshot,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
Q as createRawTemporalChunkClassificationEvidence,
|
|
295
|
+
Y as deriveMetricInstanceAliasExpectations,
|
|
296
|
+
J as derivePivotResultContractExpectations,
|
|
295
297
|
h as escapeCSVValue,
|
|
296
298
|
y as findResolvedNumericFormat,
|
|
297
299
|
Z as findResolvedRawTemporalFormat,
|
|
298
300
|
ee as findResolvedTemporalBucketFormat,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
ge as formatAggregateGrandTotalLabel,
|
|
302
|
+
$e as formatAggregateGroupCell,
|
|
303
|
+
Ve as formatAggregateGroupRow,
|
|
304
|
+
ke as formatAggregateSubtotalLabel,
|
|
305
|
+
v as formatCellValue,
|
|
304
306
|
re as formatCurrency,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
S as formatDate,
|
|
308
|
+
Me as formatDuration,
|
|
309
|
+
xe as formatMetricComparison,
|
|
308
310
|
oe as formatNumber,
|
|
309
311
|
te as formatNumberCustom,
|
|
310
312
|
w as formatNumberWithColumnSettings,
|
|
311
313
|
R as formatNumericCanonical,
|
|
312
314
|
se as formatPercent,
|
|
313
315
|
V as formatPivotDataRow,
|
|
314
|
-
|
|
316
|
+
B as formatPivotTableForCSV,
|
|
315
317
|
ne as formatRawTemporalValue,
|
|
316
318
|
C as formatRelativeTime,
|
|
317
319
|
P as formatRowForExport,
|
|
318
320
|
le as formatScientific,
|
|
319
321
|
d as formatTableForCSV,
|
|
320
|
-
|
|
322
|
+
Ze as formatTemporalBucket,
|
|
321
323
|
g as generatePivotHeaders,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
324
|
+
_ as generateTableCSV,
|
|
325
|
+
_e as getTimezoneAbbreviation,
|
|
326
|
+
Be as getTimezoneName,
|
|
327
|
+
Ie as isAggregateTotalMemberMarker,
|
|
328
|
+
z as isNumericCanonicalFormat,
|
|
329
|
+
lr as isPivotEmptyTupleAllowed,
|
|
330
|
+
ar as isPivotSubtotalPrefix,
|
|
331
|
+
Ue as isTemporalBucketPreset,
|
|
332
|
+
Ne as objectsToCSV,
|
|
331
333
|
ae as parseCanonicalPivotResultTransport,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
+
N as parseFlatTableExportTotalsByColumnId,
|
|
335
|
+
I as parseFlatTableExportTotalsRequest,
|
|
334
336
|
ie as parseNumericCanonicalFormat,
|
|
335
337
|
ue as parsePresentationExecutionSnapshot,
|
|
336
338
|
me as parsePresentationScope,
|
|
337
339
|
ce as parseRawTemporalChunkClassificationEvidence,
|
|
338
|
-
|
|
340
|
+
pr as parseRawTemporalValueMetadata,
|
|
339
341
|
fe as parseResolvedNumericCanonicalFormat,
|
|
340
342
|
pe as parseResolvedPresentationEntries,
|
|
341
343
|
be as parseResolvedRawTemporalFormat,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
er as parseResolvedTemporalBucketFormat,
|
|
345
|
+
rr as parseTemporalBucketValue,
|
|
346
|
+
Oe as parseWithSourceTimezone,
|
|
345
347
|
Te as prepareRawTemporalFormatter,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
ze as
|
|
351
|
-
|
|
348
|
+
qe as presentAggregateGroupRow,
|
|
349
|
+
je as presentPivotHeader,
|
|
350
|
+
ir as requirePivotHeaderMembers,
|
|
351
|
+
ur as requirePivotResultColumnIdentities,
|
|
352
|
+
ze as requiresChunkedCsvExport,
|
|
353
|
+
De as resolveAggregateTablePresentationContext,
|
|
354
|
+
We as resolveApplicableTemporalBucketFormat,
|
|
352
355
|
we as resolveCurrencyFractionDigits,
|
|
353
|
-
|
|
356
|
+
or as resolveMetricResultAlias,
|
|
354
357
|
he as resolveNumericPresentation,
|
|
355
|
-
|
|
358
|
+
mr as resolveQueryColumnKeyMapEntry,
|
|
356
359
|
Ee as resolveRawTemporalFormat,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
tr as resolveTemporalBucketPresentation,
|
|
361
|
+
Le as resolveTimezone,
|
|
362
|
+
cr as resolveUniqueQueryColumnKeyMapEntry,
|
|
363
|
+
Xe as tokenizeTemporalBucketPattern,
|
|
361
364
|
ye as validateCardExportNumericPresentationSnapshot,
|
|
362
365
|
Re as validateCardExportPresentationSnapshot,
|
|
363
|
-
|
|
364
|
-
|
|
366
|
+
br as validateRawTemporalResultColumn,
|
|
367
|
+
Fe as validateTemporalBucketFormatApplicability
|
|
365
368
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DVBYvkj0.cjs"),u=require("./chunks/common-types-C1IM7gao.cjs"),_=require("./chunks/report-preferences-dialog-DvNWNrlj.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-NAbuOQNg.cjs"),h=require("react"),P=require("./chunks/token-types-CoHsSJ4E.cjs"),l=require("./chunks/dashboard-briefing-launcher-exfJnSop.cjs"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./value-format-preferences/index.cjs");require("./chunks/validators-DcshgK7w.cjs");const R=require("./chunks/report-runtime-context-RFiWq4wK.cjs"),T=require("./chunks/pivot-result-identity-DRUlTWUq.cjs");require("./chunks/analyze-result-contract-OgPk-zGu.cjs");require("./chunks/temporal-bucket-authoring-DSpzgXHc.cjs");require("./chunks/saved-temporal-bucket-format-DNMtD77o.cjs");require("react-dom");require("./chunks/appearance-context-DhyjbQk1.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-ByFbacH7.cjs");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),w=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-BgNYdUYH.cjs");function L(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,d.get?d:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const m=L(h);function M(a){const{displayPreferences:t,cardId:o,...d}=a,n={...d,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(j,{cardId:o})})})})]})})}function j({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function I(a,t,o,d){h.useEffect(()=>{a&&!o&&t&&d(e.cloneDeep(t))},[a,o,t,d])}function q({name:a,items:t,value:o,onChange:d,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:C=!1}){const g=m.useRef(null),[y,b]=m.useState(!1),[A,S]=m.useState("100%"),x=C?[...t||[],{id:"none",name:"None"}]:t;m.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function F(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function v(f,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),i.jsx(w.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:A},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>v(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=u.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=u.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=u.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=u.EMPTY_SELECTION;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=u.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=u.PivotMarkerEnum;exports.getFieldRuntimeColumnName=u.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=u.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=u.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=u.hasSyntheticCalculatedFieldOwner;exports.isCalculatedDimension=u.isCalculatedDimension;exports.isCalculatedField=u.isCalculatedField;exports.isCalculatedMetric=u.isCalculatedMetric;exports.ReportPreferencesDialog=_.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=T.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=T.resolveUniqueQueryColumnKeyMapEntry;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=q;exports.Visual=M;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-xdqe-Zvd.cjs"),u=require("./chunks/common-types-C1IM7gao.cjs"),_=require("./chunks/report-preferences-dialog-8KYKazoG.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-CQN9Hzho.cjs"),h=require("react"),P=require("./chunks/token-types-CoHsSJ4E.cjs"),l=require("./chunks/dashboard-briefing-launcher-8vxGyexK.cjs"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./value-format-preferences/index.cjs");require("./chunks/validators-DcshgK7w.cjs");const R=require("./chunks/report-runtime-context-RFiWq4wK.cjs"),T=require("./chunks/pivot-result-identity-DRUlTWUq.cjs");require("./chunks/analyze-result-contract-OgPk-zGu.cjs");require("./chunks/temporal-bucket-authoring-DSpzgXHc.cjs");require("./chunks/saved-temporal-bucket-format-DNMtD77o.cjs");require("react-dom");require("./chunks/appearance-context-DhyjbQk1.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-ByFbacH7.cjs");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),w=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-BgNYdUYH.cjs");function L(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,d.get?d:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const m=L(h);function M(a){const{displayPreferences:t,cardId:o,...d}=a,n={...d,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(j,{cardId:o})})})})]})})}function j({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function I(a,t,o,d){h.useEffect(()=>{a&&!o&&t&&d(e.cloneDeep(t))},[a,o,t,d])}function q({name:a,items:t,value:o,onChange:d,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:C=!1}){const g=m.useRef(null),[y,b]=m.useState(!1),[A,S]=m.useState("100%"),x=C?[...t||[],{id:"none",name:"None"}]:t;m.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function F(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function v(f,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),i.jsx(w.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:A},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>v(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=u.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=u.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=u.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=u.EMPTY_SELECTION;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=u.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=u.PivotMarkerEnum;exports.getFieldRuntimeColumnName=u.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=u.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=u.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=u.hasSyntheticCalculatedFieldOwner;exports.isCalculatedDimension=u.isCalculatedDimension;exports.isCalculatedField=u.isCalculatedField;exports.isCalculatedMetric=u.isCalculatedMetric;exports.ReportPreferencesDialog=_.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=T.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=T.resolveUniqueQueryColumnKeyMapEntry;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=q;exports.Visual=M;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=I;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { E as x, F as N, S, c as _, U as P, d as w, C as F, e as y, f as R, g as L, h as M, i as I, I as U, R as k, j as O, k as V, l as q, m as z } from "./chunks/index-
|
|
2
|
-
import { al as Ea, am as ya, an as xa, ao as ba, W as Ta, H as va, D as Aa, B as Ba, A as Na, x as Sa, b as _a, av as Pa, M as wa, o as Fa, r as Ra, r as La, s as Ma, G as Ia, a as Ua, ag as ka, ai as Oa, aj as Va, ah as qa, a7 as za, aa as Wa, au as ja, _ as Qa, af as Ha, aq as Ka, a2 as Ga, ab as Ya, z as Xa, y as $a, ay as Ja, Z as Za, ac as ae, ad as ee, a6 as se, a9 as re, at as oe, as as ie, ar as te, ax as ne, aw as le, a8 as ue, Y as de, X as ce, a0 as fe, ae as pe, a4 as me, a1 as he, a3 as ge, a5 as Ce, $ as De, Q as Ee, N as ye, ap as xe, w as be, K as Te, v as ve, n as Ae, J as Be, L as Ne, p as Se, V as _e, P as Pe, O as we, T as Fe, u as Re, t as Le, q as Me, ak as Ie } from "./chunks/index-
|
|
1
|
+
import { E as x, F as N, S, c as _, U as P, d as w, C as F, e as y, f as R, g as L, h as M, i as I, I as U, R as k, j as O, k as V, l as q, m as z } from "./chunks/index-0fmECZL2.js";
|
|
2
|
+
import { al as Ea, am as ya, an as xa, ao as ba, W as Ta, H as va, D as Aa, B as Ba, A as Na, x as Sa, b as _a, av as Pa, M as wa, o as Fa, r as Ra, r as La, s as Ma, G as Ia, a as Ua, ag as ka, ai as Oa, aj as Va, ah as qa, a7 as za, aa as Wa, au as ja, _ as Qa, af as Ha, aq as Ka, a2 as Ga, ab as Ya, z as Xa, y as $a, ay as Ja, Z as Za, ac as ae, ad as ee, a6 as se, a9 as re, at as oe, as as ie, ar as te, ax as ne, aw as le, a8 as ue, Y as de, X as ce, a0 as fe, ae as pe, a4 as me, a1 as he, a3 as ge, a5 as Ce, $ as De, Q as Ee, N as ye, ap as xe, w as be, K as Te, v as ve, n as Ae, J as Be, L as Ne, p as Se, V as _e, P as Pe, O as we, T as Fe, u as Re, t as Le, q as Me, ak as Ie } from "./chunks/index-0fmECZL2.js";
|
|
3
3
|
import { a as ke, C as Oe, D as Ve, E as qe, L as ze, P as We, g as je, d as Qe, h as He, e as Ke, b as Ge, c as Ye, i as Xe } from "./chunks/common-types-g_1fKJLK.js";
|
|
4
|
-
import { R as Je } from "./chunks/report-preferences-dialog-
|
|
4
|
+
import { R as Je } from "./chunks/report-preferences-dialog-Dxt9XMpd.js";
|
|
5
5
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
6
|
-
import { u as W, P as j, a as Q, B as H, c as C, b as K, d as G } from "./chunks/switch-
|
|
7
|
-
import { A as as, n as es, e as ss, f as rs, g as os, p as is, o as ts, s as ns, t as ls, m as us, i as ds, l as cs, q as fs, k as ps, j as ms, h as hs, v as gs, r as Cs, w as Ds, y as Es, x as ys, z as xs, E as bs, D as Ts } from "./chunks/switch-
|
|
6
|
+
import { u as W, P as j, a as Q, B as H, c as C, b as K, d as G } from "./chunks/switch-n2yUNY8i.js";
|
|
7
|
+
import { A as as, n as es, e as ss, f as rs, g as os, p as is, o as ts, s as ns, t as ls, m as us, i as ds, l as cs, q as fs, k as ps, j as ms, h as hs, v as gs, r as Cs, w as Ds, y as Es, x as ys, z as xs, E as bs, D as Ts } from "./chunks/switch-n2yUNY8i.js";
|
|
8
8
|
import * as p from "react";
|
|
9
9
|
import { useMemo as Y, useEffect as b } from "react";
|
|
10
10
|
import { D as As } from "./chunks/token-types-W3EHNW-D.js";
|
|
11
|
-
import { A as Ns, g as Ss, D as _s, e as Ps, f as ws, d as Fs, b as Rs, E as Ls, N as Ms, U as Is, a as Us, V as ks, W as Os, u as Vs, c as qs } from "./chunks/dashboard-briefing-launcher-
|
|
11
|
+
import { A as Ns, g as Ss, D as _s, e as Ps, f as ws, d as Fs, b as Rs, E as Ls, N as Ms, U as Is, a as Us, V as ks, W as Os, u as Vs, c as qs } from "./chunks/dashboard-briefing-launcher-Lw4gjW_M.js";
|
|
12
12
|
import { u as Ws } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
|
|
13
13
|
import "./value-format-preferences/index.js";
|
|
14
14
|
import "./chunks/validators-B5t1s8oh.js";
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-xdqe-Zvd.cjs"),r=require("../chunks/common-types-C1IM7gao.cjs"),o=require("../chunks/report-preferences-dialog-8KYKazoG.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as a, a as o } from "../chunks/index-
|
|
1
|
+
import { b as a, a as o } from "../chunks/index-0fmECZL2.js";
|
|
2
2
|
import { C as f, E } from "../chunks/common-types-g_1fKJLK.js";
|
|
3
|
-
import { R as t } from "../chunks/report-preferences-dialog-
|
|
3
|
+
import { R as t } from "../chunks/report-preferences-dialog-Dxt9XMpd.js";
|
|
4
4
|
export {
|
|
5
5
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
a as DisplayFormatPreferencesFields,
|