@jupyterlab/settingeditor 4.0.0-alpha.2 → 4.0.0-alpha.20
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/SettingsFormEditor.d.ts +101 -0
- package/lib/SettingsFormEditor.js +151 -0
- package/lib/SettingsFormEditor.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/inspector.js +24 -30
- package/lib/inspector.js.map +1 -1
- package/lib/{settingeditor.d.ts → jsonsettingeditor.d.ts} +5 -6
- package/lib/{settingeditor.js → jsonsettingeditor.js} +25 -43
- package/lib/jsonsettingeditor.js.map +1 -0
- package/lib/plugineditor.d.ts +3 -3
- package/lib/plugineditor.js +2 -6
- package/lib/plugineditor.js.map +1 -1
- package/lib/pluginlist.d.ts +58 -22
- package/lib/pluginlist.js +246 -109
- package/lib/pluginlist.js.map +1 -1
- package/lib/raweditor.d.ts +2 -6
- package/lib/raweditor.js +22 -33
- package/lib/raweditor.js.map +1 -1
- package/lib/settingseditor.d.ts +81 -0
- package/lib/settingseditor.js +121 -0
- package/lib/settingseditor.js.map +1 -0
- package/lib/settingspanel.d.ts +54 -0
- package/lib/settingspanel.js +102 -0
- package/lib/settingspanel.js.map +1 -0
- package/lib/tokens.d.ts +12 -2
- package/lib/tokens.js +4 -1
- package/lib/tokens.js.map +1 -1
- package/package.json +28 -21
- package/src/SettingsFormEditor.tsx +306 -0
- package/src/index.ts +10 -0
- package/src/inspector.ts +144 -0
- package/src/jsonsettingeditor.tsx +482 -0
- package/src/plugineditor.ts +257 -0
- package/src/pluginlist.tsx +538 -0
- package/src/raweditor.ts +422 -0
- package/src/settingseditor.tsx +210 -0
- package/src/settingspanel.tsx +218 -0
- package/src/tokens.ts +33 -0
- package/style/base.css +213 -89
- package/style/index.css +1 -0
- package/style/index.js +1 -0
- package/lib/settingeditor.js.map +0 -1
- package/lib/splitpanel.d.ts +0 -13
- package/lib/splitpanel.js +0 -26
- package/lib/splitpanel.js.map +0 -1
package/lib/raweditor.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ITranslator } from '@jupyterlab/translation';
|
|
|
5
5
|
import { CommandRegistry } from '@lumino/commands';
|
|
6
6
|
import { Message } from '@lumino/messaging';
|
|
7
7
|
import { ISignal } from '@lumino/signaling';
|
|
8
|
-
import { SplitPanel } from '
|
|
8
|
+
import { SplitPanel } from '@lumino/widgets';
|
|
9
9
|
/**
|
|
10
10
|
* A raw JSON settings editor.
|
|
11
11
|
*/
|
|
@@ -64,10 +64,6 @@ export declare class RawEditor extends SplitPanel {
|
|
|
64
64
|
* Handle `after-attach` messages.
|
|
65
65
|
*/
|
|
66
66
|
protected onAfterAttach(msg: Message): void;
|
|
67
|
-
/**
|
|
68
|
-
* Handle `'update-request'` messages.
|
|
69
|
-
*/
|
|
70
|
-
protected onUpdateRequest(msg: Message): void;
|
|
71
67
|
/**
|
|
72
68
|
* Handle text changes in the underlying editor.
|
|
73
69
|
*/
|
|
@@ -125,7 +121,7 @@ export declare namespace RawEditor {
|
|
|
125
121
|
/**
|
|
126
122
|
* A function the raw editor calls on save errors.
|
|
127
123
|
*/
|
|
128
|
-
onSaveError: (reason: any) => void;
|
|
124
|
+
onSaveError: (reason: any, translator?: ITranslator) => void;
|
|
129
125
|
/**
|
|
130
126
|
* The setting registry used by the editor.
|
|
131
127
|
*/
|
package/lib/raweditor.js
CHANGED
|
@@ -4,9 +4,8 @@ import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor';
|
|
|
4
4
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
5
5
|
import { CommandToolbarButton, Toolbar } from '@jupyterlab/ui-components';
|
|
6
6
|
import { Signal } from '@lumino/signaling';
|
|
7
|
-
import { BoxLayout, Widget } from '@lumino/widgets';
|
|
7
|
+
import { BoxLayout, SplitPanel, Widget } from '@lumino/widgets';
|
|
8
8
|
import { createInspector } from './inspector';
|
|
9
|
-
import { SplitPanel } from './splitpanel';
|
|
10
9
|
/**
|
|
11
10
|
* A class name added to all raw editors.
|
|
12
11
|
*/
|
|
@@ -43,25 +42,25 @@ export class RawEditor extends SplitPanel {
|
|
|
43
42
|
this._commands = commands;
|
|
44
43
|
// Create read-only defaults editor.
|
|
45
44
|
const defaults = (this._defaults = new CodeEditorWrapper({
|
|
46
|
-
|
|
45
|
+
editorOptions: {
|
|
46
|
+
config: { readOnly: true }
|
|
47
|
+
},
|
|
48
|
+
model: new CodeEditor.Model({ mimeType: 'text/javascript' }),
|
|
47
49
|
factory: editorFactory
|
|
48
50
|
}));
|
|
49
|
-
defaults.editor.model.value.text = '';
|
|
50
|
-
defaults.editor.model.mimeType = 'text/javascript';
|
|
51
|
-
defaults.editor.setOption('readOnly', true);
|
|
52
51
|
// Create read-write user settings editor.
|
|
53
52
|
const user = (this._user = new CodeEditorWrapper({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
editorOptions: {
|
|
54
|
+
config: { lineNumbers: true }
|
|
55
|
+
},
|
|
56
|
+
model: new CodeEditor.Model({ mimeType: 'text/javascript' }),
|
|
57
|
+
factory: editorFactory
|
|
57
58
|
}));
|
|
58
59
|
user.addClass(USER_CLASS);
|
|
59
|
-
user.editor.model.
|
|
60
|
-
user.editor.model.value.changed.connect(this._onTextChanged, this);
|
|
60
|
+
user.editor.model.sharedModel.changed.connect(this._onTextChanged, this);
|
|
61
61
|
// Create and set up an inspector.
|
|
62
62
|
this._inspector = createInspector(this, options.rendermime, this.translator);
|
|
63
63
|
this.addClass(RAW_EDITOR_CLASS);
|
|
64
|
-
// FIXME-TRANS: onSaveError must have an optional translator?
|
|
65
64
|
this._onSaveError = options.onSaveError;
|
|
66
65
|
this.addWidget(Private.defaultsEditor(defaults, this.translator));
|
|
67
66
|
this.addWidget(Private.userEditor(user, this._toolbar, this._inspector, this.translator));
|
|
@@ -89,7 +88,7 @@ export class RawEditor extends SplitPanel {
|
|
|
89
88
|
*/
|
|
90
89
|
get isDirty() {
|
|
91
90
|
var _a, _b;
|
|
92
|
-
return (_b = this._user.editor.model.
|
|
91
|
+
return ((_b = this._user.editor.model.sharedModel.getSource() !== ((_a = this._settings) === null || _a === void 0 ? void 0 : _a.raw)) !== null && _b !== void 0 ? _b : '');
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* The plugin settings being edited.
|
|
@@ -118,8 +117,8 @@ export class RawEditor extends SplitPanel {
|
|
|
118
117
|
}
|
|
119
118
|
else {
|
|
120
119
|
this._settings = null;
|
|
121
|
-
defaults.editor.model.
|
|
122
|
-
user.editor.model.
|
|
120
|
+
defaults.editor.model.sharedModel.setSource('');
|
|
121
|
+
user.editor.model.sharedModel.setSource('');
|
|
123
122
|
}
|
|
124
123
|
this.update();
|
|
125
124
|
}
|
|
@@ -145,16 +144,18 @@ export class RawEditor extends SplitPanel {
|
|
|
145
144
|
if (this.isDisposed) {
|
|
146
145
|
return;
|
|
147
146
|
}
|
|
148
|
-
|
|
147
|
+
this._defaults.model.dispose();
|
|
149
148
|
this._defaults.dispose();
|
|
149
|
+
this._user.model.dispose();
|
|
150
150
|
this._user.dispose();
|
|
151
|
+
super.dispose();
|
|
151
152
|
}
|
|
152
153
|
/**
|
|
153
154
|
* Revert the editor back to original settings.
|
|
154
155
|
*/
|
|
155
156
|
revert() {
|
|
156
157
|
var _a, _b;
|
|
157
|
-
this._user.editor.model.
|
|
158
|
+
this._user.editor.model.sharedModel.setSource((_b = (_a = this.settings) === null || _a === void 0 ? void 0 : _a.raw) !== null && _b !== void 0 ? _b : '');
|
|
158
159
|
this._updateToolbar(false, false);
|
|
159
160
|
}
|
|
160
161
|
/**
|
|
@@ -165,7 +166,7 @@ export class RawEditor extends SplitPanel {
|
|
|
165
166
|
return Promise.resolve(undefined);
|
|
166
167
|
}
|
|
167
168
|
const settings = this._settings;
|
|
168
|
-
const source = this._user.editor.model.
|
|
169
|
+
const source = this._user.editor.model.sharedModel.getSource();
|
|
169
170
|
return settings
|
|
170
171
|
.save(source)
|
|
171
172
|
.then(() => {
|
|
@@ -183,23 +184,11 @@ export class RawEditor extends SplitPanel {
|
|
|
183
184
|
Private.populateToolbar(this._commands, this._toolbar);
|
|
184
185
|
this.update();
|
|
185
186
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Handle `'update-request'` messages.
|
|
188
|
-
*/
|
|
189
|
-
onUpdateRequest(msg) {
|
|
190
|
-
const settings = this._settings;
|
|
191
|
-
const defaults = this._defaults;
|
|
192
|
-
const user = this._user;
|
|
193
|
-
if (settings) {
|
|
194
|
-
defaults.editor.refresh();
|
|
195
|
-
user.editor.refresh();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
187
|
/**
|
|
199
188
|
* Handle text changes in the underlying editor.
|
|
200
189
|
*/
|
|
201
190
|
_onTextChanged() {
|
|
202
|
-
const raw = this._user.editor.model.
|
|
191
|
+
const raw = this._user.editor.model.sharedModel.getSource();
|
|
203
192
|
const settings = this._settings;
|
|
204
193
|
this.removeClass(ERROR_CLASS);
|
|
205
194
|
// If there are no settings loaded or there are no changes, bail.
|
|
@@ -223,8 +212,8 @@ export class RawEditor extends SplitPanel {
|
|
|
223
212
|
const settings = this._settings;
|
|
224
213
|
const defaults = this._defaults;
|
|
225
214
|
const user = this._user;
|
|
226
|
-
defaults.editor.model.
|
|
227
|
-
user.editor.model.
|
|
215
|
+
defaults.editor.model.sharedModel.setSource((_a = settings === null || settings === void 0 ? void 0 : settings.annotatedDefaults()) !== null && _a !== void 0 ? _a : '');
|
|
216
|
+
user.editor.model.sharedModel.setSource((_b = settings === null || settings === void 0 ? void 0 : settings.raw) !== null && _b !== void 0 ? _b : '');
|
|
228
217
|
}
|
|
229
218
|
_updateToolbar(revert = this._canRevert, save = this._canSave) {
|
|
230
219
|
const commands = this._commands;
|
package/lib/raweditor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raweditor.js","sourceRoot":"","sources":["../src/raweditor.ts"],"names":[],"mappings":"A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AoEhB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ILabStatus } from '@jupyterlab/application';
|
|
2
|
+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
3
|
+
import { IStateDB } from '@jupyterlab/statedb';
|
|
4
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
5
|
+
import { IFormRendererRegistry } from '@jupyterlab/ui-components';
|
|
6
|
+
import { CommandRegistry } from '@lumino/commands';
|
|
7
|
+
import { Message } from '@lumino/messaging';
|
|
8
|
+
import { ISignal } from '@lumino/signaling';
|
|
9
|
+
import { SplitPanel } from '@lumino/widgets';
|
|
10
|
+
/**
|
|
11
|
+
* Form based interface for editing settings.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SettingsEditor extends SplitPanel {
|
|
14
|
+
constructor(options: SettingsEditor.IOptions);
|
|
15
|
+
/**
|
|
16
|
+
* A signal emitted on the start and end of a saving operation.
|
|
17
|
+
*/
|
|
18
|
+
get saveStateChanged(): ISignal<this, SettingsEditor.SaveState>;
|
|
19
|
+
/**
|
|
20
|
+
* Set the dirty state status
|
|
21
|
+
*
|
|
22
|
+
* @param dirty New status
|
|
23
|
+
*/
|
|
24
|
+
setDirtyState(dirty: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* A message handler invoked on a `'close-request'` message.
|
|
27
|
+
*
|
|
28
|
+
* @param msg Widget message
|
|
29
|
+
*/
|
|
30
|
+
protected onCloseRequest(msg: Message): void;
|
|
31
|
+
protected translator: ITranslator;
|
|
32
|
+
private _clearDirty;
|
|
33
|
+
private _status;
|
|
34
|
+
private _dirty;
|
|
35
|
+
private _list;
|
|
36
|
+
private _saveStateChange;
|
|
37
|
+
}
|
|
38
|
+
export declare namespace SettingsEditor {
|
|
39
|
+
/**
|
|
40
|
+
* Settings editor save state
|
|
41
|
+
*/
|
|
42
|
+
type SaveState = 'started' | 'failed' | 'completed';
|
|
43
|
+
/**
|
|
44
|
+
* Settings editor options
|
|
45
|
+
*/
|
|
46
|
+
interface IOptions {
|
|
47
|
+
/**
|
|
48
|
+
* Form component registry
|
|
49
|
+
*/
|
|
50
|
+
editorRegistry: IFormRendererRegistry;
|
|
51
|
+
/**
|
|
52
|
+
* The state database key for the editor's state management.
|
|
53
|
+
*/
|
|
54
|
+
key: string;
|
|
55
|
+
/**
|
|
56
|
+
* The setting registry the editor modifies.
|
|
57
|
+
*/
|
|
58
|
+
registry: ISettingRegistry;
|
|
59
|
+
/**
|
|
60
|
+
* The state database used to store layout.
|
|
61
|
+
*/
|
|
62
|
+
state: IStateDB;
|
|
63
|
+
/**
|
|
64
|
+
* Command registry used to open the JSON settings editor.
|
|
65
|
+
*/
|
|
66
|
+
commands: CommandRegistry;
|
|
67
|
+
/**
|
|
68
|
+
* Application status
|
|
69
|
+
*/
|
|
70
|
+
status: ILabStatus;
|
|
71
|
+
/**
|
|
72
|
+
* List of plugins to skip
|
|
73
|
+
*/
|
|
74
|
+
toSkip?: string[];
|
|
75
|
+
/**
|
|
76
|
+
* The application language translator.
|
|
77
|
+
*/
|
|
78
|
+
translator?: ITranslator;
|
|
79
|
+
query?: string;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Jupyter Development Team.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { showDialog } from '@jupyterlab/apputils';
|
|
6
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
7
|
+
import { ReactWidget } from '@jupyterlab/ui-components';
|
|
8
|
+
import { Signal } from '@lumino/signaling';
|
|
9
|
+
import { SplitPanel } from '@lumino/widgets';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { PluginList } from './pluginlist';
|
|
12
|
+
import { SettingsPanel } from './settingspanel';
|
|
13
|
+
/**
|
|
14
|
+
* Form based interface for editing settings.
|
|
15
|
+
*/
|
|
16
|
+
export class SettingsEditor extends SplitPanel {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
super({
|
|
19
|
+
orientation: 'horizontal',
|
|
20
|
+
renderer: SplitPanel.defaultRenderer,
|
|
21
|
+
spacing: 1
|
|
22
|
+
});
|
|
23
|
+
this._clearDirty = null;
|
|
24
|
+
this._dirty = false;
|
|
25
|
+
this._saveStateChange = new Signal(this);
|
|
26
|
+
this.translator = options.translator || nullTranslator;
|
|
27
|
+
this._status = options.status;
|
|
28
|
+
const list = (this._list = new PluginList({
|
|
29
|
+
registry: options.registry,
|
|
30
|
+
toSkip: options.toSkip,
|
|
31
|
+
translator: this.translator,
|
|
32
|
+
query: options.query
|
|
33
|
+
}));
|
|
34
|
+
this.addWidget(list);
|
|
35
|
+
this.setDirtyState = this.setDirtyState.bind(this);
|
|
36
|
+
/**
|
|
37
|
+
* Initializes the settings panel after loading the schema for all plugins.
|
|
38
|
+
*/
|
|
39
|
+
void Promise.all(PluginList.sortPlugins(options.registry)
|
|
40
|
+
.filter(plugin => {
|
|
41
|
+
const { schema } = plugin;
|
|
42
|
+
const deprecated = schema['jupyter.lab.setting-deprecated'] === true;
|
|
43
|
+
const editable = Object.keys(schema.properties || {}).length > 0;
|
|
44
|
+
const extensible = schema.additionalProperties !== false;
|
|
45
|
+
return !deprecated && (editable || extensible);
|
|
46
|
+
})
|
|
47
|
+
.map(async (plugin) => await options.registry.load(plugin.id)))
|
|
48
|
+
.then(settings => {
|
|
49
|
+
const settingsPanel = ReactWidget.create(React.createElement(SettingsPanel, { settings: settings.filter(pluginSettings => { var _a; return !((_a = options.toSkip) !== null && _a !== void 0 ? _a : []).includes(pluginSettings.id); }), editorRegistry: options.editorRegistry, handleSelectSignal: this._list.handleSelectSignal, onSelect: (id) => (this._list.selection = id), hasError: this._list.setError, updateFilterSignal: this._list.updateFilterSignal, updateDirtyState: this.setDirtyState, translator: this.translator, initialFilter: this._list.filter }));
|
|
50
|
+
this.addWidget(settingsPanel);
|
|
51
|
+
})
|
|
52
|
+
.catch(reason => {
|
|
53
|
+
console.error(`Fail to load the setting plugins:\n${reason}`);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A signal emitted on the start and end of a saving operation.
|
|
58
|
+
*/
|
|
59
|
+
get saveStateChanged() {
|
|
60
|
+
return this._saveStateChange;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Set the dirty state status
|
|
64
|
+
*
|
|
65
|
+
* @param dirty New status
|
|
66
|
+
*/
|
|
67
|
+
setDirtyState(dirty) {
|
|
68
|
+
this._dirty = dirty;
|
|
69
|
+
if (this._dirty && !this._clearDirty) {
|
|
70
|
+
this._clearDirty = this._status.setDirty();
|
|
71
|
+
}
|
|
72
|
+
else if (!this._dirty && this._clearDirty) {
|
|
73
|
+
this._clearDirty.dispose();
|
|
74
|
+
this._clearDirty = null;
|
|
75
|
+
}
|
|
76
|
+
if (dirty) {
|
|
77
|
+
if (!this.title.className.includes('jp-mod-dirty')) {
|
|
78
|
+
this.title.className += ' jp-mod-dirty';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.title.className = this.title.className.replace('jp-mod-dirty', '');
|
|
83
|
+
}
|
|
84
|
+
this._saveStateChange.emit(dirty ? 'started' : 'completed');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A message handler invoked on a `'close-request'` message.
|
|
88
|
+
*
|
|
89
|
+
* @param msg Widget message
|
|
90
|
+
*/
|
|
91
|
+
onCloseRequest(msg) {
|
|
92
|
+
const trans = this.translator.load('jupyterlab');
|
|
93
|
+
if (this._list.hasErrors) {
|
|
94
|
+
void showDialog({
|
|
95
|
+
title: trans.__('Warning'),
|
|
96
|
+
body: trans.__('Unsaved changes due to validation error. Continue without saving?')
|
|
97
|
+
}).then(value => {
|
|
98
|
+
if (value.button.accept) {
|
|
99
|
+
this.dispose();
|
|
100
|
+
super.onCloseRequest(msg);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
else if (this._dirty) {
|
|
105
|
+
void showDialog({
|
|
106
|
+
title: trans.__('Warning'),
|
|
107
|
+
body: trans.__('Some changes have not been saved. Continue without saving?')
|
|
108
|
+
}).then(value => {
|
|
109
|
+
if (value.button.accept) {
|
|
110
|
+
this.dispose();
|
|
111
|
+
super.onCloseRequest(msg);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.dispose();
|
|
117
|
+
super.onCloseRequest(msg);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=settingseditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingseditor.js","sourceRoot":"","sources":["../src/settingseditor.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAyB,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAI/E,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,YAAY,OAAgC;QAC1C,KAAK,CAAC;YACJ,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,UAAU,CAAC,eAAe;YACpC,OAAO,EAAE,CAAC;SACX,CAAC,CAAC;QAyHG,gBAAW,GAAuB,IAAI,CAAC;QAEvC,WAAM,GAAY,KAAK,CAAC;QAExB,qBAAgB,GAAG,IAAI,MAAM,CAAiC,IAAI,CAAC,CAAC;QA5H1E,IAAI,CAA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ACd,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;oBACvB,IAAI,CAAC,OAAO,EAAE,CAAC;oBACf,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;CAQF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ISettingRegistry, Settings } from '@jupyterlab/settingregistry';
|
|
2
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
+
import { IFormRendererRegistry } from '@jupyterlab/ui-components';
|
|
4
|
+
import { ISignal } from '@lumino/signaling';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { PluginList } from './pluginlist';
|
|
7
|
+
export interface ISettingsPanelProps {
|
|
8
|
+
/**
|
|
9
|
+
* List of Settings objects that provide schema and values
|
|
10
|
+
* of plugins.
|
|
11
|
+
*/
|
|
12
|
+
settings: Settings[];
|
|
13
|
+
/**
|
|
14
|
+
* Form component registry that provides renderers
|
|
15
|
+
* for the form editor.
|
|
16
|
+
*/
|
|
17
|
+
editorRegistry: IFormRendererRegistry;
|
|
18
|
+
/**
|
|
19
|
+
* Handler for when selection change is triggered by scrolling
|
|
20
|
+
* in the SettingsPanel.
|
|
21
|
+
*/
|
|
22
|
+
onSelect: (id: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Signal that fires when a selection is made in the plugin list.
|
|
25
|
+
*/
|
|
26
|
+
handleSelectSignal: ISignal<PluginList, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Translator object
|
|
29
|
+
*/
|
|
30
|
+
translator: ITranslator;
|
|
31
|
+
/**
|
|
32
|
+
* Callback to update the plugin list to display plugins with
|
|
33
|
+
* invalid / unsaved settings in red.
|
|
34
|
+
*/
|
|
35
|
+
hasError: (id: string, error: boolean) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Sends the updated dirty state to the parent class.
|
|
38
|
+
*/
|
|
39
|
+
updateDirtyState: (dirty: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Signal that sends updated filter when search value changes.
|
|
42
|
+
*/
|
|
43
|
+
updateFilterSignal: ISignal<PluginList, (plugin: ISettingRegistry.IPlugin) => string[] | null>;
|
|
44
|
+
/**
|
|
45
|
+
* If the settings editor is created with an initial search query, an initial
|
|
46
|
+
* filter function is passed to the settings panel.
|
|
47
|
+
*/
|
|
48
|
+
initialFilter: (item: ISettingRegistry.IPlugin) => string[] | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* React component that displays a list of SettingsFormEditor
|
|
52
|
+
* components.
|
|
53
|
+
*/
|
|
54
|
+
export declare const SettingsPanel: React.FC<ISettingsPanelProps>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
|
+
import { SettingsFormEditor } from './SettingsFormEditor';
|
|
7
|
+
/**
|
|
8
|
+
* React component that displays a list of SettingsFormEditor
|
|
9
|
+
* components.
|
|
10
|
+
*/
|
|
11
|
+
export const SettingsPanel = ({ settings, editorRegistry, onSelect, handleSelectSignal, hasError, updateDirtyState, updateFilterSignal, translator, initialFilter }) => {
|
|
12
|
+
const [expandedPlugin, setExpandedPlugin] = useState(null);
|
|
13
|
+
const [filterPlugin, setFilter] = useState(() => initialFilter);
|
|
14
|
+
// Refs used to keep track of "selected" plugin based on scroll location
|
|
15
|
+
const editorRefs = {};
|
|
16
|
+
for (const setting of settings) {
|
|
17
|
+
editorRefs[setting.id] = React.useRef(null);
|
|
18
|
+
}
|
|
19
|
+
const wrapperRef = React.useRef(null);
|
|
20
|
+
const editorDirtyStates = React.useRef({});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
var _a;
|
|
23
|
+
const onFilterUpdate = (list, newFilter) => {
|
|
24
|
+
setFilter(() => newFilter);
|
|
25
|
+
for (const pluginSettings of settings) {
|
|
26
|
+
const filtered = newFilter(pluginSettings.plugin);
|
|
27
|
+
if (filtered === null || filtered.length > 0) {
|
|
28
|
+
setExpandedPlugin(pluginSettings.id);
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
// Set first visible plugin as expanded plugin on initial load.
|
|
34
|
+
for (const pluginSettings of settings) {
|
|
35
|
+
const filtered = filterPlugin(pluginSettings.plugin);
|
|
36
|
+
if (filtered === null || filtered.length > 0) {
|
|
37
|
+
setExpandedPlugin(pluginSettings.id);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// When filter updates, only show plugins that match search.
|
|
42
|
+
updateFilterSignal.connect(onFilterUpdate);
|
|
43
|
+
const onSelectChange = (list, pluginId) => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
setExpandedPlugin(expandedPlugin !== pluginId ? pluginId : null);
|
|
46
|
+
// Scroll to the plugin when a selection is made in the left panel.
|
|
47
|
+
(_b = (_a = editorRefs[pluginId]) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.scrollIntoView(true);
|
|
48
|
+
};
|
|
49
|
+
(_a = handleSelectSignal === null || handleSelectSignal === void 0 ? void 0 : handleSelectSignal.connect) === null || _a === void 0 ? void 0 : _a.call(handleSelectSignal, onSelectChange);
|
|
50
|
+
return () => {
|
|
51
|
+
var _a;
|
|
52
|
+
updateFilterSignal.disconnect(onFilterUpdate);
|
|
53
|
+
(_a = handleSelectSignal === null || handleSelectSignal === void 0 ? void 0 : handleSelectSignal.disconnect) === null || _a === void 0 ? void 0 : _a.call(handleSelectSignal, onSelectChange);
|
|
54
|
+
};
|
|
55
|
+
}, []);
|
|
56
|
+
const updateDirtyStates = React.useCallback((id, dirty) => {
|
|
57
|
+
if (editorDirtyStates.current) {
|
|
58
|
+
editorDirtyStates.current[id] = dirty;
|
|
59
|
+
for (const editor in editorDirtyStates.current) {
|
|
60
|
+
if (editorDirtyStates.current[editor]) {
|
|
61
|
+
updateDirtyState(true);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
updateDirtyState(false);
|
|
67
|
+
}, [editorDirtyStates, updateDirtyState]);
|
|
68
|
+
const renderers = React.useMemo(() => Object.entries(editorRegistry.renderers).reduce((agg, [id, renderer]) => {
|
|
69
|
+
const splitPosition = id.lastIndexOf('.');
|
|
70
|
+
const pluginId = id.substring(0, splitPosition);
|
|
71
|
+
const propertyName = id.substring(splitPosition + 1);
|
|
72
|
+
if (!agg[pluginId]) {
|
|
73
|
+
agg[pluginId] = {};
|
|
74
|
+
}
|
|
75
|
+
if (!agg[pluginId][propertyName] && renderer.fieldRenderer) {
|
|
76
|
+
agg[pluginId][propertyName] = renderer.fieldRenderer;
|
|
77
|
+
}
|
|
78
|
+
return agg;
|
|
79
|
+
}, {}), [editorRegistry]);
|
|
80
|
+
return (React.createElement("div", { className: "jp-SettingsPanel", ref: wrapperRef }, settings.map(pluginSettings => {
|
|
81
|
+
// Pass filtered results to SettingsFormEditor to only display filtered fields.
|
|
82
|
+
const filtered = filterPlugin(pluginSettings.plugin);
|
|
83
|
+
// If filtered results are an array, only show if the array is non-empty.
|
|
84
|
+
if (filtered !== null && filtered.length === 0) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
return (React.createElement("div", { ref: editorRefs[pluginSettings.id], className: "jp-SettingsForm", key: `${pluginSettings.id}SettingsEditor` },
|
|
88
|
+
React.createElement(SettingsFormEditor, { isCollapsed: pluginSettings.id !== expandedPlugin, onCollapseChange: (willCollapse) => {
|
|
89
|
+
if (!willCollapse) {
|
|
90
|
+
setExpandedPlugin(pluginSettings.id);
|
|
91
|
+
}
|
|
92
|
+
else if (pluginSettings.id === expandedPlugin) {
|
|
93
|
+
setExpandedPlugin(null);
|
|
94
|
+
}
|
|
95
|
+
}, filteredValues: filtered, settings: pluginSettings, renderers: renderers, hasError: (error) => {
|
|
96
|
+
hasError(pluginSettings.id, error);
|
|
97
|
+
}, updateDirtyState: (dirty) => {
|
|
98
|
+
updateDirtyStates(pluginSettings.id, dirty);
|
|
99
|
+
}, onSelect: onSelect, translator: translator })));
|
|
100
|
+
})));
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=settingspanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingspanel.js","sourceRoot":"","sources":["../src/settingspanel.tsx"],"names":[],"mappings":"AAAA;;;+EAG+E;AAO/E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAyD1D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,CAAC,EAC3D,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,aAAa,EACO,EAAe,EAAE;IACrC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC1E,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,QAAQ,CAExC,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC;IAEvB,wEAAwE;IACxE,MAAM,UAAU,GAEZ,EAAE,CAAC;IACP,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC7C;IACD,MAAM,UAAU,GAAoC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvE,MAA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,EAAE,CAAC,KAAc,EAAE,EAAE;oBACnC,iBAAiB,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBAC9C,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACtB,CACE,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { IWidgetTracker, MainAreaWidget } from '@jupyterlab/apputils';
|
|
2
2
|
import { Token } from '@lumino/coreutils';
|
|
3
|
-
import {
|
|
3
|
+
import { JsonSettingEditor as JSONSettingEditor } from './jsonsettingeditor';
|
|
4
|
+
import { SettingsEditor } from './settingseditor';
|
|
4
5
|
/**
|
|
5
6
|
* The setting editor tracker token.
|
|
6
7
|
*/
|
|
7
8
|
export declare const ISettingEditorTracker: Token<ISettingEditorTracker>;
|
|
9
|
+
/**
|
|
10
|
+
* The setting editor tracker token.
|
|
11
|
+
*/
|
|
12
|
+
export declare const IJSONSettingEditorTracker: Token<IJSONSettingEditorTracker>;
|
|
13
|
+
/**
|
|
14
|
+
* A class that tracks the setting editor.
|
|
15
|
+
*/
|
|
16
|
+
export interface IJSONSettingEditorTracker extends IWidgetTracker<MainAreaWidget<JSONSettingEditor>> {
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* A class that tracks the setting editor.
|
|
10
20
|
*/
|
|
11
|
-
export interface ISettingEditorTracker extends IWidgetTracker<MainAreaWidget<
|
|
21
|
+
export interface ISettingEditorTracker extends IWidgetTracker<MainAreaWidget<SettingsEditor>> {
|
|
12
22
|
}
|
package/lib/tokens.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { Token } from '@lumino/coreutils';
|
|
4
|
-
/* tslint:disable */
|
|
5
4
|
/**
|
|
6
5
|
* The setting editor tracker token.
|
|
7
6
|
*/
|
|
8
7
|
export const ISettingEditorTracker = new Token('@jupyterlab/settingeditor:ISettingEditorTracker');
|
|
8
|
+
/**
|
|
9
|
+
* The setting editor tracker token.
|
|
10
|
+
*/
|
|
11
|
+
export const IJSONSettingEditorTracker = new Token('@jupyterlab/settingeditor:IJSONSettingEditorTracker');
|
|
9
12
|
//# sourceMappingURL=tokens.js.map
|
package/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,KAAK,CAC5C,iDAAiD,CAClD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,KAAK,CAChD,qDAAqD,CACtD,CAAC"}
|