@nanas-home/hub-common 0.43.982 → 0.44.1006
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/{LYY4XCT7.js → I2NYFX2U.js} +94 -25
- package/dist/index.css +1 -1
- package/dist/node-utils/index.d.ts +2 -2
- package/dist/node-utils/index.js +2 -2
- package/dist/{textValidation-B6IuNX8F.d.ts → textValidation-B9-cxsPd.d.ts} +57 -20
- package/dist/web/index.d.ts +32 -30
- package/dist/web/index.js +507 -535
- package/dist/web/index.jsx +551 -424
- package/package.json +17 -17
|
@@ -184,6 +184,8 @@ var apiRoute = {
|
|
|
184
184
|
},
|
|
185
185
|
user: {
|
|
186
186
|
prefix: "/admin/user",
|
|
187
|
+
/** Relative to user prefix — POST body `{ search? }`; query = pagination. */
|
|
188
|
+
searchHosts: "search-hosts",
|
|
187
189
|
swagger: { name: "Users", description: "Endpoints for Admins to manage Users" }
|
|
188
190
|
},
|
|
189
191
|
userMembership: {
|
|
@@ -281,6 +283,7 @@ var apiRoute = {
|
|
|
281
283
|
prefix: "/user-membership",
|
|
282
284
|
getForCurrentUser: "",
|
|
283
285
|
signUpForSubscription: "/sign-up",
|
|
286
|
+
change: `/${apiRouteParam.userMembershipUuid}/change`,
|
|
284
287
|
pause: `/${apiRouteParam.userMembershipUuid}/pause`,
|
|
285
288
|
resume: `/${apiRouteParam.userMembershipUuid}/resume`,
|
|
286
289
|
cancel: `/${apiRouteParam.userMembershipUuid}/cancel`,
|
|
@@ -545,6 +548,87 @@ var UserType = /* @__PURE__ */ ((UserType2) => {
|
|
|
545
548
|
return UserType2;
|
|
546
549
|
})(UserType || {});
|
|
547
550
|
|
|
551
|
+
// src/contracts/generated/hubspotQuestions.ts
|
|
552
|
+
var hubspotQuestionsExport = {
|
|
553
|
+
can_your_dog_walk_the_stairs_: {
|
|
554
|
+
can_your_dog_walk_the_stairs__option0: "Yes",
|
|
555
|
+
can_your_dog_walk_the_stairs__option1: "Yes, unless they are steep stairs (typical Dutch house)",
|
|
556
|
+
can_your_dog_walk_the_stairs__option2: "No, but can be carried easily",
|
|
557
|
+
can_your_dog_walk_the_stairs__option3: "No, needs an elevator"
|
|
558
|
+
},
|
|
559
|
+
does_your_dog_need_to_sleep_in_the_bedroom_: {
|
|
560
|
+
does_your_dog_need_to_sleep_in_the_bedroom__option0: "No",
|
|
561
|
+
does_your_dog_need_to_sleep_in_the_bedroom__option1: "Yes, otherwise cries/barks",
|
|
562
|
+
does_your_dog_need_to_sleep_in_the_bedroom__option2: "Preferably, but not required"
|
|
563
|
+
},
|
|
564
|
+
dog_size_: {
|
|
565
|
+
dog_size__option0: "Small",
|
|
566
|
+
dog_size__option1: "Medium",
|
|
567
|
+
dog_size__option2: "Large"
|
|
568
|
+
},
|
|
569
|
+
how_long_can_your_dog_be_home_alone_: {
|
|
570
|
+
how_long_can_your_dog_be_home_alone__option0: "My dog can't be alone",
|
|
571
|
+
how_long_can_your_dog_be_home_alone__option1: "1-3h",
|
|
572
|
+
how_long_can_your_dog_be_home_alone__option2: "During a normal work day (8h)"
|
|
573
|
+
},
|
|
574
|
+
is_your_dog_allowed_on_the_couch_: {
|
|
575
|
+
is_your_dog_allowed_on_the_couch__option0: "No",
|
|
576
|
+
is_your_dog_allowed_on_the_couch__option1: 'Yes, but listens to "No"',
|
|
577
|
+
is_your_dog_allowed_on_the_couch__option2: "Yes, and they will keep trying"
|
|
578
|
+
},
|
|
579
|
+
gets_along_with_cats_: {
|
|
580
|
+
gets_along_with_cats__option0: "Yes",
|
|
581
|
+
gets_along_with_cats__option1: "No",
|
|
582
|
+
gets_along_with_cats__option2: "Depends on the cat",
|
|
583
|
+
gets_along_with_cats__option3: "We don't know yet"
|
|
584
|
+
},
|
|
585
|
+
gets_along_with_dogs_: {
|
|
586
|
+
gets_along_with_dogs__option0: "Yes",
|
|
587
|
+
gets_along_with_dogs__option1: "No",
|
|
588
|
+
gets_along_with_dogs__option2: "Depends on the dog",
|
|
589
|
+
gets_along_with_dogs__option3: "We don't know yet"
|
|
590
|
+
},
|
|
591
|
+
gets_along_with_kids_: {
|
|
592
|
+
gets_along_with_kids__option0: "Yes",
|
|
593
|
+
gets_along_with_kids__option1: "No",
|
|
594
|
+
gets_along_with_kids__option2: "Depends on the kid",
|
|
595
|
+
gets_along_with_kids__option3: "We don't know yet"
|
|
596
|
+
},
|
|
597
|
+
type_of_home: {
|
|
598
|
+
type_of_home_option0: "Studio",
|
|
599
|
+
type_of_home_option1: "Apartment",
|
|
600
|
+
type_of_home_option2: "House"
|
|
601
|
+
},
|
|
602
|
+
house_access: {
|
|
603
|
+
house_access_option0: "Steep stairs (typical Dutch house)",
|
|
604
|
+
house_access_option1: "Normal stairs",
|
|
605
|
+
house_access_option2: "Elevator",
|
|
606
|
+
house_access_option3: "N/A (ground floor)"
|
|
607
|
+
},
|
|
608
|
+
living_situation: {
|
|
609
|
+
living_situation_option0: "alone",
|
|
610
|
+
living_situation_option1: "with housemate(s)",
|
|
611
|
+
living_situation_option2: "with partner",
|
|
612
|
+
living_situation_option3: "family with kids"
|
|
613
|
+
},
|
|
614
|
+
lives_with_a_pet_: {
|
|
615
|
+
lives_with_a_pet__option0: "No",
|
|
616
|
+
lives_with_a_pet__option1: "Yes, a cat ",
|
|
617
|
+
lives_with_a_pet__option2: "Yes, a dog",
|
|
618
|
+
lives_with_a_pet__option3: "Yes, other (rodent/fish/bird)"
|
|
619
|
+
},
|
|
620
|
+
pet_sitting_experience: {
|
|
621
|
+
pet_sitting_experience_option0: "Low - experience owning a pet",
|
|
622
|
+
pet_sitting_experience_option1: "Medium - experience with pet sitting for others",
|
|
623
|
+
pet_sitting_experience_option2: "High - experience with dog training, shelters, or medical care"
|
|
624
|
+
},
|
|
625
|
+
dog_preferences: {
|
|
626
|
+
dog_preferences_option0: "Small size only (<10kg)",
|
|
627
|
+
dog_preferences_option1: "Small to medium size (10-25kg)",
|
|
628
|
+
dog_preferences_option2: "All sizes"
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
|
|
548
632
|
// src/contracts/generated/restrictions/activityRestriction.ts
|
|
549
633
|
var ActivityRestriction = {
|
|
550
634
|
details: { maxLength: 500 }
|
|
@@ -605,7 +689,7 @@ var MembershipRestriction = {
|
|
|
605
689
|
bookingAdvanceDays: { minValue: 0, maxValue: 1e3 },
|
|
606
690
|
bookingCalenderMonthsOpenInAdvance: { minValue: 0, maxValue: 1e3 },
|
|
607
691
|
stripeMonthlyProductId: { minLength: 3, maxLength: 80 },
|
|
608
|
-
stripeYearlyProductId: { minLength:
|
|
692
|
+
stripeYearlyProductId: { minLength: 0, maxLength: 80 }
|
|
609
693
|
};
|
|
610
694
|
|
|
611
695
|
// src/contracts/generated/restrictions/permissionRestriction.ts
|
|
@@ -632,7 +716,7 @@ var QuestionRestriction = {
|
|
|
632
716
|
// src/contracts/generated/restrictions/stripeRestriction.ts
|
|
633
717
|
var StripeRestriction = {
|
|
634
718
|
common: {
|
|
635
|
-
id: { minLength:
|
|
719
|
+
id: { minLength: 0, maxLength: 100 },
|
|
636
720
|
type: { minLength: 1, maxLength: 100 },
|
|
637
721
|
customerId: { minLength: 1, maxLength: 100 }
|
|
638
722
|
},
|
|
@@ -687,13 +771,16 @@ var onlyUnique = (value, index, array) => {
|
|
|
687
771
|
return array.indexOf(value) === index;
|
|
688
772
|
};
|
|
689
773
|
var arrayOfNLength = (length) => Array.from(Array(length).keys());
|
|
690
|
-
var arrayContains = (arr,
|
|
691
|
-
for (const
|
|
692
|
-
const hasItem = arr.includes(
|
|
774
|
+
var arrayContains = (arr, requiredItems, method = "AND") => {
|
|
775
|
+
for (const requiredItem of requiredItems) {
|
|
776
|
+
const hasItem = arr.includes(requiredItem);
|
|
693
777
|
if (method == "AND" && hasItem == false) return false;
|
|
694
778
|
if (method == "OR" && hasItem == true) return true;
|
|
695
779
|
}
|
|
696
|
-
|
|
780
|
+
if (method == "AND") {
|
|
781
|
+
return true;
|
|
782
|
+
}
|
|
783
|
+
return false;
|
|
697
784
|
};
|
|
698
785
|
|
|
699
786
|
// src/services/internal/config/commonConfigService.ts
|
|
@@ -1408,24 +1495,6 @@ var defaultSiteColour = {
|
|
|
1408
1495
|
primary: "#97A571",
|
|
1409
1496
|
secondary: "#97A571"
|
|
1410
1497
|
};
|
|
1411
|
-
|
|
1412
|
-
// src/services/internal/debug/debugService.ts
|
|
1413
|
-
var DebugService = class {
|
|
1414
|
-
_setDebug(e) {
|
|
1415
|
-
if (e.code == "ControlLeft") {
|
|
1416
|
-
document.body.classList.add("debug");
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
_removeDebug(e) {
|
|
1420
|
-
if (e.code == "ControlLeft") {
|
|
1421
|
-
document.body.classList.remove("debug");
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
setupGlobalDebugKey = () => {
|
|
1425
|
-
document.addEventListener("keydown", this._setDebug);
|
|
1426
|
-
document.addEventListener("keyup", this._removeDebug);
|
|
1427
|
-
};
|
|
1428
|
-
};
|
|
1429
1498
|
var TranslationService = class {
|
|
1430
1499
|
constructor(log, _config) {
|
|
1431
1500
|
this._config = _config;
|
|
@@ -1678,4 +1747,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1678
1747
|
};
|
|
1679
1748
|
};
|
|
1680
1749
|
|
|
1681
|
-
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService,
|
|
1750
|
+
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, 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, 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, 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, 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 };
|