@trii/components 2.0.52 → 2.0.53
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/cjs/index.js +15 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -25403,7 +25403,7 @@ const SearchLocationEditor = ({ baseUrl, spaceId, entityType, entityId, onBack,
|
|
|
25403
25403
|
}
|
|
25404
25404
|
};
|
|
25405
25405
|
const isDisabled = !canSubmit || isSavingMain || isSavingSecondary;
|
|
25406
|
-
return (jsxRuntimeExports.jsxs(material.Box, { sx: { width: '100%' }, children: [jsxRuntimeExports.jsxs(material.Stack, { direction: "row", alignItems: "center", spacing: 1, sx: { mb:
|
|
25406
|
+
return (jsxRuntimeExports.jsxs(material.Box, { sx: { width: '100%' }, children: [jsxRuntimeExports.jsxs(material.Stack, { direction: "row", alignItems: "center", spacing: 1, sx: { mb: 3 }, children: [jsxRuntimeExports.jsx(material.IconButton, { size: "small", onClick: onBack, "aria-label": t('global.back'), children: jsxRuntimeExports.jsx(default_1$c, { fontSize: "small" }) }), jsxRuntimeExports.jsx(material.Typography, { variant: "h6", children: t('searchLocationModal.searchAddress') })] }), jsxRuntimeExports.jsxs(material.Stack, { spacing: 3, children: [jsxRuntimeExports.jsxs(material.Box, { sx: { position: 'relative', zIndex: 1400 }, children: [jsxRuntimeExports.jsx(SearchLocationInput, { onPlaceSelected: handlePlaceSelected, onError: handleError, placeholder: t('searchLocationModal.enterLocation') }), error ? (jsxRuntimeExports.jsx(material.Typography, { variant: "caption", color: "error", sx: { mt: 0.5, display: 'block' }, children: error })) : null] }), jsxRuntimeExports.jsx(material.TextField, { label: t('conversations.contactDetails.street'), value: draft.street, onChange: handleChange('street'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsxs(material.Stack, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(material.TextField, { label: t('searchLocationModal.city'), value: draft.city, onChange: handleChange('city'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsx(material.TextField, { label: t('searchLocationModal.state'), value: draft.state, onChange: handleChange('state'), fullWidth: true, size: "medium" })] }), jsxRuntimeExports.jsxs(material.Stack, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(material.TextField, { label: t('searchLocationModal.postalCode'), value: draft.zipcode, onChange: handleChange('zipcode'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsx(material.TextField, { label: t('searchLocationModal.country'), value: draft.country, onChange: handleChange('country'), fullWidth: true, size: "medium" })] }), query ? (jsxRuntimeExports.jsx(material.Typography, { variant: "caption", sx: { opacity: 0.7 }, children: query })) : null, jsxRuntimeExports.jsxs(material.Stack, { direction: "row", spacing: 2, justifyContent: "flex-end", sx: { pt: 2 }, children: [jsxRuntimeExports.jsx(LoadingButton$1, { variant: "contained", size: "large", startIcon: jsxRuntimeExports.jsx(default_1$b, {}), onClick: handleSaveMainAddress, loading: isSavingMain, disabled: isDisabled, children: t('searchLocationModal.saveMainAddress') }), jsxRuntimeExports.jsx(LoadingButton$1, { variant: "outlined", size: "large", startIcon: jsxRuntimeExports.jsx(default_1$b, {}), onClick: handleSaveSecondaryAddress, loading: isSavingSecondary, disabled: isDisabled, children: t('searchLocationModal.saveSecondaryAddress') })] })] })] }));
|
|
25407
25407
|
};
|
|
25408
25408
|
|
|
25409
25409
|
/**
|
|
@@ -27050,6 +27050,9 @@ const Section = ({ title, children, enableDirectionSearch = false, onDirectionSe
|
|
|
27050
27050
|
borderRadius: 2,
|
|
27051
27051
|
p: 2,
|
|
27052
27052
|
mb: 2,
|
|
27053
|
+
display: 'flex',
|
|
27054
|
+
alignItems: 'center',
|
|
27055
|
+
justifyContent: 'space-between',
|
|
27053
27056
|
}, children: [jsxRuntimeExports.jsx(material.Typography, { variant: "subtitle1", children: title }), enableDirectionSearch && (jsxRuntimeExports.jsx(material.Button, { startIcon: jsxRuntimeExports.jsx(default_1$9, { sx: { color: 'primary.main', height: 18, width: 18 } }), size: "small", variant: "outlined", color: "primary", onClick: () => onDirectionSearchClick && onDirectionSearchClick(), children: t('global.searchLocation') })), jsxRuntimeExports.jsx(material.Divider, { sx: { my: 1.5 } }), children] }));
|
|
27054
27057
|
};
|
|
27055
27058
|
|
|
@@ -58321,6 +58324,17 @@ const BusinessSelectEditor = ({ baseUrl, spaceId, contactId, initialBusiness, on
|
|
|
58321
58324
|
const EditContactModalContent = ({ open, onClose, baseUrl, spaceId, contactId, sx, language = 'en', navigate, }) => {
|
|
58322
58325
|
const { t: i18nT, i18n } = reactI18next.useTranslation();
|
|
58323
58326
|
const modalContentRef = React$1.useRef(null);
|
|
58327
|
+
React$1.useEffect(() => {
|
|
58328
|
+
// Load the google script and append it to the document body
|
|
58329
|
+
const script = document.createElement('script');
|
|
58330
|
+
script.src = 'https://accounts.google.com/gsi/client';
|
|
58331
|
+
script.async = true;
|
|
58332
|
+
script.defer = true;
|
|
58333
|
+
document.body.appendChild(script);
|
|
58334
|
+
return () => {
|
|
58335
|
+
document.body.removeChild(script);
|
|
58336
|
+
};
|
|
58337
|
+
}, []);
|
|
58324
58338
|
React$1.useEffect(() => {
|
|
58325
58339
|
if (language) {
|
|
58326
58340
|
i18n.changeLanguage(language);
|