@commercetools-frontend/constants 22.7.1 → 22.8.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/commercetools-frontend-constants.cjs.dev.js +5 -2
- package/dist/commercetools-frontend-constants.cjs.prod.js +5 -2
- package/dist/commercetools-frontend-constants.esm.js +5 -3
- package/dist/declarations/src/constants.d.ts +43 -20
- package/dist/declarations/src/types/generated/settings.d.ts +1638 -0
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@
|
|
|
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 = "22.
|
|
6
|
+
var version = "22.8.0";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
9
|
const PORTALS_CONTAINER_ID = 'portals-container';
|
|
@@ -83,11 +83,13 @@ const MC_API_PROXY_TARGETS = {
|
|
|
83
83
|
|
|
84
84
|
// Global application environment on window object
|
|
85
85
|
|
|
86
|
+
// Used for Custom Views, as we want to keep the `entryPointUriPath` value required in the runtime config.
|
|
87
|
+
const CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = '@@custom-view-host@@';
|
|
86
88
|
const HTTP_SECURITY_HEADERS = {
|
|
87
89
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
88
90
|
'X-XSS-Protection': '1; mode=block',
|
|
89
91
|
'X-Content-Type-Options': 'nosniff',
|
|
90
|
-
'X-Frame-Options': '
|
|
92
|
+
'X-Frame-Options': 'SAMEORIGIN',
|
|
91
93
|
'Referrer-Policy': 'same-origin'
|
|
92
94
|
};
|
|
93
95
|
|
|
@@ -103,6 +105,7 @@ const CUSTOM_VIEWS_EVENTS_META = {
|
|
|
103
105
|
|
|
104
106
|
exports.CUSTOM_VIEWS_EVENTS_META = CUSTOM_VIEWS_EVENTS_META;
|
|
105
107
|
exports.CUSTOM_VIEWS_EVENTS_NAMES = CUSTOM_VIEWS_EVENTS_NAMES;
|
|
108
|
+
exports.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH;
|
|
106
109
|
exports.DOMAINS = DOMAINS;
|
|
107
110
|
exports.GRAPHQL_TARGETS = GRAPHQL_TARGETS;
|
|
108
111
|
exports.HIDE_ALL_PAGE_NOTIFICATIONS = HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
@@ -3,7 +3,7 @@
|
|
|
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 = "22.
|
|
6
|
+
var version = "22.8.0";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
9
|
const PORTALS_CONTAINER_ID = 'portals-container';
|
|
@@ -83,11 +83,13 @@ const MC_API_PROXY_TARGETS = {
|
|
|
83
83
|
|
|
84
84
|
// Global application environment on window object
|
|
85
85
|
|
|
86
|
+
// Used for Custom Views, as we want to keep the `entryPointUriPath` value required in the runtime config.
|
|
87
|
+
const CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = '@@custom-view-host@@';
|
|
86
88
|
const HTTP_SECURITY_HEADERS = {
|
|
87
89
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
88
90
|
'X-XSS-Protection': '1; mode=block',
|
|
89
91
|
'X-Content-Type-Options': 'nosniff',
|
|
90
|
-
'X-Frame-Options': '
|
|
92
|
+
'X-Frame-Options': 'SAMEORIGIN',
|
|
91
93
|
'Referrer-Policy': 'same-origin'
|
|
92
94
|
};
|
|
93
95
|
|
|
@@ -103,6 +105,7 @@ const CUSTOM_VIEWS_EVENTS_META = {
|
|
|
103
105
|
|
|
104
106
|
exports.CUSTOM_VIEWS_EVENTS_META = CUSTOM_VIEWS_EVENTS_META;
|
|
105
107
|
exports.CUSTOM_VIEWS_EVENTS_NAMES = CUSTOM_VIEWS_EVENTS_NAMES;
|
|
108
|
+
exports.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH;
|
|
106
109
|
exports.DOMAINS = DOMAINS;
|
|
107
110
|
exports.GRAPHQL_TARGETS = GRAPHQL_TARGETS;
|
|
108
111
|
exports.HIDE_ALL_PAGE_NOTIFICATIONS = HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// NOTE: This string will be replaced on build time with the package version.
|
|
2
|
-
var version = "22.
|
|
2
|
+
var version = "22.8.0";
|
|
3
3
|
|
|
4
4
|
// DOM elements
|
|
5
5
|
const PORTALS_CONTAINER_ID = 'portals-container';
|
|
@@ -79,11 +79,13 @@ const MC_API_PROXY_TARGETS = {
|
|
|
79
79
|
|
|
80
80
|
// Global application environment on window object
|
|
81
81
|
|
|
82
|
+
// Used for Custom Views, as we want to keep the `entryPointUriPath` value required in the runtime config.
|
|
83
|
+
const CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = '@@custom-view-host@@';
|
|
82
84
|
const HTTP_SECURITY_HEADERS = {
|
|
83
85
|
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
|
|
84
86
|
'X-XSS-Protection': '1; mode=block',
|
|
85
87
|
'X-Content-Type-Options': 'nosniff',
|
|
86
|
-
'X-Frame-Options': '
|
|
88
|
+
'X-Frame-Options': 'SAMEORIGIN',
|
|
87
89
|
'Referrer-Policy': 'same-origin'
|
|
88
90
|
};
|
|
89
91
|
|
|
@@ -97,4 +99,4 @@ const CUSTOM_VIEWS_EVENTS_META = {
|
|
|
97
99
|
DESTINATION_PREFIX: 'custom-view-'
|
|
98
100
|
};
|
|
99
101
|
|
|
100
|
-
export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, SUPPORT_PORTAL_URL, version };
|
|
102
|
+
export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH, DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, SUPPORT_PORTAL_URL, version };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TCustomView } from './types/generated/settings';
|
|
1
2
|
export declare const PORTALS_CONTAINER_ID = "portals-container";
|
|
2
3
|
export declare const SUPPORT_PORTAL_URL = "https://support.commercetools.com";
|
|
3
4
|
export declare const SHOW_LOADING = "SHOW_LOADING";
|
|
@@ -115,6 +116,10 @@ export type TLocalizedField = {
|
|
|
115
116
|
locale: string;
|
|
116
117
|
value: string;
|
|
117
118
|
};
|
|
119
|
+
export type TPermissionData = {
|
|
120
|
+
name: string;
|
|
121
|
+
oAuthScopes: string[];
|
|
122
|
+
};
|
|
118
123
|
export type ApplicationMenuLinksForDevelopmentConfig = {
|
|
119
124
|
icon: string;
|
|
120
125
|
defaultLabel: string;
|
|
@@ -132,6 +137,7 @@ export type ApplicationOidcForDevelopmentConfig = {
|
|
|
132
137
|
initialProjectKey?: string;
|
|
133
138
|
teamId?: string;
|
|
134
139
|
applicationId?: string;
|
|
140
|
+
customViewId?: string;
|
|
135
141
|
oAuthScopes?: {
|
|
136
142
|
view: string[];
|
|
137
143
|
manage: string[];
|
|
@@ -142,32 +148,49 @@ export type ApplicationOidcForDevelopmentConfig = {
|
|
|
142
148
|
manage: string[];
|
|
143
149
|
}[];
|
|
144
150
|
};
|
|
151
|
+
export type CustomViewData = {
|
|
152
|
+
id: string;
|
|
153
|
+
defaultLabel: string;
|
|
154
|
+
labelAllLocales: TLocalizedField[];
|
|
155
|
+
description?: string;
|
|
156
|
+
url: string;
|
|
157
|
+
permissions: TPermissionData[];
|
|
158
|
+
locators: string[];
|
|
159
|
+
type: TCustomView['type'];
|
|
160
|
+
typeSettings?: TCustomView['typeSettings'];
|
|
161
|
+
};
|
|
162
|
+
export type ApplicationRuntimeEnvironmentForDevelopment = {
|
|
163
|
+
oidc?: ApplicationOidcForDevelopmentConfig;
|
|
164
|
+
menuLinks?: ApplicationMenuLinksForDevelopmentConfig;
|
|
165
|
+
customViewHostUrl?: string;
|
|
166
|
+
customViewConfig?: CustomViewData;
|
|
167
|
+
};
|
|
168
|
+
export type ApplicationRuntimeEnvironment = {
|
|
169
|
+
applicationId: string;
|
|
170
|
+
applicationIdentifier: string;
|
|
171
|
+
applicationName: string;
|
|
172
|
+
entryPointUriPath: string;
|
|
173
|
+
customViewId?: string;
|
|
174
|
+
revision: string;
|
|
175
|
+
env: string;
|
|
176
|
+
location: string;
|
|
177
|
+
cdnUrl: string;
|
|
178
|
+
mcApiUrl: string;
|
|
179
|
+
frontendHost: string;
|
|
180
|
+
servedByProxy: boolean;
|
|
181
|
+
ldClientSideId?: string;
|
|
182
|
+
trackingSentry?: string;
|
|
183
|
+
__DEVELOPMENT__?: ApplicationRuntimeEnvironmentForDevelopment;
|
|
184
|
+
};
|
|
145
185
|
export interface ApplicationWindow extends Window {
|
|
146
|
-
app:
|
|
147
|
-
applicationId: string;
|
|
148
|
-
customViewId?: string;
|
|
149
|
-
applicationName: string;
|
|
150
|
-
entryPointUriPath: string;
|
|
151
|
-
revision: string;
|
|
152
|
-
env: string;
|
|
153
|
-
location: string;
|
|
154
|
-
cdnUrl: string;
|
|
155
|
-
mcApiUrl: string;
|
|
156
|
-
frontendHost: string;
|
|
157
|
-
servedByProxy: boolean;
|
|
158
|
-
ldClientSideId?: string;
|
|
159
|
-
trackingSentry?: string;
|
|
160
|
-
__DEVELOPMENT__?: {
|
|
161
|
-
oidc?: ApplicationOidcForDevelopmentConfig;
|
|
162
|
-
menuLinks?: ApplicationMenuLinksForDevelopmentConfig;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
186
|
+
app: ApplicationRuntimeEnvironment;
|
|
165
187
|
}
|
|
188
|
+
export declare const CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = "@@custom-view-host@@";
|
|
166
189
|
export declare const HTTP_SECURITY_HEADERS: {
|
|
167
190
|
readonly 'Strict-Transport-Security': "max-age=31536000; includeSubDomains; preload";
|
|
168
191
|
readonly 'X-XSS-Protection': "1; mode=block";
|
|
169
192
|
readonly 'X-Content-Type-Options': "nosniff";
|
|
170
|
-
readonly 'X-Frame-Options': "
|
|
193
|
+
readonly 'X-Frame-Options': "SAMEORIGIN";
|
|
171
194
|
readonly 'Referrer-Policy': "same-origin";
|
|
172
195
|
};
|
|
173
196
|
export declare const CUSTOM_VIEWS_EVENTS_NAMES: {
|