@openfin/core 34.78.12 → 34.78.14
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/out/mock-alpha.d.ts +330 -70
- package/out/mock-beta.d.ts +330 -70
- package/out/mock-public.d.ts +330 -70
- package/out/mock.d.ts +330 -70
- package/out/mock.js +100 -2
- package/package.json +1 -1
package/out/mock.js
CHANGED
|
@@ -93,6 +93,13 @@ class Base {
|
|
|
93
93
|
get fin() {
|
|
94
94
|
return this.wire.getFin();
|
|
95
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Provides access to the OpenFin representation of the current code context (usually a document
|
|
98
|
+
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
|
99
|
+
*
|
|
100
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
|
101
|
+
* on the context in which the devtools panel was opened.
|
|
102
|
+
*/
|
|
96
103
|
get me() {
|
|
97
104
|
return this.wire.me;
|
|
98
105
|
}
|
|
@@ -1372,6 +1379,10 @@ Object.defineProperty(main, "__esModule", { value: true });
|
|
|
1372
1379
|
main.WebContents = void 0;
|
|
1373
1380
|
const base_1$k = base;
|
|
1374
1381
|
class WebContents extends base_1$k.EmitterBase {
|
|
1382
|
+
/**
|
|
1383
|
+
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
1384
|
+
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
1385
|
+
*/
|
|
1375
1386
|
constructor(wire, identity, entityType) {
|
|
1376
1387
|
super(wire, entityType, identity.uuid, identity.name);
|
|
1377
1388
|
this.identity = identity;
|
|
@@ -1424,6 +1435,11 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1424
1435
|
* }
|
|
1425
1436
|
* console.log(await wnd.capturePage(options));
|
|
1426
1437
|
* ```
|
|
1438
|
+
*
|
|
1439
|
+
* @remarks
|
|
1440
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1441
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1442
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1427
1443
|
*/
|
|
1428
1444
|
capturePage(options) {
|
|
1429
1445
|
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
|
@@ -1459,6 +1475,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1459
1475
|
*
|
|
1460
1476
|
* executeJavaScript(`console.log('Hello, Openfin')`).then(() => console.log('Javascript excuted')).catch(err => console.log(err));
|
|
1461
1477
|
* ```
|
|
1478
|
+
* @remarks
|
|
1479
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1480
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1481
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1462
1482
|
*/
|
|
1463
1483
|
executeJavaScript(code) {
|
|
1464
1484
|
return this.wire
|
|
@@ -1498,6 +1518,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1498
1518
|
*
|
|
1499
1519
|
* getZoomLevel().then(zoomLevel => console.log(zoomLevel)).catch(err => console.log(err));
|
|
1500
1520
|
* ```
|
|
1521
|
+
* @remarks
|
|
1522
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1523
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1524
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1501
1525
|
*/
|
|
1502
1526
|
getZoomLevel() {
|
|
1503
1527
|
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
@@ -1536,6 +1560,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1536
1560
|
*
|
|
1537
1561
|
* setZoomLevel(4).then(() => console.log('Setting a zoom level')).catch(err => console.log(err));
|
|
1538
1562
|
* ```
|
|
1563
|
+
* @remarks
|
|
1564
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1565
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1566
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1539
1567
|
*/
|
|
1540
1568
|
setZoomLevel(level) {
|
|
1541
1569
|
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
@@ -1573,6 +1601,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1573
1601
|
* navigate().then(() => console.log('Navigate to tutorial')).catch(err => console.log(err));
|
|
1574
1602
|
* ```
|
|
1575
1603
|
* @experimental
|
|
1604
|
+
* @remarks
|
|
1605
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1606
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1607
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1576
1608
|
*/
|
|
1577
1609
|
navigate(url) {
|
|
1578
1610
|
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
|
@@ -1600,6 +1632,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1600
1632
|
* }
|
|
1601
1633
|
* navigateBack().then(() => console.log('Navigated back')).catch(err => console.log(err));
|
|
1602
1634
|
* ```
|
|
1635
|
+
* @remarks
|
|
1636
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1637
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1638
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1603
1639
|
*/
|
|
1604
1640
|
navigateBack() {
|
|
1605
1641
|
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
|
@@ -1629,6 +1665,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1629
1665
|
* }
|
|
1630
1666
|
* navigateForward().then(() => console.log('Navigated forward')).catch(err => console.log(err));
|
|
1631
1667
|
* ```
|
|
1668
|
+
* @remarks
|
|
1669
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1670
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1671
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1632
1672
|
*/
|
|
1633
1673
|
async navigateForward() {
|
|
1634
1674
|
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
|
@@ -1656,6 +1696,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1656
1696
|
* }
|
|
1657
1697
|
* stopNavigation().then(() => console.log('you shall not navigate')).catch(err => console.log(err));
|
|
1658
1698
|
* ```
|
|
1699
|
+
* @remarks
|
|
1700
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1701
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1702
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1659
1703
|
*/
|
|
1660
1704
|
stopNavigation() {
|
|
1661
1705
|
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
|
@@ -1693,6 +1737,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1693
1737
|
* console.log('Reloaded window')
|
|
1694
1738
|
* }).catch(err => console.log(err));
|
|
1695
1739
|
* ```
|
|
1740
|
+
* @remarks
|
|
1741
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1742
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1743
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1696
1744
|
*/
|
|
1697
1745
|
reload(ignoreCache = false) {
|
|
1698
1746
|
return this.wire
|
|
@@ -1719,6 +1767,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1719
1767
|
* console.log('print call has been sent to the system');
|
|
1720
1768
|
* });
|
|
1721
1769
|
* ```
|
|
1770
|
+
* @remarks
|
|
1771
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1772
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1773
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1722
1774
|
*/
|
|
1723
1775
|
print(options = {}) {
|
|
1724
1776
|
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
|
@@ -1763,6 +1815,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1763
1815
|
* console.log(result)
|
|
1764
1816
|
* });
|
|
1765
1817
|
* ```
|
|
1818
|
+
* @remarks
|
|
1819
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1820
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1821
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1766
1822
|
*/
|
|
1767
1823
|
findInPage(searchTerm, options) {
|
|
1768
1824
|
return this.wire
|
|
@@ -1806,6 +1862,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1806
1862
|
* console.log(results);
|
|
1807
1863
|
* });
|
|
1808
1864
|
* ```
|
|
1865
|
+
* @remarks
|
|
1866
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1867
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1868
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1809
1869
|
*/
|
|
1810
1870
|
stopFindInPage(action) {
|
|
1811
1871
|
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
|
@@ -1848,6 +1908,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1848
1908
|
* console.log(err);
|
|
1849
1909
|
* });
|
|
1850
1910
|
* ```
|
|
1911
|
+
* @remarks
|
|
1912
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1913
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1914
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1851
1915
|
*/
|
|
1852
1916
|
getPrinters() {
|
|
1853
1917
|
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
|
@@ -1870,6 +1934,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1870
1934
|
*
|
|
1871
1935
|
* focusWindow().then(() => console.log('Window focused')).catch(err => console.log(err));
|
|
1872
1936
|
* ```
|
|
1937
|
+
* @remarks
|
|
1938
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1939
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1940
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1873
1941
|
*/
|
|
1874
1942
|
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
|
1875
1943
|
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
|
@@ -1901,6 +1969,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1901
1969
|
* .then(() => console.log('Showing dev tools'))
|
|
1902
1970
|
* .catch(err => console.error(err));
|
|
1903
1971
|
* ```
|
|
1972
|
+
* @remarks
|
|
1973
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
1974
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
1975
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1904
1976
|
*/
|
|
1905
1977
|
async showDeveloperTools() {
|
|
1906
1978
|
// Note this hits the system action map in core state for legacy reasons.
|
|
@@ -1923,6 +1995,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1923
1995
|
* const win = await fin.Window.getCurrent();
|
|
1924
1996
|
* const processInfo = await win.getProcessInfo();
|
|
1925
1997
|
* ```
|
|
1998
|
+
* @remarks
|
|
1999
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2000
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2001
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1926
2002
|
*/
|
|
1927
2003
|
async getProcessInfo() {
|
|
1928
2004
|
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
|
@@ -1958,6 +2034,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1958
2034
|
* const win = await fin.Window.create(winOption);
|
|
1959
2035
|
* const sharedWorkers = await win.getSharedWorkers();
|
|
1960
2036
|
* ```
|
|
2037
|
+
* @remarks
|
|
2038
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2039
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2040
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1961
2041
|
*/
|
|
1962
2042
|
async getSharedWorkers() {
|
|
1963
2043
|
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
|
@@ -1992,6 +2072,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1992
2072
|
* const win = await fin.Window.create(winOption);
|
|
1993
2073
|
* await win.inspectSharedWorker();
|
|
1994
2074
|
* ```
|
|
2075
|
+
* @remarks
|
|
2076
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2077
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2078
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1995
2079
|
*/
|
|
1996
2080
|
async inspectSharedWorker() {
|
|
1997
2081
|
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
|
@@ -2029,6 +2113,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2029
2113
|
* const sharedWorkers = await win.getSharedWorkers();
|
|
2030
2114
|
* await win.inspectSharedWorkerById(sharedWorkers[0].id);
|
|
2031
2115
|
* ```
|
|
2116
|
+
* @remarks
|
|
2117
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2118
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2119
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2032
2120
|
*/
|
|
2033
2121
|
async inspectSharedWorkerById(workerId) {
|
|
2034
2122
|
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
|
@@ -2063,6 +2151,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2063
2151
|
* const win = await fin.Window.create(winOption);
|
|
2064
2152
|
* await win.inspectServiceWorker();
|
|
2065
2153
|
* ```
|
|
2154
|
+
* @remarks
|
|
2155
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2156
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2157
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2066
2158
|
*/
|
|
2067
2159
|
async inspectServiceWorker() {
|
|
2068
2160
|
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
|
@@ -2273,6 +2365,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2273
2365
|
* onPopupReady: popupWindowCallback;
|
|
2274
2366
|
* });
|
|
2275
2367
|
* ```
|
|
2368
|
+
* @remarks
|
|
2369
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2370
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2371
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2276
2372
|
*/
|
|
2277
2373
|
async showPopupWindow(options) {
|
|
2278
2374
|
this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
|
|
@@ -4695,7 +4791,6 @@ function requireInstance () {
|
|
|
4695
4791
|
*/
|
|
4696
4792
|
constructor(wire, identity) {
|
|
4697
4793
|
super(wire, identity, 'window');
|
|
4698
|
-
this.identity = identity;
|
|
4699
4794
|
}
|
|
4700
4795
|
/**
|
|
4701
4796
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
@@ -5874,7 +5969,10 @@ function requireInstance () {
|
|
|
5874
5969
|
* Calling this method will close previously opened menus.
|
|
5875
5970
|
* @experimental
|
|
5876
5971
|
* @param options
|
|
5877
|
-
*
|
|
5972
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
5973
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
5974
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
5975
|
+
* these with a "reducer" pattern.
|
|
5878
5976
|
* @example
|
|
5879
5977
|
* This could be used to show a drop down menu over views in a platform window:
|
|
5880
5978
|
* ```js
|