@apextelemed/partner-core 0.3.0 → 0.3.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.
@@ -18,7 +18,7 @@ import {
18
18
  useAddressPair,
19
19
  useCardTokenizer,
20
20
  validateAddress
21
- } from "./B63K5R7M.jsx";
21
+ } from "./M6DZVPYZ.jsx";
22
22
  import {
23
23
  auth_default,
24
24
  cart_default,
@@ -752,4 +752,4 @@ export {
752
752
  restoreCartFromLink,
753
753
  startCartCapture
754
754
  };
755
- //# sourceMappingURL=6HLXYY4F.jsx.map
755
+ //# sourceMappingURL=2EVGOW2Z.jsx.map
@@ -2181,6 +2181,21 @@ function buildTrackingUrl(delivery) {
2181
2181
  return builder ? builder(delivery.trackingNumber) : null;
2182
2182
  }
2183
2183
 
2184
+ // src/utils/calendarDate.ts
2185
+ var DATE_ONLY = /^(\d{4})-(\d{2})-(\d{2})$/;
2186
+ function parseCalendarDate(value) {
2187
+ if (!value) return null;
2188
+ const m = DATE_ONLY.exec(value.trim());
2189
+ const d = m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : new Date(value);
2190
+ return Number.isNaN(d.getTime()) ? null : d;
2191
+ }
2192
+ function formatCalendarDate(value, options = { year: "numeric", month: "long", day: "numeric" }) {
2193
+ if (!value) return "";
2194
+ const d = parseCalendarDate(value);
2195
+ if (!d) return value;
2196
+ return d.toLocaleDateString("en-US", options);
2197
+ }
2198
+
2184
2199
  // src/flows/tracker.ts
2185
2200
  var PIPELINE = [
2186
2201
  { key: "submitted", label: "Submitted", heroWord: "Received", subCaption: "We\u2019ve received your request." },
@@ -2299,12 +2314,7 @@ function softRelative(date, now) {
2299
2314
  const weeks = Math.round(diffDays / 7);
2300
2315
  return `in ${weeks} weeks`;
2301
2316
  }
2302
- function parseBackendDate(value) {
2303
- if (!value) return null;
2304
- const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
2305
- const d = dateOnly ? new Date(Number(dateOnly[1]), Number(dateOnly[2]) - 1, Number(dateOnly[3])) : new Date(value);
2306
- return Number.isNaN(d.getTime()) ? null : d;
2307
- }
2317
+ var parseBackendDate = parseCalendarDate;
2308
2318
  function buildRefillView(sub, now = Date.now()) {
2309
2319
  if (!sub) return null;
2310
2320
  if (sub.status === "cancelled" || sub.status === "expired" || sub.status === "suspended") {
@@ -3239,6 +3249,6 @@ async function uploadPrescriptionPhoto(file) {
3239
3249
  return { photoId: parsed.photoId };
3240
3250
  }
3241
3251
 
3242
- export { LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, availableStateOptions, availableStates, buildRefillView, buildTrackerView, buildTrackingUrl, captureFunnelEmail, createFunnelTelemetry, emailGateAnswered, firstAddressError, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, hasStateRestrictions, isImageAttachment, isLive, isQuestionVisible, isReconcilable, markEmailGateAnswered, normalizeState, redeemResumeLink, resetResumeRedemption, resolveSurveyV2DrugIntent, stateAvailabilityNote, uploadPrescriptionPhoto, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCheckoutFlow, useDashboardData, useMemberPortalData, useMessagesThread, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
3243
- //# sourceMappingURL=SE6JHCPZ.js.map
3244
- //# sourceMappingURL=SE6JHCPZ.js.map
3252
+ export { LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, availableStateOptions, availableStates, buildRefillView, buildTrackerView, buildTrackingUrl, captureFunnelEmail, createFunnelTelemetry, emailGateAnswered, firstAddressError, formatCalendarDate, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, hasStateRestrictions, isImageAttachment, isLive, isQuestionVisible, isReconcilable, markEmailGateAnswered, normalizeState, redeemResumeLink, resetResumeRedemption, resolveSurveyV2DrugIntent, stateAvailabilityNote, uploadPrescriptionPhoto, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCheckoutFlow, useDashboardData, useMemberPortalData, useMessagesThread, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
3253
+ //# sourceMappingURL=5RQ4ZIYB.js.map
3254
+ //# sourceMappingURL=5RQ4ZIYB.js.map