cortex-react-components 3.0.7 → 3.0.9

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 (225) hide show
  1. package/dist/{chunk-LSHBOPCT.mjs → chunk-27NWC2OO.mjs} +6 -3
  2. package/dist/{chunk-6B6BKJIE.mjs → chunk-34R3E2JB.mjs} +1 -1
  3. package/dist/{chunk-2NKCNQ56.mjs → chunk-3YAZKLH3.mjs} +1 -1
  4. package/dist/{chunk-FUNWDVGQ.mjs → chunk-4DNX5IYR.mjs} +1 -1
  5. package/dist/{chunk-HABWABS7.mjs → chunk-4O6ESJYG.mjs} +32 -11
  6. package/dist/{chunk-7H3IRT7K.mjs → chunk-5CQITTLV.mjs} +1 -1
  7. package/dist/{chunk-NAPGIF5D.mjs → chunk-5DYPBHBP.mjs} +3 -3
  8. package/dist/{chunk-DAQOEDAR.mjs → chunk-5NGZXIP7.mjs} +1 -1
  9. package/dist/{chunk-P4DQRHCA.mjs → chunk-6I3O6TVG.mjs} +1 -1
  10. package/dist/{chunk-EDJDHF22.mjs → chunk-6QSVFSOJ.mjs} +1 -1
  11. package/dist/{chunk-R2SJ5TZH.mjs → chunk-6VQJSQRU.mjs} +8 -8
  12. package/dist/{chunk-WMAVH7JO.mjs → chunk-6VQLA4YU.mjs} +2 -2
  13. package/dist/{chunk-GXTF5CHJ.mjs → chunk-7D3SYOXW.mjs} +7 -4
  14. package/dist/{chunk-DO73CLFG.mjs → chunk-AQPLEBKG.mjs} +1 -1
  15. package/dist/{chunk-ZPWWTTFF.mjs → chunk-BPAZFILP.mjs} +1 -1
  16. package/dist/{chunk-K3TF6OWE.mjs → chunk-BVCARDFK.mjs} +5 -5
  17. package/dist/{chunk-ENFQLMV3.mjs → chunk-CKBIYWPM.mjs} +1 -1
  18. package/dist/{chunk-KV5RVOAP.mjs → chunk-DGV5AVAW.mjs} +1 -1
  19. package/dist/{chunk-OS5X3ADZ.mjs → chunk-E5LGE3IW.mjs} +1 -1
  20. package/dist/chunk-F4LCVFZK.mjs +19 -0
  21. package/dist/{chunk-LAJ5FNY4.mjs → chunk-G5N5MCLS.mjs} +1 -1
  22. package/dist/{chunk-HZZWKYB5.mjs → chunk-G7GPQ6BO.mjs} +1 -1
  23. package/dist/{chunk-URCY4KWN.mjs → chunk-G7WAPCKX.mjs} +1 -1
  24. package/dist/{chunk-7OGBZ6QQ.mjs → chunk-ICVTRW5Y.mjs} +1 -1
  25. package/dist/{chunk-AICDXFGU.mjs → chunk-IFEQNYUB.mjs} +2 -2
  26. package/dist/{chunk-LCRSPNPB.mjs → chunk-LELKTN52.mjs} +18 -14
  27. package/dist/{chunk-RKQ4CVVG.mjs → chunk-M7LM5P64.mjs} +1 -1
  28. package/dist/{chunk-DQZO42TD.mjs → chunk-MSAH6P5O.mjs} +1 -1
  29. package/dist/{chunk-GZW77OJM.mjs → chunk-NKHYDT5B.mjs} +1 -1
  30. package/dist/{chunk-TTVOGAI4.mjs → chunk-OFES4YYV.mjs} +2 -2
  31. package/dist/{chunk-LP3K7AVX.mjs → chunk-OYHXC3AT.mjs} +13 -13
  32. package/dist/{chunk-7ZMZT7I6.mjs → chunk-P7BPG7W7.mjs} +1 -1
  33. package/dist/chunk-PIQUYPOZ.mjs +41 -0
  34. package/dist/{chunk-KVULICDA.mjs → chunk-PVI4R7FJ.mjs} +1 -1
  35. package/dist/{chunk-I647IJUG.mjs → chunk-QC2AXU6I.mjs} +2 -2
  36. package/dist/{chunk-M5JROT2X.mjs → chunk-R242HNC3.mjs} +1 -1
  37. package/dist/{chunk-6Q4KYDHK.mjs → chunk-RJRQ3SY5.mjs} +2 -2
  38. package/dist/{chunk-OXZ5QAXQ.mjs → chunk-S4FUSOSS.mjs} +1 -1
  39. package/dist/{chunk-DAGWV4UL.mjs → chunk-SRK3Y7FA.mjs} +1 -1
  40. package/dist/{chunk-2TJ5HOCV.mjs → chunk-UBEWNGCN.mjs} +1 -1
  41. package/dist/{chunk-JBFNSEIJ.mjs → chunk-UETTBM3J.mjs} +1 -1
  42. package/dist/{chunk-DB2F6SID.mjs → chunk-ULYN63F3.mjs} +1 -1
  43. package/dist/{chunk-VNSEHNDX.mjs → chunk-VF2QBVAI.mjs} +1 -1
  44. package/dist/{chunk-EC4N6ZH3.mjs → chunk-WA3OQB7X.mjs} +1 -1
  45. package/dist/{chunk-UDZU3AZC.mjs → chunk-XWYGGWIF.mjs} +4 -4
  46. package/dist/{chunk-2PGER2HM.mjs → chunk-YMXGTNMY.mjs} +1 -1
  47. package/dist/{chunk-G3UZUSQZ.mjs → chunk-ZFWHFUZP.mjs} +4 -4
  48. package/dist/{chunk-HQ2AUN2H.mjs → chunk-ZMITLXFT.mjs} +1 -1
  49. package/dist/{chunk-DRCDP3RU.mjs → chunk-ZXU5T3GV.mjs} +1 -1
  50. package/dist/{chunk-6RAMGDYG.mjs → chunk-ZZ5EM2M4.mjs} +1 -1
  51. package/dist/components/AdvancedComponents/index.mjs +9 -9
  52. package/dist/components/AdvancedComponents/org-chart-component/OrgChart.mjs +4 -4
  53. package/dist/components/AdvancedComponents/org-chart-component/OrgNode.mjs +2 -2
  54. package/dist/components/AdvancedComponents/org-chart-component/OrgTree.mjs +3 -3
  55. package/dist/components/AdvancedComponents/org-chart-component/index.mjs +6 -6
  56. package/dist/components/Blocks/Banner.js +17 -1
  57. package/dist/components/Blocks/Banner.mjs +4 -3
  58. package/dist/components/Blocks/CallToAction.js +17 -1
  59. package/dist/components/Blocks/CallToAction.mjs +4 -3
  60. package/dist/components/Blocks/CollapsibleArea.js +17 -1
  61. package/dist/components/Blocks/CollapsibleArea.mjs +5 -4
  62. package/dist/components/Blocks/Content.js +17 -1
  63. package/dist/components/Blocks/Content.mjs +5 -4
  64. package/dist/components/Blocks/FeaturesBlock.js +17 -1
  65. package/dist/components/Blocks/FeaturesBlock.mjs +4 -3
  66. package/dist/components/Blocks/RelatedPosts.js +17 -1
  67. package/dist/components/Blocks/RelatedPosts.mjs +5 -4
  68. package/dist/components/Blocks/RenderBlocks.js +17 -1
  69. package/dist/components/Blocks/RenderBlocks.mjs +7 -6
  70. package/dist/components/Blocks/ReusableContentBlock.js +17 -1
  71. package/dist/components/Blocks/ReusableContentBlock.mjs +7 -6
  72. package/dist/components/Blocks/index.js +17 -1
  73. package/dist/components/Blocks/index.mjs +13 -12
  74. package/dist/components/CRM/CogeBoard.js +1 -1
  75. package/dist/components/CRM/CogeBoard.mjs +2 -2
  76. package/dist/components/CRM/DealDetails.js +1 -1
  77. package/dist/components/CRM/DealDetails.mjs +1 -1
  78. package/dist/components/CRM/KanbanBoard.js +1 -1
  79. package/dist/components/CRM/KanbanBoard.mjs +2 -2
  80. package/dist/components/CRM/NewDealForm.js +1 -1
  81. package/dist/components/CRM/NewDealForm.mjs +1 -1
  82. package/dist/components/CRM/index.js +2 -2
  83. package/dist/components/CRM/index.mjs +4 -4
  84. package/dist/components/CRM/mockData.js +6 -6
  85. package/dist/components/CRM/mockData.mjs +6 -6
  86. package/dist/components/Cards/ContentCard.js +17 -1
  87. package/dist/components/Cards/ContentCard.mjs +4 -3
  88. package/dist/components/Cards/FeatureCard.js +17 -1
  89. package/dist/components/Cards/FeatureCard.mjs +4 -3
  90. package/dist/components/Cards/index.js +17 -1
  91. package/dist/components/Cards/index.mjs +6 -5
  92. package/dist/components/Chat/ChatInterface.mjs +7 -7
  93. package/dist/components/Chat/CopilotInterface.mjs +8 -8
  94. package/dist/components/Chat/PartTypes/MessageHandler.mjs +6 -6
  95. package/dist/components/Chat/PartTypes/index.mjs +19 -19
  96. package/dist/components/Chat/demo-long-messages.mjs +8 -8
  97. package/dist/components/Chat/demo-tests.mjs +8 -8
  98. package/dist/components/Chat/demo.mjs +8 -8
  99. package/dist/components/Chat/example-usage.mjs +9 -9
  100. package/dist/components/Chat/example-with-vercel-ai.mjs +8 -8
  101. package/dist/components/Chat/index.mjs +11 -11
  102. package/dist/components/DigitalColleagues/MainPage.mjs +4 -4
  103. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +9 -9
  104. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +2 -2
  105. package/dist/components/DigitalColleagues/Views/index.mjs +19 -19
  106. package/dist/components/DigitalColleagues/index.mjs +27 -27
  107. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +2 -2
  108. package/dist/components/Foundary/Knowledge/add-team-context.mjs +2 -2
  109. package/dist/components/Foundary/MainPage.mjs +4 -4
  110. package/dist/components/Foundary/Pages/dashboardpage.mjs +13 -13
  111. package/dist/components/Foundary/RichText/index.mjs +3 -3
  112. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +2 -2
  113. package/dist/components/Foundary/Views/KnowledgeView.mjs +9 -9
  114. package/dist/components/Foundary/Views/index.mjs +21 -21
  115. package/dist/components/Foundary/document-edit.mjs +4 -4
  116. package/dist/components/Foundary/document-preview-examples.mjs +5 -5
  117. package/dist/components/Foundary/document-preview.mjs +5 -5
  118. package/dist/components/Foundary/file-edit.mjs +6 -6
  119. package/dist/components/Foundary/index.mjs +39 -39
  120. package/dist/components/Foundary/knowledge-browser.mjs +6 -6
  121. package/dist/components/HeaderFooter/SectionHeading.js +17 -1
  122. package/dist/components/HeaderFooter/SectionHeading.mjs +5 -4
  123. package/dist/components/HeaderFooter/index.mjs +8 -8
  124. package/dist/components/Heros/HighImpact/index.js +17 -1
  125. package/dist/components/Heros/HighImpact/index.mjs +5 -4
  126. package/dist/components/Heros/LowImpact/index.js +17 -1
  127. package/dist/components/Heros/LowImpact/index.mjs +5 -4
  128. package/dist/components/Heros/MediumImpact/index.js +17 -1
  129. package/dist/components/Heros/MediumImpact/index.mjs +5 -4
  130. package/dist/components/Heros/PostHero/index.mjs +2 -2
  131. package/dist/components/Heros/RenderHero.js +17 -1
  132. package/dist/components/Heros/RenderHero.mjs +8 -7
  133. package/dist/components/Heros/index.js +17 -1
  134. package/dist/components/Heros/index.mjs +12 -11
  135. package/dist/components/Holidays/CalendarView.d.ts +2 -1
  136. package/dist/components/Holidays/CalendarView.js +18 -14
  137. package/dist/components/Holidays/CalendarView.mjs +1 -1
  138. package/dist/components/Holidays/HolidayGrid.js +5 -3
  139. package/dist/components/Holidays/HolidayGrid.mjs +2 -2
  140. package/dist/components/Holidays/HolidayTracker.d.ts +2 -1
  141. package/dist/components/Holidays/HolidayTracker.js +65 -35
  142. package/dist/components/Holidays/HolidayTracker.mjs +5 -5
  143. package/dist/components/Holidays/RequestLeave.js +40 -17
  144. package/dist/components/Holidays/RequestLeave.mjs +2 -2
  145. package/dist/components/Holidays/index.js +65 -35
  146. package/dist/components/Holidays/index.mjs +5 -5
  147. package/dist/components/Layouts/OutputHeaderFooter.js +17 -1
  148. package/dist/components/Layouts/OutputHeaderFooter.mjs +6 -5
  149. package/dist/components/Layouts/Print.js +17 -1
  150. package/dist/components/Layouts/Print.mjs +10 -9
  151. package/dist/components/Layouts/SlideShow.js +17 -1
  152. package/dist/components/Layouts/SlideShow.mjs +12 -11
  153. package/dist/components/Layouts/index.js +17 -1
  154. package/dist/components/Layouts/index.mjs +16 -15
  155. package/dist/components/Menus/index.mjs +3 -3
  156. package/dist/components/Payload/RichText/index.js +17 -1
  157. package/dist/components/Payload/RichText/index.mjs +4 -3
  158. package/dist/components/Payload/RichText/serialize.js +17 -1
  159. package/dist/components/Payload/RichText/serialize.mjs +4 -3
  160. package/dist/components/Payload/index.js +17 -1
  161. package/dist/components/Payload/index.mjs +7 -6
  162. package/dist/components/Projects/EpicsView.mjs +2 -2
  163. package/dist/components/Projects/FileView.mjs +9 -9
  164. package/dist/components/Projects/KanbanBoardView.mjs +12 -12
  165. package/dist/components/Projects/ProjectPage.mjs +16 -16
  166. package/dist/components/Projects/ProjectView.mjs +16 -16
  167. package/dist/components/Projects/TaskDetailsModal.mjs +10 -10
  168. package/dist/components/Projects/file-list.mjs +7 -7
  169. package/dist/components/Projects/index.mjs +15 -15
  170. package/dist/components/dc-temp/index.mjs +9 -9
  171. package/dist/components/index.js +116 -70
  172. package/dist/components/index.mjs +121 -120
  173. package/dist/components/ui/index.mjs +11 -11
  174. package/dist/decorators/Intranet.mjs +73 -72
  175. package/dist/index.js +116 -70
  176. package/dist/index.mjs +134 -133
  177. package/dist/metafile-cjs.json +1 -1
  178. package/dist/metafile-esm.json +1 -1
  179. package/dist/pages/Blog.js +17 -1
  180. package/dist/pages/Blog.mjs +12 -11
  181. package/dist/pages/Documentation.mjs +4 -4
  182. package/dist/pages/IndexPage.mjs +15 -14
  183. package/dist/pages/Intranet.mjs +1 -1
  184. package/dist/pages/LandingPage.js +17 -1
  185. package/dist/pages/LandingPage.mjs +83 -82
  186. package/dist/pages/Page.js +17 -1
  187. package/dist/pages/Page.mjs +15 -14
  188. package/dist/pages/Publish.js +17 -1
  189. package/dist/pages/Publish.mjs +72 -71
  190. package/dist/pages/Website.js +17 -1
  191. package/dist/pages/Website.mjs +17 -16
  192. package/dist/payload-types.d.ts +1 -1
  193. package/dist/sections/AboutSection.js +17 -1
  194. package/dist/sections/AboutSection.mjs +6 -5
  195. package/dist/sections/BlogDetail.js +17 -1
  196. package/dist/sections/BlogDetail.mjs +5 -4
  197. package/dist/sections/BlogList.js +17 -1
  198. package/dist/sections/BlogList.mjs +6 -5
  199. package/dist/sections/BlogListSection.mjs +2 -2
  200. package/dist/sections/ContactSection.js +17 -1
  201. package/dist/sections/ContactSection.mjs +6 -5
  202. package/dist/sections/PageSections.js +17 -1
  203. package/dist/sections/PageSections.mjs +81 -80
  204. package/dist/sections/PricingSection.js +17 -1
  205. package/dist/sections/PricingSection.mjs +6 -5
  206. package/dist/sections/ServiceDetail.js +17 -1
  207. package/dist/sections/ServiceDetail.mjs +5 -4
  208. package/dist/sections/ServiceDetailSection.js +17 -1
  209. package/dist/sections/ServiceDetailSection.mjs +5 -4
  210. package/dist/sections/ServiceSection.js +17 -1
  211. package/dist/sections/ServiceSection.mjs +72 -71
  212. package/dist/sections/index.js +17 -1
  213. package/dist/sections/index.mjs +83 -82
  214. package/dist/utils/DaysUtil.js +9 -7
  215. package/dist/utils/DaysUtil.mjs +1 -1
  216. package/dist/utils/getLinkHref.d.ts +12 -0
  217. package/dist/utils/getLinkHref.js +43 -0
  218. package/dist/utils/getLinkHref.mjs +7 -0
  219. package/package.json +1 -1
  220. package/dist/chunk-I4UOIVSC.mjs +0 -39
  221. package/dist/{chunk-25OSLP2V.mjs → chunk-6TVRFATY.mjs} +3 -3
  222. package/dist/{chunk-EUAUP52U.mjs → chunk-7UMFQPR5.mjs} +3 -3
  223. package/dist/{chunk-ECCJ42NJ.mjs → chunk-L666B5DN.mjs} +14 -14
  224. package/dist/{chunk-DZYAOBGH.mjs → chunk-PXB2ICFA.mjs} +3 -3
  225. package/dist/{chunk-6OFY4WMY.mjs → chunk-RWZ36G7W.mjs} +3 -3
