@openfin/workspace-platform 20.1.0 → 20.1.2

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.
Files changed (51) hide show
  1. package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +1 -2
  2. package/browser/src/components/ControlBar/SearchMenu/utils.d.ts +3 -1
  3. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +2 -2
  4. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanel.d.ts +1 -1
  5. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +1 -1
  6. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +1 -1
  7. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  8. package/client-api-platform/src/api/bookmarks.d.ts +2 -0
  9. package/client-api-platform/src/api/bookmarks.test.d.ts +1 -0
  10. package/client-api-platform/src/api/dock.d.ts +13 -0
  11. package/client-api-platform/src/index.d.ts +1 -1
  12. package/client-api-platform/src/init/index.d.ts +4 -2
  13. package/client-api-platform/src/init/override-callback/browser-defaults.d.ts +1 -1
  14. package/client-api-platform/src/shapes.d.ts +85 -3
  15. package/common/src/api/overrides.d.ts +0 -2
  16. package/common/src/api/protocol/browser.d.ts +11 -1
  17. package/common/src/api/protocol/workspace-platform.d.ts +12 -1
  18. package/common/src/api/theming.d.ts +6 -4
  19. package/common/src/api/workspace-events.d.ts +1 -1
  20. package/common/src/brand/default-brand.d.ts +8 -0
  21. package/common/src/components/BaseButton/BaseButton.d.ts +2 -4
  22. package/common/src/components/CloseButton/CloseButtonLarge.d.ts +4 -0
  23. package/common/src/styles/svg-icons.d.ts +1 -1
  24. package/common/src/utils/bookmark-item-context-menu.d.ts +5 -0
  25. package/common/src/utils/bookmarks.d.ts +7 -3
  26. package/common/src/utils/browser-base-url.d.ts +2 -1
  27. package/common/src/utils/enterprise-dock.d.ts +3 -0
  28. package/common/src/utils/menu-window-provider.d.ts +1 -0
  29. package/common/src/utils/modal-bounds.d.ts +7 -0
  30. package/common/src/utils/popup-window.d.ts +4 -7
  31. package/common/src/utils/route.d.ts +2 -1
  32. package/common/src/utils/shared-emitter.d.ts +5 -0
  33. package/common/src/utils/usage-register.d.ts +1 -0
  34. package/common/src/utils/window.d.ts +2 -1
  35. package/index.js +216 -128
  36. package/index.js.map +1 -1
  37. package/package.json +3 -3
  38. package/search-api/src/client/internal.d.ts +4 -4
  39. package/search-api/src/client/remote/channel-client-factory.d.ts +2 -1
  40. package/search-api/src/client/remote/channel-client.d.ts +4 -4
  41. package/search-api/src/fin/index.d.ts +2 -3
  42. package/search-api/src/index.d.ts +1 -1
  43. package/search-api/src/internal-shapes.d.ts +1 -1
  44. package/search-api/src/provider/internal.d.ts +3 -1
  45. package/search-api/src/provider/remote/channel-factory.d.ts +2 -1
  46. package/search-api/src/provider/remote/channel.d.ts +4 -4
  47. package/search-api/src/shapes.d.ts +17 -2
  48. package/workspace_platform.zip +0 -0
  49. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +0 -8
  50. package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +0 -7
  51. package/search-api/src/fin/shapes.d.ts +0 -23
@@ -4,7 +4,6 @@ type BookmarkIconProps = {
4
4
  iconGradientClick?: () => void;
5
5
  url?: string;
6
6
  isMenuExpanded?: boolean;
7
- disableMonitorBookmarkPanelActions?: boolean;
8
7
  };
9
- export declare const BookmarkButton: ({ inputContainerRef, url, iconGradientClick, isMenuExpanded, disableMonitorBookmarkPanelActions }: BookmarkIconProps) => JSX.Element;
8
+ export declare const BookmarkButton: ({ inputContainerRef, url, iconGradientClick, isMenuExpanded }: BookmarkIconProps) => JSX.Element;
10
9
  export {};
@@ -4,6 +4,8 @@ import { AttachedPage, Site } from '../../../../../client-api-platform/src/index
4
4
  export declare const handleAlreadyOpenPage: (attachedPages: AttachedPage[], site?: Site) => boolean;
