@orbe-agro/client-core 5.3.86 → 5.3.90

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 +3 -22
  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 +15 -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 +9 -7
  501. package/package.json +1 -1
  502. package/tsconfig.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CreateCampaign.js","sources":["../../../../../../lib/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport DatePicker from '@/components/ui/DatePicker'\nimport Dialog from '@/components/ui/Dialog'\nimport Input from '@/components/ui/Input'\nimport Select from '@/components/ui/Select'\nimport Segment from '@/components/ui/Segment'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport { campaignTypeOption } from '../utils'\nimport NumericInput from '@/components/shared/NumericInput'\nimport classNames from '@/utils/classNames'\nimport sleep from '@/utils/sleep'\nimport dayjs from 'dayjs'\nimport CreatableSelect from 'react-select/creatable'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport uniqueId from 'lodash/uniqueId'\nimport type { ZodType } from 'zod'\nimport type { Campagin } from '../types'\n\ntype AudienceGroupOption = {\n label: string\n value: string\n}\n\nexport type FormSchema = {\n name: string\n startDate: number\n endDate: number\n budget: number\n campaignType: string\n audienceGroup: AudienceGroupOption[]\n}\n\ntype CreateCampaignProps = {\n onCreate: (value: Campagin) => void\n}\n\nconst audienceGroupOption = [\n { label: 'Existing customers', value: 'existingCustomer' },\n { label: 'Tech enthusiasts', value: 'techEnthusiasts' },\n { label: 'Students and parents', value: 'studentsParents' },\n { label: 'General public', value: 'generalPublic' },\n { label: 'Gift shoppers', value: 'giftShoppers' },\n]\n\nconst validationSchema: ZodType<FormSchema> = z.object({\n name: z.string({ required_error: 'Please enter campaign name' }),\n startDate: z.number({ required_error: 'Please select a start date' }),\n endDate: z.number({ required_error: 'Please select a end date' }),\n budget: z.number({ required_error: 'Please enter budget' }),\n campaignType: z.string({ required_error: 'Please select campaign type' }),\n audienceGroup: z\n .array(z.object({ value: z.string(), label: z.string() }))\n .nonempty('At least one is selected!'),\n})\n\nconst CreateCampaign = ({ onCreate }: CreateCampaignProps) => {\n const [dialogOpen, setDialogOpen] = useState(false)\n\n const {\n handleSubmit,\n formState: { errors, isSubmitting },\n reset,\n resetField,\n control,\n watch,\n } = useForm<FormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handleDialogClose = () => {\n setDialogOpen(false)\n }\n\n const handleDialogCancel = () => {\n reset()\n handleDialogClose()\n }\n\n const onSubmit = async (formValue: FormSchema) => {\n await sleep(500)\n onCreate({\n id: uniqueId('campaign-'),\n name: formValue.name || 'Untitle campaign',\n startDate: formValue.startDate * 1000,\n endDate: formValue.endDate * 1000,\n budget: formValue.budget,\n leadsGenerated: 0,\n conversions: 0,\n conversionRate: 0,\n status: 'disabled',\n type: formValue.campaignType,\n audienceGroup: formValue.audienceGroup.map((group) => group.value),\n })\n reset()\n handleDialogClose()\n }\n\n return (\n <>\n <Button size=\"sm\" onClick={() => setDialogOpen(true)}>\n Create campaign\n </Button>\n <Dialog\n isOpen={dialogOpen}\n width={600}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h4>New campaign</h4>\n <Form className=\"mt-6\" onSubmit={handleSubmit(onSubmit)}>\n <FormItem\n label=\"Type\"\n invalid={Boolean(errors.campaignType)}\n errorMessage={errors.campaignType?.message}\n >\n <Controller\n name=\"campaignType\"\n control={control}\n render={({ field }) => (\n <Segment\n value={field.value}\n className=\"grid grid-cols-3 gap-4 bg-transparent\"\n onChange={(value) => field.onChange(value)}\n >\n {Object.entries(campaignTypeOption).map(\n ([key, props]) => (\n <Segment.Item key={key} value={key}>\n {({\n active,\n onSegmentItemClick,\n }) => {\n return (\n <div\n className={classNames(\n 'flex justify-between border rounded-xl border-gray-300 py-5 px-4 select-none ring-1',\n active\n ? 'ring-primary border-primary '\n : 'ring-transparent bg-gray-100',\n )}\n role=\"button\"\n onClick={\n onSegmentItemClick\n }\n >\n <div className=\"flex flex-col items-center justify-center flex-1 gap-2 heading-text font-bold\">\n <div className=\"text-3xl\">\n {props.icon}\n </div>\n <div className=\"font-bold\">\n {\n props.label\n }\n </div>\n </div>\n </div>\n )\n }}\n </Segment.Item>\n ),\n )}\n </Segment>\n )}\n />\n </FormItem>\n <FormItem\n label=\"Campaign name\"\n invalid={Boolean(errors.name)}\n errorMessage={errors.name?.message}\n >\n <Controller\n name=\"name\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Campaign name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex gap-4\">\n <FormItem\n className=\"flex-1\"\n label=\"Start date\"\n invalid={Boolean(errors.startDate)}\n errorMessage={errors.startDate?.message}\n >\n <Controller\n name=\"startDate\"\n control={control}\n render={({ field }) => (\n <DatePicker\n {...field}\n value={\n field.value\n ? dayjs\n .unix(\n field.value as number,\n )\n .toDate()\n : null\n }\n placeholder=\"Select date\"\n minDate={dayjs()\n .startOf('day')\n .toDate()}\n onChange={(date) => {\n if (watch('endDate')) {\n resetField('endDate')\n }\n field.onChange(dayjs(date).unix())\n }}\n />\n )}\n />\n </FormItem>\n <FormItem\n className=\"flex-1\"\n label=\"End date\"\n invalid={Boolean(errors.endDate)}\n errorMessage={errors.endDate?.message}\n >\n <Controller\n name=\"endDate\"\n control={control}\n render={({ field }) => (\n <DatePicker\n {...field}\n value={\n field.value\n ? dayjs\n .unix(\n field.value as number,\n )\n .toDate()\n : null\n }\n placeholder=\"Select date\"\n minDate={dayjs(\n dayjs.unix(watch('startDate')),\n )\n .endOf('day')\n .toDate()}\n onChange={(date) =>\n field.onChange(dayjs(date).unix())\n }\n />\n )}\n />\n </FormItem>\n </div>\n <FormItem\n label=\"Budget\"\n invalid={Boolean(errors.budget)}\n errorMessage={errors.budget?.message}\n >\n <Controller\n name=\"budget\"\n control={control}\n render={({ field }) => (\n <NumericInput\n allowLeadingZeros\n thousandSeparator=\",\"\n value={field.value}\n inputPrefix={'$'}\n placeholder=\"0.00\"\n onValueChange={(e) => {\n field.onChange(e.floatValue)\n }}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Multiple Select\"\n invalid={Boolean(errors.audienceGroup)}\n errorMessage={errors.audienceGroup?.message}\n >\n <Controller\n name=\"audienceGroup\"\n control={control}\n render={({ field }) => (\n <Select<AudienceGroupOption, true>\n isMulti\n componentAs={CreatableSelect}\n options={audienceGroupOption}\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" onClick={handleDialogCancel}>\n Cancel\n </Button>\n <Button\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n Submit\n </Button>\n </div>\n </Form>\n </Dialog>\n </>\n )\n}\n\nexport default CreateCampaign\n"],"names":["audienceGroupOption","validationSchema","z","CreateCampaign","onCreate","dialogOpen","setDialogOpen","useState","handleSubmit","errors","isSubmitting","reset","resetField","control","watch","useForm","zodResolver","handleDialogClose","handleDialogCancel","jsxs","Fragment","jsx","Button","Dialog","Form","formValue","sleep","uniqueId","group","FormItem","_a","Controller","field","Segment","value","campaignTypeOption","key","props","active","onSegmentItemClick","classNames","_b","Input","_c","DatePicker","dayjs","date","_d","_e","NumericInput","e","_f","Select","CreatableSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAMA,IAAsB;AAAA,EACxB,EAAE,OAAO,sBAAsB,OAAO,mBAAA;AAAA,EACtC,EAAE,OAAO,oBAAoB,OAAO,kBAAA;AAAA,EACpC,EAAE,OAAO,wBAAwB,OAAO,kBAAA;AAAA,EACxC,EAAE,OAAO,kBAAkB,OAAO,gBAAA;AAAA,EAClC,EAAE,OAAO,iBAAiB,OAAO,eAAA;AACrC,GAEMC,IAAwCC,EAAE,OAAO;AAAA,EACnD,MAAMA,EAAE,OAAO,EAAE,gBAAgB,8BAA8B;AAAA,EAC/D,WAAWA,EAAE,OAAO,EAAE,gBAAgB,8BAA8B;AAAA,EACpE,SAASA,EAAE,OAAO,EAAE,gBAAgB,4BAA4B;AAAA,EAChE,QAAQA,EAAE,OAAO,EAAE,gBAAgB,uBAAuB;AAAA,EAC1D,cAAcA,EAAE,OAAO,EAAE,gBAAgB,+BAA+B;AAAA,EACxE,eAAeA,EACV,MAAMA,EAAE,OAAO,EAAE,OAAOA,EAAE,OAAA,GAAU,OAAOA,EAAE,OAAA,EAAO,CAAG,CAAC,EACxD,SAAS,2BAA2B;AAC7C,CAAC,GAEKC,KAAiB,CAAC,EAAE,UAAAC,QAAoC;;AAC1D,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5C;AAAA,IACF,cAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,cAAAC,EAAA;AAAA,IACrB,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACAC,EAAoB;AAAA,IACpB,UAAUC,EAAYf,CAAgB;AAAA,EAAA,CACzC,GAEKgB,IAAoB,MAAM;AAC5B,IAAAX,EAA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ACG,MAAK;AAAA,oBACL,SAAAlB;AAAA,oBACA,QAAQ,CAAC,EAAE,OAAAmB,EAAA,MACP,gBAAAX;AAAA,sBAAC+B;AAAA,sBAAA;AAAA,wBACG,SAAO;AAAA,wBACP,aAAaC;AAAA,wBACb,SAASrD;AAAA,wBACR,GAAGgC;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACR;AAAA,gBAAA;AAAA,cAER;AAAA,YAAA;AAAA,YAEJ,gBAAAb,EAAC,OAAA,EAAI,WAAU,0BACX,UAAA;AAAA,cAAA,gBAAAE,EAACC,GAAA,EAAO,MAAK,UAAS,SAASJ,GAAoB,UAAA,UAEnD;AAAA,cACA,gBAAAG;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACG,SAASZ;AAAA,kBACT,SAAQ;AAAA,kBACR,MAAK;AAAA,kBACR,UAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAED,EAAA,CACJ;AAAA,UAAA,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
