@candlerip/shared3 0.0.126 → 0.0.127

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/dictionary/dictionary/config.d.ts +9 -9
  3. package/src/dictionary/translation-id/common-page/config.d.ts +1 -1
  4. package/src/dictionary/translation-id/common-page/config.js +1 -0
  5. package/src/dictionary/translation-id/config.d.ts +1 -1
  6. package/src/dictionary/translation-id/config.js +1 -0
  7. package/src/index.d.ts +1 -0
  8. package/src/index.js +1 -0
  9. package/src/type/string/index.d.ts +2 -2
  10. package/src/type/string/index.js +2 -2
  11. package/src/type/string/validate-string/index.d.ts +2 -0
  12. package/src/type/string/{validate.js → validate-string/index.js} +7 -6
  13. package/src/type/string/validate-string/type.d.ts +7 -0
  14. package/src/type/string/validate-string/type.js +1 -0
  15. package/src/validator/index.d.ts +1 -0
  16. package/src/validator/index.js +1 -0
  17. package/src/validator/validator-regexp/config.d.ts +5 -0
  18. package/src/validator/validator-regexp/config.js +5 -0
  19. package/src/validator/validator-regexp/index.d.ts +2 -0
  20. package/src/validator/validator-regexp/index.js +2 -0
  21. package/src/validator/validator-regexp/type.d.ts +2 -0
  22. package/src/validator/validator-regexp/type.js +1 -0
  23. package/src/type/string/comma-separated/index.d.ts +0 -1
  24. package/src/type/string/comma-separated/index.js +0 -1
  25. package/src/type/string/validate.d.ts +0 -6
  26. /package/src/type/string/{comma-separated/validate.d.ts → validate-comma-separated-string/index.d.ts} +0 -0
  27. /package/src/type/string/{comma-separated/validate.js → validate-comma-separated-string/index.js} +0 -0
  28. /package/src/type/string/{comma-separated → validate-comma-separated-string}/types.d.ts +0 -0
  29. /package/src/type/string/{comma-separated → validate-comma-separated-string}/types.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.126",
3
+ "version": "0.0.127",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -1,29 +1,29 @@
1
1
  export declare const DICTIONARY_CONFIG: {
2
2
  readonly 'candle-details-page': {
3
- readonly translationIds: readonly ["auth.loginRequired", "acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "personCandles", "imageCannotBeLoaded", "burnsSoFar", "burnedOutCandle", "candle.description", "litName", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "cancel", "ok", "edit-candle-page", "candle-details-page", "person-details-page"];
3
+ readonly translationIds: readonly ["auth.loginRequired", "acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "personCandles", "imageCannotBeLoaded", "burnsSoFar", "burnedOutCandle", "candle.description", "litName", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "cancel", "ok", "edit-candle-page", "candle-details-page", "person-details-page"];
4
4
  };
5
5
  readonly 'candles-page': {
6
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "select", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "candles"];
6
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "select", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "candles"];
7
7
  };
8
8
  readonly 'contact-page': {
9
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "contact-page.infoTitle", "contact-page.sendMessage.submitError", "contact-page.sendMessage.submitSuccess", "contact-page.sendMessageTitle", "contact-page", "email", "formInvalidEmailError", "formInvalidText", "formRequiredError", "reset", "send", "message", "name", "subject", "facebook"];
9
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "contact-page.infoTitle", "contact-page.sendMessage.submitError", "contact-page.sendMessage.submitSuccess", "contact-page.sendMessageTitle", "contact-page", "email", "formInvalidEmailError", "formInvalidText", "formRequiredError", "reset", "send", "message", "name", "subject", "facebook"];
10
10
  };
11
11
  readonly 'cookie-policy-page': {
12
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "acceptAll", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookie-policy-page"];
12
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "acceptAll", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookie-policy-page"];
13
13
  };
14
14
  readonly 'edit-candle-page': {
15
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "candle-details-page", "auth.candleLitWarning", "reset", "candle.description", "formMaxLengthError", "formRequiredError", "litName", "edit-candle-page", "modify", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess"];
15
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "candle-details-page", "auth.candleLitWarning", "reset", "candle.description", "formMaxLengthError", "formRequiredError", "litName", "edit-candle-page", "modify", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess"];
16
16
  };
