@cmusei/console-forge 0.0.1 → 0.9.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/README.md +171 -5
- package/fesm2022/cmusei-console-forge.mjs +169 -117
- package/fesm2022/cmusei-console-forge.mjs.map +1 -1
- package/lib/components/console-toolbar/console-toolbar.component.d.ts +3 -1
- package/lib/components/console-toolbar-default/console-toolbar-default.component.d.ts +7 -3
- package/lib/models/console-supported-features.d.ts +26 -0
- package/lib/models/console-toolbar-context.d.ts +5 -1
- package/lib/services/clipboard/clipboard.helpers.d.ts +0 -6
- package/lib/services/console-clients/console-client.service.d.ts +1 -1
- package/lib/services/console-clients/vmware/vmware-console-client.service.d.ts +2 -1
- package/lib/services/console-clients/vnc-console-client/vnc-console-client.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export declare class ConsoleToolbarComponent {
|
|
|
12
12
|
canvasRecordingStarted: import("@angular/core").OutputEmitterRef<void>;
|
|
13
13
|
canvasRecordingFinished: import("@angular/core").OutputEmitterRef<Blob>;
|
|
14
14
|
ctrlAltDelSent: import("@angular/core").OutputEmitterRef<void>;
|
|
15
|
+
keyboardInputSent: import("@angular/core").OutputEmitterRef<string>;
|
|
15
16
|
networkConnectionRequested: import("@angular/core").OutputEmitterRef<string>;
|
|
16
17
|
networkDisconnectRequested: import("@angular/core").OutputEmitterRef<void>;
|
|
17
18
|
powerRequestSent: import("@angular/core").OutputEmitterRef<ConsolePowerRequest>;
|
|
@@ -29,6 +30,7 @@ export declare class ConsoleToolbarComponent {
|
|
|
29
30
|
constructor();
|
|
30
31
|
protected handleCopyScreenshot(): Promise<void>;
|
|
31
32
|
protected handleFullscreen(): Promise<void>;
|
|
33
|
+
protected handleKeyboardInputSend(text: string): Promise<void>;
|
|
32
34
|
protected handleNetworkConnectionRequest(networkName: string): void;
|
|
33
35
|
protected handleRecordScreenStart(): void;
|
|
34
36
|
protected handleRecordScreenStop(): Promise<Blob>;
|
|
@@ -36,5 +38,5 @@ export declare class ConsoleToolbarComponent {
|
|
|
36
38
|
private handleSendPowerRequest;
|
|
37
39
|
protected handleSendTextToClipboard(text: string): Promise<void>;
|
|
38
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleToolbarComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarComponent, "cf-console-toolbar", never, { "consoleClient": { "alias": "consoleClient"; "required": true; "isSignal": true; }; "consoleNetworkConfig": { "alias": "consoleNetworkConfig"; "required": false; "isSignal": true; }; "customToolbarComponent": { "alias": "customToolbarComponent"; "required": false; "isSignal": true; }; }, { "canvasRecordingStarted": "canvasRecordingStarted"; "canvasRecordingFinished": "canvasRecordingFinished"; "ctrlAltDelSent": "ctrlAltDelSent"; "networkConnectionRequested": "networkConnectionRequested"; "networkDisconnectRequested": "networkDisconnectRequested"; "powerRequestSent": "powerRequestSent"; "screenshotCopied": "screenshotCopied"; "toggleFullscreen": "toggleFullscreen"; }, never, never, true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarComponent, "cf-console-toolbar", never, { "consoleClient": { "alias": "consoleClient"; "required": true; "isSignal": true; }; "consoleNetworkConfig": { "alias": "consoleNetworkConfig"; "required": false; "isSignal": true; }; "customToolbarComponent": { "alias": "customToolbarComponent"; "required": false; "isSignal": true; }; }, { "canvasRecordingStarted": "canvasRecordingStarted"; "canvasRecordingFinished": "canvasRecordingFinished"; "ctrlAltDelSent": "ctrlAltDelSent"; "keyboardInputSent": "keyboardInputSent"; "networkConnectionRequested": "networkConnectionRequested"; "networkDisconnectRequested": "networkDisconnectRequested"; "powerRequestSent": "powerRequestSent"; "screenshotCopied": "screenshotCopied"; "toggleFullscreen": "toggleFullscreen"; }, never, never, true, never>;
|
|
40
42
|
}
|
|
@@ -8,23 +8,27 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class ConsoleToolbarDefaultComponent implements ConsoleToolbarComponentBase {
|
|
9
9
|
consoleContext: import("@angular/core").InputSignal<ConsoleToolbarContext>;
|
|
10
10
|
protected isClipboardDialogOpen: boolean;
|
|
11
|
+
protected isKeyboardDialogOpen: boolean;
|
|
11
12
|
protected isNetworkDialogOpen: boolean;
|
|
12
13
|
protected isPowerDialogOpen: boolean;
|
|
13
14
|
protected isSettingsDialogOpen: boolean;
|
|
15
|
+
protected keyboardInputText: import("@angular/core").ModelSignal<string>;
|
|
14
16
|
protected readonly cfConfig: ConsoleForgeConfig;
|
|
17
|
+
private readonly clipboardService;
|
|
15
18
|
protected readonly clipboardTextInput: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
16
|
-
protected readonly userSettings: import("@angular/core").Signal<import("../../models/console-user-settings").ConsoleUserSettings>;
|
|
17
19
|
protected handleChangeToolbarPosition(position: ConsoleToolbarPosition): void;
|
|
18
20
|
protected handleClipboardDialogOpenClose(isOpen: boolean): void;
|
|
19
21
|
protected handleClipboardCopyLastText(text: string): void;
|
|
20
22
|
protected handleNetworkChangeRequested(networkName?: string): void;
|
|
21
23
|
protected handleNetworkDialogOpenClose(isOpen: boolean): void;
|
|
22
24
|
protected handleRecordToggle(): void;
|
|
23
|
-
protected handleSendClipboardText(event: Event, text: string): void
|
|
25
|
+
protected handleSendClipboardText(event: Event, text: string): Promise<void>;
|
|
26
|
+
protected handlSendKeyboardCtrlAltDel(): Promise<void>;
|
|
27
|
+
protected handleSendKeyboardInput(event: Event, text: string): Promise<void>;
|
|
24
28
|
protected handleSendPowerRequest(request: ConsolePowerRequest): Promise<void>;
|
|
25
29
|
protected handleSettingsDialogOpenClose(isOpen: boolean): void;
|
|
26
30
|
protected handleSettingsAllowLocalClipboardWrite(allow: boolean): void;
|
|
27
31
|
protected handleSettingsPreserveAspectRatioChange(preserveAspectRatioOnScale: boolean): void;
|
|
28
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleToolbarDefaultComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarDefaultComponent, "cf-console-toolbar-default", never, { "consoleContext": { "alias": "consoleContext"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarDefaultComponent, "cf-console-toolbar-default", never, { "consoleContext": { "alias": "consoleContext"; "required": true; "isSignal": true; }; "keyboardInputText": { "alias": "keyboardInputText"; "required": false; "isSignal": true; }; }, { "keyboardInputText": "keyboardInputTextChange"; }, never, never, true, never>;
|
|
30
34
|
}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export interface ConsoleSupportedFeatures {
|
|
2
|
+
/**
|
|
3
|
+
* This is basically a stupid kludge that is only here because VMWare's client has a very weird implementation of "copy".
|
|
4
|
+
*
|
|
5
|
+
* The VMWare "WMKS" client only emits clipboard events after the remote console's clipboard receives new data (i.e. you copy some content on the remote desktop)
|
|
6
|
+
* AND after the console canvas loses focus. That is, no matter how much copying you do, the client doesn't know about until the canvas housing the console
|
|
7
|
+
* is blurred.
|
|
8
|
+
*
|
|
9
|
+
* The downstream effect of this that, unlike with other protocols, we can't gracefully emit events when copies happen or automatically copy to your local
|
|
10
|
+
* clipboard in a reasonable way, because we can't know when the remote copy happened and if you really want it copied to your local CB or not. So when this
|
|
11
|
+
* flag is set to false (VMWare is the only service which does this), we show a panel in the default toolbar that you can manually copy content from and
|
|
12
|
+
* automatically receives the last "copy" event from the console.
|
|
13
|
+
*
|
|
14
|
+
* Yuck.
|
|
15
|
+
*/
|
|
16
|
+
clipboardAutomaticLocalCopy: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates whether the remote console protocol allows us to write content directly to the clipboard of the remote machine.
|
|
19
|
+
*/
|
|
20
|
+
clipboardRemoteWrite: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Indicates whether there remote console offers an on-screen keyboard. (Hint: probably not. As far as we know, VMWare's WMKS is the only one that will do this.)
|
|
23
|
+
*/
|
|
2
24
|
onScreenKeyboard: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates whether the remote console protocol allows us to issue power requests (like restart, reboot, and hard reboot). This is typically a configuration detail
|
|
27
|
+
* of the machine, so we usually have to rely on the protocol-specific service to tell us whether the feature is enabled (see our VNC client, wrapping noVnc, for an example)
|
|
28
|
+
*/
|
|
3
29
|
powerManagement: boolean;
|
|
4
30
|
}
|
|
@@ -5,13 +5,17 @@ import { ConsoleSupportedFeatures } from "./console-supported-features";
|
|
|
5
5
|
import { ConsoleComponentNetworkConfig } from "./console-component-network-config";
|
|
6
6
|
import { UserSettingsService } from "../services/user-settings.service";
|
|
7
7
|
export interface ConsoleToolbarContext {
|
|
8
|
+
clipboard: {
|
|
9
|
+
consoleClipboardText: Signal<string>;
|
|
10
|
+
sendTextToConsoleClipboard(text: string): Promise<void>;
|
|
11
|
+
};
|
|
8
12
|
console: {
|
|
9
13
|
copyScreenshot(): Promise<void>;
|
|
10
14
|
recordScreenStart(): void;
|
|
11
15
|
recordScreenStop(): Promise<Blob>;
|
|
12
16
|
sendCtrlAltDel(): Promise<void>;
|
|
17
|
+
sendKeyboardInput(text: string): Promise<void>;
|
|
13
18
|
sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
|
|
14
|
-
sendTextToClipboard(text: string): Promise<void>;
|
|
15
19
|
supportedFeatures: Signal<ConsoleSupportedFeatures>;
|
|
16
20
|
toggleFullscreen(): Promise<void>;
|
|
17
21
|
};
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param clipboardItem - The ClipboardItem to extract text from.
|
|
5
5
|
* @returns A promise that resolves to the extracted text, or null if no text is present.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const text = await getTextFromClipboardItem(item);
|
|
9
|
-
* if (text) {
|
|
10
|
-
* console.log("Clipboard text:", text);
|
|
11
|
-
* }
|
|
12
6
|
*/
|
|
13
7
|
export declare function getTextFromClipboardItem(clipboardItem?: ClipboardItem): Promise<string | null>;
|
|
14
8
|
export declare function getClipboardItemFromText(text: string): ClipboardItem;
|
|
@@ -8,10 +8,10 @@ export interface ConsoleClientService {
|
|
|
8
8
|
readonly consoleClipboardUpdated: Signal<string>;
|
|
9
9
|
readonly supportedFeatures: Signal<ConsoleSupportedFeatures>;
|
|
10
10
|
connect(url: string, options: ConsoleConnectionOptions): Promise<ConsoleSupportedFeatures>;
|
|
11
|
-
copyVmClipboard(): Promise<void>;
|
|
12
11
|
disconnect(): Promise<void>;
|
|
13
12
|
sendClipboardText(text: string): Promise<void>;
|
|
14
13
|
sendCtrlAltDelete(): Promise<void>;
|
|
14
|
+
sendKeyboardInput(text: string): Promise<void>;
|
|
15
15
|
sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
|
|
16
16
|
setPreserveAspectRatioOnScale(preserve: boolean): Promise<void>;
|
|
17
17
|
setIsViewOnly(isViewOnly: boolean): Promise<void>;
|
|
@@ -9,6 +9,7 @@ export declare class VmWareConsoleClientService implements ConsoleClientService
|
|
|
9
9
|
private readonly clipboardService;
|
|
10
10
|
private readonly logger;
|
|
11
11
|
private readonly document;
|
|
12
|
+
private readonly userSettings;
|
|
12
13
|
private readonly window;
|
|
13
14
|
private wmksClient?;
|
|
14
15
|
private readonly _connectionStatus;
|
|
@@ -21,9 +22,9 @@ export declare class VmWareConsoleClientService implements ConsoleClientService
|
|
|
21
22
|
private readonly _needsCanvasSizeUpdateSub;
|
|
22
23
|
connect(url: string, options: ConsoleConnectionOptions): Promise<ConsoleSupportedFeatures>;
|
|
23
24
|
disconnect(): Promise<void>;
|
|
24
|
-
copyVmClipboard(): Promise<void>;
|
|
25
25
|
sendClipboardText(text: string): Promise<void>;
|
|
26
26
|
sendCtrlAltDelete(): Promise<void>;
|
|
27
|
+
sendKeyboardInput(text: string): Promise<void>;
|
|
27
28
|
sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
|
|
28
29
|
setIsViewOnly(isViewOnly: boolean): Promise<void>;
|
|
29
30
|
setPreserveAspectRatioOnScale(scaleToContainerSize: boolean): Promise<void>;
|
|
@@ -19,9 +19,9 @@ export declare class VncConsoleClientService implements ConsoleClientService {
|
|
|
19
19
|
connect(url: string, options: ConsoleConnectionOptions): Promise<ConsoleSupportedFeatures>;
|
|
20
20
|
disconnect(): Promise<void>;
|
|
21
21
|
dispose(): Promise<void>;
|
|
22
|
-
copyVmClipboard(): Promise<void>;
|
|
23
22
|
sendClipboardText(text: string): Promise<void>;
|
|
24
23
|
sendCtrlAltDelete(): Promise<void>;
|
|
24
|
+
sendKeyboardInput(text: string): Promise<void>;
|
|
25
25
|
sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
|
|
26
26
|
setIsViewOnly(isViewOnly: boolean): Promise<void>;
|
|
27
27
|
setPreserveAspectRatioOnScale(preserve: boolean): Promise<void>;
|