@goodhood-web/nebenan-base 3.4.0-development.1 → 3.4.0-development.11
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/assets/cropper.css +309 -0
- package/index.d.ts +5 -1
- package/index.js +92 -108
- package/index.mjs +14502 -19704
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.d.ts +1 -1
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types.d.ts +4 -2
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/components/MarketplaceContent/MarketplaceContent.d.ts +3 -1
- package/lib/Gallery/Gallery.d.ts +3 -0
- package/lib/Gallery/Gallery.types.d.ts +15 -0
- package/lib/ImageAttachment/ImageAttachment.d.ts +3 -0
- package/lib/ImageAttachment/ImageAttachment.types.d.ts +6 -0
- package/lib/ImageCropper/ImageCropper.d.ts +3 -0
- package/lib/ImageCropper/ImageCropper.types.d.ts +14 -0
- package/lib/ImageCropper/hooks/useCropper.d.ts +5 -0
- package/lib/ImageCropper/hooks/useImageLoader.d.ts +4 -0
- package/lib/ImageCropper/util.d.ts +2 -0
- package/lib/ModalGallery/ModalGallery.d.ts +3 -0
- package/lib/ModalGallery/ModalGallery.types.d.ts +9 -0
- package/lib/ModalGallery/utils.d.ts +28 -0
- package/package.json +4 -2
- package/style.css +9 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MarketplaceDetailPageProps } from './MarketplaceDetailPage.types';
|
|
2
|
-
export declare function MarketplaceDetailPage({ ads, author, categories, embeds, interactions, isBusinessProfile, postData, profile, related, renderAdSlot, renderGallery, }: MarketplaceDetailPageProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function MarketplaceDetailPage({ ads, author, categories, embeds, handleReserve, interactions, isBusinessProfile, isReserved, postData, profile, related, renderAdSlot, renderGallery, }: MarketplaceDetailPageProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MarketplaceDetailPage;
|
package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { BusinessProfilesResponse, CategoriesResponse, EmbedResponse, InteractionResponse, NeighbourResponse,
|
|
2
|
+
import { BusinessProfilesResponse, CategoriesResponse, EmbedResponse, InteractionResponse, NeighbourResponse, PostResponse, ProfileResponse, RelatedPostsResponse } from '../../../../../../../api/src/lib/core';
|
|
3
3
|
export interface AdSlot {
|
|
4
4
|
adnuntius?: {
|
|
5
5
|
desktop: string;
|
|
@@ -15,11 +15,13 @@ export interface MarketplaceDetailPageProps {
|
|
|
15
15
|
author: NeighbourResponse | BusinessProfilesResponse;
|
|
16
16
|
categories: CategoriesResponse;
|
|
17
17
|
embeds?: EmbedResponse[];
|
|
18
|
+
handleReserve: () => void;
|
|
18
19
|
interactions: InteractionResponse;
|
|
19
20
|
isBusinessProfile: boolean;
|
|
21
|
+
isReserved: boolean;
|
|
20
22
|
postData: PostResponse;
|
|
21
23
|
profile: ProfileResponse;
|
|
22
24
|
related: RelatedPostsResponse;
|
|
23
25
|
renderAdSlot: (slot: AdSlot) => ReactElement;
|
|
24
|
-
renderGallery:
|
|
26
|
+
renderGallery: ReactElement;
|
|
25
27
|
}
|
|
@@ -2,6 +2,8 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { MarketplaceBodyTypes } from '../../../MarketplaceBody/MarketplaceBody.types';
|
|
3
3
|
export interface MarketplaceContentProps {
|
|
4
4
|
children?: ReactElement;
|
|
5
|
+
handleReserve: () => void;
|
|
6
|
+
isReserved: boolean;
|
|
5
7
|
marketplaceBodyItems: MarketplaceBodyTypes;
|
|
6
8
|
}
|
|
7
|
-
export declare const MarketplaceContent: ({ children, marketplaceBodyItems, }: MarketplaceContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const MarketplaceContent: ({ children, handleReserve, isReserved, marketplaceBodyItems, }: MarketplaceContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ImageAttachmentProps } from '../ImageAttachment/ImageAttachment.types';
|
|
3
|
+
export type GalleryAdType = {
|
|
4
|
+
position: number;
|
|
5
|
+
render: FC<{
|
|
6
|
+
onHide: () => void;
|
|
7
|
+
onRender?: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export type GalleryProps = {
|
|
11
|
+
ads?: GalleryAdType[];
|
|
12
|
+
footerAd?: GalleryAdType;
|
|
13
|
+
images: ImageAttachmentProps['images'];
|
|
14
|
+
reserved?: ImageAttachmentProps['reserved'];
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ImageCropperProps = {
|
|
2
|
+
aspectRatio?: number;
|
|
3
|
+
imageFile?: File;
|
|
4
|
+
minCropHeight?: number;
|
|
5
|
+
minCropWidth?: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onCrop: (image: File) => void;
|
|
8
|
+
translations?: {
|
|
9
|
+
close: string;
|
|
10
|
+
crop: string;
|
|
11
|
+
rotate: string;
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GalleryAdType, GalleryProps } from '../Gallery/Gallery.types';
|
|
2
|
+
export type ModalGalleryProps = {
|
|
3
|
+
activeIndex: number;
|
|
4
|
+
ads?: GalleryProps['ads'];
|
|
5
|
+
footerAd?: GalleryAdType;
|
|
6
|
+
images: string[];
|
|
7
|
+
onClose: (index: number) => void;
|
|
8
|
+
open: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GalleryProps } from '../Gallery/Gallery.types';
|
|
3
|
+
type ImageAdItem = {
|
|
4
|
+
hidden: boolean;
|
|
5
|
+
position: number;
|
|
6
|
+
slideIndex: number;
|
|
7
|
+
src: string;
|
|
8
|
+
type: 'image';
|
|
9
|
+
} | {
|
|
10
|
+
hidden: boolean;
|
|
11
|
+
position: number;
|
|
12
|
+
render: FC<{
|
|
13
|
+
onHide: () => void;
|
|
14
|
+
onRender?: () => void;
|
|
15
|
+
}>;
|
|
16
|
+
type: 'ad';
|
|
17
|
+
};
|
|
18
|
+
export declare const computeSlides: (images: string[], ads: GalleryProps["ads"]) => ImageAdItem[];
|
|
19
|
+
export declare const checkPreviousAds: ({ index, slides, }: {
|
|
20
|
+
index: number;
|
|
21
|
+
slides: ImageAdItem[];
|
|
22
|
+
}) => number;
|
|
23
|
+
export declare const findSlideToGo: ({ activeIndex, slides, }: {
|
|
24
|
+
activeIndex: number;
|
|
25
|
+
slides: ImageAdItem[];
|
|
26
|
+
}) => number;
|
|
27
|
+
export declare const cleanUpSlides: (slides: ImageAdItem[]) => ImageAdItem[];
|
|
28
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodhood-web/nebenan-base",
|
|
3
|
-
"version": "3.4.0-development.
|
|
3
|
+
"version": "3.4.0-development.11",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"repository": "https://github.com/good-hood-gmbh/goodhood-web",
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"react-hook-form": "^7.54.2",
|
|
17
17
|
"zod": "^3.24.2",
|
|
18
18
|
"react": "^18.2.0",
|
|
19
|
-
"react-dom": "^18.2.0"
|
|
19
|
+
"react-dom": "^18.2.0",
|
|
20
|
+
"@hookform/resolvers": "^3.10.0",
|
|
21
|
+
"lodash": "^4.17.21"
|
|
20
22
|
}
|
|
21
23
|
}
|