react-semaphor 0.1.604 → 0.1.605

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.
Files changed (149) hide show
  1. package/dist/analytics-protocol/index.js +1 -1
  2. package/dist/appearance/index.js +1 -1
  3. package/dist/appearance-runtime/index.js +1 -1
  4. package/dist/assistant-context/index.js +1 -1
  5. package/dist/assistant-protocol/index.js +1 -1
  6. package/dist/brand-studio/index.js +3 -8
  7. package/dist/briefings/index.js +1 -1
  8. package/dist/chunks/{add-to-dashboard-DeHEBEqG.js → add-to-dashboard-CEmZUf9o.js} +1 -1
  9. package/dist/chunks/{analytics-base-schemas-BREc5WGv.js → analytics-base-schemas-DMFrDqn_.js} +1 -1
  10. package/dist/chunks/appearance-provider-CfoAVQuG.js +608 -0
  11. package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +1 -0
  12. package/dist/chunks/{assistant-chat-CjYrwVDa.js → assistant-chat-DgUaCE9k.js} +19 -24
  13. package/dist/chunks/attachment-filter-line-C_zHMhGh.js +1 -0
  14. package/dist/chunks/{bookmark-impact-C89zBLq3.js → bookmark-impact-BAtemeyK.js} +1 -1
  15. package/dist/chunks/bookmark-state-DScd31KT.js +1 -0
  16. package/dist/chunks/brand-C9APUFaP.js +1 -0
  17. package/dist/chunks/card-filter-builder-ClWrXB7P.js +11 -0
  18. package/dist/chunks/comparison-window-caption-tguyN24S.js +1 -0
  19. package/dist/chunks/{context-ALdccLHw.js → context-CntvtZwC.js} +1 -1
  20. package/dist/chunks/dashboard-ChIcbVTx.js +1 -0
  21. package/dist/chunks/dashboard-briefing-launcher-CwMlhkxV.js +42 -0
  22. package/dist/chunks/dashboard-controls-UCSAFCGA.js +42 -0
  23. package/dist/chunks/dashboard-json-B120hYDa.js +1 -0
  24. package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +1 -0
  25. package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +73 -0
  26. package/dist/chunks/filter-line-WwUV5JzN.js +1 -0
  27. package/dist/chunks/filter-reach-preview-C5M5_hf_.js +1 -0
  28. package/dist/chunks/filter-value-text-DqTHe_vu.js +1 -0
  29. package/dist/chunks/{index-BE1DfxNs.js → index-bkP6SnYu.js} +1 -1
  30. package/dist/chunks/kpi-trend-rule-B87LNzcz.js +1 -0
  31. package/dist/chunks/{layout-grid-BWtlgw0T.js → layout-grid-CFzqJ7GC.js} +1 -1
  32. package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +1 -0
  33. package/dist/chunks/matrix-member-presentation-vVAv-aqg.js +1 -0
  34. package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +1 -0
  35. package/dist/chunks/numeric-range-options-C8tr-Bls.js +1 -0
  36. package/dist/chunks/{palette-BzC-CGOc.js → palette-NvEIuXHN.js} +1 -1
  37. package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +1 -0
  38. package/dist/chunks/pivot-result-identity-B0eWVMXg.js +1 -0
  39. package/dist/chunks/{raw-temporal-value-DeyEhL0S.js → raw-temporal-value-BHQ-ldpW.js} +1 -1
  40. package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +1 -0
  41. package/dist/chunks/{report-runtime-context-BWzIHCKK.js → report-runtime-context-Cd1b5pku.js} +1 -1
  42. package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +8 -0
  43. package/dist/chunks/resolver-CjsW8Rz0.js +1 -0
  44. package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +1 -0
  45. package/dist/chunks/schema-O1Y3WTGF.js +4 -0
  46. package/dist/chunks/{selection-filter-compiler-CCoCD25M.js → selection-filter-compiler-kYsRugss.js} +1 -1
  47. package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +612 -0
  48. package/dist/chunks/set-6mOnfQeH.js +1 -0
  49. package/dist/chunks/slider-BPnHdMGq.js +4 -0
  50. package/dist/chunks/stored-dashboard-DfrxDLhR.js +1 -0
  51. package/dist/chunks/{table-export-sheet-rC5pKmXg.js → table-export-sheet-xaczzWZF.js} +1 -1
  52. package/dist/chunks/{token-types-Bj9iMy0w.js → token-types-1vzMWjI-.js} +1 -1
  53. package/dist/chunks/{validators-CqV3Yka1.js → validators-Dg2kyF4_.js} +1 -1
  54. package/dist/chunks/{variable-draft-DJrfUyhv.js → variable-draft-B4_xqr4Y.js} +1 -1
  55. package/dist/dashboard/index.js +1 -1
  56. package/dist/dashboard-authoring/index.js +1 -1
  57. package/dist/format-utils/index.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/report-runtime-context/index.js +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +1 -1
  62. package/dist/types/brand-studio/brand-studio-draft.d.ts +45 -13
  63. package/dist/types/brand-studio/brand-studio-editor.d.ts +13 -2
  64. package/dist/types/components/index.d.ts +1 -0
  65. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +17 -6
  66. package/dist/types/components/visual/data-table/types/data-table.d.ts +52 -42
  67. package/dist/types/index.js +1 -1
  68. package/dist/types/lib/appearance/aliases.d.ts +3 -0
  69. package/dist/types/lib/appearance/index.d.ts +1 -0
  70. package/dist/types/lib/appearance/table-density.d.ts +18 -0
  71. package/dist/types/lib/appearance/types.d.ts +39 -1
  72. package/dist/types/lib/dashboard-viewer/column-header-actions.d.ts +100 -0
  73. package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +0 -27
  74. package/dist/types/lib/dashboard-viewer/table-view.d.ts +26 -2
  75. package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +2 -0
  76. package/dist/types/lib/hooks/use-add-new-frame.d.ts +7 -0
  77. package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
  78. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +8 -0
  79. package/dist/types/lib/stores/dashboard-store.d.ts +14 -2
  80. package/dist/types/lib/stores/explorer-actions.d.ts +0 -4
  81. package/dist/types/lib/types/common-types.d.ts +1 -2
  82. package/dist/types/lib/utils/card-config-utils.d.ts +13 -0
  83. package/dist/types/lib/utils/field-placement.d.ts +17 -0
  84. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +21 -1
  85. package/dist/types/shared/analytics-protocol/field-provenance.d.ts +7 -4
  86. package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +48 -0
  87. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +2 -8
  88. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  89. package/dist/types/shared/dashboard-authoring/card-settings/column-display-values.d.ts +5 -0
  90. package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +52 -0
  91. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
  92. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +9 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -0
  94. package/dist/types/shared/dashboard-authoring/card-settings/table-viewer-switches.d.ts +15 -0
  95. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -0
  96. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  97. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +132 -3
  98. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +3 -1
  99. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  100. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +10 -1
  101. package/dist/types/shared/dashboard-authoring/field-aggregations.d.ts +9 -2
  102. package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +8 -7
  103. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  104. package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +2 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -2
  106. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +6 -2
  107. package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +36 -0
  108. package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +140 -0
  109. package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +15 -0
  110. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +8 -2
  111. package/dist/types/shared/format-utils/types/format-types.d.ts +1 -1
  112. package/dist/usage-events/index.js +1 -1
  113. package/package.json +2 -2
  114. package/dist/chunks/appearance-context-BqBZrijL.js +0 -1
  115. package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +0 -1
  116. package/dist/chunks/bookmark-state-69YYnRql.js +0 -1
  117. package/dist/chunks/brand-DCaZyRt6.js +0 -1
  118. package/dist/chunks/card-filter-builder-CTp6RAz1.js +0 -17
  119. package/dist/chunks/comparison-window-caption-C312mn3s.js +0 -1
  120. package/dist/chunks/dashboard-BX28ld6s.js +0 -1
  121. package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +0 -37
  122. package/dist/chunks/dashboard-controls-DhRjB7MA.js +0 -42
  123. package/dist/chunks/dashboard-json-9cHzhSjC.js +0 -1
  124. package/dist/chunks/dates-D-KP8G-z.js +0 -1
  125. package/dist/chunks/edit-DEAK0UZo.js +0 -1
  126. package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +0 -93
  127. package/dist/chunks/filter-line-CwQrqORc.js +0 -1
  128. package/dist/chunks/filter-reach-preview-gixPFlZj.js +0 -1
  129. package/dist/chunks/filter-value-text-B3tXakhd.js +0 -1
  130. package/dist/chunks/index-B-VF1ogs.js +0 -1
  131. package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +0 -1
  132. package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +0 -1
  133. package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +0 -1
  134. package/dist/chunks/metric-comparison-DEZYXROZ.js +0 -1
  135. package/dist/chunks/paintbrush-BjS3SbrH.js +0 -6
  136. package/dist/chunks/pickers-DuBrUht0.js +0 -1
  137. package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +0 -1
  138. package/dist/chunks/pivot-result-identity-DTNCB--h.js +0 -1
  139. package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +0 -1
  140. package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +0 -8
  141. package/dist/chunks/resolver-AN9ChBfZ.js +0 -1
  142. package/dist/chunks/save-DdFUZcbi.js +0 -6
  143. package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +0 -1
  144. package/dist/chunks/schema-MC0cQSAb.js +0 -4
  145. package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +0 -999
  146. package/dist/chunks/set-DuJfGkbY.js +0 -1
  147. package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +0 -6
  148. package/dist/chunks/stored-dashboard-Ctcpkllg.js +0 -1
  149. package/dist/chunks/style-sheet-parts-BRGt9O05.js +0 -178
