@pelcro/react-pelcro-js 3.2.0-beta.19 → 3.2.0-beta.21
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 +88 -29
- package/dist/index.esm.js +88 -29
- package/dist/pelcro.css +20 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9776,6 +9776,7 @@ function Email({
|
|
|
9776
9776
|
initWithUserEmail = true,
|
|
9777
9777
|
disableEmailValidation,
|
|
9778
9778
|
store,
|
|
9779
|
+
enableEmailEdit,
|
|
9779
9780
|
...otherProps
|
|
9780
9781
|
}) {
|
|
9781
9782
|
const {
|
|
@@ -9801,6 +9802,10 @@ function Email({
|
|
|
9801
9802
|
}
|
|
9802
9803
|
|
|
9803
9804
|
if (isEmailValid(email)) {
|
|
9805
|
+
dispatch({
|
|
9806
|
+
type: SET_EMAIL_ERROR,
|
|
9807
|
+
payload: null
|
|
9808
|
+
});
|
|
9804
9809
|
return dispatch({
|
|
9805
9810
|
type: SET_EMAIL,
|
|
9806
9811
|
payload: email
|
|
@@ -9821,6 +9826,11 @@ function Email({
|
|
|
9821
9826
|
}
|
|
9822
9827
|
}
|
|
9823
9828
|
}, [dispatch, email, finishedTyping]);
|
|
9829
|
+
React.useEffect(() => {
|
|
9830
|
+
if (!enableEmailEdit) {
|
|
9831
|
+
loadEmailIntoField();
|
|
9832
|
+
}
|
|
9833
|
+
}, [enableEmailEdit]);
|
|
9824
9834
|
React.useEffect(() => {
|
|
9825
9835
|
handleInputChange(email);
|
|
9826
9836
|
}, [finishedTyping, email, handleInputChange]); // Initialize email field with user's email
|
|
@@ -16522,6 +16532,7 @@ SubscriptionCreateModal.viewId = "subscription-create";
|
|
|
16522
16532
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
16523
16533
|
const initialState$e = {
|
|
16524
16534
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
16535
|
+
emailError: null,
|
|
16525
16536
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
16526
16537
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
16527
16538
|
displayName: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.display_name,
|
|
@@ -16640,6 +16651,11 @@ const UserUpdateContainer = ({
|
|
|
16640
16651
|
email: action.payload
|
|
16641
16652
|
});
|
|
16642
16653
|
|
|
16654
|
+
case SET_EMAIL_ERROR:
|
|
16655
|
+
return lib_7({ ...state,
|
|
16656
|
+
emailError: action.payload
|
|
16657
|
+
});
|
|
16658
|
+
|
|
16643
16659
|
case SET_FIRST_NAME:
|
|
16644
16660
|
return lib_7({ ...state,
|
|
16645
16661
|
firstName: action.payload
|
|
@@ -16696,9 +16712,67 @@ const UserUpdateContainer = ({
|
|
|
16696
16712
|
})));
|
|
16697
16713
|
};
|
|
16698
16714
|
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16715
|
+
var _path$i;
|
|
16716
|
+
|
|
16717
|
+
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
16718
|
+
|
|
16719
|
+
function SvgEdit(props) {
|
|
16720
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
16721
|
+
className: "plc-w-6 plc-h-6",
|
|
16722
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16723
|
+
viewBox: "0 0 20 20",
|
|
16724
|
+
fill: "currentColor"
|
|
16725
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16726
|
+
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
16727
|
+
})));
|
|
16728
|
+
}
|
|
16729
|
+
|
|
16730
|
+
const UserUpdateEmail = props => {
|
|
16731
|
+
const {
|
|
16732
|
+
dispatch,
|
|
16733
|
+
state: {
|
|
16734
|
+
email,
|
|
16735
|
+
emailError
|
|
16736
|
+
}
|
|
16737
|
+
} = React.useContext(store$e);
|
|
16738
|
+
const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
|
|
16739
|
+
const {
|
|
16740
|
+
t
|
|
16741
|
+
} = useTranslation("userEdit");
|
|
16742
|
+
|
|
16743
|
+
const handleEnableEmailEdit = () => {
|
|
16744
|
+
if (enableEmailEdit) {
|
|
16745
|
+
dispatch({
|
|
16746
|
+
type: SET_EMAIL,
|
|
16747
|
+
payload: email
|
|
16748
|
+
});
|
|
16749
|
+
dispatch({
|
|
16750
|
+
type: SET_EMAIL_ERROR,
|
|
16751
|
+
payload: null
|
|
16752
|
+
});
|
|
16753
|
+
setEnableEmailEdit(false);
|
|
16754
|
+
} else {
|
|
16755
|
+
setEnableEmailEdit(true);
|
|
16756
|
+
}
|
|
16757
|
+
};
|
|
16758
|
+
|
|
16759
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
16760
|
+
className: "plc-flex plc-items-start plc-relative"
|
|
16761
|
+
}, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
16762
|
+
disabled: !enableEmailEdit,
|
|
16763
|
+
store: store$e,
|
|
16764
|
+
label: t("labels.email"),
|
|
16765
|
+
enableEmailEdit: enableEmailEdit
|
|
16766
|
+
}, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
16767
|
+
variant: "icon",
|
|
16768
|
+
className: "plc-absolute plc-rounded-none plc-text-gray-500 plc-w-10 plc-h-10 plc-top-6 plc-right-0 hover:plc-text-gray-900 hover:plc-bg-transparent focus:plc-ring-0 focus:plc-shadow-none",
|
|
16769
|
+
icon: enableEmailEdit ? /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
|
|
16770
|
+
className: "plc-w-6"
|
|
16771
|
+
}) : /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
16772
|
+
id: "pelcro-user-update-picture-button",
|
|
16773
|
+
onClick: handleEnableEmailEdit
|
|
16774
|
+
})));
|
|
16775
|
+
};
|
|
16702
16776
|
|
|
16703
16777
|
const UserUpdateButton = ({
|
|
16704
16778
|
name,
|
|
@@ -16707,7 +16781,8 @@ const UserUpdateButton = ({
|
|
|
16707
16781
|
}) => {
|
|
16708
16782
|
const {
|
|
16709
16783
|
state: {
|
|
16710
|
-
buttonDisabled
|
|
16784
|
+
buttonDisabled,
|
|
16785
|
+
emailError
|
|
16711
16786
|
},
|
|
16712
16787
|
dispatch
|
|
16713
16788
|
} = React.useContext(store$e);
|
|
@@ -16721,8 +16796,8 @@ const UserUpdateButton = ({
|
|
|
16721
16796
|
});
|
|
16722
16797
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
16723
16798
|
},
|
|
16724
|
-
disabled: buttonDisabled,
|
|
16725
|
-
isLoading: buttonDisabled
|
|
16799
|
+
disabled: buttonDisabled || emailError,
|
|
16800
|
+
isLoading: buttonDisabled && !emailError
|
|
16726
16801
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
|
|
16727
16802
|
};
|
|
16728
16803
|
|
|
@@ -16765,21 +16840,6 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createEl
|
|
|
16765
16840
|
|
|
16766
16841
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
16767
16842
|
|
|
16768
|
-
var _path$i;
|
|
16769
|
-
|
|
16770
|
-
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
16771
|
-
|
|
16772
|
-
function SvgEdit(props) {
|
|
16773
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
16774
|
-
className: "plc-w-6 plc-h-6",
|
|
16775
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16776
|
-
viewBox: "0 0 20 20",
|
|
16777
|
-
fill: "currentColor"
|
|
16778
|
-
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
16779
|
-
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
16780
|
-
})));
|
|
16781
|
-
}
|
|
16782
|
-
|
|
16783
16843
|
const UserUpdateProfilePic = ({
|
|
16784
16844
|
onClick,
|
|
16785
16845
|
...otherProps
|
|
@@ -16820,18 +16880,14 @@ const UserUpdateView = props => {
|
|
|
16820
16880
|
className: "plc-mt-2 pelcro-form"
|
|
16821
16881
|
}, /*#__PURE__*/React__default['default'].createElement(UserUpdateContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement(UserUpdateProfilePic, {
|
|
16822
16882
|
onClick: props.onPictureClick
|
|
16823
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
16824
|
-
className: "plc-flex plc-items-start"
|
|
16825
|
-
}, /*#__PURE__*/React__default['default'].createElement(UserUpdateEmail, {
|
|
16826
|
-
label: t("labels.email"),
|
|
16827
|
-
autoFocus: true
|
|
16828
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
16883
|
+
}), /*#__PURE__*/React__default['default'].createElement(UserUpdateEmail, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
16829
16884
|
className: "plc-flex plc-items-start"
|
|
16830
16885
|
}, /*#__PURE__*/React__default['default'].createElement(UserUpdateFirstName, {
|
|
16831
16886
|
autoComplete: "first-name",
|
|
16832
16887
|
id: "pelcro-input-first-name",
|
|
16833
16888
|
errorId: "pelcro-input-first-name-error",
|
|
16834
|
-
label: t("labels.firstName")
|
|
16889
|
+
label: t("labels.firstName"),
|
|
16890
|
+
autoFocus: true
|
|
16835
16891
|
}), /*#__PURE__*/React__default['default'].createElement(UserUpdateLastName, {
|
|
16836
16892
|
wrapperClassName: "plc-ml-3",
|
|
16837
16893
|
autoComplete: "last-name",
|
|
@@ -25757,7 +25813,9 @@ function VerifyLinkTokenModal({
|
|
|
25757
25813
|
onClose,
|
|
25758
25814
|
...props
|
|
25759
25815
|
}) {
|
|
25760
|
-
|
|
25816
|
+
const {
|
|
25817
|
+
t
|
|
25818
|
+
} = useTranslation("verifyLinkToken");
|
|
25761
25819
|
const {
|
|
25762
25820
|
resetView
|
|
25763
25821
|
} = usePelcro();
|
|
@@ -25767,6 +25825,7 @@ function VerifyLinkTokenModal({
|
|
|
25767
25825
|
|
|
25768
25826
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
25769
25827
|
resetView();
|
|
25828
|
+
notify.success(t("messages.success"));
|
|
25770
25829
|
};
|
|
25771
25830
|
|
|
25772
25831
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
package/dist/index.esm.js
CHANGED
|
@@ -9746,6 +9746,7 @@ function Email({
|
|
|
9746
9746
|
initWithUserEmail = true,
|
|
9747
9747
|
disableEmailValidation,
|
|
9748
9748
|
store,
|
|
9749
|
+
enableEmailEdit,
|
|
9749
9750
|
...otherProps
|
|
9750
9751
|
}) {
|
|
9751
9752
|
const {
|
|
@@ -9771,6 +9772,10 @@ function Email({
|
|
|
9771
9772
|
}
|
|
9772
9773
|
|
|
9773
9774
|
if (isEmailValid(email)) {
|
|
9775
|
+
dispatch({
|
|
9776
|
+
type: SET_EMAIL_ERROR,
|
|
9777
|
+
payload: null
|
|
9778
|
+
});
|
|
9774
9779
|
return dispatch({
|
|
9775
9780
|
type: SET_EMAIL,
|
|
9776
9781
|
payload: email
|
|
@@ -9791,6 +9796,11 @@ function Email({
|
|
|
9791
9796
|
}
|
|
9792
9797
|
}
|
|
9793
9798
|
}, [dispatch, email, finishedTyping]);
|
|
9799
|
+
useEffect(() => {
|
|
9800
|
+
if (!enableEmailEdit) {
|
|
9801
|
+
loadEmailIntoField();
|
|
9802
|
+
}
|
|
9803
|
+
}, [enableEmailEdit]);
|
|
9794
9804
|
useEffect(() => {
|
|
9795
9805
|
handleInputChange(email);
|
|
9796
9806
|
}, [finishedTyping, email, handleInputChange]); // Initialize email field with user's email
|
|
@@ -16492,6 +16502,7 @@ SubscriptionCreateModal.viewId = "subscription-create";
|
|
|
16492
16502
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
16493
16503
|
const initialState$e = {
|
|
16494
16504
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
16505
|
+
emailError: null,
|
|
16495
16506
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
16496
16507
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
16497
16508
|
displayName: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.display_name,
|
|
@@ -16610,6 +16621,11 @@ const UserUpdateContainer = ({
|
|
|
16610
16621
|
email: action.payload
|
|
16611
16622
|
});
|
|
16612
16623
|
|
|
16624
|
+
case SET_EMAIL_ERROR:
|
|
16625
|
+
return lib_7({ ...state,
|
|
16626
|
+
emailError: action.payload
|
|
16627
|
+
});
|
|
16628
|
+
|
|
16613
16629
|
case SET_FIRST_NAME:
|
|
16614
16630
|
return lib_7({ ...state,
|
|
16615
16631
|
firstName: action.payload
|
|
@@ -16666,9 +16682,67 @@ const UserUpdateContainer = ({
|
|
|
16666
16682
|
})));
|
|
16667
16683
|
};
|
|
16668
16684
|
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16685
|
+
var _path$i;
|
|
16686
|
+
|
|
16687
|
+
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
16688
|
+
|
|
16689
|
+
function SvgEdit(props) {
|
|
16690
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
16691
|
+
className: "plc-w-6 plc-h-6",
|
|
16692
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16693
|
+
viewBox: "0 0 20 20",
|
|
16694
|
+
fill: "currentColor"
|
|
16695
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
16696
|
+
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
16697
|
+
})));
|
|
16698
|
+
}
|
|
16699
|
+
|
|
16700
|
+
const UserUpdateEmail = props => {
|
|
16701
|
+
const {
|
|
16702
|
+
dispatch,
|
|
16703
|
+
state: {
|
|
16704
|
+
email,
|
|
16705
|
+
emailError
|
|
16706
|
+
}
|
|
16707
|
+
} = useContext(store$e);
|
|
16708
|
+
const [enableEmailEdit, setEnableEmailEdit] = useState(false);
|
|
16709
|
+
const {
|
|
16710
|
+
t
|
|
16711
|
+
} = useTranslation("userEdit");
|
|
16712
|
+
|
|
16713
|
+
const handleEnableEmailEdit = () => {
|
|
16714
|
+
if (enableEmailEdit) {
|
|
16715
|
+
dispatch({
|
|
16716
|
+
type: SET_EMAIL,
|
|
16717
|
+
payload: email
|
|
16718
|
+
});
|
|
16719
|
+
dispatch({
|
|
16720
|
+
type: SET_EMAIL_ERROR,
|
|
16721
|
+
payload: null
|
|
16722
|
+
});
|
|
16723
|
+
setEnableEmailEdit(false);
|
|
16724
|
+
} else {
|
|
16725
|
+
setEnableEmailEdit(true);
|
|
16726
|
+
}
|
|
16727
|
+
};
|
|
16728
|
+
|
|
16729
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
16730
|
+
className: "plc-flex plc-items-start plc-relative"
|
|
16731
|
+
}, /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
16732
|
+
disabled: !enableEmailEdit,
|
|
16733
|
+
store: store$e,
|
|
16734
|
+
label: t("labels.email"),
|
|
16735
|
+
enableEmailEdit: enableEmailEdit
|
|
16736
|
+
}, props)), /*#__PURE__*/React__default.createElement(Button, {
|
|
16737
|
+
variant: "icon",
|
|
16738
|
+
className: "plc-absolute plc-rounded-none plc-text-gray-500 plc-w-10 plc-h-10 plc-top-6 plc-right-0 hover:plc-text-gray-900 hover:plc-bg-transparent focus:plc-ring-0 focus:plc-shadow-none",
|
|
16739
|
+
icon: enableEmailEdit ? /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
16740
|
+
className: "plc-w-6"
|
|
16741
|
+
}) : /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
16742
|
+
id: "pelcro-user-update-picture-button",
|
|
16743
|
+
onClick: handleEnableEmailEdit
|
|
16744
|
+
})));
|
|
16745
|
+
};
|
|
16672
16746
|
|
|
16673
16747
|
const UserUpdateButton = ({
|
|
16674
16748
|
name,
|
|
@@ -16677,7 +16751,8 @@ const UserUpdateButton = ({
|
|
|
16677
16751
|
}) => {
|
|
16678
16752
|
const {
|
|
16679
16753
|
state: {
|
|
16680
|
-
buttonDisabled
|
|
16754
|
+
buttonDisabled,
|
|
16755
|
+
emailError
|
|
16681
16756
|
},
|
|
16682
16757
|
dispatch
|
|
16683
16758
|
} = useContext(store$e);
|
|
@@ -16691,8 +16766,8 @@ const UserUpdateButton = ({
|
|
|
16691
16766
|
});
|
|
16692
16767
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
16693
16768
|
},
|
|
16694
|
-
disabled: buttonDisabled,
|
|
16695
|
-
isLoading: buttonDisabled
|
|
16769
|
+
disabled: buttonDisabled || emailError,
|
|
16770
|
+
isLoading: buttonDisabled && !emailError
|
|
16696
16771
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
|
|
16697
16772
|
};
|
|
16698
16773
|
|
|
@@ -16735,21 +16810,6 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone
|
|
|
16735
16810
|
|
|
16736
16811
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
16737
16812
|
|
|
16738
|
-
var _path$i;
|
|
16739
|
-
|
|
16740
|
-
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
16741
|
-
|
|
16742
|
-
function SvgEdit(props) {
|
|
16743
|
-
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
16744
|
-
className: "plc-w-6 plc-h-6",
|
|
16745
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16746
|
-
viewBox: "0 0 20 20",
|
|
16747
|
-
fill: "currentColor"
|
|
16748
|
-
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
16749
|
-
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
16750
|
-
})));
|
|
16751
|
-
}
|
|
16752
|
-
|
|
16753
16813
|
const UserUpdateProfilePic = ({
|
|
16754
16814
|
onClick,
|
|
16755
16815
|
...otherProps
|
|
@@ -16790,18 +16850,14 @@ const UserUpdateView = props => {
|
|
|
16790
16850
|
className: "plc-mt-2 pelcro-form"
|
|
16791
16851
|
}, /*#__PURE__*/React__default.createElement(UserUpdateContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement(UserUpdateProfilePic, {
|
|
16792
16852
|
onClick: props.onPictureClick
|
|
16793
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
16794
|
-
className: "plc-flex plc-items-start"
|
|
16795
|
-
}, /*#__PURE__*/React__default.createElement(UserUpdateEmail, {
|
|
16796
|
-
label: t("labels.email"),
|
|
16797
|
-
autoFocus: true
|
|
16798
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
16853
|
+
}), /*#__PURE__*/React__default.createElement(UserUpdateEmail, null), /*#__PURE__*/React__default.createElement("div", {
|
|
16799
16854
|
className: "plc-flex plc-items-start"
|
|
16800
16855
|
}, /*#__PURE__*/React__default.createElement(UserUpdateFirstName, {
|
|
16801
16856
|
autoComplete: "first-name",
|
|
16802
16857
|
id: "pelcro-input-first-name",
|
|
16803
16858
|
errorId: "pelcro-input-first-name-error",
|
|
16804
|
-
label: t("labels.firstName")
|
|
16859
|
+
label: t("labels.firstName"),
|
|
16860
|
+
autoFocus: true
|
|
16805
16861
|
}), /*#__PURE__*/React__default.createElement(UserUpdateLastName, {
|
|
16806
16862
|
wrapperClassName: "plc-ml-3",
|
|
16807
16863
|
autoComplete: "last-name",
|
|
@@ -25727,7 +25783,9 @@ function VerifyLinkTokenModal({
|
|
|
25727
25783
|
onClose,
|
|
25728
25784
|
...props
|
|
25729
25785
|
}) {
|
|
25730
|
-
|
|
25786
|
+
const {
|
|
25787
|
+
t
|
|
25788
|
+
} = useTranslation("verifyLinkToken");
|
|
25731
25789
|
const {
|
|
25732
25790
|
resetView
|
|
25733
25791
|
} = usePelcro();
|
|
@@ -25737,6 +25795,7 @@ function VerifyLinkTokenModal({
|
|
|
25737
25795
|
|
|
25738
25796
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
25739
25797
|
resetView();
|
|
25798
|
+
notify.success(t("messages.success"));
|
|
25740
25799
|
};
|
|
25741
25800
|
|
|
25742
25801
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
package/dist/pelcro.css
CHANGED
|
@@ -2514,6 +2514,10 @@ in order to scope selectors under pelcro-root
|
|
|
2514
2514
|
bottom: 1rem;
|
|
2515
2515
|
}
|
|
2516
2516
|
|
|
2517
|
+
.pelcro-root .plc-top-6 {
|
|
2518
|
+
top: 1.5rem;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2517
2521
|
.pelcro-root .plc-top-16 {
|
|
2518
2522
|
top: 4rem;
|
|
2519
2523
|
}
|
|
@@ -2555,6 +2559,11 @@ in order to scope selectors under pelcro-root
|
|
|
2555
2559
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2556
2560
|
}
|
|
2557
2561
|
|
|
2562
|
+
.pelcro-root .focus\:plc-shadow-none:focus {
|
|
2563
|
+
--tw-shadow: 0 0 #0000;
|
|
2564
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2558
2567
|
* {
|
|
2559
2568
|
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
2560
2569
|
--tw-ring-offset-width: 0px;
|
|
@@ -2576,6 +2585,12 @@ in order to scope selectors under pelcro-root
|
|
|
2576
2585
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
2577
2586
|
}
|
|
2578
2587
|
|
|
2588
|
+
.pelcro-root .focus\:plc-ring-0:focus {
|
|
2589
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
2590
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
2591
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2579
2594
|
.pelcro-root .focus\:plc-ring-2:focus {
|
|
2580
2595
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
2581
2596
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
@@ -2755,6 +2770,11 @@ in order to scope selectors under pelcro-root
|
|
|
2755
2770
|
color: rgba(107, 114, 128, var(--tw-text-opacity));
|
|
2756
2771
|
}
|
|
2757
2772
|
|
|
2773
|
+
.pelcro-root .hover\:plc-text-gray-900:hover {
|
|
2774
|
+
--tw-text-opacity: 1;
|
|
2775
|
+
color: rgba(17, 24, 39, var(--tw-text-opacity));
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2758
2778
|
.pelcro-root .focus\:plc-text-black:focus {
|
|
2759
2779
|
--tw-text-opacity: 1;
|
|
2760
2780
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|