@burdenoff/microfe-crewfoundry 2026.1013.2 → 2026.1029.1

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 (198) hide show
  1. package/dist/crewfoundry/CrewFoundryRoot.d.ts.map +1 -1
  2. package/dist/crewfoundry/CrewFoundryRoot.js +160 -256
  3. package/dist/crewfoundry/CrewFoundryRoot.js.map +1 -1
  4. package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
  5. package/dist/crewfoundry/CrewFoundryRoutes.js +152 -192
  6. package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
  7. package/dist/crewfoundry/components/InlineError.d.ts +5 -0
  8. package/dist/crewfoundry/components/InlineError.d.ts.map +1 -0
  9. package/dist/crewfoundry/components/InlineError.js +17 -0
  10. package/dist/crewfoundry/components/InlineError.js.map +1 -0
  11. package/dist/crewfoundry/components/marketplace/BookServiceModal.d.ts +14 -0
  12. package/dist/crewfoundry/components/marketplace/BookServiceModal.d.ts.map +1 -0
  13. package/dist/crewfoundry/components/marketplace/BookServiceModal.js +75 -0
  14. package/dist/crewfoundry/components/marketplace/BookServiceModal.js.map +1 -0
  15. package/dist/crewfoundry/components/marketplace/MarketplaceTabs.d.ts +24 -0
  16. package/dist/crewfoundry/components/marketplace/MarketplaceTabs.d.ts.map +1 -0
  17. package/dist/crewfoundry/components/marketplace/MarketplaceTabs.js +47 -0
  18. package/dist/crewfoundry/components/marketplace/MarketplaceTabs.js.map +1 -0
  19. package/dist/crewfoundry/components/marketplace/ServiceListingModal.d.ts +12 -0
  20. package/dist/crewfoundry/components/marketplace/ServiceListingModal.d.ts.map +1 -0
  21. package/dist/crewfoundry/components/marketplace/ServiceListingModal.js +123 -0
  22. package/dist/crewfoundry/components/marketplace/ServiceListingModal.js.map +1 -0
  23. package/dist/crewfoundry/components/viz/CertificateCard.js +4 -118
  24. package/dist/crewfoundry/components/viz/PathSteps.js +3 -68
  25. package/dist/crewfoundry/components/viz/lib/geometry.js +5 -13
  26. package/dist/crewfoundry/components/viz/lib/geometry.js.map +1 -1
  27. package/dist/crewfoundry/lib/analytics.d.ts +1 -6
  28. package/dist/crewfoundry/lib/analytics.d.ts.map +1 -1
  29. package/dist/crewfoundry/lib/analytics.js +3 -18
  30. package/dist/crewfoundry/lib/analytics.js.map +1 -1
  31. package/dist/crewfoundry/lib/companyFinance.d.ts +3 -7
  32. package/dist/crewfoundry/lib/companyFinance.d.ts.map +1 -1
  33. package/dist/crewfoundry/lib/companyFinance.js +3 -8
  34. package/dist/crewfoundry/lib/companyFinance.js.map +1 -1
  35. package/dist/crewfoundry/lib/learning.d.ts +12 -0
  36. package/dist/crewfoundry/lib/learning.d.ts.map +1 -0
  37. package/dist/crewfoundry/lib/learning.js +26 -0
  38. package/dist/crewfoundry/lib/learning.js.map +1 -0
  39. package/dist/crewfoundry/lib/marketplace.d.ts +30 -0
  40. package/dist/crewfoundry/lib/marketplace.d.ts.map +1 -0
  41. package/dist/crewfoundry/lib/marketplace.js +91 -0
  42. package/dist/crewfoundry/lib/marketplace.js.map +1 -0
  43. package/dist/crewfoundry/lib/useEnsureLoaded.d.ts +7 -0
  44. package/dist/crewfoundry/lib/useEnsureLoaded.d.ts.map +1 -0
  45. package/dist/crewfoundry/lib/useEnsureLoaded.js +25 -0
  46. package/dist/crewfoundry/lib/useEnsureLoaded.js.map +1 -0
  47. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.d.ts.map +1 -1
  48. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +12 -25
  49. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
  50. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
  51. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +145 -157
  52. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  53. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
  54. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +14 -14
  55. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  56. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
  57. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +14 -14
  58. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  59. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.d.ts.map +1 -1
  60. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +71 -33
  61. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
  62. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.d.ts.map +1 -1
  63. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +247 -173
  64. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  65. package/dist/crewfoundry/pages/LearningCoursesPagePage.d.ts +12 -0
  66. package/dist/crewfoundry/pages/LearningCoursesPagePage.d.ts.map +1 -1
  67. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +307 -293
  68. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  69. package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.d.ts +2 -0
  70. package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.d.ts.map +1 -0
  71. package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.js +223 -0
  72. package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.js.map +1 -0
  73. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.d.ts +4 -0
  74. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.d.ts.map +1 -1
  75. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +115 -160
  76. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
  77. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.d.ts.map +1 -1
  78. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +165 -75
  79. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
  80. package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.d.ts +7 -0
  81. package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.d.ts.map +1 -0
  82. package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.js +175 -0
  83. package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.js.map +1 -0
  84. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.d.ts.map +1 -1
  85. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +182 -223
  86. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  87. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.d.ts.map +1 -1
  88. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +168 -227
  89. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
  90. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.d.ts.map +1 -1
  91. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +127 -290
  92. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
  93. package/dist/crewfoundry/store/crewfoundryStore.d.ts +138 -78
  94. package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
  95. package/dist/crewfoundry/store/crewfoundryStore.js +323 -244
  96. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  97. package/dist/crewfoundry/utils/dateUtils.d.ts +5 -0
  98. package/dist/crewfoundry/utils/dateUtils.d.ts.map +1 -1
  99. package/dist/crewfoundry/utils/dateUtils.js +10 -1
  100. package/dist/crewfoundry/utils/dateUtils.js.map +1 -1
  101. package/dist/generated/global-types.d.ts +5145 -1627
  102. package/dist/generated/global-types.d.ts.map +1 -1
  103. package/dist/generated/wspace-types.d.ts +100373 -34602
  104. package/dist/generated/wspace-types.d.ts.map +1 -1
  105. package/dist/utils/pageContext.d.ts.map +1 -1
  106. package/dist/utils/pageContext.js +0 -1
  107. package/dist/utils/pageContext.js.map +1 -1
  108. package/package.json +1 -1
  109. package/dist/crewfoundry/components/viz/CertificateCard.js.map +0 -1
  110. package/dist/crewfoundry/components/viz/PathSteps.js.map +0 -1
  111. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.d.ts +0 -2
  112. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.d.ts.map +0 -1
  113. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +0 -53
  114. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +0 -1
  115. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.d.ts +0 -2
  116. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.d.ts.map +0 -1
  117. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +0 -107
  118. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +0 -1
  119. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.d.ts +0 -2
  120. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.d.ts.map +0 -1
  121. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +0 -62
  122. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +0 -1
  123. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.d.ts +0 -2
  124. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.d.ts.map +0 -1
  125. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +0 -37
  126. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +0 -1
  127. package/dist/crewfoundry/pages/LearningCertificatesPagePage.d.ts +0 -2
  128. package/dist/crewfoundry/pages/LearningCertificatesPagePage.d.ts.map +0 -1
  129. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +0 -111
  130. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +0 -1
  131. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.d.ts +0 -2
  132. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.d.ts.map +0 -1
  133. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +0 -309
  134. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +0 -1
  135. package/dist/crewfoundry/pages/LearningLearningPagePage.d.ts +0 -2
  136. package/dist/crewfoundry/pages/LearningLearningPagePage.d.ts.map +0 -1
  137. package/dist/crewfoundry/pages/LearningLearningPagePage.js +0 -200
  138. package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +0 -1
  139. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.d.ts +0 -2
  140. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.d.ts.map +0 -1
  141. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +0 -190
  142. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +0 -1
  143. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.d.ts +0 -2
  144. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.d.ts.map +0 -1
  145. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +0 -230
  146. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +0 -1
  147. package/dist/crewfoundry/pages/LearningMyLearningPagePage.d.ts +0 -2
  148. package/dist/crewfoundry/pages/LearningMyLearningPagePage.d.ts.map +0 -1
  149. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +0 -293
  150. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +0 -1
  151. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.d.ts +0 -2
  152. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.d.ts.map +0 -1
  153. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +0 -163
  154. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +0 -1
  155. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.d.ts +0 -2
  156. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.d.ts.map +0 -1
  157. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +0 -365
  158. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +0 -1
  159. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.d.ts +0 -2
  160. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.d.ts.map +0 -1
  161. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +0 -224
  162. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +0 -1
  163. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.d.ts +0 -2
  164. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.d.ts.map +0 -1
  165. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +0 -180
  166. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +0 -1
  167. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.d.ts +0 -2
  168. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.d.ts.map +0 -1
  169. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +0 -38
  170. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +0 -1
  171. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.d.ts +0 -2
  172. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.d.ts.map +0 -1
  173. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +0 -204
  174. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +0 -1
  175. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.d.ts +0 -2
  176. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.d.ts.map +0 -1
  177. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +0 -55
  178. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +0 -1
  179. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.d.ts +0 -2
  180. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.d.ts.map +0 -1
  181. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +0 -335
  182. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +0 -1
  183. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.d.ts +0 -2
  184. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.d.ts.map +0 -1
  185. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +0 -160
  186. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +0 -1
  187. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.d.ts +0 -2
  188. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.d.ts.map +0 -1
  189. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +0 -80
  190. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +0 -1
  191. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.d.ts +0 -2
  192. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.d.ts.map +0 -1
  193. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +0 -191
  194. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +0 -1
  195. package/dist/crewfoundry/utils/courseProgress.d.ts +0 -33
  196. package/dist/crewfoundry/utils/courseProgress.d.ts.map +0 -1
  197. package/dist/crewfoundry/utils/courseProgress.js +0 -46
  198. package/dist/crewfoundry/utils/courseProgress.js.map +0 -1
