@trii/components 2.0.38 → 2.0.39

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.
@@ -1,7 +1,6 @@
1
1
  type Props = {
2
2
  title: string;
3
3
  handleAdd: () => void;
4
- t?: (key: string) => string;
5
4
  };
6
- declare const SubsectionHeaderWithButton: ({ title, handleAdd, t }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const SubsectionHeaderWithButton: ({ title, handleAdd }: Props) => import("react/jsx-runtime").JSX.Element;
7
6
  export default SubsectionHeaderWithButton;
package/dist/esm/index.js CHANGED
@@ -9188,7 +9188,7 @@ const TitleBox = styled$5(Box$2)({
9188
9188
  width: '100%',
9189
9189
  borderBottom: `1px solid lightgray`,
9190
9190
  });
9191
- const StyledBox$3 = styled$5(Box$2)({
9191
+ const StyledBox$2 = styled$5(Box$2)({
9192
9192
  display: 'flex',
9193
9193
  alignItems: 'center',
9194
9194
  justifyContent: 'space-between',
@@ -9229,7 +9229,7 @@ const NoteText$2 = styled$5(Typography$2)({
9229
9229
  left: 40,
9230
9230
  });
9231
9231
  const ContactMethod$1 = ({ icon, contactList, title, showTitle = true, }) => {
9232
- const renderContactInfo = (contact) => (jsxRuntimeExports.jsx(StyledBox$3, { children: jsxRuntimeExports.jsxs(InfoContainer, { children: [jsxRuntimeExports.jsx(IconBox, { children: icon }), jsxRuntimeExports.jsxs(AddressContainer, { children: [jsxRuntimeExports.jsx(Tooltip, { title: contact.address, arrow: true, placement: "top", children: jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle1", fontWeight: "semi-bold", fontSize: 14, color: "text.primary", sx: {
9232
+ const renderContactInfo = (contact) => (jsxRuntimeExports.jsx(StyledBox$2, { children: jsxRuntimeExports.jsxs(InfoContainer, { children: [jsxRuntimeExports.jsx(IconBox, { children: icon }), jsxRuntimeExports.jsxs(AddressContainer, { children: [jsxRuntimeExports.jsx(Tooltip, { title: contact.address, arrow: true, placement: "top", children: jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle1", fontWeight: "semi-bold", fontSize: 14, color: "text.primary", sx: {
9233
9233
  whiteSpace: 'nowrap',
9234
9234
  textOverflow: 'ellipsis',
9235
9235
  overflow: 'hidden',
@@ -15379,11 +15379,21 @@ default_1$e = Label.default = (0, _createSvgIcon$d.default)( /*#__PURE__*/(0, _j
15379
15379
  const noop$3 = (key) => key;
15380
15380
  const TranslationContext = createContext(noop$3);
15381
15381
  const TranslationProvider = ({ t, children }) => {
15382
+ console.log('[TranslationProvider] t fn:', t?.name || 'anonymous', t);
15382
15383
  return jsxRuntimeExports.jsx(TranslationContext.Provider, { value: t, children: children });
15383
15384
  };
15384
15385
  const useTranslationContext = () => {
15385
15386
  const t = useContext(TranslationContext);
15386
- return t || noop$3;
15387
+ if (!t) {
15388
+ console.warn('[useTranslationContext] using noop, context value is falsy');
15389
+ return noop$3;
15390
+ }
15391
+ return (...args) => {
15392
+ const [key, ...rest] = args;
15393
+ const result = t(key, ...rest);
15394
+ console.log('[useTranslationContext] key:', key, 'args:', rest, 'result:', result);
15395
+ return result;
15396
+ };
15387
15397
  };
15388
15398
 
15389
15399
  const Tags = ({ tags, onEditTags }) => {
@@ -52425,7 +52435,7 @@ default_1$8 = Cancel.default = (0, _createSvgIcon$8.default)( /*#__PURE__*/(0, _
52425
52435
 
52426
52436
  const isUserInfo = (option) => 'email' in option;
52427
52437
  const isContactBirthdayProps = (p) => p.entityType === 'contact' && p.inputType === 'birthday';
52428
- const StyledIconButton$3 = styled$5(IconButton$2)({
52438
+ const StyledIconButton$2 = styled$5(IconButton$2)({
52429
52439
  opacity: 0,
52430
52440
  transition: 'opacity 0.3s ease-in-out',
52431
52441
  '& .MuiSvgIcon-root': {
@@ -52555,7 +52565,7 @@ const EntityInfoLabel = (props) => {
52555
52565
  '&:hover .edit-icon': {
52556
52566
  opacity: 1,
52557
52567
  },
52558
- }, children: [jsxRuntimeExports.jsxs(Box$2, { display: "flex", position: "relative", minHeight: '25px', children: [jsxRuntimeExports.jsx(Typography$2, { letterSpacing: -0.5, fontWeight: '600', alignSelf: 'center', flexGrow: isEditing ? 1 : 0, color: (theme) => theme.palette.text.primary, children: title }), isNotEditable ? null : isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(CircularProgress$2, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$3, { className: "edit-icon", size: "small", onClick: handleEditClick, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(Box$2, { width: isEditing ? '100%' : '50%', position: "relative", children: isEditing && inputType === 'text' ? (jsxRuntimeExports.jsx(TextField$1, { value: textValue, onChange: handleInputChange, variant: "standard", size: "small", sx: { width: '100%' } })) : isEditing && (inputType === 'select' || inputType === 'selectMembers') ? (jsxRuntimeExports.jsxs(Select$2, { value: selectValue, onChange: handleSelectChange, variant: "standard", size: "small", sx: { width: '100%' }, children: [props.entityType === 'contact' ? (jsxRuntimeExports.jsx(MenuItem$2, { value: "", children: t('contactDetails.contactInfo.emptySelection') })) : null, options.map((option, index) => (jsxRuntimeExports.jsx(MenuItem$2, { value: option.id, children: props.entityType === 'contact'
52568
+ }, children: [jsxRuntimeExports.jsxs(Box$2, { display: "flex", position: "relative", minHeight: '25px', children: [jsxRuntimeExports.jsx(Typography$2, { letterSpacing: -0.5, fontWeight: '600', alignSelf: 'center', flexGrow: isEditing ? 1 : 0, color: (theme) => theme.palette.text.primary, children: title }), isNotEditable ? null : isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(CircularProgress$2, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton$1, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$2, { className: "edit-icon", size: "small", onClick: handleEditClick, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(Box$2, { width: isEditing ? '100%' : '50%', position: "relative", children: isEditing && inputType === 'text' ? (jsxRuntimeExports.jsx(TextField$1, { value: textValue, onChange: handleInputChange, variant: "standard", size: "small", sx: { width: '100%' } })) : isEditing && (inputType === 'select' || inputType === 'selectMembers') ? (jsxRuntimeExports.jsxs(Select$2, { value: selectValue, onChange: handleSelectChange, variant: "standard", size: "small", sx: { width: '100%' }, children: [props.entityType === 'contact' ? (jsxRuntimeExports.jsx(MenuItem$2, { value: "", children: t('contactDetails.contactInfo.emptySelection') })) : null, options.map((option, index) => (jsxRuntimeExports.jsx(MenuItem$2, { value: option.id, children: props.entityType === 'contact'
52559
52569
  ? option.name?.trim() || (isUserInfo(option) ? option.email : '') || 'Sin nombre'
52560
52570
  : option.name?.trim() || option.email || 'Sin nombre' }, index)))] })) : isEditing && isContactBirthdayProps(props) ? (jsxRuntimeExports.jsx(DateSelect, { birthDate: props.contact.field.birthDate, setBirthDate: props.contact.action.setBirthDate, dateFormat: props.dateFormat })) : !isEditing && props.entityType === 'contact' && inputType === 'selectBusiness' && props.businessId ? (jsxRuntimeExports.jsx(Box$2, { display: "flex", alignItems: "center", children: "Popover" })) : (jsxRuntimeExports.jsx(Typography$2, { fontWeight: '400', sx: { padding: '2.5px 14px 8.5px 0px' }, color: (theme) => theme.palette.text.primary, children: displayValue || (typeof value === 'string' && value) || '-' })) })] }));
52561
52571
  };
@@ -54363,7 +54373,7 @@ const CustomPropertyDateRangePicker = ({ value, handleChange, userDateFormat })
54363
54373
  }, value: value || initDates, onChange: (newValue) => handleChange(newValue), format: dateFormat }) }) }));
54364
54374
  };
54365
54375
 
54366
- const StyledIconButton$2 = styled$5(IconButton$2)(() => ({
54376
+ const StyledIconButton$1 = styled$5(IconButton$2)(() => ({
54367
54377
  opacity: 0,
54368
54378
  transition: 'opacity 0.3s ease-in-out',
54369
54379
  '& .MuiSvgIcon-root': {
@@ -54565,7 +54575,7 @@ const EntityCustomFieldLabel = ({ property, entity, entityType, entityId, custom
54565
54575
  else
54566
54576
  return (jsxRuntimeExports.jsx(CustomPropertyInput, { type: type, nameKey: nameKey, value: value, onChange: handleInputChange }));
54567
54577
  };
54568
- return (jsxRuntimeExports.jsxs(ContactBox, { className: `fadein ${property.type === Contacts.ContactField_type.LONGTEXT ? 'contacts-col-12' : 'contacts-col-5'}`, children: [jsxRuntimeExports.jsxs(Box$2, { display: "flex", position: "relative", minHeight: "25px", children: [jsxRuntimeExports.jsx(FieldName, { flexGrow: isEditing ? 1 : 0, children: getPropertyName(property.nameKey) }), isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(CircularProgress$2, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$2, { className: "edit-icon", size: "small", onClick: toggleEdit, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(Box$2, { width: isEditing || property.type === Contacts.ContactField_type.LONGTEXT ? '100%' : '50%', position: "relative", children: isEditing ? (EditField()) : (jsxRuntimeExports.jsx(FieldValue, { children: hasValue(property?.value)
54578
+ return (jsxRuntimeExports.jsxs(ContactBox, { className: `fadein ${property.type === Contacts.ContactField_type.LONGTEXT ? 'contacts-col-12' : 'contacts-col-5'}`, children: [jsxRuntimeExports.jsxs(Box$2, { display: "flex", position: "relative", minHeight: "25px", children: [jsxRuntimeExports.jsx(FieldName, { flexGrow: isEditing ? 1 : 0, children: getPropertyName(property.nameKey) }), isEditing ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleSave, children: isSaving ? jsxRuntimeExports.jsx(CircularProgress$2, { size: 24 }) : jsxRuntimeExports.jsx(default_1$a, {}) }), jsxRuntimeExports.jsx(StyledSaveCancelButton, { size: "small", onClick: handleCancel, children: jsxRuntimeExports.jsx(default_1$8, {}) })] })) : (jsxRuntimeExports.jsx(StyledIconButton$1, { className: "edit-icon", size: "small", onClick: toggleEdit, children: jsxRuntimeExports.jsx(default_1$f, {}) }))] }), jsxRuntimeExports.jsx(Box$2, { width: isEditing || property.type === Contacts.ContactField_type.LONGTEXT ? '100%' : '50%', position: "relative", children: isEditing ? (EditField()) : (jsxRuntimeExports.jsx(FieldValue, { children: hasValue(property?.value)
54569
54579
  ? property.type === Contacts.ContactField_type.DATERANGE
54570
54580
  ? (() => {
54571
54581
  if (typeof property.value === 'string') {
@@ -54798,7 +54808,7 @@ const useEditModal = () => {
54798
54808
  return { isOpen, title, openModal, closeModal };
54799
54809
  };
54800
54810
 
54801
- const StyledBox$2 = styled$1(Box$2)(({ theme }) => ({
54811
+ const StyledBox$1 = styled$1(Box$2)(({ theme }) => ({
54802
54812
  display: 'flex',
54803
54813
  alignItems: 'flex-start',
54804
54814
  justifyContent: 'space-between',
@@ -54865,7 +54875,7 @@ const ContactMethodItem = ({ item }) => {
54865
54875
  const { imageUrl } = useImage({
54866
54876
  initialImageUrl: avatarUrlWithoutAccess,
54867
54877
  });
54868
- return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox$2, { children: [jsxRuntimeExports.jsx(LeftSection$1, { children: jsxRuntimeExports.jsxs(ContactDetails$1, { children: [jsxRuntimeExports.jsx(Tooltip, { title: item.address || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText$1, { children: item.address }) }), jsxRuntimeExports.jsx(Tooltip, { title: item.profileName || '', arrow: true, children: jsxRuntimeExports.jsx(ProfileNameText, { sx: {
54878
+ return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox$1, { children: [jsxRuntimeExports.jsx(LeftSection$1, { children: jsxRuntimeExports.jsxs(ContactDetails$1, { children: [jsxRuntimeExports.jsx(Tooltip, { title: item.address || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText$1, { children: item.address }) }), jsxRuntimeExports.jsx(Tooltip, { title: item.profileName || '', arrow: true, children: jsxRuntimeExports.jsx(ProfileNameText, { sx: {
54869
54879
  marginTop: '-10px',
54870
54880
  marginLeft: '5px',
54871
54881
  fontSize: '10px',
@@ -56125,7 +56135,7 @@ const formatPhoneForDisplay = (number) => {
56125
56135
  }
56126
56136
  };
56127
56137
 
56128
- const StyledIconButton$1 = styled$1(IconButton$2)(({ theme }) => ({
56138
+ const StyledIconButton = styled$1(IconButton$2)(({ theme }) => ({
56129
56139
  padding: theme.spacing(0.5),
56130
56140
  marginTop: '-5px',
56131
56141
  }));
@@ -56134,7 +56144,7 @@ const StyledLocalPhoneIcon = styled$1(default_1$7)(({ theme }) => ({
56134
56144
  width: 16,
56135
56145
  color: theme.palette.secondary.main
56136
56146
  }));
56137
- const StyledBox$1 = styled$1(Box$2)(({ theme }) => ({
56147
+ const StyledBox = styled$1(Box$2)(({ theme }) => ({
56138
56148
  display: 'flex',
56139
56149
  alignItems: 'flex-start',
56140
56150
  justifyContent: 'space-between',
@@ -56197,7 +56207,7 @@ const ContactMethodPhoneItem = ({ item }) => {
56197
56207
  window.dispatchEvent(event);
56198
56208
  };
56199
56209
  const formattedPhone = useMemo(() => formatPhoneForDisplay(item.address || ''), [item.address]);
56200
- return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox$1, { children: [jsxRuntimeExports.jsxs(LeftSection, { children: [jsxRuntimeExports.jsx(StyledIconButton$1, { onClick: handleCallContact, color: "primary", size: "small", children: jsxRuntimeExports.jsx(StyledLocalPhoneIcon, {}) }), jsxRuntimeExports.jsxs(ContactDetails, { children: [jsxRuntimeExports.jsx(Tooltip, { title: formattedPhone || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText, { children: formattedPhone }) }), jsxRuntimeExports.jsx(Tooltip, { title: item.note || '', arrow: true, children: jsxRuntimeExports.jsx(NoteText, { children: item.note }) })] })] }), jsxRuntimeExports.jsx(RightSection, { children: jsxRuntimeExports.jsx(Box$2, { sx: {
56210
+ return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox, { children: [jsxRuntimeExports.jsxs(LeftSection, { children: [jsxRuntimeExports.jsx(StyledIconButton, { onClick: handleCallContact, color: "primary", size: "small", children: jsxRuntimeExports.jsx(StyledLocalPhoneIcon, {}) }), jsxRuntimeExports.jsxs(ContactDetails, { children: [jsxRuntimeExports.jsx(Tooltip, { title: formattedPhone || '', arrow: true, children: jsxRuntimeExports.jsx(PhoneText, { children: formattedPhone }) }), jsxRuntimeExports.jsx(Tooltip, { title: item.note || '', arrow: true, children: jsxRuntimeExports.jsx(NoteText, { children: item.note }) })] })] }), jsxRuntimeExports.jsx(RightSection, { children: jsxRuntimeExports.jsx(Box$2, { sx: {
56201
56211
  display: 'flex',
56202
56212
  alignItems: 'center',
56203
56213
  justifyContent: 'flex-end',
@@ -56208,47 +56218,13 @@ const ContactMethodPhoneItem = ({ item }) => {
56208
56218
  } })) }) }) })] }) }));
56209
56219
  };
56210
56220
 
56211
- const StyledBox = styled$1(Box$2)(({ theme }) => ({
56212
- display: 'flex',
56213
- flexDirection: 'column',
56214
- padding: theme.spacing(1, 0, 2, 0),
56215
- width: '100%',
56216
- gap: theme.spacing(1),
56217
- '&:hover .edit-icon': {
56218
- opacity: 1,
56219
- },
56220
- }));
56221
- const StyledTypography = styled$1(Typography$2)(({}) => ({
56222
- letterSpacing: -0.5,
56223
- fontSize: 14,
56224
- fontWeight: 600,
56225
- }));
56226
- const HeaderBox = styled$1(Box$2)(({}) => ({
56227
- display: 'flex',
56228
- alignItems: 'center',
56229
- }));
56230
- const MethodItemsBox = styled$1(Box$2)(({ theme }) => ({
56231
- display: 'flex',
56232
- flexDirection: 'column',
56233
- gap: theme.spacing(1),
56234
- width: '100%',
56235
- }));
56236
- const StyledIconButton = styled$1(IconButton$2)({
56237
- opacity: 0,
56238
- transition: 'opacity 0.3s ease-in-out',
56239
- '& .MuiSvgIcon-root': {
56240
- width: '0.8em',
56241
- height: '0.8em',
56242
- },
56243
- marginLeft: '15px',
56244
- });
56245
56221
  const ContactMethod = ({ title, methodItems, isPhone, handleEdit, owner }) => {
56246
- return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsxs(StyledBox, { children: [jsxRuntimeExports.jsxs(HeaderBox, { children: [jsxRuntimeExports.jsx(StyledTypography, { children: title }), jsxRuntimeExports.jsx(StyledIconButton, { className: "edit-icon", size: "small", onClick: handleEdit, children: jsxRuntimeExports.jsx(default_1$f, { fontSize: "small" }) })] }), jsxRuntimeExports.jsx(MethodItemsBox, { children: methodItems.map((item, index) => {
56247
- if (isPhone) {
56248
- return jsxRuntimeExports.jsx(ContactMethodPhoneItem, { item: item }, index);
56249
- }
56250
- return jsxRuntimeExports.jsx(ContactMethodItem, { item: item, owner: owner }, index);
56251
- }) })] }) }));
56222
+ return (jsxRuntimeExports.jsxs("div", { className: "w-full rounded-xl border border-gray-200 bg-white/60 p-3 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-gray-800", children: title }), jsxRuntimeExports.jsx(IconButton$2, { "aria-label": `Edit ${title}`, size: "small", onClick: handleEdit, className: "edit-icon text-gray-500 transition hover:text-gray-800", children: jsxRuntimeExports.jsx(default_1$f, { fontSize: "small" }) })] }), jsxRuntimeExports.jsx("div", { className: "mt-3 space-y-2", children: methodItems.map((item, index) => {
56223
+ if (isPhone) {
56224
+ return jsxRuntimeExports.jsx(ContactMethodPhoneItem, { item: item }, index);
56225
+ }
56226
+ return jsxRuntimeExports.jsx(ContactMethodItem, { item: item, owner: owner }, index);
56227
+ }) })] }));
56252
56228
  };
56253
56229
 
56254
56230
  const SubsectionHeader = ({ title }) => {
@@ -56276,10 +56252,10 @@ default_1$6 = Add.default = (0, _createSvgIcon$6.default)( /*#__PURE__*/(0, _jsx
56276
56252
  d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
56277
56253
  }), 'Add');
56278
56254
 
56279
- const SubsectionHeaderWithButton = ({ title, handleAdd, t }) => {
56280
- const tFromContext = useTranslationContext();
56281
- const translate = t || tFromContext;
56282
- return (jsxRuntimeExports.jsxs(Box$2, { sx: subsectionHeaderWithButtonStyle.container, children: [jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle2", children: title }), jsxRuntimeExports.jsx(Button$2, { onClick: handleAdd, size: "small", startIcon: jsxRuntimeExports.jsx(default_1$6, {}), variant: "text", color: "primary", children: translate('global.add') })] }));
56255
+ const SubsectionHeaderWithButton = ({ title, handleAdd }) => {
56256
+ const t = useTranslationContext();
56257
+ console.log('[SubsectionHeaderWithButton] title:', title, 't fn:', t?.name || 'anonymous');
56258
+ return (jsxRuntimeExports.jsxs(Box$2, { sx: subsectionHeaderWithButtonStyle.container, children: [jsxRuntimeExports.jsx(Typography$2, { variant: "subtitle2", children: title }), jsxRuntimeExports.jsx(Button$2, { onClick: handleAdd, size: "small", startIcon: jsxRuntimeExports.jsx(default_1$6, {}), variant: "text", color: "primary", children: t('global.add') })] }));
56283
56259
  };
56284
56260
 
56285
56261
  const informationItemContainerStyle = {
@@ -56960,7 +56936,68 @@ const ContactInformation = ({ ownerData }) => {
56960
56936
  const webchat = editEntity.field.imsWebchats;
56961
56937
  const instagram = editEntity.field.imsInstagrams;
56962
56938
  const rcs = editEntity.field.imsRCS;
56963
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Section, { title: "Contact Information", children: jsxRuntimeExports.jsxs(SectionContent, { children: [jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Phones'), title: t('contactDetails.phones'), methodItems: phones, isPhone: true, owner: ownerData }), jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Emails'), title: t('Emails'), methodItems: emails, owner: ownerData }), jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Facebook'), title: t('Facebook'), methodItems: facebook, owner: ownerData }), jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Whatsapp'), title: t('Whatsapp'), methodItems: whatsapp, owner: ownerData }), rcs.length > 0 ? (jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('RCS'), title: t('RCS'), methodItems: rcs, owner: ownerData })) : null, jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Mercado libre'), title: t('Mercado libre'), methodItems: mercadolibre, owner: ownerData }), jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Webchat'), title: t('Webchat'), methodItems: webchat, owner: ownerData }), jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal('Instagram'), title: t('Instagram'), methodItems: instagram, owner: ownerData })] }) }), jsxRuntimeExports.jsx(EditModal, { open: isOpen, onClose: closeModal, title: title })] }));
56939
+ const contactMethods = [
56940
+ {
56941
+ key: 'phones',
56942
+ title: t('contactDetails.phones'),
56943
+ items: phones,
56944
+ isPhone: true,
56945
+ modalTitle: 'Phones',
56946
+ visible: true,
56947
+ },
56948
+ {
56949
+ key: 'emails',
56950
+ title: 'Emails',
56951
+ items: emails,
56952
+ modalTitle: 'Emails',
56953
+ visible: true,
56954
+ },
56955
+ {
56956
+ key: 'facebook',
56957
+ title: 'Facebook',
56958
+ items: facebook,
56959
+ modalTitle: 'Facebook',
56960
+ visible: true,
56961
+ },
56962
+ {
56963
+ key: 'whatsapp',
56964
+ title: 'Whatsapp',
56965
+ items: whatsapp,
56966
+ modalTitle: 'Whatsapp',
56967
+ visible: true,
56968
+ },
56969
+ {
56970
+ key: 'rcs',
56971
+ title: 'RCS',
56972
+ items: rcs,
56973
+ modalTitle: 'RCS',
56974
+ visible: rcs.length > 0,
56975
+ },
56976
+ {
56977
+ key: 'mercado-libre',
56978
+ title: 'Mercado libre',
56979
+ items: mercadolibre,
56980
+ modalTitle: 'Mercado libre',
56981
+ visible: true,
56982
+ },
56983
+ {
56984
+ key: 'webchat',
56985
+ title: 'Webchat',
56986
+ items: webchat,
56987
+ modalTitle: 'Webchat',
56988
+ visible: true,
56989
+ },
56990
+ {
56991
+ key: 'instagram',
56992
+ title: 'Instagram',
56993
+ items: instagram,
56994
+ modalTitle: 'Instagram',
56995
+ visible: true,
56996
+ },
56997
+ ];
56998
+ return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Section, { title: t('contactDetails.contactInformation'), children: jsxRuntimeExports.jsx(SectionContent, { children: jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3", children: contactMethods
56999
+ .filter((method) => method.visible)
57000
+ .map((method) => (jsxRuntimeExports.jsx(ContactMethod, { handleEdit: () => openModal(method.modalTitle), title: method.title, methodItems: method.items, isPhone: method.isPhone, owner: ownerData }, method.key))) }) }) }), jsxRuntimeExports.jsx(EditModal, { open: isOpen, onClose: closeModal, title: title })] }));
56964
57001
  };
56965
57002
 
56966
57003
  const AddressInformation = ({ entityType, entityData, baseUrl, spaceId, onEntityUpdated, }) => {
@@ -56971,9 +57008,7 @@ const AddressInformation = ({ entityType, entityData, baseUrl, spaceId, onEntity
56971
57008
  onEntityUpdated,
56972
57009
  };
56973
57010
  const t = useTranslationContext();
56974
- const maybeTitle = t('contactDetails.addressInformation');
56975
- const sectionTitle = maybeTitle === 'contactDetails.addressInformation' ? 'Address Information' : maybeTitle;
56976
- return (jsxRuntimeExports.jsx(Section, { title: sectionTitle, children: jsxRuntimeExports.jsx(SectionContent, { children: entityType === 'contact' ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.street'), value: entityData.address1?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
57011
+ return (jsxRuntimeExports.jsx(Section, { title: t('contactDetails.addressInformation'), children: jsxRuntimeExports.jsx(SectionContent, { children: entityType === 'contact' ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.street'), value: entityData.address1?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
56977
57012
  address1: { street: value },
56978
57013
  }) }), jsxRuntimeExports.jsx(EntityInfoLabel, { entityType: "contact", title: t('contactDetails.anotherStreet'), value: entityData.address2?.street ?? '', ...commonProps, constructUpdateObject: (value) => ({
56979
57014
  address2: { street: value },
@@ -57127,6 +57162,7 @@ const EditContactModal = ({ open, onClose, baseUrl, spaceId, contactId, sx, t })
57127
57162
  return null;
57128
57163
  return createEditContactApi(baseUrl, spaceId);
57129
57164
  }, [baseUrl, spaceId]);
57165
+ console.log('[EditContactModal] t fn:', t?.name || 'anonymous', t);
57130
57166
  const { state, selectors, actions } = useEditContactModalController({
57131
57167
  open,
57132
57168
  baseUrl,