@orbe-agro/client-core 5.3.86 → 5.3.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -13,33 +13,32 @@ l.onGet("/api/helps/categories").reply(() => [
|
|
|
13
13
|
}
|
|
14
14
|
]);
|
|
15
15
|
l.onGet("/api/helps/articles").reply((t) => {
|
|
16
|
-
const { topic: i, query:
|
|
17
|
-
return
|
|
16
|
+
const { topic: i, query: r } = t.params, a = p;
|
|
17
|
+
return r ? [200, d(a, r)] : i ? [200, a.filter((s) => s.category === i)] : [200, a];
|
|
18
18
|
});
|
|
19
19
|
l.onGet(new RegExp("/api/helps/articles*")).reply(function(t) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return a ? [200, { ...a, ...D }] : [404, {}];
|
|
20
|
+
const i = t.url?.split("/")[3], r = p.find((a) => a.id === i);
|
|
21
|
+
return r ? [200, { ...r, ...D }] : [404, {}];
|
|
23
22
|
});
|
|
24
23
|
l.onGet("/api/helps/manage/articles").reply((t) => {
|
|
25
|
-
const { pageIndex: i, pageSize:
|
|
24
|
+
const { pageIndex: i, pageSize: r, sort: a, query: s, category: m } = t.params;
|
|
26
25
|
console.log("config.params", t.params);
|
|
27
|
-
const { order: c, key: n } =
|
|
26
|
+
const { order: c, key: n } = a, f = p;
|
|
28
27
|
let e = f, u = f.length;
|
|
29
28
|
n && c && (n !== "updateTimeStamp" ? e.sort(
|
|
30
29
|
g(
|
|
31
30
|
n,
|
|
32
31
|
c === "desc",
|
|
33
|
-
(
|
|
32
|
+
(o) => o.toUpperCase()
|
|
34
33
|
)
|
|
35
|
-
) : e.sort(g(n, c === "desc", parseInt))),
|
|
34
|
+
) : e.sort(g(n, c === "desc", parseInt))), s && (e = d(e, s), u = e.length), m && (e = e.filter((o) => m.includes(o.category))), e = G(e, r, i);
|
|
36
35
|
const y = {
|
|
37
36
|
list: e,
|
|
38
37
|
total: u
|
|
39
38
|
};
|
|
40
|
-
return new Promise(function(
|
|
39
|
+
return new Promise(function(o) {
|
|
41
40
|
setTimeout(function() {
|
|
42
|
-
|
|
41
|
+
o([200, y]);
|
|
43
42
|
}, 500);
|
|
44
43
|
});
|
|
45
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpCenterFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/helpCenterFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { mock } from '../MockAdapter'\nimport {\n categoriesData,\n articleListData,\n articleDetailData,\n} from '../data/helpCenterData'\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\n\nmock.onGet(`/api/helps/categories`).reply(() => {\n return [\n 200,\n {\n categories: categoriesData,\n popularArticles: articleListData.filter(\n (article) => article.starred,\n ),\n },\n ]\n})\n\nmock.onGet(`/api/helps/articles`).reply((config) => {\n const { topic, query } = config.params\n\n const articles: any[] = articleListData\n\n if (query) {\n return [200, wildCardSearch(articles, query)]\n }\n\n if (topic) {\n return [200, articles.filter((article) => article.category === topic)]\n }\n\n return [200, articles]\n})\n\nmock.onGet(new RegExp(`/api/helps/articles*`)).reply(function (config) {\n const id = config.url?.split('/')[3]\n const article = articleListData.find((article) => article.id === id)\n\n if (!article) {\n return [404, {}]\n }\n\n return [200, { ...article, ...articleDetailData }]\n})\n\nmock.onGet(`/api/helps/manage/articles`).reply((config) => {\n const { pageIndex, pageSize, sort, query, category } = config.params\n\n console.log('config.params', config.params)\n\n const { order, key } = sort\n\n const articles = articleListData as any[]\n\n let data = articles\n let total = articles.length\n\n if (key && order) {\n if (key !== 'updateTimeStamp') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query)\n total = data.length\n }\n\n if (category) {\n data = data.filter((item) => category.includes(item.category))\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n"],"names":["mock","categoriesData","articleListData","article","config","topic","query","articles","wildCardSearch","id","
|
|
1
|
+
{"version":3,"file":"helpCenterFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/helpCenterFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { mock } from '../MockAdapter'\nimport {\n categoriesData,\n articleListData,\n articleDetailData,\n} from '../data/helpCenterData'\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\n\nmock.onGet(`/api/helps/categories`).reply(() => {\n return [\n 200,\n {\n categories: categoriesData,\n popularArticles: articleListData.filter(\n (article) => article.starred,\n ),\n },\n ]\n})\n\nmock.onGet(`/api/helps/articles`).reply((config) => {\n const { topic, query } = config.params\n\n const articles: any[] = articleListData\n\n if (query) {\n return [200, wildCardSearch(articles, query)]\n }\n\n if (topic) {\n return [200, articles.filter((article) => article.category === topic)]\n }\n\n return [200, articles]\n})\n\nmock.onGet(new RegExp(`/api/helps/articles*`)).reply(function (config) {\n const id = config.url?.split('/')[3]\n const article = articleListData.find((article) => article.id === id)\n\n if (!article) {\n return [404, {}]\n }\n\n return [200, { ...article, ...articleDetailData }]\n})\n\nmock.onGet(`/api/helps/manage/articles`).reply((config) => {\n const { pageIndex, pageSize, sort, query, category } = config.params\n\n console.log('config.params', config.params)\n\n const { order, key } = sort\n\n const articles = articleListData as any[]\n\n let data = articles\n let total = articles.length\n\n if (key && order) {\n if (key !== 'updateTimeStamp') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query)\n total = data.length\n }\n\n if (category) {\n data = data.filter((item) => category.includes(item.category))\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n"],"names":["mock","categoriesData","articleListData","article","config","topic","query","articles","wildCardSearch","id","articleDetailData","pageIndex","pageSize","sort","category","order","key","data","total","sortBy","a","item","paginate","responseData","resolve"],"mappings":";;;;;AAWAA,EAAK,MAAM,uBAAuB,EAAE,MAAM,MAC/B;AAAA,EACH;AAAA,EACA;AAAA,IACI,YAAYC;AAAA,IACZ,iBAAiBC,EAAgB;AAAA,MAC7B,CAACC,MAAYA,EAAQ;AAAA,IAAA;AAAA,EACzB;AACJ,CAEP;AAEDH,EAAK,MAAM,qBAAqB,EAAE,MAAM,CAACI,MAAW;AAChD,QAAM,EAAE,OAAAC,GAAO,OAAAC,EAAA,IAAUF,EAAO,QAE1BG,IAAkBL;AAExB,SAAII,IACO,CAAC,KAAKE,EAAeD,GAAUD,CAAK,CAAC,IAG5CD,IACO,CAAC,KAAKE,EAAS,OAAO,CAACJ,MAAYA,EAAQ,aAAaE,CAAK,CAAC,IAGlE,CAAC,KAAKE,CAAQ;AACzB,CAAC;AAEDP,EAAK,MAAM,IAAI,OAAO,sBAAsB,CAAC,EAAE,MAAM,SAAUI,GAAQ;AACnE,QAAMK,IAAKL,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC,GAC7BD,IAAUD,EAAgB,KAAK,CAACC,MAAYA,EAAQ,OAAOM,CAAE;AAEnE,SAAKN,IAIE,CAAC,KAAK,EAAE,GAAGA,GAAS,GAAGO,GAAmB,IAHtC,CAAC,KAAK,EAAE;AAIvB,CAAC;AAEDV,EAAK,MAAM,4BAA4B,EAAE,MAAM,CAACI,MAAW;AACvD,QAAM,EAAE,WAAAO,GAAW,UAAAC,GAAU,MAAAC,GAAM,OAAAP,GAAO,UAAAQ,EAAA,IAAaV,EAAO;AAE9D,UAAQ,IAAI,iBAAiBA,EAAO,MAAM;AAE1C,QAAM,EAAE,OAAAW,GAAO,KAAAC,EAAA,IAAQH,GAEjBN,IAAWL;AAEjB,MAAIe,IAAOV,GACPW,IAAQX,EAAS;AAErB,EAAIS,KAAOD,MACHC,MAAQ,oBACRC,EAAK;AAAA,IACDE;AAAA,MAAOH;AAAA,MAAKD,MAAU;AAAA,MAAQ,CAACK,MAC1BA,EAAa,YAAA;AAAA,IAAY;AAAA,EAC9B,IAGJH,EAAK,KAAKE,EAAOH,GAAKD,MAAU,QAAQ,QAAkB,CAAC,IAI/DT,MACAW,IAAOT,EAAeS,GAAMX,CAAK,GACjCY,IAAQD,EAAK,SAGbH,MACAG,IAAOA,EAAK,OAAO,CAACI,MAASP,EAAS,SAASO,EAAK,QAAQ,CAAC,IAGjEJ,IAAOK,EAASL,GAAML,GAAUD,CAAS;AAEzC,QAAMY,IAAe;AAAA,IACjB,MAAMN;AAAA,IACN,OAAAC;AAAA,EAAA;AAGJ,SAAO,IAAI,QAAQ,SAAUM,GAAS;AAClC,eAAW,WAAY;AACnB,MAAAA,EAAQ,CAAC,KAAKD,CAAY,CAAC;AAAA,IAC/B,GAAG,GAAG;AAAA,EACV,CAAC;AACL,CAAC;"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { mock as
|
|
2
|
-
import { mailData as
|
|
3
|
-
|
|
4
|
-
const { category:
|
|
5
|
-
let
|
|
6
|
-
return
|
|
1
|
+
import { mock as o } from "../MockAdapter.js";
|
|
2
|
+
import { mailData as l } from "../data/mailData.js";
|
|
3
|
+
o.onGet("/api/mails").reply((n) => {
|
|
4
|
+
const { category: e, label: i } = n.params;
|
|
5
|
+
let r = l;
|
|
6
|
+
return e && e !== "inbox" && (r = l.filter((t) => t.group === e)), i && (r = l.filter((t) => t.label === i)), [200, r];
|
|
7
7
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return o ? [200, o] : [404, {}];
|
|
8
|
+
o.onGet(new RegExp("/api/mails/*")).reply(function(n) {
|
|
9
|
+
const e = n.url?.split("/"), i = e?.[(e?.length || 0) - 1], r = l.find((t) => t.id === i);
|
|
10
|
+
return r ? [200, r] : [404, {}];
|
|
12
11
|
});
|
|
13
12
|
//# sourceMappingURL=mailFakeApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/mailFakeApi.ts"],"sourcesContent":["import { mock } from '../MockAdapter'\nimport { mailData } from '../data/mailData'\n\nmock.onGet(`/api/mails`).reply((config) => {\n const { category, label } = config.params\n let response = mailData\n\n if (category && category !== 'inbox') {\n response = mailData.filter((mail) => mail.group === category)\n }\n\n if (label) {\n response = mailData.filter((mail) => mail.label === label)\n }\n\n return [200, response]\n})\n\nmock.onGet(new RegExp(`/api/mails/*`)).reply(function (config) {\n const urlSegment = config.url?.split('/')\n const id = urlSegment?.[(urlSegment?.length || 0) - 1]\n const mail = mailData.find((mail) => mail.id === id)\n\n if (!mail) {\n return [404, {}]\n }\n\n return [200, mail]\n})\n"],"names":["mock","config","category","label","response","mailData","mail","urlSegment","
|
|
1
|
+
{"version":3,"file":"mailFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/mailFakeApi.ts"],"sourcesContent":["import { mock } from '../MockAdapter'\nimport { mailData } from '../data/mailData'\n\nmock.onGet(`/api/mails`).reply((config) => {\n const { category, label } = config.params\n let response = mailData\n\n if (category && category !== 'inbox') {\n response = mailData.filter((mail) => mail.group === category)\n }\n\n if (label) {\n response = mailData.filter((mail) => mail.label === label)\n }\n\n return [200, response]\n})\n\nmock.onGet(new RegExp(`/api/mails/*`)).reply(function (config) {\n const urlSegment = config.url?.split('/')\n const id = urlSegment?.[(urlSegment?.length || 0) - 1]\n const mail = mailData.find((mail) => mail.id === id)\n\n if (!mail) {\n return [404, {}]\n }\n\n return [200, mail]\n})\n"],"names":["mock","config","category","label","response","mailData","mail","urlSegment","id"],"mappings":";;AAGAA,EAAK,MAAM,YAAY,EAAE,MAAM,CAACC,MAAW;AACvC,QAAM,EAAE,UAAAC,GAAU,OAAAC,EAAA,IAAUF,EAAO;AACnC,MAAIG,IAAWC;AAEf,SAAIH,KAAYA,MAAa,YACzBE,IAAWC,EAAS,OAAO,CAACC,MAASA,EAAK,UAAUJ,CAAQ,IAG5DC,MACAC,IAAWC,EAAS,OAAO,CAACC,MAASA,EAAK,UAAUH,CAAK,IAGtD,CAAC,KAAKC,CAAQ;AACzB,CAAC;AAEDJ,EAAK,MAAM,IAAI,OAAO,cAAc,CAAC,EAAE,MAAM,SAAUC,GAAQ;AAC3D,QAAMM,IAAaN,EAAO,KAAK,MAAM,GAAG,GAClCO,IAAKD,KAAcA,GAAY,UAAU,KAAK,CAAC,GAC/CD,IAAOD,EAAS,KAAK,CAACC,MAASA,EAAK,OAAOE,CAAE;AAEnD,SAAKF,IAIE,CAAC,KAAKA,CAAI,IAHN,CAAC,KAAK,EAAE;AAIvB,CAAC;"}
|
|
@@ -2,17 +2,17 @@ import g from "../../utils/wildCardSearch.js";
|
|
|
2
2
|
import m from "../../utils/sortBy.js";
|
|
3
3
|
import D from "../../utils/paginate.js";
|
|
4
4
|
import { mock as l } from "../MockAdapter.js";
|
|
5
|
-
import { ordersData as u, orderDetailsData as
|
|
6
|
-
l.onGet("/api/orders").reply((
|
|
7
|
-
const { pageIndex:
|
|
5
|
+
import { ordersData as u, orderDetailsData as d } from "../data/ordersData.js";
|
|
6
|
+
l.onGet("/api/orders").reply((s) => {
|
|
7
|
+
const { pageIndex: i, pageSize: r, sort: n, query: p } = s.params, { order: a, key: e } = n, c = u;
|
|
8
8
|
let t = c.filter((o) => typeof o != "function"), f = c.length;
|
|
9
|
-
e &&
|
|
9
|
+
e && a && (e === "category" || e === "name" ? t.sort(
|
|
10
10
|
m(
|
|
11
11
|
e,
|
|
12
|
-
|
|
12
|
+
a === "desc",
|
|
13
13
|
(o) => o.toUpperCase()
|
|
14
14
|
)
|
|
15
|
-
) : t.sort(m(e,
|
|
15
|
+
) : t.sort(m(e, a === "desc", parseInt))), p && (t = g(t, p, "id"), f = t.length), t = D(t, r, i);
|
|
16
16
|
const y = {
|
|
17
17
|
list: t,
|
|
18
18
|
total: f
|
|
@@ -23,9 +23,8 @@ l.onGet("/api/orders").reply((n) => {
|
|
|
23
23
|
}, 500);
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
-
l.onGet(/\/api\/orders\/\d+/).reply(function(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return r ? (p.id = r.id, p.paymentStatus = r.status, [200, p]) : [404, {}];
|
|
26
|
+
l.onGet(/\/api\/orders\/\d+/).reply(function(s) {
|
|
27
|
+
const i = s.url?.split("/")[2], r = u.find((n) => n.id === i);
|
|
28
|
+
return r ? (d.id = r.id, d.paymentStatus = r.status, [200, d]) : [404, {}];
|
|
30
29
|
});
|
|
31
30
|
//# sourceMappingURL=ordersFakeApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordersFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/ordersFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\nimport { mock } from '../MockAdapter'\nimport { ordersData, orderDetailsData } from '../data/ordersData'\n\nmock.onGet(`/api/orders`).reply((config) => {\n const { pageIndex, pageSize, sort, query } = config.params\n\n const { order, key } = sort\n\n const orders = ordersData as any[]\n\n const sanitizeorders = orders.filter((elm) => typeof elm !== 'function')\n let data = sanitizeorders\n let total = orders.length\n\n if (key && order) {\n if (key === 'category' || key === 'name') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query, 'id')\n total = data.length\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n\nmock.onGet(/\\/api\\/orders\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n const order = ordersData.find((order) => order.id === id)\n\n if (!order) {\n return [404, {}]\n }\n orderDetailsData.id = order.id\n orderDetailsData.paymentStatus = order.status\n\n return [200, orderDetailsData]\n})\n"],"names":["mock","config","pageIndex","pageSize","sort","query","order","key","orders","ordersData","data","elm","total","sortBy","a","wildCardSearch","paginate","responseData","resolve","id","
|
|
1
|
+
{"version":3,"file":"ordersFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/ordersFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\nimport { mock } from '../MockAdapter'\nimport { ordersData, orderDetailsData } from '../data/ordersData'\n\nmock.onGet(`/api/orders`).reply((config) => {\n const { pageIndex, pageSize, sort, query } = config.params\n\n const { order, key } = sort\n\n const orders = ordersData as any[]\n\n const sanitizeorders = orders.filter((elm) => typeof elm !== 'function')\n let data = sanitizeorders\n let total = orders.length\n\n if (key && order) {\n if (key === 'category' || key === 'name') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query, 'id')\n total = data.length\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n\nmock.onGet(/\\/api\\/orders\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n const order = ordersData.find((order) => order.id === id)\n\n if (!order) {\n return [404, {}]\n }\n orderDetailsData.id = order.id\n orderDetailsData.paymentStatus = order.status\n\n return [200, orderDetailsData]\n})\n"],"names":["mock","config","pageIndex","pageSize","sort","query","order","key","orders","ordersData","data","elm","total","sortBy","a","wildCardSearch","paginate","responseData","resolve","id","orderDetailsData"],"mappings":";;;;;AAOAA,EAAK,MAAM,aAAa,EAAE,MAAM,CAACC,MAAW;AACxC,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,MAAAC,GAAM,OAAAC,EAAA,IAAUJ,EAAO,QAE9C,EAAE,OAAAK,GAAO,KAAAC,EAAA,IAAQH,GAEjBI,IAASC;AAGf,MAAIC,IADmBF,EAAO,OAAO,CAACG,MAAQ,OAAOA,KAAQ,UAAU,GAEnEC,IAAQJ,EAAO;AAEnB,EAAID,KAAOD,MACHC,MAAQ,cAAcA,MAAQ,SAC9BG,EAAK;AAAA,IACDG;AAAA,MAAON;AAAA,MAAKD,MAAU;AAAA,MAAQ,CAACQ,MAC1BA,EAAa,YAAA;AAAA,IAAY;AAAA,EAC9B,IAGJJ,EAAK,KAAKG,EAAON,GAAKD,MAAU,QAAQ,QAAkB,CAAC,IAI/DD,MACAK,IAAOK,EAAeL,GAAML,GAAO,IAAI,GACvCO,IAAQF,EAAK,SAGjBA,IAAOM,EAASN,GAAMP,GAAUD,CAAS;AAEzC,QAAMe,IAAe;AAAA,IACjB,MAAMP;AAAA,IACN,OAAAE;AAAA,EAAA;AAGJ,SAAO,IAAI,QAAQ,SAAUM,GAAS;AAClC,eAAW,WAAY;AACnB,MAAAA,EAAQ,CAAC,KAAKD,CAAY,CAAC;AAAA,IAC/B,GAAG,GAAG;AAAA,EACV,CAAC;AACL,CAAC;AAEDjB,EAAK,MAAM,oBAAoB,EAAE,MAAM,SAAUC,GAAQ;AACrD,QAAMkB,IAAKlB,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC,GAC7BK,IAAQG,EAAW,KAAK,CAACH,MAAUA,EAAM,OAAOa,CAAE;AAExD,SAAKb,KAGLc,EAAiB,KAAKd,EAAM,IAC5Bc,EAAiB,gBAAgBd,EAAM,QAEhC,CAAC,KAAKc,CAAgB,KALlB,CAAC,KAAK,EAAE;AAMvB,CAAC;"}
|
|
@@ -3,16 +3,16 @@ import u from "../../utils/sortBy.js";
|
|
|
3
3
|
import g from "../../utils/paginate.js";
|
|
4
4
|
import { mock as f } from "../MockAdapter.js";
|
|
5
5
|
import { productsData as m } from "../data/productData.js";
|
|
6
|
-
f.onGet("/api/products").reply((
|
|
7
|
-
const { pageIndex:
|
|
6
|
+
f.onGet("/api/products").reply((n) => {
|
|
7
|
+
const { pageIndex: s, pageSize: e, sort: i, query: p } = n.params, { order: a, key: o } = i, c = m;
|
|
8
8
|
let t = c.filter((r) => typeof r != "function"), d = c.length;
|
|
9
|
-
o &&
|
|
9
|
+
o && a && (o === "category" || o === "name" ? t.sort(
|
|
10
10
|
u(
|
|
11
11
|
o,
|
|
12
|
-
|
|
12
|
+
a === "desc",
|
|
13
13
|
(r) => r.toUpperCase()
|
|
14
14
|
)
|
|
15
|
-
) : t.sort(u(o,
|
|
15
|
+
) : t.sort(u(o, a === "desc", parseInt))), p && (t = y(t, p, "name"), d = t.length), t = g(t, e, s);
|
|
16
16
|
const l = {
|
|
17
17
|
list: t,
|
|
18
18
|
total: d
|
|
@@ -23,9 +23,8 @@ f.onGet("/api/products").reply((i) => {
|
|
|
23
23
|
}, 500);
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
-
f.onGet(/\/api\/products\/\d+/).reply(function(
|
|
27
|
-
|
|
28
|
-
const a = (n = i.url) == null ? void 0 : n.split("/")[2], e = m.find((s) => s.id === a);
|
|
26
|
+
f.onGet(/\/api\/products\/\d+/).reply(function(n) {
|
|
27
|
+
const s = n.url?.split("/")[2], e = m.find((i) => i.id === s);
|
|
29
28
|
return e ? [200, e] : [404, {}];
|
|
30
29
|
});
|
|
31
30
|
//# sourceMappingURL=productsFakeApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productsFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/productsFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\nimport { mock } from '../MockAdapter'\nimport { productsData } from '../data/productData'\n\nmock.onGet(`/api/products`).reply((config) => {\n const { pageIndex, pageSize, sort, query } = config.params\n\n const { order, key } = sort\n\n const products = productsData as any[]\n\n const sanitizeProducts = products.filter((elm) => typeof elm !== 'function')\n let data = sanitizeProducts\n let total = products.length\n\n if (key && order) {\n if (key === 'category' || key === 'name') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query, 'name')\n total = data.length\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n\nmock.onGet(/\\/api\\/products\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n const product = productsData.find((product) => product.id === id)\n\n if (!product) {\n return [404, {}]\n }\n\n return [200, product]\n})\n"],"names":["mock","config","pageIndex","pageSize","sort","query","order","key","products","productsData","data","elm","total","sortBy","a","wildCardSearch","paginate","responseData","resolve","id","
|
|
1
|
+
{"version":3,"file":"productsFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/productsFakeApi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport wildCardSearch from '@/utils/wildCardSearch'\nimport sortBy, { Primer } from '@/utils/sortBy'\nimport paginate from '@/utils/paginate'\nimport { mock } from '../MockAdapter'\nimport { productsData } from '../data/productData'\n\nmock.onGet(`/api/products`).reply((config) => {\n const { pageIndex, pageSize, sort, query } = config.params\n\n const { order, key } = sort\n\n const products = productsData as any[]\n\n const sanitizeProducts = products.filter((elm) => typeof elm !== 'function')\n let data = sanitizeProducts\n let total = products.length\n\n if (key && order) {\n if (key === 'category' || key === 'name') {\n data.sort(\n sortBy(key, order === 'desc', (a) =>\n (a as string).toUpperCase(),\n ),\n )\n } else {\n data.sort(sortBy(key, order === 'desc', parseInt as Primer))\n }\n }\n\n if (query) {\n data = wildCardSearch(data, query, 'name')\n total = data.length\n }\n\n data = paginate(data, pageSize, pageIndex)\n\n const responseData = {\n list: data,\n total: total,\n }\n\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve([200, responseData])\n }, 500)\n })\n})\n\nmock.onGet(/\\/api\\/products\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n const product = productsData.find((product) => product.id === id)\n\n if (!product) {\n return [404, {}]\n }\n\n return [200, product]\n})\n"],"names":["mock","config","pageIndex","pageSize","sort","query","order","key","products","productsData","data","elm","total","sortBy","a","wildCardSearch","paginate","responseData","resolve","id","product"],"mappings":";;;;;AAOAA,EAAK,MAAM,eAAe,EAAE,MAAM,CAACC,MAAW;AAC1C,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,MAAAC,GAAM,OAAAC,EAAA,IAAUJ,EAAO,QAE9C,EAAE,OAAAK,GAAO,KAAAC,EAAA,IAAQH,GAEjBI,IAAWC;AAGjB,MAAIC,IADqBF,EAAS,OAAO,CAACG,MAAQ,OAAOA,KAAQ,UAAU,GAEvEC,IAAQJ,EAAS;AAErB,EAAID,KAAOD,MACHC,MAAQ,cAAcA,MAAQ,SAC9BG,EAAK;AAAA,IACDG;AAAA,MAAON;AAAA,MAAKD,MAAU;AAAA,MAAQ,CAACQ,MAC1BA,EAAa,YAAA;AAAA,IAAY;AAAA,EAC9B,IAGJJ,EAAK,KAAKG,EAAON,GAAKD,MAAU,QAAQ,QAAkB,CAAC,IAI/DD,MACAK,IAAOK,EAAeL,GAAML,GAAO,MAAM,GACzCO,IAAQF,EAAK,SAGjBA,IAAOM,EAASN,GAAMP,GAAUD,CAAS;AAEzC,QAAMe,IAAe;AAAA,IACjB,MAAMP;AAAA,IACN,OAAAE;AAAA,EAAA;AAGJ,SAAO,IAAI,QAAQ,SAAUM,GAAS;AAClC,eAAW,WAAY;AACnB,MAAAA,EAAQ,CAAC,KAAKD,CAAY,CAAC;AAAA,IAC/B,GAAG,GAAG;AAAA,EACV,CAAC;AACL,CAAC;AAEDjB,EAAK,MAAM,sBAAsB,EAAE,MAAM,SAAUC,GAAQ;AACvD,QAAMkB,IAAKlB,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC,GAC7BmB,IAAUX,EAAa,KAAK,CAACW,MAAYA,EAAQ,OAAOD,CAAE;AAEhE,SAAKC,IAIE,CAAC,KAAKA,CAAO,IAHT,CAAC,KAAK,EAAE;AAIvB,CAAC;"}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { mock as r } from "../MockAdapter.js";
|
|
2
|
-
import { projectListData as a, projectDetailsData as
|
|
3
|
-
import { usersData as
|
|
2
|
+
import { projectListData as a, projectDetailsData as i, scrumboardData as n, tasksData as c, issueData as l } from "../data/projectsData.js";
|
|
3
|
+
import { usersData as s } from "../data/usersData.js";
|
|
4
4
|
r.onGet("/api/projects").reply(() => [200, a]);
|
|
5
5
|
r.onPost("/api/projects").reply((t) => t.data.length > 0 ? (a.push(JSON.parse(t.data)), [200, a]) : [400, {}]);
|
|
6
6
|
r.onGet(/\/api\/projects\/\d+/).reply(function(t) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return e || (e = a[0]), [200, { ...n, ...e }];
|
|
7
|
+
const o = t.url?.split("/")[2];
|
|
8
|
+
let e = a.find((p) => p.id === o);
|
|
9
|
+
return e || (e = a[0]), [200, { ...i, ...e }];
|
|
11
10
|
});
|
|
12
|
-
r.onGet("/api/projects/scrum-board").reply(() => [200,
|
|
11
|
+
r.onGet("/api/projects/scrum-board").reply(() => [200, n]);
|
|
13
12
|
r.onGet("/api/projects/scrum-board/members").reply(() => {
|
|
14
13
|
const t = ["3", "2", "4", "7", "1", "10", "9"];
|
|
15
14
|
return [
|
|
16
15
|
200,
|
|
17
16
|
{
|
|
18
|
-
participantMembers:
|
|
17
|
+
participantMembers: s.filter(
|
|
19
18
|
(e) => t.includes(e.id)
|
|
20
19
|
),
|
|
21
|
-
allMembers:
|
|
20
|
+
allMembers: s
|
|
22
21
|
}
|
|
23
22
|
];
|
|
24
23
|
});
|
|
25
|
-
r.onGet("/api/projects/tasks").reply(() => [200,
|
|
24
|
+
r.onGet("/api/projects/tasks").reply(() => [200, c]);
|
|
26
25
|
r.onGet(/\/api\/projects\/tasks\/\d+/).reply(function() {
|
|
27
|
-
return [200,
|
|
26
|
+
return [200, l];
|
|
28
27
|
});
|
|
29
28
|
//# sourceMappingURL=projectsFakeApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectsFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/projectsFakeApi.ts"],"sourcesContent":["import { mock } from '../MockAdapter'\nimport {\n scrumboardData,\n projectListData,\n projectDetailsData,\n tasksData,\n issueData,\n} from '../data/projectsData'\nimport { usersData } from '../data/usersData'\n\nmock.onGet(`/api/projects`).reply(() => {\n return [200, projectListData]\n})\n\nmock.onPost(`/api/projects`).reply((request) => {\n if (request.data.length > 0) {\n projectListData.push(JSON.parse(request.data))\n\n return [200, projectListData]\n }\n return [400, {}]\n})\n\nmock.onGet(/\\/api\\/projects\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n let project = projectListData.find((product) => product.id === id)\n\n if (!project) {\n project = projectListData[0]\n }\n\n const projectDetails = { ...projectDetailsData, ...project }\n\n return [200, projectDetails]\n})\n\nmock.onGet(`/api/projects/scrum-board`).reply(() => {\n return [200, scrumboardData]\n})\n\nmock.onGet(`/api/projects/scrum-board/members`).reply(() => {\n const borderMembersId = ['3', '2', '4', '7', '1', '10', '9']\n const participantMembers = usersData.filter((user) =>\n borderMembersId.includes(user.id),\n )\n return [\n 200,\n {\n participantMembers,\n allMembers: usersData,\n },\n ]\n})\n\nmock.onGet(`/api/projects/tasks`).reply(() => {\n return [200, tasksData]\n})\n\nmock.onGet(/\\/api\\/projects\\/tasks\\/\\d+/).reply(function () {\n return [200, issueData]\n})\n"],"names":["mock","projectListData","request","config","id","
|
|
1
|
+
{"version":3,"file":"projectsFakeApi.js","sources":["../../../../lib/@ecme/mock/fakeApi/projectsFakeApi.ts"],"sourcesContent":["import { mock } from '../MockAdapter'\nimport {\n scrumboardData,\n projectListData,\n projectDetailsData,\n tasksData,\n issueData,\n} from '../data/projectsData'\nimport { usersData } from '../data/usersData'\n\nmock.onGet(`/api/projects`).reply(() => {\n return [200, projectListData]\n})\n\nmock.onPost(`/api/projects`).reply((request) => {\n if (request.data.length > 0) {\n projectListData.push(JSON.parse(request.data))\n\n return [200, projectListData]\n }\n return [400, {}]\n})\n\nmock.onGet(/\\/api\\/projects\\/\\d+/).reply(function (config) {\n const id = config.url?.split('/')[2]\n let project = projectListData.find((product) => product.id === id)\n\n if (!project) {\n project = projectListData[0]\n }\n\n const projectDetails = { ...projectDetailsData, ...project }\n\n return [200, projectDetails]\n})\n\nmock.onGet(`/api/projects/scrum-board`).reply(() => {\n return [200, scrumboardData]\n})\n\nmock.onGet(`/api/projects/scrum-board/members`).reply(() => {\n const borderMembersId = ['3', '2', '4', '7', '1', '10', '9']\n const participantMembers = usersData.filter((user) =>\n borderMembersId.includes(user.id),\n )\n return [\n 200,\n {\n participantMembers,\n allMembers: usersData,\n },\n ]\n})\n\nmock.onGet(`/api/projects/tasks`).reply(() => {\n return [200, tasksData]\n})\n\nmock.onGet(/\\/api\\/projects\\/tasks\\/\\d+/).reply(function () {\n return [200, issueData]\n})\n"],"names":["mock","projectListData","request","config","id","project","product","projectDetailsData","scrumboardData","borderMembersId","usersData","user","tasksData","issueData"],"mappings":";;;AAUAA,EAAK,MAAM,eAAe,EAAE,MAAM,MACvB,CAAC,KAAKC,CAAe,CAC/B;AAEDD,EAAK,OAAO,eAAe,EAAE,MAAM,CAACE,MAC5BA,EAAQ,KAAK,SAAS,KACtBD,EAAgB,KAAK,KAAK,MAAMC,EAAQ,IAAI,CAAC,GAEtC,CAAC,KAAKD,CAAe,KAEzB,CAAC,KAAK,EAAE,CAClB;AAEDD,EAAK,MAAM,sBAAsB,EAAE,MAAM,SAAUG,GAAQ;AACvD,QAAMC,IAAKD,EAAO,KAAK,MAAM,GAAG,EAAE,CAAC;AACnC,MAAIE,IAAUJ,EAAgB,KAAK,CAACK,MAAYA,EAAQ,OAAOF,CAAE;AAEjE,SAAKC,MACDA,IAAUJ,EAAgB,CAAC,IAKxB,CAAC,KAFe,EAAE,GAAGM,GAAoB,GAAGF,EAAA,CAExB;AAC/B,CAAC;AAEDL,EAAK,MAAM,2BAA2B,EAAE,MAAM,MACnC,CAAC,KAAKQ,CAAc,CAC9B;AAEDR,EAAK,MAAM,mCAAmC,EAAE,MAAM,MAAM;AACxD,QAAMS,IAAkB,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,MAAM,GAAG;AAI3D,SAAO;AAAA,IACH;AAAA,IACA;AAAA,MACI,oBANmBC,EAAU;AAAA,QAAO,CAACC,MACzCF,EAAgB,SAASE,EAAK,EAAE;AAAA,MAAA;AAAA,MAM5B,YAAYD;AAAA,IAAA;AAAA,EAChB;AAER,CAAC;AAEDV,EAAK,MAAM,qBAAqB,EAAE,MAAM,MAC7B,CAAC,KAAKY,CAAS,CACzB;AAEDZ,EAAK,MAAM,6BAA6B,EAAE,MAAM,WAAY;AACxD,SAAO,CAAC,KAAKa,CAAS;AAC1B,CAAC;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { useState as b, useRef as f, useEffect as u } from "react";
|
|
2
2
|
function m(l) {
|
|
3
|
-
const { offset: s = "0px", shouldStop: c = !1, onLoadMore: o } = l ?? {}, [
|
|
4
|
-
|
|
3
|
+
const { offset: s = "0px", shouldStop: c = !1, onLoadMore: o } = l ?? {}, [t, i] = b(!1), n = f(null), r = f(document.createElement("div")), a = (e) => {
|
|
4
|
+
e && (e.append(r.current), e.style.position = "relative");
|
|
5
5
|
};
|
|
6
6
|
return u(() => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
}, [s,
|
|
10
|
-
const
|
|
11
|
-
|
|
7
|
+
const e = r.current;
|
|
8
|
+
e.toggleAttribute("data-infinite-scroll-detector", !0), e.style.position = "absolute", e.style.bottom = s, e.offsetTop < 0 && (e.style.bottom = "0px");
|
|
9
|
+
}, [s, t]), u(() => {
|
|
10
|
+
const e = n.current;
|
|
11
|
+
e && e.disconnect();
|
|
12
12
|
async function d([{ isIntersecting: p }]) {
|
|
13
|
-
p && !
|
|
13
|
+
p && !t && !c && typeof o == "function" && (i(!0), await o(), i(!1));
|
|
14
14
|
}
|
|
15
15
|
return n.current = new IntersectionObserver(
|
|
16
16
|
d,
|
|
17
17
|
{ threshold: 0 }
|
|
18
|
-
), n.current.observe(r.current), () =>
|
|
19
|
-
}, [
|
|
20
|
-
isLoading:
|
|
18
|
+
), n.current.observe(r.current), () => e?.disconnect();
|
|
19
|
+
}, [t, o, c]), {
|
|
20
|
+
isLoading: t,
|
|
21
21
|
containerRef: a
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteScroll.js","sources":["../../../../lib/@ecme/utils/hooks/useInfiniteScroll.ts"],"sourcesContent":["import { RefAttributes, useEffect, useRef, useState } from \"react\";\n\ntype Options = {\n offset?: string;\n shouldStop?: boolean;\n onLoadMore?: () => Promise<void>;\n};\n\nfunction useInfiniteScroll(options?: Options): {\n isLoading: boolean;\n containerRef: RefAttributes<HTMLDivElement>[\"ref\"];\n} {\n const { offset = \"0px\", shouldStop = false, onLoadMore } = options ?? {};\n\n const [isLoading, setIsLoading] = useState(false);\n const observerRef = useRef<IntersectionObserver>(null);\n const targetRef = useRef(document.createElement(\"div\"));\n\n const containerRef: RefAttributes<HTMLDivElement>[\"ref\"] = (container) => {\n if (container) {\n container.append(targetRef.current);\n container.style.position = \"relative\";\n }\n };\n\n useEffect(() => {\n const target = targetRef.current;\n target.toggleAttribute(\"data-infinite-scroll-detector\", true);\n target.style.position = \"absolute\";\n target.style.bottom = offset;\n if (target.offsetTop < 0) target.style.bottom = \"0px\";\n }, [offset, isLoading]);\n\n useEffect(() => {\n const observe = observerRef.current;\n if (observe) {\n observe.disconnect();\n }\n\n async function handler([{ isIntersecting }]: IntersectionObserverEntry[]) {\n if (\n isIntersecting &&\n !isLoading &&\n !shouldStop &&\n typeof onLoadMore === \"function\"\n ) {\n setIsLoading(true);\n await onLoadMore();\n setIsLoading(false);\n }\n }\n\n observerRef.current = new IntersectionObserver(\n handler as IntersectionObserverCallback,\n { threshold: 0 }\n );\n\n observerRef.current.observe(targetRef.current);\n\n return () => observe?.disconnect();\n }, [isLoading, onLoadMore, shouldStop]);\n\n return {\n isLoading,\n containerRef,\n };\n}\n\nexport default useInfiniteScroll;\n"],"names":["useInfiniteScroll","options","offset","shouldStop","onLoadMore","isLoading","setIsLoading","useState","observerRef","useRef","targetRef","containerRef","container","useEffect","target","observe","handler","isIntersecting"],"mappings":";AAQA,SAASA,EAAkBC,GAGzB;AACA,QAAM,EAAE,QAAAC,IAAS,OAAO,YAAAC,IAAa,IAAO,YAAAC,EAAA,IAAeH,KAAW,CAAA,GAEhE,CAACI,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAcC,EAA6B,IAAI,GAC/CC,IAAYD,EAAO,SAAS,cAAc,KAAK,CAAC,GAEhDE,IAAqD,CAACC,MAAc;AACxE,IAAIA,MACFA,EAAU,OAAOF,EAAU,OAAO,GAClCE,EAAU,MAAM,WAAW;AAAA,EAE/B;AAEA,SAAAC,EAAU,MAAM;AACd,UAAMC,IAASJ,EAAU;AACzB,IAAAI,EAAO,gBAAgB,iCAAiC,EAAI,GAC5DA,EAAO,MAAM,WAAW,YACxBA,EAAO,MAAM,SAASZ,GAClBY,EAAO,YAAY,MAAGA,EAAO,MAAM,SAAS;AAAA,EAClD,GAAG,CAACZ,GAAQG,CAAS,CAAC,GAEtBQ,EAAU,MAAM;AACd,UAAME,IAAUP,EAAY;AAC5B,IAAIO,KACFA,EAAQ,WAAA;AAGV,mBAAeC,EAAQ,CAAC,EAAE,gBAAAC,EAAA,CAAgB,GAAgC;AACxE,MACEA,KACA,CAACZ,KACD,CAACF,KACD,OAAOC,KAAe,eAEtBE,EAAa,EAAI,GACjB,MAAMF,EAAA,GACNE,EAAa,EAAK;AAAA,IAEtB;AAEA,WAAAE,EAAY,UAAU,IAAI;AAAA,MACxBQ;AAAA,MACA,EAAE,WAAW,EAAA;AAAA,IAAE,GAGjBR,EAAY,QAAQ,QAAQE,EAAU,OAAO,GAEtC,MAAMK,
|
|
1
|
+
{"version":3,"file":"useInfiniteScroll.js","sources":["../../../../lib/@ecme/utils/hooks/useInfiniteScroll.ts"],"sourcesContent":["import { RefAttributes, useEffect, useRef, useState } from \"react\";\n\ntype Options = {\n offset?: string;\n shouldStop?: boolean;\n onLoadMore?: () => Promise<void>;\n};\n\nfunction useInfiniteScroll(options?: Options): {\n isLoading: boolean;\n containerRef: RefAttributes<HTMLDivElement>[\"ref\"];\n} {\n const { offset = \"0px\", shouldStop = false, onLoadMore } = options ?? {};\n\n const [isLoading, setIsLoading] = useState(false);\n const observerRef = useRef<IntersectionObserver>(null);\n const targetRef = useRef(document.createElement(\"div\"));\n\n const containerRef: RefAttributes<HTMLDivElement>[\"ref\"] = (container) => {\n if (container) {\n container.append(targetRef.current);\n container.style.position = \"relative\";\n }\n };\n\n useEffect(() => {\n const target = targetRef.current;\n target.toggleAttribute(\"data-infinite-scroll-detector\", true);\n target.style.position = \"absolute\";\n target.style.bottom = offset;\n if (target.offsetTop < 0) target.style.bottom = \"0px\";\n }, [offset, isLoading]);\n\n useEffect(() => {\n const observe = observerRef.current;\n if (observe) {\n observe.disconnect();\n }\n\n async function handler([{ isIntersecting }]: IntersectionObserverEntry[]) {\n if (\n isIntersecting &&\n !isLoading &&\n !shouldStop &&\n typeof onLoadMore === \"function\"\n ) {\n setIsLoading(true);\n await onLoadMore();\n setIsLoading(false);\n }\n }\n\n observerRef.current = new IntersectionObserver(\n handler as IntersectionObserverCallback,\n { threshold: 0 }\n );\n\n observerRef.current.observe(targetRef.current);\n\n return () => observe?.disconnect();\n }, [isLoading, onLoadMore, shouldStop]);\n\n return {\n isLoading,\n containerRef,\n };\n}\n\nexport default useInfiniteScroll;\n"],"names":["useInfiniteScroll","options","offset","shouldStop","onLoadMore","isLoading","setIsLoading","useState","observerRef","useRef","targetRef","containerRef","container","useEffect","target","observe","handler","isIntersecting"],"mappings":";AAQA,SAASA,EAAkBC,GAGzB;AACA,QAAM,EAAE,QAAAC,IAAS,OAAO,YAAAC,IAAa,IAAO,YAAAC,EAAA,IAAeH,KAAW,CAAA,GAEhE,CAACI,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAcC,EAA6B,IAAI,GAC/CC,IAAYD,EAAO,SAAS,cAAc,KAAK,CAAC,GAEhDE,IAAqD,CAACC,MAAc;AACxE,IAAIA,MACFA,EAAU,OAAOF,EAAU,OAAO,GAClCE,EAAU,MAAM,WAAW;AAAA,EAE/B;AAEA,SAAAC,EAAU,MAAM;AACd,UAAMC,IAASJ,EAAU;AACzB,IAAAI,EAAO,gBAAgB,iCAAiC,EAAI,GAC5DA,EAAO,MAAM,WAAW,YACxBA,EAAO,MAAM,SAASZ,GAClBY,EAAO,YAAY,MAAGA,EAAO,MAAM,SAAS;AAAA,EAClD,GAAG,CAACZ,GAAQG,CAAS,CAAC,GAEtBQ,EAAU,MAAM;AACd,UAAME,IAAUP,EAAY;AAC5B,IAAIO,KACFA,EAAQ,WAAA;AAGV,mBAAeC,EAAQ,CAAC,EAAE,gBAAAC,EAAA,CAAgB,GAAgC;AACxE,MACEA,KACA,CAACZ,KACD,CAACF,KACD,OAAOC,KAAe,eAEtBE,EAAa,EAAI,GACjB,MAAMF,EAAA,GACNE,EAAa,EAAK;AAAA,IAEtB;AAEA,WAAAE,EAAY,UAAU,IAAI;AAAA,MACxBQ;AAAA,MACA,EAAE,WAAW,EAAA;AAAA,IAAE,GAGjBR,EAAY,QAAQ,QAAQE,EAAU,OAAO,GAEtC,MAAMK,GAAS,WAAA;AAAA,EACxB,GAAG,CAACV,GAAWD,GAAYD,CAAU,CAAC,GAE/B;AAAA,IACL,WAAAE;AAAA,IACA,cAAAM;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
var n;
|
|
1
|
+
import { useMemo as n } from "react";
|
|
2
|
+
import f from "lodash/isPlainObject";
|
|
3
|
+
const r = (t, u) => {
|
|
5
4
|
if (!Array.isArray(t) && t.key === u)
|
|
6
5
|
return t;
|
|
7
6
|
let o, e = !1;
|
|
8
7
|
for (const i in t)
|
|
9
8
|
if (i !== "icon" && // eslint-disable-next-line no-prototype-builtins
|
|
10
|
-
t.hasOwnProperty(i) && typeof t[i] == "object" && (
|
|
11
|
-
(
|
|
12
|
-
) && (e = !0), o =
|
|
9
|
+
t.hasOwnProperty(i) && typeof t[i] == "object" && (f(t[i]) && t[i].subMenu?.length > 0 && t[i].subMenu.some(
|
|
10
|
+
(c) => c.key === u
|
|
11
|
+
) && (e = !0), o = r(t[i], u), o))
|
|
13
12
|
return e && (o.parentKey = t[i].key), o;
|
|
14
13
|
return o;
|
|
15
|
-
},
|
|
14
|
+
}, s = (t, u) => t.find((e) => e.key === u) ? !0 : t.some((e) => s(e.subMenu, u)), d = (t, u) => {
|
|
16
15
|
let o = {};
|
|
17
16
|
return t.forEach((e) => {
|
|
18
|
-
|
|
17
|
+
s([e], u) && (o = e);
|
|
19
18
|
}), o;
|
|
20
19
|
};
|
|
21
|
-
function
|
|
22
|
-
const o =
|
|
20
|
+
function m(t, u) {
|
|
21
|
+
const o = n(() => r(t, u), [t, u]), e = n(() => d(t, u), [t, u]);
|
|
23
22
|
return { activedRoute: o, includedRouteTree: e };
|
|
24
23
|
}
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
m as default
|
|
27
26
|
};
|
|
28
27
|
//# sourceMappingURL=useMenuActive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuActive.js","sources":["../../../../lib/@ecme/utils/hooks/useMenuActive.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable @typescript-eslint/no-explicit-any\nimport { useMemo } from 'react'\nimport isPlainObject from 'lodash/isPlainObject'\nimport type { NavigationTree } from '@/@types/navigation'\n\ninterface NavInfo extends NavigationTree {\n parentKey?: string\n}\n\nconst getRouteInfo = (\n navTree: NavInfo | NavInfo[],\n key: string,\n): NavInfo | undefined => {\n if (!Array.isArray(navTree) && navTree.key === key) {\n return navTree\n }\n let activedRoute: NavInfo | undefined\n let isIncludeActivedRoute = false\n for (const p in navTree) {\n if (\n p !== 'icon' &&\n // eslint-disable-next-line no-prototype-builtins\n navTree.hasOwnProperty(p) &&\n typeof (navTree as any)[p] === 'object'\n ) {\n if (\n isPlainObject((navTree as any)[p]) &&\n (navTree as any)[p].subMenu?.length > 0\n ) {\n if (\n (navTree as any)[p].subMenu.some(\n (el: NavInfo) => el.key === key,\n )\n ) {\n isIncludeActivedRoute = true\n }\n }\n\n activedRoute = getRouteInfo((navTree as any)[p], key)\n\n if (activedRoute) {\n if (isIncludeActivedRoute) {\n activedRoute.parentKey = (navTree as any)[p].key\n }\n\n return activedRoute\n }\n }\n }\n return activedRoute\n}\n\nconst findNestedRoute = (navTree: NavigationTree[], key: string): boolean => {\n const found = navTree.find((node) => {\n return node.key === key\n })\n if (found) {\n return true\n }\n return navTree.some((c) => findNestedRoute(c.subMenu, key))\n}\n\nconst getTopRouteKey = (\n navTree: NavigationTree[],\n key: string,\n): NavigationTree => {\n let foundNav = {} as NavigationTree\n navTree.forEach((nav) => {\n if (findNestedRoute([nav], key)) {\n foundNav = nav\n }\n })\n return foundNav\n}\n\nfunction useMenuActive(navTree: NavigationTree[], key: string) {\n const activedRoute = useMemo(() => {\n const route = getRouteInfo(navTree, key)\n return route\n }, [navTree, key])\n\n const includedRouteTree = useMemo(() => {\n const included = getTopRouteKey(navTree, key)\n return included\n }, [navTree, key])\n\n return { activedRoute, includedRouteTree }\n}\n\nexport default useMenuActive\n"],"names":["getRouteInfo","navTree","key","activedRoute","isIncludeActivedRoute","p","isPlainObject","
|
|
1
|
+
{"version":3,"file":"useMenuActive.js","sources":["../../../../lib/@ecme/utils/hooks/useMenuActive.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable @typescript-eslint/no-explicit-any\nimport { useMemo } from 'react'\nimport isPlainObject from 'lodash/isPlainObject'\nimport type { NavigationTree } from '@/@types/navigation'\n\ninterface NavInfo extends NavigationTree {\n parentKey?: string\n}\n\nconst getRouteInfo = (\n navTree: NavInfo | NavInfo[],\n key: string,\n): NavInfo | undefined => {\n if (!Array.isArray(navTree) && navTree.key === key) {\n return navTree\n }\n let activedRoute: NavInfo | undefined\n let isIncludeActivedRoute = false\n for (const p in navTree) {\n if (\n p !== 'icon' &&\n // eslint-disable-next-line no-prototype-builtins\n navTree.hasOwnProperty(p) &&\n typeof (navTree as any)[p] === 'object'\n ) {\n if (\n isPlainObject((navTree as any)[p]) &&\n (navTree as any)[p].subMenu?.length > 0\n ) {\n if (\n (navTree as any)[p].subMenu.some(\n (el: NavInfo) => el.key === key,\n )\n ) {\n isIncludeActivedRoute = true\n }\n }\n\n activedRoute = getRouteInfo((navTree as any)[p], key)\n\n if (activedRoute) {\n if (isIncludeActivedRoute) {\n activedRoute.parentKey = (navTree as any)[p].key\n }\n\n return activedRoute\n }\n }\n }\n return activedRoute\n}\n\nconst findNestedRoute = (navTree: NavigationTree[], key: string): boolean => {\n const found = navTree.find((node) => {\n return node.key === key\n })\n if (found) {\n return true\n }\n return navTree.some((c) => findNestedRoute(c.subMenu, key))\n}\n\nconst getTopRouteKey = (\n navTree: NavigationTree[],\n key: string,\n): NavigationTree => {\n let foundNav = {} as NavigationTree\n navTree.forEach((nav) => {\n if (findNestedRoute([nav], key)) {\n foundNav = nav\n }\n })\n return foundNav\n}\n\nfunction useMenuActive(navTree: NavigationTree[], key: string) {\n const activedRoute = useMemo(() => {\n const route = getRouteInfo(navTree, key)\n return route\n }, [navTree, key])\n\n const includedRouteTree = useMemo(() => {\n const included = getTopRouteKey(navTree, key)\n return included\n }, [navTree, key])\n\n return { activedRoute, includedRouteTree }\n}\n\nexport default useMenuActive\n"],"names":["getRouteInfo","navTree","key","activedRoute","isIncludeActivedRoute","p","isPlainObject","el","findNestedRoute","node","c","getTopRouteKey","foundNav","nav","useMenuActive","useMemo","includedRouteTree"],"mappings":";;AAUA,MAAMA,IAAe,CACjBC,GACAC,MACsB;AACtB,MAAI,CAAC,MAAM,QAAQD,CAAO,KAAKA,EAAQ,QAAQC;AAC3C,WAAOD;AAEX,MAAIE,GACAC,IAAwB;AAC5B,aAAWC,KAAKJ;AACZ,QACII,MAAM;AAAA,IAENJ,EAAQ,eAAeI,CAAC,KACxB,OAAQJ,EAAgBI,CAAC,KAAM,aAG3BC,EAAeL,EAAgBI,CAAC,CAAC,KAChCJ,EAAgBI,CAAC,EAAE,SAAS,SAAS,KAGjCJ,EAAgBI,CAAC,EAAE,QAAQ;AAAA,MACxB,CAACE,MAAgBA,EAAG,QAAQL;AAAA,IAAA,MAGhCE,IAAwB,KAIhCD,IAAeH,EAAcC,EAAgBI,CAAC,GAAGH,CAAG,GAEhDC;AACA,aAAIC,MACAD,EAAa,YAAaF,EAAgBI,CAAC,EAAE,MAG1CF;AAInB,SAAOA;AACX,GAEMK,IAAkB,CAACP,GAA2BC,MAClCD,EAAQ,KAAK,CAACQ,MACjBA,EAAK,QAAQP,CACvB,IAEU,KAEJD,EAAQ,KAAK,CAACS,MAAMF,EAAgBE,EAAE,SAASR,CAAG,CAAC,GAGxDS,IAAiB,CACnBV,GACAC,MACiB;AACjB,MAAIU,IAAW,CAAA;AACf,SAAAX,EAAQ,QAAQ,CAACY,MAAQ;AACrB,IAAIL,EAAgB,CAACK,CAAG,GAAGX,CAAG,MAC1BU,IAAWC;AAAA,EAEnB,CAAC,GACMD;AACX;AAEA,SAASE,EAAcb,GAA2BC,GAAa;AAC3D,QAAMC,IAAeY,EAAQ,MACXf,EAAaC,GAASC,CAAG,GAExC,CAACD,GAASC,CAAG,CAAC,GAEXc,IAAoBD,EAAQ,MACbJ,EAAeV,GAASC,CAAG,GAE7C,CAACD,GAASC,CAAG,CAAC;AAEjB,SAAO,EAAE,cAAAC,GAAc,mBAAAa,EAAA;AAC3B;"}
|
|
@@ -1,57 +1,56 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as h, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F } from "react";
|
|
3
3
|
import "../../../../components/ui/Input/index.js";
|
|
4
4
|
import "../../../../components/ui/Button/index.js";
|
|
5
5
|
import "../../../../components/ui/Form/index.js";
|
|
6
6
|
import { apiForgotPassword as S } from "../../../../services/AuthService.js";
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { zodResolver as
|
|
9
|
-
import { z as
|
|
10
|
-
import { Form as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
15
|
-
email:
|
|
16
|
-
}),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
resolver: E(B)
|
|
7
|
+
import { useForm as b, Controller as E } from "react-hook-form";
|
|
8
|
+
import { zodResolver as w } from "@hookform/resolvers/zod";
|
|
9
|
+
import { z as a } from "zod";
|
|
10
|
+
import { Form as y } from "../../../../components/ui/Form/Form.js";
|
|
11
|
+
import P from "../../../../components/ui/Form/FormItem.js";
|
|
12
|
+
import j from "../../../../components/ui/Input/Input.js";
|
|
13
|
+
import x from "../../../../components/ui/Button/Button.js";
|
|
14
|
+
const z = a.object({
|
|
15
|
+
email: a.string().email().min(5)
|
|
16
|
+
}), L = (s) => {
|
|
17
|
+
const [i, r] = F(!1), { className: n, setMessage: l, setEmailSent: c, emailSent: p, children: d } = s, {
|
|
18
|
+
handleSubmit: f,
|
|
19
|
+
formState: { errors: m },
|
|
20
|
+
control: u
|
|
21
|
+
} = b({
|
|
22
|
+
resolver: w(z)
|
|
24
23
|
});
|
|
25
|
-
return /* @__PURE__ */ o("div", { className:
|
|
26
|
-
const { email:
|
|
24
|
+
return /* @__PURE__ */ o("div", { className: n, children: p ? /* @__PURE__ */ o(v, { children: d }) : /* @__PURE__ */ h(y, { onSubmit: f(async (e) => {
|
|
25
|
+
const { email: g } = e;
|
|
27
26
|
r(!0);
|
|
28
27
|
try {
|
|
29
|
-
await S({ email:
|
|
30
|
-
} catch (
|
|
31
|
-
|
|
32
|
-
typeof
|
|
28
|
+
await S({ email: g }) && (r(!1), c?.(!0));
|
|
29
|
+
} catch (t) {
|
|
30
|
+
l?.(
|
|
31
|
+
typeof t == "string" ? t : "Erro ao enviar email."
|
|
33
32
|
), r(!1);
|
|
34
33
|
}
|
|
35
34
|
r(!1);
|
|
36
35
|
}), children: [
|
|
37
36
|
/* @__PURE__ */ o(
|
|
38
|
-
|
|
37
|
+
P,
|
|
39
38
|
{
|
|
40
39
|
label: "Email",
|
|
41
|
-
invalid: !!
|
|
42
|
-
errorMessage:
|
|
40
|
+
invalid: !!m.email,
|
|
41
|
+
errorMessage: m.email?.message,
|
|
43
42
|
children: /* @__PURE__ */ o(
|
|
44
|
-
|
|
43
|
+
E,
|
|
45
44
|
{
|
|
46
45
|
name: "email",
|
|
47
|
-
control:
|
|
48
|
-
render: ({ field:
|
|
49
|
-
|
|
46
|
+
control: u,
|
|
47
|
+
render: ({ field: e }) => /* @__PURE__ */ o(
|
|
48
|
+
j,
|
|
50
49
|
{
|
|
51
50
|
type: "email",
|
|
52
51
|
placeholder: "Email",
|
|
53
52
|
autoComplete: "off",
|
|
54
|
-
...
|
|
53
|
+
...e
|
|
55
54
|
}
|
|
56
55
|
)
|
|
57
56
|
}
|
|
@@ -59,19 +58,19 @@ const B = l.object({
|
|
|
59
58
|
}
|
|
60
59
|
),
|
|
61
60
|
/* @__PURE__ */ o(
|
|
62
|
-
|
|
61
|
+
x,
|
|
63
62
|
{
|
|
64
63
|
block: !0,
|
|
65
|
-
loading:
|
|
64
|
+
loading: i,
|
|
66
65
|
variant: "solid",
|
|
67
66
|
type: "submit",
|
|
68
67
|
className: "mt-5",
|
|
69
|
-
children:
|
|
68
|
+
children: i ? "Enviando..." : "Enviar"
|
|
70
69
|
}
|
|
71
70
|
)
|
|
72
71
|
] }) });
|
|
73
72
|
};
|
|
74
73
|
export {
|
|
75
|
-
|
|
74
|
+
L as default
|
|
76
75
|
};
|
|
77
76
|
//# sourceMappingURL=ForgotPasswordForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Input from '@/components/ui/Input'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport { apiForgotPassword } from '@/services/AuthService'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\nimport type { CommonProps } from '@/@types/common'\n\ninterface ForgotPasswordFormProps extends CommonProps {\n emailSent: boolean\n setEmailSent?: (compplete: boolean) => void\n setMessage?: (message: string) => void\n}\n\ntype ForgotPasswordFormSchema = {\n email: string\n}\n\nconst validationSchema: ZodType<ForgotPasswordFormSchema> = z.object({\n email: z.string().email().min(5),\n})\n\nconst ForgotPasswordForm = (props: ForgotPasswordFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false)\n\n const { className, setMessage, setEmailSent, emailSent, children } = props\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ForgotPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const onForgotPassword = async (values: ForgotPasswordFormSchema) => {\n const { email } = values\n\n setSubmitting(true)\n\n try {\n const resp = await apiForgotPassword<boolean>({ email })\n if (resp) {\n setSubmitting(false)\n setEmailSent?.(true)\n }\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Erro ao enviar email.',\n )\n setSubmitting(false)\n }\n\n setSubmitting(false)\n }\n\n return (\n <div className={className}>\n {!emailSent ? (\n <Form onSubmit={handleSubmit(onForgotPassword)}>\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 placeholder=\"Email\"\n autoComplete=\"off\"\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n className=\"mt-5\"\n >\n {isSubmitting ? 'Enviando...' : 'Enviar'}\n </Button>\n </Form>\n ) : (\n <>{children}</>\n )}\n </div>\n )\n}\n\nexport default ForgotPasswordForm\n"],"names":["validationSchema","z","ForgotPasswordForm","props","isSubmitting","setSubmitting","useState","className","setMessage","setEmailSent","emailSent","children","handleSubmit","errors","control","useForm","zodResolver","jsx","Fragment","Form","values","email","apiForgotPassword","FormItem","
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Input from '@/components/ui/Input'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport { apiForgotPassword } from '@/services/AuthService'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\nimport type { CommonProps } from '@/@types/common'\n\ninterface ForgotPasswordFormProps extends CommonProps {\n emailSent: boolean\n setEmailSent?: (compplete: boolean) => void\n setMessage?: (message: string) => void\n}\n\ntype ForgotPasswordFormSchema = {\n email: string\n}\n\nconst validationSchema: ZodType<ForgotPasswordFormSchema> = z.object({\n email: z.string().email().min(5),\n})\n\nconst ForgotPasswordForm = (props: ForgotPasswordFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false)\n\n const { className, setMessage, setEmailSent, emailSent, children } = props\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ForgotPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const onForgotPassword = async (values: ForgotPasswordFormSchema) => {\n const { email } = values\n\n setSubmitting(true)\n\n try {\n const resp = await apiForgotPassword<boolean>({ email })\n if (resp) {\n setSubmitting(false)\n setEmailSent?.(true)\n }\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Erro ao enviar email.',\n )\n setSubmitting(false)\n }\n\n setSubmitting(false)\n }\n\n return (\n <div className={className}>\n {!emailSent ? (\n <Form onSubmit={handleSubmit(onForgotPassword)}>\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 placeholder=\"Email\"\n autoComplete=\"off\"\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n className=\"mt-5\"\n >\n {isSubmitting ? 'Enviando...' : 'Enviar'}\n </Button>\n </Form>\n ) : (\n <>{children}</>\n )}\n </div>\n )\n}\n\nexport default ForgotPasswordForm\n"],"names":["validationSchema","z","ForgotPasswordForm","props","isSubmitting","setSubmitting","useState","className","setMessage","setEmailSent","emailSent","children","handleSubmit","errors","control","useForm","zodResolver","jsx","Fragment","Form","values","email","apiForgotPassword","FormItem","Controller","field","Input","Button"],"mappings":";;;;;;;;;;;;;AAqBA,MAAMA,IAAsDC,EAAE,OAAO;AAAA,EACjE,OAAOA,EAAE,OAAA,EAAS,MAAA,EAAQ,IAAI,CAAC;AACnC,CAAC,GAEKC,IAAqB,CAACC,MAAmC;AAC3D,QAAM,CAACC,GAAcC,CAAa,IAAIC,EAAkB,EAAK,GAEvD,EAAE,WAAAC,GAAW,YAAAC,GAAY,cAAAC,GAAc,WAAAC,GAAW,UAAAC,MAAaR,GAE/D;AAAA,IACF,cAAAS;AAAA,IACA,WAAW,EAAE,QAAAC,EAAA;AAAA,IACb,SAAAC;AAAA,EAAA,IACAC,EAAkC;AAAA,IAClC,UAAUC,EAAYhB,CAAgB;AAAA,EAAA,CACzC;AAuBD,SACI,gBAAAiB,EAAC,OAAA,EAAI,WAAAV,GACA,UAACG,IA+BE,gBAAAO,EAAAC,GAAA,EAAG,UAAAP,EAAA,CAAS,sBA9BXQ,GAAA,EAAK,UAAUP,EAxBH,OAAOQ,MAAqC;AACjE,UAAM,EAAE,OAAAC,MAAUD;AAElB,IAAAf,EAAc,EAAI;AAElB,QAAI;AAEA,MADa,MAAMiB,EAA2B,EAAE,OAAAD,GAAO,MAEnDhB,EAAc,EAAK,GACnBI,IAAe,EAAI;AAAA,IAE3B,SAASI,GAAQ;AACb,MAAAL;AAAA,QACI,OAAOK,KAAW,WAAWA,IAAS;AAAA,MAAA,GAE1CR,EAAc,EAAK;AAAA,IACvB;AAEA,IAAAA,EAAc,EAAK;AAAA,EACvB,CAKyD,GACzC,UAAA;AAAA,IAAA,gBAAAY;AAAA,MAACM;AAAA,MAAA;AAAA,QACG,OAAM;AAAA,QACN,SAAS,EAAQV,EAAO;AAAA,QACxB,cAAcA,EAAO,OAAO;AAAA,QAE5B,UAAA,gBAAAI;AAAA,UAACO;AAAA,UAAA;AAAA,YACG,MAAK;AAAA,YACL,SAAAV;AAAA,YACA,QAAQ,CAAC,EAAE,OAAAW,EAAA,MACP,gBAAAR;AAAA,cAACS;AAAA,cAAA;AAAA,gBACG,MAAK;AAAA,gBACL,aAAY;AAAA,gBACZ,cAAa;AAAA,gBACZ,GAAGD;AAAA,cAAA;AAAA,YAAA;AAAA,UACR;AAAA,QAAA;AAAA,MAER;AAAA,IAAA;AAAA,IAEJ,gBAAAR;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAK;AAAA,QACL,SAASvB;AAAA,QACT,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAET,cAAe,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,EAAA,CACJ,EAEY,CAEpB;AAER;"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../../components/ui/Alert/index.js";
|
|
3
3
|
import d from "./components/OtpVerificationForm.js";
|
|
4
4
|
import p from "../../../utils/sleep.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import t from "../../../utils/hooks/useTimeOutMessage.js";
|
|
6
|
+
import r from "../../../components/ui/Alert/Alert.js";
|
|
7
7
|
const h = () => {
|
|
8
|
-
const [a, l] =
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
8
|
+
const [a, l] = t(), [n, m] = t(), [i, o] = t();
|
|
9
|
+
return /* @__PURE__ */ s("div", { children: [
|
|
10
|
+
/* @__PURE__ */ s("div", { className: "mb-8", children: [
|
|
11
11
|
/* @__PURE__ */ e("h3", { className: "mb-2", children: "OTP Verification" }),
|
|
12
12
|
/* @__PURE__ */ e("p", { className: "font-semibold heading-text", children: "We have sent you One Time Password to your email." })
|
|
13
13
|
] }),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
a && /* @__PURE__ */ e(
|
|
14
|
+
i && /* @__PURE__ */ e(r, { showIcon: !0, className: "mb-4", type: "danger", children: /* @__PURE__ */ e("span", { className: "break-all", children: i }) }),
|
|
15
|
+
n && /* @__PURE__ */ e(r, { showIcon: !0, className: "mb-4", type: "info", children: /* @__PURE__ */ e("span", { className: "break-all", children: n }) }),
|
|
16
|
+
a && /* @__PURE__ */ e(r, { showIcon: !0, className: "mb-4", type: "success", children: /* @__PURE__ */ e("span", { className: "break-all", children: a }) }),
|
|
17
17
|
/* @__PURE__ */ e(
|
|
18
18
|
d,
|
|
19
19
|
{
|
|
20
|
-
setMessage:
|
|
20
|
+
setMessage: o,
|
|
21
21
|
setOtpVerified: l
|
|
22
22
|
}
|
|
23
23
|
),
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ s("div", { className: "mt-4 text-center", children: [
|
|
25
25
|
/* @__PURE__ */ e("span", { className: "font-semibold", children: "Din't receive OTP? " }),
|
|
26
26
|
/* @__PURE__ */ e(
|
|
27
27
|
"button",
|
|
@@ -31,7 +31,7 @@ const h = () => {
|
|
|
31
31
|
try {
|
|
32
32
|
await p(500), m("We have sent you One Time Password.");
|
|
33
33
|
} catch (c) {
|
|
34
|
-
|
|
34
|
+
o?.(
|
|
35
35
|
typeof c == "string" ? c : "Some error occured!"
|
|
36
36
|
);
|
|
37
37
|
}
|
|
@@ -41,9 +41,9 @@ const h = () => {
|
|
|
41
41
|
)
|
|
42
42
|
] })
|
|
43
43
|
] });
|
|
44
|
-
},
|
|
44
|
+
}, v = () => /* @__PURE__ */ e(h, {});
|
|
45
45
|
export {
|
|
46
46
|
h as OtpVerificationBase,
|
|
47
|
-
|
|
47
|
+
v as default
|
|
48
48
|
};
|
|
49
49
|
//# sourceMappingURL=OtpVerification.js.map
|