@openfin/workspace-platform 23.0.9 → 23.0.12

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WARNING: Do not export from './notifications' here. Not unless we move '@here-io/notifications' here.
2
+ * WARNING: Do not export from './notifications' here. Not unless we move '@openfin/notifications' here.
3
3
  */
4
4
  export * from './common';
5
5
  export * from './home';
@@ -2,4 +2,9 @@ import { PageLayout } from '../../../../common/src/api/pages/shapes';
2
2
  export type EnterprisePageRequiredLayoutSettings = {
3
3
  newTabButtonUrl: string;
4
4
  };
5
+ /**
6
+ * Applies required layout settings for enterprise pages.
7
+ * Always sets the newTabButton URL to ensure pages from storage or other sources
8
+ * have the correct landing page URL.
9
+ */
5
10
  export declare const applyEnterprisePageRequiredLayoutSettings: (requiredSettings: EnterprisePageRequiredLayoutSettings, layout: PageLayout) => void;
@@ -223,6 +223,40 @@ export type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest & {
223
223
  callback: (data: GlobalContextMenuItemData, payload: OpenGlobalContextMenuPayload) => any;
224
224
  };
225
225
  export type ViewTabContextMenuTemplate = OpenFin.MenuItemTemplate<ViewTabMenuData>;
226
+ /**
227
+ * UI elements within a view tab that can be navigated to via keyboard.
228
+ */
229
+ export type ViewTabElements = 'inactive-tab' | 'active-tab' | 'inactive-tab-close-button' | 'active-tab-close-button' | 'add-tab-button';
230
+ /**
231
+ * Configuration options for view tab keyboard navigation behavior.
232
+ */
233
+ export interface ViewTabOptions {
234
+ /**
235
+ * Elements in the view tab that are able to be focused using
236
+ * arrow keys when an element in the view is selected.
237
+ * The order of the items in the array have no impact.
238
+ * Note: these are not mutually exclusive and can overlap.
239
+ * Default (when undefined): ["inactive-tab","active-tab","active-tab-close-button","inactive-tab-close-button","add-tab-button"]
240
+ */
241
+ arrowNavigation?: ViewTabElements[];
242
+ /**
243
+ * Elements in the view tab that are able to be focused using
244
+ * tab and shift+tab when an element in the view is selected.
245
+ * The order of the items in the array have no impact.
246
+ * Note: these are not mutually exclusive and can overlap.
247
+ * Default (when undefined): ["active-tab","add-tab-button"]
248
+ */
249
+ tabNavigation?: ViewTabElements[];
250
+ }
251
+ /**
252
+ * Configuration options for accessibility features in the Browser.
253
+ */
254
+ export interface AccessibilityOptions {
255
+ /**
256
+ * View tab keyboard navigation options.
257
+ */
258
+ viewTabOptions?: ViewTabOptions;
259
+ }
226
260
  /**
227
261
  * Request for opening a view tab context menu in Browser.
228
262
  */
@@ -630,6 +664,30 @@ export interface BrowserWorkspacePlatformWindowOptions {
630
664
  minWidth?: string;
631
665
  maxWidth?: string;
632
666
  };
667
+ /**
668
+ * Accessibility options for the browser window.
669
+ * These options override the default accessibility options set at the platform or browser initialization level.
670
+ *
671
+ * @example
672
+ * ```ts
673
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
674
+ *
675
+ * const platform = WorkspacePlatform.getCurrentSync();
676
+ * const browserWin = platform.Browser.createWindow({
677
+ * ...,
678
+ * workspacePlatform: {
679
+ * ...,
680
+ * accessibilityOptions: {
681
+ * viewTabOptions: {
682
+ * arrowNavigation: ["inactive-tab", "active-tab"],
683
+ * tabNavigation: ["active-tab"]
684
+ * }
685
+ * }
686
+ * }
687
+ * });
688
+ * ```
689
+ */
690
+ accessibilityOptions?: AccessibilityOptions;
633
691
  /**
634
692
  * Use when you want to display navigation buttons in Browser toolbar. Disabled by default.
635
693
  *
@@ -2268,6 +2326,28 @@ export interface BrowserInitConfig {
2268
2326
  * that are PNGs you will need to update these assets for best results.
2269
2327
  */
2270
2328
  browserIconSize?: IconSize;