@@ -44,4 +44,9 @@ export declare function localDayDiff(from: Date, to: Date): number;
44
44
  * trigger (typing in the form is sufficient in practice).
45
45
  */
46
46
  export declare function localTodayString(): string;
47
+ /**
48
+ * Format an ISO timestamp (or YYYY-MM-DD) as a short local date, e.g.
49
+ * "Oct 29, 2026". Returns an em dash for empty or unparseable input.
50
+ */
51
+ export declare function formatDate(value: string | null | undefined): string;
47
52
  //# sourceMappingURL=dateUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/crewfoundry/utils/dateUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAe9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,CAIzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAGzC"}
1
+ {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/crewfoundry/utils/dateUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAe9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,CAIzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAGzC;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAKnE"}
@@ -16,7 +16,16 @@ function n() {
16
16
  let e = /* @__PURE__ */ new Date();
17
17
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
18
18
  }
19
+ function r(e) {
20
+ if (!e) return "—";
21
+ let t = new Date(e);
22
+ return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
23
+ month: "short",
24
+ day: "numeric",
25
+ year: "numeric"
26
+ });
27
+ }
19
28
  //#endregion
20
- export { t as localDayDiff, n as localTodayString, e as parseLocalDate };
29
+ export { r as formatDate, t as localDayDiff, n as localTodayString, e as parseLocalDate };
21
30
 
