@interopio/intent-resolver-ui 1.2.6 → 4.2.8-next.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.
@@ -1,131 +1,131 @@
1
- import { ComponentType } from "react";
2
-
3
- export type IOBrowserIntentResolverUIFactoryFunction = (io: any, config: IOBrowserIntentResolverUI.Config) => Promise<IOBrowserIntentResolverUI.API>;
4
-
5
- declare const IOBrowserIntentResolverUIFactory: IOBrowserIntentResolverUIFactoryFunction;
6
-
7
- export default IOBrowserIntentResolverUIFactory;
8
-
9
- export namespace IOBrowserIntentResolverUI {
10
- export interface IntentResolverProps {
11
- io: any;
12
- config: (OpenConfigWithIntentRequest | OpenConfigWithHandlerFilter) & { uiSettings?: UISettings };
13
- onUserResponse: (response: IntentResolverResponse) => void;
14
- }
15
-
16
- export interface Config {
17
- enable: boolean;
18
- rootElement: HTMLDivElement;
19
- CustomIntentResolver?: ComponentType<IntentResolverProps>;
20
- }
21
-
22
- export interface API {
23
- open: (config: OpenConfig) => OpenResult;
24
- close: (config: CloseConfig) => void;
25
- }
26
-
27
- export interface OpenConfigWithIntentRequest {
28
- intentRequest: IntentRequest;
29
- handlerFilter?: never;
30
- }
31
-
32
- export interface OpenConfigWithHandlerFilter {
33
- handlerFilter: HandlerFilter;
34
- intentRequest?: never;
35
- }
36
-
37
- export interface UISettings {
38
- showCloseButton?: boolean;
39
- }
40
-
41
- export type OpenConfig = (OpenConfigWithIntentRequest | OpenConfigWithHandlerFilter) & { onUserResponse: (response: { response: IntentResolverResponse }) => void, uiSettings?: UISettings };
42
-
43
- export interface UserSettings {
44
- preserveChoice: boolean;
45
- }
46
-
47
- export interface UserChoiceResponse {
48
- intent: string;
49
- handler: IntentHandler;
50
- userSettings: UserSettings;
51
- }
52
-
53
- export interface IntentResolverResponse {
54
- isExpired?: boolean;
55
- isClosed?: boolean;
56
- userChoice?: UserChoiceResponse;
57
- }
58
-
59
- export interface OpenResult {
60
- id: string;
61
- }
62
-
63
- export interface CloseConfig {
64
- id: string;
65
- }
66
-
67
- interface ApplicationStartOptions {
68
- top?: number;
69
- left?: number;
70
- width?: number;
71
- height?: number;
72
- relativeTo?: string;
73
- relativeDirection?: "top" | "left" | "right" | "bottom";
74
- waitForAGMReady?: boolean;
75
- channelId?: string;
76
- }
77
-
78
- interface IntentContext {
79
- readonly type?: string;
80
- readonly data?: { [key: string]: any };
81
- }
82
-
83
- interface IntentHandler {
84
- applicationName: string;
85
- applicationTitle?: string;
86
- applicationDescription?: string;
87
- applicationIcon?: string;
88
- type: "app" | "instance";
89
- displayName?: string;
90
- contextTypes?: string[];
91
- instanceId?: string;
92
- instanceTitle?: string;
93
- resultType?: string;
94
- }
95
-
96
- interface IntentRequest {
97
- readonly intent: string;
98
- readonly target?: "startNew" | "reuse" | { app?: string; instance?: string };
99
- readonly context?: IntentContext;
100
- readonly options?: ApplicationStartOptions;
101
- readonly handlers?: IntentHandler[];
102
- readonly timeout?: number;
103
- readonly waitUserResponseIndefinitely?: boolean;
104
- readonly clearSavedHandler?: boolean;
105
- }
106
-
107
- type HandlerExclusionCriteria = {
108
- /**
109
- * Name of the application to exclude. All Intent Handlers (both app and instance type) from that application will be excluded.
110
- * When excluding by applicationName, the instanceId is not required.
111
- */
112
- applicationName: string;
113
- } | {
114
- /**
115
- * ID of the specific instance to exclude.
116
- * When excluding by instanceId, the applicationName is not required.
117
- */
118
- instanceId: string;
119
- }
120
-
121
- interface HandlerFilter {
122
- title?: string;
123
- openResolver?: boolean;
124
- timeout?: number;
125
- intent?: string;
126
- contextTypes?: string[];
127
- resultType?: string;
128
- applicationNames?: string[];
129
- excludeList?: HandlerExclusionCriteria[];
130
- }
131
- }
1
+ import { ComponentType } from "react";
2
+
3
+ export type IOBrowserIntentResolverUIFactoryFunction = (io: any, config: IOBrowserIntentResolverUI.Config) => Promise<IOBrowserIntentResolverUI.API>;
4
+
5
+ declare const IOBrowserIntentResolverUIFactory: IOBrowserIntentResolverUIFactoryFunction;
6
+
7
+ export default IOBrowserIntentResolverUIFactory;
8
+
9
+ export namespace IOBrowserIntentResolverUI {
10
+ export interface IntentResolverProps {
11
+ io: any;
12
+ config: (OpenConfigWithIntentRequest | OpenConfigWithHandlerFilter) & { uiSettings?: UISettings };
13
+ onUserResponse: (response: IntentResolverResponse) => void;
14
+ }
15
+
16
+ export interface Config {
17
+ enable: boolean;
18
+ rootElement: HTMLDivElement;
19
+ CustomIntentResolver?: ComponentType<IntentResolverProps>;
20
+ }
21
+
22
+ export interface API {
23
+ open: (config: OpenConfig) => OpenResult;
24
+ close: (config: CloseConfig) => void;
25
+ }
26
+
27
+ export interface OpenConfigWithIntentRequest {
28
+ intentRequest: IntentRequest;
29
+ handlerFilter?: never;
30
+ }
31
+
32
+ export interface OpenConfigWithHandlerFilter {
33
+ handlerFilter: HandlerFilter;
34
+ intentRequest?: never;
35
+ }
36
+
37
+ export interface UISettings {
38
+ showCloseButton?: boolean;
39
+ }
40
+
41
+ export type OpenConfig = (OpenConfigWithIntentRequest | OpenConfigWithHandlerFilter) & { onUserResponse: (response: { response: IntentResolverResponse }) => void, uiSettings?: UISettings };
42
+
43
+ export interface UserSettings {
44
+ preserveChoice: boolean;
45
+ }
46
+
47
+ export interface UserChoiceResponse {
48
+ intent: string;
49
+ handler: IntentHandler;
50
+ userSettings: UserSettings;
51
+ }
52
+
53
+ export interface IntentResolverResponse {
54
+ isExpired?: boolean;
55
+ isClosed?: boolean;
56
+ userChoice?: UserChoiceResponse;
57
+ }
58
+
59
+ export interface OpenResult {
60
+ id: string;
61
+ }
62
+
63
+ export interface CloseConfig {
64
+ id: string;
65
+ }
66
+
67
+ interface ApplicationStartOptions {
68
+ top?: number;
69
+ left?: number;
70
+ width?: number;
71
+ height?: number;
72
+ relativeTo?: string;
73
+ relativeDirection?: "top" | "left" | "right" | "bottom";
74
+ waitForAGMReady?: boolean;
75
+ channelId?: string;
76
+ }
77
+
78
+ interface IntentContext {
79
+ readonly type?: string;
80
+ readonly data?: { [key: string]: any };
81
+ }
82
+
83
+ interface IntentHandler {
84
+ applicationName: string;
85
+ applicationTitle?: string;
86
+ applicationDescription?: string;
87
+ applicationIcon?: string;
88
+ type: "app" | "instance";
89
+ displayName?: string;
90
+ contextTypes?: string[];
91
+ instanceId?: string;
92
+ instanceTitle?: string;
93
+ resultType?: string;
94
+ }
95
+
96
+ interface IntentRequest {
97
+ readonly intent: string;
98
+ readonly target?: "startNew" | "reuse" | { app?: string; instance?: string };
99
+ readonly context?: IntentContext;
100
+ readonly options?: ApplicationStartOptions;
101
+ readonly handlers?: IntentHandler[];
102
+ readonly timeout?: number;
103
+ readonly waitUserResponseIndefinitely?: boolean;
104
+ readonly clearSavedHandler?: boolean;
105
+ }
106
+
107
+ type HandlerExclusionCriteria = {
108
+ /**
109
+ * Name of the application to exclude. All Intent Handlers (both app and instance type) from that application will be excluded.
110
+ * When excluding by applicationName, the instanceId is not required.
111
+ */
112
+ applicationName: string;
113
+ } | {
114
+ /**
115
+ * ID of the specific instance to exclude.
116
+ * When excluding by instanceId, the applicationName is not required.
117
+ */
118
+ instanceId: string;
119
+ }
120
+
121
+ interface HandlerFilter {
122
+ title?: string;
123
+ openResolver?: boolean;
124
+ timeout?: number;
125
+ intent?: string;
126
+ contextTypes?: string[];
127
+ resultType?: string;
128
+ applicationNames?: string[];
129
+ excludeList?: HandlerExclusionCriteria[];
130
+ }
131
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/intent-resolver-ui",
3
- "version": "1.2.6",
3
+ "version": "4.2.8-next.0",
4
4
  "types": "./intent.resolver.ui.d.ts",
5
5
  "scripts": {
6
6
  "start": "vite",
@@ -37,14 +37,12 @@
37
37
  "react": ">=16.8.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@interopio/browser": "^4.2.5",
41
- "@interopio/components-react": "^0.9.3",
42
- "@interopio/theme": "^3.2.0",
40
+ "@interopio/components-react": "^4.2.8-next.0",
41
+ "@interopio/theme": "^4.2.8-next.0",
43
42
  "@interopio/utils": "^2.2.0"
44
43
  },
45
44
  "publishConfig": {
46
45
  "@interopio:registry": "https://registry.npmjs.org",
47
46
  "access": "public"
48
- },
49
- "gitHead": "efe6743dec87ecae29c638a193031e0520dac1f4"
47
+ }
50
48
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Tick42
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.