react-semaphor 0.1.243 → 0.1.245
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-D9q-ca8O.js → dashboard-controls-D090JMLs.js} +1 -1
- package/dist/chunks/{dashboard-controls-Dq5IKj7q.js → dashboard-controls-DmypgT4E.js} +4 -4
- package/dist/chunks/{dashboard-json-Bc3EkHxP.js → dashboard-json-CNYzXFc0.js} +1 -1
- package/dist/chunks/{dashboard-json-BgVfGrJx.js → dashboard-json-CfyT-1L9.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DLRHOBUf.js → dashboard-summary-settings-dialog-Bom5UHYB.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-Bjp7y6sj.js → dashboard-summary-settings-dialog-DOCB-2KJ.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-41Y26RLQ.js → edit-dashboard-visual-BI05YbTU.js} +15 -17
- package/dist/chunks/{edit-dashboard-visual-D3RKjIJc.js → edit-dashboard-visual-L0E4n8MG.js} +2 -2
- package/dist/chunks/{editor-action-buttons-C34rWlNb.js → editor-action-buttons-CtAIBNnl.js} +1 -1
- package/dist/chunks/{editor-action-buttons-BuELeFM3.js → editor-action-buttons-fSIEiqef.js} +2 -2
- package/dist/chunks/{index-CzCcSZsR.js → index-BNO9yBb2.js} +231 -231
- package/dist/chunks/{index-CcCVbPnj.js → index-DqlbctgT.js} +25386 -25170
- package/dist/chunks/{notification-bell-C8s2IW-o.js → notification-bell-Clpdq1a9.js} +3 -3
- package/dist/chunks/{notification-bell-naFRcds6.js → notification-bell-DWbYMmDe.js} +1 -1
- package/dist/chunks/{resource-management-panel-n4PVPFdU.js → resource-management-panel-BFfBdzqK.js} +2 -2
- package/dist/chunks/{resource-management-panel-BZ8sps7t.js → resource-management-panel-DqiIBc7D.js} +1 -1
- package/dist/chunks/{use-visual-utils-BWY6z-k8.js → use-visual-utils-Dy19IP1A.js} +1 -1
- package/dist/chunks/{use-visual-utils-CgFbcH47.js → use-visual-utils-XW1UfAdf.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 +5 -5
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-BNO9yBb2.js"),b=require("react");require("react-dom");const _=require("./notification-bell-DWbYMmDe.js"),Ss=require("./date-formatter-CZ8p6ngp.js"),Pe=require("./dashboard-summary-settings-dialog-Bom5UHYB.js"),ys=require("./use-debounced-dirty-check-XHSwAefL.js"),xe=require("./normalize-dashboard-for-dirty-check-B7NQDI1H.js"),Fe=require("./editor-action-buttons-CtAIBNnl.js");function Ds(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const w=Ds(b);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import { bK as Z, cL as wa, u as w, c0 as Ke, c1 as Qe, B as E, c3 as We, c4 as j, cM as Je, N as Es, b as G, e as Xe, cN as xa, b$ as Ye, f as Ze, g as es, h as ss, i as Ls, L as Re, I as oe, v as Da, a4 as V, cO as fe, c8 as Ge, cP as Ca, cQ as Ns, cR as As, c as X, cS as ks, cT as Ea, cq as as, cU as La, cV as Aa, cW as ka, cX as Ma, cY as Oa, cZ as Ia, H as be, c_ as ye, x as k, c$ as Ms, cA as Ta, d0 as _a, w as Y, c7 as H, d1 as Pa, d2 as Ua, d3 as Fe, d4 as Ra, d5 as Ga, d6 as Os, d7 as Is, d8 as ge, d9 as ve, cw as Ve, ce as je, da as qe, c9 as Ts, db as He, dc as _s, dd as Fa, ch as Ps, ci as Us, cj as Rs, ck as Gs, cl as Fs, cm as Vs, cn as js, co as $e, b_ as Va, de as ja, aa as qa, U as Ss, a9 as pe, df as Ha, ag as $a, ab as Te, dg as za, dh as Ba, di as Ka, av as Qa, dj as Wa, dk as Ja, bR as Xa, bS as Ya, bT as Za, dl as et, bV as st, c5 as at, an as tt, dm as rt, dn as nt, dp as ot, dq as it, dr as lt, ds as ct, c2 as dt, a6 as ut, cb as mt, dt as ht, af as pt, a7 as ft, am as gt } from "./index-
|
|
2
|
+
import { bK as Z, cL as wa, u as w, c0 as Ke, c1 as Qe, B as E, c3 as We, c4 as j, cM as Je, N as Es, b as G, e as Xe, cN as xa, b$ as Ye, f as Ze, g as es, h as ss, i as Ls, L as Re, I as oe, v as Da, a4 as V, cO as fe, c8 as Ge, cP as Ca, cQ as Ns, cR as As, c as X, cS as ks, cT as Ea, cq as as, cU as La, cV as Aa, cW as ka, cX as Ma, cY as Oa, cZ as Ia, H as be, c_ as ye, x as k, c$ as Ms, cA as Ta, d0 as _a, w as Y, c7 as H, d1 as Pa, d2 as Ua, d3 as Fe, d4 as Ra, d5 as Ga, d6 as Os, d7 as Is, d8 as ge, d9 as ve, cw as Ve, ce as je, da as qe, c9 as Ts, db as He, dc as _s, dd as Fa, ch as Ps, ci as Us, cj as Rs, ck as Gs, cl as Fs, cm as Vs, cn as js, co as $e, b_ as Va, de as ja, aa as qa, U as Ss, a9 as pe, df as Ha, ag as $a, ab as Te, dg as za, dh as Ba, di as Ka, av as Qa, dj as Wa, dk as Ja, bR as Xa, bS as Ya, bT as Za, dl as et, bV as st, c5 as at, an as tt, dm as rt, dn as nt, dp as ot, dq as it, dr as lt, ds as ct, c2 as dt, a6 as ut, cb as mt, dt as ht, af as pt, a7 as ft, am as gt } from "./index-DqlbctgT.js";
|
|
3
3
|
import * as L from "react";
|
|
4
4
|
import qs, { useState as S, useMemo as q, useEffect as vt, useCallback as bt } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { b as yt, u as Nt, c as St, A as wt, V as xt, N as Dt, U as Ct } from "./notification-bell-
|
|
6
|
+
import { b as yt, u as Nt, c as St, A as wt, V as xt, N as Dt, U as Ct } from "./notification-bell-Clpdq1a9.js";
|
|
7
7
|
import { l as Et } from "./date-formatter-BeFtqSQ2.js";
|
|
8
|
-
import { C as Lt, D as At } from "./dashboard-summary-settings-dialog-
|
|
8
|
+
import { C as Lt, D as At } from "./dashboard-summary-settings-dialog-DOCB-2KJ.js";
|
|
9
9
|
import { u as kt } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
10
10
|
import { s as _e } from "./normalize-dashboard-for-dirty-check-Bn27S0PN.js";
|
|
11
|
-
import { S as ws } from "./editor-action-buttons-
|
|
11
|
+
import { S as ws } from "./editor-action-buttons-fSIEiqef.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license lucide-react v0.453.0 - ISC
|
|
14
14
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { u as s, c as l, B as h, X as d, d as c } from "./index-
|
|
2
|
+
import { u as s, c as l, B as h, X as d, d as c } from "./index-DqlbctgT.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function N() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-BNO9yBb2.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),l=require("react"),a=require("./index-CzCcSZsR.js");function W(){var N,C,T,y;const{authToken:s,tokenProps:r}=a.useSemaphorContext(),[i,S]=l.useState(!1),[x,v]=l.useState(!1),[j,b]=l.useState(!1),[p,u]=l.useState(null),[m,n]=l.useState(null),g=m||{tz:((C=(N=r==null?void 0:r.params)==null?void 0:N.calendarContext)==null?void 0:C.tz)||null,weekStart:((y=(T=r==null?void 0:r.params)==null?void 0:T.calendarContext)==null?void 0:y.weekStart)??null},d=l.useCallback(async()=>{if(!(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))){S(!0),u(null);try{const c=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!c.ok){const h=await c.json().catch(()=>({}));throw new Error(h.error||"Failed to fetch preferences")}const o=await c.json();n({tz:o.tz,weekStart:o.weekStart,source:o.source,isInherited:o.isInherited,userHasPrefs:o.userHasPrefs,inherited:o.inherited})}catch(c){const o=c instanceof Error?c.message:"Unknown error";u(o)}finally{S(!1)}}},[s,r]);l.useEffect(()=>{d()},[d]);const f=l.useCallback(async c=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return u("Not authenticated"),!1;v(!0),u(null);try{const o=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s.accessToken}`},body:JSON.stringify(c)});if(!o.ok){const h=await o.json().catch(()=>({}));throw new Error(h.error||"Failed to update preferences")}return await d(),!0}catch(o){const h=o instanceof Error?o.message:"Unknown error";return u(h),!1}finally{v(!1)}},[s,r,d]),w=l.useCallback(async()=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return u("Not authenticated"),!1;b(!0),u(null);try{const c=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!c.ok){const h=await c.json().catch(()=>({}));throw new Error(h.error||"Failed to clear preferences")}const o=await c.text();if(o)try{const h=JSON.parse(o);return n({tz:h.tz,weekStart:h.weekStart,source:h.source,isInherited:h.isInherited??!0,userHasPrefs:!1,inherited:h.inherited}),!0}catch{}return await d(),!0}catch(c){const o=c instanceof Error?c.message:"Unknown error";return u(o),!1}finally{b(!1)}},[s,r,d]);return{preferences:g,isLoading:i,isSaving:x,isClearing:j,error:p,updatePreferences:f,clearPreferences:w,refetch:d}}const I=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}];function G(){try{const s=Intl;if(s.supportedValuesOf)return s.supportedValuesOf("timeZone")}catch{}return I.map(s=>s.value)}function V(s){switch(s){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function L(s){const r=I.find(i=>i.value===s);return r?r.label:s}function X(s){const r=M.find(i=>i.value===s);return r?r.label:String(s)}function q({open:s,onOpenChange:r}){var E,P,A;const{preferences:i,isLoading:S,isSaving:x,isClearing:v,updatePreferences:j,clearPreferences:b}=W(),p=i.tz||((E=i.inherited)==null?void 0:E.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,u=i.weekStart??((P=i.inherited)==null?void 0:P.weekStart)??1,[m,n]=l.useState(!i.userHasPrefs),[g,d]=l.useState(!1),[f,w]=l.useState(p),[N,C]=l.useState(u),[T,y]=l.useState(!1),c=l.useMemo(()=>G(),[]),o=l.useMemo(()=>c.filter(t=>!I.some(R=>R.value===t)),[c]),h=l.useMemo(()=>L(f),[f]),F=i.inherited?L(i.inherited.tz):"UTC",H=i.inherited?X(i.inherited.weekStart):"Monday",B=V((A=i.inherited)==null?void 0:A.source);l.useEffect(()=>{if(!s){d(!1);return}g||(i.userHasPrefs!==void 0&&n(!i.userHasPrefs),w(p),C(u))},[s,g,i.userHasPrefs,p,u]);const _=async()=>{if(S){a.ue.error("Preferences are still loading. Please try again.");return}m?await b()?(a.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),r(!1)):a.ue.error("Failed to save preferences. Please try again."):await j({tz:f,weekStart:N})?(a.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),r(!1)):a.ue.error("Failed to save preferences. Please try again.")},$=()=>{r(!1)},D=x||v,O=D||S;return e.jsx(a.Dialog,{open:s,onOpenChange:r,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Calendar Preferences"}),e.jsx(a.DialogDescription,{children:"Set your timezone and week start preferences for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs(a.RadioGroup,{value:m?"defaults":"custom",onValueChange:t=>{d(!0),n(t==="defaults")},className:"space-y-3",children:[e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/50"),onClick:()=>{d(!0),n(!0)},children:[e.jsx(a.RadioGroupItem,{value:"defaults",id:"mode-defaults"}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsxs(a.Label,{htmlFor:"mode-defaults",className:"cursor-pointer font-medium",children:["Use ",B," defaults"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[F,", Week starts ",H]})]})]}),e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-border hover:border-muted-foreground/50":"border-primary bg-primary/5"),onClick:()=>{d(!0),n(!1)},children:[e.jsx(a.RadioGroupItem,{value:"custom",id:"mode-custom"}),e.jsx(a.Label,{htmlFor:"mode-custom",className:"cursor-pointer font-medium",children:"Use custom settings"})]})]}),e.jsxs("div",{className:a.cn("space-y-6 transition-opacity",m&&"opacity-50 pointer-events-none"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{children:"Timezone"}),e.jsxs(a.Popover,{open:T,onOpenChange:y,modal:!0,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(a.Button,{variant:"outline",role:"combobox","aria-expanded":T,className:"w-full justify-between",disabled:m,children:[h,e.jsx(a.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(a.Command,{className:"overflow-visible",children:[e.jsx(a.CommandInput,{placeholder:"Search timezones..."}),e.jsxs(a.CommandList,{children:[e.jsx(a.CommandEmpty,{children:"No timezone found."}),e.jsx(a.CommandGroup,{heading:"Common",children:I.map(t=>e.jsxs(a.CommandItem,{value:`${t.value} ${t.label}`,onSelect:()=>{d(!0),w(t.value),y(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",f===t.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:t.label}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.value})]},t.value))}),e.jsx(a.CommandSeparator,{}),e.jsx(a.CommandGroup,{heading:"All Timezones",children:o.map(t=>e.jsxs(a.CommandItem,{value:t,onSelect:()=>{d(!0),w(t),y(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",f===t?"opacity-100":"opacity-0")}),t]},t))})]})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a.Label,{children:"Week Starts On"}),e.jsx(a.RadioGroup,{value:String(N),onValueChange:t=>{d(!0),C(Number(t))},className:"flex gap-4",disabled:m,children:M.map(t=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(a.RadioGroupItem,{value:String(t.value),id:`week-start-${t.value}`,disabled:m}),e.jsx(a.Label,{htmlFor:`week-start-${t.value}`,className:a.cn("cursor-pointer font-normal",m&&"cursor-not-allowed"),children:t.label})]},t.value))})]})]})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:$,disabled:D,children:"Cancel"}),e.jsx(a.Button,{onClick:_,disabled:O,children:D?e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})}const k=6,z=1,U=20;function Z(s){return Number.isNaN(s)?k:Math.min(U,Math.max(z,s))}function J({open:s,onOpenChange:r,dashboard:i,onApply:S,disabled:x=!1}){const[v,j]=l.useState(!1),[b,p]=l.useState("top"),[u,m]=l.useState(String(k)),n=i.summary;l.useEffect(()=>{s&&(j((n==null?void 0:n.enabled)===!0),p((n==null?void 0:n.position)==="bottom"?"bottom":"top"),m(String((n==null?void 0:n.maxItems)??k)))},[s,n==null?void 0:n.enabled,n==null?void 0:n.position,n==null?void 0:n.maxItems]);const g=l.useMemo(()=>Z(Number.parseInt(u||`${k}`,10)),[u]),d=()=>{S({enabled:v,position:b,maxItems:g}),r(!1)};return e.jsx(a.Dialog,{open:s,onOpenChange:r,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[420px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Summary Settings"}),e.jsx(a.DialogDescription,{children:"Configure dashboard-level summary display. Card-level summary settings still control which cards contribute."})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-enabled",children:"Enable Dashboard Summary"}),e.jsx(a.SmallSwitch,{id:"dashboard-summary-enabled",checked:v,disabled:x,onCheckedChange:j})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-position",children:"Position"}),e.jsxs(a.Select,{value:b,disabled:x,onValueChange:f=>p(f),children:[e.jsx(a.SelectTrigger,{id:"dashboard-summary-position",children:e.jsx(a.SelectValue,{placeholder:"Select position"})}),e.jsxs(a.SelectContent,{children:[e.jsx(a.SelectItem,{value:"top",children:"Top"}),e.jsx(a.SelectItem,{value:"bottom",children:"Bottom"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-max-items",children:"Max Items"}),e.jsx(a.Input,{id:"dashboard-summary-max-items",type:"number",min:z,max:U,disabled:x,value:u,onChange:f=>m(f.target.value),onBlur:()=>m(String(g))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Display limit only. Computation is unchanged."})]}),x&&e.jsx("p",{className:"text-xs text-amber-700",children:"Enter dashboard edit mode to modify summary settings."})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(a.Button,{onClick:d,disabled:x,children:"Apply"})]})]})})}exports.CalendarPreferencesDialog=q;exports.DashboardSummarySettingsDialog=J;
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),l=require("react"),a=require("./index-BNO9yBb2.js");function W(){var N,C,T,y;const{authToken:s,tokenProps:r}=a.useSemaphorContext(),[i,S]=l.useState(!1),[x,v]=l.useState(!1),[j,b]=l.useState(!1),[p,u]=l.useState(null),[m,n]=l.useState(null),g=m||{tz:((C=(N=r==null?void 0:r.params)==null?void 0:N.calendarContext)==null?void 0:C.tz)||null,weekStart:((y=(T=r==null?void 0:r.params)==null?void 0:T.calendarContext)==null?void 0:y.weekStart)??null},d=l.useCallback(async()=>{if(!(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))){S(!0),u(null);try{const c=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!c.ok){const h=await c.json().catch(()=>({}));throw new Error(h.error||"Failed to fetch preferences")}const o=await c.json();n({tz:o.tz,weekStart:o.weekStart,source:o.source,isInherited:o.isInherited,userHasPrefs:o.userHasPrefs,inherited:o.inherited})}catch(c){const o=c instanceof Error?c.message:"Unknown error";u(o)}finally{S(!1)}}},[s,r]);l.useEffect(()=>{d()},[d]);const f=l.useCallback(async c=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return u("Not authenticated"),!1;v(!0),u(null);try{const o=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s.accessToken}`},body:JSON.stringify(c)});if(!o.ok){const h=await o.json().catch(()=>({}));throw new Error(h.error||"Failed to update preferences")}return await d(),!0}catch(o){const h=o instanceof Error?o.message:"Unknown error";return u(h),!1}finally{v(!1)}},[s,r,d]),w=l.useCallback(async()=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return u("Not authenticated"),!1;b(!0),u(null);try{const c=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!c.ok){const h=await c.json().catch(()=>({}));throw new Error(h.error||"Failed to clear preferences")}const o=await c.text();if(o)try{const h=JSON.parse(o);return n({tz:h.tz,weekStart:h.weekStart,source:h.source,isInherited:h.isInherited??!0,userHasPrefs:!1,inherited:h.inherited}),!0}catch{}return await d(),!0}catch(c){const o=c instanceof Error?c.message:"Unknown error";return u(o),!1}finally{b(!1)}},[s,r,d]);return{preferences:g,isLoading:i,isSaving:x,isClearing:j,error:p,updatePreferences:f,clearPreferences:w,refetch:d}}const I=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}];function G(){try{const s=Intl;if(s.supportedValuesOf)return s.supportedValuesOf("timeZone")}catch{}return I.map(s=>s.value)}function V(s){switch(s){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function L(s){const r=I.find(i=>i.value===s);return r?r.label:s}function X(s){const r=M.find(i=>i.value===s);return r?r.label:String(s)}function q({open:s,onOpenChange:r}){var E,P,A;const{preferences:i,isLoading:S,isSaving:x,isClearing:v,updatePreferences:j,clearPreferences:b}=W(),p=i.tz||((E=i.inherited)==null?void 0:E.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,u=i.weekStart??((P=i.inherited)==null?void 0:P.weekStart)??1,[m,n]=l.useState(!i.userHasPrefs),[g,d]=l.useState(!1),[f,w]=l.useState(p),[N,C]=l.useState(u),[T,y]=l.useState(!1),c=l.useMemo(()=>G(),[]),o=l.useMemo(()=>c.filter(t=>!I.some(R=>R.value===t)),[c]),h=l.useMemo(()=>L(f),[f]),F=i.inherited?L(i.inherited.tz):"UTC",H=i.inherited?X(i.inherited.weekStart):"Monday",B=V((A=i.inherited)==null?void 0:A.source);l.useEffect(()=>{if(!s){d(!1);return}g||(i.userHasPrefs!==void 0&&n(!i.userHasPrefs),w(p),C(u))},[s,g,i.userHasPrefs,p,u]);const _=async()=>{if(S){a.ue.error("Preferences are still loading. Please try again.");return}m?await b()?(a.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),r(!1)):a.ue.error("Failed to save preferences. Please try again."):await j({tz:f,weekStart:N})?(a.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),r(!1)):a.ue.error("Failed to save preferences. Please try again.")},$=()=>{r(!1)},D=x||v,O=D||S;return e.jsx(a.Dialog,{open:s,onOpenChange:r,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Calendar Preferences"}),e.jsx(a.DialogDescription,{children:"Set your timezone and week start preferences for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs(a.RadioGroup,{value:m?"defaults":"custom",onValueChange:t=>{d(!0),n(t==="defaults")},className:"space-y-3",children:[e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/50"),onClick:()=>{d(!0),n(!0)},children:[e.jsx(a.RadioGroupItem,{value:"defaults",id:"mode-defaults"}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsxs(a.Label,{htmlFor:"mode-defaults",className:"cursor-pointer font-medium",children:["Use ",B," defaults"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[F,", Week starts ",H]})]})]}),e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-border hover:border-muted-foreground/50":"border-primary bg-primary/5"),onClick:()=>{d(!0),n(!1)},children:[e.jsx(a.RadioGroupItem,{value:"custom",id:"mode-custom"}),e.jsx(a.Label,{htmlFor:"mode-custom",className:"cursor-pointer font-medium",children:"Use custom settings"})]})]}),e.jsxs("div",{className:a.cn("space-y-6 transition-opacity",m&&"opacity-50 pointer-events-none"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{children:"Timezone"}),e.jsxs(a.Popover,{open:T,onOpenChange:y,modal:!0,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(a.Button,{variant:"outline",role:"combobox","aria-expanded":T,className:"w-full justify-between",disabled:m,children:[h,e.jsx(a.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(a.Command,{className:"overflow-visible",children:[e.jsx(a.CommandInput,{placeholder:"Search timezones..."}),e.jsxs(a.CommandList,{children:[e.jsx(a.CommandEmpty,{children:"No timezone found."}),e.jsx(a.CommandGroup,{heading:"Common",children:I.map(t=>e.jsxs(a.CommandItem,{value:`${t.value} ${t.label}`,onSelect:()=>{d(!0),w(t.value),y(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",f===t.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:t.label}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.value})]},t.value))}),e.jsx(a.CommandSeparator,{}),e.jsx(a.CommandGroup,{heading:"All Timezones",children:o.map(t=>e.jsxs(a.CommandItem,{value:t,onSelect:()=>{d(!0),w(t),y(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",f===t?"opacity-100":"opacity-0")}),t]},t))})]})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a.Label,{children:"Week Starts On"}),e.jsx(a.RadioGroup,{value:String(N),onValueChange:t=>{d(!0),C(Number(t))},className:"flex gap-4",disabled:m,children:M.map(t=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(a.RadioGroupItem,{value:String(t.value),id:`week-start-${t.value}`,disabled:m}),e.jsx(a.Label,{htmlFor:`week-start-${t.value}`,className:a.cn("cursor-pointer font-normal",m&&"cursor-not-allowed"),children:t.label})]},t.value))})]})]})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:$,disabled:D,children:"Cancel"}),e.jsx(a.Button,{onClick:_,disabled:O,children:D?e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})}const k=6,z=1,U=20;function Z(s){return Number.isNaN(s)?k:Math.min(U,Math.max(z,s))}function J({open:s,onOpenChange:r,dashboard:i,onApply:S,disabled:x=!1}){const[v,j]=l.useState(!1),[b,p]=l.useState("top"),[u,m]=l.useState(String(k)),n=i.summary;l.useEffect(()=>{s&&(j((n==null?void 0:n.enabled)===!0),p((n==null?void 0:n.position)==="bottom"?"bottom":"top"),m(String((n==null?void 0:n.maxItems)??k)))},[s,n==null?void 0:n.enabled,n==null?void 0:n.position,n==null?void 0:n.maxItems]);const g=l.useMemo(()=>Z(Number.parseInt(u||`${k}`,10)),[u]),d=()=>{S({enabled:v,position:b,maxItems:g}),r(!1)};return e.jsx(a.Dialog,{open:s,onOpenChange:r,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[420px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Summary Settings"}),e.jsx(a.DialogDescription,{children:"Configure dashboard-level summary display. Card-level summary settings still control which cards contribute."})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-enabled",children:"Enable Dashboard Summary"}),e.jsx(a.SmallSwitch,{id:"dashboard-summary-enabled",checked:v,disabled:x,onCheckedChange:j})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-position",children:"Position"}),e.jsxs(a.Select,{value:b,disabled:x,onValueChange:f=>p(f),children:[e.jsx(a.SelectTrigger,{id:"dashboard-summary-position",children:e.jsx(a.SelectValue,{placeholder:"Select position"})}),e.jsxs(a.SelectContent,{children:[e.jsx(a.SelectItem,{value:"top",children:"Top"}),e.jsx(a.SelectItem,{value:"bottom",children:"Bottom"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-max-items",children:"Max Items"}),e.jsx(a.Input,{id:"dashboard-summary-max-items",type:"number",min:z,max:U,disabled:x,value:u,onChange:f=>m(f.target.value),onBlur:()=>m(String(g))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Display limit only. Computation is unchanged."})]}),x&&e.jsx("p",{className:"text-xs text-amber-700",children:"Enter dashboard edit mode to modify summary settings."})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(a.Button,{onClick:d,disabled:x,children:"Apply"})]})]})})}exports.CalendarPreferencesDialog=q;exports.DashboardSummarySettingsDialog=J;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as oe } from "react/jsx-runtime";
|
|
2
2
|
import de, { useState as h, useCallback as L, useEffect as G, useMemo as z } from "react";
|
|
3
|
-
import { b as ue, e as X, f as Z, g as J, h as K, i as q, R as $, c as C, j as F, L as b, P as me, k as he, B as P, C as fe, l as pe, m as ve, n as be, o as Se, p as ge, q as B, r as O, s as W, t as ye, v as Y, w as we, x as A, S as xe, y as Ne, z as Ce, A as Te, E as ke, F as R, I as Ie } from "./index-
|
|
3
|
+
import { b as ue, e as X, f as Z, g as J, h as K, i as q, R as $, c as C, j as F, L as b, P as me, k as he, B as P, C as fe, l as pe, m as ve, n as be, o as Se, p as ge, q as B, r as O, s as W, t as ye, v as Y, w as we, x as A, S as xe, y as Ne, z as Ce, A as Te, E as ke, F as R, I as Ie } from "./index-DqlbctgT.js";
|
|
4
4
|
function Ee() {
|
|
5
5
|
var k, I, E, N;
|
|
6
6
|
const { authToken: a, tokenProps: r } = ue(), [l, S] = h(!1), [p, g] = h(!1), [x, y] = h(!1), [v, o] = h(null), [u, n] = h(null), w = u || {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as Ce } from "react/jsx-runtime";
|
|
2
|
-
import { bK as Le, du as ao, x as ft, M as be, U as R, dv as un, dw as no, L as V, y as ee, z as te, A as ae, E as ne, F as q, bU as Ke, B as H, b$ as Tt, dx as zn, dy as Ll, dz as Pl, dA as Vl, dB as Bl, dC as _n, a3 as Ot, X as tt, dD as $s, c9 as qs, e as Ia, f as Da, g as Aa, h as Ea, i as ln, bY as bt, bV as ut, bR as mt, bS as nt, bT as st, dE as Yr, dF as $l, u as Re, v as Is, dG as Oa, ce as ja, c as X, dc as xt, dH as ql, b_ as zl, dI as so, dJ as ro, dK as lo, dL as nn, dM as io, dN as _l, dO as oo, cL as jl, dP as co, dQ as Kl, dR as uo, dS as zs, dT as mo, dU as Zt, dV as sn, c0 as Ka, c1 as Ua, dW as Ds, c3 as Ga, c4 as dt, dX as Ma, dY as ho, dZ as As, d_ as On, b as Ja, aa as Ul, d$ as rn, e0 as _s, e1 as po, e2 as fo, e3 as Gl, e4 as Jl, e5 as Hl, c$ as js, I as Ue, P as kt, e6 as go, l as It, e7 as xo, w as ia, e8 as bo, e9 as vo, H as yo, ea as No, bL as Ha, bM as ma, bN as ha, bO as mn, bP as Kt, bQ as Ta, eb as Es, ec as oa, ed as gt, ee as ca, ef as Co, eg as Ln, eh as Pn, ei as Vn, ej as Ks, dp as Ra, ek as hn, el as wo, R as pn, em as jn, en as Qa, cf as Us, eo as Ql, j as ea, cG as So, ep as Bt, eq as Ut, er as To, es as Gt, cq as Gs, cD as Js, N as Yl, et as Hs, eu as ko, ev as Wl, ew as Xl, ex as jt, dk as ds, ey as Io, ez as Do, eA as Ao, eB as Zl, ar as ei, eC as ti, eD as Eo, eE as Oo, eF as Mo, eG as Kn, eH as Ro, eI as Fo, eJ as Wr, eK as Lo, V as Un, a1 as Qs, eL as Po, eM as Ys, cN as Vo, eN as Xr, a4 as it, eO as Bo, d6 as Ws, d7 as Xs, d8 as la, d9 as Mn, eP as $o, dl as qo, eQ as ai, eR as zo, eS as _o, cw as Gn, cu as lt, eT as jo, eU as Ko, eV as Zr, eW as Uo, k as Mt, cO as Jn, c8 as Vt, eX as Jt, eY as da, eZ as ua, e_ as ta, e$ as Fa, f0 as Go, a_ as Jo, f1 as Ho, f2 as Qo, f3 as Yo, f4 as Wo, cC as ka, f5 as Xo, f6 as ni, f7 as Zo, f8 as ec, f9 as tc, fa as si, fb as ac, fc as nc, fd as sc, fe as rc, ff as lc, fg as ic, fh as Os, fi as oc, fj as cc, fk as dc, fl as Ms, fm as uc, fn as mc, fo as hc, fp as pc, fq as fc, fr as Wt, fs as ri, c2 as Zs, cH as gc, c5 as xc, ft as li, fu as on, fv as Bn, fw as bc, fx as La, fy as $e, fz as qe, fA as ze, fB as vc, fC as yc, fD as Nc, fE as Cc, fF as Ht, fG as Dn, fH as el, fI as wc, dq as ii, S as Ge, fJ as Sc, fK as Tc, fL as kc, m as Pa, n as Va, o as Ba, p as $a, q as qa, r as za, fM as Ic, fN as Dc, fO as tl, fP as Ac, s as pa, fQ as Ec, fR as us, fS as al, fT as Nt, fU as Oc, fV as Mc, fW as Rc, fX as Fc, fY as fn, fZ as Lc, f_ as ms, f$ as oi, g0 as Pc, g1 as Vc, g2 as Bc, g3 as $n, g4 as $c, g5 as qc, g6 as er, g7 as tr, g8 as ci, g9 as zc, ct as di, ga as ui, gb as Hn, dt as _c, gc as We, bc as jc, gd as Kc, ge as Uc, b8 as nl, gf as sl, gg as Gc, gh as Jc, gi as Hc, gj as Qc, gk as Yc, gl as Wc, gm as Xc, gn as Zc, go as ed, gp as td, gq as ad, gr as nd, gs as sd, gt as rd, gu as mi, gv as ld, gw as id, gx as od, gy as cd, gz as dd, gA as ud, gB as md, gC as hd, gD as pd, gE as fd, gF as gd, gG as xd, gH as bd, gI as hi, gJ as vd, gK as Qn, gL as pi, gM as fi, gN as yd, gO as Nd, gP as Yn, gQ as hs, gR as Cd, gS as wd, gT as Sd, gU as Td, gV as kd, gW as Id, gX as Dd, gY as gi, aW as Ad, gZ as rl, cy as ll, g_ as Ed, g$ as Od, h0 as Md, h1 as Rn, h2 as Rd, h3 as ar, h4 as Fn, h5 as Fd, h6 as Ld, h7 as qn, h8 as Pd, C as Vd, h9 as Bd, ha as $d, hb as qd, hc as cn, hd as Qt, he as Rs, hf as Fs, hg as dn, hh as xi, hi as _a, aU as zd, hj as _d, hk as ps, hl as jd, hm as fs, hn as Kd, ho as il, hp as ol, hq as Ud, hr as Gd, hs as Jd, ht as Hd, hu as Qd, hv as Yd, hw as Wd, hx as Wn, cb as Xn, hy as cl, hz as bi, df as gs, hA as Xd, hB as Zd, hC as eu, W as tu } from "./index-
|
|
2
|
+
import { bK as Le, du as ao, x as ft, M as be, U as R, dv as un, dw as no, L as V, y as ee, z as te, A as ae, E as ne, F as q, bU as Ke, B as H, b$ as Tt, dx as zn, dy as Ll, dz as Pl, dA as Vl, dB as Bl, dC as _n, a3 as Ot, X as tt, dD as $s, c9 as qs, e as Ia, f as Da, g as Aa, h as Ea, i as ln, bY as bt, bV as ut, bR as mt, bS as nt, bT as st, dE as Yr, dF as $l, u as Re, v as Is, dG as Oa, ce as ja, c as X, dc as xt, dH as ql, b_ as zl, dI as so, dJ as ro, dK as lo, dL as nn, dM as io, dN as _l, dO as oo, cL as jl, dP as co, dQ as Kl, dR as uo, dS as zs, dT as mo, dU as Zt, dV as sn, c0 as Ka, c1 as Ua, dW as Ds, c3 as Ga, c4 as dt, dX as Ma, dY as ho, dZ as As, d_ as On, b as Ja, aa as Ul, d$ as rn, e0 as _s, e1 as po, e2 as fo, e3 as Gl, e4 as Jl, e5 as Hl, c$ as js, I as Ue, P as kt, e6 as go, l as It, e7 as xo, w as ia, e8 as bo, e9 as vo, H as yo, ea as No, bL as Ha, bM as ma, bN as ha, bO as mn, bP as Kt, bQ as Ta, eb as Es, ec as oa, ed as gt, ee as ca, ef as Co, eg as Ln, eh as Pn, ei as Vn, ej as Ks, dp as Ra, ek as hn, el as wo, R as pn, em as jn, en as Qa, cf as Us, eo as Ql, j as ea, cG as So, ep as Bt, eq as Ut, er as To, es as Gt, cq as Gs, cD as Js, N as Yl, et as Hs, eu as ko, ev as Wl, ew as Xl, ex as jt, dk as ds, ey as Io, ez as Do, eA as Ao, eB as Zl, ar as ei, eC as ti, eD as Eo, eE as Oo, eF as Mo, eG as Kn, eH as Ro, eI as Fo, eJ as Wr, eK as Lo, V as Un, a1 as Qs, eL as Po, eM as Ys, cN as Vo, eN as Xr, a4 as it, eO as Bo, d6 as Ws, d7 as Xs, d8 as la, d9 as Mn, eP as $o, dl as qo, eQ as ai, eR as zo, eS as _o, cw as Gn, cu as lt, eT as jo, eU as Ko, eV as Zr, eW as Uo, k as Mt, cO as Jn, c8 as Vt, eX as Jt, eY as da, eZ as ua, e_ as ta, e$ as Fa, f0 as Go, a_ as Jo, f1 as Ho, f2 as Qo, f3 as Yo, f4 as Wo, cC as ka, f5 as Xo, f6 as ni, f7 as Zo, f8 as ec, f9 as tc, fa as si, fb as ac, fc as nc, fd as sc, fe as rc, ff as lc, fg as ic, fh as Os, fi as oc, fj as cc, fk as dc, fl as Ms, fm as uc, fn as mc, fo as hc, fp as pc, fq as fc, fr as Wt, fs as ri, c2 as Zs, cH as gc, c5 as xc, ft as li, fu as on, fv as Bn, fw as bc, fx as La, fy as $e, fz as qe, fA as ze, fB as vc, fC as yc, fD as Nc, fE as Cc, fF as Ht, fG as Dn, fH as el, fI as wc, dq as ii, S as Ge, fJ as Sc, fK as Tc, fL as kc, m as Pa, n as Va, o as Ba, p as $a, q as qa, r as za, fM as Ic, fN as Dc, fO as tl, fP as Ac, s as pa, fQ as Ec, fR as us, fS as al, fT as Nt, fU as Oc, fV as Mc, fW as Rc, fX as Fc, fY as fn, fZ as Lc, f_ as ms, f$ as oi, g0 as Pc, g1 as Vc, g2 as Bc, g3 as $n, g4 as $c, g5 as qc, g6 as er, g7 as tr, g8 as ci, g9 as zc, ct as di, ga as ui, gb as Hn, dt as _c, gc as We, bc as jc, gd as Kc, ge as Uc, b8 as nl, gf as sl, gg as Gc, gh as Jc, gi as Hc, gj as Qc, gk as Yc, gl as Wc, gm as Xc, gn as Zc, go as ed, gp as td, gq as ad, gr as nd, gs as sd, gt as rd, gu as mi, gv as ld, gw as id, gx as od, gy as cd, gz as dd, gA as ud, gB as md, gC as hd, gD as pd, gE as fd, gF as gd, gG as xd, gH as bd, gI as hi, gJ as vd, gK as Qn, gL as pi, gM as fi, gN as yd, gO as Nd, gP as Yn, gQ as hs, gR as Cd, gS as wd, gT as Sd, gU as Td, gV as kd, gW as Id, gX as Dd, gY as gi, aW as Ad, gZ as rl, cy as ll, g_ as Ed, g$ as Od, h0 as Md, h1 as Rn, h2 as Rd, h3 as ar, h4 as Fn, h5 as Fd, h6 as Ld, h7 as qn, h8 as Pd, C as Vd, h9 as Bd, ha as $d, hb as qd, hc as cn, hd as Qt, he as Rs, hf as Fs, hg as dn, hh as xi, hi as _a, aU as zd, hj as _d, hk as ps, hl as jd, hm as fs, hn as Kd, ho as il, hp as ol, hq as Ud, hr as Gd, hs as Jd, ht as Hd, hu as Qd, hv as Yd, hw as Wd, hx as Wn, cb as Xn, hy as cl, hz as bi, df as gs, hA as Xd, hB as Zd, hC as eu, W as tu } from "./index-DqlbctgT.js";
|
|
3
3
|
import * as Ls from "react";
|
|
4
4
|
import Ps, { useState as J, useRef as Me, useEffect as Se, useCallback as we, useMemo as me, useContext as nr, Suspense as au } from "react";
|
|
5
|
-
import { C as dl, e as sr, u as vt, V as nu } from "./editor-action-buttons-
|
|
5
|
+
import { C as dl, e as sr, u as vt, V as nu } from "./editor-action-buttons-fSIEiqef.js";
|
|
6
6
|
import { createPortal as su } from "react-dom";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -15211,20 +15211,17 @@ function an({
|
|
|
15211
15211
|
return null;
|
|
15212
15212
|
const m = t !== "sortBy" && p !== "kpi", x = tp[t] || Tt;
|
|
15213
15213
|
return /* @__PURE__ */ a("div", { className: "mb-3 w-full", children: [
|
|
15214
|
-
/* @__PURE__ */
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
{
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15224
|
-
|
|
15225
|
-
),
|
|
15226
|
-
m && /* @__PURE__ */ e(ep, { concept: t })
|
|
15227
|
-
] }),
|
|
15214
|
+
/* @__PURE__ */ e("div", { className: "mb-1.5 flex items-center gap-2", children: /* @__PURE__ */ e(
|
|
15215
|
+
V,
|
|
15216
|
+
{
|
|
15217
|
+
className: X("block text-sm font-medium text-foreground", {
|
|
15218
|
+
// 'text-green-600': zone === 'metrics',
|
|
15219
|
+
// 'text-blue-600': zone === 'groupBy',
|
|
15220
|
+
// 'text-purple-600': zone === 'pivotBy',
|
|
15221
|
+
}),
|
|
15222
|
+
children: n
|
|
15223
|
+
}
|
|
15224
|
+
) }),
|
|
15228
15225
|
/* @__PURE__ */ e(
|
|
15229
15226
|
"div",
|
|
15230
15227
|
{
|
|
@@ -15244,7 +15241,8 @@ function an({
|
|
|
15244
15241
|
),
|
|
15245
15242
|
children: s.length === 0 ? /* @__PURE__ */ a("div", { className: "flex min-h-[56px] items-center justify-center gap-2 text-sm text-muted-foreground/85", children: [
|
|
15246
15243
|
/* @__PURE__ */ e(x, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground/80" }),
|
|
15247
|
-
/* @__PURE__ */ e("span", { children: r })
|
|
15244
|
+
/* @__PURE__ */ e("span", { children: r }),
|
|
15245
|
+
m && /* @__PURE__ */ e(ep, { concept: t })
|
|
15248
15246
|
] }) : /* @__PURE__ */ e(
|
|
15249
15247
|
ta,
|
|
15250
15248
|
{
|