@trii/components 2.0.39 → 2.0.43

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.
Files changed (22) hide show
  1. package/dist/cjs/index.js +245 -114
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/EditContactModal/EditContactModal.d.ts +2 -1
  4. package/dist/cjs/types/components/EditContactModal/components/Header/Header.d.ts +8 -2
  5. package/dist/cjs/types/components/EditContactModal/components/Header/components/ContactName/ContactName.d.ts +12 -0
  6. package/dist/cjs/types/components/EditContactModal/components/Header/components/index.d.ts +1 -0
  7. package/dist/cjs/types/components/EditContactModal/context/NavigateContext.d.ts +9 -0
  8. package/dist/cjs/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/SelectBusinessLabel.d.ts +7 -0
  9. package/dist/cjs/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/index.d.ts +1 -0
  10. package/dist/cjs/types/components/EditContactModal/shared/EntityInfoLabel/components/index.d.ts +1 -0
  11. package/dist/esm/index.js +246 -115
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/types/components/EditContactModal/EditContactModal.d.ts +2 -1
  14. package/dist/esm/types/components/EditContactModal/components/Header/Header.d.ts +8 -2
  15. package/dist/esm/types/components/EditContactModal/components/Header/components/ContactName/ContactName.d.ts +12 -0
  16. package/dist/esm/types/components/EditContactModal/components/Header/components/index.d.ts +1 -0
  17. package/dist/esm/types/components/EditContactModal/context/NavigateContext.d.ts +9 -0
  18. package/dist/esm/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/SelectBusinessLabel.d.ts +7 -0
  19. package/dist/esm/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/index.d.ts +1 -0
  20. package/dist/esm/types/components/EditContactModal/shared/EntityInfoLabel/components/index.d.ts +1 -0
  21. package/dist/index.d.ts +2 -1
  22. package/package.json +1 -1
@@ -7,6 +7,7 @@ export interface Props {
7
7
  contactId?: string;
8
8
  t: (key: string) => string;
9
9
  sx?: SxProps<Theme>;
10
+ navigate: (path: string) => void;
10
11
  }
11
- declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, t }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ declare const EditContactModal: ({ open, onClose, baseUrl, spaceId, contactId, sx, t, navigate, }: Props) => import("react/jsx-runtime").JSX.Element;
12
13
  export default EditContactModal;
@@ -1,4 +1,4 @@
1
- import { IContactTag } from '@trii/types/dist/Contacts';
1
+ import { IContactTag, IContact, IBusiness } from '@trii/types/dist/Contacts/contacts';
2
2
  import type { ChangeEvent, RefObject } from 'react';
3
3
  type HeaderProps = {
4
4
  imgUrl?: string;
@@ -12,6 +12,12 @@ type HeaderProps = {
12
12
  isUploadingPhoto: boolean;
13
13
  onDeletePhoto: () => void;
14
14
  isDeletingPhoto: boolean;
15
+ contactType?: 'contact' | 'business' | 'unknown';
16
+ firstName?: string;
17
+ lastName?: string;
18
+ name?: string;
19
+ entityId?: string;
20
+ onEntityUpdated?: (data: IContact | IBusiness) => void;
15
21
  };
16
- declare const Header: ({ imgUrl, displayName, onError, tags, onEditTags, onUploadPhoto, onPhotoFileChange, photoInputRef, isUploadingPhoto, onDeletePhoto, isDeletingPhoto, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
22
+ declare const Header: ({ imgUrl, displayName, onError, tags, onEditTags, onUploadPhoto, onPhotoFileChange, photoInputRef, isUploadingPhoto, onDeletePhoto, isDeletingPhoto, contactType, firstName, lastName, name, entityId, onEntityUpdated, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
17
23
  export default Header;
@@ -0,0 +1,12 @@
1
+ import { IContact, IBusiness } from '@trii/types/dist/Contacts/contacts';
2
+ export type ContactNameProps = {
3
+ displayName: string;
4
+ contactType?: 'contact' | 'business' | 'unknown';
5
+ firstName?: string;
6
+ lastName?: string;
7
+ name?: string;
8
+ entityId?: string;
9
+ onEntityUpdated?: (data: IContact | IBusiness) => void;
10
+ };
11
+ declare const ContactName: ({ displayName, contactType, firstName, lastName, name, entityId, onEntityUpdated, }: ContactNameProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default ContactName;
@@ -1 +1,2 @@
1
1
  export { default as Tags } from './Tags';
2
+ export { default as ContactName } from './ContactName/ContactName';
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export type NavigateFn = (path: string) => void;
3
+ interface NavigateProviderProps {
4
+ navigate: NavigateFn;
5
+ children: ReactNode;
6
+ }
7
+ export declare const NavigateProvider: ({ navigate, children }: NavigateProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const useNavigateContext: () => NavigateFn;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ value: string;
3
+ displayValue: string;
4
+ businessId: string;
5
+ };
6
+ declare function SelectBusinessLabel({ value, displayValue, businessId }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export default SelectBusinessLabel;
@@ -0,0 +1 @@
1
+ export { default } from './SelectBusinessLabel';
@@ -0,0 +1 @@
1
+ export { default as SelectBusinessLabel } from './SelectBusinessLabel';