@trii/components 2.0.51 → 2.0.52
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 +11 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +1 -2
- package/dist/cjs/types/components/EditContactModal/EditContactModal.d.ts +1 -2
- package/dist/cjs/types/i18n/config.d.ts +2 -2
- package/dist/esm/index.js +12 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +1 -2
- package/dist/esm/types/components/EditContactModal/EditContactModal.d.ts +1 -2
- package/dist/esm/types/i18n/config.d.ts +2 -2
- package/dist/index.d.ts +6 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -15467,7 +15467,8 @@ const resources = {
|
|
|
15467
15467
|
en: { translation: en },
|
|
15468
15468
|
es: { translation: es },
|
|
15469
15469
|
};
|
|
15470
|
-
i18n.
|
|
15470
|
+
const i18nInstance = i18n.createInstance();
|
|
15471
|
+
i18nInstance.use(reactI18next.initReactI18next).init({
|
|
15471
15472
|
resources,
|
|
15472
15473
|
lng: 'en',
|
|
15473
15474
|
fallbackLng: 'en',
|
|
@@ -15506,7 +15507,7 @@ const PopupContainer = material.styled(material.Box)(({ theme }) => ({
|
|
|
15506
15507
|
background: '#616161',
|
|
15507
15508
|
},
|
|
15508
15509
|
}));
|
|
15509
|
-
const
|
|
15510
|
+
const ContactInfoPopupContent = ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, language = 'en', }) => {
|
|
15510
15511
|
const { t: i18nT, i18n } = reactI18next.useTranslation();
|
|
15511
15512
|
React$1.useEffect(() => {
|
|
15512
15513
|
if (language) {
|
|
@@ -15566,6 +15567,9 @@ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl,
|
|
|
15566
15567
|
}, [open, onClose]);
|
|
15567
15568
|
return (jsxRuntimeExports.jsx(material.Popper, { sx: { zIndex: 1300 }, open: open, anchorEl: anchorEl, placement: "bottom-start", "data-popper-child": "true", children: jsxRuntimeExports.jsx(material.ClickAwayListener, { onClickAway: onClose, children: jsxRuntimeExports.jsx(PopupContainer, { children: jsxRuntimeExports.jsxs(material.CardContent, { children: [jsxRuntimeExports.jsx(Header$1, { navigate: navigate, contactId: contactData?.id, imgUrl: avatarImgUrl, name: contactData?.name, onClose: onClose, isBusiness: dataIsBusiness }), jsxRuntimeExports.jsx(LabelsSection, { contactData: contactData, title: t('labels') }), dataIsContact && jsxRuntimeExports.jsx(BusinessSection, { contactData: contactData, title: t('business') }), dataIsBusiness && (jsxRuntimeExports.jsx(MembersSection, { contactData: contactData, title: t('businessMembers'), navigate: navigate })), contactMethods.map((method, index) => (jsxRuntimeExports.jsx(ContactMethod$1, { icon: method.icon, title: method.title, contactList: method.contactList, showTitle: method.showTitle }, index))), jsxRuntimeExports.jsx(Properties, { properties: contactData?.properties, title: t('properties') })] }) }) }) }));
|
|
15568
15569
|
};
|
|
15570
|
+
const ContactInfoPopup = (props) => {
|
|
15571
|
+
return (jsxRuntimeExports.jsx(reactI18next.I18nextProvider, { i18n: i18nInstance, children: jsxRuntimeExports.jsx(ContactInfoPopupContent, { ...props }) }));
|
|
15572
|
+
};
|
|
15569
15573
|
|
|
15570
15574
|
var Close = {};
|
|
15571
15575
|
|
|
@@ -58314,7 +58318,7 @@ const BusinessSelectEditor = ({ baseUrl, spaceId, contactId, initialBusiness, on
|
|
|
58314
58318
|
} })] })] }));
|
|
58315
58319
|
};
|
|
58316
58320
|
|
|
58317
|
-
const
|
|
58321
|
+
const EditContactModalContent = ({ open, onClose, baseUrl, spaceId, contactId, sx, language = 'en', navigate, }) => {
|
|
58318
58322
|
const { t: i18nT, i18n } = reactI18next.useTranslation();
|
|
58319
58323
|
const modalContentRef = React$1.useRef(null);
|
|
58320
58324
|
React$1.useEffect(() => {
|
|
@@ -58408,8 +58412,11 @@ const EditContactModal = ({ open, onClose, baseUrl, spaceId, contactId, sx, lang
|
|
|
58408
58412
|
}
|
|
58409
58413
|
: null, onBack: () => setView('main'), onEntityUpdated: handleEntityUpdated, currentUser: selectors.userTrii }) }) })] }) }) })) : null] }) }) }) }) }) }));
|
|
58410
58414
|
};
|
|
58415
|
+
const EditContactModal = (props) => {
|
|
58416
|
+
return (jsxRuntimeExports.jsx(reactI18next.I18nextProvider, { i18n: i18nInstance, children: jsxRuntimeExports.jsx(EditContactModalContent, { ...props }) }));
|
|
58417
|
+
};
|
|
58411
58418
|
|
|
58412
|
-
exports.i18n = i18n;
|
|
58413
58419
|
exports.ContactInfoPopup = ContactInfoPopup;
|
|
58414
58420
|
exports.EditContactModal = EditContactModal;
|
|
58421
|
+
exports.i18n = i18nInstance;
|
|
58415
58422
|
//# sourceMappingURL=index.js.map
|