@goodhood-web/nebenan-base 4.5.0-development.2 → 4.5.0-development.20

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.
Files changed (57) hide show
  1. package/index.js +98 -96
  2. package/index.mjs +19276 -18942
  3. package/lib/Authentication/Registration/RegistrationForm/Steps/Email.d.ts +3 -0
  4. package/lib/ContentCreator/ContentCreator.d.ts +1 -1
  5. package/lib/ContentCreator/ContentCreatorForm.d.ts +2 -2
  6. package/lib/ContentCreator/ContentCreatorForm.types.d.ts +32 -5
  7. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/ContentCreatorFieldsWrapper.d.ts +2 -2
  8. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.d.ts +3 -3
  9. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.types.d.ts +10 -0
  10. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.d.ts +1 -1
  11. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.types.d.ts +1 -0
  12. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.d.ts +1 -1
  13. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.types.d.ts +2 -0
  14. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/CategoryModalField.d.ts +1 -1
  15. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormCategory.d.ts +5 -2
  16. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormLocation.d.ts +5 -2
  17. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/ListModalField.types.d.ts +5 -0
  18. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/LocationModalField.d.ts +1 -1
  19. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.d.ts +1 -1
  20. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.types.d.ts +1 -0
  21. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/FormRichTextArea.d.ts +7 -5
  22. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.d.ts +1 -1
  23. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.types.d.ts +5 -0
  24. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/ReachTypeField.d.ts +1 -1
  25. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/ReachTypeFields.types.d.ts +4 -1
  26. package/lib/ContentCreator/constants.d.ts +0 -84
  27. package/lib/ContentCreator/mockedData.d.ts +4 -0
  28. package/lib/ContentCreator/network.d.ts +2 -2
  29. package/lib/ContentCreator/utils/general.d.ts +0 -2
  30. package/lib/ContentCreator/utils/payloadGenerators.d.ts +3 -3
  31. package/lib/ContentCreator/validationSchemas/commonSchemas.d.ts +1 -1
  32. package/lib/ContentCreator/validationSchemas/dynamicValidationSchema.d.ts +17 -17
  33. package/lib/ContentCreator/validationSchemas/eventSchema.d.ts +3 -3
  34. package/lib/ContentCreator/validationSchemas/marketplaceSchema.d.ts +5 -5
  35. package/lib/ContentCreator/validationSchemas/postSchema.d.ts +9 -9
  36. package/lib/Feed/FeedItem/Marketplace/MarketplaceBody/MarketplaceBody.d.ts +1 -1
  37. package/lib/Feed/FeedItem/Marketplace/MarketplaceBody/MarketplaceBody.types.d.ts +1 -0
  38. package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.d.ts +3 -1
  39. package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types.d.ts +1 -0
  40. package/lib/Feed/FeedItem/Replies/ReplySection/network.d.ts +1 -0
  41. package/lib/Feed/FeedItem/Replies/ReplySection/utils.d.ts +1 -0
  42. package/lib/Feed/utils.d.ts +1 -0
  43. package/lib/Forms/Fields/PasswordField/PasswordField.d.ts +1 -1
  44. package/lib/Forms/Fields/PasswordField/PasswordField.types.d.ts +1 -0
  45. package/lib/Forms/Fields/PasswordField/utils.d.ts +1 -1
  46. package/lib/Forms/Fields/utils.d.ts +2 -0
  47. package/lib/MultiImageCropper/components/ImageCropperPanel/ImageCropperPanel.d.ts +1 -1
  48. package/lib/PremiumFeaturePanel/PremiumFeaturePanel.d.ts +1 -1
  49. package/lib/PremiumFeaturePanel/PremiumFeaturePanel.types.d.ts +2 -0
  50. package/lib/RichTextArea/RichTextArea.types.d.ts +4 -0
  51. package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +1 -0
  52. package/lib/RichTextArea/lexical/plugins/MentionPlugin.d.ts +2 -1
  53. package/lib/RichTextArea/lexical/utils.d.ts +1 -1
  54. package/lib/SearchableList/SearchableList.d.ts +1 -1
  55. package/lib/SearchableList/SearchableList.types.d.ts +1 -0
  56. package/package.json +3 -2
  57. package/style.css +1 -1
