@popmenu/common-ui 0.99.0 → 0.101.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
|
@@ -31,6 +31,10 @@ export declare type ReducerEvent = {
|
|
|
31
31
|
type: 'click-google-continue';
|
|
32
32
|
} | {
|
|
33
33
|
type: 'click-sign-up';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'click-email-sign-up';
|
|
36
|
+
} | {
|
|
37
|
+
type: 'click-phone-sign-up';
|
|
34
38
|
} | {
|
|
35
39
|
type: 'click-get-code';
|
|
36
40
|
context: {
|
|
@@ -59,7 +63,7 @@ export declare type ReducerEvent = {
|
|
|
59
63
|
} | {
|
|
60
64
|
type: 'start-facebook-auth';
|
|
61
65
|
};
|
|
62
|
-
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' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
|
|
66
|
+
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';
|
|
63
67
|
declare type LocationOption = {
|
|
64
68
|
label: string;
|
|
65
69
|
value: string;
|
package/build/index.es.js
CHANGED
|
@@ -1164,7 +1164,7 @@ var FollowerAuthenticationForm = function () {
|
|
|
1164
1164
|
required: signUpPhoneValue ? false : true,
|
|
1165
1165
|
type: 'email',
|
|
1166
1166
|
} }),
|
|
1167
|
-
React__default.createElement(TextField$1, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map(function (locationOption) { return (React__default.createElement(MenuItem, { key: locationOption.value, value: locationOption.value }, locationOption.label)); })),
|
|
1167
|
+
React__default.createElement(TextField$1, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map(function (locationOption) { return (React__default.createElement(MenuItem, { "data-cy": 'option', key: locationOption.value, value: locationOption.value }, locationOption.label)); })),
|
|
1168
1168
|
React__default.createElement(Typography$1, { style: { alignSelf: 'start' } }, messages.signUpBirthdaySectionLabel),
|
|
1169
1169
|
React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpMonthInputLabel, key: "birthday-month-input", id: "birthday-month-input", name: "birthdayMonth" }),
|
|
1170
1170
|
React__default.createElement(TextField$1, { disabled: loading, label: messages.signUpDayInputLabel, key: "birthday-date-input", id: "birthday-date-input", name: "birthdayDate" }),
|
|
@@ -1215,7 +1215,7 @@ var useStyles$1 = makeStyles(function () { return ({
|
|
|
1215
1215
|
},
|
|
1216
1216
|
}); });
|
|
1217
1217
|
var FollowerAuthenticationAltActions = function () {
|
|
1218
|
-
var _a = useFollowerAuthenticationDialogContext(), state = _a.state, dispatch = _a.dispatch, messages = _a.messages, logos = _a.logos;
|
|
1218
|
+
var _a = useFollowerAuthenticationDialogContext(), state = _a.state, dispatch = _a.dispatch, messages = _a.messages, logos = _a.logos, loading = _a.loading;
|
|
1219
1219
|
var classes = useStyles$1();
|
|
1220
1220
|
switch (state.value) {
|
|
1221
1221
|
case 'initial':
|
|
@@ -1236,7 +1236,13 @@ var FollowerAuthenticationAltActions = function () {
|
|
|
1236
1236
|
dispatch({ type: 'click-password-continue' });
|
|
1237
1237
|
} }, messages.signInWithPassword)));
|
|
1238
1238
|
case 'emailAuthCode':
|
|
1239
|
-
return
|
|
1239
|
+
return (React__default.createElement(Box, { className: classes.main },
|
|
1240
|
+
React__default.createElement(Button$1, { disabled: loading, variant: "outlined", onClick: function () {
|
|
1241
|
+
var form = document.querySelector('#follower-authentication-form');
|
|
1242
|
+
var formData = new FormData(form);
|
|
1243
|
+
var values = Object.fromEntries(formData.entries());
|
|
1244
|
+
dispatch({ type: 'click-get-code', context: { values: values } });
|
|
1245
|
+
} }, messages.resendAuthCode)));
|
|
1240
1246
|
case 'indirectUserFound':
|
|
1241
1247
|
return (React__default.createElement(Box, { className: classes.main },
|
|
1242
1248
|
React__default.createElement(Divider$1, null),
|
|
@@ -1255,7 +1261,13 @@ var FollowerAuthenticationAltActions = function () {
|
|
|
1255
1261
|
case 'phoneFound':
|
|
1256
1262
|
return null;
|
|
1257
1263
|
case 'phoneAuthCode':
|
|
1258
|
-
return
|
|
1264
|
+
return (React__default.createElement(Box, { className: classes.main },
|
|
1265
|
+
React__default.createElement(Button$1, { disabled: loading, variant: "outlined", onClick: function () {
|
|
1266
|
+
var form = document.querySelector('#follower-authentication-form');
|
|
1267
|
+
var formData = new FormData(form);
|
|
1268
|
+
var values = Object.fromEntries(formData.entries());
|
|
1269
|
+
dispatch({ type: 'click-get-code', context: { values: values } });
|
|
1270
|
+
} }, messages.resendAuthCode)));
|
|
1259
1271
|
case 'phonePasswordSignIn':
|
|
1260
1272
|
return (React__default.createElement(Box, { className: classes.main },
|
|
1261
1273
|
React__default.createElement(Divider$1, null),
|
|
@@ -1267,7 +1279,7 @@ var FollowerAuthenticationAltActions = function () {
|
|
|
1267
1279
|
} }, messages.phoneFoundCtaButtonLabel)));
|
|
1268
1280
|
case 'welcome':
|
|
1269
1281
|
return (React__default.createElement(Button$1, { onClick: function () {
|
|
1270
|
-
dispatch({ type: 'click-
|
|
1282
|
+
dispatch({ type: 'click-done' });
|
|
1271
1283
|
} }, messages.done));
|
|
1272
1284
|
default:
|
|
1273
1285
|
return null;
|