@popmenu/common-ui 0.95.0 → 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.
package/build/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare type FollowerAuthenticationDialogProps = {
|
|
|
4
4
|
state: ReducerState;
|
|
5
5
|
dispatch: (event: ReducerEvent) => void;
|
|
6
6
|
messages: Record<MessageKey, string>;
|
|
7
|
-
trigger: 'generic' | 'engagement';
|
|
8
7
|
locationOptions: LocationOption[];
|
|
9
8
|
loading: boolean;
|
|
10
9
|
graphics: Record<`${ReducerStateValue}`, string>;
|
|
@@ -16,7 +15,7 @@ export declare type ReducerState = {
|
|
|
16
15
|
formValues: Record<string, string>;
|
|
17
16
|
defaultFormValues: Record<string, string>;
|
|
18
17
|
};
|
|
19
|
-
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';
|
|
20
19
|
export declare type ReducerEvent = {
|
|
21
20
|
type: 'submit-form';
|
|
22
21
|
context: {
|
|
@@ -28,6 +27,8 @@ export declare type ReducerEvent = {
|
|
|
28
27
|
type: 'click-facebook-continue';
|
|
29
28
|
} | {
|
|
30
29
|
type: 'click-google-continue';
|
|
30
|
+
} | {
|
|
31
|
+
type: 'click-sign-up';
|
|
31
32
|
} | {
|
|
32
33
|
type: 'click-get-code';
|
|
33
34
|
context: {
|
|
@@ -43,12 +44,16 @@ export declare type ReducerEvent = {
|
|
|
43
44
|
type: 'dialog-closed';
|
|
44
45
|
} | {
|
|
45
46
|
type: 'user-found';
|
|
47
|
+
} | {
|
|
48
|
+
type: 'indirect-user-found';
|
|
46
49
|
} | {
|
|
47
50
|
type: 'user-not-found';
|
|
48
51
|
} | {
|
|
49
52
|
type: 'sign-in-success';
|
|
53
|
+
} | {
|
|
54
|
+
type: 'code-sent';
|
|
50
55
|
};
|
|
51
|
-
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';
|
|
52
57
|
declare type LocationOption = {
|
|
53
58
|
label: string;
|
|
54
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-
|
|
1233
|
+
dispatch({ type: 'click-sign-up' });
|
|
1224
1234
|
} }, messages.done));
|
|
1225
1235
|
default:
|
|
1226
1236
|
return null;
|