@homefile/components-v2 2.51.3 → 2.51.5
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/dist/assets/locales/en/index.json +2 -1
- package/dist/components/partner/wizardSteps/PartnerWizardStepCta.d.ts +2 -1
- package/dist/components/partner/wizardSteps/PartnerWizardStepCta.js +15 -6
- package/dist/components/partner/wizardSteps/PartnerWizardStepServiceZones.d.ts +2 -1
- package/dist/components/partner/wizardSteps/PartnerWizardStepServiceZones.js +9 -3
- package/dist/components/partner/wizardSteps/PartnerWizardStepSocial.d.ts +2 -1
- package/dist/components/partner/wizardSteps/PartnerWizardStepSocial.js +26 -14
- package/dist/interfaces/partner/PartnerWizardStepCta.interface.d.ts +15 -0
- package/dist/interfaces/partner/PartnerWizardStepCta.interface.js +1 -0
- package/dist/interfaces/partner/PartnerWizardStepServiceZones.interface.d.ts +6 -0
- package/dist/interfaces/partner/PartnerWizardStepServiceZones.interface.js +1 -0
- package/dist/interfaces/partner/PartnerWizardStepSocial.interface.d.ts +14 -0
- package/dist/interfaces/partner/PartnerWizardStepSocial.interface.js +1 -0
- package/dist/interfaces/partner/index.d.ts +3 -0
- package/dist/interfaces/partner/index.js +3 -0
- package/package.json +1 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { PartnerWizardStepCtaI } from '../../../interfaces';
|
|
2
|
+
export declare const PartnerWizardStepCta: ({ value, onChange, errors, isDisabled, }: PartnerWizardStepCtaI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,12 +6,21 @@ import { Box, Flex, Text } from '@chakra-ui/react';
|
|
|
6
6
|
import { TextInput } from '../../../components';
|
|
7
7
|
import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
|
|
8
8
|
const STEP_KEY = 'partner.wizardSteps.cta';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const buildDefaultValue = () => ({
|
|
10
|
+
primaryActionButton: '',
|
|
11
|
+
secondaryActionButton: '',
|
|
12
|
+
leadSubmissionEmail: '',
|
|
13
|
+
crmName: '',
|
|
14
|
+
});
|
|
15
|
+
export const PartnerWizardStepCta = ({ value, onChange, errors, isDisabled = false, }) => {
|
|
16
|
+
const [internalValue, setInternalValue] = useState(buildDefaultValue);
|
|
17
|
+
const currentValue = value !== null && value !== void 0 ? value : internalValue;
|
|
18
|
+
const handleChange = (next) => {
|
|
19
|
+
if (!value)
|
|
20
|
+
setInternalValue(next);
|
|
21
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(next);
|
|
22
|
+
};
|
|
14
23
|
return (_jsxs(PartnerWizardStepLayout, { title: t(`${STEP_KEY}.title`), contentFullWidth: true, subtitle: _jsx(Trans, { i18nKey: `${STEP_KEY}.subtitle`, components: {
|
|
15
24
|
bold: _jsx(Text, { as: "span", fontWeight: "bold" }),
|
|
16
|
-
} }), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.primaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardPrimaryAction", placeholder: t(`${STEP_KEY}.primaryActionPlaceholder`), value:
|
|
25
|
+
} }), children: [_jsxs(Flex, { gap: "base", direction: { base: 'column', md: 'row' }, children: [_jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.primaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardPrimaryAction", placeholder: t(`${STEP_KEY}.primaryActionPlaceholder`), value: currentValue.primaryActionButton, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { primaryActionButton: event.target.value })), errorMessage: errors === null || errors === void 0 ? void 0 : errors.primaryActionButton, isDisabled: isDisabled })] }), _jsxs(Box, { flex: "1", children: [_jsx(Text, { fontSize: "xs", mb: "1", textTransform: "uppercase", children: t(`${STEP_KEY}.secondaryActionLabel`) }), _jsx(TextInput, { showLabel: false, id: "partnerWizardSecondaryAction", placeholder: t(`${STEP_KEY}.secondaryActionPlaceholder`), value: currentValue.secondaryActionButton, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { secondaryActionButton: event.target.value })), isDisabled: isDisabled })] })] }), _jsxs(Box, { bg: "lightBlue.12", p: "base", borderRadius: "sm", children: [_jsx(Text, { mb: "1", children: t(`${STEP_KEY}.leadSubmissionTitle`) }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mb: "2", children: t(`${STEP_KEY}.leadEmailLabel`) }), _jsx(TextInput, { id: "partnerWizardLeadEmail", placeholder: t(`${STEP_KEY}.leadEmailPlaceholder`), value: currentValue.leadSubmissionEmail, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { leadSubmissionEmail: event.target.value })), errorMessage: errors === null || errors === void 0 ? void 0 : errors.leadSubmissionEmail, isDisabled: isDisabled }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", mt: "3", mb: "2", children: t(`${STEP_KEY}.crmLabel`) }), _jsx(TextInput, { id: "partnerWizardCrmName", placeholder: t(`${STEP_KEY}.crmPlaceholder`), value: currentValue.crmName, handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { crmName: event.target.value })), isDisabled: isDisabled })] })] }));
|
|
17
26
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { PartnerWizardStepServiceZonesI } from '../../../interfaces';
|
|
2
|
+
export declare const PartnerWizardStepServiceZones: ({ value, onChange, errorMessage, isDisabled, }: PartnerWizardStepServiceZonesI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,13 @@ import { useState } from 'react';
|
|
|
3
3
|
import { t } from 'i18next';
|
|
4
4
|
import { TextAreaInput } from '../../../components';
|
|
5
5
|
import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
|
|
6
|
-
export const PartnerWizardStepServiceZones = () => {
|
|
7
|
-
const [
|
|
8
|
-
|
|
6
|
+
export const PartnerWizardStepServiceZones = ({ value, onChange, errorMessage, isDisabled = false, }) => {
|
|
7
|
+
const [internalValue, setInternalValue] = useState('');
|
|
8
|
+
const currentValue = value !== null && value !== void 0 ? value : internalValue;
|
|
9
|
+
const handleChange = (next) => {
|
|
10
|
+
if (value === undefined)
|
|
11
|
+
setInternalValue(next);
|
|
12
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(next);
|
|
13
|
+
};
|
|
14
|
+
return (_jsx(PartnerWizardStepLayout, { title: t('partner.wizardSteps.serviceZones.title'), subtitle: t('partner.wizardSteps.serviceZones.subtitle'), contentFullWidth: true, children: _jsx(TextAreaInput, { id: "partnerWizardServiceZones", placeholder: t('partner.wizardSteps.serviceZones.placeholder'), value: currentValue, onChange: (event) => handleChange(event.target.value), errorMessage: errorMessage, isDisabled: isDisabled, minH: "260px", resize: "none" }) }));
|
|
9
15
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { PartnerWizardStepSocialI } from '../../../interfaces';
|
|
2
|
+
export declare const PartnerWizardStepSocial: ({ value, onChange, errorMessage, isDisabled, }: PartnerWizardStepSocialI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { t } from 'i18next';
|
|
4
|
+
import { Text } from '@chakra-ui/react';
|
|
4
5
|
import { TextInput } from '../../../components';
|
|
5
6
|
import { PartnerWizardStepLayout } from './PartnerWizardStepLayout';
|
|
6
7
|
const STEP_KEY = 'partner.wizardSteps.social';
|
|
7
|
-
const SOCIAL_FIELDS = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
const SOCIAL_FIELDS = [
|
|
9
|
+
'facebook',
|
|
10
|
+
'instagram',
|
|
11
|
+
'youtube',
|
|
12
|
+
'twitter',
|
|
13
|
+
'linkedin',
|
|
14
|
+
'tiktok',
|
|
15
|
+
];
|
|
16
|
+
const buildDefaultValue = () => ({
|
|
17
|
+
facebook: '',
|
|
18
|
+
instagram: '',
|
|
19
|
+
youtube: '',
|
|
20
|
+
twitter: '',
|
|
21
|
+
linkedin: '',
|
|
22
|
+
tiktok: '',
|
|
23
|
+
});
|
|
24
|
+
export const PartnerWizardStepSocial = ({ value, onChange, errorMessage, isDisabled = false, }) => {
|
|
25
|
+
const [internalValue, setInternalValue] = useState(buildDefaultValue);
|
|
26
|
+
const currentValue = value !== null && value !== void 0 ? value : internalValue;
|
|
27
|
+
const handleChange = (next) => {
|
|
28
|
+
if (!value)
|
|
29
|
+
setInternalValue(next);
|
|
30
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(next);
|
|
16
31
|
};
|
|
17
|
-
return (
|
|
18
|
-
const field = SOCIAL_FIELDS[index];
|
|
19
|
-
return (_jsx(TextInput, { id: `partnerWizardSocial-${field}`, placeholder: t(`${STEP_KEY}.placeholder.${field}`), value: socialLink, handleChange: (event) => handleSocialLinkChange(index, event.target.value) }, `partnerWizardSocial-${field}`));
|
|
20
|
-
}) }));
|
|
32
|
+
return (_jsxs(PartnerWizardStepLayout, { title: t(`${STEP_KEY}.title`), subtitle: t(`${STEP_KEY}.subtitle`), contentSpacing: "3", contentFullWidth: true, children: [SOCIAL_FIELDS.map((field) => (_jsx(TextInput, { id: `partnerWizardSocial-${field}`, placeholder: t(`${STEP_KEY}.placeholder.${field}`), value: currentValue[field], handleChange: (event) => handleChange(Object.assign(Object.assign({}, currentValue), { [field]: event.target.value })), isDisabled: isDisabled }, `partnerWizardSocial-${field}`))), errorMessage && (_jsx(Text, { variant: "error", my: "1", children: errorMessage }))] }));
|
|
21
33
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PartnerWizardStepCtaValue = {
|
|
2
|
+
primaryActionButton: string;
|
|
3
|
+
secondaryActionButton: string;
|
|
4
|
+
leadSubmissionEmail: string;
|
|
5
|
+
crmName: string;
|
|
6
|
+
};
|
|
7
|
+
export interface PartnerWizardStepCtaI {
|
|
8
|
+
value?: PartnerWizardStepCtaValue;
|
|
9
|
+
onChange?: (value: PartnerWizardStepCtaValue) => void;
|
|
10
|
+
errors?: {
|
|
11
|
+
primaryActionButton?: string;
|
|
12
|
+
leadSubmissionEmail?: string;
|
|
13
|
+
};
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PartnerWizardStepSocialValue = {
|
|
2
|
+
facebook: string;
|
|
3
|
+
instagram: string;
|
|
4
|
+
youtube: string;
|
|
5
|
+
twitter: string;
|
|
6
|
+
linkedin: string;
|
|
7
|
+
tiktok: string;
|
|
8
|
+
};
|
|
9
|
+
export interface PartnerWizardStepSocialI {
|
|
10
|
+
value?: PartnerWizardStepSocialValue;
|
|
11
|
+
onChange?: (value: PartnerWizardStepSocialValue) => void;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -20,3 +20,6 @@ export * from './ShortPartnerTile.interface';
|
|
|
20
20
|
export * from './PartnerWizardSteps.interface';
|
|
21
21
|
export * from './PartnerWizardStepServicesSelect.interface';
|
|
22
22
|
export * from './PartnerWizardStepBrand.interface';
|
|
23
|
+
export * from './PartnerWizardStepServiceZones.interface';
|
|
24
|
+
export * from './PartnerWizardStepCta.interface';
|
|
25
|
+
export * from './PartnerWizardStepSocial.interface';
|
|
@@ -20,3 +20,6 @@ export * from './ShortPartnerTile.interface';
|
|
|
20
20
|
export * from './PartnerWizardSteps.interface';
|
|
21
21
|
export * from './PartnerWizardStepServicesSelect.interface';
|
|
22
22
|
export * from './PartnerWizardStepBrand.interface';
|
|
23
|
+
export * from './PartnerWizardStepServiceZones.interface';
|
|
24
|
+
export * from './PartnerWizardStepCta.interface';
|
|
25
|
+
export * from './PartnerWizardStepSocial.interface';
|