@jupyterlab/ui-components 4.0.0-alpha.32 → 4.0.0-alpha.34

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.
Files changed (50) hide show
  1. package/README.md +4 -4
  2. package/lib/FormRendererRegistry.d.ts +29 -0
  3. package/lib/FormRendererRegistry.js +51 -0
  4. package/lib/FormRendererRegistry.js.map +1 -0
  5. package/lib/components/form.d.ts +122 -0
  6. package/lib/components/form.js +279 -0
  7. package/lib/components/form.js.map +1 -0
  8. package/lib/components/index.d.ts +1 -0
  9. package/lib/components/index.js +1 -0
  10. package/lib/components/index.js.map +1 -1
  11. package/lib/components/menu.js +1 -1
  12. package/lib/components/menu.js.map +1 -1
  13. package/lib/components/toolbar.d.ts +3 -3
  14. package/lib/components/toolbar.js +6 -3
  15. package/lib/components/toolbar.js.map +1 -1
  16. package/lib/components/vdom.d.ts +6 -4
  17. package/lib/components/vdom.js +27 -10
  18. package/lib/components/vdom.js.map +1 -1
  19. package/lib/components/windowedlist.d.ts +1 -1
  20. package/lib/hoverbox.d.ts +8 -0
  21. package/lib/hoverbox.js +39 -22
  22. package/lib/hoverbox.js.map +1 -1
  23. package/lib/icon/iconimports.d.ts +1 -0
  24. package/lib/icon/iconimports.js +2 -0
  25. package/lib/icon/iconimports.js.map +1 -1
  26. package/lib/icon/labicon.js +14 -3
  27. package/lib/icon/labicon.js.map +1 -1
  28. package/lib/index.d.ts +1 -3
  29. package/lib/index.js +1 -3
  30. package/lib/index.js.map +1 -1
  31. package/lib/style/icon.js +0 -29
  32. package/lib/style/icon.js.map +1 -1
  33. package/lib/tokens.d.ts +45 -0
  34. package/lib/tokens.js +4 -0
  35. package/lib/tokens.js.map +1 -1
  36. package/package.json +22 -21
  37. package/style/deprecated.css +5 -0
  38. package/style/hoverbox.css +0 -4
  39. package/style/icons/search/word.svg +10 -0
  40. package/style/icons.css +6 -3
  41. package/style/rjsfTemplates.css +1 -5
  42. package/lib/FormComponentRegistry.d.ts +0 -56
  43. package/lib/FormComponentRegistry.js +0 -44
  44. package/lib/FormComponentRegistry.js.map +0 -1
  45. package/lib/FormWidgetRegistry.d.ts +0 -59
  46. package/lib/FormWidgetRegistry.js +0 -47
  47. package/lib/FormWidgetRegistry.js.map +0 -1
  48. package/lib/rjsfTemplates.d.ts +0 -197
  49. package/lib/rjsfTemplates.js +0 -269
  50. package/lib/rjsfTemplates.js.map +0 -1
package/README.md CHANGED
@@ -85,20 +85,20 @@ Alternatively, you can just render the icon directly into any existing
85
85
  DOM node `elem` by using the `ReactDOM` module:
86
86
 
87
87
  ```typescript
88
- ReactDOM.render(jupyterIcon.react, elem);
88
+ const root = createRoot(elem);
89
+ root.render(jupyterIcon.react);
89
90
  ```
90
91
 
91
92
  If do you use `ReactDOM` to render, and if the `elem` node is ever
92
93
  removed from the DOM, you’ll first need to clean it up:
93
94
 
94
95
  ```typescript
95
- ReactDOM.unmountComponentAtNode(elem);
96
+ root.unmount();
96
97
  ```
97
98
 
98
99
  This cleanup step is not a special property of `LabIcon`, but is instead
99
100
  needed for any React component that is rendered directly at the top
