@openfin/workspace 19.3.2 → 19.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBarInput.d.ts +7 -7
- package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +10 -0
- package/browser/src/components/ControlBar/SearchMenu/useBookmarkButtonHover.d.ts +2 -0
- package/browser/src/components/ControlBar/SearchMenu/useEnterpriseBookmarkDialogWindow.d.ts +2 -0
- package/browser/src/components/ControlBar/SearchMenu/useIsBookmarked.d.ts +1 -0
- package/browser/src/components/ControlBar/SearchMenu/useIsSelectedViewNavigated.d.ts +5 -0
- package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts +8 -0
- package/browser/src/components/ControlBar/SearchMenu/utils.d.ts +9 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +17 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksFolderHeader.d.ts +8 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanel.d.ts +9 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanelHeader.d.ts +3 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +15 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksSearchInput.d.ts +7 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +8 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +16 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/useUpdateBookmarkResultsActions.d.ts +15 -0
- package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +7 -0
- package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +4 -2
- package/browser/src/hooks/usePanelBounds.d.ts +2 -1
- package/browser/src/hooks/useSingleViewPage.d.ts +2 -0
- package/browser/src/hooks/useWindowFocusState.d.ts +17 -0
- package/client-api-platform/src/api/browser/bookmarks.d.ts +6 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +3 -1
- package/client-api-platform/src/shapes.d.ts +55 -2
- package/common/src/api/pages/shapes.d.ts +91 -0
- package/common/src/api/protocol/browser.d.ts +13 -1
- package/common/src/api/protocol/workspace-platform.d.ts +1 -0
- package/common/src/components/BaseButton/BaseButton.d.ts +55 -0
- package/common/src/hooks/context.d.ts +9 -1
- package/common/src/hooks/useAddEditBookmarkDialog.d.ts +7 -0
- package/common/src/hooks/usePreloadedWindow.d.ts +13 -0
- package/common/src/utils/bookmark-item-context-menu.d.ts +3 -0
- package/common/src/utils/bookmarks.d.ts +12 -0
- package/common/src/utils/enterprise-channels.d.ts +13 -0
- package/common/src/utils/get-browser-window.d.ts +3 -0
- package/common/src/utils/menu-config.d.ts +1 -0
- package/common/src/utils/modal-bounds.d.ts +0 -8
- package/common/src/utils/popup-window.d.ts +12 -1
- package/common/src/utils/route.d.ts +3 -1
- package/common/src/utils/window.d.ts +12 -1
- package/home.js +3 -3
- package/home.js.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/store.js +3 -3
- package/store.js.map +1 -1
- package/common/src/utils/enterprise-context-menu-cahnnels.d.ts +0 -4
|
@@ -3,16 +3,16 @@ import { OpenFin } from '@openfin/core';
|
|
|
3
3
|
import { BrowserSearchMenuKeyboardEvent } from '../../../../../../../common/src/utils/popup-window';
|
|
4
4
|
import { SearchViewExpansionState, SecureIconState } from './AddressBar';
|
|
5
5
|
type AddressBarInputProps = {
|
|
6
|
-
addressSearchResultsView
|
|
7
|
-
addressBarInputRef
|
|
8
|
-
inputContainerRef
|
|
9
|
-
addressBarWidth
|
|
6
|
+
addressSearchResultsView: OpenFin.View;
|
|
7
|
+
addressBarInputRef: MutableRefObject<HTMLInputElement>;
|
|
8
|
+
inputContainerRef: MutableRefObject<HTMLDivElement>;
|
|
9
|
+
addressBarWidth: number;
|
|
10
10
|
isSecure: SecureIconState;
|
|
11
|
-
setShouldExpandMenu
|
|
12
|
-
shouldExpandMenu
|
|
11
|
+
setShouldExpandMenu: Dispatch<SetStateAction<SearchViewExpansionState>>;
|
|
12
|
+
shouldExpandMenu: SearchViewExpansionState;
|
|
13
13
|
setSearchText: Dispatch<SetStateAction<string>>;
|
|
14
14
|
searchText: string;
|
|
15
|
-
|
|
15
|
+
sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => void;
|
|
16
16
|
};
|
|
17
17
|
export declare const AddressBarInput: React.FC<AddressBarInputProps>;
|
|
18
18
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type BookmarkIconProps = {
|
|
3
|
+
inputContainerRef: React.MutableRefObject<HTMLDivElement>;
|
|
4
|
+
iconGradientClick?: () => void;
|
|
5
|
+
url?: string;
|
|
6
|
+
isMenuExpanded?: boolean;
|
|
7
|
+
disableMonitorBookmarkPanelActions?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const BookmarkButton: ({ inputContainerRef, url, iconGradientClick, isMenuExpanded, disableMonitorBookmarkPanelActions }: BookmarkIconProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsBookmarked: (url?: string, ...beacons: (any | undefined)[]) => boolean;
|
package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts
ADDED
|
@@ -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,9 @@
|
|
|
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 getSiteSubTitle: (site: Site) => string;
|
|
8
|
+
export declare const checkViewUrl: (view: OpenFin.View | null, url: string, setViewNavigatedToUrl: (value: boolean) => void) => Promise<void>;
|
|
9
|
+
export declare const searchBookmark: (url: string, browserIdentity?: OpenFin.Identity) => Promise<BookmarkNode | undefined>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
3
|
+
import { Props as BaseButtonProps } from '../../../../../common/src/components/BaseButton/BaseButton';
|
|
4
|
+
interface BookmarkItemProps {
|
|
5
|
+
bookmark: BookmarkNode;
|
|
6
|
+
isRenaming: boolean;
|
|
7
|
+
handleNavigateToFolder: (folderId: string) => void;
|
|
8
|
+
setRenamingNode: (id?: string) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("react").NamedExoticComponent<BookmarkItemProps>;
|
|
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 & {
|
|
13
|
+
isRenaming?: boolean;
|
|
14
|
+
}, never>;
|
|
15
|
+
export declare const BookmarkItemButtonContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const BookmarkFolderIcon: React.FC;
|
|
17
|
+
export declare const BookmarkFavoritesIcon: React.FC;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
3
|
+
interface BookmarksPanelHeaderProps {
|
|
4
|
+
folder: BookmarkNode;
|
|
5
|
+
handleNavigateToFolder: (folderId: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const BookmarksFolderHeader: React.FC<BookmarksPanelHeaderProps>;
|
|
8
|
+
export default BookmarksFolderHeader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const BookmarksPanel: () => JSX.Element;
|
|
3
|
+
export default BookmarksPanel;
|
|
4
|
+
export declare const TextHelp: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLElement> & {
|
|
5
|
+
color?: "background6" | "textDefault";
|
|
6
|
+
children: import("react").ReactNode;
|
|
7
|
+
size?: "small" | "base" | "large" | "xsmall" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge";
|
|
8
|
+
weight?: "normal" | "bold";
|
|
9
|
+
}, never>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
3
|
+
import { CategorizedBookmarkSearchResults } from './utils';
|
|
4
|
+
interface BookmarksResultsProps {
|
|
5
|
+
currentFolder: BookmarkNode;
|
|
6
|
+
bookmarksList: BookmarkNode[];
|
|
7
|
+
categorizedSearchResults: CategorizedBookmarkSearchResults;
|
|
8
|
+
isSearchQueryResults: boolean;
|
|
9
|
+
renamingNodeId: string | undefined;
|
|
10
|
+
handleNavigateToFolder: (folderId: string) => void;
|
|
11
|
+
setRenamingNode: (id?: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const BookmarksResults: React.FC<BookmarksResultsProps>;
|
|
14
|
+
export default BookmarksResults;
|
|
15
|
+
export declare const TextHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
interface BookmarksSearchInputProps {
|
|
3
|
+
handleSearchInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
4
|
+
clearSearchInput: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const BookmarksSearchInput: React.FC<BookmarksSearchInputProps>;
|
|
7
|
+
export default BookmarksSearchInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook that returns function to handle navigation for a click on a bookmark item.
|
|
5
|
+
*
|
|
6
|
+
* @returns {Function} Function to handle bookmark navigation click.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useBookmarkNavigation: () => (bookmark: BookmarkNode, event: MouseEvent<HTMLButtonElement>) => Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
2
|
+
import { CategorizedBookmarkSearchResults } from './utils';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook that manages and sorts bookmark search results and returns an object of categorized bookmarks
|
|
5
|
+
* and actions to update the search query.
|
|
6
|
+
*
|
|
7
|
+
* @returns {Object} An object containing the following:
|
|
8
|
+
* - `categorizedSearchResults` : An object containing two arrays, `bookmarksInFolder` and `bookmarksOutsideFolder`.
|
|
9
|
+
* - `handleSearchInputChange` : A function to update the search query phrase to retrieve new search results.
|
|
10
|
+
* - `clearSearchInput` : A function to clear the search query and reset the panel to its previous state.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useBookmarksSearch: (currentFolder: BookmarkNode, setSearchQuery: (query: string) => void, updateBookmarksResults: (folderId?: string, navigateToFolder?: boolean) => void) => {
|
|
13
|
+
categorizedSearchResults: CategorizedBookmarkSearchResults;
|
|
14
|
+
handleSearchInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
clearSearchInput: () => void;
|
|
16
|
+
};
|
package/browser/src/components/PanelContainer/BookmarksPanel/useUpdateBookmarkResultsActions.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook that retrieves the root node corresponding to All Bookmarks on initial render and
|
|
4
|
+
* provides actions to update bookmark results.
|
|
5
|
+
*
|
|
6
|
+
* @returns {Object} An object containing the following:
|
|
7
|
+
* - `bookmarksList` : `BookmarkNode[]` - A sorted list of the current folder's child bookmarks and folders.
|
|
8
|
+
* - `currentFolder` : `BookmarkNode` - The currently active folder.
|
|
9
|
+
* - `deleteBookmark` : A function to update currentFolder and bookmarksList given a specific folderId.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useUpdateBookmarkResultsActions: () => {
|
|
12
|
+
bookmarksList: BookmarkNode[];
|
|
13
|
+
currentFolder: BookmarkNode;
|
|
14
|
+
updateBookmarksResults: (folderId?: string) => Promise<void>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BookmarkNode } from '../../../../../common/src/api/pages/shapes';
|
|
2
|
+
export type CategorizedBookmarkSearchResults = {
|
|
3
|
+
bookmarksInFolder: BookmarkNode[];
|
|
4
|
+
bookmarksOutsideFolder: BookmarkNode[];
|
|
5
|
+
};
|
|
6
|
+
export declare const renderBookmarkNodeTitle: (title: string) => string;
|
|
7
|
+
export declare const categorizeSearchResults: (bookmarks: BookmarkNode[], folderId: string) => CategorizedBookmarkSearchResults;
|
|
@@ -11,6 +11,8 @@ import { SearchViewExpansionState } from '../../components/ControlBar/LeftContro
|
|
|
11
11
|
* @param {AttachedPageInternal} activePage - Object representing the currently active page in the browser window.
|
|
12
12
|
* @param {SearchViewExpansionState} shouldExpandMenu - Object with boolean indicating if the search results view should expand and the method of expansion.
|
|
13
13
|
* @param {string} searchText - String representing the current text in the address input.
|
|
14
|
-
* @
|
|
14
|
+
* @returns {{ sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => void }} - Object containing a function to send keyboard events to the search menu view.
|
|
15
15
|
*/
|
|
16
|
-
export declare const usePostMessageToSearchMenuView: (selectedViews: OpenFin.Identity[], searchMenuChannel: BroadcastChannel, activePage: AttachedPageInternal, shouldExpandMenu: SearchViewExpansionState, searchText: string
|
|
16
|
+
export declare const usePostMessageToSearchMenuView: (selectedViews: OpenFin.Identity[], searchMenuChannel: BroadcastChannel, activePage: AttachedPageInternal, shouldExpandMenu: SearchViewExpansionState, searchText: string) => {
|
|
17
|
+
sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => Promise<void>;
|
|
18
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { PanelPosition } from '../../../common/src/api/pages/shapes';
|
|
1
|
+
import { PanelConfigVertical, PanelPosition } from '../../../common/src/api/pages/shapes';
|
|
2
2
|
export type CSSBounds = Partial<Record<'top' | 'right' | 'bottom' | 'left' | 'height' | 'width', string>>;
|
|
3
|
+
export declare const BookmarksPanelConfig: PanelConfigVertical;
|
|
3
4
|
export declare const usePanelBounds: (panelPosition: PanelPosition | 'Center') => Partial<Record<"top" | "left" | "height" | "width" | "bottom" | "right", string>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type WindowState = 'focused' | 'view-focused' | 'blurred';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a context which exposes information about the specified window's state
|
|
5
|
+
*/
|
|
6
|
+
export declare const WindowStateProvider: (props: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Tracks the window's current state.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useWindowState: () => WindowState;
|
|
13
|
+
/**
|
|
14
|
+
* Tracks whether the window or any view within it is focused.
|
|
15
|
+
*/
|
|
16
|
+
declare const useWindowFocusState: () => boolean;
|
|
17
|
+
export default useWindowFocusState;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BookmarkNode, CreateBookmarkNodeRequest, UpdateBookmarkNodeRequest } from '../../../../common/src/api/pages/shapes';
|
|
2
|
+
export declare const createBookmarkNodeInternal: (req: CreateBookmarkNodeRequest) => Promise<BookmarkNode>;
|
|
3
|
+
export declare const getBookmarkNodeInternal: (id?: string) => Promise<BookmarkNode | undefined>;
|
|
4
|
+
export declare const searchBookmarkNodesInternal: (query: string) => Promise<BookmarkNode[]>;
|
|
5
|
+
export declare const updateBookmarkNodeInternal: (req: UpdateBookmarkNodeRequest) => Promise<BookmarkNode | undefined>;
|
|
6
|
+
export declare const deleteBookmarkNodeInternal: (id: string) => Promise<void>;
|
|
@@ -6,7 +6,8 @@ export declare enum AnchorBehavior {
|
|
|
6
6
|
BottomRight = 1,
|
|
7
7
|
Center = 2
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type ContextMenuPayload = OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload;
|
|
10
|
+
export declare const openCommonContextMenu: (payload: ContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: ContextMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
10
11
|
export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenGlobalContextMenuRequest & {
|
|
11
12
|
identity: OpenFin.Identity;
|
|
12
13
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
@@ -19,3 +20,4 @@ export declare function openPageTabContextMenuInternal(this: WorkspacePlatformPr
|
|
|
19
20
|
export declare function openSaveButtonContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenSaveButtonContextMenuRequest & {
|
|
20
21
|
identity: OpenFin.Identity;
|
|
21
22
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
23
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/ut
|
|
|
4
4
|
import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
5
5
|
import { Resource } from '../../common/src/api/i18next';
|
|
6
6
|
import { TrackedSite } from '../../common/src/api/pages/idb';
|
|
7
|
-
import
|
|
7
|
+
import { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
|
|
8
8
|
import { SetActivePageForWindowPayload } from '../../common/src/api/pages/shapes';
|
|
9
9
|
import { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
|
|
10
10
|
import type { CustomThemes } from '../../common/src/api/theming';
|
|
@@ -170,6 +170,12 @@ export declare enum EnterpriseMainContextMenuOptionType {
|
|
|
170
170
|
Print = "Print",
|
|
171
171
|
Pin = "Pin"
|
|
172
172
|
}
|
|
173
|
+
/** @internal */
|
|
174
|
+
export declare enum BookmarkItemContextMenuOptionType {
|
|
175
|
+
EditName = "Edit Name",
|
|
176
|
+
Move = "Move",
|
|
177
|
+
Delete = "Delete"
|
|
178
|
+
}
|
|
173
179
|
/**Shape of the data property of a global context menu template item */
|
|
174
180
|
export interface GlobalContextMenuItemData extends ContextMenuItemData {
|
|
175
181
|
type: GlobalContextMenuOptionType;
|
|
@@ -189,6 +195,13 @@ export interface AppearanceContextMenuItemData extends GlobalContextMenuItemData
|
|
|
189
195
|
export type GlobalContextMenuItemTemplate = OpenFin.MenuItemTemplate<GlobalContextMenuItemData>;
|
|
190
196
|
/** @internal */
|
|
191
197
|
export type EnterpriseMainContextMenuItemTemplate = OpenFin.MenuItemTemplate<EnterpriseMainContextMenuItemData>;
|
|
198
|
+
/** @internal */
|
|
199
|
+
export interface BookmarkItemContextMenuItemData extends ContextMenuItemData {
|
|
200
|
+
type: BookmarkItemContextMenuOptionType;
|
|
201
|
+
parentId?: string;
|
|
202
|
+
}
|
|
203
|
+
/** @internal */
|
|
204
|
+
export type BookmarkItemContextMenuItemTemplate = OpenFin.MenuItemTemplate<BookmarkItemContextMenuItemData>;
|
|
192
205
|
/**Shape of the data property of a page tab context menu template item */
|
|
193
206
|
export interface PageTabContextMenuItemData extends ContextMenuItemData {
|
|
194
207
|
type: PageTabContextMenuOptionType;
|
|
@@ -1084,6 +1097,39 @@ export interface BrowserWindowModule {
|
|
|
1084
1097
|
_getCuratedContent(req?: any): Promise<Site[]>;
|
|
1085
1098
|
/** @internal */
|
|
1086
1099
|
_handleRequestNavigation(args: NavigationRequest): Promise<void>;
|
|
1100
|
+
_bookmarks: BrowserBookmarks;
|
|
1101
|
+
}
|
|
1102
|
+
export interface BrowserBookmarks {
|
|
1103
|
+
/**
|
|
1104
|
+
* Implementation for creating a new bookmark node.
|
|
1105
|
+
* @param req The request object specifying the attributes of the new node.
|
|
1106
|
+
* @internal
|
|
1107
|
+
*/
|
|
1108
|
+
_createBookmarkNode(req: CreateBookmarkNodeRequest): Promise<BookmarkNode>;
|
|
1109
|
+
/**
|
|
1110
|
+
* Implementation for getting a bookmark node.
|
|
1111
|
+
* @param string The unique id of the node. Returns root node when left undefined.
|
|
1112
|
+
* @internal
|
|
1113
|
+
*/
|
|
1114
|
+
_getBookmarkNode(id?: string): Promise<BookmarkNode | undefined>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Implementation for searching for a bookmark node.
|
|
1117
|
+
* @param query The string used to filter bookmark nodes by title or, in the case of bookmarks, URL, as well.
|
|
1118
|
+
* @internal
|
|
1119
|
+
*/
|
|
1120
|
+
_searchBookmarkNodes(query: string): Promise<BookmarkNode[]>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Implementation for updating a bookmark node.
|
|
1123
|
+
* @param req The request object with the updated attributes of the targeted node.
|
|
1124
|
+
* @internal
|
|
1125
|
+
*/
|
|
1126
|
+
_updateBookmarkNode(req: UpdateBookmarkNodeRequest): Promise<BookmarkNode | undefined>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Implementation for deleting a bookmark node.
|
|
1129
|
+
* @param id The unique id of the node.
|
|
1130
|
+
* @internal
|
|
1131
|
+
*/
|
|
1132
|
+
_deleteBookmarkNode(id: string): Promise<void>;
|
|
1087
1133
|
}
|
|
1088
1134
|
/**
|
|
1089
1135
|
* @internal
|
|
@@ -1736,6 +1782,12 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
|
|
|
1736
1782
|
* Implementation for getting the notifications workspace platform configuration.
|
|
1737
1783
|
*/
|
|
1738
1784
|
getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
|
|
1785
|
+
_raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Triggers all browser windows to refresh bookmarks data
|
|
1788
|
+
* @internal
|
|
1789
|
+
*/
|
|
1790
|
+
_refreshBookmarksInternal(): Promise<void>;
|
|
1739
1791
|
/**
|
|
1740
1792
|
* The browser window factory for the Workspace Platform.
|
|
1741
1793
|
*/
|
|
@@ -1748,7 +1800,6 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
|
|
|
1748
1800
|
* Theme API for the Workspace Platform.
|
|
1749
1801
|
*/
|
|
1750
1802
|
Theme: ThemeApi;
|
|
1751
|
-
_raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
|
|
1752
1803
|
}
|
|
1753
1804
|
export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
1754
1805
|
/**
|
|
@@ -1988,6 +2039,8 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
1988
2039
|
}): Promise<SearchSitesResponse>;
|
|
1989
2040
|
/** @internal */
|
|
1990
2041
|
handleRequestNavigationInternal(req: NavigationRequest): Promise<void>;
|
|
2042
|
+
/** @internal */
|
|
2043
|
+
refreshBookmarksInternal(): Promise<void>;
|
|
1991
2044
|
}
|
|
1992
2045
|
/**
|
|
1993
2046
|
* The origins from which a custom action can be invoked
|
|
@@ -256,4 +256,95 @@ export type AddPagePayload = {
|
|
|
256
256
|
/** Index at which the page should be added */
|
|
257
257
|
insertionIndex?: number;
|
|
258
258
|
};
|
|
259
|
+
/**
|
|
260
|
+
* A node that represents either a bookmark or folder in the bookmark tree.
|
|
261
|
+
*/
|
|
262
|
+
export interface BookmarkNode {
|
|
263
|
+
/**
|
|
264
|
+
* The unique id of the node.
|
|
265
|
+
*/
|
|
266
|
+
id: string;
|
|
267
|
+
/**
|
|
268
|
+
* The title of the bookmark or folder.
|
|
269
|
+
*/
|
|
270
|
+
title: string;
|
|
271
|
+
/**
|
|
272
|
+
* The unique URL associated with a bookmark. Is undefined for folders.
|
|
273
|
+
*/
|
|
274
|
+
url?: string;
|
|
275
|
+
/**
|
|
276
|
+
* When this bookmark or folder was created, in milliseconds since the epoch.
|
|
277
|
+
*/
|
|
278
|
+
dateCreated: number;
|
|
279
|
+
/**
|
|
280
|
+
* The favicon to display next to titles for bookmarks. When no icon or a
|
|
281
|
+
* broken icon is provided, the default globe icon will be used instead. Is
|
|
282
|
+
* undefined for folders.
|
|
283
|
+
*/
|
|
284
|
+
favIcon?: string;
|
|
285
|
+
/**
|
|
286
|
+
* The id of the parent folder that contains a bookmark. Is undefined for the
|
|
287
|
+
* root node.
|
|
288
|
+
*/
|
|
289
|
+
parentId?: string;
|
|
290
|
+
/**
|
|
291
|
+
* The children of this node. Can only contain bookmarks. Is undefined for
|
|
292
|
+
* bookmarks.
|
|
293
|
+
*/
|
|
294
|
+
children?: BookmarkNode[];
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Request object to create a new bookmark node.
|
|
298
|
+
*/
|
|
299
|
+
export interface CreateBookmarkNodeRequest {
|
|
300
|
+
/**
|
|
301
|
+
* The title of the bookmark or folder.
|
|
302
|
+
*/
|
|
303
|
+
title: string;
|
|
304
|
+
/**
|
|
305
|
+
* The unique URL associated with the bookmark. Omit for folders.
|
|
306
|
+
*/
|
|
307
|
+
url?: string;
|
|
308
|
+
/**
|
|
309
|
+
* The favicon to display next to titles for bookmarks. When no icon or a
|
|
310
|
+
* broken icon is provided, the default globe icon will be used instead. Omit
|
|
311
|
+
* for folders.
|
|
312
|
+
*/
|
|
313
|
+
favIcon?: string;
|
|
314
|
+
/**
|
|
315
|
+
* The id of the parent folder for this bookmark. Omit for bookmarks under
|
|
316
|
+
* "All Bookmarks" and folders.
|
|
317
|
+
*/
|
|
318
|
+
parentId?: string;
|
|
319
|
+
}
|
|
320
|
+
export type UpdatedBookmarkNodeAttrs = {
|
|
321
|
+
/**
|
|
322
|
+
* The new title to apply to the bookmark/folder.
|
|
323
|
+
*/
|
|
324
|
+
title?: string;
|
|
325
|
+
/**
|
|
326
|
+
* The id of the parent folder to move this bookmark to. Leave undefined to
|
|
327
|
+
* move bookmark under "All Bookmarks". Omit for folders.
|
|
328
|
+
*/
|
|
329
|
+
parentId?: string;
|
|
330
|
+
/**
|
|
331
|
+
* The favicon to display next to titles for bookmarks. When no icon or a
|
|
332
|
+
* broken icon is provided, the default globe icon will be used instead. Omit
|
|
333
|
+
* for folders.
|
|
334
|
+
*/
|
|
335
|
+
favIcon?: string;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Request object to update a bookmark node.
|
|
339
|
+
*/
|
|
340
|
+
export interface UpdateBookmarkNodeRequest {
|
|
341
|
+
/**
|
|
342
|
+
* The unique id of the bookmark.
|
|
343
|
+
*/
|
|
344
|
+
id: string;
|
|
345
|
+
/**
|
|
346
|
+
* The object describing which attributes of the bookmark to update.
|
|
347
|
+
*/
|
|
348
|
+
changes: UpdatedBookmarkNodeAttrs;
|
|
349
|
+
}
|
|
259
350
|
export {};
|
|
@@ -32,7 +32,8 @@ declare enum GeneralBrowserChannelActions {
|
|
|
32
32
|
DuplicatePage = "duplicate-page",
|
|
33
33
|
SetSelectedScheme = "set-selected-scheme",
|
|
34
34
|
ShowBrowserIndicator = "show-browser-indicator",
|
|
35
|
-
SetSelectedLanguage = "set-selected-language"
|
|
35
|
+
SetSelectedLanguage = "set-selected-language",
|
|
36
|
+
RefreshBookmarksInternal = "refresh-bookmarks"
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* All of the remote procedures that can be called in the
|
|
@@ -59,6 +60,16 @@ export declare enum EnterpriseAppDirectoryChannelAction {
|
|
|
59
60
|
GetCuratedContent = "get-curated-content",
|
|
60
61
|
GetRecentlyVisited = "get-recently-visited"
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare enum EnterpriseBookmarkChannelAction {
|
|
67
|
+
CreateBookmarkNode = "create-bookmark-node",
|
|
68
|
+
GetBookmarkNode = "get-bookmark-node",
|
|
69
|
+
SearchBookmarkNodes = "search-bookmark-nodes",
|
|
70
|
+
UpdateBookmarkNode = "update-bookmark-node",
|
|
71
|
+
DeleteBookmarkNode = "delete-bookmark-node"
|
|
72
|
+
}
|
|
62
73
|
export declare const BrowserChannelAction: {
|
|
63
74
|
GetPages: PageChannelAction.GetPages;
|
|
64
75
|
GetActivePageForWindow: PageChannelAction.GetActivePageForWindow;
|
|
@@ -81,6 +92,7 @@ export declare const BrowserChannelAction: {
|
|
|
81
92
|
SetSelectedScheme: GeneralBrowserChannelActions.SetSelectedScheme;
|
|
82
93
|
ShowBrowserIndicator: GeneralBrowserChannelActions.ShowBrowserIndicator;
|
|
83
94
|
SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
|
|
95
|
+
RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
|
|
84
96
|
};
|
|
85
97
|
export type BrowserChannelAction = typeof BrowserChannelAction;
|
|
86
98
|
export {};
|
|
@@ -72,6 +72,7 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
72
72
|
SearchSitesInternal = "searchSitesInternal",
|
|
73
73
|
GetCuratedContentInternal = "getCuratedContentInternal",
|
|
74
74
|
HandleRequestNavigationInternal = "handleRequestNavigationInternal",
|
|
75
|
+
RefreshBookmarksInternal = "refreshBookmarksInternal",
|
|
75
76
|
GetNotificationsConfig = "getNotificationsConfig"
|
|
76
77
|
}
|
|
77
78
|
export type PlatFormSupportedFeatures = boolean | {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SizeType } from '@openfin/ui-library';
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Icon to be shown for the control.
|
|
6
|
+
*
|
|
7
|
+
* Accepts base64, url, or variables in CSS format.
|
|
8
|
+
*/
|
|
9
|
+
icon?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Title to be applied as a `title` attribute on the button.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* whether the button title property should be in title case
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
withTitleCase?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Additional CSS classes to be applied to the button.
|
|
21
|
+
*
|
|
22
|
+
* This can be useful when a unique style needs to be applied, for example, in a close button.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/** When the button is disabled, it cannot be clicked and mouseover does not have an effect */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Button selected state. Can be used to implement sticky buttons. */
|
|
28
|
+
selected?: boolean;
|
|
29
|
+
/** Use wide button */
|
|
30
|
+
wide?: boolean;
|
|
31
|
+
/** Disable hover/active background-color change */
|
|
32
|
+
hoverless?: boolean;
|
|
33
|
+
/** If not set, svgs in the button will be forced to 13px */
|
|
34
|
+
customContentSize?: boolean;
|
|
35
|
+
/** Border radius of the button. If not set defaults to 0px */
|
|
36
|
+
borderRadius?: SizeType;
|
|
37
|
+
/**
|
|
38
|
+
* The `onClick` handler for when the button is closed.
|
|
39
|
+
*
|
|
40
|
+
* It is up to the implementor to properly handle the event as they see fit.
|
|
41
|
+
*/
|
|
42
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
43
|
+
children: React.ReactNode | React.ReactNode[];
|
|
44
|
+
width?: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
isEnterprise?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Provides a basic browser title bar navigation button look and feel.
|
|
50
|
+
* Ensure the title is printed in “Title Case”.
|
|
51
|
+
*
|
|
52
|
+
* Note: This relies on global CSS and is written to run within the context of the Browser window which contains these globals.
|
|
53
|
+
*/
|
|
54
|
+
declare const BaseButton: React.ForwardRefExoticComponent<Props & React.HTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
55
|
+
export default BaseButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { ProviderInfoInternal, ProviderType } from '../../../common/src/api/provider';
|
|
3
3
|
export type ProviderContext<T extends ProviderType = any> = {
|
|
4
4
|
/**
|
|
@@ -48,3 +48,11 @@ export declare const BrowserLayoutDragContext: import("react").Context<{
|
|
|
48
48
|
export declare const BrowserContext: ({ children }: {
|
|
49
49
|
children?: React.ReactNode;
|
|
50
50
|
}) => JSX.Element;
|
|
51
|
+
export declare const BookmarksContext: import("react").Context<{
|
|
52
|
+
mostRecentlyUpdated: number;
|
|
53
|
+
isBookmarksPanelOpen: boolean;
|
|
54
|
+
setIsBookmarksPanelOpen: Dispatch<SetStateAction<boolean>>;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const BookmarksContextProvider: ({ children }: {
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
}) => JSX.Element;
|
|
@@ -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 {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OpenFin } from '@openfin/core';
|
|
2
|
+
import { BookmarkItemContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare const getBookmarkItemContextMenuTemplate: (callerIdentity: OpenFin.Identity, bookmarkId: string) => Promise<BookmarkItemContextMenuItemTemplate[]>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BookmarkNode } from '../../../common/src/api/pages/shapes';
|
|
2
|
+
export declare const ALL_BOOKMARKS_FOLDER_TITLE = "_ALL_BOOKMARKS_";
|
|
3
|
+
export declare const FAVORITES_FOLDER_TITLE = "_FAVORITES_";
|
|
4
|
+
export type BookmarkFolder = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
12
|
+
export declare const getBookmarkFoldersList: (rootNode: BookmarkNode) => BookmarkFolder[];
|