@pipedream/connect-react 1.0.0-preview.1 → 1.0.0-preview.3
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/dist/connect-react.es.js +4609 -5633
- package/dist/connect-react.umd.d.ts +27 -137
- package/dist/connect-react.umd.js +15 -29
- package/package.json +2 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Account } from '@pipedream/sdk';
|
|
2
2
|
import { AccountsRequestResponse } from '@pipedream/sdk';
|
|
3
|
-
import { AppInfo } from '@pipedream/sdk';
|
|
4
3
|
import { AppRequestResponse } from '@pipedream/sdk';
|
|
5
4
|
import { AppResponse } from '@pipedream/sdk';
|
|
6
5
|
import { AppResponse as AppResponse_2 } from '@pipedream/sdk/browser';
|
|
@@ -35,6 +34,7 @@ import { SelectComponentsConfig } from 'react-select';
|
|
|
35
34
|
import { StylesConfig } from 'react-select';
|
|
36
35
|
import { Theme as Theme_2 } from 'react-select';
|
|
37
36
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
37
|
+
import { UseSuspenseQueryOptions } from '@tanstack/react-query';
|
|
38
38
|
import { V1Component } from '@pipedream/sdk';
|
|
39
39
|
import { V1Component as V1Component_2 } from '@pipedream/sdk/browser';
|
|
40
40
|
|
|
@@ -71,26 +71,26 @@ export declare type Colors = {
|
|
|
71
71
|
|
|
72
72
|
export declare function ComponentForm<T extends ConfigurableProps>(props: ComponentFormProps<T>): JSX_2.Element;
|
|
73
73
|
|
|
74
|
-
export declare function ComponentFormContainer(props: ComponentFormContainerProps): JSX_2.Element;
|
|
74
|
+
export declare function ComponentFormContainer<T extends ConfigurableProps>(props: ComponentFormContainerProps<T>): JSX_2.Element;
|
|
75
75
|
|
|
76
|
-
declare type ComponentFormContainerProps = Omit<ComponentFormProps
|
|
76
|
+
declare type ComponentFormContainerProps<T extends ConfigurableProps> = Omit<ComponentFormProps<T>, "component"> & {
|
|
77
77
|
componentKey: string;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
declare type ComponentFormProps<T extends ConfigurableProps
|
|
80
|
+
declare type ComponentFormProps<T extends ConfigurableProps, U = ConfiguredProps<T>> = {
|
|
81
81
|
userId: string;
|
|
82
82
|
component: V1Component<T>;
|
|
83
|
-
configuredProps?:
|
|
83
|
+
configuredProps?: U;
|
|
84
84
|
disableQueryDisabling?: boolean;
|
|
85
85
|
propNames?: string[];
|
|
86
86
|
onSubmit?: (ctx: FormContext<T>) => void | Promise<void>;
|
|
87
|
-
onUpdateConfiguredProps?: (v:
|
|
87
|
+
onUpdateConfiguredProps?: (v: U) => void;
|
|
88
88
|
hideOptionalProps?: boolean;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
export declare type ComponentLibrary = typeof defaultComponents;
|
|
92
92
|
|
|
93
|
-
export declare function Control<T extends ConfigurableProp>(props: ControlProps<T>): JSX_2.Element;
|
|
93
|
+
export declare function Control<T extends ConfigurableProps, U extends ConfigurableProp>(props: ControlProps<T, U>): JSX_2.Element;
|
|
94
94
|
|
|
95
95
|
export declare function ControlAny(): JSX_2.Element;
|
|
96
96
|
|
|
@@ -104,9 +104,9 @@ export declare function ControlBoolean(): JSX_2.Element;
|
|
|
104
104
|
|
|
105
105
|
export declare function ControlInput(): JSX_2.Element;
|
|
106
106
|
|
|
107
|
-
declare type ControlProps<T extends ConfigurableProp> = {
|
|
108
|
-
field: FormFieldContext<
|
|
109
|
-
form: FormContext
|
|
107
|
+
declare type ControlProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
108
|
+
field: FormFieldContext<U>;
|
|
109
|
+
form: FormContext<T>;
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
export declare function ControlSelect<T>({ isCreatable, options, selectProps, }: ControlSelectProps<T>): JSX_2.Element;
|
|
@@ -219,12 +219,12 @@ export declare const defaultComponents: {
|
|
|
219
219
|
|
|
220
220
|
export declare const defaultTheme: Theme;
|
|
221
221
|
|
|
222
|
-
export declare function Description<T extends ConfigurableProp>(props: DescriptionProps<T>): JSX_2.Element | null;
|
|
222
|
+
export declare function Description<T extends ConfigurableProps, U extends ConfigurableProp>(props: DescriptionProps<T, U>): JSX_2.Element | null;
|
|
223
223
|
|
|
224
|
-
declare type DescriptionProps<T extends ConfigurableProp> = {
|
|
224
|
+
declare type DescriptionProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
225
225
|
markdown?: string;
|
|
226
|
-
field: FormFieldContext<
|
|
227
|
-
form: FormContext
|
|
226
|
+
field: FormFieldContext<U>;
|
|
227
|
+
form: FormContext<T>;
|
|
228
228
|
};
|
|
229
229
|
|
|
230
230
|
export declare type DynamicProps<T extends ConfigurableProps> = {
|
|
@@ -302,7 +302,7 @@ export declare type FormFieldContext<T extends ConfigurableProp> = {
|
|
|
302
302
|
export declare const FormFieldContext: Context<FormFieldContext<any> | undefined>;
|
|
303
303
|
|
|
304
304
|
export declare type FormFieldContextExtra<T extends ConfigurableProp> = T extends ConfigurablePropApp ? {
|
|
305
|
-
app?:
|
|
305
|
+
app?: AppResponse;
|
|
306
306
|
} : Record<string, never>;
|
|
307
307
|
|
|
308
308
|
export declare const FrontendClientProvider: FC<FrontendClientProviderProps>;
|
|
@@ -318,12 +318,12 @@ export declare function InternalComponentForm(): JSX_2.Element;
|
|
|
318
318
|
|
|
319
319
|
export declare function InternalField<T extends ConfigurableProp>({ prop, idx, }: FieldInternalProps<T>): JSX_2.Element;
|
|
320
320
|
|
|
321
|
-
export declare function Label<T extends ConfigurableProp>(props: LabelProps<T>): JSX_2.Element;
|
|
321
|
+
export declare function Label<T extends ConfigurableProps, U extends ConfigurableProp>(props: LabelProps<T, U>): JSX_2.Element;
|
|
322
322
|
|
|
323
|
-
declare type LabelProps<T extends ConfigurableProp> = {
|
|
323
|
+
declare type LabelProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
324
324
|
text: string;
|
|
325
|
-
field: FormFieldContext<
|
|
326
|
-
form: FormContext
|
|
325
|
+
field: FormFieldContext<U>;
|
|
326
|
+
form: FormContext<T>;
|
|
327
327
|
};
|
|
328
328
|
|
|
329
329
|
export declare function mergeTheme(target: Theme, ...sources: (PartialTheme | undefined)[]): Theme;
|
|
@@ -549,125 +549,20 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
549
549
|
* Get details about an app
|
|
550
550
|
*/
|
|
551
551
|
export declare const useApp: (slug: string, opts?: {
|
|
552
|
-
useQueryOpts?: Omit<
|
|
552
|
+
useQueryOpts?: Omit<UseSuspenseQueryOptions<AppRequestResponse>, "queryKey" | "queryFn">;
|
|
553
553
|
}) => {
|
|
554
|
-
app: AppResponse
|
|
555
|
-
|
|
556
|
-
error: Error;
|
|
557
|
-
isError: true;
|
|
558
|
-
isPending: false;
|
|
559
|
-
isLoading: false;
|
|
560
|
-
isLoadingError: false;
|
|
561
|
-
isRefetchError: true;
|
|
562
|
-
isSuccess: false;
|
|
563
|
-
status: "error";
|
|
564
|
-
dataUpdatedAt: number;
|
|
565
|
-
errorUpdatedAt: number;
|
|
566
|
-
failureCount: number;
|
|
567
|
-
failureReason: Error | null;
|
|
568
|
-
errorUpdateCount: number;
|
|
569
|
-
isFetched: boolean;
|
|
570
|
-
isFetchedAfterMount: boolean;
|
|
554
|
+
app: AppResponse;
|
|
555
|
+
error: Error | null;
|
|
571
556
|
isFetching: boolean;
|
|
572
|
-
isInitialLoading: boolean;
|
|
573
|
-
isPaused: boolean;
|
|
574
|
-
isPlaceholderData: boolean;
|
|
575
|
-
isRefetching: boolean;
|
|
576
|
-
isStale: boolean;
|
|
577
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppRequestResponse, Error>>;
|
|
578
|
-
fetchStatus: FetchStatus;
|
|
579
|
-
promise: Promise<AppRequestResponse>;
|
|
580
|
-
} | {
|
|
581
|
-
app: AppResponse | undefined;
|
|
582
|
-
data: AppRequestResponse;
|
|
583
|
-
error: null;
|
|
584
|
-
isError: false;
|
|
585
|
-
isPending: false;
|
|
586
557
|
isLoading: false;
|
|
587
|
-
isLoadingError: false;
|
|
588
|
-
isRefetchError: false;
|
|
589
|
-
isSuccess: true;
|
|
590
|
-
status: "success";
|
|
591
|
-
dataUpdatedAt: number;
|
|
592
|
-
errorUpdatedAt: number;
|
|
593
|
-
failureCount: number;
|
|
594
|
-
failureReason: Error | null;
|
|
595
|
-
errorUpdateCount: number;
|
|
596
|
-
isFetched: boolean;
|
|
597
|
-
isFetchedAfterMount: boolean;
|
|
598
|
-
isFetching: boolean;
|
|
599
|
-
isInitialLoading: boolean;
|
|
600
|
-
isPaused: boolean;
|
|
601
|
-
isPlaceholderData: boolean;
|
|
602
|
-
isRefetching: boolean;
|
|
603
|
-
isStale: boolean;
|
|
604
558
|
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppRequestResponse, Error>>;
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
app: AppResponse | undefined;
|
|
609
|
-
data: undefined;
|
|
610
|
-
error: Error;
|
|
611
|
-
isError: true;
|
|
559
|
+
data: AppRequestResponse;
|
|
560
|
+
status: "error" | "success";
|
|
561
|
+
isError: boolean;
|
|
612
562
|
isPending: false;
|
|
613
|
-
isLoading: false;
|
|
614
|
-
isLoadingError: true;
|
|
615
|
-
isRefetchError: false;
|
|
616
|
-
isSuccess: false;
|
|
617
|
-
status: "error";
|
|
618
|
-
dataUpdatedAt: number;
|
|
619
|
-
errorUpdatedAt: number;
|
|
620
|
-
failureCount: number;
|
|
621
|
-
failureReason: Error | null;
|
|
622
|
-
errorUpdateCount: number;
|
|
623
|
-
isFetched: boolean;
|
|
624
|
-
isFetchedAfterMount: boolean;
|
|
625
|
-
isFetching: boolean;
|
|
626
|
-
isInitialLoading: boolean;
|
|
627
|
-
isPaused: boolean;
|
|
628
|
-
isPlaceholderData: boolean;
|
|
629
|
-
isRefetching: boolean;
|
|
630
|
-
isStale: boolean;
|
|
631
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppRequestResponse, Error>>;
|
|
632
|
-
fetchStatus: FetchStatus;
|
|
633
|
-
promise: Promise<AppRequestResponse>;
|
|
634
|
-
} | {
|
|
635
|
-
app: AppResponse | undefined;
|
|
636
|
-
data: undefined;
|
|
637
|
-
error: null;
|
|
638
|
-
isError: false;
|
|
639
|
-
isPending: true;
|
|
640
|
-
isLoading: true;
|
|
641
|
-
isLoadingError: false;
|
|
642
|
-
isRefetchError: false;
|
|
643
|
-
isSuccess: false;
|
|
644
|
-
status: "pending";
|
|
645
|
-
dataUpdatedAt: number;
|
|
646
|
-
errorUpdatedAt: number;
|
|
647
|
-
failureCount: number;
|
|
648
|
-
failureReason: Error | null;
|
|
649
|
-
errorUpdateCount: number;
|
|
650
|
-
isFetched: boolean;
|
|
651
|
-
isFetchedAfterMount: boolean;
|
|
652
|
-
isFetching: boolean;
|
|
653
|
-
isInitialLoading: boolean;
|
|
654
|
-
isPaused: boolean;
|
|
655
|
-
isPlaceholderData: boolean;
|
|
656
|
-
isRefetching: boolean;
|
|
657
|
-
isStale: boolean;
|
|
658
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppRequestResponse, Error>>;
|
|
659
|
-
fetchStatus: FetchStatus;
|
|
660
|
-
promise: Promise<AppRequestResponse>;
|
|
661
|
-
} | {
|
|
662
|
-
app: AppResponse | undefined;
|
|
663
|
-
data: undefined;
|
|
664
|
-
error: null;
|
|
665
|
-
isError: false;
|
|
666
|
-
isPending: true;
|
|
667
563
|
isLoadingError: false;
|
|
668
|
-
isRefetchError:
|
|
669
|
-
isSuccess:
|
|
670
|
-
status: "pending";
|
|
564
|
+
isRefetchError: boolean;
|
|
565
|
+
isSuccess: boolean;
|
|
671
566
|
dataUpdatedAt: number;
|
|
672
567
|
errorUpdatedAt: number;
|
|
673
568
|
failureCount: number;
|
|
@@ -675,16 +570,11 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
675
570
|
errorUpdateCount: number;
|
|
676
571
|
isFetched: boolean;
|
|
677
572
|
isFetchedAfterMount: boolean;
|
|
678
|
-
isFetching: boolean;
|
|
679
|
-
isLoading: boolean;
|
|
680
573
|
isInitialLoading: boolean;
|
|
681
574
|
isPaused: boolean;
|
|
682
|
-
isPlaceholderData: boolean;
|
|
683
575
|
isRefetching: boolean;
|
|
684
576
|
isStale: boolean;
|
|
685
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppRequestResponse, Error>>;
|
|
686
577
|
fetchStatus: FetchStatus;
|
|
687
|
-
promise: Promise<AppRequestResponse>;
|
|
688
578
|
};
|
|
689
579
|
|
|
690
580
|
/**
|