@openfin/core 47.100.59 → 47.100.60
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/out/mock-alpha.d.ts +70 -4
- package/out/mock-beta.d.ts +70 -4
- package/out/mock-public.d.ts +70 -4
- package/out/stub.d.ts +70 -4
- package/out/stub.js +2 -3
- package/out/stub.mjs +2 -3
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
5007
5007
|
readonly glyph?: string;
|
|
5008
5008
|
};
|
|
5009
5009
|
|
|
5010
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
5011
|
+
|
|
5012
|
+
/**
|
|
5013
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
5014
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
5015
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
5016
|
+
* `run-requested` on that application instead.
|
|
5017
|
+
*
|
|
5018
|
+
* By default, the platform provider handles this event in
|
|
5019
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
5020
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
5021
|
+
* @interface
|
|
5022
|
+
*/
|
|
5023
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
5024
|
+
type: 'dock-icon-clicked';
|
|
5025
|
+
/**
|
|
5026
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
5027
|
+
*/
|
|
5028
|
+
hasVisibleWindows: boolean;
|
|
5029
|
+
/**
|
|
5030
|
+
* UUID of the application the runtime was started with, if any.
|
|
5031
|
+
*/
|
|
5032
|
+
uuid?: string;
|
|
5033
|
+
};
|
|
5034
|
+
|
|
5010
5035
|
/**
|
|
5011
5036
|
* @interface
|
|
5012
5037
|
*
|
|
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5520
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5521
5546
|
* from which they propagate).
|
|
5522
5547
|
*/
|
|
5523
|
-
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5548
|
+
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5524
5549
|
|
|
5525
5550
|
/**
|
|
5526
5551
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
|
|
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6397
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6398
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6399
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6400
|
-
*
|
|
6401
|
-
*
|
|
6402
|
-
* the same as the parent window's.
|
|
6425
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
6426
|
+
* its UUID is the same as the parent window's.
|
|
6403
6427
|
*
|
|
6404
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6405
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -12971,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12971
12995
|
* @returns {Promise<void>}
|
|
12972
12996
|
*/
|
|
12973
12997
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12998
|
+
/**
|
|
12999
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
13000
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
13001
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
13002
|
+
* Clicks while a previous call is still running are ignored.
|
|
13003
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
13004
|
+
*
|
|
13005
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
13006
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
13007
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
13008
|
+
*
|
|
13009
|
+
* @remarks
|
|
13010
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
13011
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
13012
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
13013
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
13014
|
+
*
|
|
13015
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
13016
|
+
* the default does nothing.
|
|
13017
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
13018
|
+
*
|
|
13019
|
+
* @example
|
|
13020
|
+
*
|
|
13021
|
+
* ```js
|
|
13022
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
13023
|
+
* class Override extends PlatformProvider {
|
|
13024
|
+
* async handleDockIconClicked(payload) {
|
|
13025
|
+
* if (payload.hasVisibleWindows) {
|
|
13026
|
+
* // Bring a window forward instead of doing nothing
|
|
13027
|
+
* return;
|
|
13028
|
+
* }
|
|
13029
|
+
* return super.handleDockIconClicked(payload);
|
|
13030
|
+
* }
|
|
13031
|
+
* }
|
|
13032
|
+
* return new Override();
|
|
13033
|
+
* }
|
|
13034
|
+
*
|
|
13035
|
+
* fin.Platform.init({ overrideCallback });
|
|
13036
|
+
* ```
|
|
13037
|
+
*/
|
|
13038
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12974
13039
|
/**
|
|
12975
13040
|
* @experimental
|
|
12976
13041
|
*
|
|
@@ -17433,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17433
17498
|
AppVersionEventType,
|
|
17434
17499
|
ApplicationCreatedEvent,
|
|
17435
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17436
17502
|
ExtensionsEnabledEvent,
|
|
17437
17503
|
ExtensionsDisabledEvent,
|
|
17438
17504
|
ExtensionsExcludedEvent,
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
5007
5007
|
readonly glyph?: string;
|
|
5008
5008
|
};
|
|
5009
5009
|
|
|
5010
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
5011
|
+
|
|
5012
|
+
/**
|
|
5013
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
5014
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
5015
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
5016
|
+
* `run-requested` on that application instead.
|
|
5017
|
+
*
|
|
5018
|
+
* By default, the platform provider handles this event in
|
|
5019
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
5020
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
5021
|
+
* @interface
|
|
5022
|
+
*/
|
|
5023
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
5024
|
+
type: 'dock-icon-clicked';
|
|
5025
|
+
/**
|
|
5026
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
5027
|
+
*/
|
|
5028
|
+
hasVisibleWindows: boolean;
|
|
5029
|
+
/**
|
|
5030
|
+
* UUID of the application the runtime was started with, if any.
|
|
5031
|
+
*/
|
|
5032
|
+
uuid?: string;
|
|
5033
|
+
};
|
|
5034
|
+
|
|
5010
5035
|
/**
|
|
5011
5036
|
* @interface
|
|
5012
5037
|
*
|
|
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5520
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5521
5546
|
* from which they propagate).
|
|
5522
5547
|
*/
|
|
5523
|
-
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5548
|
+
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5524
5549
|
|
|
5525
5550
|
/**
|
|
5526
5551
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
|
|
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6397
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6398
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6399
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6400
|
-
*
|
|
6401
|
-
*
|
|
6402
|
-
* the same as the parent window's.
|
|
6425
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
6426
|
+
* its UUID is the same as the parent window's.
|
|
6403
6427
|
*
|
|
6404
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6405
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -12971,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12971
12995
|
* @returns {Promise<void>}
|
|
12972
12996
|
*/
|
|
12973
12997
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12998
|
+
/**
|
|
12999
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
13000
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
13001
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
13002
|
+
* Clicks while a previous call is still running are ignored.
|
|
13003
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
13004
|
+
*
|
|
13005
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
13006
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
13007
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
13008
|
+
*
|
|
13009
|
+
* @remarks
|
|
13010
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
13011
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
13012
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
13013
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
13014
|
+
*
|
|
13015
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
13016
|
+
* the default does nothing.
|
|
13017
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
13018
|
+
*
|
|
13019
|
+
* @example
|
|
13020
|
+
*
|
|
13021
|
+
* ```js
|
|
13022
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
13023
|
+
* class Override extends PlatformProvider {
|
|
13024
|
+
* async handleDockIconClicked(payload) {
|
|
13025
|
+
* if (payload.hasVisibleWindows) {
|
|
13026
|
+
* // Bring a window forward instead of doing nothing
|
|
13027
|
+
* return;
|
|
13028
|
+
* }
|
|
13029
|
+
* return super.handleDockIconClicked(payload);
|
|
13030
|
+
* }
|
|
13031
|
+
* }
|
|
13032
|
+
* return new Override();
|
|
13033
|
+
* }
|
|
13034
|
+
*
|
|
13035
|
+
* fin.Platform.init({ overrideCallback });
|
|
13036
|
+
* ```
|
|
13037
|
+
*/
|
|
13038
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12974
13039
|
/**
|
|
12975
13040
|
* @experimental
|
|
12976
13041
|
*
|
|
@@ -17433,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17433
17498
|
AppVersionEventType,
|
|
17434
17499
|
ApplicationCreatedEvent,
|
|
17435
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17436
17502
|
ExtensionsEnabledEvent,
|
|
17437
17503
|
ExtensionsDisabledEvent,
|
|
17438
17504
|
ExtensionsExcludedEvent,
|
package/out/mock-public.d.ts
CHANGED
|
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
5007
5007
|
readonly glyph?: string;
|
|
5008
5008
|
};
|
|
5009
5009
|
|
|
5010
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
5011
|
+
|
|
5012
|
+
/**
|
|
5013
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
5014
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
5015
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
5016
|
+
* `run-requested` on that application instead.
|
|
5017
|
+
*
|
|
5018
|
+
* By default, the platform provider handles this event in
|
|
5019
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
5020
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
5021
|
+
* @interface
|
|
5022
|
+
*/
|
|
5023
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
5024
|
+
type: 'dock-icon-clicked';
|
|
5025
|
+
/**
|
|
5026
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
5027
|
+
*/
|
|
5028
|
+
hasVisibleWindows: boolean;
|
|
5029
|
+
/**
|
|
5030
|
+
* UUID of the application the runtime was started with, if any.
|
|
5031
|
+
*/
|
|
5032
|
+
uuid?: string;
|
|
5033
|
+
};
|
|
5034
|
+
|
|
5010
5035
|
/**
|
|
5011
5036
|
* @interface
|
|
5012
5037
|
*
|
|
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5520
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5521
5546
|
* from which they propagate).
|
|
5522
5547
|
*/
|
|
5523
|
-
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5548
|
+
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5524
5549
|
|
|
5525
5550
|
/**
|
|
5526
5551
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
|
|
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6397
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6398
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6399
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6400
|
-
*
|
|
6401
|
-
*
|
|
6402
|
-
* the same as the parent window's.
|
|
6425
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
6426
|
+
* its UUID is the same as the parent window's.
|
|
6403
6427
|
*
|
|
6404
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6405
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -12971,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12971
12995
|
* @returns {Promise<void>}
|
|
12972
12996
|
*/
|
|
12973
12997
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12998
|
+
/**
|
|
12999
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
13000
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
13001
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
13002
|
+
* Clicks while a previous call is still running are ignored.
|
|
13003
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
13004
|
+
*
|
|
13005
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
13006
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
13007
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
13008
|
+
*
|
|
13009
|
+
* @remarks
|
|
13010
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
13011
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
13012
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
13013
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
13014
|
+
*
|
|
13015
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
13016
|
+
* the default does nothing.
|
|
13017
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
13018
|
+
*
|
|
13019
|
+
* @example
|
|
13020
|
+
*
|
|
13021
|
+
* ```js
|
|
13022
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
13023
|
+
* class Override extends PlatformProvider {
|
|
13024
|
+
* async handleDockIconClicked(payload) {
|
|
13025
|
+
* if (payload.hasVisibleWindows) {
|
|
13026
|
+
* // Bring a window forward instead of doing nothing
|
|
13027
|
+
* return;
|
|
13028
|
+
* }
|
|
13029
|
+
* return super.handleDockIconClicked(payload);
|
|
13030
|
+
* }
|
|
13031
|
+
* }
|
|
13032
|
+
* return new Override();
|
|
13033
|
+
* }
|
|
13034
|
+
*
|
|
13035
|
+
* fin.Platform.init({ overrideCallback });
|
|
13036
|
+
* ```
|
|
13037
|
+
*/
|
|
13038
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12974
13039
|
/**
|
|
12975
13040
|
* @experimental
|
|
12976
13041
|
*
|
|
@@ -17433,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17433
17498
|
AppVersionEventType,
|
|
17434
17499
|
ApplicationCreatedEvent,
|
|
17435
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17436
17502
|
ExtensionsEnabledEvent,
|
|
17437
17503
|
ExtensionsDisabledEvent,
|
|
17438
17504
|
ExtensionsExcludedEvent,
|
package/out/stub.d.ts
CHANGED
|
@@ -5123,6 +5123,31 @@ declare type DisplayMetadata = {
|
|
|
5123
5123
|
readonly glyph?: string;
|
|
5124
5124
|
};
|
|
5125
5125
|
|
|
5126
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
5127
|
+
|
|
5128
|
+
/**
|
|
5129
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
5130
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
5131
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
5132
|
+
* `run-requested` on that application instead.
|
|
5133
|
+
*
|
|
5134
|
+
* By default, the platform provider handles this event in
|
|
5135
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
5136
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
5137
|
+
* @interface
|
|
5138
|
+
*/
|
|
5139
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
5140
|
+
type: 'dock-icon-clicked';
|
|
5141
|
+
/**
|
|
5142
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
5143
|
+
*/
|
|
5144
|
+
hasVisibleWindows: boolean;
|
|
5145
|
+
/**
|
|
5146
|
+
* UUID of the application the runtime was started with, if any.
|
|
5147
|
+
*/
|
|
5148
|
+
uuid?: string;
|
|
5149
|
+
};
|
|
5150
|
+
|
|
5126
5151
|
/**
|
|
5127
5152
|
* @interface
|
|
5128
5153
|
*
|
|
@@ -5647,7 +5672,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5647
5672
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5648
5673
|
* from which they propagate).
|
|
5649
5674
|
*/
|
|
5650
|
-
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5675
|
+
declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
|
|
5651
5676
|
|
|
5652
5677
|
/**
|
|
5653
5678
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
|
|
@@ -6551,9 +6576,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6551
6576
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6552
6577
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6553
6578
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6554
|
-
*
|
|
6555
|
-
*
|
|
6556
|
-
* the same as the parent window's.
|
|
6579
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
6580
|
+
* its UUID is the same as the parent window's.
|
|
6557
6581
|
*
|
|
6558
6582
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6559
6583
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -13463,6 +13487,47 @@ declare interface PlatformProvider {
|
|
|
13463
13487
|
* @returns {Promise<void>}
|
|
13464
13488
|
*/
|
|
13465
13489
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
13490
|
+
/**
|
|
13491
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
13492
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
13493
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
13494
|
+
* Clicks while a previous call is still running are ignored.
|
|
13495
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
13496
|
+
*
|
|
13497
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
13498
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
13499
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
13500
|
+
*
|
|
13501
|
+
* @remarks
|
|
13502
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
13503
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
13504
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
13505
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
13506
|
+
*
|
|
13507
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
13508
|
+
* the default does nothing.
|
|
13509
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
13510
|
+
*
|
|
13511
|
+
* @example
|
|
13512
|
+
*
|
|
13513
|
+
* ```js
|
|
13514
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
13515
|
+
* class Override extends PlatformProvider {
|
|
13516
|
+
* async handleDockIconClicked(payload) {
|
|
13517
|
+
* if (payload.hasVisibleWindows) {
|
|
13518
|
+
* // Bring a window forward instead of doing nothing
|
|
13519
|
+
* return;
|
|
13520
|
+
* }
|
|
13521
|
+
* return super.handleDockIconClicked(payload);
|
|
13522
|
+
* }
|
|
13523
|
+
* }
|
|
13524
|
+
* return new Override();
|
|
13525
|
+
* }
|
|
13526
|
+
*
|
|
13527
|
+
* fin.Platform.init({ overrideCallback });
|
|
13528
|
+
* ```
|
|
13529
|
+
*/
|
|
13530
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
13466
13531
|
/**
|
|
13467
13532
|
* @experimental
|
|
13468
13533
|
*
|
|
@@ -17939,6 +18004,7 @@ declare namespace SystemEvents {
|
|
|
17939
18004
|
AppVersionEventWithId,
|
|
17940
18005
|
ApplicationCreatedEvent,
|
|
17941
18006
|
DesktopIconClickedEvent,
|
|
18007
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17942
18008
|
SystemShutdownEvent,
|
|
17943
18009
|
ExtensionsEnabledEvent,
|
|
17944
18010
|
ExtensionsDisabledEvent,
|
package/out/stub.js
CHANGED
|
@@ -10196,9 +10196,8 @@ class ExternalApplicationModule extends Base {
|
|
|
10196
10196
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
10197
10197
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
10198
10198
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
10199
|
-
*
|
|
10200
|
-
*
|
|
10201
|
-
* the same as the parent window's.
|
|
10199
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
10200
|
+
* its UUID is the same as the parent window's.
|
|
10202
10201
|
*
|
|
10203
10202
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
10204
10203
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
package/out/stub.mjs
CHANGED
|
@@ -10193,9 +10193,8 @@ class ExternalApplicationModule extends Base {
|
|
|
10193
10193
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
10194
10194
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
10195
10195
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
10196
|
-
*
|
|
10197
|
-
*
|
|
10198
|
-
* the same as the parent window's.
|
|
10196
|
+
* Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
|
|
10197
|
+
* its UUID is the same as the parent window's.
|
|
10199
10198
|
*
|
|
10200
10199
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
10201
10200
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|