cortex-react-components 2.29.0-beta.12 → 2.29.0-beta.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.
Files changed (119) hide show
  1. package/dist/{chunk-CTDGP5H4.mjs → chunk-2Q4Q7MT6.mjs} +1 -1
  2. package/dist/{chunk-EXNZJ3JE.mjs → chunk-2W5UZALU.mjs} +1 -1
  3. package/dist/{chunk-AE22EADM.mjs → chunk-5B3PAKEB.mjs} +1 -1
  4. package/dist/{chunk-74JH5AEZ.mjs → chunk-5SQJK4M5.mjs} +1 -1
  5. package/dist/{chunk-GEPYRPWO.mjs → chunk-6LCKHANB.mjs} +1 -1
  6. package/dist/{chunk-NJ56YTBP.mjs → chunk-6MFAWZRQ.mjs} +1 -1
  7. package/dist/{chunk-3R4ESOSM.mjs → chunk-6UMEZWX6.mjs} +1 -1
  8. package/dist/{chunk-XNLTHAQ7.mjs → chunk-7FPCEJXM.mjs} +1 -1
  9. package/dist/{chunk-3DXSTAQP.mjs → chunk-7YSJAVXO.mjs} +1 -1
  10. package/dist/{chunk-DZDMH6IZ.mjs → chunk-CLMGLIGH.mjs} +1 -1
  11. package/dist/{chunk-BJ4PT44N.mjs → chunk-D5RCP3ZQ.mjs} +1 -1
  12. package/dist/{chunk-KBFRFIHJ.mjs → chunk-HMRXEVD5.mjs} +1 -1
  13. package/dist/{chunk-YU6NGK5A.mjs → chunk-IXZUFC6Y.mjs} +1 -1
  14. package/dist/{chunk-FQ56UUMT.mjs → chunk-JTHYUI4E.mjs} +1 -1
  15. package/dist/{chunk-LZVWXI54.mjs → chunk-LODLJMHI.mjs} +1 -1
  16. package/dist/{chunk-DDISU7MD.mjs → chunk-MD6HBEMI.mjs} +1 -1
  17. package/dist/{chunk-UZLN3ILK.mjs → chunk-MIM3VFET.mjs} +1 -1
  18. package/dist/{chunk-YKMPMQQN.mjs → chunk-NKP6F2FT.mjs} +1 -1
  19. package/dist/{chunk-LETUF7VL.mjs → chunk-O67ANXPZ.mjs} +1 -1
  20. package/dist/chunk-OIVIGTDT.mjs +4 -0
  21. package/dist/{chunk-N7RN3IUS.mjs → chunk-OTGGV6NW.mjs} +1 -1
  22. package/dist/chunk-P4NVJNGE.mjs +4 -0
  23. package/dist/{chunk-A6INQL3D.mjs → chunk-PJRQT2R6.mjs} +1 -1
  24. package/dist/{chunk-C2MKUCGW.mjs → chunk-PTZ5BEAI.mjs} +1 -1
  25. package/dist/{chunk-W7QAGMX7.mjs → chunk-QPGVTPZ4.mjs} +1 -1
  26. package/dist/{chunk-ESDGVG7N.mjs → chunk-T5DDLCLZ.mjs} +1 -1
  27. package/dist/{chunk-BAR6C7TR.mjs → chunk-TOVISRXM.mjs} +1 -1
  28. package/dist/{chunk-AFWCGPWL.mjs → chunk-ULE372K2.mjs} +1 -1
  29. package/dist/{chunk-TEJHZXUT.mjs → chunk-VKUF2Y5T.mjs} +1 -1
  30. package/dist/{chunk-PPZB3BIS.mjs → chunk-WSM5P7TR.mjs} +1 -1
  31. package/dist/{chunk-VBXTOXY3.mjs → chunk-WZ37RZYG.mjs} +1 -1
  32. package/dist/{chunk-Z5GLXQ4G.mjs → chunk-X422OZSY.mjs} +1 -1
  33. package/dist/{chunk-YJNUFYR6.mjs → chunk-XIBE7BB3.mjs} +1 -1
  34. package/dist/{chunk-VCKKDEC5.mjs → chunk-XSN75ALA.mjs} +1 -1
  35. package/dist/{chunk-FPPA6M6A.mjs → chunk-ZG2ZUVRG.mjs} +1 -1
  36. package/dist/{chunk-HDLKX5L3.mjs → chunk-ZW24FGHA.mjs} +1 -1
  37. package/dist/components/Blocks/Banner.mjs +1 -1
  38. package/dist/components/Blocks/CallToAction.mjs +1 -1
  39. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  40. package/dist/components/Blocks/Content.mjs +1 -1
  41. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  42. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  43. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  44. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  45. package/dist/components/Blocks/index.mjs +1 -1
  46. package/dist/components/Cards/ContentCard.mjs +1 -1
  47. package/dist/components/Cards/FeatureCard.mjs +1 -1
  48. package/dist/components/Cards/index.mjs +1 -1
  49. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  50. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  51. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  52. package/dist/components/DigitalColleagues/index.mjs +1 -1
  53. package/dist/components/Foundary/MainPage.mjs +1 -1
  54. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  55. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  56. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  57. package/dist/components/Foundary/Views/index.mjs +1 -1
  58. package/dist/components/Foundary/index.mjs +1 -1
  59. package/dist/components/HeaderFooter/Header.mjs +1 -1
  60. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  61. package/dist/components/HeaderFooter/index.mjs +1 -1
  62. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  63. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  64. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  65. package/dist/components/Heros/RenderHero.mjs +1 -1
  66. package/dist/components/Heros/index.mjs +1 -1
  67. package/dist/components/Holidays/CalendarView.d.ts +2 -1
  68. package/dist/components/Holidays/CalendarView.js +1 -1
  69. package/dist/components/Holidays/CalendarView.mjs +1 -1
  70. package/dist/components/Holidays/HolidayTracker.d.ts +2 -1
  71. package/dist/components/Holidays/HolidayTracker.js +1 -1
  72. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  73. package/dist/components/Holidays/RequestLeave.js +1 -1
  74. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  75. package/dist/components/Holidays/index.js +1 -1
  76. package/dist/components/Holidays/index.mjs +1 -1
  77. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  78. package/dist/components/Layouts/Print.mjs +1 -1
  79. package/dist/components/Layouts/SlideShow.mjs +1 -1
  80. package/dist/components/Layouts/index.mjs +1 -1
  81. package/dist/components/Payload/RichText/index.mjs +1 -1
  82. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  83. package/dist/components/Payload/index.mjs +1 -1
  84. package/dist/components/Projects/FileView.mjs +1 -1
  85. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  86. package/dist/components/Projects/ProjectPage.mjs +1 -1
  87. package/dist/components/Projects/ProjectView.mjs +1 -1
  88. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  89. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  90. package/dist/components/Projects/index.mjs +1 -1
  91. package/dist/components/dc-temp/index.mjs +1 -1
  92. package/dist/components/index.js +21 -21
  93. package/dist/components/index.mjs +1 -1
  94. package/dist/decorators/Intranet.mjs +1 -1
  95. package/dist/index.js +22 -22
  96. package/dist/index.mjs +1 -1
  97. package/dist/metafile-cjs.json +1 -1
  98. package/dist/metafile-esm.json +1 -1
  99. package/dist/pages/Blog.mjs +1 -1
  100. package/dist/pages/Documentation.mjs +1 -1
  101. package/dist/pages/IndexPage.mjs +1 -1
  102. package/dist/pages/Intranet.mjs +1 -1
  103. package/dist/pages/LandingPage.mjs +1 -1
  104. package/dist/pages/Page.mjs +1 -1
  105. package/dist/pages/Publish.mjs +1 -1
  106. package/dist/pages/Website.mjs +1 -1
  107. package/dist/sections/AboutSection.mjs +1 -1
  108. package/dist/sections/BlogDetail.mjs +1 -1
  109. package/dist/sections/BlogList.mjs +1 -1
  110. package/dist/sections/ContactSection.mjs +1 -1
  111. package/dist/sections/PageSections.mjs +1 -1
  112. package/dist/sections/PricingSection.mjs +1 -1
  113. package/dist/sections/ServiceDetail.mjs +1 -1
  114. package/dist/sections/ServiceDetailSection.mjs +1 -1
  115. package/dist/sections/ServiceSection.mjs +1 -1
  116. package/dist/sections/index.mjs +1 -1
  117. package/package.json +1 -1
  118. package/dist/chunk-MM6N4FIV.mjs +0 -4
  119. package/dist/chunk-X2JWNPWT.mjs +0 -4
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as g}from"./chunk-N25B5TQ5.mjs";import{a as b}from"./chunk-X2JWNPWT.mjs";import{a as y}from"./chunk-V4OXGW5U.mjs";import{a as f}from"./chunk-YU6NGK5A.mjs";import{a as v}from"./chunk-QTW33JYG.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(e.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":e.current?"page":void 0,children:[r(e.icon,{className:h(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as g}from"./chunk-QTW33JYG.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{useState as b}from"react";import{ChevronLeft as x,ChevronRight as N}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function I({currentDate:a,setCurrentDate:d,holidays:p}){let[i,w]=b(null),v=(new Date(a.getFullYear(),a.getMonth(),1).getDay()+6)%7,m=Array.from({length:42},(e,o)=>{let l=new Date(a.getFullYear(),a.getMonth(),o-v+1,a.getHours()),y=p.filter(c=>g.toUtcMidnight(new Date(c.startDate))<=l&&g.toUtcEndOfDay(new Date(c.endDate))>=l);return{date:l,isCurrentMonth:l.getMonth()===a.getMonth(),isToday:l.toDateString()===new Date().toDateString(),holidays:y}}),h=()=>{d(new Date(a.getFullYear(),a.getMonth()-1,1))},f=()=>{d(new Date(a.getFullYear(),a.getMonth()+1,1))},u=()=>{d(new Date)};return s("div",{className:"lg:flex lg:h-full lg:flex-col",children:[s("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[t("h1",{className:"text-base font-semibold text-foreground",children:t("time",{dateTime:a.toISOString(),children:a.toLocaleString("default",{month:"long",year:"numeric"})})}),t("div",{className:"flex items-center",children:s("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[s(r,{onClick:h,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Previous month"}),t(x,{className:"h-5 w-5","aria-hidden":"true"})]}),t(r,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),s(r,{onClick:f,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Next month"}),t(N,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),s("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[s("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[s("div",{className:"bg-white py-2",children:["M",t("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),s("div",{className:"bg-white py-2",children:["W",t("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),s("div",{className:"bg-white py-2",children:["F",t("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),s("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[t("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:m.map(e=>s("div",{className:n(e.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[t("time",{dateTime:e.date.toISOString(),className:n("flex h-6 w-6 items-center justify-center rounded-full",e.isToday&&"bg-indigo-600 font-semibold text-white"),children:e.date.getDate()}),e.holidays.length>0&&t("ol",{className:"mt-2 space-y-1 overflow-visible",children:e.holidays.map(o=>t("li",{className:"overflow-visible",children:t("div",{className:`text-xs px-1 py-0.5 rounded ${o.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:o.userName})},o.id))})]},e.date.toISOString()))}),t("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:m.map(e=>s("button",{type:"button",className:n(e.isCurrentMonth?"bg-white":"bg-gray-50",(e.date===i||e.isToday)&&"font-semibold",e.date===i&&"text-white",!e.date&&e.isToday&&"text-indigo-600",e.date!==i&&e.isCurrentMonth&&!e.isToday&&"text-gray-900",e.date!==i&&!e.isCurrentMonth&&!e.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[t("time",{dateTime:e.date.toISOString(),className:n("ml-auto",e.date===i&&e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",e.date===i&&!e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:e.date.getDate()}),s("span",{className:"sr-only",children:[e.holidays.length," holidays"]}),e.holidays.length>0&&t("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:e.holidays.map(o=>t("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${o.status==="approved"?"bg-green-500":"bg-gray-500"}`},o.id))})]},e.date.toISOString()))})]})]})]})}export{I as a};