@goodhood-web/nebenan-core 3.4.0-development.4 → 3.4.0-development.40
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 +2 -1
- package/index.js +12 -11
- package/index.mjs +7180 -5093
- package/lib/DynamicRenderer/DynamicRenderer.types.d.ts +1 -1
- package/lib/PersuasionBlock/PersuasionCta/PersuasionCta.d.ts +9 -0
- package/lib/PersuasionBlock/PersuasionCta/PersuasionCta.strapi.d.ts +6 -0
- package/lib/SponsorCardForm/SponsorCardForm.d.ts +1 -1
- package/lib/SponsorCardForm/SponsorCardForm.strapi.d.ts +2 -1
- package/lib/SponsorCardForm/SponsorCardForm.types.d.ts +1 -0
- package/lib/SponsorCardForm/hooks/use_sponsor_form_event_bus.d.ts +2 -0
- package/lib/deals/DealsVoucher/CodeCopyButton/CodeCopyButton.d.ts +3 -0
- package/lib/deals/DealsVoucher/CodeCopyButton/CodeCopyButton.types.d.ts +6 -0
- package/lib/deals/DealsVoucher/DealsVoucher.d.ts +3 -0
- package/lib/deals/DealsVoucher/DealsVoucher.types.d.ts +14 -0
- package/lib/deals/DealsVoucher/DealsVoucherCard/DealsVoucherCard.d.ts +3 -0
- package/lib/deals/DealsVoucher/DealsVoucherCard/DealsVoucherCard.types.d.ts +16 -0
- package/lib/deals/DealsVoucherPage/DealsVoucherPage.d.ts +3 -0
- package/lib/deals/DealsVoucherPage/DealsVoucherPage.types.d.ts +2 -0
- package/lib/deals/network.d.ts +13 -0
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -2,7 +2,7 @@ import { components } from '../../../../api/src/core/strapi/generated_types';
|
|
|
2
2
|
import { SubmitValues } from '../SponsorCardForm/SponsorCardForm.types';
|
|
3
3
|
export interface DynamicRendererProps {
|
|
4
4
|
dynamicContent: {
|
|
5
|
-
blocks: (components['schemas']['CoreComponentsSponsorCardComponent'] | components['schemas']['CoreComponentsPersuasionImageSetComponent'] | components['schemas']['CoreComponentsPersuasionContentComponent'] | components['schemas']['CoreComponentsLegalComponent'] | components['schemas']['CoreComponentsPrivacyComponent'] | components['schemas']['CoreComponentsAccordionComponent'] | components['schemas']['LandingComponentsQuoteComponent'])[];
|
|
5
|
+
blocks: (components['schemas']['CoreComponentsSponsorCardComponent'] | components['schemas']['CoreComponentsPersuasionImageSetComponent'] | components['schemas']['CoreComponentsPersuasionContentComponent'] | components['schemas']['CoreComponentsLegalComponent'] | components['schemas']['CoreComponentsPrivacyComponent'] | components['schemas']['CoreComponentsAccordionComponent'] | components['schemas']['LandingComponentsQuoteComponent'] | components['schemas']['CoreComponentsPersuasionCtaComponent'])[];
|
|
6
6
|
cardHeader?: components['schemas']['SubcomponentsCardHeaderComponent'];
|
|
7
7
|
};
|
|
8
8
|
onError?: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type PersuasionCtaProps = {
|
|
2
|
+
body?: string;
|
|
3
|
+
legalButtonLabel?: string;
|
|
4
|
+
legalLabel?: string;
|
|
5
|
+
submitLabel?: string;
|
|
6
|
+
submitSecurityText?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const PersuasionCta: ({ body, legalButtonLabel, legalLabel, submitLabel, submitSecurityText, }: PersuasionCtaProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default PersuasionCta;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { components } from '../../../../../api/src/core/strapi/generated_types';
|
|
2
|
+
type PersuasionCtaBlockProps = {
|
|
3
|
+
block: components['schemas']['CoreComponentsPersuasionCtaComponent'];
|
|
4
|
+
};
|
|
5
|
+
export declare const StrapiPersuasionCta: ({ block }: PersuasionCtaBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default StrapiPersuasionCta;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SponsorCardFormProps } from './SponsorCardForm.types';
|
|
2
|
-
declare const SponsorCardForm: ({ blocks, defaultSelectedToggle, fieldDescription, fieldErrors, guidelinesModalData, hero, layout, onError, onSubmit, scrollYTop, stickyButton, }: SponsorCardFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SponsorCardForm: ({ blocks, defaultSelectedToggle, fieldDescription, fieldErrors, guidelinesModalData, hero, isCtaBlockPresent, layout, onError, onSubmit, scrollYTop, stickyButton, }: SponsorCardFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SponsorCardForm;
|
|
@@ -2,9 +2,10 @@ import { components } from '../../../../api/src/core/strapi/generated_types';
|
|
|
2
2
|
import { SubmitValues } from './SponsorCardForm.types';
|
|
3
3
|
export interface StrapiSponsorCardFormProps {
|
|
4
4
|
block: components['schemas']['CoreComponentsSponsorCardComponent'];
|
|
5
|
+
isCtaBlockPresent: boolean;
|
|
5
6
|
isDesktop: boolean;
|
|
6
7
|
onError: () => void;
|
|
7
8
|
onSubmit: (values: SubmitValues) => void;
|
|
8
9
|
}
|
|
9
|
-
declare const StrapiSponsorCardForm: ({ block, isDesktop, onError, onSubmit, }: StrapiSponsorCardFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const StrapiSponsorCardForm: ({ block, isCtaBlockPresent, isDesktop, onError, onSubmit, }: StrapiSponsorCardFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default StrapiSponsorCardForm;
|
|
@@ -49,6 +49,7 @@ export interface SponsorCardFormProps {
|
|
|
49
49
|
fieldErrors: FieldErrorsDataProps;
|
|
50
50
|
guidelinesModalData: GuidelinesModalDataProps;
|
|
51
51
|
hero: HeroDataProps;
|
|
52
|
+
isCtaBlockPresent: boolean;
|
|
52
53
|
layout: string[];
|
|
53
54
|
onError: () => void;
|
|
54
55
|
onSubmit: (value: SubmitValues) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createClient } from '../../../../../api/src/core/nope';
|
|
2
|
+
import { SuccessResponseType } from '../../../../../api/src/core/nope/types';
|
|
3
|
+
import { VoucherPostParams } from '../network';
|
|
4
|
+
import { VoucherCardTranslations } from './DealsVoucherCard/DealsVoucherCard.types';
|
|
5
|
+
export type DealsVoucherProps = {
|
|
6
|
+
nopeApiClient: ReturnType<typeof createClient>;
|
|
7
|
+
translations: VoucherCardTranslations;
|
|
8
|
+
voucherParams: Omit<VoucherPostParams, 'event_type'>;
|
|
9
|
+
};
|
|
10
|
+
type VoucherResponse = SuccessResponseType<'/api/hood_messages/{core_hood_message_id}/voucher', 'post'>['voucher'];
|
|
11
|
+
export type VoucherModel = {
|
|
12
|
+
[K in keyof VoucherResponse]-?: NonNullable<VoucherResponse[K]>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { VoucherCardProps } from './DealsVoucherCard.types';
|
|
2
|
+
declare const VoucherCard: ({ onRedeemClick, translations: { buttonLabel, copyButtonAriaLabel, dealLabel, expirationDateLabel, fromLabel, headerText, noteText, snackbarText, }, voucherData, }: VoucherCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default VoucherCard;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VoucherModel } from '../DealsVoucher.types';
|
|
2
|
+
export type VoucherCardTranslations = {
|
|
3
|
+
buttonLabel: string;
|
|
4
|
+
copyButtonAriaLabel: string;
|
|
5
|
+
dealLabel: string;
|
|
6
|
+
expirationDateLabel: string;
|
|
7
|
+
fromLabel: string;
|
|
8
|
+
headerText: string;
|
|
9
|
+
noteText: string;
|
|
10
|
+
snackbarText: string;
|
|
11
|
+
};
|
|
12
|
+
export type VoucherCardProps = {
|
|
13
|
+
onRedeemClick: () => void;
|
|
14
|
+
translations: VoucherCardTranslations;
|
|
15
|
+
voucherData: VoucherModel;
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createClient } from '../../../../api/src/core/nope';
|
|
2
|
+
import { RequestBodyType } from '../../../../api/src/core/nope/types';
|
|
3
|
+
export type VoucherPostParams = {
|
|
4
|
+
core_hood_message_id: number;
|
|
5
|
+
} & RequestBodyType<'/api/hood_messages/{core_hood_message_id}/voucher', 'post'>;
|
|
6
|
+
export declare const createFetchVoucher: (client: ReturnType<typeof createClient>) => ({ core_hood_message_id, core_user_id, event_type, profile_id, }: VoucherPostParams) => Promise<{
|
|
7
|
+
profile: import('../../../../api/src/core/nope/generated_types').components["schemas"]["PublicProfile"];
|
|
8
|
+
hood_message_subject?: string | null;
|
|
9
|
+
hood_message_picture_url?: string | null;
|
|
10
|
+
voucher_code?: string | null;
|
|
11
|
+
valid_from?: string | null;
|
|
12
|
+
valid_until?: string | null;
|
|
13
|
+
}>;
|