@trii/components 2.0.53 → 2.0.55

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 (220) hide show
  1. package/dist/cjs/index.js +16 -58435
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/esm/index.js +16 -58413
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.d.ts +3 -0
  6. package/dist/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +14 -0
  7. package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +9 -0
  8. package/dist/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +7 -0
  9. package/dist/types/components/ContactInfoPopup/components/BusinessSection/index.d.ts +1 -0
  10. package/dist/types/components/ContactInfoPopup/components/ContactMethod/ContactMethod.d.ts +10 -0
  11. package/dist/types/components/ContactInfoPopup/components/ContactMethod/index.d.ts +1 -0
  12. package/dist/types/components/ContactInfoPopup/components/Header/Header.d.ts +12 -0
  13. package/dist/types/components/ContactInfoPopup/components/Header/index.d.ts +1 -0
  14. package/dist/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +7 -0
  15. package/dist/types/components/ContactInfoPopup/components/LabelsSection/index.d.ts +1 -0
  16. package/dist/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +8 -0
  17. package/dist/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/MemberItem.d.ts +7 -0
  18. package/dist/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/index.d.ts +1 -0
  19. package/dist/types/components/ContactInfoPopup/components/MembersSection/components/index.d.ts +1 -0
  20. package/dist/types/components/ContactInfoPopup/components/MembersSection/index.d.ts +1 -0
  21. package/dist/types/components/ContactInfoPopup/components/Properties/Properties.d.ts +7 -0
  22. package/dist/types/components/ContactInfoPopup/components/Properties/index.d.ts +1 -0
  23. package/dist/types/components/ContactInfoPopup/components/index.d.ts +6 -0
  24. package/dist/types/components/ContactInfoPopup/index.d.ts +1 -0
  25. package/dist/types/components/ContactInfoPopup/types/is-business.typeguard.d.ts +7 -0
  26. package/dist/types/components/ContactInfoPopup/types/is-contact.typeguard.d.ts +7 -0
  27. package/dist/types/components/EditContactModal/EditContactModal.d.ts +16 -0
  28. package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +9 -0
  29. package/dist/types/components/EditContactModal/components/BusinessSelect/BusinessSelectEditor.d.ts +16 -0
  30. package/dist/types/components/EditContactModal/components/Header/Header.d.ts +23 -0
  31. package/dist/types/components/EditContactModal/components/Header/components/AvatarWithActions/AvatarWithActions.d.ts +11 -0
  32. package/dist/types/components/EditContactModal/components/Header/components/ContactName/ContactName.d.ts +12 -0
  33. package/dist/types/components/EditContactModal/components/Header/components/Tags/Tags.d.ts +7 -0
  34. package/dist/types/components/EditContactModal/components/Header/components/Tags/index.d.ts +1 -0
  35. package/dist/types/components/EditContactModal/components/Header/components/index.d.ts +2 -0
  36. package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +10 -0
  37. package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationInput.d.ts +22 -0
  38. package/dist/types/components/EditContactModal/components/SearchLocation/googleMapsUtils.d.ts +7 -0
  39. package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +11 -0
  40. package/dist/types/components/EditContactModal/components/Section/AddressInformation/index.d.ts +1 -0
  41. package/dist/types/components/EditContactModal/components/Section/ContactInformation/ContactInformation.d.ts +7 -0
  42. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +11 -0
  43. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/ContactMethodItem/ContactMethodItem.d.ts +8 -0
  44. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/ContactMethodItem/index.d.ts +1 -0
  45. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/ContactMethodPhoneItem/ContactMethodPhoneItem.d.ts +6 -0
  46. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/ContactMethodPhoneItem/index.d.ts +1 -0
  47. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/ContactMethodPhoneItem/utils/phone.d.ts +5 -0
  48. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/components/index.d.ts +2 -0
  49. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/index.d.ts +1 -0
  50. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/EditModal.d.ts +8 -0
  51. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/Mails.d.ts +8 -0
  52. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/Body.d.ts +7 -0
  53. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/components/Mail/Mail.d.ts +7 -0
  54. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/components/Mail/index.d.ts +1 -0
  55. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/components/Mail/style.d.ts +19 -0
  56. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/components/index.d.ts +1 -0
  57. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/Body/index.d.ts +1 -0
  58. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/components/index.d.ts +1 -0
  59. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Mails/index.d.ts +1 -0
  60. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/Phones.d.ts +8 -0
  61. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/Body.d.ts +7 -0
  62. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/Phone.d.ts +7 -0
  63. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/CountrySelect/CountrySelect.d.ts +2 -0
  64. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/CountrySelect/index.d.ts +1 -0
  65. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/CountrySelect/style.d.ts +7 -0
  66. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/CountrySelect/utils/countryList.d.ts +5 -0
  67. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/OptionsMenu/OptionsMenu.d.ts +17 -0
  68. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/OptionsMenu/index.d.ts +1 -0
  69. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/WhatsAppToggle/WhatsAppToggle.d.ts +2 -0
  70. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/WhatsAppToggle/index.d.ts +1 -0
  71. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/WhatsAppToggle/style.d.ts +8 -0
  72. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/index.d.ts +3 -0
  73. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/index.d.ts +1 -0
  74. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/style.d.ts +15 -0
  75. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/index.d.ts +1 -0
  76. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/index.d.ts +1 -0
  77. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/index.d.ts +1 -0
  78. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/index.d.ts +1 -0
  79. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/RCSs.d.ts +8 -0
  80. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/Body.d.ts +7 -0
  81. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/components/RCS/RCS.d.ts +7 -0
  82. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/components/RCS/index.d.ts +1 -0
  83. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/components/RCS/style.d.ts +19 -0
  84. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/components/index.d.ts +1 -0
  85. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/Body/index.d.ts +1 -0
  86. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/components/index.d.ts +1 -0
  87. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/RCSs/index.d.ts +1 -0
  88. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/Whatsapps.d.ts +8 -0
  89. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/Body.d.ts +7 -0
  90. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/components/Whatsapp/Whatsapp.d.ts +7 -0
  91. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/components/Whatsapp/index.d.ts +1 -0
  92. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/components/Whatsapp/style.d.ts +19 -0
  93. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/components/index.d.ts +1 -0
  94. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/Body/index.d.ts +1 -0
  95. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/components/index.d.ts +1 -0
  96. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Whatsapps/index.d.ts +1 -0
  97. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/index.d.ts +4 -0
  98. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/index.d.ts +1 -0
  99. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/AddressInput/AddressInput.d.ts +13 -0
  100. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/AddressInput/index.d.ts +1 -0
  101. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/AddressInput/style.d.ts +3 -0
  102. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/InformationSocialNetworkItem.d.ts +11 -0
  103. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/Body.d.ts +10 -0
  104. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/components/Ims/Ims.d.ts +10 -0
  105. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/components/Ims/index.d.ts +1 -0
  106. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/components/Ims/style.d.ts +7 -0
  107. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/components/index.d.ts +1 -0
  108. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/index.d.ts +1 -0
  109. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/index.d.ts +1 -0
  110. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/index.d.ts +1 -0
  111. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/types/IMS.d.ts +2 -0
  112. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/PhoneInput/PhoneInput.d.ts +13 -0
  113. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/PhoneInput/index.d.ts +1 -0
  114. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/PhoneInput/style.d.ts +3 -0
  115. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeader/SubsectionHeader.d.ts +5 -0
  116. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeader/index.d.ts +1 -0
  117. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeaderWithButton/SubsectionHeaderWithButton.d.ts +6 -0
  118. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeaderWithButton/index.d.ts +1 -0
  119. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/SubsectionHeaderWithButton/style.d.ts +8 -0
  120. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/WarningsDisplay.d.ts +5 -0
  121. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/Warning.d.ts +5 -0
  122. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/index.d.ts +1 -0
  123. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/style.d.ts +15 -0
  124. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/index.d.ts +1 -0
  125. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/index.d.ts +1 -0
  126. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/style.d.ts +6 -0
  127. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/index.d.ts +10 -0
  128. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/InformationItemContainer.d.ts +6 -0
  129. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/index.d.ts +1 -0
  130. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +12 -0
  131. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/InformationItemInputsContainer.d.ts +6 -0
  132. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/index.d.ts +1 -0
  133. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +8 -0
  134. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/NoteDeleteButton.d.ts +18 -0
  135. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/index.d.ts +1 -0
  136. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +13 -0
  137. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/StatusAdornment.d.ts +7 -0
  138. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/components/Adornment/Adornment.d.ts +5 -0
  139. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/components/Adornment/index.d.ts +1 -0
  140. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/components/index.d.ts +1 -0
  141. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/index.d.ts +1 -0
  142. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/SubsectionBodyContainer.d.ts +7 -0
  143. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/index.d.ts +1 -0
  144. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +14 -0
  145. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/index.d.ts +5 -0
  146. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/types/CheckContactAddressData.d.ts +5 -0
  147. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/types/ContactAddress.d.ts +2 -0
  148. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/index.d.ts +2 -0
  149. package/dist/types/components/EditContactModal/components/Section/ContactInformation/hooks/useEditModal.d.ts +8 -0
  150. package/dist/types/components/EditContactModal/components/Section/ContactInformation/index.d.ts +1 -0
  151. package/dist/types/components/EditContactModal/components/Section/General/General.d.ts +14 -0
  152. package/dist/types/components/EditContactModal/components/Section/General/components/BusinessGeneral.d.ts +8 -0
  153. package/dist/types/components/EditContactModal/components/Section/General/components/ContactGeneral.d.ts +8 -0
  154. package/dist/types/components/EditContactModal/components/Section/General/index.d.ts +1 -0
  155. package/dist/types/components/EditContactModal/components/Section/index.d.ts +3 -0
  156. package/dist/types/components/EditContactModal/components/Section/utils/resolveUserLabel.d.ts +6 -0
  157. package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +14 -0
  158. package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +191 -0
  159. package/dist/types/components/EditContactModal/context/EditContactViewContext.d.ts +8 -0
  160. package/dist/types/components/EditContactModal/context/EditEntityContext.d.ts +34 -0
  161. package/dist/types/components/EditContactModal/context/NavigateContext.d.ts +9 -0
  162. package/dist/types/components/EditContactModal/context/TranslationContext.d.ts +9 -0
  163. package/dist/types/components/EditContactModal/hooks/useEditBusiness/types/UseEditBusiness.d.ts +55 -0
  164. package/dist/types/components/EditContactModal/hooks/useEditBusiness/useEditBusiness.d.ts +10 -0
  165. package/dist/types/components/EditContactModal/hooks/useEditContact/types/UseEditContact.d.ts +60 -0
  166. package/dist/types/components/EditContactModal/hooks/useEditContact/useEditContact.d.ts +10 -0
  167. package/dist/types/components/EditContactModal/hooks/useEditContactMethods.d.ts +52 -0
  168. package/dist/types/components/EditContactModal/hooks/useEditContactModalController.d.ts +44 -0
  169. package/dist/types/components/EditContactModal/hooks/useEntityUpdateSync.d.ts +8 -0
  170. package/dist/types/components/EditContactModal/hooks/useField.d.ts +18 -0
  171. package/dist/types/components/EditContactModal/hooks/useImage.d.ts +27 -0
  172. package/dist/types/components/EditContactModal/hooks/useModalCloseHandler.d.ts +6 -0
  173. package/dist/types/components/EditContactModal/hooks/useMultipleSelect.d.ts +20 -0
  174. package/dist/types/components/EditContactModal/hooks/useSelect.d.ts +13 -0
  175. package/dist/types/components/EditContactModal/hooks/useTagsEditorController.d.ts +26 -0
  176. package/dist/types/components/EditContactModal/hooks/utils/editContactHelper.d.ts +6 -0
  177. package/dist/types/components/EditContactModal/index.d.ts +1 -0
  178. package/dist/types/components/EditContactModal/layout/Section.d.ts +9 -0
  179. package/dist/types/components/EditContactModal/layout/SectionContent.d.ts +7 -0
  180. package/dist/types/components/EditContactModal/layout/index.d.ts +2 -0
  181. package/dist/types/components/EditContactModal/services/api.d.ts +188 -0
  182. package/dist/types/components/EditContactModal/services/http.d.ts +23 -0
  183. package/dist/types/components/EditContactModal/services/urls.d.ts +6 -0
  184. package/dist/types/components/EditContactModal/shared/BusinessInfoLabel/BusinessInfoLabel.d.ts +16 -0
  185. package/dist/types/components/EditContactModal/shared/BusinessInfoLabel/index.d.ts +1 -0
  186. package/dist/types/components/EditContactModal/shared/ContactInfoLabel/ContactInfoLabel.d.ts +29 -0
  187. package/dist/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/DateSelect.d.ts +8 -0
  188. package/dist/types/components/EditContactModal/shared/ContactInfoLabel/components/DateSelect/index.d.ts +1 -0
  189. package/dist/types/components/EditContactModal/shared/ContactInfoLabel/components/index.d.ts +1 -0
  190. package/dist/types/components/EditContactModal/shared/ContactInfoLabel/index.d.ts +1 -0
  191. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/EntityCustomFieldLabel.d.ts +18 -0
  192. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/CustomPropertyDatePicker.d.ts +8 -0
  193. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDatePicker/index.d.ts +1 -0
  194. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/CustomPropertyDateRangePicker.d.ts +9 -0
  195. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyDateRangePicker/index.d.ts +1 -0
  196. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/CustomPropertyInput.d.ts +6 -0
  197. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/index.d.ts +1 -0
  198. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyInput/types/CustomPropertyInputProps.d.ts +6 -0
  199. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/CustomPropertyOptionsSelect.d.ts +7 -0
  200. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyOptionSelect/index.d.ts +1 -0
  201. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/CustomPropertyTimePicker.d.ts +8 -0
  202. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimePicker/index.d.ts +1 -0
  203. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/CustomPropertyTimeRangePicker.d.ts +9 -0
  204. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/CustomPropertyTimeRangePicker/index.d.ts +1 -0
  205. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/components/index.d.ts +6 -0
  206. package/dist/types/components/EditContactModal/shared/EntityCustomFieldLabel/index.d.ts +1 -0
  207. package/dist/types/components/EditContactModal/shared/EntityInfoLabel/EntityInfoLabel.d.ts +40 -0
  208. package/dist/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/SelectBusinessLabel.d.ts +7 -0
  209. package/dist/types/components/EditContactModal/shared/EntityInfoLabel/components/SelectBusinessLabel/index.d.ts +1 -0
  210. package/dist/types/components/EditContactModal/shared/EntityInfoLabel/components/index.d.ts +1 -0
  211. package/dist/types/components/EditContactModal/shared/EntityInfoLabel/index.d.ts +1 -0
  212. package/dist/types/components/EditContactModal/shared/index.d.ts +3 -0
  213. package/dist/types/components/EditContactModal/types/is-business.typeguard.d.ts +7 -0
  214. package/dist/types/components/EditContactModal/types/is-contact.typeguard.d.ts +7 -0
  215. package/dist/types/components/EditContactModal/utils/contactHelper.d.ts +13 -0
  216. package/dist/types/components/index.d.ts +2 -0
  217. package/dist/types/i18n/config.d.ts +2 -0
  218. package/dist/types/i18n/index.d.ts +2 -0
  219. package/dist/types/index.d.ts +2 -0
  220. package/package.json +15 -9
