@openfin/workspace-platform 45.4.2 → 45.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.
@@ -7,7 +7,7 @@ import type { ContentSortRequest, LaunchAppRequest, SearchSitesRequest, SearchSi
7
7
  * @param app the app directory entry.
8
8
  * @param opts launch options.
9
9
  */
10
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Platform | OpenFin.View | OpenFin.Application>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.View | OpenFin.Platform | OpenFin.Application>;
11
11
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare function getResults(payload: {
13
13
  req: SearchSitesRequest;
@@ -0,0 +1,30 @@
1
+ import { KeyboardCommand } from '../../../../common/src/utils/keyboard-commands';
2
+ /**
3
+ * Maps a menu item's `data.type` to the keyboard command that performs the same action, or to a fixed
4
+ * `{ keys }` binding for shortcuts handled outside `getKeyboardCommands` (e.g. quit).
5
+ */
6
+ type MenuShortcutCommands = Partial<Record<string, KeyboardCommand | {
7
+ keys: string;
8
+ }>>;
9
+ export declare const ENTERPRISE_GLOBAL_MENU_SHORTCUTS: MenuShortcutCommands;
10
+ export declare const ENTERPRISE_PAGE_TAB_MENU_SHORTCUTS: MenuShortcutCommands;
11
+ /**
12
+ * View tab New Tab / Close Tab act on the inner view, while Cmd/Ctrl+T and Cmd/Ctrl+W act on the whole
13
+ * page, so they are not labelled.
14
+ */
15
+ export declare const ENTERPRISE_VIEW_TAB_MENU_SHORTCUTS: MenuShortcutCommands;
16
+ type ShortcutMenuItem = {
17
+ data?: {
18
+ type?: string;
19
+ } | null;
20
+ submenu?: ShortcutMenuItem[];
21
+ shortcut?: string;
22
+ };
23
+ /**
24
+ * Returns a copy of `template` with each item that has a registered hotkey labelled with it (as the
25
+ * `shortcut` the Enterprise popup menu renders), formatted for the current OS.
26
+ */
27
+ export declare const addKeyboardShortcuts: <T extends ShortcutMenuItem>(template: T[], shortcutCommands: MenuShortcutCommands) => Promise<(T & {
28
+ shortcut?: string;
29
+ })[]>;
30
+ export {};
@@ -2,3 +2,9 @@ import type OpenFin from '@openfin/core';
2
2
  import { KEYBOARD_COMMANDS } from '../../../../common/src/utils/keyboard-commands';
3
3
  export { KEYBOARD_COMMANDS };
4
4
  export declare const getKeyboardCommands: (superGetKeyboardCommands: () => OpenFin.ShortcutOverride[]) => OpenFin.ShortcutOverride[];
5
+ /**
6
+ * The first key binding registered for `command`, or `undefined` if it has none (never registered, or
7
+ * disabled via empty `keys`). Commands with several bindings list their primary one first, e.g. reload's
8
+ * `CommandOrControl+R` before `F5`.
9
+ */
10
+ export declare const getRegisteredShortcutKeys: (command: string) => string | undefined;
@@ -40,3 +40,8 @@ export declare const isReservedKeyboardCommand: (command: string) => boolean;
40
40
  /** Tabs 1–8 have their own command; the ninth shortcut maps to {@link KEYBOARD_COMMANDS.LAST_TAB}. */
41
41
  export declare const NUMBERED_TAB_COUNT = 8;
42
42
  export declare const getSelectTabCommand: (tabNumber: number) => string;
43
+ /**
44
+ * Formats an Electron-style accelerator (as registered in `getKeyboardCommands`) for display in a menu,
45
+ * e.g. `Shift+CommandOrControl+S` → `⇧⌘S` on Mac and `Ctrl+Shift+S` on Windows.
46
+ */
47
+ export declare const formatKeyboardShortcut: (keys: string, isWindows: boolean) => string;
@@ -46,18 +46,18 @@
46
46
  }
47
47
  ],
48
48
  "dexie": [
49
- {
50
- "type": "explicit",
51
- "version": "^4.0.11",
52
- "packageName": "common/package.json",
53
- "issuer": "common/src/api/pages/idb.ts"
54
- },
55
49
  {
56
50
  "type": "root-implicit",
57
51
  "version": "^4.0.11",
58
52
  "packageName": "dock3/package.json",
59
53
  "issuer": "dock3/src/api/idb.ts"
60
54
  },
55
+ {
56
+ "type": "explicit",
57
+ "version": "^4.0.11",
58
+ "packageName": "common/package.json",
59
+ "issuer": "common/src/api/pages/idb.ts"
60
+ },
61
61
  {
62
62
  "type": "explicit",
63
63
  "version": "^4.0.11",