@timardex/cluemart-shared 2.2.21 → 2.2.22

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.
@@ -43,6 +43,7 @@ __export(utils_exports, {
43
43
  DEFAULT_RESOURCES_RETURN_LIMIT: () => DEFAULT_RESOURCES_RETURN_LIMIT,
44
44
  DEFAULT_RESOURCES_RETURN_OFFSET: () => DEFAULT_RESOURCES_RETURN_OFFSET,
45
45
  DEFAULT_USER_FACING_ERROR: () => DEFAULT_USER_FACING_ERROR,
46
+ EVENT_DATE_STATUS_LABELS: () => EVENT_DATE_STATUS_LABELS,
46
47
  EVENT_DATE_STATUS_PERIOD_MAP: () => EVENT_DATE_STATUS_PERIOD_MAP,
47
48
  FUTURE_EVENT_DATE_STATUSES: () => FUTURE_EVENT_DATE_STATUSES,
48
49
  INITIAL_BILLING_CATALOG: () => INITIAL_BILLING_CATALOG,
@@ -849,6 +850,19 @@ var SCHOOL_MAX_STUDENT_COUNT = 0;
849
850
 
850
851
  // src/calendar/eventCalendar.ts
851
852
  var import_dayjs3 = __toESM(require("dayjs"));
853
+ var EVENT_DATE_STATUS_LABELS = {
854
+ ["Starting_Soon" /* STARTING_SOON */]: "Starting Soon",
855
+ ["Started" /* STARTED */]: "Started",
856
+ ["Today" /* TODAY */]: "Today",
857
+ ["Tomorrow" /* TOMORROW */]: "Tomorrow",
858
+ ["This_Week" /* THIS_WEEK */]: "This Week",
859
+ ["Next_Week" /* NEXT_WEEK */]: "Next Week",
860
+ ["Upcoming" /* UPCOMING */]: "Upcoming",
861
+ ["Ended" /* ENDED */]: "Ended",
862
+ ["Rescheduled" /* RE_SCHEDULED */]: "Rescheduled",
863
+ ["Canceled" /* CANCELED */]: "Canceled",
864
+ ["Invalid" /* INVALID */]: "Invalid"
865
+ };
852
866
  function toCalendarIsoDate(startDate) {
853
867
  const formatted = (0, import_dayjs3.default)(startDate, dateFormat).format("YYYY-MM-DD");
854
868
  return (0, import_dayjs3.default)(formatted, "YYYY-MM-DD", true).isValid() ? formatted : null;
@@ -904,7 +918,7 @@ function getEventScheduleStatusTone(status) {
904
918
  function getEventScheduleStatusPresentation(dateTime) {
905
919
  return {
906
920
  status: dateTime.dateStatus,
907
- statusLabel: dateTime.dateStatus.replaceAll("_", " ").toLowerCase(),
921
+ statusLabel: EVENT_DATE_STATUS_LABELS[dateTime.dateStatus],
908
922
  tone: getEventScheduleStatusTone(dateTime.dateStatus)
909
923
  };
910
924
  }
@@ -913,7 +927,7 @@ function getEventScheduleStatusLabel(dateTime) {
913
927
  if (!status) {
914
928
  return null;
915
929
  }
916
- return status.replaceAll("_", " ").toLowerCase();
930
+ return EVENT_DATE_STATUS_LABELS[status];
917
931
  }
918
932
  function shouldShowEventActionsWithWeather(resourceType, dateTime, location) {
919
933
  return resourceType === "event" /* EVENT */ && Boolean(location) && Boolean(dateTime?.dateStatus) && !["Ended" /* ENDED */, "Canceled" /* CANCELED */].includes(
@@ -2378,6 +2392,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
2378
2392
  DEFAULT_RESOURCES_RETURN_LIMIT,
2379
2393
  DEFAULT_RESOURCES_RETURN_OFFSET,
2380
2394
  DEFAULT_USER_FACING_ERROR,
2395
+ EVENT_DATE_STATUS_LABELS,
2381
2396
  EVENT_DATE_STATUS_PERIOD_MAP,
2382
2397
  FUTURE_EVENT_DATE_STATUSES,
2383
2398
  INITIAL_BILLING_CATALOG,