@nanas-home/hub-common 0.1.185 → 0.3.193
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/LICENSE +1 -1
- package/README.md +42 -13
- package/dist/chunk/{EVHHRXCX.js → 55SKB747.js} +15 -25
- package/dist/index.css +1 -1
- package/dist/node-utils/index.d.ts +19 -5
- package/dist/node-utils/index.js +77 -125601
- package/dist/{validation-DGEuAXbQ.d.ts → validation-Cg9S1ATw.d.ts} +22 -0
- package/dist/web/index.d.ts +38 -13
- package/dist/web/index.js +135 -36
- package/dist/web/index.jsx +273 -124356
- package/package.json +11 -11
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# Nana's Home - Common lib
|
|
2
4
|
|
|
3
|
-
[
|
|
5
|
+
_A library for common functionality in [Nana's Home](https://nanashomepetsitting.com) websites._
|
|
6
|
+
|
|
7
|
+
<br />
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
<br />
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+

|
|
4
15
|
|
|
5
|
-
|
|
16
|
+
<br />
|
|
17
|
+
</div>
|
|
6
18
|
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
> `Nana's Hub common library` should be a **Normal case** string with the description of the repository.
|
|
13
|
-
>
|
|
14
|
-
> `Kurt Lourens` should be a **kebab-case** string from your profile URL.
|
|
19
|
+
> [!NOTE]
|
|
20
|
+
> This project is not intended to be used outside of Nana's Home websites and we will likely not support any of your use cases.
|
|
21
|
+
|
|
22
|
+
<br />
|
|
15
23
|
|
|
16
24
|
## Quick start
|
|
17
25
|
|
|
@@ -20,6 +28,27 @@ Nana's Hub common library
|
|
|
20
28
|
- Create link in this project
|
|
21
29
|
- `npm link`
|
|
22
30
|
- Link from other project
|
|
23
|
-
- `npm link
|
|
31
|
+
- `npm link @nanas-home/hub-common`
|
|
32
|
+
|
|
33
|
+
### Tech choices
|
|
34
|
+
|
|
35
|
+
- SolidJS
|
|
36
|
+
- We like SolidJS because of how similar it is to React and it improves on a lot of aspects that we dislike about React.
|
|
37
|
+
- SCSS
|
|
38
|
+
- We love CSS and are not fully convinced of TailwindCSS just yet. CSS can be very verbose though and SCSS helps with this. We make use of [Pico][picoCssWebsite] for the base styling of the web components in this library.
|
|
39
|
+
|
|
40
|
+
<br />
|
|
41
|
+
<br />
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
By using the software and services provided, you agree to our [Terms and conditions][nanasHomeTerms] and [Privacy Policy][nanasHomePrivacy].
|
|
46
|
+
|
|
47
|
+
<br />
|
|
48
|
+
<br />
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
[nanasHomeWebsite]: https://nanashome.club?ref=AssistantAppsCBGithub
|
|
51
|
+
[nanasHomePrivacy]: https://nanashome.club/privacy_policy.html?ref=AssistantAppsCBGithub
|
|
52
|
+
[nanasHomeTerms]: https://nanashome.club/terms_and_conditions.html?ref=AssistantAppsCBGithub
|
|
53
|
+
[picoCssWebsite]: https://picocss.com?ref=AssistantAppsCBGithub
|
|
54
|
+
[khaozTopsyGithub]: https://github.com/Khaoz-Topsy?ref=AssistantAppsCBGithub
|
|
@@ -3,16 +3,6 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
7
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
8
|
-
}) : x)(function(x) {
|
|
9
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
10
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
11
|
-
});
|
|
12
|
-
var __export = (target, all) => {
|
|
13
|
-
for (var name in all)
|
|
14
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
-
};
|
|
16
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
17
7
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
18
8
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -428,7 +418,7 @@ var CommonConfigService = class {
|
|
|
428
418
|
}
|
|
429
419
|
return this._internalIsProd;
|
|
430
420
|
};
|
|
431
|
-
packageVersion = () => this.
|
|
421
|
+
packageVersion = () => this.getWithFallback("PACKAGE_VERSION", "npm_package_version");
|
|
432
422
|
buildVersion = () => this.get("BUILD_VERSION");
|
|
433
423
|
getConsoleLogLevels = () => {
|
|
434
424
|
const envVar = this.get("VITE_CONSOLE_LOGGING");
|
|
@@ -445,7 +435,7 @@ var CommonConfigService = class {
|
|
|
445
435
|
}
|
|
446
436
|
getWithFallback = (property, fallbackProperty, defaultValue) => {
|
|
447
437
|
const orig = this.get(property);
|
|
448
|
-
if (orig != null) return orig;
|
|
438
|
+
if (orig != null && orig.length > 0) return orig;
|
|
449
439
|
return this.get(fallbackProperty, defaultValue);
|
|
450
440
|
};
|
|
451
441
|
getBool = (property, defaultValue) => this.get(property, defaultValue).toLowerCase() == "true";
|
|
@@ -1005,14 +995,14 @@ var UserCreateDtoMeta = {
|
|
|
1005
995
|
var AuthLoginDtoMeta = {
|
|
1006
996
|
email: {
|
|
1007
997
|
transKey: "email_label",
|
|
1008
|
-
helpTextTransKey: "
|
|
1009
|
-
placeholderTransKey: "
|
|
998
|
+
helpTextTransKey: "email_helpText",
|
|
999
|
+
placeholderTransKey: "email_placeholder",
|
|
1010
1000
|
validator: multiValidation(minLength(UserRestriction.email.minLength), maxLength(UserRestriction.email.maxLength))
|
|
1011
1001
|
},
|
|
1012
1002
|
password: {
|
|
1013
1003
|
transKey: "password_label",
|
|
1014
|
-
helpTextTransKey: "
|
|
1015
|
-
placeholderTransKey: "
|
|
1004
|
+
helpTextTransKey: "password_helpText",
|
|
1005
|
+
placeholderTransKey: "password_placeholder",
|
|
1016
1006
|
validator: multiValidation(
|
|
1017
1007
|
minLength(UserRestriction.password.minLength),
|
|
1018
1008
|
maxLength(UserRestriction.password.maxLength)
|
|
@@ -1022,8 +1012,8 @@ var AuthLoginDtoMeta = {
|
|
|
1022
1012
|
var AuthSignupDtoMeta = {
|
|
1023
1013
|
firstName: {
|
|
1024
1014
|
transKey: "first_name_label",
|
|
1025
|
-
helpTextTransKey: "
|
|
1026
|
-
placeholderTransKey: "
|
|
1015
|
+
helpTextTransKey: "firstName_helpText",
|
|
1016
|
+
placeholderTransKey: "firstName_placeholder",
|
|
1027
1017
|
validator: multiValidation(
|
|
1028
1018
|
minLength(UserRestriction.firstName.minLength),
|
|
1029
1019
|
maxLength(UserRestriction.firstName.maxLength)
|
|
@@ -1031,8 +1021,8 @@ var AuthSignupDtoMeta = {
|
|
|
1031
1021
|
},
|
|
1032
1022
|
lastName: {
|
|
1033
1023
|
transKey: "last_name_label",
|
|
1034
|
-
helpTextTransKey: "
|
|
1035
|
-
placeholderTransKey: "
|
|
1024
|
+
helpTextTransKey: "lastName_helpText",
|
|
1025
|
+
placeholderTransKey: "lastName_placeholder",
|
|
1036
1026
|
validator: multiValidation(
|
|
1037
1027
|
minLength(UserRestriction.lastName.minLength),
|
|
1038
1028
|
maxLength(UserRestriction.lastName.maxLength)
|
|
@@ -1040,14 +1030,14 @@ var AuthSignupDtoMeta = {
|
|
|
1040
1030
|
},
|
|
1041
1031
|
email: {
|
|
1042
1032
|
transKey: "email_label",
|
|
1043
|
-
helpTextTransKey: "
|
|
1044
|
-
placeholderTransKey: "
|
|
1033
|
+
helpTextTransKey: "email_helpText",
|
|
1034
|
+
placeholderTransKey: "email_placeholder",
|
|
1045
1035
|
validator: multiValidation(minLength(UserRestriction.email.minLength), maxLength(UserRestriction.email.maxLength))
|
|
1046
1036
|
},
|
|
1047
1037
|
password: {
|
|
1048
1038
|
transKey: "password_label",
|
|
1049
|
-
helpTextTransKey: "
|
|
1050
|
-
placeholderTransKey: "
|
|
1039
|
+
helpTextTransKey: "password_helpText",
|
|
1040
|
+
placeholderTransKey: "password_placeholder",
|
|
1051
1041
|
validator: multiValidation(
|
|
1052
1042
|
minLength(UserRestriction.password.minLength),
|
|
1053
1043
|
maxLength(UserRestriction.password.maxLength)
|
|
@@ -1695,4 +1685,4 @@ var validUuidChars = [
|
|
|
1695
1685
|
"F"
|
|
1696
1686
|
];
|
|
1697
1687
|
|
|
1698
|
-
export { APP_TYPE, ActivityRestriction, ActivityType, AddressCreateDtoMeta, AddressRestriction, AnswerRestriction, AppType, AuthApiService, AuthLoginDtoMeta, AuthSignupDtoMeta, BOT_PATH, BaseApiService, BookingAddonRestriction, BookingAddonType, BookingCreateDtoMeta, BookingRestriction, BookingStatusType, CaptchaService, CommentRestriction, CommonConfigService, DocumentService, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetCreateDtoMeta, PetRestriction, PetSexType, PetStatusType, PetType, QuestionCreateDtoMeta, QuestionForType, QuestionRestriction, QuestionType, SiteConfigService, UnavailabilityRestriction, UploadCreateDtoMeta, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserCreateDtoMeta, UserDtoMeta, UserRestriction, UserType, __decorateClass,
|
|
1688
|
+
export { APP_TYPE, ActivityRestriction, ActivityType, AddressCreateDtoMeta, AddressRestriction, AnswerRestriction, AppType, AuthApiService, AuthLoginDtoMeta, AuthSignupDtoMeta, BOT_PATH, BaseApiService, BookingAddonRestriction, BookingAddonType, BookingCreateDtoMeta, BookingRestriction, BookingStatusType, CaptchaService, CommentRestriction, CommonConfigService, DocumentService, DrivingRouteRestriction, LogService, MembershipRestriction, MembershipStatus, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetCreateDtoMeta, PetRestriction, PetSexType, PetStatusType, PetType, QuestionCreateDtoMeta, QuestionForType, QuestionRestriction, QuestionType, SiteConfigService, UnavailabilityRestriction, UploadCreateDtoMeta, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserCreateDtoMeta, UserDtoMeta, UserRestriction, UserType, __decorateClass, addDays, addMinutes, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiParams, apiRoute, arrayContains, arrayOfNLength, capitalizeFirstLetter, cyrb53, dateDiffInDays, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAppType, getArrFromEnum, getAuthApiService, getBotPath, getCaptchaService, getCommonConfig, getDefaultDtoMeta, getDocumentServ, getImageParams, getLog, getMimeTypeFromExtension, getPerformanceTimer, getSiteConfig, getWeekNumber, isBefore, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, multiValidation, nameof, noValidation, notNull, onTargetFiles, onTargetValue, onlyUnique, portalGlyphLength, preventDefault, randomIntFromRange, randomItemFromArray, selectedItemsExist, separateValidation, setContainerToken, shouldBeUrl, shouldBeYoutubeUrl, stopPropagation, timeout, uploadsThatNeedEncryption, uuidv4, validUuidChars, validateForEach, webAppTypes };
|