@openfin/workspace 19.3.0 → 19.3.2

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 (67) 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/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/PanelContainer.d.ts +8 -0
  21. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/getDimensions.d.ts +14 -0
  22. package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/useAdjustSearchMenuViewDimensions.d.ts +29 -0
  23. package/browser/src/hooks/EnterpriseSearchMenu/useInitChannelToSearchMenuView.d.ts +17 -0
  24. package/browser/src/hooks/EnterpriseSearchMenu/usePostMessageToSearchMenuView.d.ts +16 -0
  25. package/browser/src/hooks/EnterpriseSearchMenu/useProcessChildContentBlockEvent.d.ts +3 -0
  26. package/browser/src/hooks/EnterpriseSearchMenu/useSearchMenuViewLifecycleManager.d.ts +16 -0
  27. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateInputExpansionState.d.ts +15 -0
  28. package/browser/src/hooks/EnterpriseSearchMenu/useUpdateViewExpansionState.d.ts +14 -0
  29. package/browser/src/hooks/useEnterpriseHotkeys.d.ts +4 -0
  30. package/browser/src/hooks/usePanelBounds.d.ts +3 -0
  31. package/browser/src/slices/menu.d.ts +28 -0
  32. package/browser/src/slices/modal/close.d.ts +10 -0
  33. package/browser/src/slices/modal/index.d.ts +8 -0
  34. package/browser/src/slices/pages/attached.d.ts +83 -0
  35. package/browser/src/slices/tab-focus.d.ts +85 -0
  36. package/browser/src/store/index.d.ts +90 -0
  37. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  38. package/client-api-platform/src/init/override-callback/enterprise-page-required-layout-settings.d.ts +5 -0
  39. package/client-api-platform/src/shapes.d.ts +8 -0
  40. package/common/src/api/pages/internal.d.ts +8 -0
  41. package/common/src/api/workspace-events.d.ts +49 -0
  42. package/common/src/components/Icon/CustomIcon.d.ts +15 -0
  43. package/common/src/hooks/context.d.ts +50 -0
  44. package/common/src/hooks/usePlatformTheme.d.ts +6 -0
  45. package/common/src/hooks/useSystemSchemeCheck.d.ts +13 -0
  46. package/common/src/slices/environment.d.ts +22 -0
  47. package/common/src/slices/target-theming.d.ts +56 -0
  48. package/common/src/styles/svg-icons.d.ts +7 -0
  49. package/common/src/utils/a11y/index.d.ts +3 -0
  50. package/common/src/utils/custom-logo.d.ts +16 -0
  51. package/common/src/utils/enterpriseBrowser.d.ts +1 -0
  52. package/common/src/utils/interop.d.ts +30 -0
  53. package/common/src/utils/layout.d.ts +6 -0
  54. package/common/src/utils/navigate.d.ts +8 -0
  55. package/common/src/utils/popup-window.d.ts +19 -9
  56. package/common/src/utils/route.d.ts +1 -1
  57. package/common/src/utils/test-ids.d.ts +70 -0
  58. package/common/src/utils/url.d.ts +1 -0
  59. package/home.js +1 -1
  60. package/home.js.map +1 -1
  61. package/index.js +1 -1
  62. package/index.js.map +1 -1
  63. package/notifications.js +4 -4
  64. package/notifications.js.map +1 -1
  65. package/package.json +3 -3
  66. package/store.js +1 -1
  67. package/store.js.map +1 -1
@@ -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>;
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
7
7
  * @param opts launch options.
8
8
  */
9
9
  export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
