@commercetools-frontend/application-shell 21.2.1 → 21.3.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-c8e001b7.cjs.prod.js → application-entry-point-6821202c.cjs.prod.js} +27 -27
- package/dist/{application-entry-point-1d14f973.esm.js → application-entry-point-7a3d2473.esm.js} +4 -4
- package/dist/{application-entry-point-1126a3a0.cjs.dev.js → application-entry-point-7a82b48b.cjs.dev.js} +27 -27
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +14 -8
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +14 -8
- package/dist/commercetools-frontend-application-shell.esm.js +6 -6
- package/dist/constants-33a16227.esm.js +46 -0
- package/dist/constants-745aeeca.cjs.prod.js +54 -0
- package/dist/constants-fdbe0e9d.cjs.dev.js +54 -0
- package/dist/declarations/src/components/navbar/navbar.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +2 -1
- package/dist/declarations/src/ssr/index.d.ts +1 -1
- package/dist/declarations/src/types/generated/settings.d.ts +996 -835
- package/dist/declarations/src/utils/index.d.ts +0 -1
- package/dist/{index-4ffa508b.esm.js → index-37ae0f7e.esm.js} +10 -10
- package/dist/{index-4a064d3c.cjs.prod.js → index-dd34dd25.cjs.prod.js} +50 -50
- package/dist/{index-ba1e4ad6.cjs.dev.js → index-f0ffb5e8.cjs.dev.js} +50 -50
- package/dist/{oidc-cb5c92bd.esm.js → oidc-415a3ef6.esm.js} +1 -1
- package/dist/{oidc-f43cd8da.cjs.dev.js → oidc-69515812.cjs.prod.js} +6 -6
- package/dist/{oidc-d5829556.cjs.prod.js → oidc-dc44ab6f.cjs.dev.js} +6 -6
- package/dist/{project-expired-04819de8.cjs.dev.js → project-expired-733693d9.cjs.dev.js} +7 -7
- package/dist/{project-expired-84899da4.esm.js → project-expired-c3c5135f.esm.js} +7 -7
- package/dist/{project-expired-c28b50d9.cjs.prod.js → project-expired-d86947e3.cjs.prod.js} +7 -7
- package/dist/{project-not-found-f280edc8.cjs.dev.js → project-not-found-1eb33403.cjs.prod.js} +7 -7
- package/dist/{project-not-found-44bf4e65.esm.js → project-not-found-7b5e71ab.esm.js} +7 -7
- package/dist/{project-not-found-77c72212.cjs.prod.js → project-not-found-e8008dcf.cjs.dev.js} +7 -7
- package/dist/{project-not-initialized-fd0808c0.esm.js → project-not-initialized-6c0b2ff1.esm.js} +7 -7
- package/dist/{project-not-initialized-46b2b026.cjs.prod.js → project-not-initialized-b8de90e4.cjs.dev.js} +7 -7
- package/dist/{project-not-initialized-e1bca03f.cjs.dev.js → project-not-initialized-c449334c.cjs.prod.js} +7 -7
- package/dist/{project-suspended-8bdd4498.esm.js → project-suspended-196329a9.esm.js} +7 -7
- package/dist/{project-suspended-f0abaa32.cjs.dev.js → project-suspended-505c1db9.cjs.prod.js} +7 -7
- package/dist/{project-suspended-7dabf6de.cjs.prod.js → project-suspended-7781746c.cjs.dev.js} +7 -7
- package/dist/{quick-access-1ebebadc.cjs.prod.js → quick-access-7e316617.cjs.prod.js} +5 -5
- package/dist/{quick-access-f6e1aa94.esm.js → quick-access-c1776662.esm.js} +5 -5
- package/dist/{quick-access-085b1f78.cjs.dev.js → quick-access-d4783058.cjs.dev.js} +5 -5
- package/dist/{service-page-project-switcher-64d9c6e2.cjs.prod.js → service-page-project-switcher-298ad643.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-5230256d.esm.js → service-page-project-switcher-e0ce3e9c.esm.js} +1 -1
- package/dist/{service-page-project-switcher-0f154f42.cjs.dev.js → service-page-project-switcher-f2ec3a9f.cjs.dev.js} +1 -1
- package/package.json +30 -29
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +12 -6
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +12 -6
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +4 -4
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +4 -4
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +4 -4
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +3 -3
- package/dist/declarations/src/utils/formatters.d.ts +0 -8
- package/dist/formatters-1c23c0a9.esm.js +0 -93
- package/dist/formatters-a5bb12eb.cjs.prod.js +0 -108
- package/dist/formatters-e4b9b9dc.cjs.dev.js +0 -108
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
4
|
-
var upperFirst = require('lodash/upperFirst');
|
|
5
|
-
|
|
6
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
7
|
-
|
|
8
|
-
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
9
|
-
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
10
|
-
|
|
11
|
-
var SUPPORTED_HEADERS = {
|
|
12
|
-
ACCEPT_VERSION: 'Accept-version',
|
|
13
|
-
AUTHORIZATION: 'Authorization',
|
|
14
|
-
X_APPLICATION_ID: 'X-Application-Id',
|
|
15
|
-
X_CORRELATION_ID: 'X-Correlation-Id',
|
|
16
|
-
X_FEATURE_FLAG: 'X-Feature-Flag',
|
|
17
|
-
X_FORWARD_TO: 'X-Forward-To',
|
|
18
|
-
X_GRAPHQL_TARGET: 'X-Graphql-Target',
|
|
19
|
-
X_GRAPHQL_OPERATION_NAME: 'X-Graphql-Operation-Name',
|
|
20
|
-
X_PROJECT_KEY: 'X-Project-Key',
|
|
21
|
-
X_TEAM_ID: 'X-Team-Id',
|
|
22
|
-
X_TOKEN_RETRY: 'X-Force-Token'
|
|
23
|
-
};
|
|
24
|
-
var CONTAINERS = {
|
|
25
|
-
LOCALE_SWITCHER: 'locale-switcher-container'
|
|
26
|
-
};
|
|
27
|
-
var STORAGE_KEYS = {
|
|
28
|
-
NONCE: 'nonce',
|
|
29
|
-
IS_AUTHENTICATED: 'isAuthenticated',
|
|
30
|
-
SESSION_TOKEN: 'sessionToken',
|
|
31
|
-
SESSION_SCOPE: 'sessionScope',
|
|
32
|
-
ACTIVE_PROJECT_KEY: 'activeProjectKey',
|
|
33
|
-
ACTIVE_TEAM_ID: 'activeTeamId',
|
|
34
|
-
SELECTED_DATA_LOCALE: 'selectedDataLocale',
|
|
35
|
-
IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
|
|
36
|
-
LOGIN_STRATEGY: 'loginStrategy'
|
|
37
|
-
};
|
|
38
|
-
var SUSPENSION_REASONS = {
|
|
39
|
-
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
40
|
-
PAYMENT: 'Payment',
|
|
41
|
-
OTHER: 'Other'
|
|
42
|
-
}; // SSO
|
|
43
|
-
var LOGIN_STRATEGY_OIDC = 'oidc';
|
|
44
|
-
|
|
45
|
-
var OIDC_RESPONSE_TYPES = {
|
|
46
|
-
ID_TOKEN: 'id_token'
|
|
47
|
-
};
|
|
48
|
-
var OIDC_CLAIMS = {
|
|
49
|
-
OPEN_ID: 'openid',
|
|
50
|
-
PROJECT_KEY: 'project_key',
|
|
51
|
-
TEAM_ID: 'team_id',
|
|
52
|
-
VIEW: 'view',
|
|
53
|
-
MANAGE: 'manage'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// removing special characters except underscore.
|
|
57
|
-
// It makes the first character of the string and the next character after a special character an uppercase.
|
|
58
|
-
// It replaces hyphen(-) with a forward slash(/) if the hyphen(-) is followed by a number.
|
|
59
|
-
// Examples:
|
|
60
|
-
// input: foo-bar result: FooBar
|
|
61
|
-
// input: foo_bar result: Foo_Bar
|
|
62
|
-
// input: foo-1bar result: Foo/1bar
|
|
63
|
-
|
|
64
|
-
var formatEntryPointUriPathToResourceAccessKey = function formatEntryPointUriPathToResourceAccessKey(entryPointUriPath) {
|
|
65
|
-
var _context, _context2;
|
|
66
|
-
|
|
67
|
-
return _mapInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = entryPointUriPath //Splits the string by underscore.
|
|
68
|
-
.split('_') // Uppercase the first character of each word split.
|
|
69
|
-
).call(_context2, function (word) {
|
|
70
|
-
return upperFirst__default["default"](word);
|
|
71
|
-
}) // Join the words by an underscore.
|
|
72
|
-
.join('_') // Each word is split by a hyphen.
|
|
73
|
-
.split('-')).call(_context, function (word, i) {
|
|
74
|
-
// Regex below checking if the character is numeric.
|
|
75
|
-
// If the word after the hyphen is numeric, replace the hyphen with a forward slash.
|
|
76
|
-
// If not, omit the hyphen and uppercase the first character
|
|
77
|
-
if (i > 0 && /^-?\d+$/.test(word[0])) {
|
|
78
|
-
return '/' + word;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return upperFirst__default["default"](word);
|
|
82
|
-
}).join('');
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
var entryPointUriPathToResourceAccesses = function entryPointUriPathToResourceAccesses(entryPointUriPath) {
|
|
86
|
-
var convertedEntryPointUriPath = formatEntryPointUriPathToResourceAccessKey(entryPointUriPath);
|
|
87
|
-
return {
|
|
88
|
-
view: "view".concat(convertedEntryPointUriPath),
|
|
89
|
-
manage: "manage".concat(convertedEntryPointUriPath)
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
var entryPointUriPathToPermissionKeys = function entryPointUriPathToPermissionKeys(entryPointUriPath) {
|
|
93
|
-
var resourceAccesses = entryPointUriPathToResourceAccesses(entryPointUriPath);
|
|
94
|
-
return {
|
|
95
|
-
View: upperFirst__default["default"](resourceAccesses.view),
|
|
96
|
-
Manage: upperFirst__default["default"](resourceAccesses.manage)
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.CONTAINERS = CONTAINERS;
|
|
101
|
-
exports.LOGIN_STRATEGY_OIDC = LOGIN_STRATEGY_OIDC;
|
|
102
|
-
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
103
|
-
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
104
|
-
exports.STORAGE_KEYS = STORAGE_KEYS;
|
|
105
|
-
exports.SUPPORTED_HEADERS = SUPPORTED_HEADERS;
|
|
106
|
-
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
107
|
-
exports.entryPointUriPathToPermissionKeys = entryPointUriPathToPermissionKeys;
|
|
108
|
-
exports.entryPointUriPathToResourceAccesses = entryPointUriPathToResourceAccesses;
|