@@ -19,12 +19,15 @@ import {
19
19
  import {
20
20
  MediaBlock
21
21
  } from "./chunk-6GO5N6ZP.mjs";
22
+ import {
23
+ ImageBlock
24
+ } from "./chunk-3R2LCGLI.mjs";
22
25
  import {
23
26
  CodeBlock
24
27
  } from "./chunk-WPX6MOFB.mjs";
25
28
  import {
26
- ImageBlock
27
- } from "./chunk-3R2LCGLI.mjs";
29
+ getLinkHref
30
+ } from "./chunk-F4LCVFZK.mjs";
28
31
  import {
29
32
  DynamicIcon
30
33
  } from "./chunk-75ALYLZU.mjs";
@@ -146,7 +149,7 @@ function FeatureCard({
146
149
  return /* @__PURE__ */ jsxs2(
147
150
  "a",
148
151
  {
149
- href: link?.url || "#",
152
+ href: getLinkHref(link),
150
153
  className: cn(
151
154
  "min-w-56 max-w-xl h-full flex flex-col group bg-background",
152
155
  image ? "p-0" : "p-6 md:p-8",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RichText
3
- } from "./chunk-LSHBOPCT.mjs";
3
+ } from "./chunk-27NWC2OO.mjs";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-KZPGX6CG.mjs";
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  DocumentPreview
6
- } from "./chunk-6Q4KYDHK.mjs";
6
+ } from "./chunk-RJRQ3SY5.mjs";
7
7
  import {
8
8
  ScrollArea
9
9
  } from "./chunk-PDHMPRPW.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RichText
3
- } from "./chunk-LSHBOPCT.mjs";
3
+ } from "./chunk-27NWC2OO.mjs";
4
4
  import {
5
5
  Button
6
6
  } from "./chunk-I6LSWXZW.mjs";