10
- export declare const enterpriseAppDirectoryChannelClient: () => Promise<import("../../../common/src/utils/channels").withDisconnectListener<OpenFin.ChannelClient>>;
10
+ export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
11
11
  export declare function getResults(payload: {
12
12
  req: SearchSitesRequest;
13
13
  } & {
@@ -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;
@@ -1291,6 +1291,10 @@ export interface BrowserWindowFactory {
1291
1291
  * ```
1292
1292
  *
1293
1293
  * @param options the browser window creation options
1294
+ * @remarks
1295
+ * **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.
1296
+ *
1297
+ * **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
1298
  */
1295
1299
  createWindow(options: BrowserCreateWindowRequest): Promise<BrowserWindowModule>;
1296
1300
  /**
@@ -1611,6 +1615,10 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1611
1615
  * }
1612
1616
  * });
1613
1617
  * ```
1618
+ * @remarks
1619
+ * **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.
1620
+ *
1621
+ * **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
1622
  */
1615
1623
  createView(viewOptions: Partial<OpenFin.ViewOptions> | BrowserCreateViewRequest, target?: OpenFin.CreateViewTarget, targetView?: OpenFin.Identity): Promise<OpenFin.View>;
1616
1624
  /**
@@ -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>;
@@ -0,0 +1,49 @@
1
+ import { NavigatePayload } from '../../../common/src/utils/navigate';
2
+ import { ProviderConnectionPayload, ProviderDisconnectionPayload, ProviderUpdatePayload } from './provider';
3
+ /**
4
+ * All Workspace related events that can be emitted or listened to
5
+ * by the Workspace Provider or any of the workspace components
6
+ */
7
+ type EventTypeTypes = {
8
+ /**
9
+ * Emitted when a search is invoked.
10
+ */
11
+ 'search-invoked': [string];
12
+ /**
13
+ * Emitted when a new provider is connected.
14
+ *
15
+ * For example, when a Dock Provider is successfully registered by the platform provider
16
+ */
17
+ 'provider-connected': [ProviderConnectionPayload];
18
+ /**
19
+ * Emitted when a provider is disconnected.
20
+ *
21
+ * For example, when a Dock Provider is deregistered by the platform provider
22
+ */
23
+ 'provider-disconnected': [ProviderDisconnectionPayload];
24
+ /**
25
+ * Emitted when a provider is updated.
26
+ *
27
+ * For example, when a Dock Provider is updated by the platform provider
28
+ */
29
+ 'provider-updated': [ProviderUpdatePayload];
30
+ /**
31
+ * Emmitted when notifications is created or destroyed.
32
+ */
33
+ 'update-notification-running-status': [];
34
+ /**
35
+ * Emitted when the list of search providers has been updated.
36
+ */
37
+ 'search-provider-list-updated': [];
38
+ /**
39
+ * Emmitted when a component is created or destroyed.
40
+ */
41
+ 'component-lifecycle-update': [];
42
+ /**
43
+ * Emitted when component should be navigated to.
44
+ * Contains the target provider ID and the component name.
45
+ */
46
+ 'component-navigation': [NavigatePayload];
47
+ };
48
+ export declare const addListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, removeListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, emit: <EventKey extends keyof EventTypeTypes>(event: EventKey, ...payload: EventTypeTypes[EventKey]) => Promise<void>;
49
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { IconSizeType } from '@openfin/ui-library';
3
+ /**
4
+ * Simple and reusable icon component. The required prop is an iconURL.
5
+ */
6
+ interface CustomIconProps {
7
+ iconURL?: string;
8
+ testId?: string;
9
+ size?: IconSizeType;
10
+ description?: string;
11
+ backgroundColor?: string;
12
+ applyThemeColor?: boolean;
13
+ }
14
+ export declare const CustomIcon: React.FC<CustomIconProps>;
15
+ export {};
@@ -0,0 +1,50 @@
1
+ /// <reference types="react" />
2
+ import { ProviderInfoInternal, ProviderType } from '../../../common/src/api/provider';
3
+ export type ProviderContext<T extends ProviderType = any> = {
4
+ /**
5
+ * The currently active provider.
6
+ */
7
+ activeProvider: ProviderInfoInternal<T> | undefined;
8
+ /**
9
+ * Sets the active provider.
10
+ * @param provider The provider to set as active.
11
+ */
12
+ setActiveProvider: (provider: ProviderInfoInternal<T>) => void;
13
+ /**
14
+ * All providers currently available.
15
+ */
16
+ providers: ProviderInfoInternal<T>[];
17
+ /**
18
+ * Updates a provider.
19
+ * Dispatches a channel action back to the Workspace Provider.
20
+ *
21
+ * @param updatedProvider The updated provider.
22
+ * @returns A promise that resolves when the provider has been updated.
23
+ */
24
+ updateProvider: (updatedProvider: ProviderInfoInternal<T>) => Promise<void>;
25
+ };
26
+ /**
27
+ * A hook that returns data related to the active provider, and all providers
28
+ *
29
+ * A generic **must** be provided to specify the type of provider to return
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const { activeProvider, setActiveProvider, providers } = usePlatformProviders<'dock'>();
34
+ * ```
35
+ */
36
+ export declare const usePlatformProviders: <T extends ProviderType = never>() => T extends never ? never : ProviderContext<T>;
37
+ export declare const ProviderContext: <T extends ProviderType>({ children, providerType }: {
38
+ children?: React.ReactNode;
39
+ providerType: T;
40
+ }) => JSX.Element;
41
+ export declare const BrowserTypeContext: import("react").Context<{
42
+ isEnterprise?: boolean | null;
43
+ }>;
44
+ export declare const BrowserLayoutDragContext: import("react").Context<{
45
+ isAcceptingLayoutDrag: boolean;
46
+ setIsAcceptingLayoutDrag: (value: boolean) => void;
47
+ }>;
48
+ export declare const BrowserContext: ({ children }: {
49
+ children?: React.ReactNode;
50
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type OpenFin from '@openfin/core';
2
+ /**
3
+ * Set the current theme based on the platform identity provided.
4
+ * @param identity the platform identity.
5
+ */
6
+ export declare const usePlatformTheme: (identity?: OpenFin.Identity) => void;
@@ -0,0 +1,13 @@
1
+ import { ColorSchemeType } from '@openfin/ui-library';
2
+ /**
3
+ * Custom hook that checks the system color scheme and provides information about the current scheme.
4
+ *
5
+ * @returns An object containing the current color scheme, system color scheme, and a boolean indicating if the scheme is dark.
6
+ */
7
+ interface SystemSchemeCheck {
8
+ currentScheme: Omit<ColorSchemeType, 'system'>;
9
+ systemScheme: Omit<ColorSchemeType, 'system'>;
10
+ isSchemeDark: boolean;
11
+ }
12
+ declare function useSystemSchemeCheck(): SystemSchemeCheck;
13
+ export default useSystemSchemeCheck;
@@ -0,0 +1,22 @@
1
+ export interface EnvironmentRootState {
2
+ environment: {
3
+ isWindows: boolean;
4
+ };
5
+ }
6
+ export declare const getEnvironment: import("@reduxjs/toolkit").AsyncThunk<boolean, void, {}>;
7
+ export declare const environmentSlice: import("@reduxjs/toolkit").Slice<{
8
+ isWindows: boolean;
9
+ }, {
10
+ setEnvironment: (state: import("immer/dist/internal").WritableDraft<{
11
+ isWindows: boolean;
12
+ }>, action: {
13
+ payload: any;
14
+ type: string;
15
+ }) => void;
16
+ }, "environment">;
17
+ export declare const setEnvironment: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
18
+ export declare const selectIsWindows: (state: EnvironmentRootState) => boolean;
19
+ declare const _default: import("redux").Reducer<{
20
+ isWindows: boolean;
21
+ }>;
22
+ export default _default;
@@ -0,0 +1,56 @@
1
+ import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
2
+ import type { ComputedTheme } from '../api/theming';
3
+ export interface TargetThemingRootState {
4
+ targetTheming: {
5
+ isFetchingTheme: boolean;
6
+ currentTheme: ComputedTheme | undefined;
7
+ hasTriedFetch: boolean;
8
+ currentScheme: ColorSchemeOptionType | undefined;
9
+ };
10
+ }
11
+ export declare const targetThemingSlice: import("@reduxjs/toolkit").Slice<{
12
+ isFetchingTheme: boolean;
13
+ currentTheme: ComputedTheme | undefined;
14
+ hasTriedFetch: boolean;
15
+ currentScheme: ColorSchemeOptionType | undefined;
16
+ }, {
17
+ setTheme: (state: import("immer/dist/internal").WritableDraft<{
18
+ isFetchingTheme: boolean;
19
+ currentTheme: ComputedTheme | undefined;
20
+ hasTriedFetch: boolean;
21
+ currentScheme: ColorSchemeOptionType | undefined;
22
+ }>, action: {
23
+ payload: any;
24
+ type: string;
25
+ }) => void;
26
+ setIsFetchingTheme: (state: import("immer/dist/internal").WritableDraft<{
27
+ isFetchingTheme: boolean;
28
+ currentTheme: ComputedTheme | undefined;
29
+ hasTriedFetch: boolean;
30
+ currentScheme: ColorSchemeOptionType | undefined;
31
+ }>, action: {
32
+ payload: any;
33
+ type: string;
34
+ }) => void;
35
+ setCurrentScheme: (state: import("immer/dist/internal").WritableDraft<{
36
+ isFetchingTheme: boolean;
37
+ currentTheme: ComputedTheme | undefined;
38
+ hasTriedFetch: boolean;
39
+ currentScheme: ColorSchemeOptionType | undefined;
40
+ }>, action: {
41
+ payload: any;
42
+ type: string;
43
+ }) => void;
44
+ }, "targetTheming">;
45
+ export declare const setTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setIsFetchingTheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setCurrentScheme: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
46
+ export declare const selectTargetTheming: (state: TargetThemingRootState) => ComputedTheme;
47
+ export declare const selectCurrentScheme: (state: TargetThemingRootState) => ColorSchemeOptionType;
48
+ export declare const selectHasTriedFetch: (state: TargetThemingRootState) => boolean;
49
+ export declare const selectIsFetchingTheme: (state: TargetThemingRootState) => boolean;
50
+ declare const _default: import("redux").Reducer<{
51
+ isFetchingTheme: boolean;
52
+ currentTheme: ComputedTheme;
53
+ hasTriedFetch: boolean;
54
+ currentScheme: ColorSchemeOptionType;
55
+ }>;
56
+ export default _default;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledIcon: import("styled-components").StyledComponent<({ tabIndex, icon, children, size, containerSize, "data-testid": dataTestId, ...props }: import("@openfin/ui-library").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {
3
+ disabled?: boolean;
4
+ isEnterprise?: boolean;
5
+ windowFocused?: boolean;
6
+ }, never>;
7
+ export declare const ThemedSVG: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,3 @@
1
+ export type HTMLElementWithAria = HTMLElement & {
2
+ ariaLabel: string | null;
3
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Custom React hook to check the accessibility of a custom logo image.
3
+ * This hook initiates an image load and returns a boolean value indicating
4
+ * whether the image is accessible or not.
5
+ *
6
+ * @param customLogoUrl The URL of the custom logo to check. If undefined, the hook immediately returns false.
7
+ * @returns A state value that is true if the custom logo is accessible and has loaded successfully, and false otherwise.
8
+ * @example
9
+ * ```jsx
10
+ * function Component() {
11
+ * const logoAccessible = useCustomLogoAccessible('http://example.com/logo.png');
12
+ * return logoAccessible ? <img src='http://example.com/logo.png' /> : <DefaultLogo />;
13
+ * }
14
+ * ```
15
+ */
16
+ export declare const useCustomLogoAccessible: (customLogoUrl: string | undefined) => boolean;
@@ -6,3 +6,4 @@ export declare function formatUrl(url: string): string;
6
6
  export declare const getIsEnterpriseBrowser: (id?: OpenFin.Identity) => Promise<boolean>;
7
7
  export declare const getMenuWindowWidth: () => Promise<number>;
8
8
  export declare const isLandingPage: (url: string) => boolean;
9
+ export declare const isLandingPageOrEmpty: (url: string) => boolean;
@@ -0,0 +1,30 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export declare enum InteropEventType {
3
+ JoinedContextGroup = "joined-context-group",
4
+ RemovedFromContextGroup = "removed-from-context-group"
5
+ }
6
+ type InteropEventPayload<E extends InteropEventType> = {
7
+ [InteropEventType.JoinedContextGroup]: {
8
+ viewIdentity: OpenFin.Identity;
9
+ contextGroupId: string;
10
+ };
11
+ [InteropEventType.RemovedFromContextGroup]: {
12
+ viewIdentity: OpenFin.Identity;
13
+ };
14
+ }[E];
15
+ export type InteropListener<EventType extends InteropEventType> = (payload: InteropEventPayload<EventType>) => void;
16
+ /**
17
+ * Returns contextGroup data.
18
+ * @returns Promise<ContextGroup[]>
19
+ */
20
+ export declare function getContextGroups(): Promise<OpenFin.ContextGroupInfo[]>;
21
+ export declare const joinContextGroup: (viewIdentity: OpenFin.Identity, contextGroupId: string) => Promise<void>;
22
+ export declare const removeFromGroup: (viewIdentity: OpenFin.Identity) => Promise<void>;
23
+ export declare function getViewContextGroupId(viewIdentity: OpenFin.Identity): Promise<string | null | undefined>;
24
+ /**
25
+ * Listen for interop events.
26
+ * @param event the interop event to listen for.
27
+ * @param listener the function to call when the event occurs.
28
+ */
29
+ export declare const addInteropListener: <Event_1 extends InteropEventType>(event: Event_1, listener: InteropListener<Event_1>) => Promise<void>;
30
+ export {};
@@ -65,6 +65,12 @@ export declare const cloneViewComponentWithoutName: (componentState: any) => any
65
65
  * @returns A copy of the layout with names removed
66
66
  */
67
67
  export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
68
+ /**
69
+ * Deep clones a layout and removes generated view names.
70
+ * @param layout The Layout to be cloned
71
+ * @returns A copy of the layout with generated names removed
72
+ */
73
+ export declare const cloneLayoutAndRemoveGeneratedNames: (layout: PageLayout) => any;
68
74
  export declare const mapContentComponentState: (content: OpenFin.LayoutContent) => OpenFin.LayoutComponent['componentState'][];
69
75
  export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
70
76
  export declare const layoutNameInitializedMap: Map<string, boolean>;
@@ -0,0 +1,8 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import { ComponentName } from '../../../common/src/utils/usage-register';
3
+ export interface NavigatePayload {
4
+ componentName: ComponentName;
5
+ platformIdentity: OpenFin.Identity;
6
+ providerId?: string;
7
+ }
8
+ export declare const navigateTo: (componentName: ComponentName, platformIdentity: OpenFin.Identity, providerId?: string) => Promise<void>;