@commercetools-frontend/application-shell 25.0.0 → 25.2.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.
- package/dist/{application-entry-point-1b23fb6b.esm.js → application-entry-point-10a5e1a5.esm.js} +4 -6
- package/dist/{application-entry-point-74a06151.cjs.prod.js → application-entry-point-8c4b8e53.cjs.prod.js} +3 -4
- package/dist/{application-entry-point-18d8fba0.cjs.dev.js → application-entry-point-c87294b0.cjs.dev.js} +4 -7
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +4 -5
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +4 -5
- package/dist/commercetools-frontend-application-shell.esm.js +4 -5
- package/dist/{custom-view-dev-host-dc7f2835.cjs.dev.js → custom-view-dev-host-116479c1.cjs.dev.js} +10 -15
- package/dist/{custom-view-dev-host-d72f9ae0.cjs.prod.js → custom-view-dev-host-8dd01b96.cjs.prod.js} +10 -15
- package/dist/{custom-view-dev-host-98432fc5.esm.js → custom-view-dev-host-c47927c7.esm.js} +10 -14
- package/dist/{index-208c3cdd.cjs.dev.js → index-1bdcc336.cjs.dev.js} +108 -132
- package/dist/{index-52c724ed.cjs.prod.js → index-245e2980.cjs.prod.js} +2 -2
- package/dist/{index-25183095.cjs.dev.js → index-614accc4.cjs.dev.js} +2 -2
- package/dist/{index-5aaa33bb.esm.js → index-86039df7.esm.js} +2 -2
- package/dist/{index-af2cc053.cjs.prod.js → index-aa7211d5.cjs.prod.js} +108 -132
- package/dist/{index-75206fba.esm.js → index-b26c8745.esm.js} +108 -131
- package/dist/{navbar-0bad8bc8.esm.js → navbar-9a40ead9.esm.js} +89 -104
- package/dist/{navbar-d4189469.cjs.dev.js → navbar-c51e0607.cjs.dev.js} +89 -105
- package/dist/{navbar-7653417f.cjs.prod.js → navbar-e287ce25.cjs.prod.js} +89 -105
- package/dist/oidc-8827f9fe.cjs.dev.js +98 -0
- package/dist/oidc-b2520905.esm.js +84 -0
- package/dist/{oidc-callback-3f9e25bc.cjs.prod.js → oidc-callback-13f8e123.cjs.prod.js} +8 -10
- package/dist/{oidc-callback-b6584fe8.esm.js → oidc-callback-39ea9b04.esm.js} +8 -10
- package/dist/{oidc-callback-f2f37906.cjs.dev.js → oidc-callback-59160485.cjs.dev.js} +8 -10
- package/dist/oidc-d74e6aa2.cjs.prod.js +98 -0
- package/dist/{project-container-27db6a7e.cjs.dev.js → project-container-a6c01dbf.cjs.dev.js} +11 -14
- package/dist/{project-container-0c9ee557.cjs.prod.js → project-container-ad2b76c9.cjs.prod.js} +11 -14
- package/dist/{project-container-8f8e017f.esm.js → project-container-f874583d.esm.js} +11 -14
- package/dist/{project-expired-b35819a4.cjs.dev.js → project-expired-743bae82.cjs.dev.js} +5 -6
- package/dist/{project-expired-da5d431c.cjs.prod.js → project-expired-a52200df.cjs.prod.js} +5 -6
- package/dist/{project-expired-bfa29d75.esm.js → project-expired-d917372c.esm.js} +5 -6
- package/dist/{project-not-found-fdb50d15.cjs.dev.js → project-not-found-5f0b2a72.cjs.dev.js} +4 -5
- package/dist/{project-not-found-695fadf6.cjs.prod.js → project-not-found-e4f79d38.cjs.prod.js} +4 -5
- package/dist/{project-not-found-5fc657c1.esm.js → project-not-found-ee259f9b.esm.js} +4 -5
- package/dist/{project-not-initialized-06d78b62.cjs.dev.js → project-not-initialized-58002613.cjs.dev.js} +5 -6
- package/dist/{project-not-initialized-a3b358cc.esm.js → project-not-initialized-6a3a2473.esm.js} +5 -6
- package/dist/{project-not-initialized-1603b228.cjs.prod.js → project-not-initialized-cfbd7c01.cjs.prod.js} +5 -6
- package/dist/{project-suspended-324978bc.cjs.prod.js → project-suspended-18764104.cjs.prod.js} +4 -5
- package/dist/{project-suspended-7e2257ac.cjs.dev.js → project-suspended-9cc251b0.cjs.dev.js} +4 -5
- package/dist/{project-suspended-d85025fe.esm.js → project-suspended-befd6810.esm.js} +4 -5
- package/dist/{redirect-to-login-3e4a6434.cjs.prod.js → redirect-to-login-12f467b8.cjs.prod.js} +10 -13
- package/dist/{redirect-to-login-edbfacbc.esm.js → redirect-to-login-2944c890.esm.js} +10 -13
- package/dist/{redirect-to-login-66ea895a.cjs.dev.js → redirect-to-login-3bee13ba.cjs.dev.js} +10 -13
- package/dist/{redirect-to-logout-ab5d2b07.cjs.dev.js → redirect-to-logout-7a1fd867.cjs.dev.js} +6 -8
- package/dist/{redirect-to-logout-aea7e913.esm.js → redirect-to-logout-ace73e1b.esm.js} +6 -8
- package/dist/{redirect-to-logout-f96c0c4b.cjs.prod.js → redirect-to-logout-ba4a0b0b.cjs.prod.js} +6 -8
- package/dist/{redirector-c858d578.cjs.prod.js → redirector-0c72d0a4.cjs.prod.js} +3 -4
- package/dist/{redirector-0efdd994.cjs.dev.js → redirector-72ccfbc2.cjs.dev.js} +3 -4
- package/dist/{redirector-656c6ee7.esm.js → redirector-d856975f.esm.js} +3 -4
- package/dist/{requests-in-flight-loader-5f216050.esm.js → requests-in-flight-loader-78c4428e.esm.js} +4 -5
- package/dist/{requests-in-flight-loader-3ffee0c0.cjs.prod.js → requests-in-flight-loader-b7225f9e.cjs.prod.js} +4 -5
- package/dist/{requests-in-flight-loader-08ef339c.cjs.dev.js → requests-in-flight-loader-cbc5faa0.cjs.dev.js} +4 -5
- package/dist/{service-page-project-switcher-9c5c86df.cjs.dev.js → service-page-project-switcher-09e3adc9.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-99b35fc0.esm.js → service-page-project-switcher-9cac7971.esm.js} +1 -1
- package/dist/{service-page-project-switcher-b21619c0.cjs.prod.js → service-page-project-switcher-d8772801.cjs.prod.js} +1 -1
- package/dist/{use-applications-menu-21c7420b.cjs.prod.js → use-applications-menu-8984efa1.cjs.prod.js} +39 -47
- package/dist/{use-applications-menu-8ff2d130.esm.js → use-applications-menu-bc2b9a66.esm.js} +37 -44
- package/dist/{use-applications-menu-7a85c3ee.cjs.dev.js → use-applications-menu-bd718ac8.cjs.dev.js} +39 -47
- package/dist/{user-settings-menu-2d3bfa75.cjs.prod.js → user-settings-menu-013f0041.cjs.prod.js} +22 -29
- package/dist/{user-settings-menu-31e6bb38.esm.js → user-settings-menu-16e8d020.esm.js} +22 -29
- package/dist/{user-settings-menu-c37b343f.cjs.dev.js → user-settings-menu-dc598434.cjs.dev.js} +22 -29
- package/package.json +17 -17
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +1 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +22 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +22 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +17 -20
- package/dist/oidc-258fc018.cjs.prod.js +0 -115
- package/dist/oidc-35e8e62a.esm.js +0 -100
- package/dist/oidc-87d116c1.cjs.dev.js +0 -115
|
@@ -11,15 +11,15 @@ import { useLocation } from 'react-router-dom';
|
|
|
11
11
|
import { LOGOUT_REASONS } from '@commercetools-frontend/constants';
|
|
12
12
|
import { u as useIsServedByProxy } from './use-is-served-by-proxy-a383da4b.esm.js';
|
|
13
13
|
import { g as getMcOrigin } from './get-mc-origin-fecfee07.esm.js';
|
|
14
|
-
import { R as RedirectToLogin } from './index-
|
|
15
|
-
import { R as Redirector } from './redirector-
|
|
14
|
+
import { R as RedirectToLogin } from './index-b26c8745.esm.js';
|
|
15
|
+
import { R as Redirector } from './redirector-d856975f.esm.js';
|
|
16
16
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
17
17
|
import '@commercetools-frontend/application-shell-connectors';
|
|
18
18
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
19
19
|
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
20
20
|
import '@babel/runtime-corejs3/core-js-stable/instance/reverse';
|
|
21
21
|
import 'react';
|
|
22
|
-
import './index-
|
|
22
|
+
import './index-86039df7.esm.js';
|
|
23
23
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
24
24
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
25
25
|
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
@@ -44,7 +44,7 @@ import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
|
44
44
|
import '@emotion/react';
|
|
45
45
|
import '@commercetools-frontend/application-components';
|
|
46
46
|
import '@commercetools-frontend/i18n';
|
|
47
|
-
import './oidc-
|
|
47
|
+
import './oidc-b2520905.esm.js';
|
|
48
48
|
import '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
49
49
|
import '@commercetools-uikit/design-system';
|
|
50
50
|
import '@commercetools-uikit/spacings';
|
|
@@ -52,7 +52,6 @@ import 'react-intl';
|
|
|
52
52
|
import '@commercetools-uikit/flat-button';
|
|
53
53
|
import '@commercetools-uikit/icons';
|
|
54
54
|
import './location-f21dbc25.esm.js';
|
|
55
|
-
import '@babel/runtime-corejs3/helpers/taggedTemplateLiteral';
|
|
56
55
|
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
57
56
|
import 'memoize-one';
|
|
58
57
|
import 'react-select';
|
|
@@ -92,10 +91,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
92
91
|
// When the application redirects to this route, we always force a hard redirect
|
|
93
92
|
// to the logout route of the authentication service.
|
|
94
93
|
const RedirectToLogout = props => {
|
|
95
|
-
var _window$app$__DEVELOP, _props$reason;
|
|
96
94
|
const location = useLocation();
|
|
97
95
|
const servedByProxy = useIsServedByProxy();
|
|
98
|
-
if (
|
|
96
|
+
if (window.app.__DEVELOPMENT__?.oidc?.authorizeUrl) {
|
|
99
97
|
return jsx(RedirectToLogin, {});
|
|
100
98
|
}
|
|
101
99
|
const mcOrigin = servedByProxy ? getMcOrigin(window.app.mcApiUrl) : undefined;
|
|
@@ -104,7 +102,7 @@ const RedirectToLogout = props => {
|
|
|
104
102
|
origin: mcOrigin,
|
|
105
103
|
location: location,
|
|
106
104
|
queryParams: _objectSpread({
|
|
107
|
-
reason:
|
|
105
|
+
reason: props.reason ?? LOGOUT_REASONS.USER
|
|
108
106
|
}, servedByProxy ? {} : {
|
|
109
107
|
// This will be used after being logged in, to redirect to this location.
|
|
110
108
|
redirectTo: window.location.origin
|
package/dist/{redirect-to-logout-f96c0c4b.cjs.prod.js → redirect-to-logout-ba4a0b0b.cjs.prod.js}
RENAMED
|
@@ -13,15 +13,15 @@ var reactRouterDom = require('react-router-dom');
|
|
|
13
13
|
var constants = require('@commercetools-frontend/constants');
|
|
14
14
|
var useIsServedByProxy = require('./use-is-served-by-proxy-480e8de8.cjs.prod.js');
|
|
15
15
|
var getMcOrigin = require('./get-mc-origin-8f7a578c.cjs.prod.js');
|
|
16
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
17
|
-
var redirector = require('./redirector-
|
|
16
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-aa7211d5.cjs.prod.js');
|
|
17
|
+
var redirector = require('./redirector-0c72d0a4.cjs.prod.js');
|
|
18
18
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
19
19
|
require('@commercetools-frontend/application-shell-connectors');
|
|
20
20
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
21
21
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
22
22
|
require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
|
|
23
23
|
require('react');
|
|
24
|
-
require('./index-
|
|
24
|
+
require('./index-245e2980.cjs.prod.js');
|
|
25
25
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
26
26
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
27
27
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -46,7 +46,7 @@ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
|
46
46
|
require('@emotion/react');
|
|
47
47
|
require('@commercetools-frontend/application-components');
|
|
48
48
|
require('@commercetools-frontend/i18n');
|
|
49
|
-
require('./oidc-
|
|
49
|
+
require('./oidc-d74e6aa2.cjs.prod.js');
|
|
50
50
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
51
51
|
require('@commercetools-uikit/design-system');
|
|
52
52
|
require('@commercetools-uikit/spacings');
|
|
@@ -54,7 +54,6 @@ require('react-intl');
|
|
|
54
54
|
require('@commercetools-uikit/flat-button');
|
|
55
55
|
require('@commercetools-uikit/icons');
|
|
56
56
|
require('./location-537e0660.cjs.prod.js');
|
|
57
|
-
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
58
57
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
59
58
|
require('memoize-one');
|
|
60
59
|
require('react-select');
|
|
@@ -105,10 +104,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
105
104
|
// When the application redirects to this route, we always force a hard redirect
|
|
106
105
|
// to the logout route of the authentication service.
|
|
107
106
|
const RedirectToLogout = props => {
|
|
108
|
-
var _window$app$__DEVELOP, _props$reason;
|
|
109
107
|
const location = reactRouterDom.useLocation();
|
|
110
108
|
const servedByProxy = useIsServedByProxy.useIsServedByProxy();
|
|
111
|
-
if (
|
|
109
|
+
if (window.app.__DEVELOPMENT__?.oidc?.authorizeUrl) {
|
|
112
110
|
return jsxRuntime.jsx(dist_commercetoolsFrontendApplicationShell.RedirectToLogin, {});
|
|
113
111
|
}
|
|
114
112
|
const mcOrigin = servedByProxy ? getMcOrigin.getMcOrigin(window.app.mcApiUrl) : undefined;
|
|
@@ -117,7 +115,7 @@ const RedirectToLogout = props => {
|
|
|
117
115
|
origin: mcOrigin,
|
|
118
116
|
location: location,
|
|
119
117
|
queryParams: _objectSpread({
|
|
120
|
-
reason:
|
|
118
|
+
reason: props.reason ?? constants.LOGOUT_REASONS.USER
|
|
121
119
|
}, servedByProxy ? {} : {
|
|
122
120
|
// This will be used after being logged in, to redirect to this location.
|
|
123
121
|
redirectTo: window.location.origin
|
|
@@ -33,15 +33,14 @@ const redirectTo = targetUrl => {
|
|
|
33
33
|
};
|
|
34
34
|
const useRedirector = () => {
|
|
35
35
|
const redirector = react.useCallback(options => {
|
|
36
|
-
var _options$origin, _options$queryParams, _enhancedLocation$que;
|
|
37
36
|
// For now the authentication service runs on the same domain as the application,
|
|
38
37
|
// even on development (using the webpack dev server).
|
|
39
|
-
const originUrl =
|
|
38
|
+
const originUrl = options.origin ?? window.location.origin;
|
|
40
39
|
const enhancedLocation = options.location || {};
|
|
41
|
-
const searchQuery = _objectSpread(_objectSpread({},
|
|
40
|
+
const searchQuery = _objectSpread(_objectSpread({}, options.queryParams ?? {}), enhancedLocation.query ?? {});
|
|
42
41
|
const targetUrlObject = new _URL__default["default"](originUrl);
|
|
43
42
|
targetUrlObject.pathname = options.to || targetUrlObject.pathname;
|
|
44
|
-
targetUrlObject.search =
|
|
43
|
+
targetUrlObject.search = `?${qss.encode(searchQuery)}`;
|
|
45
44
|
const targetUrl = targetUrlObject.toString();
|
|
46
45
|
redirectTo(targetUrl);
|
|
47
46
|
}, []);
|
|
@@ -33,15 +33,14 @@ const redirectTo = targetUrl => {
|
|
|
33
33
|
};
|
|
34
34
|
const useRedirector = () => {
|
|
35
35
|
const redirector = react.useCallback(options => {
|
|
36
|
-
var _options$origin, _options$queryParams, _enhancedLocation$que;
|
|
37
36
|
// For now the authentication service runs on the same domain as the application,
|
|
38
37
|
// even on development (using the webpack dev server).
|
|
39
|
-
const originUrl =
|
|
38
|
+
const originUrl = options.origin ?? window.location.origin;
|
|
40
39
|
const enhancedLocation = options.location || {};
|
|
41
|
-
const searchQuery = _objectSpread(_objectSpread({},
|
|
40
|
+
const searchQuery = _objectSpread(_objectSpread({}, options.queryParams ?? {}), enhancedLocation.query ?? {});
|
|
42
41
|
const targetUrlObject = new _URL__default["default"](originUrl);
|
|
43
42
|
targetUrlObject.pathname = options.to || targetUrlObject.pathname;
|
|
44
|
-
targetUrlObject.search =
|
|
43
|
+
targetUrlObject.search = `?${qss.encode(searchQuery)}`;
|
|
45
44
|
const targetUrl = targetUrlObject.toString();
|
|
46
45
|
redirectTo(targetUrl);
|
|
47
46
|
}, []);
|
|
@@ -19,15 +19,14 @@ const redirectTo = targetUrl => {
|
|
|
19
19
|
};
|
|
20
20
|
const useRedirector = () => {
|
|
21
21
|
const redirector = useCallback(options => {
|
|
22
|
-
var _options$origin, _options$queryParams, _enhancedLocation$que;
|
|
23
22
|
// For now the authentication service runs on the same domain as the application,
|
|
24
23
|
// even on development (using the webpack dev server).
|
|
25
|
-
const originUrl =
|
|
24
|
+
const originUrl = options.origin ?? window.location.origin;
|
|
26
25
|
const enhancedLocation = options.location || {};
|
|
27
|
-
const searchQuery = _objectSpread(_objectSpread({},
|
|
26
|
+
const searchQuery = _objectSpread(_objectSpread({}, options.queryParams ?? {}), enhancedLocation.query ?? {});
|
|
28
27
|
const targetUrlObject = new _URL(originUrl);
|
|
29
28
|
targetUrlObject.pathname = options.to || targetUrlObject.pathname;
|
|
30
|
-
targetUrlObject.search =
|
|
29
|
+
targetUrlObject.search = `?${encode(searchQuery)}`;
|
|
31
30
|
const targetUrl = targetUrlObject.toString();
|
|
32
31
|
redirectTo(targetUrl);
|
|
33
32
|
}, []);
|
package/dist/{requests-in-flight-loader-5f216050.esm.js → requests-in-flight-loader-78c4428e.esm.js}
RENAMED
|
@@ -11,11 +11,11 @@ import ReactDOM from 'react-dom';
|
|
|
11
11
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
12
12
|
import { useSelector } from 'react-redux';
|
|
13
13
|
import LoadingSpinner from '@commercetools-uikit/loading-spinner';
|
|
14
|
-
import { c as REQUESTS_IN_FLIGHT_LOADER_DOM_ID } from './index-
|
|
14
|
+
import { c as REQUESTS_IN_FLIGHT_LOADER_DOM_ID } from './index-b26c8745.esm.js';
|
|
15
15
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
16
16
|
import 'react';
|
|
17
17
|
import 'react-router-dom';
|
|
18
|
-
import './index-
|
|
18
|
+
import './index-86039df7.esm.js';
|
|
19
19
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
20
20
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
21
21
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
@@ -43,7 +43,7 @@ import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
|
43
43
|
import '@emotion/react';
|
|
44
44
|
import '@commercetools-frontend/application-components';
|
|
45
45
|
import '@commercetools-frontend/i18n';
|
|
46
|
-
import './oidc-
|
|
46
|
+
import './oidc-b2520905.esm.js';
|
|
47
47
|
import '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
48
48
|
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
49
49
|
import '@commercetools-uikit/design-system';
|
|
@@ -51,7 +51,6 @@ import '@commercetools-uikit/spacings';
|
|
|
51
51
|
import '@commercetools-uikit/flat-button';
|
|
52
52
|
import '@commercetools-uikit/icons';
|
|
53
53
|
import './location-f21dbc25.esm.js';
|
|
54
|
-
import '@babel/runtime-corejs3/helpers/taggedTemplateLiteral';
|
|
55
54
|
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
56
55
|
import 'memoize-one';
|
|
57
56
|
import 'react-select';
|
|
@@ -95,7 +94,7 @@ var messages = defineMessages({
|
|
|
95
94
|
|
|
96
95
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
97
96
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
98
|
-
const getPortalContainer = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(
|
|
97
|
+
const getPortalContainer = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(`#${REQUESTS_IN_FLIGHT_LOADER_DOM_ID}`);
|
|
99
98
|
const RequestsInFlightLoader = () => {
|
|
100
99
|
const hasRequestsInFlight = useSelector(state => Boolean(state.requestsInFlight && state.requestsInFlight.length > 0));
|
|
101
100
|
if (!hasRequestsInFlight) return null;
|
|
@@ -13,11 +13,11 @@ var ReactDOM = require('react-dom');
|
|
|
13
13
|
var reactIntl = require('react-intl');
|
|
14
14
|
var reactRedux = require('react-redux');
|
|
15
15
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
16
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
16
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-aa7211d5.cjs.prod.js');
|
|
17
17
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
18
18
|
require('react');
|
|
19
19
|
require('react-router-dom');
|
|
20
|
-
require('./index-
|
|
20
|
+
require('./index-245e2980.cjs.prod.js');
|
|
21
21
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
22
22
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
23
23
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
@@ -45,7 +45,7 @@ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
|
45
45
|
require('@emotion/react');
|
|
46
46
|
require('@commercetools-frontend/application-components');
|
|
47
47
|
require('@commercetools-frontend/i18n');
|
|
48
|
-
require('./oidc-
|
|
48
|
+
require('./oidc-d74e6aa2.cjs.prod.js');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
50
50
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
51
51
|
require('@commercetools-uikit/design-system');
|
|
@@ -53,7 +53,6 @@ require('@commercetools-uikit/spacings');
|
|
|
53
53
|
require('@commercetools-uikit/flat-button');
|
|
54
54
|
require('@commercetools-uikit/icons');
|
|
55
55
|
require('./location-537e0660.cjs.prod.js');
|
|
56
|
-
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
57
56
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
58
57
|
require('memoize-one');
|
|
59
58
|
require('react-select');
|
|
@@ -110,7 +109,7 @@ var messages = reactIntl.defineMessages({
|
|
|
110
109
|
|
|
111
110
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
112
111
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
113
|
-
const getPortalContainer = () => document.querySelector(
|
|
112
|
+
const getPortalContainer = () => document.querySelector(`#${dist_commercetoolsFrontendApplicationShell.REQUESTS_IN_FLIGHT_LOADER_DOM_ID}`);
|
|
114
113
|
const RequestsInFlightLoader = () => {
|
|
115
114
|
const hasRequestsInFlight = reactRedux.useSelector(state => Boolean(state.requestsInFlight && state.requestsInFlight.length > 0));
|
|
116
115
|
if (!hasRequestsInFlight) return null;
|
|
@@ -13,11 +13,11 @@ var ReactDOM = require('react-dom');
|
|
|
13
13
|
var reactIntl = require('react-intl');
|
|
14
14
|
var reactRedux = require('react-redux');
|
|
15
15
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
16
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
16
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-1bdcc336.cjs.dev.js');
|
|
17
17
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
18
18
|
require('react');
|
|
19
19
|
require('react-router-dom');
|
|
20
|
-
require('./index-
|
|
20
|
+
require('./index-614accc4.cjs.dev.js');
|
|
21
21
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
22
22
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
23
23
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
@@ -45,7 +45,7 @@ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
|
45
45
|
require('@emotion/react');
|
|
46
46
|
require('@commercetools-frontend/application-components');
|
|
47
47
|
require('@commercetools-frontend/i18n');
|
|
48
|
-
require('./oidc-
|
|
48
|
+
require('./oidc-8827f9fe.cjs.dev.js');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
50
50
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
51
51
|
require('@commercetools-uikit/design-system');
|
|
@@ -53,7 +53,6 @@ require('@commercetools-uikit/spacings');
|
|
|
53
53
|
require('@commercetools-uikit/flat-button');
|
|
54
54
|
require('@commercetools-uikit/icons');
|
|
55
55
|
require('./location-c835b8df.cjs.dev.js');
|
|
56
|
-
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
57
56
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
58
57
|
require('memoize-one');
|
|
59
58
|
require('react-select');
|
|
@@ -110,7 +109,7 @@ var messages = reactIntl.defineMessages({
|
|
|
110
109
|
|
|
111
110
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
112
111
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
113
|
-
const getPortalContainer = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(
|
|
112
|
+
const getPortalContainer = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(`#${dist_commercetoolsFrontendApplicationShell.REQUESTS_IN_FLIGHT_LOADER_DOM_ID}`);
|
|
114
113
|
const RequestsInFlightLoader = () => {
|
|
115
114
|
const hasRequestsInFlight = reactRedux.useSelector(state => Boolean(state.requestsInFlight && state.requestsInFlight.length > 0));
|
|
116
115
|
if (!hasRequestsInFlight) return null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _styled = require('@emotion/styled/base');
|
|
4
4
|
var reactRouterDom = require('react-router-dom');
|
|
5
5
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-1bdcc336.cjs.dev.js');
|
|
7
7
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { useParams } from 'react-router-dom';
|
|
3
3
|
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
4
|
-
import { P as ProjectSwitcher } from './index-
|
|
4
|
+
import { P as ProjectSwitcher } from './index-b26c8745.esm.js';
|
|
5
5
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _styled = require('@emotion/styled/base');
|
|
4
4
|
var reactRouterDom = require('react-router-dom');
|
|
5
5
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-aa7211d5.cjs.prod.js');
|
|
7
7
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
5
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
6
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
3
7
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
4
8
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
5
9
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -8,11 +12,6 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
8
12
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
9
13
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
10
14
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
11
|
-
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
12
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
13
|
-
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
14
|
-
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
15
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
16
15
|
var react = require('react');
|
|
17
16
|
var client = require('@apollo/client');
|
|
18
17
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
@@ -20,6 +19,8 @@ var l10n = require('@commercetools-frontend/l10n');
|
|
|
20
19
|
|
|
21
20
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
22
21
|
|
|
22
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
23
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
23
24
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
24
25
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
25
26
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -28,12 +29,9 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
28
29
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
29
30
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
30
31
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
31
|
-
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
32
|
-
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
33
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
34
32
|
|
|
35
33
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
34
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
37
35
|
var FetchApplicationsMenu = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchApplicationsMenu" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "applicationsMenu" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "appBar" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "featureToggle" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "navBarGroups" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "items" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "featureToggle" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "actionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "dataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "submenu" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "featureToggle" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "actionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "dataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 891, source: { body: "query FetchApplicationsMenu {\n applicationsMenu {\n appBar {\n key\n uriPath\n labelAllLocales {\n locale\n value\n }\n featureToggle\n permissions\n }\n navBarGroups {\n key\n items {\n key\n uriPath\n icon\n labelAllLocales {\n locale\n value\n }\n featureToggle\n permissions\n actionRights {\n group\n name\n }\n dataFences {\n group\n name\n type\n }\n submenu {\n key\n uriPath\n labelAllLocales {\n locale\n value\n }\n featureToggle\n permissions\n actionRights {\n group\n name\n }\n dataFences {\n group\n name\n type\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
38
36
|
const defaultApiUrl = window.location.origin;
|
|
39
37
|
const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
@@ -63,11 +61,11 @@ const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
|
63
61
|
* This is only needed for development.
|
|
64
62
|
*/
|
|
65
63
|
const mapApplicationMenuConfigToGraqhQLQueryResult = applicationConfig => {
|
|
66
|
-
var
|
|
64
|
+
var _context2;
|
|
67
65
|
const entryPointUriPath = applicationConfig.entryPointUriPath;
|
|
68
|
-
const menuLinks =
|
|
66
|
+
const menuLinks = applicationConfig.__DEVELOPMENT__?.menuLinks;
|
|
69
67
|
// @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
70
|
-
const accountLinks =
|
|
68
|
+
const accountLinks = applicationConfig.__DEVELOPMENT__?.accountLinks ?? [];
|
|
71
69
|
return {
|
|
72
70
|
applicationsMenu: {
|
|
73
71
|
__typename: 'ApplicationsMenu',
|
|
@@ -82,45 +80,39 @@ const mapApplicationMenuConfigToGraqhQLQueryResult = applicationConfig => {
|
|
|
82
80
|
labelAllLocales: mapLabelAllLocalesWithDefaults(menuLinks.labelAllLocales, menuLinks.defaultLabel),
|
|
83
81
|
permissions: menuLinks.permissions,
|
|
84
82
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
85
|
-
featureToggle:
|
|
83
|
+
featureToggle: menuLinks.featureToggle ?? null,
|
|
86
84
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
87
|
-
menuVisibility:
|
|
85
|
+
menuVisibility: menuLinks.menuVisibility ?? null,
|
|
88
86
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
89
|
-
actionRights:
|
|
87
|
+
actionRights: menuLinks.actionRights ?? null,
|
|
90
88
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
91
|
-
dataFences:
|
|
92
|
-
submenu: _mapInstanceProperty__default["default"](_context2 = menuLinks.submenuLinks).call(_context2, submenuLink => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
dataFences: (_submenuLink$dataFenc = submenuLink.dataFences) !== null && _submenuLink$dataFenc !== void 0 ? _submenuLink$dataFenc : null
|
|
108
|
-
};
|
|
109
|
-
})
|
|
89
|
+
dataFences: menuLinks.dataFences ?? null,
|
|
90
|
+
submenu: _mapInstanceProperty__default["default"](_context2 = menuLinks.submenuLinks).call(_context2, submenuLink => ({
|
|
91
|
+
__typename: 'BaseMenu',
|
|
92
|
+
key: `${entryPointUriPath}-${submenuLink.uriPath}`,
|
|
93
|
+
uriPath: submenuLink.uriPath,
|
|
94
|
+
labelAllLocales: mapLabelAllLocalesWithDefaults(submenuLink.labelAllLocales, submenuLink.defaultLabel),
|
|
95
|
+
permissions: submenuLink.permissions,
|
|
96
|
+
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
97
|
+
featureToggle: submenuLink.featureToggle ?? null,
|
|
98
|
+
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
99
|
+
menuVisibility: submenuLink.menuVisibility ?? null,
|
|
100
|
+
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
101
|
+
actionRights: submenuLink.actionRights ?? null,
|
|
102
|
+
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
103
|
+
dataFences: submenuLink.dataFences ?? null
|
|
104
|
+
}))
|
|
110
105
|
}]
|
|
111
106
|
}] : [],
|
|
112
|
-
appBar: _mapInstanceProperty__default["default"](accountLinks).call(accountLinks, menuLink => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
featureToggle: (_menuLink$featureTogg = menuLink.featureToggle) !== null && _menuLink$featureTogg !== void 0 ? _menuLink$featureTogg : null
|
|
122
|
-
};
|
|
123
|
-
})
|
|
107
|
+
appBar: _mapInstanceProperty__default["default"](accountLinks).call(accountLinks, menuLink => ({
|
|
108
|
+
__typename: 'BaseMenu',
|
|
109
|
+
key: menuLink.uriPath,
|
|
110
|
+
uriPath: menuLink.uriPath,
|
|
111
|
+
labelAllLocales: mapLabelAllLocalesWithDefaults(menuLink.labelAllLocales, menuLink.defaultLabel),
|
|
112
|
+
permissions: menuLink.permissions,
|
|
113
|
+
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
114
|
+
featureToggle: menuLink.featureToggle ?? null
|
|
115
|
+
}))
|
|
124
116
|
}
|
|
125
117
|
};
|
|
126
118
|
};
|
|
@@ -149,7 +141,7 @@ function useApplicationsMenu(menuKey, config) {
|
|
|
149
141
|
fetchPolicy: config.environment.servedByProxy ? 'cache-first' : 'cache-only',
|
|
150
142
|
context: {
|
|
151
143
|
// Allow to overwrite the API url from application config
|
|
152
|
-
uri:
|
|
144
|
+
uri: `${mcProxyApiUrl || defaultApiUrl}/api/graphql`,
|
|
153
145
|
skipGraphQlTargetCheck: true
|
|
154
146
|
}
|
|
155
147
|
}),
|