react-semaphor 0.1.246 → 0.1.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-controls-Df35Ggku.js → dashboard-controls-D8wqZxCi.js} +1 -1
- package/dist/chunks/{dashboard-controls-CM3zRWAB.js → dashboard-controls-qYUMEzBr.js} +5 -5
- package/dist/chunks/{dashboard-json-B8oZ6KB5.js → dashboard-json-B-bQL1ZF.js} +1 -1
- package/dist/chunks/{dashboard-json-Cgd8yP2L.js → dashboard-json-DujK2HDj.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-pftsHC1x.js → dashboard-summary-settings-dialog-B9155s2W.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BHsvhkQ1.js → dashboard-summary-settings-dialog-C83sgPRW.js} +1 -1
- package/dist/chunks/date-formatter-CqXdM6JO.js +1 -0
- package/dist/chunks/{date-formatter-BeFtqSQ2.js → date-formatter-vkCj9Ct-.js} +207 -203
- package/dist/chunks/edit-dashboard-visual-BQYI84VR.js +193 -0
- package/dist/chunks/{edit-dashboard-visual-Bw34s1x6.js → edit-dashboard-visual-D4O6wY24.js} +6886 -6593
- package/dist/chunks/{editor-action-buttons-DXsjsv4l.js → editor-action-buttons-DhhZOsQV.js} +1 -1
- package/dist/chunks/{editor-action-buttons-B2ezYVT4.js → editor-action-buttons-vCojlAQ-.js} +2 -2
- package/dist/chunks/{index-C9qmu37e.js → index-CB2vXsPg.js} +28973 -28149
- package/dist/chunks/index-iF4085Zd.js +1109 -0
- package/dist/chunks/{notification-bell-Bws3aQQp.js → notification-bell-C2K_DGKF.js} +4 -4
- package/dist/chunks/{notification-bell-DttaqoMO.js → notification-bell-WlmbKJeN.js} +1 -1
- package/dist/chunks/{resource-management-panel-BMNgcD-1.js → resource-management-panel-CbxtZtfG.js} +1 -1
- package/dist/chunks/{resource-management-panel-KeJHHJcg.js → resource-management-panel-DbiWt5FX.js} +2 -2
- package/dist/chunks/{use-visual-utils-BkDR14Dn.js → use-visual-utils-BKWme54p.js} +1 -1
- package/dist/chunks/{use-visual-utils-Buzoaljj.js → use-visual-utils-BzlMPpHV.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +13 -1
- package/dist/types/format-utils.d.ts +3 -3
- package/dist/types/main.d.ts +13 -1
- package/dist/types/shared.d.ts +13 -1
- package/dist/types/surfboard.d.ts +13 -1
- package/dist/types/types.d.ts +13 -1
- package/package.json +4 -3
- package/dist/chunks/date-formatter-CZ8p6ngp.js +0 -1
- package/dist/chunks/edit-dashboard-visual-DrolVPud.js +0 -188
- package/dist/chunks/index-B38ZMz4j.js +0 -1109
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Z, { useState as D, useRef as M, useCallback as U, useEffect as L, useContext as ee } from "react";
|
|
2
|
-
import { bK as te, b as O, aw as I, bH as B, bD as q, bE as $, ax as W, bC as ae, e as se, f as re, g as ne, h as oe, i as ie, L as _, cu as le, cA as ce, v as de, B as T, w as j, U as P, J as ue, u as F, K as me, N as Q, cB as he, cC as H, x as R, a9 as pe, c as k, c0 as fe, c1 as ge, a3 as ve, c3 as be, c4 as V, s as xe, c8 as we, b$ as ye, M as Ce, cD as Ne, cE as Ae, cF as De, ch as Ee, ci as Se, cj as Le, cG as Te, ck as Ie, cl as ke, cm as Ue, cn as Fe, co as Ve, am as Me, bJ as Pe, X as Re, cH as ze, cI as Oe, cJ as Be, bF as G, a5 as $e, az as je, P as _e, k as He, cK as Ge, l as Xe } from "./index-
|
|
2
|
+
import { bK as te, b as O, aw as I, bH as B, bD as q, bE as $, ax as W, bC as ae, e as se, f as re, g as ne, h as oe, i as ie, L as _, cu as le, cA as ce, v as de, B as T, w as j, U as P, J as ue, u as F, K as me, N as Q, cB as he, cC as H, x as R, a9 as pe, c as k, c0 as fe, c1 as ge, a3 as ve, c3 as be, c4 as V, s as xe, c8 as we, b$ as ye, M as Ce, cD as Ne, cE as Ae, cF as De, ch as Ee, ci as Se, cj as Le, cG as Te, ck as Ie, cl as ke, cm as Ue, cn as Fe, co as Ve, am as Me, bJ as Pe, X as Re, cH as ze, cI as Oe, cJ as Be, bF as G, a5 as $e, az as je, P as _e, k as He, cK as Ge, l as Xe } from "./index-CB2vXsPg.js";
|
|
3
3
|
import { jsx as t, jsxs as n, Fragment as z } from "react/jsx-runtime";
|
|
4
|
-
import { V as Je, E as Ke, a as qe, b as We, L as Qe, c as Ye, d as Ze, C as et } from "./editor-action-buttons-
|
|
5
|
-
import { a as Y } from "./use-visual-utils-
|
|
6
|
-
import { k as X } from "./date-formatter-
|
|
4
|
+
import { V as Je, E as Ke, a as qe, b as We, L as Qe, c as Ye, d as Ze, C as et } from "./editor-action-buttons-vCojlAQ-.js";
|
|
5
|
+
import { a as Y } from "./use-visual-utils-BKWme54p.js";
|
|
6
|
+
import { k as X } from "./date-formatter-vkCj9Ct-.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const f=require("react"),t=require("./index-
|
|
1
|
+
"use strict";const f=require("react"),t=require("./index-iF4085Zd.js"),e=require("react/jsx-runtime"),A=require("./editor-action-buttons-DhhZOsQV.js"),U=require("./use-visual-utils-BzlMPpHV.js"),I=require("./date-formatter-CqXdM6JO.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/chunks/{resource-management-panel-BMNgcD-1.js → resource-management-panel-CbxtZtfG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-iF4085Zd.js"),h=require("react"),re=require("./use-visual-utils-BzlMPpHV.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/chunks/{resource-management-panel-KeJHHJcg.js → resource-management-panel-DbiWt5FX.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as le } from "react/jsx-runtime";
|
|
2
|
-
import { bK as Pe, u as re, U as je, K as ce, bZ as Fe, b_ as ze, c as J, B as P, b$ as ie, c0 as Be, c1 as He, c2 as Ke, c3 as _e, c4 as Z, w as oe, c5 as $e, c6 as qe, c7 as Ge, c8 as ge, c9 as ue, ca as We, cb as Ye, cc as xe, cd as De, ce as we, cf as Ze, af as Ne, ab as ve, cg as ye, ch as Ce, ci as Se, cj as Ee, ck as Ve, cl as Le, cm as Ae, cn as Oe, co as Re, cp as Je, cq as he, cr as Qe, a9 as te, b as Xe, cs as Te, ct as ke, e as et, f as tt, g as rt, h as nt, i as ot, L as be, cu as de, v as st, cv as at, cw as it, cx as dt, bR as lt, bS as ct, bT as ut, bV as ht, cy as mt, cz as pt } from "./index-
|
|
2
|
+
import { bK as Pe, u as re, U as je, K as ce, bZ as Fe, b_ as ze, c as J, B as P, b$ as ie, c0 as Be, c1 as He, c2 as Ke, c3 as _e, c4 as Z, w as oe, c5 as $e, c6 as qe, c7 as Ge, c8 as ge, c9 as ue, ca as We, cb as Ye, cc as xe, cd as De, ce as we, cf as Ze, af as Ne, ab as ve, cg as ye, ch as Ce, ci as Se, cj as Ee, ck as Ve, cl as Le, cm as Ae, cn as Oe, co as Re, cp as Je, cq as he, cr as Qe, a9 as te, b as Xe, cs as Te, ct as ke, e as et, f as tt, g as rt, h as nt, i as ot, L as be, cu as de, v as st, cv as at, cw as it, cx as dt, bR as lt, bS as ct, bT as ut, bV as ht, cy as mt, cz as pt } from "./index-CB2vXsPg.js";
|
|
3
3
|
import ft, { useRef as gt, useEffect as ne, useState as x } from "react";
|
|
4
|
-
import { a as Ue } from "./use-visual-utils-
|
|
4
|
+
import { a as Ue } from "./use-visual-utils-BKWme54p.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.453.0 - ISC
|
|
7
7
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as K, b as Y, H as X, J as Z, K as q, M as _, N as ee, u as U, O as te, Q as re, x as M, T as se, U as f } from "./index-
|
|
1
|
+
import { G as K, b as Y, H as X, J as Z, K as q, M as _, N as ee, u as U, O as te, Q as re, x as M, T as se, U as f } from "./index-CB2vXsPg.js";
|
|
2
2
|
import { useState as H, useEffect as oe, useCallback as D } from "react";
|
|
3
3
|
function ae(e) {
|
|
4
4
|
const a = e.toUpperCase().indexOf("WHERE"), t = e.toUpperCase().indexOf("GROUP BY"), r = e.toUpperCase().indexOf("LIMIT"), s = e.toUpperCase().indexOf("ORDER BY");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-iF4085Zd.js"),b=require("react");function z(e){const n=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),s=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(s!==-1&&(c=s),r!==-1&&r<c&&(c=r),n!==-1){const d=e.substring(0,n),a=e.substring(n);return`${d} {{ filters | where }} AND ${a.substring(6)}`}else if(t!==-1){const d=e.substring(0,t),a=e.substring(t);return`${d} {{ filters | where }} ${a}`}else{const d=e.substring(0,c),a=e.substring(c);return console.log("beforeClause",d),console.log("afterClause",a),a?`${d} {{ filters | where }} ${a}`:`${d.replace(/;$/,"")} {{ filters | where }}`}}function j(e){const[n,t]=b.useState(null),[r,s]=b.useState(null),c=o.useEnsureReactGlobals();return b.useEffect(()=>{if(!e||e.trim()===""){t(null),s(null);return}if(!c)return;(async()=>{try{if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new Error(`Invalid URL format: ${e}`);try{new URL(e)}catch{throw new Error(`Invalid URL: ${e}`)}const l=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(l,{method:"HEAD"})).ok)throw new Error(`Module not found at ${l}`)}catch{}const h=await import(l);if(typeof h.useChartStore!="function")throw new Error("useChartStore is not a function");t(()=>h.useChartStore),s(null)}catch(a){const l=a instanceof Error?a.message:"Unknown error";console.error("Failed to load remote chart store:",l),s(l),t(null)}})()},[e,c]),n}function G(e,n){if(e.length===0)return"";const t=e.find(r=>{var s,c;return((s=r.customCardPreferences)==null?void 0:s.visualType)==="multiple"||!!((c=r.customCardPreferences)!=null&&c.dataInputCardIds)});if(t)return t.id;if(n){const r=e.find(s=>s.id===n);if(r){const s=r.tabTitle;if(s=="All__Header")return e[0].id;if(s&&s.endsWith("__Header")){const d=s.split("__")[0],a=e.find(l=>l.tabTitle===d);return a?a.id:e[0].id}return n}}return e[0].id}const Y=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:n,...t}=e;return t};async function L(e,n,t,r){if(!n||!t)throw new Error("Missing auth token or visual ID");const s=["resource-by-id","visual",t],c=r.getQueryData(s);if(c)return console.log("Using cached visual data for:",t),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",t);const d=o.ue.loading("Loading visual...",{position:"top-center"});try{const a=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${n}`}});if(!a.ok)throw new Error("Failed to load visual");const l=await a.json();return r.setQueryData(s,l),o.ue.dismiss(d),{data:l,fromCache:!1}}catch(a){throw o.ue.dismiss(d),a}}function _(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function J(e,n){var c,d;const t=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!t)return!1;const r=_(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const s=(d=r.cards)==null?void 0:d.find(a=>a.id===r.activeCardId);return s?(o.setupEditorWithCard({...n,frame:r,card:s,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function K(){var g;const{setCardSql:e}=o.useEditorActions(),n=o.useEditorStore(i=>i.frame),t=o.useEditorStore(i=>i.card),r=o.useEditorStore(i=>i.isDevMode),s=j(((g=t.customCardPreferences)==null?void 0:g.url)||""),c=o.useEditorStore(i=>i.selectedSchemaName),d=o.useEditorStore(i=>i.selectedDatamodelId),a=o.useEditorStore(i=>i.selectedDatabaseName),l=o.useEditorStore(i=>i.selectedTableName),h=o.useEditorStore(i=>i.selectedConnectionId),m=o.useEditorStore(i=>i.isShowingVisual),p=t.sql;return{getUpdatedFrame:b.useCallback(()=>{var w;let i=p;p&&!p.includes("{{")&&(i=z(p),e(i));const C=(w=s==null?void 0:s.getState())==null?void 0:w.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:c,lastSelectedDatamodelId:d,lastSelectedDatabase:a,lastSelectedTable:l,connectionId:h,sql:r?i:void 0,python:r?t.python:void 0,config:r?void 0:Y(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...C&&{customCardPreferences:{...t.customCardPreferences,settings:C}}},E=n.cards.map(I=>I.id===t.id?v:I);return{...n,cards:E,activeCardId:G(E,n.activeCardId)}},[t,n,r,m,c,d,a,l,h,e,s,p])}}function X(){const{authToken:e,tokenProps:n}=o.useSemaphorContext(),t=o.useQueryClient(),r=o.useSelectedVisual(),{selectVisual:s}=o.useManagementActions(),{setFrame:c,setCard:d,setIsDevMode:a,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:v,setFilterValues:E,setInlineFilterValuesMap:w,setApplyFilters:I}=o.useEditorActions(),{setIsDashboardEditing:V,setIsVisualEditing:$,setSelectedFrameId:M,clearSelectedFrameId:A,addFrame:R,setIsDashboardPanelOpen:N}=o.useDashboardActions(),y=o.useDashboardStore(u=>u.selectedSheetId),O=o.useDashboardStore(u=>u.selectedFrameId),T=o.useDashboardStore(u=>u.dashboard),x=o.useDashboardStore(u=>u.filterValues),B=o.useDashboardStore(u=>u.inlineFilterValuesMap),F=o.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),H=b.useCallback(async u=>{try{s(u),A();const{data:S,fromCache:f}=await L(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!J(S,{setFrame:c,setCard:d,setIsDevMode:a,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:v,setFilterValues:E,setInlineFilterValuesMap:w,setApplyFilters:I,setIsDashboardEditing:V,setIsVisualEditing:$,dashboard:T,selectedSheetId:y,selectedFrameId:O,filterValues:x,inlineFilterValuesMap:B}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:f}}catch(S){return console.error("Error editing visual:",S),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,n.apiServiceUrl,t,s,c,d,V,$,a,l,h,m,p,D,g,i,C,v,E,w,I,A,T,y,O,x,B]),Q=b.useCallback(async u=>{var S;try{if(s(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:P}=await L(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),W=(f==null?void 0:f.frameObject)??((S=f==null?void 0:f.visual)==null?void 0:S.frameObject);if(!W)return{success:!1,error:"Visual has no frame data"};const U=_(W);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const k={...o.cloneLinkedFrameWithSourceMapping(U),visualId:u.id};return R(y,k,"end"),V(!0),M(k.id),N(!1),{success:!0,fromCache:P}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,n.apiServiceUrl,t,s,y,R,V,M,N]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:H,handleAddLibraryVisual:Q,getUpdatedFrame:K().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=j;exports.useVisualUtils=X;
|
package/dist/dashboard/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-iF4085Zd.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/date-formatter-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/date-formatter-CqXdM6JO.js");function H(r,e,n,t){const s=r instanceof Date?r.toISOString():String(r),u=(t==null?void 0:t.browserTimezone)||n,o=(t==null?void 0:t.isSqlCard)??!1;if(e!=null&&e.useRelativeTime)return l.formatRelativeTime(s,(e==null?void 0:e.sourceTimezone)||"auto");const i=e!=null&&e.useCustomFormat&&(e!=null&&e.customFormat)?e.customFormat:(e==null?void 0:e.format)||"MM/dd/yyyy";return l.formatDate(s,i,e!=null&&e.timezone&&(e==null?void 0:e.timezone)!=="auto"?e.timezone:o?u:n,(e==null?void 0:e.sourceTimezone)||"auto")}function h(r,e,n){if(r==null)return"";if(!n.useFormattedValues||!e)return String(r);switch(e.type){case"number":return typeof r=="number"?l.formatNumberWithColumnSettings(r,e.numberFormat,n.locale):String(r);case"date":return H(r,e.dateFormat,n.timezone,{browserTimezone:n.browserTimezone,isSqlCard:n.isSqlCard});case"progress":return typeof r=="number"?`${r}%`:String(r);case"badge":case"link":case"text":case"none":default:return String(r)}}function T(r,e){return e.visibleColumns.map(n=>{const t=r[n],s=e.columnSettings[n];return h(t,s,{useFormattedValues:e.useFormattedValues,timezone:e.timezone,locale:e.locale})})}function m(r,e=","){if(r==null)return"";const n=String(r);return n.includes(e)||n.includes('"')||n.includes(`
|
|
2
2
|
`)||n.includes("\r")?`"${n.replace(/"/g,'""')}"`:n}function f(r,e=","){return r.map(n=>m(n,e)).join(e)}function d(r,e={}){const{delimiter:n=",",lineEnding:t=`
|
|
3
3
|
`}=e;return r.map(s=>f(s,n)).join(t)}function N(r,e={}){if(r.length===0)return"";const{delimiter:n=",",lineEnding:t=`
|
|
4
4
|
`,includeHeaders:s=!0,columns:u}=e,o=u||Object.keys(r[0]),i=[];s&&i.push(o);for(const c of r){const p=o.map(b=>{const a=c[b];return a==null?"":String(a)});i.push(p)}return d(i,{delimiter:n,lineEnding:t})}function y(r,e){const n=[];e.includeHeaders&&n.push(f(e.visibleColumns,e.delimiter));for(const t of r){const s=T(t,e);n.push(s.map(u=>m(u,e.delimiter)).join(e.delimiter))}return n}function v(r,e,n=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as h, a as V, b as w } from "../chunks/date-formatter-
|
|
2
|
-
import { d as O, c as W, h as k, e as I, g as J, i as K, j as Q, p as U, r as X } from "../chunks/date-formatter-
|
|
1
|
+
import { f as h, a as V, b as w } from "../chunks/date-formatter-vkCj9Ct-.js";
|
|
2
|
+
import { d as O, c as W, h as k, e as I, g as J, i as K, j as Q, p as U, r as X } from "../chunks/date-formatter-vkCj9Ct-.js";
|
|
3
3
|
function z(r, e, n, s) {
|
|
4
4
|
const u = r instanceof Date ? r.toISOString() : String(r), l = (s == null ? void 0 : s.browserTimezone) || n, t = (s == null ? void 0 : s.isSqlCard) ?? !1;
|
|
5
5
|
if (e != null && e.useRelativeTime)
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-B38ZMz4j.js"),D=require("./types/index.cjs"),E=require("./chunks/dashboard-summary-settings-dialog-pftsHC1x.js"),t=require("react/jsx-runtime"),C=require("react"),v=require("./chunks/resource-management-panel-BMNgcD-1.js"),P=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");const p=require("./chunks/notification-bell-DttaqoMO.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js");function _(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const A=_(C);function M(r){const{displayPreferences:a,...n}=r,i={...n,id:r.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",...i,children:t.jsx(I,{cardId:r.cardId})})})})]})})}function I({cardId:r}){const a=e.useDashboardStore(o=>{var u;return(u=o.dashboard)==null?void 0:u.sheets}),{card:n,frame:i}=C.useMemo(()=>{const o=a==null?void 0:a.flatMap(s=>s.frames),u=o==null?void 0:o.flatMap(s=>s==null?void 0:s.cards),d=u==null?void 0:u.find(s=>(s==null?void 0:s.id)===r),l=o==null?void 0:o.find(s=>{var m;return(m=s==null?void 0:s.cards)==null?void 0:m.find(h=>(h==null?void 0:h.id)===r)});return{card:d,frame:l}},[a,r]);return!n||!i?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:i})})})}function F({name:r,items:a,value:n,onChange:i,isLoading:o,isError:u,refetch:d,className:l,icon:s,showNone:m=!1}){const h=A.useRef(null),[f,y]=A.useState(!1),[b,N]=A.useState("100%"),g=m?[...a||[],{id:"none",name:"None"}]:a;A.useLayoutEffect(()=>{h.current&&N(h.current.offsetWidth)},[]);function T(){var c;return o?"Loading...":u?"Error":n?(c=a==null?void 0:a.find(x=>x.id===n))==null?void 0:c.name:`Select ${r}`}function j(c,x){i(x),y(!1)}return t.jsxs(e.Popover,{open:f,onOpenChange:y,children:[t.jsx(e.PopoverTrigger,{asChild:!0,children:t.jsxs(e.Button,{ref:h,variant:"outline",role:"combobox","aria-expanded":f,className:e.cn("flex h-9 w-full justify-between",l),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[s&&t.jsx("div",{className:"mr-2",children:s}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:T()})]}),t.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:b},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:d,children:t.jsx(e.RefreshCw,{className:e.cn("size-3.5 opacity-50",o&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:g==null?void 0:g.map(c=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:c.name,onSelect:x=>j(x,c.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(e.Check,{className:e.cn("size-4",n===c.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:c.name,children:c.name})]})},c.id))})]})]})})]})}function R({triggerButtonClassName:r,variant:a="ghost"}){const[n,i]=C.useState(!1),o=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.id}),u=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.title});return o?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:e.cn("h-7 p-2",r),buttonProps:{variant:a},onClick:()=>i(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:n,onOpenChange:i,dashboardId:o,dashboardName:u})]}):null}function w(r,a){C.useEffect(()=>(r&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,a])}function k(){var u,d;const{quotasQuery:r,usageQuery:a}=e.useAlertQuotas(),n=((u=r.data)==null?void 0:u.quotas)||[],i=((d=a.data)==null?void 0:d.usage)||[],o=new Map(i.map(l=>[l.tenantId||"org",l]));return t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Alert Quotas"}),t.jsx(e.Button,{variant:"outline",size:"sm",onClick:()=>{r.refetch(),a.refetch()},children:"Refresh"})]}),r.isLoading||a.isLoading?t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading quota usage..."}):null,t.jsx("div",{className:"overflow-hidden rounded-lg border",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Tenant"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Active Alerts"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Active"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Min Cadence"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Context Sources"})]})}),t.jsx("tbody",{children:n.map(l=>{const s=l.tenantId||"org",m=o.get(s);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:s}),t.jsx("td",{className:"px-3 py-2",children:(m==null?void 0:m.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[l.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxContextSources})]},s)})})]})})]})}exports.AlertCreationDialog=e.AlertCreationDialog;exports.AlertManagementPage=e.AlertManagementPage;exports.AlertsApiError=e.AlertsApiError;exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;exports.ExportError=e.ExportError;exports.PivotMarkerEnum=e.PivotMarkerEnum;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.backtestAlert=e.backtestAlert;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createAlert=e.createAlert;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.deleteAlert=e.deleteAlert;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getAlert=e.getAlert;exports.getAlertContextSources=e.getAlertContextSources;exports.getAlertHistory=e.getAlertHistory;exports.getAlertQuotaUsage=e.getAlertQuotaUsage;exports.getAlertRunDeliveries=e.getAlertRunDeliveries;exports.getAlertRunSteps=e.getAlertRunSteps;exports.getAlertRuns=e.getAlertRuns;exports.getAlertState=e.getAlertState;exports.getColumnDataType=e.getColumnDataType;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.interpretAlertContext=e.interpretAlertContext;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.triggerAlertNow=e.triggerAlertNow;exports.updateAlert=e.updateAlert;exports.updateAlertContextSources=e.updateAlertContextSources;exports.updateAlertQuota=e.updateAlertQuota;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useAlertActions=e.useAlertActions;exports.useAlertBacktest=e.useAlertBacktest;exports.useAlertContextBuilder=e.useAlertContextBuilder;exports.useAlertDeliveries=e.useAlertDeliveries;exports.useAlertDetail=e.useAlertDetail;exports.useAlertDraft=e.useAlertDraft;exports.useAlertFilters=e.useAlertFilters;exports.useAlertHistory=e.useAlertHistory;exports.useAlertQuotas=e.useAlertQuotas;exports.useAlertRuns=e.useAlertRuns;exports.useAlertState=e.useAlertState;exports.useAlertStore=e.useAlertStore;exports.useAlerts=e.useAlerts;exports.useAlertsBootstrap=e.useAlertsBootstrap;exports.useAlertsById=e.useAlertsById;exports.useAlertsForCard=e.useAlertsForCard;exports.useCard=e.useCard;exports.useCardAlertMap=e.useCardAlertMap;exports.useCardSummary=e.useCardSummary;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardStore=e.useDashboardStore;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useSelectedAlertId=e.useSelectedAlertId;exports.useTextFilterHook=e.useTextFilterHook;exports.DEFAULT_CALENDAR_CONTEXT=D.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=D.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.EMPTY_SELECTION=D.EMPTY_SELECTION;exports.CalendarPreferencesDialog=E.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=E.DashboardSummarySettingsDialog;exports.ResourceManagementPanel=v.ResourceManagementPanel;exports.useDebouncedDirtyCheck=P.useDebouncedDirtyCheck;exports.AdvancedModeToggle=p.AdvancedModeToggle;exports.ExportNotificationItem=p.ExportNotificationItem;exports.ExportNotificationList=p.ExportNotificationList;exports.NotificationBell=p.NotificationBell;exports.UnsavedChangesAlert=p.UnsavedChangesAlert;exports.VisualEditingControls=p.VisualEditingControls;exports.useExportPolling=p.useExportPolling;exports.useExportRecovery=p.useExportRecovery;exports.usePristineSnapshotInitializer=p.usePristineSnapshotInitializer;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=F;exports.ScheduleDashboard=R;exports.TenantQuotaPage=k;exports.Visual=M;exports.useExposePrintState=w;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-iF4085Zd.js"),D=require("./types/index.cjs"),E=require("./chunks/dashboard-summary-settings-dialog-B9155s2W.js"),t=require("react/jsx-runtime"),C=require("react"),v=require("./chunks/resource-management-panel-CbxtZtfG.js"),P=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");const p=require("./chunks/notification-bell-WlmbKJeN.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js");function _(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const A=_(C);function M(r){const{displayPreferences:a,...n}=r,i={...n,id:r.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",...i,children:t.jsx(I,{cardId:r.cardId})})})})]})})}function I({cardId:r}){const a=e.useDashboardStore(o=>{var u;return(u=o.dashboard)==null?void 0:u.sheets}),{card:n,frame:i}=C.useMemo(()=>{const o=a==null?void 0:a.flatMap(s=>s.frames),u=o==null?void 0:o.flatMap(s=>s==null?void 0:s.cards),d=u==null?void 0:u.find(s=>(s==null?void 0:s.id)===r),l=o==null?void 0:o.find(s=>{var m;return(m=s==null?void 0:s.cards)==null?void 0:m.find(h=>(h==null?void 0:h.id)===r)});return{card:d,frame:l}},[a,r]);return!n||!i?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:i})})})}function F({name:r,items:a,value:n,onChange:i,isLoading:o,isError:u,refetch:d,className:l,icon:s,showNone:m=!1}){const h=A.useRef(null),[f,y]=A.useState(!1),[b,N]=A.useState("100%"),g=m?[...a||[],{id:"none",name:"None"}]:a;A.useLayoutEffect(()=>{h.current&&N(h.current.offsetWidth)},[]);function T(){var c;return o?"Loading...":u?"Error":n?(c=a==null?void 0:a.find(x=>x.id===n))==null?void 0:c.name:`Select ${r}`}function j(c,x){i(x),y(!1)}return t.jsxs(e.Popover,{open:f,onOpenChange:y,children:[t.jsx(e.PopoverTrigger,{asChild:!0,children:t.jsxs(e.Button,{ref:h,variant:"outline",role:"combobox","aria-expanded":f,className:e.cn("flex h-9 w-full justify-between",l),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[s&&t.jsx("div",{className:"mr-2",children:s}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:T()})]}),t.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:b},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:d,children:t.jsx(e.RefreshCw,{className:e.cn("size-3.5 opacity-50",o&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:g==null?void 0:g.map(c=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:c.name,onSelect:x=>j(x,c.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(e.Check,{className:e.cn("size-4",n===c.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:c.name,children:c.name})]})},c.id))})]})]})})]})}function R({triggerButtonClassName:r,variant:a="ghost"}){const[n,i]=C.useState(!1),o=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.id}),u=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.title});return o?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:e.cn("h-7 p-2",r),buttonProps:{variant:a},onClick:()=>i(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:n,onOpenChange:i,dashboardId:o,dashboardName:u})]}):null}function w(r,a){C.useEffect(()=>(r&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,a])}function k(){var u,d;const{quotasQuery:r,usageQuery:a}=e.useAlertQuotas(),n=((u=r.data)==null?void 0:u.quotas)||[],i=((d=a.data)==null?void 0:d.usage)||[],o=new Map(i.map(l=>[l.tenantId||"org",l]));return t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Alert Quotas"}),t.jsx(e.Button,{variant:"outline",size:"sm",onClick:()=>{r.refetch(),a.refetch()},children:"Refresh"})]}),r.isLoading||a.isLoading?t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading quota usage..."}):null,t.jsx("div",{className:"overflow-hidden rounded-lg border",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Tenant"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Active Alerts"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Active"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Min Cadence"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Context Sources"})]})}),t.jsx("tbody",{children:n.map(l=>{const s=l.tenantId||"org",m=o.get(s);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:s}),t.jsx("td",{className:"px-3 py-2",children:(m==null?void 0:m.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[l.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxContextSources})]},s)})})]})})]})}exports.AlertCreationDialog=e.AlertCreationDialog;exports.AlertManagementPage=e.AlertManagementPage;exports.AlertsApiError=e.AlertsApiError;exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;exports.ExportError=e.ExportError;exports.PivotMarkerEnum=e.PivotMarkerEnum;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.backtestAlert=e.backtestAlert;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createAlert=e.createAlert;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.deleteAlert=e.deleteAlert;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getAlert=e.getAlert;exports.getAlertContextSources=e.getAlertContextSources;exports.getAlertHistory=e.getAlertHistory;exports.getAlertQuotaUsage=e.getAlertQuotaUsage;exports.getAlertRunDeliveries=e.getAlertRunDeliveries;exports.getAlertRunSteps=e.getAlertRunSteps;exports.getAlertRuns=e.getAlertRuns;exports.getAlertState=e.getAlertState;exports.getColumnDataType=e.getColumnDataType;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.interpretAlertContext=e.interpretAlertContext;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.triggerAlertNow=e.triggerAlertNow;exports.updateAlert=e.updateAlert;exports.updateAlertContextSources=e.updateAlertContextSources;exports.updateAlertQuota=e.updateAlertQuota;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useAlertActions=e.useAlertActions;exports.useAlertBacktest=e.useAlertBacktest;exports.useAlertContextBuilder=e.useAlertContextBuilder;exports.useAlertDeliveries=e.useAlertDeliveries;exports.useAlertDetail=e.useAlertDetail;exports.useAlertDraft=e.useAlertDraft;exports.useAlertFilters=e.useAlertFilters;exports.useAlertHistory=e.useAlertHistory;exports.useAlertQuotas=e.useAlertQuotas;exports.useAlertRuns=e.useAlertRuns;exports.useAlertState=e.useAlertState;exports.useAlertStore=e.useAlertStore;exports.useAlerts=e.useAlerts;exports.useAlertsBootstrap=e.useAlertsBootstrap;exports.useAlertsById=e.useAlertsById;exports.useAlertsForCard=e.useAlertsForCard;exports.useCard=e.useCard;exports.useCardAlertMap=e.useCardAlertMap;exports.useCardSummary=e.useCardSummary;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardStore=e.useDashboardStore;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useSelectedAlertId=e.useSelectedAlertId;exports.useTextFilterHook=e.useTextFilterHook;exports.DEFAULT_CALENDAR_CONTEXT=D.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=D.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.EMPTY_SELECTION=D.EMPTY_SELECTION;exports.CalendarPreferencesDialog=E.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=E.DashboardSummarySettingsDialog;exports.ResourceManagementPanel=v.ResourceManagementPanel;exports.useDebouncedDirtyCheck=P.useDebouncedDirtyCheck;exports.AdvancedModeToggle=p.AdvancedModeToggle;exports.ExportNotificationItem=p.ExportNotificationItem;exports.ExportNotificationList=p.ExportNotificationList;exports.NotificationBell=p.NotificationBell;exports.UnsavedChangesAlert=p.UnsavedChangesAlert;exports.VisualEditingControls=p.VisualEditingControls;exports.useExportPolling=p.useExportPolling;exports.useExportRecovery=p.useExportRecovery;exports.usePristineSnapshotInitializer=p.usePristineSnapshotInitializer;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=F;exports.ScheduleDashboard=R;exports.TenantQuotaPage=k;exports.Visual=M;exports.useExposePrintState=w;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { V as D, W as _, Y as I, Z as M, _ as w, $ as F, a0 as R, u as C, a1 as y, a2 as k, P as L, k as B, B as E, c as f, a3 as O, l as Q, m as U, n as z, a4 as N, a5 as q, o as V, p as H, q as j, r as W, s as G, a6 as K, a7 as Y, a8 as $ } from "./chunks/index-
|
|
2
|
-
import { aS as pe, aR as he, bA as be, aU as fe, aT as Ae, ar as Ce, aV as xe, D as ge, ap as ye, aj as De, bG as Ee, aZ as Ne, ab as Se, ae as ve, ae as Te, af as Pe, aq as _e, a as Ie, bs as Me, bF as we, am as Fe, bj as Re, bg as ke, bB as Le, b4 as Be, bl as Oe, ao as Qe, ak as Ue, al as ze, a_ as qe, bJ as Ve, bi as He, bu as je, bp as We, by as Ge, bq as Ke, br as Ye, bo as $e, bn as Xe, b6 as Je, bE as Ze, bD as ea, bC as aa, b5 as sa, b9 as ta, ba as ra, b3 as oa, bt as na, an as la, b2 as ia, aX as da, aY as ca, aW as ua, b7 as ma, b1 as pa, bI as ha, bH as ba, b0 as fa, a$ as Aa, bx as Ca, bh as xa, bw as ga, bb as ya, b8 as Da, bm as Ea, bk as Na, bv as Sa, bz as va, ay as Ta, av as Pa, aK as _a, aI as Ia, aH as Ma, aG as wa, aC as Fa, aQ as Ra, aP as ka, aF as La, aE as Ba, aD as Oa, aJ as Qa, aA as Ua, aB as za, aL as qa, aN as Va, ai as Ha, aM as ja, at as Wa, bd as Ga, bf as Ka, be as Ya, N as $a, ah as Xa, aa as Ja, as as Za, au as es, ac as as, M as ss, bc as ts, U as rs, ax as os, aw as ns, az as ls, a9 as is, ag as ds, aO as cs, ad as us } from "./chunks/index-
|
|
1
|
+
import { V as D, W as _, Y as I, Z as M, _ as w, $ as F, a0 as R, u as C, a1 as y, a2 as k, P as L, k as B, B as E, c as f, a3 as O, l as Q, m as U, n as z, a4 as N, a5 as q, o as V, p as H, q as j, r as W, s as G, a6 as K, a7 as Y, a8 as $ } from "./chunks/index-CB2vXsPg.js";
|
|
2
|
+
import { aS as pe, aR as he, bA as be, aU as fe, aT as Ae, ar as Ce, aV as xe, D as ge, ap as ye, aj as De, bG as Ee, aZ as Ne, ab as Se, ae as ve, ae as Te, af as Pe, aq as _e, a as Ie, bs as Me, bF as we, am as Fe, bj as Re, bg as ke, bB as Le, b4 as Be, bl as Oe, ao as Qe, ak as Ue, al as ze, a_ as qe, bJ as Ve, bi as He, bu as je, bp as We, by as Ge, bq as Ke, br as Ye, bo as $e, bn as Xe, b6 as Je, bE as Ze, bD as ea, bC as aa, b5 as sa, b9 as ta, ba as ra, b3 as oa, bt as na, an as la, b2 as ia, aX as da, aY as ca, aW as ua, b7 as ma, b1 as pa, bI as ha, bH as ba, b0 as fa, a$ as Aa, bx as Ca, bh as xa, bw as ga, bb as ya, b8 as Da, bm as Ea, bk as Na, bv as Sa, bz as va, ay as Ta, av as Pa, aK as _a, aI as Ia, aH as Ma, aG as wa, aC as Fa, aQ as Ra, aP as ka, aF as La, aE as Ba, aD as Oa, aJ as Qa, aA as Ua, aB as za, aL as qa, aN as Va, ai as Ha, aM as ja, at as Wa, bd as Ga, bf as Ka, be as Ya, N as $a, ah as Xa, aa as Ja, as as Za, au as es, ac as as, M as ss, bc as ts, U as rs, ax as os, aw as ns, az as ls, a9 as is, ag as ds, aO as cs, ad as us } from "./chunks/index-CB2vXsPg.js";
|
|
3
3
|
import { DEFAULT_CALENDAR_CONTEXT as ps, DEFAULT_SEMANTIC_DOMAIN_ACCESS as hs, EMPTY_SELECTION as bs } from "./types/index.js";
|
|
4
|
-
import { C as As, D as Cs } from "./chunks/dashboard-summary-settings-dialog-
|
|
4
|
+
import { C as As, D as Cs } from "./chunks/dashboard-summary-settings-dialog-C83sgPRW.js";
|
|
5
5
|
import { jsx as e, jsxs as n, Fragment as X } from "react/jsx-runtime";
|
|
6
6
|
import * as b from "react";
|
|
7
7
|
import { useMemo as J, useState as Z, useEffect as ee } from "react";
|
|
8
|
-
import { ResourceManagementPanel as gs } from "./chunks/resource-management-panel-
|
|
8
|
+
import { ResourceManagementPanel as gs } from "./chunks/resource-management-panel-DbiWt5FX.js";
|
|
9
9
|
import { u as Ds } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import { A as Ns, a as Ss, E as vs, N as Ts, U as Ps, V as _s, u as Is, b as Ms, c as ws } from "./chunks/notification-bell-
|
|
11
|
+
import { A as Ns, a as Ss, E as vs, N as Ts, U as Ps, V as _s, u as Is, b as Ms, c as ws } from "./chunks/notification-bell-C2K_DGKF.js";
|
|
12
12
|
import { n as Rs, s as ks } from "./chunks/normalize-dashboard-for-dirty-check-Bn27S0PN.js";
|
|
13
13
|
function ne(a) {
|
|
14
14
|
const { displayPreferences: s, ...i } = a, d = {
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-iF4085Zd.js"),a=require("../types/index.cjs"),e=require("../chunks/dashboard-summary-settings-dialog-B9155s2W.js");exports.Surfboard=r.DashboardPlus;exports.EMPTY_SELECTION=a.EMPTY_SELECTION;exports.CalendarPreferencesDialog=e.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=e.DashboardSummarySettingsDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as o } from "../chunks/index-
|
|
1
|
+
import { a as o } from "../chunks/index-CB2vXsPg.js";
|
|
2
2
|
import { EMPTY_SELECTION as s } from "../types/index.js";
|
|
3
|
-
import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-
|
|
3
|
+
import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-C83sgPRW.js";
|
|
4
4
|
export {
|
|
5
5
|
m as CalendarPreferencesDialog,
|
|
6
6
|
t as DashboardSummarySettingsDialog,
|
|
@@ -44,6 +44,7 @@ export declare type AxisConfig = {
|
|
|
44
44
|
enabled: boolean;
|
|
45
45
|
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
46
46
|
};
|
|
47
|
+
formatMode?: 'inherit' | 'override';
|
|
47
48
|
formatOptions?: TFormatOptions;
|
|
48
49
|
scale?: {
|
|
49
50
|
min?: number | 'auto';
|
|
@@ -264,6 +265,7 @@ declare interface ColorRange_2 {
|
|
|
264
265
|
|
|
265
266
|
declare interface ColumnSettings {
|
|
266
267
|
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
268
|
+
inheritMetricFormat?: boolean;
|
|
267
269
|
textAlign: 'left' | 'center' | 'right';
|
|
268
270
|
width: number;
|
|
269
271
|
minWidth?: number;
|
|
@@ -271,7 +273,7 @@ declare interface ColumnSettings {
|
|
|
271
273
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
272
274
|
textWrap: 'wrap' | 'nowrap';
|
|
273
275
|
numberFormat: {
|
|
274
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
276
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
275
277
|
currency: string;
|
|
276
278
|
locale: string;
|
|
277
279
|
minimumFractionDigits: number;
|
|
@@ -1456,6 +1458,7 @@ export declare type TCardPreferences = {
|
|
|
1456
1458
|
xAxisConfig?: AxisConfig;
|
|
1457
1459
|
yAxisConfig?: AxisConfig;
|
|
1458
1460
|
secondaryYAxisConfig?: AxisConfig;
|
|
1461
|
+
tooltipConfig?: TTooltipFormatConfig;
|
|
1459
1462
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1460
1463
|
bulletConfig?: TBulletConfig;
|
|
1461
1464
|
heatmapConfig?: THeatmapConfig;
|
|
@@ -1658,6 +1661,8 @@ export declare type TDataLabelsConfig = {
|
|
|
1658
1661
|
anchor?: 'center' | 'start' | 'end';
|
|
1659
1662
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1660
1663
|
display?: 'auto' | boolean;
|
|
1664
|
+
formatMode?: 'inherit' | 'override';
|
|
1665
|
+
/** @deprecated Use formatMode + formatOptions.type */
|
|
1661
1666
|
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1662
1667
|
formatOptions?: TFormatOptions;
|
|
1663
1668
|
font?: {
|
|
@@ -1935,6 +1940,13 @@ export declare type TStyle = {
|
|
|
1935
1940
|
dark?: StyleProps;
|
|
1936
1941
|
};
|
|
1937
1942
|
|
|
1943
|
+
export declare type TTooltipFormatConfig = {
|
|
1944
|
+
formatMode?: 'inherit' | 'override';
|
|
1945
|
+
/** @deprecated Use formatMode */
|
|
1946
|
+
mode?: 'inherit' | 'override';
|
|
1947
|
+
formatOptions?: TFormatOptions;
|
|
1948
|
+
};
|
|
1949
|
+
|
|
1938
1950
|
export declare interface UpdateUserPreferenceRequest {
|
|
1939
1951
|
defaultDashboardId: string | null;
|
|
1940
1952
|
}
|
|
@@ -46,7 +46,7 @@ export declare interface ColumnSettings {
|
|
|
46
46
|
textAlign?: 'left' | 'center' | 'right';
|
|
47
47
|
width?: number;
|
|
48
48
|
numberFormat?: {
|
|
49
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
49
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
50
50
|
currency: string;
|
|
51
51
|
locale: string;
|
|
52
52
|
minimumFractionDigits: number;
|
|
@@ -197,7 +197,7 @@ export declare function formatNumberCustom(value: number, type: 'number' | 'curr
|
|
|
197
197
|
* Used for export formatting
|
|
198
198
|
*/
|
|
199
199
|
export declare function formatNumberWithColumnSettings(value: number | null | undefined, numberFormat: {
|
|
200
|
-
style?: 'decimal' | 'currency' | 'percent';
|
|
200
|
+
style?: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
201
201
|
currency?: string;
|
|
202
202
|
locale?: string;
|
|
203
203
|
minimumFractionDigits?: number;
|
|
@@ -302,7 +302,7 @@ export declare interface GroupByField {
|
|
|
302
302
|
* - Lambda (Node.js) for async export processing
|
|
303
303
|
*/
|
|
304
304
|
export declare interface NumberFormatOptions {
|
|
305
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
305
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
306
306
|
locale?: string;
|
|
307
307
|
currency?: string;
|
|
308
308
|
minimumFractionDigits?: number;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -590,6 +590,7 @@ export declare type AxisConfig = {
|
|
|
590
590
|
enabled: boolean;
|
|
591
591
|
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
592
592
|
};
|
|
593
|
+
formatMode?: 'inherit' | 'override';
|
|
593
594
|
formatOptions?: TFormatOptions;
|
|
594
595
|
scale?: {
|
|
595
596
|
min?: number | 'auto';
|
|
@@ -948,6 +949,7 @@ export declare type ColumnRole = 'groupby' | 'trendby' | 'metric' | 'filter';
|
|
|
948
949
|
|
|
949
950
|
declare interface ColumnSettings {
|
|
950
951
|
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
952
|
+
inheritMetricFormat?: boolean;
|
|
951
953
|
textAlign: 'left' | 'center' | 'right';
|
|
952
954
|
width: number;
|
|
953
955
|
minWidth?: number;
|
|
@@ -955,7 +957,7 @@ declare interface ColumnSettings {
|
|
|
955
957
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
956
958
|
textWrap: 'wrap' | 'nowrap';
|
|
957
959
|
numberFormat: {
|
|
958
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
960
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
959
961
|
currency: string;
|
|
960
962
|
locale: string;
|
|
961
963
|
minimumFractionDigits: number;
|
|
@@ -3377,6 +3379,7 @@ export declare type TCardPreferences = {
|
|
|
3377
3379
|
xAxisConfig?: AxisConfig;
|
|
3378
3380
|
yAxisConfig?: AxisConfig;
|
|
3379
3381
|
secondaryYAxisConfig?: AxisConfig;
|
|
3382
|
+
tooltipConfig?: TTooltipFormatConfig;
|
|
3380
3383
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
3381
3384
|
bulletConfig?: TBulletConfig;
|
|
3382
3385
|
heatmapConfig?: THeatmapConfig;
|
|
@@ -3581,6 +3584,8 @@ export declare type TDataLabelsConfig = {
|
|
|
3581
3584
|
anchor?: 'center' | 'start' | 'end';
|
|
3582
3585
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
3583
3586
|
display?: 'auto' | boolean;
|
|
3587
|
+
formatMode?: 'inherit' | 'override';
|
|
3588
|
+
/** @deprecated Use formatMode + formatOptions.type */
|
|
3584
3589
|
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
3585
3590
|
formatOptions?: TFormatOptions;
|
|
3586
3591
|
font?: {
|
|
@@ -4102,6 +4107,13 @@ export declare type TStyle = {
|
|
|
4102
4107
|
dark?: StyleProps;
|
|
4103
4108
|
};
|
|
4104
4109
|
|
|
4110
|
+
export declare type TTooltipFormatConfig = {
|
|
4111
|
+
formatMode?: 'inherit' | 'override';
|
|
4112
|
+
/** @deprecated Use formatMode */
|
|
4113
|
+
mode?: 'inherit' | 'override';
|
|
4114
|
+
formatOptions?: TFormatOptions;
|
|
4115
|
+
};
|
|
4116
|
+
|
|
4105
4117
|
/**
|
|
4106
4118
|
* UI and behavior configuration for the embedded dashboard.
|
|
4107
4119
|
*/
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare type AxisConfig = {
|
|
|
33
33
|
enabled: boolean;
|
|
34
34
|
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
35
35
|
};
|
|
36
|
+
formatMode?: 'inherit' | 'override';
|
|
36
37
|
formatOptions?: TFormatOptions;
|
|
37
38
|
scale?: {
|
|
38
39
|
min?: number | 'auto';
|
|
@@ -251,6 +252,7 @@ declare interface ColorRange_2 {
|
|
|
251
252
|
|
|
252
253
|
declare interface ColumnSettings {
|
|
253
254
|
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
255
|
+
inheritMetricFormat?: boolean;
|
|
254
256
|
textAlign: 'left' | 'center' | 'right';
|
|
255
257
|
width: number;
|
|
256
258
|
minWidth?: number;
|
|
@@ -258,7 +260,7 @@ declare interface ColumnSettings {
|
|
|
258
260
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
259
261
|
textWrap: 'wrap' | 'nowrap';
|
|
260
262
|
numberFormat: {
|
|
261
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
263
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
262
264
|
currency: string;
|
|
263
265
|
locale: string;
|
|
264
266
|
minimumFractionDigits: number;
|
|
@@ -1307,6 +1309,7 @@ declare type TCardPreferences = {
|
|
|
1307
1309
|
xAxisConfig?: AxisConfig;
|
|
1308
1310
|
yAxisConfig?: AxisConfig;
|
|
1309
1311
|
secondaryYAxisConfig?: AxisConfig;
|
|
1312
|
+
tooltipConfig?: TTooltipFormatConfig;
|
|
1310
1313
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1311
1314
|
bulletConfig?: TBulletConfig;
|
|
1312
1315
|
heatmapConfig?: THeatmapConfig;
|
|
@@ -1495,6 +1498,8 @@ declare type TDataLabelsConfig = {
|
|
|
1495
1498
|
anchor?: 'center' | 'start' | 'end';
|
|
1496
1499
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1497
1500
|
display?: 'auto' | boolean;
|
|
1501
|
+
formatMode?: 'inherit' | 'override';
|
|
1502
|
+
/** @deprecated Use formatMode + formatOptions.type */
|
|
1498
1503
|
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1499
1504
|
formatOptions?: TFormatOptions;
|
|
1500
1505
|
font?: {
|
|
@@ -1748,6 +1753,13 @@ declare type TStyle = {
|
|
|
1748
1753
|
dark?: StyleProps;
|
|
1749
1754
|
};
|
|
1750
1755
|
|
|
1756
|
+
declare type TTooltipFormatConfig = {
|
|
1757
|
+
formatMode?: 'inherit' | 'override';
|
|
1758
|
+
/** @deprecated Use formatMode */
|
|
1759
|
+
mode?: 'inherit' | 'override';
|
|
1760
|
+
formatOptions?: TFormatOptions;
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1751
1763
|
/**
|
|
1752
1764
|
* URL Parameter for drill-to-URL interpolation
|
|
1753
1765
|
* Represents a placeholder in the URL template (e.g., {{product_id}})
|
|
@@ -44,6 +44,7 @@ export declare type AxisConfig = {
|
|
|
44
44
|
enabled: boolean;
|
|
45
45
|
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
46
46
|
};
|
|
47
|
+
formatMode?: 'inherit' | 'override';
|
|
47
48
|
formatOptions?: TFormatOptions;
|
|
48
49
|
scale?: {
|
|
49
50
|
min?: number | 'auto';
|
|
@@ -271,6 +272,7 @@ declare interface ColorRange_2 {
|
|
|
271
272
|
|
|
272
273
|
declare interface ColumnSettings {
|
|
273
274
|
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
275
|
+
inheritMetricFormat?: boolean;
|
|
274
276
|
textAlign: 'left' | 'center' | 'right';
|
|
275
277
|
width: number;
|
|
276
278
|
minWidth?: number;
|
|
@@ -278,7 +280,7 @@ declare interface ColumnSettings {
|
|
|
278
280
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
279
281
|
textWrap: 'wrap' | 'nowrap';
|
|
280
282
|
numberFormat: {
|
|
281
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
283
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
282
284
|
currency: string;
|
|
283
285
|
locale: string;
|
|
284
286
|
minimumFractionDigits: number;
|
|
@@ -1478,6 +1480,7 @@ export declare type TCardPreferences = {
|
|
|
1478
1480
|
xAxisConfig?: AxisConfig;
|
|
1479
1481
|
yAxisConfig?: AxisConfig;
|
|
1480
1482
|
secondaryYAxisConfig?: AxisConfig;
|
|
1483
|
+
tooltipConfig?: TTooltipFormatConfig;
|
|
1481
1484
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1482
1485
|
bulletConfig?: TBulletConfig;
|
|
1483
1486
|
heatmapConfig?: THeatmapConfig;
|
|
@@ -1680,6 +1683,8 @@ export declare type TDataLabelsConfig = {
|
|
|
1680
1683
|
anchor?: 'center' | 'start' | 'end';
|
|
1681
1684
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1682
1685
|
display?: 'auto' | boolean;
|
|
1686
|
+
formatMode?: 'inherit' | 'override';
|
|
1687
|
+
/** @deprecated Use formatMode + formatOptions.type */
|
|
1683
1688
|
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1684
1689
|
formatOptions?: TFormatOptions;
|
|
1685
1690
|
font?: {
|
|
@@ -1957,6 +1962,13 @@ export declare type TStyle = {
|
|
|
1957
1962
|
dark?: StyleProps;
|
|
1958
1963
|
};
|
|
1959
1964
|
|
|
1965
|
+
export declare type TTooltipFormatConfig = {
|
|
1966
|
+
formatMode?: 'inherit' | 'override';
|
|
1967
|
+
/** @deprecated Use formatMode */
|
|
1968
|
+
mode?: 'inherit' | 'override';
|
|
1969
|
+
formatOptions?: TFormatOptions;
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1960
1972
|
export declare interface UpdateUserPreferenceRequest {
|
|
1961
1973
|
defaultDashboardId: string | null;
|
|
1962
1974
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -221,6 +221,7 @@ export declare type AxisConfig = {
|
|
|
221
221
|
enabled: boolean;
|
|
222
222
|
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
223
223
|
};
|
|
224
|
+
formatMode?: 'inherit' | 'override';
|
|
224
225
|
formatOptions?: TFormatOptions;
|
|
225
226
|
scale?: {
|
|
226
227
|
min?: number | 'auto';
|
|
@@ -470,6 +471,7 @@ declare interface ColorRange_2 {
|
|
|
470
471
|
|
|
471
472
|
declare interface ColumnSettings {
|
|
472
473
|
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
474
|
+
inheritMetricFormat?: boolean;
|
|
473
475
|
textAlign: 'left' | 'center' | 'right';
|
|
474
476
|
width: number;
|
|
475
477
|
minWidth?: number;
|
|
@@ -477,7 +479,7 @@ declare interface ColumnSettings {
|
|
|
477
479
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
478
480
|
textWrap: 'wrap' | 'nowrap';
|
|
479
481
|
numberFormat: {
|
|
480
|
-
style: 'decimal' | 'currency' | 'percent';
|
|
482
|
+
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
481
483
|
currency: string;
|
|
482
484
|
locale: string;
|
|
483
485
|
minimumFractionDigits: number;
|
|
@@ -1729,6 +1731,7 @@ export declare type TCardPreferences = {
|
|
|
1729
1731
|
xAxisConfig?: AxisConfig;
|
|
1730
1732
|
yAxisConfig?: AxisConfig;
|
|
1731
1733
|
secondaryYAxisConfig?: AxisConfig;
|
|
1734
|
+
tooltipConfig?: TTooltipFormatConfig;
|
|
1732
1735
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1733
1736
|
bulletConfig?: TBulletConfig;
|
|
1734
1737
|
heatmapConfig?: THeatmapConfig;
|
|
@@ -1931,6 +1934,8 @@ export declare type TDataLabelsConfig = {
|
|
|
1931
1934
|
anchor?: 'center' | 'start' | 'end';
|
|
1932
1935
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1933
1936
|
display?: 'auto' | boolean;
|
|
1937
|
+
formatMode?: 'inherit' | 'override';
|
|
1938
|
+
/** @deprecated Use formatMode + formatOptions.type */
|
|
1934
1939
|
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1935
1940
|
formatOptions?: TFormatOptions;
|
|
1936
1941
|
font?: {
|
|
@@ -2437,6 +2442,13 @@ export declare type TStyle = {
|
|
|
2437
2442
|
dark?: StyleProps;
|
|
2438
2443
|
};
|
|
2439
2444
|
|
|
2445
|
+
export declare type TTooltipFormatConfig = {
|
|
2446
|
+
formatMode?: 'inherit' | 'override';
|
|
2447
|
+
/** @deprecated Use formatMode */
|
|
2448
|
+
mode?: 'inherit' | 'override';
|
|
2449
|
+
formatOptions?: TFormatOptions;
|
|
2450
|
+
};
|
|
2451
|
+
|
|
2440
2452
|
/**
|
|
2441
2453
|
* UI and behavior configuration for the embedded dashboard.
|
|
2442
2454
|
*/
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.247",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
"build": "tsc && vite build",
|
|
55
55
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
56
56
|
"preview": "vite preview",
|
|
57
|
-
"test": "vitest",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:watch": "vitest",
|
|
58
59
|
"test:ui": "vitest --ui",
|
|
59
60
|
"test:run": "vitest run",
|
|
60
61
|
"test:coverage": "vitest run --coverage",
|
|
@@ -187,7 +188,7 @@
|
|
|
187
188
|
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
|
|
188
189
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
189
190
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
190
|
-
"jsdom": "^
|
|
191
|
+
"jsdom": "^26.1.0",
|
|
191
192
|
"path": "^0.12.7",
|
|
192
193
|
"postcss": "^8.4.35",
|
|
193
194
|
"postcss-prefix-selector": "^2.1.0",
|