@goodhood-web/nebenan-base 3.0.0-development.21 → 3.0.0-development.23

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.
@@ -1,3 +1,3 @@
1
1
  import { MarketplaceDetailPageProps } from './MarketplaceDetailPage.types';
2
- export declare function MarketplaceDetailPage({ ads, author, categories, feedItem, isChristmas, postData, profile, related, renderAdSlot, renderGallery, }: MarketplaceDetailPageProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function MarketplaceDetailPage({ ads, author, categories, interactions, postData, profile, related, renderAdSlot, renderGallery, }: MarketplaceDetailPageProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default MarketplaceDetailPage;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { CategoriesResponse, NeighbourResponse, NewsFeedResponse, PostImage, PostResponse, ProfileResponse, RelatedResponse } from '../../../../../../api/src/lib/core';
2
+ import { CategoriesResponse, InteractionResponse, NeighbourResponse, PostImage, PostResponse, ProfileResponse, RelatedPostsResponse } from '../../../../../../api/src/lib/core';
3
3
  export interface AdSlot {
4
4
  adnuntius?: {
5
5
  desktop: string;
@@ -14,11 +14,10 @@ export interface MarketplaceDetailPageProps {
14
14
  ads: AdSlot[];
15
15
  author: NeighbourResponse;
16
16
  categories: CategoriesResponse;
17
- feedItem: NewsFeedResponse;
18
- isChristmas?: boolean;
17
+ interactions: InteractionResponse;
19
18
  postData: PostResponse;
20
19
  profile: ProfileResponse;
21
- related: RelatedResponse;
20
+ related: RelatedPostsResponse;
22
21
  renderAdSlot: (slot: AdSlot) => ReactElement;
23
22
  renderGallery: (images: PostImage[]) => ReactElement;
24
23
  }
@@ -1,10 +1,7 @@
1
- import { Category, Group } from '../../../../../../../../api/src/lib/core';
1
+ import { Section } from '../../../../../../../../api/src/lib/core';
2
2
  type CardAggregatorProps = {
3
- categories: {
4
- marketplace_categories: Category[];
5
- };
6
- group: Group;
7
3
  relatedBookmarks: number[];
4
+ section: Section;
8
5
  };
9
- export declare const CardAggregator: ({ categories, group, relatedBookmarks, }: CardAggregatorProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const CardAggregator: ({ relatedBookmarks, section }: CardAggregatorProps) => import("react/jsx-runtime").JSX.Element;
10
7
  export {};
@@ -1,12 +1,11 @@
1
- import { NeighbourResponse, NewsFeedHoodMessage, NewsFeedResponse, PostResponse, RelatedResponse } from '../../../../api/src/lib/core';
1
+ import { InteractionResponse, NeighbourResponse, PostResponse, Section } from '../../../../api/src/lib/core';
2
2
  import { Category } from '../../../../api/src/lib/core/v2/categories';
3
3
  import { ProfileResponse } from '../../../../api/src/lib/core/v2/profile';
4
4
  import { BadgeIconType } from '../../../../api/src/lib/types/newsFeeds';
5
5
  import { MarketplaceBodyTypes } from './Marketplace/MarketplaceBody/MarketplaceBody.types';
6
- import { ProfileData } from './Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types';
6
+ import { AdSlot, ProfileData } from './Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types';
7
7
  import { default as PostAuthorProps } from './PostAuthor/PostAuthor.types';
8
8
  export declare const isFreeItem: (post: PostResponse) => boolean;
9
- export declare const isSold: (item: NewsFeedHoodMessage) => boolean;
10
9
  export declare const isReserved: (item: PostResponse) => boolean;
11
10
  export declare const formatPrice: (number: number) => number;
12
11
  export declare const getPrice: (item: PostResponse) => string;
@@ -15,19 +14,37 @@ export declare const isPublic: (item: PostResponse) => boolean;
15
14
  export declare const getAuthorId: (profileUrl: string) => number;
16
15
  type BadgesType = [BadgeIconType] | [BadgeIconType, BadgeIconType] | [BadgeIconType, BadgeIconType, BadgeIconType];
17
16
  export declare const getAuthorData: (author: NeighbourResponse) => PostAuthorProps;
18
- export declare const getRelatedItemThumbnail: (item: NewsFeedHoodMessage) => string;
17
+ export declare const getRelatedItemThumbnail: (item: PostResponse) => string;
19
18
  export declare const isBookmarked: (id: number, list: number[]) => boolean;
20
- export declare const getRelatedBookmarks: (related: RelatedResponse) => number[] | [];
19
+ export declare const getRelatedBookmarks: (interactions: InteractionResponse) => number[] | [];
21
20
  type GetFeedItemDataProps = {
22
21
  author: NeighbourResponse;
23
22
  badges?: BadgesType;
23
+ bookmarkList: number[] | [];
24
24
  category?: Category;
25
- feedItem: NewsFeedResponse;
26
25
  postData: PostResponse;
27
26
  profile?: ProfileResponse;
28
27
  };
29
- export declare const getFeedItemData: ({ author, category, feedItem, postData, profile, }: GetFeedItemDataProps) => MarketplaceBodyTypes;
28
+ export declare const getFeedItemData: ({ author, bookmarkList, category, postData, profile, }: GetFeedItemDataProps) => MarketplaceBodyTypes;
30
29
  export declare const getProfileData: (profile?: ProfileResponse) => ProfileData | null;
31
30
  export declare const getLink: (category: Category | undefined) => string;
32
31
  export declare const getAggregatorTrackingName: (categorySlug?: string) => string;
32
+ type InsertAdsProps = {
33
+ ads: AdSlot[];
34
+ positions: number[];
35
+ sections: Section[];
36
+ };
37
+ export type AdInsert = {
38
+ ad: AdSlot;
39
+ position: number;
40
+ };
41
+ export type InsertAds = (Section | {
42
+ ad: AdSlot;
43
+ })[];
44
+ export declare const insertAds: ({ ads, positions, sections }: InsertAdsProps) => InsertAds;
45
+ export declare const isAdSection: (section: Section | {
46
+ ad: AdSlot;
47
+ }) => section is {
48
+ ad: AdSlot;
49
+ };
33
50
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "3.0.0-development.21",
3
+ "version": "3.0.0-development.23",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",