@goodhood-web/nebenan-base 4.1.0 → 4.2.0-development.1
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 +5 -1
- package/index.js +91 -82
- package/index.mjs +10632 -10269
- package/lib/Feed/Aggregators/GridFeedAggregator/GridFeedAggregator.d.ts +2 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/GridFeedAggregator.types.d.ts +12 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.d.ts +3 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedDynamicRenderer/FeedDynamicRenderer.types.d.ts +5 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.d.ts +2 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedEmptyStateCard/FeedEmptyStateCard.types.d.ts +8 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/components/FeedEmptyStateCard/utils.d.ts +2 -0
- package/lib/Feed/Aggregators/GridFeedAggregator/utils.d.ts +1 -0
- package/lib/Feed/Feed/Feed.d.ts +3 -0
- package/lib/Feed/Feed/Feed.types.d.ts +41 -0
- package/lib/Feed/Feed/utils.d.ts +27 -0
- package/lib/Feed/FeedItem/Marketplace/MarketplaceActions/MarketplaceActions.types.d.ts +1 -1
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/components/MarketplaceErrorBoundary.d.ts +1 -1
- package/lib/Feed/FeedItem/Post/Post.d.ts +6 -0
- package/lib/Feed/LazyFeed/LazyFeed.d.ts +11 -0
- package/lib/Feed/LazyFeed/MarketplaceSkeleton.d.ts +5 -0
- package/lib/Feed/MarketplaceFeedPage/MarketplaceFeedPage.d.ts +11 -0
- package/lib/Forms/Fields/index.d.ts +2 -1
- package/lib/MainLayout/MainLayout.d.ts +1 -1
- package/lib/MainLayout/MainLayout.types.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GridFeedAd, GridFeedHoodMessage, GridFeedProps } from '../../Feed/Feed.types';
|
|
2
|
+
export type GridFeedAggregatorProps = {
|
|
3
|
+
feedType: GridFeedProps['feedType'];
|
|
4
|
+
items: (GridFeedAd | GridFeedHoodMessage)[];
|
|
5
|
+
};
|
|
6
|
+
export declare const GridFeedAggregatorNavigateEnum: {
|
|
7
|
+
readonly event: "";
|
|
8
|
+
readonly feed: "";
|
|
9
|
+
readonly group: "";
|
|
10
|
+
readonly marketplace: "/feed/marketplace";
|
|
11
|
+
readonly post: "";
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const showFeedEmptyStateCard: (isDesktop: boolean, length: number) => boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { components } from '../../../../../api/src/lib/core/generated_types';
|
|
2
|
+
type PostResponse = components['schemas']['Core_V3_HoodMessage'];
|
|
3
|
+
export declare const GridFeedTypeEnum: {
|
|
4
|
+
readonly event: "event";
|
|
5
|
+
readonly feed: "feed";
|
|
6
|
+
readonly group: "group";
|
|
7
|
+
readonly marketplace: "marketplace";
|
|
8
|
+
readonly post: "post";
|
|
9
|
+
};
|
|
10
|
+
export declare const FeedViewMode: {
|
|
11
|
+
readonly grid: "grid";
|
|
12
|
+
readonly list: "list";
|
|
13
|
+
};
|
|
14
|
+
declare const ALLOWED_POSITIONS: readonly [0, 1, 2, 3, 4, 5];
|
|
15
|
+
type Position = (typeof ALLOWED_POSITIONS)[number];
|
|
16
|
+
export interface GridFeedItem {
|
|
17
|
+
type: 'grid-feed-ad' | 'grid-feed-message' | 'grid-feed-aggregator';
|
|
18
|
+
}
|
|
19
|
+
export interface GridFeedAd extends GridFeedItem {
|
|
20
|
+
ad_type?: string;
|
|
21
|
+
aggregatorPosition?: Position;
|
|
22
|
+
block: number;
|
|
23
|
+
content: React.ReactNode;
|
|
24
|
+
id: string;
|
|
25
|
+
type: 'grid-feed-ad';
|
|
26
|
+
}
|
|
27
|
+
export interface GridFeedHoodMessage extends GridFeedItem {
|
|
28
|
+
hoodMessage: PostResponse;
|
|
29
|
+
type: 'grid-feed-message';
|
|
30
|
+
}
|
|
31
|
+
export interface GridFeedFeedAggregator extends GridFeedItem {
|
|
32
|
+
items: (GridFeedHoodMessage | GridFeedAd)[];
|
|
33
|
+
type: 'grid-feed-aggregator';
|
|
34
|
+
}
|
|
35
|
+
export type GridFeedProps = {
|
|
36
|
+
ads?: GridFeedAd[];
|
|
37
|
+
feedItems: PostResponse[];
|
|
38
|
+
feedType: (typeof GridFeedTypeEnum)[keyof typeof GridFeedTypeEnum];
|
|
39
|
+
viewMode?: (typeof FeedViewMode)[keyof typeof FeedViewMode];
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { components } from '../../../../../api/src/lib/core/generated_types';
|
|
2
|
+
import { GridFeedAd, GridFeedHoodMessage, GridFeedItem } from './Feed.types';
|
|
3
|
+
type PostResponse = components['schemas']['Core_V3_HoodMessage'];
|
|
4
|
+
type FeedItem = GridFeedHoodMessage | GridFeedAd;
|
|
5
|
+
/**
|
|
6
|
+
* Filters ads based on the number of feed items
|
|
7
|
+
* Only includes ads that would be visible with the current number of items
|
|
8
|
+
*/
|
|
9
|
+
export declare const filterAdsByFeedLength: (ads: GridFeedAd[] | undefined, feedItemsLength: number, chunkSize?: number) => GridFeedAd[];
|
|
10
|
+
/**
|
|
11
|
+
* Splits feed items into chunks and handles ad placement.
|
|
12
|
+
*
|
|
13
|
+
* Ad placement works in two ways:
|
|
14
|
+
* 1. Inline ads (with aggregatorPosition):
|
|
15
|
+
* - block: which chunk of items (0-based)
|
|
16
|
+
* - aggregatorPosition: position within that chunk (0-5)
|
|
17
|
+
* Example: block: 1, position: 2 means "insert after 2nd item in 2nd chunk"
|
|
18
|
+
*
|
|
19
|
+
* 2. Standalone ads (without aggregatorPosition):
|
|
20
|
+
* - block: which chunk to appear after
|
|
21
|
+
* Example: block: 1 means "show after the 1st chunk"
|
|
22
|
+
*/
|
|
23
|
+
export declare const splitIntoChunks: (feedItems: PostResponse[], ads?: GridFeedAd[], chunkSize?: number) => GridFeedItem[];
|
|
24
|
+
export declare const formatCurrency: (cents: number | null) => string;
|
|
25
|
+
export declare const getLang: <T>(lang: Record<string, T>, selectedLang?: string) => T;
|
|
26
|
+
export declare const interweaveWithAds: (feedItems: PostResponse[], ads?: GridFeedAd[], chunkSize?: number) => FeedItem[];
|
|
27
|
+
export {};
|
|
@@ -6,9 +6,9 @@ export type MarketplaceActionsTypes = {
|
|
|
6
6
|
handleReserve?: () => void;
|
|
7
7
|
id: number;
|
|
8
8
|
images: components['schemas']['Core_V3_HoodMessageImage'][];
|
|
9
|
+
isBookmarked?: boolean;
|
|
9
10
|
isFree: boolean;
|
|
10
11
|
isMine?: boolean;
|
|
11
12
|
isReserved: boolean;
|
|
12
|
-
isBookmarked?: boolean;
|
|
13
13
|
subject: string;
|
|
14
14
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { components } from '../../../../../../api/src/lib/core/generated_types';
|
|
2
|
+
interface PostProps {
|
|
3
|
+
hoodMessage: components['schemas']['Core_V3_HoodMessage'];
|
|
4
|
+
}
|
|
5
|
+
export declare const Post: ({ hoodMessage }: PostProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Post;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NewsFeedHoodMessage } from '../../../../../api/src/lib/types/newsFeeds';
|
|
2
|
+
import { GridFeedAd } from '../Feed/Feed.types';
|
|
3
|
+
interface LazyFeedProps {
|
|
4
|
+
ads?: GridFeedAd[];
|
|
5
|
+
initialFeedItems: NewsFeedHoodMessage[];
|
|
6
|
+
onLoadMore: (lastItemTimestamp: string) => Promise<{
|
|
7
|
+
hood_messages: NewsFeedHoodMessage[];
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare function LazyFeed({ ads, initialFeedItems, onLoadMore }: LazyFeedProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NewsFeedHoodMessage } from '../../../../../api/src/lib/types/newsFeeds';
|
|
2
|
+
import { GridFeedAd } from '../Feed/Feed.types';
|
|
3
|
+
interface MarketplaceFeedPageProps {
|
|
4
|
+
ads?: GridFeedAd[];
|
|
5
|
+
initialFeedItems: NewsFeedHoodMessage[];
|
|
6
|
+
onLoadMore: (lastItemTimestamp: string) => Promise<{
|
|
7
|
+
hood_messages: NewsFeedHoodMessage[];
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare function MarketplaceFeedPage({ ads, initialFeedItems, onLoadMore, }: MarketplaceFeedPageProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { default as FormCheckboxInput } from './FormCheckboxInput';
|
|
2
2
|
import { default as FormContentCreatorTile } from './FormContentCreatorTile';
|
|
3
3
|
import { default as FormInputFieldSpecial } from './FormInputFieldSpecial';
|
|
4
|
+
import { default as FormPasswordField } from './FormPasswordField';
|
|
4
5
|
import { default as FormPhoneInput } from './FormPhoneInput';
|
|
5
6
|
import { default as FormRadioButton } from './FormRadioButton';
|
|
6
7
|
import { default as FormRadioButtonCluster } from './FormRadioButtonCluster';
|
|
7
8
|
import { default as FormTextAreaInput } from './FormTextAreaInput';
|
|
8
9
|
import { default as FormTextInput } from './FormTextInput';
|
|
9
10
|
import { default as FormToggleInput } from './FormToggleInput';
|
|
10
|
-
export { FormCheckboxInput, FormInputFieldSpecial, FormPhoneInput, FormRadioButton, FormRadioButtonCluster, FormTextAreaInput, FormTextInput, FormContentCreatorTile, FormToggleInput, };
|
|
11
|
+
export { FormCheckboxInput, FormInputFieldSpecial, FormPasswordField, FormPhoneInput, FormRadioButton, FormRadioButtonCluster, FormTextAreaInput, FormTextInput, FormContentCreatorTile, FormToggleInput, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { MainLayoutProps } from './MainLayout.types';
|
|
3
|
-
declare const MainLayout: ({ children, desktop, keepLoading, mobile, }: PropsWithChildren<MainLayoutProps>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const MainLayout: ({ children, desktop, initialIsMobile, keepLoading, mobile, }: PropsWithChildren<MainLayoutProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default MainLayout;
|
|
@@ -2,6 +2,7 @@ import { DesktopLayoutTwoColumnProps } from '../DesktopLayoutTwoColumn/DesktopLa
|
|
|
2
2
|
import { MobileLayoutProps } from '../MobileLayout/MobileLayout.types';
|
|
3
3
|
export interface MainLayoutProps {
|
|
4
4
|
desktop: Omit<DesktopLayoutTwoColumnProps, 'children'>;
|
|
5
|
+
initialIsMobile?: boolean;
|
|
5
6
|
keepLoading?: boolean;
|
|
6
7
|
mobile: Omit<MobileLayoutProps, 'children'>;
|
|
7
8
|
}
|