test-nucleoid 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 +795 -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 +47 -0
- package/src/config/schemas.js +148 -0
- package/src/context/Context.js +98 -0
- package/src/context/reducer.js +632 -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 +166 -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 +110 -0
- package/src/layouts/common/ProjectBar/index.jsx +338 -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 +119 -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/APIDialogAction/APIDialogAction.jsx +109 -0
- package/src/lib/APIDialogAction/index.js +1 -0
- package/src/lib/APIDialogAction/styles.js +6 -0
- package/src/lib/APIParams/APIParams.jsx +57 -0
- package/src/lib/APIParams/index.js +1 -0
- package/src/lib/APIPath/APIPath.jsx +82 -0
- package/src/lib/APIPath/index.js +1 -0
- package/src/lib/APIPath/styles.js +19 -0
- package/src/lib/APITree/APITree.jsx +418 -0
- package/src/lib/APITree/Arrow.jsx +21 -0
- package/src/lib/APITree/DeleteMethodDialog.jsx +41 -0
- package/src/lib/APITree/index.js +1 -0
- package/src/lib/APITree/styles.js +19 -0
- package/src/lib/APITypes/APITypes.jsx +151 -0
- package/src/lib/APITypes/TypeEditor.jsx +46 -0
- package/src/lib/APITypes/TypeList.jsx +178 -0
- package/src/lib/APITypes/index.js +1 -0
- package/src/lib/AddItemWizard/AddItemWizard.jsx +211 -0
- package/src/lib/AddItemWizard/index.js +1 -0
- package/src/lib/BlankTreeMessage/BlankTreeMessage.jsx +39 -0
- package/src/lib/BlankTreeMessage/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/DialogTootip/DialogTooltip.jsx +67 -0
- package/src/lib/DialogTootip/index.js +1 -0
- package/src/lib/DialogTootip/styles.js +9 -0
- package/src/lib/Flow/connectors/DynamicConnector.jsx +319 -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 +70 -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 +298 -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 +158 -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 +78 -0
- package/src/lib/ItemSummary/ItemsSummary.jsx +164 -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/NewApiBody/NewAPIBody.jsx +97 -0
- package/src/lib/NewApiBody/ParamView.jsx +38 -0
- package/src/lib/NucDialog/NucDialog.jsx +108 -0
- package/src/lib/NucDialog/index.js +1 -0
- package/src/lib/ParamTable/ParamTable.jsx +133 -0
- package/src/lib/ParamTable/TypeMenu.jsx +102 -0
- package/src/lib/ParamTable/defaults.js +47 -0
- package/src/lib/ParamTable/index.js +1 -0
- package/src/lib/ParamTable/styles.js +12 -0
- package/src/lib/ProjectWizard.jsx +137 -0
- package/src/lib/RHFTextfield/RHFTextfield.jsx +40 -0
- package/src/lib/RHFTextfield/index.js +1 -0
- package/src/lib/ResourceMenu/AlertMassage.jsx +28 -0
- package/src/lib/ResourceMenu/DeleteResourceDialog.jsx +60 -0
- package/src/lib/ResourceMenu/ResourceMenu.jsx +165 -0
- package/src/lib/ResourceMenu/index.js +1 -0
- package/src/lib/ResourceMenu/styles.js +5 -0
- package/src/lib/Schema/Schema.jsx +204 -0
- package/src/lib/Schema/index.js +1 -0
- package/src/lib/SchemaEditor/SchemaEditor.jsx +258 -0
- package/src/lib/SchemaEditor/SchemaEditor.test.js +193 -0
- package/src/lib/SchemaEditor/SchemaPropertyEditor.jsx +135 -0
- package/src/lib/SchemaEditor/SchemaUtils.js +152 -0
- package/src/lib/SchemaEditor/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 +29 -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/ToggleableMenu/ToggleableMenu.jsx +35 -0
- package/src/lib/ToggleableMenu/index.js +1 -0
- package/src/lib/index.js +50 -0
- package/src/lib/lib/Icons.js +40 -0
- package/src/lib/lib/context.json +272 -0
- package/src/lib/useChart/useChart.js +180 -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 +52 -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/APITree.stories.jsx +332 -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/templates/ActionTemplate.js +24 -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 +45 -0
- package/src/widgets/Login/DemoLogin.jsx +178 -0
- package/src/widgets/Login/Login.jsx +58 -0
- package/src/widgets/Login/cognitoAuth.jsx +44 -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 +433 -0
- package/src/widgets/error/index.js +1 -0
- package/src/widgets/error/not-found-view.jsx +42 -0
- package/vite/vite.js +86 -0
- package/vite.config.js +7 -0
- package/vitest.config.js +32 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from "uuid";
|
|
2
|
+
|
|
3
|
+
export const getTypeStyle = (type) => {
|
|
4
|
+
return {
|
|
5
|
+
fontWeight: "normal",
|
|
6
|
+
color: getTypeColor(type),
|
|
7
|
+
marginLeft: "auto",
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const getTypeColor = (type) => {
|
|
12
|
+
switch (type) {
|
|
13
|
+
case "object":
|
|
14
|
+
return "red";
|
|
15
|
+
case "string":
|
|
16
|
+
return "green";
|
|
17
|
+
case "integer":
|
|
18
|
+
return "blue";
|
|
19
|
+
|
|
20
|
+
default:
|
|
21
|
+
return "black";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const addProperty = (parentId = null, setSchemaData) => {
|
|
26
|
+
const addPropertyToNode = (node, parentId) => {
|
|
27
|
+
if (node.id === parentId) {
|
|
28
|
+
const propertyCount = node.properties ? node.properties.length : 0;
|
|
29
|
+
const newName = propertyCount === 0 ? "id" : `prop${propertyCount + 1}`;
|
|
30
|
+
const newType = "string";
|
|
31
|
+
|
|
32
|
+
const newProperty = {
|
|
33
|
+
name: newName,
|
|
34
|
+
type: newType,
|
|
35
|
+
id: uuidv4(),
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const updatedProperties = node.properties
|
|
39
|
+
? [...node.properties, newProperty]
|
|
40
|
+
: [newProperty];
|
|
41
|
+
|
|
42
|
+
return { ...node, properties: updatedProperties };
|
|
43
|
+
} else if (node.properties) {
|
|
44
|
+
const updatedProperties = node.properties.map((childNode) =>
|
|
45
|
+
addPropertyToNode(childNode, parentId)
|
|
46
|
+
);
|
|
47
|
+
return { ...node, properties: updatedProperties };
|
|
48
|
+
}
|
|
49
|
+
return node;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
setSchemaData((currentData) => {
|
|
53
|
+
if (!parentId) {
|
|
54
|
+
const propertyCount = currentData.properties
|
|
55
|
+
? currentData.properties.length
|
|
56
|
+
: 0;
|
|
57
|
+
const newName = propertyCount === 0 ? "id" : `prop${propertyCount + 1}`;
|
|
58
|
+
const newType = "string";
|
|
59
|
+
|
|
60
|
+
const newProperty = {
|
|
61
|
+
name: newName,
|
|
62
|
+
type: newType,
|
|
63
|
+
id: uuidv4(),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const updatedProperties = currentData.properties
|
|
67
|
+
? [...currentData.properties, newProperty]
|
|
68
|
+
: [newProperty];
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
...currentData,
|
|
72
|
+
properties: updatedProperties,
|
|
73
|
+
};
|
|
74
|
+
} else {
|
|
75
|
+
return addPropertyToNode(currentData, parentId);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const removeProperty = (propertyId, setSchemaData) => {
|
|
81
|
+
const removePropertyFromNode = (node, propertyId) => {
|
|
82
|
+
if (node.id === propertyId) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
if (node.properties) {
|
|
86
|
+
const updatedProperties = node.properties
|
|
87
|
+
.map((childNode) => removePropertyFromNode(childNode, propertyId))
|
|
88
|
+
.filter((childNode) => childNode !== null);
|
|
89
|
+
|
|
90
|
+
return { ...node, properties: updatedProperties };
|
|
91
|
+
}
|
|
92
|
+
return node;
|
|
93
|
+
};
|
|
94
|
+
setSchemaData((currentData) => {
|
|
95
|
+
const updatedProperties = currentData.properties
|
|
96
|
+
.map((node) => removePropertyFromNode(node, propertyId))
|
|
97
|
+
.filter((node) => node !== null);
|
|
98
|
+
const updatedData = { ...currentData, properties: updatedProperties };
|
|
99
|
+
|
|
100
|
+
return updatedData;
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
export const changeProperty = (propertyId, changes, setSchemaData) => {
|
|
104
|
+
const updateProperty = (node, propertyId, changes) => {
|
|
105
|
+
if (node.id === propertyId || propertyId === "1") {
|
|
106
|
+
const updatedNode = {
|
|
107
|
+
...node,
|
|
108
|
+
name: changes.name,
|
|
109
|
+
type: changes.type,
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
if (changes.type === "object") {
|
|
113
|
+
if (!updatedNode.properties || updatedNode.properties.length === 0) {
|
|
114
|
+
updatedNode.properties = [
|
|
115
|
+
{
|
|
116
|
+
name: "id",
|
|
117
|
+
type: "string",
|
|
118
|
+
id: uuidv4(),
|
|
119
|
+
},
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
} else if (changes.type === "array") {
|
|
123
|
+
if (!updatedNode.properties || updatedNode.properties.length === 0) {
|
|
124
|
+
updatedNode.properties = [
|
|
125
|
+
{
|
|
126
|
+
name: "item",
|
|
127
|
+
type: "string",
|
|
128
|
+
id: uuidv4(),
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
} else {
|
|
132
|
+
updatedNode.properties = updatedNode.properties.slice(0, 1);
|
|
133
|
+
}
|
|
134
|
+
} else if (changes.type !== "object" && changes.type !== "array") {
|
|
135
|
+
delete updatedNode.properties;
|
|
136
|
+
}
|
|
137
|
+
return updatedNode;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (node.properties) {
|
|
141
|
+
const updatedProperties = node.properties.map((childNode) =>
|
|
142
|
+
updateProperty(childNode, propertyId, changes)
|
|
143
|
+
);
|
|
144
|
+
return { ...node, properties: updatedProperties };
|
|
145
|
+
}
|
|
146
|
+
return node;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
setSchemaData((currentData) => {
|
|
150
|
+
return updateProperty(currentData, propertyId, changes);
|
|
151
|
+
});
|
|
152
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SchemaEditor";
|
|
@@ -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 React from "react";
|
|
3
|
+
import Typography from "@mui/material/Typography";
|
|
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,29 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
const SvgColor = forwardRef(({ src, sx, ...other }, ref) => (
|
|
7
|
+
<Box
|
|
8
|
+
component="span"
|
|
9
|
+
className="svg-color"
|
|
10
|
+
ref={ref}
|
|
11
|
+
sx={{
|
|
12
|
+
width: 24,
|
|
13
|
+
height: 24,
|
|
14
|
+
display: "inline-block",
|
|
15
|
+
bgcolor: "currentColor",
|
|
16
|
+
mask: `url(${src}) no-repeat center / contain`,
|
|
17
|
+
WebkitMask: `url(${src}) no-repeat center / contain`,
|
|
18
|
+
...sx,
|
|
19
|
+
}}
|
|
20
|
+
{...other}
|
|
21
|
+
/>
|
|
22
|
+
));
|
|
23
|
+
|
|
24
|
+
SvgColor.propTypes = {
|
|
25
|
+
src: PropTypes.string,
|
|
26
|
+
sx: PropTypes.object,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
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 React from "react";
|
|
5
|
+
import TableCell from "@mui/material/TableCell";
|
|
6
|
+
import TableHead from "@mui/material/TableHead";
|
|
7
|
+
import TableRow from "@mui/material/TableRow";
|
|
8
|
+
import TableSortLabel from "@mui/material/TableSortLabel";
|
|
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 React from "react";
|
|
4
|
+
import Stack from "@mui/material/Stack";
|
|
5
|
+
import Typography from "@mui/material/Typography";
|
|
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";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Box, ClickAwayListener, IconButton } from "@mui/material";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
|
|
4
|
+
function ToggleableMenu({ defaultIcon, children }) {
|
|
5
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
6
|
+
|
|
7
|
+
const handleDefaultIconClick = (event) => {
|
|
8
|
+
event.stopPropagation();
|
|
9
|
+
setIsOpen(!isOpen);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const handleClose = () => {
|
|
13
|
+
setIsOpen(false);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const handleMenuItemClick = (event) => {
|
|
17
|
+
event.stopPropagation();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<ClickAwayListener onClickAway={handleClose}>
|
|
22
|
+
<Box>
|
|
23
|
+
{isOpen ? (
|
|
24
|
+
<Box onClick={handleMenuItemClick}>{children}</Box>
|
|
25
|
+
) : (
|
|
26
|
+
<IconButton size="small" onClick={handleDefaultIconClick}>
|
|
27
|
+
{defaultIcon}
|
|
28
|
+
</IconButton>
|
|
29
|
+
)}
|
|
30
|
+
</Box>
|
|
31
|
+
</ClickAwayListener>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default ToggleableMenu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ToggleableMenu";
|