@commercetools-frontend/application-shell 21.10.0 → 21.11.0

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 (36) hide show
  1. package/dist/{application-entry-point-9a23a345.cjs.prod.js → application-entry-point-06ad02d5.cjs.prod.js} +210 -53
  2. package/dist/{application-entry-point-a5b662f7.esm.js → application-entry-point-28843eb4.esm.js} +205 -51
  3. package/dist/{application-entry-point-4de6686c.cjs.dev.js → application-entry-point-6189b3a3.cjs.dev.js} +210 -53
  4. package/dist/commercetools-frontend-application-shell.cjs.dev.js +16 -16
  5. package/dist/commercetools-frontend-application-shell.cjs.prod.js +16 -16
  6. package/dist/commercetools-frontend-application-shell.esm.js +13 -13
  7. package/dist/declarations/src/configure-apollo.d.ts +1 -2
  8. package/dist/declarations/src/export-types.d.ts +2 -2
  9. package/dist/declarations/src/utils/apollo-client-runtime-cache.d.ts +1 -2
  10. package/dist/declarations/src/utils/apollo-context.d.ts +3 -14
  11. package/dist/declarations/src/utils/http-client.d.ts +10 -0
  12. package/dist/{index-e96ff96a.cjs.prod.js → index-4ebc615c.cjs.prod.js} +99 -261
  13. package/dist/{index-5062ecc2.esm.js → index-5fcda492.esm.js} +102 -259
  14. package/dist/{index-f576ae07.cjs.dev.js → index-bcff2029.cjs.dev.js} +99 -261
  15. package/dist/{project-expired-609688e8.esm.js → project-expired-53f0f1ff.esm.js} +14 -14
  16. package/dist/{project-expired-1f22bb6e.cjs.dev.js → project-expired-96b88908.cjs.dev.js} +14 -14
  17. package/dist/{project-expired-3802e644.cjs.prod.js → project-expired-9fb2e01b.cjs.prod.js} +14 -14
  18. package/dist/{project-not-found-345a1103.cjs.prod.js → project-not-found-17e74630.cjs.prod.js} +14 -14
  19. package/dist/{project-not-found-2bf5f586.cjs.dev.js → project-not-found-30c140be.cjs.dev.js} +14 -14
  20. package/dist/{project-not-found-931cbb6b.esm.js → project-not-found-e8ca2011.esm.js} +14 -14
  21. package/dist/{project-not-initialized-24d58aac.cjs.dev.js → project-not-initialized-8bec4622.cjs.dev.js} +14 -14
  22. package/dist/{project-not-initialized-f840b682.cjs.prod.js → project-not-initialized-c5116ce2.cjs.prod.js} +14 -14
  23. package/dist/{project-not-initialized-69a8f77c.esm.js → project-not-initialized-c83c731d.esm.js} +14 -14
  24. package/dist/{project-suspended-b650b271.esm.js → project-suspended-14419c20.esm.js} +14 -14
  25. package/dist/{project-suspended-a21d49f2.cjs.dev.js → project-suspended-748201e1.cjs.dev.js} +14 -14
  26. package/dist/{project-suspended-283ebad8.cjs.prod.js → project-suspended-892ad1b9.cjs.prod.js} +14 -14
  27. package/dist/{quick-access-6368a1c1.cjs.prod.js → quick-access-a451f632.cjs.prod.js} +11 -11
  28. package/dist/{quick-access-193a477e.esm.js → quick-access-b0132ced.esm.js} +11 -11
  29. package/dist/{quick-access-d42f4898.cjs.dev.js → quick-access-c08139f1.cjs.dev.js} +11 -11
  30. package/dist/{service-page-project-switcher-5e28ee0f.cjs.prod.js → service-page-project-switcher-4b7ab3ee.cjs.prod.js} +1 -1
  31. package/dist/{service-page-project-switcher-ea8878cf.esm.js → service-page-project-switcher-53ffca17.esm.js} +1 -1
  32. package/dist/{service-page-project-switcher-5d2bef22.cjs.dev.js → service-page-project-switcher-c99348cd.cjs.dev.js} +1 -1
  33. package/package.json +16 -16
  34. package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +12 -2
  35. package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +12 -2
  36. package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +12 -2
