react-semaphor 0.1.62 → 0.1.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/chunks/dashboard-plus-BT1JEFt7.js +17438 -0
  2. package/dist/chunks/dashboard-plus-C7mXurPl.js +235 -0
  3. package/dist/chunks/index-DHzLB6Yx.js +1045 -0
  4. package/dist/chunks/{index--MUeDITx.js → index-Dji-XteI.js} +25747 -28323
  5. package/dist/dashboard/index.cjs +1 -1
  6. package/dist/dashboard/index.js +1 -1
  7. package/dist/index.cjs +2 -2
  8. package/dist/index.js +106 -107
  9. package/dist/style.css +1 -1
  10. package/dist/surfboard/index.cjs +1 -1
  11. package/dist/surfboard/index.js +1 -1
  12. package/dist/types/main.d.ts +0 -8
  13. package/package.json +1 -1
  14. package/dist/chunks/axis-mapping-8ZVwlkl6.js +0 -315
  15. package/dist/chunks/axis-mapping-Cwa3KrDR.js +0 -16
  16. package/dist/chunks/bar-chart-settings-B_WyC-7g.js +0 -52
  17. package/dist/chunks/bar-chart-settings-CvorW7RD.js +0 -1
  18. package/dist/chunks/bubble-chart-settings-BPtESqYK.js +0 -1
  19. package/dist/chunks/bubble-chart-settings-CxFAlErV.js +0 -50
  20. package/dist/chunks/common-chart-settings-CvRrQf-H.js +0 -1
  21. package/dist/chunks/common-chart-settings-D3ww0Xtx.js +0 -147
  22. package/dist/chunks/custom-visual-settings-DXWyN2Dr.js +0 -11
  23. package/dist/chunks/custom-visual-settings-m5o8R5tL.js +0 -243
  24. package/dist/chunks/dashboard-plus-B8-ocT_Z.js +0 -41
  25. package/dist/chunks/dashboard-plus-DSUKhvcv.js +0 -2941
  26. package/dist/chunks/display-labels-BYsRReye.js +0 -1
  27. package/dist/chunks/display-labels-C_jsL0Jo.js +0 -74
  28. package/dist/chunks/editor-C7xQi9Ab.js +0 -105
  29. package/dist/chunks/editor-DqvyBUrl.js +0 -8321
  30. package/dist/chunks/filter-on-click-columns-6dRYhvgz.js +0 -1
  31. package/dist/chunks/filter-on-click-columns-BJUGTE6W.js +0 -120
  32. package/dist/chunks/frame-filters-D9sDN4Vm.js +0 -1
  33. package/dist/chunks/frame-filters-DFgqSoV2.js +0 -75
  34. package/dist/chunks/index-Bvtpj-_R.js +0 -1080
  35. package/dist/chunks/kpi-settings-BONvmfNr.js +0 -1
  36. package/dist/chunks/kpi-settings-CI-9fp4Z.js +0 -286
  37. package/dist/chunks/map-chart-settings-CSxZdu_g.js +0 -1
  38. package/dist/chunks/map-chart-settings-DQIN7Pn8.js +0 -334
  39. package/dist/chunks/pie-chart-settings-CN3JCLdP.js +0 -86
  40. package/dist/chunks/pie-chart-settings-CsErfZOL.js +0 -1
  41. package/dist/chunks/reusable-select-CQbD03nT.js +0 -40
  42. package/dist/chunks/reusable-select-CVRzPWkg.js +0 -1
  43. package/dist/chunks/stacked-chart-settings-BfqHFFqA.js +0 -1
  44. package/dist/chunks/stacked-chart-settings-poYotO6Q.js +0 -90
  45. package/dist/chunks/table-visual-settings-B46pdUra.js +0 -46
  46. package/dist/chunks/table-visual-settings-ZKWuNokZ.js +0 -1
  47. package/dist/chunks/tag-BrxBSbSe.js +0 -20
  48. package/dist/chunks/tag-D9G2kz2B.js +0 -6
  49. package/dist/chunks/use-assign-filter-5gplfsO1.js +0 -83
  50. package/dist/chunks/use-assign-filter-DzmBSsyO.js +0 -1
  51. package/dist/chunks/use-local-storage-state-CBh2HHB9.js +0 -16
  52. package/dist/chunks/use-local-storage-state-CL0JsTZM.js +0 -1745
  53. package/dist/chunks/use-plugin-query-DA6Yrp7P.js +0 -12
  54. package/dist/chunks/use-plugin-query-JdHNPYZS.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-Bvtpj-_R.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DHzLB6Yx.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index--MUeDITx.js";
