@adminide-stack/extension-api 0.0.2-alpha.0
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/LICENSE +39 -0
- package/README.md +9 -0
- package/lib/connections/jsonrpc2/connection.d.ts +55 -0
- package/lib/connections/jsonrpc2/connection.js +575 -0
- package/lib/connections/jsonrpc2/connection.js.map +1 -0
- package/lib/connections/jsonrpc2/connection.test.d.ts +1 -0
- package/lib/connections/jsonrpc2/connection.test.js +443 -0
- package/lib/connections/jsonrpc2/connection.test.js.map +1 -0
- package/lib/connections/jsonrpc2/events.d.ts +24 -0
- package/lib/connections/jsonrpc2/events.js +117 -0
- package/lib/connections/jsonrpc2/events.js.map +1 -0
- package/lib/connections/jsonrpc2/index.d.ts +5 -0
- package/lib/connections/jsonrpc2/index.js +24 -0
- package/lib/connections/jsonrpc2/index.js.map +1 -0
- package/lib/connections/jsonrpc2/linkedMap.d.ts +29 -0
- package/lib/connections/jsonrpc2/linkedMap.js +254 -0
- package/lib/connections/jsonrpc2/linkedMap.js.map +1 -0
- package/lib/connections/jsonrpc2/linkedMap.test.d.ts +1 -0
- package/lib/connections/jsonrpc2/linkedMap.test.js +62 -0
- package/lib/connections/jsonrpc2/linkedMap.test.js.map +1 -0
- package/lib/connections/jsonrpc2/messages.d.ts +117 -0
- package/lib/connections/jsonrpc2/messages.js +72 -0
- package/lib/connections/jsonrpc2/messages.js.map +1 -0
- package/lib/connections/jsonrpc2/test-helper.d.ts +8 -0
- package/lib/connections/jsonrpc2/test-helper.js +36 -0
- package/lib/connections/jsonrpc2/test-helper.js.map +1 -0
- package/lib/connections/jsonrpc2/trace.d.ts +30 -0
- package/lib/connections/jsonrpc2/trace.js +96 -0
- package/lib/connections/jsonrpc2/trace.js.map +1 -0
- package/lib/connections/jsonrpc2/transport.d.ts +36 -0
- package/lib/connections/jsonrpc2/transport.js +66 -0
- package/lib/connections/jsonrpc2/transport.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.js +189 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/merged.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/merged.js +239 -0
- package/lib/connections/jsonrpc2/transports/merged.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/webSocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/webSocket.js +138 -0
- package/lib/connections/jsonrpc2/transports/webSocket.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/webWorker.d.ts +22 -0
- package/lib/connections/jsonrpc2/transports/webWorker.js +111 -0
- package/lib/connections/jsonrpc2/transports/webWorker.js.map +1 -0
- package/lib/connections/proxy/index.d.ts +1 -0
- package/lib/connections/proxy/index.js +18 -0
- package/lib/connections/proxy/index.js.map +1 -0
- package/lib/connections/proxy/proxy.d.ts +49 -0
- package/lib/connections/proxy/proxy.js +108 -0
- package/lib/connections/proxy/proxy.js.map +1 -0
- package/lib/connections/proxy/proxy.test.d.ts +1 -0
- package/lib/connections/proxy/proxy.test.js +55 -0
- package/lib/connections/proxy/proxy.test.js.map +1 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.d.ts +12 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.js +62 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.js.map +1 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.d.ts +0 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.js +317 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.js.map +1 -0
- package/lib/connections/remote-rpc/index.d.ts +1 -0
- package/lib/connections/remote-rpc/index.js +18 -0
- package/lib/connections/remote-rpc/index.js.map +1 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.d.ts +12 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js +41 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js.map +1 -0
- package/lib/connections/remote-rpc/rxjs-websockets.d.ts +18 -0
- package/lib/connections/remote-rpc/rxjs-websockets.js +80 -0
- package/lib/connections/remote-rpc/rxjs-websockets.js.map +1 -0
- package/lib/constants/action-types.d.ts +30 -0
- package/lib/constants/action-types.js +38 -0
- package/lib/constants/action-types.js.map +1 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/index.js +19 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/types.d.ts +8 -0
- package/lib/constants/types.js +12 -0
- package/lib/constants/types.js.map +1 -0
- package/lib/core/expr/evaluator.d.ts +27 -0
- package/lib/core/expr/evaluator.js +144 -0
- package/lib/core/expr/evaluator.js.map +1 -0
- package/lib/core/expr/evaluator.test.d.ts +1 -0
- package/lib/core/expr/evaluator.test.js +52 -0
- package/lib/core/expr/evaluator.test.js.map +1 -0
- package/lib/core/expr/index.d.ts +3 -0
- package/lib/core/expr/index.js +20 -0
- package/lib/core/expr/index.js.map +1 -0
- package/lib/core/expr/lexer.d.ts +114 -0
- package/lib/core/expr/lexer.js +418 -0
- package/lib/core/expr/lexer.js.map +1 -0
- package/lib/core/expr/parser.d.ts +52 -0
- package/lib/core/expr/parser.js +242 -0
- package/lib/core/expr/parser.js.map +1 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +19 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/types/ext-host-types-bk.d.ts +0 -0
- package/lib/core/types/ext-host-types-bk.js +1275 -0
- package/lib/core/types/ext-host-types-bk.js.map +1 -0
- package/lib/core/types/ext-host-types.d.ts +32 -0
- package/lib/core/types/ext-host-types.js +71 -0
- package/lib/core/types/ext-host-types.js.map +1 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +18 -0
- package/lib/core/types/index.js.map +1 -0
- package/lib/errors/errors.d.ts +1 -0
- package/lib/errors/errors.js +13 -0
- package/lib/errors/errors.js.map +1 -0
- package/lib/errors/index.d.ts +1 -0
- package/lib/errors/index.js +18 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/command.d.ts +28 -0
- package/lib/interfaces/command.js +3 -0
- package/lib/interfaces/command.js.map +1 -0
- package/lib/interfaces/configuration.d.ts +36 -0
- package/lib/interfaces/configuration.js +3 -0
- package/lib/interfaces/configuration.js.map +1 -0
- package/lib/interfaces/connection.d.ts +12 -0
- package/lib/interfaces/connection.js +3 -0
- package/lib/interfaces/connection.js.map +1 -0
- package/lib/interfaces/context.d.ts +12 -0
- package/lib/interfaces/context.js +3 -0
- package/lib/interfaces/context.js.map +1 -0
- package/lib/interfaces/contributions/contribution-service.d.ts +20 -0
- package/lib/interfaces/contributions/contribution-service.js +3 -0
- package/lib/interfaces/contributions/contribution-service.js.map +1 -0
- package/lib/interfaces/contributions/contribution.d.ts +383 -0
- package/lib/interfaces/contributions/contribution.js +49 -0
- package/lib/interfaces/contributions/contribution.js.map +1 -0
- package/lib/interfaces/contributions/index.d.ts +2 -0
- package/lib/interfaces/contributions/index.js +19 -0
- package/lib/interfaces/contributions/index.js.map +1 -0
- package/lib/interfaces/controller.d.ts +30 -0
- package/lib/interfaces/controller.js +3 -0
- package/lib/interfaces/controller.js.map +1 -0
- package/lib/interfaces/errors.d.ts +5 -0
- package/lib/interfaces/errors.js +3 -0
- package/lib/interfaces/errors.js.map +1 -0
- package/lib/interfaces/ext-services/contributon-registry.d.ts +45 -0
- package/lib/interfaces/ext-services/contributon-registry.js +3 -0
- package/lib/interfaces/ext-services/contributon-registry.js.map +1 -0
- package/lib/interfaces/ext-services/ext-services.d.ts +23 -0
- package/lib/interfaces/ext-services/ext-services.js +3 -0
- package/lib/interfaces/ext-services/ext-services.js.map +1 -0
- package/lib/interfaces/ext-services/extension-service.d.ts +8 -0
- package/lib/interfaces/ext-services/extension-service.js +3 -0
- package/lib/interfaces/ext-services/extension-service.js.map +1 -0
- package/lib/interfaces/ext-services/index.d.ts +8 -0
- package/lib/interfaces/ext-services/index.js +25 -0
- package/lib/interfaces/ext-services/index.js.map +1 -0
- package/lib/interfaces/ext-services/model-service.d.ts +89 -0
- package/lib/interfaces/ext-services/model-service.js +3 -0
- package/lib/interfaces/ext-services/model-service.js.map +1 -0
- package/lib/interfaces/ext-services/panel-view-registry.d.ts +21 -0
- package/lib/interfaces/ext-services/panel-view-registry.js +3 -0
- package/lib/interfaces/ext-services/panel-view-registry.js.map +1 -0
- package/lib/interfaces/ext-services/settings-service.d.ts +18 -0
- package/lib/interfaces/ext-services/settings-service.js +3 -0
- package/lib/interfaces/ext-services/settings-service.js.map +1 -0
- package/lib/interfaces/ext-services/view-service.d.ts +65 -0
- package/lib/interfaces/ext-services/view-service.js +4 -0
- package/lib/interfaces/ext-services/view-service.js.map +1 -0
- package/lib/interfaces/ext-services/viewer-service.d.ts +125 -0
- package/lib/interfaces/ext-services/viewer-service.js +5 -0
- package/lib/interfaces/ext-services/viewer-service.js.map +1 -0
- package/lib/interfaces/extension-manifest.d.ts +8 -0
- package/lib/interfaces/extension-manifest.js +3 -0
- package/lib/interfaces/extension-manifest.js.map +1 -0
- package/lib/interfaces/extension.d.ts +72 -0
- package/lib/interfaces/extension.js +3 -0
- package/lib/interfaces/extension.js.map +1 -0
- package/lib/interfaces/generated-models.d.ts +3716 -0
- package/lib/interfaces/generated-models.js +648 -0
- package/lib/interfaces/generated-models.js.map +1 -0
- package/lib/interfaces/graphql.d.ts +17 -0
- package/lib/interfaces/graphql.js +5 -0
- package/lib/interfaces/graphql.js.map +1 -0
- package/lib/interfaces/index.d.ts +21 -0
- package/lib/interfaces/index.js +38 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/languages-types.d.ts +65 -0
- package/lib/interfaces/languages-types.js +3 -0
- package/lib/interfaces/languages-types.js.map +1 -0
- package/lib/interfaces/model.d.ts +51 -0
- package/lib/interfaces/model.js +9 -0
- package/lib/interfaces/model.js.map +1 -0
- package/lib/interfaces/plain-types.d.ts +4 -0
- package/lib/interfaces/plain-types.js +6 -0
- package/lib/interfaces/plain-types.js.map +1 -0
- package/lib/interfaces/plainTypes.d.ts +68 -0
- package/lib/interfaces/plainTypes.js +3 -0
- package/lib/interfaces/plainTypes.js.map +1 -0
- package/lib/interfaces/platform-context.d.ts +82 -0
- package/lib/interfaces/platform-context.js +3 -0
- package/lib/interfaces/platform-context.js.map +1 -0
- package/lib/interfaces/react-props/action-item.d.ts +20 -0
- package/lib/interfaces/react-props/action-item.js +3 -0
- package/lib/interfaces/react-props/action-item.js.map +1 -0
- package/lib/interfaces/react-props/extension-controller.d.ts +11 -0
- package/lib/interfaces/react-props/extension-controller.js +3 -0
- package/lib/interfaces/react-props/extension-controller.js.map +1 -0
- package/lib/interfaces/react-props/index.d.ts +3 -0
- package/lib/interfaces/react-props/index.js +20 -0
- package/lib/interfaces/react-props/index.js.map +1 -0
- package/lib/interfaces/react-props/platform-context.d.ts +7 -0
- package/lib/interfaces/react-props/platform-context.js +3 -0
- package/lib/interfaces/react-props/platform-context.js.map +1 -0
- package/lib/interfaces/registry-extension.d.ts +21 -0
- package/lib/interfaces/registry-extension.js +3 -0
- package/lib/interfaces/registry-extension.js.map +1 -0
- package/lib/interfaces/settings.d.ts +51 -0
- package/lib/interfaces/settings.js +3 -0
- package/lib/interfaces/settings.js.map +1 -0
- package/lib/interfaces/text-document.d.ts +57 -0
- package/lib/interfaces/text-document.js +119 -0
- package/lib/interfaces/text-document.js.map +1 -0
- package/lib/interfaces/webview/index.d.ts +3 -0
- package/lib/interfaces/webview/index.js +20 -0
- package/lib/interfaces/webview/index.js.map +1 -0
- package/lib/interfaces/webview/webview-manager-service.d.ts +22 -0
- package/lib/interfaces/webview/webview-manager-service.js +3 -0
- package/lib/interfaces/webview/webview-manager-service.js.map +1 -0
- package/lib/interfaces/webview/webview-port-mapping.d.ts +4 -0
- package/lib/interfaces/webview/webview-port-mapping.js +3 -0
- package/lib/interfaces/webview/webview-port-mapping.js.map +1 -0
- package/lib/interfaces/webview/webview.d.ts +99 -0
- package/lib/interfaces/webview/webview.js +9 -0
- package/lib/interfaces/webview/webview.js.map +1 -0
- package/lib/main.d.ts +0 -0
- package/lib/main.js +3 -0
- package/lib/main.js.map +1 -0
- package/lib/protocol/client.protocol.d.ts +99 -0
- package/lib/protocol/client.protocol.js +8 -0
- package/lib/protocol/client.protocol.js.map +1 -0
- package/lib/protocol/common.protocol.d.ts +289 -0
- package/lib/protocol/common.protocol.js +68 -0
- package/lib/protocol/common.protocol.js.map +1 -0
- package/lib/protocol/editor-missing-types.d.ts +87 -0
- package/lib/protocol/editor-missing-types.js +10 -0
- package/lib/protocol/editor-missing-types.js.map +1 -0
- package/lib/protocol/index.d.ts +6 -0
- package/lib/protocol/index.js +24 -0
- package/lib/protocol/index.js.map +1 -0
- package/lib/protocol/proxy-identifier.d.ts +51 -0
- package/lib/protocol/proxy-identifier.js +59 -0
- package/lib/protocol/proxy-identifier.js.map +1 -0
- package/lib/protocol/rpc-logger.d.ts +8 -0
- package/lib/protocol/rpc-logger.js +60 -0
- package/lib/protocol/rpc-logger.js.map +1 -0
- package/lib/protocol/rpc-protocol.d.ts +148 -0
- package/lib/protocol/rpc-protocol.js +750 -0
- package/lib/protocol/rpc-protocol.js.map +1 -0
- package/lib/protocol/rpc-protocol.test.d.ts +1 -0
- package/lib/protocol/rpc-protocol.test.js +171 -0
- package/lib/protocol/rpc-protocol.test.js.map +1 -0
- package/lib/protocol/server.protocol-bk.d.ts +0 -0
- package/lib/protocol/server.protocol-bk.js +719 -0
- package/lib/protocol/server.protocol-bk.js.map +1 -0
- package/lib/protocol/server.protocol.d.ts +91 -0
- package/lib/protocol/server.protocol.js +31 -0
- package/lib/protocol/server.protocol.js.map +1 -0
- package/lib/protocol/shared/editor.d.ts +4 -0
- package/lib/protocol/shared/editor.js +28 -0
- package/lib/protocol/shared/editor.js.map +1 -0
- package/lib/protocol/shared/tasks.d.ts +104 -0
- package/lib/protocol/shared/tasks.js +4 -0
- package/lib/protocol/shared/tasks.js.map +1 -0
- package/lib/protocol/temporary-types.d.ts +198 -0
- package/lib/protocol/temporary-types.js +30 -0
- package/lib/protocol/temporary-types.js.map +1 -0
- package/lib/protocol/utils/index.d.ts +1 -0
- package/lib/protocol/utils/index.js +18 -0
- package/lib/protocol/utils/index.js.map +1 -0
- package/lib/protocol/utils/lazy-promise.d.ts +18 -0
- package/lib/protocol/utils/lazy-promise.js +69 -0
- package/lib/protocol/utils/lazy-promise.js.map +1 -0
- package/lib/utils/errors.d.ts +6 -0
- package/lib/utils/errors.js +19 -0
- package/lib/utils/errors.js.map +1 -0
- package/lib/utils/extensions.d.ts +9 -0
- package/lib/utils/extensions.js +25 -0
- package/lib/utils/extensions.js.map +1 -0
- package/lib/utils/helper.test.d.ts +9 -0
- package/lib/utils/helper.test.js +15 -0
- package/lib/utils/helper.test.js.map +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +25 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/paths-util.d.ts +27 -0
- package/lib/utils/paths-util.js +127 -0
- package/lib/utils/paths-util.js.map +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.d.ts +28 -0
- package/lib/utils/rxjs/combineLatestOrDefault.js +111 -0
- package/lib/utils/rxjs/combineLatestOrDefault.js.map +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.d.ts +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.js +52 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.js.map +1 -0
- package/lib/utils/rxjs/index.d.ts +1 -0
- package/lib/utils/rxjs/index.js +18 -0
- package/lib/utils/rxjs/index.js.map +1 -0
- package/lib/utils/util.d.ts +19 -0
- package/lib/utils/util.js +57 -0
- package/lib/utils/util.js.map +1 -0
- package/lib/worker-lib/MessageTypes.d.ts +5 -0
- package/lib/worker-lib/MessageTypes.js +9 -0
- package/lib/worker-lib/MessageTypes.js.map +1 -0
- package/lib/worker-lib/index.d.ts +2 -0
- package/lib/worker-lib/index.js +19 -0
- package/lib/worker-lib/index.js.map +1 -0
- package/lib/worker-lib/webWorkerLink.d.ts +12 -0
- package/lib/worker-lib/webWorkerLink.js +96 -0
- package/lib/worker-lib/webWorkerLink.js.map +1 -0
- package/lib/worker-lib/workerUtils.d.ts +11 -0
- package/lib/worker-lib/workerUtils.js +178 -0
- package/lib/worker-lib/workerUtils.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { Primitive } from 'utility-types';
|
|
2
|
+
import { Expression, TemplateExpression } from '../../core/expr/evaluator';
|
|
3
|
+
import { IKeyPath } from '../configuration';
|
|
4
|
+
import { ReactHTML } from 'react';
|
|
5
|
+
export declare type IContributionScope = {
|
|
6
|
+
type: 'panelView';
|
|
7
|
+
id: string;
|
|
8
|
+
hasLocations: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The given contribution type as it's specified in a package.json (expressions as strings)
|
|
12
|
+
*/
|
|
13
|
+
export declare type Raw<TContribution> = {
|
|
14
|
+
[K in keyof TContribution]: RawValue<TContribution[K]>;
|
|
15
|
+
};
|
|
16
|
+
declare type RawValue<V> = V extends Expression<any> ? string : V extends Primitive | null | undefined ? V : Raw<V>;
|
|
17
|
+
/**
|
|
18
|
+
* The given contribution type after being evaluated (all expressions replaced with their value)
|
|
19
|
+
*/
|
|
20
|
+
export declare type Evaluated<TContribution> = {
|
|
21
|
+
[K in keyof TContribution]: EvaluatedValue<TContribution[K]>;
|
|
22
|
+
};
|
|
23
|
+
declare type EvaluatedValue<V> = V extends Expression<infer T> ? T : V extends Primitive | null | undefined ? V : Evaluated<V>;
|
|
24
|
+
export interface IContributionsItem extends Record<string, IContributions> {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Describes the functionality provided by an extension.
|
|
28
|
+
*/
|
|
29
|
+
export interface IContributions {
|
|
30
|
+
id?: string;
|
|
31
|
+
/** Actions contributed by the extension. */
|
|
32
|
+
actions?: IActionContribution[];
|
|
33
|
+
/** Menu items contributed by the extension. */
|
|
34
|
+
menus?: IMenuContributions;
|
|
35
|
+
/** Views contributed by the extension. */
|
|
36
|
+
views?: IViewContribution[];
|
|
37
|
+
/** Search filters contributed by the extension */
|
|
38
|
+
searchFilters?: ISearchFilters[];
|
|
39
|
+
/** @sri custom: Table columns contributes by the extension. */
|
|
40
|
+
tables?: ITableContributions;
|
|
41
|
+
/** @sri custom: Buttons contributes by the extension. */
|
|
42
|
+
buttons?: IButtonContributions;
|
|
43
|
+
/** @sri custom: PageNavBar contributes by the extension. */
|
|
44
|
+
pageNavBar?: IPageNavBarItemContributions[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An action contribution describes a command that can be invoked, along with a title, description, icon, etc.
|
|
48
|
+
*/
|
|
49
|
+
export interface IActionContribution {
|
|
50
|
+
/**
|
|
51
|
+
* The identifier for this action, which must be unique among all contributed actions.
|
|
52
|
+
*
|
|
53
|
+
* Extensions: By convention, this is a dotted string of the form `myExtensionName.myActionName`. It is common
|
|
54
|
+
* to use the same values for `id` and `command` (for the common case where the command has only one action
|
|
55
|
+
* that mentions it).
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* The command that this action invokes. It can refer to a command registered by the same
|
|
60
|
+
* extension or any other extension, or to a builtin command. If it is undefined, the action is
|
|
61
|
+
* a noop.
|
|
62
|
+
*
|
|
63
|
+
* See "[Builtin commands](../../../../doc/extensions/authoring/builtin_commands.md)" (online at
|
|
64
|
+
* https://docs.sourcegraph.com/extensions/authoring/builtin_commands) for documentation on
|
|
65
|
+
* builtin client commands.
|
|
66
|
+
*
|
|
67
|
+
* Extensions: The command must be registered (unless it is a builtin command). Extensions can
|
|
68
|
+
* register commands using {@link sourcegraph.commands.registerCommand}.
|
|
69
|
+
*
|
|
70
|
+
* Clients: All clients must implement the builtin commands as specified in the documentation
|
|
71
|
+
* above. If the command is undefined (which means the action is a noop), the action should be
|
|
72
|
+
* displayed in such a way that avoids suggesting it can be clicked/activated (e.g., there
|
|
73
|
+
* should not be any hover or active state on the button).
|
|
74
|
+
*
|
|
75
|
+
* @see IActionContributionClientCommandOpen
|
|
76
|
+
* @see IActionContributionClientCommandUpdateConfiguration
|
|
77
|
+
*/
|
|
78
|
+
command?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Optional arguments to pass to the extension when the action is invoked.
|
|
81
|
+
* Strings are interpreted as template strings, any other value is taken as-is.
|
|
82
|
+
*/
|
|
83
|
+
commandArguments?: (TemplateExpression | number | boolean | null | object | any[])[];
|
|
84
|
+
/** The title that succinctly describes what this action does. */
|
|
85
|
+
title?: TemplateExpression;
|
|
86
|
+
/**
|
|
87
|
+
* The category that describes the group of related actions of which this action is a member.
|
|
88
|
+
*
|
|
89
|
+
* Clients: When displaying this action's title alongside titles of actions from other groups, the client
|
|
90
|
+
* should display each action as "${category}: ${title}" if the prefix is set.
|
|
91
|
+
*/
|
|
92
|
+
category?: TemplateExpression;
|
|
93
|
+
/**
|
|
94
|
+
* A longer description of the action taken by this action.
|
|
95
|
+
*
|
|
96
|
+
* Extensions: The description should not be unnecessarily repetitive with the title.
|
|
97
|
+
*
|
|
98
|
+
* Clients: If the description is shown, the title must be shown nearby.
|
|
99
|
+
*/
|
|
100
|
+
description?: TemplateExpression;
|
|
101
|
+
/**
|
|
102
|
+
* A URL to an icon for this action (data: URIs are OK).
|
|
103
|
+
*
|
|
104
|
+
* Clients: The client should show this icon before the title, proportionally scaling the dimensions as
|
|
105
|
+
* necessary to avoid unduly enlarging the item beyond the dimensions necessary to render the text. The client
|
|
106
|
+
* should assume the icon is square (or roughly square). The client must not display a border around the icon.
|
|
107
|
+
* The client may choose not to display this icon.
|
|
108
|
+
*/
|
|
109
|
+
iconURL?: TemplateExpression;
|
|
110
|
+
/**
|
|
111
|
+
* A specification of how to display this action as a button on a toolbar. The client is responsible for
|
|
112
|
+
* displaying contributions and defining which parts of its interface are considered to be toolbars. Generally,
|
|
113
|
+
* items on a toolbar are always visible and, compared to items in a dropdown menu or list, are expected to be
|
|
114
|
+
* smaller and to convey information (in addition to performing an action).
|
|
115
|
+
*
|
|
116
|
+
* For example, a "Toggle code coverage" action may prefer to display a summarized status (such as "Coverage:
|
|
117
|
+
* 77%") on a toolbar instead of the full title.
|
|
118
|
+
*
|
|
119
|
+
* Clients: If the label is empty and only an iconURL is set, and the client decides not to display the icon
|
|
120
|
+
* (e.g., because the client is not graphical), then the client may hide the item from the toolbar.
|
|
121
|
+
*/
|
|
122
|
+
actionItem?: IActionItem;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Narrows the type of {@link ActionContribution} for actions that invoke the `open` client command.
|
|
126
|
+
*/
|
|
127
|
+
export interface IActionContributionClientCommandOpen extends IActionContribution {
|
|
128
|
+
command: 'open';
|
|
129
|
+
/**
|
|
130
|
+
* The arguments for the `open` client command. The first array element is a URL, which is opened by the client
|
|
131
|
+
* using the default URL handler.
|
|
132
|
+
*/
|
|
133
|
+
commandArguments: [TemplateExpression];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Narrows the type of {@link ActionContribution} for actions that invoke the `updateConfiguration` client command.
|
|
137
|
+
*/
|
|
138
|
+
export interface IActionContributionClientCommandUpdateConfiguration extends IActionContribution {
|
|
139
|
+
command: 'updateConfiguration';
|
|
140
|
+
/**
|
|
141
|
+
* The arguments for the `updateConfiguration` client command:
|
|
142
|
+
*
|
|
143
|
+
* 1. The key path of the value (in the configuration settings) to update
|
|
144
|
+
* 2. The value to insert at the key path
|
|
145
|
+
* 3. Optional: reserved for future use (must always be `null`)
|
|
146
|
+
* 4. Optional: 'json' if the client should parse the 2nd argument using JSON.parse before inserting the value
|
|
147
|
+
*/
|
|
148
|
+
commandArguments: [IKeyPath, TemplateExpression | number | boolean | object | any[] | null] | [IKeyPath, TemplateExpression, null, TemplateExpression<'json'>];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* A description of how to display an {@link ActionContribution} on a toolbar,
|
|
152
|
+
* with all template properties interpolated, and all expression properties replaced
|
|
153
|
+
* by their evaluated value.
|
|
154
|
+
*
|
|
155
|
+
* This value is set on the {@link ActionContribution#actionItem} interface field
|
|
156
|
+
* (it always is directly associated with an {@link ActionContribution}).
|
|
157
|
+
*
|
|
158
|
+
* It is necessary because an action's ({@link ActionContribution}'s) fields are intended for display in a command
|
|
159
|
+
* palette or list, not in a button. The {@link ActionContribution} fields usually have long, descriptive text
|
|
160
|
+
* values, and it does not make sense for them to show an icon. When the action is displayed as a button, however,
|
|
161
|
+
* it needs to have a much shorter text label and it often does make sense to show an icon. Therefore, the action's
|
|
162
|
+
* representation as a command in a list ({@link ActionContribution}) is separate from its representation as a
|
|
163
|
+
* button (in this type, {@link ActionItem}).
|
|
164
|
+
*
|
|
165
|
+
* Example: Consider a code coverage extension that adds an action to toggle showing coverage overlays on a file.
|
|
166
|
+
* The command title ({@link ActionContribution#title}) might be "Show/hide code coverage overlays", and the button
|
|
167
|
+
* label ({@link ActionItem#label}) would be "Coverage: 78%" (where the "78%" is the live coverage ratio).
|
|
168
|
+
*
|
|
169
|
+
* It is convenient to be able to specify both the command and button display representations of an action
|
|
170
|
+
* together, which is why {@link ActionItem} is in the field {@link ActionContribution#actionItem} instead of being
|
|
171
|
+
* listed as a separate contribution. They share most behavior and many other fields, so it reduces the amount of
|
|
172
|
+
* duplicate code to combine them. Also, some clients may not be able to display buttons and need to display the
|
|
173
|
+
* more verbose command form of an action, which is possible when they are combined.
|
|
174
|
+
*/
|
|
175
|
+
export interface IActionItem {
|
|
176
|
+
/** The text label for this item. */
|
|
177
|
+
label?: Expression<string>;
|
|
178
|
+
/**
|
|
179
|
+
* A description associated with this action item.
|
|
180
|
+
*
|
|
181
|
+
* Clients: The description should be shown in a tooltip when the user focuses or hovers this toolbar item.
|
|
182
|
+
*/
|
|
183
|
+
description?: Expression<string>;
|
|
184
|
+
/**
|
|
185
|
+
* The icon URL for this action (data: URIs are OK).
|
|
186
|
+
*
|
|
187
|
+
* Clients: The client should this icon before the label (if any), proportionally scaling the dimensions as
|
|
188
|
+
* necessary to avoid unduly enlarging the toolbar item beyond the dimensions necessary to show the label.
|
|
189
|
+
* In space-constrained situations, the client should show only the icon and omit the label. The client
|
|
190
|
+
* must not display a border around the icon. The client may choose not to display this icon.
|
|
191
|
+
*/
|
|
192
|
+
iconURL?: Expression<string>;
|
|
193
|
+
/**
|
|
194
|
+
* A description of the information represented by the icon.
|
|
195
|
+
*
|
|
196
|
+
* Clients: The client should not display this text directly. Instead, the client should use the
|
|
197
|
+
* accessibility facilities of the client's platform (such as the <img alt> attribute) to make it available
|
|
198
|
+
* to users needing the textual description.
|
|
199
|
+
*/
|
|
200
|
+
iconDescription?: Expression<string>;
|
|
201
|
+
/**
|
|
202
|
+
* Whether the action item should be rendered as a pressed button.
|
|
203
|
+
*/
|
|
204
|
+
pressed?: Expression<boolean>;
|
|
205
|
+
}
|
|
206
|
+
export declare enum IContributableMenu {
|
|
207
|
+
/** The global command palette. */
|
|
208
|
+
CommandPalette = "commandPalette",
|
|
209
|
+
/** The global navigation bar in the application. */
|
|
210
|
+
GlobalNav = "global/nav",
|
|
211
|
+
/** The title bar for the current document. */
|
|
212
|
+
EditorTitle = "editor/title",
|
|
213
|
+
/** A directory page (including for the root directory of a repository). */
|
|
214
|
+
DirectoryPage = "directory/page",
|
|
215
|
+
/** The hover tooltip. */
|
|
216
|
+
Hover = "hover",
|
|
217
|
+
/** The panel toolbar. */
|
|
218
|
+
PanelToolbar = "panel/toolbar",
|
|
219
|
+
/** The search results toolbar. */
|
|
220
|
+
SearchResultsToolbar = "search/results/toolbar",
|
|
221
|
+
/** The help menu in the application. */
|
|
222
|
+
Help = "help"
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* MenuContributions describes the menu items contributed by an extension.
|
|
226
|
+
*/
|
|
227
|
+
export interface IMenuContributions extends Partial<Record<IContributableMenu, IMenuItemContribution[]>> {
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* MenuItemContribution is a menu item contributed by an extension.
|
|
231
|
+
*/
|
|
232
|
+
export interface IMenuItemContribution {
|
|
233
|
+
/**
|
|
234
|
+
* The action to invoke when the item is selected. The value refers to a {@link ActionContribution#id} value.
|
|
235
|
+
*/
|
|
236
|
+
action: string;
|
|
237
|
+
/**
|
|
238
|
+
* An alternative action to invoke when the item is selected while pressing the Option/Alt/Meta/Ctrl/Cmd keys
|
|
239
|
+
* or using the middle mouse button. The value refers to a {@link ActionContribution#id} value.
|
|
240
|
+
*/
|
|
241
|
+
alt?: string;
|
|
242
|
+
/**
|
|
243
|
+
* An expression that, if given, must evaluate to true (or a truthy value) for this contribution to be
|
|
244
|
+
* displayed. The expression may use values from the context in which the contribution would be displayed.
|
|
245
|
+
*/
|
|
246
|
+
when?: Expression<boolean>;
|
|
247
|
+
/**
|
|
248
|
+
* The group in which this item is displayed. This defines the sort order of menu items. The group value is an
|
|
249
|
+
* opaque string (it is just compared relative to other items' group values); there is no specification set of
|
|
250
|
+
* expected or supported values.
|
|
251
|
+
*
|
|
252
|
+
* Clients: On a toolbar, the client should sort toolbar items by (group, action), with toolbar items lacking a
|
|
253
|
+
* group sorting last. The client must not display the group value.
|
|
254
|
+
*/
|
|
255
|
+
group?: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* A search filters interface with `name` and `value` to display on a filter chip
|
|
259
|
+
* in the search results filters bar.
|
|
260
|
+
*/
|
|
261
|
+
export interface ISearchFilters {
|
|
262
|
+
/**
|
|
263
|
+
* The name to be displayed on the search filter chip.
|
|
264
|
+
*/
|
|
265
|
+
name: string;
|
|
266
|
+
/**
|
|
267
|
+
* The value of the search filter chip (i.e. the literal search query string).
|
|
268
|
+
*/
|
|
269
|
+
value: string;
|
|
270
|
+
}
|
|
271
|
+
/** The containers to which an extension can contribute views. */
|
|
272
|
+
export declare const ContributableViewContainer: {
|
|
273
|
+
/**
|
|
274
|
+
* A view that is displayed in the panel for a window.
|
|
275
|
+
*
|
|
276
|
+
* Clients: The client should render this as a resizable panel in a window, with multiple tabs to switch
|
|
277
|
+
* between different panel views.
|
|
278
|
+
*/
|
|
279
|
+
readonly Panel: "window/panel";
|
|
280
|
+
/**
|
|
281
|
+
* A global page view, displayed as a standalone page at `/views/ID`.
|
|
282
|
+
*/
|
|
283
|
+
readonly GlobalPage: "global/page";
|
|
284
|
+
/**
|
|
285
|
+
* A view contributed to directory pages.
|
|
286
|
+
*/
|
|
287
|
+
readonly Directory: "directory";
|
|
288
|
+
/**
|
|
289
|
+
* A view contributed to the area on the homepage below the search box.
|
|
290
|
+
*/
|
|
291
|
+
readonly Homepage: "homepage";
|
|
292
|
+
/**
|
|
293
|
+
* A view contributed to the dashboard on the insights page.
|
|
294
|
+
*/
|
|
295
|
+
readonly InsightsPage: "insightsPage";
|
|
296
|
+
};
|
|
297
|
+
export declare type IContributableViewContainer = typeof ContributableViewContainer[keyof typeof ContributableViewContainer];
|
|
298
|
+
/**
|
|
299
|
+
* A view contributed by an extension.
|
|
300
|
+
*/
|
|
301
|
+
export interface IViewContribution {
|
|
302
|
+
/**
|
|
303
|
+
* The identifier for this view, which must be unique among all contributed views.
|
|
304
|
+
*/
|
|
305
|
+
id: string;
|
|
306
|
+
/**
|
|
307
|
+
* The container where this view will be displayed.
|
|
308
|
+
*/
|
|
309
|
+
where: IContributableViewContainer;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* TableContributions describes the table columns contributed by an extension.
|
|
313
|
+
*/
|
|
314
|
+
export interface ITableContributions extends Partial<Record<string, ITableColumnContribution[]>> {
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* TableColumnsContribution is a table columns contributed by an extension.
|
|
318
|
+
*/
|
|
319
|
+
export interface ITableColumnContribution {
|
|
320
|
+
/** column id */
|
|
321
|
+
id?: string;
|
|
322
|
+
/** column's title */
|
|
323
|
+
title: string;
|
|
324
|
+
/** value accessor */
|
|
325
|
+
accessor: string;
|
|
326
|
+
/** function which returns component to display in cell */
|
|
327
|
+
cell?: (...args: any[]) => any;
|
|
328
|
+
/** column width */
|
|
329
|
+
width?: number;
|
|
330
|
+
/** position of column in table */
|
|
331
|
+
position?: number;
|
|
332
|
+
/** column data is editable or not */
|
|
333
|
+
isEditable?: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* The action to invoke when the item is selected. The value refers to a {@link ActionContribution#id} value.
|
|
336
|
+
*/
|
|
337
|
+
action?: string;
|
|
338
|
+
/**
|
|
339
|
+
* An alternative action to invoke when the item is selected while pressing the Option/Alt/Meta/Ctrl/Cmd keys
|
|
340
|
+
* or using the middle mouse button. The value refers to a {@link ActionContribution#id} value.
|
|
341
|
+
*/
|
|
342
|
+
alt?: string;
|
|
343
|
+
/**
|
|
344
|
+
* An expression that, if given, must evaluate to true (or a truthy value) for this contribution to be
|
|
345
|
+
* displayed. The expression may use values from the context in which the contribution would be displayed.
|
|
346
|
+
*/
|
|
347
|
+
when?: Expression<boolean>;
|
|
348
|
+
/**
|
|
349
|
+
* The group in which this item is displayed. This defines the sort order of menu items. The group value is an
|
|
350
|
+
* opaque string (it is just compared relative to other items' group values); there is no specification set of
|
|
351
|
+
* expected or supported values.
|
|
352
|
+
*
|
|
353
|
+
* Clients: On a toolbar, the client should sort toolbar items by (group, action), with toolbar items lacking a
|
|
354
|
+
* group sorting last. The client must not display the group value.
|
|
355
|
+
*/
|
|
356
|
+
group?: string;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* ButtonContributions describes the each type of component contributed by an extension.
|
|
360
|
+
*/
|
|
361
|
+
export interface IButtonContributions extends Partial<Record<string, IButtonComponentContributions[]>> {
|
|
362
|
+
}
|
|
363
|
+
export interface IButtonComponentContributions {
|
|
364
|
+
id?: string;
|
|
365
|
+
/** type or name */
|
|
366
|
+
type: string;
|
|
367
|
+
/** function return react component */
|
|
368
|
+
component?: () => any;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* PageNavBarContributions describes the each type of component contributed by an extension.
|
|
372
|
+
*/
|
|
373
|
+
export interface IPageNavBarItemContributions {
|
|
374
|
+
id?: string;
|
|
375
|
+
name: string;
|
|
376
|
+
/** position of item (right | left)*/
|
|
377
|
+
position: string;
|
|
378
|
+
/** priority*/
|
|
379
|
+
priority?: number;
|
|
380
|
+
/** function return react component */
|
|
381
|
+
component: (params?: any) => ReactHTML | null;
|
|
382
|
+
}
|
|
383
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContributableViewContainer = exports.IContributableMenu = void 0;
|
|
4
|
+
var IContributableMenu;
|
|
5
|
+
(function (IContributableMenu) {
|
|
6
|
+
/** The global command palette. */
|
|
7
|
+
IContributableMenu["CommandPalette"] = "commandPalette";
|
|
8
|
+
/** The global navigation bar in the application. */
|
|
9
|
+
IContributableMenu["GlobalNav"] = "global/nav";
|
|
10
|
+
/** The title bar for the current document. */
|
|
11
|
+
IContributableMenu["EditorTitle"] = "editor/title";
|
|
12
|
+
/** A directory page (including for the root directory of a repository). */
|
|
13
|
+
IContributableMenu["DirectoryPage"] = "directory/page";
|
|
14
|
+
/** The hover tooltip. */
|
|
15
|
+
IContributableMenu["Hover"] = "hover";
|
|
16
|
+
/** The panel toolbar. */
|
|
17
|
+
IContributableMenu["PanelToolbar"] = "panel/toolbar";
|
|
18
|
+
/** The search results toolbar. */
|
|
19
|
+
IContributableMenu["SearchResultsToolbar"] = "search/results/toolbar";
|
|
20
|
+
/** The help menu in the application. */
|
|
21
|
+
IContributableMenu["Help"] = "help";
|
|
22
|
+
})(IContributableMenu = exports.IContributableMenu || (exports.IContributableMenu = {}));
|
|
23
|
+
/** The containers to which an extension can contribute views. */
|
|
24
|
+
exports.ContributableViewContainer = {
|
|
25
|
+
/**
|
|
26
|
+
* A view that is displayed in the panel for a window.
|
|
27
|
+
*
|
|
28
|
+
* Clients: The client should render this as a resizable panel in a window, with multiple tabs to switch
|
|
29
|
+
* between different panel views.
|
|
30
|
+
*/
|
|
31
|
+
Panel: 'window/panel',
|
|
32
|
+
/**
|
|
33
|
+
* A global page view, displayed as a standalone page at `/views/ID`.
|
|
34
|
+
*/
|
|
35
|
+
GlobalPage: 'global/page',
|
|
36
|
+
/**
|
|
37
|
+
* A view contributed to directory pages.
|
|
38
|
+
*/
|
|
39
|
+
Directory: 'directory',
|
|
40
|
+
/**
|
|
41
|
+
* A view contributed to the area on the homepage below the search box.
|
|
42
|
+
*/
|
|
43
|
+
Homepage: 'homepage',
|
|
44
|
+
/**
|
|
45
|
+
* A view contributed to the dashboard on the insights page.
|
|
46
|
+
*/
|
|
47
|
+
InsightsPage: 'insightsPage',
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution.js","sourceRoot":"","sources":["../../../src/interfaces/contributions/contribution.ts"],"names":[],"mappings":";;;AAyPA,IAAY,kBAwBX;AAxBD,WAAY,kBAAkB;IAC1B,kCAAkC;IAClC,uDAAiC,CAAA;IAEjC,oDAAoD;IACpD,8CAAwB,CAAA;IAExB,8CAA8C;IAC9C,kDAA4B,CAAA;IAE5B,2EAA2E;IAC3E,sDAAgC,CAAA;IAEhC,yBAAyB;IACzB,qCAAe,CAAA;IAEf,yBAAyB;IACzB,oDAA8B,CAAA;IAE9B,kCAAkC;IAClC,qEAA+C,CAAA;IAE/C,wCAAwC;IACxC,mCAAa,CAAA;AACjB,CAAC,EAxBW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAwB7B;AAuDD,iEAAiE;AACpD,QAAA,0BAA0B,GAAG;IACtC;;;;;OAKG;IACH,KAAK,EAAE,cAAc;IAErB;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,YAAY,EAAE,cAAc;CACtB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./contribution"), exports);
|
|
18
|
+
__exportStar(require("./contribution-service"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/contributions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yDAAuC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Observable, Unsubscribable } from 'rxjs';
|
|
2
|
+
import { IExtServices } from './ext-services';
|
|
3
|
+
import { IClientService } from '@adminide-stack/core';
|
|
4
|
+
import { IExecuteCommandParams } from './command';
|
|
5
|
+
export interface IController extends Unsubscribable {
|
|
6
|
+
/**
|
|
7
|
+
* Global notification messages that should be displayed to the user, from the following sources:
|
|
8
|
+
*
|
|
9
|
+
* - window/showMessage notifications from extensions
|
|
10
|
+
* - Errors thrown or returned in command invocation
|
|
11
|
+
*/
|
|
12
|
+
readonly notifications: Observable<Notification>;
|
|
13
|
+
services: IExtServices & IClientService;
|
|
14
|
+
/**
|
|
15
|
+
* Executes the command (registered in the CommandRegistry) specified in params. If an error is thrown, the
|
|
16
|
+
* error is retured *and* emitted on the {@link Controller#notifications} observable.
|
|
17
|
+
*
|
|
18
|
+
* All callers should execute commands using this method instead of calling
|
|
19
|
+
* {@link cdeops:CommandRegistry#executbeCommand} directly (to ensure errors are emitted as notications).
|
|
20
|
+
*
|
|
21
|
+
* @param suppressNotificationOnError By default, if command execution throws (or rejects with) an error, the
|
|
22
|
+
* error will be shown in the global notification UI component. Pass suppressNotificationOnError as true to
|
|
23
|
+
* skip this. The error is always returned to the caller.
|
|
24
|
+
*/
|
|
25
|
+
executeCommand(params: IExecuteCommandParams, suppressNotificationOnError?: boolean): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* Frees all resources associated with this client.
|
|
28
|
+
*/
|
|
29
|
+
unsubscribe(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/interfaces/controller.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/interfaces/errors.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IContributionScope, IContributions, Evaluated, IContributionUnsubscribable } from '../contributions';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IContributionsEntry } from '../contributions';
|
|
4
|
+
export interface IContributionRegistry {
|
|
5
|
+
/**
|
|
6
|
+
* Register contributions and return an unsubscribable that deregisters the contributions.
|
|
7
|
+
* Any expressions in the contributions need to be already parsed for fast re-evaluation.
|
|
8
|
+
*/
|
|
9
|
+
registerContributions(entryToRegister: IContributionsEntry): IContributionUnsubscribable;
|
|
10
|
+
/**
|
|
11
|
+
* Deregister contributions
|
|
12
|
+
* @param entryToDeregister
|
|
13
|
+
*/
|
|
14
|
+
deregisterContributions(entryToDeregister: IContributionsEntry): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Atomically deregister the previous contributions and register the next contributions. The registry's observable
|
|
17
|
+
* emits only one time after both operations are complete (instead of also emitting after the deregistration
|
|
18
|
+
* and before the registration).
|
|
19
|
+
*/
|
|
20
|
+
replaceContributions(previous: IContributionUnsubscribable, next: IContributionsEntry): IContributionUnsubscribable;
|
|
21
|
+
/**
|
|
22
|
+
* Returns an observable that emits all contributions (merged) evaluated in the current model
|
|
23
|
+
* (with the optional scope). It emits whenever there is any change.
|
|
24
|
+
*
|
|
25
|
+
* @template T Extra allowed property value types for the {@link Context} value. See
|
|
26
|
+
* {@link Context}'s `T` type parameter for more information.
|
|
27
|
+
* @param scope The scope in which contributions are fetched. A scope can be a sub-component of
|
|
28
|
+
* the UI that defines its own context keys, such as the hover, which stores useful loading and
|
|
29
|
+
* definition/reference state in its scoped context keys.
|
|
30
|
+
* @param extraContext Extra context values to use when computing the contributions. Properties
|
|
31
|
+
* in this object shadow (take precedence over) properties in the global context for this
|
|
32
|
+
* computation.
|
|
33
|
+
*/
|
|
34
|
+
getContributions<T>(scope?: IContributionScope | undefined): Observable<Evaluated<IContributions>>;
|
|
35
|
+
/**
|
|
36
|
+
* All contribution entries, emitted whenever the set of registered contributions changes.
|
|
37
|
+
*
|
|
38
|
+
* Most callers should use ContributionsRegistry#getContributions. Only use #entries if the
|
|
39
|
+
* caller needs information that is discarded when the contributions are merged (such as the
|
|
40
|
+
* extension that registered each set of contributions).
|
|
41
|
+
*/
|
|
42
|
+
readonly entries: Observable<IContributionsEntry[]> & {
|
|
43
|
+
value: IContributionsEntry[];
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributon-registry.js","sourceRoot":"","sources":["../../../src/interfaces/ext-services/contributon-registry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IViewerService } from './viewer-service';
|
|
2
|
+
import { ICommandRegistry } from '../command';
|
|
3
|
+
import { IContributionRegistry } from './contributon-registry';
|
|
4
|
+
import { IModelService } from './model-service';
|
|
5
|
+
import { IExtensionsService } from './extension-service';
|
|
6
|
+
import { IEnvironmentService } from '@adminide-stack/core';
|
|
7
|
+
import { IEnvironment } from '../generated-models';
|
|
8
|
+
import { IPanelViewProviderRegistry } from './panel-view-registry';
|
|
9
|
+
export interface IAdditionalExtServices {
|
|
10
|
+
externalEnvironmentService: IEnvironmentService & IEnvironment;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* All External Services
|
|
14
|
+
*/
|
|
15
|
+
export interface IExtServices {
|
|
16
|
+
viewer: IViewerService;
|
|
17
|
+
commands: ICommandRegistry;
|
|
18
|
+
contribution: IContributionRegistry;
|
|
19
|
+
model: IModelService;
|
|
20
|
+
extensions?: IExtensionsService;
|
|
21
|
+
panelView?: IPanelViewProviderRegistry;
|
|
22
|
+
windows?: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ext-services.js","sourceRoot":"","sources":["../../../src/interfaces/ext-services/ext-services.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Subscribable } from 'rxjs';
|
|
2
|
+
import { IExecutableExtension } from '../extension';
|
|
3
|
+
/**
|
|
4
|
+
* Manages the set of extensions that are available and activated.
|
|
5
|
+
*/
|
|
6
|
+
export interface IExtensionsService {
|
|
7
|
+
activeExtensions: Subscribable<IExecutableExtension[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-service.js","sourceRoot":"","sources":["../../../src/interfaces/ext-services/extension-service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './extension-service';
|
|
2
|
+
export * from './ext-services';
|
|
3
|
+
export * from './settings-service';
|
|
4
|
+
export * from './view-service';
|
|
5
|
+
export * from './model-service';
|
|
6
|
+
export * from './viewer-service';
|
|
7
|
+
export * from './contributon-registry';
|
|
8
|
+
export * from './panel-view-registry';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./extension-service"), exports);
|
|
18
|
+
__exportStar(require("./ext-services"), exports);
|
|
19
|
+
__exportStar(require("./settings-service"), exports);
|
|
20
|
+
__exportStar(require("./view-service"), exports);
|
|
21
|
+
__exportStar(require("./model-service"), exports);
|
|
22
|
+
__exportStar(require("./viewer-service"), exports);
|
|
23
|
+
__exportStar(require("./contributon-registry"), exports);
|
|
24
|
+
__exportStar(require("./panel-view-registry"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|