@goodhood-web/nebenan-base 4.2.0-development.4 → 4.2.0-development.6

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 (27) hide show
  1. package/index.d.ts +5 -5
  2. package/index.js +72 -72
  3. package/index.mjs +10032 -10205
  4. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.d.ts +2 -2
  5. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.types.d.ts +4 -4
  6. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.d.ts +1 -1
  7. package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.types.d.ts +3 -2
  8. package/lib/Feed/FeedItem/Marketplace/MarketplaceItemCardless/MarketplaceItemCardless.types.d.ts +2 -3
  9. package/lib/Forms/Fields/FormRichTextArea.d.ts +4 -2
  10. package/lib/RichTextArea/RichTextArea.d.ts +3 -2
  11. package/lib/RichTextArea/RichTextArea.types.d.ts +3 -2
  12. package/lib/utils/convertV2ToV3Feed.d.ts +17 -0
  13. package/package.json +1 -1
  14. package/style.css +1 -1
  15. package/lib/Feed/GridFeed/GridFeed.d.ts +0 -3
  16. package/lib/Feed/GridFeed/GridFeed.types.d.ts +0 -37
  17. package/lib/Feed/GridFeed/GridFeedAggregator/GridFeedAggregator.d.ts +0 -2
  18. package/lib/Feed/GridFeed/GridFeedAggregator/GridFeedAggregator.types.d.ts +0 -14
  19. package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.d.ts +0 -3
  20. package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.types.d.ts +0 -8
  21. package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.d.ts +0 -2
  22. package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.types.d.ts +0 -8
  23. package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/utils.d.ts +0 -2
  24. package/lib/Feed/GridFeed/GridFeedAggregator/utils.d.ts +0 -1
  25. package/lib/Feed/GridFeed/GridFeedDynamicRenderer/GridFeedDynamicRenderer.d.ts +0 -3
  26. package/lib/Feed/GridFeed/GridFeedDynamicRenderer/GridFeedDynamicRenderer.types.d.ts +0 -4
  27. package/lib/Feed/GridFeed/utils.d.ts +0 -7
@@ -1,4 +1,4 @@
1
1
  import { ContentProps, FooterProps, HeaderProps } from './ContentFieldsSheet.types';
