@openfin/workspace-platform 22.4.1 → 22.4.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/client-api/src/integrations/microsoft.utils.d.ts +6 -6
- package/client-api/src/shapes/home.d.ts +12 -1
- package/client-api-platform/src/api/context-menu/utils.d.ts +10 -0
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +14 -3
- package/client-api-platform/src/api/pages/open-pages.d.ts +2 -2
- package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
- package/client-api-platform/src/init/override-callback/view-options.d.ts +1 -1
- package/client-api-platform/src/shapes.d.ts +15 -14
- package/common/src/api/home.d.ts +3 -1
- package/common/src/api/pages/idb.d.ts +2 -4
- package/common/src/api/protocol/browser.d.ts +4 -4
- package/common/src/api/protocol/workspace-platform.d.ts +23 -23
- package/common/src/api/provider.d.ts +1 -1
- package/common/src/api/storefront.d.ts +5 -5
- package/common/src/api/theming.d.ts +1 -1
- package/common/src/components/IndicatorContainer/bounds.d.ts +14 -0
- package/common/src/components/IndicatorContainer/types.d.ts +35 -0
- package/common/src/utils/global-context-menu.d.ts +1 -1
- package/common/src/utils/indicators/showIndicator.d.ts +55 -0
- package/common/src/utils/layout.d.ts +1 -2
- package/common/src/utils/local-storage-key.d.ts +2 -1
- package/common/src/utils/menu-window-provider.d.ts +6 -6
- package/common/src/utils/modal-bounds.d.ts +1 -1
- package/common/src/utils/namespaced-local-storage.d.ts +2 -2
- package/common/src/utils/positioning.d.ts +4 -0
- package/common/src/utils/shared-emitter.d.ts +4 -4
- package/common/src/utils/types.d.ts +1 -1
- package/common/src/utils/window.d.ts +2 -1
- package/common/src/utils/workspace-modals.d.ts +6 -2
- package/dock3/src/shapes/shapes.d.ts +7 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/search-api/src/provider/remote/info.d.ts +1 -1
- package/workspace_platform.zip +0 -0
- package/common/src/components/IndicatorContainer/helper.d.ts +0 -30
- package/common/src/utils/indicators/browser.d.ts +0 -32
|
@@ -36,9 +36,9 @@ export declare const MICROSOFT_365_SEARCH_RESULT_ACTIONS: {
|
|
|
36
36
|
* @param req The user input request object from which to extract the selected filters.
|
|
37
37
|
* @returns An array of CLIFilter objects representing the validated filters.
|
|
38
38
|
*/
|
|
39
|
-
export declare const getValidFilters: (req: Parameters<HomeProvider[
|
|
40
|
-
export declare const getValidContactFilters: (users: MicrosoftGraphTypes.User[], req: Parameters<HomeProvider[
|
|
41
|
-
export declare const getContactFiltersFromRequest: (req: Parameters<HomeProvider[
|
|
39
|
+
export declare const getValidFilters: (req: Parameters<HomeProvider["onUserInput"]>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => CLIFilter[];
|
|
40
|
+
export declare const getValidContactFilters: (users: MicrosoftGraphTypes.User[], req: Parameters<HomeProvider["onUserInput"]>[0]) => CLIFilter[];
|
|
41
|
+
export declare const getContactFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0]) => {
|
|
42
42
|
department: string[];
|
|
43
43
|
jobTitle: string[];
|
|
44
44
|
};
|
|
@@ -58,7 +58,7 @@ export declare const filterContactFromRequest: (items: MicrosoftGraphTypes.User[
|
|
|
58
58
|
* If no types are selected or all types are deselected, the function marks all types to be shown.
|
|
59
59
|
* Otherwise, it marks only the selected types to be shown.
|
|
60
60
|
*/
|
|
61
|
-
export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider[
|
|
61
|
+
export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => {
|
|
62
62
|
readonly showDocuments: boolean;
|
|
63
63
|
readonly showContacts: boolean;
|
|
64
64
|
/** Teams Messages */
|
|
@@ -70,7 +70,7 @@ export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider['o
|
|
|
70
70
|
/** SharePoint Lists */
|
|
71
71
|
readonly showLists: boolean;
|
|
72
72
|
};
|
|
73
|
-
export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvider[
|
|
73
|
+
export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0]) => {
|
|
74
74
|
readonly filterFiles: boolean;
|
|
75
75
|
readonly showWord: boolean;
|
|
76
76
|
readonly showExcel: boolean;
|
|
@@ -81,6 +81,6 @@ export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvide
|
|
|
81
81
|
export declare const filterDocumentsFromRequest: (items: MicrosoftGraphTypes.DriveItem[], filter: ReturnType<typeof getDocumentFiltersFromRequest>) => MicrosoftGraphTypes.DriveItem[];
|
|
82
82
|
export declare const getFileType: (fileName?: string) => string;
|
|
83
83
|
export declare const getFileIcon: (fileName?: string) => string;
|
|
84
|
-
export declare const mapMicrosoftAvailabilityToPresence: (availability: Presence) => CLISearchResultContact[
|
|
84
|
+
export declare const mapMicrosoftAvailabilityToPresence: (availability: Presence) => CLISearchResultContact["templateContent"]["onlineStatus"] | undefined;
|
|
85
85
|
/** base64IdToUrl converts a base64 encoded id to a url safe id */
|
|
86
86
|
export declare const base64IdToUrl: (b64Id: string) => string;
|
|
@@ -463,6 +463,7 @@ export interface HomeRegistration extends RegistrationMetaInfo {
|
|
|
463
463
|
* @throws An error if the Home Provider is no longer registered.
|
|
464
464
|
*
|
|
465
465
|
* @param query search string
|
|
466
|
+
* @param @optional additional options to set the search query
|
|
466
467
|
*
|
|
467
468
|
* @returns A promise that resolves when the search string has been injected into home search
|
|
468
469
|
*
|
|
@@ -500,5 +501,15 @@ export interface HomeRegistration extends RegistrationMetaInfo {
|
|
|
500
501
|
*
|
|
501
502
|
* ```
|
|
502
503
|
*/
|
|
503
|
-
setSearchQuery(query: string): Promise<void>;
|
|
504
|
+
setSearchQuery(query: string, options?: SetSearchQueryOptions): Promise<void>;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Options to set the search query
|
|
508
|
+
*/
|
|
509
|
+
export interface SetSearchQueryOptions {
|
|
510
|
+
/**
|
|
511
|
+
* Whether to show home after setting the search query
|
|
512
|
+
* @default true
|
|
513
|
+
*/
|
|
514
|
+
showHome?: boolean;
|
|
504
515
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
2
3
|
import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
|
|
4
|
+
export declare const saveWorkspaceHandlerWithInjectables: ({ showModal, afterSuccessSave }: {
|
|
5
|
+
showModal?: () => Promise<void>;
|
|
6
|
+
afterSuccessSave?: () => Promise<void>;
|
|
7
|
+
}) => Promise<void>;
|
|
3
8
|
export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promise<void>;
|
|
4
9
|
export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
|
|
5
10
|
/**
|
|
@@ -17,6 +22,11 @@ export declare const savePageHandler: (identity: OpenFin.Identity, pageId?: stri
|
|
|
17
22
|
*/
|
|
18
23
|
export declare const savePageAsHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
|
|
19
24
|
export declare const switchWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
25
|
+
export declare const deleteWorkspaceHandlerWithPayload: ({ workspaceItemData, winIdentity, positioning }: {
|
|
26
|
+
workspaceItemData: WorkspaceContextMenuItemData;
|
|
27
|
+
winIdentity?: OpenFin.Identity;
|
|
28
|
+
positioning?: PositioningType;
|
|
29
|
+
}) => Promise<void>;
|
|
20
30
|
export declare const deleteWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
21
31
|
export declare const downloadsHandler: (identity: OpenFin.Identity) => Promise<void>;
|
|
22
32
|
/**
|
|
@@ -4,7 +4,7 @@ import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-
|
|
|
4
4
|
*
|
|
5
5
|
* This is particularly useful if a value uses a different palette constant depending on scheme.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getPaletteExtensions: (palette: CustomPaletteSet, paletteScheme:
|
|
7
|
+
export declare const getPaletteExtensions: (palette: CustomPaletteSet, paletteScheme: "light" | "dark", isWindows: boolean) => {
|
|
8
8
|
dockExpandedContainerBorderColor: string;
|
|
9
9
|
dockExpandedContainerBorderRadius: string;
|
|
10
10
|
dockExpandedContainerBackground: string;
|
|
@@ -46,10 +46,16 @@ export declare class ThemeStorageController {
|
|
|
46
46
|
* A workaround that can be leveraged in cross origin scenarios (which is the majority of the workspace use case) is available in this commit: 233e843cda6cd68968fd5831fb20597e0d5bb7cc
|
|
47
47
|
* `git revert 233e843cda6cd68968fd5831fb20597e0d5bb7cc --no-commit`
|
|
48
48
|
*/
|
|
49
|
-
setWorkspaceStorage: (proxy: Pick<Storage,
|
|
49
|
+
setWorkspaceStorage: (proxy: Pick<Storage, "setItem">) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Check if there's an explicit user preference stored in localStorage.
|
|
52
|
+
* A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
|
|
53
|
+
* @returns true if user has manually selected a scheme, false if using defaults
|
|
54
|
+
*/
|
|
55
|
+
private hasUserPreference;
|
|
50
56
|
/**
|
|
51
57
|
* Synchronize the current palette and scheme with workspace's storage instance if
|
|
52
|
-
* storage based theming is enabled
|
|
58
|
+
* storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
|
|
53
59
|
*/
|
|
54
60
|
trySynchronizeWorkspaceStorage: () => void;
|
|
55
61
|
/**
|
|
@@ -67,6 +73,11 @@ export declare class ThemeStorageController {
|
|
|
67
73
|
* @param scheme 'light', 'dark' or 'system'.
|
|
68
74
|
*/
|
|
69
75
|
setScheme(scheme: ColorSchemeOptionType): void;
|
|
76
|
+
/**
|
|
77
|
+
* Set the theme's default scheme from palette configuration
|
|
78
|
+
* @param scheme The default scheme specified in the palette
|
|
79
|
+
*/
|
|
80
|
+
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
70
81
|
/**
|
|
71
82
|
* Returns the current scheme
|
|
72
83
|
* @returns 'light' | 'system' | 'dark'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsEventInternal } from '../../../../common/src/utils/usage-register';
|
|
2
2
|
import { Page } from '../../../../client-api-platform/src/shapes';
|
|
3
3
|
export declare const getOpenPages: () => Map<string, AnalyticsEventInternal>;
|
|
4
|
-
export declare const addOpenPageToCache: (pageId: Page[
|
|
5
|
-
export declare const removeOpenPageFromCache: (pageId: Page[
|
|
4
|
+
export declare const addOpenPageToCache: (pageId: Page["pageId"], event: AnalyticsEventInternal) => void;
|
|
5
|
+
export declare const removeOpenPageFromCache: (pageId: Page["pageId"]) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import OpenFin from '@openfin/core';
|
|
2
2
|
import type { AttachedPage, AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
|
|
3
3
|
import { BrowserInitConfig } from '../..';
|
|
4
|
-
export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig,
|
|
4
|
+
export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, "defaultPageOptions" | "defaultViewOptions" | "defaultWindowOptions">, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
|
|
@@ -7,5 +7,5 @@ type ViewStateBase = Pick<BrowserViewState, '_internalWorkspaceData' | 'workspac
|
|
|
7
7
|
export declare const mapInternalWorkspaceDataToWorkspacePlatform: <T extends ViewStateBase>(viewState: T) => T;
|
|
8
8
|
export declare const mapWorkspacePlatformToInternalWorkspaceData: <T extends ViewStateBase>(viewState: T) => T;
|
|
9
9
|
export declare const setHotkeysIfNavigationButtonsEnabled: (options: BrowserCreateViewRequest) => Promise<BrowserCreateViewRequest>;
|
|
10
|
-
export declare const registerHotkeyListenersIfEnabled: (viewIdentity: OpenFin.Identity, buttonOptions?: BrowserWorkspacePlatformViewOptions[
|
|
10
|
+
export declare const registerHotkeyListenersIfEnabled: (viewIdentity: OpenFin.Identity, buttonOptions?: BrowserWorkspacePlatformViewOptions["browserNavigationButtons"]) => void;
|
|
11
11
|
export {};
|
|
@@ -154,16 +154,16 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
154
154
|
Save = "Save",
|
|
155
155
|
SaveAs = "Save As",
|
|
156
156
|
NewPage = "New Page",
|
|
157
|
-
DeletePage = "Delete Page"
|
|
158
|
-
SaveWorkspaceAs = "SaveWorkspaceAs"
|
|
159
|
-
Refresh = "Refresh"
|
|
160
|
-
CloseOthers = "Close others"
|
|
161
|
-
Delete = "Delete"
|
|
162
|
-
Print = "Print"
|
|
163
|
-
PrintAll = "PrintAll"
|
|
164
|
-
PrintScreen = "PrintScreen"
|
|
165
|
-
ManageDesktopSignals = "ManageDesktopSignals"
|
|
166
|
-
AddToChannel = "AddToChannel"
|
|
157
|
+
DeletePage = "Delete Page",// Enterprise
|
|
158
|
+
SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
|
|
159
|
+
Refresh = "Refresh",// Enterprise
|
|
160
|
+
CloseOthers = "Close others",// Enterprise
|
|
161
|
+
Delete = "Delete",// Enterprise
|
|
162
|
+
Print = "Print",// Enterprise
|
|
163
|
+
PrintAll = "PrintAll",// Enterprise
|
|
164
|
+
PrintScreen = "PrintScreen",// Enterprise
|
|
165
|
+
ManageDesktopSignals = "ManageDesktopSignals",// Enterprise
|
|
166
|
+
AddToChannel = "AddToChannel",// Enterprise
|
|
167
167
|
Custom = "Custom"
|
|
168
168
|
}
|
|
169
169
|
/**Shape of the data property of a global context menu template item */
|
|
@@ -2304,6 +2304,10 @@ export interface UpdateSavedWorkspaceRequest {
|
|
|
2304
2304
|
/** The updated workspace. */
|
|
2305
2305
|
workspace: Workspace;
|
|
2306
2306
|
}
|
|
2307
|
+
export type OpenSaveWorkspaceMenuRequest = {
|
|
2308
|
+
menuType: SaveModalType.SAVE_WORKSPACE | SaveModalType.SAVE_WORKSPACE_AS | SaveModalType.RENAME_WORKSPACE;
|
|
2309
|
+
id?: never;
|
|
2310
|
+
};
|
|
2307
2311
|
/**
|
|
2308
2312
|
* Request to create a save modal.
|
|
2309
2313
|
* @private
|
|
@@ -2311,10 +2315,7 @@ export interface UpdateSavedWorkspaceRequest {
|
|
|
2311
2315
|
export type OpenSaveMenuRequest = {
|
|
2312
2316
|
menuType: SaveModalType.SAVE_PAGE | SaveModalType.SAVE_PAGE_AS | SaveModalType.RENAME_PAGE;
|
|
2313
2317
|
id: string;
|
|
2314
|
-
} |
|
|
2315
|
-
menuType: SaveModalType.SAVE_WORKSPACE | SaveModalType.SAVE_WORKSPACE_AS | SaveModalType.RENAME_WORKSPACE;
|
|
2316
|
-
id?: never;
|
|
2317
|
-
};
|
|
2318
|
+
} | OpenSaveWorkspaceMenuRequest;
|
|
2318
2319
|
export type TaskbarIcon = {
|
|
2319
2320
|
dark: string;
|
|
2320
2321
|
light: string;
|
package/common/src/api/home.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import { HomeSearchListenerRequest } from '../../../client-api/src/shapes';
|
|
2
|
+
import { HomeSearchListenerRequest, SetSearchQueryOptions } from '../../../client-api/src/shapes';
|
|
3
3
|
export interface SearchQueryWithProviderID {
|
|
4
4
|
providerID: string;
|
|
5
5
|
query: string;
|
|
6
|
+
options?: SetSearchQueryOptions;
|
|
6
7
|
}
|
|
7
8
|
export interface SearchQueryWithProviderIdentity {
|
|
8
9
|
providerID: string;
|
|
9
10
|
platformIdentity: OpenFin.Identity;
|
|
10
11
|
query: string;
|
|
12
|
+
options?: SetSearchQueryOptions;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* The ids of home providers that are built into Home.
|
|
@@ -14,10 +14,8 @@ export declare function updatePage({ pageId, page }: {
|
|
|
14
14
|
export declare const addRemovedTab: (payload: TrackedTab) => Promise<void>;
|
|
15
15
|
export declare const popLastRemovedTab: () => Promise<TrackedTab | undefined>;
|
|
16
16
|
export declare const trackVisitedSite: (payload: Site) => Promise<void>;
|
|
17
|
-
export declare const getRecentVisitedSites: (numOfSites?: number) => Promise<TrackedSite[] | [
|
|
18
|
-
]>;
|
|
19
|
-
export declare const getFrequentlyVisitedSites: () => Promise<TrackedSite[] | [
|
|
20
|
-
]>;
|
|
17
|
+
export declare const getRecentVisitedSites: (numOfSites?: number) => Promise<TrackedSite[] | []>;
|
|
18
|
+
export declare const getFrequentlyVisitedSites: () => Promise<TrackedSite[] | []>;
|
|
21
19
|
export declare const searchSites: (payload: {
|
|
22
20
|
req: SearchSitesRequest;
|
|
23
21
|
} & {
|
|
@@ -34,8 +34,8 @@ declare enum GeneralBrowserChannelActions {
|
|
|
34
34
|
SetSelectedScheme = "set-selected-scheme",
|
|
35
35
|
ShowBrowserIndicator = "show-browser-indicator",
|
|
36
36
|
SetSelectedLanguage = "set-selected-language",
|
|
37
|
-
RefreshBookmarksInternal = "refresh-bookmarks"
|
|
38
|
-
GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views"
|
|
37
|
+
RefreshBookmarksInternal = "refresh-bookmarks",// Enterprise
|
|
38
|
+
GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views",// Enterprise
|
|
39
39
|
FocusAndExpandSearchInternal = "focus-and-expand-search"
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -56,8 +56,8 @@ export declare enum PageChannelAction {
|
|
|
56
56
|
IsActivePageChanging = "is-active-page-changing"
|
|
57
57
|
}
|
|
58
58
|
export declare enum CompanionDockChannelAction {
|
|
59
|
-
UpdateFavoriteEntries = "update-favorite-entries"
|
|
60
|
-
UpdateContentMenu = "update-content-menu"
|
|
59
|
+
UpdateFavoriteEntries = "update-favorite-entries",// Enterprise
|
|
60
|
+
UpdateContentMenu = "update-content-menu",// Enterprise
|
|
61
61
|
NavigateContentMenu = "navigate-content-menu"
|
|
62
62
|
}
|
|
63
63
|
export declare const BrowserChannelAction: {
|
|
@@ -67,30 +67,30 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
67
67
|
CopyPage = "copyPage",
|
|
68
68
|
HandlePageChanges = "handlePageChanges",
|
|
69
69
|
MarkUnsavedPagesAsSavedInternal = "markUnsavedPagesAsSavedInternal",
|
|
70
|
-
TrackRemovedTabInternal = "trackRemovedTabInternal"
|
|
71
|
-
RestoreRemovedTabInternal = "restoreRemovedTabInternal"
|
|
72
|
-
TrackVisitedSiteInternal = "trackVisitedSiteInternal"
|
|
73
|
-
GetRecentlyVisitedSitesInternal = "getRecentlyVisitedSitesInternal"
|
|
74
|
-
GetFrequentlyVisitedSitesInternal = "getFrequentlyVisitedSitesInternal"
|
|
75
|
-
SearchSitesInternal = "searchSitesInternal"
|
|
76
|
-
GetSearchProvidersInternal = "getSearchProvidersInternal"
|
|
77
|
-
GetCuratedContentInternal = "getCuratedContentInternal"
|
|
78
|
-
HandleRequestNavigationInternal = "handleRequestNavigationInternal"
|
|
79
|
-
RefreshBookmarksInternal = "refreshBookmarksInternal"
|
|
80
|
-
LaunchBookmarkInternal = "launchBookmarkInternal"
|
|
70
|
+
TrackRemovedTabInternal = "trackRemovedTabInternal",// Enterprise
|
|
71
|
+
RestoreRemovedTabInternal = "restoreRemovedTabInternal",// Enterprise
|
|
72
|
+
TrackVisitedSiteInternal = "trackVisitedSiteInternal",// Enterprise
|
|
73
|
+
GetRecentlyVisitedSitesInternal = "getRecentlyVisitedSitesInternal",// Enterprise
|
|
74
|
+
GetFrequentlyVisitedSitesInternal = "getFrequentlyVisitedSitesInternal",// Enterprise
|
|
75
|
+
SearchSitesInternal = "searchSitesInternal",// Enterprise
|
|
76
|
+
GetSearchProvidersInternal = "getSearchProvidersInternal",// Enterprise
|
|
77
|
+
GetCuratedContentInternal = "getCuratedContentInternal",// Enterprise
|
|
78
|
+
HandleRequestNavigationInternal = "handleRequestNavigationInternal",// Enterprise
|
|
79
|
+
RefreshBookmarksInternal = "refreshBookmarksInternal",// Enterprise
|
|
80
|
+
LaunchBookmarkInternal = "launchBookmarkInternal",// Enterprise
|
|
81
81
|
GetNotificationsConfig = "getNotificationsConfig",
|
|
82
|
-
UpdateDockFavoritesInternal = "updateDockFavoritesInternal"
|
|
83
|
-
UpdateContentMenuInternal = "updateContentMenuInternal"
|
|
84
|
-
LaunchDockEntryInternal = "launchDockEntryInternal"
|
|
85
|
-
SetDockFavoritesOrderInternal = "setDockFavoritesOrderInternal"
|
|
86
|
-
NavigateContentMenuInternal = "navigateContentMenuInternal"
|
|
87
|
-
SetDefaultDockButtonsOrderInternal = "setDefaultDockButtonsOrderInternal"
|
|
88
|
-
GetDockWorkspacesContextMenuInternal = "getDockWorkspacesContextMenuInternal"
|
|
89
|
-
HandleDockWorkspacesMenuResponseInternal = "handleDockWorkspacesMenuResponseInternal"
|
|
90
|
-
RemoveDockFavoriteInternal = "removeDockFavoriteInternal"
|
|
91
|
-
AddDockFavoriteInternal = "addDockFavoriteInternal"
|
|
92
|
-
FocusAndExpandSearchInternal = "focusAndExpandSearchInternal"
|
|
93
|
-
SendUpdateVersionModalResponseInternal = "sendUpdateVersionModalResponseInternal"
|
|
82
|
+
UpdateDockFavoritesInternal = "updateDockFavoritesInternal",// Enterprise
|
|
83
|
+
UpdateContentMenuInternal = "updateContentMenuInternal",// Enterprise
|
|
84
|
+
LaunchDockEntryInternal = "launchDockEntryInternal",// Enterprise
|
|
85
|
+
SetDockFavoritesOrderInternal = "setDockFavoritesOrderInternal",// Enterprise
|
|
86
|
+
NavigateContentMenuInternal = "navigateContentMenuInternal",// Enterprise
|
|
87
|
+
SetDefaultDockButtonsOrderInternal = "setDefaultDockButtonsOrderInternal",// Enterprise
|
|
88
|
+
GetDockWorkspacesContextMenuInternal = "getDockWorkspacesContextMenuInternal",// Enterprise
|
|
89
|
+
HandleDockWorkspacesMenuResponseInternal = "handleDockWorkspacesMenuResponseInternal",// Enterprise
|
|
90
|
+
RemoveDockFavoriteInternal = "removeDockFavoriteInternal",// Enterprise
|
|
91
|
+
AddDockFavoriteInternal = "addDockFavoriteInternal",// Enterprise
|
|
92
|
+
FocusAndExpandSearchInternal = "focusAndExpandSearchInternal",// Enterprise
|
|
93
|
+
SendUpdateVersionModalResponseInternal = "sendUpdateVersionModalResponseInternal",// Enterprise
|
|
94
94
|
ShowUpdateVersionModalInternal = "showUpdateVersionModalInternal"
|
|
95
95
|
}
|
|
96
96
|
export type PlatFormSupportedFeatures = boolean | {
|
|
@@ -98,7 +98,7 @@ export interface ProviderUpdateEventPayload {
|
|
|
98
98
|
*
|
|
99
99
|
* This allows for different providers to be registered with the same id.
|
|
100
100
|
*/
|
|
101
|
-
export declare const getUniqueProviderIdentifier: ({ platformIdentity, id }: Pick<ProviderInfoInternal,
|
|
101
|
+
export declare const getUniqueProviderIdentifier: ({ platformIdentity, id }: Pick<ProviderInfoInternal, "platformIdentity" | "id">) => string;
|
|
102
102
|
/**
|
|
103
103
|
* Get a list of all providers that have registered with the provider API.
|
|
104
104
|
*/
|
|
@@ -30,29 +30,29 @@ export declare const launchStorefrontApp: (req: LaunchStorefrontProviderAppReque
|
|
|
30
30
|
* @param identity of the platform to get the apps from.
|
|
31
31
|
* @returns the list of Storefront apps for the platform.
|
|
32
32
|
*/
|
|
33
|
-
export declare const getStorefrontApps: (provider: ProviderInfoInternal<
|
|
33
|
+
export declare const getStorefrontApps: (provider: ProviderInfoInternal<"storefront">) => Promise<App[]>;
|
|
34
34
|
/**
|
|
35
35
|
* Get the platform's landing page for Storefront.
|
|
36
36
|
* @param identity of the platform to get the landing page of.
|
|
37
37
|
* @returns the platform's landing page.
|
|
38
38
|
*/
|
|
39
|
-
export declare const getStorefrontLandingPage: (provider: ProviderInfoInternal<
|
|
39
|
+
export declare const getStorefrontLandingPage: (provider: ProviderInfoInternal<"storefront">) => Promise<StorefrontLandingPage | undefined>;
|
|
40
40
|
/**
|
|
41
41
|
* Get the platform's footer for Storefront.
|
|
42
42
|
* @param identity of the platform to get the footer of.
|
|
43
43
|
* @returns the platform's footer.
|
|
44
44
|
*/
|
|
45
|
-
export declare const getStorefrontFooter: (provider: ProviderInfoInternal<
|
|
45
|
+
export declare const getStorefrontFooter: (provider: ProviderInfoInternal<"storefront">) => Promise<StorefrontFooter>;
|
|
46
46
|
/**
|
|
47
47
|
* Get the platform's navigation for Storefront.
|
|
48
48
|
* @param identity of the platform to get the navigation of.
|
|
49
49
|
* @returns the platform's navigation.
|
|
50
50
|
*/
|
|
51
|
-
export declare const getStorefrontNavigation: (provider: ProviderInfoInternal<
|
|
51
|
+
export declare const getStorefrontNavigation: (provider: ProviderInfoInternal<"storefront">) => Promise<[StorefrontNavigationSection?, StorefrontNavigationSection?]>;
|
|
52
52
|
/**
|
|
53
53
|
* A helper method that gets a Storefront navigation item by ID.
|
|
54
54
|
* @param navigationItemId the id of the Storefront navigation item.
|
|
55
55
|
* @param identity of the platform.
|
|
56
56
|
* @returns the navigation item with the ID.
|
|
57
57
|
*/
|
|
58
|
-
export declare const getStorefrontNavigationItemAppGrid: (navigationItemId: string, provider: ProviderInfoInternal<
|
|
58
|
+
export declare const getStorefrontNavigationItemAppGrid: (navigationItemId: string, provider: ProviderInfoInternal<"storefront">) => Promise<StorefrontNavigationItemAppGrid | undefined>;
|
|
@@ -276,5 +276,5 @@ export declare const getComputedPaletteSets: (customTheme: CustomThemeOptions |
|
|
|
276
276
|
export declare const computeThemes: (customThemes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
|
|
277
277
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
|
|
278
278
|
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
279
|
-
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType,
|
|
279
|
+
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, "system">>;
|
|
280
280
|
export declare const getComputedBackgroundColor: (paletteKey: keyof typeof Palette, defaultColor?: string) => Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { IndicatorBounds, IndicatorOptions, WindowSize } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the bounds of the parent window, with fallback to provided bounds.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getParentWindowBounds: (parentWindow: OpenFin.Window | false, parentWindowBounds?: OpenFin.WindowBounds) => Promise<OpenFin.WindowBounds | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if a window is maximized.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isWindowMaximized: (parentWindow: OpenFin.Window | false) => Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Pure function – returns the final indicator rectangle, nothing else.
|
|
13
|
+
*/
|
|
14
|
+
export declare function computeIndicatorBounds(identity: OpenFin.Identity | null | undefined, mySize: WindowSize, opts: IndicatorOptions): Promise<IndicatorBounds>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
3
|
+
export declare enum ShowAtType {
|
|
4
|
+
Top = "top",
|
|
5
|
+
Below = "below"
|
|
6
|
+
}
|
|
7
|
+
export interface IndicatorOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Where to place the indicator relative to its parent.
|
|
10
|
+
*/
|
|
11
|
+
showAt: ShowAtType;
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, we use the "enterprise" timing + vertical offset rules.
|
|
14
|
+
*/
|
|
15
|
+
isEnterprise: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The bounds of the parent window if the parent is not available at
|
|
18
|
+
* runtime (e.g. the browser window launched the indicator and closed).
|
|
19
|
+
*/
|
|
20
|
+
fallbackParentBounds?: OpenFin.WindowBounds;
|
|
21
|
+
/**
|
|
22
|
+
* Determines whether to position relative to parent window or monitor.
|
|
23
|
+
*/
|
|
24
|
+
positioning?: PositioningType;
|
|
25
|
+
}
|
|
26
|
+
export interface IndicatorBounds {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
export interface WindowSize {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}
|
|
@@ -93,7 +93,7 @@ export declare const downloads: () => {
|
|
|
93
93
|
export declare const appearance: () => {
|
|
94
94
|
label: string;
|
|
95
95
|
};
|
|
96
|
-
export declare const getSavedWorkspaceContextMenuOptions: (activeWorkspace: Workspace, savedWorkspaces: Pick<Workspace,
|
|
96
|
+
export declare const getSavedWorkspaceContextMenuOptions: (activeWorkspace: Workspace, savedWorkspaces: Pick<Workspace, "workspaceId" | "title">[], contextMenuOptionType: GlobalContextMenuOptionType) => {
|
|
97
97
|
label: string;
|
|
98
98
|
type: MenuItemType;
|
|
99
99
|
enabled: boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IconType } from '@openfin/ui-library';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
3
|
+
import { IndicatorType } from '../../../../common/src/components/Indicator/Indicator.constants';
|
|
4
|
+
export type IndicatorIcon = Extract<IconType, 'LockClosedIcon' | 'LockOpen1Icon' | 'PageIcon' | 'BlockedIcon' | 'SupertabIcon' | 'BookmarkFilled'>;
|
|
5
|
+
export interface ShowIndicatorPayload {
|
|
6
|
+
type: IndicatorType;
|
|
7
|
+
message: string;
|
|
8
|
+
parentBrowserName?: string;
|
|
9
|
+
secondaryMessage?: string;
|
|
10
|
+
icon?: IndicatorIcon;
|
|
11
|
+
isEnterprise?: boolean;
|
|
12
|
+
positioning?: PositioningType;
|
|
13
|
+
}
|
|
14
|
+
export interface ShowErrorPayload {
|
|
15
|
+
message: string;
|
|
16
|
+
parentBrowserName?: string;
|
|
17
|
+
icon?: IndicatorIcon;
|
|
18
|
+
isEnterprise?: boolean;
|
|
19
|
+
positioning?: PositioningType;
|
|
20
|
+
}
|
|
21
|
+
export interface ShowSuccessPayload {
|
|
22
|
+
message: string;
|
|
23
|
+
parentBrowserName?: string;
|
|
24
|
+
secondaryMessage?: string;
|
|
25
|
+
icon?: IndicatorIcon;
|
|
26
|
+
isEnterprise?: boolean;
|
|
27
|
+
positioning?: PositioningType;
|
|
28
|
+
}
|
|
29
|
+
export interface ShowInfoPayload {
|
|
30
|
+
message: string;
|
|
31
|
+
parentBrowserName?: string;
|
|
32
|
+
icon?: IndicatorIcon;
|
|
33
|
+
isEnterprise?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a window containing a visual indicator contained in a Browser Window
|
|
37
|
+
* This function decides whether to call browser function or direct function
|
|
38
|
+
*/
|
|
39
|
+
export declare function showIndicator(payload: ShowIndicatorPayload): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a window containing an error indicator
|
|
42
|
+
*/
|
|
43
|
+
export declare function showError(payload: ShowErrorPayload): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a window containing a success indicator
|
|
46
|
+
*/
|
|
47
|
+
export declare function showSuccess(payload: ShowSuccessPayload): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a window containing an info indicator
|
|
50
|
+
*/
|
|
51
|
+
export declare function showInfo(payload: ShowInfoPayload): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a window centered on monitor containing a success indicator for switching workspaces
|
|
54
|
+
*/
|
|
55
|
+
export declare function showSwitchWorkspaceSuccess(): Promise<void>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import type OpenFin from '@openfin/core';
|
|
3
2
|
import { WindowIdentity } from '../../../common/src/utils/window';
|
|
4
3
|
import { AttachedPageInternal } from '../../../common/src/api/pages/shapes';
|
|
@@ -79,7 +78,7 @@ export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
|
|
|
79
78
|
* @returns A copy of the layout with generated names removed
|
|
80
79
|
*/
|
|
81
80
|
export declare const cloneLayoutAndRemoveGeneratedNames: (layout: PageLayout) => any;
|
|
82
|
-
export declare const mapContentComponentState: (content: OpenFin.LayoutContent) => OpenFin.LayoutComponent[
|
|
81
|
+
export declare const mapContentComponentState: (content: OpenFin.LayoutContent) => OpenFin.LayoutComponent["componentState"][];
|
|
83
82
|
export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
|
|
84
83
|
export declare const layoutNameInitializedMap: Map<string, boolean>;
|
|
85
84
|
export declare const isLayoutTabActive: (tabSelector: string) => boolean;
|
|
@@ -8,6 +8,7 @@ declare enum LocalStorageKey {
|
|
|
8
8
|
SelectedColorScheme = "SelectedColorScheme",
|
|
9
9
|
ThemePaletteSheet = "ThemePaletteSheet",
|
|
10
10
|
HasMovedStore = "HasMovedStore",
|
|
11
|
-
PageDragState = "BrowserPageDragState"
|
|
11
|
+
PageDragState = "BrowserPageDragState",
|
|
12
|
+
ThemePaletteDefaultScheme = "ThemePaletteDefaultScheme"
|
|
12
13
|
}
|
|
13
14
|
export default LocalStorageKey;
|
|
@@ -17,12 +17,12 @@ export interface ModalResponseEvent {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const menuEvents: {
|
|
19
19
|
emit: <EventKey extends keyof MenuEventTypes>(event: EventKey, ...payload: MenuEventTypes[EventKey]) => Promise<void>;
|
|
20
|
-
addListener: <
|
|
21
|
-
addListenerWithUUID: (uuid: string) => <
|
|
22
|
-
removeListener: <
|
|
23
|
-
once: <
|
|
20
|
+
addListener: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
|
|
21
|
+
addListenerWithUUID: (uuid: string) => <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
|
|
22
|
+
removeListener: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
|
|
23
|
+
once: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
|
|
24
24
|
};
|
|
25
|
-
export declare const emitMenuResponse: (data: ModalResponseEvent[
|
|
25
|
+
export declare const emitMenuResponse: (data: ModalResponseEvent["data"]) => Promise<void>;
|
|
26
26
|
type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
|
|
27
27
|
top: number;
|
|
28
28
|
left: number;
|
|
@@ -49,6 +49,6 @@ export declare function createMenuPosition(windowOptions: OptionalExceptFor<Open
|
|
|
49
49
|
}>;
|
|
50
50
|
export declare function showChildWindow({ options, parameters }: ShowChildOptions): Promise<OpenFin.Window>;
|
|
51
51
|
export declare const waitForModalResponse: ({ options, content, parameters }: ResponseModalOptions) => Promise<{
|
|
52
|
-
data: ModalResponseEvent[
|
|
52
|
+
data: ModalResponseEvent["data"];
|
|
53
53
|
}>;
|
|
54
54
|
export {};
|
|
@@ -16,7 +16,7 @@ export declare const getCenterOfParentWindowMonitor: (parentWindowIdentity?: Ope
|
|
|
16
16
|
* @param centerOnMonitor whether the modal should be centered on the monitor
|
|
17
17
|
* @returns the bounds for where the modal is to be displayed
|
|
18
18
|
*/
|
|
19
|
-
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig[
|
|
19
|
+
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig["windowOptions"], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
|
|
20
20
|
export declare function getResponseModalBoundsAndCenterParentIfModalOffScreen(modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean): Promise<OpenFin.Bounds>;
|
|
21
21
|
/**
|
|
22
22
|
* Adjusts the given bounds to be within the closest monitor's available bounds if they are offscreen.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage,
|
|
1
|
+
export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage, "setItem" | "getItem" | "removeItem">;
|
|
2
2
|
export declare const setItem: (key: string, value: string) => void;
|
|
3
|
-
export declare const getItem: (key: string) => string;
|
|
3
|
+
export declare const getItem: (key: string) => string | null;
|
|
4
4
|
export declare const removeItem: (key: string) => void;
|
|
@@ -5,12 +5,12 @@ export default function makeSharedEmitter<EventMap extends {
|
|
|
5
5
|
[key: string | number]: any[];
|
|
6
6
|
}>(id: string): {
|
|
7
7
|
emit: <EventKey extends keyof EventMap>(event: EventKey, ...payload: EventMap[EventKey]) => Promise<void>;
|
|
8
|
-
addListener: <
|
|
8
|
+
addListener: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
|
|
9
9
|
/**
|
|
10
10
|
* Creates a listener for a particular UUID instead of ApplicationUUID.Workspace.
|
|
11
11
|
* @param uuid The UUID of the application to subscribe to.
|
|
12
12
|
*/
|
|
13
|
-
addListenerWithUUID: (uuid: string) => <
|
|
14
|
-
removeListener: <
|
|
15
|
-
once: <
|
|
13
|
+
addListenerWithUUID: (uuid: string) => <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
|
|
14
|
+
removeListener: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
|
|
15
|
+
once: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
|
|
16
16
|
};
|
|
@@ -54,5 +54,5 @@ type MissingKeys<T, U> = Exclude<keyof T, U>;
|
|
|
54
54
|
* fooChecker(['bar', 'qux', 'baz']); // 'baz' is not assignable to type keyof Foo;
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export declare const makeKeyChecker: <T extends object>() => <
|
|
57
|
+
export declare const makeKeyChecker: <T extends object>() => <K extends (keyof T)[]>(arr: K & (MissingKeys<T, K[number]> extends never ? unknown : `Error: Missing keys: ${string & MissingKeys<T, K[number]>}`)) => K;
|
|
58
58
|
export {};
|
|
@@ -7,6 +7,7 @@ export declare enum WindowName {
|
|
|
7
7
|
HomeInternal = "openfin-home-internal",
|
|
8
8
|
BrowserMenu = "openfin-browser-menu",
|
|
9
9
|
BrowserSaveMenu = "openfin-browser-save-menu",
|
|
10
|
+
DockSaveWorkspaceMenu = "openfin-dock3-save-workspace-menu",
|
|
10
11
|
BrowserIndicator = "openfin-browser-indicator",
|
|
11
12
|
BrowserWindow = "internal-generated-window",
|
|
12
13
|
ClassicWindow = "internal-generated-classic-window",
|
|
@@ -179,5 +180,5 @@ export declare const getWindowBounds: (window: OpenFin.Window) => Promise<OpenFi
|
|
|
179
180
|
* @param monitor the monitor to check against
|
|
180
181
|
*/
|
|
181
182
|
export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
|
|
182
|
-
export declare function
|
|
183
|
+
export declare function getMonitorWindowMostOn(parentWindowBounds: OpenFin.Bounds): Promise<OpenFin.MonitorDetails>;
|
|
183
184
|
export {};
|