@popmenu/common-ui 0.95.1 → 0.96.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.
@@ -15,7 +15,7 @@ export declare type ReducerState = {
15
15
  formValues: Record<string, string>;
16
16
  defaultFormValues: Record<string, string>;
17
17
  };
18
- export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome';
18
+ export declare type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome';
19
19
  export declare type ReducerEvent = {
20
20
  type: 'submit-form';
21
21
  context: {
@@ -27,6 +27,8 @@ export declare type ReducerEvent = {
27
27
  type: 'click-facebook-continue';
28
28
  } | {
29
29
  type: 'click-google-continue';
30
+ } | {
31
+ type: 'click-sign-up';
30
32
  } | {
31
33
  type: 'click-get-code';
32
34
  context: {
@@ -42,12 +44,16 @@ export declare type ReducerEvent = {
42
44
  type: 'dialog-closed';
43
45
  } | {
44
46
  type: 'user-found';
47
+ } | {
48
+ type: 'indirect-user-found';
45
49
  } | {
46
50
  type: 'user-not-found';
47
51
  } | {
48
52
  type: 'sign-in-success';
53
+ } | {
54
+ type: 'code-sent';
49
55
  };
50
- declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailInputLabel' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'closeButtonLabel';
56
+ declare type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailInputLabel' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword' | 'closeButtonLabel';
51
57
  declare type LocationOption = {
52
58
  label: string;
53
59
  value: string;
package/build/index.es.js CHANGED
@@ -1140,6 +1140,10 @@ var FollowerAuthenticationForm = function () {
1140
1140
  return (React__default.createElement("form", __assign({}, formProps),
1141
1141
  React__default.createElement(TextField$1, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
1142
1142
  React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1143
+ case 'indirectUserFound':
1144
+ return (React__default.createElement("form", __assign({}, formProps),
1145
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.defaultFormValues.email }),
1146
+ React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
1143
1147
  case 'emailPasswordSignIn':
1144
1148
  return (React__default.createElement("form", __assign({}, formProps),
1145
1149
  React__default.createElement(TextField$1, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.defaultFormValues.email, InputLabelProps: { shrink: true } }),
@@ -1151,7 +1155,7 @@ var FollowerAuthenticationForm = function () {
1151
1155
  React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
1152
1156
  case 'phoneAuthCode':
1153
1157
  return (React__default.createElement("form", __assign({}, formProps),
1154
- React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
1158
+ React__default.createElement(TextField$1, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code", autoComplete: "one-time-code" }),
1155
1159
  React__default.createElement(Button$1, { disabled: loading, type: "submit" }, messages.signIn)));
1156
1160
  case 'phonePasswordSignIn':
1157
1161
  return (React__default.createElement("form", __assign({}, formProps),
@@ -1196,6 +1200,12 @@ var FollowerAuthenticationAltActions = function () {
1196
1200
  } }, messages.signInWithPassword)));
1197
1201
  case 'emailAuthCode':
1198
1202
  return null;
1203
+ case 'indirectUserFound':
1204
+ return (React__default.createElement(Box, { className: classes.main },
1205
+ React__default.createElement(Divider$1, null),
1206
+ React__default.createElement(Button$1, { variant: "outlined", onClick: function () {
1207
+ dispatch({ type: 'click-sign-up' });
1208
+ } }, messages.indirectUserFoundCtaButtonLabelAlt)));
1199
1209
  case 'emailPasswordSignIn':
1200
1210
  return (React__default.createElement(Box, { className: classes.main },
1201
1211
  React__default.createElement(Divider$1, null),
@@ -1220,7 +1230,7 @@ var FollowerAuthenticationAltActions = function () {
1220
1230
  } }, messages.phoneFoundCtaButtonLabel)));
1221
1231
  case 'welcome':
1222
1232
  return (React__default.createElement(Button$1, { onClick: function () {
1223
- dispatch({ type: 'click-done' });
1233
+ dispatch({ type: 'click-sign-up' });
1224
1234
  } }, messages.done));
1225
1235
  default:
1226
1236
  return null;