@pelcro/react-pelcro-js 3.8.1 → 3.9.0-beta.2
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/dist/index.cjs.js +385 -167
- package/dist/index.esm.js +385 -167
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3245,7 +3245,10 @@ var validation$2 = {
|
|
|
3245
3245
|
validEmail: "le courriel n’est pas valide",
|
|
3246
3246
|
enterEmail: "Un courriel est requis.",
|
|
3247
3247
|
enterPassword: "Mot de passe requis.",
|
|
3248
|
-
confirmPassword: "Confirmer le mot de passe requis."
|
|
3248
|
+
confirmPassword: "Confirmer le mot de passe requis.",
|
|
3249
|
+
enterFirstName: "Le prénom est requis.",
|
|
3250
|
+
enterLastName: "Le nom de famille est requis.",
|
|
3251
|
+
enterPhone: "Le numéro de téléphone est requis."
|
|
3249
3252
|
};
|
|
3250
3253
|
var buttons$e = {
|
|
3251
3254
|
account: "Accès abonné(e)s",
|
|
@@ -3334,7 +3337,10 @@ var validation$1 = {
|
|
|
3334
3337
|
validEmail: "Email address is not valid.",
|
|
3335
3338
|
enterEmail: "Email address is required.",
|
|
3336
3339
|
enterPassword: "Password is required.",
|
|
3337
|
-
confirmPassword: "Confirm password is required."
|
|
3340
|
+
confirmPassword: "Confirm password is required.",
|
|
3341
|
+
enterFirstName: "First name is required.",
|
|
3342
|
+
enterLastName: "Last name is required.",
|
|
3343
|
+
enterPhone: "Phone number is required."
|
|
3338
3344
|
};
|
|
3339
3345
|
var buttons$d = {
|
|
3340
3346
|
account: "My account",
|
|
@@ -3422,7 +3428,10 @@ var common_en = {
|
|
|
3422
3428
|
var validation = {
|
|
3423
3429
|
validEmail: "이메일 주소가 유효하지 않습니다.",
|
|
3424
3430
|
enterEmail: "이메일 주소는 필수 항목입니다.",
|
|
3425
|
-
enterPassword: "비밀번호는 필수 항목입니다."
|
|
3431
|
+
enterPassword: "비밀번호는 필수 항목입니다.",
|
|
3432
|
+
enterFirstName: "이름은 필수 항목입니다.",
|
|
3433
|
+
enterLastName: "성은 필수 항목입니다.",
|
|
3434
|
+
enterPhone: "전화번호는 필수 항목입니다."
|
|
3426
3435
|
};
|
|
3427
3436
|
var buttons$c = {
|
|
3428
3437
|
account: "내 계정",
|
|
@@ -4083,7 +4092,8 @@ var labels$w = {
|
|
|
4083
4092
|
emailPlaceholder: "Enter email",
|
|
4084
4093
|
required: "required",
|
|
4085
4094
|
firstName: "First name",
|
|
4086
|
-
lastName: "Last name"
|
|
4095
|
+
lastName: "Last name",
|
|
4096
|
+
phone: "Phone"
|
|
4087
4097
|
};
|
|
4088
4098
|
var messages$z = {
|
|
4089
4099
|
alreadyHaveAccount: "Already have an account?",
|
|
@@ -4178,7 +4188,8 @@ var labels$v = {
|
|
|
4178
4188
|
emailPlaceholder: "Courriel",
|
|
4179
4189
|
required: "Champs obligatoires",
|
|
4180
4190
|
firstName: "Prénom",
|
|
4181
|
-
lastName: "Nom de famille"
|
|
4191
|
+
lastName: "Nom de famille",
|
|
4192
|
+
phone: "Téléphoner"
|
|
4182
4193
|
};
|
|
4183
4194
|
var messages$y = {
|
|
4184
4195
|
alreadyHaveAccount: "Vous avez déjà un compte?",
|
|
@@ -4274,7 +4285,8 @@ var labels$u = {
|
|
|
4274
4285
|
emailPlaceholder: "이메일 입력",
|
|
4275
4286
|
required: "필수 항목",
|
|
4276
4287
|
firstName: "이름",
|
|
4277
|
-
lastName: "성"
|
|
4288
|
+
lastName: "성",
|
|
4289
|
+
phone: "핸드폰"
|
|
4278
4290
|
};
|
|
4279
4291
|
var messages$x = {
|
|
4280
4292
|
alreadyHaveAccount: "이미 계정이 있습니까?",
|
|
@@ -10808,6 +10820,9 @@ const SET_EMAIL = "SET_EMAIL";
|
|
|
10808
10820
|
const SET_PASSWORD = "SET_PASSWORD";
|
|
10809
10821
|
const SET_EMAIL_ERROR = "SET_EMAIL_ERROR";
|
|
10810
10822
|
const SET_PASSWORD_ERROR = "SET_PASSWORD_ERROR";
|
|
10823
|
+
const SET_FIRST_NAME_ERROR = "SET_FIRST_NAME_ERROR";
|
|
10824
|
+
const SET_LAST_NAME_ERROR = "SET_LAST_NAME_ERROR";
|
|
10825
|
+
const SET_PHONE_ERROR = "SET_PHONE_ERROR";
|
|
10811
10826
|
const SET_TEXT_FIELD = "SET_TEXT_FIELD";
|
|
10812
10827
|
const SET_TOKEN = "SET_TOKEN";
|
|
10813
10828
|
const SET_GIFT_CODE = "SET_GIFT_CODE";
|
|
@@ -11440,14 +11455,18 @@ facebookLoginRenderProps.FacebookLogin;
|
|
|
11440
11455
|
const initialState$k = {
|
|
11441
11456
|
email: "",
|
|
11442
11457
|
password: "",
|
|
11458
|
+
firstName: "",
|
|
11459
|
+
lastName: "",
|
|
11460
|
+
phone: "",
|
|
11443
11461
|
emailError: null,
|
|
11444
11462
|
passwordError: null,
|
|
11445
11463
|
confirmPassword: "",
|
|
11446
11464
|
confirmPasswordError: null,
|
|
11447
11465
|
confirmPasswordUsed: false,
|
|
11448
11466
|
buttonDisabled: false,
|
|
11449
|
-
|
|
11450
|
-
|
|
11467
|
+
firstNameError: null,
|
|
11468
|
+
lastNameError: null,
|
|
11469
|
+
phoneError: null,
|
|
11451
11470
|
selectFields: {},
|
|
11452
11471
|
alert: {
|
|
11453
11472
|
type: "error",
|
|
@@ -11478,6 +11497,7 @@ const RegisterContainer = ({
|
|
|
11478
11497
|
password,
|
|
11479
11498
|
firstName,
|
|
11480
11499
|
lastName,
|
|
11500
|
+
phone,
|
|
11481
11501
|
organization,
|
|
11482
11502
|
jobTitle,
|
|
11483
11503
|
selectFields
|
|
@@ -11503,6 +11523,7 @@ const RegisterContainer = ({
|
|
|
11503
11523
|
password,
|
|
11504
11524
|
first_name: firstName,
|
|
11505
11525
|
last_name: lastName,
|
|
11526
|
+
phone: phone,
|
|
11506
11527
|
security_token: securityToken,
|
|
11507
11528
|
metadata: {
|
|
11508
11529
|
organization,
|
|
@@ -11592,12 +11613,20 @@ const RegisterContainer = ({
|
|
|
11592
11613
|
|
|
11593
11614
|
case SET_FIRST_NAME:
|
|
11594
11615
|
return lib_7({ ...state,
|
|
11595
|
-
firstName: action.payload
|
|
11616
|
+
firstName: action.payload,
|
|
11617
|
+
firstNameError: null
|
|
11596
11618
|
});
|
|
11597
11619
|
|
|
11598
11620
|
case SET_LAST_NAME:
|
|
11599
11621
|
return lib_7({ ...state,
|
|
11600
|
-
lastName: action.payload
|
|
11622
|
+
lastName: action.payload,
|
|
11623
|
+
lastNameError: null
|
|
11624
|
+
});
|
|
11625
|
+
|
|
11626
|
+
case SET_PHONE:
|
|
11627
|
+
return lib_7({ ...state,
|
|
11628
|
+
phone: action.payload,
|
|
11629
|
+
phoneError: null
|
|
11601
11630
|
});
|
|
11602
11631
|
|
|
11603
11632
|
case SET_TEXT_FIELD:
|
|
@@ -11623,6 +11652,24 @@ const RegisterContainer = ({
|
|
|
11623
11652
|
password: ""
|
|
11624
11653
|
});
|
|
11625
11654
|
|
|
11655
|
+
case SET_FIRST_NAME_ERROR:
|
|
11656
|
+
return lib_7({ ...state,
|
|
11657
|
+
firstNameError: action.payload,
|
|
11658
|
+
firstName: ""
|
|
11659
|
+
});
|
|
11660
|
+
|
|
11661
|
+
case SET_LAST_NAME_ERROR:
|
|
11662
|
+
return lib_7({ ...state,
|
|
11663
|
+
lastNameError: action.payload,
|
|
11664
|
+
lastName: ""
|
|
11665
|
+
});
|
|
11666
|
+
|
|
11667
|
+
case SET_PHONE_ERROR:
|
|
11668
|
+
return lib_7({ ...state,
|
|
11669
|
+
phoneError: action.payload,
|
|
11670
|
+
phone: null
|
|
11671
|
+
});
|
|
11672
|
+
|
|
11626
11673
|
case SET_CONFIRM_PASSWORD_ERROR:
|
|
11627
11674
|
return lib_7({ ...state,
|
|
11628
11675
|
confirmPasswordError: action.payload,
|
|
@@ -12230,25 +12277,32 @@ const RegisterButton = ({
|
|
|
12230
12277
|
className,
|
|
12231
12278
|
...otherProps
|
|
12232
12279
|
}) => {
|
|
12233
|
-
var _window$Pelcro$site$r;
|
|
12280
|
+
var _window$Pelcro$site$r, _window$Pelcro$site$r2;
|
|
12234
12281
|
|
|
12235
12282
|
const {
|
|
12236
12283
|
state: {
|
|
12237
12284
|
emailError,
|
|
12238
12285
|
passwordError,
|
|
12286
|
+
firstNameError,
|
|
12287
|
+
lastNameError,
|
|
12288
|
+
phoneError,
|
|
12239
12289
|
email,
|
|
12240
12290
|
password,
|
|
12291
|
+
firstName,
|
|
12292
|
+
lastName,
|
|
12293
|
+
phone,
|
|
12241
12294
|
buttonDisabled
|
|
12242
12295
|
},
|
|
12243
12296
|
dispatch
|
|
12244
12297
|
} = React.useContext(store$k);
|
|
12298
|
+
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
12245
12299
|
const {
|
|
12246
12300
|
t
|
|
12247
12301
|
} = useTranslation("register");
|
|
12248
12302
|
const [isDisabled, setDisabled] = React.useState(true);
|
|
12249
12303
|
React.useEffect(() => {
|
|
12250
|
-
setDisabled(buttonDisabled || emailError || passwordError || !email.length || !password.length);
|
|
12251
|
-
}, [buttonDisabled, emailError, passwordError, email, password]);
|
|
12304
|
+
setDisabled(buttonDisabled || emailError || passwordError || firstNameError || lastNameError || phoneError || !email.length || !password.length || supportsTap && !firstName.length || supportsTap && !lastName.length || supportsTap && !phone.length);
|
|
12305
|
+
}, [buttonDisabled, emailError, passwordError, firstNameError, lastNameError, phoneError, email, password, firstName, lastName, phone]);
|
|
12252
12306
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
12253
12307
|
onClick: () => {
|
|
12254
12308
|
dispatch({
|
|
@@ -12260,121 +12314,68 @@ const RegisterButton = ({
|
|
|
12260
12314
|
isLoading: buttonDisabled,
|
|
12261
12315
|
className: `${className} g-recaptcha`,
|
|
12262
12316
|
"data-action": "register",
|
|
12263
|
-
"data-sitekey": (_window$Pelcro$site$
|
|
12317
|
+
"data-sitekey": (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.security_key
|
|
12264
12318
|
}, otherProps), name !== null && name !== void 0 ? name : t("messages.createAccount"));
|
|
12265
12319
|
};
|
|
12266
12320
|
|
|
12267
|
-
const Loader = props => /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12268
|
-
className: `pelcro-loader-wrapper ${props.className}`
|
|
12269
|
-
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
12270
|
-
width: props.width,
|
|
12271
|
-
height: props.height,
|
|
12272
|
-
viewBox: "0 0 120 30",
|
|
12273
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12274
|
-
fill: "currentColor",
|
|
12275
|
-
"aria-label": props.label
|
|
12276
|
-
}, /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12277
|
-
cx: "15",
|
|
12278
|
-
cy: "15",
|
|
12279
|
-
r: props.radius + 6
|
|
12280
|
-
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12281
|
-
attributeName: "r",
|
|
12282
|
-
from: "15",
|
|
12283
|
-
to: "15",
|
|
12284
|
-
begin: "0s",
|
|
12285
|
-
dur: "0.8s",
|
|
12286
|
-
values: "15;9;15",
|
|
12287
|
-
calcMode: "linear",
|
|
12288
|
-
repeatCount: "indefinite"
|
|
12289
|
-
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12290
|
-
attributeName: "fillOpacity",
|
|
12291
|
-
from: "1",
|
|
12292
|
-
to: "1",
|
|
12293
|
-
begin: "0s",
|
|
12294
|
-
dur: "0.8s",
|
|
12295
|
-
values: "1;.5;1",
|
|
12296
|
-
calcMode: "linear",
|
|
12297
|
-
repeatCount: "indefinite"
|
|
12298
|
-
})), /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12299
|
-
cx: "60",
|
|
12300
|
-
cy: "15",
|
|
12301
|
-
r: props.radius,
|
|
12302
|
-
attributeName: "fillOpacity",
|
|
12303
|
-
from: "1",
|
|
12304
|
-
to: "0.3"
|
|
12305
|
-
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12306
|
-
attributeName: "r",
|
|
12307
|
-
from: "9",
|
|
12308
|
-
to: "9",
|
|
12309
|
-
begin: "0s",
|
|
12310
|
-
dur: "0.8s",
|
|
12311
|
-
values: "9;15;9",
|
|
12312
|
-
calcMode: "linear",
|
|
12313
|
-
repeatCount: "indefinite"
|
|
12314
|
-
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12315
|
-
attributeName: "fillOpacity",
|
|
12316
|
-
from: "0.5",
|
|
12317
|
-
to: "0.5",
|
|
12318
|
-
begin: "0s",
|
|
12319
|
-
dur: "0.8s",
|
|
12320
|
-
values: ".5;1;.5",
|
|
12321
|
-
calcMode: "linear",
|
|
12322
|
-
repeatCount: "indefinite"
|
|
12323
|
-
})), /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12324
|
-
cx: "105",
|
|
12325
|
-
cy: "15",
|
|
12326
|
-
r: props.radius + 6
|
|
12327
|
-
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12328
|
-
attributeName: "r",
|
|
12329
|
-
from: "15",
|
|
12330
|
-
to: "15",
|
|
12331
|
-
begin: "0s",
|
|
12332
|
-
dur: "0.8s",
|
|
12333
|
-
values: "15;9;15",
|
|
12334
|
-
calcMode: "linear",
|
|
12335
|
-
repeatCount: "indefinite"
|
|
12336
|
-
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12337
|
-
attributeName: "fillOpacity",
|
|
12338
|
-
from: "1",
|
|
12339
|
-
to: "1",
|
|
12340
|
-
begin: "0s",
|
|
12341
|
-
dur: "0.8s",
|
|
12342
|
-
values: "1;.5;1",
|
|
12343
|
-
calcMode: "linear",
|
|
12344
|
-
repeatCount: "indefinite"
|
|
12345
|
-
}))));
|
|
12346
|
-
Loader.defaultProps = {
|
|
12347
|
-
height: 50,
|
|
12348
|
-
width: 35,
|
|
12349
|
-
color: "#32aea1",
|
|
12350
|
-
label: "Loading data..",
|
|
12351
|
-
radius: 9
|
|
12352
|
-
};
|
|
12353
|
-
|
|
12354
12321
|
function FirstName({
|
|
12322
|
+
initWithUserFirstName = true,
|
|
12355
12323
|
store,
|
|
12356
12324
|
...otherProps
|
|
12357
12325
|
}) {
|
|
12326
|
+
const {
|
|
12327
|
+
t
|
|
12328
|
+
} = useTranslation("common");
|
|
12358
12329
|
const {
|
|
12359
12330
|
dispatch,
|
|
12360
|
-
state
|
|
12331
|
+
state: {
|
|
12332
|
+
firstName: stateFirstName,
|
|
12333
|
+
firstNameError
|
|
12334
|
+
}
|
|
12361
12335
|
} = React.useContext(store);
|
|
12336
|
+
const [firstName, setFirstName] = React.useState(stateFirstName);
|
|
12337
|
+
const [finishedTyping, setFinishedTyping] = React.useState(false);
|
|
12338
|
+
const handleInputChange = React.useCallback(value => {
|
|
12339
|
+
setFirstName(value);
|
|
12362
12340
|
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12341
|
+
if (firstName !== null && firstName !== void 0 && firstName.length) {
|
|
12342
|
+
dispatch({
|
|
12343
|
+
type: SET_FIRST_NAME,
|
|
12344
|
+
payload: firstName
|
|
12345
|
+
});
|
|
12346
|
+
} else if (finishedTyping && otherProps.required) {
|
|
12347
|
+
dispatch({
|
|
12348
|
+
type: SET_FIRST_NAME_ERROR,
|
|
12349
|
+
payload: t("validation.enterFirstName")
|
|
12350
|
+
});
|
|
12351
|
+
}
|
|
12352
|
+
}, [dispatch, firstName, finishedTyping]);
|
|
12353
|
+
React.useEffect(() => {
|
|
12354
|
+
handleInputChange(firstName);
|
|
12355
|
+
}, [finishedTyping, firstName, handleInputChange]); // Initialize first name field with user's first name
|
|
12369
12356
|
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
}
|
|
12357
|
+
const loadFirstNameIntoField = () => {
|
|
12358
|
+
handleInputChange(window.Pelcro.user.read().first_name);
|
|
12359
|
+
};
|
|
12373
12360
|
|
|
12361
|
+
React.useEffect(() => {
|
|
12362
|
+
if (initWithUserFirstName) {
|
|
12363
|
+
document.addEventListener("PelcroUserLoaded", () => {
|
|
12364
|
+
loadFirstNameIntoField();
|
|
12365
|
+
});
|
|
12366
|
+
loadFirstNameIntoField();
|
|
12367
|
+
return () => {
|
|
12368
|
+
document.removeEventListener("PelcroUserLoaded", handleInputChange);
|
|
12369
|
+
};
|
|
12370
|
+
}
|
|
12371
|
+
}, []);
|
|
12374
12372
|
return /*#__PURE__*/React__default['default'].createElement(Input, Object.assign({
|
|
12375
12373
|
type: "text",
|
|
12376
|
-
|
|
12377
|
-
|
|
12374
|
+
error: firstNameError,
|
|
12375
|
+
value: firstName,
|
|
12376
|
+
onChange: e => handleInputChange(e.target.value),
|
|
12377
|
+
onBlur: () => setFinishedTyping(true),
|
|
12378
|
+
onFocus: () => setFinishedTyping(false)
|
|
12378
12379
|
}, otherProps));
|
|
12379
12380
|
}
|
|
12380
12381
|
|
|
@@ -12383,29 +12384,63 @@ const RegisterFirstName = props => /*#__PURE__*/React__default['default'].create
|
|
|
12383
12384
|
}, props));
|
|
12384
12385
|
|
|
12385
12386
|
function LastName({
|
|
12387
|
+
initWithUserLastName = true,
|
|
12386
12388
|
store,
|
|
12387
12389
|
...otherProps
|
|
12388
12390
|
}) {
|
|
12391
|
+
const {
|
|
12392
|
+
t
|
|
12393
|
+
} = useTranslation("common");
|
|
12389
12394
|
const {
|
|
12390
12395
|
dispatch,
|
|
12391
|
-
state
|
|
12396
|
+
state: {
|
|
12397
|
+
lastName: stateLastName,
|
|
12398
|
+
lastNameError
|
|
12399
|
+
}
|
|
12392
12400
|
} = React.useContext(store);
|
|
12401
|
+
const [lastName, setLastName] = React.useState(stateLastName);
|
|
12402
|
+
const [finishedTyping, setFinishedTyping] = React.useState(false);
|
|
12403
|
+
const handleInputChange = React.useCallback(value => {
|
|
12404
|
+
setLastName(value);
|
|
12393
12405
|
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12406
|
+
if (lastName !== null && lastName !== void 0 && lastName.length) {
|
|
12407
|
+
dispatch({
|
|
12408
|
+
type: SET_LAST_NAME,
|
|
12409
|
+
payload: lastName
|
|
12410
|
+
});
|
|
12411
|
+
} else if (finishedTyping && otherProps.required) {
|
|
12412
|
+
dispatch({
|
|
12413
|
+
type: SET_LAST_NAME_ERROR,
|
|
12414
|
+
payload: t("validation.enterLastName")
|
|
12415
|
+
});
|
|
12416
|
+
}
|
|
12417
|
+
}, [dispatch, lastName, finishedTyping]);
|
|
12418
|
+
React.useEffect(() => {
|
|
12419
|
+
handleInputChange(lastName);
|
|
12420
|
+
}, [finishedTyping, lastName, handleInputChange]); // Initialize last name field with user's last name
|
|
12400
12421
|
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
}
|
|
12422
|
+
const loadLastNameIntoField = () => {
|
|
12423
|
+
handleInputChange(window.Pelcro.user.read().last_name);
|
|
12424
|
+
};
|
|
12404
12425
|
|
|
12426
|
+
React.useEffect(() => {
|
|
12427
|
+
if (initWithUserLastName) {
|
|
12428
|
+
document.addEventListener("PelcroUserLoaded", () => {
|
|
12429
|
+
loadLastNameIntoField();
|
|
12430
|
+
});
|
|
12431
|
+
loadLastNameIntoField();
|
|
12432
|
+
return () => {
|
|
12433
|
+
document.removeEventListener("PelcroUserLoaded", handleInputChange);
|
|
12434
|
+
};
|
|
12435
|
+
}
|
|
12436
|
+
}, []);
|
|
12405
12437
|
return /*#__PURE__*/React__default['default'].createElement(Input, Object.assign({
|
|
12406
12438
|
type: "text",
|
|
12407
|
-
|
|
12408
|
-
|
|
12439
|
+
error: lastNameError,
|
|
12440
|
+
value: lastName,
|
|
12441
|
+
onChange: e => handleInputChange(e.target.value),
|
|
12442
|
+
onBlur: () => setFinishedTyping(true),
|
|
12443
|
+
onFocus: () => setFinishedTyping(false)
|
|
12409
12444
|
}, otherProps));
|
|
12410
12445
|
}
|
|
12411
12446
|
|
|
@@ -12413,12 +12448,77 @@ const RegisterLastName = props => /*#__PURE__*/React__default['default'].createE
|
|
|
12413
12448
|
store: store$k
|
|
12414
12449
|
}, props));
|
|
12415
12450
|
|
|
12451
|
+
function Phone({
|
|
12452
|
+
initWithUserPhone = true,
|
|
12453
|
+
store,
|
|
12454
|
+
...otherProps
|
|
12455
|
+
}) {
|
|
12456
|
+
const {
|
|
12457
|
+
t
|
|
12458
|
+
} = useTranslation("common");
|
|
12459
|
+
const {
|
|
12460
|
+
dispatch,
|
|
12461
|
+
state: {
|
|
12462
|
+
phone: statePhone,
|
|
12463
|
+
phoneError
|
|
12464
|
+
}
|
|
12465
|
+
} = React.useContext(store);
|
|
12466
|
+
const [phone, setPhone] = React.useState(statePhone);
|
|
12467
|
+
const [finishedTyping, setFinishedTyping] = React.useState(false);
|
|
12468
|
+
const handleInputChange = React.useCallback(value => {
|
|
12469
|
+
setPhone(value);
|
|
12470
|
+
|
|
12471
|
+
if (phone !== null && phone !== void 0 && phone.length) {
|
|
12472
|
+
dispatch({
|
|
12473
|
+
type: SET_PHONE,
|
|
12474
|
+
payload: phone
|
|
12475
|
+
});
|
|
12476
|
+
} else if (finishedTyping && otherProps.required) {
|
|
12477
|
+
dispatch({
|
|
12478
|
+
type: SET_PHONE_ERROR,
|
|
12479
|
+
payload: t("validation.enterPhone")
|
|
12480
|
+
});
|
|
12481
|
+
}
|
|
12482
|
+
}, [dispatch, phone, finishedTyping]);
|
|
12483
|
+
React.useEffect(() => {
|
|
12484
|
+
handleInputChange(phone);
|
|
12485
|
+
}, [finishedTyping, phone, handleInputChange]); // Initialize phone field with user's phone
|
|
12486
|
+
|
|
12487
|
+
const loadPhoneIntoField = () => {
|
|
12488
|
+
handleInputChange(window.Pelcro.user.read().phone);
|
|
12489
|
+
};
|
|
12490
|
+
|
|
12491
|
+
React.useEffect(() => {
|
|
12492
|
+
if (initWithUserPhone) {
|
|
12493
|
+
document.addEventListener("PelcroUserLoaded", () => {
|
|
12494
|
+
loadPhoneIntoField();
|
|
12495
|
+
});
|
|
12496
|
+
loadPhoneIntoField();
|
|
12497
|
+
return () => {
|
|
12498
|
+
document.removeEventListener("PelcroUserLoaded", handleInputChange);
|
|
12499
|
+
};
|
|
12500
|
+
}
|
|
12501
|
+
}, []);
|
|
12502
|
+
return /*#__PURE__*/React__default['default'].createElement(Input, Object.assign({
|
|
12503
|
+
type: "tel",
|
|
12504
|
+
error: phoneError,
|
|
12505
|
+
value: phone,
|
|
12506
|
+
onChange: e => handleInputChange(e.target.value),
|
|
12507
|
+
onBlur: () => setFinishedTyping(true),
|
|
12508
|
+
onFocus: () => setFinishedTyping(false)
|
|
12509
|
+
}, otherProps));
|
|
12510
|
+
}
|
|
12511
|
+
|
|
12512
|
+
const RegisterPhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
12513
|
+
store: store$k
|
|
12514
|
+
}, props));
|
|
12515
|
+
|
|
12416
12516
|
/**
|
|
12417
12517
|
*
|
|
12418
12518
|
*/
|
|
12419
12519
|
|
|
12420
12520
|
function RegisterView(props) {
|
|
12421
|
-
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett;
|
|
12521
|
+
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro$site$r4;
|
|
12422
12522
|
|
|
12423
12523
|
const {
|
|
12424
12524
|
t
|
|
@@ -12430,6 +12530,7 @@ function RegisterView(props) {
|
|
|
12430
12530
|
const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
|
|
12431
12531
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
12432
12532
|
const showNameFields = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableNameFieldsInRegister;
|
|
12533
|
+
const supportsTap = Boolean((_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.tap_gateway_settings);
|
|
12433
12534
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12434
12535
|
id: "pelcro-register-view"
|
|
12435
12536
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -12439,16 +12540,25 @@ function RegisterView(props) {
|
|
|
12439
12540
|
}, title), /*#__PURE__*/React__default['default'].createElement("p", null, subtitle)), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
12440
12541
|
action: "javascript:void(0);",
|
|
12441
12542
|
className: "plc-mt-2 pelcro-form"
|
|
12442
|
-
}, /*#__PURE__*/React__default['default'].createElement(RegisterContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), showNameFields && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12543
|
+
}, /*#__PURE__*/React__default['default'].createElement(RegisterContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), (showNameFields || supportsTap) && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12443
12544
|
className: "plc-flex plc-items-start"
|
|
12444
12545
|
}, /*#__PURE__*/React__default['default'].createElement(RegisterFirstName, {
|
|
12445
12546
|
id: "pelcro-input-first-name",
|
|
12446
|
-
label: t("labels.firstName")
|
|
12547
|
+
label: t("labels.firstName"),
|
|
12548
|
+
errorId: "pelcro-input-firstName-error",
|
|
12549
|
+
required: supportsTap ? true : false
|
|
12447
12550
|
}), /*#__PURE__*/React__default['default'].createElement(RegisterLastName, {
|
|
12448
12551
|
wrapperClassName: "plc-ml-3",
|
|
12449
12552
|
id: "pelcro-input-last-name",
|
|
12450
|
-
label: t("labels.lastName")
|
|
12451
|
-
|
|
12553
|
+
label: t("labels.lastName"),
|
|
12554
|
+
errorId: "pelcro-input-lastName-error",
|
|
12555
|
+
required: supportsTap ? true : false
|
|
12556
|
+
})), supportsTap && /*#__PURE__*/React__default['default'].createElement(RegisterPhone, {
|
|
12557
|
+
id: "pelcro-input-phone",
|
|
12558
|
+
errorId: "pelcro-input-phone-error",
|
|
12559
|
+
label: t("labels.phone"),
|
|
12560
|
+
required: supportsTap ? true : false
|
|
12561
|
+
}), /*#__PURE__*/React__default['default'].createElement(RegisterEmail, {
|
|
12452
12562
|
id: "pelcro-input-email",
|
|
12453
12563
|
errorId: "pelcro-input-email-error",
|
|
12454
12564
|
label: t("labels.email"),
|
|
@@ -12494,11 +12604,98 @@ function RegisterView(props) {
|
|
|
12494
12604
|
*/
|
|
12495
12605
|
|
|
12496
12606
|
function hasSecurityTokenEnabled() {
|
|
12497
|
-
var _window$Pelcro$site, _window$Pelcro$site$
|
|
12607
|
+
var _window$Pelcro$site, _window$Pelcro$site$r5;
|
|
12498
12608
|
|
|
12499
|
-
return Boolean((_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$
|
|
12609
|
+
return Boolean((_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r5 = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r5 === void 0 ? void 0 : _window$Pelcro$site$r5.security_key);
|
|
12500
12610
|
}
|
|
12501
12611
|
|
|
12612
|
+
const Loader = props => /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12613
|
+
className: `pelcro-loader-wrapper ${props.className}`
|
|
12614
|
+
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
12615
|
+
width: props.width,
|
|
12616
|
+
height: props.height,
|
|
12617
|
+
viewBox: "0 0 120 30",
|
|
12618
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12619
|
+
fill: "currentColor",
|
|
12620
|
+
"aria-label": props.label
|
|
12621
|
+
}, /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12622
|
+
cx: "15",
|
|
12623
|
+
cy: "15",
|
|
12624
|
+
r: props.radius + 6
|
|
12625
|
+
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12626
|
+
attributeName: "r",
|
|
12627
|
+
from: "15",
|
|
12628
|
+
to: "15",
|
|
12629
|
+
begin: "0s",
|
|
12630
|
+
dur: "0.8s",
|
|
12631
|
+
values: "15;9;15",
|
|
12632
|
+
calcMode: "linear",
|
|
12633
|
+
repeatCount: "indefinite"
|
|
12634
|
+
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12635
|
+
attributeName: "fillOpacity",
|
|
12636
|
+
from: "1",
|
|
12637
|
+
to: "1",
|
|
12638
|
+
begin: "0s",
|
|
12639
|
+
dur: "0.8s",
|
|
12640
|
+
values: "1;.5;1",
|
|
12641
|
+
calcMode: "linear",
|
|
12642
|
+
repeatCount: "indefinite"
|
|
12643
|
+
})), /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12644
|
+
cx: "60",
|
|
12645
|
+
cy: "15",
|
|
12646
|
+
r: props.radius,
|
|
12647
|
+
attributeName: "fillOpacity",
|
|
12648
|
+
from: "1",
|
|
12649
|
+
to: "0.3"
|
|
12650
|
+
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12651
|
+
attributeName: "r",
|
|
12652
|
+
from: "9",
|
|
12653
|
+
to: "9",
|
|
12654
|
+
begin: "0s",
|
|
12655
|
+
dur: "0.8s",
|
|
12656
|
+
values: "9;15;9",
|
|
12657
|
+
calcMode: "linear",
|
|
12658
|
+
repeatCount: "indefinite"
|
|
12659
|
+
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12660
|
+
attributeName: "fillOpacity",
|
|
12661
|
+
from: "0.5",
|
|
12662
|
+
to: "0.5",
|
|
12663
|
+
begin: "0s",
|
|
12664
|
+
dur: "0.8s",
|
|
12665
|
+
values: ".5;1;.5",
|
|
12666
|
+
calcMode: "linear",
|
|
12667
|
+
repeatCount: "indefinite"
|
|
12668
|
+
})), /*#__PURE__*/React__default['default'].createElement("circle", {
|
|
12669
|
+
cx: "105",
|
|
12670
|
+
cy: "15",
|
|
12671
|
+
r: props.radius + 6
|
|
12672
|
+
}, /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12673
|
+
attributeName: "r",
|
|
12674
|
+
from: "15",
|
|
12675
|
+
to: "15",
|
|
12676
|
+
begin: "0s",
|
|
12677
|
+
dur: "0.8s",
|
|
12678
|
+
values: "15;9;15",
|
|
12679
|
+
calcMode: "linear",
|
|
12680
|
+
repeatCount: "indefinite"
|
|
12681
|
+
}), /*#__PURE__*/React__default['default'].createElement("animate", {
|
|
12682
|
+
attributeName: "fillOpacity",
|
|
12683
|
+
from: "1",
|
|
12684
|
+
to: "1",
|
|
12685
|
+
begin: "0s",
|
|
12686
|
+
dur: "0.8s",
|
|
12687
|
+
values: "1;.5;1",
|
|
12688
|
+
calcMode: "linear",
|
|
12689
|
+
repeatCount: "indefinite"
|
|
12690
|
+
}))));
|
|
12691
|
+
Loader.defaultProps = {
|
|
12692
|
+
height: 50,
|
|
12693
|
+
width: 35,
|
|
12694
|
+
color: "#32aea1",
|
|
12695
|
+
label: "Loading data..",
|
|
12696
|
+
radius: 9
|
|
12697
|
+
};
|
|
12698
|
+
|
|
12502
12699
|
function TextInput({
|
|
12503
12700
|
store,
|
|
12504
12701
|
fieldName,
|
|
@@ -19114,9 +19311,12 @@ const initialState$f = {
|
|
|
19114
19311
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
19115
19312
|
emailError: null,
|
|
19116
19313
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
19314
|
+
firstNameError: null,
|
|
19117
19315
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
19316
|
+
lastNameError: null,
|
|
19118
19317
|
displayName: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.display_name,
|
|
19119
19318
|
phone: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.phone,
|
|
19319
|
+
phoneError: null,
|
|
19120
19320
|
buttonDisabled: false,
|
|
19121
19321
|
textFields: {},
|
|
19122
19322
|
alert: {
|
|
@@ -19228,17 +19428,26 @@ const UserUpdateContainer = ({
|
|
|
19228
19428
|
|
|
19229
19429
|
case SET_EMAIL:
|
|
19230
19430
|
return lib_7({ ...state,
|
|
19231
|
-
email: action.payload
|
|
19431
|
+
email: action.payload,
|
|
19432
|
+
emailError: null
|
|
19232
19433
|
});
|
|
19233
19434
|
|
|
19234
19435
|
case SET_EMAIL_ERROR:
|
|
19235
19436
|
return lib_7({ ...state,
|
|
19236
|
-
emailError: action.payload
|
|
19437
|
+
emailError: action.payload,
|
|
19438
|
+
email: ""
|
|
19237
19439
|
});
|
|
19238
19440
|
|
|
19239
19441
|
case SET_FIRST_NAME:
|
|
19240
19442
|
return lib_7({ ...state,
|
|
19241
|
-
firstName: action.payload
|
|
19443
|
+
firstName: action.payload,
|
|
19444
|
+
firstNameError: null
|
|
19445
|
+
});
|
|
19446
|
+
|
|
19447
|
+
case SET_FIRST_NAME_ERROR:
|
|
19448
|
+
return lib_7({ ...state,
|
|
19449
|
+
firstNameError: action.payload,
|
|
19450
|
+
firstName: ""
|
|
19242
19451
|
});
|
|
19243
19452
|
|
|
19244
19453
|
case SET_DISPLAY_NAME:
|
|
@@ -19248,12 +19457,26 @@ const UserUpdateContainer = ({
|
|
|
19248
19457
|
|
|
19249
19458
|
case SET_LAST_NAME:
|
|
19250
19459
|
return lib_7({ ...state,
|
|
19251
|
-
lastName: action.payload
|
|
19460
|
+
lastName: action.payload,
|
|
19461
|
+
lastNameError: null
|
|
19462
|
+
});
|
|
19463
|
+
|
|
19464
|
+
case SET_LAST_NAME_ERROR:
|
|
19465
|
+
return lib_7({ ...state,
|
|
19466
|
+
lastNameError: action.payload,
|
|
19467
|
+
lastName: ""
|
|
19252
19468
|
});
|
|
19253
19469
|
|
|
19254
19470
|
case SET_PHONE:
|
|
19255
19471
|
return lib_7({ ...state,
|
|
19256
|
-
phone: action.payload
|
|
19472
|
+
phone: action.payload,
|
|
19473
|
+
phoneError: null
|
|
19474
|
+
});
|
|
19475
|
+
|
|
19476
|
+
case SET_PHONE_ERROR:
|
|
19477
|
+
return lib_7({ ...state,
|
|
19478
|
+
phoneError: action.payload,
|
|
19479
|
+
phone: ""
|
|
19257
19480
|
});
|
|
19258
19481
|
|
|
19259
19482
|
case SHOW_ALERT:
|
|
@@ -19359,16 +19582,30 @@ const UserUpdateButton = ({
|
|
|
19359
19582
|
onClick,
|
|
19360
19583
|
...otherProps
|
|
19361
19584
|
}) => {
|
|
19585
|
+
var _window$Pelcro$site$r;
|
|
19586
|
+
|
|
19362
19587
|
const {
|
|
19363
19588
|
state: {
|
|
19364
19589
|
buttonDisabled,
|
|
19365
|
-
|
|
19590
|
+
email,
|
|
19591
|
+
firstName,
|
|
19592
|
+
lastName,
|
|
19593
|
+
phone,
|
|
19594
|
+
emailError,
|
|
19595
|
+
firstNameError,
|
|
19596
|
+
lastNameError,
|
|
19597
|
+
phoneError
|
|
19366
19598
|
},
|
|
19367
19599
|
dispatch
|
|
19368
19600
|
} = React.useContext(store$f);
|
|
19601
|
+
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
19369
19602
|
const {
|
|
19370
19603
|
t
|
|
19371
19604
|
} = useTranslation("userEdit");
|
|
19605
|
+
const [isDisabled, setDisabled] = React.useState(true);
|
|
19606
|
+
React.useEffect(() => {
|
|
19607
|
+
setDisabled(buttonDisabled || emailError || firstNameError || lastNameError || phoneError || !(email !== null && email !== void 0 && email.length) || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length));
|
|
19608
|
+
}, [email, firstName, lastName, phone, buttonDisabled, emailError, firstNameError, lastNameError, phoneError]);
|
|
19372
19609
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19373
19610
|
onClick: () => {
|
|
19374
19611
|
dispatch({
|
|
@@ -19376,7 +19613,7 @@ const UserUpdateButton = ({
|
|
|
19376
19613
|
});
|
|
19377
19614
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
19378
19615
|
},
|
|
19379
|
-
disabled:
|
|
19616
|
+
disabled: isDisabled,
|
|
19380
19617
|
isLoading: buttonDisabled && !emailError
|
|
19381
19618
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
|
|
19382
19619
|
};
|
|
@@ -19389,31 +19626,6 @@ const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].creat
|
|
|
19389
19626
|
store: store$f
|
|
19390
19627
|
}, props));
|
|
19391
19628
|
|
|
19392
|
-
function Phone({
|
|
19393
|
-
store,
|
|
19394
|
-
...otherProps
|
|
19395
|
-
}) {
|
|
19396
|
-
const {
|
|
19397
|
-
dispatch,
|
|
19398
|
-
state: {
|
|
19399
|
-
phone
|
|
19400
|
-
}
|
|
19401
|
-
} = React.useContext(store);
|
|
19402
|
-
|
|
19403
|
-
const handleInputChange = value => {
|
|
19404
|
-
dispatch({
|
|
19405
|
-
type: SET_PHONE,
|
|
19406
|
-
payload: value
|
|
19407
|
-
});
|
|
19408
|
-
};
|
|
19409
|
-
|
|
19410
|
-
return /*#__PURE__*/React__default['default'].createElement(Input, Object.assign({
|
|
19411
|
-
type: "tel",
|
|
19412
|
-
value: phone,
|
|
19413
|
-
onChange: e => handleInputChange(e.target.value)
|
|
19414
|
-
}, otherProps));
|
|
19415
|
-
}
|
|
19416
|
-
|
|
19417
19629
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
19418
19630
|
store: store$f
|
|
19419
19631
|
}, props));
|
|
@@ -19446,9 +19658,12 @@ const UserUpdateProfilePic = ({
|
|
|
19446
19658
|
};
|
|
19447
19659
|
|
|
19448
19660
|
const UserUpdateView = props => {
|
|
19661
|
+
var _window$Pelcro$site$r;
|
|
19662
|
+
|
|
19449
19663
|
const {
|
|
19450
19664
|
t
|
|
19451
19665
|
} = useTranslation("userEdit");
|
|
19666
|
+
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
19452
19667
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19453
19668
|
id: "pelcro-user-update-view"
|
|
19454
19669
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -19467,19 +19682,22 @@ const UserUpdateView = props => {
|
|
|
19467
19682
|
id: "pelcro-input-first-name",
|
|
19468
19683
|
errorId: "pelcro-input-first-name-error",
|
|
19469
19684
|
label: t("labels.firstName"),
|
|
19470
|
-
autoFocus: true
|
|
19685
|
+
autoFocus: true,
|
|
19686
|
+
required: supportsTap ? true : false
|
|
19471
19687
|
}), /*#__PURE__*/React__default['default'].createElement(UserUpdateLastName, {
|
|
19472
19688
|
wrapperClassName: "plc-ml-3",
|
|
19473
19689
|
autoComplete: "last-name",
|
|
19474
19690
|
id: "pelcro-input-last-name",
|
|
19475
19691
|
errorId: "pelcro-input-last-name-error",
|
|
19476
|
-
label: t("labels.lastName")
|
|
19692
|
+
label: t("labels.lastName"),
|
|
19693
|
+
required: supportsTap ? true : false
|
|
19477
19694
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19478
19695
|
className: "plc-flex plc-items-start"
|
|
19479
19696
|
}, /*#__PURE__*/React__default['default'].createElement(UserUpdatePhone, {
|
|
19480
19697
|
id: "pelcro-input-phone",
|
|
19481
19698
|
errorId: "pelcro-input-phone-error",
|
|
19482
|
-
label: t("labels.phone")
|
|
19699
|
+
label: t("labels.phone"),
|
|
19700
|
+
required: supportsTap ? true : false
|
|
19483
19701
|
})), /*#__PURE__*/React__default['default'].createElement(UserUpdateButton, {
|
|
19484
19702
|
role: "submit",
|
|
19485
19703
|
className: "plc-w-full plc-mt-2",
|