@commercetools-frontend/application-shell 20.10.6 → 20.12.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.
- package/dist/{application-entry-point-015f1dfd.cjs.dev.js → application-entry-point-140f92f2.cjs.dev.js} +11 -5
- package/dist/{application-entry-point-7f99da26.esm.js → application-entry-point-21cef8e6.esm.js} +11 -6
- package/dist/{application-entry-point-9247fc63.cjs.prod.js → application-entry-point-aa870890.cjs.prod.js} +11 -5
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +3 -3
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +3 -3
- package/dist/commercetools-frontend-application-shell.esm.js +3 -3
- package/dist/declarations/src/apollo-links/utils.d.ts +1 -1
- package/dist/declarations/src/components/application-shell/helpers.d.ts +1 -0
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +13 -13
- package/dist/declarations/src/hooks/use-is-served-by-proxy/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-is-served-by-proxy/use-is-served-by-proxy.d.ts +2 -0
- package/dist/declarations/src/types/generated/ctp.d.ts +3619 -3336
- package/dist/declarations/src/types/generated/mc.d.ts +189 -195
- package/dist/declarations/src/types/generated/proxy.d.ts +28 -28
- package/dist/declarations/src/types/generated/settings.d.ts +1425 -2504
- package/dist/{index-f012b7bd.cjs.prod.js → index-473958c5.cjs.prod.js} +85 -30
- package/dist/{index-c6cce324.cjs.dev.js → index-91dc2ebb.cjs.dev.js} +104 -49
- package/dist/{index-e34cdcda.esm.js → index-eebc40b6.esm.js} +104 -49
- package/dist/{project-expired-3b4cf60d.esm.js → project-expired-9d8377ce.esm.js} +3 -3
- package/dist/{project-expired-0c4726a5.cjs.prod.js → project-expired-a0163148.cjs.prod.js} +3 -3
- package/dist/{project-expired-a8eb69b9.cjs.dev.js → project-expired-d0c9a419.cjs.dev.js} +3 -3
- package/dist/{project-not-found-52138a75.cjs.dev.js → project-not-found-4f1e5015.cjs.dev.js} +3 -3
- package/dist/{project-not-found-0baa83dc.cjs.prod.js → project-not-found-6bdfc28d.cjs.prod.js} +3 -3
- package/dist/{project-not-found-1a2b80e0.esm.js → project-not-found-a48ca67b.esm.js} +3 -3
- package/dist/{project-not-initialized-40da3944.esm.js → project-not-initialized-746e3f1c.esm.js} +3 -3
- package/dist/{project-not-initialized-8589ae81.cjs.dev.js → project-not-initialized-84372c36.cjs.dev.js} +3 -3
- package/dist/{project-not-initialized-429473b1.cjs.prod.js → project-not-initialized-e07d2b6b.cjs.prod.js} +3 -3
- package/dist/{project-suspended-9bc132ab.cjs.prod.js → project-suspended-08625b77.cjs.prod.js} +3 -3
- package/dist/{project-suspended-a23e7271.esm.js → project-suspended-1a678884.esm.js} +3 -3
- package/dist/{project-suspended-9697db58.cjs.dev.js → project-suspended-bee672c3.cjs.dev.js} +3 -3
- package/dist/{quick-access-821643e7.cjs.prod.js → quick-access-0a31b56f.cjs.prod.js} +2 -2
- package/dist/{quick-access-9fbae3f2.cjs.dev.js → quick-access-a50256b3.cjs.dev.js} +2 -2
- package/dist/{quick-access-74ab8004.esm.js → quick-access-de902fa0.esm.js} +2 -2
- package/dist/{service-page-project-switcher-03ca40af.esm.js → service-page-project-switcher-454e6146.esm.js} +1 -1
- package/dist/{service-page-project-switcher-690fde70.cjs.dev.js → service-page-project-switcher-ab78eb6d.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-3adcc61d.cjs.prod.js → service-page-project-switcher-bf6bb20a.cjs.prod.js} +1 -1
- package/package.json +33 -33
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +1 -1
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +1 -1
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +1 -1
|
@@ -55,8 +55,8 @@ var _pt = require('prop-types');
|
|
|
55
55
|
var react = require('react');
|
|
56
56
|
var reactRouterDom = require('react-router-dom');
|
|
57
57
|
var invariant = require('tiny-invariant');
|
|
58
|
-
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
59
58
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
59
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
60
60
|
|
|
61
61
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
62
62
|
|
|
@@ -98,7 +98,7 @@ var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
|
98
98
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
99
99
|
|
|
100
100
|
// NOTE: This string will be replaced on build time with the package version.
|
|
101
|
-
var version = "20.
|
|
101
|
+
var version = "20.12.1";
|
|
102
102
|
|
|
103
103
|
var SUPPORTED_HEADERS = {
|
|
104
104
|
ACCEPT_VERSION: 'Accept-version',
|
|
@@ -932,6 +932,13 @@ var location = {
|
|
|
932
932
|
reload: reload
|
|
933
933
|
};
|
|
934
934
|
|
|
935
|
+
var useIsServedByProxy = function useIsServedByProxy() {
|
|
936
|
+
var servedByProxy = applicationShellConnectors.useApplicationContext(function (context) {
|
|
937
|
+
return context.environment.servedByProxy;
|
|
938
|
+
});
|
|
939
|
+
return servedByProxy;
|
|
940
|
+
};
|
|
941
|
+
|
|
935
942
|
var ForcePageReload = function ForcePageReload() {
|
|
936
943
|
react.useEffect(function () {
|
|
937
944
|
location.reload();
|
|
@@ -941,9 +948,7 @@ var ForcePageReload = function ForcePageReload() {
|
|
|
941
948
|
|
|
942
949
|
var RouteCatchAll = function RouteCatchAll() {
|
|
943
950
|
// NOTE: it's important that the return value is a `Route` component!
|
|
944
|
-
var servedByProxy =
|
|
945
|
-
return context.environment.servedByProxy;
|
|
946
|
-
}); // In case the application is served by a proxy server, we assume that
|
|
951
|
+
var servedByProxy = useIsServedByProxy(); // In case the application is served by a proxy server, we assume that
|
|
947
952
|
// the reverse proxy router handles requests forwarding to the specified
|
|
948
953
|
// service.
|
|
949
954
|
// For example, if the current "loaded" app is products and I click
|
|
@@ -1033,4 +1038,5 @@ exports.setActiveSession = setActiveSession;
|
|
|
1033
1038
|
exports.setCachedApolloClient = setCachedApolloClient;
|
|
1034
1039
|
exports.setSessionScope = setSessionScope;
|
|
1035
1040
|
exports.setSessionState = setSessionState;
|
|
1041
|
+
exports.useIsServedByProxy = useIsServedByProxy;
|
|
1036
1042
|
exports.version = version;
|
package/dist/{application-entry-point-7f99da26.esm.js → application-entry-point-21cef8e6.esm.js}
RENAMED
|
@@ -53,11 +53,11 @@ import _pt from 'prop-types';
|
|
|
53
53
|
import { useEffect, Children } from 'react';
|
|
54
54
|
import { Route, Switch, Redirect } from 'react-router-dom';
|
|
55
55
|
import invariant from 'tiny-invariant';
|
|
56
|
-
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
57
56
|
import { PageNotFound } from '@commercetools-frontend/application-components';
|
|
57
|
+
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
58
58
|
|
|
59
59
|
// NOTE: This string will be replaced on build time with the package version.
|
|
60
|
-
var version = "20.
|
|
60
|
+
var version = "20.12.1";
|
|
61
61
|
|
|
62
62
|
var SUPPORTED_HEADERS = {
|
|
63
63
|
ACCEPT_VERSION: 'Accept-version',
|
|
@@ -891,6 +891,13 @@ var location = {
|
|
|
891
891
|
reload: reload
|
|
892
892
|
};
|
|
893
893
|
|
|
894
|
+
var useIsServedByProxy = function useIsServedByProxy() {
|
|
895
|
+
var servedByProxy = useApplicationContext(function (context) {
|
|
896
|
+
return context.environment.servedByProxy;
|
|
897
|
+
});
|
|
898
|
+
return servedByProxy;
|
|
899
|
+
};
|
|
900
|
+
|
|
894
901
|
var ForcePageReload = function ForcePageReload() {
|
|
895
902
|
useEffect(function () {
|
|
896
903
|
location.reload();
|
|
@@ -900,9 +907,7 @@ var ForcePageReload = function ForcePageReload() {
|
|
|
900
907
|
|
|
901
908
|
var RouteCatchAll = function RouteCatchAll() {
|
|
902
909
|
// NOTE: it's important that the return value is a `Route` component!
|
|
903
|
-
var servedByProxy =
|
|
904
|
-
return context.environment.servedByProxy;
|
|
905
|
-
}); // In case the application is served by a proxy server, we assume that
|
|
910
|
+
var servedByProxy = useIsServedByProxy(); // In case the application is served by a proxy server, we assume that
|
|
906
911
|
// the reverse proxy router handles requests forwarding to the specified
|
|
907
912
|
// service.
|
|
908
913
|
// For example, if the current "loaded" app is products and I click
|
|
@@ -964,4 +969,4 @@ ApplicationEntryPoint.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
964
969
|
children: _pt.node
|
|
965
970
|
} : {};
|
|
966
971
|
|
|
967
|
-
export { ApplicationEntryPoint as A, CONTAINERS as C, OIDC_CLAIMS as O, REQUESTS_IN_FLIGHT_LOADER_DOM_ID as R, STORAGE_KEYS as S, getActiveProjectKey as a, getSessionScope as b, location as c, getSessionState as d, setActiveSession as e, createApolloClient as f, getMcApiUrl as g, setCachedApolloClient as h, internalReduxStore as i, SUSPENSION_REASONS as j, setSessionScope as k, logger as l, OIDC_RESPONSE_TYPES as m, setSessionState as n, clearSession as o, selectProjectKeyFromUrl as p, RequestsInFlightLoader as q, removeActiveProjectKey as r, setActiveProjectKey as s, RouteCatchAll as t,
|
|
972
|
+
export { ApplicationEntryPoint as A, CONTAINERS as C, OIDC_CLAIMS as O, REQUESTS_IN_FLIGHT_LOADER_DOM_ID as R, STORAGE_KEYS as S, getActiveProjectKey as a, getSessionScope as b, location as c, getSessionState as d, setActiveSession as e, createApolloClient as f, getMcApiUrl as g, setCachedApolloClient as h, internalReduxStore as i, SUSPENSION_REASONS as j, setSessionScope as k, logger as l, OIDC_RESPONSE_TYPES as m, setSessionState as n, clearSession as o, selectProjectKeyFromUrl as p, RequestsInFlightLoader as q, removeActiveProjectKey as r, setActiveProjectKey as s, RouteCatchAll as t, useIsServedByProxy as u, version as v, applyDefaultMiddlewares as w, selectUserId as x, createReduxStore as y };
|
|
@@ -55,8 +55,8 @@ require('prop-types');
|
|
|
55
55
|
var react = require('react');
|
|
56
56
|
var reactRouterDom = require('react-router-dom');
|
|
57
57
|
var invariant = require('tiny-invariant');
|
|
58
|
-
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
59
58
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
59
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
60
60
|
|
|
61
61
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
62
62
|
|
|
@@ -97,7 +97,7 @@ var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
|
97
97
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
98
98
|
|
|
99
99
|
// NOTE: This string will be replaced on build time with the package version.
|
|
100
|
-
var version = "20.
|
|
100
|
+
var version = "20.12.1";
|
|
101
101
|
|
|
102
102
|
var SUPPORTED_HEADERS = {
|
|
103
103
|
ACCEPT_VERSION: 'Accept-version',
|
|
@@ -923,6 +923,13 @@ var location = {
|
|
|
923
923
|
reload: reload
|
|
924
924
|
};
|
|
925
925
|
|
|
926
|
+
var useIsServedByProxy = function useIsServedByProxy() {
|
|
927
|
+
var servedByProxy = applicationShellConnectors.useApplicationContext(function (context) {
|
|
928
|
+
return context.environment.servedByProxy;
|
|
929
|
+
});
|
|
930
|
+
return servedByProxy;
|
|
931
|
+
};
|
|
932
|
+
|
|
926
933
|
var ForcePageReload = function ForcePageReload() {
|
|
927
934
|
react.useEffect(function () {
|
|
928
935
|
location.reload();
|
|
@@ -932,9 +939,7 @@ var ForcePageReload = function ForcePageReload() {
|
|
|
932
939
|
|
|
933
940
|
var RouteCatchAll = function RouteCatchAll() {
|
|
934
941
|
// NOTE: it's important that the return value is a `Route` component!
|
|
935
|
-
var servedByProxy =
|
|
936
|
-
return context.environment.servedByProxy;
|
|
937
|
-
}); // In case the application is served by a proxy server, we assume that
|
|
942
|
+
var servedByProxy = useIsServedByProxy(); // In case the application is served by a proxy server, we assume that
|
|
938
943
|
// the reverse proxy router handles requests forwarding to the specified
|
|
939
944
|
// service.
|
|
940
945
|
// For example, if the current "loaded" app is products and I click
|
|
@@ -1017,4 +1022,5 @@ exports.setActiveSession = setActiveSession;
|
|
|
1017
1022
|
exports.setCachedApolloClient = setCachedApolloClient;
|
|
1018
1023
|
exports.setSessionScope = setSessionScope;
|
|
1019
1024
|
exports.setSessionState = setSessionState;
|
|
1025
|
+
exports.useIsServedByProxy = useIsServedByProxy;
|
|
1020
1026
|
exports.version = version;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var applicationEntryPoint = require('./application-entry-point-
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var applicationEntryPoint = require('./application-entry-point-140f92f2.cjs.dev.js');
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-91dc2ebb.cjs.dev.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
8
|
require('uuid');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
@@ -61,8 +61,8 @@ require('prop-types');
|
|
|
61
61
|
require('react');
|
|
62
62
|
require('react-router-dom');
|
|
63
63
|
require('tiny-invariant');
|
|
64
|
-
require('@commercetools-frontend/application-shell-connectors');
|
|
65
64
|
require('@commercetools-frontend/application-components');
|
|
65
|
+
require('@commercetools-frontend/application-shell-connectors');
|
|
66
66
|
require('@emotion/styled/base');
|
|
67
67
|
require('@emotion/react');
|
|
68
68
|
require('@commercetools-frontend/i18n');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var applicationEntryPoint = require('./application-entry-point-
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var applicationEntryPoint = require('./application-entry-point-aa870890.cjs.prod.js');
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-473958c5.cjs.prod.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
8
|
require('uuid');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
@@ -61,8 +61,8 @@ require('prop-types');
|
|
|
61
61
|
require('react');
|
|
62
62
|
require('react-router-dom');
|
|
63
63
|
require('tiny-invariant');
|
|
64
|
-
require('@commercetools-frontend/application-shell-connectors');
|
|
65
64
|
require('@commercetools-frontend/application-components');
|
|
65
|
+
require('@commercetools-frontend/application-shell-connectors');
|
|
66
66
|
require('@emotion/styled/base');
|
|
67
67
|
require('@emotion/react');
|
|
68
68
|
require('@commercetools-frontend/i18n');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { t as RouteCatchAll,
|
|
2
|
-
export { A as ApplicationShell, a as ApplicationShellProvider, C as ConfigureIntlProvider, G as GtmContext, b as GtmUserLogoutTracker, I as InjectReducers, S as SetupFlopFlipProvider, c as createApolloContextForProxyForwardTo, s as setupGlobalErrorListener, d as useMcLazyQuery, e as useMcMutation, u as useMcQuery } from './index-
|
|
1
|
+
export { t as RouteCatchAll, w as applyDefaultMiddlewares, f as createApolloClient, p as selectProjectKeyFromUrl, x as selectUserId, v as version } from './application-entry-point-21cef8e6.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, c as createApolloContextForProxyForwardTo, s as setupGlobalErrorListener, d as useMcLazyQuery, e as useMcMutation, u as useMcQuery } from './index-eebc40b6.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';
|
|
@@ -57,8 +57,8 @@ import 'prop-types';
|
|
|
57
57
|
import 'react';
|
|
58
58
|
import 'react-router-dom';
|
|
59
59
|
import 'tiny-invariant';
|
|
60
|
-
import '@commercetools-frontend/application-shell-connectors';
|
|
61
60
|
import '@commercetools-frontend/application-components';
|
|
61
|
+
import '@commercetools-frontend/application-shell-connectors';
|
|
62
62
|
import '@emotion/styled/base';
|
|
63
63
|
import '@emotion/react';
|
|
64
64
|
import '@commercetools-frontend/i18n';
|
|
@@ -5,6 +5,6 @@ import type { TApolloContext } from '../utils/apollo-context';
|
|
|
5
5
|
declare const getSkipTokenRetry: (context: TApolloContext) => boolean;
|
|
6
6
|
declare const forwardTokenRetryHeader: (headers: TApolloContext['headers']) => TApolloContext['headers'];
|
|
7
7
|
declare const getDoesGraphQLTargetSupportTokenRetry: (context: TApolloContext) => boolean;
|
|
8
|
-
declare const isHttpError: (error: ErrorResponse['networkError']) => error is
|
|
8
|
+
declare const isHttpError: (error: ErrorResponse['networkError']) => error is ServerParseError | ServerError;
|
|
9
9
|
declare const isGraphQLError: (error: ErrorResponse['graphQLErrors']) => error is GraphQLError[];
|
|
10
10
|
export { getSkipTokenRetry, forwardTokenRetryHeader, getDoesGraphQLTargetSupportTokenRetry, isHttpError, isGraphQLError, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getMcOrigin(mcApiUrl: string, actualWindow?: Window & typeof globalThis): string;
|
|
@@ -12,52 +12,52 @@ declare const useNavbarStateManager: (props: HookProps) => {
|
|
|
12
12
|
shouldCloseMenuFly: (e: React.MouseEvent<HTMLElement> | MouseEvent) => void;
|
|
13
13
|
allApplicationNavbarMenu: {
|
|
14
14
|
__typename?: "NavbarMenu" | undefined;
|
|
15
|
-
shouldRenderDivider
|
|
15
|
+
shouldRenderDivider?: boolean | null | undefined;
|
|
16
16
|
key: string;
|
|
17
17
|
uriPath: string;
|
|
18
18
|
icon: string;
|
|
19
|
-
featureToggle
|
|
20
|
-
menuVisibility
|
|
19
|
+
featureToggle?: string | null | undefined;
|
|
20
|
+
menuVisibility?: string | null | undefined;
|
|
21
21
|
permissions: string[];
|
|
22
22
|
labelAllLocales: {
|
|
23
23
|
__typename?: "LocalizedField" | undefined;
|
|
24
24
|
locale: string;
|
|
25
25
|
value: string;
|
|
26
26
|
}[];
|
|
27
|
-
dataFences
|
|
27
|
+
dataFences?: {
|
|
28
28
|
__typename?: "DataFence" | undefined;
|
|
29
29
|
group: string;
|
|
30
30
|
name: string;
|
|
31
31
|
type: string;
|
|
32
|
-
}[]
|
|
33
|
-
actionRights
|
|
32
|
+
}[] | null | undefined;
|
|
33
|
+
actionRights?: {
|
|
34
34
|
__typename?: "ActionRight" | undefined;
|
|
35
35
|
group: string;
|
|
36
36
|
name: string;
|
|
37
|
-
}[]
|
|
37
|
+
}[] | null | undefined;
|
|
38
38
|
submenu: {
|
|
39
39
|
__typename?: "BaseMenu" | undefined;
|
|
40
40
|
key: string;
|
|
41
41
|
uriPath: string;
|
|
42
|
-
featureToggle
|
|
43
|
-
menuVisibility
|
|
42
|
+
featureToggle?: string | null | undefined;
|
|
43
|
+
menuVisibility?: string | null | undefined;
|
|
44
44
|
permissions: string[];
|
|
45
45
|
labelAllLocales: {
|
|
46
46
|
__typename?: "LocalizedField" | undefined;
|
|
47
47
|
locale: string;
|
|
48
48
|
value: string;
|
|
49
49
|
}[];
|
|
50
|
-
actionRights
|
|
50
|
+
actionRights?: {
|
|
51
51
|
__typename?: "ActionRight" | undefined;
|
|
52
52
|
group: string;
|
|
53
53
|
name: string;
|
|
54
|
-
}[]
|
|
55
|
-
dataFences
|
|
54
|
+
}[] | null | undefined;
|
|
55
|
+
dataFences?: {
|
|
56
56
|
__typename?: "DataFence" | undefined;
|
|
57
57
|
group: string;
|
|
58
58
|
name: string;
|
|
59
59
|
type: string;
|
|
60
|
-
}[]
|
|
60
|
+
}[] | null | undefined;
|
|
61
61
|
}[];
|
|
62
62
|
}[];
|
|
63
63
|
activeItemIndex?: string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './use-is-served-by-proxy';
|