@@ -1,5 +1,5 @@
1
- export { p as RouteCatchAll, x as applyDefaultMiddlewares, f as createApolloClient, n as selectProjectKeyFromUrl, t as selectUserId, v as version } from './application-entry-point-a5b662f7.esm.js';
2
- export { A as ApplicationShell, a as ApplicationShellProvider, C as ConfigureIntlProvider, G as GtmContext, b as GtmUserLogoutTracker, I as InjectReducers, S as SetupFlopFlipProvider, d as SuspendedRoute, g as buildApiUrl, c as createApolloContextForProxyForwardTo, h as createHttpClientOptions, i as executeHttpClientRequest, s as setupGlobalErrorListener, e as useMcLazyQuery, f as useMcMutation, u as useMcQuery } from './index-5062ecc2.esm.js';
1
+ export { p as RouteCatchAll, q as applyDefaultMiddlewares, w as buildApiUrl, f as createApolloClient, x as createHttpClientOptions, y as executeHttpClientRequest, n as selectProjectKeyFromUrl, t as selectUserId, v as version } from './application-entry-point-28843eb4.esm.js';
2
+ export { A as ApplicationShell, a as ApplicationShellProvider, C as ConfigureIntlProvider, G as GtmContext, b as GtmUserLogoutTracker, I as InjectReducers, S as SetupFlopFlipProvider, d as SuspendedRoute, c as createApolloContextForProxyForwardTo, s as setupGlobalErrorListener, e as useMcLazyQuery, f as useMcMutation, u as useMcQuery } from './index-5fcda492.esm.js';
3
3
  import '@babel/runtime-corejs3/core-js-stable/instance/filter';
4
4
  import 'uuid';
5
5
  import '@babel/runtime-corejs3/core-js-stable/url';
@@ -42,7 +42,6 @@ import '@babel/runtime-corejs3/core-js-stable/instance/slice';
42
42
  import '@commercetools-frontend/sentry';
43
43
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
44
44
  import '@apollo/client';
45
- import '@commercetools/http-user-agent';
46
45
  import 'apollo-link-logger';
47
46
  import '@babel/runtime-corejs3/core-js-stable/array/from';
48
47
  import '@babel/runtime-corejs3/core-js-stable/symbol';
@@ -53,7 +52,18 @@ import '@commercetools-frontend/browser-history';
53
52
  import '@babel/runtime-corejs3/core-js-stable/instance/some';
54
53
  import '@babel/runtime-corejs3/core-js-stable/object/values';
55
54
  import '@babel/runtime-corejs3/core-js-stable/instance/map';
55
+ import '@commercetools/http-user-agent';
56
56
  import '@babel/runtime-corejs3/core-js-stable/json/stringify';
57
+ import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
58
+ import '@babel/runtime-corejs3/helpers/asyncToGenerator';
59
+ import '@babel/runtime-corejs3/helpers/createClass';
60
+ import '@babel/runtime-corejs3/helpers/classCallCheck';
61
+ import '@babel/runtime-corejs3/helpers/assertThisInitialized';
62
+ import '@babel/runtime-corejs3/helpers/inherits';
63
+ import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
64
+ import '@babel/runtime-corejs3/helpers/getPrototypeOf';
65
+ import '@babel/runtime-corejs3/helpers/wrapNativeSuper';
66
+ import '@babel/runtime-corejs3/regenerator';
57
67
  import '@apollo/client/link/retry';
58
68
  import 'prop-types';
59
69
  import 'react';
@@ -81,12 +91,6 @@ import '@commercetools-uikit/text';
81
91
  import '@commercetools-uikit/flat-button';
82
92
  import '@commercetools-uikit/icons';
83
93
  import '@commercetools-frontend/assets/images/ct-logo.svg';
84
- import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
85
- import '@babel/runtime-corejs3/helpers/classCallCheck';
86
- import '@babel/runtime-corejs3/helpers/createClass';
87
- import '@babel/runtime-corejs3/helpers/inherits';
88
- import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
89
- import '@babel/runtime-corejs3/helpers/getPrototypeOf';
90
94
  import '@commercetools-frontend/assets/images/icecream.svg';
91
95
  import '@commercetools-frontend/l10n';
92
96
  import '@commercetools-frontend/assets/images/logo.svg';
@@ -99,8 +103,6 @@ import 'memoize-one';
99
103
  import '@commercetools-uikit/select-input';
100
104
  import '@babel/runtime-corejs3/helpers/taggedTemplateLiteral';
101
105
  import 'lodash/isNil';
102
- import '@babel/runtime-corejs3/helpers/asyncToGenerator';
103
- import '@babel/runtime-corejs3/regenerator';
104
106
  import '@babel/runtime-corejs3/core-js-stable/object/from-entries';
105
107
  import '@babel/runtime-corejs3/core-js-stable/instance/flags';
106
108
  import '@flopflip/http-adapter';
@@ -112,5 +114,3 @@ import '@commercetools-frontend/assets/images/diagonal-line.svg';
112
114
  import 'lodash/throttle';
