@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.
Files changed (103) hide show
  1. package/browser/src/api/color-linking.d.ts +23 -0
  2. package/browser/src/api/controls.d.ts +23 -0
  3. package/browser/src/api/pages/attached.d.ts +23 -0
  4. package/browser/src/api/pages/state.d.ts +10 -0
  5. package/browser/src/api/panels.d.ts +104 -0
  6. package/browser/src/api/view.d.ts +22 -0
  7. package/browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar.d.ts +15 -0
  8. package/browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBarInput.d.ts +18 -0
  9. package/browser/src/components/ControlBar/RightControlsContainer/ToolbarContainer/menus/menuConfig.d.ts +17 -0
  10. package/browser/src/components/ControlBar/SearchMenu/BookmarkButton.d.ts +10 -0
  11. package/browser/src/components/ControlBar/SearchMenu/CommandBar.d.ts +9 -0
  12. package/browser/src/components/ControlBar/SearchMenu/Icons.d.ts +23 -0
  13. package/browser/src/components/ControlBar/SearchMenu/ResultIcon.d.ts +11 -0
  14. package/browser/src/components/ControlBar/SearchMenu/SecureIcon.d.ts +5 -0
  15. package/browser/src/components/ControlBar/SearchMenu/UrlInput.d.ts +3 -0
  16. package/browser/src/components/ControlBar/SearchMenu/useBookmarkButtonHover.d.ts +2 -0
  17. package/browser/src/components/ControlBar/SearchMenu/useEnterpriseBookmarkDialogWindow.d.ts +2 -0
  18. package/browser/src/components/ControlBar/SearchMenu/useIsBookmarked.d.ts +1 -0
  19. package/browser/src/components/ControlBar/SearchMenu/useIsPageOpen.d.ts +3 -0
  20. package/browser/src/components/ControlBar/SearchMenu/useIsSelectedViewNavigated.d.ts +5 -0
  21. package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts +8 -0
  22. package/browser/src/components/ControlBar/SearchMenu/utils.d.ts +9 -0
  23. package/browser/src/components/ControlBar/Tablist/utils.d.ts +8 -0
  24. package/browser/src/components/ControlBar/utils.d.ts +1 -0
  25. package/browser/src/components/LandingPage/BrandIcon.d.ts +6 -0
  26. package/browser/src/components/LayoutContainer/utils.d.ts +10 -0
  27. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +17 -0
  28. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksFolderHeader.d.ts +8 -0
  29. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanel.d.ts +9 -0
  30. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanelHeader.d.ts +3 -0
  31. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +15 -0
  32. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksSearchInput.d.ts +7 -0
  33. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +8 -0
  34. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +16 -0
  35. package/browser/src/components/PanelContainer/BookmarksPanel/useUpdateBookmarkResultsActions.d.ts +15 -0
  36. package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +7 -0
  37. package/browser/src/components/PanelContainer/PanelContainer.d.ts +8 -0
  38. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/getDimensions.d.ts +14 -0
  39. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/useAdjustSearchMenuViewDimensions.d.ts +29 -0
  40. package/browser/src/hooks/EnterpriseSearchMenu/useInitChannelToSearchMenuView.d.ts +17 -0
  41. package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +16 -0
  42. package/browser/src/hooks/EnterpriseSearchMenu/useProcessChildContentBlockEvent.d.ts +3 -0
  43. package/browser/src/hooks/EnterpriseSearchMenu/useSearchMenuViewLifecycleManager.d.ts +16 -0
  44. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateInputExpansionState.d.ts +15 -0
  45. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateViewExpansionState.d.ts +14 -0
  46. package/browser/src/hooks/useEnterpriseHotkeys.d.ts +4 -0
  47. package/browser/src/hooks/usePanelBounds.d.ts +4 -0
  48. package/browser/src/hooks/useSingleViewPage.d.ts +2 -0
  49. package/browser/src/hooks/useWindowFocusState.d.ts +17 -0
  50. package/browser/src/slices/menu.d.ts +28 -0
  51. package/browser/src/slices/modal/close.d.ts +10 -0
  52. package/browser/src/slices/modal/index.d.ts +8 -0
  53. package/browser/src/slices/pages/attached.d.ts +83 -0
  54. package/browser/src/slices/tab-focus.d.ts +85 -0
  55. package/browser/src/store/index.d.ts +90 -0
  56. package/client-api-platform/src/api/app-directory.d.ts +2 -2
  57. package/client-api-platform/src/api/browser/bookmarks.d.ts +6 -0
  58. package/client-api-platform/src/api/context-menu/index.d.ts +3 -1
  59. package/client-api-platform/src/init/override-callback/enterprise-page-required-layout-settings.d.ts +5 -0
  60. package/client-api-platform/src/shapes.d.ts +63 -2
  61. package/common/src/api/pages/internal.d.ts +8 -0
  62. package/common/src/api/pages/shapes.d.ts +91 -0
  63. package/common/src/api/protocol/browser.d.ts +13 -1
  64. package/common/src/api/protocol/workspace-platform.d.ts +1 -0
  65. package/common/src/api/workspace-events.d.ts +49 -0
  66. package/common/src/components/BaseButton/BaseButton.d.ts +55 -0
  67. package/common/src/components/Icon/CustomIcon.d.ts +15 -0
  68. package/common/src/hooks/context.d.ts +58 -0
  69. package/common/src/hooks/useAddEditBookmarkDialog.d.ts +7 -0
  70. package/common/src/hooks/usePlatformTheme.d.ts +6 -0
  71. package/common/src/hooks/usePreloadedWindow.d.ts +13 -0
  72. package/common/src/hooks/useSystemSchemeCheck.d.ts +13 -0
  73. package/common/src/slices/environment.d.ts +22 -0
  74. package/common/src/slices/target-theming.d.ts +56 -0
  75. package/common/src/styles/svg-icons.d.ts +7 -0
  76. package/common/src/utils/a11y/index.d.ts +3 -0
  77. package/common/src/utils/bookmark-item-context-menu.d.ts +3 -0
  78. package/common/src/utils/bookmarks.d.ts +12 -0
  79. package/common/src/utils/custom-logo.d.ts +16 -0
  80. package/common/src/utils/enterprise-channels.d.ts +13 -0
  81. package/common/src/utils/enterpriseBrowser.d.ts +1 -0
  82. package/common/src/utils/env.d.ts +1 -1
  83. package/common/src/utils/get-browser-window.d.ts +3 -0
  84. package/common/src/utils/interop.d.ts +30 -0
  85. package/common/src/utils/layout.d.ts +6 -0
  86. package/common/src/utils/menu-config.d.ts +1 -0
  87. package/common/src/utils/modal-bounds.d.ts +0 -8
  88. package/common/src/utils/navigate.d.ts +8 -0
  89. package/common/src/utils/popup-window.d.ts +31 -10
  90. package/common/src/utils/route.d.ts +4 -2
  91. package/common/src/utils/test-ids.d.ts +70 -0
  92. package/common/src/utils/url.d.ts +1 -0
  93. package/common/src/utils/window.d.ts +12 -1
  94. package/home.js +3 -3
  95. package/home.js.map +1 -1
  96. package/index.js +3 -3
  97. package/index.js.map +1 -1
  98. package/notifications.js +1 -1
  99. package/notifications.js.map +1 -1
  100. package/package.json +1 -1
  101. package/store.js +3 -3
  102. package/store.js.map +1 -1
  103. package/common/src/utils/enterprise-context-menu-cahnnels.d.ts +0 -4
