@orbe-agro/client-core 5.3.86 → 5.3.89

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 (502) hide show
  1. package/dist/@ecme/assets/styles/app.css +1 -1
  2. package/dist/@ecme/assets/styles/components/_dialog.css +1 -1
  3. package/dist/@ecme/assets/styles/components/_drawer.css +1 -1
  4. package/dist/@ecme/assets/styles/components/_scrollbar.css +1 -1
  5. package/dist/@ecme/assets/styles/components/_switcher.css +1 -1
  6. package/dist/@ecme/assets/styles/components/_upload.css +1 -1
  7. package/dist/@ecme/assets/styles/components/index.css +1 -1
  8. package/dist/@ecme/assets/styles/tailwind/index.css +1 -1
  9. package/dist/@ecme/auth/AuthProvider.js +58 -62
  10. package/dist/@ecme/auth/AuthProvider.js.map +1 -1
  11. package/dist/@ecme/components/docs/DemoCard/DemoCard.js +18 -19
  12. package/dist/@ecme/components/docs/DemoCard/DemoCard.js.map +1 -1
  13. package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +29 -30
  14. package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
  15. package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js +56 -56
  16. package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js.map +1 -1
  17. package/dist/@ecme/components/shared/Affix.js +9 -10
  18. package/dist/@ecme/components/shared/Affix.js.map +1 -1
  19. package/dist/@ecme/components/shared/AutoComplete.js +27 -28
  20. package/dist/@ecme/components/shared/AutoComplete.js.map +1 -1
  21. package/dist/@ecme/components/shared/CalendarView.js +19 -20
  22. package/dist/@ecme/components/shared/CalendarView.js.map +1 -1
  23. package/dist/@ecme/components/shared/ConfirmDialog.js +16 -16
  24. package/dist/@ecme/components/shared/ConfirmDialog.js.map +1 -1
  25. package/dist/@ecme/components/shared/DataTable.js +151 -151
  26. package/dist/@ecme/components/shared/DataTable.js.map +1 -1
  27. package/dist/@ecme/components/shared/DebounceInput.js +11 -12
  28. package/dist/@ecme/components/shared/DebounceInput.js.map +1 -1
  29. package/dist/@ecme/components/shared/GanttChart/GanttChart.js +20 -20
  30. package/dist/@ecme/components/shared/GanttChart/GanttChart.js.map +1 -1
  31. package/dist/@ecme/components/shared/GanttChart/TaskListTable.js +22 -22
  32. package/dist/@ecme/components/shared/GanttChart/TaskListTable.js.map +1 -1
  33. package/dist/@ecme/components/shared/ImageGallery.js +18 -18
  34. package/dist/@ecme/components/shared/ImageGallery.js.map +1 -1
  35. package/dist/@ecme/components/shared/Masonry/Masonry.js +25 -25
  36. package/dist/@ecme/components/shared/Masonry/Masonry.js.map +1 -1
  37. package/dist/@ecme/components/shared/OtpInput.js +54 -56
  38. package/dist/@ecme/components/shared/OtpInput.js.map +1 -1
  39. package/dist/@ecme/components/shared/PasswordInput.js +6 -6
  40. package/dist/@ecme/components/shared/PasswordInput.js.map +1 -1
  41. package/dist/@ecme/components/shared/RegionMap.js +9 -9
  42. package/dist/@ecme/components/shared/RegionMap.js.map +1 -1
  43. package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js +47 -47
  44. package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js.map +1 -1
  45. package/dist/@ecme/components/shared/UsersAvatarGroup.js +24 -24
  46. package/dist/@ecme/components/shared/UsersAvatarGroup.js.map +1 -1
  47. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js +63 -69
  48. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js.map +1 -1
  49. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js +48 -48
  50. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js.map +1 -1
  51. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js +220 -231
  52. package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js.map +1 -1
  53. package/dist/@ecme/components/template/LanguageSelector.js +10 -13
  54. package/dist/@ecme/components/template/LanguageSelector.js.map +1 -1
  55. package/dist/@ecme/components/template/Search.js +85 -92
  56. package/dist/@ecme/components/template/Search.js.map +1 -1
  57. package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js +18 -18
  58. package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js.map +1 -1
  59. package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js +17 -17
  60. package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js.map +1 -1
  61. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js +59 -59
  62. package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js.map +1 -1
  63. package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +34 -34
  64. package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
  65. package/dist/@ecme/components/ui/Alert/Alert.js +29 -29
  66. package/dist/@ecme/components/ui/Alert/Alert.js.map +1 -1
  67. package/dist/@ecme/components/ui/Avatar/AvatarGroup.js +30 -30
  68. package/dist/@ecme/components/ui/Avatar/AvatarGroup.js.map +1 -1
  69. package/dist/@ecme/components/ui/Button/Button.js +66 -67
  70. package/dist/@ecme/components/ui/Button/Button.js.map +1 -1
  71. package/dist/@ecme/components/ui/Card/Card.js +39 -40
  72. package/dist/@ecme/components/ui/Card/Card.js.map +1 -1
  73. package/dist/@ecme/components/ui/Checkbox/Checkbox.js +42 -42
  74. package/dist/@ecme/components/ui/Checkbox/Checkbox.js.map +1 -1
  75. package/dist/@ecme/components/ui/Checkbox/Group.js +27 -27
  76. package/dist/@ecme/components/ui/Checkbox/Group.js.map +1 -1
  77. package/dist/@ecme/components/ui/DatePicker/BasePicker.js +67 -67
  78. package/dist/@ecme/components/ui/DatePicker/BasePicker.js.map +1 -1
  79. package/dist/@ecme/components/ui/DatePicker/Calendar.js +18 -18
  80. package/dist/@ecme/components/ui/DatePicker/Calendar.js.map +1 -1
  81. package/dist/@ecme/components/ui/DatePicker/CalendarBase.js +77 -78
  82. package/dist/@ecme/components/ui/DatePicker/CalendarBase.js.map +1 -1
  83. package/dist/@ecme/components/ui/DatePicker/DatePicker.js +67 -71
  84. package/dist/@ecme/components/ui/DatePicker/DatePicker.js.map +1 -1
  85. package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js +94 -98
  86. package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js.map +1 -1
  87. package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js +51 -58
  88. package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js.map +1 -1
  89. package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js +67 -67
  90. package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js.map +1 -1
  91. package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js +12 -12
  92. package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js.map +1 -1
  93. package/dist/@ecme/components/ui/Dialog/Dialog.js +25 -25
  94. package/dist/@ecme/components/ui/Dialog/Dialog.js.map +1 -1
  95. package/dist/@ecme/components/ui/Drawer/Drawer.js +32 -32
  96. package/dist/@ecme/components/ui/Drawer/Drawer.js.map +1 -1
  97. package/dist/@ecme/components/ui/Dropdown/DropdownItem.js +58 -58
  98. package/dist/@ecme/components/ui/Dropdown/DropdownItem.js.map +1 -1
  99. package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js +99 -100
  100. package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js.map +1 -1
  101. package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js +26 -26
  102. package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js.map +1 -1
  103. package/dist/@ecme/components/ui/Form/FormContainer.js +17 -17
  104. package/dist/@ecme/components/ui/Form/FormContainer.js.map +1 -1
  105. package/dist/@ecme/components/ui/Form/FormItem.js +38 -38
  106. package/dist/@ecme/components/ui/Form/FormItem.js.map +1 -1
  107. package/dist/@ecme/components/ui/Input/Input.js +50 -52
  108. package/dist/@ecme/components/ui/Input/Input.js.map +1 -1
  109. package/dist/@ecme/components/ui/InputGroup/Addon.js +12 -13
  110. package/dist/@ecme/components/ui/InputGroup/Addon.js.map +1 -1
  111. package/dist/@ecme/components/ui/InputGroup/InputGroup.js +10 -11
  112. package/dist/@ecme/components/ui/InputGroup/InputGroup.js.map +1 -1
  113. package/dist/@ecme/components/ui/Notification/Notification.js +19 -19
  114. package/dist/@ecme/components/ui/Notification/Notification.js.map +1 -1
  115. package/dist/@ecme/components/ui/Pagination/Pagination.js +45 -45
  116. package/dist/@ecme/components/ui/Pagination/Pagination.js.map +1 -1
  117. package/dist/@ecme/components/ui/Radio/Group.js +28 -28
  118. package/dist/@ecme/components/ui/Radio/Group.js.map +1 -1
  119. package/dist/@ecme/components/ui/Radio/Radio.js +42 -42
  120. package/dist/@ecme/components/ui/Radio/Radio.js.map +1 -1
  121. package/dist/@ecme/components/ui/Segment/SegmentItem.js +53 -53
  122. package/dist/@ecme/components/ui/Segment/SegmentItem.js.map +1 -1
  123. package/dist/@ecme/components/ui/Select/Select.js +40 -41
  124. package/dist/@ecme/components/ui/Select/Select.js.map +1 -1
  125. package/dist/@ecme/components/ui/Steps/StepItem.js +33 -33
  126. package/dist/@ecme/components/ui/Steps/StepItem.js.map +1 -1
  127. package/dist/@ecme/components/ui/Switcher/Switcher.js +24 -24
  128. package/dist/@ecme/components/ui/Switcher/Switcher.js.map +1 -1
  129. package/dist/@ecme/components/ui/Tabs/TabNav.js +22 -22
  130. package/dist/@ecme/components/ui/Tabs/TabNav.js.map +1 -1
  131. package/dist/@ecme/components/ui/TimeInput/AmPmInput.js +25 -27
  132. package/dist/@ecme/components/ui/TimeInput/AmPmInput.js.map +1 -1
  133. package/dist/@ecme/components/ui/TimeInput/TimeInput.js +130 -135
  134. package/dist/@ecme/components/ui/TimeInput/TimeInput.js.map +1 -1
  135. package/dist/@ecme/components/ui/TimeInput/TimeInputField.js +22 -24
  136. package/dist/@ecme/components/ui/TimeInput/TimeInputField.js.map +1 -1
  137. package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js +65 -68
  138. package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js.map +1 -1
  139. package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js +11 -12
  140. package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js.map +1 -1
  141. package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js +19 -20
  142. package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js.map +1 -1
  143. package/dist/@ecme/components/ui/Upload/Upload.js +67 -68
  144. package/dist/@ecme/components/ui/Upload/Upload.js.map +1 -1
  145. package/dist/@ecme/components/ui/hooks/useCallbackRef.js +7 -10
  146. package/dist/@ecme/components/ui/hooks/useCallbackRef.js.map +1 -1
  147. package/dist/@ecme/components/ui/hooks/useRootClose.js +32 -32
  148. package/dist/@ecme/components/ui/hooks/useRootClose.js.map +1 -1
  149. package/dist/@ecme/components/ui/hooks/useTimeout.js +12 -13
  150. package/dist/@ecme/components/ui/hooks/useTimeout.js.map +1 -1
  151. package/dist/@ecme/components/ui/toast/ToastWrapper.js +58 -61
  152. package/dist/@ecme/components/ui/toast/ToastWrapper.js.map +1 -1
  153. package/dist/@ecme/components/ui/toast/toast.js +16 -19
  154. package/dist/@ecme/components/ui/toast/toast.js.map +1 -1
  155. package/dist/@ecme/components/view/Activity/ActivityEvent.js +63 -67
  156. package/dist/@ecme/components/view/Activity/ActivityEvent.js.map +1 -1
  157. package/dist/@ecme/components/view/ChatBox/components/Attachment.js +8 -9
  158. package/dist/@ecme/components/view/ChatBox/components/Attachment.js.map +1 -1
  159. package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +37 -39
  160. package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
  161. package/dist/@ecme/components/view/ChatBox/components/Message.js +10 -10
  162. package/dist/@ecme/components/view/ChatBox/components/Message.js.map +1 -1
  163. package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js +36 -37
  164. package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js.map +1 -1
  165. package/dist/@ecme/components/view/TaskItem/TaskItem.js +33 -33
  166. package/dist/@ecme/components/view/TaskItem/TaskItem.js.map +1 -1
  167. package/dist/@ecme/mock/fakeApi/chatFakeApi.js +16 -18
  168. package/dist/@ecme/mock/fakeApi/chatFakeApi.js.map +1 -1
  169. package/dist/@ecme/mock/fakeApi/customersFakeApi.js +10 -11
  170. package/dist/@ecme/mock/fakeApi/customersFakeApi.js.map +1 -1
  171. package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js +10 -11
  172. package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js.map +1 -1
  173. package/dist/@ecme/mock/fakeApi/mailFakeApi.js +9 -10
  174. package/dist/@ecme/mock/fakeApi/mailFakeApi.js.map +1 -1
  175. package/dist/@ecme/mock/fakeApi/ordersFakeApi.js +9 -10
  176. package/dist/@ecme/mock/fakeApi/ordersFakeApi.js.map +1 -1
  177. package/dist/@ecme/mock/fakeApi/productsFakeApi.js +7 -8
  178. package/dist/@ecme/mock/fakeApi/productsFakeApi.js.map +1 -1
  179. package/dist/@ecme/mock/fakeApi/projectsFakeApi.js +10 -11
  180. package/dist/@ecme/mock/fakeApi/projectsFakeApi.js.map +1 -1
  181. package/dist/@ecme/utils/hooks/useInfiniteScroll.js +11 -11
  182. package/dist/@ecme/utils/hooks/useInfiniteScroll.js.map +1 -1
  183. package/dist/@ecme/utils/hooks/useMenuActive.js +11 -12
  184. package/dist/@ecme/utils/hooks/useMenuActive.js.map +1 -1
  185. package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js +36 -37
  186. package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js.map +1 -1
  187. package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js +14 -14
  188. package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js.map +1 -1
  189. package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js +41 -42
  190. package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js.map +1 -1
  191. package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js +59 -60
  192. package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js.map +1 -1
  193. package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js +27 -27
  194. package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js.map +1 -1
  195. package/dist/@ecme/views/auth/SignIn/components/SignInForm.js +57 -58
  196. package/dist/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
  197. package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js +37 -38
  198. package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js.map +1 -1
  199. package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js +44 -45
  200. package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js.map +1 -1
  201. package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js +5 -5
  202. package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js.map +1 -1
  203. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js +34 -35
  204. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js.map +1 -1
  205. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js +26 -26
  206. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js.map +1 -1
  207. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js +28 -29
  208. package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js.map +1 -1
  209. package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js +8 -8
  210. package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js.map +1 -1
  211. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js +10 -11
  212. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js.map +1 -1
  213. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js +48 -49
  214. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js.map +1 -1
  215. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js +14 -14
  216. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js.map +1 -1
  217. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js +102 -103
  218. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js.map +1 -1
  219. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js +34 -35
  220. package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js.map +1 -1
  221. package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js +16 -16
  222. package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js.map +1 -1
  223. package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js +76 -78
  224. package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js.map +1 -1
  225. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js +23 -23
  226. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js.map +1 -1
  227. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js +48 -49
  228. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js.map +1 -1
  229. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js +34 -35
  230. package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js.map +1 -1
  231. package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js +11 -14
  232. package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js.map +1 -1
  233. package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js +19 -19
  234. package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js.map +1 -1
  235. package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +22 -26
  236. package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
  237. package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js +18 -24
  238. package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js.map +1 -1
  239. package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js +22 -22
  240. package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js.map +1 -1
  241. package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js +31 -32
  242. package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js.map +1 -1
  243. package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js +31 -32
  244. package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js.map +1 -1
  245. package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js +38 -39
  246. package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js.map +1 -1
  247. package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js +68 -69
  248. package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js.map +1 -1
  249. package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js +63 -66
  250. package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js.map +1 -1
  251. package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js +21 -22
  252. package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js.map +1 -1
  253. package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js +84 -85
  254. package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js.map +1 -1
  255. package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js +19 -19
  256. package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js.map +1 -1
  257. package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js +51 -58
  258. package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js.map +1 -1
  259. package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js +76 -89
  260. package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js.map +1 -1
  261. package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js +104 -107
  262. package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js.map +1 -1
  263. package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js +22 -22
  264. package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js.map +1 -1
  265. package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js +38 -39
  266. package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js.map +1 -1
  267. package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js +20 -20
  268. package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js.map +1 -1
  269. package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js +32 -33
  270. package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js.map +1 -1
  271. package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js +17 -18
  272. package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js.map +1 -1
  273. package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js +5 -5
  274. package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js.map +1 -1
  275. package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js +12 -13
  276. package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js.map +1 -1
  277. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js +28 -29
  278. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js.map +1 -1
  279. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js +63 -67
  280. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js.map +1 -1
  281. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js +8 -8
  282. package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js.map +1 -1
  283. package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js +36 -37
  284. package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js.map +1 -1
  285. package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js +134 -137
  286. package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js.map +1 -1
  287. package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js +17 -17
  288. package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js.map +1 -1
  289. package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js +35 -35
  290. package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js.map +1 -1
  291. package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js +38 -38
  292. package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js.map +1 -1
  293. package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js +108 -111
  294. package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js.map +1 -1
  295. package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js +44 -45
  296. package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js.map +1 -1
  297. package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js +211 -214
  298. package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js.map +1 -1
  299. package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js +17 -17
  300. package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js.map +1 -1
  301. package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js +15 -15
  302. package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js.map +1 -1
  303. package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js +4 -4
  304. package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js.map +1 -1
  305. package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js +97 -100
  306. package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js.map +1 -1
  307. package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js +68 -71
  308. package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js.map +1 -1
  309. package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js +85 -86
  310. package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js.map +1 -1
  311. package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js +121 -124
  312. package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js.map +1 -1
  313. package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js +11 -11
  314. package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js.map +1 -1
  315. package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js +17 -17
  316. package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js.map +1 -1
  317. package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js +17 -17
  318. package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js.map +1 -1
  319. package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js +101 -105
  320. package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js.map +1 -1
  321. package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js +57 -58
  322. package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js.map +1 -1
  323. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js +51 -52
  324. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js.map +1 -1
  325. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js +22 -23
  326. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js.map +1 -1
  327. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js +45 -46
  328. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js.map +1 -1
  329. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js +62 -65
  330. package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js.map +1 -1
  331. package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js +52 -53
  332. package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js.map +1 -1
  333. package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js +23 -25
  334. package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js.map +1 -1
  335. package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js +15 -15
  336. package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js.map +1 -1
  337. package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js +16 -16
  338. package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js.map +1 -1
  339. package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js +9 -9
  340. package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js.map +1 -1
  341. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js +40 -41
  342. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js.map +1 -1
  343. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js +33 -34
  344. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js.map +1 -1
  345. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js +33 -33
  346. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js.map +1 -1
  347. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js +203 -210
  348. package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js.map +1 -1
  349. package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js +53 -56
  350. package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js.map +1 -1
  351. package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js +80 -83
  352. package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js.map +1 -1
  353. package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js +6 -6
  354. package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js.map +1 -1
  355. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js +21 -21
  356. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js.map +1 -1
  357. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js +27 -27
  358. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js.map +1 -1
  359. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js +27 -27
  360. package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js.map +1 -1
  361. package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js +59 -60
  362. package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js.map +1 -1
  363. package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js +76 -77
  364. package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js.map +1 -1
  365. package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js +30 -30
  366. package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js.map +1 -1
  367. package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js +21 -22
  368. package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js.map +1 -1
  369. package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js +15 -15
  370. package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js.map +1 -1
  371. package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js +20 -21
  372. package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js.map +1 -1
  373. package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js +20 -21
  374. package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js.map +1 -1
  375. package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js +20 -21
  376. package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js.map +1 -1
  377. package/dist/@ecme/views/ui-components/data-display/Table/Editable.js +17 -18
  378. package/dist/@ecme/views/ui-components/data-display/Table/Editable.js.map +1 -1
  379. package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js +12 -12
  380. package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js.map +1 -1
  381. package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js +28 -29
  382. package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js.map +1 -1
  383. package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js +21 -22
  384. package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js.map +1 -1
  385. package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js +24 -25
  386. package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js.map +1 -1
  387. package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js +75 -79
  388. package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js.map +1 -1
  389. package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js +19 -20
  390. package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js.map +1 -1
  391. package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js +90 -91
  392. package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js.map +1 -1
  393. package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js +22 -23
  394. package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js.map +1 -1
  395. package/dist/@types/base/configs/api.config.d.ts +0 -19
  396. package/dist/@types/base/configs/api.config.d.ts.map +1 -1
  397. package/dist/base/assets/styles/init.css +1 -1
  398. package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js +24 -25
  399. package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js.map +1 -1
  400. package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js +23 -24
  401. package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js.map +1 -1
  402. package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js +30 -31
  403. package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js.map +1 -1
  404. package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js +25 -26
  405. package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js.map +1 -1
  406. package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js +49 -50
  407. package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js.map +1 -1
  408. package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js +27 -28
  409. package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js.map +1 -1
  410. package/dist/base/components/forms/GenericForms/GenericStringFormSection.js +23 -24
  411. package/dist/base/components/forms/GenericForms/GenericStringFormSection.js.map +1 -1
  412. package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js +27 -28
  413. package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js.map +1 -1
  414. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js +29 -30
  415. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js.map +1 -1
  416. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js +27 -28
  417. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js.map +1 -1
  418. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js +27 -28
  419. package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js.map +1 -1
  420. package/dist/base/components/shared/TransferirProcessoDialog.js +10 -10
  421. package/dist/base/components/shared/TransferirProcessoDialog.js.map +1 -1
  422. package/dist/base/components/tools/NavFilter.js +68 -75
  423. package/dist/base/components/tools/NavFilter.js.map +1 -1
  424. package/dist/base/configs/api.config.js +11 -14
  425. package/dist/base/configs/api.config.js.map +1 -1
  426. package/dist/base/hooks/adm/roles/useRolesList.js +11 -11
  427. package/dist/base/hooks/adm/roles/useRolesList.js.map +1 -1
  428. package/dist/base/hooks/adm/users/useUsersList.js +10 -10
  429. package/dist/base/hooks/adm/users/useUsersList.js.map +1 -1
  430. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js +5 -5
  431. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js.map +1 -1
  432. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js +7 -7
  433. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js.map +1 -1
  434. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js +10 -10
  435. package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js.map +1 -1
  436. package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js +8 -8
  437. package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js.map +1 -1
  438. package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js +8 -8
  439. package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js.map +1 -1
  440. package/dist/base/hooks/dm/centro/useCentroByCodigoList.js +13 -13
  441. package/dist/base/hooks/dm/centro/useCentroByCodigoList.js.map +1 -1
  442. package/dist/base/hooks/dm/centro/useCentroList.js +6 -6
  443. package/dist/base/hooks/dm/centro/useCentroList.js.map +1 -1
  444. package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js +4 -4
  445. package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js.map +1 -1
  446. package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js +9 -9
  447. package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js.map +1 -1
  448. package/dist/base/hooks/dm/deposito/useDepositoList.js +5 -5
  449. package/dist/base/hooks/dm/deposito/useDepositoList.js.map +1 -1
  450. package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js +13 -13
  451. package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js.map +1 -1
  452. package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js +8 -8
  453. package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js.map +1 -1
  454. package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js +6 -6
  455. package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js.map +1 -1
  456. package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js +10 -10
  457. package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js.map +1 -1
  458. package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js +7 -7
  459. package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js.map +1 -1
  460. package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js +10 -10
  461. package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js.map +1 -1
  462. package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js +1 -1
  463. package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js.map +1 -1
  464. package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js +11 -11
  465. package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js.map +1 -1
  466. package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js +9 -9
  467. package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js.map +1 -1
  468. package/dist/base/hooks/dm/incoterms/useIncotermsList.js +17 -18
  469. package/dist/base/hooks/dm/incoterms/useIncotermsList.js.map +1 -1
  470. package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js +13 -13
  471. package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js.map +1 -1
  472. package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js +21 -21
  473. package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js.map +1 -1
  474. package/dist/base/hooks/dm/produto/useProdutoFindList.js +8 -8
  475. package/dist/base/hooks/dm/produto/useProdutoFindList.js.map +1 -1
  476. package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js +11 -11
  477. package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js.map +1 -1
  478. package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js +9 -9
  479. package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js.map +1 -1
  480. package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js +5 -5
  481. package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js.map +1 -1
  482. package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js +9 -9
  483. package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js.map +1 -1
  484. package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js +9 -9
  485. package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js.map +1 -1
  486. package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js +10 -10
  487. package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js.map +1 -1
  488. package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js +9 -9
  489. package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js.map +1 -1
  490. package/dist/base/hooks/useList.js +10 -10
  491. package/dist/base/hooks/useList.js.map +1 -1
  492. package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js +15 -15
  493. package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js.map +1 -1
  494. package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js +7 -7
  495. package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js.map +1 -1
  496. package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js +5 -5
  497. package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js.map +1 -1
  498. package/dist/base/utils/functions/stringUtils.js +14 -15
  499. package/dist/base/utils/functions/stringUtils.js.map +1 -1
  500. package/lib/base/configs/api.config.ts +6 -7
  501. package/package.json +1 -1
  502. package/tsconfig.json +6 -1