@@ -0,0 +1,188 @@
1
+ import { IBusiness, IContact, IContactField, IContactTag, IContactAddress } from '@trii/types/dist/Contacts/contacts';
2
+ import { ILabel } from '@trii/types/dist/Contacts';
3
+ import { ChannelType } from '@trii/types/dist/Common/Channels';
4
+ import { UserTrii } from '@trii/types/dist/Users';
5
+ import type { UserInfo } from '@trii/types/dist/Users';
6
+ type ApiContext = {
7
+ baseUrl: string;
8
+ spaceId: string;
9
+ };
10
+ type WithSignal = {
11
+ signal?: AbortSignal;
12
+ };
13
+ type ApiArgs = ApiContext & WithSignal;
14
+ export type Order = 'ASC' | 'DESC';
15
+ export type Filter = {
16
+ column: string;
17
+ condition: string;
18
+ value: string;
19
+ };
20
+ export type TableItemFormat = 'IContact' | 'IBusiness' | 'IContactInfo';
21
+ export type PaginationFolder = 'Main' | 'Trash' | 'MyContacts';
22
+ export type Pagination = {
23
+ total: number;
24
+ lastPage: number;
25
+ currentPage: number;
26
+ perPage: number;
27
+ order: Order;
28
+ orderColumn: string;
29
+ filter: Filter[];
30
+ format: TableItemFormat;
31
+ folder?: PaginationFolder;
32
+ };
33
+ export type PaginationInfo = {
34
+ total: number;
35
+ lastPage: number;
36
+ currentPage: number;
37
+ perPage: number;
38
+ cantPageElements: number;
39
+ };
40
+ export type BusinessTableData = {
41
+ contactos: IBusiness[];
42
+ contactosIds: unknown[];
43
+ paginacion: PaginationInfo;
44
+ };
45
+ type FetchContactArgs = ApiArgs & {
46
+ contactId: string;
47
+ };
48
+ type FetchLabelsArgs = ApiArgs;
49
+ type CreateLabelArgs = ApiArgs & {
50
+ name: string;
51
+ };
52
+ export declare function fetchLabels({ baseUrl, spaceId, signal }: FetchLabelsArgs): Promise<ILabel[]>;
53
+ export declare function createLabel({ baseUrl, spaceId, name, signal }: CreateLabelArgs): Promise<ILabel>;
54
+ export declare function fetchContact({ baseUrl, spaceId, contactId, signal }: FetchContactArgs): Promise<IContact | IBusiness>;
55
+ type FetchContactFieldsArgs = ApiArgs & {
56
+ forType: 'contact' | 'business';
57
+ };
58
+ export declare function fetchContactFields({ baseUrl, spaceId, forType, signal, }: FetchContactFieldsArgs): Promise<IContactField[]>;
59
+ type UpdateEntityArgs = ApiArgs & {
60
+ entityType: 'contact' | 'business';
61
+ entityId: string;
62
+ body: Partial<IContact> | Partial<IBusiness> | {
63
+ tags: IContactTag[];
64
+ };
65
+ };
66
+ export declare function updateEntity({ baseUrl, spaceId, entityType, entityId, body, signal, }: UpdateEntityArgs): Promise<IContact | IBusiness>;
67
+ type FetchBusinessTableDataArgs = ApiArgs & {
68
+ pagination: Pagination;
69
+ };
70
+ export declare function fetchBusinessTableData({ baseUrl, spaceId, pagination, signal, }: FetchBusinessTableDataArgs): Promise<BusinessTableData>;
71
+ type CreateBusinessArgs = ApiArgs & {
72
+ business: Record<string, unknown>;
73
+ };
74
+ export declare function createBusiness({ baseUrl, spaceId, business, signal }: CreateBusinessArgs): Promise<IBusiness>;
75
+ type DeleteContactAddressData = {
76
+ contactId: string;
77
+ contactAddressId: string;
78
+ type: ChannelType;
79
+ };
80
+ type CheckContactAddressData = {
81
+ address: string;
82
+ type: ChannelType;
83
+ };
84
+ type ResultContactAddressCheck = {
85
+ success: boolean;
86
+ warnings: string[];
87
+ };
88
+ type DeleteContactAddressArgs = ApiArgs & {
89
+ data: DeleteContactAddressData;
90
+ };
91
+ type CheckContactAddressArgs = ApiArgs & {
92
+ data: CheckContactAddressData;
93
+ };
94
+ export type SetContactAddressRequestData = {
95
+ address: string;
96
+ type: ChannelType;
97
+ contactId: string;
98
+ };
99
+ export type UpdateContactAddressData = {
100
+ contactId: string;
101
+ contactAddressId: string;
102
+ note?: string;
103
+ isFavorite?: boolean;
104
+ };
105
+ type SetContactAddressArgs = ApiArgs & {
106
+ data: SetContactAddressRequestData;
107
+ };
108
+ type UpdateContactAddressArgs = ApiArgs & {
109
+ data: UpdateContactAddressData;
110
+ };
111
+ export declare function deleteAddress({ baseUrl, spaceId, data, signal }: DeleteContactAddressArgs): Promise<unknown>;
112
+ export declare function checkContactAddress({ baseUrl, spaceId, data, signal, }: CheckContactAddressArgs): Promise<ResultContactAddressCheck>;
113
+ export declare function setContactAddress({ baseUrl, spaceId, data, signal }: SetContactAddressArgs): Promise<IContactAddress>;
114
+ export declare function updateContactAddress({ baseUrl, spaceId, data, signal, }: UpdateContactAddressArgs): Promise<IContactAddress>;
115
+ type FetchUserTriiArgs = ApiArgs;
116
+ export declare function fetchUserTrii({ baseUrl, spaceId, signal }: FetchUserTriiArgs): Promise<UserTrii>;
117
+ type FetchUsersArgs = ApiArgs;
118
+ export declare function fetchUsers({ baseUrl, spaceId, signal }: FetchUsersArgs): Promise<UserInfo[]>;
119
+ type FetchUserTriiByIdArgs = ApiArgs & {
120
+ userId: string;
121
+ };
122
+ export declare function fetchUserTriiById({ baseUrl, spaceId, signal, userId, }: FetchUserTriiByIdArgs): Promise<UserTrii>;
123
+ type UploadAvatarArgs = ApiArgs & {
124
+ contactId: string;
125
+ file: File;
126
+ };
127
+ export declare function uploadAvatar({ baseUrl, spaceId, contactId, file, signal, }: UploadAvatarArgs): Promise<string>;
128
+ type FetchContactBoundArgs = WithSignal & {
129
+ contactId: string;
130
+ };
131
+ type FetchContactFieldsBoundArgs = WithSignal & {
132
+ forType: 'contact' | 'business';
133
+ };
134
+ type CreateLabelBoundArgs = WithSignal & {
135
+ name: string;
136
+ };
137
+ type UpdateEntityBoundArgs = WithSignal & {
138
+ entityType: 'contact' | 'business';
139
+ entityId: string;
140
+ body: Partial<IContact> | Partial<IBusiness> | {
141
+ tags: IContactTag[];
142
+ };
143
+ };
144
+ type FetchBusinessTableDataBoundArgs = WithSignal & {
145
+ pagination: Pagination;
146
+ };
147
+ type CreateBusinessBoundArgs = WithSignal & {
148
+ business: Record<string, unknown>;
149
+ };
150
+ type DeleteContactAddressBoundArgs = WithSignal & {
151
+ data: DeleteContactAddressData;
152
+ };
153
+ type CheckContactAddressBoundArgs = WithSignal & {
154
+ data: CheckContactAddressData;
155
+ };
156
+ type FetchUserTriiByIdBoundArgs = WithSignal & {
157
+ userId: string;
158
+ };
159
+ type UploadAvatarBoundArgs = WithSignal & {
160
+ contactId: string;
161
+ file: File;
162
+ };
163
+ type SetContactAddressBoundArgs = WithSignal & {
164
+ data: SetContactAddressRequestData;
165
+ };
166
+ type UpdateContactAddressBoundArgs = WithSignal & {
167
+ data: UpdateContactAddressData;
168
+ };
169
+ export declare const createEditContactApi: (baseUrl: string, spaceId: string) => {
170
+ fetchLabels: ({ signal }?: WithSignal) => Promise<ILabel[]>;
171
+ createLabel: ({ name, signal }: CreateLabelBoundArgs) => Promise<ILabel>;
172
+ fetchContact: ({ contactId, signal }: FetchContactBoundArgs) => Promise<IContact | IBusiness>;
173
+ fetchBusinessTableData: ({ pagination, signal }: FetchBusinessTableDataBoundArgs) => Promise<BusinessTableData>;
174
+ createBusiness: ({ business, signal }: CreateBusinessBoundArgs) => Promise<IBusiness>;
175
+ fetchContactFields: ({ forType, signal }: FetchContactFieldsBoundArgs) => Promise<IContactField[]>;
176
+ updateEntity: ({ entityType, entityId, body, signal }: UpdateEntityBoundArgs) => Promise<IContact | IBusiness>;
177
+ deleteAddress: ({ data, signal }: DeleteContactAddressBoundArgs) => Promise<unknown>;
178
+ deleteAddres: ({ data, signal }: DeleteContactAddressBoundArgs) => Promise<unknown>;
179
+ checkContactAddress: ({ data, signal }: CheckContactAddressBoundArgs) => Promise<ResultContactAddressCheck>;
180
+ setContactAddress: ({ data, signal }: SetContactAddressBoundArgs) => Promise<IContactAddress>;
181
+ updateContactAddress: ({ data, signal }: UpdateContactAddressBoundArgs) => Promise<IContactAddress>;
182
+ fetchUserTrii: ({ signal }?: WithSignal) => Promise<UserTrii>;
183
+ fetchUsers: ({ signal }?: WithSignal) => Promise<UserInfo[]>;
184
+ fetchUserTriiById: ({ userId, signal }: FetchUserTriiByIdBoundArgs) => Promise<UserTrii>;
185
+ uploadAvatar: ({ contactId, file, signal }: UploadAvatarBoundArgs) => Promise<string>;
186
+ };
187
+ export type EditContactApi = ReturnType<typeof createEditContactApi>;
188
+ export {};
@@ -0,0 +1,23 @@
1
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
2
+ export declare class ApiError extends Error {
3
+ status: number;
4
+ body: unknown;
5
+ constructor(message: string, status: number, body: unknown);
6
+ }
7
+ type RequestJsonArgs = {
8
+ url: string;
9
+ method?: HttpMethod;
10
+ headers?: HeadersInit;
11
+ body?: unknown;
12
+ signal?: AbortSignal;
13
+ };
14
+ export declare function requestJson<T>({ url, method, headers, body, signal, }: RequestJsonArgs): Promise<T>;
15
+ type RequestFormDataArgs = {
16
+ url: string;
17
+ method?: HttpMethod;
18
+ headers?: HeadersInit;
19
+ formData: FormData;
20
+ signal?: AbortSignal;
21
+ };
22
+ export declare function requestFormData<T>({ url, method, headers, formData, signal, }: RequestFormDataArgs): Promise<T>;
23
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function joinUrl(baseUrl: string, path: string): string;
2
+ export declare function getApiUrls(baseUrl: string, spaceId: string): {
3
+ CONTACTS: string;
4
+ MEDIA: string;
5
+ SETTINGS: string;
6
+ };
@@ -0,0 +1,16 @@
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
+ onEntityUpdated?: (entity: unknown) => void;
14
+ };
15
+ declare const BusinessInfoLabel: ({ title, value, isNotEditable, inputType, options, displayValue, constructUpdateObject, baseUrl, spaceId, businessId, onEntityUpdated, }: Props) => import("react/jsx-runtime").JSX.Element;
16
+ export default BusinessInfoLabel;
@@ -0,0 +1 @@
1
+ export { default } from './BusinessInfoLabel';
@@ -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
+ onEntityUpdated?: (entity: unknown) => void;
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,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 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
+ onEntityUpdated?: (entity: unknown) => void;
16
+ };
17
+ declare const EntityCustomFieldLabel: ({ property, entity, entityType, entityId, customContactFields, userTrii, baseUrl, spaceId, onEntityUpdated, }: 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,9 @@
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
+ };
8
+ declare const CustomPropertyDateRangePicker: ({ value, handleChange, userDateFormat }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ 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,6 @@
1
+ import { Property } from '@trii/types/dist/Contacts';
2
+ type CustomPropertyInputProps = Property & {
3
+ onChange: (name: string, value: any) => void;
4
+ name: string;
5
+ };
6
+ export default CustomPropertyInputProps;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ value: string;
3
+ handleChange: (value: string) => void;
4
+ options: string[];
5
+ };
6
+ declare const CustomPropertyOptionsSelect: ({ handleChange, value, options }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export default CustomPropertyOptionsSelect;
@@ -0,0 +1 @@
1
+ export { default } from './CustomPropertyOptionsSelect';
@@ -0,0 +1,8 @@
1
+ import { Dayjs } from 'dayjs';
2
+ type Props = {
3
+ value: Dayjs | null;
4
+ handleChange: (value: Dayjs | null) => void;
5
+ userTimeFormat?: string;
6
+ };
7
+ declare const CustomPropertyTimePicker: ({ value, handleChange, userTimeFormat }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default CustomPropertyTimePicker;
@@ -0,0 +1 @@
1
+ export { default } from './CustomPropertyTimePicker';
@@ -0,0 +1,9 @@
1
+ import { DateRange } from '@mui/x-date-pickers-pro';
2
+ import { Dayjs } from 'dayjs';
3
+ type Props = {
4
+ value: DateRange<Dayjs> | null;
5
+ handleChange: (newValue: DateRange<Dayjs>) => void;
6
+ userTimeFormat?: string;
7
+ };
8
+ declare const CustomPropertyTimeRangePicker: ({ value, handleChange, userTimeFormat }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export default CustomPropertyTimeRangePicker;
@@ -0,0 +1 @@
1
+ export { default } from './CustomPropertyTimeRangePicker';
@@ -0,0 +1,6 @@
1
+ export { default as CustomPropertyInput } from './CustomPropertyInput';
2
+ export { default as CustomPropertyDatePicker } from './CustomPropertyDatePicker';
3
+ export { default as CustomPropertyOptionSelect } from './CustomPropertyOptionSelect';
4
+ export { default as CustomPropertyTimePicker } from './CustomPropertyTimePicker';
5
+ export { default as CustomPropertyTimeRangePicker } from './CustomPropertyTimeRangePicker';
6
+ export { default as CustomPropertyDateRangePicker } from './CustomPropertyDateRangePicker';
@@ -0,0 +1 @@
1
+ export { default } from './EntityCustomFieldLabel';
@@ -0,0 +1,40 @@
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 SharedProps = {
5
+ title: string;
6
+ value?: string | Date;
7
+ isNotEditable?: boolean;
8
+ displayValue?: string;
9
+ baseUrl?: string;
10
+ spaceId?: string;
11
+ minWidth?: string | number;
12
+ onEntityUpdated?: (entity: unknown) => void;
13
+ };
14
+ type ContactBaseProps = SharedProps & {
15
+ entityType: 'contact';
16
+ entityId?: string;
17
+ options?: Array<UserInfo | IList>;
18
+ constructUpdateObject?: (value: string | Date | null) => object;
19
+ businessId?: string;
20
+ };
21
+ type ContactBirthdayProps = ContactBaseProps & {
22
+ inputType: 'birthday';
23
+ contact: UseEditContact;
24
+ dateFormat: string;
25
+ };
26
+ type ContactNonBirthdayProps = ContactBaseProps & {
27
+ inputType?: 'text' | 'select' | 'selectBusiness';
28
+ contact?: UseEditContact;
29
+ dateFormat?: string;
30
+ };
31
+ type BusinessProps = SharedProps & {
32
+ entityType: 'business';
33
+ entityId?: string;
34
+ inputType?: 'text' | 'select' | 'selectMembers';
35
+ options?: UserInfo[];
36
+ constructUpdateObject?: (value: string | Date) => object;
37
+ };
38
+ type Props = ContactBirthdayProps | ContactNonBirthdayProps | BusinessProps;
39
+ declare const EntityInfoLabel: (props: Props) => import("react/jsx-runtime").JSX.Element;
40
+ export default EntityInfoLabel;
@@ -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';
@@ -0,0 +1 @@
1
+ export { default } from './EntityInfoLabel';
@@ -0,0 +1,3 @@
1
+ export { default as ContactInfoLabel } from './ContactInfoLabel';
2
+ export { default as EntityInfoLabel } from './EntityInfoLabel';
3
+ export { default as EntityCustomFieldLabel } from './EntityCustomFieldLabel';
@@ -0,0 +1,7 @@
1
+ import { IBusiness } from '@trii/types/dist/Contacts/contacts';
2
+ /**
3
+ * Type guard to check if an object is an IBusiness
4
+ * @param obj The object to check
5
+ * @returns True if the object is an IBusiness
6
+ */
7
+ export declare function isBusiness(obj: any): obj is IBusiness;
@@ -0,0 +1,7 @@
1
+ import { IContact } from '@trii/types/dist/Contacts/contacts';
2
+ /**
3
+ * Type guard to check if an object is an IContact
4
+ * @param obj The object to check
5
+ * @returns True if the object is an IContact
6
+ */
7
+ export declare function isContact(obj: any): obj is IContact;
@@ -0,0 +1,13 @@
1
+ import { ChannelType } from '@trii/types/dist/Common/Channels';
2
+ export interface NewAddress {
3
+ id: string;
4
+ address: string;
5
+ note: string;
6
+ channelType: ChannelType.PHONE | ChannelType.EMAIL | ChannelType.WHATSAPP | ChannelType.INSTAGRAM | ChannelType.RCS;
7
+ isSaved: boolean;
8
+ }
9
+ declare function createNewAddress(channelType: ChannelType.PHONE | ChannelType.EMAIL | ChannelType.WHATSAPP | ChannelType.RCS): NewAddress;
10
+ declare const _default: {
11
+ createNewAddress: typeof createNewAddress;
12
+ };
13
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as ContactInfoPopup } from './ContactInfoPopup';
2
+ export { default as EditContactModal } from './EditContactModal';
@@ -0,0 +1,2 @@
1
+ declare const i18nInstance: import("i18next").i18n;
2
+ export default i18nInstance;
@@ -0,0 +1,2 @@
1
+ export { default as i18n } from './config';
2
+ export { useTranslation } from 'react-i18next';
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export { i18n } from './i18n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/components",
3
- "version": "2.0.53",
3
+ "version": "2.0.55",
4
4
  "description": "Trii components package",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -9,8 +9,12 @@
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "dev": "rollup -c --watch",
13
- "build": "rollup -c",
12
+ "dev": "npm-run-all --parallel dev:types dev:js",
13
+ "dev:types": "tsc --watch",
14
+ "dev:js": "rollup -c --watch",
15
+ "build": "npm-run-all --serial build:types build:js",
16
+ "build:types": "tsc --emitDeclarationOnly",
17
+ "build:js": "rollup -c",
14
18
  "test": "jest --watchAll --verbose",
15
19
  "storybook": "storybook dev -p 6006",
16
20
  "build-storybook": "storybook build"
@@ -59,7 +63,6 @@
59
63
  "@rollup/plugin-commonjs": "^25.0.4",
60
64
  "@rollup/plugin-json": "^6.1.0",
61
65
  "@rollup/plugin-node-resolve": "^15.2.1",
62
- "@rollup/plugin-typescript": "^11.1.4",
63
66
  "@storybook/addon-essentials": "^8.5.3",
64
67
  "@storybook/addon-interactions": "^8.5.3",
65
68
  "@storybook/addon-links": "^8.5.3",
@@ -79,6 +82,7 @@
79
82
  "@typescript-eslint/eslint-plugin": "^8.53.0",
80
83
  "@typescript-eslint/parser": "^8.53.0",
81
84
  "babel-jest": "^29.7.0",
85
+ "esbuild": "^0.27.2",
82
86
  "eslint": "^9.39.2",
83
87
  "eslint-config-prettier": "^10.1.8",
84
88
  "eslint-plugin-import": "^2.32.0",
@@ -87,6 +91,7 @@
87
91
  "eslint-plugin-react-hooks": "^7.0.1",
88
92
  "jest": "^29.7.0",
89
93
  "jest-environment-jsdom": "^29.7.0",
94
+ "npm-run-all": "^4.1.5",
90
95
  "postcss": "^8.4.31",
91
96
  "postcss-import": "^15.1.0",
92
97
  "prettier": "^3.8.0",
@@ -94,6 +99,7 @@
94
99
  "react-dom": "^18.2.0",
95
100
  "rollup": "^3.29.4",
96
101
  "rollup-plugin-dts": "^6.0.2",
102
+ "rollup-plugin-esbuild": "^6.2.1",
97
103
  "rollup-plugin-postcss": "^4.0.2",
98
104
  "storybook": "^8.5.3",
99
105
  "tslib": "^2.6.2",
@@ -101,17 +107,17 @@
101
107
  },
102
108
  "peerDependencies": {
103
109
  "@emotion/react": "^11.11.4",
104
- "react": ">=17.0.2 <19.0.0",
105
- "react-dom": ">=17.0.2 <19.0.0"
106
- },
107
- "dependencies": {
108
110
  "@mui/x-date-pickers": "^8.24.0",
109
111
  "@mui/x-date-pickers-pro": "^8.24.0",
110
- "@trii/types": "^2.10.586",
111
112
  "dayjs": "^1.11.19",
112
113
  "google-libphonenumber": "^3.2.43",
113
114
  "i18next": "^25.8.0",
114
115
  "moment": "^2.30.1",
116
+ "react": ">=17.0.2 <19.0.0",
117
+ "react-dom": ">=17.0.2 <19.0.0",
115
118
  "react-i18next": "^16.5.3"
119
+ },
120
+ "dependencies": {
121
+ "@trii/types": "^2.10.586"
116
122
  }
117
123
  }