@openfin/core 33.76.36 → 33.77.1
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/OpenFin.d.ts +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17111 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.36.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3091
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -196
- package/src/api/application/Factory.js +0 -278
- package/src/api/application/Instance.d.ts +0 -692
- package/src/api/application/Instance.js +0 -821
- package/src/api/application/index.d.ts +0 -12
- package/src/api/application/index.js +0 -28
- package/src/api/base.d.ts +0 -117
- package/src/api/base.js +0 -246
- package/src/api/clipboard/index.d.ts +0 -172
- package/src/api/clipboard/index.js +0 -200
- package/src/api/events/application.d.ts +0 -158
- package/src/api/events/application.js +0 -14
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -35
- package/src/api/events/channel.js +0 -7
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -24
- package/src/api/events/externalApplication.js +0 -7
- package/src/api/events/frame.d.ts +0 -35
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -25
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -34
- package/src/api/events/platform.js +0 -10
- package/src/api/events/system.d.ts +0 -126
- package/src/api/events/system.js +0 -15
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -92
- package/src/api/events/view.js +0 -12
- package/src/api/events/webcontents.d.ts +0 -277
- package/src/api/events/webcontents.js +0 -13
- package/src/api/events/window.d.ts +0 -421
- package/src/api/events/window.js +0 -12
- package/src/api/external-application/Factory.d.ts +0 -34
- package/src/api/external-application/Factory.js +0 -47
- package/src/api/external-application/Instance.d.ts +0 -110
- package/src/api/external-application/Instance.js +0 -117
- package/src/api/external-application/index.d.ts +0 -12
- package/src/api/external-application/index.js +0 -28
- package/src/api/fin.d.ts +0 -54
- package/src/api/fin.js +0 -45
- package/src/api/frame/Factory.d.ts +0 -54
- package/src/api/frame/Factory.js +0 -86
- package/src/api/frame/Instance.d.ts +0 -136
- package/src/api/frame/Instance.js +0 -143
- package/src/api/frame/index.d.ts +0 -14
- package/src/api/frame/index.js +0 -30
- package/src/api/global-hotkey/index.d.ts +0 -106
- package/src/api/global-hotkey/index.js +0 -132
- package/src/api/interappbus/channel/channel.d.ts +0 -285
- package/src/api/interappbus/channel/channel.js +0 -334
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -342
- package/src/api/interappbus/channel/channels-docs.js +0 -401
- package/src/api/interappbus/channel/client.d.ts +0 -117
- package/src/api/interappbus/channel/client.js +0 -181
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -189
- package/src/api/interappbus/channel/index.js +0 -333
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -206
- package/src/api/interappbus/channel/provider.js +0 -338
- package/src/api/interappbus/index.d.ts +0 -120
- package/src/api/interappbus/index.js +0 -210
- package/src/api/interop/Factory.d.ts +0 -57
- package/src/api/interop/Factory.js +0 -96
- package/src/api/interop/InteropBroker.d.ts +0 -665
- package/src/api/interop/InteropBroker.js +0 -1313
- package/src/api/interop/InteropClient.d.ts +0 -502
- package/src/api/interop/InteropClient.js +0 -683
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/documentationStub.d.ts +0 -14
- package/src/api/interop/fdc3/documentationStub.js +0 -17
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -205
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -435
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -298
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -479
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -12
- package/src/api/interop/index.js +0 -28
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -171
- package/src/api/platform/Factory.js +0 -240
- package/src/api/platform/Instance.d.ts +0 -653
- package/src/api/platform/Instance.js +0 -834
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -12
- package/src/api/platform/index.js +0 -28
- package/src/api/platform/layout/Factory.d.ts +0 -91
- package/src/api/platform/layout/Factory.js +0 -151
- package/src/api/platform/layout/Instance.d.ts +0 -192
- package/src/api/platform/layout/Instance.js +0 -224
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -427
- package/src/api/platform/layout/entities/layout-entities.js +0 -504
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -11
- package/src/api/platform/layout/index.js +0 -27
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -510
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -53
- package/src/api/snapshot-source/Factory.js +0 -81
- package/src/api/snapshot-source/Instance.d.ts +0 -53
- package/src/api/snapshot-source/Instance.js +0 -154
- package/src/api/snapshot-source/index.d.ts +0 -12
- package/src/api/snapshot-source/index.js +0 -28
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -1468
- package/src/api/system/index.js +0 -1851
- package/src/api/view/Factory.d.ts +0 -88
- package/src/api/view/Factory.js +0 -141
- package/src/api/view/Instance.d.ts +0 -601
- package/src/api/view/Instance.js +0 -671
- package/src/api/view/index.d.ts +0 -12
- package/src/api/view/index.js +0 -28
- package/src/api/webcontents/main.d.ts +0 -922
- package/src/api/webcontents/main.js +0 -1046
- package/src/api/window/Factory.d.ts +0 -96
- package/src/api/window/Factory.js +0 -142
- package/src/api/window/Instance.d.ts +0 -1598
- package/src/api/window/Instance.js +0 -1851
- package/src/api/window/index.d.ts +0 -14
- package/src/api/window/index.js +0 -30
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -22
- package/src/namespaces.js +0 -26
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -204
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../OpenFin';
|
|
2
|
-
type LayoutPresetType = OpenFin.LayoutPresetType;
|
|
3
|
-
export declare function isValidPresetType(type: LayoutPresetType): type is LayoutPresetType;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
isValidPresetType: typeof isValidPresetType;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isValidPresetType = void 0;
|
|
4
|
-
function isValidPresetType(type) {
|
|
5
|
-
switch (type) {
|
|
6
|
-
case 'columns':
|
|
7
|
-
case 'grid':
|
|
8
|
-
case 'rows':
|
|
9
|
-
case 'tabs':
|
|
10
|
-
return true;
|
|
11
|
-
default:
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.isValidPresetType = isValidPresetType;
|
|
16
|
-
exports.default = { isValidPresetType };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entry point for the OpenFin Platform namespace.
|
|
3
|
-
*
|
|
4
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "PlatformModule" is used for
|
|
5
|
-
* the module containing static members of the `Platform` namespace (available under `fin.Platform`), while `Platform` documents
|
|
6
|
-
* instances of the OpenFin `Platform` class.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
import PlatformModule from './Factory';
|
|
11
|
-
export default PlatformModule;
|
|
12
|
-
export * from './Instance';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Entry point for the OpenFin Platform namespace.
|
|
4
|
-
*
|
|
5
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "PlatformModule" is used for
|
|
6
|
-
* the module containing static members of the `Platform` namespace (available under `fin.Platform`), while `Platform` documents
|
|
7
|
-
* instances of the OpenFin `Platform` class.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const Factory_1 = require("./Factory");
|
|
27
|
-
exports.default = Factory_1.default;
|
|
28
|
-
__exportStar(require("./Instance"), exports);
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../../OpenFin';
|
|
2
|
-
import { Base } from '../../base';
|
|
3
|
-
import { Layout } from './Instance';
|
|
4
|
-
type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
|
5
|
-
export declare class LayoutModule extends Base {
|
|
6
|
-
#private;
|
|
7
|
-
/**
|
|
8
|
-
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
9
|
-
* @param identity
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```js
|
|
13
|
-
* let windowIdentity;
|
|
14
|
-
* if (!fin.me.isWindow) {
|
|
15
|
-
* windowIdentity = fin.me.identity;
|
|
16
|
-
* } else if (fin.me.isView) {
|
|
17
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
18
|
-
* } else {
|
|
19
|
-
* throw new Error('Not running in a platform View or Window');
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* const layout = await fin.Platform.Layout.wrap(windowIdentity);
|
|
23
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
24
|
-
* const layoutConfig = await layout.getConfig();
|
|
25
|
-
* ```
|
|
26
|
-
* @static
|
|
27
|
-
*/
|
|
28
|
-
wrap(identity: OpenFin.Identity): Promise<OpenFin.Layout>;
|
|
29
|
-
/**
|
|
30
|
-
* Synchronously returns a Layout object that represents a Window's layout.
|
|
31
|
-
* @param identity
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```js
|
|
35
|
-
* let windowIdentity;
|
|
36
|
-
* if (!fin.me.isWindow) {
|
|
37
|
-
* windowIdentity = fin.me.identity;
|
|
38
|
-
* } else if (fin.me.isView) {
|
|
39
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
40
|
-
* } else {
|
|
41
|
-
* throw new Error('Not running in a platform View or Window');
|
|
42
|
-
* }
|
|
43
|
-
*
|
|
44
|
-
* const layout = fin.Platform.Layout.wrapSync(windowIdentity);
|
|
45
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
46
|
-
* const layoutConfig = await layout.getConfig();
|
|
47
|
-
* ```
|
|
48
|
-
* @static
|
|
49
|
-
*/
|
|
50
|
-
wrapSync(identity: OpenFin.Identity): OpenFin.Layout;
|
|
51
|
-
/**
|
|
52
|
-
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```js
|
|
56
|
-
* const layout = await fin.Platform.Layout.getCurrent();
|
|
57
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
58
|
-
* const layoutConfig = await layout.getConfig();
|
|
59
|
-
* ```
|
|
60
|
-
* @static
|
|
61
|
-
*/
|
|
62
|
-
getCurrent(): Promise<OpenFin.Layout>;
|
|
63
|
-
/**
|
|
64
|
-
* Synchronously returns a Layout object that represents a Window's layout.
|
|
65
|
-
*
|
|
66
|
-
* @remarks Cannot be called from a view.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```js
|
|
71
|
-
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
72
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
73
|
-
* const layoutConfig = await layout.getConfig();
|
|
74
|
-
* ```
|
|
75
|
-
* @static
|
|
76
|
-
*/
|
|
77
|
-
getCurrentSync(): OpenFin.Layout;
|
|
78
|
-
/**
|
|
79
|
-
* Initialize the window's Layout. Must be called from a custom window that has a 'layout' option set upon creation of that window.
|
|
80
|
-
* If a containerId is not provided, this method attempts to find an element with the id `layout-container`.
|
|
81
|
-
* A Layout will <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
|
|
82
|
-
* In order to capture the relevant events during Layout initiation, set up the listeners on the DOM element prior to calling `init`.
|
|
83
|
-
* @param options - Layout init options.
|
|
84
|
-
*
|
|
85
|
-
* @static
|
|
86
|
-
* @experimental
|
|
87
|
-
* @tutorial Layout.init
|
|
88
|
-
*/
|
|
89
|
-
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
|
90
|
-
}
|
|
91
|
-
export {};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
-
};
|
|
13
|
-
var _LayoutModule_layoutInitializationAttempted;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.LayoutModule = void 0;
|
|
16
|
-
/* eslint-disable no-undef, import/prefer-default-export */
|
|
17
|
-
const base_1 = require("../../base");
|
|
18
|
-
const Instance_1 = require("./Instance");
|
|
19
|
-
class LayoutModule extends base_1.Base {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
_LayoutModule_layoutInitializationAttempted.set(this, false);
|
|
23
|
-
/**
|
|
24
|
-
* Initialize the window's Layout. Must be called from a custom window that has a 'layout' option set upon creation of that window.
|
|
25
|
-
* If a containerId is not provided, this method attempts to find an element with the id `layout-container`.
|
|
26
|
-
* A Layout will <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
|
|
27
|
-
* In order to capture the relevant events during Layout initiation, set up the listeners on the DOM element prior to calling `init`.
|
|
28
|
-
* @param options - Layout init options.
|
|
29
|
-
*
|
|
30
|
-
* @static
|
|
31
|
-
* @experimental
|
|
32
|
-
* @tutorial Layout.init
|
|
33
|
-
*/
|
|
34
|
-
this.init = async (options = {}) => {
|
|
35
|
-
this.wire.sendAction('layout-init').catch((e) => {
|
|
36
|
-
// don't expose
|
|
37
|
-
});
|
|
38
|
-
if (!this.fin.me.isWindow) {
|
|
39
|
-
throw new Error('Layout.init can only be called from a Window context.');
|
|
40
|
-
}
|
|
41
|
-
else if (__classPrivateFieldGet(this, _LayoutModule_layoutInitializationAttempted, "f")) {
|
|
42
|
-
throw new Error('Layout for this window already initialized, please use Layout.replace call to replace the layout.');
|
|
43
|
-
}
|
|
44
|
-
__classPrivateFieldSet(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
|
45
|
-
return this.wire.environment.initLayout(this.fin, this.wire, options);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
50
|
-
* @param identity
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```js
|
|
54
|
-
* let windowIdentity;
|
|
55
|
-
* if (!fin.me.isWindow) {
|
|
56
|
-
* windowIdentity = fin.me.identity;
|
|
57
|
-
* } else if (fin.me.isView) {
|
|
58
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
59
|
-
* } else {
|
|
60
|
-
* throw new Error('Not running in a platform View or Window');
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
63
|
-
* const layout = await fin.Platform.Layout.wrap(windowIdentity);
|
|
64
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
65
|
-
* const layoutConfig = await layout.getConfig();
|
|
66
|
-
* ```
|
|
67
|
-
* @static
|
|
68
|
-
*/
|
|
69
|
-
// eslint-disable-next-line class-methods-use-this
|
|
70
|
-
async wrap(identity) {
|
|
71
|
-
this.wire.sendAction('layout-wrap').catch((e) => {
|
|
72
|
-
// don't expose
|
|
73
|
-
});
|
|
74
|
-
return new Instance_1.Layout(identity, this.wire);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Synchronously returns a Layout object that represents a Window's layout.
|
|
78
|
-
* @param identity
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```js
|
|
82
|
-
* let windowIdentity;
|
|
83
|
-
* if (!fin.me.isWindow) {
|
|
84
|
-
* windowIdentity = fin.me.identity;
|
|
85
|
-
* } else if (fin.me.isView) {
|
|
86
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
87
|
-
* } else {
|
|
88
|
-
* throw new Error('Not running in a platform View or Window');
|
|
89
|
-
* }
|
|
90
|
-
*
|
|
91
|
-
* const layout = fin.Platform.Layout.wrapSync(windowIdentity);
|
|
92
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
93
|
-
* const layoutConfig = await layout.getConfig();
|
|
94
|
-
* ```
|
|
95
|
-
* @static
|
|
96
|
-
*/
|
|
97
|
-
// eslint-disable-next-line class-methods-use-this
|
|
98
|
-
wrapSync(identity) {
|
|
99
|
-
this.wire.sendAction('layout-wrap-sync').catch((e) => {
|
|
100
|
-
// don't expose
|
|
101
|
-
});
|
|
102
|
-
return new Instance_1.Layout(identity, this.wire);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```js
|
|
109
|
-
* const layout = await fin.Platform.Layout.getCurrent();
|
|
110
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
111
|
-
* const layoutConfig = await layout.getConfig();
|
|
112
|
-
* ```
|
|
113
|
-
* @static
|
|
114
|
-
*/
|
|
115
|
-
async getCurrent() {
|
|
116
|
-
this.wire.sendAction('layout-get-current').catch((e) => {
|
|
117
|
-
// don't expose
|
|
118
|
-
});
|
|
119
|
-
if (!this.fin.me.isWindow) {
|
|
120
|
-
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
|
121
|
-
}
|
|
122
|
-
const { uuid, name } = this.fin.me;
|
|
123
|
-
return this.wrap({ uuid, name });
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Synchronously returns a Layout object that represents a Window's layout.
|
|
127
|
-
*
|
|
128
|
-
* @remarks Cannot be called from a view.
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```js
|
|
133
|
-
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
134
|
-
* // Use wrapped instance to control layout, e.g.:
|
|
135
|
-
* const layoutConfig = await layout.getConfig();
|
|
136
|
-
* ```
|
|
137
|
-
* @static
|
|
138
|
-
*/
|
|
139
|
-
getCurrentSync() {
|
|
140
|
-
this.wire.sendAction('layout-get-current-sync').catch((e) => {
|
|
141
|
-
// don't expose
|
|
142
|
-
});
|
|
143
|
-
if (!this.fin.me.isWindow) {
|
|
144
|
-
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
|
145
|
-
}
|
|
146
|
-
const { uuid, name } = this.fin.me;
|
|
147
|
-
return this.wrapSync({ uuid, name });
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
exports.LayoutModule = LayoutModule;
|
|
151
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../../OpenFin';
|
|
2
|
-
import { Transport } from '../../../transport/transport';
|
|
3
|
-
import { Base } from '../../base';
|
|
4
|
-
type Identity = OpenFin.Identity;
|
|
5
|
-
type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
|
6
|
-
type PresetLayoutOptions = OpenFin.PresetLayoutOptions;
|
|
7
|
-
export declare class Layout extends Base {
|
|
8
|
-
#private;
|
|
9
|
-
/**
|
|
10
|
-
* Initialize the window's Layout.
|
|
11
|
-
*
|
|
12
|
-
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window. If a containerId
|
|
13
|
-
* is not provided, this method attempts to find an element with the id `layout-container`.
|
|
14
|
-
*
|
|
15
|
-
* A Layout will emit events locally on the DOM element representing the layout-container. In order to capture the relevant
|
|
16
|
-
* events during Layout initiation, set up the listeners on the DOM element prior to calling init.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```js
|
|
20
|
-
* // if no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
|
21
|
-
* const layout = await fin.Platform.Layout.init();
|
|
22
|
-
* ```
|
|
23
|
-
* <br /><br />
|
|
24
|
-
* # Example
|
|
25
|
-
* To target a different HTML element use the options object.
|
|
26
|
-
* ```js
|
|
27
|
-
* const containerId = 'my-custom-container-id';
|
|
28
|
-
*
|
|
29
|
-
* const myLayoutContainer = document.getElementById(containerId);
|
|
30
|
-
*
|
|
31
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
32
|
-
* const { tabSelector } = event.detail;
|
|
33
|
-
* const tabElement = document.getElementById(tabSelector);
|
|
34
|
-
* const existingColor = tabElement.style.backgroundColor;
|
|
35
|
-
* tabElement.style.backgroundColor = "red";
|
|
36
|
-
* setTimeout(() => {
|
|
37
|
-
* tabElement.style.backgroundColor = existingColor;
|
|
38
|
-
* }, 2000);
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
|
42
|
-
* // the window must have been created with a layout in its window options
|
|
43
|
-
* const layout = await fin.Platform.Layout.init({ containerId });
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
init: (options?: InitLayoutOptions) => Promise<Layout>;
|
|
47
|
-
identity: Identity;
|
|
48
|
-
private platform;
|
|
49
|
-
wire: Transport;
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
constructor(identity: OpenFin.Identity, wire: Transport);
|
|
54
|
-
/**
|
|
55
|
-
* Returns the configuration of the window's layout. Returns the same information that is returned for all windows in getSnapshot.
|
|
56
|
-
*
|
|
57
|
-
* @remarks Cannot be called from a View.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```js
|
|
62
|
-
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
63
|
-
* // Use wrapped instance to get the layout configuration of the current window's Layout:
|
|
64
|
-
* const layoutConfig = await layout.getConfig();
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
getConfig(): Promise<any>;
|
|
68
|
-
/**
|
|
69
|
-
* Replaces a Platform window's layout with a new layout.
|
|
70
|
-
*
|
|
71
|
-
* @remarks Any views that were in the old layout but not the new layout will be destroyed. Views will be assigned a randomly generated name to avoid collisions.
|
|
72
|
-
* @example
|
|
73
|
-
* ```js
|
|
74
|
-
* let windowIdentity;
|
|
75
|
-
* if (fin.me.isWindow) {
|
|
76
|
-
* windowIdentity = fin.me.identity;
|
|
77
|
-
* } else if (fin.me.isView) {
|
|
78
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
79
|
-
* } else {
|
|
80
|
-
* throw new Error('Not running in a platform View or Window');
|
|
81
|
-
* }
|
|
82
|
-
*
|
|
83
|
-
* const layout = fin.Platform.Layout.wrapSync(windowIdentity);
|
|
84
|
-
*
|
|
85
|
-
* const newLayout = {
|
|
86
|
-
* content: [
|
|
87
|
-
* {
|
|
88
|
-
* type: 'stack',
|
|
89
|
-
* content: [
|
|
90
|
-
* {
|
|
91
|
-
* type: 'component',
|
|
92
|
-
* componentName: 'view',
|
|
93
|
-
* componentState: {
|
|
94
|
-
* name: 'new_component_A1',
|
|
95
|
-
* processAffinity: 'ps_1',
|
|
96
|
-
* url: 'https://www.example.com'
|
|
97
|
-
* }
|
|
98
|
-
* },
|
|
99
|
-
* {
|
|
100
|
-
* type: 'component',
|
|
101
|
-
* componentName: 'view',
|
|
102
|
-
* componentState: {
|
|
103
|
-
* name: 'new_component_A2',
|
|
104
|
-
* url: 'https://cdn.openfin.co/embed-web/chart.html'
|
|
105
|
-
* }
|
|
106
|
-
* }
|
|
107
|
-
* ]
|
|
108
|
-
* }
|
|
109
|
-
* ]
|
|
110
|
-
* };
|
|
111
|
-
*
|
|
112
|
-
* layout.replace(newLayout);
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
replace: (layout: OpenFin.LayoutOptions) => Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Retrieves the top level content item of the layout.
|
|
118
|
-
*
|
|
119
|
-
* @remarks Cannot be called from a view.
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* ```js
|
|
125
|
-
* if (!fin.me.isWindow) {
|
|
126
|
-
* throw new Error('Not running in a platform View.');
|
|
127
|
-
* }
|
|
128
|
-
*
|
|
129
|
-
* // From the layout window
|
|
130
|
-
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
131
|
-
* // Retrieves the ColumnOrRow instance
|
|
132
|
-
* const rootItem = await layout.getRootItem();
|
|
133
|
-
* const content = await rootItem.getContent();
|
|
134
|
-
* console.log(`The root ColumnOrRow instance has ${content.length} item(s)`);
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
getRootItem(): Promise<OpenFin.ColumnOrRow | OpenFin.TabStack>;
|
|
138
|
-
/**
|
|
139
|
-
* Replaces the specified view with a view with the provided configuration.
|
|
140
|
-
*
|
|
141
|
-
* @remarks The old view is stripped of its listeners and either closed or attached to the provider window
|
|
142
|
-
* depending on `detachOnClose` view option.
|
|
143
|
-
*
|
|
144
|
-
* @param viewToReplace Identity of the view to be replaced
|
|
145
|
-
* @param newView Creation options of the new view.
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* ```js
|
|
149
|
-
* let currentWindow;
|
|
150
|
-
* if (fin.me.isWindow) {
|
|
151
|
-
* currentWindow = fin.me;
|
|
152
|
-
* } else if (fin.me.isView) {
|
|
153
|
-
* currentWindow = await fin.me.getCurrentWindow();
|
|
154
|
-
* } else {
|
|
155
|
-
* throw new Error('Not running in a platform View or Window');
|
|
156
|
-
* }
|
|
157
|
-
*
|
|
158
|
-
* const layout = fin.Platform.Layout.wrapSync(currentWindow.identity);
|
|
159
|
-
* const viewToReplace = (await currentWindow.getCurrentViews())[0];
|
|
160
|
-
* const newViewConfig = {url: 'https://example.com'};
|
|
161
|
-
* await layout.replaceView(viewToReplace.identity, newViewConfig);
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
replaceView: (viewToReplace: Identity, newView: OpenFin.PlatformViewCreationOptions) => Promise<void>;
|
|
165
|
-
/**
|
|
166
|
-
* Replaces a Platform window's layout with a preset layout arrangement using the existing Views attached to the window.
|
|
167
|
-
* The preset options are `columns`, `grid`, `rows`, and `tabs`.
|
|
168
|
-
* @param options Mandatory object with `presetType` property that sets which preset layout arrangement to use.
|
|
169
|
-
* The preset options are `columns`, `grid`, `rows`, and `tabs`.
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```js
|
|
173
|
-
* let windowIdentity;
|
|
174
|
-
* if (fin.me.isWindow) {
|
|
175
|
-
* windowIdentity = fin.me.identity;
|
|
176
|
-
* } else if (fin.me.isView) {
|
|
177
|
-
* windowIdentity = (await fin.me.getCurrentWindow()).identity;
|
|
178
|
-
* } else {
|
|
179
|
-
* throw new Error('Not running in a platform View or Window');
|
|
180
|
-
* }
|
|
181
|
-
*
|
|
182
|
-
* const layout = fin.Platform.Layout.wrapSync(windowIdentity);
|
|
183
|
-
* await layout.applyPreset({ presetType: 'grid' });
|
|
184
|
-
*
|
|
185
|
-
* // wait 5 seconds until you change the layout from grid to tabs
|
|
186
|
-
* await new Promise (res => setTimeout(res, 5000));
|
|
187
|
-
* await layout.applyPreset({ presetType: 'tabs' });
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
|
191
|
-
}
|
|
192
|
-
export {};
|