@@ -4,7 +4,7 @@
4
4
  import {
5
5
  getIsMultipleDays,
6
6
  getTotalDaysBetween
7
- } from "./chunk-I4UOIVSC.mjs";
7
+ } from "./chunk-PIQUYPOZ.mjs";
8
8
  import {
9
9
  Popover,
10
10
  PopoverContent,
@@ -25,7 +25,6 @@ import {
25
25
 
26
26
  // src/components/Holidays/RequestLeave.tsx
27
27
  import { useState, useEffect } from "react";
28
- import { format } from "date-fns";
29
28
  import { CalendarIcon } from "lucide-react";
30
29
  import { useRouter } from "next/navigation";
31
30
  import { Toaster, toast } from "sonner";
@@ -45,11 +44,26 @@ var ButtonGroup = ({ options, value, onChange, disabled = [] }) => {
45
44
  )) });
46
45
  };
47
46
  function RequestLeave({ remainingDays, submitLeaveRequest }) {
48
- const [startDate, setStartDate] = useState(/* @__PURE__ */ new Date());
49
- const [endDate, setEndDate] = useState(/* @__PURE__ */ new Date());
47
+ const setToMidnightUTC = (date) => {
48
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0));
49
+ };
50
+ const formatDateUTC = (date) => {
51
+ const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
52
+ const day = date.getUTCDate();
53
+ const month = months[date.getUTCMonth()];
54
+ const year = date.getUTCFullYear();
55
+ const suffix = day === 1 || day === 21 || day === 31 ? "st" : day === 2 || day === 22 ? "nd" : day === 3 || day === 23 ? "rd" : "th";
56
+ return `${month} ${day}${suffix}, ${year}`;
57
+ };
58
+ const [startDate, setStartDate] = useState(void 0);
59
+ const [endDate, setEndDate] = useState(void 0);
60
+ useEffect(() => {
61
+ if (startDate === void 0) setStartDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
62
+ if (endDate === void 0) setEndDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
63
+ }, []);
50
64
  const [leaveType, setLeaveType] = useState("Full Day");
