ezux 1.1.12 → 1.1.13
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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-BUasd_3X.cjs"),u=require("./index-c1Zg--dt.cjs"),oe=require("./EzTableToolbar-DHE7Bb1R.cjs"),se=require("./EzTableFooter-CWjfGCjL.cjs"),k=require("./index-B3ipEEhH.cjs"),$=require("./EzSchedulerToolbar-C-5OdRY6.cjs"),ie=require("./EzEventModal-xzHfzi0O.cjs"),le=require("./EzSchedulerQuickAdd-UnOWCpJd.cjs"),o=require("react/jsx-runtime"),E=require("react"),F=require("./checkbox-B0lGHUyy.cjs"),A=require("./label-Dx6oDB-X.cjs"),B=require("./input-BgM_la4k.cjs"),D=require("./select-GxA46anr.cjs"),ce=require("./treeview.cjs"),h=require("./index-D4f2ZdrG.cjs"),de=require("./EzSignature-BaNesxwC.cjs"),l=require("./useInitCoreServices-CwXv2p4S.cjs"),ue=require("./NotificationPanel-zLxrtTGf.cjs"),L=require("./avatar-DZAaTK2f.cjs"),T=require("./tooltip-B41iztKT.cjs"),me=require("./ellipsis-CzlqJf-i.cjs"),fe=require("./EzErrorBoundary-CEdz_hDo.cjs"),he=require("./calendar-BMZ8ddOf.cjs"),x=require("./EzContextMenu-B6HBUjWv.cjs"),pe=require("./date-time-picker-DTxHdPgQ.cjs"),p=require("./popover-BJq1CKmi.cjs"),q=require("./scroll-area-CwwZSSA4.cjs");function be(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const w=be(E),we=()=>{const n=l.useThemeService(),[e,t]=E.useState(n.getState());return E.useEffect(()=>n.subscribe(t),[n]),{...e,setMode:r=>n.setMode(r),toggleMode:()=>n.toggleMode(),setThemeColor:r=>n.setThemeColor(r),setRadius:r=>n.setRadius(r)}},ge=(n,e)=>{const t=E.useRef({}),r=E.useCallback((a,s)=>{const i=t.current,f=Object.keys(i).filter(d=>i[d]),y=Object.keys(a).filter(d=>a[d]),c=y.filter(d=>!f.includes(d)),b=f.filter(d=>!y.includes(d));c.forEach((d,g)=>{const S=e(d,g);S&&n.onRowSelect&&n.onRowSelect({row:S.row,data:S.data,rowIndex:parseInt(d)||g,originalEvent:s})}),b.forEach((d,g)=>{const S=e(d,g);S&&n.onRowDeselect&&n.onRowDeselect({row:S.row,data:S.data,rowIndex:parseInt(d)||g})}),n.onSelectionChange&&n.onSelectionChange({selectedIds:y,mode:y.length>1?"multiple":"single"}),t.current=a},[n,e]);return E.useEffect(()=>()=>{t.current={}},[]),{handleSelectionChange:r,getPreviousSelection:()=>t.current}},xe=({resources:n,selectedResourceIds:e,onSelectionChange:t,className:r=""})=>{const[a,s]=E.useState(""),i=E.useMemo(()=>a?n.filter(c=>c.name.toLowerCase().includes(a.toLowerCase())):n,[n,a]),f=c=>{e.includes(c)?t(e.filter(b=>b!==c)):t([...e,c])},y=()=>{if(i.every(b=>e.includes(b.id))){const b=e.filter(d=>!i.find(g=>g.id===d));t(b)}else{const b=i.map(g=>g.id),d=Array.from(new Set([...e,...b]));t(d)}};return o.jsxs("div",{className:`p-4 border-r border-border bg-background flex flex-col gap-4 overflow-y-auto ${r}`,children:[o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"relative",children:[o.jsx(D.Search,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),o.jsx(B.Input,{type:"search",placeholder:"Search resources...",className:"pl-9 h-9 text-sm",value:a,onChange:c=>s(c.target.value)})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"font-semibold text-xs uppercase tracking-wider text-muted-foreground",children:[i.length," Found"]}),o.jsx("button",{onClick:y,className:"text-xs text-primary hover:text-primary/80 font-medium",children:"Select All"})]})]}),o.jsxs("div",{className:"flex flex-col gap-2 min-h-0 flex-1 overflow-y-auto",children:[i.map(c=>o.jsxs("div",{className:"flex items-center space-x-2 p-1 hover:bg-muted/50 rounded transition-colors",children:[o.jsx(F.Checkbox,{id:`res-${c.id}`,checked:e.includes(c.id),onCheckedChange:()=>f(c.id),className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"}),o.jsxs(A.Label,{htmlFor:`res-${c.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 flex items-center gap-2 cursor-pointer flex-1 py-1",children:[o.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:c.color||"#ccc"}}),o.jsx("span",{className:"truncate",children:c.name})]})]},c.id)),i.length===0&&o.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No resources found."})]})]})},M=new Map;class Se{name="TableService";async init(){console.log("[TableService] Initialized")}async cleanup(){}initializeWithData(e){M.set("default",JSON.parse(JSON.stringify(e)))}async getData(e){await this.simulateLatency();let t=M.get("default")||[];const r=e.state||{},a=r.columnFilters||[],s=r.globalFilter,i=r.sorting||[],f=r.pagination;if(a.length>0&&a.forEach(c=>{t=t.filter(b=>{const d=b[c.id];return d==null?!1:String(d).toLowerCase().includes(String(c.value).toLowerCase())})}),s){const c=String(s).toLowerCase();t=t.filter(b=>Object.values(b).some(d=>d!=null&&String(d).toLowerCase().includes(c)))}if(i.length>0){const c=i[0];t=[...t].sort((b,d)=>{const g=b[c.id],S=d[c.id];if(g===S)return 0;if(g==null)return 1;if(S==null)return-1;const j=g<S?-1:1;return c.desc?-j:j})}const y=t.length;if(f){const c=f.pageIndex*f.pageSize;t=t.slice(c,c+f.pageSize)}return{data:JSON.parse(JSON.stringify(t)),totalCount:y}}async fetchData(e){return this.getData(e)}async createRow(e){await this.simulateLatency();const t=M.get("default")||[],r={id:e.id||Math.random().toString(36).substring(2,9),...e};return t.push(r),M.set("default",t),r}async updateRow(e,t){await this.simulateLatency();const r=M.get("default")||[],a=r.findIndex(s=>String(s.id)===String(e));if(a!==-1)return r[a]={...r[a],...t},M.set("default",r),r[a];throw new Error(`Row with ID ${e} not found`)}async deleteRow(e){await this.simulateLatency();const r=(M.get("default")||[]).filter(a=>String(a.id)!==String(e));M.set("default",r)}simulateLatency(){return new Promise(e=>setTimeout(e,300))}}const v=new Map,Ce=()=>{v.has("root")||(v.set("root",[{id:"1",label:"Documents",hasChildren:!0},{id:"2",label:"Music",hasChildren:!0},{id:"3",label:"Pictures",hasChildren:!0},{id:"4",label:"Videos",hasChildren:!1}]),v.set("1",[{id:"1-1",label:"Work",hasChildren:!0},{id:"1-2",label:"Personal",hasChildren:!1}]),v.set("1-1",[{id:"1-1-1",label:"Project A",hasChildren:!1},{id:"1-1-2",label:"Project B",hasChildren:!1}]),v.set("2",[{id:"2-1",label:"Rock",hasChildren:!1},{id:"2-2",label:"Pop",hasChildren:!1}]))};class ye{name="TreeService";constructor(){Ce()}async simulateLatency(){await new Promise(e=>setTimeout(e,300+Math.random()*500))}async loadNodes(e){await this.simulateLatency();const t=e||"root";return JSON.parse(JSON.stringify(v.get(t)||[]))}async moveNode(e,t,r){await this.simulateLatency(),console.log(`Moving node ${e} to ${t} at index ${r}`)}async renameNode(e,t){await this.simulateLatency();for(const[r,a]of v.entries()){const s=a.find(i=>i.id===e);s&&(s.label=t,v.set(r,[...a]))}}async deleteNode(e){await this.simulateLatency();for(const[t,r]of v.entries()){const a=r.findIndex(s=>s.id===e);a!==-1&&(r.splice(a,1),v.set(t,[...r]))}}async addNode(e,t){await this.simulateLatency();const r=v.get(e)||[],a={id:`new-${Date.now()}`,label:"New Node",hasChildren:!1,...t};return v.set(e,[...r,a]),a}}const m=new Map;class ve{name="KanbanService";async init(){console.log("[KanbanService] Initialized")}async cleanup(){}initializeWithData(e){e.forEach(t=>{m.has(t.id)||m.set(t.id,JSON.parse(JSON.stringify(t)))})}async getBoard(e){await this.simulateLatency();const t=m.get(e);if(!t)throw new Error(`Board with ID ${e} not found`);return JSON.parse(JSON.stringify(t))}async createBoard(e){await this.simulateLatency();const t={id:e.id||`board-${Date.now()}`,name:e.name||"Untitled Board",description:e.description,columns:e.columns||[],cards:e.cards||[],permissions:e.permissions,settings:e.settings||{allowDragAndDrop:!0,allowMultiSelect:!0,enableWipLimits:!1,defaultView:"standard"},createdAt:new Date,updatedAt:new Date};return m.set(t.id,t),t}async updateBoard(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={...r,...t,updatedAt:new Date};m.set(e,a)}async deleteBoard(e){await this.simulateLatency(),m.delete(e)}async createCard(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`card-${Date.now()}`,type:t.type||"standard",title:t.title||"Untitled Card",description:t.description,columnId:t.columnId||r.columns[0]?.id||"",position:t.position??r.cards.filter(s=>s.columnId===t.columnId).length,assignees:t.assignees||[],tags:t.tags||[],priority:t.priority,metadata:t.metadata||{},createdBy:t.createdBy||"current-user",createdAt:new Date,updatedBy:t.updatedBy||"current-user",updatedAt:new Date,...t};return r.cards.push(a),m.set(e,r),a}async updateCard(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.cards.findIndex(i=>i.id===e);if(s!==-1){a.cards[s]={...a.cards[s],...t,updatedAt:new Date},m.set(r,a);return}}throw new Error(`Card with ID ${e} not found`)}async deleteCard(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.cards.filter(s=>s.id!==e);if(a.length!==r.cards.length){r.cards=a,m.set(t,r);return}}throw new Error(`Card with ID ${e} not found`)}async moveCard(e,t,r,a){await this.simulateLatency();for(const[s,i]of m.entries()){const f=i.cards.find(y=>y.id===e);if(f){f.columnId=t,r!==void 0&&(f.swimlaneId=r),a!==void 0&&(f.position=a),f.updatedAt=new Date,m.set(s,i);return}}throw new Error(`Card with ID ${e} not found`)}async createColumn(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`column-${Date.now()}`,name:t.name||"Untitled Column",color:t.color,icon:t.icon,wipLimit:t.wipLimit,position:t.position??r.columns.length,isCollapsed:t.isCollapsed||!1};return r.columns.push(a),m.set(e,r),a}async updateColumn(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.columns.findIndex(i=>i.id===e);if(s!==-1){a.columns[s]={...a.columns[s],...t},m.set(r,a);return}}throw new Error(`Column with ID ${e} not found`)}async deleteColumn(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.columns.filter(s=>s.id!==e);if(a.length!==r.columns.length){const s=r.cards.filter(i=>i.columnId!==e);r.columns=a,r.cards=s,m.set(t,r);return}}throw new Error(`Column with ID ${e} not found`)}async createSwimlane(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`swimlane-${Date.now()}`,name:t.name||"New Swimlane",type:t.type||"custom",color:t.color,position:t.position??(r.swimlanes?.length||0),isCollapsed:!1,...t},s=r.swimlanes||[];return s.push(a),r.swimlanes=s,m.set(e,r),a}async updateSwimlane(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.swimlanes||[],i=s.findIndex(f=>f.id===e);if(i!==-1){s[i]={...s[i],...t},a.swimlanes=s,m.set(r,a);return}}throw new Error(`Swimlane with ID ${e} not found`)}async deleteSwimlane(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.swimlanes||[];if(a.some(s=>s.id===e)){r.swimlanes=a.filter(s=>s.id!==e),r.cards=r.cards.map(s=>s.swimlaneId===e?{...s,swimlaneId:void 0}:s),m.set(t,r);return}}throw new Error(`Swimlane with ID ${e} not found`)}simulateLatency(){return new Promise(e=>setTimeout(e,300))}}function Ee(n,e){const t=e.map(a=>a.header).join(","),r=n.map(a=>e.map(s=>{const i=a[s.id];if(i==null)return"";const f=String(i);return f.includes(",")||f.includes(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-DUY1SqMo.cjs"),u=require("./index-c1Zg--dt.cjs"),oe=require("./EzTableToolbar-DHE7Bb1R.cjs"),se=require("./EzTableFooter-CWjfGCjL.cjs"),k=require("./index-B3ipEEhH.cjs"),$=require("./EzSchedulerToolbar-C-5OdRY6.cjs"),ie=require("./EzEventModal-xzHfzi0O.cjs"),le=require("./EzSchedulerQuickAdd-UnOWCpJd.cjs"),o=require("react/jsx-runtime"),E=require("react"),F=require("./checkbox-B0lGHUyy.cjs"),A=require("./label-Dx6oDB-X.cjs"),B=require("./input-BgM_la4k.cjs"),D=require("./select-GxA46anr.cjs"),ce=require("./treeview.cjs"),h=require("./index-D4f2ZdrG.cjs"),de=require("./EzSignature-BaNesxwC.cjs"),l=require("./useInitCoreServices-CwXv2p4S.cjs"),ue=require("./NotificationPanel-zLxrtTGf.cjs"),L=require("./avatar-DZAaTK2f.cjs"),T=require("./tooltip-B41iztKT.cjs"),me=require("./ellipsis-CzlqJf-i.cjs"),fe=require("./EzErrorBoundary-CEdz_hDo.cjs"),he=require("./calendar-BMZ8ddOf.cjs"),x=require("./EzContextMenu-B6HBUjWv.cjs"),pe=require("./date-time-picker-DTxHdPgQ.cjs"),p=require("./popover-BJq1CKmi.cjs"),q=require("./scroll-area-CwwZSSA4.cjs");function be(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const w=be(E),we=()=>{const n=l.useThemeService(),[e,t]=E.useState(n.getState());return E.useEffect(()=>n.subscribe(t),[n]),{...e,setMode:r=>n.setMode(r),toggleMode:()=>n.toggleMode(),setThemeColor:r=>n.setThemeColor(r),setRadius:r=>n.setRadius(r)}},ge=(n,e)=>{const t=E.useRef({}),r=E.useCallback((a,s)=>{const i=t.current,f=Object.keys(i).filter(d=>i[d]),y=Object.keys(a).filter(d=>a[d]),c=y.filter(d=>!f.includes(d)),b=f.filter(d=>!y.includes(d));c.forEach((d,g)=>{const S=e(d,g);S&&n.onRowSelect&&n.onRowSelect({row:S.row,data:S.data,rowIndex:parseInt(d)||g,originalEvent:s})}),b.forEach((d,g)=>{const S=e(d,g);S&&n.onRowDeselect&&n.onRowDeselect({row:S.row,data:S.data,rowIndex:parseInt(d)||g})}),n.onSelectionChange&&n.onSelectionChange({selectedIds:y,mode:y.length>1?"multiple":"single"}),t.current=a},[n,e]);return E.useEffect(()=>()=>{t.current={}},[]),{handleSelectionChange:r,getPreviousSelection:()=>t.current}},xe=({resources:n,selectedResourceIds:e,onSelectionChange:t,className:r=""})=>{const[a,s]=E.useState(""),i=E.useMemo(()=>a?n.filter(c=>c.name.toLowerCase().includes(a.toLowerCase())):n,[n,a]),f=c=>{e.includes(c)?t(e.filter(b=>b!==c)):t([...e,c])},y=()=>{if(i.every(b=>e.includes(b.id))){const b=e.filter(d=>!i.find(g=>g.id===d));t(b)}else{const b=i.map(g=>g.id),d=Array.from(new Set([...e,...b]));t(d)}};return o.jsxs("div",{className:`p-4 border-r border-border bg-background flex flex-col gap-4 overflow-y-auto ${r}`,children:[o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"relative",children:[o.jsx(D.Search,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),o.jsx(B.Input,{type:"search",placeholder:"Search resources...",className:"pl-9 h-9 text-sm",value:a,onChange:c=>s(c.target.value)})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"font-semibold text-xs uppercase tracking-wider text-muted-foreground",children:[i.length," Found"]}),o.jsx("button",{onClick:y,className:"text-xs text-primary hover:text-primary/80 font-medium",children:"Select All"})]})]}),o.jsxs("div",{className:"flex flex-col gap-2 min-h-0 flex-1 overflow-y-auto",children:[i.map(c=>o.jsxs("div",{className:"flex items-center space-x-2 p-1 hover:bg-muted/50 rounded transition-colors",children:[o.jsx(F.Checkbox,{id:`res-${c.id}`,checked:e.includes(c.id),onCheckedChange:()=>f(c.id),className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"}),o.jsxs(A.Label,{htmlFor:`res-${c.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 flex items-center gap-2 cursor-pointer flex-1 py-1",children:[o.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:c.color||"#ccc"}}),o.jsx("span",{className:"truncate",children:c.name})]})]},c.id)),i.length===0&&o.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No resources found."})]})]})},M=new Map;class Se{name="TableService";async init(){console.log("[TableService] Initialized")}async cleanup(){}initializeWithData(e){M.set("default",JSON.parse(JSON.stringify(e)))}async getData(e){await this.simulateLatency();let t=M.get("default")||[];const r=e.state||{},a=r.columnFilters||[],s=r.globalFilter,i=r.sorting||[],f=r.pagination;if(a.length>0&&a.forEach(c=>{t=t.filter(b=>{const d=b[c.id];return d==null?!1:String(d).toLowerCase().includes(String(c.value).toLowerCase())})}),s){const c=String(s).toLowerCase();t=t.filter(b=>Object.values(b).some(d=>d!=null&&String(d).toLowerCase().includes(c)))}if(i.length>0){const c=i[0];t=[...t].sort((b,d)=>{const g=b[c.id],S=d[c.id];if(g===S)return 0;if(g==null)return 1;if(S==null)return-1;const j=g<S?-1:1;return c.desc?-j:j})}const y=t.length;if(f){const c=f.pageIndex*f.pageSize;t=t.slice(c,c+f.pageSize)}return{data:JSON.parse(JSON.stringify(t)),totalCount:y}}async fetchData(e){return this.getData(e)}async createRow(e){await this.simulateLatency();const t=M.get("default")||[],r={id:e.id||Math.random().toString(36).substring(2,9),...e};return t.push(r),M.set("default",t),r}async updateRow(e,t){await this.simulateLatency();const r=M.get("default")||[],a=r.findIndex(s=>String(s.id)===String(e));if(a!==-1)return r[a]={...r[a],...t},M.set("default",r),r[a];throw new Error(`Row with ID ${e} not found`)}async deleteRow(e){await this.simulateLatency();const r=(M.get("default")||[]).filter(a=>String(a.id)!==String(e));M.set("default",r)}simulateLatency(){return new Promise(e=>setTimeout(e,300))}}const v=new Map,Ce=()=>{v.has("root")||(v.set("root",[{id:"1",label:"Documents",hasChildren:!0},{id:"2",label:"Music",hasChildren:!0},{id:"3",label:"Pictures",hasChildren:!0},{id:"4",label:"Videos",hasChildren:!1}]),v.set("1",[{id:"1-1",label:"Work",hasChildren:!0},{id:"1-2",label:"Personal",hasChildren:!1}]),v.set("1-1",[{id:"1-1-1",label:"Project A",hasChildren:!1},{id:"1-1-2",label:"Project B",hasChildren:!1}]),v.set("2",[{id:"2-1",label:"Rock",hasChildren:!1},{id:"2-2",label:"Pop",hasChildren:!1}]))};class ye{name="TreeService";constructor(){Ce()}async simulateLatency(){await new Promise(e=>setTimeout(e,300+Math.random()*500))}async loadNodes(e){await this.simulateLatency();const t=e||"root";return JSON.parse(JSON.stringify(v.get(t)||[]))}async moveNode(e,t,r){await this.simulateLatency(),console.log(`Moving node ${e} to ${t} at index ${r}`)}async renameNode(e,t){await this.simulateLatency();for(const[r,a]of v.entries()){const s=a.find(i=>i.id===e);s&&(s.label=t,v.set(r,[...a]))}}async deleteNode(e){await this.simulateLatency();for(const[t,r]of v.entries()){const a=r.findIndex(s=>s.id===e);a!==-1&&(r.splice(a,1),v.set(t,[...r]))}}async addNode(e,t){await this.simulateLatency();const r=v.get(e)||[],a={id:`new-${Date.now()}`,label:"New Node",hasChildren:!1,...t};return v.set(e,[...r,a]),a}}const m=new Map;class ve{name="KanbanService";async init(){console.log("[KanbanService] Initialized")}async cleanup(){}initializeWithData(e){e.forEach(t=>{m.has(t.id)||m.set(t.id,JSON.parse(JSON.stringify(t)))})}async getBoard(e){await this.simulateLatency();const t=m.get(e);if(!t)throw new Error(`Board with ID ${e} not found`);return JSON.parse(JSON.stringify(t))}async createBoard(e){await this.simulateLatency();const t={id:e.id||`board-${Date.now()}`,name:e.name||"Untitled Board",description:e.description,columns:e.columns||[],cards:e.cards||[],permissions:e.permissions,settings:e.settings||{allowDragAndDrop:!0,allowMultiSelect:!0,enableWipLimits:!1,defaultView:"standard"},createdAt:new Date,updatedAt:new Date};return m.set(t.id,t),t}async updateBoard(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={...r,...t,updatedAt:new Date};m.set(e,a)}async deleteBoard(e){await this.simulateLatency(),m.delete(e)}async createCard(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`card-${Date.now()}`,type:t.type||"standard",title:t.title||"Untitled Card",description:t.description,columnId:t.columnId||r.columns[0]?.id||"",position:t.position??r.cards.filter(s=>s.columnId===t.columnId).length,assignees:t.assignees||[],tags:t.tags||[],priority:t.priority,metadata:t.metadata||{},createdBy:t.createdBy||"current-user",createdAt:new Date,updatedBy:t.updatedBy||"current-user",updatedAt:new Date,...t};return r.cards.push(a),m.set(e,r),a}async updateCard(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.cards.findIndex(i=>i.id===e);if(s!==-1){a.cards[s]={...a.cards[s],...t,updatedAt:new Date},m.set(r,a);return}}throw new Error(`Card with ID ${e} not found`)}async deleteCard(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.cards.filter(s=>s.id!==e);if(a.length!==r.cards.length){r.cards=a,m.set(t,r);return}}throw new Error(`Card with ID ${e} not found`)}async moveCard(e,t,r,a){await this.simulateLatency();for(const[s,i]of m.entries()){const f=i.cards.find(y=>y.id===e);if(f){f.columnId=t,r!==void 0&&(f.swimlaneId=r),a!==void 0&&(f.position=a),f.updatedAt=new Date,m.set(s,i);return}}throw new Error(`Card with ID ${e} not found`)}async createColumn(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`column-${Date.now()}`,name:t.name||"Untitled Column",color:t.color,icon:t.icon,wipLimit:t.wipLimit,position:t.position??r.columns.length,isCollapsed:t.isCollapsed||!1};return r.columns.push(a),m.set(e,r),a}async updateColumn(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.columns.findIndex(i=>i.id===e);if(s!==-1){a.columns[s]={...a.columns[s],...t},m.set(r,a);return}}throw new Error(`Column with ID ${e} not found`)}async deleteColumn(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.columns.filter(s=>s.id!==e);if(a.length!==r.columns.length){const s=r.cards.filter(i=>i.columnId!==e);r.columns=a,r.cards=s,m.set(t,r);return}}throw new Error(`Column with ID ${e} not found`)}async createSwimlane(e,t){await this.simulateLatency();const r=m.get(e);if(!r)throw new Error(`Board with ID ${e} not found`);const a={id:t.id||`swimlane-${Date.now()}`,name:t.name||"New Swimlane",type:t.type||"custom",color:t.color,position:t.position??(r.swimlanes?.length||0),isCollapsed:!1,...t},s=r.swimlanes||[];return s.push(a),r.swimlanes=s,m.set(e,r),a}async updateSwimlane(e,t){await this.simulateLatency();for(const[r,a]of m.entries()){const s=a.swimlanes||[],i=s.findIndex(f=>f.id===e);if(i!==-1){s[i]={...s[i],...t},a.swimlanes=s,m.set(r,a);return}}throw new Error(`Swimlane with ID ${e} not found`)}async deleteSwimlane(e){await this.simulateLatency();for(const[t,r]of m.entries()){const a=r.swimlanes||[];if(a.some(s=>s.id===e)){r.swimlanes=a.filter(s=>s.id!==e),r.cards=r.cards.map(s=>s.swimlaneId===e?{...s,swimlaneId:void 0}:s),m.set(t,r);return}}throw new Error(`Swimlane with ID ${e} not found`)}simulateLatency(){return new Promise(e=>setTimeout(e,300))}}function Ee(n,e){const t=e.map(a=>a.header).join(","),r=n.map(a=>e.map(s=>{const i=a[s.id];if(i==null)return"";const f=String(i);return f.includes(",")||f.includes(`
|
|
2
2
|
`)||f.includes('"')?`"${f.replace(/"/g,'""')}"`:f}).join(","));return[t,...r].join(`
|
|
3
3
|
`)}const I=["#06d6a0","#ef476f","#ffd166","#118ab2","#073b4c"],Te=({text:n,className:e="",defaultColor:t="#2d2e33",highlight:r,delay:a,textSize:s,textDir:i,highlightDir:f})=>{const y=n.split(""),b=`${s||"text-4xl md:text-5xl lg:text-6xl"} font-black tracking-tight ${e}`,d=r?r.split(""):[],[g,S]=E.useState(!1);E.useEffect(()=>{const z=()=>{const ne=document.documentElement.classList.contains("dark")||window.matchMedia("(prefers-color-scheme: dark)").matches;S(ne)};z();const N=new MutationObserver(()=>{z()});N.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const P=window.matchMedia("(prefers-color-scheme: dark)");return P.addEventListener("change",z),()=>{N.disconnect(),P.removeEventListener("change",z)}},[]);const j=g?"#ffffff":t;return o.jsxs("span",{className:`flex flex-col justify-center items-center ${b}`,style:{letterSpacing:"-0.05em"},children:[o.jsx("style",{children:`
|
|
4
4
|
@keyframes wobble {
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as I, a as B } from "./index-
|
|
2
|
-
import { b as Ie, c as Be, d as Re, e as Pe, f as $e, g as Ae, h as je, i as Fe, j as Oe, k as Ke, S as Ve, l as He } from "./index-
|
|
1
|
+
import { E as I, a as B } from "./index-BQKw_Vho.js";
|
|
2
|
+
import { b as Ie, c as Be, d as Re, e as Pe, f as $e, g as Ae, h as je, i as Fe, j as Oe, k as Ke, S as Ve, l as He } from "./index-BQKw_Vho.js";
|
|
3
3
|
import { B as _e, a as Ge, b as Xe, c as We, C as Ue, d as Qe, e as qe, f as Ye, g as Ze, h as et, i as tt, j as at, E as rt, k as st, P as nt, l as ot, m as it, n as lt, R as dt, o as ct, S as ut, p as mt, q as ft, r as pt, s as ht, t as wt, u as bt, v as gt, w as yt } from "./index-C5STgBSy.js";
|
|
4
4
|
import { EzTableToolbar as Ct } from "./EzTableToolbar-Bz8UWv6j.js";
|
|
5
5
|
import { EzTableFooter as vt } from "./EzTableFooter-DveD12RC.js";
|
package/dist/layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("./useInitCoreServices-CwXv2p4S.cjs");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("./useInitCoreServices-CwXv2p4S.cjs");const e=require("./index-DUY1SqMo.cjs");require("./EzErrorBoundary-CEdz_hDo.cjs");require("./NotificationPanel-zLxrtTGf.cjs");exports.EzHeader=e.EzHeader;exports.EzLanguageSwitcher=e.EzLanguageSwitcher;exports.EzLayout=e.EzLayout;exports.EzOrganizationSwitcher=e.EzOrganizationSwitcher;exports.EzSidebarFooter=e.EzSidebarFooter;exports.EzSidebarNav=e.EzSidebarNav;exports.EzSidebarNavItem=e.EzSidebarNavItem;exports.EzThemeColorChanger=e.EzThemeColorChanger;exports.EzThemeSwitcher=e.EzThemeSwitcher;exports.EzUserProfile=e.EzUserProfile;exports.SignInForm=e.SignInForm;exports.SignUpForm=e.SignUpForm;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "./useInitCoreServices-D1WaWlaI.js";
|
|
4
|
-
import { b as m, c as z, d as E, e as S, f as g, g as h, h as n, i as p, j as d, k as b, S as c, l as f } from "./index-
|
|
4
|
+
import { b as m, c as z, d as E, e as S, f as g, g as h, h as n, i as p, j as d, k as b, S as c, l as f } from "./index-BQKw_Vho.js";
|
|
5
5
|
import "./EzErrorBoundary-D4NBadES.js";
|
|
6
6
|
import "./NotificationPanel-D2Y-_ahk.js";
|
|
7
7
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ezux",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "A comprehensive, type-safe TanStack First Advance component library designed for modern enterprise applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -187,4 +187,4 @@
|
|
|
187
187
|
"vite-plugin-dts": "^4.5.4",
|
|
188
188
|
"vitest": "^4.0.18"
|
|
189
189
|
}
|
|
190
|
-
}
|
|
190
|
+
}
|