@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
|
@@ -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 const ECHART_MOCK_1 = {
|
|
11
6
|
grid: { top: 8, right: 8, bottom: 24, left: 36 },
|
|
12
7
|
xAxis: {
|
|
@@ -30,10 +25,10 @@ export const ECHART_MOCK_1 = {
|
|
|
30
25
|
export const ECHART_MOCK_2 = {
|
|
31
26
|
xAxis: {
|
|
32
27
|
type: 'category',
|
|
33
|
-
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
28
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
34
29
|
},
|
|
35
30
|
yAxis: {
|
|
36
|
-
type: 'value'
|
|
31
|
+
type: 'value',
|
|
37
32
|
},
|
|
38
33
|
series: [
|
|
39
34
|
{
|
|
@@ -42,35 +37,35 @@ export const ECHART_MOCK_2 = {
|
|
|
42
37
|
{
|
|
43
38
|
value: 200,
|
|
44
39
|
itemStyle: {
|
|
45
|
-
color: '#a90000'
|
|
46
|
-
}
|
|
40
|
+
color: '#a90000',
|
|
41
|
+
},
|
|
47
42
|
},
|
|
48
43
|
150,
|
|
49
44
|
80,
|
|
50
45
|
70,
|
|
51
46
|
110,
|
|
52
|
-
130
|
|
47
|
+
130,
|
|
53
48
|
],
|
|
54
|
-
type: 'bar'
|
|
55
|
-
}
|
|
56
|
-
]
|
|
49
|
+
type: 'bar',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
57
52
|
};
|
|
58
53
|
export const ECHART_MOCK_3 = {
|
|
59
54
|
title: [
|
|
60
55
|
{
|
|
61
|
-
text: 'Radial Polar Bar Label Position (middle)'
|
|
62
|
-
}
|
|
56
|
+
text: 'Radial Polar Bar Label Position (middle)',
|
|
57
|
+
},
|
|
63
58
|
],
|
|
64
59
|
polar: {
|
|
65
|
-
radius: [30, '80%']
|
|
60
|
+
radius: [30, '80%'],
|
|
66
61
|
},
|
|
67
62
|
radiusAxis: {
|
|
68
|
-
max: 4
|
|
63
|
+
max: 4,
|
|
69
64
|
},
|
|
70
65
|
angleAxis: {
|
|
71
66
|
type: 'category',
|
|
72
67
|
data: ['a', 'b', 'c', 'd'],
|
|
73
|
-
startAngle: 75
|
|
68
|
+
startAngle: 75,
|
|
74
69
|
},
|
|
75
70
|
tooltip: {},
|
|
76
71
|
series: {
|
|
@@ -80,28 +75,28 @@ export const ECHART_MOCK_3 = {
|
|
|
80
75
|
label: {
|
|
81
76
|
show: true,
|
|
82
77
|
position: 'middle',
|
|
83
|
-
formatter: '{b}: {c}'
|
|
84
|
-
}
|
|
78
|
+
formatter: '{b}: {c}',
|
|
79
|
+
},
|
|
85
80
|
},
|
|
86
|
-
animation: true
|
|
81
|
+
animation: true,
|
|
87
82
|
};
|
|
88
83
|
export const CHART_4 = {
|
|
89
84
|
grid: { top: 20, right: 40, bottom: 20, left: 40 },
|
|
90
85
|
xAxis: {
|
|
91
|
-
type:
|
|
92
|
-
data: [
|
|
86
|
+
type: 'category',
|
|
87
|
+
data: ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5'],
|
|
93
88
|
},
|
|
94
89
|
yAxis: {
|
|
95
|
-
type:
|
|
90
|
+
type: 'value',
|
|
96
91
|
},
|
|
97
92
|
series: [
|
|
98
93
|
{
|
|
99
94
|
data: [400, 300, 350, 200, 280],
|
|
100
|
-
type:
|
|
101
|
-
smooth: true
|
|
102
|
-
}
|
|
95
|
+
type: 'bar',
|
|
96
|
+
smooth: true,
|
|
97
|
+
},
|
|
103
98
|
],
|
|
104
99
|
tooltip: {
|
|
105
|
-
trigger:
|
|
106
|
-
}
|
|
100
|
+
trigger: 'axis',
|
|
101
|
+
},
|
|
107
102
|
};
|
|
@@ -3,45 +3,40 @@ 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
|
-
|
|
12
|
-
import { ArrowRightIcon, CloudIcon, StarIcon, DotFillIcon, RepoForkedIcon, LinkIcon } from "@primer/octicons-react";
|
|
13
|
-
import { ReactJsIcon } from "@datalayer/icons-react";
|
|
14
|
-
import { lazyWithPreload, WithSuspense } from "../../utils";
|
|
15
|
-
import { ECHART_MOCK_1, ECHART_MOCK_2, ECHART_MOCK_3, FlashMock } from "../../mocks";
|
|
16
|
-
const ReactECharts = WithSuspense(lazyWithPreload(() => import("echarts-for-react")), true);
|
|
6
|
+
import { Box, Link, Text, LabelGroup, Label, ActionMenu, ActionList, } from '@primer/react';
|
|
7
|
+
import { ArrowRightIcon, CloudIcon, StarIcon, DotFillIcon, RepoForkedIcon, LinkIcon, } from '@primer/octicons-react';
|
|
8
|
+
import { ReactJsIcon } from '@datalayer/icons-react';
|
|
9
|
+
import { lazyWithPreload, WithSuspense } from '../../utils';
|
|
10
|
+
import { ECHART_MOCK_1, ECHART_MOCK_2, ECHART_MOCK_3, FlashMock, } from '../../mocks';
|
|
11
|
+
const ReactECharts = WithSuspense(lazyWithPreload(() => import('echarts-for-react')), true);
|
|
17
12
|
export const DashboardMock = () => {
|
|
18
13
|
return (_jsxs(_Fragment, { children: [_jsx(Box, { mb: 3, children: _jsx(FlashMock, {}) }), _jsxs(Box, { sx: {
|
|
19
|
-
display:
|
|
20
|
-
gridTemplateColumns:
|
|
14
|
+
display: 'grid',
|
|
15
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
|
21
16
|
gap: 4,
|
|
22
17
|
}, children: [_jsxs(Box, { sx: {
|
|
23
|
-
gridColumn:
|
|
24
|
-
minHeight:
|
|
18
|
+
gridColumn: '1 / 3',
|
|
19
|
+
minHeight: '200px',
|
|
25
20
|
}, children: [_jsxs(Box, { sx: {
|
|
26
|
-
display:
|
|
27
|
-
alignItems:
|
|
28
|
-
justifyContent:
|
|
29
|
-
paddingRight: 4
|
|
30
|
-
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft:
|
|
31
|
-
display:
|
|
32
|
-
gridTemplateColumns:
|
|
21
|
+
display: 'flex',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
paddingRight: 4,
|
|
25
|
+
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '4px solid #28b899', paddingLeft: 2 }, children: "My latest work" }), _jsxs(Link, { children: ["View all work", _jsx(ArrowRightIcon, {})] })] }), _jsxs(Box, { sx: {
|
|
26
|
+
display: 'grid',
|
|
27
|
+
gridTemplateColumns: '1fr 1fr',
|
|
33
28
|
gap: 4,
|
|
34
29
|
}, children: [_jsxs(Box, { sx: {
|
|
35
|
-
borderColor:
|
|
36
|
-
borderStyle:
|
|
37
|
-
borderWidth:
|
|
38
|
-
borderRadius:
|
|
30
|
+
borderColor: 'border.default',
|
|
31
|
+
borderStyle: 'solid',
|
|
32
|
+
borderWidth: '1',
|
|
33
|
+
borderRadius: '2',
|
|
39
34
|
padding: 4,
|
|
40
|
-
}, children: [_jsxs(Text, { as: "h3", sx: { paddingBottom: 2 }, children: ["clouder ", _jsx(Label, { children: "Public" })] }), _jsxs(Text, { as: "p", sx: { color:
|
|
35
|
+
}, children: [_jsxs(Text, { as: "h3", sx: { paddingBottom: 2 }, children: ["clouder ", _jsx(Label, { children: "Public" })] }), _jsxs(Text, { as: "p", sx: { color: 'fg.subtle', fontWeight: 'semibold' }, children: [_jsx(CloudIcon
|
|
41
36
|
// sx={{ margin: "0 4px" }}
|
|
42
37
|
, {}), "Create, manage and share Kubernetes clusters."] }), _jsxs(LabelGroup, { sx: { paddingTop: 2, paddingBottom: 2 }, children: [_jsx(Label, { variant: "accent", children: "Kubernetes" }), _jsx(Label, { variant: "accent", children: "cloud" }), _jsx(Label, { variant: "accent", children: "kubernets-cluster" }), _jsx(Label, { variant: "accent", children: "datalayer" })] }), _jsxs(Text, { as: "p", sx: {
|
|
43
|
-
color:
|
|
44
|
-
|
|
38
|
+
color: 'fg.subtle',
|
|
39
|
+
'> *': { paddingLeft: 1, paddingRight: 1 },
|
|
45
40
|
}, children: [_jsxs(Text, { children: [_jsx(DotFillIcon
|
|
46
41
|
// sx={{
|
|
47
42
|
// fill: "#4f729d",
|
|
@@ -53,71 +48,71 @@ export const DashboardMock = () => {
|
|
|
53
48
|
, {}), "3"] }), _jsxs(Text, { children: [_jsx(StarIcon
|
|
54
49
|
// sx={{ marginRight: 1, marginBottom: "3px" }}
|
|
55
50
|
, {}), "11"] })] })] }), _jsxs(Box, { sx: {
|
|
56
|
-
borderColor:
|
|
57
|
-
borderStyle:
|
|
58
|
-
borderWidth:
|
|
59
|
-
borderRadius:
|
|
51
|
+
borderColor: 'border.default',
|
|
52
|
+
borderStyle: 'solid',
|
|
53
|
+
borderWidth: '1',
|
|
54
|
+
borderRadius: '2',
|
|
60
55
|
padding: 4,
|
|
61
|
-
}, children: [_jsxs(Text, { as: "h3", sx: { paddingBottom: 2 }, children: ["jupyter-ui ", _jsx(Label, { children: "Public" })] }), _jsxs(Text, { as: "p", children: [_jsx(ReactJsIcon, { style: { margin:
|
|
62
|
-
color:
|
|
63
|
-
|
|
56
|
+
}, children: [_jsxs(Text, { as: "h3", sx: { paddingBottom: 2 }, children: ["jupyter-ui ", _jsx(Label, { children: "Public" })] }), _jsxs(Text, { as: "p", children: [_jsx(ReactJsIcon, { style: { margin: '0 4px' } }), "React.js components 100% compatible with Jupyter.", ' ', _jsx(Link, { href: "https://jupyter-ui-storybook.datalayer.tech", children: "https://jupyter-ui-storybook.datalayer.tech" })] }), _jsxs(LabelGroup, { sx: { paddingTop: 2, paddingBottom: 2 }, children: [_jsx(Label, { variant: "accent", children: "data-science" }), _jsx(Label, { variant: "accent", children: "data" }), _jsx(Label, { variant: "accent", children: "ui" }), _jsx(Label, { variant: "accent", children: "jupyter" }), _jsx(Label, { children: "+4" })] }), _jsxs(Text, { as: "p", sx: {
|
|
57
|
+
color: 'fg.subtle',
|
|
58
|
+
'> *': { paddingLeft: 1, paddingRight: 1 },
|
|
64
59
|
}, children: [_jsxs(Text, { children: [_jsx(DotFillIcon
|
|
65
60
|
/*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
sx={{
|
|
62
|
+
fill: "#4f729d",
|
|
63
|
+
marginRight: 1,
|
|
64
|
+
marginBottom: "3px",
|
|
65
|
+
}}
|
|
66
|
+
*/
|
|
72
67
|
, {}), "Typescript"] }), _jsxs(Text, { children: [_jsx(RepoForkedIcon
|
|
73
68
|
// sx={{ marginRight: 1, marginBottom: "3px" }}
|
|
74
69
|
, {}), "3"] }), _jsxs(Text, { children: [_jsx(StarIcon
|
|
75
70
|
// sx={{ marginRight: 1, marginBottom: "3px" }}
|
|
76
71
|
, {}), "11"] })] })] })] })] }), _jsxs(Box, { sx: {
|
|
77
|
-
gridColumn:
|
|
78
|
-
gridRow:
|
|
79
|
-
minHeight:
|
|
72
|
+
gridColumn: '3 / 4',
|
|
73
|
+
gridRow: '1 / 3',
|
|
74
|
+
minHeight: '200px',
|
|
80
75
|
}, children: [_jsxs(Box, { sx: {
|
|
81
|
-
display:
|
|
82
|
-
alignItems:
|
|
83
|
-
justifyContent:
|
|
84
|
-
paddingRight: 4
|
|
85
|
-
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft:
|
|
86
|
-
borderColor:
|
|
87
|
-
borderStyle:
|
|
88
|
-
borderWidth:
|
|
89
|
-
borderRadius:
|
|
90
|
-
padding: 4
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
justifyContent: 'space-between',
|
|
79
|
+
paddingRight: 4,
|
|
80
|
+
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '4px solid #28b899', paddingLeft: 2 }, children: "Usage" }), _jsxs(Link, { children: ["More Usage", _jsx(ArrowRightIcon, {})] })] }), _jsxs(Box, { sx: {
|
|
81
|
+
borderColor: 'border.default',
|
|
82
|
+
borderStyle: 'solid',
|
|
83
|
+
borderWidth: '1',
|
|
84
|
+
borderRadius: '2',
|
|
85
|
+
padding: 4,
|
|
91
86
|
}, children: [_jsxs(Box, { sx: {
|
|
92
|
-
display:
|
|
93
|
-
flexDirection:
|
|
94
|
-
alignItems:
|
|
95
|
-
}, children: [_jsx(Text, { as: "h3", sx: { marginRight:
|
|
96
|
-
gridColumn:
|
|
97
|
-
minHeight:
|
|
87
|
+
display: 'inline-flex',
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
}, children: [_jsx(Text, { as: "h3", sx: { marginRight: '20px' }, children: "Kernels Activity" }), _jsxs(ActionMenu, { children: [_jsxs(ActionMenu.Button, { children: [_jsx(Box, { sx: { color: 'fg.muted', display: 'inline-block' }, children: "View:" }), ' ', 'All kernels'] }), _jsx(ActionMenu.Overlay, { width: "auto", children: _jsx(ActionList, { selectionVariant: "single", children: _jsx(ActionList.Item, { selected: true, children: "All kernels" }) }) })] })] }), _jsx(Text, { as: "h3", children: "Credits usage" }), _jsx(Text, { as: "p", sx: { color: 'fg.subtle' }, children: "Amount today" }), _jsx(Text, { as: "p", sx: { color: 'fg.subtle' }, children: "Balance yesterday" }), _jsx(Text, { as: "h3", children: "Last invoice" }), _jsx(Text, { as: "p", sx: { color: 'fg.subtle', fontSize: '3', fontWeight: 'bold' }, children: "$216" })] })] }), _jsxs(Box, { sx: {
|
|
91
|
+
gridColumn: '1 / 3',
|
|
92
|
+
minHeight: '200px',
|
|
98
93
|
}, children: [_jsxs(Box, { sx: {
|
|
99
|
-
display:
|
|
100
|
-
alignItems:
|
|
101
|
-
justifyContent:
|
|
102
|
-
paddingRight: 4
|
|
103
|
-
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft:
|
|
104
|
-
borderColor:
|
|
105
|
-
borderStyle:
|
|
106
|
-
borderWidth:
|
|
107
|
-
borderRadius:
|
|
108
|
-
display:
|
|
109
|
-
gridTemplateColumns:
|
|
110
|
-
|
|
111
|
-
borderRightColor:
|
|
112
|
-
borderRightStyle:
|
|
113
|
-
borderRightWidth:
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
justifyContent: 'space-between',
|
|
97
|
+
paddingRight: 4,
|
|
98
|
+
}, children: [_jsx(Text, { as: "h2", sx: { borderLeft: '4px solid #28b899', paddingLeft: 2 }, children: "Trending Notebooks" }), _jsxs(Link, { children: ["All Notebooks", _jsx(ArrowRightIcon, {})] })] }), _jsxs(Box, { sx: {
|
|
99
|
+
borderColor: 'border.default',
|
|
100
|
+
borderStyle: 'solid',
|
|
101
|
+
borderWidth: '1',
|
|
102
|
+
borderRadius: '2',
|
|
103
|
+
display: 'grid',
|
|
104
|
+
gridTemplateColumns: '1fr 1fr',
|
|
105
|
+
'> :not(:last-child)': {
|
|
106
|
+
borderRightColor: 'border.default',
|
|
107
|
+
borderRightStyle: 'solid',
|
|
108
|
+
borderRightWidth: '1',
|
|
114
109
|
},
|
|
115
110
|
}, children: [_jsxs(Box, { sx: {
|
|
116
111
|
padding: 4,
|
|
117
|
-
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color:
|
|
112
|
+
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color: 'fg.subtle' }, children: "Subtitle comes here" }), _jsxs(Box, { sx: { height: '300px', maxWidth: '380px' }, children: [_jsx(ReactECharts, { option: ECHART_MOCK_1 }), ";"] }), _jsxs(Text, { as: "p", sx: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx(Link, { children: "Link to somewhere" }), _jsxs(Link, { children: ["Second link", _jsx(LinkIcon, {})] })] })] }), _jsxs(Box, { sx: {
|
|
118
113
|
padding: 4,
|
|
119
|
-
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color:
|
|
114
|
+
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color: 'fg.subtle' }, children: "Subtitle comes here" }), _jsxs(Box, { sx: { height: '300px', maxWidth: '380px' }, children: [_jsx(ReactECharts, { option: ECHART_MOCK_3 }), ";"] }), _jsxs(Text, { as: "p", sx: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx(Link, { children: "Link to somewhere" }), _jsxs(Link, { children: ["Second link", _jsx(LinkIcon, {})] })] })] }), _jsxs(Box, { sx: {
|
|
120
115
|
padding: 4,
|
|
121
|
-
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color:
|
|
116
|
+
}, children: [_jsx(Text, { as: "h3", children: "Notebook name abc" }), _jsx(Text, { sx: { color: 'fg.subtle' }, children: "Subtitle comes here" }), _jsxs(Box, { sx: { height: '300px', maxWidth: '380px' }, children: [_jsx(ReactECharts, { option: ECHART_MOCK_2 }), ";"] }), _jsxs(Text, { as: "p", sx: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx(Link, { children: "Link to somewhere" }), _jsxs(Link, { children: ["Second link", _jsx(LinkIcon, {})] })] })] })] })] })] })] }));
|
|
122
117
|
};
|
|
123
118
|
export default DashboardMock;
|
|
@@ -3,13 +3,8 @@ 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
6
|
import { useState } from 'react';
|
|
12
|
-
import { Box, FormControl, TextInputWithTokens, Autocomplete, Select, Textarea, Heading } from '@primer/react';
|
|
7
|
+
import { Box, FormControl, TextInputWithTokens, Autocomplete, Select, Textarea, Heading, } from '@primer/react';
|
|
13
8
|
export const FormMock = (props) => {
|
|
14
9
|
const { title } = props;
|
|
15
10
|
const [tokens, setTokens] = useState([
|
|
@@ -3,12 +3,7 @@ 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 { Box, LabelGroup, ActionMenu, ActionList, IconButton, Label, RelativeTime } from '@primer/react';
|
|
6
|
+
import { Box, LabelGroup, ActionMenu, ActionList, IconButton, Label, RelativeTime, } from '@primer/react';
|
|
12
7
|
import { Table, DataTable } from '@primer/react/experimental';
|
|
13
8
|
import { KebabHorizontalIcon, DownloadIcon } from '@primer/octicons-react';
|
|
14
9
|
import { VisuallyHidden } from './../../components/display';
|
|
@@ -3,11 +3,6 @@ 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
6
|
import { Box, PageHeader, Flash, PageLayout } from '@primer/react';
|
|
12
7
|
import { ConstructionIcon } from '@datalayer/icons-react';
|
|
13
8
|
export const WipMock = (props) => {
|
package/lib/mocks/views/index.js
CHANGED
|
@@ -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 './ActionMenuMock';
|
|
11
6
|
export * from './ChartMock';
|
|
12
7
|
export * from './ChartMockOptions';
|
package/lib/models/Account.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IBaseNotebook } from
|
|
2
|
-
import { IStudentItem } from
|
|
1
|
+
import { IBaseNotebook } from './Notebook';
|
|
2
|
+
import { IStudentItem } from './StudentItem';
|
|
3
3
|
export type IAssignment = IBaseNotebook & {
|
|
4
4
|
type: 'assignment';
|
|
5
5
|
studentItem?: IStudentItem;
|
package/lib/models/Cell.d.ts
CHANGED
package/lib/models/Contact.d.ts
CHANGED
package/lib/models/Contact.js
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
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
|
-
import { asContactIAMProvider } from "./ContactIAMProvider";
|
|
5
|
+
import { asContactIAMProvider, } from './ContactIAMProvider';
|
|
11
6
|
import { asContactEvent } from './ContactEvent';
|
|
12
7
|
import { asDisplayName, namesAsInitials } from '../utils';
|
|
13
8
|
export class Contact {
|
|
@@ -41,23 +36,23 @@ export class Contact {
|
|
|
41
36
|
constructor(c) {
|
|
42
37
|
this.id = c.uid;
|
|
43
38
|
this.handle = c.handle;
|
|
44
|
-
this.firstName = c.firstName ??
|
|
45
|
-
this.lastName = c.lastName ??
|
|
46
|
-
this.jobTitle = c.jobTitle ??
|
|
47
|
-
this.email = c.email ??
|
|
48
|
-
this.emailPersonal = c.emailPersonal ??
|
|
49
|
-
this.countryCode = c.countryCode ??
|
|
39
|
+
this.firstName = c.firstName ?? '';
|
|
40
|
+
this.lastName = c.lastName ?? '';
|
|
41
|
+
this.jobTitle = c.jobTitle ?? '';
|
|
42
|
+
this.email = c.email ?? '';
|
|
43
|
+
this.emailPersonal = c.emailPersonal ?? '';
|
|
44
|
+
this.countryCode = c.countryCode ?? '';
|
|
50
45
|
this.initials = namesAsInitials(this.firstName, this.lastName);
|
|
51
46
|
const displayName = asDisplayName(this.firstName, this.lastName);
|
|
52
47
|
this.displayName = displayName || '❓';
|
|
53
48
|
this.text = this.displayName;
|
|
54
|
-
this.avatarUrl = c.avatarUrl ??
|
|
55
|
-
this.affiliation = c.affiliation ??
|
|
56
|
-
this.affiliationUrl = c.affiliationUrl ??
|
|
57
|
-
this.affiliationLinkedinUrl = c.affiliationLinkedinUrl ??
|
|
58
|
-
this.affiliationSecondary = c.affiliationSecondary ??
|
|
59
|
-
this.affiliationTertiary = c.affiliationTertiary ??
|
|
60
|
-
this.notes = c.notes ??
|
|
49
|
+
this.avatarUrl = c.avatarUrl ?? '';
|
|
50
|
+
this.affiliation = c.affiliation ?? '';
|
|
51
|
+
this.affiliationUrl = c.affiliationUrl ?? '';
|
|
52
|
+
this.affiliationLinkedinUrl = c.affiliationLinkedinUrl ?? '';
|
|
53
|
+
this.affiliationSecondary = c.affiliationSecondary ?? '';
|
|
54
|
+
this.affiliationTertiary = c.affiliationTertiary ?? '';
|
|
55
|
+
this.notes = c.notes ?? '';
|
|
61
56
|
this.tags = c.tags ?? [];
|
|
62
57
|
let iamProviders = c.iamProviders ?? [];
|
|
63
58
|
if (!Array.isArray(iamProviders)) {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
export function asContactIAMProvider(iamProvider) {
|
|
6
6
|
return {
|
|
7
7
|
iamProviderName: iamProvider.iamProviderName,
|
|
8
|
-
linkedAccount: iamProvider.linkedAccount ??
|
|
8
|
+
linkedAccount: iamProvider.linkedAccount ?? '',
|
|
9
9
|
linkedAccountUrl: iamProvider.linkedAccountUrl,
|
|
10
|
-
linkedAccountId: iamProvider.linkedAccountId ??
|
|
10
|
+
linkedAccountId: iamProvider.linkedAccountId ?? '',
|
|
11
11
|
isConnected: iamProvider.isConnected ?? false,
|
|
12
12
|
};
|
|
13
13
|
}
|
package/lib/models/Course.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IBaseSpace } from
|
|
2
|
-
import { Instructor } from
|
|
3
|
-
import { IStudent } from
|
|
4
|
-
import { ISchool } from
|
|
5
|
-
import { ISpace } from
|
|
6
|
-
import { ISpaceItem } from
|
|
1
|
+
import { IBaseSpace } from './Space';
|
|
2
|
+
import { Instructor } from './Instructor';
|
|
3
|
+
import { IStudent } from './Student';
|
|
4
|
+
import { ISchool } from './School';
|
|
5
|
+
import { ISpace } from './Space';
|
|
6
|
+
import { ISpaceItem } from './SpaceItem';
|
|
7
7
|
export type ICourse = IBaseSpace & {
|
|
8
8
|
type: 'space';
|
|
9
|
-
variant:
|
|
9
|
+
variant: 'course';
|
|
10
10
|
seedSpace?: ISpace;
|
|
11
11
|
school?: ISchool;
|
|
12
12
|
instructor?: Instructor;
|
package/lib/models/Credits.js
CHANGED
|
@@ -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
|
/**
|
|
11
6
|
* Credits level below which we refused to start a remote kernel
|
|
12
7
|
* without explicit reservation.
|
package/lib/models/Dataset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IItem } from
|
|
1
|
+
import { IItem } from './Item';
|
|
2
2
|
export type IDataset = IItem & {
|
|
3
3
|
type: 'dataset';
|
|
4
4
|
fileName: string;
|
|
@@ -6,7 +6,7 @@ export type IDataset = IItem & {
|
|
|
6
6
|
contentLength: number;
|
|
7
7
|
contentType: string;
|
|
8
8
|
mimeType: string;
|
|
9
|
-
mimeTypeParams?:
|
|
9
|
+
mimeTypeParams?: object;
|
|
10
10
|
bucketName?: string;
|
|
11
11
|
path?: string;
|
|
12
12
|
creationDate: Date;
|
package/lib/models/Datasource.js
CHANGED
package/lib/models/Dean.d.ts
CHANGED
package/lib/models/Document.d.ts
CHANGED
package/lib/models/Errors.js
CHANGED
|
@@ -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
|
/**
|
|
11
6
|
* Error emitted when the user tries to create more runtimes than allowed.
|
|
12
7
|
*/
|
package/lib/models/Exercise.d.ts
CHANGED
package/lib/models/GrowthKPI.js
CHANGED
|
@@ -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 const asGrowthKPIs = (k) => {
|
|
11
6
|
return {
|
|
12
7
|
usersCount: k.users_count,
|