@openfin/workspace 19.3.1 → 19.3.3
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/api/color-linking.d.ts +23 -0
- package/browser/src/api/controls.d.ts +23 -0
- package/browser/src/api/pages/attached.d.ts +23 -0
- package/browser/src/api/pages/state.d.ts +10 -0
- package/browser/src/api/panels.d.ts +104 -0
- package/browser/src/api/view.d.ts +22 -0
- package/browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar.d.ts +15 -0
- package/browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBarInput.d.ts +18 -0
- package/browser/src/components/ControlBar/RightControlsContainer/ToolbarContainer/menus/menuConfig.d.ts +17 -0
- package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +10 -0
- package/browser/src/components/ControlBar/SearchMenu/CommandBar.d.ts +9 -0
- package/browser/src/components/ControlBar/SearchMenu/Icons.d.ts +23 -0
- package/browser/src/components/ControlBar/SearchMenu/ResultIcon.d.ts +11 -0
- package/browser/src/components/ControlBar/SearchMenu/SecureIcon.d.ts +5 -0
- package/browser/src/components/ControlBar/SearchMenu/UrlInput.d.ts +3 -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/useIsPageOpen.d.ts +3 -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/ControlBar/Tablist/utils.d.ts +8 -0
- package/browser/src/components/ControlBar/utils.d.ts +1 -0
- package/browser/src/components/LandingPage/BrandIcon.d.ts +6 -0
- package/browser/src/components/LayoutContainer/utils.d.ts +10 -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/components/PanelContainer/PanelContainer.d.ts +8 -0
- package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/getDimensions.d.ts +14 -0
- package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/useAdjustSearchMenuViewDimensions.d.ts +29 -0
- package/browser/src/hooks/EnterpriseSearchMenu/useInitChannelToSearchMenuView.d.ts +17 -0
- package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +16 -0
- package/browser/src/hooks/EnterpriseSearchMenu/useProcessChildContentBlockEvent.d.ts +3 -0
- package/browser/src/hooks/EnterpriseSearchMenu/useSearchMenuViewLifecycleManager.d.ts +16 -0
- package/browser/src/hooks/EnterpriseSearchMenu/useUpdateInputExpansionState.d.ts +15 -0
- package/browser/src/hooks/EnterpriseSearchMenu/useUpdateViewExpansionState.d.ts +14 -0
- package/browser/src/hooks/useEnterpriseHotkeys.d.ts +4 -0
- package/browser/src/hooks/usePanelBounds.d.ts +4 -0
- package/browser/src/hooks/useSingleViewPage.d.ts +2 -0
- package/browser/src/hooks/useWindowFocusState.d.ts +17 -0
- package/browser/src/slices/menu.d.ts +28 -0
- package/browser/src/slices/modal/close.d.ts +10 -0
- package/browser/src/slices/modal/index.d.ts +8 -0
- package/browser/src/slices/pages/attached.d.ts +83 -0
- package/browser/src/slices/tab-focus.d.ts +85 -0
- package/browser/src/store/index.d.ts +90 -0
- package/client-api-platform/src/api/app-directory.d.ts +2 -2
- 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/init/override-callback/enterprise-page-required-layout-settings.d.ts +5 -0
- package/client-api-platform/src/shapes.d.ts +63 -2
- package/common/src/api/pages/internal.d.ts +8 -0
- 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/api/workspace-events.d.ts +49 -0
- package/common/src/components/BaseButton/BaseButton.d.ts +55 -0
- package/common/src/components/Icon/CustomIcon.d.ts +15 -0
- package/common/src/hooks/context.d.ts +58 -0
- package/common/src/hooks/useAddEditBookmarkDialog.d.ts +7 -0
- package/common/src/hooks/usePlatformTheme.d.ts +6 -0
- package/common/src/hooks/usePreloadedWindow.d.ts +13 -0
- package/common/src/hooks/useSystemSchemeCheck.d.ts +13 -0
- package/common/src/slices/environment.d.ts +22 -0
- package/common/src/slices/target-theming.d.ts +56 -0
- package/common/src/styles/svg-icons.d.ts +7 -0
- package/common/src/utils/a11y/index.d.ts +3 -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/custom-logo.d.ts +16 -0
- package/common/src/utils/enterprise-channels.d.ts +13 -0
- package/common/src/utils/enterpriseBrowser.d.ts +1 -0
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/get-browser-window.d.ts +3 -0
- package/common/src/utils/interop.d.ts +30 -0
- package/common/src/utils/layout.d.ts +6 -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/navigate.d.ts +8 -0
- package/common/src/utils/popup-window.d.ts +31 -10
- package/common/src/utils/route.d.ts +4 -2
- package/common/src/utils/test-ids.d.ts +70 -0
- package/common/src/utils/url.d.ts +1 -0
- 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
|
@@ -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,49 @@
|
|
|
1
|
+
import { NavigatePayload } from '../../../common/src/utils/navigate';
|
|
2
|
+
import { ProviderConnectionPayload, ProviderDisconnectionPayload, ProviderUpdatePayload } from './provider';
|
|
3
|
+
/**
|
|
4
|
+
* All Workspace related events that can be emitted or listened to
|
|
5
|
+
* by the Workspace Provider or any of the workspace components
|
|
6
|
+
*/
|
|
7
|
+
type EventTypeTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Emitted when a search is invoked.
|
|
10
|
+
*/
|
|
11
|
+
'search-invoked': [string];
|
|
12
|
+
/**
|
|
13
|
+
* Emitted when a new provider is connected.
|
|
14
|
+
*
|
|
15
|
+
* For example, when a Dock Provider is successfully registered by the platform provider
|
|
16
|
+
*/
|
|
17
|
+
'provider-connected': [ProviderConnectionPayload];
|
|
18
|
+
/**
|
|
19
|
+
* Emitted when a provider is disconnected.
|
|
20
|
+
*
|
|
21
|
+
* For example, when a Dock Provider is deregistered by the platform provider
|
|
22
|
+
*/
|
|
23
|
+
'provider-disconnected': [ProviderDisconnectionPayload];
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when a provider is updated.
|
|
26
|
+
*
|
|
27
|
+
* For example, when a Dock Provider is updated by the platform provider
|
|
28
|
+
*/
|
|
29
|
+
'provider-updated': [ProviderUpdatePayload];
|
|
30
|
+
/**
|
|
31
|
+
* Emmitted when notifications is created or destroyed.
|
|
32
|
+
*/
|
|
33
|
+
'update-notification-running-status': [];
|
|
34
|
+
/**
|
|
35
|
+
* Emitted when the list of search providers has been updated.
|
|
36
|
+
*/
|
|
37
|
+
'search-provider-list-updated': [];
|
|
38
|
+
/**
|
|
39
|
+
* Emmitted when a component is created or destroyed.
|
|
40
|
+
*/
|
|
41
|
+
'component-lifecycle-update': [];
|
|
42
|
+
/**
|
|
43
|
+
* Emitted when component should be navigated to.
|
|
44
|
+
* Contains the target provider ID and the component name.
|
|
45
|
+
*/
|
|
46
|
+
'component-navigation': [NavigatePayload];
|
|
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>;
|
|
49
|
+
export {};
|
|
@@ -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;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconSizeType } from '@openfin/ui-library';
|
|
3
|
+
/**
|
|
4
|
+
* Simple and reusable icon component. The required prop is an iconURL.
|
|
5
|
+
*/
|
|
6
|
+
interface CustomIconProps {
|
|
7
|
+
iconURL?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
size?: IconSizeType;
|
|
10
|
+
description?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
applyThemeColor?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const CustomIcon: React.FC<CustomIconProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { ProviderInfoInternal, ProviderType } from '../../../common/src/api/provider';
|
|
3
|
+
export type ProviderContext<T extends ProviderType = any> = {
|
|
4
|
+
/**
|
|
5
|
+
* The currently active provider.
|
|
6
|
+
*/
|
|
7
|
+
activeProvider: ProviderInfoInternal<T> | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Sets the active provider.
|
|
10
|
+
* @param provider The provider to set as active.
|
|
11
|
+
*/
|
|
12
|
+
setActiveProvider: (provider: ProviderInfoInternal<T>) => void;
|
|
13
|
+
/**
|
|
14
|
+
* All providers currently available.
|
|
15
|
+
*/
|
|
16
|
+
providers: ProviderInfoInternal<T>[];
|
|
17
|
+
/**
|
|
18
|
+
* Updates a provider.
|
|
19
|
+
* Dispatches a channel action back to the Workspace Provider.
|
|
20
|
+
*
|
|
21
|
+
* @param updatedProvider The updated provider.
|
|
22
|
+
* @returns A promise that resolves when the provider has been updated.
|
|
23
|
+
*/
|
|
24
|
+
updateProvider: (updatedProvider: ProviderInfoInternal<T>) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A hook that returns data related to the active provider, and all providers
|
|
28
|
+
*
|
|
29
|
+
* A generic **must** be provided to specify the type of provider to return
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const { activeProvider, setActiveProvider, providers } = usePlatformProviders<'dock'>();
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const usePlatformProviders: <T extends ProviderType = never>() => T extends never ? never : ProviderContext<T>;
|
|
37
|
+
export declare const ProviderContext: <T extends ProviderType>({ children, providerType }: {
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
providerType: T;
|
|
40
|
+
}) => JSX.Element;
|
|
41
|
+
export declare const BrowserTypeContext: import("react").Context<{
|
|
42
|
+
isEnterprise?: boolean | null;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const BrowserLayoutDragContext: import("react").Context<{
|
|
45
|
+
isAcceptingLayoutDrag: boolean;
|
|
46
|
+
setIsAcceptingLayoutDrag: (value: boolean) => void;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const BrowserContext: ({ children }: {
|
|
49
|
+
children?: React.ReactNode;
|
|
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,13 @@
|
|
|
1
|
+
import { ColorSchemeType } from '@openfin/ui-library';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook that checks the system color scheme and provides information about the current scheme.
|
|
4
|
+
*
|
|
5
|
+
* @returns An object containing the current color scheme, system color scheme, and a boolean indicating if the scheme is dark.
|
|
6
|
+
*/
|
|
7
|
+
interface SystemSchemeCheck {
|
|
8
|
+
currentScheme: Omit<ColorSchemeType, 'system'>;
|
|
9
|
+
systemScheme: Omit<ColorSchemeType, 'system'>;
|
|
10
|
+
isSchemeDark: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function useSystemSchemeCheck(): SystemSchemeCheck;
|
|
13
|
+
export default useSystemSchemeCheck;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface EnvironmentRootState {
|
|
2
|
+
environment: {
|
|
3
|
+
isWindows: boolean;
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
export declare const getEnvironment: import("@reduxjs/toolkit").AsyncThunk<boolean, void, {}>;
|
|
7
|
+
export declare const environmentSlice: import("@reduxjs/toolkit").Slice<{
|
|
8
|
+
isWindows: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
setEnvironment: (state: import("immer/dist/internal").WritableDraft<{
|
|
11
|
+
isWindows: boolean;
|
|
12
|
+
}>, action: {
|
|
13
|
+
payload: any;
|
|
14
|
+
type: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}, "environment">;
|
|
17
|
+
export declare const setEnvironment: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
18
|
+
export declare const selectIsWindows: (state: EnvironmentRootState) => boolean;
|
|
19
|
+
declare const _default: import("redux").Reducer<{
|
|
20
|
+
isWindows: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
|
|
2
|
+
import type { ComputedTheme } from '../api/theming';
|
|
3
|
+
export interface TargetThemingRootState {
|
|
4
|
+
targetTheming: {
|
|
5
|
+
isFetchingTheme: boolean;
|
|
6
|
+
currentTheme: ComputedTheme | undefined;
|
|
7
|
+
hasTriedFetch: boolean;
|
|
8
|
+
currentScheme: ColorSchemeOptionType | undefined;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const targetThemingSlice: import("@reduxjs/toolkit").Slice<{
|
|
12
|
+
isFetchingTheme: boolean;
|
|
13
|
+
currentTheme: ComputedTheme | undefined;
|
|
14
|
+
hasTriedFetch: boolean;
|
|
15
|
+
currentScheme: ColorSchemeOptionType | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
setTheme: (state: import("immer/dist/internal").WritableDraft<{
|
|
18
|
+
isFetchingTheme: boolean;
|
|
19
|
+
currentTheme: ComputedTheme | undefined;
|
|
20
|
+
hasTriedFetch: boolean;
|
|
21
|
+
currentScheme: ColorSchemeOptionType | undefined;
|
|
22
|
+
}>, action: {
|
|
23
|
+
payload: any;
|
|
24
|
+
type: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
setIsFetchingTheme: (state: import("immer/dist/internal").WritableDraft<{
|
|
27
|
+
isFetchingTheme: boolean;
|
|
28
|
+
currentTheme: ComputedTheme | undefined;
|
|
29
|
+
hasTriedFetch: boolean;
|
|
30
|
+
currentScheme: ColorSchemeOptionType | undefined;
|
|
31
|
+
}>, action: {
|
|
32
|
+
payload: any;
|
|
33
|
+
type: string;
|
|
34
|
+
}) => void;
|
|
35
|
+
setCurrentScheme: (state: import("immer/dist/internal").WritableDraft<{
|
|
36
|
+
isFetchingTheme: boolean;
|
|
37
|
+
currentTheme: ComputedTheme | undefined;
|
|
38
|
+
hasTriedFetch: boolean;
|
|
39
|
+
currentScheme: ColorSchemeOptionType | undefined;
|
|
40
|
+
}>, action: {
|
|
41
|
+
payload: any;
|
|
42
|
+
type: string;
|
|
43
|
+
}) => void;
|
|
44
|
+
}, "targetTheming">;
|
|
45
|
+
export declare const setTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setIsFetchingTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setCurrentScheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
46
|
+
export declare const selectTargetTheming: (state: TargetThemingRootState) => ComputedTheme;
|
|
47
|
+
export declare const selectCurrentScheme: (state: TargetThemingRootState) => ColorSchemeOptionType;
|
|
48
|
+
export declare const selectHasTriedFetch: (state: TargetThemingRootState) => boolean;
|
|
49
|
+
export declare const selectIsFetchingTheme: (state: TargetThemingRootState) => boolean;
|
|
50
|
+
declare const _default: import("redux").Reducer<{
|
|
51
|
+
isFetchingTheme: boolean;
|
|
52
|
+
currentTheme: ComputedTheme;
|
|
53
|
+
hasTriedFetch: boolean;
|
|
54
|
+
currentScheme: ColorSchemeOptionType;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
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, {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
isEnterprise?: boolean;
|
|
5
|
+
windowFocused?: boolean;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const ThemedSVG: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -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[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom React hook to check the accessibility of a custom logo image.
|
|
3
|
+
* This hook initiates an image load and returns a boolean value indicating
|
|
4
|
+
* whether the image is accessible or not.
|
|
5
|
+
*
|
|
6
|
+
* @param customLogoUrl The URL of the custom logo to check. If undefined, the hook immediately returns false.
|
|
7
|
+
* @returns A state value that is true if the custom logo is accessible and has loaded successfully, and false otherwise.
|
|
8
|
+
* @example
|
|
9
|
+
* ```jsx
|
|
10
|
+
* function Component() {
|
|
11
|
+
* const logoAccessible = useCustomLogoAccessible('http://example.com/logo.png');
|
|
12
|
+
* return logoAccessible ? <img src='http://example.com/logo.png' /> : <DefaultLogo />;
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const useCustomLogoAccessible: (customLogoUrl: string | undefined) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import OpenFin from '@openfin/core';
|
|
2
|
+
export declare const getContextMenuChannelName: () => string;
|
|
3
|
+
export declare const getBookmarkContextMenuChannelName: () => string;
|
|
4
|
+
export declare const getBookmarkPanelActionsMonitorChannelName: () => string;
|
|
5
|
+
export declare const getDropdownMenuChannelName: () => string;
|
|
6
|
+
export declare const createDropdownMenuChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
7
|
+
export declare const connectDropdownMenuChannel: () => Promise<OpenFin.ChannelClient>;
|
|
8
|
+
export declare const createBookmarkDialogChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
9
|
+
export declare const connectToBookmarkDialogChannel: () => Promise<OpenFin.ChannelClient>;
|
|
10
|
+
export declare const createBookmarkPanelActionsMonitorChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
11
|
+
export declare const connectToBookmarkPanelActionsMonitor: () => Promise<OpenFin.ChannelClient>;
|
|
12
|
+
export declare const createContextMenuChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
13
|
+
export declare const connectToContextMenuChannel: () => Promise<OpenFin.ChannelClient>;
|
|
@@ -6,3 +6,4 @@ export declare function formatUrl(url: string): string;
|
|
|
6
6
|
export declare const getIsEnterpriseBrowser: (id?: OpenFin.Identity) => Promise<boolean>;
|
|
7
7
|
export declare const getMenuWindowWidth: () => Promise<number>;
|
|
8
8
|
export declare const isLandingPage: (url: string) => boolean;
|
|
9
|
+
export declare const isLandingPageOrEmpty: (url: string) => boolean;
|
|
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
|
|
|
11
11
|
export declare const isWindowDefinedWithIndexDB: boolean;
|
|
12
12
|
export declare const finUUID: string;
|
|
13
13
|
export declare const finName: string;
|
|
14
|
-
export declare const finEntityType: "" | "
|
|
14
|
+
export declare const finEntityType: "" | "view" | "window";
|
|
15
15
|
export declare const isEnvLocal: boolean;
|
|
16
16
|
export declare const isEnvDev: boolean;
|
|
17
17
|
export declare const isEnvStaging: boolean;
|
|
@@ -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>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
export declare enum InteropEventType {
|
|
3
|
+
JoinedContextGroup = "joined-context-group",
|
|
4
|
+
RemovedFromContextGroup = "removed-from-context-group"
|
|
5
|
+
}
|
|
6
|
+
type InteropEventPayload<E extends InteropEventType> = {
|
|
7
|
+
[InteropEventType.JoinedContextGroup]: {
|
|
8
|
+
viewIdentity: OpenFin.Identity;
|
|
9
|
+
contextGroupId: string;
|
|
10
|
+
};
|
|
11
|
+
[InteropEventType.RemovedFromContextGroup]: {
|
|
12
|
+
viewIdentity: OpenFin.Identity;
|
|
13
|
+
};
|
|
14
|
+
}[E];
|
|
15
|
+
export type InteropListener<EventType extends InteropEventType> = (payload: InteropEventPayload<EventType>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Returns contextGroup data.
|
|
18
|
+
* @returns Promise<ContextGroup[]>
|
|
19
|
+
*/
|
|
20
|
+
export declare function getContextGroups(): Promise<OpenFin.ContextGroupInfo[]>;
|
|
21
|
+
export declare const joinContextGroup: (viewIdentity: OpenFin.Identity, contextGroupId: string) => Promise<void>;
|
|
22
|
+
export declare const removeFromGroup: (viewIdentity: OpenFin.Identity) => Promise<void>;
|
|
23
|
+
export declare function getViewContextGroupId(viewIdentity: OpenFin.Identity): Promise<string | null | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Listen for interop events.
|
|
26
|
+
* @param event the interop event to listen for.
|
|
27
|
+
* @param listener the function to call when the event occurs.
|
|
28
|
+
*/
|
|
29
|
+
export declare const addInteropListener: <Event_1 extends InteropEventType>(event: Event_1, listener: InteropListener<Event_1>) => Promise<void>;
|
|
30
|
+
export {};
|
|
@@ -65,6 +65,12 @@ export declare const cloneViewComponentWithoutName: (componentState: any) => any
|
|
|
65
65
|
* @returns A copy of the layout with names removed
|
|
66
66
|
*/
|
|
67
67
|
export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
|
|
68
|
+
/**
|
|
69
|
+
* Deep clones a layout and removes generated view names.
|
|
70
|
+
* @param layout The Layout to be cloned
|
|
71
|
+
* @returns A copy of the layout with generated names removed
|
|
72
|
+
*/
|
|
73
|
+
export declare const cloneLayoutAndRemoveGeneratedNames: (layout: PageLayout) => any;
|
|
68
74
|
export declare const mapContentComponentState: (content: OpenFin.LayoutContent) => OpenFin.LayoutComponent['componentState'][];
|
|
69
75
|
export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
|
|
70
76
|
export declare const layoutNameInitializedMap: Map<string, boolean>;
|
|
@@ -10,12 +10,4 @@ import { ResponseModalConfig } from './menu-config';
|
|
|
10
10
|
* @returns the bounds for where the modal is to be displayed
|
|
11
11
|
*/
|
|
12
12
|
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
|
|
13
|
-
/**
|
|
14
|
-
* calculates the percenage of the window that is present within the monitor (float in range 0-1)
|
|
15
|
-
*
|
|
16
|
-
* @param bounds the bounds of the window
|
|
17
|
-
* @param monitor the monitor to check against
|
|
18
|
-
*/
|
|
19
|
-
export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
|
|
20
|
-
export declare function getMonitorWindowMaximizedOn(parentWindowBounds: OpenFin.WindowBounds): Promise<OpenFin.MonitorDetails>;
|
|
21
13
|
export declare function getResponseModalBoundsAndCenterParentIfModalOffScreen(modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean): Promise<OpenFin.Bounds>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { ComponentName } from '../../../common/src/utils/usage-register';
|
|
3
|
+
export interface NavigatePayload {
|
|
4
|
+
componentName: ComponentName;
|
|
5
|
+
platformIdentity: OpenFin.Identity;
|
|
6
|
+
providerId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const navigateTo: (componentName: ComponentName, platformIdentity: OpenFin.Identity, providerId?: string) => Promise<void>;
|