@trackunit/react-core-contexts 0.4.71 → 0.4.75

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.js CHANGED
@@ -37,8 +37,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
37
37
  });
38
38
  }
39
39
 
40
- const ManagerApolloProvider = ({ children }) => {
41
- const { publicUrl, graphqlLegacyUrl, graphqlManagerUrl, graphqlManagerImageUploadUrl, graphqlReportUrl, isDev, tracingHeaders, } = useEnvironment();
40
+ const ManagerApolloProvider = ({ children, isIrisApp }) => {
41
+ const { publicUrl, graphqlLegacyUrl, graphqlManagerUrl, graphqlPublicUrl, graphqlManagerImageUploadUrl, graphqlReportUrl, isDev, tracingHeaders, } = useEnvironment();
42
42
  const { token } = useToken();
43
43
  const legacyGraphQLLink = createUploadLink({
44
44
  uri: request => graphqlLegacyUrl + "/" + request.operationName,
@@ -46,6 +46,9 @@ const ManagerApolloProvider = ({ children }) => {
46
46
  const managerGraphQLLink = createUploadLink({
47
47
  uri: request => graphqlManagerUrl + "/" + request.operationName,
48
48
  });
49
+ const publicGraphQLLink = createUploadLink({
50
+ uri: request => graphqlPublicUrl + "/" + request.operationName,
51
+ });
49
52
  const imageUploadGraphQLLink = createUploadLink({
50
53
  uri: request => graphqlManagerImageUploadUrl + "/" + request.operationName,
51
54
  });
@@ -116,7 +119,7 @@ const ManagerApolloProvider = ({ children }) => {
116
119
  errorLink,
117
120
  authLink,
118
121
  split(operation => operation.getContext().clientName === "imageupload", imageUploadGraphQLLink),
119
- split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, legacyGraphQLLink)),
122
+ split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, isIrisApp ? publicGraphQLLink : legacyGraphQLLink)),
120
123
  ]),
121
124
  });
122
125
  return jsx(ApolloProvider, Object.assign({ client: client }, { children: children }));
@@ -249,7 +252,7 @@ const UserSubscriptionProvider = ({ children }) => {
249
252
  return jsx(UserSubscriptionProvider$1, Object.assign({ value: subscription }, { children: children }));
250
253
  };
251
254
 
252
- const TrackunitDataProviders = ({ children }) => (jsx(TileEnvironmentProvider, { children: jsx(TileTokenProvider, { children: jsx(TileCurrentUserProvider, { children: jsx(UserSubscriptionProvider, { children: jsx(TileGlobalSelectionProvider, { children: jsx(TileAssetSortingProvider, { children: jsx(ManagerApolloProvider, { children: children }) }) }) }) }) }) }));
255
+ const TrackunitDataProviders = ({ children }) => (jsx(TileEnvironmentProvider, { children: jsx(TileTokenProvider, { children: jsx(TileCurrentUserProvider, { children: jsx(UserSubscriptionProvider, { children: jsx(TileGlobalSelectionProvider, { children: jsx(TileAssetSortingProvider, { children: jsx(ManagerApolloProvider, Object.assign({ isIrisApp: true }, { children: children })) }) }) }) }) }) }));
253
256
 
254
257
  const HostNavigator = ({ children }) => {
255
258
  useURLSynchronization();
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "0.4.71",
3
+ "version": "0.4.75",
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.14",
9
- "@trackunit/react-core-contexts-api": "0.2.13",
10
- "@trackunit/react-core-contexts-test": "0.1.24",
11
- "@trackunit/react-core-hooks": "0.2.23",
8
+ "@trackunit/iris-app-runtime-core": "0.3.16",
9
+ "@trackunit/react-core-contexts-api": "0.2.14",
10
+ "@trackunit/react-core-contexts-test": "0.1.27",
11
+ "@trackunit/react-core-hooks": "0.2.26",
12
12
  "react": "18.2.0",
13
13
  "@apollo/client": "3.6.9",
14
14
  "@sentry/browser": "7.24.2",
15
15
  "apollo-upload-client": "14.1.3",
16
- "@trackunit/i18n-library-translation": "0.0.26",
17
- "@trackunit/react-components": "0.1.48",
16
+ "@trackunit/i18n-library-translation": "0.0.28",
17
+ "@trackunit/react-components": "0.1.52",
18
18
  "react-router-dom": "6.4.5"
19
19
  },
20
20
  "module": "./index.js",
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  interface IProps {
3
3
  children: React.ReactNode;
4
+ isIrisApp?: boolean;
4
5
  }
5
- export declare const ManagerApolloProvider: ({ children }: IProps) => JSX.Element;
6
+ export declare const ManagerApolloProvider: ({ children, isIrisApp }: IProps) => JSX.Element;
6
7
  export {};