@openfin/core 47.100.57 → 47.100.59
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 +88 -3
- package/out/mock-beta.d.ts +88 -3
- package/out/mock-public.d.ts +88 -3
- package/out/stub.d.ts +88 -3
- 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;
|
|
@@ -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
|
|
@@ -5514,7 +5526,7 @@ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>>
|
|
|
5514
5526
|
* [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
5527
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5528
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5529
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5530
|
|
|
5519
5531
|
/**
|
|
5520
5532
|
* [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
|
|
@@ -8631,6 +8643,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8643
|
* * layout-state-changed
|
|
8632
8644
|
* * tab-closed
|
|
8633
8645
|
* * tab-dropped
|
|
8646
|
+
* * tab-pinned-changed
|
|
8634
8647
|
*
|
|
8635
8648
|
* ### Layout DOM Node Events
|
|
8636
8649
|
*
|
|
@@ -8705,6 +8718,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8718
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8719
|
* }
|
|
8707
8720
|
* ```
|
|
8721
|
+
*
|
|
8722
|
+
* #### tab-pinned-changed
|
|
8723
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8724
|
+
* ```js
|
|
8725
|
+
* // The response has the following shape in event.detail:
|
|
8726
|
+
* {
|
|
8727
|
+
* containerSelector: "container-component_A",
|
|
8728
|
+
* name: "component_A",
|
|
8729
|
+
* tabSelector: "tab-component_A",
|
|
8730
|
+
* topic: "openfin-DOM-event",
|
|
8731
|
+
* type: "tab-pinned-changed",
|
|
8732
|
+
* uuid: "OpenFin POC",
|
|
8733
|
+
* pinned: true
|
|
8734
|
+
* }
|
|
8735
|
+
* ```
|
|
8708
8736
|
*/
|
|
8709
8737
|
declare class Layout extends Base {
|
|
8710
8738
|
#private;
|
|
@@ -8895,6 +8923,27 @@ declare class Layout extends Base {
|
|
|
8895
8923
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8924
|
*/
|
|
8897
8925
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8926
|
+
/**
|
|
8927
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8928
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8929
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8930
|
+
* event when the pin state changes.
|
|
8931
|
+
*
|
|
8932
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8933
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8934
|
+
*
|
|
8935
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8936
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8937
|
+
*
|
|
8938
|
+
* @example
|
|
8939
|
+
* ```js
|
|
8940
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8941
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8942
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8943
|
+
* ```
|
|
8944
|
+
* @experimental
|
|
8945
|
+
*/
|
|
8946
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8947
|
}
|
|
8899
8948
|
|
|
8900
8949
|
/**
|
|
@@ -8937,6 +8986,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
8986
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
8987
|
*/
|
|
8939
8988
|
componentState?: Partial<ViewCreationOptions>;
|
|
8989
|
+
/**
|
|
8990
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8991
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8992
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8993
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8994
|
+
*
|
|
8995
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8996
|
+
*/
|
|
8997
|
+
pinned?: boolean;
|
|
8940
8998
|
type: 'component';
|
|
8941
8999
|
};
|
|
8942
9000
|
|
|
@@ -8979,6 +9037,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9037
|
TabDroppedEvent,
|
|
8980
9038
|
ContainerCreatedEvent,
|
|
8981
9039
|
LayoutStateChangedEvent,
|
|
9040
|
+
TabPinnedChangedEvent,
|
|
8982
9041
|
Event_12 as Event,
|
|
8983
9042
|
EventType_9 as EventType,
|
|
8984
9043
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9066,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9066
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9067
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9068
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9069
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9070
|
};
|
|
9011
9071
|
|
|
9012
9072
|
/**
|
|
@@ -9434,6 +9494,21 @@ declare type LayoutOptions = {
|
|
|
9434
9494
|
* @defaultValue 'dropdown'
|
|
9435
9495
|
*/
|
|
9436
9496
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9497
|
+
/**
|
|
9498
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9499
|
+
*
|
|
9500
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9501
|
+
* should not offer pin / unpin.
|
|
9502
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9503
|
+
* may offer pin / unpin.
|
|
9504
|
+
*
|
|
9505
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9506
|
+
*
|
|
9507
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9508
|
+
*
|
|
9509
|
+
* @defaultValue false
|
|
9510
|
+
*/
|
|
9511
|
+
allowUserPinning?: boolean;
|
|
9437
9512
|
};
|
|
9438
9513
|
/**
|
|
9439
9514
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -17487,6 +17562,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17562
|
url: string;
|
|
17488
17563
|
};
|
|
17489
17564
|
|
|
17565
|
+
/**
|
|
17566
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17567
|
+
* The identity is the view whose tab changed.
|
|
17568
|
+
* @interface
|
|
17569
|
+
*/
|
|
17570
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17571
|
+
type: 'tab-pinned-changed';
|
|
17572
|
+
pinned: boolean;
|
|
17573
|
+
};
|
|
17574
|
+
|
|
17490
17575
|
/**
|
|
17491
17576
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17577
|
*/
|
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
|
|
@@ -5514,7 +5526,7 @@ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>>
|
|
|
5514
5526
|
* [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
5527
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5528
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5529
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5530
|
|
|
5519
5531
|
/**
|
|
5520
5532
|
* [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
|
|
@@ -8631,6 +8643,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8643
|
* * layout-state-changed
|
|
8632
8644
|
* * tab-closed
|
|
8633
8645
|
* * tab-dropped
|
|
8646
|
+
* * tab-pinned-changed
|
|
8634
8647
|
*
|
|
8635
8648
|
* ### Layout DOM Node Events
|
|
8636
8649
|
*
|
|
@@ -8705,6 +8718,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8718
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8719
|
* }
|
|
8707
8720
|
* ```
|
|
8721
|
+
*
|
|
8722
|
+
* #### tab-pinned-changed
|
|
8723
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8724
|
+
* ```js
|
|
8725
|
+
* // The response has the following shape in event.detail:
|
|
8726
|
+
* {
|
|
8727
|
+
* containerSelector: "container-component_A",
|
|
8728
|
+
* name: "component_A",
|
|
8729
|
+
* tabSelector: "tab-component_A",
|
|
8730
|
+
* topic: "openfin-DOM-event",
|
|
8731
|
+
* type: "tab-pinned-changed",
|
|
8732
|
+
* uuid: "OpenFin POC",
|
|
8733
|
+
* pinned: true
|
|
8734
|
+
* }
|
|
8735
|
+
* ```
|
|
8708
8736
|
*/
|
|
8709
8737
|
declare class Layout extends Base {
|
|
8710
8738
|
#private;
|
|
@@ -8895,6 +8923,27 @@ declare class Layout extends Base {
|
|
|
8895
8923
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8924
|
*/
|
|
8897
8925
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8926
|
+
/**
|
|
8927
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8928
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8929
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8930
|
+
* event when the pin state changes.
|
|
8931
|
+
*
|
|
8932
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8933
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8934
|
+
*
|
|
8935
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8936
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8937
|
+
*
|
|
8938
|
+
* @example
|
|
8939
|
+
* ```js
|
|
8940
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8941
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8942
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8943
|
+
* ```
|
|
8944
|
+
* @experimental
|
|
8945
|
+
*/
|
|
8946
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8947
|
}
|
|
8899
8948
|
|
|
8900
8949
|
/**
|
|
@@ -8937,6 +8986,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
8986
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
8987
|
*/
|
|
8939
8988
|
componentState?: Partial<ViewCreationOptions>;
|
|
8989
|
+
/**
|
|
8990
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8991
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8992
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8993
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8994
|
+
*
|
|
8995
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8996
|
+
*/
|
|
8997
|
+
pinned?: boolean;
|
|
8940
8998
|
type: 'component';
|
|
8941
8999
|
};
|
|
8942
9000
|
|
|
@@ -8979,6 +9037,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9037
|
TabDroppedEvent,
|
|
8980
9038
|
ContainerCreatedEvent,
|
|
8981
9039
|
LayoutStateChangedEvent,
|
|
9040
|
+
TabPinnedChangedEvent,
|
|
8982
9041
|
Event_12 as Event,
|
|
8983
9042
|
EventType_9 as EventType,
|
|
8984
9043
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9066,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9066
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9067
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9068
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9069
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9070
|
};
|
|
9011
9071
|
|
|
9012
9072
|
/**
|
|
@@ -9434,6 +9494,21 @@ declare type LayoutOptions = {
|
|
|
9434
9494
|
* @defaultValue 'dropdown'
|
|
9435
9495
|
*/
|
|
9436
9496
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9497
|
+
/**
|
|
9498
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9499
|
+
*
|
|
9500
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9501
|
+
* should not offer pin / unpin.
|
|
9502
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9503
|
+
* may offer pin / unpin.
|
|
9504
|
+
*
|
|
9505
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9506
|
+
*
|
|
9507
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9508
|
+
*
|
|
9509
|
+
* @defaultValue false
|
|
9510
|
+
*/
|
|
9511
|
+
allowUserPinning?: boolean;
|
|
9437
9512
|
};
|
|
9438
9513
|
/**
|
|
9439
9514
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -17487,6 +17562,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17562
|
url: string;
|
|
17488
17563
|
};
|
|
17489
17564
|
|
|
17565
|
+
/**
|
|
17566
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17567
|
+
* The identity is the view whose tab changed.
|
|
17568
|
+
* @interface
|
|
17569
|
+
*/
|
|
17570
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17571
|
+
type: 'tab-pinned-changed';
|
|
17572
|
+
pinned: boolean;
|
|
17573
|
+
};
|
|
17574
|
+
|
|
17490
17575
|
/**
|
|
17491
17576
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17577
|
*/
|
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
|
|
@@ -5514,7 +5526,7 @@ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>>
|
|
|
5514
5526
|
* [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
5527
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5516
5528
|
*/
|
|
5517
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5529
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5518
5530
|
|
|
5519
5531
|
/**
|
|
5520
5532
|
* [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
|
|
@@ -8631,6 +8643,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8631
8643
|
* * layout-state-changed
|
|
8632
8644
|
* * tab-closed
|
|
8633
8645
|
* * tab-dropped
|
|
8646
|
+
* * tab-pinned-changed
|
|
8634
8647
|
*
|
|
8635
8648
|
* ### Layout DOM Node Events
|
|
8636
8649
|
*
|
|
@@ -8705,6 +8718,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8705
8718
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8706
8719
|
* }
|
|
8707
8720
|
* ```
|
|
8721
|
+
*
|
|
8722
|
+
* #### tab-pinned-changed
|
|
8723
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8724
|
+
* ```js
|
|
8725
|
+
* // The response has the following shape in event.detail:
|
|
8726
|
+
* {
|
|
8727
|
+
* containerSelector: "container-component_A",
|
|
8728
|
+
* name: "component_A",
|
|
8729
|
+
* tabSelector: "tab-component_A",
|
|
8730
|
+
* topic: "openfin-DOM-event",
|
|
8731
|
+
* type: "tab-pinned-changed",
|
|
8732
|
+
* uuid: "OpenFin POC",
|
|
8733
|
+
* pinned: true
|
|
8734
|
+
* }
|
|
8735
|
+
* ```
|
|
8708
8736
|
*/
|
|
8709
8737
|
declare class Layout extends Base {
|
|
8710
8738
|
#private;
|
|
@@ -8895,6 +8923,27 @@ declare class Layout extends Base {
|
|
|
8895
8923
|
* @returns A promise that resolves when the view is closed.
|
|
8896
8924
|
*/
|
|
8897
8925
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8926
|
+
/**
|
|
8927
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
8928
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
8929
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
8930
|
+
* event when the pin state changes.
|
|
8931
|
+
*
|
|
8932
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8933
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
8934
|
+
*
|
|
8935
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
8936
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
8937
|
+
*
|
|
8938
|
+
* @example
|
|
8939
|
+
* ```js
|
|
8940
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
8941
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
8942
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
8943
|
+
* ```
|
|
8944
|
+
* @experimental
|
|
8945
|
+
*/
|
|
8946
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
8898
8947
|
}
|
|
8899
8948
|
|
|
8900
8949
|
/**
|
|
@@ -8937,6 +8986,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
8937
8986
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
8938
8987
|
*/
|
|
8939
8988
|
componentState?: Partial<ViewCreationOptions>;
|
|
8989
|
+
/**
|
|
8990
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
8991
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
8992
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
8993
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
8994
|
+
*
|
|
8995
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
8996
|
+
*/
|
|
8997
|
+
pinned?: boolean;
|
|
8940
8998
|
type: 'component';
|
|
8941
8999
|
};
|
|
8942
9000
|
|
|
@@ -8979,6 +9037,7 @@ declare namespace LayoutDOMEvents {
|
|
|
8979
9037
|
TabDroppedEvent,
|
|
8980
9038
|
ContainerCreatedEvent,
|
|
8981
9039
|
LayoutStateChangedEvent,
|
|
9040
|
+
TabPinnedChangedEvent,
|
|
8982
9041
|
Event_12 as Event,
|
|
8983
9042
|
EventType_9 as EventType,
|
|
8984
9043
|
Payload_11 as Payload,
|
|
@@ -9007,6 +9066,7 @@ declare type LayoutEntitiesController = {
|
|
|
9007
9066
|
edge: OpenFin_2.LayoutPosition;
|
|
9008
9067
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9009
9068
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9069
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9010
9070
|
};
|
|
9011
9071
|
|
|
9012
9072
|
/**
|
|
@@ -9434,6 +9494,21 @@ declare type LayoutOptions = {
|
|
|
9434
9494
|
* @defaultValue 'dropdown'
|
|
9435
9495
|
*/
|
|
9436
9496
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9497
|
+
/**
|
|
9498
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9499
|
+
*
|
|
9500
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9501
|
+
* should not offer pin / unpin.
|
|
9502
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9503
|
+
* may offer pin / unpin.
|
|
9504
|
+
*
|
|
9505
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9506
|
+
*
|
|
9507
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9508
|
+
*
|
|
9509
|
+
* @defaultValue false
|
|
9510
|
+
*/
|
|
9511
|
+
allowUserPinning?: boolean;
|
|
9437
9512
|
};
|
|
9438
9513
|
/**
|
|
9439
9514
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -17487,6 +17562,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
17487
17562
|
url: string;
|
|
17488
17563
|
};
|
|
17489
17564
|
|
|
17565
|
+
/**
|
|
17566
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
17567
|
+
* The identity is the view whose tab changed.
|
|
17568
|
+
* @interface
|
|
17569
|
+
*/
|
|
17570
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
17571
|
+
type: 'tab-pinned-changed';
|
|
17572
|
+
pinned: boolean;
|
|
17573
|
+
};
|
|
17574
|
+
|
|
17490
17575
|
/**
|
|
17491
17576
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
17492
17577
|
*/
|
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
|
|
@@ -5641,7 +5653,7 @@ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>>
|
|
|
5641
5653
|
* [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
5654
|
* Events are discriminated by {@link LayoutDOMEvent.type}.
|
|
5643
5655
|
*/
|
|
5644
|
-
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent;
|
|
5656
|
+
declare type Event_12 = TabCreatedEvent | TabClosedEvent | TabDroppedEvent | ContainerCreatedEvent | LayoutStateChangedEvent | TabPinnedChangedEvent;
|
|
5645
5657
|
|
|
5646
5658
|
/**
|
|
5647
5659
|
* [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
|
|
@@ -8817,6 +8829,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8817
8829
|
* * layout-state-changed
|
|
8818
8830
|
* * tab-closed
|
|
8819
8831
|
* * tab-dropped
|
|
8832
|
+
* * tab-pinned-changed
|
|
8820
8833
|
*
|
|
8821
8834
|
* ### Layout DOM Node Events
|
|
8822
8835
|
*
|
|
@@ -8891,6 +8904,21 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8891
8904
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
8892
8905
|
* }
|
|
8893
8906
|
* ```
|
|
8907
|
+
*
|
|
8908
|
+
* #### tab-pinned-changed
|
|
8909
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
8910
|
+
* ```js
|
|
8911
|
+
* // The response has the following shape in event.detail:
|
|
8912
|
+
* {
|
|
8913
|
+
* containerSelector: "container-component_A",
|
|
8914
|
+
* name: "component_A",
|
|
8915
|
+
* tabSelector: "tab-component_A",
|
|
8916
|
+
* topic: "openfin-DOM-event",
|
|
8917
|
+
* type: "tab-pinned-changed",
|
|
8918
|
+
* uuid: "OpenFin POC",
|
|
8919
|
+
* pinned: true
|
|
8920
|
+
* }
|
|
8921
|
+
* ```
|
|
8894
8922
|
*/
|
|
8895
8923
|
declare class Layout extends Base {
|
|
8896
8924
|
#private;
|
|
@@ -9090,6 +9118,27 @@ declare class Layout extends Base {
|
|
|
9090
9118
|
* @returns A promise that resolves when the view is closed.
|
|
9091
9119
|
*/
|
|
9092
9120
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
9121
|
+
/**
|
|
9122
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
9123
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
9124
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
9125
|
+
* event when the pin state changes.
|
|
9126
|
+
*
|
|
9127
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9128
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
9129
|
+
*
|
|
9130
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
9131
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
9132
|
+
*
|
|
9133
|
+
* @example
|
|
9134
|
+
* ```js
|
|
9135
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
9136
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
9137
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
9138
|
+
* ```
|
|
9139
|
+
* @experimental
|
|
9140
|
+
*/
|
|
9141
|
+
setViewPinned(viewIdentity: OpenFin_2.Identity, pinned: boolean): Promise<void>;
|
|
9093
9142
|
}
|
|
9094
9143
|
|
|
9095
9144
|
/**
|
|
@@ -9132,6 +9181,15 @@ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
|
|
|
9132
9181
|
* Only a component type will have this property and it represents the view options of a given component.
|
|
9133
9182
|
*/
|
|
9134
9183
|
componentState?: Partial<ViewCreationOptions>;
|
|
9184
|
+
/**
|
|
9185
|
+
* **Platforms only.** Pins the tab to the leading pinned area of its stack (sibling to
|
|
9186
|
+
* `componentState`; not a view option). Users cannot drag pinned tabs out of their stack or
|
|
9187
|
+
* into another window; API moves within a layout keep the pin. Unless {@link LayoutOptions.settings allowUserPinning} is true, they also
|
|
9188
|
+
* cannot be closed or reordered. Use {@link Layout#setViewPinned setViewPinned} to change it at runtime.
|
|
9189
|
+
*
|
|
9190
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
9191
|
+
*/
|
|
9192
|
+
pinned?: boolean;
|
|
9135
9193
|
type: 'component';
|
|
9136
9194
|
};
|
|
9137
9195
|
|
|
@@ -9174,6 +9232,7 @@ declare namespace LayoutDOMEvents {
|
|
|
9174
9232
|
TabDroppedEvent,
|
|
9175
9233
|
ContainerCreatedEvent,
|
|
9176
9234
|
LayoutStateChangedEvent,
|
|
9235
|
+
TabPinnedChangedEvent,
|
|
9177
9236
|
Event_12 as Event,
|
|
9178
9237
|
EventType_9 as EventType,
|
|
9179
9238
|
Payload_11 as Payload,
|
|
@@ -9202,6 +9261,7 @@ declare type LayoutEntitiesController = {
|
|
|
9202
9261
|
edge: OpenFin_2.LayoutPosition;
|
|
9203
9262
|
}) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
|
|
9204
9263
|
setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
|
|
9264
|
+
setViewPinned: (viewIdentity: OpenFin_2.Identity, pinned: boolean, layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
9205
9265
|
};
|
|
9206
9266
|
|
|
9207
9267
|
/**
|
|
@@ -9812,6 +9872,21 @@ declare type LayoutOptions = {
|
|
|
9812
9872
|
* @defaultValue 'dropdown'
|
|
9813
9873
|
*/
|
|
9814
9874
|
tabOverflowBehavior?: 'dropdown' | 'scroll';
|
|
9875
|
+
/**
|
|
9876
|
+
* **Platforms only.** Whether pinned tabs ({@link LayoutComponent.pinned}) are managed by the user.
|
|
9877
|
+
*
|
|
9878
|
+
* - `false`: pins are platform-locked. Pinned tabs cannot be closed or reordered, and platform UI
|
|
9879
|
+
* should not offer pin / unpin.
|
|
9880
|
+
* - `true`: pinned tabs can be closed and reordered within the pinned area, and platform UI
|
|
9881
|
+
* may offer pin / unpin.
|
|
9882
|
+
*
|
|
9883
|
+
* {@link Layout#setViewPinned setViewPinned} works in both modes.
|
|
9884
|
+
*
|
|
9885
|
+
* **NOTE**: Only applies with layout engine `'v2'` and `tabOverflowBehavior: 'scroll'`.
|
|
9886
|
+
*
|
|
9887
|
+
* @defaultValue false
|
|
9888
|
+
*/
|
|
9889
|
+
allowUserPinning?: boolean;
|
|
9815
9890
|
};
|
|
9816
9891
|
/**
|
|
9817
9892
|
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
@@ -18000,6 +18075,16 @@ declare type TabDroppedEvent = LayoutDOMEvent & {
|
|
|
18000
18075
|
url: string;
|
|
18001
18076
|
};
|
|
18002
18077
|
|
|
18078
|
+
/**
|
|
18079
|
+
* Generated when a Layout Tab Component was pinned or unpinned via {@link OpenFin.Layout.setViewPinned}.
|
|
18080
|
+
* The identity is the view whose tab changed.
|
|
18081
|
+
* @interface
|
|
18082
|
+
*/
|
|
18083
|
+
declare type TabPinnedChangedEvent = LayoutDOMEvent & {
|
|
18084
|
+
type: 'tab-pinned-changed';
|
|
18085
|
+
pinned: boolean;
|
|
18086
|
+
};
|
|
18087
|
+
|
|
18003
18088
|
/**
|
|
18004
18089
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
18005
18090
|
*/
|
package/out/stub.js
CHANGED
|
@@ -11843,6 +11843,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11843
11843
|
* * layout-state-changed
|
|
11844
11844
|
* * tab-closed
|
|
11845
11845
|
* * tab-dropped
|
|
11846
|
+
* * tab-pinned-changed
|
|
11846
11847
|
*
|
|
11847
11848
|
* ### Layout DOM Node Events
|
|
11848
11849
|
*
|
|
@@ -11917,6 +11918,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11917
11918
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11918
11919
|
* }
|
|
11919
11920
|
* ```
|
|
11921
|
+
*
|
|
11922
|
+
* #### tab-pinned-changed
|
|
11923
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11924
|
+
* ```js
|
|
11925
|
+
* // The response has the following shape in event.detail:
|
|
11926
|
+
* {
|
|
11927
|
+
* containerSelector: "container-component_A",
|
|
11928
|
+
* name: "component_A",
|
|
11929
|
+
* tabSelector: "tab-component_A",
|
|
11930
|
+
* topic: "openfin-DOM-event",
|
|
11931
|
+
* type: "tab-pinned-changed",
|
|
11932
|
+
* uuid: "OpenFin POC",
|
|
11933
|
+
* pinned: true
|
|
11934
|
+
* }
|
|
11935
|
+
* ```
|
|
11920
11936
|
*/
|
|
11921
11937
|
class Layout extends Base {
|
|
11922
11938
|
/**
|
|
@@ -12204,6 +12220,33 @@ class Layout extends Base {
|
|
|
12204
12220
|
});
|
|
12205
12221
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12206
12222
|
}
|
|
12223
|
+
/**
|
|
12224
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12225
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12226
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12227
|
+
* event when the pin state changes.
|
|
12228
|
+
*
|
|
12229
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12230
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12231
|
+
*
|
|
12232
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12233
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12234
|
+
*
|
|
12235
|
+
* @example
|
|
12236
|
+
* ```js
|
|
12237
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12238
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12239
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12240
|
+
* ```
|
|
12241
|
+
* @experimental
|
|
12242
|
+
*/
|
|
12243
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12244
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12245
|
+
// don't expose
|
|
12246
|
+
});
|
|
12247
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12248
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12249
|
+
}
|
|
12207
12250
|
}
|
|
12208
12251
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12209
12252
|
/**
|
package/out/stub.mjs
CHANGED
|
@@ -11840,6 +11840,7 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11840
11840
|
* * layout-state-changed
|
|
11841
11841
|
* * tab-closed
|
|
11842
11842
|
* * tab-dropped
|
|
11843
|
+
* * tab-pinned-changed
|
|
11843
11844
|
*
|
|
11844
11845
|
* ### Layout DOM Node Events
|
|
11845
11846
|
*
|
|
@@ -11914,6 +11915,21 @@ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
|
11914
11915
|
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
11915
11916
|
* }
|
|
11916
11917
|
* ```
|
|
11918
|
+
*
|
|
11919
|
+
* #### tab-pinned-changed
|
|
11920
|
+
* Generated when a tab is pinned or unpinned via {@link Layout#setViewPinned setViewPinned}.
|
|
11921
|
+
* ```js
|
|
11922
|
+
* // The response has the following shape in event.detail:
|
|
11923
|
+
* {
|
|
11924
|
+
* containerSelector: "container-component_A",
|
|
11925
|
+
* name: "component_A",
|
|
11926
|
+
* tabSelector: "tab-component_A",
|
|
11927
|
+
* topic: "openfin-DOM-event",
|
|
11928
|
+
* type: "tab-pinned-changed",
|
|
11929
|
+
* uuid: "OpenFin POC",
|
|
11930
|
+
* pinned: true
|
|
11931
|
+
* }
|
|
11932
|
+
* ```
|
|
11917
11933
|
*/
|
|
11918
11934
|
class Layout extends Base {
|
|
11919
11935
|
/**
|
|
@@ -12201,6 +12217,33 @@ class Layout extends Base {
|
|
|
12201
12217
|
});
|
|
12202
12218
|
await __classPrivateFieldGet$b(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
12203
12219
|
}
|
|
12220
|
+
/**
|
|
12221
|
+
* Pins or unpins a view's tab. When `pinned` is true, the tab moves to the leading pinned area of
|
|
12222
|
+
* its stack and snapshots record it as {@link OpenFin.LayoutComponent.pinned pinned: true}. When
|
|
12223
|
+
* false, it moves to the start of the unpinned tabs. Emits the layout DOM `tab-pinned-changed`
|
|
12224
|
+
* event when the pin state changes.
|
|
12225
|
+
*
|
|
12226
|
+
* @remarks Requires layout engine `'v2'` and `settings.tabOverflowBehavior: 'scroll'`.
|
|
12227
|
+
* Works whether or not `settings.allowUserPinning` is set. Throws if the view does not belong to this layout.
|
|
12228
|
+
*
|
|
12229
|
+
* @param viewIdentity - The identity of the view to pin or unpin.
|
|
12230
|
+
* @param pinned - `true` to pin; `false` to unpin.
|
|
12231
|
+
*
|
|
12232
|
+
* @example
|
|
12233
|
+
* ```js
|
|
12234
|
+
* const layout = fin.Platform.Layout.getCurrentSync();
|
|
12235
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, true);
|
|
12236
|
+
* await layout.setViewPinned({ uuid: fin.me.identity.uuid, name: 'my-view' }, false);
|
|
12237
|
+
* ```
|
|
12238
|
+
* @experimental
|
|
12239
|
+
*/
|
|
12240
|
+
async setViewPinned(viewIdentity, pinned) {
|
|
12241
|
+
this.wire.sendAction('layout-set-view-pinned').catch(() => {
|
|
12242
|
+
// don't expose
|
|
12243
|
+
});
|
|
12244
|
+
const client = await __classPrivateFieldGet$b(this, _Layout_layoutClient, "f").getValue();
|
|
12245
|
+
await client.setViewPinned(viewIdentity, pinned, 'layoutName' in this.identity ? this.identity : undefined);
|
|
12246
|
+
}
|
|
12204
12247
|
}
|
|
12205
12248
|
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
|
12206
12249
|
/**
|