@openfin/workspace 13.1.5 → 14.0.14

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 (71) hide show
  1. package/README.md +14 -14
  2. package/client-api/src/dock.d.ts +46 -10
  3. package/client-api/src/home.d.ts +76 -5
  4. package/client-api/src/home.test.d.ts +1 -1
  5. package/client-api/src/index.d.ts +10 -10
  6. package/client-api/src/integrations/microsoft.shapes.d.ts +9 -9
  7. package/client-api/src/internal/home/handlers/data.d.ts +3 -0
  8. package/client-api/src/internal/home/handlers/data.test.d.ts +1 -0
  9. package/client-api/src/internal/home/handlers/disconnect.d.ts +1 -0
  10. package/client-api/src/internal/home/handlers/disconnect.test.d.ts +1 -0
  11. package/client-api/src/internal/home/handlers/index.d.ts +6 -0
  12. package/client-api/src/internal/home/handlers/index.test.d.ts +1 -0
  13. package/client-api/src/internal/home/handlers/result-dispatch.d.ts +3 -0
  14. package/client-api/src/internal/home/handlers/result-dispatch.test.d.ts +1 -0
  15. package/client-api/src/internal/home/handlers/search-close.d.ts +5 -0
  16. package/client-api/src/internal/home/handlers/search-close.test.d.ts +1 -0
  17. package/client-api/src/internal/home/index.d.ts +4 -0
  18. package/client-api/src/internal/home/requests.d.ts +5 -0
  19. package/client-api/src/internal/providers.d.ts +63 -0
  20. package/client-api/src/internal/providers.test.d.ts +1 -0
  21. package/client-api/src/internal/storefront/handlers.d.ts +9 -0
  22. package/client-api/src/internal/storefront/index.d.ts +4 -0
  23. package/client-api/src/{internal.d.ts → internal/try-dispatch.d.ts} +1 -1
  24. package/client-api/src/legacy.d.ts +4 -3
  25. package/client-api/src/shapes/common.d.ts +20 -3
  26. package/client-api/src/shapes/dock.d.ts +97 -85
  27. package/client-api/src/shapes/home.d.ts +49 -138
  28. package/client-api/src/shapes/notifications.d.ts +2 -2
  29. package/client-api/src/shapes/store.d.ts +31 -14
  30. package/client-api/src/shapes/templates.d.ts +11 -11
  31. package/client-api/src/store.d.ts +31 -15
  32. package/client-api-platform/src/init/utils.d.ts +2 -2
  33. package/client-api-platform/src/shapes.d.ts +46 -39
  34. package/common/src/api/action.d.ts +1 -1
  35. package/common/src/api/home.d.ts +25 -0
  36. package/common/src/api/pages/shapes.d.ts +6 -6
  37. package/common/src/api/protocol/browser.d.ts +1 -1
  38. package/common/src/api/protocol/shapes/search.d.ts +96 -0
  39. package/common/src/api/protocol/shapes/workspace.d.ts +13 -13
  40. package/common/src/api/protocol/workspace-platform.d.ts +1 -1
  41. package/common/src/api/protocol/workspace.d.ts +2 -0
  42. package/common/src/api/provider.d.ts +24 -9
  43. package/common/src/api/search/aggregate-search-results.d.ts +10 -0
  44. package/common/src/api/search/common.d.ts +15 -0
  45. package/common/src/api/shapes/home.d.ts +186 -0
  46. package/common/src/api/theming.d.ts +18 -6
  47. package/common/src/utils/a11y/search.a11y.d.ts +10 -10
  48. package/common/src/utils/application.d.ts +2 -2
  49. package/common/src/utils/context-menu.d.ts +1 -1
  50. package/common/src/utils/layout.d.ts +3 -3
  51. package/common/src/utils/menu-window-provider.d.ts +2 -2
  52. package/common/src/utils/route.d.ts +0 -1
  53. package/common/src/utils/snapshot.d.ts +3 -3
  54. package/common/src/utils/types.d.ts +7 -7
  55. package/common/src/utils/usage-register.d.ts +2 -2
  56. package/home.js +128 -23
  57. package/home.js.map +1 -1
  58. package/index.js +127 -22
  59. package/index.js.map +1 -1
  60. package/notifications.js +124 -19
  61. package/notifications.js.map +1 -1
  62. package/package.json +3 -3
  63. package/search-api/src/fin/shapes.d.ts +2 -2
  64. package/search-api/src/internal-shapes.d.ts +2 -0
  65. package/search-api/src/provider/remote/deregistration.d.ts +2 -1
  66. package/search-api/src/provider/remote/info.d.ts +1 -1
  67. package/search-api/src/provider/remote/registration.d.ts +1 -1
  68. package/search-api/src/shapes.d.ts +16 -21
  69. package/store.js +130 -25
  70. package/store.js.map +1 -1
  71. package/common/src/api/search.d.ts +0 -18
