@jupyterlab/ui-components 4.0.0-alpha.32 → 4.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/FormRendererRegistry.d.ts +29 -0
- package/lib/FormRendererRegistry.js +51 -0
- package/lib/FormRendererRegistry.js.map +1 -0
- package/lib/components/form.d.ts +107 -0
- package/lib/components/form.js +238 -0
- package/lib/components/form.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/menu.js +1 -1
- package/lib/components/menu.js.map +1 -1
- package/lib/components/toolbar.d.ts +3 -3
- package/lib/components/toolbar.js +6 -3
- package/lib/components/toolbar.js.map +1 -1
- package/lib/components/vdom.d.ts +6 -4
- package/lib/components/vdom.js +27 -10
- package/lib/components/vdom.js.map +1 -1
- package/lib/hoverbox.d.ts +8 -0
- package/lib/hoverbox.js +39 -22
- package/lib/hoverbox.js.map +1 -1
- package/lib/icon/iconimports.d.ts +1 -0
- package/lib/icon/iconimports.js +2 -0
- package/lib/icon/iconimports.js.map +1 -1
- package/lib/icon/labicon.js +14 -3
- package/lib/icon/labicon.js.map +1 -1
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -3
- package/lib/index.js.map +1 -1
- package/lib/style/icon.js +0 -29
- package/lib/style/icon.js.map +1 -1
- package/lib/tokens.d.ts +45 -0
- package/lib/tokens.js +4 -0
- package/lib/tokens.js.map +1 -1
- package/package.json +10 -10
- package/style/deprecated.css +5 -0
- package/style/hoverbox.css +0 -4
- package/style/icons/search/word.svg +10 -0
- package/style/icons.css +6 -3
- package/style/rjsfTemplates.css +1 -1
- package/lib/FormComponentRegistry.d.ts +0 -56
- package/lib/FormComponentRegistry.js +0 -44
- package/lib/FormComponentRegistry.js.map +0 -1
- package/lib/FormWidgetRegistry.d.ts +0 -59
- package/lib/FormWidgetRegistry.js +0 -47
- package/lib/FormWidgetRegistry.js.map +0 -1
- package/lib/rjsfTemplates.d.ts +0 -197
- package/lib/rjsfTemplates.js +0 -269
- package/lib/rjsfTemplates.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,4 @@ export * from './icon';
|
|
|
7
7
|
export * from './hoverbox';
|
|
8
8
|
export * from './tokens';
|
|
9
9
|
export * from './utils';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './FormWidgetRegistry';
|
|
12
|
-
export * from './rjsfTemplates';
|
|
10
|
+
export * from './FormRendererRegistry';
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,5 @@ export * from './icon';
|
|
|
9
9
|
export * from './hoverbox';
|
|
10
10
|
export * from './tokens';
|
|
11
11
|
export * from './utils';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './FormWidgetRegistry';
|
|
14
|
-
export * from './rjsfTemplates';
|
|
12
|
+
export * from './FormRendererRegistry';
|
|
15
13
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAC3D;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAC3D;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
|
package/lib/style/icon.js
CHANGED
|
@@ -195,35 +195,6 @@ export var LabIconStyle;
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
sideBar: {
|
|
198
|
-
container: {
|
|
199
|
-
// `&` will be substituted for the generated classname (interpolation)
|
|
200
|
-
$nest: {
|
|
201
|
-
// left sidebar tab divs
|
|
202
|
-
'.jp-SideBar.jp-mod-left .lm-TabBar-tab &': {
|
|
203
|
-
transform: 'rotate(90deg)'
|
|
204
|
-
},
|
|
205
|
-
// left sidebar currently selected tab div
|
|
206
|
-
'.jp-SideBar.jp-mod-left .lm-TabBar-tab.lm-mod-current &': {
|
|
207
|
-
transform: 'rotate(90deg)\n' +
|
|
208
|
-
' translate(\n' +
|
|
209
|
-
' calc(-0.5 * var(--jp-border-width)),\n' +
|
|
210
|
-
' calc(-0.5 * var(--jp-border-width))\n' +
|
|
211
|
-
' )'
|
|
212
|
-
},
|
|
213
|
-
// right sidebar tab divs
|
|
214
|
-
'.jp-SideBar.jp-mod-right .lm-TabBar-tab &': {
|
|
215
|
-
transform: 'rotate(-90deg)'
|
|
216
|
-
},
|
|
217
|
-
// right sidebar currently selected tab div
|
|
218
|
-
'.jp-SideBar.jp-mod-right .lm-TabBar-tab.lm-mod-current &': {
|
|
219
|
-
transform: 'rotate(-90deg)\n' +
|
|
220
|
-
' translate(\n' +
|
|
221
|
-
' calc(0.5 * var(--jp-border-width)),\n' +
|
|
222
|
-
' calc(-0.5 * var(--jp-border-width))\n' +
|
|
223
|
-
' )'
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
198
|
element: {
|
|
228
199
|
height: 'auto',
|
|
229
200
|
width: '20px'
|
package/lib/style/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/style/icon.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxD,MAAM,KAAW,YAAY,
|
|
1
|
+
{"version":3,"file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|
|
|
1
1
|
import { Token } from '@lumino/coreutils';
|
|
2
|
+
import type { Field, Widget } from '@rjsf/core';
|
|
3
|
+
/**
|
|
4
|
+
* Form renderer interface.
|
|
5
|
+
*/
|
|
6
|
+
export interface IFormRenderer {
|
|
7
|
+
/**
|
|
8
|
+
* A React component with properties FieldProps.
|
|
9
|
+
*/
|
|
10
|
+
fieldRenderer?: Field;
|
|
11
|
+
/**
|
|
12
|
+
* A React component with properties WidgetProps.
|
|
13
|
+
*/
|
|
14
|
+
widgetRenderer?: Widget;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A registry for rendering fields used in the FormEditor component.
|
|
18
|
+
*/
|
|
19
|
+
export interface IFormRendererRegistry {
|
|
20
|
+
/**
|
|
21
|
+
* Adds a renderer for a given property of a given settings plugin.
|
|
22
|
+
*
|
|
23
|
+
* The id must follow that structure `<ISettingRegistry.IPlugin.id>.<propertyName>`
|
|
24
|
+
*
|
|
25
|
+
* @param id - Unique ID for the given renderer.
|
|
26
|
+
* @param renderer - A renderer interfacing IFormRenderer.
|
|
27
|
+
*/
|
|
28
|
+
addRenderer: (id: string, renderer: IFormRenderer) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the component for the given id
|
|
31
|
+
* @param id - The unique id for the component.
|
|
32
|
+
* @returns - A component interfacing IFormComponent.
|
|
33
|
+
*/
|
|
34
|
+
getRenderer: (id: string) => IFormRenderer;
|
|
35
|
+
/**
|
|
36
|
+
* Returns all registered renderers in dictionary form.
|
|
37
|
+
* @returns - A dictionary that maps an id to a renderer.
|
|
38
|
+
*/
|
|
39
|
+
renderers: {
|
|
40
|
+
[id: string]: IFormRenderer;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The token for the form component registry.
|
|
45
|
+
*/
|
|
46
|
+
export declare const IFormRendererRegistry: Token<IFormRendererRegistry>;
|
|
2
47
|
/**
|
|
3
48
|
* Placeholder for future icon manager class to assist with
|
|
4
49
|
* overriding/replacing particular sets of icons
|
package/lib/tokens.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* The token for the form component registry.
|
|
6
|
+
*/
|
|
7
|
+
export const IFormRendererRegistry = new Token('@jupyterlab/ui-components:IFormRendererRegistry');
|
|
4
8
|
/**
|
|
5
9
|
* The ILabIconManager token.
|
|
6
10
|
*/
|
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;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA8C1C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,KAAK,CAC5C,iDAAiD,CAClD,CAAC;AAQF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,KAAK,CACtC,2CAA2C,CAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/ui-components",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.33",
|
|
4
4
|
"description": "JupyterLab - UI components written in React",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"watch": "tsc -b --watch"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
44
|
-
"@jupyterlab/observables": "^5.0.0-alpha.
|
|
45
|
-
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.
|
|
46
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
43
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.18",
|
|
44
|
+
"@jupyterlab/observables": "^5.0.0-alpha.18",
|
|
45
|
+
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.18",
|
|
46
|
+
"@jupyterlab/translation": "^4.0.0-alpha.18",
|
|
47
47
|
"@lumino/algorithm": "^2.0.0-alpha.6",
|
|
48
48
|
"@lumino/commands": "^2.0.0-alpha.6",
|
|
49
49
|
"@lumino/coreutils": "^2.0.0-alpha.6",
|
|
@@ -55,21 +55,21 @@
|
|
|
55
55
|
"@lumino/virtualdom": "^2.0.0-alpha.6",
|
|
56
56
|
"@lumino/widgets": "^2.0.0-alpha.6",
|
|
57
57
|
"@rjsf/core": "^4.2.0",
|
|
58
|
-
"react": "^
|
|
59
|
-
"react-dom": "^
|
|
58
|
+
"react": "^18.2.0",
|
|
59
|
+
"react-dom": "^18.2.0",
|
|
60
60
|
"typestyle": "^2.0.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@jupyterlab/testing": "^4.0.0-alpha.
|
|
63
|
+
"@jupyterlab/testing": "^4.0.0-alpha.18",
|
|
64
64
|
"@types/jest": "^29.2.0",
|
|
65
|
-
"@types/react": "^
|
|
65
|
+
"@types/react": "^18.0.26",
|
|
66
66
|
"rimraf": "~3.0.0",
|
|
67
67
|
"svgo": "^3.0.1",
|
|
68
68
|
"typedoc": "~0.22.10",
|
|
69
69
|
"typescript": "~4.7.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"react": "^
|
|
72
|
+
"react": "^18.2.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
package/style/deprecated.css
CHANGED
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
--jp-icon-user: url('icons/sidebar/user.svg');
|
|
108
108
|
--jp-icon-users: url('icons/sidebar/users.svg');
|
|
109
109
|
--jp-icon-vega: url('icons/filetype/vega.svg');
|
|
110
|
+
--jp-icon-word: url('icons/search/word.svg');
|
|
110
111
|
--jp-icon-yaml: url('icons/filetype/yaml.svg');
|
|
111
112
|
}
|
|
112
113
|
|
|
@@ -492,6 +493,10 @@
|
|
|
492
493
|
background-image: var(--jp-icon-vega);
|
|
493
494
|
}
|
|
494
495
|
|
|
496
|
+
.jp-WordIcon {
|
|
497
|
+
background-image: var(--jp-icon-word);
|
|
498
|
+
}
|
|
499
|
+
|
|
495
500
|
.jp-YamlIcon {
|
|
496
501
|
background-image: var(--jp-icon-yaml);
|
|
497
502
|
}
|
package/style/hoverbox.css
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">
|
|
2
|
+
<g class="jp-icon2" fill="#414141">
|
|
3
|
+
<rect x="2" y="2" width="16" height="16"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g class="jp-icon-accent2" transform="translate(.43 .0401)" fill="#fff">
|
|
6
|
+
<path d="m4.14 8.76q0.0682-1.89 2.42-1.89 1.16 0 1.68 0.42 0.567 0.41 0.567 1.16v3.47q0 0.462 0.514 0.462 0.103 0 0.2-0.0231v0.714q-0.399 0.103-0.651 0.103-0.452 0-0.693-0.22-0.231-0.2-0.284-0.662-0.956 0.872-2 0.872-0.903 0-1.47-0.472-0.525-0.472-0.525-1.26 0-0.262 0.0452-0.472 0.0567-0.22 0.116-0.378 0.0682-0.168 0.231-0.304 0.158-0.147 0.262-0.242 0.116-0.0914 0.368-0.168 0.262-0.0914 0.399-0.126 0.136-0.0452 0.472-0.103 0.336-0.0578 0.504-0.0798 0.158-0.0231 0.567-0.0798 0.556-0.0682 0.777-0.221 0.22-0.152 0.22-0.441v-0.252q0-0.43-0.357-0.662-0.336-0.231-0.976-0.231-0.662 0-0.998 0.262-0.336 0.252-0.399 0.798zm1.89 3.68q0.788 0 1.26-0.41 0.504-0.42 0.504-0.903v-1.05q-0.284 0.136-0.861 0.231-0.567 0.0914-0.987 0.158-0.42 0.0682-0.766 0.326-0.336 0.252-0.336 0.704t0.304 0.704 0.861 0.252z" stroke-width="1.05"/>
|
|
7
|
+
<path d="m10 4.56h0.945v3.15q0.651-0.976 1.89-0.976 1.16 0 1.89 0.84 0.682 0.84 0.682 2.31 0 1.47-0.704 2.42-0.704 0.882-1.89 0.882-1.26 0-1.89-1.02v0.766h-0.85zm2.62 3.04q-0.746 0-1.16 0.64-0.452 0.63-0.452 1.68 0 1.05 0.452 1.68t1.16 0.63q0.777 0 1.26-0.63 0.494-0.64 0.494-1.68 0-1.05-0.472-1.68-0.462-0.64-1.26-0.64z" stroke-width="1.05"/>
|
|
8
|
+
<path d="m2.73 15.8 13.6 0.0081c0.0069 0 0-2.6 0-2.6 0-0.0078-1.15 0-1.15 0-0.0069 0-0.0083 1.5-0.0083 1.5-2e-3 -0.0014-11.3-0.0014-11.3-0.0014l-0.00592-1.5c0-0.0078-1.17 0.0013-1.17 0.0013z" stroke-width=".975"/>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
package/style/icons.css
CHANGED
|
@@ -230,15 +230,18 @@
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.jp-terminal-icon-background-color[fill] {
|
|
233
|
-
fill: var(
|
|
233
|
+
fill: var(
|
|
234
|
+
--jp-terminal-icon-background-color,
|
|
235
|
+
var(--jp-inverse-layout-color2)
|
|
236
|
+
);
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
.jp-text-editor-icon-color[fill] {
|
|
237
|
-
fill: var(--jp-text-editor-icon-color, var(--jp-inverse-
|
|
240
|
+
fill: var(--jp-text-editor-icon-color, var(--jp-inverse-layout-color3));
|
|
238
241
|
}
|
|
239
242
|
|
|
240
243
|
.jp-inspector-icon-color[fill] {
|
|
241
|
-
fill: var(--jp-inspector-icon-color, var(--jp-inverse-
|
|
244
|
+
fill: var(--jp-inspector-icon-color, var(--jp-inverse-layout-color3));
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
/* CSS for icons in selected filebrowser listing items */
|
package/style/rjsfTemplates.css
CHANGED
|
@@ -92,7 +92,7 @@ form.rjsf button[type='submit'] {
|
|
|
92
92
|
color: var(--jp-ui-font-color0);
|
|
93
93
|
flex-basis: 100%;
|
|
94
94
|
padding: 4px 0;
|
|
95
|
-
font-weight: var(--jp-content-
|
|
95
|
+
font-weight: var(--jp-content-heading-font-weight);
|
|
96
96
|
border-bottom: 1px solid var(--jp-border-color2);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Token } from '@lumino/coreutils';
|
|
2
|
-
import type { Field } from '@rjsf/core';
|
|
3
|
-
/**
|
|
4
|
-
* A registry for rendering fields used in the FormEditor component.
|
|
5
|
-
*/
|
|
6
|
-
export declare class FormComponentRegistry implements IFormComponentRegistry {
|
|
7
|
-
/**
|
|
8
|
-
* Adds a renderer for a given id - if the id is already in use, returns false.
|
|
9
|
-
* Otherwise, returns true.
|
|
10
|
-
* @param id - Unique ID for the given renderer.
|
|
11
|
-
* @param renderer - A function that takes props and returns a rendered component
|
|
12
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
13
|
-
*/
|
|
14
|
-
addRenderer(id: string, renderer: Field): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Returns all registered renderers in dictionary form.
|
|
17
|
-
* @returns - A dictionary that maps an id to a renderer.
|
|
18
|
-
*/
|
|
19
|
-
get renderers(): {
|
|
20
|
-
[id: string]: Field;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Returns the renderer for the given id
|
|
24
|
-
* @param id - The unique id for the renderer.
|
|
25
|
-
* @returns - A function that takes props and returns a rendered component.
|
|
26
|
-
*/
|
|
27
|
-
getRenderer(id: string): Field;
|
|
28
|
-
private _renderers;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A registry for rendering fields used in the FormEditor component.
|
|
32
|
-
*/
|
|
33
|
-
export interface IFormComponentRegistry {
|
|
34
|
-
/**
|
|
35
|
-
* Adds a renderer for a given id - if the id is already in use, returns false.
|
|
36
|
-
* Otherwise, returns true.
|
|
37
|
-
* @param id - Unique ID for the given renderer.
|
|
38
|
-
* @param renderer - A function that takes props and returns a rendered component
|
|
39
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
40
|
-
*/
|
|
41
|
-
addRenderer: (id: string, renderer: Field) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Returns the renderer for the given id
|
|
44
|
-
* @param id - The unique id for the renderer.
|
|
45
|
-
* @returns - A function that takes props and returns a rendered component.
|
|
46
|
-
*/
|
|
47
|
-
getRenderer: (id: string) => Field;
|
|
48
|
-
/**
|
|
49
|
-
* Returns all registered renderers in dictionary form.
|
|
50
|
-
* @returns - A dictionary that maps an id to a renderer.
|
|
51
|
-
*/
|
|
52
|
-
renderers: {
|
|
53
|
-
[id: string]: Field;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export declare const IFormComponentRegistry: Token<IFormComponentRegistry>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* -----------------------------------------------------------------------------
|
|
2
|
-
| Copyright (c) Jupyter Development Team.
|
|
3
|
-
| Distributed under the terms of the Modified BSD License.
|
|
4
|
-
|----------------------------------------------------------------------------*/
|
|
5
|
-
import { Token } from '@lumino/coreutils';
|
|
6
|
-
/**
|
|
7
|
-
* A registry for rendering fields used in the FormEditor component.
|
|
8
|
-
*/
|
|
9
|
-
export class FormComponentRegistry {
|
|
10
|
-
constructor() {
|
|
11
|
-
this._renderers = {};
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Adds a renderer for a given id - if the id is already in use, returns false.
|
|
15
|
-
* Otherwise, returns true.
|
|
16
|
-
* @param id - Unique ID for the given renderer.
|
|
17
|
-
* @param renderer - A function that takes props and returns a rendered component
|
|
18
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
19
|
-
*/
|
|
20
|
-
addRenderer(id, renderer) {
|
|
21
|
-
if (this._renderers[id]) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
this._renderers[id] = renderer;
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Returns all registered renderers in dictionary form.
|
|
29
|
-
* @returns - A dictionary that maps an id to a renderer.
|
|
30
|
-
*/
|
|
31
|
-
get renderers() {
|
|
32
|
-
return this._renderers;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Returns the renderer for the given id
|
|
36
|
-
* @param id - The unique id for the renderer.
|
|
37
|
-
* @returns - A function that takes props and returns a rendered component.
|
|
38
|
-
*/
|
|
39
|
-
getRenderer(id) {
|
|
40
|
-
return this._renderers[id];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export const IFormComponentRegistry = new Token('@jupyterlab/ui-components:ISettingEditorRegistry');
|
|
44
|
-
//# sourceMappingURL=FormComponentRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormComponentRegistry.js","sourceRoot":"","sources":["../src/FormComponentRegistry.tsx"],"names":[],"mappings":"AAAA;;;+EAG+E;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QAiCU,eAAU,GAA4B,EAAE,CAAC;IACnD,CAAC;IAjCC;;;;;;OAMG;IACH,WAAW,CAAC,EAAU,EAAE,QAAe;QACrC,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QACD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;CAGF;AA6BD,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,KAAK,CAC7C,kDAAkD,CACnD,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Token } from '@lumino/coreutils';
|
|
2
|
-
import type { Widget } from '@rjsf/core';
|
|
3
|
-
/**
|
|
4
|
-
* A registry for rendering widget (used in the metadataform-extension).
|
|
5
|
-
*/
|
|
6
|
-
export declare class FormWidgetRegistry implements IFormWidgetRegistry {
|
|
7
|
-
/**
|
|
8
|
-
* Adds a Widget renderer for a given id - if the id is already in use, returns false.
|
|
9
|
-
* Otherwise, returns true.
|
|
10
|
-
* @param id - Unique ID for the given renderer.
|
|
11
|
-
* @param renderer - A function that takes props and returns a rendered widget.
|
|
12
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
13
|
-
*/
|
|
14
|
-
addRenderer(id: string, renderer: Widget): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Returns the formWidget for the given id
|
|
17
|
-
* @param id - The unique id for the formWidget.
|
|
18
|
-
* @returns - A function that takes props and returns a rendered widget.
|
|
19
|
-
*/
|
|
20
|
-
getRenderer(id: string): Widget;
|
|
21
|
-
/**
|
|
22
|
-
* Returns all registered renderer in dictionary form.
|
|
23
|
-
* @returns - A dictionary that maps an id to a rendered Widget.
|
|
24
|
-
*/
|
|
25
|
-
get renderers(): {
|
|
26
|
-
[id: string]: Widget;
|
|
27
|
-
};
|
|
28
|
-
private _renderers;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A registry for rendering Widgets (used in the metadataform-extension).
|
|
32
|
-
*/
|
|
33
|
-
export interface IFormWidgetRegistry {
|
|
34
|
-
/**
|
|
35
|
-
* Adds a Widget renderer for a given id - if the id is already in use, returns false.
|
|
36
|
-
* Otherwise, returns true.
|
|
37
|
-
* @param id - Unique ID for the given renderer.
|
|
38
|
-
* @param renderer - A function that takes props and returns a rendered widget.
|
|
39
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
40
|
-
*/
|
|
41
|
-
addRenderer: (id: string, renderer: Widget) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Returns the formWidget for the given id
|
|
44
|
-
* @param id - The unique id for the formWidget.
|
|
45
|
-
* @returns - A function that takes props and returns a rendered widget.
|
|
46
|
-
*/
|
|
47
|
-
getRenderer: (id: string) => Widget;
|
|
48
|
-
/**
|
|
49
|
-
* Returns all registered renderer in dictionary form.
|
|
50
|
-
* @returns - A dictionary that maps an id to a rendered Widget.
|
|
51
|
-
*/
|
|
52
|
-
renderers: {
|
|
53
|
-
[id: string]: Widget;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The token of the registry.
|
|
58
|
-
*/
|
|
59
|
-
export declare const IFormWidgetRegistry: Token<IFormWidgetRegistry>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* -----------------------------------------------------------------------------
|
|
2
|
-
| Copyright (c) Jupyter Development Team.
|
|
3
|
-
| Distributed under the terms of the Modified BSD License.
|
|
4
|
-
|----------------------------------------------------------------------------*/
|
|
5
|
-
import { Token } from '@lumino/coreutils';
|
|
6
|
-
/**
|
|
7
|
-
* A registry for rendering widget (used in the metadataform-extension).
|
|
8
|
-
*/
|
|
9
|
-
export class FormWidgetRegistry {
|
|
10
|
-
constructor() {
|
|
11
|
-
this._renderers = {};
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Adds a Widget renderer for a given id - if the id is already in use, returns false.
|
|
15
|
-
* Otherwise, returns true.
|
|
16
|
-
* @param id - Unique ID for the given renderer.
|
|
17
|
-
* @param renderer - A function that takes props and returns a rendered widget.
|
|
18
|
-
* @returns - Whether the renderer was added successfully. False if the id is already in use.
|
|
19
|
-
*/
|
|
20
|
-
addRenderer(id, renderer) {
|
|
21
|
-
if (this._renderers[id]) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
this._renderers[id] = renderer;
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Returns the formWidget for the given id
|
|
29
|
-
* @param id - The unique id for the formWidget.
|
|
30
|
-
* @returns - A function that takes props and returns a rendered widget.
|
|
31
|
-
*/
|
|
32
|
-
getRenderer(id) {
|
|
33
|
-
return this._renderers[id];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Returns all registered renderer in dictionary form.
|
|
37
|
-
* @returns - A dictionary that maps an id to a rendered Widget.
|
|
38
|
-
*/
|
|
39
|
-
get renderers() {
|
|
40
|
-
return this._renderers;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* The token of the registry.
|
|
45
|
-
*/
|
|
46
|
-
export const IFormWidgetRegistry = new Token('@jupyterlab/ui-components:IFormWidgetRegistry');
|
|
47
|
-
//# sourceMappingURL=FormWidgetRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormWidgetRegistry.js","sourceRoot":"","sources":["../src/FormWidgetRegistry.tsx"],"names":[],"mappings":"AAAA;;;+EAG+E;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAA/B;QAiCU,eAAU,GAA6B,EAAE,CAAC;IACpD,CAAC;IAjCC;;;;;;OAMG;IACH,WAAW,CAAC,EAAU,EAAE,QAAgB;QACtC,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QACD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CAGF;AA6BD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,KAAK,CAC1C,+CAA+C,CAChD,CAAC"}
|