@nanas-home/hub-common 0.42.947 → 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/{FTJ4R6VS.js → I2NYFX2U.js} +102 -30
- 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-B9dDNzjQ.d.ts → textValidation-B9-cxsPd.d.ts} +68 -27
- package/dist/web/index.d.ts +40 -31
- package/dist/web/index.js +618 -577
- package/dist/web/index.jsx +656 -481
- package/package.json +17 -18
|
@@ -143,6 +143,9 @@ var apiRoute = {
|
|
|
143
143
|
booking: {
|
|
144
144
|
prefix: "/admin/booking",
|
|
145
145
|
byUser: "/user",
|
|
146
|
+
withRelationships: `/with-relationships/${apiRouteParam.bookingUuid}`,
|
|
147
|
+
assignHost: `/assign-host/${apiRouteParam.bookingUuid}/${apiRouteParam.userUuid}`,
|
|
148
|
+
removeHost: `/remove-host/${apiRouteParam.bookingUuid}`,
|
|
146
149
|
swagger: { name: "Bookings", description: "Endpoints for managing bookings" }
|
|
147
150
|
},
|
|
148
151
|
invoice: {
|
|
@@ -181,6 +184,8 @@ var apiRoute = {
|
|
|
181
184
|
},
|
|
182
185
|
user: {
|
|
183
186
|
prefix: "/admin/user",
|
|
187
|
+
/** Relative to user prefix — POST body `{ search? }`; query = pagination. */
|
|
188
|
+
searchHosts: "search-hosts",
|
|
184
189
|
swagger: { name: "Users", description: "Endpoints for Admins to manage Users" }
|
|
185
190
|
},
|
|
186
191
|
userMembership: {
|
|
@@ -278,6 +283,7 @@ var apiRoute = {
|
|
|
278
283
|
prefix: "/user-membership",
|
|
279
284
|
getForCurrentUser: "",
|
|
280
285
|
signUpForSubscription: "/sign-up",
|
|
286
|
+
change: `/${apiRouteParam.userMembershipUuid}/change`,
|
|
281
287
|
pause: `/${apiRouteParam.userMembershipUuid}/pause`,
|
|
282
288
|
resume: `/${apiRouteParam.userMembershipUuid}/resume`,
|
|
283
289
|
cancel: `/${apiRouteParam.userMembershipUuid}/cancel`,
|
|
@@ -542,6 +548,87 @@ var UserType = /* @__PURE__ */ ((UserType2) => {
|
|
|
542
548
|
return UserType2;
|
|
543
549
|
})(UserType || {});
|
|
544
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
|
+
|
|
545
632
|
// src/contracts/generated/restrictions/activityRestriction.ts
|
|
546
633
|
var ActivityRestriction = {
|
|
547
634
|
details: { maxLength: 500 }
|
|
@@ -602,7 +689,7 @@ var MembershipRestriction = {
|
|
|
602
689
|
bookingAdvanceDays: { minValue: 0, maxValue: 1e3 },
|
|
603
690
|
bookingCalenderMonthsOpenInAdvance: { minValue: 0, maxValue: 1e3 },
|
|
604
691
|
stripeMonthlyProductId: { minLength: 3, maxLength: 80 },
|
|
605
|
-
stripeYearlyProductId: { minLength:
|
|
692
|
+
stripeYearlyProductId: { minLength: 0, maxLength: 80 }
|
|
606
693
|
};
|
|
607
694
|
|
|
608
695
|
// src/contracts/generated/restrictions/permissionRestriction.ts
|
|
@@ -629,7 +716,7 @@ var QuestionRestriction = {
|
|
|
629
716
|
// src/contracts/generated/restrictions/stripeRestriction.ts
|
|
630
717
|
var StripeRestriction = {
|
|
631
718
|
common: {
|
|
632
|
-
id: { minLength:
|
|
719
|
+
id: { minLength: 0, maxLength: 100 },
|
|
633
720
|
type: { minLength: 1, maxLength: 100 },
|
|
634
721
|
customerId: { minLength: 1, maxLength: 100 }
|
|
635
722
|
},
|
|
@@ -667,7 +754,7 @@ var searchColumns = {
|
|
|
667
754
|
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "country", "type": 2 }],
|
|
668
755
|
pet: [{ "property": "type", "type": 1 }, { "property": "sex", "type": 2 }, { "property": "breed", "type": 2 }, { "property": "neutered", "type": 2 }, { "property": "name", "type": 2 }, { "property": "notes", "type": 2 }, { "property": "dateOfBirth", "type": 5 }],
|
|
669
756
|
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 }],
|
|
670
|
-
userMembership: [{ "property": "status", "type": 1 }, { "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }],
|
|
757
|
+
userMembership: [{ "property": "status", "type": 1, "subType": "MembershipStatus" }, { "property": "billingCycle", "type": 1, "subType": "MembershipBillingCycleType" }, { "property": "stripeSubscriptionId", "type": 2 }, { "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }],
|
|
671
758
|
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 }],
|
|
672
759
|
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 }],
|
|
673
760
|
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }],
|
|
@@ -684,13 +771,16 @@ var onlyUnique = (value, index, array) => {
|
|
|
684
771
|
return array.indexOf(value) === index;
|
|
685
772
|
};
|
|
686
773
|
var arrayOfNLength = (length) => Array.from(Array(length).keys());
|
|
687
|
-
var arrayContains = (arr,
|
|
688
|
-
for (const
|
|
689
|
-
const hasItem = arr.includes(
|
|
774
|
+
var arrayContains = (arr, requiredItems, method = "AND") => {
|
|
775
|
+
for (const requiredItem of requiredItems) {
|
|
776
|
+
const hasItem = arr.includes(requiredItem);
|
|
690
777
|
if (method == "AND" && hasItem == false) return false;
|
|
691
778
|
if (method == "OR" && hasItem == true) return true;
|
|
692
779
|
}
|
|
693
|
-
|
|
780
|
+
if (method == "AND") {
|
|
781
|
+
return true;
|
|
782
|
+
}
|
|
783
|
+
return false;
|
|
694
784
|
};
|
|
695
785
|
|
|
696
786
|
// src/services/internal/config/commonConfigService.ts
|
|
@@ -1273,10 +1363,10 @@ var tryParseNumber = (input, opts) => {
|
|
|
1273
1363
|
};
|
|
1274
1364
|
|
|
1275
1365
|
// src/helpers/performanceHelper.ts
|
|
1276
|
-
var getPerformanceTimer = () =>
|
|
1277
|
-
start
|
|
1278
|
-
|
|
1279
|
-
}
|
|
1366
|
+
var getPerformanceTimer = () => {
|
|
1367
|
+
const start = performance.now();
|
|
1368
|
+
return () => performance.now() - start;
|
|
1369
|
+
};
|
|
1280
1370
|
|
|
1281
1371
|
// src/helpers/permissionHelper.ts
|
|
1282
1372
|
var hasRequiredPermissions = (props) => {
|
|
@@ -1405,24 +1495,6 @@ var defaultSiteColour = {
|
|
|
1405
1495
|
primary: "#97A571",
|
|
1406
1496
|
secondary: "#97A571"
|
|
1407
1497
|
};
|
|
1408
|
-
|
|
1409
|
-
// src/services/internal/debug/debugService.ts
|
|
1410
|
-
var DebugService = class {
|
|
1411
|
-
_setDebug(e) {
|
|
1412
|
-
if (e.code == "ControlLeft") {
|
|
1413
|
-
document.body.classList.add("debug");
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
_removeDebug(e) {
|
|
1417
|
-
if (e.code == "ControlLeft") {
|
|
1418
|
-
document.body.classList.remove("debug");
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
setupGlobalDebugKey = () => {
|
|
1422
|
-
document.addEventListener("keydown", this._setDebug);
|
|
1423
|
-
document.addEventListener("keyup", this._removeDebug);
|
|
1424
|
-
};
|
|
1425
|
-
};
|
|
1426
1498
|
var TranslationService = class {
|
|
1427
1499
|
constructor(log, _config) {
|
|
1428
1500
|
this._config = _config;
|
|
@@ -1675,4 +1747,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1675
1747
|
};
|
|
1676
1748
|
};
|
|
1677
1749
|
|
|
1678
|
-
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 };
|