@openfin/fdc3-api 40.82.21 → 40.82.22

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.
@@ -8023,6 +8023,29 @@ declare class Layout extends Base {
8023
8023
  * ```
8024
8024
  */
8025
8025
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8026
+ /**
8027
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8028
+ *
8029
+ * @param viewOptions - The options for creating the view.
8030
+ * @param options - Optional parameters for adding the view.
8031
+ * @param options.location - The location where the view should be added.
8032
+ * @param options.targetView - The target view to which the new view should be added.
8033
+ * @returns A promise that resolves to an object containing the identity of the added view.
8034
+ */
8035
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8036
+ location?: OpenFin.CreateViewTarget['location'];
8037
+ targetView?: OpenFin.Identity;
8038
+ }): Promise<{
8039
+ identity: OpenFin.Identity;
8040
+ }>;
8041
+ /**
8042
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8043
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8044
+ *
8045
+ * @param viewIdentity - The identity of the view to close.
8046
+ * @returns A promise that resolves when the view is closed.
8047
+ */
8048
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8026
8049
  }
8027
8050
 
8028
8051
  /**
@@ -8035,7 +8058,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8035
8058
  /**
8036
8059
  * @interface
8037
8060
  */
8038
- declare type LayoutComponent = LayoutItemConfig & {
8061
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8039
8062
  /**
8040
8063
  * Only a component type will have this property and it should be set to view.
8041
8064
  */
@@ -8044,6 +8067,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8044
8067
  * Only a component type will have this property and it represents the view options of a given component.
8045
8068
  */
8046
8069
  componentState?: Partial<ViewCreationOptions>;
8070
+ type: 'component';
8047
8071
  };
8048
8072
 
8049
8073
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8235,7 +8259,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8235
8259
  /**
8236
8260
  * @experimental
8237
8261
  */
8238
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8262
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8239
8263
  /**
8240
8264
  * @experimental
8241
8265
  */
@@ -8023,6 +8023,29 @@ declare class Layout extends Base {
8023
8023
  * ```
8024
8024
  */
8025
8025
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8026
+ /**
8027
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8028
+ *
8029
+ * @param viewOptions - The options for creating the view.
8030
+ * @param options - Optional parameters for adding the view.
8031
+ * @param options.location - The location where the view should be added.
8032
+ * @param options.targetView - The target view to which the new view should be added.
8033
+ * @returns A promise that resolves to an object containing the identity of the added view.
8034
+ */
8035
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8036
+ location?: OpenFin.CreateViewTarget['location'];
8037
+ targetView?: OpenFin.Identity;
8038
+ }): Promise<{
8039
+ identity: OpenFin.Identity;
8040
+ }>;
8041
+ /**
8042
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8043
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8044
+ *
8045
+ * @param viewIdentity - The identity of the view to close.
8046
+ * @returns A promise that resolves when the view is closed.
8047
+ */
8048
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8026
8049
  }
8027
8050
 
8028
8051
  /**
@@ -8035,7 +8058,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8035
8058
  /**
8036
8059
  * @interface
8037
8060
  */
8038
- declare type LayoutComponent = LayoutItemConfig & {
8061
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8039
8062
  /**
8040
8063
  * Only a component type will have this property and it should be set to view.
8041
8064
  */
@@ -8044,6 +8067,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8044
8067
  * Only a component type will have this property and it represents the view options of a given component.
8045
8068
  */
8046
8069
  componentState?: Partial<ViewCreationOptions>;
8070
+ type: 'component';
8047
8071
  };
8048
8072
 
8049
8073
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8235,7 +8259,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8235
8259
  /**
8236
8260
  * @experimental
8237
8261
  */
8238
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8262
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8239
8263
  /**
8240
8264
  * @experimental
8241
8265
  */
@@ -8023,6 +8023,29 @@ declare class Layout extends Base {
8023
8023
  * ```
8024
8024
  */
8025
8025
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8026
+ /**
8027
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8028
+ *
8029
+ * @param viewOptions - The options for creating the view.
8030
+ * @param options - Optional parameters for adding the view.
8031
+ * @param options.location - The location where the view should be added.
8032
+ * @param options.targetView - The target view to which the new view should be added.
8033
+ * @returns A promise that resolves to an object containing the identity of the added view.
8034
+ */
8035
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8036
+ location?: OpenFin.CreateViewTarget['location'];
8037
+ targetView?: OpenFin.Identity;
8038
+ }): Promise<{
8039
+ identity: OpenFin.Identity;
8040
+ }>;
8041
+ /**
8042
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8043
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8044
+ *
8045
+ * @param viewIdentity - The identity of the view to close.
8046
+ * @returns A promise that resolves when the view is closed.
8047
+ */
8048
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8026
8049
  }
8027
8050
 
8028
8051
  /**
@@ -8035,7 +8058,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8035
8058
  /**
8036
8059
  * @interface
8037
8060
  */
8038
- declare type LayoutComponent = LayoutItemConfig & {
8061
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8039
8062
  /**
8040
8063
  * Only a component type will have this property and it should be set to view.
8041
8064
  */
@@ -8044,6 +8067,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8044
8067
  * Only a component type will have this property and it represents the view options of a given component.
8045
8068
  */
8046
8069
  componentState?: Partial<ViewCreationOptions>;
8070
+ type: 'component';
8047
8071
  };
8048
8072
 
8049
8073
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8235,7 +8259,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8235
8259
  /**
8236
8260
  * @experimental
8237
8261
  */
8238
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8262
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8239
8263
  /**
8240
8264
  * @experimental
8241
8265
  */
package/out/fdc3-api.d.ts CHANGED
@@ -8149,6 +8149,29 @@ declare class Layout extends Base {
8149
8149
  * ```
8150
8150
  */
8151
8151
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8152
+ /**
8153
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8154
+ *
8155
+ * @param viewOptions - The options for creating the view.
8156
+ * @param options - Optional parameters for adding the view.
8157
+ * @param options.location - The location where the view should be added.
8158
+ * @param options.targetView - The target view to which the new view should be added.
8159
+ * @returns A promise that resolves to an object containing the identity of the added view.
8160
+ */
8161
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8162
+ location?: OpenFin.CreateViewTarget['location'];
8163
+ targetView?: OpenFin.Identity;
8164
+ }): Promise<{
8165
+ identity: OpenFin.Identity;
8166
+ }>;
8167
+ /**
8168
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8169
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8170
+ *
8171
+ * @param viewIdentity - The identity of the view to close.
8172
+ * @returns A promise that resolves when the view is closed.
8173
+ */
8174
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8152
8175
  }
8153
8176
 
8154
8177
  /**
@@ -8161,7 +8184,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8161
8184
  /**
8162
8185
  * @interface
8163
8186
  */
8164
- declare type LayoutComponent = LayoutItemConfig & {
8187
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8165
8188
  /**
8166
8189
  * Only a component type will have this property and it should be set to view.
8167
8190
  */
@@ -8170,6 +8193,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8170
8193
  * Only a component type will have this property and it represents the view options of a given component.
8171
8194
  */
8172
8195
  componentState?: Partial<ViewCreationOptions>;
8196
+ type: 'component';
8173
8197
  };
8174
8198
 
8175
8199
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8361,7 +8385,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8361
8385
  /**
8362
8386
  * @experimental
8363
8387
  */
8364
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8388
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8365
8389
  /**
8366
8390
  * @experimental
8367
8391
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "40.82.21",
3
+ "version": "40.82.22",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,