@commercetools-frontend/application-shell 24.10.0 → 24.12.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-5039dc1d.esm.js → custom-view-dev-host-091163ea.esm.js} +20 -16
- package/dist/{custom-view-dev-host-b5e3a16a.cjs.dev.js → custom-view-dev-host-17daf42a.cjs.dev.js} +21 -16
- package/dist/{custom-view-dev-host-21561a3a.cjs.prod.js → custom-view-dev-host-a682a499.cjs.prod.js} +21 -16
- package/dist/declarations-connectors/src/index.d.ts +1 -1
- package/dist/declarations-connectors/src/utils/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-user-language-from-storage/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-user-language-from-storage/select-user-language-from-storage.d.ts +1 -0
- package/dist/{index-17f02024.cjs.dev.js → index-1d1cc31f.cjs.dev.js} +225 -368
- package/dist/{index-e4de734f.esm.js → index-1dadca21.esm.js} +227 -368
- package/dist/{index-614accc4.cjs.dev.js → index-25183095.cjs.dev.js} +2 -2
- package/dist/{index-11b385bb.cjs.prod.js → index-3cfc1f1e.cjs.prod.js} +213 -348
- 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/{navbar-022383bd.cjs.dev.js → navbar-586f7774.cjs.dev.js} +111 -92
- package/dist/{navbar-844d350d.esm.js → navbar-88e0fd1f.esm.js} +110 -92
- package/dist/{navbar-acc2cd1b.cjs.prod.js → navbar-93183a2d.cjs.prod.js} +111 -92
- 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-c014b1b0.esm.js → oidc-callback-019d623d.esm.js} +16 -14
- package/dist/{oidc-callback-ad64d7f6.cjs.dev.js → oidc-callback-47743232.cjs.dev.js} +16 -14
- package/dist/{oidc-callback-9beece27.cjs.prod.js → oidc-callback-6bdb3c6f.cjs.prod.js} +16 -14
- package/dist/{project-container-3e3c7013.cjs.dev.js → project-container-2245f020.cjs.dev.js} +53 -19
- package/dist/{project-container-e11b2fc6.esm.js → project-container-7fce9e66.esm.js} +52 -19
- package/dist/{project-container-f1710162.cjs.prod.js → project-container-954dbf0f.cjs.prod.js} +53 -19
- package/dist/{project-expired-39589063.esm.js → project-expired-1b0845c5.esm.js} +12 -11
- package/dist/{project-expired-f29e6d47.cjs.dev.js → project-expired-c941b592.cjs.dev.js} +12 -11
- package/dist/{project-expired-59169760.cjs.prod.js → project-expired-ee8b232c.cjs.prod.js} +12 -11
- package/dist/{project-not-found-88730a64.esm.js → project-not-found-340217f6.esm.js} +11 -10
- package/dist/{project-not-found-d968ede6.cjs.dev.js → project-not-found-9b7cfe88.cjs.dev.js} +11 -10
- package/dist/{project-not-found-625f0e91.cjs.prod.js → project-not-found-9cee9625.cjs.prod.js} +11 -10
- package/dist/{project-not-initialized-6d69541c.esm.js → project-not-initialized-55fd8df4.esm.js} +12 -11
- package/dist/{project-not-initialized-22d54dab.cjs.prod.js → project-not-initialized-7a058b68.cjs.prod.js} +12 -11
- package/dist/{project-not-initialized-f346dc17.cjs.dev.js → project-not-initialized-7b3843a3.cjs.dev.js} +12 -11
- package/dist/{project-suspended-d48e7d51.cjs.prod.js → project-suspended-12618898.cjs.prod.js} +11 -10
- package/dist/{project-suspended-be2e3265.esm.js → project-suspended-529b09d6.esm.js} +11 -10
- package/dist/{project-suspended-6a886974.cjs.dev.js → project-suspended-78e94b85.cjs.dev.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-645e12ca.cjs.prod.js → redirect-to-logout-52a7810f.cjs.prod.js} +14 -12
- package/dist/{redirect-to-logout-0196921c.esm.js → redirect-to-logout-5d5fc361.esm.js} +14 -12
- package/dist/{redirect-to-logout-477ea146.cjs.dev.js → redirect-to-logout-b331b037.cjs.dev.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-82b93073.esm.js → requests-in-flight-loader-20021ccc.esm.js} +11 -10
- package/dist/{requests-in-flight-loader-08cfa2ce.cjs.prod.js → requests-in-flight-loader-64d2e12d.cjs.prod.js} +11 -10
- package/dist/{requests-in-flight-loader-fb6a69f6.cjs.dev.js → requests-in-flight-loader-83cab813.cjs.dev.js} +11 -10
- package/dist/{service-page-project-switcher-2d65c6f7.cjs.dev.js → service-page-project-switcher-49dabe13.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-1e41f587.esm.js → service-page-project-switcher-6cdd506b.esm.js} +1 -1
- package/dist/{service-page-project-switcher-2746dbcc.cjs.prod.js → service-page-project-switcher-f1b43eb7.cjs.prod.js} +1 -1
- package/dist/{use-applications-menu-823a2492.cjs.dev.js → use-applications-menu-48d924bd.cjs.prod.js} +47 -39
- package/dist/{use-applications-menu-14a5a1f4.cjs.prod.js → use-applications-menu-7f548a7a.cjs.dev.js} +47 -39
- package/dist/{use-applications-menu-1514af11.esm.js → use-applications-menu-b871849c.esm.js} +44 -37
- package/dist/{user-settings-menu-d75f4958.cjs.prod.js → user-settings-menu-6660f508.cjs.prod.js} +29 -22
- package/dist/{user-settings-menu-f98bea89.esm.js → user-settings-menu-afa82f2a.esm.js} +29 -22
- package/dist/{user-settings-menu-6113cdd3.cjs.dev.js → user-settings-menu-f5c74042.cjs.dev.js} +29 -22
- package/package.json +22 -22
- 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-67db2a39.cjs.dev.js +0 -1893
- package/dist/quick-access-8c34e976.esm.js +0 -1865
- package/dist/quick-access-9001b324.cjs.prod.js +0 -1875
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
2
|
-
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
3
|
-
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
4
|
-
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
5
|
-
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
6
|
-
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
7
|
-
import _flagsInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/flags';
|
|
8
1
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
9
2
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
10
3
|
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -12,6 +5,14 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
|
|
|
12
5
|
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
13
6
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
14
7
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
|
+
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
11
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
12
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
13
|
+
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
14
|
+
import _flagsInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/flags';
|
|
15
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
15
16
|
import { act, createElement, Suspense } from 'react';
|
|
16
17
|
import { ApolloProvider } from '@apollo/client/react';
|
|
17
18
|
import { MockedProvider } from '@apollo/client/testing';
|
|
@@ -29,14 +30,13 @@ import { createEnhancedHistory } from '@commercetools-frontend/browser-history';
|
|
|
29
30
|
import { DOMAINS, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH } from '@commercetools-frontend/constants';
|
|
30
31
|
import { NotificationProviderForCustomComponent, NotificationsList } from '@commercetools-frontend/react-notifications';
|
|
31
32
|
import { createTestMiddleware } from '@commercetools-frontend/sdk/test-utils';
|
|
32
|
-
import { A as ApplicationEntryPoint } from '../../dist/application-entry-point-
|
|
33
|
-
import { c as createReduxStore } from '../../dist/index-
|
|
33
|
+
import { A as ApplicationEntryPoint } from '../../dist/application-entry-point-1b23fb6b.esm.js';
|
|
34
|
+
import { c as createReduxStore } from '../../dist/index-5aaa33bb.esm.js';
|
|
34
35
|
import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
|
|
35
36
|
import '@commercetools-frontend/application-components';
|
|
36
37
|
import '@commercetools-frontend/permissions';
|
|
37
38
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
38
39
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
39
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
40
40
|
import '@babel/runtime-corejs3/core-js-stable/reflect/has';
|
|
41
41
|
import '@reduxjs/toolkit';
|
|
42
42
|
import 'lodash/mapValues';
|
|
@@ -55,7 +55,7 @@ import 'redux-logger';
|
|
|
55
55
|
const _excluded = ["children"],
|
|
56
56
|
_excluded2 = ["children"];
|
|
57
57
|
function ownKeys$1(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; }
|
|
58
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
58
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys$1(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context0 = ownKeys$1(Object(t))).call(_context0, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
59
59
|
const defaultProject = {
|
|
60
60
|
key: 'test-with-big-data',
|
|
61
61
|
version: 43,
|
|
@@ -183,12 +183,13 @@ const denormalizeDataFences = dataFences => {
|
|
|
183
183
|
}, []);
|
|
184
184
|
};
|
|
185
185
|
const mapResourceAccessToAppliedPermissions = resourceAccesses => _mapInstanceProperty(resourceAccesses).call(resourceAccesses, resourceAccess => ({
|
|
186
|
-
name:
|
|
186
|
+
name: "can".concat(resourceAccess),
|
|
187
187
|
value: true
|
|
188
188
|
}));
|
|
189
189
|
const wrapIfNeeded = (children, wrapper) => wrapper ? /*#__PURE__*/createElement(wrapper, null, children) : children;
|
|
190
190
|
const ApolloProviderWrapper = props => {
|
|
191
|
-
|
|
191
|
+
var _props$apolloClient, _apolloClient$cache$a;
|
|
192
|
+
const apolloClient = (_props$apolloClient = props.apolloClient) !== null && _props$apolloClient !== void 0 ? _props$apolloClient : createApolloClient();
|
|
192
193
|
const enableApolloMocks = Boolean(props.mocks && props.mocks.length > 0);
|
|
193
194
|
if (!enableApolloMocks) {
|
|
194
195
|
return (
|
|
@@ -207,7 +208,7 @@ const ApolloProviderWrapper = props => {
|
|
|
207
208
|
// Apollo cache and the mocked provider.
|
|
208
209
|
// @ts-expect-error
|
|
209
210
|
,
|
|
210
|
-
addTypename: apolloClient.cache.addTypename
|
|
211
|
+
addTypename: (_apolloClient$cache$a = apolloClient.cache.addTypename) !== null && _apolloClient$cache$a !== void 0 ? _apolloClient$cache$a : true,
|
|
211
212
|
cache: apolloClient.cache,
|
|
212
213
|
children: props.children
|
|
213
214
|
});
|
|
@@ -254,9 +255,10 @@ function createApplicationProviders() {
|
|
|
254
255
|
}
|
|
255
256
|
let initialRoute = route;
|
|
256
257
|
if (!route && mergedProject) {
|
|
257
|
-
|
|
258
|
+
var _context8;
|
|
259
|
+
initialRoute = _concatInstanceProperty(_context8 = "/".concat(mergedProject.key, "/")).call(_context8, mergedEnvironment.entryPointUriPath);
|
|
258
260
|
}
|
|
259
|
-
const memoryHistory = history
|
|
261
|
+
const memoryHistory = history !== null && history !== void 0 ? history : createEnhancedHistory(createMemoryHistory({
|
|
260
262
|
initialEntries: [initialRoute || '/'],
|
|
261
263
|
getUserConfirmation: (_message, callback) => callback(true)
|
|
262
264
|
}));
|
|
@@ -481,8 +483,9 @@ const testCustomViewData = {
|
|
|
481
483
|
}]
|
|
482
484
|
};
|
|
483
485
|
const renderCustomView = props => {
|
|
486
|
+
var _props$customViewHost;
|
|
484
487
|
return renderAppWithRedux(jsx(CustomViewContextProvider, {
|
|
485
|
-
hostUrl: props.customViewHostUrl
|
|
488
|
+
hostUrl: (_props$customViewHost = props.customViewHostUrl) !== null && _props$customViewHost !== void 0 ? _props$customViewHost : 'https://mc.ct.com/my-project/products/product-id-1',
|
|
486
489
|
customViewConfig: _objectSpread(_objectSpread({}, testCustomViewData), props.customViewConfig),
|
|
487
490
|
children: props.children
|
|
488
491
|
}), {
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
4
|
-
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
5
|
-
|
|
6
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
7
|
-
|
|
8
|
-
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
9
|
-
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
10
|
-
|
|
11
|
-
const DIMENSIONS = {
|
|
12
|
-
header: '56px'
|
|
13
|
-
};
|
|
14
|
-
const NAVBAR = {
|
|
15
|
-
expanderHeight: '50px',
|
|
16
|
-
expanderSize: '40px',
|
|
17
|
-
iconSize: '24px',
|
|
18
|
-
iconSizeHover: '28px',
|
|
19
|
-
itemSize: '48px',
|
|
20
|
-
itemHeight: '56px',
|
|
21
|
-
sublistIndentationWhenCollapsed: '72px',
|
|
22
|
-
sublistIndentationWhenExpanded: '248px',
|
|
23
|
-
sublistItemMinHeight: '50px',
|
|
24
|
-
sublistWidth: '272px',
|
|
25
|
-
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
26
|
-
widthLeftNavigation: '80px',
|
|
27
|
-
widthLeftNavigationWhenExpanded: '256px'
|
|
28
|
-
};
|
|
29
|
-
const WINDOW_SIZES = {
|
|
30
|
-
STANDARD: 1024,
|
|
31
|
-
WIDE: 1200
|
|
32
|
-
};
|
|
33
|
-
const CONTAINERS = {
|
|
34
|
-
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
35
|
-
LEFT_OF_PROFILE: 'left-of-profile'
|
|
36
|
-
};
|
|
37
|
-
const SUSPENSION_REASONS = {
|
|
38
|
-
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
39
|
-
PAYMENT: 'Payment',
|
|
40
|
-
OTHER: 'Other'
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// OIDC params
|
|
44
|
-
const OIDC_RESPONSE_TYPES = {
|
|
45
|
-
ID_TOKEN: 'id_token'
|
|
46
|
-
};
|
|
47
|
-
const OIDC_CLAIMS = {
|
|
48
|
-
OPEN_ID: 'openid',
|
|
49
|
-
PROJECT_KEY: 'project_key',
|
|
50
|
-
TEAM_ID: 'team_id',
|
|
51
|
-
APPLICATION_ID: 'application_id',
|
|
52
|
-
VIEW: 'view',
|
|
53
|
-
MANAGE: 'manage'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const buildOidcScope = options => {
|
|
57
|
-
var _context, _context2;
|
|
58
|
-
const claims = [];
|
|
59
|
-
|
|
60
|
-
// Set the projectKey
|
|
61
|
-
if (options.projectKey) {
|
|
62
|
-
claims.push(`${OIDC_CLAIMS.PROJECT_KEY}:${options.projectKey}`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Set the OAuth Scopes
|
|
66
|
-
claims.push(..._mapInstanceProperty__default["default"](_context = options.oAuthScopes?.view ?? []).call(_context, scope => `${OIDC_CLAIMS.VIEW}:${scope}`));
|
|
67
|
-
claims.push(..._mapInstanceProperty__default["default"](_context2 = options.oAuthScopes?.manage ?? []).call(_context2, scope => `${OIDC_CLAIMS.MANAGE}:${scope}`));
|
|
68
|
-
// Set additional OAuth scopes
|
|
69
|
-
if (options?.additionalOAuthScopes) {
|
|
70
|
-
var _context3;
|
|
71
|
-
_forEachInstanceProperty__default["default"](_context3 = options.additionalOAuthScopes).call(_context3, additionalOAuthScope => {
|
|
72
|
-
var _context4, _context5;
|
|
73
|
-
claims.push(..._mapInstanceProperty__default["default"](_context4 = additionalOAuthScope.view ?? []).call(_context4, viewOAuthScope => `view/${additionalOAuthScope.name}:${viewOAuthScope}`), ..._mapInstanceProperty__default["default"](_context5 = additionalOAuthScope.manage ?? []).call(_context5, manageOAuthScope => `manage/${additionalOAuthScope.name}:${manageOAuthScope}`));
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Set the teamId and applicationId
|
|
78
|
-
if (options.teamId) {
|
|
79
|
-
claims.push(`${OIDC_CLAIMS.TEAM_ID}:${options.teamId}`);
|
|
80
|
-
if (options.applicationId) {
|
|
81
|
-
claims.push(`${OIDC_CLAIMS.APPLICATION_ID}:${options.applicationId}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return [
|
|
85
|
-
// This is required as per OIDC spec.
|
|
86
|
-
OIDC_CLAIMS.OPEN_ID,
|
|
87
|
-
// Custom claims
|
|
88
|
-
...claims].join(' ');
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
exports.CONTAINERS = CONTAINERS;
|
|
92
|
-
exports.DIMENSIONS = DIMENSIONS;
|
|
93
|
-
exports.NAVBAR = NAVBAR;
|
|
94
|
-
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
95
|
-
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
96
|
-
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
97
|
-
exports.WINDOW_SIZES = WINDOW_SIZES;
|
|
98
|
-
exports.buildOidcScope = buildOidcScope;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
2
|
-
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
3
|
-
|
|
4
|
-
const DIMENSIONS = {
|
|
5
|
-
header: '56px'
|
|
6
|
-
};
|
|
7
|
-
const NAVBAR = {
|
|
8
|
-
expanderHeight: '50px',
|
|
9
|
-
expanderSize: '40px',
|
|
10
|
-
iconSize: '24px',
|
|
11
|
-
iconSizeHover: '28px',
|
|
12
|
-
itemSize: '48px',
|
|
13
|
-
itemHeight: '56px',
|
|
14
|
-
sublistIndentationWhenCollapsed: '72px',
|
|
15
|
-
sublistIndentationWhenExpanded: '248px',
|
|
16
|
-
sublistItemMinHeight: '50px',
|
|
17
|
-
sublistWidth: '272px',
|
|
18
|
-
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
19
|
-
widthLeftNavigation: '80px',
|
|
20
|
-
widthLeftNavigationWhenExpanded: '256px'
|
|
21
|
-
};
|
|
22
|
-
const WINDOW_SIZES = {
|
|
23
|
-
STANDARD: 1024,
|
|
24
|
-
WIDE: 1200
|
|
25
|
-
};
|
|
26
|
-
const CONTAINERS = {
|
|
27
|
-
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
28
|
-
LEFT_OF_PROFILE: 'left-of-profile'
|
|
29
|
-
};
|
|
30
|
-
const SUSPENSION_REASONS = {
|
|
31
|
-
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
32
|
-
PAYMENT: 'Payment',
|
|
33
|
-
OTHER: 'Other'
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// OIDC params
|
|
37
|
-
const OIDC_RESPONSE_TYPES = {
|
|
38
|
-
ID_TOKEN: 'id_token'
|
|
39
|
-
};
|
|
40
|
-
const OIDC_CLAIMS = {
|
|
41
|
-
OPEN_ID: 'openid',
|
|
42
|
-
PROJECT_KEY: 'project_key',
|
|
43
|
-
TEAM_ID: 'team_id',
|
|
44
|
-
APPLICATION_ID: 'application_id',
|
|
45
|
-
VIEW: 'view',
|
|
46
|
-
MANAGE: 'manage'
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const buildOidcScope = options => {
|
|
50
|
-
var _context, _context2;
|
|
51
|
-
const claims = [];
|
|
52
|
-
|
|
53
|
-
// Set the projectKey
|
|
54
|
-
if (options.projectKey) {
|
|
55
|
-
claims.push(`${OIDC_CLAIMS.PROJECT_KEY}:${options.projectKey}`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Set the OAuth Scopes
|
|
59
|
-
claims.push(..._mapInstanceProperty(_context = options.oAuthScopes?.view ?? []).call(_context, scope => `${OIDC_CLAIMS.VIEW}:${scope}`));
|
|
60
|
-
claims.push(..._mapInstanceProperty(_context2 = options.oAuthScopes?.manage ?? []).call(_context2, scope => `${OIDC_CLAIMS.MANAGE}:${scope}`));
|
|
61
|
-
// Set additional OAuth scopes
|
|
62
|
-
if (options?.additionalOAuthScopes) {
|
|
63
|
-
var _context3;
|
|
64
|
-
_forEachInstanceProperty(_context3 = options.additionalOAuthScopes).call(_context3, additionalOAuthScope => {
|
|
65
|
-
var _context4, _context5;
|
|
66
|
-
claims.push(..._mapInstanceProperty(_context4 = additionalOAuthScope.view ?? []).call(_context4, viewOAuthScope => `view/${additionalOAuthScope.name}:${viewOAuthScope}`), ..._mapInstanceProperty(_context5 = additionalOAuthScope.manage ?? []).call(_context5, manageOAuthScope => `manage/${additionalOAuthScope.name}:${manageOAuthScope}`));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Set the teamId and applicationId
|
|
71
|
-
if (options.teamId) {
|
|
72
|
-
claims.push(`${OIDC_CLAIMS.TEAM_ID}:${options.teamId}`);
|
|
73
|
-
if (options.applicationId) {
|
|
74
|
-
claims.push(`${OIDC_CLAIMS.APPLICATION_ID}:${options.applicationId}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return [
|
|
78
|
-
// This is required as per OIDC spec.
|
|
79
|
-
OIDC_CLAIMS.OPEN_ID,
|
|
80
|
-
// Custom claims
|
|
81
|
-
...claims].join(' ');
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
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 };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
4
|
-
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
5
|
-
|
|
6
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
7
|
-
|
|
8
|
-
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
9
|
-
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
10
|
-
|
|
11
|
-
const DIMENSIONS = {
|
|
12
|
-
header: '56px'
|
|
13
|
-
};
|
|
14
|
-
const NAVBAR = {
|
|
15
|
-
expanderHeight: '50px',
|
|
16
|
-
expanderSize: '40px',
|
|
17
|
-
iconSize: '24px',
|
|
18
|
-
iconSizeHover: '28px',
|
|
19
|
-
itemSize: '48px',
|
|
20
|
-
itemHeight: '56px',
|
|
21
|
-
sublistIndentationWhenCollapsed: '72px',
|
|
22
|
-
sublistIndentationWhenExpanded: '248px',
|
|
23
|
-
sublistItemMinHeight: '50px',
|
|
24
|
-
sublistWidth: '272px',
|
|
25
|
-
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
26
|
-
widthLeftNavigation: '80px',
|
|
27
|
-
widthLeftNavigationWhenExpanded: '256px'
|
|
28
|
-
};
|
|
29
|
-
const WINDOW_SIZES = {
|
|
30
|
-
STANDARD: 1024,
|
|
31
|
-
WIDE: 1200
|
|
32
|
-
};
|
|
33
|
-
const CONTAINERS = {
|
|
34
|
-
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
35
|
-
LEFT_OF_PROFILE: 'left-of-profile'
|
|
36
|
-
};
|
|
37
|
-
const SUSPENSION_REASONS = {
|
|
38
|
-
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
39
|
-
PAYMENT: 'Payment',
|
|
40
|
-
OTHER: 'Other'
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// OIDC params
|
|
44
|
-
const OIDC_RESPONSE_TYPES = {
|
|
45
|
-
ID_TOKEN: 'id_token'
|
|
46
|
-
};
|
|
47
|
-
const OIDC_CLAIMS = {
|
|
48
|
-
OPEN_ID: 'openid',
|
|
49
|
-
PROJECT_KEY: 'project_key',
|
|
50
|
-
TEAM_ID: 'team_id',
|
|
51
|
-
APPLICATION_ID: 'application_id',
|
|
52
|
-
VIEW: 'view',
|
|
53
|
-
MANAGE: 'manage'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const buildOidcScope = options => {
|
|
57
|
-
var _context, _context2;
|
|
58
|
-
const claims = [];
|
|
59
|
-
|
|
60
|
-
// Set the projectKey
|
|
61
|
-
if (options.projectKey) {
|
|
62
|
-
claims.push(`${OIDC_CLAIMS.PROJECT_KEY}:${options.projectKey}`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Set the OAuth Scopes
|
|
66
|
-
claims.push(..._mapInstanceProperty__default["default"](_context = options.oAuthScopes?.view ?? []).call(_context, scope => `${OIDC_CLAIMS.VIEW}:${scope}`));
|
|
67
|
-
claims.push(..._mapInstanceProperty__default["default"](_context2 = options.oAuthScopes?.manage ?? []).call(_context2, scope => `${OIDC_CLAIMS.MANAGE}:${scope}`));
|
|
68
|
-
// Set additional OAuth scopes
|
|
69
|
-
if (options?.additionalOAuthScopes) {
|
|
70
|
-
var _context3;
|
|
71
|
-
_forEachInstanceProperty__default["default"](_context3 = options.additionalOAuthScopes).call(_context3, additionalOAuthScope => {
|
|
72
|
-
var _context4, _context5;
|
|
73
|
-
claims.push(..._mapInstanceProperty__default["default"](_context4 = additionalOAuthScope.view ?? []).call(_context4, viewOAuthScope => `view/${additionalOAuthScope.name}:${viewOAuthScope}`), ..._mapInstanceProperty__default["default"](_context5 = additionalOAuthScope.manage ?? []).call(_context5, manageOAuthScope => `manage/${additionalOAuthScope.name}:${manageOAuthScope}`));
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Set the teamId and applicationId
|
|
78
|
-
if (options.teamId) {
|
|
79
|
-
claims.push(`${OIDC_CLAIMS.TEAM_ID}:${options.teamId}`);
|
|
80
|
-
if (options.applicationId) {
|
|
81
|
-
claims.push(`${OIDC_CLAIMS.APPLICATION_ID}:${options.applicationId}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return [
|
|
85
|
-
// This is required as per OIDC spec.
|
|
86
|
-
OIDC_CLAIMS.OPEN_ID,
|
|
87
|
-
// Custom claims
|
|
88
|
-
...claims].join(' ');
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
exports.CONTAINERS = CONTAINERS;
|
|
92
|
-
exports.DIMENSIONS = DIMENSIONS;
|
|
93
|
-
exports.NAVBAR = NAVBAR;
|
|
94
|
-
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
95
|
-
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
96
|
-
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
97
|
-
exports.WINDOW_SIZES = WINDOW_SIZES;
|
|
98
|
-
exports.buildOidcScope = buildOidcScope;
|