@integration-app/react 1.1.5 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/bundle-tests/test-frameworks/README.md +4 -0
- package/bundle-tests/test-frameworks/cra5react17/package-lock.json +30749 -0
- package/bundle-tests/test-frameworks/cra5react17/package.json +42 -0
- package/bundle-tests/test-frameworks/cra5react17/patches/react-scripts+5.0.0.patch +15 -0
- package/bundle-tests/test-frameworks/cra5react17/public/favicon.ico +0 -0
- package/bundle-tests/test-frameworks/cra5react17/public/index.html +43 -0
- package/bundle-tests/test-frameworks/cra5react17/public/logo192.png +0 -0
- package/bundle-tests/test-frameworks/cra5react17/public/logo512.png +0 -0
- package/bundle-tests/test-frameworks/cra5react17/public/manifest.json +25 -0
- package/bundle-tests/test-frameworks/cra5react17/public/robots.txt +3 -0
- package/bundle-tests/test-frameworks/cra5react17/src/IntegrationsTest.jsx +42 -0
- package/bundle-tests/test-frameworks/cra5react17/src/index.tsx +10 -0
- package/bundle-tests/test-frameworks/cra5react17/src/react-app-env.d.ts +1 -0
- package/bundle-tests/test-frameworks/cra5react17/tsconfig.json +26 -0
- package/bundle-tests/test-frameworks/cra5react18/package-lock.json +30328 -0
- package/bundle-tests/test-frameworks/cra5react18/package.json +38 -0
- package/bundle-tests/test-frameworks/cra5react18/public/favicon.ico +0 -0
- package/bundle-tests/test-frameworks/cra5react18/public/index.html +43 -0
- package/bundle-tests/test-frameworks/cra5react18/public/logo192.png +0 -0
- package/bundle-tests/test-frameworks/cra5react18/public/logo512.png +0 -0
- package/bundle-tests/test-frameworks/cra5react18/public/manifest.json +25 -0
- package/bundle-tests/test-frameworks/cra5react18/public/robots.txt +3 -0
- package/bundle-tests/test-frameworks/cra5react18/src/IntegrationsTest.jsx +42 -0
- package/bundle-tests/test-frameworks/cra5react18/src/index.tsx +10 -0
- package/bundle-tests/test-frameworks/cra5react18/src/logo.svg +1 -0
- package/bundle-tests/test-frameworks/cra5react18/src/react-app-env.d.ts +1 -0
- package/bundle-tests/test-frameworks/cra5react18/tsconfig.json +26 -0
- package/bundle-tests/test-frameworks/next12react17/next.config.js +6 -0
- package/bundle-tests/test-frameworks/next12react17/package.json +18 -0
- package/bundle-tests/test-frameworks/next12react17/pages/_app.js +5 -0
- package/bundle-tests/test-frameworks/next12react17/pages/index.js +5 -0
- package/bundle-tests/test-frameworks/next12react17/src/IntegrationsTest.jsx +25 -0
- package/bundle-tests/test-frameworks/next12react18/next.config.js +6 -0
- package/bundle-tests/test-frameworks/next12react18/package.json +18 -0
- package/bundle-tests/test-frameworks/next12react18/pages/_app.js +5 -0
- package/bundle-tests/test-frameworks/next12react18/pages/index.js +5 -0
- package/bundle-tests/test-frameworks/next12react18/src/IntegrationsTest.jsx +41 -0
- package/bundle-tests/test-frameworks/next13react18/app/layout.tsx +18 -0
- package/bundle-tests/test-frameworks/next13react18/app/page.tsx +5 -0
- package/bundle-tests/test-frameworks/next13react18/next-env.d.ts +5 -0
- package/bundle-tests/test-frameworks/next13react18/next.config.js +6 -0
- package/bundle-tests/test-frameworks/next13react18/package.json +22 -0
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTest.tsx +43 -0
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestReact.tsx +28 -0
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestSdk.tsx +19 -0
- package/bundle-tests/test-frameworks/next13react18/tsconfig.json +34 -0
- package/bundle-tests/test-frameworks/parcel2react17/package.json +21 -0
- package/bundle-tests/test-frameworks/parcel2react17/src/IntegrationsTest.js +41 -0
- package/bundle-tests/test-frameworks/parcel2react17/src/index.html +12 -0
- package/bundle-tests/test-frameworks/parcel2react17/src/index.js +12 -0
- package/bundle-tests/test-frameworks/parcel2react18/package.json +21 -0
- package/bundle-tests/test-frameworks/parcel2react18/src/IntegrationsTest.js +41 -0
- package/bundle-tests/test-frameworks/parcel2react18/src/index.html +12 -0
- package/bundle-tests/test-frameworks/parcel2react18/src/index.js +11 -0
- package/bundle-tests/test-frameworks/vite3react17/index.html +12 -0
- package/bundle-tests/test-frameworks/vite3react17/package.json +26 -0
- package/bundle-tests/test-frameworks/vite3react17/src/IntegrationsTest.tsx +41 -0
- package/bundle-tests/test-frameworks/vite3react17/src/main.tsx +10 -0
- package/bundle-tests/test-frameworks/vite3react17/src/vite-env.d.ts +1 -0
- package/bundle-tests/test-frameworks/vite3react17/tsconfig.json +25 -0
- package/bundle-tests/test-frameworks/vite3react17/tsconfig.node.json +10 -0
- package/bundle-tests/test-frameworks/vite3react17/vite.config.ts +7 -0
- package/bundle-tests/test-frameworks/vite4react17/index.html +12 -0
- package/bundle-tests/test-frameworks/vite4react17/package.json +26 -0
- package/bundle-tests/test-frameworks/vite4react17/src/IntegrationsTest.tsx +41 -0
- package/bundle-tests/test-frameworks/vite4react17/src/main.tsx +10 -0
- package/bundle-tests/test-frameworks/vite4react17/src/vite-env.d.ts +1 -0
- package/bundle-tests/test-frameworks/vite4react17/tsconfig.json +25 -0
- package/bundle-tests/test-frameworks/vite4react17/tsconfig.node.json +10 -0
- package/bundle-tests/test-frameworks/vite4react17/vite.config.ts +7 -0
- package/bundle-tests/test-frameworks/vite4react18/index.html +12 -0
- package/bundle-tests/test-frameworks/vite4react18/package.json +26 -0
- package/bundle-tests/test-frameworks/vite4react18/src/IntegrationsTest.tsx +41 -0
- package/bundle-tests/test-frameworks/vite4react18/src/main.tsx +11 -0
- package/bundle-tests/test-frameworks/vite4react18/src/vite-env.d.ts +1 -0
- package/bundle-tests/test-frameworks/vite4react18/tsconfig.json +25 -0
- package/bundle-tests/test-frameworks/vite4react18/tsconfig.node.json +10 -0
- package/bundle-tests/test-frameworks/vite4react18/vite.config.ts +7 -0
- package/bundle-tests/test-package/package.json +10 -0
- package/bundle-tests/test-package/test-cjs.js +11 -0
- package/bundle-tests/test-package/test-esm.mjs +11 -0
- package/bundle-tests/test-package/test-umd.js +25 -0
- package/bundle-tests/test-package/test.sh +30 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.module.d.ts +3 -3
- package/dist/index.module.mjs +2 -2
- package/dist/index.module.mjs.map +1 -1
- package/package.json +14 -13
- package/src/{actions → hooks/actions}/useAction.ts +1 -1
- package/src/{actions → hooks/actions}/useActionInstance.ts +1 -1
- package/src/{actions → hooks/actions}/useActionInstances.ts +1 -1
- package/src/{actions → hooks/actions}/useActions.ts +1 -1
- package/src/{app-data-schemas → hooks/app-data-schemas}/useAppDataSchema.ts +1 -1
- package/src/{app-data-schemas → hooks/app-data-schemas}/useAppDataSchemaInstance.ts +1 -1
- package/src/{app-data-schemas → hooks/app-data-schemas}/useAppDataSchemaInstances.ts +1 -1
- package/src/{app-data-schemas → hooks/app-data-schemas}/useAppDataSchemas.ts +1 -1
- package/src/{app-events → hooks/app-events}/useAppEventSubscription.ts +1 -1
- package/src/{app-events → hooks/app-events}/useAppEventSubscriptions.ts +1 -1
- package/src/{app-events → hooks/app-events}/useAppEventType.ts +1 -1
- package/src/{app-events → hooks/app-events}/useAppEventTypes.ts +1 -1
- package/src/{app-events → hooks/app-events}/useAppEvents.ts +1 -1
- package/src/{customers → hooks/customers}/useCustomer.ts +1 -1
- package/src/{customers → hooks/customers}/useCustomers.ts +1 -1
- package/src/{data-links → hooks/data-links}/useDataLinkTable.ts +1 -1
- package/src/{data-links → hooks/data-links}/useDataLinkTableInstance.ts +1 -1
- package/src/{data-links → hooks/data-links}/useDataLinkTableInstances.ts +1 -1
- package/src/{data-links → hooks/data-links}/useDataLinkTables.ts +1 -1
- package/src/{data-sources → hooks/data-sources}/useDataSource.ts +1 -1
- package/src/{data-sources → hooks/data-sources}/useDataSourceInstance.ts +1 -1
- package/src/{data-sources → hooks/data-sources}/useDataSourceInstanceCollection.ts +1 -1
- package/src/{data-sources → hooks/data-sources}/useDataSourceInstances.ts +1 -1
- package/src/{data-sources → hooks/data-sources}/useDataSources.ts +1 -1
- package/src/{external-events → hooks/external-events}/useExternalEventSubscription.ts +1 -1
- package/src/{external-events → hooks/external-events}/useExternalEventSubscriptions.ts +1 -1
- package/src/{field-mappings → hooks/field-mappings}/useFieldMapping.ts +1 -1
- package/src/{field-mappings → hooks/field-mappings}/useFieldMappingInstance.ts +1 -1
- package/src/{field-mappings → hooks/field-mappings}/useFieldMappingInstances.ts +1 -1
- package/src/{field-mappings → hooks/field-mappings}/useFieldMappings.ts +1 -1
- package/src/{flows → hooks/flows}/useFlow.ts +1 -1
- package/src/{flows → hooks/flows}/useFlowInstance.ts +6 -5
- package/src/{flows → hooks/flows}/useFlowInstances.ts +1 -1
- package/src/{flows → hooks/flows}/useFlowRun.ts +1 -1
- package/src/{flows → hooks/flows}/useFlowRuns.ts +1 -1
- package/src/{flows → hooks/flows}/useFlows.ts +1 -1
- package/src/{integrations → hooks/integrations}/useConnection.ts +1 -1
- package/src/{integrations → hooks/integrations}/useConnections.ts +1 -1
- package/src/{integrations → hooks/integrations}/useConnectorSpec.ts +1 -1
- package/src/{integrations → hooks/integrations}/useIntegration.ts +1 -1
- package/src/{integrations → hooks/integrations}/useIntegrations.ts +1 -1
- package/src/{scenarios → hooks/scenarios}/useScenario.tsx +1 -1
- package/src/{scenarios → hooks/scenarios}/useScenarios.tsx +1 -1
- package/src/{screens → hooks/screens}/useScreen.ts +1 -1
- package/src/index.tsx +45 -45
- package/dist/index.umd.d.ts +0 -625
- package/dist/index.umd.js +0 -799
- package/dist/index.umd.js.map +0 -1
- /package/src/{data-collections → hooks/data-collections}/useDataCollectionSpec.ts +0 -0
- /package/src/{data-form → hooks/data-form}/index.tsx +0 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"name": "cra5react18",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"dependencies": {
|
6
|
+
"@integration-app/react": "latest",
|
7
|
+
"@integration-app/sdk": "latest",
|
8
|
+
"@types/node": "^16.18.79",
|
9
|
+
"@types/react": "^18.2.55",
|
10
|
+
"@types/react-dom": "^18.2.19",
|
11
|
+
"react": "^18.2.0",
|
12
|
+
"react-dom": "^18.2.0",
|
13
|
+
"react-scripts": "5.0.1",
|
14
|
+
"typescript": "^4.9.5"
|
15
|
+
},
|
16
|
+
"scripts": {
|
17
|
+
"start": "react-scripts start",
|
18
|
+
"build": "react-scripts build",
|
19
|
+
"eject": "react-scripts eject"
|
20
|
+
},
|
21
|
+
"eslintConfig": {
|
22
|
+
"extends": [
|
23
|
+
"react-app"
|
24
|
+
]
|
25
|
+
},
|
26
|
+
"browserslist": {
|
27
|
+
"production": [
|
28
|
+
">0.2%",
|
29
|
+
"not dead",
|
30
|
+
"not op_mini all"
|
31
|
+
],
|
32
|
+
"development": [
|
33
|
+
"last 1 chrome version",
|
34
|
+
"last 1 firefox version",
|
35
|
+
"last 1 safari version"
|
36
|
+
]
|
37
|
+
}
|
38
|
+
}
|
Binary file
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<meta name="theme-color" content="#000000" />
|
8
|
+
<meta
|
9
|
+
name="description"
|
10
|
+
content="Web site created using create-react-app"
|
11
|
+
/>
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
13
|
+
<!--
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
16
|
+
-->
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
18
|
+
<!--
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
22
|
+
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
26
|
+
-->
|
27
|
+
<title>React App</title>
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
31
|
+
<div id="root"></div>
|
32
|
+
<!--
|
33
|
+
This HTML file is a template.
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
35
|
+
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
38
|
+
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
41
|
+
-->
|
42
|
+
</body>
|
43
|
+
</html>
|
Binary file
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"short_name": "React App",
|
3
|
+
"name": "Create React App Sample",
|
4
|
+
"icons": [
|
5
|
+
{
|
6
|
+
"src": "favicon.ico",
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
8
|
+
"type": "image/x-icon"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"src": "logo192.png",
|
12
|
+
"type": "image/png",
|
13
|
+
"sizes": "192x192"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"src": "logo512.png",
|
17
|
+
"type": "image/png",
|
18
|
+
"sizes": "512x512"
|
19
|
+
}
|
20
|
+
],
|
21
|
+
"start_url": ".",
|
22
|
+
"display": "standalone",
|
23
|
+
"theme_color": "#000000",
|
24
|
+
"background_color": "#ffffff"
|
25
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import {
|
2
|
+
IntegrationAppProvider,
|
3
|
+
useIntegrations,
|
4
|
+
useActionInstance,
|
5
|
+
} from '@integration-app/react'
|
6
|
+
import { IntegrationAppClient } from '@integration-app/sdk'
|
7
|
+
|
8
|
+
const apiUri = './local-api/'
|
9
|
+
const token =
|
10
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
11
|
+
|
12
|
+
export function IntegrationsTest() {
|
13
|
+
return (
|
14
|
+
<IntegrationAppProvider token={token} apiUri={apiUri}>
|
15
|
+
<IntegrationsTestReact />
|
16
|
+
<IntegrationsTestSdk />
|
17
|
+
</IntegrationAppProvider>
|
18
|
+
)
|
19
|
+
}
|
20
|
+
|
21
|
+
function IntegrationsTestReact() {
|
22
|
+
try {
|
23
|
+
useIntegrations()
|
24
|
+
useActionInstance('some-action-instance-id')
|
25
|
+
} catch (e) {
|
26
|
+
throw new Error('@integration-app/react error')
|
27
|
+
}
|
28
|
+
return <>Integrations</>
|
29
|
+
}
|
30
|
+
|
31
|
+
function IntegrationsTestSdk() {
|
32
|
+
try {
|
33
|
+
const client = new IntegrationAppClient({ token: token })
|
34
|
+
void client
|
35
|
+
.get('/integrations')
|
36
|
+
.then(() => undefined)
|
37
|
+
.catch(() => undefined)
|
38
|
+
} catch (e) {
|
39
|
+
throw new Error('@integration-app/sdk error')
|
40
|
+
}
|
41
|
+
return <>SDK</>
|
42
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import ReactDOM from 'react-dom/client'
|
3
|
+
import { IntegrationsTest } from './IntegrationsTest'
|
4
|
+
|
5
|
+
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
|
6
|
+
root.render(
|
7
|
+
<React.StrictMode>
|
8
|
+
<IntegrationsTest />
|
9
|
+
</React.StrictMode>,
|
10
|
+
)
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
/// <reference types="react-scripts" />
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "es5",
|
4
|
+
"lib": [
|
5
|
+
"dom",
|
6
|
+
"dom.iterable",
|
7
|
+
"esnext"
|
8
|
+
],
|
9
|
+
"allowJs": true,
|
10
|
+
"skipLibCheck": true,
|
11
|
+
"esModuleInterop": true,
|
12
|
+
"allowSyntheticDefaultImports": true,
|
13
|
+
"strict": true,
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
16
|
+
"module": "esnext",
|
17
|
+
"moduleResolution": "node",
|
18
|
+
"resolveJsonModule": true,
|
19
|
+
"isolatedModules": true,
|
20
|
+
"noEmit": true,
|
21
|
+
"jsx": "react-jsx"
|
22
|
+
},
|
23
|
+
"include": [
|
24
|
+
"src"
|
25
|
+
]
|
26
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"name": "next12react17",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"scripts": {
|
6
|
+
"dev": "next dev",
|
7
|
+
"build": "next build",
|
8
|
+
"start": "next start",
|
9
|
+
"lint": "next lint"
|
10
|
+
},
|
11
|
+
"dependencies": {
|
12
|
+
"@integration-app/react": "latest",
|
13
|
+
"@integration-app/sdk": "latest",
|
14
|
+
"next": "^12.1.2",
|
15
|
+
"react": "^17.0.2",
|
16
|
+
"react-dom": "^17.0.2"
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import {
|
2
|
+
IntegrationAppProvider,
|
3
|
+
useIntegrations,
|
4
|
+
useActionInstance,
|
5
|
+
} from '@integration-app/react/17'
|
6
|
+
const token =
|
7
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
8
|
+
|
9
|
+
export function IntegrationTest() {
|
10
|
+
return (
|
11
|
+
<IntegrationAppProvider token={token}>
|
12
|
+
<Integrations />
|
13
|
+
</IntegrationAppProvider>
|
14
|
+
)
|
15
|
+
}
|
16
|
+
|
17
|
+
function Integrations() {
|
18
|
+
try {
|
19
|
+
useIntegrations()
|
20
|
+
useActionInstance('some-action-instance-id')
|
21
|
+
} catch (e) {
|
22
|
+
throw new Error('@integration-app/react error')
|
23
|
+
}
|
24
|
+
return <>Integrations</>
|
25
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"name": "next12react17",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"scripts": {
|
6
|
+
"dev": "next dev",
|
7
|
+
"build": "next build",
|
8
|
+
"start": "next start",
|
9
|
+
"lint": "next lint"
|
10
|
+
},
|
11
|
+
"dependencies": {
|
12
|
+
"@integration-app/react": "latest",
|
13
|
+
"@integration-app/sdk": "latest",
|
14
|
+
"next": "^12.3.1",
|
15
|
+
"react": "^18.2.0",
|
16
|
+
"react-dom": "^18.2.0"
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import {
|
2
|
+
IntegrationAppProvider,
|
3
|
+
useIntegrations,
|
4
|
+
useActionInstance,
|
5
|
+
} from '@integration-app/react'
|
6
|
+
import { IntegrationAppClient } from '@integration-app/sdk'
|
7
|
+
|
8
|
+
const token =
|
9
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
10
|
+
|
11
|
+
export function IntegrationsTest() {
|
12
|
+
return (
|
13
|
+
<IntegrationAppProvider token={token}>
|
14
|
+
<IntegrationAppReact />
|
15
|
+
<IntegrationAppSDK />
|
16
|
+
</IntegrationAppProvider>
|
17
|
+
)
|
18
|
+
}
|
19
|
+
|
20
|
+
function IntegrationAppReact() {
|
21
|
+
try {
|
22
|
+
useIntegrations()
|
23
|
+
useActionInstance('some-action-instance-id')
|
24
|
+
} catch (e) {
|
25
|
+
throw new Error('@integration-app/react error')
|
26
|
+
}
|
27
|
+
return <>Integrations</>
|
28
|
+
}
|
29
|
+
|
30
|
+
function IntegrationAppSDK() {
|
31
|
+
try {
|
32
|
+
const client = new IntegrationAppClient({ token: token })
|
33
|
+
void client
|
34
|
+
.get('/integrations')
|
35
|
+
.then(() => undefined)
|
36
|
+
.catch(() => undefined)
|
37
|
+
} catch (e) {
|
38
|
+
throw new Error('@integration-app/sdk error')
|
39
|
+
}
|
40
|
+
return <>SDK</>
|
41
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { Metadata } from 'next'
|
2
|
+
|
3
|
+
export const metadata: Metadata = {
|
4
|
+
title: 'Create Next App',
|
5
|
+
description: 'Generated by create next app',
|
6
|
+
}
|
7
|
+
|
8
|
+
export default function RootLayout({
|
9
|
+
children,
|
10
|
+
}: {
|
11
|
+
children: React.ReactNode
|
12
|
+
}) {
|
13
|
+
return (
|
14
|
+
<html lang='en'>
|
15
|
+
<body>{children}</body>
|
16
|
+
</html>
|
17
|
+
)
|
18
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name": "next13ts",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"scripts": {
|
6
|
+
"dev": "next dev",
|
7
|
+
"build": "next build",
|
8
|
+
"start": "next start",
|
9
|
+
"lint": "next lint"
|
10
|
+
},
|
11
|
+
"dependencies": {
|
12
|
+
"@integration-app/react": "latest",
|
13
|
+
"@integration-app/sdk": "latest",
|
14
|
+
"next": "13.5.6",
|
15
|
+
"react": "^18",
|
16
|
+
"react-dom": "^18"
|
17
|
+
},
|
18
|
+
"devDependencies": {
|
19
|
+
"@types/react": "^18",
|
20
|
+
"typescript": "^5.2.2"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
import {
|
4
|
+
IntegrationAppProvider,
|
5
|
+
useIntegrations,
|
6
|
+
useActionInstance,
|
7
|
+
} from '@integration-app/react'
|
8
|
+
import { IntegrationAppClient } from '@integration-app/sdk'
|
9
|
+
|
10
|
+
const token =
|
11
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
12
|
+
|
13
|
+
export function IntegrationsTest() {
|
14
|
+
return (
|
15
|
+
<IntegrationAppProvider token={token}>
|
16
|
+
<IntegrationsTestReact />
|
17
|
+
<IntegrationsTestSdk />
|
18
|
+
</IntegrationAppProvider>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
|
22
|
+
function IntegrationsTestReact() {
|
23
|
+
try {
|
24
|
+
useIntegrations()
|
25
|
+
useActionInstance('some-action-instance-id')
|
26
|
+
} catch (e) {
|
27
|
+
throw new Error('@integration-app/react error')
|
28
|
+
}
|
29
|
+
return <>Integrations</>
|
30
|
+
}
|
31
|
+
|
32
|
+
function IntegrationsTestSdk() {
|
33
|
+
try {
|
34
|
+
const client = new IntegrationAppClient({ token: token })
|
35
|
+
void client
|
36
|
+
.get('/integrations')
|
37
|
+
.then(() => undefined)
|
38
|
+
.catch(() => undefined)
|
39
|
+
} catch (e) {
|
40
|
+
throw new Error('@integration-app/sdk error')
|
41
|
+
}
|
42
|
+
return <>SDK</>
|
43
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
import {
|
4
|
+
IntegrationAppProvider,
|
5
|
+
useIntegrations,
|
6
|
+
useActionInstance,
|
7
|
+
} from '@integration-app/react'
|
8
|
+
|
9
|
+
const token =
|
10
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
11
|
+
|
12
|
+
export function IntegrationsTestReact() {
|
13
|
+
return (
|
14
|
+
<IntegrationAppProvider token={token}>
|
15
|
+
<IntegrationAppTests />
|
16
|
+
</IntegrationAppProvider>
|
17
|
+
)
|
18
|
+
}
|
19
|
+
|
20
|
+
function IntegrationAppTests() {
|
21
|
+
try {
|
22
|
+
useIntegrations()
|
23
|
+
useActionInstance('some-action-instance-id')
|
24
|
+
} catch (e) {
|
25
|
+
throw new Error('@integration-app/react error')
|
26
|
+
}
|
27
|
+
return <>Integrations</>
|
28
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { IntegrationAppClient } from '@integration-app/sdk'
|
2
|
+
import { Simulate } from 'react-dom/test-utils'
|
3
|
+
import error = Simulate.error
|
4
|
+
|
5
|
+
const token =
|
6
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
7
|
+
|
8
|
+
export async function IntegrationsTestSdk() {
|
9
|
+
try {
|
10
|
+
const client = new IntegrationAppClient({ token: token })
|
11
|
+
void client
|
12
|
+
.get('/integrations')
|
13
|
+
.then(() => undefined)
|
14
|
+
.catch(() => undefined)
|
15
|
+
} catch (e) {
|
16
|
+
throw new Error('@integration-app/sdk error')
|
17
|
+
}
|
18
|
+
return <>SDK</>
|
19
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"lib": [
|
4
|
+
"dom",
|
5
|
+
"dom.iterable",
|
6
|
+
"esnext"
|
7
|
+
],
|
8
|
+
"allowJs": true,
|
9
|
+
"skipLibCheck": true,
|
10
|
+
"strict": false,
|
11
|
+
"noEmit": true,
|
12
|
+
"incremental": true,
|
13
|
+
"esModuleInterop": true,
|
14
|
+
"module": "esnext",
|
15
|
+
"moduleResolution": "node",
|
16
|
+
"resolveJsonModule": true,
|
17
|
+
"isolatedModules": true,
|
18
|
+
"jsx": "preserve",
|
19
|
+
"plugins": [
|
20
|
+
{
|
21
|
+
"name": "next"
|
22
|
+
}
|
23
|
+
]
|
24
|
+
},
|
25
|
+
"include": [
|
26
|
+
"next-env.d.ts",
|
27
|
+
".next/types/**/*.ts",
|
28
|
+
"**/*.ts",
|
29
|
+
"**/*.tsx"
|
30
|
+
],
|
31
|
+
"exclude": [
|
32
|
+
"node_modules"
|
33
|
+
]
|
34
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"name": "parcel",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"source": "src/index.html",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "parcel ./src/index.html",
|
8
|
+
"build": "parcel build ./src/index.html --public-url ./"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"@integration-app/react": "latest",
|
14
|
+
"@integration-app/sdk": "latest",
|
15
|
+
"react": "^17",
|
16
|
+
"react-dom": "^17"
|
17
|
+
},
|
18
|
+
"devDependencies": {
|
19
|
+
"parcel": "^2"
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import {
|
2
|
+
IntegrationAppProvider,
|
3
|
+
useIntegrations,
|
4
|
+
useActionInstance,
|
5
|
+
} from '@integration-app/react'
|
6
|
+
import { IntegrationAppClient } from '@integration-app/sdk'
|
7
|
+
|
8
|
+
const token =
|
9
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzEyMyIsIm5hbWUiOiIxMjMxMjMxMjMiLCJpc3MiOiJlYjc3ZjgzMS0zNjBjLTQ0YmMtOWQzYi0zNDJjYTY5MDU4NGEiLCJleHAiOjE3MjkwODUwNjh9.rDu2Mthgc-j4xVjIfW0Ox_eO50zJKJDUO6a4LnqDH20'
|
10
|
+
|
11
|
+
export function IntegrationsTest() {
|
12
|
+
return (
|
13
|
+
<IntegrationAppProvider token={token}>
|
14
|
+
<IntegrationsTestReact />
|
15
|
+
<IntegrationsTestSdk />
|
16
|
+
</IntegrationAppProvider>
|
17
|
+
)
|
18
|
+
}
|
19
|
+
|
20
|
+
function IntegrationsTestReact() {
|
21
|
+
try {
|
22
|
+
useIntegrations()
|
23
|
+
useActionInstance('some-action-instance-id')
|
24
|
+
} catch (e) {
|
25
|
+
throw new Error('@integration-app/react error')
|
26
|
+
}
|
27
|
+
return <>Integrations</>
|
28
|
+
}
|
29
|
+
|
30
|
+
function IntegrationsTestSdk() {
|
31
|
+
try {
|
32
|
+
const client = new IntegrationAppClient({ token: token })
|
33
|
+
void client
|
34
|
+
.get('/integrations')
|
35
|
+
.then(() => undefined)
|
36
|
+
.catch(() => undefined)
|
37
|
+
} catch (e) {
|
38
|
+
throw new Error('@integration-app/sdk error')
|
39
|
+
}
|
40
|
+
return <>SDK</>
|
41
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import ReactDOM from 'react-dom'
|
3
|
+
import { IntegrationsTest } from './IntegrationsTest'
|
4
|
+
|
5
|
+
const container = document.getElementById('app')
|
6
|
+
|
7
|
+
ReactDOM.render(
|
8
|
+
<React.StrictMode>
|
9
|
+
<IntegrationsTest />
|
10
|
+
</React.StrictMode>,
|
11
|
+
container,
|
12
|
+
)
|