@openfin/workspace 13.0.7 → 13.1.0

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 (69) hide show
  1. package/client-api/src/index.d.ts +5 -0
  2. package/client-api/src/integrations/microsoft.d.ts +155 -0
  3. package/client-api/src/integrations/microsoft.shapes.d.ts +208 -0
  4. package/client-api/src/integrations/microsoft.utils.d.ts +80 -0
  5. package/client-api/src/integrations.d.ts +3 -0
  6. package/client-api/src/internal.d.ts +2 -2
  7. package/client-api/src/shapes/home.d.ts +71 -3
  8. package/client-api/src/shapes/integrations.d.ts +36 -0
  9. package/client-api-platform/src/api/context-menu/utils.d.ts +4 -0
  10. package/client-api-platform/src/api/dock/idb.d.ts +0 -1
  11. package/client-api-platform/src/shapes.d.ts +46 -9
  12. package/common/src/api/pages/shapes.d.ts +2 -0
  13. package/common/src/api/protocol/shapes/workspace.d.ts +157 -0
  14. package/common/src/api/protocol/workspace.d.ts +12 -58
  15. package/common/src/api/provider.d.ts +5 -1
  16. package/common/src/api/search.d.ts +1 -3
  17. package/common/src/api/storefront.d.ts +11 -0
  18. package/common/src/api/theming.d.ts +6 -0
  19. package/common/src/utils/a11y/search.a11y.d.ts +1 -0
  20. package/common/src/utils/global-context-menu.d.ts +3 -1
  21. package/common/src/utils/lru-cache.d.ts +11 -0
  22. package/common/src/utils/menu-window-provider.d.ts +14 -16
  23. package/common/src/utils/route.d.ts +22 -34
  24. package/common/src/utils/router/base.d.ts +2 -2
  25. package/common/src/utils/shared-emitter.d.ts +7 -6
  26. package/common/src/utils/types.d.ts +7 -0
  27. package/common/src/utils/usage-register.d.ts +3 -1
  28. package/common/src/utils/window.d.ts +27 -14
  29. package/home.js +58 -61
  30. package/home.js.map +1 -1
  31. package/index.js +127 -130
  32. package/index.js.LICENSE.txt +2 -0
  33. package/index.js.map +1 -1
  34. package/notifications.js +57 -60
  35. package/notifications.js.map +1 -1
  36. package/package.json +6 -3
  37. package/search-api/src/client/index.d.ts +2 -2
  38. package/search-api/src/client/internal.d.ts +6 -6
  39. package/search-api/src/client/remote/channel-client-factory.d.ts +1 -2
  40. package/search-api/src/client/remote/channel-client.d.ts +4 -8
  41. package/search-api/src/client/remote/data.d.ts +3 -4
  42. package/search-api/src/client/remote/disconnect.d.ts +1 -4
  43. package/search-api/src/client/remote/dispatch.d.ts +2 -3
  44. package/search-api/src/client/remote/requests.d.ts +1 -4
  45. package/search-api/src/client/remote/search-close.d.ts +2 -5
  46. package/search-api/src/common.d.ts +19 -29
  47. package/search-api/src/fin/index.d.ts +2 -2
  48. package/search-api/src/fin/shapes.d.ts +4 -4
  49. package/search-api/src/index.d.ts +1 -1
  50. package/search-api/src/internal-shapes.d.ts +0 -19
  51. package/search-api/src/provider/index.d.ts +2 -3
  52. package/search-api/src/provider/internal.d.ts +5 -9
  53. package/search-api/src/provider/remote/channel-factory.d.ts +1 -2
  54. package/search-api/src/provider/remote/channel.d.ts +4 -11
  55. package/search-api/src/provider/remote/connection.d.ts +5 -8
  56. package/search-api/src/provider/remote/data.d.ts +3 -5
  57. package/search-api/src/provider/remote/deregistration.d.ts +1 -2
  58. package/search-api/src/provider/remote/disconnect.d.ts +1 -1
  59. package/search-api/src/provider/remote/disconnection.d.ts +5 -4
  60. package/search-api/src/provider/remote/dispatch.d.ts +2 -3
  61. package/search-api/src/provider/remote/info.d.ts +1 -1
  62. package/search-api/src/provider/remote/registration.d.ts +6 -8
  63. package/search-api/src/provider/remote/search-close.d.ts +3 -4
  64. package/search-api/src/provider/remote/search.d.ts +3 -4
  65. package/search-api/src/shapes.d.ts +6 -45
  66. package/store.js +57 -60
  67. package/store.js.map +1 -1
  68. package/common/src/api/home.d.ts +0 -19
  69. package/common/src/api/pages/legacy.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- import type { AssetRoute, PageRoute } from '../route';
1
+ import type { PageRoute } from '../route';
2
2
  /**
3
3
  * Multiple different Next projects can be merged together into one using zones.
4
4
  * This is the path prefix to a single one of those deployed projects.
@@ -21,7 +21,7 @@ export declare function getBasePathWithoutZone(): string;
21
21
  * Get the router path to assets like images, json, svg, etc.
22
22
  * @returns the path to the
23
23
  */
24
- export declare function getAssetPath(route: AssetRoute | string): string;
24
+ export declare function getAssetPath(route: string): string;
25
25
  /**
26
26
  * Gets the route without the zone prefix.
27
27
  * @param route the route to remove the zone prefix from.
@@ -1,10 +1,11 @@
1
- export declare type Listener = (...args: any[]) => void;
2
1
  /**
3
2
  * Creates an event emitter that is shared between all windows within the same domain.
4
3
  */
