ezux 1.1.9 → 1.1.11
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/{EzContextMenu-OaCDOB5a.js → EzContextMenu-BsHdOgtL.js} +2 -2
- package/dist/{EzContextMenu-C5fEFGzp.cjs → EzContextMenu-C3eDRS7E.cjs} +1 -1
- package/dist/{EzErrorBoundary-H8HQBTwU.js → EzErrorBoundary-D4NBadES.js} +32 -32
- package/dist/EzEventModal-DkowH9rh.cjs +1 -0
- package/dist/{EzEventModal-pq49mPrb.js → EzEventModal-FP2rs1pp.js} +6 -6
- package/dist/{EzGroupingPanel-CmK7gVFq.js → EzGroupingPanel-DuKrZuqq.js} +7 -7
- package/dist/EzGroupingPanel-Dw4bbefz.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-BLF22CDh.cjs +1 -0
- package/dist/{EzSchedulerQuickAdd-CkR_EimA.js → EzSchedulerQuickAdd-s2jtG8vH.js} +7 -7
- package/dist/EzSchedulerToolbar-CaVVmnjt.cjs +1 -0
- package/dist/{EzSchedulerToolbar-B0-uLBDr.js → EzSchedulerToolbar-tz6h80GC.js} +62 -70
- package/dist/{EzSignature-BpFo1IzX.cjs → EzSignature-CPoQLAyS.cjs} +1 -1
- package/dist/{EzSignature-Dgz265gl.js → EzSignature-D7134EQo.js} +3 -3
- package/dist/{EzTableEditDialog-Bvb3hkWO.js → EzTableEditDialog-3eU6i9cv.js} +3 -3
- package/dist/EzTableEditDialog-ftpeOKI_.cjs +1 -0
- package/dist/{EzTableFooter-BxLdc13o.cjs → EzTableFooter-BiyI1m1O.cjs} +1 -1
- package/dist/{EzTableFooter-CI89S-UC.js → EzTableFooter-DuAaOcLd.js} +1 -1
- package/dist/{EzTableToolbar-_WyPYxTd.js → EzTableToolbar-DmAb94U-.js} +7 -7
- package/dist/EzTableToolbar-qlNVxvsL.cjs +1 -0
- package/dist/{HighlightText-qlGoV0mz.js → HighlightText-C0sUEoCH.js} +1 -1
- package/dist/NotificationPanel-juBrjjOY.cjs +1 -0
- package/dist/{NotificationPanel-CfIj_ycB.js → NotificationPanel-xjIHKnlE.js} +5 -5
- package/dist/TooltipWrapper-Bv7F-Gk4.js +2021 -0
- package/dist/TooltipWrapper-CgYlx0Jq.cjs +1 -0
- package/dist/{avatar-CWOs3vxs.js → avatar-BkA_3sri.js} +1 -1
- package/dist/{avatar-m3tSATGp.cjs → avatar-CJH7L2Or.cjs} +1 -1
- package/dist/{calendar-BR9W__-W.js → calendar-CCxXqG5a.js} +10 -11
- package/dist/calendar-ChRJyGvt.cjs +1 -0
- package/dist/{checkbox-Bv_EiCrx.js → checkbox-DTLp-Oqj.js} +2 -2
- package/dist/{checkbox-DrL8aED5.cjs → checkbox-_Uxyw6xN.cjs} +1 -1
- package/dist/{chevron-down-tKbXGF9E.js → chevron-down-C3s8jU6B.js} +1 -1
- package/dist/chevron-left-BFr8XZyF.js +5 -0
- package/dist/chevron-left-HWhRo6IH.cjs +1 -0
- package/dist/{circle-alert-CQY8GSNi.js → circle-alert-B2AMDd8N.js} +1 -1
- package/dist/{date-time-picker-DxkoL4hD.js → date-time-picker-B9QBboUX.js} +7 -7
- package/dist/date-time-picker-BPwpIWxg.cjs +1 -0
- package/dist/{download-CmRcT58S.js → download-panVHmk6.js} +1 -1
- package/dist/{ellipsis-CCZF_cvh.js → ellipsis-CuqNthAj.js} +1 -1
- package/dist/{index-WRg7XmVa.js → index-B7foCkRR.js} +50 -49
- package/dist/index-BKsqtcvu.cjs +2 -0
- package/dist/index-BmjgUrNF.cjs +2 -0
- package/dist/{index-B-TRhwk4.js → index-CpEN0z3t.js} +24 -24
- package/dist/{index-BppkFW5-.js → index-D2HX-sbl.js} +42 -43
- package/dist/index-DEIRrhVY.cjs +1 -0
- package/dist/index-DGhcUfqi.cjs +7 -0
- package/dist/{index-BunKZUEt.js → index-pr_yrvsV.js} +1495 -1416
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +62 -4
- package/dist/index.es.js +245 -231
- package/dist/{info-BDmr8PJk.js → info-BuURqzhx.js} +1 -1
- package/dist/{input-BwEWZkMW.cjs → input-D1zXv4Kl.cjs} +1 -1
- package/dist/{input-DqyAoZa9.js → input-DG8ycH6m.js} +1 -1
- package/dist/{isBefore-CTwR56mw.cjs → isBefore-BAixcVtb.cjs} +1 -1
- package/dist/{isBefore-DxtoOU-T.js → isBefore-DdLSsf0_.js} +2 -2
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.es.js +5 -5
- package/dist/{label-CbmQD-s4.js → label-Ch1wkGGP.js} +2 -2
- package/dist/label-DrUloKDN.cjs +1 -0
- package/dist/{layers-DNHQOu07.js → layers-BA4i1fYX.js} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +58 -0
- package/dist/layout.es.js +16 -12
- package/dist/popover-4Ng-GmwM.cjs +1 -0
- package/dist/{dropdown-menu-DdkjXzq1.js → popover-DstiJFa3.js} +121 -106
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.es.js +6 -6
- package/dist/{scroll-area-BCstMooj.cjs → scroll-area-B_yufXtG.cjs} +1 -1
- package/dist/{scroll-area-DtvmNg-L.js → scroll-area-mGPAChYm.js} +2 -2
- package/dist/select-BxcAKVaB.cjs +1 -0
- package/dist/{select-CcLB-krA.js → select-BxiFqo8j.js} +6 -6
- package/dist/settings-BuS8Pqjb.cjs +1 -0
- package/dist/{settings-BkZ7kdog.js → settings-HCrwja-A.js} +17 -6
- package/dist/signature.cjs +1 -1
- package/dist/signature.es.js +1 -1
- package/dist/{sortable.esm-DU16Scox.cjs → sortable.esm-DDmDbyCC.cjs} +1 -1
- package/dist/{sortable.esm-CPZHpcxS.js → sortable.esm-eBjUK76c.js} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.es.js +11 -10
- package/dist/theme-vars.css +156 -0
- package/dist/tooltip-C216fkmP.js +490 -0
- package/dist/tooltip-CDLAzCi8.cjs +1 -0
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.es.js +69 -69
- package/dist/{useInitCoreServices-J1k9YgF4.js → useInitCoreServices-BC7QMeLn.js} +635 -554
- package/dist/{useInitCoreServices-BCuuNsu5.cjs → useInitCoreServices-DSudhSFo.cjs} +1 -1
- package/dist/{useService-HK9_CuU3.js → useService-BKWyN7jJ.js} +2 -2
- package/dist/{useService-DKtODQpB.cjs → useService-DBnjCLOu.cjs} +1 -1
- package/dist/{useServiceState-cBut6x4E.js → useServiceState-DWb3cncq.js} +1 -1
- package/dist/{useServiceState-BGQiGyXF.cjs → useServiceState-MlrHzngO.cjs} +1 -1
- package/package.json +12 -12
- package/dist/EzEventModal-DuKSTESr.cjs +0 -1
- package/dist/EzGroupingPanel-Bn2JgaOA.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-Bhp3B8DK.cjs +0 -1
- package/dist/EzSchedulerToolbar-DDyth429.cjs +0 -1
- package/dist/EzTableEditDialog-C9vNta7y.cjs +0 -1
- package/dist/EzTableToolbar-aY1sSBBb.cjs +0 -1
- package/dist/NotificationPanel-HoqM63z8.cjs +0 -1
- package/dist/TooltipWrapper-CEHdYnI-.js +0 -2373
- package/dist/TooltipWrapper-gco5CexX.cjs +0 -1
- package/dist/button-DT4Inu2c.cjs +0 -1
- package/dist/button-eeeIyCtP.js +0 -139
- package/dist/calendar-BE2zOlsW.cjs +0 -1
- package/dist/date-time-picker-Cl9JFWO8.cjs +0 -1
- package/dist/dropdown-menu-BWyO06-P.cjs +0 -1
- package/dist/index-B6tOG5n-.cjs +0 -2
- package/dist/index-Btkuh0Jp.cjs +0 -7
- package/dist/index-BwJuUg0J.cjs +0 -1
- package/dist/index-D4eq_ohu.cjs +0 -2
- package/dist/label-Cm2Ayqls.cjs +0 -1
- package/dist/popover-2vzx8NRx.cjs +0 -1
- package/dist/popover-Bl6ydwov.js +0 -22
- package/dist/select-CyzLABFE.cjs +0 -1
- package/dist/settings-BHRhM0Qw.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as R from "react";
|
|
2
2
|
import P, { useRef as N, useState as X, useEffect as E, useMemo as M, useCallback as V, useLayoutEffect as mr, createContext as je, memo as br, useReducer as xr, useContext as we, cloneElement as yr, forwardRef as wr } from "react";
|
|
3
3
|
import { defaultRangeExtractor as Cr, elementScroll as Sr, useVirtualizer as qt } from "@tanstack/react-virtual";
|
|
4
|
-
import { u as dn, c as le } from "./useInitCoreServices-
|
|
4
|
+
import { u as dn, c as le } from "./useInitCoreServices-BC7QMeLn.js";
|
|
5
5
|
import { Virtualizer as Rr, elementScroll as Dr } from "@tanstack/virtual-core";
|
|
6
|
-
import { g as Er,
|
|
6
|
+
import { g as Er, f as Mr, R as Nr, A as Ar, P as Or, e as Le, l as fn, m as Tr, n as zr, S as Ir, I as Pr, d as Lr, G as kr, q as _r, i as Br, r as Fr, o as $r, p as Vr, L as jr, s as Ur, t as Xr, v as Gr, w as Yr, x as Kr, y as Wr, C as Hr } from "./EzErrorBoundary-D4NBadES.js";
|
|
7
7
|
import { unstable_batchedUpdates as Qe, createPortal as qr } from "react-dom";
|
|
8
8
|
import { jsx as p, jsxs as se, Fragment as et } from "react/jsx-runtime";
|
|
9
9
|
class Jr {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("react"),We=require("@tanstack/react-virtual"),Z=require("./useInitCoreServices-
|
|
1
|
+
"use strict";const c=require("react"),We=require("@tanstack/react-virtual"),Z=require("./useInitCoreServices-DSudhSFo.cjs"),Ut=require("@tanstack/virtual-core"),M=require("./EzErrorBoundary-CEdz_hDo.cjs"),Ae=require("react-dom"),g=require("react/jsx-runtime");function pr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=pr(c);class vr{name="VirtualizationService";virtualizers=new Map;createVirtualizer(t,n){const r=new Ut.Virtualizer({count:n.count,getScrollElement:n.getScrollElement,estimateSize:n.estimateSize,overscan:n.overscan??5,horizontal:n.horizontal??!1,scrollToFn:Ut.elementScroll,observeElementRect:(o,s)=>{const a=o.scrollElement;if(!a||a===window)return;const i=new ResizeObserver(l=>{s(l[0].contentRect)});return i.observe(a),()=>i.disconnect()},observeElementOffset:(o,s)=>{const a=o.scrollElement;if(!a)return;const i=()=>{s(a===window?window.scrollY:a.scrollTop,!0)};return a.addEventListener("scroll",i,{passive:!0}),s(a===window?window.scrollY:a.scrollTop,!1),()=>a.removeEventListener("scroll",i)}});return this.virtualizers.set(t,r),r}registerVirtualizer(t,n){this.virtualizers.set(t,n)}getVirtualizer(t){return this.virtualizers.get(t)}cleanup(){this.virtualizers.clear()}}const br=e=>{const{rowCount:t,rowHeight:n=48,overscanCount:r=5,enableRowVirtualization:o=!0,columnCount:s=0,columnWidth:a=150,enableColumnVirtualization:i=!1,scrollMargin:l=0,scrollPaddingStart:u=0,scrollPaddingEnd:f=0,progressiveRendering:d=!1,prefetchDistance:h=5,adaptiveSizing:p=!1,languageDirection:R="ltr",debug:v=!1,customRangeExtractor:b,onScroll:y,onScrollStart:w,onScrollStop:C}=e,A=c.useRef(null),[S,D]=c.useState(d?1:r||h),x=c.useRef(null),m=c.useRef(null),N=c.useRef(!1),z="lanugageDirection";c.useEffect(()=>{if(!d)return;let T;const k=()=>{D(1),clearTimeout(T),T=setTimeout(()=>{D(r||h)},150)},se=A.current;if(se)return se.addEventListener("scroll",k,{passive:!0}),()=>{se.removeEventListener("scroll",k),clearTimeout(T)}},[d,r,h]);const O=c.useMemo(()=>b||(T=>{const k=We.defaultRangeExtractor(T);return k.length===0&&T.count>0?[0]:k}),[b]),U=c.useCallback((T,k,se)=>{We.elementScroll(T,k,se)},[]),Y=c.useMemo(()=>({count:t,getScrollElement:()=>A.current,estimateSize:typeof n=="function"?n:()=>n,overscan:S,scrollMargin:l,scrollPaddingStart:u,scrollPaddingEnd:f,rangeExtractor:O,scrollToFn:U,[z]:R,onChange:T=>{const k=T.scrollOffset??0;m.current!==null&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>{y?.(k),m.current=null}),T.isScrolling?N.current||(N.current=!0,w?.()):N.current&&(N.current=!1,C?.())}}),[t,n,S,p,l,u,f,O,U,y,w,C]),I=We.useVirtualizer(Y);c.useEffect(()=>{v&&console.log("[DEBUG_VIRTUAL] Virtualizer instance changed")},[I,v]);const $e=Z.useEzServiceRegistry(),pe=c.useMemo(()=>M.getOrRegisterService($e,"VirtualizationService",()=>new vr),[]);c.useEffect(()=>{e.id&&pe&&pe.registerVirtualizer(e.id,I)},[e.id,I,pe]);const W=c.useMemo(()=>({horizontal:!0,count:i&&s?s:0,getScrollElement:()=>A.current,estimateSize:typeof a=="function"?a:()=>a,overscan:S,rangeExtractor:O,[z]:R}),[i,s,a,S,O]),Ue=We.useVirtualizer(W),H=i&&s?Ue:void 0;c.useEffect(()=>()=>{x.current&&clearTimeout(x.current),m.current!==null&&cancelAnimationFrame(m.current)},[]),c.useEffect(()=>{v&&process.env.NODE_ENV!=="production"&&console.log("Virtualization Debug:",{rowCount:t,visibleRows:I.getVirtualItems().length,activeOverscan:S,scrollOffset:I.scrollOffset})},[v,t,I,S]);const ve=(T,k)=>{I.scrollToIndex(T,k)};return{parentRef:A,rowVirtualizer:I,columnVirtualizer:H,scrollToIndex:ve,scrollToRow:ve,scrollToColumn:H?(T,k)=>{H.scrollToIndex(T,k)}:void 0,getVirtualItems:()=>I.getVirtualItems(),scrollOffset:I.scrollOffset??0}};function mr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const nt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Se(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ct(e){return"nodeType"in e}function B(e){var t,n;return e?Se(e)?e:Ct(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=B(e);return e instanceof t}function Ke(e){return Se(e)?!1:e instanceof B(e).HTMLElement}function on(e){return e instanceof B(e).SVGElement}function Re(e){return e?Se(e)?e.document:Ct(e)?wt(e)?e:Ke(e)||on(e)?e.ownerDocument:document:document:document}const ne=nt?c.useLayoutEffect:c.useEffect;function rt(e){const t=c.useRef(e);return ne(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function xr(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function je(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ne(()=>{n.current!==e&&(n.current=e)},t),n}function Be(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=rt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qe(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ht={};function Fe(e,t){return c.useMemo(()=>{if(t)return t;const n=ht[e]==null?0:ht[e]+1;return ht[e]=n,e+"-"+n},[e,t])}function sn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const i=Object.entries(a);for(const[l,u]of i){const f=s[l];f!=null&&(s[l]=f+e*u)}return s},{...t})}}const Ce=sn(1),Le=sn(-1);function yr(e){return"clientX"in e&&"clientY"in e}function ot(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Cr(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function Ze(e){if(Cr(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return yr(e)?{x:e.clientX,y:e.clientY}:null}const we=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[we.Translate.toString(e),we.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Xt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wr(e){return e.matches(Xt)?e:e.querySelector(Xt)}const Sr={display:"none"};function Rr(e){let{id:t,value:n}=e;return c.createElement("div",{id:t,style:Sr},n)}function Mr(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return c.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Er(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const an=c.createContext(null);function Dr(e){const t=c.useContext(an);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Nr(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:s}=r;e.forEach(a=>{var i;return(i=a[o])==null?void 0:i.call(a,s)})},[e]),t]}const Or={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -3671,19 +3671,19 @@ class ba extends Kr {
|
|
|
3671
3671
|
export {
|
|
3672
3672
|
Rn as $,
|
|
3673
3673
|
oa as A,
|
|
3674
|
-
|
|
3674
|
+
Bn as B,
|
|
3675
3675
|
Zc as C,
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3676
|
+
Xn as D,
|
|
3677
|
+
as as E,
|
|
3678
|
+
xn as F,
|
|
3679
3679
|
ca as G,
|
|
3680
|
-
|
|
3680
|
+
ls as H,
|
|
3681
3681
|
la as I,
|
|
3682
|
-
|
|
3683
|
-
|
|
3682
|
+
us as J,
|
|
3683
|
+
wa as K,
|
|
3684
3684
|
aa as L,
|
|
3685
|
-
|
|
3686
|
-
|
|
3685
|
+
no as M,
|
|
3686
|
+
ba as N,
|
|
3687
3687
|
ea as O,
|
|
3688
3688
|
U as P,
|
|
3689
3689
|
ts as Q,
|
|
@@ -3697,31 +3697,31 @@ export {
|
|
|
3697
3697
|
fr as Y,
|
|
3698
3698
|
Fs as Z,
|
|
3699
3699
|
_o as _,
|
|
3700
|
-
|
|
3700
|
+
Cn as a,
|
|
3701
3701
|
ta as a0,
|
|
3702
|
-
|
|
3702
|
+
Ie as b,
|
|
3703
3703
|
we as c,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3704
|
+
Je as d,
|
|
3705
|
+
T as e,
|
|
3706
|
+
Q as f,
|
|
3707
3707
|
Jc as g,
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3708
|
+
oe as h,
|
|
3709
|
+
co as i,
|
|
3710
|
+
wt as j,
|
|
3711
|
+
Oe as k,
|
|
3712
|
+
na as l,
|
|
3713
|
+
ia as m,
|
|
3714
|
+
sa as n,
|
|
3715
|
+
ua as o,
|
|
3716
|
+
pa as p,
|
|
3717
|
+
fa as q,
|
|
3718
|
+
va as r,
|
|
3719
|
+
da as s,
|
|
3720
|
+
ya as t,
|
|
3721
|
+
V as u,
|
|
3722
|
+
ga as v,
|
|
3723
|
+
ha as w,
|
|
3724
|
+
Xc as x,
|
|
3725
|
+
qc as y,
|
|
3726
3726
|
Qc as z
|
|
3727
3727
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("react"),F=require("@tanstack/react-form"),D=require("react-dom"),c=require("./tooltip-CDLAzCi8.cjs"),b=require("./input-D1zXv4Kl.cjs"),i=require("./label-DrUloKDN.cjs"),x=require("./useInitCoreServices-DSudhSFo.cjs"),m=require("./date-time-picker-BPwpIWxg.cjs"),E=require("./calendar-ChRJyGvt.cjs"),A=[{label:"S",value:"SU"},{label:"M",value:"MO"},{label:"T",value:"TU"},{label:"W",value:"WE"},{label:"T",value:"TH"},{label:"F",value:"FR"},{label:"S",value:"SA"}],z=({isOpen:h,onClose:u,mode:d,event:n,onSave:C,onDelete:v,locale:p,editorTemplate:f,headerTemplate:j,footerTemplate:y})=>{const a=F.useForm({defaultValues:{title:n?.title||"",start:n?.start,end:n?.end,resourceIds:n?.resourceIds||(n?.resourceId?[n.resourceId]:[])||[],location:n?.location||"",isAllDay:!!n?.allDay||!!n?.isAllDay||!1,description:n?.description||"",isTimezoneEnabled:!!n?.timezone,startTimezone:n?.timezone?.start||"Asia/Calcutta",endTimezone:n?.timezone?.end||"Asia/Calcutta",repeatFrequency:n?.recurrence?.frequency||"Never",repeatInterval:n?.recurrence?.interval||1,repeatDays:n?.recurrence?.days||[],repeatBy:n?.recurrence?.repeatBy||"day",repeatEndLevel:n?.recurrence?.end||"Never",repeatEndCount:n?.recurrence?.endCount||1,repeatEndUntil:n?.recurrence?.endUntil,attachments:n?.attachments||[]},onSubmit:async({value:r})=>{C({...n,title:r.title,start:r.start,end:r.end,resourceId:r.resourceIds[0],resourceIds:r.resourceIds,location:r.location,allDay:r.isAllDay,description:r.description,timezone:r.isTimezoneEnabled?{start:r.startTimezone,end:r.endTimezone}:void 0,recurrence:r.repeatFrequency!=="Never"?{frequency:r.repeatFrequency,interval:r.repeatInterval,unit:r.repeatFrequency.replace("ly","")+"(s)",end:r.repeatEndLevel,endCount:r.repeatEndLevel==="Count"?r.repeatEndCount:void 0,endUntil:r.repeatEndLevel==="Until"?r.repeatEndUntil:void 0,days:r.repeatFrequency==="Weekly"?r.repeatDays:void 0,repeatBy:r.repeatFrequency==="Monthly"||r.repeatFrequency==="Yearly"?r.repeatBy:void 0}:void 0,attachments:r.attachments}),u()}});if(k.useEffect(()=>{h&&a.reset()},[h,n,a]),!h)return null;const N=r=>{r.preventDefault(),r.stopPropagation(),a.handleSubmit()},o=d==="view",w=e.jsxs("div",{"data-testid":"ez-event-modal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:1e4,backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(2px)",pointerEvents:"auto"},children:[e.jsx("div",{style:{position:"absolute",inset:0},onClick:u}),e.jsxs("div",{className:x.cn("bg-background rounded-xl shadow-2xl flex flex-col border border-border overflow-hidden","animate-in zoom-in-95 fade-in duration-300 ease-out"),style:{backgroundColor:"white",width:"650px",maxWidth:"95vw",maxHeight:"92vh",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10001},children:[e.jsx("div",{className:"flex items-center justify-between shrink-0 bg-background",style:{padding:"16px 40px"},children:j?j(n||{},d):e.jsxs(e.Fragment,{children:[e.jsxs("h2",{className:"text-xl font-bold tracking-tight text-foreground",children:[d==="create"&&"New Event",d==="edit"&&"Edit Event",d==="view"&&"Event Details"]}),e.jsx(c.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-full hover:bg-muted text-muted-foreground mr-[-8px]",onClick:u,children:e.jsx(c.X,{className:"w-5 h-5"})})]})}),f?e.jsx("div",{className:"overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:f(n||{})}):e.jsxs("form",{onSubmit:N,className:"space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"title",validators:{onChange:({value:r})=>r?void 0:"Title is required"},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"title",className:"text-[13px] font-semibold text-foreground/70",children:"Title"}),e.jsx(b.Input,{id:"title",placeholder:"Add title",value:r.state.value,onChange:t=>r.handleChange(t.target.value),onBlur:r.handleBlur,disabled:o,className:x.cn("h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all",r.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:r.state.meta.errors.join(", ")})]})}),e.jsx(a.Field,{name:"location",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"location",className:"text-[13px] font-semibold text-foreground/70",children:"Location"}),e.jsx(b.Input,{id:"location",placeholder:"Add location",value:r.state.value,onChange:t=>r.handleChange(t.target.value),disabled:o,className:"h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"start",validators:{onChange:({value:r})=>r?void 0:"Start date is required"},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Start"}),e.jsx(m.DateTimePicker,{date:r.state.value,setDate:t=>r.handleChange(t),disabled:o,required:!0,locale:p,mode:a.getFieldValue("isAllDay")?"date":"datetime",className:"border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20"}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5",children:r.state.meta.errors.join(", ")})]})}),e.jsx(a.Field,{name:"end",validators:{onChange:({value:r,fieldApi:t})=>{if(!r)return"End date is required";const s=t.form.getFieldValue("start");if(s&&r<=s)return"End time must be after start time"}},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),e.jsx(m.DateTimePicker,{date:r.state.value,setDate:t=>r.handleChange(t),disabled:o,required:!0,locale:p,mode:a.getFieldValue("isAllDay")?"date":"datetime",minDate:a.getFieldValue("start"),className:x.cn("border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20",r.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:r.state.meta.errors.join(", ")})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"isAllDay",children:r=>e.jsx("div",{className:"flex items-center h-10",children:e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[e.jsx("input",{type:"checkbox",checked:r.state.value,onChange:t=>r.handleChange(t.target.checked),disabled:o,className:"h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),e.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"All day event"})]})})}),e.jsx(a.Field,{name:"isTimezoneEnabled",children:r=>e.jsx("div",{className:"flex items-center h-10",children:e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[e.jsx("input",{type:"checkbox",checked:r.state.value,onChange:t=>r.handleChange(t.target.checked),disabled:o,className:"h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),e.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"Enable timezone"})]})})})]}),e.jsx(a.Subscribe,{selector:r=>[r.values.isTimezoneEnabled],children:([r])=>r&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-highlight/50 rounded-lg border border-border animate-in slide-in-from-top-2 duration-300",children:[e.jsx(a.Field,{name:"startTimezone",children:t=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Start Timezone"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})}),e.jsx(a.Field,{name:"endTimezone",children:t=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End Timezone"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"repeatFrequency",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:r.state.value,onChange:t=>r.handleChange(t.target.value),children:[e.jsx("option",{value:"Never",children:"Never"}),e.jsx("option",{value:"Daily",children:"Daily"}),e.jsx("option",{value:"Weekly",children:"Weekly"}),e.jsx("option",{value:"Monthly",children:"Monthly"}),e.jsx("option",{value:"Yearly",children:"Yearly"})]})]})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>r!=="Never"&&e.jsx(a.Field,{name:"repeatEndLevel",children:t=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-2 duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Never",children:"Never"}),e.jsx("option",{value:"Until",children:"Until"}),e.jsx("option",{value:"Count",children:"Count"})]})]})})})]}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency,r.values.repeatEndLevel],children:([r,t])=>r!=="Never"&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300",children:[e.jsx(a.Field,{name:"repeatInterval",children:s=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat every"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("select",{className:"flex-1 h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:s.state.value,onChange:l=>s.handleChange(parseInt(l.target.value)),children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30].map(l=>e.jsx("option",{value:l,children:l},l))}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r==="Daily"?"Day(s)":r.replace("ly","")+"(s)"})]})]})}),t==="Until"&&e.jsx(a.Field,{name:"repeatEndUntil",children:s=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Until"}),e.jsx(m.DateTimePicker,{date:s.state.value,setDate:l=>s.handleChange(l),disabled:o,locale:p,mode:"date",minDate:a.getFieldValue("start"),className:"border-border focus:border-primary"})]})}),t==="Count"&&e.jsx(a.Field,{name:"repeatEndCount",children:s=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Occurrences"}),e.jsx(b.Input,{type:"number",min:1,value:s.state.value,onChange:l=>s.handleChange(parseInt(l.target.value)),className:"h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>r==="Weekly"&&e.jsx(a.Field,{name:"repeatDays",children:t=>e.jsxs("div",{className:"space-y-3 animate-in fade-in duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(s=>e.jsx("button",{type:"button",onClick:()=>{const l=t.state.value||[];l.includes(s.value)?t.handleChange(l.filter(g=>g!==s.value)):t.handleChange([...l,s.value])},className:x.cn("w-9 h-9 rounded-full flex items-center justify-center text-sm font-bold transition-all border",(t.state.value||[]).includes(s.value)?"bg-primary text-white border-primary shadow-sm":"bg-background text-foreground/60 border-border/60 hover:border-primary/40 hover:text-primary"),children:s.label},s.value))})]})})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>(r==="Monthly"||r==="Yearly")&&e.jsx(a.Field,{name:"repeatBy",children:t=>e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[e.jsx("input",{type:"radio",name:"repeatBy",checked:t.state.value==="day",onChange:()=>t.handleChange("day"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),e.jsx("span",{className:"text-sm text-foreground/80",children:"Day of the month"})]}),e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[e.jsx("input",{type:"radio",name:"repeatBy",checked:t.state.value==="ordinal",onChange:()=>t.handleChange("ordinal"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),e.jsx("span",{className:"text-sm text-foreground/80",children:"Ordinal position"})]})]})]})})}),e.jsx(a.Field,{name:"description",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"description",className:"text-[13px] font-semibold text-foreground/70",children:"Description"}),e.jsx("textarea",{id:"description",placeholder:"Add description",className:"flex min-h-[100px] w-full rounded-md border-border bg-background px-4 py-3 text-sm placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 resize-none transition-all hover:border-border",value:r.state.value,onChange:t=>r.handleChange(t.target.value),disabled:o})]})}),e.jsx(a.Field,{name:"attachments",children:r=>e.jsxs("div",{className:"space-y-4 pt-4 pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(i.Label,{className:"text-[13px] font-semibold text-foreground/70 flex items-center gap-2",children:[e.jsx(m.Paperclip,{className:"w-4 h-4"})," Attachments"]}),e.jsx("input",{type:"file",id:"file-upload",multiple:!0,className:"hidden",onChange:t=>{t.target.files&&r.handleChange([...r.state.value||[],...Array.from(t.target.files)])}}),e.jsxs(c.Button,{type:"button",variant:"outline",size:"sm",className:"h-8 text-xs font-semibold gap-2 border-dashed border-border/50 hover:border-primary/40 hover:text-primary transition-all",onClick:()=>document.getElementById("file-upload")?.click(),children:[e.jsx(m.Paperclip,{className:"w-3 h-3"})," Add Files"]})]}),(r.state.value||[]).length>0&&e.jsx("div",{className:"grid grid-cols-1 gap-3",children:(r.state.value||[]).map((t,s)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-highlight border border-border group hover:border-border transition-all",children:[e.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[e.jsx("div",{className:"w-9 h-9 rounded-md bg-white border border-border flex items-center justify-center shrink-0 shadow-sm",children:e.jsx(m.Paperclip,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsx("span",{className:"text-[13px] font-medium text-foreground truncate",children:t.name}),e.jsxs("span",{className:"text-[11px] text-muted-foreground font-medium",children:[(t.size/1024).toFixed(1)," KB"]})]})]}),e.jsx(c.Button,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground/50 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all",onClick:()=>r.handleChange((r.state.value||[]).filter((l,g)=>g!==s)),children:e.jsx(E.Trash2,{className:"w-4 h-4"})})]},s))})]})})]}),y?y(n||{},d,()=>N({}),u):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"24px 40px",backgroundColor:"var(--highlight)",gap:"12px",width:"100%",flexShrink:0},children:[!o&&v&&d==="edit"&&e.jsx(c.Button,{type:"button",variant:"ghost",className:"text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto",onClick:()=>{v(n?.id),u()},children:"Delete"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[!o&&e.jsx(a.Subscribe,{selector:r=>[r.canSubmit,r.isSubmitting],children:([r,t])=>e.jsx(c.Button,{type:"submit",variant:"default",className:"h-10 px-10 font-bold rounded-md shrink-0 flex items-center justify-center transition-all hover:opacity-90",style:{minWidth:"120px"},disabled:!r||t,onClick:s=>{s.preventDefault(),s.stopPropagation(),a.handleSubmit()},children:t?"Saving...":"Save"})}),e.jsx(c.Button,{type:"button",variant:"outline",className:"h-10 px-8 font-bold border border-border hover:bg-highlight text-foreground shrink-0 rounded-md transition-all",style:{minWidth:"100px"},onClick:u,children:"Cancel"})]})]})]})]});return D.createPortal(w,document.body)};exports.EzEventModal=z;
|
|
@@ -2,12 +2,12 @@ import { jsxs as a, jsx as r, Fragment as E } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect as A } from "react";
|
|
3
3
|
import { useForm as z } from "@tanstack/react-form";
|
|
4
4
|
import { createPortal as S } from "react-dom";
|
|
5
|
-
import { B as u, X as T } from "./
|
|
6
|
-
import { I as v } from "./input-
|
|
7
|
-
import { L as o } from "./label-
|
|
8
|
-
import { c as h } from "./useInitCoreServices-
|
|
9
|
-
import { D as x, P as f } from "./date-time-picker-
|
|
10
|
-
import { T as I } from "./calendar-
|
|
5
|
+
import { B as u, X as T } from "./tooltip-C216fkmP.js";
|
|
6
|
+
import { I as v } from "./input-DG8ycH6m.js";
|
|
7
|
+
import { L as o } from "./label-Ch1wkGGP.js";
|
|
8
|
+
import { c as h } from "./useInitCoreServices-BC7QMeLn.js";
|
|
9
|
+
import { D as x, P as f } from "./date-time-picker-B9QBboUX.js";
|
|
10
|
+
import { T as I } from "./calendar-CCxXqG5a.js";
|
|
11
11
|
const B = [
|
|
12
12
|
{ label: "S", value: "SU" },
|
|
13
13
|
{ label: "M", value: "MO" },
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { k as b, l as f, D as v, m as N, n as S, P as y, c as w, C } from "./EzContextMenu-
|
|
3
|
-
import { S as D, v as G, a as L, s as R, h as k, u as z } from "./sortable.esm-
|
|
4
|
-
import { c as g } from "./useInitCoreServices-
|
|
5
|
-
import { L as E } from "./layers-
|
|
6
|
-
import { C as P } from "./EzErrorBoundary-
|
|
7
|
-
import { G as j } from "./index-
|
|
8
|
-
import { X as I } from "./
|
|
2
|
+
import { k as b, l as f, D as v, m as N, n as S, P as y, c as w, C } from "./EzContextMenu-BsHdOgtL.js";
|
|
3
|
+
import { S as D, v as G, a as L, s as R, h as k, u as z } from "./sortable.esm-eBjUK76c.js";
|
|
4
|
+
import { c as g } from "./useInitCoreServices-BC7QMeLn.js";
|
|
5
|
+
import { L as E } from "./layers-BA4i1fYX.js";
|
|
6
|
+
import { C as P } from "./EzErrorBoundary-D4NBadES.js";
|
|
7
|
+
import { G as j } from "./index-B7foCkRR.js";
|
|
8
|
+
import { X as I } from "./tooltip-C216fkmP.js";
|
|
9
9
|
function K({
|
|
10
10
|
items: t,
|
|
11
11
|
onReorder: i,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./EzContextMenu-C3eDRS7E.cjs"),l=require("./sortable.esm-DDmDbyCC.cjs"),p=require("./useInitCoreServices-DSudhSFo.cjs"),f=require("./layers-xSPd-hz3.cjs"),v=require("./EzErrorBoundary-CEdz_hDo.cjs"),j=require("./index-DGhcUfqi.cjs"),y=require("./tooltip-CDLAzCi8.cjs");function S({items:t,onReorder:d,renderItem:u,getId:n,strategy:i=l.verticalListSortingStrategy,className:m}){const r=o.useSensors(o.useSensor(o.PointerSensor,{activationConstraint:{distance:8}}),o.useSensor(o.KeyboardSensor,{coordinateGetter:l.sortableKeyboardCoordinates}));function c(s){const{active:a,over:x}=s;if(x&&a.id!==x.id){const h=t.findIndex(g=>n(g)===a.id),b=t.findIndex(g=>n(g)===x.id);d(l.arrayMove(t,h,b))}}return e.jsx(o.DndContext,{sensors:r,collisionDetection:o.closestCenter,onDragEnd:c,children:e.jsx(l.SortableContext,{items:t.map(n),strategy:i,children:e.jsx("div",{className:m,children:t.map((s,a)=>u(s,a))})})})}const N=({id:t,label:d,onRemove:u,showSeparator:n})=>{const{attributes:i,listeners:m,setNodeRef:r,transform:c,transition:s,isDragging:a}=l.useSortable({id:t}),x={transform:o.CSS.Transform.toString(c),transition:s,zIndex:a?50:void 0};return e.jsxs("div",{ref:r,style:x,className:"flex items-center",children:[n&&e.jsx("div",{className:"flex items-center text-muted-foreground mr-2",children:e.jsx(v.ChevronRight,{className:"w-4 h-4"})}),e.jsxs("div",{className:p.cn("flex items-center gap-1.5 px-2 py-1 bg-card border border-border rounded-md shadow-sm transition-all duration-200",a?"opacity-50 scale-105 border-primary shadow-lg":"hover:border-primary/50"),children:[e.jsx("div",{...i,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/50 hover:text-primary transition-colors",children:e.jsx(j.GripVertical,{className:"w-3.5 h-3.5"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),e.jsx("button",{onClick:h=>{h.stopPropagation(),u()},className:"p-0.5 hover:bg-muted rounded transition-colors",children:e.jsx(y.X,{className:"w-3 h-3 text-muted-foreground hover:text-destructive"})})]})]})},w=({grouping:t,onGroupingChange:d,columns:u})=>{const{setNodeRef:n,isOver:i}=o.useDroppable({id:"grouping-panel"}),m=r=>u.find(s=>s.id===r)?.columnDef.header||r;return e.jsxs("div",{ref:n,className:p.cn("flex items-center gap-2 p-2 min-h-[40px] border rounded-md transition-all duration-200","bg-muted/40 border-dashed border-border",i&&"bg-highlight border-selection ring-1 ring-selection"),children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mr-2",children:[e.jsx(f.Layers,{className:"w-4 h-4"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-wider",children:"Group By"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.length===0&&!i&&e.jsx("span",{className:"text-sm text-muted-foreground/70 italic",children:"Drag columns here to group"}),e.jsx(S,{items:t,onReorder:d,getId:r=>r,strategy:l.horizontalListSortingStrategy,className:"flex flex-wrap gap-y-2",renderItem:(r,c)=>e.jsx(N,{id:r,label:m(r),onRemove:()=>d(t.filter(s=>s!==r)),showSeparator:c>0},r)}),i&&e.jsx("div",{className:"px-2 py-1 border border-selection border-dashed bg-highlight/50 rounded-md text-sm text-selection animate-pulse",children:"Drop to Group"})]})]})};exports.EzGroupingPanel=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),a=require("./tooltip-CDLAzCi8.cjs"),k=require("./input-D1zXv4Kl.cjs"),y=require("./useInitCoreServices-DSudhSFo.cjs"),f=require("./isBefore-BAixcVtb.cjs"),l=require("./index-BmjgUrNF.cjs"),E=require("./circle-alert-77QqFR-z.cjs"),q=require("./ellipsis-CzlqJf-i.cjs"),z=({start:t,end:c,resourceId:o,resources:p,onSave:g,onCancel:r,onMoreOptions:j,position:m})=>{const[n,v]=i.useState(""),x=i.useRef(null),d=i.useRef(null);i.useEffect(()=>{x.current?.focus()},[]),i.useEffect(()=>{const s=N=>{d.current&&!d.current.contains(N.target)&&r()};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r]);const h=()=>{n.trim()&&g({title:n,start:t,end:c,resourceId:o})},b=s=>{s.key==="Enter"&&h(),s.key==="Escape"&&r()},u=p?.find(s=>s.id===o),w=f.isBefore(t,new Date);return e.jsxs("div",{ref:d,className:y.cn("fixed z-[100] w-[320px] p-4 rounded-xl shadow-2xl animate-in fade-in zoom-in duration-200","bg-background/80 backdrop-blur-xl border border-white/20 dark:border-white/10","shadow-[0_8px_32px_rgba(0,0,0,0.12)]"),style:{left:Math.min(m.x,window.innerWidth-340),top:Math.min(m.y,window.innerHeight-200)},children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Quick Add"})]}),e.jsx(a.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-full",onClick:r,children:e.jsx(a.X,{className:"h-3 w-3"})})]}),e.jsx(k.Input,{ref:x,placeholder:"What's the plan?",value:n,onChange:s=>v(s.target.value),onKeyDown:b,className:"mb-4 bg-transparent border-none text-lg font-bold p-0 focus-visible:ring-0 placeholder:text-muted-foreground/50 h-auto"}),e.jsxs("div",{className:"space-y-2 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(f.Calendar,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:l.format(t,"EEE, MMM d")})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(l.Clock,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[l.format(t,"h:mm a")," - ",l.format(c,"h:mm a")]})]}),u&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("div",{className:"w-3.5 h-3.5 rounded-full",style:{backgroundColor:u.color||"hsl(var(--primary))"}}),e.jsx("span",{children:u.name})]}),w&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-warning-foreground font-medium",children:[e.jsx(E.CircleAlert,{className:"h-3 w-3"}),e.jsx("span",{children:"This event is in the past"})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[e.jsxs(a.Button,{variant:"ghost",size:"sm",className:"h-8 gap-2 text-muted-foreground hover:text-foreground",onClick:()=>j({title:n,start:t,end:c,resourceId:o}),children:[e.jsx(q.Ellipsis,{className:"h-4 w-4"}),"More"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(a.Button,{variant:"ghost",size:"sm",onClick:r,className:"h-8",children:"Cancel"}),e.jsx(a.Button,{size:"sm",onClick:h,className:"h-8 px-4",disabled:!n.trim(),children:"Save"})]})]})]})};exports.EzSchedulerQuickAdd=z;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as E, useRef as p, useEffect as x } from "react";
|
|
3
|
-
import { B as i, X as C } from "./
|
|
4
|
-
import { I as z } from "./input-
|
|
5
|
-
import { c as M } from "./useInitCoreServices-
|
|
6
|
-
import { i as j, C as S } from "./isBefore-
|
|
7
|
-
import { f as m, C as A } from "./index-
|
|
8
|
-
import { C as B } from "./circle-alert-
|
|
9
|
-
import { E as D } from "./ellipsis-
|
|
3
|
+
import { B as i, X as C } from "./tooltip-C216fkmP.js";
|
|
4
|
+
import { I as z } from "./input-DG8ycH6m.js";
|
|
5
|
+
import { c as M } from "./useInitCoreServices-BC7QMeLn.js";
|
|
6
|
+
import { i as j, C as S } from "./isBefore-DdLSsf0_.js";
|
|
7
|
+
import { f as m, C as A } from "./index-CpEN0z3t.js";
|
|
8
|
+
import { C as B } from "./circle-alert-B2AMDd8N.js";
|
|
9
|
+
import { E as D } from "./ellipsis-CuqNthAj.js";
|
|
10
10
|
const P = ({
|
|
11
11
|
start: s,
|
|
12
12
|
end: o,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),r=require("./tooltip-CDLAzCi8.cjs"),D=require("./input-D1zXv4Kl.cjs"),P=require("./useInitCoreServices-DSudhSFo.cjs"),s=require("./select-BxcAKVaB.cjs"),l=require("./popover-4Ng-GmwM.cjs"),M=require("./calendar-ChRJyGvt.cjs"),_=require("./scroll-area-B_yufXtG.cjs"),g=require("./settings-BuS8Pqjb.cjs"),I=require("./info-BY2cfl1l.cjs"),m=require("./EzErrorBoundary-CEdz_hDo.cjs"),L=require("./circle-alert-77QqFR-z.cjs"),z=require("./chevron-left-HWhRo6IH.cjs"),A=require("./isBefore-BAixcVtb.cjs"),k=require("./index-BmjgUrNF.cjs"),R=require("./download-0ZhO2XaW.cjs"),V=()=>{const n=P.useEzServiceRegistry(),[o,v]=x.useState([]),[j,p]=x.useState(!1);x.useEffect(()=>{let t;const i=()=>{const h=n.get("NotificationService");h&&!t&&(t=h.subscribe(w=>v(w)))};i();const u=n.subscribe(()=>{i()});return()=>{t&&t(),u()}},[]);const f=()=>{n.get("NotificationService")?.clearAll()},N=(t,i)=>{i.stopPropagation(),n.get("NotificationService")?.remove(t)},b=t=>{switch(t){case"success":return e.jsx(I.CircleCheckBig,{className:"h-4 w-4 text-green-600"});case"error":return e.jsx(L.CircleAlert,{className:"h-4 w-4 text-red-600"});case"warning":return e.jsx(m.TriangleAlert,{className:"h-4 w-4 text-amber-600"});default:return e.jsx(I.Info,{className:"h-4 w-4 text-blue-600"})}};return e.jsxs(l.Popover,{open:j,onOpenChange:p,children:[e.jsx(l.PopoverTrigger,{asChild:!0,children:e.jsxs(r.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground relative",children:[e.jsx(g.Bell,{className:"w-5 h-5"}),o.length>0&&e.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white ring-2 ring-background animate-in zoom-in duration-300",children:o.length>9?"9+":o.length})]})}),e.jsxs(l.PopoverContent,{className:"w-80 p-0 mr-4",align:"end",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"Notifications"}),o.length>0&&e.jsxs(r.Button,{variant:"ghost",size:"sm",className:"h-auto px-2 py-1 text-xs text-muted-foreground hover:text-destructive",onClick:f,children:[e.jsx(M.Trash2,{className:"w-3 h-3 mr-1"}),"Clear all"]})]}),e.jsx(_.ScrollArea,{className:"h-[300px]",children:o.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-[200px] text-muted-foreground",children:[e.jsx(g.Bell,{className:"w-8 h-8 mb-2 opacity-20"}),e.jsx("p",{className:"text-xs",children:"No notifications"})]}):e.jsx("div",{className:"flex flex-col divide-y",children:o.map(t=>e.jsx("div",{className:"p-4 hover:bg-muted/50 transition-colors relative group",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"shrink-0 mt-0.5",children:b(t.type)}),e.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs leading-relaxed text-foreground/90 break-words",children:t.message}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Just now"})]}),e.jsx("button",{onClick:i=>N(t.id,i),className:"opacity-0 group-hover:opacity-100 transition-opacity absolute top-2 right-2 p-1 hover:bg-background rounded-md text-muted-foreground hover:text-foreground",children:e.jsx(r.X,{className:"w-3 h-3"})})]})},t.id))})})]})]})},$=n=>n.replace(/([A-Z])/g," $1").trim(),G=(n,o)=>k.format(n,"MMMM yyyy"),B=x.memo(({currentDate:n,next:o,prev:v,today:j,slotDuration:p,setSlotDuration:f,setCurrentDate:N,onPrev:b,onNext:t,onToday:i,currentView:u,onViewChange:h,views:w=[],onExportExcel:T,onExportCSV:q,onExportICS:E,dir:O})=>{const S=O==="rtl",C=(c,a)=>{if(typeof c=="string")switch(c){case"Previous":return e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:b,children:e.jsx(z.ChevronLeft,{className:"h-4 w-4"})},a);case"Next":return e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:t,children:e.jsx(m.ChevronRight,{className:"h-4 w-4"})},a);case"Today":return e.jsx(r.Button,{variant:"outline",onClick:i,children:"Today"},a);case"DateRange":return e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-lg font-semibold min-w-[200px] text-center",children:G(n)})},a);case"Search":return e.jsxs("div",{className:"relative w-48 hidden md:block",children:[e.jsx(s.Search,{className:P.cn("absolute top-2.5 h-4 w-4 text-muted-foreground",S?"right-2":"left-2")}),e.jsx(D.Input,{placeholder:"Search...",className:"ps-8 h-9"})]},a);case"Timezone":return e.jsxs(r.Button,{variant:"ghost",size:"sm",className:"hidden lg:flex gap-1 text-xs text-muted-foreground",children:[e.jsx(g.Globe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"UTC"})]},a);case"ActiveView":return e.jsxs(s.Select,{value:u,onValueChange:d=>h(d),children:[e.jsx(s.SelectTrigger,{className:"w-[140px]",children:e.jsx(s.SelectValue,{placeholder:"Select view"})}),e.jsx(s.SelectContent,{children:w.map(d=>{const y=typeof d=="string"?d:d.option;return e.jsx(s.SelectItem,{value:y,children:$(y)},y)})})]});default:return null}return e.jsx("div",{className:c.cssClass,children:c.text},a)};return e.jsxs("div",{"data-testid":"scheduler-toolbar",className:"flex items-center justify-between p-4 border-b border-border shrink-0 bg-background h-16",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-1.5 ",children:[e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:v,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:S?e.jsx(m.ChevronRight,{className:"w-5 h-5"}):e.jsx(z.ChevronLeft,{className:"w-5 h-5"})}),e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:o,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:S?e.jsx(z.ChevronLeft,{className:"w-5 h-5"}):e.jsx(m.ChevronRight,{className:"w-5 h-5"})}),e.jsxs(l.Popover,{children:[e.jsx(l.PopoverTrigger,{asChild:!0,children:e.jsx(r.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:e.jsx(A.Calendar,{className:"h-4 w-4"})})}),e.jsx(l.PopoverContent,{className:"w-auto p-0",align:"start",children:e.jsx(M.Calendar,{selected:n,onSelect:c=>c&&N(c)})})]})]}),e.jsx("div",{className:"text-xl font-bold tracking-tight text-foreground cursor-pointer hover:text-primary transition-colors ms-4",onClick:()=>{},children:k.format(n,"EEEE, MMM d yyyy")})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[C("Search",0)," ",C("Timezone",1)," ",C("ActiveView",2),e.jsx(r.Button,{variant:"outline",onClick:j,className:"h-9 px-4 text-xs font-bold uppercase tracking-wider border-border hover:bg-muted transition-colors rounded-md",children:"TODAY"}),e.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 px-2 py-1 rounded-lg border border-border/50",children:[e.jsx(k.Clock,{className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsxs(s.Select,{value:String(p),onValueChange:c=>f(Number(c)),children:[e.jsx(s.SelectTrigger,{className:"h-7 w-[90px] text-[10px] font-bold uppercase tracking-tight bg-transparent border-none shadow-none focus:ring-0",children:e.jsx(s.SelectValue,{placeholder:"Interval"})}),e.jsxs(s.SelectContent,{children:[e.jsx(s.SelectItem,{value:"5",children:"5 minutes"}),e.jsx(s.SelectItem,{value:"10",children:"10 minutes"}),e.jsx(s.SelectItem,{value:"15",children:"15 minutes"}),e.jsx(s.SelectItem,{value:"30",children:"30 minutes"}),e.jsx(s.SelectItem,{value:"45",children:"45 minutes"}),e.jsx(s.SelectItem,{value:"60",children:"1 hour"})]})]})]}),e.jsx(V,{}),e.jsxs("div",{className:"flex items-center gap-1 border-s border-border ps-2",children:[T&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:T,title:"Export to Excel",children:e.jsx(R.Download,{className:"w-4 h-4"})}),q&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:q,title:"Export to CSV",children:e.jsx(R.Download,{className:"w-4 h-4 text-primary"})}),E&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:E,title:"Export to ICS",children:e.jsx(A.Calendar,{className:"w-4 h-4"})})]}),e.jsx(r.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground rounded-full",children:e.jsx(g.Settings,{className:"w-5 h-5"})})]})]})});B.displayName="EzSchedulerToolbar";const J=Object.freeze(Object.defineProperty({__proto__:null,EzSchedulerToolbar:B},Symbol.toStringTag,{value:"Module"}));exports.EzNotificationDropdown=V;exports.EzSchedulerToolbar=B;exports.EzSchedulerToolbar$1=J;
|
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { B as
|
|
4
|
-
import { I as X } from "./input-
|
|
5
|
-
import { u as Y, c as Z } from "./useInitCoreServices-
|
|
6
|
-
import { S as
|
|
7
|
-
import { P as
|
|
8
|
-
import { T as F, C as H } from "./calendar-
|
|
9
|
-
import { S as K } from "./scroll-area-
|
|
10
|
-
import {
|
|
11
|
-
import { I as ee, C as re } from "./info-
|
|
12
|
-
import {
|
|
13
|
-
import { C as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
23
|
-
key: "11g9vi"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
], _ = Q("bell", ie), ne = () => {
|
|
27
|
-
const s = Y(), [o, u] = A([]), [g, p] = A(!1);
|
|
28
|
-
L(() => {
|
|
2
|
+
import { useState as E, useEffect as J, memo as L } from "react";
|
|
3
|
+
import { B as s, X as U } from "./tooltip-C216fkmP.js";
|
|
4
|
+
import { I as X } from "./input-DG8ycH6m.js";
|
|
5
|
+
import { u as Y, c as Z } from "./useInitCoreServices-BC7QMeLn.js";
|
|
6
|
+
import { S as A, a as j, b as M, c as I, d as l, e as q } from "./select-BxiFqo8j.js";
|
|
7
|
+
import { P as R, a as B, b as _ } from "./popover-DstiJFa3.js";
|
|
8
|
+
import { T as F, C as H } from "./calendar-CCxXqG5a.js";
|
|
9
|
+
import { S as K } from "./scroll-area-mGPAChYm.js";
|
|
10
|
+
import { B as P, S as Q, G as W } from "./settings-HCrwja-A.js";
|
|
11
|
+
import { I as ee, C as re } from "./info-BuURqzhx.js";
|
|
12
|
+
import { T as te, C as y } from "./EzErrorBoundary-D4NBadES.js";
|
|
13
|
+
import { C as se } from "./circle-alert-B2AMDd8N.js";
|
|
14
|
+
import { C as S } from "./chevron-left-BFr8XZyF.js";
|
|
15
|
+
import { C as V } from "./isBefore-DdLSsf0_.js";
|
|
16
|
+
import { f as D, C as ae } from "./index-CpEN0z3t.js";
|
|
17
|
+
import { D as O } from "./download-panVHmk6.js";
|
|
18
|
+
const oe = () => {
|
|
19
|
+
const a = Y(), [o, u] = E([]), [g, p] = E(!1);
|
|
20
|
+
J(() => {
|
|
29
21
|
let t;
|
|
30
22
|
const n = () => {
|
|
31
|
-
const m =
|
|
23
|
+
const m = a.get("NotificationService");
|
|
32
24
|
m && !t && (t = m.subscribe((N) => u(N)));
|
|
33
25
|
};
|
|
34
26
|
n();
|
|
35
|
-
const h =
|
|
27
|
+
const h = a.subscribe(() => {
|
|
36
28
|
n();
|
|
37
29
|
});
|
|
38
30
|
return () => {
|
|
@@ -40,31 +32,31 @@ const ie = [
|
|
|
40
32
|
};
|
|
41
33
|
}, []);
|
|
42
34
|
const f = () => {
|
|
43
|
-
|
|
35
|
+
a.get("NotificationService")?.clearAll();
|
|
44
36
|
}, v = (t, n) => {
|
|
45
|
-
n.stopPropagation(),
|
|
37
|
+
n.stopPropagation(), a.get("NotificationService")?.remove(t);
|
|
46
38
|
}, x = (t) => {
|
|
47
39
|
switch (t) {
|
|
48
40
|
case "success":
|
|
49
41
|
return /* @__PURE__ */ e(re, { className: "h-4 w-4 text-green-600" });
|
|
50
42
|
case "error":
|
|
51
|
-
return /* @__PURE__ */ e(
|
|
43
|
+
return /* @__PURE__ */ e(se, { className: "h-4 w-4 text-red-600" });
|
|
52
44
|
case "warning":
|
|
53
|
-
return /* @__PURE__ */ e(
|
|
45
|
+
return /* @__PURE__ */ e(te, { className: "h-4 w-4 text-amber-600" });
|
|
54
46
|
default:
|
|
55
47
|
return /* @__PURE__ */ e(ee, { className: "h-4 w-4 text-blue-600" });
|
|
56
48
|
}
|
|
57
49
|
};
|
|
58
|
-
return /* @__PURE__ */ r(
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e(
|
|
50
|
+
return /* @__PURE__ */ r(R, { open: g, onOpenChange: p, children: [
|
|
51
|
+
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ r(s, { variant: "ghost", size: "icon", className: "h-9 w-9 text-muted-foreground hover:text-foreground relative", children: [
|
|
52
|
+
/* @__PURE__ */ e(P, { className: "w-5 h-5" }),
|
|
61
53
|
o.length > 0 && /* @__PURE__ */ e("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white ring-2 ring-background animate-in zoom-in duration-300", children: o.length > 9 ? "9+" : o.length })
|
|
62
54
|
] }) }),
|
|
63
|
-
/* @__PURE__ */ r(
|
|
55
|
+
/* @__PURE__ */ r(_, { className: "w-80 p-0 mr-4", align: "end", children: [
|
|
64
56
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between p-4 border-b", children: [
|
|
65
57
|
/* @__PURE__ */ e("h4", { className: "font-semibold text-sm", children: "Notifications" }),
|
|
66
58
|
o.length > 0 && /* @__PURE__ */ r(
|
|
67
|
-
|
|
59
|
+
s,
|
|
68
60
|
{
|
|
69
61
|
variant: "ghost",
|
|
70
62
|
size: "sm",
|
|
@@ -78,7 +70,7 @@ const ie = [
|
|
|
78
70
|
)
|
|
79
71
|
] }),
|
|
80
72
|
/* @__PURE__ */ e(K, { className: "h-[300px]", children: o.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center h-[200px] text-muted-foreground", children: [
|
|
81
|
-
/* @__PURE__ */ e(
|
|
73
|
+
/* @__PURE__ */ e(P, { className: "w-8 h-8 mb-2 opacity-20" }),
|
|
82
74
|
/* @__PURE__ */ e("p", { className: "text-xs", children: "No notifications" })
|
|
83
75
|
] }) : /* @__PURE__ */ e("div", { className: "flex flex-col divide-y", children: o.map((t) => /* @__PURE__ */ e("div", { className: "p-4 hover:bg-muted/50 transition-colors relative group", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
|
|
84
76
|
/* @__PURE__ */ e("div", { className: "shrink-0 mt-0.5", children: x(t.type) }),
|
|
@@ -97,8 +89,8 @@ const ie = [
|
|
|
97
89
|
] }) }, t.id)) }) })
|
|
98
90
|
] })
|
|
99
91
|
] });
|
|
100
|
-
},
|
|
101
|
-
currentDate:
|
|
92
|
+
}, ie = (a) => a.replace(/([A-Z])/g, " $1").trim(), ne = (a, o) => D(a, "MMMM yyyy"), $ = L(({
|
|
93
|
+
currentDate: a,
|
|
102
94
|
next: o,
|
|
103
95
|
prev: u,
|
|
104
96
|
today: g,
|
|
@@ -123,29 +115,29 @@ const ie = [
|
|
|
123
115
|
if (typeof i == "string")
|
|
124
116
|
switch (i) {
|
|
125
117
|
case "Previous":
|
|
126
|
-
return /* @__PURE__ */ e(
|
|
118
|
+
return /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: x, children: /* @__PURE__ */ e(S, { className: "h-4 w-4" }) }, c);
|
|
127
119
|
case "Next":
|
|
128
|
-
return /* @__PURE__ */ e(
|
|
120
|
+
return /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: t, children: /* @__PURE__ */ e(y, { className: "h-4 w-4" }) }, c);
|
|
129
121
|
case "Today":
|
|
130
|
-
return /* @__PURE__ */ e(
|
|
122
|
+
return /* @__PURE__ */ e(s, { variant: "outline", onClick: n, children: "Today" }, c);
|
|
131
123
|
case "DateRange":
|
|
132
|
-
return /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { className: "text-lg font-semibold min-w-[200px] text-center", children:
|
|
124
|
+
return /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { className: "text-lg font-semibold min-w-[200px] text-center", children: ne(a) }) }, c);
|
|
133
125
|
case "Search":
|
|
134
126
|
return /* @__PURE__ */ r("div", { className: "relative w-48 hidden md:block", children: [
|
|
135
127
|
/* @__PURE__ */ e(q, { className: Z("absolute top-2.5 h-4 w-4 text-muted-foreground", b ? "right-2" : "left-2") }),
|
|
136
128
|
/* @__PURE__ */ e(X, { placeholder: "Search...", className: "ps-8 h-9" })
|
|
137
129
|
] }, c);
|
|
138
130
|
case "Timezone":
|
|
139
|
-
return /* @__PURE__ */ r(
|
|
140
|
-
/* @__PURE__ */ e(
|
|
131
|
+
return /* @__PURE__ */ r(s, { variant: "ghost", size: "sm", className: "hidden lg:flex gap-1 text-xs text-muted-foreground", children: [
|
|
132
|
+
/* @__PURE__ */ e(W, { className: "h-3.5 w-3.5" }),
|
|
141
133
|
/* @__PURE__ */ e("span", { children: "UTC" })
|
|
142
134
|
] }, c);
|
|
143
135
|
case "ActiveView":
|
|
144
|
-
return /* @__PURE__ */ r(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
136
|
+
return /* @__PURE__ */ r(A, { value: h, onValueChange: (d) => m(d), children: [
|
|
137
|
+
/* @__PURE__ */ e(j, { className: "w-[140px]", children: /* @__PURE__ */ e(M, { placeholder: "Select view" }) }),
|
|
146
138
|
/* @__PURE__ */ e(I, { children: N.map((d) => {
|
|
147
139
|
const C = typeof d == "string" ? d : d.option;
|
|
148
|
-
return /* @__PURE__ */ e(l, { value: C, children:
|
|
140
|
+
return /* @__PURE__ */ e(l, { value: C, children: ie(C) }, C);
|
|
149
141
|
}) })
|
|
150
142
|
] });
|
|
151
143
|
default:
|
|
@@ -157,31 +149,31 @@ const ie = [
|
|
|
157
149
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-6", children: [
|
|
158
150
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 ", children: [
|
|
159
151
|
/* @__PURE__ */ e(
|
|
160
|
-
|
|
152
|
+
s,
|
|
161
153
|
{
|
|
162
154
|
variant: "ghost",
|
|
163
155
|
size: "icon",
|
|
164
156
|
onClick: u,
|
|
165
157
|
className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
166
|
-
children: b ? /* @__PURE__ */ e(
|
|
158
|
+
children: b ? /* @__PURE__ */ e(y, { className: "w-5 h-5" }) : /* @__PURE__ */ e(S, { className: "w-5 h-5" })
|
|
167
159
|
}
|
|
168
160
|
),
|
|
169
161
|
/* @__PURE__ */ e(
|
|
170
|
-
|
|
162
|
+
s,
|
|
171
163
|
{
|
|
172
164
|
variant: "ghost",
|
|
173
165
|
size: "icon",
|
|
174
166
|
onClick: o,
|
|
175
167
|
className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
176
|
-
children: b ? /* @__PURE__ */ e(
|
|
168
|
+
children: b ? /* @__PURE__ */ e(S, { className: "w-5 h-5" }) : /* @__PURE__ */ e(y, { className: "w-5 h-5" })
|
|
177
169
|
}
|
|
178
170
|
),
|
|
179
|
-
/* @__PURE__ */ r(
|
|
180
|
-
/* @__PURE__ */ e(
|
|
181
|
-
/* @__PURE__ */ e(
|
|
171
|
+
/* @__PURE__ */ r(R, { children: [
|
|
172
|
+
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted", children: /* @__PURE__ */ e(V, { className: "h-4 w-4" }) }) }),
|
|
173
|
+
/* @__PURE__ */ e(_, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ e(
|
|
182
174
|
H,
|
|
183
175
|
{
|
|
184
|
-
selected:
|
|
176
|
+
selected: a,
|
|
185
177
|
onSelect: (i) => i && v(i)
|
|
186
178
|
}
|
|
187
179
|
) })
|
|
@@ -193,7 +185,7 @@ const ie = [
|
|
|
193
185
|
className: "text-xl font-bold tracking-tight text-foreground cursor-pointer hover:text-primary transition-colors ms-4",
|
|
194
186
|
onClick: () => {
|
|
195
187
|
},
|
|
196
|
-
children: D(
|
|
188
|
+
children: D(a, "EEEE, MMM d yyyy")
|
|
197
189
|
}
|
|
198
190
|
)
|
|
199
191
|
] }),
|
|
@@ -204,7 +196,7 @@ const ie = [
|
|
|
204
196
|
" ",
|
|
205
197
|
w("ActiveView", 2),
|
|
206
198
|
/* @__PURE__ */ e(
|
|
207
|
-
|
|
199
|
+
s,
|
|
208
200
|
{
|
|
209
201
|
variant: "outline",
|
|
210
202
|
onClick: g,
|
|
@@ -214,8 +206,8 @@ const ie = [
|
|
|
214
206
|
),
|
|
215
207
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 bg-muted/30 px-2 py-1 rounded-lg border border-border/50", children: [
|
|
216
208
|
/* @__PURE__ */ e(ae, { className: "w-3.5 h-3.5 text-muted-foreground" }),
|
|
217
|
-
/* @__PURE__ */ r(
|
|
218
|
-
/* @__PURE__ */ e(
|
|
209
|
+
/* @__PURE__ */ r(A, { value: String(p), onValueChange: (i) => f(Number(i)), children: [
|
|
210
|
+
/* @__PURE__ */ e(j, { className: "h-7 w-[90px] text-[10px] font-bold uppercase tracking-tight bg-transparent border-none shadow-none focus:ring-0", children: /* @__PURE__ */ e(M, { placeholder: "Interval" }) }),
|
|
219
211
|
/* @__PURE__ */ r(I, { children: [
|
|
220
212
|
/* @__PURE__ */ e(l, { value: "5", children: "5 minutes" }),
|
|
221
213
|
/* @__PURE__ */ e(l, { value: "10", children: "10 minutes" }),
|
|
@@ -226,23 +218,23 @@ const ie = [
|
|
|
226
218
|
] })
|
|
227
219
|
] })
|
|
228
220
|
] }),
|
|
229
|
-
/* @__PURE__ */ e(
|
|
221
|
+
/* @__PURE__ */ e(oe, {}),
|
|
230
222
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1 border-s border-border ps-2", children: [
|
|
231
|
-
k && /* @__PURE__ */ e(
|
|
232
|
-
z && /* @__PURE__ */ e(
|
|
233
|
-
T && /* @__PURE__ */ e(
|
|
223
|
+
k && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: k, title: "Export to Excel", children: /* @__PURE__ */ e(O, { className: "w-4 h-4" }) }),
|
|
224
|
+
z && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: z, title: "Export to CSV", children: /* @__PURE__ */ e(O, { className: "w-4 h-4 text-primary" }) }),
|
|
225
|
+
T && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: T, title: "Export to ICS", children: /* @__PURE__ */ e(V, { className: "w-4 h-4" }) })
|
|
234
226
|
] }),
|
|
235
|
-
/* @__PURE__ */ e(
|
|
227
|
+
/* @__PURE__ */ e(s, { variant: "ghost", size: "icon", className: "h-9 w-9 text-muted-foreground hover:text-foreground rounded-full", children: /* @__PURE__ */ e(Q, { className: "w-5 h-5" }) })
|
|
236
228
|
] })
|
|
237
229
|
] });
|
|
238
230
|
});
|
|
239
231
|
$.displayName = "EzSchedulerToolbar";
|
|
240
|
-
const
|
|
232
|
+
const ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
241
233
|
__proto__: null,
|
|
242
234
|
EzSchedulerToolbar: $
|
|
243
235
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
244
236
|
export {
|
|
245
|
-
|
|
237
|
+
oe as E,
|
|
246
238
|
$ as a,
|
|
247
|
-
|
|
239
|
+
ke as b
|
|
248
240
|
};
|