diff --git a/package-lock.json b/package-lock.json index 148c59d..3e19d39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@stackone/expressions": "^0.16.0", - "@stackone/malachite": "^0.3.2", + "@stackone/malachite": "^0.4.0", "@tanstack/react-query": "^5.77.2" }, "devDependencies": { @@ -1192,9 +1192,9 @@ } }, "node_modules/@stackone/malachite": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@stackone/malachite/-/malachite-0.3.2.tgz", - "integrity": "sha512-jdNaq8d+G5bpCRCyaeL7CAR084jUzSlEkIdqCS9zMCfDXMYSNGmltCfKxXM2jqxLSp//RG+96uPGfn1beUGeTA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@stackone/malachite/-/malachite-0.4.0.tgz", + "integrity": "sha512-Oknt0sTaafFhJNTgCLNsZ7CeouzXOU/17WnydU5/U/3I1cJrH5PCD5lmdJr+1CRofzZmKrKOA+IKo4a5uK4vyA==", "dependencies": { "marked-react": "^3.0.0" }, diff --git a/package.json b/package.json index 9a733c3..f220d18 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "license": "MIT", "dependencies": { "@stackone/expressions": "^0.16.0", - "@stackone/malachite": "^0.3.2", + "@stackone/malachite": "^0.4.0", "@tanstack/react-query": "^5.77.2" }, "peerDependencies": { diff --git a/src/modules/integration-picker/IntegrationPicker.tsx b/src/modules/integration-picker/IntegrationPicker.tsx index f37c1f5..60d27d2 100644 --- a/src/modules/integration-picker/IntegrationPicker.tsx +++ b/src/modules/integration-picker/IntegrationPicker.tsx @@ -48,6 +48,7 @@ export const IntegrationPicker: React.FC = ({ setSelectedIntegration, setFormData, handleConnect, + resetConnectionState, } = useIntegrationPicker({ token, baseUrl, @@ -56,13 +57,18 @@ export const IntegrationPicker: React.FC = ({ dashboardUrl, }); + const onBack = () => { + setSelectedIntegration(null); + resetConnectionState(); + }; + return ( setSelectedIntegration(null)} + showActions={!connectionState.loading && !connectionState.success} + onBack={accountData ? undefined : onBack} onNext={handleConnect} /> } @@ -70,12 +76,13 @@ export const IntegrationPicker: React.FC = ({ selectedIntegration && ( setSelectedIntegration(null)} + onBack={accountData ? undefined : onBack} guide={guide} /> ) } height={height} + padding="0" > {isHubLinkAccountReleaseEnabled && ( = ({ }; return ( - - {guide && } - {error && } - {error && {error.provider_response}} - - {fields.map((field) => { - const key = - typeof field.key === 'object' - ? JSON.stringify(field.key) - : String(field.key); - return ( -
- {(field.type === 'text' || - field.type === 'number' || - field.type === 'password') && ( - handleFieldChange(key, value)} - disabled={field.readOnly} - label={field.label} - tooltip={field.guide?.tooltip} - description={field.guide?.description} - type={field.type} - /> - )} + + + {guide && } + {error && } + {error && {error.provider_response}} + + {fields.map((field) => { + const key = + typeof field.key === 'object' + ? JSON.stringify(field.key) + : String(field.key); + return ( +
+ {(field.type === 'text' || + field.type === 'number' || + field.type === 'password') && ( + handleFieldChange(key, value)} + disabled={field.readOnly} + label={field.label} + tooltip={field.guide?.tooltip} + description={field.guide?.description} + type={field.type} + /> + )} - {field.type === 'text_area' && ( -