@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,21 +1,21 @@
1
1
  import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useState as l, useRef as x } from "react";
3
- import { Avatar as A } from "../../../../../components/ui/Avatar/index.js";
2
+ import { useState as l, useRef as N } from "react";
3
+ import { Avatar as S } from "../../../../../components/ui/Avatar/index.js";
4
4
  import "../../../../../components/ui/Button/index.js";
5
5
  import "../../../../../components/ui/Input/index.js";
6
- import R from "../../../../../components/shared/ConfirmDialog.js";
6
+ import k from "../../../../../components/shared/ConfirmDialog.js";
7
7
  import "../../../../../components/ui/Form/index.js";
8
- import V from "../../../../../utils/classNames.js";
9
- import j from "../../../../../utils/sleep.js";
10
- import z from "../../../../../utils/isLastChild.js";
11
- import { zodResolver as B } from "@hookform/resolvers/zod";
12
- import { useForm as F, Controller as c } from "react-hook-form";
8
+ import x from "../../../../../utils/classNames.js";
9
+ import A from "../../../../../utils/sleep.js";
10
+ import R from "../../../../../utils/isLastChild.js";
11
+ import { zodResolver as V } from "@hookform/resolvers/zod";
12
+ import { useForm as j, Controller as c } from "react-hook-form";
13
13
  import { z as t } from "zod";
14
- import { Form as M } from "../../../../../components/ui/Form/Form.js";
14
+ import { Form as z } from "../../../../../components/ui/Form/Form.js";
15
15
  import m from "../../../../../components/ui/Form/FormItem.js";
16
16
  import d from "../../../../../components/ui/Input/Input.js";
17
17
  import p from "../../../../../components/ui/Button/Button.js";
