@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.
@@ -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,2 @@
1
+ declare const useSponsorFormEventBus: (isCtaBlockPresent: boolean, handleOnSubmit: () => void, handleOpenModal: (value: boolean) => void) => void;
2
+ export default useSponsorFormEventBus;
@@ -0,0 +1,3 @@
1
+ import { CodeCopyButtonProps } from './CodeCopyButton.types';
2
+ declare const CodeCopyButton: import('react').ForwardRefExoticComponent<CodeCopyButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
3
+ export default CodeCopyButton;
@@ -0,0 +1,6 @@
1
+ export type CodeCopyButtonProps = {
2
+ ariaLabel: string;
3
+ code: string;
4
+ codeLabel: string;
5
+ onClick: () => void;
6
+ };
@@ -0,0 +1,3 @@
1
+ import { DealsVoucherProps } from './DealsVoucher.types';
2
+ declare const DealsVoucher: ({ nopeApiClient, translations, voucherParams, }: DealsVoucherProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default DealsVoucher;
@@ -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,3 @@
1
+ import { DealsVoucherPageProps } from './DealsVoucherPage.types';
2
+ declare const DealsVoucherPage: (props: DealsVoucherPageProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default DealsVoucherPage;
@@ -0,0 +1,2 @@
1
+ import { DealsVoucherProps } from '../DealsVoucher/DealsVoucher.types';
2
+ export type DealsVoucherPageProps = DealsVoucherProps;
@@ -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
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-core",
3
- "version": "3.4.0-development.4",
3
+ "version": "3.4.0-development.40",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",