@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.
Files changed (92) 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 +106 -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/CommandBar.d.ts +9 -0
  11. package/browser/src/components/ControlBar/SearchMenu/Icons.d.ts +23 -0
  12. package/browser/src/components/ControlBar/SearchMenu/ResultIcon.d.ts +11 -0
  13. package/browser/src/components/ControlBar/SearchMenu/SecureIcon.d.ts +5 -0
  14. package/browser/src/components/ControlBar/SearchMenu/UrlInput.d.ts +3 -0
  15. package/browser/src/components/ControlBar/SearchMenu/useIsPageOpen.d.ts +3 -0
  16. package/browser/src/components/ControlBar/Tablist/utils.d.ts +8 -0
  17. package/browser/src/components/ControlBar/utils.d.ts +1 -0
  18. package/browser/src/components/LandingPage/BrandIcon.d.ts +6 -0
  19. package/browser/src/components/LayoutContainer/utils.d.ts +10 -0
  20. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarkItem.d.ts +17 -0
  21. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksFolderHeader.d.ts +8 -0
  22. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanel.d.ts +9 -0
  23. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksPanelHeader.d.ts +3 -0
  24. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksResults.d.ts +15 -0
  25. package/browser/src/components/PanelContainer/BookmarksPanel/BookmarksSearchInput.d.ts +7 -0
  26. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarkNavigation.d.ts +8 -0
  27. package/browser/src/components/PanelContainer/BookmarksPanel/useBookmarksSearch.d.ts +16 -0
  28. package/browser/src/components/PanelContainer/BookmarksPanel/useUpdateBookmarkResultsActions.d.ts +15 -0
  29. package/browser/src/components/PanelContainer/BookmarksPanel/utils.d.ts +7 -0
  30. package/browser/src/components/PanelContainer/PanelContainer.d.ts +8 -0
  31. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/getDimensions.d.ts +14 -0
  32. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/useAdjustSearchMenuViewDimensions.d.ts +29 -0
  33. package/browser/src/hooks/EnterpriseSearchMenu/useInitChannelToSearchMenuView.d.ts +18 -0
  34. package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +18 -0
  35. package/browser/src/hooks/EnterpriseSearchMenu/useProcessChildContentBlockEvent.d.ts +3 -0
  36. package/browser/src/hooks/EnterpriseSearchMenu/useSearchMenuViewLifecycleManager.d.ts +16 -0
  37. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateInputExpansionState.d.ts +15 -0
  38. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateViewExpansionState.d.ts +32 -0
  39. package/browser/src/hooks/useEnterpriseHotkeys.d.ts +4 -0
  40. package/browser/src/hooks/usePanelBounds.d.ts +4 -0
  41. package/browser/src/hooks/useSingleViewPage.d.ts +2 -0
  42. package/browser/src/hooks/useWindowFocusState.d.ts +17 -0
  43. package/browser/src/slices/menu.d.ts +28 -0
  44. package/browser/src/slices/modal/close.d.ts +10 -0
  45. package/browser/src/slices/modal/index.d.ts +8 -0
  46. package/browser/src/slices/pages/attached.d.ts +83 -0
  47. package/browser/src/slices/tab-focus.d.ts +85 -0
  48. package/browser/src/store/index.d.ts +90 -0
  49. package/client-api-platform/src/api/browser/bookmarks.d.ts +6 -0
  50. package/client-api-platform/src/api/context-menu/index.d.ts +3 -1
  51. package/client-api-platform/src/init/override-callback/enterprise-page-required-layout-settings.d.ts +5 -0
  52. package/client-api-platform/src/shapes.d.ts +55 -2
  53. package/common/src/api/pages/internal.d.ts +8 -0
  54. package/common/src/api/pages/shapes.d.ts +91 -0
  55. package/common/src/api/protocol/browser.d.ts +13 -1
  56. package/common/src/api/protocol/workspace-platform.d.ts +1 -0
  57. package/common/src/api/theming.d.ts +2 -1
  58. package/common/src/api/workspace-events.d.ts +49 -0
  59. package/common/src/components/BaseButton/BaseButton.d.ts +55 -0
  60. package/common/src/components/Icon/CustomIcon.d.ts +15 -0
  61. package/common/src/hooks/context.d.ts +58 -0
  62. package/common/src/hooks/usePlatformTheme.d.ts +6 -0
  63. package/common/src/hooks/useSystemSchemeCheck.d.ts +13 -0
  64. package/common/src/slices/environment.d.ts +22 -0
  65. package/common/src/slices/target-theming.d.ts +56 -0
  66. package/common/src/styles/svg-icons.d.ts +7 -0
  67. package/common/src/utils/a11y/index.d.ts +3 -0
  68. package/common/src/utils/bookmark-item-context-menu.d.ts +3 -0
  69. package/common/src/utils/bookmarks.d.ts +12 -0
  70. package/common/src/utils/custom-logo.d.ts +16 -0
  71. package/common/src/utils/enterprise-channels.d.ts +13 -0
  72. package/common/src/utils/enterpriseBrowser.d.ts +1 -0
  73. package/common/src/utils/interop.d.ts +30 -0
  74. package/common/src/utils/layout.d.ts +6 -0
  75. package/common/src/utils/menu-config.d.ts +1 -0
  76. package/common/src/utils/modal-bounds.d.ts +0 -8
  77. package/common/src/utils/navigate.d.ts +8 -0
  78. package/common/src/utils/popup-window.d.ts +31 -10
  79. package/common/src/utils/route.d.ts +4 -2
  80. package/common/src/utils/test-ids.d.ts +70 -0
  81. package/common/src/utils/url.d.ts +1 -0
  82. package/common/src/utils/window.d.ts +12 -1
  83. package/home.js +3 -3
  84. package/home.js.map +1 -1
  85. package/index.js +3 -3
  86. package/index.js.map +1 -1
  87. package/notifications.js +4 -4
  88. package/notifications.js.map +1 -1
  89. package/package.json +2 -2
  90. package/store.js +3 -3
  91. package/store.js.map +1 -1
  92. package/common/src/utils/enterprise-context-menu-cahnnels.d.ts +0 -4
