@homefile/components-v2 2.49.8 → 2.49.10

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.
@@ -17,5 +17,5 @@ export const TwoFactorSetting = ({ defaultValue = 'email', email = '', loading,
17
17
  return (_jsxs(Box, { position: "relative", children: [loading && _jsx(Loading, {}), _jsxs(Stack, { bg: "lightBlue.1", px: "base", py: "4", spacing: "8", children: [_jsxs(Stack, { spacing: "4", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsxs(Flex, { gap: "base", align: "center", children: [_jsx(Img, { src: Security, alt: altText }), _jsx(Text, { fontSize: "sm", textTransform: "uppercase", children: t('myProfile.details.2FactorTitle') })] }), _jsx(Controller, { name: "2fa", control: control, render: ({ field: { value, onChange, onBlur } }) => {
18
18
  const label = value ? 'ON' : 'OFF';
19
19
  return (_jsxs(FormControl, { display: "flex", alignItems: "center", w: "fit-content", children: [_jsx(FormLabel, { htmlFor: "2fa", mb: "0", fontSize: "sm", children: label }), _jsx(Switch, { id: "2fa", size: "lg", isChecked: value, onChange: onChange, onBlur: onBlur })] }));
20
- } })] }), _jsx(Text, { fontFamily: "secondary", lineHeight: "1.2", children: t('myProfile.details.2FactorSubtitle') })] }), _jsxs(Stack, Object.assign({}, group, { spacing: "4", children: [_jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [_jsx(RadioButton, Object.assign({}, emailRadio, { isDisabled: !is2faEnabled, children: "Email" })), _jsx(Box, { w: "75%", children: _jsx(Controller, { name: "email", control: control, rules: { validate: handleEmailValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(TextInput, { placeholder: t('myProfile.placeholders.email'), handleChange: onChange, onBlur: onBlur, value: value, hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.email')}`, isDisabled: radioValue === 'sms' || !is2faEnabled })) }) })] }), _jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [_jsx(RadioButton, Object.assign({}, smsRadio, { isDisabled: !is2faEnabled, children: "SMS" })), _jsx(Box, { w: "75%", children: _jsx(Controller, { name: "sms", control: control, rules: { validate: handlePhoneValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(ControlledInput, { placeholder: t('myProfile.placeholders.sms'), onChange: onChange, onBlur: onBlur, value: value, type: "number", hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.phone')}`, isDisabled: radioValue === 'email' || !is2faEnabled })) }) })] }), _jsx(Box, { w: "75%", alignSelf: "end", children: showButtons && (_jsx(Button, { variant: "secondaryFooter", type: "submit", bg: "neutral.white", fontWeight: "medium", onClick: handleSubmit(onSave), children: t('buttons.save').toUpperCase() })) })] }))] })] }));
20
+ } })] }), _jsx(Text, { fontFamily: "secondary", lineHeight: "1.2", children: t('myProfile.details.2FactorSubtitle') })] }), _jsxs(Stack, Object.assign({}, group, { spacing: "4", children: [_jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [_jsx(RadioButton, Object.assign({}, emailRadio, { isDisabled: !is2faEnabled, children: "Email" })), _jsx(Box, { w: "75%", children: _jsx(Controller, { name: "email", control: control, rules: { validate: handleEmailValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(TextInput, { placeholder: t('myProfile.placeholders.email'), handleChange: onChange, onBlur: onBlur, value: value, hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.email')}`, isDisabled: true })) }) })] }), _jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [_jsx(RadioButton, Object.assign({}, smsRadio, { isDisabled: !is2faEnabled, children: "SMS" })), _jsx(Box, { w: "75%", children: _jsx(Controller, { name: "sms", control: control, rules: { validate: handlePhoneValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(ControlledInput, { placeholder: t('myProfile.placeholders.sms'), onChange: onChange, onBlur: onBlur, value: value, type: "number", hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.phone')}`, isDisabled: radioValue === 'email' || !is2faEnabled })) }) })] }), _jsx(Box, { w: "75%", alignSelf: "end", children: showButtons && (_jsx(Button, { variant: "secondaryFooter", type: "submit", bg: "neutral.white", fontWeight: "medium", onClick: handleSubmit(onSave), children: t('buttons.save').toUpperCase() })) })] }))] })] }));
21
21
  };
@@ -42,7 +42,7 @@ export const UserDetails = ({ email, firstName, lastName, onSave, bg, }) => {
42
42
  return (_jsx(TextInput, { handleChange: onChange, placeholder: t('myProfile.placeholders.lastName'), value: value, onBlur: onBlur, hasError: invalid, errorMessage: (_a = errors.lastName) === null || _a === void 0 ? void 0 : _a.message }));
43
43
  } }), _jsx(Controller, { name: "email", control: control, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => {
44
44
  var _a;
45
- return (_jsx(TextInput, { handleChange: onChange, placeholder: t('myProfile.placeholders.email'), value: value, onBlur: onBlur, hasError: invalid, errorMessage: (_a = errors.email) === null || _a === void 0 ? void 0 : _a.message }));
45
+ return (_jsx(TextInput, { handleChange: onChange, placeholder: t('myProfile.placeholders.email'), value: value, onBlur: onBlur, hasError: invalid, errorMessage: (_a = errors.email) === null || _a === void 0 ? void 0 : _a.message, isDisabled: true }));
46
46
  } }), isDirty && (_jsx(ContextButtons, { onCancel: () => {
47
47
  reset({
48
48
  firstName,
@@ -10,5 +10,5 @@ export const NewParterDetails = () => {
10
10
  const { fields: contactFields, validations: contactValidations } = useSnapshot(partnerPointContactProxy, { sync: true });
11
11
  const { handleCompanyEmailValidation, handleCompanyNameValidation, handleCompanyPhoneValidation, handleErrorMessage: handleCompanyError, handleInputChange: handleCompanyInput, } = usePartnerCompany();
12
12
  const { handleContactEmailValidation, handleContactFirstNameValidation, handleErrorMessage: handleContactError, handleInputChange: handleContactInput, } = usePartnerContact(partnerPointContactProxy);
13
- return (_jsxs(Stack, { spacing: "base", children: [_jsx(TextInput, { id: "companyName", placeholder: t('forms.companyName'), value: companyFields.companyName, handleChange: (event) => handleCompanyInput(event, 'companyName'), onBlurCapture: handleCompanyNameValidation, hasError: !companyValidations.isCompanyNameValid, errorMessage: handleCompanyError('companyName') }), _jsx(AddressStored, { proxy: partnerCompanyAddressProxy }), _jsxs(Flex, { gap: "base", direction: ['column', 'row'], children: [_jsx(TextInput, { id: "companyEmail", placeholder: t('forms.companyEmail'), value: companyFields.companyEmail, handleChange: (event) => handleCompanyInput(event, 'companyEmail'), onBlurCapture: handleCompanyEmailValidation, hasError: !companyValidations.isCompanyEmailValid, errorMessage: handleCompanyError('companyEmail') }), _jsx(TextInput, { id: "companyPhone", placeholder: t('forms.companyPhone'), value: companyFields.companyPhone, handleChange: (event) => handleCompanyInput(event, 'companyPhone'), onBlurCapture: handleCompanyPhoneValidation, hasError: !companyValidations.isCompanyPhoneValid, errorMessage: handleCompanyError('companyPhone') })] }), _jsx(Box, { bg: "lightBlue.4", p: "base", borderRadius: "sm", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { variant: "title", children: t('partner.form.titles.companyPointOfContact') }), _jsxs(Flex, { gap: "base", direction: ['column', 'row'], children: [_jsx(TextInput, { id: "pointContactName", placeholder: "Name", value: contactFields.firstName, handleChange: (event) => handleContactInput(event, 'firstName'), onBlurCapture: handleContactFirstNameValidation, hasError: !contactValidations.isFirstNameValid, errorMessage: handleContactError('firstName') }), _jsx(TextInput, { id: "pointContactEmail", placeholder: t('forms.email'), value: contactFields.email, handleChange: (event) => handleContactInput(event, 'email'), onBlurCapture: handleContactEmailValidation, hasError: !contactValidations.isEmailValid, errorMessage: handleContactError('email') })] })] }) })] }));
13
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(TextInput, { id: "companyName", placeholder: t('forms.companyName'), value: companyFields.companyName, handleChange: (event) => handleCompanyInput(event, 'companyName'), onBlurCapture: handleCompanyNameValidation, hasError: !companyValidations.isCompanyNameValid, errorMessage: handleCompanyError('companyName') }), _jsx(AddressStored, { proxy: partnerCompanyAddressProxy }), _jsxs(Flex, { gap: "base", direction: ['column', 'row'], children: [_jsx(TextInput, { id: "companyEmail", placeholder: t('forms.companyEmail'), value: companyFields.companyEmail, handleChange: (event) => handleCompanyInput(event, 'companyEmail'), onBlurCapture: handleCompanyEmailValidation, hasError: !companyValidations.isCompanyEmailValid, errorMessage: handleCompanyError('companyEmail') }), _jsx(TextInput, { id: "companyPhone", placeholder: t('forms.companyPhone'), value: companyFields.companyPhone, handleChange: (event) => handleCompanyInput(event, 'companyPhone'), onBlurCapture: handleCompanyPhoneValidation, hasError: !companyValidations.isCompanyPhoneValid, errorMessage: handleCompanyError('companyPhone') })] }), _jsx(Box, { bg: "lightBlue.4", p: "base", borderRadius: "sm", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { children: t('partner.form.titles.companyPointOfContact') }), _jsxs(Flex, { gap: "base", direction: ['column', 'row'], align: ['center', 'end'], children: [_jsx(TextInput, { id: "pointContactName", placeholder: "Name", value: contactFields.firstName, handleChange: (event) => handleContactInput(event, 'firstName'), onBlurCapture: handleContactFirstNameValidation, hasError: !contactValidations.isFirstNameValid, errorMessage: handleContactError('firstName') }), _jsx(TextInput, { id: "pointContactEmail", placeholder: t('forms.email'), value: contactFields.email, handleChange: (event) => handleContactInput(event, 'email'), onBlurCapture: handleContactEmailValidation, hasError: !contactValidations.isEmailValid, errorMessage: handleContactError('email') })] })] }) })] }));
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.49.8",
3
+ "version": "2.49.10",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",