1
+ import { D as a } from "../chunks/index-Dji-XteI.js";
2
2
  import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-Bvtpj-_R.js"),v=require("./types/index.cjs"),u=require("./chunks/dashboard-plus-B8-ocT_Z.js"),a=require("react/jsx-runtime"),x=require("react");require("react-dom");function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const p=j(x);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DHzLB6Yx.js"),v=require("./types/index.cjs"),c=require("./chunks/dashboard-plus-C7mXurPl.js"),a=require("react/jsx-runtime"),x=require("react");require("react-dom");function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const p=j(x);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const E=e.createLucideIcon("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function N(r){const{displayPreferences:t,...s}=r,i={...s,id:r.dashboardId};return a.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:a.jsx(e.SemaphorContextProvider,{dashboardProps:i,children:a.jsx(e.UXProvider,{children:a.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:a.jsx(e.Container,{type:"visual",...i,children:a.jsx(P,{cardId:r.cardId})})})})})})}function P({cardId:r}){const t=e.useDashboardStore(n=>{var l;return(l=n.dashboard)==null?void 0:l.sheets}),{card:s,frame:i}=x.useMemo(()=>{const n=t==null?void 0:t.flatMap(o=>o.frames),l=n==null?void 0:n.flatMap(o=>o==null?void 0:o.cards),f=l==null?void 0:l.find(o=>(o==null?void 0:o.id)===r),C=n==null?void 0:n.find(o=>{var h;return(h=o==null?void 0:o.cards)==null?void 0:h.find(c=>(c==null?void 0:c.id)===r)});return{card:f,frame:C}},[t,r]);return!s||!i?a.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):a.jsx("main",{className:"flex h-full grow flex-col",children:a.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:l})=>a.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:l,customerFacingMessage:"Error creating visual. Please try again."}),children:a.jsx(e.DashboardCard,{card:s,frame:i})})})}const A=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var b=(r=>(r.SUBTOTAL="__SUBTOTAL__",r.TOTAL="__TOTAL__",r.ALL="__ALL__",r))(b||{});function _({name:r,items:t,value:s,onChange:i,isLoading:n,isError:l,refetch:f,className:C,icon:o,showNone:h=!1}){const c=p.useRef(null),[m,M]=p.useState(!1),[g,y]=p.useState("100%"),D=h?[...t||[],{id:"none",name:"None"}]:t;p.useLayoutEffect(()=>{c.current&&y(c.current.offsetWidth)},[]);function T(){var d;return n?"Loading...":l?"Error":s?(d=t==null?void 0:t.find(Y=>Y.id===s))==null?void 0:d.name:`Select ${r}`}function S(d,Y){i(Y),M(!1)}return a.jsxs(e.Popover,{open:m,onOpenChange:M,children:[a.jsx(e.PopoverTrigger,{asChild:!0,children:a.jsxs(e.Button,{ref:c,variant:"outline",role:"combobox","aria-expanded":m,className:e.cn("flex h-9 w-full justify-between",C),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[o&&a.jsx("div",{className:"mr-2",children:o}),a.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:T()})]}),a.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),a.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:g},children:a.jsxs(e.Command,{children:[a.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[a.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),a.jsx(e.IconButton,{className:"h-7",onClick:f,children:a.jsx(E,{className:e.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),a.jsxs(e.CommandList,{children:[a.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),a.jsx(e.CommandGroup,{children:D==null?void 0:D.map(d=>a.jsx(e.CommandItem,{className:"overflow-x-auto",value:d.name,onSelect:Y=>S(Y,d.id),children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(e.Check,{className:e.cn("size-4",s===d.id?"opacity-100":"opacity-0")}),a.jsx("div",{title:d.name,children:d.name})]})},d.id))})]})]})})]})}exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;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.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;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.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=v.EMPTY_SELECTION;exports.AdvancedModeToggle=u.AdvancedModeToggle;exports.ResourceManagementPanel=u.ResourceManagementPanel;exports.ScheduleDashboard=u.ScheduleDashboard;exports.Surfboard=u.DashboardPlus;exports.VisualBadge=u.VisualBadge;exports.VisualEditingControls=u.VisualEditingControls;exports.cleanCard=u.cleanCard;exports.getDashbaordStateWithoutData=u.getDashbaordStateWithoutData;exports.Combobox=_;exports.DATE_FORMAT_VALUES=A;exports.PivotMarkerEnum=b;exports.Visual=N;
6
+ */const E=e.createLucideIcon("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function N(r){const{displayPreferences:t,...s}=r,i={...s,id:r.dashboardId};return a.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:a.jsx(e.SemaphorContextProvider,{dashboardProps:i,children:a.jsx(e.UXProvider,{children:a.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:a.jsx(e.Container,{type:"visual",...i,children:a.jsx(P,{cardId:r.cardId})})})})})})}function P({cardId:r}){const t=e.useDashboardStore(n=>{var l;return(l=n.dashboard)==null?void 0:l.sheets}),{card:s,frame:i}=x.useMemo(()=>{const n=t==null?void 0:t.flatMap(o=>o.frames),l=n==null?void 0:n.flatMap(o=>o==null?void 0:o.cards),f=l==null?void 0:l.find(o=>(o==null?void 0:o.id)===r),C=n==null?void 0:n.find(o=>{var h;return(h=o==null?void 0:o.cards)==null?void 0:h.find(u=>(u==null?void 0:u.id)===r)});return{card:f,frame:C}},[t,r]);return!s||!i?a.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):a.jsx("main",{className:"flex h-full grow flex-col",children:a.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:l})=>a.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:l,customerFacingMessage:"Error creating visual. Please try again."}),children:a.jsx(e.DashboardCard,{card:s,frame:i})})})}const A=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var b=(r=>(r.SUBTOTAL="__SUBTOTAL__",r.TOTAL="__TOTAL__",r.ALL="__ALL__",r))(b||{});function _({name:r,items:t,value:s,onChange:i,isLoading:n,isError:l,refetch:f,className:C,icon:o,showNone:h=!1}){const u=p.useRef(null),[m,M]=p.useState(!1),[g,y]=p.useState("100%"),D=h?[...t||[],{id:"none",name:"None"}]:t;p.useLayoutEffect(()=>{u.current&&y(u.current.offsetWidth)},[]);function T(){var d;return n?"Loading...":l?"Error":s?(d=t==null?void 0:t.find(Y=>Y.id===s))==null?void 0:d.name:`Select ${r}`}function S(d,Y){i(Y),M(!1)}return a.jsxs(e.Popover,{open:m,onOpenChange:M,children:[a.jsx(e.PopoverTrigger,{asChild:!0,children:a.jsxs(e.Button,{ref:u,variant:"outline",role:"combobox","aria-expanded":m,className:e.cn("flex h-9 w-full justify-between",C),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[o&&a.jsx("div",{className:"mr-2",children:o}),a.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:T()})]}),a.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),a.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:g},children:a.jsxs(e.Command,{children:[a.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[a.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),a.jsx(e.IconButton,{className:"h-7",onClick:f,children:a.jsx(E,{className:e.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),a.jsxs(e.CommandList,{children:[a.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),a.jsx(e.CommandGroup,{children:D==null?void 0:D.map(d=>a.jsx(e.CommandItem,{className:"overflow-x-auto",value:d.name,onSelect:Y=>S(Y,d.id),children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(e.Check,{className:e.cn("size-4",s===d.id?"opacity-100":"opacity-0")}),a.jsx("div",{title:d.name,children:d.name})]})},d.id))})]})]})})]})}exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;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.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;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.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=v.EMPTY_SELECTION;exports.AdvancedModeToggle=c.AdvancedModeToggle;exports.ResourceManagementPanel=c.ResourceManagementPanel;exports.ScheduleDashboard=c.ScheduleDashboard;exports.Surfboard=c.DashboardPlus;exports.VisualEditingControls=c.VisualEditingControls;exports.cleanCard=c.cleanCard;exports.getDashbaordStateWithoutData=c.getDashbaordStateWithoutData;exports.Combobox=_;exports.DATE_FORMAT_VALUES=A;exports.PivotMarkerEnum=b;exports.Visual=N;
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { E as S, a7 as v, a8 as N, a9 as w, aa as A, ab as E, ac as L, e as P, ad as g, ae as _, P as k, g as B, B as F, q as M, af as W, i as R, j as V, k as O, ag as Q, l as j, m as q, n as I, o as G, ah as H } from "./chunks/index--MUeDITx.js";
2
- import { D as na, ao as ia, ai as da, al as la, al as ca, am as Ya, aH as ua, ax as ha, aq as fa, H as pa, az as ma, ay as Ma, aC as Da, J as Ca, aw as ga, ap as va, av as ya, aA as ba, au as Ta, at as xa, as as Sa, aD as Na, aB as wa, an as Aa, aE as Ea, aG as La, aF as Pa, G as _a, ar as ka, aj as Ba, d as Fa, f as Wa, u as Ra, ak as Va } from "./chunks/index--MUeDITx.js";
3
- import { EMPTY_SELECTION as Qa } from "./types/index.js";
4
- import { A as qa, R as Ia, S as Ga, D as Ha, a as za, V as Ua, c as $a, g as Ja } from "./chunks/dashboard-plus-DSUKhvcv.js";
5
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { c as x, E as y, F as N, S as w, U as A, a as L, C as _, u as E, b as v, d as P, P as k, e as W, B as F, f as M, g as R, h as O, i as Q, j as V, I as B, k as I, l as j, m as q, n as U, o as z } from "./chunks/index-Dji-XteI.js";
2
+ import { D as ne, v as ie, R as de, r as le, r as ce, s as Ye, a0 as ue, L as he, x as pe, z as fe, N as me, M as Me, T as Ce, V as De, K as ve, w as ye, J as ge, O as be, H as Te, G as Se, A as xe, W as Ne, Q as we, t as Ae, Y as Le, _ as _e, Z as Ee, $ as Pe, y as ke, p as We, a2 as Fe, X as Re, a1 as Oe, q as Qe } from "./chunks/index-Dji-XteI.js";
3
+ import { EMPTY_SELECTION as Be } from "./types/index.js";
4
+ import { A as je, R as qe, S as Ue, D as ze, V as Ge, c as He, g as $e } from "./chunks/dashboard-plus-BT1JEFt7.js";
5
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
6
6
  import * as h from "react";
7
- import { useMemo as z } from "react";
7
+ import { useMemo as G } from "react";
8
8
  import "react-dom";
9
9
  /**
10
10
  * @license lucide-react v0.453.0 - ISC
@@ -12,60 +12,60 @@ import "react-dom";
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
14
  */
15
- const U = S("RefreshCw", [
15
+ const H = x("RefreshCw", [
16
16
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
17
17
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
18
18
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
19
19
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
20
20
  ]);
21
- function ea(e) {
22
- const { displayPreferences: o, ...i } = e, l = {
21
+ function ae(a) {
22
+ const { displayPreferences: o, ...i } = a, l = {
23
23
  ...i,
24
- id: e.dashboardId
24
+ id: a.dashboardId
25
25
  // override the id to the dashboard id so that the dashboard is not loaded
26
26
  };
27
- return /* @__PURE__ */ a(v, { FallbackComponent: N, children: /* @__PURE__ */ a(w, { dashboardProps: l, children: /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(E, { displayPreferences: o, children: /* @__PURE__ */ a(L, { type: "visual", ...l, children: /* @__PURE__ */ a($, { cardId: e.cardId }) }) }) }) }) });
27
+ return /* @__PURE__ */ e(y, { FallbackComponent: N, children: /* @__PURE__ */ e(w, { dashboardProps: l, children: /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(L, { displayPreferences: o, children: /* @__PURE__ */ e(_, { type: "visual", ...l, children: /* @__PURE__ */ e($, { cardId: a.cardId }) }) }) }) }) });
28
28
  }
29
- function $({ cardId: e }) {
30
- const o = P((r) => {
29
+ function $({ cardId: a }) {
30
+ const o = E((r) => {
31
31
  var t;
32
32
  return (t = r.dashboard) == null ? void 0 : t.sheets;
33
- }), { card: i, frame: l } = z(() => {
34
- const r = o == null ? void 0 : o.flatMap((s) => s.frames), t = r == null ? void 0 : r.flatMap((s) => s == null ? void 0 : s.cards), f = t == null ? void 0 : t.find((s) => (s == null ? void 0 : s.id) === e), p = r == null ? void 0 : r.find(
33
+ }), { card: i, frame: l } = G(() => {
34
+ const r = o == null ? void 0 : o.flatMap((s) => s.frames), t = r == null ? void 0 : r.flatMap((s) => s == null ? void 0 : s.cards), p = t == null ? void 0 : t.find((s) => (s == null ? void 0 : s.id) === a), f = r == null ? void 0 : r.find(
35
35
  (s) => {
36
36
  var u;
37
- return (u = s == null ? void 0 : s.cards) == null ? void 0 : u.find((c) => (c == null ? void 0 : c.id) === e);
37
+ return (u = s == null ? void 0 : s.cards) == null ? void 0 : u.find((c) => (c == null ? void 0 : c.id) === a);
38
38
  }
39
39
  );
40
- return { card: f, frame: p };
41
- }, [o, e]);
42
- return !i || !l ? /* @__PURE__ */ a(
43
- g,
40
+ return { card: p, frame: f };
41
+ }, [o, a]);
42
+ return !i || !l ? /* @__PURE__ */ e(
43
+ v,
44
44
  {
45
45
  error: new Error("Card not found"),
46
46
  resetErrorBoundary: () => {
47
47
  },
48
- customerFacingMessage: `Card not found with ID: ${e}`
48
+ customerFacingMessage: `Card not found with ID: ${a}`
49
49
  }
50
- ) : /* @__PURE__ */ a("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ a(
51
- v,
50
+ ) : /* @__PURE__ */ e("main", { className: "flex h-full grow flex-col", children: /* @__PURE__ */ e(
51
+ y,
52
52
  {
53
53
  FallbackComponent: ({
54
54
  error: r,
55
55
  resetErrorBoundary: t
56
- }) => /* @__PURE__ */ a(
57
- g,
56
+ }) => /* @__PURE__ */ e(
57
+ v,
58
58
  {
59
59
  error: r,
60
60
  resetErrorBoundary: t,
61
61
  customerFacingMessage: "Error creating visual. Please try again."
62
62
  }
63
63
  ),
64
- children: /* @__PURE__ */ a(_, { card: i, frame: l })
64
+ children: /* @__PURE__ */ e(P, { card: i, frame: l })
65
65
  }
66
66
  ) });
67
67
  }
68
- const sa = [
68
+ const se = [
69
69
  // Day granularity formats
70
70
  "MM-DD-YYYY",
71
71
  "YYYY-MM-DD",
@@ -96,58 +96,58 @@ const sa = [
96
96
  // Custom format
97
97
  "custom"
98
98
  ];
99
- var J = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(J || {});
100
- function ra({
101
- name: e,
99
+ var K = /* @__PURE__ */ ((a) => (a.SUBTOTAL = "__SUBTOTAL__", a.TOTAL = "__TOTAL__", a.ALL = "__ALL__", a))(K || {});
100
+ function re({
101
+ name: a,
102
102
  items: o,
103
103
  value: i,
104
104
  onChange: l,
105
105
  isLoading: r,
106
106
  isError: t,
107
- refetch: f,
108
- className: p,
107
+ refetch: p,
108
+ className: f,
109
109
  icon: s,
110
110
  showNone: u = !1
111
111
  }) {
112
- const c = h.useRef(null), [D, C] = h.useState(!1), [y, b] = h.useState("100%"), m = u ? [...o || [], { id: "none", name: "None" }] : o;
112
+ const c = h.useRef(null), [C, D] = h.useState(!1), [g, b] = h.useState("100%"), m = u ? [...o || [], { id: "none", name: "None" }] : o;
113
113
  h.useLayoutEffect(() => {
114
114
  c.current && b(c.current.offsetWidth);
115
115
  }, []);
116
116
  function T() {
117
117
  var n;
118
- return r ? "Loading..." : t ? "Error" : i ? (n = o == null ? void 0 : o.find((Y) => Y.id === i)) == null ? void 0 : n.name : `Select ${e}`;
118
+ return r ? "Loading..." : t ? "Error" : i ? (n = o == null ? void 0 : o.find((Y) => Y.id === i)) == null ? void 0 : n.name : `Select ${a}`;
119
119
  }
120
- function x(n, Y) {
121
- l(Y), C(!1);
120
+ function S(n, Y) {
121
+ l(Y), D(!1);
122
122
  }
123
- return /* @__PURE__ */ d(k, { open: D, onOpenChange: C, children: [
124
- /* @__PURE__ */ a(B, { asChild: !0, children: /* @__PURE__ */ d(
123
+ return /* @__PURE__ */ d(k, { open: C, onOpenChange: D, children: [
124
+ /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ d(
125
125
  F,
126
126
  {
127
127
  ref: c,
128
128
  variant: "outline",
129
129
  role: "combobox",
130
- "aria-expanded": D,
131
- className: M("flex h-9 w-full justify-between", p),
130
+ "aria-expanded": C,
131
+ className: M("flex h-9 w-full justify-between", f),
132
132
  children: [
133
133
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
134
- s && /* @__PURE__ */ a("div", { className: "mr-2", children: s }),
135
- /* @__PURE__ */ a("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: T() })
134
+ s && /* @__PURE__ */ e("div", { className: "mr-2", children: s }),
135
+ /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: T() })
136
136
  ] }),
137
- /* @__PURE__ */ a(W, { className: "size-4 opacity-50" })
137
+ /* @__PURE__ */ e(R, { className: "size-4 opacity-50" })
138
138
  ]
139
139
  }
140
140
  ) }),
141
- /* @__PURE__ */ a(
142
- R,
141
+ /* @__PURE__ */ e(
142
+ O,
143
143
  {
144
144
  className: "w-full p-0",
145
- style: { minWidth: y },
146
- children: /* @__PURE__ */ d(V, { children: [
145
+ style: { minWidth: g },
146
+ children: /* @__PURE__ */ d(Q, { children: [
147
147
  /* @__PURE__ */ d("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
148
- /* @__PURE__ */ a(O, { className: "h-9", placeholder: "Search..." }),
149
- /* @__PURE__ */ a(Q, { className: "h-7", onClick: f, children: /* @__PURE__ */ a(
150
- U,
148
+ /* @__PURE__ */ e(V, { className: "h-9", placeholder: "Search..." }),
149
+ /* @__PURE__ */ e(B, { className: "h-7", onClick: p, children: /* @__PURE__ */ e(
150
+ H,
151
151
  {
152
152
  className: M(
153
153
  "size-3.5 opacity-50",
@@ -156,21 +156,21 @@ function ra({
156
156
  }
157
157
  ) })
158
158
  ] }),
159
- /* @__PURE__ */ d(j, { children: [
160
- /* @__PURE__ */ d(q, { children: [
159
+ /* @__PURE__ */ d(I, { children: [
160
+ /* @__PURE__ */ d(j, { children: [
161
161
  "No ",
162
- e == null ? void 0 : e.toLowerCase(),
162
+ a == null ? void 0 : a.toLowerCase(),
163
163
  " found."
164
164
  ] }),
165
- /* @__PURE__ */ a(I, { children: m == null ? void 0 : m.map((n) => /* @__PURE__ */ a(
166
- G,
165
+ /* @__PURE__ */ e(q, { children: m == null ? void 0 : m.map((n) => /* @__PURE__ */ e(
166
+ U,
167
167
  {
168
168
  className: "overflow-x-auto",
169
169
  value: n.name,
170
- onSelect: (Y) => x(Y, n.id),
170
+ onSelect: (Y) => S(Y, n.id),
171
171
  children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
172
- /* @__PURE__ */ a(
173
- H,
172
+ /* @__PURE__ */ e(
173
+ z,
174
174
  {
175
175
  className: M(
176
176
  "size-4",
@@ -178,7 +178,7 @@ function ra({
178
178
  )
179
179
  }
180
180
  ),
181
- /* @__PURE__ */ a("div", { title: n.name, children: n.name })
181
+ /* @__PURE__ */ e("div", { title: n.name, children: n.name })
182
182
  ] })
183
183
  },
184
184
  n.id
@@ -190,53 +190,52 @@ function ra({
190
190
  ] });
191
191
  }
192
192
  export {
193
- qa as AdvancedModeToggle,
194
- ra as Combobox,
195
- sa as DATE_FORMAT_VALUES,
196
- na as Dashboard,
197
- ia as DashboardWC,
198
- Qa as EMPTY_SELECTION,
199
- J as PivotMarkerEnum,
200
- Ia as ResourceManagementPanel,
201
- da as ResourceType,
202
- Ga as ScheduleDashboard,
193
+ je as AdvancedModeToggle,
194
+ re as Combobox,
195
+ se as DATE_FORMAT_VALUES,
196
+ ne as Dashboard,
197
+ ie as DashboardWC,
198
+ Be as EMPTY_SELECTION,
199
+ K as PivotMarkerEnum,
200
+ qe as ResourceManagementPanel,
201
+ de as ResourceType,
202
+ Ue as ScheduleDashboard,
203
203
  w as SemaphorContextProvider,
204
- la as SemaphorDataProvider,
205
- ca as SemaphorQueryClient,
206
- Ya as ShareDialog,
207
- Ha as Surfboard,
208
- ea as Visual,
209
- za as VisualBadge,
210
- Ua as VisualEditingControls,
211
- $a as cleanCard,
212
- ua as createEmptyKpiConfig,
213
- ha as createSqlGenConfig,
214
- fa as downloadPdf,
215
- pa as fmt,
216
- ma as getColumnDataType,
217
- Ja as getDashbaordStateWithoutData,
218
- Ma as getFilterValueType,
219
- Da as getFormattedTableNameForQuery,
220
- Ca as getQualifiedTableName,
221
- ga as getSql,
222
- va as invalidateToken,
223
- ya as isBooleanDataType,
224
- ba as isColumnInSqlGen,
225
- Ta as isDateDataType,
226
- xa as isNumberDataType,
227
- Sa as isTextDataType,
228
- Na as resolveDataType,
229
- wa as resolveDatamodelName,
230
- Aa as useCard,
231
- Ea as useCurrentActiveCard,
232
- La as useCurrentCardConfig,
233
- Pa as useCurrentSheetActiveCards,
234
- _a as useDashboardActions,
235
- P as useDashboardStore,
236
- ka as useDataColumns,
237
- Ba as useDateFilterHook,
238
- Fa as useEditorActions,
239
- Wa as useEditorAside,
240
- Ra as useEditorStore,
241
- Va as useTextFilterHook
204
+ le as SemaphorDataProvider,
205
+ ce as SemaphorQueryClient,
206
+ Ye as ShareDialog,
207
+ ze as Surfboard,
208
+ ae as Visual,
209
+ Ge as VisualEditingControls,
210
+ He as cleanCard,
211
+ ue as createEmptyKpiConfig,
212
+ he as createSqlGenConfig,
213
+ pe as downloadPdf,
214
+ fe as fmt,
215
+ me as getColumnDataType,
216
+ $e as getDashbaordStateWithoutData,
217
+ Me as getFilterValueType,
218
+ Ce as getFormattedTableNameForQuery,
219
+ De as getQualifiedTableName,
220
+ ve as getSql,
221
+ ye as invalidateToken,
222
+ ge as isBooleanDataType,
223
+ be as isColumnInSqlGen,
224
+ Te as isDateDataType,
225
+ Se as isNumberDataType,
226
+ xe as isTextDataType,
227
+ Ne as resolveDataType,
228
+ we as resolveDatamodelName,
229
+ Ae as useCard,
230
+ Le as useCurrentActiveCard,
231
+ _e as useCurrentCardConfig,
232
+ Ee as useCurrentSheetActiveCards,
233
+ Pe as useDashboardActions,
234
+ E as useDashboardStore,
235
+ ke as useDataColumns,
236
+ We as useDateFilterHook,
237
+ Fe as useEditorActions,
238
+ Re as useEditorAside,
239
+ Oe as useEditorStore,
240
+ Qe as useTextFilterHook
242
241
  };