@orbe-agro/client-core 5.3.85 → 5.3.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@ecme/assets/styles/app.css +1 -1
- package/dist/@ecme/assets/styles/components/_dialog.css +1 -1
- package/dist/@ecme/assets/styles/components/_drawer.css +1 -1
- package/dist/@ecme/assets/styles/components/_scrollbar.css +1 -1
- package/dist/@ecme/assets/styles/components/_switcher.css +1 -1
- package/dist/@ecme/assets/styles/components/_upload.css +1 -1
- package/dist/@ecme/assets/styles/components/index.css +1 -1
- package/dist/@ecme/assets/styles/tailwind/index.css +1 -1
- package/dist/@ecme/auth/AuthProvider.js +58 -62
- package/dist/@ecme/auth/AuthProvider.js.map +1 -1
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js +18 -19
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +29 -30
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js +56 -56
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js.map +1 -1
- package/dist/@ecme/components/shared/Affix.js +9 -10
- package/dist/@ecme/components/shared/Affix.js.map +1 -1
- package/dist/@ecme/components/shared/AutoComplete.js +27 -28
- package/dist/@ecme/components/shared/AutoComplete.js.map +1 -1
- package/dist/@ecme/components/shared/CalendarView.js +19 -20
- package/dist/@ecme/components/shared/CalendarView.js.map +1 -1
- package/dist/@ecme/components/shared/ConfirmDialog.js +16 -16
- package/dist/@ecme/components/shared/ConfirmDialog.js.map +1 -1
- package/dist/@ecme/components/shared/DataTable.js +151 -151
- package/dist/@ecme/components/shared/DataTable.js.map +1 -1
- package/dist/@ecme/components/shared/DebounceInput.js +11 -12
- package/dist/@ecme/components/shared/DebounceInput.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js +20 -20
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js +22 -22
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js.map +1 -1
- package/dist/@ecme/components/shared/ImageGallery.js +18 -18
- package/dist/@ecme/components/shared/ImageGallery.js.map +1 -1
- package/dist/@ecme/components/shared/Masonry/Masonry.js +25 -25
- package/dist/@ecme/components/shared/Masonry/Masonry.js.map +1 -1
- package/dist/@ecme/components/shared/OtpInput.js +54 -56
- package/dist/@ecme/components/shared/OtpInput.js.map +1 -1
- package/dist/@ecme/components/shared/PasswordInput.js +6 -6
- package/dist/@ecme/components/shared/PasswordInput.js.map +1 -1
- package/dist/@ecme/components/shared/RegionMap.js +9 -9
- package/dist/@ecme/components/shared/RegionMap.js.map +1 -1
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js +47 -47
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/@ecme/components/shared/UsersAvatarGroup.js +24 -24
- package/dist/@ecme/components/shared/UsersAvatarGroup.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js +63 -69
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js +48 -48
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js +220 -231
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js.map +1 -1
- package/dist/@ecme/components/template/LanguageSelector.js +10 -13
- package/dist/@ecme/components/template/LanguageSelector.js.map +1 -1
- package/dist/@ecme/components/template/Search.js +85 -92
- package/dist/@ecme/components/template/Search.js.map +1 -1
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js +18 -18
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js +17 -17
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js +59 -59
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +34 -34
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
- package/dist/@ecme/components/ui/Alert/Alert.js +29 -29
- package/dist/@ecme/components/ui/Alert/Alert.js.map +1 -1
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js +30 -30
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Button/Button.js +66 -67
- package/dist/@ecme/components/ui/Button/Button.js.map +1 -1
- package/dist/@ecme/components/ui/Card/Card.js +39 -40
- package/dist/@ecme/components/ui/Card/Card.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js +42 -42
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Group.js +27 -27
- package/dist/@ecme/components/ui/Checkbox/Group.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/Calendar.js +18 -18
- package/dist/@ecme/components/ui/DatePicker/Calendar.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js +77 -78
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js +67 -71
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js +94 -98
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js +51 -58
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js +12 -12
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js.map +1 -1
- package/dist/@ecme/components/ui/Dialog/Dialog.js +25 -25
- package/dist/@ecme/components/ui/Dialog/Dialog.js.map +1 -1
- package/dist/@ecme/components/ui/Drawer/Drawer.js +32 -32
- package/dist/@ecme/components/ui/Drawer/Drawer.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js +58 -58
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js +99 -100
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js +26 -26
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormContainer.js +17 -17
- package/dist/@ecme/components/ui/Form/FormContainer.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormItem.js +38 -38
- package/dist/@ecme/components/ui/Form/FormItem.js.map +1 -1
- package/dist/@ecme/components/ui/Input/Input.js +50 -52
- package/dist/@ecme/components/ui/Input/Input.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/Addon.js +12 -13
- package/dist/@ecme/components/ui/InputGroup/Addon.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js +10 -11
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Notification/Notification.js +19 -19
- package/dist/@ecme/components/ui/Notification/Notification.js.map +1 -1
- package/dist/@ecme/components/ui/Pagination/Pagination.js +45 -45
- package/dist/@ecme/components/ui/Pagination/Pagination.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Group.js +28 -28
- package/dist/@ecme/components/ui/Radio/Group.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Radio.js +42 -42
- package/dist/@ecme/components/ui/Radio/Radio.js.map +1 -1
- package/dist/@ecme/components/ui/Segment/SegmentItem.js +53 -53
- package/dist/@ecme/components/ui/Segment/SegmentItem.js.map +1 -1
- package/dist/@ecme/components/ui/Select/Select.js +40 -41
- package/dist/@ecme/components/ui/Select/Select.js.map +1 -1
- package/dist/@ecme/components/ui/Steps/StepItem.js +33 -33
- package/dist/@ecme/components/ui/Steps/StepItem.js.map +1 -1
- package/dist/@ecme/components/ui/Switcher/Switcher.js +24 -24
- package/dist/@ecme/components/ui/Switcher/Switcher.js.map +1 -1
- package/dist/@ecme/components/ui/Tabs/TabNav.js +22 -22
- package/dist/@ecme/components/ui/Tabs/TabNav.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js +25 -27
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js +130 -135
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js +22 -24
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js +65 -68
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js +11 -12
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js +19 -20
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js.map +1 -1
- package/dist/@ecme/components/ui/Upload/Upload.js +67 -68
- package/dist/@ecme/components/ui/Upload/Upload.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js +7 -10
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useRootClose.js +32 -32
- package/dist/@ecme/components/ui/hooks/useRootClose.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useTimeout.js +12 -13
- package/dist/@ecme/components/ui/hooks/useTimeout.js.map +1 -1
- package/dist/@ecme/components/ui/toast/ToastWrapper.js +58 -61
- package/dist/@ecme/components/ui/toast/ToastWrapper.js.map +1 -1
- package/dist/@ecme/components/ui/toast/toast.js +16 -19
- package/dist/@ecme/components/ui/toast/toast.js.map +1 -1
- package/dist/@ecme/components/view/Activity/ActivityEvent.js +63 -67
- package/dist/@ecme/components/view/Activity/ActivityEvent.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js +8 -9
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +37 -39
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Message.js +10 -10
- package/dist/@ecme/components/view/ChatBox/components/Message.js.map +1 -1
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js +36 -37
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js.map +1 -1
- package/dist/@ecme/components/view/TaskItem/TaskItem.js +33 -33
- package/dist/@ecme/components/view/TaskItem/TaskItem.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js +16 -18
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js +7 -8
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js.map +1 -1
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js +11 -11
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js.map +1 -1
- package/dist/@ecme/utils/hooks/useMenuActive.js +11 -12
- package/dist/@ecme/utils/hooks/useMenuActive.js.map +1 -1
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js +36 -37
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js +14 -14
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js +41 -42
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js.map +1 -1
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js +59 -60
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js +27 -27
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js +57 -58
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js +37 -38
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js +44 -45
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js +5 -5
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js +34 -35
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js +26 -26
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js +28 -29
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js +8 -8
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js +10 -11
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js +48 -49
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js +14 -14
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js +102 -103
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js +34 -35
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js +16 -16
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js +76 -78
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js +23 -23
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js +48 -49
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js +34 -35
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js +11 -14
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js +19 -19
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +22 -26
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js +18 -24
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js +22 -22
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js +38 -39
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js +68 -69
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js +63 -66
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js +21 -22
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js +84 -85
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js +19 -19
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js +51 -58
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js +76 -89
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js +104 -107
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js +22 -22
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js +38 -39
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js +20 -20
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js.map +1 -1
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js +32 -33
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js +17 -18
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js +5 -5
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js +12 -13
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js +28 -29
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js +63 -67
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js +8 -8
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js +36 -37
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js +134 -137
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js +35 -35
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js +38 -38
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js +108 -111
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js +44 -45
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js +211 -214
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js +15 -15
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js +4 -4
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js +97 -100
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js +68 -71
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js +85 -86
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js +121 -124
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js +11 -11
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js +101 -105
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js +57 -58
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js +51 -52
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js +22 -23
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js +45 -46
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js +62 -65
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js +52 -53
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js +23 -25
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js +15 -15
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js +16 -16
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js +9 -9
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js +40 -41
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js +33 -34
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js +33 -33
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js +203 -210
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js +53 -56
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js +80 -83
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js.map +1 -1
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js +6 -6
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js +21 -21
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js.map +1 -1
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js +59 -60
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js +76 -77
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js +30 -30
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js +21 -22
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js +15 -15
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js +17 -18
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js +12 -12
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js +28 -29
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js +21 -22
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js +24 -25
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js +75 -79
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js +19 -20
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js +90 -91
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js +22 -23
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js.map +1 -1
- package/dist/@types/base/configs/api.config.d.ts +0 -19
- package/dist/@types/base/configs/api.config.d.ts.map +1 -1
- package/dist/base/assets/styles/init.css +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js +24 -25
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js +23 -24
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js +30 -31
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js +25 -26
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js +49 -50
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js +23 -24
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js +29 -30
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js.map +1 -1
- package/dist/base/components/shared/TransferirProcessoDialog.js +10 -10
- package/dist/base/components/shared/TransferirProcessoDialog.js.map +1 -1
- package/dist/base/components/tools/NavFilter.js +68 -75
- package/dist/base/components/tools/NavFilter.js.map +1 -1
- package/dist/base/configs/api.config.js +11 -14
- package/dist/base/configs/api.config.js.map +1 -1
- package/dist/base/hooks/adm/roles/useRolesList.js +11 -11
- package/dist/base/hooks/adm/roles/useRolesList.js.map +1 -1
- package/dist/base/hooks/adm/users/useUsersList.js +10 -10
- package/dist/base/hooks/adm/users/useUsersList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js +5 -5
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js +7 -7
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js +10 -10
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js +13 -13
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroList.js +6 -6
- package/dist/base/hooks/dm/centro/useCentroList.js.map +1 -1
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js +4 -4
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js +9 -9
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoList.js +5 -5
- package/dist/base/hooks/dm/deposito/useDepositoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js +13 -13
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js +8 -8
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js +6 -6
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js +7 -7
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js +10 -10
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js +11 -11
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js +9 -9
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js +17 -18
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js +13 -13
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js +21 -21
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindList.js +8 -8
- package/dist/base/hooks/dm/produto/useProdutoFindList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js +11 -11
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js +9 -9
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js.map +1 -1
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js +5 -5
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js.map +1 -1
- package/dist/base/hooks/useList.js +10 -10
- package/dist/base/hooks/useList.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js +15 -15
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js +7 -7
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js.map +1 -1
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js +5 -5
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js.map +1 -1
- package/dist/base/utils/functions/stringUtils.js +14 -15
- package/dist/base/utils/functions/stringUtils.js.map +1 -1
- package/lib/base/configs/api.config.ts +6 -7
- package/package.json +1 -1
- package/tsconfig.json +6 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { Menu as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as r } from "../../../../../components/ui/Menu/index.js";
|
|
3
3
|
import "../../../../../components/ui/ScrollBar/index.js";
|
|
4
4
|
import { useSettingsStore as u } from "../store/settingsStore.js";
|
|
5
5
|
import m from "../../../../../utils/hooks/useQuery.js";
|
|
6
|
-
import { TbUserSquare as b, TbLock as f, TbBell as v, TbFileDollar as
|
|
7
|
-
import
|
|
8
|
-
const { MenuItem:
|
|
6
|
+
import { TbUserSquare as b, TbLock as f, TbBell as v, TbFileDollar as g, TbRefreshDot as p } from "react-icons/tb";
|
|
7
|
+
import h from "../../../../../components/ui/ScrollBar/ScrollBar.js";
|
|
8
|
+
const { MenuItem: d } = r, y = [
|
|
9
9
|
{ label: "Profile", value: "profile", icon: /* @__PURE__ */ e(b, {}) },
|
|
10
10
|
{ label: "Security", value: "security", icon: /* @__PURE__ */ e(f, {}) },
|
|
11
11
|
{ label: "Notification", value: "notification", icon: /* @__PURE__ */ e(v, {}) },
|
|
12
|
-
{ label: "Billing", value: "billing", icon: /* @__PURE__ */ e(
|
|
13
|
-
{ label: "Integration", value: "integration", icon: /* @__PURE__ */ e(
|
|
14
|
-
], M = ({ onChange:
|
|
15
|
-
const
|
|
16
|
-
a(l),
|
|
12
|
+
{ label: "Billing", value: "billing", icon: /* @__PURE__ */ e(g, {}) },
|
|
13
|
+
{ label: "Integration", value: "integration", icon: /* @__PURE__ */ e(p, {}) }
|
|
14
|
+
], M = ({ onChange: i }) => {
|
|
15
|
+
const t = m(), { currentView: o, setCurrentView: a } = u(), n = t.get("category") || t.get("label") || "inbox", c = (l) => {
|
|
16
|
+
a(l), i?.();
|
|
17
17
|
};
|
|
18
|
-
return /* @__PURE__ */ e("div", { className: "flex h-full flex-col justify-between", children: /* @__PURE__ */ e(
|
|
19
|
-
|
|
18
|
+
return /* @__PURE__ */ e("div", { className: "flex h-full flex-col justify-between", children: /* @__PURE__ */ e(h, { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(r, { className: "mx-2 mb-10", children: y.map((l) => /* @__PURE__ */ s(
|
|
19
|
+
d,
|
|
20
20
|
{
|
|
21
21
|
eventKey: l.value,
|
|
22
22
|
className: `mb-2 ${o === l.value ? "bg-gray-100 dark:bg-gray-700" : ""}`,
|
|
23
|
-
isActive:
|
|
24
|
-
onSelect: () =>
|
|
23
|
+
isActive: n === l.value,
|
|
24
|
+
onSelect: () => c(l.value),
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ e("span", { className: "text-2xl ltr:mr-2 rtl:ml-2", children: l.icon }),
|
|
27
27
|
/* @__PURE__ */ e("span", { children: l.label })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsMenu.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.tsx"],"sourcesContent":["import Menu from '@/components/ui/Menu'\nimport ScrollBar from '@/components/ui/ScrollBar'\nimport { useSettingsStore } from '../store/settingsStore'\nimport useQuery from '@/utils/hooks/useQuery'\nimport {\n TbUserSquare,\n TbLock,\n TbBell,\n TbFileDollar,\n TbRefreshDot,\n} from 'react-icons/tb'\nimport type { View } from '../types'\nimport type { ReactNode } from 'react'\n\nconst { MenuItem } = Menu\n\nconst menuList: { label: string; value: View; icon: ReactNode }[] = [\n { label: 'Profile', value: 'profile', icon: <TbUserSquare /> },\n { label: 'Security', value: 'security', icon: <TbLock /> },\n { label: 'Notification', value: 'notification', icon: <TbBell /> },\n { label: 'Billing', value: 'billing', icon: <TbFileDollar /> },\n { label: 'Integration', value: 'integration', icon: <TbRefreshDot /> },\n]\n\nexport const SettingsMenu = ({ onChange }: { onChange?: () => void }) => {\n const query = useQuery()\n\n const { currentView, setCurrentView } = useSettingsStore()\n\n const currentPath = query.get('category') || query.get('label') || 'inbox'\n\n const handleSelect = (value: View) => {\n setCurrentView(value)\n onChange?.()\n }\n\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <ScrollBar className=\"h-full overflow-y-auto\">\n <Menu className=\"mx-2 mb-10\">\n {menuList.map((menu) => (\n <MenuItem\n key={menu.value}\n eventKey={menu.value}\n className={`mb-2 ${\n currentView === menu.value\n ? 'bg-gray-100 dark:bg-gray-700'\n : ''\n }`}\n isActive={currentPath === menu.value}\n onSelect={() => handleSelect(menu.value)}\n >\n <span className=\"text-2xl ltr:mr-2 rtl:ml-2\">\n {menu.icon}\n </span>\n <span>{menu.label}</span>\n </MenuItem>\n ))}\n </Menu>\n </ScrollBar>\n </div>\n )\n}\n\nexport default SettingsMenu\n"],"names":["MenuItem","Menu","menuList","jsx","TbUserSquare","TbLock","TbBell","TbFileDollar","TbRefreshDot","SettingsMenu","onChange","query","useQuery","currentView","setCurrentView","useSettingsStore","currentPath","handleSelect","value","ScrollBar","menu","jsxs"],"mappings":";;;;;;;AAcA,MAAM,EAAE,UAAAA,MAAaC,GAEfC,IAA8D;AAAA,EAChE,EAAE,OAAO,WAAW,OAAO,WAAW,MAAM,gBAAAC,EAACC,KAAa,EAAA;AAAA,EAC1D,EAAE,OAAO,YAAY,OAAO,YAAY,MAAM,gBAAAD,EAACE,KAAO,EAAA;AAAA,EACtD,EAAE,OAAO,gBAAgB,OAAO,gBAAgB,MAAM,gBAAAF,EAACG,KAAO,EAAA;AAAA,EAC9D,EAAE,OAAO,WAAW,OAAO,WAAW,MAAM,gBAAAH,EAACI,KAAa,EAAA;AAAA,EAC1D,EAAE,OAAO,eAAe,OAAO,eAAe,MAAM,gBAAAJ,EAACK,KAAa,EAAA;AACtE,GAEaC,IAAe,CAAC,EAAE,UAAAC,QAA0C;AACrE,QAAMC,IAAQC,EAAA,GAER,EAAE,aAAAC,GAAa,gBAAAC,EAAA,IAAmBC,EAAA,GAElCC,IAAcL,EAAM,IAAI,UAAU,KAAKA,EAAM,IAAI,OAAO,KAAK,SAE7DM,IAAe,CAACC,MAAgB;AAClC,IAAAJ,EAAeI,CAAK,GACpBR,
|
|
1
|
+
{"version":3,"file":"SettingsMenu.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.tsx"],"sourcesContent":["import Menu from '@/components/ui/Menu'\nimport ScrollBar from '@/components/ui/ScrollBar'\nimport { useSettingsStore } from '../store/settingsStore'\nimport useQuery from '@/utils/hooks/useQuery'\nimport {\n TbUserSquare,\n TbLock,\n TbBell,\n TbFileDollar,\n TbRefreshDot,\n} from 'react-icons/tb'\nimport type { View } from '../types'\nimport type { ReactNode } from 'react'\n\nconst { MenuItem } = Menu\n\nconst menuList: { label: string; value: View; icon: ReactNode }[] = [\n { label: 'Profile', value: 'profile', icon: <TbUserSquare /> },\n { label: 'Security', value: 'security', icon: <TbLock /> },\n { label: 'Notification', value: 'notification', icon: <TbBell /> },\n { label: 'Billing', value: 'billing', icon: <TbFileDollar /> },\n { label: 'Integration', value: 'integration', icon: <TbRefreshDot /> },\n]\n\nexport const SettingsMenu = ({ onChange }: { onChange?: () => void }) => {\n const query = useQuery()\n\n const { currentView, setCurrentView } = useSettingsStore()\n\n const currentPath = query.get('category') || query.get('label') || 'inbox'\n\n const handleSelect = (value: View) => {\n setCurrentView(value)\n onChange?.()\n }\n\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <ScrollBar className=\"h-full overflow-y-auto\">\n <Menu className=\"mx-2 mb-10\">\n {menuList.map((menu) => (\n <MenuItem\n key={menu.value}\n eventKey={menu.value}\n className={`mb-2 ${\n currentView === menu.value\n ? 'bg-gray-100 dark:bg-gray-700'\n : ''\n }`}\n isActive={currentPath === menu.value}\n onSelect={() => handleSelect(menu.value)}\n >\n <span className=\"text-2xl ltr:mr-2 rtl:ml-2\">\n {menu.icon}\n </span>\n <span>{menu.label}</span>\n </MenuItem>\n ))}\n </Menu>\n </ScrollBar>\n </div>\n )\n}\n\nexport default SettingsMenu\n"],"names":["MenuItem","Menu","menuList","jsx","TbUserSquare","TbLock","TbBell","TbFileDollar","TbRefreshDot","SettingsMenu","onChange","query","useQuery","currentView","setCurrentView","useSettingsStore","currentPath","handleSelect","value","ScrollBar","menu","jsxs"],"mappings":";;;;;;;AAcA,MAAM,EAAE,UAAAA,MAAaC,GAEfC,IAA8D;AAAA,EAChE,EAAE,OAAO,WAAW,OAAO,WAAW,MAAM,gBAAAC,EAACC,KAAa,EAAA;AAAA,EAC1D,EAAE,OAAO,YAAY,OAAO,YAAY,MAAM,gBAAAD,EAACE,KAAO,EAAA;AAAA,EACtD,EAAE,OAAO,gBAAgB,OAAO,gBAAgB,MAAM,gBAAAF,EAACG,KAAO,EAAA;AAAA,EAC9D,EAAE,OAAO,WAAW,OAAO,WAAW,MAAM,gBAAAH,EAACI,KAAa,EAAA;AAAA,EAC1D,EAAE,OAAO,eAAe,OAAO,eAAe,MAAM,gBAAAJ,EAACK,KAAa,EAAA;AACtE,GAEaC,IAAe,CAAC,EAAE,UAAAC,QAA0C;AACrE,QAAMC,IAAQC,EAAA,GAER,EAAE,aAAAC,GAAa,gBAAAC,EAAA,IAAmBC,EAAA,GAElCC,IAAcL,EAAM,IAAI,UAAU,KAAKA,EAAM,IAAI,OAAO,KAAK,SAE7DM,IAAe,CAACC,MAAgB;AAClC,IAAAJ,EAAeI,CAAK,GACpBR,IAAA;AAAA,EACJ;AAEA,SACI,gBAAAP,EAAC,OAAA,EAAI,WAAU,wCACX,4BAACgB,GAAA,EAAU,WAAU,0BACjB,UAAA,gBAAAhB,EAACF,KAAK,WAAU,cACX,UAAAC,EAAS,IAAI,CAACkB,MACX,gBAAAC;AAAA,IAACrB;AAAA,IAAA;AAAA,MAEG,UAAUoB,EAAK;AAAA,MACf,WAAW,QACPP,MAAgBO,EAAK,QACf,iCACA,EACV;AAAA,MACA,UAAUJ,MAAgBI,EAAK;AAAA,MAC/B,UAAU,MAAMH,EAAaG,EAAK,KAAK;AAAA,MAEvC,UAAA;AAAA,QAAA,gBAAAjB,EAAC,QAAA,EAAK,WAAU,8BACX,UAAAiB,EAAK,MACV;AAAA,QACA,gBAAAjB,EAAC,QAAA,EAAM,UAAAiB,EAAK,MAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,IAbbA,EAAK;AAAA,EAAA,CAejB,EAAA,CACL,EAAA,CACJ,GACJ;AAER;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as e, jsxs as l, Fragment as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as L, useEffect as w } from "react";
|
|
3
3
|
import "../../../../../components/ui/Button/index.js";
|
|
4
4
|
import "../../../../../components/ui/Upload/index.js";
|
|
5
5
|
import "../../../../../components/ui/Input/index.js";
|
|
6
6
|
import "../../../../../components/ui/Select/index.js";
|
|
7
7
|
import { Avatar as f } from "../../../../../components/ui/Avatar/index.js";
|
|
8
8
|
import "../../../../../components/ui/Form/index.js";
|
|
9
|
-
import
|
|
9
|
+
import O from "../../../../../components/shared/NumericInput.js";
|
|
10
10
|
import { countryList as u } from "../../../../../constants/countries.constant.js";
|
|
11
|
-
import { components as
|
|
12
|
-
import { apiGetSettingsProfile as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { zodResolver as
|
|
16
|
-
import { useForm as
|
|
11
|
+
import { components as F } from "react-select";
|
|
12
|
+
import { apiGetSettingsProfile as M } from "../../../../../services/AccontsService.js";
|
|
13
|
+
import j from "../../../../../utils/sleep.js";
|
|
14
|
+
import z from "swr";
|
|
15
|
+
import { zodResolver as U } from "@hookform/resolvers/zod";
|
|
16
|
+
import { useForm as q, Controller as s } from "react-hook-form";
|
|
17
17
|
import { z as n } from "zod";
|
|
18
|
-
import { HiOutlineUser as
|
|
19
|
-
import { TbPlus as
|
|
20
|
-
import
|
|
21
|
-
import { Form as
|
|
22
|
-
import
|
|
18
|
+
import { HiOutlineUser as I } from "react-icons/hi";
|
|
19
|
+
import { TbPlus as R } from "react-icons/tb";
|
|
20
|
+
import A from "../../../../../components/ui/Select/Option.js";
|
|
21
|
+
import { Form as E } from "../../../../../components/ui/Form/Form.js";
|
|
22
|
+
import J from "../../../../../components/ui/Upload/Upload.js";
|
|
23
23
|
import g from "../../../../../components/ui/Button/Button.js";
|
|
24
24
|
import m from "../../../../../components/ui/Form/FormItem.js";
|
|
25
25
|
import p from "../../../../../components/ui/Input/Input.js";
|
|
26
|
-
import
|
|
27
|
-
const { Control:
|
|
26
|
+
import h from "../../../../../components/ui/Select/Select.js";
|
|
27
|
+
const { Control: T } = F, $ = n.object({
|
|
28
28
|
firstName: n.string().min(1, { message: "First name required" }),
|
|
29
29
|
lastName: n.string().min(1, { message: "Last name required" }),
|
|
30
30
|
email: n.string().min(1, { message: "Email required" }).email({ message: "Invalid email" }),
|
|
@@ -35,8 +35,8 @@ const { Control: K } = A, Q = n.object({
|
|
|
35
35
|
postcode: n.string().min(1, { message: "Postcode required" }),
|
|
36
36
|
city: n.string().min(1, { message: "City required" }),
|
|
37
37
|
img: n.string()
|
|
38
|
-
}),
|
|
39
|
-
|
|
38
|
+
}), v = (t) => /* @__PURE__ */ e(
|
|
39
|
+
A,
|
|
40
40
|
{
|
|
41
41
|
...t,
|
|
42
42
|
customLabel: (d, c) => /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
|
|
@@ -52,9 +52,9 @@ const { Control: K } = A, Q = n.object({
|
|
|
52
52
|
t.variant === "phone" && /* @__PURE__ */ e("span", { children: d.dialCode })
|
|
53
53
|
] })
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), C = ({ children: t, ...d }) => {
|
|
56
56
|
const c = d.getValue()[0];
|
|
57
|
-
return /* @__PURE__ */ l(
|
|
57
|
+
return /* @__PURE__ */ l(T, { ...d, children: [
|
|
58
58
|
c && /* @__PURE__ */ e(
|
|
59
59
|
f,
|
|
60
60
|
{
|
|
@@ -66,66 +66,65 @@ const { Control: K } = A, Q = n.object({
|
|
|
66
66
|
),
|
|
67
67
|
t
|
|
68
68
|
] });
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
const { data: t, mutate: d } = T(
|
|
69
|
+
}, fe = () => {
|
|
70
|
+
const { data: t, mutate: d } = z(
|
|
72
71
|
"/api/settings/profile/",
|
|
73
|
-
() =>
|
|
72
|
+
() => M(),
|
|
74
73
|
{
|
|
75
74
|
revalidateOnFocus: !1,
|
|
76
75
|
revalidateIfStale: !1,
|
|
77
76
|
revalidateOnReconnect: !1
|
|
78
77
|
}
|
|
79
|
-
), c =
|
|
78
|
+
), c = L(() => JSON.parse(
|
|
80
79
|
JSON.stringify(u)
|
|
81
|
-
).map((
|
|
82
|
-
let
|
|
83
|
-
const
|
|
80
|
+
).map((o) => (o.label = o.dialCode, o)), []), b = (r) => {
|
|
81
|
+
let o = !0;
|
|
82
|
+
const x = ["image/jpeg", "image/png"];
|
|
84
83
|
if (r)
|
|
85
|
-
for (const
|
|
86
|
-
|
|
87
|
-
return
|
|
84
|
+
for (const B of r)
|
|
85
|
+
x.includes(B.type) || (o = "Please upload a .jpeg or .png file!");
|
|
86
|
+
return o;
|
|
88
87
|
}, {
|
|
89
|
-
handleSubmit:
|
|
90
|
-
reset:
|
|
91
|
-
formState: { errors:
|
|
92
|
-
control:
|
|
93
|
-
} =
|
|
94
|
-
resolver: $
|
|
88
|
+
handleSubmit: y,
|
|
89
|
+
reset: N,
|
|
90
|
+
formState: { errors: a, isSubmitting: S },
|
|
91
|
+
control: i
|
|
92
|
+
} = q({
|
|
93
|
+
resolver: U($)
|
|
95
94
|
});
|
|
96
|
-
return
|
|
97
|
-
t &&
|
|
98
|
-
}, [t]), /* @__PURE__ */ l(
|
|
95
|
+
return w(() => {
|
|
96
|
+
t && N(t);
|
|
97
|
+
}, [t]), /* @__PURE__ */ l(P, { children: [
|
|
99
98
|
/* @__PURE__ */ e("h4", { className: "mb-8", children: "Personal information" }),
|
|
100
|
-
/* @__PURE__ */ l(
|
|
101
|
-
await
|
|
99
|
+
/* @__PURE__ */ l(E, { onSubmit: y(async (r) => {
|
|
100
|
+
await j(500), t && d({ ...t, ...r }, !1);
|
|
102
101
|
}), children: [
|
|
103
102
|
/* @__PURE__ */ e("div", { className: "mb-8", children: /* @__PURE__ */ e(
|
|
104
|
-
|
|
103
|
+
s,
|
|
105
104
|
{
|
|
106
105
|
name: "img",
|
|
107
|
-
control:
|
|
106
|
+
control: i,
|
|
108
107
|
render: ({ field: r }) => /* @__PURE__ */ l("div", { className: "flex items-center gap-4", children: [
|
|
109
108
|
/* @__PURE__ */ e(
|
|
110
109
|
f,
|
|
111
110
|
{
|
|
112
111
|
size: 90,
|
|
113
112
|
className: "border-4 border-white bg-gray-100 text-gray-300 shadow-lg",
|
|
114
|
-
icon: /* @__PURE__ */ e(
|
|
113
|
+
icon: /* @__PURE__ */ e(I, {}),
|
|
115
114
|
src: r.value
|
|
116
115
|
}
|
|
117
116
|
),
|
|
118
117
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
119
118
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
119
|
+
J,
|
|
121
120
|
{
|
|
122
121
|
showList: !1,
|
|
123
122
|
uploadLimit: 1,
|
|
124
|
-
beforeUpload:
|
|
125
|
-
onChange: (
|
|
126
|
-
|
|
123
|
+
beforeUpload: b,
|
|
124
|
+
onChange: (o) => {
|
|
125
|
+
o.length > 0 && r.onChange(
|
|
127
126
|
URL.createObjectURL(
|
|
128
|
-
|
|
127
|
+
o[0]
|
|
129
128
|
)
|
|
130
129
|
);
|
|
131
130
|
},
|
|
@@ -135,7 +134,7 @@ const { Control: K } = A, Q = n.object({
|
|
|
135
134
|
variant: "solid",
|
|
136
135
|
size: "sm",
|
|
137
136
|
type: "button",
|
|
138
|
-
icon: /* @__PURE__ */ e(
|
|
137
|
+
icon: /* @__PURE__ */ e(R, {}),
|
|
139
138
|
children: "Upload Image"
|
|
140
139
|
}
|
|
141
140
|
)
|
|
@@ -161,13 +160,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
161
160
|
m,
|
|
162
161
|
{
|
|
163
162
|
label: "First name",
|
|
164
|
-
invalid: !!
|
|
165
|
-
errorMessage:
|
|
163
|
+
invalid: !!a.firstName,
|
|
164
|
+
errorMessage: a.firstName?.message,
|
|
166
165
|
children: /* @__PURE__ */ e(
|
|
167
|
-
|
|
166
|
+
s,
|
|
168
167
|
{
|
|
169
168
|
name: "firstName",
|
|
170
|
-
control:
|
|
169
|
+
control: i,
|
|
171
170
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
172
171
|
p,
|
|
173
172
|
{
|
|
@@ -185,13 +184,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
185
184
|
m,
|
|
186
185
|
{
|
|
187
186
|
label: "User name",
|
|
188
|
-
invalid: !!
|
|
189
|
-
errorMessage:
|
|
187
|
+
invalid: !!a.lastName,
|
|
188
|
+
errorMessage: a.lastName?.message,
|
|
190
189
|
children: /* @__PURE__ */ e(
|
|
191
|
-
|
|
190
|
+
s,
|
|
192
191
|
{
|
|
193
192
|
name: "lastName",
|
|
194
|
-
control:
|
|
193
|
+
control: i,
|
|
195
194
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
196
195
|
p,
|
|
197
196
|
{
|
|
@@ -210,13 +209,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
210
209
|
m,
|
|
211
210
|
{
|
|
212
211
|
label: "Email",
|
|
213
|
-
invalid: !!
|
|
214
|
-
errorMessage:
|
|
212
|
+
invalid: !!a.email,
|
|
213
|
+
errorMessage: a.email?.message,
|
|
215
214
|
children: /* @__PURE__ */ e(
|
|
216
|
-
|
|
215
|
+
s,
|
|
217
216
|
{
|
|
218
217
|
name: "email",
|
|
219
|
-
control:
|
|
218
|
+
control: i,
|
|
220
219
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
221
220
|
p,
|
|
222
221
|
{
|
|
@@ -234,35 +233,35 @@ const { Control: K } = A, Q = n.object({
|
|
|
234
233
|
/* @__PURE__ */ l(
|
|
235
234
|
m,
|
|
236
235
|
{
|
|
237
|
-
invalid: !!
|
|
236
|
+
invalid: !!a.phoneNumber || !!a.dialCode,
|
|
238
237
|
children: [
|
|
239
238
|
/* @__PURE__ */ e("label", { className: "form-label mb-2", children: "Phone number" }),
|
|
240
239
|
/* @__PURE__ */ e(
|
|
241
|
-
|
|
240
|
+
s,
|
|
242
241
|
{
|
|
243
242
|
name: "dialCode",
|
|
244
|
-
control:
|
|
243
|
+
control: i,
|
|
245
244
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
246
|
-
|
|
245
|
+
h,
|
|
247
246
|
{
|
|
248
247
|
options: c,
|
|
249
248
|
...r,
|
|
250
249
|
className: "w-[150px]",
|
|
251
250
|
components: {
|
|
252
|
-
Option: (
|
|
253
|
-
|
|
251
|
+
Option: (o) => /* @__PURE__ */ e(
|
|
252
|
+
v,
|
|
254
253
|
{
|
|
255
254
|
variant: "phone",
|
|
256
|
-
...
|
|
255
|
+
...o
|
|
257
256
|
}
|
|
258
257
|
),
|
|
259
|
-
Control:
|
|
258
|
+
Control: C
|
|
260
259
|
},
|
|
261
260
|
placeholder: "",
|
|
262
261
|
value: c.filter(
|
|
263
|
-
(
|
|
262
|
+
(o) => o.dialCode === r.value
|
|
264
263
|
),
|
|
265
|
-
onChange: (
|
|
264
|
+
onChange: (o) => r.onChange(o?.dialCode)
|
|
266
265
|
}
|
|
267
266
|
)
|
|
268
267
|
}
|
|
@@ -274,15 +273,15 @@ const { Control: K } = A, Q = n.object({
|
|
|
274
273
|
m,
|
|
275
274
|
{
|
|
276
275
|
className: "w-full",
|
|
277
|
-
invalid: !!
|
|
278
|
-
errorMessage:
|
|
276
|
+
invalid: !!a.phoneNumber || !!a.dialCode,
|
|
277
|
+
errorMessage: a.phoneNumber?.message,
|
|
279
278
|
children: /* @__PURE__ */ e(
|
|
280
|
-
|
|
279
|
+
s,
|
|
281
280
|
{
|
|
282
281
|
name: "phoneNumber",
|
|
283
|
-
control:
|
|
282
|
+
control: i,
|
|
284
283
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
285
|
-
|
|
284
|
+
O,
|
|
286
285
|
{
|
|
287
286
|
autoComplete: "off",
|
|
288
287
|
placeholder: "Phone Number",
|
|
@@ -301,33 +300,33 @@ const { Control: K } = A, Q = n.object({
|
|
|
301
300
|
m,
|
|
302
301
|
{
|
|
303
302
|
label: "Country",
|
|
304
|
-
invalid: !!
|
|
305
|
-
errorMessage:
|
|
303
|
+
invalid: !!a.country,
|
|
304
|
+
errorMessage: a.country?.message,
|
|
306
305
|
children: /* @__PURE__ */ e(
|
|
307
|
-
|
|
306
|
+
s,
|
|
308
307
|
{
|
|
309
308
|
name: "country",
|
|
310
|
-
control:
|
|
309
|
+
control: i,
|
|
311
310
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
312
|
-
|
|
311
|
+
h,
|
|
313
312
|
{
|
|
314
313
|
options: u,
|
|
315
314
|
...r,
|
|
316
315
|
components: {
|
|
317
|
-
Option: (
|
|
318
|
-
|
|
316
|
+
Option: (o) => /* @__PURE__ */ e(
|
|
317
|
+
v,
|
|
319
318
|
{
|
|
320
319
|
variant: "country",
|
|
321
|
-
...
|
|
320
|
+
...o
|
|
322
321
|
}
|
|
323
322
|
),
|
|
324
|
-
Control:
|
|
323
|
+
Control: C
|
|
325
324
|
},
|
|
326
325
|
placeholder: "",
|
|
327
326
|
value: u.filter(
|
|
328
|
-
(
|
|
327
|
+
(o) => o.value === r.value
|
|
329
328
|
),
|
|
330
|
-
onChange: (
|
|
329
|
+
onChange: (o) => r.onChange(o?.value)
|
|
331
330
|
}
|
|
332
331
|
)
|
|
333
332
|
}
|
|
@@ -338,13 +337,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
338
337
|
m,
|
|
339
338
|
{
|
|
340
339
|
label: "Address",
|
|
341
|
-
invalid: !!
|
|
342
|
-
errorMessage:
|
|
340
|
+
invalid: !!a.address,
|
|
341
|
+
errorMessage: a.address?.message,
|
|
343
342
|
children: /* @__PURE__ */ e(
|
|
344
|
-
|
|
343
|
+
s,
|
|
345
344
|
{
|
|
346
345
|
name: "address",
|
|
347
|
-
control:
|
|
346
|
+
control: i,
|
|
348
347
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
349
348
|
p,
|
|
350
349
|
{
|
|
@@ -363,13 +362,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
363
362
|
m,
|
|
364
363
|
{
|
|
365
364
|
label: "City",
|
|
366
|
-
invalid: !!
|
|
367
|
-
errorMessage:
|
|
365
|
+
invalid: !!a.city,
|
|
366
|
+
errorMessage: a.city?.message,
|
|
368
367
|
children: /* @__PURE__ */ e(
|
|
369
|
-
|
|
368
|
+
s,
|
|
370
369
|
{
|
|
371
370
|
name: "city",
|
|
372
|
-
control:
|
|
371
|
+
control: i,
|
|
373
372
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
374
373
|
p,
|
|
375
374
|
{
|
|
@@ -387,13 +386,13 @@ const { Control: K } = A, Q = n.object({
|
|
|
387
386
|
m,
|
|
388
387
|
{
|
|
389
388
|
label: "Postal Code",
|
|
390
|
-
invalid: !!
|
|
391
|
-
errorMessage:
|
|
389
|
+
invalid: !!a.postcode,
|
|
390
|
+
errorMessage: a.postcode?.message,
|
|
392
391
|
children: /* @__PURE__ */ e(
|
|
393
|
-
|
|
392
|
+
s,
|
|
394
393
|
{
|
|
395
394
|
name: "postcode",
|
|
396
|
-
control:
|
|
395
|
+
control: i,
|
|
397
396
|
render: ({ field: r }) => /* @__PURE__ */ e(
|
|
398
397
|
p,
|
|
399
398
|
{
|
|
@@ -413,7 +412,7 @@ const { Control: K } = A, Q = n.object({
|
|
|
413
412
|
{
|
|
414
413
|
variant: "solid",
|
|
415
414
|
type: "submit",
|
|
416
|
-
loading:
|
|
415
|
+
loading: S,
|
|
417
416
|
children: "Save"
|
|
418
417
|
}
|
|
419
418
|
) })
|
|
@@ -421,6 +420,6 @@ const { Control: K } = A, Q = n.object({
|
|
|
421
420
|
] });
|
|
422
421
|
};
|
|
423
422
|
export {
|
|
424
|
-
|
|
423
|
+
fe as default
|
|
425
424
|
};
|
|
426
425
|
//# sourceMappingURL=SettingsProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsProfile.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.tsx"],"sourcesContent":["import { useMemo, useEffect } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport Input from '@/components/ui/Input'\nimport Select, { Option as DefaultOption } from '@/components/ui/Select'\nimport Avatar from '@/components/ui/Avatar'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport NumericInput from '@/components/shared/NumericInput'\nimport { countryList } from '@/constants/countries.constant'\nimport { components } from 'react-select'\nimport type { ControlProps, OptionProps } from 'react-select'\nimport { apiGetSettingsProfile } from '@/services/AccontsService'\nimport sleep from '@/utils/sleep'\nimport useSWR from 'swr'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useForm, Controller } from 'react-hook-form'\nimport { z } from 'zod'\nimport { HiOutlineUser } from 'react-icons/hi'\nimport { TbPlus } from 'react-icons/tb'\nimport type { ZodType } from 'zod'\nimport type { GetSettingsProfileResponse } from '../types'\n\ntype ProfileSchema = {\n firstName: string\n lastName: string\n email: string\n dialCode: string\n phoneNumber: string\n img: string\n country: string\n address: string\n postcode: string\n city: string\n}\n\ntype CountryOption = {\n label: string\n dialCode: string\n value: string\n}\n\nconst { Control } = components\n\nconst validationSchema: ZodType<ProfileSchema> = z.object({\n firstName: z.string().min(1, { message: 'First name required' }),\n lastName: z.string().min(1, { message: 'Last name required' }),\n email: z\n .string()\n .min(1, { message: 'Email required' })\n .email({ message: 'Invalid email' }),\n dialCode: z.string().min(1, { message: 'Please select your country code' }),\n phoneNumber: z\n .string()\n .min(1, { message: 'Please input your mobile number' }),\n country: z.string().min(1, { message: 'Please select a country' }),\n address: z.string().min(1, { message: 'Addrress required' }),\n postcode: z.string().min(1, { message: 'Postcode required' }),\n city: z.string().min(1, { message: 'City required' }),\n img: z.string(),\n})\n\nconst CustomSelectOption = (\n props: OptionProps<CountryOption> & { variant: 'country' | 'phone' },\n) => {\n return (\n <DefaultOption<CountryOption>\n {...props}\n customLabel={(data, label) => (\n <span className=\"flex items-center gap-2\">\n <Avatar\n shape=\"circle\"\n size={20}\n src={`/img/countries/${data.value}.png`}\n />\n {props.variant === 'country' && <span>{label}</span>}\n {props.variant === 'phone' && <span>{data.dialCode}</span>}\n </span>\n )}\n />\n )\n}\n\nconst CustomControl = ({ children, ...props }: ControlProps<CountryOption>) => {\n const selected = props.getValue()[0]\n return (\n <Control {...props}>\n {selected && (\n <Avatar\n className=\"ltr:ml-4 rtl:mr-4\"\n shape=\"circle\"\n size={20}\n src={`/img/countries/${selected.value}.png`}\n />\n )}\n {children}\n </Control>\n )\n}\n\nconst SettingsProfile = () => {\n const { data, mutate } = useSWR(\n '/api/settings/profile/',\n () => apiGetSettingsProfile<GetSettingsProfileResponse>(),\n {\n revalidateOnFocus: false,\n revalidateIfStale: false,\n revalidateOnReconnect: false,\n },\n )\n\n const dialCodeList = useMemo(() => {\n const newCountryList: Array<CountryOption> = JSON.parse(\n JSON.stringify(countryList),\n )\n\n return newCountryList.map((country) => {\n country.label = country.dialCode\n return country\n })\n }, [])\n\n const beforeUpload = (files: FileList | null) => {\n let valid: string | boolean = true\n\n const allowedFileType = ['image/jpeg', 'image/png']\n if (files) {\n for (const file of files) {\n if (!allowedFileType.includes(file.type)) {\n valid = 'Please upload a .jpeg or .png file!'\n }\n }\n }\n\n return valid\n }\n\n const {\n handleSubmit,\n reset,\n formState: { errors, isSubmitting },\n control,\n } = useForm<ProfileSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n useEffect(() => {\n if (data) {\n reset(data)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data])\n\n const onSubmit = async (values: ProfileSchema) => {\n await sleep(500)\n if (data) {\n mutate({ ...data, ...values }, false)\n }\n }\n\n return (\n <>\n <h4 className=\"mb-8\">Personal information</h4>\n <Form onSubmit={handleSubmit(onSubmit)}>\n <div className=\"mb-8\">\n <Controller\n name=\"img\"\n control={control}\n render={({ field }) => (\n <div className=\"flex items-center gap-4\">\n <Avatar\n size={90}\n className=\"border-4 border-white bg-gray-100 text-gray-300 shadow-lg\"\n icon={<HiOutlineUser />}\n src={field.value}\n />\n <div className=\"flex items-center gap-2\">\n <Upload\n showList={false}\n uploadLimit={1}\n beforeUpload={beforeUpload}\n onChange={(files) => {\n if (files.length > 0) {\n field.onChange(\n URL.createObjectURL(\n files[0],\n ),\n )\n }\n }}\n >\n <Button\n variant=\"solid\"\n size=\"sm\"\n type=\"button\"\n icon={<TbPlus />}\n >\n Upload Image\n </Button>\n </Upload>\n <Button\n size=\"sm\"\n type=\"button\"\n onClick={() => {\n field.onChange('')\n }}\n >\n Remove\n </Button>\n </div>\n </div>\n )}\n />\n </div>\n <div className=\"grid md:grid-cols-2 gap-4\">\n <FormItem\n label=\"First name\"\n invalid={Boolean(errors.firstName)}\n errorMessage={errors.firstName?.message}\n >\n <Controller\n name=\"firstName\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"First Name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"User name\"\n invalid={Boolean(errors.lastName)}\n errorMessage={errors.lastName?.message}\n >\n <Controller\n name=\"lastName\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Last Name\"\n {...field}\n />\n )}\n />\n </FormItem>\n </div>\n <FormItem\n label=\"Email\"\n invalid={Boolean(errors.email)}\n errorMessage={errors.email?.message}\n >\n <Controller\n name=\"email\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"email\"\n autoComplete=\"off\"\n placeholder=\"Email\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex items-end gap-4 w-full mb-6\">\n <FormItem\n invalid={\n Boolean(errors.phoneNumber) ||\n Boolean(errors.dialCode)\n }\n >\n <label className=\"form-label mb-2\">Phone number</label>\n <Controller\n name=\"dialCode\"\n control={control}\n render={({ field }) => (\n <Select<CountryOption>\n options={dialCodeList}\n {...field}\n className=\"w-[150px]\"\n components={{\n Option: (props) => (\n <CustomSelectOption\n variant=\"phone\"\n {...(props as OptionProps<CountryOption>)}\n />\n ),\n Control: CustomControl,\n }}\n placeholder=\"\"\n value={dialCodeList.filter(\n (option) =>\n option.dialCode === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.dialCode)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n className=\"w-full\"\n invalid={\n Boolean(errors.phoneNumber) ||\n Boolean(errors.dialCode)\n }\n errorMessage={errors.phoneNumber?.message}\n >\n <Controller\n name=\"phoneNumber\"\n control={control}\n render={({ field }) => (\n <NumericInput\n autoComplete=\"off\"\n placeholder=\"Phone Number\"\n value={field.value}\n onChange={field.onChange}\n onBlur={field.onBlur}\n />\n )}\n />\n </FormItem>\n </div>\n <h4 className=\"mb-6\">Address information</h4>\n <FormItem\n label=\"Country\"\n invalid={Boolean(errors.country)}\n errorMessage={errors.country?.message}\n >\n <Controller\n name=\"country\"\n control={control}\n render={({ field }) => (\n <Select<CountryOption>\n options={countryList}\n {...field}\n components={{\n Option: (props) => (\n <CustomSelectOption\n variant=\"country\"\n {...(props as OptionProps<CountryOption>)}\n />\n ),\n Control: CustomControl,\n }}\n placeholder=\"\"\n value={countryList.filter(\n (option) => option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Address\"\n invalid={Boolean(errors.address)}\n errorMessage={errors.address?.message}\n >\n <Controller\n name=\"address\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Address\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <FormItem\n label=\"City\"\n invalid={Boolean(errors.city)}\n errorMessage={errors.city?.message}\n >\n <Controller\n name=\"city\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"City\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Postal Code\"\n invalid={Boolean(errors.postcode)}\n errorMessage={errors.postcode?.message}\n >\n <Controller\n name=\"postcode\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Postal Code\"\n {...field}\n />\n )}\n />\n </FormItem>\n </div>\n <div className=\"flex justify-end\">\n <Button\n variant=\"solid\"\n type=\"submit\"\n loading={isSubmitting}\n >\n Save\n </Button>\n </div>\n </Form>\n </>\n )\n}\n\nexport default SettingsProfile\n"],"names":["Control","components","validationSchema","z","CustomSelectOption","props","jsx","DefaultOption","data","label","jsxs","Avatar","CustomControl","children","selected","SettingsProfile","mutate","useSWR","apiGetSettingsProfile","dialCodeList","useMemo","countryList","country","beforeUpload","files","valid","allowedFileType","file","handleSubmit","reset","errors","isSubmitting","control","useForm","zodResolver","useEffect","Fragment","Form","values","sleep","Controller","field","HiOutlineUser","Upload","Button","TbPlus","FormItem","_a","Input","_b","_c","Select","option","_d","NumericInput","_e","_f","_g","_h"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM,EAAE,SAAAA,MAAYC,GAEdC,IAA2CC,EAAE,OAAO;AAAA,EACtD,WAAWA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,uBAAuB;AAAA,EAC/D,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,sBAAsB;AAAA,EAC7D,OAAOA,EACF,SACA,IAAI,GAAG,EAAE,SAAS,iBAAA,CAAkB,EACpC,MAAM,EAAE,SAAS,iBAAiB;AAAA,EACvC,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,mCAAmC;AAAA,EAC1E,aAAaA,EACR,SACA,IAAI,GAAG,EAAE,SAAS,mCAAmC;AAAA,EAC1D,SAASA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,2BAA2B;AAAA,EACjE,SAASA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,qBAAqB;AAAA,EAC3D,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,qBAAqB;AAAA,EAC5D,MAAMA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,iBAAiB;AAAA,EACpD,KAAKA,EAAE,OAAA;AACX,CAAC,GAEKC,IAAqB,CACvBC,MAGI,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACI,GAAGF;AAAA,IACJ,aAAa,CAACG,GAAMC,MAChB,gBAAAC,EAAC,QAAA,EAAK,WAAU,2BACZ,UAAA;AAAA,MAAA,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UACG,OAAM;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AAAA,YACN,SAAS,EAAQhB,EAAO;AAAA,YACxB,eAAc2B,IAAA3B,EAAO,SAAP,gBAAA2B,EAAa;AAAA,YAE3B,UAAA,gBAAAnD;AAAA,cAACkC;AAAA,cAAA;AAAA,gBACG,MAAK;AAAA,gBACL,SAAAR;AAAA,gBACA,QAAQ,CAAC,EAAE,OAAAS,EAAA,MACP,gBAAAnC;AAAA,kBAAC0C;AAAA,kBAAA;AAAA,oBACG,MAAK;AAAA,oBACL,cAAa;AAAA,oBACb,aAAY;AAAA,oBACX,GAAGP;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACR;AAAA,YAAA;AAAA,UAER;AAAA,QAAA;AAAA,QAEJ,gBAAAnC;AAAA,UAACwC;AAAA,UAAA;AAAA,YACG,OAAM;AAAA,YACN,SAAS,EAAQhB,EAAO;AAAA,YACxB,eAAc4B,IAAA5B,EAAO,aAAP,gBAAA4B,EAAiB;AAAA,YAE/B,UAAA,gBAAApD;AAAA,cAACkC;AAAA,cAAA;AAAA,gBACG,MAAK;AAAA,gBACL,SAAAR;AAAA,gBACA,QAAQ,CAAC,EAAE,OAAAS,EAAA,MACP,gBAAAnC;AAAA,kBAAC0C;AAAA,kBAAA;AAAA,oBACG,MAAK;AAAA,oBACL,cAAa;AAAA,oBACb,aAAY;AAAA,oBACX,GAAGP;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACR;AAAA,YAAA;AAAA,UAER;AAAA,QAAA;AAAA,MACJ,GACJ;AAAA,MACA,gBAAAnC,EAAC,OAAA,EAAI,WAAU,oBACX,UAAA,gBAAAA;AAAA,QAACsC;AAAA,QAAA;AAAA,UACG,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,SAASb;AAAA,UACZ,UAAA;AAAA,QAAA;AAAA,MAAA,EAED,CACJ;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
|
|
1
|
+
{"version":3,"file":"SettingsProfile.js","sources":["../../../../../../../lib/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.tsx"],"sourcesContent":["import { useMemo, useEffect } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport Input from '@/components/ui/Input'\nimport Select, { Option as DefaultOption } from '@/components/ui/Select'\nimport Avatar from '@/components/ui/Avatar'\nimport { Form, FormItem } from '@/components/ui/Form'\nimport NumericInput from '@/components/shared/NumericInput'\nimport { countryList } from '@/constants/countries.constant'\nimport { components } from 'react-select'\nimport type { ControlProps, OptionProps } from 'react-select'\nimport { apiGetSettingsProfile } from '@/services/AccontsService'\nimport sleep from '@/utils/sleep'\nimport useSWR from 'swr'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useForm, Controller } from 'react-hook-form'\nimport { z } from 'zod'\nimport { HiOutlineUser } from 'react-icons/hi'\nimport { TbPlus } from 'react-icons/tb'\nimport type { ZodType } from 'zod'\nimport type { GetSettingsProfileResponse } from '../types'\n\ntype ProfileSchema = {\n firstName: string\n lastName: string\n email: string\n dialCode: string\n phoneNumber: string\n img: string\n country: string\n address: string\n postcode: string\n city: string\n}\n\ntype CountryOption = {\n label: string\n dialCode: string\n value: string\n}\n\nconst { Control } = components\n\nconst validationSchema: ZodType<ProfileSchema> = z.object({\n firstName: z.string().min(1, { message: 'First name required' }),\n lastName: z.string().min(1, { message: 'Last name required' }),\n email: z\n .string()\n .min(1, { message: 'Email required' })\n .email({ message: 'Invalid email' }),\n dialCode: z.string().min(1, { message: 'Please select your country code' }),\n phoneNumber: z\n .string()\n .min(1, { message: 'Please input your mobile number' }),\n country: z.string().min(1, { message: 'Please select a country' }),\n address: z.string().min(1, { message: 'Addrress required' }),\n postcode: z.string().min(1, { message: 'Postcode required' }),\n city: z.string().min(1, { message: 'City required' }),\n img: z.string(),\n})\n\nconst CustomSelectOption = (\n props: OptionProps<CountryOption> & { variant: 'country' | 'phone' },\n) => {\n return (\n <DefaultOption<CountryOption>\n {...props}\n customLabel={(data, label) => (\n <span className=\"flex items-center gap-2\">\n <Avatar\n shape=\"circle\"\n size={20}\n src={`/img/countries/${data.value}.png`}\n />\n {props.variant === 'country' && <span>{label}</span>}\n {props.variant === 'phone' && <span>{data.dialCode}</span>}\n </span>\n )}\n />\n )\n}\n\nconst CustomControl = ({ children, ...props }: ControlProps<CountryOption>) => {\n const selected = props.getValue()[0]\n return (\n <Control {...props}>\n {selected && (\n <Avatar\n className=\"ltr:ml-4 rtl:mr-4\"\n shape=\"circle\"\n size={20}\n src={`/img/countries/${selected.value}.png`}\n />\n )}\n {children}\n </Control>\n )\n}\n\nconst SettingsProfile = () => {\n const { data, mutate } = useSWR(\n '/api/settings/profile/',\n () => apiGetSettingsProfile<GetSettingsProfileResponse>(),\n {\n revalidateOnFocus: false,\n revalidateIfStale: false,\n revalidateOnReconnect: false,\n },\n )\n\n const dialCodeList = useMemo(() => {\n const newCountryList: Array<CountryOption> = JSON.parse(\n JSON.stringify(countryList),\n )\n\n return newCountryList.map((country) => {\n country.label = country.dialCode\n return country\n })\n }, [])\n\n const beforeUpload = (files: FileList | null) => {\n let valid: string | boolean = true\n\n const allowedFileType = ['image/jpeg', 'image/png']\n if (files) {\n for (const file of files) {\n if (!allowedFileType.includes(file.type)) {\n valid = 'Please upload a .jpeg or .png file!'\n }\n }\n }\n\n return valid\n }\n\n const {\n handleSubmit,\n reset,\n formState: { errors, isSubmitting },\n control,\n } = useForm<ProfileSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n useEffect(() => {\n if (data) {\n reset(data)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data])\n\n const onSubmit = async (values: ProfileSchema) => {\n await sleep(500)\n if (data) {\n mutate({ ...data, ...values }, false)\n }\n }\n\n return (\n <>\n <h4 className=\"mb-8\">Personal information</h4>\n <Form onSubmit={handleSubmit(onSubmit)}>\n <div className=\"mb-8\">\n <Controller\n name=\"img\"\n control={control}\n render={({ field }) => (\n <div className=\"flex items-center gap-4\">\n <Avatar\n size={90}\n className=\"border-4 border-white bg-gray-100 text-gray-300 shadow-lg\"\n icon={<HiOutlineUser />}\n src={field.value}\n />\n <div className=\"flex items-center gap-2\">\n <Upload\n showList={false}\n uploadLimit={1}\n beforeUpload={beforeUpload}\n onChange={(files) => {\n if (files.length > 0) {\n field.onChange(\n URL.createObjectURL(\n files[0],\n ),\n )\n }\n }}\n >\n <Button\n variant=\"solid\"\n size=\"sm\"\n type=\"button\"\n icon={<TbPlus />}\n >\n Upload Image\n </Button>\n </Upload>\n <Button\n size=\"sm\"\n type=\"button\"\n onClick={() => {\n field.onChange('')\n }}\n >\n Remove\n </Button>\n </div>\n </div>\n )}\n />\n </div>\n <div className=\"grid md:grid-cols-2 gap-4\">\n <FormItem\n label=\"First name\"\n invalid={Boolean(errors.firstName)}\n errorMessage={errors.firstName?.message}\n >\n <Controller\n name=\"firstName\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"First Name\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"User name\"\n invalid={Boolean(errors.lastName)}\n errorMessage={errors.lastName?.message}\n >\n <Controller\n name=\"lastName\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Last Name\"\n {...field}\n />\n )}\n />\n </FormItem>\n </div>\n <FormItem\n label=\"Email\"\n invalid={Boolean(errors.email)}\n errorMessage={errors.email?.message}\n >\n <Controller\n name=\"email\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"email\"\n autoComplete=\"off\"\n placeholder=\"Email\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"flex items-end gap-4 w-full mb-6\">\n <FormItem\n invalid={\n Boolean(errors.phoneNumber) ||\n Boolean(errors.dialCode)\n }\n >\n <label className=\"form-label mb-2\">Phone number</label>\n <Controller\n name=\"dialCode\"\n control={control}\n render={({ field }) => (\n <Select<CountryOption>\n options={dialCodeList}\n {...field}\n className=\"w-[150px]\"\n components={{\n Option: (props) => (\n <CustomSelectOption\n variant=\"phone\"\n {...(props as OptionProps<CountryOption>)}\n />\n ),\n Control: CustomControl,\n }}\n placeholder=\"\"\n value={dialCodeList.filter(\n (option) =>\n option.dialCode === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.dialCode)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n className=\"w-full\"\n invalid={\n Boolean(errors.phoneNumber) ||\n Boolean(errors.dialCode)\n }\n errorMessage={errors.phoneNumber?.message}\n >\n <Controller\n name=\"phoneNumber\"\n control={control}\n render={({ field }) => (\n <NumericInput\n autoComplete=\"off\"\n placeholder=\"Phone Number\"\n value={field.value}\n onChange={field.onChange}\n onBlur={field.onBlur}\n />\n )}\n />\n </FormItem>\n </div>\n <h4 className=\"mb-6\">Address information</h4>\n <FormItem\n label=\"Country\"\n invalid={Boolean(errors.country)}\n errorMessage={errors.country?.message}\n >\n <Controller\n name=\"country\"\n control={control}\n render={({ field }) => (\n <Select<CountryOption>\n options={countryList}\n {...field}\n components={{\n Option: (props) => (\n <CustomSelectOption\n variant=\"country\"\n {...(props as OptionProps<CountryOption>)}\n />\n ),\n Control: CustomControl,\n }}\n placeholder=\"\"\n value={countryList.filter(\n (option) => option.value === field.value,\n )}\n onChange={(option) =>\n field.onChange(option?.value)\n }\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Address\"\n invalid={Boolean(errors.address)}\n errorMessage={errors.address?.message}\n >\n <Controller\n name=\"address\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Address\"\n {...field}\n />\n )}\n />\n </FormItem>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <FormItem\n label=\"City\"\n invalid={Boolean(errors.city)}\n errorMessage={errors.city?.message}\n >\n <Controller\n name=\"city\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"City\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Postal Code\"\n invalid={Boolean(errors.postcode)}\n errorMessage={errors.postcode?.message}\n >\n <Controller\n name=\"postcode\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n autoComplete=\"off\"\n placeholder=\"Postal Code\"\n {...field}\n />\n )}\n />\n </FormItem>\n </div>\n <div className=\"flex justify-end\">\n <Button\n variant=\"solid\"\n type=\"submit\"\n loading={isSubmitting}\n >\n Save\n </Button>\n </div>\n </Form>\n </>\n )\n}\n\nexport default SettingsProfile\n"],"names":["Control","components","validationSchema","z","CustomSelectOption","props","jsx","DefaultOption","data","label","jsxs","Avatar","CustomControl","children","selected","SettingsProfile","mutate","useSWR","apiGetSettingsProfile","dialCodeList","useMemo","countryList","country","beforeUpload","files","valid","allowedFileType","file","handleSubmit","reset","errors","isSubmitting","control","useForm","zodResolver","useEffect","Fragment","Form","values","sleep","Controller","field","HiOutlineUser","Upload","Button","TbPlus","FormItem","Input","Select","option","NumericInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAM,EAAE,SAAAA,MAAYC,GAEdC,IAA2CC,EAAE,OAAO;AAAA,EACtD,WAAWA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,uBAAuB;AAAA,EAC/D,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,sBAAsB;AAAA,EAC7D,OAAOA,EACF,SACA,IAAI,GAAG,EAAE,SAAS,iBAAA,CAAkB,EACpC,MAAM,EAAE,SAAS,iBAAiB;AAAA,EACvC,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,mCAAmC;AAAA,EAC1E,aAAaA,EACR,SACA,IAAI,GAAG,EAAE,SAAS,mCAAmC;AAAA,EAC1D,SAASA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,2BAA2B;AAAA,EACjE,SAASA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,qBAAqB;AAAA,EAC3D,UAAUA,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,qBAAqB;AAAA,EAC5D,MAAMA,EAAE,SAAS,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