@trackunit/react-core-contexts 0.4.111 → 0.4.113
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.
- package/index.cjs +2 -5
- package/index.js +2 -5
- package/package.json +8 -8
package/index.cjs
CHANGED
|
@@ -69,11 +69,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
69
69
|
* @returns {JSX.Element} The provider.
|
|
70
70
|
*/
|
|
71
71
|
const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
72
|
-
const { publicUrl,
|
|
72
|
+
const { publicUrl, graphqlManagerUrl, graphqlPublicUrl, graphqlManagerImageUploadUrl, graphqlReportUrl, isDev, tracingHeaders, } = reactCoreHooks.useEnvironment();
|
|
73
73
|
const { token } = reactCoreHooks.useToken();
|
|
74
|
-
const legacyGraphQLLink = apolloUploadClient.createUploadLink({
|
|
75
|
-
uri: request => graphqlLegacyUrl + "/" + request.operationName,
|
|
76
|
-
});
|
|
77
74
|
const managerGraphQLLink = apolloUploadClient.createUploadLink({
|
|
78
75
|
uri: request => graphqlManagerUrl + "/" + request.operationName,
|
|
79
76
|
});
|
|
@@ -163,7 +160,7 @@ const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
|
163
160
|
errorLink,
|
|
164
161
|
authLink,
|
|
165
162
|
client.split(operation => operation.getContext().clientName === "imageupload", imageUploadGraphQLLink),
|
|
166
|
-
client.split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, client.split(operation => operation.getContext().clientName === "report", reportGraphQLLink, isIrisApp ? publicGraphQLLink :
|
|
163
|
+
client.split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, client.split(operation => operation.getContext().clientName === "report", reportGraphQLLink, isIrisApp ? publicGraphQLLink : managerGraphQLLink)),
|
|
167
164
|
]),
|
|
168
165
|
});
|
|
169
166
|
return jsxRuntime.jsx(client.ApolloProvider, Object.assign({ client: client$1 }, { children: children }));
|
package/index.js
CHANGED
|
@@ -45,11 +45,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
45
45
|
* @returns {JSX.Element} The provider.
|
|
46
46
|
*/
|
|
47
47
|
const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
48
|
-
const { publicUrl,
|
|
48
|
+
const { publicUrl, graphqlManagerUrl, graphqlPublicUrl, graphqlManagerImageUploadUrl, graphqlReportUrl, isDev, tracingHeaders, } = useEnvironment();
|
|
49
49
|
const { token } = useToken();
|
|
50
|
-
const legacyGraphQLLink = createUploadLink({
|
|
51
|
-
uri: request => graphqlLegacyUrl + "/" + request.operationName,
|
|
52
|
-
});
|
|
53
50
|
const managerGraphQLLink = createUploadLink({
|
|
54
51
|
uri: request => graphqlManagerUrl + "/" + request.operationName,
|
|
55
52
|
});
|
|
@@ -139,7 +136,7 @@ const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
|
139
136
|
errorLink,
|
|
140
137
|
authLink,
|
|
141
138
|
split(operation => operation.getContext().clientName === "imageupload", imageUploadGraphQLLink),
|
|
142
|
-
split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, isIrisApp ? publicGraphQLLink :
|
|
139
|
+
split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, isIrisApp ? publicGraphQLLink : managerGraphQLLink)),
|
|
143
140
|
]),
|
|
144
141
|
});
|
|
145
142
|
return jsx(ApolloProvider, Object.assign({ client: client }, { children: children }));
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.113",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"graphql": "^15.8.0",
|
|
8
|
-
"@trackunit/iris-app-runtime-core": "0.3.26",
|
|
9
|
-
"@trackunit/react-core-contexts-api": "0.2.23",
|
|
10
|
-
"@trackunit/react-core-contexts-test": "0.1.43",
|
|
11
|
-
"@trackunit/react-core-hooks": "0.2.39",
|
|
12
|
-
"react": "18.2.0",
|
|
13
8
|
"@apollo/client": "3.7.10",
|
|
14
9
|
"@sentry/browser": "7.24.2",
|
|
15
|
-
"apollo-upload-client": "17.0.0",
|
|
16
10
|
"@trackunit/i18n-library-translation": "0.0.38",
|
|
17
|
-
"@trackunit/
|
|
11
|
+
"@trackunit/iris-app-runtime-core": "0.3.27",
|
|
12
|
+
"@trackunit/react-components": "0.1.79",
|
|
13
|
+
"@trackunit/react-core-contexts-api": "0.2.24",
|
|
14
|
+
"@trackunit/react-core-contexts-test": "0.1.44",
|
|
15
|
+
"@trackunit/react-core-hooks": "0.2.40",
|
|
16
|
+
"apollo-upload-client": "17.0.0",
|
|
17
|
+
"react": "18.2.0",
|
|
18
18
|
"react-router-dom": "6.4.5"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.js",
|