@goodhood-web/nebenan-base 4.12.0-development.1 → 4.12.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/index.d.ts +5 -1
- package/index.js +89 -89
- package/index.mjs +9851 -9690
- package/lib/ContentCreator/ContentCreatorProvider.d.ts +21 -0
- package/lib/ContentCreator/Store/contentCreator.d.ts +38 -3
- package/lib/RichTextArea/RichTextArea.types.d.ts +1 -1
- package/lib/RichTextArea/components/POI/POIRecommendation.d.ts +1 -1
- package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +2 -4
- package/lib/RichTextArea/components/POI/components/Suggestions/Suggestions.types.d.ts +3 -3
- package/lib/RichTextArea/components/POI/network.d.ts +19 -1
- package/lib/RichTextArea/components/POI/utils.d.ts +3 -3
- package/lib/RichTextArea/constants.d.ts +3 -3
- package/lib/RichTextArea/utils.d.ts +3 -0
- package/lib/utils/PremiumFeatureCompletionModal.d.ts +6 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/usePremiumFeatureCheckout.d.ts +3 -2
- package/lib/utils/usePremiumFeatureCheckoutCompletion.d.ts +12 -4
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React, ComponentType, PropsWithChildren } from 'react';
|
|
2
|
+
import { ContentCreatorProps, HoodMessage } from './ContentCreatorForm.types';
|
|
3
|
+
export type OpenPayload = Omit<ContentCreatorProps & {
|
|
4
|
+
autoOpenImageUpload?: boolean;
|
|
5
|
+
config: {
|
|
6
|
+
chargebee: {
|
|
7
|
+
site: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, 'open'>;
|
|
11
|
+
type ProviderProps = PropsWithChildren<{
|
|
12
|
+
invalidateCache?: (res: HoodMessage) => void;
|
|
13
|
+
}>;
|
|
14
|
+
interface ContentCreatorContextValue {
|
|
15
|
+
closeCC: () => void;
|
|
16
|
+
openCC: (props: OpenPayload) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useContentCreator: () => ContentCreatorContextValue;
|
|
19
|
+
export declare const ContentCreatorProvider: ({ children, invalidateCache }: ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function withContentCreator<TProps extends Record<string, unknown>, TRef = unknown>(Component: ComponentType<TProps & ContentCreatorContextValue>): React.ForwardRefExoticComponent<React.PropsWithoutRef<TProps> & React.RefAttributes<TRef>>;
|
|
21
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Poi } from '../../../../../api/src/lib/core_v2';
|
|
2
1
|
import { ImageFile } from '../../RichTextArea/RichTextArea.types';
|
|
3
2
|
export declare const contentCreatorImages: import('jotai').PrimitiveAtom<ImageFile[] | null> & {
|
|
4
3
|
init: ImageFile[] | null;
|
|
@@ -6,6 +5,42 @@ export declare const contentCreatorImages: import('jotai').PrimitiveAtom<ImageFi
|
|
|
6
5
|
export declare const selectedContentCreatorImage: import('jotai').PrimitiveAtom<ImageFile | null> & {
|
|
7
6
|
init: ImageFile | null;
|
|
8
7
|
};
|
|
9
|
-
export declare const eventLocation: import('jotai').PrimitiveAtom<
|
|
10
|
-
|
|
8
|
+
export declare const eventLocation: import('jotai').PrimitiveAtom<{
|
|
9
|
+
id: string;
|
|
10
|
+
categories: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
11
|
+
gid: string;
|
|
12
|
+
kind: "business" | "organization";
|
|
13
|
+
legacy_gid: string;
|
|
14
|
+
recommendations_count: number;
|
|
15
|
+
subcategories: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
16
|
+
supporter: boolean;
|
|
17
|
+
title?: string | null;
|
|
18
|
+
city?: string | null;
|
|
19
|
+
house_number?: string | null;
|
|
20
|
+
location?: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
21
|
+
street?: string | null;
|
|
22
|
+
zip_code?: string | null;
|
|
23
|
+
banner_url?: string | null;
|
|
24
|
+
logo_url?: string | null;
|
|
25
|
+
representative_image_url?: string | null;
|
|
26
|
+
} | null> & {
|
|
27
|
+
init: {
|
|
28
|
+
id: string;
|
|
29
|
+
categories: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
30
|
+
gid: string;
|
|
31
|
+
kind: "business" | "organization";
|
|
32
|
+
legacy_gid: string;
|
|
33
|
+
recommendations_count: number;
|
|
34
|
+
subcategories: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
35
|
+
supporter: boolean;
|
|
36
|
+
title?: string | null;
|
|
37
|
+
city?: string | null;
|
|
38
|
+
house_number?: string | null;
|
|
39
|
+
location?: import('../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
40
|
+
street?: string | null;
|
|
41
|
+
zip_code?: string | null;
|
|
42
|
+
banner_url?: string | null;
|
|
43
|
+
logo_url?: string | null;
|
|
44
|
+
representative_image_url?: string | null;
|
|
45
|
+
} | null;
|
|
11
46
|
};
|
|
@@ -48,7 +48,7 @@ export type EmbeddableType = CoreV3Embed;
|
|
|
48
48
|
export type ContentEmbeddable = CoreV3Embed;
|
|
49
49
|
export type RichTextAreaValueType = {
|
|
50
50
|
attachments?: {
|
|
51
|
-
images?: ImageFile[];
|
|
51
|
+
images?: ImageFile[] | string[];
|
|
52
52
|
};
|
|
53
53
|
body: string;
|
|
54
54
|
embeddables: EmbeddableType[] | [];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { POIRecommendationProps } from './POIRecommendation.types';
|
|
2
|
-
declare const POIRecommendation: ({ onAddLocation, onDismiss, onSelect, openSheet,
|
|
2
|
+
declare const POIRecommendation: ({ onAddLocation, onDismiss, onSelect, openSheet, searchableListProps, }: POIRecommendationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default POIRecommendation;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { components } from '../../../../../../api/src/lib/core';
|
|
2
|
-
import { Poi } from '../../../../../../api/src/lib/core_v2';
|
|
3
2
|
import { SearchableListProps } from '../../../SearchableList/SearchableList.types';
|
|
3
|
+
export type V3BusinessProfile = components['schemas']['Core_V3_NOPE_Profile'];
|
|
4
4
|
export type POIRecommendationProps = {
|
|
5
5
|
onAddLocation?: (name: string) => void;
|
|
6
6
|
onDismiss: () => void;
|
|
7
|
-
onSelect: (poi:
|
|
7
|
+
onSelect: (poi: V3BusinessProfile) => void;
|
|
8
8
|
openSheet: boolean;
|
|
9
|
-
purpose?: 'recommendation' | 'event_location';
|
|
10
9
|
searchableListProps?: {
|
|
11
10
|
headerProps?: SearchableListProps['headerProps'];
|
|
12
11
|
inputProps?: SearchableListProps['inputProps'];
|
|
@@ -20,4 +19,3 @@ export type POICategory = {
|
|
|
20
19
|
key?: string;
|
|
21
20
|
label: string;
|
|
22
21
|
};
|
|
23
|
-
export type V3BusinessProfile = components['schemas']['Core_V3_NOPE_Profile'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V3BusinessProfile } from '../../POIRecommendation.types';
|
|
2
2
|
export type SuggestionsProps = {
|
|
3
|
-
onSelect: (poi:
|
|
4
|
-
pois:
|
|
3
|
+
onSelect: (poi: V3BusinessProfile) => void;
|
|
4
|
+
pois: V3BusinessProfile[] | null;
|
|
5
5
|
};
|
|
@@ -19,4 +19,22 @@ export declare const fetchBusinessProfileV3: (uuid: string) => Promise<{
|
|
|
19
19
|
representative_image_url?: string | null;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
export declare const fetchProfile: () => Promise<import('../../../../../../api/src/lib/core_v2').ProfileResponse>;
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const fetchNopeProfiles: (query: string) => Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
categories: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
25
|
+
gid: string;
|
|
26
|
+
kind: "business" | "organization";
|
|
27
|
+
legacy_gid: string;
|
|
28
|
+
recommendations_count: number;
|
|
29
|
+
subcategories: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
30
|
+
supporter: boolean;
|
|
31
|
+
title?: string | null;
|
|
32
|
+
city?: string | null;
|
|
33
|
+
house_number?: string | null;
|
|
34
|
+
location?: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
35
|
+
street?: string | null;
|
|
36
|
+
zip_code?: string | null;
|
|
37
|
+
banner_url?: string | null;
|
|
38
|
+
logo_url?: string | null;
|
|
39
|
+
representative_image_url?: string | null;
|
|
40
|
+
}[] | undefined>;
|
|
@@ -3,12 +3,12 @@ import { ProfileResponse } from '../../../../../../api/src/lib/core_v2/types';
|
|
|
3
3
|
import { LinkedBusinessProfile } from '../../../../../../api/src/lib/types/newsFeeds';
|
|
4
4
|
import { POICategory, V3BusinessProfile } from './POIRecommendation.types';
|
|
5
5
|
export declare const formatAddressFull: (item: Poi | LinkedBusinessProfile | V3BusinessProfile, joiner?: string) => string;
|
|
6
|
-
export declare const getLikedProp: (
|
|
7
|
-
export declare const hasLiked: (profile: ProfileResponse, poi:
|
|
6
|
+
export declare const getLikedProp: (model: string) => "recommends_unclaimed_profile_ids" | "recommends_organization_profile_ids" | "recommends_business_profile_ids" | undefined;
|
|
7
|
+
export declare const hasLiked: (profile: ProfileResponse, poi: V3BusinessProfile) => boolean;
|
|
8
8
|
export declare const getItemCategoryLabel: (categories_labels?: POICategory[], subcategories_labels?: POICategory[]) => string | null;
|
|
9
9
|
export declare const getPoiPlaceholderIconName: (type: string) => "business" | "special_place" | "organisation";
|
|
10
10
|
export declare const generateBadgeType: (badges: string[]) => "commercial_supporter" | "organization_supporter";
|
|
11
11
|
export declare const generateBadgeTypeV3: (kind: "business" | "organization") => "commercial_supporter" | "organization_supporter";
|
|
12
|
-
export declare const generateLocationGid: (value:
|
|
12
|
+
export declare const generateLocationGid: (value: V3BusinessProfile) => string;
|
|
13
13
|
export declare const extractPoiUuidFromAssociatedGid: (gid: string) => string | null;
|
|
14
14
|
export declare const parseKindType: (kind: V3BusinessProfile["kind"]) => "business" | "organisation";
|
|
@@ -3,9 +3,9 @@ export declare const POI_CATEGORY_BUSINESS = "biz";
|
|
|
3
3
|
export declare const BADGE_ORGANIZATION_SPONSOR = "organization_supporter";
|
|
4
4
|
export declare const BADGE_COMMERCIAL_SPONSOR = "commercial_supporter";
|
|
5
5
|
export declare const DISPLAY_ADDRESS_ORDER = "street,house_number,zip_code,city";
|
|
6
|
-
export declare const POI_TYPE_UNCLAIMED = "
|
|
7
|
-
export declare const POI_TYPE_ORGANIZATION = "
|
|
8
|
-
export declare const POI_TYPE_BUSINESS = "
|
|
6
|
+
export declare const POI_TYPE_UNCLAIMED = "UnclaimedProfile";
|
|
7
|
+
export declare const POI_TYPE_ORGANIZATION = "OrganizationProfile";
|
|
8
|
+
export declare const POI_TYPE_BUSINESS = "BusinessProfile";
|
|
9
9
|
export declare const POI_SUBCATEGORY_ORGANIZATION_OTHER = "other";
|
|
10
10
|
export declare const POI_SUBCATEGORY_BUSINESS_OTHER = "other";
|
|
11
11
|
export declare const POI_SUBCATEGORY_SPECIAL_OTHER = "other";
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { HoodMessage } from '../ContentCreator/ContentCreatorForm.types';
|
|
1
2
|
/**
|
|
2
3
|
* Hook to handle Premium Feature checkout with Chargebee.
|
|
3
4
|
*/
|
|
4
|
-
export declare const usePremiumFeatureCheckout: () => {
|
|
5
|
+
export declare const usePremiumFeatureCheckout: (finalizeSubmit?: (response: HoodMessage) => void) => {
|
|
5
6
|
PremiumFeatureCheckoutModal: import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
startCheckout: (postId: string, productId: string) => Promise<void>;
|
|
7
|
+
startCheckout: (postId: string, productId: string, res?: HoodMessage | undefined) => Promise<void>;
|
|
7
8
|
};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
interface SentryReporter {
|
|
2
|
+
captureException: (error: Error, context?: Record<string, unknown>) => void;
|
|
3
|
+
}
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
5
|
+
* Bulletproof hook to handle Chargebee payment confirmation after redirect.
|
|
6
|
+
* Returns confirmation state without any UI - component decides what to render.
|
|
7
|
+
*
|
|
8
|
+
* @param postId - ID of the post associated with the checkout (optional for global usage)
|
|
9
|
+
* @param sentryReporter - Sentry instance for error reporting (optional)
|
|
10
|
+
* @returns {isSuccess, loading} - Confirmation state
|
|
4
11
|
*/
|
|
5
|
-
export declare const usePremiumFeatureCheckoutCompletion: (postId
|
|
6
|
-
|
|
12
|
+
export declare const usePremiumFeatureCheckoutCompletion: (postId?: string, sentryReporter?: SentryReporter) => {
|
|
13
|
+
isSuccess: boolean;
|
|
7
14
|
loading: boolean;
|
|
8
15
|
};
|
|
16
|
+
export {};
|