22
31
  //# sourceMappingURL=dateUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.js","names":[],"sources":["../../../src/crewfoundry/utils/dateUtils.ts"],"sourcesContent":["/**\n * Local-calendar date utilities for the CrewFoundry MFE.\n *\n * The native `new Date('YYYY-MM-DD')` constructor parses date-only strings\n * as UTC midnight, which silently breaks user-facing date math for callers\n * in non-UTC timezones (a deadline picked as \"today\" in PST is already\n * 17-20 hours in the past by local noon). These helpers parse and compare\n * as local-calendar-day values instead.\n */\n\n/**\n * Parse a YYYY-MM-DD or ISO-8601 timestamp as local-midnight on that\n * calendar day. Two input shapes are accepted because the same field\n * can arrive either way depending on the source:\n *\n * - 'YYYY-MM-DD' — what the date input sends on save (local calendar day).\n * - 'YYYY-MM-DDTHH:mm:ss.sssZ' (or with an offset) — what the GraphQL\n * server returns for `DateTime` columns (UTC instant).\n *\n * For full timestamps we extract the date portion BEFORE constructing the\n * Date, so a UTC midnight instant displays as the same calendar day in\n * any timezone (a deadline stored as 2026-09-29T00:00:00Z is meant to be\n * 2026-09-29, not whatever the user's timezone shifts it to).\n *\n * Returns null if the input isn't a well-formed date-only or ISO string,\n * an unparseable Date, an out-of-range date component (e.g. 2026-02-30),\n * or an empty value. Callers that want a raw Date back should check the\n * result.\n */\nexport function parseLocalDate(dateStr: string | null | undefined): Date | null {\n if (!dateStr) return null;\n // Extract the YYYY-MM-DD prefix: handles both date-only inputs and\n // full ISO timestamps (YYYY-MM-DDTHH:mm:ss...).\n const dateOnlyMatch = /^\\d{4}-\\d{2}-\\d{2}/.exec(dateStr);\n if (!dateOnlyMatch) return null;\n const [year, month, day] = dateOnlyMatch[0].split('-').map((part) => Number(part));\n if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) {\n return null;\n }\n const date = new Date(year, month - 1, day);\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null;\n }\n return date;\n}\n\n/**\n * Whole-day difference between two dates, compared as local calendar days.\n *\n * Both inputs are interpreted at their local midnight. The result is the\n * signed integer count of calendar days from `from` to `to` (negative if\n * `to` is earlier). The inputs must already be valid Dates — this helper\n * does no validity checking; call parseLocalDate first for YYYY-MM-DD\n * strings.\n */\nexport function localDayDiff(from: Date, to: Date): number {\n const fromMidnight = new Date(from.getFullYear(), from.getMonth(), from.getDate());\n const toMidnight = new Date(to.getFullYear(), to.getMonth(), to.getDate());\n return Math.round((toMidnight.getTime() - fromMidnight.getTime()) / 86_400_000);\n}\n\n/**\n * Local-calendar today as a YYYY-MM-DD string. Recomputed on every call;\n * callers that need the picker `min` value pass this through a prop and\n * accept that the prop won't refresh across midnight without a re-render\n * trigger (typing in the form is sufficient in practice).\n */\nexport function localTodayString(): string {\n const now = new Date();\n return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;\n}\n"],"mappings":";AA6BA,SAAgB,EAAe,GAAiD;AAC9E,KAAI,CAAC,EAAS,QAAO;CAGrB,IAAM,IAAgB,qBAAqB,KAAK,EAAQ;AACxD,KAAI,CAAC,EAAe,QAAO;CAC3B,IAAM,CAAC,GAAM,GAAO,KAAO,EAAc,GAAG,MAAM,IAAI,CAAC,KAAK,MAAS,OAAO,EAAK,CAAC;AAClF,KAAI,CAAC,OAAO,SAAS,EAAK,IAAI,CAAC,OAAO,SAAS,EAAM,IAAI,CAAC,OAAO,SAAS,EAAI,CAC5E,QAAO;CAET,IAAM,IAAO,IAAI,KAAK,GAAM,IAAQ,GAAG,EAAI;AAI3C,QAHI,EAAK,aAAa,KAAK,KAAQ,EAAK,UAAU,KAAK,IAAQ,KAAK,EAAK,SAAS,KAAK,IAC9E,OAEF;;AAYT,SAAgB,EAAa,GAAY,GAAkB;CACzD,IAAM,IAAe,IAAI,KAAK,EAAK,aAAa,EAAE,EAAK,UAAU,EAAE,EAAK,SAAS,CAAC,EAC5E,IAAa,IAAI,KAAK,EAAG,aAAa,EAAE,EAAG,UAAU,EAAE,EAAG,SAAS,CAAC;AAC1E,QAAO,KAAK,OAAO,EAAW,SAAS,GAAG,EAAa,SAAS,IAAI,MAAW;;AASjF,SAAgB,IAA2B;CACzC,IAAM,oBAAM,IAAI,MAAM;AACtB,QAAO,GAAG,EAAI,aAAa,CAAC,GAAG,OAAO,EAAI,UAAU,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,OAAO,EAAI,SAAS,CAAC,CAAC,SAAS,GAAG,IAAI"}
