@openfin/workspace 20.0.2 → 20.0.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/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 +106 -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/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/useIsPageOpen.d.ts +3 -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 +18 -0
- package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +18 -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 +32 -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/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 +55 -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/theming.d.ts +2 -1
- 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/usePlatformTheme.d.ts +6 -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/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 +4 -4
- package/notifications.js.map +1 -1
- package/package.json +2 -2
- package/store.js +3 -3
- package/store.js.map +1 -1
- package/common/src/utils/enterprise-context-menu-cahnnels.d.ts +0 -4
|
@@ -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 | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DefaultTheme } from 'styled-components';
|
|
2
2
|
import type OpenFin from '@openfin/core';
|
|
3
|
-
import { ThemeSet } from '@openfin/ui-library';
|
|
3
|
+
import { ColorSchemeType, ThemeSet } from '@openfin/ui-library';
|
|
4
4
|
import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
|
|
5
5
|
export type WorkspaceComponentSetSelectedSchemePayload = {
|
|
6
6
|
newScheme: ColorSchemeOptionType;
|
|
@@ -246,3 +246,4 @@ export declare const OpenFinDarkTheme: {
|
|
|
246
246
|
export declare const computeThemes: (customThemes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
|
|
247
247
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
|
|
248
248
|
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
249
|
+
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, 'system'>>;
|
|
@@ -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,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;
|
|
@@ -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>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { BookmarkFolder } from '../../../common/src/utils/bookmarks';
|
|
2
3
|
import { UserMenuParams } from '../../../common/src/utils/menu';
|
|
3
4
|
import { OptionalExceptFor } from '../../../common/src/utils/types';
|
|
4
5
|
import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
|
|
6
|
+
import { SearchViewExpansionState } from '../../../browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
|
|
5
7
|
import { Site, SiteAction } from '../../../client-api-platform/src/shapes';
|
|
6
8
|
export declare enum SaveMenuType {
|
|
7
9
|
Save = "Save",
|
|
@@ -14,9 +16,6 @@ export declare enum SaveMenuType {
|
|
|
14
16
|
*/
|
|
15
17
|
export declare const getSaveContextMenuTemplate: (saveMenuType?: SaveMenuType) => OpenFin.MenuItemTemplate[];
|
|
16
18
|
export declare function showModalWin<T extends keyof UserMenuParams>(params: UserMenuParams[T], windowOpts: OptionalExceptFor<OpenFin.WindowOptions, 'x' | 'y' | 'defaultWidth' | 'url' | 'name'>): Promise<OpenFin.Window>;
|
|
17
|
-
export type SearchMenuChannelFocusView = {
|
|
18
|
-
type: 'focus-search-menu';
|
|
19
|
-
};
|
|
20
19
|
export type SearchMenuChannelViewResized = {
|
|
21
20
|
type: 'view-resized';
|
|
22
21
|
height: number;
|
|
@@ -26,22 +25,44 @@ export type SearchMenuChannelUpdateState = {
|
|
|
26
25
|
selectedViews: OpenFin.Identity[];
|
|
27
26
|
openViews: OpenFin.Identity[];
|
|
28
27
|
windowId: OpenFin.Identity;
|
|
28
|
+
searchText?: string;
|
|
29
|
+
keyboardEvent?: BrowserSearchMenuKeyboardEvent;
|
|
30
|
+
shouldExpandMenu?: SearchViewExpansionState;
|
|
29
31
|
type: 'update-search-menu-state';
|
|
30
32
|
};
|
|
31
|
-
export type
|
|
33
|
+
export type BrowserSearchMenuKeyboardEvent = {
|
|
34
|
+
type: string;
|
|
35
|
+
options: {
|
|
36
|
+
key: string;
|
|
37
|
+
metaKey?: boolean;
|
|
38
|
+
ctrlKey?: boolean;
|
|
39
|
+
altKey?: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type SearchMenuChannelRequest = SearchMenuChannelViewResized | SearchMenuChannelUpdateState;
|
|
32
43
|
export declare enum ContextMenuType {
|
|
33
44
|
GlobalMenu = "global-menu",
|
|
34
45
|
ContextMenu = "context-menu",
|
|
35
|
-
RenameSupertab = "rename-supertab"
|
|
46
|
+
RenameSupertab = "rename-supertab",
|
|
47
|
+
AddEditBookmark = "add-edit-bookmark",
|
|
48
|
+
DropdownMenu = "dropdown-menu"
|
|
36
49
|
}
|
|
50
|
+
export type BookmarkButtonPayload = {
|
|
51
|
+
selectedViewIdentity?: OpenFin.Identity;
|
|
52
|
+
};
|
|
37
53
|
export type ContextMenuChannelMessageData = {
|
|
38
54
|
parentIdentity: OpenFin.Identity;
|
|
55
|
+
responseIdentity: OpenFin.Identity;
|
|
39
56
|
anchorBehavior: AnchorBehavior;
|
|
40
57
|
type: ContextMenuType;
|
|
41
58
|
x: number;
|
|
42
59
|
y: number;
|
|
43
60
|
payload: OpenFin.ShowPopupMenuOptions | {
|
|
44
61
|
pageId: string;
|
|
62
|
+
} | BookmarkButtonPayload | {
|
|
63
|
+
dropdownOptions: Array<BookmarkFolder>;
|
|
64
|
+
width: number;
|
|
65
|
+
selected: BookmarkFolder;
|
|
45
66
|
};
|
|
46
67
|
};
|
|
47
68
|
export type SearchMenuChannelResponse = {
|
|
@@ -51,14 +72,14 @@ export type SearchMenuChannelResponse = {
|
|
|
51
72
|
selectedView: OpenFin.Identity;
|
|
52
73
|
inputUpdate?: string;
|
|
53
74
|
trigger?: SiteAction;
|
|
54
|
-
|
|
55
|
-
type: 'update-input';
|
|
56
|
-
inputText: string;
|
|
57
|
-
isSecure: boolean;
|
|
58
|
-
landingPage: boolean;
|
|
75
|
+
handled?: boolean;
|
|
59
76
|
} | {
|
|
60
77
|
type: 'resize-view';
|
|
78
|
+
isExpanded: boolean;
|
|
61
79
|
height: number;
|
|
62
80
|
width: number;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'keyboard-event';
|
|
83
|
+
keyboardEvent: BrowserSearchMenuKeyboardEvent;
|
|
63
84
|
};
|
|
64
85
|
export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
|
|
@@ -15,7 +15,7 @@ export declare enum PageRoute {
|
|
|
15
15
|
BrowserPopupMenuLayouts = "/browser/popup-menu/layouts/layouts/",
|
|
16
16
|
BrowserPopupMenuColorLinking = "/browser/popup-menu/color-linking/color-linking/",
|
|
17
17
|
BrowserIndicator = "/browser/indicator/",
|
|
18
|
-
|
|
18
|
+
BrowserPopupMenuAddressSearchResultsView = "/browser/popup-menu/address-search-results-view/",
|
|
19
19
|
ResponseModal = "/browser/popup-menu/response-modal/",
|
|
20
20
|
CloseConfirmationModal = "/browser/popup-menu/close-confirmation-modal/",
|
|
21
21
|
Docs = "/provider/docs/",
|
|
@@ -23,7 +23,9 @@ export declare enum PageRoute {
|
|
|
23
23
|
DeprecatedAlert = "/provider/deprecated-alert/",
|
|
24
24
|
Analytics = "/provider/analytics/",
|
|
25
25
|
EnterpriseBrowser = "/browser/enterprise/",
|
|
26
|
-
EnterpriseContextMenu = "/browser/enterprise/context-menu/"
|
|
26
|
+
EnterpriseContextMenu = "/browser/enterprise/context-menu/",
|
|
27
|
+
EnterpriseBookmarkDialog = "/browser/enterprise/bookmark-dialog/",
|
|
28
|
+
DropdownMenu = "/browser/enterprise/dropdown-menu/"
|
|
27
29
|
}
|
|
28
30
|
export declare const Assets: {
|
|
29
31
|
readonly IconOpenFinLogo: "/icons/openfinlogo.svg";
|