jupyterlab-unianalytics-dashboard 4.0.2__tar.gz → 4.0.4__tar.gz
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.
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/CHANGELOG.md +11 -2
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/PKG-INFO +8 -8
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/README.md +6 -6
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/_version.py +1 -1
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/package.json +3 -3
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/schemas/jupyterlab_unianalytics_dashboard/package.json.orig +2 -2
- {jupyterlab_unianalytics_dashboard-4.0.2/schema → jupyterlab_unianalytics_dashboard-4.0.4/jupyterlab_unianalytics_dashboard/labextension/schemas/jupyterlab_unianalytics_dashboard}/plugin.json +8 -7
- jupyterlab_unianalytics_dashboard-4.0.4/jupyterlab_unianalytics_dashboard/labextension/static/249.691517cacbe8c2be707b.js +1 -0
- jupyterlab_unianalytics_dashboard-4.0.4/jupyterlab_unianalytics_dashboard/labextension/static/remoteEntry.e227bf2b054170abf984.js +1 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/package.json +2 -2
- {jupyterlab_unianalytics_dashboard-4.0.2/jupyterlab_unianalytics_dashboard/labextension/schemas/jupyterlab_unianalytics_dashboard → jupyterlab_unianalytics_dashboard-4.0.4/schema}/plugin.json +8 -7
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/PanelManager.ts +2 -0
- jupyterlab_unianalytics_dashboard-4.0.4/src/index.ts +108 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/plugins/dashboards.ts +27 -7
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/buttons/SortDropDown.tsx +8 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/buttons/TimeDropDown.tsx +8 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/layout/TopBreadcrumb.tsx +17 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/notebook/CodeExecComponent.tsx +6 -6
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/pages/Cell.tsx +83 -74
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/TocReactComponent.tsx +1 -1
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/generator/toolbar_generator.tsx +22 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/tocDashboardItem.tsx +6 -1
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/constants.ts +0 -4
- jupyterlab_unianalytics_dashboard-4.0.4/src/utils/interactionRecorder.ts +33 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/interfaces.ts +27 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/utils.ts +48 -0
- jupyterlab_unianalytics_dashboard-4.0.2/jupyterlab_unianalytics_dashboard/labextension/static/44.151f83c0eb02037347be.js +0 -1
- jupyterlab_unianalytics_dashboard-4.0.2/jupyterlab_unianalytics_dashboard/labextension/static/remoteEntry.ca4b44fe7f2b95f23253.js +0 -1
- jupyterlab_unianalytics_dashboard-4.0.2/src/index.ts +0 -94
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/.copier-answers.yml +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/.gitignore +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/.prettierignore +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/.yarnrc.yml +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/LICENSE +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/RELEASE.md +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/babel.config.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/install.json +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jest.config.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/junit.xml +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/__init__.py +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/10.1e5c908a94fc4b83c2e5.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/18.7ff03b96ce4c1ba53ee1.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/18.7ff03b96ce4c1ba53ee1.js.LICENSE.txt +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/308.52850e2a1110e4767a49.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/354.3fc8bedd8759d8e5959d.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/354.3fc8bedd8759d8e5959d.js.LICENSE.txt +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/39.5a3b28a79ba693a9b627.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/426.3f483e930d772b4f379a.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/480.204a87ef5b55b7100fdb.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/546.1efdc24af6b7b05d297e.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/563.b613f734176cb51510ef.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/638.707471a39fb6c87b1554.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/708.8d6156d603ddfa7e363d.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/708.8d6156d603ddfa7e363d.js.LICENSE.txt +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/744.329dc4d1ed2f5c918266.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/798.33a8f0893a66574e9259.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/981.ebb9e1d6122980b5ff0e.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/981.ebb9e1d6122980b5ff0e.js.LICENSE.txt +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/style.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/jupyterlab_unianalytics_dashboard/labextension/static/third-party-licenses.json +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/pyproject.toml +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/setup.py +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/__tests__/jupyterlab_unianalytics_dashboard.spec.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/chat-dashboard/ChatContainer.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/chat-dashboard/ConnectionComponent.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/ChatDashboardPanel.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/DashboardPanel.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/TocDashboardPanel.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/VisuDashboardPanel.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/dashboard-widgets/WebsocketManager.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/icons/index.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/icons/react-app-env.d.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/plugins/uploadNotebook.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/localStorage.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/reducers/CommonDashboardReducer.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/reducers/SideDashboardReducer.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/reducers/ToCDashboardReducer.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/store.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/redux/types.d.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/PageRouter.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/cell/CellInput.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/cell/CellOutput.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/cell/MarkdownComponent.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/layout/GridSystem.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/notebook/ChartContainer.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/notebook/TimeSpentComponent.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/placeholder/Loader.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/placeholder/NoData.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/components/placeholder/SidebarPlaceholder.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/side-dashboard/pages/Notebook.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/generator/index.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/generator/options_manager.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/generator/render.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/generator/utils.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/toc-dashboard/tocDashboardTree.tsx +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/chartOptions.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/compatibility.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/utils/headings.d.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/widget-extensions/CellButton.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/src/widget-extensions/NotebookButton.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/base.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/icons/analytics.svg +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/icons/eyeFill.svg +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/icons/eyeSlash.svg +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/icons/folder.svg +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/icons/notebook.svg +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/index.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/index.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/reactVisu.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/tocDashboard.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/tocDashboardEditor.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/style/upload.css +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/tsconfig.json +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/tsconfig.test.json +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/README.md +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/jupyter_server_test_config.py +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/package.json +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/playwright.config.js +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/tests/jupyterlab_unianalytics_dashboard.spec.ts +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/ui-tests/yarn.lock +0 -0
- {jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/yarn.lock +0 -0
{jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/CHANGELOG.md
RENAMED
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- <START NEW CHANGELOG ENTRY> -->
|
|
4
4
|
|
|
5
|
-
## 4.0.
|
|
5
|
+
## 4.0.4
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
No merged PRs
|
|
8
8
|
|
|
9
9
|
<!-- <END NEW CHANGELOG ENTRY> -->
|
|
10
10
|
|
|
11
|
+
## 4.0.3
|
|
12
|
+
|
|
13
|
+
- Smoother Cell dashboard refresh
|
|
14
|
+
- Reading userId for authentication
|
|
15
|
+
|
|
16
|
+
## 4.0.2
|
|
17
|
+
|
|
18
|
+
Changing package name
|
|
19
|
+
|
|
11
20
|
## 4.0.1
|
|
12
21
|
|
|
13
22
|
Major changes :
|
{jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/PKG-INFO
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jupyterlab_unianalytics_dashboard
|
|
3
|
-
Version: 4.0.
|
|
4
|
-
Summary: A JupyterLab dashboard extension to
|
|
3
|
+
Version: 4.0.4
|
|
4
|
+
Summary: A JupyterLab dashboard extension to visualize data from students.
|
|
5
5
|
Project-URL: Homepage, https://github.com/chili-epfl/jupyter-dashboard-visu-extension
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/chili-epfl/jupyter-dashboard-visu-extension/issues
|
|
7
7
|
Project-URL: Repository, https://github.com/chili-epfl/jupyter-dashboard-visu-extension.git
|
|
@@ -51,24 +51,24 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
51
51
|
Requires-Python: >=3.8
|
|
52
52
|
Description-Content-Type: text/markdown
|
|
53
53
|
|
|
54
|
-
#
|
|
54
|
+
# Unianalytics Dashboard JupyterLab Extension
|
|
55
55
|
|
|
56
56
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/binder-on-pr.yml)
|
|
57
57
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/build.yml)
|
|
58
58
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/check-release.yml)
|
|
59
59
|
|
|
60
|
-
A frontend JupyterLab extension displaying visualizations about notebook completion.
|
|
60
|
+
A frontend JupyterLab extension displaying visualizations about user notebook completion and interactions.
|
|
61
61
|
|
|
62
62
|
## Requirements
|
|
63
63
|
|
|
64
|
-
- JupyterLab >=
|
|
64
|
+
- JupyterLab >= 3.1.0
|
|
65
65
|
|
|
66
66
|
## Install
|
|
67
67
|
|
|
68
68
|
To install the extension, execute:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
pip install
|
|
71
|
+
pip install jupyterlab-unianalytics-dashboard
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
## Uninstall
|
|
@@ -76,7 +76,7 @@ pip install jupyterlab_unianalytics_dashboard
|
|
|
76
76
|
To remove the extension, execute:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
pip uninstall
|
|
79
|
+
pip uninstall jupyterlab-unianalytics_dashboard
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
## Contributing
|
|
@@ -91,7 +91,7 @@ The `jlpm` command is JupyterLab's pinned version of
|
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
93
|
# Clone the repo to your local environment
|
|
94
|
-
# Change directory to the
|
|
94
|
+
# Change directory to the extension directory
|
|
95
95
|
# Install package in development mode
|
|
96
96
|
pip install -e "."
|
|
97
97
|
# Link your development version of the extension with JupyterLab
|
{jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/README.md
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Unianalytics Dashboard JupyterLab Extension
|
|
2
2
|
|
|
3
3
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/binder-on-pr.yml)
|
|
4
4
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/build.yml)
|
|
5
5
|
[](https://github.com/chili-epfl/jupyter-dashboard-visu-extension/actions/workflows/check-release.yml)
|
|
6
6
|
|
|
7
|
-
A frontend JupyterLab extension displaying visualizations about notebook completion.
|
|
7
|
+
A frontend JupyterLab extension displaying visualizations about user notebook completion and interactions.
|
|
8
8
|
|
|
9
9
|
## Requirements
|
|
10
10
|
|
|
11
|
-
- JupyterLab >=
|
|
11
|
+
- JupyterLab >= 3.1.0
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
To install the extension, execute:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
pip install
|
|
18
|
+
pip install jupyterlab-unianalytics-dashboard
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Uninstall
|
|
@@ -23,7 +23,7 @@ pip install jupyterlab_unianalytics_dashboard
|
|
|
23
23
|
To remove the extension, execute:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
pip uninstall
|
|
26
|
+
pip uninstall jupyterlab-unianalytics_dashboard
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Contributing
|
|
@@ -38,7 +38,7 @@ The `jlpm` command is JupyterLab's pinned version of
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
# Clone the repo to your local environment
|
|
41
|
-
# Change directory to the
|
|
41
|
+
# Change directory to the extension directory
|
|
42
42
|
# Install package in development mode
|
|
43
43
|
pip install -e "."
|
|
44
44
|
# Link your development version of the extension with JupyterLab
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_unianalytics_dashboard",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "A JupyterLab dashboard extension to
|
|
3
|
+
"version": "4.0.4",
|
|
4
|
+
"description": "A JupyterLab dashboard extension to visualize data from students.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
7
7
|
"jupyterlab",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"outputDir": "jupyterlab_unianalytics_dashboard/labextension",
|
|
115
115
|
"schemaDir": "schema",
|
|
116
116
|
"_build": {
|
|
117
|
-
"load": "static/remoteEntry.
|
|
117
|
+
"load": "static/remoteEntry.e227bf2b054170abf984.js",
|
|
118
118
|
"extension": "./extension",
|
|
119
119
|
"style": "./style"
|
|
120
120
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_unianalytics_dashboard",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "A JupyterLab dashboard extension to
|
|
3
|
+
"version": "4.0.4",
|
|
4
|
+
"description": "A JupyterLab dashboard extension to visualize data from students.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
7
7
|
"jupyterlab",
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
"description": "Whether to only display currently connected users data (true), or consider historical data according to the selected time limit filter value (false)",
|
|
27
27
|
"type": "boolean",
|
|
28
28
|
"default": true
|
|
29
|
+
},
|
|
30
|
+
"dashboardCollection": {
|
|
31
|
+
"title": "Collect clicks relative to dashboard usage",
|
|
32
|
+
"description": "Whether to enable the collection of interaction clicks with the dashboard extension to better understand what features are more or less used.",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": true
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
},
|
|
@@ -35,22 +41,17 @@
|
|
|
35
41
|
"properties": {
|
|
36
42
|
"numberingH1": {
|
|
37
43
|
"title": "Enable h1 numbering",
|
|
38
|
-
"description": "Whether to number first level headings",
|
|
44
|
+
"description": "Whether to number first level headings.",
|
|
39
45
|
"type": "boolean",
|
|
40
46
|
"default": true
|
|
41
47
|
},
|
|
42
48
|
"syncCollapseState": {
|
|
43
49
|
"type": "boolean",
|
|
44
|
-
"title": "
|
|
50
|
+
"title": "Synchronize the collapse state of the headings",
|
|
45
51
|
"description": "If set to true, when a header is collapsed in the ToC the corresponding section in the notebook is collapsed as well and vice versa.",
|
|
46
52
|
"default": false
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
|
-
},
|
|
50
|
-
"notebookDashboardSettings": {
|
|
51
|
-
"title": "Notebook Dashboard",
|
|
52
|
-
"type": "object",
|
|
53
|
-
"properties": {}
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
57
|
"additionalProperties": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkjupyterlab_unianalytics_dashboard=self.webpackChunkjupyterlab_unianalytics_dashboard||[]).push([[249],{5326:(e,t,o)=>{o.r(t),o.d(t,{DASHBOARD_USER_ID:()=>mt,default:()=>pt});var n=o(3205),a=o(2419),s=o(9499),l=o(8190);let i,r;o(4039),i="https://api.unianalytics.ch",r="wss://ax5pzl8bwk.execute-api.eu-north-1.amazonaws.com/production/";const c="jupyterlab_unianalytics_dashboard",d=`${c}:plugin`,h=`@jupyterlab/${c}:sidedashboard`;var m;!function(e){e.dashboardOpenVisu=`${c}:dashboard-open-visu`,e.uploadNotebook=`${c}:dashboard-upload-notebook`,e.copyDownloadLink=`${c}:dashboard-copy-download-link`}(m||(m={}));const u='.jp-DirListing-item[data-file-type="notebook"]',p="unianalytics";var g;!function(e){e.notebookId=`${p}_notebook_id`,e.instanceId=`${p}_instance_id`,e.cellMapping=`${p}_cell_mapping`}(g||(g={}));var b,_=o(6336);class w{static async setJupyterVersion(e){w._jupyterVersion=e,await w._setEditorLanguageRegistry(),await w._asyncImports()}static async _setEditorLanguageRegistry(){if(4===w._jupyterVersion){const{StreamLanguage:e}=await o.e(373).then(o.t.bind(o,1373,23)),{EditorLanguageRegistry:t,parseMathIPython:n}=await Promise.resolve().then(o.t.bind(o,7454,23)),a=new t;t.getDefaultLanguages().forEach((e=>{a.addLanguage(e)})),a.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>{const[t,s]=await Promise.all([Promise.all([o.e(638),o.e(211),o.e(373),o.e(376)]).then(o.bind(o,8638)),o.e(10).then(o.bind(o,8010))]);return t.markdown({base:t.markdownLanguage,codeLanguages:e=>a.findBest(e),extensions:[n(e.define(s.stexMath).parser)]})}}),w._editorDefaultLanguages=a}}static async _asyncImports(){if(4===w._jupyterVersion){const{EditorView:e}=await o.e(211).then(o.t.bind(o,6211,23));this._EditorView=e;const{jupyterTheme:t}=await Promise.resolve().then(o.t.bind(o,7454,23));this._jupyterTheme=t}}static checkJupyterVersionSet(){if(null===w._jupyterVersion)throw new Error("JupyterLab version is not set in CompatibilityManager before trying to access it.")}static observeEditorVisibility(e){return 3===w._jupyterVersion?new IntersectionObserver((t=>{t[0].isIntersecting&&e.refresh()}),{root:null,threshold:.5}):null}}b=w,w._jupyterVersion=null,w._editorDefaultLanguages=void 0,w._EditorView=void 0,w._jupyterTheme=void 0,w.getMetadataComp=(e,t)=>{var o;return w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e?void 0:e.getMetadata(t):null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.get(t)},w.setMetadataComp=(e,t,o)=>{var n;w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e||e.setMetadata(t,o):null===(n=null==e?void 0:e.metadata)||void 0===n||n.set(t,o)},w.deleteMetadataComp=(e,t)=>{var o;return w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e?void 0:e.deleteMetadata(t):null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.delete(t)},w.getFileComp=e=>{var t;w.checkJupyterVersionSet();const o=null===(t=e.tracker.currentWidget)||void 0===t?void 0:t.selectedItems().next();return 4===w._jupyterVersion?null==o?void 0:o.value:o},w.getCellsArrComp=e=>(w.checkJupyterVersionSet(),e?Array.from({length:e.length},((t,o)=>e.get(o))):null),w.getCodeMirrorOptionsComp=()=>(w.checkJupyterVersionSet(),4===w._jupyterVersion?{extensions:[b._jupyterTheme,b._EditorView.lineWrapping,b._EditorView.editable.of(!1)],languages:w._editorDefaultLanguages}:{config:{readOnly:!0}});const C=e=>!!(e&&!e.isDisposed&&e.context.isReady&&w.getMetadataComp(e.context.model,g.notebookId)&&w.getMetadataComp(e.context.model,g.cellMapping));var v=o(6029),k=o.n(v),f=o(4085),E=o(7308);const y=e=>{const[t,o]=(0,v.useState)(!1);return k().createElement("div",null,k().createElement("p",null,"Successfully uploaded, can be downloaded accessing:"),k().createElement("div",{className:"unianalytics-link-container"},k().createElement("div",{className:"unianalytics-link"},e.url),k().createElement("div",{className:"unianalytics-link-button-container"},k().createElement("button",{className:"unianalytics-link-button",onClick:()=>{navigator.clipboard.writeText(e.url).then((()=>{o(!0)})).catch((e=>{console.error("Error copying to clipboard: ",e)}))}},t?k().createElement(f.checkIcon.react,null):k().createElement(f.copyIcon.react,null)))))};const S=new f.LabIcon({name:`${c}:visu-icon`,svgstr:'<svg height="200px" width="200px" viewBox="0 0 512 512.001"\nxmlns="http://www.w3.org/2000/svg">\n <g id="SVGRepo_bgCarrier" stroke-width="0"></g>\n <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>\n <g id="SVGRepo_iconCarrier"> \n <g> <g> \n <g> <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,307.2h129.347c16.345,0,29.642-13.298,29.642-29.642v-43.116c0-16.344-13.297-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,293.902,88.75,307.2,105.094,307.2z M91.621,234.442 c0-7.43,6.044-13.474,13.474-13.474h129.347c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474 H105.094c-7.43,0-13.474-6.044-13.474-13.474V234.442z"></path> \n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M509.633,476.642l-21.558-21.558c-3.157-3.156-8.275-3.156-11.433,0c-3.157,3.157-3.157,8.275,0,11.433l7.758,7.757H51.2 c-7.43,0-13.474-6.044-13.474-13.474V27.601l7.758,7.758c3.156,3.156,8.275,3.156,11.432,0c3.157-3.157,3.157-8.275,0-11.433 L35.358,2.367c-3.156-3.156-8.275-3.156-11.432,0L2.368,23.925c-3.157,3.157-3.157,8.275,0,11.433 c3.156,3.156,8.275,3.156,11.432,0l7.758-7.758V460.8c0,16.344,13.298,29.642,29.642,29.643h433.198l-7.758,7.757 c-3.157,3.157-3.157,8.275,0,11.433c1.579,1.578,3.649,2.367,5.717,2.367c2.068,0,4.138-0.789,5.717-2.367l21.558-21.558 C512.79,484.917,512.79,479.799,509.633,476.642z"></path>\n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,177.853h377.263c16.344,0,29.642-13.298,29.642-29.642v-43.116c0-16.344-13.298-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,164.555,88.75,177.853,105.094,177.853z M91.621,105.095 c0-7.43,6.045-13.474,13.474-13.474h377.263c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474 H105.094c-7.43,0-13.474-6.044-13.474-13.474V105.095z"></path> \n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,436.548H353.01c16.344,0,29.642-13.298,29.642-29.642V363.79c0-16.344-13.298-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,423.25,88.75,436.548,105.094,436.548z M91.621,363.79 c0-7.43,6.044-13.474,13.474-13.474H353.01c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474H105.094 c-7.43,0-13.474-6.044-13.474-13.474V363.79z"></path> </g>\n </g> </g> </g>\n </svg>'}),O=new f.LabIcon({name:`${c}:hide-icon`,svgstr:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash-fill" viewBox="0 0 16 16">\n <path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/>\n <path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/>\n</svg>'}),x=new f.LabIcon({name:`${c}:show-icon`,svgstr:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">\n <path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>\n <path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>\n</svg>'});var T=o(4901),N=o(8778);const D="cell-dashboard-button-container";class R extends N.Widget{constructor(e,t){super(),this.addClass(D);const o=document.createElement("button");o.className="cell-dashboard-button",o.innerHTML=S.svgstr,o.title=o.disabled?"No notebook identifier":"Open Cell Dashboard",o.onclick=()=>{e.execute(m.dashboardOpenVisu,{from:"Cell",cell_id:t})},this.node.appendChild(o)}dispose(){super.dispose()}}class I{constructor(e){this._commands=e}createNew(e){return new M(e,this._commands)}}class M{constructor(e,t){this._isDisposed=!1,this._panel=e,this._commands=t,this._previousActiveCell=this._panel.content.activeCell,e.context.ready.then((()=>{C(e)?(e.revealed.then((()=>{e&&!e.isDisposed&&setTimeout((()=>{this._onActiveCellChanged(e.content)}),1e3/60)})),e.content.renderingLayoutChanged.connect(this._onActiveCellChanged,this),e.content.activeCellChanged.connect(this._onActiveCellChanged,this),e.disposed.connect((()=>{e.content.activeCellChanged.disconnect(this._onActiveCellChanged)}))):this.dispose()}))}_addCellButton(e){const t=this._getCell(e);if(t){const e=new R(this._commands,t.model.id);t.layout.insertWidget(0,e)}}_onActiveCellChanged(e){this._previousActiveCell&&!this._previousActiveCell.isDisposed&&this._removeCellButton(this._previousActiveCell.model);const t=e.activeCell;null!==t&&(this._addCellButton(t.model),this._previousActiveCell=t)}_getCell(e){var t;return null===(t=this._panel)||void 0===t?void 0:t.content.widgets.find((t=>t.model===e))}_removeCellButton(e){const t=this._getCell(e);t&&this._findCellButtonWidgets(t).forEach((e=>{e.dispose()}))}_findCellButtonWidgets(e){return e.layout.widgets.filter((e=>e.hasClass(D)))||[]}get isDisposed(){return this._isDisposed}dispose(){var e;if(this.isDisposed)return;this._isDisposed=!0;const t=w.getCellsArrComp(null===(e=this._panel)||void 0===e?void 0:e.context.model.cells);if(t)for(const e of t)this._removeCellButton(e);this._panel=null,T.Signal.clearData(this)}}var L=o(7717);class A{constructor(e){this._commands=e}createNew(e,t){const o=new E.ToolbarButton({className:"open-visu-button",icon:S,onClick:()=>{this._commands.execute(m.dashboardOpenVisu,{from:"Notebook"})},tooltip:"Open Notebook Visualization"});return e.context.ready.then((()=>{C(e)&&e.toolbar.insertItem(10,"openVisu",o)})),new L.DisposableDelegate((()=>{o.dispose()}))}}var B=o(3748);const H={displayDashboard:!0,hasNotebookId:!1},U=(0,B.createSlice)({name:"tocdashboard",initialState:H,reducers:{setDisplayHideDashboard:(e,t)=>{e.displayDashboard=t.payload},setHasNotebookId:(e,t)=>{e.hasNotebookId=t.payload}}}),{setDisplayHideDashboard:$,setHasNotebookId:V}=U.actions,z=U.reducer,j={navigationState:[{pageName:"Notebook"}]},P=(0,B.createSlice)({name:"sidedashboard",initialState:j,reducers:{navigateToNotebook:(e,t)=>{e.navigationState=[{pageName:"Notebook"}]},navigateToCell:(e,t)=>{e.navigationState=[{pageName:"Notebook"},{pageName:"Cell",content:{cellId:t.payload.cellId}}]},navigateToHistory:(e,t)=>{e.navigationState=e.navigationState.slice(0,t.payload+1)}}}),{navigateToNotebook:F,navigateToCell:W,navigateToHistory:K}=P.actions,J=P.reducer,G=(0,B.createSlice)({name:"commondashboard",initialState:{notebookCells:null,timeWindow:"null",refreshBoolean:!1,displayRealTime:!0},reducers:{setTimeWindow:(e,t)=>{e.timeWindow=t.payload},setNotebookCells:(e,t)=>{e.notebookCells=t.payload},refreshDashboards:e=>{e.refreshBoolean=!e.refreshBoolean},displayRealTime:(e,t)=>{e.displayRealTime=t.payload}}}),{setTimeWindow:q,setNotebookCells:Z,refreshDashboards:X,displayRealTime:Y}=G.actions,Q=G.reducer,ee=e=>t=>o=>{const n=t(o);if(/^sidedashboard\//.test(o.type)){const t=e.getState();localStorage.setItem(h,JSON.stringify(t.sidedashboard))}return n},te={sidedashboard:localStorage.getItem(h)?JSON.parse(localStorage.getItem(h)):j},oe=(0,B.configureStore)({reducer:{tocdashboard:z,sidedashboard:J,commondashboard:Q},middleware:e=>e().concat(ee),preloadedState:te});var ne,ae,se=o(9122),le=o(7749);class ie{}!function(e){e.LOADING="Loading",e.MISMATCH="Mismatch with the Registered Notebook",e.NOTFOUND="Notebook not Registered",e.USERNOTAUTHORIZED="No User Permission for this Notebook",e.ERROR="Fetching Error",e.SUCCESS="Success"}(ne||(ne={})),function(e){e.DASHBOARD_ICON_LEFT="DASHBOARD_ICON_LEFT",e.DASHBOARD_ICON_RIGHT="DASHBOARD_ICON_RIGHT",e.NOTEBOOK_CELL_BUTTON="NOTEBOOK_CELL_BUTTON",e.NOTEBOOK_TOOLBAR_BUTTON="NOTEBOOK_TOOLBAR_BUTTON",e.TOC_OPEN_CELL_DASHBOARD="TOC_OPEN_CELL_DASHBOARD",e.TOC_HEADING_CLICKED="TOC_HEADING_CLICKED",e.TOC_COLLAPSE_HEADERS="TOC_COLLAPSE_HEADERS",e.BREADCRUMB_TO_NOTEBOOK="BREADCRUMB_TO_NOTEBOOK",e.BREADCRUMB_TO_CELL="BREADCRUMB_TO_CELL",e.DASHBOARD_REFRESH_BUTTON="DASHBOARD_REFRESH_BUTTON",e.DASHBOARD_FILTER_TIME="DASHBOARD_FILTER_TIME",e.CELL_DASHBOARD_FILTER_SORT="CELL_DASHBOARD_FILTER_SORT",e.CELL_DASHBOARD_FILTER_CODE_OUTPUT="CELL_DASHBOARD_FILTER_CODE_OUTPUT",e.CELL_DASHBOARD_FILTER_EXECUTION="CELL_DASHBOARD_FILTER_EXECUTION",e.TOC_TOOLBAR_CODE="TOC_TOOLBAR_CODE",e.TOC_TOOLBAR_MARKDOWN="TOC_TOOLBAR_MARKDOWN",e.TOC_TOOLBAR_NUMBERED="TOC_TOOLBAR_NUMBERED",e.TOC_TOOLBAR_SHOW_HIDE="TOC_TOOLBAR_SHOW_HIDE",e.TOC_TOOLBAR_REFRESH="TOC_TOOLBAR_REFRESH"}(ae||(ae={}));const re=oe.dispatch;class ce{constructor(){this._socket=null,this._ongoingConnectionInfo=null,this._pingInterval=54e4,this._pingTimer=null}_createSocket(e){this._socket=new WebSocket(`wss://ax5pzl8bwk.execute-api.eu-north-1.amazonaws.com/production/?nbId=${e.notebookId}&conType=TEACHER`),this._socket.addEventListener("open",(()=>{console.log("WebSocket connection opened for",e),this._startPingTimer()})),this._socket.addEventListener("message",(e=>{const t=JSON.parse(e.data);"refreshDashboard"===t.action&&re(X()),console.log("Received message from server:",t)})),this._socket.addEventListener("close",(t=>{console.log("WebSocket connection closed for ",e,t),this._stopPingTimer()})),this._socket.addEventListener("error",(e=>{console.error("WebSocket error",e)}))}establishSocketConnection(e){this._closeSocketConnection(),this._ongoingConnectionInfo=e,e&&this._createSocket(e)}_closeSocketConnection(){this._socket&&this._socket.close(),this._socket=null}terminateSocketConnection(){this._closeSocketConnection(),this._ongoingConnectionInfo=null}_startPingTimer(){this._pingTimer=window.setInterval((()=>{this._socket&&this._socket.readyState===WebSocket.OPEN&&this._socket.send('{ "action":"ping" }')}),this._pingInterval)}_stopPingTimer(){this._pingTimer&&(clearInterval(this._pingTimer),this._pingTimer=null)}}const de=oe.dispatch;class he{constructor(){this._panelUpdatedSignal=new T.Signal(this),this._panelSwitchedSignal=new T.Signal(this),this._ongoingContextId="",this._ongoingCheckId="",this._panel=null,this._monitor=null,this._validityChecks={tag:null,registered:ne.LOADING},this._websocketManager=new ce}get validityChecks(){return this._validityChecks}get notebookCells(){return this._notebookCells}get panel(){return this._panel}set panel(e){if(e&&this._panel&&this._panel===e)return;if(this._panel&&this._panel.disposed.disconnect(this._onPanelDisposed,this),this._validityChecks={tag:null,registered:ne.LOADING},this._websocketManager.terminateSocketConnection(),this._panel=e,this._onPanelSwitched(),this._panel&&this._panel.disposed.connect(this._onPanelDisposed,this),this._monitor&&(this._monitor.dispose(),this._monitor=null),!this._panel)return void this._onPanelUpdated();const t=crypto.randomUUID();this._ongoingContextId=t,this._panel.sessionContext.ready.then((()=>{if(this._ongoingContextId===t&&this._panel&&!this._panel.isDisposed){if(this._monitor=new le.ActivityMonitor({signal:this._panel.context.model.contentChanged,timeout:1e3}),this._monitor.activityStopped.connect(this._onPanelUpdated,this),C(this._panel)){const e=w.getMetadataComp(this._panel.model,g.notebookId);this._validityChecks.tag=e}this._onPanelUpdated()}}))}_onPanelDisposed(e){this.panel=null}get panelSwitched(){return this._panelSwitchedSignal}_onPanelSwitched(){this._panelSwitchedSignal.emit(void 0)}get panelUpdated(){return this._panelUpdatedSignal}_onPanelUpdated(){const e=this._updateCellList();if(this._validityChecks.tag&&e){this._websocketManager.terminateSocketConnection(),this._validityChecks.registered=ne.LOADING;const e=crypto.randomUUID();this._ongoingCheckId=e;let t=ne.ERROR;fetch(`${i}/dashboard/${this._validityChecks.tag}/check?hashedList=${(e=>{if(e&&e.length>0){const t=e.join("");return(0,_.SHA256)(t).toString()}return""})(this._notebookCells)}`,{credentials:"include"}).then((e=>{if(e.ok)return e.json();throw new Error("Fetching response not OK")})).then((e=>{"not_found"===e.status?t=ne.NOTFOUND:"hash_mismatch"===e.status?t=ne.MISMATCH:"no_user_permission"===e.status?t=ne.USERNOTAUTHORIZED:"success"===e.status&&(t=ne.SUCCESS)})).catch((e=>{console.log("Notebook check fetching error (check your connection) : "+e)})).finally((()=>{this._ongoingCheckId===e&&this._panel&&!this._panel.isDisposed&&(this._validityChecks.registered=t,this._validityChecks.registered===ne.SUCCESS&&this._websocketManager.establishSocketConnection({notebookId:this._validityChecks.tag}),this._panelUpdatedSignal.emit(void 0))}))}this._panelUpdatedSignal.emit(void 0)}_updateCellList(){var e,t;const o=w.getCellsArrComp(null===(t=null===(e=this.panel)||void 0===e?void 0:e.model)||void 0===t?void 0:t.cells);if(o){const e=o.map((e=>e.id));if(n=e,a=this._notebookCells,!(n&&a&&n.length===a.length&&n.every(((e,t)=>e===a[t])))){this._notebookCells=e;const t=o.map((e=>({id:e.id,cellType:e.type})));return de(Z(t)),!0}}else this._notebookCells=null;var n,a;return!1}}var me=o(7760),ue=o(4614);const pe=()=>k().createElement("div",{style:{width:"100%",textAlign:"center",margin:"50px 0"}},k().createElement(ue.Spinner,{style:{width:"50px",height:"50px",fontSize:"x-large"},animation:"border",role:"status",variant:"primary"})),ge=({title:e,placeholderText:t="No data for the opened notebook"})=>k().createElement("div",{className:"dashboard-TableOfContents"},k().createElement("div",{className:"dashboard-stack-panel-header"},"Side Panel Dashboard"),k().createElement("div",{className:"dashboard-TableOfContents-placeholder"},k().createElement("div",{className:"dashboard-TableOfContents-placeholderContent"},k().createElement("h3",null,e),k().createElement("p",null,t))));class be extends E.ReactWidget{constructor(e){super(),this.addClass("dashboard-panel"),this._panelManager=e,e.panelUpdated.connect((()=>this.update()),this)}onAfterShow(e){this.update()}onUpdateRequest(e){super.onUpdateRequest(e)}render(){if(!this._panelManager.panel)return v.createElement(ge,{title:"No Notebook",placeholderText:"Open a notebook to start viewing its content."});if(!this._panelManager.panel.context.isReady)return v.createElement(pe,null);if(!this._panelManager.validityChecks.tag)return v.createElement(ge,{title:"Notebook not Tagged for Tracking"});switch(this._panelManager.validityChecks.registered){case ne.LOADING:return v.createElement(pe,null);case ne.SUCCESS:return v.createElement(me.Provider,{store:oe},this.computeComponentToRender());default:return v.createElement(ge,{title:this._panelManager.validityChecks.registered})}}}const _e=be;class we{static setPermission(e){we._isInteractionRecordingEnabled=e}}we._isInteractionRecordingEnabled=!1,we.sendInteraction=e=>{we._isInteractionRecordingEnabled&&fetch(`${i}/dashboard_interaction/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,dashboard_user_id:mt,time:(new Date).toISOString()})}).then((e=>{}))};const Ce=oe.dispatch,ve=()=>{const e=(0,me.useSelector)((e=>e.sidedashboard.navigationState));return k().createElement(ue.Stack,{className:"breadcrumb-container",direction:"horizontal",gap:2},e.map(((t,o)=>k().createElement("div",{className:o===e.length-1?"breadcrumb-tile-active breadcrumb-tile":"breadcrumb-tile",onClick:()=>{"Notebook"===t.pageName?we.sendInteraction({click_type:"ON",signal_origin:ae.BREADCRUMB_TO_NOTEBOOK}):"Cell"===t.pageName&&we.sendInteraction({click_type:"ON",signal_origin:ae.BREADCRUMB_TO_CELL}),o!==e.length-1&&Ce(K(o))}},t.pageName))),k().createElement("div",{className:"breadcrumb-buttons-container"},k().createElement(ue.Button,{className:"breadcrumb-button",onClick:()=>{we.sendInteraction({click_type:"ON",signal_origin:ae.DASHBOARD_REFRESH_BUTTON}),Ce(X())}},k().createElement(f.refreshIcon.react,{elementSize:"large",className:"labicon-logo"}))))};var ke=o(2535);const fe=oe.dispatch,Ee=()=>k().createElement(ue.DropdownButton,{id:"time-window-dropdown",title:k().createElement(ke.CalendarWeek,{className:"logo"}),variant:"outline-secondary",onSelect:e=>{e&&fe(q(e))},onClick:()=>{we.sendInteraction({click_type:"ON",signal_origin:ae.DASHBOARD_FILTER_TIME})},className:"custom-dropdown"},k().createElement(ue.Dropdown.Header,null,"Data to keep"),k().createElement(ue.Dropdown.Divider,null),k().createElement(ue.Dropdown.Item,{eventKey:"60"},"Last minute"),k().createElement(ue.Dropdown.Item,{eventKey:"600"},"Last 10 minutes"),k().createElement(ue.Dropdown.Item,{eventKey:"3600"},"Last hour"),k().createElement(ue.Dropdown.Item,{eventKey:"86400"},"Last day"),k().createElement(ue.Dropdown.Item,{eventKey:"604800"},"Last week"),k().createElement(ue.Dropdown.Item,{eventKey:"2592000"},"Last month"),k().createElement(ue.Dropdown.Item,{eventKey:"15768000"},"Last 6 months"),k().createElement(ue.Dropdown.Item,{eventKey:"null"},"All")),ye=({PassedComponent:e,title:t})=>k().createElement(ue.Row,{className:"mb-4"},k().createElement(ue.Card,{className:"chart-card"},k().createElement(ue.Card.Title,{className:"chart-card-title"},t),k().createElement(ue.Card.Body,{className:"chart-card-body"},e)));var Se=o(7885);const Oe={maintainAspectRatio:!1,plugins:{legend:{labels:{color:"#969696"}}},scales:{x:{title:{display:!0,text:"Code cell",color:"#969696"},ticks:{color:"#969696"}},y:{ticks:{beginAtZero:!0,precision:0,color:"#969696"},title:{display:!0,text:"Cumulated total across all users",color:"#969696"}}}},xe={maintainAspectRatio:!1,plugins:{legend:{display:!0,labels:{usePointStyle:!0,color:"#969696"}},tooltip:{callbacks:{title:function(e){return`Cell ${e[0].raw.x}`},label:function(e){return`t: ${e.raw.y}`}}}},scales:{x:{type:"category",ticks:{color:"#969696"},title:{display:!0,text:"Cell (markdown & code)",color:"#969696"}},y:{ticks:{beginAtZero:!0,precision:0,color:"#969696"},title:{display:!0,text:"Time spent on a cell [s]",color:"#969696"}}}},Te=e=>{const[t,o]=(0,v.useState)({labels:[],datasets:[]}),n=(0,me.useSelector)((e=>e.commondashboard.displayRealTime));return(0,v.useEffect)((()=>{fetch(`${i}/dashboard/${e.notebookId}/user_code_execution?timeWindow=${e.timeWindow}&displayRealTime=${n}`,{credentials:"include"}).then((e=>e.json())).then((t=>{var n;const a=(null===(n=e.notebookCells)||void 0===n?void 0:n.filter((e=>"code"===e.cellType)))||[],s={labels:Array.from({length:a.length},((e,t)=>t+1)),datasets:[{label:"clicks",data:Array(a.length).fill(null),backgroundColor:"rgba(51, 187, 238, 0.3)",borderColor:"rgba(51, 187, 238, 0.3)",borderWidth:1},{label:"executions",data:Array(a.length).fill(null),backgroundColor:"rgba(0, 119, 187, 0.6)",borderColor:"rgba(0, 119, 187, 0.6)",borderWidth:1},{label:"executions without errors",data:Array(a.length).fill(null),backgroundColor:"rgba(0, 153, 136, 0.9)",borderColor:"rgba(0, 153, 136, 0.9)",borderWidth:1}]};a.forEach(((e,o)=>{const n=t.find((t=>t.cell===e.id));n&&(s.datasets[0].data[o]=parseFloat(n.cell_click_pct),s.datasets[1].data[o]=parseFloat(n.code_exec_pct),s.datasets[2].data[o]=parseFloat(n.code_exec_ok_pct))})),o(s)}))}),[e.timeWindow,e.refreshRequired]),k().createElement(ye,{PassedComponent:k().createElement(Se.Bar,{data:t,options:Oe}),title:"Code cell execution across users"})},Ne=e=>{const[t,o]=(0,v.useState)({labels:[],datasets:[]}),n=(0,me.useSelector)((e=>e.commondashboard.displayRealTime));return(0,v.useEffect)((()=>{fetch(`${i}/dashboard/${e.notebookId}/user_cell_time?timeWindow=${e.timeWindow}&displayRealTime=${n}`,{credentials:"include"}).then((e=>e.json())).then((t=>{var n;const a={labels:e.notebookCells?Array.from({length:e.notebookCells.length},((e,t)=>t+1)):[],datasets:[{label:"time spent on a cell by a user",data:(null===(n=e.notebookCells)||void 0===n?void 0:n.flatMap(((e,o)=>{const n=t.find((t=>t.cell===e.id));return n?n.durations.map((e=>({x:o+1,y:e}))):[]})))||[],backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,pointRadius:1}]};o(a)}))}),[e.timeWindow,e.refreshRequired]),k().createElement(ye,{PassedComponent:k().createElement(Se.Scatter,{data:t,options:xe}),title:"Amount of time spent on each cell"})},De=e=>{const t=(0,me.useSelector)((e=>e.commondashboard.timeWindow)),o=(0,me.useSelector)((e=>e.commondashboard.refreshBoolean)),n=(0,me.useSelector)((e=>e.commondashboard.notebookCells));return k().createElement(k().Fragment,null,k().createElement("div",{className:"dashboard-title-container"},k().createElement("div",{className:"dashboard-title-text"},e.notebookName),k().createElement("div",{className:"dashboard-dropdown-container"},k().createElement(Ee,null))),k().createElement(ue.Row,null,k().createElement(ue.Col,null,k().createElement(Te,{notebookId:e.notebookId,timeWindow:t,refreshRequired:o,notebookCells:n}),k().createElement(Ne,{notebookId:e.notebookId,timeWindow:t,refreshRequired:o,notebookCells:n}))))};var Re=o(5390);const Ie=new s.RenderMimeRegistry({initialFactories:s.standardRendererFactories}),Me=({cell_output_model:e})=>{const t=(0,v.useRef)(null),o=new Re.OutputAreaModel;return(0,v.useEffect)((()=>{o.clear(),o.fromJSON(e);const n=t.current;if(n){n.innerHTML="";for(let e=0;e<o.length;++e){const t=o.get(e),a=Ie.preferredMimeType(t.data);if(a){const e=Ie.createRenderer(a);e.renderModel(t),n.appendChild(e.node)}}}}),[e]),k().createElement("div",{ref:t,className:"cell-content-container"})};var Le=o(7454),Ae=o(7807);const Be=({cell_input:e,language_mimetype:t,className:o})=>{const n=(0,v.useRef)(null);return(0,v.useEffect)((()=>{const o=n.current;if(o){o.innerHTML="";const n=new Ae.CodeEditor.Model;n.mimeType=t,n.sharedModel.setSource(e);const a=new Le.CodeMirrorEditor({host:o,model:n,...w.getCodeMirrorOptionsComp()}),s=w.observeEditorVisibility(a);return s&&s.observe(o),()=>{s&&s.disconnect()}}}),[e,t]),k().createElement("div",{ref:n,className:o})},He=({setOrderBy:e})=>k().createElement(ue.DropdownButton,{id:"order-by-dropdown",title:k().createElement(ke.SortUp,{className:"logo"}),variant:"outline-secondary",onSelect:t=>{t&&e(t)},onClick:()=>{we.sendInteraction({click_type:"ON",signal_origin:ae.CELL_DASHBOARD_FILTER_SORT})},className:"custom-dropdown"},k().createElement(ue.Dropdown.Header,null,"Sort cells by"),k().createElement(ue.Dropdown.Divider,null),k().createElement(ue.Dropdown.Item,{eventKey:"timeDesc"},"Time (most recent 1st)"),k().createElement(ue.Dropdown.Item,{eventKey:"timeAsc"},"Time (oldest 1st)"),k().createElement(ue.Dropdown.Item,{eventKey:"inputAsc"},"Input (shortest 1st)"),k().createElement(ue.Dropdown.Item,{eventKey:"inputDesc"},"Input (longest 1st)"),k().createElement(ue.Dropdown.Item,{eventKey:"outputAsc"},"Output (shortest 1st)"),k().createElement(ue.Dropdown.Item,{eventKey:"outputDesc"},"Output (longest 1st)"));var Ue=o(5863);const $e=e=>{const[t,o]=(0,v.useState)(null);return(0,v.useEffect)((()=>{(()=>{const t=Ue.marked.parser(Ue.marked.lexer(e.markdownContent));o(e.sanitizer.sanitize(t))})()}),[e.markdownContent]),k().createElement("div",{className:"cell-content-container"},t&&k().createElement("div",{className:"jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput",dangerouslySetInnerHTML:{__html:t}}))},Ve=e=>{const[t,o]=(0,v.useState)([]);let n=!1;const a=(0,me.useSelector)((e=>e.sidedashboard.navigationState)),s=(0,me.useSelector)((e=>e.commondashboard.timeWindow)),l=(0,me.useSelector)((e=>e.commondashboard.refreshBoolean)),r=(0,me.useSelector)((e=>e.commondashboard.displayRealTime)),[c,d]=(0,v.useState)(!0),[h,m]=(0,v.useState)(!0),[u,p]=(0,v.useState)(1),g=[{name:"All",value:1,status:"all"},{name:"Successfully Executed",value:2,status:"ok"},{name:"Error",value:3,status:"error"}],b=g.map((e=>e.status)),[_,w]=(0,v.useState)("timeDesc"),C=e=>{e.sort(((e,t)=>{switch(_){case"timeDesc":return new Date(e.t_finish)<new Date(t.t_finish)?1:-1;case"timeAsc":return new Date(e.t_finish)>new Date(t.t_finish)?1:-1;case"inputAsc":return e.cell_input.length-t.cell_input.length;case"inputDesc":return t.cell_input.length-e.cell_input.length;case"outputAsc":return e.cell_output_length-t.cell_output_length;case"outputDesc":return t.cell_output_length-e.cell_output_length;default:return 0}})),o(e)},f=a[a.length-1].content;return(0,v.useEffect)((()=>{n=!0,fetch(`${i}/dashboard/${e.notebookId}/cell/${f.cellId}?timeWindow=${s}&displayRealTime=${r}`,{credentials:"include"}).then((e=>e.json())).then((e=>{C(e),n=!1}))}),[a,s,l]),(0,v.useEffect)((()=>{if(!n){const e=[...t];C(e)}}),[_]),k().createElement(k().Fragment,null,k().createElement("div",{className:"dashboard-title-container"},k().createElement("div",{className:"dashboard-title-text"},"Cell (",f.cellId,")"),k().createElement("div",{className:"dashboard-dropdown-container"},k().createElement(He,{setOrderBy:w}),k().createElement(Ee,null))),k().createElement(ue.Form,{className:"cell-filter-container"},k().createElement("div",{className:"cell-checkbox-container",onClick:()=>{we.sendInteraction({click_type:"ON",signal_origin:ae.CELL_DASHBOARD_FILTER_CODE_OUTPUT})}},k().createElement(ue.Form.Check,{type:"checkbox",label:"Code",id:"code-checkbox",checked:c,onChange:e=>{e.target.checked||h?d(e.target.checked):e.preventDefault()}}),k().createElement(ue.Form.Check,{type:"checkbox",label:"Output",id:"output-checkbox",checked:h,onChange:e=>{e.target.checked||c?m(e.target.checked):e.preventDefault()}})),k().createElement("div",{className:"cell-radio-container",onClick:()=>{we.sendInteraction({click_type:"ON",signal_origin:ae.CELL_DASHBOARD_FILTER_EXECUTION})}},k().createElement(ue.ButtonGroup,null,g.map(((e,t)=>k().createElement(ue.ToggleButton,{key:t,id:`filter-${t}`,type:"radio",variant:"outline-primary",name:"radio",value:e.value,checked:u===e.value,onChange:e=>p(Number(e.currentTarget.value))},e.name)))))),k().createElement(k().Fragment,null,t.map(((t,o)=>k().createElement(ue.Row,{key:o},"MarkdownExecution"===t.cell_type?k().createElement(ue.Col,{md:12},k().createElement(ue.Card,{className:"cell-card"},k().createElement(ue.Card.Body,{style:{gap:"10px"}},k().createElement(ue.Row,{className:"cell-card-wrapper"},k().createElement(ue.Col,{md:12,className:"cell-user-title"},k().createElement(ue.Card.Text,null,"User ",o)),k().createElement(ue.Col,{md:12},k().createElement($e,{markdownContent:t.cell_input,sanitizer:e.sanitizer})))))):k().createElement(k().Fragment,null,(1===u||b[u-1]===t.status)&&k().createElement(ue.Col,{md:12},k().createElement(ue.Card,{className:"cell-card"},k().createElement(ue.Card.Body,{style:{gap:"10px"}},k().createElement(ue.Row,{className:"cell-card-wrapper"},k().createElement(ue.Col,{md:12,className:"cell-user-title"},k().createElement(ue.Card.Text,null,"User ",o)),k().createElement(ue.Col,{md:12},c&&k().createElement(Be,{cell_input:t.cell_input,language_mimetype:t.language_mimetype,className:"cell-content-container"}),c&&h&&t.cell_output_model.length>0&&k().createElement("br",null),h&&t.cell_output_model.length>0&&k().createElement(Me,{cell_output_model:t.cell_output_model}))))))))))))};var ze=o(902);ze.Chart.register(...ze.registerables);const je=e=>{const t=(0,me.useSelector)((e=>e.sidedashboard.navigationState));return k().createElement("div",{className:"page-container"},k().createElement(ve,null),(()=>{switch(t[t.length-1].pageName){case"Notebook":return k().createElement(De,{notebookId:e.notebookId,notebookName:e.notebookName});case"Cell":return k().createElement(Ve,{notebookId:e.notebookId,sanitizer:e.sanitizer});default:return null}})())};class Pe extends _e{constructor(e,t){super(e),this.addClass("dashboard-react-widget"),this.title.caption="Side Dashboard",this.title.icon=S,this.id="side-dashboard",this.node.setAttribute("role","region"),this.node.setAttribute("aria-label","Side dashboard section"),this._sanitizer=t}computeComponentToRender(){const e=this._panelManager.panel,t=this._panelManager.validityChecks.tag;return e&&t?v.createElement(je,{notebookId:t,notebookName:e.sessionContext.name,sanitizer:this._sanitizer}):v.createElement(v.Fragment,null)}}const Fe=(e,t)=>{const o=3*e/t+.05;return Math.min(1,o)},We=({data:e,cellId:t,commands:o})=>k().createElement(k().Fragment,null,e&&e[0]&&e[1]?k().createElement("div",{onClick:e=>{e.preventDefault(),o.execute(m.dashboardOpenVisu,{from:"Toc",cell_id:t})},className:"dashboard-toc-react-component",style:{backgroundColor:`rgba(21, 92, 144, ${Fe(e[0],e[1])})`}},k().createElement("span",{className:"dashboard-toc-react-text"},e[0]+"/"+e[1])):k().createElement("div",{className:"dashboard-toc-react-component"}));class Ke extends k().Component{render(){const{panel:e,heading:t,headings:o,addReactComponent:n,isFirstCellOccurrence:a,tocDashboardData:s,commands:l}=this.props,i=this.props.itemRenderer(e,t,o);return i?k().createElement("li",{className:"dashboard-tocItem",onClick:e=>{we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_HEADING_CLICKED}),e.preventDefault(),e.stopPropagation(),t.onClick()}},i,n&&k().createElement(We,{cellId:t.cellRef.model.id,data:a?s:null,commands:l})):null}}const Je=e=>{const[t,o]=(0,v.useState)(null),n=(0,me.useSelector)((e=>e.tocdashboard.displayDashboard)),a=(0,me.useSelector)((e=>e.commondashboard.refreshBoolean)),s=(0,me.useSelector)((e=>e.commondashboard.timeWindow)),l=(0,me.useSelector)((e=>e.commondashboard.displayRealTime));(0,v.useEffect)((()=>(c(),()=>{o(null)})),[e.notebookCells,e.notebookPanel]),(0,v.useEffect)((()=>{c()}),[a,s]);const r=(0,v.useRef)("12345678"),c=async()=>{const t=w.getMetadataComp(e.notebookPanel.model,g.notebookId);if(t&&e.notebookCells){try{const e=crypto.randomUUID();r.current=e;const n=await fetch(`${i}/dashboard/${t}/toc?timeWindow=${s}&displayRealTime=${l}`,{credentials:"include"});if(e===r.current){if(n.ok){const e=await n.json();return void o(e.data)}console.log("Error:",n.status)}}catch(e){console.log("Toc Fetch Error:",e)}o(null)}},d=(t=>{const o=e.headings.map((e=>e.cellRef.model.id)),n=[...new Set(o)],a={},s=e.notebookCells;if(s&&t){const e=n.map((e=>s.indexOf(e)));e[0]=0,e.push(s.length);let o=0;for(let l=0;l<n.length;l++){const i=e[l],r=e[l+1];let c=0;if(-1===i)c=0;else for(let e=i;e<r;e++)c+=t.location_count[s[e]]||0;a[n[l]]=c,o+=c}a.total_count=o}return a})(t),h=new Set;return k().createElement("ul",{className:"dashboard-TableOfContents-content"},e.headings.map(((t,o)=>{const a=t.cellRef.model.id,s=!h.has(a);return s&&h.add(a),k().createElement(Ke,{panel:e.notebookPanel,heading:t,headings:e.headings,itemRenderer:e.itemRenderer,addReactComponent:n,isFirstCellOccurrence:s,tocDashboardData:[d[a],d.total_count],commands:e.commands,key:`${t.text}-${t.level}-${o++}`})})))};class Ge extends ie{constructor(e,t){super(),this._preRenderedToolbar=null,this._showCode=!1,this._showMarkdown=!1,this._numbering=t.numbering,this._numberingH1=t.numberingH1,this._syncCollapseState=t.syncCollapseState,this._widget=e,this.sanitizer=t.sanitizer,this._collapseChanged=new T.Signal(this)}set numberingH1(e){this._numberingH1!==e&&(this._numberingH1=e,this._widget.update())}get numberingH1(){return this._numberingH1}set syncCollapseState(e){this._syncCollapseState!==e&&(this._syncCollapseState=e,this._widget.update())}get syncCollapseState(){return this._syncCollapseState}setNotebookMetadata(e,t){null!==t&&t.model&&w.setMetadataComp(t.model,e[0],e[1])}setNumbering(e,t){this._numbering=e,this._widget.update(),this.setNotebookMetadata(["dashboard-toc-autonumbering",this._numbering],t)}get numbering(){return this._numbering}setShowCode(e,t){this._showCode=e,this.setNotebookMetadata(["dashboard-toc-showcode",this._showCode],t),this._widget.update()}get showCode(){return this._showCode}setShowMarkdown(e,t){this._showMarkdown=e,this.setNotebookMetadata(["dashboard-toc-showmarkdowntxt",this._showMarkdown],t),this._widget.update()}get showMarkdown(){return this._showMarkdown}get collapseChanged(){return this._collapseChanged}set preRenderedToolbar(e){this._preRenderedToolbar=e}get preRenderedToolbar(){return this._preRenderedToolbar}updateWidget(){this._widget.update()}updateAndCollapse(e){this._collapseChanged.emit(e),this._widget.update()}initializeOptions(e,t,o,n,a){this._numbering=e,this._numberingH1=t,this._syncCollapseState=o,this._showCode=n,this._showMarkdown=a,this._widget.update()}}function qe(e){if(e.length>0){let t=e.length-1;for(;t>=0;){if("header"===e[t].type)return e[t].level;t-=1}}return 0}const Ze="jp-MarkdownHeadingCollapsed",Xe="dashboard-toc-hr-collapsed";function Ye(e,t,o,n,a,s){const l=[];if(e){const i=e.split("\n"),r=Math.min(i.length,3);let c="",d=0;for(;d<r-1;d++)c+=i[d]+"\n";c+=i[d],l.push({text:c,level:n+1,onClick:t(0),type:"code",prompt:o,cellRef:a,hasChild:!1,index:s})}return l[0]}function Qe(e,t,o,n){if(t&&t.text){if(o&&"header"===o.type)for(let t=e.length-1;t>=0;t--)e[t]===o&&(e[t].hasChild=!0);n<0&&e.push(t),o=t}return[e,o]}const et={allowedTags:["p","blockquote","b","i","strong","em","strike","code","br","div","span","pre","del"],allowedAttributes:{code:["class"],span:["class"],div:["class"],p:["class"],pre:["class"]}};function tt(e,t,o,n,a,s=!1,l=!0,i,r){const c=e.querySelectorAll("h1, h2, h3, h4, h5, h6, p");let d=a;const h=[];for(const e of c){if("p"===e.nodeName.toLowerCase()){if(e.innerHTML){const n=o.sanitize(e.innerHTML,et);h.push({level:d+1,html:n.replace("¶",""),text:e.textContent?e.textContent:"",onClick:t(e),type:"markdown",cellRef:i,hasChild:!1,index:r})}continue}e.getElementsByClassName("numbering-entry").length>0&&e.removeChild(e.getElementsByClassName("numbering-entry")[0]);let a=o.sanitize(e.innerHTML,et);a=a.replace("¶","");let c=parseInt(e.tagName[1],10);l||(c-=1),d=c;const m=at(n,c);if(s){const t=document.createElement("span");t.classList.add("numbering-entry"),t.textContent=null!=m?m:"",e.insertBefore(t,e.firstChild)}h.push({level:c,text:e.textContent?e.textContent:"",numbering:m,html:a,onClick:t(e),type:"header",cellRef:i,hasChild:!1,index:r})}return h}function ot(e,t,o,n,a,s){return e&&"markdown"===e.type&&s?[t,o]=Qe(t,e,o,n):e&&"header"===e.type&&([t,o,n]=function(e,t,o,n,a){const s=e.length;if(o&&"header"===o.type&&o.level<t.level)for(let t=s-1;t>=0;t--)e[t]===o&&(e[t].hasChild=!0);return(n>=t.level||n<0)&&(e.push(t),n=a?t.level:-1),[e,o=t,n]}(t,e,o,n,a)),[t,o,n]}const nt=6;function at(e,t){if(null===e)return;let o="";if(e=function(e,t){for(let o=t+1;o<=nt;o++)void 0!==e[o]&&(e[o]=void 0);return void 0===e[t]?e[t]=1:e[t]+=1,e}(e,t),t>=1){for(let n=1;n<=t;n++)o+=(void 0===e[n]?"0":e[n])+".";o+=" "}return o}function st(e){const t=e.split("\n");let o=t[0].match(/^([#]{1,6}) (.*)/);return o?{text:o[2].replace(/\[(.+)\]\(.+\)/g,"$1"),level:o[1].length,type:"markdown"}:t.length>1&&(o=t[1].match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),o)?{text:t[0].replace(/\[(.+)\]\(.+\)/g,"$1"),level:"="===o[1][0]?1:2,type:"markdown-alt"}:(o=t[0].match(/<h([1-6]).*>(.*)<\/h\1>/i),o?{text:o[2],level:parseInt(o[1],10),type:"html"}:null)}function lt(e,t,o,n,a,s){const l=t(0),i=[];let r=n;for(const t of e.split("\n"))if(t){const e=st(t);e?(i.push({text:e.text,level:e.level,numbering:at(o,e.level),onClick:l,type:"header",cellRef:a,hasChild:!1,index:s}),r=e.level):i.push({text:t,level:r+1,onClick:l,type:"markdown",cellRef:a,hasChild:!1,index:s})}return i}function it(e,t,o){if(t.index>-1||(null==o?void 0:o.length)){const n=e.content.activeCellIndex,a=t.index;if(n&&a<n){const e=o.indexOf(t)+1;if(e>=o.length)return!0;if((null==o?void 0:o[e].index)>n)return!0}}return!1}const rt=oe.dispatch;function ct(e,t,o){let n=!0,a=!1;o&&o.composite.tocDashboardSettings&&(n=o.composite.tocDashboardSettings.numberingH1,a=o.composite.tocDashboardSettings.syncCollapseState);const s=new Ge(e,{numbering:!1,numberingH1:n,syncCollapseState:a,sanitizer:t});return o&&o.composite.tocDashboardSettings&&o.changed.connect((()=>{s.numberingH1=o.composite.tocDashboardSettings.numberingH1,s.syncCollapseState=o.composite.tocDashboardSettings.syncCollapseState})),{options:s,toolbarGenerator:function(e){return function(e,t){return class extends v.Component{constructor(o){super(o),this.state={showCode:!0,showMarkdown:!1,numbering:!1,showVisuDashboard:H.displayDashboard},t.context.ready.then((()=>{if(t){t.content.activeCellChanged.connect((()=>{e.updateWidget()}));const o=w.getMetadataComp(t.model,"dashboard-toc-autonumbering"),n=w.getMetadataComp(t.model,"dashboard-toc-showcode"),a=w.getMetadataComp(t.model,"dashboard-toc-showmarkdowntxt");e.initializeOptions(o||e.numbering,e.numberingH1,e.syncCollapseState,n||e.showCode,a||e.showMarkdown),this.setState({showCode:e.showCode,showMarkdown:e.showMarkdown,numbering:e.numbering})}}))}toggleCode(){we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_TOOLBAR_CODE}),e.setShowCode(!e.showCode,t),this.setState({showCode:e.showCode})}toggleMarkdown(){we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_TOOLBAR_MARKDOWN}),e.setShowMarkdown(!e.showMarkdown,t),this.setState({showMarkdown:e.showMarkdown})}toggleNumbering(){we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_TOOLBAR_NUMBERED}),e.setNumbering(!e.numbering,t),this.setState({numbering:e.numbering})}toggleShowVisuDashboard(){we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_TOOLBAR_SHOW_HIDE});const e=this.state.showVisuDashboard;rt($(!e)),this.setState({showVisuDashboard:!e})}refreshDashboard(){we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_TOOLBAR_REFRESH}),rt(X())}render(){const e=v.createElement("div",{onClick:e=>this.toggleCode(),role:"text","aria-label":"Toggle Code Cells",title:"Toggle Code Cells",className:this.state.showCode?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},v.createElement(f.codeIcon.react,null)),t=v.createElement("div",{onClick:e=>this.toggleMarkdown(),role:"text","aria-label":"Toggle Markdown Text Cells",title:"Toggle Markdown Text Cells",className:this.state.showMarkdown?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},v.createElement(f.markdownIcon.react,null)),o=v.createElement("div",{onClick:e=>this.toggleNumbering(),role:"text","aria-label":"Toggle Auto-Numbering",title:"Toggle Auto-Numbering",className:this.state.numbering?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},v.createElement(f.numberingIcon.react,null)),n=v.createElement("div",{onClick:e=>this.toggleShowVisuDashboard(),role:"text","aria-label":this.state.showVisuDashboard?"Hide Visualization Dashboard":"Show Visualization Dashboard",title:this.state.showVisuDashboard?"Hide Visualization Dashboard":"Show Visualization Dashboard",className:"dashboard-toc-toolbar-icon"},this.state.showVisuDashboard?v.createElement(O.react,null):v.createElement(x.react,null)),a=v.createElement("div",{onClick:e=>this.refreshDashboard(),role:"text","aria-label":"Refresh Dashboard",title:"Refresh Dashboard",className:"dashboard-toc-toolbar-icon"},v.createElement(f.refreshIcon.react,null));return v.createElement("div",null,v.createElement("div",{className:"dashboard-toc-toolbar"},v.createElement("div",{className:"dashboard-toc-toolbar-compartment"},e,t,o),v.createElement("div",{className:"dashboard-toc-toolbar-compartment"},n,a)))}}}(s,e)},itemRenderer:function(e,t,o=[]){return function(e,t,o,n=[]){var a;if("markdown"===o.type||"header"===o.type){let a="dashboard-toc-level-size-default";const s=o.numbering&&e.numbering?o.numbering:"",l=e.syncCollapseState?Ze:Xe;if("header"!==o.type&&"markdown"!==o.type||(a="dashboard-toc-level-size-"+o.level),"header"===o.type||e.showMarkdown){let i;i=o.html?v.createElement("span",{dangerouslySetInnerHTML:{__html:s+e.sanitizer.sanitize(o.html,et)},className:"dashboard-"+o.type+"-cell dashboard-toc-cell-item"}):v.createElement("span",{className:"dashboard-"+o.type+"-cell dashboard-toc-cell-item"},s+o.text);let r=null;return"header"===o.type&&(r=v.createElement("div",{className:"jp-Collapser p-Widget lm-Widget",onClick:n=>{n.stopPropagation(),function(t,o,n){let a=!1;const s=e.syncCollapseState,l=w.getMetadataComp(null==n?void 0:n.cellRef.model,o);l&&(a=l),n?(s?t&&se.NotebookActions.setHeadingCollapse(null==n?void 0:n.cellRef,!a,t.content):a?w.deleteMetadataComp(n.cellRef.model,o):w.setMetadataComp(n.cellRef.model,o,!0),e.updateAndCollapse({heading:n,collapsedState:a})):e.updateWidget()}(t,l,o)}},v.createElement("div",{className:"dashboard-toc-Collapser-child"}))),i=v.createElement("div",{className:"dashboard-toc-entry-holder "+a+(t.content.activeCell===o.cellRef||it(t,o,n)?" dashboard-toc-active-cell":"")},r,i),i}return null}if(t&&"code"===o.type&&e.showCode){const e=(null===(a=w.getMetadataComp(t.model,"language_info"))||void 0===a?void 0:a.mimetype)||"text";return v.createElement("div",{className:"dashboard-toc-code-cell-div"},v.createElement("div",{className:"dashboard-toc-code-cell-prompt"},o.prompt),v.createElement("span",{className:"dashboard-toc-code-span"},v.createElement(Be,{cell_input:o.text,language_mimetype:e,className:"dashboard-toc-cell-input"})))}return null}(s,e,t,o)},generate:function(o){let n=[],a=-1;const l={};let i=null;for(let r=0;r<o.content.widgets.length;r++){const c=o.content.widgets[r],d=c.model,h=s.syncCollapseState?Ze:Xe;let m=w.getMetadataComp(d,h);if(m=m||!1,"code"!==d.type){if("markdown"===d.type){const e=c;let h;const u=qe(n);if(e.rendered&&!e.inputHidden){const d=t=>()=>{e.rendered?(o.content.mode="command",c.node.scrollIntoView(),o.content.activeCellIndex=r):(o.content.activeCellIndex=r,t.scrollIntoView())},p=tt(c.node,d,t,l,u,s.numbering,s.numberingH1,c,r);for(h of p)[n,i,a]=ot(h,n,i,a,m,s.showMarkdown)}else{const e=e=>()=>{o.content.activeCellIndex=r,c.node.scrollIntoView()},t=lt(d.sharedModel.getSource(),e,l,u,c,r);for(h of t)[n,i,a]=ot(h,n,i,a,m,s.showMarkdown)}}}else if(!e||e&&s.showCode){const e=e=>()=>{o.content.activeCellIndex=r,c.node.scrollIntoView()},t=c.model.executionCount,s=null!==t?"["+t+"]: ":"[ ]: ",l=Ye(d.sharedModel.getSource(),e,s,qe(n),c,r);[n,i]=Qe(n,l,i,a)}}return n},collapseChanged:s.collapseChanged}}class dt extends _e{constructor(e,t,o,n){super(e),this.title.caption="Dashboard ToC",this.title.icon=S,this.id="dashboard-toc-code",this.node.setAttribute("role","region"),this.node.setAttribute("aria-label","Dashboard ToC section"),this._commands=t,this._notebookGenerator=ct(this,o,n),this._toolbar=null,e.panelSwitched.connect(this._onPanelSwitched,this)}_onPanelSwitched(e){this._panelManager.panel?this._toolbar=this._notebookGenerator.toolbarGenerator(this._panelManager.panel):this._toolbar=null}computeComponentToRender(){const e=this._panelManager.panel;return e?v.createElement("div",{className:"dashboard-TableOfContents"},v.createElement("div",{className:"dashboard-stack-panel-header"},le.PathExt.basename(e.context.localPath)),this._toolbar&&v.createElement(this._toolbar,null),v.createElement(Je,{headings:this._notebookGenerator.generate(e),itemRenderer:this._notebookGenerator.itemRenderer,notebookPanel:e,commands:this._commands,notebookCells:this._panelManager.notebookCells})):v.createElement(v.Fragment,null)}}const ht=oe.dispatch,mt=crypto.randomUUID(),ut={id:d,autoStart:!0,requires:[a.IFileBrowserFactory,n.ILayoutRestorer,n.ILabShell,s.IRenderMimeRegistry,l.ISettingRegistry],optional:[],activate:(e,t,o,n,a,s)=>{console.log(`JupyterLab extension ${c} is activated!`);const l="3.1.0",r=e.version.match(/[0-9]+/g);if(r&&((e,t)=>{const o=e.split(/[^0-9]+/).map(Number),n=t.split(/[^0-9]+/).map(Number);for(let e=0;e<Math.min(o.length,n.length);e++){const t=o[e],a=n[e];if(t!==a)return t-a}const a=e.replace(/[0-9]+/g,""),s=t.replace(/[0-9]+/g,"");return a.localeCompare(s)})(e.version,l)>=0){const l=parseInt(r[0]);w.setJupyterVersion(l).then((()=>{(async(e,t)=>{let o="";const n=await e.serviceManager.sessions.startNew({path:"",type:"",name:""});try{const e=n.kernel;if(e){const t=e.requestExecute({code:"import os\nos.environ.get('JUPYTERHUB_USER')",store_history:!1,allow_stdin:!1});t.onIOPub=e=>{if("execute_result"===e.header.msg_type){const t=e.content.data["text/plain"];o=t?t.toString().replace(/^['"](.*)['"]$/,"$1"):""}},await t.done}}finally{n&&n.shutdown()}return o})(e).then((l=>{fetch(`${i}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json","Unianalytics-User-Id":l},credentials:"include"}).then((l=>{l.ok?l.json().then((l=>{if("logged_in"===l.status)return function(e,t){console.log("JupyterLab extension upload is activated!"),e.commands.addCommand(m.uploadNotebook,{label:"Upload notebook to unianalytics",icon:e=>e.isContextMenu?f.fileUploadIcon:void 0,execute:o=>{const n=w.getFileComp(t);n&&e.serviceManager.contents.get(n.path).then((t=>{var o,a;(o=t.content,a=n.name,new Promise(((e,t)=>{const n=new FormData;n.append("notebook_content",JSON.stringify(o)),n.append("name",a),fetch(i+"/notebook/upload",{method:"POST",credentials:"include",body:n}).then((o=>{o.ok?e(o.json()):t(new Error("Failed to upload notebook on the backend"))})).catch((e=>{console.log("Error occurred while uploading notebook:",e),t(e)}))}))).then((o=>{const a={...t,content:o};e.serviceManager.contents.save(n.path,a).then((e=>{const t=o.metadata[g.notebookId],a=`${i}/notebook/download/${t}`;(0,E.showDialog)({title:n.name,body:k().createElement(y,{url:a,fileName:n.name}),buttons:[E.Dialog.okButton()]}).catch((e=>console.log(e)))}))})).catch((e=>{(0,E.showDialog)({title:n.name,body:"Error uploading the file",buttons:[E.Dialog.cancelButton()]}).catch((e=>console.log(e)))}))}))}}),e.commands.addCommand(m.copyDownloadLink,{label:"Copy unianalytics notebook link",icon:e=>e.isContextMenu?f.linkIcon:void 0,execute:o=>{const n=w.getFileComp(t);n&&e.serviceManager.contents.get(n.path).then((e=>{const t=e.content.metadata;if(t){const e=t[g.notebookId];e?navigator.clipboard.writeText(`${i}/notebook/download/${e}`).catch((e=>{console.error("Error copying link: ",e)})):console.log("Notebook not tagged")}}))}}),e.contextMenu.addItem({selector:u,type:"separator",rank:0}),e.contextMenu.addItem({args:{isContextMenu:!0},command:m.uploadNotebook,selector:u,rank:0}),e.contextMenu.addItem({args:{isContextMenu:!0},command:m.copyDownloadLink,selector:u,rank:0}),e.contextMenu.addItem({selector:u,type:"separator",rank:0})}(e,t),void async function(e,t,o,n,a){let s;if(console.log(`JupyterLab extension ${c}: dashboard plugins activated!`),e.docRegistry.addWidgetExtension("Notebook",new I(e.commands)),e.docRegistry.addWidgetExtension("Notebook",new A(e.commands)),n)try{s=await n.load(`${c}:plugin`),h(s),s.changed.connect(h)}catch(e){console.error(`Failed to load settings for the ${c} extension.\n\n${e}`)}const l=new he,i=new Pe(l,a.sanitizer),r=new dt(l,e.commands,a.sanitizer,s);function d(){const t=e.shell.currentWidget;if(!t)return;if(!(t instanceof se.NotebookPanel))return void(l.panel&&l.panel.isDisposed&&(l.panel=null));const o=t;l.panel=o}function h(e){var t,o;const n=e.composite.commonDashboardSettings;let a;n?(a=n.realTime,we.setPermission(n.dashboardCollection||!1)):(a=null===(t=e.default("commonDashboardSettings"))||void 0===t?void 0:t.realTime,we.setPermission((null===(o=e.default("commonDashboardSettings"))||void 0===o?void 0:o.dashboardCollection)||!1)),null===a&&void 0===a||ht(Y(a))}o.add(i,"right",{rank:1e3}),o.add(r,"left",{rank:1e3}),e.commands.addCommand(m.dashboardOpenVisu,{label:"Notebook Visualizations",caption:"Open Notebook Dashboard",icon:S,iconClass:"jp-icon3",execute:t=>{"Notebook"===t.from?(we.sendInteraction({click_type:"ON",signal_origin:ae.NOTEBOOK_TOOLBAR_BUTTON}),ht(F())):"Cell"===t.from?(we.sendInteraction({click_type:"ON",signal_origin:ae.NOTEBOOK_CELL_BUTTON}),ht(W({cellId:t.cell_id}))):"Toc"===t.from&&(we.sendInteraction({click_type:"ON",signal_origin:ae.TOC_OPEN_CELL_DASHBOARD}),ht(W({cellId:t.cell_id}))),i.isVisible||e.shell.activateById(i.id)}}),t&&(t.add(i,`${c}:dashboard-notebook-restorer`),t.add(r,`${c}:dashboard-toc-restorer`)),o&&o.currentChanged.connect(d),e.restored.then((()=>{d()}))}(e,o,n,s,a);console.log(`${c}: User not authenticated`)})).catch((e=>console.log(`${c}: Authentication error, ${e}`))):console.log(`${c}: Unauthorized user`)})).catch((e=>console.log(`${c}: Authentication error, ${e}`)))})).catch((e=>console.log(`${c}: Failed to access the userId, ${e}`)))}))}else console.log(`${c}: Use a more recent version of JupyterLab (>=${l})`)}},pt=ut},2204:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},9609:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},2469:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},7486:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},991:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%28255, 255, 255, 0.25%29%27/%3e%3c/svg%3e"},4144:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},6254:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},5321:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23052c65%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},3460:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},1281:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%236ea8fe%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},5647:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},1692:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},6770:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},6711:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23dee2e6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},8931:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},6199:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},2956:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},2221:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},5122:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,a,o,n,i,d,l,f,u,c,s,b,p,h,m,v,y,g,j,w,P,_,k,O={4479:(e,r,t)=>{var a={"./index":()=>Promise.all([t.e(39),t.e(29),t.e(249)]).then((()=>()=>t(5326))),"./extension":()=>Promise.all([t.e(39),t.e(29),t.e(249)]).then((()=>()=>t(5326))),"./style":()=>t.e(546).then((()=>()=>t(5546)))},o=(e,r)=>(t.R=r,r=t.o(a,e)?a[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var a="default",o=t.S[a];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[a]=e,t.I(a,r)}};t.d(r,{get:()=>o,init:()=>n})}},S={};function x(e){var r=S[e];if(void 0!==r)return r.exports;var t=S[e]={id:e,exports:{}};return O[e].call(t.exports,t,t.exports,x),t.exports}x.m=O,x.c=S,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,x.t=function(t,a){if(1&a&&(t=this(t)),8&a)return t;if("object"==typeof t&&t){if(4&a&&t.__esModule)return t;if(16&a&&"function"==typeof t.then)return t}var o=Object.create(null);x.r(o);var n={};e=e||[null,r({}),r([]),r(r)];for(var i=2&a&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>n[e]=()=>t[e]));return n.default=()=>t,x.d(o,n),o},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{10:"1e5c908a94fc4b83c2e5",18:"7ff03b96ce4c1ba53ee1",29:"769424eb2fb6005d650d",39:"5a3b28a79ba693a9b627",211:"89dacbdaab834bdf23ce",249:"691517cacbe8c2be707b",308:"52850e2a1110e4767a49",354:"3fc8bedd8759d8e5959d",373:"f1b17497350b5f5ae056",376:"f1d6f3b311dcbdd07963",426:"3f483e930d772b4f379a",459:"688cfd55e3593a1a277a",480:"204a87ef5b55b7100fdb",546:"1efdc24af6b7b05d297e",563:"b613f734176cb51510ef",638:"707471a39fb6c87b1554",704:"f8098154b30126310b49",708:"8d6156d603ddfa7e363d",744:"329dc4d1ed2f5c918266",798:"33a8f0893a66574e9259",981:"ebb9e1d6122980b5ff0e"}[e]+".js?v="+{10:"1e5c908a94fc4b83c2e5",18:"7ff03b96ce4c1ba53ee1",29:"769424eb2fb6005d650d",39:"5a3b28a79ba693a9b627",211:"89dacbdaab834bdf23ce",249:"691517cacbe8c2be707b",308:"52850e2a1110e4767a49",354:"3fc8bedd8759d8e5959d",373:"f1b17497350b5f5ae056",376:"f1d6f3b311dcbdd07963",426:"3f483e930d772b4f379a",459:"688cfd55e3593a1a277a",480:"204a87ef5b55b7100fdb",546:"1efdc24af6b7b05d297e",563:"b613f734176cb51510ef",638:"707471a39fb6c87b1554",704:"f8098154b30126310b49",708:"8d6156d603ddfa7e363d",744:"329dc4d1ed2f5c918266",798:"33a8f0893a66574e9259",981:"ebb9e1d6122980b5ff0e"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},a="jupyterlab_unianalytics_dashboard:",x.l=(e,r,o,n)=>{if(t[e])t[e].push(r);else{var i,d;if(void 0!==o)for(var l=document.getElementsByTagName("script"),f=0;f<l.length;f++){var u=l[f];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+o){i=u;break}}i||(d=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",a+o),i.src=e),t[e]=[r];var c=(r,a)=>{i.onerror=i.onload=null,clearTimeout(s);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(a))),r)return r(a)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=c.bind(null,i.onerror),i.onload=c.bind(null,i.onload),d&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,a)=>{a||(a=[]);var o=r[t];if(o||(o=r[t]={}),!(a.indexOf(o)>=0)){if(a.push(o),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var n=x.S[t],i="jupyterlab_unianalytics_dashboard",d=(e,r,t,a)=>{var o=n[e]=n[e]||{},d=o[r];(!d||!d.loaded&&(!a!=!d.eager?a:i>d.from))&&(o[r]={get:t,from:i,eager:!!a})},l=[];return"default"===t&&(d("@reduxjs/toolkit","1.9.6",(()=>x.e(426).then((()=>()=>x(8426))))),d("chart.js","4.4.0",(()=>x.e(708).then((()=>()=>x(4708))))),d("crypto-js","4.1.1",(()=>Promise.all([x.e(354),x.e(480)]).then((()=>()=>x(1354))))),d("jupyterlab_unianalytics_dashboard","4.0.4",(()=>Promise.all([x.e(39),x.e(29),x.e(249)]).then((()=>()=>x(5326))))),d("marked","9.1.6",(()=>x.e(308).then((()=>()=>x(3308))))),d("react-bootstrap-icons","1.10.3",(()=>Promise.all([x.e(744),x.e(29)]).then((()=>()=>x(1744))))),d("react-bootstrap","2.9.0",(()=>Promise.all([x.e(18),x.e(29),x.e(704)]).then((()=>()=>x(1018))))),d("react-chartjs-2","5.2.0",(()=>Promise.all([x.e(29),x.e(459),x.e(563)]).then((()=>()=>x(5376))))),d("react-redux","8.1.3",(()=>Promise.all([x.e(981),x.e(29),x.e(704)]).then((()=>()=>x(2981)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&!e;)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),o=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),a=t[1]?r(t[1]):[];return t[2]&&(a.length++,a.push.apply(a,r(t[2]))),t[3]&&(a.push([]),a.push.apply(a,r(t[3]))),a},n=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var a=e[t],n=(typeof a)[0];if(t>=r.length)return"u"==n;var i=r[t],d=(typeof i)[0];if(n!=d)return"o"==n&&"n"==d||"s"==d||"u"==n;if("o"!=n&&"u"!=n&&a!=i)return a<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var a=1,o=1;o<e.length;o++)a--,t+="u"==(typeof(d=e[o]))[0]?"-":(a>0?".":"")+(a=2,d);return t}var n=[];for(o=1;o<e.length;o++){var d=e[o];n.push(0===d?"not("+l()+")":1===d?"("+l()+" || "+l()+")":2===d?n.pop()+" "+n.pop():i(d))}return l();function l(){return n.pop().replace(/^\((.+)\)$/,"$1")}},d=(e,r)=>{if(0 in e){r=o(r);var t=e[0],a=t<0;a&&(t=-t-1);for(var n=0,i=1,l=!0;;i++,n++){var f,u,c=i<e.length?(typeof e[i])[0]:"";if(n>=r.length||"o"==(u=(typeof(f=r[n]))[0]))return!l||("u"==c?i>t&&!a:""==c!=a);if("u"==u){if(!l||"u"!=c)return!1}else if(l)if(c==u)if(i<=t){if(f!=e[i])return!1}else{if(a?f>e[i]:f<e[i])return!1;f!=e[i]&&(l=!1)}else if("s"!=c&&"n"!=c){if(a||i<=t)return!1;l=!1,i--}else{if(i<=t||u<c!=a)return!1;l=!1}else"s"!=c&&"n"!=c&&(l=!1,i--)}}var s=[],b=s.pop.bind(s);for(n=1;n<e.length;n++){var p=e[n];s.push(1==p?b()|b():2==p?b()&b():p?d(p,r):!b())}return!!b()},l=(e,r)=>{var t=x.S[e];if(!t||!x.o(t,r))throw new Error("Shared module "+r+" doesn't exist in shared scope "+e);return t},f=(e,r)=>{var t=e[r];return(r=Object.keys(t).reduce(((e,r)=>!e||n(e,r)?r:e),0))&&t[r]},u=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},c=(e,r,t,a)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(a)+")",s=(e,r,t,a)=>{var o=u(e,t);return d(a,o)||h(c(e,t,o,a)),v(e[t][o])},b=(e,r,t)=>{var a=e[r];return(r=Object.keys(a).reduce(((e,r)=>!d(t,r)||e&&!n(e,r)?e:r),0))&&a[r]},p=(e,r,t,a)=>{var o=e[t];return"No satisfying version ("+i(a)+") of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(o).map((e=>e+" from "+o[e].from)).join(", ")},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t,a)=>{h(p(e,r,t,a))},v=e=>(e.loaded=1,e.get()),g=(y=e=>function(r,t,a,o){var n=x.I(r);return n&&n.then?n.then(e.bind(e,r,x.S[r],t,a,o)):e(r,x.S[r],t,a,o)})(((e,r,t,a)=>(l(e,t),v(b(r,t,a)||m(r,e,t,a)||f(r,t))))),j=y(((e,r,t,a)=>(l(e,t),s(r,0,t,a)))),w=y(((e,r,t,a,o)=>{var n=r&&x.o(r,t)&&b(r,t,a);return n?v(n):o()})),P={},_={6029:()=>j("default","react",[1,18,2,0]),902:()=>w("default","chart.js",[1,4,3,0],(()=>x.e(708).then((()=>()=>x(4708))))),2419:()=>j("default","@jupyterlab/filebrowser",[1,4,0,9]),2535:()=>w("default","react-bootstrap-icons",[1,1,10,3],(()=>x.e(744).then((()=>()=>x(1744))))),3205:()=>j("default","@jupyterlab/application",[1,4,0,9]),3748:()=>w("default","@reduxjs/toolkit",[1,1,9,5],(()=>x.e(426).then((()=>()=>x(8426))))),4085:()=>j("default","@jupyterlab/ui-components",[1,4,0,9]),4614:()=>w("default","react-bootstrap",[1,2,7,4],(()=>Promise.all([x.e(18),x.e(704)]).then((()=>()=>x(1018))))),4901:()=>j("default","@lumino/signaling",[1,2,0,0]),5390:()=>g("default","@jupyterlab/outputarea",[1,4,0,9]),5863:()=>w("default","marked",[1,9,1,6],(()=>x.e(308).then((()=>()=>x(3308))))),6336:()=>w("default","crypto-js",[1,4,1,1],(()=>Promise.all([x.e(354),x.e(480)]).then((()=>()=>x(1354))))),7308:()=>j("default","@jupyterlab/apputils",[1,4,1,9]),7454:()=>j("default","@jupyterlab/codemirror",[1,4,0,9]),7717:()=>j("default","@lumino/disposable",[1,2,0,0]),7749:()=>j("default","@jupyterlab/coreutils",[1,6,0,9]),7760:()=>w("default","react-redux",[1,8,0,5],(()=>Promise.all([x.e(981),x.e(704)]).then((()=>()=>x(2981))))),7807:()=>j("default","@jupyterlab/codeeditor",[1,4,0,9]),7885:()=>w("default","react-chartjs-2",[1,5,2,0],(()=>Promise.all([x.e(459),x.e(798)]).then((()=>()=>x(5376))))),8190:()=>j("default","@jupyterlab/settingregistry",[1,4,0,9]),8778:()=>j("default","@lumino/widgets",[1,2,0,1]),9122:()=>j("default","@jupyterlab/notebook",[1,4,0,9]),9499:()=>j("default","@jupyterlab/rendermime",[1,4,0,9]),7704:()=>j("default","react-dom",[1,18,2,0]),6459:()=>w("default","chart.js",[1,4,1,1],(()=>x.e(708).then((()=>()=>x(4708))))),1373:()=>j("default","@codemirror/language",[1,6,0,0]),6211:()=>j("default","@codemirror/view",[1,6,9,6]),851:()=>j("default","@lezer/common",[1,1,0,0]),7138:()=>j("default","@lezer/highlight",[1,1,0,0]),8204:()=>j("default","@codemirror/state",[1,6,2,0])},k={29:[6029],211:[6211],249:[902,2419,2535,3205,3748,4085,4614,4901,5390,5863,6336,7308,7454,7717,7749,7760,7807,7885,8190,8778,9122,9499],373:[1373],376:[851,7138,8204],459:[6459],704:[7704]},x.f.consumes=(e,r)=>{x.o(k,e)&&k[e].forEach((e=>{if(x.o(P,e))return r.push(P[e]);var t=r=>{P[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}},a=r=>{delete P[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var o=_[e]();o.then?r.push(P[e]=o.then(t).catch(a)):t(o)}catch(e){a(e)}}))},(()=>{x.b=document.baseURI||self.location.href;var e={217:0};x.f.j=(r,t)=>{var a=x.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else if(/^(37[36]|211|29|459|704)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>a=e[r]=[t,o]));t.push(a[2]=o);var n=x.p+x.u(r),i=new Error;x.l(n,(t=>{if(x.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+n+")",i.name="ChunkLoadError",i.type=o,i.request=n,a[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var a,o,[n,i,d]=t,l=0;if(n.some((r=>0!==e[r]))){for(a in i)x.o(i,a)&&(x.m[a]=i[a]);d&&d(x)}for(r&&r(t);l<n.length;l++)o=n[l],x.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunkjupyterlab_unianalytics_dashboard=self.webpackChunkjupyterlab_unianalytics_dashboard||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(4479);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB).jupyterlab_unianalytics_dashboard=E})();
|
{jupyterlab_unianalytics_dashboard-4.0.2 → jupyterlab_unianalytics_dashboard-4.0.4}/package.json
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_unianalytics_dashboard",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "A JupyterLab dashboard extension to
|
|
3
|
+
"version": "4.0.4",
|
|
4
|
+
"description": "A JupyterLab dashboard extension to visualize data from students.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
7
7
|
"jupyterlab",
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
"description": "Whether to only display currently connected users data (true), or consider historical data according to the selected time limit filter value (false)",
|
|
27
27
|
"type": "boolean",
|
|
28
28
|
"default": true
|
|
29
|
+
},
|
|
30
|
+
"dashboardCollection": {
|
|
31
|
+
"title": "Collect clicks relative to dashboard usage",
|
|
32
|
+
"description": "Whether to enable the collection of interaction clicks with the dashboard extension to better understand what features are more or less used.",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": true
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
},
|
|
@@ -35,22 +41,17 @@
|
|
|
35
41
|
"properties": {
|
|
36
42
|
"numberingH1": {
|
|
37
43
|
"title": "Enable h1 numbering",
|
|
38
|
-
"description": "Whether to number first level headings",
|
|
44
|
+
"description": "Whether to number first level headings.",
|
|
39
45
|
"type": "boolean",
|
|
40
46
|
"default": true
|
|
41
47
|
},
|
|
42
48
|
"syncCollapseState": {
|
|
43
49
|
"type": "boolean",
|
|
44
|
-
"title": "
|
|
50
|
+
"title": "Synchronize the collapse state of the headings",
|
|
45
51
|
"description": "If set to true, when a header is collapsed in the ToC the corresponding section in the notebook is collapsed as well and vice versa.",
|
|
46
52
|
"default": false
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
|
-
},
|
|
50
|
-
"notebookDashboardSettings": {
|
|
51
|
-
"title": "Notebook Dashboard",
|
|
52
|
-
"type": "object",
|
|
53
|
-
"properties": {}
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
57
|
"additionalProperties": false,
|
|
@@ -141,6 +141,7 @@ export class PanelManager {
|
|
|
141
141
|
if (this._validityChecks.tag) {
|
|
142
142
|
// check if notebook is registered (only if the cell list changed)
|
|
143
143
|
if (hasListChanged) {
|
|
144
|
+
this._websocketManager.terminateSocketConnection();
|
|
144
145
|
this._validityChecks.registered = RegistrationState.LOADING;
|
|
145
146
|
|
|
146
147
|
// to make sure the panel hasn't changed by the time the promise resolves
|
|
@@ -149,6 +150,7 @@ export class PanelManager {
|
|
|
149
150
|
|
|
150
151
|
// check with the backend if the notebook is registered and that the cells match
|
|
151
152
|
let currentRegistrationState = RegistrationState.ERROR;
|
|
153
|
+
|
|
152
154
|
fetch(
|
|
153
155
|
`${BACKEND_API_URL}/dashboard/${
|
|
154
156
|
this._validityChecks.tag
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ILabShell,
|
|
3
|
+
ILayoutRestorer,
|
|
4
|
+
JupyterFrontEndPlugin,
|
|
5
|
+
JupyterFrontEnd
|
|
6
|
+
} from '@jupyterlab/application';
|
|
7
|
+
import { IFileBrowserFactory } from '@jupyterlab/filebrowser';
|
|
8
|
+
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
|
9
|
+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
10
|
+
|
|
11
|
+
//importing bootstrap
|
|
12
|
+
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
13
|
+
import { APP_ID, BACKEND_API_URL, PLUGIN_ID } from './utils/constants';
|
|
14
|
+
import { compareVersions } from './utils/utils';
|
|
15
|
+
import { activateUploadNotebookPlugin } from './plugins/uploadNotebook';
|
|
16
|
+
import { activateDashboardPlugins } from './plugins/dashboards';
|
|
17
|
+
import { CompatibilityManager } from './utils/compatibility';
|
|
18
|
+
import { getUserIdFromEnv } from './utils/utils';
|
|
19
|
+
|
|
20
|
+
export const DASHBOARD_USER_ID = crypto.randomUUID();
|
|
21
|
+
|
|
22
|
+
const activate = (
|
|
23
|
+
app: JupyterFrontEnd,
|
|
24
|
+
factory: IFileBrowserFactory,
|
|
25
|
+
restorer: ILayoutRestorer,
|
|
26
|
+
labShell: ILabShell,
|
|
27
|
+
rendermime: IRenderMimeRegistry,
|
|
28
|
+
settingRegistry: ISettingRegistry
|
|
29
|
+
): void => {
|
|
30
|
+
console.log(`JupyterLab extension ${APP_ID} is activated!`);
|
|
31
|
+
|
|
32
|
+
const targetVersion = '3.1.0';
|
|
33
|
+
const appNumbers = app.version.match(/[0-9]+/g);
|
|
34
|
+
|
|
35
|
+
if (appNumbers && compareVersions(app.version, targetVersion) >= 0) {
|
|
36
|
+
const jupyterVersion = parseInt(appNumbers[0]);
|
|
37
|
+
|
|
38
|
+
CompatibilityManager.setJupyterVersion(jupyterVersion).then(() => {
|
|
39
|
+
// read the userId from the environment variables, userId is '' if not defined
|
|
40
|
+
getUserIdFromEnv(app, 'JUPYTERHUB_USER')
|
|
41
|
+
.then((userId: string) => {
|
|
42
|
+
// authenticate the user and only activate the plugins if the user is logged in
|
|
43
|
+
fetch(`${BACKEND_API_URL}/auth/login`, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: {
|
|
46
|
+
'Content-Type': 'application/json',
|
|
47
|
+
'Unianalytics-User-Id': userId
|
|
48
|
+
},
|
|
49
|
+
credentials: 'include'
|
|
50
|
+
})
|
|
51
|
+
.then(loginResponse => {
|
|
52
|
+
if (loginResponse.ok) {
|
|
53
|
+
loginResponse
|
|
54
|
+
.json()
|
|
55
|
+
.then(loginJSON => {
|
|
56
|
+
if (loginJSON.status === 'logged_in') {
|
|
57
|
+
activateUploadNotebookPlugin(app, factory);
|
|
58
|
+
|
|
59
|
+
activateDashboardPlugins(
|
|
60
|
+
app,
|
|
61
|
+
restorer,
|
|
62
|
+
labShell,
|
|
63
|
+
settingRegistry,
|
|
64
|
+
rendermime
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return;
|
|
68
|
+
} else {
|
|
69
|
+
console.log(`${APP_ID}: User not authenticated`);
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
.catch(error =>
|
|
73
|
+
console.log(`${APP_ID}: Authentication error, ${error}`)
|
|
74
|
+
);
|
|
75
|
+
} else {
|
|
76
|
+
console.log(`${APP_ID}: Unauthorized user`);
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
.catch(error =>
|
|
80
|
+
console.log(`${APP_ID}: Authentication error, ${error}`)
|
|
81
|
+
);
|
|
82
|
+
})
|
|
83
|
+
.catch(error =>
|
|
84
|
+
console.log(`${APP_ID}: Failed to access the userId, ${error}`)
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
console.log(
|
|
89
|
+
`${APP_ID}: Use a more recent version of JupyterLab (>=${targetVersion})`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const plugin: JupyterFrontEndPlugin<void> = {
|
|
95
|
+
id: PLUGIN_ID,
|
|
96
|
+
autoStart: true,
|
|
97
|
+
requires: [
|
|
98
|
+
IFileBrowserFactory,
|
|
99
|
+
ILayoutRestorer,
|
|
100
|
+
ILabShell,
|
|
101
|
+
IRenderMimeRegistry,
|
|
102
|
+
ISettingRegistry
|
|
103
|
+
],
|
|
104
|
+
optional: [],
|
|
105
|
+
activate: activate
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default plugin;
|
|
@@ -20,6 +20,8 @@ import { VisuDashboardPanel } from '../dashboard-widgets/VisuDashboardPanel';
|
|
|
20
20
|
import { TocDashboardPanel } from '../dashboard-widgets/TocDashboardPanel';
|
|
21
21
|
// import { ChatDashboardPanel } from '../dashboard-widgets/ChatDashboardPanel';
|
|
22
22
|
import { displayRealTime } from '../redux/reducers/CommonDashboardReducer';
|
|
23
|
+
import { InteractionRecorder } from '../utils/interactionRecorder';
|
|
24
|
+
import { DashboardClickOrigin } from '../utils/interfaces';
|
|
23
25
|
|
|
24
26
|
const dispatch = store.dispatch as AppDispatch;
|
|
25
27
|
|
|
@@ -88,8 +90,26 @@ export async function activateDashboardPlugins(
|
|
|
88
90
|
iconClass: visuIconClass,
|
|
89
91
|
execute: args => {
|
|
90
92
|
if (args['from'] === 'Notebook') {
|
|
93
|
+
InteractionRecorder.sendInteraction({
|
|
94
|
+
click_type: 'ON',
|
|
95
|
+
signal_origin: DashboardClickOrigin.NOTEBOOK_TOOLBAR_BUTTON
|
|
96
|
+
});
|
|
91
97
|
dispatch(navigateToNotebook());
|
|
92
98
|
} else if (args['from'] === 'Cell') {
|
|
99
|
+
InteractionRecorder.sendInteraction({
|
|
100
|
+
click_type: 'ON',
|
|
101
|
+
signal_origin: DashboardClickOrigin.NOTEBOOK_CELL_BUTTON
|
|
102
|
+
});
|
|
103
|
+
dispatch(
|
|
104
|
+
navigateToCell({
|
|
105
|
+
cellId: args['cell_id'] as string
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
} else if (args['from'] === 'Toc') {
|
|
109
|
+
InteractionRecorder.sendInteraction({
|
|
110
|
+
click_type: 'ON',
|
|
111
|
+
signal_origin: DashboardClickOrigin.TOC_OPEN_CELL_DASHBOARD
|
|
112
|
+
});
|
|
93
113
|
dispatch(
|
|
94
114
|
navigateToCell({
|
|
95
115
|
cellId: args['cell_id'] as string
|
|
@@ -105,13 +125,6 @@ export async function activateDashboardPlugins(
|
|
|
105
125
|
}
|
|
106
126
|
});
|
|
107
127
|
|
|
108
|
-
app.commands.addCommand(CommandIDs.showDashboardToCPanel, {
|
|
109
|
-
label: 'Dashboard Table of Contents',
|
|
110
|
-
execute: () => {
|
|
111
|
-
labShell.activateById(tocDashboardPanel.id);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
128
|
// add the widgets to the restorer
|
|
116
129
|
if (restorer) {
|
|
117
130
|
restorer.add(visuDashboardPanel, `${APP_ID}:dashboard-notebook-restorer`);
|
|
@@ -152,9 +165,16 @@ export async function activateDashboardPlugins(
|
|
|
152
165
|
let isRealTimeActivated;
|
|
153
166
|
if (commonDashboardSettings) {
|
|
154
167
|
isRealTimeActivated = (commonDashboardSettings as any).realTime;
|
|
168
|
+
InteractionRecorder.setPermission(
|
|
169
|
+
(commonDashboardSettings as any).dashboardCollection || false
|
|
170
|
+
);
|
|
155
171
|
} else {
|
|
156
172
|
isRealTimeActivated = (settings.default('commonDashboardSettings') as any)
|
|
157
173
|
?.realTime;
|
|
174
|
+
InteractionRecorder.setPermission(
|
|
175
|
+
(settings.default('commonDashboardSettings') as any)
|
|
176
|
+
?.dashboardCollection || false
|
|
177
|
+
);
|
|
158
178
|
}
|
|
159
179
|
|
|
160
180
|
if (isRealTimeActivated !== null || isRealTimeActivated !== undefined) {
|