@@ -0,0 +1,16 @@
1
+ import OpenFin from '@openfin/core';
2
+ import { BrowserSearchMenuKeyboardEvent } from '../../../../common/src/utils/popup-window';
3
+ import type { AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
4
+ import { SearchViewExpansionState } from '../../components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
5
+ /**
6
+ * Custom hook that sends messages to the search view with updates about the browser window's views, search text changes, and whether
7
+ * the address search view should expand.
8
+ *
9
+ * @param {OpenFin.Identity[]} selectedViews - Array of currently selected views in the browser window.
10
+ * @param {BroadcastChannel} searchMenuChannel - The broadcast channel used to communicate with the search results view.
11
+ * @param {AttachedPageInternal} activePage - Object representing the currently active page in the browser window.
12
+ * @param {SearchViewExpansionState} shouldExpandMenu - Object with boolean indicating if the search results view should expand and the method of expansion.
13
+ * @param {string} searchText - String representing the current text in the address input.
14
+ * @param {BrowserSearchMenuKeyboardEvent} keyboardEvent - Object representing keyboard event to send to search results view to shift focus or interact with results.
15
+ */
16
+ export declare const usePostMessageToSearchMenuView: (selectedViews: OpenFin.Identity[], searchMenuChannel: BroadcastChannel, activePage: AttachedPageInternal, shouldExpandMenu: SearchViewExpansionState, searchText: string, keyboardEvent: BrowserSearchMenuKeyboardEvent) => void;
@@ -0,0 +1,3 @@
1
+ import { OpenFin } from '@openfin/core';
2
+ import { WindowIdentity } from '../../../../common/src/utils/window';
3
+ export declare const useProcessChildContentBlockEvent: (browserWindow: OpenFin.Window, currentOFIdentity: WindowIdentity) => void;
@@ -0,0 +1,16 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import { SecureIconState } from '../../../../browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
3
+ /**
4
+ * Custom hook that manages the contents of the address input as users interact with the browser and navigate views.
5
+ * This hook handles the auto-focusing the address input on the landing page, registers handlers for view URL changes,
6
+ * and manages the state of the secure icon displayed next to valid addresses.
7
+ *
8
+ * @param {string} searchText - String representing the current text in the address input.
9
+ * @param {OpenFin.Identity[]} selectedViews - Array of currently selected views in the browser window.
10
+ * @param {React.MutableRefObject<HTMLInputElement>} addressBarInputRef - Ref object associated with the address input DOM element.
11
+ * @param {SecureIconState} isSecure - Object describing whether the currently focused view's site is secure and whether to show an icon in the address bar.
12
+ * @param {Dispatch<SetStateAction<SearchViewExpansionState>>} setShouldExpandMenu - Function that updates whether the menu should expand and the method of expansion.
13
+ * @param {React.Dispatch<React.SetStateAction<SecureIconState>>} setIsSecure - Function that updates whether the currently focused view's site is secure and whether to show an icon in the address bar.
14
+ */
15
+ declare const useSearchMenuViewLifecycleManager: (searchText: string, selectedViews: OpenFin.Identity[], addressBarInputRef: React.MutableRefObject<HTMLInputElement>, isSecure: SecureIconState, setSearchText: React.Dispatch<React.SetStateAction<string>>, setIsSecure: React.Dispatch<React.SetStateAction<SecureIconState>>) => void;
16
+ export default useSearchMenuViewLifecycleManager;
@@ -0,0 +1,15 @@
1
+ import { FocusEventHandler, MutableRefObject } from 'react';
2
+ import { SearchViewExpansionState } from '../../../../browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
3
+ /**
4
+ * Custom hook that returns action handlers for the address input DOM element that update the search view expansion state.
5
+ *
6
+ * @param {MutableRefObject<HTMLInputElement>} addressBarInputRef - Ref object pointing to the address input element.
7
+ * @param {boolean} shouldExpand - Boolean indicating if the search results view should expand.
8
+ * @param {React.Dispatch<React.SetStateAction<string>>} setSearchText - Function that updates the search text.
9
+ * @param {Dispatch<SetStateAction<SearchViewExpansionState>>} setShouldExpandMenu - Function that updates whether the menu should expand and the method of expansion.
10
+ */
11
+ export declare const useUpdateInputExpansionState: (addressBarInputRef: MutableRefObject<HTMLInputElement>, shouldExpand: boolean, setSearchText: React.Dispatch<React.SetStateAction<string>>, setShouldExpandMenu: React.Dispatch<React.SetStateAction<SearchViewExpansionState>>) => {
12
+ onChange: import("react").ChangeEventHandler<HTMLInputElement>;
13
+ onClick: import("react").MouseEventHandler<HTMLInputElement>;
14
+ onBlur: FocusEventHandler<HTMLInputElement>;
15
+ };
@@ -0,0 +1,14 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { OpenFin } from '@openfin/core';
3
+ import { SearchViewExpansionState } from '../../../../browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
4
+ /**
5
+ * Custom hook that responds to updates to view expansion state updates, handles view focus events, and controls
6
+ * focus on the address input.
7
+ *
8
+ * @param {SearchViewExpansionState} shouldExpandMenu - Object with boolean indicating if the search results view should expand and the method of expansion.
9
+ * @param {React.MutableRefObject<HTMLInputElement>} addressBarInputRef - Ref object associated with the address input DOM element.
10
+ * @param {OpenFin.View} addressSearchResultsView - View object corresponding to the search results view.
11
+ * @param {Dispatch<SetStateAction<number>>} setAddressBarWidth - Function that updates the width in pixels of the address input bar in its expanded state.
12
+ * @param {Dispatch<SetStateAction<SearchViewExpansionState>>} setShouldExpandMenu - Function that updates whether the menu should expand and the method of expansion.
13
+ */
14
+ export declare const useUpdateViewExpansionState: (shouldExpandMenu: SearchViewExpansionState, addressBarInputRef: React.MutableRefObject<HTMLInputElement>, addressSearchResultsView: OpenFin.View, setAddressBarWidth: Dispatch<SetStateAction<number>>, setShouldExpandMenu: Dispatch<SetStateAction<SearchViewExpansionState>>) => void;
@@ -0,0 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export declare const processHotKeys: (e: OpenFin.Events.ViewEvents.HotkeyEvent, isOsWindows: boolean, viewId?: OpenFin.Identity) => void;
3
+ declare const useEnterpriseHotkeys: (viewId?: OpenFin.Identity) => void;
4
+ export default useEnterpriseHotkeys;
@@ -0,0 +1,4 @@
1
+ import { PanelConfigVertical, PanelPosition } from '../../../common/src/api/pages/shapes';
2
+ export type CSSBounds = Partial<Record<'top' | 'right' | 'bottom' | 'left' | 'height' | 'width', string>>;
3
+ export declare const BookmarksPanelConfig: PanelConfigVertical;
4
+ export declare const usePanelBounds: (panelPosition: PanelPosition | 'Center') => Partial<Record<"top" | "left" | "height" | "width" | "bottom" | "right", string>>;
@@ -0,0 +1,2 @@
1
+ export declare const useIsPageSingleView: (pageId: string) => boolean;
2
+ export declare const useIsActivePageSingleView: () => boolean;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ type WindowState = 'focused' | 'view-focused' | 'blurred';
3
+ /**
4
+ * Creates a context which exposes information about the specified window's state
5
+ */
6
+ export declare const WindowStateProvider: (props: {
7
+ children: React.ReactNode;
8
+ }) => JSX.Element;
9
+ /**
10
+ * Tracks the window's current state.
11
+ */
12
+ export declare const useWindowState: () => WindowState;
13
+ /**
14
+ * Tracks whether the window or any view within it is focused.
15
+ */
16
+ declare const useWindowFocusState: () => boolean;
17
+ export default useWindowFocusState;
@@ -0,0 +1,28 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ import { Menu, UserMenuParams } from '../../../common/src/utils/menu';
3
+ export interface SystemMenuParams {
4
+ parentName: string;
5
+ }
6
+ export type CompleteMenuParams<M extends Menu> = UserMenuParams[M] & SystemMenuParams;
7
+ interface ActiveState<M extends Menu = Menu> {
8
+ type: M | null;
9
+ params: UserMenuParams[M] | null;
10
+ }
11
+ export interface InitialState {
12
+ active: ActiveState;
13
+ }
14
+ export interface MenusRootState {
15
+ menu: InitialState;
16
+ }
17
+ export declare const menuSlice: import("@reduxjs/toolkit").Slice<InitialState, {
18
+ openMenu: (state: import("immer/dist/internal").WritableDraft<InitialState>, action: PayloadAction<ActiveState>) => void;
19
+ closeActiveMenu: (state: import("immer/dist/internal").WritableDraft<InitialState>) => void;
20
+ }, "menu">;
21
+ export declare const openMenu: <M extends Menu = Menu>(menu: M, params: UserMenuParams[M]) => {
22
+ payload: ActiveState<Menu>;
23
+ type: string;
24
+ };
25
+ export declare const closeActiveMenu: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
26
+ export declare const selectActiveMenu: (state: MenusRootState) => ActiveState;
27
+ declare const _default: import("redux").Reducer<InitialState>;
28
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export interface ClosePageRequestPayload {
2
+ pageId: string;
3
+ closeType?: 'page' | 'view';
4
+ }
5
+ export declare const handleClosePageRequest: import("@reduxjs/toolkit").AsyncThunk<void, ClosePageRequestPayload, {}>;
6
+ export declare const closeBrowserWindow: () => Promise<void>;
7
+ /**
8
+ * Show the close window modal
9
+ */
10
+ export declare const handleCloseWindowRequest: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
@@ -0,0 +1,8 @@
1
+ export interface PagesModalRootState {
2
+ modal: {
3
+ isModalOpen: boolean;
4
+ };
5
+ }
6
+ export declare const modalSlice: import("@reduxjs/toolkit").Slice<{}, {}, "modal">;
7
+ declare const _default: import("redux").Reducer<{}>;
8
+ export default _default;
@@ -0,0 +1,83 @@
1
+ import type { AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
2
+ export interface AttachedPagesRootState {
3
+ attachedPages: {
4
+ activePageIndex: number;
5
+ attachedPages: AttachedPageInternal[];
6
+ isDetachingPages: boolean;
7
+ isActivePageChanging: boolean;
8
+ isInitialized: boolean;
9
+ };
10
+ }
11
+ interface Action<P> {
12
+ type: string;
13
+ payload: P;
14
+ }
15
+ interface UpdatePageAtIndexPayload {
16
+ index: number;
17
+ page: Partial<AttachedPageInternal>;
18
+ }
19
+ /**
20
+ * The source of truth for the current Browser window's attached page state.
21
+ */
22
+ export declare const attachedPagesSlice: import("@reduxjs/toolkit").Slice<{
23
+ activePageIndex: number;
24
+ attachedPages: AttachedPageInternal[];
25
+ isDetachingPages: boolean;
26
+ isActivePageChanging: boolean;
27
+ isInitialized: boolean;
28
+ }, {
29
+ setPages: (state: import("immer/dist/internal").WritableDraft<{
30
+ activePageIndex: number;
31
+ attachedPages: AttachedPageInternal[];
32
+ isDetachingPages: boolean;
33
+ isActivePageChanging: boolean;
34
+ isInitialized: boolean;
35
+ }>, action: Action<AttachedPageInternal[]>) => void;
36
+ updatePageAtIndex: (state: import("immer/dist/internal").WritableDraft<{
37
+ activePageIndex: number;
38
+ attachedPages: AttachedPageInternal[];
39
+ isDetachingPages: boolean;
40
+ isActivePageChanging: boolean;
41
+ isInitialized: boolean;
42
+ }>, action: Action<UpdatePageAtIndexPayload>) => void;
43
+ setIsDetachingPages: (state: import("immer/dist/internal").WritableDraft<{
44
+ activePageIndex: number;
45
+ attachedPages: AttachedPageInternal[];
46
+ isDetachingPages: boolean;
47
+ isActivePageChanging: boolean;
48
+ isInitialized: boolean;
49
+ }>, action: Action<boolean>) => void;
50
+ setIsActivePageChanging: (state: import("immer/dist/internal").WritableDraft<{
51
+ activePageIndex: number;
52
+ attachedPages: AttachedPageInternal[];
53
+ isDetachingPages: boolean;
54
+ isActivePageChanging: boolean;
55
+ isInitialized: boolean;
56
+ }>, action: Action<boolean>) => void;
57
+ setIsInitialized: (state: import("immer/dist/internal").WritableDraft<{
58
+ activePageIndex: number;
59
+ attachedPages: AttachedPageInternal[];
60
+ isDetachingPages: boolean;
61
+ isActivePageChanging: boolean;
62
+ isInitialized: boolean;
63
+ }>, action: Action<boolean>) => void;
64
+ }, "attached-pages">;
65
+ export declare const setPages: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<AttachedPageInternal[], string>, updatePageAtIndex: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<UpdatePageAtIndexPayload, string>, setIsActivePageChanging: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<boolean, string>, setIsDetachingPages: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<boolean, string>, setIsInitialized: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<boolean, string>;
66
+ export declare const selectActivePage: (state: AttachedPagesRootState) => AttachedPageInternal;
67
+ export declare const selectActivePageWithIndex: (state: AttachedPagesRootState) => [AttachedPageInternal, number];
68
+ export declare const selectPage: (state: AttachedPagesRootState, pageId: string) => AttachedPageInternal;
69
+ export declare const selectPageByLayoutContainerKey: (state: AttachedPagesRootState, layoutContainerKey: string) => AttachedPageInternal;
70
+ export declare const selectPageAtIndex: (state: AttachedPagesRootState, index: number) => AttachedPageInternal;
71
+ export declare const selectPageWithIndex: (state: AttachedPagesRootState, pageId: string) => [AttachedPageInternal, number];
72
+ export declare const selectPages: (state: AttachedPagesRootState) => AttachedPageInternal[];
73
+ export declare const selectIsDetachingPages: (state: AttachedPagesRootState) => boolean;
74
+ export declare const selectIsActivePageChanging: (state: AttachedPagesRootState) => boolean;
75
+ export declare const selectIsInitialized: (state: AttachedPagesRootState) => boolean;
76
+ declare const _default: import("redux").Reducer<{
77
+ activePageIndex: number;
78
+ attachedPages: AttachedPageInternal[];
79
+ isDetachingPages: boolean;
80
+ isActivePageChanging: boolean;
81
+ isInitialized: boolean;
82
+ }>;
83
+ export default _default;
@@ -0,0 +1,85 @@
1
+ import { PayloadAction } from '@reduxjs/toolkit';
2
+ import type OpenFin from '@openfin/core';
3
+ import { BrowserRootState } from '../../../browser/src/store';
4
+ export interface TabFocusRootState {
5
+ tabFocus: {
6
+ showAllContextGroups: boolean;
7
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
8
+ };
9
+ }
10
+ export declare const tabFocusSlice: import("@reduxjs/toolkit").Slice<{
11
+ showAllContextGroups: boolean;
12
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
13
+ }, {
14
+ /**
15
+ * Select a single view
16
+ */
17
+ selectViewReducer: (state: import("immer/dist/internal").WritableDraft<{
18
+ showAllContextGroups: boolean;
19
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
20
+ }>, action: PayloadAction<{
21
+ viewId: OpenFin.Identity;
22
+ layoutContainerKey: string;
23
+ }>) => void;
24
+ /**
25
+ * Add a view to the list of currently selected views (multi-select);
26
+ */
27
+ addSelectedViewReducer: (state: import("immer/dist/internal").WritableDraft<{
28
+ showAllContextGroups: boolean;
29
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
30
+ }>, action: PayloadAction<{
31
+ viewId: OpenFin.Identity;
32
+ layoutContainerKey: string;
33
+ }>) => void;
34
+ /**
35
+ * Clears selected view from a specified page
36
+ */
37
+ clearSelectedViewsReducer: (state: import("immer/dist/internal").WritableDraft<{
38
+ showAllContextGroups: boolean;
39
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
40
+ }>, action: PayloadAction<{
41
+ layoutContainerKey: string;
42
+ }>) => void;
43
+ /**
44
+ * Delete entry for pageId from pagesWithSelectedViews
45
+ */
46
+ deletePageWithSelectedViewsReducer: (state: import("immer/dist/internal").WritableDraft<{
47
+ showAllContextGroups: boolean;
48
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
49
+ }>, action: PayloadAction<string>) => void;
50
+ toggleContextGroupOutlines: (state: import("immer/dist/internal").WritableDraft<{
51
+ showAllContextGroups: boolean;
52
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
53
+ }>) => void;
54
+ }, "tab-focus">;
55
+ export declare const selectView: import("@reduxjs/toolkit").AsyncThunk<void, {
56
+ viewId: OpenFin.Identity;
57
+ pageId: string;
58
+ }, {}>;
59
+ export declare const selectViewForLayoutContainerKey: import("@reduxjs/toolkit").AsyncThunk<void, {
60
+ viewId: OpenFin.Identity;
61
+ layoutContainerKey: string;
62
+ }, {}>;
63
+ export declare const addSelectedView: import("@reduxjs/toolkit").AsyncThunk<void, {
64
+ viewId: OpenFin.Identity;
65
+ pageId: string;
66
+ }, {}>;
67
+ export declare const clearSelectedViews: import("@reduxjs/toolkit").AsyncThunk<void, {
68
+ pageId: string;
69
+ }, {}>;
70
+ export declare const deletePageWithSelectedViews: import("@reduxjs/toolkit").AsyncThunk<void, string, {}>;
71
+ export declare const toggleContextGroupOutlines: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, selectViewReducer: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
72
+ viewId: OpenFin.Identity;
73
+ layoutContainerKey: string;
74
+ }, string>;
75
+ export declare const selectShowAllContextGroups: (state: TabFocusRootState) => boolean;
76
+ export declare const selectSelectedViewsForPage: (state: BrowserRootState, pageId: string) => OpenFin.Identity[];
77
+ export declare const selectSelectedViewsForLayoutContainerKey: (layoutContainerKey: string) => (state: BrowserRootState) => OpenFin.Identity[];
78
+ export declare const selectLayoutsWithSelectedViews: (state: TabFocusRootState) => Record<string, OpenFin.Identity[]>;
79
+ export declare const selectFirstViewNameForLayoutContainerKey: (layoutContainerKey: string) => (state: BrowserRootState) => string;
80
+ export declare const selectFirstViewIdForLayoutContainerKey: (layoutContainerKey: string) => (state: BrowserRootState) => string;
81
+ declare const _default: import("redux").Reducer<{
82
+ showAllContextGroups: boolean;
83
+ layoutsWithSelectedViews: Record<string, OpenFin.Identity[]>;
84
+ }>;
85
+ export default _default;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Redux store for a Browser Window.
3
+ */
4
+ declare const store: import("@reduxjs/toolkit").EnhancedStore<{
5
+ environment: {
6
+ isWindows: boolean;
7
+ };
8
+ modal: {};
9
+ attachedPages: {
10
+ activePageIndex: number;
11
+ attachedPages: import("../../../common/src/api/pages/shapes").AttachedPageInternal[];
12
+ isDetachingPages: boolean;
13
+ isActivePageChanging: boolean;
14
+ isInitialized: boolean;
15
+ };
16
+ tabFocus: {
17
+ showAllContextGroups: boolean;
18
+ layoutsWithSelectedViews: Record<string, {
19
+ uuid: string;
20
+ name: string;
21
+ }[]>;
22
+ };
23
+ menu: import("@browser/slices/menu").InitialState;
24
+ targetTheming: {
25
+ isFetchingTheme: boolean;
26
+ currentTheme: import("../../../common/src/api/theming").ComputedTheme;
27
+ hasTriedFetch: boolean;
28
+ currentScheme: import("@client-platform/shapes").ColorSchemeOptionType; /**
29
+ * Redux store for a Browser Window.
30
+ */
31
+ };
32
+ }, import("redux").AnyAction, [import("redux-thunk").ThunkMiddleware<{
33
+ environment: {
34
+ isWindows: boolean;
35
+ };
36
+ modal: {};
37
+ attachedPages: {
38
+ activePageIndex: number;
39
+ attachedPages: import("../../../common/src/api/pages/shapes").AttachedPageInternal[];
40
+ isDetachingPages: boolean;
41
+ isActivePageChanging: boolean;
42
+ isInitialized: boolean;
43
+ };
44
+ tabFocus: {
45
+ showAllContextGroups: boolean;
46
+ layoutsWithSelectedViews: Record<string, {
47
+ uuid: string;
48
+ name: string;
49
+ }[]>;
50
+ };
51
+ menu: import("@browser/slices/menu").InitialState;
52
+ targetTheming: {
53
+ isFetchingTheme: boolean;
54
+ currentTheme: import("../../../common/src/api/theming").ComputedTheme;
55
+ hasTriedFetch: boolean;
56
+ currentScheme: import("@client-platform/shapes").ColorSchemeOptionType; /**
57
+ * Redux store for a Browser Window.
58
+ */
59
+ };
60
+ }, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
61
+ environment: {
62
+ isWindows: boolean;
63
+ };
64
+ modal: {};
65
+ attachedPages: {
66
+ activePageIndex: number;
67
+ attachedPages: import("../../../common/src/api/pages/shapes").AttachedPageInternal[];
68
+ isDetachingPages: boolean;
69
+ isActivePageChanging: boolean;
70
+ isInitialized: boolean;
71
+ };
72
+ tabFocus: {
73
+ showAllContextGroups: boolean;
74
+ layoutsWithSelectedViews: Record<string, {
75
+ uuid: string;
76
+ name: string;
77
+ }[]>;
78
+ };
79
+ menu: import("@browser/slices/menu").InitialState;
80
+ targetTheming: {
81
+ isFetchingTheme: boolean;
82
+ currentTheme: import("../../../common/src/api/theming").ComputedTheme;
83
+ hasTriedFetch: boolean;
84
+ currentScheme: import("@client-platform/shapes").ColorSchemeOptionType; /**
85
+ * Redux store for a Browser Window.
86
+ */
87
+ };
88
+ }, import("redux").AnyAction>]>;
89
+ export default store;
90
+ export type BrowserRootState = ReturnType<typeof store.getState>;
@@ -6,8 +6,8 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
6
6
  * @param app the app directory entry.
