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
package/README.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
[](https://stenciljs.com)
|
|
2
2
|
|
|
3
|
+
# phirepass-widgets
|
|
4
|
+
|
|
5
|
+
Framework-agnostic web components for PhirePass, built with Stencil:
|
|
6
|
+
|
|
7
|
+
| Element | What it is |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `<phirepass-terminal>` | SSH terminal (xterm.js) |
|
|
10
|
+
| `<phirepass-sftp-client>` | SFTP browser; hosts a compact `<phirepass-downloader>` and a Fetch button when the channel supports Remote Fetch |
|
|
11
|
+
| `<phirepass-rdp>` | RDP client |
|
|
12
|
+
| `<phirepass-downloader>` | Remote Fetch: the node downloads links, magnets and `.torrent` files into its own folder. `compact` for the drawer inside the SFTP browser, standalone otherwise |
|
|
13
|
+
| `<phirepass-media-player>` | Plays a file from the node with the browser's own `<video>`/`<audio>` (resume position, cast) |
|
|
14
|
+
|
|
15
|
+
Every component takes a `channelFactory` (or the downloader an injected `channel`), which is how the stories and tests run without a server. The downloader hides itself (and the SFTP browser hides Fetch) until `phirepass-channel` exposes the `send_download_*` methods.
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
Node is pinned in `.nvmrc` (`nvm use`).
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm start # stencil dev server
|
|
23
|
+
npm run storybook # stencil build, then Storybook on :6006
|
|
24
|
+
npm test # spec tests (vitest, Stencil environment)
|
|
25
|
+
npm run test:storybook # every story's play function in headless Chromium
|
|
26
|
+
npm run test:all # both
|
|
27
|
+
npm run build # production build
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`npm run test:storybook` needs Chromium once: `npx playwright install chromium`.
|
|
31
|
+
|
|
32
|
+
Stories live in `stories/`: one file per existing widget and one per Remote Fetch screen group (`stories/remote-fetch/1-sftp` … `9-notices`). Each screen is its own story, and its `play` function is its test. The mock channel (`src/testing/mock-channel.ts`) and fixtures (`src/testing/fixtures.ts`) are shared by stories and specs.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
3
36
|
# Stencil Component Starter
|
|
4
37
|
|
|
5
38
|
> This is a starter project for building a standalone Web Components using Stencil.
|
|
@@ -4,7 +4,7 @@ const NAMESPACE = 'phirepass-widgets';
|
|
|
4
4
|
const BUILD = /* phirepass-widgets */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Platform v4.45.
|
|
7
|
+
Stencil Client Platform v4.45.4 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -116,6 +116,7 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
116
116
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
117
117
|
return import(
|
|
118
118
|
/* @vite-ignore */
|
|
119
|
+
/* turbopackIgnore: true */
|
|
119
120
|
/* webpackInclude: /\.entry\.js$/ */
|
|
120
121
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
121
122
|
/* webpackMode: "lazy" */
|
|
@@ -139,6 +140,7 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
139
140
|
var styles = /* @__PURE__ */ new Map();
|
|
140
141
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
141
142
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
143
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
142
144
|
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
143
145
|
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
144
146
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -169,7 +171,7 @@ var queueDomReads = [];
|
|
|
169
171
|
var queueDomWrites = [];
|
|
170
172
|
var scheduleFlush = () => {
|
|
171
173
|
var _a;
|
|
172
|
-
return ((_a = win.document) == null ? void 0 : _a.hidden) ?
|
|
174
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? setTimeout(flush, 16) : plt.raf(flush);
|
|
173
175
|
};
|
|
174
176
|
var queueTask = (queue, write) => (cb) => {
|
|
175
177
|
queue.push(cb);
|
|
@@ -416,6 +418,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
416
418
|
}
|
|
417
419
|
}
|
|
418
420
|
}
|
|
421
|
+
if (typeof nodeName === "function") {
|
|
422
|
+
return nodeName(
|
|
423
|
+
vnodeData === null ? {} : vnodeData,
|
|
424
|
+
vNodeChildren,
|
|
425
|
+
vdomFnUtils
|
|
426
|
+
);
|
|
427
|
+
}
|
|
419
428
|
const vnode = newVNode(nodeName, null);
|
|
420
429
|
vnode.$attrs$ = vnodeData;
|
|
421
430
|
if (vNodeChildren.length > 0) {
|
|
@@ -445,6 +454,36 @@ var newVNode = (tag, text) => {
|
|
|
445
454
|
};
|
|
446
455
|
var Host = {};
|
|
447
456
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
457
|
+
var vdomFnUtils = {
|
|
458
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
459
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
460
|
+
};
|
|
461
|
+
var convertToPublic = (node) => ({
|
|
462
|
+
vattrs: node.$attrs$,
|
|
463
|
+
vchildren: node.$children$,
|
|
464
|
+
vkey: node.$key$,
|
|
465
|
+
vname: node.$name$,
|
|
466
|
+
vtag: node.$tag$,
|
|
467
|
+
vtext: node.$text$
|
|
468
|
+
});
|
|
469
|
+
var convertToPrivate = (node) => {
|
|
470
|
+
if (typeof node.vtag === "function") {
|
|
471
|
+
const vnodeData = { ...node.vattrs };
|
|
472
|
+
if (node.vkey) {
|
|
473
|
+
vnodeData.key = node.vkey;
|
|
474
|
+
}
|
|
475
|
+
if (node.vname) {
|
|
476
|
+
vnodeData.name = node.vname;
|
|
477
|
+
}
|
|
478
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
479
|
+
}
|
|
480
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
481
|
+
vnode.$attrs$ = node.vattrs;
|
|
482
|
+
vnode.$children$ = node.vchildren;
|
|
483
|
+
vnode.$key$ = node.vkey;
|
|
484
|
+
vnode.$name$ = node.vname;
|
|
485
|
+
return vnode;
|
|
486
|
+
};
|
|
448
487
|
|
|
449
488
|
// src/runtime/normalize-watchers.ts
|
|
450
489
|
var normalizeWatchers = (raw) => {
|
|
@@ -524,7 +563,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
524
563
|
const oldClasses = parseClassList(oldValue);
|
|
525
564
|
let newClasses = parseClassList(newValue);
|
|
526
565
|
{
|
|
527
|
-
|
|
566
|
+
let removedClasses = oldClasses.filter((c) => c && !newClasses.includes(c));
|
|
567
|
+
classList.remove(...removedClasses);
|
|
528
568
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
529
569
|
}
|
|
530
570
|
} else if (memberName === "style") {
|
|
@@ -621,15 +661,26 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
621
661
|
} catch (e) {
|
|
622
662
|
}
|
|
623
663
|
}
|
|
664
|
+
let xlink = false;
|
|
665
|
+
{
|
|
666
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
667
|
+
memberName = ln;
|
|
668
|
+
xlink = true;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
624
671
|
if (newValue == null || newValue === false) {
|
|
625
672
|
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
626
|
-
{
|
|
673
|
+
if (xlink) {
|
|
674
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
675
|
+
} else {
|
|
627
676
|
elm.removeAttribute(memberName);
|
|
628
677
|
}
|
|
629
678
|
}
|
|
630
679
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
631
680
|
newValue = newValue === true ? "" : newValue;
|
|
632
|
-
{
|
|
681
|
+
if (xlink) {
|
|
682
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
683
|
+
} else {
|
|
633
684
|
elm.setAttribute(memberName, newValue);
|
|
634
685
|
}
|
|
635
686
|
}
|
|
@@ -955,6 +1006,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
955
1006
|
const isHostElement = isHost(renderFnResults);
|
|
956
1007
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
957
1008
|
hostTagName = hostElm.tagName;
|
|
1009
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1010
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1011
|
+
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
1012
|
+
{
|
|
1013
|
+
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
958
1017
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
959
1018
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
960
1019
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -1195,6 +1254,22 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1195
1254
|
}
|
|
1196
1255
|
}
|
|
1197
1256
|
};
|
|
1257
|
+
|
|
1258
|
+
// src/runtime/proxy-component.ts
|
|
1259
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
1260
|
+
var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
1261
|
+
var _a;
|
|
1262
|
+
const instance = hostRef.$lazyInstance$;
|
|
1263
|
+
if (!instance) return;
|
|
1264
|
+
for (const [memberName, [memberFlags]] of Object.entries((_a = cmpMeta.$members$) != null ? _a : {})) {
|
|
1265
|
+
if (memberFlags & 4096 /* Setter */ && hostRef.$instanceValues$.has(memberName)) {
|
|
1266
|
+
const pendingValue = hostRef.$instanceValues$.get(memberName);
|
|
1267
|
+
if (instance[memberName] !== pendingValue) {
|
|
1268
|
+
instance[memberName] = pendingValue;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1198
1273
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1199
1274
|
var _a, _b;
|
|
1200
1275
|
const prototype = Cstr.prototype;
|
|
@@ -1224,9 +1299,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1224
1299
|
return getValue(this, memberName);
|
|
1225
1300
|
}
|
|
1226
1301
|
const ref = getHostRef(this);
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
return instance[memberName];
|
|
1302
|
+
if (!ref) return prototype[memberName];
|
|
1303
|
+
return ref.$lazyInstance$ ? ref.$lazyInstance$[memberName] : getValue(this, memberName);
|
|
1230
1304
|
}
|
|
1231
1305
|
},
|
|
1232
1306
|
configurable: true,
|
|
@@ -1256,36 +1330,20 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1256
1330
|
{
|
|
1257
1331
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1258
1332
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1259
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1260
|
-
ref.$fetchedCbList$.push(() => {
|
|
1261
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1262
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
1333
|
return;
|
|
1267
1334
|
}
|
|
1268
1335
|
const parsedValue = parsePropertyValue(
|
|
1269
1336
|
newValue,
|
|
1270
1337
|
memberFlags);
|
|
1271
|
-
|
|
1338
|
+
if (ref.$lazyInstance$) {
|
|
1272
1339
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
1273
1340
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1274
1341
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1275
1342
|
}
|
|
1276
|
-
ref.$lazyInstance$[memberName] =
|
|
1343
|
+
ref.$lazyInstance$[memberName] = parsedValue;
|
|
1277
1344
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1278
|
-
};
|
|
1279
|
-
if (ref.$lazyInstance$) {
|
|
1280
|
-
setterSetVal(parsedValue);
|
|
1281
1345
|
} else {
|
|
1282
1346
|
ref.$instanceValues$.set(memberName, parsedValue);
|
|
1283
|
-
ref.$fetchedCbList$.push(() => {
|
|
1284
|
-
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1285
|
-
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1286
|
-
setterSetVal(pendingValue);
|
|
1287
|
-
}
|
|
1288
|
-
});
|
|
1289
1347
|
}
|
|
1290
1348
|
}
|
|
1291
1349
|
}
|
|
@@ -1324,7 +1382,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1324
1382
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1325
1383
|
entry == null ? void 0 : entry.forEach((watcher) => {
|
|
1326
1384
|
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
1327
|
-
if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
|
|
1385
|
+
if ((instance == null ? void 0 : instance[watchMethodName]) != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
|
|
1328
1386
|
instance[watchMethodName].call(instance, newValue, oldValue, attrName);
|
|
1329
1387
|
}
|
|
1330
1388
|
});
|
|
@@ -1334,13 +1392,18 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1392
|
const propFlags = members.find(([m]) => m === propName);
|
|
1335
1393
|
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1336
1394
|
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1395
|
+
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1396
|
+
// one is always external
|
|
1397
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1337
1400
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1338
1401
|
if (isBooleanTarget) {
|
|
1339
|
-
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1402
|
+
newValue = newValue === null || newValue === "false" && true ? false : true;
|
|
1340
1403
|
}
|
|
1341
|
-
const currentValue = propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
|
|
1342
1404
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1343
|
-
|
|
1405
|
+
const isUnchanged = newValue === this[propName] || newValue == null && this[propName] == null;
|
|
1406
|
+
if (!isSpuriousBooleanRemoval && !isUnchanged && (!propDesc.get || !!propDesc.set)) {
|
|
1344
1407
|
this[propName] = newValue;
|
|
1345
1408
|
}
|
|
1346
1409
|
});
|
|
@@ -1349,8 +1412,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1349
1412
|
/* @__PURE__ */ new Set([
|
|
1350
1413
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1351
1414
|
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1415
|
+
var _a2;
|
|
1352
1416
|
const attrName = m[1] || propName;
|
|
1353
1417
|
attrNameToPropName.set(attrName, propName);
|
|
1418
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1419
|
+
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1420
|
+
}
|
|
1354
1421
|
return attrName;
|
|
1355
1422
|
})
|
|
1356
1423
|
])
|
|
@@ -1406,6 +1473,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1406
1473
|
}
|
|
1407
1474
|
{
|
|
1408
1475
|
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1476
|
+
replayPendingSetterValues(hostRef, cmpMeta);
|
|
1409
1477
|
}
|
|
1410
1478
|
{
|
|
1411
1479
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
@@ -1553,6 +1621,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1553
1621
|
{
|
|
1554
1622
|
cmpMeta.$members$ = compactMeta[2];
|
|
1555
1623
|
}
|
|
1624
|
+
{
|
|
1625
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1626
|
+
}
|
|
1556
1627
|
{
|
|
1557
1628
|
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
1558
1629
|
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
@@ -1603,7 +1674,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1603
1674
|
disconnectedCallback() {
|
|
1604
1675
|
plt.jmp(() => disconnectedCallback(this));
|
|
1605
1676
|
nextTick(() => {
|
|
1606
|
-
var _a3;
|
|
1677
|
+
var _a3, _b2;
|
|
1607
1678
|
const hostRef = getHostRef(this);
|
|
1608
1679
|
if (!hostRef) {
|
|
1609
1680
|
return;
|
|
@@ -1612,7 +1683,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1612
1683
|
if (i2 > -1) {
|
|
1613
1684
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
1614
1685
|
}
|
|
1615
|
-
if (((_a3 = hostRef == null ? void 0 :
|
|
1686
|
+
if (((_b2 = (_a3 = hostRef.$vnode$) == null ? void 0 : _a3.$elm$) == null ? void 0 : _b2.isConnected) === false) {
|
|
1616
1687
|
delete hostRef.$vnode$.$elm$;
|
|
1617
1688
|
}
|
|
1618
1689
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BCgmMoIq.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
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-
|
|
9
|
+
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);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|