1
+ {"version":3,"file":"CreateCampaign.js","sources":["../../../../../../lib/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport DatePicker from '@/components/ui/DatePicker'\nimport Dialog from '@/components/ui/Dialog'\nimport Input from '@/components/ui/Input'\nimport Select from '@/components/ui/Select'\nimport Segment from '@/components/ui/Segment'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport { campaignTypeOption } from '../utils'\nimport NumericInput from '@/components/shared/NumericInput'\nimport classNames from '@/utils/classNames'\nimport sleep from '@/utils/sleep'\nimport dayjs from 'dayjs'\nimport CreatableSelect from 'react-select/creatable'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport uniqueId from 'lodash/uniqueId'\nimport type { ZodType } from 'zod'\nimport type { Campagin } from '../types'\n\ntype AudienceGroupOption = {\n label: string\n value: string\n}\n\nexport type FormSchema = {\n name: string\n startDate: number\n endDate: number\n budget: number\n campaignType: string\n audienceGroup: AudienceGroupOption[]\n}\n\ntype CreateCampaignProps = {\n onCreate: (value: Campagin) => void\n}\n\nconst audienceGroupOption = [\n { label: 'Existing customers', value: 'existingCustomer' },\n { label: 'Tech enthusiasts', value: 'techEnthusiasts' },\n { label: 'Students and parents', value: 'studentsParents' },\n { label: 'General public', value: 'generalPublic' },\n { label: 'Gift shoppers', value: 'giftShoppers' },\n]\n\nconst validationSchema: ZodType<FormSchema> = z.object({\n name: z.string({ required_error: 'Please enter campaign name' }),\n startDate: z.number({ required_error: 'Please select a start date' }),\n endDate: z.number({ required_error: 'Please select a end date' }),\n budget: z.number({ required_error: 'Please enter budget' }),\n campaignType: z.string({ required_error: 'Please select campaign type' }),\n audienceGroup: z\n .array(z.object({ value: z.string(), label: z.string() }))\n .nonempty('At least one is selected!'),\n})\n\nconst CreateCampaign = ({ onCreate }: CreateCampaignProps) => {\n const [dialogOpen, setDialogOpen] = useState(false)\n\n const {\n handleSubmit,\n formState: { errors, isSubmitting },\n reset,\n resetField,\n control,\n watch,\n } = useForm<FormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handleDialogClose = () => {\n setDialogOpen(false)\n }\n\n const handleDialogCancel = () => {\n reset()\n handleDialogClose()\n }\n\n const onSubmit = async (formValue: FormSchema) => {\n await sleep(500)\n onCreate({\n id: uniqueId('campaign-'),\n name: formValue.name || 'Untitle campaign',\n startDate: formValue.startDate * 1000,\n endDate: formValue.endDate * 1000,\n budget: formValue.budget,\n leadsGenerated: 0,\n conversions: 0,\n conversionRate: 0,\n status: 'disabled',\n type: formValue.campaignType,\n audienceGroup: formValue.audienceGroup.map((group) => group.value),\n })\n reset()\n handleDialogClose()\n }\n\n return (\n <>\n <Button size=\"sm\" onClick={() => setDialogOpen(true)}>\n Create campaign\n </Button>\n <Dialog\n isOpen={dialogOpen}\n width={600}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h4>New campaign</h4>\n <Form className=\"mt-6\" onSubmit={handleSubmit(onSubmit)}>\n <FormItem\n label=\"Type\"\n invalid={Boolean(errors.campaignType)}\n errorMessage={errors.campaignType?.message}\n >\n <Controller\n name=\"campaignType\"\n control={control}\n render={({ field }) => (\n <Segment\n value={field.value}\n className=\"grid grid-cols-3 gap-4 bg-transparent\"\n onChange={(value) => field.onChange(value)}\n >\n {Object.entries(campaignTypeOption).map(\n ([key, props]) => (\n <Segment.Item key={key} value={key}>\n {({\n active,\n onSegmentItemClick,\n }) => {\n return (\n <div\n className={classNames(\n 'flex justify-between border rounded-xl border-gray-300 py-5 px-4 select-none ring-1',\n active\n ? 'ring-primary border-primary '\n : 'ring-transparent bg-gray-100',\n )}\n role=\"button\"\n onClick={\n onSegmentItemClick\n }\n >\n <div className=\"flex flex-col items-center justify-center flex-1 gap-2 heading-text font-bold\">\n <div className=\"text-3xl\">\n {props.icon}\n </div>\n <div className=\"font-bold\">\n {\n props.label\n }\n </div>\n </div>\n </div>\n )\n }}\n </Segment.Item>\n ),\n )}\n </Segment>\n )}\n />\n </FormItem>\n <FormItem\n label=\"Campaign name\"\n invalid={Boolean(errors.name)}\n errorMessage={errors.name?.message}\n >\n <Controller\n name=\"name\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Campaign name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex gap-4\">\n <FormItem\n className=\"flex-1\"\n label=\"Start date\"\n invalid={Boolean(errors.startDate)}\n errorMessage={errors.startDate?.message}\n >\n <Controller\n name=\"startDate\"\n control={control}\n render={({ field }) => (\n <DatePicker\n {...field}\n value={\n field.value\n ? dayjs\n .unix(\n field.value as number,\n )\n .toDate()\n : null\n }\n placeholder=\"Select date\"\n minDate={dayjs()\n .startOf('day')\n .toDate()}\n onChange={(date) => {\n if (watch('endDate')) {\n resetField('endDate')\n }\n field.onChange(dayjs(date).unix())\n }}\n />\n )}\n />\n </FormItem>\n <FormItem\n className=\"flex-1\"\n label=\"End date\"\n invalid={Boolean(errors.endDate)}\n errorMessage={errors.endDate?.message}\n >\n <Controller\n name=\"endDate\"\n control={control}\n render={({ field }) => (\n <DatePicker\n {...field}\n value={\n field.value\n ? dayjs\n .unix(\n field.value as number,\n )\n .toDate()\n : null\n }\n placeholder=\"Select date\"\n minDate={dayjs(\n dayjs.unix(watch('startDate')),\n )\n .endOf('day')\n .toDate()}\n onChange={(date) =>\n field.onChange(dayjs(date).unix())\n }\n />\n )}\n />\n </FormItem>\n </div>\n <FormItem\n label=\"Budget\"\n invalid={Boolean(errors.budget)}\n errorMessage={errors.budget?.message}\n >\n <Controller\n name=\"budget\"\n control={control}\n render={({ field }) => (\n <NumericInput\n allowLeadingZeros\n thousandSeparator=\",\"\n value={field.value}\n inputPrefix={'$'}\n placeholder=\"0.00\"\n onValueChange={(e) => {\n field.onChange(e.floatValue)\n }}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Multiple Select\"\n invalid={Boolean(errors.audienceGroup)}\n errorMessage={errors.audienceGroup?.message}\n >\n <Controller\n name=\"audienceGroup\"\n control={control}\n render={({ field }) => (\n <Select<AudienceGroupOption, true>\n isMulti\n componentAs={CreatableSelect}\n options={audienceGroupOption}\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" onClick={handleDialogCancel}>\n Cancel\n </Button>\n <Button\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n Submit\n </Button>\n </div>\n </Form>\n </Dialog>\n </>\n )\n}\n\nexport default CreateCampaign\n"],"names":["audienceGroupOption","validationSchema","z","CreateCampaign","onCreate","dialogOpen","setDialogOpen","useState","handleSubmit","errors","isSubmitting","reset","resetField","control","watch","useForm","zodResolver","handleDialogClose","handleDialogCancel","jsxs","Fragment","jsx","Button","Dialog","Form","formValue","sleep","uniqueId","group","FormItem","Controller","field","Segment","value","campaignTypeOption","key","props","active","onSegmentItemClick","classNames","Input","DatePicker","dayjs","date","NumericInput","e","Select","CreatableSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAMA,IAAsB;AAAA,EACxB,EAAE,OAAO,sBAAsB,OAAO,mBAAA;AAAA,EACtC,EAAE,OAAO,oBAAoB,OAAO,kBAAA;AAAA,EACpC,EAAE,OAAO,wBAAwB,OAAO,kBAAA;AAAA,EACxC,EAAE,OAAO,kBAAkB,OAAO,gBAAA;AAAA,EAClC,EAAE,OAAO,iBAAiB,OAAO,eAAA;AACrC,GAEMC,IAAwCC,EAAE,OAAO;AAAA,EACnD,MAAMA,EAAE,OAAO,EAAE,gBAAgB,8BAA8B;AAAA,EAC/D,WAAWA,EAAE,OAAO,EAAE,gBAAgB,8BAA8B;AAAA,EACpE,SAASA,EAAE,OAAO,EAAE,gBAAgB,4BAA4B;AAAA,EAChE,QAAQA,EAAE,OAAO,EAAE,gBAAgB,uBAAuB;AAAA,EAC1D,cAAcA,EAAE,OAAO,EAAE,gBAAgB,+BAA+B;AAAA,EACxE,eAAeA,EACV,MAAMA,EAAE,OAAO,EAAE,OAAOA,EAAE,OAAA,GAAU,OAAOA,EAAE,OAAA,EAAO,CAAG,CAAC,EACxD,SAAS,2BAA2B;AAC7C,CAAC,GAEKC,KAAiB,CAAC,EAAE,UAAAC,QAAoC;AAC1D,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5C;AAAA,IACF,cAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,cAAAC,EAAA;AAAA,IACrB,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACAC,EAAoB;AAAA,IACpB,UAAUC,EAAYf,CAAgB;AAAA,EAAA,CACzC,GAEKgB,IAAoB,MAAM;AAC5B,IAAAX,EAAc,EAAK;AAAA,EACvB,GAEMY,IAAqB,MAAM;AAC7B,IAAAP,EA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A,kBACR;AAAA,gBAAA;AAAA,cAER;AAAA,YAAA;AAAA,YAEJ,gBAAAZ,EAAC,OAAA,EAAI,WAAU,0BACX,UAAA;AAAA,cAAA,gBAAAE,EAACC,GAAA,EAAO,MAAK,UAAS,SAASJ,GAAoB,UAAA,UAEnD;AAAA,cACA,gBAAAG;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACG,SAASZ;AAAA,kBACT,SAAQ;AAAA,kBACR,MAAK;AAAA,kBACR,UAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAED,EAAA,CACJ;AAAA,UAAA,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
@@ -1,68 +1,68 @@
1
- import { jsx as e, jsxs as s, Fragment as f } from "react/jsx-runtime";
2
- import { useState as A } from "react";
1
+ import { jsx as e, jsxs as s, Fragment as h } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
3
  import "../../../../components/ui/Button/index.js";
