@timardex/cluemart-shared 1.5.793 → 1.5.795
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-RBIYRMQB.mjs → chunk-B2ID4C66.mjs} +147 -5
- package/dist/chunk-B2ID4C66.mjs.map +1 -0
- package/dist/{chunk-P2YIB4MR.mjs → chunk-E7ZEBZ3O.mjs} +104 -231
- package/dist/chunk-E7ZEBZ3O.mjs.map +1 -0
- package/dist/{chunk-7TMY5XDJ.mjs → chunk-JD7CKX4S.mjs} +2 -2
- package/dist/{chunk-AM6MIXMX.mjs → chunk-KSFDYCSS.mjs} +2 -2
- package/dist/formFields/index.cjs +20 -18
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/hooks/index.cjs +22 -20
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +11 -11
- package/dist/index.cjs +167 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +166 -154
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +104 -317
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.mjs +2 -3
- package/dist/utils/index.cjs +167 -154
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +8 -8
- package/dist/utils/index.d.ts +8 -8
- package/dist/utils/index.mjs +26 -24
- package/package.json +1 -1
- package/dist/chunk-P2YIB4MR.mjs.map +0 -1
- package/dist/chunk-RBIYRMQB.mjs.map +0 -1
- /package/dist/{chunk-7TMY5XDJ.mjs.map → chunk-JD7CKX4S.mjs.map} +0 -0
- /package/dist/{chunk-AM6MIXMX.mjs.map → chunk-KSFDYCSS.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -3035,6 +3035,11 @@ declare const futureTimePeriods: {
|
|
|
3035
3035
|
value: string;
|
|
3036
3036
|
}[];
|
|
3037
3037
|
|
|
3038
|
+
/**
|
|
3039
|
+
* Convert an array of strings to an array of objects with label and value properties.
|
|
3040
|
+
*/
|
|
3041
|
+
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
3042
|
+
|
|
3038
3043
|
declare const removeTypename: (obj: any) => any;
|
|
3039
3044
|
/**
|
|
3040
3045
|
* Truncate text to a specified length and append ellipsis if necessary.
|
|
@@ -3043,12 +3048,6 @@ declare const removeTypename: (obj: any) => any;
|
|
|
3043
3048
|
* @returns
|
|
3044
3049
|
*/
|
|
3045
3050
|
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
3046
|
-
/**
|
|
3047
|
-
* Convert an array of strings to an array of objects with label and value properties.
|
|
3048
|
-
* @param items - The array of strings to convert.
|
|
3049
|
-
* @returns - The converted array of objects.
|
|
3050
|
-
*/
|
|
3051
|
-
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
3052
3051
|
declare const capitalizeFirstLetter: (str: string) => string;
|
|
3053
3052
|
declare const statusOptions: {
|
|
3054
3053
|
label: EnumInviteStatus;
|
|
@@ -3074,6 +3073,7 @@ declare const PostTypeLabels: Record<EnumPostType, string>;
|
|
|
3074
3073
|
declare const CM_SCHOOL_PROMO_CODE = "CM-SCHOOL";
|
|
3075
3074
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated affiliate referral code). */
|
|
3076
3075
|
declare const CM_AFFILIATE_PROMO_CODE = "CM-AFFILIATE";
|
|
3076
|
+
declare function formatNZBankAccount(input: string): string;
|
|
3077
3077
|
|
|
3078
3078
|
declare const AFFILIATE_REWARDS: {
|
|
3079
3079
|
NEW_EVENT_REGISTRATION: {
|
|
@@ -3191,4 +3191,4 @@ declare function getVendorEventRelationStartDates(events: EventListItemType[] |
|
|
|
3191
3191
|
declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
|
|
3192
3192
|
declare function getVendorEventsEmptyMessage(): string;
|
|
3193
3193
|
|
|
3194
|
-
export { AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateReward, type AffiliateType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, 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 CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as 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, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, 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, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasMatchingEventDate, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, 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, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
3194
|
+
export { AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateReward, type AffiliateType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, 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 CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as 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, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, 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, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasMatchingEventDate, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, 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, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.d.ts
CHANGED
|
@@ -3035,6 +3035,11 @@ declare const futureTimePeriods: {
|
|
|
3035
3035
|
value: string;
|
|
3036
3036
|
}[];
|
|
3037
3037
|
|
|
3038
|
+
/**
|
|
3039
|
+
* Convert an array of strings to an array of objects with label and value properties.
|
|
3040
|
+
*/
|
|
3041
|
+
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
3042
|
+
|
|
3038
3043
|
declare const removeTypename: (obj: any) => any;
|
|
3039
3044
|
/**
|
|
3040
3045
|
* Truncate text to a specified length and append ellipsis if necessary.
|
|
@@ -3043,12 +3048,6 @@ declare const removeTypename: (obj: any) => any;
|
|
|
3043
3048
|
* @returns
|
|
3044
3049
|
*/
|
|
3045
3050
|
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
3046
|
-
/**
|
|
3047
|
-
* Convert an array of strings to an array of objects with label and value properties.
|
|
3048
|
-
* @param items - The array of strings to convert.
|
|
3049
|
-
* @returns - The converted array of objects.
|
|
3050
|
-
*/
|
|
3051
|
-
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
3052
3051
|
declare const capitalizeFirstLetter: (str: string) => string;
|
|
3053
3052
|
declare const statusOptions: {
|
|
3054
3053
|
label: EnumInviteStatus;
|
|
@@ -3074,6 +3073,7 @@ declare const PostTypeLabels: Record<EnumPostType, string>;
|
|
|
3074
3073
|
declare const CM_SCHOOL_PROMO_CODE = "CM-SCHOOL";
|
|
3075
3074
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated affiliate referral code). */
|
|
3076
3075
|
declare const CM_AFFILIATE_PROMO_CODE = "CM-AFFILIATE";
|
|
3076
|
+
declare function formatNZBankAccount(input: string): string;
|
|
3077
3077
|
|
|
3078
3078
|
declare const AFFILIATE_REWARDS: {
|
|
3079
3079
|
NEW_EVENT_REGISTRATION: {
|
|
@@ -3191,4 +3191,4 @@ declare function getVendorEventRelationStartDates(events: EventListItemType[] |
|
|
|
3191
3191
|
declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
|
|
3192
3192
|
declare function getVendorEventsEmptyMessage(): string;
|
|
3193
3193
|
|
|
3194
|
-
export { AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateReward, type AffiliateType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, 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 CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as 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, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, 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, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasMatchingEventDate, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, 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, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
3194
|
+
export { AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateReward, type AffiliateType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, 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 CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, type MarketingMaterialRequestInputType, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RedeemRewardInput, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as 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, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, 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, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasMatchingEventDate, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, 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, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.mjs
CHANGED
|
@@ -562,6 +562,163 @@ import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
|
|
|
562
562
|
import timezone from "dayjs/plugin/timezone.js";
|
|
563
563
|
import utc from "dayjs/plugin/utc.js";
|
|
564
564
|
|
|
565
|
+
// src/utils/mapArrayToOptions.ts
|
|
566
|
+
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
567
|
+
label: item,
|
|
568
|
+
value: item
|
|
569
|
+
}));
|
|
570
|
+
|
|
571
|
+
// src/utils/date.ts
|
|
572
|
+
var dateFormat = "DD-MM-YYYY";
|
|
573
|
+
var timeFormat = "HH:mm";
|
|
574
|
+
dayjs.extend(customParseFormat);
|
|
575
|
+
dayjs.extend(utc);
|
|
576
|
+
dayjs.extend(timezone);
|
|
577
|
+
dayjs.extend(isSameOrAfter);
|
|
578
|
+
var NZ_TZ = "Pacific/Auckland";
|
|
579
|
+
function toNZTime(date) {
|
|
580
|
+
return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);
|
|
581
|
+
}
|
|
582
|
+
function nzStartOfDay(input) {
|
|
583
|
+
if (input == null) {
|
|
584
|
+
return dayjs().tz(NZ_TZ).startOf("day");
|
|
585
|
+
}
|
|
586
|
+
return dayjs.tz(input, NZ_TZ).startOf("day");
|
|
587
|
+
}
|
|
588
|
+
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
589
|
+
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
590
|
+
const dateTime = timeStr ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs(dateStr, dateFormat);
|
|
591
|
+
const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
|
|
592
|
+
const formattedTime = dateTime.format("h:mm a");
|
|
593
|
+
switch (display) {
|
|
594
|
+
case "date":
|
|
595
|
+
return formattedDate;
|
|
596
|
+
case "time":
|
|
597
|
+
return formattedTime;
|
|
598
|
+
case "datetime":
|
|
599
|
+
return `${formattedDate} at ${formattedTime}`;
|
|
600
|
+
default:
|
|
601
|
+
return formattedDate;
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
var getCurrentAndFutureDates = (dates) => {
|
|
605
|
+
const now = dayjs();
|
|
606
|
+
return dates.filter((dateObj) => {
|
|
607
|
+
const dateTime = dayjs(
|
|
608
|
+
`${dateObj.startDate} ${dateObj.startTime}`,
|
|
609
|
+
`${dateFormat} ${timeFormat}`
|
|
610
|
+
);
|
|
611
|
+
return dateTime.isSameOrAfter(now);
|
|
612
|
+
});
|
|
613
|
+
};
|
|
614
|
+
var isFutureDatesBeforeThreshold = (date, minHoursFromNow) => {
|
|
615
|
+
const threshold = minHoursFromNow ? dayjs().add(minHoursFromNow, "hour") : dayjs().startOf("day");
|
|
616
|
+
const dateTime = dayjs(
|
|
617
|
+
`${date.startDate} ${date.startTime}`,
|
|
618
|
+
`${dateFormat} ${timeFormat}`
|
|
619
|
+
);
|
|
620
|
+
return dateTime.isSameOrAfter(threshold);
|
|
621
|
+
};
|
|
622
|
+
var formatTimestamp = (timestamp) => {
|
|
623
|
+
const formattedDate = toNZTime(timestamp).format(dateFormat);
|
|
624
|
+
return formatDate(formattedDate, "date");
|
|
625
|
+
};
|
|
626
|
+
var isIsoDateString = (value) => {
|
|
627
|
+
return typeof value === "string" && !Number.isNaN(Date.parse(value));
|
|
628
|
+
};
|
|
629
|
+
function sortDatesChronologically(dates) {
|
|
630
|
+
if (!dates?.length) {
|
|
631
|
+
return [];
|
|
632
|
+
}
|
|
633
|
+
return [...dates].sort((a, b) => {
|
|
634
|
+
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
635
|
+
const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
636
|
+
const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
637
|
+
return dateA.valueOf() - dateB.valueOf();
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
var futureTimePeriods = mapArrayToOptions(
|
|
641
|
+
Object.values(EnumEventDateStatus)
|
|
642
|
+
).filter(
|
|
643
|
+
(period) => period.value !== "Starting_Soon" /* STARTING_SOON */ && period.value !== "Canceled" /* CANCELED */ && period.value !== "Rescheduled" /* RE_SCHEDULED */ && period.value !== "Started" /* STARTED */ && period.value !== "Ended" /* ENDED */ && period.value !== "Invalid" /* INVALID */
|
|
644
|
+
).map((period) => ({
|
|
645
|
+
label: period.value.replaceAll("_", " "),
|
|
646
|
+
value: period.value
|
|
647
|
+
}));
|
|
648
|
+
|
|
649
|
+
// src/utils/dailyClueGame.ts
|
|
650
|
+
function createSeededRng(seed) {
|
|
651
|
+
let t = seed >>> 0;
|
|
652
|
+
return function random() {
|
|
653
|
+
t += 1831565813;
|
|
654
|
+
let x = t;
|
|
655
|
+
x = Math.imul(x ^ x >>> 15, x | 1);
|
|
656
|
+
x ^= x + Math.imul(x ^ x >>> 7, x | 61);
|
|
657
|
+
return ((x ^ x >>> 14) >>> 0) / 4294967296;
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
function hashStringToNumber(seed) {
|
|
661
|
+
let hash = 2166136261;
|
|
662
|
+
for (let i = 0; i < seed.length; i++) {
|
|
663
|
+
hash ^= seed.codePointAt(i) ?? 0;
|
|
664
|
+
hash = Math.imul(hash, 16777619);
|
|
665
|
+
}
|
|
666
|
+
return hash >>> 0;
|
|
667
|
+
}
|
|
668
|
+
function seededShuffle(array, seed) {
|
|
669
|
+
const rng = createSeededRng(hashStringToNumber(seed));
|
|
670
|
+
const result = [...array];
|
|
671
|
+
for (let i = result.length - 1; i > 0; i--) {
|
|
672
|
+
const j = Math.floor(rng() * (i + 1));
|
|
673
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
674
|
+
}
|
|
675
|
+
return result;
|
|
676
|
+
}
|
|
677
|
+
function getDayIndex(start, today) {
|
|
678
|
+
return today.diff(start, "day");
|
|
679
|
+
}
|
|
680
|
+
function computeDailyClueState(dailyClue) {
|
|
681
|
+
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
682
|
+
const { solutionShuffled, collected } = dailyClue.letterInfo;
|
|
683
|
+
const today = nzStartOfDay();
|
|
684
|
+
const start = nzStartOfDay(startDate);
|
|
685
|
+
const end = nzStartOfDay(endDate);
|
|
686
|
+
if (today.isBefore(start)) {
|
|
687
|
+
return null;
|
|
688
|
+
}
|
|
689
|
+
const shuffledPlacements = seededShuffle(
|
|
690
|
+
gameScreenIdentifierList,
|
|
691
|
+
start.toISOString()
|
|
692
|
+
);
|
|
693
|
+
const index = getDayIndex(start, today);
|
|
694
|
+
if (today.isAfter(end)) {
|
|
695
|
+
return {
|
|
696
|
+
todaysClue: null,
|
|
697
|
+
todaysLetter: null,
|
|
698
|
+
todaysPlacement: null
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
if (index < 0 || index >= solutionShuffled.length || index >= shuffledPlacements.length) {
|
|
702
|
+
return null;
|
|
703
|
+
}
|
|
704
|
+
const letterToday = solutionShuffled[index];
|
|
705
|
+
const placement = shuffledPlacements[index];
|
|
706
|
+
if (!letterToday || !placement) return null;
|
|
707
|
+
const alreadyCollectedToday = (collected ?? []).includes(letterToday);
|
|
708
|
+
if (alreadyCollectedToday) {
|
|
709
|
+
return {
|
|
710
|
+
todaysClue: null,
|
|
711
|
+
todaysLetter: null,
|
|
712
|
+
todaysPlacement: null
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
return {
|
|
716
|
+
todaysClue: placement.clue,
|
|
717
|
+
todaysLetter: letterToday,
|
|
718
|
+
todaysPlacement: placement.id
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
|
|
565
722
|
// src/sharing/relationShareTypes.ts
|
|
566
723
|
var RELATION_SHARE_INVITATION = "invitation";
|
|
567
724
|
var RELATION_SHARE_APPLICATION = "application";
|
|
@@ -846,10 +1003,6 @@ var truncateText = (text, maxLength = 30) => {
|
|
|
846
1003
|
const result = stripOverlaySubtitleSpecialChars(text);
|
|
847
1004
|
return result.length > maxLength ? result.substring(0, maxLength) + "..." : result;
|
|
848
1005
|
};
|
|
849
|
-
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
850
|
-
label: item,
|
|
851
|
-
value: item
|
|
852
|
-
}));
|
|
853
1006
|
var capitalizeFirstLetter = (str) => {
|
|
854
1007
|
return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
855
1008
|
};
|
|
@@ -926,156 +1079,14 @@ var PostTypeLabels = {
|
|
|
926
1079
|
};
|
|
927
1080
|
var CM_SCHOOL_PROMO_CODE = `${PROMO_CODE_PREFIX}SCHOOL`;
|
|
928
1081
|
var CM_AFFILIATE_PROMO_CODE = `${PROMO_CODE_PREFIX}AFFILIATE`;
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
var NZ_TZ = "Pacific/Auckland";
|
|
938
|
-
function toNZTime(date) {
|
|
939
|
-
return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);
|
|
940
|
-
}
|
|
941
|
-
function nzStartOfDay(input) {
|
|
942
|
-
if (input == null) {
|
|
943
|
-
return dayjs().tz(NZ_TZ).startOf("day");
|
|
944
|
-
}
|
|
945
|
-
return dayjs.tz(input, NZ_TZ).startOf("day");
|
|
946
|
-
}
|
|
947
|
-
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
948
|
-
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
949
|
-
const dateTime = timeStr ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs(dateStr, dateFormat);
|
|
950
|
-
const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
|
|
951
|
-
const formattedTime = dateTime.format("h:mm a");
|
|
952
|
-
switch (display) {
|
|
953
|
-
case "date":
|
|
954
|
-
return formattedDate;
|
|
955
|
-
case "time":
|
|
956
|
-
return formattedTime;
|
|
957
|
-
case "datetime":
|
|
958
|
-
return `${formattedDate} at ${formattedTime}`;
|
|
959
|
-
default:
|
|
960
|
-
return formattedDate;
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
var getCurrentAndFutureDates = (dates) => {
|
|
964
|
-
const now = dayjs();
|
|
965
|
-
return dates.filter((dateObj) => {
|
|
966
|
-
const dateTime = dayjs(
|
|
967
|
-
`${dateObj.startDate} ${dateObj.startTime}`,
|
|
968
|
-
`${dateFormat} ${timeFormat}`
|
|
969
|
-
);
|
|
970
|
-
return dateTime.isSameOrAfter(now);
|
|
971
|
-
});
|
|
972
|
-
};
|
|
973
|
-
var isFutureDatesBeforeThreshold = (date, minHoursFromNow) => {
|
|
974
|
-
const threshold = minHoursFromNow ? dayjs().add(minHoursFromNow, "hour") : dayjs().startOf("day");
|
|
975
|
-
const dateTime = dayjs(
|
|
976
|
-
`${date.startDate} ${date.startTime}`,
|
|
977
|
-
`${dateFormat} ${timeFormat}`
|
|
978
|
-
);
|
|
979
|
-
return dateTime.isSameOrAfter(threshold);
|
|
980
|
-
};
|
|
981
|
-
var formatTimestamp = (timestamp) => {
|
|
982
|
-
const formattedDate = toNZTime(timestamp).format(dateFormat);
|
|
983
|
-
return formatDate(formattedDate, "date");
|
|
984
|
-
};
|
|
985
|
-
var isIsoDateString = (value) => {
|
|
986
|
-
return typeof value === "string" && !Number.isNaN(Date.parse(value));
|
|
987
|
-
};
|
|
988
|
-
function sortDatesChronologically(dates) {
|
|
989
|
-
if (!dates?.length) {
|
|
990
|
-
return [];
|
|
991
|
-
}
|
|
992
|
-
return [...dates].sort((a, b) => {
|
|
993
|
-
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
994
|
-
const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
995
|
-
const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
996
|
-
return dateA.valueOf() - dateB.valueOf();
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
|
-
var futureTimePeriods = mapArrayToOptions(
|
|
1000
|
-
Object.values(EnumEventDateStatus)
|
|
1001
|
-
).filter(
|
|
1002
|
-
(period) => period.value !== "Starting_Soon" /* STARTING_SOON */ && period.value !== "Canceled" /* CANCELED */ && period.value !== "Rescheduled" /* RE_SCHEDULED */ && period.value !== "Started" /* STARTED */ && period.value !== "Ended" /* ENDED */ && period.value !== "Invalid" /* INVALID */
|
|
1003
|
-
).map((period) => ({
|
|
1004
|
-
label: period.value.replaceAll("_", " "),
|
|
1005
|
-
value: period.value
|
|
1006
|
-
}));
|
|
1007
|
-
|
|
1008
|
-
// src/utils/dailyClueGame.ts
|
|
1009
|
-
function createSeededRng(seed) {
|
|
1010
|
-
let t = seed >>> 0;
|
|
1011
|
-
return function random() {
|
|
1012
|
-
t += 1831565813;
|
|
1013
|
-
let x = t;
|
|
1014
|
-
x = Math.imul(x ^ x >>> 15, x | 1);
|
|
1015
|
-
x ^= x + Math.imul(x ^ x >>> 7, x | 61);
|
|
1016
|
-
return ((x ^ x >>> 14) >>> 0) / 4294967296;
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
1019
|
-
function hashStringToNumber(seed) {
|
|
1020
|
-
let hash = 2166136261;
|
|
1021
|
-
for (let i = 0; i < seed.length; i++) {
|
|
1022
|
-
hash ^= seed.codePointAt(i) ?? 0;
|
|
1023
|
-
hash = Math.imul(hash, 16777619);
|
|
1024
|
-
}
|
|
1025
|
-
return hash >>> 0;
|
|
1026
|
-
}
|
|
1027
|
-
function seededShuffle(array, seed) {
|
|
1028
|
-
const rng = createSeededRng(hashStringToNumber(seed));
|
|
1029
|
-
const result = [...array];
|
|
1030
|
-
for (let i = result.length - 1; i > 0; i--) {
|
|
1031
|
-
const j = Math.floor(rng() * (i + 1));
|
|
1032
|
-
[result[i], result[j]] = [result[j], result[i]];
|
|
1033
|
-
}
|
|
1034
|
-
return result;
|
|
1035
|
-
}
|
|
1036
|
-
function getDayIndex(start, today) {
|
|
1037
|
-
return today.diff(start, "day");
|
|
1038
|
-
}
|
|
1039
|
-
function computeDailyClueState(dailyClue) {
|
|
1040
|
-
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
1041
|
-
const { solutionShuffled, collected } = dailyClue.letterInfo;
|
|
1042
|
-
const today = nzStartOfDay();
|
|
1043
|
-
const start = nzStartOfDay(startDate);
|
|
1044
|
-
const end = nzStartOfDay(endDate);
|
|
1045
|
-
if (today.isBefore(start)) {
|
|
1046
|
-
return null;
|
|
1047
|
-
}
|
|
1048
|
-
const shuffledPlacements = seededShuffle(
|
|
1049
|
-
gameScreenIdentifierList,
|
|
1050
|
-
start.toISOString()
|
|
1051
|
-
);
|
|
1052
|
-
const index = getDayIndex(start, today);
|
|
1053
|
-
if (today.isAfter(end)) {
|
|
1054
|
-
return {
|
|
1055
|
-
todaysClue: null,
|
|
1056
|
-
todaysLetter: null,
|
|
1057
|
-
todaysPlacement: null
|
|
1058
|
-
};
|
|
1059
|
-
}
|
|
1060
|
-
if (index < 0 || index >= solutionShuffled.length || index >= shuffledPlacements.length) {
|
|
1061
|
-
return null;
|
|
1062
|
-
}
|
|
1063
|
-
const letterToday = solutionShuffled[index];
|
|
1064
|
-
const placement = shuffledPlacements[index];
|
|
1065
|
-
if (!letterToday || !placement) return null;
|
|
1066
|
-
const alreadyCollectedToday = (collected ?? []).includes(letterToday);
|
|
1067
|
-
if (alreadyCollectedToday) {
|
|
1068
|
-
return {
|
|
1069
|
-
todaysClue: null,
|
|
1070
|
-
todaysLetter: null,
|
|
1071
|
-
todaysPlacement: null
|
|
1072
|
-
};
|
|
1073
|
-
}
|
|
1074
|
-
return {
|
|
1075
|
-
todaysClue: placement.clue,
|
|
1076
|
-
todaysLetter: letterToday,
|
|
1077
|
-
todaysPlacement: placement.id
|
|
1078
|
-
};
|
|
1082
|
+
function formatNZBankAccount(input) {
|
|
1083
|
+
const digitsOnly = input.replaceAll(/\D/g, "");
|
|
1084
|
+
const parts = [];
|
|
1085
|
+
if (digitsOnly.length > 0) parts.push(digitsOnly.slice(0, 2));
|
|
1086
|
+
if (digitsOnly.length > 2) parts.push(digitsOnly.slice(2, 6));
|
|
1087
|
+
if (digitsOnly.length > 6) parts.push(digitsOnly.slice(6, 13));
|
|
1088
|
+
if (digitsOnly.length > 13) parts.push(digitsOnly.slice(13, 15));
|
|
1089
|
+
return parts.join("-");
|
|
1079
1090
|
}
|
|
1080
1091
|
|
|
1081
1092
|
// src/utils/affiliate.ts
|
|
@@ -8784,6 +8795,7 @@ export {
|
|
|
8784
8795
|
foodFlavourOptions,
|
|
8785
8796
|
formatCategoryLabel,
|
|
8786
8797
|
formatDate,
|
|
8798
|
+
formatNZBankAccount,
|
|
8787
8799
|
formatShareApplicationCategoriesSection,
|
|
8788
8800
|
formatShareApplicationComplianceSection,
|
|
8789
8801
|
formatShareApplicationPriceRangeLine,
|