@openfin/core 47.100.57 → 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 +158 -7
- package/out/mock-beta.d.ts +158 -7
- package/out/mock-public.d.ts +158 -7
- package/out/stub.d.ts +158 -7
- package/out/stub.js +45 -3
- package/out/stub.mjs +45 -3
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
|
|
|
104
104
|
url: string;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | `layout-controller-${string}`;
|
|
107
|
+
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'layout-set-view-pinned' | `layout-controller-${string}`;
|
|
108
108
|
|
|
109
109
|
declare type AnalyticsProtocolMap = {
|
|
110
110
|
[k in AnalyticsOnlyCalls]: VoidCall;
|
|
@@ -3249,6 +3249,18 @@ declare interface ChromeBrowserActions {
|
|
|
3249
3249
|
/**
|
|
3250
3250
|
* Control behavior for Chromium policies
|
|
3251
3251
|
*
|
|
3252
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3253
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3254
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3255
|
+
*
|
|
3256
|
+
* @remarks
|
|
3257
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3258
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3259
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3260
|
+
* with `updateOptions`.
|
|
3261
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3262
|
+
* it sets its own.
|
|
3263
|
+
*
|
|
3252
3264
|
* @interface
|
|
3253
3265
|
*/
|
|
3254
3266
|
declare type ChromiumPolicies = {
|
|
@@ -4671,7 +4683,7 @@ declare type CreateLayoutOptions = {
|
|
|
4671
4683
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4672
4684
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4673
4685
|
*
|
|
4674
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4686
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4675
4687
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4676
4688
|
*
|
|
4677
4689
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4995,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
4995
5007
|
readonly glyph?: string;
|
|
4996
5008
|
};
|
|
4997
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
|
+
|
|
4998
5035
|
/**
|
|
4999
5036
|
* @interface
|
|
5000
5037
|
*
|
|
@@ -5508,13 +5545,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5508
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5509
5546
|
* from which they propagate).
|
|
5510
5547
|
*/
|
|
5511
|
-
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;
|
|
5512
5549
|
|
|
5513
5550
|
/**
|
|
5514
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.
|
|
5515
5552
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5553
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5554
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5555
|
|
|
5519
5556
|
/**
|
|
5520
5557
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
|
|
@@ -6385,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6385
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6386
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6387
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6388
|
-
*
|
|
6389
|
-
*
|
|
6390
|
-
* 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.
|
|
6391
6427
|
*
|
|
6392
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6393
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -8631,6 +8667,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8667
|
* * layout-state-changed
|
|
8632
8668
|
* * tab-closed
|
|
8633
8669
|
* * tab-dropped
|
|
8670
|
+
* * tab-pinned-changed
|
|
8634
8671
|
*
|
|
8635
8672
|
* ### Layout DOM Node Events
|
|
8636
8673
|
*
|
|
@@ -8705,6 +8742,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8742
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8743
|
* }
|
|
8707
8744
|
* ```
|
|
8745
|
+
*
|
|
8746
|
+
* #### tab-pinned-changed
|
|
8747
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8748
|
+
* ```js
|
|
8749
|
+
* // The response has the following shape in event.detail:
|
|
8750
|
+
* {
|
|
8751
|
+
* containerSelector: "container-component_A",
|
|
8752
|
+
* name: "component_A",
|
|
8753
|
+
* tabSelector: "tab-component_A",
|
|
8754
|
+
* topic: "openfin-DOM-event",
|
|
8755
|
+
* type: "tab-pinned-changed",
|
|
8756
|
+
* uuid: "OpenFin POC",
|
|
8757
|
+
* pinned: true
|
|
8758
|
+
* }
|
|
8759
|
+
* ```
|
|
8708
8760
|
*/
|
|
8709
8761
|
declare class Layout extends Base {
|
|
8710
8762
|
#private;
|
|
@@ -8895,6 +8947,27 @@ declare class Layout extends Base {
|
|
|
8895
8947
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8948
|
*/
|
|
8897
8949
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8950
|
+
/**
|
|
8951
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8952
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8953
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8954
|
+
* event when the pin state changes.
|
|
8955
|
+
*
|
|
8956
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8957
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8958
|
+
*
|
|
8959
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8960
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8961
|
+
*
|
|
8962
|
+
* @example
|
|
8963
|
+
* ```js
|
|
8964
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8965
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8966
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8967
|
+
* ```
|
|
8968
|
+
* @experimental
|
|
8969
|
+
*/
|
|
8970
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8971
|
}
|
|
8899
8972
|
|
|
8900
8973
|
/**
|
|
@@ -8937,6 +9010,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
9010
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
9011
|
*/
|
|
8939
9012
|
componentState?: Partial<ViewCreationOptions>;
|
|
9013
|
+
/**
|
|
9014
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9015
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9016
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9017
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9018
|
+
*
|
|
9019
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9020
|
+
*/
|
|
9021
|
+
pinned?: boolean;
|
|
8940
9022
|
type: 'component';
|
|
8941
9023
|
};
|
|
8942
9024
|
|
|
@@ -8979,6 +9061,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9061
|
TabDroppedEvent,
|
|
8980
9062
|
ContainerCreatedEvent,
|
|
8981
9063
|
LayoutStateChangedEvent,
|
|
9064
|
+
TabPinnedChangedEvent,
|
|
8982
9065
|
Event_12 as Event,
|
|
8983
9066
|
EventType_9 as EventType,
|
|
8984
9067
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9090,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9090
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9091
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9092
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9093
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9094
|
};
|
|
9011
9095
|
|
|
9012
9096
|
/**
|
|
@@ -9434,6 +9518,21 @@ declare type LayoutOptions = {
|
|
|
9434
9518
|
* @defaultValue 'dropdown'
|
|
9435
9519
|
*/
|
|
9436
9520
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9521
|
+
/**
|
|
9522
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9523
|
+
*
|
|
9524
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9525
|
+
* should not offer pin / unpin.
|
|
9526
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9527
|
+
* may offer pin / unpin.
|
|
9528
|
+
*
|
|
9529
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9530
|
+
*
|
|
9531
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9532
|
+
*
|
|
9533
|
+
* @defaultValue false
|
|
9534
|
+
*/
|
|
9535
|
+
allowUserPinning?: boolean;
|
|
9437
9536
|
};
|
|
9438
9537
|
/**
|
|
9439
9538
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12896,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12896
12995
|
* @returns {Promise<void>}
|
|
12897
12996
|
*/
|
|
12898
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>;
|
|
12899
13039
|
/**
|
|
12900
13040
|
* @experimental
|
|
12901
13041
|
*
|
|
@@ -17358,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17358
17498
|
AppVersionEventType,
|
|
17359
17499
|
ApplicationCreatedEvent,
|
|
17360
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17361
17502
|
ExtensionsEnabledEvent,
|
|
17362
17503
|
ExtensionsDisabledEvent,
|
|
17363
17504
|
ExtensionsExcludedEvent,
|
|
@@ -17487,6 +17628,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17628
|
url: string;
|
|
17488
17629
|
};
|
|
17489
17630
|
|
|
17631
|
+
/**
|
|
17632
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17633
|
+
* The identity is the view whose tab changed.
|
|
17634
|
+
* @interface
|
|
17635
|
+
*/
|
|
17636
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17637
|
+
type: 'tab-pinned-changed';
|
|
17638
|
+
pinned: boolean;
|
|
17639
|
+
};
|
|
17640
|
+
|
|
17490
17641
|
/**
|
|
17491
17642
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17643
|
*/
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
|
|
|
104
104
|
url: string;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | `layout-controller-${string}`;
|
|
107
|
+
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'layout-set-view-pinned' | `layout-controller-${string}`;
|
|
108
108
|
|
|
109
109
|
declare type AnalyticsProtocolMap = {
|
|
110
110
|
[k in AnalyticsOnlyCalls]: VoidCall;
|
|
@@ -3249,6 +3249,18 @@ declare interface ChromeBrowserActions {
|
|
|
3249
3249
|
/**
|
|
3250
3250
|
* Control behavior for Chromium policies
|
|
3251
3251
|
*
|
|
3252
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3253
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3254
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3255
|
+
*
|
|
3256
|
+
* @remarks
|
|
3257
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3258
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3259
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3260
|
+
* with `updateOptions`.
|
|
3261
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3262
|
+
* it sets its own.
|
|
3263
|
+
*
|
|
3252
3264
|
* @interface
|
|
3253
3265
|
*/
|
|
3254
3266
|
declare type ChromiumPolicies = {
|
|
@@ -4671,7 +4683,7 @@ declare type CreateLayoutOptions = {
|
|
|
4671
4683
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4672
4684
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4673
4685
|
*
|
|
4674
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4686
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4675
4687
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4676
4688
|
*
|
|
4677
4689
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4995,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
4995
5007
|
readonly glyph?: string;
|
|
4996
5008
|
};
|
|
4997
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
|
+
|
|
4998
5035
|
/**
|
|
4999
5036
|
* @interface
|
|
5000
5037
|
*
|
|
@@ -5508,13 +5545,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5508
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5509
5546
|
* from which they propagate).
|
|
5510
5547
|
*/
|
|
5511
|
-
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;
|
|
5512
5549
|
|
|
5513
5550
|
/**
|
|
5514
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.
|
|
5515
5552
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5553
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5554
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5555
|
|
|
5519
5556
|
/**
|
|
5520
5557
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
|
|
@@ -6385,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6385
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6386
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6387
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6388
|
-
*
|
|
6389
|
-
*
|
|
6390
|
-
* 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.
|
|
6391
6427
|
*
|
|
6392
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6393
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -8631,6 +8667,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8667
|
* * layout-state-changed
|
|
8632
8668
|
* * tab-closed
|
|
8633
8669
|
* * tab-dropped
|
|
8670
|
+
* * tab-pinned-changed
|
|
8634
8671
|
*
|
|
8635
8672
|
* ### Layout DOM Node Events
|
|
8636
8673
|
*
|
|
@@ -8705,6 +8742,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8742
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8743
|
* }
|
|
8707
8744
|
* ```
|
|
8745
|
+
*
|
|
8746
|
+
* #### tab-pinned-changed
|
|
8747
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8748
|
+
* ```js
|
|
8749
|
+
* // The response has the following shape in event.detail:
|
|
8750
|
+
* {
|
|
8751
|
+
* containerSelector: "container-component_A",
|
|
8752
|
+
* name: "component_A",
|
|
8753
|
+
* tabSelector: "tab-component_A",
|
|
8754
|
+
* topic: "openfin-DOM-event",
|
|
8755
|
+
* type: "tab-pinned-changed",
|
|
8756
|
+
* uuid: "OpenFin POC",
|
|
8757
|
+
* pinned: true
|
|
8758
|
+
* }
|
|
8759
|
+
* ```
|
|
8708
8760
|
*/
|
|
8709
8761
|
declare class Layout extends Base {
|
|
8710
8762
|
#private;
|
|
@@ -8895,6 +8947,27 @@ declare class Layout extends Base {
|
|
|
8895
8947
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8948
|
*/
|
|
8897
8949
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8950
|
+
/**
|
|
8951
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8952
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8953
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8954
|
+
* event when the pin state changes.
|
|
8955
|
+
*
|
|
8956
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8957
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8958
|
+
*
|
|
8959
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8960
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8961
|
+
*
|
|
8962
|
+
* @example
|
|
8963
|
+
* ```js
|
|
8964
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8965
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8966
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8967
|
+
* ```
|
|
8968
|
+
* @experimental
|
|
8969
|
+
*/
|
|
8970
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8971
|
}
|
|
8899
8972
|
|
|
8900
8973
|
/**
|
|
@@ -8937,6 +9010,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
9010
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
9011
|
*/
|
|
8939
9012
|
componentState?: Partial<ViewCreationOptions>;
|
|
9013
|
+
/**
|
|
9014
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9015
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9016
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9017
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9018
|
+
*
|
|
9019
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9020
|
+
*/
|
|
9021
|
+
pinned?: boolean;
|
|
8940
9022
|
type: 'component';
|
|
8941
9023
|
};
|
|
8942
9024
|
|
|
@@ -8979,6 +9061,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9061
|
TabDroppedEvent,
|
|
8980
9062
|
ContainerCreatedEvent,
|
|
8981
9063
|
LayoutStateChangedEvent,
|
|
9064
|
+
TabPinnedChangedEvent,
|
|
8982
9065
|
Event_12 as Event,
|
|
8983
9066
|
EventType_9 as EventType,
|
|
8984
9067
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9090,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9090
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9091
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9092
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9093
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9094
|
};
|
|
9011
9095
|
|
|
9012
9096
|
/**
|
|
@@ -9434,6 +9518,21 @@ declare type LayoutOptions = {
|
|
|
9434
9518
|
* @defaultValue 'dropdown'
|
|
9435
9519
|
*/
|
|
9436
9520
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9521
|
+
/**
|
|
9522
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9523
|
+
*
|
|
9524
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9525
|
+
* should not offer pin / unpin.
|
|
9526
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9527
|
+
* may offer pin / unpin.
|
|
9528
|
+
*
|
|
9529
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9530
|
+
*
|
|
9531
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9532
|
+
*
|
|
9533
|
+
* @defaultValue false
|
|
9534
|
+
*/
|
|
9535
|
+
allowUserPinning?: boolean;
|
|
9437
9536
|
};
|
|
9438
9537
|
/**
|
|
9439
9538
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12896,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12896
12995
|
* @returns {Promise<void>}
|
|
12897
12996
|
*/
|
|
12898
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>;
|
|
12899
13039
|
/**
|
|
12900
13040
|
* @experimental
|
|
12901
13041
|
*
|
|
@@ -17358,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17358
17498
|
AppVersionEventType,
|
|
17359
17499
|
ApplicationCreatedEvent,
|
|
17360
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17361
17502
|
ExtensionsEnabledEvent,
|
|
17362
17503
|
ExtensionsDisabledEvent,
|
|
17363
17504
|
ExtensionsExcludedEvent,
|
|
@@ -17487,6 +17628,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17628
|
url: string;
|
|
17488
17629
|
};
|
|
17489
17630
|
|
|
17631
|
+
/**
|
|
17632
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17633
|
+
* The identity is the view whose tab changed.
|
|
17634
|
+
* @interface
|
|
17635
|
+
*/
|
|
17636
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17637
|
+
type: 'tab-pinned-changed';
|
|
17638
|
+
pinned: boolean;
|
|
17639
|
+
};
|
|
17640
|
+
|
|
17490
17641
|
/**
|
|
17491
17642
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17643
|
*/
|
package/out/mock-public.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
|
|
|
104
104
|
url: string;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | `layout-controller-${string}`;
|
|
107
|
+
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'layout-set-view-pinned' | `layout-controller-${string}`;
|
|
108
108
|
|
|
109
109
|
declare type AnalyticsProtocolMap = {
|
|
110
110
|
[k in AnalyticsOnlyCalls]: VoidCall;
|
|
@@ -3249,6 +3249,18 @@ declare interface ChromeBrowserActions {
|
|
|
3249
3249
|
/**
|
|
3250
3250
|
* Control behavior for Chromium policies
|
|
3251
3251
|
*
|
|
3252
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3253
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3254
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3255
|
+
*
|
|
3256
|
+
* @remarks
|
|
3257
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3258
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3259
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3260
|
+
* with `updateOptions`.
|
|
3261
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3262
|
+
* it sets its own.
|
|
3263
|
+
*
|
|
3252
3264
|
* @interface
|
|
3253
3265
|
*/
|
|
3254
3266
|
declare type ChromiumPolicies = {
|
|
@@ -4671,7 +4683,7 @@ declare type CreateLayoutOptions = {
|
|
|
4671
4683
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4672
4684
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4673
4685
|
*
|
|
4674
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4686
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4675
4687
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4676
4688
|
*
|
|
4677
4689
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4995,6 +5007,31 @@ declare type DisplayMetadata = {
|
|
|
4995
5007
|
readonly glyph?: string;
|
|
4996
5008
|
};
|
|
4997
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
|
+
|
|
4998
5035
|
/**
|
|
4999
5036
|
* @interface
|
|
5000
5037
|
*
|
|
@@ -5508,13 +5545,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5508
5545
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5509
5546
|
* from which they propagate).
|
|
5510
5547
|
*/
|
|
5511
|
-
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;
|
|
5512
5549
|
|
|
5513
5550
|
/**
|
|
5514
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.
|
|
5515
5552
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5553
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5554
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5555
|
|
|
5519
5556
|
/**
|
|
5520
5557
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
|
|
@@ -6385,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6385
6422
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6386
6423
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6387
6424
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6388
|
-
*
|
|
6389
|
-
*
|
|
6390
|
-
* 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.
|
|
6391
6427
|
*
|
|
6392
6428
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6393
6429
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -8631,6 +8667,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8667
|
* * layout-state-changed
|
|
8632
8668
|
* * tab-closed
|
|
8633
8669
|
* * tab-dropped
|
|
8670
|
+
* * tab-pinned-changed
|
|
8634
8671
|
*
|
|
8635
8672
|
* ### Layout DOM Node Events
|
|
8636
8673
|
*
|
|
@@ -8705,6 +8742,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8742
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8743
|
* }
|
|
8707
8744
|
* ```
|
|
8745
|
+
*
|
|
8746
|
+
* #### tab-pinned-changed
|
|
8747
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8748
|
+
* ```js
|
|
8749
|
+
* // The response has the following shape in event.detail:
|
|
8750
|
+
* {
|
|
8751
|
+
* containerSelector: "container-component_A",
|
|
8752
|
+
* name: "component_A",
|
|
8753
|
+
* tabSelector: "tab-component_A",
|
|
8754
|
+
* topic: "openfin-DOM-event",
|
|
8755
|
+
* type: "tab-pinned-changed",
|
|
8756
|
+
* uuid: "OpenFin POC",
|
|
8757
|
+
* pinned: true
|
|
8758
|
+
* }
|
|
8759
|
+
* ```
|
|
8708
8760
|
*/
|
|
8709
8761
|
declare class Layout extends Base {
|
|
8710
8762
|
#private;
|
|
@@ -8895,6 +8947,27 @@ declare class Layout extends Base {
|
|
|
8895
8947
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8948
|
*/
|
|
8897
8949
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8950
|
+
/**
|
|
8951
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8952
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8953
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8954
|
+
* event when the pin state changes.
|
|
8955
|
+
*
|
|
8956
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8957
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8958
|
+
*
|
|
8959
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8960
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8961
|
+
*
|
|
8962
|
+
* @example
|
|
8963
|
+
* ```js
|
|
8964
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8965
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8966
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8967
|
+
* ```
|
|
8968
|
+
* @experimental
|
|
8969
|
+
*/
|
|
8970
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8971
|
}
|
|
8899
8972
|
|
|
8900
8973
|
/**
|
|
@@ -8937,6 +9010,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
9010
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
9011
|
*/
|
|
8939
9012
|
componentState?: Partial<ViewCreationOptions>;
|
|
9013
|
+
/**
|
|
9014
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9015
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9016
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9017
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9018
|
+
*
|
|
9019
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9020
|
+
*/
|
|
9021
|
+
pinned?: boolean;
|
|
8940
9022
|
type: 'component';
|
|
8941
9023
|
};
|
|
8942
9024
|
|
|
@@ -8979,6 +9061,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9061
|
TabDroppedEvent,
|
|
8980
9062
|
ContainerCreatedEvent,
|
|
8981
9063
|
LayoutStateChangedEvent,
|
|
9064
|
+
TabPinnedChangedEvent,
|
|
8982
9065
|
Event_12 as Event,
|
|
8983
9066
|
EventType_9 as EventType,
|
|
8984
9067
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9090,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9090
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9091
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9092
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9093
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9094
|
};
|
|
9011
9095
|
|
|
9012
9096
|
/**
|
|
@@ -9434,6 +9518,21 @@ declare type LayoutOptions = {
|
|
|
9434
9518
|
* @defaultValue 'dropdown'
|
|
9435
9519
|
*/
|
|
9436
9520
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9521
|
+
/**
|
|
9522
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9523
|
+
*
|
|
9524
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9525
|
+
* should not offer pin / unpin.
|
|
9526
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9527
|
+
* may offer pin / unpin.
|
|
9528
|
+
*
|
|
9529
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9530
|
+
*
|
|
9531
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9532
|
+
*
|
|
9533
|
+
* @defaultValue false
|
|
9534
|
+
*/
|
|
9535
|
+
allowUserPinning?: boolean;
|
|
9437
9536
|
};
|
|
9438
9537
|
/**
|
|
9439
9538
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12896,6 +12995,47 @@ declare interface PlatformProvider {
|
|
|
12896
12995
|
* @returns {Promise<void>}
|
|
12897
12996
|
*/
|
|
12898
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>;
|
|
12899
13039
|
/**
|
|
12900
13040
|
* @experimental
|
|
12901
13041
|
*
|
|
@@ -17358,6 +17498,7 @@ declare namespace SystemEvents {
|
|
|
17358
17498
|
AppVersionEventType,
|
|
17359
17499
|
ApplicationCreatedEvent,
|
|
17360
17500
|
DesktopIconClickedEvent,
|
|
17501
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17361
17502
|
ExtensionsEnabledEvent,
|
|
17362
17503
|
ExtensionsDisabledEvent,
|
|
17363
17504
|
ExtensionsExcludedEvent,
|
|
@@ -17487,6 +17628,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17628
|
url: string;
|
|
17488
17629
|
};
|
|
17489
17630
|
|
|
17631
|
+
/**
|
|
17632
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17633
|
+
* The identity is the view whose tab changed.
|
|
17634
|
+
* @interface
|
|
17635
|
+
*/
|
|
17636
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17637
|
+
type: 'tab-pinned-changed';
|
|
17638
|
+
pinned: boolean;
|
|
17639
|
+
};
|
|
17640
|
+
|
|
17490
17641
|
/**
|
|
17491
17642
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17643
|
*/
|
package/out/stub.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
|
|
|
104
104
|
url: string;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | `layout-controller-${string}`;
|
|
107
|
+
declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'layout-set-view-pinned' | `layout-controller-${string}`;
|
|
108
108
|
|
|
109
109
|
declare type AnalyticsProtocolMap = {
|
|
110
110
|
[k in AnalyticsOnlyCalls]: VoidCall;
|
|
@@ -3315,6 +3315,18 @@ declare interface ChromeBrowserActions {
|
|
|
3315
3315
|
/**
|
|
3316
3316
|
* Control behavior for Chromium policies
|
|
3317
3317
|
*
|
|
3318
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3319
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3320
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3321
|
+
*
|
|
3322
|
+
* @remarks
|
|
3323
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3324
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3325
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3326
|
+
* with `updateOptions`.
|
|
3327
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3328
|
+
* it sets its own.
|
|
3329
|
+
*
|
|
3318
3330
|
* @interface
|
|
3319
3331
|
*/
|
|
3320
3332
|
declare type ChromiumPolicies = {
|
|
@@ -4787,7 +4799,7 @@ declare type CreateLayoutOptions = {
|
|
|
4787
4799
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4788
4800
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4789
4801
|
*
|
|
4790
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4802
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4791
4803
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4792
4804
|
*
|
|
4793
4805
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -5111,6 +5123,31 @@ declare type DisplayMetadata = {
|
|
|
5111
5123
|
readonly glyph?: string;
|
|
5112
5124
|
};
|
|
5113
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
|
+
|
|
5114
5151
|
/**
|
|
5115
5152
|
* @interface
|
|
5116
5153
|
*
|
|
@@ -5635,13 +5672,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5635
5672
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5636
5673
|
* from which they propagate).
|
|
5637
5674
|
*/
|
|
5638
|
-
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;
|
|
5639
5676
|
|
|
5640
5677
|
/**
|
|
5641
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.
|
|
5642
5679
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5643
5680
|
*/
|
|
5644
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5681
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5645
5682
|
|
|
5646
5683
|
/**
|
|
5647
5684
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
|
|
@@ -6539,9 +6576,8 @@ declare type FoundInPageEvent = NamedEvent & {
|
|
|
6539
6576
|
* To be able to directly address this context for eventing and messaging purposes, it needs a
|
|
6540
6577
|
* unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
|
|
6541
6578
|
* object in the form of a manifest URL or options object, but there is no configuration object for iframes.
|
|
6542
|
-
*
|
|
6543
|
-
*
|
|
6544
|
-
* 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.
|
|
6545
6581
|
*
|
|
6546
6582
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
6547
6583
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
@@ -8817,6 +8853,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8817
8853
|
* * layout-state-changed
|
|
8818
8854
|
* * tab-closed
|
|
8819
8855
|
* * tab-dropped
|
|
8856
|
+
* * tab-pinned-changed
|
|
8820
8857
|
*
|
|
8821
8858
|
* ### Layout DOM Node Events
|
|
8822
8859
|
*
|
|
@@ -8891,6 +8928,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8891
8928
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8892
8929
|
* }
|
|
8893
8930
|
* ```
|
|
8931
|
+
*
|
|
8932
|
+
* #### tab-pinned-changed
|
|
8933
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8934
|
+
* ```js
|
|
8935
|
+
* // The response has the following shape in event.detail:
|
|
8936
|
+
* {
|
|
8937
|
+
* containerSelector: "container-component_A",
|
|
8938
|
+
* name: "component_A",
|
|
8939
|
+
* tabSelector: "tab-component_A",
|
|
8940
|
+
* topic: "openfin-DOM-event",
|
|
8941
|
+
* type: "tab-pinned-changed",
|
|
8942
|
+
* uuid: "OpenFin POC",
|
|
8943
|
+
* pinned: true
|
|
8944
|
+
* }
|
|
8945
|
+
* ```
|
|
8894
8946
|
*/
|
|
8895
8947
|
declare class Layout extends Base {
|
|
8896
8948
|
#private;
|
|
@@ -9090,6 +9142,27 @@ declare class Layout extends Base {
|
|
|
9090
9142
|
* @returns A promise that resolves when the view is closed.
|
|
9091
9143
|
*/
|
|
9092
9144
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
9145
|
+
/**
|
|
9146
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
9147
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
9148
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
9149
|
+
* event when the pin state changes.
|
|
9150
|
+
*
|
|
9151
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9152
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
9153
|
+
*
|
|
9154
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
9155
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
9156
|
+
*
|
|
9157
|
+
* @example
|
|
9158
|
+
* ```js
|
|
9159
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
9160
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
9161
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
9162
|
+
* ```
|
|
9163
|
+
* @experimental
|
|
9164
|
+
*/
|
|
9165
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
9093
9166
|
}
|
|
9094
9167
|
|
|
9095
9168
|
/**
|
|
@@ -9132,6 +9205,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
9132
9205
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
9133
9206
|
*/
|
|
9134
9207
|
componentState?: Partial<ViewCreationOptions>;
|
|
9208
|
+
/**
|
|
9209
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9210
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9211
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9212
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9213
|
+
*
|
|
9214
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9215
|
+
*/
|
|
9216
|
+
pinned?: boolean;
|
|
9135
9217
|
type: 'component';
|
|
9136
9218
|
};
|
|
9137
9219
|
|
|
@@ -9174,6 +9256,7 @@ declare namespace LayoutDOMEvents {
|
|
|
9174
9256
|
TabDroppedEvent,
|
|
9175
9257
|
ContainerCreatedEvent,
|
|
9176
9258
|
LayoutStateChangedEvent,
|
|
9259
|
+
TabPinnedChangedEvent,
|
|
9177
9260
|
Event_12 as Event,
|
|
9178
9261
|
EventType_9 as EventType,
|
|
9179
9262
|
Payload_11 as Payload,
|
|
@@ -9202,6 +9285,7 @@ declare type LayoutEntitiesController = {
|
|
|
9202
9285
|
edge: OpenFin_2.LayoutPosition;
|
|
9203
9286
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9204
9287
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9288
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9205
9289
|
};
|
|
9206
9290
|
|
|
9207
9291
|
/**
|
|
@@ -9812,6 +9896,21 @@ declare type LayoutOptions = {
|
|
|
9812
9896
|
* @defaultValue 'dropdown'
|
|
9813
9897
|
*/
|
|
9814
9898
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9899
|
+
/**
|
|
9900
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9901
|
+
*
|
|
9902
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9903
|
+
* should not offer pin / unpin.
|
|
9904
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9905
|
+
* may offer pin / unpin.
|
|
9906
|
+
*
|
|
9907
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9908
|
+
*
|
|
9909
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9910
|
+
*
|
|
9911
|
+
* @defaultValue false
|
|
9912
|
+
*/
|
|
9913
|
+
allowUserPinning?: boolean;
|
|
9815
9914
|
};
|
|
9816
9915
|
/**
|
|
9817
9916
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -13388,6 +13487,47 @@ declare interface PlatformProvider {
|
|
|
13388
13487
|
* @returns {Promise<void>}
|
|
13389
13488
|
*/
|
|
13390
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>;
|
|
13391
13531
|
/**
|
|
13392
13532
|
* @experimental
|
|
13393
13533
|
*
|
|
@@ -17864,6 +18004,7 @@ declare namespace SystemEvents {
|
|
|
17864
18004
|
AppVersionEventWithId,
|
|
17865
18005
|
ApplicationCreatedEvent,
|
|
17866
18006
|
DesktopIconClickedEvent,
|
|
18007
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17867
18008
|
SystemShutdownEvent,
|
|
17868
18009
|
ExtensionsEnabledEvent,
|
|
17869
18010
|
ExtensionsDisabledEvent,
|
|
@@ -18000,6 +18141,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
18000
18141
|
url: string;
|
|
18001
18142
|
};
|
|
18002
18143
|
|
|
18144
|
+
/**
|
|
18145
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
18146
|
+
* The identity is the view whose tab changed.
|
|
18147
|
+
* @interface
|
|
18148
|
+
*/
|
|
18149
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
18150
|
+
type: 'tab-pinned-changed';
|
|
18151
|
+
pinned: boolean;
|
|
18152
|
+
};
|
|
18153
|
+
|
|
18003
18154
|
/**
|
|
18004
18155
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
18005
18156
|
*/
|
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}.
|
|
@@ -11843,6 +11842,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11843
11842
|
* * layout-state-changed
|
|
11844
11843
|
* * tab-closed
|
|
11845
11844
|
* * tab-dropped
|
|
11845
|
+
* * tab-pinned-changed
|
|
11846
11846
|
*
|
|
11847
11847
|
* ### Layout DOM Node Events
|
|
11848
11848
|
*
|
|
@@ -11917,6 +11917,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11917
11917
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11918
11918
|
* }
|
|
11919
11919
|
* ```
|
|
11920
|
+
*
|
|
11921
|
+
* #### tab-pinned-changed
|
|
11922
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11923
|
+
* ```js
|
|
11924
|
+
* // The response has the following shape in event.detail:
|
|
11925
|
+
* {
|
|
11926
|
+
* containerSelector: "container-component_A",
|
|
11927
|
+
* name: "component_A",
|
|
11928
|
+
* tabSelector: "tab-component_A",
|
|
11929
|
+
* topic: "openfin-DOM-event",
|
|
11930
|
+
* type: "tab-pinned-changed",
|
|
11931
|
+
* uuid: "OpenFin POC",
|
|
11932
|
+
* pinned: true
|
|
11933
|
+
* }
|
|
11934
|
+
* ```
|
|
11920
11935
|
*/
|
|
11921
11936
|
class Layout extends Base {
|
|
11922
11937
|
/**
|
|
@@ -12204,6 +12219,33 @@ class Layout extends Base {
|
|
|
12204
12219
|
});
|
|
12205
12220
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12206
12221
|
}
|
|
12222
|
+
/**
|
|
12223
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12224
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12225
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12226
|
+
* event when the pin state changes.
|
|
12227
|
+
*
|
|
12228
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12229
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12230
|
+
*
|
|
12231
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12232
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12233
|
+
*
|
|
12234
|
+
* @example
|
|
12235
|
+
* ```js
|
|
12236
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12237
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12238
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12239
|
+
* ```
|
|
12240
|
+
* @experimental
|
|
12241
|
+
*/
|
|
12242
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12243
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12244
|
+
// don't expose
|
|
12245
|
+
});
|
|
12246
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12247
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12248
|
+
}
|
|
12207
12249
|
}
|
|
12208
12250
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12209
12251
|
/**
|
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}.
|
|
@@ -11840,6 +11839,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11840
11839
|
* * layout-state-changed
|
|
11841
11840
|
* * tab-closed
|
|
11842
11841
|
* * tab-dropped
|
|
11842
|
+
* * tab-pinned-changed
|
|
11843
11843
|
*
|
|
11844
11844
|
* ### Layout DOM Node Events
|
|
11845
11845
|
*
|
|
@@ -11914,6 +11914,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11914
11914
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11915
11915
|
* }
|
|
11916
11916
|
* ```
|
|
11917
|
+
*
|
|
11918
|
+
* #### tab-pinned-changed
|
|
11919
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11920
|
+
* ```js
|
|
11921
|
+
* // The response has the following shape in event.detail:
|
|
11922
|
+
* {
|
|
11923
|
+
* containerSelector: "container-component_A",
|
|
11924
|
+
* name: "component_A",
|
|
11925
|
+
* tabSelector: "tab-component_A",
|
|
11926
|
+
* topic: "openfin-DOM-event",
|
|
11927
|
+
* type: "tab-pinned-changed",
|
|
11928
|
+
* uuid: "OpenFin POC",
|
|
11929
|
+
* pinned: true
|
|
11930
|
+
* }
|
|
11931
|
+
* ```
|
|
11917
11932
|
*/
|
|
11918
11933
|
class Layout extends Base {
|
|
11919
11934
|
/**
|
|
@@ -12201,6 +12216,33 @@ class Layout extends Base {
|
|
|
12201
12216
|
});
|
|
12202
12217
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12203
12218
|
}
|
|
12219
|
+
/**
|
|
12220
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12221
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12222
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12223
|
+
* event when the pin state changes.
|
|
12224
|
+
*
|
|
12225
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12226
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12227
|
+
*
|
|
12228
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12229
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12230
|
+
*
|
|
12231
|
+
* @example
|
|
12232
|
+
* ```js
|
|
12233
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12234
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12235
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12236
|
+
* ```
|
|
12237
|
+
* @experimental
|
|
12238
|
+
*/
|
|
12239
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12240
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12241
|
+
// don't expose
|
|
12242
|
+
});
|
|
12243
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12244
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12245
|
+
}
|
|
12204
12246
|
}
|
|
12205
12247
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12206
12248
|
/**
|