4
4
  import "../../../../components/ui/Dialog/index.js";
5
5
  import "../../../../components/ui/Input/index.js";
6
6
  import "../../../../components/ui/Select/index.js";
7
7
  import "../../../../components/ui/Form/index.js";
8
- import { TbBell as S, TbPresentation as T, TbCalendarStar as E, TbCoffee as O, TbVideo as B, TbCheckbox as x } from "react-icons/tb";
9
- import { LuTreePalm as j } from "react-icons/lu";
10
- import { useForm as q, Controller as u } from "react-hook-form";
11
- import { zodResolver as w } from "@hookform/resolvers/zod";
12
- import { z as r } from "zod";
13
- import D from "lodash/uniqueId";
14
- import { components as F } from "react-select";
15
- import R from "../../../../components/ui/Select/Option.js";
16
- import g from "../../../../components/ui/Button/Button.js";
17
- import I from "../../../../components/ui/Dialog/Dialog.js";
18
- import { Form as N } from "../../../../components/ui/Form/Form.js";
8
+ import { TbBell as y, TbPresentation as P, TbCalendarStar as A, TbCoffee as S, TbVideo as T, TbCheckbox as E } from "react-icons/tb";
9
+ import { LuTreePalm as O } from "react-icons/lu";
10
+ import { useForm as B, Controller as u } from "react-hook-form";
11
+ import { zodResolver as x } from "@hookform/resolvers/zod";
12
+ import { z as a } from "zod";
13
+ import j from "lodash/uniqueId";
14
+ import { components as q } from "react-select";
15
+ import w from "../../../../components/ui/Select/Option.js";
16
+ import p from "../../../../components/ui/Button/Button.js";
17
+ import D from "../../../../components/ui/Dialog/Dialog.js";
18
+ import { Form as F } from "../../../../components/ui/Form/Form.js";
19
19
  import c from "../../../../components/ui/Form/FormItem.js";
