phirepass-widgets 0.0.112 → 0.0.114
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 +33 -0
- package/dist/cjs/{index-B8w6l0VL.js → index-BCgmMoIq.js} +103 -32
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3717 -0
- package/dist/cjs/phirepass-rdp.cjs.entry.js +18 -6
- package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
- package/dist/cjs/phirepass-widgets.cjs.js +3 -3
- package/dist/cjs/protocol-CYh109n2.js +1472 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/common/channel.js +21 -1
- package/dist/collection/common/fetch.js +44 -0
- package/dist/collection/components/phirepass-downloader/form.js +69 -0
- package/dist/collection/components/phirepass-downloader/format.js +105 -0
- package/dist/collection/components/phirepass-downloader/jobs.js +373 -0
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +1109 -0
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +1455 -0
- package/dist/collection/components/phirepass-downloader/source.js +120 -0
- package/dist/collection/components/phirepass-downloader/views/dialogs.js +34 -0
- package/dist/collection/components/phirepass-downloader/views/fetch-form.js +65 -0
- package/dist/collection/components/phirepass-downloader/views/icons.js +33 -0
- package/dist/collection/components/phirepass-downloader/views/job-row.js +91 -0
- package/dist/collection/components/phirepass-downloader/views/notices.js +15 -0
- package/dist/collection/components/phirepass-downloader/views/states.js +19 -0
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +216 -0
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +473 -0
- package/dist/collection/components/phirepass-media-player/player.js +94 -0
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +36 -13
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +122 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +35 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +181 -31
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/collection/testing/fixtures.js +219 -0
- package/dist/collection/testing/mock-channel.js +410 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-BtMWUitf.js +1 -0
- package/dist/components/p-C4cmk3bS.js +1 -0
- package/dist/components/p-CKnb-oeB.js +1 -0
- package/dist/components/phirepass-downloader.d.ts +11 -0
- package/dist/components/phirepass-downloader.js +1 -0
- package/dist/components/phirepass-media-player.d.ts +11 -0
- package/dist/components/phirepass-media-player.js +1 -0
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +2 -2
- package/dist/esm/{index-DGq2b7rM.js → index-Dd9o0CbU.js} +103 -32
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-downloader_3.entry.js +3713 -0
- package/dist/esm/phirepass-rdp.entry.js +18 -6
- package/dist/esm/phirepass-terminal.entry.js +6 -5
- package/dist/esm/phirepass-widgets.js +4 -4
- package/dist/esm/protocol-BtMWUitf.js +1467 -0
- package/dist/phirepass-widgets/p-97d84225.entry.js +1 -0
- package/dist/phirepass-widgets/p-BtMWUitf.js +1 -0
- package/dist/phirepass-widgets/p-Dd9o0CbU.js +3 -0
- package/dist/phirepass-widgets/p-a4a5e5f5.entry.js +1 -0
- package/dist/phirepass-widgets/{p-1fef5b5f.entry.js → p-a5ce104d.entry.js} +2 -2
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/channel.d.ts +30 -0
- package/dist/types/common/fetch.d.ts +167 -0
- package/dist/types/components/phirepass-downloader/form.d.ts +54 -0
- package/dist/types/components/phirepass-downloader/format.d.ts +17 -0
- package/dist/types/components/phirepass-downloader/jobs.d.ts +116 -0
- package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +231 -0
- package/dist/types/components/phirepass-downloader/source.d.ts +61 -0
- package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +52 -0
- package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +31 -0
- package/dist/types/components/phirepass-downloader/views/icons.d.ts +5 -0
- package/dist/types/components/phirepass-downloader/views/job-row.d.ts +21 -0
- package/dist/types/components/phirepass-downloader/views/notices.d.ts +18 -0
- package/dist/types/components/phirepass-downloader/views/states.d.ts +38 -0
- package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +67 -0
- package/dist/types/components/phirepass-media-player/player.d.ts +43 -0
- package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +10 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +30 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +40 -0
- package/dist/types/components.d.ts +426 -34
- package/dist/types/stencil-public-runtime.d.ts +1 -1
- package/dist/types/testing/fixtures.d.ts +25 -0
- package/dist/types/testing/mock-channel.d.ts +132 -0
- package/package.json +26 -12
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +0 -1469
- package/dist/cjs/protocol-COvteaUJ.js +0 -1044
- package/dist/components/p-Dur4cBX7.js +0 -1
- package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
- package/dist/esm/protocol-Dur4cBX7.js +0 -1039
- package/dist/phirepass-widgets/p-8eb3ec24.entry.js +0 -1
- package/dist/phirepass-widgets/p-9a1f9b9f.entry.js +0 -1
- package/dist/phirepass-widgets/p-DGq2b7rM.js +0 -3
- package/dist/phirepass-widgets/p-Dur4cBX7.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-
|
|
2
|
-
import { _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-Dd9o0CbU.js';
|
|
2
|
+
import { _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-BtMWUitf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* RDP's display-control PDU describes a monitor in whole, even pixels within
|
|
@@ -225,7 +225,8 @@ const phirepassRdpCss = () => `:host{display:block;width:100%;height:100%;min-wi
|
|
|
225
225
|
|
|
226
226
|
const PhirepassRdp = class {
|
|
227
227
|
constructor(hostRef) {
|
|
228
|
-
|
|
228
|
+
if (new.target === PhirepassRdp)
|
|
229
|
+
registerInstance(this, hostRef);
|
|
229
230
|
this.connectionStateChanged = createEvent(this, "connectionStateChanged");
|
|
230
231
|
}
|
|
231
232
|
channel;
|
|
@@ -316,6 +317,12 @@ const PhirepassRdp = class {
|
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
serverId;
|
|
320
|
+
/**
|
|
321
|
+
* Supplies the channel instead of a WebSocket to the server — for demos,
|
|
322
|
+
* screenshots and tests, as on the terminal and SFTP client. A property
|
|
323
|
+
* only; read once, when the widget connects.
|
|
324
|
+
*/
|
|
325
|
+
channelFactory;
|
|
319
326
|
onServerIdChange(_newValue, _oldValue) {
|
|
320
327
|
this.onNodeIdChange(this.nodeId, this.nodeId);
|
|
321
328
|
}
|
|
@@ -335,7 +342,9 @@ const PhirepassRdp = class {
|
|
|
335
342
|
// A widget can be moved in the DOM rather than destroyed, which
|
|
336
343
|
// disconnects and reconnects it; the second life is a real one.
|
|
337
344
|
this.disposed = false;
|
|
338
|
-
|
|
345
|
+
if (!this.channelFactory) {
|
|
346
|
+
await __wbg_init();
|
|
347
|
+
}
|
|
339
348
|
this.open_comms();
|
|
340
349
|
this.runtimeReady = true;
|
|
341
350
|
if (!this.nodeId) {
|
|
@@ -431,7 +440,10 @@ const PhirepassRdp = class {
|
|
|
431
440
|
this.channel.connect();
|
|
432
441
|
}
|
|
433
442
|
open_comms() {
|
|
434
|
-
if (this.
|
|
443
|
+
if (this.channelFactory) {
|
|
444
|
+
this.channel = this.channelFactory(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId || undefined);
|
|
445
|
+
}
|
|
446
|
+
else if (this.serverId) {
|
|
435
447
|
this.channel = new Channel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId);
|
|
436
448
|
}
|
|
437
449
|
else {
|
|
@@ -750,7 +762,7 @@ const PhirepassRdp = class {
|
|
|
750
762
|
this.request_tunnel();
|
|
751
763
|
}
|
|
752
764
|
render() {
|
|
753
|
-
return (h(Host, { key: '
|
|
765
|
+
return (h(Host, { key: '04896084a5e914a9e2a184ee7b560f4978da9bfd' }, h("div", { key: 'db5d3d0d4351aeb868ffe6956b86f22b62775e4b', class: "screen", ref: (el) => (this.containerEl = el) }, h("slot", { key: 'efafd5d8b1437687713aff0425c050413593d162' })), this.credentialsPrompt && (h("form", { key: 'ad6079b6db1d71e8eb60bef71cd808be22b7387c', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, h("label", { key: 'b976c7a3c01e4983fac39e1ef027e4307a6654c7', htmlFor: "rdp-username" }, "Username"), h("input", { key: '3a90a73a446015d708eaebec6a7d9bc1703ae5d0', id: "rdp-username", type: "text", autocomplete: "off", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), h("label", { key: 'eaf13aa5fe39e4576de052b15c85e6b60be466cb', htmlFor: "rdp-password" }, "Password"), h("input", { key: 'd53ec8c48b7826b011a07bcb57b7ae1fbe30160f', id: "rdp-password", type: "password", autocomplete: "off", onInput: (event) => (this.passwordBuffer = event.target.value) }), h("button", { key: 'd1616e75c1f37a853ec793a25ffc8919544c16d2', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (h("div", { key: '8e6deb9e32f0c416bf85666847f10e095f40e210', class: "status" }, this.statusMessage))));
|
|
754
766
|
}
|
|
755
767
|
static get watchers() { return {
|
|
756
768
|
"nodeId": [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h as h$1, H as Host } from './index-
|
|
2
|
-
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h as h$1, H as Host } from './index-Dd9o0CbU.js';
|
|
2
|
+
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-BtMWUitf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -267,7 +267,8 @@ const KEY_BAR_KEYS = [
|
|
|
267
267
|
];
|
|
268
268
|
const PhirepassTerminal = class {
|
|
269
269
|
constructor(hostRef) {
|
|
270
|
-
|
|
270
|
+
if (new.target === PhirepassTerminal)
|
|
271
|
+
registerInstance(this, hostRef);
|
|
271
272
|
this.connectionStateChanged = createEvent(this, "connectionStateChanged");
|
|
272
273
|
}
|
|
273
274
|
terminal;
|
|
@@ -952,13 +953,13 @@ const PhirepassTerminal = class {
|
|
|
952
953
|
return (h$1("button", { key: id, type: "button", class: { key: true, armed: !!armed }, "aria-label": hint, "aria-pressed": armed === undefined ? undefined : String(armed), onPointerDown: (event) => event.preventDefault(), onMouseDown: (event) => event.preventDefault(), onClick: onPress }, label));
|
|
953
954
|
}
|
|
954
955
|
render() {
|
|
955
|
-
return (h$1(Host, { key: '
|
|
956
|
+
return (h$1(Host, { key: '7916b1ec27e8557c5327364992658bbd9456a050', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, h$1("div", { key: '7b1716371a6df4d3330b94e8a23195069628ccc0', id: "ccc", ref: el => (this.containerEl = el) }), h$1("div", { key: 'fb43cc80fbf8d0d6374ed03d980f04cfaec1bd5a', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
|
|
956
957
|
this.ctrlArmed = !this.ctrlArmed;
|
|
957
958
|
this.terminal?.focus();
|
|
958
959
|
}, this.ctrlArmed), this.key_button('alt', 'alt', 'Alt', () => {
|
|
959
960
|
this.altArmed = !this.altArmed;
|
|
960
961
|
this.terminal?.focus();
|
|
961
|
-
}, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), h$1("span", { key: '
|
|
962
|
+
}, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), h$1("span", { key: '0bbada06a098775bfdab27fde2580abe6fdd969d', class: "spacer" }), this.key_button('left', '←', 'Left arrow', () => this.press(this.arrow('D'))), this.key_button('down', '↓', 'Down arrow', () => this.press(this.arrow('B'))), this.key_button('up', '↑', 'Up arrow', () => this.press(this.arrow('A'))), this.key_button('right', '→', 'Right arrow', () => this.press(this.arrow('C'))))));
|
|
962
963
|
}
|
|
963
964
|
static get watchers() { return {
|
|
964
965
|
"nodeId": [{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-Dd9o0CbU.js';
|
|
2
|
+
export { s as setNonce } from './index-Dd9o0CbU.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.45.
|
|
6
|
+
Stencil Client Patch Browser v4.45.4 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["phirepass-rdp",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"credentialsPrompt":[32],"statusMessage":[32],"toggleFullscreen":[64],"keyboardLockSupported":[64],"focusDesktop":[64],"sendCtrlAltDel":[64],"sendMetaKey":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-
|
|
20
|
+
return bootstrapLazy([["phirepass-rdp",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"channelFactory":[16],"credentialsPrompt":[32],"statusMessage":[32],"toggleFullscreen":[64],"keyboardLockSupported":[64],"focusDesktop":[64],"sendCtrlAltDel":[64],"sendMetaKey":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal",[[513,"phirepass-terminal",{"terminalOptions":[16],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"keyBar":[1,"key-bar"],"serverId":[1,"server-id"],"channelFactory":[16],"ctrlArmed":[32],"altArmed":[32]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-downloader_3",[[513,"phirepass-sftp-client",{"name":[1],"description":[1],"hideHeader":[4,"hide-header"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"serverId":[1,"server-id"],"channelFactory":[16],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_error":[32],"error_message":[32],"show_login_screen_password":[32],"show_navigation":[32],"breadcrumbs":[32],"current_dir":[32],"listing":[32],"show_content":[32],"show_loader":[32],"version":[32],"status":[32],"selected_item":[32],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_speed":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[32],"download_speed":[32],"download_finished":[32],"show_delete_modal":[32],"delete_file_name":[32],"delete_loading":[32],"delete_is_dir":[32],"delete_recursive":[32],"delete_error":[32],"prompt_kind":[32],"prompt_value":[32],"prompt_error":[32],"prompt_busy":[32],"chmod_target":[32],"chmod_mode":[32],"chmod_error":[32],"chmod_busy":[32],"show_editor":[32],"editor_name":[32],"editor_text":[32],"editor_saved_text":[32],"editor_busy":[32],"editor_error":[32],"editor_confirm_discard":[32],"editor_loaded":[32],"filter":[32],"sort_key":[32],"sort_asc":[32],"channel_ready":[32],"fetch_count":[32],"fresh_names":[32],"part_delete":[32],"torrent_menu":[32],"listing_player":[32],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}],[513,"phirepass-downloader",{"nodeId":[1,"node-id"],"nodeLabel":[1,"node-label"],"token":[1],"channel":[16],"connected":[4],"channelFactory":[16],"browsingService":[1,"browsing-service"],"browsingPath":[1025,"browsing-path"],"compact":[516],"streamBase":[1,"stream-base"],"canConfigure":[4,"can-configure"],"inlinePlayer":[4,"inline-player"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"serverId":[1,"server-id"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"connection":[32],"caps":[32],"jobs":[32],"tab":[32],"drawerOpen":[32],"dialogOpen":[32],"unread":[32],"form":[32],"where":[32],"starting":[32],"refusal":[32],"confirm":[32],"notices":[32],"subDir":[32],"picker":[32],"player":[32],"receive":[64],"openFetch":[64],"toggleDrawer":[64],"jobForPath":[64],"deleteDownload":[64],"torrentPathFor":[64],"startTorrentPath":[64]},null,{"channel":[{"onChannel":0}],"connected":[{"onConnected":0}],"browsingPath":[{"onBrowsing":0}],"browsingService":[{"onBrowsing":0}],"nodeId":[{"onNode":0}]}],[513,"phirepass-media-player",{"src":[1],"name":[1],"mime":[1],"status":[1],"ready":[2],"positionStore":[16],"positionKey":[1,"position-key"],"remotePlayback":[16],"castDevice":[1,"cast-device"],"phase":[32],"stored":[32],"castAvailable":[32],"currentTime":[32],"duration":[32],"close":[64]},null,{"src":[{"onSrc":0}]}]]]], options);
|
|
21
21
|
});
|