package/package.json CHANGED
@@ -2,17 +2,17 @@
2
2
  "name": "@openfin/workspace",
3
3
  "description": "An API for integrating with OpenFin Workspace.",
4
4
  "main": "index.js",
5
- "version": "13.1.5",
5
+ "version": "14.0.14",
6
6
  "keywords": [
7
7
  "client api"
8
8
  ],
9
9
  "license": "SEE LICENSE IN LICENSE.MD",
10
10
  "peerDependencies": {
11
- "@openfin/core": "31.75.4",
11
+ "@openfin/core": "32.76.10",
12
12
  "@openfin/microsoft365": "^1.0.0"
13
13
  },
14
14
  "dependencies": {
15
- "openfin-notifications": "1.24.0",
15
+ "openfin-notifications": "1.25.0-alpha-2461",
16
16
  "@openfin/microsoft365": "^1.0.1",
17
17
  "@radix-ui/react-dropdown-menu": "^2.0.4",
18
18
  "@reduxjs/toolkit": "1.7.1",
@@ -1,6 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
- export declare type MessageListener = (message: any, identity: OpenFin.Identity) => any;
3
- export declare type ConnectionListener = (identity: OpenFin.Identity) => Promise<void>;
2
+ export type MessageListener = (message: any, identity: OpenFin.Identity) => any;
3
+ export type ConnectionListener = (identity: OpenFin.Identity) => Promise<void>;
4
4
  /**
5
5
  * Represents a channel client.
6
6
  */
@@ -109,6 +109,8 @@ export interface InternalSearchListenerResponse {
109
109
  setResultBuffer(results: SearchResult[]): void;
110
110
  getRevokedBuffer(): string[];
111
111
  setRevokedBuffer(resultIds: string[]): void;
112
+ getUpdatedContext(): any;
113
+ setUpdatedContext(context: any): void;
112
114
  onChange(): void;
113
115
  getStatus(): InternalSearchListenerResponseStatus;
114
116
  res: SearchListenerResponse;
@@ -1,4 +1,5 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  /**
2
3
  * Make a channel listener for deregistering remote search providers from search topics.
3
4
  */
4
- export declare function makeStreamListener(): (name: string) => void;
5
+ export declare function makeStreamListener(): (name: string, identity: OpenFin.Identity) => void;
@@ -2,4 +2,4 @@
2
2
  * Make a channel listener for sending search provider info to a remote OpenFin identity.
3
3
  * @param namespacedTopic the context of the search topic to get the provider info from.
4
4
  */
5
- export declare function makeStreamListener(): () => Promise<import("@client/").SearchProviderInfo[]>;
5
+ export declare function makeStreamListener(): () => Promise<import("@client/index").SearchProviderInfo[]>;
@@ -10,7 +10,7 @@ export declare function addRemoteProvider(info: SearchProviderInfoWithIdentity):
10
10
  * Removes a remote search provider.
11
11
  * @param name the name of the search provider.
12
12
  */
13
- export declare function removeRemoteProvider(id: string): void;
13
+ export declare function removeRemoteProvider(id: string, identity: OpenFin.Identity): void;
14
14
  /**
15
15
  * Remove all search providers registered by the remote OpenFin identity.
16
16
  * @param identity the identity that registered the remote search providers.
@@ -16,7 +16,7 @@ export declare const subscribe: () => Promise<SearchTopicClient>;
16
16
  /**
17
17
  * Search API object that is injected in the window.
18
18
  */
19
- export declare type SearchAPI = {
19
+ export type SearchAPI = {
20
20
  create: typeof create;
21
21
  subscribe: typeof subscribe;
22
22
  };
@@ -63,7 +63,7 @@ export interface SearchRequest {
63
63
  *
64
64
  * More documentation on Javascript Generators can be found [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator).
65
65
  */
66
- export declare type SearchProviderResponseGenerator = AsyncGenerator<SearchProviderResponse[], SearchProviderResponse[], SearchProviderResponse[]>;
66
+ export type SearchProviderResponseGenerator = AsyncGenerator<SearchProviderResponse[], SearchProviderResponse[], SearchProviderResponse[]>;
67
67
  /**
68
68
  * Describes the state of the search response generator.
69
69
  */
@@ -118,19 +118,19 @@ export interface SearchProviderResponseGeneratorExtended extends SearchProviderR
118
118
  * });
119
119
  * ```
120
120
  */
121
- export declare type SubscriptionListener = (identity: OpenFin.Identity) => Promise<boolean>;
121
+ export type SubscriptionListener = (identity: OpenFin.Identity) => Promise<boolean>;
122
122
  /**
123
123
  * Called when a remote OpenFin identity, such as a view, disconnects from a Search topic.
124
124
  */
125
- export declare type DisconnectListener = (identity: OpenFin.Identity) => Promise<void>;
125
+ export type DisconnectListener = (identity: OpenFin.Identity) => Promise<void>;
126
126
  /**
127
127
  * Called when search provider deregisters from SearchTopic
128
128
  */
129
- export declare type DeregisterListener = () => void | Promise<void>;
129
+ export type DeregisterListener = () => void | Promise<void>;
130
130
  /**
131
131
  * Called when search provider registers to SearchTopic
132
132
  */
133
- export declare type RegisterListener = () => void | Promise<void>;
133
+ export type RegisterListener = () => void | Promise<void>;
134
134
  /**
135
135
  * The client returned from subscribing as a secondary node to a search topic, which is managed by a primary node.
136
136
  * Can be used to interact with a search topic.
@@ -155,16 +155,6 @@ export interface SearchTopicClient {
155
155
  * @experimental
156
156
  */
157
157
  search(request: SearchRequest): Promise<SearchProviderResponseGeneratorExtended>;
158
- /**
159
- * Register a search provider.
160
- * @param provider the search provider to register.
161
- */
162
- register(provider: SearchProvider): Promise<RegistrationMetaInfo>;
163
- /**
164
- * Deregister a search provider by its name.
165
- * @param name the name of the search provider to deregister
166
- */
167
- deregister(name: string): Promise<void>;
168
158
  /**
169
159
  * Dispatch a search result back to the search provider.
170
160
  * It is then the search providers duty to perform what ever action was chosen.
@@ -273,7 +263,7 @@ export interface SearchProviderInfo {
273
263
  /**
274
264
  * The order to sort scored search results in.
275
265
  */
276
- export declare type ScoreOrder = 'ascending' | 'descending';
266
+ export type ScoreOrder = 'ascending' | 'descending';
277
267
  /**
278
268
  * The reason which triggered the search result dispatch callback.
279
269
  */
@@ -294,7 +284,7 @@ export declare enum ActionTrigger {
294
284
  /**
295
285
  * Each action is defined by its title and a hotkey
296
286
  */
297
- export declare type Action = {
287
+ export type Action = {
298
288
  name: string;
299
289
  hotkey?: string;
300
290
  };
@@ -492,6 +482,11 @@ export interface SearchListenerResponse {
492
482
  * @experimental
493
483
  */
494
484
  revoke(...resultKeys: string[]): void;
485
+ /**
486
+ * Respond to the search request with new or updated search results context.
487
+ * @param context The new or updated search result context to respond with.
488
+ */
489
+ updateContext(context: any): void;
495
490
  }
496
491
  /**
497
492
  * An object resolved from 'onUserInput' function containing results and optional context
@@ -506,11 +501,11 @@ export interface SearchResponse {
506
501
  * @param request - The search request coming in
507
502
  * @param response - EXPERIMENTAL - streaming response
508
503
  */
509
- export declare type UserInputListener = (request: SearchListenerRequest, response: SearchListenerResponse) => Promise<SearchResponse>;
504
+ export type UserInputListener = (request: SearchListenerRequest, response: SearchListenerResponse) => Promise<SearchResponse>;
510
505
  /**
511
506
  * The triggered action that should be performed by the search provider.
512
507
  */
513
- export declare type DispatchedAction = Action & {
508
+ export type DispatchedAction = Action & {
514
509
  trigger: ActionTrigger;
515
510
  };
516
511
  /**
@@ -547,7 +542,7 @@ export interface DispatchedSearchResult extends SearchResult {
547
542
  * searchTopic.dispatch("My Provider Name", searchResult, "My Action");
548
543
  * ```
549
544
  */
550
- export declare type ResultDispatchListener = (result: DispatchedSearchResult) => void;
545
+ export type ResultDispatchListener = (result: DispatchedSearchResult) => void;
551
546
  /**
552
547
  * A search provider listens for search requests on a search topic and returns search results.
553
548
  * It optionally can also perform custom actions when a search result is dispatched back to the provider.