@timardex/cluemart-shared 1.5.503 → 1.5.505
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-KEUG6IHV.mjs → chunk-UA64PDR4.mjs} +2 -2
- package/dist/{chunk-P7FGPPWG.mjs → chunk-VJIFUOVU.mjs} +19 -16
- package/dist/chunk-VJIFUOVU.mjs.map +1 -0
- package/dist/formFields/index.cjs +3 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/hooks/index.cjs +3 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +18 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.mjs +17 -14
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +54 -52
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +14 -11
- package/dist/utils/index.d.ts +14 -11
- package/dist/utils/index.mjs +3 -1
- package/package.json +1 -1
- package/dist/chunk-P7FGPPWG.mjs.map +0 -1
- /package/dist/{chunk-KEUG6IHV.mjs.map → chunk-UA64PDR4.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldValues, Control, FormState, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
2
|
import * as _apollo_client from '@apollo/client';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
3
4
|
|
|
4
5
|
declare enum EnumInviteStatus {
|
|
5
6
|
ACCEPTED = "Accepted",
|
|
@@ -2444,7 +2445,7 @@ declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
|
2444
2445
|
|
|
2445
2446
|
declare const dateFormat = "DD-MM-YYYY";
|
|
2446
2447
|
declare const timeFormat = "HH:mm";
|
|
2447
|
-
declare function toNZTime(date
|
|
2448
|
+
declare function toNZTime(date?: Date | string): dayjs.Dayjs;
|
|
2448
2449
|
type DateFormat = "date" | "time" | "datetime";
|
|
2449
2450
|
/**
|
|
2450
2451
|
* Format a date string to a more readable format.
|
|
@@ -2463,6 +2464,17 @@ declare const isFutureDatesBeforeThreshold: (date: {
|
|
|
2463
2464
|
startTime: string;
|
|
2464
2465
|
}, minHoursFromNow: number) => boolean;
|
|
2465
2466
|
declare const formatTimestamp: (timestamp: string) => string;
|
|
2467
|
+
declare const isIsoDateString: (value: unknown) => value is string;
|
|
2468
|
+
/**
|
|
2469
|
+
* Sort an array of date strings by their proximity to the current date.
|
|
2470
|
+
* @param dates - The array of date strings to sort.
|
|
2471
|
+
* @returns - The sorted array of date strings.
|
|
2472
|
+
*/
|
|
2473
|
+
declare function sortDatesChronologically<T extends {
|
|
2474
|
+
startDate: string;
|
|
2475
|
+
startTime: string;
|
|
2476
|
+
}>(dates: T[]): T[];
|
|
2477
|
+
|
|
2466
2478
|
declare const removeTypename: (obj: any) => any;
|
|
2467
2479
|
/**
|
|
2468
2480
|
* Truncate text to a specified length and append ellipsis if necessary.
|
|
@@ -2482,15 +2494,6 @@ declare const statusOptions: {
|
|
|
2482
2494
|
label: EnumInviteStatus;
|
|
2483
2495
|
value: EnumInviteStatus;
|
|
2484
2496
|
}[];
|
|
2485
|
-
/**
|
|
2486
|
-
* Sort an array of date strings by their proximity to the current date.
|
|
2487
|
-
* @param dates - The array of date strings to sort.
|
|
2488
|
-
* @returns - The sorted array of date strings.
|
|
2489
|
-
*/
|
|
2490
|
-
declare function sortDatesChronologically<T extends {
|
|
2491
|
-
startDate: string;
|
|
2492
|
-
startTime: string;
|
|
2493
|
-
}>(dates: T[]): T[];
|
|
2494
2497
|
declare const availableRegionTypes: EnumRegions[];
|
|
2495
2498
|
declare const availableRegionOptions: OptionItem[];
|
|
2496
2499
|
declare const paymentMethodOptions: OptionItem[];
|
|
@@ -2500,4 +2503,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2500
2503
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2501
2504
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2502
2505
|
|
|
2503
|
-
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2506
|
+
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, isIsoDateString, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldValues, Control, FormState, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
2
|
import * as _apollo_client from '@apollo/client';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
3
4
|
|
|
4
5
|
declare enum EnumInviteStatus {
|
|
5
6
|
ACCEPTED = "Accepted",
|
|
@@ -2444,7 +2445,7 @@ declare function computeDailyClueState(dailyClue: DailyClueGameData): {
|
|
|
2444
2445
|
|
|
2445
2446
|
declare const dateFormat = "DD-MM-YYYY";
|
|
2446
2447
|
declare const timeFormat = "HH:mm";
|
|
2447
|
-
declare function toNZTime(date
|
|
2448
|
+
declare function toNZTime(date?: Date | string): dayjs.Dayjs;
|
|
2448
2449
|
type DateFormat = "date" | "time" | "datetime";
|
|
2449
2450
|
/**
|
|
2450
2451
|
* Format a date string to a more readable format.
|
|
@@ -2463,6 +2464,17 @@ declare const isFutureDatesBeforeThreshold: (date: {
|
|
|
2463
2464
|
startTime: string;
|
|
2464
2465
|
}, minHoursFromNow: number) => boolean;
|
|
2465
2466
|
declare const formatTimestamp: (timestamp: string) => string;
|
|
2467
|
+
declare const isIsoDateString: (value: unknown) => value is string;
|
|
2468
|
+
/**
|
|
2469
|
+
* Sort an array of date strings by their proximity to the current date.
|
|
2470
|
+
* @param dates - The array of date strings to sort.
|
|
2471
|
+
* @returns - The sorted array of date strings.
|
|
2472
|
+
*/
|
|
2473
|
+
declare function sortDatesChronologically<T extends {
|
|
2474
|
+
startDate: string;
|
|
2475
|
+
startTime: string;
|
|
2476
|
+
}>(dates: T[]): T[];
|
|
2477
|
+
|
|
2466
2478
|
declare const removeTypename: (obj: any) => any;
|
|
2467
2479
|
/**
|
|
2468
2480
|
* Truncate text to a specified length and append ellipsis if necessary.
|
|
@@ -2482,15 +2494,6 @@ declare const statusOptions: {
|
|
|
2482
2494
|
label: EnumInviteStatus;
|
|
2483
2495
|
value: EnumInviteStatus;
|
|
2484
2496
|
}[];
|
|
2485
|
-
/**
|
|
2486
|
-
* Sort an array of date strings by their proximity to the current date.
|
|
2487
|
-
* @param dates - The array of date strings to sort.
|
|
2488
|
-
* @returns - The sorted array of date strings.
|
|
2489
|
-
*/
|
|
2490
|
-
declare function sortDatesChronologically<T extends {
|
|
2491
|
-
startDate: string;
|
|
2492
|
-
startTime: string;
|
|
2493
|
-
}>(dates: T[]): T[];
|
|
2494
2497
|
declare const availableRegionTypes: EnumRegions[];
|
|
2495
2498
|
declare const availableRegionOptions: OptionItem[];
|
|
2496
2499
|
declare const paymentMethodOptions: OptionItem[];
|
|
@@ -2500,4 +2503,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
|
|
|
2500
2503
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
2501
2504
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
2502
2505
|
|
|
2503
|
-
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2506
|
+
export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, isIsoDateString, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.mjs
CHANGED
|
@@ -618,7 +618,7 @@ function computeDailyClueState(dailyClue) {
|
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
// src/utils/
|
|
621
|
+
// src/utils/date.ts
|
|
622
622
|
import dayjs2 from "dayjs";
|
|
623
623
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
624
624
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
|
|
@@ -632,7 +632,7 @@ dayjs2.extend(timezone);
|
|
|
632
632
|
dayjs2.extend(isSameOrAfter);
|
|
633
633
|
var NZ_TZ = "Pacific/Auckland";
|
|
634
634
|
function toNZTime(date3) {
|
|
635
|
-
return dayjs2(date3).tz(NZ_TZ).
|
|
635
|
+
return date3 ? dayjs2(date3).tz(NZ_TZ) : dayjs2().tz(NZ_TZ);
|
|
636
636
|
}
|
|
637
637
|
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
638
638
|
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
@@ -669,12 +669,25 @@ var isFutureDatesBeforeThreshold = (date3, minHoursFromNow) => {
|
|
|
669
669
|
return dateTime.isSameOrAfter(threshold);
|
|
670
670
|
};
|
|
671
671
|
var formatTimestamp = (timestamp) => {
|
|
672
|
-
const formattedDate =
|
|
672
|
+
const formattedDate = toNZTime(timestamp).format(dateFormat);
|
|
673
673
|
return formatDate(formattedDate, "date");
|
|
674
674
|
};
|
|
675
675
|
var isIsoDateString = (value) => {
|
|
676
676
|
return typeof value === "string" && !isNaN(Date.parse(value));
|
|
677
677
|
};
|
|
678
|
+
function sortDatesChronologically(dates) {
|
|
679
|
+
if (!dates || !dates.length) {
|
|
680
|
+
return [];
|
|
681
|
+
}
|
|
682
|
+
return [...dates].sort((a, b) => {
|
|
683
|
+
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
684
|
+
const dateA = dayjs2(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
685
|
+
const dateB = dayjs2(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
686
|
+
return dateA.valueOf() - dateB.valueOf();
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// src/utils/utils.ts
|
|
678
691
|
var removeTypename = (obj) => {
|
|
679
692
|
if (obj instanceof Date) {
|
|
680
693
|
return obj;
|
|
@@ -714,17 +727,6 @@ var statusOptions = [
|
|
|
714
727
|
})).sort((a, b) => a.label.localeCompare(b.label))
|
|
715
728
|
// Sort the options alphabetically
|
|
716
729
|
];
|
|
717
|
-
function sortDatesChronologically(dates) {
|
|
718
|
-
if (!dates || !dates.length) {
|
|
719
|
-
return [];
|
|
720
|
-
}
|
|
721
|
-
return [...dates].sort((a, b) => {
|
|
722
|
-
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
723
|
-
const dateA = dayjs2(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
724
|
-
const dateB = dayjs2(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
725
|
-
return dateA.valueOf() - dateB.valueOf();
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
730
|
var availableRegionTypes = Object.values(EnumRegions);
|
|
729
731
|
var availableRegionOptions = mapArrayToOptions(availableRegionTypes);
|
|
730
732
|
var paymentMethodOptions = mapArrayToOptions(
|
|
@@ -7993,6 +7995,7 @@ export {
|
|
|
7993
7995
|
getCurrentAndFutureDates,
|
|
7994
7996
|
globalDefaultValues,
|
|
7995
7997
|
isFutureDatesBeforeThreshold,
|
|
7998
|
+
isIsoDateString,
|
|
7996
7999
|
licenseNiceNames,
|
|
7997
8000
|
lightColors,
|
|
7998
8001
|
loginFields,
|