@@ -108,7 +108,7 @@ export declare const eventValidationSchema: z.ZodObject<{
108
108
  label: string;
109
109
  gid?: string | undefined;
110
110
  }>;
111
- reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
111
+ reach: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
112
112
  starts_at_date: z.ZodDate;
113
113
  starts_at_time: z.ZodDate;
114
114
  subject: z.ZodString;
@@ -136,7 +136,7 @@ export declare const eventValidationSchema: z.ZodObject<{
136
136
  };
137
137
  content_type: "event";
138
138
  subject: string;
139
- reach: "profile" | "public" | "hood" | "extended";
139
+ reach: "group" | "profile" | "public" | "hood" | "extended";
140
140
  starts_at_date: Date;
141
141
  starts_at_time: Date;
142
142
  images?: {
@@ -171,7 +171,7 @@ export declare const eventValidationSchema: z.ZodObject<{
171
171
  };
172
172
  content_type: "event";
173
173
  subject: string;
174
- reach: "profile" | "public" | "hood" | "extended";
174
+ reach: "group" | "profile" | "public" | "hood" | "extended";
175
175
  starts_at_date: Date;
176
176
  starts_at_time: Date;
177
177
  images?: {
@@ -111,7 +111,7 @@ export declare const marketplaceValidationSchema: z.ZodEffects<z.ZodObject<{
111
111
  pill?: string | undefined;
112
112
  }>;
113
113
  price: z.ZodNullable<z.ZodOptional<z.ZodString>>;
114
- reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
114
+ reach: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
115
115
  subject: z.ZodString;
116
116
  }, "strip", z.ZodTypeAny, {
117
117
  content: {
@@ -144,7 +144,7 @@ export declare const marketplaceValidationSchema: z.ZodEffects<z.ZodObject<{
144
144
  signedId?: string | undefined;
145
145
  }[]];
146
146
  subject: string;
147
- reach: "profile" | "public" | "hood" | "extended";
147
+ reach: "group" | "profile" | "public" | "hood" | "extended";
148
148
  marketplace_item_type: string;
149
149
  premium_feature: {
150
150
  id: string;
@@ -183,7 +183,7 @@ export declare const marketplaceValidationSchema: z.ZodEffects<z.ZodObject<{
183
183
  signedId?: string | undefined;
184
184
  }[]];
185
185
  subject: string;
186
- reach: "profile" | "public" | "hood" | "extended";
186
+ reach: "group" | "profile" | "public" | "hood" | "extended";
187
187
  marketplace_item_type: string;
188
188
  premium_feature: {
189
189
  id: string;
@@ -222,7 +222,7 @@ export declare const marketplaceValidationSchema: z.ZodEffects<z.ZodObject<{
222
222
  signedId?: string | undefined;
223
223
  }[]];
224
224
  subject: string;
225
- reach: "profile" | "public" | "hood" | "extended";
225
+ reach: "group" | "profile" | "public" | "hood" | "extended";
226
226
  marketplace_item_type: string;
227
227
  premium_feature: {
228
228
  id: string;
@@ -261,7 +261,7 @@ export declare const marketplaceValidationSchema: z.ZodEffects<z.ZodObject<{
261
261
  signedId?: string | undefined;
262
262
  }[]];
263
263
  subject: string;
264
- reach: "profile" | "public" | "hood" | "extended";
264
+ reach: "group" | "profile" | "public" | "hood" | "extended";
265
265
  marketplace_item_type: string;
266
266
  premium_feature: {
267
267
  id: string;
@@ -79,7 +79,7 @@ export declare const postValidationSchema: z.ZodObject<{
79
79
  } | undefined;
80
80
  }>;
81
81
  content_type: z.ZodLiteral<"post">;
82
- reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
82
+ reach: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
83
83
  subject: z.ZodString;
84
84
  }, "strip", z.ZodTypeAny, {
85
85
  content: {
@@ -100,7 +100,7 @@ export declare const postValidationSchema: z.ZodObject<{
100
100
  };
101
101
  content_type: "post";
102
102
  subject: string;
103
- reach: "profile" | "public" | "hood" | "extended";
103
+ reach: "group" | "profile" | "public" | "hood" | "extended";
104
104
  }, {
105
105
  content: {
106
106
  body: string;
@@ -120,7 +120,7 @@ export declare const postValidationSchema: z.ZodObject<{
120
120
  };
121
121
  content_type: "post";
122
122
  subject: string;
123
- reach: "profile" | "public" | "hood" | "extended";
123
+ reach: "group" | "profile" | "public" | "hood" | "extended";
124
124
  }>;
125
125
  export declare const searchValidationSchema: z.ZodObject<{
126
126
  content: z.ZodObject<{
@@ -202,7 +202,7 @@ export declare const searchValidationSchema: z.ZodObject<{
202
202
  } | undefined;
203
203
  }>;
204
204
  content_type: z.ZodLiteral<"search">;
205
- reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
205
+ reach: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
206
206
  subject: z.ZodString;
207
207
  }, "strip", z.ZodTypeAny, {
208
208
  content: {
@@ -223,7 +223,7 @@ export declare const searchValidationSchema: z.ZodObject<{
223
223
  };
224
224
  content_type: "search";
225
225
  subject: string;
226
- reach: "profile" | "public" | "hood" | "extended";
226
+ reach: "group" | "profile" | "public" | "hood" | "extended";
227
227
  }, {
228
228
  content: {
229
229
  body: string;
@@ -243,7 +243,7 @@ export declare const searchValidationSchema: z.ZodObject<{
243
243
  };
244
244
  content_type: "search";
245
245
  subject: string;
246
- reach: "profile" | "public" | "hood" | "extended";
246
+ reach: "group" | "profile" | "public" | "hood" | "extended";
247
247
  }>;
248
248
  export declare const recommendationValidationSchema: z.ZodObject<{
249
249
  content: z.ZodObject<{
@@ -325,7 +325,7 @@ export declare const recommendationValidationSchema: z.ZodObject<{
325
325
  } | undefined;
326
326
  }>;
327
327
  content_type: z.ZodLiteral<"recommendation">;
328
- reach: z.ZodEnum<["profile", "hood", "extended", "public"]>;
328
+ reach: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
329
329
  subject: z.ZodString;
330
330
  }, "strip", z.ZodTypeAny, {
331
331
  content: {
@@ -346,7 +346,7 @@ export declare const recommendationValidationSchema: z.ZodObject<{
346
346
  };
347
347
  content_type: "recommendation";
348
348
  subject: string;
349
- reach: "profile" | "public" | "hood" | "extended";
349
+ reach: "group" | "profile" | "public" | "hood" | "extended";
350
350
  }, {
351
351
  content: {
352
352
  body: string;
@@ -366,5 +366,5 @@ export declare const recommendationValidationSchema: z.ZodObject<{
366
366
  };
367
367
  content_type: "recommendation";
368
368
  subject: string;
369
- reach: "profile" | "public" | "hood" | "extended";
369
+ reach: "group" | "profile" | "public" | "hood" | "extended";
370
370
  }>;
@@ -1,3 +1,3 @@
1
1
  import { MarketplaceBodyTypes } from './MarketplaceBody.types';
2
- declare const MarketplaceBody: ({ chargebeeProviderConfig, feedItem, isAuthenticated, isMine, }: MarketplaceBodyTypes) => import("react/jsx-runtime").JSX.Element;
2
+ declare const MarketplaceBody: ({ chargebeeProviderConfig, disablePremiumFeature, feedItem, isAuthenticated, isMine, }: MarketplaceBodyTypes) => import("react/jsx-runtime").JSX.Element;
3
3
  export default MarketplaceBody;
@@ -3,6 +3,7 @@ export interface MarketplaceBodyTypes {
3
3
  chargebeeProviderConfig: {
4
4
  site: string;
5
5
  };
6
+ disablePremiumFeature?: boolean;
6
7
  feedItem: components['schemas']['Core_V3_HoodMessage'];
7
8
  isAuthenticated?: boolean;
8
9
  isMine?: boolean;
@@ -14,8 +14,10 @@ import { MarketplaceDetailPageProps } from './MarketplaceDetailPage.types';
14
14
  * @param {Object} props.feedItem - The marketplace item data from API
15
15
  * @param {boolean} props.isBookmarked - Whether the item is bookmarked by current user
16
16
  * @param {Array} props.relatedSections - Related posts sections to display
17
+ * @param {Object} props.config.chargebee - Chargebee-specific config
18
+ * @param {boolean} [props.disablePremiumFeature] - Optional flag to disable premium features
17
19
  *
18
20
  * @returns {Promise<JSX.Element>} The rendered marketplace detail page
19
21
  */
20
- export declare function MarketplaceDetailPage({ ads, config, feedItem, isAuthenticated, relatedSections, renderAdSlot, }: MarketplaceDetailPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
22
+ export declare function MarketplaceDetailPage({ ads, config, disablePremiumFeature, feedItem, isAuthenticated, relatedSections, renderAdSlot, }: MarketplaceDetailPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
21
23
  export default MarketplaceDetailPage;
@@ -17,6 +17,7 @@ export interface MarketplaceDetailPageProps {
17
17
  site: string;
18
18
  };
19
19
  };
20
+ disablePremiumFeature?: boolean;
20
21
  feedItem: components['schemas']['Core_V3_HoodMessage'];
21
22
  isAuthenticated?: boolean;
22
23
  relatedSections?: components['schemas']['Core_V3_RelatedSection'][];
@@ -5,6 +5,7 @@ type PostReplyProps = {
5
5
  };
6
6
  export declare const postReply: ({ postId, reply }: PostReplyProps) => Promise<{
7
7
  id: number;
8
+ parent_hood_message_id: number;
8
9
  body: string;
9
10
  author_details?: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_AuthorDetails"] | null;
10
11
  created_at: string;
@@ -9,6 +9,7 @@ type SlicedRepliesProps = {
9
9
  };
10
10
  export declare const slicedReplies: ({ expanded, limit, replies }: SlicedRepliesProps) => {
11
11
  id: number;
12
+ parent_hood_message_id: number;
12
13
  body: string;
13
14
  author_details?: components["schemas"]["Core_V3_AuthorDetails"] | null;
14
15
  created_at: string;
@@ -9,6 +9,7 @@ export declare const getFormattedDate: (date: string | null | undefined, dateFor
9
9
  time: string;
10
10
  } | null;
11
11
  export declare const getFeatureByIdentifier: (features: components["schemas"]["Core_V3_FeatureAddon_List"], identifier: string) => components["schemas"]["Core_V3_FeatureAddon"] | undefined;
12
+ export declare const hasActivePremiumFeature: (features: components["schemas"]["Core_V3_FeatureAddon_List"], identifiers?: string[]) => boolean;
12
13
  export declare const getPrice: (item: HoodMessage) => string;
13
14
  export declare const isReserved: (item: HoodMessage) => boolean;
14
15
  export declare const isReservedV2: (value: number | null) => value is 2;
@@ -1,3 +1,3 @@
1
1
  import { PasswordFieldProps } from './PasswordField.types';
2
- declare const PasswordField: ({ colorScheme, error, errorText, id, label, name, onBlur, onChange, passwordHint, progressBar, size, value, }: PasswordFieldProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const PasswordField: ({ colorScheme, error, errorText, id, label, name, onBlur, onChange, passwordHint, progressBar, score, size, value, }: PasswordFieldProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PasswordField;
@@ -10,6 +10,7 @@ export type PasswordFieldProps = {
10
10
  onChange?: TextInputProps['onChange'];
11
11
  passwordHint?: string;
12
12
  progressBar?: boolean;
13
+ score?: number | null;
13
14
  size?: TextInputProps['size'];
14
15
  value?: string;
15
16
  };
@@ -1 +1 @@
1
- export declare const getProgressBarProgress: (password: string) => number;
1
+ export declare const getProgressBarProgress: (score?: number | null) => number;
@@ -1 +1,3 @@
1
+ import { ZxcvbnResult } from '@zxcvbn-ts/core';
1
2
  export declare function parsePhoneNumber(phoneNumber: string, part?: 'code' | 'number' | 'full'): string;
3
+ export declare const getPasswordHint: (result: ZxcvbnResult | null, hint?: string) => string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { CropperRef } from 'react-advanced-cropper';
2
2
  import { MultiImageCropperProps } from '../../MultiImageCropper.types';
3
3
  type ImageCropperPanelProps = {
4
- aspectRatio: number;
4
+ aspectRatio?: number;
5
5
  cropperRef: React.RefObject<CropperRef>;
6
6
  handleCrop: () => void;
7
7
  handleReset: () => void;
@@ -1,3 +1,3 @@
1
1
  import { PremiumFeaturePanelProps } from './PremiumFeaturePanel.types';
2
- declare const PremiumFeaturePanel: ({ chargebeeProviderConfig, isMine, postId, }: PremiumFeaturePanelProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ declare const PremiumFeaturePanel: ({ chargebeeProviderConfig, featureAddons, isMine, postId, }: PremiumFeaturePanelProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  export default PremiumFeaturePanel;
@@ -1,7 +1,9 @@
1
+ import { components } from '../../../../api/src/lib/core';
1
2
  export interface PremiumFeaturePanelProps {
2
3
  chargebeeProviderConfig: {
3
4
  site: string;
4
5
  };
6
+ featureAddons: components['schemas']['Core_V3_HoodMessage']['feature_addons'];
5
7
  isMine: boolean;
6
8
  postId: string;
7
9
  }
@@ -5,6 +5,9 @@ export type AttachmentConfig = {
5
5
  onClick?: () => void;
6
6
  type: AttachmentType;
7
7
  };
8
+ export type EmojiType = {
9
+ native?: string;
10
+ } | string;
8
11
  export type RichTextAreaProps = {
9
12
  ariaDescribedby?: string;
10
13
  attachment?: AttachmentConfig[];
@@ -13,6 +16,7 @@ export type RichTextAreaProps = {
13
16
  contentEditableRef?: RefObject<HTMLDivElement>;
14
17
  disabled?: boolean;
15
18
  errorText?: string;
19
+ groupId?: number;
16
20
  hintText?: string;
17
21
  id?: string;
18
22
  isWithImagePreview?: boolean;
@@ -10,6 +10,7 @@ export type POIRecommendationProps = {
10
10
  headerProps?: SearchableListProps['headerProps'];
11
11
  inputProps?: SearchableListProps['inputProps'];
12
12
  intro?: SearchableListProps['intro'];
13
+ sheetClassName?: string;
13
14
  withNewItemAddition?: boolean;
14
15
  };
15
16
  };
@@ -1,5 +1,6 @@
1
1
  interface MentionPluginProps {
2
2
  anchorRef: React.RefObject<HTMLElement>;
3
+ groupId?: number;
3
4
  }
4
- export declare function MentionPlugin({ anchorRef }: MentionPluginProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function MentionPlugin({ anchorRef, groupId }: MentionPluginProps): import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -5,7 +5,7 @@ export declare function generateGID(userId: number): string;
5
5
  /**
6
6
  * Fetch neighbours for mention suggestions
7
7
  */
8
- export declare function fetchNeighbours(query: string): Promise<{
8
+ export declare function fetchNeighbours(query: string, groupId?: number, postId?: number): Promise<{
9
9
  page: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_Neighbour_List"];
10
10
  page_info: import('../../../../../api/src/lib/core').components["schemas"]["PageInfo"];
11
11
  } | undefined>;
@@ -1,3 +1,3 @@
1
1
  import { SearchableListProps } from './SearchableList.types';
2
- declare const SearchableList: ({ contentProps, headerProps, inputProps, intro, label, onDismiss, open, setQuery, }: SearchableListProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const SearchableList: ({ contentProps, headerProps, inputProps, intro, label, onDismiss, open, setQuery, sheetClassName, }: SearchableListProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default SearchableList;
@@ -14,4 +14,5 @@ export type SearchableListProps = {
14
14
  onDismiss: () => void;
15
15
  open: boolean;
16
16
  setQuery?: Dispatch<SetStateAction<string>>;
17
+ sheetClassName?: string;
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.5.0-development.2",
3
+ "version": "4.5.0-development.20",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",
@@ -20,6 +20,7 @@
20
20
  "react-dom": "^18.2.0",
21
21
  "@hookform/resolvers": "^3.10.0",
22
22
  "lodash": "^4.17.21",
23
- "@tanstack/react-query": ">=4.36.1"
23
+ "@tanstack/react-query": ">=4.36.1",
24
+ "@zxcvbn-ts/core": "^3.0.4"
24
25
  }
25
26
  }