@openfin/core-web 0.41.108 → 0.41.111
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/docs/platform-developer-guide.md +59 -0
- package/out/api-client.cjs.js +1 -1
- package/out/api-client.d.ts +15 -10
- package/out/api-client.esm.js +1 -1
- package/out/docs/assets/search.js +1 -1
- package/out/docs/documents/Platform_Developer_Guide.html +10 -1
- package/out/docs/functions/_openfin_core_web.connect.html +1 -1
- package/out/docs/types/_openfin_core_web.BaseConfig.html +2 -1
- package/out/docs/types/_openfin_core_web.BaseConnectionOptions.html +1 -2
- package/out/docs/types/_openfin_core_web.InheritModeConnectConfig.html +4 -2
- package/out/docs/types/_openfin_core_web.StandAloneConnectConfig.html +4 -2
- package/out/iframe-broker.cjs.js +1 -1
- package/out/iframe-broker.esm.js +1 -1
- package/out/main-3937042e.js +3 -0
- package/out/main-3f999066.js +1 -0
- package/out/main-6dad0add.js +1 -0
- package/out/main-cdd0aac3.js +3 -0
- package/out/shared-worker.js +1 -1
- package/out/styles.css +1 -0
- package/package.json +2 -2
- package/out/main-32b25f59.js +0 -3
- package/out/main-7a1ebcf4.js +0 -1
- package/out/main-91bc92fd.js +0 -1
- package/out/main-a9196fc9.js +0 -3
@@ -103,6 +103,24 @@ init({
|
|
103
103
|
});
|
104
104
|
```
|
105
105
|
|
106
|
+
### Example: Enable logLevel for Debugging
|
107
|
+
|
108
|
+
`@openfin/core-web` features configurable logging using the `logLevel` connection option. It accepts the following values: `'debug'`, `'info'`, `'warn'`, `'error'`, `'none'`. By default it is set to `'error'`. Change the level to see more information in the console:
|
109
|
+
|
110
|
+
```typescript
|
111
|
+
init({
|
112
|
+
sharedWorkerUrl: `${location.origin}/openfin-shared-worker.js`,
|
113
|
+
logLevel: 'debug'
|
114
|
+
});
|
115
|
+
|
116
|
+
const fin = await connect({
|
117
|
+
connectionInheritance: 'enabled',
|
118
|
+
options: { brokerUrl },
|
119
|
+
platform: { layoutSnapshot },
|
120
|
+
logLevel: 'debug'
|
121
|
+
});
|
122
|
+
```
|
123
|
+
|
106
124
|
## Create Layouts
|
107
125
|
|
108
126
|
Layouts in the web are very similar to the desktop OpenFin environment. They consist of a layout configuration that describes the rows/columns/view components. The major difference is that the `layout` key is not supported. Instead, we expose the `layoutSnapshot` key to plug into the multiple-layout architecture. See the [Multi-Layout guide](https://developers.openfin.co/of-docs/docs/multi-layouts) for more information on how to set it up.
|
@@ -126,6 +144,47 @@ Layouts in the web support the following [`LayoutOptions.settings`](https://cdn.
|
|
126
144
|
- `reorderEnabled` (Default value **true**): If true, users can re-arrange the layout by dragging items by their tabs to the desired location. Note, unlike in an OpenFin environment the dragging of items is limited to the current window.
|
127
145
|
- `hasHeaders` (Default value **true**): Turns tab headers on or off. If false, the layout will be displayed with splitters only.
|
128
146
|
- `preventSplitterResize` (Default value **false**): When true the splitters will not be draggable and the layout will not resize.
|
147
|
+
- `showMaximiseIcon` (Default value **false**): Enables maximise button for stacks. The button maximises the current tab to fill the entire layout container.
|
148
|
+
|
149
|
+
### <iframe> Permissions
|
150
|
+
|
151
|
+
To enable web API usage in iframes view `componentState` includes a `permissions` field which maps to `allow` attributes in view iframes to enable web APIs. Currently the only supported values are `'clipboard-read'` and `'clipboard-sanitized-write'`.
|
152
|
+
|
153
|
+
#### Example: Snapshot with Clipboard Permissions Enabled
|
154
|
+
|
155
|
+
```typescript
|
156
|
+
const layoutSnapshot: WebLayoutSnapshot = {
|
157
|
+
layouts: {
|
158
|
+
tab1: {
|
159
|
+
content: [
|
160
|
+
{
|
161
|
+
type: 'row',
|
162
|
+
content: [
|
163
|
+
{
|
164
|
+
type: 'stack',
|
165
|
+
content: [
|
166
|
+
{
|
167
|
+
title: 'Example',
|
168
|
+
type: 'component',
|
169
|
+
componentName: 'view',
|
170
|
+
componentState: {
|
171
|
+
url: 'http://example.com/',
|
172
|
+
permissions: {
|
173
|
+
webAPIs: ['clipboard-read', 'clipboard-sanitized-write']
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
]
|
178
|
+
}
|
179
|
+
]
|
180
|
+
}
|
181
|
+
]
|
182
|
+
}
|
183
|
+
}
|
184
|
+
};
|
185
|
+
```
|
186
|
+
|
187
|
+
|
129
188
|
|
130
189
|
### Example: Retrieve a layoutSnapshot from both desktop and web environments
|
131
190
|
|
package/out/api-client.cjs.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var e=require("./main-
|
1
|
+
"use strict";var e=require("./main-3f999066.js");require("buffer/"),require("uuid"),require("events"),require("lodash/cloneDeep"),require("lodash/isEqual"),exports.connect=e.connect;
|
package/out/api-client.d.ts
CHANGED
@@ -6,6 +6,10 @@ export declare type BaseConfig = {
|
|
6
6
|
* will not work.
|
7
7
|
*/
|
8
8
|
platform?: WebLayoutPlatformOptions;
|
9
|
+
/**
|
10
|
+
* Log level used throughout the connection and messaging process. Defaults to 'error'.
|
11
|
+
*/
|
12
|
+
logLevel?: WebLogLevel;
|
9
13
|
};
|
10
14
|
|
11
15
|
export declare type BaseConnectionOptions = {
|
@@ -21,10 +25,6 @@ export declare type BaseConnectionOptions = {
|
|
21
25
|
* Interop options to use to generate an interop client in `fin.me.interop`
|
22
26
|
*/
|
23
27
|
interopConfig?: Partial<OpenFin.InteropConfig>;
|
24
|
-
/**
|
25
|
-
* Log level used throughout the connection and messaging process. Defaults to 'error'.
|
26
|
-
*/
|
27
|
-
logLevel?: WebLogLevel;
|
28
28
|
};
|
29
29
|
|
30
30
|
/**
|
@@ -33,7 +33,7 @@ export declare type BaseConnectionOptions = {
|
|
33
33
|
*
|
34
34
|
* ### Supported APIs
|
35
35
|
*
|
36
|
-
* * fin.InterApplicationBus.
|
36
|
+
* * fin.InterApplicationBus.Channel
|
37
37
|
* * fin.Interop
|
38
38
|
* * fin.me.identity
|
39
39
|
* * fin.Platform.Layout.init
|
@@ -57,13 +57,13 @@ declare type GL2Types = OpenFin.LayoutEntityTypes | 'component' | 'root' | 'grou
|
|
57
57
|
|
58
58
|
export declare type InheritModeConnectConfig = BaseConfig & {
|
59
59
|
/**
|
60
|
-
* @defaultValue 'disabled'
|
61
|
-
*
|
62
60
|
* If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
63
61
|
* This means that the `brokerUrl` and `Identity` of the connection will be determined by the WebBroker
|
64
62
|
* of the page where the WebLayout is instantiated via `fin.Platform.Layout.init()` call.
|
65
63
|
*
|
66
64
|
* If 'disabled', the `options` property is required.
|
65
|
+
*
|
66
|
+
* @defaultValue 'disabled'
|
67
67
|
*/
|
68
68
|
connectionInheritance: 'enabled';
|
69
69
|
/**
|
@@ -82,13 +82,14 @@ export declare type InheritModeConnectConfig = BaseConfig & {
|
|
82
82
|
|
83
83
|
export declare type StandAloneConnectConfig = BaseConfig & {
|
84
84
|
/**
|
85
|
-
* @defaultValue 'disabled'
|
86
85
|
*
|
87
86
|
* If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
88
87
|
* This means that the `brokerUrl` and `Identity` of the connection will be determined by the WebBroker
|
89
88
|
* of the page where the WebLayout is instantiated via `fin.Platform.Layout.init()` call.
|
90
89
|
*
|
91
90
|
* If 'disabled', the `options` property is required.
|
91
|
+
*
|
92
|
+
* @defaultValue 'disabled'
|
92
93
|
*/
|
93
94
|
connectionInheritance?: 'disabled';
|
94
95
|
/**
|
@@ -103,7 +104,9 @@ export declare type WebCreateLayoutOptions = Omit<OpenFin.CreateLayoutOptions, '
|
|
103
104
|
layout: WebLayoutOptions;
|
104
105
|
};
|
105
106
|
|
106
|
-
declare type WebLayoutColumn =
|
107
|
+
declare type WebLayoutColumn = WebLayoutItemConfig & {
|
108
|
+
type: 'column';
|
109
|
+
};
|
107
110
|
|
108
111
|
/**
|
109
112
|
* Web-only component supplied to IframeViewComponent as it's config
|
@@ -135,7 +138,9 @@ export declare type WebLayoutPlatformOptions = {
|
|
135
138
|
layoutSnapshot: WebLayoutSnapshot;
|
136
139
|
};
|
137
140
|
|
138
|
-
declare type WebLayoutRow =
|
141
|
+
declare type WebLayoutRow = WebLayoutItemConfig & {
|
142
|
+
type: 'row';
|
143
|
+
};
|
139
144
|
|
140
145
|
export declare type WebLayoutSnapshot = {
|
141
146
|
layouts: Record<string, WebLayoutOptions>;
|
package/out/api-client.esm.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export{
|
1
|
+
export{k as connect}from"./main-6dad0add.js";import"buffer/";import"uuid";import"events";import"lodash/cloneDeep";import"lodash/isEqual";
|
@@ -1 +1 @@
|
|
1
|
-
window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA8WaXW/bNhSG/
|
1
|
+
window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA8WaXW/bNhSG/0rA3TKKeI4sS75a12FDgRYd0K25MAJDtplEqy0Jkpy0CPLfB+qTFCmHcpz1JjYcnpfvIR9+iNQTydPHgiyWT+RbnGzJIsAg8N2AkiTac7Igf+2i8jbN9xe/8we+SzOeX/x5iLecUHLId2RBtunmsOdJWVy1RVdd0VVV1Lkv9ztCyWYXFQUvyIKQZzpW3+eMJ3/EycU1X1+8y7JdvInKOE0sqm8iV9d8vZIiJ7mBzsevacaT2zi52qQ5v3zk667Gfbo97HhxtWpKrESJ1SNfH1d2wzmb9fq/RQV/nya38V0nXP7IjLJ9UUMNlGRRzpPSaLmv3p/N0O8qX61EXVMr/qULs6xfEpCsMBe8zknWMHOiF0eKn27KaRIa8bZL7z4Kdk71JsWfw9sIQQnfCMw/Z+JvYetVjfo5XBk8nIzYoBVGenSdp994/k9u3aXjFh1Z61VmX6CwjPc8PZRncNwrvaXfOCl5nmbT5rYjrod6Z/Y+HFVfyijZvtulSRtsmchI3Okja2jsQ3LP87j8lG4nOhsLPJ+1aX7OZMLvkdvUil3Nt4ek6nRT7U3ZVyQ/vkW4im/zaM8v66nh5Q3Dqi6/qssf3T5I2eb837r5GrQLm7wHVWkaE9tjkOmLaNgvUAOjr12qRo2esnBZeZu8hKkWddWxiba4j3K+vU5zuyVtinlH1z5TMmfack1KZvo+7JVZ8O8Zz2PxVBKdN5OB8Jtl89aDQ0mkqf6SnT0jtb1GOmuTp0Xxd7R++/wcqao3TNTQnfLuLLZaJwfZirCzLRFHFtB63rl8rCYeiwW0Lr+qyx9dQLGvdstvo8Oub4aHKI+jtU0FTeTUllCzGl8sr/n6Y/QjPZTv032WJkLupc2UHnK+bd3XmD92spabO0PM+Qx1ydo+7A4D3sDKlyTKivt0Qk+1Ef/zQ7e5/ukP3HrmY2t5VWpCJ5mMOb3KyQZffujrQj4k8XS4pKCzAvY+51HJJxNvCHsD7tvD3smtNQj8WaPAZOMVg2HYHEfHxPQ544hbR9N8rfkJ4+VTlER30kr9YiJNwORev6EkTrb8O1k8kQeeF3GakAUBB52QUHIb891W3GLUBinZpPt9vXy29wPkpin2lW/KNBeF69JXLqFLl7LAcd05Ze0XaL7c3NBlK1cVrX5oVftfKilG6JJRBs7cQ6FQf0HKZo47p177w6z+QZFmmjRTpIHQpUcBHD/0qE9Z6IS+pyiApgCKAhK6nFP0HQhACUQtEJVAj9BlQMF11DBPC/OUsFnVrug6fqDEzbS4mRLnE7oMDXG+FucrcXPR+K4pwbkWOVciA3OCgRYWKGGhqJCZKgy1yFDlRGDDwBTKdMbYALKKMjQGGyhSMWKCCeYZg3WAmEoQE1ywmTFYh4ipFDFBB/ONwTpKTGWJCUSYkV6m88RUoJjgxBdjLvDE+KbAHAhnlIXNN1VP54ypoDFBDxhJYzpqTGWNCYbASA3TgWMqcSw0k8p04JhKHAiGwEgc6MSBShywkSEJOm8wmLYEQWCEFQwTlsoboDld0GEDFTYQ+IARc9BhAxU2EPiAEXPQYQMVNlBgA7+FDeYm2ECHDVTYoIItMJrRYQMVNqhgC43BOmygwgaCIDRiDjpvoPKGgiA0Yo46b6jyhoIhNMKKOnGoEodghgZ13HCwQAqG0MgqGtZIlTgUDKGRONSJQ5U4FAyhkTjUiUOVOBTAoHFiRR0vVPHC+Uhr6WyhyhYKWtC8odDZQpUtrNgyUo06W81P1R7wgecl336o94LLZbfvfyKrZoPYvUvyRDyyeHqmJKg/WFh/AtafCM3nXHw+97vG6tdu4yj+J+xE/TslcnWzvjpmpbOOCr5pTlN6mXkvg1NkmvPAtH0M6xWZ20vaZdjeW0kaoZSdP0FEPA7IOqzXCa1kujs9SURqIzaboqI3N/MlLW+KlrmxQUqQBXZ64jS4FKfBkozXy4Cdre40U1KRhgDYdf22fUlKaaRexm2GkJWYek0h+ULJF1hJ3dUve0kaJ3qK61vwfbrl41DIY9luFNbn6ZI9SQLsGG1ecDDYkZqL2WXZnZb1KiipoF1SjUp3oiCJydOUHea79G5X3771MtKs4jdzsl1+zcGAYmnq/CsfLshC0ozQLAysNWc38/XvovWiroarHRT1Bf1GvuSXIJNUmd34rq8g6huIwdwM0pAC105NvOwSiZddxseSNJMxu7HevZ8kqUjemJ23h5g/btobCN0XSm0HdktR9fJnr+ANgKPELr3+TkzJMJi8wvZXSko3yvxaC22qw+J6wBuWNZSmM7Qj95Gva7lNf4kluZSGPthNIJ2gmGtNHqUOQbs1s5Pct+eXkpzUIWgNyHgLSoso2hHcybUTiklW6m207u0jE7s00NBuHm0vaaXOnU9D8IaSLM74Lk44WSxvnp//AxijzrCOLgAA";
|
@@ -40,6 +40,10 @@
|
|
40
40
|
<a id="md:example-enable-cross-tab-support" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Enable Cross Tab Support<a href="#md:example-enable-cross-tab-support" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="typescript"><span class="hl-0">init</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">sharedWorkerUrl:</span><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-3">${</span><span class="hl-5">location</span><span class="hl-12">.</span><span class="hl-5">origin</span><span class="hl-3">}</span><span class="hl-2">/openfin-shared-worker.js`</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">experimental:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">crossTab:</span><span class="hl-1"> </span><span class="hl-2">'same-site'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
|
41
41
|
</code><button type="button">Copy</button></pre>
|
42
42
|
|
43
|
+
<a id="md:example-enable-loglevel-for-debugging" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Enable logLevel for Debugging<a href="#md:example-enable-loglevel-for-debugging" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p><code>@openfin/core-web</code> features configurable logging using the <code>logLevel</code> connection option. It accepts the following values: <code>'debug'</code>, <code>'info'</code>, <code>'warn'</code>, <code>'error'</code>, <code>'none'</code>. By default it is set to <code>'error'</code>. Change the level to see more information in the console:</p>
|
44
|
+
<pre><code class="typescript"><span class="hl-0">init</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">sharedWorkerUrl:</span><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-3">${</span><span class="hl-5">location</span><span class="hl-12">.</span><span class="hl-5">origin</span><span class="hl-3">}</span><span class="hl-2">/openfin-shared-worker.js`</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">fin</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">connect</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">connectionInheritance:</span><span class="hl-1"> </span><span class="hl-2">'enabled'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">options:</span><span class="hl-1"> { </span><span class="hl-5">brokerUrl</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">platform:</span><span class="hl-1"> { </span><span class="hl-5">layoutSnapshot</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">logLevel:</span><span class="hl-1"> </span><span class="hl-2">'debug'</span><br/><span class="hl-1">});</span>
|
45
|
+
</code><button type="button">Copy</button></pre>
|
46
|
+
|
43
47
|
<a id="md:create-layouts" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Create Layouts<a href="#md:create-layouts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Layouts in the web are very similar to the desktop OpenFin environment. They consist of a layout configuration that describes the rows/columns/view components. The major difference is that the <code>layout</code> key is not supported. Instead, we expose the <code>layoutSnapshot</code> key to plug into the multiple-layout architecture. See the <a href="https://developers.openfin.co/of-docs/docs/multi-layouts">Multi-Layout guide</a> for more information on how to set it up.</p>
|
44
48
|
<p>Note that you can achieve a single layout by having only 1 key in your <code>layoutSnapshot</code>:</p>
|
45
49
|
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">layouts:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">layout:</span><span class="hl-1"> { ... }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
@@ -51,7 +55,12 @@
|
|
51
55
|
<li><code>reorderEnabled</code> (Default value <strong>true</strong>): If true, users can re-arrange the layout by dragging items by their tabs to the desired location. Note, unlike in an OpenFin environment the dragging of items is limited to the current window.</li>
|
52
56
|
<li><code>hasHeaders</code> (Default value <strong>true</strong>): Turns tab headers on or off. If false, the layout will be displayed with splitters only.</li>
|
53
57
|
<li><code>preventSplitterResize</code> (Default value <strong>false</strong>): When true the splitters will not be draggable and the layout will not resize.</li>
|
58
|
+
<li><code>showMaximiseIcon</code> (Default value <strong>false</strong>): Enables maximise button for stacks. The button maximises the current tab to fill the entire layout container.</li>
|
54
59
|
</ul>
|
60
|
+
<a id="md:-permissions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><iframe> Permissions<a href="#md:-permissions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>To enable web API usage in iframes view <code>componentState</code> includes a <code>permissions</code> field which maps to <code>allow</code> attributes in view iframes to enable web APIs. Currently the only supported values are <code>'clipboard-read'</code> and <code>'clipboard-sanitized-write'</code>.</p>
|
61
|
+
<a id="md:example-snapshot-with-clipboard-permissions-enabled" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Example: Snapshot with Clipboard Permissions Enabled<a href="#md:example-snapshot-with-clipboard-permissions-enabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1">: </span><span class="hl-15">WebLayoutSnapshot</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-5">layouts:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">tab1:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'row'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'stack'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">content:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">title:</span><span class="hl-1"> </span><span class="hl-2">'Example'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">type:</span><span class="hl-1"> </span><span class="hl-2">'component'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentName:</span><span class="hl-1"> </span><span class="hl-2">'view'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">componentState:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">url:</span><span class="hl-1"> </span><span class="hl-2">'http://example.com/'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">permissions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">webAPIs:</span><span class="hl-1"> [</span><span class="hl-2">'clipboard-read'</span><span class="hl-1">, </span><span class="hl-2">'clipboard-sanitized-write'</span><span class="hl-1">]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">};</span>
|
62
|
+
</code><button type="button">Copy</button></pre>
|
63
|
+
|
55
64
|
<a id="md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Example: Retrieve a layoutSnapshot from both desktop and web environments<a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>From within your OpenFin v34+ Desktop environment, retrieve the current layoutSnapshot:</p>
|
56
65
|
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutManager</span><span class="hl-1"> = </span><span class="hl-5">fin</span><span class="hl-1">.</span><span class="hl-5">Platform</span><span class="hl-1">.</span><span class="hl-5">Layout</span><span class="hl-1">.</span><span class="hl-0">getCurrentLayoutManagerSync</span><span class="hl-1">();</span><br/><span class="hl-7">// returns an object like: { layouts: { ... } } where each key in layouts.<key> is it's own separate layout configuration</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">layoutSnapshot</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-5">layoutManager</span><span class="hl-1">.</span><span class="hl-0">getLayoutSnapshot</span><span class="hl-1">();</span>
|
57
66
|
</code><button type="button">Copy</button></pre>
|
@@ -72,4 +81,4 @@
|
|
72
81
|
<li><a href="https://developers.openfin.co/of-docs/docs/container-overview">OpenFin Container Developer guide</a></li>
|
73
82
|
<li><a href="https://developer.openfin.co/docs/javascript/stable">Fin API reference</a></li>
|
74
83
|
</ul>
|
75
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:platform-developer-guide"><span>Platform <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><ul><li><a href="#md:host-the-openfincore-web-shared-worker"><span>Host the @openfin/core-<wbr/>web <wbr/>Shared <wbr/>Worker</span></a></li></ul></li><li><a href="#md:build-a-web-broker"><span>Build a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-set-up-a-basic-web-broker"><span>Example: <wbr/>Set up a <wbr/>Basic <wbr/>Web <wbr/>Broker</span></a></li></ul></li><li><a href="#md:reject-connections"><span>Reject <wbr/>Connections</span></a></li><li><ul><li><a href="#md:example-reject-a-cross-origin-connection-using-openfincore-webiframe-broker"><span>Example: <wbr/>Reject a <wbr/>Cross <wbr/>Origin <wbr/>Connection using @openfin/core-<wbr/>web/iframe-<wbr/>broker</span></a></li></ul></li><li><a href="#md:experimental-enable-cross-tab-support"><span>Experimental: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><ul><li><a href="#md:example-enable-cross-tab-support"><span>Example: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li></ul></li><li><a href="#md:create-layouts"><span>Create <wbr/>Layouts</span></a></li><li><ul><li><a href="#md:layout-settings"><span>Layout <wbr/>Settings</span></a></li><li><a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments"><span>Example: <wbr/>Retrieve a layout<wbr/>Snapshot from both desktop and web environments</span></a></li><li><a href="#md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call"><span>Example: <wbr/>Create a layout<wbr/>Snapshot with 2 layouts and initialize it via connect call</span></a></li></ul></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
84
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:platform-developer-guide"><span>Platform <wbr/>Developer <wbr/>Guide</span></a><ul><li><a href="#md:first-steps"><span>First <wbr/>Steps</span></a></li><li><ul><li><a href="#md:host-the-openfincore-web-shared-worker"><span>Host the @openfin/core-<wbr/>web <wbr/>Shared <wbr/>Worker</span></a></li></ul></li><li><a href="#md:build-a-web-broker"><span>Build a <wbr/>Web <wbr/>Broker</span></a></li><li><ul><li><a href="#md:example-set-up-a-basic-web-broker"><span>Example: <wbr/>Set up a <wbr/>Basic <wbr/>Web <wbr/>Broker</span></a></li></ul></li><li><a href="#md:reject-connections"><span>Reject <wbr/>Connections</span></a></li><li><ul><li><a href="#md:example-reject-a-cross-origin-connection-using-openfincore-webiframe-broker"><span>Example: <wbr/>Reject a <wbr/>Cross <wbr/>Origin <wbr/>Connection using @openfin/core-<wbr/>web/iframe-<wbr/>broker</span></a></li></ul></li><li><a href="#md:experimental-enable-cross-tab-support"><span>Experimental: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><ul><li><a href="#md:example-enable-cross-tab-support"><span>Example: <wbr/>Enable <wbr/>Cross <wbr/>Tab <wbr/>Support</span></a></li><li><a href="#md:example-enable-loglevel-for-debugging"><span>Example: <wbr/>Enable log<wbr/>Level for <wbr/>Debugging</span></a></li></ul></li><li><a href="#md:create-layouts"><span>Create <wbr/>Layouts</span></a></li><li><ul><li><a href="#md:layout-settings"><span>Layout <wbr/>Settings</span></a></li><li><a href="#md:-permissions"><span><iframe> <wbr/>Permissions</span></a></li><li><ul><li><a href="#md:example-snapshot-with-clipboard-permissions-enabled"><span>Example: <wbr/>Snapshot with <wbr/>Clipboard <wbr/>Permissions <wbr/>Enabled</span></a></li></ul></li><li><a href="#md:example-retrieve-a-layoutsnapshot-from-both-desktop-and-web-environments"><span>Example: <wbr/>Retrieve a layout<wbr/>Snapshot from both desktop and web environments</span></a></li><li><a href="#md:example-create-a-layoutsnapshot-with-2-layouts-and-initialize-it-via-connect-call"><span>Example: <wbr/>Create a layout<wbr/>Snapshot with 2 layouts and initialize it via connect call</span></a></li></ul></li><li><a href="#md:api-reference"><span>API <wbr/>Reference</span></a></li><li><a href="#md:see-also"><span>See <wbr/>Also</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>connect | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.connect.html">connect</a></li></ul><h1>Function connect</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><a id="md:connectconnectconfig-connectconfig" class="tsd-anchor"></a><h2 class="tsd-anchor-link">connect(connectConfig: ConnectConfig)<a href="#md:connectconnectconfig-connectconfig" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Establishes a connection to an OpenFin Web Interop Broker, returning a fin object that supports a subset of APIS.</p>
|
2
2
|
<a id="md:supported-apis" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Supported APIs<a href="#md:supported-apis" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul>
|
3
|
-
<li>fin.InterApplicationBus.
|
3
|
+
<li>fin.InterApplicationBus.Channel</li>
|
4
4
|
<li>fin.Interop</li>
|
5
5
|
<li>fin.me.identity</li>
|
6
6
|
<li>fin.Platform.Layout.init</li>
|
@@ -1,3 +1,4 @@
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BaseConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.BaseConfig.html">BaseConfig</a></li></ul><h1>Type Alias BaseConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Base<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">platform</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.WebLayoutPlatformOptions.html" class="tsd-signature-type tsd-kind-type-alias">WebLayoutPlatformOptions</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BaseConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.BaseConfig.html">BaseConfig</a></li></ul><h1>Type Alias BaseConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Base<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">logLevel</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">WebLogLevel</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">platform</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.WebLayoutPlatformOptions.html" class="tsd-signature-type tsd-kind-type-alias">WebLayoutPlatformOptions</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">log<wbr/>Level</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">WebLogLevel</span></h5><div class="tsd-comment tsd-typography"><p>Log level used throughout the connection and messaging process. Defaults to 'error'.</p>
|
2
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">platform</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.WebLayoutPlatformOptions.html" class="tsd-signature-type tsd-kind-type-alias">WebLayoutPlatformOptions</a></h5><div class="tsd-comment tsd-typography"><p>Options used to initialize Web Layouts related features. If omitted, calling <code>fin.Platform.Layout.init()</code>
|
2
3
|
will not work.</p>
|
3
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
@@ -1,5 +1,4 @@
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BaseConnectionOptions | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.BaseConnectionOptions.html">BaseConnectionOptions</a></li></ul><h1>Type Alias BaseConnectionOptions</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Base<wbr/>Connection<wbr/>Options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">brokerUrl</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">interopConfig</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">OpenFin.InteropConfig</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BaseConnectionOptions | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.BaseConnectionOptions.html">BaseConnectionOptions</a></li></ul><h1>Type Alias BaseConnectionOptions</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Base<wbr/>Connection<wbr/>Options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">brokerUrl</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">interopConfig</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">OpenFin.InteropConfig</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">timeout</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">broker<wbr/>Url</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>The URL of the Web Interop broker to connect to.</p>
|
2
2
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">interop<wbr/>Config</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">OpenFin.InteropConfig</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><p>Interop options to use to generate an interop client in <code>fin.me.interop</code></p>
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">log<wbr/>Level</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">WebLogLevel</span></h5><div class="tsd-comment tsd-typography"><p>Log level used throughout the connection and messaging process. Defaults to 'error'.</p>
|
4
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">timeout</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Tears down and cancels the connection attempt if it is not complete within the specified timeout (in ms).</p>
|
5
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
@@ -1,8 +1,10 @@
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>InheritModeConnectConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.InheritModeConnectConfig.html">InheritModeConnectConfig</a></li></ul><h1>Type Alias InheritModeConnectConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Inherit<wbr/>Mode<wbr/>Connect<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <a href="_openfin_core_web.BaseConfig.html" class="tsd-signature-type tsd-kind-type-alias">BaseConfig</a><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">connectionInheritance</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"enabled"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">validateOptions</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">inheritedOptions</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Omit</span><span class="tsd-signature-symbol"><</span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">"timeout"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">connection<wbr/>Inheritance</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"enabled"</span></h5><div class="tsd-comment tsd-typography"><
|
2
|
-
<p>If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>InheritModeConnectConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.InheritModeConnectConfig.html">InheritModeConnectConfig</a></li></ul><h1>Type Alias InheritModeConnectConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Inherit<wbr/>Mode<wbr/>Connect<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <a href="_openfin_core_web.BaseConfig.html" class="tsd-signature-type tsd-kind-type-alias">BaseConfig</a><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">connectionInheritance</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"enabled"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">validateOptions</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">inheritedOptions</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Omit</span><span class="tsd-signature-symbol"><</span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">"timeout"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">connection<wbr/>Inheritance</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"enabled"</span></h5><div class="tsd-comment tsd-typography"><p>If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
3
2
|
This means that the <code>brokerUrl</code> and <code>Identity</code> of the connection will be determined by the WebBroker
|
4
3
|
of the page where the WebLayout is instantiated via <code>fin.Platform.Layout.init()</code> call.</p>
|
5
4
|
<p>If 'disabled', the <code>options</code> property is required.</p>
|
5
|
+
</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Default Value" class="tsd-anchor"></a>Default Value<a href="#Default Value" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">'disabled'</span>
|
6
|
+
</code><button type="button">Copy</button></pre>
|
7
|
+
|
6
8
|
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">?: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a></h5><div class="tsd-comment tsd-typography"><p>Options used to connect to an OpenFin Web Broker. Please note, these will be overriden if connectionInheritance
|
7
9
|
is 'enabled' and supported for the current browsing context. In the case that inherited options are unavailable,
|
8
10
|
these options will be used.</p>
|
@@ -1,7 +1,9 @@
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>StandAloneConnectConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.StandAloneConnectConfig.html">StandAloneConnectConfig</a></li></ul><h1>Type Alias StandAloneConnectConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Stand<wbr/>Alone<wbr/>Connect<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <a href="_openfin_core_web.BaseConfig.html" class="tsd-signature-type tsd-kind-type-alias">BaseConfig</a><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">connectionInheritance</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"disabled"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">connection<wbr/>Inheritance</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"disabled"</span></h5><div class="tsd-comment tsd-typography"><
|
2
|
-
<p>If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>StandAloneConnectConfig | @openfin/core-web</title><meta name="description" content="Documentation for @openfin/core-web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@openfin/core-web</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@openfin/core-web</a></li><li><a href="../modules/_openfin_core_web.html">@openfin/core-web</a></li><li><a href="_openfin_core_web.StandAloneConnectConfig.html">StandAloneConnectConfig</a></li></ul><h1>Type Alias StandAloneConnectConfig</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Stand<wbr/>Alone<wbr/>Connect<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <a href="_openfin_core_web.BaseConfig.html" class="tsd-signature-type tsd-kind-type-alias">BaseConfig</a><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">connectionInheritance</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"disabled"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">connection<wbr/>Inheritance</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"disabled"</span></h5><div class="tsd-comment tsd-typography"><p>If 'enabled', attempts to inherit connection options if it is running as a View within an OpenFin WebLayout.
|
3
2
|
This means that the <code>brokerUrl</code> and <code>Identity</code> of the connection will be determined by the WebBroker
|
4
3
|
of the page where the WebLayout is instantiated via <code>fin.Platform.Layout.init()</code> call.</p>
|
5
4
|
<p>If 'disabled', the <code>options</code> property is required.</p>
|
5
|
+
</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Default Value" class="tsd-anchor"></a>Default Value<a href="#Default Value" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">'disabled'</span>
|
6
|
+
</code><button type="button">Copy</button></pre>
|
7
|
+
|
6
8
|
</div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">options</span><span class="tsd-signature-symbol">: </span><a href="_openfin_core_web.BaseConnectionOptions.html" class="tsd-signature-type tsd-kind-type-alias">BaseConnectionOptions</a></h5><div class="tsd-comment tsd-typography"><p>Options used to connect to an OpenFin Web Broker. Mandatory if StandAloneConnectConfig.connectionInheritance is 'disabled'.</p>
|
7
9
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@openfin/core-web</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/out/iframe-broker.cjs.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e="web-broker-ports-ready",
|
1
|
+
"use strict";const e=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},t="web-broker-ports-ready",r="worker-initialize-connection",i="create-fallback-connection",o="request-fallback-connection",n=e=>`ack-${e}`,s=new Map([["debug",0],["info",1],["warn",2],["error",3],["none",4]]);class a{static setGlobalLogLevel(e){a.LOG_LEVEL=e??"error"}constructor(...e){this.scopes=e}log(e,...t){const r=s.get(e)??3;var i;(s.get(a.LOG_LEVEL)??3)<=r&&console.log(`[${(new Date).toISOString()}]`,...(i=this.scopes,i.map((e=>`[${e}]`))),...t)}warn(...e){this.log("warn",...e)}error(...e){this.log("error",...e)}info(...e){this.log("info",...e)}debug(...e){this.log("debug",...e)}static getLogger(...e){return new a(...e)}getLogger(...e){return new a(...this.scopes,...e)}}a.LOG_LEVEL="error",a.getLogger("@openfin/core-web/client");const c="openfin/web-shared-worker",d=e=>window.top===e;class l{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,l.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=l.lockApi.request(this.name,(()=>(l.pending.delete(this),e(),new Promise((e=>{l.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,l.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}l.pending=new Set,l.held=new Set;class h{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new l((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let r=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&r--}));const i=await this.lockSelf(e);let o=setInterval((()=>{r>=this.allowedMissedPings?(i.release(),clearInterval(o)):(r++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class w{constructor(t,r,s){this.workerUrl=t,this.iframeWindow=r,this.forceWorker=s,this.identityDisconnectionController=new h,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(t,r)=>{if(e(this.iframeWindow,t)){const e=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{e.port1.addEventListener("message",(t=>{t.data.topic===n(i)&&(t.data.success?a(e.port1):c(t.data.reason))})),e.port1.start();const d={topic:o,payload:{identity:r}};t.postMessage(d,location.origin,[e.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=t=>{"top-window"===this.state&&e(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async e=>{const{data:r}=e;if(e.origin===location.origin&&r.topic===o){const[o,...n]=e.ports;if(n.length>0&&r.payload?.identity){const[e]=n;await this.identityDisconnectionController.lockProxiedConnection(r.payload.identity,e)}const s={topic:i};t.postMessage(s,[o])}}))},this.initialize=async t=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=r=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(r)&&r.origin===e.origin)||!d(r)&&t(r.parent);return!d(e)&&t(e.parent)})(this.iframeWindow)&&e(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":d(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(t)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const p=a.getLogger("@openfin/core-web/iframe-broker"),g=()=>{const e=((e,t)=>{const r=new RegExp(`^${t}<(?<meta>.*)>$`).exec(e)?.groups?.meta;if(r)try{return JSON.parse(atob(r))}catch(e){throw new Error(`Failed to decode JSON from ${r}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function u(e){const r={topic:n(t),success:!1,reason:e?.reason??"Connection Rejected"};window.parent.postMessage(r,"*")}exports.init=async e=>{try{a.setGlobalLogLevel(e.logLevel??"error");const{sharedWorkerUrl:i}=e;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=g(),s=new w(i,window,"same-site"!==e.experimental?.crossTab),c=await s.initialize(o);p.info(`Loading ${i} in ${s.state} mode...`);const d=await(async(e,i,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:r,payload:{identity:o}};await new Promise(((e,t)=>{i.addEventListener("message",(i=>{i.data.topic===n(r)&&(i.data.success?e():t(new Error(i.data.reason)))})),i.start?.(),i.postMessage(c,[a.port2])}));const d={topic:n(t),success:!0,payload:{identity:o}};return e.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,c,o);d.start(),c.start?.(),p.debug(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);u({reason:t.message}),console.error(t)}},exports.rejectConnections=u;
|
package/out/iframe-broker.esm.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const e="web-broker-ports-ready",
|
1
|
+
const e=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},t="web-broker-ports-ready",r="worker-initialize-connection",i="create-fallback-connection",o="request-fallback-connection",n=e=>`ack-${e}`,s=new Map([["debug",0],["info",1],["warn",2],["error",3],["none",4]]);class a{static setGlobalLogLevel(e){a.LOG_LEVEL=e??"error"}constructor(...e){this.scopes=e}log(e,...t){const r=s.get(e)??3;var i;(s.get(a.LOG_LEVEL)??3)<=r&&console.log(`[${(new Date).toISOString()}]`,...(i=this.scopes,i.map((e=>`[${e}]`))),...t)}warn(...e){this.log("warn",...e)}error(...e){this.log("error",...e)}info(...e){this.log("info",...e)}debug(...e){this.log("debug",...e)}static getLogger(...e){return new a(...e)}getLogger(...e){return new a(...this.scopes,...e)}}a.LOG_LEVEL="error",a.getLogger("@openfin/core-web/client");const c="openfin/web-shared-worker",d=e=>window.top===e;class l{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,l.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=l.lockApi.request(this.name,(()=>(l.pending.delete(this),e(),new Promise((e=>{l.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,l.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}l.pending=new Set,l.held=new Set;class h{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new l((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let r=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&r--}));const i=await this.lockSelf(e);let o=setInterval((()=>{r>=this.allowedMissedPings?(i.release(),clearInterval(o)):(r++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class w{constructor(t,r,s){this.workerUrl=t,this.iframeWindow=r,this.forceWorker=s,this.identityDisconnectionController=new h,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(t,r)=>{if(e(this.iframeWindow,t)){const e=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{e.port1.addEventListener("message",(t=>{t.data.topic===n(i)&&(t.data.success?a(e.port1):c(t.data.reason))})),e.port1.start();const d={topic:o,payload:{identity:r}};t.postMessage(d,location.origin,[e.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=t=>{"top-window"===this.state&&e(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async e=>{const{data:r}=e;if(e.origin===location.origin&&r.topic===o){const[o,...n]=e.ports;if(n.length>0&&r.payload?.identity){const[e]=n;await this.identityDisconnectionController.lockProxiedConnection(r.payload.identity,e)}const s={topic:i};t.postMessage(s,[o])}}))},this.initialize=async t=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=r=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(r)&&r.origin===e.origin)||!d(r)&&t(r.parent);return!d(e)&&t(e.parent)})(this.iframeWindow)&&e(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":d(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(t)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const p=a.getLogger("@openfin/core-web/iframe-broker"),g=()=>{const e=((e,t)=>{const r=new RegExp(`^${t}<(?<meta>.*)>$`).exec(e)?.groups?.meta;if(r)try{return JSON.parse(atob(r))}catch(e){throw new Error(`Failed to decode JSON from ${r}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function u(e){const r={topic:n(t),success:!1,reason:e?.reason??"Connection Rejected"};window.parent.postMessage(r,"*")}const m=async e=>{try{a.setGlobalLogLevel(e.logLevel??"error");const{sharedWorkerUrl:i}=e;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=g(),s=new w(i,window,"same-site"!==e.experimental?.crossTab),c=await s.initialize(o);p.info(`Loading ${i} in ${s.state} mode...`);const d=await(async(e,i,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:r,payload:{identity:o}};await new Promise(((e,t)=>{i.addEventListener("message",(i=>{i.data.topic===n(r)&&(i.data.success?e():t(new Error(i.data.reason)))})),i.start?.(),i.postMessage(c,[a.port2])}));const d={topic:n(t),success:!0,payload:{identity:o}};return e.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,c,o);d.start(),c.start?.(),p.debug(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);u({reason:t.message}),console.error(t)}};export{m as init,u as rejectConnections};
|