113
115
  import '@commercetools-frontend/url-utils';
114
116
  import '@commercetools-frontend/actions-global';
115
- import '@babel/runtime-corejs3/helpers/assertThisInitialized';
116
- import '@babel/runtime-corejs3/helpers/wrapNativeSuper';
@@ -1,5 +1,4 @@
1
- import type { NormalizedCacheObject, InMemoryCacheConfig } from '@apollo/client';
2
- import { ApolloClient, ApolloLink } from '@apollo/client';
1
+ import { type NormalizedCacheObject, type InMemoryCacheConfig, ApolloClient, ApolloLink } from '@apollo/client';
3
2
  declare type TApolloClientOptions = {
4
3
  cache?: InMemoryCacheConfig;
5
4
  restLink?: ApolloLink;
@@ -1,5 +1,5 @@
1
- import type { TApolloContext as ApolloContext, TForwardToAudiencePolicy as ForwardToAudiencePolicy } from './utils/apollo-context';
2
- import type { TFetcher, TFetcherResponse, THeaders, TConfig, TOptions } from './utils/http-client';
1
+ import type { TApolloContext as ApolloContext } from './utils/apollo-context';
2
+ import type { TFetcher, TFetcherResponse, THeaders, TConfig, TOptions, TForwardToAudiencePolicy as ForwardToAudiencePolicy } from './utils/http-client';
3
3
  export declare type TApolloContext = ApolloContext;
4
4
  export declare type TForwardToAudiencePolicy = ForwardToAudiencePolicy;
5
5
  export declare type THttpClientFetcher<Data> = TFetcher<Data>;
@@ -1,5 +1,4 @@
1
- import type { NormalizedCacheObject } from '@apollo/client';
2
- import { ApolloClient } from '@apollo/client';
1
+ import { type NormalizedCacheObject, ApolloClient } from '@apollo/client';
3
2
  declare const setCachedApolloClient: (apolloClient: ApolloClient<NormalizedCacheObject>) => void;
4
3
  declare const getCachedApolloClient: () => ApolloClient<NormalizedCacheObject> | undefined;
5
4
  export { setCachedApolloClient, getCachedApolloClient };
@@ -1,15 +1,9 @@
1
1
  import type { TGraphQLTargets } from '@commercetools-frontend/constants';
2
- export declare type THeaders = Record<string, string>;
3
- export declare type TForwardToAudiencePolicy = 'forward-url-full-path' | 'forward-url-origin';
2
+ import type { THeaders, TForwardToConfig } from './http-client';
4
3
  export declare type TApolloContext = {
5
4
  uri?: string;
6
5
  headers?: THeaders;
7
- forwardToConfig?: {
8
- version: string;
9
- uri: string;
10
- headers?: THeaders;
11
- audiencePolicy: TForwardToAudiencePolicy;
12
- };
6
+ forwardToConfig?: TForwardToConfig;
13
7
  skipGraphQlTargetCheck?: boolean;
14
8
  skipTokenRetry?: boolean;
15
9
  target?: TGraphQLTargets;
@@ -17,10 +11,5 @@ export declare type TApolloContext = {
17
11
  teamId?: string;
18
12
  featureFlag?: string;
19
13
  };
20
- declare type TApolloContextProxyForwardTo = {
21
- uri: string;
22
- headers?: THeaders;
23
- audiencePolicy?: TForwardToAudiencePolicy;
24
- };
25
- declare const createApolloContextForProxyForwardTo: (proxyForwardTocontext: TApolloContextProxyForwardTo) => TApolloContext;
14
+ declare const createApolloContextForProxyForwardTo: (proxyForwardTocontext: TForwardToConfig) => TApolloContext;
26
15
  export { createApolloContextForProxyForwardTo };
@@ -1,7 +1,17 @@
1
1
  export declare type THeaders = Record<string, string>;
2
+ export declare type TForwardToAudiencePolicy = 'forward-url-full-path' | 'forward-url-origin';
3
+ export declare type TForwardToConfigVersion = 'v1' | 'v2';
4
+ export declare type TForwardToConfig = {
5
+ uri: string;
6
+ headers?: THeaders;
7
+ audiencePolicy?: TForwardToAudiencePolicy;
8
+ version?: TForwardToConfigVersion;
9
+ };
2
10
  export declare type TConfig = {
3
11
  userAgent?: string;
4
12
  headers?: THeaders;
13
+ forwardToConfig?: TForwardToConfig;
14
+ projectKey?: string;
5
15
  };
6
16
  export declare type TOptions = {
7
17
  credentials: 'include';