51
65
  const [isMultipleDays, setIsMultipleDays] = useState(false);
52
- const [totalDays, setTotalDays] = useState(1);
66
+ const [totalDays, setTotalDays] = useState(0);
53
67
  const router = useRouter();
54
68
  useEffect(() => {
55
69
  const isMultipleDays2 = getIsMultipleDays(startDate, endDate);
@@ -118,7 +132,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
118
132
  ),
119
133
  children: [
120
134
  /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
121
- startDate ? format(startDate, "PPP") : /* @__PURE__ */ jsx("span", { children: "Pick a date" })
135
+ startDate ? formatDateUTC(startDate) : /* @__PURE__ */ jsx("span", { children: "Pick a date" })
122
136
  ]
123
137
  }
124
138
  ) }),
@@ -128,9 +142,12 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
128
142
  mode: "single",
129
143
  selected: startDate,
130
144
  onSelect: (date) => {
131
- setStartDate(date);
132
- if (date && (!endDate || date > endDate)) {
133
- setEndDate(date);
145
+ if (date) {
146
+ const dateMidnight = setToMidnightUTC(date);
147
+ setStartDate(dateMidnight);
148
+ if (!endDate || date > endDate) {
149
+ setEndDate(dateMidnight);
150
+ }
134
151
  }
135
152
  },
136
153
  initialFocus: true
@@ -151,7 +168,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
151
168
  ),