@@ -1,54 +1,54 @@
1
- import { useCallback as D, useRef as h, useEffect as r } from "react";
2
- const E = (n, u) => {
1
+ import { useCallback as l, useRef as D, useEffect as i } from "react";
2
+ const m = (n, t) => {
3
3
  if (n.contains)
4
- return n.contains(u);
4
+ return n.contains(t);
5
5
  if (n.compareDocumentPosition)
6
- return n === u || !!(n.compareDocumentPosition(u) & 16);
7
- if (u)
6
+ return n === t || !!(n.compareDocumentPosition(t) & 16);
7
+ if (t)
8
8
  do
9
- if (u === n)
9
+ if (t === n)
10
10
  return !0;
11
- while (u = u.parentNode);
11
+ while (t = t.parentNode);
12
12
  return !1;
13
13
  };
14
- function l(n) {
15
- return (n == null ? void 0 : n.button) === 0;
14
+ function E(n) {
15
+ return n?.button === 0;
16
16
  }
17
- function w(n) {
18
- return !!(n.metaKey || n.altKey || n.ctrlKey || n != null && n.shiftKey);
17
+ function d(n) {
18
+ return !!(n.metaKey || n.altKey || n.ctrlKey || n?.shiftKey);
19
19
  }
20
- function K(n, u, c, s = !1) {
21
- return n.addEventListener(u, c, s), {
20
+ function w(n, t, r, u = !1) {
21
+ return n.addEventListener(t, r, u), {
22
22
  off() {
23
- n.removeEventListener(u, c, s);
23
+ n.removeEventListener(t, r, u);
24
24
  }
25
25
  };
26
26
  }
27
- function L(n, { disabled: u, triggerTarget: c, overlayTarget: s }) {
28
- const i = D(
29
- (f) => {
30
- const m = c == null ? void 0 : c.current, t = s == null ? void 0 : s.current;
31
- m && E(m, f.target) || t && E(t, f.target) || w(f) || !l(f) || n == null || n(f);
27
+ function h(n, { disabled: t, triggerTarget: r, overlayTarget: u }) {
28
+ const c = l(
29
+ (e) => {
30
+ const s = r?.current, o = u?.current;
31
+ s && m(s, e.target) || o && m(o, e.target) || d(e) || !E(e) || n?.(e);
32
32
  },
33
- [n, c, s]
34
- ), o = h(i);
35
- r(() => {
36
- o.current = i;
37
- }, [i]), r(() => {
38
- const f = c == null ? void 0 : c.current;
39
- if (u || !f) return;
40
- const t = K(
41
- f && f.ownerDocument || document,
33
+ [n, r, u]
34
+ ), f = D(c);
35
+ i(() => {
36
+ f.current = c;
37
+ }, [c]), i(() => {
38
+ const e = r?.current;
39
+ if (t || !e) return;
40
+ const o = w(
41
+ e && e.ownerDocument || document,
42
42
  "mousedown",
43
- (d) => o.current(d),
43
+ (a) => f.current(a),
44
44
  !0
45
45
  );
46
46
  return () => {
47
- t == null || t.off();
47
+ o?.off();
48
48
  };
49
- }, [c, u]);
49
+ }, [r, t]);
50
50
  }
51
51
  export {
52
- L as default
52
+ h as default
53
53
  };
54
54
  //# sourceMappingURL=useRootClose.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRootClose.js","sources":["../../../../../lib/@ecme/components/ui/hooks/useRootClose.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useEffect, useCallback, useRef } from 'react'\nimport type { RefObject, ReactEventHandler } from 'react'\n\ntype Options = {\n disabled: boolean\n triggerTarget: RefObject<HTMLElement | null>\n overlayTarget: RefObject<HTMLElement | null>\n listenEscape?: boolean\n}\n\ninterface CustomEventListener<T = any> {\n (evt: T): void\n}\n\nconst domContains = (context: Element, node: (Node & ParentNode) | null) => {\n if (context.contains) {\n return context.contains(node)\n } else if (context.compareDocumentPosition) {\n return (\n context === node ||\n !!(context.compareDocumentPosition(node as Node) & 16)\n )\n }\n if (node) {\n do {\n if (node === context) {\n return true\n }\n } while ((node = node.parentNode))\n }\n return false\n}\n\nfunction isLeftClickEvent(e: MouseEvent) {\n return e?.button === 0\n}\n\nfunction isModifiedEvent(e: MouseEvent) {\n return !!(e.metaKey || e.altKey || e.ctrlKey || e?.shiftKey)\n}\n\nfunction onEventListener<K extends keyof DocumentEventMap>(\n target: Element | Window | Document | EventTarget,\n eventType: K,\n listener: EventListenerOrEventListenerObject | CustomEventListener,\n options: boolean | AddEventListenerOptions = false,\n): { off: () => void } {\n target.addEventListener(eventType, listener, options)\n\n return {\n off() {\n target.removeEventListener(eventType, listener, options)\n },\n }\n}\n\nfunction useRootClose(\n onRootClose: ReactEventHandler | undefined,\n { disabled, triggerTarget, overlayTarget }: Options,\n) {\n const handleDocumentMouseDown = useCallback(\n (event: any) => {\n const triggerElement = triggerTarget?.current\n const overlayElement = overlayTarget?.current\n\n if (triggerElement && domContains(triggerElement, event.target)) {\n return\n }\n\n if (overlayElement && domContains(overlayElement, event.target)) {\n return\n }\n\n if (isModifiedEvent(event) || !isLeftClickEvent(event)) {\n return\n }\n\n onRootClose?.(event)\n },\n [onRootClose, triggerTarget, overlayTarget],\n )\n\n const handleDocumentMouseDownRef = useRef(handleDocumentMouseDown)\n\n useEffect(() => {\n handleDocumentMouseDownRef.current = handleDocumentMouseDown\n }, [handleDocumentMouseDown])\n\n useEffect(() => {\n const currentTarget = triggerTarget?.current\n\n if (disabled || !currentTarget) return\n\n const doc = () =>\n (currentTarget && currentTarget.ownerDocument) || document\n const onDocumentMouseDownListener = onEventListener(\n doc(),\n 'mousedown',\n (event: any) => handleDocumentMouseDownRef.current(event),\n true,\n )\n\n return () => {\n onDocumentMouseDownListener?.off()\n }\n }, [triggerTarget, disabled])\n}\n\nexport default useRootClose\n"],"names":["domContains","context","node","isLeftClickEvent","e","isModifiedEvent","onEventListener","target","eventType","listener","options","useRootClose","onRootClose","disabled","triggerTarget","overlayTarget","handleDocumentMouseDown","useCallback","event","triggerElement","overlayElement","handleDocumentMouseDownRef","useRef","useEffect","currentTarget","onDocumentMouseDownListener"],"mappings":";AAeA,MAAMA,IAAc,CAACC,GAAkBC,MAAqC;AACxE,MAAID,EAAQ;AACR,WAAOA,EAAQ,SAASC,CAAI;AAChC,MAAWD,EAAQ;AACf,WACIA,MAAYC,KACZ,CAAC,EAAED,EAAQ,wBAAwBC,CAAY,IAAI;AAG3D,MAAIA;AACA;AACI,UAAIA,MAASD;AACT,eAAO;AAAA,WAELC,IAAOA,EAAK;AAE1B,SAAO;AACX;AAEA,SAASC,EAAiBC,GAAe;AACrC,UAAOA,KAAA,gBAAAA,EAAG,YAAW;AACzB;AAEA,SAASC,EAAgBD,GAAe;AACpC,SAAO,CAAC,EAAEA,EAAE,WAAWA,EAAE,UAAUA,EAAE,WAAWA,KAAA,QAAAA,EAAG;AACvD;AAEA,SAASE,EACLC,GACAC,GACAC,GACAC,IAA6C,IAC1B;AACnB,SAAAH,EAAO,iBAAiBC,GAAWC,GAAUC,CAAO,GAE7C;AAAA,IACH,MAAM;AACF,MAAAH,EAAO,oBAAoBC,GAAWC,GAAUC,CAAO;AAAA,IAC3D;AAAA,EAAA;AAER;AAEA,SAASC,EACLC,GACA,EAAE,UAAAC,GAAU,eAAAC,GAAe,eAAAC,KAC7B;AACE,QAAMC,IAA0BC;AAAA,IAC5B,CAACC,MAAe;AACZ,YAAMC,IAAiBL,KAAA,gBAAAA,EAAe,SAChCM,IAAiBL,KAAA,gBAAAA,EAAe;AAEtC,MAAII,KAAkBnB,EAAYmB,GAAgBD,EAAM,MAAM,KAI1DE,KAAkBpB,EAAYoB,GAAgBF,EAAM,MAAM,KAI1Db,EAAgBa,CAAK,KAAK,CAACf,EAAiBe,CAAK,KAIrDN,KAAA,QAAAA,EAAcM;AAAA,IAClB;AAAA,IACA,CAACN,GAAaE,GAAeC,CAAa;AAAA,EAAA,GAGxCM,IAA6BC,EAAON,CAAuB;AAEjE,EAAAO,EAAU,MAAM;AACZ,IAAAF,EAA2B,UAAUL;AAAA,EACzC,GAAG,CAACA,CAAuB,CAAC,GAE5BO,EAAU,MAAM;AACZ,UAAMC,IAAgBV,KAAA,gBAAAA,EAAe;AAErC,QAAID,KAAY,CAACW,EAAe;AAIhC,UAAMC,IAA8BnB;AAAA,MAD/BkB,KAAiBA,EAAc,iBAAkB;AAAA,MAGlD;AAAA,MACA,CAACN,MAAeG,EAA2B,QAAQH,CAAK;AAAA,MACxD;AAAA,IAAA;AAGJ,WAAO,MAAM;AACT,MAAAO,KAAA,QAAAA,EAA6B;AAAA,IACjC;AAAA,EACJ,GAAG,CAACX,GAAeD,CAAQ,CAAC;AAChC;"}
1
+ {"version":3,"file":"useRootClose.js","sources":["../../../../../lib/@ecme/components/ui/hooks/useRootClose.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useEffect, useCallback, useRef } from 'react'\nimport type { RefObject, ReactEventHandler } from 'react'\n\ntype Options = {\n disabled: boolean\n triggerTarget: RefObject<HTMLElement | null>\n overlayTarget: RefObject<HTMLElement | null>\n listenEscape?: boolean\n}\n\ninterface CustomEventListener<T = any> {\n (evt: T): void\n}\n\nconst domContains = (context: Element, node: (Node & ParentNode) | null) => {\n if (context.contains) {\n return context.contains(node)\n } else if (context.compareDocumentPosition) {\n return (\n context === node ||\n !!(context.compareDocumentPosition(node as Node) & 16)\n )\n }\n if (node) {\n do {\n if (node === context) {\n return true\n }\n } while ((node = node.parentNode))\n }\n return false\n}\n\nfunction isLeftClickEvent(e: MouseEvent) {\n return e?.button === 0\n}\n\nfunction isModifiedEvent(e: MouseEvent) {\n return !!(e.metaKey || e.altKey || e.ctrlKey || e?.shiftKey)\n}\n\nfunction onEventListener<K extends keyof DocumentEventMap>(\n target: Element | Window | Document | EventTarget,\n eventType: K,\n listener: EventListenerOrEventListenerObject | CustomEventListener,\n options: boolean | AddEventListenerOptions = false,\n): { off: () => void } {\n target.addEventListener(eventType, listener, options)\n\n return {\n off() {\n target.removeEventListener(eventType, listener, options)\n },\n }\n}\n\nfunction useRootClose(\n onRootClose: ReactEventHandler | undefined,\n { disabled, triggerTarget, overlayTarget }: Options,\n) {\n const handleDocumentMouseDown = useCallback(\n (event: any) => {\n const triggerElement = triggerTarget?.current\n const overlayElement = overlayTarget?.current\n\n if (triggerElement && domContains(triggerElement, event.target)) {\n return\n }\n\n if (overlayElement && domContains(overlayElement, event.target)) {\n return\n }\n\n if (isModifiedEvent(event) || !isLeftClickEvent(event)) {\n return\n }\n\n onRootClose?.(event)\n },\n [onRootClose, triggerTarget, overlayTarget],\n )\n\n const handleDocumentMouseDownRef = useRef(handleDocumentMouseDown)\n\n useEffect(() => {\n handleDocumentMouseDownRef.current = handleDocumentMouseDown\n }, [handleDocumentMouseDown])\n\n useEffect(() => {\n const currentTarget = triggerTarget?.current\n\n if (disabled || !currentTarget) return\n\n const doc = () =>\n (currentTarget && currentTarget.ownerDocument) || document\n const onDocumentMouseDownListener = onEventListener(\n doc(),\n 'mousedown',\n (event: any) => handleDocumentMouseDownRef.current(event),\n true,\n )\n\n return () => {\n onDocumentMouseDownListener?.off()\n }\n }, [triggerTarget, disabled])\n}\n\nexport default useRootClose\n"],"names":["domContains","context","node","isLeftClickEvent","e","isModifiedEvent","onEventListener","target","eventType","listener","options","useRootClose","onRootClose","disabled","triggerTarget","overlayTarget","handleDocumentMouseDown","useCallback","event","triggerElement","overlayElement","handleDocumentMouseDownRef","useRef","useEffect","currentTarget","onDocumentMouseDownListener"],"mappings":";AAeA,MAAMA,IAAc,CAACC,GAAkBC,MAA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AiBA,EAAc,iBAAkB;AAAA,MAGlD;AAAA,MACA,CAACN,MAAeG,EAA2B,QAAQH,CAAK;AAAA,MACxD;AAAA,IAAA;AAGJ,WAAO,MAAM;AACT,MAAAO,GAA6B,IAAA;AAAA,IACjC;AAAA,EACJ,GAAG,CAACX,GAAeD,CAAQ,CAAC;AAChC;"}
@@ -1,18 +1,17 @@
1
- import { useRef as i, useCallback as f, useEffect as m } from "react";
2
- function a(r, u = 0, c = !0) {
3
- const t = i(void 0), e = i(r), o = f(() => {
1
+ import { useRef as s, useCallback as i, useEffect as a } from "react";
2
+ function f(e, r = 0, u = !0) {
3
+ const t = s(void 0), n = s(e), c = i(() => {
4
4
  t.current && clearTimeout(t.current);
5
- }, []), n = f(() => {
6
- t.current && clearTimeout(t.current), c && (t.current = setTimeout(() => {
7
- var s;
8
- (s = e.current) == null || s.call(e);
9
- }, u));
10
- }, [u, c]);
11
- return m(() => {
12
- e.current = r;
13
- }, [r]), m(() => (n(), o), [u, c, n, o]), { clear: o, reset: n };
5
+ }, []), o = i(() => {
6
+ t.current && clearTimeout(t.current), u && (t.current = setTimeout(() => {
7
+ n.current?.();
8
+ }, r));
9
+ }, [r, u]);
10
+ return a(() => {
11
+ n.current = e;
12
+ }, [e]), a(() => (o(), c), [r, u, o, c]), { clear: c, reset: o };
14
13
  }
15
14
  export {
16
- a as default
15
+ f as default
17
16
  };
18
17
  //# sourceMappingURL=useTimeout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTimeout.js","sources":["../../../../../lib/@ecme/components/ui/hooks/useTimeout.ts"],"sourcesContent":["import { useEffect, useRef, useCallback } from 'react'\n\nexport type UseTimeoutReturn = {\n clear: () => void\n reset: () => void\n}\n\nfunction useTimeout(\n fn: (() => void) | undefined,\n ms = 0,\n enabled = true,\n): UseTimeoutReturn {\n const timeout = useRef<ReturnType<typeof setTimeout>>(undefined)\n const callback = useRef(fn)\n\n const clear = useCallback(() => {\n timeout.current && clearTimeout(timeout.current)\n }, [])\n\n const set = useCallback(() => {\n timeout.current && clearTimeout(timeout.current)\n if (enabled) {\n timeout.current = setTimeout(() => {\n callback.current?.()\n }, ms)\n }\n }, [ms, enabled])\n\n useEffect(() => {\n callback.current = fn\n }, [fn])\n\n useEffect(() => {\n set()\n return clear\n }, [ms, enabled, set, clear])\n\n return { clear, reset: set }\n}\n\nexport default useTimeout\n"],"names":["useTimeout","fn","ms","enabled","timeout","useRef","callback","clear","useCallback","set","_a","useEffect"],"mappings":";AAOA,SAASA,EACLC,GACAC,IAAK,GACLC,IAAU,IACM;AAChB,QAAMC,IAAUC,EAAsC,MAAS,GACzDC,IAAWD,EAAOJ,CAAE,GAEpBM,IAAQC,EAAY,MAAM;AAC5B,IAAAJ,EAAQ,WAAW,aAAaA,EAAQ,OAAO;AAAA,EACnD,GAAG,CAAA,CAAE,GAECK,IAAMD,EAAY,MAAM;AAC1B,IAAAJ,EAAQ,WAAW,aAAaA,EAAQ,OAAO,GAC3CD,MACAC,EAAQ,UAAU,WAAW,MAAM;;AAC/B,OAAAM,IAAAJ,EAAS,YAAT,QAAAI,EAAA,KAAAJ;AAAA,IACJ,GAAGJ,CAAE;AAAA,EAEb,GAAG,CAACA,GAAIC,CAAO,CAAC;AAEhB,SAAAQ,EAAU,MAAM;AACZ,IAAAL,EAAS,UAAUL;AAAA,EACvB,GAAG,CAACA,CAAE,CAAC,GAEPU,EAAU,OACNF,EAAA,GACOF,IACR,CAACL,GAAIC,GAASM,GAAKF,CAAK,CAAC,GAErB,EAAE,OAAAA,GAAO,OAAOE,EAAA;AAC3B;"}
1
+ {"version":3,"file":"useTimeout.js","sources":["../../../../../lib/@ecme/components/ui/hooks/useTimeout.ts"],"sourcesContent":["import { useEffect, useRef, useCallback } from 'react'\n\nexport type UseTimeoutReturn = {\n clear: () => void\n reset: () => void\n}\n\nfunction useTimeout(\n fn: (() => void) | undefined,\n ms = 0,\n enabled = true,\n): UseTimeoutReturn {\n const timeout = useRef<ReturnType<typeof setTimeout>>(undefined)\n const callback = useRef(fn)\n\n const clear = useCallback(() => {\n timeout.current && clearTimeout(timeout.current)\n }, [])\n\n const set = useCallback(() => {\n timeout.current && clearTimeout(timeout.current)\n if (enabled) {\n timeout.current = setTimeout(() => {\n callback.current?.()\n }, ms)\n }\n }, [ms, enabled])\n\n useEffect(() => {\n callback.current = fn\n }, [fn])\n\n useEffect(() => {\n set()\n return clear\n }, [ms, enabled, set, clear])\n\n return { clear, reset: set }\n}\n\nexport default useTimeout\n"],"names":["useTimeout","fn","ms","enabled","timeout","useRef","callback","clear","useCallback","set","useEffect"],"mappings":";AAOA,SAASA,EACLC,GACAC,IAAK,GACLC,IAAU,IACM;AAChB,QAAMC,IAAUC,EAAsC,MAAS,GACzDC,IAAWD,EAAOJ,CAAE,GAEpBM,IAAQC,EAAY,MAAM;AAC5B,IAAAJ,EAAQ,WAAW,aAAaA,EAAQ,OAAO;AAAA,EACnD,GAAG,CAAA,CAAE,GAECK,IAAMD,EAAY,MAAM;AAC1B,IAAAJ,EAAQ,WAAW,aAAaA,EAAQ,OAAO,GAC3CD,MACAC,EAAQ,UAAU,WAAW,MAAM;AAC/B,MAAAE,EAAS,UAAA;AAAA,IACb,GAAGJ,CAAE;AAAA,EAEb,GAAG,CAACA,GAAIC,CAAO,CAAC;AAEhB,SAAAO,EAAU,MAAM;AACZ,IAAAJ,EAAS,UAAUL;AAAA,EACvB,GAAG,CAACA,CAAE,CAAC,GAEPS,EAAU,OACND,EAAA,GACOF,IACR,CAACL,GAAIC,GAASM,GAAKF,CAAK,CAAC,GAErB,EAAE,OAAAA,GAAO,OAAOE,EAAA;AAC3B;"}
@@ -1,26 +1,26 @@
1
1
  import { jsx as v } from "react/jsx-runtime";
2
- import { useState as M, useCallback as f, useRef as R, useImperativeHandle as x, cloneElement as A, createRef as I } from "react";
3
- import h from "classnames";
4
- import S from "../utils/chainedFunction.js";
5
- import { motion as _ } from "framer-motion";
6
- import { getPlacementTransition as j } from "./transition.js";
7
- import { PLACEMENT as B } from "../utils/constants.js";
8
- import { createRoot as D } from "react-dom/client";
9
- const F = (a) => {
10
- const [e, s] = M([]), o = f(
2
+ import { useState as w, useCallback as u, useRef as N, useImperativeHandle as C, cloneElement as P, createRef as M } from "react";
3
+ import b from "classnames";
4
+ import R from "../utils/chainedFunction.js";
5
+ import { motion as x } from "framer-motion";
6
+ import { getPlacementTransition as A } from "./transition.js";
7
+ import { PLACEMENT as I } from "../utils/constants.js";
8
+ import { createRoot as S } from "react-dom/client";
9
+ const _ = (a) => {
10
+ const [e, s] = w([]), o = u(
11
11
  (t) => (typeof t > "u" && e.length && (t = e[e.length - 1].key), t),
12
12
  [e]
13
- ), i = f(
13
+ ), i = u(
14
14
  (t) => {
15
15
  const n = a || "_" + Math.random().toString(36).substr(2, 12);
16
16
  return s([...e, { key: n, visible: !0, node: t }]), n;
17
17
  },
18
18
  [e, a]
19
- ), l = f(() => {
19
+ ), l = u(() => {
20
20
  s(e.map((t) => ({ ...t, visible: !1 }))), setTimeout(() => {
21
21
  s([]);
22
22
  }, 50);
23
- }, [e]), c = f(
23
+ }, [e]), c = u(
24
24
  (t) => {
25
25
  s(
26
26
  e.map((n) => (n.key === o(t) && (n.visible = !1), n))
@@ -31,81 +31,78 @@ const F = (a) => {
31
31
  [e, o]
32
32
  );
33
33
  return { messages: e, push: i, removeAll: l, remove: c };
34
- }, w = (a) => {
35
- const e = R(null), {
34
+ }, y = (a) => {
35
+ const e = N(null), {
36
36
  transitionType: s = "scale",
37
- placement: o = B.TOP_END,
37
+ placement: o = I.TOP_END,
38
38
  offsetX: i = 30,
39
39
  offsetY: l = 30,
40
40
  messageKey: c,
41
41
  block: t = !1,
42
42
  ref: n,
43
- callback: m,
44
- ...p
45
- } = a, { push: u, removeAll: N, remove: g, messages: k } = F(c);
46
- x(n, () => ({ root: e.current, push: u, removeAll: N, remove: g }));
47
- const d = j({
43
+ callback: f,
44
+ ...m
45
+ } = a, { push: p, removeAll: E, remove: g, messages: T } = _(c);
46
+ C(n, () => ({ root: e.current, push: p, removeAll: E, remove: g }));
47
+ const d = A({
48
48
  offsetX: i,
49
49
  offsetY: l,
50
50
  placement: o,
51
51
  transitionType: s
52
- }), C = {
52
+ }), h = {
53
53
  triggerByToast: !0,
54
- ...p
55
- }, P = k.map((r) => {
56
- var y, b, E, T;
57
- return /* @__PURE__ */ v(
58
- _.div,
59
- {
60
- className: "toast-wrapper",
61
- initial: d.variants.initial,
62
- variants: d.variants,
63
- animate: r.visible ? "animate" : "exit",
64
- transition: { duration: 0.15, type: "tween" },
65
- children: A(
66
- r.node,
67
- {
68
- ...C,
69
- ref: n,
70
- onClose: S(
71
- (b = (y = r.node) == null ? void 0 : y.props) == null ? void 0 : b.onClose,
72
- () => g(r.key)
73
- ),
74
- className: h((T = (E = r.node) == null ? void 0 : E.props) == null ? void 0 : T.className)
75
- }
76
- )
77
- },
78
- r.key
79
- );
80
- });
54
+ ...m
55
+ }, k = T.map((r) => /* @__PURE__ */ v(
56
+ x.div,
57
+ {
58
+ className: "toast-wrapper",
59
+ initial: d.variants.initial,
60
+ variants: d.variants,
61
+ animate: r.visible ? "animate" : "exit",
62
+ transition: { duration: 0.15, type: "tween" },
63
+ children: P(
64
+ r.node,
65
+ {
66
+ ...h,
67
+ ref: n,
68
+ onClose: R(
69
+ r.node?.props?.onClose,
70
+ () => g(r.key)
71
+ ),
72
+ className: b(r.node?.props?.className)
73
+ }
74
+ )
75
+ },
76
+ r.key
77
+ ));
81
78
  return /* @__PURE__ */ v(
82
79
  "div",
83
80
  {
84
81
  style: d.default,
85
- ...p,
82
+ ...m,
86
83
  ref: (r) => {
87
- e.current = r, m == null || m(r);
84
+ e.current = r, f?.(r);
88
85
  },
89
- className: h("toast", t && "w-full"),
90
- children: P
86
+ className: b("toast", t && "w-full"),
87
+ children: k
91
88
  }
92
89
  );
93
90
  };
94
- w.getInstance = (a) => {
95
- const { wrapper: e, ...s } = a, o = I(), i = (typeof e == "function" ? e() : e) || document.body;
91
+ y.getInstance = (a) => {
92
+ const { wrapper: e, ...s } = a, o = M(), i = (typeof e == "function" ? e() : e) || document.body;
96
93
  return new Promise((l) => {
97
94
  const c = () => {
98
95
  l([o, n]);
99
96
  };
100
- function t(m) {
101
- const p = document.createElement("div");
102
- i.appendChild(p);
103
- const u = D(p);
104
- return u.render(m), u;
97
+ function t(f) {
98
+ const m = document.createElement("div");
99
+ i.appendChild(m);
100
+ const p = S(m);
101
+ return p.render(f), p;
105
102
  }
106
103
  const { unmount: n } = t(
107
104
  /* @__PURE__ */ v(
108
- w,
105
+ y,
109
106
  {
110
107
  ...s,
111
108
  ref: o,
@@ -116,6 +113,6 @@ w.getInstance = (a) => {
116
113
  });
117
114
  };
118
115
  export {
119
- w as default
116
+ y as default
120
117
  };
121
118
  //# sourceMappingURL=ToastWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastWrapper.js","sources":["../../../../../lib/@ecme/components/ui/toast/ToastWrapper.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport {\r\n useState,\r\n useImperativeHandle,\r\n useRef,\r\n useCallback,\r\n cloneElement,\r\n createRef,\r\n} from 'react'\r\nimport classNames from 'classnames'\r\nimport chainedFunction from '../utils/chainedFunction'\r\nimport { motion } from 'framer-motion'\r\nimport { getPlacementTransition } from './transition'\r\nimport { PLACEMENT } from '../utils/constants'\r\nimport { createRoot } from 'react-dom/client'\r\nimport { NotificationPlacement } from '../@types/placement'\r\nimport type { DetailedReactHTMLElement, ReactNode, Ref } from 'react'\r\n\r\ntype NodeProps = DetailedReactHTMLElement<any, HTMLDivElement>\r\n\r\ntype Message = {\r\n key: string\r\n visible: boolean\r\n node: NodeProps\r\n}\r\n\r\nconst useMessages = (msgKey: string) => {\r\n const [messages, setMessages] = useState<Message[]>([])\r\n\r\n const getKey = useCallback(\r\n (key: string) => {\r\n if (typeof key === 'undefined' && messages.length) {\r\n key = messages[messages.length - 1].key\r\n }\r\n return key\r\n },\r\n [messages],\r\n )\r\n\r\n const push = useCallback(\r\n (message: NodeProps) => {\r\n const key = msgKey || '_' + Math.random().toString(36).substr(2, 12)\r\n setMessages([...messages, { key, visible: true, node: message }])\r\n return key\r\n },\r\n [messages, msgKey],\r\n )\r\n\r\n const removeAll = useCallback(() => {\r\n setMessages(messages.map((msg) => ({ ...msg, visible: false })))\r\n setTimeout(() => {\r\n setMessages([])\r\n }, 50)\r\n }, [messages])\r\n\r\n const remove = useCallback(\r\n (key: string) => {\r\n setMessages(\r\n messages.map((elm) => {\r\n if (elm.key === getKey(key)) {\r\n elm.visible = false\r\n }\r\n return elm\r\n }),\r\n )\r\n\r\n setTimeout(() => {\r\n setMessages(messages.filter((msg) => msg.visible))\r\n }, 50)\r\n },\r\n [messages, getKey],\r\n )\r\n\r\n return { messages, push, removeAll, remove }\r\n}\r\n\r\nexport interface ToastProps {\r\n transitionType?: 'scale' | 'fade'\r\n placement?: NotificationPlacement | 'top-full' | 'bottom-full'\r\n offsetX?: string | number\r\n offsetY?: string | number\r\n block?: boolean\r\n}\r\n\r\nexport interface ToastWrapperInstance {\r\n root: HTMLElement | null\r\n push: (message: NodeProps) => string\r\n remove: (key: string) => void\r\n removeAll: () => void\r\n}\r\n\r\nexport interface ToastWrapperProps extends ToastProps {\r\n messageKey: string\r\n callback: (ref: HTMLDivElement | null) => void\r\n ref: Ref<ToastWrapperInstance>\r\n wrapper?: HTMLElement | (() => HTMLElement)\r\n}\r\n\r\nconst ToastWrapper = (props: ToastWrapperProps) => {\r\n const rootRef = useRef<HTMLDivElement | null>(null)\r\n\r\n const {\r\n transitionType = 'scale',\r\n placement = PLACEMENT.TOP_END as NotificationPlacement,\r\n offsetX = 30,\r\n offsetY = 30,\r\n messageKey,\r\n block = false,\r\n ref,\r\n callback,\r\n ...rest\r\n } = props\r\n\r\n const { push, removeAll, remove, messages } = useMessages(messageKey)\r\n\r\n useImperativeHandle(ref, () => {\r\n return { root: rootRef.current, push, removeAll, remove }\r\n })\r\n\r\n const placementTransition = getPlacementTransition({\r\n offsetX,\r\n offsetY,\r\n placement: placement as NotificationPlacement,\r\n transitionType,\r\n })\r\n\r\n const toastProps = {\r\n triggerByToast: true,\r\n ...rest,\r\n }\r\n\r\n const messageElements = messages.map((item) => {\r\n return (\r\n <motion.div\r\n key={item.key}\r\n className={'toast-wrapper'}\r\n initial={placementTransition.variants.initial}\r\n variants={placementTransition.variants}\r\n animate={item.visible ? 'animate' : 'exit'}\r\n transition={{ duration: 0.15, type: 'tween' }}\r\n >\r\n {cloneElement(\r\n item.node as DetailedReactHTMLElement<any, HTMLElement>,\r\n {\r\n ...toastProps,\r\n ref,\r\n onClose: chainedFunction(\r\n item.node?.props?.onClose,\r\n () => remove(item.key),\r\n ),\r\n className: classNames(item.node?.props?.className),\r\n },\r\n )}\r\n </motion.div>\r\n )\r\n })\r\n\r\n return (\r\n <div\r\n style={placementTransition.default}\r\n {...rest}\r\n ref={(thisRef) => {\r\n rootRef.current = thisRef\r\n callback?.(thisRef)\r\n }}\r\n className={classNames('toast', block && 'w-full')}\r\n >\r\n {messageElements}\r\n </div>\r\n )\r\n}\r\n\r\nToastWrapper.getInstance = (props: ToastWrapperProps) => {\r\n const { wrapper, ...rest } = props\r\n\r\n const wrapperRef = createRef<ToastWrapperInstance>()\r\n\r\n const wrapperElement =\r\n (typeof wrapper === 'function' ? wrapper() : wrapper) || document.body\r\n\r\n return new Promise((resolve) => {\r\n const renderCallback = () => {\r\n resolve([wrapperRef, unmount])\r\n }\r\n\r\n function renderElement(element: ReactNode) {\r\n const mountElement = document.createElement('div')\r\n\r\n wrapperElement.appendChild(mountElement)\r\n\r\n const root = createRoot(mountElement)\r\n\r\n root.render(element)\r\n\r\n return root\r\n }\r\n\r\n const { unmount } = renderElement(\r\n <ToastWrapper\r\n {...rest}\r\n ref={wrapperRef}\r\n callback={renderCallback}\r\n />,\r\n )\r\n })\r\n}\r\n\r\nexport default ToastWrapper\r\n"],"names":["useMessages","msgKey","messages","setMessages","useState","getKey","useCallback","key","push","message","removeAll","msg","remove","elm","ToastWrapper","props","rootRef","useRef","transitionType","placement","PLACEMENT","offsetX","offsetY","messageKey","block","ref","callback","rest","useImperativeHandle","placementTransition","getPlacementTransition","toastProps","messageElements","item","jsx","motion","cloneElement","chainedFunction","_b","_a","classNames","_d","_c","thisRef","wrapper","wrapperRef","createRef","wrapperElement","resolve","renderCallback","unmount","renderElement","element","mountElement","root","createRoot"],"mappings":";;;;;;;;AA0BA,MAAMA,IAAc,CAACC,MAAmB;AACpC,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAoB,CAAA,CAAE,GAEhDC,IAASC;AAAA,IACX,CAACC,OACO,OAAOA,IAAQ,OAAeL,EAAS,WACvCK,IAAML,EAASA,EAAS,SAAS,CAAC,EAAE,MAEjCK;AAAA,IAEX,CAACL,CAAQ;AAAA,EAAA,GAGPM,IAAOF;AAAA,IACT,CAACG,MAAuB;AACpB,YAAMF,IAAMN,KAAU,MAAM,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,OAAO,GAAG,EAAE;AACnE,aAAAE,EAAY,CAAC,GAAGD,GAAU,EAAE,KAAAK,GAAK,SAAS,IAAM,MAAME,EAAA,CAAS,CAAC,GACzDF;AAAA,IACX;AAAA,IACA,CAACL,GAAUD,CAAM;AAAA,EAAA,GAGfS,IAAYJ,EAAY,MAAM;AAChC,IAAAH,EAAYD,EAAS,IAAI,CAACS,OAAS,EAAE,GAAGA,GAAK,SAAS,GAAA,EAAQ,CAAC,GAC/D,WAAW,MAAM;AACb,MAAAR,EAAY,CAAA,CAAE;AAAA,IAClB,GAAG,EAAE;AAAA,EACT,GAAG,CAACD,CAAQ,CAAC,GAEPU,IAASN;AAAA,IACX,CAACC,MAAgB;AACb,MAAAJ;AAAA,QACID,EAAS,IAAI,CAACW,OACNA,EAAI,QAAQR,EAAOE,CAAG,MACtBM,EAAI,UAAU,KAEXA,EACV;AAAA,MAAA,GAGL,WAAW,MAAM;AACb,QAAAV,EAAYD,EAAS,OAAO,CAACS,MAAQA,EAAI,OAAO,CAA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3,"file":"ToastWrapper.js","sources":["../../../../../lib/@ecme/components/ui/toast/ToastWrapper.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport {\r\n useState,\r\n useImperativeHandle,\r\n useRef,\r\n useCallback,\r\n cloneElement,\r\n createRef,\r\n} from 'react'\r\nimport classNames from 'classnames'\r\nimport chainedFunction from '../utils/chainedFunction'\r\nimport { motion } from 'framer-motion'\r\nimport { getPlacementTransition } from './transition'\r\nimport { PLACEMENT } from '../utils/constants'\r\nimport { createRoot } from 'react-dom/client'\r\nimport { NotificationPlacement } from '../@types/placement'\r\nimport type { DetailedReactHTMLElement, ReactNode, Ref } from 'react'\r\n\r\ntype NodeProps = DetailedReactHTMLElement<any, HTMLDivElement>\r\n\r\ntype Message = {\r\n key: string\r\n visible: boolean\r\n node: NodeProps\r\n}\r\n\r\nconst useMessages = (msgKey: string) => {\r\n const [messages, setMessages] = useState<Message[]>([])\r\n\r\n const getKey = useCallback(\r\n (key: string) => {\r\n if (typeof key === 'undefined' && messages.length) {\r\n key = messages[messages.length - 1].key\r\n }\r\n return key\r\n },\r\n [messages],\r\n )\r\n\r\n const push = useCallback(\r\n (message: NodeProps) => {\r\n const key = msgKey || '_' + Math.random().toString(36).substr(2, 12)\r\n setMessages([...messages, { key, visible: true, node: message }])\r\n return key\r\n },\r\n [messages, msgKey],\r\n )\r\n\r\n const removeAll = useCallback(() => {\r\n setMessages(messages.map((msg) => ({ ...msg, visible: false })))\r\n setTimeout(() => {\r\n setMessages([])\r\n }, 50)\r\n }, [messages])\r\n\r\n const remove = useCallback(\r\n (key: string) => {\r\n setMessages(\r\n messages.map((elm) => {\r\n if (elm.key === getKey(key)) {\r\n elm.visible = false\r\n }\r\n return elm\r\n }),\r\n )\r\n\r\n setTimeout(() => {\r\n setMessages(messages.filter((msg) => msg.visible))\r\n }, 50)\r\n },\r\n [messages, getKey],\r\n )\r\n\r\n return { messages, push, removeAll, remove }\r\n}\r\n\r\nexport interface ToastProps {\r\n transitionType?: 'scale' | 'fade'\r\n placement?: NotificationPlacement | 'top-full' | 'bottom-full'\r\n offsetX?: string | number\r\n offsetY?: string | number\r\n block?: boolean\r\n}\r\n\r\nexport interface ToastWrapperInstance {\r\n root: HTMLElement | null\r\n push: (message: NodeProps) => string\r\n remove: (key: string) => void\r\n removeAll: () => void\r\n}\r\n\r\nexport interface ToastWrapperProps extends ToastProps {\r\n messageKey: string\r\n callback: (ref: HTMLDivElement | null) => void\r\n ref: Ref<ToastWrapperInstance>\r\n wrapper?: HTMLElement | (() => HTMLElement)\r\n}\r\n\r\nconst ToastWrapper = (props: ToastWrapperProps) => {\r\n const rootRef = useRef<HTMLDivElement | null>(null)\r\n\r\n const {\r\n transitionType = 'scale',\r\n placement = PLACEMENT.TOP_END as NotificationPlacement,\r\n offsetX = 30,\r\n offsetY = 30,\r\n messageKey,\r\n block = false,\r\n ref,\r\n callback,\r\n ...rest\r\n } = props\r\n\r\n const { push, removeAll, remove, messages } = useMessages(messageKey)\r\n\r\n useImperativeHandle(ref, () => {\r\n return { root: rootRef.current, push, removeAll, remove }\r\n })\r\n\r\n const placementTransition = getPlacementTransition({\r\n offsetX,\r\n offsetY,\r\n placement: placement as NotificationPlacement,\r\n transitionType,\r\n })\r\n\r\n const toastProps = {\r\n triggerByToast: true,\r\n ...rest,\r\n }\r\n\r\n const messageElements = messages.map((item) => {\r\n return (\r\n <motion.div\r\n key={item.key}\r\n className={'toast-wrapper'}\r\n initial={placementTransition.variants.initial}\r\n variants={placementTransition.variants}\r\n animate={item.visible ? 'animate' : 'exit'}\r\n transition={{ duration: 0.15, type: 'tween' }}\r\n >\r\n {cloneElement(\r\n item.node as DetailedReactHTMLElement<any, HTMLElement>,\r\n {\r\n ...toastProps,\r\n ref,\r\n onClose: chainedFunction(\r\n item.node?.props?.onClose,\r\n () => remove(item.key),\r\n ),\r\n className: classNames(item.node?.props?.className),\r\n },\r\n )}\r\n </motion.div>\r\n )\r\n })\r\n\r\n return (\r\n <div\r\n style={placementTransition.default}\r\n {...rest}\r\n ref={(thisRef) => {\r\n rootRef.current = thisRef\r\n callback?.(thisRef)\r\n }}\r\n className={classNames('toast', block && 'w-full')}\r\n >\r\n {messageElements}\r\n </div>\r\n )\r\n}\r\n\r\nToastWrapper.getInstance = (props: ToastWrapperProps) => {\r\n const { wrapper, ...rest } = props\r\n\r\n const wrapperRef = createRef<ToastWrapperInstance>()\r\n\r\n const wrapperElement =\r\n (typeof wrapper === 'function' ? wrapper() : wrapper) || document.body\r\n\r\n return new Promise((resolve) => {\r\n const renderCallback = () => {\r\n resolve([wrapperRef, unmount])\r\n }\r\n\r\n function renderElement(element: ReactNode) {\r\n const mountElement = document.createElement('div')\r\n\r\n wrapperElement.appendChild(mountElement)\r\n\r\n const root = createRoot(mountElement)\r\n\r\n root.render(element)\r\n\r\n return root\r\n }\r\n\r\n const { unmount } = renderElement(\r\n <ToastWrapper\r\n {...rest}\r\n ref={wrapperRef}\r\n callback={renderCallback}\r\n />,\r\n )\r\n })\r\n}\r\n\r\nexport default ToastWrapper\r\n"],"names":["useMessages","msgKey","messages","setMessages","useState","getKey","useCallback","key","push","message","removeAll","msg","remove","elm","ToastWrapper","props","rootRef","useRef","transitionType","placement","PLACEMENT","offsetX","offsetY","messageKey","block","ref","callback","rest","useImperativeHandle","placementTransition","getPlacementTransition","toastProps","messageElements","item","jsx","motion","cloneElement","chainedFunction","classNames","thisRef","wrapper","wrapperRef","createRef","wrapperElement","resolve","renderCallback","unmount","renderElement","element","mountElement","root","createRoot"],"mappings":";;;;;;;;AA0BA,MAAMA,IAAc,CAACC,MAAmB;AACpC,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAoB,CAAA,CAAE,GAEhDC,IAASC;AAAA,IACX,CAACC,OACO,OAAOA,IAAQ,OAAeL,EAAS,WACvCK,IAAML,EAASA,EAAS,SAAS,CAAC,EAAE,MAEjCK;AAAA,IAEX,CAACL,CAAQ;AAAA,EAAA,GAGPM,IAAOF;AAAA,IACT,CAAC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vB0B,IAAaC,EAAA,GAEbC,KACD,OAAOH,KAAY,aAAaA,MAAYA,MAAY,SAAS;AAEtE,SAAO,IAAI,QAAQ,CAACI,MAAY;AAC5B,UAAMC,IAAiB,MAAM;AACzB,MAAAD,EAAQ,CAACH,GAAYK,CAAO,CAAC;AAAA,IACjC;AAEA,aAASC,EAAcC,GAAoB;AACvC,YAAMC,IAAe,SAAS,cAAc,KAAK;AAEjD,MAAAN,EAAe,YAAYM,CAAY;AAEvC,YAAMC,IAAOC,EAAWF,CAAY;AAEpC,aAAAC,EAAK,OAAOF,CAAO,GAEZE;AAAA,IACX;AAEA,UAAM,EAAE,SAAAJ,MAAYC;AAAA,MAChB,gBAAAb;AAAA,QAACpB;AAAA,QAAA;AAAA,UACI,GAAGa;AAAA,UACJ,KAAKc;AAAA,UACL,UAAUI;AAAA,QAAA;AAAA,MAAA;AAAA,IACd;AAAA,EAER,CAAC;AACL;"}
@@ -1,34 +1,31 @@
1
- import s from "./ToastWrapper.js";
2
- import { PLACEMENT as l } from "../utils/constants.js";
3
- const p = {
4
- placement: l.TOP_END,
1
+ import p from "./ToastWrapper.js";
2
+ import { PLACEMENT as f } from "../utils/constants.js";
3
+ const s = {
4
+ placement: f.TOP_END,
5
5
  offsetX: 30,
6
6
  offsetY: 30,
7
7
  transitionType: "scale",
8
8
  block: !1
9
- }, c = "default", n = /* @__PURE__ */ new Map();
10
- function i(t) {
9
+ }, u = "default", n = /* @__PURE__ */ new Map();
10
+ function l(t) {
11
11
  if (/\top\b/.test(t))
12
12
  return "top-full";
13
13
  if (/\bottom\b/.test(t))
14
14
  return "bottom-full";
15
15
  }
16
- async function m(t, e) {
17
- const [r] = await s.getInstance(e);
18
- return n.set(t || c, r), r;
16
+ async function i(t, e) {
17
+ const [r] = await p.getInstance(e);
18
+ return n.set(t || u, r), r;
19
19
  }
20
- function h(t) {
21
- return n.size === 0 ? null : n.get(t || c);
20
+ function m(t) {
21
+ return n.size === 0 ? null : n.get(t || u);
22
22
  }
23
23
  const a = (t) => a.push(t);
24
- a.push = (t, e = p) => {
24
+ a.push = (t, e = s) => {
25
25
  let r = e.placement;
26
- e.block && (r = i(e.placement));
27
- const o = h(r);
28
- return o != null && o.current ? o.current.push(t) : m(r ?? "", e).then((f) => {
29
- var u;
30
- return (u = f.current) == null ? void 0 : u.push(t);
31
- });
26
+ e.block && (r = l(e.placement));
27
+ const o = m(r);
28
+ return o?.current ? o.current.push(t) : i(r ?? "", e).then((c) => c.current?.push(t));
32
29
  };
33
30
  a.remove = (t) => {
34
31
  n.forEach((e) => {
@@ -40,6 +37,6 @@ a.removeAll = () => {
40
37
  };
41
38
  export {
42
39
  a as default,
43
- p as toastDefaultProps
40
+ s as toastDefaultProps
44
41
  };
45
42
  //# sourceMappingURL=toast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sources":["../../../../../lib/@ecme/components/ui/toast/toast.tsx"],"sourcesContent":["import ToastWrapper from './ToastWrapper'\nimport { PLACEMENT } from '../utils/constants'\nimport type { ToastProps, ToastWrapperProps } from './ToastWrapper'\nimport { NotificationPlacement } from '../@types/placement'\nimport type { ReactNode } from 'react'\n\nexport const toastDefaultProps = {\n placement: PLACEMENT.TOP_END,\n offsetX: 30,\n offsetY: 30,\n transitionType: 'scale',\n block: false,\n}\n\nexport interface Toast {\n push(\n message: ReactNode,\n options?: ToastProps,\n ): string | undefined | Promise<string | undefined>\n remove(key: string): void\n removeAll(): void\n}\n\nconst defaultWrapperId = 'default'\nconst wrappers = new Map()\n\nfunction castPlacment(placement: NotificationPlacement) {\n if (/\\top\\b/.test(placement)) {\n return 'top-full'\n }\n\n if (/\\bottom\\b/.test(placement)) {\n return 'bottom-full'\n }\n}\n\nasync function createWrapper(wrapperId: string, props: ToastProps) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [wrapper] = await ToastWrapper.getInstance(props as ToastWrapperProps) as any\n\n wrappers.set(wrapperId || defaultWrapperId, wrapper)\n\n return wrapper\n}\n\nfunction getWrapper(wrapperId?: string) {\n if (wrappers.size === 0) {\n return null\n }\n return wrappers.get(wrapperId || defaultWrapperId)\n}\n\nconst toast: Toast = (message: ReactNode) => toast.push(message)\n\ntoast.push = (message, options = toastDefaultProps as ToastProps) => {\n let id = options.placement\n if (options.block) {\n id = castPlacment(options.placement as NotificationPlacement)\n }\n\n const wrapper = getWrapper(id)\n\n if (wrapper?.current) {\n return wrapper.current.push(message)\n }\n\n return createWrapper(id ?? '', options).then((ref) => {\n return ref.current?.push(message)\n })\n}\n\ntoast.remove = (key) => {\n wrappers.forEach((elm) => {\n elm.current.remove(key)\n })\n}\n\ntoast.removeAll = () => {\n wrappers.forEach((elm) => elm.current.removeAll())\n}\n\nexport default toast\n"],"names":["toastDefaultProps","PLACEMENT","defaultWrapperId","wrappers","castPlacment","placement","createWrapper","wrapperId","props","wrapper","ToastWrapper","getWrapper","toast","message","options","id","ref","_a","key","elm"],"mappings":";;AAMO,MAAMA,IAAoB;AAAA,EAC7B,WAAWC,EAAU;AAAA,EACrB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,OAAO;AACX,GAWMC,IAAmB,WACnBC,wBAAe,IAAA;AAErB,SAASC,EAAaC,GAAkC;AACpD,MAAI,SAAS,KAAKA,CAAS;AACvB,WAAO;AAGX,MAAI,YAAY,KAAKA,CAAS;AAC1B,WAAO;AAEf;AAEA,eAAeC,EAAcC,GAAmBC,GAAmB;AAE/D,QAAM,CAACC,CAAO,IAAI,MAAMC,EAAa,YAAYF,CAA0B;AAE3E,SAAAL,EAAS,IAAII,KAAaL,GAAkBO,CAAO,GAE5CA;AACX;AAEA,SAASE,EAAWJ,GAAoB;AACpC,SAAIJ,EAAS,SAAS,IACX,OAEJA,EAAS,IAAII,KAAaL,CAAgB;AACrD;AAEA,MAAMU,IAAe,CAACC,MAAuBD,EAAM,KAAKC,CAAO;AAE/DD,EAAM,OAAO,CAACC,GAASC,IAAUd,MAAoC;AACjE,MAAIe,IAAKD,EAAQ;AACjB,EAAIA,EAAQ,UACRC,IAAKX,EAAaU,EAAQ,SAAkC;AAGhE,QAAML,IAAUE,EAAWI,CAAE;AAE7B,SAAIN,KAAA,QAAAA,EAAS,UACFA,EAAQ,QAAQ,KAAKI,CAAO,IAGhCP,EAAcS,KAAM,IAAID,CAAO,EAAE,KAAK,CAACE,MAAQ;;AAClD,YAAOC,IAAAD,EAAI,YAAJ,gBAAAC,EAAa,KAAKJ;AAAA,EAC7B,CAAC;AACL;AAEAD,EAAM,SAAS,CAACM,MAAQ;AACpB,EAAAf,EAAS,QAAQ,CAACgB,MAAQ;AACtB,IAAAA,EAAI,QAAQ,OAAOD,CAAG;AAAA,EAC1B,CAAC;AACL;AAEAN,EAAM,YAAY,MAAM;AACpB,EAAAT,EAAS,QAAQ,CAACgB,MAAQA,EAAI,QAAQ,WAAW;AACrD;"}
1
+ {"version":3,"file":"toast.js","sources":["../../../../../lib/@ecme/components/ui/toast/toast.tsx"],"sourcesContent":["import ToastWrapper from './ToastWrapper'\nimport { PLACEMENT } from '../utils/constants'\nimport type { ToastProps, ToastWrapperProps } from './ToastWrapper'\nimport { NotificationPlacement } from '../@types/placement'\nimport type { ReactNode } from 'react'\n\nexport const toastDefaultProps = {\n placement: PLACEMENT.TOP_END,\n offsetX: 30,\n offsetY: 30,\n transitionType: 'scale',\n block: false,\n}\n\nexport interface Toast {\n push(\n message: ReactNode,\n options?: ToastProps,\n ): string | undefined | Promise<string | undefined>\n remove(key: string): void\n removeAll(): void\n}\n\nconst defaultWrapperId = 'default'\nconst wrappers = new Map()\n\nfunction castPlacment(placement: NotificationPlacement) {\n if (/\\top\\b/.test(placement)) {\n return 'top-full'\n }\n\n if (/\\bottom\\b/.test(placement)) {\n return 'bottom-full'\n }\n}\n\nasync function createWrapper(wrapperId: string, props: ToastProps) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [wrapper] = await ToastWrapper.getInstance(props as ToastWrapperProps) as any\n\n wrappers.set(wrapperId || defaultWrapperId, wrapper)\n\n return wrapper\n}\n\nfunction getWrapper(wrapperId?: string) {\n if (wrappers.size === 0) {\n return null\n }\n return wrappers.get(wrapperId || defaultWrapperId)\n}\n\nconst toast: Toast = (message: ReactNode) => toast.push(message)\n\ntoast.push = (message, options = toastDefaultProps as ToastProps) => {\n let id = options.placement\n if (options.block) {\n id = castPlacment(options.placement as NotificationPlacement)\n }\n\n const wrapper = getWrapper(id)\n\n if (wrapper?.current) {\n return wrapper.current.push(message)\n }\n\n return createWrapper(id ?? '', options).then((ref) => {\n return ref.current?.push(message)\n })\n}\n\ntoast.remove = (key) => {\n wrappers.forEach((elm) => {\n elm.current.remove(key)\n })\n}\n\ntoast.removeAll = () => {\n wrappers.forEach((elm) => elm.current.removeAll())\n}\n\nexport default toast\n"],"names":["toastDefaultProps","PLACEMENT","defaultWrapperId","wrappers","castPlacment","placement","createWrapper","wrapperId","props","wrapper","ToastWrapper","getWrapper","toast","message","options","id","ref","key","elm"],"mappings":";;AAMO,MAAMA,IAAoB;AAAA,EAC7B,WAAWC,EAAU;AAAA,EACrB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,OAAO;AACX,GAWMC,IAAmB,WACnBC,wBAAe,IAAA;AAErB,SAASC,EAAaC,GAAkC;AACpD,MAAI,SAAS,KAAKA,CAAS;AACvB,WAAO;AAGX,MAAI,YAAY,KAAKA,CAAS;AAC1B,WAAO;AAEf;AAEA,eAAeC,EAAcC,GAAmBC,GAAmB;AAE/D,QAAM,CAACC,CAAO,IAAI,MAAMC,EAAa,YAAYF,CAA0B;AAE3E,SAAAL,EAAS,IAAII,KAAaL,GAAkBO,CAAO,GAE5CA;AACX;AAEA,SAASE,EAAWJ,GAAoB;AACpC,SAAIJ,EAAS,SAAS,IACX,OAEJA,EAAS,IAAII,KAAaL,CAAgB;AACrD;AAEA,MAAMU,IAAe,CAACC,MAAuBD,EAAM,KAAKC,CAAO;AAE/DD,EAAM,OAAO,CAACC,GAASC,IAAUd,MAAoC;AACjE,MAAIe,IAAKD,EAAQ;AACjB,EAAIA,EAAQ,UACRC,IAAKX,EAAaU,EAAQ,SAAkC;AAGhE,QAAML,IAAUE,EAAWI,CAAE;AAE7B,SAAIN,GAAS,UACFA,EAAQ,QAAQ,KAAKI,CAAO,IAGhCP,EAAcS,KAAM,IAAID,CAAO,EAAE,KAAK,CAACE,MACnCA,EAAI,SAAS,KAAKH,CAAO,CACnC;AACL;AAEAD,EAAM,SAAS,CAACK,MAAQ;AACpB,EAAAd,EAAS,QAAQ,CAACe,MAAQ;AACtB,IAAAA,EAAI,QAAQ,OAAOD,CAAG;AAAA,EAC1B,CAAC;AACL;AAEAL,EAAM,YAAY,MAAM;AACpB,EAAAT,EAAS,QAAQ,CAACe,MAAQA,EAAI,QAAQ,WAAW;AACrD;"}