18
- const v = [
18
+ const g = [
19
19
  {
20
20
  label: "Google Authenticator",
21
21
  value: "googleAuthenticator",
@@ -34,26 +34,25 @@ const v = [
34
34
  img: "/img/others/email.png",
35
35
  desc: "Unique codes sent to email for confirming logins."
36
36
  }
37
- ], U = t.object({
37
+ ], B = t.object({
38
38
  currentPassword: t.string().min(1, { message: "Please enter your current password!" }),
39
39
  newPassword: t.string().min(1, { message: "Please enter your new password!" }),
40
40
  confirmNewPassword: t.string().min(1, { message: "Please confirm your new password!" })
41
41
  }).refine((i) => i.confirmNewPassword === i.newPassword, {
42
42
  message: "Password not match",
43
43
  path: ["confirmNewPassword"]
44
- }), ee = () => {
45
- var g, w, h;
44
+ }), Z = () => {
46
45
  const [i, u] = l(
47
46
  "googleAuthenticator"
48
- ), [b, a] = l(!1), [y, f] = l(!1), P = x(null), {
49
- getValues: C,
50
- handleSubmit: N,
47
+ ), [w, a] = l(!1), [h, f] = l(!1), v = N(null), {
48
+ getValues: b,
49
+ handleSubmit: y,
51
50
  formState: { errors: o },
52
51
  control: n
53
- } = F({
54
- resolver: B(U)
55
- }), S = async () => {
56
- f(!0), await j(1e3), console.log("getValues", C()), a(!1), f(!1);
52
+ } = j({
53
+ resolver: V(B)
54
+ }), P = async () => {
55
+ f(!0), await A(1e3), console.log("getValues", b()), a(!1), f(!1);
57
56
  };
58
57
  return /* @__PURE__ */ s("div", { children: [
59
58
  /* @__PURE__ */ s("div", { className: "mb-8", children: [
@@ -61,11 +60,11 @@ const v = [
61
60
  /* @__PURE__ */ e("p", { children: "Remember, your password is your digital key to your account. Keep it safe, keep it secure!" })
62
61
  ] }),
63
62
  /* @__PURE__ */ s(
64
- M,
63
+ z,
65
64
  {
66
- ref: P,
65
+ ref: v,
67
66
  className: "mb-8",
68
- onSubmit: N(async () => {
67
+ onSubmit: y(async () => {
69
68
  a(!0);
70
69
  }),
71
70
  children: [
@@ -74,7 +73,7 @@ const v = [
74
73
  {
75
74
  label: "Current password",
76
75
  invalid: !!o.currentPassword,
77
- errorMessage: (g = o.currentPassword) == null ? void 0 : g.message,
76
+ errorMessage: o.currentPassword?.message,
78
77
  children: /* @__PURE__ */ e(
79
78
  c,
80
79
  {
@@ -98,7 +97,7 @@ const v = [
98
97
  {
99
98
  label: "New password",
100
99
  invalid: !!o.newPassword,
101
- errorMessage: (w = o.newPassword) == null ? void 0 : w.message,
100
+ errorMessage: o.newPassword?.message,
102
101
  children: /* @__PURE__ */ e(
103
102
  c,
104
103
  {
@@ -122,7 +121,7 @@ const v = [
122
121
  {
123
122
  label: "Confirm new password",
124
123
  invalid: !!o.confirmNewPassword,
125
- errorMessage: (h = o.confirmNewPassword) == null ? void 0 : h.message,
124
+ errorMessage: o.confirmNewPassword?.message,
126
125
  children: /* @__PURE__ */ e(
127
126
  c,
128
127
  {
@@ -146,14 +145,14 @@ const v = [
146
145
  }
147
146
  ),
148
147
  /* @__PURE__ */ e(
149
- R,
148
+ k,
150
149
  {
151
- isOpen: b,
150
+ isOpen: w,
152
151
  type: "warning",
153
152
  title: "Update password",
154
153
  confirmButtonProps: {
155
- loading: y,
156
- onClick: S
154
+ loading: h,
155
+ onClick: P
157
156
  },
158
157
  onClose: () => a(!1),
159
158
  onRequestClose: () => a(!1),
@@ -164,17 +163,17 @@ const v = [
164
163
  /* @__PURE__ */ s("div", { className: "mb-8", children: [
165
164
  /* @__PURE__ */ e("h4", { children: "2-Step verification" }),
166
165
  /* @__PURE__ */ e("p", { children: "Your account holds great value to hackers. Enable two-step verification to safeguard your account!" }),
167
- /* @__PURE__ */ e("div", { className: "mt-8", children: v.map((r, k) => /* @__PURE__ */ e(
166
+ /* @__PURE__ */ e("div", { className: "mt-8", children: g.map((r, C) => /* @__PURE__ */ e(
168
167
  "div",
169
168
  {
170
- className: V(
169
+ className: x(
171
170
  "py-6 border-gray-200 dark:border-gray-600",
172
- !z(v, k) && "border-b"
171
+ !R(g, C) && "border-b"
173
172
  ),
174
173
  children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-4", children: [
175
174
  /* @__PURE__ */ s("div", { className: "flex items-center gap-4", children: [
176
175
  /* @__PURE__ */ e(
177
- A,
176
+ S,
178
177
  {
179
178
  size: 35,
180
179
  className: "bg-transparent",
@@ -212,6 +211,6 @@ const v = [
212
211
  ] });
213
212
  };
214
213
  export {
215
- ee as default
214
+ Z as default
216
215
  };
217
216
  //# sourceMappingURL=SettingsSecurity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsSecurity.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Avatar from '@/components/ui/Avatar'\nimport Button from '@/components/ui/Button'\nimport Input from '@/components/ui/Input'\nimport ConfirmDialog from '@/components/shared/ConfirmDialog'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport classNames from '@/utils/classNames'\nimport sleep from '@/utils/sleep'\nimport isLastChild from '@/utils/isLastChild'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useForm, Controller } from 'react-hook-form'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\n\ntype PasswordSchema = {\n currentPassword: string\n newPassword: string\n confirmNewPassword: string\n}\n\nconst authenticatorList = [\n {\n label: 'Google Authenticator',\n value: 'googleAuthenticator',\n img: '/img/others/google.png',\n desc: 'Using Google Authenticator app generates time-sensitive codes for secure logins.',\n },\n {\n label: 'Okta Verify',\n value: 'oktaVerify',\n img: '/img/others/okta.png',\n desc: 'Receive push notifications from Okta Verify app on your phone for quick login approval.',\n },\n {\n label: 'E Mail verification',\n value: 'emailVerification',\n img: '/img/others/email.png',\n desc: 'Unique codes sent to email for confirming logins.',\n },\n]\n\nconst validationSchema: ZodType<PasswordSchema> = z\n .object({\n currentPassword: z\n .string()\n .min(1, { message: 'Please enter your current password!' }),\n newPassword: z\n .string()\n .min(1, { message: 'Please enter your new password!' }),\n confirmNewPassword: z\n .string()\n .min(1, { message: 'Please confirm your new password!' }),\n })\n .refine((data) => data.confirmNewPassword === data.newPassword, {\n message: 'Password not match',\n path: ['confirmNewPassword'],\n })\n\nconst SettingsSecurity = () => {\n const [selected2FaType, setSelected2FaType] = useState(\n 'googleAuthenticator',\n )\n const [confirmationOpen, setConfirmationOpen] = useState(false)\n const [isSubmitting, setIsSubmitting] = useState(false)\n\n const formRef = useRef<HTMLFormElement>(null)\n\n const {\n getValues,\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<PasswordSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handlePostSubmit = async () => {\n setIsSubmitting(true)\n await sleep(1000)\n console.log('getValues', getValues())\n setConfirmationOpen(false)\n setIsSubmitting(false)\n }\n\n const onSubmit = async () => {\n setConfirmationOpen(true)\n }\n\n return (\n <div>\n <div className=\"mb-8\">\n <h4>Password</h4>\n <p>\n Remember, your password is your digital key to your account.\n Keep it safe, keep it secure!\n </p>\n </div>\n <Form\n ref={formRef}\n className=\"mb-8\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <FormItem\n label=\"Current password\"\n invalid={Boolean(errors.currentPassword)}\n errorMessage={errors.currentPassword?.message}\n >\n <Controller\n name=\"currentPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"New password\"\n invalid={Boolean(errors.newPassword)}\n errorMessage={errors.newPassword?.message}\n >\n <Controller\n name=\"newPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Confirm new password\"\n invalid={Boolean(errors.confirmNewPassword)}\n errorMessage={errors.confirmNewPassword?.message}\n >\n <Controller\n name=\"confirmNewPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex justify-end\">\n <Button variant=\"solid\" type=\"submit\">\n Update\n </Button>\n </div>\n </Form>\n <ConfirmDialog\n isOpen={confirmationOpen}\n type=\"warning\"\n title=\"Update password\"\n confirmButtonProps={{\n loading: isSubmitting,\n onClick: handlePostSubmit,\n }}\n onClose={() => setConfirmationOpen(false)}\n onRequestClose={() => setConfirmationOpen(false)}\n onCancel={() => setConfirmationOpen(false)}\n >\n <p>Are you sure you want to change your password?</p>\n </ConfirmDialog>\n <div className=\"mb-8\">\n <h4>2-Step verification</h4>\n <p>\n Your account holds great value to hackers. Enable two-step\n verification to safeguard your account!\n </p>\n <div className=\"mt-8\">\n {authenticatorList.map((authOption, index) => (\n <div\n key={authOption.value}\n className={classNames(\n 'py-6 border-gray-200 dark:border-gray-600',\n !isLastChild(authenticatorList, index) &&\n 'border-b',\n )}\n >\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-4\">\n <Avatar\n size={35}\n className=\"bg-transparent\"\n src={authOption.img}\n />\n <div>\n <h6>{authOption.label}</h6>\n <span>{authOption.desc}</span>\n </div>\n </div>\n <div>\n {selected2FaType === authOption.value ? (\n <Button\n size=\"sm\"\n customColorClass={() =>\n 'border-success ring-1 ring-success text-success hover:border-success hover:ring-success hover:text-success bg-transparent'\n }\n onClick={() =>\n setSelected2FaType('')\n }\n >\n Activated\n </Button>\n ) : (\n <Button\n size=\"sm\"\n onClick={() =>\n setSelected2FaType(\n authOption.value,\n )\n }\n >\n Enable\n </Button>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nexport default SettingsSecurity\n"],"names":["authenticatorList","validationSchema","z","data","SettingsSecurity","selected2FaType","setSelected2FaType","useState","confirmationOpen","setConfirmationOpen","isSubmitting","setIsSubmitting","formRef","useRef","getValues","handleSubmit","errors","control","useForm","zodResolver","handlePostSubmit","sleep","jsxs","jsx","Form","FormItem","_a","Controller","field","Input","_b","_c","Button","ConfirmDialog","authOption","index","classNames","isLastChild","Avatar"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAMA,IAAoB;AAAA,EACtB;AAAA,IACI,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EAAA;AAAA,EAEV;AAAA,IACI,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EAAA;AAAA,EAEV;AAAA,IACI,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EAAA;AAEd,GAEMC,IAA4CC,EAC7C,OAAO;AAAA,EACJ,iBAAiBA,EACZ,SACA,IAAI,GAAG,EAAE,SAAS,uCAAuC;AAAA,EAC9D,aAAaA,EACR,SACA,IAAI,GAAG,EAAE,SAAS,mCAAmC;AAAA,EAC1D,oBAAoBA,EACf,OAAA,EACA,IAAI,GAAG,EAAE,SAAS,oCAAA,CAAqC;AAChE,CAAC,EACA,OAAO,CAACC,MAASA,EAAK,uBAAuBA,EAAK,aAAa;AAAA,EAC5D,SAAS;AAAA,EACT,MAAM,CAAC,oBAAoB;AAC/B,CAAC,GAECC,KAAmB,MAAM;;AAC3B,QAAM,CAACC,GAAiBC,CAAkB,IAAIC;AAAA,IAC1C;AAAA,EAAA,GAEE,CAACC,GAAkBC,CAAmB,IAAIF,EAAS,EAAK,GACxD,CAACG,GAAcC,CAAe,IAAIJ,EAAS,EAAK,GAEhDK,IAAUC,EAAwB,IAAI,GAEtC;AAAA,IACF,WAAAC;AAA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AA,cAACS;AAAA,cAAA;AAAA,gBACG,MAAK;AAAA,gBACL,SAAS,MACL1B;AAAA,kBACI4B,EAAW;AAAA,gBAAA;AAAA,gBAGtB,UAAA;AAAA,cAAA;AAAA,YAAA,EAED,CAER;AAAA,UAAA,EAAA,CACJ;AAAA,QAAA;AAAA,QA7CKA,EAAW;AAAA,MAAA,CA+CvB,EAAA,CACL;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
1
+ {"version":3,"file":"SettingsSecurity.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Avatar from '@/components/ui/Avatar'\nimport Button from '@/components/ui/Button'\nimport Input from '@/components/ui/Input'\nimport ConfirmDialog from '@/components/shared/ConfirmDialog'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport classNames from '@/utils/classNames'\nimport sleep from '@/utils/sleep'\nimport isLastChild from '@/utils/isLastChild'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useForm, Controller } from 'react-hook-form'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\n\ntype PasswordSchema = {\n currentPassword: string\n newPassword: string\n confirmNewPassword: string\n}\n\nconst authenticatorList = [\n {\n label: 'Google Authenticator',\n value: 'googleAuthenticator',\n img: '/img/others/google.png',\n desc: 'Using Google Authenticator app generates time-sensitive codes for secure logins.',\n },\n {\n label: 'Okta Verify',\n value: 'oktaVerify',\n img: '/img/others/okta.png',\n desc: 'Receive push notifications from Okta Verify app on your phone for quick login approval.',\n },\n {\n label: 'E Mail verification',\n value: 'emailVerification',\n img: '/img/others/email.png',\n desc: 'Unique codes sent to email for confirming logins.',\n },\n]\n\nconst validationSchema: ZodType<PasswordSchema> = z\n .object({\n currentPassword: z\n .string()\n .min(1, { message: 'Please enter your current password!' }),\n newPassword: z\n .string()\n .min(1, { message: 'Please enter your new password!' }),\n confirmNewPassword: z\n .string()\n .min(1, { message: 'Please confirm your new password!' }),\n })\n .refine((data) => data.confirmNewPassword === data.newPassword, {\n message: 'Password not match',\n path: ['confirmNewPassword'],\n })\n\nconst SettingsSecurity = () => {\n const [selected2FaType, setSelected2FaType] = useState(\n 'googleAuthenticator',\n )\n const [confirmationOpen, setConfirmationOpen] = useState(false)\n const [isSubmitting, setIsSubmitting] = useState(false)\n\n const formRef = useRef<HTMLFormElement>(null)\n\n const {\n getValues,\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<PasswordSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handlePostSubmit = async () => {\n setIsSubmitting(true)\n await sleep(1000)\n console.log('getValues', getValues())\n setConfirmationOpen(false)\n setIsSubmitting(false)\n }\n\n const onSubmit = async () => {\n setConfirmationOpen(true)\n }\n\n return (\n <div>\n <div className=\"mb-8\">\n <h4>Password</h4>\n <p>\n Remember, your password is your digital key to your account.\n Keep it safe, keep it secure!\n </p>\n </div>\n <Form\n ref={formRef}\n className=\"mb-8\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <FormItem\n label=\"Current password\"\n invalid={Boolean(errors.currentPassword)}\n errorMessage={errors.currentPassword?.message}\n >\n <Controller\n name=\"currentPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"New password\"\n invalid={Boolean(errors.newPassword)}\n errorMessage={errors.newPassword?.message}\n >\n <Controller\n name=\"newPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Confirm new password\"\n invalid={Boolean(errors.confirmNewPassword)}\n errorMessage={errors.confirmNewPassword?.message}\n >\n <Controller\n name=\"confirmNewPassword\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"password\"\n autoComplete=\"off\"\n placeholder=\"•••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex justify-end\">\n <Button variant=\"solid\" type=\"submit\">\n Update\n </Button>\n </div>\n </Form>\n <ConfirmDialog\n isOpen={confirmationOpen}\n type=\"warning\"\n title=\"Update password\"\n confirmButtonProps={{\n loading: isSubmitting,\n onClick: handlePostSubmit,\n }}\n onClose={() => setConfirmationOpen(false)}\n onRequestClose={() => setConfirmationOpen(false)}\n onCancel={() => setConfirmationOpen(false)}\n >\n <p>Are you sure you want to change your password?</p>\n </ConfirmDialog>\n <div className=\"mb-8\">\n <h4>2-Step verification</h4>\n <p>\n Your account holds great value to hackers. Enable two-step\n verification to safeguard your account!\n </p>\n <div className=\"mt-8\">\n {authenticatorList.map((authOption, index) => (\n <div\n key={authOption.value}\n className={classNames(\n 'py-6 border-gray-200 dark:border-gray-600',\n !isLastChild(authenticatorList, index) &&\n 'border-b',\n )}\n >\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-4\">\n <Avatar\n size={35}\n className=\"bg-transparent\"\n src={authOption.img}\n />\n <div>\n <h6>{authOption.label}</h6>\n <span>{authOption.desc}</span>\n </div>\n </div>\n <div>\n {selected2FaType === authOption.value ? (\n <Button\n size=\"sm\"\n customColorClass={() =>\n 'border-success ring-1 ring-success text-success hover:border-success hover:ring-success hover:text-success bg-transparent'\n }\n onClick={() =>\n setSelected2FaType('')\n }\n >\n Activated\n </Button>\n ) : (\n <Button\n size=\"sm\"\n onClick={() =>\n setSelected2FaType(\n authOption.value,\n )\n }\n >\n Enable\n </Button>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nexport default SettingsSecurity\n"],"names":["authenticatorList","validationSchema","z","data","SettingsSecurity","selected2FaType","setSelected2FaType","useState","confirmationOpen","setConfirmationOpen","isSubmitting","setIsSubmitting","formRef","useRef","getValues","handleSubmit","errors","control","useForm","zodResolver","handlePostSubmit","sleep","jsxs","jsx","Form","FormItem","Controller","field","Input","Button","ConfirmDialog","authOption","index","classNames","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runtime";
1
+ import { jsx as e, jsxs as t, Fragment as v } from "react/jsx-runtime";
2
2
  import { useRef as N, useState as i, useEffect as F } from "react";
3
3
  import "../../../../../components/ui/Button/index.js";
4
4
  import "../../../../../components/ui/Input/index.js";
@@ -25,21 +25,21 @@ const g = [
25
25
  { label: "Overeactive refusal", value: "overeactiveRefusal" },
26
26
  { label: "Other", value: "other" }
27
27
  ], re = ({ content: s }) => {
28
- const d = N(null), [l, h] = i(!1), [k, T] = i(""), [b, x] = i(""), [r, n] = i({
28
+ const d = N(null), [o, h] = i(!1), [k, T] = i(""), [b, x] = i(""), [r, n] = i({
29
29
  type: "",
30
30
  open: !1
31
31
  }), p = "p-2 rounded-full hover:bg-black hover:bg-opacity-5 hover:text-gray-900 dark:hover:bg-black dark:hover:text-gray-100 dark:hover:bg-opacity-40 transition-colors duration-300 ease-in-out";
32
32
  F(() => {
33
- if (l && s && (navigator.clipboard.writeText(s), l)) {
34
- const t = setTimeout(
33
+ if (o && s && (navigator.clipboard.writeText(s), o)) {
34
+ const l = setTimeout(
35
35
  () => h(!1),
36
36
  2e3
37
37
  );
38
38
  return () => {
39
- clearTimeout(t);
39
+ clearTimeout(l);
40
40
  };
41
41
  }
42
- }, [l, s]);
42
+ }, [o, s]);
43
43
  const a = () => {
44
44
  n({
45
45
  type: "",
@@ -51,14 +51,14 @@ const g = [
51
51
  { placement: "top-center" }
52
52
  );
53
53
  };
54
- return /* @__PURE__ */ o(v, { children: [
55
- /* @__PURE__ */ o("div", { className: "flex mt-0.5", children: [
56
- /* @__PURE__ */ e(m, { title: l ? "Copied" : "Copy", placement: "bottom", children: /* @__PURE__ */ e(
54
+ return /* @__PURE__ */ t(v, { children: [
55
+ /* @__PURE__ */ t("div", { className: "flex mt-0.5", children: [
56
+ /* @__PURE__ */ e(m, { title: o ? "Copied" : "Copy", placement: "bottom", children: /* @__PURE__ */ e(
57
57
  "button",
58
58
  {
59
59
  className: c(p, "text-lg"),
60
60
  onClick: () => h(!0),
61
- children: l ? /* @__PURE__ */ e(S, { className: "text-emerald-500" }) : /* @__PURE__ */ e(w, {})
61
+ children: o ? /* @__PURE__ */ e(S, { className: "text-emerald-500" }) : /* @__PURE__ */ e(w, {})
62
62
  }
63
63
  ) }),
64
64
  /* @__PURE__ */ e(m, { title: "Good response", placement: "bottom", children: /* @__PURE__ */ e(
@@ -78,7 +78,7 @@ const g = [
78
78
  }
79
79
  ) })
80
80
  ] }),
81
- /* @__PURE__ */ o(
81
+ /* @__PURE__ */ t(
82
82
  W,
83
83
  {
84
84
  isOpen: r.open,
@@ -86,7 +86,7 @@ const g = [
86
86
  onRequestClose: a,
87
87
  children: [
88
88
  /* @__PURE__ */ e("h5", { className: "mb-4", children: "Feedback" }),
89
- /* @__PURE__ */ o(B, { onSubmit: f, children: [
89
+ /* @__PURE__ */ t(B, { onSubmit: f, children: [
90
90
  r.type === "praise" && /* @__PURE__ */ e(u, { label: "Please provide details: (optional)", children: /* @__PURE__ */ e(
91
91
  y,
92
92
  {
@@ -95,15 +95,15 @@ const g = [
95
95
  placeholder: "What was statifying about this response?"
96
96
  }
97
97
  ) }),
98
- r.type === "blame" && /* @__PURE__ */ o(v, { children: [
98
+ r.type === "blame" && /* @__PURE__ */ t(v, { children: [
99
99
  /* @__PURE__ */ e(u, { label: "What type of issue do you wish to report? (optional)", children: /* @__PURE__ */ e(
100
100
  P,
101
101
  {
102
102
  options: g,
103
103
  value: g.filter(
104
- (t) => t.value === k
104
+ (l) => l.value === k
105
105
  ),
106
- onChange: (t) => T((t == null ? void 0 : t.value) || "")
106
+ onChange: (l) => T(l?.value || "")
107
107
  }
108
108
  ) }),
109
109
  /* @__PURE__ */ e(u, { label: "Please provide details: (optional)", children: /* @__PURE__ */ e(
@@ -116,7 +116,7 @@ const g = [
116
116
  ) })
117
117
  ] })
118
118
  ] }),
119
- /* @__PURE__ */ o("div", { className: "flex justify-end gap-2", children: [
119
+ /* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: [
120
120
  /* @__PURE__ */ e(
121
121
  C,
122
122
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatCustomAction.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'react'\nimport Button from '@/components/ui/Button'\nimport Input from '@/components/ui/Input'\nimport Select from '@/components/ui/Select'\nimport Notification from '@/components/ui/Notification'\nimport toast from '@/components/ui/toast'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport Dialog from '@/components/ui/Dialog'\nimport Tooltip from '@/components/ui/Tooltip'\nimport classNames from '@/utils/classNames'\nimport {\n TbThumbUp,\n TbThumbUpFilled,\n TbThumbDown,\n TbThumbDownFilled,\n TbCopy,\n TbCheck,\n} from 'react-icons/tb'\n\ntype ChatCustomActionProps = {\n content: string\n}\n\nconst responseOption = [\n { label: 'Not factually correct', value: 'notFactuallyCorrect' },\n { label: 'Harmful content', value: 'harmfulContent' },\n { label: 'Overeactive refusal', value: 'overeactiveRefusal' },\n { label: 'Other', value: 'other' },\n]\n\nconst ChatCustomAction = ({ content }: ChatCustomActionProps) => {\n const detailInput = useRef<HTMLTextAreaElement>(null)\n const [copied, setCopied] = useState(false)\n const [selected, setSelected] = useState('')\n const [responseSend, setResponSend] = useState('')\n const [responseDialog, setResponseDialog] = useState<{\n type: string\n open: boolean\n }>({\n type: '',\n open: false,\n })\n\n const btnClass =\n 'p-2 rounded-full hover:bg-black hover:bg-opacity-5 hover:text-gray-900 dark:hover:bg-black dark:hover:text-gray-100 dark:hover:bg-opacity-40 transition-colors duration-300 ease-in-out'\n\n useEffect(() => {\n if (copied && content) {\n navigator.clipboard.writeText(content)\n if (copied) {\n const copyFeedbackInterval = setTimeout(\n () => setCopied(false),\n 2000,\n )\n\n return () => {\n clearTimeout(copyFeedbackInterval)\n }\n }\n }\n }, [copied, content])\n\n const handleDialogClose = () => {\n setResponseDialog({\n type: '',\n open: false,\n })\n }\n\n const handleSubmit = () => {\n setResponSend(responseDialog.type)\n handleDialogClose()\n toast.push(\n <Notification type=\"success\">\n Thanks for your feedback!\n </Notification>,\n { placement: 'top-center' },\n )\n }\n\n return (\n <>\n <div className=\"flex mt-0.5\">\n <Tooltip title={copied ? 'Copied' : 'Copy'} placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() => setCopied(true)}\n >\n {copied ? (\n <TbCheck className=\"text-emerald-500\" />\n ) : (\n <TbCopy />\n )}\n </button>\n </Tooltip>\n <Tooltip title=\"Good response\" placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() =>\n setResponseDialog({ type: 'praise', open: true })\n }\n >\n {responseSend === 'praise' ? (\n <TbThumbUpFilled />\n ) : (\n <TbThumbUp />\n )}\n </button>\n </Tooltip>\n <Tooltip title=\"Bad response\" placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() =>\n setResponseDialog({ type: 'blame', open: true })\n }\n >\n {responseSend === 'blame' ? (\n <TbThumbDownFilled />\n ) : (\n <TbThumbDown />\n )}\n </button>\n </Tooltip>\n </div>\n <Dialog\n isOpen={responseDialog.open}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h5 className=\"mb-4\">Feedback</h5>\n <Form onSubmit={handleSubmit}>\n {responseDialog.type === 'praise' && (\n <FormItem label=\"Please provide details: (optional)\">\n <Input\n ref={detailInput}\n textArea\n placeholder=\"What was statifying about this response?\"\n />\n </FormItem>\n )}\n {responseDialog.type === 'blame' && (\n <>\n <FormItem label=\"What type of issue do you wish to report? (optional)\">\n <Select\n options={responseOption}\n value={responseOption.filter(\n (response) =>\n response.value === selected,\n )}\n onChange={(option) =>\n setSelected(option?.value || '')\n }\n />\n </FormItem>\n <FormItem label=\"Please provide details: (optional)\">\n <Input\n ref={detailInput}\n textArea\n placeholder=\"What was unstatifying about this response?\"\n />\n </FormItem>\n </>\n )}\n </Form>\n <div className=\"flex justify-end gap-2\">\n <Button\n className=\"ltr:mr-2 rtl:ml-2\"\n variant=\"plain\"\n type=\"button\"\n onClick={handleDialogClose}\n >\n Cancel\n </Button>\n <Button\n variant=\"solid\"\n type=\"submit\"\n onClick={handleSubmit}\n >\n Submit\n </Button>\n </div>\n </Dialog>\n </>\n )\n}\n\nexport default ChatCustomAction\n"],"names":["responseOption","ChatCustomAction","content","detailInput","useRef","copied","setCopied","useState","selected","setSelected","responseSend","setResponSend","responseDialog","setResponseDialog","btnClass","useEffect","copyFeedbackInterval","handleDialogClose","handleSubmit","toast","jsx","Notification","jsxs","Fragment","Tooltip","classNames","TbCheck","TbCopy","TbThumbUpFilled","TbThumbUp","TbThumbDownFilled","TbThumbDown","Dialog","Form","FormItem","Input","Select","response","option","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,IAAiB;AAAA,EACnB,EAAE,OAAO,yBAAyB,OAAO,sBAAA;AAAA,EACzC,EAAE,OAAO,mBAAmB,OAAO,iBAAA;AAAA,EACnC,EAAE,OAAO,uBAAuB,OAAO,qBAAA;AAAA,EACvC,EAAE,OAAO,SAAS,OAAO,QAAA;AAC7B,GAEMC,KAAmB,CAAC,EAAE,SAAAC,QAAqC;AAC7D,QAAMC,IAAcC,EAA4B,IAAI,GAC9C,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAE,GACrC,CAACG,GAAcC,CAAa,IAAIJ,EAAS,EAAE,GAC3C,CAACK,GAAgBC,CAAiB,IAAIN,EAGzC;AAAA,IACC,MAAM;AAAA,IACN,MAAM;AAAA,EAAA,CACT,GAEKO,IACF;AAEJ,EAAAC,EAAU,MAAM;AACZ,QAAIV,KAAUH,MACV,UAAU,UAAU,UAAUA,CAAO,GACjCG,IAAQ;AACR,YAAMW,IAAuB;AAAA,QACzB,MAAMV,EAAU,EAAK;AAAA,QACrB;AAAA,MAAA;AAGJ,aAAO,MAAM;AACT,qBAAaU,CAAoB;AAAA,MACrC;AAAA,IACJ;AAA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,EAAC,OAAA,EAAI,WAAU,0BACX,UAAA;AAAA,YAAA,gBAAAF;AAAA,cAACmB;AAAA,cAAA;AAAA,gBACG,WAAU;AAAA,gBACV,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAAStB;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAGD,gBAAAG;AAAA,cAACmB;AAAA,cAAA;AAAA,gBACG,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAASrB;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
1
+ {"version":3,"file":"ChatCustomAction.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'react'\nimport Button from '@/components/ui/Button'\nimport Input from '@/components/ui/Input'\nimport Select from '@/components/ui/Select'\nimport Notification from '@/components/ui/Notification'\nimport toast from '@/components/ui/toast'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport Dialog from '@/components/ui/Dialog'\nimport Tooltip from '@/components/ui/Tooltip'\nimport classNames from '@/utils/classNames'\nimport {\n TbThumbUp,\n TbThumbUpFilled,\n TbThumbDown,\n TbThumbDownFilled,\n TbCopy,\n TbCheck,\n} from 'react-icons/tb'\n\ntype ChatCustomActionProps = {\n content: string\n}\n\nconst responseOption = [\n { label: 'Not factually correct', value: 'notFactuallyCorrect' },\n { label: 'Harmful content', value: 'harmfulContent' },\n { label: 'Overeactive refusal', value: 'overeactiveRefusal' },\n { label: 'Other', value: 'other' },\n]\n\nconst ChatCustomAction = ({ content }: ChatCustomActionProps) => {\n const detailInput = useRef<HTMLTextAreaElement>(null)\n const [copied, setCopied] = useState(false)\n const [selected, setSelected] = useState('')\n const [responseSend, setResponSend] = useState('')\n const [responseDialog, setResponseDialog] = useState<{\n type: string\n open: boolean\n }>({\n type: '',\n open: false,\n })\n\n const btnClass =\n 'p-2 rounded-full hover:bg-black hover:bg-opacity-5 hover:text-gray-900 dark:hover:bg-black dark:hover:text-gray-100 dark:hover:bg-opacity-40 transition-colors duration-300 ease-in-out'\n\n useEffect(() => {\n if (copied && content) {\n navigator.clipboard.writeText(content)\n if (copied) {\n const copyFeedbackInterval = setTimeout(\n () => setCopied(false),\n 2000,\n )\n\n return () => {\n clearTimeout(copyFeedbackInterval)\n }\n }\n }\n }, [copied, content])\n\n const handleDialogClose = () => {\n setResponseDialog({\n type: '',\n open: false,\n })\n }\n\n const handleSubmit = () => {\n setResponSend(responseDialog.type)\n handleDialogClose()\n toast.push(\n <Notification type=\"success\">\n Thanks for your feedback!\n </Notification>,\n { placement: 'top-center' },\n )\n }\n\n return (\n <>\n <div className=\"flex mt-0.5\">\n <Tooltip title={copied ? 'Copied' : 'Copy'} placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() => setCopied(true)}\n >\n {copied ? (\n <TbCheck className=\"text-emerald-500\" />\n ) : (\n <TbCopy />\n )}\n </button>\n </Tooltip>\n <Tooltip title=\"Good response\" placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() =>\n setResponseDialog({ type: 'praise', open: true })\n }\n >\n {responseSend === 'praise' ? (\n <TbThumbUpFilled />\n ) : (\n <TbThumbUp />\n )}\n </button>\n </Tooltip>\n <Tooltip title=\"Bad response\" placement=\"bottom\">\n <button\n className={classNames(btnClass, 'text-lg')}\n onClick={() =>\n setResponseDialog({ type: 'blame', open: true })\n }\n >\n {responseSend === 'blame' ? (\n <TbThumbDownFilled />\n ) : (\n <TbThumbDown />\n )}\n </button>\n </Tooltip>\n </div>\n <Dialog\n isOpen={responseDialog.open}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h5 className=\"mb-4\">Feedback</h5>\n <Form onSubmit={handleSubmit}>\n {responseDialog.type === 'praise' && (\n <FormItem label=\"Please provide details: (optional)\">\n <Input\n ref={detailInput}\n textArea\n placeholder=\"What was statifying about this response?\"\n />\n </FormItem>\n )}\n {responseDialog.type === 'blame' && (\n <>\n <FormItem label=\"What type of issue do you wish to report? (optional)\">\n <Select\n options={responseOption}\n value={responseOption.filter(\n (response) =>\n response.value === selected,\n )}\n onChange={(option) =>\n setSelected(option?.value || '')\n }\n />\n </FormItem>\n <FormItem label=\"Please provide details: (optional)\">\n <Input\n ref={detailInput}\n textArea\n placeholder=\"What was unstatifying about this response?\"\n />\n </FormItem>\n </>\n )}\n </Form>\n <div className=\"flex justify-end gap-2\">\n <Button\n className=\"ltr:mr-2 rtl:ml-2\"\n variant=\"plain\"\n type=\"button\"\n onClick={handleDialogClose}\n >\n Cancel\n </Button>\n <Button\n variant=\"solid\"\n type=\"submit\"\n onClick={handleSubmit}\n >\n Submit\n </Button>\n </div>\n </Dialog>\n </>\n )\n}\n\nexport default ChatCustomAction\n"],"names":["responseOption","ChatCustomAction","content","detailInput","useRef","copied","setCopied","useState","selected","setSelected","responseSend","setResponSend","responseDialog","setResponseDialog","btnClass","useEffect","copyFeedbackInterval","handleDialogClose","handleSubmit","toast","jsx","Notification","jsxs","Fragment","Tooltip","classNames","TbCheck","TbCopy","TbThumbUpFilled","TbThumbUp","TbThumbDownFilled","TbThumbDown","Dialog","Form","FormItem","Input","Select","response","option","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,IAAiB;AAAA,EACnB,EAAE,OAAO,yBAAyB,OAAO,sBAAA;AAAA,EACzC,EAAE,OAAO,mBAAmB,OAAO,iBAAA;AAAA,EACnC,EAAE,OAAO,uBAAuB,OAAO,qBAAA;AAAA,EACvC,EAAE,OAAO,SAAS,OAAO,QAAA;AAC7B,GAEMC,KAAmB,CAAC,EAAE,SAAAC,QAAqC;AAC7D,QAAMC,IAAcC,EAA4B,IAAI,GAC9C,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAUC,CAAW,IAAIF,EAAS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MACGA,EAAS,UAAU7B;AAAA,kBAAA;AAAA,kBAE3B,UAAU,CAAC8B,MACP7B,EAAY6B,GAAQ,SAAS,EAAE;AAAA,gBAAA;AAAA,cAAA,GAG3C;AAAA,cACA,gBAAAlB,EAACc,GAAA,EAAS,OAAM,sCACZ,UAAA,gBAAAd;AAAA,gBAACe;AAAA,gBAAA;AAAA,kBACG,KAAKhC;AAAA,kBACL,UAAQ;AAAA,kBACR,aAAY;AAAA,gBAAA;AAAA,cAAA,EAChB,CACJ;AAAA,YAAA,EAAA,CACJ;AAAA,UAAA,GAER;AAAA,UACA,gBAAAmB,EAAC,OAAA,EAAI,WAAU,0BACX,UAAA;AAAA,YAAA,gBAAAF;AAAA,cAACmB;AAAA,cAAA;AAAA,gBACG,WAAU;AAAA,gBACV,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAAStB;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAGD,gBAAAG;AAAA,cAACmB;AAAA,cAAA;AAAA,gBACG,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAASrB;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
@@ -1,111 +1,109 @@
1
- import { jsx as I, Fragment as b } from "react/jsx-runtime";
2
- import { useState as E, useMemo as g, createElement as P, useEffect as L } from "react";
3
- import T from "../../../../../utils/hooks/useInterval .js";
4
- import { getCurrentNodeOverflow as y, getStringPosition as C } from "../utils.js";
5
- import S from "html-react-parser";
6
- import { marked as W } from "marked";
7
- const c = ({
8
- children: u,
9
- delay: m = 25,
10
- onFinish: h = () => {
1
+ import { jsx as A, Fragment as a } from "react/jsx-runtime";
2
+ import { useState as k, useMemo as h, createElement as j, useEffect as v } from "react";
3
+ import b from "../../../../../utils/hooks/useInterval .js";
4
+ import { getCurrentNodeOverflow as c, getStringPosition as g } from "../utils.js";
5
+ import E from "html-react-parser";
6
+ import { marked as L } from "marked";
7
+ const T = ({
8
+ children: f,
9
+ delay: l = 25,
10
+ onFinish: m = () => {
11
11
  }
12
12
  }) => {
13
- const [p, A] = E(0), l = g(() => {
14
- const n = [], s = (r) => {
15
- var o;
16
- const t = (o = r == null ? void 0 : r.props) == null ? void 0 : o.children;
17
- return Array.isArray(r) && r.forEach((e) => {
18
- typeof e == "object" ? s(e) : typeof e == "string" && n.push(e.split(" ").length);
19
- }), t === void 0 && typeof r == "string" && n.push(r.split(" ").length), typeof t == "object" && s(t), typeof t == "string" && n.push(t.split(" ").length), n;
13
+ const [o, y] = k(0), u = h(() => {
14
+ const r = [], n = (i) => {
15
+ const t = i?.props?.children;
16
+ return Array.isArray(i) && i.forEach((s) => {
17
+ typeof s == "object" ? n(s) : typeof s == "string" && r.push(s.split(" ").length);
18
+ }), t === void 0 && typeof i == "string" && r.push(i.split(" ").length), typeof t == "object" && n(t), typeof t == "string" && r.push(t.split(" ").length), r;
20
19
  };
21
- return s(u);
22
- }, [u]), j = g(
23
- () => l.reduce((n, s) => n + s, 0),
24
- [l]
25
- ), x = g(() => {
26
- let n = 0, s = 0;
27
- const r = (t) => {
28
- var e;
29
- if (n > p)
20
+ return n(f);
21
+ }, [f]), C = h(
22
+ () => u.reduce((r, n) => r + n, 0),
23
+ [u]
24
+ ), I = h(() => {
25
+ let r = 0, n = 0;
26
+ const i = (t) => {
27
+ if (r > o)
30
28
  return null;
31
- const o = (e = t == null ? void 0 : t.props) == null ? void 0 : e.children;
29
+ const s = t?.props?.children;
32
30
  if (Array.isArray(t)) {
33
- const f = [];
34
- return t.forEach((i) => {
35
- if (typeof i == "object")
36
- f.push(r(i));
37
- else if (typeof i == "string") {
38
- n += i.split(" ").length, s++;
39
- const [k, v] = y(l, p);
40
- k < s && f.push(
41
- i.slice(
31
+ const p = [];
32
+ return t.forEach((e) => {
33
+ if (typeof e == "object")
34
+ p.push(i(e));
35
+ else if (typeof e == "string") {
36
+ r += e.split(" ").length, n++;
37
+ const [P, x] = c(u, o);
38
+ P < n && p.push(
39
+ e.slice(
42
40
  0,
43
- C(
44
- i,
41
+ g(
42
+ e,
45
43
  " ",
46
- v
44
+ x
47
45
  )
48
46
  )
49
- ), f.push(i);
47
+ ), p.push(e);
50
48
  }
51
- }), f;
49
+ }), p;
52
50
  }
53
- if (o === void 0 && typeof t == "string") {
54
- n += t.split(" ").length, s++;
55
- const [f, i] = y(
56
- l,
57
- p
51
+ if (s === void 0 && typeof t == "string") {
52
+ r += t.split(" ").length, n++;
53
+ const [p, e] = c(
54
+ u,
55
+ o
58
56
  );
59
- return f < s ? t.slice(
57
+ return p < n ? t.slice(
60
58
  0,
61
- C(t, " ", i)
59
+ g(t, " ", e)
62
60
  ) : t;
63
61
  }
64
- if (typeof o == "object")
65
- return P(
62
+ if (typeof s == "object")
63
+ return j(
66
64
  t.type,
67
- t == null ? void 0 : t.props,
68
- r(o)
65
+ t?.props,
66
+ i(s)
69
67
  );
70
- if (typeof o == "string") {
71
- n += o.split(" ").length, s++;
72
- const [f, i] = y(
73
- l,
74
- p
68
+ if (typeof s == "string") {
69
+ r += s.split(" ").length, n++;
70
+ const [p, e] = c(
71
+ u,
72
+ o
75
73
  );
76
- return f < s ? P(
74
+ return p < n ? j(
77
75
  t.type,
78
- t == null ? void 0 : t.props,
79
- o.slice(
76
+ t?.props,
77
+ s.slice(
80
78
  0,
81
- C(
82
- o,
79
+ g(
80
+ s,
83
81
  " ",
84
- i
82
+ e
85
83
  )
86
84
  )
87
85
  ) : t;
88
86
  }
89
87
  };
90
- return r(u);
91
- }, [u, p, l]);
92
- return T(
88
+ return i(f);
89
+ }, [f, o, u]);
90
+ return b(
93
91
  () => {
94
- A((n) => (n + 1 >= j && h(), n + 1));
92
+ y((r) => (r + 1 >= C && m(), r + 1));
95
93
  },
96
- j > p ? m : null
97
- ), L(() => {
98
- A(0);
99
- }, [u]), x;
100
- }, q = ({
101
- content: u = "",
102
- triggerTyping: m,
103
- onFinish: h
94
+ C > o ? l : null
95
+ ), v(() => {
96
+ y(0);
97
+ }, [f]), I;
98
+ }, M = ({
99
+ content: f = "",
100
+ triggerTyping: l,
101
+ onFinish: m
104
102
  }) => {
105
- const p = S(W(u));
106
- return /* @__PURE__ */ I(b, { children: m ? /* @__PURE__ */ I(c, { onFinish: h, children: p }) : p });
103
+ const o = E(L(f));
104
+ return /* @__PURE__ */ A(a, { children: l ? /* @__PURE__ */ A(T, { onFinish: m, children: o }) : o });
107
105
  };
108
106
  export {
109
- q as default
107
+ M as default
110
108
  };
111
109
  //# sourceMappingURL=ChatCustomContent.js.map