@candlerip/shared3 0.0.95 → 0.0.97

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/package.json +1 -1
  2. package/src/dictionary/dictionary/config.d.ts +4 -1
  3. package/src/dictionary/dictionary/config.js +5 -1
  4. package/src/filter-sort/filter-sort/candle-filter-sort/domains/index.d.ts +12 -0
  5. package/src/filter-sort/filter-sort/candle-filter-sort/domains/index.js +1 -0
  6. package/src/filter-sort/filter-sort/candle-filter-sort/index.d.ts +1 -0
  7. package/src/filter-sort/filter-sort/candle-filter-sort/index.js +1 -0
  8. package/src/filter-sort/filter-sort/index.d.ts +2 -0
  9. package/src/filter-sort/filter-sort/index.js +2 -0
  10. package/src/filter-sort/filter-sort/person-filter-sort/domains/index.d.ts +14 -0
  11. package/src/filter-sort/filter-sort/person-filter-sort/domains/index.js +1 -0
  12. package/src/filter-sort/filter-sort/person-filter-sort/index.d.ts +1 -0
  13. package/src/filter-sort/filter-sort/person-filter-sort/index.js +1 -0
  14. package/src/filter-sort/index.d.ts +4 -0
  15. package/src/filter-sort/index.js +4 -0
  16. package/src/filter-sort/sort/domains/index.d.ts +5 -0
  17. package/src/filter-sort/sort/domains/index.js +1 -0
  18. package/src/filter-sort/sort/index.d.ts +1 -0
  19. package/src/filter-sort/sort/index.js +1 -0
  20. package/src/filter-sort/sort-name/candle-sort-name/configs/index.d.ts +1 -0
  21. package/src/filter-sort/sort-name/candle-sort-name/configs/index.js +1 -0
  22. package/src/filter-sort/sort-name/candle-sort-name/domains/index.d.ts +2 -0
  23. package/src/filter-sort/sort-name/candle-sort-name/domains/index.js +1 -0
  24. package/src/filter-sort/sort-name/candle-sort-name/index.d.ts +3 -0
  25. package/src/filter-sort/sort-name/candle-sort-name/index.js +3 -0
  26. package/src/filter-sort/sort-name/candle-sort-name/type-guards/index.d.ts +1 -0
  27. package/src/filter-sort/sort-name/candle-sort-name/type-guards/index.js +1 -0
  28. package/src/filter-sort/sort-name/candle-sort-name/type-guards/is-candle-sort-name/index.d.ts +2 -0
  29. package/src/filter-sort/sort-name/candle-sort-name/type-guards/is-candle-sort-name/index.js +4 -0
  30. package/src/filter-sort/sort-name/index.d.ts +2 -0
  31. package/src/filter-sort/sort-name/index.js +2 -0
  32. package/src/filter-sort/sort-name/person-sort-name/configs/index.d.ts +1 -0
  33. package/src/filter-sort/sort-name/person-sort-name/configs/index.js +1 -0
  34. package/src/filter-sort/sort-name/person-sort-name/domains/index.d.ts +2 -0
  35. package/src/filter-sort/sort-name/person-sort-name/domains/index.js +1 -0
  36. package/src/filter-sort/sort-name/person-sort-name/index.d.ts +3 -0
  37. package/src/filter-sort/sort-name/person-sort-name/index.js +3 -0
  38. package/src/filter-sort/sort-name/person-sort-name/type-guards/index.d.ts +1 -0
  39. package/src/filter-sort/sort-name/person-sort-name/type-guards/index.js +1 -0
  40. package/src/filter-sort/sort-name/person-sort-name/type-guards/is-person-sort-name/index.d.ts +2 -0
  41. package/src/filter-sort/sort-name/person-sort-name/type-guards/is-person-sort-name/index.js +4 -0
  42. package/src/filter-sort/sort-order/configs/index.d.ts +1 -0
  43. package/src/filter-sort/sort-order/configs/index.js +1 -0
  44. package/src/filter-sort/sort-order/domains/index.d.ts +2 -0
  45. package/src/filter-sort/sort-order/domains/index.js +1 -0
  46. package/src/filter-sort/sort-order/index.d.ts +3 -0
  47. package/src/filter-sort/sort-order/index.js +3 -0
  48. package/src/filter-sort/sort-order/type-guards/index.d.ts +1 -0
  49. package/src/filter-sort/sort-order/type-guards/index.js +1 -0
  50. package/src/filter-sort/sort-order/type-guards/is-sort-order/index.d.ts +2 -0
  51. package/src/filter-sort/sort-order/type-guards/is-sort-order/index.js +4 -0
  52. package/src/index.d.ts +1 -0
  53. package/src/index.js +1 -0
  54. package/src/page/page/config.d.ts +1 -1
  55. package/src/page/page/config.js +1 -0
  56. package/src/page/page-data/candles-page-data.type.d.ts +7 -0
  57. package/src/page/page-data/candles-page-data.type.js +1 -0
  58. package/src/page/page-data/index.d.ts +1 -0
  59. package/src/page/page-data/index.js +1 -0
  60. package/src/ssr/server-side-props/candle-details-page/type.d.ts +1 -1
  61. package/src/ssr/server-side-props/candles-page-server-side-props.type.d.ts +11 -0
  62. package/src/ssr/server-side-props/candles-page-server-side-props.type.js +1 -0
  63. package/src/ssr/server-side-props/index.d.ts +1 -0
  64. package/src/ssr/server-side-props/index.js +1 -0
  65. package/src/ssr/server-side-props/type.d.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.95",
