@nanas-home/hub-common 0.49.1064 → 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/{COZ5WMAB.js → V7DID3WI.js} +26 -3
- 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 +18 -4
- package/dist/web/index.js +353 -243
- package/dist/web/index.jsx +302 -195
- 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: {
|
|
@@ -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 };
|