@datalayer/core 0.0.2 → 0.0.4
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 +124 -2
- package/lib/App.css +47 -0
- package/lib/App.js +14 -2
- package/lib/__tests__/index.test.js +7 -6
- package/lib/api/{RunApi.d.ts → DatalayerApi.d.ts} +4 -4
- package/lib/api/{RunApi.js → DatalayerApi.js} +6 -11
- package/lib/api/index.d.ts +3 -2
- package/lib/api/index.js +3 -7
- package/lib/api/{runtimes → jupyter}/exec/Python.js +0 -5
- package/lib/api/{runtimes → jupyter}/exec/Snippets.js +0 -5
- package/lib/api/{runtimes → jupyter}/exec/index.js +0 -5
- package/lib/api/jupyter/index.d.ts +2 -0
- package/lib/api/jupyter/index.js +6 -0
- package/lib/api/{runtimes → jupyter}/kernelsHandler.d.ts +1 -1
- package/lib/api/{runtimes → jupyter}/kernelsHandler.js +1 -6
- package/lib/api/runtimes/actions.d.ts +102 -0
- package/lib/api/runtimes/{runtimesApi.js → actions.js} +47 -53
- package/lib/api/runtimes/{runtimesApi.d.ts → apis.d.ts} +8 -105
- package/lib/api/runtimes/apis.js +5 -0
- package/lib/api/runtimes/index.d.ts +2 -4
- package/lib/api/runtimes/index.js +2 -9
- package/lib/api/runtimes/settings.js +3 -8
- package/lib/api/runtimes/snapshots.d.ts +1 -1
- package/lib/api/runtimes/snapshots.js +8 -13
- package/lib/api/runtimes/utils.js +1 -9
- package/lib/assets/react.svg +1 -0
- 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 +2 -3
- package/lib/components/avatars/BoringAvatar.js +14 -9
- package/lib/components/avatars/BoringAvatar.stories.d.ts +27 -0
- package/lib/components/avatars/BoringAvatar.stories.js +23 -0
- package/lib/components/avatars/UserProfileAvatar.js +2 -14
- package/lib/components/avatars/index.js +0 -5
- package/lib/components/banners/NoAutomationBanner.js +4 -9
- package/lib/components/banners/index.js +0 -5
- package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
- package/lib/components/buttons/DownloadCSVButton.js +1 -6
- package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
- package/lib/components/buttons/DownloadJsonButton.js +0 -5
- package/lib/components/buttons/LongActionButton.js +0 -5
- package/lib/components/buttons/UploadButton.js +1 -6
- package/lib/components/buttons/index.js +0 -5
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/checkout/StripeCheckout.js +6 -11
- package/lib/components/checkout/index.js +0 -5
- package/lib/components/confetti/ConfettiSuccess.js +1 -6
- package/lib/components/confetti/index.js +0 -5
- package/lib/components/context/OrganizationSelect.js +5 -10
- package/lib/components/context/SpaceSelect.js +7 -12
- package/lib/components/context/index.js +0 -5
- package/lib/components/display/AvatarSkeleton.js +1 -6
- package/lib/components/display/CenteredSpinner.js +4 -9
- package/lib/components/display/CodePreview.js +4 -9
- package/lib/components/display/DatalayerBox.js +13 -19
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/HorizontalCenter.js +1 -1
- package/lib/components/display/JupyterDialog.js +17 -20
- package/lib/components/display/NavLink.d.ts +4 -2
- package/lib/components/display/NavLink.js +6 -9
- package/lib/components/display/NotebookSkeleton.js +2 -7
- package/lib/components/display/Placeholder.js +1 -6
- package/lib/components/display/ToTopBranded.js +1 -6
- package/lib/components/display/VisuallyHidden.js +0 -5
- package/lib/components/display/index.js +0 -5
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.js +7 -7
- package/lib/components/echarts/index.js +0 -5
- package/lib/components/flashes/FlashClosable.js +11 -16
- package/lib/components/flashes/FlashDisclaimer.js +2 -8
- package/lib/components/flashes/FlashGuest.js +3 -9
- package/lib/components/flashes/FlashSurveys.js +3 -9
- package/lib/components/flashes/FlashUnauthorized.js +2 -7
- package/lib/components/flashes/index.js +0 -5
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/flashes/surveys/Survey2025_1.js +62 -90
- package/lib/components/flashes/surveys/index.js +0 -5
- package/lib/components/iam/ExternalTokenSilentLogin.js +6 -9
- package/lib/components/iam/index.js +0 -5
- package/lib/components/icons/ArtifactIcon.d.ts +2 -2
- package/lib/components/icons/ArtifactIcon.js +39 -44
- package/lib/components/icons/index.js +0 -5
- package/lib/components/index.js +1 -6
- package/lib/components/labels/VisibilityLabel.js +2 -10
- package/lib/components/labels/index.js +0 -5
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/landings/StepBlock.js +1 -6
- package/lib/components/landings/index.js +0 -5
- package/lib/components/navbar/NavigationVisbilityObserver.js +2 -7
- package/lib/components/navbar/SubdomainNavBar.js +46 -29
- package/lib/components/navbar/SubdomainNavBar.module.css +737 -0
- package/lib/components/navbar/index.js +0 -5
- package/lib/components/nbgrader/NbGradesDetails.d.ts +1 -1
- package/lib/components/nbgrader/NbGradesDetails.js +5 -13
- package/lib/components/nbgrader/index.js +0 -5
- package/lib/components/notebooks/JupyterNotebook.js +5 -10
- package/lib/components/notebooks/JupyterNotebookToolbar.js +3 -8
- package/lib/components/notebooks/index.js +0 -5
- 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 -7
- package/lib/components/primer/Styles.js +1 -6
- package/lib/components/primer/index.js +0 -5
- package/lib/components/progress/ConsumptionBar.js +2 -7
- package/lib/components/progress/CreditsIndicator.d.ts +1 -1
- package/lib/components/progress/CreditsIndicator.js +4 -13
- package/lib/components/progress/ProgressBar.js +0 -5
- package/lib/components/progress/ProgressRing.js +2 -2
- package/lib/components/progress/Timer.js +0 -5
- package/lib/components/progress/index.js +0 -5
- package/lib/components/runtimes/RuntimeCellVariables.js +9 -14
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +7 -12
- package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +1 -2
- package/lib/components/runtimes/RuntimeLauncherDialog.js +32 -40
- package/lib/components/runtimes/RuntimePickerBase.d.ts +1 -1
- package/lib/components/runtimes/RuntimePickerBase.js +42 -36
- package/lib/components/runtimes/RuntimePickerCell.js +9 -17
- package/lib/components/runtimes/RuntimePickerNotebook.d.ts +1 -2
- package/lib/components/runtimes/RuntimePickerNotebook.js +45 -50
- package/lib/components/runtimes/RuntimeReservationControl.js +10 -20
- package/lib/components/runtimes/RuntimeSimplePicker.d.ts +1 -1
- package/lib/components/runtimes/RuntimeSimplePicker.js +44 -52
- package/lib/components/runtimes/RuntimeUtils.d.ts +1 -1
- package/lib/components/runtimes/RuntimeUtils.js +22 -17
- package/lib/components/runtimes/RuntimeVariables.js +7 -12
- package/lib/components/runtimes/index.js +0 -5
- package/lib/components/screenshot/ScreenCapture.js +10 -19
- package/lib/components/screenshot/ScreenCaptureButton.d.ts +1 -1
- package/lib/components/screenshot/ScreenCaptureButton.js +14 -8
- package/lib/components/screenshot/index.js +0 -5
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +19 -22
- package/lib/components/snapshots/index.js +0 -5
- package/lib/components/snippets/SnippetDialog.js +5 -10
- package/lib/components/snippets/index.js +0 -5
- package/lib/components/storage/ContentsBrowser.js +75 -63
- package/lib/components/storage/ContentsItems.js +10 -13
- package/lib/components/storage/index.js +0 -5
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentItemStatus.js +38 -21
- package/lib/components/students/index.js +0 -5
- package/lib/components/subnav/SubNav.d.ts +3 -3
- package/lib/components/subnav/SubNav.js +34 -24
- package/lib/components/subnav/SubNav.module.css +717 -0
- package/lib/components/subnav/index.js +0 -5
- package/lib/components/tables/DataTable.js +1 -9
- package/lib/components/tables/index.js +0 -5
- package/lib/components/text-reveal/TextRevealAnimation.js +7 -8
- package/lib/components/text-reveal/TextRevealAnimation.module.css +45 -0
- package/lib/components/text-reveal/index.js +0 -5
- package/lib/components/text-reveal/useTextRevealAnimationLines.js +0 -5
- package/lib/components/tokens/SpaceVariantToken.d.ts +1 -1
- package/lib/components/tokens/SpaceVariantToken.js +5 -10
- package/lib/components/tokens/index.js +0 -5
- package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -8
- package/lib/components/toolbars/DocumentEditorToolbar.js +0 -5
- package/lib/components/toolbars/NotebookEditorToolbar.d.ts +1 -1
- package/lib/components/toolbars/NotebookEditorToolbar.js +0 -5
- package/lib/components/toolbars/index.js +0 -5
- package/lib/components/users/PeerIndicator.d.ts +1 -1
- package/lib/components/users/PeerIndicator.js +5 -10
- package/lib/components/users/index.js +0 -5
- package/lib/config/Configuration.d.ts +48 -0
- package/lib/config/Configuration.js +42 -5
- package/lib/config/index.js +0 -5
- package/lib/config/integrations/Loom.js +3 -8
- package/lib/config/integrations/index.js +0 -5
- package/lib/examples/CellExample.d.ts +6 -0
- package/lib/examples/CellExample.js +55 -0
- 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 +6 -0
- package/lib/examples/NotebookExample.js +24 -0
- 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/notebooks/Lite.ipynb.json +128 -0
- 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 +9 -14
- package/lib/hooks/assets/index.js +0 -5
- package/lib/hooks/index.d.ts +29 -28
- package/lib/hooks/index.js +29 -33
- package/lib/hooks/layouts/LayoutBackdrop.js +3 -11
- package/lib/hooks/layouts/LayoutScreenshot.css +58 -0
- package/lib/hooks/layouts/LayoutScreenshot.d.ts +1 -0
- package/lib/hooks/layouts/LayoutScreenshot.js +7 -11
- package/lib/hooks/layouts/index.js +0 -5
- package/lib/hooks/useAIAgents.d.ts +1 -1
- package/lib/hooks/useAIAgents.js +13 -18
- package/lib/hooks/useAuthorization.js +4 -10
- package/lib/hooks/useBackdrop.js +7 -12
- package/lib/hooks/useBackdropJupyterLab.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.js +4 -9
- package/lib/hooks/useCache.d.ts +8 -4
- package/lib/hooks/useCache.js +410 -361
- package/lib/hooks/useCellOutputshot.js +3 -11
- package/lib/hooks/useContainsFocus.js +2 -6
- package/lib/hooks/useDatalayer.d.ts +21 -0
- package/lib/hooks/{useRun.js → useDatalayer.js} +16 -18
- package/lib/hooks/useError.d.ts +1 -1
- package/lib/hooks/useError.js +2 -7
- package/lib/hooks/useExternalScript.js +4 -9
- package/lib/hooks/useFocusTrap.d.ts +1 -1
- package/lib/hooks/useFocusTrap.js +3 -7
- package/lib/hooks/useIAM.js +6 -12
- package/lib/hooks/useId.js +6 -11
- package/lib/hooks/useIsomorphicLayoutEffect.js +0 -5
- package/lib/hooks/useJupyterLabTheme.js +3 -6
- package/lib/hooks/useKeyboardEscape.js +0 -5
- 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 -9
- package/lib/hooks/useNavigate.d.ts +5 -1
- package/lib/hooks/useNavigate.js +62 -12
- package/lib/hooks/useNotebookAIAgent.js +3 -6
- package/lib/hooks/useOnClickOutside.js +0 -5
- package/lib/hooks/useParams.d.ts +5 -0
- package/lib/hooks/useParams.js +152 -0
- package/lib/hooks/useRef.js +0 -5
- package/lib/hooks/useRuntimes.js +2 -7
- package/lib/hooks/useScreenshot.js +5 -10
- package/lib/hooks/useToast.js +21 -21
- package/lib/hooks/useUpload.js +9 -14
- package/lib/hooks/useUser.js +1 -1
- package/lib/hooks/useVisibilityObserver.js +0 -5
- package/lib/hooks/useWindowSize.js +0 -6
- package/lib/i18n/Labels.js +0 -5
- package/lib/i18n/index.js +0 -5
- package/lib/index.css +73 -0
- package/lib/index.d.ts +6 -3
- package/lib/index.js +7 -3
- package/lib/main.js +1 -2
- package/lib/mocks/components/FlashMock.js +4 -9
- package/lib/mocks/components/index.js +0 -5
- package/lib/mocks/hooks/index.d.ts +1 -1
- package/lib/mocks/hooks/index.js +1 -6
- package/lib/mocks/hooks/rests/index.js +0 -5
- package/lib/mocks/hooks/rests/rests.js +15 -23
- package/lib/mocks/hooks/useDatalayerMock.d.ts +6 -0
- package/lib/mocks/hooks/{useRunMock.js → useDatalayerMock.js} +9 -14
- package/lib/mocks/index.js +0 -5
- package/lib/mocks/jupyter/index.js +1 -6
- package/lib/mocks/models/CodeBlockMock.js +1 -6
- package/lib/mocks/models/CodelineMock.js +1 -6
- package/lib/mocks/models/CourseMock.d.ts +1 -1
- package/lib/mocks/models/CourseMock.js +10 -15
- package/lib/mocks/models/InviteMock.d.ts +1 -1
- package/lib/mocks/models/InviteMock.js +21 -11
- 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 -14
- 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 -11
- package/lib/mocks/models/index.js +0 -5
- package/lib/mocks/views/ActionMenuMock.js +1 -6
- package/lib/mocks/views/ChartMock.js +3 -8
- package/lib/mocks/views/ChartMockOptions.js +24 -29
- package/lib/mocks/views/DashboardMock.js +74 -79
- package/lib/mocks/views/FormMock.js +1 -6
- package/lib/mocks/views/TableMock.js +1 -6
- package/lib/mocks/views/WipMock.js +0 -5
- package/lib/mocks/views/index.js +0 -5
- 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 -19
- package/lib/models/ContactEvent.js +0 -5
- package/lib/models/ContactIAMProvider.js +2 -2
- package/lib/models/Course.d.ts +7 -7
- package/lib/models/Credits.js +0 -5
- package/lib/models/Dataset.d.ts +2 -2
- package/lib/models/Datasource.js +0 -5
- 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/Errors.js +0 -5
- package/lib/models/Exercise.d.ts +1 -1
- package/lib/models/GrowthKPI.js +0 -5
- package/lib/models/IAMProviderLinked.js +1 -1
- package/lib/models/IAMProviderUsers.js +0 -5
- package/lib/models/IAMToken.js +0 -5
- package/lib/models/Inbound.js +0 -5
- 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 -23
- 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 -7
- package/lib/models/OrganizationMember.d.ts +2 -2
- package/lib/models/Outbound.js +7 -12
- package/lib/models/Page.js +4 -2
- package/lib/models/PageTag.d.ts +2 -2
- 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 -17
- package/lib/models/RolesPlatform.d.ts +1 -1
- package/lib/models/RolesPlatform.js +12 -39
- package/lib/models/RolesTeam.d.ts +1 -1
- package/lib/models/RolesTeam.js +3 -15
- package/lib/models/Runtime.d.ts +59 -1
- package/lib/models/Runtime.js +11 -9
- package/lib/models/RuntimeSnapshot.js +1 -1
- package/lib/models/School.d.ts +4 -4
- package/lib/models/Secret.js +0 -5
- 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/Survey.js +0 -5
- package/lib/models/Team.d.ts +3 -3
- package/lib/models/Team.js +2 -7
- package/lib/models/TeamMember.d.ts +2 -2
- package/lib/models/URN.js +1 -6
- package/lib/models/User.d.ts +2 -2
- package/lib/models/User.js +7 -10
- package/lib/models/UserEvent.js +0 -5
- package/lib/models/UserOnboarding.d.ts +1 -1
- package/lib/models/UserOnboarding.js +7 -12
- package/lib/models/UserSettings.js +2 -7
- package/lib/models/index.d.ts +2 -2
- package/lib/models/index.js +2 -7
- 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/Routes.js +0 -5
- package/lib/routes/index.d.ts +1 -1
- package/lib/routes/index.js +1 -6
- package/lib/services/DatalayerServiceManager.d.ts +22 -0
- package/lib/services/DatalayerServiceManager.js +79 -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 -6
- package/lib/state/index.d.ts +1 -1
- package/lib/state/index.js +1 -6
- package/lib/state/storage/IAMStorage.js +14 -7
- package/lib/state/storage/index.d.ts +1 -1
- package/lib/state/storage/index.js +1 -6
- package/lib/state/substates/AIAgentState.js +4 -7
- package/lib/state/substates/CellState.js +6 -10
- package/lib/state/substates/CoreState.d.ts +1 -1
- package/lib/state/substates/CoreState.js +23 -20
- package/lib/state/substates/DatasourceState.js +1 -6
- package/lib/state/substates/DocumentState.js +0 -5
- package/lib/state/substates/GradeState.js +0 -5
- package/lib/state/substates/IAMState.d.ts +5 -1
- package/lib/state/substates/IAMState.js +88 -72
- package/lib/state/substates/JupyterLabState.js +1 -6
- package/lib/state/substates/LayoutState.d.ts +2 -2
- package/lib/state/substates/LayoutState.js +41 -28
- package/lib/state/substates/NbformatState.js +0 -5
- package/lib/state/substates/OrganizationState.js +1 -6
- package/lib/state/substates/RuntimesState.d.ts +2 -2
- package/lib/state/substates/RuntimesState.js +6 -10
- package/lib/state/substates/SpaceState.js +1 -6
- package/lib/state/substates/SurveysState.js +7 -12
- package/lib/state/substates/TeamState.js +1 -6
- package/lib/state/substates/index.js +0 -5
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +1 -0
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +1 -0
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +1 -0
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +1 -0
- package/lib/stories/assets/youtube.svg +1 -0
- package/lib/stories/button.css +35 -0
- package/lib/stories/header.css +37 -0
- package/lib/stories/page.css +73 -0
- package/lib/test-setup.js +73 -1
- package/lib/theme/DatalayerTheme.js +1 -6
- package/lib/theme/DatalayerThemeProvider.js +17 -19
- package/lib/theme/Palette.js +1 -6
- package/lib/theme/index.js +0 -5
- package/lib/utils/Array.js +0 -5
- package/lib/utils/Avatar.js +2 -7
- package/lib/utils/Browser.js +6 -11
- package/lib/utils/Cells.d.ts +1 -1
- package/lib/utils/Cookie.js +1 -6
- package/lib/utils/Date.js +5 -10
- package/lib/utils/Download.js +5 -8
- package/lib/utils/DownloadFile.js +4 -7
- package/lib/utils/Env.js +2 -6
- package/lib/utils/File.js +0 -5
- package/lib/utils/Ids.js +0 -5
- package/lib/utils/Jupyter.js +0 -5
- package/lib/utils/Lazy.d.ts +1 -1
- package/lib/utils/Lazy.js +2 -8
- package/lib/utils/Name.js +10 -13
- package/lib/utils/Notebook.d.ts +1 -1
- package/lib/utils/Notebook.js +3 -3
- package/lib/utils/Number.js +13 -14
- package/lib/utils/Plots.d.ts +1 -1
- package/lib/utils/Plots.js +5 -5
- package/lib/utils/Random.js +0 -5
- package/lib/utils/Screenshot.js +1 -6
- package/lib/utils/Scroll.js +3 -7
- package/lib/utils/Sleep.js +1 -6
- package/lib/utils/Snapshot.js +2 -7
- package/lib/utils/String.js +2 -7
- package/lib/utils/Uri.js +2 -7
- package/lib/utils/Validator.js +0 -5
- package/lib/utils/WithSuspense.js +3 -11
- package/lib/utils/index.js +0 -5
- package/package.json +96 -30
- package/style/animation/Animation.module.css +174 -0
- package/style/base.css +64 -0
- package/style/index.css +6 -0
- package/lib/__tests__/App.test.js +0 -17
- package/lib/api/runtimes/models.d.ts +0 -59
- package/lib/api/runtimes/models.js +0 -11
- package/lib/hooks/useRun.d.ts +0 -21
- package/lib/mocks/hooks/useRunMock.d.ts +0 -6
- /package/lib/api/{runtimes → jupyter}/exec/Python.d.ts +0 -0
- /package/lib/api/{runtimes → jupyter}/exec/Snippets.d.ts +0 -0
- /package/lib/api/{runtimes → jupyter}/exec/index.d.ts +0 -0
- /package/lib/{__tests__/App.test.d.ts → examples/main.d.ts} +0 -0
|
@@ -3,23 +3,18 @@ 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
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
|
-
import { Spinner, Text } from "@primer/react";
|
|
12
|
-
import { Box } from "@datalayer/primer-addons";
|
|
6
|
+
import { Spinner, Text } from '@primer/react';
|
|
7
|
+
import { Box } from '@datalayer/primer-addons';
|
|
13
8
|
export const CenteredSpinner = (props) => {
|
|
14
9
|
const { message, size } = props;
|
|
15
10
|
return (_jsxs(Box, { sx: {
|
|
16
11
|
display: 'flex',
|
|
17
12
|
alignItems: 'center',
|
|
18
13
|
justifyContent: 'center',
|
|
19
|
-
minHeight: '40px'
|
|
14
|
+
minHeight: '40px',
|
|
20
15
|
}, children: [_jsx(Spinner, { size: size }), message && _jsx(Text, { sx: { marginLeft: 3 }, children: message })] }));
|
|
21
16
|
};
|
|
22
17
|
CenteredSpinner.defaultProps = {
|
|
23
|
-
size:
|
|
18
|
+
size: 'medium',
|
|
24
19
|
};
|
|
25
20
|
export default CenteredSpinner;
|
|
@@ -3,18 +3,13 @@ import { 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
export const CodePreview = (props) => {
|
|
12
7
|
const { code } = props;
|
|
13
8
|
return (_jsx("pre", { style: {
|
|
14
|
-
fontSize:
|
|
15
|
-
wordBreak:
|
|
16
|
-
wordWrap:
|
|
17
|
-
whiteSpace:
|
|
9
|
+
fontSize: '12px',
|
|
10
|
+
wordBreak: 'break-all',
|
|
11
|
+
wordWrap: 'break-word',
|
|
12
|
+
whiteSpace: 'pre-wrap',
|
|
18
13
|
}, children: code }));
|
|
19
14
|
};
|
|
20
15
|
export default CodePreview;
|
|
@@ -3,29 +3,23 @@ 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
import { Link, Text } from "@primer/react";
|
|
12
|
-
import { Box } from "@datalayer/primer-addons";
|
|
13
|
-
import { ArrowRightIcon } from "@primer/octicons-react";
|
|
14
|
-
import { useNavigate } from "../../hooks";
|
|
6
|
+
import { Link, Text } from '@primer/react';
|
|
7
|
+
import { Box } from '@datalayer/primer-addons';
|
|
8
|
+
import { ArrowRightIcon } from '@primer/octicons-react';
|
|
9
|
+
import { useNavigate } from '../../hooks';
|
|
15
10
|
export const DatalayerBox = (props) => {
|
|
16
11
|
const { title, linkLabel, linkRoute, children } = props;
|
|
17
12
|
const navigate = useNavigate();
|
|
18
13
|
return (_jsxs(_Fragment, { children: [_jsxs(Box, { sx: {
|
|
19
|
-
display:
|
|
20
|
-
alignItems:
|
|
21
|
-
justifyContent:
|
|
22
|
-
paddingRight: 4
|
|
23
|
-
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
borderRadius: "2",
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'space-between',
|
|
17
|
+
paddingRight: 4,
|
|
18
|
+
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '6px solid #28b899', paddingLeft: 2 }, children: title }), linkRoute && linkLabel && (_jsxs(Link, { href: "javascript: return false;", onClick: e => navigate(linkRoute), children: [linkLabel, _jsx(ArrowRightIcon, {})] }))] }), _jsx(Box, { sx: {
|
|
19
|
+
borderColor: 'border.default',
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
borderWidth: '1',
|
|
22
|
+
borderRadius: '2',
|
|
29
23
|
padding: 4,
|
|
30
24
|
marginTop: 2,
|
|
31
25
|
}, children: children })] }));
|
|
@@ -3,32 +3,25 @@ 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
|
-
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
|
-
import { createElement, useState } from 'react';
|
|
6
|
+
import { createElement, useState, } from 'react';
|
|
12
7
|
import { Dialog } from '@jupyterlab/apputils';
|
|
13
8
|
import { ReactWidget } from '@jupyterlab/ui-components';
|
|
14
9
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
15
10
|
import { Widget } from '@lumino/widgets';
|
|
16
11
|
import { FocusKeys } from '@primer/behaviors';
|
|
17
12
|
import { Checkbox, FormControl, useFocusZone } from '@primer/react';
|
|
18
|
-
import { Dialog as PrimerDialog } from '@primer/react/experimental';
|
|
13
|
+
import { Dialog as PrimerDialog, } from '@primer/react/experimental';
|
|
19
14
|
function DialogFooter(props) {
|
|
20
15
|
const { checkbox, footerButtons, setChecked } = props;
|
|
21
16
|
const [checked, setLocalChecked] = useState();
|
|
22
17
|
const { containerRef: footerRef } = useFocusZone({
|
|
23
18
|
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.Tab,
|
|
24
|
-
focusInStrategy: 'closest'
|
|
19
|
+
focusInStrategy: 'closest',
|
|
25
20
|
});
|
|
26
|
-
return (_jsxs(PrimerDialog.Footer, { className: "dla-dialog-footer", ref: footerRef, children: [checkbox &&
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, title: checkbox.caption ?? '' }), _jsx(FormControl.Label, { children: checkbox.label ?? '' })] }), _jsx("div", { className: "dla-dialog-footer-spacer" }), footerButtons &&
|
|
31
|
-
_jsx(PrimerDialog.Buttons, { buttons: footerButtons })] }));
|
|
21
|
+
return (_jsxs(PrimerDialog.Footer, { className: "dla-dialog-footer", ref: footerRef, children: [checkbox && (_jsxs(FormControl, { layout: "horizontal", children: [_jsx(Checkbox, { className: checkbox.className ?? '', checked: checked, defaultChecked: checkbox.checked, onChange: e => {
|
|
22
|
+
setLocalChecked(e.target.checked);
|
|
23
|
+
setChecked(e.target.checked);
|
|
24
|
+
}, title: checkbox.caption ?? '' }), _jsx(FormControl.Label, { children: checkbox.label ?? '' })] })), _jsx("div", { className: "dla-dialog-footer-spacer" }), footerButtons && (_jsx(PrimerDialog.Buttons, { buttons: footerButtons }))] }));
|
|
32
25
|
}
|
|
33
26
|
/**
|
|
34
27
|
* A primer dialog mimicking the JupyterLab dialog interface
|
|
@@ -43,7 +36,7 @@ export class JupyterDialog extends ReactWidget {
|
|
|
43
36
|
_result = {
|
|
44
37
|
button: null,
|
|
45
38
|
isChecked: null,
|
|
46
|
-
value: null
|
|
39
|
+
value: null,
|
|
47
40
|
};
|
|
48
41
|
/**
|
|
49
42
|
* Create a dialog instance.
|
|
@@ -55,13 +48,13 @@ export class JupyterDialog extends ReactWidget {
|
|
|
55
48
|
this.checkbox = options.checkbox ?? null;
|
|
56
49
|
this.buttons = options.buttons ?? [
|
|
57
50
|
Dialog.cancelButton(),
|
|
58
|
-
Dialog.okButton()
|
|
51
|
+
Dialog.okButton(),
|
|
59
52
|
];
|
|
60
53
|
this.dialogTitle = options.title;
|
|
61
54
|
}
|
|
62
55
|
_renderBody = (props) => (_jsx(PrimerDialog.Body, { children: createElement(this.body, {
|
|
63
56
|
...props,
|
|
64
|
-
setValue: this.setValue
|
|
57
|
+
setValue: this.setValue,
|
|
65
58
|
}) }));
|
|
66
59
|
_renderFooter = (props) => (_jsx(DialogFooter, { ...props, checkbox: this.checkbox, setChecked: this.setChecked }));
|
|
67
60
|
render() {
|
|
@@ -74,12 +67,16 @@ export class JupyterDialog extends ReactWidget {
|
|
|
74
67
|
}, onClose: this.close, footerButtons: this.buttons.map((but, idx) => {
|
|
75
68
|
const footerButton = {
|
|
76
69
|
buttonType: but.displayType === 'default'
|
|
77
|
-
? but.accept
|
|
70
|
+
? but.accept
|
|
71
|
+
? 'primary'
|
|
72
|
+
: 'default'
|
|
78
73
|
: 'danger',
|
|
79
|
-
onClick: () => {
|
|
74
|
+
onClick: () => {
|
|
75
|
+
this.handleButton(idx);
|
|
76
|
+
},
|
|
80
77
|
content: but.label,
|
|
81
78
|
'aria-label': but.ariaLabel,
|
|
82
|
-
autoFocus: but.accept
|
|
79
|
+
autoFocus: but.accept,
|
|
83
80
|
};
|
|
84
81
|
return footerButton;
|
|
85
82
|
}), renderBody: this._renderBody, renderFooter: this._renderFooter, title: this.dialogTitle }));
|
|
@@ -2,8 +2,10 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
export type NavLinkProps = {
|
|
3
3
|
to: string;
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Navigation link for primer NavList
|
|
9
|
+
* Works with React Router, Next.js, or native browser navigation
|
|
8
10
|
*/
|
|
9
|
-
export declare const NavLink: import("react").ForwardRefExoticComponent<NavLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
export declare const NavLink: import("react").ForwardRefExoticComponent<Omit<NavLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -3,20 +3,17 @@ import { 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
import { forwardRef, useCallback } from 'react';
|
|
12
7
|
import { useNavigate } from '../../hooks';
|
|
13
8
|
/**
|
|
14
|
-
*
|
|
9
|
+
* Navigation link for primer NavList
|
|
10
|
+
* Works with React Router, Next.js, or native browser navigation
|
|
15
11
|
*/
|
|
16
12
|
export const NavLink = forwardRef(({ to, children, ...props }, ref) => {
|
|
17
13
|
const navigate = useNavigate();
|
|
18
|
-
const onClick = useCallback(() => {
|
|
14
|
+
const onClick = useCallback((e) => {
|
|
15
|
+
e.preventDefault();
|
|
19
16
|
navigate(to);
|
|
20
|
-
}, [to]);
|
|
21
|
-
return (_jsx("a", { ref: ref, ...props, onClick: onClick, children: children }));
|
|
17
|
+
}, [to, navigate]);
|
|
18
|
+
return (_jsx("a", { ref: ref, href: to, ...props, onClick: onClick, children: children }));
|
|
22
19
|
});
|
|
@@ -3,13 +3,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
|
-
import { Box } from "@datalayer/primer-addons";
|
|
12
|
-
import { SkeletonBox } from "@primer/react/experimental";
|
|
6
|
+
import { Box } from '@datalayer/primer-addons';
|
|
7
|
+
import { SkeletonBox } from '@primer/react/experimental';
|
|
13
8
|
export const NotebookSkeleton = () => {
|
|
14
9
|
return (_jsxs(_Fragment, { children: [_jsx(SkeletonBox, { height: "100px" }), _jsx(Box, { style: { height: 20 } }), _jsx(SkeletonBox, { height: "100px" }), _jsx(Box, { style: { height: 20 } }), _jsx(SkeletonBox, { height: "100px" }), _jsx(Box, { style: { height: 20 } }), _jsx(SkeletonBox, { height: "100px" })] }));
|
|
15
10
|
};
|
|
@@ -3,12 +3,7 @@ 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
export const Placeholder = () => {
|
|
12
|
-
return
|
|
7
|
+
return _jsx(_Fragment, {});
|
|
13
8
|
};
|
|
14
9
|
export default Placeholder;
|
|
@@ -3,12 +3,7 @@ import { 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
|
-
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
|
-
import { Button } from "@primer/react-brand";
|
|
6
|
+
import { Button } from '@primer/react-brand';
|
|
12
7
|
import { MoveToTopIcon } from '@primer/octicons-react';
|
|
13
8
|
export const ToTopBranded = () => {
|
|
14
9
|
return (_jsx("div", { style: { position: 'fixed', bottom: '50px', left: '100px' }, children: _jsx(Button, { leadingVisual: _jsx(MoveToTopIcon, {}), hasArrow: false, size: "small", onClick: e => window.scrollTo(0, 0), children: "Go Top" }) }));
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
import { sx } from '@primer/react';
|
|
11
6
|
import styled from 'styled-components';
|
|
12
7
|
export const VisuallyHidden = styled.span `
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
export * from './AvatarSkeleton';
|
|
11
6
|
export * from './CenteredSpinner';
|
|
12
7
|
export * from './CodePreview';
|
|
@@ -7,5 +7,5 @@ export interface EChartsProps {
|
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
theme?: 'light' | 'dark';
|
|
9
9
|
}
|
|
10
|
-
export declare const EChartsReact: ({ options, style, settings, loading, theme }: EChartsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EChartsReact: ({ options, style, settings, loading, theme, }: EChartsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default EChartsReact;
|
|
@@ -3,14 +3,9 @@ import { 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
import { useEffect, useRef, useState } from 'react';
|
|
12
7
|
import { init } from 'echarts';
|
|
13
|
-
export const EChartsReact = ({ options, style, settings, loading, theme }) => {
|
|
8
|
+
export const EChartsReact = ({ options, style, settings, loading, theme, }) => {
|
|
14
9
|
const chartRef = useRef(null);
|
|
15
10
|
const [chart, setChart] = useState();
|
|
16
11
|
useEffect(() => {
|
|
@@ -45,7 +40,12 @@ export const EChartsReact = ({ options, style, settings, loading, theme }) => {
|
|
|
45
40
|
}, [chart, options, settings]);
|
|
46
41
|
useEffect(() => {
|
|
47
42
|
if (chart && !chart.isDisposed()) {
|
|
48
|
-
loading === true
|
|
43
|
+
if (loading === true) {
|
|
44
|
+
chart.showLoading();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
chart.hideLoading();
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
}, [chart, loading]);
|
|
51
51
|
return (_jsx("div", { ref: chartRef, style: { width: '100%', height: '100px', ...style } }));
|
|
@@ -3,14 +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
|
-
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
|
-
import { AlertIcon, CheckIcon, InfoIcon, StopIcon, XIcon } from '@primer/octicons-react';
|
|
6
|
+
import { AlertIcon, CheckIcon, InfoIcon, StopIcon, XIcon, } from '@primer/octicons-react';
|
|
12
7
|
import { Flash as PrimerFlash, IconButton } from '@primer/react';
|
|
13
|
-
import { Box } from
|
|
8
|
+
import { Box } from '@datalayer/primer-addons';
|
|
14
9
|
import { useCallback, useState } from 'react';
|
|
15
10
|
/**
|
|
16
11
|
* Closable flash component with actions.
|
|
@@ -37,31 +32,31 @@ export const FlashClosable = (props) => {
|
|
|
37
32
|
gridTemplateAreas: `
|
|
38
33
|
'visual message close'
|
|
39
34
|
'. actions actions'
|
|
40
|
-
|
|
41
|
-
}
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
42
37
|
}, children: [_jsx(Box, { sx: {
|
|
43
38
|
display: 'grid',
|
|
44
39
|
paddingBlock: 'var(--base-size-8)',
|
|
45
40
|
alignSelf: 'center',
|
|
46
|
-
gridArea: 'visual'
|
|
41
|
+
gridArea: 'visual',
|
|
47
42
|
}, children: visual }), _jsx(Box, { sx: {
|
|
48
43
|
alignSelf: 'center',
|
|
49
44
|
display: 'grid',
|
|
50
|
-
gridArea: 'message'
|
|
45
|
+
gridArea: 'message',
|
|
51
46
|
}, children: children }), _jsx(Box, { sx: {
|
|
52
47
|
display: 'grid',
|
|
53
48
|
gap: 'var(--stack-gap-condensed)',
|
|
54
49
|
marginLeft: 'actions',
|
|
55
50
|
'@media screen and (max-width: 544px)': {
|
|
56
51
|
alignSelf: 'start',
|
|
57
|
-
margin: 'var(--base-size-8) 0 0 var(--base-size-8)'
|
|
58
|
-
}
|
|
52
|
+
margin: 'var(--base-size-8) 0 0 var(--base-size-8)',
|
|
53
|
+
},
|
|
59
54
|
}, children: actions }), closable && (_jsx(Box, { sx: {
|
|
60
55
|
alignSelf: 'start',
|
|
61
|
-
marginLeft: 'close'
|
|
56
|
+
marginLeft: 'close',
|
|
62
57
|
}, children: _jsx(IconButton, { "aria-label": "Dismiss flash message", title: "Dismiss", onClick: onClose, variant: "invisible", icon: XIcon, sx: {
|
|
63
|
-
'& > svg': { marginRight: 0, color: 'var(--fgColor-default)' }
|
|
64
|
-
} }) }))] })) : _jsx(_Fragment, {});
|
|
58
|
+
'& > svg': { marginRight: 0, color: 'var(--fgColor-default)' },
|
|
59
|
+
} }) }))] })) : (_jsx(_Fragment, {}));
|
|
65
60
|
};
|
|
66
61
|
FlashClosable.defaultProps = {
|
|
67
62
|
closable: true,
|
|
@@ -3,13 +3,8 @@ 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
import { Label, Link } from '@primer/react';
|
|
12
|
-
import { Box } from
|
|
7
|
+
import { Box } from '@datalayer/primer-addons';
|
|
13
8
|
import { Banner } from '@primer/react/experimental';
|
|
14
9
|
import { useCoreStore, useRuntimesStore } from '../../state';
|
|
15
10
|
import { useNavigate } from '../../hooks';
|
|
@@ -17,7 +12,6 @@ export const FlashDisclaimer = () => {
|
|
|
17
12
|
const { configuration } = useCoreStore();
|
|
18
13
|
const { showDisclaimer, setShowDisclaimer } = useRuntimesStore();
|
|
19
14
|
const navigate = useNavigate();
|
|
20
|
-
return (_jsx(_Fragment, { children: configuration?.whiteLabel === false && showDisclaimer &&
|
|
21
|
-
_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) })) }));
|
|
22
16
|
};
|
|
23
17
|
export default FlashDisclaimer;
|
|
@@ -3,11 +3,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
import { useCallback } from 'react';
|
|
12
7
|
import { Button, Text } from '@primer/react';
|
|
13
8
|
import { useCoreStore, useIAMStore } from '../../state';
|
|
@@ -27,9 +22,8 @@ export const FlashGuest = () => {
|
|
|
27
22
|
const onContactSupport = useCallback(() => {
|
|
28
23
|
navigate(CONTACT_ROUTE);
|
|
29
24
|
}, []);
|
|
30
|
-
return (_jsx(_Fragment, { children: !isPlatformMember &&
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
: '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." }) })) }));
|
|
34
28
|
};
|
|
35
29
|
export default FlashGuest;
|
|
@@ -3,19 +3,14 @@ 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
import { useEffect, useState } from 'react';
|
|
12
7
|
import { Text, Link } from '@primer/react';
|
|
13
8
|
import { FlashClosable } from '../../components/flashes';
|
|
14
|
-
import { Box } from
|
|
9
|
+
import { Box } from '@datalayer/primer-addons';
|
|
15
10
|
import { useToast } from '../../hooks';
|
|
16
11
|
import { useCoreStore, useSurveysStore } from '../../state';
|
|
17
12
|
import { Survey2025_1 } from './surveys';
|
|
18
|
-
export const SURVEY_2025_1_NAME =
|
|
13
|
+
export const SURVEY_2025_1_NAME = '2025-1';
|
|
19
14
|
export const FlashSurveys = (props) => {
|
|
20
15
|
const { surveyName } = props;
|
|
21
16
|
const { enqueueToast } = useToast();
|
|
@@ -35,7 +30,6 @@ export const FlashSurveys = (props) => {
|
|
|
35
30
|
setShow(false);
|
|
36
31
|
enqueueToast('Thank you for your answers.', { variant: 'success' });
|
|
37
32
|
};
|
|
38
|
-
return (_jsx(_Fragment, { children: surveys && (show || surveyName) && !configuration.whiteLabel &&
|
|
39
|
-
_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" }), "."] }) })] })) }));
|
|
40
34
|
};
|
|
41
35
|
export default FlashSurveys;
|
|
@@ -3,21 +3,16 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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
|
-
/*
|
|
7
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Datalayer License
|
|
10
|
-
*/
|
|
11
6
|
// import { AlertIcon } from '@primer/octicons-react';
|
|
12
7
|
// import { Box, Flash as PrimerFlash, Link } from '@primer/react';
|
|
13
8
|
import { Link } from '@primer/react';
|
|
14
9
|
import { Banner } from '@primer/react/experimental';
|
|
15
|
-
import { QuestionIcon } from
|
|
10
|
+
import { QuestionIcon } from '@primer/octicons-react';
|
|
16
11
|
import { useNavigate } from '../../hooks';
|
|
17
12
|
export const FlashUnauthorized = () => {
|
|
18
13
|
const navigate = useNavigate();
|
|
19
14
|
return (_jsx(_Fragment, { children: _jsx(Banner, { title: "Warning", variant: "warning",
|
|
20
15
|
// onDismiss={action('onDismiss')}
|
|
21
|
-
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" }) }) }));
|
|
22
17
|
};
|
|
23
18
|
export default FlashUnauthorized;
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
export * from './surveys';
|
|
11
6
|
export * from './FlashClosable';
|
|
12
7
|
export * from './FlashDisclaimer';
|