ezux 1.1.18 → 1.1.20
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/README.md +7 -1
- package/dist/{DeleteConfirmationModal-CukNDgtX.cjs → DeleteConfirmationModal-BM1PoL6P.cjs} +1 -1
- package/dist/{DeleteConfirmationModal-p8XGDGIw.js → DeleteConfirmationModal-B_tXm0N0.js} +4 -4
- package/dist/EzEventModal-D1EzXBsQ.cjs +1 -0
- package/dist/{EzEventModal-C079wLjP.js → EzEventModal-D5lX9XuW.js} +60 -54
- package/dist/{EzFlow-CQFeY7DL.cjs → EzFlow-B4qRm5KH.cjs} +3 -3
- package/dist/{EzFlow-C74NbZA9.js → EzFlow-CEfPykao.js} +278 -278
- package/dist/EzKanban-2b9skOep.cjs +2 -0
- package/dist/{EzKanban-BlJWybKe.js → EzKanban-CpYH8b8g.js} +86 -80
- package/dist/{EzLayout-CiaPLniV.js → EzLayout-DFxegglu.js} +30 -24
- package/dist/EzLayout-EYOfpFXs.cjs +1 -0
- package/dist/{EzScheduler-C1Jtvvju.js → EzScheduler-D7aH4KCY.js} +77 -65
- package/dist/EzScheduler-hC9PsLrI.cjs +1 -0
- package/dist/{EzSchedulerQuickAdd-BeNfGdWs.cjs → EzSchedulerQuickAdd-BYrV9PQ-.cjs} +1 -1
- package/dist/{EzSchedulerQuickAdd-BIC8xbSn.js → EzSchedulerQuickAdd-D0kGTzE3.js} +2 -2
- package/dist/{EzSchedulerToolbar-Ba4gbvUg.js → EzSchedulerToolbar-BhlCMeOT.js} +36 -51
- package/dist/EzSchedulerToolbar-Dy62PVnH.cjs +1 -0
- package/dist/{EzSignature-7UHO5lSP.js → EzSignature-B-CPcf7e.js} +5 -2
- package/dist/{EzSignature-Df7UZ-IS.cjs → EzSignature-DcmWBPIL.cjs} +1 -1
- package/dist/EzTable-BHyYGv8H.cjs +3 -0
- package/dist/{EzTable-D2p1IWHc.js → EzTable-Dyw8LIDD.js} +1270 -1159
- package/dist/EzTableEditDialog--8pD39Rp.cjs +1 -0
- package/dist/EzTableEditDialog-m0zW6r6z.js +100 -0
- package/dist/{EzTableFooter-DrLoWelo.js → EzTableFooter-BuTS3wDK.js} +1 -1
- package/dist/{EzTableToolbar-DwuumvWP.cjs → EzTableToolbar-BWjqKfwx.cjs} +1 -1
- package/dist/{EzTableToolbar-BH5z9fSJ.js → EzTableToolbar-BiRfKm9d.js} +2 -2
- package/dist/{EzTreeView-D1G0Aomc.js → EzTreeView-B2B_Ruwm.js} +37 -37
- package/dist/EzTreeView-DLoPKe2i.cjs +1 -0
- package/dist/{KanbanBoard-B7_Z5sh1.js → KanbanBoard-CRF0-mYa.js} +120 -120
- package/dist/{KanbanBoard-CyitudI1.cjs → KanbanBoard-DdXD-Zjt.cjs} +1 -1
- package/dist/advanced.cjs +2 -2
- package/dist/advanced.es.js +31 -30
- package/dist/card-NlCLCGFb.cjs +1 -0
- package/dist/{card-ZUNxcdIM.js → card-urNaa5h-.js} +1 -1
- package/dist/{checkbox-BrCh_Iid.cjs → checkbox-B9yPkCYi.cjs} +1 -1
- package/dist/{checkbox-DRkQuB4W.js → checkbox-BTuckDEm.js} +1 -1
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +3 -0
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +2 -1
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +3 -0
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +1 -1
- package/dist/components/EzTable/EzTableEditDialog.d.ts +1 -1
- package/dist/components/EzTable/hooks/useTableFiltering.d.ts +6 -6
- package/dist/components/EzTable/hooks/useTableHistory.d.ts +3 -3
- package/dist/components/EzTable/hooks/useTableImperative.d.ts +9 -6
- package/dist/components/EzTable/hooks/useTableState.d.ts +12 -12
- package/dist/components/EzTable/types/EzTableProps.d.ts +9 -1
- package/dist/components/ui/date-time-picker.d.ts +9 -1
- package/dist/date-time-picker-D0w0sDgq.cjs +1 -0
- package/dist/{date-time-picker-fUzf4TnU.js → date-time-picker-DqdtBpAg.js} +58 -42
- package/dist/ezux.css +1 -1
- package/dist/flow.cjs +1 -1
- package/dist/flow.es.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +20 -20
- package/dist/input-CcRi0LeO.js +14 -0
- package/dist/input-DOh8O0iX.cjs +1 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.es.js +2 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/mock-services.cjs +1 -1
- package/dist/mock-services.es.js +1 -1
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.es.js +1 -1
- package/dist/signature.cjs +1 -1
- package/dist/signature.es.js +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.es.js +1 -1
- package/dist/theme-vars.css +25 -5
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.es.js +1 -1
- package/package.json +39 -36
- package/dist/EzEventModal-CAA9cAM0.cjs +0 -1
- package/dist/EzKanban-DdKODRRv.cjs +0 -2
- package/dist/EzLayout-BGnqFtvO.cjs +0 -1
- package/dist/EzScheduler-CkqTngI6.cjs +0 -1
- package/dist/EzSchedulerToolbar-BJwTpgas.cjs +0 -1
- package/dist/EzTable-CEXvJR1t.cjs +0 -3
- package/dist/EzTableEditDialog-BXnnYSSy.cjs +0 -1
- package/dist/EzTableEditDialog-Ccd5XoHm.js +0 -84
- package/dist/EzTreeView-KMGlU4ax.cjs +0 -1
- package/dist/card-CPlRZxbq.cjs +0 -1
- package/dist/date-time-picker-Bs-7XzHD.cjs +0 -1
- package/dist/input-CYlvlbF7.cjs +0 -1
- package/dist/input-Cj3sQK3M.js +0 -14
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# ezUX | Premium React UI Kit for Enterprise Dashboards
|
|
2
2
|
|
|
3
|
+
> **Current release: 1.1.20**
|
|
4
|
+
|
|
3
5
|
> **High-performance React components** for building modern enterprise applications. Powered by **TanStack** (Table, Query, Virtual) and built with **TypeScript**.
|
|
4
6
|
>
|
|
5
7
|
> 🔗 **[View ezux-showcase on GitHub](https://github.com/zee24-cmd/ezux-showcase)** | 🌐 **[Live Showcase](https://ezux-showcase.vercel.app)**
|
|
@@ -19,6 +21,7 @@ ezUX is a comprehensive **component library** designed for developers who need t
|
|
|
19
21
|
- **Full TypeScript Support**: 100% type-safe components with exported types for a seamless developer experience.
|
|
20
22
|
- **High-Performance Data Grid**: Handle 100k+ rows with ease using integrated row and column virtualization.
|
|
21
23
|
- **Modern Styling**: Styled with **Tailwind CSS v4** and CSS variables for easy theming and dark mode support.
|
|
24
|
+
- **Responsive Typography**: Semantic typography tokens, mobile scaling, and touch-friendly controls from mobile to desktop.
|
|
22
25
|
- **Accessibility (A11Y)**: Built with WAI-ARIA patterns to ensure your **dashboard** is accessible to everyone.
|
|
23
26
|
|
|
24
27
|
## Core Components
|
|
@@ -37,6 +40,8 @@ ezUX is a comprehensive **component library** designed for developers who need t
|
|
|
37
40
|
|
|
38
41
|
You must have [Tailwind CSS v4](https://tailwindcss.com/docs/installation) installed and configured in your consumer application to use `ezux` components.
|
|
39
42
|
|
|
43
|
+
EzUX is developed and typechecked with **TypeScript 7**. Published declarations are validated with a clean **TypeScript 6.0.3** compiler for consumers whose toolchains have not migrated yet. The runtime peer requirements are React 19.2 and React DOM 19.2.
|
|
44
|
+
|
|
40
45
|
## Installation
|
|
41
46
|
|
|
42
47
|
```bash
|
|
@@ -95,6 +100,8 @@ function UserDashboard() {
|
|
|
95
100
|
|
|
96
101
|
Visit the [Live Showcase](https://ezux-showcase.vercel.app) for full documentation and interactive examples.
|
|
97
102
|
|
|
103
|
+
Theme colors use semantic CSS variables. **Zinc** is the default theme, with Orange, Blue, Green, and Rose alternatives. Components expose responsive typography utilities such as `ez-text-body`, `ez-text-label`, and `ez-text-caption`; prefer semantic tokens over hardcoded color classes when extending components.
|
|
104
|
+
|
|
98
105
|
## License
|
|
99
106
|
|
|
100
107
|
MIT © [Zeeshan Sayed](https://github.com/ezux)
|
|
@@ -103,4 +110,3 @@ MIT © [Zeeshan Sayed](https://github.com/ezux)
|
|
|
103
110
|
|
|
104
111
|
### Tags & Keywords
|
|
105
112
|
`react`, `components`, `table`, `scheduler`, `kanban`, `dashboard`, `enterprise`, `ui-kit`, `tanstack`, `typescript`, `react-components`, `data-grid`, `workflow-builder`, `scheduler-component`, `kanban-board`
|
|
106
|
-
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./EzProvider-L2qQMq-v.cjs"),t=require("./button-BBMwzUtG.cjs"),n=require("./
|
|
1
|
+
const e=require("./EzProvider-L2qQMq-v.cjs"),t=require("./button-BBMwzUtG.cjs"),n=require("./card-NlCLCGFb.cjs"),r=require("./Modal-BmX1C448.cjs");let i=require("react");i=e.y(i,1);let a=require("react/jsx-runtime");var o=({isOpen:e,onClose:i,onConfirm:o,title:s,message:c,description:l})=>{let{t:u}=n.c();return(0,a.jsx)(r.t,{isOpen:e,onClose:i,title:s||u(`confirm_delete`)||`Confirm Delete`,size:`sm`,footer:(0,a.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,a.jsx)(t.t,{variant:`ghost`,onClick:i,children:u(`cancel`)||`Cancel`}),(0,a.jsx)(t.t,{variant:`destructive`,onClick:()=>{o(),i()},children:u(`delete`)||`Delete`})]}),children:(0,a.jsxs)(`div`,{className:`py-2`,children:[(0,a.jsx)(`p`,{children:c||u(`confirm_delete_message`)||`Are you sure you want to delete this item?`}),(l||u(`action_cannot_be_undone`))&&(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:l||u(`action_cannot_be_undone`)||`This action cannot be undone.`})]})})};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./button-CYyNwV8S.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
2
|
+
import { c as t } from "./card-urNaa5h-.js";
|
|
3
|
+
import { t as n } from "./Modal-CrzpKyjK.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/shared/components/DeleteConfirmationModal.tsx
|
|
7
7
|
var a = ({ isOpen: a, onClose: o, onConfirm: s, title: c, message: l, description: u }) => {
|
|
8
|
-
let { t: d } =
|
|
9
|
-
return /* @__PURE__ */ r(
|
|
8
|
+
let { t: d } = t();
|
|
9
|
+
return /* @__PURE__ */ r(n, {
|
|
10
10
|
isOpen: a,
|
|
11
11
|
onClose: o,
|
|
12
12
|
title: c || d("confirm_delete") || "Confirm Delete",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./EzProvider-L2qQMq-v.cjs"),t=require("./button-BBMwzUtG.cjs"),n=require("./input-DOh8O0iX.cjs"),r=require("./label-BGgvoZWD.cjs"),i=require("./date-time-picker-D0w0sDgq.cjs");let a=require("react");a=e.y(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime"),c=require("@tanstack/react-form"),l=require("react-dom");var u=e.v({EzEventModal:()=>f}),d=[{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`}],f=({isOpen:u,onClose:f,mode:p,event:m,onSave:h,onDelete:g,locale:_,slotDuration:v,timeOptions:y,editorTemplate:b,headerTemplate:x,footerTemplate:S,headerFieldsTemplate:C,hiddenFields:w=[]})=>{let T=(0,c.useForm)({defaultValues:{title:m?.title||``,start:m?.start,end:m?.end,resourceIds:m?.resourceIds||(m?.resourceId?[m.resourceId]:[])||[],location:m?.location||``,isAllDay:!!m?.allDay||!!m?.isAllDay||!1,description:m?.description||``,isTimezoneEnabled:!!m?.timezone,startTimezone:m?.timezone?.start||`Asia/Calcutta`,endTimezone:m?.timezone?.end||`Asia/Calcutta`,repeatFrequency:m?.recurrence?.frequency||`Never`,repeatInterval:m?.recurrence?.interval||1,repeatDays:m?.recurrence?.days||[],repeatBy:m?.recurrence?.repeatBy||`day`,repeatEndLevel:m?.recurrence?.end||`Never`,repeatEndCount:m?.recurrence?.endCount||1,repeatEndUntil:m?.recurrence?.endUntil,attachments:m?.attachments||[]},onSubmit:async({value:e})=>{h({...m,title:e.title,start:e.start,end:e.end,resourceId:e.resourceIds[0],resourceIds:e.resourceIds,location:e.location,allDay:e.isAllDay,description:e.description,timezone:e.isTimezoneEnabled?{start:e.startTimezone,end:e.endTimezone}:void 0,recurrence:e.repeatFrequency===`Never`?void 0:{frequency:e.repeatFrequency,interval:e.repeatInterval,unit:e.repeatFrequency.replace(`ly`,``)+`(s)`,end:e.repeatEndLevel,endCount:e.repeatEndLevel===`Count`?e.repeatEndCount:void 0,endUntil:e.repeatEndLevel===`Until`?e.repeatEndUntil:void 0,days:e.repeatFrequency===`Weekly`?e.repeatDays:void 0,repeatBy:e.repeatFrequency===`Monthly`||e.repeatFrequency===`Yearly`?e.repeatBy:void 0},attachments:e.attachments}),f()}});if((0,a.useEffect)(()=>{u&&T.reset()},[u,m,T]),!u)return null;let E=e=>{e?.preventDefault(),e?.stopPropagation(),T.handleSubmit()},D=p===`view`;return(0,l.createPortal)((0,s.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:[(0,s.jsx)(`div`,{style:{position:`absolute`,inset:0},onClick:f}),(0,s.jsxs)(`div`,{className:e._(`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:[(0,s.jsx)(`div`,{className:`flex items-center justify-between shrink-0 bg-background`,style:{padding:`16px 40px`},children:x?x(m||{},p):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`h2`,{className:`text-xl font-bold tracking-tight text-foreground`,children:[p===`create`&&`New Event`,p===`edit`&&`Edit Event`,p===`view`&&`Event Details`]}),(0,s.jsx)(t.t,{variant:`ghost`,size:`icon`,className:`h-9 w-9 rounded-full hover:bg-muted text-muted-foreground mr-[-8px]`,onClick:f,children:(0,s.jsx)(o.X,{className:`w-5 h-5`})})]})}),b?(0,s.jsx)(`div`,{className:`overflow-y-auto custom-scrollbar flex-1 bg-background`,style:{padding:`8px 40px 32px 40px`},children:b(m||{})}):(0,s.jsxs)(`form`,{onSubmit:E,className:`space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background`,style:{padding:`8px 40px 32px 40px`},children:[C?.({event:m||{},mode:p,isReadOnly:D}),(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,s.jsx)(T.Field,{name:`title`,validators:{onChange:({value:e})=>e?void 0:`Title is required`},children:t=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{htmlFor:`title`,className:`text-[13px] font-semibold text-foreground/70`,children:`Title`}),(0,s.jsx)(n.t,{id:`title`,placeholder:`Add title`,value:t.state.value,onChange:e=>t.handleChange(e.target.value),onBlur:t.handleBlur,disabled:D,className:e._(`h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all`,t.state.meta.errors.length>0&&`border-destructive focus-visible:border-destructive ring-destructive/20`)}),t.state.meta.errors.length>0&&(0,s.jsx)(`p`,{className:`text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1`,children:t.state.meta.errors.join(`, `)})]})}),!w.includes(`location`)&&(0,s.jsx)(T.Field,{name:`location`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{htmlFor:`location`,className:`text-[13px] font-semibold text-foreground/70`,children:`Location`}),(0,s.jsx)(n.t,{id:`location`,placeholder:`Add location`,value:e.state.value,onChange:t=>e.handleChange(t.target.value),disabled:D,className:`h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all`})]})})]}),(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,s.jsx)(T.Field,{name:`start`,validators:{onChange:({value:e})=>e?void 0:`Start date is required`},children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Start`}),(0,s.jsx)(i.t,{date:e.state.value,setDate:t=>e.handleChange(t),disabled:D,required:!0,locale:_,mode:T.getFieldValue(`isAllDay`)?`date`:`datetime`,slotDuration:v,timeOptions:y,className:`border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20`}),e.state.meta.errors.length>0&&(0,s.jsx)(`p`,{className:`text-[12px] font-medium text-destructive mt-1.5`,children:e.state.meta.errors.join(`, `)})]})}),(0,s.jsx)(T.Field,{name:`end`,validators:{onChange:({value:e,fieldApi:t})=>{if(!e)return`End date is required`;let n=t.form.getFieldValue(`start`);if(n&&e<=n)return`End time must be after start time`}},children:t=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`End`}),(0,s.jsx)(i.t,{date:t.state.value,setDate:e=>t.handleChange(e),disabled:D,required:!0,locale:_,mode:T.getFieldValue(`isAllDay`)?`date`:`datetime`,minDate:T.getFieldValue(`start`),slotDuration:v,timeOptions:y,className:e._(`border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20`,t.state.meta.errors.length>0&&`border-destructive focus-visible:border-destructive ring-destructive/20`)}),t.state.meta.errors.length>0&&(0,s.jsx)(`p`,{className:`text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1`,children:t.state.meta.errors.join(`, `)})]})})]}),(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,s.jsx)(T.Field,{name:`isAllDay`,children:e=>(0,s.jsx)(`div`,{className:`flex items-center h-10`,children:(0,s.jsxs)(`label`,{className:`flex items-center space-x-3 cursor-pointer group select-none`,children:[(0,s.jsx)(`input`,{type:`checkbox`,checked:e.state.value,onChange:t=>e.handleChange(t.target.checked),disabled:D,className:`h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer`}),(0,s.jsx)(`span`,{className:`text-[14px] font-medium text-foreground/70 group-hover:text-foreground`,children:`All day event`})]})})}),(0,s.jsx)(T.Field,{name:`isTimezoneEnabled`,children:e=>(0,s.jsx)(`div`,{className:`flex items-center h-10`,children:(0,s.jsxs)(`label`,{className:`flex items-center space-x-3 cursor-pointer group select-none`,children:[(0,s.jsx)(`input`,{type:`checkbox`,checked:e.state.value,onChange:t=>e.handleChange(t.target.checked),disabled:D,className:`h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer`}),(0,s.jsx)(`span`,{className:`text-[14px] font-medium text-foreground/70 group-hover:text-foreground`,children:`Enable timezone`})]})})})]}),(0,s.jsx)(T.Subscribe,{selector:e=>[e.values.isTimezoneEnabled],children:([e])=>e&&(0,s.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:[(0,s.jsx)(T.Field,{name:`startTimezone`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Start Timezone`}),(0,s.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:e.state.value,onChange:t=>e.handleChange(t.target.value),children:[(0,s.jsx)(`option`,{value:`Asia/Calcutta`,children:`Asia/Calcutta`}),(0,s.jsx)(`option`,{value:`UTC`,children:`UTC`}),(0,s.jsx)(`option`,{value:`America/New_York`,children:`America/New_York`})]})]})}),(0,s.jsx)(T.Field,{name:`endTimezone`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`End Timezone`}),(0,s.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:e.state.value,onChange:t=>e.handleChange(t.target.value),children:[(0,s.jsx)(`option`,{value:`Asia/Calcutta`,children:`Asia/Calcutta`}),(0,s.jsx)(`option`,{value:`UTC`,children:`UTC`}),(0,s.jsx)(`option`,{value:`America/New_York`,children:`America/New_York`})]})]})})]})}),(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,s.jsx)(T.Field,{name:`repeatFrequency`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Repeat`}),(0,s.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:e.state.value,onChange:t=>e.handleChange(t.target.value),children:[(0,s.jsx)(`option`,{value:`Never`,children:`Never`}),(0,s.jsx)(`option`,{value:`Daily`,children:`Daily`}),(0,s.jsx)(`option`,{value:`Weekly`,children:`Weekly`}),(0,s.jsx)(`option`,{value:`Monthly`,children:`Monthly`}),(0,s.jsx)(`option`,{value:`Yearly`,children:`Yearly`})]})]})}),(0,s.jsx)(T.Subscribe,{selector:e=>[e.values.repeatFrequency],children:([e])=>e!==`Never`&&(0,s.jsx)(T.Field,{name:`repeatEndLevel`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2 animate-in slide-in-from-top-2 duration-300`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`End`}),(0,s.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:e.state.value,onChange:t=>e.handleChange(t.target.value),children:[(0,s.jsx)(`option`,{value:`Never`,children:`Never`}),(0,s.jsx)(`option`,{value:`Until`,children:`Until`}),(0,s.jsx)(`option`,{value:`Count`,children:`Count`})]})]})})})]}),(0,s.jsx)(T.Subscribe,{selector:e=>[e.values.repeatFrequency,e.values.repeatEndLevel],children:([e,t])=>e!==`Never`&&(0,s.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300`,children:[(0,s.jsx)(T.Field,{name:`repeatInterval`,children:t=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Repeat every`}),(0,s.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,s.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:t.state.value,onChange:e=>t.handleChange(parseInt(e.target.value)),children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30].map(e=>(0,s.jsx)(`option`,{value:e,children:e},e))}),(0,s.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground whitespace-nowrap`,children:e===`Daily`?`Day(s)`:e.replace(`ly`,``)+`(s)`})]})]})}),t===`Until`&&(0,s.jsx)(T.Field,{name:`repeatEndUntil`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2 animate-in slide-in-from-top-1`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Until`}),(0,s.jsx)(i.t,{date:e.state.value,setDate:t=>e.handleChange(t),disabled:D,locale:_,mode:`date`,minDate:T.getFieldValue(`start`),slotDuration:v,timeOptions:y,className:`border-border focus:border-primary`})]})}),t===`Count`&&(0,s.jsx)(T.Field,{name:`repeatEndCount`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2 animate-in slide-in-from-top-1`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Occurrences`}),(0,s.jsx)(n.t,{type:`number`,min:1,value:e.state.value,onChange:t=>e.handleChange(parseInt(t.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`})]})})]})}),(0,s.jsx)(T.Subscribe,{selector:e=>[e.values.repeatFrequency],children:([t])=>t===`Weekly`&&(0,s.jsx)(T.Field,{name:`repeatDays`,children:t=>(0,s.jsxs)(`div`,{className:`space-y-3 animate-in fade-in duration-300`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Repeat On`}),(0,s.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:d.map(n=>(0,s.jsx)(`button`,{type:`button`,onClick:()=>{let e=t.state.value||[];e.includes(n.value)?t.handleChange(e.filter(e=>e!==n.value)):t.handleChange([...e,n.value])},className:e._(`w-9 h-9 rounded-full flex items-center justify-center text-sm font-bold transition-all border`,(t.state.value||[]).includes(n.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:n.label},n.value))})]})})}),(0,s.jsx)(T.Subscribe,{selector:e=>[e.values.repeatFrequency],children:([e])=>(e===`Monthly`||e===`Yearly`)&&(0,s.jsx)(T.Field,{name:`repeatBy`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-4 animate-in fade-in duration-300`,children:[(0,s.jsx)(r.t,{className:`text-[13px] font-semibold text-foreground/70`,children:`Repeat On`}),(0,s.jsxs)(`div`,{className:`space-y-3`,children:[(0,s.jsxs)(`label`,{className:`flex items-center space-x-3 cursor-pointer group`,children:[(0,s.jsx)(`input`,{type:`radio`,name:`repeatBy`,checked:e.state.value===`day`,onChange:()=>e.handleChange(`day`),className:`h-4 w-4 border-border text-primary focus:ring-primary`}),(0,s.jsx)(`span`,{className:`text-sm text-foreground/80`,children:`Day of the month`})]}),(0,s.jsxs)(`label`,{className:`flex items-center space-x-3 cursor-pointer group`,children:[(0,s.jsx)(`input`,{type:`radio`,name:`repeatBy`,checked:e.state.value===`ordinal`,onChange:()=>e.handleChange(`ordinal`),className:`h-4 w-4 border-border text-primary focus:ring-primary`}),(0,s.jsx)(`span`,{className:`text-sm text-foreground/80`,children:`Ordinal position`})]})]})]})})}),(0,s.jsx)(T.Field,{name:`description`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-2`,children:[(0,s.jsx)(r.t,{htmlFor:`description`,className:`text-[13px] font-semibold text-foreground/70`,children:`Description`}),(0,s.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:e.state.value,onChange:t=>e.handleChange(t.target.value),disabled:D})]})}),(0,s.jsx)(T.Field,{name:`attachments`,children:e=>(0,s.jsxs)(`div`,{className:`space-y-4 pt-4 pb-2`,children:[(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,s.jsxs)(r.t,{className:`text-[13px] font-semibold text-foreground/70 flex items-center gap-2`,children:[(0,s.jsx)(o.Paperclip,{className:`w-4 h-4`}),` Attachments`]}),(0,s.jsx)(`input`,{type:`file`,id:`file-upload`,multiple:!0,className:`hidden`,onChange:t=>{t.target.files&&e.handleChange([...e.state.value||[],...Array.from(t.target.files)])}}),(0,s.jsxs)(t.t,{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:[(0,s.jsx)(o.Paperclip,{className:`w-3 h-3`}),` Add Files`]})]}),(e.state.value||[]).length>0&&(0,s.jsx)(`div`,{className:`grid grid-cols-1 gap-3`,children:(e.state.value||[]).map((n,r)=>(0,s.jsxs)(`div`,{className:`flex items-center justify-between p-3 rounded-lg bg-highlight border border-border group hover:border-border transition-all`,children:[(0,s.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,s.jsx)(`div`,{className:`w-9 h-9 rounded-md bg-white border border-border flex items-center justify-center shrink-0 shadow-sm`,children:(0,s.jsx)(o.Paperclip,{className:`w-4 h-4 text-muted-foreground`})}),(0,s.jsxs)(`div`,{className:`flex flex-col overflow-hidden`,children:[(0,s.jsx)(`span`,{className:`text-[13px] font-medium text-foreground truncate`,children:n.name}),(0,s.jsx)(`span`,{className:`text-[11px] text-muted-foreground font-medium`,children:typeof n.size==`number`?`${(n.size/1024).toFixed(1)} KB`:`Attachment`})]})]}),(0,s.jsx)(t.t,{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:()=>e.handleChange((e.state.value||[]).filter((e,t)=>t!==r)),children:(0,s.jsx)(o.Trash2,{className:`w-4 h-4`})})]},r))})]})})]}),S?S(m||{},p,()=>E(),f):(0,s.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,padding:`24px 40px`,backgroundColor:`var(--highlight)`,gap:`12px`,width:`100%`,flexShrink:0},children:[!D&&g&&p===`edit`&&(0,s.jsx)(t.t,{type:`button`,variant:`ghost`,className:`text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto`,onClick:()=>{g(m?.id),f()},children:`Delete`}),(0,s.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[!D&&(0,s.jsx)(T.Subscribe,{selector:e=>[e.canSubmit,e.isSubmitting],children:([e,n])=>(0,s.jsx)(t.t,{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:!e||n,onClick:e=>{e.preventDefault(),e.stopPropagation(),T.handleSubmit()},children:n?`Saving...`:`Save`})}),(0,s.jsx)(t.t,{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:f,children:`Cancel`})]})]})]})]}),document.body)};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as e } from "./EzLayout-
|
|
1
|
+
import { p as e } from "./EzLayout-DFxegglu.js";
|
|
2
2
|
import { _ as t } from "./EzProvider-AlmsYIDk.js";
|
|
3
3
|
import { t as n } from "./button-CYyNwV8S.js";
|
|
4
|
-
import { t as r } from "./input-
|
|
4
|
+
import { t as r } from "./input-CcRi0LeO.js";
|
|
5
5
|
import { t as i } from "./label-DWEV--5W.js";
|
|
6
|
-
import { t as a } from "./date-time-picker-
|
|
6
|
+
import { t as a } from "./date-time-picker-DqdtBpAg.js";
|
|
7
7
|
import { useEffect as o } from "react";
|
|
8
8
|
import { Paperclip as s, Trash2 as c, X as l } from "lucide-react";
|
|
9
9
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
@@ -39,8 +39,8 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
39
39
|
label: "S",
|
|
40
40
|
value: "SA"
|
|
41
41
|
}
|
|
42
|
-
], _ = ({ isOpen: e, onClose: h, mode: _, event: v, onSave: y, onDelete: b, locale: x,
|
|
43
|
-
let
|
|
42
|
+
], _ = ({ isOpen: e, onClose: h, mode: _, event: v, onSave: y, onDelete: b, locale: x, slotDuration: S, timeOptions: C, editorTemplate: w, headerTemplate: T, footerTemplate: E, headerFieldsTemplate: D, hiddenFields: O = [] }) => {
|
|
43
|
+
let k = p({
|
|
44
44
|
defaultValues: {
|
|
45
45
|
title: v?.title || "",
|
|
46
46
|
start: v?.start,
|
|
@@ -91,15 +91,15 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
if (o(() => {
|
|
94
|
-
e &&
|
|
94
|
+
e && k.reset();
|
|
95
95
|
}, [
|
|
96
96
|
e,
|
|
97
97
|
v,
|
|
98
|
-
|
|
98
|
+
k
|
|
99
99
|
]), !e) return null;
|
|
100
|
-
let
|
|
101
|
-
e?.preventDefault(), e?.stopPropagation(),
|
|
102
|
-
},
|
|
100
|
+
let A = (e) => {
|
|
101
|
+
e?.preventDefault(), e?.stopPropagation(), k.handleSubmit();
|
|
102
|
+
}, j = _ === "view";
|
|
103
103
|
return m(/* @__PURE__ */ f("div", {
|
|
104
104
|
"data-testid": "ez-event-modal",
|
|
105
105
|
style: {
|
|
@@ -136,7 +136,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
136
136
|
/* @__PURE__ */ d("div", {
|
|
137
137
|
className: "flex items-center justify-between shrink-0 bg-background",
|
|
138
138
|
style: { padding: "16px 40px" },
|
|
139
|
-
children:
|
|
139
|
+
children: T ? T(v || {}, _) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("h2", {
|
|
140
140
|
className: "text-xl font-bold tracking-tight text-foreground",
|
|
141
141
|
children: [
|
|
142
142
|
_ === "create" && "New Event",
|
|
@@ -151,23 +151,23 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
151
151
|
children: /* @__PURE__ */ d(l, { className: "w-5 h-5" })
|
|
152
152
|
})] })
|
|
153
153
|
}),
|
|
154
|
-
|
|
154
|
+
w ? /* @__PURE__ */ d("div", {
|
|
155
155
|
className: "overflow-y-auto custom-scrollbar flex-1 bg-background",
|
|
156
156
|
style: { padding: "8px 40px 32px 40px" },
|
|
157
|
-
children:
|
|
157
|
+
children: w(v || {})
|
|
158
158
|
}) : /* @__PURE__ */ f("form", {
|
|
159
|
-
onSubmit:
|
|
159
|
+
onSubmit: A,
|
|
160
160
|
className: "space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background",
|
|
161
161
|
style: { padding: "8px 40px 32px 40px" },
|
|
162
162
|
children: [
|
|
163
|
-
|
|
163
|
+
D?.({
|
|
164
164
|
event: v || {},
|
|
165
165
|
mode: _,
|
|
166
|
-
isReadOnly:
|
|
166
|
+
isReadOnly: j
|
|
167
167
|
}),
|
|
168
168
|
/* @__PURE__ */ f("div", {
|
|
169
169
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
170
|
-
children: [/* @__PURE__ */ d(
|
|
170
|
+
children: [/* @__PURE__ */ d(k.Field, {
|
|
171
171
|
name: "title",
|
|
172
172
|
validators: { onChange: ({ value: e }) => e ? void 0 : "Title is required" },
|
|
173
173
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
@@ -184,7 +184,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
184
184
|
value: e.state.value,
|
|
185
185
|
onChange: (t) => e.handleChange(t.target.value),
|
|
186
186
|
onBlur: e.handleBlur,
|
|
187
|
-
disabled:
|
|
187
|
+
disabled: j,
|
|
188
188
|
className: t("h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all", e.state.meta.errors.length > 0 && "border-destructive focus-visible:border-destructive ring-destructive/20")
|
|
189
189
|
}),
|
|
190
190
|
e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
|
|
@@ -193,7 +193,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
193
193
|
})
|
|
194
194
|
]
|
|
195
195
|
})
|
|
196
|
-
}), !
|
|
196
|
+
}), !O.includes("location") && /* @__PURE__ */ d(k.Field, {
|
|
197
197
|
name: "location",
|
|
198
198
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
199
199
|
className: "space-y-2",
|
|
@@ -206,7 +206,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
206
206
|
placeholder: "Add location",
|
|
207
207
|
value: e.state.value,
|
|
208
208
|
onChange: (t) => e.handleChange(t.target.value),
|
|
209
|
-
disabled:
|
|
209
|
+
disabled: j,
|
|
210
210
|
className: "h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"
|
|
211
211
|
})]
|
|
212
212
|
})
|
|
@@ -214,7 +214,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
214
214
|
}),
|
|
215
215
|
/* @__PURE__ */ f("div", {
|
|
216
216
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
217
|
-
children: [/* @__PURE__ */ d(
|
|
217
|
+
children: [/* @__PURE__ */ d(k.Field, {
|
|
218
218
|
name: "start",
|
|
219
219
|
validators: { onChange: ({ value: e }) => e ? void 0 : "Start date is required" },
|
|
220
220
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
@@ -227,10 +227,12 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
227
227
|
/* @__PURE__ */ d(a, {
|
|
228
228
|
date: e.state.value,
|
|
229
229
|
setDate: (t) => e.handleChange(t),
|
|
230
|
-
disabled:
|
|
230
|
+
disabled: j,
|
|
231
231
|
required: !0,
|
|
232
232
|
locale: x,
|
|
233
|
-
mode:
|
|
233
|
+
mode: k.getFieldValue("isAllDay") ? "date" : "datetime",
|
|
234
|
+
slotDuration: S,
|
|
235
|
+
timeOptions: C,
|
|
234
236
|
className: "border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20"
|
|
235
237
|
}),
|
|
236
238
|
e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
|
|
@@ -239,7 +241,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
239
241
|
})
|
|
240
242
|
]
|
|
241
243
|
})
|
|
242
|
-
}), /* @__PURE__ */ d(
|
|
244
|
+
}), /* @__PURE__ */ d(k.Field, {
|
|
243
245
|
name: "end",
|
|
244
246
|
validators: { onChange: ({ value: e, fieldApi: t }) => {
|
|
245
247
|
if (!e) return "End date is required";
|
|
@@ -256,11 +258,13 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
256
258
|
/* @__PURE__ */ d(a, {
|
|
257
259
|
date: e.state.value,
|
|
258
260
|
setDate: (t) => e.handleChange(t),
|
|
259
|
-
disabled:
|
|
261
|
+
disabled: j,
|
|
260
262
|
required: !0,
|
|
261
263
|
locale: x,
|
|
262
|
-
mode:
|
|
263
|
-
minDate:
|
|
264
|
+
mode: k.getFieldValue("isAllDay") ? "date" : "datetime",
|
|
265
|
+
minDate: k.getFieldValue("start"),
|
|
266
|
+
slotDuration: S,
|
|
267
|
+
timeOptions: C,
|
|
264
268
|
className: t("border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20", e.state.meta.errors.length > 0 && "border-destructive focus-visible:border-destructive ring-destructive/20")
|
|
265
269
|
}),
|
|
266
270
|
e.state.meta.errors.length > 0 && /* @__PURE__ */ d("p", {
|
|
@@ -273,7 +277,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
273
277
|
}),
|
|
274
278
|
/* @__PURE__ */ f("div", {
|
|
275
279
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
276
|
-
children: [/* @__PURE__ */ d(
|
|
280
|
+
children: [/* @__PURE__ */ d(k.Field, {
|
|
277
281
|
name: "isAllDay",
|
|
278
282
|
children: (e) => /* @__PURE__ */ d("div", {
|
|
279
283
|
className: "flex items-center h-10",
|
|
@@ -283,7 +287,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
283
287
|
type: "checkbox",
|
|
284
288
|
checked: e.state.value,
|
|
285
289
|
onChange: (t) => e.handleChange(t.target.checked),
|
|
286
|
-
disabled:
|
|
290
|
+
disabled: j,
|
|
287
291
|
className: "h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"
|
|
288
292
|
}), /* @__PURE__ */ d("span", {
|
|
289
293
|
className: "text-[14px] font-medium text-foreground/70 group-hover:text-foreground",
|
|
@@ -291,7 +295,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
291
295
|
})]
|
|
292
296
|
})
|
|
293
297
|
})
|
|
294
|
-
}), /* @__PURE__ */ d(
|
|
298
|
+
}), /* @__PURE__ */ d(k.Field, {
|
|
295
299
|
name: "isTimezoneEnabled",
|
|
296
300
|
children: (e) => /* @__PURE__ */ d("div", {
|
|
297
301
|
className: "flex items-center h-10",
|
|
@@ -301,7 +305,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
301
305
|
type: "checkbox",
|
|
302
306
|
checked: e.state.value,
|
|
303
307
|
onChange: (t) => e.handleChange(t.target.checked),
|
|
304
|
-
disabled:
|
|
308
|
+
disabled: j,
|
|
305
309
|
className: "h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"
|
|
306
310
|
}), /* @__PURE__ */ d("span", {
|
|
307
311
|
className: "text-[14px] font-medium text-foreground/70 group-hover:text-foreground",
|
|
@@ -311,11 +315,11 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
311
315
|
})
|
|
312
316
|
})]
|
|
313
317
|
}),
|
|
314
|
-
/* @__PURE__ */ d(
|
|
318
|
+
/* @__PURE__ */ d(k.Subscribe, {
|
|
315
319
|
selector: (e) => [e.values.isTimezoneEnabled],
|
|
316
320
|
children: ([e]) => e && /* @__PURE__ */ f("div", {
|
|
317
321
|
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",
|
|
318
|
-
children: [/* @__PURE__ */ d(
|
|
322
|
+
children: [/* @__PURE__ */ d(k.Field, {
|
|
319
323
|
name: "startTimezone",
|
|
320
324
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
321
325
|
className: "space-y-2",
|
|
@@ -342,7 +346,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
342
346
|
]
|
|
343
347
|
})]
|
|
344
348
|
})
|
|
345
|
-
}), /* @__PURE__ */ d(
|
|
349
|
+
}), /* @__PURE__ */ d(k.Field, {
|
|
346
350
|
name: "endTimezone",
|
|
347
351
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
348
352
|
className: "space-y-2",
|
|
@@ -374,7 +378,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
374
378
|
}),
|
|
375
379
|
/* @__PURE__ */ f("div", {
|
|
376
380
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
377
|
-
children: [/* @__PURE__ */ d(
|
|
381
|
+
children: [/* @__PURE__ */ d(k.Field, {
|
|
378
382
|
name: "repeatFrequency",
|
|
379
383
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
380
384
|
className: "space-y-2",
|
|
@@ -409,9 +413,9 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
409
413
|
]
|
|
410
414
|
})]
|
|
411
415
|
})
|
|
412
|
-
}), /* @__PURE__ */ d(
|
|
416
|
+
}), /* @__PURE__ */ d(k.Subscribe, {
|
|
413
417
|
selector: (e) => [e.values.repeatFrequency],
|
|
414
|
-
children: ([e]) => e !== "Never" && /* @__PURE__ */ d(
|
|
418
|
+
children: ([e]) => e !== "Never" && /* @__PURE__ */ d(k.Field, {
|
|
415
419
|
name: "repeatEndLevel",
|
|
416
420
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
417
421
|
className: "space-y-2 animate-in slide-in-from-top-2 duration-300",
|
|
@@ -441,12 +445,12 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
441
445
|
})
|
|
442
446
|
})]
|
|
443
447
|
}),
|
|
444
|
-
/* @__PURE__ */ d(
|
|
448
|
+
/* @__PURE__ */ d(k.Subscribe, {
|
|
445
449
|
selector: (e) => [e.values.repeatFrequency, e.values.repeatEndLevel],
|
|
446
450
|
children: ([e, t]) => e !== "Never" && /* @__PURE__ */ f("div", {
|
|
447
451
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300",
|
|
448
452
|
children: [
|
|
449
|
-
/* @__PURE__ */ d(
|
|
453
|
+
/* @__PURE__ */ d(k.Field, {
|
|
450
454
|
name: "repeatInterval",
|
|
451
455
|
children: (t) => /* @__PURE__ */ f("div", {
|
|
452
456
|
className: "space-y-2",
|
|
@@ -488,7 +492,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
488
492
|
})]
|
|
489
493
|
})
|
|
490
494
|
}),
|
|
491
|
-
t === "Until" && /* @__PURE__ */ d(
|
|
495
|
+
t === "Until" && /* @__PURE__ */ d(k.Field, {
|
|
492
496
|
name: "repeatEndUntil",
|
|
493
497
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
494
498
|
className: "space-y-2 animate-in slide-in-from-top-1",
|
|
@@ -498,15 +502,17 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
498
502
|
}), /* @__PURE__ */ d(a, {
|
|
499
503
|
date: e.state.value,
|
|
500
504
|
setDate: (t) => e.handleChange(t),
|
|
501
|
-
disabled:
|
|
505
|
+
disabled: j,
|
|
502
506
|
locale: x,
|
|
503
507
|
mode: "date",
|
|
504
|
-
minDate:
|
|
508
|
+
minDate: k.getFieldValue("start"),
|
|
509
|
+
slotDuration: S,
|
|
510
|
+
timeOptions: C,
|
|
505
511
|
className: "border-border focus:border-primary"
|
|
506
512
|
})]
|
|
507
513
|
})
|
|
508
514
|
}),
|
|
509
|
-
t === "Count" && /* @__PURE__ */ d(
|
|
515
|
+
t === "Count" && /* @__PURE__ */ d(k.Field, {
|
|
510
516
|
name: "repeatEndCount",
|
|
511
517
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
512
518
|
className: "space-y-2 animate-in slide-in-from-top-1",
|
|
@@ -525,9 +531,9 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
525
531
|
]
|
|
526
532
|
})
|
|
527
533
|
}),
|
|
528
|
-
/* @__PURE__ */ d(
|
|
534
|
+
/* @__PURE__ */ d(k.Subscribe, {
|
|
529
535
|
selector: (e) => [e.values.repeatFrequency],
|
|
530
|
-
children: ([e]) => e === "Weekly" && /* @__PURE__ */ d(
|
|
536
|
+
children: ([e]) => e === "Weekly" && /* @__PURE__ */ d(k.Field, {
|
|
531
537
|
name: "repeatDays",
|
|
532
538
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
533
539
|
className: "space-y-3 animate-in fade-in duration-300",
|
|
@@ -549,9 +555,9 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
549
555
|
})
|
|
550
556
|
})
|
|
551
557
|
}),
|
|
552
|
-
/* @__PURE__ */ d(
|
|
558
|
+
/* @__PURE__ */ d(k.Subscribe, {
|
|
553
559
|
selector: (e) => [e.values.repeatFrequency],
|
|
554
|
-
children: ([e]) => (e === "Monthly" || e === "Yearly") && /* @__PURE__ */ d(
|
|
560
|
+
children: ([e]) => (e === "Monthly" || e === "Yearly") && /* @__PURE__ */ d(k.Field, {
|
|
555
561
|
name: "repeatBy",
|
|
556
562
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
557
563
|
className: "space-y-4 animate-in fade-in duration-300",
|
|
@@ -589,7 +595,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
589
595
|
})
|
|
590
596
|
})
|
|
591
597
|
}),
|
|
592
|
-
/* @__PURE__ */ d(
|
|
598
|
+
/* @__PURE__ */ d(k.Field, {
|
|
593
599
|
name: "description",
|
|
594
600
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
595
601
|
className: "space-y-2",
|
|
@@ -603,11 +609,11 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
603
609
|
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",
|
|
604
610
|
value: e.state.value,
|
|
605
611
|
onChange: (t) => e.handleChange(t.target.value),
|
|
606
|
-
disabled:
|
|
612
|
+
disabled: j
|
|
607
613
|
})]
|
|
608
614
|
})
|
|
609
615
|
}),
|
|
610
|
-
/* @__PURE__ */ d(
|
|
616
|
+
/* @__PURE__ */ d(k.Field, {
|
|
611
617
|
name: "attachments",
|
|
612
618
|
children: (e) => /* @__PURE__ */ f("div", {
|
|
613
619
|
className: "space-y-4 pt-4 pb-2",
|
|
@@ -669,7 +675,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
669
675
|
})
|
|
670
676
|
]
|
|
671
677
|
}),
|
|
672
|
-
|
|
678
|
+
E ? E(v || {}, _, () => A(), h) : /* @__PURE__ */ f("div", {
|
|
673
679
|
style: {
|
|
674
680
|
display: "flex",
|
|
675
681
|
alignItems: "center",
|
|
@@ -680,7 +686,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
680
686
|
width: "100%",
|
|
681
687
|
flexShrink: 0
|
|
682
688
|
},
|
|
683
|
-
children: [!
|
|
689
|
+
children: [!j && b && _ === "edit" && /* @__PURE__ */ d(n, {
|
|
684
690
|
type: "button",
|
|
685
691
|
variant: "ghost",
|
|
686
692
|
className: "text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto",
|
|
@@ -694,7 +700,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
694
700
|
alignItems: "center",
|
|
695
701
|
gap: "12px"
|
|
696
702
|
},
|
|
697
|
-
children: [!
|
|
703
|
+
children: [!j && /* @__PURE__ */ d(k.Subscribe, {
|
|
698
704
|
selector: (e) => [e.canSubmit, e.isSubmitting],
|
|
699
705
|
children: ([e, t]) => /* @__PURE__ */ d(n, {
|
|
700
706
|
type: "submit",
|
|
@@ -703,7 +709,7 @@ var h = /* @__PURE__ */ e({ EzEventModal: () => _ }), g = [
|
|
|
703
709
|
style: { minWidth: "120px" },
|
|
704
710
|
disabled: !e || t,
|
|
705
711
|
onClick: (e) => {
|
|
706
|
-
e.preventDefault(), e.stopPropagation(),
|
|
712
|
+
e.preventDefault(), e.stopPropagation(), k.handleSubmit();
|
|
707
713
|
},
|
|
708
714
|
children: t ? "Saving..." : "Save"
|
|
709
715
|
})
|