@openfin/core 46.100.95 → 46.100.97
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 +156 -4
- package/out/mock-beta.d.ts +156 -4
- package/out/mock-public.d.ts +156 -4
- package/out/stub.d.ts +156 -4
- package/out/stub.js +43 -0
- package/out/stub.mjs +43 -0
- 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;
|
|
@@ -3187,6 +3187,18 @@ declare interface ChromeBrowserActions {
|
|
|
3187
3187
|
/**
|
|
3188
3188
|
* Control behavior for Chromium policies
|
|
3189
3189
|
*
|
|
3190
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3191
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3192
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3193
|
+
*
|
|
3194
|
+
* @remarks
|
|
3195
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3196
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3197
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3198
|
+
* with `updateOptions`.
|
|
3199
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3200
|
+
* it sets its own.
|
|
3201
|
+
*
|
|
3190
3202
|
* @interface
|
|
3191
3203
|
*/
|
|
3192
3204
|
declare type ChromiumPolicies = {
|
|
@@ -4616,7 +4628,7 @@ declare type CreateLayoutOptions = {
|
|
|
4616
4628
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4617
4629
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4618
4630
|
*
|
|
4619
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4631
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4620
4632
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4621
4633
|
*
|
|
4622
4634
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4940,6 +4952,31 @@ declare type DisplayMetadata = {
|
|
|
4940
4952
|
readonly glyph?: string;
|
|
4941
4953
|
};
|
|
4942
4954
|
|
|
4955
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
4956
|
+
|
|
4957
|
+
/**
|
|
4958
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
4959
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
4960
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
4961
|
+
* `run-requested` on that application instead.
|
|
4962
|
+
*
|
|
4963
|
+
* By default, the platform provider handles this event in
|
|
4964
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
4965
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
4966
|
+
* @interface
|
|
4967
|
+
*/
|
|
4968
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
4969
|
+
type: 'dock-icon-clicked';
|
|
4970
|
+
/**
|
|
4971
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
4972
|
+
*/
|
|
4973
|
+
hasVisibleWindows: boolean;
|
|
4974
|
+
/**
|
|
4975
|
+
* UUID of the application the runtime was started with, if any.
|
|
4976
|
+
*/
|
|
4977
|
+
uuid?: string;
|
|
4978
|
+
};
|
|
4979
|
+
|
|
4943
4980
|
/**
|
|
4944
4981
|
* @interface
|
|
4945
4982
|
*
|
|
@@ -5451,13 +5488,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5451
5488
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5452
5489
|
* from which they propagate).
|
|
5453
5490
|
*/
|
|
5454
|
-
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;
|
|
5491
|
+
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;
|
|
5455
5492
|
|
|
5456
5493
|
/**
|
|
5457
5494
|
* [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.
|
|
5458
5495
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5459
5496
|
*/
|
|
5460
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5497
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5461
5498
|
|
|
5462
5499
|
/**
|
|
5463
5500
|
* [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
|
|
@@ -8569,6 +8606,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8569
8606
|
* * layout-state-changed
|
|
8570
8607
|
* * tab-closed
|
|
8571
8608
|
* * tab-dropped
|
|
8609
|
+
* * tab-pinned-changed
|
|
8572
8610
|
*
|
|
8573
8611
|
* ### Layout DOM Node Events
|
|
8574
8612
|
*
|
|
@@ -8643,6 +8681,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8643
8681
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8644
8682
|
* }
|
|
8645
8683
|
* ```
|
|
8684
|
+
*
|
|
8685
|
+
* #### tab-pinned-changed
|
|
8686
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8687
|
+
* ```js
|
|
8688
|
+
* // The response has the following shape in event.detail:
|
|
8689
|
+
* {
|
|
8690
|
+
* containerSelector: "container-component_A",
|
|
8691
|
+
* name: "component_A",
|
|
8692
|
+
* tabSelector: "tab-component_A",
|
|
8693
|
+
* topic: "openfin-DOM-event",
|
|
8694
|
+
* type: "tab-pinned-changed",
|
|
8695
|
+
* uuid: "OpenFin POC",
|
|
8696
|
+
* pinned: true
|
|
8697
|
+
* }
|
|
8698
|
+
* ```
|
|
8646
8699
|
*/
|
|
8647
8700
|
declare class Layout extends Base {
|
|
8648
8701
|
#private;
|
|
@@ -8833,6 +8886,27 @@ declare class Layout extends Base {
|
|
|
8833
8886
|
* @returns A promise that resolves when the view is closed.
|
|
8834
8887
|
*/
|
|
8835
8888
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8889
|
+
/**
|
|
8890
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8891
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8892
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8893
|
+
* event when the pin state changes.
|
|
8894
|
+
*
|
|
8895
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8896
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8897
|
+
*
|
|
8898
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8899
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8900
|
+
*
|
|
8901
|
+
* @example
|
|
8902
|
+
* ```js
|
|
8903
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8904
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8905
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8906
|
+
* ```
|
|
8907
|
+
* @experimental
|
|
8908
|
+
*/
|
|
8909
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8836
8910
|
}
|
|
8837
8911
|
|
|
8838
8912
|
/**
|
|
@@ -8875,6 +8949,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8875
8949
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8876
8950
|
*/
|
|
8877
8951
|
componentState?: Partial<ViewCreationOptions>;
|
|
8952
|
+
/**
|
|
8953
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8954
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8955
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8956
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8957
|
+
*
|
|
8958
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8959
|
+
*/
|
|
8960
|
+
pinned?: boolean;
|
|
8878
8961
|
type: 'component';
|
|
8879
8962
|
};
|
|
8880
8963
|
|
|
@@ -8917,6 +9000,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8917
9000
|
TabDroppedEvent,
|
|
8918
9001
|
ContainerCreatedEvent,
|
|
8919
9002
|
LayoutStateChangedEvent,
|
|
9003
|
+
TabPinnedChangedEvent,
|
|
8920
9004
|
Event_12 as Event,
|
|
8921
9005
|
EventType_9 as EventType,
|
|
8922
9006
|
Payload_11 as Payload,
|
|
@@ -8945,6 +9029,7 @@ declare type LayoutEntitiesController = {
|
|
|
8945
9029
|
edge: OpenFin_2.LayoutPosition;
|
|
8946
9030
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
8947
9031
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9032
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
8948
9033
|
};
|
|
8949
9034
|
|
|
8950
9035
|
/**
|
|
@@ -9372,6 +9457,21 @@ declare type LayoutOptions = {
|
|
|
9372
9457
|
* @defaultValue 'dropdown'
|
|
9373
9458
|
*/
|
|
9374
9459
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9460
|
+
/**
|
|
9461
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9462
|
+
*
|
|
9463
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9464
|
+
* should not offer pin / unpin.
|
|
9465
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9466
|
+
* may offer pin / unpin.
|
|
9467
|
+
*
|
|
9468
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9469
|
+
*
|
|
9470
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9471
|
+
*
|
|
9472
|
+
* @defaultValue false
|
|
9473
|
+
*/
|
|
9474
|
+
allowUserPinning?: boolean;
|
|
9375
9475
|
};
|
|
9376
9476
|
/**
|
|
9377
9477
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12823,6 +12923,47 @@ declare interface PlatformProvider {
|
|
|
12823
12923
|
* @returns {Promise<void>}
|
|
12824
12924
|
*/
|
|
12825
12925
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12926
|
+
/**
|
|
12927
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
12928
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
12929
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
12930
|
+
* Clicks while a previous call is still running are ignored.
|
|
12931
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
12932
|
+
*
|
|
12933
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
12934
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
12935
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
12936
|
+
*
|
|
12937
|
+
* @remarks
|
|
12938
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
12939
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
12940
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
12941
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
12942
|
+
*
|
|
12943
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
12944
|
+
* the default does nothing.
|
|
12945
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
12946
|
+
*
|
|
12947
|
+
* @example
|
|
12948
|
+
*
|
|
12949
|
+
* ```js
|
|
12950
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
12951
|
+
* class Override extends PlatformProvider {
|
|
12952
|
+
* async handleDockIconClicked(payload) {
|
|
12953
|
+
* if (payload.hasVisibleWindows) {
|
|
12954
|
+
* // Bring a window forward instead of doing nothing
|
|
12955
|
+
* return;
|
|
12956
|
+
* }
|
|
12957
|
+
* return super.handleDockIconClicked(payload);
|
|
12958
|
+
* }
|
|
12959
|
+
* }
|
|
12960
|
+
* return new Override();
|
|
12961
|
+
* }
|
|
12962
|
+
*
|
|
12963
|
+
* fin.Platform.init({ overrideCallback });
|
|
12964
|
+
* ```
|
|
12965
|
+
*/
|
|
12966
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12826
12967
|
/**
|
|
12827
12968
|
* @experimental
|
|
12828
12969
|
*
|
|
@@ -17285,6 +17426,7 @@ declare namespace SystemEvents {
|
|
|
17285
17426
|
AppVersionEventType,
|
|
17286
17427
|
ApplicationCreatedEvent,
|
|
17287
17428
|
DesktopIconClickedEvent,
|
|
17429
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17288
17430
|
ExtensionsEnabledEvent,
|
|
17289
17431
|
ExtensionsDisabledEvent,
|
|
17290
17432
|
ExtensionsExcludedEvent,
|
|
@@ -17414,6 +17556,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17414
17556
|
url: string;
|
|
17415
17557
|
};
|
|
17416
17558
|
|
|
17559
|
+
/**
|
|
17560
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17561
|
+
* The identity is the view whose tab changed.
|
|
17562
|
+
* @interface
|
|
17563
|
+
*/
|
|
17564
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17565
|
+
type: 'tab-pinned-changed';
|
|
17566
|
+
pinned: boolean;
|
|
17567
|
+
};
|
|
17568
|
+
|
|
17417
17569
|
/**
|
|
17418
17570
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17419
17571
|
*/
|
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;
|
|
@@ -3187,6 +3187,18 @@ declare interface ChromeBrowserActions {
|
|
|
3187
3187
|
/**
|
|
3188
3188
|
* Control behavior for Chromium policies
|
|
3189
3189
|
*
|
|
3190
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3191
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3192
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3193
|
+
*
|
|
3194
|
+
* @remarks
|
|
3195
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3196
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3197
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3198
|
+
* with `updateOptions`.
|
|
3199
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3200
|
+
* it sets its own.
|
|
3201
|
+
*
|
|
3190
3202
|
* @interface
|
|
3191
3203
|
*/
|
|
3192
3204
|
declare type ChromiumPolicies = {
|
|
@@ -4616,7 +4628,7 @@ declare type CreateLayoutOptions = {
|
|
|
4616
4628
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4617
4629
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4618
4630
|
*
|
|
4619
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4631
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4620
4632
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4621
4633
|
*
|
|
4622
4634
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4940,6 +4952,31 @@ declare type DisplayMetadata = {
|
|
|
4940
4952
|
readonly glyph?: string;
|
|
4941
4953
|
};
|
|
4942
4954
|
|
|
4955
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
4956
|
+
|
|
4957
|
+
/**
|
|
4958
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
4959
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
4960
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
4961
|
+
* `run-requested` on that application instead.
|
|
4962
|
+
*
|
|
4963
|
+
* By default, the platform provider handles this event in
|
|
4964
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
4965
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
4966
|
+
* @interface
|
|
4967
|
+
*/
|
|
4968
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
4969
|
+
type: 'dock-icon-clicked';
|
|
4970
|
+
/**
|
|
4971
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
4972
|
+
*/
|
|
4973
|
+
hasVisibleWindows: boolean;
|
|
4974
|
+
/**
|
|
4975
|
+
* UUID of the application the runtime was started with, if any.
|
|
4976
|
+
*/
|
|
4977
|
+
uuid?: string;
|
|
4978
|
+
};
|
|
4979
|
+
|
|
4943
4980
|
/**
|
|
4944
4981
|
* @interface
|
|
4945
4982
|
*
|
|
@@ -5451,13 +5488,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5451
5488
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5452
5489
|
* from which they propagate).
|
|
5453
5490
|
*/
|
|
5454
|
-
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;
|
|
5491
|
+
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;
|
|
5455
5492
|
|
|
5456
5493
|
/**
|
|
5457
5494
|
* [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.
|
|
5458
5495
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5459
5496
|
*/
|
|
5460
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5497
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5461
5498
|
|
|
5462
5499
|
/**
|
|
5463
5500
|
* [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
|
|
@@ -8569,6 +8606,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8569
8606
|
* * layout-state-changed
|
|
8570
8607
|
* * tab-closed
|
|
8571
8608
|
* * tab-dropped
|
|
8609
|
+
* * tab-pinned-changed
|
|
8572
8610
|
*
|
|
8573
8611
|
* ### Layout DOM Node Events
|
|
8574
8612
|
*
|
|
@@ -8643,6 +8681,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8643
8681
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8644
8682
|
* }
|
|
8645
8683
|
* ```
|
|
8684
|
+
*
|
|
8685
|
+
* #### tab-pinned-changed
|
|
8686
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8687
|
+
* ```js
|
|
8688
|
+
* // The response has the following shape in event.detail:
|
|
8689
|
+
* {
|
|
8690
|
+
* containerSelector: "container-component_A",
|
|
8691
|
+
* name: "component_A",
|
|
8692
|
+
* tabSelector: "tab-component_A",
|
|
8693
|
+
* topic: "openfin-DOM-event",
|
|
8694
|
+
* type: "tab-pinned-changed",
|
|
8695
|
+
* uuid: "OpenFin POC",
|
|
8696
|
+
* pinned: true
|
|
8697
|
+
* }
|
|
8698
|
+
* ```
|
|
8646
8699
|
*/
|
|
8647
8700
|
declare class Layout extends Base {
|
|
8648
8701
|
#private;
|
|
@@ -8833,6 +8886,27 @@ declare class Layout extends Base {
|
|
|
8833
8886
|
* @returns A promise that resolves when the view is closed.
|
|
8834
8887
|
*/
|
|
8835
8888
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8889
|
+
/**
|
|
8890
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8891
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8892
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8893
|
+
* event when the pin state changes.
|
|
8894
|
+
*
|
|
8895
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8896
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8897
|
+
*
|
|
8898
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8899
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8900
|
+
*
|
|
8901
|
+
* @example
|
|
8902
|
+
* ```js
|
|
8903
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8904
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8905
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8906
|
+
* ```
|
|
8907
|
+
* @experimental
|
|
8908
|
+
*/
|
|
8909
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8836
8910
|
}
|
|
8837
8911
|
|
|
8838
8912
|
/**
|
|
@@ -8875,6 +8949,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8875
8949
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8876
8950
|
*/
|
|
8877
8951
|
componentState?: Partial<ViewCreationOptions>;
|
|
8952
|
+
/**
|
|
8953
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8954
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8955
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8956
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8957
|
+
*
|
|
8958
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8959
|
+
*/
|
|
8960
|
+
pinned?: boolean;
|
|
8878
8961
|
type: 'component';
|
|
8879
8962
|
};
|
|
8880
8963
|
|
|
@@ -8917,6 +9000,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8917
9000
|
TabDroppedEvent,
|
|
8918
9001
|
ContainerCreatedEvent,
|
|
8919
9002
|
LayoutStateChangedEvent,
|
|
9003
|
+
TabPinnedChangedEvent,
|
|
8920
9004
|
Event_12 as Event,
|
|
8921
9005
|
EventType_9 as EventType,
|
|
8922
9006
|
Payload_11 as Payload,
|
|
@@ -8945,6 +9029,7 @@ declare type LayoutEntitiesController = {
|
|
|
8945
9029
|
edge: OpenFin_2.LayoutPosition;
|
|
8946
9030
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
8947
9031
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9032
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
8948
9033
|
};
|
|
8949
9034
|
|
|
8950
9035
|
/**
|
|
@@ -9372,6 +9457,21 @@ declare type LayoutOptions = {
|
|
|
9372
9457
|
* @defaultValue 'dropdown'
|
|
9373
9458
|
*/
|
|
9374
9459
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9460
|
+
/**
|
|
9461
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9462
|
+
*
|
|
9463
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9464
|
+
* should not offer pin / unpin.
|
|
9465
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9466
|
+
* may offer pin / unpin.
|
|
9467
|
+
*
|
|
9468
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9469
|
+
*
|
|
9470
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9471
|
+
*
|
|
9472
|
+
* @defaultValue false
|
|
9473
|
+
*/
|
|
9474
|
+
allowUserPinning?: boolean;
|
|
9375
9475
|
};
|
|
9376
9476
|
/**
|
|
9377
9477
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12823,6 +12923,47 @@ declare interface PlatformProvider {
|
|
|
12823
12923
|
* @returns {Promise<void>}
|
|
12824
12924
|
*/
|
|
12825
12925
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12926
|
+
/**
|
|
12927
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
12928
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
12929
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
12930
|
+
* Clicks while a previous call is still running are ignored.
|
|
12931
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
12932
|
+
*
|
|
12933
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
12934
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
12935
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
12936
|
+
*
|
|
12937
|
+
* @remarks
|
|
12938
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
12939
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
12940
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
12941
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
12942
|
+
*
|
|
12943
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
12944
|
+
* the default does nothing.
|
|
12945
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
12946
|
+
*
|
|
12947
|
+
* @example
|
|
12948
|
+
*
|
|
12949
|
+
* ```js
|
|
12950
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
12951
|
+
* class Override extends PlatformProvider {
|
|
12952
|
+
* async handleDockIconClicked(payload) {
|
|
12953
|
+
* if (payload.hasVisibleWindows) {
|
|
12954
|
+
* // Bring a window forward instead of doing nothing
|
|
12955
|
+
* return;
|
|
12956
|
+
* }
|
|
12957
|
+
* return super.handleDockIconClicked(payload);
|
|
12958
|
+
* }
|
|
12959
|
+
* }
|
|
12960
|
+
* return new Override();
|
|
12961
|
+
* }
|
|
12962
|
+
*
|
|
12963
|
+
* fin.Platform.init({ overrideCallback });
|
|
12964
|
+
* ```
|
|
12965
|
+
*/
|
|
12966
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12826
12967
|
/**
|
|
12827
12968
|
* @experimental
|
|
12828
12969
|
*
|
|
@@ -17285,6 +17426,7 @@ declare namespace SystemEvents {
|
|
|
17285
17426
|
AppVersionEventType,
|
|
17286
17427
|
ApplicationCreatedEvent,
|
|
17287
17428
|
DesktopIconClickedEvent,
|
|
17429
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17288
17430
|
ExtensionsEnabledEvent,
|
|
17289
17431
|
ExtensionsDisabledEvent,
|
|
17290
17432
|
ExtensionsExcludedEvent,
|
|
@@ -17414,6 +17556,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17414
17556
|
url: string;
|
|
17415
17557
|
};
|
|
17416
17558
|
|
|
17559
|
+
/**
|
|
17560
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17561
|
+
* The identity is the view whose tab changed.
|
|
17562
|
+
* @interface
|
|
17563
|
+
*/
|
|
17564
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17565
|
+
type: 'tab-pinned-changed';
|
|
17566
|
+
pinned: boolean;
|
|
17567
|
+
};
|
|
17568
|
+
|
|
17417
17569
|
/**
|
|
17418
17570
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17419
17571
|
*/
|
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;
|
|
@@ -3187,6 +3187,18 @@ declare interface ChromeBrowserActions {
|
|
|
3187
3187
|
/**
|
|
3188
3188
|
* Control behavior for Chromium policies
|
|
3189
3189
|
*
|
|
3190
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3191
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3192
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3193
|
+
*
|
|
3194
|
+
* @remarks
|
|
3195
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3196
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3197
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3198
|
+
* with `updateOptions`.
|
|
3199
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3200
|
+
* it sets its own.
|
|
3201
|
+
*
|
|
3190
3202
|
* @interface
|
|
3191
3203
|
*/
|
|
3192
3204
|
declare type ChromiumPolicies = {
|
|
@@ -4616,7 +4628,7 @@ declare type CreateLayoutOptions = {
|
|
|
4616
4628
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4617
4629
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4618
4630
|
*
|
|
4619
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4631
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4620
4632
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4621
4633
|
*
|
|
4622
4634
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -4940,6 +4952,31 @@ declare type DisplayMetadata = {
|
|
|
4940
4952
|
readonly glyph?: string;
|
|
4941
4953
|
};
|
|
4942
4954
|
|
|
4955
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
4956
|
+
|
|
4957
|
+
/**
|
|
4958
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
4959
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
4960
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
4961
|
+
* `run-requested` on that application instead.
|
|
4962
|
+
*
|
|
4963
|
+
* By default, the platform provider handles this event in
|
|
4964
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
4965
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
4966
|
+
* @interface
|
|
4967
|
+
*/
|
|
4968
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
4969
|
+
type: 'dock-icon-clicked';
|
|
4970
|
+
/**
|
|
4971
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
4972
|
+
*/
|
|
4973
|
+
hasVisibleWindows: boolean;
|
|
4974
|
+
/**
|
|
4975
|
+
* UUID of the application the runtime was started with, if any.
|
|
4976
|
+
*/
|
|
4977
|
+
uuid?: string;
|
|
4978
|
+
};
|
|
4979
|
+
|
|
4943
4980
|
/**
|
|
4944
4981
|
* @interface
|
|
4945
4982
|
*
|
|
@@ -5451,13 +5488,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5451
5488
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5452
5489
|
* from which they propagate).
|
|
5453
5490
|
*/
|
|
5454
|
-
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;
|
|
5491
|
+
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;
|
|
5455
5492
|
|
|
5456
5493
|
/**
|
|
5457
5494
|
* [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.
|
|
5458
5495
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5459
5496
|
*/
|
|
5460
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5497
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5461
5498
|
|
|
5462
5499
|
/**
|
|
5463
5500
|
* [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
|
|
@@ -8569,6 +8606,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8569
8606
|
* * layout-state-changed
|
|
8570
8607
|
* * tab-closed
|
|
8571
8608
|
* * tab-dropped
|
|
8609
|
+
* * tab-pinned-changed
|
|
8572
8610
|
*
|
|
8573
8611
|
* ### Layout DOM Node Events
|
|
8574
8612
|
*
|
|
@@ -8643,6 +8681,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8643
8681
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8644
8682
|
* }
|
|
8645
8683
|
* ```
|
|
8684
|
+
*
|
|
8685
|
+
* #### tab-pinned-changed
|
|
8686
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8687
|
+
* ```js
|
|
8688
|
+
* // The response has the following shape in event.detail:
|
|
8689
|
+
* {
|
|
8690
|
+
* containerSelector: "container-component_A",
|
|
8691
|
+
* name: "component_A",
|
|
8692
|
+
* tabSelector: "tab-component_A",
|
|
8693
|
+
* topic: "openfin-DOM-event",
|
|
8694
|
+
* type: "tab-pinned-changed",
|
|
8695
|
+
* uuid: "OpenFin POC",
|
|
8696
|
+
* pinned: true
|
|
8697
|
+
* }
|
|
8698
|
+
* ```
|
|
8646
8699
|
*/
|
|
8647
8700
|
declare class Layout extends Base {
|
|
8648
8701
|
#private;
|
|
@@ -8833,6 +8886,27 @@ declare class Layout extends Base {
|
|
|
8833
8886
|
* @returns A promise that resolves when the view is closed.
|
|
8834
8887
|
*/
|
|
8835
8888
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8889
|
+
/**
|
|
8890
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8891
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8892
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8893
|
+
* event when the pin state changes.
|
|
8894
|
+
*
|
|
8895
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8896
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8897
|
+
*
|
|
8898
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8899
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8900
|
+
*
|
|
8901
|
+
* @example
|
|
8902
|
+
* ```js
|
|
8903
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8904
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8905
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8906
|
+
* ```
|
|
8907
|
+
* @experimental
|
|
8908
|
+
*/
|
|
8909
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8836
8910
|
}
|
|
8837
8911
|
|
|
8838
8912
|
/**
|
|
@@ -8875,6 +8949,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8875
8949
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8876
8950
|
*/
|
|
8877
8951
|
componentState?: Partial<ViewCreationOptions>;
|
|
8952
|
+
/**
|
|
8953
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8954
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8955
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8956
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8957
|
+
*
|
|
8958
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8959
|
+
*/
|
|
8960
|
+
pinned?: boolean;
|
|
8878
8961
|
type: 'component';
|
|
8879
8962
|
};
|
|
8880
8963
|
|
|
@@ -8917,6 +9000,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8917
9000
|
TabDroppedEvent,
|
|
8918
9001
|
ContainerCreatedEvent,
|
|
8919
9002
|
LayoutStateChangedEvent,
|
|
9003
|
+
TabPinnedChangedEvent,
|
|
8920
9004
|
Event_12 as Event,
|
|
8921
9005
|
EventType_9 as EventType,
|
|
8922
9006
|
Payload_11 as Payload,
|
|
@@ -8945,6 +9029,7 @@ declare type LayoutEntitiesController = {
|
|
|
8945
9029
|
edge: OpenFin_2.LayoutPosition;
|
|
8946
9030
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
8947
9031
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9032
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
8948
9033
|
};
|
|
8949
9034
|
|
|
8950
9035
|
/**
|
|
@@ -9372,6 +9457,21 @@ declare type LayoutOptions = {
|
|
|
9372
9457
|
* @defaultValue 'dropdown'
|
|
9373
9458
|
*/
|
|
9374
9459
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9460
|
+
/**
|
|
9461
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9462
|
+
*
|
|
9463
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9464
|
+
* should not offer pin / unpin.
|
|
9465
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9466
|
+
* may offer pin / unpin.
|
|
9467
|
+
*
|
|
9468
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9469
|
+
*
|
|
9470
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9471
|
+
*
|
|
9472
|
+
* @defaultValue false
|
|
9473
|
+
*/
|
|
9474
|
+
allowUserPinning?: boolean;
|
|
9375
9475
|
};
|
|
9376
9476
|
/**
|
|
9377
9477
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -12823,6 +12923,47 @@ declare interface PlatformProvider {
|
|
|
12823
12923
|
* @returns {Promise<void>}
|
|
12824
12924
|
*/
|
|
12825
12925
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
12926
|
+
/**
|
|
12927
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
12928
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
12929
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
12930
|
+
* Clicks while a previous call is still running are ignored.
|
|
12931
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
12932
|
+
*
|
|
12933
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
12934
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
12935
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
12936
|
+
*
|
|
12937
|
+
* @remarks
|
|
12938
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
12939
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
12940
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
12941
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
12942
|
+
*
|
|
12943
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
12944
|
+
* the default does nothing.
|
|
12945
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
12946
|
+
*
|
|
12947
|
+
* @example
|
|
12948
|
+
*
|
|
12949
|
+
* ```js
|
|
12950
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
12951
|
+
* class Override extends PlatformProvider {
|
|
12952
|
+
* async handleDockIconClicked(payload) {
|
|
12953
|
+
* if (payload.hasVisibleWindows) {
|
|
12954
|
+
* // Bring a window forward instead of doing nothing
|
|
12955
|
+
* return;
|
|
12956
|
+
* }
|
|
12957
|
+
* return super.handleDockIconClicked(payload);
|
|
12958
|
+
* }
|
|
12959
|
+
* }
|
|
12960
|
+
* return new Override();
|
|
12961
|
+
* }
|
|
12962
|
+
*
|
|
12963
|
+
* fin.Platform.init({ overrideCallback });
|
|
12964
|
+
* ```
|
|
12965
|
+
*/
|
|
12966
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
12826
12967
|
/**
|
|
12827
12968
|
* @experimental
|
|
12828
12969
|
*
|
|
@@ -17285,6 +17426,7 @@ declare namespace SystemEvents {
|
|
|
17285
17426
|
AppVersionEventType,
|
|
17286
17427
|
ApplicationCreatedEvent,
|
|
17287
17428
|
DesktopIconClickedEvent,
|
|
17429
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17288
17430
|
ExtensionsEnabledEvent,
|
|
17289
17431
|
ExtensionsDisabledEvent,
|
|
17290
17432
|
ExtensionsExcludedEvent,
|
|
@@ -17414,6 +17556,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17414
17556
|
url: string;
|
|
17415
17557
|
};
|
|
17416
17558
|
|
|
17559
|
+
/**
|
|
17560
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17561
|
+
* The identity is the view whose tab changed.
|
|
17562
|
+
* @interface
|
|
17563
|
+
*/
|
|
17564
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17565
|
+
type: 'tab-pinned-changed';
|
|
17566
|
+
pinned: boolean;
|
|
17567
|
+
};
|
|
17568
|
+
|
|
17417
17569
|
/**
|
|
17418
17570
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17419
17571
|
*/
|
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;
|
|
@@ -3244,6 +3244,18 @@ declare interface ChromeBrowserActions {
|
|
|
3244
3244
|
/**
|
|
3245
3245
|
* Control behavior for Chromium policies
|
|
3246
3246
|
*
|
|
3247
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note,
|
|
3248
|
+
* when a domain setting is actively controlling a url's chromiumPolicies, its view/window options will be ignored, as
|
|
3249
|
+
* a whole: a policy the rule leaves out does not apply, even if the options set it.
|
|
3250
|
+
*
|
|
3251
|
+
* @remarks
|
|
3252
|
+
* - Once a policy has disabled autofill for a Window or View, autofill stays disabled until that Window or View
|
|
3253
|
+
* closes, even if it navigates to a url where the policy does not apply.
|
|
3254
|
+
* - As a window or view option, `chromiumPolicies` is fixed when the Window or View is created: it cannot be changed
|
|
3255
|
+
* with `updateOptions`.
|
|
3256
|
+
* - A Window inherits the `chromiumPolicies` of its application, including those set in `mainWindowOptions`, unless
|
|
3257
|
+
* it sets its own.
|
|
3258
|
+
*
|
|
3247
3259
|
* @interface
|
|
3248
3260
|
*/
|
|
3249
3261
|
declare type ChromiumPolicies = {
|
|
@@ -4723,7 +4735,7 @@ declare type CreateLayoutOptions = {
|
|
|
4723
4735
|
* Custom controls are not serialized into snapshots since callbacks are not
|
|
4724
4736
|
* serializable. The callback is re-invoked when tabs are recreated.
|
|
4725
4737
|
*
|
|
4726
|
-
* **NOTE**: This feature is only supported with layout engine `'v2'`
|
|
4738
|
+
* **NOTE**: This feature is only supported with layout engine `'v2'` and
|
|
4727
4739
|
* `settings.tabOverflowBehavior: 'scroll'`.
|
|
4728
4740
|
*
|
|
4729
4741
|
* Optionally add the `lm_tab_custom_control` class to each injected control as a direct child of
|
|
@@ -5047,6 +5059,31 @@ declare type DisplayMetadata = {
|
|
|
5047
5059
|
readonly glyph?: string;
|
|
5048
5060
|
};
|
|
5049
5061
|
|
|
5062
|
+
declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
|
|
5063
|
+
|
|
5064
|
+
/**
|
|
5065
|
+
* Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
|
|
5066
|
+
* runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
|
|
5067
|
+
* @remarks macOS only. On Windows and Linux, launching an application that is already running raises
|
|
5068
|
+
* `run-requested` on that application instead.
|
|
5069
|
+
*
|
|
5070
|
+
* By default, the platform provider handles this event in
|
|
5071
|
+
* {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
|
|
5072
|
+
* platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
|
|
5073
|
+
* @interface
|
|
5074
|
+
*/
|
|
5075
|
+
declare type DockIconClickedEvent_2 = BaseEvent_9 & {
|
|
5076
|
+
type: 'dock-icon-clicked';
|
|
5077
|
+
/**
|
|
5078
|
+
* Whether macOS found any visible windows in this runtime. Hidden windows do not count.
|
|
5079
|
+
*/
|
|
5080
|
+
hasVisibleWindows: boolean;
|
|
5081
|
+
/**
|
|
5082
|
+
* UUID of the application the runtime was started with, if any.
|
|
5083
|
+
*/
|
|
5084
|
+
uuid?: string;
|
|
5085
|
+
};
|
|
5086
|
+
|
|
5050
5087
|
/**
|
|
5051
5088
|
* @interface
|
|
5052
5089
|
*
|
|
@@ -5563,13 +5600,13 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
|
|
|
5563
5600
|
* under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
|
|
5564
5601
|
* from which they propagate).
|
|
5565
5602
|
*/
|
|
5566
|
-
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;
|
|
5603
|
+
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;
|
|
5567
5604
|
|
|
5568
5605
|
/**
|
|
5569
5606
|
* [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.
|
|
5570
5607
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5571
5608
|
*/
|
|
5572
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5609
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5573
5610
|
|
|
5574
5611
|
/**
|
|
5575
5612
|
* [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
|
|
@@ -8740,6 +8777,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8740
8777
|
* * layout-state-changed
|
|
8741
8778
|
* * tab-closed
|
|
8742
8779
|
* * tab-dropped
|
|
8780
|
+
* * tab-pinned-changed
|
|
8743
8781
|
*
|
|
8744
8782
|
* ### Layout DOM Node Events
|
|
8745
8783
|
*
|
|
@@ -8814,6 +8852,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8814
8852
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8815
8853
|
* }
|
|
8816
8854
|
* ```
|
|
8855
|
+
*
|
|
8856
|
+
* #### tab-pinned-changed
|
|
8857
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8858
|
+
* ```js
|
|
8859
|
+
* // The response has the following shape in event.detail:
|
|
8860
|
+
* {
|
|
8861
|
+
* containerSelector: "container-component_A",
|
|
8862
|
+
* name: "component_A",
|
|
8863
|
+
* tabSelector: "tab-component_A",
|
|
8864
|
+
* topic: "openfin-DOM-event",
|
|
8865
|
+
* type: "tab-pinned-changed",
|
|
8866
|
+
* uuid: "OpenFin POC",
|
|
8867
|
+
* pinned: true
|
|
8868
|
+
* }
|
|
8869
|
+
* ```
|
|
8817
8870
|
*/
|
|
8818
8871
|
declare class Layout extends Base {
|
|
8819
8872
|
#private;
|
|
@@ -9013,6 +9066,27 @@ declare class Layout extends Base {
|
|
|
9013
9066
|
* @returns A promise that resolves when the view is closed.
|
|
9014
9067
|
*/
|
|
9015
9068
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
9069
|
+
/**
|
|
9070
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
9071
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
9072
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
9073
|
+
* event when the pin state changes.
|
|
9074
|
+
*
|
|
9075
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9076
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
9077
|
+
*
|
|
9078
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
9079
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
9080
|
+
*
|
|
9081
|
+
* @example
|
|
9082
|
+
* ```js
|
|
9083
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
9084
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
9085
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
9086
|
+
* ```
|
|
9087
|
+
* @experimental
|
|
9088
|
+
*/
|
|
9089
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
9016
9090
|
}
|
|
9017
9091
|
|
|
9018
9092
|
/**
|
|
@@ -9055,6 +9129,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
9055
9129
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
9056
9130
|
*/
|
|
9057
9131
|
componentState?: Partial<ViewCreationOptions>;
|
|
9132
|
+
/**
|
|
9133
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9134
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9135
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9136
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9137
|
+
*
|
|
9138
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9139
|
+
*/
|
|
9140
|
+
pinned?: boolean;
|
|
9058
9141
|
type: 'component';
|
|
9059
9142
|
};
|
|
9060
9143
|
|
|
@@ -9097,6 +9180,7 @@ declare namespace LayoutDOMEvents {
|
|
|
9097
9180
|
TabDroppedEvent,
|
|
9098
9181
|
ContainerCreatedEvent,
|
|
9099
9182
|
LayoutStateChangedEvent,
|
|
9183
|
+
TabPinnedChangedEvent,
|
|
9100
9184
|
Event_12 as Event,
|
|
9101
9185
|
EventType_9 as EventType,
|
|
9102
9186
|
Payload_11 as Payload,
|
|
@@ -9125,6 +9209,7 @@ declare type LayoutEntitiesController = {
|
|
|
9125
9209
|
edge: OpenFin_2.LayoutPosition;
|
|
9126
9210
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9127
9211
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9212
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9128
9213
|
};
|
|
9129
9214
|
|
|
9130
9215
|
/**
|
|
@@ -9735,6 +9820,21 @@ declare type LayoutOptions = {
|
|
|
9735
9820
|
* @defaultValue 'dropdown'
|
|
9736
9821
|
*/
|
|
9737
9822
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9823
|
+
/**
|
|
9824
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9825
|
+
*
|
|
9826
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9827
|
+
* should not offer pin / unpin.
|
|
9828
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9829
|
+
* may offer pin / unpin.
|
|
9830
|
+
*
|
|
9831
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9832
|
+
*
|
|
9833
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9834
|
+
*
|
|
9835
|
+
* @defaultValue false
|
|
9836
|
+
*/
|
|
9837
|
+
allowUserPinning?: boolean;
|
|
9738
9838
|
};
|
|
9739
9839
|
/**
|
|
9740
9840
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -13300,6 +13400,47 @@ declare interface PlatformProvider {
|
|
|
13300
13400
|
* @returns {Promise<void>}
|
|
13301
13401
|
*/
|
|
13302
13402
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
13403
|
+
/**
|
|
13404
|
+
* Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
|
|
13405
|
+
* Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
|
|
13406
|
+
* `appManifestUrl`) has finished launching or failed to.
|
|
13407
|
+
* Clicks while a previous call is still running are ignored.
|
|
13408
|
+
* Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
|
|
13409
|
+
*
|
|
13410
|
+
* By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
|
|
13411
|
+
* calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
|
|
13412
|
+
* and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
|
|
13413
|
+
*
|
|
13414
|
+
* @remarks
|
|
13415
|
+
* The default `handleRunRequested` reopens the manifest's snapshot through
|
|
13416
|
+
* {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
|
|
13417
|
+
* `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
|
|
13418
|
+
* Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
|
|
13419
|
+
*
|
|
13420
|
+
* macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
|
|
13421
|
+
* the default does nothing.
|
|
13422
|
+
* @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
|
|
13423
|
+
*
|
|
13424
|
+
* @example
|
|
13425
|
+
*
|
|
13426
|
+
* ```js
|
|
13427
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
13428
|
+
* class Override extends PlatformProvider {
|
|
13429
|
+
* async handleDockIconClicked(payload) {
|
|
13430
|
+
* if (payload.hasVisibleWindows) {
|
|
13431
|
+
* // Bring a window forward instead of doing nothing
|
|
13432
|
+
* return;
|
|
13433
|
+
* }
|
|
13434
|
+
* return super.handleDockIconClicked(payload);
|
|
13435
|
+
* }
|
|
13436
|
+
* }
|
|
13437
|
+
* return new Override();
|
|
13438
|
+
* }
|
|
13439
|
+
*
|
|
13440
|
+
* fin.Platform.init({ overrideCallback });
|
|
13441
|
+
* ```
|
|
13442
|
+
*/
|
|
13443
|
+
handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
|
|
13303
13444
|
/**
|
|
13304
13445
|
* @experimental
|
|
13305
13446
|
*
|
|
@@ -17776,6 +17917,7 @@ declare namespace SystemEvents {
|
|
|
17776
17917
|
AppVersionEventWithId,
|
|
17777
17918
|
ApplicationCreatedEvent,
|
|
17778
17919
|
DesktopIconClickedEvent,
|
|
17920
|
+
DockIconClickedEvent_2 as DockIconClickedEvent,
|
|
17779
17921
|
SystemShutdownEvent,
|
|
17780
17922
|
ExtensionsEnabledEvent,
|
|
17781
17923
|
ExtensionsDisabledEvent,
|
|
@@ -17912,6 +18054,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17912
18054
|
url: string;
|
|
17913
18055
|
};
|
|
17914
18056
|
|
|
18057
|
+
/**
|
|
18058
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
18059
|
+
* The identity is the view whose tab changed.
|
|
18060
|
+
* @interface
|
|
18061
|
+
*/
|
|
18062
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
18063
|
+
type: 'tab-pinned-changed';
|
|
18064
|
+
pinned: boolean;
|
|
18065
|
+
};
|
|
18066
|
+
|
|
17915
18067
|
/**
|
|
17916
18068
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17917
18069
|
*/
|
package/out/stub.js
CHANGED
|
@@ -11689,6 +11689,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11689
11689
|
* * layout-state-changed
|
|
11690
11690
|
* * tab-closed
|
|
11691
11691
|
* * tab-dropped
|
|
11692
|
+
* * tab-pinned-changed
|
|
11692
11693
|
*
|
|
11693
11694
|
* ### Layout DOM Node Events
|
|
11694
11695
|
*
|
|
@@ -11763,6 +11764,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11763
11764
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11764
11765
|
* }
|
|
11765
11766
|
* ```
|
|
11767
|
+
*
|
|
11768
|
+
* #### tab-pinned-changed
|
|
11769
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11770
|
+
* ```js
|
|
11771
|
+
* // The response has the following shape in event.detail:
|
|
11772
|
+
* {
|
|
11773
|
+
* containerSelector: "container-component_A",
|
|
11774
|
+
* name: "component_A",
|
|
11775
|
+
* tabSelector: "tab-component_A",
|
|
11776
|
+
* topic: "openfin-DOM-event",
|
|
11777
|
+
* type: "tab-pinned-changed",
|
|
11778
|
+
* uuid: "OpenFin POC",
|
|
11779
|
+
* pinned: true
|
|
11780
|
+
* }
|
|
11781
|
+
* ```
|
|
11766
11782
|
*/
|
|
11767
11783
|
class Layout extends Base {
|
|
11768
11784
|
/**
|
|
@@ -12050,6 +12066,33 @@ class Layout extends Base {
|
|
|
12050
12066
|
});
|
|
12051
12067
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12052
12068
|
}
|
|
12069
|
+
/**
|
|
12070
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12071
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12072
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12073
|
+
* event when the pin state changes.
|
|
12074
|
+
*
|
|
12075
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12076
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12077
|
+
*
|
|
12078
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12079
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12080
|
+
*
|
|
12081
|
+
* @example
|
|
12082
|
+
* ```js
|
|
12083
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12084
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12085
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12086
|
+
* ```
|
|
12087
|
+
* @experimental
|
|
12088
|
+
*/
|
|
12089
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12090
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12091
|
+
// don't expose
|
|
12092
|
+
});
|
|
12093
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12094
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12095
|
+
}
|
|
12053
12096
|
}
|
|
12054
12097
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12055
12098
|
/**
|
package/out/stub.mjs
CHANGED
|
@@ -11686,6 +11686,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11686
11686
|
* * layout-state-changed
|
|
11687
11687
|
* * tab-closed
|
|
11688
11688
|
* * tab-dropped
|
|
11689
|
+
* * tab-pinned-changed
|
|
11689
11690
|
*
|
|
11690
11691
|
* ### Layout DOM Node Events
|
|
11691
11692
|
*
|
|
@@ -11760,6 +11761,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11760
11761
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11761
11762
|
* }
|
|
11762
11763
|
* ```
|
|
11764
|
+
*
|
|
11765
|
+
* #### tab-pinned-changed
|
|
11766
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11767
|
+
* ```js
|
|
11768
|
+
* // The response has the following shape in event.detail:
|
|
11769
|
+
* {
|
|
11770
|
+
* containerSelector: "container-component_A",
|
|
11771
|
+
* name: "component_A",
|
|
11772
|
+
* tabSelector: "tab-component_A",
|
|
11773
|
+
* topic: "openfin-DOM-event",
|
|
11774
|
+
* type: "tab-pinned-changed",
|
|
11775
|
+
* uuid: "OpenFin POC",
|
|
11776
|
+
* pinned: true
|
|
11777
|
+
* }
|
|
11778
|
+
* ```
|
|
11763
11779
|
*/
|
|
11764
11780
|
class Layout extends Base {
|
|
11765
11781
|
/**
|
|
@@ -12047,6 +12063,33 @@ class Layout extends Base {
|
|
|
12047
12063
|
});
|
|
12048
12064
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12049
12065
|
}
|
|
12066
|
+
/**
|
|
12067
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12068
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12069
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12070
|
+
* event when the pin state changes.
|
|
12071
|
+
*
|
|
12072
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12073
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12074
|
+
*
|
|
12075
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12076
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12077
|
+
*
|
|
12078
|
+
* @example
|
|
12079
|
+
* ```js
|
|
12080
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12081
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12082
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12083
|
+
* ```
|
|
12084
|
+
* @experimental
|
|
12085
|
+
*/
|
|
12086
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12087
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12088
|
+
// don't expose
|
|
12089
|
+
});
|
|
12090
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12091
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12092
|
+
}
|
|
12050
12093
|
}
|
|
12051
12094
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12052
12095
|
/**
|