100
- level by `ReactDOM`: failure to call `unmountComponentAtNode` can result
101
- in a [memory leak](https://stackoverflow.com/a/48198011/425458).
101
+ level by `ReactDOM`.
102
102
 
103
103
  ## How to create your own custom `LabIcon`
104
104
 
@@ -0,0 +1,29 @@
1
+ import { IFormRenderer, IFormRendererRegistry } from './tokens';
2
+ /**
3
+ * A registry for property renderers used in the FormEditor component.
4
+ */
5
+ export declare class FormRendererRegistry implements IFormRendererRegistry {
6
+ /**
7
+ * Adds a renderer for a given property of a given settings plugin.
8
+ *
9
+ * The id must follow that structure `<ISettingRegistry.IPlugin.id>.<propertyName>`
10
+ *
11
+ * @param id - Unique ID for the given renderer.
12
+ * @param renderer - A renderer interfacing IFormRenderer.
13
+ */
14
+ addRenderer(id: string, renderer: IFormRenderer): void;
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]: IFormRenderer;
21
+ };
22
+ /**
23
+ * Returns the renderer for the given id
24
+ * @param id - The unique id for the renderer.
25
+ * @returns - A renderer interfacing IFormRenderer.
26
+ */
27
+ getRenderer(id: string): IFormRenderer;
28
+ private _renderers;
29
+ }
@@ -0,0 +1,51 @@
1
+ /* -----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+ /**
6
+ * A registry for property renderers used in the FormEditor component.
7
+ */
8
+ export class FormRendererRegistry {
9
+ constructor() {
10
+ this._renderers = {};
11
+ }
12
+ /**
13
+ * Adds a renderer for a given property of a given settings plugin.
14
+ *
15
+ * The id must follow that structure `<ISettingRegistry.IPlugin.id>.<propertyName>`
16
+ *
17
+ * @param id - Unique ID for the given renderer.
18
+ * @param renderer - A renderer interfacing IFormRenderer.
19
+ */
20
+ addRenderer(id, renderer) {
21
+ if (this._renderers[id]) {
22
+ throw new Error(`A renderer with id '${id}' is already registered.`);
23
+ }
24
+ if (!renderer.fieldRenderer && !renderer.widgetRenderer) {
25
+ throw new Error(`The component for '${id}' cannot be registered as it does not define 'fieldRenderer' nor 'widgetRenderer'.`);
26
+ }
27
+ const splitPosition = id.lastIndexOf('.');
28
+ const pluginId = id.substring(0, splitPosition);
29
+ const propertyName = id.substring(splitPosition + 1);
30
+ if (pluginId.length == 0 || propertyName.length == 0) {
31
+ throw new Error(`Form renderer id must follows the structure '<ISettingRegistry.IPlugin.id>.<propertyName>'; got ${id}.`);
32
+ }
33
+ this._renderers[id] = renderer;
34
+ }
35
+ /**
36
+ * Returns all registered renderers in dictionary form.
37
+ * @returns - A dictionary that maps an id to a renderer.
38
+ */
39
+ get renderers() {
40
+ return this._renderers;
41
+ }
42
+ /**
43
+ * Returns the renderer for the given id
44
+ * @param id - The unique id for the renderer.
45
+ * @returns - A renderer interfacing IFormRenderer.
46
+ */
47
+ getRenderer(id) {
48
+ return this._renderers[id];
49
+ }
50
+ }
51
+ //# sourceMappingURL=FormRendererRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormRendererRegistry.js","sourceRoot":"","sources":["../src/FormRendererRegistry.tsx"],"names":[],"mappings":"AAAA;;;+EAG+E;AAI/E;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QAgDU,eAAU,GAAoC,EAAE,CAAC;IAC3D,CAAC;IAhDC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAU,EAAE,QAAuB;QAC7C,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,CAAC;SACtE;QACD,IAAI,CAAC,QAAQ,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE;YACvD,MAAM,IAAI,KAAK,CACb,sBAAsB,EAAE,oFAAoF,CAC7G,CAAC;SACH;QAED,MAAM,aAAa,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;QACrD,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,YAAY,CAAC,MAAM,IAAI,CAAC,EAAE;YACpD,MAAM,IAAI,KAAK,CACb,mGAAmG,EAAE,GAAG,CACzG,CAAC;SACH;QAED,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjC,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"}
@@ -0,0 +1,122 @@
1
+ import { ITranslator } from '@jupyterlab/translation';
2
+ import { ReadonlyJSONObject } from '@lumino/coreutils';
3
+ import { FormProps, IChangeEvent } from '@rjsf/core';
4
+ import { ArrayFieldTemplateProps } from '@rjsf/utils';
5
+ import React from 'react';
6
+ /**
7
+ * Default `ui:options` for the UiSchema.
8
+ */
9
+ export declare const DEFAULT_UI_OPTIONS: {
10
+ /**
11
+ * This prevents the submit button from being rendered, by default, as it is
12
+ * almost never what is wanted.
13
+ *
14
+ * Provide any `uiSchema#/ui:options/submitButtonOptions` to override this.
15
+ */
16
+ submitButtonOptions: {
17
+ norender: boolean;
18
+ };
19
+ };
20
+ /**
21
+ * Form component namespace.
22
+ */
23
+ export declare namespace FormComponent {
24
+ interface IButtonProps {
25
+ /**
26
+ * Button style.
27
+ */
28
+ buttonStyle?: 'icons' | 'text';
29
+ /**
30
+ * Translator for button text.
31
+ */
32
+ translator?: ITranslator;
33
+ }
34
+ /**
35
+ * Properties for React JSON schema form's container template (array and object).
36
+ */
37
+ interface ILabCustomizerProps extends IButtonProps {
38
+ /**
39
+ * Whether the container is in compact mode or not.
40
+ * In compact mode the title and description are displayed more compactness.
41
+ */
42
+ compact?: boolean;
43
+ /**
44
+ * Whether to display if the current value is not the default one.
45
+ */
46
+ showModifiedFromDefault?: boolean;
47
+ }
48
+ /**
49
+ * Properties of the button to move an item.
50
+ */
51
+ interface IMoveButtonProps extends IButtonProps {
52
+ /**
53
+ * Item index to move with this button.
54
+ */
55
+ item: ArrayFieldTemplateProps['items'][number];
56
+ /**
57
+ * Direction in which to move the item.
58
+ */
59
+ direction: 'up' | 'down';
60
+ }
61
+ /**
62
+ * Properties of the button to drop an item.
63
+ */
64
+ interface IDropButtonProps extends IButtonProps {
65
+ /**
66
+ * Item index to drop with this button.
67
+ */
68
+ item: ArrayFieldTemplateProps['items'][number];
69
+ }
70
+ /**
71
+ * Properties of the button to add an item.
72
+ */
73
+ interface IAddButtonProps extends IButtonProps {
74
+ /**
75
+ * Function to call to add an item.
76
+ */
77
+ onAddClick: ArrayFieldTemplateProps['onAddClick'];
78
+ }
79
+ }
80
+ /**
81
+ * Button to move an item.
82
+ *
83
+ * @returns - the button as a react element.
84
+ */
85
+ export declare const MoveButton: (props: FormComponent.IMoveButtonProps) => JSX.Element;
86
+ /**
87
+ * Button to drop an item.
88
+ *
89
+ * @returns - the button as a react element.
90
+ */
91
+ export declare const DropButton: (props: FormComponent.IDropButtonProps) => JSX.Element;
92
+ /**
93
+ * Button to add an item.
94
+ *
95
+ * @returns - the button as a react element.
96
+ */
97
+ export declare const AddButton: (props: FormComponent.IAddButtonProps) => JSX.Element;
98
+ export interface ILabCustomizerOptions<P> extends FormComponent.ILabCustomizerProps {
99
+ name?: string;
100
+ component: React.FunctionComponent<P & Required<FormComponent.ILabCustomizerProps>>;
101
+ }
102
+ /**
103
+ * FormComponent properties
104
+ */
105
+ export interface IFormComponentProps<T = ReadonlyJSONObject> extends FormProps<T>, FormComponent.ILabCustomizerProps {
106
+ /**
107
+ *
108
+ */
109
+ formData: T;
110
+ /**
111
+ *
112
+ */
113
+ onChange: (e: IChangeEvent<T>) => any;
114
+ /**
115
+ *
116
+ */
117
+ formContext?: unknown;
118
+ }
119
+ /**
120
+ * Generic rjsf form component for JupyterLab UI.
121
+ */
122
+ export declare function FormComponent(props: IFormComponentProps): JSX.Element;
@@ -0,0 +1,279 @@
1
+ /*
2
+ * Copyright (c) Jupyter Development Team.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ import { nullTranslator } from '@jupyterlab/translation';
6
+ import { JSONExt } from '@lumino/coreutils';
7
+ import Form from '@rjsf/core';
8
+ import { ADDITIONAL_PROPERTY_FLAG, canExpand, getTemplate } from '@rjsf/utils';
9
+ import React from 'react';
10
+ import { addIcon, caretDownIcon, caretUpIcon, closeIcon } from '../icon';
11
+ /**
12
+ * Default `ui:options` for the UiSchema.
13
+ */
14
+ export const DEFAULT_UI_OPTIONS = {
15
+ /**
16
+ * This prevents the submit button from being rendered, by default, as it is
17
+ * almost never what is wanted.
18
+ *
19
+ * Provide any `uiSchema#/ui:options/submitButtonOptions` to override this.
20
+ */
21
+ submitButtonOptions: {
22
+ norender: true
23
+ }
24
+ };
25
+ /**
26
+ * Button to move an item.
27
+ *
28
+ * @returns - the button as a react element.
29
+ */
30
+ export const MoveButton = (props) => {
31
+ var _a;
32
+ const trans = ((_a = props.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
33
+ let buttonContent;
34
+ /**
35
+ * Whether the button is disabled or not.
36
+ */
37
+ const disabled = () => {
38
+ if (props.direction === 'up') {
39
+ return !props.item.hasMoveUp;
40
+ }
41
+ else {
42
+ return !props.item.hasMoveDown;
43
+ }
44
+ };
45
+ if (props.buttonStyle === 'icons') {
46
+ const iconProps = {
47
+ tag: 'span',
48
+ elementSize: 'xlarge',
49
+ elementPosition: 'center'
50
+ };
51
+ buttonContent =
52
+ props.direction === 'up' ? (React.createElement(caretUpIcon.react, { ...iconProps })) : (React.createElement(caretDownIcon.react, { ...iconProps }));
53
+ }
54
+ else {
55
+ buttonContent =
56
+ props.direction === 'up' ? trans.__('Move up') : trans.__('Move down');
57
+ }
58
+ const moveTo = props.direction === 'up' ? props.item.index - 1 : props.item.index + 1;
59
+ return (React.createElement("button", { className: "jp-mod-styled jp-mod-reject jp-ArrayOperationsButton", onClick: props.item.onReorderClick(props.item.index, moveTo), disabled: disabled() }, buttonContent));
60
+ };
61
+ /**
62
+ * Button to drop an item.
63
+ *
64
+ * @returns - the button as a react element.
65
+ */
66
+ export const DropButton = (props) => {
67
+ var _a;
68
+ const trans = ((_a = props.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
69
+ let buttonContent;
70
+ if (props.buttonStyle === 'icons') {
71
+ buttonContent = (React.createElement(closeIcon.react, { tag: "span", elementSize: "xlarge", elementPosition: "center" }));
72
+ }
73
+ else {
74
+ buttonContent = trans.__('Remove');
75
+ }
76
+ return (React.createElement("button", { className: "jp-mod-styled jp-mod-warn jp-ArrayOperationsButton", onClick: props.item.onDropIndexClick(props.item.index) }, buttonContent));
77
+ };
78
+ /**
79
+ * Button to add an item.
80
+ *
81
+ * @returns - the button as a react element.
82
+ */
83
+ export const AddButton = (props) => {
84
+ var _a;
85
+ const trans = ((_a = props.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
86
+ let buttonContent;
87
+ if (props.buttonStyle === 'icons') {
88
+ buttonContent = (React.createElement(addIcon.react, { tag: "span", elementSize: "xlarge", elementPosition: "center" }));
89
+ }
90
+ else {
91
+ buttonContent = trans.__('Add');
92
+ }
93
+ return (React.createElement("button", { className: "jp-mod-styled jp-mod-reject jp-ArrayOperationsButton", onClick: props.onAddClick }, buttonContent));
94
+ };
95
+ function customizeForLab(options) {
96
+ const { component, name, buttonStyle, compact, showModifiedFromDefault, translator } = options;
97
+ const isCompact = compact !== null && compact !== void 0 ? compact : false;
98
+ const button = buttonStyle !== null && buttonStyle !== void 0 ? buttonStyle : (isCompact ? 'icons' : 'text');
99
+ const factory = (props) => component({
100
+ ...props,
101
+ buttonStyle: button,
102
+ compact: isCompact,
103
+ showModifiedFromDefault: showModifiedFromDefault !== null && showModifiedFromDefault !== void 0 ? showModifiedFromDefault : true,
104
+ translator: translator !== null && translator !== void 0 ? translator : nullTranslator
105
+ });
106
+ if (name) {
107
+ factory.displayName = name;
108
+ }
109
+ return factory;
110
+ }
111
+ /**
112
+ * Fetch field templates from RJSF.
113
+ */
114
+ function getTemplates(registry, uiSchema) {
115
+ const TitleField = getTemplate('TitleFieldTemplate', registry, uiSchema);
116
+ const DescriptionField = getTemplate('DescriptionFieldTemplate', registry, uiSchema);
117
+ return { TitleField, DescriptionField };
118
+ }
119
+ /**
120
+ * Template to allow for custom buttons to re-order/remove entries in an array.
121
+ * Necessary to create accessible buttons.
122
+ */
123
+ const CustomArrayTemplateFactory = (options) => customizeForLab({
124
+ ...options,
125
+ name: 'JupyterLabArrayTemplate',
126
+ component: props => {
127
+ var _a;
128
+ const { schema, registry, uiSchema, required } = props;
129
+ const commonProps = { schema, registry, uiSchema, required };
130
+ const { TitleField, DescriptionField } = getTemplates(registry, uiSchema);
131
+ return (React.createElement("div", { className: props.className },
132
+ props.compact ? (React.createElement("div", { className: "jp-FormGroup-compactTitle" },
133
+ React.createElement("div", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem", id: `${props.idSchema.$id}__title` }, props.title || ''),
134
+ React.createElement("div", { className: "jp-FormGroup-description", id: `${props.idSchema.$id}-description` }, props.schema.description || ''))) : (React.createElement(React.Fragment, null,
135
+ props.title && (React.createElement(TitleField, { ...commonProps, title: props.title, id: `${props.idSchema.$id}-title` })),
136
+ React.createElement(DescriptionField, { ...commonProps, id: `${props.idSchema.$id}-description`, description: (_a = props.schema.description) !== null && _a !== void 0 ? _a : '' }))),
137
+ props.items.map(item => {
138
+ return (React.createElement("div", { key: item.key, className: item.className },
139
+ item.children,
140
+ React.createElement("div", { className: "jp-ArrayOperations" },
141
+ React.createElement(MoveButton, { buttonStyle: props.buttonStyle, translator: props.translator, item: item, direction: "up" }),
142
+ React.createElement(MoveButton, { buttonStyle: props.buttonStyle, translator: props.translator, item: item, direction: "down" }),
143
+ React.createElement(DropButton, { buttonStyle: props.buttonStyle, translator: props.translator, item: item }))));
144
+ }),
145
+ props.canAdd && (React.createElement(AddButton, { onAddClick: props.onAddClick, buttonStyle: props.buttonStyle, translator: props.translator }))));
146
+ }
147
+ });
148
+ /**
149
+ * Template with custom add button, necessary for accessibility and internationalization.
150
+ */
151
+ const CustomObjectTemplateFactory = (options) => customizeForLab({
152
+ ...options,
153
+ name: 'JupyterLabObjectTemplate',
154
+ component: props => {
155
+ var _a;
156
+ const { schema, registry, uiSchema, required } = props;
157
+ const commonProps = { schema, registry, uiSchema, required };
158
+ const { TitleField, DescriptionField } = getTemplates(registry, uiSchema);
159
+ return (React.createElement("fieldset", { id: props.idSchema.$id },
160
+ props.compact ? (React.createElement("div", { className: "jp-FormGroup-compactTitle" },
161
+ React.createElement("div", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem", id: `${props.idSchema.$id}__title` }, props.title || ''),
162
+ React.createElement("div", { className: "jp-FormGroup-description", id: `${props.idSchema.$id}__description` }, props.schema.description || ''))) : (React.createElement(React.Fragment, null,
163
+ (props.title ||
164
+ (props.uiSchema || JSONExt.emptyObject)['ui:title']) && (React.createElement(TitleField, { ...commonProps, id: `${props.idSchema.$id}__title`, title: props.title ||
165
+ `${(props.uiSchema || JSONExt.emptyObject)['ui:title']}` ||
166
+ '' })),
167
+ React.createElement(DescriptionField, { ...commonProps, id: `${props.idSchema.$id}__description`, description: (_a = props.schema.description) !== null && _a !== void 0 ? _a : '' }))),
168
+ props.properties.map(property => property.content),
169
+ canExpand(props.schema, props.uiSchema, props.formData) && (React.createElement(AddButton, { onAddClick: props.onAddClick(props.schema), buttonStyle: props.buttonStyle, translator: props.translator }))));
170
+ }
171
+ });
172
+ /**
173
+ * Renders the modified indicator and errors
174
+ */
175
+ const CustomTemplateFactory = (options) => customizeForLab({
176
+ ...options,
177
+ name: 'JupyterLabFieldTemplate',
178
+ component: props => {
179
+ var _a;
180
+ const trans = ((_a = props.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
181
+ let isModified = false;
182
+ let defaultValue;
183
+ const { formData, schema, label, displayLabel, id, formContext, errors, rawErrors, children, onKeyChange, onDropPropertyClick } = props;
184
+ const { defaultFormData } = formContext;
185
+ const schemaIds = id.split('_');
186
+ schemaIds.shift();
187
+ const schemaId = schemaIds.join('.');
188
+ const isRoot = schemaId === '';
189
+ const hasCustomField = schemaId === (props.uiSchema || JSONExt.emptyObject)['ui:field'];
190
+ if (props.showModifiedFromDefault) {
191
+ /**
192
+ * Determine if the field has been modified.
193
+ * Schema Id is formatted as 'root_<field name>.<nested field name>'
194
+ * This logic parses out the field name to find the default value
195
+ * before determining if the field has been modified.
196
+ */
197
+ defaultValue = schemaIds.reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], defaultFormData);
198
+ isModified =
199
+ !isRoot &&
200
+ formData !== undefined &&
201
+ defaultValue !== undefined &&
202
+ !schema.properties &&
203
+ schema.type !== 'array' &&
204
+ !JSONExt.deepEqual(formData, defaultValue);
205
+ }
206
+ const needsDescription = !isRoot &&
207
+ schema.type != 'object' &&
208
+ id !=
209
+ 'jp-SettingsEditor-@jupyterlab/shortcuts-extension:shortcuts_shortcuts';
210
+ // While we can implement "remove" button for array items in array template,
211
+ // object templates do not provide a way to do this instead we need to add
212
+ // buttons here (and first check if the field can be removed = is additional).
213
+ const isAdditional = schema.hasOwnProperty(ADDITIONAL_PROPERTY_FLAG);
214
+ const isItem = !(schema.type === 'object' || schema.type === 'array');
215
+ return (React.createElement("div", { className: `form-group ${displayLabel || schema.type === 'boolean' ? 'small-field' : ''}` },
216
+ !hasCustomField &&
217
+ (rawErrors ? (
218
+ // Shows a red indicator for fields that have validation errors
219
+ React.createElement("div", { className: "jp-modifiedIndicator jp-errorIndicator" })) : (
220
+ // Only show the modified indicator if there are no errors
221
+ isModified && React.createElement("div", { className: "jp-modifiedIndicator" }))),
222
+ React.createElement("div", { className: `jp-FormGroup-content ${props.compact
223
+ ? 'jp-FormGroup-contentCompact'
224
+ : 'jp-FormGroup-contentNormal'}` },
225
+ isItem && displayLabel && !isRoot && label && !isAdditional ? (props.compact ? (React.createElement("div", { className: "jp-FormGroup-compactTitle" },
226
+ React.createElement("div", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem" }, label),
227
+ isItem && schema.description && needsDescription && (React.createElement("div", { className: "jp-FormGroup-description" }, schema.description)))) : (React.createElement("h3", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem" }, label))) : (React.createElement(React.Fragment, null)),
228
+ isAdditional && (React.createElement("input", { className: "jp-FormGroup-contentItem jp-mod-styled", type: "text", onBlur: event => onKeyChange(event.target.value), defaultValue: label })),
229
+ React.createElement("div", { className: `${isRoot
230
+ ? 'jp-root'
231
+ : schema.type === 'object'
232
+ ? 'jp-objectFieldWrapper'
233
+ : schema.type === 'array'
234
+ ? 'jp-arrayFieldWrapper'
235
+ : 'jp-inputFieldWrapper jp-FormGroup-contentItem'}` }, children),
236
+ isAdditional && (React.createElement("button", { className: "jp-FormGroup-contentItem jp-mod-styled jp-mod-warn jp-FormGroup-removeButton", onClick: onDropPropertyClick(label) }, trans.__('Remove'))),
237
+ !props.compact && schema.description && needsDescription && (React.createElement("div", { className: "jp-FormGroup-description" }, schema.description)),
238
+ isModified && defaultValue !== undefined && (React.createElement("div", { className: "jp-FormGroup-default" }, trans.__('Default: %1', defaultValue.toLocaleString()))),
239
+ React.createElement("div", { className: "validationErrors" }, errors))));
240
+ }
241
+ });
242
+ /**
243
+ * Generic rjsf form component for JupyterLab UI.
244
+ */
245
+ export function FormComponent(props) {
246
+ const { buttonStyle, compact, showModifiedFromDefault, translator, formContext, ...others } = props;
247
+ const uiSchema = { ...(others.uiSchema || JSONExt.emptyObject) };
248
+ uiSchema['ui:options'] = { ...DEFAULT_UI_OPTIONS, ...uiSchema['ui:options'] };
249
+ others.uiSchema = uiSchema;
250
+ const { FieldTemplate, ArrayFieldTemplate, ObjectFieldTemplate } = props.templates || JSONExt.emptyObject;
251
+ const customization = {
252
+ buttonStyle,
253
+ compact,
254
+ showModifiedFromDefault,
255
+ translator
256
+ };
257
+ const fieldTemplate = React.useMemo(() => FieldTemplate !== null && FieldTemplate !== void 0 ? FieldTemplate : CustomTemplateFactory(customization), [FieldTemplate, buttonStyle, compact, showModifiedFromDefault, translator]);
258
+ const arrayTemplate = React.useMemo(() => ArrayFieldTemplate !== null && ArrayFieldTemplate !== void 0 ? ArrayFieldTemplate : CustomArrayTemplateFactory(customization), [
259
+ ArrayFieldTemplate,
260
+ buttonStyle,
261
+ compact,
262
+ showModifiedFromDefault,
263
+ translator
264
+ ]);
265
+ const objectTemplate = React.useMemo(() => ObjectFieldTemplate !== null && ObjectFieldTemplate !== void 0 ? ObjectFieldTemplate : CustomObjectTemplateFactory(customization), [
266
+ ObjectFieldTemplate,
267
+ buttonStyle,
268
+ compact,
269
+ showModifiedFromDefault,
270
+ translator
271
+ ]);
272
+ const templates = {
273
+ FieldTemplate: fieldTemplate,
274
+ ArrayFieldTemplate: arrayTemplate,
275
+ ObjectFieldTemplate: objectTemplate
276
+ };
277
+ return (React.createElement(Form, { templates: templates, formContext: formContext, ...others }));
278
+ }
279
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAsB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,IAAiC,MAAM,YAAY,CAAC;AAE3D,OAAO,EACL,wBAAwB,EAExB,SAAS,EAET,WAAW,EAIZ,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,SAAS,EAEV,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;;;;;OAKG;IACH,mBAAmB,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAkEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,KAAqC,EACxB,EAAE;;IACf,MAAM,KAAK,GAAG,CAAC,MAAA,KAAK,CAAC,UAAU,mCAAI,cAAc,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACtE,IAAI,aAAmC,CAAC;IAExC;;OAEG;IACH,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE;YAC5B,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;SAC9B;aAAM;YACL,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,EAAE,WAAkB,KAAM,MAAM,GAAI,CAC5E,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './button';
2
2
  export * from './collapser';
3
+ export * from './form';
3
4
  export * from './htmlselect';
4
5
  export * from './iframe';
5
6
  export * from './inputgroup';
@@ -2,6 +2,7 @@
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
  export * from './button';
4
4
  export * from './collapser';
5
+ export * from './form';
5
6
  export * from './htmlselect';
6
7
  export * from './iframe';
7
8
  export * from './inputgroup';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
@@ -76,7 +76,7 @@ export class RankedMenu extends Menu {
76
76
  // Keep an array of the menu items that have been created.
77
77
  const added = [];
78
78
  // Insert a separator before the group.
79
- // Phosphor takes care of superfluous leading,
79
+ // Lumino takes care of superfluous leading,
80
80
  // trailing, and duplicate separators.
81
81
  if (this._includeSeparators) {
82
82
  added.push(this.insertItem(insertIndex++, { type: 'separator', rank: defaultRank }));
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/components/menu.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,oBAAoB;AAEpB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,kBAAkB,EAAe,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAiDvC;;GAEG;AACH,MAAM,KAAW,WAAW,CAgC3B;AAhCD,WAAiB,WAAW;IAC1B;;OAEG;IACU,wBAAY,GAAG,GAAG,CAAC;AA4BlC,CAAC,EAhCgB,WAAW,KAAX,WAAW,QAgC3B;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAI;IAClC;;;;OAIG;IACH,YAAY,OAA6B;;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QA4KT,WAAM,GAAa,EAAE,CAAC;QA3K5B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,kBAAkB,GAAG,MAAA,OAAO,CAAC,iBAAiB,mCAAI,IAAI,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC;I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,SAAS,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAG,CAAC,UAAU,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,OAAO;SACR;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAChC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC7B;QACD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CAKF"}
@@ -250,9 +250,9 @@ export declare function ToolbarButtonComponent(props: ToolbarButtonComponent.IPr
250
250
  * Adds the toolbar button class to the toolbar widget.
251
251
  * @param w Toolbar button widget.
252
252
  */
253
- export declare function addToolbarButtonClass(w: Widget): Widget;
253
+ export declare function addToolbarButtonClass<T extends Widget = Widget>(w: T): T;
254
254
  /**
255
- * Phosphor Widget version of static ToolbarButtonComponent.
255
+ * Lumino Widget version of static ToolbarButtonComponent.
256
256
  */
257
257
  export declare class ToolbarButton extends ReactWidget {
258
258
  private props;
@@ -394,7 +394,7 @@ declare class ToolbarPopupOpener extends ToolbarButton {
394
394
  /**
395
395
  * Create a new popup opener
396
396
  */
397
- constructor();
397
+ constructor(props?: ToolbarButtonComponent.IProps);
398
398
  /**
399
399
  * Add widget to the popup, prepends widgets
400
400
  * @param widget the widget to add
@@ -1,5 +1,6 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
+ import { nullTranslator } from '@jupyterlab/translation';
3
4
  import { find, map, some } from '@lumino/algorithm';
4
5
  import { CommandRegistry } from '@lumino/commands';
5
6
  import { MessageLoop } from '@lumino/messaging';
@@ -554,7 +555,7 @@ export function addToolbarButtonClass(w) {
554
555
  return w;
555
556
  }
556
557
  /**
557
- * Phosphor Widget version of static ToolbarButtonComponent.
558
+ * Lumino Widget version of static ToolbarButtonComponent.
558
559
  */
559
560
  export class ToolbarButton extends ReactWidget {
560
561
  /**
@@ -733,12 +734,14 @@ class ToolbarPopupOpener extends ToolbarButton {
733
734
  /**
734
735
  * Create a new popup opener
735
736
  */
736
- constructor() {
737
+ constructor(props = {}) {
738
+ const trans = (props.translator || nullTranslator).load('jupyterlab');
737
739
  super({
738
740
  icon: ellipsesIcon,
739
741
  onClick: () => {
740
742
  this.handleClick();
741
- }
743
+ },
744
+ tooltip: trans.__('More commands')
742
745
  });
743
746
  this.addClass('jp-Toolbar-responsive-opener');
744
747
  this.popup = new ToolbarPopup();