@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,126 @@
|
|
|
1
|
+
import Page from "../layouts/Page";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import config from "../config/config";
|
|
4
|
+
import oauth from "../http/oauth";
|
|
5
|
+
import qs from "qs";
|
|
6
|
+
import { storage } from "@nucleoidjs/webstorage";
|
|
7
|
+
import { useContext } from "../ContextProvider/ContextProvider";
|
|
8
|
+
import { useLocation } from "react-router-dom";
|
|
9
|
+
import { useNavigate } from "react-router-dom";
|
|
10
|
+
|
|
11
|
+
import { useEffect, useRef } from "react";
|
|
12
|
+
|
|
13
|
+
function Callback() {
|
|
14
|
+
const { project: appConfig, name, appId } = config();
|
|
15
|
+
const projectBar = config().template?.projectBar;
|
|
16
|
+
|
|
17
|
+
const { google, github, linkedin } = appConfig;
|
|
18
|
+
const [, dispatch] = useContext();
|
|
19
|
+
const location = useLocation();
|
|
20
|
+
const navigate = useNavigate();
|
|
21
|
+
const hasProcessed = useRef(false);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (hasProcessed.current) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const parsedQuery = qs.parse(location.search, { ignoreQueryPrefix: true });
|
|
29
|
+
const { code, error, error_description, state } = parsedQuery;
|
|
30
|
+
|
|
31
|
+
let identityProvider;
|
|
32
|
+
let stateData = {};
|
|
33
|
+
|
|
34
|
+
if (state) {
|
|
35
|
+
stateData = JSON.parse(decodeURIComponent(state));
|
|
36
|
+
identityProvider = stateData.identityProvider;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (error) {
|
|
40
|
+
console.error("OAuth error:", error, error_description);
|
|
41
|
+
navigate(
|
|
42
|
+
"/login?error=" + encodeURIComponent(error_description || error)
|
|
43
|
+
);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!code) {
|
|
48
|
+
console.error("No authorization code received");
|
|
49
|
+
navigate(
|
|
50
|
+
"/login?error=" + encodeURIComponent("No authorization code received")
|
|
51
|
+
);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
hasProcessed.current = true;
|
|
55
|
+
|
|
56
|
+
const providerConfigs = {
|
|
57
|
+
github,
|
|
58
|
+
linkedin,
|
|
59
|
+
google,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const providerConfig = providerConfigs[identityProvider];
|
|
63
|
+
|
|
64
|
+
if (!providerConfig) {
|
|
65
|
+
console.error("Could not determine OAuth provider or redirect URI");
|
|
66
|
+
navigate("/login?error=" + encodeURIComponent("Invalid OAuth provider"));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const redirectUri = providerConfig.redirectUri;
|
|
71
|
+
|
|
72
|
+
let projectId;
|
|
73
|
+
const defaultProjectId = "05708cf7-b9bf-4209-95fe-68d9138d2032";
|
|
74
|
+
|
|
75
|
+
if (projectBar) {
|
|
76
|
+
projectId = storage.get("projectId");
|
|
77
|
+
} else {
|
|
78
|
+
projectId = defaultProjectId;
|
|
79
|
+
storage.set("projectId", projectId);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
oauth
|
|
83
|
+
.post("/oauth", {
|
|
84
|
+
...(projectId && { projectId }),
|
|
85
|
+
appId,
|
|
86
|
+
code,
|
|
87
|
+
redirectUri,
|
|
88
|
+
identityProvider: identityProvider,
|
|
89
|
+
grant_type: "authorization_code",
|
|
90
|
+
})
|
|
91
|
+
.then(({ data }) => {
|
|
92
|
+
const accessToken = data.accessToken;
|
|
93
|
+
const refreshToken = data.refreshToken;
|
|
94
|
+
const userInfo = data.user;
|
|
95
|
+
|
|
96
|
+
storage.set("link", "accessToken", accessToken);
|
|
97
|
+
storage.set("link", "refreshToken", refreshToken);
|
|
98
|
+
// TODO - update provider info
|
|
99
|
+
storage.set("link", "identityProvider", identityProvider);
|
|
100
|
+
|
|
101
|
+
dispatch({ type: "LOGIN", payload: { user: userInfo } });
|
|
102
|
+
|
|
103
|
+
window.history.replaceState(
|
|
104
|
+
{},
|
|
105
|
+
document.title,
|
|
106
|
+
window.location.pathname
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
navigate("/");
|
|
110
|
+
})
|
|
111
|
+
.catch((error) => {
|
|
112
|
+
console.error("OAuth error:", error);
|
|
113
|
+
const errorMessage =
|
|
114
|
+
error.response?.data?.message ||
|
|
115
|
+
error.response?.data ||
|
|
116
|
+
error.message ||
|
|
117
|
+
"Authentication failed";
|
|
118
|
+
|
|
119
|
+
navigate("/login?error=" + encodeURIComponent(errorMessage));
|
|
120
|
+
});
|
|
121
|
+
}, [location.search, navigate]);
|
|
122
|
+
|
|
123
|
+
return <Page title={`${name} - Callback`}></Page>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export default Callback;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import Iconify from "../components/Iconify";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useLocation } from "react-router-dom";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Box,
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogContentText,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
Stack,
|
|
12
|
+
Typography,
|
|
13
|
+
} from "@mui/material";
|
|
14
|
+
|
|
15
|
+
const ConfigErrorDialog = () => {
|
|
16
|
+
const location = useLocation();
|
|
17
|
+
|
|
18
|
+
const { error, file } = location.state || { error: "", file: "" };
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Dialog fullWidth open>
|
|
22
|
+
<DialogTitle>
|
|
23
|
+
<Stack direction="row" alignItems="center">
|
|
24
|
+
<Box
|
|
25
|
+
component="span"
|
|
26
|
+
sx={{ display: "flex", alignItems: "center", mr: 1 }}
|
|
27
|
+
>
|
|
28
|
+
<Iconify
|
|
29
|
+
sx={{ color: (theme) => theme.palette.error.main }}
|
|
30
|
+
width={24}
|
|
31
|
+
icon="icon-park-twotone:error"
|
|
32
|
+
/>
|
|
33
|
+
</Box>
|
|
34
|
+
Config Validation Error
|
|
35
|
+
</Stack>
|
|
36
|
+
</DialogTitle>
|
|
37
|
+
<DialogContent
|
|
38
|
+
sx={{ padding: "10px", display: "flex", justifyContent: "center" }}
|
|
39
|
+
>
|
|
40
|
+
<DialogContentText>
|
|
41
|
+
<Typography variant="body1">{error}</Typography>
|
|
42
|
+
<Typography variant="body2">{`- ${file}`}</Typography>
|
|
43
|
+
</DialogContentText>
|
|
44
|
+
</DialogContent>
|
|
45
|
+
</Dialog>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default ConfigErrorDialog;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import CognitoLogin from "../widgets/Login/CognitoLogin";
|
|
2
|
+
import LoginForm from "../widgets/LoginForm/LoginForm";
|
|
3
|
+
import Page from "../layouts/Page";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import config from "../config/config";
|
|
6
|
+
import { storage } from "@nucleoidjs/webstorage";
|
|
7
|
+
import { useEffect } from "react";
|
|
8
|
+
import { useNavigate } from "react-router-dom";
|
|
9
|
+
function LoginPage() {
|
|
10
|
+
const { name, template, credentials } = config();
|
|
11
|
+
const formColor = "#a8a9ad";
|
|
12
|
+
const navigate = useNavigate();
|
|
13
|
+
|
|
14
|
+
function token() {
|
|
15
|
+
if (
|
|
16
|
+
storage.get("link", "refreshToken") &&
|
|
17
|
+
storage.get("link", "accessToken")
|
|
18
|
+
) {
|
|
19
|
+
return true;
|
|
20
|
+
} else {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (token()) {
|
|
27
|
+
navigate("/");
|
|
28
|
+
}
|
|
29
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
|
+
}, [navigate]);
|
|
31
|
+
|
|
32
|
+
if (credentials?.provider === "COGNITO") {
|
|
33
|
+
return <CognitoLogin />;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Page title={`Sign in to ${name}`}>
|
|
38
|
+
<LoginForm icon={template.login.icon} name={name} formColor={formColor} />
|
|
39
|
+
</Page>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default LoginPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RouterLink } from "./router-link";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Link } from "react-router-dom";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
const RouterLink = forwardRef(({ href, ...other }, ref) => (
|
|
8
|
+
<Link ref={ref} to={href} {...other} />
|
|
9
|
+
));
|
|
10
|
+
|
|
11
|
+
export default RouterLink;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { matchPath, useLocation } from "react-router-dom";
|
|
2
|
+
|
|
3
|
+
// ----------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
export function useActiveLink(path, deep = true) {
|
|
6
|
+
const { pathname } = useLocation();
|
|
7
|
+
|
|
8
|
+
const normalActive = path
|
|
9
|
+
? !!matchPath({ path, end: true }, pathname)
|
|
10
|
+
: false;
|
|
11
|
+
|
|
12
|
+
const deepActive = path ? !!matchPath({ path, end: false }, pathname) : false;
|
|
13
|
+
|
|
14
|
+
return deep ? deepActive : normalActive;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useLocation } from "react-router-dom";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
export function usePathname() {
|
|
7
|
+
const { pathname } = useLocation();
|
|
8
|
+
|
|
9
|
+
return useMemo(() => pathname, [pathname]);
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useNavigate } from "react-router-dom";
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
export function useRouter() {
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
|
|
9
|
+
const router = useMemo(
|
|
10
|
+
() => ({
|
|
11
|
+
back: () => navigate(-1),
|
|
12
|
+
forward: () => navigate(1),
|
|
13
|
+
reload: () => window.location.reload(),
|
|
14
|
+
push: (href) => navigate(href),
|
|
15
|
+
replace: (href) => navigate(href, { replace: true }),
|
|
16
|
+
}),
|
|
17
|
+
[navigate]
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
return router;
|
|
21
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { FlowChart } from "../lib/FlowChart";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
const treeToLinked = (tree) => {
|
|
5
|
+
if (!tree) return { nodes: {}, roots: [] };
|
|
6
|
+
|
|
7
|
+
const nodes = {};
|
|
8
|
+
const roots = [];
|
|
9
|
+
|
|
10
|
+
const walk = (node, parentId = null) => {
|
|
11
|
+
if (!node || !node.id) return;
|
|
12
|
+
|
|
13
|
+
const { children, ...rest } = node;
|
|
14
|
+
if (!nodes[node.id]) {
|
|
15
|
+
nodes[node.id] = { ...rest, id: node.id };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const kids = Array.isArray(children) ? children : [];
|
|
19
|
+
const nextIds = kids.map((c) => c.id).filter(Boolean);
|
|
20
|
+
|
|
21
|
+
if (nextIds.length === 1) {
|
|
22
|
+
nodes[node.id].next = nextIds[0];
|
|
23
|
+
} else if (nextIds.length > 1) {
|
|
24
|
+
nodes[node.id].next = nextIds;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (parentId) {
|
|
28
|
+
nodes[node.id].previous = parentId;
|
|
29
|
+
} else if (!roots.includes(node.id)) {
|
|
30
|
+
roots.push(node.id);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
kids.forEach((child) => walk(child, node.id));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
walk(tree);
|
|
37
|
+
return { nodes, roots };
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const arrayToLinked = (arr) => {
|
|
41
|
+
const a = Array.isArray(arr) ? [...arr] : [];
|
|
42
|
+
if (!a.length) return { nodes: {}, roots: [] };
|
|
43
|
+
|
|
44
|
+
a.sort((x, y) => {
|
|
45
|
+
const dx = x?.createdAt ? new Date(x.createdAt).getTime() : 0;
|
|
46
|
+
const dy = y?.createdAt ? new Date(y.createdAt).getTime() : 0;
|
|
47
|
+
return dx - dy;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const nodes = {};
|
|
51
|
+
const ids = [];
|
|
52
|
+
|
|
53
|
+
for (let i = 0; i < a.length; i++) {
|
|
54
|
+
const id = a[i]?.id ?? `auto-${i}`;
|
|
55
|
+
ids.push(id);
|
|
56
|
+
nodes[id] = { ...(a[i] || {}), id };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
for (let i = 0; i < ids.length; i++) {
|
|
60
|
+
const cur = ids[i];
|
|
61
|
+
const prev = ids[i - 1];
|
|
62
|
+
const nxt = ids[i + 1];
|
|
63
|
+
if (prev) nodes[cur].previous = prev;
|
|
64
|
+
if (nxt) nodes[cur].next = nxt;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return { nodes, roots: [ids[0]] };
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
title: "Components/FlowChart",
|
|
72
|
+
component: FlowChart,
|
|
73
|
+
parameters: {
|
|
74
|
+
layout: "centered",
|
|
75
|
+
},
|
|
76
|
+
tags: ["autodocs"],
|
|
77
|
+
argTypes: {
|
|
78
|
+
data: {
|
|
79
|
+
control: "object",
|
|
80
|
+
description:
|
|
81
|
+
"Linked graph data: { nodes: { [id]: { id, next?, previous?, ... } }, roots?: string[] }",
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
control: "object",
|
|
85
|
+
description:
|
|
86
|
+
"Styling tokens or a style object; can also be a function (node) => tokens.",
|
|
87
|
+
},
|
|
88
|
+
type: {
|
|
89
|
+
control: "text",
|
|
90
|
+
description: 'Type of the flow chart, e.g. "default" or "task".',
|
|
91
|
+
},
|
|
92
|
+
variant: {
|
|
93
|
+
control: {
|
|
94
|
+
type: "select",
|
|
95
|
+
options: ["simple", "card", "pill", "decision"],
|
|
96
|
+
},
|
|
97
|
+
description: "Visual variant of the flow chart nodes.",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const simpleTree = {
|
|
103
|
+
id: "root",
|
|
104
|
+
label: "Start",
|
|
105
|
+
children: [
|
|
106
|
+
{ id: "step1", label: "Step 1", children: [] },
|
|
107
|
+
{ id: "step2", label: "Step 2", children: [] },
|
|
108
|
+
],
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const SimpleTextNodes = {
|
|
112
|
+
args: {
|
|
113
|
+
type: "default",
|
|
114
|
+
data: treeToLinked(simpleTree),
|
|
115
|
+
variant: "simple",
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const cardTree = {
|
|
120
|
+
id: "1",
|
|
121
|
+
title: "Project Alpha",
|
|
122
|
+
description: "Main project",
|
|
123
|
+
status: "active",
|
|
124
|
+
children: [
|
|
125
|
+
{
|
|
126
|
+
id: "2",
|
|
127
|
+
title: "Task 1",
|
|
128
|
+
description: "First task",
|
|
129
|
+
status: "completed",
|
|
130
|
+
children: [],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "3",
|
|
134
|
+
title: "Task 2",
|
|
135
|
+
description: "Second task",
|
|
136
|
+
status: "in-progress",
|
|
137
|
+
children: [],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const CardNodes = {
|
|
143
|
+
args: {
|
|
144
|
+
type: "default",
|
|
145
|
+
data: treeToLinked(cardTree),
|
|
146
|
+
variant: "card",
|
|
147
|
+
style: {
|
|
148
|
+
border: "light",
|
|
149
|
+
size: "small",
|
|
150
|
+
shadow: "heavy",
|
|
151
|
+
shape: "square",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const OrganizationalChart = {
|
|
157
|
+
render: () => {
|
|
158
|
+
const orgTree = {
|
|
159
|
+
id: "add6dfa4-45ba-4da2-bc5c-5a529610b52f",
|
|
160
|
+
name: "Rebellion Coffee Shop Team",
|
|
161
|
+
icon: ":ph:coffee-bean-duotone:",
|
|
162
|
+
description: null,
|
|
163
|
+
type: null,
|
|
164
|
+
organizationId: "dfb990bb-81dd-4584-82ce-050eb8f6a12f",
|
|
165
|
+
coach: "Elijah",
|
|
166
|
+
colleagues: [
|
|
167
|
+
{
|
|
168
|
+
id: "00db1bd4-4829-40f2-8b99-d2e42342157e",
|
|
169
|
+
name: "Ava",
|
|
170
|
+
avatar: ":1:",
|
|
171
|
+
character: "Funny, friendly, and a coffee lover",
|
|
172
|
+
title: "Barista",
|
|
173
|
+
role: "Barista Expert",
|
|
174
|
+
teamId: "add6dfa4-45ba-4da2-bc5c-5a529610b52f",
|
|
175
|
+
aiEngineId: "289a3c9a-f23b-421a-ac6e-f14052a2d57c",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "ef906c5d-cafe-4518-9edc-b80c605df58e",
|
|
179
|
+
name: "Taylor",
|
|
180
|
+
title: "Customer Service Representative",
|
|
181
|
+
avatar: ":2:",
|
|
182
|
+
character: "Friendly, helpful, and a team player",
|
|
183
|
+
role: "Customer Service Representative",
|
|
184
|
+
teamId: "e6d4744d-a11b-4c75-acad-e24a02903729",
|
|
185
|
+
aiEngineId: "289a3c9a-f23b-421a-ac6e-f14052a2d57c",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const data = treeToLinked(orgTree);
|
|
191
|
+
|
|
192
|
+
return <FlowChart type="teamChart" data={data} variant="simple" />;
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export const DecisionTree = {
|
|
197
|
+
render: () => {
|
|
198
|
+
const decisionTree = {
|
|
199
|
+
id: "start",
|
|
200
|
+
label: "Start Process",
|
|
201
|
+
type: "start",
|
|
202
|
+
children: [
|
|
203
|
+
{
|
|
204
|
+
id: "check",
|
|
205
|
+
label: "Valid Input?",
|
|
206
|
+
type: "decision",
|
|
207
|
+
children: [
|
|
208
|
+
{
|
|
209
|
+
id: "process",
|
|
210
|
+
label: "Process Data",
|
|
211
|
+
type: "process",
|
|
212
|
+
children: [
|
|
213
|
+
{ id: "success", label: "Success", type: "end", children: [] },
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "error",
|
|
218
|
+
label: "Show Error",
|
|
219
|
+
type: "process",
|
|
220
|
+
children: [
|
|
221
|
+
{ id: "end", label: "End", type: "end", children: [] },
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const data = treeToLinked(decisionTree);
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
<FlowChart
|
|
233
|
+
data={data}
|
|
234
|
+
variant="decision"
|
|
235
|
+
style={{ connectorType: "curved" }}
|
|
236
|
+
/>
|
|
237
|
+
);
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const deepTree = {
|
|
242
|
+
id: "root",
|
|
243
|
+
label: "Root",
|
|
244
|
+
children: [
|
|
245
|
+
{
|
|
246
|
+
id: "branch1",
|
|
247
|
+
label: "Branch 1",
|
|
248
|
+
children: [
|
|
249
|
+
{
|
|
250
|
+
id: "leaf1-1",
|
|
251
|
+
label: "Leaf 1.1",
|
|
252
|
+
children: [{ id: "leaf1-1-1", label: "Leaf 1.1.1", children: [] }],
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "branch2",
|
|
258
|
+
label: "Branch 2",
|
|
259
|
+
children: [
|
|
260
|
+
{ id: "leaf2-1", label: "Leaf 2.1", children: [] },
|
|
261
|
+
{ id: "leaf2-2", label: "Leaf 2.2", children: [] },
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export const DeepHierarchy = {
|
|
268
|
+
args: {
|
|
269
|
+
type: "default",
|
|
270
|
+
data: treeToLinked(deepTree),
|
|
271
|
+
variant: "simple",
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export const TaskFlow = {
|
|
276
|
+
render: () => {
|
|
277
|
+
const timeline = [
|
|
278
|
+
{
|
|
279
|
+
id: "773b051a-326a-4140-98c4-d63df8aba39f",
|
|
280
|
+
action: "PLATFORM:scrape_website",
|
|
281
|
+
parameters: {
|
|
282
|
+
url: "https://nucleoid.com/domain-ownership.html",
|
|
283
|
+
},
|
|
284
|
+
result:
|
|
285
|
+
'\n URL: https://nucleoid.com/domain-ownership.html\n Title: \n Content: This domain "nucleoid.com" is owned by Can Mingir for Nucleoid Ltd. Co. Contact: canmingir@nucleoid.com Phone: (914) 525-5929 Address: 2972 Webb Bridge Rd, Alpharetta, GA 30009, United States\n ',
|
|
286
|
+
comment: "Scrape the website to extract the list of emails",
|
|
287
|
+
status: "COMPLETED",
|
|
288
|
+
taskId: "6ce93ce9-d923-46ba-b8a9-1a4cea50ca07",
|
|
289
|
+
createdAt: "2025-11-10T13:09:53.188Z",
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "e6b12140-f922-4fa5-9e9d-e3064909716c",
|
|
293
|
+
action: "PLATFORM:llm",
|
|
294
|
+
parameters: {
|
|
295
|
+
message:
|
|
296
|
+
'Extract the email addresses from the scraped website content:\n\nThis domain "nucleoid.com" is owned by Can Mingir for Nucleoid Ltd. Co. Contact: canmingir@nucleoid.com Phone: (914) 525-5929 Address: 2972 Webb Bridge Rd, Alpharetta, GA 30009, United States',
|
|
297
|
+
},
|
|
298
|
+
result: '["canmingir@nucleoid.com"]',
|
|
299
|
+
comment: "Extract the email addresses from the scraped website content",
|
|
300
|
+
status: "COMPLETED",
|
|
301
|
+
taskId: "6ce93ce9-d923-46ba-b8a9-1a4cea50ca07",
|
|
302
|
+
createdAt: "2025-11-10T13:09:59.261Z",
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "05fba361-4071-4db7-88e8-4f1b6fabddba",
|
|
306
|
+
action: "PLATFORM:complete",
|
|
307
|
+
parameters: {},
|
|
308
|
+
result: "Task completed successfully",
|
|
309
|
+
comment:
|
|
310
|
+
"Task completed after extracting email addresses from the website",
|
|
311
|
+
status: "COMPLETED",
|
|
312
|
+
taskId: "6ce93ce9-d923-46ba-b8a9-1a4cea50ca07",
|
|
313
|
+
createdAt: "2025-11-10T13:10:02.653Z",
|
|
314
|
+
},
|
|
315
|
+
];
|
|
316
|
+
|
|
317
|
+
const data = arrayToLinked(timeline);
|
|
318
|
+
|
|
319
|
+
return (
|
|
320
|
+
<FlowChart
|
|
321
|
+
type="task"
|
|
322
|
+
data={data}
|
|
323
|
+
variant="pill"
|
|
324
|
+
style={{
|
|
325
|
+
visible: true,
|
|
326
|
+
delay: 0,
|
|
327
|
+
isLoading: false,
|
|
328
|
+
connectorType: "curved",
|
|
329
|
+
}}
|
|
330
|
+
/>
|
|
331
|
+
);
|
|
332
|
+
},
|
|
333
|
+
};
|