@trii/components 2.0.45 → 2.0.47

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,14 +1,15 @@
1
1
  import { IBusiness, IContact } from '@trii/types/dist/Contacts';
2
2
  import { SxProps, Theme } from '@mui/material';
3
+ import '../../i18n/config';
3
4
  export interface ContactInfoPopupProps {
4
5
  open: boolean;
5
6
  anchorEl: HTMLElement | null;
6
7
  onClose: () => void;
7
- t?: (key: string) => string;
8
+ language?: 'en' | 'es';
8
9
  contactData?: IContact | IBusiness;
9
10
  avatarImgUrl?: string;
10
11
  sx?: SxProps<Theme>;
11
12
  navigate: (path: string) => void;
12
13
  }
13
- declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, t, }: ContactInfoPopupProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, language, }: ContactInfoPopupProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default ContactInfoPopup;
@@ -1,13 +1,14 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
+ import '../../i18n/config';
2
3
  export interface Props {
3
4
  open: boolean;
4
5
  onClose: () => void;
5
6
  baseUrl?: string;
6
7
  spaceId?: string;
7
8
  contactId?: string;
8
- t: (key: string) => string;
9
+ language?: 'en' | 'es';
9
10
  sx?: SxProps<Theme>;
10
11
  navigate: (path: string) => void;
11
12
  }
12
- declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, t, navigate, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, language, navigate, }: Props) => import("react/jsx-runtime").JSX.Element;
13
14
  export default EditContactModal;
@@ -0,0 +1,2 @@
1
+ import i18n from 'i18next';
2
+ export default i18n;
@@ -0,0 +1,2 @@
1
+ export { default as i18n } from './config';
2
+ export { useTranslation } from 'react-i18next';
@@ -1 +1,2 @@
1
1
  export * from './components';
2
+ export { i18n } from './i18n';
package/dist/index.d.ts CHANGED
@@ -1,18 +1,19 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { IContact, IBusiness } from '@trii/types/dist/Contacts';
3
3
  import { SxProps, Theme } from '@mui/material';
4
+ export { default as i18n } from 'i18next';
4
5
 
5
6
  interface ContactInfoPopupProps {
6
7
  open: boolean;
7
8
  anchorEl: HTMLElement | null;
8
9
  onClose: () => void;
9
- t?: (key: string) => string;
10
+ language?: 'en' | 'es';
10
11
  contactData?: IContact | IBusiness;
11
12
  avatarImgUrl?: string;
12
13
  sx?: SxProps<Theme>;
13
14
  navigate: (path: string) => void;
14
15
  }
15
- declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, t, }: ContactInfoPopupProps) => react_jsx_runtime.JSX.Element;
16
+ declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, language, }: ContactInfoPopupProps) => react_jsx_runtime.JSX.Element;
16
17
 
17
18
  interface Props {
18
19
  open: boolean;
@@ -20,10 +21,10 @@ interface Props {
20
21
  baseUrl?: string;
21
22
  spaceId?: string;
22
23
  contactId?: string;
23
- t: (key: string) => string;
24
+ language?: 'en' | 'es';
24
25
  sx?: SxProps<Theme>;
25
26
  navigate: (path: string) => void;
26
27
  }
27
- declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, t, navigate, }: Props) => react_jsx_runtime.JSX.Element;
28
+ declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, language, navigate, }: Props) => react_jsx_runtime.JSX.Element;
28
29
 
29
30
  export { ContactInfoPopup, EditContactModal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/components",
3
- "version": "2.0.45",
3
+ "version": "2.0.47",
4
4
  "description": "Trii components package",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -57,6 +57,7 @@
57
57
  "@mui/lab": "^5.0.0-alpha.176",
58
58
  "@mui/material": "^5.18.0",
59
59
  "@rollup/plugin-commonjs": "^25.0.4",
60
+ "@rollup/plugin-json": "^6.1.0",
60
61
  "@rollup/plugin-node-resolve": "^15.2.1",
61
62
  "@rollup/plugin-typescript": "^11.1.4",
62
63
  "@storybook/addon-essentials": "^8.5.3",
@@ -109,6 +110,8 @@
109
110
  "@trii/types": "^2.10.586",
110
111
  "dayjs": "^1.11.19",
111
112
  "google-libphonenumber": "^3.2.43",
112
- "moment": "^2.30.1"
113
+ "i18next": "^25.8.0",
114
+ "moment": "^2.30.1",
115
+ "react-i18next": "^16.5.3"
113
116
  }
114
117
  }