@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.
Files changed (145) hide show
  1. package/package.json +17 -10
  2. package/DEVELOPMENT.md +0 -82
  3. package/bundle-tests/test-frameworks/README.md +0 -4
  4. package/bundle-tests/test-frameworks/cra5react17/package-lock.json +0 -30749
  5. package/bundle-tests/test-frameworks/cra5react17/package.json +0 -42
  6. package/bundle-tests/test-frameworks/cra5react17/patches/react-scripts+5.0.0.patch +0 -15
  7. package/bundle-tests/test-frameworks/cra5react17/public/favicon.ico +0 -0
  8. package/bundle-tests/test-frameworks/cra5react17/public/index.html +0 -43
  9. package/bundle-tests/test-frameworks/cra5react17/public/logo192.png +0 -0
  10. package/bundle-tests/test-frameworks/cra5react17/public/logo512.png +0 -0
  11. package/bundle-tests/test-frameworks/cra5react17/public/manifest.json +0 -25
  12. package/bundle-tests/test-frameworks/cra5react17/public/robots.txt +0 -3
  13. package/bundle-tests/test-frameworks/cra5react17/src/IntegrationsTest.jsx +0 -42
  14. package/bundle-tests/test-frameworks/cra5react17/src/index.tsx +0 -10
  15. package/bundle-tests/test-frameworks/cra5react17/src/react-app-env.d.ts +0 -1
  16. package/bundle-tests/test-frameworks/cra5react17/tsconfig.json +0 -26
  17. package/bundle-tests/test-frameworks/cra5react18/package-lock.json +0 -30328
  18. package/bundle-tests/test-frameworks/cra5react18/package.json +0 -38
  19. package/bundle-tests/test-frameworks/cra5react18/public/favicon.ico +0 -0
  20. package/bundle-tests/test-frameworks/cra5react18/public/index.html +0 -43
  21. package/bundle-tests/test-frameworks/cra5react18/public/logo192.png +0 -0
  22. package/bundle-tests/test-frameworks/cra5react18/public/logo512.png +0 -0
  23. package/bundle-tests/test-frameworks/cra5react18/public/manifest.json +0 -25
  24. package/bundle-tests/test-frameworks/cra5react18/public/robots.txt +0 -3
  25. package/bundle-tests/test-frameworks/cra5react18/src/IntegrationsTest.jsx +0 -42
  26. package/bundle-tests/test-frameworks/cra5react18/src/index.tsx +0 -10
  27. package/bundle-tests/test-frameworks/cra5react18/src/logo.svg +0 -1
  28. package/bundle-tests/test-frameworks/cra5react18/src/react-app-env.d.ts +0 -1
  29. package/bundle-tests/test-frameworks/cra5react18/tsconfig.json +0 -26
  30. package/bundle-tests/test-frameworks/next12react17/next.config.js +0 -6
  31. package/bundle-tests/test-frameworks/next12react17/package.json +0 -18
  32. package/bundle-tests/test-frameworks/next12react17/pages/_app.js +0 -5
  33. package/bundle-tests/test-frameworks/next12react17/pages/index.js +0 -5
  34. package/bundle-tests/test-frameworks/next12react17/src/IntegrationsTest.jsx +0 -25
  35. package/bundle-tests/test-frameworks/next12react18/next.config.js +0 -6
  36. package/bundle-tests/test-frameworks/next12react18/package.json +0 -18
  37. package/bundle-tests/test-frameworks/next12react18/pages/_app.js +0 -5
  38. package/bundle-tests/test-frameworks/next12react18/pages/index.js +0 -5
  39. package/bundle-tests/test-frameworks/next12react18/src/IntegrationsTest.jsx +0 -41
  40. package/bundle-tests/test-frameworks/next13react18/app/layout.tsx +0 -18
  41. package/bundle-tests/test-frameworks/next13react18/app/page.tsx +0 -5
  42. package/bundle-tests/test-frameworks/next13react18/next-env.d.ts +0 -5
  43. package/bundle-tests/test-frameworks/next13react18/next.config.js +0 -6
  44. package/bundle-tests/test-frameworks/next13react18/package.json +0 -22
  45. package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTest.tsx +0 -43
  46. package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestReact.tsx +0 -28
  47. package/bundle-tests/test-frameworks/next13react18/src/IntegrationsTestSdk.tsx +0 -19
  48. package/bundle-tests/test-frameworks/next13react18/tsconfig.json +0 -34
  49. package/bundle-tests/test-frameworks/parcel2react17/package.json +0 -21
  50. package/bundle-tests/test-frameworks/parcel2react17/src/IntegrationsTest.js +0 -41
  51. package/bundle-tests/test-frameworks/parcel2react17/src/index.html +0 -12
  52. package/bundle-tests/test-frameworks/parcel2react17/src/index.js +0 -12
  53. package/bundle-tests/test-frameworks/parcel2react18/package.json +0 -21
  54. package/bundle-tests/test-frameworks/parcel2react18/src/IntegrationsTest.js +0 -41
  55. package/bundle-tests/test-frameworks/parcel2react18/src/index.html +0 -12
  56. package/bundle-tests/test-frameworks/parcel2react18/src/index.js +0 -11
  57. package/bundle-tests/test-frameworks/vite3react17/index.html +0 -12
  58. package/bundle-tests/test-frameworks/vite3react17/package.json +0 -26
  59. package/bundle-tests/test-frameworks/vite3react17/src/IntegrationsTest.tsx +0 -41
  60. package/bundle-tests/test-frameworks/vite3react17/src/main.tsx +0 -10
  61. package/bundle-tests/test-frameworks/vite3react17/src/vite-env.d.ts +0 -1
  62. package/bundle-tests/test-frameworks/vite3react17/tsconfig.json +0 -25
  63. package/bundle-tests/test-frameworks/vite3react17/tsconfig.node.json +0 -10
  64. package/bundle-tests/test-frameworks/vite3react17/vite.config.ts +0 -7
  65. package/bundle-tests/test-frameworks/vite4react17/index.html +0 -12
  66. package/bundle-tests/test-frameworks/vite4react17/package.json +0 -26
  67. package/bundle-tests/test-frameworks/vite4react17/src/IntegrationsTest.tsx +0 -41
  68. package/bundle-tests/test-frameworks/vite4react17/src/main.tsx +0 -10
  69. package/bundle-tests/test-frameworks/vite4react17/src/vite-env.d.ts +0 -1
  70. package/bundle-tests/test-frameworks/vite4react17/tsconfig.json +0 -25
  71. package/bundle-tests/test-frameworks/vite4react17/tsconfig.node.json +0 -10
  72. package/bundle-tests/test-frameworks/vite4react17/vite.config.ts +0 -7
  73. package/bundle-tests/test-frameworks/vite4react18/index.html +0 -12
  74. package/bundle-tests/test-frameworks/vite4react18/package.json +0 -26
  75. package/bundle-tests/test-frameworks/vite4react18/src/IntegrationsTest.tsx +0 -41
  76. package/bundle-tests/test-frameworks/vite4react18/src/main.tsx +0 -11
  77. package/bundle-tests/test-frameworks/vite4react18/src/vite-env.d.ts +0 -1
  78. package/bundle-tests/test-frameworks/vite4react18/tsconfig.json +0 -25
  79. package/bundle-tests/test-frameworks/vite4react18/tsconfig.node.json +0 -10
  80. package/bundle-tests/test-frameworks/vite4react18/vite.config.ts +0 -7
  81. package/bundle-tests/test-package/package.json +0 -10
  82. package/bundle-tests/test-package/test-cjs.js +0 -11
  83. package/bundle-tests/test-package/test-esm.mjs +0 -11
  84. package/bundle-tests/test-package/test-umd.js +0 -25
  85. package/bundle-tests/test-package/test.sh +0 -29
  86. package/dist/index.umd.d.ts +0 -625
  87. package/dist/index.umd.js +0 -799
  88. package/dist/index.umd.js.map +0 -1
  89. package/src/_modules/README.txt +0 -1
  90. package/src/_modules/awesome-debounce-promise.ts +0 -8
  91. package/src/contexts/index.tsx +0 -4
  92. package/src/contexts/integration-app-context.tsx +0 -61
  93. package/src/hooks/actions/useAction.ts +0 -37
  94. package/src/hooks/actions/useActionInstance.ts +0 -60
  95. package/src/hooks/actions/useActionInstances.ts +0 -11
  96. package/src/hooks/actions/useActions.ts +0 -11
  97. package/src/hooks/app-data-schemas/useAppDataSchema.ts +0 -20
  98. package/src/hooks/app-data-schemas/useAppDataSchemaInstance.ts +0 -43
  99. package/src/hooks/app-data-schemas/useAppDataSchemaInstances.ts +0 -19
  100. package/src/hooks/app-data-schemas/useAppDataSchemas.ts +0 -11
  101. package/src/hooks/app-events/useAppEventSubscription.ts +0 -22
  102. package/src/hooks/app-events/useAppEventSubscriptions.ts +0 -19
  103. package/src/hooks/app-events/useAppEventType.ts +0 -20
  104. package/src/hooks/app-events/useAppEventTypes.ts +0 -11
  105. package/src/hooks/app-events/useAppEvents.ts +0 -11
  106. package/src/hooks/customers/useCustomer.ts +0 -19
  107. package/src/hooks/customers/useCustomers.ts +0 -11
  108. package/src/hooks/data-collections/useDataCollectionSpec.ts +0 -30
  109. package/src/hooks/data-form/index.tsx +0 -3
  110. package/src/hooks/data-links/useDataLinkTable.ts +0 -20
  111. package/src/hooks/data-links/useDataLinkTableInstance.ts +0 -39
  112. package/src/hooks/data-links/useDataLinkTableInstances.ts +0 -19
  113. package/src/hooks/data-links/useDataLinkTables.ts +0 -11
  114. package/src/hooks/data-sources/useDataSource.ts +0 -39
  115. package/src/hooks/data-sources/useDataSourceInstance.ts +0 -105
  116. package/src/hooks/data-sources/useDataSourceInstanceCollection.ts +0 -29
  117. package/src/hooks/data-sources/useDataSourceInstances.ts +0 -17
  118. package/src/hooks/data-sources/useDataSources.ts +0 -11
  119. package/src/hooks/external-events/useExternalEventSubscription.ts +0 -60
  120. package/src/hooks/external-events/useExternalEventSubscriptions.ts +0 -19
  121. package/src/hooks/field-mappings/useFieldMapping.ts +0 -39
  122. package/src/hooks/field-mappings/useFieldMappingInstance.ts +0 -56
  123. package/src/hooks/field-mappings/useFieldMappingInstances.ts +0 -19
  124. package/src/hooks/field-mappings/useFieldMappings.ts +0 -11
  125. package/src/hooks/flows/useFlow.ts +0 -35
  126. package/src/hooks/flows/useFlowInstance.ts +0 -79
  127. package/src/hooks/flows/useFlowInstances.ts +0 -11
  128. package/src/hooks/flows/useFlowRun.ts +0 -24
  129. package/src/hooks/flows/useFlowRuns.ts +0 -11
  130. package/src/hooks/flows/useFlows.ts +0 -11
  131. package/src/hooks/integrations/useConnection.ts +0 -21
  132. package/src/hooks/integrations/useConnections.ts +0 -12
  133. package/src/hooks/integrations/useConnectorSpec.ts +0 -16
  134. package/src/hooks/integrations/useIntegration.ts +0 -20
  135. package/src/hooks/integrations/useIntegrations.ts +0 -12
  136. package/src/hooks/scenarios/useScenario.tsx +0 -20
  137. package/src/hooks/scenarios/useScenarios.tsx +0 -11
  138. package/src/hooks/screens/useScreen.ts +0 -19
  139. package/src/hooks/useElement.tsx +0 -199
  140. package/src/hooks/useElements.tsx +0 -108
  141. package/src/hooks/useIntegrationAppSWR.tsx +0 -13
  142. package/src/hooks/useIntegrationElement.tsx +0 -19
  143. package/src/index.tsx +0 -70
  144. package/tsconfig.json +0 -40
  145. /package/dist/{index.module.d.ts → index.module.d.mts} +0 -0
