@integration-app/react 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +17 -9
- 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 -30
- 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
package/package.json
CHANGED
@@ -1,22 +1,30 @@
|
|
1
1
|
{
|
2
2
|
"name": "@integration-app/react",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.2",
|
4
4
|
"description": "",
|
5
5
|
"author": "Integration.app",
|
6
6
|
"source": "src/index.ts",
|
7
|
+
"main": "dist/index.js",
|
8
|
+
"module": "dist/index.module.mjs",
|
7
9
|
"exports": {
|
8
|
-
"
|
9
|
-
|
10
|
-
|
10
|
+
"import": {
|
11
|
+
"types": "./dist/index.module.d.mts",
|
12
|
+
"default": "./dist/index.module.mjs"
|
13
|
+
},
|
14
|
+
"require": {
|
15
|
+
"types": "./dist/index.d.ts",
|
16
|
+
"default": "./dist/index.js"
|
17
|
+
}
|
11
18
|
},
|
12
|
-
"types": "
|
13
|
-
"
|
14
|
-
|
19
|
+
"types": "dist/index.d.ts",
|
20
|
+
"files": [
|
21
|
+
"dist"
|
22
|
+
],
|
15
23
|
"scripts": {
|
16
24
|
"build": "npm run prep:dev && npm run build:bundle && npm run build:dts",
|
17
25
|
"build:publish": "npm run prep:publish && npm run build:bundle && npm run build:dts",
|
18
26
|
"build:bundle": "rollup -c rollup.config.mjs",
|
19
|
-
"build:dts": "rollup -c rollup.dts.config.mjs",
|
27
|
+
"build:dts": "rollup -c rollup.dts.config.mjs && rimraf ./dist/dts",
|
20
28
|
"clean": "rimraf ./dist",
|
21
29
|
"docs": "typedoc --tsconfig tsconfig.json --plugin typedoc-plugin-missing-exports",
|
22
30
|
"docs:dev": "typedoc --tsconfig tsconfig.json --plugin typedoc-plugin-missing-exports --watch",
|
@@ -35,7 +43,7 @@
|
|
35
43
|
"lint": "npx publint"
|
36
44
|
},
|
37
45
|
"dependencies": {
|
38
|
-
"@integration-app/sdk": "^1.3.
|
46
|
+
"@integration-app/sdk": "^1.3.3",
|
39
47
|
"awesome-debounce-promise": "^2.1.0",
|
40
48
|
"query-string": "^7.1.1",
|
41
49
|
"swr": "^2.2.0"
|
package/DEVELOPMENT.md
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
## Releasing Package
|
2
|
-
|
3
|
-
To release a new version of a package (@integration-app/sdk, @integration-app/ui, @integration-app/react), do the following:
|
4
|
-
|
5
|
-
* Go to the package and type `npm version -- patch` (or `npm version -- minor` or `npm version -- major`) to bump the version.
|
6
|
-
* Create a PR with the changes.
|
7
|
-
* Merge the PR.
|
8
|
-
* Run a Github Action to publish a package.
|
9
|
-
|
10
|
-
# Rollup Configuration
|
11
|
-
|
12
|
-
To see the complete configuration, refer to the `rollup.config.mjs` and `rollup.dts.config.mjs` files. Although these files are self-explanatory, here's some additional information:
|
13
|
-
|
14
|
-
In `rollup.config.mjs`, we set `{external: [/node_modules/]}` to exclude our dependencies from being bundled.
|
15
|
-
|
16
|
-
## Bundle and DTS File Generation
|
17
|
-
|
18
|
-
We encountered issues with `rollup-plugin-dts` generating incorrect DTS files when used in the same configuration as `@rollup/plugin-typescript`. To resolve this, we use two Rollup configurations:
|
19
|
-
- `rollup.config.mjs` for bundle generation
|
20
|
-
- `rollup.dts.config.mjs` for DTS file generation.
|
21
|
-
|
22
|
-
## Externals
|
23
|
-
|
24
|
-
We set external dependencies in `rollup.config.mjs`:
|
25
|
-
- `{external: [/node_modules/]}` to exclude all `node_modules`.
|
26
|
-
- `@integration-app/sdk` to prevent Rollup from bundling the `@integration-app/sdk` package during local development, when it is used via a symlink to the SDK in the root folder.
|
27
|
-
- `react` and `react/jsx-runtime` are excluded to avoid unresolved dependency errors, as React is a peer dependency.
|
28
|
-
|
29
|
-
## Bundle and DTS File Generation Workflow
|
30
|
-
|
31
|
-
When using `rollup-plugin-dts` and `@rollup/plugin-typescript` in the same configuration, we experienced issues with generating incorrect DTS files. To solve this, we use two Rollup configurations:
|
32
|
-
- `rollup.config.mjs` for generating bundles
|
33
|
-
- `rollup.dts.config.mjs` for generating DTS files.
|
34
|
-
|
35
|
-
### Build
|
36
|
-
|
37
|
-
For local build, the following steps are taken:
|
38
|
-
|
39
|
-
- Clean the `/dist` folder.
|
40
|
-
- Install local `@integration-app/sdk` pointed to `sdk` folder
|
41
|
-
- Remove `react` and `react-dom` packages from `node_modules` folder
|
42
|
-
- We should do it to allow out package work in `console`, `engine` and other local projects
|
43
|
-
- Rollup with `rollup.config.mjs` configuration generates bundle files and basic DTS files, which are placed in the `dist/dts` folder.
|
44
|
-
- Rollup with `rollup.dts.config.mjs` configuration uses the basic DTS files to generate `*.d.ts` files for each bundle.
|
45
|
-
|
46
|
-
### Development
|
47
|
-
|
48
|
-
During development, the following steps are taken:
|
49
|
-
|
50
|
-
- Run `build` to generate bundle and DTS files.
|
51
|
-
- If not, Rollup with `rollup.dts.config.mjs` in watch mode fails due to missing DTS files (race condition).
|
52
|
-
- Concurrently run two Rollup processes **in watch mode**:
|
53
|
-
- Rollup with `rollup.config.mjs` configuration to generate bundle files and basic DTS files.
|
54
|
-
- Rollup with `rollup.dts.config.mjs` configuration to generate DTS files for each bundle.
|
55
|
-
|
56
|
-
### Publish via GitHub
|
57
|
-
|
58
|
-
During publishing via GitHub, the following steps are taken:
|
59
|
-
|
60
|
-
- Clean the `/dist` folder.
|
61
|
-
- Install `@integration-app/sdk@latest` package
|
62
|
-
- Rollup with `rollup.config.mjs` configuration generates bundle files and basic DTS files, which are placed in the `dist/dts` folder.
|
63
|
-
- Rollup with `rollup.dts.config.mjs` configuration uses the basic DTS files to generate `*.d.ts` files for each bundle.
|
64
|
-
|
65
|
-
The `build:publish` command is used in GitHub Actions to ensure that the package uses the latest `@integration-app/sdk` package.
|
66
|
-
|
67
|
-
# Package.json exports
|
68
|
-
|
69
|
-
```json5
|
70
|
-
{
|
71
|
-
"exports": {
|
72
|
-
"types": "./dist/index.d.ts", // TypeScript typings for NodeNext modules
|
73
|
-
"require": "./dist/index.js", // used for require() in Node 12+
|
74
|
-
"import": "./dist/index.module.mjs" // ESM bundle
|
75
|
-
},
|
76
|
-
"types": "./dist/index.d.ts", // TypeScript typings
|
77
|
-
"main": "./dist/index.js", // CommonJS bundle
|
78
|
-
"module": "./dist/index.module.mjs", // ESM bundle
|
79
|
-
"unpkg": "./dist/index.umd.js", // UMD bundle
|
80
|
-
}
|
81
|
-
```
|
82
|
-
|