@jupyterlab/apputils-extension 4.0.0-alpha.5 → 4.0.0-alpha.8

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.
@@ -13,9 +13,15 @@ export const settingsPlugin = {
13
13
  activate: async (app) => {
14
14
  const { isDisabled } = PageConfig.Extension;
15
15
  const connector = new SettingConnector(app.serviceManager.settings);
16
+ // On startup, check if a plugin is available in the application.
17
+ // This helps avoid loading plugin files from other lab-based applications
18
+ // that have placed their schemas next to the JupyterLab schemas. Different lab-based
19
+ // applications might not have the same set of plugins loaded on the page.
20
+ // As an example this helps prevent having new toolbar items added by another application
21
+ // appear in JupyterLab as a side-effect when they are defined via the settings system.
16
22
  const registry = new SettingRegistry({
17
23
  connector,
18
- plugins: (await connector.list('active')).values
24
+ plugins: (await connector.list('active')).values.filter(value => app.hasPlugin(value.id))
19
25
  });
20
26
  // If there are plugins that have schemas that are not in the setting
21
27
  // registry after the application has restored, try to load them manually
@@ -24,7 +30,7 @@ export const settingsPlugin = {
24
30
  void app.restored.then(async () => {
25
31
  const plugins = await connector.list('all');
26
32
  plugins.ids.forEach(async (id, index) => {
27
- if (isDisabled(id) || id in registry.plugins) {
33
+ if (!app.hasPlugin(id) || isDisabled(id) || id in registry.plugins) {
28
34
  return;
29
35
  }
30
36
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"settingsplugin.js","sourceRoot":"","sources":["../src/settingsplugin.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAM/E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4C;IACrE,EAAE,EAAE,yCAAyC;IAC7C,QAAQ,EAAE,KAAK,EAAE,GAAoB,EAA6B,EAAE;Q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AAQ,CAAC,OAAO,EAAE;oBAClE,OAAO;iBACR;gBAED,IAAI;oBACF,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;iBACzB;gBAAC,OAAO,KAAK,EAAE;oBACd,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;oBAC3D,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE;wBACzD,OAAO,CAAC,IAAI,CACV,6CAA6C,EAAE,IAAI;4BACjD,2DAA2D,CAC9D,CAAC;qBACH;iBACF;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,gBAAgB;CAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlab/apputils-extension",
3
- "version": "4.0.0-alpha.5",
3
+ "version": "4.0.0-alpha.8",
4
4
  "description": "JupyterLab - Application Utilities Extension",
5
5
  "homepage": "https://github.com/jupyterlab/jupyterlab",
6
6
  "bugs": {
@@ -37,18 +37,18 @@
37
37
  "watch": "tsc -b --watch"
38
38
  },
39
39
  "dependencies": {
40
- "@jupyterlab/application": "^4.0.0-alpha.5",
41
- "@jupyterlab/apputils": "^4.0.0-alpha.5",
42
- "@jupyterlab/coreutils": "^6.0.0-alpha.5",
43
- "@jupyterlab/docregistry": "^4.0.0-alpha.5",
44
- "@jupyterlab/filebrowser": "^4.0.0-alpha.5",
45
- "@jupyterlab/mainmenu": "^4.0.0-alpha.5",
46
- "@jupyterlab/services": "^7.0.0-alpha.5",
47
- "@jupyterlab/settingregistry": "^4.0.0-alpha.5",
48
- "@jupyterlab/statedb": "^4.0.0-alpha.5",
49
- "@jupyterlab/statusbar": "^4.0.0-alpha.5",
50
- "@jupyterlab/translation": "^4.0.0-alpha.5",
51
- "@jupyterlab/ui-components": "^4.0.0-alpha.20",
40
+ "@jupyterlab/application": "^4.0.0-alpha.8",
41
+ "@jupyterlab/apputils": "^4.0.0-alpha.8",
42
+ "@jupyterlab/coreutils": "^6.0.0-alpha.8",
43
+ "@jupyterlab/docregistry": "^4.0.0-alpha.8",
44
+ "@jupyterlab/filebrowser": "^4.0.0-alpha.8",
45
+ "@jupyterlab/mainmenu": "^4.0.0-alpha.8",
46
+ "@jupyterlab/services": "^7.0.0-alpha.8",
47
+ "@jupyterlab/settingregistry": "^4.0.0-alpha.8",
48
+ "@jupyterlab/statedb": "^4.0.0-alpha.8",
49
+ "@jupyterlab/statusbar": "^4.0.0-alpha.8",
50
+ "@jupyterlab/translation": "^4.0.0-alpha.8",
51
+ "@jupyterlab/ui-components": "^4.0.0-alpha.23",
52
52
  "@lumino/algorithm": "^1.9.1",
53
53
  "@lumino/commands": "^1.20.0",
54
54
  "@lumino/coreutils": "^1.12.0",