2329
+ /**
2330
+ * Default accessibility options that will be applied to all browser windows.
2331
+ * These options can be overridden at the window creation level via workspacePlatform.accessibilityOptions.
2332
+ *
2333
+ * @example
2334
+ * ```ts
2335
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
2336
+ *
2337
+ * await WorkspacePlatform.init({
2338
+ * browser: {
2339
+ * title: "My Browser",
2340
+ * accessibilityOptions: {
2341
+ * viewTabOptions: {
2342
+ * arrowNavigation: ["inactive-tab", "active-tab"],
2343
+ * tabNavigation: ["active-tab"]
2344
+ * }
2345
+ * }
2346
+ * }
2347
+ * });
2348
+ * ```
2349
+ */
2350
+ accessibilityOptions?: AccessibilityOptions;
2271
2351
  /**
2272
2352
  * Override workspace platform behavior
2273
2353
  *
@@ -5,6 +5,8 @@ export type FindInPageChannelMessagePayload = {
5
5
  value: string;
6
6
  } | {
7
7
  type: 'focus-input';
8
+ } | {
9
+ type: 'hide-from-search-menu';
8
10
  } | {
9
11
  type: 'next-result';
10
12
  } | {
@@ -11,12 +11,22 @@ export type LayoutDOMEventType =
11
11
  * Fired when a tab is created in a container. (Emmitted by core)
12
12
  */
13
13
  | 'tab-created'
14
+ /**
15
+ * Fired when a new container/stack is created. (Emitted by Golden Layout)
16
+ */
17
+ | 'container-created'
14
18
  /**
15
19
  * Fired when the layout container is ready to be used. (Emitted by us)
16
20
  */
17
- | 'container-resized' | 'tab-closed';
21
+ | 'container-resized'
22
+ /**
23
+ * Fired when a view item container is resized (e.g., via separator drag). (Emitted by us)
24
+ */
25
+ | 'view-container-resized' | 'tab-closed';
18
26
  export type LayoutDOMEvent = {
19
27
  type: Extract<LayoutDOMEventType, 'container-resized'>;
28
+ } | {
29
+ type: Extract<LayoutDOMEventType, 'view-container-resized'>;
20
30
  } | {
21
31
  type: Extract<LayoutDOMEventType, 'tab-created' | 'tab-closed'>;
22
32
  detail: {
@@ -30,6 +40,14 @@ export type LayoutDOMEvent = {
30
40
  };
31
41
  isInitialized: boolean;
32
42
  target: HTMLElement;
43
+ } | {
44
+ type: Extract<LayoutDOMEventType, 'container-created'>;
45
+ detail?: {
46
+ containerSelector?: string;
47
+ [key: string]: any;
48
+ };
49
+ target?: HTMLElement;
50
+ originalElement?: HTMLElement;
33
51
  } | {
34
52
  type: Extract<LayoutDOMEventType, 'tabs-list-resized'>;
35
53
  };
@@ -85,6 +103,13 @@ export declare const isLayoutTabActive: (tabSelector: string) => boolean;
85
103
  export declare const containerId = "layout_container";
86
104
  export declare const viewTabslistSelectors = ".lm_tabs";
87
105
  export declare const addLayoutEventListener: (event: LayoutDOMEventType, listener: LayoutDOMEventListener) => void;
106
+ export declare const removeLayoutEventListener: (event: LayoutDOMEventType, listener: LayoutDOMEventListener) => void;
107
+ /**
108
+ * Cleans up ResizeObservers and event listeners for a specific layout.
109
+ * Should be called when a layout is destroyed to prevent memory leaks.
110
+ * @param layoutName The layoutName/layoutContainerKey to cleanup
111
+ */
112
+ export declare const cleanupLayoutObservers: (layoutName: string) => void;
88
113
  /**
89
114
  * Initialize the layout for the current OF window.
90
115
  */
@@ -34,7 +34,7 @@ declare enum BrowserRoute {
34
34
  ZoomControlsDialog = "/zoom-controls-dialog/",
35
35
  DesktopSignalsModal = "/popup-menu/desktop-signals-modal/",
36
36
  IntentsResolverModal = "/popup-menu/intents-resolver-modal/",
37
- FindInPageModal = "/find-in-page-modal/"
37
+ FindInPageModal = "/popup-menu/find-in-page-modal/"
38
38
  }
39
39
  declare const PageRoute: {
40
40
  Browser: BrowserRoute.Browser;
@@ -0,0 +1,11 @@
1
+ import type { CompanionDockConfig } from '../shapes/enterprise';
2
+ import type { DockAllowedWindowOptions } from '../shapes/shapes';
3
+ export declare const getSnapZone: (config: CompanionDockConfig | unknown, options?: DockAllowedWindowOptions) => {
4
+ enabled: boolean;
5
+ threshold?: number;
6
+ locationPreference?: Array<"top" | "bottom">;
7
+ } | {
8
+ enabled: boolean;
9
+ threshold: number;
10
+ locationPreference: readonly ["top", "bottom"];
11
+ };
@@ -83,4 +83,8 @@ export type DockAllowedWindowOptions = Partial<Pick<OpenFin.PlatformWindowOption
83
83
  locationPreference?: Array<'top' | 'bottom'>;
84
84
  };
85
85
  };
86
+ contextMenuOptions?: {
87
+ enabled?: boolean;
88
+ template?: Array<'snapToTop' | 'snapToBottom' | 'inspect'>;
89
+ };
86
90
  };