152
169
  children: [
153
170
  /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
154
- endDate ? format(endDate, "PPP") : /* @__PURE__ */ jsx("span", { children: "Pick a date" })
171
+ endDate ? formatDateUTC(endDate) : /* @__PURE__ */ jsx("span", { children: "Pick a date" })
155
172
  ]
156
173
  }
157
174
  ) }),
@@ -160,7 +177,11 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
160
177
  {
161
178
  mode: "single",
162
179
  selected: endDate,
163
- onSelect: setEndDate,
180
+ onSelect: (date) => {
181
+ if (date) {
182
+ setEndDate(setToMidnightUTC(date));
183
+ }
184
+ },
164
185
  disabled: (date) => startDate ? date < startDate : false,
165
186
  initialFocus: true
166
187
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  DealDetails
6
- } from "./chunk-OS5X3ADZ.mjs";
6
+ } from "./chunk-E5LGE3IW.mjs";
7
7
  import {
8
8
  KanbanColumn
9
9
  } from "./chunk-FAA3AKK5.mjs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  CollapsibleBlock
3
- } from "./chunk-KV5RVOAP.mjs";
3
+ } from "./chunk-DGV5AVAW.mjs";
4
4
  import {
5
5
  ContentBlock
6
- } from "./chunk-EC4N6ZH3.mjs";
6
+ } from "./chunk-WA3OQB7X.mjs";
7
7
  import {
8
8
  CallToActionBlock,
9
9
  FeaturesBlock
10
- } from "./chunk-LSHBOPCT.mjs";
10
+ } from "./chunk-27NWC2OO.mjs";
11
11
  import {
12
12
  MediaBlock
13
13
  } from "./chunk-6GO5N6ZP.mjs";
@@ -120,7 +120,7 @@ function NewDealForm({
120
120
  }
121
121
  };
122
122
  const getUserById = (userId) => {
123
- return users?.find((user) => user.id === Number(userId));
123
+ return users?.find((user) => user.id === userId);
124
124
  };
125
125
  const getCustomerById = (customerID) => {
126
126
  return customers?.find((customer) => customer.id === Number(customerID));
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-25EF7VEC.mjs";
10
10
  import {
11
11
  KnowledgeBrowser
12
- } from "./chunk-2NKCNQ56.mjs";
12
+ } from "./chunk-3YAZKLH3.mjs";
13
13
  import {
14
14
  DropdownMenu,
15
15
  DropdownMenuContent,
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  RichText_default
6
- } from "./chunk-M5JROT2X.mjs";
6
+ } from "./chunk-R242HNC3.mjs";
7
7
  import {
8
8
  EditableField
9
9
  } from "./chunk-3HO4HLPV.mjs";
@@ -6,22 +6,22 @@ import {
6
6
  } from "./chunk-OIXHYJGP.mjs";
