@openfin/core 33.76.31 → 33.76.36

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.
Files changed (116) hide show
  1. package/openfin-core-33.76.36.tgz +0 -0
  2. package/package.json +1 -1
  3. package/src/OpenFin.d.ts +27 -16
  4. package/src/api/application/Factory.d.ts +148 -100
  5. package/src/api/application/Factory.js +148 -100
  6. package/src/api/application/Instance.d.ts +477 -106
  7. package/src/api/application/Instance.js +474 -106
  8. package/src/api/application/index.d.ts +9 -0
  9. package/src/api/application/index.js +9 -0
  10. package/src/api/base.d.ts +69 -0
  11. package/src/api/base.js +69 -0
  12. package/src/api/clipboard/index.d.ts +111 -31
  13. package/src/api/clipboard/index.js +111 -31
  14. package/src/api/events/application.d.ts +12 -0
  15. package/src/api/events/application.js +12 -0
  16. package/src/api/events/channel.d.ts +5 -0
  17. package/src/api/events/channel.js +5 -0
  18. package/src/api/events/externalApplication.d.ts +5 -0
  19. package/src/api/events/externalApplication.js +5 -0
  20. package/src/api/events/frame.d.ts +5 -0
  21. package/src/api/events/globalHotkey.d.ts +5 -0
  22. package/src/api/events/platform.d.ts +9 -1
  23. package/src/api/events/platform.js +8 -0
  24. package/src/api/events/system.d.ts +13 -0
  25. package/src/api/events/system.js +13 -0
  26. package/src/api/events/view.d.ts +19 -9
  27. package/src/api/events/view.js +10 -0
  28. package/src/api/events/webcontents.d.ts +21 -10
  29. package/src/api/events/webcontents.js +11 -0
  30. package/src/api/events/window.d.ts +70 -1
  31. package/src/api/events/window.js +10 -0
  32. package/src/api/external-application/Factory.d.ts +16 -9
  33. package/src/api/external-application/Factory.js +16 -9
  34. package/src/api/external-application/Instance.d.ts +40 -32
  35. package/src/api/external-application/Instance.js +40 -32
  36. package/src/api/external-application/index.d.ts +9 -0
  37. package/src/api/external-application/index.js +9 -0
  38. package/src/api/fin.d.ts +3 -0
  39. package/src/api/fin.js +3 -0
  40. package/src/api/frame/Factory.d.ts +30 -13
  41. package/src/api/frame/Factory.js +30 -13
  42. package/src/api/frame/Instance.d.ts +51 -38
  43. package/src/api/frame/Instance.js +51 -38
  44. package/src/api/frame/index.d.ts +11 -0
  45. package/src/api/frame/index.js +11 -0
  46. package/src/api/global-hotkey/index.d.ts +81 -13
  47. package/src/api/global-hotkey/index.js +81 -13
  48. package/src/api/interappbus/channel/channel.d.ts +257 -0
  49. package/src/api/interappbus/channel/channel.js +257 -0
  50. package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
  51. package/src/api/interappbus/channel/channels-docs.js +71 -68
  52. package/src/api/interappbus/channel/client.d.ts +93 -0
  53. package/src/api/interappbus/channel/client.js +93 -1
  54. package/src/api/interappbus/channel/index.d.ts +164 -0
  55. package/src/api/interappbus/channel/index.js +165 -1
  56. package/src/api/interappbus/channel/provider.d.ts +172 -0
  57. package/src/api/interappbus/channel/provider.js +172 -0
  58. package/src/api/interappbus/index.d.ts +55 -20
  59. package/src/api/interappbus/index.js +55 -20
  60. package/src/api/interop/Factory.d.ts +30 -10
  61. package/src/api/interop/Factory.js +30 -10
  62. package/src/api/interop/InteropBroker.d.ts +298 -70
  63. package/src/api/interop/InteropBroker.js +298 -70
  64. package/src/api/interop/InteropClient.d.ts +286 -62
  65. package/src/api/interop/InteropClient.js +286 -62
  66. package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
  67. package/src/api/interop/SessionContextGroupClient.js +2 -2
  68. package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
  69. package/src/api/interop/fdc3/documentationStub.js +17 -0
  70. package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
  71. package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
  72. package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
  73. package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
  74. package/src/api/interop/index.d.ts +8 -0
  75. package/src/api/interop/index.js +8 -0
  76. package/src/api/platform/Factory.d.ts +121 -65
  77. package/src/api/platform/Factory.js +122 -66
  78. package/src/api/platform/Instance.d.ts +551 -48
  79. package/src/api/platform/Instance.js +551 -49
  80. package/src/api/platform/index.d.ts +9 -0
  81. package/src/api/platform/index.js +9 -0
  82. package/src/api/platform/layout/Factory.d.ts +53 -76
  83. package/src/api/platform/layout/Factory.js +53 -76
  84. package/src/api/platform/layout/Instance.d.ts +158 -23
  85. package/src/api/platform/layout/Instance.js +118 -20
  86. package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
  87. package/src/api/platform/layout/entities/layout-entities.js +222 -30
  88. package/src/api/platform/layout/index.d.ts +9 -0
  89. package/src/api/platform/layout/index.js +9 -0
  90. package/src/api/platform/provider.d.ts +398 -51
  91. package/src/api/snapshot-source/Factory.d.ts +33 -18
  92. package/src/api/snapshot-source/Factory.js +33 -18
  93. package/src/api/snapshot-source/Instance.d.ts +30 -8
  94. package/src/api/snapshot-source/Instance.js +30 -8
  95. package/src/api/snapshot-source/index.d.ts +9 -0
  96. package/src/api/snapshot-source/index.js +9 -0
  97. package/src/api/system/index.d.ts +1137 -186
  98. package/src/api/system/index.js +1142 -186
  99. package/src/api/view/Factory.d.ts +54 -16
  100. package/src/api/view/Factory.js +54 -16
  101. package/src/api/view/Instance.d.ts +330 -216
  102. package/src/api/view/Instance.js +331 -217
  103. package/src/api/view/index.d.ts +9 -0
  104. package/src/api/view/index.js +9 -0
  105. package/src/api/webcontents/main.d.ts +890 -0
  106. package/src/api/webcontents/main.js +890 -0
  107. package/src/api/window/Factory.d.ts +67 -16
  108. package/src/api/window/Factory.js +67 -16
  109. package/src/api/window/Instance.d.ts +824 -316
  110. package/src/api/window/Instance.js +822 -320
  111. package/src/api/window/index.d.ts +11 -0
  112. package/src/api/window/index.js +11 -0
  113. package/src/namespaces.d.ts +1 -0
  114. package/src/namespaces.js +3 -1
  115. package/src/shapes/protocol.d.ts +4 -0
  116. package/openfin-core-33.76.31.tgz +0 -0
