phirepass-widgets 0.0.112 → 0.0.113
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-CurErEK7.js} +101 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3696 -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-COvteaUJ.js → protocol-DCBMfc2u.js} +557 -360
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/common/channel.js +21 -1
- package/dist/collection/common/fetch.js +40 -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 +370 -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 +106 -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-C4cmk3bS.js +1 -0
- package/dist/components/p-CsYQJXY2.js +1 -0
- package/dist/components/p-D6Geq8Rn.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-B9qUl6FW.js} +101 -30
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-downloader_3.entry.js +3692 -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-Dur4cBX7.js → protocol-CsYQJXY2.js} +556 -359
- package/dist/phirepass-widgets/p-1b84c526.entry.js +1 -0
- package/dist/phirepass-widgets/{p-1fef5b5f.entry.js → p-41dd1ac9.entry.js} +2 -2
- package/dist/phirepass-widgets/p-614ab3de.entry.js +1 -0
- package/dist/phirepass-widgets/p-B9qUl6FW.js +3 -0
- package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
- 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 +161 -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 +115 -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/components/p-Dur4cBX7.js +0 -1
- package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
- 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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var protocol = require('./protocol-
|
|
3
|
+
var index = require('./index-CurErEK7.js');
|
|
4
|
+
var protocol = require('./protocol-DCBMfc2u.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* RDP's display-control PDU describes a monitor in whole, even pixels within
|
|
@@ -227,7 +227,8 @@ const phirepassRdpCss = () => `:host{display:block;width:100%;height:100%;min-wi
|
|
|
227
227
|
|
|
228
228
|
const PhirepassRdp = class {
|
|
229
229
|
constructor(hostRef) {
|
|
230
|
-
|
|
230
|
+
if (new.target === PhirepassRdp)
|
|
231
|
+
index.registerInstance(this, hostRef);
|
|
231
232
|
this.connectionStateChanged = index.createEvent(this, "connectionStateChanged");
|
|
232
233
|
}
|
|
233
234
|
channel;
|
|
@@ -318,6 +319,12 @@ const PhirepassRdp = class {
|
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
serverId;
|
|
322
|
+
/**
|
|
323
|
+
* Supplies the channel instead of a WebSocket to the server — for demos,
|
|
324
|
+
* screenshots and tests, as on the terminal and SFTP client. A property
|
|
325
|
+
* only; read once, when the widget connects.
|
|
326
|
+
*/
|
|
327
|
+
channelFactory;
|
|
321
328
|
onServerIdChange(_newValue, _oldValue) {
|
|
322
329
|
this.onNodeIdChange(this.nodeId, this.nodeId);
|
|
323
330
|
}
|
|
@@ -337,7 +344,9 @@ const PhirepassRdp = class {
|
|
|
337
344
|
// A widget can be moved in the DOM rather than destroyed, which
|
|
338
345
|
// disconnects and reconnects it; the second life is a real one.
|
|
339
346
|
this.disposed = false;
|
|
340
|
-
|
|
347
|
+
if (!this.channelFactory) {
|
|
348
|
+
await protocol.__wbg_init();
|
|
349
|
+
}
|
|
341
350
|
this.open_comms();
|
|
342
351
|
this.runtimeReady = true;
|
|
343
352
|
if (!this.nodeId) {
|
|
@@ -433,7 +442,10 @@ const PhirepassRdp = class {
|
|
|
433
442
|
this.channel.connect();
|
|
434
443
|
}
|
|
435
444
|
open_comms() {
|
|
436
|
-
if (this.
|
|
445
|
+
if (this.channelFactory) {
|
|
446
|
+
this.channel = this.channelFactory(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId || undefined);
|
|
447
|
+
}
|
|
448
|
+
else if (this.serverId) {
|
|
437
449
|
this.channel = new protocol.Channel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId);
|
|
438
450
|
}
|
|
439
451
|
else {
|
|
@@ -752,7 +764,7 @@ const PhirepassRdp = class {
|
|
|
752
764
|
this.request_tunnel();
|
|
753
765
|
}
|
|
754
766
|
render() {
|
|
755
|
-
return (index.h(index.Host, { key: '
|
|
767
|
+
return (index.h(index.Host, { key: '04896084a5e914a9e2a184ee7b560f4978da9bfd' }, index.h("div", { key: 'db5d3d0d4351aeb868ffe6956b86f22b62775e4b', class: "screen", ref: (el) => (this.containerEl = el) }, index.h("slot", { key: 'efafd5d8b1437687713aff0425c050413593d162' })), this.credentialsPrompt && (index.h("form", { key: 'ad6079b6db1d71e8eb60bef71cd808be22b7387c', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, index.h("label", { key: 'b976c7a3c01e4983fac39e1ef027e4307a6654c7', htmlFor: "rdp-username" }, "Username"), index.h("input", { key: '3a90a73a446015d708eaebec6a7d9bc1703ae5d0', id: "rdp-username", type: "text", autocomplete: "off", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), index.h("label", { key: 'eaf13aa5fe39e4576de052b15c85e6b60be466cb', htmlFor: "rdp-password" }, "Password"), index.h("input", { key: 'd53ec8c48b7826b011a07bcb57b7ae1fbe30160f', id: "rdp-password", type: "password", autocomplete: "off", onInput: (event) => (this.passwordBuffer = event.target.value) }), index.h("button", { key: 'd1616e75c1f37a853ec793a25ffc8919544c16d2', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (index.h("div", { key: '8e6deb9e32f0c416bf85666847f10e095f40e210', class: "status" }, this.statusMessage))));
|
|
756
768
|
}
|
|
757
769
|
static get watchers() { return {
|
|
758
770
|
"nodeId": [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var protocol = require('./protocol-
|
|
3
|
+
var index = require('./index-CurErEK7.js');
|
|
4
|
+
var protocol = require('./protocol-DCBMfc2u.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -269,7 +269,8 @@ const KEY_BAR_KEYS = [
|
|
|
269
269
|
];
|
|
270
270
|
const PhirepassTerminal = class {
|
|
271
271
|
constructor(hostRef) {
|
|
272
|
-
|
|
272
|
+
if (new.target === PhirepassTerminal)
|
|
273
|
+
index.registerInstance(this, hostRef);
|
|
273
274
|
this.connectionStateChanged = index.createEvent(this, "connectionStateChanged");
|
|
274
275
|
}
|
|
275
276
|
terminal;
|
|
@@ -954,13 +955,13 @@ const PhirepassTerminal = class {
|
|
|
954
955
|
return (index.h("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));
|
|
955
956
|
}
|
|
956
957
|
render() {
|
|
957
|
-
return (index.h(index.Host, { key: '
|
|
958
|
+
return (index.h(index.Host, { key: '7916b1ec27e8557c5327364992658bbd9456a050', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, index.h("div", { key: '7b1716371a6df4d3330b94e8a23195069628ccc0', id: "ccc", ref: el => (this.containerEl = el) }), index.h("div", { key: 'fb43cc80fbf8d0d6374ed03d980f04cfaec1bd5a', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
|
|
958
959
|
this.ctrlArmed = !this.ctrlArmed;
|
|
959
960
|
this.terminal?.focus();
|
|
960
961
|
}, this.ctrlArmed), this.key_button('alt', 'alt', 'Alt', () => {
|
|
961
962
|
this.altArmed = !this.altArmed;
|
|
962
963
|
this.terminal?.focus();
|
|
963
|
-
}, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), index.h("span", { key: '
|
|
964
|
+
}, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), index.h("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'))))));
|
|
964
965
|
}
|
|
965
966
|
static get watchers() { return {
|
|
966
967
|
"nodeId": [{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CurErEK7.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.45.
|
|
8
|
+
Stencil Client Patch Browser v4.45.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["phirepass-rdp.cjs",[[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-
|
|
22
|
+
return index.bootstrapLazy([["phirepass-rdp.cjs",[[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.cjs",[[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.cjs",[[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);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|