@openfin/workspace-platform 19.3.3 → 19.3.5

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.
@@ -3,16 +3,16 @@ import { OpenFin } from '@openfin/core';
3
3
  import { BrowserSearchMenuKeyboardEvent } from '../../../../../../../common/src/utils/popup-window';
4
4
  import { SearchViewExpansionState, SecureIconState } from './AddressBar';
5
5
  type AddressBarInputProps = {
6
- addressSearchResultsView?: OpenFin.View;
7
- addressBarInputRef?: MutableRefObject<HTMLInputElement>;
8
- inputContainerRef?: MutableRefObject<HTMLDivElement>;
9
- addressBarWidth?: number;
6
+ addressSearchResultsView: OpenFin.View;
7
+ addressBarInputRef: MutableRefObject<HTMLInputElement>;
8
+ inputContainerRef: MutableRefObject<HTMLDivElement>;
9
+ addressBarWidth: number;
10
10
  isSecure: SecureIconState;
11
- setShouldExpandMenu?: Dispatch<SetStateAction<SearchViewExpansionState>>;
12
- shouldExpandMenu?: SearchViewExpansionState;
11
+ setShouldExpandMenu: Dispatch<SetStateAction<SearchViewExpansionState>>;
12
+ shouldExpandMenu: SearchViewExpansionState;
13
13
  setSearchText: Dispatch<SetStateAction<string>>;
14
14
  searchText: string;
15
- setKeyboardEvent: Dispatch<BrowserSearchMenuKeyboardEvent>;
15
+ sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => void;
16
16
  };
17
17
  export declare const AddressBarInput: React.FC<AddressBarInputProps>;
18
18
  export {};
@@ -11,6 +11,8 @@ import { SearchViewExpansionState } from '../../components/ControlBar/LeftContro
11
11
  * @param {AttachedPageInternal} activePage - Object representing the currently active page in the browser window.
12
12
  * @param {SearchViewExpansionState} shouldExpandMenu - Object with boolean indicating if the search results view should expand and the method of expansion.
13
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.
14
+ * @returns {{ sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => void }} - Object containing a function to send keyboard events to the search menu view.
15
15
  */
16
- export declare const usePostMessageToSearchMenuView: (selectedViews: OpenFin.Identity[], searchMenuChannel: BroadcastChannel, activePage: AttachedPageInternal, shouldExpandMenu: SearchViewExpansionState, searchText: string, keyboardEvent: BrowserSearchMenuKeyboardEvent) => void;
16
+ export declare const usePostMessageToSearchMenuView: (selectedViews: OpenFin.Identity[], searchMenuChannel: BroadcastChannel, activePage: AttachedPageInternal, shouldExpandMenu: SearchViewExpansionState, searchText: string) => {
17
+ sendKeyboardEventToSearchMenuView: (keyboardEvent: BrowserSearchMenuKeyboardEvent) => Promise<void>;
18
+ };
@@ -1,14 +1,32 @@
1
+ /// <reference types="lodash" />
1
2
  import { Dispatch, SetStateAction } from 'react';
2
3
  import { OpenFin } from '@openfin/core';
3
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>;
4
23
  /**
5
24
  * Custom hook that responds to updates to view expansion state updates, handles view focus events, and controls
6
25
  * focus on the address input.
7
26
  *
8
27
  * @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
28
  * @param {OpenFin.View} addressSearchResultsView - View object corresponding to the search results view.
11
29
  * @param {Dispatch<SetStateAction<number>>} setAddressBarWidth - Function that updates the width in pixels of the address input bar in its expanded state.
12
30
  * @param {Dispatch<SetStateAction<SearchViewExpansionState>>} setShouldExpandMenu - Function that updates whether the menu should expand and the method of expansion.
13
31
  */
14
- export declare const useUpdateViewExpansionState: (shouldExpandMenu: SearchViewExpansionState, addressBarInputRef: React.MutableRefObject<HTMLInputElement>, addressSearchResultsView: OpenFin.View, setAddressBarWidth: Dispatch<SetStateAction<number>>, setShouldExpandMenu: Dispatch<SetStateAction<SearchViewExpansionState>>) => void;
32
+ export declare const useUpdateViewExpansionState: (shouldExpandMenu: SearchViewExpansionState, addressSearchResultsView: OpenFin.View, setAddressBarWidth: Dispatch<SetStateAction<number>>, setShouldExpandMenu: Dispatch<SetStateAction<SearchViewExpansionState>>) => void;
@@ -89,6 +89,7 @@ export type AttachedPageInternal = {
89
89
  layoutContainerKey?: string;
90
90
  singleViewName?: string;
91
91
  attachedPageType?: 'singleView' | 'multiView' | undefined;
92
+ isLayoutCreated?: boolean;
92
93
  } & AttachedPage;
93
94
  export type ReparentAttachedPage = AttachedPage & {
94
95
  multiInstanceViewBehavior?: 'reparent';