@theia/plugin 1.29.0-next.26 → 1.29.0-next.32
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/package.json +2 -2
- package/src/theia.d.ts +32 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.29.0-next.
|
|
3
|
+
"version": "1.29.0-next.32+bc495f8a2b5",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "bc495f8a2b520630b642a70fe02967bb72398b5e"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -2353,6 +2353,32 @@ export module '@theia/plugin' {
|
|
|
2353
2353
|
ignoreFocusOut?: boolean;
|
|
2354
2354
|
}
|
|
2355
2355
|
|
|
2356
|
+
/**
|
|
2357
|
+
* Impacts the behavior and appearance of the validation message.
|
|
2358
|
+
*/
|
|
2359
|
+
export enum InputBoxValidationSeverity {
|
|
2360
|
+
Info = 1,
|
|
2361
|
+
Warning = 2,
|
|
2362
|
+
Error = 3
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
/**
|
|
2366
|
+
* Object to configure the behavior of the validation message.
|
|
2367
|
+
*/
|
|
2368
|
+
export interface InputBoxValidationMessage {
|
|
2369
|
+
/**
|
|
2370
|
+
* The validation message to display.
|
|
2371
|
+
*/
|
|
2372
|
+
readonly message: string;
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* The severity of the validation message.
|
|
2376
|
+
* NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
|
|
2377
|
+
* `Info` and `Warning` will still allow the InputBox to accept the input.
|
|
2378
|
+
*/
|
|
2379
|
+
readonly severity: InputBoxValidationSeverity;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2356
2382
|
/**
|
|
2357
2383
|
* Options to configure the behavior of the input box UI.
|
|
2358
2384
|
*/
|
|
@@ -2401,10 +2427,10 @@ export module '@theia/plugin' {
|
|
|
2401
2427
|
* to the user.
|
|
2402
2428
|
*
|
|
2403
2429
|
* @param value The current value of the input box.
|
|
2404
|
-
* @return
|
|
2405
|
-
* Return `undefined`, or the empty string when 'value' is valid.
|
|
2430
|
+
* @return Either a human-readable string which is presented as an error message or an {@link InputBoxValidationMessage}
|
|
2431
|
+
* which can provide a specific message severity. Return `undefined`, `null`, or the empty string when 'value' is valid.
|
|
2406
2432
|
*/
|
|
2407
|
-
validateInput?: (input: string) => Promise<string | null | undefined> | undefined;
|
|
2433
|
+
validateInput?: (input: string) => Promise<string | InputBoxValidationMessage | null | undefined> | undefined;
|
|
2408
2434
|
|
|
2409
2435
|
/**
|
|
2410
2436
|
* An optional function that will be called on Enter key.
|
|
@@ -5065,8 +5091,10 @@ export module '@theia/plugin' {
|
|
|
5065
5091
|
|
|
5066
5092
|
/**
|
|
5067
5093
|
* An optional validation message indicating a problem with the current input value.
|
|
5094
|
+
* By returning a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
|
|
5095
|
+
* Returning undefined clears the validation message.
|
|
5068
5096
|
*/
|
|
5069
|
-
validationMessage: string | undefined;
|
|
5097
|
+
validationMessage: string | InputBoxValidationMessage | undefined;
|
|
5070
5098
|
}
|
|
5071
5099
|
|
|
5072
5100
|
/**
|