@nanas-home/hub-common 0.48.1054 → 0.50.1085
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/{F3447QQO.js → V7DID3WI.js} +28 -5
- package/dist/index.css +1 -1
- package/dist/node-utils/index.d.ts +25 -3
- package/dist/node-utils/index.js +773 -3
- package/dist/{textValidation--PtCP337.d.ts → textValidation-7xRo-lBr.d.ts} +189 -1
- package/dist/web/index.d.ts +19 -6
- package/dist/web/index.js +355 -246
- package/dist/web/index.jsx +306 -200
- package/package.json +18 -18
|
@@ -59,6 +59,14 @@ var socialLinks = {
|
|
|
59
59
|
facebook: "https://www.facebook.com/NanasHomePetConcierge/",
|
|
60
60
|
linkedin: "https://www.linkedin.com/company/nanas-home-petconcierge/"
|
|
61
61
|
};
|
|
62
|
+
var commonEmailLinks = {
|
|
63
|
+
instagramLink: "https://www.instagram.com/nanas.home.petconcierge/",
|
|
64
|
+
facebookLink: "https://www.facebook.com/NanasHomePetConcierge/",
|
|
65
|
+
linkedInLink: "https://www.linkedin.com/company/nanas-home-petconcierge/",
|
|
66
|
+
websiteLink: "https://nanashome.club",
|
|
67
|
+
termsAndConditionsLink: "https://nanashome.club/terms-and-conditions.html",
|
|
68
|
+
privacyPolicyLink: "https://nanashome.club/privacy-policy.html"
|
|
69
|
+
};
|
|
62
70
|
|
|
63
71
|
// src/constants/mouseEvent.ts
|
|
64
72
|
var MouseButton = {
|
|
@@ -116,6 +124,7 @@ var apiRoute = {
|
|
|
116
124
|
devJwt: "/jwt",
|
|
117
125
|
login: "/login",
|
|
118
126
|
signup: "/signup",
|
|
127
|
+
signupQuestions: "/signup-questions",
|
|
119
128
|
confirmEmail: `/confirm-email/${apiRouteParam.linkTypeUuid}`,
|
|
120
129
|
swagger: { name: "Auth", description: "Endpoints for login, sign up etc" },
|
|
121
130
|
token: {
|
|
@@ -807,9 +816,9 @@ var UserRestriction = {
|
|
|
807
816
|
var searchColumns = {
|
|
808
817
|
membership: [{ "property": "monthlyFee", "type": 2 }, { "property": "perNightStay", "type": 2 }, { "property": "additionalPetPerNightStay", "type": 2 }, { "property": "transportFee", "type": 2 }, { "property": "perKm", "type": 2 }, { "property": "matchFee", "type": 2 }, { "property": "freeCancellationWithinDays", "type": 2 }, { "property": "bookingAdvanceDays", "type": 2 }, { "property": "bookingCalenderMonthsOpenInAdvance", "type": 2 }, { "property": "seasonalDiscounts", "type": 2 }],
|
|
809
818
|
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }],
|
|
810
|
-
pet: [{ "property": "type", "type":
|
|
819
|
+
pet: [{ "property": "type", "type": 0 }, { "property": "sex", "type": 2 }, { "property": "breed", "type": 2 }, { "property": "name", "type": 2 }, { "property": "notes", "type": 2 }, { "property": "dateOfBirth", "type": 5 }],
|
|
811
820
|
invoice: [{ "property": "userUuid", "type": 2 }, { "property": "bookingUuid", "type": 2 }, { "property": "bookingAddonUuid", "type": 2 }, { "property": "status", "type": 2 }, { "property": "stripeInvoiceId", "type": 2 }, { "property": "dueDate", "type": 5 }, { "property": "notes", "type": 2 }],
|
|
812
|
-
userMembership: [{ "property": "status", "type":
|
|
821
|
+
userMembership: [{ "property": "status", "type": 0, "subType": "MembershipStatus" }, { "property": "billingCycle", "type": 0, "subType": "MembershipBillingCycleType" }, { "property": "stripeSubscriptionId", "type": 2 }, { "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }],
|
|
813
822
|
user: [{ "property": "types", "type": 1 }, { "property": "firstName", "type": 2 }, { "property": "lastName", "type": 2 }, { "property": "email", "type": 2 }, { "property": "hubspotId", "type": 2 }, { "property": "flags", "type": 1 }, { "property": "dateCreated", "type": 5 }],
|
|
814
823
|
upload: [{ "property": "linkUuid", "type": 2 }, { "property": "linkType", "type": 2 }, { "property": "type", "type": 2 }, { "property": "fileName", "type": 2 }, { "property": "blobType", "type": 2 }, { "property": "sizeInKb", "type": 2 }, { "property": "dateCreated", "type": 5 }],
|
|
815
824
|
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }, { "property": "dateCreated", "type": 5 }],
|
|
@@ -1457,6 +1466,19 @@ function nameof(key1, key2) {
|
|
|
1457
1466
|
return key2 ?? key1;
|
|
1458
1467
|
}
|
|
1459
1468
|
|
|
1469
|
+
// src/helpers/questionHelper.ts
|
|
1470
|
+
var getQuestionGroups = (questionsAndAnswers) => {
|
|
1471
|
+
const questionGroups = {};
|
|
1472
|
+
for (const qna of questionsAndAnswers ?? []) {
|
|
1473
|
+
const existingValue = questionGroups[qna.question.category];
|
|
1474
|
+
questionGroups[qna.question.category] = [...existingValue == null ? [] : existingValue, qna];
|
|
1475
|
+
}
|
|
1476
|
+
return Object.keys(questionGroups).map((category) => ({
|
|
1477
|
+
category,
|
|
1478
|
+
list: (questionGroups[category] ?? []).filter((c) => c != null)
|
|
1479
|
+
}));
|
|
1480
|
+
};
|
|
1481
|
+
|
|
1460
1482
|
// src/helpers/randomHelper.ts
|
|
1461
1483
|
var randomIntFromRange = (min, max) => {
|
|
1462
1484
|
return Math.floor(Math.random() * (max - min) + min);
|
|
@@ -1779,9 +1801,10 @@ var specialChars = "<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";
|
|
|
1779
1801
|
var capitalizeAlphabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1780
1802
|
var errorMessage = `Password should be minimum of 8 characters, with an uppercase letter, at least 1 number and 1 special character`;
|
|
1781
1803
|
var passwordValid = (value) => {
|
|
1782
|
-
const
|
|
1804
|
+
const safeValue = value ?? "";
|
|
1805
|
+
const passwordCharArr = safeValue.split("");
|
|
1783
1806
|
const defaultValidation = { isValid: false, errorMessage };
|
|
1784
|
-
if (
|
|
1807
|
+
if (safeValue.length < UserRestriction.password.minLength)
|
|
1785
1808
|
return { ...defaultValidation, errorMessageTransKey: "password_too_short_validator" };
|
|
1786
1809
|
const hasNumber = passwordCharArr.filter((c) => isNaN(Number(c)) == false).length > 0;
|
|
1787
1810
|
if (hasNumber == false) return { ...defaultValidation, errorMessageTransKey: "password_missing_number_validator" };
|
|
@@ -1851,4 +1874,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1851
1874
|
};
|
|
1852
1875
|
};
|
|
1853
1876
|
|
|
1854
|
-
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, BugReportRestriction, BugReportStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, StripeRestriction, TempLinkType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, emailValid, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getActiveUserMembership, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, hubspotQuestionsExport, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, maxValue, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, minValue, monthTranslationKeyOrder, multiValidation, nameof, nanasFonts, noValidation, notNull, onlyUnique, passwordValid, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
|
|
1877
|
+
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, BugReportRestriction, BugReportStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, InvoiceRestriction, InvoiceStatusType, LogService, MembershipBillingCycleType, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, StripeRestriction, TempLinkType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, commonEmailLinks, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, emailValid, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getActiveUserMembership, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getQuestionGroups, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, hubspotQuestionsExport, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, maxValue, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, minValue, monthTranslationKeyOrder, multiValidation, nameof, nanasFonts, noValidation, notNull, onlyUnique, passwordValid, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, socialLinks, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
|