@commercetools-frontend/constants 21.23.9 → 21.24.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.
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "21.
|
|
6
|
+
var version = "21.24.0";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
|
-
|
|
9
|
+
const PORTALS_CONTAINER_ID = 'portals-container'; // Links
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const SUPPORT_PORTAL_URL = 'https://support.commercetools.com'; // Notification actions
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const SHOW_LOADING = 'SHOW_LOADING';
|
|
14
|
+
const HIDE_LOADING = 'HIDE_LOADING';
|
|
15
|
+
const HIDE_ALL_PAGE_NOTIFICATIONS = 'HIDE_ALL_PAGE_NOTIFICATIONS'; // Notifications
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const NOTIFICATION_DOMAINS = {
|
|
18
18
|
GLOBAL: 'global',
|
|
19
19
|
PAGE: 'page',
|
|
20
20
|
SIDE: 'side'
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
const NOTIFICATION_KINDS_SIDE = {
|
|
23
23
|
error: 'error',
|
|
24
24
|
warning: 'warning',
|
|
25
25
|
info: 'info',
|
|
26
26
|
success: 'success'
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
const NOTIFICATION_KINDS_GLOBAL = {
|
|
29
29
|
error: 'error',
|
|
30
30
|
warning: 'warning',
|
|
31
31
|
info: 'info',
|
|
32
32
|
success: 'success',
|
|
33
33
|
'unexpected-error': 'unexpected-error'
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
const NOTIFICATION_KINDS_PAGE = {
|
|
36
36
|
error: 'error',
|
|
37
37
|
warning: 'warning',
|
|
38
38
|
info: 'info',
|
|
@@ -41,24 +41,24 @@ var NOTIFICATION_KINDS_PAGE = {
|
|
|
41
41
|
'api-error': 'api-error'
|
|
42
42
|
};
|
|
43
43
|
// Alias to `NOTIFICATION_DOMAINS` for backwards compatibility
|
|
44
|
-
|
|
44
|
+
const DOMAINS = NOTIFICATION_DOMAINS;
|
|
45
45
|
// Fallback string when there is no localized value
|
|
46
|
-
|
|
46
|
+
const NO_VALUE_FALLBACK = '- -'; // HTTP requests and responses
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const STATUS_CODES = {
|
|
49
49
|
UNAUTHORIZED: 401,
|
|
50
50
|
FORBIDDEN: 403,
|
|
51
51
|
UNAUTHENTICATED: 299,
|
|
52
52
|
NOT_FOUND: 404
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
const LOGOUT_REASONS = {
|
|
55
55
|
USER: 'user',
|
|
56
56
|
UNAUTHORIZED: 'unauthorized',
|
|
57
57
|
INVALID: 'invalid',
|
|
58
58
|
DELETED: 'deleted',
|
|
59
59
|
NO_PROJECTS: 'no-projects'
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
const GRAPHQL_TARGETS = {
|
|
62
62
|
MERCHANT_CENTER_BACKEND: 'mc',
|
|
63
63
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
64
64
|
DASHBOARD_SERVICE: 'dashboard',
|
|
@@ -68,7 +68,7 @@ var GRAPHQL_TARGETS = {
|
|
|
68
68
|
SETTINGS_SERVICE: 'settings',
|
|
69
69
|
ADMINISTRATION_SERVICE: 'administration'
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
const MC_API_PROXY_TARGETS = {
|
|
72
72
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
73
73
|
MACHINE_LEARNING: 'ml',
|
|
74
74
|
PIM_SEARCH: 'pim-search',
|
|
@@ -76,7 +76,7 @@ var MC_API_PROXY_TARGETS = {
|
|
|
76
76
|
MC_METRICS: 'mc-metrics',
|
|
77
77
|
IMPORT: 'import'
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
const HTTP_SECURITY_HEADERS = {
|
|
80
80
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
81
81
|
'X-XSS-Protection': '1; mode=block',
|
|
82
82
|
'X-Content-Type-Options': 'nosniff',
|
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "21.
|
|
6
|
+
var version = "21.24.0";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
|
-
|
|
9
|
+
const PORTALS_CONTAINER_ID = 'portals-container'; // Links
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const SUPPORT_PORTAL_URL = 'https://support.commercetools.com'; // Notification actions
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const SHOW_LOADING = 'SHOW_LOADING';
|
|
14
|
+
const HIDE_LOADING = 'HIDE_LOADING';
|
|
15
|
+
const HIDE_ALL_PAGE_NOTIFICATIONS = 'HIDE_ALL_PAGE_NOTIFICATIONS'; // Notifications
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const NOTIFICATION_DOMAINS = {
|
|
18
18
|
GLOBAL: 'global',
|
|
19
19
|
PAGE: 'page',
|
|
20
20
|
SIDE: 'side'
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
const NOTIFICATION_KINDS_SIDE = {
|
|
23
23
|
error: 'error',
|
|
24
24
|
warning: 'warning',
|
|
25
25
|
info: 'info',
|
|
26
26
|
success: 'success'
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
const NOTIFICATION_KINDS_GLOBAL = {
|
|
29
29
|
error: 'error',
|
|
30
30
|
warning: 'warning',
|
|
31
31
|
info: 'info',
|
|
32
32
|
success: 'success',
|
|
33
33
|
'unexpected-error': 'unexpected-error'
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
const NOTIFICATION_KINDS_PAGE = {
|
|
36
36
|
error: 'error',
|
|
37
37
|
warning: 'warning',
|
|
38
38
|
info: 'info',
|
|
@@ -41,24 +41,24 @@ var NOTIFICATION_KINDS_PAGE = {
|
|
|
41
41
|
'api-error': 'api-error'
|
|
42
42
|
};
|
|
43
43
|
// Alias to `NOTIFICATION_DOMAINS` for backwards compatibility
|
|
44
|
-
|
|
44
|
+
const DOMAINS = NOTIFICATION_DOMAINS;
|
|
45
45
|
// Fallback string when there is no localized value
|
|
46
|
-
|
|
46
|
+
const NO_VALUE_FALLBACK = '- -'; // HTTP requests and responses
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const STATUS_CODES = {
|
|
49
49
|
UNAUTHORIZED: 401,
|
|
50
50
|
FORBIDDEN: 403,
|
|
51
51
|
UNAUTHENTICATED: 299,
|
|
52
52
|
NOT_FOUND: 404
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
const LOGOUT_REASONS = {
|
|
55
55
|
USER: 'user',
|
|
56
56
|
UNAUTHORIZED: 'unauthorized',
|
|
57
57
|
INVALID: 'invalid',
|
|
58
58
|
DELETED: 'deleted',
|
|
59
59
|
NO_PROJECTS: 'no-projects'
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
const GRAPHQL_TARGETS = {
|
|
62
62
|
MERCHANT_CENTER_BACKEND: 'mc',
|
|
63
63
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
64
64
|
DASHBOARD_SERVICE: 'dashboard',
|
|
@@ -68,7 +68,7 @@ var GRAPHQL_TARGETS = {
|
|
|
68
68
|
SETTINGS_SERVICE: 'settings',
|
|
69
69
|
ADMINISTRATION_SERVICE: 'administration'
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
const MC_API_PROXY_TARGETS = {
|
|
72
72
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
73
73
|
MACHINE_LEARNING: 'ml',
|
|
74
74
|
PIM_SEARCH: 'pim-search',
|
|
@@ -76,7 +76,7 @@ var MC_API_PROXY_TARGETS = {
|
|
|
76
76
|
MC_METRICS: 'mc-metrics',
|
|
77
77
|
IMPORT: 'import'
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
const HTTP_SECURITY_HEADERS = {
|
|
80
80
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
81
81
|
'X-XSS-Protection': '1; mode=block',
|
|
82
82
|
'X-Content-Type-Options': 'nosniff',
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
// NOTE: This string will be replaced on build time with the package version.
|
|
2
|
-
var version = "21.
|
|
2
|
+
var version = "21.24.0";
|
|
3
3
|
|
|
4
4
|
// DOM elements
|
|
5
|
-
|
|
5
|
+
const PORTALS_CONTAINER_ID = 'portals-container'; // Links
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const SUPPORT_PORTAL_URL = 'https://support.commercetools.com'; // Notification actions
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const SHOW_LOADING = 'SHOW_LOADING';
|
|
10
|
+
const HIDE_LOADING = 'HIDE_LOADING';
|
|
11
|
+
const HIDE_ALL_PAGE_NOTIFICATIONS = 'HIDE_ALL_PAGE_NOTIFICATIONS'; // Notifications
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
const NOTIFICATION_DOMAINS = {
|
|
14
14
|
GLOBAL: 'global',
|
|
15
15
|
PAGE: 'page',
|
|
16
16
|
SIDE: 'side'
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
const NOTIFICATION_KINDS_SIDE = {
|
|
19
19
|
error: 'error',
|
|
20
20
|
warning: 'warning',
|
|
21
21
|
info: 'info',
|
|
22
22
|
success: 'success'
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
const NOTIFICATION_KINDS_GLOBAL = {
|
|
25
25
|
error: 'error',
|
|
26
26
|
warning: 'warning',
|
|
27
27
|
info: 'info',
|
|
28
28
|
success: 'success',
|
|
29
29
|
'unexpected-error': 'unexpected-error'
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
const NOTIFICATION_KINDS_PAGE = {
|
|
32
32
|
error: 'error',
|
|
33
33
|
warning: 'warning',
|
|
34
34
|
info: 'info',
|
|
@@ -37,24 +37,24 @@ var NOTIFICATION_KINDS_PAGE = {
|
|
|
37
37
|
'api-error': 'api-error'
|
|
38
38
|
};
|
|
39
39
|
// Alias to `NOTIFICATION_DOMAINS` for backwards compatibility
|
|
40
|
-
|
|
40
|
+
const DOMAINS = NOTIFICATION_DOMAINS;
|
|
41
41
|
// Fallback string when there is no localized value
|
|
42
|
-
|
|
42
|
+
const NO_VALUE_FALLBACK = '- -'; // HTTP requests and responses
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
const STATUS_CODES = {
|
|
45
45
|
UNAUTHORIZED: 401,
|
|
46
46
|
FORBIDDEN: 403,
|
|
47
47
|
UNAUTHENTICATED: 299,
|
|
48
48
|
NOT_FOUND: 404
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
const LOGOUT_REASONS = {
|
|
51
51
|
USER: 'user',
|
|
52
52
|
UNAUTHORIZED: 'unauthorized',
|
|
53
53
|
INVALID: 'invalid',
|
|
54
54
|
DELETED: 'deleted',
|
|
55
55
|
NO_PROJECTS: 'no-projects'
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
const GRAPHQL_TARGETS = {
|
|
58
58
|
MERCHANT_CENTER_BACKEND: 'mc',
|
|
59
59
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
60
60
|
DASHBOARD_SERVICE: 'dashboard',
|
|
@@ -64,7 +64,7 @@ var GRAPHQL_TARGETS = {
|
|
|
64
64
|
SETTINGS_SERVICE: 'settings',
|
|
65
65
|
ADMINISTRATION_SERVICE: 'administration'
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
const MC_API_PROXY_TARGETS = {
|
|
68
68
|
COMMERCETOOLS_PLATFORM: 'ctp',
|
|
69
69
|
MACHINE_LEARNING: 'ml',
|
|
70
70
|
PIM_SEARCH: 'pim-search',
|
|
@@ -72,7 +72,7 @@ var MC_API_PROXY_TARGETS = {
|
|
|
72
72
|
MC_METRICS: 'mc-metrics',
|
|
73
73
|
IMPORT: 'import'
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
const HTTP_SECURITY_HEADERS = {
|
|
76
76
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
77
77
|
'X-XSS-Protection': '1; mode=block',
|
|
78
78
|
'X-Content-Type-Options': 'nosniff',
|
|
@@ -154,13 +154,9 @@ export interface ApplicationWindow extends Window {
|
|
|
154
154
|
mcApiUrl: string;
|
|
155
155
|
frontendHost: string;
|
|
156
156
|
servedByProxy: boolean;
|
|
157
|
-
mcProxyApiUrl?: string;
|
|
158
157
|
ldClientSideId?: string;
|
|
159
158
|
trackingSentry?: string;
|
|
160
159
|
trackingGtm?: string;
|
|
161
|
-
enableSignUp?: boolean;
|
|
162
|
-
enableLongLivedFeatureFlags?: boolean;
|
|
163
|
-
useFullRedirectsForLinks?: boolean;
|
|
164
160
|
__DEVELOPMENT__?: {
|
|
165
161
|
oidc?: ApplicationOidcForDevelopmentConfig;
|
|
166
162
|
menuLinks?: ApplicationMenuLinksForDevelopmentConfig;
|
package/package.json
CHANGED