1
+ {"version":3,"file":"dateUtils.js","names":[],"sources":["../../../src/crewfoundry/utils/dateUtils.ts"],"sourcesContent":["/**\n * Local-calendar date utilities for the CrewFoundry MFE.\n *\n * The native `new Date('YYYY-MM-DD')` constructor parses date-only strings\n * as UTC midnight, which silently breaks user-facing date math for callers\n * in non-UTC timezones (a deadline picked as \"today\" in PST is already\n * 17-20 hours in the past by local noon). These helpers parse and compare\n * as local-calendar-day values instead.\n */\n\n/**\n * Parse a YYYY-MM-DD or ISO-8601 timestamp as local-midnight on that\n * calendar day. Two input shapes are accepted because the same field\n * can arrive either way depending on the source:\n *\n * - 'YYYY-MM-DD' — what the date input sends on save (local calendar day).\n * - 'YYYY-MM-DDTHH:mm:ss.sssZ' (or with an offset) — what the GraphQL\n * server returns for `DateTime` columns (UTC instant).\n *\n * For full timestamps we extract the date portion BEFORE constructing the\n * Date, so a UTC midnight instant displays as the same calendar day in\n * any timezone (a deadline stored as 2026-09-29T00:00:00Z is meant to be\n * 2026-09-29, not whatever the user's timezone shifts it to).\n *\n * Returns null if the input isn't a well-formed date-only or ISO string,\n * an unparseable Date, an out-of-range date component (e.g. 2026-02-30),\n * or an empty value. Callers that want a raw Date back should check the\n * result.\n */\nexport function parseLocalDate(dateStr: string | null | undefined): Date | null {\n if (!dateStr) return null;\n // Extract the YYYY-MM-DD prefix: handles both date-only inputs and\n // full ISO timestamps (YYYY-MM-DDTHH:mm:ss...).\n const dateOnlyMatch = /^\\d{4}-\\d{2}-\\d{2}/.exec(dateStr);\n if (!dateOnlyMatch) return null;\n const [year, month, day] = dateOnlyMatch[0].split('-').map((part) => Number(part));\n if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) {\n return null;\n }\n const date = new Date(year, month - 1, day);\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null;\n }\n return date;\n}\n\n/**\n * Whole-day difference between two dates, compared as local calendar days.\n *\n * Both inputs are interpreted at their local midnight. The result is the\n * signed integer count of calendar days from `from` to `to` (negative if\n * `to` is earlier). The inputs must already be valid Dates — this helper\n * does no validity checking; call parseLocalDate first for YYYY-MM-DD\n * strings.\n */\nexport function localDayDiff(from: Date, to: Date): number {\n const fromMidnight = new Date(from.getFullYear(), from.getMonth(), from.getDate());\n const toMidnight = new Date(to.getFullYear(), to.getMonth(), to.getDate());\n return Math.round((toMidnight.getTime() - fromMidnight.getTime()) / 86_400_000);\n}\n\n/**\n * Local-calendar today as a YYYY-MM-DD string. Recomputed on every call;\n * callers that need the picker `min` value pass this through a prop and\n * accept that the prop won't refresh across midnight without a re-render\n * trigger (typing in the form is sufficient in practice).\n */\nexport function localTodayString(): string {\n const now = new Date();\n return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;\n}\n\n/**\n * Format an ISO timestamp (or YYYY-MM-DD) as a short local date, e.g.\n * \"Oct 29, 2026\". Returns an em dash for empty or unparseable input.\n */\nexport function formatDate(value: string | null | undefined): string {\n if (!value) return '—';\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) return '—';\n return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });\n}\n"],"mappings":";AA6BA,SAAgB,EAAe,GAAiD;AAC9E,KAAI,CAAC,EAAS,QAAO;CAGrB,IAAM,IAAgB,qBAAqB,KAAK,EAAQ;AACxD,KAAI,CAAC,EAAe,QAAO;CAC3B,IAAM,CAAC,GAAM,GAAO,KAAO,EAAc,GAAG,MAAM,IAAI,CAAC,KAAK,MAAS,OAAO,EAAK,CAAC;AAClF,KAAI,CAAC,OAAO,SAAS,EAAK,IAAI,CAAC,OAAO,SAAS,EAAM,IAAI,CAAC,OAAO,SAAS,EAAI,CAC5E,QAAO;CAET,IAAM,IAAO,IAAI,KAAK,GAAM,IAAQ,GAAG,EAAI;AAI3C,QAHI,EAAK,aAAa,KAAK,KAAQ,EAAK,UAAU,KAAK,IAAQ,KAAK,EAAK,SAAS,KAAK,IAC9E,OAEF;;AAYT,SAAgB,EAAa,GAAY,GAAkB;CACzD,IAAM,IAAe,IAAI,KAAK,EAAK,aAAa,EAAE,EAAK,UAAU,EAAE,EAAK,SAAS,CAAC,EAC5E,IAAa,IAAI,KAAK,EAAG,aAAa,EAAE,EAAG,UAAU,EAAE,EAAG,SAAS,CAAC;AAC1E,QAAO,KAAK,OAAO,EAAW,SAAS,GAAG,EAAa,SAAS,IAAI,MAAW;;AASjF,SAAgB,IAA2B;CACzC,IAAM,oBAAM,IAAI,MAAM;AACtB,QAAO,GAAG,EAAI,aAAa,CAAC,GAAG,OAAO,EAAI,UAAU,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,OAAO,EAAI,SAAS,CAAC,CAAC,SAAS,GAAG,IAAI;;AAOtH,SAAgB,EAAW,GAA0C;AACnE,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,IAAO,IAAI,KAAK,EAAM;AAE5B,QADI,OAAO,MAAM,EAAK,SAAS,CAAC,GAAS,MAClC,EAAK,mBAAmB,KAAA,GAAW;EAAE,OAAO;EAAS,KAAK;EAAW,MAAM;EAAW,CAAC"}