@amp-labs/react 2.0.3 → 2.0.5
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.
- package/build/amp-react.cjs.js +13 -13
- package/build/amp-react.es.js +2900 -2762
- package/build/index.d.ts +24 -5
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Config } from '../../generated-sources/api/src';
|
|
2
|
+
import { Connection } from '../../generated-sources/api/src';
|
|
2
3
|
import { default as default_2 } from 'react';
|
|
3
4
|
import { HydratedIntegrationFieldExistent } from '../../generated-sources/api/src';
|
|
4
5
|
import { IntegrationFieldMapping } from '../../generated-sources/api/src';
|
|
5
|
-
import { JSX
|
|
6
|
+
import { JSX } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
export declare const AmpersandContext: default_2.Context<null>;
|
|
8
9
|
|
|
9
|
-
export declare function AmpersandProvider(props: AmpersandProviderProps):
|
|
10
|
+
export declare function AmpersandProvider(props: AmpersandProviderProps): JSX.Element;
|
|
10
11
|
|
|
11
12
|
declare interface AmpersandProviderProps {
|
|
12
13
|
options: {
|
|
@@ -25,7 +26,11 @@ declare interface AmpersandProviderProps {
|
|
|
25
26
|
children: default_2.ReactNode;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export
|
|
29
|
+
export { Config }
|
|
30
|
+
|
|
31
|
+
export { Connection }
|
|
32
|
+
|
|
33
|
+
export declare function ConnectProvider({ provider, consumerRef, consumerName, groupRef, groupName, redirectUrl, onSuccess, onDisconnectSuccess, onConnectSuccess, }: ConnectProviderProps): JSX.Element;
|
|
29
34
|
|
|
30
35
|
declare interface ConnectProviderProps {
|
|
31
36
|
provider: string;
|
|
@@ -34,10 +39,24 @@ declare interface ConnectProviderProps {
|
|
|
34
39
|
groupRef: string;
|
|
35
40
|
groupName?: string;
|
|
36
41
|
redirectUrl?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Use `onConnectSuccess` instead of `onSuccess`. `onSuccess` will soon be deprecated.
|
|
44
|
+
* @deprecated
|
|
45
|
+
*/
|
|
37
46
|
onSuccess?: (connectionID: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Callback function to be executed when a connection is successfully established.
|
|
49
|
+
* @param connection - Information about the newly established connection.
|
|
50
|
+
*/
|
|
51
|
+
onConnectSuccess?: (connection: Connection) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Callback function to be executed when a connection is successfully disconnected.
|
|
54
|
+
* @param connection - Information about the disconnected connection.
|
|
55
|
+
*/
|
|
56
|
+
onDisconnectSuccess?: (connection: Connection) => void;
|
|
38
57
|
}
|
|
39
58
|
|
|
40
|
-
export declare function FieldMapping({ field, onSelectChange, allFields }: FieldMappingProps):
|
|
59
|
+
export declare function FieldMapping({ field, onSelectChange, allFields }: FieldMappingProps): JSX.Element;
|
|
41
60
|
|
|
42
61
|
declare type FieldMapping_2 = {
|
|
43
62
|
[key: string]: Array<IntegrationFieldMapping>;
|
|
@@ -49,7 +68,7 @@ declare interface FieldMappingProps {
|
|
|
49
68
|
allFields: HydratedIntegrationFieldExistent[];
|
|
50
69
|
}
|
|
51
70
|
|
|
52
|
-
export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, onUninstallSuccess, fieldMapping, }: InstallIntegrationProps):
|
|
71
|
+
export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, onUninstallSuccess, fieldMapping, }: InstallIntegrationProps): JSX.Element;
|
|
53
72
|
|
|
54
73
|
declare interface InstallIntegrationProps {
|
|
55
74
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amp-labs/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Ampersand React library.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ampersand Labs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@openapitools/openapi-generator-cli": "^2.7.0",
|
|
61
61
|
"@types/lodash.isequal": "^4.5.7",
|
|
62
62
|
"@types/node": "^22.0.0",
|
|
63
|
-
"@types/react": "^
|
|
63
|
+
"@types/react": "^19.0.0",
|
|
64
64
|
"@types/react-dom": "^18.3.0",
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
|
66
66
|
"@typescript-eslint/parser": "^7.10.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
78
78
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
79
79
|
"jest": "^29.7.0",
|
|
80
|
-
"react-test-renderer": "^
|
|
80
|
+
"react-test-renderer": "^19.0.0",
|
|
81
81
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
82
82
|
"typescript": "^5.2.2",
|
|
83
83
|
"vite": "^5.3.3",
|