react-semaphor 0.1.184 → 0.1.185

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 (33) hide show
  1. package/dist/chunks/{calendar-preferences-dialog-D9oF_URo.js → calendar-preferences-dialog-BlkO2Iyl.js} +1 -1
  2. package/dist/chunks/{calendar-preferences-dialog-DeXKY9JD.js → calendar-preferences-dialog-Cf45Z1iV.js} +1 -1
  3. package/dist/chunks/{dashboard-controls-CB8282ob.js → dashboard-controls-99QUvc-v.js} +1 -1
  4. package/dist/chunks/{dashboard-controls-lRs5t5cg.js → dashboard-controls-BaIn2nYt.js} +5 -5
  5. package/dist/chunks/{dashboard-json-Brn4hMd-.js → dashboard-json-CLnZus5R.js} +1 -1
  6. package/dist/chunks/{dashboard-json-BmzqRV5Q.js → dashboard-json-Wc0g-rU5.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual--FJBg3i3.js → edit-dashboard-visual-BILSP_JA.js} +3800 -3692
  8. package/dist/chunks/edit-dashboard-visual-C1GBD18Y.js +184 -0
  9. package/dist/chunks/{editor-action-buttons-RPpMm3Zr.js → editor-action-buttons-CtZF2jZ1.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-COCkxvCM.js → editor-action-buttons-Dms4qFF0.js} +2 -2
  11. package/dist/chunks/{index-CyYJ0bVW.js → index-CWTYAZIx.js} +3086 -2983
  12. package/dist/chunks/{index-Dz2kwOQh.js → index-DnzN4EJh.js} +122 -122
  13. package/dist/chunks/{notification-bell-B86bWytX.js → notification-bell-BFuX86W5.js} +3 -3
  14. package/dist/chunks/{notification-bell-Bdk-qQIx.js → notification-bell-Ys7A4FR5.js} +1 -1
  15. package/dist/chunks/{resource-management-panel-BZKSwkRq.js → resource-management-panel-D9YWCtpI.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-CvKBoIFQ.js → resource-management-panel-KHhPka_P.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-Kxc427Zx.js → use-role-aware-display-preferences-BQYah_5h.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-D-jgaajh.js → use-role-aware-display-preferences-DLfXCRXV.js} +1 -1
  19. package/dist/chunks/use-visual-utils-CoQ-12pH.js +1 -0
  20. package/dist/chunks/{use-visual-utils-DwQQN6wI.js → use-visual-utils-Dq99aM9P.js} +55 -49
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +6 -6
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/dashboard.d.ts +35 -3
  28. package/dist/types/main.d.ts +53 -5
  29. package/dist/types/surfboard.d.ts +35 -3
  30. package/dist/types/types.d.ts +35 -3
  31. package/package.json +1 -1
  32. package/dist/chunks/edit-dashboard-visual-DNq8ni5W.js +0 -184
  33. package/dist/chunks/use-visual-utils-Du4NIgMk.js +0 -1
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("react"),a=require("./index-Dz2kwOQh.js");function R(){var S,b,j,p;const{authToken:s,tokenProps:r}=a.useSemaphorContext(),[l,v]=o.useState(!1),[k,y]=o.useState(!1),[T,w]=o.useState(!1),[x,d]=o.useState(null),[m,f]=o.useState(null),C=m||{tz:((b=(S=r==null?void 0:r.params)==null?void 0:S.calendarContext)==null?void 0:b.tz)||null,weekStart:((p=(j=r==null?void 0:r.params)==null?void 0:j.calendarContext)==null?void 0:p.weekStart)??null},c=o.useCallback(async()=>{if(!(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))){v(!0),d(null);try{const i=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const n=await i.json();f({tz:n.tz,weekStart:n.weekStart,source:n.source,isInherited:n.isInherited,userHasPrefs:n.userHasPrefs,inherited:n.inherited})}catch(i){const n=i instanceof Error?i.message:"Unknown error";d(n)}finally{v(!1)}}},[s,r]);o.useEffect(()=>{c()},[c]);const h=o.useCallback(async i=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return d("Not authenticated"),!1;y(!0),d(null);try{const n=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s.accessToken}`},body:JSON.stringify(i)});if(!n.ok){const u=await n.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await c(),!0}catch(n){const u=n instanceof Error?n.message:"Unknown error";return d(u),!1}finally{y(!1)}},[s,r,c]),g=o.useCallback(async()=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return d("Not authenticated"),!1;w(!0),d(null);try{const i=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const n=await i.text();if(n)try{const u=JSON.parse(n);return f({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await c(),!0}catch(i){const n=i instanceof Error?i.message:"Unknown error";return d(n),!1}finally{w(!1)}},[s,r,c]);return{preferences:C,isLoading:l,isSaving:k,isClearing:T,error:x,updatePreferences:h,clearPreferences:g,refetch:c}}const N=[{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"}],U=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}];function W(){try{const s=Intl;if(s.supportedValuesOf)return s.supportedValuesOf("timeZone")}catch{}return N.map(s=>s.value)}function B(s){switch(s){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function L(s){const r=N.find(l=>l.value===s);return r?r.label:s}function G(s){const r=U.find(l=>l.value===s);return r?r.label:String(s)}function _({open:s,onOpenChange:r}){var z,A,E;const{preferences:l,isLoading:v,isSaving:k,isClearing:y,updatePreferences:T,clearPreferences:w}=R(),x=l.tz||((z=l.inherited)==null?void 0:z.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,d=l.weekStart??((A=l.inherited)==null?void 0:A.weekStart)??1,[m,f]=o.useState(!l.userHasPrefs),[C,c]=o.useState(!1),[h,g]=o.useState(x),[S,b]=o.useState(d),[j,p]=o.useState(!1),i=o.useMemo(()=>W(),[]),n=o.useMemo(()=>i.filter(t=>!N.some($=>$.value===t)),[i]),u=o.useMemo(()=>L(h),[h]),I=l.inherited?L(l.inherited.tz):"UTC",D=l.inherited?G(l.inherited.weekStart):"Monday",F=B((E=l.inherited)==null?void 0:E.source);o.useEffect(()=>{if(!s){c(!1);return}C||(l.userHasPrefs!==void 0&&f(!l.userHasPrefs),g(x),b(d))},[s,C,l.userHasPrefs,x,d]);const H=async()=>{if(v){a.ue.error("Preferences are still loading. Please try again.");return}m?await w()?(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 T({tz:h,weekStart:S})?(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.")},O=()=>{r(!1)},P=k||y,M=P||v;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=>{c(!0),f(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:()=>{c(!0),f(!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 ",F," defaults"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[I,", Week starts ",D]})]})]}),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:()=>{c(!0),f(!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:j,onOpenChange:p,modal:!0,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(a.Button,{variant:"outline",role:"combobox","aria-expanded":j,className:"w-full justify-between",disabled:m,children:[u,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:N.map(t=>e.jsxs(a.CommandItem,{value:`${t.value} ${t.label}`,onSelect:()=>{c(!0),g(t.value),p(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",h===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:n.map(t=>e.jsxs(a.CommandItem,{value:t,onSelect:()=>{c(!0),g(t),p(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",h===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(S),onValueChange:t=>{c(!0),b(Number(t))},className:"flex gap-4",disabled:m,children:U.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:O,disabled:P,children:"Cancel"}),e.jsx(a.Button,{onClick:H,disabled:M,children:P?e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=_;
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),a=require("./index-DnzN4EJh.js");function R(){var S,b,j,p;const{authToken:s,tokenProps:r}=a.useSemaphorContext(),[l,v]=o.useState(!1),[k,y]=o.useState(!1),[T,w]=o.useState(!1),[x,d]=o.useState(null),[m,f]=o.useState(null),C=m||{tz:((b=(S=r==null?void 0:r.params)==null?void 0:S.calendarContext)==null?void 0:b.tz)||null,weekStart:((p=(j=r==null?void 0:r.params)==null?void 0:j.calendarContext)==null?void 0:p.weekStart)??null},c=o.useCallback(async()=>{if(!(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))){v(!0),d(null);try{const i=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const n=await i.json();f({tz:n.tz,weekStart:n.weekStart,source:n.source,isInherited:n.isInherited,userHasPrefs:n.userHasPrefs,inherited:n.inherited})}catch(i){const n=i instanceof Error?i.message:"Unknown error";d(n)}finally{v(!1)}}},[s,r]);o.useEffect(()=>{c()},[c]);const h=o.useCallback(async i=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return d("Not authenticated"),!1;y(!0),d(null);try{const n=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s.accessToken}`},body:JSON.stringify(i)});if(!n.ok){const u=await n.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await c(),!0}catch(n){const u=n instanceof Error?n.message:"Unknown error";return d(u),!1}finally{y(!1)}},[s,r,c]),g=o.useCallback(async()=>{if(!(s!=null&&s.accessToken)||!(r!=null&&r.apiServiceUrl))return d("Not authenticated"),!1;w(!0),d(null);try{const i=await fetch(`${r.apiServiceUrl}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${s.accessToken}`}});if(!i.ok){const u=await i.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const n=await i.text();if(n)try{const u=JSON.parse(n);return f({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await c(),!0}catch(i){const n=i instanceof Error?i.message:"Unknown error";return d(n),!1}finally{w(!1)}},[s,r,c]);return{preferences:C,isLoading:l,isSaving:k,isClearing:T,error:x,updatePreferences:h,clearPreferences:g,refetch:c}}const N=[{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"}],U=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}];function W(){try{const s=Intl;if(s.supportedValuesOf)return s.supportedValuesOf("timeZone")}catch{}return N.map(s=>s.value)}function B(s){switch(s){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function L(s){const r=N.find(l=>l.value===s);return r?r.label:s}function G(s){const r=U.find(l=>l.value===s);return r?r.label:String(s)}function _({open:s,onOpenChange:r}){var z,A,E;const{preferences:l,isLoading:v,isSaving:k,isClearing:y,updatePreferences:T,clearPreferences:w}=R(),x=l.tz||((z=l.inherited)==null?void 0:z.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,d=l.weekStart??((A=l.inherited)==null?void 0:A.weekStart)??1,[m,f]=o.useState(!l.userHasPrefs),[C,c]=o.useState(!1),[h,g]=o.useState(x),[S,b]=o.useState(d),[j,p]=o.useState(!1),i=o.useMemo(()=>W(),[]),n=o.useMemo(()=>i.filter(t=>!N.some($=>$.value===t)),[i]),u=o.useMemo(()=>L(h),[h]),I=l.inherited?L(l.inherited.tz):"UTC",D=l.inherited?G(l.inherited.weekStart):"Monday",F=B((E=l.inherited)==null?void 0:E.source);o.useEffect(()=>{if(!s){c(!1);return}C||(l.userHasPrefs!==void 0&&f(!l.userHasPrefs),g(x),b(d))},[s,C,l.userHasPrefs,x,d]);const H=async()=>{if(v){a.ue.error("Preferences are still loading. Please try again.");return}m?await w()?(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 T({tz:h,weekStart:S})?(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.")},O=()=>{r(!1)},P=k||y,M=P||v;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=>{c(!0),f(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:()=>{c(!0),f(!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 ",F," defaults"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[I,", Week starts ",D]})]})]}),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:()=>{c(!0),f(!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:j,onOpenChange:p,modal:!0,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(a.Button,{variant:"outline",role:"combobox","aria-expanded":j,className:"w-full justify-between",disabled:m,children:[u,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:N.map(t=>e.jsxs(a.CommandItem,{value:`${t.value} ${t.label}`,onSelect:()=>{c(!0),g(t.value),p(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",h===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:n.map(t=>e.jsxs(a.CommandItem,{value:t,onSelect:()=>{c(!0),g(t),p(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",h===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(S),onValueChange:t=>{c(!0),b(Number(t))},className:"flex gap-4",disabled:m,children:U.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:O,disabled:P,children:"Cancel"}),e.jsx(a.Button,{onClick:H,disabled:M,children:P?e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=_;
@@ -1,6 +1,6 @@
1
1
  import { jsx as s, jsxs as n, Fragment as Q } from "react/jsx-runtime";
2
2
  import X, { useState as m, useCallback as L, useEffect as ee, useMemo as D } from "react";
3
- import { l as ae, m as re, n as se, o as te, p as ne, q as le, R as j, c as v, r as I, L as N, P as ie, s as oe, B as F, C as ce, t as de, v as ue, w as me, x as fe, y as he, z as W, A as M, E as B, F as pe, G as ve, H as ge, I as T } from "./index-CyYJ0bVW.js";
3
+ import { l as ae, m as re, n as se, o as te, p as ne, q as le, R as j, c as v, r as I, L as N, P as ie, s as oe, B as F, C as ce, t as de, v as ue, w as me, x as fe, y as he, z as W, A as M, E as B, F as pe, G as ve, H as ge, I as T } from "./index-CWTYAZIx.js";
4
4
  function be() {
5
5
  var y, w, C, p;
6
6
  const { authToken: e, tokenProps: a } = ae(), [l, g] = m(!1), [A, k] = m(!1), [E, x] = m(!1), [b, d] = m(null), [u, f] = m(null), P = u || {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-Dz2kwOQh.js"),b=require("react");require("react-dom");const O=require("./notification-bell-Bdk-qQIx.js"),Je=require("./use-role-aware-display-preferences-Kxc427Zx.js"),Xe=require("./date-formatter-Sz6QDaM8.js"),Ye=require("./calendar-preferences-dialog-D9oF_URo.js"),fe=require("./editor-action-buttons-RPpMm3Zr.js");function Ze(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 D=Ze(b);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-DnzN4EJh.js"),b=require("react");require("react-dom");const O=require("./notification-bell-Ys7A4FR5.js"),Je=require("./use-role-aware-display-preferences-BQYah_5h.js"),Xe=require("./date-formatter-Sz6QDaM8.js"),Ye=require("./calendar-preferences-dialog-BlkO2Iyl.js"),fe=require("./editor-action-buttons-CtZF2jZ1.js");function Ze(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 D=Ze(b);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,13 +1,13 @@
1
1
  import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
2
- import { aT as Y, bZ as Ws, u as w, b4 as Me, b5 as Oe, B as A, b7 as Ie, b8 as ne, b_ as _e, aG as ts, l as F, m as Te, b$ as Js, b9 as Pe, n as Ge, o as Re, p as Ue, q as rs, L as Se, c0 as J, G as Ys, W as U, c1 as Zs, bd as Xs, c2 as ea, c3 as Ye, c4 as ns, c as ce, c5 as os, aU as le, c6 as de, I as E, c7 as is, bK as sa, c8 as aa, H as q, bc as $, c9 as ta, ca as ra, cb as xe, cc as na, cd as oa, ce as cs, cf as ls, cg as oe, ch as ie, bH as we, bj as Ce, ci as De, be as ds, cj as Le, bL as us, e as ms, ck as ia, bm as hs, bn as ps, bo as fs, bp as gs, bq as vs, br as bs, bs as ys, bt as Ee, b2 as ca, cl as la, Z as da, aI as Ze, Y as te, cm as ua, a3 as ma, _ as be, cn as ha, co as pa, cp as fa, cq as ga, ba as va, aa as ba, cr as ya, cs as Na, ct as Sa, cu as xa, cv as wa, b6 as Ca, bg as Da, a2 as La, a9 as Ea } from "./index-CyYJ0bVW.js";
2
+ import { aT as Y, bZ as Ws, u as w, b4 as Me, b5 as Oe, B as A, b7 as Ie, b8 as ne, b_ as _e, aG as ts, l as F, m as Te, b$ as Js, b9 as Pe, n as Ge, o as Re, p as Ue, q as rs, L as Se, c0 as J, G as Ys, W as U, c1 as Zs, bd as Xs, c2 as ea, c3 as Ye, c4 as ns, c as ce, c5 as os, aU as le, c6 as de, I as E, c7 as is, bK as sa, c8 as aa, H as q, bc as $, c9 as ta, ca as ra, cb as xe, cc as na, cd as oa, ce as cs, cf as ls, cg as oe, ch as ie, bH as we, bj as Ce, ci as De, be as ds, cj as Le, bL as us, e as ms, ck as ia, bm as hs, bn as ps, bo as fs, bp as gs, bq as vs, br as bs, bs as ys, bt as Ee, b2 as ca, cl as la, Z as da, aI as Ze, Y as te, cm as ua, a3 as ma, _ as be, cn as ha, co as pa, cp as fa, cq as ga, ba as va, aa as ba, cr as ya, cs as Na, ct as Sa, cu as xa, cv as wa, b6 as Ca, bg as Da, a2 as La, a9 as Ea } from "./index-CWTYAZIx.js";
3
3
  import * as D from "react";
4
4
  import Ns, { useState as x, useMemo as re, useEffect as Aa } from "react";
5
5
  import "react-dom";
6
- import { b as ka, u as Ma, c as Oa, A as Ia, V as _a, S as Ta, N as Pa, U as Ga } from "./notification-bell-B86bWytX.js";
7
- import { u as Ra } from "./use-role-aware-display-preferences-D-jgaajh.js";
6
+ import { b as ka, u as Ma, c as Oa, A as Ia, V as _a, S as Ta, N as Pa, U as Ga } from "./notification-bell-BFuX86W5.js";
7
+ import { u as Ra } from "./use-role-aware-display-preferences-DLfXCRXV.js";
8
8
  import { d as Ua } from "./date-formatter-Y8Za1ib3.js";
9
- import { C as Fa } from "./calendar-preferences-dialog-DeXKY9JD.js";
10
- import { S as Xe } from "./editor-action-buttons-COCkxvCM.js";
9
+ import { C as Fa } from "./calendar-preferences-dialog-Cf45Z1iV.js";
10
+ import { S as Xe } from "./editor-action-buttons-Dms4qFF0.js";
11
11
  /**
12
12
  * @license lucide-react v0.453.0 - ISC
13
13
  *
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-Dz2kwOQh.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-DnzN4EJh.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,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-CyYJ0bVW.js";
2
+ import { u as s, c as l, B as h, X as d, d as c } from "./index-CWTYAZIx.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  function N() {