@goodhood-web/nebenan-base 3.4.0-development.2 → 3.4.0-development.20
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 +109 -130
- package/index.mjs +25274 -28789
- 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 +18 -0
- package/lib/ImageAttachment/ImageAttachment.d.ts +3 -0
- package/lib/ImageAttachment/ImageAttachment.types.d.ts +10 -0
- package/lib/ImageAttachment/components/CollageImageAttachment/CollageImageAttachment.d.ts +2 -0
- package/lib/ImageAttachment/components/PlaceholderImageAttachment/PlaceholderImageAttachment.d.ts +7 -0
- package/lib/ImageAttachment/components/SwiperImageAttachment/SwiperImageAttachment.d.ts +2 -0
- package/lib/ImageCropper/ImageCropper.d.ts +3 -0
- package/lib/ImageCropper/ImageCropper.types.d.ts +13 -0
- package/lib/ImageCropper/hooks/useImageLoader.d.ts +4 -0
- package/lib/ImageCropper/util.d.ts +6 -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 +1 -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,18 @@
|
|
|
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
|
+
ctaSlot?: ImageAttachmentProps['ctaSlot'];
|
|
13
|
+
footerAd?: GalleryAdType;
|
|
14
|
+
images: ImageAttachmentProps['images'];
|
|
15
|
+
reserved?: ImageAttachmentProps['reserved'];
|
|
16
|
+
stickerSlot?: ImageAttachmentProps['stickerSlot'];
|
|
17
|
+
type: ImageAttachmentProps['type'];
|
|
18
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ImageAttachmentProps } from './ImageAttachment.types';
|
|
2
|
+
export declare const ImageAttachment: ({ activeIndex, ctaSlot, images, onImageClick, reserved, stickerSlot, type, }: ImageAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default ImageAttachment;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type ImageAttachmentProps = {
|
|
3
|
+
activeIndex?: number;
|
|
4
|
+
ctaSlot?: ReactElement;
|
|
5
|
+
images: string[];
|
|
6
|
+
onImageClick: (index: number) => void;
|
|
7
|
+
reserved?: boolean;
|
|
8
|
+
stickerSlot?: ReactElement;
|
|
9
|
+
type?: 'slideshow' | 'collage';
|
|
10
|
+
};
|
package/lib/ImageAttachment/components/PlaceholderImageAttachment/PlaceholderImageAttachment.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImageAttachmentProps } from '../../ImageAttachment.types';
|
|
2
|
+
type PlaceholderImageAttachmentProps = {
|
|
3
|
+
ctaSlot?: ImageAttachmentProps['ctaSlot'];
|
|
4
|
+
type: ImageAttachmentProps['type'];
|
|
5
|
+
};
|
|
6
|
+
export declare const PlaceholderImageAttachment: ({ ctaSlot, type, }: PlaceholderImageAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ImageCropperProps = {
|
|
2
|
+
aspectRatio?: number;
|
|
3
|
+
imageFile?: File;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onCrop: (image: File) => void;
|
|
6
|
+
translations?: {
|
|
7
|
+
close: string;
|
|
8
|
+
crop: string;
|
|
9
|
+
mobileTitle: string;
|
|
10
|
+
rotate: string;
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CropperRef, CropperState } from 'react-advanced-cropper';
|
|
2
|
+
export declare const cropImage: (cropperRef: React.RefObject<CropperRef>, imgType: string, onCrop: (file: File) => void) => void;
|
|
3
|
+
export declare const getDefaultSize: (state: CropperState) => {
|
|
4
|
+
height: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
@@ -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.20",
|
|
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
|
}
|