@nanas-home/hub-common 0.36.844 → 0.37.875
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/{T65WNCAX.js → CVJITZ37.js} +63 -42
- 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-CgQNvQsc.d.ts → textValidation-DVIleflX.d.ts} +195 -38
- package/dist/web/index.d.ts +55 -45
- package/dist/web/index.js +350 -177
- package/dist/web/index.jsx +291 -181
- package/package.json +2 -1
|
@@ -23,24 +23,6 @@ var webAppTypes = [
|
|
|
23
23
|
];
|
|
24
24
|
var isWebApp = (appType) => webAppTypes.includes(appType);
|
|
25
25
|
|
|
26
|
-
// src/contracts/generated/enum/bookingStatus.ts
|
|
27
|
-
var BookingStatusType = /* @__PURE__ */ ((BookingStatusType2) => {
|
|
28
|
-
BookingStatusType2[BookingStatusType2["Pending"] = 0] = "Pending";
|
|
29
|
-
BookingStatusType2[BookingStatusType2["Cancelled"] = 1] = "Cancelled";
|
|
30
|
-
BookingStatusType2[BookingStatusType2["IntakeCall"] = 2] = "IntakeCall";
|
|
31
|
-
BookingStatusType2[BookingStatusType2["RequestMatchFee"] = 3] = "RequestMatchFee";
|
|
32
|
-
BookingStatusType2[BookingStatusType2["FindPlacement"] = 4] = "FindPlacement";
|
|
33
|
-
BookingStatusType2[BookingStatusType2["Matched"] = 5] = "Matched";
|
|
34
|
-
BookingStatusType2[BookingStatusType2["MeetAndGreet"] = 6] = "MeetAndGreet";
|
|
35
|
-
BookingStatusType2[BookingStatusType2["RequestPayment"] = 7] = "RequestPayment";
|
|
36
|
-
BookingStatusType2[BookingStatusType2["PaymentRequested"] = 8] = "PaymentRequested";
|
|
37
|
-
BookingStatusType2[BookingStatusType2["Paid"] = 9] = "Paid";
|
|
38
|
-
BookingStatusType2[BookingStatusType2["WaitList"] = 10] = "WaitList";
|
|
39
|
-
BookingStatusType2[BookingStatusType2["Complete"] = 11] = "Complete";
|
|
40
|
-
BookingStatusType2[BookingStatusType2["CompleteWithHostFeedback"] = 12] = "CompleteWithHostFeedback";
|
|
41
|
-
return BookingStatusType2;
|
|
42
|
-
})(BookingStatusType || {});
|
|
43
|
-
|
|
44
26
|
// src/constants/calendar.constants.ts
|
|
45
27
|
var weekdayTranslationKeyOrder = [
|
|
46
28
|
"sun",
|
|
@@ -65,21 +47,6 @@ var monthTranslationKeyOrder = [
|
|
|
65
47
|
"nov",
|
|
66
48
|
"dec"
|
|
67
49
|
];
|
|
68
|
-
var bookingColourLookup = {
|
|
69
|
-
[0 /* Pending */]: "#D50000",
|
|
70
|
-
[2 /* IntakeCall */]: "#D50000",
|
|
71
|
-
[3 /* RequestMatchFee */]: "#F4511E",
|
|
72
|
-
[4 /* FindPlacement */]: "#7986CB",
|
|
73
|
-
[5 /* Matched */]: "#E67C73",
|
|
74
|
-
[6 /* MeetAndGreet */]: "#F6BF26",
|
|
75
|
-
[7 /* RequestPayment */]: "#F4511E",
|
|
76
|
-
[8 /* PaymentRequested */]: "#33B679",
|
|
77
|
-
[9 /* Paid */]: "#0B8043",
|
|
78
|
-
[1 /* Cancelled */]: "#616161",
|
|
79
|
-
[10 /* WaitList */]: "#039BE5",
|
|
80
|
-
[11 /* Complete */]: "#0B8043",
|
|
81
|
-
[12 /* CompleteWithHostFeedback */]: "#0B8043"
|
|
82
|
-
};
|
|
83
50
|
|
|
84
51
|
// src/constants/font.ts
|
|
85
52
|
var nanasFonts = {
|
|
@@ -131,6 +98,7 @@ var apiRouteParam = {
|
|
|
131
98
|
petUuid: ":petUuid",
|
|
132
99
|
addressUuid: ":addressUuid",
|
|
133
100
|
bookingUuid: ":bookingUuid",
|
|
101
|
+
bookingAddonUuid: ":bookingAddonUuid",
|
|
134
102
|
linkUuid: ":linkUuid",
|
|
135
103
|
linkType: ":linkType"
|
|
136
104
|
};
|
|
@@ -174,6 +142,13 @@ var apiRoute = {
|
|
|
174
142
|
byUser: "/user",
|
|
175
143
|
swagger: { name: "Bookings", description: "Endpoints for managing bookings" }
|
|
176
144
|
},
|
|
145
|
+
charge: {
|
|
146
|
+
prefix: "/charge",
|
|
147
|
+
getByUserId: `/user/${apiRouteParam.userUuid}`,
|
|
148
|
+
getByBookingId: `/booking/${apiRouteParam.bookingUuid}`,
|
|
149
|
+
getByBookingAddonId: `/booking-addon/${apiRouteParam.bookingAddonUuid}`,
|
|
150
|
+
swagger: { name: "Charges", description: "Endpoints for managing charges that have been issued" }
|
|
151
|
+
},
|
|
177
152
|
comment: {
|
|
178
153
|
prefix: "/admin/comment",
|
|
179
154
|
byLink: "/link",
|
|
@@ -237,17 +212,24 @@ var apiRoute = {
|
|
|
237
212
|
getAll: "",
|
|
238
213
|
getById: `/${apiRouteParam.bookingUuid}`,
|
|
239
214
|
create: "",
|
|
240
|
-
update:
|
|
215
|
+
update: "",
|
|
241
216
|
delete: `/${apiRouteParam.bookingUuid}`,
|
|
242
217
|
swagger: { name: "Bookings", description: "Endpoints for User to manage their Bookings" }
|
|
243
218
|
},
|
|
244
219
|
bookingAddon: {
|
|
245
220
|
prefix: "/booking-addon",
|
|
246
|
-
getByBookingId: `/${apiRouteParam.
|
|
247
|
-
addToBooking: `/${apiRouteParam.
|
|
248
|
-
removeToBooking: `/${apiRouteParam.
|
|
221
|
+
getByBookingId: `/${apiRouteParam.bookingAddonUuid}`,
|
|
222
|
+
addToBooking: `/${apiRouteParam.bookingAddonUuid}`,
|
|
223
|
+
removeToBooking: `/${apiRouteParam.bookingAddonUuid}`,
|
|
249
224
|
swagger: { name: "BookingAddons", description: "Endpoints for User to manage their Booking Addons" }
|
|
250
225
|
},
|
|
226
|
+
charge: {
|
|
227
|
+
prefix: "/charge",
|
|
228
|
+
getByForUser: `/user`,
|
|
229
|
+
getByBookingId: `/booking/${apiRouteParam.bookingUuid}`,
|
|
230
|
+
getByBookingAddonId: `/booking-addon/${apiRouteParam.bookingAddonUuid}`,
|
|
231
|
+
swagger: { name: "Charges", description: "Endpoints for User to view the Charges they have been issued" }
|
|
232
|
+
},
|
|
251
233
|
membership: {
|
|
252
234
|
prefix: "/membership",
|
|
253
235
|
getAll: "",
|
|
@@ -315,12 +297,40 @@ var BookingAddonType = /* @__PURE__ */ ((BookingAddonType2) => {
|
|
|
315
297
|
return BookingAddonType2;
|
|
316
298
|
})(BookingAddonType || {});
|
|
317
299
|
|
|
300
|
+
// src/contracts/generated/enum/bookingStatus.ts
|
|
301
|
+
var BookingStatusType = /* @__PURE__ */ ((BookingStatusType2) => {
|
|
302
|
+
BookingStatusType2[BookingStatusType2["Pending"] = 0] = "Pending";
|
|
303
|
+
BookingStatusType2[BookingStatusType2["Cancelled"] = 1] = "Cancelled";
|
|
304
|
+
BookingStatusType2[BookingStatusType2["IntakeCall"] = 2] = "IntakeCall";
|
|
305
|
+
BookingStatusType2[BookingStatusType2["RequestMatchFee"] = 3] = "RequestMatchFee";
|
|
306
|
+
BookingStatusType2[BookingStatusType2["FindPlacement"] = 4] = "FindPlacement";
|
|
307
|
+
BookingStatusType2[BookingStatusType2["Matched"] = 5] = "Matched";
|
|
308
|
+
BookingStatusType2[BookingStatusType2["MeetAndGreet"] = 6] = "MeetAndGreet";
|
|
309
|
+
BookingStatusType2[BookingStatusType2["RequestPayment"] = 7] = "RequestPayment";
|
|
310
|
+
BookingStatusType2[BookingStatusType2["PaymentRequested"] = 8] = "PaymentRequested";
|
|
311
|
+
BookingStatusType2[BookingStatusType2["Paid"] = 9] = "Paid";
|
|
312
|
+
BookingStatusType2[BookingStatusType2["WaitList"] = 10] = "WaitList";
|
|
313
|
+
BookingStatusType2[BookingStatusType2["Complete"] = 11] = "Complete";
|
|
314
|
+
BookingStatusType2[BookingStatusType2["CompleteWithHostFeedback"] = 12] = "CompleteWithHostFeedback";
|
|
315
|
+
return BookingStatusType2;
|
|
316
|
+
})(BookingStatusType || {});
|
|
317
|
+
|
|
318
|
+
// src/contracts/generated/enum/chargeStatusType.ts
|
|
319
|
+
var ChargeStatusType = /* @__PURE__ */ ((ChargeStatusType2) => {
|
|
320
|
+
ChargeStatusType2[ChargeStatusType2["Pending"] = 0] = "Pending";
|
|
321
|
+
ChargeStatusType2[ChargeStatusType2["Cancelled"] = 1] = "Cancelled";
|
|
322
|
+
ChargeStatusType2[ChargeStatusType2["Paid"] = 2] = "Paid";
|
|
323
|
+
ChargeStatusType2[ChargeStatusType2["Refunded"] = 3] = "Refunded";
|
|
324
|
+
return ChargeStatusType2;
|
|
325
|
+
})(ChargeStatusType || {});
|
|
326
|
+
|
|
318
327
|
// src/contracts/generated/enum/commentLinkType.ts
|
|
319
328
|
var CommentLinkType = /* @__PURE__ */ ((CommentLinkType2) => {
|
|
320
329
|
CommentLinkType2[CommentLinkType2["Unknown"] = 0] = "Unknown";
|
|
321
330
|
CommentLinkType2[CommentLinkType2["User"] = 1] = "User";
|
|
322
331
|
CommentLinkType2[CommentLinkType2["Pet"] = 2] = "Pet";
|
|
323
332
|
CommentLinkType2[CommentLinkType2["Booking"] = 3] = "Booking";
|
|
333
|
+
CommentLinkType2[CommentLinkType2["Charge"] = 4] = "Charge";
|
|
324
334
|
return CommentLinkType2;
|
|
325
335
|
})(CommentLinkType || {});
|
|
326
336
|
|
|
@@ -398,6 +408,9 @@ var PermissionType = /* @__PURE__ */ ((PermissionType2) => {
|
|
|
398
408
|
PermissionType2[PermissionType2["UserMembershipView"] = 180] = "UserMembershipView";
|
|
399
409
|
PermissionType2[PermissionType2["UserMembershipManage"] = 181] = "UserMembershipManage";
|
|
400
410
|
PermissionType2[PermissionType2["UserMembershipDelete"] = 182] = "UserMembershipDelete";
|
|
411
|
+
PermissionType2[PermissionType2["ChargeView"] = 200] = "ChargeView";
|
|
412
|
+
PermissionType2[PermissionType2["ChargeManage"] = 201] = "ChargeManage";
|
|
413
|
+
PermissionType2[PermissionType2["ChargeDelete"] = 202] = "ChargeDelete";
|
|
401
414
|
return PermissionType2;
|
|
402
415
|
})(PermissionType || {});
|
|
403
416
|
|
|
@@ -523,6 +536,12 @@ var BookingAddonRestriction = {
|
|
|
523
536
|
quantity: { min: 0, max: 1e3 }
|
|
524
537
|
};
|
|
525
538
|
|
|
539
|
+
// src/contracts/generated/restrictions/chargeRestriction.ts
|
|
540
|
+
var ChargeRestriction = {
|
|
541
|
+
stripeChargeId: { maxLength: 100 },
|
|
542
|
+
notes: { maxLength: 250 }
|
|
543
|
+
};
|
|
544
|
+
|
|
526
545
|
// src/contracts/generated/restrictions/commentRestriction.ts
|
|
527
546
|
var CommentRestriction = {
|
|
528
547
|
name: { maxLength: 80 },
|
|
@@ -592,13 +611,14 @@ var UserRestriction = {
|
|
|
592
611
|
|
|
593
612
|
// src/contracts/generated/searchColumns.ts
|
|
594
613
|
var searchColumns = {
|
|
595
|
-
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "country", "type": 2 }],
|
|
596
|
-
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }],
|
|
597
614
|
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 }],
|
|
615
|
+
address: [{ "property": "name", "type": 2 }, { "property": "street", "type": 2 }, { "property": "city", "type": 2 }, { "property": "postalCode", "type": 2 }, { "property": "country", "type": 2 }],
|
|
598
616
|
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 }],
|
|
599
|
-
|
|
617
|
+
charge: [{ "property": "userUuid", "type": 2 }, { "property": "bookingUuid", "type": 2 }, { "property": "bookingAddonUuid", "type": 2 }, { "property": "status", "type": 2 }, { "property": "stripeChargeId", "type": 2 }, { "property": "dueDate", "type": 5 }, { "property": "notes", "type": 2 }],
|
|
618
|
+
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 }],
|
|
600
619
|
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 }],
|
|
601
|
-
|
|
620
|
+
booking: [{ "property": "startDate", "type": 5 }, { "property": "endDate", "type": 5 }, { "property": "status", "type": 2 }, { "property": "notes", "type": 2 }],
|
|
621
|
+
question: [{ "property": "forTypes", "type": 1 }, { "property": "transKey", "type": 2 }, { "property": "fallback", "type": 2 }, { "property": "category", "type": 2 }, { "property": "type", "type": 0 }, { "property": "sortOrder", "type": 3 }, { "property": "visible", "type": 4 }, { "property": "notes", "type": 2 }]
|
|
602
622
|
};
|
|
603
623
|
|
|
604
624
|
// src/helpers/arrayHelper.ts
|
|
@@ -1174,6 +1194,7 @@ var mimeTypeLookup = {
|
|
|
1174
1194
|
js: "application/javascript",
|
|
1175
1195
|
json: "application/json",
|
|
1176
1196
|
png: "image/png",
|
|
1197
|
+
webp: "image/webp",
|
|
1177
1198
|
jpg: "image/jpeg",
|
|
1178
1199
|
jpeg: "image/jpeg",
|
|
1179
1200
|
gif: "image/gif"
|
|
@@ -1560,4 +1581,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1560
1581
|
};
|
|
1561
1582
|
};
|
|
1562
1583
|
|
|
1563
|
-
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength,
|
|
1584
|
+
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, ChargeRestriction, ChargeStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, 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, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMimeTypeFromExtension, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, 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 };
|