@openfin/workspace 20.1.0 → 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.
- package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +1 -2
- package/browser/src/components/ControlBar/SearchMenu/utils.d.ts +3 -1
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +2 -2
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +1 -1
- package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +1 -1
- package/client-api-platform/src/api/bookmarks.d.ts +2 -0
- package/client-api-platform/src/api/dock.d.ts +13 -0
- package/client-api-platform/src/index.d.ts +1 -1
- package/client-api-platform/src/init/index.d.ts +4 -2
- package/client-api-platform/src/shapes.d.ts +172 -3
- package/common/src/api/overrides.d.ts +0 -2
- package/common/src/api/protocol/browser.d.ts +11 -1
- package/common/src/api/protocol/workspace-platform.d.ts +12 -1
- package/common/src/api/theming.d.ts +31 -4
- package/common/src/api/workspace-events.d.ts +1 -1
- package/common/src/brand/default-brand.d.ts +8 -0
- package/common/src/components/BaseButton/BaseButton.d.ts +2 -4
- package/common/src/components/CloseButton/CloseButtonLarge.d.ts +4 -0
- package/common/src/styles/svg-icons.d.ts +1 -1
- package/common/src/utils/bookmark-item-context-menu.d.ts +5 -0
- package/common/src/utils/bookmarks.d.ts +7 -3
- package/common/src/utils/enterprise-dock.d.ts +3 -0
- package/common/src/utils/menu-window-provider.d.ts +1 -0
- package/common/src/utils/modal-bounds.d.ts +7 -0
- package/common/src/utils/popup-window.d.ts +4 -7
- package/common/src/utils/route.d.ts +2 -1
- package/common/src/utils/shared-emitter.d.ts +5 -0
- package/common/src/utils/usage-register.d.ts +1 -0
- package/common/src/utils/window.d.ts +2 -1
- package/home.js +215 -127
- package/home.js.map +1 -1
- package/index.js +215 -127
- package/index.js.map +1 -1
- package/notifications.js +285 -197
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/store.js +215 -127
- package/store.js.map +1 -1
- package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +0 -8
- package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +0 -7
|
@@ -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
|
|
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
|
|
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 {
|
|
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").
|
|
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,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,4 +1,6 @@
|
|
|
1
|
-
import
|
|
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<
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
+
}
|
|
@@ -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
|
|
@@ -71,7 +72,15 @@ export declare enum EnterpriseBookmarkChannelAction {
|
|
|
71
72
|
UpdateBookmarkNode = "update-bookmark-node",
|
|
72
73
|
DeleteBookmarkNode = "delete-bookmark-node"
|
|
73
74
|
}
|
|
75
|
+
export declare enum CompanionDockChannelAction {
|
|
76
|
+
UpdateFavoriteEntries = "update-favorite-entries",
|
|
77
|
+
UpdateContentMenu = "update-content-menu",
|
|
78
|
+
NavigateContentMenu = "navigate-content-menu"
|
|
79
|
+
}
|
|
74
80
|
export declare const BrowserChannelAction: {
|
|
81
|
+
UpdateFavoriteEntries: CompanionDockChannelAction.UpdateFavoriteEntries;
|
|
82
|
+
UpdateContentMenu: CompanionDockChannelAction.UpdateContentMenu;
|
|
83
|
+
NavigateContentMenu: CompanionDockChannelAction.NavigateContentMenu;
|
|
75
84
|
GetPages: PageChannelAction.GetPages;
|
|
76
85
|
GetActivePageForWindow: PageChannelAction.GetActivePageForWindow;
|
|
77
86
|
AttachPagesToWindow: PageChannelAction.AttachPagesToWindow;
|
|
@@ -94,6 +103,7 @@ export declare const BrowserChannelAction: {
|
|
|
94
103
|
ShowBrowserIndicator: GeneralBrowserChannelActions.ShowBrowserIndicator;
|
|
95
104
|
SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
|
|
96
105
|
RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
|
|
106
|
+
GetLayoutsWithSelectedViewsInternal: GeneralBrowserChannelActions.GetLayoutsWithSelectedViewsInternal;
|
|
97
107
|
};
|
|
98
108
|
export type BrowserChannelAction = typeof BrowserChannelAction;
|
|
99
109
|
export {};
|
|
@@ -73,7 +73,18 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
73
73
|
GetCuratedContentInternal = "getCuratedContentInternal",
|
|
74
74
|
HandleRequestNavigationInternal = "handleRequestNavigationInternal",
|
|
75
75
|
RefreshBookmarksInternal = "refreshBookmarksInternal",
|
|
76
|
-
|
|
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
|
|
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
|
|
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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SizeType } from '@openfin/ui-library';
|
|
3
|
-
export interface
|
|
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<
|
|
52
|
+
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
55
53
|
export default BaseButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<(
|
|
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:
|
|
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[];
|
|
@@ -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
|
-
|
|
58
|
+
anchorBehavior?: AnchorBehavior;
|
|
59
|
+
payload: (OpenFin.ShowPopupMenuOptions | {
|
|
61
60
|
pageId: string;
|
|
62
|
-
} | BookmarkButtonPayload
|
|
63
|
-
|
|
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
|
};
|