@orbe-agro/client-core 5.3.85 → 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
@@ -5,47 +5,47 @@ import "../../../../../components/ui/Button/index.js";
5
5
  import x from "./ChatHistory.js";
6
6
  import { usGenerativeChatStore as f } from "../store/generativeChatStore.js";
7
7
  import N from "../../../../../utils/hooks/useDebounce.js";
8
- import s from "../../../../../utils/classNames.js";
9
- import { TbSearch as b } from "react-icons/tb";
10
- import g from "../../../../../components/ui/Card/Card.js";
11
- import v from "../../../../../components/ui/Button/Button.js";
12
- const I = ({ className: n, bodyClass: l, onClick: t }) => {
13
- const [c, a] = u(""), { setSelectedConversation: m } = f();
14
- function p(r) {
15
- a == null || a(r.target.value);
8
+ import r from "../../../../../utils/classNames.js";
9
+ import { TbSearch as C } from "react-icons/tb";
10
+ import b from "../../../../../components/ui/Card/Card.js";
11
+ import g from "../../../../../components/ui/Button/Button.js";
12
+ const G = ({ className: n, bodyClass: l, onClick: a }) => {
13
+ const [s, c] = u(""), { setSelectedConversation: m } = f();
14
+ function i(t) {
15
+ c?.(t.target.value);
16
16
  }
17
- const h = N(p, 500), i = (r) => {
18
- h(r);
17
+ const p = N(i, 500), h = (t) => {
18
+ p(t);
19
19
  }, d = () => {
20
- m(""), t == null || t();
20
+ m(""), a?.();
21
21
  };
22
22
  return /* @__PURE__ */ o(
23
- g,
23
+ b,
24
24
  {
25
25
  header: {
26
26
  content: /* @__PURE__ */ o("div", { className: "flex items-center gap-2 px-5 w-full h-[60px]", children: [
27
- /* @__PURE__ */ e(b, { className: "text-xl" }),
27
+ /* @__PURE__ */ e(C, { className: "text-xl" }),
28
28
  /* @__PURE__ */ e(
29
29
  "input",
30
30
  {
31
31
  className: "flex-1 h-full placeholder:text-gray-400 placeholder:text-base bg-transparent focus:outline-none heading-text",
32
32
  placeholder: "Search chat",
33
- onChange: i
33
+ onChange: h
34
34
  }
35
35
  )
36
36
  ] }),
37
37
  className: "p-0"
38
38
  },
39
- className: s("flex-1 xl:max-w-[320px] h-full", n),
40
- bodyClass: s("h-[calc(100%-60px-80px)] p-0", l),
39
+ className: r("flex-1 xl:max-w-[320px] h-full", n),
40
+ bodyClass: r("h-[calc(100%-60px-80px)] p-0", l),
41
41
  children: [
42
- /* @__PURE__ */ e(x, { queryText: c, onClick: t }),
43
- /* @__PURE__ */ e("div", { className: "px-5 py-2", children: /* @__PURE__ */ e(v, { block: !0, variant: "solid", onClick: d, children: "New chat" }) })
42
+ /* @__PURE__ */ e(x, { queryText: s, onClick: a }),
43
+ /* @__PURE__ */ e("div", { className: "px-5 py-2", children: /* @__PURE__ */ e(g, { block: !0, variant: "solid", onClick: d, children: "New chat" }) })
44
44
  ]
45
45
  }
46
46
  );
47
47
  };
48
48
  export {
49
- I as default
49
+ G as default
50
50
  };
51
51
  //# sourceMappingURL=ChatSideNav.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSideNav.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/components/ChatSideNav.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Card from '@/components/ui/Card'\nimport Button from '@/components/ui/Button'\nimport ChatHistory from './ChatHistory'\nimport { usGenerativeChatStore } from '../store/generativeChatStore'\nimport useDebounce from '@/utils/hooks/useDebounce'\nimport classNames from '@/utils/classNames'\nimport { TbSearch } from 'react-icons/tb'\nimport type { ChangeEvent } from 'react'\nimport type { CardProps } from '@/components/ui/Card'\n\ntype ChatSideNavProps = Pick<CardProps, 'className' | 'bodyClass'> & {\n onClick?: () => void\n}\n\nconst ChatSideNav = ({ className, bodyClass, onClick }: ChatSideNavProps) => {\n const [queryText, setQueryText] = useState('')\n\n const { setSelectedConversation } = usGenerativeChatStore()\n\n function handleDebounceFn(e: ChangeEvent<HTMLInputElement>) {\n setQueryText?.(e.target.value)\n }\n\n const debounceFn = useDebounce(handleDebounceFn, 500)\n\n const handleInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n debounceFn(e)\n }\n\n const handleNewChat = () => {\n setSelectedConversation('')\n onClick?.()\n }\n\n return (\n <Card\n header={{\n content: (\n <div className=\"flex items-center gap-2 px-5 w-full h-[60px]\">\n <TbSearch className=\"text-xl\" />\n <input\n className=\"flex-1 h-full placeholder:text-gray-400 placeholder:text-base bg-transparent focus:outline-none heading-text\"\n placeholder=\"Search chat\"\n onChange={handleInputChange}\n />\n </div>\n ),\n className: 'p-0',\n }}\n className={classNames('flex-1 xl:max-w-[320px] h-full', className)}\n bodyClass={classNames('h-[calc(100%-60px-80px)] p-0', bodyClass)}\n >\n <ChatHistory queryText={queryText} onClick={onClick} />\n <div className=\"px-5 py-2\">\n <Button block variant=\"solid\" onClick={handleNewChat}>\n New chat\n </Button>\n </div>\n </Card>\n )\n}\n\nexport default ChatSideNav\n"],"names":["ChatSideNav","className","bodyClass","onClick","queryText","setQueryText","useState","setSelectedConversation","usGenerativeChatStore","handleDebounceFn","e","debounceFn","useDebounce","handleInputChange","handleNewChat","jsxs","Card","jsx","TbSearch","classNames","ChatHistory","Button"],"mappings":";;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ai/Chat/components/ChatSideNav.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Card from '@/components/ui/Card'\nimport Button from '@/components/ui/Button'\nimport ChatHistory from './ChatHistory'\nimport { usGenerativeChatStore } from '../store/generativeChatStore'\nimport useDebounce from '@/utils/hooks/useDebounce'\nimport classNames from '@/utils/classNames'\nimport { TbSearch } from 'react-icons/tb'\nimport type { ChangeEvent } from 'react'\nimport type { CardProps } from '@/components/ui/Card'\n\ntype ChatSideNavProps = Pick<CardProps, 'className' | 'bodyClass'> & {\n onClick?: () => void\n}\n\nconst ChatSideNav = ({ className, bodyClass, onClick }: ChatSideNavProps) => {\n const [queryText, setQueryText] = useState('')\n\n const { setSelectedConversation } = usGenerativeChatStore()\n\n function handleDebounceFn(e: ChangeEvent<HTMLInputElement>) {\n setQueryText?.(e.target.value)\n }\n\n const debounceFn = useDebounce(handleDebounceFn, 500)\n\n const handleInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n debounceFn(e)\n }\n\n const handleNewChat = () => {\n setSelectedConversation('')\n onClick?.()\n }\n\n return (\n <Card\n header={{\n content: (\n <div className=\"flex items-center gap-2 px-5 w-full h-[60px]\">\n <TbSearch className=\"text-xl\" />\n <input\n className=\"flex-1 h-full placeholder:text-gray-400 placeholder:text-base bg-transparent focus:outline-none heading-text\"\n placeholder=\"Search chat\"\n onChange={handleInputChange}\n />\n </div>\n ),\n className: 'p-0',\n }}\n className={classNames('flex-1 xl:max-w-[320px] h-full', className)}\n bodyClass={classNames('h-[calc(100%-60px-80px)] p-0', bodyClass)}\n >\n <ChatHistory queryText={queryText} onClick={onClick} />\n <div className=\"px-5 py-2\">\n <Button block variant=\"solid\" onClick={handleNewChat}>\n New chat\n </Button>\n </div>\n </Card>\n )\n}\n\nexport default ChatSideNav\n"],"names":["ChatSideNav","className","bodyClass","onClick","queryText","setQueryText","useState","setSelectedConversation","usGenerativeChatStore","handleDebounceFn","e","debounceFn","useDebounce","handleInputChange","handleNewChat","jsxs","Card","jsx","Tb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/jsx-runtime";
1
+ import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
2
  import { useRef as p, useEffect as d, useMemo as C } from "react";
3
3
  import "../../../../../components/ui/Card/index.js";
4
4
  import "../../../../../components/view/ChatBox/index.js";
@@ -11,62 +11,58 @@ import E from "../hooks/useChatSend.js";
11
11
  import S from "../../../../../components/ui/Card/Card.js";
12
12
  import b from "../../../../../components/view/ChatBox/ChatBox.js";
13
13
  const V = () => {
14
- const n = p(null), { selectedConversation: e, chatHistory: i, isTyping: l, disabledChatFresh: s } = w(), { handleSend: c } = E(), a = () => {
15
- var t;
16
- if ((t = n.current) != null && t.getScrollElement) {
17
- const o = n.current.getScrollElement();
18
- o && (o.scrollTop = o.scrollHeight);
14
+ const r = p(null), { selectedConversation: e, chatHistory: n, isTyping: i, disabledChatFresh: l } = w(), { handleSend: s } = E(), a = () => {
15
+ if (r.current?.getScrollElement) {
16
+ const t = r.current.getScrollElement();
17
+ t && (t.scrollTop = t.scrollHeight);
19
18
  }
20
19
  };
21
20
  d(() => {
22
21
  a();
23
- }, [e, i]);
24
- const h = C(() => {
25
- const t = i.find(
26
- (o) => o.id === e
27
- );
28
- return (t == null ? void 0 : t.conversation) || [];
29
- }, [e, i]), m = async ({
22
+ }, [e, n]);
23
+ const c = C(() => n.find(
24
+ (f) => f.id === e
25
+ )?.conversation || [], [e, n]), h = async ({
30
26
  value: t
31
27
  }) => {
32
- await c(t);
33
- }, f = (t) => {
34
- s(t), a();
28
+ await s(t);
29
+ }, m = (t) => {
30
+ l(t), a();
35
31
  };
36
32
  return /* @__PURE__ */ u(S, { className: "flex-1 h-full", bodyClass: "h-full", children: [
37
- /* @__PURE__ */ r(x, {}),
38
- /* @__PURE__ */ r(
33
+ /* @__PURE__ */ o(x, {}),
34
+ /* @__PURE__ */ o(
39
35
  b,
40
36
  {
41
- ref: n,
42
- messageList: h,
37
+ ref: r,
38
+ messageList: c,
43
39
  placeholder: "Enter a prompt here",
44
40
  showMessageList: !!e,
45
41
  showAvatar: !0,
46
42
  avatarGap: !0,
47
43
  containerClass: "h-[calc(100%-30px)] xl:h-full",
48
44
  messageListClass: "h-[calc(100%-100px)] xl:h-[calc(100%-70px)]",
49
- typing: l ? {
45
+ typing: i ? {
50
46
  id: "ai",
51
47
  name: "Chat AI",
52
48
  avatarImageUrl: "/img/thumbs/ai.jpg"
53
49
  } : !1,
54
- customRenderer: (t) => t.sender.id === "ai" ? /* @__PURE__ */ r(
50
+ customRenderer: (t) => t.sender.id === "ai" ? /* @__PURE__ */ o(
55
51
  v,
56
52
  {
57
53
  content: t.content,
58
54
  triggerTyping: t.fresh ? t.fresh : !1,
59
- onFinish: () => f(t.id)
55
+ onFinish: () => m(t.id)
60
56
  }
61
57
  ) : t.content,
62
- customAction: (t) => t.sender.id === "ai" ? /* @__PURE__ */ r(
58
+ customAction: (t) => t.sender.id === "ai" ? /* @__PURE__ */ o(
63
59
  y,
64
60
  {
65
61
  content: t.content
66
62
  }
67
63
  ) : null,
68
- onInputChange: m,
69
- children: !e && /* @__PURE__ */ r(g, {})
64
+ onInputChange: h,
65
+ children: !e && /* @__PURE__ */ o(g, {})
70
66
  }
71
67
  )
72
68
  ] });
@@ -1 +1 @@
1
- {"version":3,"file":"ChatView.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx"],"sourcesContent":["import { useRef, useEffect, useMemo } from 'react'\nimport Card from '@/components/ui/Card'\nimport ChatBox from '@/components/view/ChatBox'\nimport ChatLandingView from './ChatLandingView'\nimport ChatMobileNav from './ChatMobileNav'\nimport ChatCustomContent from './ChatCustomContent'\nimport ChatCustomAction from './ChatCustomAction'\nimport { usGenerativeChatStore } from '../store/generativeChatStore'\nimport useChatSend from '../hooks/useChatSend'\nimport type { ScrollBarRef } from '@/components/ui/ScrollBar'\n\nconst ChatView = () => {\n const scrollRef = useRef<ScrollBarRef>(null)\n const { selectedConversation, chatHistory, isTyping, disabledChatFresh } =\n usGenerativeChatStore()\n const { handleSend } = useChatSend()\n\n const scrollToBottom = () => {\n if (scrollRef.current?.getScrollElement) {\n const scrollElement = scrollRef.current.getScrollElement()\n if (scrollElement) {\n scrollElement.scrollTop = scrollElement.scrollHeight\n }\n }\n }\n\n useEffect(() => {\n scrollToBottom()\n }, [selectedConversation, chatHistory])\n\n const messageList = useMemo(() => {\n const chat = chatHistory.find(\n (chat) => chat.id === selectedConversation,\n )\n return chat?.conversation || []\n }, [selectedConversation, chatHistory])\n\n const handleInputChange = async ({\n value,\n }: {\n value: string\n attachments?: File[]\n }) => {\n await handleSend(value)\n }\n\n const handleFinish = (id: string) => {\n disabledChatFresh(id)\n scrollToBottom()\n }\n\n return (\n <Card className=\"flex-1 h-full\" bodyClass=\"h-full\">\n <ChatMobileNav />\n <ChatBox\n ref={scrollRef}\n messageList={messageList}\n placeholder=\"Enter a prompt here\"\n showMessageList={Boolean(selectedConversation)}\n showAvatar={true}\n avatarGap={true}\n containerClass=\"h-[calc(100%-30px)] xl:h-full\"\n messageListClass=\"h-[calc(100%-100px)] xl:h-[calc(100%-70px)]\"\n typing={\n isTyping\n ? {\n id: 'ai',\n name: 'Chat AI',\n avatarImageUrl: '/img/thumbs/ai.jpg',\n }\n : false\n }\n customRenderer={(message) => {\n if (message.sender.id === 'ai') {\n return (\n <ChatCustomContent\n content={message.content as string}\n triggerTyping={\n message.fresh ? message.fresh : false\n }\n onFinish={() => handleFinish(message.id)}\n />\n )\n }\n\n return message.content\n }}\n customAction={(message) => {\n if (message.sender.id === 'ai') {\n return (\n <ChatCustomAction\n content={message.content as string}\n />\n )\n }\n\n return null\n }}\n onInputChange={handleInputChange}\n >\n {!selectedConversation && <ChatLandingView />}\n </ChatBox>\n </Card>\n )\n}\n\nexport default ChatView\n"],"names":["ChatView","scrollRef","useRef","selectedConversation","chatHistory","isTyping","disabledChatFresh","usGenerativeChatStore","handleSend","useChatSend","scrollToBottom","_a","scrollElement","useEffect","messageList","useMemo","chat","handleInputChange","value","handleFinish","id","jsxs","Card","jsx","ChatMob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AAAA,UACI,IAAI;AAAA,UACJ,MAAM;AAAA,UACN,gBAAgB;AAAA,QAAA,IAEpB;AAAA,QAEV,gBAAgB,CAACqB,MACTA,EAAQ,OAAO,OAAO,OAElB,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACG,SAASD,EAAQ;AAAA,YACjB,eACIA,EAAQ,QAAQA,EAAQ,QAAQ;AAAA,YAEpC,UAAU,MAAMP,EAAaO,EAAQ,EAAE;AAAA,UAAA;AAAA,QAAA,IAK5CA,EAAQ;AAAA,QAEnB,cAAc,CAACA,MACPA,EAAQ,OAAO,OAAO,OAElB,gBAAAH;AAAA,UAACK;AAAA,UAAA;AAAA,YACG,SAASF,EAAQ;AAAA,UAAA;AAAA,QAAA,IAKtB;AAAA,QAEX,eAAeT;AAAA,QAEd,UAAA,CAACd,KAAwB,gBAAAoB,EAACM,GAAA,CAAA,CAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/C,GACJ;AAER;"}
1
+ {"version":3,"file":"ChatView.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx"],"sourcesContent":["import { useRef, useEffect, useMemo } from 'react'\nimport Card from '@/components/ui/Card'\nimport ChatBox from '@/components/view/ChatBox'\nimport ChatLandingView from './ChatLandingView'\nimport ChatMobileNav from './ChatMobileNav'\nimport ChatCustomContent from './ChatCustomContent'\nimport ChatCustomAction from './ChatCustomAction'\nimport { usGenerativeChatStore } from '../store/generativeChatStore'\nimport useChatSend from '../hooks/useChatSend'\nimport type { ScrollBarRef } from '@/components/ui/ScrollBar'\n\nconst ChatView = () => {\n const scrollRef = useRef<ScrollBarRef>(null)\n const { selectedConversation, chatHistory, isTyping, disabledChatFresh } =\n usGenerativeChatStore()\n const { handleSend } = useChatSend()\n\n const scrollToBottom = () => {\n if (scrollRef.current?.getScrollElement) {\n const scrollElement = scrollRef.current.getScrollElement()\n if (scrollElement) {\n scrollElement.scrollTop = scrollElement.scrollHeight\n }\n }\n }\n\n useEffect(() => {\n scrollToBottom()\n }, [selectedConversation, chatHistory])\n\n const messageList = useMemo(() => {\n const chat = chatHistory.find(\n (chat) => chat.id === selectedConversation,\n )\n return chat?.conversation || []\n }, [selectedConversation, chatHistory])\n\n const handleInputChange = async ({\n value,\n }: {\n value: string\n attachments?: File[]\n }) => {\n await handleSend(value)\n }\n\n const handleFinish = (id: string) => {\n disabledChatFresh(id)\n scrollToBottom()\n }\n\n return (\n <Card className=\"flex-1 h-full\" bodyClass=\"h-full\">\n <ChatMobileNav />\n <ChatBox\n ref={scrollRef}\n messageList={messageList}\n placeholder=\"Enter a prompt here\"\n showMessageList={Boolean(selectedConversation)}\n showAvatar={true}\n avatarGap={true}\n containerClass=\"h-[calc(100%-30px)] xl:h-full\"\n messageListClass=\"h-[calc(100%-100px)] xl:h-[calc(100%-70px)]\"\n typing={\n isTyping\n ? {\n id: 'ai',\n name: 'Chat AI',\n avatarImageUrl: '/img/thumbs/ai.jpg',\n }\n : false\n }\n customRenderer={(message) => {\n if (message.sender.id === 'ai') {\n return (\n <ChatCustomContent\n content={message.content as string}\n triggerTyping={\n message.fresh ? message.fresh : false\n }\n onFinish={() => handleFinish(message.id)}\n />\n )\n }\n\n return message.content\n }}\n customAction={(message) => {\n if (message.sender.id === 'ai') {\n return (\n <ChatCustomAction\n content={message.content as string}\n />\n )\n }\n\n return null\n }}\n onInputChange={handleInputChange}\n >\n {!selectedConversation && <ChatLandingView />}\n </ChatBox>\n </Card>\n )\n}\n\nexport default ChatView\n"],"names":["ChatView","scrollRef","useRef","selectedConversation","chatHistory","isTyping","disabledChatFresh","usGenerativeChatStore","handleSend","useChatSend","scrollToBottom","scrollElement","useEffect","messageList","useMemo","chat","handleInputChange","value","handleFinish","id","jsxs","Card","jsx","ChatMobileNav","ChatBox","message","ChatCustomContent","ChatCustomAction","ChatLandingView"],"mappings":";;;;;;;;;;;;AAWA,MAAMA,IAAW,MAAM;AACnB,QAAMC,IAAYC,EAAqB,IAAI,GACrC,EAAE,sBA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,QAAQ;AAAA,YAEpC,UAAU,MAAMP,EAAaO,EAAQ,EAAE;AAAA,UAAA;AAAA,QAAA,IAK5CA,EAAQ;AAAA,QAEnB,cAAc,CAACA,MACPA,EAAQ,OAAO,OAAO,OAElB,gBAAAH;AAAA,UAACK;AAAA,UAAA;AAAA,YACG,SAASF,EAAQ;AAAA,UAAA;AAAA,QAAA,IAKtB;AAAA,QAEX,eAAeT;AAAA,QAEd,UAAA,CAACb,KAAwB,gBAAAmB,EAACM,GAAA,CAAA,CAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/C,GACJ;AAER;"}
@@ -1,5 +1,5 @@
1
- import { create as a } from "zustand";
2
- const c = {
1
+ import { create as n } from "zustand";
2
+ const a = {
3
3
  selectedConversation: "",
4
4
  selectedConversationRecord: [],
5
5
  chatHistory: [],
@@ -9,30 +9,24 @@ const c = {
9
9
  open: !1
10
10
  },
11
11
  isTyping: !1
12
- }, d = a((r, s) => ({
13
- ...c,
14
- setSelectedConversation: (e) => r(() => ({ selectedConversation: e })),
15
- setChatHistory: (e) => r(() => ({ chatHistory: e })),
16
- setChatHistoryName: (e) => r(() => ({ chatHistory: s().chatHistory.map((i) => (i.id === e.id && (i.title = e.title), i)) })),
17
- setRenameDialog: (e) => r(() => ({ renameDialog: e })),
18
- setSelectedConversationRecord: (e) => r(() => {
19
- let t = s().selectedConversationRecord;
20
- return t.includes(e) ? t = t.filter((i) => i !== e) : t.push(e), { selectedConversationRecord: t };
12
+ }, l = n((i, o) => ({
13
+ ...a,
14
+ setSelectedConversation: (e) => i(() => ({ selectedConversation: e })),
15
+ setChatHistory: (e) => i(() => ({ chatHistory: e })),
16
+ setChatHistoryName: (e) => i(() => ({ chatHistory: o().chatHistory.map((r) => (r.id === e.id && (r.title = e.title), r)) })),
17
+ setRenameDialog: (e) => i(() => ({ renameDialog: e })),
18
+ setSelectedConversationRecord: (e) => i(() => {
19
+ let t = o().selectedConversationRecord;
20
+ return t.includes(e) ? t = t.filter((r) => r !== e) : t.push(e), { selectedConversationRecord: t };
21
21
  }),
22
- pushChatHistory: (e) => r(() => ({ chatHistory: [e, ...s().chatHistory] })),
23
- pushConversation: (e, t) => r(() => ({ chatHistory: s().chatHistory.map((o) => {
24
- var n;
25
- return o.id === e && (o.conversation || (o.conversation = []), (n = o.conversation) == null || n.push(t)), o;
26
- }) })),
27
- setIsTyping: (e) => r(() => ({ isTyping: e })),
28
- disabledChatFresh: () => r(() => ({ chatHistory: s().chatHistory.map((t) => {
29
- var i;
30
- return t.id === s().selectedConversation && (t.conversation = (i = t.conversation) == null ? void 0 : i.map(
31
- (o) => (o.fresh && (o.fresh = !1), o)
32
- )), t;
33
- }) }))
22
+ pushChatHistory: (e) => i(() => ({ chatHistory: [e, ...o().chatHistory] })),
23
+ pushConversation: (e, t) => i(() => ({ chatHistory: o().chatHistory.map((s) => (s.id === e && (s.conversation || (s.conversation = []), s.conversation?.push(t)), s)) })),
24
+ setIsTyping: (e) => i(() => ({ isTyping: e })),
25
+ disabledChatFresh: () => i(() => ({ chatHistory: o().chatHistory.map((t) => (t.id === o().selectedConversation && (t.conversation = t.conversation?.map(
26
+ (r) => (r.fresh && (r.fresh = !1), r)
27
+ )), t)) }))
34
28
  }));
35
29
  export {
36
- d as usGenerativeChatStore
30
+ l as usGenerativeChatStore
37
31
  };
38
32
  //# sourceMappingURL=generativeChatStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generativeChatStore.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/store/generativeChatStore.ts"],"sourcesContent":["import { create } from 'zustand'\nimport type { ChatHistories, ChatHistory, Conversation } from '../types'\n\ntype RenameDialog = {\n id: string\n title: string\n open: boolean\n}\n\nexport type GenerativeChatState = {\n selectedConversation: string\n selectedConversationRecord: string[]\n chatHistory: ChatHistories\n renameDialog: RenameDialog\n isTyping: boolean\n}\n\ntype GenerativeChatAction = {\n setSelectedConversation: (payload: string) => void\n setSelectedConversationRecord: (payload: string) => void\n setChatHistory: (payload: ChatHistories) => void\n setChatHistoryName: (payload: { id: string; title: string }) => void\n setRenameDialog: (payload: RenameDialog) => void\n setIsTyping: (payload: boolean) => void\n pushChatHistory: (payload: ChatHistory) => void\n pushConversation: (id: string, conversation: Conversation) => void\n disabledChatFresh: (id: string) => void\n}\n\nconst initialState: GenerativeChatState = {\n selectedConversation: '',\n selectedConversationRecord: [],\n chatHistory: [],\n renameDialog: {\n id: '',\n title: '',\n open: false,\n },\n isTyping: false,\n}\n\nexport const usGenerativeChatStore = create<\n GenerativeChatState & GenerativeChatAction\n>((set, get) => ({\n ...initialState,\n setSelectedConversation: (payload) =>\n set(() => ({ selectedConversation: payload })),\n setChatHistory: (payload) => set(() => ({ chatHistory: payload })),\n setChatHistoryName: (payload) =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === payload.id) {\n chat.title = payload.title\n }\n return chat\n })\n return { chatHistory }\n }),\n setRenameDialog: (payload) => set(() => ({ renameDialog: payload })),\n setSelectedConversationRecord: (payload) =>\n set(() => {\n let record = get().selectedConversationRecord\n\n if (record.includes(payload)) {\n record = record.filter((item) => item !== payload)\n } else {\n record.push(payload)\n }\n\n return { selectedConversationRecord: record }\n }),\n pushChatHistory: (payload) =>\n set(() => ({ chatHistory: [...[payload], ...get().chatHistory] })),\n pushConversation: (id, conversation) =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === id) {\n if (!chat.conversation) {\n chat.conversation = []\n }\n chat.conversation?.push(conversation)\n }\n return chat\n })\n return { chatHistory }\n }),\n setIsTyping: (payload) => set(() => ({ isTyping: payload })),\n disabledChatFresh: () =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === get().selectedConversation) {\n chat.conversation = chat.conversation?.map(\n (conversation) => {\n if (conversation.fresh) {\n conversation.fresh = false\n }\n return conversation\n },\n )\n }\n return chat\n })\n return { chatHistory }\n }),\n}))\n"],"names":["initialState","usGenerativeChatStore","create","set","get","payload","chat","record","item","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ACD,MAAYF,EAAI,OAAO,EAAE,UAAUE,IAAU;AAAA,EAC3D,mBAAmB,MACfF,EAAI,OAcO,EAAE,aAbWC,EAAA,EAAM,YAAY,IAAI,CAACE,MAAS;;AAChD,WAAIA,EAAK,OAAOF,EAAA,EAAM,yBAClBE,EAAK,gBAAeK,IAAAL,EAAK,iBAAL,gBAAAK,EAAmB;AAAA,MACnC,CAACD,OACOA,EAAa,UACbA,EAAa,QAAQ,KAElBA;AAAA,QAIZJ;AAAA,EACX,CAAC,EACQ,EACZ;AACT,EAAE;"}
1
+ {"version":3,"file":"generativeChatStore.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Chat/store/generativeChatStore.ts"],"sourcesContent":["import { create } from 'zustand'\nimport type { ChatHistories, ChatHistory, Conversation } from '../types'\n\ntype RenameDialog = {\n id: string\n title: string\n open: boolean\n}\n\nexport type GenerativeChatState = {\n selectedConversation: string\n selectedConversationRecord: string[]\n chatHistory: ChatHistories\n renameDialog: RenameDialog\n isTyping: boolean\n}\n\ntype GenerativeChatAction = {\n setSelectedConversation: (payload: string) => void\n setSelectedConversationRecord: (payload: string) => void\n setChatHistory: (payload: ChatHistories) => void\n setChatHistoryName: (payload: { id: string; title: string }) => void\n setRenameDialog: (payload: RenameDialog) => void\n setIsTyping: (payload: boolean) => void\n pushChatHistory: (payload: ChatHistory) => void\n pushConversation: (id: string, conversation: Conversation) => void\n disabledChatFresh: (id: string) => void\n}\n\nconst initialState: GenerativeChatState = {\n selectedConversation: '',\n selectedConversationRecord: [],\n chatHistory: [],\n renameDialog: {\n id: '',\n title: '',\n open: false,\n },\n isTyping: false,\n}\n\nexport const usGenerativeChatStore = create<\n GenerativeChatState & GenerativeChatAction\n>((set, get) => ({\n ...initialState,\n setSelectedConversation: (payload) =>\n set(() => ({ selectedConversation: payload })),\n setChatHistory: (payload) => set(() => ({ chatHistory: payload })),\n setChatHistoryName: (payload) =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === payload.id) {\n chat.title = payload.title\n }\n return chat\n })\n return { chatHistory }\n }),\n setRenameDialog: (payload) => set(() => ({ renameDialog: payload })),\n setSelectedConversationRecord: (payload) =>\n set(() => {\n let record = get().selectedConversationRecord\n\n if (record.includes(payload)) {\n record = record.filter((item) => item !== payload)\n } else {\n record.push(payload)\n }\n\n return { selectedConversationRecord: record }\n }),\n pushChatHistory: (payload) =>\n set(() => ({ chatHistory: [...[payload], ...get().chatHistory] })),\n pushConversation: (id, conversation) =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === id) {\n if (!chat.conversation) {\n chat.conversation = []\n }\n chat.conversation?.push(conversation)\n }\n return chat\n })\n return { chatHistory }\n }),\n setIsTyping: (payload) => set(() => ({ isTyping: payload })),\n disabledChatFresh: () =>\n set(() => {\n const chatHistory = get().chatHistory.map((chat) => {\n if (chat.id === get().selectedConversation) {\n chat.conversation = chat.conversation?.map(\n (conversation) => {\n if (conversation.fresh) {\n conversation.fresh = false\n }\n return conversation\n },\n )\n }\n return chat\n })\n return { chatHistory }\n }),\n}))\n"],"names":["initialState","usGenerativeChatStore","create","set","get","payload","chat","record","item","id","conversation"],"mappings":";AA6BA,MAAMA,IAAoC;AAAA,EACtC,sBAAsB;AAAA,EACtB,4BAA4B,CAAA;AAAA,EAC5B,aAAa,CAAA;AAAA,EACb,cAAc;AAAA,IACV,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAEV,UAAU;AACd,GAEaC,IAAwBC,EAEnC,CAACC,GAAKC,OAAS;AAAA,EACb,GAAGJ;AAAA,EACH,yBAAyB,CAACK,MACtBF,EAAI,OAAO,EAAE,sBAAsBE,IAAU;AAAA,EACjD,gBAAgB,CAACA,MAAYF,EAAI,OAAO,EAAE,aAAaE,IAAU;AAAA,EACjE,oBAAoB,CAACA,MACjBF,EAAI,OAOO,EAAE,aANWC,EAAA,EAAM,YAAY,IAAI,CAACE,OACnCA,EAAK,OAAOD,EAAQ,OACpBC,EAAK,QAAQD,EAAQ,QAElBC,EACV,EACQ,EACZ;AAAA,EACL,iBAAiB,CAACD,MAAYF,EAAI,OAAO,EAAE,cAAcE,IAAU;AAAA,EACnE,+BAA+B,CAACA,MAC5BF,EAAI,MAAM;AACN,QAAII,IAASH,IAAM;AAEnB,WAAIG,EAAO,SAASF,CAAO,IACvBE,IAASA,EAAO,OAAO,CAACC,MAASA,MAASH,CAAO,IAEjDE,EAAO,KAAKF,CAAO,GAGhB,EAAE,4BAA4BE,EAAA;AAAA,EACzC,CAAC;AAAA,EACL,iBAAiB,CAACF,MACdF,EAAI,OAAO,EAAE,aAAa,CAAKE,GAAU,GAAGD,IAAM,WAAW,IAAI;AAAA,EACrE,kBAAkB,CAACK,GAAIC,MACnBP,EAAI,OAUO,EAAE,aATWC,EAAA,EAAM,YAAY,IAAI,CAACE,OACnCA,EAAK,OAAOG,MACPH,EAAK,iBACNA,EAAK,eAAe,CAAA,IAExBA,EAAK,cAAc,KAAKI,CAAY,IAEjCJ,EACV,EACQ,EACZ;AAAA,EACL,aAAa,CAACD,MAAYF,EAAI,OAAO,EAAE,UAAUE,IAAU;AAAA,EAC3D,mBAAmB,MACfF,EAAI,OAcO,EAAE,aAbWC,EAAA,EAAM,YAAY,IAAI,CAACE,OACnCA,EAAK,OAAOF,EAAA,EAAM,yBAClBE,EAAK,eAAeA,EAAK,cAAc;AAAA,IACnC,CAACI,OACOA,EAAa,UACbA,EAAa,QAAQ,KAElBA;AAAA,EACX,IAGDJ,EACV,EACQ,EACZ;AACT,EAAE;"}
@@ -1,44 +1,44 @@
1
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
- import { useMemo as u } from "react";
3
- import { Avatar as p } from "../../../../../components/ui/Avatar/index.js";
1
+ import { jsx as n, jsxs as o } from "react/jsx-runtime";
2
+ import { useMemo as p } from "react";
3
+ import { Avatar as l } from "../../../../../components/ui/Avatar/index.js";
4
4
  import "../../../../../components/ui/Button/index.js";
5
5
  import { Dropdown as c } from "../../../../../components/ui/Dropdown/index.js";
6
- import v from "../../../../../components/ui/Button/Button.js";
7
- const N = (i) => {
8
- const { list: s = [], onSelect: m, value: n } = i, r = u(() => s.find((a) => a.value === n), [s, n]);
9
- return /* @__PURE__ */ o(
6
+ import d from "../../../../../components/ui/Button/Button.js";
7
+ const g = (i) => {
8
+ const { list: r = [], onSelect: t, value: a } = i, s = p(() => r.find((e) => e.value === a), [r, a]);
9
+ return /* @__PURE__ */ n(
10
10
  c,
11
11
  {
12
- renderTitle: /* @__PURE__ */ o(v, { size: "sm", className: "py-1", children: /* @__PURE__ */ l("div", { className: "flex gap-2 items-center", children: [
13
- (r == null ? void 0 : r.isIcon) && /* @__PURE__ */ o("span", { className: "text-xl", children: r.icon }),
14
- !(r != null && r.isIcon) && (r == null ? void 0 : r.image) && /* @__PURE__ */ o(
15
- p,
12
+ renderTitle: /* @__PURE__ */ n(d, { size: "sm", className: "py-1", children: /* @__PURE__ */ o("div", { className: "flex gap-2 items-center", children: [
13
+ s?.isIcon && /* @__PURE__ */ n("span", { className: "text-xl", children: s.icon }),
14
+ !s?.isIcon && s?.image && /* @__PURE__ */ n(
15
+ l,
16
16
  {
17
- src: r.image,
17
+ src: s.image,
18
18
  size: 28,
19
19
  shape: "round"
20
20
  }
21
21
  ),
22
- r == null ? void 0 : r.label
22
+ s?.label
23
23
  ] }) }),
24
- children: s.map((a) => /* @__PURE__ */ l(
24
+ children: r.map((e) => /* @__PURE__ */ o(
25
25
  c.Item,
26
26
  {
27
- eventKey: a.value,
28
- active: a.value === (r == null ? void 0 : r.value),
29
- onSelect: m,
27
+ eventKey: e.value,
28
+ active: e.value === s?.value,
29
+ onSelect: t,
30
30
  children: [
31
- a.isIcon && /* @__PURE__ */ o("span", { className: "text-xl", children: a.icon }),
32
- !a.isIcon && a.image && /* @__PURE__ */ o(p, { src: a.image, size: 28, shape: "round" }),
33
- /* @__PURE__ */ o("span", { children: a.label })
31
+ e.isIcon && /* @__PURE__ */ n("span", { className: "text-xl", children: e.icon }),
32
+ !e.isIcon && e.image && /* @__PURE__ */ n(l, { src: e.image, size: 28, shape: "round" }),
33
+ /* @__PURE__ */ n("span", { children: e.label })
34
34
  ]
35
35
  },
36
- a.value
36
+ e.value
37
37
  ))
38
38
  }
39
39
  );
40
40
  };
41
41
  export {
42
- N as default
42
+ g as default
43
43
  };
44
44
  //# sourceMappingURL=ConfigDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigDropdown.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Image/components/ConfigDropdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport Avatar from '@/components/ui/Avatar'\nimport Button from '@/components/ui/Button'\nimport Dropdown from '@/components/ui/Dropdown'\nimport type { ReactNode } from 'react'\n\ntype ConfigDropdownProps = {\n list: {\n label: string\n value: string\n image?: string\n icon?: ReactNode\n isIcon?: boolean\n }[]\n onSelect: (value: string) => void\n value: string\n}\n\nconst ConfigDropdown = (props: ConfigDropdownProps) => {\n const { list = [], onSelect, value } = props\n\n const selectedSetting = useMemo(() => {\n return list.find((item) => item.value === value)\n }, [list, value])\n\n return (\n <Dropdown\n renderTitle={\n <Button size=\"sm\" className=\"py-1\">\n <div className=\"flex gap-2 items-center\">\n {selectedSetting?.isIcon && (\n <span className=\"text-xl\">\n {selectedSetting.icon}\n </span>\n )}\n {!selectedSetting?.isIcon && selectedSetting?.image && (\n <Avatar\n src={selectedSetting.image}\n size={28}\n shape=\"round\"\n />\n )}\n {selectedSetting?.label}\n </div>\n </Button>\n }\n >\n {list.map((item) => (\n <Dropdown.Item\n key={item.value}\n eventKey={item.value}\n active={item.value === selectedSetting?.value}\n onSelect={onSelect}\n >\n {item.isIcon && (\n <span className=\"text-xl\">{item.icon}</span>\n )}\n {!item.isIcon && item.image && (\n <Avatar src={item.image} size={28} shape=\"round\" />\n )}\n <span>{item.label}</span>\n </Dropdown.Item>\n ))}\n </Dropdown>\n )\n}\n\nexport default ConfigDropdown\n"],"names":["ConfigDropdown","props","list","onSelect","value","selectedSetting","useMemo","item","jsx","Dropdown","Button","jsxs","Avatar"],"mappings":";;;;;;AAkBA,MAAMA,IAAiB,CAACC,MAA+B;AACnD,QAAM,EAAE,MAAAC,IAAO,CAAA,GAAI,UAAAC,GAAU,OAAAC,MAAUH,GAEjCI,IAAkBC,EAAQ,MACrBJ,EAAK,KAAK,CAACK,MAASA,EAAK,UAAUH,CAAK,GAChD,CAACF,GAAME,CAAK,CAAC;AAEhB,SACI,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,aACI,gBAAAD,EAACE,GAAA,EAAO,MAAK,MAAK,WAAU,QACxB,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,2BACV,UAAA;AAAA,SAAAN,KAAA,gBAAAA,EAAiB,WACd,gBAAAG,EAAC,QAAA,EAAK,WAAU,WACX,YAAgB,MACrB;AAAA,QAEH,EAACH,KAAA,QAAAA,EAAiB,YAAUA,KAAA,gBAAAA,EAAiB,UAC1C,gBAAAG;AAAA,UAACI;AAAA,UAAA;AAAA,YACG,KAAKP,EAAgB;AAAA,YACrB,MAAM;AAAA,YACN,OAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAGbA,KAAA,gBAAAA,EAAiB;AAAA,MAAA,EAAA,CACtB,EAAA,CACJ;AAAA,MAGH,UAAAH,EAAK,IAAI,CAACK,MACP,gBAAAI;AAAA,QAACF,EAAS;AAAA,QAAT;AAAA,UAEG,UAAUF,EAAK;AAAA,UACf,QAAQA,EAAK,WAAUF,KAAA,gBAAAA,EAAiB;AAAA,UACxC,UAAAF;AAAA,UAEC,UAAA;AAAA,YAAAI,EAAK,UACF,gBAAAC,EAAC,QAAA,EAAK,WAAU,WAAW,YAAK,MAAK;AAAA,YAExC,CAACD,EAAK,UAAUA,EAAK,SAClB,gBAAAC,EAACI,GAAA,EAAO,KAAKL,EAAK,OAAO,MAAM,IAAI,OAAM,QAAA,CAAQ;AAAA,YAErD,gBAAAC,EAAC,QAAA,EAAM,UAAAD,EAAK,MAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAXbA,EAAK;AAAA,MAAA,CAajB;AAAA,IAAA;AAAA,EAAA;AAGb;"}
1
+ {"version":3,"file":"ConfigDropdown.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Image/components/ConfigDropdown.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport Avatar from '@/components/ui/Avatar'\nimport Button from '@/components/ui/Button'\nimport Dropdown from '@/components/ui/Dropdown'\nimport type { ReactNode } from 'react'\n\ntype ConfigDropdownProps = {\n list: {\n label: string\n value: string\n image?: string\n icon?: ReactNode\n isIcon?: boolean\n }[]\n onSelect: (value: string) => void\n value: string\n}\n\nconst ConfigDropdown = (props: ConfigDropdownProps) => {\n const { list = [], onSelect, value } = props\n\n const selectedSetting = useMemo(() => {\n return list.find((item) => item.value === value)\n }, [list, value])\n\n return (\n <Dropdown\n renderTitle={\n <Button size=\"sm\" className=\"py-1\">\n <div className=\"flex gap-2 items-center\">\n {selectedSetting?.isIcon && (\n <span className=\"text-xl\">\n {selectedSetting.icon}\n </span>\n )}\n {!selectedSetting?.isIcon && selectedSetting?.image && (\n <Avatar\n src={selectedSetting.image}\n size={28}\n shape=\"round\"\n />\n )}\n {selectedSetting?.label}\n </div>\n </Button>\n }\n >\n {list.map((item) => (\n <Dropdown.Item\n key={item.value}\n eventKey={item.value}\n active={item.value === selectedSetting?.value}\n onSelect={onSelect}\n >\n {item.isIcon && (\n <span className=\"text-xl\">{item.icon}</span>\n )}\n {!item.isIcon && item.image && (\n <Avatar src={item.image} size={28} shape=\"round\" />\n )}\n <span>{item.label}</span>\n </Dropdown.Item>\n ))}\n </Dropdown>\n )\n}\n\nexport default ConfigDropdown\n"],"names":["ConfigDropdown","props","list","onSelect","value","selectedSetting","useMemo","item","jsx","Dropdown","Button","jsxs","Avatar"],"mappings":";;;;;;AAkBA,MAAMA,IAAiB,CAACC,MAA+B;AACnD,QAAM,EAAE,MAAAC,IAAO,CAAA,GAAI,UAAAC,GAAU,OAAAC,MAAUH,GAEjCI,IAAkBC,EAAQ,MACrBJ,EAAK,KAAK,CAACK,MAASA,EAAK,UAAUH,CAAK,GAChD,CAACF,GAAME,CAAK,CAAC;AAEhB,SACI,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,aACI,gBAAAD,EAACE,GAAA,EAAO,MAAK,MAAK,WAAU,QACxB,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,2BACV,UAAA;AAAA,QAAAN,GAAiB,UACd,gBAAAG,EAAC,QAAA,EAAK,WAAU,WACX,YAAgB,MACrB;AAAA,QAEH,CAACH,GAAiB,UAAUA,GAAiB,SAC1C,gBAAAG;AAAA,UAACI;AAAA,UAAA;AAAA,YACG,KAAKP,EAAgB;AAAA,YACrB,MAAM;AAAA,YACN,OAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAGbA,GAAiB;AAAA,MAAA,EAAA,CACtB,EAAA,CACJ;AAAA,MAGH,UAAAH,EAAK,IAAI,CAACK,MACP,gBAAAI;AAAA,QAACF,EAAS;AAAA,QAAT;AAAA,UAEG,UAAUF,EAAK;AAAA,UACf,QAAQA,EAAK,UAAUF,GAAiB;AAAA,UACxC,UAAAF;AAAA,UAEC,UAAA;AAAA,YAAAI,EAAK,UACF,gBAAAC,EAAC,QAAA,EAAK,WAAU,WAAW,YAAK,MAAK;AAAA,YAExC,CAACD,EAAK,UAAUA,EAAK,SAClB,gBAAAC,EAACI,GAAA,EAAO,KAAKL,EAAK,OAAO,MAAM,IAAI,OAAM,QAAA,CAAQ;AAAA,YAErD,gBAAAC,EAAC,QAAA,EAAM,UAAAD,EAAK,MAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAXbA,EAAK;AAAA,MAAA,CAajB;AAAA,IAAA;AAAA,EAAA;AAGb;"}
@@ -16,63 +16,62 @@ import U from "../../../../../components/ui/Notification/Notification.js";
16
16
  import z from "../../../../../components/ui/CloseButton/CloseButton.js";
17
17
  import B from "../../../../../components/ui/Tooltip/Tooltip.js";
18
18
  import D from "../../../../../components/ui/Upload/Upload.js";
19
- import m from "../../../../../components/ui/Button/Button.js";
19
+ import s from "../../../../../components/ui/Button/Button.js";
20
20
  const oe = () => {
21
- const [p, d] = C([]), {
21
+ const [c, m] = C([]), {
22
22
  generatorConfig: a,
23
- setGeneratorConfig: f,
24
- resetGeneratorConfig: g,
25
- onGenerateImage: u,
26
- onGenerateImageComplete: h,
27
- setGeneratedImage: x,
28
- isGeneratingImage: v
29
- } = G(), c = N(null), y = () => {
30
- g();
31
- }, b = async () => {
32
- var n, s;
33
- const e = (n = c.current) == null ? void 0 : n.value;
23
+ setGeneratorConfig: p,
24
+ resetGeneratorConfig: d,
25
+ onGenerateImage: f,
26
+ onGenerateImageComplete: g,
27
+ setGeneratedImage: u,
28
+ isGeneratingImage: h
29
+ } = G(), n = N(null), x = () => {
30
+ d();
31
+ }, v = async () => {
32
+ const e = n.current?.value;
34
33
  if (!e) {
35
34
  P.push(
36
35
  /* @__PURE__ */ t(U, { title: "Please enter prompt", type: "danger" }),
37
36
  {
38
37
  placement: "top-center"
39
38
  }
40
- ), (s = c.current) == null || s.focus();
39
+ ), n.current?.focus();
41
40
  return;
42
41
  }
43
- u();
42
+ f();
44
43
  const o = await k(
45
44
  { prompt: e }
46
45
  );
47
- o && x(o), h();
46
+ o && u(o), g();
48
47
  }, i = (e, o) => {
49
- f({ key: e, value: o });
50
- }, w = (e) => {
48
+ p({ key: e, value: o });
49
+ }, y = (e) => {
51
50
  let o = !0;
52
- const n = ["image/jpeg", "image/png", "image/webp"];
51
+ const b = ["image/jpeg", "image/png", "image/webp"];
53
52
  if (e)
54
- for (const s of e)
55
- n.includes(s.type) || (o = "Please upload a .jpeg or .png file!");
53
+ for (const w of e)
54
+ b.includes(w.type) || (o = "Please upload a .jpeg or .png file!");
56
55
  return o;
57
56
  };
58
57
  return /* @__PURE__ */ r("div", { className: "rounded-lg p-4 border-2 border-gray-100 dark:border-gray-700", children: [
59
58
  /* @__PURE__ */ r("div", { className: "flex gap-4 mb-4", children: [
60
- p.length > 0 && /* @__PURE__ */ r("div", { className: "max-w-[150px] relative cursor-pointer group", children: [
59
+ c.length > 0 && /* @__PURE__ */ r("div", { className: "max-w-[150px] relative cursor-pointer group", children: [
61
60
  /* @__PURE__ */ t(
62
61
  "img",
63
62
  {
64
63
  className: "rounded-xl",
65
- src: URL.createObjectURL(p[0])
64
+ src: URL.createObjectURL(c[0])
66
65
  }
67
66
  ),
68
- /* @__PURE__ */ t("div", { className: "opacity-0 group-hover:opacity-100 bg-black/75 group-hover:flex items-center justify-center rounded-xl absolute top-0 left-0 w-full h-full transition-colors", children: /* @__PURE__ */ t(z, { onClick: () => d([]) }) })
67
+ /* @__PURE__ */ t("div", { className: "opacity-0 group-hover:opacity-100 bg-black/75 group-hover:flex items-center justify-center rounded-xl absolute top-0 left-0 w-full h-full transition-colors", children: /* @__PURE__ */ t(z, { onClick: () => m([]) }) })
69
68
  ] }),
70
69
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
71
70
  /* @__PURE__ */ t("div", { className: "heading-text text-base font-semibold", children: "Prompt" }),
72
71
  /* @__PURE__ */ t(
73
72
  "textarea",
74
73
  {
75
- ref: c,
74
+ ref: n,
76
75
  className: "w-full resize-none mt-1 placeholder:text-gray-400 bg-transparent focus:outline-none heading-text",
77
76
  placeholder: "Decribe the image you want to generate"
78
77
  }
@@ -85,10 +84,10 @@ const oe = () => {
85
84
  D,
86
85
  {
87
86
  showList: !1,
88
- beforeUpload: w,
87
+ beforeUpload: y,
89
88
  uploadLimit: 1,
90
- onChange: d,
91
- children: /* @__PURE__ */ t(m, { size: "sm", icon: /* @__PURE__ */ t(L, {}) })
89
+ onChange: m,
90
+ children: /* @__PURE__ */ t(s, { size: "sm", icon: /* @__PURE__ */ t(L, {}) })
92
91
  }
93
92
  ) }),
94
93
  /* @__PURE__ */ t(
@@ -133,15 +132,15 @@ const oe = () => {
133
132
  )
134
133
  ] }),
135
134
  /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row sm:justify-end gap-4", children: [
136
- /* @__PURE__ */ t(m, { size: "sm", shape: "circle", onClick: y, children: "Clear" }),
135
+ /* @__PURE__ */ t(s, { size: "sm", shape: "circle", onClick: x, children: "Clear" }),
137
136
  /* @__PURE__ */ t(
138
- m,
137
+ s,
139
138
  {
140
139
  size: "sm",
141
140
  variant: "solid",
142
141
  shape: "circle",
143
- loading: v,
144
- onClick: b,
142
+ loading: h,
143
+ onClick: v,
145
144
  children: "Generate"
146
145
  }
147
146
  )
@@ -1 +1 @@
1
- {"version":3,"file":"GeneratorPrompt.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Tooltip from '@/components/ui/Tooltip'\nimport Upload from '@/components/ui/Upload'\nimport toast from '@/components/ui/toast'\nimport Notification from '@/components/ui/Notification'\nimport CloseButton from '@/components/ui/CloseButton'\nimport ConfigDropdown from './ConfigDropdown'\nimport { useImageGeneratorStore } from '../store/imageGeneratorStore'\nimport {\n aspectRatioOptions,\n styleOptions,\n toneOptions,\n lightingOptions,\n cameraOptions,\n} from '../utils'\nimport { apiPostImages } from '@/services/AiService'\nimport { LuImage } from 'react-icons/lu'\nimport { ConfigsVariant, PostImageResponse } from '../type'\n\nconst GeneratorPrompt = () => {\n const [uploadedImage, setUploadedImage] = useState<File[]>([])\n\n const {\n generatorConfig,\n setGeneratorConfig,\n resetGeneratorConfig,\n onGenerateImage,\n onGenerateImageComplete,\n setGeneratedImage,\n isGeneratingImage,\n } = useImageGeneratorStore()\n\n const promptRef = useRef<HTMLTextAreaElement>(null)\n\n const handleClear = () => {\n resetGeneratorConfig()\n }\n\n const handleGenerate = async () => {\n const prompt = promptRef.current?.value\n\n if (!prompt) {\n toast.push(\n <Notification title={'Please enter prompt'} type=\"danger\" />,\n {\n placement: 'top-center',\n },\n )\n promptRef.current?.focus()\n\n return\n }\n onGenerateImage()\n const resp = await apiPostImages<PostImageResponse, { prompt: string }>(\n { prompt },\n )\n if (resp) {\n setGeneratedImage(resp)\n }\n onGenerateImageComplete()\n }\n\n const handleSetGeneratorConfig = (key: ConfigsVariant, value: string) => {\n setGeneratorConfig({ key, value })\n }\n\n const beforeUpload = (files: FileList | null) => {\n let valid: string | boolean = true\n\n const allowedFileType = ['image/jpeg', 'image/png', 'image/webp']\n\n if (files) {\n for (const f of files) {\n if (!allowedFileType.includes(f.type)) {\n valid = 'Please upload a .jpeg or .png file!'\n }\n }\n }\n\n return valid\n }\n\n return (\n <div className=\"rounded-lg p-4 border-2 border-gray-100 dark:border-gray-700\">\n <div className=\"flex gap-4 mb-4\">\n {uploadedImage.length > 0 && (\n <div className=\"max-w-[150px] relative cursor-pointer group\">\n {\n <img\n className=\"rounded-xl\"\n src={URL.createObjectURL(uploadedImage[0])}\n />\n }\n <div className=\"opacity-0 group-hover:opacity-100 bg-black/75 group-hover:flex items-center justify-center rounded-xl absolute top-0 left-0 w-full h-full transition-colors\">\n <CloseButton onClick={() => setUploadedImage([])} />\n </div>\n </div>\n )}\n <div className=\"flex-1\">\n <div className=\"heading-text text-base font-semibold\">\n Prompt\n </div>\n <textarea\n ref={promptRef}\n className=\"w-full resize-none mt-1 placeholder:text-gray-400 bg-transparent focus:outline-none heading-text\"\n placeholder=\"Decribe the image you want to generate\"\n />\n </div>\n </div>\n <div className=\"flex flex-col lg:flex-row gap-6 justify-between\">\n <div className=\"inline-flex flex-wrap gap-2\">\n <Tooltip title=\"Add image\">\n <Upload\n showList={false}\n beforeUpload={beforeUpload}\n uploadLimit={1}\n onChange={setUploadedImage}\n >\n <Button size=\"sm\" icon={<LuImage />} />\n </Upload>\n </Tooltip>\n <ConfigDropdown\n list={aspectRatioOptions}\n value={generatorConfig.aspectRatio}\n onSelect={(value) =>\n handleSetGeneratorConfig('aspectRatio', value)\n }\n />\n <ConfigDropdown\n list={styleOptions}\n value={generatorConfig.style}\n onSelect={(value) =>\n handleSetGeneratorConfig('style', value)\n }\n />\n <ConfigDropdown\n list={toneOptions}\n value={generatorConfig.tone}\n onSelect={(value) =>\n handleSetGeneratorConfig('tone', value)\n }\n />\n <ConfigDropdown\n list={lightingOptions}\n value={generatorConfig.lighting}\n onSelect={(value) =>\n handleSetGeneratorConfig('lighting', value)\n }\n />\n <ConfigDropdown\n list={cameraOptions}\n value={generatorConfig.camera}\n onSelect={(value) =>\n handleSetGeneratorConfig('camera', value)\n }\n />\n </div>\n <div className=\"flex flex-col sm:flex-row sm:justify-end gap-4\">\n <Button size=\"sm\" shape=\"circle\" onClick={handleClear}>\n Clear\n </Button>\n <Button\n size=\"sm\"\n variant=\"solid\"\n shape=\"circle\"\n loading={isGeneratingImage}\n onClick={handleGenerate}\n >\n Generate\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\nexport default GeneratorPrompt\n"],"names":["GeneratorPrompt","uploadedImage","setUploadedImage","useState","generatorConfig","setGeneratorConfig","resetGeneratorConfig","onGenerateImage","onGenerateImageComplete","setGeneratedImage","isGeneratingImage","useImageGeneratorStore","promptRef","useRef","handleClear","handleGenerate","prompt","_a","toast","jsx","Notification","_b","resp","apiPostImages","handleSetGeneratorConfig","key","value","beforeUpload","files","valid","allowedFileType","f","jsxs","CloseButton","Tooltip","Upload","Button","LuImage","ConfigDropdown","aspectRatioOptions","styleOptions","toneOptions","lightingOptions","cameraOptions"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAAkB,MAAM;AAC1B,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAiB,CAAA,CAAE,GAEvD;AAAA,IACF,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,IACAC,EAAA,GAEEC,IAAYC,EAA4B,IAAI,GAE5CC,IAAc,MAAM;AACtB,IAAA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AA,UAACmB;AAAA,UAAA;AAAA,YACG,MAAMI;AAAA,YACN,OAAOtC,EAAgB;AAAA,YACvB,UAAU,CAACsB,MACPF,EAAyB,YAAYE,CAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAGlD,gBAAAP;AAAA,UAACmB;AAAA,UAAA;AAAA,YACG,MAAMK;AAAA,YACN,OAAOvC,EAAgB;AAAA,YACvB,UAAU,CAACsB,MACPF,EAAyB,UAAUE,CAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAEhD,GACJ;AAAA,MACA,gBAAAM,EAAC,OAAA,EAAI,WAAU,kDACX,UAAA;AAAA,QAAA,gBAAAb,EAACiB,KAAO,MAAK,MAAK,OAAM,UAAS,SAAStB,GAAa,UAAA,QAAA,CAEvD;AAAA,QACA,gBAAAK;AAAA,UAACiB;AAAA,UAAA;AAAA,YACG,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,SAAS1B;AAAA,YACT,SAASK;AAAA,YACZ,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAED,EAAA,CACJ;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
1
+ {"version":3,"file":"GeneratorPrompt.js","sources":["../../../../../../../lib/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Tooltip from '@/components/ui/Tooltip'\nimport Upload from '@/components/ui/Upload'\nimport toast from '@/components/ui/toast'\nimport Notification from '@/components/ui/Notification'\nimport CloseButton from '@/components/ui/CloseButton'\nimport ConfigDropdown from './ConfigDropdown'\nimport { useImageGeneratorStore } from '../store/imageGeneratorStore'\nimport {\n aspectRatioOptions,\n styleOptions,\n toneOptions,\n lightingOptions,\n cameraOptions,\n} from '../utils'\nimport { apiPostImages } from '@/services/AiService'\nimport { LuImage } from 'react-icons/lu'\nimport { ConfigsVariant, PostImageResponse } from '../type'\n\nconst GeneratorPrompt = () => {\n const [uploadedImage, setUploadedImage] = useState<File[]>([])\n\n const {\n generatorConfig,\n setGeneratorConfig,\n resetGeneratorConfig,\n onGenerateImage,\n onGenerateImageComplete,\n setGeneratedImage,\n isGeneratingImage,\n } = useImageGeneratorStore()\n\n const promptRef = useRef<HTMLTextAreaElement>(null)\n\n const handleClear = () => {\n resetGeneratorConfig()\n }\n\n const handleGenerate = async () => {\n const prompt = promptRef.current?.value\n\n if (!prompt) {\n toast.push(\n <Notification title={'Please enter prompt'} type=\"danger\" />,\n {\n placement: 'top-center',\n },\n )\n promptRef.current?.focus()\n\n return\n }\n onGenerateImage()\n const resp = await apiPostImages<PostImageResponse, { prompt: string }>(\n { prompt },\n )\n if (resp) {\n setGeneratedImage(resp)\n }\n onGenerateImageComplete()\n }\n\n const handleSetGeneratorConfig = (key: ConfigsVariant, value: string) => {\n setGeneratorConfig({ key, value })\n }\n\n const beforeUpload = (files: FileList | null) => {\n let valid: string | boolean = true\n\n const allowedFileType = ['image/jpeg', 'image/png', 'image/webp']\n\n if (files) {\n for (const f of files) {\n if (!allowedFileType.includes(f.type)) {\n valid = 'Please upload a .jpeg or .png file!'\n }\n }\n }\n\n return valid\n }\n\n return (\n <div className=\"rounded-lg p-4 border-2 border-gray-100 dark:border-gray-700\">\n <div className=\"flex gap-4 mb-4\">\n {uploadedImage.length > 0 && (\n <div className=\"max-w-[150px] relative cursor-pointer group\">\n {\n <img\n className=\"rounded-xl\"\n src={URL.createObjectURL(uploadedImage[0])}\n />\n }\n <div className=\"opacity-0 group-hover:opacity-100 bg-black/75 group-hover:flex items-center justify-center rounded-xl absolute top-0 left-0 w-full h-full transition-colors\">\n <CloseButton onClick={() => setUploadedImage([])} />\n </div>\n </div>\n )}\n <div className=\"flex-1\">\n <div className=\"heading-text text-base font-semibold\">\n Prompt\n </div>\n <textarea\n ref={promptRef}\n className=\"w-full resize-none mt-1 placeholder:text-gray-400 bg-transparent focus:outline-none heading-text\"\n placeholder=\"Decribe the image you want to generate\"\n />\n </div>\n </div>\n <div className=\"flex flex-col lg:flex-row gap-6 justify-between\">\n <div className=\"inline-flex flex-wrap gap-2\">\n <Tooltip title=\"Add image\">\n <Upload\n showList={false}\n beforeUpload={beforeUpload}\n uploadLimit={1}\n onChange={setUploadedImage}\n >\n <Button size=\"sm\" icon={<LuImage />} />\n </Upload>\n </Tooltip>\n <ConfigDropdown\n list={aspectRatioOptions}\n value={generatorConfig.aspectRatio}\n onSelect={(value) =>\n handleSetGeneratorConfig('aspectRatio', value)\n }\n />\n <ConfigDropdown\n list={styleOptions}\n value={generatorConfig.style}\n onSelect={(value) =>\n handleSetGeneratorConfig('style', value)\n }\n />\n <ConfigDropdown\n list={toneOptions}\n value={generatorConfig.tone}\n onSelect={(value) =>\n handleSetGeneratorConfig('tone', value)\n }\n />\n <ConfigDropdown\n list={lightingOptions}\n value={generatorConfig.lighting}\n onSelect={(value) =>\n handleSetGeneratorConfig('lighting', value)\n }\n />\n <ConfigDropdown\n list={cameraOptions}\n value={generatorConfig.camera}\n onSelect={(value) =>\n handleSetGeneratorConfig('camera', value)\n }\n />\n </div>\n <div className=\"flex flex-col sm:flex-row sm:justify-end gap-4\">\n <Button size=\"sm\" shape=\"circle\" onClick={handleClear}>\n Clear\n </Button>\n <Button\n size=\"sm\"\n variant=\"solid\"\n shape=\"circle\"\n loading={isGeneratingImage}\n onClick={handleGenerate}\n >\n Generate\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\nexport default GeneratorPrompt\n"],"names":["GeneratorPrompt","uploadedImage","setUploadedImage","useState","generatorConfig","setGeneratorConfig","resetGeneratorConfig","onGenerateImage","onGenerateImageComplete","setGeneratedImage","isGeneratingImage","useImageGeneratorStore","promptRef","useRef","handleClear","handleGenerate","prompt","toast","jsx","Notification","resp","apiPostImages","handleSetGeneratorConfig","key","value","beforeUpload","files","valid","allowedFileType","f","jsxs","CloseButton","Tooltip","Upload","Button","LuImage","ConfigDropdown","aspectRatioOptions","styleOptions","toneOptions","lightingOptions","cameraOpt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