@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,137 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import Dialog from "@mui/material/Dialog";
|
|
4
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
5
|
+
import DialogTitle from "@mui/material/DialogTitle";
|
|
6
|
+
import ItemSummary from "./ItemSummary/ItemSummary";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import SelectAvatar from "./IconSelector/IconSelector";
|
|
9
|
+
import SparkleInput from "./SparkleInput/SparkleInput";
|
|
10
|
+
import StepComponent from "./StepComponent/StepComponent";
|
|
11
|
+
|
|
12
|
+
function ProjectWizard({
|
|
13
|
+
itemProperties,
|
|
14
|
+
onSubmit,
|
|
15
|
+
open,
|
|
16
|
+
onClose,
|
|
17
|
+
itemToEdit,
|
|
18
|
+
steps,
|
|
19
|
+
stepExp,
|
|
20
|
+
}) {
|
|
21
|
+
const [activeStep, setActiveStep] = React.useState(0);
|
|
22
|
+
|
|
23
|
+
const handleNext = () => {
|
|
24
|
+
setActiveStep((prevActiveStep) => prevActiveStep + 1);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const handleBack = () => {
|
|
28
|
+
setActiveStep((prevActiveStep) => prevActiveStep - 1);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const [newItem, setNewItem] = useState(
|
|
32
|
+
itemProperties.reduce((obj, property) => ({ ...obj, [property]: "" }), {})
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (itemToEdit) {
|
|
37
|
+
setNewItem(itemToEdit);
|
|
38
|
+
} else if (!open) {
|
|
39
|
+
setNewItem(
|
|
40
|
+
itemProperties.reduce(
|
|
41
|
+
(obj, property) => ({ ...obj, [property]: "" }),
|
|
42
|
+
{}
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}, [open, itemProperties, itemToEdit]);
|
|
47
|
+
|
|
48
|
+
const handleSave = () => {
|
|
49
|
+
if (newItem.id) {
|
|
50
|
+
const { id, ...rest } = newItem;
|
|
51
|
+
onSubmit(id, rest);
|
|
52
|
+
} else {
|
|
53
|
+
onSubmit(newItem);
|
|
54
|
+
}
|
|
55
|
+
onClose();
|
|
56
|
+
setActiveStep(0);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const handleEmojiSelect = (emoji) => {
|
|
60
|
+
setNewItem((prevItem) => {
|
|
61
|
+
return {
|
|
62
|
+
...prevItem,
|
|
63
|
+
icon: emoji.shortcodes,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
const handleInputChange = (property) => (event) => {
|
|
68
|
+
setNewItem({ ...newItem, [property]: event.target.value });
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const Name = () => {
|
|
72
|
+
return (
|
|
73
|
+
<SparkleInput
|
|
74
|
+
prop="name"
|
|
75
|
+
value={newItem["name"]}
|
|
76
|
+
onChange={handleInputChange("name")}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const StepPages = () => {
|
|
82
|
+
switch (activeStep) {
|
|
83
|
+
case 0:
|
|
84
|
+
return Name();
|
|
85
|
+
case 1:
|
|
86
|
+
return (
|
|
87
|
+
<SelectAvatar
|
|
88
|
+
handleEmojiSelect={handleEmojiSelect}
|
|
89
|
+
iconCategories={"project_icons"}
|
|
90
|
+
avatar={newItem?.icon?.replace(/:/g, "").replace("/", ":")}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
case 2:
|
|
94
|
+
return <ItemSummary newItem={newItem} />;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return (
|
|
98
|
+
<Dialog
|
|
99
|
+
fullWidth={true}
|
|
100
|
+
maxWidth="sm"
|
|
101
|
+
open={open}
|
|
102
|
+
onClose={() => {
|
|
103
|
+
onClose();
|
|
104
|
+
setActiveStep(0);
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
<>
|
|
108
|
+
<DialogTitle
|
|
109
|
+
sx={{
|
|
110
|
+
backgroundColor: (theme) => theme.palette.background.default,
|
|
111
|
+
}}
|
|
112
|
+
></DialogTitle>
|
|
113
|
+
<StepComponent
|
|
114
|
+
activeStep={activeStep}
|
|
115
|
+
steps={steps}
|
|
116
|
+
stepExp={stepExp}
|
|
117
|
+
handleNext={handleNext}
|
|
118
|
+
handleBack={handleBack}
|
|
119
|
+
handleSave={handleSave}
|
|
120
|
+
>
|
|
121
|
+
<DialogContent
|
|
122
|
+
sx={{
|
|
123
|
+
height: "100%",
|
|
124
|
+
alignContent: "center",
|
|
125
|
+
justifyContent: "center",
|
|
126
|
+
backgroundColor: (theme) => theme.palette.background.default,
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
{StepPages()}
|
|
130
|
+
</DialogContent>
|
|
131
|
+
</StepComponent>
|
|
132
|
+
</>
|
|
133
|
+
</Dialog>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export default ProjectWizard;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
2
|
+
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import TextField from "@mui/material/TextField";
|
|
5
|
+
|
|
6
|
+
export default function RHFTextField({ name, helperText, type, ...other }) {
|
|
7
|
+
const { control } = useFormContext();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Controller
|
|
11
|
+
name={name}
|
|
12
|
+
control={control}
|
|
13
|
+
render={({ field, fieldState: { error } }) => (
|
|
14
|
+
<TextField
|
|
15
|
+
{...field}
|
|
16
|
+
fullWidth
|
|
17
|
+
type={type}
|
|
18
|
+
value={type === "number" && field.value === 0 ? "" : field.value}
|
|
19
|
+
onChange={(event) => {
|
|
20
|
+
if (type === "number") {
|
|
21
|
+
field.onChange(Number(event.target.value));
|
|
22
|
+
} else {
|
|
23
|
+
field.onChange(event.target.value);
|
|
24
|
+
}
|
|
25
|
+
}}
|
|
26
|
+
error={!!error}
|
|
27
|
+
helperText={error ? error?.message : helperText}
|
|
28
|
+
{...other}
|
|
29
|
+
/>
|
|
30
|
+
)}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
RHFTextField.propTypes = {
|
|
36
|
+
helperText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
37
|
+
name: PropTypes.string,
|
|
38
|
+
type: PropTypes.string,
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./RHFTextfield";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
import { StyledRootScrollbar, StyledScrollbar } from "./styles";
|
|
6
|
+
|
|
7
|
+
const Scrollbar = forwardRef(({ children, sx, ...other }, ref) => {
|
|
8
|
+
const userAgent =
|
|
9
|
+
typeof navigator === "undefined" ? "SSR" : navigator.userAgent;
|
|
10
|
+
const mobile =
|
|
11
|
+
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
12
|
+
userAgent
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
if (mobile) {
|
|
16
|
+
return (
|
|
17
|
+
<Box ref={ref} sx={{ overflow: "auto", ...sx }} {...other}>
|
|
18
|
+
{children}
|
|
19
|
+
</Box>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<StyledRootScrollbar>
|
|
25
|
+
<StyledScrollbar
|
|
26
|
+
scrollableNodeProps={{
|
|
27
|
+
ref,
|
|
28
|
+
}}
|
|
29
|
+
clickOnTrack={false}
|
|
30
|
+
sx={sx}
|
|
31
|
+
{...other}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</StyledScrollbar>
|
|
35
|
+
</StyledRootScrollbar>
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export default Scrollbar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./scrollbar";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import SimpleBar from "simplebar-react";
|
|
2
|
+
|
|
3
|
+
import { alpha, styled } from "@mui/material/styles";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
export const StyledRootScrollbar = styled("div")(() => ({
|
|
8
|
+
flexGrow: 1,
|
|
9
|
+
height: "100%",
|
|
10
|
+
overflow: "hidden",
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
export const StyledScrollbar = styled(SimpleBar)(({ theme }) => ({
|
|
14
|
+
maxHeight: "100%",
|
|
15
|
+
|
|
16
|
+
"& .simplebar-scrollbar": {
|
|
17
|
+
"&:before": {
|
|
18
|
+
backgroundColor: alpha(theme.palette.grey[600], 0.48),
|
|
19
|
+
},
|
|
20
|
+
"&.simplebar-visible:before": {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
"& .simplebar-mask": {
|
|
25
|
+
zIndex: "inherit",
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Paper from "@mui/material/Paper";
|
|
2
|
+
import Typography from "@mui/material/Typography";
|
|
3
|
+
|
|
4
|
+
export default function SearchNotFound({ query, sx, ...other }) {
|
|
5
|
+
return query ? (
|
|
6
|
+
<Paper
|
|
7
|
+
sx={{
|
|
8
|
+
bgcolor: "unset",
|
|
9
|
+
textAlign: "center",
|
|
10
|
+
...sx,
|
|
11
|
+
}}
|
|
12
|
+
{...other}
|
|
13
|
+
>
|
|
14
|
+
<Typography variant="h6" gutterBottom>
|
|
15
|
+
Not Found
|
|
16
|
+
</Typography>
|
|
17
|
+
|
|
18
|
+
<Typography variant="body2">
|
|
19
|
+
No results found for
|
|
20
|
+
<strong>"{query}"</strong>.
|
|
21
|
+
<br /> Try checking for typos or using complete words.
|
|
22
|
+
</Typography>
|
|
23
|
+
</Paper>
|
|
24
|
+
) : (
|
|
25
|
+
<Typography variant="body2" sx={sx}>
|
|
26
|
+
Please enter keywords
|
|
27
|
+
</Typography>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SearchNotFound";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { IconButton, InputAdornment, SvgIcon, TextField } from "@mui/material";
|
|
4
|
+
|
|
5
|
+
export default function SparkleInput({
|
|
6
|
+
prop,
|
|
7
|
+
onChange,
|
|
8
|
+
value,
|
|
9
|
+
sparkle = true,
|
|
10
|
+
...others
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<TextField
|
|
14
|
+
inputProps={{
|
|
15
|
+
"data-cy": prop,
|
|
16
|
+
}}
|
|
17
|
+
autoFocus
|
|
18
|
+
margin="dense"
|
|
19
|
+
label={prop}
|
|
20
|
+
fullWidth={true}
|
|
21
|
+
value={value || ""}
|
|
22
|
+
onChange={onChange}
|
|
23
|
+
InputLabelProps={{
|
|
24
|
+
sx: { color: (theme) => theme.palette.text.primary },
|
|
25
|
+
}}
|
|
26
|
+
InputProps={{
|
|
27
|
+
endAdornment: sparkle && (
|
|
28
|
+
<InputAdornment position="end">
|
|
29
|
+
<IconButton>
|
|
30
|
+
<SvgIcon>
|
|
31
|
+
<svg
|
|
32
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
+
width="20"
|
|
34
|
+
height="20"
|
|
35
|
+
viewBox="0 0 20 20"
|
|
36
|
+
>
|
|
37
|
+
<path
|
|
38
|
+
fill="white"
|
|
39
|
+
d="M7.398 12.809a1.042 1.042 0 0 0 1.204-.003c.178-.13.313-.31.387-.518l.447-1.373a2.336 2.336 0 0 1 1.477-1.479l1.391-.45a1.045 1.045 0 0 0-.044-1.98l-1.375-.448a2.335 2.335 0 0 1-1.48-1.477l-.452-1.388a1.044 1.044 0 0 0-1.973.017l-.457 1.4a2.336 2.336 0 0 1-1.44 1.45l-1.39.447a1.045 1.045 0 0 0 .016 1.974l1.374.445a2.333 2.333 0 0 1 1.481 1.488l.452 1.391c.072.204.206.38.382.504m.085-7.415l.527-1.377l.44 1.377a3.331 3.331 0 0 0 2.117 2.114l1.406.53l-1.382.447a3.344 3.344 0 0 0-2.115 2.117l-.523 1.378l-.449-1.379a3.336 3.336 0 0 0-.8-1.31a3.373 3.373 0 0 0-1.312-.812l-1.378-.522l1.386-.45a3.358 3.358 0 0 0 1.29-.813a3.4 3.4 0 0 0 .793-1.3m6.052 11.457a.806.806 0 0 0 1.226-.398l.248-.762a1.09 1.09 0 0 1 .26-.42c.118-.12.262-.208.42-.26l.772-.252a.8.8 0 0 0-.023-1.52l-.764-.25a1.075 1.075 0 0 1-.68-.678l-.252-.773a.8.8 0 0 0-1.518.01l-.247.762a1.068 1.068 0 0 1-.665.679l-.773.252a.8.8 0 0 0 .008 1.518l.763.247c.16.054.304.143.422.261c.119.119.207.263.258.422l.253.774a.8.8 0 0 0 .292.388m-.913-2.793L12.443 14l.184-.064a2.11 2.11 0 0 0 1.3-1.317l.058-.178l.06.181a2.078 2.078 0 0 0 1.316 1.316l.195.063l-.18.06a2.076 2.076 0 0 0-1.317 1.32l-.059.181l-.058-.18a2.075 2.075 0 0 0-1.32-1.323"
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
</SvgIcon>
|
|
43
|
+
</IconButton>
|
|
44
|
+
</InputAdornment>
|
|
45
|
+
),
|
|
46
|
+
}}
|
|
47
|
+
sx={{ textTransform: "capitalize" }}
|
|
48
|
+
{...others}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
2
|
+
import DialogContentText from "@mui/material/DialogContentText";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Step from "@mui/material/Step";
|
|
5
|
+
import StepLabel from "@mui/material/StepLabel";
|
|
6
|
+
import Stepper from "@mui/material/Stepper";
|
|
7
|
+
|
|
8
|
+
import { Box, Button, Stack } from "@mui/material";
|
|
9
|
+
|
|
10
|
+
export default function StepComponent({
|
|
11
|
+
activeStep,
|
|
12
|
+
steps,
|
|
13
|
+
stepExp,
|
|
14
|
+
handleNext,
|
|
15
|
+
handleBack,
|
|
16
|
+
handleSave,
|
|
17
|
+
children,
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<Stepper
|
|
22
|
+
activeStep={activeStep}
|
|
23
|
+
sx={{ backgroundColor: (theme) => theme.palette.background.default }}
|
|
24
|
+
>
|
|
25
|
+
{steps.map((label) => {
|
|
26
|
+
const stepProps = {};
|
|
27
|
+
const labelProps = {};
|
|
28
|
+
return (
|
|
29
|
+
<Step
|
|
30
|
+
key={label}
|
|
31
|
+
{...stepProps}
|
|
32
|
+
sx={{
|
|
33
|
+
backgroundColor: (theme) => theme.palette.background.default,
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<StepLabel
|
|
37
|
+
sx={{
|
|
38
|
+
backgroundColor: (theme) => theme.palette.background.default,
|
|
39
|
+
}}
|
|
40
|
+
{...labelProps}
|
|
41
|
+
>
|
|
42
|
+
{label}
|
|
43
|
+
</StepLabel>
|
|
44
|
+
</Step>
|
|
45
|
+
);
|
|
46
|
+
})}
|
|
47
|
+
</Stepper>
|
|
48
|
+
|
|
49
|
+
<Stack
|
|
50
|
+
sx={{ backgroundColor: (theme) => theme.palette.background.default }}
|
|
51
|
+
>
|
|
52
|
+
<DialogContentText
|
|
53
|
+
sx={{
|
|
54
|
+
textAlign: "center",
|
|
55
|
+
my: 2,
|
|
56
|
+
mx: 5,
|
|
57
|
+
backgroundColor: (theme) => theme.palette.background.default,
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
{stepExp[activeStep]}
|
|
61
|
+
</DialogContentText>
|
|
62
|
+
</Stack>
|
|
63
|
+
{children}
|
|
64
|
+
<DialogActions
|
|
65
|
+
sx={{ backgroundColor: (theme) => theme.palette.background.default }}
|
|
66
|
+
>
|
|
67
|
+
<Button
|
|
68
|
+
data-cy="colleague-back-button"
|
|
69
|
+
variant="outlined"
|
|
70
|
+
color="inherit"
|
|
71
|
+
disabled={activeStep === 0}
|
|
72
|
+
onClick={handleBack}
|
|
73
|
+
sx={{ mr: 1 }}
|
|
74
|
+
>
|
|
75
|
+
Back
|
|
76
|
+
</Button>
|
|
77
|
+
<Box sx={{ flex: "1 1 auto" }} />
|
|
78
|
+
{activeStep === steps.length ? (
|
|
79
|
+
<Button
|
|
80
|
+
variant="contained"
|
|
81
|
+
data-cy="colleague-finish-button"
|
|
82
|
+
onClick={handleSave}
|
|
83
|
+
>
|
|
84
|
+
Finish
|
|
85
|
+
</Button>
|
|
86
|
+
) : (
|
|
87
|
+
<Button
|
|
88
|
+
variant="outlined"
|
|
89
|
+
data-cy="colleague-next-button"
|
|
90
|
+
onClick={handleNext}
|
|
91
|
+
>
|
|
92
|
+
Next
|
|
93
|
+
</Button>
|
|
94
|
+
)}
|
|
95
|
+
</DialogActions>
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
const SvgColor = forwardRef(({ src, sx, ...other }, ref) => (
|
|
6
|
+
<Box
|
|
7
|
+
component="span"
|
|
8
|
+
className="svg-color"
|
|
9
|
+
ref={ref}
|
|
10
|
+
sx={{
|
|
11
|
+
width: 24,
|
|
12
|
+
height: 24,
|
|
13
|
+
display: "inline-block",
|
|
14
|
+
bgcolor: "currentColor",
|
|
15
|
+
mask: `url(${src}) no-repeat center / contain`,
|
|
16
|
+
WebkitMask: `url(${src}) no-repeat center / contain`,
|
|
17
|
+
...sx,
|
|
18
|
+
}}
|
|
19
|
+
{...other}
|
|
20
|
+
/>
|
|
21
|
+
));
|
|
22
|
+
|
|
23
|
+
SvgColor.propTypes = {
|
|
24
|
+
src: PropTypes.string,
|
|
25
|
+
sx: PropTypes.object,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default SvgColor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SvgColor";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import Checkbox from "@mui/material/Checkbox";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import TableCell from "@mui/material/TableCell";
|
|
5
|
+
import TableHead from "@mui/material/TableHead";
|
|
6
|
+
import TableRow from "@mui/material/TableRow";
|
|
7
|
+
import TableSortLabel from "@mui/material/TableSortLabel";
|
|
8
|
+
|
|
9
|
+
const visuallyHidden = {
|
|
10
|
+
border: 0,
|
|
11
|
+
margin: -1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
width: "1px",
|
|
14
|
+
height: "1px",
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
position: "absolute",
|
|
17
|
+
whiteSpace: "nowrap",
|
|
18
|
+
clip: "rect(0 0 0 0)",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function TableHeadCustom({
|
|
22
|
+
order,
|
|
23
|
+
orderBy,
|
|
24
|
+
rowCount = 0,
|
|
25
|
+
headLabel,
|
|
26
|
+
numSelected = 0,
|
|
27
|
+
onSort,
|
|
28
|
+
onSelectAllRows,
|
|
29
|
+
sx,
|
|
30
|
+
}) {
|
|
31
|
+
return (
|
|
32
|
+
<TableHead sx={sx}>
|
|
33
|
+
<TableRow>
|
|
34
|
+
{onSelectAllRows && (
|
|
35
|
+
<TableCell padding="checkbox">
|
|
36
|
+
<Checkbox
|
|
37
|
+
indeterminate={!!numSelected && numSelected < rowCount}
|
|
38
|
+
checked={!!rowCount && numSelected === rowCount}
|
|
39
|
+
onChange={(event) => onSelectAllRows(event.target.checked)}
|
|
40
|
+
/>
|
|
41
|
+
</TableCell>
|
|
42
|
+
)}
|
|
43
|
+
|
|
44
|
+
{headLabel.map((headCell) => (
|
|
45
|
+
<TableCell
|
|
46
|
+
key={headCell.id}
|
|
47
|
+
align={headCell.align || "left"}
|
|
48
|
+
sortDirection={orderBy === headCell.id ? order : false}
|
|
49
|
+
sx={{ width: headCell.width, minWidth: headCell.minWidth }}
|
|
50
|
+
>
|
|
51
|
+
{onSort ? (
|
|
52
|
+
<TableSortLabel
|
|
53
|
+
hideSortIcon
|
|
54
|
+
active={orderBy === headCell.id}
|
|
55
|
+
direction={orderBy === headCell.id ? order : "asc"}
|
|
56
|
+
onClick={() => onSort(headCell.id)}
|
|
57
|
+
>
|
|
58
|
+
{headCell.label}
|
|
59
|
+
|
|
60
|
+
{orderBy === headCell.id ? (
|
|
61
|
+
<Box sx={{ ...visuallyHidden }}>
|
|
62
|
+
{order === "desc"
|
|
63
|
+
? "sorted descending"
|
|
64
|
+
: "sorted ascending"}
|
|
65
|
+
</Box>
|
|
66
|
+
) : null}
|
|
67
|
+
</TableSortLabel>
|
|
68
|
+
) : (
|
|
69
|
+
headCell.label
|
|
70
|
+
)}
|
|
71
|
+
</TableCell>
|
|
72
|
+
))}
|
|
73
|
+
</TableRow>
|
|
74
|
+
</TableHead>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
TableHeadCustom.propTypes = {
|
|
79
|
+
sx: PropTypes.object,
|
|
80
|
+
onSort: PropTypes.func,
|
|
81
|
+
orderBy: PropTypes.string,
|
|
82
|
+
headLabel: PropTypes.array,
|
|
83
|
+
rowCount: PropTypes.number,
|
|
84
|
+
numSelected: PropTypes.number,
|
|
85
|
+
onSelectAllRows: PropTypes.func,
|
|
86
|
+
order: PropTypes.oneOf(["asc", "desc"]),
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./TableHeadCustom";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import Checkbox from "@mui/material/Checkbox";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import Stack from "@mui/material/Stack";
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
5
|
+
|
|
6
|
+
export default function TableSelectedAction({
|
|
7
|
+
dense,
|
|
8
|
+
action,
|
|
9
|
+
rowCount,
|
|
10
|
+
numSelected,
|
|
11
|
+
onSelectAllRows,
|
|
12
|
+
sx,
|
|
13
|
+
...other
|
|
14
|
+
}) {
|
|
15
|
+
if (!numSelected) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Stack
|
|
21
|
+
direction="row"
|
|
22
|
+
alignItems="center"
|
|
23
|
+
sx={{
|
|
24
|
+
pl: 1,
|
|
25
|
+
pr: 2,
|
|
26
|
+
top: 0,
|
|
27
|
+
left: 0,
|
|
28
|
+
width: 1,
|
|
29
|
+
zIndex: 9,
|
|
30
|
+
height: 58,
|
|
31
|
+
position: "absolute",
|
|
32
|
+
bgcolor: "primary.lighter",
|
|
33
|
+
...(dense && {
|
|
34
|
+
height: 38,
|
|
35
|
+
}),
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
{...other}
|
|
39
|
+
>
|
|
40
|
+
<Checkbox
|
|
41
|
+
indeterminate={!!numSelected && numSelected < rowCount}
|
|
42
|
+
checked={!!rowCount && numSelected === rowCount}
|
|
43
|
+
onChange={(event) => onSelectAllRows(event.target.checked)}
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<Typography
|
|
47
|
+
variant="subtitle2"
|
|
48
|
+
sx={{
|
|
49
|
+
ml: 2,
|
|
50
|
+
flexGrow: 1,
|
|
51
|
+
color: "primary.main",
|
|
52
|
+
...(dense && {
|
|
53
|
+
ml: 3,
|
|
54
|
+
}),
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{numSelected} selected
|
|
58
|
+
</Typography>
|
|
59
|
+
|
|
60
|
+
{action && action}
|
|
61
|
+
</Stack>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
TableSelectedAction.propTypes = {
|
|
66
|
+
action: PropTypes.node,
|
|
67
|
+
dense: PropTypes.bool,
|
|
68
|
+
numSelected: PropTypes.number,
|
|
69
|
+
onSelectAllRows: PropTypes.func,
|
|
70
|
+
rowCount: PropTypes.number,
|
|
71
|
+
sx: PropTypes.object,
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./TableSelectedAction";
|
package/src/lib/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { default as AddItemWizard } from "./AddItemWizard/AddItemWizard";
|
|
3
|
+
export { default as Iconify } from "./Iconify";
|
|
4
|
+
export { default as IconSelector } from "./IconSelector/IconSelector";
|
|
5
|
+
export { default as ItemsSummary } from "./ItemSummary/ItemsSummary";
|
|
6
|
+
export { default as ItemSummary } from "./ItemSummary/ItemSummary";
|
|
7
|
+
export { default as SparkleInput } from "./SparkleInput/SparkleInput";
|
|
8
|
+
export { default as StepComponent } from "./StepComponent/StepComponent";
|
|
9
|
+
export { default as SvgColor } from "./SvgColor";
|
|
10
|
+
export { default as ProjectWizard } from "./ProjectWizard";
|
|
11
|
+
export { default as CustomPopover } from "./CustomPopover/CustomPopover";
|
|
12
|
+
export { default as usePopover } from "./CustomPopover/usePopover";
|
|
13
|
+
export { default as Image } from "./Image/Image";
|
|
14
|
+
export { default as Label } from "./Label/Label";
|
|
15
|
+
export { default as Scrollbar } from "./Scrollbar/Scrollbar";
|
|
16
|
+
export { default as SearchNotFound } from "./SearchNotFound/SearchNotFound";
|
|
17
|
+
export { default as CustomBreadcrumbs } from "./CustomBreadcrumbs/CustomBreadcrumbs";
|
|
18
|
+
export { default as FormProvider } from "./FormProvider/FormProvider";
|
|
19
|
+
export { default as RHFTextField } from "./RHFTextfield/RHFTextfield";
|
|
20
|
+
export { default as TableHeadCustom } from "./TableHeadCustom/TableHeadCustom";
|
|
21
|
+
export { default as TableSelectedAction } from "./TableSelectedAction/TableSelectedAction";
|
|
22
|
+
export { default as useTable } from "./useTable/useTable";
|
|
23
|
+
export { default as useChart } from "./useChart/useChart";
|
|
24
|
+
|
|
25
|
+
export { default as Flow } from "./Flow/core/Flow";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
HeaderCard,
|
|
29
|
+
MediaAvatarCard,
|
|
30
|
+
SideStripeCard,
|
|
31
|
+
AvatarRoleCard,
|
|
32
|
+
} from "./Flow/layouts/CardLayout";
|
|
33
|
+
|
|
34
|
+
export { default as ActionNode } from "./Flow/layouts/ActionNode";
|
|
35
|
+
|
|
36
|
+
export { default as InfoNode } from "./Flow/layouts/InfoNode";
|