@@ -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,32 @@
1
+ /// <reference types="lodash" />
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ import { OpenFin } from '@openfin/core';
4
+ import { SearchViewExpansionState } from '../../../../browser/src/components/ControlBar/LeftControlsContainer/EnterpriseNavigationContainer/AddressBar/AddressBar';
5
+ export declare let lastViewEvent: {
6
+ viewIdentity: OpenFin.Identity;
7
+ type: 'view-focused' | 'tab-created';
8
+ };
9
+ /**
10
+ * This function enables the following behaviors:
11
+ * - When a new view tab is created via the new tab button that is on the landing page, the adress input will focus.
12
+ * - When a user clicks on an inactive view tab that is on the landing page, the address input will focus.
13
+ * - When a user clicks on an active view tab is on the landing page while the address input bar is focused, the view will focus.
14
+ */
15
+ export declare const debouncedHandleAddressFocusOnLandingPage: import("lodash").DebouncedFunc<({ viewIdentity, type }: typeof lastViewEvent) => Promise<boolean>>;
16
+ /**
17
+ * This function enables the following behaviors:
18
+ * - When a user re-organizes a view tab on the landing page in a layout, the address input will focus.
19
+ * - When a user drags a page tab that is on the landing page into a layout, the address input will focus.
20
+ * - When a user drags out a view or page tab on the landing page to create a new window, the address input will focus (from 'tab-created' event).
21
+ */
22
+ export declare const resetLastFocusedViewAndHandleViewFocused: (event: typeof lastViewEvent) => Promise<boolean>;
23
+ /**
24
+ * Custom hook that responds to updates to view expansion state updates, handles view focus events, and controls
25
+ * focus on the address input.
26
+ *
27
+ * @param {SearchViewExpansionState} shouldExpandMenu - Object with boolean indicating if the search results view should expand and the method of expansion.
28
+ * @param {OpenFin.View} addressSearchResultsView - View object corresponding to the search results view.
29
+ * @param {Dispatch<SetStateAction<number>>} setAddressBarWidth - Function that updates the width in pixels of the address input bar in its expanded state.
30
+ * @param {Dispatch<SetStateAction<SearchViewExpansionState>>} setShouldExpandMenu - Function that updates whether the menu should expand and the method of expansion.
31
+ */
32
+ export declare const useUpdateViewExpansionState: (shouldExpandMenu: SearchViewExpansionState, 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>;
@@ -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
@@ -1736,6 +1782,12 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1736
1782
  * Implementation for getting the notifications workspace platform configuration.
1737
1783
  */
1738
1784
  getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
1785
+ _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1786
+ /**
1787
+ * Triggers all browser windows to refresh bookmarks data
1788
+ * @internal
1789
+ */
1790
+ _refreshBookmarksInternal(): Promise<void>;
1739
1791
  /**
1740
1792
  * The browser window factory for the Workspace Platform.
1741
1793
  */
@@ -1748,7 +1800,6 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1748
1800
  * Theme API for the Workspace Platform.
1749
1801
  */
1750
1802
  Theme: ThemeApi;
1751
- _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1752
1803
  }
