@openfin/workspace-platform 11.0.1 → 11.0.4

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/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  The Workspace Platform Client APIs allow integrators to create their own Workspace platforms.
4
4
 
5
- **This API is [experimental](https://developers.openfin.co/of-docs/docs/experimental-apis).**
6
-
7
5
  ## Installation
8
6
 
9
7
  Run `npm i -E @openfin/workspace-platform`.
@@ -1,7 +1,7 @@
1
1
  export type { Action, DispatchedAction, DispatchedSearchResult, SearchListenerRequest, SearchListenerResponse, SearchProviderInfo, SearchResult, ScoreOrder, SearchTag, SearchProvider, UserInputListener, ResultDispatchListener, SearchResponse } from '../../../search-api/src/index';
2
2
  export type { Workspace } from '../../../common/src/api/workspaces';
3
3
  export type { LayoutExtended, LayoutContentExtended, LayoutSettingsExtended, LayoutContentItemExtended, LayoutComponentExtended, LayoutComponentStateExtended, LayoutStack } from '../../../common/src/utils/layout';
4
- export type { Page, PageLayout, PageLayoutDetails } from '../../../common/src/api/pages/shapes';
4
+ export type { Page, PageLayout, PageLayoutDetails, PanelConfig, PanelConfigHorizontal, PanelConfigVertical, PanelPosition } from '../../../common/src/api/pages/shapes';
5
5
  export { SearchTagBackground, ActionTrigger } from '../../../search-api/src/shapes';
6
6
  export type { ProviderInfo } from './provider';
7
7
  export type { BaseCustomButtonConfig, BaseCustomDropdownConfig, BaseCustomDropdownItem, BaseCustomDropdownItems, CustomActionSpecifier, CustomButtonConfig, CustomDropdownConfig } from '../../../common/src/api/action';
@@ -1,3 +1,3 @@
1
1
  import { CustomActionsMap, InvokeCustomActionRequest } from '..';
2
2
  export declare const initCustomActions: (actions: CustomActionsMap) => void;
3
- export declare const makeInvokeCustomActionInternal: (identity: OpenFin.ApplicationIdentity) => ({ actionId, payload }: InvokeCustomActionRequest) => Promise<any>;
3
+ export declare const makeInvokeCustomActionInternal: ({ actionId, payload }: InvokeCustomActionRequest) => Promise<any>;
@@ -1,4 +1,4 @@
1
1
  import { AttachedPage, ExtendedPanelConfig, PanelConfig } from '../../../common/src/api/pages/shapes';
2
2
  export declare function convertPanelViewOpts(panels: PanelConfig[]): ExtendedPanelConfig[];
3
- export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<import("@openfin/core/src/api/view").View[][]>;
4
- export declare function createPanelViews(panels: PanelConfig[]): Promise<import("@openfin/core/src/api/view").View[]>;
3
+ export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<void>;
4
+ export declare function createPanelViews(panels: PanelConfig[]): Promise<(void | import("@openfin/core/src/api/view").View)[]>;
@@ -290,19 +290,6 @@ export interface CustomButtonActionPayload {
290
290
  /** Screen y-coordinate where custom button should be shown. */
291
291
  y: number;
292
292
  }
293
- /**
294
- * The shape that is used by {@link StoreCustomButtonActionPayload.updateButtonState} method payload parameter in {@link StoreCustomButtonActionPayload}.
295
- */
296
- export interface UpdateStoreCustomButtonStateRequest {
297
- /**
298
- * New title for the primary button.
299
- */
300
- title: string;
301
- /**
302
- * New disabled state for the primary button.
303
- */
304
- disabled?: boolean;
305
- }
306
293
  /**
307
294
  * The shape of the payload that is sent by a store app primary button or secondary button click to a platform custom action handler
308
295
  */
@@ -311,34 +298,11 @@ export interface StoreCustomButtonActionPayload extends Omit<CustomButtonActionP
311
298
  * Invoking application id.
312
299
  */
313
300
  appId: string;
314
- /**
315
- * Callback that allows the update of app's primary button config properties, such as: title and disabled flag.
316
- * Below of `updateButtonState` use in the context of platform custom actions.
317
- *
318
- * ```ts
319
- * WorkspacePlatform.init({
320
- * customActions: {
321
- * 'changeButtonState': async (payload: StoreCustomButtonActionPayload) => {
322
- * await payload.updateButtonState({
323
- * title: 'Disabled Primary Button For 2 Seconds',
324
- * disabled: true
325
- * });
326
- * setTimeout(async () => {
327
- * await payload.updateButtonState({
328
- * disabled: false,
329
- * title: 'Active Test Primary Button'
330
- * });
331
- * }, 2000);
332
- * }
333
- * }
334
- * });
335
- * ```
336
- */
337
- updateButtonState: (updateRequest: UpdateStoreCustomButtonStateRequest) => Promise<void>;
338
301
  /**
339
302
  * callerType - StoreCustomButton type.
340
303
  */
341
304
  callerType: CustomActionCallerType.StoreCustomButton;
305
+ storeFrontProviderId: string;
342
306
  }