@@ -3,21 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_1 = require("../base");
4
4
  const Instance_1 = require("./Instance");
5
5
  const utils_1 = require("./utils");
6
- /**
7
- * @REMOVED
8
- * @typedef { object } SnapshotProvider
9
- * @property {getSnapshot} [getSnapshot]
10
- * @property {applySnapshot} [applySnapshot]
11
- */
12
- /**
13
- * @lends SnapshotSource
14
- */
15
6
  class SnapshotSourceModule extends base_1.Base {
16
7
  /**
17
8
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
18
- * @param { SnapshotProvider } provider
19
- * @return { Promise<void> }
20
- * @tutorial SnapshotSource.init
9
+ * @param provider
10
+ *
11
+ * @example
12
+ * ```js
13
+ * const snapshotProvider = {
14
+ * async getSnapshot() {
15
+ * const bounds = await fin.me.getBounds();
16
+ * return bounds;
17
+ * },
18
+ * async applySnapshot(snapshot) {
19
+ * await fin.me.setBounds(snapshot);
20
+ * return undefined;
21
+ * }
22
+ * }
23
+ *
24
+ * await fin.SnapshotSource.init(snapshotProvider);
25
+ * ```
21
26
  * @static
22
27
  */
23
28
  async init(provider) {
@@ -38,9 +43,14 @@ class SnapshotSourceModule extends base_1.Base {
38
43
  }
39
44
  /**
40
45
  * Synchronously returns a SnapshotSource object that represents the current SnapshotSource.
41
- * @param { Identity } identity
42
- * @return { SnapshotSource }
43
- * @tutorial SnapshotSource.wrapSync
46
+ * @param identity
47
+ *
48
+ * @example
49
+ * ```js
50
+ * const snapshotSource = fin.SnapshotSource.wrapSync(fin.me);
51
+ * // Use wrapped instance's getSnapshot method, e.g.:
52
+ * const snapshot = await snapshotSource.getSnapshot();
53
+ * ```
44
54
  * @static
45
55
  */
46
56
  wrapSync(identity) {
@@ -51,9 +61,14 @@ class SnapshotSourceModule extends base_1.Base {
51
61
  }
52
62
  /**
53
63
  * Asynchronously returns a SnapshotSource object that represents the current SnapshotSource.
54
- * @param { Identity } identity
55
- * @return { Promise.<SnapshotSource> }
56
- * @tutorial SnapshotSource.wrap
64
+ * @param identity
65
+ *
66
+ * @example
67
+ * ```js
68
+ * const snapshotSource = await fin.SnapshotSource.wrap(fin.me);
69
+ * // Use wrapped instance's getSnapshot method, e.g.:
70
+ * const snapshot = await snapshotSource.getSnapshot();
71
+ * ```
57
72
  * @static
58
73
  */
59
74
  async wrap(identity) {
@@ -3,29 +3,51 @@ import { Base } from '../base';
3
3
  import { Transport } from '../../transport/transport';
4
4
  /**
5
5
  * Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
6
- * @namespace
6
+ *
7
7
  */
8
8
  export declare class SnapshotSource<T = any> extends Base {
9
9
  #private;
10
+ /**
11
+ * @internal
12
+ */
10
13
  constructor(wire: Transport, id: OpenFin.ApplicationIdentity);
11
14
  get identity(): OpenFin.ApplicationIdentity;
12
15
  /**
13
16
  * Method to determine if the SnapshotSource has been initialized.
14
17
  *
15
- * Use when the parent application is starting up to ensure the SnapshotSource is able to accept and
18
+ * @remarks Use when the parent application is starting up to ensure the SnapshotSource is able to accept and
16
19
  * apply a snapshot using the {@link SnapshotSource#applySnapshot applySnapshot} method.
17
- * @return { Promise<void> }
18
- * @tutorial SnapshotSource.ready
20
+ *
21
+ * @example
22
+ * ```js
23
+ * let snapshotSource = fin.SnapshotSource.wrapSync(fin.me);
24
+ *
25
+ * const snapshotProvider = {
26
+ * async getSnapshot() { return 'foo' },
27
+ * async applySnapshot(snapshot) {
28
+ * console.log(snapshot);
29
+ * return undefined;
30
+ * }
31
+ * }
32
+ * await fin.SnapshotSource.init(snapshotProvider);
33
+ *
34
+ * try {
35
+ * await snapshotSource.ready();
36
+ * await snapshotSource.applySnapshot('foo');
37
+ * } catch (err) {
38
+ * console.log(err)
39
+ * }
40
+ * ```
19
41
  */
20
42
  ready(): Promise<void>;
21
43
  /**
22
- * Call the SnapshotSource's getSnapshot method defined by {@link SnapshotSource#init init}.
23
- * @return { Promise<any> }
44
+ * Call the SnapshotSource's getSnapshot method defined by {@link SnapshotSource.SnapshotSourceModule#init init}.
45
+ *
24
46
  */
25
47
  getSnapshot(): Promise<T>;
26
48
  /**
27
- * Call the SnapshotSource's applySnapshot method defined by {@link SnapshotSource#init init}.
28
- * @return { Promise<void> }
49
+ * Call the SnapshotSource's applySnapshot method defined by {@link SnapshotSource.SnapshotSourceModule#init init}.
50
+ *
29
51
  */
30
52
  applySnapshot(snapshot: T): Promise<void>;
31
53
  }
@@ -19,9 +19,12 @@ const utils_1 = require("./utils");
19
19
  const connectionMap = new Map();
20
20
  /**
21
21
  * Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
22
- * @namespace
22
+ *
23
23
  */
24
24
  class SnapshotSource extends base_1.Base {
25
+ /**
26
+ * @internal
27
+ */
25
28
  constructor(wire, id) {
26
29
  super(wire);
27
30
  _SnapshotSource_identity.set(this, void 0);
@@ -85,10 +88,29 @@ class SnapshotSource extends base_1.Base {
85
88
  /**
86
89
  * Method to determine if the SnapshotSource has been initialized.
87
90
  *
88
- * Use when the parent application is starting up to ensure the SnapshotSource is able to accept and
91
+ * @remarks Use when the parent application is starting up to ensure the SnapshotSource is able to accept and
89
92
  * apply a snapshot using the {@link SnapshotSource#applySnapshot applySnapshot} method.
90
- * @return { Promise<void> }
91
- * @tutorial SnapshotSource.ready
93
+ *
94
+ * @example
95
+ * ```js
96
+ * let snapshotSource = fin.SnapshotSource.wrapSync(fin.me);
97
+ *
98
+ * const snapshotProvider = {
99
+ * async getSnapshot() { return 'foo' },
100
+ * async applySnapshot(snapshot) {
101
+ * console.log(snapshot);
102
+ * return undefined;
103
+ * }
104
+ * }
105
+ * await fin.SnapshotSource.init(snapshotProvider);
106
+ *
107
+ * try {
108
+ * await snapshotSource.ready();
109
+ * await snapshotSource.applySnapshot('foo');
110
+ * } catch (err) {
111
+ * console.log(err)
112
+ * }
113
+ * ```
92
114
  */
93
115
  async ready() {
94
116
  this.wire.sendAction('snapshot-source-ready').catch((e) => {
@@ -105,8 +127,8 @@ class SnapshotSource extends base_1.Base {
105
127
  }
106
128
  }
107
129
  /**
108
- * Call the SnapshotSource's getSnapshot method defined by {@link SnapshotSource#init init}.
109
- * @return { Promise<any> }
130
+ * Call the SnapshotSource's getSnapshot method defined by {@link SnapshotSource.SnapshotSourceModule#init init}.
131
+ *
110
132
  */
111
133
  async getSnapshot() {
112
134
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
@@ -117,8 +139,8 @@ class SnapshotSource extends base_1.Base {
117
139
  return (await response).snapshot;
118
140
  }
119
141
  /**
120
- * Call the SnapshotSource's applySnapshot method defined by {@link SnapshotSource#init init}.
121
- * @return { Promise<void> }
142
+ * Call the SnapshotSource's applySnapshot method defined by {@link SnapshotSource.SnapshotSourceModule#init init}.
143
+ *
122
144
  */
123
145
  async applySnapshot(snapshot) {
124
146
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Entry point for the OpenFin SnapshotSource namespace.
3
+ *
4
+ * Because TypeDoc does not currently support multiple modules with the same name, the module alias "SnapshotSourceModule" is used for
5
+ * the module containing static members of the `SnapshotSource` namespace (available under `fin.SnapshotSource`), while `SnapshotSource` documents
6
+ * instances of the OpenFin `SnapshotSource` class.
7
+ *
8
+ * @packageDocumentation
9
+ */
1
10
  import SnapshotModule from './Factory';
2
11
  export default SnapshotModule;
3
12
  export * from './Instance';
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ /**
3
+ * Entry point for the OpenFin SnapshotSource namespace.
4
+ *
5
+ * Because TypeDoc does not currently support multiple modules with the same name, the module alias "SnapshotSourceModule" is used for
6
+ * the module containing static members of the `SnapshotSource` namespace (available under `fin.SnapshotSource`), while `SnapshotSource` documents
7
+ * instances of the OpenFin `SnapshotSource` class.
8
+ *
9
+ * @packageDocumentation
10
+ */
2
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
12
  if (k2 === undefined) k2 = k;
4
13
  var desc = Object.getOwnPropertyDescriptor(m, k);