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.
- package/dist/{chunk-LSHBOPCT.mjs → chunk-27NWC2OO.mjs} +6 -3
- package/dist/{chunk-6B6BKJIE.mjs → chunk-34R3E2JB.mjs} +1 -1
- package/dist/{chunk-2NKCNQ56.mjs → chunk-3YAZKLH3.mjs} +1 -1
- package/dist/{chunk-FUNWDVGQ.mjs → chunk-4DNX5IYR.mjs} +1 -1
- package/dist/{chunk-HABWABS7.mjs → chunk-4O6ESJYG.mjs} +32 -11
- package/dist/{chunk-7H3IRT7K.mjs → chunk-5CQITTLV.mjs} +1 -1
- package/dist/{chunk-NAPGIF5D.mjs → chunk-5DYPBHBP.mjs} +3 -3
- package/dist/{chunk-DAQOEDAR.mjs → chunk-5NGZXIP7.mjs} +1 -1
- package/dist/{chunk-P4DQRHCA.mjs → chunk-6I3O6TVG.mjs} +1 -1
- package/dist/{chunk-EDJDHF22.mjs → chunk-6QSVFSOJ.mjs} +1 -1
- package/dist/{chunk-R2SJ5TZH.mjs → chunk-6VQJSQRU.mjs} +8 -8
- package/dist/{chunk-WMAVH7JO.mjs → chunk-6VQLA4YU.mjs} +2 -2
- package/dist/{chunk-GXTF5CHJ.mjs → chunk-7D3SYOXW.mjs} +7 -4
- package/dist/{chunk-DO73CLFG.mjs → chunk-AQPLEBKG.mjs} +1 -1
- package/dist/{chunk-ZPWWTTFF.mjs → chunk-BPAZFILP.mjs} +1 -1
- package/dist/{chunk-K3TF6OWE.mjs → chunk-BVCARDFK.mjs} +5 -5
- package/dist/{chunk-ENFQLMV3.mjs → chunk-CKBIYWPM.mjs} +1 -1
- package/dist/{chunk-KV5RVOAP.mjs → chunk-DGV5AVAW.mjs} +1 -1
- package/dist/{chunk-OS5X3ADZ.mjs → chunk-E5LGE3IW.mjs} +1 -1
- package/dist/chunk-F4LCVFZK.mjs +19 -0
- package/dist/{chunk-LAJ5FNY4.mjs → chunk-G5N5MCLS.mjs} +1 -1
- package/dist/{chunk-HZZWKYB5.mjs → chunk-G7GPQ6BO.mjs} +1 -1
- package/dist/{chunk-URCY4KWN.mjs → chunk-G7WAPCKX.mjs} +1 -1
- package/dist/{chunk-7OGBZ6QQ.mjs → chunk-ICVTRW5Y.mjs} +1 -1
- package/dist/{chunk-AICDXFGU.mjs → chunk-IFEQNYUB.mjs} +2 -2
- package/dist/{chunk-LCRSPNPB.mjs → chunk-LELKTN52.mjs} +18 -14
- package/dist/{chunk-RKQ4CVVG.mjs → chunk-M7LM5P64.mjs} +1 -1
- package/dist/{chunk-DQZO42TD.mjs → chunk-MSAH6P5O.mjs} +1 -1
- package/dist/{chunk-GZW77OJM.mjs → chunk-NKHYDT5B.mjs} +1 -1
- package/dist/{chunk-TTVOGAI4.mjs → chunk-OFES4YYV.mjs} +2 -2
- package/dist/{chunk-LP3K7AVX.mjs → chunk-OYHXC3AT.mjs} +13 -13
- package/dist/{chunk-7ZMZT7I6.mjs → chunk-P7BPG7W7.mjs} +1 -1
- package/dist/chunk-PIQUYPOZ.mjs +41 -0
- package/dist/{chunk-KVULICDA.mjs → chunk-PVI4R7FJ.mjs} +1 -1
- package/dist/{chunk-I647IJUG.mjs → chunk-QC2AXU6I.mjs} +2 -2
- package/dist/{chunk-M5JROT2X.mjs → chunk-R242HNC3.mjs} +1 -1
- package/dist/{chunk-6Q4KYDHK.mjs → chunk-RJRQ3SY5.mjs} +2 -2
- package/dist/{chunk-OXZ5QAXQ.mjs → chunk-S4FUSOSS.mjs} +1 -1
- package/dist/{chunk-DAGWV4UL.mjs → chunk-SRK3Y7FA.mjs} +1 -1
- package/dist/{chunk-2TJ5HOCV.mjs → chunk-UBEWNGCN.mjs} +1 -1
- package/dist/{chunk-JBFNSEIJ.mjs → chunk-UETTBM3J.mjs} +1 -1
- package/dist/{chunk-DB2F6SID.mjs → chunk-ULYN63F3.mjs} +1 -1
- package/dist/{chunk-VNSEHNDX.mjs → chunk-VF2QBVAI.mjs} +1 -1
- package/dist/{chunk-EC4N6ZH3.mjs → chunk-WA3OQB7X.mjs} +1 -1
- package/dist/{chunk-UDZU3AZC.mjs → chunk-XWYGGWIF.mjs} +4 -4
- package/dist/{chunk-2PGER2HM.mjs → chunk-YMXGTNMY.mjs} +1 -1
- package/dist/{chunk-G3UZUSQZ.mjs → chunk-ZFWHFUZP.mjs} +4 -4
- package/dist/{chunk-HQ2AUN2H.mjs → chunk-ZMITLXFT.mjs} +1 -1
- package/dist/{chunk-DRCDP3RU.mjs → chunk-ZXU5T3GV.mjs} +1 -1
- package/dist/{chunk-6RAMGDYG.mjs → chunk-ZZ5EM2M4.mjs} +1 -1
- package/dist/components/AdvancedComponents/index.mjs +9 -9
- package/dist/components/AdvancedComponents/org-chart-component/OrgChart.mjs +4 -4
- package/dist/components/AdvancedComponents/org-chart-component/OrgNode.mjs +2 -2
- package/dist/components/AdvancedComponents/org-chart-component/OrgTree.mjs +3 -3
- package/dist/components/AdvancedComponents/org-chart-component/index.mjs +6 -6
- package/dist/components/Blocks/Banner.js +17 -1
- package/dist/components/Blocks/Banner.mjs +4 -3
- package/dist/components/Blocks/CallToAction.js +17 -1
- package/dist/components/Blocks/CallToAction.mjs +4 -3
- package/dist/components/Blocks/CollapsibleArea.js +17 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +5 -4
- package/dist/components/Blocks/Content.js +17 -1
- package/dist/components/Blocks/Content.mjs +5 -4
- package/dist/components/Blocks/FeaturesBlock.js +17 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +4 -3
- package/dist/components/Blocks/RelatedPosts.js +17 -1
- package/dist/components/Blocks/RelatedPosts.mjs +5 -4
- package/dist/components/Blocks/RenderBlocks.js +17 -1
- package/dist/components/Blocks/RenderBlocks.mjs +7 -6
- package/dist/components/Blocks/ReusableContentBlock.js +17 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +7 -6
- package/dist/components/Blocks/index.js +17 -1
- package/dist/components/Blocks/index.mjs +13 -12
- package/dist/components/CRM/CogeBoard.js +1 -1
- package/dist/components/CRM/CogeBoard.mjs +2 -2
- package/dist/components/CRM/DealDetails.js +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.js +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +2 -2
- package/dist/components/CRM/NewDealForm.js +1 -1
- package/dist/components/CRM/NewDealForm.mjs +1 -1
- package/dist/components/CRM/index.js +2 -2
- package/dist/components/CRM/index.mjs +4 -4
- package/dist/components/CRM/mockData.js +6 -6
- package/dist/components/CRM/mockData.mjs +6 -6
- package/dist/components/Cards/ContentCard.js +17 -1
- package/dist/components/Cards/ContentCard.mjs +4 -3
- package/dist/components/Cards/FeatureCard.js +17 -1
- package/dist/components/Cards/FeatureCard.mjs +4 -3
- package/dist/components/Cards/index.js +17 -1
- package/dist/components/Cards/index.mjs +6 -5
- package/dist/components/Chat/ChatInterface.mjs +7 -7
- package/dist/components/Chat/CopilotInterface.mjs +8 -8
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +6 -6
- package/dist/components/Chat/PartTypes/index.mjs +19 -19
- package/dist/components/Chat/demo-long-messages.mjs +8 -8
- package/dist/components/Chat/demo-tests.mjs +8 -8
- package/dist/components/Chat/demo.mjs +8 -8
- package/dist/components/Chat/example-usage.mjs +9 -9
- package/dist/components/Chat/example-with-vercel-ai.mjs +8 -8
- package/dist/components/Chat/index.mjs +11 -11
- package/dist/components/DigitalColleagues/MainPage.mjs +4 -4
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +9 -9
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +2 -2
- package/dist/components/DigitalColleagues/Views/index.mjs +19 -19
- package/dist/components/DigitalColleagues/index.mjs +27 -27
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +2 -2
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +2 -2
- package/dist/components/Foundary/MainPage.mjs +4 -4
- package/dist/components/Foundary/Pages/dashboardpage.mjs +13 -13
- package/dist/components/Foundary/RichText/index.mjs +3 -3
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +2 -2
- package/dist/components/Foundary/Views/KnowledgeView.mjs +9 -9
- package/dist/components/Foundary/Views/index.mjs +21 -21
- package/dist/components/Foundary/document-edit.mjs +4 -4
- package/dist/components/Foundary/document-preview-examples.mjs +5 -5
- package/dist/components/Foundary/document-preview.mjs +5 -5
- package/dist/components/Foundary/file-edit.mjs +6 -6
- package/dist/components/Foundary/index.mjs +39 -39
- package/dist/components/Foundary/knowledge-browser.mjs +6 -6
- package/dist/components/HeaderFooter/SectionHeading.js +17 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +5 -4
- package/dist/components/HeaderFooter/index.mjs +8 -8
- package/dist/components/Heros/HighImpact/index.js +17 -1
- package/dist/components/Heros/HighImpact/index.mjs +5 -4
- package/dist/components/Heros/LowImpact/index.js +17 -1
- package/dist/components/Heros/LowImpact/index.mjs +5 -4
- package/dist/components/Heros/MediumImpact/index.js +17 -1
- package/dist/components/Heros/MediumImpact/index.mjs +5 -4
- package/dist/components/Heros/PostHero/index.mjs +2 -2
- package/dist/components/Heros/RenderHero.js +17 -1
- package/dist/components/Heros/RenderHero.mjs +8 -7
- package/dist/components/Heros/index.js +17 -1
- package/dist/components/Heros/index.mjs +12 -11
- package/dist/components/Holidays/CalendarView.d.ts +2 -1
- package/dist/components/Holidays/CalendarView.js +18 -14
- package/dist/components/Holidays/CalendarView.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.js +5 -3
- package/dist/components/Holidays/HolidayGrid.mjs +2 -2
- package/dist/components/Holidays/HolidayTracker.d.ts +2 -1
- package/dist/components/Holidays/HolidayTracker.js +65 -35
- package/dist/components/Holidays/HolidayTracker.mjs +5 -5
- package/dist/components/Holidays/RequestLeave.js +40 -17
- package/dist/components/Holidays/RequestLeave.mjs +2 -2
- package/dist/components/Holidays/index.js +65 -35
- package/dist/components/Holidays/index.mjs +5 -5
- package/dist/components/Layouts/OutputHeaderFooter.js +17 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +6 -5
- package/dist/components/Layouts/Print.js +17 -1
- package/dist/components/Layouts/Print.mjs +10 -9
- package/dist/components/Layouts/SlideShow.js +17 -1
- package/dist/components/Layouts/SlideShow.mjs +12 -11
- package/dist/components/Layouts/index.js +17 -1
- package/dist/components/Layouts/index.mjs +16 -15
- package/dist/components/Menus/index.mjs +3 -3
- package/dist/components/Payload/RichText/index.js +17 -1
- package/dist/components/Payload/RichText/index.mjs +4 -3
- package/dist/components/Payload/RichText/serialize.js +17 -1
- package/dist/components/Payload/RichText/serialize.mjs +4 -3
- package/dist/components/Payload/index.js +17 -1
- package/dist/components/Payload/index.mjs +7 -6
- package/dist/components/Projects/EpicsView.mjs +2 -2
- package/dist/components/Projects/FileView.mjs +9 -9
- package/dist/components/Projects/KanbanBoardView.mjs +12 -12
- package/dist/components/Projects/ProjectPage.mjs +16 -16
- package/dist/components/Projects/ProjectView.mjs +16 -16
- package/dist/components/Projects/TaskDetailsModal.mjs +10 -10
- package/dist/components/Projects/file-list.mjs +7 -7
- package/dist/components/Projects/index.mjs +15 -15
- package/dist/components/dc-temp/index.mjs +9 -9
- package/dist/components/index.js +116 -70
- package/dist/components/index.mjs +121 -120
- package/dist/components/ui/index.mjs +11 -11
- package/dist/decorators/Intranet.mjs +73 -72
- package/dist/index.js +116 -70
- package/dist/index.mjs +134 -133
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.js +17 -1
- package/dist/pages/Blog.mjs +12 -11
- package/dist/pages/Documentation.mjs +4 -4
- package/dist/pages/IndexPage.mjs +15 -14
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.js +17 -1
- package/dist/pages/LandingPage.mjs +83 -82
- package/dist/pages/Page.js +17 -1
- package/dist/pages/Page.mjs +15 -14
- package/dist/pages/Publish.js +17 -1
- package/dist/pages/Publish.mjs +72 -71
- package/dist/pages/Website.js +17 -1
- package/dist/pages/Website.mjs +17 -16
- package/dist/payload-types.d.ts +1 -1
- package/dist/sections/AboutSection.js +17 -1
- package/dist/sections/AboutSection.mjs +6 -5
- package/dist/sections/BlogDetail.js +17 -1
- package/dist/sections/BlogDetail.mjs +5 -4
- package/dist/sections/BlogList.js +17 -1
- package/dist/sections/BlogList.mjs +6 -5
- package/dist/sections/BlogListSection.mjs +2 -2
- package/dist/sections/ContactSection.js +17 -1
- package/dist/sections/ContactSection.mjs +6 -5
- package/dist/sections/PageSections.js +17 -1
- package/dist/sections/PageSections.mjs +81 -80
- package/dist/sections/PricingSection.js +17 -1
- package/dist/sections/PricingSection.mjs +6 -5
- package/dist/sections/ServiceDetail.js +17 -1
- package/dist/sections/ServiceDetail.mjs +5 -4
- package/dist/sections/ServiceDetailSection.js +17 -1
- package/dist/sections/ServiceDetailSection.mjs +5 -4
- package/dist/sections/ServiceSection.js +17 -1
- package/dist/sections/ServiceSection.mjs +72 -71
- package/dist/sections/index.js +17 -1
- package/dist/sections/index.mjs +83 -82
- package/dist/utils/DaysUtil.js +9 -7
- package/dist/utils/DaysUtil.mjs +1 -1
- package/dist/utils/getLinkHref.d.ts +12 -0
- package/dist/utils/getLinkHref.js +43 -0
- package/dist/utils/getLinkHref.mjs +7 -0
- package/package.json +1 -1
- package/dist/chunk-I4UOIVSC.mjs +0 -39
- package/dist/{chunk-25OSLP2V.mjs → chunk-6TVRFATY.mjs} +3 -3
- package/dist/{chunk-EUAUP52U.mjs → chunk-7UMFQPR5.mjs} +3 -3
- package/dist/{chunk-ECCJ42NJ.mjs → chunk-L666B5DN.mjs} +14 -14
- package/dist/{chunk-DZYAOBGH.mjs → chunk-PXB2ICFA.mjs} +3 -3
- package/dist/{chunk-6OFY4WMY.mjs → chunk-RWZ36G7W.mjs} +3 -3
package/dist/index.js
CHANGED
|
@@ -6040,6 +6040,22 @@ var ImageBlock = (props) => {
|
|
|
6040
6040
|
);
|
|
6041
6041
|
};
|
|
6042
6042
|
|
|
6043
|
+
// src/utils/getLinkHref.ts
|
|
6044
|
+
function getLinkHref(link) {
|
|
6045
|
+
if (!link) return "#";
|
|
6046
|
+
if (link.url) return link.url;
|
|
6047
|
+
if (link.reference?.value) {
|
|
6048
|
+
const { relationTo, value } = link.reference;
|
|
6049
|
+
const slug = value?.slug;
|
|
6050
|
+
if (!slug) return "#";
|
|
6051
|
+
if (relationTo === "pages") {
|
|
6052
|
+
return `/${slug}`;
|
|
6053
|
+
}
|
|
6054
|
+
return `/${relationTo}/${slug}`;
|
|
6055
|
+
}
|
|
6056
|
+
return "#";
|
|
6057
|
+
}
|
|
6058
|
+
|
|
6043
6059
|
// src/components/Blocks/FeaturesBlock.tsx
|
|
6044
6060
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6045
6061
|
var FeaturesBlock = ({ title, description, features, id, nested = false }) => {
|
|
@@ -6369,7 +6385,7 @@ function FeatureCard({
|
|
|
6369
6385
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6370
6386
|
"a",
|
|
6371
6387
|
{
|
|
6372
|
-
href: link
|
|
6388
|
+
href: getLinkHref(link),
|
|
6373
6389
|
className: cn(
|
|
6374
6390
|
"min-w-56 max-w-xl h-full flex flex-col group bg-background",
|
|
6375
6391
|
image ? "p-0" : "p-6 md:p-8",
|
|
@@ -10653,7 +10669,6 @@ function ApproveLeave({ leaveRequests, onApprove, onReject }) {
|
|
|
10653
10669
|
|
|
10654
10670
|
// src/components/Holidays/RequestLeave.tsx
|
|
10655
10671
|
var import_react31 = require("react");
|
|
10656
|
-
var import_date_fns = require("date-fns");
|
|
10657
10672
|
var import_lucide_react20 = require("lucide-react");
|
|
10658
10673
|
var import_navigation7 = require("next/navigation");
|
|
10659
10674
|
var import_sonner3 = require("sonner");
|
|
@@ -10698,14 +10713,16 @@ var bankHolidays = [
|
|
|
10698
10713
|
|
|
10699
10714
|
// src/utils/DaysUtil.ts
|
|
10700
10715
|
var isDayOff = (date) => {
|
|
10701
|
-
const isSunday = date.
|
|
10702
|
-
const isSaturday = date.
|
|
10703
|
-
const isBankHoliday = bankHolidays.some(
|
|
10716
|
+
const isSunday = date.getUTCDay() === 0;
|
|
10717
|
+
const isSaturday = date.getUTCDay() === 6;
|
|
10718
|
+
const isBankHoliday = bankHolidays.some(
|
|
10719
|
+
(h) => h.getFullYear() === date.getUTCFullYear() && h.getMonth() === date.getUTCMonth() && h.getDate() === date.getUTCDate()
|
|
10720
|
+
);
|
|
10704
10721
|
return isSunday || isSaturday || isBankHoliday;
|
|
10705
10722
|
};
|
|
10706
10723
|
var getTotalDaysBetween = (startDate, endDate, isHalfDay = false) => {
|
|
10707
|
-
|
|
10708
|
-
const end = new Date(endDate);
|
|
10724
|
+
let start = new Date(Date.UTC(startDate.getUTCFullYear(), startDate.getUTCMonth(), startDate.getUTCDate()));
|
|
10725
|
+
const end = new Date(Date.UTC(endDate.getUTCFullYear(), endDate.getUTCMonth(), endDate.getUTCDate()));
|
|
10709
10726
|
let count2 = 0;
|
|
10710
10727
|
if (isHalfDay && !isDayOff(start)) {
|
|
10711
10728
|
return 0.5;
|
|
@@ -10714,7 +10731,7 @@ var getTotalDaysBetween = (startDate, endDate, isHalfDay = false) => {
|
|
|
10714
10731
|
if (!isDayOff(start)) {
|
|
10715
10732
|
count2++;
|
|
10716
10733
|
}
|
|
10717
|
-
start
|
|
10734
|
+
start = new Date(start.getTime() + 24 * 60 * 60 * 1e3);
|
|
10718
10735
|
}
|
|
10719
10736
|
return count2;
|
|
10720
10737
|
};
|
|
@@ -10722,7 +10739,7 @@ var getIsMultipleDays = (startDate, endDate) => {
|
|
|
10722
10739
|
if (!startDate || !endDate) {
|
|
10723
10740
|
return false;
|
|
10724
10741
|
}
|
|
10725
|
-
const isMultipleDays = startDate.
|
|
10742
|
+
const isMultipleDays = startDate.getUTCFullYear() !== endDate.getUTCFullYear() || startDate.getUTCMonth() !== endDate.getUTCMonth() || startDate.getUTCDate() !== endDate.getUTCDate();
|
|
10726
10743
|
return isMultipleDays;
|
|
10727
10744
|
};
|
|
10728
10745
|
|
|
@@ -10743,11 +10760,26 @@ var ButtonGroup = ({ options, value, onChange, disabled = [] }) => {
|
|
|
10743
10760
|
)) });
|
|
10744
10761
|
};
|
|
10745
10762
|
function RequestLeave({ remainingDays, submitLeaveRequest }) {
|
|
10746
|
-
const
|
|
10747
|
-
|
|
10763
|
+
const setToMidnightUTC = (date) => {
|
|
10764
|
+
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0));
|
|
10765
|
+
};
|
|
10766
|
+
const formatDateUTC = (date) => {
|
|
10767
|
+
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
10768
|
+
const day = date.getUTCDate();
|
|
10769
|
+
const month = months[date.getUTCMonth()];
|
|
10770
|
+
const year = date.getUTCFullYear();
|
|
10771
|
+
const suffix = day === 1 || day === 21 || day === 31 ? "st" : day === 2 || day === 22 ? "nd" : day === 3 || day === 23 ? "rd" : "th";
|
|
10772
|
+
return `${month} ${day}${suffix}, ${year}`;
|
|
10773
|
+
};
|
|
10774
|
+
const [startDate, setStartDate] = (0, import_react31.useState)(void 0);
|
|
10775
|
+
const [endDate, setEndDate] = (0, import_react31.useState)(void 0);
|
|
10776
|
+
(0, import_react31.useEffect)(() => {
|
|
10777
|
+
if (startDate === void 0) setStartDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
|
|
10778
|
+
if (endDate === void 0) setEndDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
|
|
10779
|
+
}, []);
|
|
10748
10780
|
const [leaveType, setLeaveType] = (0, import_react31.useState)("Full Day");
|
|
10749
10781
|
const [isMultipleDays, setIsMultipleDays] = (0, import_react31.useState)(false);
|
|
10750
|
-
const [totalDays, setTotalDays] = (0, import_react31.useState)(
|
|
10782
|
+
const [totalDays, setTotalDays] = (0, import_react31.useState)(0);
|
|
10751
10783
|
const router = (0, import_navigation7.useRouter)();
|
|
10752
10784
|
(0, import_react31.useEffect)(() => {
|
|
10753
10785
|
const isMultipleDays2 = getIsMultipleDays(startDate, endDate);
|
|
@@ -10816,7 +10848,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
|
|
|
10816
10848
|
),
|
|
10817
10849
|
children: [
|
|
10818
10850
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react20.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
10819
|
-
startDate ? (
|
|
10851
|
+
startDate ? formatDateUTC(startDate) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Pick a date" })
|
|
10820
10852
|
]
|
|
10821
10853
|
}
|
|
10822
10854
|
) }),
|
|
@@ -10826,9 +10858,12 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
|
|
|
10826
10858
|
mode: "single",
|
|
10827
10859
|
selected: startDate,
|
|
10828
10860
|
onSelect: (date) => {
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10861
|
+
if (date) {
|
|
10862
|
+
const dateMidnight = setToMidnightUTC(date);
|
|
10863
|
+
setStartDate(dateMidnight);
|
|
10864
|
+
if (!endDate || date > endDate) {
|
|
10865
|
+
setEndDate(dateMidnight);
|
|
10866
|
+
}
|
|
10832
10867
|
}
|
|
10833
10868
|
},
|
|
10834
10869
|
initialFocus: true
|
|
@@ -10849,7 +10884,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
|
|
|
10849
10884
|
),
|
|
10850
10885
|
children: [
|
|
10851
10886
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react20.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
10852
|
-
endDate ? (
|
|
10887
|
+
endDate ? formatDateUTC(endDate) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Pick a date" })
|
|
10853
10888
|
]
|
|
10854
10889
|
}
|
|
10855
10890
|
) }),
|
|
@@ -10858,7 +10893,11 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
|
|
|
10858
10893
|
{
|
|
10859
10894
|
mode: "single",
|
|
10860
10895
|
selected: endDate,
|
|
10861
|
-
onSelect:
|
|
10896
|
+
onSelect: (date) => {
|
|
10897
|
+
if (date) {
|
|
10898
|
+
setEndDate(setToMidnightUTC(date));
|
|
10899
|
+
}
|
|
10900
|
+
},
|
|
10862
10901
|
disabled: (date) => startDate ? date < startDate : false,
|
|
10863
10902
|
initialFocus: true
|
|
10864
10903
|
}
|
|
@@ -11077,38 +11116,42 @@ function HolidayGrid({
|
|
|
11077
11116
|
var import_react32 = require("react");
|
|
11078
11117
|
var import_lucide_react22 = require("lucide-react");
|
|
11079
11118
|
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
11080
|
-
function CalendarView({ currentDate, setCurrentDate, holidays }) {
|
|
11119
|
+
function CalendarView({ currentDate, setCurrentDate, holidays, today }) {
|
|
11081
11120
|
const [selectedDay, setSelectedDay] = (0, import_react32.useState)(null);
|
|
11082
|
-
const
|
|
11121
|
+
const isSameUtcDay = (a, b) => a.getUTCFullYear() === b.getUTCFullYear() && a.getUTCMonth() === b.getUTCMonth() && a.getUTCDate() === b.getUTCDate();
|
|
11122
|
+
const firstDayOfMonth = (new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), 1)).getUTCDay() + 6) % 7;
|
|
11083
11123
|
const days = Array.from({ length: 42 }, (_, i) => {
|
|
11084
11124
|
const day = new Date(
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11125
|
+
Date.UTC(
|
|
11126
|
+
currentDate.getUTCFullYear(),
|
|
11127
|
+
currentDate.getUTCMonth(),
|
|
11128
|
+
i - firstDayOfMonth + 1
|
|
11129
|
+
)
|
|
11089
11130
|
);
|
|
11090
11131
|
const filteredHolidays = holidays.filter(
|
|
11091
11132
|
(h) => TimeUtil.toUtcMidnight(new Date(h.startDate)) <= day && TimeUtil.toUtcEndOfDay(new Date(h.endDate)) >= day
|
|
11092
11133
|
);
|
|
11093
11134
|
return {
|
|
11094
11135
|
date: day,
|
|
11095
|
-
isCurrentMonth: day.
|
|
11096
|
-
isToday: day
|
|
11136
|
+
isCurrentMonth: day.getUTCMonth() === currentDate.getUTCMonth(),
|
|
11137
|
+
isToday: isSameUtcDay(day, today),
|
|
11097
11138
|
holidays: filteredHolidays
|
|
11098
11139
|
};
|
|
11099
11140
|
});
|
|
11100
11141
|
const prevMonth = () => {
|
|
11101
|
-
setCurrentDate(new Date(currentDate.
|
|
11142
|
+
setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() - 1, 1)));
|
|
11102
11143
|
};
|
|
11103
11144
|
const nextMonth = () => {
|
|
11104
|
-
setCurrentDate(new Date(currentDate.
|
|
11145
|
+
setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() + 1, 1)));
|
|
11105
11146
|
};
|
|
11106
11147
|
const setToday = () => {
|
|
11107
|
-
setCurrentDate(/* @__PURE__ */ new Date());
|
|
11148
|
+
setCurrentDate(TimeUtil.toUtcMidnight(/* @__PURE__ */ new Date()));
|
|
11108
11149
|
};
|
|
11150
|
+
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
11151
|
+
const monthYearDisplay = `${months[currentDate.getUTCMonth()]} ${currentDate.getUTCFullYear()}`;
|
|
11109
11152
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "lg:flex lg:h-full lg:flex-col", children: [
|
|
11110
11153
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("header", { className: "flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none", children: [
|
|
11111
|
-
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("time", { dateTime: currentDate.toISOString(), children:
|
|
11154
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("time", { dateTime: currentDate.toISOString(), children: monthYearDisplay }) }),
|
|
11112
11155
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "relative flex items-center rounded-md gap-1 md:items-stretch", children: [
|
|
11113
11156
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
11114
11157
|
Button,
|
|
@@ -11195,7 +11238,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
|
|
|
11195
11238
|
"flex h-6 w-6 items-center justify-center rounded-full",
|
|
11196
11239
|
day.isToday && "bg-indigo-600 font-semibold text-white"
|
|
11197
11240
|
),
|
|
11198
|
-
children: day.date.
|
|
11241
|
+
children: day.date.getUTCDate()
|
|
11199
11242
|
}
|
|
11200
11243
|
),
|
|
11201
11244
|
day.holidays.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("ol", { className: "mt-2 space-y-1 overflow-visible", children: day.holidays.map((holiday) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("li", { className: "overflow-visible", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
@@ -11232,7 +11275,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
|
|
|
11232
11275
|
day.date === selectedDay && day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",
|
|
11233
11276
|
day.date === selectedDay && !day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"
|
|
11234
11277
|
),
|
|
11235
|
-
children: day.date.
|
|
11278
|
+
children: day.date.getUTCDate()
|
|
11236
11279
|
}
|
|
11237
11280
|
),
|
|
11238
11281
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("span", { className: "sr-only", children: [
|
|
@@ -11260,7 +11303,7 @@ var import_react33 = require("react");
|
|
|
11260
11303
|
var import_lucide_react23 = require("lucide-react");
|
|
11261
11304
|
var import_lucide_react24 = require("lucide-react");
|
|
11262
11305
|
var import_navigation8 = require("next/navigation");
|
|
11263
|
-
var
|
|
11306
|
+
var import_date_fns = require("date-fns");
|
|
11264
11307
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
11265
11308
|
function classNames2(...classes) {
|
|
11266
11309
|
return classes.filter(Boolean).join(" ");
|
|
@@ -11269,6 +11312,7 @@ function HolidayTracker({
|
|
|
11269
11312
|
holidays,
|
|
11270
11313
|
currentUser,
|
|
11271
11314
|
currentDate,
|
|
11315
|
+
today,
|
|
11272
11316
|
leaveApprovals,
|
|
11273
11317
|
employees,
|
|
11274
11318
|
submitLeaveRequest,
|
|
@@ -11278,9 +11322,10 @@ function HolidayTracker({
|
|
|
11278
11322
|
const [currentTab, setCurrentTab] = (0, import_react33.useState)("Calendar View");
|
|
11279
11323
|
const router = (0, import_navigation8.useRouter)();
|
|
11280
11324
|
const isLoading = false;
|
|
11281
|
-
const parsedCurrentDate = TimeUtil.toUtcMidnight((0,
|
|
11325
|
+
const parsedCurrentDate = TimeUtil.toUtcMidnight((0, import_date_fns.parseISO)(currentDate));
|
|
11326
|
+
const parsedToday = TimeUtil.toUtcMidnight((0, import_date_fns.parseISO)(today));
|
|
11282
11327
|
const setCurrentDate = async (date) => {
|
|
11283
|
-
const formattedDate = (0,
|
|
11328
|
+
const formattedDate = (0, import_date_fns.format)(date, "dd-MM-yyyy");
|
|
11284
11329
|
const url = new URL(window.location.href);
|
|
11285
11330
|
url.searchParams.set("date", formattedDate);
|
|
11286
11331
|
router.push(url.toString());
|
|
@@ -11360,7 +11405,8 @@ function HolidayTracker({
|
|
|
11360
11405
|
{
|
|
11361
11406
|
currentDate: parsedCurrentDate,
|
|
11362
11407
|
setCurrentDate,
|
|
11363
|
-
holidays
|
|
11408
|
+
holidays,
|
|
11409
|
+
today: parsedToday
|
|
11364
11410
|
}
|
|
11365
11411
|
),
|
|
11366
11412
|
currentTab === "Request Leave" && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
@@ -11493,7 +11539,7 @@ function DealDetails({
|
|
|
11493
11539
|
}
|
|
11494
11540
|
};
|
|
11495
11541
|
const getUserById = (userId) => {
|
|
11496
|
-
return users?.find((user) => user.id ===
|
|
11542
|
+
return users?.find((user) => user.id === userId);
|
|
11497
11543
|
};
|
|
11498
11544
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Dialog, { open: true, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(DialogContent, { className: "max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden", children: [
|
|
11499
11545
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(DialogHeader, { className: "flex flex-row items-center justify-between", children: [
|
|
@@ -12078,7 +12124,7 @@ function NewDealForm({
|
|
|
12078
12124
|
}
|
|
12079
12125
|
};
|
|
12080
12126
|
const getUserById = (userId) => {
|
|
12081
|
-
return users?.find((user) => user.id ===
|
|
12127
|
+
return users?.find((user) => user.id === userId);
|
|
12082
12128
|
};
|
|
12083
12129
|
const getCustomerById = (customerID) => {
|
|
12084
12130
|
return customers?.find((customer) => customer.id === Number(customerID));
|
|
@@ -12279,7 +12325,7 @@ function CRMCogeBoard({
|
|
|
12279
12325
|
|
|
12280
12326
|
// src/components/Chat/Components/ChatCardTask.tsx
|
|
12281
12327
|
var import_lucide_react28 = require("lucide-react");
|
|
12282
|
-
var
|
|
12328
|
+
var import_date_fns2 = require("date-fns");
|
|
12283
12329
|
|
|
12284
12330
|
// src/components/Chat/hooks/useTask.ts
|
|
12285
12331
|
var import_react39 = require("react");
|
|
@@ -12386,7 +12432,7 @@ function ChatCardTask({
|
|
|
12386
12432
|
try {
|
|
12387
12433
|
const date = new Date(taskData?.dateLogged || "");
|
|
12388
12434
|
if (!isNaN(date.getTime())) {
|
|
12389
|
-
formattedDate = (0,
|
|
12435
|
+
formattedDate = (0, import_date_fns2.formatDistanceToNow)(date, { addSuffix: true });
|
|
12390
12436
|
}
|
|
12391
12437
|
} catch (e) {
|
|
12392
12438
|
}
|
|
@@ -12886,7 +12932,7 @@ function getAllCapabilities() {
|
|
|
12886
12932
|
|
|
12887
12933
|
// src/components/Chat/Components/ChatCardArtefact.tsx
|
|
12888
12934
|
var import_lucide_react29 = require("lucide-react");
|
|
12889
|
-
var
|
|
12935
|
+
var import_date_fns3 = require("date-fns");
|
|
12890
12936
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12891
12937
|
function ChatCardArtefact({
|
|
12892
12938
|
artefact,
|
|
@@ -12907,7 +12953,7 @@ function ChatCardArtefact({
|
|
|
12907
12953
|
try {
|
|
12908
12954
|
const date = new Date(taskData.dateLogged);
|
|
12909
12955
|
if (!isNaN(date.getTime())) {
|
|
12910
|
-
formattedDate = (0,
|
|
12956
|
+
formattedDate = (0, import_date_fns3.formatDistanceToNow)(date, { addSuffix: true });
|
|
12911
12957
|
}
|
|
12912
12958
|
} catch (e) {
|
|
12913
12959
|
}
|
|
@@ -20464,8 +20510,8 @@ function ToolbarPlugin() {
|
|
|
20464
20510
|
blockNode = curr;
|
|
20465
20511
|
}
|
|
20466
20512
|
if (blockNode) {
|
|
20467
|
-
const
|
|
20468
|
-
setAlignment(
|
|
20513
|
+
const format3 = blockNode.getFormatType();
|
|
20514
|
+
setAlignment(format3 || "left");
|
|
20469
20515
|
}
|
|
20470
20516
|
const tag = anchorNode.getTopLevelElement()?.__tag;
|
|
20471
20517
|
setBlockType(tag || "p");
|
|
@@ -21394,7 +21440,7 @@ var markdownToLexical = (markdown) => {
|
|
|
21394
21440
|
var convertFileTypeToKnowledgeDocument = async (file) => {
|
|
21395
21441
|
let content = "";
|
|
21396
21442
|
let richTextContent = void 0;
|
|
21397
|
-
let
|
|
21443
|
+
let format3 = "text";
|
|
21398
21444
|
if (file.url) {
|
|
21399
21445
|
try {
|
|
21400
21446
|
let url = file.url;
|
|
@@ -21415,18 +21461,18 @@ var convertFileTypeToKnowledgeDocument = async (file) => {
|
|
|
21415
21461
|
console.warn("No URL provided for file:", file.name);
|
|
21416
21462
|
}
|
|
21417
21463
|
if (file.mimeType === "text/markdown") {
|
|
21418
|
-
|
|
21464
|
+
format3 = "richText";
|
|
21419
21465
|
richTextContent = markdownToLexical(content);
|
|
21420
21466
|
} else if (file.mimeType?.startsWith("text/")) {
|
|
21421
|
-
|
|
21467
|
+
format3 = "text";
|
|
21422
21468
|
}
|
|
21423
21469
|
return {
|
|
21424
21470
|
id: file.id.toString(),
|
|
21425
21471
|
title: file.name,
|
|
21426
21472
|
description: void 0,
|
|
21427
|
-
content:
|
|
21428
|
-
richTextContent:
|
|
21429
|
-
format:
|
|
21473
|
+
content: format3 === "richText" ? void 0 : content,
|
|
21474
|
+
richTextContent: format3 === "richText" ? richTextContent : void 0,
|
|
21475
|
+
format: format3,
|
|
21430
21476
|
metadata: {},
|
|
21431
21477
|
createdAt: typeof file.createdAt === "string" ? new Date(file.createdAt) : file.createdAt,
|
|
21432
21478
|
updatedAt: /* @__PURE__ */ new Date()
|
|
@@ -21476,8 +21522,8 @@ function FileEdit({ document: document2, onCancel, onSave, onFileUpdate }) {
|
|
|
21476
21522
|
setRichTextContent(document2.richTextContent);
|
|
21477
21523
|
}
|
|
21478
21524
|
}, [document2]);
|
|
21479
|
-
const formatIcon = (
|
|
21480
|
-
switch (
|
|
21525
|
+
const formatIcon = (format3) => {
|
|
21526
|
+
switch (format3) {
|
|
21481
21527
|
case "markdown":
|
|
21482
21528
|
case "mdx":
|
|
21483
21529
|
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_lucide_react68.FileText, { className: "h-6 w-6 text-primary" });
|
|
@@ -21489,8 +21535,8 @@ function FileEdit({ document: document2, onCancel, onSave, onFileUpdate }) {
|
|
|
21489
21535
|
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_lucide_react68.File, { className: "h-6 w-6 text-muted-foreground" });
|
|
21490
21536
|
}
|
|
21491
21537
|
};
|
|
21492
|
-
const formatBadgeColor = (
|
|
21493
|
-
switch (
|
|
21538
|
+
const formatBadgeColor = (format3) => {
|
|
21539
|
+
switch (format3) {
|
|
21494
21540
|
case "markdown":
|
|
21495
21541
|
return "bg-primary/10 text-primary border-primary/20";
|
|
21496
21542
|
case "mdx":
|
|
@@ -23734,8 +23780,8 @@ function DocumentEdit({
|
|
|
23734
23780
|
(0, import_react95.useEffect)(() => {
|
|
23735
23781
|
setEditedDocument(document2);
|
|
23736
23782
|
}, [document2]);
|
|
23737
|
-
const formatIcon = (
|
|
23738
|
-
switch (
|
|
23783
|
+
const formatIcon = (format3) => {
|
|
23784
|
+
switch (format3) {
|
|
23739
23785
|
case "markdown":
|
|
23740
23786
|
case "mdx":
|
|
23741
23787
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_lucide_react76.FileText, { className: "h-6 w-6 text-primary" });
|
|
@@ -23747,8 +23793,8 @@ function DocumentEdit({
|
|
|
23747
23793
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_lucide_react76.File, { className: "h-6 w-6 text-muted-foreground" });
|
|
23748
23794
|
}
|
|
23749
23795
|
};
|
|
23750
|
-
const formatBadgeColor = (
|
|
23751
|
-
switch (
|
|
23796
|
+
const formatBadgeColor = (format3) => {
|
|
23797
|
+
switch (format3) {
|
|
23752
23798
|
case "markdown":
|
|
23753
23799
|
return "bg-primary/10 text-primary border-primary/20";
|
|
23754
23800
|
case "mdx":
|
|
@@ -24072,8 +24118,8 @@ function DocumentPreview({
|
|
|
24072
24118
|
(0, import_react97.useEffect)(() => {
|
|
24073
24119
|
setDocument(initialDocument);
|
|
24074
24120
|
}, [initialDocument]);
|
|
24075
|
-
const formatIcon = (
|
|
24076
|
-
switch (
|
|
24121
|
+
const formatIcon = (format3) => {
|
|
24122
|
+
switch (format3) {
|
|
24077
24123
|
case "markdown":
|
|
24078
24124
|
case "mdx":
|
|
24079
24125
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_lucide_react77.FileText, { className: "h-6 w-6 text-primary" });
|
|
@@ -24085,8 +24131,8 @@ function DocumentPreview({
|
|
|
24085
24131
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_lucide_react77.File, { className: "h-6 w-6 text-muted-foreground" });
|
|
24086
24132
|
}
|
|
24087
24133
|
};
|
|
24088
|
-
const formatBadgeColor = (
|
|
24089
|
-
switch (
|
|
24134
|
+
const formatBadgeColor = (format3) => {
|
|
24135
|
+
switch (format3) {
|
|
24090
24136
|
case "markdown":
|
|
24091
24137
|
return "bg-primary/10 text-primary border-primary/20";
|
|
24092
24138
|
case "mdx":
|
|
@@ -24099,15 +24145,15 @@ function DocumentPreview({
|
|
|
24099
24145
|
return "bg-muted text-muted-foreground border-border";
|
|
24100
24146
|
}
|
|
24101
24147
|
};
|
|
24102
|
-
const renderContent = (content,
|
|
24148
|
+
const renderContent = (content, format3) => {
|
|
24103
24149
|
const defaultRenderers = {
|
|
24104
24150
|
markdown: defaultMarkdownRenderer,
|
|
24105
24151
|
mdx: defaultMDXRenderer,
|
|
24106
24152
|
// richText: defaultRichTextRenderer,
|
|
24107
24153
|
text: defaultTextRenderer
|
|
24108
24154
|
};
|
|
24109
|
-
const renderer = renderers?.[
|
|
24110
|
-
if (
|
|
24155
|
+
const renderer = renderers?.[format3] || defaultRenderers[format3];
|
|
24156
|
+
if (format3 === "richText" && typeof content === "object") {
|
|
24111
24157
|
return defaultRichTextRenderer(content);
|
|
24112
24158
|
}
|
|
24113
24159
|
if (renderer) {
|
|
@@ -24274,8 +24320,8 @@ function MenuItem({
|
|
|
24274
24320
|
const [isExpanded, setIsExpanded] = (0, import_react99.useState)(level === 0);
|
|
24275
24321
|
const hasChildren = children && Object.keys(children).length > 0;
|
|
24276
24322
|
const totalDocuments = documents.length + (children ? Object.values(children).reduce((acc, child) => acc + child.documents.length, 0) : 0);
|
|
24277
|
-
const formatDocumentIcon = (
|
|
24278
|
-
switch (
|
|
24323
|
+
const formatDocumentIcon = (format3) => {
|
|
24324
|
+
switch (format3) {
|
|
24279
24325
|
case "markdown":
|
|
24280
24326
|
case "mdx":
|
|
24281
24327
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_lucide_react78.FileText, { className: "h-3.5 w-3.5 text-muted-foreground" });
|
|
@@ -27742,7 +27788,7 @@ var import_lucide_react91 = require("lucide-react");
|
|
|
27742
27788
|
// src/components/Projects/AddSprintModal.tsx
|
|
27743
27789
|
var import_react115 = require("react");
|
|
27744
27790
|
var import_lucide_react90 = require("lucide-react");
|
|
27745
|
-
var
|
|
27791
|
+
var import_date_fns4 = require("date-fns");
|
|
27746
27792
|
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
27747
27793
|
var AddSprintModal = ({ isOpen, onClose, onAddSprint }) => {
|
|
27748
27794
|
const [formData, setFormData] = (0, import_react115.useState)({
|
|
@@ -27829,7 +27875,7 @@ var AddSprintModal = ({ isOpen, onClose, onAddSprint }) => {
|
|
|
27829
27875
|
),
|
|
27830
27876
|
children: [
|
|
27831
27877
|
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_lucide_react90.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
27832
|
-
formData.startDate ? (0,
|
|
27878
|
+
formData.startDate ? (0, import_date_fns4.format)(formData.startDate, "PPP") : "Pick a date"
|
|
27833
27879
|
]
|
|
27834
27880
|
}
|
|
27835
27881
|
) }),
|
|
@@ -27857,7 +27903,7 @@ var AddSprintModal = ({ isOpen, onClose, onAddSprint }) => {
|
|
|
27857
27903
|
),
|
|
27858
27904
|
children: [
|
|
27859
27905
|
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_lucide_react90.CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
27860
|
-
formData.endDate ? (0,
|
|
27906
|
+
formData.endDate ? (0, import_date_fns4.format)(formData.endDate, "PPP") : "Pick a date"
|
|
27861
27907
|
]
|
|
27862
27908
|
}
|
|
27863
27909
|
) }),
|