343
307
  /**
344
308
  * The shape of the payload sent by a custom dropdown menu item to a custom action handler
@@ -99,18 +99,27 @@ export interface GetSavedPageMetadataPayload {
99
99
  /** The id of the page to get the save state of. */
100
100
  pageId: string;
101
101
  }
102
+ /**
103
+ * Possible positions than a fixed view panel can take.
104
+ */
102
105
  export declare enum PanelPosition {
103
106
  Left = "Left",
104
107
  Right = "Right",
105
108
  Top = "Top",
106
109
  Bottom = "Bottom"
107
110
  }
111
+ /**
112
+ * Properties specific to a horizontal fixed view panel (top or bottom)
113
+ */
108
114
  export interface PanelConfigHorizontal {
109
115
  /** Position of the panel in the page. */
110
116
  position: PanelPosition.Top | PanelPosition.Bottom;
111
117
  /** Size of the top/bottom panel, formatted as CSS property value with units. E.g. "0px", "10%", "3rem". */
112
118
  height: string;
113
119
  }
120
+ /**
121
+ * Properties specific to a vertical fixed view panel (left or right)
122
+ */
114
123
  export interface PanelConfigVertical {
115
124
  /** Position of the panel in the page. */
116
125
  position: PanelPosition.Left | PanelPosition.Right;
@@ -123,6 +132,18 @@ export interface PanelConfigVertical {
123
132
  * thus taking priority over the bottom panel.*/
124
133
  extendToBottom?: boolean;
125
134
  }
135
+ /**
136
+ * Configuration of an individual fixed view panel
137
+ *
138
+ * Example:
139
+ * ```ts
140
+ * {
141
+ * position: PanelPosition.Left,
142
+ * width: '140px',
143
+ * viewOptions: { url: 'https://example.com'}
144
+ * }
145
+ * ```
146
+ */
126
147
  export declare type PanelConfig = (PanelConfigHorizontal | PanelConfigVertical) & {
127
148
  /** The options with which to initialize the panel view.*/
128
149
  viewOptions: Omit<OpenFin.PlatformViewCreationOptions, 'bounds' | 'target'>;
@@ -1,6 +1,5 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { App, StorefrontFooter, StorefrontLandingPage, StorefrontNavigationItemAppGrid, StorefrontNavigationSection, StorefrontProviderInfo } from '../../../client-api/src/shapes';
3
- import { UpdateStoreCustomButtonStateRequest } from '../../../client-api-platform/src/shapes';
4
3
  export interface StorefrontProviderInfoWithIdentity extends StorefrontProviderInfo {
5
4
  platformIdentity: OpenFin.Identity;
6
5
  }
@@ -32,20 +31,6 @@ export interface LaunchStorefrontProviderAppRequest extends StorefrontProviderId
32
31
  * @param req LaunchStorefrontProviderAppRequest request object.
33
32
  */
34
33
  export declare const launchStorefrontApp: (req: LaunchStorefrontProviderAppRequest) => Promise<void>;
35
- /**
36
- * A request to update store primary button state.
37
- */
38
- export interface UpdateStoreCustomButtonStateRequestWithProvider extends UpdateStoreCustomButtonStateRequest, StorefrontProviderIdentity {
39
- /**
40
- * App id.
41
- */
42
- appId: string;
43
- }
44
- /**
45
- * Updates primary button state.
46
- * @param req update request.
47
- */
48
- export declare const setStoreButtonState: (req: UpdateStoreCustomButtonStateRequestWithProvider) => Promise<void>;
49
34
  /**
50
35
  * Get a list of applications for Storefront.
51
36
  * @param identity of the platform to get the apps from.