@kineticdata/react 6.0.5 → 6.1.1

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.
Files changed (151) hide show
  1. package/README.md +110 -110
  2. package/assets/task/icons/defer.svg +12 -12
  3. package/assets/task/icons/drag-handle.svg +3 -3
  4. package/assets/task/icons/filter.svg +11 -11
  5. package/assets/task/icons/loop.svg +10 -10
  6. package/assets/task/icons/plus_small.svg +5 -5
  7. package/assets/task/icons/routine.svg +9 -9
  8. package/assets/task/icons/scale-minus.svg +11 -11
  9. package/assets/task/icons/scale-plus.svg +13 -13
  10. package/assets/task/icons/start.svg +11 -11
  11. package/assets/task/icons/stop.svg +8 -8
  12. package/lib/apis/core/activity.js +4 -4
  13. package/lib/apis/core/attributeDefinitions.js +64 -6
  14. package/lib/apis/core/attributeDefinitions.test.js +7 -4
  15. package/lib/apis/core/authentication.js +12 -1
  16. package/lib/apis/core/bridgeModels.test.js +46 -23
  17. package/lib/apis/core/bridgedresources.js +41 -41
  18. package/lib/apis/core/fileResources.js +2 -6
  19. package/lib/apis/core/forms.js +51 -2
  20. package/lib/apis/core/forms.test.js +32 -19
  21. package/lib/apis/core/integrations.js +61 -0
  22. package/lib/apis/core/kapps.js +49 -0
  23. package/lib/apis/core/kapps.test.js +16 -10
  24. package/lib/apis/core/notices.js +7 -0
  25. package/lib/apis/core/securityPolicyDefinitions.test.js +7 -4
  26. package/lib/apis/core/space.js +18 -0
  27. package/lib/apis/core/space.test.js +16 -10
  28. package/lib/apis/core/submissionActivities.js +38 -0
  29. package/lib/apis/core/submissions.js +114 -15
  30. package/lib/apis/core/translations.test.js +126 -55
  31. package/lib/apis/core/userPreferences.js +59 -0
  32. package/lib/apis/core/webApis.js +32 -2
  33. package/lib/apis/core/webhooks.test.js +7 -4
  34. package/lib/apis/http.js +30 -5
  35. package/lib/apis/index.js +48 -0
  36. package/lib/apis/integrator/index.js +337 -0
  37. package/lib/apis/system/index.js +64 -12
  38. package/lib/apis/task/index.js +9 -2
  39. package/lib/components/agent/filestore/FilestoreForm.js +1 -1
  40. package/lib/components/common/AttributeSelect.js +11 -2
  41. package/lib/components/common/BridgeSelect.js +3 -1
  42. package/lib/components/common/ConnectionSelect.js +73 -0
  43. package/lib/components/common/FormSelect.js +3 -1
  44. package/lib/components/common/NodeSelect.js +1 -0
  45. package/lib/components/common/StaticSelect.js +16 -6
  46. package/lib/components/common/TableInput.js +4 -1
  47. package/lib/components/common/TeamSelect.js +3 -1
  48. package/lib/components/common/ToastContainer.js +34 -10
  49. package/lib/components/common/Typeahead.js +62 -23
  50. package/lib/components/common/UserSelect.js +3 -1
  51. package/lib/components/common/authentication/AuthenticationContainer.js +121 -55
  52. package/lib/components/common/authentication/RequestInterceptor.js +1 -1
  53. package/lib/components/common/preferences/PreferencesProvider.js +461 -0
  54. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +10 -7
  55. package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
  56. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
  57. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
  58. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
  59. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
  60. package/lib/components/core/category/CategoryForm.js +4 -1
  61. package/lib/components/core/category/CategoryTable.js +2 -2
  62. package/lib/components/core/core_form/CoreForm.js +18 -10
  63. package/lib/components/core/field_definition/FieldDefinitionForm.js +3 -3
  64. package/lib/components/core/file_resource/FileResourceForm.js +2 -1
  65. package/lib/components/core/file_resource/FileResourceTable.js +14 -7
  66. package/lib/components/core/form/FormForm.js +42 -19
  67. package/lib/components/core/form/FormTable.js +13 -14
  68. package/lib/components/core/form_type/FormTypeForm.js +3 -0
  69. package/lib/components/core/i18n/Moment.js +1 -0
  70. package/lib/components/core/integration/IntegrationForm.js +232 -0
  71. package/lib/components/core/integration/IntegrationTable.js +142 -0
  72. package/lib/components/core/kapp/KappForm.js +18 -5
  73. package/lib/components/core/kapp/KappTable.js +3 -3
  74. package/lib/components/core/log/LogTable.js +1 -1
  75. package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
  76. package/lib/components/core/space/SpaceForm.js +17 -36
  77. package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
  78. package/lib/components/core/submission/FormSubmissionTable.js +12 -7
  79. package/lib/components/core/submission/KappSubmissionTable.js +4 -4
  80. package/lib/components/core/submission/SubmissionActivityForm.js +79 -0
  81. package/lib/components/core/submission/SubmissionForm.js +15 -3
  82. package/lib/components/core/team/TeamTable.js +17 -7
  83. package/lib/components/core/translation/EntryTable.js +8 -7
  84. package/lib/components/core/user/UserForm.js +2 -0
  85. package/lib/components/core/user/UserTable.js +22 -22
  86. package/lib/components/core/webapi/WebApiForm.js +5 -2
  87. package/lib/components/core/webapi/WebApiTable.js +2 -2
  88. package/lib/components/core/webhook/WebhookForm.js +43 -33
  89. package/lib/components/core/webhook/WebhookTable.js +16 -16
  90. package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
  91. package/lib/components/form/Form.helpers.js +10 -4
  92. package/lib/components/form/Form.js +264 -171
  93. package/lib/components/form/Form.models.js +6 -1
  94. package/lib/components/form/FormState.js +9 -5
  95. package/lib/components/form/SimpleForm.js +2 -2
  96. package/lib/components/form/defaults/CodeField.js +44 -1
  97. package/lib/components/index.js +152 -3
  98. package/lib/components/integrator/connection/ConnectionForm.js +156 -0
  99. package/lib/components/integrator/connection/ConnectionTable.js +82 -0
  100. package/lib/components/integrator/connection/config_fields/http.js +570 -0
  101. package/lib/components/integrator/connection/config_fields/sql.js +123 -0
  102. package/lib/components/integrator/integrationTypes.js +120 -0
  103. package/lib/components/integrator/operation/OperationForm.js +148 -0
  104. package/lib/components/integrator/operation/OperationTable.js +62 -0
  105. package/lib/components/integrator/operation/config_fields/http.js +185 -0
  106. package/lib/components/integrator/operation/config_fields/sql.js +81 -0
  107. package/lib/components/system/SystemSecurityForm.js +1 -1
  108. package/lib/components/system/SystemTaskAdapterForm.js +9 -9
  109. package/lib/components/system/SystemUserForm.js +2 -0
  110. package/lib/components/system/helpers.js +123 -100
  111. package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
  112. package/lib/components/system/spaces/SystemTenantForm.js +276 -104
  113. package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
  114. package/lib/components/system/spaces/SystemTenantTable.js +20 -16
  115. package/lib/components/table/Table.js +75 -15
  116. package/lib/components/table/Table.redux.js +297 -73
  117. package/lib/components/table/defaults/FilterControl.js +24 -0
  118. package/lib/components/table/defaults/index.js +2 -0
  119. package/lib/components/table/tests/Table.test.js +22 -22
  120. package/lib/components/table/tests/components.js +9 -2
  121. package/lib/components/task/builder/Connector.js +51 -41
  122. package/lib/components/task/builder/ConnectorForm.js +11 -7
  123. package/lib/components/task/builder/Node.js +31 -35
  124. package/lib/components/task/builder/NodeForm.js +93 -22
  125. package/lib/components/task/builder/NodeParametersForm.js +29 -17
  126. package/lib/components/task/builder/SvgCanvas.js +3 -17
  127. package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
  128. package/lib/components/task/builder/TreeBuilder.js +23 -3
  129. package/lib/components/task/builder/builder.redux.js +342 -197
  130. package/lib/components/task/builder/constants.js +10 -2
  131. package/lib/components/task/builder/helpers.js +231 -81
  132. package/lib/components/task/builder/models.js +7 -6
  133. package/lib/components/task/category/TaskCategoryTable.js +3 -3
  134. package/lib/components/task/common/UsageTable.js +9 -2
  135. package/lib/components/task/handlers/HandlerTable.js +44 -37
  136. package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
  137. package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
  138. package/lib/components/task/runs/RunTable.js +10 -14
  139. package/lib/components/task/runs/RunTaskTable.js +1 -1
  140. package/lib/components/task/sources/SourceTable.js +2 -2
  141. package/lib/components/task/triggers/TriggerTable.js +2 -2
  142. package/lib/components/task/workflows/LinkedWorkflowTable.js +16 -11
  143. package/lib/components/task/workflows/WorkflowForm.js +27 -8
  144. package/lib/components/task/workflows/WorkflowTable.js +27 -26
  145. package/lib/helpers/index.js +307 -74
  146. package/lib/index.js +2 -1
  147. package/lib/saga.js +4 -4
  148. package/lib/store.js +2 -1
  149. package/package.json +7 -6
  150. package/proxyhelper.js +201 -176
  151. package/CHANGELOG.md +0 -94
