@shipfox/client-integrations 14.0.1 → 16.0.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/application/complete-integration-callback.d.ts +2 -2
- package/dist/components/integration-gallery.stories.d.ts +1 -0
- package/dist/components/integration-gallery.stories.d.ts.map +1 -1
- package/dist/components/integration-gallery.stories.js +28 -0
- package/dist/components/integration-gallery.stories.js.map +1 -1
- package/dist/components/integration-usage-modal.d.ts +1 -1
- package/dist/components/integration-usage-modal.d.ts.map +1 -1
- package/dist/components/integration-usage-modal.js +2 -1
- package/dist/components/integration-usage-modal.js.map +1 -1
- package/dist/components/webhook/webhook-modals.stories.d.ts.map +1 -1
- package/dist/feature.d.ts +8 -8
- package/dist/feature.d.ts.map +1 -1
- package/dist/hooks/api/integrations.d.ts +4 -4
- package/dist/hooks/api/integrations.d.ts.map +1 -1
- package/dist/hooks/api/webhook-connections.d.ts +1 -1
- package/dist/hooks/api/webhook-connections.d.ts.map +1 -1
- package/dist/routes/gitea.d.ts.map +1 -1
- package/dist/routes/github-callback.d.ts.map +1 -1
- package/dist/routes/github.d.ts.map +1 -1
- package/dist/routes/integrations-settings.d.ts.map +1 -1
- package/dist/routes/integrations.d.ts.map +1 -1
- package/dist/routes/jira-callback.d.ts.map +1 -1
- package/dist/routes/jira.d.ts.map +1 -1
- package/dist/routes/linear-callback.d.ts.map +1 -1
- package/dist/routes/linear.d.ts.map +1 -1
- package/dist/routes/sentry-callback.d.ts.map +1 -1
- package/dist/routes/sentry.d.ts.map +1 -1
- package/dist/routes/slack-callback.d.ts.map +1 -1
- package/dist/routes/slack.d.ts.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/components/integration-gallery.stories.tsx +20 -0
- package/src/components/integration-gallery.test.tsx +21 -0
- package/src/components/integration-usage-modal.tsx +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-integrations",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "16.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@swc/helpers": "^0.5.17",
|
|
29
29
|
"@tanstack/react-form": "^1.32.0",
|
|
30
|
-
"@shipfox/api-integration-core-dto": "12.
|
|
31
|
-
"@shipfox/api-integration-gitea-dto": "12.
|
|
32
|
-
"@shipfox/api-integration-github-dto": "12.
|
|
33
|
-
"@shipfox/api-integration-
|
|
34
|
-
"@shipfox/api-integration-
|
|
35
|
-
"@shipfox/api-integration-slack-dto": "12.
|
|
36
|
-
"@shipfox/api-integration-
|
|
37
|
-
"@shipfox/api-integration-
|
|
30
|
+
"@shipfox/api-integration-core-dto": "12.2.0",
|
|
31
|
+
"@shipfox/api-integration-gitea-dto": "12.2.0",
|
|
32
|
+
"@shipfox/api-integration-github-dto": "12.2.0",
|
|
33
|
+
"@shipfox/api-integration-linear-dto": "12.2.0",
|
|
34
|
+
"@shipfox/api-integration-jira-dto": "12.2.0",
|
|
35
|
+
"@shipfox/api-integration-slack-dto": "12.2.0",
|
|
36
|
+
"@shipfox/api-integration-webhook-dto": "12.2.0",
|
|
37
|
+
"@shipfox/api-integration-sentry-dto": "12.2.0",
|
|
38
38
|
"@shipfox/client-api": "6.0.1",
|
|
39
|
-
"@shipfox/client-auth": "
|
|
40
|
-
"@shipfox/client-shell": "
|
|
41
|
-
"@shipfox/client-ui": "
|
|
42
|
-
"@shipfox/
|
|
43
|
-
"@shipfox/
|
|
39
|
+
"@shipfox/client-auth": "16.0.0",
|
|
40
|
+
"@shipfox/client-shell": "16.0.0",
|
|
41
|
+
"@shipfox/client-ui": "16.0.0",
|
|
42
|
+
"@shipfox/react-ui": "1.1.0",
|
|
43
|
+
"@shipfox/integration-icons": "0.3.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@tanstack/react-query": "^5.101.0",
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from '@tanstack/react-router';
|
|
18
18
|
import {createStore, Provider as JotaiProvider} from 'jotai';
|
|
19
19
|
import {useMemo} from 'react';
|
|
20
|
+
import {expect, screen, userEvent, within} from 'storybook/test';
|
|
20
21
|
import {IntegrationGallery} from './integration-gallery.js';
|
|
21
22
|
|
|
22
23
|
const WORKSPACE_ID = '11111111-1111-4111-8111-111111111111';
|
|
@@ -148,6 +149,25 @@ export const LongNames: Story = {
|
|
|
148
149
|
args: {scenario: 'long-names'},
|
|
149
150
|
};
|
|
150
151
|
|
|
152
|
+
export const UsageModalCloseRestoresInteraction: Story = {
|
|
153
|
+
play: async ({canvasElement}) => {
|
|
154
|
+
const user = userEvent.setup();
|
|
155
|
+
const canvas = within(canvasElement);
|
|
156
|
+
const actionsButton = await canvas.findByRole('button', {
|
|
157
|
+
name: 'Open acme-corp integration actions',
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
await user.click(actionsButton);
|
|
161
|
+
await user.click(await screen.findByRole('menuitem', {name: 'Use this integration'}));
|
|
162
|
+
await screen.findByRole('dialog', {name: 'Use acme-corp'});
|
|
163
|
+
await user.click(await screen.findByRole('button', {name: 'Done'}));
|
|
164
|
+
expect(screen.queryByRole('dialog', {name: 'Use acme-corp'})).not.toBeInTheDocument();
|
|
165
|
+
expect(document.body.style.pointerEvents).not.toBe('none');
|
|
166
|
+
await user.click(actionsButton);
|
|
167
|
+
await screen.findByRole('menuitem', {name: 'Use this integration'});
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
|
|
151
171
|
function fetchForScenario(scenario: Scenario): typeof fetch {
|
|
152
172
|
return (input, init) => {
|
|
153
173
|
const url = requestUrl(input);
|
|
@@ -367,6 +367,27 @@ describe('IntegrationGallery — installed section', () => {
|
|
|
367
367
|
expect(screen.getByText(webhookConnectionDto.inbound_url)).toBeVisible();
|
|
368
368
|
});
|
|
369
369
|
|
|
370
|
+
test('restores page interactivity after closing the usage modal', async () => {
|
|
371
|
+
renderGallery({}, {connections: [webhookConnection]});
|
|
372
|
+
|
|
373
|
+
await openActions('Open Stripe production integration actions');
|
|
374
|
+
expect(document.body.style.pointerEvents).toBe('none');
|
|
375
|
+
fireEvent.click(screen.getByRole('menuitem', {name: 'Use this integration'}));
|
|
376
|
+
expect(await screen.findByRole('dialog', {name: 'Use Stripe production'})).toBeVisible();
|
|
377
|
+
expect(document.body.style.pointerEvents).toBe('none');
|
|
378
|
+
|
|
379
|
+
const usageDialog = screen.getByRole('dialog', {name: 'Use Stripe production'});
|
|
380
|
+
fireEvent.click(within(usageDialog).getByRole('button', {name: 'Done'}));
|
|
381
|
+
|
|
382
|
+
await waitFor(() => {
|
|
383
|
+
expect(screen.queryByRole('dialog', {name: 'Use Stripe production'})).not.toBeInTheDocument();
|
|
384
|
+
expect(document.body).not.toHaveStyle({pointerEvents: 'none'});
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
await openActions('Open Stripe production integration actions');
|
|
388
|
+
expect(screen.getByRole('menuitem', {name: 'Use this integration'})).toBeVisible();
|
|
389
|
+
});
|
|
390
|
+
|
|
370
391
|
test('opens the usage modal with a GitHub event selector', async () => {
|
|
371
392
|
renderGallery({}, {connections: [githubConnection]});
|
|
372
393
|
|
|
@@ -71,8 +71,10 @@ export function IntegrationUsageModal({
|
|
|
71
71
|
);
|
|
72
72
|
const title = connection ? `Use ${connection.displayName}` : 'Use integration';
|
|
73
73
|
|
|
74
|
+
if (!open || connection === null) return null;
|
|
75
|
+
|
|
74
76
|
return (
|
|
75
|
-
<Modal open={open
|
|
77
|
+
<Modal open={open} onOpenChange={onOpenChange}>
|
|
76
78
|
<ModalContent aria-describedby={undefined} className="max-h-[calc(100vh-32px)] max-w-[640px]">
|
|
77
79
|
<ModalTitle className="sr-only">{title}</ModalTitle>
|
|
78
80
|
<ModalHeader>
|