@openfin/core 30.73.28 → 31.74.2
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/LICENSE.md +4 -0
- package/package.json +2 -2
- package/src/OpenFin.d.ts +1929 -407
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +28 -0
- package/src/api/api-exposer/api-consumer.js +28 -0
- package/src/api/api-exposer/api-exposer.d.ts +35 -0
- package/src/api/api-exposer/api-exposer.js +38 -0
- package/src/api/api-exposer/decorators.d.ts +10 -0
- package/src/api/api-exposer/decorators.js +18 -0
- package/src/api/api-exposer/index.d.ts +4 -0
- package/src/api/api-exposer/index.js +20 -0
- package/src/api/api-exposer/strategies/index.d.ts +1 -0
- package/src/api/api-exposer/strategies/index.js +17 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +14 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +20 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +20 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +23 -0
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +2 -0
- package/src/api/api-exposer/strategies/openfin-channels/index.js +18 -0
- package/src/api/application/Factory.d.ts +1 -0
- package/src/api/application/Factory.js +2 -2
- package/src/api/application/Instance.d.ts +2 -1
- package/src/api/application/Instance.js +1 -0
- package/src/api/base.d.ts +4 -4
- package/src/api/clipboard/index.d.ts +1 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/application.d.ts +22 -22
- package/src/api/events/base.d.ts +6 -9
- package/src/api/events/channel.d.ts +5 -5
- package/src/api/events/emitterMap.d.ts +1 -1
- package/src/api/events/externalApplication.d.ts +3 -3
- package/src/api/events/frame.d.ts +5 -5
- package/src/api/events/globalHotkey.d.ts +3 -3
- package/src/api/events/platform.d.ts +6 -7
- package/src/api/events/system.d.ts +20 -21
- package/src/api/events/typedEventEmitter.d.ts +1 -1
- package/src/api/events/view.d.ts +17 -14
- package/src/api/events/webcontents.d.ts +40 -18
- package/src/api/events/window.d.ts +65 -57
- package/src/api/external-application/Instance.d.ts +1 -1
- package/src/api/fin.d.ts +2 -2
- package/src/api/frame/Instance.d.ts +2 -2
- package/src/api/global-hotkey/index.d.ts +1 -1
- package/src/api/interappbus/channel/channel.d.ts +5 -5
- package/src/api/interappbus/channel/channel.js +3 -3
- package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
- package/src/api/interappbus/channel/channels-docs.js +7 -0
- package/src/api/interappbus/channel/client.d.ts +5 -4
- package/src/api/interappbus/channel/client.js +24 -17
- package/src/api/interappbus/channel/connection-manager.d.ts +2 -2
- package/src/api/interappbus/channel/connection-manager.js +12 -12
- package/src/api/interappbus/channel/index.d.ts +3 -3
- package/src/api/interappbus/channel/index.js +6 -8
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +2 -2
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +2 -2
- package/src/api/interappbus/channel/protocols/combined/strategy.js +5 -5
- package/src/api/interappbus/channel/protocols/index.d.ts +7 -4
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +4 -4
- package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -3
- package/src/api/interappbus/channel/provider.d.ts +6 -6
- package/src/api/interappbus/channel/provider.js +24 -24
- package/src/api/interappbus/index.d.ts +1 -1
- package/src/api/interop/Factory.d.ts +1 -2
- package/src/api/interop/Factory.js +20 -4
- package/src/api/interop/InteropBroker.d.ts +16 -48
- package/src/api/interop/InteropBroker.js +38 -48
- package/src/api/interop/InteropClient.d.ts +10 -9
- package/src/api/interop/InteropClient.js +9 -8
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +2 -1
- package/src/api/interop/fdc3/PrivateChannelClient.js +15 -7
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +16 -2
- package/src/api/interop/fdc3/PrivateChannelProvider.js +80 -21
- package/src/api/interop/fdc3/fdc3-1.2.js +27 -12
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +13 -12
- package/src/api/interop/fdc3/fdc3-2.0.js +33 -26
- package/src/api/interop/fdc3/fdc3.d.ts +4 -5
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +3 -3
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +5 -5
- package/src/api/interop/fdc3/utils.d.ts +17 -0
- package/src/api/interop/fdc3/utils.js +52 -18
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/interop/utils.d.ts +0 -1
- package/src/api/interop/utils.js +1 -9
- package/src/api/me.d.ts +4 -4
- package/src/api/platform/Factory.d.ts +6 -1
- package/src/api/platform/Factory.js +10 -9
- package/src/api/platform/Instance.d.ts +5 -3
- package/src/api/platform/Instance.js +5 -3
- package/src/api/platform/common-utils.d.ts +1 -1
- package/src/api/platform/layout/Factory.d.ts +5 -1
- package/src/api/platform/layout/Factory.js +15 -3
- package/src/api/platform/layout/Instance.d.ts +10 -4
- package/src/api/platform/layout/Instance.js +26 -1
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +9 -0
- package/src/api/platform/layout/controllers/layout-content-cache.js +54 -0
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +117 -0
- package/src/api/platform/layout/controllers/layout-entities-controller.js +270 -0
- package/src/api/platform/layout/controllers/splitter-controller.d.ts +1 -1
- package/src/api/platform/layout/entities/layout-entities.d.ts +144 -0
- package/src/api/platform/layout/entities/layout-entities.js +216 -0
- package/src/api/platform/layout/entities/shapes.d.ts +6 -0
- package/src/api/platform/layout/entities/shapes.js +2 -0
- package/src/api/platform/layout/layout.constants.d.ts +1 -0
- package/src/api/platform/layout/layout.constants.js +4 -0
- package/src/api/platform/layout/shapes.d.ts +4 -1
- package/src/api/platform/layout/utils/layout-traversal.d.ts +4 -0
- package/src/api/platform/layout/utils/layout-traversal.js +65 -0
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
- package/src/api/platform/provider.d.ts +162 -0
- package/src/api/platform/provider.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +1 -0
- package/src/api/snapshot-source/Factory.js +1 -0
- package/src/api/snapshot-source/Instance.d.ts +1 -1
- package/src/api/system/index.d.ts +14 -484
- package/src/api/system/index.js +6 -476
- package/src/api/view/Instance.d.ts +20 -6
- package/src/api/view/Instance.js +48 -8
- package/src/api/webcontents/main.d.ts +18 -4
- package/src/api/window/Instance.d.ts +21 -1
- package/src/api/window/Instance.js +20 -0
- package/src/browser.js +1 -1
- package/src/environment/browser.d.ts +1 -1
- package/src/environment/environment.d.ts +1 -1
- package/src/environment/node-env.d.ts +1 -1
- package/src/environment/openfin-env.d.ts +1 -1
- package/src/mock.d.ts +1 -1
- package/src/mock.js +6 -3
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -1
- package/src/shapes/protocol.d.ts +3 -3
- package/src/transport/fin_store.d.ts +1 -1
- package/src/transport/transport-errors.d.ts +7 -2
- package/src/transport/transport-errors.js +1 -2
- package/src/transport/transport.d.ts +11 -8
- package/src/transport/transport.js +12 -6
- package/src/transport/wire.d.ts +14 -13
- package/src/util/channel-api-relay.d.ts +13 -0
- package/src/util/channel-api-relay.js +37 -0
- package/src/util/errors.d.ts +2 -2
- package/src/util/http.js +4 -2
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
- package/src/util/lazy.d.ts +16 -0
- package/src/util/lazy.js +26 -0
- package/src/util/promises.d.ts +1 -1
- package/src/util/reversible-map.d.ts +11 -0
- package/src/util/reversible-map.js +49 -0
- package/src/util/utilTypes.d.ts +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseEvent } from './base';
|
|
2
|
-
export
|
|
2
|
+
export type RegisteredEvent = BaseEvent & {
|
|
3
3
|
type: 'registered';
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type UnregisteredEvent = BaseEvent & {
|
|
6
6
|
type: 'unregistered';
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type GlobalHotkeyEvent = {
|
|
9
9
|
topic: 'global-hotkey';
|
|
10
10
|
hotkey: 'string';
|
|
11
11
|
} & (RegisteredEvent | UnregisteredEvent);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { ApplicationEvent } from './application';
|
|
1
2
|
import { BaseEvent } from './base';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare type PlatformApiReadyEvent = BaseEvent & {
|
|
3
|
+
export type PlatformApiReadyEvent = BaseEvent & {
|
|
4
|
+
topic: 'application';
|
|
5
5
|
type: 'platform-api-ready';
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type PlatformSnapshotAppliedEvent = BaseEvent & {
|
|
8
|
+
topic: 'application';
|
|
8
9
|
type: 'platform-snapshot-applied';
|
|
9
10
|
};
|
|
10
|
-
export
|
|
11
|
-
topic: 'platform';
|
|
12
|
-
} & (PropagatedWindowEvent | PropagatedViewEvent | PlatformApiReadyEvent | PlatformSnapshotAppliedEvent);
|
|
11
|
+
export type PlatformEvent = ApplicationEvent | PlatformApiReadyEvent | PlatformSnapshotAppliedEvent;
|
|
@@ -4,48 +4,47 @@ import { BaseEvent } from './base';
|
|
|
4
4
|
import { PropagatedViewEvent } from './view';
|
|
5
5
|
import { PropagatedWindowEvent } from './window';
|
|
6
6
|
import { AppVersionCompleteEvent, AppVersionErrorEvent, AppVersionProgressEvent, AppVersionRuntimeStatusEvent } from '../../OpenFin';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
export type NotRequested<EventType> = EventType extends `${infer U}-requested` ? never : EventType;
|
|
8
|
+
export type ExcludeRequested<Event extends {
|
|
9
9
|
type: string;
|
|
10
|
-
}> = Event
|
|
10
|
+
}> = Extract<Event, {
|
|
11
11
|
type: NotRequested<Event['type']>;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
12
|
+
}>;
|
|
13
|
+
export type IdleEvent = {
|
|
14
14
|
type: 'idle-state-changed';
|
|
15
15
|
elapsedTime: number;
|
|
16
16
|
isIdle: boolean;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type MonitorEvent = OpenFin.MonitorInfo & {
|
|
19
19
|
type: 'monitor-info-changed';
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type SessionChangedEvent = {
|
|
22
22
|
type: 'session-changed';
|
|
23
23
|
reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
|
|
24
24
|
};
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
25
|
+
export type AppVersionEvent = AppVersionProgressEvent | AppVersionRuntimeStatusEvent | AppVersionCompleteEvent | AppVersionErrorEvent;
|
|
26
|
+
export type AppVersionEventType = AppVersionEvent['type'];
|
|
27
|
+
export type IdEventType = WithId<AppVersionEventType>;
|
|
28
|
+
export type WithId<T extends AppVersionEventType> = `${T}.${string}`;
|
|
29
|
+
export type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
|
|
30
|
+
export type AppVersionTypeFromIdEvent<T extends IdEventType> = Extract<AppVersionEvent, {
|
|
31
31
|
type: WithoutId<T>;
|
|
32
32
|
}>;
|
|
33
|
-
export
|
|
33
|
+
export type EventWithId<Event extends AppVersionEvent> = Event extends infer E extends {
|
|
34
34
|
type: AppVersionEventType;
|
|
35
35
|
} ? Omit<E, 'type'> & {
|
|
36
36
|
type: WithId<E['type']>;
|
|
37
37
|
topic: 'system';
|
|
38
38
|
appVersionId: string;
|
|
39
39
|
} : never;
|
|
40
|
-
export
|
|
41
|
-
export
|
|
40
|
+
export type AppVersionEventWithId = EventWithId<AppVersionEvent>;
|
|
41
|
+
export type ApplicationCreatedEvent = BaseEvent & {
|
|
42
42
|
type: 'application-created';
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type DesktopIconClickedEvent = BaseEvent & {
|
|
45
45
|
type: 'desktop-icon-clicked';
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type SystemEvent = {
|
|
48
48
|
topic: 'system';
|
|
49
|
-
} & (ExcludeRequested<PropagatedWindowEvent> |
|
|
50
|
-
export
|
|
51
|
-
export {};
|
|
49
|
+
} & (ExcludeRequested<PropagatedWindowEvent> | PropagatedViewEvent | PropagatedApplicationEvent | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleEvent | MonitorEvent | SessionChangedEvent | AppVersionEventWithId);
|
|
50
|
+
export type SystemEventType = SystemEvent['type'];
|
package/src/api/events/view.d.ts
CHANGED
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
|
|
3
3
|
import { NamedEvent, PropagatedEvent } from './base';
|
|
4
|
-
export
|
|
4
|
+
export type BaseViewEvent = {
|
|
5
|
+
target: OpenFin.Identity;
|
|
6
|
+
viewIdentity: OpenFin.Identity;
|
|
7
|
+
};
|
|
8
|
+
export type TargetChangedEvent = NamedEvent & {
|
|
5
9
|
type: 'target-changed';
|
|
6
10
|
previousTarget: OpenFin.Identity;
|
|
7
|
-
target: OpenFin.Identity;
|
|
8
11
|
};
|
|
9
12
|
/**
|
|
10
13
|
* A View event that does not propagate to (republish on) parent topics.
|
|
11
14
|
*/
|
|
12
|
-
export
|
|
13
|
-
export
|
|
15
|
+
export type NonPropagatedViewEvent = BaseViewEvent & NonPropagatedWebContentsEvent;
|
|
16
|
+
export type AttachedEvent = NamedEvent & {
|
|
14
17
|
type: 'attached';
|
|
15
18
|
};
|
|
16
|
-
export
|
|
19
|
+
export type CreatedEvent = NamedEvent & {
|
|
17
20
|
type: 'created';
|
|
18
21
|
};
|
|
19
|
-
export
|
|
22
|
+
export type DestroyedEvent = NamedEvent & {
|
|
20
23
|
type: 'destroyed';
|
|
21
24
|
};
|
|
22
|
-
export
|
|
25
|
+
export type HiddenEvent = NamedEvent & {
|
|
23
26
|
type: 'hidden';
|
|
24
27
|
};
|
|
25
|
-
export
|
|
28
|
+
export type HotkeyEvent = NamedEvent & {
|
|
26
29
|
type: 'hotkey';
|
|
27
30
|
};
|
|
28
|
-
export
|
|
31
|
+
export type ShownEvent = NamedEvent & {
|
|
29
32
|
type: 'shown';
|
|
30
33
|
};
|
|
31
34
|
/**
|
|
32
35
|
* A View event that does propagate to (republish on) parent topics.
|
|
33
36
|
*/
|
|
34
|
-
export
|
|
35
|
-
export
|
|
37
|
+
export type WillPropagateViewEvent = BaseViewEvent & (WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent);
|
|
38
|
+
export type ViewEvent = {
|
|
36
39
|
topic: 'view';
|
|
37
40
|
} & (NonPropagatedViewEvent | WillPropagateViewEvent);
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
+
export type ViewEventType = ViewEvent['type'];
|
|
42
|
+
export type PropagatedViewEvent = PropagatedEvent<'view', WillPropagateViewEvent>;
|
|
43
|
+
export type PropagatedViewEventType = PropagatedViewEvent['type'];
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { NamedEvent } from './base';
|
|
3
3
|
import { CrashedEvent } from './application';
|
|
4
|
-
|
|
5
|
-
type: 'resource-load-failed';
|
|
4
|
+
type BaseLoadFailedEvent = NamedEvent & {
|
|
6
5
|
errorCode: number;
|
|
7
6
|
errorDescription: string;
|
|
8
7
|
validatedURL: string;
|
|
9
8
|
isMainFrame: boolean;
|
|
10
9
|
};
|
|
11
|
-
export
|
|
10
|
+
export type ResourceLoadFailedEvent = BaseLoadFailedEvent & {
|
|
11
|
+
type: 'resource-load-failed';
|
|
12
|
+
};
|
|
13
|
+
export type ResourceResponseReceivedEvent = NamedEvent & {
|
|
12
14
|
type: 'response-received';
|
|
13
15
|
status: boolean;
|
|
14
16
|
newUrl: string;
|
|
@@ -19,57 +21,77 @@ export declare type ResourceResponseReceivedEvent = NamedEvent & {
|
|
|
19
21
|
headers: any;
|
|
20
22
|
resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other';
|
|
21
23
|
};
|
|
22
|
-
export
|
|
24
|
+
export type PageTitleUpdatedEvent = NamedEvent & {
|
|
23
25
|
type: 'page-title-updated';
|
|
24
26
|
title: string;
|
|
25
27
|
};
|
|
26
|
-
export
|
|
28
|
+
export type CertificateErrorEvent = NamedEvent & {
|
|
27
29
|
type: 'certificate-error';
|
|
28
30
|
error: string;
|
|
29
31
|
url: string;
|
|
30
32
|
certificate: OpenFin.Certificate;
|
|
31
33
|
};
|
|
32
|
-
export
|
|
34
|
+
export type CertificateSelectionShownEvent = NamedEvent & {
|
|
33
35
|
type: 'certificate-selection-shown';
|
|
34
36
|
url: string;
|
|
35
37
|
certificates: OpenFin.Certificate[];
|
|
36
38
|
};
|
|
37
|
-
export
|
|
39
|
+
export type FaviconUpdatedEvent = NamedEvent & {
|
|
38
40
|
type: 'page-favicon-updated';
|
|
39
41
|
favicons: string[];
|
|
40
42
|
};
|
|
41
|
-
export
|
|
43
|
+
export type NavigationRejectedEvent = NamedEvent & {
|
|
42
44
|
type: 'navigation-rejected';
|
|
43
45
|
sourceName?: string;
|
|
44
46
|
url: string;
|
|
45
47
|
};
|
|
46
|
-
|
|
48
|
+
type BaseUrlEvent = NamedEvent & {
|
|
49
|
+
type: 'url-changed';
|
|
50
|
+
url: string;
|
|
51
|
+
};
|
|
52
|
+
export type UrlChangedEvent = BaseUrlEvent & ({
|
|
53
|
+
isInPage: true;
|
|
54
|
+
} | {
|
|
55
|
+
isInPage: false;
|
|
56
|
+
httpResponseCode: number;
|
|
57
|
+
httpStatusText: string;
|
|
58
|
+
});
|
|
59
|
+
export type DidFinishLoadEvent = NamedEvent & {
|
|
60
|
+
type: 'did-finish-load';
|
|
61
|
+
};
|
|
62
|
+
export type DidFailLoadEvent = BaseLoadFailedEvent & {
|
|
63
|
+
type: 'did-fail-load';
|
|
64
|
+
};
|
|
65
|
+
export type FoundInPageEvent = NamedEvent & {
|
|
47
66
|
type: 'found-in-page';
|
|
67
|
+
} & {
|
|
68
|
+
result: OpenFin.FindInPageResult;
|
|
48
69
|
};
|
|
49
70
|
/**
|
|
50
71
|
* A WebContents event that does not propagate to (republish on) parent topics.
|
|
51
72
|
*/
|
|
52
|
-
export
|
|
53
|
-
export
|
|
73
|
+
export type NonPropagatedWebContentsEvent = FoundInPageEvent | CertificateErrorEvent;
|
|
74
|
+
export type BlurredEvent = NamedEvent & {
|
|
54
75
|
type: 'blurred';
|
|
55
76
|
};
|
|
56
|
-
export
|
|
77
|
+
export type DidChangeThemeColorEvent = NamedEvent & {
|
|
57
78
|
type: 'did-change-theme-color';
|
|
58
79
|
};
|
|
59
|
-
export
|
|
80
|
+
export type FocusedEvent = NamedEvent & {
|
|
60
81
|
type: 'focused';
|
|
61
82
|
};
|
|
62
|
-
export
|
|
83
|
+
export type ChildContentBlockedEvent = NamedEvent & {
|
|
63
84
|
type: 'child-content-blocked';
|
|
64
85
|
};
|
|
65
|
-
export
|
|
86
|
+
export type ChildContentOpenedInBrowserEvent = NamedEvent & {
|
|
66
87
|
type: 'child-content-opened-in-browser';
|
|
67
88
|
};
|
|
68
|
-
export
|
|
89
|
+
export type ChildViewCreatedEvent = NamedEvent & {
|
|
69
90
|
type: 'child-view-created';
|
|
70
91
|
};
|
|
71
92
|
/**
|
|
72
93
|
* A WebContents event that does propagate to (republish on) parent topics.
|
|
73
94
|
*/
|
|
74
|
-
export
|
|
75
|
-
export
|
|
95
|
+
export type WillPropagateWebContentsEvent = BlurredEvent | CertificateSelectionShownEvent | CrashedEvent | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | FaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent;
|
|
96
|
+
export type WebContentsEvent = NonPropagatedWebContentsEvent | WillPropagateWebContentsEvent;
|
|
97
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { NamedEvent, PropagatedEvent } from './base';
|
|
3
|
-
import { PropagatedViewEvent } from './view';
|
|
3
|
+
import { BaseViewEvent, PropagatedViewEvent, AttachedEvent as ViewAttachedEvent } from './view';
|
|
4
4
|
import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
|
|
5
|
-
export
|
|
5
|
+
export type AlertRequestedEvent = NamedEvent & {
|
|
6
6
|
type: 'alert-requested';
|
|
7
7
|
message: string;
|
|
8
8
|
url: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type AuthRequestedEvent = NamedEvent & {
|
|
11
11
|
type: 'auth-requested';
|
|
12
12
|
authInfo: {
|
|
13
13
|
host: string;
|
|
@@ -17,56 +17,56 @@ export declare type AuthRequestedEvent = NamedEvent & {
|
|
|
17
17
|
scheme: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type EndLoadEvent = NamedEvent & {
|
|
21
21
|
type: 'end-load';
|
|
22
22
|
documentName: string;
|
|
23
23
|
isMain: boolean;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type WillRedirectEvent = NamedEvent & {
|
|
26
26
|
type: 'will-redirect';
|
|
27
27
|
blocked: boolean;
|
|
28
28
|
isInPlace: boolean;
|
|
29
29
|
url: string;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type ReloadedEvent = NamedEvent & {
|
|
32
32
|
type: 'reloaded';
|
|
33
33
|
url: string;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type WindowOptionsChangedEvent = NamedEvent & {
|
|
36
36
|
type: 'options-changed';
|
|
37
37
|
options: OpenFin.WindowOptions;
|
|
38
38
|
diff: OpenFin.WindowOptionDiff;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type ExternalProcessExitedEvent = NamedEvent & {
|
|
41
41
|
type: 'external-process-exited';
|
|
42
42
|
processUuid: string;
|
|
43
43
|
exitCode: number;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type ExternalProcessStartedEvent = NamedEvent & {
|
|
46
46
|
type: 'external-process-started';
|
|
47
47
|
processUuid: string;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type HiddenEvent = NamedEvent & {
|
|
50
50
|
type: 'hidden';
|
|
51
51
|
reason: 'closing' | 'hide' | 'hide-on-close';
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type PreloadScriptInfoRunning = {
|
|
54
54
|
state: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type PreloadScriptInfo = {
|
|
57
57
|
state: 'load-failed' | 'failed' | 'succeeded';
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type PreloadScriptsStateChangeEvent = NamedEvent & {
|
|
60
60
|
preloadScripts: (PreloadScriptInfoRunning & any)[];
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type UserBoundsChangeEvent = NamedEvent & {
|
|
63
63
|
height: number;
|
|
64
64
|
left: number;
|
|
65
65
|
top: number;
|
|
66
66
|
width: number;
|
|
67
67
|
windowState: 'minimized' | 'normal' | 'maximized';
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type BoundsChangeEvent = NamedEvent & {
|
|
70
70
|
changeType: 0 | 1 | 2;
|
|
71
71
|
deferred: boolean;
|
|
72
72
|
height: number;
|
|
@@ -74,23 +74,21 @@ export declare type BoundsChangeEvent = NamedEvent & {
|
|
|
74
74
|
top: number;
|
|
75
75
|
width: number;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
77
|
+
export type WillMoveOrResizeEvent = NamedEvent & {
|
|
78
78
|
height: number;
|
|
79
79
|
left: number;
|
|
80
80
|
top: number;
|
|
81
81
|
width: number;
|
|
82
82
|
monitorScaleFactor: number;
|
|
83
83
|
};
|
|
84
|
-
export
|
|
84
|
+
export type PerformanceReportEvent = Performance & NamedEvent & {
|
|
85
85
|
type: 'performance-report';
|
|
86
86
|
};
|
|
87
|
-
export
|
|
87
|
+
export type ViewDetachedEvent = NamedEvent & BaseViewEvent & {
|
|
88
88
|
type: 'view-detached';
|
|
89
89
|
previousTarget: OpenFin.Identity;
|
|
90
|
-
target: OpenFin.Identity;
|
|
91
|
-
viewIdentity: OpenFin.Identity;
|
|
92
90
|
};
|
|
93
|
-
export
|
|
91
|
+
export type InputEvent = {
|
|
94
92
|
inputType: 'keyUp' | 'keyDown';
|
|
95
93
|
ctrlKey: boolean;
|
|
96
94
|
shiftKey: boolean;
|
|
@@ -101,92 +99,102 @@ export declare type InputEvent = {
|
|
|
101
99
|
repeat: boolean;
|
|
102
100
|
command?: string;
|
|
103
101
|
};
|
|
102
|
+
export type LayoutInitializedEvent = NamedEvent & {
|
|
103
|
+
type: 'layout-initialized';
|
|
104
|
+
ofViews: (OpenFin.Identity & {
|
|
105
|
+
entityType: 'view';
|
|
106
|
+
})[];
|
|
107
|
+
};
|
|
108
|
+
export type LayoutReadyEvent = NamedEvent & {
|
|
109
|
+
type: 'layout-ready';
|
|
110
|
+
views: (OpenFin.Identity & {
|
|
111
|
+
success: boolean;
|
|
112
|
+
})[];
|
|
113
|
+
};
|
|
104
114
|
/**
|
|
105
115
|
* A Window event that does not propagate to (republish on) parent topics.
|
|
106
116
|
*/
|
|
107
|
-
export
|
|
108
|
-
export
|
|
117
|
+
export type NonPropagatedWindowEvent = NonPropagatedWebContentsEvent;
|
|
118
|
+
export type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
109
119
|
type: 'begin-user-bounds-changing';
|
|
110
120
|
};
|
|
111
|
-
export
|
|
121
|
+
export type BoundsChangedEvent = BoundsChangeEvent & {
|
|
112
122
|
type: 'bounds-changed';
|
|
113
123
|
};
|
|
114
|
-
export
|
|
124
|
+
export type BoundsChangingEvent = BoundsChangeEvent & {
|
|
115
125
|
type: 'bounds-changing';
|
|
116
126
|
};
|
|
117
|
-
export
|
|
127
|
+
export type WindowCloseRequestedEvent = NamedEvent & {
|
|
118
128
|
type: 'close-requested';
|
|
119
129
|
};
|
|
120
|
-
export
|
|
130
|
+
export type WindowClosedEvent = NamedEvent & {
|
|
121
131
|
type: 'closed';
|
|
122
132
|
};
|
|
123
|
-
export
|
|
133
|
+
export type WindowClosingEvent = NamedEvent & {
|
|
124
134
|
type: 'closing';
|
|
125
135
|
};
|
|
126
|
-
export
|
|
136
|
+
export type DisabledMovementBoundsChangedEvent = BoundsChangeEvent & {
|
|
127
137
|
type: 'disabled-movement-bounds-changed';
|
|
128
138
|
};
|
|
129
|
-
export
|
|
139
|
+
export type DisabledMovementBoundsChangingEvent = BoundsChangeEvent & {
|
|
130
140
|
type: 'disabled-movement-bounds-changing';
|
|
131
141
|
};
|
|
132
|
-
export
|
|
142
|
+
export type EmbeddedEvent = NamedEvent & {
|
|
133
143
|
type: 'embedded';
|
|
134
144
|
};
|
|
135
|
-
export
|
|
145
|
+
export type EndUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
136
146
|
type: 'end-user-bounds-changing';
|
|
137
147
|
};
|
|
138
|
-
export
|
|
148
|
+
export type WindowHotkeyEvent = InputEvent & NamedEvent & {
|
|
139
149
|
type: 'hotkey';
|
|
140
150
|
};
|
|
141
|
-
export
|
|
151
|
+
export type WindowInitializedEvent = NamedEvent & {
|
|
142
152
|
type: 'initialized';
|
|
143
153
|
};
|
|
144
|
-
export
|
|
145
|
-
type: 'layout-initialized';
|
|
146
|
-
};
|
|
147
|
-
export declare type LayoutReadyEvent = NamedEvent & {
|
|
148
|
-
type: 'layout-ready';
|
|
149
|
-
};
|
|
150
|
-
export declare type MaximizedEvent = NamedEvent & {
|
|
154
|
+
export type MaximizedEvent = NamedEvent & {
|
|
151
155
|
type: 'maximized';
|
|
152
156
|
};
|
|
153
|
-
export
|
|
157
|
+
export type MinimizedEvent = NamedEvent & {
|
|
154
158
|
type: 'minimized';
|
|
155
159
|
};
|
|
156
|
-
export
|
|
160
|
+
export type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
|
|
157
161
|
type: 'preload-script-state-changed';
|
|
158
162
|
};
|
|
159
|
-
export
|
|
163
|
+
export type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
|
|
160
164
|
type: 'preload-script-state-changing';
|
|
161
165
|
};
|
|
162
|
-
export
|
|
166
|
+
export type WindowRestoredEvent = NamedEvent & {
|
|
163
167
|
type: 'restored';
|
|
164
168
|
};
|
|
165
|
-
export
|
|
169
|
+
export type WindowShowRequestedEvent = NamedEvent & {
|
|
166
170
|
type: 'show-requested';
|
|
167
171
|
};
|
|
168
|
-
export
|
|
172
|
+
export type WindowShownEvent = NamedEvent & {
|
|
169
173
|
type: 'shown';
|
|
170
174
|
};
|
|
171
|
-
export
|
|
175
|
+
export type UserMovementEnabledEvent = NamedEvent & {
|
|
172
176
|
type: 'user-movement-enabled';
|
|
173
177
|
};
|
|
174
|
-
export
|
|
178
|
+
export type UserMovementDisabledEvent = NamedEvent & {
|
|
175
179
|
type: 'user-movement-disabled';
|
|
176
180
|
};
|
|
177
|
-
export
|
|
181
|
+
export type WillMoveEvent = WillMoveOrResizeEvent & {
|
|
178
182
|
type: 'will-move';
|
|
179
183
|
};
|
|
180
|
-
export
|
|
184
|
+
export type WillResizeEvent = WillMoveOrResizeEvent & {
|
|
181
185
|
type: 'will-resize';
|
|
182
186
|
};
|
|
187
|
+
/**
|
|
188
|
+
* A propagated view event that is re-propagated from window.
|
|
189
|
+
*/
|
|
190
|
+
export type PropagatedViewAttachedEvent = PropagatedEvent<'view', ViewAttachedEvent>;
|
|
183
191
|
/**
|
|
184
192
|
* A Window event that does propagate to (republish on) parent topics.
|
|
185
193
|
*/
|
|
186
|
-
export
|
|
187
|
-
export
|
|
194
|
+
export type WillPropagateWindowEvent = WillPropagateWebContentsEvent | PropagatedViewAttachedEvent | ViewDetachedEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
|
|
195
|
+
export type WindowEvent = {
|
|
188
196
|
topic: 'window';
|
|
189
|
-
} & (WillPropagateWindowEvent | NonPropagatedWindowEvent);
|
|
190
|
-
export
|
|
191
|
-
export
|
|
192
|
-
export
|
|
197
|
+
} & (WillPropagateWindowEvent | NonPropagatedWindowEvent | PropagatedViewEvent);
|
|
198
|
+
export type WindowEventType = WindowEvent['type'];
|
|
199
|
+
export type PropagatedWindowEvent = PropagatedEvent<'window', Exclude<WillPropagateWindowEvent, WindowCloseRequestedEvent>>;
|
|
200
|
+
export type PropagatedWindowEventType = PropagatedWindowEvent['type'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { EmitterBase } from '../base';
|
|
3
|
-
import Transport from '../../transport/transport';
|
|
3
|
+
import { Transport } from '../../transport/transport';
|
|
4
4
|
/**
|
|
5
5
|
* @classdesc An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
6
6
|
* the developer to listen to <a href="tutorial-ExternalApplication.EventEmitter.html">application events.</a>
|
package/src/api/fin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import type * as OpenFin from '../OpenFin';
|
|
4
|
-
import Transport from '../transport/transport';
|
|
4
|
+
import { Transport } from '../transport/transport';
|
|
5
5
|
import System from './system/index';
|
|
6
6
|
import _WindowModule from './window/index';
|
|
7
7
|
import ApplicationModule from './application/index';
|
|
@@ -15,7 +15,7 @@ import PlatformModule from './platform/index';
|
|
|
15
15
|
import { Me } from './me';
|
|
16
16
|
import InteropModule from './interop';
|
|
17
17
|
import SnapshotSourceModule from './snapshot-source';
|
|
18
|
-
|
|
18
|
+
type EntityType = OpenFin.EntityType;
|
|
19
19
|
export interface FinApi<MeType extends EntityType> {
|
|
20
20
|
readonly System: System;
|
|
21
21
|
readonly Window: _WindowModule;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { EmitterBase } from '../base';
|
|
3
|
-
import Transport from '../../transport/transport';
|
|
4
|
-
|
|
3
|
+
import { Transport } from '../../transport/transport';
|
|
4
|
+
type FrameEvents = OpenFin.FrameEvent;
|
|
5
5
|
/**
|
|
6
6
|
* @classdesc
|
|
7
7
|
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { EmitterBase } from '../base';
|
|
3
|
-
import Transport from '../../transport/transport';
|
|
3
|
+
import { Transport } from '../../transport/transport';
|
|
4
4
|
/**
|
|
5
5
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
|
6
6
|
* @namespace
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as OpenFin from '../../../OpenFin';
|
|
2
|
-
import Transport from '../../../transport/transport';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { Transport } from '../../../transport/transport';
|
|
3
|
+
type ProviderIdentity = OpenFin.ProviderIdentity;
|
|
4
|
+
type ChannelMiddleware = OpenFin.ChannelMiddleware;
|
|
5
|
+
type ErrorMiddleware = OpenFin.ErrorMiddleware;
|
|
6
|
+
type ChannelAction = OpenFin.ChannelAction;
|
|
7
7
|
export declare class ProtectedItems {
|
|
8
8
|
providerIdentity: ProviderIdentity;
|
|
9
9
|
wire: Transport;
|
|
@@ -13,12 +13,12 @@ class ProtectedItems {
|
|
|
13
13
|
}
|
|
14
14
|
exports.ProtectedItems = ProtectedItems;
|
|
15
15
|
class ChannelBase {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.subscriptions = new Map();
|
|
18
|
-
}
|
|
19
16
|
static defaultAction(topic) {
|
|
20
17
|
throw new Error(`No action registered at target for ${topic}`);
|
|
21
18
|
}
|
|
19
|
+
constructor() {
|
|
20
|
+
this.subscriptions = new Map();
|
|
21
|
+
}
|
|
22
22
|
async processAction(topic, payload, senderIdentity) {
|
|
23
23
|
try {
|
|
24
24
|
const mainAction = this.subscriptions.has(topic)
|