@datalayer/core 0.0.3 → 0.0.5
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/README.md +114 -3
- package/lib/App.css +2 -2
- package/lib/App.d.ts +1 -1
- package/lib/App.js +9 -9
- package/lib/__tests__/index.test.js +5 -5
- package/lib/api/DatalayerApi.d.ts +1 -1
- package/lib/api/DatalayerApi.js +3 -3
- package/lib/api/index.d.ts +3 -3
- package/lib/api/index.js +3 -3
- package/lib/api/runtimes/actions.js +22 -23
- package/lib/api/runtimes/settings.js +3 -3
- package/lib/api/runtimes/snapshots.d.ts +1 -1
- package/lib/api/runtimes/snapshots.js +8 -8
- package/lib/api/runtimes/utils.js +1 -4
- package/lib/collaboration/DatalayerCollaboration.d.ts +9 -0
- package/lib/collaboration/DatalayerCollaboration.js +28 -0
- package/lib/collaboration/DatalayerCollaborationProvider.d.ts +54 -0
- package/lib/collaboration/DatalayerCollaborationProvider.js +162 -0
- package/lib/collaboration/index.d.ts +2 -0
- package/lib/collaboration/index.js +6 -0
- package/lib/components/avatars/BoringAvatar.d.ts +1 -1
- package/lib/components/avatars/BoringAvatar.js +2 -2
- package/lib/components/avatars/UserProfileAvatar.js +2 -9
- package/lib/components/banners/NoAutomationBanner.js +4 -4
- package/lib/components/buttons/DownloadCSVButton.js +1 -1
- package/lib/components/buttons/UploadButton.js +1 -1
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/checkout/StripeCheckout.js +6 -6
- package/lib/components/confetti/ConfettiSuccess.js +1 -1
- package/lib/components/context/OrganizationSelect.js +5 -5
- package/lib/components/context/SpaceSelect.js +7 -7
- package/lib/components/display/AvatarSkeleton.js +1 -1
- package/lib/components/display/CenteredSpinner.js +4 -4
- package/lib/components/display/CodePreview.js +4 -4
- package/lib/components/display/DatalayerBox.js +13 -14
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/HorizontalCenter.js +1 -1
- package/lib/components/display/JupyterDialog.js +17 -15
- package/lib/components/display/NavLink.d.ts +4 -2
- package/lib/components/display/NavLink.js +6 -4
- package/lib/components/display/NotebookSkeleton.js +2 -2
- package/lib/components/display/Placeholder.js +1 -1
- package/lib/components/display/ToTopBranded.js +1 -1
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.js +1 -1
- package/lib/components/flashes/FlashClosable.js +11 -11
- package/lib/components/flashes/FlashDisclaimer.js +2 -3
- package/lib/components/flashes/FlashGuest.js +3 -4
- package/lib/components/flashes/FlashSurveys.js +3 -4
- package/lib/components/flashes/FlashUnauthorized.js +2 -2
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/flashes/surveys/Survey2025_1.js +62 -85
- package/lib/components/iam/ExternalTokenSilentLogin.js +6 -4
- package/lib/components/icons/ArtifactIcon.d.ts +2 -2
- package/lib/components/icons/ArtifactIcon.js +39 -39
- package/lib/components/labels/VisibilityLabel.js +2 -5
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/landings/StepBlock.js +1 -1
- package/lib/components/navbar/NavigationVisbilityObserver.js +2 -2
- package/lib/components/navbar/SubdomainNavBar.js +45 -23
- package/lib/components/navbar/SubdomainNavBar.module.css +33 -14
- package/lib/components/nbgrader/NbGradesDetails.d.ts +1 -1
- package/lib/components/nbgrader/NbGradesDetails.js +5 -8
- package/lib/components/notebooks/JupyterNotebook.js +5 -5
- package/lib/components/notebooks/JupyterNotebookToolbar.js +3 -3
- package/lib/components/primer/Helper.d.ts +1 -1
- package/lib/components/primer/Helper.js +5 -3
- package/lib/components/primer/Portals.d.ts +1 -1
- package/lib/components/primer/Portals.js +2 -2
- package/lib/components/primer/Styles.js +1 -1
- package/lib/components/progress/ConsumptionBar.js +2 -2
- package/lib/components/progress/CreditsIndicator.d.ts +1 -1
- package/lib/components/progress/CreditsIndicator.js +4 -7
- package/lib/components/progress/ProgressRing.js +2 -2
- package/lib/components/runtimes/RuntimeCellVariables.js +9 -9
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +3 -3
- package/lib/components/runtimes/RuntimeLauncherDialog.js +30 -34
- package/lib/components/runtimes/RuntimePickerBase.js +42 -31
- package/lib/components/runtimes/RuntimePickerCell.js +9 -12
- package/lib/components/runtimes/RuntimePickerNotebook.js +44 -44
- package/lib/components/runtimes/RuntimeReservationControl.js +10 -15
- package/lib/components/runtimes/RuntimeSimplePicker.js +9 -12
- package/lib/components/runtimes/RuntimeUtils.js +22 -12
- package/lib/components/runtimes/RuntimeVariables.js +7 -7
- package/lib/components/screenshot/ScreenCapture.js +9 -13
- package/lib/components/screenshot/ScreenCaptureButton.d.ts +1 -1
- package/lib/components/screenshot/ScreenCaptureButton.js +14 -8
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +19 -17
- package/lib/components/snippets/SnippetDialog.js +5 -5
- package/lib/components/storage/ContentsBrowser.js +63 -56
- package/lib/components/storage/ContentsItems.js +10 -8
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentItemStatus.js +35 -16
- package/lib/components/subnav/SubNav.d.ts +1 -1
- package/lib/components/subnav/SubNav.js +30 -15
- package/lib/components/subnav/SubNav.module.css +55 -21
- package/lib/components/tables/DataTable.js +1 -4
- package/lib/components/text-reveal/TextRevealAnimation.js +7 -2
- package/lib/components/text-reveal/TextRevealAnimation.module.css +4 -2
- package/lib/components/tokens/SpaceVariantToken.d.ts +1 -1
- package/lib/components/tokens/SpaceVariantToken.js +5 -5
- package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -3
- package/lib/components/users/PeerIndicator.d.ts +1 -1
- package/lib/components/users/PeerIndicator.js +5 -5
- package/lib/config/Configuration.d.ts +48 -0
- package/lib/config/Configuration.js +42 -0
- package/lib/config/integrations/Loom.js +3 -3
- package/lib/examples/CellExample.d.ts +2 -2
- package/lib/examples/CellExample.js +34 -3
- package/lib/examples/DatalayerNotebookExample.d.ts +16 -0
- package/lib/examples/DatalayerNotebookExample.js +75 -0
- package/lib/examples/NativeNavigationExample.d.ts +8 -0
- package/lib/examples/NativeNavigationExample.js +97 -0
- package/lib/examples/NotebookExample.d.ts +1 -3
- package/lib/examples/NotebookExample.js +9 -7
- package/lib/examples/NotebookMutationsKernel.d.ts +2 -0
- package/lib/examples/NotebookMutationsKernel.js +115 -0
- package/lib/examples/NotebookMutationsServiceManager.d.ts +2 -0
- package/lib/examples/NotebookMutationsServiceManager.js +107 -0
- package/lib/examples/ReactRouterExample.d.ts +6 -0
- package/lib/examples/ReactRouterExample.js +175 -0
- package/lib/examples/example-selector.d.ts +22 -0
- package/lib/examples/example-selector.js +45 -0
- package/lib/examples/index.d.ts +2 -0
- package/lib/examples/index.js +6 -0
- package/lib/examples/main.js +153 -0
- package/lib/examples/notebooks/IPyWidgetsExample.ipynb.json +101 -0
- package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
- package/lib/examples/{NotebookExample1.ipynb.json → notebooks/Lite.ipynb.json} +45 -53
- package/lib/examples/notebooks/Matplotlib.ipynb.json +137 -0
- package/lib/examples/notebooks/NotebookExample1.ipynb.json +126 -0
- package/lib/examples/notebooks/NotebookExample2.ipynb.json +48 -0
- package/lib/examples/notebooks/NotebookOutputs.ipynb.json +49 -0
- package/lib/examples/notebooks/NotebookToCExample.ipynb.json +102 -0
- package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
- package/lib/examples/notebooks/OutputIPyWidgetsExample.js +153 -0
- package/lib/examples/notebooks/PyGWalker.ipynb.json +55 -0
- package/lib/hooks/assets/OutputshotPlaceholders.d.ts +10 -10
- package/lib/hooks/assets/OutputshotPlaceholders.js +10 -10
- package/lib/hooks/index.d.ts +29 -28
- package/lib/hooks/index.js +29 -28
- package/lib/hooks/layouts/LayoutBackdrop.js +3 -6
- package/lib/hooks/layouts/LayoutScreenshot.css +1 -1
- package/lib/hooks/layouts/LayoutScreenshot.js +6 -6
- package/lib/hooks/useAIAgents.d.ts +1 -1
- package/lib/hooks/useAIAgents.js +6 -6
- package/lib/hooks/useAuthorization.js +4 -4
- package/lib/hooks/useBackdrop.js +7 -7
- package/lib/hooks/useBackdropJupyterLab.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.js +4 -4
- package/lib/hooks/useCache.d.ts +6 -2
- package/lib/hooks/useCache.js +233 -179
- package/lib/hooks/useCellOutputshot.js +3 -6
- package/lib/hooks/useContainsFocus.js +2 -1
- package/lib/hooks/useDatalayer.js +5 -3
- package/lib/hooks/useError.d.ts +1 -1
- package/lib/hooks/useError.js +2 -2
- package/lib/hooks/useExternalScript.js +4 -4
- package/lib/hooks/useFocusTrap.js +2 -1
- package/lib/hooks/useIAM.js +4 -5
- package/lib/hooks/useId.js +3 -3
- package/lib/hooks/useJupyterLabTheme.js +3 -1
- package/lib/hooks/useLocation.d.ts +22 -0
- package/lib/hooks/useLocation.js +149 -0
- package/lib/hooks/useLocationHandles.d.ts +2 -2
- package/lib/hooks/useLocationHandles.js +6 -4
- package/lib/hooks/useNavigate.d.ts +5 -1
- package/lib/hooks/useNavigate.js +62 -7
- package/lib/hooks/useNotebookAIAgent.js +3 -1
- package/lib/hooks/useParams.d.ts +5 -0
- package/lib/hooks/useParams.js +112 -0
- package/lib/hooks/useRuntimes.js +2 -2
- package/lib/hooks/useScreenshot.js +5 -5
- package/lib/hooks/useToast.js +15 -13
- package/lib/hooks/useUpload.js +9 -9
- package/lib/hooks/useUser.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +6 -3
- package/lib/index.js +7 -3
- package/lib/mocks/components/FlashMock.js +4 -4
- package/lib/mocks/hooks/rests/rests.js +15 -18
- package/lib/mocks/hooks/useDatalayerMock.d.ts +2 -2
- package/lib/mocks/hooks/useDatalayerMock.js +7 -7
- package/lib/mocks/models/CodeBlockMock.js +1 -1
- package/lib/mocks/models/CodelineMock.js +1 -1
- package/lib/mocks/models/CourseMock.d.ts +1 -1
- package/lib/mocks/models/CourseMock.js +10 -10
- package/lib/mocks/models/InviteMock.d.ts +1 -1
- package/lib/mocks/models/InviteMock.js +21 -6
- package/lib/mocks/models/JupyterLabUserMock.js +2 -2
- package/lib/mocks/models/OrganisationMock.d.ts +1 -1
- package/lib/mocks/models/OrganisationMock.js +11 -7
- package/lib/mocks/models/SchoolMock.d.ts +1 -1
- package/lib/mocks/models/SchoolMock.js +6 -6
- package/lib/mocks/models/SpaceMock.d.ts +1 -1
- package/lib/mocks/models/SpaceMock.js +9 -9
- package/lib/mocks/models/TeamMock.d.ts +1 -1
- package/lib/mocks/models/TeamMock.js +6 -6
- package/lib/mocks/models/UserMock.d.ts +1 -1
- package/lib/mocks/models/UserMock.js +4 -6
- package/lib/mocks/views/ActionMenuMock.js +1 -1
- package/lib/mocks/views/ChartMock.js +3 -3
- package/lib/mocks/views/ChartMockOptions.js +24 -24
- package/lib/mocks/views/DashboardMock.js +74 -74
- package/lib/mocks/views/FormMock.js +1 -1
- package/lib/mocks/views/TableMock.js +1 -1
- package/lib/models/Account.d.ts +2 -2
- package/lib/models/Assignment.d.ts +2 -2
- package/lib/models/Cell.d.ts +1 -1
- package/lib/models/CodeBlock.d.ts +1 -1
- package/lib/models/CodefeedBlocks.d.ts +2 -2
- package/lib/models/Contact.d.ts +1 -1
- package/lib/models/Contact.js +14 -14
- package/lib/models/ContactIAMProvider.js +2 -2
- package/lib/models/Course.d.ts +7 -7
- package/lib/models/Dataset.d.ts +1 -1
- package/lib/models/Dean.d.ts +1 -1
- package/lib/models/Document.d.ts +1 -1
- package/lib/models/Environment.d.ts +2 -2
- package/lib/models/Exercise.d.ts +1 -1
- package/lib/models/IAMProviderLinked.js +1 -1
- package/lib/models/Instructor.d.ts +1 -1
- package/lib/models/Invite.d.ts +2 -2
- package/lib/models/Invite.js +1 -1
- package/lib/models/Item.d.ts +5 -5
- package/lib/models/LandingRoles.js +18 -18
- package/lib/models/Lesson.d.ts +1 -1
- package/lib/models/Member.d.ts +1 -1
- package/lib/models/Notebook.d.ts +1 -1
- package/lib/models/Organization.d.ts +4 -4
- package/lib/models/Organization.js +2 -2
- package/lib/models/OrganizationMember.d.ts +2 -2
- package/lib/models/Page.js +4 -2
- package/lib/models/PageTag.d.ts +1 -1
- package/lib/models/PageTag.js +56 -9
- package/lib/models/Profile.d.ts +1 -1
- package/lib/models/RolesOrganization.d.ts +1 -1
- package/lib/models/RolesOrganization.js +4 -12
- package/lib/models/RolesPlatform.d.ts +1 -1
- package/lib/models/RolesPlatform.js +12 -34
- package/lib/models/RolesTeam.d.ts +1 -1
- package/lib/models/RolesTeam.js +3 -10
- package/lib/models/Runtime.js +4 -4
- package/lib/models/RuntimeSnapshot.js +1 -1
- package/lib/models/School.d.ts +4 -4
- package/lib/models/Space.d.ts +5 -5
- package/lib/models/Space.js +3 -3
- package/lib/models/SpaceItem.d.ts +8 -8
- package/lib/models/SpaceMember.d.ts +2 -2
- package/lib/models/Student.d.ts +2 -2
- package/lib/models/StudentItem.d.ts +3 -3
- package/lib/models/Team.d.ts +3 -3
- package/lib/models/Team.js +2 -2
- package/lib/models/TeamMember.d.ts +2 -2
- package/lib/models/URN.js +1 -1
- package/lib/models/User.d.ts +2 -2
- package/lib/models/User.js +5 -3
- package/lib/models/UserOnboarding.d.ts +1 -1
- package/lib/models/UserOnboarding.js +7 -7
- package/lib/models/UserSettings.js +2 -2
- package/lib/models/index.d.ts +2 -2
- package/lib/models/index.js +2 -2
- package/lib/navigation/adapters/native.d.ts +11 -0
- package/lib/navigation/adapters/native.js +48 -0
- package/lib/navigation/adapters/nextjs.d.ts +9 -0
- package/lib/navigation/adapters/nextjs.js +35 -0
- package/lib/navigation/adapters/react-router.d.ts +4 -0
- package/lib/navigation/adapters/react-router.js +12 -0
- package/lib/navigation/components.d.ts +20 -0
- package/lib/navigation/components.js +36 -0
- package/lib/navigation/index.d.ts +4 -0
- package/lib/navigation/index.js +12 -0
- package/lib/routes/index.d.ts +1 -1
- package/lib/routes/index.js +1 -1
- package/lib/services/DatalayerServiceManager.d.ts +22 -0
- package/lib/services/DatalayerServiceManager.js +69 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +7 -0
- package/lib/services/reconnectToRuntime.d.ts +32 -0
- package/lib/services/reconnectToRuntime.js +59 -0
- package/lib/state/State.d.ts +1 -1
- package/lib/state/State.js +1 -1
- package/lib/state/index.d.ts +1 -1
- package/lib/state/index.js +1 -1
- package/lib/state/storage/IAMStorage.js +14 -2
- package/lib/state/storage/index.d.ts +1 -1
- package/lib/state/storage/index.js +1 -1
- package/lib/state/substates/AIAgentState.js +4 -2
- package/lib/state/substates/CellState.js +6 -5
- package/lib/state/substates/CoreState.d.ts +1 -1
- package/lib/state/substates/CoreState.js +26 -17
- package/lib/state/substates/DatasourceState.js +1 -1
- package/lib/state/substates/IAMState.d.ts +4 -0
- package/lib/state/substates/IAMState.js +39 -23
- package/lib/state/substates/JupyterLabState.js +1 -1
- package/lib/state/substates/LayoutState.d.ts +2 -2
- package/lib/state/substates/LayoutState.js +41 -28
- package/lib/state/substates/OrganizationState.js +1 -1
- package/lib/state/substates/RuntimesState.js +11 -6
- package/lib/state/substates/SpaceState.js +1 -1
- package/lib/state/substates/SurveysState.js +4 -4
- package/lib/state/substates/TeamState.js +1 -1
- package/lib/test-setup.js +25 -3
- package/lib/theme/DatalayerTheme.js +1 -1
- package/lib/theme/DatalayerThemeProvider.js +17 -14
- package/lib/theme/Palette.js +1 -1
- package/lib/utils/Avatar.js +2 -2
- package/lib/utils/Browser.js +6 -6
- package/lib/utils/Cells.d.ts +1 -1
- package/lib/utils/Cookie.js +1 -1
- package/lib/utils/Date.js +2 -2
- package/lib/utils/Download.js +5 -3
- package/lib/utils/DownloadFile.js +4 -2
- package/lib/utils/Env.js +2 -1
- package/lib/utils/Lazy.d.ts +1 -1
- package/lib/utils/Lazy.js +2 -2
- package/lib/utils/Name.js +10 -8
- package/lib/utils/Notebook.d.ts +1 -1
- package/lib/utils/Notebook.js +3 -3
- package/lib/utils/Number.js +13 -9
- package/lib/utils/Plots.js +4 -4
- package/lib/utils/Screenshot.js +1 -1
- package/lib/utils/Sleep.js +1 -1
- package/lib/utils/Snapshot.js +2 -2
- package/lib/utils/String.js +2 -2
- package/lib/utils/Uri.js +1 -1
- package/lib/utils/WithSuspense.js +3 -6
- package/lib/utils/logger.d.ts +16 -0
- package/lib/utils/logger.js +52 -0
- package/package.json +49 -5
- package/lib/__tests__/App.test.js +0 -17
- /package/lib/{__tests__/App.test.d.ts → examples/main.d.ts} +0 -0
|
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { init } from 'echarts';
|
|
8
|
-
export const EChartsReact = ({ options, style, settings, loading, theme }) => {
|
|
8
|
+
export const EChartsReact = ({ options, style, settings, loading, theme, }) => {
|
|
9
9
|
const chartRef = useRef(null);
|
|
10
10
|
const [chart, setChart] = useState();
|
|
11
11
|
useEffect(() => {
|
|
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import { AlertIcon, CheckIcon, InfoIcon, StopIcon, XIcon } from '@primer/octicons-react';
|
|
6
|
+
import { AlertIcon, CheckIcon, InfoIcon, StopIcon, XIcon, } from '@primer/octicons-react';
|
|
7
7
|
import { Flash as PrimerFlash, IconButton } from '@primer/react';
|
|
8
|
-
import { Box } from
|
|
8
|
+
import { Box } from '@datalayer/primer-addons';
|
|
9
9
|
import { useCallback, useState } from 'react';
|
|
10
10
|
/**
|
|
11
11
|
* Closable flash component with actions.
|
|
@@ -32,31 +32,31 @@ export const FlashClosable = (props) => {
|
|
|
32
32
|
gridTemplateAreas: `
|
|
33
33
|
'visual message close'
|
|
34
34
|
'. actions actions'
|
|
35
|
-
|
|
36
|
-
}
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
37
|
}, children: [_jsx(Box, { sx: {
|
|
38
38
|
display: 'grid',
|
|
39
39
|
paddingBlock: 'var(--base-size-8)',
|
|
40
40
|
alignSelf: 'center',
|
|
41
|
-
gridArea: 'visual'
|
|
41
|
+
gridArea: 'visual',
|
|
42
42
|
}, children: visual }), _jsx(Box, { sx: {
|
|
43
43
|
alignSelf: 'center',
|
|
44
44
|
display: 'grid',
|
|
45
|
-
gridArea: 'message'
|
|
45
|
+
gridArea: 'message',
|
|
46
46
|
}, children: children }), _jsx(Box, { sx: {
|
|
47
47
|
display: 'grid',
|
|
48
48
|
gap: 'var(--stack-gap-condensed)',
|
|
49
49
|
marginLeft: 'actions',
|
|
50
50
|
'@media screen and (max-width: 544px)': {
|
|
51
51
|
alignSelf: 'start',
|
|
52
|
-
margin: 'var(--base-size-8) 0 0 var(--base-size-8)'
|
|
53
|
-
}
|
|
52
|
+
margin: 'var(--base-size-8) 0 0 var(--base-size-8)',
|
|
53
|
+
},
|
|
54
54
|
}, children: actions }), closable && (_jsx(Box, { sx: {
|
|
55
55
|
alignSelf: 'start',
|
|
56
|
-
marginLeft: 'close'
|
|
56
|
+
marginLeft: 'close',
|
|
57
57
|
}, children: _jsx(IconButton, { "aria-label": "Dismiss flash message", title: "Dismiss", onClick: onClose, variant: "invisible", icon: XIcon, sx: {
|
|
58
|
-
'& > svg': { marginRight: 0, color: 'var(--fgColor-default)' }
|
|
59
|
-
} }) }))] })) : _jsx(_Fragment, {});
|
|
58
|
+
'& > svg': { marginRight: 0, color: 'var(--fgColor-default)' },
|
|
59
|
+
} }) }))] })) : (_jsx(_Fragment, {}));
|
|
60
60
|
};
|
|
61
61
|
FlashClosable.defaultProps = {
|
|
62
62
|
closable: true,
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
6
|
import { Label, Link } from '@primer/react';
|
|
7
|
-
import { Box } from
|
|
7
|
+
import { Box } from '@datalayer/primer-addons';
|
|
8
8
|
import { Banner } from '@primer/react/experimental';
|
|
9
9
|
import { useCoreStore, useRuntimesStore } from '../../state';
|
|
10
10
|
import { useNavigate } from '../../hooks';
|
|
@@ -12,7 +12,6 @@ export const FlashDisclaimer = () => {
|
|
|
12
12
|
const { configuration } = useCoreStore();
|
|
13
13
|
const { showDisclaimer, setShowDisclaimer } = useRuntimesStore();
|
|
14
14
|
const navigate = useNavigate();
|
|
15
|
-
return (_jsx(_Fragment, { children: configuration?.whiteLabel === false && showDisclaimer &&
|
|
16
|
-
_jsx(Banner, { variant: "info", title: "AI Platform for Data Analysis", description: _jsxs(Box, { children: [_jsx(Label, { style: { marginRight: 10 }, children: "PRIVATE BETA" }), "Create Kernels and use them from your JupyterLab, VS Code or CLI. Read the ", _jsx(Link, { href: "javascript: return false;", onClick: e => navigate('/docs', e), children: "documentation" }), " for any question or ", _jsx(Link, { href: "javascript: return false;", onClick: e => navigate('/support/request', e), children: "contact us for support" }), "."] }), onDismiss: () => setShowDisclaimer(false) }) }));
|
|
15
|
+
return (_jsx(_Fragment, { children: configuration?.whiteLabel === false && showDisclaimer && (_jsx(Banner, { variant: "info", title: "AI Platform for Data Analysis", description: _jsxs(Box, { children: [_jsx(Label, { style: { marginRight: 10 }, children: "PRIVATE BETA" }), "Create Kernels and use them from your JupyterLab, VS Code or CLI. Read the", ' ', _jsx(Link, { href: "javascript: return false;", onClick: e => navigate('/docs', e), children: "documentation" }), ' ', "for any question or", ' ', _jsx(Link, { href: "javascript: return false;", onClick: e => navigate('/support/request', e), children: "contact us for support" }), "."] }), onDismiss: () => setShowDisclaimer(false) })) }));
|
|
17
16
|
};
|
|
18
17
|
export default FlashDisclaimer;
|
|
@@ -22,9 +22,8 @@ export const FlashGuest = () => {
|
|
|
22
22
|
const onContactSupport = useCallback(() => {
|
|
23
23
|
navigate(CONTACT_ROUTE);
|
|
24
24
|
}, []);
|
|
25
|
-
return (_jsx(_Fragment, { children: !isPlatformMember &&
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
: 'Datalayer support' })] }), children: _jsx(Text, { children: "We appreciate your interest in joining Datalayer with a guest role. The platform administrator has been notified and will reach out to you to confirm the granting of your access." }) }) }));
|
|
25
|
+
return (_jsx(_Fragment, { children: !isPlatformMember && (_jsx(FlashClosable, { variant: "warning", actions: _jsxs(_Fragment, { children: [_jsx(Button, { onClick: onRefreshPermission, title: 'If your roles have recently been updated, you need to refresh your browser.', children: "Refresh permissions" }), _jsx(Button, { onClick: onContactSupport, title: 'Contact the support to request the needed role.', children: configuration?.whiteLabel
|
|
26
|
+
? 'Contact the support'
|
|
27
|
+
: 'Datalayer support' })] }), children: _jsx(Text, { children: "We appreciate your interest in joining Datalayer with a guest role. The platform administrator has been notified and will reach out to you to confirm the granting of your access." }) })) }));
|
|
29
28
|
};
|
|
30
29
|
export default FlashGuest;
|
|
@@ -6,11 +6,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
7
|
import { Text, Link } from '@primer/react';
|
|
8
8
|
import { FlashClosable } from '../../components/flashes';
|
|
9
|
-
import { Box } from
|
|
9
|
+
import { Box } from '@datalayer/primer-addons';
|
|
10
10
|
import { useToast } from '../../hooks';
|
|
11
11
|
import { useCoreStore, useSurveysStore } from '../../state';
|
|
12
12
|
import { Survey2025_1 } from './surveys';
|
|
13
|
-
export const SURVEY_2025_1_NAME =
|
|
13
|
+
export const SURVEY_2025_1_NAME = '2025-1';
|
|
14
14
|
export const FlashSurveys = (props) => {
|
|
15
15
|
const { surveyName } = props;
|
|
16
16
|
const { enqueueToast } = useToast();
|
|
@@ -30,7 +30,6 @@ export const FlashSurveys = (props) => {
|
|
|
30
30
|
setShow(false);
|
|
31
31
|
enqueueToast('Thank you for your answers.', { variant: 'success' });
|
|
32
32
|
};
|
|
33
|
-
return (_jsx(_Fragment, { children: surveys && (show || surveyName) && !configuration.whiteLabel &&
|
|
34
|
-
_jsxs(FlashClosable, { variant: "default", children: [_jsx(Box, { children: _jsx(Text, { as: "h2", children: "We'd love to know a bit more about you and your needs..." }) }), _jsx(Box, { children: _jsx(Survey2025_1, { formData: surveyName ? surveys.get(SURVEY_2025_1_NAME)?.form : undefined, onSubmit: onSubmit }) }), _jsx(Box, { mt: 3, children: _jsxs(Text, { children: ["The information you give will remain fully private, read our ", _jsx(Link, { href: "https://datalayer.app/privacy", target: "_blank", children: "privacy policy" }), "."] }) })] }) }));
|
|
33
|
+
return (_jsx(_Fragment, { children: surveys && (show || surveyName) && !configuration.whiteLabel && (_jsxs(FlashClosable, { variant: "default", children: [_jsx(Box, { children: _jsx(Text, { as: "h2", children: "We'd love to know a bit more about you and your needs..." }) }), _jsx(Box, { children: _jsx(Survey2025_1, { formData: surveyName ? surveys.get(SURVEY_2025_1_NAME)?.form : undefined, onSubmit: onSubmit }) }), _jsx(Box, { mt: 3, children: _jsxs(Text, { children: ["The information you give will remain fully private, read our", ' ', _jsx(Link, { href: "https://datalayer.app/privacy", target: "_blank", children: "privacy policy" }), "."] }) })] })) }));
|
|
35
34
|
};
|
|
36
35
|
export default FlashSurveys;
|
|
@@ -7,12 +7,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
7
7
|
// import { Box, Flash as PrimerFlash, Link } from '@primer/react';
|
|
8
8
|
import { Link } from '@primer/react';
|
|
9
9
|
import { Banner } from '@primer/react/experimental';
|
|
10
|
-
import { QuestionIcon } from
|
|
10
|
+
import { QuestionIcon } from '@primer/octicons-react';
|
|
11
11
|
import { useNavigate } from '../../hooks';
|
|
12
12
|
export const FlashUnauthorized = () => {
|
|
13
13
|
const navigate = useNavigate();
|
|
14
14
|
return (_jsx(_Fragment, { children: _jsx(Banner, { title: "Warning", variant: "warning",
|
|
15
15
|
// onDismiss={action('onDismiss')}
|
|
16
|
-
description: _jsxs(_Fragment, { children: ["Your current roles does not allow you to access this feature. Please
|
|
16
|
+
description: _jsxs(_Fragment, { children: ["Your current roles does not allow you to access this feature. Please", ' ', _jsx(Link, { inline: true, href: "javascript: return false;", onClick: e => navigate('/support', e), children: "contact support" }), ' ', "for more information."] }), primaryAction: _jsx(Banner.PrimaryAction, { onClick: e => navigate('/support/request', e), leadingVisual: QuestionIcon, children: "Contact support" }) }) }));
|
|
17
17
|
};
|
|
18
18
|
export default FlashUnauthorized;
|
|
@@ -3,124 +3,101 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import Form from
|
|
7
|
-
import validator from
|
|
6
|
+
import Form from '@datalayer/primer-rjsf';
|
|
7
|
+
import validator from '@rjsf/validator-ajv8';
|
|
8
8
|
const schema = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"profile_s": {
|
|
16
|
-
"title": "Your profile",
|
|
17
|
-
"$ref": "#/definitions/Profile"
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['profile_s', 'activities_txt'],
|
|
11
|
+
properties: {
|
|
12
|
+
profile_s: {
|
|
13
|
+
title: 'Your profile',
|
|
14
|
+
$ref: '#/definitions/Profile',
|
|
18
15
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
activities_txt: {
|
|
17
|
+
type: 'array',
|
|
18
|
+
uniqueItems: true,
|
|
19
|
+
items: {
|
|
20
|
+
$ref: '#/definitions/Activities',
|
|
24
21
|
},
|
|
25
|
-
|
|
22
|
+
title: 'What do you need to achieve with data?',
|
|
26
23
|
},
|
|
27
24
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
definitions: {
|
|
26
|
+
Profile: {
|
|
27
|
+
title: 'Profile',
|
|
28
|
+
type: 'string',
|
|
29
|
+
anyOf: [
|
|
33
30
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
38
|
-
"title": "Beginner / Student"
|
|
31
|
+
type: 'string',
|
|
32
|
+
enum: ['beginner student'],
|
|
33
|
+
title: 'Beginner / Student',
|
|
39
34
|
},
|
|
40
35
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
],
|
|
45
|
-
"title": "Researcher / Phd"
|
|
36
|
+
type: 'string',
|
|
37
|
+
enum: ['researcher phd'],
|
|
38
|
+
title: 'Researcher / Phd',
|
|
46
39
|
},
|
|
47
40
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
"title": "Data Analyst / Scientist"
|
|
41
|
+
type: 'string',
|
|
42
|
+
enum: ['data analyst scientist'],
|
|
43
|
+
title: 'Data Analyst / Scientist',
|
|
53
44
|
},
|
|
54
45
|
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
],
|
|
59
|
-
"title": "Startup"
|
|
46
|
+
type: 'string',
|
|
47
|
+
enum: ['startup'],
|
|
48
|
+
title: 'Startup',
|
|
60
49
|
},
|
|
61
50
|
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
],
|
|
66
|
-
"title": "Data Platform Builder"
|
|
51
|
+
type: 'string',
|
|
52
|
+
enum: ['data platform builder'],
|
|
53
|
+
title: 'Data Platform Builder',
|
|
67
54
|
},
|
|
68
|
-
]
|
|
55
|
+
],
|
|
69
56
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
Activities: {
|
|
58
|
+
title: 'Activities',
|
|
59
|
+
type: 'string',
|
|
60
|
+
anyOf: [
|
|
74
61
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
79
|
-
"title": " Learn how to analyse data"
|
|
62
|
+
type: 'string',
|
|
63
|
+
enum: ['learn how to analyse data'],
|
|
64
|
+
title: ' Learn how to analyse data',
|
|
80
65
|
},
|
|
81
66
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
type: 'string',
|
|
68
|
+
enum: [
|
|
69
|
+
'scale my laptop jupyter notebook with stronger cpu gpu memory',
|
|
85
70
|
],
|
|
86
|
-
|
|
71
|
+
title: 'Scale my laptop Jupyter Notebook with stronger CPU/GPU/Memory',
|
|
87
72
|
},
|
|
88
73
|
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
],
|
|
93
|
-
"title": "Scale from JupyterHub with stronger CPU/GPU/Memory"
|
|
74
|
+
type: 'string',
|
|
75
|
+
enum: ['scale from jupyterhub with stronger cpu gpu memory'],
|
|
76
|
+
title: 'Scale from JupyterHub with stronger CPU/GPU/Memory',
|
|
94
77
|
},
|
|
95
78
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
-
"title": "Create AI models"
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: ['create ai models'],
|
|
81
|
+
title: 'Create AI models',
|
|
101
82
|
},
|
|
102
83
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
],
|
|
107
|
-
"title": "Work in team on Jupyter Notebooks"
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['work in team on jupyter notebooks'],
|
|
86
|
+
title: 'Work in team on Jupyter Notebooks',
|
|
108
87
|
},
|
|
109
88
|
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
"title": "Publish and share my data analysis"
|
|
89
|
+
type: 'string',
|
|
90
|
+
enum: ['publis and share my data analysis'],
|
|
91
|
+
title: 'Publish and share my data analysis',
|
|
115
92
|
},
|
|
116
|
-
]
|
|
93
|
+
],
|
|
117
94
|
},
|
|
118
95
|
},
|
|
119
96
|
};
|
|
120
97
|
const uiSchema = {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
98
|
+
'ui:submitButtonOptions': {
|
|
99
|
+
submitText: 'Save',
|
|
100
|
+
},
|
|
124
101
|
};
|
|
125
102
|
export const Survey2025_1 = (props) => {
|
|
126
103
|
const { onSubmit, formData, readonly = false } = props;
|
|
@@ -4,7 +4,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect } from 'react';
|
|
7
|
-
import { MemoryRouter, Routes, Route } from 'react-router-dom';
|
|
8
7
|
import { CenteredSpinner } from '../../components/display';
|
|
9
8
|
import { useIAMStore } from '../../state';
|
|
10
9
|
import { useToast, useIAM } from '../../hooks';
|
|
@@ -18,16 +17,19 @@ const ExternalTokenSilentLoginRoute = (props) => {
|
|
|
18
17
|
loginAndNavigate(externalToken, logout, checkIAMToken)
|
|
19
18
|
.catch(error => {
|
|
20
19
|
console.debug('Failed to login with the provided token.', error);
|
|
21
|
-
enqueueToast('Failed to login with the provided token.', {
|
|
20
|
+
enqueueToast('Failed to login with the provided token.', {
|
|
21
|
+
variant: 'error',
|
|
22
|
+
});
|
|
22
23
|
})
|
|
23
24
|
.finally(() => {
|
|
24
25
|
enqueueToast('Runtimes are available.', { variant: 'success' });
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
}, [externalToken]);
|
|
28
|
-
return
|
|
29
|
+
return _jsx(CenteredSpinner, { size: "small", message: message });
|
|
29
30
|
};
|
|
30
31
|
export const ExternalTokenSilentLogin = (props) => {
|
|
31
|
-
|
|
32
|
+
// No navigation provider needed anymore - auto-detection works without it
|
|
33
|
+
return _jsx(ExternalTokenSilentLoginRoute, { ...props });
|
|
32
34
|
};
|
|
33
35
|
export default ExternalTokenSilentLogin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Icon } from
|
|
2
|
-
import { IAnyItem, IItemType } from
|
|
1
|
+
import { Icon } from '@primer/octicons-react';
|
|
2
|
+
import { IAnyItem, IItemType } from '../../models';
|
|
3
3
|
type IArtifactIconClassProp = {
|
|
4
4
|
item?: IAnyItem;
|
|
5
5
|
type?: IItemType;
|
|
@@ -2,49 +2,49 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
import { createElement } from
|
|
6
|
-
import { DatabaseIcon, RowsIcon, BookIcon, DiffModifiedIcon, PencilIcon, FeedIssueDraftIcon, FeedRocketIcon, MilestoneIcon, OrganizationIcon, PeopleIcon, RocketIcon, FileIcon, StackIcon, GearIcon, GraphIcon, NumberIcon, PaperAirplaneIcon, ArchiveIcon, TagIcon, MortarBoardIcon, ContainerIcon, HomeIcon, ShareIcon, FileDirectoryIcon, TrophyIcon, QuestionIcon, PersonIcon, MailIcon, ZapIcon, } from
|
|
7
|
-
import { GalileoIcon, CircleWhiteIcon, BookOpenIcon, CameraIcon, CellIcon, NotebookOutlineIcon } from '@datalayer/icons-react';
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import { DatabaseIcon, RowsIcon, BookIcon, DiffModifiedIcon, PencilIcon, FeedIssueDraftIcon, FeedRocketIcon, MilestoneIcon, OrganizationIcon, PeopleIcon, RocketIcon, FileIcon, StackIcon, GearIcon, GraphIcon, NumberIcon, PaperAirplaneIcon, ArchiveIcon, TagIcon, MortarBoardIcon, ContainerIcon, HomeIcon, ShareIcon, FileDirectoryIcon, TrophyIcon, QuestionIcon, PersonIcon, MailIcon, ZapIcon, } from '@primer/octicons-react';
|
|
7
|
+
import { GalileoIcon, CircleWhiteIcon, BookOpenIcon, CameraIcon, CellIcon, NotebookOutlineIcon, } from '@datalayer/icons-react';
|
|
8
8
|
const ARTIFACT_ICONS = new Map([
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
9
|
+
['assignment', MilestoneIcon],
|
|
10
|
+
['authoring', PencilIcon],
|
|
11
|
+
['cell', CellIcon],
|
|
12
|
+
['content', ArchiveIcon],
|
|
13
|
+
['credits', NumberIcon],
|
|
14
|
+
['dataset', StackIcon],
|
|
15
|
+
['datasource', DatabaseIcon],
|
|
16
|
+
['document', FileIcon],
|
|
17
|
+
['documentation', BookOpenIcon],
|
|
18
|
+
['environment', ContainerIcon],
|
|
19
|
+
['exercise', DiffModifiedIcon],
|
|
20
|
+
['growth', FeedRocketIcon],
|
|
21
|
+
['home', HomeIcon],
|
|
22
|
+
['invite', PaperAirplaneIcon],
|
|
23
|
+
['runtime', RocketIcon],
|
|
24
|
+
['runtime-snapshot', CameraIcon],
|
|
25
|
+
['library', BookIcon],
|
|
26
|
+
['lesson', MortarBoardIcon],
|
|
27
|
+
['mail', MailIcon],
|
|
28
|
+
['management', FeedIssueDraftIcon],
|
|
29
|
+
['notebook', RowsIcon],
|
|
30
|
+
['organization', OrganizationIcon],
|
|
31
|
+
['onboarding', ZapIcon],
|
|
32
|
+
['page', NotebookOutlineIcon],
|
|
33
|
+
['settings', GearIcon],
|
|
34
|
+
['share', ShareIcon],
|
|
35
|
+
['space', GalileoIcon],
|
|
36
|
+
['success', TrophyIcon],
|
|
37
|
+
['support', QuestionIcon],
|
|
38
|
+
['storage', FileDirectoryIcon],
|
|
39
|
+
['tag', TagIcon],
|
|
40
|
+
['team', PeopleIcon],
|
|
41
|
+
['usage', GraphIcon],
|
|
42
|
+
['user', PersonIcon],
|
|
43
|
+
['undefined', CircleWhiteIcon],
|
|
44
44
|
]);
|
|
45
45
|
export const ArtifactIconClass = (props) => {
|
|
46
46
|
const { item, type } = props;
|
|
47
|
-
const itemType = item?.type ?? type ??
|
|
47
|
+
const itemType = item?.type ?? type ?? 'undefined';
|
|
48
48
|
const icon = ARTIFACT_ICONS.get(itemType);
|
|
49
49
|
return icon ?? CircleWhiteIcon;
|
|
50
50
|
};
|
|
@@ -3,15 +3,12 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import { Label } from
|
|
6
|
+
import { Label } from '@primer/react';
|
|
7
7
|
export const VisibilityLabel = (props) => {
|
|
8
8
|
const { isPublic } = props;
|
|
9
9
|
if (isPublic === undefined) {
|
|
10
10
|
return _jsx(_Fragment, {});
|
|
11
11
|
}
|
|
12
|
-
return
|
|
13
|
-
_jsx(Label, { variant: "success", sx: { marginLeft: 3 }, children: "Public" })
|
|
14
|
-
:
|
|
15
|
-
_jsx(Label, { variant: "danger", sx: { marginLeft: 3 }, children: "Private" }));
|
|
12
|
+
return isPublic ? (_jsx(Label, { variant: "success", sx: { marginLeft: 3 }, children: "Public" })) : (_jsx(Label, { variant: "danger", sx: { marginLeft: 3 }, children: "Private" }));
|
|
16
13
|
};
|
|
17
14
|
export default VisibilityLabel;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
import { AnimationProvider, Stack, Heading, Text, Animate, Prose } from
|
|
6
|
+
import { AnimationProvider, Stack, Heading, Text, Animate, Prose, } from '@primer/react-brand';
|
|
7
7
|
import styles from './../../../style/animation/Animation.module.css';
|
|
8
8
|
export const StepBlock = (props) => {
|
|
9
9
|
const { date, title, description, StepIcon: BlockIcon } = props;
|
|
@@ -24,9 +24,9 @@ export function NavigationVisbilityObserver({ children, className, ...rest }) {
|
|
|
24
24
|
!visibilityMap[child.props['data-navitemid']] &&
|
|
25
25
|
styles['SubdomainNavBar-primary-nav-list-item--invisible']),
|
|
26
26
|
});
|
|
27
|
-
}), showOverflow && _jsx(AnchoredOverlay, { visibilityMap: visibilityMap, children: children })] }));
|
|
27
|
+
}), showOverflow && (_jsx(AnchoredOverlay, { visibilityMap: visibilityMap, children: children }))] }));
|
|
28
28
|
}
|
|
29
|
-
function AnchoredOverlay({ children, className, visibilityMap }) {
|
|
29
|
+
function AnchoredOverlay({ children, className, visibilityMap, }) {
|
|
30
30
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
31
31
|
const ref = useRef(null);
|
|
32
32
|
useOnClickOutside(ref, () => handleClose());
|