@trii/components 2.0.30 → 2.0.33
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 +39744 -2625
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +10 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/AddressInformation/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/ContactInformation/ContactInformation.d.ts +2 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/ContactInformation/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/General/General.d.ts +14 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/General/components/BusinessGeneral.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/General/components/ContactGeneral.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/General/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/index.d.ts +3 -0
- package/dist/cjs/types/components/EditContactModal/components/Section/utils/resolveUserLabel.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditBusiness/types/UseEditBusiness.d.ts +55 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditBusiness/useEditBusiness.d.ts +10 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditContact/types/UseEditContact.d.ts +60 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditContact/useEditContact.d.ts +10 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditContactMethods.d.ts +52 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useEditContactModalController.d.ts +12 -1
- package/dist/cjs/types/components/EditContactModal/hooks/useField.d.ts +18 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useMultipleSelect.d.ts +20 -0
- package/dist/cjs/types/components/EditContactModal/hooks/useSelect.d.ts +13 -0
- package/dist/cjs/types/components/EditContactModal/hooks/utils/editContactHelper.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/layout/Section.d.ts +7 -0
- package/dist/cjs/types/components/EditContactModal/layout/SectionContent.d.ts +7 -0
- package/dist/cjs/types/components/EditContactModal/layout/index.d.ts +2 -0
- package/dist/cjs/types/components/EditContactModal/services/api.d.ts +30 -7
- package/dist/cjs/types/components/EditContactModal/shared/BusinessInfoLabel/BusinessInfoLabel.d.ts +15 -0
- package/dist/cjs/types/components/EditContactModal/shared/BusinessInfoLabel/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/ContactInfoLabel.d.ts +29 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/BusinessSelect.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchBar/BusinessSearchBar.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchBar/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchResults/BusinessSearchResults.d.ts +13 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchResults/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/index.d.ts +2 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/types/index.d.ts +4 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/DateSelect.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/EntityCustomFieldLabel.d.ts +18 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/CustomPropertyDatePicker.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/CustomPropertyDateRangePicker.d.ts +10 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/CustomPropertyInput.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/types/CustomPropertyInputProps.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/CustomPropertyOptionsSelect.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/CustomPropertyTimePicker.d.ts +8 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/CustomPropertyTimeRangePicker.d.ts +10 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/index.d.ts +6 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityCustomFieldLabel/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityInfoLabel/EntityInfoLabel.d.ts +40 -0
- package/dist/cjs/types/components/EditContactModal/shared/EntityInfoLabel/index.d.ts +1 -0
- package/dist/cjs/types/components/EditContactModal/shared/index.d.ts +3 -0
- package/dist/cjs/types/components/EditContactModal/utils/contactHelper.d.ts +13 -0
- package/dist/esm/index.js +39798 -2679
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +10 -0
- package/dist/esm/types/components/EditContactModal/components/Section/AddressInformation/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/components/Section/ContactInformation/ContactInformation.d.ts +2 -0
- package/dist/esm/types/components/EditContactModal/components/Section/ContactInformation/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/components/Section/General/General.d.ts +14 -0
- package/dist/esm/types/components/EditContactModal/components/Section/General/components/BusinessGeneral.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/components/Section/General/components/ContactGeneral.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/components/Section/General/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/components/Section/index.d.ts +3 -0
- package/dist/esm/types/components/EditContactModal/components/Section/utils/resolveUserLabel.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditBusiness/types/UseEditBusiness.d.ts +55 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditBusiness/useEditBusiness.d.ts +10 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditContact/types/UseEditContact.d.ts +60 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditContact/useEditContact.d.ts +10 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditContactMethods.d.ts +52 -0
- package/dist/esm/types/components/EditContactModal/hooks/useEditContactModalController.d.ts +12 -1
- package/dist/esm/types/components/EditContactModal/hooks/useField.d.ts +18 -0
- package/dist/esm/types/components/EditContactModal/hooks/useMultipleSelect.d.ts +20 -0
- package/dist/esm/types/components/EditContactModal/hooks/useSelect.d.ts +13 -0
- package/dist/esm/types/components/EditContactModal/hooks/utils/editContactHelper.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/layout/Section.d.ts +7 -0
- package/dist/esm/types/components/EditContactModal/layout/SectionContent.d.ts +7 -0
- package/dist/esm/types/components/EditContactModal/layout/index.d.ts +2 -0
- package/dist/esm/types/components/EditContactModal/services/api.d.ts +30 -7
- package/dist/esm/types/components/EditContactModal/shared/BusinessInfoLabel/BusinessInfoLabel.d.ts +15 -0
- package/dist/esm/types/components/EditContactModal/shared/BusinessInfoLabel/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/ContactInfoLabel.d.ts +29 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/BusinessSelect.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchBar/BusinessSearchBar.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchBar/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchResults/BusinessSearchResults.d.ts +13 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/BusinessSearchResults/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/components/index.d.ts +2 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/BusinessSelect/types/index.d.ts +4 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/DateSelect.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/components/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/ContactInfoLabel/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/EntityCustomFieldLabel.d.ts +18 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/CustomPropertyDatePicker.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/CustomPropertyDateRangePicker.d.ts +10 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/CustomPropertyInput.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/types/CustomPropertyInputProps.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/CustomPropertyOptionsSelect.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/CustomPropertyTimePicker.d.ts +8 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/CustomPropertyTimeRangePicker.d.ts +10 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/index.d.ts +6 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityCustomFieldLabel/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityInfoLabel/EntityInfoLabel.d.ts +40 -0
- package/dist/esm/types/components/EditContactModal/shared/EntityInfoLabel/index.d.ts +1 -0
- package/dist/esm/types/components/EditContactModal/shared/index.d.ts +3 -0
- package/dist/esm/types/components/EditContactModal/utils/contactHelper.d.ts +13 -0
- package/package.json +4 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IBusiness, IContact } from '@trii/types/dist/Contacts/contacts';
|
|
2
|
+
export type AddressInformationProps = {
|
|
3
|
+
entityType: 'contact' | 'business';
|
|
4
|
+
entityData: IContact | IBusiness;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
spaceId?: string;
|
|
7
|
+
t: (key: string) => string;
|
|
8
|
+
};
|
|
9
|
+
declare const AddressInformation: ({ entityType, entityData, baseUrl, spaceId, t }: AddressInformationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default AddressInformation;
|
package/dist/cjs/types/components/EditContactModal/components/Section/AddressInformation/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AddressInformation';
|
package/dist/cjs/types/components/EditContactModal/components/Section/ContactInformation/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContactInformation';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IBusiness, IContact, IContactField } from '@trii/types/dist/Contacts/contacts';
|
|
2
|
+
import type { UserTrii } from '@trii/types/dist/Users';
|
|
3
|
+
export interface GeneralProps {
|
|
4
|
+
dateFormat: string;
|
|
5
|
+
entityType: 'contact' | 'business';
|
|
6
|
+
entityData: IContact | IBusiness;
|
|
7
|
+
customContactFields: IContactField[];
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
spaceId?: string;
|
|
10
|
+
t: (key: string) => string;
|
|
11
|
+
currentUser?: UserTrii | null;
|
|
12
|
+
}
|
|
13
|
+
declare const General: (props: GeneralProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default General;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IBusiness } from "@trii/types/dist/Contacts";
|
|
2
|
+
import { GeneralProps } from "../General";
|
|
3
|
+
export type BusinessGeneralProps = Omit<GeneralProps, 'entityData' | 'entityType'> & {
|
|
4
|
+
entityType: 'business';
|
|
5
|
+
entityData: IBusiness;
|
|
6
|
+
};
|
|
7
|
+
declare const BusinessGeneral: (props: BusinessGeneralProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default BusinessGeneral;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IContact } from "@trii/types/dist/Contacts";
|
|
2
|
+
import { GeneralProps } from "../General";
|
|
3
|
+
export type ContactGeneralProps = Omit<GeneralProps, 'entityData' | 'entityType'> & {
|
|
4
|
+
entityType: 'contact';
|
|
5
|
+
entityData: IContact;
|
|
6
|
+
};
|
|
7
|
+
declare const ContactGeneral: (props: ContactGeneralProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ContactGeneral;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './General';
|
package/dist/cjs/types/components/EditContactModal/hooks/useEditBusiness/types/UseEditBusiness.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
2
|
+
import { IContactAddress, IContactInfo, ILabel, Property } from '@trii/types/dist/Contacts';
|
|
3
|
+
import type { UseFieldType } from '../../useField';
|
|
4
|
+
import type { UseImageType } from '../../useImage';
|
|
5
|
+
import type { UseMultipleSelectReturnType } from '../../useMultipleSelect';
|
|
6
|
+
import type { UseSelectType } from '../../useSelect';
|
|
7
|
+
import { ChangeEvent, Dispatch, SetStateAction } from 'react';
|
|
8
|
+
type UseEditBusiness = {
|
|
9
|
+
field: {
|
|
10
|
+
name: UseFieldType;
|
|
11
|
+
contactImage: UseImageType;
|
|
12
|
+
contactPropietary: UseSelectType;
|
|
13
|
+
imsFacebooks: any[];
|
|
14
|
+
imsWebchats: any[];
|
|
15
|
+
imsInstagrams: any[];
|
|
16
|
+
imsWhatsapp: any[];
|
|
17
|
+
imsMercadolibre: any[];
|
|
18
|
+
imsRCS: any[];
|
|
19
|
+
emails: any[];
|
|
20
|
+
phoneNumbers: any[];
|
|
21
|
+
homeAddress: UseFieldType;
|
|
22
|
+
secondaryHomeAddress: UseFieldType;
|
|
23
|
+
city: UseFieldType;
|
|
24
|
+
secondaryCity: UseFieldType;
|
|
25
|
+
state: UseFieldType;
|
|
26
|
+
secondaryState: UseFieldType;
|
|
27
|
+
postalCode: UseFieldType;
|
|
28
|
+
secondaryPostalCode: UseFieldType;
|
|
29
|
+
country: UseFieldType;
|
|
30
|
+
secondaryCountry: UseFieldType;
|
|
31
|
+
customProperties: Property[];
|
|
32
|
+
labelMultipleSelect: UseMultipleSelectReturnType<ILabel[]>;
|
|
33
|
+
};
|
|
34
|
+
action: {
|
|
35
|
+
setCustomProperties: (customProperties: Property[]) => void;
|
|
36
|
+
getEditedBusiness: () => void;
|
|
37
|
+
handleAddressFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, type: ChannelType) => void;
|
|
38
|
+
handleNoteFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, addressType: ChannelType) => void;
|
|
39
|
+
handleDeleteAddress: (fieldId: string, addressType: ChannelType) => void;
|
|
40
|
+
addPhone: () => void;
|
|
41
|
+
addWhatsapp: () => void;
|
|
42
|
+
addRCS: () => void;
|
|
43
|
+
addEmail: () => void;
|
|
44
|
+
replaceAddress: (addressId: string, newAddress: IContactAddress) => void;
|
|
45
|
+
addWhatsappVerified: (newAddress: IContactAddress) => void;
|
|
46
|
+
resetToInitialContactInformation: () => void;
|
|
47
|
+
resetCustomProperty: (nameKey: string) => void;
|
|
48
|
+
};
|
|
49
|
+
state: {
|
|
50
|
+
isDeletingAddress: string | false;
|
|
51
|
+
};
|
|
52
|
+
selectedContacts: IContactInfo[];
|
|
53
|
+
setSelectedContacts: Dispatch<SetStateAction<IContactInfo[]>>;
|
|
54
|
+
};
|
|
55
|
+
export default UseEditBusiness;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBusiness, IContactField } from '@trii/types/dist/Contacts';
|
|
2
|
+
import UseEditBusiness from './types/UseEditBusiness';
|
|
3
|
+
type UseEditBusinessArgs = {
|
|
4
|
+
business: IBusiness | null;
|
|
5
|
+
customContactFields: IContactField[];
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
spaceId?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const useEditBusiness: ({ business, customContactFields, baseUrl, spaceId }: UseEditBusinessArgs) => UseEditBusiness;
|
|
10
|
+
export default useEditBusiness;
|
package/dist/cjs/types/components/EditContactModal/hooks/useEditContact/types/UseEditContact.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IContactAddress, Property } from '@trii/types/dist/Contacts';
|
|
2
|
+
import type { UseFieldType } from '../../useField';
|
|
3
|
+
import type { UseImageType } from '../../useImage';
|
|
4
|
+
import type { UseSelectType } from '../../useSelect';
|
|
5
|
+
import type { ChangeEvent } from 'react';
|
|
6
|
+
import type { UseMultipleSelectReturnType } from '../../useMultipleSelect';
|
|
7
|
+
import type { ILabel } from '@trii/types/dist/Contacts';
|
|
8
|
+
import type { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
9
|
+
import type { Dayjs } from 'dayjs';
|
|
10
|
+
type UseEditContact = {
|
|
11
|
+
field: {
|
|
12
|
+
imsMercadolibre: IContactAddress[];
|
|
13
|
+
imsFacebooks: IContactAddress[];
|
|
14
|
+
imsWebchats: IContactAddress[];
|
|
15
|
+
imsInstagrams: IContactAddress[];
|
|
16
|
+
imsWhatsapp: IContactAddress[];
|
|
17
|
+
imsRCS: IContactAddress[];
|
|
18
|
+
emails: IContactAddress[];
|
|
19
|
+
phoneNumbers: IContactAddress[];
|
|
20
|
+
contactFirstname: UseFieldType;
|
|
21
|
+
contactLastname: UseFieldType;
|
|
22
|
+
contactImage: UseImageType;
|
|
23
|
+
contactPropietary: UseSelectType;
|
|
24
|
+
homeAddress: UseFieldType;
|
|
25
|
+
secondaryHomeAddress: UseFieldType;
|
|
26
|
+
city: UseFieldType;
|
|
27
|
+
secondaryCity: UseFieldType;
|
|
28
|
+
birthDate: Dayjs | null;
|
|
29
|
+
state: UseFieldType;
|
|
30
|
+
secondaryState: UseFieldType;
|
|
31
|
+
postalCode: UseFieldType;
|
|
32
|
+
secondaryPostalCode: UseFieldType;
|
|
33
|
+
country: UseFieldType;
|
|
34
|
+
secondaryCountry: UseFieldType;
|
|
35
|
+
customProperties: Property[];
|
|
36
|
+
labelMultipleSelect: UseMultipleSelectReturnType<ILabel[]>;
|
|
37
|
+
};
|
|
38
|
+
action: {
|
|
39
|
+
setCustomProperties: (customProperties: Property[]) => void;
|
|
40
|
+
getEditedContact: () => Record<string, unknown> | null;
|
|
41
|
+
handleAddressFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, type: ChannelType) => void;
|
|
42
|
+
handleNoteFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, addressType: ChannelType) => void;
|
|
43
|
+
handleDeleteAddress: (fieldId: string, addressType: ChannelType) => void;
|
|
44
|
+
addPhone: () => void;
|
|
45
|
+
addEmail: () => void;
|
|
46
|
+
addWhatsapp: () => void;
|
|
47
|
+
addRCS: () => void;
|
|
48
|
+
replaceAddress: (addressId: string, newAddress: IContactAddress) => void;
|
|
49
|
+
addWhatsappVerified: (newAddress: IContactAddress) => void;
|
|
50
|
+
setBirthDate: (date: Dayjs | null) => void;
|
|
51
|
+
resetToInitialContactInformation: () => void;
|
|
52
|
+
resetSelectedBusiness: () => void;
|
|
53
|
+
resetBirthDate: () => void;
|
|
54
|
+
resetCustomProperty: (nameKey: string) => void;
|
|
55
|
+
};
|
|
56
|
+
state: {
|
|
57
|
+
isDeletingAddress: string | false;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default UseEditContact;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IContact, IContactField } from '@trii/types/dist/Contacts';
|
|
2
|
+
import UseEditContact from './types/UseEditContact';
|
|
3
|
+
type UseEditContactArgs = {
|
|
4
|
+
contact: IContact | null;
|
|
5
|
+
customContactFields: IContactField[];
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
spaceId?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const useEditContact: ({ contact, customContactFields, baseUrl, spaceId }: UseEditContactArgs) => UseEditContact;
|
|
10
|
+
export default useEditContact;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
3
|
+
import { IContactAddress } from '@trii/types/dist/Contacts';
|
|
4
|
+
type InitialContactMethods = {
|
|
5
|
+
emails?: any[];
|
|
6
|
+
phones?: any[];
|
|
7
|
+
ims_whatsapp?: any[];
|
|
8
|
+
ims_rcs?: any[];
|
|
9
|
+
ims_facebook?: any[];
|
|
10
|
+
ims_webchat?: any[];
|
|
11
|
+
ims_instagram?: any[];
|
|
12
|
+
ims_mercadolibre?: any[];
|
|
13
|
+
} | null | undefined;
|
|
14
|
+
type DeleteAddressPayload = {
|
|
15
|
+
contactId: string;
|
|
16
|
+
contactAddressId: string;
|
|
17
|
+
type: ChannelType;
|
|
18
|
+
};
|
|
19
|
+
type UseEditContactMethodsArgs = {
|
|
20
|
+
entityId?: string | null;
|
|
21
|
+
initial: InitialContactMethods;
|
|
22
|
+
dispatch?: (action: any) => Promise<any>;
|
|
23
|
+
deleteAddress: (payload: DeleteAddressPayload) => Promise<any> | any;
|
|
24
|
+
};
|
|
25
|
+
declare const useEditContactMethods: ({ entityId, initial, dispatch, deleteAddress, }: UseEditContactMethodsArgs) => {
|
|
26
|
+
field: {
|
|
27
|
+
imsWhatsapp: any[];
|
|
28
|
+
imsRCS: any[];
|
|
29
|
+
imsMercadolibre: any[];
|
|
30
|
+
imsFacebooks: any[];
|
|
31
|
+
imsWebchats: any[];
|
|
32
|
+
imsInstagrams: any[];
|
|
33
|
+
emails: any[];
|
|
34
|
+
phoneNumbers: any[];
|
|
35
|
+
};
|
|
36
|
+
action: {
|
|
37
|
+
handleAddressFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, type: ChannelType) => Promise<void>;
|
|
38
|
+
handleNoteFieldChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, fieldId: string, addressType: ChannelType) => void;
|
|
39
|
+
handleDeleteAddress: (fieldId: string, addressType: ChannelType) => Promise<void>;
|
|
40
|
+
addPhone: () => void;
|
|
41
|
+
addEmail: () => void;
|
|
42
|
+
addWhatsapp: () => void;
|
|
43
|
+
addRCS: () => void;
|
|
44
|
+
replaceAddress: (addressId: string, newAddress: IContactAddress) => void;
|
|
45
|
+
addWhatsappVerified: (newWhatsapp: IContactAddress) => void;
|
|
46
|
+
resetToInitialContactInformation: () => void;
|
|
47
|
+
};
|
|
48
|
+
state: {
|
|
49
|
+
isDeletingAddress: string | false;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default useEditContactMethods;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IBusiness, IContact, IContactTag } from '@trii/types/dist/Contacts/contacts';
|
|
1
|
+
import { IBusiness, IContact, IContactField, IContactTag } from '@trii/types/dist/Contacts/contacts';
|
|
2
2
|
import { ILabel } from '@trii/types/dist/Contacts';
|
|
3
|
+
import { UserTrii } from '@trii/types/dist/Users';
|
|
3
4
|
export type UseEditContactModalControllerArgs = {
|
|
4
5
|
open: boolean;
|
|
5
6
|
baseUrl?: string;
|
|
@@ -14,6 +15,12 @@ type ControllerState = {
|
|
|
14
15
|
labels: ILabel[];
|
|
15
16
|
labelsLoading: boolean;
|
|
16
17
|
labelsError: unknown;
|
|
18
|
+
contactFields: IContactField[];
|
|
19
|
+
contactFieldsLoading: boolean;
|
|
20
|
+
contactFieldsError: unknown;
|
|
21
|
+
userTrii: UserTrii | null;
|
|
22
|
+
userLoading: boolean;
|
|
23
|
+
userError: unknown;
|
|
17
24
|
};
|
|
18
25
|
export declare function useEditContactModalController({ open, baseUrl, spaceId, contactId, }: UseEditContactModalControllerArgs): {
|
|
19
26
|
state: ControllerState;
|
|
@@ -24,6 +31,10 @@ export declare function useEditContactModalController({ open, baseUrl, spaceId,
|
|
|
24
31
|
displayName: string;
|
|
25
32
|
tags: IContactTag[];
|
|
26
33
|
labels: ILabel[];
|
|
34
|
+
contactFields: IContactField[];
|
|
35
|
+
userTrii: UserTrii | null;
|
|
36
|
+
userLoading: boolean;
|
|
37
|
+
userError: unknown;
|
|
27
38
|
};
|
|
28
39
|
actions: {
|
|
29
40
|
setContactData: (contactData?: IContact | IBusiness) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
export interface UseFieldType {
|
|
3
|
+
actions: {
|
|
4
|
+
onError: (errorMsg: string) => void;
|
|
5
|
+
onSuccess: () => void;
|
|
6
|
+
resetValue: () => void;
|
|
7
|
+
changeValue: (newValue: string) => void;
|
|
8
|
+
};
|
|
9
|
+
attributes: {
|
|
10
|
+
error: boolean;
|
|
11
|
+
helperText: string;
|
|
12
|
+
type: string;
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const useField: (type: string, initialValue?: string) => UseFieldType;
|
|
18
|
+
export default useField;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ItemWithId {
|
|
2
|
+
id?: string | null;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
type InitialStateType<T> = T extends (infer U)[] ? U extends ItemWithId ? T : never : never;
|
|
6
|
+
interface Props<T extends ItemWithId[]> {
|
|
7
|
+
initialState?: InitialStateType<T>;
|
|
8
|
+
}
|
|
9
|
+
export type UseMultipleSelectReturnType<T> = {
|
|
10
|
+
attributes: {
|
|
11
|
+
value: T;
|
|
12
|
+
onChange: (event: any, newValue: T) => void;
|
|
13
|
+
};
|
|
14
|
+
actions: {
|
|
15
|
+
addValue: (newValue: any) => void;
|
|
16
|
+
setValue: (newValue: T) => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const useMultipleSelect: <T extends ItemWithId[]>({ initialState, }?: Props<T>) => UseMultipleSelectReturnType<T>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SelectChangeEvent } from '@mui/material';
|
|
2
|
+
export type UseSelectType = {
|
|
3
|
+
actions: {
|
|
4
|
+
resetValue: () => void;
|
|
5
|
+
changeValue: (newValue: string) => void;
|
|
6
|
+
};
|
|
7
|
+
attributes: {
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (event: SelectChangeEvent<string>) => void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare const useSelect: (initialValue?: string) => UseSelectType;
|
|
13
|
+
export default useSelect;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IContactAddress } from '@trii/types/dist/Contacts';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
getEditedField: (key: string, originalValue: string | number | null, editedValue: string | number) => Record<string, string | number> | null;
|
|
4
|
+
getAddressesWithUpdatedValues: (newValue: string, newValueAddressId: string, addresses: IContactAddress[]) => IContactAddress[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type SectionContentProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & BoxProps;
|
|
6
|
+
declare const SectionContent: ({ children, ...boxProps }: SectionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SectionContent;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { IBusiness, IContact, IContactTag } from '@trii/types/dist/Contacts/contacts';
|
|
1
|
+
import { IBusiness, IContact, IContactField, IContactTag } from '@trii/types/dist/Contacts/contacts';
|
|
2
2
|
import { ILabel } from '@trii/types/dist/Contacts';
|
|
3
|
+
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
3
4
|
import { UserTrii } from '@trii/types/dist/Users';
|
|
5
|
+
import type { UserInfo } from '@trii/types/dist/Users';
|
|
4
6
|
type FetchContactArgs = {
|
|
5
7
|
baseUrl: string;
|
|
6
8
|
spaceId: string;
|
|
@@ -14,6 +16,13 @@ type FetchLabelsArgs = {
|
|
|
14
16
|
};
|
|
15
17
|
export declare function fetchLabels({ baseUrl, spaceId, signal }: FetchLabelsArgs): Promise<ILabel[]>;
|
|
16
18
|
export declare function fetchContact({ baseUrl, spaceId, contactId, signal }: FetchContactArgs): Promise<IContact | IBusiness>;
|
|
19
|
+
type FetchContactFieldsArgs = {
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
spaceId: string;
|
|
22
|
+
forType: 'contact' | 'business';
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
export declare function fetchContactFields({ baseUrl, spaceId, forType, signal }: FetchContactFieldsArgs): Promise<IContactField[]>;
|
|
17
26
|
type UpdateEntityArgs = {
|
|
18
27
|
baseUrl: string;
|
|
19
28
|
spaceId: string;
|
|
@@ -25,20 +34,34 @@ type UpdateEntityArgs = {
|
|
|
25
34
|
signal?: AbortSignal;
|
|
26
35
|
};
|
|
27
36
|
export declare function updateEntity({ baseUrl, spaceId, entityType, entityId, body, signal }: UpdateEntityArgs): Promise<IContact | IBusiness>;
|
|
28
|
-
type
|
|
37
|
+
type DeleteContactAddressData = {
|
|
38
|
+
contactId: string;
|
|
39
|
+
contactAddressId: string;
|
|
40
|
+
type: ChannelType;
|
|
41
|
+
};
|
|
42
|
+
type DeleteContactAddressArgs = {
|
|
43
|
+
baseUrl: string;
|
|
44
|
+
spaceId: string;
|
|
45
|
+
data: DeleteContactAddressData;
|
|
46
|
+
signal?: AbortSignal;
|
|
47
|
+
};
|
|
48
|
+
export declare function deleteAddres({ baseUrl, spaceId, data, signal }: DeleteContactAddressArgs): Promise<unknown>;
|
|
49
|
+
type FetchUserTriiArgs = {
|
|
29
50
|
baseUrl: string;
|
|
30
51
|
spaceId: string;
|
|
31
|
-
entityType: 'contact' | 'business';
|
|
32
|
-
entityId: string;
|
|
33
52
|
signal?: AbortSignal;
|
|
34
53
|
};
|
|
35
|
-
export declare function
|
|
36
|
-
type
|
|
54
|
+
export declare function fetchUserTrii({ baseUrl, spaceId, signal }: FetchUserTriiArgs): Promise<UserTrii>;
|
|
55
|
+
type FetchUsersArgs = {
|
|
37
56
|
baseUrl: string;
|
|
38
57
|
spaceId: string;
|
|
39
58
|
signal?: AbortSignal;
|
|
40
59
|
};
|
|
41
|
-
export declare function
|
|
60
|
+
export declare function fetchUsers({ baseUrl, spaceId, signal }: FetchUsersArgs): Promise<UserInfo[]>;
|
|
61
|
+
type FetchUserTriiByIdArgs = FetchUserTriiArgs & {
|
|
62
|
+
userId: string;
|
|
63
|
+
};
|
|
64
|
+
export declare function fetchUserTriiById({ baseUrl, spaceId, signal, userId }: FetchUserTriiByIdArgs): Promise<UserTrii>;
|
|
42
65
|
type UploadAvatarArgs = {
|
|
43
66
|
baseUrl: string;
|
|
44
67
|
spaceId: string;
|
package/dist/cjs/types/components/EditContactModal/shared/BusinessInfoLabel/BusinessInfoLabel.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UserInfo } from '@trii/types/dist/Users';
|
|
2
|
+
type Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
value?: string | Date;
|
|
5
|
+
isNotEditable?: boolean;
|
|
6
|
+
inputType?: 'text' | 'select' | 'selectMembers';
|
|
7
|
+
options?: UserInfo[];
|
|
8
|
+
displayValue?: string;
|
|
9
|
+
constructUpdateObject?: (value: string | Date) => object;
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
spaceId?: string;
|
|
12
|
+
businessId?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const BusinessInfoLabel: ({ title, value, isNotEditable, inputType, options, displayValue, constructUpdateObject, baseUrl, spaceId, businessId, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default BusinessInfoLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './BusinessInfoLabel';
|
package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/ContactInfoLabel.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { UserInfo } from '@trii/types/dist/Users';
|
|
2
|
+
import type { IList } from '@trii/types/dist/Contacts';
|
|
3
|
+
import type UseEditContact from '../../hooks/useEditContact/types/UseEditContact';
|
|
4
|
+
type BaseProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
value?: string | Date;
|
|
7
|
+
isNotEditable?: boolean;
|
|
8
|
+
options?: UserInfo[] | IList[];
|
|
9
|
+
displayValue?: string;
|
|
10
|
+
constructUpdateObject?: (value: string | Date | null) => object;
|
|
11
|
+
businessId?: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
spaceId?: string;
|
|
14
|
+
contactId?: string;
|
|
15
|
+
t: (key: string) => string;
|
|
16
|
+
};
|
|
17
|
+
type BirthdayProps = BaseProps & {
|
|
18
|
+
inputType: 'birthday';
|
|
19
|
+
contact: UseEditContact;
|
|
20
|
+
dateFormat: string;
|
|
21
|
+
};
|
|
22
|
+
type NonBirthdayProps = BaseProps & {
|
|
23
|
+
inputType?: 'text' | 'select' | 'selectBusiness';
|
|
24
|
+
contact?: UseEditContact;
|
|
25
|
+
dateFormat?: string;
|
|
26
|
+
};
|
|
27
|
+
type Props = BirthdayProps | NonBirthdayProps;
|
|
28
|
+
declare const ContactInfoLabel: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default ContactInfoLabel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import UseEditContact from 'features/Views/ContactEdit/hooks/useEditContact/types/UseEditContact';
|
|
2
|
+
interface Props {
|
|
3
|
+
contact?: UseEditContact;
|
|
4
|
+
}
|
|
5
|
+
declare const BusinessSelect: ({ contact }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default BusinessSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './BusinessSearchBar';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UIEvent } from 'react';
|
|
2
|
+
import { IBusiness, IContactInfo } from '@trii/types/dist/Contacts';
|
|
3
|
+
interface Props {
|
|
4
|
+
handleScroll: (e: UIEvent<HTMLElement>) => void;
|
|
5
|
+
businessList: IBusiness[];
|
|
6
|
+
handleSelectBusiness: (business: IContactInfo) => void;
|
|
7
|
+
businessSelectedId: string;
|
|
8
|
+
search: string;
|
|
9
|
+
onCreateNew: () => void;
|
|
10
|
+
hasSearched: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const BusinessSearchResults: ({ handleScroll, businessList, handleSelectBusiness, businessSelectedId, search, onCreateNew, hasSearched, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default BusinessSearchResults;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './BusinessSearchResults';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './BusinessSelect';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
interface DateSelectProps {
|
|
3
|
+
birthDate: Dayjs | null;
|
|
4
|
+
setBirthDate: (date: Dayjs | null) => void;
|
|
5
|
+
dateFormat: string;
|
|
6
|
+
}
|
|
7
|
+
declare const DateSelect: ({ birthDate, setBirthDate, dateFormat }: DateSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default DateSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DateSelect';
|
package/dist/cjs/types/components/EditContactModal/shared/ContactInfoLabel/components/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DateSelect } from './DateSelect';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContactInfoLabel';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IContactField } from '@trii/types/dist/Contacts/contacts';
|
|
2
|
+
import { Property } from '@trii/types/dist/Contacts';
|
|
3
|
+
import type { UserTrii } from '@trii/types/dist/Users';
|
|
4
|
+
import type UseEditContact from '../../hooks/useEditContact/types/UseEditContact';
|
|
5
|
+
import type UseEditBusiness from '../../hooks/useEditBusiness/types/UseEditBusiness';
|
|
6
|
+
type Props = {
|
|
7
|
+
property: Property;
|
|
8
|
+
entity: UseEditContact | UseEditBusiness;
|
|
9
|
+
entityType: 'contact' | 'business';
|
|
10
|
+
entityId: string;
|
|
11
|
+
customContactFields: IContactField[];
|
|
12
|
+
userTrii?: UserTrii | null;
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
spaceId?: string;
|
|
15
|
+
t: (key: string) => string;
|
|
16
|
+
};
|
|
17
|
+
declare const EntityCustomFieldLabel: ({ property, entity, entityType, entityId, customContactFields, userTrii, baseUrl, spaceId, t, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default EntityCustomFieldLabel;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: Dayjs | null;
|
|
4
|
+
handleChange: (value: Dayjs | null) => void;
|
|
5
|
+
dateFormat: string;
|
|
6
|
+
};
|
|
7
|
+
declare const CustomPropertyDatePicker: ({ value, handleChange, dateFormat }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CustomPropertyDatePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CustomPropertyDatePicker';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { DateRange } from '@mui/x-date-pickers-pro';
|
|
3
|
+
type Props = {
|
|
4
|
+
value: DateRange<Dayjs> | null;
|
|
5
|
+
handleChange: (newValue: DateRange<Dayjs>) => void;
|
|
6
|
+
userDateFormat?: string;
|
|
7
|
+
t: (key: string) => string;
|
|
8
|
+
};
|
|
9
|
+
declare const CustomPropertyDateRangePicker: ({ value, handleChange, userDateFormat, t }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default CustomPropertyDateRangePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CustomPropertyDateRangePicker';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Property } from '@trii/types/dist/Contacts';
|
|
2
|
+
type CustomPropertyInputProps = Property & {
|
|
3
|
+
onChange: (name: string, value: any) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const CustomPropertyInput: ({ nameKey, value, onChange, type, }: CustomPropertyInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default CustomPropertyInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CustomPropertyInput';
|