7
7
  import {
8
8
  EpicsView
9
- } from "./chunk-25OSLP2V.mjs";
9
+ } from "./chunk-6TVRFATY.mjs";
10
10
  import {
11
11
  KanbanBoardView
12
- } from "./chunk-G3UZUSQZ.mjs";
13
- import {
14
- AddTaskModal
15
- } from "./chunk-3FBWSJJD.mjs";
12
+ } from "./chunk-ZFWHFUZP.mjs";
16
13
  import {
17
14
  PlanningView
18
15
  } from "./chunk-YNWNEY2R.mjs";
19
- import {
20
- FileView
21
- } from "./chunk-DQZO42TD.mjs";
22
16
  import {
23
17
  AddEpicModal
24
18
  } from "./chunk-UDCOG2XL.mjs";
19
+ import {
20
+ AddTaskModal
21
+ } from "./chunk-3FBWSJJD.mjs";
22
+ import {
23
+ FileView
24
+ } from "./chunk-MSAH6P5O.mjs";
25
25
  import {
26
26
  ManagementSidebar
27
27
  } from "./chunk-IWG2URAU.mjs";
@@ -4,10 +4,10 @@
4
4
  import {
5
5
  HeaderTop,
6
6
  TitleSlide
7
- } from "./chunk-KVULICDA.mjs";
7
+ } from "./chunk-PVI4R7FJ.mjs";
8
8
  import {
9
9
  RenderBlocks
10
- } from "./chunk-NAPGIF5D.mjs";
10
+ } from "./chunk-5DYPBHBP.mjs";
11
11
  import {
12
12
  getTableOfContents
13
13
  } from "./chunk-BXLYIIII.mjs";
@@ -3,16 +3,16 @@
3
3
 
4
4
  import {
5
5
  RequestLeave
6
- } from "./chunk-HABWABS7.mjs";
6
+ } from "./chunk-4O6ESJYG.mjs";
7
7
  import {
8
8
  ApproveLeave
9
9
  } from "./chunk-7UVCCDPI.mjs";
10
10
  import {
11
11
  CalendarView
12
- } from "./chunk-LCRSPNPB.mjs";
12
+ } from "./chunk-LELKTN52.mjs";
13
13
  import {
14
14
  HolidayGrid
15
- } from "./chunk-7ZMZT7I6.mjs";
15
+ } from "./chunk-P7BPG7W7.mjs";
16
16
  import {
17
17
  TimeUtil
18
18
  } from "./chunk-ZSBTDL4H.mjs";
@@ -31,6 +31,7 @@ function HolidayTracker({
31
31
  holidays,
32
32
  currentUser,
33
33
  currentDate,
34
+ today,
34
35
  leaveApprovals,
35
36
  employees,
36
37
  submitLeaveRequest,
@@ -41,6 +42,7 @@ function HolidayTracker({
41
42
  const router = useRouter();
42
43
  const isLoading = false;
43
44
  const parsedCurrentDate = TimeUtil.toUtcMidnight(parseISO(currentDate));
45
+ const parsedToday = TimeUtil.toUtcMidnight(parseISO(today));
44
46
  const setCurrentDate = async (date) => {
45
47
  const formattedDate = format(date, "dd-MM-yyyy");
46
48
  const url = new URL(window.location.href);
@@ -122,7 +124,8 @@ function HolidayTracker({
122
124
  {
123
125
  currentDate: parsedCurrentDate,
124
126
  setCurrentDate,
125
- holidays
127
+ holidays,
128
+ today: parsedToday
126
129
  }
127
130
  ),
128
131
  currentTab === "Request Leave" && /* @__PURE__ */ jsx(
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  RichText
6
- } from "./chunk-LSHBOPCT.mjs";
6
+ } from "./chunk-27NWC2OO.mjs";
7
7
  import {
8
8
  CMSLink
9
9
  } from "./chunk-2NXKZY7U.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OrgTree
3
- } from "./chunk-DB2F6SID.mjs";
3
+ } from "./chunk-ULYN63F3.mjs";
4
4
  import {
5
5
  buildOrgTree
6
6
  } from "./chunk-RPFE6ORC.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  SectionHero
3
3
  } from "./chunk-N77BYZ6A.mjs";
4
- import {
5
- HighImpactHero
6
- } from "./chunk-DO73CLFG.mjs";
7
4
  import {
8
5
  MediumImpactHero
9
- } from "./chunk-DAGWV4UL.mjs";
6
+ } from "./chunk-SRK3Y7FA.mjs";
7
+ import {
8
+ HighImpactHero
9
+ } from "./chunk-AQPLEBKG.mjs";
10
10
  import {
11
11
  LowImpactHero
12
- } from "./chunk-OXZ5QAXQ.mjs";
12
+ } from "./chunk-S4FUSOSS.mjs";
13
13
 
14
14
  // src/components/Heros/RenderHero.tsx
15
15
  import { ChevronRightIcon, HomeIcon } from "@heroicons/react/20/solid";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-WHCZTD2K.mjs";
13
13
  import {
14
14
  FileList
15
- } from "./chunk-HQ2AUN2H.mjs";
15
+ } from "./chunk-ZMITLXFT.mjs";
16
16
  import {
17
17
  mockApps,
18
18
  mockRecentFiles,
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  RichText
6
- } from "./chunk-LSHBOPCT.mjs";
6
+ } from "./chunk-27NWC2OO.mjs";
7
7
  import {
8
8
  cn
9
9
  } from "./chunk-KZPGX6CG.mjs";