17
17
  readonly 'help-page': {
18
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "help-page", "help-page.intro", "persons", "help-page.personsParagraph", "help-page.addPersonTitle", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "candles", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.lightACandleTitle", "help-page.lightACandleRule1", "help-page.lightACandleRule2"];
18
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "help-page", "help-page.intro", "persons", "help-page.personsParagraph", "help-page.addPersonTitle", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "candles", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.lightACandleTitle", "help-page.lightACandleRule1", "help-page.lightACandleRule2"];
19
19
  };
20
20
  readonly 'home-page': {
21
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "lightACandle", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "candles", "home-page.lastLitCandles", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "persons", "home-page.lastUploadedPersons", "auth.cannotBeChangedLaterWarning", "more", "reset", "light-candle-page.maintenance.submitError", "lightTheCandle", "light-candle-page.maintenance.submitSuccess", "formMaxLengthError", "person.name", "formRequiredError", "litName", "burnedCandles", "burningCandles", "candles", "persons", "home-page.statistics", "add-person-page", "auth.cannotBeChangedLaterWarning", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "persons-map-page", "home-page.proposal"];
21
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "lightACandle", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "candles", "home-page.lastLitCandles", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "persons", "home-page.lastUploadedPersons", "auth.cannotBeChangedLaterWarning", "more", "reset", "light-candle-page.maintenance.submitError", "lightTheCandle", "light-candle-page.maintenance.submitSuccess", "formMaxLengthError", "person.name", "formRequiredError", "litName", "burnedCandles", "burningCandles", "candles", "persons", "home-page.statistics", "add-person-page", "auth.cannotBeChangedLaterWarning", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "persons-map-page", "home-page.proposal"];
22
22
  };
23
23
  readonly 'light-candle-page': {
24
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "personCandles", "auth.candleLitWarning", "reset", "candle.description", "formMaxLengthError", "formRequiredError", "litName", "lightTheCandle", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "light-candle-page"];
24
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "personCandles", "auth.candleLitWarning", "reset", "candle.description", "formMaxLengthError", "formRequiredError", "litName", "lightTheCandle", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "light-candle-page"];
25
25
  };
26
26
  readonly 'terms-and-conditions-page': {
27
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "terms-and-conditions-page.intro", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.userAccountsTitle", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page"];
27
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "terms-and-conditions-page.intro", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.userAccountsTitle", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page"];
28
28
  };
29
29
  };