2
2
  export declare const Header: ({ imageUrl, onContentTypeSelectorOpen, onDismiss, userId, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
3
- export declare const Content: ({ imageUploadClicked, onImageUploadDismiss, onPoiDismiss, poiClicked, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Footer: ({ formError, onImageUploadOpen, onPoiOpen, setReachTypeSelectorOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Content: ({ onPoiDismiss, poiClicked, richTextAreaRef }: ContentProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Footer: ({ formError, onImageUploadClick, onPoiOpen, setReachTypeSelectorOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { Dispatch, SetStateAction } from 'react';
1
+ import { Dispatch, RefObject, SetStateAction } from 'react';
2
+ import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
2
3
  export type HeaderProps = {
3
4
  imageUrl?: string;
4
5
  onContentTypeSelectorOpen: () => void;
@@ -6,14 +7,13 @@ export type HeaderProps = {
6
7
  userId?: number;
7
8
  };
8
9
  export type ContentProps = {
9
- imageUploadClicked: boolean;
10
- onImageUploadDismiss: () => void;
11
10
  onPoiDismiss: () => void;
12
11
  poiClicked: boolean;
12
+ richTextAreaRef?: RefObject<RichTextAreaRef>;
13
13
  };
14
14
  export type FooterProps = {
15
15
  formError?: string | null;
16
- onImageUploadOpen: () => void;
16
+ onImageUploadClick: () => void;
17
17
  onPoiOpen: () => void;
18
18
  setReachTypeSelectorOpen: Dispatch<SetStateAction<boolean>>;
19
19
  };
@@ -1,3 +1,3 @@
1
1
  import { PostFieldsProps } from './PostFields.types';
2
- declare const PostFields: ({ imageUploadClicked, onImageUploadDismiss, onPoiDismiss, poiClicked, }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const PostFields: ({ onPoiDismiss, poiClicked, richTextAreaRef }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PostFields;
@@ -1,6 +1,7 @@
1
+ import { RefObject } from 'react';
2
+ import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
1
3
  export type PostFieldsProps = {
2
- imageUploadClicked: boolean;
3
- onImageUploadDismiss: () => void;
4
4
  onPoiDismiss: () => void;
5
5
  poiClicked: boolean;
6
+ richTextAreaRef?: RefObject<RichTextAreaRef>;
6
7
  };
@@ -1,8 +1,7 @@
1
- import { GridFeedProps } from '../../../GridFeed/GridFeed.types';
2
1
  export interface MarketplaceItemCardlessTypes {
3
2
  content?: React.ReactNode;
4
- finalizeTest?: GridFeedProps['finalizeTest'];
5
- highlightAbTest?: GridFeedProps['highlightAbTest'];
3
+ finalizeTest?: () => void;
4
+ highlightAbTest?: string;
6
5
  id: number;
7
6
  image?: string;
8
7
  onClick?: () => void;
@@ -1,8 +1,10 @@
1
+ import { RefObject } from 'react';
1
2
  import { UseControllerProps } from 'react-hook-form';
2
3
  import { ContentFormData } from '../../ContentCreator/validationSchemas';
3
- import { RichTextAreaProps } from '../../RichTextArea/RichTextArea.types';
4
+ import { RichTextAreaProps, RichTextAreaRef } from '../../RichTextArea/RichTextArea.types';
4
5
  export type FormRichTextAreaInputProps = UseControllerProps<ContentFormData> & Partial<RichTextAreaProps> & {
5
6
  name: string;
7
+ ref?: RefObject<RichTextAreaRef>;
6
8
  };
7
- declare const FormRichTextAreaInput: ({ name, ...props }: FormRichTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const FormRichTextAreaInput: ({ name, ref, ...props }: FormRichTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export default FormRichTextAreaInput;
@@ -1,2 +1,3 @@
1
- import { RichTextAreaProps } from './RichTextArea.types';
2
- export default function RichTextArea({ ariaDescribedby, attachment, charLimit, colorScheme, contentEditableRef, disabled, errorText, hintText, id, label, onBlur, onChange, onFocus, onImageClick, onImageUploadDismiss, onPoiClick, onPoiDismiss, size, submitButton, value, }: RichTextAreaProps): import("react/jsx-runtime").JSX.Element;
1
+ import { RichTextAreaProps, RichTextAreaRef } from './RichTextArea.types';
2
+ declare const _default: import('react').ForwardRefExoticComponent<RichTextAreaProps & import('react').RefAttributes<RichTextAreaRef>>;
3
+ export default _default;
@@ -20,8 +20,6 @@ export type RichTextAreaProps = {
20
20
  onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
21
21
  onChange: (value: RichTextAreaValueType) => void;
22
22
  onFocus?: (event: FocusEvent<HTMLDivElement>) => void;
23
- onImageClick?: boolean;
24
- onImageUploadDismiss?: () => void;
25
23
  onPoiClick?: boolean;
26
24
  onPoiDismiss?: () => void;
27
25
  size?: 'medium' | 'large';
@@ -59,3 +57,6 @@ export type CoreV3PostInput = {
59
57
  images?: string[] | null;
60
58
  };
61
59
  export declare const toCoreV3Format: (value: RichTextAreaValueType) => CoreV3PostInput;
60
+ export type RichTextAreaRef = {
61
+ onImageUpload: () => void;
62
+ };
@@ -0,0 +1,17 @@
1
+ import { components } from '../../../../api/src/lib/core';
2
+ import { NewsFeedHoodMessage } from '../../../../api/src/lib/core_v2';
3
+ type PostResponse = components['schemas']['Core_V3_HoodMessage'];
4
+ /**
5
+ * Converts v2 feed items to v3 format
6
+ * This is a simplified converter for feed display purposes
7
+ */
8
+ export declare function convertV2ToV3FeedItem(v2Item: NewsFeedHoodMessage): PostResponse;
9
+ /**
10
+ * Converts an array of v2 feed items to v3 format
11
+ */
12
+ export declare function convertV2ToV3FeedItems(v2Items: NewsFeedHoodMessage[]): PostResponse[];
13
+ /**
14
+ * Converts a v2 feed items object (indexed by ID) to v3 array format
15
+ */
16
+ export declare function convertV2FeedObjectToV3Array(v2ItemsObject: Record<number, NewsFeedHoodMessage>): PostResponse[];
17
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.2.0-development.4",
3
+ "version": "4.2.0-development.6",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",