@amp-labs/react 2.9.6 → 2.9.7
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.cjs.js.map +1 -1
- package/build/amp-react.es.js +2114 -2048
- package/build/amp-react.es.js.map +1 -1
- package/build/index.d.ts +43 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
1
2
|
import { default as default_2 } from 'react';
|
|
2
3
|
import { Dispatch } from 'react';
|
|
3
4
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
4
6
|
import { SetStateAction } from 'react';
|
|
5
7
|
|
|
6
8
|
export declare const AmpersandContext: default_2.Context<AmpersandContextValue | null>;
|
|
@@ -130,6 +132,12 @@ export declare interface BaseReadConfigObject {
|
|
|
130
132
|
* @memberof BaseReadConfigObject
|
|
131
133
|
*/
|
|
132
134
|
schedule?: string;
|
|
135
|
+
/**
|
|
136
|
+
* If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
|
|
137
|
+
* @type {boolean}
|
|
138
|
+
* @memberof BaseReadConfigObject
|
|
139
|
+
*/
|
|
140
|
+
disabled?: boolean;
|
|
133
141
|
/**
|
|
134
142
|
* The name of the destination that the result should be sent to.
|
|
135
143
|
* @type {string}
|
|
@@ -511,6 +519,9 @@ export declare interface Connection {
|
|
|
511
519
|
authScheme: ConnectionAuthSchemeEnum;
|
|
512
520
|
/**
|
|
513
521
|
* The status of the connection.
|
|
522
|
+
* - `created`: The connection has just been created or the access token was just refreshed.
|
|
523
|
+
* - `working`: The connection has successfully been used to make a request.
|
|
524
|
+
* - `bad_credentials`: The connection encountered credential-related issues when making a request, or when attempting to refresh the access token.
|
|
514
525
|
* @type {string}
|
|
515
526
|
* @memberof Connection
|
|
516
527
|
*/
|
|
@@ -769,6 +780,17 @@ declare interface DynamicMappingsInputMappedValue {
|
|
|
769
780
|
mappedDisplayValue: string;
|
|
770
781
|
}
|
|
771
782
|
|
|
783
|
+
declare interface ErrorBoundaryProps {
|
|
784
|
+
children: ReactNode;
|
|
785
|
+
fallback?: ReactNode;
|
|
786
|
+
onError?: (error: Error, errorInfo: default_2.ErrorInfo) => void;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
declare interface ErrorBoundaryState {
|
|
790
|
+
hasError: boolean;
|
|
791
|
+
error: Error | null;
|
|
792
|
+
}
|
|
793
|
+
|
|
772
794
|
/**
|
|
773
795
|
* A map of object names to DynamicMappingsInputEntry arrays, with each DynamicMappingsInputEntry representing a field.
|
|
774
796
|
*/
|
|
@@ -1402,6 +1424,20 @@ declare interface InstallationProviderProps {
|
|
|
1402
1424
|
|
|
1403
1425
|
export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, onUninstallSuccess, fieldMapping, }: InstallIntegrationProps): JSX_2.Element;
|
|
1404
1426
|
|
|
1427
|
+
/**
|
|
1428
|
+
* React Error Boundary component that catches JavaScript errors anywhere in the child component tree
|
|
1429
|
+
* and displays a fallback UI instead of crashing the whole application.
|
|
1430
|
+
*
|
|
1431
|
+
* This is especially important for the InstallIntegration component to prevent errors in hooks
|
|
1432
|
+
* or rendering from crashing the parent application.
|
|
1433
|
+
*/
|
|
1434
|
+
export declare class InstallIntegrationErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
1435
|
+
constructor(props: ErrorBoundaryProps);
|
|
1436
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
1437
|
+
componentDidCatch(error: Error, errorInfo: default_2.ErrorInfo): void;
|
|
1438
|
+
render(): ReactNode;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1405
1441
|
declare interface InstallIntegrationProps {
|
|
1406
1442
|
/**
|
|
1407
1443
|
* The name of the integration from amp.yaml
|
|
@@ -1759,6 +1795,12 @@ declare interface ReadConfigObject {
|
|
|
1759
1795
|
* @memberof ReadConfigObject
|
|
1760
1796
|
*/
|
|
1761
1797
|
schedule?: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
|
|
1800
|
+
* @type {boolean}
|
|
1801
|
+
* @memberof ReadConfigObject
|
|
1802
|
+
*/
|
|
1803
|
+
disabled?: boolean;
|
|
1762
1804
|
/**
|
|
1763
1805
|
* The name of the destination that the result should be sent to.
|
|
1764
1806
|
* @type {string}
|
|
@@ -1823,6 +1865,7 @@ export declare type ReadObjectHandlers = {
|
|
|
1823
1865
|
fieldName: string;
|
|
1824
1866
|
mapToName: string;
|
|
1825
1867
|
}) => void;
|
|
1868
|
+
deleteFieldMapping: (mapToName: string) => void;
|
|
1826
1869
|
};
|
|
1827
1870
|
|
|
1828
1871
|
/**
|