3
+ "version": "0.0.97",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,6 +1,9 @@
1
1
  export declare const DICTIONARY_CONFIG: {
2
2
  readonly 'candle-details-page': {
3
- 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", "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.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
+ };
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"];
4
7
  };
5
8
  readonly 'contact-page': {
6
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"];
@@ -1,7 +1,8 @@
1
- import { CANDLE_CARDS_TRANSLATION_IDS, CANDLE_IMAGE_TRANSLATION_IDS, CANDLE_MAINTENANCE_TRANSLATION_IDS, COMMON_PAGE_TRANSLATION_IDS, PERSON_CARDS_TRANSLATION_IDS, PERSON_IMAGE_TRANSLATION_IDS, } from '../translation-ids/index.js';
1
+ import { CANDLE_CARDS_TRANSLATION_IDS, CANDLE_IMAGE_TRANSLATION_IDS, CANDLE_MAINTENANCE_TRANSLATION_IDS, CANDLES_LIST_TRANSLATION_IDS, COMMON_PAGE_TRANSLATION_IDS, PERSON_CARDS_TRANSLATION_IDS, PERSON_IMAGE_TRANSLATION_IDS, } from '../translation-ids/index.js';
2
2
  export const DICTIONARY_CONFIG = {
3
3
  'candle-details-page': {
4
4
  translationIds: [
5
+ 'auth.loginRequired',
5
6
  ...COMMON_PAGE_TRANSLATION_IDS,
6
7
  'personCandles',
7
8
  ...CANDLE_IMAGE_TRANSLATION_IDS,
@@ -29,6 +30,9 @@ export const DICTIONARY_CONFIG = {
29
30
  'person-details-page',
30
31
  ],
31
32
  },
33
+ 'candles-page': {
34
+ translationIds: [...COMMON_PAGE_TRANSLATION_IDS, ...CANDLES_LIST_TRANSLATION_IDS, 'candles'],
35
+ },
32
36
  'contact-page': {
33
37
  translationIds: [
34
38
  ...COMMON_PAGE_TRANSLATION_IDS,
@@ -0,0 +1,12 @@
1
+ import { BurningCandleState } from '../../../../candle/index.js';
2
+ import { CandleSortName } from '../../../sort-name/index.js';
3
+ import { SortOrder } from '../../../sort-order/index.js';
4
+ export interface CandleFilterSort {
5
+ count: number;
6
+ burning_states?: BurningCandleState[];
7
+ person_id?: string;
8
+ skip_count?: number;
9
+ sort_name: CandleSortName;
10
+ sort_order: SortOrder;
11
+ user_id?: string;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './candle-filter-sort/index.js';
2
+ export * from './person-filter-sort/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './candle-filter-sort/index.js';
2
+ export * from './person-filter-sort/index.js';
@@ -0,0 +1,14 @@
1
+ import { CountryCode } from '../../../../geographical/index.js';
2
+ import { PersonSortName } from '../../../sort-name/index.js';
3
+ import { SortOrder } from '../../../sort-order/index.js';
4
+ export interface PersonFilterSort {
5
+ count: number;
6
+ name?: string;
7
+ name_case_sensitive?: boolean;
8
+ place_of_births?: CountryCode[];
9
+ skip_count?: number;
10
+ sort_name: PersonSortName;
11
+ sort_order: SortOrder;
12
+ user_id?: string;
13
+ with_photo?: boolean;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './filter-sort/index.js';
2
+ export * from './sort/index.js';
3
+ export * from './sort-name/index.js';
4
+ export * from './sort-order/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './filter-sort/index.js';
2
+ export * from './sort/index.js';
3
+ export * from './sort-name/index.js';
4
+ export * from './sort-order/index.js';
@@ -0,0 +1,5 @@
1
+ import { SortOrder } from '../../sort-order/index.js';
2
+ export type Sort<T> = {
3
+ name: T;
4
+ order: SortOrder;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export declare const CANDLE_SORT_NAMES: readonly ["burningEndsAt", "createdAt", "litAt", "litName"];
@@ -0,0 +1 @@
1
+ export const CANDLE_SORT_NAMES = ['burningEndsAt', 'createdAt', 'litAt', 'litName'];
@@ -0,0 +1,2 @@
1
+ import { CANDLE_SORT_NAMES } from '../configs/index.js';
2
+ export type CandleSortName = (typeof CANDLE_SORT_NAMES)[number];
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-candle-sort-name/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-candle-sort-name/index.js';
@@ -0,0 +1,2 @@
1
+ import { CandleSortName } from '../../domains/index.js';
2
+ export declare const isCandleSortName: (data?: unknown) => data is CandleSortName;
@@ -0,0 +1,4 @@
1
+ import { CANDLE_SORT_NAMES } from '../../configs/index.js';
2
+ export const isCandleSortName = (data) => {
3
+ return CANDLE_SORT_NAMES.some((it) => data === it);
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './candle-sort-name/index.js';
2
+ export * from './person-sort-name/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './candle-sort-name/index.js';
2
+ export * from './person-sort-name/index.js';
@@ -0,0 +1 @@
1
+ export declare const PERSON_SORT_NAMES: readonly ["createdAt", "name"];
@@ -0,0 +1 @@
1
+ export const PERSON_SORT_NAMES = ['createdAt', 'name'];
@@ -0,0 +1,2 @@
1
+ import { PERSON_SORT_NAMES } from '../configs/index.js';
2
+ export type PersonSortName = (typeof PERSON_SORT_NAMES)[number];
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-person-sort-name/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-person-sort-name/index.js';
@@ -0,0 +1,2 @@
1
+ import { PersonSortName } from '../../domains/index.js';
2
+ export declare const isPersonSortName: (data?: unknown) => data is PersonSortName;
@@ -0,0 +1,4 @@
1
+ import { PERSON_SORT_NAMES } from '../../configs/index.js';
2
+ export const isPersonSortName = (data) => {
3
+ return PERSON_SORT_NAMES.some((it) => data === it);
4
+ };
@@ -0,0 +1 @@
1
+ export declare const SORT_ORDERS: readonly ["asc", "desc"];
@@ -0,0 +1 @@
1
+ export const SORT_ORDERS = ['asc', 'desc'];
@@ -0,0 +1,2 @@
1
+ import { SORT_ORDERS } from '../configs/index.js';
2
+ export type SortOrder = (typeof SORT_ORDERS)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-sort-order/index.js';
@@ -0,0 +1 @@
1
+ export * from './is-sort-order/index.js';
@@ -0,0 +1,2 @@
1
+ import { SortOrder } from '../../domains/index.js';
2
+ export declare const isSortOrder: (data?: unknown) => data is SortOrder;
@@ -0,0 +1,4 @@
1
+ import { SORT_ORDERS } from '../../configs/index.js';
2
+ export const isSortOrder = (data) => {
3
+ return SORT_ORDERS.some((it) => data === it);
4
+ };
package/src/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './database/index.js';
6
6
  export * from './date/index.js';
7
7
  export * from './environment/index.js';
8
8
  export * from './error/index.js';
9
+ export * from './filter-sort/index.js';
9
10
  export * from './geographical/index.js';
10
11
  export * from './helper/index.js';
11
12
  export * from './image/index.js';
package/src/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './database/index.js';
6
6
  export * from './date/index.js';
7
7
  export * from './environment/index.js';
8
8
  export * from './error/index.js';
9
+ export * from './filter-sort/index.js';
9
10
  export * from './geographical/index.js';
10
11
  export * from './helper/index.js';
11
12
  export * from './image/index.js';
@@ -1 +1 @@
1
- export declare const PAGES: readonly ["candle-details-page", "contact-page", "cookie-policy-page", "edit-candle-page", "help-page", "home-page", "light-candle-page", "terms-and-conditions-page"];
1
+ export declare const PAGES: readonly ["candle-details-page", "candles-page", "contact-page", "cookie-policy-page", "edit-candle-page", "help-page", "home-page", "light-candle-page", "terms-and-conditions-page"];
@@ -1,5 +1,6 @@
1
1
  export const PAGES = [
2
2
  'candle-details-page',
3
+ 'candles-page',
3
4
  'contact-page',
4
5
  'cookie-policy-page',
5
6
  'edit-candle-page',
@@ -0,0 +1,7 @@
1
+ import { CandleExtPerson } from '../../candle/index.js';
2
+ export interface CandlesPageData {
3
+ candlesList: {
4
+ candles: CandleExtPerson[];
5
+ candlesCount: number;
6
+ };
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from './candle-details/index.js';
2
+ export * from './candles-page-data.type.js';
2
3
  export * from './edit-candle/index.js';
3
4
  export * from './light-candle/index.js';
@@ -1,3 +1,4 @@
1
1
  export * from './candle-details/index.js';
2
+ export * from './candles-page-data.type.js';
2
3
  export * from './edit-candle/index.js';
3
4
  export * from './light-candle/index.js';
@@ -2,7 +2,7 @@ import { Auth } from '../../../auth/index.js';
2
2
  import { CookieConsent } from '../../../cookie/index.js';
3
3
  import { Dictionary, Language } from '../../../dictionary/index.js';
4
4
  import { CandleDetailsPageData } from '../../../page/index.js';
5
- export interface CandleDetailsServerSideProps {
5
+ export interface CandleDetailsPageServerSideProps {
6
6
  auth: Auth;
7
7
  cookieConsent?: CookieConsent;
8
8
  dictionary: Dictionary;
@@ -0,0 +1,11 @@
1
+ import { Auth } from '../../auth/index.js';
2
+ import { CookieConsent } from '../../cookie/index.js';
3
+ import { Dictionary, Language } from '../../dictionary/index.js';
4
+ import { CandlesPageData } from '../../page/index.js';
5
+ export interface CandlesPageServerSideProps {
6
+ auth: Auth;
7
+ cookieConsent?: CookieConsent;
8
+ dictionary: Dictionary;
9
+ language: Language;
10
+ pageData: CandlesPageData;
11
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './candle-details-page/index.js';
2
+ export * from './candles-page-server-side-props.type.js';
2
3
  export * from './edit-candle-page/index.js';
3
4
  export * from './light-candle-page/index.js';
4
5
  export * from './contact-page/index.js';
@@ -1,4 +1,5 @@
1
1
  export * from './candle-details-page/index.js';
2
+ export * from './candles-page-server-side-props.type.js';
2
3
  export * from './edit-candle-page/index.js';
3
4
  export * from './light-candle-page/index.js';
4
5
  export * from './contact-page/index.js';
@@ -4,5 +4,6 @@ import { CookiePolicyPageServerSideProps } from './cookie-policy-page/type.js';
4
4
  import { HelpPageServerSideProps } from './help-page/type.js';
5
5
  import { TermsAndConditionsPageServerSideProps } from './terms-and-conditions-page/type.js';
6
6
  import { EditCandleServerSideProps } from './edit-candle-page/index.js';
7
- import { CandleDetailsServerSideProps } from './candle-details-page/index.js';
8
- export type ServerSideProps = CandleDetailsServerSideProps | ContactPageServerSideProps | CookiePolicyPageServerSideProps | EditCandleServerSideProps | HelpPageServerSideProps | LightCandlePageServerSideProps | TermsAndConditionsPageServerSideProps;
7
+ import { CandleDetailsPageServerSideProps } from './candle-details-page/index.js';
8
+ import { CandlesPageServerSideProps } from './candles-page-server-side-props.type.js';
9
+ export type ServerSideProps = CandleDetailsPageServerSideProps | CandlesPageServerSideProps | ContactPageServerSideProps | CookiePolicyPageServerSideProps | EditCandleServerSideProps | HelpPageServerSideProps | LightCandlePageServerSideProps | TermsAndConditionsPageServerSideProps;