react-semaphor 0.1.190 → 0.1.192
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/{calendar-preferences-dialog-C-EnEVkR.js → calendar-preferences-dialog-CMM-uye9.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-_yWfK3zx.js → calendar-preferences-dialog-wu_fGBRY.js} +1 -1
- package/dist/chunks/{dashboard-controls-gwoRm-rC.js → dashboard-controls-CZiglER8.js} +5 -5
- package/dist/chunks/{dashboard-controls-C6e7q6jM.js → dashboard-controls-DZ3RdkPp.js} +1 -1
- package/dist/chunks/{dashboard-json-CWJ3xaC2.js → dashboard-json-CBLwtP5m.js} +1 -1
- package/dist/chunks/{dashboard-json-DgHk2Eg7.js → dashboard-json-DxsH7NvN.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-EnRU3j5f.js → edit-dashboard-visual-CdR2ywTB.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-D9sZDYuG.js → edit-dashboard-visual-DyvG8L5y.js} +1 -1
- package/dist/chunks/{editor-action-buttons-DcSE2xCk.js → editor-action-buttons-BvRPaQoF.js} +2 -2
- package/dist/chunks/{editor-action-buttons-elJDoaGz.js → editor-action-buttons-DRX64gHq.js} +1 -1
- package/dist/chunks/{index-C3RrD24D.js → index-BmPlQ_Vy.js} +109 -109
- package/dist/chunks/{index-ChUDGHsZ.js → index-C5wrl3dy.js} +6407 -6383
- package/dist/chunks/{notification-bell-C8JihZHy.js → notification-bell-C4cn4uYe.js} +3 -3
- package/dist/chunks/{notification-bell-kllqYdXT.js → notification-bell-sAl4kF0A.js} +1 -1
- package/dist/chunks/{resource-management-panel-BGVGuEZy.js → resource-management-panel-DNffk7G6.js} +1 -1
- package/dist/chunks/{resource-management-panel-ClnzFc75.js → resource-management-panel-DRpbtjWO.js} +3 -3
- package/dist/chunks/{use-role-aware-display-preferences-Bw9rS8Sp.js → use-role-aware-display-preferences-BIAB5o80.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-lnKfUpWU.js → use-role-aware-display-preferences-DEWoTnfO.js} +1 -1
- package/dist/chunks/{use-visual-utils-BwVEYBXj.js → use-visual-utils-BMqAflAg.js} +1 -1
- package/dist/chunks/{use-visual-utils-C7nybhkT.js → use-visual-utils-BfZLkFD4.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- 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/dashboard.d.ts +8 -0
- package/dist/types/main.d.ts +8 -0
- package/dist/types/surfboard.d.ts +8 -0
- package/dist/types/types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import oe, { useState as A, useRef as V, useCallback as F, useEffect as D, useContext as ie } from "react";
|
|
2
|
-
import { aT as O, l as B, ae as I, aQ as $, aM as se, aN as _, af as ae, aL as le, m as ce, n as de, o as ue, p as me, q as he, L as z, bF as pe, bK as fe, bL as j, G as ge, B as S, H, aI as L, aV as ve, u as E, aZ as be, aG as re, bM as xe, bN as q, I as T, Y as we, bO as Ce, c as U, b4 as G, b5 as X, b6 as W, b7 as Q, b8 as Y, aJ as Ne, bP as ye, bQ as Ae, bR as Se, bm as Ee, bn as De, bo as Ie, bS as ke, bp as Te, bq as Ue, br as Me, bs as Fe, bt as Le, a9 as Pe, W as Ve, bT as Re, bU as ze, aS as Oe, X as Be, bV as $e, bW as _e, bX as He, aO as Z, ah as je, P as qe, s as Ge, bY as Xe, t as We } from "./index-
|
|
2
|
+
import { aT as O, l as B, ae as I, aQ as $, aM as se, aN as _, af as ae, aL as le, m as ce, n as de, o as ue, p as me, q as he, L as z, bF as pe, bK as fe, bL as j, G as ge, B as S, H, aI as L, aV as ve, u as E, aZ as be, aG as re, bM as xe, bN as q, I as T, Y as we, bO as Ce, c as U, b4 as G, b5 as X, b6 as W, b7 as Q, b8 as Y, aJ as Ne, bP as ye, bQ as Ae, bR as Se, bm as Ee, bn as De, bo as Ie, bS as ke, bp as Te, bq as Ue, br as Me, bs as Fe, bt as Le, a9 as Pe, W as Ve, bT as Re, bU as ze, aS as Oe, X as Be, bV as $e, bW as _e, bX as He, aO as Z, ah as je, P as qe, s as Ge, bY as Xe, t as We } from "./index-C5wrl3dy.js";
|
|
3
3
|
import { jsx as t, jsxs as r, Fragment as P } from "react/jsx-runtime";
|
|
4
|
-
import { E as Qe, V as Ye, a as Ze, b as Je, S as J, c as Ke, C as et } from "./editor-action-buttons-
|
|
5
|
-
import { a as ne } from "./use-visual-utils-
|
|
4
|
+
import { E as Qe, V as Ye, a as Ze, b as Je, S as J, c as Ke, C as et } from "./editor-action-buttons-BvRPaQoF.js";
|
|
5
|
+
import { a as ne } from "./use-visual-utils-BMqAflAg.js";
|
|
6
6
|
import { c as K } from "./date-formatter-Y8Za1ib3.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const f=require("react"),t=require("./index-
|
|
1
|
+
"use strict";const f=require("react"),t=require("./index-BmPlQ_Vy.js"),e=require("react/jsx-runtime"),N=require("./editor-action-buttons-DRX64gHq.js"),T=require("./use-visual-utils-BfZLkFD4.js"),I=require("./date-formatter-Sz6QDaM8.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-BGVGuEZy.js → resource-management-panel-DNffk7G6.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-BmPlQ_Vy.js"),c=require("react"),de=require("./use-visual-utils-BfZLkFD4.js"),pe=require("./use-role-aware-display-preferences-DEWoTnfO.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-ClnzFc75.js → resource-management-panel-DRpbtjWO.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
-
import { aT as Ze, u as me, aI as Qe, aZ as re, b1 as Xe, b2 as $e, c as X, b3 as ke, b4 as et, b5 as tt, B as _, b6 as st, b7 as nt, b8 as K, b9 as pe, H as oe, ba as at, bb as it, bc as rt, bd as ve, be as De, bf as ot, bg as lt, W as dt, bh as ye, e as le, bi as Se, bj as Ee, bk as ct, a2 as Ve, _ as Le, bl as Ae, bm as Te, bn as Oe, bo as Re, bp as Pe, bq as Ue, br as Ie, bs as je, bt as Me, bu as ut, bv as ht, bw as Fe, bx as ze, by as Be, bz as mt, bA as He, bB as pt, Y as ae, l as ft, bC as _e, bD as gt, bE as Dt, m as xt, n as bt, o as Nt, p as wt, q as vt, L as Ce, bF as fe, G as Ct, bG as yt, bH as St, bI as Et, bJ as Vt } from "./index-
|
|
2
|
+
import { aT as Ze, u as me, aI as Qe, aZ as re, b1 as Xe, b2 as $e, c as X, b3 as ke, b4 as et, b5 as tt, B as _, b6 as st, b7 as nt, b8 as K, b9 as pe, H as oe, ba as at, bb as it, bc as rt, bd as ve, be as De, bf as ot, bg as lt, W as dt, bh as ye, e as le, bi as Se, bj as Ee, bk as ct, a2 as Ve, _ as Le, bl as Ae, bm as Te, bn as Oe, bo as Re, bp as Pe, bq as Ue, br as Ie, bs as je, bt as Me, bu as ut, bv as ht, bw as Fe, bx as ze, by as Be, bz as mt, bA as He, bB as pt, Y as ae, l as ft, bC as _e, bD as gt, bE as Dt, m as xt, n as bt, o as Nt, p as wt, q as vt, L as Ce, bF as fe, G as Ct, bG as yt, bH as St, bI as Et, bJ as Vt } from "./index-C5wrl3dy.js";
|
|
3
3
|
import Lt, { useRef as At, useEffect as ie, useState as x } from "react";
|
|
4
|
-
import { a as Ge } from "./use-visual-utils-
|
|
5
|
-
import { u as Tt } from "./use-role-aware-display-preferences-
|
|
4
|
+
import { a as Ge } from "./use-visual-utils-BMqAflAg.js";
|
|
5
|
+
import { u as Tt } from "./use-role-aware-display-preferences-BIAB5o80.js";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-react v0.453.0 - ISC
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as m, e as t, g as D, f as U, h as b, i as u, j as E, k as g } from "./index-
|
|
1
|
+
import { b as m, e as t, g as D, f as U, h as b, i as u, j as E, k as g } from "./index-C5wrl3dy.js";
|
|
2
2
|
import { useMemo as i } from "react";
|
|
3
3
|
function S() {
|
|
4
4
|
const { displayPreferences: n, shouldShowElement: c } = m(), { currentUser: a, userContext: s } = t(), r = i(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-BmPlQ_Vy.js"),n=require("react");function f(){const{displayPreferences:c,shouldShowElement:o}=a.useDisplayPreferences(),{currentUser:e,userContext:s}=a.useCurrentUserInfo(),i=n.useMemo(()=>a.getRoleBasedDisplayOverrides(e),[e]),t=n.useMemo(()=>r=>i&&i[r]!==void 0&&i[r]===!1?!1:o(r),[i,o,c]),p=n.useMemo(()=>{var r,d,l,u,h;return{canEdit:((r=s==null?void 0:s.permissions)==null?void 0:r.canEdit)??a.canUserEdit(e),canUseFilters:((d=s==null?void 0:s.permissions)==null?void 0:d.canEdit)??a.canUserUseFilters(e),canManageDashboards:((l=s==null?void 0:s.permissions)==null?void 0:l.canCreateDashboard)??a.canUserManageDashboards(e),canCreateDashboards:((u=s==null?void 0:s.permissions)==null?void 0:u.canCreateDashboard)??a.canUserCreateDashboards(e),canAccessVisuals:((h=s==null?void 0:s.permissions)==null?void 0:h.canEdit)??a.canUserAccessVisuals(e)}},[e,s]);return{displayPreferences:c,shouldShowElement:t,permissions:p,currentUser:e}}exports.useRoleAwareDisplayPreferences=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aY as z, l as Y, aU as J, aV as K, aZ as Z, aJ as _, aG as X, u as v, a_ as q, a$ as ee, I as V, b0 as te, aI as f } from "./index-
|
|
1
|
+
import { aY as z, l as Y, aU as J, aV as K, aZ as Z, aJ as _, aG as X, u as v, a_ as q, a$ as ee, I as V, b0 as te, aI as f } from "./index-C5wrl3dy.js";
|
|
2
2
|
import { useState as j, useEffect as re, useCallback as D } from "react";
|
|
3
3
|
function se(e) {
|
|
4
4
|
const o = e.toUpperCase().indexOf("WHERE"), t = e.toUpperCase().indexOf("GROUP BY"), r = e.toUpperCase().indexOf("LIMIT"), n = e.toUpperCase().indexOf("ORDER BY");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-BmPlQ_Vy.js"),g=require("react");function H(e){const a=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),c=e.toUpperCase().indexOf("ORDER BY");let d=e.length;if(c!==-1&&(d=c),r!==-1&&r<d&&(d=r),a!==-1){const i=e.substring(0,a),o=e.substring(a);return`${i} {{ filters | where }} AND ${o.substring(6)}`}else if(t!==-1){const i=e.substring(0,t),o=e.substring(t);return`${i} {{ filters | where }} ${o}`}else{const i=e.substring(0,d),o=e.substring(d);return console.log("beforeClause",i),console.log("afterClause",o),o?`${i} {{ filters | where }} ${o}`:`${i.replace(/;$/,"")} {{ filters | where }}`}}function L(e){const[a,t]=g.useState(null),[r,c]=g.useState(null),d=s.useEnsureReactGlobals();return g.useEffect(()=>{if(!e||e.trim()===""){t(null),c(null);return}if(!d)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),c(null)}catch(o){const l=o instanceof Error?o.message:"Unknown error";console.error("Failed to load remote chart store:",l),c(l),t(null)}})()},[e,d]),a}function Q(e,a){if(e.length===0)return"";if(a){const t=e.find(r=>r.id===a);if(t){const r=t.tabTitle;if(r=="All__Header")return e[0].id;if(r&&r.endsWith("__Header")){const d=r.split("__")[0],i=e.find(o=>o.tabTitle===d);return i?i.id:e[0].id}return a}}return e[0].id}const z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:a,...t}=e;return t};async function k(e,a,t,r){if(!a||!t)throw new Error("Missing auth token or visual ID");const c=["resource-by-id","visual",t],d=r.getQueryData(c);if(d)return console.log("Using cached visual data for:",t),{data:d,fromCache:!0};console.log("Fetching visual data from network for:",t);const i=s.ue.loading("Loading visual...",{position:"top-center"});try{const o=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${a}`}});if(!o.ok)throw new Error("Failed to load visual");const l=await o.json();return r.setQueryData(c,l),s.ue.dismiss(i),{data:l,fromCache:!1}}catch(o){throw s.ue.dismiss(i),o}}function P(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function G(e,a){var d,i;const t=(e==null?void 0:e.frameObject)??((d=e==null?void 0:e.visual)==null?void 0:d.frameObject);if(!t)return!1;const r=P(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const c=(i=r.cards)==null?void 0:i.find(o=>o.id===r.activeCardId);return c?(s.setupEditorWithCard({...a,frame:r,card:c,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function Y(){var C;const{setCardSql:e}=s.useEditorActions(),a=s.useEditorStore(n=>n.frame),t=s.useEditorStore(n=>n.card),r=s.useEditorStore(n=>n.isDevMode),c=L(((C=t.customCardPreferences)==null?void 0:C.url)||""),d=s.useEditorStore(n=>n.selectedSchemaName),i=s.useEditorStore(n=>n.selectedDatamodelId),o=s.useEditorStore(n=>n.selectedDatabaseName),l=s.useEditorStore(n=>n.selectedTableName),h=s.useEditorStore(n=>n.selectedConnectionId),m=s.useEditorStore(n=>n.isShowingVisual),p=t.sql;return{getUpdatedFrame:g.useCallback(()=>{var I;let n=p;p&&!p.includes("{{")&&(n=H(p),e(n));const w=(I=c==null?void 0:c.getState())==null?void 0:I.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:i,lastSelectedDatabase:o,lastSelectedTable:l,connectionId:h,sql:r?n:void 0,python:r?t.python:void 0,config:r?void 0:z(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...w&&{customCardPreferences:{...t.customCardPreferences,settings:w}}},E=a.cards.map(S=>S.id===t.id?v:S);return{...a,cards:E,activeCardId:Q(E,a.activeCardId)}},[t,a,r,m,d,i,o,l,h,e,c,p])}}function J(){const{authToken:e,tokenProps:a}=s.useSemaphorContext(),t=s.useQueryClient(),r=s.useSelectedVisual(),{selectVisual:c}=s.useManagementActions(),{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I}=s.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:V,setSelectedFrameId:$,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=s.useDashboardActions(),y=s.useDashboardStore(u=>u.selectedSheetId),O=s.useDashboardStore(u=>u.selectedFrameId),x=s.useDashboardStore(u=>u.dashboard),B=s.useDashboardStore(u=>u.filterValues),F=s.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),j=g.useCallback(async u=>{try{c(u),A();const{data:b,fromCache:f}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!G(b,{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I,setIsDashboardEditing:S,setIsVisualEditing:V,dashboard:x,selectedSheetId:y,selectedFrameId:O,filterValues:B}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:f}}catch(b){return console.error("Error editing visual:",b),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,d,i,S,V,o,l,h,m,p,D,C,n,w,v,E,I,A,x,y,O,B]),_=g.useCallback(async u=>{var b;try{if(c(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:T}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),W=(f==null?void 0:f.frameObject)??((b=f==null?void 0:f.visual)==null?void 0:b.frameObject);if(!W)return{success:!1,error:"Visual has no frame data"};const U=P(W);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const M={...s.cloneFrameWithNewIds(U),visualId:u.id};return N(y,M,"end"),S(!0),$(M.id),R(!1),{success:!0,fromCache:T}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,y,N,S,$,R]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:j,handleAddLibraryVisual:_,getUpdatedFrame:Y().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=L;exports.useVisualUtils=J;
|
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-BmPlQ_Vy.js"),o=require("../chunks/common-types-CfJLrTJd.js");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=o.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
package/dist/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-BmPlQ_Vy.js"),P=require("./chunks/common-types-CfJLrTJd.js"),v=require("./chunks/calendar-preferences-dialog-CMM-uye9.js"),o=require("react/jsx-runtime"),f=require("react"),A=require("./chunks/resource-management-panel-DNffk7G6.js"),N=require("./types/index.cjs");require("react-dom");const i=require("./chunks/notification-bell-sAl4kF0A.js");function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const x=j(f);function _(r){const{displayPreferences:t,...s}=r,l={...s,id:r.dashboardId};return o.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:o.jsxs(e.SemaphorContextProvider,{dashboardProps:l,children:[o.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),o.jsx(e.UXProvider,{children:o.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:o.jsx(e.Container,{type:"visual",...l,children:o.jsx(M,{cardId:r.cardId})})})})]})})}function M({cardId:r}){const t=e.useDashboardStore(n=>{var u;return(u=n.dashboard)==null?void 0:u.sheets}),{card:s,frame:l}=f.useMemo(()=>{const n=t==null?void 0:t.flatMap(a=>a.frames),u=n==null?void 0:n.flatMap(a=>a==null?void 0:a.cards),m=u==null?void 0:u.find(a=>(a==null?void 0:a.id)===r),E=n==null?void 0:n.find(a=>{var h;return(h=a==null?void 0:a.cards)==null?void 0:h.find(c=>(c==null?void 0:c.id)===r)});return{card:m,frame:E}},[t,r]);return!s||!l?o.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):o.jsx("main",{className:"flex h-full grow flex-col",children:o.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:u})=>o.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:o.jsx(e.DashboardCard,{card:s,frame:l})})})}function w({name:r,items:t,value:s,onChange:l,isLoading:n,isError:u,refetch:m,className:E,icon:a,showNone:h=!1}){const c=x.useRef(null),[D,g]=x.useState(!1),[T,b]=x.useState("100%"),C=h?[...t||[],{id:"none",name:"None"}]:t;x.useLayoutEffect(()=>{c.current&&b(c.current.offsetWidth)},[]);function S(){var d;return n?"Loading...":u?"Error":s?(d=t==null?void 0:t.find(p=>p.id===s))==null?void 0:d.name:`Select ${r}`}function y(d,p){l(p),g(!1)}return o.jsxs(e.Popover,{open:D,onOpenChange:g,children:[o.jsx(e.PopoverTrigger,{asChild:!0,children:o.jsxs(e.Button,{ref:c,variant:"outline",role:"combobox","aria-expanded":D,className:e.cn("flex h-9 w-full justify-between",E),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("div",{className:"mr-2",children:a}),o.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:S()})]}),o.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),o.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:T},children:o.jsxs(e.Command,{children:[o.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[o.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),o.jsx(e.IconButton,{className:"h-7",onClick:m,children:o.jsx(i.RefreshCw,{className:e.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),o.jsxs(e.CommandList,{children:[o.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),o.jsx(e.CommandGroup,{children:C==null?void 0:C.map(d=>o.jsx(e.CommandItem,{className:"overflow-x-auto",value:d.name,onSelect:p=>y(p,d.id),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(e.Check,{className:e.cn("size-4",s===d.id?"opacity-100":"opacity-0")}),o.jsx("div",{title:d.name,children:d.name})]})},d.id))})]})]})})]})}function I(r,t){f.useEffect(()=>(r&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,t])}exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;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.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;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.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.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useActiveExports=e.useActiveExports;exports.useCard=e.useCard;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.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.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=P.EMPTY_SELECTION;exports.CalendarPreferencesDialog=v.CalendarPreferencesDialog;exports.ResourceManagementPanel=A.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=N.DEFAULT_CALENDAR_CONTEXT;exports.AdvancedModeToggle=i.AdvancedModeToggle;exports.ExportNotificationItem=i.ExportNotificationItem;exports.ExportNotificationList=i.ExportNotificationList;exports.NotificationBell=i.NotificationBell;exports.ScheduleDashboard=i.ScheduleDashboard;exports.UnsavedChangesAlert=i.UnsavedChangesAlert;exports.VisualEditingControls=i.VisualEditingControls;exports.useExportPolling=i.useExportPolling;exports.useExportRecovery=i.useExportRecovery;exports.usePristineSnapshotInitializer=i.usePristineSnapshotInitializer;exports.Combobox=w;exports.Visual=_;exports.useExposePrintState=I;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { J as T, K as S, S as P, M as _, U as A, N as w, O as M, u as I, Q as D, T as R, P as F, s as L, B as k, c as E, V as O, t as B, v as U, w as V, W as z, x as H, y as Q, z as W, A as j, E as q } from "./chunks/index-
|
|
2
|
-
import { ai as ia, aj as la, D as da, ac as ca, a6 as ua, aP as pa, an as ma, _ as ha, a1 as fa, a1 as Ca, a2 as Ea, a as xa, aO as ga, a9 as Da, aH as Ta, aK as ba, au as va, ab as ya, a7 as Na, a8 as Sa, ao as Pa, aS as _a, aw as Aa, aN as wa, aM as Ma, aL as Ia, av as Ra, az as Fa, aA as La, at as ka, aa as Oa, as as Ba, al as Ua, am as Va, ak as za, ax as Ha, ar as Qa, aR as Wa, aQ as ja, aq as qa, ap as Ga, aB as Ka, ay as Ya, ag as $a, a5 as Ja, aD as Xa, aF as Za, aE as ae, aG as ee, a4 as se, Z as oe, ad as re, $ as te, aJ as ne, aC as ie, aI as le, af as de, ae as ce, ah as ue, Y as pe, a3 as me, a0 as he } from "./chunks/index-
|
|
1
|
+
import { J as T, K as S, S as P, M as _, U as A, N as w, O as M, u as I, Q as D, T as R, P as F, s as L, B as k, c as E, V as O, t as B, v as U, w as V, W as z, x as H, y as Q, z as W, A as j, E as q } from "./chunks/index-C5wrl3dy.js";
|
|
2
|
+
import { ai as ia, aj as la, D as da, ac as ca, a6 as ua, aP as pa, an as ma, _ as ha, a1 as fa, a1 as Ca, a2 as Ea, a as xa, aO as ga, a9 as Da, aH as Ta, aK as ba, au as va, ab as ya, a7 as Na, a8 as Sa, ao as Pa, aS as _a, aw as Aa, aN as wa, aM as Ma, aL as Ia, av as Ra, az as Fa, aA as La, at as ka, aa as Oa, as as Ba, al as Ua, am as Va, ak as za, ax as Ha, ar as Qa, aR as Wa, aQ as ja, aq as qa, ap as Ga, aB as Ka, ay as Ya, ag as $a, a5 as Ja, aD as Xa, aF as Za, aE as ae, aG as ee, a4 as se, Z as oe, ad as re, $ as te, aJ as ne, aC as ie, aI as le, af as de, ae as ce, ah as ue, Y as pe, a3 as me, a0 as he } from "./chunks/index-C5wrl3dy.js";
|
|
3
3
|
import { E as Ce } from "./chunks/common-types-DhqlRVrq.js";
|
|
4
|
-
import { C as xe } from "./chunks/calendar-preferences-dialog-
|
|
4
|
+
import { C as xe } from "./chunks/calendar-preferences-dialog-wu_fGBRY.js";
|
|
5
5
|
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
import * as m from "react";
|
|
7
7
|
import { useMemo as G, useEffect as K } from "react";
|
|
8
|
-
import { ResourceManagementPanel as De } from "./chunks/resource-management-panel-
|
|
8
|
+
import { ResourceManagementPanel as De } from "./chunks/resource-management-panel-DRpbtjWO.js";
|
|
9
9
|
import { DEFAULT_CALENDAR_CONTEXT as be } from "./types/index.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import { R as Y } from "./chunks/notification-bell-
|
|
12
|
-
import { A as ye, a as Ne, E as Se, N as Pe, S as _e, U as Ae, V as we, u as Me, b as Ie, c as Re } from "./chunks/notification-bell-
|
|
11
|
+
import { R as Y } from "./chunks/notification-bell-C4cn4uYe.js";
|
|
12
|
+
import { A as ye, a as Ne, E as Se, N as Pe, S as _e, U as Ae, V as we, u as Me, b as Ie, c as Re } from "./chunks/notification-bell-C4cn4uYe.js";
|
|
13
13
|
function sa(e) {
|
|
14
14
|
const { displayPreferences: s, ...l } = e, d = {
|
|
15
15
|
...l,
|
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-BmPlQ_Vy.js"),r=require("../chunks/common-types-CfJLrTJd.js"),a=require("../chunks/calendar-preferences-dialog-CMM-uye9.js");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e } from "../chunks/index-
|
|
1
|
+
import { a as e } from "../chunks/index-C5wrl3dy.js";
|
|
2
2
|
import { E as f } from "../chunks/common-types-DhqlRVrq.js";
|
|
3
|
-
import { C as E } from "../chunks/calendar-preferences-dialog-
|
|
3
|
+
import { C as E } from "../chunks/calendar-preferences-dialog-wu_fGBRY.js";
|
|
4
4
|
export {
|
|
5
5
|
E as CalendarPreferencesDialog,
|
|
6
6
|
f as EMPTY_SELECTION,
|
|
@@ -424,6 +424,14 @@ declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
|
|
|
424
424
|
role: 'detail';
|
|
425
425
|
dateFormat?: DateFormatValue;
|
|
426
426
|
customFormat?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Optional SQL expression for calculated detail fields.
|
|
429
|
+
*/
|
|
430
|
+
expression?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Formula metadata for calculated fields (used for token qualification).
|
|
433
|
+
*/
|
|
434
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
427
435
|
}
|
|
428
436
|
|
|
429
437
|
declare interface DetailTableBackupConfig {
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1021,6 +1021,14 @@ export declare interface DetailField extends Omit<Field, 'role' | 'granularity'>
|
|
|
1021
1021
|
role: 'detail';
|
|
1022
1022
|
dateFormat?: DateFormatValue;
|
|
1023
1023
|
customFormat?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Optional SQL expression for calculated detail fields.
|
|
1026
|
+
*/
|
|
1027
|
+
expression?: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* Formula metadata for calculated fields (used for token qualification).
|
|
1030
|
+
*/
|
|
1031
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
1024
1032
|
}
|
|
1025
1033
|
|
|
1026
1034
|
export declare interface DetailTableBackupConfig {
|
|
@@ -434,6 +434,14 @@ declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
|
|
|
434
434
|
role: 'detail';
|
|
435
435
|
dateFormat?: DateFormatValue;
|
|
436
436
|
customFormat?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Optional SQL expression for calculated detail fields.
|
|
439
|
+
*/
|
|
440
|
+
expression?: string;
|
|
441
|
+
/**
|
|
442
|
+
* Formula metadata for calculated fields (used for token qualification).
|
|
443
|
+
*/
|
|
444
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
437
445
|
}
|
|
438
446
|
|
|
439
447
|
declare interface DetailTableBackupConfig {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -456,6 +456,14 @@ declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
|
|
|
456
456
|
role: 'detail';
|
|
457
457
|
dateFormat?: DateFormatValue;
|
|
458
458
|
customFormat?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Optional SQL expression for calculated detail fields.
|
|
461
|
+
*/
|
|
462
|
+
expression?: string;
|
|
463
|
+
/**
|
|
464
|
+
* Formula metadata for calculated fields (used for token qualification).
|
|
465
|
+
*/
|
|
466
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
459
467
|
}
|
|
460
468
|
|
|
461
469
|
declare interface DetailTableBackupConfig {
|