@commercetools-frontend/application-shell 22.17.2 → 22.19.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-application-shell.cjs.dev.js +4 -3
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +4 -3
- package/dist/commercetools-frontend-application-shell.esm.js +4 -3
- package/dist/{custom-view-dev-host-a4c2526e.cjs.prod.js → custom-view-dev-host-07deb1be.cjs.prod.js} +3 -3
- package/dist/{custom-view-dev-host-5f8c0099.cjs.dev.js → custom-view-dev-host-86bf92ba.cjs.dev.js} +3 -3
- package/dist/{custom-view-dev-host-03a7e8ee.esm.js → custom-view-dev-host-aa75f95a.esm.js} +3 -3
- package/dist/declarations/src/components/custom-view-flop-flip-provider/custom-view-flop-flip-provider.d.ts +10 -0
- package/dist/declarations/src/components/custom-view-flop-flip-provider/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.styles.d.ts +7 -0
- package/dist/declarations/src/components/custom-view-shell-authenticated/custom-view-shell-authenticated.d.ts +2 -0
- package/dist/declarations/src/components/locale-switcher/messages.d.ts +10 -0
- package/dist/declarations/src/components/project-container/index.d.ts +1 -0
- package/dist/declarations/src/components/project-switcher/project-switcher.d.ts +1 -1
- package/dist/declarations/src/types/generated/mc.d.ts +11 -0
- package/dist/{error-apologizer-84dc825c.cjs.prod.js → error-apologizer-3a9b55fd.cjs.dev.js} +6 -1
- package/dist/{error-apologizer-f6793491.cjs.dev.js → error-apologizer-7bc04be1.cjs.prod.js} +6 -1
- package/dist/{error-apologizer-76f087f4.esm.js → error-apologizer-9bed285b.esm.js} +5 -1
- package/dist/{index-3d6cf404.cjs.prod.js → index-e452a65f.cjs.prod.js} +143 -87
- package/dist/{index-5f138907.esm.js → index-fe5ba32e.esm.js} +165 -112
- package/dist/{index-3a78b6af.cjs.dev.js → index-fe871c79.cjs.dev.js} +164 -109
- package/dist/navbar-07b74cf1.esm.js +1294 -0
- package/dist/{navbar-53abe300.cjs.prod.js → navbar-681a53df.cjs.prod.js} +10 -12
- package/dist/navbar-d502141f.cjs.dev.js +1327 -0
- package/dist/{oidc-callback-663e13d0.cjs.prod.js → oidc-callback-6eda6b00.cjs.prod.js} +8 -4
- package/dist/{oidc-callback-137a6058.esm.js → oidc-callback-75ac7f40.esm.js} +9 -6
- package/dist/{oidc-callback-10ec1861.cjs.dev.js → oidc-callback-b7195937.cjs.dev.js} +9 -5
- package/dist/{project-container-c967d69d.cjs.dev.js → project-container-4141613a.cjs.dev.js} +84 -31
- package/dist/{project-container-a7b22509.cjs.prod.js → project-container-554de6c1.cjs.prod.js} +84 -25
- package/dist/{project-container-695b6d00.esm.js → project-container-8cb0493d.esm.js} +84 -34
- package/dist/{project-expired-4a84dc5d.esm.js → project-expired-0424eced.esm.js} +10 -6
- package/dist/{project-expired-fcc5b863.cjs.dev.js → project-expired-48383ec3.cjs.dev.js} +11 -6
- package/dist/{project-expired-198fe545.cjs.prod.js → project-expired-5f2aa2af.cjs.prod.js} +11 -6
- package/dist/{project-not-found-43c7b3d9.esm.js → project-not-found-5b22b7b6.esm.js} +10 -6
- package/dist/{project-not-found-bd1ed00d.cjs.dev.js → project-not-found-5da8e02f.cjs.dev.js} +11 -6
- package/dist/{project-not-found-aee676f3.cjs.prod.js → project-not-found-e58533fe.cjs.prod.js} +11 -6
- package/dist/{project-not-initialized-ed2395cc.cjs.dev.js → project-not-initialized-84e3fb90.cjs.dev.js} +11 -6
- package/dist/{project-not-initialized-855e47a8.cjs.prod.js → project-not-initialized-8bb6ed39.cjs.prod.js} +11 -6
- package/dist/{project-not-initialized-3f005d66.esm.js → project-not-initialized-a94f1b5f.esm.js} +10 -6
- package/dist/{project-suspended-4a17383b.cjs.dev.js → project-suspended-0f034e4b.cjs.dev.js} +11 -6
- package/dist/{project-suspended-030ffee4.esm.js → project-suspended-11c0922f.esm.js} +10 -6
- package/dist/{project-suspended-3ef95f71.cjs.prod.js → project-suspended-97719959.cjs.prod.js} +11 -6
- package/dist/{quick-access-04797c0b.esm.js → quick-access-30f03bb7.esm.js} +4 -3
- package/dist/{quick-access-a40b1e0f.cjs.dev.js → quick-access-38f0f00b.cjs.dev.js} +4 -3
- package/dist/{quick-access-bd6496a4.cjs.prod.js → quick-access-e5dc862b.cjs.prod.js} +4 -3
- package/dist/{redirect-to-logout-86110e8c.cjs.dev.js → redirect-to-logout-41844c82.cjs.dev.js} +4 -3
- package/dist/{redirect-to-logout-9b60153e.esm.js → redirect-to-logout-7c639f12.esm.js} +4 -3
- package/dist/{redirect-to-logout-9b9b32c5.cjs.prod.js → redirect-to-logout-ca90976f.cjs.prod.js} +4 -3
- package/dist/{requests-in-flight-loader-6ab1fa05.cjs.dev.js → requests-in-flight-loader-4ac1d932.cjs.dev.js} +4 -3
- package/dist/{requests-in-flight-loader-f5ea48c9.cjs.prod.js → requests-in-flight-loader-b424edc1.cjs.prod.js} +4 -3
- package/dist/{requests-in-flight-loader-0f883386.esm.js → requests-in-flight-loader-c4a2a25c.esm.js} +4 -3
- package/dist/{service-page-project-switcher-b35c912b.cjs.dev.js → service-page-project-switcher-4ebb1a0d.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-7cddddfb.cjs.prod.js → service-page-project-switcher-88dd5edd.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-1b1fa2df.esm.js → service-page-project-switcher-d96a616b.esm.js} +1 -1
- package/dist/user-settings-menu-204c57e4.esm.js +341 -0
- package/dist/{user-settings-menu-1314b25d.cjs.prod.js → user-settings-menu-daa096fd.cjs.prod.js} +4 -1
- package/dist/user-settings-menu-f6f32579.cjs.dev.js +367 -0
- package/dist/{version-tracker-f54893c4.cjs.dev.js → version-tracker-45fd88f3.cjs.dev.js} +4 -3
- package/dist/{version-tracker-15416b7d.cjs.prod.js → version-tracker-b283cce0.cjs.prod.js} +4 -3
- package/dist/{version-tracker-acf36f46.esm.js → version-tracker-ee73d02f.esm.js} +4 -3
- package/package.json +37 -35
- package/dist/navbar-17317c0f.cjs.dev.js +0 -1334
- package/dist/navbar-2af36692.esm.js +0 -1301
- package/dist/user-settings-menu-60dc5e0a.cjs.dev.js +0 -364
- package/dist/user-settings-menu-dcbb0bd3.esm.js +0 -338
|
@@ -35,13 +35,13 @@ var icons = require('@commercetools-uikit/icons');
|
|
|
35
35
|
var useIsServedByProxy = require('./use-is-served-by-proxy-845cace5.cjs.prod.js');
|
|
36
36
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
37
37
|
var _taggedTemplateLiteral = require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
38
|
-
var
|
|
39
|
-
var _extends = require('@babel/runtime-corejs3/helpers/extends');
|
|
38
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
40
39
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
41
40
|
var memoize = require('memoize-one');
|
|
42
41
|
var reactSelect = require('react-select');
|
|
43
42
|
var AccessibleHidden = require('@commercetools-uikit/accessible-hidden');
|
|
44
43
|
var SelectInput = require('@commercetools-uikit/select-input');
|
|
44
|
+
var Text = require('@commercetools-uikit/text');
|
|
45
45
|
var CTLogoSVG = require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
46
46
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
47
47
|
var history = require('@commercetools-frontend/browser-history');
|
|
@@ -69,6 +69,7 @@ var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable
|
|
|
69
69
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
70
70
|
var ssr = require('@commercetools-frontend/application-config/ssr');
|
|
71
71
|
var permissions = require('@commercetools-frontend/permissions');
|
|
72
|
+
var memoryAdapter = require('@flopflip/memory-adapter');
|
|
72
73
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
73
74
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
74
75
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
@@ -95,6 +96,7 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
95
96
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
96
97
|
var AccessibleHidden__default = /*#__PURE__*/_interopDefault(AccessibleHidden);
|
|
97
98
|
var SelectInput__default = /*#__PURE__*/_interopDefault(SelectInput);
|
|
99
|
+
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
98
100
|
var CTLogoSVG__default = /*#__PURE__*/_interopDefault(CTLogoSVG);
|
|
99
101
|
var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
|
|
100
102
|
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
@@ -108,13 +110,14 @@ var ldAdapter__default = /*#__PURE__*/_interopDefault(ldAdapter);
|
|
|
108
110
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
109
111
|
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
110
112
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
113
|
+
var memoryAdapter__default = /*#__PURE__*/_interopDefault(memoryAdapter);
|
|
111
114
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
112
115
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
113
116
|
|
|
114
117
|
// NOTE: This string will be replaced on build time with the package version.
|
|
115
|
-
var applicationShellVersion = "22.
|
|
118
|
+
var applicationShellVersion = "22.19.0";
|
|
116
119
|
|
|
117
|
-
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-
|
|
120
|
+
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-b424edc1.cjs.prod.js' /* webpackChunkName: "requests-in-flight-loader" */); }));
|
|
118
121
|
|
|
119
122
|
// Attempt to load the `projectKey` from localStorage
|
|
120
123
|
function selectProjectKeyFromLocalStorage() {
|
|
@@ -225,7 +228,7 @@ var messages = reactIntl.defineMessages({
|
|
|
225
228
|
projectsLabel: {
|
|
226
229
|
id: 'ProjectSwitcher.projectsLabel',
|
|
227
230
|
description: 'The label for project dropdown switcher',
|
|
228
|
-
defaultMessage: 'Projects
|
|
231
|
+
defaultMessage: 'Projects'
|
|
229
232
|
},
|
|
230
233
|
searchPlaceholder: {
|
|
231
234
|
id: 'ProjectSwitcher.searchPlaceholder',
|
|
@@ -249,72 +252,73 @@ var messages = reactIntl.defineMessages({
|
|
|
249
252
|
}
|
|
250
253
|
});
|
|
251
254
|
|
|
255
|
+
const _excluded = ["children"];
|
|
252
256
|
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
253
257
|
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
254
258
|
var ProjectsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchUserProjects" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "user" }, name: { kind: "Name", value: "me" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "projects" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "isProductionProject" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 258, source: { body: "query FetchUserProjects {\n user: me {\n id\n projects {\n total\n results {\n name\n key\n suspension {\n isActive\n }\n expiry {\n isActive\n }\n isProductionProject\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
255
259
|
const PROJECT_SWITCHER_LABEL_ID = 'project-switcher-label';
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
css: _ref3$1,
|
|
266
|
-
children: jsxRuntime.jsx(SelectInput__default["default"].ValueContainer, _objectSpread$9(_objectSpread$9({}, restProps), {}, {
|
|
267
|
-
children: restProps.children
|
|
268
|
-
}))
|
|
269
|
-
})
|
|
260
|
+
const ValueContainer = _ref2 => {
|
|
261
|
+
let children = _ref2.children,
|
|
262
|
+
restProps = _objectWithoutProperties(_ref2, _excluded);
|
|
263
|
+
return jsxRuntime.jsx(Text__default["default"].Body, {
|
|
264
|
+
fontWeight: "medium",
|
|
265
|
+
as: "span",
|
|
266
|
+
children: jsxRuntime.jsx(SelectInput__default["default"].ValueContainer, _objectSpread$9(_objectSpread$9({}, restProps), {}, {
|
|
267
|
+
children: children
|
|
268
|
+
}))
|
|
270
269
|
});
|
|
271
270
|
};
|
|
271
|
+
const ProjectStampsList = props => jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
272
|
+
scale: "xs",
|
|
273
|
+
alignItems: "flex-end",
|
|
274
|
+
children: [props.isProductionProject && jsxRuntime.jsx(applicationComponents.ProjectStamp.IsProduction, {}), props.suspension && props.suspension.isActive && jsxRuntime.jsx(applicationComponents.ProjectStamp.IsSuspended, {}), props.expiry && props.expiry.isActive && jsxRuntime.jsx(applicationComponents.ProjectStamp.IsExpired, {}), props.expiry && Boolean(props.expiry.daysLeft) && jsxRuntime.jsx(applicationComponents.ProjectStamp.WillExpire, {
|
|
275
|
+
daysLeft: props.expiry.daysLeft
|
|
276
|
+
})]
|
|
277
|
+
});
|
|
272
278
|
var _ref$2 = {
|
|
273
|
-
name: "
|
|
274
|
-
styles: "
|
|
275
|
-
} ;
|
|
276
|
-
var _ref2$2 = {
|
|
277
|
-
name: "10s3lzp",
|
|
278
|
-
styles: "word-wrap:break-word"
|
|
279
|
+
name: "uyj17t",
|
|
280
|
+
styles: "flex:1;word-wrap:break-word"
|
|
279
281
|
} ;
|
|
280
282
|
const ProjectSwitcherOption = props => {
|
|
281
283
|
const project = props.data;
|
|
282
284
|
return jsxRuntime.jsx(SelectInput__default["default"].Option, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
283
|
-
children: jsxRuntime.jsxs("
|
|
284
|
-
|
|
285
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
286
|
+
scale: "xs",
|
|
287
|
+
justifyContent: "space-between",
|
|
285
288
|
children: [jsxRuntime.jsxs("div", {
|
|
286
|
-
css:
|
|
287
|
-
children: [
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
css: _ref$2,
|
|
290
|
+
children: [jsxRuntime.jsx(Text__default["default"].Body, {
|
|
291
|
+
fontWeight: "medium",
|
|
292
|
+
tone: props.isDisabled ? 'tertiary' : 'inherit',
|
|
293
|
+
children: project.name
|
|
294
|
+
}), jsxRuntime.jsx(Text__default["default"].Caption, {
|
|
295
|
+
tone: props.isDisabled ? 'tertiary' : 'secondary',
|
|
296
|
+
children: project.key
|
|
292
297
|
})]
|
|
293
|
-
}), jsxRuntime.jsx(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
css: /*#__PURE__*/react$1.css("font-size:11px;color:", designSystem.designTokens.colorError, ";" + ("" ), "" ),
|
|
298
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.suspended))
|
|
299
|
-
}), project.expiry && project.expiry.isActive && jsxRuntime.jsx("div", {
|
|
300
|
-
css: /*#__PURE__*/react$1.css("font-size:11px;color:", designSystem.designTokens.colorError, ";" + ("" ), "" ),
|
|
301
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.expired))
|
|
298
|
+
}), jsxRuntime.jsx(ProjectStampsList, {
|
|
299
|
+
isProductionProject: project.isProductionProject,
|
|
300
|
+
suspension: project.suspension,
|
|
301
|
+
expiry: project.expiry
|
|
302
302
|
})]
|
|
303
303
|
})
|
|
304
304
|
}));
|
|
305
305
|
};
|
|
306
|
-
const mapProjectsToOptions = memoize__default["default"](projects =>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
306
|
+
const mapProjectsToOptions = memoize__default["default"](projects => {
|
|
307
|
+
return [{
|
|
308
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.projectsLabel)),
|
|
309
|
+
options: _mapInstanceProperty__default["default"](projects).call(projects, project => ({
|
|
310
|
+
key: project.key,
|
|
311
|
+
name: project.name,
|
|
312
|
+
label: project.name,
|
|
313
|
+
value: project.key,
|
|
314
|
+
suspension: project.suspension,
|
|
315
|
+
expiry: project.expiry,
|
|
316
|
+
isProductionProject: project.isProductionProject
|
|
317
|
+
}))
|
|
318
|
+
}];
|
|
319
|
+
});
|
|
315
320
|
const CustomMenuList = props => {
|
|
316
321
|
return jsxRuntime.jsx("div", {
|
|
317
|
-
css: /*#__PURE__*/react$1.css("width:max-content;max-width:", designSystem.designTokens.constraint6, ";" + ("" ), "" ),
|
|
318
322
|
children: jsxRuntime.jsx(reactSelect.components.MenuList, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
319
323
|
children: props.children
|
|
320
324
|
}))
|
|
@@ -360,7 +364,7 @@ const ProjectSwitcher = props => {
|
|
|
360
364
|
redirectTo("/".concat(selectedProjectKey));
|
|
361
365
|
}
|
|
362
366
|
},
|
|
363
|
-
options: data && data.user && mapProjectsToOptions(data.user.projects.results),
|
|
367
|
+
options: data && data.user && mapProjectsToOptions(data.user.projects.results) || [],
|
|
364
368
|
isOptionDisabled: option => {
|
|
365
369
|
const project = option;
|
|
366
370
|
return project.suspension.isActive || project.expiry.isActive;
|
|
@@ -377,7 +381,9 @@ const ProjectSwitcher = props => {
|
|
|
377
381
|
noOptionsMessage: () => intl.formatMessage(messages.noResults),
|
|
378
382
|
horizontalConstraint: 'auto',
|
|
379
383
|
appearance: "quiet",
|
|
380
|
-
maxMenuHeight:
|
|
384
|
+
maxMenuHeight: 380,
|
|
385
|
+
maxMenuWidth: 8,
|
|
386
|
+
minMenuWidth: 8
|
|
381
387
|
})]
|
|
382
388
|
});
|
|
383
389
|
};
|
|
@@ -386,7 +392,7 @@ ProjectSwitcher.displayName = 'ProjectSwitcher';
|
|
|
386
392
|
// eslint-disable-next-line import/prefer-default-export
|
|
387
393
|
const REQUESTS_IN_FLIGHT_LOADER_DOM_ID = 'loader-for-requests-in-flight';
|
|
388
394
|
|
|
389
|
-
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-
|
|
395
|
+
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-daa096fd.cjs.prod.js' /* webpackChunkName: "user-settings-menu" */); }));
|
|
390
396
|
|
|
391
397
|
var _ref$1 = {
|
|
392
398
|
name: "zjik7",
|
|
@@ -396,6 +402,10 @@ var _ref2$1 = {
|
|
|
396
402
|
name: "36bnqj",
|
|
397
403
|
styles: "display:flex;flex:1"
|
|
398
404
|
} ;
|
|
405
|
+
var _ref3$1 = {
|
|
406
|
+
name: "w3f7al",
|
|
407
|
+
styles: "height:22px"
|
|
408
|
+
} ;
|
|
399
409
|
const AppBar = props => {
|
|
400
410
|
var _props$user$defaultPr, _props$user;
|
|
401
411
|
const previousProjectKey = getPreviousProjectKey((_props$user$defaultPr = (_props$user = props.user) === null || _props$user === void 0 ? void 0 : _props$user.defaultProjectKey) !== null && _props$user$defaultPr !== void 0 ? _props$user$defaultPr : undefined);
|
|
@@ -407,9 +417,8 @@ const AppBar = props => {
|
|
|
407
417
|
children: jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
408
418
|
scale: "m",
|
|
409
419
|
alignItems: "center",
|
|
410
|
-
children: [jsxRuntime.jsxs(
|
|
411
|
-
|
|
412
|
-
alignItems: "center",
|
|
420
|
+
children: [jsxRuntime.jsxs("div", {
|
|
421
|
+
css: /*#__PURE__*/react$1.css("display:flex;gap:", designSystem.designTokens.spacing30, ";align-items:center;" + ("" ), "" ),
|
|
413
422
|
children: [(() => {
|
|
414
423
|
if (!props.user) {
|
|
415
424
|
return jsxRuntime.jsx(LoadingPlaceholder, {
|
|
@@ -419,15 +428,25 @@ const AppBar = props => {
|
|
|
419
428
|
}
|
|
420
429
|
// The `<ProjectSwitcher>` should be rendered only if the
|
|
421
430
|
// user is fetched and the user has projects while the app runs in an project context.
|
|
422
|
-
if (props.user.projects.total > 0 && props.projectKeyFromUrl)
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
+
if (props.user.projects.total > 0 && props.projectKeyFromUrl) {
|
|
432
|
+
var _context;
|
|
433
|
+
const selectedProject = _findInstanceProperty__default["default"](_context = props.user.projects.results).call(_context, project => project.key === props.projectKeyFromUrl);
|
|
434
|
+
return jsxRuntime.jsxs("div", {
|
|
435
|
+
css: /*#__PURE__*/react$1.css("display:flex;gap:", designSystem.designTokens.spacing20, ";align-items:center;" + ("" ), "" ),
|
|
436
|
+
children: [(selectedProject === null || selectedProject === void 0 ? void 0 : selectedProject.isProductionProject) && jsxRuntime.jsx("div", {
|
|
437
|
+
css: _ref3$1,
|
|
438
|
+
children: jsxRuntime.jsx(applicationComponents.ProjectStamp.IsProduction, {})
|
|
439
|
+
}), jsxRuntime.jsx(ProjectSwitcher
|
|
440
|
+
// In this case it's not necessary to check if the `projectKey` param
|
|
441
|
+
// is included in the list of projects. In such case
|
|
442
|
+
// the dropdown will still be rendered but no project will be selected.
|
|
443
|
+
// This is fine becase the user has still the possibility to "switch"
|
|
444
|
+
// to a project.
|
|
445
|
+
, {
|
|
446
|
+
projectKey: props.projectKeyFromUrl || previousProjectKey
|
|
447
|
+
})]
|
|
448
|
+
});
|
|
449
|
+
}
|
|
431
450
|
if (!props.user.defaultProjectKey) return null;
|
|
432
451
|
return jsxRuntime.jsx(BackToProject, {
|
|
433
452
|
projectKey: previousProjectKey
|
|
@@ -510,7 +529,7 @@ const ConfigureIntlProvider = props => {
|
|
|
510
529
|
ConfigureIntlProvider.propTypes = {};
|
|
511
530
|
ConfigureIntlProvider.displayName = 'ConfigureIntlProvider';
|
|
512
531
|
|
|
513
|
-
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-
|
|
532
|
+
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-7bc04be1.cjs.prod.js' /* webpackChunkName: "error-apologizer" */); }));
|
|
514
533
|
|
|
515
534
|
var ProjectQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "projectKey" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "project" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "key" }, value: { kind: "Variable", name: { kind: "Name", value: "projectKey" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currencies" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "initialized" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "daysLeft" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "isProductionProject" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "allPermissionsForAllApplications" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedMenuVisibilities" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "owner" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "sampleDataImportDataset" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1049, source: { body: "query FetchProject($projectKey: String) {\n project(key: $projectKey) {\n key\n version\n name\n countries\n currencies\n languages\n initialized\n expiry {\n isActive\n daysLeft\n }\n suspension {\n isActive\n reason\n }\n isProductionProject\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n allPermissionsForAllApplications {\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedMenuVisibilities {\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n }\n owner {\n id\n name\n }\n sampleDataImportDataset\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
516
535
|
const FetchProject = props => {
|
|
@@ -542,7 +561,7 @@ FetchProject.propTypes = {
|
|
|
542
561
|
};
|
|
543
562
|
FetchProject.displayName = 'FetchProject';
|
|
544
563
|
|
|
545
|
-
var LoggedInUserQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchLoggedInUser" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "user" }, name: { kind: "Name", value: "me" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gravatarHash" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "language" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "numberFormat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timeZone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingGroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingSubgroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTeam" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTenant" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingCloudEnvironment" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultProjectKey" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "businessRole" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "projects" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "idTokenUserInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "iss" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "sub" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "aud" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "exp" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "iat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "additionalClaims" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
564
|
+
var LoggedInUserQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchLoggedInUser" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "user" }, name: { kind: "Name", value: "me" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gravatarHash" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "language" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "numberFormat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timeZone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingGroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingSubgroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTeam" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTenant" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingCloudEnvironment" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultProjectKey" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "businessRole" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "projects" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "isProductionProject" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "idTokenUserInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "iss" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "sub" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "aud" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "exp" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "iat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "additionalClaims" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 723, source: { body: "query FetchLoggedInUser {\n user: me {\n id\n email\n createdAt\n gravatarHash\n firstName\n lastName\n language\n numberFormat\n timeZone\n launchdarklyTrackingId\n launchdarklyTrackingGroup\n launchdarklyTrackingSubgroup\n launchdarklyTrackingTeam\n launchdarklyTrackingTenant\n launchdarklyTrackingCloudEnvironment\n defaultProjectKey\n businessRole\n projects {\n total\n results {\n name\n key\n suspension {\n isActive\n }\n expiry {\n isActive\n }\n isProductionProject\n }\n }\n idTokenUserInfo {\n iss\n sub\n aud\n exp\n iat\n email\n name\n additionalClaims\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
546
565
|
const FetchUser = props => {
|
|
547
566
|
const _useMcQuery = applicationShellConnectors.useMcQuery(LoggedInUserQuery, {
|
|
548
567
|
onError: sentry.reportErrorToSentry,
|
|
@@ -566,9 +585,9 @@ FetchUser.propTypes = {
|
|
|
566
585
|
};
|
|
567
586
|
FetchUser.displayName = 'FetchUser';
|
|
568
587
|
|
|
569
|
-
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-
|
|
588
|
+
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-681a53df.cjs.prod.js' /* webpackChunkName: "navbar" */); }));
|
|
570
589
|
|
|
571
|
-
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-
|
|
590
|
+
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-554de6c1.cjs.prod.js' /* webpackChunkName: "project-container" */); }));
|
|
572
591
|
|
|
573
592
|
const getSelectedDataLocaleForProject = projectLocales => {
|
|
574
593
|
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
@@ -680,7 +699,7 @@ var pimIndexerStates = {
|
|
|
680
699
|
NOT_INDEXED: 'NOT_INDEXED'
|
|
681
700
|
};
|
|
682
701
|
|
|
683
|
-
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-
|
|
702
|
+
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-e5dc862b.cjs.prod.js' /* webpackChunkName: "quick-access" */); }));
|
|
684
703
|
|
|
685
704
|
const QuickAccessTrigger = props => {
|
|
686
705
|
const _useState = react.useState(false),
|
|
@@ -767,7 +786,7 @@ const QuickAccessTrigger = props => {
|
|
|
767
786
|
QuickAccessTrigger.propTypes = {};
|
|
768
787
|
QuickAccessTrigger.displayName = 'QuickAccessTrigger';
|
|
769
788
|
|
|
770
|
-
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-
|
|
789
|
+
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-ca90976f.cjs.prod.js' /* webpackChunkName: "redirect-to-logout" */); }));
|
|
771
790
|
|
|
772
791
|
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-c962f72f.cjs.prod.js' /* webpackChunkName: "redirect-to-project-create" */); }));
|
|
773
792
|
|
|
@@ -886,15 +905,17 @@ SetupFlopFlipProvider.propTypes = {};
|
|
|
886
905
|
SetupFlopFlipProvider.displayName = 'SetupFlopFlipProvider';
|
|
887
906
|
|
|
888
907
|
const ThemeSwitcher = () => {
|
|
908
|
+
const isRecolouringThemeEnabled = reactBroadcast.useFeatureToggle(constants.featureFlags.RECOLOURING);
|
|
909
|
+
const theme = isRecolouringThemeEnabled ? 'recolouring' : 'default';
|
|
889
910
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
890
911
|
children: jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
891
|
-
theme:
|
|
892
|
-
themeOverrides: applicationComponents.themesOverrides
|
|
912
|
+
theme: theme,
|
|
913
|
+
themeOverrides: applicationComponents.themesOverrides[theme]
|
|
893
914
|
})
|
|
894
915
|
});
|
|
895
916
|
};
|
|
896
917
|
|
|
897
|
-
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-
|
|
918
|
+
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-b283cce0.cjs.prod.js' /* webpackChunkName: "version-tracker" */); }));
|
|
898
919
|
|
|
899
920
|
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
900
921
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1372,7 +1393,7 @@ const hasCachedAuthenticationState = () => {
|
|
|
1372
1393
|
return window.localStorage.getItem(constants.STORAGE_KEYS.IS_AUTHENTICATED) === 'true';
|
|
1373
1394
|
};
|
|
1374
1395
|
|
|
1375
|
-
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-
|
|
1396
|
+
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-6eda6b00.cjs.prod.js' /* webpackChunkName: "oidc-callback" */); }));
|
|
1376
1397
|
|
|
1377
1398
|
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1378
1399
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1588,7 +1609,26 @@ ApplicationShell.propTypes = {};
|
|
|
1588
1609
|
ApplicationShell.displayName = 'ApplicationShell';
|
|
1589
1610
|
ApplicationShell.version = applicationShellVersion;
|
|
1590
1611
|
|
|
1591
|
-
const CustomViewDevHost = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./custom-view-dev-host-
|
|
1612
|
+
const CustomViewDevHost = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./custom-view-dev-host-07deb1be.cjs.prod.js' /* webpackChunkName: "custom-view-dev-host" */); }));
|
|
1613
|
+
|
|
1614
|
+
function CustomViewFlopFlipProvider(props) {
|
|
1615
|
+
var _props$user2;
|
|
1616
|
+
const adapterArgs = react.useMemo(() => {
|
|
1617
|
+
var _props$user;
|
|
1618
|
+
return {
|
|
1619
|
+
user: {
|
|
1620
|
+
key: (_props$user = props.user) === null || _props$user === void 0 ? void 0 : _props$user.id
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
}, [(_props$user2 = props.user) === null || _props$user2 === void 0 ? void 0 : _props$user2.id]);
|
|
1624
|
+
return jsxRuntime.jsx(reactBroadcast.ConfigureFlopFlip, {
|
|
1625
|
+
adapter: memoryAdapter__default["default"],
|
|
1626
|
+
defaultFlags: _flagsInstanceProperty__default["default"](props),
|
|
1627
|
+
adapterArgs: adapterArgs,
|
|
1628
|
+
children: props.children
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
CustomViewFlopFlipProvider.propTypes = {};
|
|
1592
1632
|
|
|
1593
1633
|
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1594
1634
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1651,8 +1691,12 @@ function CustomViewShellAuthenticated(props) {
|
|
|
1651
1691
|
project: project,
|
|
1652
1692
|
projectDataLocale: props.dataLocale,
|
|
1653
1693
|
environment: props.environment,
|
|
1654
|
-
children: jsxRuntime.jsx(
|
|
1655
|
-
|
|
1694
|
+
children: jsxRuntime.jsx(CustomViewFlopFlipProvider, {
|
|
1695
|
+
flags: _flagsInstanceProperty__default["default"](props),
|
|
1696
|
+
user: user,
|
|
1697
|
+
children: jsxRuntime.jsx(CustomViewWithPermissionCheck, {
|
|
1698
|
+
children: props.children
|
|
1699
|
+
})
|
|
1656
1700
|
})
|
|
1657
1701
|
});
|
|
1658
1702
|
}
|
|
@@ -1682,6 +1726,13 @@ const customViewsThemesOverrides = {
|
|
|
1682
1726
|
paddingForDetailPageHeader: "0 0 ".concat(designSystem.designTokens.spacing40, " 0"),
|
|
1683
1727
|
paddingForMainPageHeader: '0',
|
|
1684
1728
|
paddingForTabularPageHeader: '0'
|
|
1729
|
+
},
|
|
1730
|
+
recolouring: {
|
|
1731
|
+
marginForCustomViewsSelectorAsTabular: '0',
|
|
1732
|
+
marginForPageContent: "".concat(designSystem.designTokens.spacing50, " 0"),
|
|
1733
|
+
paddingForDetailPageHeader: "0 0 ".concat(designSystem.designTokens.spacing40, " 0"),
|
|
1734
|
+
paddingForMainPageHeader: '0',
|
|
1735
|
+
paddingForTabularPageHeader: '0'
|
|
1685
1736
|
}
|
|
1686
1737
|
};
|
|
1687
1738
|
|
|
@@ -1728,15 +1779,22 @@ function StrictModeEnablement(props) {
|
|
|
1728
1779
|
});
|
|
1729
1780
|
}
|
|
1730
1781
|
}
|
|
1782
|
+
StrictModeEnablement.propTypes = {};
|
|
1783
|
+
function CustomViewThemeProvider() {
|
|
1784
|
+
const theme = reactBroadcast.useFeatureToggle('mcRecolouring') ? 'recolouring' : 'default';
|
|
1785
|
+
const customViewThemeOverrides = _objectSpread$1(_objectSpread$1({}, applicationComponents.themesOverrides[theme]), customViewsThemesOverrides[theme]);
|
|
1786
|
+
return jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1787
|
+
theme: theme,
|
|
1788
|
+
themeOverrides: customViewThemeOverrides
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1731
1791
|
|
|
1732
1792
|
/*
|
|
1733
1793
|
During e2e tests, the Custom View template is built in production mode but still runs on localhost.
|
|
1734
1794
|
Checking for local production mode is necessary for applying the development host URL,
|
|
1735
1795
|
creating an environment for testing interaction with the Custom View template.
|
|
1736
1796
|
*/
|
|
1737
|
-
StrictModeEnablement.propTypes = {};
|
|
1738
1797
|
const isLocalProdMode = window.app.env === 'development';
|
|
1739
|
-
const customViewThemeOverrides = _objectSpread$1(_objectSpread$1({}, applicationComponents.themesOverrides.default), customViewsThemesOverrides.default);
|
|
1740
1798
|
function CustomViewShell(props) {
|
|
1741
1799
|
var _window$app$__DEVELOP;
|
|
1742
1800
|
const _useState = react.useState(),
|
|
@@ -1805,10 +1863,7 @@ function CustomViewShell(props) {
|
|
|
1805
1863
|
}
|
|
1806
1864
|
const hostUrl = isLocalProdMode ? (_window$app$__DEVELOP = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP === void 0 ? void 0 : _window$app$__DEVELOP.customViewHostUrl : hostContext.hostUrl;
|
|
1807
1865
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1808
|
-
children: [jsxRuntime.jsx(GlobalStyles, {}), jsxRuntime.jsx(
|
|
1809
|
-
theme: "default",
|
|
1810
|
-
themeOverrides: customViewThemeOverrides
|
|
1811
|
-
}), jsxRuntime.jsx(ApplicationShellProvider, {
|
|
1866
|
+
children: [jsxRuntime.jsx(GlobalStyles, {}), jsxRuntime.jsx(ApplicationShellProvider, {
|
|
1812
1867
|
environment: window.app,
|
|
1813
1868
|
applicationMessages: props.applicationMessages,
|
|
1814
1869
|
apolloClient: props.apolloClient,
|
|
@@ -1824,8 +1879,9 @@ function CustomViewShell(props) {
|
|
|
1824
1879
|
environment: window.app,
|
|
1825
1880
|
messages: props.applicationMessages,
|
|
1826
1881
|
projectKey: hostContext.projectKey,
|
|
1882
|
+
flags: hostContext.featureFlags,
|
|
1827
1883
|
customViewConfig: hostContext.customViewConfig,
|
|
1828
|
-
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1884
|
+
children: [jsxRuntime.jsx(CustomViewThemeProvider, {}), jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1829
1885
|
// @ts-ignore
|
|
1830
1886
|
, {
|
|
1831
1887
|
ref: layoutRefs
|