@openfin/workspace 20.0.5 → 20.1.1

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 (48) hide show
  1. package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +9 -0
  2. package/browser/src/components/ControlBar/SearchMenu/useBookmarkButtonHover.d.ts +2 -0
  3. package/browser/src/components/ControlBar/SearchMenu/useEnterpriseBookmarkDialogWindow.d.ts +2 -0
  4. package/browser/src/components/ControlBar/SearchMenu/useIsBookmarked.d.ts +1 -0
  5. package/browser/src/components/ControlBar/SearchMenu/useIsSelectedViewNavigated.d.ts +5 -0
  6. package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts +8 -0
  7. package/browser/src/components/ControlBar/SearchMenu/utils.d.ts +11 -0
  8. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +2 -2
  9. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +1 -1
  10. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +1 -1
  11. package/client-api-platform/src/api/bookmarks.d.ts +2 -0
  12. package/client-api-platform/src/api/dock.d.ts +13 -0
  13. package/client-api-platform/src/index.d.ts +1 -1
  14. package/client-api-platform/src/init/index.d.ts +4 -2
  15. package/client-api-platform/src/shapes.d.ts +172 -3
  16. package/common/src/api/overrides.d.ts +0 -2
  17. package/common/src/api/protocol/browser.d.ts +12 -1
  18. package/common/src/api/protocol/workspace-platform.d.ts +12 -1
  19. package/common/src/api/theming.d.ts +31 -4
  20. package/common/src/api/workspace-events.d.ts +1 -1
  21. package/common/src/brand/default-brand.d.ts +8 -0
  22. package/common/src/components/BaseButton/BaseButton.d.ts +2 -4
  23. package/common/src/components/CloseButton/CloseButtonLarge.d.ts +4 -0
  24. package/common/src/hooks/useAddEditBookmarkDialog.d.ts +7 -0
  25. package/common/src/hooks/usePreloadedWindow.d.ts +13 -0
  26. package/common/src/styles/svg-icons.d.ts +1 -1
  27. package/common/src/utils/bookmark-item-context-menu.d.ts +5 -0
  28. package/common/src/utils/bookmarks.d.ts +7 -3
  29. package/common/src/utils/enterprise-dock.d.ts +3 -0
  30. package/common/src/utils/get-browser-window.d.ts +3 -0
  31. package/common/src/utils/menu-window-provider.d.ts +1 -0
  32. package/common/src/utils/modal-bounds.d.ts +7 -0
  33. package/common/src/utils/popup-window.d.ts +4 -7
  34. package/common/src/utils/route.d.ts +2 -1
  35. package/common/src/utils/shared-emitter.d.ts +5 -0
  36. package/common/src/utils/usage-register.d.ts +1 -0
  37. package/common/src/utils/window.d.ts +2 -1
  38. package/home.js +215 -127
  39. package/home.js.map +1 -1
  40. package/index.js +215 -127
  41. package/index.js.map +1 -1
  42. package/notifications.js +285 -197
  43. package/notifications.js.map +1 -1
  44. package/package.json +2 -2
  45. package/store.js +215 -127
  46. package/store.js.map +1 -1
  47. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +0 -8
  48. package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +0 -7
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type BookmarkIconProps = {
3
+ inputContainerRef: React.MutableRefObject<HTMLDivElement>;
4
+ iconGradientClick?: () => void;
5
+ url?: string;
6
+ isMenuExpanded?: boolean;
7
+ };
8
+ export declare const BookmarkButton: ({ inputContainerRef, url, iconGradientClick, isMenuExpanded }: BookmarkIconProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { MutableRefObject } from 'react';
2
+ export declare const useBookmarkButtonHover: (inputContainerRef: MutableRefObject<HTMLElement | null>) => boolean;
@@ -0,0 +1,2 @@
1
+ import OpenFin from '@openfin/core';
2
+ export declare const useEnterpriseBookmarkDialogWindow: () => OpenFin.Window | null;
@@ -0,0 +1 @@
1
+ export declare const useIsBookmarked: (url?: string, ...beacons: (any | undefined)[]) => boolean;
@@ -0,0 +1,5 @@
1
+ import OpenFin from '@openfin/core';
2
+ export declare const useIsSelectedViewNavigated: (url: string) => {
3
+ isViewNavigatedToUrl: boolean;
4
+ selectedView: OpenFin.View;
5
+ };
@@ -0,0 +1,8 @@
1
+ import { MutableRefObject } from 'react';
2
+ import type OpenFin from '@openfin/core';
3
+ import { SearchMenuChannelRequest } from '../../../../../common/src/utils/popup-window';
4
+ export declare const useSelectedAndOpenViewsBroadcastChannel: (additionalCallBack?: (ev: MessageEvent<SearchMenuChannelRequest>) => void) => {
5
+ selectedViews: OpenFin.Identity[];
6
+ openViews: OpenFin.Identity[];
7
+ searchMenuChannel: MutableRefObject<BroadcastChannel>;
8
+ };
@@ -0,0 +1,11 @@
1
+ import OpenFin from '@openfin/core';
2
+ import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
3
+ import { AttachedPage, Site } from '../../../../../client-api-platform/src/index';
4
+ export declare const handleAlreadyOpenPage: (attachedPages: AttachedPage[], site?: Site) => boolean;
5
+ export declare const convertSiteData: (result: any) => Site;
6
+ export declare const getRecentlyVisitedSites: () => Promise<Site[]>;
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;
10
+ export declare const checkViewUrl: (view: OpenFin.View | null, url: string, setViewNavigatedToUrl: (value: boolean) => void) => Promise<void>;
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>;
@@ -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.
@@ -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,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("@common/api/action").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>;
@@ -1,14 +1,15 @@
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';
4
+ import { Point } from '../../common/src/utils/window';
5
+ import { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
6
  import { Resource } from '../../common/src/api/i18next';
6
7
  import { TrackedSite } from '../../common/src/api/pages/idb';
7
8
  import { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
8
9
  import { SetActivePageForWindowPayload } from '../../common/src/api/pages/shapes';
9
10
  import { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
10
11
  import type { CustomThemes } from '../../common/src/api/theming';
11
- import type { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
12
+ import { App, DockProviderConfigWithIdentity, StoreButtonConfig, WorkspaceButton } from '../../client-api/src/shapes';
12
13
  import type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
13
14
  export { AppManifestType } from '../../client-api/src/shapes';
14
15
  export type { App, AppIntent, Image } from '../../client-api/src/shapes';
@@ -198,7 +199,7 @@ export type EnterpriseMainContextMenuItemTemplate = OpenFin.MenuItemTemplate<Ent
198
199
  /** @internal */
199
200
  export interface BookmarkItemContextMenuItemData extends ContextMenuItemData {
200
201
  type: BookmarkItemContextMenuOptionType;
201
- parentId?: string;
202
+ folderId?: string;
202
203
  }
203
204
  /** @internal */
204
205
  export type BookmarkItemContextMenuItemTemplate = OpenFin.MenuItemTemplate<BookmarkItemContextMenuItemData>;
@@ -1060,6 +1061,14 @@ export interface BrowserWindowModule {
1060
1061
  _addPage(page: PageWithUpdatableRuntimeAttribs, opts?: {
1061
1062
  index?: number;
1062
1063
  }): Promise<void>;
1064
+ /**
1065
+ * Internal implementation to retrieve selected view ids from available layouts in a browser window instances
1066
+ */
1067
+ _getLayoutsWithSelectedViews(): Promise<Array<{
1068
+ layoutContainerKey: string;
1069
+ isActive: boolean;
1070
+ selectedViews: OpenFin.Identity[];
1071
+ }>>;
1063
1072
  /**
1064
1073
  * Internal implementation that supports adding at a specific index
1065
1074
  * @param req the reparent page request.
@@ -1788,6 +1797,44 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1788
1797
  * @internal
1789
1798
  */
1790
1799
  _refreshBookmarksInternal(): Promise<void>;
1800
+ /**
1801
+ * Launches a bookmark in the browser window.
1802
+ * @param payload
1803
+ */
1804
+ _launchBookmarkInternal: (payload: LaunchBookmarkPayload) => Promise<void>;
1805
+ /**
1806
+ * Updates companion dock favorites list.
1807
+ * @param favorites
1808
+ */
1809
+ _updateDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1810
+ /**
1811
+ * Updates companion dock content menu.
1812
+ * @param contentMenu
1813
+ */
1814
+ _updateContentMenuInternal: (contentMenu: ContentMenuEntry[]) => Promise<void>;
1815
+ /**
1816
+ * Launches companion dock content menu item.
1817
+ * @param id
1818
+ */
1819
+ _launchDockEntryInternal: (entry: DockEntry) => Promise<void>;
1820
+ _setDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1821
+ _setDockWorkspaceButtonsOrderInternal: (favorites: WorkspacePanelButton[]) => Promise<void>;
1822
+ _removeDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1823
+ _addDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1824
+ /**
1825
+ * Navigates companion dock content menu to a specified folder.
1826
+ * @param id
1827
+ */
1828
+ _navigateContentMenuInternal(id: string): Promise<void>;
1829
+ /**
1830
+ * Retrieves companion dock workspaces dropdown context menu.
1831
+ */
1832
+ _openDockWorkspacesContextMenuInternal(): Promise<BaseCustomDropdownItem[]>;
1833
+ /**
1834
+ * Handles companion dock workspaces dropdown context menu response.
1835
+ * @param payload
1836
+ */
1837
+ _handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
1791
1838
  /**
1792
1839
  * The browser window factory for the Workspace Platform.
1793
1840
  */
@@ -2041,6 +2088,24 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
2041
2088
  handleRequestNavigationInternal(req: NavigationRequest): Promise<void>;
2042
2089
  /** @internal */
2043
2090
  refreshBookmarksInternal(): Promise<void>;
2091
+ /** @internal */
2092
+ launchBookmarkInternal(payload: LaunchBookmarkPayload): Promise<void>;
2093
+ /** @internal */
2094
+ updateDockFavoritesInternal(favorites: DockEntry[]): Promise<void>;
2095
+ /** @internal */
2096
+ updateContentMenuInternal(contentMenu: ContentMenuEntry[]): Promise<void>;
2097
+ /** @internal */
2098
+ launchDockEntryInternal(entry: DockEntry): Promise<void>;
2099
+ /** @internal */
2100
+ setDockWorkspaceButtonsOrderInternal(workspaceButtons: WorkspacePanelButton[]): Promise<void>;
2101
+ /** @internal */
2102
+ setDockFavoritesOrderInternal(favorites: DockEntry[]): Promise<void>;
2103
+ /** @internal */
2104
+ navigateContentMenuInternal(id: string): Promise<void>;
2105
+ /** @internal */
2106
+ getDockWorkspacesContextMenuInternal(): Promise<BaseCustomDropdownItem[]>;
2107
+ /** @internal */
2108
+ handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
2044
2109
  }
2045
2110
  /**
2046
2111
  * The origins from which a custom action can be invoked
@@ -2280,6 +2345,29 @@ export interface WorkspacePlatformInitConfig {
2280
2345
  */
2281
2346
  notifications?: NotificationsCustomManifestOptions;
2282
2347
  }
2348
+ /**
2349
+ * @internal
2350
+ */
2351
+ export interface CompanionDockConfig {
2352
+ /**
2353
+ * Companion dock window position
2354
+ */
2355
+ dockPosition?: Point;
2356
+ /**
2357
+ * Favorites to be displayed in the dock
2358
+ */
2359
+ favorites?: DockEntry[];
2360
+ /**
2361
+ * Favorites to be displayed in the dock
2362
+ */
2363
+ contentMenu?: ContentMenuEntry[];
2364
+ workspacePanelButtons?: WorkspacePanelButton[];
2365
+ /**
2366
+ * Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
2367
+ */
2368
+ icon?: string | TaskbarIcon;
2369
+ title?: string;
2370
+ }
2283
2371
  /**
2284
2372
  * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
2285
2373
  *
@@ -2415,6 +2503,40 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
2415
2503
  * @deprecated
2416
2504
  */
2417
2505
  export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
2506
+ export type WorkspacePanelButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu';
2507
+ /**
2508
+ * Content menu entry shape cloned and re-exported from UI Library.
2509
+ * @internal
2510
+ */
2511
+ export type ContentMenuEntry = {
2512
+ bookmarked?: boolean;
2513
+ } & ({
2514
+ type: 'folder';
2515
+ id: string;
2516
+ label: string;
2517
+ children: ContentMenuEntry[];
2518
+ } | {
2519
+ type: 'item';
2520
+ id: string;
2521
+ icon: string;
2522
+ label: string;
2523
+ itemData: any;
2524
+ });
2525
+ /**
2526
+ * Represents dock entry for favorites
2527
+ * @internal
2528
+ */
2529
+ export type DockEntry = {
2530
+ type: 'folder';
2531
+ id: string;
2532
+ label: string;
2533
+ } | {
2534
+ type: 'item';
2535
+ id: string;
2536
+ icon: string;
2537
+ label: string;
2538
+ itemData?: any;
2539
+ };
2418
2540
  /**
2419
2541
  * Configuration for initializing a Browser.
2420
2542
  */
@@ -2500,3 +2622,50 @@ export type TaskbarIcon = {
2500
2622
  dark: string;
2501
2623
  light: string;
2502
2624
  };
2625
+ /**
2626
+ * Launch bookmark request payload
2627
+ */
2628
+ export interface LaunchBookmarkPayload {
2629
+ bookmark: BookmarkNode;
2630
+ sourceIdentity: OpenFin.Identity;
2631
+ sourceEvent: Pick<MouseEvent, 'ctrlKey' | 'metaKey' | 'shiftKey'>;
2632
+ }
2633
+ /**
2634
+ * These are channel actions registered by the platform.
2635
+ *
2636
+ * @internal
2637
+ */
2638
+ type EnterpriseDockChannelProviderChannelActions = {
2639
+ 'launch-entry': (entry: DockEntry) => void;
2640
+ 'set-dock-favorites-order': (newFavorites: DockEntry[]) => void;
2641
+ 'set-dock-workspace-buttons-order': (newFavorites: WorkspacePanelButton[]) => void;
2642
+ 'get-dock-workspaces-context-menu': () => BaseCustomDropdownItem[];
2643
+ 'handle-dock-workspaces-menu-response': (payload: any) => void;
2644
+ 'remove-favorite-entry': (entry: DockEntry) => void;
2645
+ 'add-favorite-entry': (entry: DockEntry) => void;
2646
+ };
2647
+ /**
2648
+ * These are channel actions registered by the client (enterprise dock)
2649
+ * @internal
2650
+ */
2651
+ type EnterpriseDockChannelClientChannelActions = {
2652
+ 'update-favorite-entries': () => void;
2653
+ 'update-content-menu': () => void;
2654
+ 'navigate-content-menu': () => void;
2655
+ };
2656
+ /**
2657
+ * Used by Enterprise Dock for communication with the platform.
2658
+ * @internal
2659
+ */
2660
+ export interface EnterpriseDockChannelClient extends Omit<OpenFin.ChannelClient, 'dispatch' | 'register'> {
2661
+ dispatch: <T extends keyof EnterpriseDockChannelProviderChannelActions>(action: T, payload: Parameters<EnterpriseDockChannelProviderChannelActions[T]>[0]) => Promise<Awaited<ReturnType<EnterpriseDockChannelProviderChannelActions[T]>>>;
2662
+ register: <T extends keyof EnterpriseDockChannelClientChannelActions>(action: T, handler: (payload: Parameters<EnterpriseDockChannelClientChannelActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<EnterpriseDockChannelClientChannelActions[T]>>>) => boolean;
2663
+ }
2664
+ /**
2665
+ * Used by the platform for communication with Enterprise Dock.
2666
+ * @internal
2667
+ */
2668
+ export interface EnterpriseDockChannelProvider extends Omit<OpenFin.ChannelProvider, 'dispatch' | 'register'> {
2669
+ dispatch: <T extends keyof EnterpriseDockChannelClientChannelActions>(to: OpenFin.ClientIdentity, action: T, payload: Parameters<EnterpriseDockChannelClientChannelActions[T]>[0]) => Promise<Awaited<ReturnType<EnterpriseDockChannelClientChannelActions[T]>>>;
2670
+ register: <T extends keyof EnterpriseDockChannelProviderChannelActions>(action: T, handler: (payload: Parameters<EnterpriseDockChannelProviderChannelActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<EnterpriseDockChannelProviderChannelActions[T]>>>) => boolean;
2671
+ }
@@ -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;
@@ -3,6 +3,7 @@ export declare const getWindowChannelId: (identity: OpenFin.Identity, prefix?: s
3
3
  export interface ChannelClient extends OpenFin.ChannelClient {
4
4
  dispatch: (action: (typeof BrowserChannelAction)[keyof BrowserChannelAction], payload?: any) => Promise<any>;
5
5
  }
6
+ export declare const getNamedChannelClient: (channelName: string) => Promise<ChannelClient>;
6
7
  export declare const getChannelClient: (identity: OpenFin.Identity, prefix?: string) => Promise<ChannelClient>;
7
8
  /**
8
9
  * If the browser window is reloaded too quickly, runtime will
@@ -33,7 +34,8 @@ declare enum GeneralBrowserChannelActions {
33
34
  SetSelectedScheme = "set-selected-scheme",
34
35
  ShowBrowserIndicator = "show-browser-indicator",
35
36
  SetSelectedLanguage = "set-selected-language",
36
- RefreshBookmarksInternal = "refresh-bookmarks"
37
+ RefreshBookmarksInternal = "refresh-bookmarks",
38
+ GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views"
37
39
  }
38
40
  /**
39
41
  * All of the remote procedures that can be called in the
@@ -70,7 +72,15 @@ export declare enum EnterpriseBookmarkChannelAction {
70
72
  UpdateBookmarkNode = "update-bookmark-node",
71
73
  DeleteBookmarkNode = "delete-bookmark-node"
72
74
  }
75
+ export declare enum CompanionDockChannelAction {
76
+ UpdateFavoriteEntries = "update-favorite-entries",
77
+ UpdateContentMenu = "update-content-menu",
78
+ NavigateContentMenu = "navigate-content-menu"
79
+ }
73
80
  export declare const BrowserChannelAction: {
81
+ UpdateFavoriteEntries: CompanionDockChannelAction.UpdateFavoriteEntries;
82
+ UpdateContentMenu: CompanionDockChannelAction.UpdateContentMenu;
83
+ NavigateContentMenu: CompanionDockChannelAction.NavigateContentMenu;
74
84
  GetPages: PageChannelAction.GetPages;
75
85
  GetActivePageForWindow: PageChannelAction.GetActivePageForWindow;
76
86
  AttachPagesToWindow: PageChannelAction.AttachPagesToWindow;
@@ -93,6 +103,7 @@ export declare const BrowserChannelAction: {
93
103
  ShowBrowserIndicator: GeneralBrowserChannelActions.ShowBrowserIndicator;
94
104
  SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
95
105
  RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
106
+ GetLayoutsWithSelectedViewsInternal: GeneralBrowserChannelActions.GetLayoutsWithSelectedViewsInternal;
96
107
  };
97
108
  export type BrowserChannelAction = typeof BrowserChannelAction;
98
109
  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;
@@ -17,10 +18,24 @@ export interface WorkspaceThemeSet extends ThemeSet {
17
18
  light: ThemeExtension;
18
19
  dark: ThemeExtension;
19
20
  }
21
+ interface EnterpriseBrandIcons {
22
+ /**
23
+ * @internal
24
+ * Internal brand options for Enterprise Browser
25
+ */
26
+ symbol: string;
27
+ }
20
28
  export interface ThemeExtension extends DefaultTheme {
21
29
  notificationIndicatorColors?: Record<string, Omit<NotificationIndicatorColorsSet, 'foreground'> & {
22
30
  foreground: string;
23
31
  }>;
32
+ /**
33
+ * @internal
34
+ * Internal brand options for Enterprise Browser
35
+ */
36
+ brand: {
37
+ icons: EnterpriseBrandIcons;
38
+ };
24
39
  }
25
40
  export interface NotificationIndicatorColorsSet {
26
41
  background: string;
@@ -38,8 +53,18 @@ export type NotificationIndicatorColorsWithScheme = Record<string, NotificationI
38
53
  export interface BaseThemeOptions {
39
54
  label: string;
40
55
  logoUrl?: string;
56
+ /**
57
+ * @internal
58
+ * Internal brand options for Enterprise Browser
59
+ */
60
+ brand?: {
61
+ icons?: {
62
+ dark?: EnterpriseBrandIcons;
63
+ light?: EnterpriseBrandIcons;
64
+ };
65
+ };
41
66
  }
42
- export interface CustomThemeOptions extends BaseThemeOptions {
67
+ export type CustomThemeOptions = BaseThemeOptions & {
43
68
  palette: CustomPaletteSet;
44
69
  /**
45
70
  * NOTE: Only used in Notifications
@@ -65,8 +90,8 @@ export interface CustomThemeOptions extends BaseThemeOptions {
65
90
  * ```
66
91
  */
67
92
  notificationIndicatorColors?: Record<string, NotificationIndicatorColorsSet>;
68
- }
69
- export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
93
+ };
94
+ export type CustomThemeOptionsWithScheme = BaseThemeOptions & {
70
95
  /**
71
96
  * The default color scheme for this theme.
72
97
  *
@@ -119,7 +144,7 @@ export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
119
144
  * ```
120
145
  */
121
146
  notificationIndicatorColors?: NotificationIndicatorColorsWithScheme;
122
- }
147
+ };
123
148
  export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme)[];
124
149
  export interface PreloadedThemeData {
125
150
  themes: CustomThemes;
@@ -247,3 +272,5 @@ export declare const computeThemes: (customThemes: CustomThemes, storedScheme?:
247
272
  export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
248
273
  export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
249
274
  export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, 'system'>>;
275
+ export declare const getComputedBackgroundColor: (paletteKey: keyof typeof Palette, defaultColor?: string) => Promise<string>;
276
+ export {};
@@ -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;
@@ -0,0 +1,7 @@
1
+ import { MutableRefObject } from 'react';
2
+ import OpenFin from '@openfin/core';
3
+ export declare const useAddEditBookmarkDialog: (bookmarkIconRef: MutableRefObject<HTMLElement | null>, selectedView?: OpenFin.View) => {
4
+ showDialog: () => Promise<void>;
5
+ isDialogShown: boolean;
6
+ isBookmarkUpdatedOrCreated: boolean;
7
+ };
@@ -0,0 +1,13 @@
1
+ import type OpenFin from '@openfin/core';
2
+ interface PreloadedWindowOptions {
3
+ windowName: string;
4
+ route: string;
5
+ width?: number;
6
+ height?: number;
7
+ windowType?: string;
8
+ shouldPreload: boolean;
9
+ }
10
+ export default function usePreloadedWindow({ windowName, route, width, height, windowType, shouldPreload }: PreloadedWindowOptions & {
11
+ shouldPreload?: boolean;
12
+ }): OpenFin.Window;
13
+ export {};
@@ -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[];
@@ -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;
@@ -0,0 +1,3 @@
1
+ import OpenFin from '@openfin/core';
2
+ export declare const getBrowserWindow: () => Promise<import("@client-platform/shapes").BrowserWindowModule>;
3
+ export declare const getBrowserWindowWithoutView: (browserIdentity?: OpenFin.Identity) => Promise<import("@client-platform/shapes").BrowserWindowModule>;
@@ -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
  };