1753
1804
  export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1754
1805
  /**
@@ -1988,6 +2039,8 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1988
2039
  }): Promise<SearchSitesResponse>;
1989
2040
  /** @internal */
1990
2041
  handleRequestNavigationInternal(req: NavigationRequest): Promise<void>;
2042
+ /** @internal */
2043
+ refreshBookmarksInternal(): Promise<void>;
1991
2044
  }
1992
2045
  /**
1993
2046
  * The origins from which a custom action can be invoked
@@ -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>;
@@ -257,4 +257,95 @@ export type AddPagePayload = {
257
257
  /** Index at which the page should be added */
258
258
  insertionIndex?: number;
259
259
  };
260
+ /**
261
+ * A node that represents either a bookmark or folder in the bookmark tree.
262
+ */
263
+ export interface BookmarkNode {
264
+ /**
265
+ * The unique id of the node.
266
+ */
267
+ id: string;
268
+ /**
269
+ * The title of the bookmark or folder.
270
+ */
271
+ title: string;
272
+ /**
273
+ * The unique URL associated with a bookmark. Is undefined for folders.
274
+ */
275
+ url?: string;
276
+ /**
277
+ * When this bookmark or folder was created, in milliseconds since the epoch.
278
+ */
279
+ dateCreated: number;
280
+ /**
281
+ * The favicon to display next to titles for bookmarks. When no icon or a
282
+ * broken icon is provided, the default globe icon will be used instead. Is
283
+ * undefined for folders.
284
+ */
285
+ favIcon?: string;
286
+ /**
287
+ * The id of the parent folder that contains a bookmark. Is undefined for the
288
+ * root node.
289
+ */
290
+ parentId?: string;
291
+ /**
292
+ * The children of this node. Can only contain bookmarks. Is undefined for
293
+ * bookmarks.
294
+ */
295
+ children?: BookmarkNode[];
296
+ }
297
+ /**
298
+ * Request object to create a new bookmark node.
299
+ */
300
+ export interface CreateBookmarkNodeRequest {
301
+ /**
302
+ * The title of the bookmark or folder.
303
+ */
304
+ title: string;
305
+ /**
306
+ * The unique URL associated with the bookmark. Omit for folders.
307
+ */
308
+ url?: string;
309
+ /**
310
+ * The favicon to display next to titles for bookmarks. When no icon or a
311
+ * broken icon is provided, the default globe icon will be used instead. Omit
312
+ * for folders.
313
+ */
314
+ favIcon?: string;
315
+ /**
316
+ * The id of the parent folder for this bookmark. Omit for bookmarks under
317
+ * "All Bookmarks" and folders.
318
+ */
319
+ parentId?: string;
320
+ }
321
+ export type UpdatedBookmarkNodeAttrs = {
322
+ /**
323
+ * The new title to apply to the bookmark/folder.
324
+ */
325
+ title?: string;
326
+ /**
327
+ * The id of the parent folder to move this bookmark to. Leave undefined to
328
+ * move bookmark under "All Bookmarks". Omit for folders.
329
+ */
330
+ parentId?: string;
331
+ /**
332
+ * The favicon to display next to titles for bookmarks. When no icon or a
333
+ * broken icon is provided, the default globe icon will be used instead. Omit
334
+ * for folders.
335
+ */
336
+ favIcon?: string;
337
+ };
338
+ /**
339
+ * Request object to update a bookmark node.
340
+ */
341
+ export interface UpdateBookmarkNodeRequest {
342
+ /**
343
+ * The unique id of the bookmark.
344
+ */
345
+ id: string;
346
+ /**
347
+ * The object describing which attributes of the bookmark to update.
348
+ */
349
+ changes: UpdatedBookmarkNodeAttrs;
350
+ }
260
351
  export {};