@@ -1 +1 @@
1
- export declare const COMMON_PAGE_TRANSLATION_IDS: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook"];
1
+ export declare const COMMON_PAGE_TRANSLATION_IDS: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook"];
@@ -17,6 +17,7 @@ export const COMMON_PAGE_TRANSLATION_IDS = [
17
17
  'hungarian',
18
18
  'add-person-page',
19
19
  'candles-page',
20
+ 'pageMenu.candles-page',
20
21
  'pageMenu.contact-page',
21
22
  'pageMenu.cookie-policy-page',
22
23
  'pageMenu.help-page',
@@ -1 +1 @@
1
- export declare const TRANSLATION_IDS: readonly ["acceptAll", "add-person-page", "add-person-page.maintenance.submitError", "add-person-page.maintenance.submitSuccess", "auth.cannotBeChangedLaterWarning", "auth.candleLitWarning", "auth.loginRequired", "author", "burnedCandles", "burnedOutCandle", "burningCandles", "burnsSoFar", "cancel", "candle-details-page", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "candle", "candlesInCount", "candles", "candles-page", "candle.description", "caseSensitive", "contact-page", "contact-page.infoTitle", "contact-page.sendMessage.submitError", "contact-page.sendMessage.submitSuccess", "contact-page.sendMessageTitle", "cookieConsentForm.title", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookie-policy-page", "count", "createdAt", "customize", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "edit-candle-page", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess", "editPersonPage", "editPersonPage.maintenance.submitError", "editPersonPage.maintenance.submitSuccess", "email", "english", "facebook", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "help-page.addPersonTitle", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.intro", "help-page.lightACandleRule1", "help-page.lightACandleRule2", "help-page.lightACandleTitle", "help-page.personsParagraph", "help-page", "home-page", "home-page.proposal", "home-page.lastLitCandles", "home-page.lastUploadedPersons", "home-page.quickCandleLighting.placeOfTheCandle.placehodler", "home-page.quickCandleLighting", "home-page.statistics", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "hungarian", "formDateError", "formInvalidEmailError", "formInvalidText", "formMaxLengthError", "formMessageError", "formRequiredError", "image", "invalidImage", "noMoreImages", "tooBigImage", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "light-candle-page", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "lightTheCandle", "litName", "login", "loginPage.login.submitError", "loginPage.login.showPassword", "logout", "map", "message", "modify", "more", "motto1", "motto2", "motto3", "myCandles", "myPersons", "name", "ok", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "password", "person", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "person.name", "personCandles", "personCandlesPage.addCandle.description", "person-details-page", "person-details-page.deletePerson.submitError", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "persons-page", "persons", "personsInCount", "persons-page.addPerson.description", "persons-page.personsList.hasImage", "persons-page.personsList", "persons-map-page.map.description", "persons-map-page", "proposable", "redirecting", "rejectAll", "reset", "save", "savedSuccessfully", "select", "send", "shareOnFacebook", "sort", "subject", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intro", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.userAccountsTitle", "username"];
1
+ export declare const TRANSLATION_IDS: readonly ["acceptAll", "add-person-page", "add-person-page.maintenance.submitError", "add-person-page.maintenance.submitSuccess", "auth.cannotBeChangedLaterWarning", "auth.candleLitWarning", "auth.loginRequired", "author", "burnedCandles", "burnedOutCandle", "burningCandles", "burnsSoFar", "cancel", "candle-details-page", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "candle", "candlesInCount", "candles", "candles-page", "candle.description", "caseSensitive", "contact-page", "contact-page.infoTitle", "contact-page.sendMessage.submitError", "contact-page.sendMessage.submitSuccess", "contact-page.sendMessageTitle", "cookieConsentForm.title", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookie-policy-page", "count", "createdAt", "customize", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "edit-candle-page", "edit-candle-page.maintenance.submitError", "edit-candle-page.maintenance.submitSuccess", "editPersonPage", "editPersonPage.maintenance.submitError", "editPersonPage.maintenance.submitSuccess", "email", "english", "facebook", "help-page.addPersonRule1", "help-page.addPersonRule2", "help-page.addPersonRule3", "help-page.addPersonRule4", "help-page.addPersonTitle", "help-page.candlesParagraph1", "help-page.candlesParagraph2", "help-page.candlesParagraph3", "help-page.intro", "help-page.lightACandleRule1", "help-page.lightACandleRule2", "help-page.lightACandleTitle", "help-page.personsParagraph", "help-page", "home-page", "home-page.proposal", "home-page.lastLitCandles", "home-page.lastUploadedPersons", "home-page.quickCandleLighting.placeOfTheCandle.placehodler", "home-page.quickCandleLighting", "home-page.statistics", "home-page.welcome.description1", "home-page.welcome.description2", "home-page.welcome", "hungarian", "formDateError", "formInvalidEmailError", "formInvalidText", "formMaxLengthError", "formMessageError", "formRequiredError", "image", "invalidImage", "noMoreImages", "tooBigImage", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "light-candle-page", "light-candle-page.maintenance.submitError", "light-candle-page.maintenance.submitSuccess", "lightTheCandle", "litName", "login", "loginPage.login.submitError", "loginPage.login.showPassword", "logout", "map", "message", "modify", "more", "motto1", "motto2", "motto3", "myCandles", "myPersons", "name", "ok", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.terms-and-conditions-page", "password", "person", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "person.name", "personCandles", "personCandlesPage.addCandle.description", "person-details-page", "person-details-page.deletePerson.submitError", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "persons-page", "persons", "personsInCount", "persons-page.addPerson.description", "persons-page.personsList.hasImage", "persons-page.personsList", "persons-map-page.map.description", "persons-map-page", "proposable", "redirecting", "rejectAll", "reset", "save", "savedSuccessfully", "select", "send", "shareOnFacebook", "sort", "subject", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "terms-and-conditions-page.applicableLawParagraph", "terms-and-conditions-page.applicableLawTitle", "terms-and-conditions-page.conditionsOfUseParagraph", "terms-and-conditions-page.conditionsOfUseTitle", "terms-and-conditions-page.disputesParagraph", "terms-and-conditions-page.disputesTitle", "terms-and-conditions-page.intellectualPropertyParagraph", "terms-and-conditions-page.intellectualPropertyTitle", "terms-and-conditions-page.intro", "terms-and-conditions-page.limitationAndLiabilityParagraph", "terms-and-conditions-page.limitationAndLiabilityTitle", "terms-and-conditions-page", "terms-and-conditions-page.userAccountsParagraph", "terms-and-conditions-page.userAccountsTitle", "username"];
@@ -116,6 +116,7 @@ export const TRANSLATION_IDS = [
116
116
  'myPersons',
117
117
  'name',
118
118
  'ok',
119
+ 'pageMenu.candles-page',
119
120
  'pageMenu.contact-page',
120
121
  'pageMenu.cookie-policy-page',
121
122
  'pageMenu.help-page',
package/src/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from './helper/index.js';
5
5
  export * from './page/index.js';
6
6
  export * from './project/index.js';
7
7
  export * from './type/index.js';
8
+ export * from './validator/index.js';
package/src/index.js CHANGED
@@ -5,3 +5,4 @@ export * from './helper/index.js';
5
5
  export * from './page/index.js';
6
6
  export * from './project/index.js';
7
7
  export * from './type/index.js';
8
+ export * from './validator/index.js';
@@ -1,3 +1,3 @@
1
1
  export * from './type-guard.js';
2
- export * from './validate.js';
3
- export * from './comma-separated/index.js';
2
+ export * from './validate-string/index.js';
3
+ export * from './validate-comma-separated-string/index.js';
@@ -1,3 +1,3 @@
1
1
  export * from './type-guard.js';
2
- export * from './validate.js';
3
- export * from './comma-separated/index.js';
2
+ export * from './validate-string/index.js';
3
+ export * from './validate-comma-separated-string/index.js';
@@ -0,0 +1,2 @@
1
+ import { ValidateString } from './type.js';
2
+ export declare const validateString: ValidateString;
@@ -1,7 +1,8 @@
1
- import { customErrorWorker } from '../../error/index.js';
2
- import { isString } from './type-guard.js';
3
- export const validateString = (data, name, regexp) => {
4
- const { composeCustomError } = customErrorWorker({ data, ...(regexp && { regexp: regexp?.source }) });
1
+ import { customErrorWorker } from '../../../error/index.js';
2
+ import { VALIDATOR_REG_EXP } from '../../../validator/index.js';
3
+ import { isString } from '../type-guard.js';
4
+ export const validateString = (data, name, validatorRegExpKey) => {
5
+ const { composeCustomError } = customErrorWorker({ data, ...(validatorRegExpKey && { validatorRegExpKey }) });
5
6
  if (!data) {
6
7
  return {
7
8
  customError: composeCustomError(`Missing ${name}`),
@@ -12,8 +13,8 @@ export const validateString = (data, name, regexp) => {
12
13
  customError: composeCustomError(`${name} not string`),
13
14
  };
14
15
  }
15
- if (regexp) {
16
- if (!regexp.test(data)) {
16
+ if (validatorRegExpKey) {
17
+ if (!VALIDATOR_REG_EXP[validatorRegExpKey].test(data)) {
17
18
  return {
18
19
  customError: composeCustomError(`Invalid ${name}`),
19
20
  };
@@ -0,0 +1,7 @@
1
+ import { CustomError } from '../../../error/index.js';
2
+ import { ValidatorRegExpKey } from '../../../validator/index.js';
3
+ export type ValidateString = (data: unknown, name: string, validatorRegExpKey?: ValidatorRegExpKey) => {
4
+ data: string;
5
+ } | {
6
+ customError: CustomError;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './validator-regexp/index.js';
@@ -0,0 +1 @@
1
+ export * from './validator-regexp/index.js';
@@ -0,0 +1,5 @@
1
+ export declare const VALIDATOR_REG_EXP: {
2
+ date: RegExp;
3
+ email: RegExp;
4
+ text: RegExp;
5
+ };
@@ -0,0 +1,5 @@
1
+ export const VALIDATOR_REG_EXP = {
2
+ date: /^[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}$/,
3
+ email: /^\S+@\S+\.\S+$/,
4
+ text: /(?=^[^<>]*$).*\S.*/,
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ import { VALIDATOR_REG_EXP } from './config.js';
2
+ export type ValidatorRegExpKey = keyof typeof VALIDATOR_REG_EXP;
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +0,0 @@
1
- export * from './validate.js';
@@ -1 +0,0 @@
1
- export * from './validate.js';
@@ -1,6 +0,0 @@
1
- import { CustomError } from '../../error/index.js';
2
- export declare const validateString: (data: unknown, name: string, regexp?: RegExp) => {
3
- data: string;
4
- } | {
5
- customError: CustomError;
6
- };