20
- import _ from "../../../../components/ui/Input/Input.js";
21
- import h from "../../../../components/ui/Select/Select.js";
22
- const { Control: z } = F, ce = {
20
+ import R from "../../../../components/ui/Input/Input.js";
21
+ import v from "../../../../components/ui/Select/Select.js";
22
+ const { Control: I } = q, me = {
23
23
  task: {
24
24
  label: "Task",
25
- icon: /* @__PURE__ */ e(x, {}),
25
+ icon: /* @__PURE__ */ e(E, {}),
26
26
  color: "bg-purple-200 dark:bg-purple-200"
27
27
  },
28
28
  meeting: {
29
29
  label: "Meeting",
30
- icon: /* @__PURE__ */ e(B, {}),
30
+ icon: /* @__PURE__ */ e(T, {}),
31
31
  color: "bg-sky-200 dark:bg-sky-200"
32
32
  },
33
33
  holiday: {
34
34
  label: "Enjoy your holiday",
35
- icon: /* @__PURE__ */ e(j, {}),
35
+ icon: /* @__PURE__ */ e(O, {}),
36
36
  color: "bg-amber-200 dark:bg-amber-200"
37
37
  },
38
38
  breaks: {
39
39
  label: "Break",
40
- icon: /* @__PURE__ */ e(O, {}),
40
+ icon: /* @__PURE__ */ e(S, {}),
41
41
  color: "bg-orange-200 dark:bg-orange-200"
42
42
  },
43
43
  event: {
44
44
  label: "Event",
45
- icon: /* @__PURE__ */ e(E, {}),
45
+ icon: /* @__PURE__ */ e(A, {}),
46
46
  color: "bg-emerald-200 dark:bg-emerald-200"
47
47
  },
48
48
  workshops: {
49
49
  label: "Workshop",
50
- icon: /* @__PURE__ */ e(T, {}),
50
+ icon: /* @__PURE__ */ e(P, {}),
51
51
  color: "bg-rose-200 dark:bg-rose-200"
52
52
  },
53
53
  reminders: {
54
54
  label: "Reminder",
55
- icon: /* @__PURE__ */ e(S, {}),
55
+ icon: /* @__PURE__ */ e(y, {}),
56
56
  color: "bg-teal-200 dark:bg-teal-200"
57
57
  }
58
- }, k = [
58
+ }, d = [
59
59
  { label: "Task", value: "task", color: "bg-purple-200" },
60
60
  { label: "Meeting", value: "meeting", color: "bg-sky-200" },
61
61
  { label: "Breaks", value: "breaks", color: "bg-orange-200" },
62
62
  { label: "Event", value: "event", color: "bg-emerald-200" },
63
63
  { label: "Workshops", value: "workshops", color: "bg-rose-200" },
64
64
  { label: "Reminders", value: "reminders", color: "bg-teal-200" }
65
- ], M = [
65
+ ], g = [
66
66
  { value: 0, label: "12:00 AM" },
67
67
  { value: 1, label: "1:00 AM" },
68
68
  { value: 2, label: "2:00 AM" },
@@ -87,57 +87,56 @@ const { Control: z } = F, ce = {
87
87
  { value: 21, label: "9:00 PM" },
88
88
  { value: 22, label: "10:00 PM" },
89
89
  { value: 23, label: "11:00 PM" }
90
- ], L = (n) => /* @__PURE__ */ e(
91
- R,
90
+ ], N = (n) => /* @__PURE__ */ e(
91
+ w,
92
92
  {
93
93
  ...n,
94
- customLabel: (i, o) => /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { children: o }) })
94
+ customLabel: (i, r) => /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { children: r }) })
95
95
  }
