@popmenu/common-ui 0.109.0 → 0.110.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.
@@ -19,9 +19,9 @@ export declare type ReducerState = {
19
19
  name?: string;
20
20
  };
21
21
  };
22
- export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome';
22
+ export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone';
23
23
  export declare 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';
24
- export declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
24
+ export declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
25
25
  declare type LocationOption = {
26
26
  label: string;
27
27
  value: string;
package/build/index.es.js CHANGED
@@ -1188,10 +1188,20 @@ var FollowerAuthenticationForm = function () {
1188
1188
  return (React__default.createElement("form", __assign({}, formProps),
1189
1189
  React__default.createElement(TextField$1, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
1190
1190
  React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1191
- case 'indirectUserFound':
1192
- return (React__default.createElement("form", __assign({}, formProps),
1193
- React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
1194
- React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
1191
+ case 'indirectUserFound': {
1192
+ if (state.context.email) {
1193
+ return (React__default.createElement("form", __assign({}, formProps),
1194
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
1195
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
1196
+ }
1197
+ else if (state.context.phone) {
1198
+ return (React__default.createElement("form", __assign({}, formProps),
1199
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
1200
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
1201
+ }
1202
+ else
1203
+ return null;
1204
+ }
1195
1205
  case 'emailPasswordSignIn':
1196
1206
  return (React__default.createElement("form", __assign({}, formProps),
1197
1207
  React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email, InputLabelProps: { shrink: true } }),
@@ -1210,6 +1220,10 @@ var FollowerAuthenticationForm = function () {
1210
1220
  React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone, InputLabelProps: { shrink: true } }),
1211
1221
  React__default.createElement(TextField$1, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
1212
1222
  React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1223
+ case 'requirePhone':
1224
+ return (React__default.createElement("form", __assign({}, formProps),
1225
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.requirePhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
1226
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
1213
1227
  case 'welcome':
1214
1228
  return null;
1215
1229
  default: