@jupyter-notebook/notebook-extension 7.0.3 → 7.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/trusted.d.ts +1 -1
- package/lib/trusted.js +10 -8
- package/package.json +12 -10
- package/style/base.css +1 -1
package/lib/trusted.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ReactWidget } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { Notebook } from '@jupyterlab/notebook';
|
|
3
3
|
import { ITranslator } from '@jupyterlab/translation';
|
|
4
4
|
/**
|
|
5
|
-
* A namespace for TrustedComponent
|
|
5
|
+
* A namespace for TrustedComponent static methods.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace TrustedComponent {
|
|
8
8
|
/**
|
package/lib/trusted.js
CHANGED
|
@@ -12,15 +12,17 @@ const isTrusted = (notebook) => {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
const cells = Array.from(model.cells);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
let total = 0;
|
|
16
|
+
let trusted = 0;
|
|
17
|
+
for (const currentCell of cells) {
|
|
18
|
+
if (currentCell.type !== 'code') {
|
|
19
|
+
continue;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
total++;
|
|
22
|
+
if (currentCell.trusted) {
|
|
23
|
+
trusted++;
|
|
21
24
|
}
|
|
22
|
-
}
|
|
23
|
-
const total = cells.length;
|
|
25
|
+
}
|
|
24
26
|
return trusted === total;
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
@@ -53,7 +55,7 @@ const TrustedButton = ({ notebook, translator, }) => {
|
|
|
53
55
|
: trans.__('JavaScript disabled for notebook display') }, trusted ? trans.__('Trusted') : trans.__('Not Trusted')));
|
|
54
56
|
};
|
|
55
57
|
/**
|
|
56
|
-
* A namespace for TrustedComponent
|
|
58
|
+
* A namespace for TrustedComponent static methods.
|
|
57
59
|
*/
|
|
58
60
|
export var TrustedComponent;
|
|
59
61
|
(function (TrustedComponent) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/notebook-extension",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5",
|
|
4
4
|
"description": "Jupyter Notebook - Notebook Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -38,16 +38,18 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyter-notebook/application": "^7.0.
|
|
42
|
-
"@jupyterlab/application": "^4.0.
|
|
43
|
-
"@jupyterlab/apputils": "^4.1.
|
|
44
|
-
"@jupyterlab/cells": "^4.0.
|
|
45
|
-
"@jupyterlab/docmanager": "^4.0.
|
|
46
|
-
"@jupyterlab/notebook": "^4.0.
|
|
47
|
-
"@jupyterlab/settingregistry": "^4.0.
|
|
48
|
-
"@jupyterlab/translation": "^4.0.
|
|
41
|
+
"@jupyter-notebook/application": "^7.0.5",
|
|
42
|
+
"@jupyterlab/application": "^4.0.7",
|
|
43
|
+
"@jupyterlab/apputils": "^4.1.7",
|
|
44
|
+
"@jupyterlab/cells": "^4.0.7",
|
|
45
|
+
"@jupyterlab/docmanager": "^4.0.7",
|
|
46
|
+
"@jupyterlab/notebook": "^4.0.7",
|
|
47
|
+
"@jupyterlab/settingregistry": "^4.0.7",
|
|
48
|
+
"@jupyterlab/translation": "^4.0.7",
|
|
49
49
|
"@lumino/polling": "^2.1.2",
|
|
50
|
-
"@lumino/widgets": "^2.3.0"
|
|
50
|
+
"@lumino/widgets": "^2.3.0",
|
|
51
|
+
"react": "^18.2.0",
|
|
52
|
+
"react-dom": "^18.2.0"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"rimraf": "^3.0.2",
|