@openfin/core 33.76.27 → 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.27.tgz +0 -0
@@ -1,44 +1,95 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { Base } from '../base';
3
- /**
4
- * @lends Window
5
- */
6
3
  export default class _WindowModule extends Base {
7
4
  /**
8
5
  * Asynchronously returns a Window object that represents an existing window.
9
- * @param { Identity } identity
10
- * @return {Promise.<_Window>}
11
- * @tutorial Window.wrap
6
+ * @param identity
7
+ *
8
+ * @example
9
+ * ```js
10
+ * async function createWin() {
11
+ * const app = await fin.Application.start({
12
+ * name: 'myApp',
13
+ * uuid: 'app-1',
14
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
15
+ * autoShow: true
16
+ * });
17
+ * return await app.getWindow();
18
+ * }
19
+ * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
20
+ * .then(win => console.log('wrapped window'))
21
+ * .catch(err => console.log(err));
22
+ * ```
12
23
  * @static
13
24
  */
14
25
  wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
15
26
  /**
16
27
  * Synchronously returns a Window object that represents an existing window.
17
- * @param { Identity } identity
18
- * @return {_Window}
19
- * @tutorial Window.wrapSync
28
+ * @param identity
29
+ *
30
+ * @example
31
+ * ```js
32
+ * async function createWin() {
33
+ * const app = await fin.Application.start({
34
+ * name: 'myApp',
35
+ * uuid: 'app-1',
36
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
37
+ * autoShow: true
38
+ * });
39
+ * return await app.getWindow();
40
+ * }
41
+ * await createWin();
42
+ * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
43
+ * ```
20
44
  * @static
21
45
  */
22
46
  wrapSync(identity: OpenFin.Identity): OpenFin.Window;
23
47
  /**
24
48
  * Creates a new Window.
25
- * @param { Window~options } options - Window creation options
26
- * @return {Promise.<_Window>}
27
- * @tutorial Window.create
49
+ * @param options - Window creation options
50
+ *
51
+ * @example
52
+ * ```js
53
+ * async function createWindow() {
54
+ * const winOption = {
55
+ * name:'child',
56
+ * defaultWidth: 300,
57
+ * defaultHeight: 300,
58
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
59
+ * frame: true,
60
+ * autoShow: true
61
+ * };
62
+ * return await fin.Window.create(winOption);
63
+ * }
64
+ *
65
+ * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
66
+ * ```
28
67
  * @static
29
68
  */
30
69
  create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
31
70
  /**
32
71
  * Asynchronously returns a Window object that represents the current window
33
- * @return {Promise.<_Window>}
34
- * @tutorial Window.getCurrent
72
+ *
73
+ * @example
74
+ * ```js
75
+ * fin.Window.getCurrent()
76
+ * .then(wnd => console.log('current window'))
77
+ * .catch(err => console.log(err));
78
+ *
79
+ * ```
35
80
  * @static
36
81
  */
37
82
  getCurrent(): Promise<OpenFin.Window>;
38
83
  /**
39
84
  * Synchronously returns a Window object that represents the current window
40
- * @return {_Window}
41
- * @tutorial Window.getCurrentSync
85
+ *
86
+ * @example
87
+ * ```js
88
+ * const wnd = fin.Window.getCurrentSync();
89
+ * const info = await wnd.getInfo();
90
+ * console.log(info);
91
+ *
92
+ * ```
42
93
  * @static
43
94
  */
44
95
  getCurrentSync(): OpenFin.Window;
@@ -3,15 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_1 = require("../base");
4
4
  const validate_1 = require("../../util/validate");
5
5
  const Instance_1 = require("./Instance");
6
- /**
7
- * @lends Window
8
- */
9
6
  class _WindowModule extends base_1.Base {
10
7
  /**
11
8
  * Asynchronously returns a Window object that represents an existing window.
12
- * @param { Identity } identity
13
- * @return {Promise.<_Window>}
14
- * @tutorial Window.wrap
9
+ * @param identity
10
+ *
11
+ * @example
12
+ * ```js
13
+ * async function createWin() {
14
+ * const app = await fin.Application.start({
15
+ * name: 'myApp',
16
+ * uuid: 'app-1',
17
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
18
+ * autoShow: true
19
+ * });
20
+ * return await app.getWindow();
21
+ * }
22
+ * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
23
+ * .then(win => console.log('wrapped window'))
24
+ * .catch(err => console.log(err));
25
+ * ```
15
26
  * @static
16
27
  */
17
28
  async wrap(identity) {
@@ -26,9 +37,22 @@ class _WindowModule extends base_1.Base {
26
37
  }
27
38
  /**
28
39
  * Synchronously returns a Window object that represents an existing window.
29
- * @param { Identity } identity
30
- * @return {_Window}
31
- * @tutorial Window.wrapSync
40
+ * @param identity
41
+ *
42
+ * @example
43
+ * ```js
44
+ * async function createWin() {
45
+ * const app = await fin.Application.start({
46
+ * name: 'myApp',
47
+ * uuid: 'app-1',
48
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
49
+ * autoShow: true
50
+ * });
51
+ * return await app.getWindow();
52
+ * }
53
+ * await createWin();
54
+ * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
55
+ * ```
32
56
  * @static
33
57
  */
34
58
  wrapSync(identity) {
@@ -43,9 +67,24 @@ class _WindowModule extends base_1.Base {
43
67
  }
44
68
  /**
45
69
  * Creates a new Window.
46
- * @param { Window~options } options - Window creation options
47
- * @return {Promise.<_Window>}
48
- * @tutorial Window.create
70
+ * @param options - Window creation options
71
+ *
72
+ * @example
73
+ * ```js
74
+ * async function createWindow() {
75
+ * const winOption = {
76
+ * name:'child',
77
+ * defaultWidth: 300,
78
+ * defaultHeight: 300,
79
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
80
+ * frame: true,
81
+ * autoShow: true
82
+ * };
83
+ * return await fin.Window.create(winOption);
84
+ * }
85
+ *
86
+ * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
87
+ * ```
49
88
  * @static
50
89
  */
51
90
  create(options) {
@@ -57,8 +96,14 @@ class _WindowModule extends base_1.Base {
57
96
  }
58
97
  /**
59
98
  * Asynchronously returns a Window object that represents the current window
60
- * @return {Promise.<_Window>}
61
- * @tutorial Window.getCurrent
99
+ *
100
+ * @example
101
+ * ```js
102
+ * fin.Window.getCurrent()
103
+ * .then(wnd => console.log('current window'))
104
+ * .catch(err => console.log(err));
105
+ *
106
+ * ```
62
107
  * @static
63
108
  */
64
109
  getCurrent() {
@@ -73,8 +118,14 @@ class _WindowModule extends base_1.Base {
73
118
  }
74
119
  /**
75
120
  * Synchronously returns a Window object that represents the current window
76
- * @return {_Window}
77
- * @tutorial Window.getCurrentSync
121
+ *
122
+ * @example
123
+ * ```js
124
+ * const wnd = fin.Window.getCurrentSync();
125
+ * const info = await wnd.getInfo();
126
+ * console.log(info);
127
+ *
128
+ * ```
78
129
  * @static
79
130
  */
80
131
  getCurrentSync() {