5
- export default function makeSharedEmitter<E extends string | number, L extends Listener>(id: string): {
6
- emit: (event: E, ...payload: any[]) => Promise<void>;
7
- addListener: (event: E, listener: L) => void;
8
- removeListener: (event: E, listener: L) => void;
9
- once: (event: E, listener: L) => void;
4
+ export default function makeSharedEmitter<EventMap extends {
5
+ [key: string | number]: any[];
6
+ }>(id: string): {
7
+ emit: <EventKey extends keyof EventMap>(event: EventKey, ...payload: EventMap[EventKey]) => Promise<void>;
8
+ addListener: <EventKey_1 extends keyof EventMap>(event: EventKey_1, listener: (...payload: EventMap[EventKey_1]) => void) => void;
9
+ removeListener: <EventKey_2 extends keyof EventMap>(event: EventKey_2, listener: (...payload: EventMap[EventKey_2]) => void) => void;
10
+ once: <EventKey_3 extends keyof EventMap>(event: EventKey_3, listener: (...payload: EventMap[EventKey_3]) => void) => void;
10
11
  };
@@ -4,6 +4,13 @@ export declare type StringMap<T> = {
4
4
  };
5
5
  export declare type Await<T> = T extends PromiseLike<infer U> ? U : T;
6
6
  export declare type ValueOf<T> = T[keyof T];
7
+ export declare type DeepPartial<T> = T extends object ? {
8
+ [P in keyof T]?: DeepPartial<T[P]>;
9
+ } : T;
10
+ /**
11
+ A union type that represents a value that can be directly awaited or a promise that will eventually resolve to a value of type T.
12
+ */
13
+ export declare type Awaitable<T> = Awaited<T> | Promise<Awaited<T>>;
7
14
  /**
8
15
  * This is a helper type that takes a type T and returns a type that is the same as T, but with all
9
16
  * properties that are functions removed.
@@ -13,7 +13,8 @@ export declare enum ComponentName {
13
13
  Notification = "Notification",
14
14
  Storefront = "Storefront",
15
15
  Platform = "Platform",
16
- Theming = "Theming"
16
+ Theming = "Theming",
17
+ Microflow = "Microflow"
17
18
  }
18
19
  export declare const registerBrowserUsage: (status: RegisterUsageStatus) => void;
19
20
  export declare const registerHomeUsage: (status: RegisterUsageStatus) => void;
@@ -22,6 +23,7 @@ export declare const registerDockUsage: (status: RegisterUsageStatus) => void;
22
23
  export declare const registerNotificationUsage: (status: RegisterUsageStatus) => void;
23
24
  export declare const registerPlatformUsage: (status: RegisterUsageStatus) => void;
24
25
  export declare const registerThemingUsage: (status: RegisterUsageStatus) => void;
26
+ export declare const registerMicroflowUsage: (microflowName: string, status: RegisterUsageStatus) => void;
25
27
  export declare enum AnalyticsSource {
26
28
  Browser = "Browser",
27
29
  Dock = "Dock",
@@ -56,22 +56,35 @@ export declare const getBoundsFromCenter: (center: Point, size: Size) => OpenFin
56
56
  * @returns the wrapped OpenFin window identity.
57
57
  */
58
58
  export declare function getOFWindow(identity: WindowIdentity): OpenFin.Window;
59
- /**
60
- * The OpenFin identity for the current window.
61
- */
59
+ /** The OpenFin identity for the current window. */
62
60
  export declare const currentOFIdentity: WindowIdentity;
63
- /**
64
- * Get the current OpenFin window.
65
- */
61
+ /** Get the current OpenFin window. */
66
62
  export declare function getCurrentOFWindow(): OpenFin.Window;
67
- /**
68
- * The OpenFin identity for Home.
69
- */
70
- export declare const homeOFIdentity: WindowIdentity;
71
- export declare const dockOFIdentity: WindowIdentity;
72
- export declare const notificationCenterOFIdentity: WindowIdentity;
73
- export declare const storefrontOFIdentity: WindowIdentity;
74
- export declare const providerOFIdentity: WindowIdentity;
63
+ /** The OpenFin identity for the Home window. */
64
+ export declare const homeOFIdentity: {
65
+ readonly name: WindowName.Home;
66
+ readonly uuid: ApplicationUUID.Workspace;
67
+ };
68
+ /** The OpenFin identity for the Dock window. */
69
+ export declare const dockOFIdentity: {
70
+ readonly name: WindowName.Dock;
71
+ readonly uuid: ApplicationUUID.Workspace;
72
+ };
73
+ /** The OpenFin identity for the Notification Center window. */
74
+ export declare const notificationCenterOFIdentity: {
75
+ readonly name: "Notification-Center";
76
+ readonly uuid: "notifications-service";
77
+ };
78
+ /** The OpenFin identity for the Storefront window. */
79
+ export declare const storefrontOFIdentity: {
80
+ readonly name: WindowName.Storefront;
81
+ readonly uuid: ApplicationUUID.Workspace;
82
+ };
83
+ /** The OpenFin identity for the Provider window. */
84
+ export declare const providerOFIdentity: {
85
+ readonly name: ApplicationUUID.Workspace;
86
+ readonly uuid: ApplicationUUID.Workspace;
87
+ };
75
88
  /**
76
89
  * Get the Home OpenFin window.
77
90
  */