@integration-app/react 2.0.0-beta.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +17 -10
- package/DEVELOPMENT.md +0 -82
- package/bundle-tests/test-frameworks/README.md +0 -4
- package/bundle-tests/test-frameworks/cra5react17/package-lock.json +0 -30749
- package/bundle-tests/test-frameworks/cra5react17/package.json +0 -42
- package/bundle-tests/test-frameworks/cra5react17/patches/react-scripts+5.0.0.patch +0 -15
- package/bundle-tests/test-frameworks/cra5react17/public/favicon.ico +0 -0
- package/bundle-tests/test-frameworks/cra5react17/public/index.html +0 -43
- 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 +0 -25
- package/bundle-tests/test-frameworks/cra5react17/public/robots.txt +0 -3
- package/bundle-tests/test-frameworks/cra5react17/src/IntegrationsTest.jsx +0 -42
- package/bundle-tests/test-frameworks/cra5react17/src/index.tsx +0 -10
- package/bundle-tests/test-frameworks/cra5react17/src/react-app-env.d.ts +0 -1
- package/bundle-tests/test-frameworks/cra5react17/tsconfig.json +0 -26
- package/bundle-tests/test-frameworks/cra5react18/package-lock.json +0 -30328
- package/bundle-tests/test-frameworks/cra5react18/package.json +0 -38
- package/bundle-tests/test-frameworks/cra5react18/public/favicon.ico +0 -0
- package/bundle-tests/test-frameworks/cra5react18/public/index.html +0 -43
- 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 +0 -25
- package/bundle-tests/test-frameworks/cra5react18/public/robots.txt +0 -3
- package/bundle-tests/test-frameworks/cra5react18/src/IntegrationsTest.jsx +0 -42
- package/bundle-tests/test-frameworks/cra5react18/src/index.tsx +0 -10
- package/bundle-tests/test-frameworks/cra5react18/src/logo.svg +0 -1
- package/bundle-tests/test-frameworks/cra5react18/src/react-app-env.d.ts +0 -1
- package/bundle-tests/test-frameworks/cra5react18/tsconfig.json +0 -26
- package/bundle-tests/test-frameworks/next12react17/next.config.js +0 -6
- package/bundle-tests/test-frameworks/next12react17/package.json +0 -18
- package/bundle-tests/test-frameworks/next12react17/pages/_app.js +0 -5
- package/bundle-tests/test-frameworks/next12react17/pages/index.js +0 -5
- package/bundle-tests/test-frameworks/next12react17/src/IntegrationsTest.jsx +0 -25
- package/bundle-tests/test-frameworks/next12react18/next.config.js +0 -6
- package/bundle-tests/test-frameworks/next12react18/package.json +0 -18
- package/bundle-tests/test-frameworks/next12react18/pages/_app.js +0 -5
- package/bundle-tests/test-frameworks/next12react18/pages/index.js +0 -5
- package/bundle-tests/test-frameworks/next12react18/src/IntegrationsTest.jsx +0 -41
- package/bundle-tests/test-frameworks/next13react18/app/layout.tsx +0 -18
- package/bundle-tests/test-frameworks/next13react18/app/page.tsx +0 -5
- package/bundle-tests/test-frameworks/next13react18/next-env.d.ts +0 -5
- package/bundle-tests/test-frameworks/next13react18/next.config.js +0 -6
- package/bundle-tests/test-frameworks/next13react18/package.json +0 -22
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTest.tsx +0 -43
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestReact.tsx +0 -28
- package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestSdk.tsx +0 -19
- package/bundle-tests/test-frameworks/next13react18/tsconfig.json +0 -34
- package/bundle-tests/test-frameworks/parcel2react17/package.json +0 -21
- package/bundle-tests/test-frameworks/parcel2react17/src/IntegrationsTest.js +0 -41
- package/bundle-tests/test-frameworks/parcel2react17/src/index.html +0 -12
- package/bundle-tests/test-frameworks/parcel2react17/src/index.js +0 -12
- package/bundle-tests/test-frameworks/parcel2react18/package.json +0 -21
- package/bundle-tests/test-frameworks/parcel2react18/src/IntegrationsTest.js +0 -41
- package/bundle-tests/test-frameworks/parcel2react18/src/index.html +0 -12
- package/bundle-tests/test-frameworks/parcel2react18/src/index.js +0 -11
- package/bundle-tests/test-frameworks/vite3react17/index.html +0 -12
- package/bundle-tests/test-frameworks/vite3react17/package.json +0 -26
- package/bundle-tests/test-frameworks/vite3react17/src/IntegrationsTest.tsx +0 -41
- package/bundle-tests/test-frameworks/vite3react17/src/main.tsx +0 -10
- package/bundle-tests/test-frameworks/vite3react17/src/vite-env.d.ts +0 -1
- package/bundle-tests/test-frameworks/vite3react17/tsconfig.json +0 -25
- package/bundle-tests/test-frameworks/vite3react17/tsconfig.node.json +0 -10
- package/bundle-tests/test-frameworks/vite3react17/vite.config.ts +0 -7
- package/bundle-tests/test-frameworks/vite4react17/index.html +0 -12
- package/bundle-tests/test-frameworks/vite4react17/package.json +0 -26
- package/bundle-tests/test-frameworks/vite4react17/src/IntegrationsTest.tsx +0 -41
- package/bundle-tests/test-frameworks/vite4react17/src/main.tsx +0 -10
- package/bundle-tests/test-frameworks/vite4react17/src/vite-env.d.ts +0 -1
- package/bundle-tests/test-frameworks/vite4react17/tsconfig.json +0 -25
- package/bundle-tests/test-frameworks/vite4react17/tsconfig.node.json +0 -10
- package/bundle-tests/test-frameworks/vite4react17/vite.config.ts +0 -7
- package/bundle-tests/test-frameworks/vite4react18/index.html +0 -12
- package/bundle-tests/test-frameworks/vite4react18/package.json +0 -26
- package/bundle-tests/test-frameworks/vite4react18/src/IntegrationsTest.tsx +0 -41
- package/bundle-tests/test-frameworks/vite4react18/src/main.tsx +0 -11
- package/bundle-tests/test-frameworks/vite4react18/src/vite-env.d.ts +0 -1
- package/bundle-tests/test-frameworks/vite4react18/tsconfig.json +0 -25
- package/bundle-tests/test-frameworks/vite4react18/tsconfig.node.json +0 -10
- package/bundle-tests/test-frameworks/vite4react18/vite.config.ts +0 -7
- package/bundle-tests/test-package/package.json +0 -10
- package/bundle-tests/test-package/test-cjs.js +0 -11
- package/bundle-tests/test-package/test-esm.mjs +0 -11
- package/bundle-tests/test-package/test-umd.js +0 -25
- package/bundle-tests/test-package/test.sh +0 -29
- 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/_modules/README.txt +0 -1
- package/src/_modules/awesome-debounce-promise.ts +0 -8
- package/src/contexts/index.tsx +0 -4
- package/src/contexts/integration-app-context.tsx +0 -61
- package/src/hooks/actions/useAction.ts +0 -37
- package/src/hooks/actions/useActionInstance.ts +0 -60
- package/src/hooks/actions/useActionInstances.ts +0 -11
- package/src/hooks/actions/useActions.ts +0 -11
- package/src/hooks/app-data-schemas/useAppDataSchema.ts +0 -20
- package/src/hooks/app-data-schemas/useAppDataSchemaInstance.ts +0 -43
- package/src/hooks/app-data-schemas/useAppDataSchemaInstances.ts +0 -19
- package/src/hooks/app-data-schemas/useAppDataSchemas.ts +0 -11
- package/src/hooks/app-events/useAppEventSubscription.ts +0 -22
- package/src/hooks/app-events/useAppEventSubscriptions.ts +0 -19
- package/src/hooks/app-events/useAppEventType.ts +0 -20
- package/src/hooks/app-events/useAppEventTypes.ts +0 -11
- package/src/hooks/app-events/useAppEvents.ts +0 -11
- package/src/hooks/customers/useCustomer.ts +0 -19
- package/src/hooks/customers/useCustomers.ts +0 -11
- package/src/hooks/data-collections/useDataCollectionSpec.ts +0 -30
- package/src/hooks/data-form/index.tsx +0 -3
- package/src/hooks/data-links/useDataLinkTable.ts +0 -20
- package/src/hooks/data-links/useDataLinkTableInstance.ts +0 -39
- package/src/hooks/data-links/useDataLinkTableInstances.ts +0 -19
- package/src/hooks/data-links/useDataLinkTables.ts +0 -11
- package/src/hooks/data-sources/useDataSource.ts +0 -39
- package/src/hooks/data-sources/useDataSourceInstance.ts +0 -105
- package/src/hooks/data-sources/useDataSourceInstanceCollection.ts +0 -29
- package/src/hooks/data-sources/useDataSourceInstances.ts +0 -17
- package/src/hooks/data-sources/useDataSources.ts +0 -11
- package/src/hooks/external-events/useExternalEventSubscription.ts +0 -60
- package/src/hooks/external-events/useExternalEventSubscriptions.ts +0 -19
- package/src/hooks/field-mappings/useFieldMapping.ts +0 -39
- package/src/hooks/field-mappings/useFieldMappingInstance.ts +0 -56
- package/src/hooks/field-mappings/useFieldMappingInstances.ts +0 -19
- package/src/hooks/field-mappings/useFieldMappings.ts +0 -11
- package/src/hooks/flows/useFlow.ts +0 -35
- package/src/hooks/flows/useFlowInstance.ts +0 -79
- package/src/hooks/flows/useFlowInstances.ts +0 -11
- package/src/hooks/flows/useFlowRun.ts +0 -24
- package/src/hooks/flows/useFlowRuns.ts +0 -11
- package/src/hooks/flows/useFlows.ts +0 -11
- package/src/hooks/integrations/useConnection.ts +0 -21
- package/src/hooks/integrations/useConnections.ts +0 -12
- package/src/hooks/integrations/useConnectorSpec.ts +0 -16
- package/src/hooks/integrations/useIntegration.ts +0 -20
- package/src/hooks/integrations/useIntegrations.ts +0 -12
- package/src/hooks/scenarios/useScenario.tsx +0 -20
- package/src/hooks/scenarios/useScenarios.tsx +0 -11
- package/src/hooks/screens/useScreen.ts +0 -19
- package/src/hooks/useElement.tsx +0 -199
- package/src/hooks/useElements.tsx +0 -108
- package/src/hooks/useIntegrationAppSWR.tsx +0 -13
- package/src/hooks/useIntegrationElement.tsx +0 -19
- package/src/index.tsx +0 -70
- package/tsconfig.json +0 -40
- /package/dist/{index.module.d.ts → index.module.d.mts} +0 -0
@@ -1,42 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "cra",
|
3
|
-
"version": "0.1.0",
|
4
|
-
"private": true,
|
5
|
-
"dependencies": {
|
6
|
-
"@integration-app/react": "latest",
|
7
|
-
"@integration-app/sdk": "latest",
|
8
|
-
"@types/node": "^16.11.14",
|
9
|
-
"@types/react": "17.0.2",
|
10
|
-
"@types/react-dom": "17.0.2",
|
11
|
-
"react": "17.0.2",
|
12
|
-
"react-dom": "17.0.2",
|
13
|
-
"react-scripts": "5.0.0",
|
14
|
-
"typescript": "^4.4.5"
|
15
|
-
},
|
16
|
-
"scripts": {
|
17
|
-
"start": "react-scripts start",
|
18
|
-
"build": "react-scripts build",
|
19
|
-
"eject": "react-scripts eject",
|
20
|
-
"postinstall": "patch-package"
|
21
|
-
},
|
22
|
-
"eslintConfig": {
|
23
|
-
"extends": [
|
24
|
-
"react-app"
|
25
|
-
]
|
26
|
-
},
|
27
|
-
"browserslist": {
|
28
|
-
"production": [
|
29
|
-
">0.2%",
|
30
|
-
"not dead",
|
31
|
-
"not op_mini all"
|
32
|
-
],
|
33
|
-
"development": [
|
34
|
-
"last 1 chrome version",
|
35
|
-
"last 1 firefox version",
|
36
|
-
"last 1 safari version"
|
37
|
-
]
|
38
|
-
},
|
39
|
-
"devDependencies": {
|
40
|
-
"patch-package": "^8.0.0"
|
41
|
-
}
|
42
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
|
2
|
-
index 2b1b3bb..fd17155 100644
|
3
|
-
--- a/node_modules/react-scripts/config/webpack.config.js
|
4
|
-
+++ b/node_modules/react-scripts/config/webpack.config.js
|
5
|
-
@@ -318,6 +318,10 @@ module.exports = function (webpackEnv) {
|
6
|
-
.map(ext => `.${ext}`)
|
7
|
-
.filter(ext => useTypeScript || !ext.includes('ts')),
|
8
|
-
alias: {
|
9
|
-
+ // https://github.com/facebook/react/issues/20235
|
10
|
-
+ // https://github.com/facebook/create-react-app/issues/11769
|
11
|
-
+ "react/jsx-dev-runtime": "react/jsx-dev-runtime.js",
|
12
|
-
+ "react/jsx-runtime": "react/jsx-runtime.js",
|
13
|
-
// Support React Native Web
|
14
|
-
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
15
|
-
'react-native': 'react-native-web',
|
Binary file
|
@@ -1,43 +0,0 @@
|
|
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
|
@@ -1,25 +0,0 @@
|
|
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
|
-
}
|
@@ -1,42 +0,0 @@
|
|
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
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
/// <reference types="react-scripts" />
|
@@ -1,26 +0,0 @@
|
|
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
|
-
}
|