@trii/components 2.0.31 → 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.
@@ -7,7 +7,6 @@ import type { UseMultipleSelectReturnType } from '../../useMultipleSelect';
7
7
  import type { ILabel } from '@trii/types/dist/Contacts';
8
8
  import type { ChannelType } from '@trii/types/dist/Common/Channels';
9
9
  import type { Dayjs } from 'dayjs';
10
- import type { SimplifiedBusiness } from '../../../shared/ContactInfoLabel/components/BusinessSelect/types';
11
10
  type UseEditContact = {
12
11
  field: {
13
12
  imsMercadolibre: IContactAddress[];
@@ -35,7 +34,6 @@ type UseEditContact = {
35
34
  secondaryCountry: UseFieldType;
36
35
  customProperties: Property[];
37
36
  labelMultipleSelect: UseMultipleSelectReturnType<ILabel[]>;
38
- selectedBusiness: SimplifiedBusiness[];
39
37
  };
40
38
  action: {
41
39
  setCustomProperties: (customProperties: Property[]) => void;
@@ -50,7 +48,6 @@ type UseEditContact = {
50
48
  replaceAddress: (addressId: string, newAddress: IContactAddress) => void;
51
49
  addWhatsappVerified: (newAddress: IContactAddress) => void;
52
50
  setBirthDate: (date: Dayjs | null) => void;
53
- setSelectedBusiness: (business: SimplifiedBusiness[]) => void;
54
51
  resetToInitialContactInformation: () => void;
55
52
  resetSelectedBusiness: () => void;
56
53
  resetBirthDate: () => void;
@@ -1,2 +1 @@
1
- export { default as BusinessSelect } from './BusinessSelect';
2
1
  export { default as DateSelect } from './DateSelect';
package/dist/esm/index.js CHANGED
@@ -4,12 +4,6 @@ import { styled as styled$4, Box as Box$2, IconButton as IconButton$2, Avatar, T
4
4
  import { withEmotionCache, ThemeContext, CacheProvider, Global, css, keyframes } from '@emotion/react';
5
5
  import * as ReactDOM from 'react-dom';
6
6
  import ReactDOM__default from 'react-dom';
7
- import 'react-i18next';
8
- import 'features/Views/BusinessCreate/hooks/useCreateBusiness/useCreateBusiness';
9
- import 'react-redux';
10
- import 'hooks/useAppDispatch';
11
- import 'ReduxToolkit/features/businessSlice/businessSlice';
12
- import 'ReduxToolkit/features/contactsSlice/contactsSlice';
13
7
 
14
8
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
15
9
 
@@ -25838,7 +25832,7 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
25838
25832
  const apiDispatch = async (maybePromise) => maybePromise;
25839
25833
  const { getEditedField } = editContactHelper;
25840
25834
  const [customProperties, setCustomProperties] = useState([]);
25841
- const [selectedBusiness, setSelectedBusiness] = useState([]);
25835
+ // const [selectedBusiness, setSelectedBusiness] = useState<SimplifiedBusiness[]>([]);
25842
25836
  const contactFirstname = useField$1('text', contact?.firstName || '');
25843
25837
  const contactLastname = useField$1('text', contact?.lastName || '');
25844
25838
  const contactImage = useImage({
@@ -25917,8 +25911,8 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
25917
25911
  ? contactImage.removeParams(contactImage.imageUrl)
25918
25912
  : null,
25919
25913
  properties: customProperties,
25920
- businessId: selectedBusiness[0]?.businessId || '',
25921
- businessName: selectedBusiness[0]?.businessName || '',
25914
+ // businessId: selectedBusiness[0]?.businessId || '',
25915
+ // businessName: selectedBusiness[0]?.businessName || '',
25922
25916
  birthDate: birthDate?.toDate(),
25923
25917
  };
25924
25918
  return editedContact;
@@ -25928,12 +25922,12 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
25928
25922
  if (!contact)
25929
25923
  return;
25930
25924
  if (!contact.businessId || !contact.businessName) {
25931
- setSelectedBusiness([]);
25925
+ // setSelectedBusiness([]);
25932
25926
  return;
25933
25927
  }
25934
- setSelectedBusiness([
25935
- { businessId: contact.businessId, businessName: contact.businessName },
25936
- ]);
25928
+ // setSelectedBusiness([
25929
+ // { businessId: contact.businessId, businessName: contact.businessName },
25930
+ // ]);
25937
25931
  }
25938
25932
  function resetBirthDate() {
25939
25933
  setBirthDate(contact?.birthDate ? dayjs(contact.birthDate) : null);
@@ -25987,14 +25981,7 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
25987
25981
  if (contact?.tags) {
25988
25982
  labelMultipleSelect.actions.setValue(contact.tags);
25989
25983
  }
25990
- if (contact?.businessId && contact.businessName) {
25991
- setSelectedBusiness([
25992
- { businessId: contact.businessId, businessName: contact.businessName },
25993
- ]);
25994
- }
25995
- else {
25996
- setSelectedBusiness([]);
25997
- }
25984
+ if (contact?.businessId && contact.businessName) ;
25998
25985
  }, [contact]);
25999
25986
  return {
26000
25987
  field: {
@@ -26023,7 +26010,7 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
26023
26010
  secondaryCountry,
26024
26011
  customProperties,
26025
26012
  labelMultipleSelect,
26026
- selectedBusiness,
26013
+ // selectedBusiness,
26027
26014
  },
26028
26015
  action: {
26029
26016
  setBirthDate,
@@ -26037,7 +26024,7 @@ const useEditContact = ({ contact, customContactFields, baseUrl, spaceId }) => {
26037
26024
  addWhatsapp,
26038
26025
  addRCS,
26039
26026
  replaceAddress,
26040
- setSelectedBusiness,
26027
+ // setSelectedBusiness,
26041
26028
  addWhatsappVerified,
26042
26029
  resetToInitialContactInformation,
26043
26030
  resetSelectedBusiness,
@@ -26060,13 +26047,6 @@ const resolveUserLabel = ({ userId, users, currentUser, }) => {
26060
26047
  return fromUsers?.name?.trim() || fromUsers?.email || null;
26061
26048
  };
26062
26049
 
26063
- styled$4('div')({
26064
- display: 'flex',
26065
- alignItems: 'center',
26066
- justifyContent: 'space-around',
26067
- padding: '16px',
26068
- });
26069
-
26070
26050
  var weekOfYear = {exports: {}};
26071
26051
 
26072
26052
  (function (module, exports) {