package/package.json CHANGED
@@ -1,23 +1,30 @@
1
1
  {
2
2
  "name": "@integration-app/react",
3
- "version": "2.0.0-beta.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
- "types": "./dist/index.d.ts",
9
- "require": "./dist/index.js",
10
- "import": "./dist/index.module.mjs"
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": "./dist/index.d.ts",
13
- "main": "./dist/index.js",
14
- "module": "./dist/index.module.mjs",
15
- "unpkg": "./dist/index.umd.js",
19
+ "types": "dist/index.d.ts",
20
+ "files": [
21
+ "dist"
22
+ ],
16
23
  "scripts": {
17
24
  "build": "npm run prep:dev && npm run build:bundle && npm run build:dts",
18
25
  "build:publish": "npm run prep:publish && npm run build:bundle && npm run build:dts",
19
26
  "build:bundle": "rollup -c rollup.config.mjs",
20
- "build:dts": "rollup -c rollup.dts.config.mjs",
27
+ "build:dts": "rollup -c rollup.dts.config.mjs && rimraf ./dist/dts",
21
28
  "clean": "rimraf ./dist",
22
29
  "docs": "typedoc --tsconfig tsconfig.json --plugin typedoc-plugin-missing-exports",
23
30
  "docs:dev": "typedoc --tsconfig tsconfig.json --plugin typedoc-plugin-missing-exports --watch",
@@ -36,7 +43,7 @@
36
43
  "lint": "npx publint"
37
44
  },
38
45
  "dependencies": {
39
- "@integration-app/sdk": "^1.3.0",
46
+ "@integration-app/sdk": "^1.3.3",
40
47
  "awesome-debounce-promise": "^2.1.0",
41
48
  "query-string": "^7.1.1",
42
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
-
@@ -1,4 +0,0 @@
1
- # How to run test-frameworks locally
2
-
3
- 1. Install `act`: https://github.com/nektos/act
4
- 2. Run `act -j packages-framework-test` from the root of the repo