@timardex/cluemart-shared 2.3.20 → 2.4.0
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/{ad-8hhGHx6J.d.mts → ad-BSyVGv8q.d.mts} +16 -23
- package/dist/{ad-6lcjOj3X.d.ts → ad-DRI2CIzV.d.ts} +16 -23
- package/dist/{chunk-ZZXSAQM6.mjs → chunk-2RHUGVV3.mjs} +114 -122
- package/dist/chunk-2RHUGVV3.mjs.map +1 -0
- package/dist/{chunk-HKTBJOB7.mjs → chunk-J72IMZ6E.mjs} +13 -1
- package/dist/chunk-J72IMZ6E.mjs.map +1 -0
- package/dist/{chunk-PBW5K54C.mjs → chunk-LEAXY4DI.mjs} +2 -2
- package/dist/{chunk-KMS64DE2.mjs → chunk-LHKJJ7SO.mjs} +2 -2
- package/dist/{chunk-5AAYX364.mjs → chunk-WWAHS5R2.mjs} +1 -10
- package/dist/chunk-WWAHS5R2.mjs.map +1 -0
- package/dist/{chunk-DV3K3JDE.mjs → chunk-ZECVZFK3.mjs} +7 -6
- package/dist/chunk-ZECVZFK3.mjs.map +1 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +4 -4
- package/dist/graphql/index.cjs +122 -129
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +21 -4
- package/dist/graphql/index.d.ts +21 -4
- package/dist/graphql/index.mjs +7 -5
- package/dist/hooks/index.cjs +25 -51
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +6 -6
- package/dist/index.cjs +141 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +50 -25
- package/dist/index.d.ts +50 -25
- package/dist/index.mjs +122 -127
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.mjs +2 -2
- package/dist/types/index.cjs +0 -10
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -3
- package/dist/utils/index.cjs +19 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +16 -1
- package/dist/utils/index.d.ts +16 -1
- package/dist/utils/index.mjs +11 -3
- package/package.json +1 -1
- package/dist/chunk-5AAYX364.mjs.map +0 -1
- package/dist/chunk-DV3K3JDE.mjs.map +0 -1
- package/dist/chunk-HKTBJOB7.mjs.map +0 -1
- package/dist/chunk-ZZXSAQM6.mjs.map +0 -1
- /package/dist/{chunk-PBW5K54C.mjs.map → chunk-LEAXY4DI.mjs.map} +0 -0
- /package/dist/{chunk-KMS64DE2.mjs.map → chunk-LHKJJ7SO.mjs.map} +0 -0
package/dist/utils/index.cjs
CHANGED
|
@@ -50,6 +50,7 @@ __export(utils_exports, {
|
|
|
50
50
|
IOS_URL: () => IOS_URL,
|
|
51
51
|
MANUAL_DATE_STATUSES: () => MANUAL_DATE_STATUSES,
|
|
52
52
|
NETWORK_USER_FACING_ERROR: () => NETWORK_USER_FACING_ERROR,
|
|
53
|
+
NZ_TZ: () => NZ_TZ,
|
|
53
54
|
PRESERVED_RELATION_DATE_STATUSES: () => PRESERVED_RELATION_DATE_STATUSES,
|
|
54
55
|
PostTypeLabels: () => PostTypeLabels,
|
|
55
56
|
SCHOOL_MAX_STUDENT_COUNT: () => SCHOOL_MAX_STUDENT_COUNT,
|
|
@@ -123,7 +124,9 @@ __export(utils_exports, {
|
|
|
123
124
|
isIsoDateString: () => isIsoDateString,
|
|
124
125
|
isResourceImageActive: () => isResourceImageActive,
|
|
125
126
|
isTransientNetworkError: () => isTransientNetworkError,
|
|
127
|
+
isUtcMidnight: () => isUtcMidnight,
|
|
126
128
|
isValidIrdNumber: () => isValidIrdNumber,
|
|
129
|
+
isoDateFormat: () => isoDateFormat,
|
|
127
130
|
licenseNiceNames: () => licenseNiceNames,
|
|
128
131
|
mapArrayToOptions: () => mapArrayToOptions,
|
|
129
132
|
matchesCategory: () => matchesCategory,
|
|
@@ -131,6 +134,7 @@ __export(utils_exports, {
|
|
|
131
134
|
normalizeIrdNumber: () => normalizeIrdNumber,
|
|
132
135
|
normalizeResourceImage: () => normalizeResourceImage,
|
|
133
136
|
normalizeUrl: () => normalizeUrl,
|
|
137
|
+
nzDayKey: () => nzDayKey,
|
|
134
138
|
nzStartOfDay: () => nzStartOfDay,
|
|
135
139
|
paymentMethodOptions: () => paymentMethodOptions,
|
|
136
140
|
relationHasSelectedDate: () => relationHasSelectedDate,
|
|
@@ -309,6 +313,7 @@ var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
|
309
313
|
// src/utils/dateFormats.ts
|
|
310
314
|
var dateFormat = "DD-MM-YYYY";
|
|
311
315
|
var timeFormat = "HH:mm";
|
|
316
|
+
var isoDateFormat = "YYYY-MM-DD";
|
|
312
317
|
|
|
313
318
|
// src/utils/eventDateStatus.ts
|
|
314
319
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -456,6 +461,13 @@ function nzStartOfDay(input) {
|
|
|
456
461
|
}
|
|
457
462
|
return import_dayjs2.default.tz(input, NZ_TZ).startOf("day");
|
|
458
463
|
}
|
|
464
|
+
function nzDayKey(input) {
|
|
465
|
+
const day = input == null ? (0, import_dayjs2.default)().tz(NZ_TZ).format(isoDateFormat) : import_dayjs2.default.tz(input, NZ_TZ).format(isoDateFormat);
|
|
466
|
+
return /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
467
|
+
}
|
|
468
|
+
function isUtcMidnight(value) {
|
|
469
|
+
return value instanceof Date && !Number.isNaN(value.getTime()) && value.getUTCHours() === 0 && value.getUTCMinutes() === 0 && value.getUTCSeconds() === 0 && value.getUTCMilliseconds() === 0;
|
|
470
|
+
}
|
|
459
471
|
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
460
472
|
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
461
473
|
const dateTime = timeStr ? (0, import_dayjs2.default)(dateTimeStr, `${dateFormat} ${timeFormat}`) : (0, import_dayjs2.default)(dateStr, dateFormat);
|
|
@@ -942,11 +954,11 @@ function sumUserOverallPoints(points) {
|
|
|
942
954
|
// src/calendar/eventCalendar.ts
|
|
943
955
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
944
956
|
function toCalendarIsoDate(startDate) {
|
|
945
|
-
const formatted = (0, import_dayjs3.default)(startDate, dateFormat).format(
|
|
946
|
-
return (0, import_dayjs3.default)(formatted,
|
|
957
|
+
const formatted = (0, import_dayjs3.default)(startDate, dateFormat).format(isoDateFormat);
|
|
958
|
+
return (0, import_dayjs3.default)(formatted, isoDateFormat, true).isValid() ? formatted : null;
|
|
947
959
|
}
|
|
948
960
|
function fromCalendarIsoDate(isoDate) {
|
|
949
|
-
return (0, import_dayjs3.default)(isoDate,
|
|
961
|
+
return (0, import_dayjs3.default)(isoDate, isoDateFormat).format(dateFormat);
|
|
950
962
|
}
|
|
951
963
|
function getEventCalendarIsoDates(dateTimes) {
|
|
952
964
|
return dateTimes?.map(
|
|
@@ -2565,6 +2577,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2565
2577
|
IOS_URL,
|
|
2566
2578
|
MANUAL_DATE_STATUSES,
|
|
2567
2579
|
NETWORK_USER_FACING_ERROR,
|
|
2580
|
+
NZ_TZ,
|
|
2568
2581
|
PRESERVED_RELATION_DATE_STATUSES,
|
|
2569
2582
|
PostTypeLabels,
|
|
2570
2583
|
SCHOOL_MAX_STUDENT_COUNT,
|
|
@@ -2638,7 +2651,9 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2638
2651
|
isIsoDateString,
|
|
2639
2652
|
isResourceImageActive,
|
|
2640
2653
|
isTransientNetworkError,
|
|
2654
|
+
isUtcMidnight,
|
|
2641
2655
|
isValidIrdNumber,
|
|
2656
|
+
isoDateFormat,
|
|
2642
2657
|
licenseNiceNames,
|
|
2643
2658
|
mapArrayToOptions,
|
|
2644
2659
|
matchesCategory,
|
|
@@ -2646,6 +2661,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2646
2661
|
normalizeIrdNumber,
|
|
2647
2662
|
normalizeResourceImage,
|
|
2648
2663
|
normalizeUrl,
|
|
2664
|
+
nzDayKey,
|
|
2649
2665
|
nzStartOfDay,
|
|
2650
2666
|
paymentMethodOptions,
|
|
2651
2667
|
relationHasSelectedDate,
|