@@ -118,7 +118,7 @@ function DealDetails({
118
118
  }
119
119
  };
120
120
  const getUserById = (userId) => {
121
- return users?.find((user) => user.id === Number(userId));
121
+ return users?.find((user) => user.id === userId);
122
122
  };
123
123
  return /* @__PURE__ */ jsx(Dialog, { open: true, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden", children: [
124
124
  /* @__PURE__ */ jsxs(DialogHeader, { className: "flex flex-row items-center justify-between", children: [
@@ -0,0 +1,19 @@
1
+ // src/utils/getLinkHref.ts
2
+ function getLinkHref(link) {
3
+ if (!link) return "#";
4
+ if (link.url) return link.url;
5
+ if (link.reference?.value) {
6
+ const { relationTo, value } = link.reference;
7
+ const slug = value?.slug;
8
+ if (!slug) return "#";
9
+ if (relationTo === "pages") {
10
+ return `/${slug}`;
11
+ }
12
+ return `/${relationTo}/${slug}`;
13
+ }
14
+ return "#";
15
+ }
16
+
17
+ export {
18
+ getLinkHref
19
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  messageHandler
3
- } from "./chunk-ECCJ42NJ.mjs";
3
+ } from "./chunk-L666B5DN.mjs";
4
4
  import {
5
5
  Conversation,
6
6
  ConversationContent,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-A4SKUZ2E.mjs";
4
4
  import {
5
5
  SectionHeading
6
- } from "./chunk-7OGBZ6QQ.mjs";
6
+ } from "./chunk-ICVTRW5Y.mjs";
7
7
  import {
8
8
  formatDateTimeStringShort
9
9
  } from "./chunk-RFP2KGUZ.mjs";
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  RichText_default
6
- } from "./chunk-M5JROT2X.mjs";
6
+ } from "./chunk-R242HNC3.mjs";
7
7
  import {
8
8
  EditableField
9
9
  } from "./chunk-3HO4HLPV.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RichText
3
- } from "./chunk-LSHBOPCT.mjs";
3
+ } from "./chunk-27NWC2OO.mjs";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-KZPGX6CG.mjs";
@@ -3,10 +3,10 @@
3
3
 
4
4
  import {
5
5
  Printable
6
- } from "./chunk-WMAVH7JO.mjs";
6
+ } from "./chunk-6VQLA4YU.mjs";
7
7
  import {
8
8
  SlideShow
9
- } from "./chunk-I647IJUG.mjs";
9
+ } from "./chunk-QC2AXU6I.mjs";
10
10
  import {
11
11
  getTableOfContents
12
12
  } from "./chunk-BXLYIIII.mjs";
@@ -15,38 +15,42 @@ import {
15
15
  import { useState } from "react";
16
16
  import { ChevronLeft, ChevronRight } from "lucide-react";
17
17
  import { jsx, jsxs } from "react/jsx-runtime";
18
- function CalendarView({ currentDate, setCurrentDate, holidays }) {
18
+ function CalendarView({ currentDate, setCurrentDate, holidays, today }) {
19
19
  const [selectedDay, setSelectedDay] = useState(null);
20
- const firstDayOfMonth = (new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).getDay() + 6) % 7;
20
+ const isSameUtcDay = (a, b) => a.getUTCFullYear() === b.getUTCFullYear() && a.getUTCMonth() === b.getUTCMonth() && a.getUTCDate() === b.getUTCDate();
21
+ const firstDayOfMonth = (new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), 1)).getUTCDay() + 6) % 7;
21
22
  const days = Array.from({ length: 42 }, (_, i) => {
22
23
  const day = new Date(
23
- currentDate.getFullYear(),
24
- currentDate.getMonth(),
25
- i - firstDayOfMonth + 1,
26
- currentDate.getHours()
24
+ Date.UTC(
25
+ currentDate.getUTCFullYear(),
26
+ currentDate.getUTCMonth(),
27
+ i - firstDayOfMonth + 1
28
+ )
27
29
  );
28
30
  const filteredHolidays = holidays.filter(
29
31
  (h) => TimeUtil.toUtcMidnight(new Date(h.startDate)) <= day && TimeUtil.toUtcEndOfDay(new Date(h.endDate)) >= day
30
32
  );
31
33
  return {
32
34
  date: day,
33
- isCurrentMonth: day.getMonth() === currentDate.getMonth(),
34
- isToday: day.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
35
+ isCurrentMonth: day.getUTCMonth() === currentDate.getUTCMonth(),
36
+ isToday: isSameUtcDay(day, today),
35
37
  holidays: filteredHolidays
36
38
  };
37
39
  });
38
40
  const prevMonth = () => {
39
- setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1));
41
+ setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() - 1, 1)));
40
42
  };
41
43
  const nextMonth = () => {
42
- setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 1));
44
+ setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() + 1, 1)));
43
45
  };
44
46
  const setToday = () => {
45
- setCurrentDate(/* @__PURE__ */ new Date());
47
+ setCurrentDate(TimeUtil.toUtcMidnight(/* @__PURE__ */ new Date()));
46
48
  };