@@ -0,0 +1 @@
1
+ var E=Object.defineProperty;var A=(e,t,r)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>A(e,typeof t!="symbol"?t+"":t,r);import{l as D}from"./export-file-format-B-wQNHIn.js";import{r as k}from"./rendered-file-BbvwaU6z.js";import{r as S,n as B,o as _,p as P,q as R,s as q,t as M,u as j,v as O,w as z,x as L,y as V,z as U}from"./resolve-dashboard-input-context-BDY7KwRe.js";import{z as a}from"zod";import{U as b,a6 as K}from"./validators-Dg2kyF4_.js";import{aG as $,aI as N,aj as G}from"./matrix-operation-contract-CWvcEsQ0.js";import"./analytics-base-schemas-DMFrDqn_.js";import{aI as H,a2 as J,at as I}from"./pivot-result-contract-expectations-BNWhS8mv.js";import{D as Y,F as Q}from"./bookmark-state-DScd31KT.js";import"../value-format-preferences/index.js";import"./schema-O1Y3WTGF.js";import"./index-DViPGDFj.js";import"./context-CntvtZwC.js";const X=/* @__PURE__ */new Set(["table","detailTable"]),Z=/* @__PURE__ */new Set(["bar","horizontalBar","line","area","stackedArea","combo","pie","doughnut","radar","polarArea","bubble","scatter","stackedBar","stackedLine","table","matrixTable","detailTable","kpi","pyramid","tornado","range","funnel","bullet","heatmap","treemap","custom"]);function we(e){var i,n,d;const t=Z.has(e.type)&&(e.type!=="custom"||!!((i=e.customCardPreferences)!=null&&i.url));let r=!1;try{r=!!S(e);}catch{return{formats:[],defaultFormat:null};}return e.type==="text"||!t||!r&&B(e)?{formats:[],defaultFormat:null}:{formats:re({cardType:e.type,allowDownload:(n=e.preferences)==null?void 0:n.allowDownload}).filter(l=>l!=="xlsx"||e.type!=="matrixTable"||r),defaultFormat:ae({cardType:e.type,allowDownload:(d=e.preferences)==null?void 0:d.allowDownload})};}function C(e){return e==="table"||e==="detailTable";}function Ie(e){let t=null;if(e.type==="matrixTable")try{t=S(e)??null;}catch{t=null;}return{cardType:e.type,matrixConfig:t};}function W(e,t){const{matrix:r,...o}=e??{},i={...o,cardType:t.cardType};return t.cardType!=="matrixTable"?i:r?{...i,matrix:r}:t.matrixConfig?{...i,matrix:{config:structuredClone(t.matrixConfig),content:"current"}}:i;}function ve(e,t){if(e.type!=="card"||!t)return e;const r=W(e.settings,t);return e.format==="xlsx"&&!r.matrix&&!C(r.cardType)?e:{...e,settings:r};}function ee(e){var r,o;if(e.type!=="card")return{kind:"rendered",format:e.format==="png"?"png":"pdf"};const t=!!((r=e.settings)!=null&&r.matrix);switch(e.format){case"png":return{kind:"rendered",format:"png"};case"pdf":return t?{kind:"matrix_pdf"}:{kind:"rendered",format:"pdf"};case"csv":case"xlsx":return t||C((o=e.settings)==null?void 0:o.cardType)?{kind:"export_job",format:e.format}:{kind:"card_query",format:"csv"};}}function Se(e){return ee(e).kind==="export_job";}function te(e){const{label:t,extension:r,contentType:o}=e==="pdf"||e==="png"?k(e):D(e);return{label:t,extension:r,contentType:o};}function re(e){return e.allowDownload===!1?["pdf","png"]:e.cardType==="matrixTable"||C(e.cardType)?["pdf","png","csv","xlsx"]:["pdf","png","csv"];}function Fe(e){return te(e).label;}function ae(e){return X.has(e.cardType)&&e.allowDownload!==!1?"csv":"pdf";}function Ee(e){const{config:t}=e,r=H({spec:t.spec,presentation:t.presentation,defaults:t.defaultView,session:e.purpose==="manual"?e.session:void 0});return b.parse({spec:r.spec,presentation:r.presentation,...(e.content==="flat"?{mode:"flat",format:e.format==="xlsx"?"xlsx":"csv"}:{mode:"layout",format:e.format,expansion:e.content==="all"?{kind:"all"}:{kind:"current",rows:r.view.rows,columns:r.view.columns}})});}const oe=a.object({connection_id:a.string().min(1),cardType:a.literal("matrixTable"),resultOwner:a.literal("config"),sql:a.literal("").optional(),python:a.literal("").optional(),tableStructure:a.never().optional(),cardDataSource:a.object({connectionId:a.string().min(1),connectionType:a.string().min(1),mode:a.enum(["database","semanticDomain"]),selectedEntities:a.array(a.unknown()),semanticDomainId:a.string().optional()}).passthrough(),active_filters:a.array(a.unknown()).default([])}).passthrough(),Ae=oe.extend({dashboardId:a.string().min(1),cardId:a.string().min(1),formatOptions:a.object({matrix:b,acquisition:a.literal("continuation").optional(),presentationExecutionSnapshot:a.unknown()}).passthrough().superRefine((e,t)=>{e.matrix.format!=="pdf"!=(e.acquisition==="continuation")&&t.addIssue({code:a.ZodIssueCode.custom,path:["acquisition"],message:"CSV and Excel require continuation acquisition; PDF must not specify acquisition."});})});function De(e){return{...e.controls,type:"card",dashboardId:e.dashboardId,cardId:e.cardId,title:e.title,cardType:"matrixTable",resultOwner:"config",sql:"",python:"",connection_id:e.dataSource.connectionId,cardDataSource:{...e.dataSource,mode:e.matrix.spec.source.kind==="semantic"?"semanticDomain":"database",semanticDomainId:e.matrix.spec.source.kind==="semantic"?e.matrix.spec.source.domainId:void 0},active_filters:e.activeFilters,formatOptions:{...(e.matrix.format!=="pdf"?{acquisition:"continuation",...(e.csvEncoding?{csvEncoding:e.csvEncoding}:{})}:{}),matrix:e.matrix,delimiter:e.delimiter,includeHeaders:e.includeHeaders,timezone:e.reportContext.calendar.tz,presentationExecutionSnapshot:J({reportContext:e.reportContext,resolvedFormats:[]})}};}const x=a.number().int().nonnegative(),ke=a.discriminatedUnion("status",[a.object({status:a.literal("ok"),request:b,layout:$,rows:a.array(N).readonly(),usage:a.object({rows:x,cells:x,bytes:x}).strict()}).strict(),a.object({status:a.literal("failed"),failure:a.object({code:a.enum(G),limit:a.enum(["rows","bytes"]).optional(),message:a.string().min(1),retryable:a.boolean()}).strict()}).strict()]);function v(e){return!e||typeof e!="object"?!1:Array.isArray(e.cards);}function ne(e){if(!e)return null;if(typeof e=="string")try{const t=JSON.parse(e);return v(t)?t:null;}catch{return null;}return v(e)?e:null;}function F(e){var t;return(t=e==null?void 0:e.cards)!=null&&t.length?e.activeCardId&&e.cards.find(r=>r.id===e.activeCardId)||e.cards[0]:null;}function Be(e){var r;const t=(e==null?void 0:e.frameObject)??((r=e==null?void 0:e.visual)==null?void 0:r.frameObject);return F(ne(t));}class h extends Error{constructor(r){const o=r.cardId?`card "${r.cardId}"`:r.sheetId?`sheet "${r.sheetId}"`:`dashboard "${r.dashboardId}"`;super(`Unable to resolve ${o} while capturing report presentation. Refresh the authoring page and select the attachment again.`);y(this,"code","temporal_snapshot_target_not_found");y(this,"selection");this.name="TemporalSnapshotSelectionError",this.selection=r;}}function se(e,t){var i;const r=[],o=/* @__PURE__ */new Map();for(const n of t){if(n.dashboardId!==e.id)throw new h(n);const d=(e.sheets||[]).filter(c=>!n.sheetId||n.sheetId===c.id);if(n.sheetId&&d.length===0)throw new h(n);let l=!n.cardId;for(const c of d){const g=(((i=c.document)==null?void 0:i.sections)||[]).flatMap(s=>Q(s)),f=(c.frames||[]).flatMap(s=>ie(s,n.cardId));f.length>0&&(l=!0);const p=[...f,...(c.cards||[]).filter(s=>!n.cardId||n.cardId===s.id),...g.filter(s=>!n.cardId||n.cardId===s.id)];for(const s of p){l=!0;const m=o.get(n.attachmentIndex)??/* @__PURE__ */new Set();m.has(s.id)||(m.add(s.id),o.set(n.attachmentIndex,m),r.push({card:s,...(n.attachmentIndex!==void 0?{attachmentIndex:n.attachmentIndex}:{})}));}}if(!l)throw new h(n);}return r;}function ie(e,t){var d;const r=t?(d=e.cards)==null?void 0:d.find(l=>l.id===t):F(e);if(!r)return[];const o=z(e,r),i=(e.cards||[]).filter(l=>{var c;return typeof((c=l.customCardPreferences)==null?void 0:c.slotIndex)=="number";}).length>1,n=o!=null&&(L(o)==="multiple"||i);return!o||!n?[r]:V(U({frame:e,configCard:o,isMultiInputVisual:!0})).filter(l=>l!==null);}function _e(e){return se(e.dashboard,e.selections).flatMap(({card:t,attachmentIndex:r})=>{var f,p;const o=((f=e.resolveCardConfig)==null?void 0:f.call(e,t))??t.config,i=_({card:t,cardConfig:o}),n={dashboardId:e.dashboard.id,cardId:t.id,...(r!==void 0?{attachmentIndex:r}:{})},d=i?i.fields.map(s=>({scope:n,target:{kind:"field",fieldId:s.id,role:s.role},format:P(s,{dateStyle:e.valueFormatPreferences.dateStyle,dateTime:{...e.valueFormatPreferences.dateTime}},e.valueFormatPreferences.locale)})):[],l=[],c=R(t,o),g=q(t.python||"");if(t.type==="detailTable"&&c==="config"){const s=(o==null?void 0:o.detailColumns)||[],m=Y({groupByColumns:o==null?void 0:o.groupByColumns,metricColumns:o==null?void 0:o.metricColumns,pivotByColumns:o==null?void 0:o.pivotByColumns,detailColumns:s});for(const u of s){const T=K(u.dataType);if(T!=="date"&&T!=="datetime")continue;const w=m.get(u);if(!w)throw new h(n);l.push({scope:n,target:{kind:"column",columnKey:w},format:I({format:M(u),preferences:e.valueFormatPreferences,calendar:e.calendar})});}}else if(c==="freeform"&&(p=t.sql)!=null&&p.trim()&&!g.trim())for(const[s,m]of Object.entries(j(t))){if(m.type!=="date")continue;const u=O(m.dateFormat);u&&l.push({scope:n,target:{kind:"column",columnKey:s},format:I({format:u,preferences:e.valueFormatPreferences,calendar:e.calendar})});}return[...d,...l];});}export{oe as a,De as b,Ee as c,te as d,Fe as e,Se as f,ee as g,ve as h,C as i,W as j,we as k,re as l,Ae as m,ae as n,_e as o,F as p,ne as q,Ie as r,Be as s,ke as t};