7
7
  * @param opts launch options.
8
8
  */
9
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Application | OpenFin.Platform>;
10
- export declare const enterpriseAppDirectoryChannelClient: () => Promise<import("../../../common/src/utils/channels").withDisconnectListener<OpenFin.ChannelClient>>;
9
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Platform | OpenFin.View | OpenFin.Application>;
10
+ export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
11
11
  export declare function getResults(payload: {
12
12
  req: SearchSitesRequest;
13
13
  } & {
@@ -0,0 +1,6 @@
1
+ import { BookmarkNode, CreateBookmarkNodeRequest, UpdateBookmarkNodeRequest } from '../../../../common/src/api/pages/shapes';
2
+ export declare const createBookmarkNodeInternal: (req: CreateBookmarkNodeRequest) => Promise<BookmarkNode>;
3
+ export declare const getBookmarkNodeInternal: (id?: string) => Promise<BookmarkNode | undefined>;
4
+ export declare const searchBookmarkNodesInternal: (query: string) => Promise<BookmarkNode[]>;
5
+ export declare const updateBookmarkNodeInternal: (req: UpdateBookmarkNodeRequest) => Promise<BookmarkNode | undefined>;
6
+ export declare const deleteBookmarkNodeInternal: (id: string) => Promise<void>;
@@ -6,7 +6,8 @@ export declare enum AnchorBehavior {
6
6
  BottomRight = 1,
7
7
  Center = 2
8
8
  }
9
- export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: ContextMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
9
+ type ContextMenuPayload = OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload;
10
+ export declare const openCommonContextMenu: (payload: ContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: ContextMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
10
11
  export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenGlobalContextMenuRequest & {
11
12
  identity: OpenFin.Identity;
12
13
  }, callerIdentity: OpenFin.Identity): Promise<void>;
@@ -19,3 +20,4 @@ export declare function openPageTabContextMenuInternal(this: WorkspacePlatformPr
19
20
  export declare function openSaveButtonContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenSaveButtonContextMenuRequest & {
20
21
  identity: OpenFin.Identity;
21
22
  }, callerIdentity: OpenFin.Identity): Promise<void>;
23
+ export {};
@@ -0,0 +1,5 @@
1
+ import { PageLayout } from '../../../../common/src/api/pages/shapes';
2
+ export type EnterprisePageRequiredLayoutSettings = {
3
+ newTabButtonUrl: string;
4
+ };
5
+ export declare const applyEnterprisePageRequiredLayoutSettings: (requiredSettings: EnterprisePageRequiredLayoutSettings, layout: PageLayout) => void;
@@ -4,7 +4,7 @@ import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/ut
4
4
  import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
5
  import { Resource } from '../../common/src/api/i18next';
6
6
  import { TrackedSite } from '../../common/src/api/pages/idb';
7
- import type { AddDefaultPagePayload, AttachedPage, CopyPagePayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
7
+ import { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
8
8
  import { SetActivePageForWindowPayload } from '../../common/src/api/pages/shapes';
9
9
  import { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
10
10
  import type { CustomThemes } from '../../common/src/api/theming';
@@ -170,6 +170,12 @@ export declare enum EnterpriseMainContextMenuOptionType {
170
170
  Print = "Print",
171
171
  Pin = "Pin"
172
172
  }
173
+ /** @internal */
174
+ export declare enum BookmarkItemContextMenuOptionType {
175
+ EditName = "Edit Name",
176
+ Move = "Move",
177
+ Delete = "Delete"
178
+ }
173
179
  /**Shape of the data property of a global context menu template item */
174
180
  export interface GlobalContextMenuItemData extends ContextMenuItemData {
175
181
  type: GlobalContextMenuOptionType;
@@ -189,6 +195,13 @@ export interface AppearanceContextMenuItemData extends GlobalContextMenuItemData
189
195
  export type GlobalContextMenuItemTemplate = OpenFin.MenuItemTemplate<GlobalContextMenuItemData>;
190
196
  /** @internal */
191
197
  export type EnterpriseMainContextMenuItemTemplate = OpenFin.MenuItemTemplate<EnterpriseMainContextMenuItemData>;
198
+ /** @internal */
199
+ export interface BookmarkItemContextMenuItemData extends ContextMenuItemData {
200
+ type: BookmarkItemContextMenuOptionType;
201
+ parentId?: string;
202
+ }
203
+ /** @internal */
204
+ export type BookmarkItemContextMenuItemTemplate = OpenFin.MenuItemTemplate<BookmarkItemContextMenuItemData>;
192
205
  /**Shape of the data property of a page tab context menu template item */
193
206
  export interface PageTabContextMenuItemData extends ContextMenuItemData {
194
207
  type: PageTabContextMenuOptionType;
@@ -1084,6 +1097,39 @@ export interface BrowserWindowModule {
1084
1097
  _getCuratedContent(req?: any): Promise<Site[]>;
1085
1098
  /** @internal */
1086
1099
  _handleRequestNavigation(args: NavigationRequest): Promise<void>;
1100
+ _bookmarks: BrowserBookmarks;
1101
+ }
1102
+ export interface BrowserBookmarks {
1103
+ /**
1104
+ * Implementation for creating a new bookmark node.
1105
+ * @param req The request object specifying the attributes of the new node.
1106
+ * @internal
1107
+ */
1108
+ _createBookmarkNode(req: CreateBookmarkNodeRequest): Promise<BookmarkNode>;
1109
+ /**
1110
+ * Implementation for getting a bookmark node.
1111
+ * @param string The unique id of the node. Returns root node when left undefined.
1112
+ * @internal
1113
+ */
1114
+ _getBookmarkNode(id?: string): Promise<BookmarkNode | undefined>;
1115
+ /**
1116
+ * Implementation for searching for a bookmark node.
1117
+ * @param query The string used to filter bookmark nodes by title or, in the case of bookmarks, URL, as well.
1118
+ * @internal
1119
+ */
1120
+ _searchBookmarkNodes(query: string): Promise<BookmarkNode[]>;
1121
+ /**
1122
+ * Implementation for updating a bookmark node.
1123
+ * @param req The request object with the updated attributes of the targeted node.
1124
+ * @internal
1125
+ */
1126
+ _updateBookmarkNode(req: UpdateBookmarkNodeRequest): Promise<BookmarkNode | undefined>;
1127
+ /**
1128
+ * Implementation for deleting a bookmark node.
1129
+ * @param id The unique id of the node.
1130
+ * @internal
1131
+ */
1132
+ _deleteBookmarkNode(id: string): Promise<void>;
1087
1133
  }
1088
1134
  /**
1089
1135
  * @internal
@@ -1291,6 +1337,10 @@ export interface BrowserWindowFactory {
1291
1337
  * ```
1292
1338
  *
1293
1339
  * @param options the browser window creation options
1340
+ * @remarks
1341
+ * **View names are singleton**: It is not recommended to provide view names, but if they are provided, they can only be used by one view at a time.
1342
+ *
1343
+ * **Expected Behavior**: If a new view is created using the same view name as an already existing view, the new view will be created, with the view name, and the existing view will be destroyed.
1294
1344
  */
1295
1345
  createWindow(options: BrowserCreateWindowRequest): Promise<BrowserWindowModule>;
1296
1346
  /**
@@ -1611,6 +1661,10 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1611
1661
  * }
1612
1662
  * });
1613
1663
  * ```
1664
+ * @remarks
1665
+ * **View names are singleton**: It is not recommended to provide view names, but if they are provided, they can only be used by one view at a time.
1666
+ *
1667
+ * **Expected Behavior**: If a new view is created using the same view name as an already existing view, the new view will be created, with the view name, and the existing view will be destroyed.
1614
1668
  */
1615
1669
  createView(viewOptions: Partial<OpenFin.ViewOptions> | BrowserCreateViewRequest, target?: OpenFin.CreateViewTarget, targetView?: OpenFin.Identity): Promise<OpenFin.View>;
1616
1670
  /**
@@ -1728,6 +1782,12 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1728
1782
  * Implementation for getting the notifications workspace platform configuration.
1729
1783
  */
1730
1784
  getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
1785
+ _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1786
+ /**
1787
+ * Triggers all browser windows to refresh bookmarks data
1788
+ * @internal
1789
+ */
1790
+ _refreshBookmarksInternal(): Promise<void>;
1731
1791
  /**
1732
1792
  * The browser window factory for the Workspace Platform.
1733
1793
  */
@@ -1740,7 +1800,6 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1740
1800
  * Theme API for the Workspace Platform.
1741
1801
  */
1742
1802
  Theme: ThemeApi;
1743
- _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1744
1803
  }
1745
1804
  export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1746
1805
  /**
@@ -1980,6 +2039,8 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1980
2039
  }): Promise<SearchSitesResponse>;
1981
2040
  /** @internal */
1982
2041
  handleRequestNavigationInternal(req: NavigationRequest): Promise<void>;
2042
+ /** @internal */
2043
+ refreshBookmarksInternal(): Promise<void>;
1983
2044
  }
1984
2045
  /**
1985
2046
  * The origins from which a custom action can be invoked
@@ -0,0 +1,8 @@
1
+ import { CopyPagePayload, HandleSaveModalOnPageClosePayload, Page, SaveModalOnPageCloseResult, ShouldPageClosePayload, ShouldPageCloseResult } from '../../../../common/src/api/pages/shapes';
2
+ import { shouldWindowClose } from '../../../../client-api-platform/src/api/pages';
3
+ import { HandlePageChangesPayload, ModifiedPageState } from '../../../../client-api-platform/src/shapes';
4
+ export declare const requestPageSaveModalDecision: (req: HandleSaveModalOnPageClosePayload) => Promise<SaveModalOnPageCloseResult>;
5
+ export declare const requestShouldPageClose: (req: ShouldPageClosePayload) => Promise<ShouldPageCloseResult>;
6
+ export declare const requestShouldWindowClose: (payload: Parameters<typeof shouldWindowClose>[0]) => ReturnType<typeof shouldWindowClose>;
7
+ export declare const copyPage: (req: CopyPagePayload) => Promise<Page>;
8
+ export declare const requestPageChangesDecision: (req: HandlePageChangesPayload) => Promise<ModifiedPageState>;