49
+ const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
50
+ const monthYearDisplay = `${months[currentDate.getUTCMonth()]} ${currentDate.getUTCFullYear()}`;
47
51
  return /* @__PURE__ */ jsxs("div", { className: "lg:flex lg:h-full lg:flex-col", children: [
48
52
  /* @__PURE__ */ jsxs("header", { className: "flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none", children: [
49
- /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ jsx("time", { dateTime: currentDate.toISOString(), children: currentDate.toLocaleString("default", { month: "long", year: "numeric" }) }) }),
53
+ /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ jsx("time", { dateTime: currentDate.toISOString(), children: monthYearDisplay }) }),
50
54
  /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center rounded-md gap-1 md:items-stretch", children: [
51
55
  /* @__PURE__ */ jsxs(
52
56
  Button,
@@ -133,7 +137,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
133
137
  "flex h-6 w-6 items-center justify-center rounded-full",
134
138
  day.isToday && "bg-indigo-600 font-semibold text-white"
135
139
  ),
136
- children: day.date.getDate()
140
+ children: day.date.getUTCDate()
137
141
  }
138
142
  ),
139
143
  day.holidays.length > 0 && /* @__PURE__ */ jsx("ol", { className: "mt-2 space-y-1 overflow-visible", children: day.holidays.map((holiday) => /* @__PURE__ */ jsx("li", { className: "overflow-visible", children: /* @__PURE__ */ jsx(
@@ -170,7 +174,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
170
174
  day.date === selectedDay && day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",
171
175
  day.date === selectedDay && !day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"
172
176
  ),
173
- children: day.date.getDate()
177
+ children: day.date.getUTCDate()
174
178
  }
175
179
  ),
176
180
  /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-X373UDXT.mjs";
4
4
  import {
5
5
  RichText
6
- } from "./chunk-LSHBOPCT.mjs";
6
+ } from "./chunk-27NWC2OO.mjs";
7
7
  import {
8
8
  Card,
9
9
  CardContent,
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  FileList
6
- } from "./chunk-HQ2AUN2H.mjs";
6
+ } from "./chunk-ZMITLXFT.mjs";
7
7
  import {
8
8
  AddFileModal
9
9
  } from "./chunk-HQW5M4ND.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-A4SKUZ2E.mjs";
4
4
  import {
5
5
  SectionHeading
6
- } from "./chunk-7OGBZ6QQ.mjs";
6
+ } from "./chunk-ICVTRW5Y.mjs";
7
7
  import {
8
8
  PricingCard
9
9
  } from "./chunk-4GLXI5J3.mjs";
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {
5
5
  KnowledgeView
6
- } from "./chunk-P4DQRHCA.mjs";
6
+ } from "./chunk-6I3O6TVG.mjs";
7
7
  import {
8
8
  ColleaguesView
9
9
  } from "./chunk-XWCG4YG3.mjs";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-WHCZTD2K.mjs";
23
23
  import {
24
24
  FileList
25
- } from "./chunk-HQ2AUN2H.mjs";
25
+ } from "./chunk-ZMITLXFT.mjs";
26
26
  import {
27
27
  mockApps,
28
28
  mockRecentFiles,
@@ -3,42 +3,42 @@
3
3
 
4
4
  import {
5
5
  ServiceSection
6
- } from "./chunk-2TJ5HOCV.mjs";
6
+ } from "./chunk-UBEWNGCN.mjs";
7
7
  import {
8
8
  BlogList
9
- } from "./chunk-HZZWKYB5.mjs";
9
+ } from "./chunk-G7GPQ6BO.mjs";
10
10
  import {
11
11
  ContactSection,
12
12
  LocationsSection
13
- } from "./chunk-DRCDP3RU.mjs";
13
+ } from "./chunk-ZXU5T3GV.mjs";
14
14
  import {
15
15
  SectionHero
16
16
  } from "./chunk-N77BYZ6A.mjs";
17
- import {
18
- HighImpactHero
19
- } from "./chunk-DO73CLFG.mjs";
20
17
  import {
21
18
  MediumImpactHero
22
- } from "./chunk-DAGWV4UL.mjs";
19
+ } from "./chunk-SRK3Y7FA.mjs";
20
+ import {
21
+ HighImpactHero
22
+ } from "./chunk-AQPLEBKG.mjs";
23
23
  import {
24
24
  LowImpactHero
25
- } from "./chunk-OXZ5QAXQ.mjs";
25
+ } from "./chunk-S4FUSOSS.mjs";
26
26
  import {
27
27
  CallToActionBlock,
28
28
  RichText
29
- } from "./chunk-LSHBOPCT.mjs";
29
+ } from "./chunk-27NWC2OO.mjs";
30
30
  import {
31
31
  Media
32
32
  } from "./chunk-NKRBXAPF.mjs";
33
33
  import {
34
- Footer
35
- } from "./chunk-APQYZUMH.mjs";
34
+ PageShape
35
+ } from "./chunk-QX5S5NN2.mjs";
36
36
  import {
37
37
  Header
38
38
  } from "./chunk-FZMTC5ID.mjs";
39
39
  import {
40
- PageShape
41
- } from "./chunk-QX5S5NN2.mjs";
40
+ Footer
41
+ } from "./chunk-APQYZUMH.mjs";
42
42
  import {
43
43
  Container
44
44
  } from "./chunk-KL3DQ7AU.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isDayOff
3
- } from "./chunk-I4UOIVSC.mjs";
3
+ } from "./chunk-PIQUYPOZ.mjs";
4
4
  import {
5
5
  Avatar,
6
6
  AvatarFallback,