@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/esm/index.js CHANGED
@@ -25383,7 +25383,7 @@ const SearchLocationEditor = ({ baseUrl, spaceId, entityType, entityId, onBack,
25383
25383
  }
25384
25384
  };
25385
25385
  const isDisabled = !canSubmit || isSavingMain || isSavingSecondary;
25386
- return (jsxRuntimeExports.jsxs(Box$2, { sx: { width: '100%' }, children: [jsxRuntimeExports.jsxs(Stack$2, { direction: "row", alignItems: "center", spacing: 1, sx: { mb: 2 }, children: [jsxRuntimeExports.jsx(IconButton$2, { size: "small", onClick: onBack, "aria-label": t('global.back'), children: jsxRuntimeExports.jsx(default_1$c, { fontSize: "small" }) }), jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle1", children: t('searchLocationModal.searchAddress') }), jsxRuntimeExports.jsx(Box$2, { sx: { flex: 1 } }), jsxRuntimeExports.jsx(LoadingButton$1, { variant: "contained", size: "small", startIcon: jsxRuntimeExports.jsx(default_1$b, {}), onClick: handleSaveMainAddress, loading: isSavingMain, disabled: isDisabled, sx: { mr: 1 }, children: t('searchLocationModal.saveMainAddress') }), jsxRuntimeExports.jsx(LoadingButton$1, { variant: "outlined", size: "small", startIcon: jsxRuntimeExports.jsx(default_1$b, {}), onClick: handleSaveSecondaryAddress, loading: isSavingSecondary, disabled: isDisabled, children: t('searchLocationModal.saveSecondaryAddress') })] }), jsxRuntimeExports.jsxs(Stack$2, { spacing: 2, children: [jsxRuntimeExports.jsxs(Box$2, { sx: { position: 'relative', zIndex: 1400 }, children: [jsxRuntimeExports.jsx(SearchLocationInput, { onPlaceSelected: handlePlaceSelected, onError: handleError, placeholder: t('searchLocationModal.enterLocation') }), error ? (jsxRuntimeExports.jsx(Typography$2, { variant: "caption", color: "error", sx: { mt: 0.5, display: 'block' }, children: error })) : null] }), jsxRuntimeExports.jsx(TextField$1, { label: t('conversations.contactDetails.street'), value: draft.street, onChange: handleChange('street'), fullWidth: true, size: "small" }), jsxRuntimeExports.jsxs(Stack$2, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.city'), value: draft.city, onChange: handleChange('city'), fullWidth: true, size: "small" }), jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.state'), value: draft.state, onChange: handleChange('state'), fullWidth: true, size: "small" })] }), jsxRuntimeExports.jsxs(Stack$2, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.postalCode'), value: draft.zipcode, onChange: handleChange('zipcode'), fullWidth: true, size: "small" }), jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.country'), value: draft.country, onChange: handleChange('country'), fullWidth: true, size: "small" })] }), query ? (jsxRuntimeExports.jsx(Typography$2, { variant: "caption", sx: { opacity: 0.7 }, children: query })) : null] })] }));
25386
+ return (jsxRuntimeExports.jsxs(Box$2, { sx: { width: '100%' }, children: [jsxRuntimeExports.jsxs(Stack$2, { direction: "row", alignItems: "center", spacing: 1, sx: { mb: 3 }, children: [jsxRuntimeExports.jsx(IconButton$2, { size: "small", onClick: onBack, "aria-label": t('global.back'), children: jsxRuntimeExports.jsx(default_1$c, { fontSize: "small" }) }), jsxRuntimeExports.jsx(Typography$2, { variant: "h6", children: t('searchLocationModal.searchAddress') })] }), jsxRuntimeExports.jsxs(Stack$2, { spacing: 3, children: [jsxRuntimeExports.jsxs(Box$2, { sx: { position: 'relative', zIndex: 1400 }, children: [jsxRuntimeExports.jsx(SearchLocationInput, { onPlaceSelected: handlePlaceSelected, onError: handleError, placeholder: t('searchLocationModal.enterLocation') }), error ? (jsxRuntimeExports.jsx(Typography$2, { variant: "caption", color: "error", sx: { mt: 0.5, display: 'block' }, children: error })) : null] }), jsxRuntimeExports.jsx(TextField$1, { label: t('conversations.contactDetails.street'), value: draft.street, onChange: handleChange('street'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsxs(Stack$2, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.city'), value: draft.city, onChange: handleChange('city'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.state'), value: draft.state, onChange: handleChange('state'), fullWidth: true, size: "medium" })] }), jsxRuntimeExports.jsxs(Stack$2, { direction: { xs: 'column', sm: 'row' }, spacing: 2, children: [jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.postalCode'), value: draft.zipcode, onChange: handleChange('zipcode'), fullWidth: true, size: "medium" }), jsxRuntimeExports.jsx(TextField$1, { label: t('searchLocationModal.country'), value: draft.country, onChange: handleChange('country'), fullWidth: true, size: "medium" })] }), query ? (jsxRuntimeExports.jsx(Typography$2, { variant: "caption", sx: { opacity: 0.7 }, children: query })) : null, jsxRuntimeExports.jsxs(Stack$2, { 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') })] })] })] }));
25387
25387
  };
25388
25388
 
25389
25389
  /**
@@ -27030,6 +27030,9 @@ const Section = ({ title, children, enableDirectionSearch = false, onDirectionSe
27030
27030
  borderRadius: 2,
27031
27031
  p: 2,
27032
27032
  mb: 2,
27033
+ display: 'flex',
27034
+ alignItems: 'center',
27035
+ justifyContent: 'space-between',
27033
27036
  }, children: [jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle1", children: title }), enableDirectionSearch && (jsxRuntimeExports.jsx(Button$2, { 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(Divider, { sx: { my: 1.5 } }), children] }));
27034
27037
  };
27035
27038
 
@@ -58301,6 +58304,17 @@ const BusinessSelectEditor = ({ baseUrl, spaceId, contactId, initialBusiness, on
58301
58304
  const EditContactModalContent = ({ open, onClose, baseUrl, spaceId, contactId, sx, language = 'en', navigate, }) => {
58302
58305
  const { t: i18nT, i18n } = useTranslation();
58303
58306
  const modalContentRef = useRef(null);
58307
+ useEffect(() => {
58308
+ // Load the google script and append it to the document body
58309
+ const script = document.createElement('script');
58310
+ script.src = 'https://accounts.google.com/gsi/client';
58311
+ script.async = true;
58312
+ script.defer = true;
58313
+ document.body.appendChild(script);
58314
+ return () => {
58315
+ document.body.removeChild(script);
58316
+ };
58317
+ }, []);
58304
58318
  useEffect(() => {
58305
58319
  if (language) {
58306
58320
  i18n.changeLanguage(language);