@ebubekirylmaz/link-test 1.0.0
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/.babelrc +3 -0
- package/.browserslistrc +1 -0
- package/.env +2 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +58 -0
- package/.gitattributes +1 -0
- package/.github/workflows/publish.yml +66 -0
- package/.prettierignore +1 -0
- package/.prettierrc +10 -0
- package/.storybook/main.js +15 -0
- package/.storybook/preview.js +17 -0
- package/.storybook/vitest.setup.js +6 -0
- package/README.md +1 -0
- package/cypress.config.js +11 -0
- package/index.js +1 -0
- package/package.json +111 -0
- package/project/.eslintrc.cjs +22 -0
- package/project/config.js +18 -0
- package/project/config.menu.js +39 -0
- package/project/config.template.js +31 -0
- package/project/cypress/e2e/layouts.cy.js +170 -0
- package/project/cypress/e2e/login.cy.js +35 -0
- package/project/cypress/e2e/selectbar.cy.js +80 -0
- package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +39 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +51 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +9 -0
- package/project/cypress/fixtures/OAUTH/GITHUB/user.json +46 -0
- package/project/cypress/fixtures/example.json +5 -0
- package/project/cypress/support/commands.js +104 -0
- package/project/cypress/support/e2e.js +1 -0
- package/project/cypress.config.js +10 -0
- package/project/index.html +12 -0
- package/project/media/ProjectIcons/3d.png +0 -0
- package/project/media/ProjectIcons/box.png +0 -0
- package/project/media/ProjectIcons/cafe.png +0 -0
- package/project/media/ProjectIcons/cargo.png +0 -0
- package/project/media/ProjectIcons/cloud.png +0 -0
- package/project/media/ProjectIcons/code.png +0 -0
- package/project/media/ProjectIcons/company.png +0 -0
- package/project/media/ProjectIcons/conversation.png +0 -0
- package/project/media/ProjectIcons/distributed.png +0 -0
- package/project/media/ProjectIcons/fingerprint.png +0 -0
- package/project/media/ProjectIcons/forest.png +0 -0
- package/project/media/ProjectIcons/headphones.png +0 -0
- package/project/media/ProjectIcons/office.png +0 -0
- package/project/media/ProjectIcons/path.png +0 -0
- package/project/media/ProjectIcons/printer.png +0 -0
- package/project/media/ProjectIcons/project.png +0 -0
- package/project/media/ProjectIcons/resume.png +0 -0
- package/project/media/ProjectIcons/rocket.png +0 -0
- package/project/media/ProjectIcons/rtruck.png +0 -0
- package/project/media/ProjectIcons/sign.png +0 -0
- package/project/media/ProjectIcons/site.png +0 -0
- package/project/media/ProjectIcons/truck.png +0 -0
- package/project/media/logo.png +0 -0
- package/project/package-lock.json +22434 -0
- package/project/package.json +42 -0
- package/project/public/assets/background/overlay_2.jpg +0 -0
- package/project/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/project/public/media/largeLogo.png +0 -0
- package/project/public/media/logo.png +0 -0
- package/project/public/vite.svg +1 -0
- package/project/routes.jsx +47 -0
- package/project/server/mock.json +110 -0
- package/project/server/oauthMock.js +27 -0
- package/project/server/package-lock.json +1505 -0
- package/project/server/package.json +20 -0
- package/project/server/server.js +127 -0
- package/project/src/Container.jsx +7 -0
- package/project/src/components/ActionButton.jsx +18 -0
- package/project/src/hooks/useEmperor.jsx +21 -0
- package/project/src/http/index.js +39 -0
- package/project/src/main.jsx +10 -0
- package/project/src/pages/Battles.jsx +16 -0
- package/project/src/pages/Emperor.jsx +50 -0
- package/project/src/pages/index.jsx +33 -0
- package/project/src/theme.js +151 -0
- package/project/src/widgets/ActionButton.jsx +68 -0
- package/project/src/widgets/AddNewEmperor.jsx +120 -0
- package/project/src/widgets/ProjectContainer.jsx +27 -0
- package/project/vite.config.js +6 -0
- package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +341 -0
- package/public/assets/background/overlay_2.jpg +0 -0
- package/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/public/vite.svg +1 -0
- package/src/ContextProvider/ContextProvider.jsx +19 -0
- package/src/GlobalSnackMessage/GlobalSnackMessage.jsx +45 -0
- package/src/GlobalSnackMessage/index.js +1 -0
- package/src/GlobalSnackMessage/styles.js +3 -0
- package/src/Platform.jsx +76 -0
- package/src/RouteManager/RouteManager.jsx +56 -0
- package/src/RouteManager/index.js +1 -0
- package/src/assets/illustrations/avatar-shape.jsx +31 -0
- package/src/assets/illustrations/background-shape.jsx +37 -0
- package/src/assets/illustrations/booking-illustration.jsx +335 -0
- package/src/assets/illustrations/check-in-illustration.jsx +96 -0
- package/src/assets/illustrations/check-out-illustration.jsx +69 -0
- package/src/assets/illustrations/coming-soon-illustration.jsx +125 -0
- package/src/assets/illustrations/forbidden-illustration.jsx +95 -0
- package/src/assets/illustrations/index.js +2 -0
- package/src/assets/illustrations/maintenance-illustration.jsx +228 -0
- package/src/assets/illustrations/motivation-illustration.jsx +74 -0
- package/src/assets/illustrations/order-complete-illustration.jsx +126 -0
- package/src/assets/illustrations/page-not-found-illustration.jsx +81 -0
- package/src/assets/illustrations/seo-illustration.jsx +244 -0
- package/src/assets/illustrations/sever-error-illustration.jsx +152 -0
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +161 -0
- package/src/assets/illustrations/upload-illustration.jsx +622 -0
- package/src/components/Iconify/Iconify.jsx +18 -0
- package/src/components/Iconify/index.js +1 -0
- package/src/components/MiniTopBar/MiniTopBar.jsx +25 -0
- package/src/components/MiniTopBar/index.js +1 -0
- package/src/components/MiniTopBar/styles.js +6 -0
- package/src/components/NucleoidLoginForm/NucleoidLoginForm.jsx +69 -0
- package/src/components/NucleoidLoginForm/index.js +1 -0
- package/src/components/NucleoidLoginForm/styles.js +3 -0
- package/src/components/Sidebar/Sidebar.jsx +76 -0
- package/src/components/Sidebar/index.js +1 -0
- package/src/components/Sidebar/styles.js +25 -0
- package/src/components/SocialLoginButtons/SocialLoginButtons.jsx +55 -0
- package/src/components/SocialLoginButtons/index.js +1 -0
- package/src/components/SocialLoginButtons/styles.js +3 -0
- package/src/components/TopNavBar/TopNavBar.jsx +186 -0
- package/src/components/TopNavBar/index.js +1 -0
- package/src/components/TopNavBar/styles.js +7 -0
- package/src/components/animate/index.js +4 -0
- package/src/components/animate/motion-container.jsx +38 -0
- package/src/components/animate/motion-lazy.jsx +11 -0
- package/src/components/animate/motion-viewport.jsx +30 -0
- package/src/components/animate/variants/actions.js +4 -0
- package/src/components/animate/variants/background.js +97 -0
- package/src/components/animate/variants/bounce.js +107 -0
- package/src/components/animate/variants/container.js +20 -0
- package/src/components/animate/variants/fade.js +127 -0
- package/src/components/animate/variants/flip.js +54 -0
- package/src/components/animate/variants/index.js +12 -0
- package/src/components/animate/variants/path.js +12 -0
- package/src/components/animate/variants/rotate.js +33 -0
- package/src/components/animate/variants/scale.js +54 -0
- package/src/components/animate/variants/slide.js +65 -0
- package/src/components/animate/variants/transition.js +20 -0
- package/src/components/animate/variants/zoom.js +130 -0
- package/src/components/chart/chart.js +69 -0
- package/src/components/chart/index.js +5 -0
- package/src/components/chart/use-chart.js +215 -0
- package/src/components/custom-popover/custom-popover.jsx +46 -0
- package/src/components/custom-popover/index.js +3 -0
- package/src/components/custom-popover/styles.js +84 -0
- package/src/components/custom-popover/use-popover.js +22 -0
- package/src/components/custom-popover/utils.js +100 -0
- package/src/components/file-thumbnail/download-button.jsx +39 -0
- package/src/components/file-thumbnail/file-thumbnail.jsx +72 -0
- package/src/components/file-thumbnail/index.js +5 -0
- package/src/components/file-thumbnail/utils.js +148 -0
- package/src/components/image/image.jsx +119 -0
- package/src/components/image/index.js +1 -0
- package/src/components/image/utils.js +15 -0
- package/src/components/label/index.js +1 -0
- package/src/components/label/label.jsx +51 -0
- package/src/components/label/styles.js +78 -0
- package/src/components/loading-screen/index.js +2 -0
- package/src/components/loading-screen/loading-screen.jsx +23 -0
- package/src/components/loading-screen/splash-screen.jsx +95 -0
- package/src/components/logo/index.js +1 -0
- package/src/components/logo/logo.jsx +61 -0
- package/src/components/logo/styles.js +17 -0
- package/src/components/nav-section/horizontal/index.js +1 -0
- package/src/components/nav-section/horizontal/nav-item.jsx +224 -0
- package/src/components/nav-section/horizontal/nav-list.jsx +113 -0
- package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +41 -0
- package/src/components/nav-section/index.js +3 -0
- package/src/components/nav-section/mini/index.js +1 -0
- package/src/components/nav-section/mini/nav-item.jsx +242 -0
- package/src/components/nav-section/mini/nav-list.jsx +107 -0
- package/src/components/nav-section/mini/nav-section-mini.jsx +35 -0
- package/src/components/nav-section/vertical/index.js +1 -0
- package/src/components/nav-section/vertical/nav-item.jsx +294 -0
- package/src/components/nav-section/vertical/nav-list.jsx +66 -0
- package/src/components/nav-section/vertical/nav-section-vertical.jsx +74 -0
- package/src/components/scrollbar/index.js +1 -0
- package/src/components/scrollbar/scrollbar.jsx +39 -0
- package/src/components/scrollbar/styles.js +27 -0
- package/src/components/search-not-found/index.js +1 -0
- package/src/components/search-not-found/search-not-found.jsx +29 -0
- package/src/components/settings/context/index.js +2 -0
- package/src/components/settings/context/settings-context.js +14 -0
- package/src/components/settings/context/settings-provider.jsx +46 -0
- package/src/components/settings/drawer/base-option.jsx +52 -0
- package/src/components/settings/drawer/fullscreen-option.jsx +58 -0
- package/src/components/settings/drawer/index.js +1 -0
- package/src/components/settings/drawer/layout-options.jsx +144 -0
- package/src/components/settings/drawer/presets-options.jsx +53 -0
- package/src/components/settings/drawer/settings-drawer.jsx +189 -0
- package/src/components/settings/drawer/stretch-options.jsx +67 -0
- package/src/components/settings/index.js +3 -0
- package/src/components/svg-color/index.js +1 -0
- package/src/components/svg-color/svg-color.jsx +23 -0
- package/src/config/config.js +48 -0
- package/src/config/schemas.js +148 -0
- package/src/context/reducer.js +52 -0
- package/src/global.css +2 -0
- package/src/hooks/index.js +2 -0
- package/src/hooks/use-boolean.js +27 -0
- package/src/hooks/use-event-listener.js +34 -0
- package/src/hooks/use-local-storage.js +89 -0
- package/src/hooks/use-off-set-top.js +37 -0
- package/src/hooks/use-responsive.js +47 -0
- package/src/hooks/use-scroll-to-top.js +14 -0
- package/src/hooks/use-user.js +58 -0
- package/src/hooks/useApi.js +25 -0
- package/src/hooks/useItemsState.js +23 -0
- package/src/hooks/useProjects.js +24 -0
- package/src/hooks/useSettings.jsx +51 -0
- package/src/http/index.js +155 -0
- package/src/http/oauth.js +27 -0
- package/src/http/user.js +110 -0
- package/src/layouts/AppLayout.jsx +113 -0
- package/src/layouts/CompactLayout/CompactLayout.jsx +32 -0
- package/src/layouts/CompactLayout/index.js +1 -0
- package/src/layouts/DashboardLayout/DashboardLayout.jsx +87 -0
- package/src/layouts/DashboardLayout/config-navigation.jsx +0 -0
- package/src/layouts/DashboardLayout/header.jsx +104 -0
- package/src/layouts/DashboardLayout/index.js +2 -0
- package/src/layouts/DashboardLayout/main.jsx +64 -0
- package/src/layouts/DashboardLayout/nav-horizontal.jsx +62 -0
- package/src/layouts/DashboardLayout/nav-mini.jsx +99 -0
- package/src/layouts/DashboardLayout/nav-vertical.jsx +201 -0
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +101 -0
- package/src/layouts/FullScreenLayout/index.js +1 -0
- package/src/layouts/FullScreenLayout/nav-horizontal.jsx +50 -0
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +136 -0
- package/src/layouts/MainLayout/MainLayout.jsx +21 -0
- package/src/layouts/MainLayout/footer.jsx +153 -0
- package/src/layouts/MainLayout/header.jsx +81 -0
- package/src/layouts/MainLayout/index.js +1 -0
- package/src/layouts/MainLayout/nav/desktop/index.jsx +20 -0
- package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +186 -0
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +145 -0
- package/src/layouts/MainLayout/nav/mobile/index.jsx +60 -0
- package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +90 -0
- package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +72 -0
- package/src/layouts/Page.jsx +16 -0
- package/src/layouts/SimpleLayout/SimpleLayout.jsx +8 -0
- package/src/layouts/SimpleLayout/index.js +1 -0
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +31 -0
- package/src/layouts/TwoSideLayout/index.js +1 -0
- package/src/layouts/auth/classic.jsx +95 -0
- package/src/layouts/auth/modern-compact.jsx +51 -0
- package/src/layouts/auth/modern.jsx +94 -0
- package/src/layouts/common/ProjectBar/index.jsx +325 -0
- package/src/layouts/common/ProjectBar/result-item.jsx +90 -0
- package/src/layouts/common/ProjectBar/utils.js +86 -0
- package/src/layouts/common/account-popover.jsx +116 -0
- package/src/layouts/common/header-shadow.jsx +26 -0
- package/src/layouts/common/header-sim.jsx +52 -0
- package/src/layouts/common/header-simple.jsx +76 -0
- package/src/layouts/common/nav-toggle-button.jsx +57 -0
- package/src/layouts/common/notifications-popover/index.jsx +177 -0
- package/src/layouts/common/notifications-popover/notification-item.jsx +252 -0
- package/src/layouts/common/settings-button.jsx +48 -0
- package/src/layouts/config-layout.js +12 -0
- package/src/layouts/index.js +7 -0
- package/src/lib/AddItemWizard/AddItemWizard.jsx +211 -0
- package/src/lib/AddItemWizard/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +88 -0
- package/src/lib/CustomBreadcrumbs/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/link-item.jsx +58 -0
- package/src/lib/CustomPopover/CustomPopover.jsx +46 -0
- package/src/lib/CustomPopover/index.js +3 -0
- package/src/lib/CustomPopover/styles.js +82 -0
- package/src/lib/CustomPopover/usePopover.js +20 -0
- package/src/lib/CustomPopover/utils.js +100 -0
- package/src/lib/Flow/connectors/DynamicConnector.jsx +247 -0
- package/src/lib/Flow/core/Flow.jsx +79 -0
- package/src/lib/Flow/core/FlowNode.jsx +68 -0
- package/src/lib/Flow/core/FlowViewport.jsx +259 -0
- package/src/lib/Flow/graph/FloatingGraph.jsx +44 -0
- package/src/lib/Flow/hooks/useGraphOperations.js +362 -0
- package/src/lib/Flow/hooks/useNodeStyle.js +56 -0
- package/src/lib/Flow/index.js +1 -0
- package/src/lib/Flow/layouts/ActionNode.jsx +78 -0
- package/src/lib/Flow/layouts/AnimatedNode.jsx +22 -0
- package/src/lib/Flow/layouts/CardLayout.jsx +397 -0
- package/src/lib/Flow/layouts/InfoNode.jsx +255 -0
- package/src/lib/Flow/layouts/LoadingNode.jsx +37 -0
- package/src/lib/Flow/nodes/DefaultCard.jsx +107 -0
- package/src/lib/Flow/nodes/DraggableNode.jsx +162 -0
- package/src/lib/Flow/nodes/FlowNodeView.jsx +214 -0
- package/src/lib/Flow/selection/SelectionContext.jsx +259 -0
- package/src/lib/Flow/selection/SelectionOverlay.jsx +31 -0
- package/src/lib/Flow/styles.js +154 -0
- package/src/lib/Flow/utils/flowUtils.js +268 -0
- package/src/lib/FormProvider/FormProvider.jsx +16 -0
- package/src/lib/FormProvider/index.js +1 -0
- package/src/lib/IconSelector/IconSelector.jsx +89 -0
- package/src/lib/Iconify/Iconify.jsx +17 -0
- package/src/lib/Iconify/index.js +1 -0
- package/src/lib/Image/Image.jsx +116 -0
- package/src/lib/Image/index.js +1 -0
- package/src/lib/Image/utils.js +15 -0
- package/src/lib/ItemSummary/ItemSummary.jsx +77 -0
- package/src/lib/ItemSummary/ItemsSummary.jsx +163 -0
- package/src/lib/Label/Label.jsx +51 -0
- package/src/lib/Label/index.js +1 -0
- package/src/lib/Label/styles.js +76 -0
- package/src/lib/ProjectWizard.jsx +137 -0
- package/src/lib/RHFTextfield/RHFTextfield.jsx +39 -0
- package/src/lib/RHFTextfield/index.js +1 -0
- package/src/lib/Scrollbar/Scrollbar.jsx +39 -0
- package/src/lib/Scrollbar/index.js +1 -0
- package/src/lib/Scrollbar/styles.js +27 -0
- package/src/lib/SearchNotFound/SearchNotFound.jsx +29 -0
- package/src/lib/SearchNotFound/index.js +1 -0
- package/src/lib/SparkleInput/SparkleInput.jsx +51 -0
- package/src/lib/StepComponent/StepComponent.jsx +98 -0
- package/src/lib/SvgColor/SvgColor.jsx +28 -0
- package/src/lib/SvgColor/index.js +1 -0
- package/src/lib/TableHeadCustom/TableHeadCustom.jsx +87 -0
- package/src/lib/TableHeadCustom/index.js +1 -0
- package/src/lib/TableSelectedAction/TableSelectedAction.jsx +72 -0
- package/src/lib/TableSelectedAction/index.js +1 -0
- package/src/lib/index.js +36 -0
- package/src/lib/lib/Icons.js +40 -0
- package/src/lib/lib/context.json +272 -0
- package/src/lib/useChart/useChart.js +179 -0
- package/src/lib/useTable/useTable.js +121 -0
- package/src/pages/404.jsx +17 -0
- package/src/pages/Callback.jsx +126 -0
- package/src/pages/ConfigError.jsx +49 -0
- package/src/pages/LoginPage.jsx +43 -0
- package/src/routes/components/index.js +1 -0
- package/src/routes/components/router-link.jsx +11 -0
- package/src/routes/hooks/index.js +4 -0
- package/src/routes/hooks/use-active-link.js +15 -0
- package/src/routes/hooks/use-pathname.js +10 -0
- package/src/routes/hooks/use-router.js +21 -0
- package/src/stories/FlowChart.stories.jsx +333 -0
- package/src/stories/Iconify.stories.jsx +183 -0
- package/src/stories/Label.stories.jsx +447 -0
- package/src/stories/Navbar.stories.jsx +588 -0
- package/src/theme/css.js +152 -0
- package/src/theme/custom-shadows.js +47 -0
- package/src/theme/index.jsx +100 -0
- package/src/theme/options/contrast.js +34 -0
- package/src/theme/options/presets.js +89 -0
- package/src/theme/options/right-to-left.jsx +26 -0
- package/src/theme/overrides/components/accordion.js +43 -0
- package/src/theme/overrides/components/alert.js +69 -0
- package/src/theme/overrides/components/appbar.js +13 -0
- package/src/theme/overrides/components/autocomplete.js +44 -0
- package/src/theme/overrides/components/avatar.js +111 -0
- package/src/theme/overrides/components/backdrop.js +18 -0
- package/src/theme/overrides/components/badge.js +90 -0
- package/src/theme/overrides/components/breadcrumbs.js +21 -0
- package/src/theme/overrides/components/button-group.js +90 -0
- package/src/theme/overrides/components/button.js +145 -0
- package/src/theme/overrides/components/card.js +30 -0
- package/src/theme/overrides/components/checkbox.js +13 -0
- package/src/theme/overrides/components/chip.js +129 -0
- package/src/theme/overrides/components/css-baseline.js +48 -0
- package/src/theme/overrides/components/data-grid.js +94 -0
- package/src/theme/overrides/components/date-picker.jsx +94 -0
- package/src/theme/overrides/components/dialog.js +49 -0
- package/src/theme/overrides/components/drawer.js +39 -0
- package/src/theme/overrides/components/fab.js +165 -0
- package/src/theme/overrides/components/list.js +33 -0
- package/src/theme/overrides/components/loading-button.js +30 -0
- package/src/theme/overrides/components/menu.js +15 -0
- package/src/theme/overrides/components/pagination.js +81 -0
- package/src/theme/overrides/components/paper.js +18 -0
- package/src/theme/overrides/components/popover.js +20 -0
- package/src/theme/overrides/components/progress.js +40 -0
- package/src/theme/overrides/components/radio.js +22 -0
- package/src/theme/overrides/components/rating.js +40 -0
- package/src/theme/overrides/components/select.js +26 -0
- package/src/theme/overrides/components/skeleton.js +16 -0
- package/src/theme/overrides/components/slider.js +30 -0
- package/src/theme/overrides/components/stepper.js +13 -0
- package/src/theme/overrides/components/svg-icon.js +15 -0
- package/src/theme/overrides/components/switch.js +66 -0
- package/src/theme/overrides/components/table.js +79 -0
- package/src/theme/overrides/components/tabs.js +39 -0
- package/src/theme/overrides/components/textfield.js +146 -0
- package/src/theme/overrides/components/timeline.js +20 -0
- package/src/theme/overrides/components/toggle-button.js +70 -0
- package/src/theme/overrides/components/tooltip.js +18 -0
- package/src/theme/overrides/components/tree-view.js +16 -0
- package/src/theme/overrides/components/typography.js +16 -0
- package/src/theme/overrides/default-props.jsx +238 -0
- package/src/theme/overrides/index.js +100 -0
- package/src/theme/palette.js +144 -0
- package/src/theme/shadows.js +41 -0
- package/src/theme/typography.js +107 -0
- package/src/utils/flatten-array.js +16 -0
- package/src/utils/format-number.js +37 -0
- package/src/utils/format-time.js +27 -0
- package/src/utils/storage-available.js +24 -0
- package/src/widgets/Login/CognitoLogin.jsx +43 -0
- package/src/widgets/Login/Login.jsx +58 -0
- package/src/widgets/Login/cognitoAuth.jsx +26 -0
- package/src/widgets/LoginForm/LoginForm.jsx +87 -0
- package/src/widgets/LoginForm/LoginFormStyles.js +43 -0
- package/src/widgets/LoginForm/index.js +1 -0
- package/src/widgets/SettingsDialog.jsx +308 -0
- package/src/widgets/error/index.js +1 -0
- package/src/widgets/error/not-found-view.jsx +42 -0
- package/vite/vite.js +77 -0
- package/vite.config.js +7 -0
- package/vitest.config.js +32 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const Icons = [
|
|
2
|
+
{
|
|
3
|
+
id: "project_icons",
|
|
4
|
+
name: "Project Icons",
|
|
5
|
+
emojis: [
|
|
6
|
+
"solar/book-2-line-duotone",
|
|
7
|
+
"solar/chat-square-2-line-duotone",
|
|
8
|
+
"solar/chat-square-code-line-duotone",
|
|
9
|
+
"solar/cpu-line-duotone",
|
|
10
|
+
].map((icon) => ({
|
|
11
|
+
id: icon,
|
|
12
|
+
skins: [
|
|
13
|
+
{
|
|
14
|
+
src: `https://api.iconify.design/${icon}.svg?color=%232065d1&width=75&height=75'`,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
})),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "service_icons",
|
|
21
|
+
name: "Service Icons",
|
|
22
|
+
emojis: [
|
|
23
|
+
"solar/asteroid-line-duotone",
|
|
24
|
+
"solar/atom-line-duotone",
|
|
25
|
+
"solar/accessibility-line-duotone",
|
|
26
|
+
"solar/backpack-line-duotone",
|
|
27
|
+
"solar/battery-charge-line-duotone",
|
|
28
|
+
"solar/black-hole-3-line-duotone",
|
|
29
|
+
].map((icon) => ({
|
|
30
|
+
id: icon,
|
|
31
|
+
skins: [
|
|
32
|
+
{
|
|
33
|
+
src: `https://api.iconify.design/${icon}.svg?color=%232065d1&width=75&height=75'`,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
})),
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export default Icons;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
{
|
|
2
|
+
"context": {
|
|
3
|
+
"nucleoid": {
|
|
4
|
+
"api": [
|
|
5
|
+
{
|
|
6
|
+
"path": "/",
|
|
7
|
+
"method": "GET",
|
|
8
|
+
"params": [
|
|
9
|
+
{
|
|
10
|
+
"name": "example",
|
|
11
|
+
"in": "query",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"required": false,
|
|
14
|
+
"description": "example"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"response": "object",
|
|
18
|
+
"x-nuc-action": "function action(req: any): { message: string } {\n return { message: \"Hello World\" };\n }"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "/items",
|
|
22
|
+
"method": "GET",
|
|
23
|
+
"params": [
|
|
24
|
+
{
|
|
25
|
+
"in": "query",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": true,
|
|
28
|
+
"name": "name"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"response": "Item[]",
|
|
32
|
+
"x-nuc-action": "function action(req: { query: { name: string } }): any {\n const name = req.query.name;\n return Item.filter(item => item.name === name);\n }"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"path": "/items",
|
|
36
|
+
"method": "POST",
|
|
37
|
+
"request": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"name": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"barcode": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"response": "Item",
|
|
49
|
+
"x-nuc-action": "function action(req: { body: { name: string, barcode: string } }): any {\n const name = req.body.name;\n const barcode = req.body.barcode;\n const check = Item.find(i => i.barcode === barcode);\n if(check) {\n throw \"DUPLICATE_BARCODE\";\n }\n return new Item(name, barcode);\n }"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "/items/{item}",
|
|
53
|
+
"method": "GET",
|
|
54
|
+
"params": [
|
|
55
|
+
{
|
|
56
|
+
"name": "item",
|
|
57
|
+
"in": "path",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"required": true,
|
|
60
|
+
"description": "item"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"response": "Item",
|
|
64
|
+
"x-nuc-action": "function action(req: { params: { item: string } }): any {\n const item = req.params.item;\n return Item[item];\n }"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "/items/{item}",
|
|
68
|
+
"method": "PUT",
|
|
69
|
+
"params": [
|
|
70
|
+
{
|
|
71
|
+
"name": "item",
|
|
72
|
+
"in": "path",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"required": true,
|
|
75
|
+
"description": "item"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"request": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"name": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"barcode": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"response": "Item",
|
|
90
|
+
"x-nuc-action": "function action(req: { params: { item: string }, body: { name: string, barcode: string } }): any {\n const item = Item[req.params.item];\n const name = req.body.name;\n const barcode = req.body.barcode;\n if (!item) {\n return;\n }\n const check = Item.find(\n i => i.barcode === barcode && i.barcode !== item.barcode\n );\n if (check) {\n throw \"DUPLICATE_BARCODE\";\n }\n item.name = name;\n item.barcode = barcode;\n return item;\n }"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "/items/{item}",
|
|
94
|
+
"method": "DEL",
|
|
95
|
+
"params": [
|
|
96
|
+
{
|
|
97
|
+
"name": "item",
|
|
98
|
+
"in": "path",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"required": true,
|
|
101
|
+
"description": "item"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"response": "object",
|
|
105
|
+
"x-nuc-action": "function action(req: { params: { item: string } }): void {\n const item = req.params.item;\n delete Item[item];\n }"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "/orders",
|
|
109
|
+
"method": "GET",
|
|
110
|
+
"params": [],
|
|
111
|
+
"response": "Order[]",
|
|
112
|
+
"x-nuc-action": "function action(req: any): any {\n return Order;\n }"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"path": "/orders",
|
|
116
|
+
"method": "POST",
|
|
117
|
+
"request": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"item": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"qty": {
|
|
124
|
+
"type": "integer"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"response": "Order",
|
|
129
|
+
"x-nuc-action": "function action(req: { body: { item: string, qty: number } }): any {\n const item = Item[req.body.item];\n const qty = req.body.qty;\n if (!item) {\n throw \"INVALID_ITEM\";\n }\n return new Order(item, qty);\n }"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"path": "/orders/{order}",
|
|
133
|
+
"method": "GET",
|
|
134
|
+
"params": [
|
|
135
|
+
{
|
|
136
|
+
"name": "order",
|
|
137
|
+
"in": "path",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"required": true,
|
|
140
|
+
"description": "order"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"response": "Order",
|
|
144
|
+
"x-nuc-action": "function action(req: { params: { order: string } }): any {\n const order = req.params.order;\n return Order[order];\n }"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"path": "/orders/{order}",
|
|
148
|
+
"method": "PUT",
|
|
149
|
+
"params": [
|
|
150
|
+
{
|
|
151
|
+
"name": "order",
|
|
152
|
+
"in": "path",
|
|
153
|
+
"type": "string",
|
|
154
|
+
"required": true,
|
|
155
|
+
"description": "Order id"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"request": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"item": {
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"qty": {
|
|
165
|
+
"type": "integer"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"response": "Order",
|
|
170
|
+
"x-nuc-action": "function action(req: { params: { order: string }, body: { item: string, qty: number } }): any {\n const order = Order[req.params.order];\n const item = Item[req.body.item];\n const qty = req.body.qty;\n if (!order) {\n return;\n }\n if (!item) {\n throw \"INVALID_ITEM\";\n }\n order.item = item;\n order.qty = qty;\n return order;\n }"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"path": "/orders/{order}",
|
|
174
|
+
"method": "DEL",
|
|
175
|
+
"params": [
|
|
176
|
+
{
|
|
177
|
+
"name": "order",
|
|
178
|
+
"in": "path",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"required": true,
|
|
181
|
+
"description": "Order id"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"response": "object",
|
|
185
|
+
"x-nuc-action": "function action(req: { params: { order: string } }): void {\n const order = req.params.order;\n delete Order[order];\n }"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"types": [
|
|
189
|
+
{
|
|
190
|
+
"path": "/Order",
|
|
191
|
+
"params": [],
|
|
192
|
+
"type": "CLASS",
|
|
193
|
+
"definition": "class Order1 {\n item: string;\n qty: number;\n date: number;\n constructor(item: string, qty: number) {\n this.item = item;\n this.qty = qty;\n this.date = Date.now();\n }\n}"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"path": "/Item",
|
|
197
|
+
"params": [],
|
|
198
|
+
"type": "CLASS",
|
|
199
|
+
"definition": "class Item1 {\n name: string;\n barcode: string;\n constructor(name: string, barcode: string) {\n this.name = name;\n this.barcode = barcode;\n }\n}"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"path": "/event",
|
|
203
|
+
"params": [],
|
|
204
|
+
"type": "FUNCTION",
|
|
205
|
+
"builtin": true,
|
|
206
|
+
"definition": "function event(name: string, data: any): void {}"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"path": "/uuid",
|
|
210
|
+
"params": [],
|
|
211
|
+
"type": "FUNCTION",
|
|
212
|
+
"builtin": true,
|
|
213
|
+
"definition": "function uuid(): void {}"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"path": "/random",
|
|
217
|
+
"params": [],
|
|
218
|
+
"type": "FUNCTION",
|
|
219
|
+
"builtin": true,
|
|
220
|
+
"definition": "function random(length: number): void {}"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"functions": [
|
|
224
|
+
{
|
|
225
|
+
"path": "/Order",
|
|
226
|
+
"params": [],
|
|
227
|
+
"type": "CLASS",
|
|
228
|
+
"ext": "js",
|
|
229
|
+
"definition": "class Order {\n constructor(item, qty) {\n this.item = item;\n this.qty = qty;\n this.date = Date.now();\n }\n}\n"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"path": "/Item",
|
|
233
|
+
"params": [],
|
|
234
|
+
"type": "CLASS",
|
|
235
|
+
"ext": "js",
|
|
236
|
+
"definition": "class Item {\n constructor(name, barcode) {\n this.name = name;\n this barcode = barcode;\n }\n}\n"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"pages": {
|
|
241
|
+
"started": false,
|
|
242
|
+
"opened": false,
|
|
243
|
+
"api": {
|
|
244
|
+
"dialog": {
|
|
245
|
+
"view": "BODY",
|
|
246
|
+
"type": "",
|
|
247
|
+
"action": ""
|
|
248
|
+
},
|
|
249
|
+
"resourceMenu": {
|
|
250
|
+
"open": false,
|
|
251
|
+
"anchor": {}
|
|
252
|
+
},
|
|
253
|
+
"selected": {
|
|
254
|
+
"path": "/",
|
|
255
|
+
"method": "get"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"functions": {
|
|
259
|
+
"dialog": {
|
|
260
|
+
"open": false
|
|
261
|
+
},
|
|
262
|
+
"selected": "/Order"
|
|
263
|
+
},
|
|
264
|
+
"query": {
|
|
265
|
+
"results": "",
|
|
266
|
+
"text": "Item.filter((item) => item.name === \"item-1\");",
|
|
267
|
+
"outputRatio": 0.5
|
|
268
|
+
},
|
|
269
|
+
"branches": {}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import merge from "lodash/merge";
|
|
2
|
+
import { useResponsive } from "../../hooks/use-responsive";
|
|
3
|
+
|
|
4
|
+
import { alpha, useTheme } from "@mui/material/styles";
|
|
5
|
+
|
|
6
|
+
export default function useChart(options) {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
|
|
9
|
+
const smUp = useResponsive("up", "sm");
|
|
10
|
+
|
|
11
|
+
const LABEL_TOTAL = {
|
|
12
|
+
show: true,
|
|
13
|
+
label: "Total",
|
|
14
|
+
color: theme.palette.text.secondary,
|
|
15
|
+
fontSize: theme.typography.subtitle2.fontSize,
|
|
16
|
+
fontWeight: theme.typography.subtitle2.fontWeight,
|
|
17
|
+
lineHeight: theme.typography.subtitle2.lineHeight,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const LABEL_VALUE = {
|
|
21
|
+
offsetY: 8,
|
|
22
|
+
color: theme.palette.text.primary,
|
|
23
|
+
fontSize: theme.typography.h3.fontSize,
|
|
24
|
+
fontWeight: theme.typography.h3.fontWeight,
|
|
25
|
+
lineHeight: theme.typography.h3.lineHeight,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const baseOptions = {
|
|
29
|
+
colors: [
|
|
30
|
+
theme.palette.primary.main,
|
|
31
|
+
theme.palette.warning.main,
|
|
32
|
+
theme.palette.info.main,
|
|
33
|
+
theme.palette.error.main,
|
|
34
|
+
theme.palette.success.main,
|
|
35
|
+
theme.palette.warning.dark,
|
|
36
|
+
theme.palette.success.darker,
|
|
37
|
+
theme.palette.info.dark,
|
|
38
|
+
theme.palette.info.darker,
|
|
39
|
+
],
|
|
40
|
+
|
|
41
|
+
chart: {
|
|
42
|
+
toolbar: { show: false },
|
|
43
|
+
zoom: { enabled: false },
|
|
44
|
+
foreColor: theme.palette.text.disabled,
|
|
45
|
+
fontFamily: theme.typography.fontFamily,
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
states: {
|
|
49
|
+
hover: {
|
|
50
|
+
filter: {
|
|
51
|
+
type: "lighten",
|
|
52
|
+
value: 0.04,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
active: {
|
|
56
|
+
filter: {
|
|
57
|
+
type: "darken",
|
|
58
|
+
value: 0.88,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
fill: {
|
|
63
|
+
opacity: 1,
|
|
64
|
+
gradient: {
|
|
65
|
+
type: "vertical",
|
|
66
|
+
shadeIntensity: 0,
|
|
67
|
+
opacityFrom: 0.4,
|
|
68
|
+
opacityTo: 0,
|
|
69
|
+
stops: [0, 100],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
dataLabels: {
|
|
73
|
+
enabled: false,
|
|
74
|
+
},
|
|
75
|
+
stroke: {
|
|
76
|
+
width: 3,
|
|
77
|
+
curve: "smooth",
|
|
78
|
+
lineCap: "round",
|
|
79
|
+
},
|
|
80
|
+
grid: {
|
|
81
|
+
strokeDashArray: 3,
|
|
82
|
+
borderColor: theme.palette.divider,
|
|
83
|
+
xaxis: {
|
|
84
|
+
lines: {
|
|
85
|
+
show: false,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
xaxis: {
|
|
90
|
+
axisBorder: { show: false },
|
|
91
|
+
axisTicks: { show: false },
|
|
92
|
+
},
|
|
93
|
+
markers: {
|
|
94
|
+
size: 0,
|
|
95
|
+
strokeColors: theme.palette.background.paper,
|
|
96
|
+
},
|
|
97
|
+
tooltip: {
|
|
98
|
+
theme: false,
|
|
99
|
+
x: {
|
|
100
|
+
show: true,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
legend: {
|
|
104
|
+
show: true,
|
|
105
|
+
fontSize: 13,
|
|
106
|
+
position: "top",
|
|
107
|
+
horizontalAlign: "right",
|
|
108
|
+
markers: {
|
|
109
|
+
radius: 12,
|
|
110
|
+
},
|
|
111
|
+
fontWeight: 500,
|
|
112
|
+
itemMargin: {
|
|
113
|
+
horizontal: 8,
|
|
114
|
+
},
|
|
115
|
+
labels: {
|
|
116
|
+
colors: theme.palette.text.primary,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
plotOptions: {
|
|
120
|
+
bar: {
|
|
121
|
+
borderRadius: smUp ? 3 : 1,
|
|
122
|
+
columnWidth: "28%",
|
|
123
|
+
borderRadiusApplication: "end",
|
|
124
|
+
borderRadiusWhenStacked: "last",
|
|
125
|
+
},
|
|
126
|
+
pie: {
|
|
127
|
+
donut: {
|
|
128
|
+
labels: {
|
|
129
|
+
show: true,
|
|
130
|
+
value: LABEL_VALUE,
|
|
131
|
+
total: LABEL_TOTAL,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
radialBar: {
|
|
137
|
+
track: {
|
|
138
|
+
strokeWidth: "100%",
|
|
139
|
+
background: alpha(theme.palette.grey[500], 0.16),
|
|
140
|
+
},
|
|
141
|
+
dataLabels: {
|
|
142
|
+
value: LABEL_VALUE,
|
|
143
|
+
total: LABEL_TOTAL,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
radar: {
|
|
147
|
+
polygons: {
|
|
148
|
+
fill: { colors: ["transparent"] },
|
|
149
|
+
strokeColors: theme.palette.divider,
|
|
150
|
+
connectorColors: theme.palette.divider,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
polarArea: {
|
|
154
|
+
rings: {
|
|
155
|
+
strokeColor: theme.palette.divider,
|
|
156
|
+
},
|
|
157
|
+
spokes: {
|
|
158
|
+
connectorColors: theme.palette.divider,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
responsive: [
|
|
163
|
+
{
|
|
164
|
+
breakpoint: theme.breakpoints.values.sm,
|
|
165
|
+
options: {
|
|
166
|
+
plotOptions: { bar: { columnWidth: "40%" } },
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
breakpoint: theme.breakpoints.values.md,
|
|
171
|
+
options: {
|
|
172
|
+
plotOptions: { bar: { columnWidth: "32%" } },
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
return merge(baseOptions, options);
|
|
179
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { useCallback, useState } from "react";
|
|
2
|
+
|
|
3
|
+
export default function useTable(props) {
|
|
4
|
+
const [dense, setDense] = useState(!!props?.defaultDense);
|
|
5
|
+
|
|
6
|
+
const [page, setPage] = useState(props?.defaultCurrentPage || 0);
|
|
7
|
+
|
|
8
|
+
const [orderBy, setOrderBy] = useState(props?.defaultOrderBy || "name");
|
|
9
|
+
|
|
10
|
+
const [rowsPerPage, setRowsPerPage] = useState(
|
|
11
|
+
props?.defaultRowsPerPage || 5
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const [order, setOrder] = useState(props?.defaultOrder || "asc");
|
|
15
|
+
|
|
16
|
+
const [selected, setSelected] = useState(props?.defaultSelected || []);
|
|
17
|
+
|
|
18
|
+
const onSort = useCallback(
|
|
19
|
+
(id) => {
|
|
20
|
+
const isAsc = orderBy === id && order === "asc";
|
|
21
|
+
if (id !== "") {
|
|
22
|
+
setOrder(isAsc ? "desc" : "asc");
|
|
23
|
+
setOrderBy(id);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
[order, orderBy]
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const onSelectRow = useCallback(
|
|
30
|
+
(inputValue) => {
|
|
31
|
+
const newSelected = selected.includes(inputValue)
|
|
32
|
+
? selected.filter((value) => value !== inputValue)
|
|
33
|
+
: [...selected, inputValue];
|
|
34
|
+
|
|
35
|
+
setSelected(newSelected);
|
|
36
|
+
},
|
|
37
|
+
[selected]
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const onChangeRowsPerPage = useCallback((event) => {
|
|
41
|
+
setPage(0);
|
|
42
|
+
setRowsPerPage(parseInt(event.target.value, 10));
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
const onChangeDense = useCallback((event) => {
|
|
46
|
+
setDense(event.target.checked);
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
const onSelectAllRows = useCallback((checked, inputValue) => {
|
|
50
|
+
if (checked) {
|
|
51
|
+
setSelected(inputValue);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
setSelected([]);
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
const onChangePage = useCallback((event, newPage) => {
|
|
58
|
+
setPage(newPage);
|
|
59
|
+
}, []);
|
|
60
|
+
|
|
61
|
+
const onResetPage = useCallback(() => {
|
|
62
|
+
setPage(0);
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
const onUpdatePageDeleteRow = useCallback(
|
|
66
|
+
(totalRowsInPage) => {
|
|
67
|
+
setSelected([]);
|
|
68
|
+
if (page) {
|
|
69
|
+
if (totalRowsInPage < 2) {
|
|
70
|
+
setPage(page - 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
[page]
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const onUpdatePageDeleteRows = useCallback(
|
|
78
|
+
({ totalRows, totalRowsInPage, totalRowsFiltered }) => {
|
|
79
|
+
const totalSelected = selected.length;
|
|
80
|
+
|
|
81
|
+
setSelected([]);
|
|
82
|
+
|
|
83
|
+
if (page) {
|
|
84
|
+
if (totalSelected === totalRowsInPage) {
|
|
85
|
+
setPage(page - 1);
|
|
86
|
+
} else if (totalSelected === totalRowsFiltered) {
|
|
87
|
+
setPage(0);
|
|
88
|
+
} else if (totalSelected > totalRowsInPage) {
|
|
89
|
+
const newPage =
|
|
90
|
+
Math.ceil((totalRows - totalSelected) / rowsPerPage) - 1;
|
|
91
|
+
setPage(newPage);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
[page, rowsPerPage, selected.length]
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
dense,
|
|
100
|
+
order,
|
|
101
|
+
page,
|
|
102
|
+
orderBy,
|
|
103
|
+
rowsPerPage,
|
|
104
|
+
selected,
|
|
105
|
+
onSelectRow,
|
|
106
|
+
onSelectAllRows,
|
|
107
|
+
onSort,
|
|
108
|
+
onChangePage,
|
|
109
|
+
onChangeDense,
|
|
110
|
+
onResetPage,
|
|
111
|
+
onChangeRowsPerPage,
|
|
112
|
+
onUpdatePageDeleteRow,
|
|
113
|
+
onUpdatePageDeleteRows,
|
|
114
|
+
setPage,
|
|
115
|
+
setDense,
|
|
116
|
+
setOrder,
|
|
117
|
+
setOrderBy,
|
|
118
|
+
setSelected,
|
|
119
|
+
setRowsPerPage,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Helmet } from "react-helmet-async";
|
|
2
|
+
import { NotFoundView } from "../widgets/error";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
export default function NotFoundPage() {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Helmet>
|
|
11
|
+
<title> 404 Page Not Found!</title>
|
|
12
|
+
</Helmet>
|
|
13
|
+
|
|
14
|
+
<NotFoundView />
|
|
15
|
+
</>
|
|
16
|
+
);
|
|
17
|
+
}
|