Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 49 additions & 38 deletions packages/connect-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,39 @@

# Changelog

# [1.3.1] - 2025-06-30
## [1.3.2] - 2025-07-15

## Changed
### Changed

- Do not perform prop validation for `app` props with nil auth type. This will
allow components to be deployed/executed without users having to authenticate
to the app (which would fail given that the app doesn't have a way to
authenticate anyways).
- Use the `getComponents` method from the SDK instead of the deprecated
`components` method.

## [1.3.1] - 2025-06-30

### Changed

- Fixed handling of the 'dir' prop type to exclude it from configurable props

# [1.3.0] - 2025-06-10
## [1.3.0] - 2025-06-10

## Added
### Added

- Support for `externalUserId` param across all components as the preferred way to identify users
- Backward compatibility with existing `userId` parameter

## Changed
### Changed

- All internal SDK calls now use `externalUserId` parameter for consistency with backend SDK

## Deprecated
### Deprecated

- `userId` parameter in favor of `externalUserId` (existing code continues to work with console warnings)

## Migration
### Migration

Replace `userId` with `externalUserId` in component props:

Expand All @@ -35,137 +46,137 @@ Replace `userId` with `externalUserId` in component props:
<ComponentFormContainer externalUserId={userId} />
```

# [1.2.1] - 2025-06-07
## [1.2.1] - 2025-06-07

- Fixing the SelectApp component to properly handle controlled values when not found in search results
- Fixing infinite re-render issue in ComponentFormContainer by memoizing configurableProps

# [1.2.0] - 2025-06-05
## [1.2.0] - 2025-06-05

- Adding basic support for 'sql' prop types

# [1.1.0] - 2025-06-04
## [1.1.0] - 2025-06-04

- Adding support for 'object' prop types
- Modifying string and string[] inputs to hide the dropdown in the case of no options
- Added basic styling to hyperlinks in prop descriptions

# [1.0.2] - 2025-04-24
## [1.0.2] - 2025-04-24

- Updating README to remove note about this package being in early preview

# [1.0.1] - 2025-04-16
## [1.0.1] - 2025-04-16

- remove bad polyfill (would break checking `document`)
- handle bad `decode-named-character-reference` browser import via vite resolve.alias
- stop accidentally bundling `lodash` (-80KB for es build)

# [1.0.0-preview.30] - 2025-02-19
## [1.0.0-preview.30] - 2025-02-19

- SelectApp and SelectComponent Improvements

# [1.0.0-preview.29] - 2025-02-10
## [1.0.0-preview.29] - 2025-02-10

- Fix enableDebugging state update bug

# [1.0.0-preview.28] - 2025-02-05
## [1.0.0-preview.28] - 2025-02-05

- Surface SDK errors in the form

# [1.0.0-preview.27] - 2025-01-30
## [1.0.0-preview.27] - 2025-01-30

- Add styling to alerts

# [1.0.0-preview.26] - 2025-01-29
## [1.0.0-preview.26] - 2025-01-29

- No change

# [1.0.0-preview.25] - 2025-01-28
## [1.0.0-preview.25] - 2025-01-28

- Show prop labels instead of values after selecting dynamic props
- Fix the bug where a remote option would not be reloaded when the form component is re-rendered

# [1.0.0-preview.24] - 2025-01-24
## [1.0.0-preview.24] - 2025-01-24

- Fix the bug where inputting multiple strings into an array prop would merge the strings into one
- Fix custom string input for remote options
- Fix the reloading of a previously selected remote option when re-rendering the form component

# [1.0.0-preview.23] - 2025-01-22
## [1.0.0-preview.23] - 2025-01-22

- Show the prop label instead of the value after selecting from a dropdown for string array props

# [1.0.0-preview.22] - 2025-01-21
## [1.0.0-preview.22] - 2025-01-21

- Allow custom string input for remote options

# [1.0.0-preview.21] - 2025-01-17
## [1.0.0-preview.21] - 2025-01-17

- Fix a bug in async prop value validation when the prop is a string

# [1.0.0-preview.20] - 2025-01-16
## [1.0.0-preview.20] - 2025-01-16

- Check if a string prop is set instead of inspecting the contents of the string

# [1.0.0-preview.15] - 2024-12-18
## [1.0.0-preview.15] - 2024-12-18

- Emit dynamic props via `onUpdateDynamicProps`

# [1.0.0-preview.14] - 2024-12-17
## [1.0.0-preview.14] - 2024-12-17

- Fixed one case of "maximum update depth exceeded" (useEffect component dependency)

# [1.0.0-preview.13] - 2024-12-17
## [1.0.0-preview.13] - 2024-12-17

- Added skippable prop types to support triggers

# [1.0.0-preview.12] - 2024-12-13
## [1.0.0-preview.12] - 2024-12-13

- Don't throw when validating unexpected values from the api

# [1.0.0-preview.11] - 2024-12-13
## [1.0.0-preview.11] - 2024-12-13

- Make prop validation more consistent with app behavior
- Relax validation of string props when value is not a string

# [1.0.0-preview.10] - 2024-12-12
## [1.0.0-preview.10] - 2024-12-12

- Enforce string length limits

# [1.0.0-preview.9] - 2024-12-10
## [1.0.0-preview.9] - 2024-12-10

- Disabled submit button when form is incomplete

# [1.0.0-preview.8] - 2024-12-09
## [1.0.0-preview.8] - 2024-12-09

- Fix dynamic props in the Connect demo app

# [1.0.0-preview.7] - 2024-12-05
## [1.0.0-preview.7] - 2024-12-05

- Use proper casing for `stringOptions` now that configure prop is properly async

# [1.0.0-preview.6] - 2024-12-05
## [1.0.0-preview.6] - 2024-12-05

- Handle configurable prop `withLabel` (eg. fixes config of Airtable `tableId`)

# [1.0.0-preview.5] - 2024-12-02
## [1.0.0-preview.5] - 2024-12-02

- Change colors of "Connect App" button

# [1.0.0-preview.4] - 2024-11-27
## [1.0.0-preview.4] - 2024-11-27

- Fix accidental use of useSuspenseQuery
- Fix setState during render due to userId useEffect

# [1.0.0-preview.3] - 2024-11-27
## [1.0.0-preview.3] - 2024-11-27

- Previous version broken, lack of build before publish (not sure how preview.1 shipped)

# [1.0.0-preview.2] - 2024-11-27
## [1.0.0-preview.2] - 2024-11-27

- Externalize @emotion/react
- Minor type improvements

# [1.0.0-preview.1] - 2024-11-22
## [1.0.0-preview.1] - 2024-11-22

Initial release
2 changes: 1 addition & 1 deletion packages/connect-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/connect-react",
"version": "1.3.1",
"version": "1.3.2",
"description": "Pipedream Connect library for React",
"files": [
"dist"
Expand Down
6 changes: 3 additions & 3 deletions packages/connect-react/src/hooks/use-components.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { useQuery } from "@tanstack/react-query";
import type { GetComponentOpts } from "@pipedream/sdk";
import type { GetComponentsOpts } from "@pipedream/sdk";
import { useFrontendClient } from "./frontend-client-context";

/**
* Get list of components
*/
export const useComponents = (input?: GetComponentOpts) => {
export const useComponents = (input?: GetComponentsOpts) => {
const client = useFrontendClient();
const query = useQuery({
queryKey: [
"components",
input,
],
queryFn: () => client.components(input),
queryFn: () => client.getComponents(input),
});

return {
Expand Down
32 changes: 17 additions & 15 deletions packages/connect-react/src/utils/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ export function appPropErrors(opts: ValidationOpts<ConfigurablePropApp>): string
"app field not registered",
]
}
if (!app.auth_type) {
// These apps don't require authentication since they can't be configured
// (i.e. auth_type == "none")
return
}
if (!value) {
return [
"no app configured",
Expand All @@ -164,23 +169,20 @@ export function appPropErrors(opts: ValidationOpts<ConfigurablePropApp>): string
}
const _value = value as PropValue<"app">
if ("authProvisionId" in _value && !_value.authProvisionId) {
if (app.auth_type) {
const errs = []
if (app.auth_type === "oauth" && !(_value as OauthAppPropValue).oauth_access_token) {
errs.push("missing oauth token")
}
if (app.auth_type === "oauth" || app.auth_type === "keys") {
const customFields = getCustomFields(app)
const _valueWithCustomFields = _value as AppPropValueWithCustomFields<typeof customFields>
for (const cf of customFields) {
if (!cf.optional && !_valueWithCustomFields[cf.name]) {
errs.push(`missing custom field: ${cf.name}`)
}
const errs = []
if (app.auth_type === "oauth" && !(_value as OauthAppPropValue).oauth_access_token) {
errs.push("missing oauth token")
}
if (app.auth_type === "oauth" || app.auth_type === "keys") {
const customFields = getCustomFields(app)
const _valueWithCustomFields = _value as AppPropValueWithCustomFields<typeof customFields>
for (const cf of customFields) {
if (!cf.optional && !_valueWithCustomFields[cf.name]) {
errs.push(`missing custom field: ${cf.name}`)
}
}
if (app.auth_type !== "none")
errs.push("no auth provision configured")
return errs
}

return errs
}
}
23 changes: 9 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading