@timardex/cluemart-shared 2.2.22 → 2.2.23
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-JWWUTS56.mjs → chunk-6NGXF4G7.mjs} +2 -2
- package/dist/{chunk-YKJAOTF7.mjs → chunk-6O6TRUOV.mjs} +2 -2
- package/dist/{chunk-MTBH5LMV.mjs → chunk-MUDAYKZ6.mjs} +16 -2
- package/dist/chunk-MUDAYKZ6.mjs.map +1 -0
- package/dist/{chunk-64RGRFSO.mjs → chunk-OWEIH2ME.mjs} +3 -16
- package/dist/chunk-OWEIH2ME.mjs.map +1 -0
- package/dist/formFields/index.cjs +14 -14
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/hooks/index.cjs +14 -14
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +4 -4
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +14 -1
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.mjs +2 -2
- package/dist/utils/index.cjs +14 -14
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +9 -7
- package/dist/utils/index.d.ts +9 -7
- package/dist/utils/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-64RGRFSO.mjs.map +0 -1
- package/dist/chunk-MTBH5LMV.mjs.map +0 -1
- /package/dist/{chunk-JWWUTS56.mjs.map → chunk-6NGXF4G7.mjs.map} +0 -0
- /package/dist/{chunk-YKJAOTF7.mjs.map → chunk-6O6TRUOV.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -3992,6 +3992,15 @@ declare function isResourceImageActive(image: ResourceImageLike | null | undefin
|
|
|
3992
3992
|
declare const SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
3993
3993
|
declare const SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
3994
3994
|
|
|
3995
|
+
/**
|
|
3996
|
+
* Display label per date status. Single source of truth instead of deriving
|
|
3997
|
+
* the label with `replaceAll("_", " ")` / text-transform tricks, so each
|
|
3998
|
+
* status maps to an explicit, correctly-cased string (e.g. "This Week",
|
|
3999
|
+
* "Starting Soon", "Rescheduled"). Lives here (not in `calendar`) so both
|
|
4000
|
+
* `calendar/eventCalendar` and `utils/date` can consume it without a circular
|
|
4001
|
+
* import.
|
|
4002
|
+
*/
|
|
4003
|
+
declare const EVENT_DATE_STATUS_LABELS: Record<EnumEventDateStatus, string>;
|
|
3995
4004
|
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
|
|
3996
4005
|
declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
|
|
3997
4006
|
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
|
|
@@ -4040,13 +4049,6 @@ type EventScheduleStatusPresentation = {
|
|
|
4040
4049
|
statusLabel: string;
|
|
4041
4050
|
tone: EventScheduleStatusTone;
|
|
4042
4051
|
};
|
|
4043
|
-
/**
|
|
4044
|
-
* Display label per date status. Single source of truth instead of deriving
|
|
4045
|
-
* the label with `replaceAll("_", " ")` / text-transform tricks, so each
|
|
4046
|
-
* status maps to an explicit, correctly-cased string (e.g. "This Week",
|
|
4047
|
-
* "Starting Soon", "Rescheduled").
|
|
4048
|
-
*/
|
|
4049
|
-
declare const EVENT_DATE_STATUS_LABELS: Record<EnumEventDateStatus, string>;
|
|
4050
4052
|
declare function toCalendarIsoDate(startDate: string): string | null;
|
|
4051
4053
|
declare function fromCalendarIsoDate(isoDate: string): string;
|
|
4052
4054
|
declare function getEventCalendarIsoDates(dateTimes: Array<{
|
package/dist/index.d.ts
CHANGED
|
@@ -3992,6 +3992,15 @@ declare function isResourceImageActive(image: ResourceImageLike | null | undefin
|
|
|
3992
3992
|
declare const SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
3993
3993
|
declare const SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
3994
3994
|
|
|
3995
|
+
/**
|
|
3996
|
+
* Display label per date status. Single source of truth instead of deriving
|
|
3997
|
+
* the label with `replaceAll("_", " ")` / text-transform tricks, so each
|
|
3998
|
+
* status maps to an explicit, correctly-cased string (e.g. "This Week",
|
|
3999
|
+
* "Starting Soon", "Rescheduled"). Lives here (not in `calendar`) so both
|
|
4000
|
+
* `calendar/eventCalendar` and `utils/date` can consume it without a circular
|
|
4001
|
+
* import.
|
|
4002
|
+
*/
|
|
4003
|
+
declare const EVENT_DATE_STATUS_LABELS: Record<EnumEventDateStatus, string>;
|
|
3995
4004
|
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
|
|
3996
4005
|
declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
|
|
3997
4006
|
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
|
|
@@ -4040,13 +4049,6 @@ type EventScheduleStatusPresentation = {
|
|
|
4040
4049
|
statusLabel: string;
|
|
4041
4050
|
tone: EventScheduleStatusTone;
|
|
4042
4051
|
};
|
|
4043
|
-
/**
|
|
4044
|
-
* Display label per date status. Single source of truth instead of deriving
|
|
4045
|
-
* the label with `replaceAll("_", " ")` / text-transform tricks, so each
|
|
4046
|
-
* status maps to an explicit, correctly-cased string (e.g. "This Week",
|
|
4047
|
-
* "Starting Soon", "Rescheduled").
|
|
4048
|
-
*/
|
|
4049
|
-
declare const EVENT_DATE_STATUS_LABELS: Record<EnumEventDateStatus, string>;
|
|
4050
4052
|
declare function toCalendarIsoDate(startDate: string): string | null;
|
|
4051
4053
|
declare function fromCalendarIsoDate(isoDate: string): string;
|
|
4052
4054
|
declare function getEventCalendarIsoDates(dateTimes: Array<{
|
package/dist/index.mjs
CHANGED
|
@@ -604,6 +604,19 @@ import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
|
604
604
|
import isoWeek from "dayjs/plugin/isoWeek.js";
|
|
605
605
|
dayjs.extend(customParseFormat);
|
|
606
606
|
dayjs.extend(isoWeek);
|
|
607
|
+
var EVENT_DATE_STATUS_LABELS = {
|
|
608
|
+
["Starting_Soon" /* STARTING_SOON */]: "Starting Soon",
|
|
609
|
+
["Started" /* STARTED */]: "Started",
|
|
610
|
+
["Today" /* TODAY */]: "Today",
|
|
611
|
+
["Tomorrow" /* TOMORROW */]: "Tomorrow",
|
|
612
|
+
["This_Week" /* THIS_WEEK */]: "This Week",
|
|
613
|
+
["Next_Week" /* NEXT_WEEK */]: "Next Week",
|
|
614
|
+
["Upcoming" /* UPCOMING */]: "Upcoming",
|
|
615
|
+
["Ended" /* ENDED */]: "Ended",
|
|
616
|
+
["Rescheduled" /* RE_SCHEDULED */]: "Rescheduled",
|
|
617
|
+
["Canceled" /* CANCELED */]: "Canceled",
|
|
618
|
+
["Invalid" /* INVALID */]: "Invalid"
|
|
619
|
+
};
|
|
607
620
|
var EVENT_DATE_STATUS_PERIOD_MAP = {
|
|
608
621
|
["Today" /* TODAY */]: [
|
|
609
622
|
"Started" /* STARTED */,
|
|
@@ -795,7 +808,7 @@ function sortDatesChronologically(dates) {
|
|
|
795
808
|
var futureTimePeriods = FUTURE_EVENT_DATE_STATUSES.filter(
|
|
796
809
|
(status) => status !== "Starting_Soon" /* STARTING_SOON */
|
|
797
810
|
).map((status) => ({
|
|
798
|
-
label: status
|
|
811
|
+
label: EVENT_DATE_STATUS_LABELS[status],
|
|
799
812
|
value: status
|
|
800
813
|
}));
|
|
801
814
|
|
|
@@ -1409,19 +1422,6 @@ var SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
|
1409
1422
|
|
|
1410
1423
|
// src/calendar/eventCalendar.ts
|
|
1411
1424
|
import dayjs3 from "dayjs";
|
|
1412
|
-
var EVENT_DATE_STATUS_LABELS = {
|
|
1413
|
-
["Starting_Soon" /* STARTING_SOON */]: "Starting Soon",
|
|
1414
|
-
["Started" /* STARTED */]: "Started",
|
|
1415
|
-
["Today" /* TODAY */]: "Today",
|
|
1416
|
-
["Tomorrow" /* TOMORROW */]: "Tomorrow",
|
|
1417
|
-
["This_Week" /* THIS_WEEK */]: "This Week",
|
|
1418
|
-
["Next_Week" /* NEXT_WEEK */]: "Next Week",
|
|
1419
|
-
["Upcoming" /* UPCOMING */]: "Upcoming",
|
|
1420
|
-
["Ended" /* ENDED */]: "Ended",
|
|
1421
|
-
["Rescheduled" /* RE_SCHEDULED */]: "Rescheduled",
|
|
1422
|
-
["Canceled" /* CANCELED */]: "Canceled",
|
|
1423
|
-
["Invalid" /* INVALID */]: "Invalid"
|
|
1424
|
-
};
|
|
1425
1425
|
function toCalendarIsoDate(startDate) {
|
|
1426
1426
|
const formatted = dayjs3(startDate, dateFormat).format("YYYY-MM-DD");
|
|
1427
1427
|
return dayjs3(formatted, "YYYY-MM-DD", true).isValid() ? formatted : null;
|