package/proxyhelper.js CHANGED
@@ -1,176 +1,201 @@
1
- const { createProxyMiddleware: proxy } = require('http-proxy-middleware');
2
- const removeSecure = cookie => cookie.replace(/;\s*Secure/i, '');
3
- const removeSameSiteNone = cookie => cookie.replace(/;\s*SameSite=None/i, '');
4
-
5
- const getProxyData = request => ({
6
- host: request.socket._host,
7
- scheme: request.agent.protocol.replace(':', ''),
8
- method: request.method,
9
- path: request.path,
10
- });
11
-
12
- const getRequestData = request => ({
13
- host: request.headers.host,
14
- scheme: request.headers['x-forwarded-proto'],
15
- method: request.method,
16
- path: request.url,
17
- });
18
-
19
- const getResponseData = response => ({
20
- statusCode: response.statusCode,
21
- message: response.message,
22
- host: response.socket.servername,
23
- });
24
-
25
- const defaultProxyLogger = ({
26
- proxyRequest,
27
- originalRequest,
28
- proxyResponse,
29
- }) => {
30
- try {
31
- if (proxyRequest) {
32
- const proxyData = getProxyData(proxyRequest);
33
- const originalData = getRequestData(originalRequest);
34
- console.log(
35
- `[proxy] [original] -> ${originalData.method}\t${originalData.scheme}\t${originalData.host}\t${originalData.path}`,
36
- );
37
- console.log(
38
- `[proxy] [proxied] -> ${proxyData.method}\t${proxyData.scheme}\t${proxyData.host}\t${proxyData.path}`,
39
- );
40
- } else if (proxyResponse) {
41
- const responseData = getResponseData(proxyResponse);
42
- const requestData = getRequestData(originalRequest);
43
- console.log(
44
- `[proxy] [original] <- ${responseData.statusCode}\t${requestData.method}\t${requestData.scheme}\t${requestData.host} (${responseData.host})\t${requestData.path}`,
45
- );
46
- }
47
- } catch (e) {
48
- console.warn(
49
- '[proxy] There was a problem logging proxy request/response information',
50
- e,
51
- );
52
- }
53
- };
54
-
55
- const setupProxy = ({
56
- target = process.env.REACT_APP_PROXY_HOST,
57
- proxyLogger,
58
- pathRewrite,
59
- } = {}) => {
60
- return {
61
- target,
62
- secure: false,
63
- pathRewrite,
64
- changeOrigin: true,
65
- onProxyReq: (proxyRequest, originalRequest) => {
66
- // Browsers may send Origin headers even with same-origin
67
- // requests. To prevent CORS issues, we have to change
68
- // the Origin to match the target URL.
69
- if (proxyRequest.getHeader('origin')) {
70
- proxyRequest.setHeader('origin', target);
71
- }
72
-
73
- if (
74
- process.env.REACT_APP_PROXY_SUBDOMAIN &&
75
- !proxyRequest.path.endsWith('pack') &&
76
- !proxyRequest.path.endsWith('favicon.ico')
77
- ) {
78
- proxyRequest.setHeader(
79
- 'X-Kinetic-Subdomain',
80
- process.env.REACT_APP_PROXY_SUBDOMAIN,
81
- );
82
- proxyRequest.path =
83
- '/' + process.env.REACT_APP_PROXY_SUBDOMAIN + proxyRequest.path;
84
- }
85
-
86
- if (process.env.PROXY_DEBUGGING)
87
- (proxyLogger || defaultProxyLogger)({
88
- proxyRequest,
89
- originalRequest,
90
- });
91
- },
92
- onProxyRes: (proxyResponse, originalRequest) => {
93
- if (process.env.PROXY_DEBUGGING)
94
- (proxyLogger || defaultProxyLogger)({
95
- proxyResponse,
96
- originalRequest,
97
- });
98
-
99
- const setCookie = proxyResponse.headers['set-cookie'];
100
- if (setCookie && originalRequest.protocol === 'http') {
101
- proxyResponse.headers['set-cookie'] = Array.isArray(setCookie)
102
- ? setCookie.map(removeSecure).map(removeSameSiteNone)
103
- : removeSameSiteNone(removeSecure(setCookie));
104
- }
105
- },
106
- };
107
- };
108
-
109
- const getProxyConfig = (
110
- app,
111
- {
112
- mainTarget = process.env.REACT_APP_PROXY_HOST,
113
- loghubTarget = process.env.REACT_APP_LOGHUB_PROXY_HOST,
114
- systemCoordinatorTarget = process.env.REACT_APP_SYS_COORDINATOR_PROXY_HOST,
115
- proxyLogger,
116
- } = {},
117
- ) => {
118
- const mainPaths = [
119
- '**',
120
- '!/',
121
- '!/favicon.ico',
122
- '!/index.html',
123
- '!/images/**',
124
- '!/static/**',
125
- '!/sockjs-node',
126
- '!/manifest.json',
127
- '!/*.hot-update.js*',
128
- ];
129
-
130
- const finalConfigs = [
131
- {
132
- paths: mainPaths,
133
- options: setupProxy({ target: mainTarget, proxyLogger }),
134
- },
135
- ];
136
-
137
- if (loghubTarget) {
138
- // If we're overriding the underlying Loghub host, bypass it in the main.
139
- mainPaths.push('!/app/loghub/**');
140
- const options = setupProxy({
141
- target: loghubTarget,
142
- proxyLogger,
143
- pathRewrite: {
144
- '^/app/loghub': '/app',
145
- },
146
- });
147
- finalConfigs.push({ paths: ['/app/loghub/**'], options });
148
- }
149
-
150
- if (systemCoordinatorTarget) {
151
- // If we're overriding the underlying Loghub host, bypass it in the main.
152
- mainPaths.push('!/app/system-coordinator/**');
153
- const options = setupProxy({
154
- target: systemCoordinatorTarget,
155
- proxyLogger,
156
- pathRewrite: {
157
- '^/app/system-coordinator': '/app',
158
- },
159
- });
160
- finalConfigs.push({ paths: ['/app/system-coordinator/**'], options });
161
- }
162
-
163
- return finalConfigs.map(config => {
164
- config.proxy = ({
165
- paths = config.paths,
166
- options = config.options,
167
- } = {}) => {
168
- app.use(proxy(paths, options));
169
- };
170
- return config;
171
- });
172
- };
173
-
174
- setupProxy.getProxyConfig = getProxyConfig;
175
-
176
- module.exports = setupProxy;
1
+ const { createProxyMiddleware: proxy } = require('http-proxy-middleware');
2
+ const removeSecure = cookie => cookie.replace(/;\s*Secure/i, '');
3
+ const removeSameSiteNone = cookie => cookie.replace(/;\s*SameSite=None/i, '');
4
+
5
+ const getProxyData = request => ({
6
+ host: request.socket._host,
7
+ scheme: request.agent.protocol.replace(':', ''),
8
+ method: request.method,
9
+ path: request.path,
10
+ });
11
+
12
+ const getRequestData = request => ({
13
+ host: request.headers.host,
14
+ scheme: request.headers['x-forwarded-proto'],
15
+ method: request.method,
16
+ path: request.url,
17
+ });
18
+
19
+ const getResponseData = response => ({
20
+ statusCode: response.statusCode,
21
+ message: response.message,
22
+ host: response.socket.servername,
23
+ });
24
+
25
+ const defaultProxyLogger = ({
26
+ proxyRequest,
27
+ originalRequest,
28
+ proxyResponse,
29
+ }) => {
30
+ try {
31
+ if (proxyRequest) {
32
+ const proxyData = getProxyData(proxyRequest);
33
+ const originalData = getRequestData(originalRequest);
34
+ console.log(
35
+ `[proxy] [original] -> ${originalData.method}\t${
36
+ originalData.scheme
37
+ }\t${originalData.host}\t${originalData.path}`,
38
+ );
39
+ console.log(
40
+ `[proxy] [proxied] -> ${proxyData.method}\t${proxyData.scheme}\t${
41
+ proxyData.host
42
+ }\t${proxyData.path}`,
43
+ );
44
+ } else if (proxyResponse) {
45
+ const responseData = getResponseData(proxyResponse);
46
+ const requestData = getRequestData(originalRequest);
47
+ console.log(
48
+ `[proxy] [original] <- ${responseData.statusCode}\t${
49
+ requestData.method
50
+ }\t${requestData.scheme}\t${requestData.host} (${responseData.host})\t${
51
+ requestData.path
52
+ }`,
53
+ );
54
+ }
55
+ } catch (e) {
56
+ console.warn(
57
+ '[proxy] There was a problem logging proxy request/response information',
58
+ e,
59
+ );
60
+ }
61
+ };
62
+
63
+ const setupProxy = ({
64
+ target = process.env.REACT_APP_PROXY_HOST,
65
+ proxyLogger,
66
+ pathRewrite,
67
+ onlyTenant = false,
68
+ } = {}) => {
69
+ return {
70
+ target,
71
+ secure: false,
72
+ pathRewrite,
73
+ changeOrigin: true,
74
+ onProxyReq: (proxyRequest, originalRequest) => {
75
+ // Browsers may send Origin headers even with same-origin
76
+ // requests. To prevent CORS issues, we have to change
77
+ // the Origin to match the target URL.
78
+ if (proxyRequest.getHeader('origin')) {
79
+ proxyRequest.setHeader('origin', target);
80
+ }
81
+
82
+ if (
83
+ !onlyTenant &&
84
+ process.env.REACT_APP_PROXY_SUBDOMAIN &&
85
+ !proxyRequest.path.endsWith('pack') &&
86
+ !proxyRequest.path.endsWith('favicon.ico')
87
+ ) {
88
+ proxyRequest.setHeader(
89
+ 'X-Kinetic-Subdomain',
90
+ process.env.REACT_APP_PROXY_SUBDOMAIN,
91
+ );
92
+ proxyRequest.path =
93
+ '/' + process.env.REACT_APP_PROXY_SUBDOMAIN + proxyRequest.path;
94
+ }
95
+
96
+ if (process.env.PROXY_DEBUGGING)
97
+ (proxyLogger || defaultProxyLogger)({
98
+ proxyRequest,
99
+ originalRequest,
100
+ });
101
+ },
102
+ onProxyRes: (proxyResponse, originalRequest) => {
103
+ if (process.env.PROXY_DEBUGGING)
104
+ (proxyLogger || defaultProxyLogger)({
105
+ proxyResponse,
106
+ originalRequest,
107
+ });
108
+
109
+ const setCookie = proxyResponse.headers['set-cookie'];
110
+ if (setCookie && originalRequest.protocol === 'http') {
111
+ proxyResponse.headers['set-cookie'] = Array.isArray(setCookie)
112
+ ? setCookie.map(removeSecure).map(removeSameSiteNone)
113
+ : removeSameSiteNone(removeSecure(setCookie));
114
+ }
115
+ },
116
+ };
117
+ };
118
+
119
+ const getProxyConfig = (
120
+ app,
121
+ {
122
+ mainTarget = process.env.REACT_APP_PROXY_HOST,
123
+ loghubTarget = process.env.REACT_APP_LOGHUB_PROXY_HOST,
124
+ systemCoordinatorTarget = process.env.REACT_APP_SYS_COORDINATOR_PROXY_HOST,
125
+ integratorTarget = process.env.REACT_APP_INTEGRATOR_PROXY_HOST,
126
+ proxyLogger,
127
+ } = {},
128
+ ) => {
129
+ const mainPaths = [
130
+ '**',
131
+ '!/',
132
+ '!/favicon.ico',
133
+ '!/index.html',
134
+ '!/images/**',
135
+ '!/static/**',
136
+ '!/sockjs-node',
137
+ '!/manifest.json',
138
+ '!/*.hot-update.js*',
139
+ ];
140
+
141
+ const finalConfigs = [
142
+ {
143
+ paths: mainPaths,
144
+ options: setupProxy({ target: mainTarget, proxyLogger }),
145
+ },
146
+ ];
147
+
148
+ if (loghubTarget) {
149
+ // If we're overriding the underlying Loghub host, bypass it in the main.
150
+ mainPaths.push('!/app/loghub/**');
151
+ const options = setupProxy({
152
+ target: loghubTarget,
153
+ proxyLogger,
154
+ pathRewrite: {
155
+ '^/app/loghub': '/app',
156
+ },
157
+ });
158
+ finalConfigs.push({ paths: ['/app/loghub/**'], options });
159
+ }
160
+
161
+ if (systemCoordinatorTarget) {
162
+ // If we're overriding the underlying Loghub host, bypass it in the main.
163
+ mainPaths.push('!/app/system-coordinator/**');
164
+ const options = setupProxy({
165
+ target: systemCoordinatorTarget,
166
+ proxyLogger,
167
+ pathRewrite: {
168
+ '^/app/system-coordinator': '/app',
169
+ },
170
+ });
171
+ finalConfigs.push({ paths: ['/app/system-coordinator/**'], options });
172
+ }
173
+
174
+ if (integratorTarget) {
175
+ // If we're overriding the underlying Integrator host, bypass it in the main.
176
+ mainPaths.push('!/app/integrator/**');
177
+ const options = setupProxy({
178
+ target: integratorTarget,
179
+ proxyLogger,
180
+ pathRewrite: {
181
+ '^/app/integrator/': '/',
182
+ },
183
+ onlyTenant: true,
184
+ });
185
+ finalConfigs.push({ paths: ['/app/integrator/**'], options });
186
+ }
187
+
188
+ return finalConfigs.map(config => {
189
+ config.proxy = ({
190
+ paths = config.paths,
191
+ options = config.options,
192
+ } = {}) => {
193
+ app.use(proxy(paths, options));
194
+ };
195
+ return config;
196
+ });
197
+ };
198
+
199
+ setupProxy.getProxyConfig = getProxyConfig;
200
+
201
+ module.exports = setupProxy;
package/CHANGELOG.md DELETED
@@ -1,94 +0,0 @@
1
- # Changelog for `@kineticdata/react`
2
-
3
- When upgrading `@kineticdata/react` to a newer version, remember that all `@kineticdata/*` libraries must be on the same exact version. This is because each `@kineticdata/bundle-*` library has `@kineticdata/react` as a dependency, and if two different versions of `@kineticdata/react` are installed in a bundle, the bundle will never load because authentication happens in a different version of `@kineticdata/react` than the one used during rendering the packages.
4
-
5
- Remember to always run `yarn install` after upgrading any dependency versions.
6
-
7
- ## 6.0.4 (January 22, 2024)
8
-
9
- - Fixed bug with SAML logout options
10
-
11
- ## 6.0.3 (December 11, 2023)
12
-
13
- _No relevant changes._
14
-
15
- ## 6.0.2 (November 6, 2023)
16
-
17
- - Removed XSRF header setting from Request Interceptor
18
- - Added SAML logout options
19
- - Upgraded various `dependencies` to resolve vulnerabilities
20
- - Updated the `react` and `react-dom` `peerDependencies` to `>=17.0.2` to support the latest versions of React
21
-
22
- ### Bundle Issues
23
-
24
- One of the `dependencies` that was updated is `axios` whose latest version causes some issues with the latest `react-scripts`. If the bundle has a `craco.config.js` file, the following steps must be taken when upgrading to this version.
25
-
26
- 1. In `craco.config.js`, add the following function to the very end of the file:
27
-
28
- ```javascript
29
- function getFileLoaderRule(rules) {
30
- for (const rule of rules) {
31
- if ('oneOf' in rule) {
32
- const found = getFileLoaderRule(rule.oneOf);
33
- if (found) {
34
- return found;
35
- }
36
- } else if (rule.test === undefined && rule.type === 'asset/resource') {
37
- return rule;
38
- }
39
- }
40
- }
41
- ```
42
-
43
- 2. In `craco.config.js`, add the following code inside the `configure` function of the `webpack` object:
44
-
45
- ```javascript
46
- // Fix for CJS files not being treated as JavaScript files
47
- // https://github.com/facebook/create-react-app/issues/11889#issuecomment-1114928008
48
- const fileLoaderRule = getFileLoaderRule(webpackConfig.module.rules);
49
- if (!fileLoaderRule) {
50
- throw new Error('File loader not found');
51
- }
52
- fileLoaderRule.exclude.push(/\.cjs$/);
53
- ```
54
-
55
- ## 6.0.1 (September 20, 2023)
56
-
57
- - Updated the `react` and `react-dom` `peerDependencies` to `^17.0.2` to support React v17
58
-
59
- ### Bundle Issues
60
-
61
- It is recommended to upgrade the bundle's `react` and `react-dom` versions to `^17.0.2`. This upgrade should not have any breaking changes. To do so, update these two dependency versions in `bundle/packages/app/package.json` and the peer dependency versions in all of the `package.json` files of the other packages.
62
-
63
- If you do upgrade `react` to v17, the following steps must also be taken if the bundle has testing configured:
64
-
65
- 1. In `bundle/package.json`, remove the `enzyme-adapter-react-16` dependency, and add the following dependency:
66
- `"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0"`
67
- 2. In `bundle/packages/app/src/setupTests.js`, change the `Adapter` import from `enzyme-adapter-react-16` to be from `@wojtekmaj/enzyme-adapter-react-17`.
68
-
69
- ## 6.0.0 (February 22, 2023)
70
-
71
- - Removed all code related to Discussions
72
- - Removed most `devDependencies`, which were move to the project root
73
-
74
- ### Bundle Issues
75
-
76
- Because all discussions code was removed from the library, any bundles that are upgraded to this version must have all of their discussions code removed as well, since the various imports from this library that bundles used no longer exist.
77
-
78
- We consolidated most of our `devDependencies` into the root of our project, of which `@kineticdata/react` is just one part. Any bundles upgrading to this version must add the following `devDependencies` to the `package.json` file in the root of their `bundle` folder:
79
-
80
- ```
81
- "@babel/cli": "^7.23.0",
82
- "@babel/runtime": "^7.23.2",
83
- ```
84
-
85
- If you get the following error when trying to run your bundle:
86
- `Uncaught Error: Cannot find module '@babel/runtime/helpers/esm/regeneratorRuntime'`
87
- You will need to run the following commands in your `bundle` directory:
88
-
89
- ```
90
- npx yarn-deduplicate --packages @babel/runtime -- yarn.lock
91
- yarn install
92
- ```
93
-
94
- The above step will always be required when first upgrading to a v6+ version of `@kineticdata/react`.