@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,116 +1,112 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { useState as se, useRef as ie } from "react";
3
- import y from "dayjs";
4
- import fe from "../hooks/useControllableState.js";
5
- import ce from "../hooks/useMergeRef.js";
6
- import D from "../utils/capitalize.js";
7
- import de from "./RangeCalendar.js";
8
- import ue from "./BasePicker.js";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { useState as re, useRef as se } from "react";
3
+ import D from "dayjs";
4
+ import ie from "../hooks/useControllableState.js";
5
+ import ue from "../hooks/useMergeRef.js";
6
+ import h from "../utils/capitalize.js";
7
+ import fe from "./RangeCalendar.js";
8
+ import de from "./BasePicker.js";
9
9
  import "../ConfigProvider/index.js";
10
- import { useConfig as me } from "../ConfigProvider/ConfigProvider.js";
11
- const b = (a) => Array.isArray(a) && a.length === 2 && a.every((n) => n instanceof Date), pe = (a) => Array.isArray(a) && a.length === 2 && a[0] instanceof Date, ke = (a) => {
10
+ import { useConfig as ce } from "../ConfigProvider/ConfigProvider.js";
11
+ const y = (e) => Array.isArray(e) && e.length === 2 && e.every((o) => o instanceof Date), me = (e) => Array.isArray(e) && e.length === 2 && e[0] instanceof Date, Ve = (e) => {
12
12
  const {
13
- className: n,
14
- clearable: g = !0,
13
+ className: o,
14
+ clearable: b = !0,
15
15
  clearButton: C,
16
- closePickerOnChange: M = !0,
17
- dateViewCount: O = 1,
18
- dayClassName: V,
19
- dayStyle: Y,
20
- defaultMonth: k,
21
- defaultOpen: w = !1,
22
- defaultValue: c,
23
- defaultView: L,
24
- disabled: P,
25
- disableDate: R,
26
- enableHeaderLabel: x,
27
- disableOutOfMonth: F,
28
- firstDayOfWeek: S = "monday",
29
- hideOutOfMonthDates: A,
30
- hideWeekdays: $,
31
- inputFormat: j,
32
- inputPrefix: z,
33
- inputSuffix: B,
34
- labelFormat: N = {
16
+ closePickerOnChange: g = !0,
17
+ dateViewCount: w = 1,
18
+ dayClassName: O,
19
+ dayStyle: M,
20
+ defaultMonth: V,
21
+ defaultOpen: Y = !1,
22
+ defaultValue: i,
23
+ defaultView: k,
24
+ disabled: L,
25
+ disableDate: P,
26
+ enableHeaderLabel: R,
27
+ disableOutOfMonth: x,
28
+ firstDayOfWeek: F = "monday",
29
+ hideOutOfMonthDates: S,
30
+ hideWeekdays: A,
31
+ inputFormat: v,
32
+ inputPrefix: $,
33
+ inputSuffix: j,
34
+ labelFormat: z = {
35
35
  month: "MMM",
36
36
  year: "YYYY"
37
37
  },
38
- separator: T = "~",
39
- locale: W,
40
- maxDate: H,
41
- minDate: q,
42
- onChange: E,
43
- onDropdownClose: o,
44
- onDropdownOpen: r,
45
- openPickerOnClear: G = !1,
46
- ref: I = null,
47
- renderDay: J,
48
- singleDate: K = !1,
49
- size: Q,
50
- style: U,
51
- value: X,
52
- weekendDays: Z,
53
- yearLabelFormat: v,
54
- ..._
55
- } = a, { locale: ee } = me(), l = W || ee, d = j || "YYYY-MM-DD", [te, s] = se(w), i = ie(null), [e, u] = fe(
38
+ separator: B = "~",
39
+ locale: N,
40
+ maxDate: T,
41
+ minDate: W,
42
+ onChange: H,
43
+ onDropdownClose: u,
44
+ onDropdownOpen: f,
45
+ openPickerOnClear: _ = !1,
46
+ ref: q = null,
47
+ renderDay: E,
48
+ singleDate: G = !1,
49
+ size: I,
50
+ style: J,
51
+ value: K,
52
+ weekendDays: Q,
53
+ yearLabelFormat: U,
54
+ ...X
55
+ } = e, { locale: Z } = ce(), n = N || Z, d = v || "YYYY-MM-DD", [ee, l] = re(Y), r = se(null), [a, c] = ie(
56
56
  {
57
- prop: X,
58
- defaultProp: c !== void 0 ? c : [null, null],
59
- onChange: E
57
+ prop: K,
58
+ defaultProp: i !== void 0 ? i : [null, null],
59
+ onChange: H
60
60
  }
61
61
  ), ae = (t) => {
62
- u(t), M && b(t) && (s(!1), o == null || o(), window.setTimeout(() => {
63
- var p;
64
- return (p = i.current) == null ? void 0 : p.focus();
65
- }, 0));
66
- }, oe = b(e), f = pe(e), re = e != null && e[0] ? D(y(e[0]).locale(l).format(d)) : "", ne = e != null && e[1] ? D(y(e[1]).locale(l).format(d)) : "", m = () => {
67
- var t;
68
- u([null, null]), s(!0), G && (r == null || r()), (t = i.current) == null || t.focus();
62
+ c(t), g && y(t) && (l(!1), u?.(), window.setTimeout(() => r.current?.focus(), 0));
63
+ }, te = y(a), s = me(a), oe = a?.[0] ? h(D(a[0]).locale(n).format(d)) : "", ne = a?.[1] ? h(D(a[1]).locale(n).format(d)) : "", m = () => {
64
+ c([null, null]), l(!0), _ && f?.(), r.current?.focus();
69
65
  }, le = (t) => {
70
- !t && f && (e == null ? void 0 : e[1]) === null && m(), s(t);
66
+ !t && s && a?.[1] === null && m(), l(t);
71
67
  };
72
- return /* @__PURE__ */ h(
73
- ue,
68
+ return /* @__PURE__ */ p(
69
+ de,
74
70
  {
75
- ref: ce(I, i),
76
- dropdownOpened: te,
71
+ ref: ue(q, r),
72
+ dropdownOpened: ee,
77
73
  setDropdownOpened: le,
78
- size: Q,
79
- style: U,
80
- className: n,
81
- inputLabel: f ? `${re} ${T} ${ne}` : "",
82
- clearable: g && f,
74
+ size: I,
75
+ style: J,
76
+ className: o,
77
+ inputLabel: s ? `${oe} ${B} ${ne}` : "",
78
+ clearable: b && s,
83
79
  clearButton: C,
84
- disabled: P,
85
- inputPrefix: z,
86
- inputSuffix: B,
80
+ disabled: L,
81
+ inputPrefix: $,
82
+ inputSuffix: j,
87
83
  onClear: m,
88
- onDropdownClose: o,
89
- onDropdownOpen: r,
90
- ..._,
91
- children: /* @__PURE__ */ h(
92
- de,
84
+ onDropdownClose: u,
85
+ onDropdownOpen: f,
86
+ ...X,
87
+ children: /* @__PURE__ */ p(
88
+ fe,
93
89
  {
94
- locale: l,
95
- defaultMonth: oe ? e == null ? void 0 : e[0] : k,
96
- value: e,
97
- labelFormat: N,
98
- dayClassName: V,
99
- dayStyle: Y,
100
- disableOutOfMonth: F,
101
- minDate: q,
102
- maxDate: H,
103
- disableDate: R,
104
- firstDayOfWeek: S,
105
- enableHeaderLabel: x,
106
- singleDate: K,
107
- dateViewCount: O,
108
- defaultView: L,
109
- hideOutOfMonthDates: A,
110
- hideWeekdays: $,
111
- renderDay: J,
112
- weekendDays: Z,
113
- yearLabelFormat: v,
90
+ locale: n,
91
+ defaultMonth: te ? a?.[0] : V,
92
+ value: a,
93
+ labelFormat: z,
94
+ dayClassName: O,
95
+ dayStyle: M,
96
+ disableOutOfMonth: x,
97
+ minDate: W,
98
+ maxDate: T,
99
+ disableDate: P,
100
+ firstDayOfWeek: F,
101
+ enableHeaderLabel: R,
102
+ singleDate: G,
103
+ dateViewCount: w,
104
+ defaultView: k,
105
+ hideOutOfMonthDates: S,
106
+ hideWeekdays: A,
107
+ renderDay: E,
108
+ weekendDays: Q,
109
+ yearLabelFormat: U,
114
110
  onChange: (t) => ae(t)
115
111
  }
116
112
  )
@@ -118,6 +114,6 @@ const b = (a) => Array.isArray(a) && a.length === 2 && a.every((n) => n instance
118
114
  );
119
115
  };
120
116
  export {
121
- ke as default
117
+ Ve as default
122
118
  };
123
119
  //# sourceMappingURL=DatePickerRange.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerRange.js","sources":["../../../../../lib/@ecme/components/ui/DatePicker/DatePickerRange.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useState, useRef } from 'react'\nimport dayjs from 'dayjs'\nimport useControllableState from '../hooks/useControllableState'\nimport useMergedRef from '../hooks/useMergeRef'\nimport capitalize from '../utils/capitalize'\nimport RangeCalendar from './RangeCalendar'\nimport BasePicker from './BasePicker'\nimport { useConfig } from '../ConfigProvider'\nimport type { CommonProps } from '../@types/common'\nimport type { CalendarSharedProps } from './CalendarBase'\nimport type { BasePickerSharedProps } from './BasePicker'\nimport type { Ref } from 'react'\n\nexport type DatePickerRangeValue = [Date | null, Date | null]\n\nexport interface DatePickerRangeProps\n extends CommonProps,\n Omit<\n CalendarSharedProps,\n | 'onMonthChange'\n | 'onChange'\n | 'isDateInRange'\n | 'isDateFirstInRange'\n | 'isDateLastInRange'\n | 'month'\n >,\n BasePickerSharedProps {\n closePickerOnChange?: boolean\n defaultOpen?: boolean\n defaultValue?: DatePickerRangeValue\n inputFormat?: string\n separator?: string\n onChange?: (value: DatePickerRangeValue) => void\n openPickerOnClear?: boolean\n ref?: Ref<HTMLInputElement>\n singleDate?: boolean\n value?: DatePickerRangeValue\n}\n\nconst validationRule = (val: any) =>\n Array.isArray(val) &&\n val.length === 2 &&\n val.every((v) => v instanceof Date)\n\nconst isFirstDateSet = (val: any) =>\n Array.isArray(val) && val.length === 2 && val[0] instanceof Date\n\nconst DatePickerRange = (props: DatePickerRangeProps) => {\n const {\n className,\n clearable = true,\n clearButton,\n closePickerOnChange = true,\n dateViewCount = 1,\n dayClassName,\n dayStyle,\n defaultMonth,\n defaultOpen = false,\n defaultValue,\n defaultView,\n disabled,\n disableDate,\n enableHeaderLabel,\n disableOutOfMonth,\n firstDayOfWeek = 'monday',\n hideOutOfMonthDates,\n hideWeekdays,\n inputFormat,\n inputPrefix,\n inputSuffix,\n labelFormat = {\n month: 'MMM',\n year: 'YYYY',\n },\n separator = '~',\n locale,\n maxDate,\n minDate,\n onChange,\n onDropdownClose,\n onDropdownOpen,\n openPickerOnClear = false,\n ref = null,\n renderDay,\n singleDate = false,\n size,\n style,\n value,\n weekendDays,\n yearLabelFormat,\n ...rest\n } = props\n\n const { locale: themeLocale } = useConfig()\n\n const finalLocale = locale || themeLocale\n\n const dateFormat = inputFormat || 'YYYY-MM-DD'\n\n const [dropdownOpened, setDropdownOpened] = useState(defaultOpen)\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const [_value, setValue] = useControllableState<[Date | null, Date | null]>(\n {\n prop: value,\n defaultProp:\n defaultValue !== undefined ? defaultValue : [null, null],\n onChange,\n },\n )\n\n const handleValueChange = (range: [Date, Date]) => {\n setValue(range)\n if (closePickerOnChange && validationRule(range)) {\n setDropdownOpened(false)\n onDropdownClose?.()\n window.setTimeout(() => inputRef.current?.focus(), 0)\n }\n }\n\n const valueValid = validationRule(_value)\n const firstValueValid = isFirstDateSet(_value)\n\n const firstDateLabel = _value?.[0]\n ? capitalize(dayjs(_value[0]).locale(finalLocale).format(dateFormat))\n : ''\n\n const secondDateLabel = _value?.[1]\n ? capitalize(dayjs(_value[1]).locale(finalLocale).format(dateFormat))\n : ''\n\n const handleClear = () => {\n setValue([null, null])\n setDropdownOpened(true)\n openPickerOnClear && onDropdownOpen?.()\n inputRef.current?.focus()\n }\n\n const handleDropdownToggle = (isOpened: boolean) => {\n if (!isOpened && firstValueValid && _value?.[1] === null) {\n handleClear()\n }\n setDropdownOpened(isOpened)\n }\n\n return (\n <BasePicker\n ref={useMergedRef(ref, inputRef)}\n dropdownOpened={dropdownOpened as boolean}\n setDropdownOpened={handleDropdownToggle}\n size={size}\n style={style}\n className={className}\n inputLabel={\n firstValueValid\n ? `${firstDateLabel} ${separator} ${secondDateLabel}`\n : ''\n }\n clearable={clearable && firstValueValid}\n clearButton={clearButton}\n disabled={disabled}\n inputPrefix={inputPrefix}\n inputSuffix={inputSuffix}\n onClear={handleClear}\n onDropdownClose={onDropdownClose}\n onDropdownOpen={onDropdownOpen}\n {...rest}\n >\n <RangeCalendar\n locale={finalLocale}\n defaultMonth={(valueValid ? _value?.[0] : defaultMonth) as Date}\n value={_value as [Date | null, Date | null]}\n labelFormat={labelFormat}\n dayClassName={dayClassName}\n dayStyle={dayStyle}\n disableOutOfMonth={disableOutOfMonth}\n minDate={minDate}\n maxDate={maxDate}\n disableDate={disableDate}\n firstDayOfWeek={firstDayOfWeek}\n enableHeaderLabel={enableHeaderLabel}\n singleDate={singleDate}\n dateViewCount={dateViewCount}\n defaultView={defaultView}\n hideOutOfMonthDates={hideOutOfMonthDates}\n hideWeekdays={hideWeekdays}\n renderDay={renderDay}\n weekendDays={weekendDays}\n yearLabelFormat={yearLabelFormat}\n onChange={(date) => handleValueChange(date as [Date, Date])}\n />\n </BasePicker>\n )\n}\n\nexport default DatePickerRange\n"],"names":["validationRule","val","v","isFirstDateSet","DatePickerRange","props","className","clearable","clearButton","closePickerOnChange","dateViewCount","dayClassName","dayStyle","defaultMonth","defaultOpen","defaultValue","defaultView","disabled","disableDate","enableHeaderLabel","disableOutOfMonth","firstDayOfWeek","hideOutOfMonthDates","hideWeekdays","inputFormat","inputPrefix","inputSuffix","labelFormat","separator","locale","maxDate","minDate","onChange","onDropdownClose","onDropdownOpen","openPickerOnClear","ref","renderDay","singleDate","size","style","value","weekendDays","yearLabelFormat","rest","themeLocale","useConfig","finalLocale","dateFormat","dropdownOpened","setDropdownOpened","useState","inputRef","useRef","_value","setValue","useControllableState","handleValueChange","range","_a","valueValid","firstValueValid","firstDateLabel","capitalize","dayjs","secondDateLabel","handleClear","handleDropdownToggle","isOpened","jsx","BasePicker","useMergedRef","RangeCalendar","date"],"mappings":";;;;;;;;;;AAwCA,MAAMA,IA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,MACA,YACIuD,IACM,GAAGC,EAAc,IAAIlC,CAAS,IAAIqC,EAAe,KACjD;AAAA,MAEV,WAAW1D,KAAasD;AAAA,MACxB,aAAArD;AAAA,MACA,UAAAS;AAAA,MACA,aAAAQ;AAAA,MACA,aAAAC;AAAA,MACA,SAASwC;AAAA,MACT,iBAAAjC;AAAA,MACA,gBAAAC;AAAA,MACC,GAAGU;AAAA,MAEJ,UAAA,gBAAAyB;AAAA,QAACG;AAAA,QAAA;AAAA,UACG,QAAQzB;AAAA,UACR,cAAea,KAAaN,KAAA,gBAAAA,EAAS,KAAKzC;AAAA,UAC1C,OAAOyC;AAAA,UACP,aAAA3B;AAAA,UACA,cAAAhB;AAAA,UACA,UAAAC;AAAA,UACA,mBAAAQ;AAAA,UACA,SAAAW;AAAA,UACA,SAAAD;AAAA,UACA,aAAAZ;AAAA,UACA,gBAAAG;AAAA,UACA,mBAAAF;AAAA,UACA,YAAAmB;AAAA,UACA,eAAA5B;AAAA,UACA,aAAAM;AAAA,UACA,qBAAAM;AAAA,UACA,cAAAC;AAAA,UACA,WAAAc;AAAA,UACA,aAAAK;AAAA,UACA,iBAAAC;AAAA,UACA,UAAU,CAAC8B,MAAShB,GAAkBgB,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9D;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"DatePickerRange.js","sources":["../../../../../lib/@ecme/components/ui/DatePicker/DatePickerRange.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useState, useRef } from 'react'\nimport dayjs from 'dayjs'\nimport useControllableState from '../hooks/useControllableState'\nimport useMergedRef from '../hooks/useMergeRef'\nimport capitalize from '../utils/capitalize'\nimport RangeCalendar from './RangeCalendar'\nimport BasePicker from './BasePicker'\nimport { useConfig } from '../ConfigProvider'\nimport type { CommonProps } from '../@types/common'\nimport type { CalendarSharedProps } from './CalendarBase'\nimport type { BasePickerSharedProps } from './BasePicker'\nimport type { Ref } from 'react'\n\nexport type DatePickerRangeValue = [Date | null, Date | null]\n\nexport interface DatePickerRangeProps\n extends CommonProps,\n Omit<\n CalendarSharedProps,\n | 'onMonthChange'\n | 'onChange'\n | 'isDateInRange'\n | 'isDateFirstInRange'\n | 'isDateLastInRange'\n | 'month'\n >,\n BasePickerSharedProps {\n closePickerOnChange?: boolean\n defaultOpen?: boolean\n defaultValue?: DatePickerRangeValue\n inputFormat?: string\n separator?: string\n onChange?: (value: DatePickerRangeValue) => void\n openPickerOnClear?: boolean\n ref?: Ref<HTMLInputElement>\n singleDate?: boolean\n value?: DatePickerRangeValue\n}\n\nconst validationRule = (val: any) =>\n Array.isArray(val) &&\n val.length === 2 &&\n val.every((v) => v instanceof Date)\n\nconst isFirstDateSet = (val: any) =>\n Array.isArray(val) && val.length === 2 && val[0] instanceof Date\n\nconst DatePickerRange = (props: DatePickerRangeProps) => {\n const {\n className,\n clearable = true,\n clearButton,\n closePickerOnChange = true,\n dateViewCount = 1,\n dayClassName,\n dayStyle,\n defaultMonth,\n defaultOpen = false,\n defaultValue,\n defaultView,\n disabled,\n disableDate,\n enableHeaderLabel,\n disableOutOfMonth,\n firstDayOfWeek = 'monday',\n hideOutOfMonthDates,\n hideWeekdays,\n inputFormat,\n inputPrefix,\n inputSuffix,\n labelFormat = {\n month: 'MMM',\n year: 'YYYY',\n },\n separator = '~',\n locale,\n maxDate,\n minDate,\n onChange,\n onDropdownClose,\n onDropdownOpen,\n openPickerOnClear = false,\n ref = null,\n renderDay,\n singleDate = false,\n size,\n style,\n value,\n weekendDays,\n yearLabelFormat,\n ...rest\n } = props\n\n const { locale: themeLocale } = useConfig()\n\n const finalLocale = locale || themeLocale\n\n const dateFormat = inputFormat || 'YYYY-MM-DD'\n\n const [dropdownOpened, setDropdownOpened] = useState(defaultOpen)\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const [_value, setValue] = useControllableState<[Date | null, Date | null]>(\n {\n prop: value,\n defaultProp:\n defaultValue !== undefined ? defaultValue : [null, null],\n onChange,\n },\n )\n\n const handleValueChange = (range: [Date, Date]) => {\n setValue(range)\n if (closePickerOnChange && validationRule(range)) {\n setDropdownOpened(false)\n onDropdownClose?.()\n window.setTimeout(() => inputRef.current?.focus(), 0)\n }\n }\n\n const valueValid = validationRule(_value)\n const firstValueValid = isFirstDateSet(_value)\n\n const firstDateLabel = _value?.[0]\n ? capitalize(dayjs(_value[0]).locale(finalLocale).format(dateFormat))\n : ''\n\n const secondDateLabel = _value?.[1]\n ? capitalize(dayjs(_value[1]).locale(finalLocale).format(dateFormat))\n : ''\n\n const handleClear = () => {\n setValue([null, null])\n setDropdownOpened(true)\n openPickerOnClear && onDropdownOpen?.()\n inputRef.current?.focus()\n }\n\n const handleDropdownToggle = (isOpened: boolean) => {\n if (!isOpened && firstValueValid && _value?.[1] === null) {\n handleClear()\n }\n setDropdownOpened(isOpened)\n }\n\n return (\n <BasePicker\n ref={useMergedRef(ref, inputRef)}\n dropdownOpened={dropdownOpened as boolean}\n setDropdownOpened={handleDropdownToggle}\n size={size}\n style={style}\n className={className}\n inputLabel={\n firstValueValid\n ? `${firstDateLabel} ${separator} ${secondDateLabel}`\n : ''\n }\n clearable={clearable && firstValueValid}\n clearButton={clearButton}\n disabled={disabled}\n inputPrefix={inputPrefix}\n inputSuffix={inputSuffix}\n onClear={handleClear}\n onDropdownClose={onDropdownClose}\n onDropdownOpen={onDropdownOpen}\n {...rest}\n >\n <RangeCalendar\n locale={finalLocale}\n defaultMonth={(valueValid ? _value?.[0] : defaultMonth) as Date}\n value={_value as [Date | null, Date | null]}\n labelFormat={labelFormat}\n dayClassName={dayClassName}\n dayStyle={dayStyle}\n disableOutOfMonth={disableOutOfMonth}\n minDate={minDate}\n maxDate={maxDate}\n disableDate={disableDate}\n firstDayOfWeek={firstDayOfWeek}\n enableHeaderLabel={enableHeaderLabel}\n singleDate={singleDate}\n dateViewCount={dateViewCount}\n defaultView={defaultView}\n hideOutOfMonthDates={hideOutOfMonthDates}\n hideWeekdays={hideWeekdays}\n renderDay={renderDay}\n weekendDays={weekendDays}\n yearLabelFormat={yearLabelFormat}\n onChange={(date) => handleValueChange(date as [Date, Date])}\n />\n </BasePicker>\n )\n}\n\nexport default DatePickerRange\n"],"names":["validationRule","val","v","isFirstDateSet","DatePickerRange","props","className","clearable","clearButton","closePickerOnChange","dateViewCount","dayClassName","dayStyle","defaultMonth","defaultOpen","defaultValue","defaultView","disabled","disableDate","enableHeaderLabel","disableOutOfMonth","firstDayOfWeek","hideOutOfMonthDates","hideWeekdays","inputFormat","inputPrefix","inputSuffix","labelFormat","separator","locale","maxDate","minDate","onChange","onDropdownClose","onDropdownOpen","openPickerOnClear","ref","renderDay","singleDate","size","style","value","weekendDays","yearLabelFormat","rest","themeLocale","useConfig","finalLocale","dateFormat","dropdownOpened","setDropdownOpened","useState","inputRef","useRef","_value","setValue","useControllableState","handleValueChange","range","valueValid","firstValueValid","firstDateLabel","capitalize","dayjs","secondDateLabel","handleClear","handleDropdownToggle","isOpened","jsx","BasePicker","useMergedRef","RangeCalendar","date"],"mappings":";;;;;;;;;;AAwCA,MAAMA,IAAiB,CAACC,MACpB,MAAM,QAAQA,CAAG,KACjBA,EAAI,WAAW,KACfA,EAAI,MAAM,CAACC,MAAMA,aAAa,IAAI,GAEhCC,KAAiB,CAACF,MACpB,MAAM,QAAQA,CAAG,KAAKA,EAAI,WAAW,KAAKA,EAAI,CAAC,aAAa,MAE1DG,KAAkB,CAACC,MAAgC;AACrD,QAAM;AAAA,IACF,WAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,aAAAC;AAAA,IACA,qBAAAC,IAAsB;AAAA,IACtB,eAAAC,IAAgB;AAAA,IAChB,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,gBAAA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cAAAC;AAAA,UACA,WAAAc;AAAA,UACA,aAAAK;AAAA,UACA,iBAAAC;AAAA,UACA,UAAU,CAAC6B,MAASf,GAAkBe,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9D;AAAA,EAAA;AAGZ;"}
@@ -1,10 +1,10 @@
1
- import { jsxs as V, jsx as w } from "react/jsx-runtime";
2
- import { useState as c, useRef as be, useEffect as Ce } from "react";
1
+ import { jsxs as V, jsx as g } from "react/jsx-runtime";
2
+ import { useState as u, useRef as we, useEffect as be } from "react";
3
3
  import n from "dayjs";
4
4
  import ye from "../hooks/useControllableState.js";
5
- import Fe from "../hooks/useMergeRef.js";
6
- import f from "../utils/capitalize.js";
7
- import Oe from "../TimeInput/TimeInput.js";
5
+ import Oe from "../hooks/useMergeRef.js";
6
+ import c from "../utils/capitalize.js";
7
+ import Fe from "../TimeInput/TimeInput.js";
8
8
  import ke from "./Calendar.js";
9
9
  import Te from "./BasePicker.js";
10
10
  import Ye from "../Button/Button.js";
@@ -19,11 +19,11 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
19
19
  dateViewCount: B,
20
20
  dayClassName: H,
21
21
  dayStyle: I,
22
- defaultMonth: b,
22
+ defaultMonth: M,
23
23
  defaultOpen: N = !1,
24
24
  defaultValue: C,
25
25
  defaultView: z,
26
- disabled: y = !1,
26
+ disabled: w = !1,
27
27
  disableDate: R,
28
28
  enableHeaderLabel: _,
29
29
  disableOutOfMonth: j,
@@ -43,35 +43,35 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
43
43
  minDate: Z,
44
44
  name: $ = "dateTime",
45
45
  okButtonContent: ee = "OK",
46
- onBlur: F,
47
- onChange: i,
48
- onFocus: O,
49
- onDropdownClose: m,
50
- onDropdownOpen: d,
46
+ onBlur: b,
47
+ onChange: d,
48
+ onFocus: y,
49
+ onDropdownClose: O,
50
+ onDropdownOpen: F,
51
51
  openPickerOnClear: te,
52
52
  ref: ae = null,
53
53
  renderDay: oe,
54
54
  size: ne,
55
- value: u,
55
+ value: i,
56
56
  weekendDays: le,
57
57
  yearLabelFormat: se,
58
58
  ...re
59
- } = x, { locale: ie } = ve(), l = Q || ie, r = W || Ve, [ue, D] = c(N), p = be(null), [Le, k] = c(C ?? null), [t, h] = ye({
60
- prop: u,
59
+ } = x, { locale: ie } = ve(), l = Q || ie, r = W || Ve, [ue, p] = u(N), f = we(null), [Le, k] = u(C ?? null), [t, m] = ye({
60
+ prop: i,
61
61
  defaultProp: C,
62
- onChange: i
63
- }), [ce, T] = c(
64
- t || b || /* @__PURE__ */ new Date()
65
- ), [g, Y] = c(!1), [fe, o] = c(
66
- t instanceof Date ? f(n(t).locale(l).format(r)) : ""
67
- ), M = () => {
68
- D(!1), m == null || m();
62
+ onChange: d
63
+ }), [ce, T] = u(
64
+ t || M || /* @__PURE__ */ new Date()
65
+ ), [h, Y] = u(!1), [fe, o] = u(
66
+ t instanceof Date ? c(n(t).locale(l).format(r)) : ""
67
+ ), D = () => {
68
+ p(!1), O?.();
69
69
  }, v = () => {
70
- D(!0), d == null || d();
70
+ p(!0), F?.();
71
71
  };
72
- Ce(() => {
73
- u === null && !g && o(""), u instanceof Date && !g && o(n(u).locale(l).format(r));
74
- }, [u, g]);
72
+ be(() => {
73
+ i === null && !h && o(""), i instanceof Date && !h && o(n(i).locale(l).format(r));
74
+ }, [i, h]);
75
75
  const me = (e) => {
76
76
  if (t)
77
77
  e.setHours(t.getHours()), e.setMinutes(t.getMinutes());
@@ -79,23 +79,19 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
79
79
  const a = new Date(Date.now());
80
80
  e.setHours(a.getHours()), e.setMinutes(a.getMinutes());
81
81
  }
82
- h(e), !u && !s && o(n(e).locale(l).format(r)), s && o(
83
- f(n(e).locale(l).format(r))
84
- ), s && M(), window.setTimeout(() => {
85
- var a;
86
- return (a = p.current) == null ? void 0 : a.focus();
87
- }, 0);
82
+ m(e), !i && !s && o(n(e).locale(l).format(r)), s && o(
83
+ c(n(e).locale(l).format(r))
84
+ ), s && D(), window.setTimeout(() => f.current?.focus(), 0);
88
85
  }, de = () => {
89
- var e;
90
- h(null), k(null), o(""), te && v(), (e = p.current) == null || e.focus(), i == null || i(null);
86
+ m(null), k(null), o(""), te && v(), f.current?.focus(), d?.(null);
91
87
  }, pe = (e) => n(e, r, l).toDate(), he = (e) => {
92
- typeof F == "function" && F(e), Y(!1);
88
+ typeof b == "function" && b(e), Y(!1);
93
89
  }, De = (e) => {
94
- typeof O == "function" && O(e), Y(!0);
90
+ typeof y == "function" && y(e), Y(!0);
95
91
  }, ge = (e) => {
96
92
  v();
97
93
  const a = pe(e.target.value);
98
- n(a).isValid() ? (h(a), k(a), s && o(e.target.value), T(a)) : s && o(e.target.value);
94
+ n(a).isValid() ? (m(a), k(a), s && o(e.target.value), T(a)) : s && o(e.target.value);
99
95
  }, Me = (e) => {
100
96
  if (t instanceof Date && e instanceof Date) {
101
97
  const a = new Date(
@@ -107,36 +103,33 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
107
103
  e.getSeconds(),
108
104
  e.getMilliseconds()
109
105
  );
110
- h(a), !u && !s && o(
111
- f(
106
+ m(a), !i && !s && o(
107
+ c(
112
108
  n(a).locale(l).format(r)
113
109
  )
114
110
  ), s && o(
115
- f(
111
+ c(
116
112
  n(a).locale(l).format(r)
117
113
  )
118
114
  );
119
115
  }
120
- s && M();
121
- }, we = () => {
116
+ s && D();
117
+ }, Ce = () => {
122
118
  o(
123
- f(n(t).locale(l).format(r))
124
- ), M(), window.setTimeout(() => {
125
- var e;
126
- return (e = p.current) == null ? void 0 : e.focus();
127
- }, 0), i == null || i(t);
119
+ c(n(t).locale(l).format(r))
120
+ ), D(), window.setTimeout(() => f.current?.focus(), 0), d?.(t);
128
121
  };
129
122
  return /* @__PURE__ */ V(
130
123
  Te,
131
124
  {
132
- ref: Fe(ae, p),
125
+ ref: Oe(ae, f),
133
126
  dropdownOpened: ue,
134
- setDropdownOpened: D,
127
+ setDropdownOpened: p,
135
128
  className: P,
136
129
  name: $,
137
130
  inputLabel: fe,
138
- clearable: S && !!t && !y,
139
- disabled: y,
131
+ clearable: S && !!t && !w,
132
+ disabled: w,
140
133
  size: ne,
141
134
  inputPrefix: K,
142
135
  inputSuffix: q,
@@ -144,16 +137,16 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
144
137
  onBlur: he,
145
138
  onFocus: De,
146
139
  onClear: de,
147
- onDropdownClose: m,
148
- onDropdownOpen: d,
140
+ onDropdownClose: O,
141
+ onDropdownOpen: F,
149
142
  ...re,
150
143
  children: [
151
- /* @__PURE__ */ w(
144
+ /* @__PURE__ */ g(
152
145
  ke,
153
146
  {
154
147
  locale: l,
155
148
  month: G ? ce : void 0,
156
- defaultMonth: b || (t instanceof Date ? t : /* @__PURE__ */ new Date()),
149
+ defaultMonth: M || (t instanceof Date ? t : /* @__PURE__ */ new Date()),
157
150
  value: t instanceof Date ? t : t && n(t).toDate(),
158
151
  labelFormat: J,
159
152
  dayClassName: H,
@@ -177,8 +170,8 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
177
170
  }
178
171
  ),
179
172
  /* @__PURE__ */ V("div", { className: "flex items-center gap-4 mt-4", children: [
180
- /* @__PURE__ */ w(
181
- Oe,
173
+ /* @__PURE__ */ g(
174
+ Fe,
182
175
  {
183
176
  disabled: !t,
184
177
  value: t,
@@ -188,7 +181,7 @@ const Ve = "DD-MMM-YYYY hh:mm a", xe = (x) => {
188
181
  onChange: Me
189
182
  }
190
183
  ),
191
- /* @__PURE__ */ w(Ye, { size: "sm", disabled: !t, onClick: we, children: ee })
184
+ /* @__PURE__ */ g(Ye, { size: "sm", disabled: !t, onClick: Ce, children: ee })
192
185
  ] })
193
186
  ]
194
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimepicker.js","sources":["../../../../../lib/@ecme/components/ui/DatePicker/DateTimepicker.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\r\nimport dayjs from 'dayjs'\r\nimport useControllableState from '../hooks/useControllableState'\r\nimport useMergedRef from '../hooks/useMergeRef'\r\nimport capitalize from '../utils/capitalize'\r\nimport TimeInput from '../TimeInput/TimeInput'\r\nimport Calendar from './Calendar'\r\nimport BasePicker from './BasePicker'\r\nimport Button from '../Button/Button'\r\nimport { useConfig } from '../ConfigProvider'\r\nimport type { CommonProps } from '../@types/common'\r\nimport type { CalendarSharedProps } from './CalendarBase'\r\nimport type { BasePickerSharedProps } from './BasePicker'\r\nimport type { FocusEvent, ChangeEvent, Ref } from 'react'\r\n\r\nexport interface DateTimepickerProps\r\n extends CommonProps,\r\n Omit<\r\n CalendarSharedProps,\r\n | 'onMonthChange'\r\n | 'onChange'\r\n | 'isDateInRange'\r\n | 'isDateFirstInRange'\r\n | 'isDateLastInRange'\r\n | 'month'\r\n >,\r\n BasePickerSharedProps {\r\n closePickerOnChange?: boolean\r\n defaultOpen?: boolean\r\n defaultValue?: Date | null\r\n value?: Date | null\r\n inputFormat?: string\r\n openPickerOnClear?: boolean\r\n onChange?: (value: Date | null) => void\r\n ref?: Ref<HTMLInputElement>\r\n amPm?: boolean\r\n okButtonContent?: boolean\r\n}\r\n\r\nconst DEFAULT_INPUT_FORMAT = 'DD-MMM-YYYY hh:mm a'\r\n\r\nconst DateTimepicker = (props: DateTimepickerProps) => {\r\n const {\r\n amPm = true,\r\n className,\r\n clearable = true,\r\n closePickerOnChange = false,\r\n dateViewCount,\r\n dayClassName,\r\n dayStyle,\r\n defaultMonth,\r\n defaultOpen = false,\r\n defaultValue,\r\n defaultView,\r\n disabled = false,\r\n disableDate,\r\n enableHeaderLabel,\r\n disableOutOfMonth,\r\n firstDayOfWeek = 'monday',\r\n hideOutOfMonthDates,\r\n hideWeekdays,\r\n inputFormat,\r\n inputPrefix,\r\n inputSuffix,\r\n inputtable,\r\n labelFormat = {\r\n month: 'MMM',\r\n year: 'YYYY',\r\n },\r\n locale,\r\n maxDate,\r\n minDate,\r\n name = 'dateTime',\r\n okButtonContent = 'OK',\r\n onBlur,\r\n onChange,\r\n onFocus,\r\n onDropdownClose,\r\n onDropdownOpen,\r\n openPickerOnClear,\r\n ref = null,\r\n renderDay,\r\n size,\r\n value,\r\n weekendDays,\r\n yearLabelFormat,\r\n ...rest\r\n } = props\r\n\r\n const { locale: themeLocale } = useConfig()\r\n\r\n const finalLocale = locale || themeLocale\r\n\r\n const dateFormat = inputFormat || DEFAULT_INPUT_FORMAT\r\n\r\n const [dropdownOpened, setDropdownOpened] = useState(defaultOpen)\r\n\r\n const inputRef = useRef<HTMLInputElement>(null)\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const [_, setLastValidValue] = useState(defaultValue ?? null)\r\n const [_value, setValue] = useControllableState({\r\n prop: value,\r\n defaultProp: defaultValue,\r\n onChange,\r\n })\r\n\r\n const [calendarMonth, setCalendarMonth] = useState(\r\n _value || defaultMonth || new Date(),\r\n )\r\n\r\n const [focused, setFocused] = useState(false)\r\n const [inputState, setInputState] = useState(\r\n _value instanceof Date\r\n ? capitalize(dayjs(_value).locale(finalLocale).format(dateFormat))\r\n : '',\r\n )\r\n\r\n const closeDropdown = () => {\r\n setDropdownOpened(false)\r\n onDropdownClose?.()\r\n }\r\n\r\n const openDropdown = () => {\r\n setDropdownOpened(true)\r\n onDropdownOpen?.()\r\n }\r\n\r\n useEffect(() => {\r\n if (value === null && !focused) {\r\n setInputState('')\r\n }\r\n\r\n if (value instanceof Date && !focused) {\r\n setInputState(dayjs(value).locale(finalLocale).format(dateFormat))\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [value, focused])\r\n\r\n const handleValueChange = (date: Date) => {\r\n if (_value) {\r\n date.setHours(_value.getHours())\r\n date.setMinutes(_value.getMinutes())\r\n } else {\r\n const now = new Date(Date.now())\r\n date.setHours(now.getHours())\r\n date.setMinutes(now.getMinutes())\r\n }\r\n setValue(date)\r\n if (!value && !closePickerOnChange) {\r\n setInputState(dayjs(date).locale(finalLocale).format(dateFormat))\r\n }\r\n closePickerOnChange &&\r\n setInputState(\r\n capitalize(dayjs(date).locale(finalLocale).format(dateFormat)),\r\n )\r\n closePickerOnChange && closeDropdown()\r\n window.setTimeout(() => inputRef.current?.focus(), 0)\r\n }\r\n\r\n const handleClear = () => {\r\n setValue(null)\r\n setLastValidValue(null)\r\n setInputState('')\r\n openPickerOnClear && openDropdown()\r\n inputRef.current?.focus()\r\n onChange?.(null)\r\n }\r\n\r\n const parseDate = (date: string) =>\r\n dayjs(date, dateFormat, finalLocale).toDate()\r\n\r\n const handleInputBlur = (event: FocusEvent<HTMLInputElement, Element>) => {\r\n typeof onBlur === 'function' && onBlur(event)\r\n setFocused(false)\r\n }\r\n\r\n const handleInputFocus = (event: FocusEvent<HTMLInputElement, Element>) => {\r\n typeof onFocus === 'function' && onFocus(event)\r\n setFocused(true)\r\n }\r\n\r\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\r\n openDropdown()\r\n\r\n const date = parseDate(event.target.value)\r\n if (dayjs(date).isValid()) {\r\n setValue(date)\r\n setLastValidValue(date)\r\n closePickerOnChange && setInputState(event.target.value)\r\n setCalendarMonth(date)\r\n } else {\r\n closePickerOnChange && setInputState(event.target.value)\r\n }\r\n }\r\n\r\n const handleTimeChange = (time: Date | null) => {\r\n if (_value instanceof Date && time instanceof Date) {\r\n const newDateTime = new Date(\r\n _value.getFullYear(),\r\n _value.getMonth(),\r\n _value.getDate(),\r\n time.getHours(),\r\n time.getMinutes(),\r\n time.getSeconds(),\r\n time.getMilliseconds(),\r\n )\r\n setValue(newDateTime)\r\n\r\n if (!value && !closePickerOnChange) {\r\n setInputState(\r\n capitalize(\r\n dayjs(newDateTime)\r\n .locale(finalLocale)\r\n .format(dateFormat),\r\n ),\r\n )\r\n }\r\n\r\n closePickerOnChange &&\r\n setInputState(\r\n capitalize(\r\n dayjs(newDateTime)\r\n .locale(finalLocale)\r\n .format(dateFormat),\r\n ),\r\n )\r\n }\r\n closePickerOnChange && closeDropdown()\r\n }\r\n\r\n const handleOk = () => {\r\n setInputState(\r\n capitalize(dayjs(_value).locale(finalLocale).format(dateFormat)),\r\n )\r\n closeDropdown()\r\n window.setTimeout(() => inputRef.current?.focus(), 0)\r\n onChange?.(_value as Date | null)\r\n }\r\n\r\n return (\r\n <BasePicker\r\n ref={useMergedRef(ref, inputRef)}\r\n dropdownOpened={dropdownOpened as boolean}\r\n setDropdownOpened={setDropdownOpened}\r\n className={className}\r\n name={name}\r\n inputLabel={inputState}\r\n clearable={clearable && !!_value && !disabled}\r\n disabled={disabled}\r\n size={size}\r\n inputPrefix={inputPrefix}\r\n inputSuffix={inputSuffix}\r\n onChange={handleChange}\r\n onBlur={handleInputBlur}\r\n onFocus={handleInputFocus}\r\n onClear={handleClear}\r\n onDropdownClose={onDropdownClose}\r\n onDropdownOpen={onDropdownOpen}\r\n {...rest}\r\n >\r\n <Calendar\r\n locale={finalLocale}\r\n month={inputtable ? calendarMonth : undefined}\r\n defaultMonth={\r\n defaultMonth ||\r\n (_value instanceof Date ? _value : new Date())\r\n }\r\n value={\r\n _value instanceof Date\r\n ? _value\r\n : _value && dayjs(_value).toDate()\r\n }\r\n labelFormat={labelFormat}\r\n dayClassName={dayClassName}\r\n dayStyle={dayStyle}\r\n disableOutOfMonth={disableOutOfMonth}\r\n minDate={minDate}\r\n maxDate={maxDate}\r\n disableDate={disableDate}\r\n firstDayOfWeek={firstDayOfWeek}\r\n preventFocus={false}\r\n dateViewCount={dateViewCount}\r\n enableHeaderLabel={enableHeaderLabel}\r\n defaultView={defaultView}\r\n hideOutOfMonthDates={hideOutOfMonthDates}\r\n hideWeekdays={hideWeekdays}\r\n renderDay={renderDay}\r\n weekendDays={weekendDays}\r\n yearLabelFormat={yearLabelFormat}\r\n onMonthChange={setCalendarMonth}\r\n onChange={handleValueChange}\r\n />\r\n <div className=\"flex items-center gap-4 mt-4\">\r\n <TimeInput\r\n disabled={!_value}\r\n value={_value}\r\n format={amPm ? '12' : '24'}\r\n clearable={false}\r\n size=\"sm\"\r\n onChange={handleTimeChange}\r\n />\r\n <Button size=\"sm\" disabled={!_value} onClick={handleOk}>\r\n {okButtonContent}\r\n </Button>\r\n </div>\r\n </BasePicker>\r\n )\r\n}\r\n\r\nDateTimepicker.displayName = 'DateTimepicker'\r\n\r\nexport default DateTimepicker\r\n"],"names":["DEFAULT_INPUT_FORMAT","DateTimepicker","props","amPm","className","clearable","closePickerOnChange","dateViewCount","dayClassName","dayStyle","defaultMonth","defaultOpen","defaultValue","defaultView","disabled","disableDate","enableHeaderLabel","disableOutOfMonth","firstDayOfWeek","hideOutOfMonthDates","hideWeekdays","inputFormat","inputPrefix","inputSuffix","inputtable","labelFormat","locale","maxDate","minDate","name","okButtonContent","onBlur","onChange","onFocus","onDropdownClose","onDropdownOpen","openPickerOnClear","ref","renderDay","size","value","weekendDays","yearLabelFormat","rest","themeLocale","useConfig","finalLocale","dateFormat","dropdownOpened","setDropdownOpened","useState","inputRef","useRef","_","setLastValidValue","_value","setValue","useControllableState","calendarMonth","setCalendarMonth","focused","setFocused","inputState","setInputState","capitalize","dayjs","closeDropdown","openDropdown","useEffect","handleValueChange","date","now","_a","handleClear","parseDate","handleInputBlur","event","handleInputFocus","handleChange","handleTimeChange","time","newDateTime","handleOk","jsxs","BasePicker","useMergedRef","jsx","Calendar","TimeInput","Button"],"mappings":";;;;;;;;;;;;AAuCA,MAAMA,KAAuB,uBAEvBC,KAAiB,CAACC,MAA+B;AACnD,QAAM;AAAA,IACF,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,qBAAAC,IAAsB;AAAA,IACtB,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AA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AEd,gBAAAc,EAAC,OAAA,EAAI,WAAU,gCACX,UAAA;AAAA,UAAA,gBAAAG;AAAA,YAACE;AAAA,YAAA;AAAA,cACG,UAAU,CAACjC;AAAA,cACX,OAAOA;AAAA,cACP,QAAQpD,IAAO,OAAO;AAAA,cACtB,WAAW;AAAA,cACX,MAAK;AAAA,cACL,UAAU4E;AAAA,YAAA;AAAA,UAAA;AAAA,UAEd,gBAAAO,EAACG,MAAO,MAAK,MAAK,UAAU,CAAClC,GAAQ,SAAS2B,IACzC,UAAApD,GAAA,CACL;AAAA,QAAA,EAAA,CACJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGZ;AAEA7B,GAAe,cAAc;"}
1
+ {"version":3,"file":"DateTimepicker.js","sources":["../../../../../lib/@ecme/components/ui/DatePicker/DateTimepicker.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\r\nimport dayjs from 'dayjs'\r\nimport useControllableState from '../hooks/useControllableState'\r\nimport useMergedRef from '../hooks/useMergeRef'\r\nimport capitalize from '../utils/capitalize'\r\nimport TimeInput from '../TimeInput/TimeInput'\r\nimport Calendar from './Calendar'\r\nimport BasePicker from './BasePicker'\r\nimport Button from '../Button/Button'\r\nimport { useConfig } from '../ConfigProvider'\r\nimport type { CommonProps } from '../@types/common'\r\nimport type { CalendarSharedProps } from './CalendarBase'\r\nimport type { BasePickerSharedProps } from './BasePicker'\r\nimport type { FocusEvent, ChangeEvent, Ref } from 'react'\r\n\r\nexport interface DateTimepickerProps\r\n extends CommonProps,\r\n Omit<\r\n CalendarSharedProps,\r\n | 'onMonthChange'\r\n | 'onChange'\r\n | 'isDateInRange'\r\n | 'isDateFirstInRange'\r\n | 'isDateLastInRange'\r\n | 'month'\r\n >,\r\n BasePickerSharedProps {\r\n closePickerOnChange?: boolean\r\n defaultOpen?: boolean\r\n defaultValue?: Date | null\r\n value?: Date | null\r\n inputFormat?: string\r\n openPickerOnClear?: boolean\r\n onChange?: (value: Date | null) => void\r\n ref?: Ref<HTMLInputElement>\r\n amPm?: boolean\r\n okButtonContent?: boolean\r\n}\r\n\r\nconst DEFAULT_INPUT_FORMAT = 'DD-MMM-YYYY hh:mm a'\r\n\r\nconst DateTimepicker = (props: DateTimepickerProps) => {\r\n const {\r\n amPm = true,\r\n className,\r\n clearable = true,\r\n closePickerOnChange = false,\r\n dateViewCount,\r\n dayClassName,\r\n dayStyle,\r\n defaultMonth,\r\n defaultOpen = false,\r\n defaultValue,\r\n defaultView,\r\n disabled = false,\r\n disableDate,\r\n enableHeaderLabel,\r\n disableOutOfMonth,\r\n firstDayOfWeek = 'monday',\r\n hideOutOfMonthDates,\r\n hideWeekdays,\r\n inputFormat,\r\n inputPrefix,\r\n inputSuffix,\r\n inputtable,\r\n labelFormat = {\r\n month: 'MMM',\r\n year: 'YYYY',\r\n },\r\n locale,\r\n maxDate,\r\n minDate,\r\n name = 'dateTime',\r\n okButtonContent = 'OK',\r\n onBlur,\r\n onChange,\r\n onFocus,\r\n onDropdownClose,\r\n onDropdownOpen,\r\n openPickerOnClear,\r\n ref = null,\r\n renderDay,\r\n size,\r\n value,\r\n weekendDays,\r\n yearLabelFormat,\r\n ...rest\r\n } = props\r\n\r\n const { locale: themeLocale } = useConfig()\r\n\r\n const finalLocale = locale || themeLocale\r\n\r\n const dateFormat = inputFormat || DEFAULT_INPUT_FORMAT\r\n\r\n const [dropdownOpened, setDropdownOpened] = useState(defaultOpen)\r\n\r\n const inputRef = useRef<HTMLInputElement>(null)\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const [_, setLastValidValue] = useState(defaultValue ?? null)\r\n const [_value, setValue] = useControllableState({\r\n prop: value,\r\n defaultProp: defaultValue,\r\n onChange,\r\n })\r\n\r\n const [calendarMonth, setCalendarMonth] = useState(\r\n _value || defaultMonth || new Date(),\r\n )\r\n\r\n const [focused, setFocused] = useState(false)\r\n const [inputState, setInputState] = useState(\r\n _value instanceof Date\r\n ? capitalize(dayjs(_value).locale(finalLocale).format(dateFormat))\r\n : '',\r\n )\r\n\r\n const closeDropdown = () => {\r\n setDropdownOpened(false)\r\n onDropdownClose?.()\r\n }\r\n\r\n const openDropdown = () => {\r\n setDropdownOpened(true)\r\n onDropdownOpen?.()\r\n }\r\n\r\n useEffect(() => {\r\n if (value === null && !focused) {\r\n setInputState('')\r\n }\r\n\r\n if (value instanceof Date && !focused) {\r\n setInputState(dayjs(value).locale(finalLocale).format(dateFormat))\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [value, focused])\r\n\r\n const handleValueChange = (date: Date) => {\r\n if (_value) {\r\n date.setHours(_value.getHours())\r\n date.setMinutes(_value.getMinutes())\r\n } else {\r\n const now = new Date(Date.now())\r\n date.setHours(now.getHours())\r\n date.setMinutes(now.getMinutes())\r\n }\r\n setValue(date)\r\n if (!value && !closePickerOnChange) {\r\n setInputState(dayjs(date).locale(finalLocale).format(dateFormat))\r\n }\r\n closePickerOnChange &&\r\n setInputState(\r\n capitalize(dayjs(date).locale(finalLocale).format(dateFormat)),\r\n )\r\n closePickerOnChange && closeDropdown()\r\n window.setTimeout(() => inputRef.current?.focus(), 0)\r\n }\r\n\r\n const handleClear = () => {\r\n setValue(null)\r\n setLastValidValue(null)\r\n setInputState('')\r\n openPickerOnClear && openDropdown()\r\n inputRef.current?.focus()\r\n onChange?.(null)\r\n }\r\n\r\n const parseDate = (date: string) =>\r\n dayjs(date, dateFormat, finalLocale).toDate()\r\n\r\n const handleInputBlur = (event: FocusEvent<HTMLInputElement, Element>) => {\r\n typeof onBlur === 'function' && onBlur(event)\r\n setFocused(false)\r\n }\r\n\r\n const handleInputFocus = (event: FocusEvent<HTMLInputElement, Element>) => {\r\n typeof onFocus === 'function' && onFocus(event)\r\n setFocused(true)\r\n }\r\n\r\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\r\n openDropdown()\r\n\r\n const date = parseDate(event.target.value)\r\n if (dayjs(date).isValid()) {\r\n setValue(date)\r\n setLastValidValue(date)\r\n closePickerOnChange && setInputState(event.target.value)\r\n setCalendarMonth(date)\r\n } else {\r\n closePickerOnChange && setInputState(event.target.value)\r\n }\r\n }\r\n\r\n const handleTimeChange = (time: Date | null) => {\r\n if (_value instanceof Date && time instanceof Date) {\r\n const newDateTime = new Date(\r\n _value.getFullYear(),\r\n _value.getMonth(),\r\n _value.getDate(),\r\n time.getHours(),\r\n time.getMinutes(),\r\n time.getSeconds(),\r\n time.getMilliseconds(),\r\n )\r\n setValue(newDateTime)\r\n\r\n if (!value && !closePickerOnChange) {\r\n setInputState(\r\n capitalize(\r\n dayjs(newDateTime)\r\n .locale(finalLocale)\r\n .format(dateFormat),\r\n ),\r\n )\r\n }\r\n\r\n closePickerOnChange &&\r\n setInputState(\r\n capitalize(\r\n dayjs(newDateTime)\r\n .locale(finalLocale)\r\n .format(dateFormat),\r\n ),\r\n )\r\n }\r\n closePickerOnChange && closeDropdown()\r\n }\r\n\r\n const handleOk = () => {\r\n setInputState(\r\n capitalize(dayjs(_value).locale(finalLocale).format(dateFormat)),\r\n )\r\n closeDropdown()\r\n window.setTimeout(() => inputRef.current?.focus(), 0)\r\n onChange?.(_value as Date | null)\r\n }\r\n\r\n return (\r\n <BasePicker\r\n ref={useMergedRef(ref, inputRef)}\r\n dropdownOpened={dropdownOpened as boolean}\r\n setDropdownOpened={setDropdownOpened}\r\n className={className}\r\n name={name}\r\n inputLabel={inputState}\r\n clearable={clearable && !!_value && !disabled}\r\n disabled={disabled}\r\n size={size}\r\n inputPrefix={inputPrefix}\r\n inputSuffix={inputSuffix}\r\n onChange={handleChange}\r\n onBlur={handleInputBlur}\r\n onFocus={handleInputFocus}\r\n onClear={handleClear}\r\n onDropdownClose={onDropdownClose}\r\n onDropdownOpen={onDropdownOpen}\r\n {...rest}\r\n >\r\n <Calendar\r\n locale={finalLocale}\r\n month={inputtable ? calendarMonth : undefined}\r\n defaultMonth={\r\n defaultMonth ||\r\n (_value instanceof Date ? _value : new Date())\r\n }\r\n value={\r\n _value instanceof Date\r\n ? _value\r\n : _value && dayjs(_value).toDate()\r\n }\r\n labelFormat={labelFormat}\r\n dayClassName={dayClassName}\r\n dayStyle={dayStyle}\r\n disableOutOfMonth={disableOutOfMonth}\r\n minDate={minDate}\r\n maxDate={maxDate}\r\n disableDate={disableDate}\r\n firstDayOfWeek={firstDayOfWeek}\r\n preventFocus={false}\r\n dateViewCount={dateViewCount}\r\n enableHeaderLabel={enableHeaderLabel}\r\n defaultView={defaultView}\r\n hideOutOfMonthDates={hideOutOfMonthDates}\r\n hideWeekdays={hideWeekdays}\r\n renderDay={renderDay}\r\n weekendDays={weekendDays}\r\n yearLabelFormat={yearLabelFormat}\r\n onMonthChange={setCalendarMonth}\r\n onChange={handleValueChange}\r\n />\r\n <div className=\"flex items-center gap-4 mt-4\">\r\n <TimeInput\r\n disabled={!_value}\r\n value={_value}\r\n format={amPm ? '12' : '24'}\r\n clearable={false}\r\n size=\"sm\"\r\n onChange={handleTimeChange}\r\n />\r\n <Button size=\"sm\" disabled={!_value} onClick={handleOk}>\r\n {okButtonContent}\r\n </Button>\r\n </div>\r\n </BasePicker>\r\n )\r\n}\r\n\r\nDateTimepicker.displayName = 'DateTimepicker'\r\n\r\nexport default DateTimepicker\r\n"],"names":["DEFAULT_INPUT_FORMAT","DateTimepicker","props","amPm","className","clearable","closePickerOnChange","dateViewCount","dayClassName","dayStyle","defaultMonth","defaultOpen","defaultValue","defaultView","disabled","disableDate","enableHeaderLabel","disableOutOfMonth","firstDayOfWeek","hideOutOfMonthDates","hideWeekdays","inputFormat","inputPrefix","inputSuffix","inputtable","labelFormat","locale","maxDate","minDate","name","okButtonContent","onBlur","onChange","onFocus","onDropdownClose","onDropdownOpen","openPickerOnClear","ref","renderDay","size","value","weekendDays","yearLabelFormat","rest","themeLocale","useConfig","finalLocale","dateFormat","dropdownOpened","setDropdownOpened","useState","inputRef","useRef","_","setLastValidValue","_value","setValue","useControllableState","calendarMonth","setCalendarMonth","focused","setFocused","inputState","setInputState","capitalize","dayjs","closeDropdown","openDropdown","useEffect","handleValueChange","date","now","handleClear","parseDate","handleInputBlur","event","handleInputFocus","handleChange","handleTimeChange","time","newDateTime","handleOk","jsxs","BasePicker","useMergedRef","jsx","Calendar","TimeInput","Button"],"mappings":";;;;;;;;;;;;AAuCA,MAAMA,KAAuB,uBAEvBC,KAAiB,CAACC,MAA+B;AACnD,QAAM;AAAA,IACF,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,qBAAAC,IAAsB;AAAA,IACtB,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,qBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,IAEV,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,iBAAAC,KAAkB;AAAA,IAClB,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,KAAAC,KAAM;AAAA,IACN,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACHzC,GAEE,EAAE,QAAQ0C,GAAA,IAAgBC,GAAA,GAE1BC,IAAcpB,KAAUkB,IAExBG,IAAa1B,KAAerB,IAE5B,CAACgD,IAAgBC,CA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