@popmenu/common-ui 0.157.0 → 0.159.0
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/build/cjs/components/Avatar/Avatar.d.ts +1 -1
- package/build/cjs/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
- package/build/cjs/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/cjs/components/Chip/Chip.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -3
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.d.ts +2 -1
- package/build/cjs/components/IconButton/IconButton.d.ts +1 -1
- package/build/cjs/components/Paper/Paper.d.ts +1 -1
- package/build/cjs/components/PaperContent/PaperContent.d.ts +1 -1
- package/build/cjs/components/Radio/Radio.d.ts +1 -1
- package/build/cjs/components/Switch/Switch.d.ts +1 -1
- package/build/cjs/components/TabPanel/TabPanel.d.ts +2 -2
- package/build/cjs/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/cjs/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/cjs/index.js +28 -10
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/Avatar/Avatar.d.ts +1 -1
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
- package/build/esm/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/esm/components/Chip/Chip.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +8 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +4 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.js +14 -9
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.d.ts +2 -1
- package/build/esm/components/IconButton/IconButton.d.ts +1 -1
- package/build/esm/components/Paper/Paper.d.ts +1 -1
- package/build/esm/components/PaperContent/PaperContent.d.ts +1 -1
- package/build/esm/components/Radio/Radio.d.ts +1 -1
- package/build/esm/components/Switch/Switch.d.ts +1 -1
- package/build/esm/components/TabPanel/TabPanel.d.ts +2 -2
- package/build/esm/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/esm/components/Tooltip/Tooltip.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarProps } from './AvatarProps';
|
|
3
|
-
export declare const Avatar: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const BrowserSilhouette: ({ children }: PropsWithChildren<Record<string, unknown>>) => JSX.Element;
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
export declare const BrowserSilhouette: ({ children }: PropsWithChildren<Record<string, unknown>>) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckboxProps } from './CheckboxProps';
|
|
3
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChipProps } from './ChipProps';
|
|
3
3
|
export declare const Chip: {
|
|
4
|
-
<C extends React.ElementType = "div">(props: ChipProps<C>): JSX.Element;
|
|
4
|
+
<C extends React.ElementType = "div">(props: ChipProps<C>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationAltActions: () => React.JSX.Element | null;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationBody: () => React.JSX.Element;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface FollowerAuthenticationCloseButtonProps {
|
|
2
3
|
show: boolean;
|
|
3
4
|
}
|
|
4
|
-
export declare const FollowerAuthenticationCloseButton: ({ show }: FollowerAuthenticationCloseButtonProps) => JSX.Element | null;
|
|
5
|
+
export declare const FollowerAuthenticationCloseButton: ({ show }: FollowerAuthenticationCloseButtonProps) => React.JSX.Element | null;
|
|
5
6
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps';
|
|
2
|
-
export declare const FollowerAuthenticationDialog: (props: FollowerAuthenticationDialogProps) => JSX.Element;
|
|
3
|
+
export declare const FollowerAuthenticationDialog: (props: FollowerAuthenticationDialogProps) => React.JSX.Element;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type SignUpSetting = {
|
|
|
9
9
|
birthday?: SignUpFieldSetting;
|
|
10
10
|
weddingAnniversary?: SignUpFieldSetting;
|
|
11
11
|
};
|
|
12
|
+
export type SignInMethod = 'email' | 'phone';
|
|
12
13
|
export type FollowerAuthenticationDialogProps = {
|
|
13
14
|
open: boolean;
|
|
14
15
|
state: ReducerState;
|
|
@@ -29,6 +30,7 @@ export type FollowerAuthenticationDialogProps = {
|
|
|
29
30
|
vipBenefitRows?: FollowerAuthenticationVipBenefitRow[];
|
|
30
31
|
showSubscribeEmail?: boolean;
|
|
31
32
|
showSubscribeSms?: boolean;
|
|
33
|
+
signInMethod?: SignInMethod;
|
|
32
34
|
signUpSetting?: SignUpSetting;
|
|
33
35
|
onActionButtonClick: (eventType: ClickEventType, values?: Record<string, string>) => void;
|
|
34
36
|
};
|
|
@@ -36,6 +38,7 @@ export type ReducerState = {
|
|
|
36
38
|
value: ReducerStateValue;
|
|
37
39
|
context: {
|
|
38
40
|
email?: string;
|
|
41
|
+
pendingEmail?: string;
|
|
39
42
|
phone?: string;
|
|
40
43
|
name?: string;
|
|
41
44
|
favoriteLocationId?: number;
|
|
@@ -45,9 +48,9 @@ export type ReducerState = {
|
|
|
45
48
|
weddingDay?: number;
|
|
46
49
|
};
|
|
47
50
|
};
|
|
48
|
-
export type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailMagicLinkSent' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone' | 'completeProfile';
|
|
49
|
-
export type ClickEventType = 'submit-form' | 'click-close' | 'code-sent' | 'request-auth-code-email' | 'request-auth-code-sms' | 'close' | 'use-different-account' | 'sign-in-with-password' | 'sign-in-with-facebook' | 'sign-in-with-google' | 'sign-in-with-apple' | 'open-terms-of-service' | 'open-privacy-policy';
|
|
50
|
-
export type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpNameErrorText' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpMonthJanuary' | 'signUpMonthFebruary' | 'signUpMonthMarch' | 'signUpMonthApril' | 'signUpMonthMay' | 'signUpMonthJune' | 'signUpMonthJuly' | 'signUpMonthAugust' | 'signUpMonthSeptember' | 'signUpMonthOctober' | 'signUpMonthNovember' | 'signUpMonthDecember' | 'signUpDayInputLabel' | 'signUpWeddingAnniversarySectionLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'emailMagicLinkSentCtaButtonLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'continueWithAppleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'termsOfServiceButtonLabel' | 'subscribeEmailCheckboxLabel' | 'subscribeSmsCheckboxLabel' | 'privacyPolicyText' | 'privacyPolicyButtonLabel' | 'completeProfileCtaButtonLabel';
|
|
51
|
+
export type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailMagicLinkSent' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone' | 'completeProfile' | 'confirmPendingEmail';
|
|
52
|
+
export type ClickEventType = 'submit-form' | 'click-close' | 'code-sent' | 'request-auth-code-email' | 'request-auth-code-sms' | 'close' | 'use-different-account' | 'sign-in-with-password' | 'sign-in-with-facebook' | 'sign-in-with-google' | 'sign-in-with-apple' | 'open-terms-of-service' | 'open-privacy-policy' | 'request-pending-email-access-code';
|
|
53
|
+
export type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpNameErrorText' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpMonthJanuary' | 'signUpMonthFebruary' | 'signUpMonthMarch' | 'signUpMonthApril' | 'signUpMonthMay' | 'signUpMonthJune' | 'signUpMonthJuly' | 'signUpMonthAugust' | 'signUpMonthSeptember' | 'signUpMonthOctober' | 'signUpMonthNovember' | 'signUpMonthDecember' | 'signUpDayInputLabel' | 'signUpWeddingAnniversarySectionLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'emailMagicLinkSentCtaButtonLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'continueWithAppleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'termsOfServiceButtonLabel' | 'subscribeEmailCheckboxLabel' | 'subscribeSmsCheckboxLabel' | 'privacyPolicyText' | 'privacyPolicyButtonLabel' | 'completeProfileCtaButtonLabel' | 'confirmPendingEmailCtaButtonLabel';
|
|
51
54
|
type LocationOption = {
|
|
52
55
|
label: string;
|
|
53
56
|
value: string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationFooter: () => React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationForm: () => React.JSX.Element | null;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationGraphic: () => React.JSX.Element | null;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationInfo: () => React.JSX.Element | null;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationLogoContainer: () => React.JSX.Element;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationPrivacyPolicy: () => React.JSX.Element | null;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationTitle: () => React.JSX.Element;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationUserForm: () => React.JSX.Element;
|
package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationVipBenefitRows: () => React.JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButtonProps } from './IconButtonProps';
|
|
3
|
-
export declare const IconButton: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -3,4 +3,4 @@ import { PaperProps as MuiPaperProps } from '@material-ui/core';
|
|
|
3
3
|
export interface PaperProps extends MuiPaperProps {
|
|
4
4
|
legacyStyles?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const Paper: React.ForwardRefExoticComponent<
|
|
6
|
+
export declare const Paper: React.ForwardRefExoticComponent<Omit<PaperProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioProps } from './RadioProps';
|
|
3
|
-
export declare const Radio: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps } from './SwitchProps';
|
|
3
|
-
export declare const Switch: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { TabPanelProps } from './TabPanelProps';
|
|
3
|
-
export declare const TabPanel: (props: PropsWithChildren<TabPanelProps>) => JSX.Element | null;
|
|
3
|
+
export declare const TabPanel: (props: PropsWithChildren<TabPanelProps>) => React.JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToggleButtonProps } from './ToggleButtonProps';
|
|
3
|
-
export declare const ToggleButton: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToggleButtonGroupProps } from './ToggleButtonGroupProps';
|
|
3
|
-
export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<Omit<ToggleButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps } from './TooltipProps';
|
|
3
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/build/cjs/index.js
CHANGED
|
@@ -590,13 +590,15 @@ const MonthDayPicker = ({ sectionLabel, monthLabel, dayLabel, monthId, dayId, mo
|
|
|
590
590
|
React.createElement(core.TextField, { disabled: disabled, select: true, label: dayLabel, id: dayId, name: dayName, value: dayValue, onChange: (e) => onDayChange(e.target.value), required: required || Boolean(monthValue), className: classes.pickerField }, dayOptions.map((option) => (React.createElement(core.MenuItem, { key: option.value, value: option.value }, option.label)))))));
|
|
591
591
|
};
|
|
592
592
|
const FollowerAuthenticationUserForm = () => {
|
|
593
|
-
const { state, messages, locationOptions, onActionButtonClick, loading, signUpSetting } = useFollowerAuthenticationDialogContext();
|
|
593
|
+
const { state, messages, locationOptions, onActionButtonClick, loading, signInMethod, signUpSetting } = useFollowerAuthenticationDialogContext();
|
|
594
594
|
const showPhone = signUpSetting?.phone?.enabled !== false;
|
|
595
595
|
const phoneRequired = signUpSetting?.phone?.required ?? false;
|
|
596
596
|
const showBirthday = signUpSetting?.birthday?.enabled !== false;
|
|
597
597
|
const birthdayRequired = signUpSetting?.birthday?.required ?? false;
|
|
598
598
|
const showWeddingAnniversary = signUpSetting?.weddingAnniversary?.enabled !== false;
|
|
599
599
|
const weddingAnniversaryRequired = signUpSetting?.weddingAnniversary?.required ?? false;
|
|
600
|
+
const emailIsLocked = signInMethod !== undefined ? signInMethod === 'email' : Boolean(state.context.email);
|
|
601
|
+
const phoneIsLocked = signInMethod !== undefined ? signInMethod === 'phone' : Boolean(state.context.phone);
|
|
600
602
|
const classes = useStyles$7();
|
|
601
603
|
const formRef = React.useRef(null);
|
|
602
604
|
const [showNameErrorText, setShowNameErrorText] = React.useState(false);
|
|
@@ -642,10 +644,10 @@ const FollowerAuthenticationUserForm = () => {
|
|
|
642
644
|
};
|
|
643
645
|
const isFormValid = React.useMemo(() => {
|
|
644
646
|
const hasValidName = Boolean(nameValue) && !showNameErrorText;
|
|
645
|
-
const hasValidEmail = Boolean(emailValue) && !showEmailErrorText;
|
|
647
|
+
const hasValidEmail = emailIsLocked ? Boolean(state.context.email) : Boolean(emailValue) && !showEmailErrorText;
|
|
646
648
|
const hasValidPhone = showPhone
|
|
647
|
-
?
|
|
648
|
-
?
|
|
649
|
+
? phoneIsLocked
|
|
650
|
+
? Boolean(state.context.phone)
|
|
649
651
|
: phoneRequired
|
|
650
652
|
? validatePhoneNumber(phoneValue)
|
|
651
653
|
: !phoneValue || validatePhoneNumber(phoneValue)
|
|
@@ -670,6 +672,9 @@ const FollowerAuthenticationUserForm = () => {
|
|
|
670
672
|
nameValue,
|
|
671
673
|
emailValue,
|
|
672
674
|
phoneValue,
|
|
675
|
+
emailIsLocked,
|
|
676
|
+
phoneIsLocked,
|
|
677
|
+
state.context.email,
|
|
673
678
|
state.context.phone,
|
|
674
679
|
locationValue,
|
|
675
680
|
locationOptions.length,
|
|
@@ -704,10 +709,10 @@ const FollowerAuthenticationUserForm = () => {
|
|
|
704
709
|
e.preventDefault();
|
|
705
710
|
const formData = new FormData(e.target);
|
|
706
711
|
const values = Object.fromEntries(formData.entries());
|
|
707
|
-
// Disabled fields are excluded from FormData — restore
|
|
708
|
-
if (
|
|
712
|
+
// Disabled fields are excluded from FormData — restore the locked identifier from context
|
|
713
|
+
if (emailIsLocked && !values.email && state.context.email)
|
|
709
714
|
values.email = state.context.email;
|
|
710
|
-
if (
|
|
715
|
+
if (phoneIsLocked && !values.phone && state.context.phone)
|
|
711
716
|
values.phone = state.context.phone;
|
|
712
717
|
// Strip display formatting so the submitted value is consistent with the disabled-field path
|
|
713
718
|
if (values.phone) {
|
|
@@ -716,10 +721,10 @@ const FollowerAuthenticationUserForm = () => {
|
|
|
716
721
|
onActionButtonClick('submit-form', values);
|
|
717
722
|
};
|
|
718
723
|
return (React.createElement("form", { ref: formRef, id: "follower-authentication-user-form", className: classes.form, onSubmit: handleSubmit, onInvalid: (e) => e.preventDefault() },
|
|
719
|
-
React.createElement(core.TextField, { disabled: loading ||
|
|
724
|
+
React.createElement(core.TextField, { disabled: loading || emailIsLocked, label: messages.signUpEmailInputLabel, id: "email-input", name: "email", onChange: checkFieldValidity, error: showEmailErrorText, helperText: showEmailErrorText && messages.signUpEmailErrorText, inputProps: { type: 'email', required: true }, value: emailValue, fullWidth: true }),
|
|
720
725
|
React.createElement(Divider, { className: classes.divider }),
|
|
721
726
|
React.createElement(core.TextField, { disabled: loading, label: messages.signUpNameInputLabel, id: "name-input", name: "name", onChange: checkFieldValidity, error: showNameErrorText, helperText: showNameErrorText && messages.signUpNameErrorText, inputProps: { required: true }, value: nameValue, fullWidth: true }),
|
|
722
|
-
showPhone && (React.createElement(core.TextField, { disabled: loading ||
|
|
727
|
+
showPhone && (React.createElement(core.TextField, { disabled: loading || phoneIsLocked, label: messages.signUpPhoneInputLabel, id: "phone-input", name: "phone", onChange: checkFieldValidity, error: showPhoneErrorText, helperText: showPhoneErrorText && messages.signUpPhoneErrorText, inputProps: { required: phoneRequired }, value: phoneValue, fullWidth: true })),
|
|
723
728
|
locationOptions.length > 0 && (React.createElement(core.TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, id: "location-input", name: "location", value: locationValue, fullWidth: true }, locationOptions.map((option) => (React.createElement(core.MenuItem, { "data-cy": "option", key: option.value, value: option.value }, option.label))))),
|
|
724
729
|
(showBirthday || showWeddingAnniversary) && React.createElement(Divider, { className: classes.divider }),
|
|
725
730
|
showBirthday && (React.createElement(MonthDayPicker, { sectionLabel: messages.signUpBirthdaySectionLabel, monthLabel: messages.signUpMonthInputLabel, dayLabel: messages.signUpDayInputLabel, monthId: "birthday-month-input", dayId: "birthday-date-input", monthName: "birthMonth", dayName: "birthDay", monthValue: selectedBirthMonth, dayValue: selectedBirthDay, onMonthChange: setSelectedBirthMonth, onDayChange: setSelectedBirthDay, required: birthdayRequired, disabled: loading, monthOptions: monthOptions })),
|
|
@@ -923,6 +928,10 @@ const FollowerAuthenticationForm = () => {
|
|
|
923
928
|
React.createElement(core.Button, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
|
|
924
929
|
case 'completeProfile':
|
|
925
930
|
return React.createElement(FollowerAuthenticationUserForm, null);
|
|
931
|
+
case 'confirmPendingEmail':
|
|
932
|
+
return (React.createElement("form", { ...formProps },
|
|
933
|
+
React.createElement(core.TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel, id: "code-input", name: "code" }),
|
|
934
|
+
React.createElement(core.Button, { disabled: loading, type: "submit" }, messages.confirmPendingEmailCtaButtonLabel)));
|
|
926
935
|
case 'welcome':
|
|
927
936
|
return null;
|
|
928
937
|
default:
|
|
@@ -982,6 +991,14 @@ const FollowerAuthenticationAltActions = () => {
|
|
|
982
991
|
const values = Object.fromEntries(formData.entries());
|
|
983
992
|
onActionButtonClick('request-auth-code-email', values);
|
|
984
993
|
} }, messages.resendAuthCode)));
|
|
994
|
+
case 'confirmPendingEmail':
|
|
995
|
+
return (React.createElement(core.Box, { className: classes.main },
|
|
996
|
+
React.createElement(core.Button, { disabled: loading, variant: "outlined", onClick: () => {
|
|
997
|
+
const form = document.querySelector('#follower-authentication-form');
|
|
998
|
+
const formData = new FormData(form);
|
|
999
|
+
const values = Object.fromEntries(formData.entries());
|
|
1000
|
+
onActionButtonClick('request-pending-email-access-code', values);
|
|
1001
|
+
} }, messages.resendAuthCode)));
|
|
985
1002
|
case 'indirectUserFound':
|
|
986
1003
|
return (React.createElement(core.Box, { className: classes.main },
|
|
987
1004
|
React.createElement(AltActionsDivider, null),
|
|
@@ -1102,7 +1119,8 @@ const FollowerAuthenticationInfo = () => {
|
|
|
1102
1119
|
React.createElement(core.Typography, { align: "center" }, info),
|
|
1103
1120
|
showV2 && state.value === 'phoneAuthCode' && (React.createElement(core.Typography, { align: "center", variant: "h5", style: { marginTop: 16 } },
|
|
1104
1121
|
"***-***-",
|
|
1105
|
-
last4Digits))
|
|
1122
|
+
last4Digits)),
|
|
1123
|
+
showV2 && state.value === 'confirmPendingEmail' && (React.createElement(core.Typography, { align: "center", variant: "h6", style: { marginTop: 16 } }, state.context.pendingEmail))));
|
|
1106
1124
|
};
|
|
1107
1125
|
|
|
1108
1126
|
const useStyles$2 = core.makeStyles((theme) => ({
|