5
5
  export declare const convertSiteData: (result: any) => Site;
6
6
  export declare const getRecentlyVisitedSites: () => Promise<Site[]>;
7
- export declare const getSiteSubTitle: (site: Site) => string;
7
+ export declare const formatRecentUrl: (url: string) => string;
8
+ export declare const getSiteSubTitle: (site: Site, urlFormatter: (value: string) => string) => string;
9
+ export declare const trimWithEllipsis: (str: string, characters: number) => string;
8
10
  export declare const checkViewUrl: (view: OpenFin.View | null, url: string, setViewNavigatedToUrl: (value: boolean) => void) => Promise<void>;
9
11
  export declare const searchBookmark: (url: string, browserIdentity?: OpenFin.Identity) => Promise<BookmarkNode | undefined>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
3
- import { Props as BaseButtonProps } from '../../../../../common/src/components/BaseButton/BaseButton';
3
+ import { BaseButtonProps } from '../../../../../common/src/components/BaseButton/BaseButton';
4
4
  interface BookmarkItemProps {
5
5
  bookmark: BookmarkNode;
6
6
  isRenaming: boolean;
@@ -9,7 +9,7 @@ interface BookmarkItemProps {
9
9
  }
10
10
  declare const _default: import("react").NamedExoticComponent<BookmarkItemProps>;
11
11
  export default _default;
12
- export declare const BookmarkItemButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<BaseButtonProps & import("react").HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, BaseButtonProps & {
12
+ export declare const BookmarkItemButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<BaseButtonProps & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, BaseButtonProps & {
13
13
  isRenaming?: boolean;
14
14
  }, never>;
15
15
  export declare const BookmarkItemButtonContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -5,5 +5,5 @@ export declare const TextHelp: import("styled-components").StyledComponent<"span
5
5
  color?: "background6" | "textDefault";
6
6
  children: import("react").ReactNode;
7
7
  size?: "small" | "base" | "large" | "xsmall" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge";
8
- weight?: "normal" | "bold";
8
+ weight?: "bold" | "normal";
9
9
  }, never>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { CategorizedBookmarkSearchResults } from '../../../../../common/src/utils/bookmarks';
2
3
  import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
3
- import { CategorizedBookmarkSearchResults } from './utils';
4
4
  interface BookmarksResultsProps {
5
5
  currentFolder: BookmarkNode;
6
6
  bookmarksList: BookmarkNode[];
@@ -1,5 +1,5 @@
1
+ import { CategorizedBookmarkSearchResults } from '../../../../../common/src/utils/bookmarks';
1
2
  import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
2
- import { CategorizedBookmarkSearchResults } from './utils';
3
3
  /**
4
4
  * Custom hook that manages and sorts bookmark search results and returns an object of categorized bookmarks
5
5
  * and actions to update the search query.
@@ -6,7 +6,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
6
6
  * @param app the app directory entry.
7
7
  * @param opts launch options.
8
8
  */
9
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Application | OpenFin.Identity | OpenFin.View | OpenFin.Platform>;
9
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Application | OpenFin.Identity | OpenFin.Platform | OpenFin.View>;
10
10
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
11
11
  export declare function getResults(payload: {
12
12
  req: SearchSitesRequest;
@@ -0,0 +1,2 @@
1
+ import { LaunchBookmarkPayload } from '../../../client-api-platform/src/shapes';
2
+ export declare const launchBookmark: (payload: LaunchBookmarkPayload) => Promise<void>;
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -0,0 +1,13 @@
1
+ import { ContentMenuEntry } from '@openfin/ui-library';
2
+ import type { DockEntry, WorkspacePanelButton } from '../../../client-api-platform/src/shapes';
3
+ export declare const DockCompanionUpdatesPrefix = "dock-companion-updates";
4
+ export declare const updateDockFavoriteEntries: (favorites: DockEntry[]) => Promise<void>;
5
+ export declare const updateContentMenu: (contentMenu: ContentMenuEntry[]) => Promise<void>;
6
+ export declare const navigateContentMenu: (id: string) => Promise<void>;
7
+ export declare const launchDockEntry: (entry: DockEntry) => Promise<void>;
8
+ export declare const setDockFavoritesOrder: (favorites: DockEntry[]) => Promise<void>;
9
+ export declare const setDockWorkspaceButtonsOrder: (favorites: WorkspacePanelButton[]) => Promise<void>;
10
+ export declare const getDockWorkspacesContextMenu: () => Promise<import("@client/index").BaseCustomDropdownItem[]>;
11
+ export declare const handleDockWorkspacesMenuResponse: (payload: any) => Promise<void>;
12
+ export declare const removeFavoriteEntry: (entry: DockEntry) => Promise<void>;
13
+ export declare const addFavoriteEntry: (entry: DockEntry) => Promise<void>;
@@ -1,3 +1,3 @@
1
1
  export * from './shapes';
2
- export { init } from './init';
2
+ export { init, initDockCompanion } from './init';
3
3
  export { getCurrentSync, wrapSync } from './api';
@@ -1,4 +1,6 @@
1
- import type { WorkspacePlatformInitConfig } from '../shapes';
1
+ import OpenFin from '@openfin/core';
2
+ import { CompanionDockConfig, WorkspacePlatformInitConfig } from '../shapes';
3
+ export declare function initDockCompanion(config: CompanionDockConfig, platform: OpenFin.Platform): Promise<void>;
2
4
  /**
3
5
  * Initilaize a Workspace Platform.
4
6
  *
@@ -34,4 +36,4 @@ import type { WorkspacePlatformInitConfig } from '../shapes';
34
36
  * ```
35
37
  * @param options options for configuring the platform.
36
38
  */
37
- export declare const init: ({ theme, customActions, language, ...rest }: WorkspacePlatformInitConfig) => Promise<void>;
39
+ export declare const init: ({ theme, customActions, language, ...rest }: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
@@ -2,7 +2,7 @@ import type OpenFin from '@openfin/core';
2
2
  import { WindowName } from '../../../../common/src/utils/window';
3
3
  import type { PreloadedThemeData } from '../../../../common/src/api/theming';
4
4
  import { BrowserInitConfig } from '../../../../client-api-platform/src/shapes';
5
- export declare const DEFAULT_BROWSER_URL: string;
5
+ export declare const defaultBrowserUrl: () => Promise<string>;
6
6
  export declare const ENTERPRISE_LANDING_PAGE_URL: string;
7
7
  export declare const searchMenuIdentityBase: {
8
8
  uuid: string;
@@ -1,12 +1,12 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { IconProps, Languages } from '@openfin/ui-library';
3
3
  import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
4
- import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
- import { AddDefaultPagePayload, AttachedPage, CopyPagePayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
4
+ import { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
+ import { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
6
6
  import { SetActivePageForWindowPayload } from '../../common/src/api/pages/shapes';
7
7
  import { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
8
8
  import type { CustomThemes } from '../../common/src/api/theming';
9
- import type { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
9
+ import { App, DockProviderConfigWithIdentity, StoreButtonConfig, WorkspaceButton } from '../../client-api/src/shapes';
10
10
  import type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
11
11
  export { AppManifestType } from '../../client-api/src/shapes';
12
12
  export type { App, AppIntent, Image } from '../../client-api/src/shapes';
@@ -959,6 +959,14 @@ export interface BrowserWindowModule {
959
959
  * @property {string} [value] - The value associated with the 'custom' type.
960
960
  */
961
961
  updateBrowserWindowTitle(title: WindowTitle): Promise<void>;
962
+ /**
963
+ * Internal implementation to retrieve selected view ids from available layouts in a browser window instances
964
+ */
965
+ _getLayoutsWithSelectedViews(): Promise<Array<{
966
+ layoutContainerKey: string;
967
+ isActive: boolean;
968
+ selectedViews: OpenFin.Identity[];
969
+ }>>;
962
970
  _bookmarks: BrowserBookmarks;
963
971
  }
964
972
  export interface BrowserBookmarks {
@@ -1523,6 +1531,44 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1523
1531
  */
1524
1532
  getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
1525
1533
  _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1534
+ /**
1535
+ * Launches a bookmark in the browser window.
1536
+ * @param payload
1537
+ */
1538
+ _launchBookmarkInternal: (payload: LaunchBookmarkPayload) => Promise<void>;
1539
+ /**
1540
+ * Updates companion dock favorites list.
1541
+ * @param favorites
1542
+ */
1543
+ _updateDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1544
+ /**
1545
+ * Updates companion dock content menu.
1546
+ * @param contentMenu
1547
+ */
1548
+ _updateContentMenuInternal: (contentMenu: ContentMenuEntry[]) => Promise<void>;
1549
+ /**
1550
+ * Launches companion dock content menu item.
1551
+ * @param id
1552
+ */
1553
+ _launchDockEntryInternal: (entry: DockEntry) => Promise<void>;
1554
+ _setDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1555
+ _setDockWorkspaceButtonsOrderInternal: (favorites: WorkspacePanelButton[]) => Promise<void>;
1556
+ _removeDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1557
+ _addDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1558
+ /**
1559
+ * Navigates companion dock content menu to a specified folder.
1560
+ * @param id
1561
+ */
1562
+ _navigateContentMenuInternal(id: string): Promise<void>;
1563
+ /**
1564
+ * Retrieves companion dock workspaces dropdown context menu.
1565
+ */
1566
+ _openDockWorkspacesContextMenuInternal(): Promise<BaseCustomDropdownItem[]>;
1567
+ /**
1568
+ * Handles companion dock workspaces dropdown context menu response.
1569
+ * @param payload
1570
+ */
1571
+ _handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
1526
1572
  /**
1527
1573
  * The browser window factory for the Workspace Platform.
1528
1574
  */
@@ -1853,6 +1899,29 @@ export interface AnalyticsConfig {
1853
1899
  }
1854
1900
  export { SUPPORTED_LANGUAGES } from '@openfin/ui-library';
1855
1901
  export type Locale = Languages;
1902
+ /**
1903
+ * Configures the workspace to self-host using an asar bundle at the
1904
+ * specified path.
1905
+ *
1906
+ * @remarks Intended as a development tool - in production,
1907
+ * use {@link WorkspaceAsarAssetConfig}.
1908
+ */
1909
+ export type WorkspaceAsarPathConfig = {
1910
+ /**
1911
+ * Path of the asar bundle with which to self-host.
1912
+ */
1913
+ path: string;
1914
+ };
1915
+ /**
1916
+ * Configures the workspace to self-host using the specified asar bundle
1917
+ * app asset.
1918
+ */
1919
+ export type WorkspaceAsarAssetConfig = {
1920
+ /**
1921
+ * App asset alias of the asar bundle with which to self-host.
1922
+ */
1923
+ alias: string;
1924
+ };
1856
1925
  /**
1857
1926
  * Configuration for initializing a Workspace platform.
1858
1927
  */
@@ -1978,6 +2047,10 @@ export interface WorkspacePlatformInitConfig {
1978
2047
  * Leave undefined to use OpenFin hosted Notification Center.
1979
2048
  */
1980
2049
  notifications?: NotificationsCustomManifestOptions;
2050
+ /**
2051
+ * Configuration for self-hosting of workspace assets.
2052
+ */
2053
+ workspaceAsar?: WorkspaceAsarAssetConfig | WorkspaceAsarPathConfig;
1981
2054
  }
1982
2055
  /**
1983
2056
  * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
@@ -2114,6 +2187,7 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
2114
2187
  * @deprecated
2115
2188
  */
2116
2189
  export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
2190
+ export type WorkspacePanelButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu';
2117
2191
  /**
2118
2192
  * Configuration for initializing a Browser.
2119
2193
  */
@@ -2188,3 +2262,11 @@ export type TaskbarIcon = {
2188
2262
  dark: string;
2189
2263
  light: string;
2190
2264
  };
2265
+ /**
2266
+ * Launch bookmark request payload
2267
+ */
2268
+ export interface LaunchBookmarkPayload {
2269
+ bookmark: BookmarkNode;
2270
+ sourceIdentity: OpenFin.Identity;
2271
+ sourceEvent: Pick<MouseEvent, 'ctrlKey' | 'metaKey' | 'shiftKey'>;
2272
+ }
@@ -5,8 +5,6 @@ interface HotkeyOverrides {
5
5
  toggleHomeVisibility: string;
6
6
  }
7
7
  export interface Overrides {
8
- disableBrowserNewPageButton: boolean;
9
- enableWorkspaceDock: boolean;
10
8
  hotkeys: HotkeyOverrides;
11
9
  style: StyleOverrides;
12
10
  browserWindowTitle: string;
@@ -34,7 +34,8 @@ declare enum GeneralBrowserChannelActions {
34
34
  SetSelectedScheme = "set-selected-scheme",
35
35
  ShowBrowserIndicator = "show-browser-indicator",
36
36
  SetSelectedLanguage = "set-selected-language",
37
- RefreshBookmarksInternal = "refresh-bookmarks"
37
+ RefreshBookmarksInternal = "refresh-bookmarks",
38
+ GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views"
38
39
  }
39
40
  /**
40
41
  * All of the remote procedures that can be called in the
@@ -53,7 +54,15 @@ export declare enum PageChannelAction {
53
54
  IsDetachingPages = "is-detaching-pages",
54
55
  IsActivePageChanging = "is-active-page-changing"
55
56
  }
57
+ export declare enum CompanionDockChannelAction {
58
+ UpdateFavoriteEntries = "update-favorite-entries",
59
+ UpdateContentMenu = "update-content-menu",
60
+ NavigateContentMenu = "navigate-content-menu"
61
+ }
56
62
  export declare const BrowserChannelAction: {
63
+ UpdateFavoriteEntries: CompanionDockChannelAction.UpdateFavoriteEntries;
64
+ UpdateContentMenu: CompanionDockChannelAction.UpdateContentMenu;
65
+ NavigateContentMenu: CompanionDockChannelAction.NavigateContentMenu;
57
66
  GetPages: PageChannelAction.GetPages;
58
67
  GetActivePageForWindow: PageChannelAction.GetActivePageForWindow;
59
68
  AttachPagesToWindow: PageChannelAction.AttachPagesToWindow;
@@ -76,6 +85,7 @@ export declare const BrowserChannelAction: {
76
85
  ShowBrowserIndicator: GeneralBrowserChannelActions.ShowBrowserIndicator;
77
86
  SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
78
87
  RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
88
+ GetLayoutsWithSelectedViewsInternal: GeneralBrowserChannelActions.GetLayoutsWithSelectedViewsInternal;
79
89
  };
80
90
  export type BrowserChannelAction = typeof BrowserChannelAction;
81
91
  export {};
@@ -73,7 +73,18 @@ export declare enum WorkspacePlatformChannelAction {
73
73
  GetCuratedContentInternal = "getCuratedContentInternal",
74
74
  HandleRequestNavigationInternal = "handleRequestNavigationInternal",
75
75
  RefreshBookmarksInternal = "refreshBookmarksInternal",
76
- GetNotificationsConfig = "getNotificationsConfig"
76
+ LaunchBookmarkInternal = "launchBookmarkInternal",
77
+ GetNotificationsConfig = "getNotificationsConfig",
78
+ UpdateDockFavoritesInternal = "updateDockFavoritesInternal",
79
+ UpdateContentMenuInternal = "updateContentMenuInternal",
80
+ LaunchDockEntryInternal = "launchDockEntryInternal",
81
+ SetDockFavoritesOrderInternal = "setDockFavoritesOrderInternal",
82
+ NavigateContentMenuInternal = "navigateContentMenuInternal",
83
+ SetDockWorkspaceButtonsOrderInternal = "setDockWorkspaceButtonsOrderInternal",
84
+ GetDockWorkspacesContextMenuInternal = "getDockWorkspacesContextMenuInternal",
85
+ HandleDockWorkspacesMenuResponseInternal = "handleDockWorkspacesMenuResponseInternal",
86
+ RemoveDockFavoriteInternal = "removeDockFavoriteInternal",
87
+ AddDockFavoriteInternal = "addDockFavoriteInternal"
77
88
  }
78
89
  export type PlatFormSupportedFeatures = boolean | {
79
90
  isWorkspacePlatform: boolean;
@@ -1,6 +1,7 @@
1
1
  import type { DefaultTheme } from 'styled-components';
2
2
  import type OpenFin from '@openfin/core';
3
3
  import { ColorSchemeType, ThemeSet } from '@openfin/ui-library';
4
+ import { Palette } from '@openfin/ui-library';
4
5
  import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
5
6
  export type WorkspaceComponentSetSelectedSchemePayload = {
6
7
  newScheme: ColorSchemeOptionType;
@@ -39,7 +40,7 @@ export interface BaseThemeOptions {
39
40
  label: string;
40
41
  logoUrl?: string;
41
42
  }
42
- export interface CustomThemeOptions extends BaseThemeOptions {
43
+ export type CustomThemeOptions = BaseThemeOptions & {
43
44
  palette: CustomPaletteSet;
44
45
  /**
45
46
  * NOTE: Only used in Notifications
@@ -65,8 +66,8 @@ export interface CustomThemeOptions extends BaseThemeOptions {
65
66
  * ```
66
67
  */
67
68
  notificationIndicatorColors?: Record<string, NotificationIndicatorColorsSet>;
68
- }
69
- export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
69
+ };
70
+ export type CustomThemeOptionsWithScheme = BaseThemeOptions & {
70
71
  /**
71
72
  * The default color scheme for this theme.
72
73
  *
@@ -119,7 +120,7 @@ export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
119
120
  * ```
120
121
  */
121
122
  notificationIndicatorColors?: NotificationIndicatorColorsWithScheme;
122
- }
123
+ };
123
124
  export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme)[];
124
125
  export interface PreloadedThemeData {
125
126
  themes: CustomThemes;
@@ -247,3 +248,4 @@ export declare const computeThemes: (customThemes: CustomThemes, storedScheme?:
247
248
  export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
248
249
  export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
249
250
  export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, 'system'>>;
251
+ export declare const getComputedBackgroundColor: (paletteKey: keyof typeof Palette, defaultColor?: string) => Promise<string>;
@@ -45,5 +45,5 @@ type EventTypeTypes = {
45
45
  */
46
46
  'component-navigation': [NavigatePayload];
47
47
  };
48
- export declare const addListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, removeListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, emit: <EventKey extends keyof EventTypeTypes>(event: EventKey, ...payload: EventTypeTypes[EventKey]) => Promise<void>;
48
+ export declare const addListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, removeListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, addListenerWithUUID: (uuid: string) => <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, emit: <EventKey extends keyof EventTypeTypes>(event: EventKey, ...payload: EventTypeTypes[EventKey]) => Promise<void>;
49
49
  export {};
@@ -0,0 +1,8 @@
1
+ export declare const defaultBrandIcons: {
2
+ light: {
3
+ symbol: string;
4
+ };
5
+ dark: {
6
+ symbol: string;
7
+ };
8
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SizeType } from '@openfin/ui-library';
3
- export interface Props {
3
+ export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
4
4
  /**
5
5
  * Icon to be shown for the control.
6
6
  *
@@ -26,8 +26,6 @@ export interface Props {
26
26
  disabled?: boolean;
27
27
  /** Button selected state. Can be used to implement sticky buttons. */
28
28
  selected?: boolean;
29
- /** Use wide button */
30
- wide?: boolean;
31
29
  /** Disable hover/active background-color change */
32
30
  hoverless?: boolean;
33
31
  /** If not set, svgs in the button will be forced to 13px */
@@ -51,5 +49,5 @@ export interface Props {
51
49
  *
52
50
  * Note: This relies on global CSS and is written to run within the context of the Browser window which contains these globals.
53
51
  */
54
- declare const BaseButton: React.ForwardRefExoticComponent<Props & React.HTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
52
+ declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
55
53
  export default BaseButton;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { BaseButtonProps } from '../BaseButton/BaseButton';
3
+ declare const CloseButtonLarge: (props: Omit<BaseButtonProps, 'children'>) => JSX.Element;
4
+ export default CloseButtonLarge;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledIcon: import("styled-components").StyledComponent<({ tabIndex, icon, children, size, containerSize, "data-testid": dataTestId, ...props }: import("@openfin/ui-library").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {
2
+ export declare const StyledIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@openfin/ui-library").IconProps & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
3
3
  disabled?: boolean;
4
4
  isEnterprise?: boolean;
5
5
  windowFocused?: boolean;
@@ -1,3 +1,8 @@
1
1
  import { OpenFin } from '@openfin/core';
2
2
  import { BookmarkItemContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
3
+ import { BookmarkFolder } from './bookmarks';
4
+ export declare const getSortedBookmarkFoldersContextMenuOptions: (bookmarkFolders: BookmarkFolder[], checkedNodeId: string, separators?: {
5
+ afterAllBookmarks?: boolean;
6
+ afterFavorites?: boolean;
7
+ }) => BookmarkItemContextMenuItemTemplate[];
3
8
  export declare const getBookmarkItemContextMenuTemplate: (callerIdentity: OpenFin.Identity, bookmarkId: string) => Promise<BookmarkItemContextMenuItemTemplate[]>;
@@ -5,8 +5,12 @@ export type BookmarkFolder = {
5
5
  id: string;
6
6
  title: string;
7
7
  };
8
+ export type CategorizedBookmarkSearchResults = {
9
+ bookmarksInFolder: BookmarkNode[];
10
+ bookmarksOutsideFolder: BookmarkNode[];
11
+ };
12
+ export declare const getBookmarkNodeTitle: (title: string) => string;
13
+ export declare const categorizeSearchResults: (bookmarks: BookmarkNode[], folderId: string) => CategorizedBookmarkSearchResults;
8
14
  export declare const sortBookmarks: (a: BookmarkNode, b: BookmarkNode) => number;
9
- export declare const collectFolders: (nodes: Array<BookmarkNode>) => Array<BookmarkFolder>;
10
- export declare const collectFoldersExcludingBuiltin: (nodes: Array<BookmarkNode>) => Array<BookmarkFolder>;
11
- export declare const prioritizeFolders: (folders: Array<BookmarkFolder>) => Array<BookmarkFolder>;
15
+ export declare const collectFolders: (nodes: BookmarkNode[]) => BookmarkFolder[];
12
16
  export declare const getBookmarkFoldersList: (rootNode: BookmarkNode) => BookmarkFolder[];
@@ -1,6 +1,7 @@
1
+ export declare function setLocalBrowserUrl(url: string): void;
1
2
  /**
2
3
  * Get the browser base url override if it exists
3
4
  *
4
5
  * @returns The browser base url override if it exists, otherwise null
5
6
  */
6
- export declare function getBrowserBaseUrl(): Promise<string | null>;
7
+ export declare function getBrowserBaseUrl(): Promise<string>;
@@ -0,0 +1,3 @@
1
+ export declare const DOCK_COMPANION_HEIGHT = 40;
2
+ export declare const DOCK_COMPANION_WIDTH = 728;
3
+ export declare const DOCK_COMPANION_TOP = 150;
@@ -18,6 +18,7 @@ export interface ModalResponseEvent {
18
18
  export declare const menuEvents: {
19
19
  emit: <EventKey extends keyof MenuEventTypes>(event: EventKey, ...payload: MenuEventTypes[EventKey]) => Promise<void>;
20
20
  addListener: <EventKey_1 extends keyof MenuEventTypes>(event: EventKey_1, listener: (...payload: MenuEventTypes[EventKey_1]) => void) => void;
21
+ addListenerWithUUID: (uuid: string) => <EventKey_1 extends keyof MenuEventTypes>(event: EventKey_1, listener: (...payload: MenuEventTypes[EventKey_1]) => void) => void;
21
22
  removeListener: <EventKey_2 extends keyof MenuEventTypes>(event: EventKey_2, listener: (...payload: MenuEventTypes[EventKey_2]) => void) => void;
22
23
  once: <EventKey_3 extends keyof MenuEventTypes>(event: EventKey_3, listener: (...payload: MenuEventTypes[EventKey_3]) => void) => void;
23
24
  };
@@ -1,5 +1,12 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { ResponseModalConfig } from './menu-config';
3
+ import { Point } from './window';
4
+ /**
5
+ *
6
+ * @param parentWindowIdentity parent window for the modal
7
+ * @returns a point (top/left) that represents the center of the monitor the parent window is on
8
+ */
9
+ export declare const getCenterOfParentWindowMonitor: (parentWindowIdentity?: OpenFin.Identity) => Promise<Point>;
3
10
  /**
4
11
  * returns the correct bounds for the response modal to be displayed at
5
12
  * this will return the correct bounds regardless of whether the window is maximized
@@ -1,5 +1,4 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import { BookmarkFolder } from '../../../common/src/utils/bookmarks';
3
2
  import { UserMenuParams } from '../../../common/src/utils/menu';
4
3
  import { OptionalExceptFor } from '../../../common/src/utils/types';
5
4
  import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
@@ -53,16 +52,14 @@ export type BookmarkButtonPayload = {
53
52
  export type ContextMenuChannelMessageData = {
54
53
  parentIdentity: OpenFin.Identity;
55
54
  responseIdentity: OpenFin.Identity;
56
- anchorBehavior: AnchorBehavior;
57
55
  type: ContextMenuType;
58
56
  x: number;
59
57
  y: number;
60
- payload: OpenFin.ShowPopupMenuOptions | {
58
+ anchorBehavior?: AnchorBehavior;
59
+ payload: (OpenFin.ShowPopupMenuOptions | {
61
60
  pageId: string;
62
- } | BookmarkButtonPayload | {
63
- dropdownOptions: Array<BookmarkFolder>;
64
- width: number;
65
- selected: BookmarkFolder;
61
+ } | BookmarkButtonPayload) & {
62
+ width?: number;
66
63
  };
67
64
  };
68
65
  export type SearchMenuChannelResponse = {
@@ -25,7 +25,8 @@ export declare enum PageRoute {
25
25
  EnterpriseBrowser = "/browser/enterprise/",
26
26
  EnterpriseContextMenu = "/browser/enterprise/context-menu/",
27
27
  EnterpriseBookmarkDialog = "/browser/enterprise/bookmark-dialog/",
28
- DropdownMenu = "/browser/enterprise/dropdown-menu/"
28
+ DropdownMenu = "/browser/enterprise/dropdown-menu/",
29
+ EnterpriseDock = "/browser/enterprise/dock/"
29
30
  }
30
31
  export declare const Assets: {
31
32
  readonly IconOpenFinLogo: "/icons/openfinlogo.svg";
@@ -6,6 +6,11 @@ export default function makeSharedEmitter<EventMap extends {
6
6
  }>(id: string): {
7
7
  emit: <EventKey extends keyof EventMap>(event: EventKey, ...payload: EventMap[EventKey]) => Promise<void>;
8
8
  addListener: <EventKey_1 extends keyof EventMap>(event: EventKey_1, listener: (...payload: EventMap[EventKey_1]) => void) => void;
9
+ /**
10
+ * Creates a listener for a particular UUID instead of ApplicationUUID.Workspace.
11
+ * @param uuid The UUID of the application to subscribe to.
12
+ */
13
+ addListenerWithUUID: (uuid: string) => <EventKey_1 extends keyof EventMap>(event: EventKey_1, listener: (...payload: EventMap[EventKey_1]) => void) => void;
9
14
  removeListener: <EventKey_2 extends keyof EventMap>(event: EventKey_2, listener: (...payload: EventMap[EventKey_2]) => void) => void;
10
15
  once: <EventKey_3 extends keyof EventMap>(event: EventKey_3, listener: (...payload: EventMap[EventKey_3]) => void) => void;
11
16
  };
@@ -9,6 +9,7 @@ export interface RegisterUsageStatus {
9
9
  export declare enum ComponentName {
10
10
  Browser = "Browser",
11
11
  Dock = "Dock",
12
+ EnterpriseDock = "EnterpriseDock",
12
13
  Home = "Home",
13
14
  Notification = "Notification",
14
15
  Storefront = "Storefront",
@@ -13,7 +13,8 @@ export declare enum WindowName {
13
13
  EnterpriseContextMenu = "openfin-enterprise-context-menu",
14
14
  BrowserAddressSearchPrefix = "openfin-browser-menu-address-search-",
15
15
  EnterpriseBookmarkDialogWindow = "openfin-enterprise-bookmark-dialog",
16
- DropdownMenu = "openfin-enterprise-dropdown-menu"
16
+ DropdownMenu = "openfin-enterprise-dropdown-menu",
17
+ DockCompanion = "openfin-dock-companion"
17
18
  }
18
19
  export interface WindowIdentity {
19
20
  uuid: ApplicationUUID | string;