@goodhood-web/nebenan-base 4.2.0-development.2 → 4.2.0-development.21
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/index.d.ts +8 -5
- package/index.js +70 -70
- package/index.mjs +8867 -8887
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.d.ts +2 -2
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.types.d.ts +4 -4
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.types.d.ts +3 -2
- package/lib/Feed/FeedItem/Marketplace/MarketplaceItemCardless/MarketplaceItemCardless.types.d.ts +2 -3
- package/lib/Feed/MarketplaceFeedPage/MarketplaceAbTestContext.d.ts +11 -0
- package/lib/Feed/MarketplaceFeedPage/MarketplaceFeedPage.d.ts +3 -1
- package/lib/Forms/Fields/FormRichTextArea.d.ts +4 -2
- package/lib/Grids/Grid/Grid.d.ts +1 -1
- package/lib/Grids/Grid/Grid.types.d.ts +1 -0
- package/lib/MarkdownRichText/MarkdownRichText.d.ts +1 -1
- package/lib/MarkdownRichText/MarkdownRichText.types.d.ts +1 -0
- package/lib/ProfileControls/ProfileControls.d.ts +1 -1
- package/lib/ProfileControls/ProfileControls.types.d.ts +1 -0
- package/lib/PromptCard/PromptCard.d.ts +4 -0
- package/lib/PromptCard/PromptCard.types.d.ts +19 -0
- package/lib/Quote/Quote.d.ts +1 -1
- package/lib/Quote/Quote.types.d.ts +4 -1
- package/lib/RichTextArea/RichTextArea.d.ts +3 -2
- package/lib/RichTextArea/RichTextArea.types.d.ts +3 -2
- package/lib/utils/convertV2ToV3Feed.d.ts +17 -0
- package/package.json +3 -2
- package/style.css +1 -1
- package/lib/Feed/GridFeed/GridFeed.d.ts +0 -3
- package/lib/Feed/GridFeed/GridFeed.types.d.ts +0 -37
- package/lib/Feed/GridFeed/GridFeedAggregator/GridFeedAggregator.d.ts +0 -2
- package/lib/Feed/GridFeed/GridFeedAggregator/GridFeedAggregator.types.d.ts +0 -14
- package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.d.ts +0 -3
- package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.types.d.ts +0 -8
- package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.d.ts +0 -2
- package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.types.d.ts +0 -8
- package/lib/Feed/GridFeed/GridFeedAggregator/components/FeedEmptyStateCard/utils.d.ts +0 -2
- package/lib/Feed/GridFeed/GridFeedAggregator/utils.d.ts +0 -1
- package/lib/Feed/GridFeed/GridFeedDynamicRenderer/GridFeedDynamicRenderer.d.ts +0 -3
- package/lib/Feed/GridFeed/GridFeedDynamicRenderer/GridFeedDynamicRenderer.types.d.ts +0 -4
- 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: ({
|
|
4
|
-
export declare const Footer: ({ formError,
|
|
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
|
-
|
|
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: ({
|
|
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
|
};
|
package/lib/Feed/FeedItem/Marketplace/MarketplaceItemCardless/MarketplaceItemCardless.types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { GridFeedProps } from '../../../GridFeed/GridFeed.types';
|
|
2
1
|
export interface MarketplaceItemCardlessTypes {
|
|
3
2
|
content?: React.ReactNode;
|
|
4
|
-
finalizeTest?:
|
|
5
|
-
highlightAbTest?:
|
|
3
|
+
finalizeTest?: () => void;
|
|
4
|
+
highlightAbTest?: string | null;
|
|
6
5
|
id: number;
|
|
7
6
|
image?: string;
|
|
8
7
|
onClick?: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type MarketplaceHighlightVariant = 'outline_photo' | 'label_on_photo' | 'label_under_description' | null;
|
|
3
|
+
interface MarketplaceAbTestContextValue {
|
|
4
|
+
highlightVariant: MarketplaceHighlightVariant;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarketplaceAbTestProvider: React.FC<{
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
highlightVariant: MarketplaceHighlightVariant;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const useMarketplaceAbTest: () => MarketplaceAbTestContextValue;
|
|
11
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { NewsFeedHoodMessage } from '../../../../../api/src/lib/types/newsFeeds';
|
|
2
2
|
import { GridFeedAd } from '../Feed/Feed.types';
|
|
3
|
+
import { MarketplaceHighlightVariant } from './MarketplaceAbTestContext';
|
|
3
4
|
interface MarketplaceFeedPageProps {
|
|
4
5
|
ads?: GridFeedAd[];
|
|
6
|
+
highlightVariant?: MarketplaceHighlightVariant;
|
|
5
7
|
initialFeedItems: NewsFeedHoodMessage[];
|
|
6
8
|
onLoadMore: (lastItemTimestamp: string) => Promise<{
|
|
7
9
|
hood_messages: NewsFeedHoodMessage[];
|
|
8
10
|
}>;
|
|
9
11
|
}
|
|
10
|
-
export declare function MarketplaceFeedPage({ ads, initialFeedItems, onLoadMore, }: MarketplaceFeedPageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function MarketplaceFeedPage({ ads, highlightVariant, initialFeedItems, onLoadMore, }: MarketplaceFeedPageProps): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -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;
|
package/lib/Grids/Grid/Grid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GridProps } from './Grid.types';
|
|
2
|
-
export declare const Grid: ({ children, spacing }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Grid: ({ children, className, spacing }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Grid;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MarkdownRichTextProps } from './MarkdownRichText.types';
|
|
2
|
-
declare const MarkdownRichText: ({ className, elementTag, text }: MarkdownRichTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MarkdownRichText: ({ className, elementTag, fontSet, text, }: MarkdownRichTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MarkdownRichText;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProfileControlsProps } from './ProfileControls.types';
|
|
2
|
-
declare const ProfileControls: ({ moreMenuData, tiles, withoutMoreMenu, }: ProfileControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ProfileControls: ({ moreMenuData, onClickMore, tiles, withoutMoreMenu, }: ProfileControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ProfileControls;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type PromptColor = 'lavender' | 'teal' | 'orange' | 'pink';
|
|
2
|
+
export interface Prompt {
|
|
3
|
+
color: PromptColor;
|
|
4
|
+
created_at: string;
|
|
5
|
+
id: string;
|
|
6
|
+
placeholder_text?: string;
|
|
7
|
+
prefill_text: string;
|
|
8
|
+
question: string;
|
|
9
|
+
sub_category?: string;
|
|
10
|
+
subject_text?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PromptCardProps {
|
|
13
|
+
onCameraClick?: (prompt: Prompt) => void;
|
|
14
|
+
onInputClick: (prompt: Prompt) => void;
|
|
15
|
+
prompt: Prompt;
|
|
16
|
+
showCameraIcon?: boolean;
|
|
17
|
+
userAvatarSrc?: string;
|
|
18
|
+
userId?: number;
|
|
19
|
+
}
|
package/lib/Quote/Quote.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { QuoteProps } from './Quote.types';
|
|
2
|
-
declare const Quote: ({ author, authorType, contentClassName, fontSet, image, imageSlot, quote, quoteImageClassName, quoteType, }: QuoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Quote: ({ author, authorIcon, authorSubtitle, authorType, contentClassName, fontSet, image, imageSlot, quote, quoteImageClassName, quoteType, }: QuoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Quote;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { Icon32 } from '../../../../ui/src/lib/Base/Icon/Icon.types';
|
|
2
3
|
import { TypographyTypeLanding, TypographyTypeProduct } from '../../../../ui/src/lib/Base/Typography/Typography.types';
|
|
3
4
|
type QuoteBaseProps = {
|
|
4
5
|
author: string;
|
|
6
|
+
authorIcon?: Icon32;
|
|
7
|
+
authorSubtitle?: string;
|
|
5
8
|
contentClassName?: string;
|
|
6
|
-
image
|
|
9
|
+
image?: {
|
|
7
10
|
alt: string;
|
|
8
11
|
src: string;
|
|
9
12
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { RichTextAreaProps } from './RichTextArea.types';
|
|
2
|
-
|
|
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.
|
|
3
|
+
"version": "4.2.0-development.21",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"repository": "https://github.com/good-hood-gmbh/goodhood-web",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"react": "^18.2.0",
|
|
19
19
|
"react-dom": "^18.2.0",
|
|
20
20
|
"@hookform/resolvers": "^3.10.0",
|
|
21
|
-
"lodash": "^4.17.21"
|
|
21
|
+
"lodash": "^4.17.21",
|
|
22
|
+
"@tanstack/react-query": "^5.85.5"
|
|
22
23
|
}
|
|
23
24
|
}
|