@commercetools-frontend/application-shell 22.5.0 → 22.7.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-c3884344.esm.js → application-entry-point-4b2f37d2.esm.js} +1 -1
- package/dist/{application-entry-point-b9ed252b.cjs.dev.js → application-entry-point-78dcfccf.cjs.dev.js} +1 -1
- package/dist/{application-entry-point-98c4a247.cjs.prod.js → application-entry-point-9eaf625b.cjs.prod.js} +1 -1
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +8 -11
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +8 -11
- package/dist/commercetools-frontend-application-shell.esm.js +5 -11
- package/dist/{configure-apollo-235efa51.cjs.prod.js → configure-apollo-651219fe.cjs.prod.js} +12 -3
- package/dist/{configure-apollo-5baefe27.esm.js → configure-apollo-7d1735c1.esm.js} +12 -3
- package/dist/{configure-apollo-4187db53.cjs.dev.js → configure-apollo-fd556518.cjs.dev.js} +12 -3
- package/dist/{constants-55f41c8c.esm.js → constants-a09fbec1.esm.js} +1 -0
- package/dist/{constants-4408614d.cjs.prod.js → constants-a1140922.cjs.dev.js} +1 -0
- package/dist/{constants-5c1ecb73.cjs.dev.js → constants-ed10e935.cjs.prod.js} +1 -0
- package/dist/declarations/src/components/application-shell-authenticated/application-shell-authenticated.d.ts +4 -1
- package/dist/declarations/src/components/application-shell-authenticated/new-main-navigation-flag-wrapper.d.ts +9 -0
- package/dist/declarations/src/components/application-shell-provider/utils.d.ts +1 -1
- package/dist/declarations/src/components/custom-view-context/custom-view-context.d.ts +12 -0
- package/dist/declarations/src/components/custom-view-context/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.d.ts +9 -0
- package/dist/declarations/src/components/custom-view-shell/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-shell-authenticated/custom-view-shell-authenticated.d.ts +12 -0
- package/dist/declarations/src/components/custom-view-shell-authenticated/index.d.ts +1 -0
- package/dist/declarations/src/components/navbar/compiled/navbar.css.json.d.ts +1 -1
- package/dist/declarations/src/components/navbar/index.d.ts +6 -2
- package/dist/declarations/src/components/navbar/menu-items.d.ts +4 -4
- package/dist/declarations/src/components/navbar/navbar-skeleton.d.ts +6 -0
- package/dist/declarations/src/components/navbar/navbar-skeleton.styles.d.ts +43 -0
- package/dist/declarations/src/components/navbar/navbar.d.ts +5 -2
- package/dist/declarations/src/components/project-container/index.d.ts +1 -0
- package/dist/declarations/src/constants.d.ts +1 -0
- package/dist/declarations/src/feature-toggles.d.ts +4 -1
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/types/generated/ctp.d.ts +124 -51
- package/dist/declarations/src/types/generated/mc.d.ts +0 -83
- package/dist/declarations/src/types/generated/settings.d.ts +106 -0
- package/dist/{index-53b461f0.cjs.prod.js → index-62467df5.cjs.prod.js} +444 -647
- package/dist/index-763cd304.esm.js +2032 -0
- package/dist/index-b4696e0a.cjs.dev.js +2099 -0
- package/dist/navbar-21b59702.cjs.prod.js +1144 -0
- package/dist/navbar-a44260f4.esm.js +1209 -0
- package/dist/navbar-f1d631ef.cjs.dev.js +1239 -0
- package/dist/{oidc-3376ec84.cjs.dev.js → oidc-244125d3.cjs.dev.js} +1 -1
- package/dist/{oidc-3a2cf8b3.cjs.prod.js → oidc-a780f067.cjs.prod.js} +1 -1
- package/dist/{oidc-38887b2d.esm.js → oidc-c4e99cfc.esm.js} +1 -1
- package/dist/{oidc-callback-f46de3c1.cjs.dev.js → oidc-callback-842c6103.cjs.dev.js} +6 -12
- package/dist/{oidc-callback-d31b1579.cjs.prod.js → oidc-callback-a6503499.cjs.prod.js} +6 -12
- package/dist/{oidc-callback-d408517e.esm.js → oidc-callback-ff7160f9.esm.js} +6 -12
- package/dist/{project-container-a905608b.esm.js → project-container-c34b3563.esm.js} +11 -15
- package/dist/{project-container-5c3c1313.cjs.prod.js → project-container-e2770668.cjs.prod.js} +11 -15
- package/dist/{project-container-b35d260e.cjs.dev.js → project-container-fcbf04f4.cjs.dev.js} +11 -15
- package/dist/{project-expired-2569ae58.esm.js → project-expired-1e0021f1.esm.js} +7 -13
- package/dist/{project-expired-1a5269ad.cjs.prod.js → project-expired-2b816199.cjs.prod.js} +7 -13
- package/dist/{project-expired-b956df4c.cjs.dev.js → project-expired-75edfdaa.cjs.dev.js} +7 -13
- package/dist/{project-not-found-60750783.esm.js → project-not-found-4d882010.esm.js} +7 -13
- package/dist/{project-not-found-0bc6b9f7.cjs.dev.js → project-not-found-77cc9900.cjs.dev.js} +7 -13
- package/dist/{project-not-found-cf2cc554.cjs.prod.js → project-not-found-8cdc8967.cjs.prod.js} +7 -13
- package/dist/{project-not-initialized-75f5537a.cjs.prod.js → project-not-initialized-1e158ec7.cjs.prod.js} +7 -13
- package/dist/{project-not-initialized-191aa18a.cjs.dev.js → project-not-initialized-29cabc17.cjs.dev.js} +7 -13
- package/dist/{project-not-initialized-f2578daa.esm.js → project-not-initialized-98825943.esm.js} +7 -13
- package/dist/{project-suspended-4c195259.cjs.prod.js → project-suspended-8c1f499c.cjs.prod.js} +7 -13
- package/dist/{project-suspended-873c47c2.esm.js → project-suspended-ed2b1227.esm.js} +7 -13
- package/dist/{project-suspended-f66a1459.cjs.dev.js → project-suspended-fc98b3d1.cjs.dev.js} +7 -13
- package/dist/{quick-access-34af5278.esm.js → quick-access-158b499a.esm.js} +5 -10
- package/dist/{quick-access-567cd0e8.cjs.prod.js → quick-access-c6e99d06.cjs.prod.js} +5 -10
- package/dist/{quick-access-923ce592.cjs.dev.js → quick-access-cfeb6cec.cjs.dev.js} +5 -10
- package/dist/{redirect-to-login-07eb52a4.esm.js → redirect-to-login-6906966c.esm.js} +3 -3
- package/dist/{redirect-to-login-7d02dc5b.cjs.dev.js → redirect-to-login-88714a9b.cjs.dev.js} +3 -3
- package/dist/{redirect-to-login-5710f920.cjs.prod.js → redirect-to-login-d133b84f.cjs.prod.js} +3 -3
- package/dist/{redirect-to-logout-bebe4068.esm.js → redirect-to-logout-27a66cc7.esm.js} +6 -12
- package/dist/{redirect-to-logout-e3b14844.cjs.dev.js → redirect-to-logout-4f3f82f1.cjs.dev.js} +6 -12
- package/dist/{redirect-to-logout-cc82cee3.cjs.prod.js → redirect-to-logout-55feba64.cjs.prod.js} +6 -12
- package/dist/{requests-in-flight-loader-4d55dd23.cjs.prod.js → requests-in-flight-loader-219f802b.cjs.prod.js} +6 -12
- package/dist/{requests-in-flight-loader-f87c011b.esm.js → requests-in-flight-loader-7dbb4644.esm.js} +6 -12
- package/dist/{requests-in-flight-loader-81315c1b.cjs.dev.js → requests-in-flight-loader-929aec28.cjs.dev.js} +6 -12
- package/dist/{service-page-project-switcher-1f88b9ef.cjs.dev.js → service-page-project-switcher-6fe90ebf.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-c0df9b6e.esm.js → service-page-project-switcher-b118a954.esm.js} +1 -1
- package/dist/{service-page-project-switcher-e1562491.cjs.prod.js → service-page-project-switcher-fe34254d.cjs.prod.js} +1 -1
- package/dist/{use-applications-menu-862cdf4b.cjs.prod.js → use-applications-menu-37b8d2c6.cjs.dev.js} +9 -8
- package/dist/{use-applications-menu-8857654a.cjs.dev.js → use-applications-menu-bf23bd5d.cjs.prod.js} +9 -8
- package/dist/{use-applications-menu-435f0838.esm.js → use-applications-menu-fabb6a77.esm.js} +9 -8
- package/dist/{user-settings-menu-ff17aa78.esm.js → user-settings-menu-e4439479.esm.js} +7 -13
- package/dist/{user-settings-menu-7aec4a5a.cjs.dev.js → user-settings-menu-ef7fee49.cjs.dev.js} +7 -13
- package/dist/{user-settings-menu-d5d5dba3.cjs.prod.js → user-settings-menu-fa056e1c.cjs.prod.js} +7 -13
- package/dist/{version-tracker-9ca66a1c.esm.js → version-tracker-cc9a8d4c.esm.js} +2 -2
- package/dist/{version-tracker-b4681839.cjs.prod.js → version-tracker-e1338396.cjs.prod.js} +2 -2
- package/dist/{version-tracker-7df81f43.cjs.dev.js → version-tracker-f72dd9c8.cjs.dev.js} +2 -2
- package/package.json +33 -33
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +2 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +3 -3
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +3 -3
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +3 -3
- package/dist/index-31dd568f.cjs.dev.js +0 -2352
- package/dist/index-937934ba.esm.js +0 -2273
- package/dist/navbar-766fb0fd.cjs.prod.js +0 -588
- package/dist/navbar-80df957b.cjs.dev.js +0 -609
- package/dist/navbar-a5c6bfcb.esm.js +0 -589
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configureApollo = require('./configure-apollo-
|
|
3
|
+
var configureApollo = require('./configure-apollo-651219fe.cjs.prod.js');
|
|
4
4
|
var _pt = require('prop-types');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var reactRouterDom = require('react-router-dom');
|
|
@@ -24,7 +24,7 @@ var constants$1 = require('@commercetools-frontend/constants');
|
|
|
24
24
|
var i18n = require('@commercetools-frontend/i18n');
|
|
25
25
|
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
26
26
|
var sentry = require('@commercetools-frontend/sentry');
|
|
27
|
-
var constants = require('./constants-
|
|
27
|
+
var constants = require('./constants-ed10e935.cjs.prod.js');
|
|
28
28
|
require('uuid');
|
|
29
29
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
30
30
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -47,15 +47,6 @@ var CTLogoSVG = require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
|
47
47
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
48
48
|
var history = require('@commercetools-frontend/browser-history');
|
|
49
49
|
var l10n = require('@commercetools-frontend/l10n');
|
|
50
|
-
var _Array$from = require('@babel/runtime-corejs3/core-js-stable/array/from');
|
|
51
|
-
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
52
|
-
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
53
|
-
var reactBroadcast = require('@flopflip/react-broadcast');
|
|
54
|
-
var classnames = require('classnames');
|
|
55
|
-
var MissingImageSvg = require('@commercetools-frontend/assets/images/diagonal-line.svg');
|
|
56
|
-
var permissions = require('@commercetools-frontend/permissions');
|
|
57
|
-
var InlineSvg = require('@commercetools-uikit/icons/inline-svg');
|
|
58
|
-
var isNil = require('lodash/isNil');
|
|
59
50
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
60
51
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
61
52
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
@@ -70,10 +61,13 @@ var _flagsInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/inst
|
|
|
70
61
|
var combineAdapters = require('@flopflip/combine-adapters');
|
|
71
62
|
var httpAdapter = require('@flopflip/http-adapter');
|
|
72
63
|
var ldAdapter = require('@flopflip/launchdarkly-adapter');
|
|
64
|
+
var reactBroadcast = require('@flopflip/react-broadcast');
|
|
73
65
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
66
|
+
var types = require('@flopflip/types');
|
|
74
67
|
var reactRedux = require('react-redux');
|
|
75
68
|
var upperFirst = require('lodash/upperFirst');
|
|
76
|
-
var
|
|
69
|
+
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
70
|
+
var oidc = require('./oidc-a780f067.cjs.prod.js');
|
|
77
71
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
78
72
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
79
73
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
@@ -106,13 +100,6 @@ var SelectInput__default = /*#__PURE__*/_interopDefault(SelectInput);
|
|
|
106
100
|
var CTLogoSVG__default = /*#__PURE__*/_interopDefault(CTLogoSVG);
|
|
107
101
|
var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
|
|
108
102
|
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
109
|
-
var _Array$from__default = /*#__PURE__*/_interopDefault(_Array$from);
|
|
110
|
-
var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
|
|
111
|
-
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
112
|
-
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
113
|
-
var MissingImageSvg__default = /*#__PURE__*/_interopDefault(MissingImageSvg);
|
|
114
|
-
var InlineSvg__default = /*#__PURE__*/_interopDefault(InlineSvg);
|
|
115
|
-
var isNil__default = /*#__PURE__*/_interopDefault(isNil);
|
|
116
103
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
117
104
|
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
118
105
|
var _Object$fromEntries__default = /*#__PURE__*/_interopDefault(_Object$fromEntries);
|
|
@@ -122,10 +109,11 @@ var httpAdapter__default = /*#__PURE__*/_interopDefault(httpAdapter);
|
|
|
122
109
|
var ldAdapter__default = /*#__PURE__*/_interopDefault(ldAdapter);
|
|
123
110
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
124
111
|
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
112
|
+
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
125
113
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
126
114
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
127
115
|
|
|
128
|
-
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-
|
|
116
|
+
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-219f802b.cjs.prod.js' /* webpackChunkName: "requests-in-flight-loader" */); }));
|
|
129
117
|
|
|
130
118
|
// Attempt to load the `projectKey` from localStorage
|
|
131
119
|
function selectProjectKeyFromLocalStorage() {
|
|
@@ -278,26 +266,26 @@ var messages = reactIntl.defineMessages({
|
|
|
278
266
|
}
|
|
279
267
|
});
|
|
280
268
|
|
|
281
|
-
const _excluded
|
|
269
|
+
const _excluded = ["projectCount"];
|
|
282
270
|
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
283
271
|
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
284
272
|
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: "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: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 218, source: { body: "query FetchUserProjects {\n user: me {\n id\n projects {\n results {\n name\n key\n suspension {\n isActive\n }\n expiry {\n isActive\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
285
273
|
const PROJECT_SWITCHER_LABEL_ID = 'project-switcher-label';
|
|
286
|
-
var _ref3
|
|
274
|
+
var _ref3 = {
|
|
287
275
|
name: "82a6rk",
|
|
288
276
|
styles: "flex:1"
|
|
289
277
|
} ;
|
|
290
|
-
var _ref4
|
|
278
|
+
var _ref4 = {
|
|
291
279
|
name: "zol16h",
|
|
292
280
|
styles: "display:flex;flex:1;align-items:center"
|
|
293
281
|
} ;
|
|
294
282
|
const ProjectSwitcherValueContainer = _ref5 => {
|
|
295
283
|
let projectCount = _ref5.projectCount,
|
|
296
|
-
restProps = _objectWithoutProperties(_ref5, _excluded
|
|
284
|
+
restProps = _objectWithoutProperties(_ref5, _excluded);
|
|
297
285
|
return jsxRuntime.jsxs("div", {
|
|
298
|
-
css: _ref4
|
|
286
|
+
css: _ref4,
|
|
299
287
|
children: [jsxRuntime.jsx("div", {
|
|
300
|
-
css: _ref3
|
|
288
|
+
css: _ref3,
|
|
301
289
|
children: jsxRuntime.jsx(SelectInput__default["default"].ValueContainer, _objectSpread$8(_objectSpread$8({}, restProps), {}, {
|
|
302
290
|
children: restProps.children
|
|
303
291
|
}))
|
|
@@ -409,7 +397,7 @@ ProjectSwitcher.displayName = 'ProjectSwitcher';
|
|
|
409
397
|
// eslint-disable-next-line import/prefer-default-export
|
|
410
398
|
const REQUESTS_IN_FLIGHT_LOADER_DOM_ID = 'loader-for-requests-in-flight';
|
|
411
399
|
|
|
412
|
-
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-
|
|
400
|
+
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-fa056e1c.cjs.prod.js' /* webpackChunkName: "user-settings-menu" */); }));
|
|
413
401
|
|
|
414
402
|
var _ref$1 = {
|
|
415
403
|
name: "36bnqj",
|
|
@@ -600,398 +588,9 @@ FetchUser.propTypes = {
|
|
|
600
588
|
};
|
|
601
589
|
FetchUser.displayName = 'FetchUser';
|
|
602
590
|
|
|
603
|
-
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-
|
|
604
|
-
|
|
605
|
-
const _excluded = ["icon"];
|
|
606
|
-
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
607
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$7(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
608
|
-
const compiledStyles$1 = {
|
|
609
|
-
"global": ":root {\n\n /* Left navigation */\n}\n\n/* Left Nav */\n\n.navbar-mod__left-navigation___n7yUt {\n display: flex;\n flex-grow: 1;\n width: 64px;\n z-index: 19999;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n}\n\n.navbar-mod__list___RCV3J {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 0;\n}\n\n.body__menu-open .navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.navbar-mod__list-item___MjK6t {\n width: 64px;\n min-height: 56px;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n margin: 0;\n list-style: none;\n cursor: pointer;\n}\n\n.navbar-mod__item-link___X2Ina {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n padding: var(--spacing-m);\n width: 100%;\n position: relative;\n display: block;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep {\n width: 24px;\n height: 24px;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon__active___asorg > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n flex: 1;\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n display: none;\n opacity: 0;\n transition: all 0.25s ease-in-out;\n text-align: left;\n text-decoration: none;\n}\n\n.navbar-mod__expander___jyAUi {\n border-top: 1px solid var(--color-neutral-40);\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n}\n\n.navbar-mod__expander___jyAUi:hover {\n background: transparent !important;\n}\n\n.navbar-mod__expand-icon___BtmRa {\n align-items: center;\n border-radius: 32px;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n transform: translateX(0) rotateZ(0deg);\n width: 24px;\n}\n\n.navbar-mod__item--bottom___eW7nh {\n position: absolute;\n bottom: 50px;\n}\n\n.navbar-mod__list-item___MjK6t:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-hovered);\n}\n\n.navbar-mod__item__active___lo1sr .navbar-mod__title___eRWUj {\n opacity: 1;\n display: block;\n transition: all 0.2s ease;\n}\n\n.navbar-mod__item_menu-open___zk0zh {\n height: auto !important;\n}\n\n/* NO SUBMENU */\n\n.navbar-mod__item_menu-collapsed___cluyY .navbar-mod__item-link___X2Ina {\n text-align: center;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__title___eRWUj {\n border-bottom: 0;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__sublist___os1s7 {\n padding-top: 40px;\n}\n\n/* left-nav open */\n\n.body__menu-open .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n box-shadow: var(--shadow-for-navbar);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t {\n height: auto;\n min-height: 56px;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt,\n.body__menu-open .navbar-mod__list-item___MjK6t {\n width: 245px;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n display: block;\n opacity: 1;\n margin-left: var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expand-icon___BtmRa {\n transform: translateX(0) rotateZ(180deg);\n}\n\n.body__menu-open .navbar-mod__item__active___lo1sr {\n max-height: 500px;\n transition: max-height 0.25s ease-in;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7 {\n position: relative;\n z-index: 1;\n left: 0;\n margin: 0 0 0 calc(\n 24px + var(--spacing-m) + 4px + 4px\n );\n padding: var(--spacing-m) 0 0;\n background-color: transparent;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7.navbar-mod__sublist-no-children___Dy-h- {\n border: 0;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expander___jyAUi {\n min-height: 50px;\n justify-content: flex-end;\n padding: var(--spacing-m);\n}\n\n/* Second level menu */\n\n.navbar-mod__sublist___os1s7 {\n padding: 75px var(--spacing-l) var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n position: absolute;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar);\n top: 0;\n left: 64px;\n z-index: -1;\n list-style: none;\n opacity: 0.01;\n visibility: hidden;\n}\n\n.navbar-mod__sublist__inactive___kJvf- {\n /* empty block */\n}\n\n.navbar-mod__sublist-item___gafkS {\n padding: var(--spacing-s) 0 0;\n}\n\n.navbar-mod__sublist-item___gafkS:first-of-type {\n padding: 0;\n}\n\n.navbar-mod__sublist-item___gafkS:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__text___ccHEu {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.navbar-mod__text-link___dhtj6 {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.navbar-mod__text-link___dhtj6:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n/* Item active */\n\n.navbar-mod__item__active___lo1sr,\n.navbar-mod__item_menu__active___5xFRw {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n width: calc(\n 205px + 64px -\n var(--spacing-m) * 2\n );\n justify-content: flex-start;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n width: calc(24px + 4px * 2);\n display: flex;\n justify-content: center;\n align-self: flex-start;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n justify-content: flex-start;\n display: flex;\n width: 100%;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n /* empty block */\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n position: relative;\n width: auto;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: 40px;\n}\n\n.navbar-mod__item_menu-collapsed___cluyY.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n max-height: 44px;\n overflow: hidden;\n /* stylelint-disable-next-line value-no-vendor-prefix */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: var(--spacing-m);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n margin-left: 0;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: 205px;\n min-height: 100%;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: calc(100% - calc(\n 24px + var(--spacing-m) + 4px + 4px\n ));\n}\n\n.navbar-mod__sublist-expanded__active___240JK,\n.navbar-mod__sublist-collapsed__active___-9vYh {\n opacity: 1;\n visibility: visible;\n text-align: left;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__highlighted___oJWkA,\n.navbar-mod__highlighted___oJWkA .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-active) !important;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-active);\n}\n\n.navbar-mod__hidden___TQLSs {\n display: none;\n}\n\n.navbar-mod__divider___TpVzu {\n border-top: 1px solid var(--color-neutral-40);\n}\n\n.navbar-mod__loading-dot-container___G2LVb {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n padding-bottom: 32px;\n /* \n FIXME: Make the navbar scrollable in collapsed state.\n NOTE: do not use `overflow-x: hidden; overflow-y: auto;` as this prevents submenus from showing up on hover \n */\n}\n\n.navbar-mod__fixed-menu___42tD9 {\n flex: 0 0 0;\n position: relative;\n}\n",
|
|
610
|
-
"jsonMap": {
|
|
611
|
-
"left-navigation": "navbar-mod__left-navigation___n7yUt",
|
|
612
|
-
"list": "navbar-mod__list___RCV3J",
|
|
613
|
-
"scrollable-menu": "navbar-mod__scrollable-menu___64pxJ",
|
|
614
|
-
"list-item": "navbar-mod__list-item___MjK6t",
|
|
615
|
-
"item-link": "navbar-mod__item-link___X2Ina",
|
|
616
|
-
"item-icon-text": "navbar-mod__item-icon-text___a-8JY",
|
|
617
|
-
"icon": "navbar-mod__icon___bLsep",
|
|
618
|
-
"icon__active": "navbar-mod__icon__active___asorg",
|
|
619
|
-
"title": "navbar-mod__title___eRWUj",
|
|
620
|
-
"expander": "navbar-mod__expander___jyAUi",
|
|
621
|
-
"expand-icon": "navbar-mod__expand-icon___BtmRa",
|
|
622
|
-
"item--bottom": "navbar-mod__item--bottom___eW7nh",
|
|
623
|
-
"item__active": "navbar-mod__item__active___lo1sr",
|
|
624
|
-
"item_menu-open": "navbar-mod__item_menu-open___zk0zh",
|
|
625
|
-
"item_menu-collapsed": "navbar-mod__item_menu-collapsed___cluyY",
|
|
626
|
-
"item__no-submenu": "navbar-mod__item__no-submenu___0lmiH",
|
|
627
|
-
"sublist": "navbar-mod__sublist___os1s7",
|
|
628
|
-
"sublist-no-children": "navbar-mod__sublist-no-children___Dy-h-",
|
|
629
|
-
"title-copy": "navbar-mod__title-copy___o2y1q",
|
|
630
|
-
"sublist__inactive": "navbar-mod__sublist__inactive___kJvf-",
|
|
631
|
-
"sublist-item": "navbar-mod__sublist-item___gafkS",
|
|
632
|
-
"text": "navbar-mod__text___ccHEu",
|
|
633
|
-
"text-link": "navbar-mod__text-link___dhtj6",
|
|
634
|
-
"item_menu__active": "navbar-mod__item_menu__active___5xFRw",
|
|
635
|
-
"icon-container": "navbar-mod__icon-container___w3FtA",
|
|
636
|
-
"fixed-menu": "navbar-mod__fixed-menu___42tD9",
|
|
637
|
-
"sublist-expanded__active": "navbar-mod__sublist-expanded__active___240JK",
|
|
638
|
-
"sublist-collapsed__active": "navbar-mod__sublist-collapsed__active___-9vYh",
|
|
639
|
-
"highlighted": "navbar-mod__highlighted___oJWkA",
|
|
640
|
-
"hidden": "navbar-mod__hidden___TQLSs",
|
|
641
|
-
"divider": "navbar-mod__divider___TpVzu",
|
|
642
|
-
"loading-dot-container": "navbar-mod__loading-dot-container___G2LVb"
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
const styles$2 = compiledStyles$1.jsonMap;
|
|
646
|
-
/*
|
|
647
|
-
<DataMenu data={[]}>
|
|
648
|
-
<MenuGroup>
|
|
649
|
-
<MenuItem>
|
|
650
|
-
<MenuItemLink linkTo="/foo">(icon) Products</MenuItemLink>
|
|
651
|
-
<MenuGroup>
|
|
652
|
-
<MenuItemLink linkTo="/foo/new">Add product</MenuItemLink>
|
|
653
|
-
</MenuGroup>
|
|
654
|
-
</MenuItem>
|
|
655
|
-
</MenuGroup>
|
|
656
|
-
<MenuExpander/>
|
|
657
|
-
</DataMenu>
|
|
658
|
-
*/
|
|
659
|
-
|
|
660
|
-
const HeartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./heart-ebfab4cd.cjs.prod.js'); }));
|
|
661
|
-
const PaperclipIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./paperclip-6f0b6ae5.cjs.prod.js'); }));
|
|
662
|
-
const PluginIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./plugin-f199ed20.cjs.prod.js'); }));
|
|
663
|
-
const RocketIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./rocket-f0bfae34.cjs.prod.js'); }));
|
|
664
|
-
const StarIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./star-c11b0683.cjs.prod.js'); }));
|
|
665
|
-
const ConnectedSquareIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./connected-square-960e046b.cjs.prod.js'); }));
|
|
666
|
-
const WorldIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./world-f921d80c.cjs.prod.js'); }));
|
|
667
|
-
const TreeStructureIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tree-structure-690366f9.cjs.prod.js'); }));
|
|
668
|
-
const UserFilledIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-filled-58af1ae4.cjs.prod.js'); }));
|
|
669
|
-
const SpeedometerIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./speedometer-0de260cf.cjs.prod.js'); }));
|
|
670
|
-
const TagMultiIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tag-multi-f8d9c9e6.cjs.prod.js'); }));
|
|
671
|
-
const CartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./cart-f2fc1baf.cjs.prod.js'); }));
|
|
672
|
-
const BoxIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./box-e17daf6c.cjs.prod.js'); }));
|
|
673
|
-
const GearIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./gear-9b394c43.cjs.prod.js'); }));
|
|
674
|
-
const ListWithSearchIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./list-with-search-e3ccba98.cjs.prod.js'); }));
|
|
675
|
-
// The icon is expected to be the `svg` document as a string.
|
|
676
|
-
// For backwards compatibility purposes, we still support the legacy "icon name",
|
|
677
|
-
// which we then map to one of the pre-defined icons.
|
|
678
|
-
// Eventually, we want to get rid of this "switch" logic.
|
|
679
|
-
const IconSwitcher = _ref => {
|
|
680
|
-
let icon = _ref.icon,
|
|
681
|
-
iconProps = _objectWithoutProperties(_ref, _excluded);
|
|
682
|
-
if (_includesInstanceProperty__default["default"](icon).call(icon, '<svg')) {
|
|
683
|
-
return jsxRuntime.jsx(InlineSvg__default["default"], _objectSpread$7({
|
|
684
|
-
data: icon
|
|
685
|
-
}, iconProps));
|
|
686
|
-
}
|
|
687
|
-
// Backwards compatibility for apps using the "icon name".
|
|
688
|
-
switch (icon) {
|
|
689
|
-
// Legacy application icons
|
|
690
|
-
// TODO: To be removed once MC applications icons updates are published
|
|
691
|
-
case 'TreeStructureIcon':
|
|
692
|
-
return jsxRuntime.jsx(TreeStructureIcon, _objectSpread$7({}, iconProps));
|
|
693
|
-
case 'UserFilledIcon':
|
|
694
|
-
return jsxRuntime.jsx(UserFilledIcon, _objectSpread$7({}, iconProps));
|
|
695
|
-
case 'SpeedometerIcon':
|
|
696
|
-
return jsxRuntime.jsx(SpeedometerIcon, _objectSpread$7({}, iconProps));
|
|
697
|
-
case 'TagMultiIcon':
|
|
698
|
-
return jsxRuntime.jsx(TagMultiIcon, _objectSpread$7({}, iconProps));
|
|
699
|
-
case 'CartIcon':
|
|
700
|
-
return jsxRuntime.jsx(CartIcon, _objectSpread$7({}, iconProps));
|
|
701
|
-
case 'BoxIcon':
|
|
702
|
-
return jsxRuntime.jsx(BoxIcon, _objectSpread$7({}, iconProps));
|
|
703
|
-
case 'GearIcon':
|
|
704
|
-
return jsxRuntime.jsx(GearIcon, _objectSpread$7({}, iconProps));
|
|
705
|
-
case 'ListWithSearchIcon':
|
|
706
|
-
return jsxRuntime.jsx(ListWithSearchIcon, _objectSpread$7({}, iconProps));
|
|
707
|
-
|
|
708
|
-
// Custom application icons set
|
|
709
|
-
case 'HeartIcon':
|
|
710
|
-
return jsxRuntime.jsx(HeartIcon, _objectSpread$7({}, iconProps));
|
|
711
|
-
case 'PaperclipIcon':
|
|
712
|
-
return jsxRuntime.jsx(PaperclipIcon, _objectSpread$7({}, iconProps));
|
|
713
|
-
case 'PluginIcon':
|
|
714
|
-
return jsxRuntime.jsx(PluginIcon, _objectSpread$7({}, iconProps));
|
|
715
|
-
case 'RocketIcon':
|
|
716
|
-
return jsxRuntime.jsx(RocketIcon, _objectSpread$7({}, iconProps));
|
|
717
|
-
case 'StarIcon':
|
|
718
|
-
return jsxRuntime.jsx(StarIcon, _objectSpread$7({}, iconProps));
|
|
719
|
-
case 'ConnectedSquareIcon':
|
|
720
|
-
return jsxRuntime.jsx(ConnectedSquareIcon, _objectSpread$7({}, iconProps));
|
|
721
|
-
// For backwards compatibility
|
|
722
|
-
case 'WorldIcon':
|
|
723
|
-
return jsxRuntime.jsx(WorldIcon, _objectSpread$7({}, iconProps));
|
|
724
|
-
default:
|
|
725
|
-
return jsxRuntime.jsx("img", {
|
|
726
|
-
src: MissingImageSvg__default["default"],
|
|
727
|
-
alt: "missing icon"
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
IconSwitcher.propTypes = {};
|
|
732
|
-
IconSwitcher.displayName = 'IconSwitcher';
|
|
733
|
-
const MenuExpander = props => {
|
|
734
|
-
return jsxRuntime.jsx("li", {
|
|
735
|
-
className: classnames__default["default"](styles$2['list-item'], styles$2.expander, {
|
|
736
|
-
[styles$2.hidden]: !props.isVisible
|
|
737
|
-
}),
|
|
738
|
-
children: jsxRuntime.jsx("div", {
|
|
739
|
-
onClick: props.onClick,
|
|
740
|
-
className: styles$2['expand-icon'],
|
|
741
|
-
"data-testid": "menu-expander",
|
|
742
|
-
children: jsxRuntime.jsx(icons.ArrowRightIcon, {
|
|
743
|
-
color: "surface",
|
|
744
|
-
size: "big"
|
|
745
|
-
})
|
|
746
|
-
})
|
|
747
|
-
}, "expander");
|
|
748
|
-
};
|
|
749
|
-
MenuExpander.propTypes = {};
|
|
750
|
-
MenuExpander.displayName = 'MenuExpander';
|
|
751
|
-
const Faded = /*#__PURE__*/_styled__default["default"]("div", {
|
|
752
|
-
target: "ekdrmmp0"
|
|
753
|
-
} )("position:absolute;top:-32px;height:32px;width:100%;background:linear-gradient(\n 0deg,\n ", applicationComponents.designTokens.backgroundColorForNavbar, " 0%,\n rgba(0, 0, 0, 0) 100%\n );z-index:1;" + ("" ));
|
|
754
|
-
const MenuGroup = props => {
|
|
755
|
-
if (props.isExpanded && (props.level === 2 && !props.hasSubmenu || props.level === 2 && !props.isActive)) {
|
|
756
|
-
return null;
|
|
757
|
-
}
|
|
758
|
-
const isSublistActiveWhileIsMenuExpanded = props.level === 2 && props.isActive && props.isExpanded;
|
|
759
|
-
const isSublistActiveWhileIsMenuCollapsed = props.level === 2 && props.isActive && !props.isExpanded;
|
|
760
|
-
return jsxRuntime.jsx("ul", {
|
|
761
|
-
id: "group-".concat(props.id),
|
|
762
|
-
"data-testid": "group-".concat(props.id),
|
|
763
|
-
role: "menu",
|
|
764
|
-
"aria-expanded": isSublistActiveWhileIsMenuExpanded || isSublistActiveWhileIsMenuCollapsed,
|
|
765
|
-
className: classnames__default["default"]({
|
|
766
|
-
[styles$2.list]: props.level === 1
|
|
767
|
-
}, {
|
|
768
|
-
[styles$2.sublist]: props.level === 2
|
|
769
|
-
}, {
|
|
770
|
-
[styles$2['sublist-no-children']]: props.level === 2 && !props.children
|
|
771
|
-
}, {
|
|
772
|
-
[styles$2['sublist-expanded__active']]: isSublistActiveWhileIsMenuExpanded
|
|
773
|
-
}, {
|
|
774
|
-
[styles$2['sublist-collapsed__active']]: isSublistActiveWhileIsMenuCollapsed
|
|
775
|
-
}, {
|
|
776
|
-
[styles$2.sublist__inactive]: !isSublistActiveWhileIsMenuCollapsed
|
|
777
|
-
}),
|
|
778
|
-
children: props.children
|
|
779
|
-
});
|
|
780
|
-
};
|
|
781
|
-
MenuGroup.propTypes = {};
|
|
782
|
-
MenuGroup.displayName = 'MenuGroup';
|
|
783
|
-
const MenuItem = props => {
|
|
784
|
-
var _props$isMainMenuRout;
|
|
785
|
-
return jsxRuntime.jsx("li", {
|
|
786
|
-
role: "menuitem",
|
|
787
|
-
className: classnames__default["default"](styles$2['list-item'], {
|
|
788
|
-
[styles$2.item__active]: props.isActive,
|
|
789
|
-
[styles$2['item_menu__active']]: (_props$isMainMenuRout = props.isMainMenuRouteActive) !== null && _props$isMainMenuRout !== void 0 ? _props$isMainMenuRout : false,
|
|
790
|
-
[styles$2['item_menu-collapsed']]: !props.isMenuOpen,
|
|
791
|
-
[styles$2['item__no-submenu']]: !props.hasSubmenu
|
|
792
|
-
}),
|
|
793
|
-
onClick: props.onClick,
|
|
794
|
-
onMouseEnter: props.onMouseEnter,
|
|
795
|
-
onMouseLeave: props.onMouseLeave,
|
|
796
|
-
children: jsxRuntime.jsx("div", {
|
|
797
|
-
className: styles$2['item-link'],
|
|
798
|
-
children: props.children
|
|
799
|
-
})
|
|
800
|
-
});
|
|
801
|
-
};
|
|
802
|
-
MenuItem.propTypes = {};
|
|
803
|
-
MenuItem.displayName = 'MenuItem';
|
|
804
|
-
const menuItemLinkDefaultProps = {
|
|
805
|
-
exactMatch: false
|
|
806
|
-
};
|
|
807
|
-
const MenuItemLink = props => {
|
|
808
|
-
const redirectTo = targetUrl => useIsServedByProxy.location.replace(targetUrl);
|
|
809
|
-
if (props.linkTo) {
|
|
810
|
-
return jsxRuntime.jsx(reactRouterDom.NavLink, {
|
|
811
|
-
to: props.linkTo,
|
|
812
|
-
exact: props.exactMatch,
|
|
813
|
-
activeClassName: styles$2.highlighted,
|
|
814
|
-
className: styles$2['text-link'],
|
|
815
|
-
onClick: event => {
|
|
816
|
-
if (props.linkTo && props.useFullRedirectsForLinks) {
|
|
817
|
-
event.preventDefault();
|
|
818
|
-
redirectTo(props.linkTo);
|
|
819
|
-
} else if (props.onClick) {
|
|
820
|
-
event.persist();
|
|
821
|
-
props.onClick(event);
|
|
822
|
-
}
|
|
823
|
-
},
|
|
824
|
-
children: props.children
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
828
|
-
children: props.children
|
|
829
|
-
});
|
|
830
|
-
};
|
|
831
|
-
MenuItemLink.propTypes = {};
|
|
832
|
-
MenuItemLink.displayName = 'MenuItemLink';
|
|
833
|
-
MenuItemLink.defaultProps = menuItemLinkDefaultProps;
|
|
834
|
-
const MenuItemDivider = () => jsxRuntime.jsx("div", {
|
|
835
|
-
className: styles$2.divider
|
|
836
|
-
});
|
|
837
|
-
MenuItemDivider.displayName = 'MenuItemDivider';
|
|
838
|
-
const isEveryMenuVisibilitySetToHidden = (menuVisibilities, namesOfMenuVisibilities) => _Array$isArray__default["default"](namesOfMenuVisibilities) && namesOfMenuVisibilities.length > 0 && _everyInstanceProperty__default["default"](namesOfMenuVisibilities).call(namesOfMenuVisibilities, nameOfMenuVisibility => menuVisibilities && menuVisibilities[nameOfMenuVisibility] === true);
|
|
839
|
-
const restrictedMenuItemDefaultProps = {
|
|
840
|
-
permissions: []
|
|
841
|
-
};
|
|
842
|
-
function isLongLivedFlag(flag) {
|
|
843
|
-
return typeof (flag === null || flag === void 0 ? void 0 : flag.value) === 'boolean';
|
|
844
|
-
}
|
|
845
|
-
const RestrictedMenuItem = props => {
|
|
846
|
-
// NOTE: Custom application are activated/deactivated while their
|
|
847
|
-
// visibility is not controlled via a visibiility overwrite.
|
|
848
|
-
const flagVariation = reactBroadcast.useFlagVariation(props.featureToggle);
|
|
849
|
-
if (isEveryMenuVisibilitySetToHidden(props.menuVisibilities, props.namesOfMenuVisibilities)) return null;
|
|
850
|
-
const permissionsWrapper = _Array$isArray__default["default"](props.permissions) && props.permissions.length > 0 || _Array$isArray__default["default"](props.dataFences) && props.dataFences.length > 0 ? jsxRuntime.jsx(permissions.RestrictedByPermissions, {
|
|
851
|
-
permissions: props.permissions,
|
|
852
|
-
actionRights: props.actionRights,
|
|
853
|
-
dataFences: props.dataFences,
|
|
854
|
-
selectDataFenceData: demandedDataFence => {
|
|
855
|
-
switch (demandedDataFence.type) {
|
|
856
|
-
case 'store':
|
|
857
|
-
return demandedDataFence.actualDataFenceValues;
|
|
858
|
-
default:
|
|
859
|
-
return null;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
// Always check that some of the given permissions match.
|
|
863
|
-
,
|
|
864
|
-
shouldMatchSomePermissions: true,
|
|
865
|
-
projectPermissions: props.projectPermissions,
|
|
866
|
-
children: props.children
|
|
867
|
-
}) : jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
868
|
-
children: props.children
|
|
869
|
-
});
|
|
870
|
-
if (props.featureToggle) {
|
|
871
|
-
// A regular short-lived feature toggle
|
|
872
|
-
if (flagVariation === true) return permissionsWrapper;
|
|
873
|
-
// A long-lived feature toggle with `{ value: boolean, string: reason }`
|
|
874
|
-
if (isLongLivedFlag(flagVariation) && flagVariation.value === true) return permissionsWrapper;
|
|
875
|
-
return null;
|
|
876
|
-
}
|
|
877
|
-
return permissionsWrapper;
|
|
878
|
-
};
|
|
879
|
-
RestrictedMenuItem.propTypes = {};
|
|
880
|
-
RestrictedMenuItem.displayName = 'RestrictedMenuItem';
|
|
881
|
-
RestrictedMenuItem.defaultProps = restrictedMenuItemDefaultProps;
|
|
882
|
-
const MenuLabel = props => {
|
|
883
|
-
var _context;
|
|
884
|
-
const localizedLabel = _findInstanceProperty__default["default"](_context = props.labelAllLocales).call(_context, loc => {
|
|
885
|
-
var _context2;
|
|
886
|
-
return _startsWithInstanceProperty__default["default"](_context2 = props.applicationLocale).call(_context2, loc.locale);
|
|
887
|
-
});
|
|
888
|
-
if (localizedLabel) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
889
|
-
children: localizedLabel.value
|
|
890
|
-
});
|
|
891
|
-
if (props.defaultLabel) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
892
|
-
children: props.defaultLabel
|
|
893
|
-
});
|
|
894
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
895
|
-
children: constants$1.NO_VALUE_FALLBACK
|
|
896
|
-
});
|
|
897
|
-
};
|
|
898
|
-
MenuLabel.propTypes = {
|
|
899
|
-
labelAllLocales: _pt__default["default"].arrayOf(_pt__default["default"].any).isRequired,
|
|
900
|
-
defaultLabel: _pt__default["default"].string,
|
|
901
|
-
applicationLocale: _pt__default["default"].string.isRequired
|
|
902
|
-
};
|
|
903
|
-
const NavBarLayout = /*#__PURE__*/react.forwardRef((props, ref) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
904
|
-
children: [jsxRuntime.jsx(react$1.Global, {
|
|
905
|
-
styles: /*#__PURE__*/react$1.css(compiledStyles$1.global, ";" + ("" ), "" )
|
|
906
|
-
}), jsxRuntime.jsx("nav", {
|
|
907
|
-
ref: ref,
|
|
908
|
-
className: styles$2['left-navigation'],
|
|
909
|
-
"data-test": "left-navigation",
|
|
910
|
-
"data-testid": "left-navigation",
|
|
911
|
-
children: props.children
|
|
912
|
-
})]
|
|
913
|
-
}));
|
|
914
|
-
NavBarLayout.displayName = 'NavBarLayout';
|
|
915
|
-
|
|
916
|
-
const useLoadingMenuLayoutEffect = () => {
|
|
917
|
-
const cachedIsForcedMenuOpen = window.localStorage.getItem(constants.STORAGE_KEYS.IS_FORCED_MENU_OPEN);
|
|
918
|
-
const isForcedMenuOpen = isNil__default["default"](cachedIsForcedMenuOpen) ? null : JSON.parse(cachedIsForcedMenuOpen);
|
|
919
|
-
react.useLayoutEffect(() => {
|
|
920
|
-
if (isForcedMenuOpen) document.body.classList.add('body__menu-open');
|
|
921
|
-
if (!isForcedMenuOpen) document.body.classList.remove('body__menu-open');
|
|
922
|
-
}, [isForcedMenuOpen]);
|
|
923
|
-
};
|
|
591
|
+
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-21b59702.cjs.prod.js' /* webpackChunkName: "navbar" */); }));
|
|
924
592
|
|
|
925
|
-
|
|
926
|
-
const compiledStyles = {
|
|
927
|
-
"global": ":root {\n\n /* Left navigation */\n}\n\n/* Left Nav */\n\n.navbar-mod__left-navigation___n7yUt {\n display: flex;\n flex-grow: 1;\n width: 64px;\n z-index: 19999;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n}\n\n.navbar-mod__list___RCV3J {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 0;\n}\n\n.body__menu-open .navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.navbar-mod__list-item___MjK6t {\n width: 64px;\n min-height: 56px;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n margin: 0;\n list-style: none;\n cursor: pointer;\n}\n\n.navbar-mod__item-link___X2Ina {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n padding: var(--spacing-m);\n width: 100%;\n position: relative;\n display: block;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep {\n width: 24px;\n height: 24px;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon__active___asorg > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n flex: 1;\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n display: none;\n opacity: 0;\n transition: all 0.25s ease-in-out;\n text-align: left;\n text-decoration: none;\n}\n\n.navbar-mod__expander___jyAUi {\n border-top: 1px solid var(--color-neutral-40);\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n}\n\n.navbar-mod__expander___jyAUi:hover {\n background: transparent !important;\n}\n\n.navbar-mod__expand-icon___BtmRa {\n align-items: center;\n border-radius: 32px;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n transform: translateX(0) rotateZ(0deg);\n width: 24px;\n}\n\n.navbar-mod__item--bottom___eW7nh {\n position: absolute;\n bottom: 50px;\n}\n\n.navbar-mod__list-item___MjK6t:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-hovered);\n}\n\n.navbar-mod__item__active___lo1sr .navbar-mod__title___eRWUj {\n opacity: 1;\n display: block;\n transition: all 0.2s ease;\n}\n\n.navbar-mod__item_menu-open___zk0zh {\n height: auto !important;\n}\n\n/* NO SUBMENU */\n\n.navbar-mod__item_menu-collapsed___cluyY .navbar-mod__item-link___X2Ina {\n text-align: center;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__title___eRWUj {\n border-bottom: 0;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__sublist___os1s7 {\n padding-top: 40px;\n}\n\n/* left-nav open */\n\n.body__menu-open .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n box-shadow: var(--shadow-for-navbar);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t {\n height: auto;\n min-height: 56px;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt,\n.body__menu-open .navbar-mod__list-item___MjK6t {\n width: 245px;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n display: block;\n opacity: 1;\n margin-left: var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expand-icon___BtmRa {\n transform: translateX(0) rotateZ(180deg);\n}\n\n.body__menu-open .navbar-mod__item__active___lo1sr {\n max-height: 500px;\n transition: max-height 0.25s ease-in;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7 {\n position: relative;\n z-index: 1;\n left: 0;\n margin: 0 0 0 calc(\n 24px + var(--spacing-m) + 4px + 4px\n );\n padding: var(--spacing-m) 0 0;\n background-color: transparent;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7.navbar-mod__sublist-no-children___Dy-h- {\n border: 0;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expander___jyAUi {\n min-height: 50px;\n justify-content: flex-end;\n padding: var(--spacing-m);\n}\n\n/* Second level menu */\n\n.navbar-mod__sublist___os1s7 {\n padding: 75px var(--spacing-l) var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n position: absolute;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar);\n top: 0;\n left: 64px;\n z-index: -1;\n list-style: none;\n opacity: 0.01;\n visibility: hidden;\n}\n\n.navbar-mod__sublist__inactive___kJvf- {\n /* empty block */\n}\n\n.navbar-mod__sublist-item___gafkS {\n padding: var(--spacing-s) 0 0;\n}\n\n.navbar-mod__sublist-item___gafkS:first-of-type {\n padding: 0;\n}\n\n.navbar-mod__sublist-item___gafkS:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__text___ccHEu {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.navbar-mod__text-link___dhtj6 {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.navbar-mod__text-link___dhtj6:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n/* Item active */\n\n.navbar-mod__item__active___lo1sr,\n.navbar-mod__item_menu__active___5xFRw {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n width: calc(\n 205px + 64px -\n var(--spacing-m) * 2\n );\n justify-content: flex-start;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n width: calc(24px + 4px * 2);\n display: flex;\n justify-content: center;\n align-self: flex-start;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n justify-content: flex-start;\n display: flex;\n width: 100%;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n /* empty block */\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n position: relative;\n width: auto;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: 40px;\n}\n\n.navbar-mod__item_menu-collapsed___cluyY.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n max-height: 44px;\n overflow: hidden;\n /* stylelint-disable-next-line value-no-vendor-prefix */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: var(--spacing-m);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n margin-left: 0;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: 205px;\n min-height: 100%;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: calc(100% - calc(\n 24px + var(--spacing-m) + 4px + 4px\n ));\n}\n\n.navbar-mod__sublist-expanded__active___240JK,\n.navbar-mod__sublist-collapsed__active___-9vYh {\n opacity: 1;\n visibility: visible;\n text-align: left;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__highlighted___oJWkA,\n.navbar-mod__highlighted___oJWkA .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-active) !important;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-active);\n}\n\n.navbar-mod__hidden___TQLSs {\n display: none;\n}\n\n.navbar-mod__divider___TpVzu {\n border-top: 1px solid var(--color-neutral-40);\n}\n\n.navbar-mod__loading-dot-container___G2LVb {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n padding-bottom: 32px;\n /* \n FIXME: Make the navbar scrollable in collapsed state.\n NOTE: do not use `overflow-x: hidden; overflow-y: auto;` as this prevents submenus from showing up on hover \n */\n}\n\n.navbar-mod__fixed-menu___42tD9 {\n flex: 0 0 0;\n position: relative;\n}\n",
|
|
928
|
-
"jsonMap": {
|
|
929
|
-
"left-navigation": "navbar-mod__left-navigation___n7yUt",
|
|
930
|
-
"list": "navbar-mod__list___RCV3J",
|
|
931
|
-
"scrollable-menu": "navbar-mod__scrollable-menu___64pxJ",
|
|
932
|
-
"list-item": "navbar-mod__list-item___MjK6t",
|
|
933
|
-
"item-link": "navbar-mod__item-link___X2Ina",
|
|
934
|
-
"item-icon-text": "navbar-mod__item-icon-text___a-8JY",
|
|
935
|
-
"icon": "navbar-mod__icon___bLsep",
|
|
936
|
-
"icon__active": "navbar-mod__icon__active___asorg",
|
|
937
|
-
"title": "navbar-mod__title___eRWUj",
|
|
938
|
-
"expander": "navbar-mod__expander___jyAUi",
|
|
939
|
-
"expand-icon": "navbar-mod__expand-icon___BtmRa",
|
|
940
|
-
"item--bottom": "navbar-mod__item--bottom___eW7nh",
|
|
941
|
-
"item__active": "navbar-mod__item__active___lo1sr",
|
|
942
|
-
"item_menu-open": "navbar-mod__item_menu-open___zk0zh",
|
|
943
|
-
"item_menu-collapsed": "navbar-mod__item_menu-collapsed___cluyY",
|
|
944
|
-
"item__no-submenu": "navbar-mod__item__no-submenu___0lmiH",
|
|
945
|
-
"sublist": "navbar-mod__sublist___os1s7",
|
|
946
|
-
"sublist-no-children": "navbar-mod__sublist-no-children___Dy-h-",
|
|
947
|
-
"title-copy": "navbar-mod__title-copy___o2y1q",
|
|
948
|
-
"sublist__inactive": "navbar-mod__sublist__inactive___kJvf-",
|
|
949
|
-
"sublist-item": "navbar-mod__sublist-item___gafkS",
|
|
950
|
-
"text": "navbar-mod__text___ccHEu",
|
|
951
|
-
"text-link": "navbar-mod__text-link___dhtj6",
|
|
952
|
-
"item_menu__active": "navbar-mod__item_menu__active___5xFRw",
|
|
953
|
-
"icon-container": "navbar-mod__icon-container___w3FtA",
|
|
954
|
-
"fixed-menu": "navbar-mod__fixed-menu___42tD9",
|
|
955
|
-
"sublist-expanded__active": "navbar-mod__sublist-expanded__active___240JK",
|
|
956
|
-
"sublist-collapsed__active": "navbar-mod__sublist-collapsed__active___-9vYh",
|
|
957
|
-
"highlighted": "navbar-mod__highlighted___oJWkA",
|
|
958
|
-
"hidden": "navbar-mod__hidden___TQLSs",
|
|
959
|
-
"divider": "navbar-mod__divider___TpVzu",
|
|
960
|
-
"loading-dot-container": "navbar-mod__loading-dot-container___G2LVb"
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
const styles$1 = compiledStyles.jsonMap;
|
|
964
|
-
const LoadingNavBar = () => {
|
|
965
|
-
var _context;
|
|
966
|
-
const ref = react.useRef(null);
|
|
967
|
-
useLoadingMenuLayoutEffect();
|
|
968
|
-
return jsxRuntime.jsx(NavBarLayout, {
|
|
969
|
-
ref: ref,
|
|
970
|
-
children: jsxRuntime.jsx(MenuGroup, {
|
|
971
|
-
id: "main",
|
|
972
|
-
level: 1,
|
|
973
|
-
children: jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
974
|
-
children: _mapInstanceProperty__default["default"](_context = _Array$from__default["default"](new Array(5))).call(_context, (_, index) => jsxRuntime.jsx(MenuItem, {
|
|
975
|
-
hasSubmenu: false,
|
|
976
|
-
isMenuOpen: false,
|
|
977
|
-
isActive: false,
|
|
978
|
-
onClick: () => undefined,
|
|
979
|
-
children: jsxRuntime.jsx("div", {
|
|
980
|
-
className: styles$1['loading-dot-container'],
|
|
981
|
-
"data-testid": "dot-container-".concat(index),
|
|
982
|
-
children: jsxRuntime.jsx(LoadingPlaceholder, {
|
|
983
|
-
shape: "dot",
|
|
984
|
-
size: "m"
|
|
985
|
-
})
|
|
986
|
-
})
|
|
987
|
-
}, index))
|
|
988
|
-
})
|
|
989
|
-
})
|
|
990
|
-
});
|
|
991
|
-
};
|
|
992
|
-
LoadingNavBar.displayName = 'LoadingNavBar';
|
|
993
|
-
|
|
994
|
-
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-5c3c1313.cjs.prod.js' /* webpackChunkName: "project-container" */); }));
|
|
593
|
+
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-e2770668.cjs.prod.js' /* webpackChunkName: "project-container" */); }));
|
|
995
594
|
|
|
996
595
|
const getSelectedDataLocaleForProject = projectLocales => {
|
|
997
596
|
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
@@ -1103,7 +702,7 @@ var pimIndexerStates = {
|
|
|
1103
702
|
NOT_INDEXED: 'NOT_INDEXED'
|
|
1104
703
|
};
|
|
1105
704
|
|
|
1106
|
-
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-
|
|
705
|
+
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-c6e99d06.cjs.prod.js' /* webpackChunkName: "quick-access" */); }));
|
|
1107
706
|
|
|
1108
707
|
const QuickAccessTrigger = props => {
|
|
1109
708
|
const _useState = react.useState(false),
|
|
@@ -1190,7 +789,7 @@ const QuickAccessTrigger = props => {
|
|
|
1190
789
|
QuickAccessTrigger.propTypes = {};
|
|
1191
790
|
QuickAccessTrigger.displayName = 'QuickAccessTrigger';
|
|
1192
791
|
|
|
1193
|
-
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-
|
|
792
|
+
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-55feba64.cjs.prod.js' /* webpackChunkName: "redirect-to-logout" */); }));
|
|
1194
793
|
|
|
1195
794
|
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-2266c427.cjs.prod.js' /* webpackChunkName: "redirect-to-project-create" */); }));
|
|
1196
795
|
|
|
@@ -1213,13 +812,16 @@ const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().
|
|
|
1213
812
|
* them to off until fetched).
|
|
1214
813
|
*/
|
|
1215
814
|
|
|
1216
|
-
const
|
|
815
|
+
const MAIN_NAVIGATION = 'newMainNavigationBar';
|
|
816
|
+
const FLAGS = {
|
|
817
|
+
[MAIN_NAVIGATION]: false
|
|
818
|
+
};
|
|
1217
819
|
|
|
1218
|
-
function ownKeys$
|
|
1219
|
-
function _objectSpread$
|
|
820
|
+
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
821
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1220
822
|
var FetchAllMenuFeatureToggles = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchAllMenuFeatureToggles" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allFeatureToggles" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 57, source: { body: "query FetchAllMenuFeatureToggles {\n allFeatureToggles\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1221
823
|
const defaultApiUrl = window.location.origin;
|
|
1222
|
-
const getDefaultedFeatureToggles = allFeatureToggles => _reduceInstanceProperty__default["default"](allFeatureToggles).call(allFeatureToggles, (previouslyDefaultedFeatureToggles, nextFeatureToggle) => _objectSpread$
|
|
824
|
+
const getDefaultedFeatureToggles = allFeatureToggles => _reduceInstanceProperty__default["default"](allFeatureToggles).call(allFeatureToggles, (previouslyDefaultedFeatureToggles, nextFeatureToggle) => _objectSpread$7(_objectSpread$7({}, previouslyDefaultedFeatureToggles), {}, {
|
|
1223
825
|
[nextFeatureToggle]: false
|
|
1224
826
|
}), {});
|
|
1225
827
|
const useAllMenuFeatureToggles = () => {
|
|
@@ -1244,16 +846,18 @@ const useAllMenuFeatureToggles = () => {
|
|
|
1244
846
|
};
|
|
1245
847
|
};
|
|
1246
848
|
|
|
1247
|
-
function ownKeys$
|
|
1248
|
-
function _objectSpread$
|
|
849
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
850
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1249
851
|
var AllFeaturesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "AllFeatures" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allFeatures" }, 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: "reason" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 72, source: { body: "query AllFeatures {\n allFeatures {\n name\n value\n reason\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1250
852
|
// This value is hard-coded here because we want to make sure that the
|
|
1251
853
|
// app uses our account of LD. The value is meant to be public, so there
|
|
1252
854
|
// is no need to be concerned about security.
|
|
1253
855
|
const ldClientSideIdProduction = '5979d95f6040390cd07b5e01';
|
|
1254
|
-
function
|
|
856
|
+
function getUserContextForLaunchDarklyAdapter(user, projectKey) {
|
|
1255
857
|
var _user$launchdarklyTra, _user$launchdarklyTra2, _user$launchdarklyTra3, _user$launchdarklyTra4, _user$launchdarklyTra5;
|
|
1256
858
|
return {
|
|
859
|
+
kind: 'user',
|
|
860
|
+
key: user === null || user === void 0 ? void 0 : user.id,
|
|
1257
861
|
project: projectKey !== null && projectKey !== void 0 ? projectKey : '',
|
|
1258
862
|
id: (_user$launchdarklyTra = user === null || user === void 0 ? void 0 : user.launchdarklyTrackingId) !== null && _user$launchdarklyTra !== void 0 ? _user$launchdarklyTra : '',
|
|
1259
863
|
team: (_user$launchdarklyTra2 = user === null || user === void 0 ? void 0 : user.launchdarklyTrackingTeam) !== null && _user$launchdarklyTra2 !== void 0 ? _user$launchdarklyTra2 : [],
|
|
@@ -1273,7 +877,7 @@ const SetupFlopFlipProvider = props => {
|
|
|
1273
877
|
const apolloClient = react$2.useApolloClient();
|
|
1274
878
|
const enableLongLivedFeatureFlags = applicationShellConnectors.useApplicationContext(context => context.environment.enableLongLivedFeatureFlags);
|
|
1275
879
|
const allMenuFeatureToggles = useAllMenuFeatureToggles();
|
|
1276
|
-
const flags = react.useMemo(() => _objectSpread$
|
|
880
|
+
const flags = react.useMemo(() => _objectSpread$6(_objectSpread$6(_objectSpread$6({}, FLAGS), allMenuFeatureToggles.allFeatureToggles), _flagsInstanceProperty__default["default"](props)), [allMenuFeatureToggles.allFeatureToggles, _flagsInstanceProperty__default["default"](props)]);
|
|
1277
881
|
react.useMemo(() => {
|
|
1278
882
|
if (enableLongLivedFeatureFlags) {
|
|
1279
883
|
combineAdapters__default["default"].combine([ldAdapter__default["default"], httpAdapter__default["default"]]);
|
|
@@ -1281,9 +885,9 @@ const SetupFlopFlipProvider = props => {
|
|
|
1281
885
|
combineAdapters__default["default"].combine([ldAdapter__default["default"]]);
|
|
1282
886
|
}
|
|
1283
887
|
}, [enableLongLivedFeatureFlags]);
|
|
1284
|
-
const defaultFlags = react.useMemo(() => _objectSpread$
|
|
888
|
+
const defaultFlags = react.useMemo(() => _objectSpread$6(_objectSpread$6(_objectSpread$6({}, FLAGS), allMenuFeatureToggles.allFeatureToggles), props.defaultFlags), [allMenuFeatureToggles.allFeatureToggles, props.defaultFlags]);
|
|
1285
889
|
const adapterArgs = react.useMemo(() => {
|
|
1286
|
-
var _props$user, _props$ldClientSideId, _props$user2
|
|
890
|
+
var _props$user, _props$ldClientSideId, _props$user2;
|
|
1287
891
|
return {
|
|
1288
892
|
user: {
|
|
1289
893
|
key: (_props$user = props.user) === null || _props$user === void 0 ? void 0 : _props$user.id
|
|
@@ -1296,14 +900,11 @@ const SetupFlopFlipProvider = props => {
|
|
|
1296
900
|
clientSideId: (_props$ldClientSideId = props.ldClientSideId) !== null && _props$ldClientSideId !== void 0 ? _props$ldClientSideId : ldClientSideIdProduction
|
|
1297
901
|
},
|
|
1298
902
|
flags,
|
|
1299
|
-
|
|
1300
|
-
key: (_props$user2 = props.user) === null || _props$user2 === void 0 ? void 0 : _props$user2.id,
|
|
1301
|
-
custom: getUserCustomFieldsForLaunchDarklyAdapter(props.user, props.projectKey)
|
|
1302
|
-
}
|
|
903
|
+
context: getUserContextForLaunchDarklyAdapter(props.user, props.projectKey)
|
|
1303
904
|
},
|
|
1304
905
|
http: {
|
|
1305
906
|
user: {
|
|
1306
|
-
key: (_props$
|
|
907
|
+
key: (_props$user2 = props.user) === null || _props$user2 === void 0 ? void 0 : _props$user2.id
|
|
1307
908
|
},
|
|
1308
909
|
execute: async function () {
|
|
1309
910
|
const response = await apolloClient.query({
|
|
@@ -1338,10 +939,23 @@ const ThemeSwitcher = () => {
|
|
|
1338
939
|
});
|
|
1339
940
|
};
|
|
1340
941
|
|
|
1341
|
-
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-
|
|
942
|
+
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-e1338396.cjs.prod.js' /* webpackChunkName: "version-tracker" */); }));
|
|
1342
943
|
|
|
1343
|
-
|
|
1344
|
-
|
|
944
|
+
// TODO: Remove this file once the new navigation is enabled for all users
|
|
945
|
+
const NewMainNavigationFlagWrapper = props => {
|
|
946
|
+
const isNewNavigationEnabled = reactBroadcast.useFeatureToggle(MAIN_NAVIGATION);
|
|
947
|
+
const _useAdapterStatus = reactBroadcast.useAdapterStatus({
|
|
948
|
+
adapterIdentifiers: [types.adapterIdentifiers.launchdarkly]
|
|
949
|
+
}),
|
|
950
|
+
isReady = _useAdapterStatus.isReady;
|
|
951
|
+
return props.children({
|
|
952
|
+
isNewNavigationEnabled,
|
|
953
|
+
isNewNavigationEnabledEvaluationReady: isReady
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
958
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1345
959
|
const getHasUnauthorizedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => gqlError.extensions && gqlError.extensions.code && gqlError.extensions.code === 'UNAUTHENTICATED');
|
|
1346
960
|
const getHasUserBeenDeletedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => {
|
|
1347
961
|
var _context;
|
|
@@ -1351,10 +965,7 @@ const getHasUserBeenDeletedError = graphQLErrors => _findInstanceProperty__defau
|
|
|
1351
965
|
});
|
|
1352
966
|
const MainContainer = /*#__PURE__*/_styled__default["default"]("main", {
|
|
1353
967
|
target: "esrtekc0"
|
|
1354
|
-
} )(
|
|
1355
|
-
name: "1rdshd",
|
|
1356
|
-
styles: "grid-column:2;grid-row:3;min-width:0;overflow-x:hidden;overflow-y:scroll;display:flex;flex-direction:column;position:relative"
|
|
1357
|
-
} );
|
|
968
|
+
} )(props => props.isNewNavigationEnabled ? "\n grid-column: 2/3;\n grid-row: 3/4;\n " : "\n grid-column: 2;\n grid-row: 3;\n ", ";min-width:0;overflow-x:hidden;overflow-y:scroll;display:flex;flex-direction:column;position:relative;" + ("" ));
|
|
1358
969
|
|
|
1359
970
|
/**
|
|
1360
971
|
* This component is rendered whenever the user is considered "authenticated"
|
|
@@ -1365,14 +976,6 @@ var _ref = {
|
|
|
1365
976
|
styles: "flex-grow:1;display:flex;flex-direction:column;position:relative;>*:not(:first-of-type){flex-grow:1;display:flex;flex-direction:column;}"
|
|
1366
977
|
} ;
|
|
1367
978
|
var _ref2 = {
|
|
1368
|
-
name: "14w5yo3",
|
|
1369
|
-
styles: "position:relative;grid-row:3;display:flex;flex-direction:column"
|
|
1370
|
-
} ;
|
|
1371
|
-
var _ref3 = {
|
|
1372
|
-
name: "fqjitq",
|
|
1373
|
-
styles: "grid-row:2;grid-column:1/3"
|
|
1374
|
-
} ;
|
|
1375
|
-
var _ref4 = {
|
|
1376
979
|
name: "8bdwu0",
|
|
1377
980
|
styles: "grid-row:1;grid-column:1/3"
|
|
1378
981
|
} ;
|
|
@@ -1391,10 +994,10 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1391
994
|
notificationsPageRef
|
|
1392
995
|
});
|
|
1393
996
|
return jsxRuntime.jsx(FetchUser, {
|
|
1394
|
-
children:
|
|
1395
|
-
let isLoadingUser =
|
|
1396
|
-
user =
|
|
1397
|
-
error =
|
|
997
|
+
children: _ref3 => {
|
|
998
|
+
let isLoadingUser = _ref3.isLoading,
|
|
999
|
+
user = _ref3.user,
|
|
1000
|
+
error = _ref3.error;
|
|
1398
1001
|
if (error) {
|
|
1399
1002
|
// In case there is an unauthorized error, we redirect to the login page
|
|
1400
1003
|
if (error.graphQLErrors && _Array$isArray__default["default"](error.graphQLErrors)) {
|
|
@@ -1414,9 +1017,9 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1414
1017
|
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1415
1018
|
locale: userLocale,
|
|
1416
1019
|
applicationMessages: props.applicationMessages,
|
|
1417
|
-
children:
|
|
1418
|
-
let locale =
|
|
1419
|
-
messages =
|
|
1020
|
+
children: _ref4 => {
|
|
1021
|
+
let locale = _ref4.locale,
|
|
1022
|
+
messages = _ref4.messages;
|
|
1420
1023
|
sentry.reportErrorToSentry(error, {});
|
|
1421
1024
|
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
1422
1025
|
locale: locale,
|
|
@@ -1433,14 +1036,14 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1433
1036
|
children: jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1434
1037
|
locale: user === null || user === void 0 ? void 0 : user.language,
|
|
1435
1038
|
applicationMessages: props.applicationMessages,
|
|
1436
|
-
children:
|
|
1437
|
-
let isLoadingLocaleData =
|
|
1438
|
-
locale =
|
|
1439
|
-
messages =
|
|
1039
|
+
children: _ref5 => {
|
|
1040
|
+
let isLoadingLocaleData = _ref5.isLoading,
|
|
1041
|
+
locale = _ref5.locale,
|
|
1042
|
+
messages = _ref5.messages;
|
|
1440
1043
|
return jsxRuntime.jsx(ConfigureIntlProvider
|
|
1441
1044
|
// We do not want to pass the language as long as the locale data
|
|
1442
1045
|
// is not loaded.
|
|
1443
|
-
, _objectSpread$
|
|
1046
|
+
, _objectSpread$5(_objectSpread$5({}, isLoadingLocaleData ? {} : {
|
|
1444
1047
|
locale,
|
|
1445
1048
|
messages
|
|
1446
1049
|
}), {}, {
|
|
@@ -1450,180 +1053,189 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1450
1053
|
ldClientSideId: applicationEnvironment.ldClientSideId,
|
|
1451
1054
|
flags: props.featureFlags,
|
|
1452
1055
|
defaultFlags: props.defaultFeatureFlags,
|
|
1453
|
-
children: jsxRuntime.
|
|
1454
|
-
children:
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
children:
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1056
|
+
children: jsxRuntime.jsx(NewMainNavigationFlagWrapper, {
|
|
1057
|
+
children: _ref6 => {
|
|
1058
|
+
let isNewNavigationEnabled = _ref6.isNewNavigationEnabled,
|
|
1059
|
+
isNewNavigationEnabledEvaluationReady = _ref6.isNewNavigationEnabledEvaluationReady;
|
|
1060
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1061
|
+
children: [jsxRuntime.jsx(ThemeSwitcher, {}), jsxRuntime.jsx(VersionTracker, {}), jsxRuntime.jsx(RequestsInFlightLoader, {}), jsxRuntime.jsx(sentry.SentryUserTracker, {
|
|
1062
|
+
user: user !== null && user !== void 0 ? user : undefined
|
|
1063
|
+
}), jsxRuntime.jsxs("div", {
|
|
1064
|
+
css: /*#__PURE__*/react$1.css("height:100vh;display:grid;grid-template-rows:auto ", constants.DIMENSIONS.header, " 1fr;grid-template-columns:minmax(", constants.DIMENSIONS.navMenu, ", auto) 1fr;" + ("" ), "" ),
|
|
1065
|
+
children: [jsxRuntime.jsxs("div", {
|
|
1066
|
+
ref: notificationsGlobalRef,
|
|
1067
|
+
role: "region",
|
|
1068
|
+
"aria-live": "polite",
|
|
1069
|
+
css: _ref2,
|
|
1070
|
+
children: [jsxRuntime.jsx("div", {
|
|
1071
|
+
id: "above-top-navigation"
|
|
1072
|
+
}), jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1073
|
+
domain: constants$1.DOMAINS.GLOBAL
|
|
1074
|
+
})]
|
|
1075
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1076
|
+
children: () => {
|
|
1077
|
+
if (!projectKeyFromUrl) return jsxRuntime.jsx(QuickAccessTrigger, {});
|
|
1078
|
+
return jsxRuntime.jsx(FetchProject, {
|
|
1079
|
+
projectKey: projectKeyFromUrl,
|
|
1080
|
+
children: _ref7 => {
|
|
1081
|
+
let isProjectLoading = _ref7.isLoading,
|
|
1082
|
+
project = _ref7.project;
|
|
1083
|
+
if (isProjectLoading || !project) return null;
|
|
1084
|
+
|
|
1085
|
+
// when used outside of a project context,
|
|
1086
|
+
// or when the project is expired or supsended
|
|
1087
|
+
const shouldUseProjectContext = !(project.suspension && project.suspension.isActive || project.expiry && project.expiry.isActive);
|
|
1088
|
+
if (!shouldUseProjectContext) return jsxRuntime.jsx(QuickAccessTrigger, {});
|
|
1089
|
+
return jsxRuntime.jsx(ProjectDataLocale, {
|
|
1090
|
+
locales: project.languages,
|
|
1091
|
+
children: _ref8 => {
|
|
1092
|
+
let dataLocale = _ref8.locale,
|
|
1093
|
+
setProjectDataLocale = _ref8.setProjectDataLocale;
|
|
1094
|
+
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1095
|
+
user: user,
|
|
1096
|
+
project: project,
|
|
1097
|
+
projectDataLocale: dataLocale,
|
|
1098
|
+
environment: applicationEnvironment,
|
|
1099
|
+
children: jsxRuntime.jsx(QuickAccessTrigger, {
|
|
1100
|
+
onChangeProjectDataLocale: setProjectDataLocale
|
|
1101
|
+
})
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
}), jsxRuntime.jsx("header", {
|
|
1109
|
+
css: /*#__PURE__*/react$1.css("grid-row:", isNewNavigationEnabled ? '2/3' : '2', ";grid-column:", isNewNavigationEnabled ? '2/3' : '1/3', ";" + ("" ), "" ),
|
|
1110
|
+
children: jsxRuntime.jsx(AppBar, {
|
|
1111
|
+
user: user,
|
|
1112
|
+
projectKeyFromUrl: projectKeyFromUrl
|
|
1113
|
+
})
|
|
1114
|
+
}), jsxRuntime.jsx("aside", {
|
|
1115
|
+
css: /*#__PURE__*/react$1.css(isNewNavigationEnabled === false && "position: relative;\n grid-row: 3;\n display: flex;\n flex-direction: column;", " ", isNewNavigationEnabled === true && "grid-column: 1/2;\n grid-row: 2/4;\n overflow: hidden;", ";" + ("" ), "" ),
|
|
1116
|
+
children: (() => {
|
|
1117
|
+
// The <NavBar> should only be rendered within a project
|
|
1118
|
+
// context, therefore when there is a `projectKey`.
|
|
1119
|
+
// If there is no `projectKey` in the URL (e.g. `/account`
|
|
1120
|
+
// routes), we don't render it.
|
|
1121
|
+
// NOTE: we also "cache" the `projectKey` in localStorage
|
|
1122
|
+
// but this should only be used to "re-hydrate" the URL
|
|
1123
|
+
// location (e.g when you go to `/`, there should be a
|
|
1124
|
+
// redirect to `/:projectKey`). Therefore, we should not
|
|
1125
|
+
// rely on the value in localStorage to determine which
|
|
1126
|
+
// `projectKey` is currently used.
|
|
1127
|
+
if (!projectKeyFromUrl) return null;
|
|
1128
|
+
return jsxRuntime.jsx(FetchProject, {
|
|
1129
|
+
projectKey: projectKeyFromUrl,
|
|
1484
1130
|
children: _ref9 => {
|
|
1485
|
-
let
|
|
1486
|
-
|
|
1131
|
+
let isLoadingProject = _ref9.isLoading,
|
|
1132
|
+
project = _ref9.project;
|
|
1133
|
+
const isLoading = isLoadingUser || isLoadingLocaleData || isLoadingProject || !locale || !project;
|
|
1487
1134
|
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1488
1135
|
user: user,
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1136
|
+
environment: applicationEnvironment
|
|
1137
|
+
// NOTE: do not pass the `project` into the application context.
|
|
1138
|
+
// The permissions for the Navbar are resolved separately, within
|
|
1139
|
+
// a different React context.
|
|
1140
|
+
,
|
|
1141
|
+
children: jsxRuntime.jsx(Navbar, {
|
|
1142
|
+
applicationLocale: locale,
|
|
1143
|
+
projectKey: projectKeyFromUrl,
|
|
1144
|
+
project: project,
|
|
1145
|
+
environment: applicationEnvironment,
|
|
1146
|
+
onMenuItemClick: props.onMenuItemClick,
|
|
1147
|
+
isLoading: isLoading,
|
|
1148
|
+
isNewNavigationEnabled: isNewNavigationEnabled,
|
|
1149
|
+
isNewNavigationEnabledEvaluationReady: isNewNavigationEnabledEvaluationReady
|
|
1494
1150
|
})
|
|
1495
1151
|
});
|
|
1496
1152
|
}
|
|
1497
1153
|
});
|
|
1498
|
-
}
|
|
1499
|
-
})
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
// The <NavBar> should only be rendered within a project
|
|
1511
|
-
// context, therefore when there is a `projectKey`.
|
|
1512
|
-
// If there is no `projectKey` in the URL (e.g. `/account`
|
|
1513
|
-
// routes), we don't render it.
|
|
1514
|
-
// NOTE: we also "cache" the `projectKey` in localStorage
|
|
1515
|
-
// but this should only be used to "re-hydrate" the URL
|
|
1516
|
-
// location (e.g when you go to `/`, there should be a
|
|
1517
|
-
// redirect to `/:projectKey`). Therefore, we should not
|
|
1518
|
-
// rely on the value in localStorage to determine which
|
|
1519
|
-
// `projectKey` is currently used.
|
|
1520
|
-
if (!projectKeyFromUrl) return null;
|
|
1521
|
-
return jsxRuntime.jsx(FetchProject, {
|
|
1522
|
-
projectKey: projectKeyFromUrl,
|
|
1523
|
-
children: _ref10 => {
|
|
1524
|
-
let isLoadingProject = _ref10.isLoading,
|
|
1525
|
-
project = _ref10.project;
|
|
1526
|
-
// Render the loading navbar as long as all the data
|
|
1527
|
-
// hasn't been loaded, or if the project does not exist.
|
|
1528
|
-
if (isLoadingUser || isLoadingLocaleData || isLoadingProject || !locale || !project) return jsxRuntime.jsx(LoadingNavBar, {});
|
|
1529
|
-
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1530
|
-
user: user,
|
|
1531
|
-
environment: applicationEnvironment
|
|
1532
|
-
// NOTE: do not pass the `project` into the application context.
|
|
1533
|
-
// The permissions for the Navbar are resolved separately, within
|
|
1534
|
-
// a different React context.
|
|
1535
|
-
,
|
|
1536
|
-
children: jsxRuntime.jsx(Navbar, {
|
|
1537
|
-
applicationLocale: locale,
|
|
1538
|
-
projectKey: projectKeyFromUrl,
|
|
1539
|
-
project: project,
|
|
1540
|
-
environment: applicationEnvironment,
|
|
1541
|
-
onMenuItemClick: props.onMenuItemClick
|
|
1542
|
-
})
|
|
1543
|
-
});
|
|
1544
|
-
}
|
|
1545
|
-
});
|
|
1546
|
-
})()
|
|
1547
|
-
}), isLoadingUser || isLoadingLocaleData ? jsxRuntime.jsx(MainContainer, {
|
|
1548
|
-
role: "main",
|
|
1549
|
-
children: jsxRuntime.jsx(ApplicationLoader, {})
|
|
1550
|
-
}) : jsxRuntime.jsxs(MainContainer, {
|
|
1551
|
-
role: "main",
|
|
1552
|
-
children: [jsxRuntime.jsx("div", {
|
|
1553
|
-
ref: notificationsPageRef,
|
|
1554
|
-
children: jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1555
|
-
domain: constants$1.DOMAINS.PAGE
|
|
1556
|
-
})
|
|
1557
|
-
}), jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1558
|
-
domain: constants$1.DOMAINS.SIDE
|
|
1559
|
-
}), jsxRuntime.jsxs("div", {
|
|
1560
|
-
css: _ref,
|
|
1561
|
-
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1562
|
-
// @ts-ignore
|
|
1563
|
-
, {
|
|
1564
|
-
ref: layoutRefs,
|
|
1565
|
-
offsetTop: constants.DIMENSIONS.header,
|
|
1566
|
-
offsetLeft: projectKeyFromUrl ? constants.DIMENSIONS.navMenu : '0px',
|
|
1567
|
-
offsetLeftOnExpandedMenu: projectKeyFromUrl ? constants.DIMENSIONS.navMenuExpanded : '0px'
|
|
1568
|
-
}), jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
1569
|
-
children: [jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
1570
|
-
from: "/profile",
|
|
1571
|
-
to: "/account/profile"
|
|
1572
|
-
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1573
|
-
path: "/account",
|
|
1574
|
-
children:
|
|
1575
|
-
/**
|
|
1576
|
-
* In case the AppShell uses the `render` function, we assume it's one of two cases:
|
|
1577
|
-
* 1. The application does not use `children` and therefore implements the routes including
|
|
1578
|
-
* the <RouteCatchAll> (this is the "legacy" behavior).
|
|
1579
|
-
* 2. It's the account application, which always uses `render` and therefore should render as normal.
|
|
1580
|
-
*
|
|
1581
|
-
* In case the AppShell uses the `children` function, we can always assume that
|
|
1582
|
-
* it's a normal Custom Application and that it should trigger a force reload.
|
|
1583
|
-
*/
|
|
1584
|
-
props.render ? jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1585
|
-
children: props.render()
|
|
1586
|
-
}) : jsxRuntime.jsx(configureApollo.RouteCatchAll, {})
|
|
1587
|
-
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1588
|
-
exact: true,
|
|
1589
|
-
path: "/",
|
|
1590
|
-
children: (() => {
|
|
1591
|
-
var _user$defaultProjectK;
|
|
1592
|
-
const previousProjectKey = getPreviousProjectKey((_user$defaultProjectK = user === null || user === void 0 ? void 0 : user.defaultProjectKey) !== null && _user$defaultProjectK !== void 0 ? _user$defaultProjectK : undefined);
|
|
1593
|
-
|
|
1594
|
-
/**
|
|
1595
|
-
* NOTE:
|
|
1596
|
-
* Given the user has not been loaded a loading spinner is shown.
|
|
1597
|
-
* Given the user was not working on a project previously nor has a default
|
|
1598
|
-
* project, the user will be prompted to create one.
|
|
1599
|
-
* Given the user was working on a project previously or has a default
|
|
1600
|
-
* project, the application will redirect to that project.
|
|
1601
|
-
*/
|
|
1602
|
-
if (!user) return jsxRuntime.jsx(ApplicationLoader, {});
|
|
1603
|
-
if (!previousProjectKey) return jsxRuntime.jsx(RedirectToProjectCreate, {});
|
|
1604
|
-
return jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
1605
|
-
to: "/".concat(previousProjectKey)
|
|
1606
|
-
});
|
|
1607
|
-
})()
|
|
1608
|
-
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1609
|
-
exact: false,
|
|
1610
|
-
path: "/:projectKey",
|
|
1611
|
-
children: jsxRuntime.jsx(ProjectContainer, {
|
|
1612
|
-
user: user,
|
|
1613
|
-
environment: applicationEnvironment,
|
|
1614
|
-
disableRoutePermissionCheck: props.disableRoutePermissionCheck
|
|
1615
|
-
// This effectively renders the
|
|
1616
|
-
// children, which is the application
|
|
1617
|
-
// specific part
|
|
1618
|
-
,
|
|
1619
|
-
render: props.render,
|
|
1620
|
-
children: props.children
|
|
1154
|
+
})()
|
|
1155
|
+
}), isLoadingUser || isLoadingLocaleData ? jsxRuntime.jsx(MainContainer, {
|
|
1156
|
+
isNewNavigationEnabled: isNewNavigationEnabled,
|
|
1157
|
+
role: "main",
|
|
1158
|
+
children: jsxRuntime.jsx(ApplicationLoader, {})
|
|
1159
|
+
}) : jsxRuntime.jsxs(MainContainer, {
|
|
1160
|
+
isNewNavigationEnabled: isNewNavigationEnabled,
|
|
1161
|
+
role: "main",
|
|
1162
|
+
children: [jsxRuntime.jsx("div", {
|
|
1163
|
+
ref: notificationsPageRef,
|
|
1164
|
+
children: jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1165
|
+
domain: constants$1.DOMAINS.PAGE
|
|
1621
1166
|
})
|
|
1167
|
+
}), jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1168
|
+
domain: constants$1.DOMAINS.SIDE
|
|
1169
|
+
}), jsxRuntime.jsxs("div", {
|
|
1170
|
+
css: _ref,
|
|
1171
|
+
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1172
|
+
// @ts-ignore
|
|
1173
|
+
, {
|
|
1174
|
+
ref: layoutRefs,
|
|
1175
|
+
offsetTop: constants.DIMENSIONS.header,
|
|
1176
|
+
offsetLeft: projectKeyFromUrl ? constants.DIMENSIONS.navMenu : '0px',
|
|
1177
|
+
offsetLeftOnExpandedMenu: projectKeyFromUrl ? constants.DIMENSIONS.navMenuExpanded : '0px'
|
|
1178
|
+
}), jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
1179
|
+
children: [jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
1180
|
+
from: "/profile",
|
|
1181
|
+
to: "/account/profile"
|
|
1182
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1183
|
+
path: "/account",
|
|
1184
|
+
children:
|
|
1185
|
+
/**
|
|
1186
|
+
* In case the AppShell uses the `render` function, we assume it's one of two cases:
|
|
1187
|
+
* 1. The application does not use `children` and therefore implements the routes including
|
|
1188
|
+
* the <RouteCatchAll> (this is the "legacy" behavior).
|
|
1189
|
+
* 2. It's the account application, which always uses `render` and therefore should render as normal.
|
|
1190
|
+
*
|
|
1191
|
+
* In case the AppShell uses the `children` function, we can always assume that
|
|
1192
|
+
* it's a normal Custom Application and that it should trigger a force reload.
|
|
1193
|
+
*/
|
|
1194
|
+
props.render ? jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1195
|
+
children: props.render()
|
|
1196
|
+
}) : jsxRuntime.jsx(configureApollo.RouteCatchAll, {})
|
|
1197
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1198
|
+
exact: true,
|
|
1199
|
+
path: "/",
|
|
1200
|
+
children: (() => {
|
|
1201
|
+
var _user$defaultProjectK;
|
|
1202
|
+
const previousProjectKey = getPreviousProjectKey((_user$defaultProjectK = user === null || user === void 0 ? void 0 : user.defaultProjectKey) !== null && _user$defaultProjectK !== void 0 ? _user$defaultProjectK : undefined);
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* NOTE:
|
|
1206
|
+
* Given the user has not been loaded a loading spinner is shown.
|
|
1207
|
+
* Given the user was not working on a project previously nor has a default
|
|
1208
|
+
* project, the user will be prompted to create one.
|
|
1209
|
+
* Given the user was working on a project previously or has a default
|
|
1210
|
+
* project, the application will redirect to that project.
|
|
1211
|
+
*/
|
|
1212
|
+
if (!user) return jsxRuntime.jsx(ApplicationLoader, {});
|
|
1213
|
+
if (!previousProjectKey) return jsxRuntime.jsx(RedirectToProjectCreate, {});
|
|
1214
|
+
return jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
1215
|
+
to: "/".concat(previousProjectKey)
|
|
1216
|
+
});
|
|
1217
|
+
})()
|
|
1218
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1219
|
+
exact: false,
|
|
1220
|
+
path: "/:projectKey",
|
|
1221
|
+
children: jsxRuntime.jsx(ProjectContainer, {
|
|
1222
|
+
user: user,
|
|
1223
|
+
environment: applicationEnvironment,
|
|
1224
|
+
disableRoutePermissionCheck: props.disableRoutePermissionCheck
|
|
1225
|
+
// This effectively renders the
|
|
1226
|
+
// children, which is the application
|
|
1227
|
+
// specific part
|
|
1228
|
+
,
|
|
1229
|
+
render: props.render,
|
|
1230
|
+
children: props.children
|
|
1231
|
+
})
|
|
1232
|
+
})]
|
|
1233
|
+
})]
|
|
1622
1234
|
})]
|
|
1623
1235
|
})]
|
|
1624
1236
|
})]
|
|
1625
|
-
})
|
|
1626
|
-
}
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1627
1239
|
})
|
|
1628
1240
|
})
|
|
1629
1241
|
}));
|
|
@@ -1671,9 +1283,9 @@ ApplicationPageTitle.propTypes = {
|
|
|
1671
1283
|
ApplicationPageTitle.displayName = 'ApplicationPageTitle';
|
|
1672
1284
|
ApplicationPageTitle.defaultProps = defaultProps$1;
|
|
1673
1285
|
|
|
1674
|
-
function ownKeys$
|
|
1675
|
-
function _objectSpread$
|
|
1676
|
-
const SuspendedRoute = props => jsxRuntime.jsx(reactRouterDom.Route, _objectSpread$
|
|
1286
|
+
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1287
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1288
|
+
const SuspendedRoute = props => jsxRuntime.jsx(reactRouterDom.Route, _objectSpread$4(_objectSpread$4({}, props), {}, {
|
|
1677
1289
|
children: jsxRuntime.jsx(react.Suspense, {
|
|
1678
1290
|
fallback: jsxRuntime.jsx(LoadingSpinner__default["default"], {}),
|
|
1679
1291
|
children: props.children
|
|
@@ -1809,10 +1421,10 @@ const hasCachedAuthenticationState = () => {
|
|
|
1809
1421
|
return window.localStorage.getItem(constants.STORAGE_KEYS.IS_AUTHENTICATED) === 'true';
|
|
1810
1422
|
};
|
|
1811
1423
|
|
|
1812
|
-
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-
|
|
1424
|
+
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-a6503499.cjs.prod.js' /* webpackChunkName: "oidc-callback" */); }));
|
|
1813
1425
|
|
|
1814
|
-
function ownKeys$
|
|
1815
|
-
function _objectSpread$
|
|
1426
|
+
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1427
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1816
1428
|
const Authenticated = props => {
|
|
1817
1429
|
var _window$app$__DEVELOP, _window$app$__DEVELOP2;
|
|
1818
1430
|
// We attempt to see if the user was already authenticated by looking
|
|
@@ -1837,7 +1449,7 @@ const Authenticated = props => {
|
|
|
1837
1449
|
}
|
|
1838
1450
|
|
|
1839
1451
|
// Fall back to check for cookie-based authentication.
|
|
1840
|
-
return jsxRuntime.jsx(AmILoggedIn, _objectSpread$
|
|
1452
|
+
return jsxRuntime.jsx(AmILoggedIn, _objectSpread$3({}, props));
|
|
1841
1453
|
};
|
|
1842
1454
|
Authenticated.displayName = 'Authenticated';
|
|
1843
1455
|
const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
@@ -1854,13 +1466,13 @@ const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
|
1854
1466
|
applicationMessages: props.applicationMessages
|
|
1855
1467
|
})
|
|
1856
1468
|
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1857
|
-
children: jsxRuntime.jsx(Authenticated, _objectSpread$
|
|
1469
|
+
children: jsxRuntime.jsx(Authenticated, _objectSpread$3({}, props))
|
|
1858
1470
|
})]
|
|
1859
1471
|
});
|
|
1860
1472
|
AuthenticationRoutes.displayName = 'AuthenticationRoutes';
|
|
1861
1473
|
|
|
1862
|
-
function ownKeys$
|
|
1863
|
-
function _objectSpread$
|
|
1474
|
+
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1475
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$2(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1864
1476
|
/**
|
|
1865
1477
|
* NOTE:
|
|
1866
1478
|
* This function try-catches around a `JSON.parse` and return
|
|
@@ -1893,7 +1505,7 @@ const shallowlyCoerceValues = uncoercedEnvironmentValues => {
|
|
|
1893
1505
|
var _context;
|
|
1894
1506
|
return _reduceInstanceProperty__default["default"](_context = _Object$keys__default["default"](uncoercedEnvironmentValues)).call(_context, (coercedEnvironmentValues, key) => {
|
|
1895
1507
|
const uncoercedEnvironmentValue = uncoercedEnvironmentValues[key];
|
|
1896
|
-
return _objectSpread$
|
|
1508
|
+
return _objectSpread$2(_objectSpread$2({}, coercedEnvironmentValues), {}, {
|
|
1897
1509
|
[key]: getCoerceEnvironmentValue(uncoercedEnvironmentValue)
|
|
1898
1510
|
});
|
|
1899
1511
|
}, {});
|
|
@@ -1959,7 +1571,7 @@ const ApplicationShellProvider = props => {
|
|
|
1959
1571
|
ApplicationShellProvider.propTypes = {};
|
|
1960
1572
|
ApplicationShellProvider.displayName = 'ApplicationShellProvider';
|
|
1961
1573
|
|
|
1962
|
-
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-
|
|
1574
|
+
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-d133b84f.cjs.prod.js' /* webpackChunkName: "redirect-to-login" */); }));
|
|
1963
1575
|
|
|
1964
1576
|
const styles = {
|
|
1965
1577
|
name: "1prreal",
|
|
@@ -2012,6 +1624,197 @@ ApplicationShell.propTypes = {};
|
|
|
2012
1624
|
ApplicationShell.displayName = 'ApplicationShell';
|
|
2013
1625
|
ApplicationShell.version = configureApollo.applicationShellVersion;
|
|
2014
1626
|
|
|
1627
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
1628
|
+
let TCustomViewStatus = /*#__PURE__*/function (TCustomViewStatus) {
|
|
1629
|
+
TCustomViewStatus["Draft"] = "DRAFT";
|
|
1630
|
+
TCustomViewStatus["PrivateUsage"] = "PRIVATE_USAGE";
|
|
1631
|
+
return TCustomViewStatus;
|
|
1632
|
+
}({});
|
|
1633
|
+
let TCustomViewType = /*#__PURE__*/function (TCustomViewType) {
|
|
1634
|
+
TCustomViewType["CustomPanel"] = "CustomPanel";
|
|
1635
|
+
return TCustomViewType;
|
|
1636
|
+
}({});
|
|
1637
|
+
|
|
1638
|
+
const CustomViewContext = /*#__PURE__*/react.createContext({
|
|
1639
|
+
config: {
|
|
1640
|
+
id: '',
|
|
1641
|
+
defaultLabel: '',
|
|
1642
|
+
labelAllLocales: {},
|
|
1643
|
+
url: '',
|
|
1644
|
+
type: TCustomViewType.CustomPanel,
|
|
1645
|
+
locators: [],
|
|
1646
|
+
permissions: [],
|
|
1647
|
+
createdAt: '',
|
|
1648
|
+
installedBy: [],
|
|
1649
|
+
owner: {
|
|
1650
|
+
createdAt: '',
|
|
1651
|
+
id: '',
|
|
1652
|
+
organizationId: '',
|
|
1653
|
+
updatedAt: ''
|
|
1654
|
+
},
|
|
1655
|
+
ownerId: '',
|
|
1656
|
+
status: TCustomViewStatus.Draft,
|
|
1657
|
+
updatedAt: ''
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
const CustomViewContextProvider = props => {
|
|
1661
|
+
const contextValue = react.useMemo(() => ({
|
|
1662
|
+
config: props.config
|
|
1663
|
+
}), [props.config]);
|
|
1664
|
+
return jsxRuntime.jsx(CustomViewContext.Provider, {
|
|
1665
|
+
value: contextValue,
|
|
1666
|
+
children: props.children
|
|
1667
|
+
});
|
|
1668
|
+
};
|
|
1669
|
+
CustomViewContextProvider.propTypes = {};
|
|
1670
|
+
const useCustomViewContext = () => {
|
|
1671
|
+
const context = react.useContext(CustomViewContext);
|
|
1672
|
+
if (!context) {
|
|
1673
|
+
throw new Error('useCustomViewContext must be used within a CustomViewContextProvider');
|
|
1674
|
+
}
|
|
1675
|
+
return context;
|
|
1676
|
+
};
|
|
1677
|
+
|
|
1678
|
+
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1679
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1680
|
+
function CustomViewShellAuthenticated(props) {
|
|
1681
|
+
const browserLocale = getBrowserLocale(window);
|
|
1682
|
+
return jsxRuntime.jsx(FetchUser, {
|
|
1683
|
+
children: _ref => {
|
|
1684
|
+
let isLoading = _ref.isLoading,
|
|
1685
|
+
fetchUserError = _ref.error,
|
|
1686
|
+
user = _ref.user;
|
|
1687
|
+
if (isLoading) {
|
|
1688
|
+
return jsxRuntime.jsx(ApplicationLoader, {});
|
|
1689
|
+
}
|
|
1690
|
+
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1691
|
+
locale: (user === null || user === void 0 ? void 0 : user.language) || browserLocale,
|
|
1692
|
+
applicationMessages: props.messages,
|
|
1693
|
+
children: _ref2 => {
|
|
1694
|
+
let isLoadingLocaleData = _ref2.isLoading,
|
|
1695
|
+
locale = _ref2.locale,
|
|
1696
|
+
messages = _ref2.messages;
|
|
1697
|
+
return jsxRuntime.jsx(ConfigureIntlProvider
|
|
1698
|
+
// We do not want to pass the language as long as the locale data
|
|
1699
|
+
// is not loaded.
|
|
1700
|
+
, _objectSpread$1(_objectSpread$1({}, isLoadingLocaleData ? {} : {
|
|
1701
|
+
locale,
|
|
1702
|
+
messages
|
|
1703
|
+
}), {}, {
|
|
1704
|
+
children: jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1705
|
+
user: user,
|
|
1706
|
+
environment: props.environment,
|
|
1707
|
+
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1708
|
+
children: [jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1709
|
+
theme: "default"
|
|
1710
|
+
}), !props.projectKey && props.children, Boolean(props.projectKey) && jsxRuntime.jsx(FetchProject, {
|
|
1711
|
+
projectKey: props.projectKey,
|
|
1712
|
+
children: _ref3 => {
|
|
1713
|
+
let isProjectLoading = _ref3.isLoading,
|
|
1714
|
+
project = _ref3.project;
|
|
1715
|
+
if (fetchUserError) {
|
|
1716
|
+
return jsxRuntime.jsx(applicationComponents.PageUnauthorized, {});
|
|
1717
|
+
}
|
|
1718
|
+
if (isProjectLoading) {
|
|
1719
|
+
return jsxRuntime.jsx(ApplicationLoader, {});
|
|
1720
|
+
}
|
|
1721
|
+
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1722
|
+
user: user,
|
|
1723
|
+
project: project,
|
|
1724
|
+
projectDataLocale: props.dataLocale,
|
|
1725
|
+
environment: props.environment,
|
|
1726
|
+
children: props.children
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
})]
|
|
1730
|
+
})
|
|
1731
|
+
})
|
|
1732
|
+
}));
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
CustomViewShellAuthenticated.propTypes = {};
|
|
1739
|
+
|
|
1740
|
+
const browserLocale = getBrowserLocale(window);
|
|
1741
|
+
function CustomViewShell(props) {
|
|
1742
|
+
const _useState = react.useState(),
|
|
1743
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1744
|
+
hostContext = _useState2[0],
|
|
1745
|
+
setHostContext = _useState2[1];
|
|
1746
|
+
const iFrameCommunicationPort = react.useRef();
|
|
1747
|
+
const hostMessageHandler = react.useCallback(event => {
|
|
1748
|
+
if (event.data.eventName === constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_INITIALIZATION) {
|
|
1749
|
+
setHostContext(event.data.eventData.context);
|
|
1750
|
+
} else {
|
|
1751
|
+
console.warn("CustomViewShell: Unknown received event with name: ".concat(event.data.eventName), {
|
|
1752
|
+
event
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
}, []);
|
|
1756
|
+
react.useEffect(() => {
|
|
1757
|
+
const bootstrapMessageHandler = event => {
|
|
1758
|
+
console.log('Custom view shell received message', {
|
|
1759
|
+
event
|
|
1760
|
+
});
|
|
1761
|
+
if (event.origin === window.location.origin && event.data === constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_BOOTSTRAP) {
|
|
1762
|
+
iFrameCommunicationPort.current = event.ports[0];
|
|
1763
|
+
iFrameCommunicationPort.current.onmessage = hostMessageHandler;
|
|
1764
|
+
// Once bootstraped, we don't want to listen for global messages anymore.
|
|
1765
|
+
// We will only listen to messages coming through the MessageChannel port.
|
|
1766
|
+
window.removeEventListener('message', bootstrapMessageHandler);
|
|
1767
|
+
} else {
|
|
1768
|
+
console.warn('CustomViewShell: Received an event that is not allowed.', {
|
|
1769
|
+
event
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
window.addEventListener('message', bootstrapMessageHandler);
|
|
1774
|
+
return () => {
|
|
1775
|
+
window.removeEventListener('message', bootstrapMessageHandler);
|
|
1776
|
+
};
|
|
1777
|
+
}, [hostMessageHandler]);
|
|
1778
|
+
if (!hostContext) {
|
|
1779
|
+
return jsxRuntime.jsx(ApplicationLoader, {
|
|
1780
|
+
showLogo: true
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
return jsxRuntime.jsx(ApplicationShellProvider, {
|
|
1784
|
+
environment: window.app,
|
|
1785
|
+
applicationMessages: props.messages,
|
|
1786
|
+
children: _ref => {
|
|
1787
|
+
let isAuthenticated = _ref.isAuthenticated;
|
|
1788
|
+
if (isAuthenticated) {
|
|
1789
|
+
return jsxRuntime.jsx(CustomViewContextProvider, {
|
|
1790
|
+
config: hostContext.customViewConfig,
|
|
1791
|
+
children: jsxRuntime.jsx(CustomViewShellAuthenticated, {
|
|
1792
|
+
dataLocale: hostContext.dataLocale,
|
|
1793
|
+
environment: window.app,
|
|
1794
|
+
messages: props.messages,
|
|
1795
|
+
projectKey: hostContext.projectKey,
|
|
1796
|
+
children: props.children
|
|
1797
|
+
})
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1801
|
+
locale: browserLocale,
|
|
1802
|
+
applicationMessages: props.messages,
|
|
1803
|
+
children: _ref2 => {
|
|
1804
|
+
let locale = _ref2.locale,
|
|
1805
|
+
messages = _ref2.messages;
|
|
1806
|
+
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
1807
|
+
locale: locale,
|
|
1808
|
+
messages: messages,
|
|
1809
|
+
children: jsxRuntime.jsx(applicationComponents.PageUnauthorized, {})
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
CustomViewShell.propTypes = {};
|
|
1817
|
+
|
|
2015
1818
|
const defaultProps = {
|
|
2016
1819
|
shouldCleanUpOnUnmount: true
|
|
2017
1820
|
};
|
|
@@ -2145,29 +1948,23 @@ exports.ApplicationShell = ApplicationShell;
|
|
|
2145
1948
|
exports.ApplicationShellProvider = ApplicationShellProvider;
|
|
2146
1949
|
exports.ButlerContainer = ButlerContainer;
|
|
2147
1950
|
exports.ConfigureIntlProvider = ConfigureIntlProvider;
|
|
1951
|
+
exports.CustomViewContextProvider = CustomViewContextProvider;
|
|
1952
|
+
exports.CustomViewShell = CustomViewShell;
|
|
2148
1953
|
exports.ErrorBoundary = ErrorBoundary;
|
|
2149
|
-
exports.Faded = Faded;
|
|
2150
1954
|
exports.FetchProject = FetchProject;
|
|
2151
|
-
exports.IconSwitcher = IconSwitcher;
|
|
2152
1955
|
exports.InjectReducers = InjectReducers;
|
|
2153
|
-
exports.
|
|
2154
|
-
exports.MenuGroup = MenuGroup;
|
|
2155
|
-
exports.MenuItem = MenuItem;
|
|
2156
|
-
exports.MenuItemDivider = MenuItemDivider;
|
|
2157
|
-
exports.MenuItemLink = MenuItemLink;
|
|
2158
|
-
exports.MenuLabel = MenuLabel;
|
|
2159
|
-
exports.NavBarLayout = NavBarLayout;
|
|
1956
|
+
exports.LoadingPlaceholder = LoadingPlaceholder;
|
|
2160
1957
|
exports.ProjectDataLocale = ProjectDataLocale;
|
|
2161
1958
|
exports.ProjectSwitcher = ProjectSwitcher;
|
|
2162
1959
|
exports.REQUESTS_IN_FLIGHT_LOADER_DOM_ID = REQUESTS_IN_FLIGHT_LOADER_DOM_ID;
|
|
2163
1960
|
exports.RedirectToLogin = RedirectToLogin;
|
|
2164
1961
|
exports.RedirectToProjectCreate = RedirectToProjectCreate;
|
|
2165
|
-
exports.RestrictedMenuItem = RestrictedMenuItem;
|
|
2166
1962
|
exports.SetupFlopFlipProvider = SetupFlopFlipProvider;
|
|
2167
1963
|
exports.SuspendedRoute = SuspendedRoute;
|
|
2168
1964
|
exports.createApolloContextForProxyForwardTo = createApolloContextForProxyForwardTo;
|
|
2169
1965
|
exports.pimIndexerStates = pimIndexerStates;
|
|
2170
1966
|
exports.setupGlobalErrorListener = setupGlobalErrorListener;
|
|
1967
|
+
exports.useCustomViewContext = useCustomViewContext;
|
|
2171
1968
|
exports.useMcLazyQuery = useMcLazyQuery;
|
|
2172
1969
|
exports.useMcMutation = useMcMutation;
|
|
2173
1970
|
exports.useMcQuery = useMcQuery;
|