96
- ), V = ({ children: n, ...i }) => {
97
- const o = i.getValue()[0];
98
- return /* @__PURE__ */ s(z, { ...i, children: [
99
- o && /* @__PURE__ */ e(f, {}),
96
+ ), _ = ({ children: n, ...i }) => {
97
+ const r = i.getValue()[0];
98
+ return /* @__PURE__ */ s(I, { ...i, children: [
99
+ r && /* @__PURE__ */ e(h, {}),
100
100
  n
101
101
  ] });
102
- }, W = r.object({
103
- type: r.union([
104
- r.literal("meeting"),
105
- r.literal("task"),
106
- r.literal("holiday"),
107
- r.literal("breaks"),
108
- r.literal("event"),
109
- r.literal("workshops"),
110
- r.literal("reminders")
102
+ }, z = a.object({
103
+ type: a.union([
104
+ a.literal("meeting"),
105
+ a.literal("task"),
106
+ a.literal("holiday"),
107
+ a.literal("breaks"),
108
+ a.literal("event"),
109
+ a.literal("workshops"),
110
+ a.literal("reminders")
111
111
  ]),
112
- label: r.string({ required_error: "Please enter event name" }),
113
- time: r.number({ required_error: "Please select a time" })
114
- }), ve = ({
112
+ label: a.string({ required_error: "Please enter event name" }),
113
+ time: a.number({ required_error: "Please select a time" })
114
+ }), be = ({
115
115
  onCreateEvent: n
116
116
  }) => {
117
- var v, d, p;
118
- const [i, o] = A(!1), {
119
- handleSubmit: C,
120
- formState: { errors: t, isSubmitting: y },
121
- reset: P,
117
+ const [i, r] = C(!1), {
118
+ handleSubmit: k,
119
+ formState: { errors: t, isSubmitting: M },
120
+ reset: f,
122
121
  control: m
123
- } = q({
124
- resolver: w(W)
122
+ } = B({
123
+ resolver: x(z)
125
124
  }), b = () => {
126
- P(), o(!1);
125
+ f(), r(!1);
127
126
  };
128
- return /* @__PURE__ */ s(f, { children: [
129
- /* @__PURE__ */ e(g, { block: !0, onClick: () => o(!0), children: "Add event" }),
127
+ return /* @__PURE__ */ s(h, { children: [
128
+ /* @__PURE__ */ e(p, { block: !0, onClick: () => r(!0), children: "Add event" }),
130
129
  /* @__PURE__ */ s(
131
- I,
130
+ D,
132
131
  {
133
132
  isOpen: i,
134
133
  onClose: b,
135
134
  onRequestClose: b,
136
135
  children: [
137
136
  /* @__PURE__ */ e("h4", { children: "New event" }),
138
- /* @__PURE__ */ s(N, { className: "mt-6", onSubmit: C((l) => {
137
+ /* @__PURE__ */ s(F, { className: "mt-6", onSubmit: k((l) => {
139
138
  n({
140
- id: D("schedule-event-"),
139
+ id: j("schedule-event-"),
141
140
  ...l
142
141
  }), b();
143
142
  }), children: [
@@ -146,14 +145,14 @@ const { Control: z } = F, ce = {
146
145
  {
147
146
  label: "Event name",
148
147
  invalid: !!t.label,
149
- errorMessage: (v = t.label) == null ? void 0 : v.message,
148
+ errorMessage: t.label?.message,
150
149
  children: /* @__PURE__ */ e(
151
150
  u,
152
151
  {
153
152
  name: "label",
154
153
  control: m,
155
154
  render: ({ field: l }) => /* @__PURE__ */ e(
156
- _,
155
+ R,
157
156
  {
158
157
  type: "text",
159
158
  autoComplete: "off",
@@ -170,26 +169,26 @@ const { Control: z } = F, ce = {
170
169
  {
171
170
  label: "Event type",
172
171
  invalid: !!t.type,
173
- errorMessage: ((d = t.type) == null ? void 0 : d.message) && "Please select a type",
172
+ errorMessage: t.type?.message && "Please select a type",
174
173
  children: /* @__PURE__ */ e(
175
174
  u,
176
175
  {
177
176
  name: "type",
178
177
  control: m,
179
178
  render: ({ field: l }) => /* @__PURE__ */ e(
180
- h,
179
+ v,
181
180
  {
182
- options: k,
181
+ options: d,
183
182
  ...l,
184
183
  components: {
185
- Option: L,
186
- Control: V
184
+ Option: N,
185
+ Control: _
187
186
  },
188
187
  placeholder: "Event type",
189
- value: k.filter(
190
- (a) => a.value === l.value
188
+ value: d.filter(
189
+ (o) => o.value === l.value
191
190
  ),
192
- onChange: (a) => l.onChange(a == null ? void 0 : a.value)
191
+ onChange: (o) => l.onChange(o?.value)
193
192
  }
194
193
  )
195
194
  }
@@ -201,22 +200,22 @@ const { Control: z } = F, ce = {
201
200
  {
202
201
  label: "Time",
203
202
  invalid: !!t.time,
204
- errorMessage: (p = t.time) == null ? void 0 : p.message,
203
+ errorMessage: t.time?.message,
205
204
  children: /* @__PURE__ */ e(
206
205
  u,
207
206
  {
208
207
  name: "time",
209
208
  control: m,
210
209
  render: ({ field: l }) => /* @__PURE__ */ e(
211
- h,
210
+ v,
212
211
  {
213
- options: M,
212
+ options: g,
214
213
  ...l,
215
214
  placeholder: "Select a time...",
216
- value: M.filter(
217
- (a) => a.value === l.value
215
+ value: g.filter(
216
+ (o) => o.value === l.value
218
217
  ),
219
- onChange: (a) => l.onChange(a == null ? void 0 : a.value)
218
+ onChange: (o) => l.onChange(o?.value)
220
219
  }
221
220
  )
222
221
  }
@@ -224,12 +223,12 @@ const { Control: z } = F, ce = {
224
223
  }
225
224
  ),
226
225
  /* @__PURE__ */ e(
227
- g,
226
+ p,
228
227
  {
229
228
  block: !0,
230
229
  variant: "solid",
231
230
  type: "submit",
232
- loading: y,
231
+ loading: M,
233
232
  children: "Create"
234
233
  }
235
234
  )
@@ -240,7 +239,7 @@ const { Control: z } = F, ce = {
240
239
  ] });
241
240
  };
242
241
  export {
243
- ve as default,
244
- ce as eventTypes
242
+ be as default,
243
+ me as eventTypes
245
244
  };
246
245
  //# sourceMappingURL=CreateEventDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateEventDialog.js","sources":["../../../../../../lib/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport Dialog from '@/components/ui/Dialog'\nimport Input from '@/components/ui/Input'\nimport Select, { Option as DefaultOption } from '@/components/ui/Select'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport {\n TbVideo,\n TbCheckbox,\n TbCoffee,\n TbCalendarStar,\n TbPresentation,\n TbBell,\n} from 'react-icons/tb'\nimport { LuTreePalm } from 'react-icons/lu'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport uniqueId from 'lodash/uniqueId'\nimport { components } from 'react-select'\nimport type { Event } from '../types'\nimport type { ZodType } from 'zod'\nimport type { ReactNode } from 'react'\nimport type { ControlProps, OptionProps } from 'react-select'\n\nexport type FormSchema = {\n type: Event\n label: string\n time: number\n}\n\ntype EventOption = { label: string; value: Event; color: string }\n\nconst { Control } = components\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport const eventTypes: Record<\n Event,\n { label: string; icon: ReactNode; color: string }\n> = {\n task: {\n label: 'Task',\n icon: <TbCheckbox />,\n color: 'bg-purple-200 dark:bg-purple-200',\n },\n meeting: {\n label: 'Meeting',\n icon: <TbVideo />,\n color: 'bg-sky-200 dark:bg-sky-200',\n },\n holiday: {\n label: 'Enjoy your holiday',\n icon: <LuTreePalm />,\n color: 'bg-amber-200 dark:bg-amber-200',\n },\n breaks: {\n label: 'Break',\n icon: <TbCoffee />,\n color: 'bg-orange-200 dark:bg-orange-200',\n },\n event: {\n label: 'Event',\n icon: <TbCalendarStar />,\n color: 'bg-emerald-200 dark:bg-emerald-200',\n },\n workshops: {\n label: 'Workshop',\n icon: <TbPresentation />,\n color: 'bg-rose-200 dark:bg-rose-200',\n },\n reminders: {\n label: 'Reminder',\n icon: <TbBell />,\n color: 'bg-teal-200 dark:bg-teal-200',\n },\n}\n\nconst eventOptions: EventOption[] = [\n { label: 'Task', value: 'task', color: 'bg-purple-200' },\n { label: 'Meeting', value: 'meeting', color: 'bg-sky-200' },\n { label: 'Breaks', value: 'breaks', color: 'bg-orange-200' },\n { label: 'Event', value: 'event', color: 'bg-emerald-200' },\n { label: 'Workshops', value: 'workshops', color: 'bg-rose-200' },\n { label: 'Reminders', value: 'reminders', color: 'bg-teal-200' },\n]\n\nconst timeOption = [\n { value: 0, label: '12:00 AM' },\n { value: 1, label: '1:00 AM' },\n { value: 2, label: '2:00 AM' },\n { value: 3, label: '3:00 AM' },\n { value: 4, label: '4:00 AM' },\n { value: 5, label: '5:00 AM' },\n { value: 6, label: '6:00 AM' },\n { value: 7, label: '7:00 AM' },\n { value: 8, label: '8:00 AM' },\n { value: 9, label: '9:00 AM' },\n { value: 10, label: '10:00 AM' },\n { value: 11, label: '11:00 AM' },\n { value: 12, label: '12:00 PM' },\n { value: 13, label: '1:00 PM' },\n { value: 14, label: '2:00 PM' },\n { value: 15, label: '3:00 PM' },\n { value: 16, label: '4:00 PM' },\n { value: 17, label: '5:00 PM' },\n { value: 18, label: '6:00 PM' },\n { value: 19, label: '7:00 PM' },\n { value: 20, label: '8:00 PM' },\n { value: 21, label: '9:00 PM' },\n { value: 22, label: '10:00 PM' },\n { value: 23, label: '11:00 PM' },\n]\n\nconst CustomSelectOption = (props: OptionProps<EventOption>) => {\n return (\n <DefaultOption<EventOption>\n {...props}\n customLabel={(_, label) => (\n <span className=\"flex items-center gap-2\">\n <span>{label}</span>\n </span>\n )}\n />\n )\n}\n\nconst CustomControl = ({ children, ...props }: ControlProps<EventOption>) => {\n const selected = props.getValue()[0]\n return (\n <Control {...props}>\n {selected && <></>}\n {children}\n </Control>\n )\n}\n\nconst validationSchema: ZodType<FormSchema> = z.object({\n type: z.union([\n z.literal('meeting'),\n z.literal('task'),\n z.literal('holiday'),\n z.literal('breaks'),\n z.literal('event'),\n z.literal('workshops'),\n z.literal('reminders'),\n ]),\n label: z.string({ required_error: 'Please enter event name' }),\n time: z.number({ required_error: 'Please select a time' }),\n})\n\nconst CreateEventDialog = ({\n onCreateEvent,\n}: {\n onCreateEvent: (value: FormSchema & { id: string }) => void\n}) => {\n const [dialogOpen, setDialogOpen] = useState(false)\n\n const {\n handleSubmit,\n formState: { errors, isSubmitting },\n reset,\n control,\n } = useForm<FormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handleDialogClose = () => {\n reset()\n setDialogOpen(false)\n }\n\n const onSubmit = (value: FormSchema) => {\n onCreateEvent({\n id: uniqueId('schedule-event-'),\n ...value,\n })\n handleDialogClose()\n }\n\n return (\n <>\n <Button block onClick={() => setDialogOpen(true)}>\n Add event\n </Button>\n <Dialog\n isOpen={dialogOpen}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h4>New event</h4>\n <Form className=\"mt-6\" onSubmit={handleSubmit(onSubmit)}>\n <FormItem\n label=\"Event name\"\n invalid={Boolean(errors.label)}\n errorMessage={errors.label?.message}\n >\n <Controller\n name=\"label\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Event name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Event type\"\n invalid={Boolean(errors.type)}\n errorMessage={\n errors.type?.message && 'Please select a type'\n }\n >\n <Controller\n name=\"type\"\n control={control}\n render={({ field }) => (\n <Select<EventOption>\n options={eventOptions}\n {...field}\n components={{\n Option: CustomSelectOption,\n Control: CustomControl,\n }}\n placeholder=\"Event type\"\n value={eventOptions.filter(\n (option) =>\n option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Time\"\n invalid={Boolean(errors.time)}\n errorMessage={errors.time?.message}\n >\n <Controller\n name=\"time\"\n control={control}\n render={({ field }) => (\n <Select\n options={timeOption}\n {...field}\n placeholder=\"Select a time...\"\n value={timeOption.filter(\n (option) =>\n option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <Button\n block\n variant=\"solid\"\n type=\"submit\"\n loading={isSubmitting}\n >\n Create\n </Button>\n </Form>\n </Dialog>\n </>\n )\n}\n\nexport default CreateEventDialog\n"],"names":["Control","components","eventTypes","TbCheckbox","TbVideo","LuTreePalm","TbCoffee","TbCalendarStar","TbPresentation","TbBell","eventOptions","timeOption","CustomSelectOption","props","jsx","DefaultOption","_","label","CustomControl","children","selected","jsxs","Fragment","validationSchema","z","CreateEventDialog","onCreateEvent","dialogOpen","setDialogOpen","useState","handleSubmit","errors","isSubmitting","reset","control","useForm","zodResolver","handleDialogClose","Button","Dialog","Form","value","uniqueId","FormItem","_a","Controller","field","Input","_b","Select","option","_c"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,EAAE,SAAAA,MAAYC,GAGPC,KAGT;AAAA,EACA,MAAM;AAAA,IACF,OAAO;AAAA,IACP,wBAAOC,GAAA,EAAW;AAAA,IAClB,OAAO;AAAA,EAAA;AAAA,EAEX,SAAS;AAAA,IACL,OAAO;AAAA,IACP,wBAAOC,GAAA,EAAQ;AAAA,IACf,OAAO;AAAA,EAAA;AAAA,EAEX,SAAS;AAAA,IACL,OAAO;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eAAcoB,IAAApB,EAAO,SAAP,gBAAAoB,EAAa;AAAA,gBAE3B,UAAA,gBAAArC;AAAA,kBAAC+B;AAAA,kBAAA;AAAA,oBACG,MAAK;AAAA,oBACL,SAAAX;AAAA,oBACA,QAAQ,CAAC,EAAE,OAAAY,EAAA,MACP,gBAAAhC;AAAA,sBAACmC;AAAA,sBAAA;AAAA,wBACG,SAAStC;AAAA,wBACR,GAAGmC;AAAA,wBACJ,aAAY;AAAA,wBACZ,OAAOnC,EAAW;AAAA,0BACd,CAACuC,MACGA,EAAO,UAAUJ,EAAM;AAAA,wBAAA;AAAA,wBAE/B,UAAU,CAACI,MACPJ,EAAM,SAASI,KAAA,gBAAAA,EAAQ,KAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAEpC;AAAA,gBAAA;AAAA,cAER;AAAA,YAAA;AAAA,YAEJ,gBAAApC;AAAA,cAACwB;AAAA,cAAA;AAAA,gBACG,OAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAASN;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
1
+ {"version":3,"file":"CreateEventDialog.js","sources":["../../../../../../lib/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport Dialog from '@/components/ui/Dialog'\nimport Input from '@/components/ui/Input'\nimport Select, { Option as DefaultOption } from '@/components/ui/Select'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport {\n TbVideo,\n TbCheckbox,\n TbCoffee,\n TbCalendarStar,\n TbPresentation,\n TbBell,\n} from 'react-icons/tb'\nimport { LuTreePalm } from 'react-icons/lu'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport uniqueId from 'lodash/uniqueId'\nimport { components } from 'react-select'\nimport type { Event } from '../types'\nimport type { ZodType } from 'zod'\nimport type { ReactNode } from 'react'\nimport type { ControlProps, OptionProps } from 'react-select'\n\nexport type FormSchema = {\n type: Event\n label: string\n time: number\n}\n\ntype EventOption = { label: string; value: Event; color: string }\n\nconst { Control } = components\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport const eventTypes: Record<\n Event,\n { label: string; icon: ReactNode; color: string }\n> = {\n task: {\n label: 'Task',\n icon: <TbCheckbox />,\n color: 'bg-purple-200 dark:bg-purple-200',\n },\n meeting: {\n label: 'Meeting',\n icon: <TbVideo />,\n color: 'bg-sky-200 dark:bg-sky-200',\n },\n holiday: {\n label: 'Enjoy your holiday',\n icon: <LuTreePalm />,\n color: 'bg-amber-200 dark:bg-amber-200',\n },\n breaks: {\n label: 'Break',\n icon: <TbCoffee />,\n color: 'bg-orange-200 dark:bg-orange-200',\n },\n event: {\n label: 'Event',\n icon: <TbCalendarStar />,\n color: 'bg-emerald-200 dark:bg-emerald-200',\n },\n workshops: {\n label: 'Workshop',\n icon: <TbPresentation />,\n color: 'bg-rose-200 dark:bg-rose-200',\n },\n reminders: {\n label: 'Reminder',\n icon: <TbBell />,\n color: 'bg-teal-200 dark:bg-teal-200',\n },\n}\n\nconst eventOptions: EventOption[] = [\n { label: 'Task', value: 'task', color: 'bg-purple-200' },\n { label: 'Meeting', value: 'meeting', color: 'bg-sky-200' },\n { label: 'Breaks', value: 'breaks', color: 'bg-orange-200' },\n { label: 'Event', value: 'event', color: 'bg-emerald-200' },\n { label: 'Workshops', value: 'workshops', color: 'bg-rose-200' },\n { label: 'Reminders', value: 'reminders', color: 'bg-teal-200' },\n]\n\nconst timeOption = [\n { value: 0, label: '12:00 AM' },\n { value: 1, label: '1:00 AM' },\n { value: 2, label: '2:00 AM' },\n { value: 3, label: '3:00 AM' },\n { value: 4, label: '4:00 AM' },\n { value: 5, label: '5:00 AM' },\n { value: 6, label: '6:00 AM' },\n { value: 7, label: '7:00 AM' },\n { value: 8, label: '8:00 AM' },\n { value: 9, label: '9:00 AM' },\n { value: 10, label: '10:00 AM' },\n { value: 11, label: '11:00 AM' },\n { value: 12, label: '12:00 PM' },\n { value: 13, label: '1:00 PM' },\n { value: 14, label: '2:00 PM' },\n { value: 15, label: '3:00 PM' },\n { value: 16, label: '4:00 PM' },\n { value: 17, label: '5:00 PM' },\n { value: 18, label: '6:00 PM' },\n { value: 19, label: '7:00 PM' },\n { value: 20, label: '8:00 PM' },\n { value: 21, label: '9:00 PM' },\n { value: 22, label: '10:00 PM' },\n { value: 23, label: '11:00 PM' },\n]\n\nconst CustomSelectOption = (props: OptionProps<EventOption>) => {\n return (\n <DefaultOption<EventOption>\n {...props}\n customLabel={(_, label) => (\n <span className=\"flex items-center gap-2\">\n <span>{label}</span>\n </span>\n )}\n />\n )\n}\n\nconst CustomControl = ({ children, ...props }: ControlProps<EventOption>) => {\n const selected = props.getValue()[0]\n return (\n <Control {...props}>\n {selected && <></>}\n {children}\n </Control>\n )\n}\n\nconst validationSchema: ZodType<FormSchema> = z.object({\n type: z.union([\n z.literal('meeting'),\n z.literal('task'),\n z.literal('holiday'),\n z.literal('breaks'),\n z.literal('event'),\n z.literal('workshops'),\n z.literal('reminders'),\n ]),\n label: z.string({ required_error: 'Please enter event name' }),\n time: z.number({ required_error: 'Please select a time' }),\n})\n\nconst CreateEventDialog = ({\n onCreateEvent,\n}: {\n onCreateEvent: (value: FormSchema & { id: string }) => void\n}) => {\n const [dialogOpen, setDialogOpen] = useState(false)\n\n const {\n handleSubmit,\n formState: { errors, isSubmitting },\n reset,\n control,\n } = useForm<FormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const handleDialogClose = () => {\n reset()\n setDialogOpen(false)\n }\n\n const onSubmit = (value: FormSchema) => {\n onCreateEvent({\n id: uniqueId('schedule-event-'),\n ...value,\n })\n handleDialogClose()\n }\n\n return (\n <>\n <Button block onClick={() => setDialogOpen(true)}>\n Add event\n </Button>\n <Dialog\n isOpen={dialogOpen}\n onClose={handleDialogClose}\n onRequestClose={handleDialogClose}\n >\n <h4>New event</h4>\n <Form className=\"mt-6\" onSubmit={handleSubmit(onSubmit)}>\n <FormItem\n label=\"Event name\"\n invalid={Boolean(errors.label)}\n errorMessage={errors.label?.message}\n >\n <Controller\n name=\"label\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Event name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Event type\"\n invalid={Boolean(errors.type)}\n errorMessage={\n errors.type?.message && 'Please select a type'\n }\n >\n <Controller\n name=\"type\"\n control={control}\n render={({ field }) => (\n <Select<EventOption>\n options={eventOptions}\n {...field}\n components={{\n Option: CustomSelectOption,\n Control: CustomControl,\n }}\n placeholder=\"Event type\"\n value={eventOptions.filter(\n (option) =>\n option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Time\"\n invalid={Boolean(errors.time)}\n errorMessage={errors.time?.message}\n >\n <Controller\n name=\"time\"\n control={control}\n render={({ field }) => (\n <Select\n options={timeOption}\n {...field}\n placeholder=\"Select a time...\"\n value={timeOption.filter(\n (option) =>\n option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <Button\n block\n variant=\"solid\"\n type=\"submit\"\n loading={isSubmitting}\n >\n Create\n </Button>\n </Form>\n </Dialog>\n </>\n )\n}\n\nexport default CreateEventDialog\n"],"names":["Control","components","eventTypes","TbCheckbox","TbVideo","LuTreePalm","TbCoffee","TbCalendarStar","TbPresentation","TbBell","eventOptions","timeOption","CustomSelectOption","props","jsx","DefaultOption","_","label","CustomControl","children","selected","jsxs","Fragment","validationSchema","z","CreateEventDialog","onCreateEvent","dialogOpen","setDialogOpen","useState","handleSubmit","errors","isSubmitting","reset","control","useForm","zodResolver","handleDialogClose","Button","Dialog","Form","value","uniqueId","FormItem","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A,wBAAA;AAAA,wBAE/B,UAAU,CAACG,MACPH,EAAM,SAASG,GAAQ,KAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAEpC;AAAA,gBAAA;AAAA,cAER;AAAA,YAAA;AAAA,YAEJ,gBAAAlC;AAAA,cAAC6B;AAAA,cAAA;AAAA,gBACG,OAAM;AAAA,gBACN,SAAS,EAAQZ,EAAO;AAAA,gBACxB,cAAcA,EAAO,MAAM;AAAA,gBAE3B,UAAA,gBAAAjB;AAAA,kBAAC8B;AAAA,kBAAA;AAAA,oBACG,MAAK;AAAA,oBACL,SAAAV;AAAA,oBACA,QAAQ,CAAC,EAAE,OAAAW,EAAA,MACP,gBAAA/B;AAAA,sBAACiC;AAAA,sBAAA;AAAA,wBACG,SAASpC;AAAA,wBACR,GAAGkC;AAAA,wBACJ,aAAY;AAAA,wBACZ,OAAOlC,EAAW;AAAA,0BACd,CAACqC,MACGA,EAAO,UAAUH,EAAM;AAAA,wBAAA;AAAA,wBAE/B,UAAU,CAACG,MACPH,EAAM,SAASG,GAAQ,KAAK;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAEpC;AAAA,gBAAA;AAAA,cAER;AAAA,YAAA;AAAA,YAEJ,gBAAAlC;AAAA,cAACwB;AAAA,cAAA;AAAA,gBACG,OAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAASN;AAAA,gBACZ,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAED,EAAA,CACJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
@@ -1,61 +1,61 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as f, useMemo as u } from "react";
3
- import { Avatar as x } from "../../../../components/ui/Avatar/index.js";
3
+ import { Avatar as v } from "../../../../components/ui/Avatar/index.js";
4
4
  import "../../../../components/ui/Card/index.js";
5
5
  import "../../../../components/ui/Calendar/index.js";
6
6
  import "../../../../components/ui/ScrollBar/index.js";
7
- import v, { eventTypes as g } from "./CreateEventDialog.js";
7
+ import x, { eventTypes as g } from "./CreateEventDialog.js";
8
8
  import { eventGenerator as N, isToday as S } from "../utils.js";
9
9
  import y from "../../../../utils/classNames.js";
10
- import a from "dayjs";
10
+ import i from "dayjs";
11
11
  import C from "../../../../components/ui/Card/Card.js";
12
12
  import w from "../../../../components/ui/DatePicker/Calendar.js";
13
13
  import D from "../../../../components/ui/ScrollBar/ScrollBar.js";
14
14
  const E = (r) => {
15
- const { type: c, label: n, time: o } = r, i = g[c];
16
- return /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-4 py-1", children: [
17
- /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
15
+ const { type: c, label: s, time: l } = r, n = g[c];
16
+ return /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-4 py-1", children: [
17
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
18
18
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
19
- x,
19
+ v,
20
20
  {
21
- className: y("text-gray-900", i == null ? void 0 : i.color),
22
- icon: i == null ? void 0 : i.icon,
21
+ className: y("text-gray-900", n?.color),
22
+ icon: n?.icon,
23
23
  shape: "round"
24
24
  }
25
25
  ) }),
26
- /* @__PURE__ */ l("div", { children: [
27
- /* @__PURE__ */ e("div", { className: "font-bold heading-text", children: n }),
28
- /* @__PURE__ */ e("div", { className: "font-normal", children: i == null ? void 0 : i.label })
26
+ /* @__PURE__ */ a("div", { children: [
27
+ /* @__PURE__ */ e("div", { className: "font-bold heading-text", children: s }),
28
+ /* @__PURE__ */ e("div", { className: "font-normal", children: n?.label })
29
29
  ] })
30
30
  ] }),
31
- /* @__PURE__ */ l("div", { children: [
32
- /* @__PURE__ */ l("span", { className: "font-semibold heading-text", children: [
33
- o && a(o).format("hh:mm"),
31
+ /* @__PURE__ */ a("div", { children: [
32
+ /* @__PURE__ */ a("span", { className: "font-semibold heading-text", children: [
33
+ l && i(l).format("hh:mm"),
34
34
  " "
35
35
  ] }),
36
- /* @__PURE__ */ e("small", { children: o && a(o).format("A") })
36
+ /* @__PURE__ */ e("small", { children: l && i(l).format("A") })
37
37
  ] })
38
38
  ] });
39
39
  }, z = () => {
40
40
  const [r, c] = f(
41
- a().toDate()
42
- ), [n, o] = f({}), i = u(() => {
43
- const t = r, m = n[a(t).toISOString()] || [];
41
+ i().toDate()
42
+ ), [s, l] = f({}), n = u(() => {
43
+ const t = r, m = s[i(t).toISOString()] || [];
44
44
  return [
45
45
  ...N(t),
46
46
  ...m
47
47
  ].sort((d, h) => !d.time && !h.time ? 0 : d.time ? h.time ? d.time.getTime() - h.time.getTime() : -1 : 1);
48
- }, [r, n]), p = (t) => {
48
+ }, [r, s]), p = (t) => {
49
49
  const m = {
50
50
  id: t.id,
51
51
  label: t.label,
52
52
  type: t.type,
53
- time: a(r).set("hour", t.time).set("minute", 0).toDate()
53
+ time: i(r).set("hour", t.time).set("minute", 0).toDate()
54
54
  };
55
- o((s) => (s[a(r).toISOString()] ? s[a(r).toISOString()].push(m) : s[a(r).toISOString()] = [m], structuredClone(s)));
55
+ l((o) => (o[i(r).toISOString()] ? o[i(r).toISOString()].push(m) : o[i(r).toISOString()] = [m], structuredClone(o)));
56
56
  };
57
- return /* @__PURE__ */ l(C, { children: [
58
- /* @__PURE__ */ l("div", { className: "flex flex-col md:flex-row xl:flex-col md:gap-10 xl:gap-0", children: [
57
+ return /* @__PURE__ */ a(C, { children: [
58
+ /* @__PURE__ */ a("div", { className: "flex flex-col md:flex-row xl:flex-col md:gap-10 xl:gap-0", children: [
59
59
  /* @__PURE__ */ e("div", { className: "flex items-center mx-auto w-[280px]", children: /* @__PURE__ */ e(
60
60
  w,
61
61
  {
@@ -65,16 +65,16 @@ const E = (r) => {
65
65
  }
66
66
  }
67
67
  ) }),
68
- /* @__PURE__ */ l("div", { className: "w-full", children: [
69
- /* @__PURE__ */ e("div", { className: "my-6", children: /* @__PURE__ */ l("h5", { children: [
68
+ /* @__PURE__ */ a("div", { className: "w-full", children: [
69
+ /* @__PURE__ */ e("div", { className: "my-6", children: /* @__PURE__ */ a("h5", { children: [
70
70
  "Scehdule",
71
71
  " ",
72
- S(r) ? "today" : a(r).format("DD MMM")
72
+ S(r) ? "today" : i(r).format("DD MMM")
73
73
  ] }) }),
74
- /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ e(D, { className: "overflow-y-auto h-[280px] xl:max-w-[280px]", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: i.map((t) => /* @__PURE__ */ e(E, { ...t }, t.id)) }) }) })
74
+ /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ e(D, { className: "overflow-y-auto h-[280px] xl:max-w-[280px]", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: n.map((t) => /* @__PURE__ */ e(E, { ...t }, t.id)) }) }) })
75
75
  ] })
76
76
  ] }),
77
- /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(v, { onCreateEvent: p }) })
77
+ /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(x, { onCreateEvent: p }) })
78
78
  ] });
79
79
  };
80
80
  export {