@commercetools-frontend/application-shell 24.11.0 → 24.13.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-c87294b0.cjs.dev.js → application-entry-point-18d8fba0.cjs.dev.js} +7 -4
- package/dist/{application-entry-point-10a5e1a5.esm.js → application-entry-point-1b23fb6b.esm.js} +6 -4
- package/dist/{application-entry-point-8c4b8e53.cjs.prod.js → application-entry-point-74a06151.cjs.prod.js} +4 -3
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +12 -11
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +12 -11
- package/dist/commercetools-frontend-application-shell.esm.js +12 -11
- package/dist/{custom-view-dev-host-6091b78a.esm.js → custom-view-dev-host-b4f856d8.esm.js} +20 -16
- package/dist/{custom-view-dev-host-3a171a01.cjs.prod.js → custom-view-dev-host-bf11de47.cjs.prod.js} +21 -16
- package/dist/{custom-view-dev-host-40b33836.cjs.dev.js → custom-view-dev-host-f688743e.cjs.dev.js} +21 -16
- package/dist/declarations/src/types/generated/mc.d.ts +9 -8
- package/dist/declarations-connectors/src/components/application-context/index.d.ts +2 -3
- package/dist/declarations-connectors/src/components/application-context/normalizers.d.ts +1 -5
- package/dist/declarations-connectors/src/export-types.d.ts +1 -2
- package/dist/declarations-connectors/src/index.d.ts +1 -1
- package/dist/declarations-connectors/src/types/generated/mc.d.ts +9 -8
- package/dist/{index-7bdde97c.cjs.prod.js → index-242af4d2.cjs.prod.js} +201 -344
- package/dist/{index-614accc4.cjs.dev.js → index-25183095.cjs.dev.js} +2 -2
- package/dist/{index-245e2980.cjs.prod.js → index-52c724ed.cjs.prod.js} +2 -2
- package/dist/{index-86039df7.esm.js → index-5aaa33bb.esm.js} +2 -2
- package/dist/{index-67a5d8e8.esm.js → index-d8c26ca0.esm.js} +214 -363
- package/dist/{index-a57c8458.cjs.dev.js → index-dcd3d8a3.cjs.dev.js} +213 -364
- package/dist/{navbar-844d350d.esm.js → navbar-0bad8bc8.esm.js} +106 -110
- package/dist/{navbar-acc2cd1b.cjs.prod.js → navbar-7653417f.cjs.prod.js} +108 -112
- package/dist/{navbar-022383bd.cjs.dev.js → navbar-d4189469.cjs.dev.js} +108 -112
- package/dist/oidc-258fc018.cjs.prod.js +115 -0
- package/dist/oidc-35e8e62a.esm.js +100 -0
- package/dist/oidc-87d116c1.cjs.dev.js +115 -0
- package/dist/{oidc-callback-e07f0c20.cjs.dev.js → oidc-callback-11dae6b7.cjs.dev.js} +16 -14
- package/dist/{oidc-callback-ce8cbdfe.cjs.prod.js → oidc-callback-300966ee.cjs.prod.js} +16 -14
- package/dist/{oidc-callback-5f3d5280.esm.js → oidc-callback-82aa6be5.esm.js} +16 -14
- package/dist/{project-container-2d3d027a.cjs.prod.js → project-container-2f98a9d6.cjs.prod.js} +53 -19
- package/dist/{project-container-a11a31ca.cjs.dev.js → project-container-991a64a8.cjs.dev.js} +53 -19
- package/dist/{project-container-fba09841.esm.js → project-container-ce0f6228.esm.js} +52 -19
- package/dist/{project-expired-ede4d485.esm.js → project-expired-49e78c8c.esm.js} +12 -11
- package/dist/{project-expired-f38a712a.cjs.prod.js → project-expired-f753ba58.cjs.prod.js} +12 -11
- package/dist/{project-expired-9620dee4.cjs.dev.js → project-expired-fa4a86df.cjs.dev.js} +12 -11
- package/dist/{project-not-found-05683f8e.cjs.dev.js → project-not-found-261f37e8.cjs.dev.js} +11 -10
- package/dist/{project-not-found-093ab795.esm.js → project-not-found-ac82676b.esm.js} +11 -10
- package/dist/{project-not-found-cfa934da.cjs.prod.js → project-not-found-d594db71.cjs.prod.js} +11 -10
- package/dist/{project-not-initialized-1d934ae7.esm.js → project-not-initialized-4c02d4b2.esm.js} +12 -11
- package/dist/{project-not-initialized-b5a1400f.cjs.prod.js → project-not-initialized-5a77d844.cjs.prod.js} +12 -11
- package/dist/{project-not-initialized-1ed56a00.cjs.dev.js → project-not-initialized-c3a87ba6.cjs.dev.js} +12 -11
- package/dist/{project-suspended-68e80299.cjs.dev.js → project-suspended-42a90ea6.cjs.dev.js} +11 -10
- package/dist/{project-suspended-e0722654.esm.js → project-suspended-cd66814e.esm.js} +11 -10
- package/dist/{project-suspended-8e15a452.cjs.prod.js → project-suspended-dccadfd7.cjs.prod.js} +11 -10
- package/dist/{redirect-to-login-12f467b8.cjs.prod.js → redirect-to-login-3e4a6434.cjs.prod.js} +13 -10
- package/dist/{redirect-to-login-3bee13ba.cjs.dev.js → redirect-to-login-66ea895a.cjs.dev.js} +13 -10
- package/dist/{redirect-to-login-2944c890.esm.js → redirect-to-login-edbfacbc.esm.js} +13 -10
- package/dist/{redirect-to-logout-2802852c.cjs.prod.js → redirect-to-logout-99db4db7.cjs.prod.js} +14 -12
- package/dist/{redirect-to-logout-74b72fe8.cjs.dev.js → redirect-to-logout-ab0c374b.cjs.dev.js} +14 -12
- package/dist/{redirect-to-logout-5db48f16.esm.js → redirect-to-logout-ba40d106.esm.js} +14 -12
- package/dist/{redirector-72ccfbc2.cjs.dev.js → redirector-0efdd994.cjs.dev.js} +4 -3
- package/dist/{redirector-d856975f.esm.js → redirector-656c6ee7.esm.js} +4 -3
- package/dist/{redirector-0c72d0a4.cjs.prod.js → redirector-c858d578.cjs.prod.js} +4 -3
- package/dist/{requests-in-flight-loader-e25f4c31.esm.js → requests-in-flight-loader-64a40481.esm.js} +11 -10
- package/dist/{requests-in-flight-loader-bc904171.cjs.dev.js → requests-in-flight-loader-878840c1.cjs.dev.js} +11 -10
- package/dist/{requests-in-flight-loader-877c1541.cjs.prod.js → requests-in-flight-loader-df9d1de3.cjs.prod.js} +11 -10
- package/dist/{service-page-project-switcher-af044ac6.cjs.dev.js → service-page-project-switcher-0f1c1d7f.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-1dad9871.cjs.prod.js → service-page-project-switcher-532df57f.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-f3eac18a.esm.js → service-page-project-switcher-aca41b09.esm.js} +1 -1
- package/dist/{use-applications-menu-14a5a1f4.cjs.prod.js → use-applications-menu-21c7420b.cjs.prod.js} +48 -40
- package/dist/{use-applications-menu-823a2492.cjs.dev.js → use-applications-menu-7a85c3ee.cjs.dev.js} +48 -40
- package/dist/{use-applications-menu-1514af11.esm.js → use-applications-menu-8ff2d130.esm.js} +45 -38
- package/dist/{user-settings-menu-d75f4958.cjs.prod.js → user-settings-menu-2d3bfa75.cjs.prod.js} +29 -22
- package/dist/{user-settings-menu-f98bea89.esm.js → user-settings-menu-31e6bb38.esm.js} +29 -22
- package/dist/{user-settings-menu-6113cdd3.cjs.dev.js → user-settings-menu-c37b343f.cjs.dev.js} +29 -22
- package/package.json +16 -16
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +2 -1
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +2 -1
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +2 -1
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +26 -22
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +26 -22
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +20 -17
- package/dist/oidc-8827f9fe.cjs.dev.js +0 -98
- package/dist/oidc-b2520905.esm.js +0 -84
- package/dist/oidc-d74e6aa2.cjs.prod.js +0 -98
- package/dist/quick-access-9dd197bb.cjs.prod.js +0 -1875
- package/dist/quick-access-a665bbb7.cjs.dev.js +0 -1893
- package/dist/quick-access-dfc1f8a9.esm.js +0 -1865
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
4
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
5
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
10
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
11
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
12
|
+
|
|
13
|
+
const DIMENSIONS = {
|
|
14
|
+
header: '56px'
|
|
15
|
+
};
|
|
16
|
+
const NAVBAR = {
|
|
17
|
+
expanderHeight: '50px',
|
|
18
|
+
expanderSize: '40px',
|
|
19
|
+
iconSize: '24px',
|
|
20
|
+
iconSizeHover: '28px',
|
|
21
|
+
itemSize: '48px',
|
|
22
|
+
itemHeight: '56px',
|
|
23
|
+
sublistIndentationWhenCollapsed: '72px',
|
|
24
|
+
sublistIndentationWhenExpanded: '248px',
|
|
25
|
+
sublistItemMinHeight: '50px',
|
|
26
|
+
sublistWidth: '272px',
|
|
27
|
+
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
28
|
+
widthLeftNavigation: '80px',
|
|
29
|
+
widthLeftNavigationWhenExpanded: '256px'
|
|
30
|
+
};
|
|
31
|
+
const WINDOW_SIZES = {
|
|
32
|
+
STANDARD: 1024,
|
|
33
|
+
WIDE: 1200
|
|
34
|
+
};
|
|
35
|
+
const CONTAINERS = {
|
|
36
|
+
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
37
|
+
LEFT_OF_PROFILE: 'left-of-profile'
|
|
38
|
+
};
|
|
39
|
+
const SUSPENSION_REASONS = {
|
|
40
|
+
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
41
|
+
PAYMENT: 'Payment',
|
|
42
|
+
OTHER: 'Other'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// OIDC params
|
|
46
|
+
const OIDC_RESPONSE_TYPES = {
|
|
47
|
+
ID_TOKEN: 'id_token'
|
|
48
|
+
};
|
|
49
|
+
const OIDC_CLAIMS = {
|
|
50
|
+
OPEN_ID: 'openid',
|
|
51
|
+
PROJECT_KEY: 'project_key',
|
|
52
|
+
TEAM_ID: 'team_id',
|
|
53
|
+
APPLICATION_ID: 'application_id',
|
|
54
|
+
VIEW: 'view',
|
|
55
|
+
MANAGE: 'manage'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const buildOidcScope = options => {
|
|
59
|
+
var _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
60
|
+
const claims = [];
|
|
61
|
+
|
|
62
|
+
// Set the projectKey
|
|
63
|
+
if (options.projectKey) {
|
|
64
|
+
var _context;
|
|
65
|
+
claims.push(_concatInstanceProperty__default["default"](_context = "".concat(OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Set the OAuth Scopes
|
|
69
|
+
claims.push(..._mapInstanceProperty__default["default"](_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, scope => {
|
|
70
|
+
var _context3;
|
|
71
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
72
|
+
}));
|
|
73
|
+
claims.push(..._mapInstanceProperty__default["default"](_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, scope => {
|
|
74
|
+
var _context5;
|
|
75
|
+
return _concatInstanceProperty__default["default"](_context5 = "".concat(OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
76
|
+
}));
|
|
77
|
+
// Set additional OAuth scopes
|
|
78
|
+
if (options !== null && options !== void 0 && options.additionalOAuthScopes) {
|
|
79
|
+
var _context6;
|
|
80
|
+
_forEachInstanceProperty__default["default"](_context6 = options.additionalOAuthScopes).call(_context6, additionalOAuthScope => {
|
|
81
|
+
var _context7, _additionalOAuthScope, _context9, _additionalOAuthScope2;
|
|
82
|
+
claims.push(..._mapInstanceProperty__default["default"](_context7 = (_additionalOAuthScope = additionalOAuthScope.view) !== null && _additionalOAuthScope !== void 0 ? _additionalOAuthScope : []).call(_context7, viewOAuthScope => {
|
|
83
|
+
var _context8;
|
|
84
|
+
return _concatInstanceProperty__default["default"](_context8 = "view/".concat(additionalOAuthScope.name, ":")).call(_context8, viewOAuthScope);
|
|
85
|
+
}), ..._mapInstanceProperty__default["default"](_context9 = (_additionalOAuthScope2 = additionalOAuthScope.manage) !== null && _additionalOAuthScope2 !== void 0 ? _additionalOAuthScope2 : []).call(_context9, manageOAuthScope => {
|
|
86
|
+
var _context0;
|
|
87
|
+
return _concatInstanceProperty__default["default"](_context0 = "manage/".concat(additionalOAuthScope.name, ":")).call(_context0, manageOAuthScope);
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Set the teamId and applicationId
|
|
93
|
+
if (options.teamId) {
|
|
94
|
+
var _context1;
|
|
95
|
+
claims.push(_concatInstanceProperty__default["default"](_context1 = "".concat(OIDC_CLAIMS.TEAM_ID, ":")).call(_context1, options.teamId));
|
|
96
|
+
if (options.applicationId) {
|
|
97
|
+
var _context10;
|
|
98
|
+
claims.push(_concatInstanceProperty__default["default"](_context10 = "".concat(OIDC_CLAIMS.APPLICATION_ID, ":")).call(_context10, options.applicationId));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return [
|
|
102
|
+
// This is required as per OIDC spec.
|
|
103
|
+
OIDC_CLAIMS.OPEN_ID,
|
|
104
|
+
// Custom claims
|
|
105
|
+
...claims].join(' ');
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
exports.CONTAINERS = CONTAINERS;
|
|
109
|
+
exports.DIMENSIONS = DIMENSIONS;
|
|
110
|
+
exports.NAVBAR = NAVBAR;
|
|
111
|
+
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
112
|
+
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
113
|
+
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
114
|
+
exports.WINDOW_SIZES = WINDOW_SIZES;
|
|
115
|
+
exports.buildOidcScope = buildOidcScope;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
2
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
3
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
4
|
+
|
|
5
|
+
const DIMENSIONS = {
|
|
6
|
+
header: '56px'
|
|
7
|
+
};
|
|
8
|
+
const NAVBAR = {
|
|
9
|
+
expanderHeight: '50px',
|
|
10
|
+
expanderSize: '40px',
|
|
11
|
+
iconSize: '24px',
|
|
12
|
+
iconSizeHover: '28px',
|
|
13
|
+
itemSize: '48px',
|
|
14
|
+
itemHeight: '56px',
|
|
15
|
+
sublistIndentationWhenCollapsed: '72px',
|
|
16
|
+
sublistIndentationWhenExpanded: '248px',
|
|
17
|
+
sublistItemMinHeight: '50px',
|
|
18
|
+
sublistWidth: '272px',
|
|
19
|
+
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
20
|
+
widthLeftNavigation: '80px',
|
|
21
|
+
widthLeftNavigationWhenExpanded: '256px'
|
|
22
|
+
};
|
|
23
|
+
const WINDOW_SIZES = {
|
|
24
|
+
STANDARD: 1024,
|
|
25
|
+
WIDE: 1200
|
|
26
|
+
};
|
|
27
|
+
const CONTAINERS = {
|
|
28
|
+
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
29
|
+
LEFT_OF_PROFILE: 'left-of-profile'
|
|
30
|
+
};
|
|
31
|
+
const SUSPENSION_REASONS = {
|
|
32
|
+
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
33
|
+
PAYMENT: 'Payment',
|
|
34
|
+
OTHER: 'Other'
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// OIDC params
|
|
38
|
+
const OIDC_RESPONSE_TYPES = {
|
|
39
|
+
ID_TOKEN: 'id_token'
|
|
40
|
+
};
|
|
41
|
+
const OIDC_CLAIMS = {
|
|
42
|
+
OPEN_ID: 'openid',
|
|
43
|
+
PROJECT_KEY: 'project_key',
|
|
44
|
+
TEAM_ID: 'team_id',
|
|
45
|
+
APPLICATION_ID: 'application_id',
|
|
46
|
+
VIEW: 'view',
|
|
47
|
+
MANAGE: 'manage'
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const buildOidcScope = options => {
|
|
51
|
+
var _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
52
|
+
const claims = [];
|
|
53
|
+
|
|
54
|
+
// Set the projectKey
|
|
55
|
+
if (options.projectKey) {
|
|
56
|
+
var _context;
|
|
57
|
+
claims.push(_concatInstanceProperty(_context = "".concat(OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Set the OAuth Scopes
|
|
61
|
+
claims.push(..._mapInstanceProperty(_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, scope => {
|
|
62
|
+
var _context3;
|
|
63
|
+
return _concatInstanceProperty(_context3 = "".concat(OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
64
|
+
}));
|
|
65
|
+
claims.push(..._mapInstanceProperty(_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, scope => {
|
|
66
|
+
var _context5;
|
|
67
|
+
return _concatInstanceProperty(_context5 = "".concat(OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
68
|
+
}));
|
|
69
|
+
// Set additional OAuth scopes
|
|
70
|
+
if (options !== null && options !== void 0 && options.additionalOAuthScopes) {
|
|
71
|
+
var _context6;
|
|
72
|
+
_forEachInstanceProperty(_context6 = options.additionalOAuthScopes).call(_context6, additionalOAuthScope => {
|
|
73
|
+
var _context7, _additionalOAuthScope, _context9, _additionalOAuthScope2;
|
|
74
|
+
claims.push(..._mapInstanceProperty(_context7 = (_additionalOAuthScope = additionalOAuthScope.view) !== null && _additionalOAuthScope !== void 0 ? _additionalOAuthScope : []).call(_context7, viewOAuthScope => {
|
|
75
|
+
var _context8;
|
|
76
|
+
return _concatInstanceProperty(_context8 = "view/".concat(additionalOAuthScope.name, ":")).call(_context8, viewOAuthScope);
|
|
77
|
+
}), ..._mapInstanceProperty(_context9 = (_additionalOAuthScope2 = additionalOAuthScope.manage) !== null && _additionalOAuthScope2 !== void 0 ? _additionalOAuthScope2 : []).call(_context9, manageOAuthScope => {
|
|
78
|
+
var _context0;
|
|
79
|
+
return _concatInstanceProperty(_context0 = "manage/".concat(additionalOAuthScope.name, ":")).call(_context0, manageOAuthScope);
|
|
80
|
+
}));
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Set the teamId and applicationId
|
|
85
|
+
if (options.teamId) {
|
|
86
|
+
var _context1;
|
|
87
|
+
claims.push(_concatInstanceProperty(_context1 = "".concat(OIDC_CLAIMS.TEAM_ID, ":")).call(_context1, options.teamId));
|
|
88
|
+
if (options.applicationId) {
|
|
89
|
+
var _context10;
|
|
90
|
+
claims.push(_concatInstanceProperty(_context10 = "".concat(OIDC_CLAIMS.APPLICATION_ID, ":")).call(_context10, options.applicationId));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return [
|
|
94
|
+
// This is required as per OIDC spec.
|
|
95
|
+
OIDC_CLAIMS.OPEN_ID,
|
|
96
|
+
// Custom claims
|
|
97
|
+
...claims].join(' ');
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { CONTAINERS as C, DIMENSIONS as D, NAVBAR as N, OIDC_CLAIMS as O, SUSPENSION_REASONS as S, WINDOW_SIZES as W, OIDC_RESPONSE_TYPES as a, buildOidcScope as b };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
4
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
5
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
10
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
11
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
12
|
+
|
|
13
|
+
const DIMENSIONS = {
|
|
14
|
+
header: '56px'
|
|
15
|
+
};
|
|
16
|
+
const NAVBAR = {
|
|
17
|
+
expanderHeight: '50px',
|
|
18
|
+
expanderSize: '40px',
|
|
19
|
+
iconSize: '24px',
|
|
20
|
+
iconSizeHover: '28px',
|
|
21
|
+
itemSize: '48px',
|
|
22
|
+
itemHeight: '56px',
|
|
23
|
+
sublistIndentationWhenCollapsed: '72px',
|
|
24
|
+
sublistIndentationWhenExpanded: '248px',
|
|
25
|
+
sublistItemMinHeight: '50px',
|
|
26
|
+
sublistWidth: '272px',
|
|
27
|
+
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
28
|
+
widthLeftNavigation: '80px',
|
|
29
|
+
widthLeftNavigationWhenExpanded: '256px'
|
|
30
|
+
};
|
|
31
|
+
const WINDOW_SIZES = {
|
|
32
|
+
STANDARD: 1024,
|
|
33
|
+
WIDE: 1200
|
|
34
|
+
};
|
|
35
|
+
const CONTAINERS = {
|
|
36
|
+
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
37
|
+
LEFT_OF_PROFILE: 'left-of-profile'
|
|
38
|
+
};
|
|
39
|
+
const SUSPENSION_REASONS = {
|
|
40
|
+
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
41
|
+
PAYMENT: 'Payment',
|
|
42
|
+
OTHER: 'Other'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// OIDC params
|
|
46
|
+
const OIDC_RESPONSE_TYPES = {
|
|
47
|
+
ID_TOKEN: 'id_token'
|
|
48
|
+
};
|
|
49
|
+
const OIDC_CLAIMS = {
|
|
50
|
+
OPEN_ID: 'openid',
|
|
51
|
+
PROJECT_KEY: 'project_key',
|
|
52
|
+
TEAM_ID: 'team_id',
|
|
53
|
+
APPLICATION_ID: 'application_id',
|
|
54
|
+
VIEW: 'view',
|
|
55
|
+
MANAGE: 'manage'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const buildOidcScope = options => {
|
|
59
|
+
var _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
60
|
+
const claims = [];
|
|
61
|
+
|
|
62
|
+
// Set the projectKey
|
|
63
|
+
if (options.projectKey) {
|
|
64
|
+
var _context;
|
|
65
|
+
claims.push(_concatInstanceProperty__default["default"](_context = "".concat(OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Set the OAuth Scopes
|
|
69
|
+
claims.push(..._mapInstanceProperty__default["default"](_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, scope => {
|
|
70
|
+
var _context3;
|
|
71
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
72
|
+
}));
|
|
73
|
+
claims.push(..._mapInstanceProperty__default["default"](_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, scope => {
|
|
74
|
+
var _context5;
|
|
75
|
+
return _concatInstanceProperty__default["default"](_context5 = "".concat(OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
76
|
+
}));
|
|
77
|
+
// Set additional OAuth scopes
|
|
78
|
+
if (options !== null && options !== void 0 && options.additionalOAuthScopes) {
|
|
79
|
+
var _context6;
|
|
80
|
+
_forEachInstanceProperty__default["default"](_context6 = options.additionalOAuthScopes).call(_context6, additionalOAuthScope => {
|
|
81
|
+
var _context7, _additionalOAuthScope, _context9, _additionalOAuthScope2;
|
|
82
|
+
claims.push(..._mapInstanceProperty__default["default"](_context7 = (_additionalOAuthScope = additionalOAuthScope.view) !== null && _additionalOAuthScope !== void 0 ? _additionalOAuthScope : []).call(_context7, viewOAuthScope => {
|
|
83
|
+
var _context8;
|
|
84
|
+
return _concatInstanceProperty__default["default"](_context8 = "view/".concat(additionalOAuthScope.name, ":")).call(_context8, viewOAuthScope);
|
|
85
|
+
}), ..._mapInstanceProperty__default["default"](_context9 = (_additionalOAuthScope2 = additionalOAuthScope.manage) !== null && _additionalOAuthScope2 !== void 0 ? _additionalOAuthScope2 : []).call(_context9, manageOAuthScope => {
|
|
86
|
+
var _context0;
|
|
87
|
+
return _concatInstanceProperty__default["default"](_context0 = "manage/".concat(additionalOAuthScope.name, ":")).call(_context0, manageOAuthScope);
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Set the teamId and applicationId
|
|
93
|
+
if (options.teamId) {
|
|
94
|
+
var _context1;
|
|
95
|
+
claims.push(_concatInstanceProperty__default["default"](_context1 = "".concat(OIDC_CLAIMS.TEAM_ID, ":")).call(_context1, options.teamId));
|
|
96
|
+
if (options.applicationId) {
|
|
97
|
+
var _context10;
|
|
98
|
+
claims.push(_concatInstanceProperty__default["default"](_context10 = "".concat(OIDC_CLAIMS.APPLICATION_ID, ":")).call(_context10, options.applicationId));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return [
|
|
102
|
+
// This is required as per OIDC spec.
|
|
103
|
+
OIDC_CLAIMS.OPEN_ID,
|
|
104
|
+
// Custom claims
|
|
105
|
+
...claims].join(' ');
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
exports.CONTAINERS = CONTAINERS;
|
|
109
|
+
exports.DIMENSIONS = DIMENSIONS;
|
|
110
|
+
exports.NAVBAR = NAVBAR;
|
|
111
|
+
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
112
|
+
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
113
|
+
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
114
|
+
exports.WINDOW_SIZES = WINDOW_SIZES;
|
|
115
|
+
exports.buildOidcScope = buildOidcScope;
|
|
@@ -7,7 +7,7 @@ var jwtDecode = require('jwt-decode');
|
|
|
7
7
|
var qss = require('qss');
|
|
8
8
|
var reactRouterDom = require('react-router-dom');
|
|
9
9
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
10
|
-
var redirector = require('./redirector-
|
|
10
|
+
var redirector = require('./redirector-0efdd994.cjs.dev.js');
|
|
11
11
|
var _styled = require('@emotion/styled/base');
|
|
12
12
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
13
13
|
var FailedAuthenticationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
@@ -20,7 +20,7 @@ var icons = require('@commercetools-uikit/icons');
|
|
|
20
20
|
var notifications = require('@commercetools-uikit/notifications');
|
|
21
21
|
var Spacings = require('@commercetools-uikit/spacings');
|
|
22
22
|
var Text = require('@commercetools-uikit/text');
|
|
23
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
23
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-dcd3d8a3.cjs.dev.js');
|
|
24
24
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
25
25
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
26
26
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -32,7 +32,7 @@ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
|
32
32
|
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
34
34
|
require('./location-c835b8df.cjs.dev.js');
|
|
35
|
-
require('./index-
|
|
35
|
+
require('./index-25183095.cjs.dev.js');
|
|
36
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -55,9 +55,10 @@ require('redux-logger');
|
|
|
55
55
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
56
56
|
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
57
57
|
require('@emotion/react');
|
|
58
|
-
require('./oidc-
|
|
58
|
+
require('./oidc-87d116c1.cjs.dev.js');
|
|
59
59
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
60
60
|
require('react-intl');
|
|
61
|
+
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
61
62
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
62
63
|
require('memoize-one');
|
|
63
64
|
require('react-select');
|
|
@@ -67,12 +68,6 @@ require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
|
67
68
|
require('@commercetools-uikit/loading-spinner');
|
|
68
69
|
require('@commercetools-frontend/browser-history');
|
|
69
70
|
require('@commercetools-frontend/l10n');
|
|
70
|
-
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
71
|
-
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
72
|
-
require('@babel/runtime-corejs3/helpers/createClass');
|
|
73
|
-
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
74
|
-
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
75
|
-
require('@babel/runtime-corejs3/helpers/inherits');
|
|
76
71
|
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
77
72
|
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
78
73
|
require('@apollo/client/react');
|
|
@@ -82,6 +77,12 @@ require('@flopflip/launchdarkly-adapter');
|
|
|
82
77
|
require('@flopflip/react-broadcast');
|
|
83
78
|
require('@flopflip/types');
|
|
84
79
|
require('react-redux');
|
|
80
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
81
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
82
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
83
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
84
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
85
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
85
86
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
86
87
|
require('@commercetools-frontend/application-config/ssr');
|
|
87
88
|
require('@commercetools-frontend/permissions');
|
|
@@ -200,8 +201,9 @@ const OidcCallback = props => {
|
|
|
200
201
|
}
|
|
201
202
|
}
|
|
202
203
|
if (!errorMessage) {
|
|
203
|
-
|
|
204
|
-
const
|
|
204
|
+
var _decodedSessionToken;
|
|
205
|
+
const hasValidSessionId = ((_decodedSessionToken = decodedSessionToken) === null || _decodedSessionToken === void 0 ? void 0 : _decodedSessionToken.nonce) === fragments.state;
|
|
206
|
+
const hasValidApplicationId = window.app.applicationId === (sessionState === null || sessionState === void 0 ? void 0 : sessionState.applicationId);
|
|
205
207
|
if (!sessionState || !hasValidSessionId || !hasValidApplicationId) {
|
|
206
208
|
errorMessage = 'Invalid client session';
|
|
207
209
|
}
|
|
@@ -211,7 +213,7 @@ const OidcCallback = props => {
|
|
|
211
213
|
} else {
|
|
212
214
|
applicationShellConnectors.oidcStorage.setActiveSession(sessionToken);
|
|
213
215
|
applicationShellConnectors.oidcStorage.removeSessionState(fragments.state);
|
|
214
|
-
if (sessionState
|
|
216
|
+
if (sessionState !== null && sessionState !== void 0 && sessionState.query.redirectTo) {
|
|
215
217
|
try {
|
|
216
218
|
const redirectToUrl = new _URL__default["default"](sessionState.query.redirectTo);
|
|
217
219
|
redirector$1({
|
|
@@ -219,7 +221,7 @@ const OidcCallback = props => {
|
|
|
219
221
|
});
|
|
220
222
|
return;
|
|
221
223
|
} catch (error) {
|
|
222
|
-
console.warn(
|
|
224
|
+
console.warn("Invalid \"redirectTo\" URL", sessionState.query.redirectTo);
|
|
223
225
|
// ignore
|
|
224
226
|
}
|
|
225
227
|
}
|
|
@@ -7,7 +7,7 @@ var jwtDecode = require('jwt-decode');
|
|
|
7
7
|
var qss = require('qss');
|
|
8
8
|
var reactRouterDom = require('react-router-dom');
|
|
9
9
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
10
|
-
var redirector = require('./redirector-
|
|
10
|
+
var redirector = require('./redirector-c858d578.cjs.prod.js');
|
|
11
11
|
var _styled = require('@emotion/styled/base');
|
|
12
12
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
13
13
|
var FailedAuthenticationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
@@ -20,7 +20,7 @@ var icons = require('@commercetools-uikit/icons');
|
|
|
20
20
|
var notifications = require('@commercetools-uikit/notifications');
|
|
21
21
|
var Spacings = require('@commercetools-uikit/spacings');
|
|
22
22
|
var Text = require('@commercetools-uikit/text');
|
|
23
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
23
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-242af4d2.cjs.prod.js');
|
|
24
24
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
25
25
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
26
26
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -32,7 +32,7 @@ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
|
32
32
|
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
34
34
|
require('./location-537e0660.cjs.prod.js');
|
|
35
|
-
require('./index-
|
|
35
|
+
require('./index-52c724ed.cjs.prod.js');
|
|
36
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -55,9 +55,10 @@ require('redux-logger');
|
|
|
55
55
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
56
56
|
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
57
57
|
require('@emotion/react');
|
|
58
|
-
require('./oidc-
|
|
58
|
+
require('./oidc-258fc018.cjs.prod.js');
|
|
59
59
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
60
60
|
require('react-intl');
|
|
61
|
+
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
61
62
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
62
63
|
require('memoize-one');
|
|
63
64
|
require('react-select');
|
|
@@ -67,12 +68,6 @@ require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
|
67
68
|
require('@commercetools-uikit/loading-spinner');
|
|
68
69
|
require('@commercetools-frontend/browser-history');
|
|
69
70
|
require('@commercetools-frontend/l10n');
|
|
70
|
-
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
71
|
-
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
72
|
-
require('@babel/runtime-corejs3/helpers/createClass');
|
|
73
|
-
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
74
|
-
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
75
|
-
require('@babel/runtime-corejs3/helpers/inherits');
|
|
76
71
|
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
77
72
|
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
78
73
|
require('@apollo/client/react');
|
|
@@ -82,6 +77,12 @@ require('@flopflip/launchdarkly-adapter');
|
|
|
82
77
|
require('@flopflip/react-broadcast');
|
|
83
78
|
require('@flopflip/types');
|
|
84
79
|
require('react-redux');
|
|
80
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
81
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
82
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
83
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
84
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
85
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
85
86
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
86
87
|
require('@commercetools-frontend/application-config/ssr');
|
|
87
88
|
require('@commercetools-frontend/permissions');
|
|
@@ -197,8 +198,9 @@ const OidcCallback = props => {
|
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
if (!errorMessage) {
|
|
200
|
-
|
|
201
|
-
const
|
|
201
|
+
var _decodedSessionToken;
|
|
202
|
+
const hasValidSessionId = ((_decodedSessionToken = decodedSessionToken) === null || _decodedSessionToken === void 0 ? void 0 : _decodedSessionToken.nonce) === fragments.state;
|
|
203
|
+
const hasValidApplicationId = window.app.applicationId === (sessionState === null || sessionState === void 0 ? void 0 : sessionState.applicationId);
|
|
202
204
|
if (!sessionState || !hasValidSessionId || !hasValidApplicationId) {
|
|
203
205
|
errorMessage = 'Invalid client session';
|
|
204
206
|
}
|
|
@@ -208,7 +210,7 @@ const OidcCallback = props => {
|
|
|
208
210
|
} else {
|
|
209
211
|
applicationShellConnectors.oidcStorage.setActiveSession(sessionToken);
|
|
210
212
|
applicationShellConnectors.oidcStorage.removeSessionState(fragments.state);
|
|
211
|
-
if (sessionState
|
|
213
|
+
if (sessionState !== null && sessionState !== void 0 && sessionState.query.redirectTo) {
|
|
212
214
|
try {
|
|
213
215
|
const redirectToUrl = new _URL__default["default"](sessionState.query.redirectTo);
|
|
214
216
|
redirector$1({
|
|
@@ -216,7 +218,7 @@ const OidcCallback = props => {
|
|
|
216
218
|
});
|
|
217
219
|
return;
|
|
218
220
|
} catch (error) {
|
|
219
|
-
console.warn(
|
|
221
|
+
console.warn("Invalid \"redirectTo\" URL", sessionState.query.redirectTo);
|
|
220
222
|
// ignore
|
|
221
223
|
}
|
|
222
224
|
}
|
|
@@ -5,7 +5,7 @@ import jwtDecode from 'jwt-decode';
|
|
|
5
5
|
import { decode } from 'qss';
|
|
6
6
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
7
7
|
import { oidcStorage } from '@commercetools-frontend/application-shell-connectors';
|
|
8
|
-
import { u as useRedirector } from './redirector-
|
|
8
|
+
import { u as useRedirector } from './redirector-656c6ee7.esm.js';
|
|
9
9
|
import _styled from '@emotion/styled/base';
|
|
10
10
|
import { themesOverrides, PublicPageLayout } from '@commercetools-frontend/application-components';
|
|
11
11
|
import FailedAuthenticationSVG from '@commercetools-frontend/assets/images/doors-closed.svg';
|
|
@@ -18,7 +18,7 @@ import { AngleLeftIcon } from '@commercetools-uikit/icons';
|
|
|
18
18
|
import { ContentNotification } from '@commercetools-uikit/notifications';
|
|
19
19
|
import Spacings from '@commercetools-uikit/spacings';
|
|
20
20
|
import Text from '@commercetools-uikit/text';
|
|
21
|
-
import { C as ConfigureIntlProvider } from './index-
|
|
21
|
+
import { C as ConfigureIntlProvider } from './index-d8c26ca0.esm.js';
|
|
22
22
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
23
23
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
24
24
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
@@ -30,7 +30,7 @@ import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
|
30
30
|
import '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
31
31
|
import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
32
32
|
import './location-f21dbc25.esm.js';
|
|
33
|
-
import './index-
|
|
33
|
+
import './index-5aaa33bb.esm.js';
|
|
34
34
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
35
35
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
36
36
|
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
@@ -53,9 +53,10 @@ import 'redux-logger';
|
|
|
53
53
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
54
54
|
import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
55
55
|
import '@emotion/react';
|
|
56
|
-
import './oidc-
|
|
56
|
+
import './oidc-35e8e62a.esm.js';
|
|
57
57
|
import '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
58
58
|
import 'react-intl';
|
|
59
|
+
import '@babel/runtime-corejs3/helpers/taggedTemplateLiteral';
|
|
59
60
|
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
60
61
|
import 'memoize-one';
|
|
61
62
|
import 'react-select';
|
|
@@ -65,12 +66,6 @@ import '@commercetools-frontend/assets/images/ct-logo.svg';
|
|
|
65
66
|
import '@commercetools-uikit/loading-spinner';
|
|
66
67
|
import '@commercetools-frontend/browser-history';
|
|
67
68
|
import '@commercetools-frontend/l10n';
|
|
68
|
-
import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
69
|
-
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
70
|
-
import '@babel/runtime-corejs3/helpers/createClass';
|
|
71
|
-
import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
|
|
72
|
-
import '@babel/runtime-corejs3/helpers/getPrototypeOf';
|
|
73
|
-
import '@babel/runtime-corejs3/helpers/inherits';
|
|
74
69
|
import '@babel/runtime-corejs3/core-js-stable/object/from-entries';
|
|
75
70
|
import '@babel/runtime-corejs3/core-js-stable/instance/flags';
|
|
76
71
|
import '@apollo/client/react';
|
|
@@ -80,6 +75,12 @@ import '@flopflip/launchdarkly-adapter';
|
|
|
80
75
|
import '@flopflip/react-broadcast';
|
|
81
76
|
import '@flopflip/types';
|
|
82
77
|
import 'react-redux';
|
|
78
|
+
import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
79
|
+
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
80
|
+
import '@babel/runtime-corejs3/helpers/createClass';
|
|
81
|
+
import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
|
|
82
|
+
import '@babel/runtime-corejs3/helpers/getPrototypeOf';
|
|
83
|
+
import '@babel/runtime-corejs3/helpers/inherits';
|
|
83
84
|
import '@commercetools-uikit/design-system/materials/resets.css';
|
|
84
85
|
import '@commercetools-frontend/application-config/ssr';
|
|
85
86
|
import '@commercetools-frontend/permissions';
|
|
@@ -186,8 +187,9 @@ const OidcCallback = props => {
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
if (!errorMessage) {
|
|
189
|
-
|
|
190
|
-
const
|
|
190
|
+
var _decodedSessionToken;
|
|
191
|
+
const hasValidSessionId = ((_decodedSessionToken = decodedSessionToken) === null || _decodedSessionToken === void 0 ? void 0 : _decodedSessionToken.nonce) === fragments.state;
|
|
192
|
+
const hasValidApplicationId = window.app.applicationId === (sessionState === null || sessionState === void 0 ? void 0 : sessionState.applicationId);
|
|
191
193
|
if (!sessionState || !hasValidSessionId || !hasValidApplicationId) {
|
|
192
194
|
errorMessage = 'Invalid client session';
|
|
193
195
|
}
|
|
@@ -197,7 +199,7 @@ const OidcCallback = props => {
|
|
|
197
199
|
} else {
|
|
198
200
|
oidcStorage.setActiveSession(sessionToken);
|
|
199
201
|
oidcStorage.removeSessionState(fragments.state);
|
|
200
|
-
if (sessionState
|
|
202
|
+
if (sessionState !== null && sessionState !== void 0 && sessionState.query.redirectTo) {
|
|
201
203
|
try {
|
|
202
204
|
const redirectToUrl = new _URL(sessionState.query.redirectTo);
|
|
203
205
|
redirector({
|
|
@@ -205,7 +207,7 @@ const OidcCallback = props => {
|
|
|
205
207
|
});
|
|
206
208
|
return;
|
|
207
209
|
} catch (error) {
|
|
208
|
-
console.warn(
|
|
210
|
+
console.warn("Invalid \"redirectTo\" URL", sessionState.query.redirectTo);
|
|
209
211
|
// ignore
|
|
210
212
|
}
|
|
211
213
|
}
|