@commercetools-frontend/application-shell 22.7.1 → 22.8.1
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-2bbea741.cjs.prod.js → application-entry-point-626484de.cjs.prod.js} +3 -3
- package/dist/{application-entry-point-6853f92e.cjs.dev.js → application-entry-point-a569b241.cjs.dev.js} +3 -3
- package/dist/{application-entry-point-97efa554.esm.js → application-entry-point-ef415ee0.esm.js} +3 -3
- package/dist/{box-e17daf6c.cjs.prod.js → box-09bf50e1.cjs.prod.js} +2 -2
- package/dist/{box-686bc950.cjs.dev.js → box-4857aa65.cjs.dev.js} +2 -2
- package/dist/{box-6ce924c9.esm.js → box-9cf180c1.esm.js} +2 -2
- package/dist/{cart-f2fc1baf.cjs.prod.js → cart-645074db.cjs.prod.js} +2 -2
- package/dist/{cart-796beed7.cjs.dev.js → cart-b0044279.cjs.dev.js} +2 -2
- package/dist/{cart-3b156a46.esm.js → cart-bb491ca1.esm.js} +2 -2
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +7 -7
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +7 -7
- package/dist/commercetools-frontend-application-shell.esm.js +5 -4
- package/dist/{configure-apollo-2077e9e6.cjs.prod.js → configure-apollo-1d9542ce.cjs.prod.js} +20 -19
- package/dist/{configure-apollo-8bcf9317.esm.js → configure-apollo-4ea93a0d.esm.js} +20 -19
- package/dist/{configure-apollo-99b8a3fe.cjs.dev.js → configure-apollo-bb20a723.cjs.dev.js} +20 -19
- package/dist/{connected-square-960e046b.cjs.prod.js → connected-square-2d046cb8.cjs.prod.js} +2 -2
- package/dist/{connected-square-961eb5b6.cjs.dev.js → connected-square-a2fea344.cjs.dev.js} +2 -2
- package/dist/{connected-square-f34a98ff.esm.js → connected-square-fe6a790f.esm.js} +2 -2
- package/dist/{constants-a09fbec1.esm.js → constants-0b9c2426.esm.js} +10 -2
- package/dist/{constants-a1140922.cjs.dev.js → constants-0da1db32.cjs.prod.js} +10 -1
- package/dist/{constants-ed10e935.cjs.prod.js → constants-bef5a843.cjs.dev.js} +10 -1
- package/dist/custom-view-dev-host-465bc1bd.esm.js +202 -0
- package/dist/custom-view-dev-host-e545cc88.cjs.dev.js +215 -0
- package/dist/declarations/src/components/app-bar/app-bar.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-dev-host/custom-view-dev-host.d.ts +11 -0
- package/dist/declarations/src/components/custom-view-dev-host/index.d.ts +6 -0
- package/dist/declarations/src/components/custom-view-loader/custom-view-loader.d.ts +8 -0
- package/dist/declarations/src/components/custom-view-loader/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-loader/messages.d.ts +7 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.d.ts +4 -4
- package/dist/declarations/src/components/custom-view-shell-authenticated/custom-view-shell-authenticated.d.ts +2 -1
- package/dist/declarations/src/components/navbar/index.d.ts +2 -98
- package/dist/declarations/src/components/navbar/navbar-new/compiled/navbar.css.json.d.ts +3 -0
- package/dist/declarations/src/components/navbar/navbar-new/menu-items.d.ts +102 -0
- package/dist/declarations/src/components/navbar/navbar-new/navbar.d.ts +48 -0
- package/dist/declarations/src/components/navbar/navbar-old/compiled/navbar.css.json.d.ts +3 -0
- package/dist/declarations/src/components/navbar/{menu-items.d.ts → navbar-old/menu-items.d.ts} +6 -6
- package/dist/declarations/src/components/navbar/navbar-old/navbar.d.ts +48 -0
- package/dist/declarations/src/components/navbar/navbar-old/navbar.styles.d.ts +7 -0
- package/dist/declarations/src/components/navbar/navbar.d.ts +4 -16
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +1 -0
- package/dist/declarations/src/components/project-container/index.d.ts +1 -19
- package/dist/declarations/src/constants.d.ts +8 -0
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/declarations/src/test-utils/custom-views-utils.d.ts +12 -0
- package/dist/declarations/src/test-utils/index.d.ts +1 -0
- package/dist/declarations/src/types/generated/ctp.d.ts +304 -3
- package/dist/declarations/src/types/generated/settings.d.ts +78 -2
- package/dist/{error-apologizer-e5c28e4c.esm.js → error-apologizer-76f087f4.esm.js} +2 -2
- package/dist/{error-apologizer-b3872f4d.cjs.prod.js → error-apologizer-84dc825c.cjs.prod.js} +2 -2
- package/dist/{error-apologizer-c3210e30.cjs.dev.js → error-apologizer-f6793491.cjs.dev.js} +2 -2
- package/dist/{gear-9b394c43.cjs.prod.js → gear-4f7cde98.cjs.prod.js} +2 -2
- package/dist/{gear-1f381738.esm.js → gear-ee90ba83.esm.js} +2 -2
- package/dist/{gear-ab1f6210.cjs.dev.js → gear-f2668579.cjs.dev.js} +2 -2
- package/dist/{heart-a6e7ccf9.cjs.dev.js → heart-01f01038.cjs.prod.js} +2 -2
- package/dist/{heart-be7c779b.esm.js → heart-86f780f3.esm.js} +2 -2
- package/dist/{heart-ebfab4cd.cjs.prod.js → heart-e49dd92a.cjs.dev.js} +2 -2
- package/dist/{index-975c5225.esm.js → index-0f6e5659.esm.js} +284 -157
- package/dist/{index-f85c276c.cjs.prod.js → index-9005b218.cjs.prod.js} +221 -127
- package/dist/{index-6c0bc333.cjs.dev.js → index-a98d4c9b.cjs.dev.js} +282 -156
- package/dist/{list-with-search-b5e9ae1b.cjs.dev.js → list-with-search-027ab8eb.cjs.dev.js} +2 -2
- package/dist/{list-with-search-e3ccba98.cjs.prod.js → list-with-search-6462447e.cjs.prod.js} +2 -2
- package/dist/{list-with-search-3341bbf7.esm.js → list-with-search-d2901e34.esm.js} +2 -2
- package/dist/navbar-06983ead.cjs.dev.js +2021 -0
- package/dist/navbar-12df9203.cjs.prod.js +1834 -0
- package/dist/navbar-6c7387f4.esm.js +1991 -0
- package/dist/{oidc-244125d3.cjs.dev.js → oidc-97f361cb.cjs.dev.js} +1 -1
- package/dist/{oidc-a780f067.cjs.prod.js → oidc-a55e3dd9.cjs.prod.js} +1 -1
- package/dist/{oidc-callback-80416189.cjs.dev.js → oidc-callback-ca83d92e.cjs.dev.js} +6 -5
- package/dist/{oidc-callback-7221e7d2.esm.js → oidc-callback-dbb7281d.esm.js} +6 -5
- package/dist/{oidc-callback-7c234583.cjs.prod.js → oidc-callback-ec82f402.cjs.prod.js} +6 -5
- package/dist/{oidc-c4e99cfc.esm.js → oidc-db881d40.esm.js} +1 -1
- package/dist/{paperclip-6f0b6ae5.cjs.prod.js → paperclip-005ec544.cjs.dev.js} +2 -2
- package/dist/{paperclip-c76aec52.esm.js → paperclip-a820ee87.esm.js} +2 -2
- package/dist/{paperclip-ec55e4a0.cjs.dev.js → paperclip-fe72a70d.cjs.prod.js} +2 -2
- package/dist/{plugin-16c01245.cjs.dev.js → plugin-81ae1044.cjs.prod.js} +2 -2
- package/dist/{plugin-279f88cd.esm.js → plugin-c7bf9e53.esm.js} +2 -2
- package/dist/{plugin-f199ed20.cjs.prod.js → plugin-feb22442.cjs.dev.js} +2 -2
- package/dist/{project-container-84c7881c.esm.js → project-container-95afa04d.esm.js} +11 -11
- package/dist/{project-container-c36e4793.cjs.dev.js → project-container-aa93d158.cjs.dev.js} +11 -11
- package/dist/{project-container-20379b3d.cjs.prod.js → project-container-b3e7cea1.cjs.prod.js} +11 -11
- package/dist/{project-expired-84871cc1.cjs.prod.js → project-expired-53e65d52.cjs.prod.js} +8 -7
- package/dist/{project-expired-6f9e5ff9.esm.js → project-expired-8ab9bf04.esm.js} +8 -7
- package/dist/{project-expired-fea5a2c6.cjs.dev.js → project-expired-bc80fb1d.cjs.dev.js} +8 -7
- package/dist/{project-not-found-763dcf53.esm.js → project-not-found-234f4ef8.esm.js} +8 -7
- package/dist/{project-not-found-e55553d5.cjs.prod.js → project-not-found-84b8e7ae.cjs.prod.js} +8 -7
- package/dist/{project-not-found-382b664d.cjs.dev.js → project-not-found-f38066da.cjs.dev.js} +8 -7
- package/dist/{project-not-initialized-aee7541a.cjs.dev.js → project-not-initialized-2c63ce3f.cjs.dev.js} +8 -7
- package/dist/{project-not-initialized-be040234.cjs.prod.js → project-not-initialized-5b34bfa0.cjs.prod.js} +8 -7
- package/dist/{project-not-initialized-8b3d52be.esm.js → project-not-initialized-e001de0a.esm.js} +8 -7
- package/dist/{project-suspended-02eb3c52.esm.js → project-suspended-5ab4e8a3.esm.js} +8 -7
- package/dist/{project-suspended-506c7b5f.cjs.dev.js → project-suspended-c9d40d91.cjs.dev.js} +8 -7
- package/dist/{project-suspended-2df71dad.cjs.prod.js → project-suspended-dfc1f03f.cjs.prod.js} +8 -7
- package/dist/{quick-access-bd5cc59f.cjs.prod.js → quick-access-16a5f759.cjs.prod.js} +7 -8
- package/dist/{quick-access-e474562c.esm.js → quick-access-5b7b7c66.esm.js} +7 -8
- package/dist/{quick-access-98ac50ec.cjs.dev.js → quick-access-82a8aac8.cjs.dev.js} +7 -8
- package/dist/{redirect-to-login-1e136a4f.cjs.dev.js → redirect-to-login-bd78dcb1.cjs.dev.js} +12 -12
- package/dist/{redirect-to-login-2b6962dd.esm.js → redirect-to-login-c6823c6b.esm.js} +12 -12
- package/dist/{redirect-to-login-cc23cd31.cjs.prod.js → redirect-to-login-f90fca22.cjs.prod.js} +12 -12
- package/dist/{redirect-to-logout-dd88770a.cjs.prod.js → redirect-to-logout-0e422d32.cjs.prod.js} +10 -9
- package/dist/{redirect-to-logout-47a5daea.esm.js → redirect-to-logout-a3c2ffce.esm.js} +10 -9
- package/dist/{redirect-to-logout-d6dce2e6.cjs.dev.js → redirect-to-logout-b8bad889.cjs.dev.js} +10 -9
- package/dist/{redirector-f71198cc.cjs.dev.js → redirector-5daa8baa.cjs.dev.js} +2 -2
- package/dist/{redirector-ec9fa17f.cjs.prod.js → redirector-752b4efc.cjs.prod.js} +2 -2
- package/dist/{redirector-368eeb0f.esm.js → redirector-db8b5cd2.esm.js} +2 -2
- package/dist/{requests-in-flight-loader-2b781c0e.esm.js → requests-in-flight-loader-58c3d23a.esm.js} +7 -6
- package/dist/{requests-in-flight-loader-84434d03.cjs.prod.js → requests-in-flight-loader-646bb870.cjs.prod.js} +7 -6
- package/dist/{requests-in-flight-loader-d908a6df.cjs.dev.js → requests-in-flight-loader-ac6ebc49.cjs.dev.js} +7 -6
- package/dist/{rocket-c6d44215.cjs.dev.js → rocket-3372731a.cjs.dev.js} +2 -2
- package/dist/{rocket-067c2f8c.esm.js → rocket-bacf24be.esm.js} +2 -2
- package/dist/{rocket-f0bfae34.cjs.prod.js → rocket-cb99be06.cjs.prod.js} +2 -2
- package/dist/{service-page-project-switcher-0546e7be.cjs.prod.js → service-page-project-switcher-1b91dcee.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-da4d68ce.esm.js → service-page-project-switcher-55aea85f.esm.js} +1 -1
- package/dist/{service-page-project-switcher-51ec5202.cjs.dev.js → service-page-project-switcher-b9825165.cjs.dev.js} +1 -1
- package/dist/{speedometer-0de260cf.cjs.prod.js → speedometer-26f52e73.cjs.prod.js} +2 -2
- package/dist/{speedometer-baa6ae82.esm.js → speedometer-4c8e0b9c.esm.js} +2 -2
- package/dist/{speedometer-aedd9660.cjs.dev.js → speedometer-c1ec5a1d.cjs.dev.js} +2 -2
- package/dist/{star-49745c72.cjs.dev.js → star-6b9a91d2.cjs.dev.js} +2 -2
- package/dist/{star-bd723a9c.esm.js → star-af90a9c6.esm.js} +2 -2
- package/dist/{star-c11b0683.cjs.prod.js → star-e4902bbb.cjs.prod.js} +2 -2
- package/dist/{tag-multi-2e7a68ec.cjs.dev.js → tag-multi-1c065f61.cjs.prod.js} +2 -2
- package/dist/{tag-multi-1dee8212.esm.js → tag-multi-4c2742de.esm.js} +2 -2
- package/dist/{tag-multi-f8d9c9e6.cjs.prod.js → tag-multi-abef3e15.cjs.dev.js} +2 -2
- package/dist/{tree-structure-690366f9.cjs.prod.js → tree-structure-3ec98cce.cjs.prod.js} +2 -2
- package/dist/{tree-structure-8c974c7a.cjs.dev.js → tree-structure-96ab0b7e.cjs.dev.js} +2 -2
- package/dist/{tree-structure-0a1dc6bf.esm.js → tree-structure-ca0498a0.esm.js} +2 -2
- package/dist/{use-applications-menu-1143a5ca.esm.js → use-applications-menu-26181355.esm.js} +3 -3
- package/dist/{use-applications-menu-5873c7ab.cjs.dev.js → use-applications-menu-901c46c2.cjs.dev.js} +3 -3
- package/dist/{use-applications-menu-08236536.cjs.prod.js → use-applications-menu-eb9a87c3.cjs.prod.js} +3 -3
- package/dist/{user-filled-58af1ae4.cjs.prod.js → user-filled-26f333b2.cjs.prod.js} +2 -2
- package/dist/{user-filled-5dd7a51a.cjs.dev.js → user-filled-34aeebcc.cjs.dev.js} +2 -2
- package/dist/{user-filled-d40a7e17.esm.js → user-filled-61d8a81b.esm.js} +2 -2
- package/dist/{user-settings-menu-986485b8.esm.js → user-settings-menu-25bb824e.esm.js} +9 -8
- package/dist/{user-settings-menu-6a7ff392.cjs.dev.js → user-settings-menu-5c43bde2.cjs.dev.js} +9 -8
- package/dist/{user-settings-menu-a724a9b9.cjs.prod.js → user-settings-menu-e342dd57.cjs.prod.js} +9 -8
- package/dist/{version-tracker-cba298d4.esm.js → version-tracker-1ae50f15.esm.js} +2 -2
- package/dist/{version-tracker-90a08689.cjs.dev.js → version-tracker-4ebb2a8d.cjs.dev.js} +2 -2
- package/dist/{version-tracker-3d9b5cf0.cjs.prod.js → version-tracker-5e0a77d0.cjs.prod.js} +2 -2
- package/dist/{world-bfd04f52.cjs.dev.js → world-22189397.cjs.prod.js} +2 -2
- package/dist/{world-f921d80c.cjs.prod.js → world-500baeb2.cjs.dev.js} +2 -2
- package/dist/{world-1b0e72fc.esm.js → world-523efd61.esm.js} +2 -2
- package/package.json +40 -39
- 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 +52 -17
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +52 -17
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +53 -19
- package/dist/declarations/src/components/custom-view-context/custom-view-context.d.ts +0 -12
- package/dist/declarations/src/components/custom-view-context/index.d.ts +0 -1
- package/dist/declarations/src/components/navbar/compiled/navbar.css.json.d.ts +0 -3
- package/dist/navbar-0cdfe0f7.cjs.prod.js +0 -1173
- package/dist/navbar-383d5297.cjs.dev.js +0 -1269
- package/dist/navbar-cd29b896.esm.js +0 -1239
- /package/dist/declarations/src/components/navbar/{navbar-skeleton.d.ts → navbar-new/navbar-skeleton.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{navbar-skeleton.styles.d.ts → navbar-new/navbar-skeleton.styles.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{navbar.styles.d.ts → navbar-new/navbar.styles.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{loading-navbar.d.ts → navbar-old/loading-navbar.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configureApollo = require('./configure-apollo-
|
|
3
|
+
var configureApollo = require('./configure-apollo-1d9542ce.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-0da1db32.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');
|
|
@@ -67,12 +67,13 @@ var types = require('@flopflip/types');
|
|
|
67
67
|
var reactRedux = require('react-redux');
|
|
68
68
|
var upperFirst = require('lodash/upperFirst');
|
|
69
69
|
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
70
|
-
var oidc = require('./oidc-
|
|
70
|
+
var oidc = require('./oidc-a55e3dd9.cjs.prod.js');
|
|
71
71
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
72
|
+
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
73
|
+
var ssr = require('@commercetools-frontend/application-config/ssr');
|
|
74
|
+
var permissions = require('@commercetools-frontend/permissions');
|
|
72
75
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
73
76
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
74
|
-
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
75
|
-
require('@commercetools-frontend/application-config/ssr');
|
|
76
77
|
|
|
77
78
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
78
79
|
|
|
@@ -113,7 +114,7 @@ var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsW
|
|
|
113
114
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
114
115
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
115
116
|
|
|
116
|
-
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-
|
|
117
|
+
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-646bb870.cjs.prod.js' /* webpackChunkName: "requests-in-flight-loader" */); }));
|
|
117
118
|
|
|
118
119
|
// Attempt to load the `projectKey` from localStorage
|
|
119
120
|
function selectProjectKeyFromLocalStorage() {
|
|
@@ -135,7 +136,7 @@ const createApolloContextForProxyForwardTo = proxyForwardTocontext => ({
|
|
|
135
136
|
skipGraphQlTargetCheck: true
|
|
136
137
|
});
|
|
137
138
|
|
|
138
|
-
var messages$
|
|
139
|
+
var messages$2 = reactIntl.defineMessages({
|
|
139
140
|
backToProjectLink: {
|
|
140
141
|
id: 'AppBar.backToProjectLink',
|
|
141
142
|
defaultMessage: 'Back to project'
|
|
@@ -153,7 +154,7 @@ const BackToProject = props => {
|
|
|
153
154
|
return jsxRuntime.jsx(FlatButton__default["default"], {
|
|
154
155
|
onClick: () => redirectToProject(props.projectKey || ''),
|
|
155
156
|
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {}),
|
|
156
|
-
label: intl.formatMessage(messages$
|
|
157
|
+
label: intl.formatMessage(messages$2.backToProjectLink)
|
|
157
158
|
});
|
|
158
159
|
};
|
|
159
160
|
BackToProject.displayName = 'BackToProject';
|
|
@@ -238,7 +239,7 @@ function useMcMutation(mutation, options) {
|
|
|
238
239
|
return react$2.useMutation(mutation, options);
|
|
239
240
|
}
|
|
240
241
|
|
|
241
|
-
var messages = reactIntl.defineMessages({
|
|
242
|
+
var messages$1 = reactIntl.defineMessages({
|
|
242
243
|
projectsLabel: {
|
|
243
244
|
id: 'ProjectSwitcher.projectsLabel',
|
|
244
245
|
description: 'The label for project dropdown switcher',
|
|
@@ -267,8 +268,8 @@ var messages = reactIntl.defineMessages({
|
|
|
267
268
|
});
|
|
268
269
|
|
|
269
270
|
const _excluded = ["projectCount"];
|
|
270
|
-
function ownKeys$8(
|
|
271
|
-
function _objectSpread$8(
|
|
271
|
+
function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
272
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
272
273
|
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 } } } };
|
|
273
274
|
const PROJECT_SWITCHER_LABEL_ID = 'project-switcher-label';
|
|
274
275
|
var _ref3 = {
|
|
@@ -321,10 +322,10 @@ const ProjectSwitcherOption = props => {
|
|
|
321
322
|
children: project.key
|
|
322
323
|
}), project.suspension && project.suspension.isActive && jsxRuntime.jsx("div", {
|
|
323
324
|
css: /*#__PURE__*/react$1.css("font-size:11px;color:", designSystem.designTokens.colorError, ";" + ("" ), "" ),
|
|
324
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages.suspended))
|
|
325
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$1.suspended))
|
|
325
326
|
}), project.expiry && project.expiry.isActive && jsxRuntime.jsx("div", {
|
|
326
327
|
css: /*#__PURE__*/react$1.css("font-size:11px;color:", designSystem.designTokens.colorError, ";" + ("" ), "" ),
|
|
327
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages.expired))
|
|
328
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$1.expired))
|
|
328
329
|
})]
|
|
329
330
|
})
|
|
330
331
|
}));
|
|
@@ -354,7 +355,7 @@ const ProjectSwitcher = props => {
|
|
|
354
355
|
children: [jsxRuntime.jsx(AccessibleHidden__default["default"], {
|
|
355
356
|
children: jsxRuntime.jsx("span", {
|
|
356
357
|
id: PROJECT_SWITCHER_LABEL_ID,
|
|
357
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages.projectsLabel))
|
|
358
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$1.projectsLabel))
|
|
358
359
|
})
|
|
359
360
|
}), jsxRuntime.jsx(SelectInput__default["default"], {
|
|
360
361
|
value: props.projectKey || '',
|
|
@@ -363,8 +364,8 @@ const ProjectSwitcher = props => {
|
|
|
363
364
|
onChange: event => {
|
|
364
365
|
const selectedProjectKey = event.target.value;
|
|
365
366
|
if (selectedProjectKey !== props.projectKey) {
|
|
366
|
-
var _window$app$__DEVELOP
|
|
367
|
-
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$
|
|
367
|
+
var _window$app$__DEVELOP;
|
|
368
|
+
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP !== void 0 && _window$app$__DEVELOP.authorizeUrl) {
|
|
368
369
|
configureApollo.setActiveProjectKey(selectedProjectKey);
|
|
369
370
|
}
|
|
370
371
|
|
|
@@ -387,8 +388,8 @@ const ProjectSwitcher = props => {
|
|
|
387
388
|
},
|
|
388
389
|
isClearable: false,
|
|
389
390
|
backspaceRemovesValue: false,
|
|
390
|
-
placeholder: intl.formatMessage(messages.searchPlaceholder),
|
|
391
|
-
noOptionsMessage: () => intl.formatMessage(messages.noResults)
|
|
391
|
+
placeholder: intl.formatMessage(messages$1.searchPlaceholder),
|
|
392
|
+
noOptionsMessage: () => intl.formatMessage(messages$1.noResults)
|
|
392
393
|
})]
|
|
393
394
|
});
|
|
394
395
|
};
|
|
@@ -397,7 +398,7 @@ ProjectSwitcher.displayName = 'ProjectSwitcher';
|
|
|
397
398
|
// eslint-disable-next-line import/prefer-default-export
|
|
398
399
|
const REQUESTS_IN_FLIGHT_LOADER_DOM_ID = 'loader-for-requests-in-flight';
|
|
399
400
|
|
|
400
|
-
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-
|
|
401
|
+
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-e342dd57.cjs.prod.js' /* webpackChunkName: "user-settings-menu" */); }));
|
|
401
402
|
|
|
402
403
|
var _ref$1 = {
|
|
403
404
|
name: "36bnqj",
|
|
@@ -416,7 +417,7 @@ const AppBar = props => {
|
|
|
416
417
|
children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
417
418
|
children: [jsxRuntime.jsx("div", {
|
|
418
419
|
css: _ref2$1,
|
|
419
|
-
children: !props.user ? jsxRuntime.jsx("img", {
|
|
420
|
+
children: !props.isNewNavigationEnabled && (!props.user ? jsxRuntime.jsx("img", {
|
|
420
421
|
src: LogoSVG__default["default"],
|
|
421
422
|
width: "100%",
|
|
422
423
|
alt: "Logo"
|
|
@@ -427,7 +428,7 @@ const AppBar = props => {
|
|
|
427
428
|
width: "100%",
|
|
428
429
|
alt: "Logo"
|
|
429
430
|
})
|
|
430
|
-
})
|
|
431
|
+
}))
|
|
431
432
|
}), jsxRuntime.jsx("div", {
|
|
432
433
|
id: REQUESTS_IN_FLIGHT_LOADER_DOM_ID,
|
|
433
434
|
css: _ref$1
|
|
@@ -532,7 +533,7 @@ const ConfigureIntlProvider = props => {
|
|
|
532
533
|
ConfigureIntlProvider.propTypes = {};
|
|
533
534
|
ConfigureIntlProvider.displayName = 'ConfigureIntlProvider';
|
|
534
535
|
|
|
535
|
-
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-
|
|
536
|
+
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-84dc825c.cjs.prod.js' /* webpackChunkName: "error-apologizer" */); }));
|
|
536
537
|
|
|
537
538
|
var ProjectQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "projectKey" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "project" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "key" }, value: { kind: "Variable", name: { kind: "Name", value: "projectKey" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currencies" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "initialized" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "daysLeft" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "allPermissionsForAllApplications" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedMenuVisibilities" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "owner" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "sampleDataImportDataset" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1025, source: { body: "query FetchProject($projectKey: String) {\n project(key: $projectKey) {\n key\n version\n name\n countries\n currencies\n languages\n initialized\n expiry {\n isActive\n daysLeft\n }\n suspension {\n isActive\n reason\n }\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n allPermissionsForAllApplications {\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedMenuVisibilities {\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n }\n owner {\n id\n name\n }\n sampleDataImportDataset\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
538
539
|
const FetchProject = props => {
|
|
@@ -588,9 +589,9 @@ FetchUser.propTypes = {
|
|
|
588
589
|
};
|
|
589
590
|
FetchUser.displayName = 'FetchUser';
|
|
590
591
|
|
|
591
|
-
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-
|
|
592
|
+
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-12df9203.cjs.prod.js' /* webpackChunkName: "navbar" */); }));
|
|
592
593
|
|
|
593
|
-
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-
|
|
594
|
+
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-b3e7cea1.cjs.prod.js' /* webpackChunkName: "project-container" */); }));
|
|
594
595
|
|
|
595
596
|
const getSelectedDataLocaleForProject = projectLocales => {
|
|
596
597
|
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
@@ -702,7 +703,7 @@ var pimIndexerStates = {
|
|
|
702
703
|
NOT_INDEXED: 'NOT_INDEXED'
|
|
703
704
|
};
|
|
704
705
|
|
|
705
|
-
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-
|
|
706
|
+
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-16a5f759.cjs.prod.js' /* webpackChunkName: "quick-access" */); }));
|
|
706
707
|
|
|
707
708
|
const QuickAccessTrigger = props => {
|
|
708
709
|
const _useState = react.useState(false),
|
|
@@ -789,7 +790,7 @@ const QuickAccessTrigger = props => {
|
|
|
789
790
|
QuickAccessTrigger.propTypes = {};
|
|
790
791
|
QuickAccessTrigger.displayName = 'QuickAccessTrigger';
|
|
791
792
|
|
|
792
|
-
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-
|
|
793
|
+
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-0e422d32.cjs.prod.js' /* webpackChunkName: "redirect-to-logout" */); }));
|
|
793
794
|
|
|
794
795
|
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-2266c427.cjs.prod.js' /* webpackChunkName: "redirect-to-project-create" */); }));
|
|
795
796
|
|
|
@@ -817,8 +818,8 @@ const FLAGS = {
|
|
|
817
818
|
[MAIN_NAVIGATION]: false
|
|
818
819
|
};
|
|
819
820
|
|
|
820
|
-
function ownKeys$7(
|
|
821
|
-
function _objectSpread$7(
|
|
821
|
+
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
822
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
822
823
|
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 } } } };
|
|
823
824
|
const defaultApiUrl = window.location.origin;
|
|
824
825
|
const getDefaultedFeatureToggles = allFeatureToggles => _reduceInstanceProperty__default["default"](allFeatureToggles).call(allFeatureToggles, (previouslyDefaultedFeatureToggles, nextFeatureToggle) => _objectSpread$7(_objectSpread$7({}, previouslyDefaultedFeatureToggles), {}, {
|
|
@@ -846,8 +847,8 @@ const useAllMenuFeatureToggles = () => {
|
|
|
846
847
|
};
|
|
847
848
|
};
|
|
848
849
|
|
|
849
|
-
function ownKeys$6(
|
|
850
|
-
function _objectSpread$6(
|
|
850
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
851
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
851
852
|
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 } } } };
|
|
852
853
|
// This value is hard-coded here because we want to make sure that the
|
|
853
854
|
// app uses our account of LD. The value is meant to be public, so there
|
|
@@ -939,7 +940,7 @@ const ThemeSwitcher = () => {
|
|
|
939
940
|
});
|
|
940
941
|
};
|
|
941
942
|
|
|
942
|
-
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-
|
|
943
|
+
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-5e0a77d0.cjs.prod.js' /* webpackChunkName: "version-tracker" */); }));
|
|
943
944
|
|
|
944
945
|
// TODO: Remove this file once the new navigation is enabled for all users
|
|
945
946
|
const NewMainNavigationFlagWrapper = props => {
|
|
@@ -954,8 +955,8 @@ const NewMainNavigationFlagWrapper = props => {
|
|
|
954
955
|
});
|
|
955
956
|
};
|
|
956
957
|
|
|
957
|
-
function ownKeys$5(
|
|
958
|
-
function _objectSpread$5(
|
|
958
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
959
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
959
960
|
const getHasUnauthorizedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => gqlError.extensions && gqlError.extensions.code && gqlError.extensions.code === 'UNAUTHENTICATED');
|
|
960
961
|
const getHasUserBeenDeletedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => {
|
|
961
962
|
var _context;
|
|
@@ -1109,7 +1110,8 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1109
1110
|
css: /*#__PURE__*/react$1.css("grid-row:", isNewNavigationEnabled ? '2/3' : '2', ";grid-column:", isNewNavigationEnabled ? '2/3' : '1/3', ";" + ("" ), "" ),
|
|
1110
1111
|
children: jsxRuntime.jsx(AppBar, {
|
|
1111
1112
|
user: user,
|
|
1112
|
-
projectKeyFromUrl: projectKeyFromUrl
|
|
1113
|
+
projectKeyFromUrl: projectKeyFromUrl,
|
|
1114
|
+
isNewNavigationEnabled: isNewNavigationEnabled
|
|
1113
1115
|
})
|
|
1114
1116
|
}), jsxRuntime.jsx("aside", {
|
|
1115
1117
|
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;", ";" + ("" ), "" ),
|
|
@@ -1173,8 +1175,8 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1173
1175
|
, {
|
|
1174
1176
|
ref: layoutRefs,
|
|
1175
1177
|
offsetTop: constants.DIMENSIONS.header,
|
|
1176
|
-
offsetLeft: projectKeyFromUrl ? constants.DIMENSIONS.navMenu : '0px',
|
|
1177
|
-
offsetLeftOnExpandedMenu: projectKeyFromUrl ? constants.DIMENSIONS.navMenuExpanded : '0px'
|
|
1178
|
+
offsetLeft: projectKeyFromUrl ? isNewNavigationEnabled ? constants.DIMENSIONS.newNavMenu : constants.DIMENSIONS.navMenu : '0px',
|
|
1179
|
+
offsetLeftOnExpandedMenu: projectKeyFromUrl ? isNewNavigationEnabled ? constants.DIMENSIONS.newNavMenuExpanded : constants.DIMENSIONS.navMenuExpanded : '0px'
|
|
1178
1180
|
}), jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
1179
1181
|
children: [jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
1180
1182
|
from: "/profile",
|
|
@@ -1197,8 +1199,7 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1197
1199
|
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1198
1200
|
exact: true,
|
|
1199
1201
|
path: "/",
|
|
1200
|
-
children: (
|
|
1201
|
-
var _user$defaultProjectK;
|
|
1202
|
+
children: (_user$defaultProjectK => {
|
|
1202
1203
|
const previousProjectKey = getPreviousProjectKey((_user$defaultProjectK = user === null || user === void 0 ? void 0 : user.defaultProjectKey) !== null && _user$defaultProjectK !== void 0 ? _user$defaultProjectK : undefined);
|
|
1203
1204
|
|
|
1204
1205
|
/**
|
|
@@ -1283,8 +1284,8 @@ ApplicationPageTitle.propTypes = {
|
|
|
1283
1284
|
ApplicationPageTitle.displayName = 'ApplicationPageTitle';
|
|
1284
1285
|
ApplicationPageTitle.defaultProps = defaultProps$1;
|
|
1285
1286
|
|
|
1286
|
-
function ownKeys$4(
|
|
1287
|
-
function _objectSpread$4(
|
|
1287
|
+
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1288
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1288
1289
|
const SuspendedRoute = props => jsxRuntime.jsx(reactRouterDom.Route, _objectSpread$4(_objectSpread$4({}, props), {}, {
|
|
1289
1290
|
children: jsxRuntime.jsx(react.Suspense, {
|
|
1290
1291
|
fallback: jsxRuntime.jsx(LoadingSpinner__default["default"], {}),
|
|
@@ -1363,28 +1364,28 @@ const withoutProjectKeyClaim = scope => {
|
|
|
1363
1364
|
return _filterInstanceProperty__default["default"](_context = scope.split(' ')).call(_context, claim => !_startsWithInstanceProperty__default["default"](claim).call(claim, constants.OIDC_CLAIMS.PROJECT_KEY)).join(' ');
|
|
1364
1365
|
};
|
|
1365
1366
|
const hasCachedAuthenticationState = () => {
|
|
1366
|
-
var _window$app$__DEVELOP
|
|
1367
|
-
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$
|
|
1367
|
+
var _window$app$__DEVELOP;
|
|
1368
|
+
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP !== void 0 && _window$app$__DEVELOP.authorizeUrl) {
|
|
1368
1369
|
try {
|
|
1369
|
-
var _window$app$
|
|
1370
|
+
var _window$app$__DEVELOP5, _window$app$__DEVELOP6, _window$app$__DEVELOP7, _window$app$__DEVELOP8;
|
|
1370
1371
|
const activeProjectKey = configureApollo.getActiveProjectKey();
|
|
1371
1372
|
if (activeProjectKey) {
|
|
1372
|
-
var _window$app$
|
|
1373
|
+
var _window$app$__DEVELOP2;
|
|
1373
1374
|
// GIVEN The application is not requesting a project key,
|
|
1374
1375
|
// THEN we assume that the application does not need a project context.
|
|
1375
1376
|
// GIVEN The application is not requesting a project key,
|
|
1376
1377
|
// THEN we remove the cached project key.
|
|
1377
1378
|
// This is the case of an application like `account`.
|
|
1378
|
-
if (!((_window$app$
|
|
1379
|
+
if (!((_window$app$__DEVELOP2 = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP2 !== void 0 && (_window$app$__DEVELOP2 = _window$app$__DEVELOP2.oidc) !== null && _window$app$__DEVELOP2 !== void 0 && _window$app$__DEVELOP2.initialProjectKey)) {
|
|
1379
1380
|
configureApollo.removeActiveProjectKey();
|
|
1380
1381
|
}
|
|
1381
1382
|
} else {
|
|
1382
|
-
var _window$app$
|
|
1383
|
-
if ((_window$app$
|
|
1384
|
-
var _window$app$
|
|
1383
|
+
var _window$app$__DEVELOP3;
|
|
1384
|
+
if ((_window$app$__DEVELOP3 = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP3 !== void 0 && (_window$app$__DEVELOP3 = _window$app$__DEVELOP3.oidc) !== null && _window$app$__DEVELOP3 !== void 0 && _window$app$__DEVELOP3.initialProjectKey) {
|
|
1385
|
+
var _window$app$__DEVELOP4;
|
|
1385
1386
|
// Here we store the initial project key in local storage,
|
|
1386
1387
|
// so that it gets picked up when we initiate the login flow.
|
|
1387
|
-
configureApollo.setActiveProjectKey((_window$app$
|
|
1388
|
+
configureApollo.setActiveProjectKey((_window$app$__DEVELOP4 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP4 === void 0 || (_window$app$__DEVELOP4 = _window$app$__DEVELOP4.oidc) === null || _window$app$__DEVELOP4 === void 0 ? void 0 : _window$app$__DEVELOP4.initialProjectKey);
|
|
1388
1389
|
}
|
|
1389
1390
|
}
|
|
1390
1391
|
|
|
@@ -1400,10 +1401,10 @@ const hasCachedAuthenticationState = () => {
|
|
|
1400
1401
|
// Rebuild the requested OIDC scope to verify that it didn't change.
|
|
1401
1402
|
const requestedScope = oidc.buildOidcScope({
|
|
1402
1403
|
projectKey: activeProjectKey !== null && activeProjectKey !== void 0 ? activeProjectKey : undefined,
|
|
1403
|
-
oAuthScopes: (_window$app$
|
|
1404
|
-
additionalOAuthScopes: (_window$app$
|
|
1405
|
-
teamId: (_window$app$
|
|
1406
|
-
applicationId: (_window$app$
|
|
1404
|
+
oAuthScopes: (_window$app$__DEVELOP5 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP5 === void 0 || (_window$app$__DEVELOP5 = _window$app$__DEVELOP5.oidc) === null || _window$app$__DEVELOP5 === void 0 ? void 0 : _window$app$__DEVELOP5.oAuthScopes,
|
|
1405
|
+
additionalOAuthScopes: (_window$app$__DEVELOP6 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP6 === void 0 || (_window$app$__DEVELOP6 = _window$app$__DEVELOP6.oidc) === null || _window$app$__DEVELOP6 === void 0 ? void 0 : _window$app$__DEVELOP6.additionalOAuthScopes,
|
|
1406
|
+
teamId: (_window$app$__DEVELOP7 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP7 === void 0 || (_window$app$__DEVELOP7 = _window$app$__DEVELOP7.oidc) === null || _window$app$__DEVELOP7 === void 0 ? void 0 : _window$app$__DEVELOP7.teamId,
|
|
1407
|
+
applicationId: (_window$app$__DEVELOP8 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP8 === void 0 || (_window$app$__DEVELOP8 = _window$app$__DEVELOP8.oidc) === null || _window$app$__DEVELOP8 === void 0 ? void 0 : _window$app$__DEVELOP8.applicationId
|
|
1407
1408
|
});
|
|
1408
1409
|
// Omit the project key from the check. This allows to switch projects
|
|
1409
1410
|
// without having to log in again.
|
|
@@ -1421,12 +1422,12 @@ const hasCachedAuthenticationState = () => {
|
|
|
1421
1422
|
return window.localStorage.getItem(constants.STORAGE_KEYS.IS_AUTHENTICATED) === 'true';
|
|
1422
1423
|
};
|
|
1423
1424
|
|
|
1424
|
-
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-
|
|
1425
|
+
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-ec82f402.cjs.prod.js' /* webpackChunkName: "oidc-callback" */); }));
|
|
1425
1426
|
|
|
1426
|
-
function ownKeys$3(
|
|
1427
|
-
function _objectSpread$3(
|
|
1427
|
+
function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1428
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1428
1429
|
const Authenticated = props => {
|
|
1429
|
-
var _window$app$__DEVELOP
|
|
1430
|
+
var _window$app$__DEVELOP;
|
|
1430
1431
|
// We attempt to see if the user was already authenticated by looking
|
|
1431
1432
|
// at the "cached" flag in local storage.
|
|
1432
1433
|
const cachedAuthenticationState = hasCachedAuthenticationState();
|
|
@@ -1440,7 +1441,7 @@ const Authenticated = props => {
|
|
|
1440
1441
|
|
|
1441
1442
|
// When using the OIDC workflow, we always return false, to trigger
|
|
1442
1443
|
// the redirect to the login page.
|
|
1443
|
-
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$
|
|
1444
|
+
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP !== void 0 && _window$app$__DEVELOP.authorizeUrl) {
|
|
1444
1445
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1445
1446
|
children: props.render({
|
|
1446
1447
|
isAuthenticated: false
|
|
@@ -1460,7 +1461,7 @@ const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
|
1460
1461
|
applicationMessages: props.applicationMessages
|
|
1461
1462
|
})
|
|
1462
1463
|
}), jsxRuntime.jsx(SuspendedRoute, {
|
|
1463
|
-
path: "/:projectKey/
|
|
1464
|
+
path: "/:projectKey/:identifier/oidc/callback",
|
|
1464
1465
|
children: jsxRuntime.jsx(OidcCallback, {
|
|
1465
1466
|
locale: props.locale,
|
|
1466
1467
|
applicationMessages: props.applicationMessages
|
|
@@ -1471,8 +1472,8 @@ const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
|
1471
1472
|
});
|
|
1472
1473
|
AuthenticationRoutes.displayName = 'AuthenticationRoutes';
|
|
1473
1474
|
|
|
1474
|
-
function ownKeys$2(
|
|
1475
|
-
function _objectSpread$2(
|
|
1475
|
+
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1476
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$2(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1476
1477
|
/**
|
|
1477
1478
|
* NOTE:
|
|
1478
1479
|
* This function try-catches around a `JSON.parse` and return
|
|
@@ -1571,7 +1572,7 @@ const ApplicationShellProvider = props => {
|
|
|
1571
1572
|
ApplicationShellProvider.propTypes = {};
|
|
1572
1573
|
ApplicationShellProvider.displayName = 'ApplicationShellProvider';
|
|
1573
1574
|
|
|
1574
|
-
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-
|
|
1575
|
+
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-f90fca22.cjs.prod.js' /* webpackChunkName: "redirect-to-login" */); }));
|
|
1575
1576
|
|
|
1576
1577
|
const styles = {
|
|
1577
1578
|
name: "1prreal",
|
|
@@ -1584,7 +1585,7 @@ const GlobalStyles = () => jsxRuntime.jsx(react$1.Global, {
|
|
|
1584
1585
|
const ApplicationShell = props => {
|
|
1585
1586
|
react.useEffect(() => {
|
|
1586
1587
|
var _props$onRegisterErro;
|
|
1587
|
-
(_props$onRegisterErro = props.onRegisterErrorListeners) === null || _props$onRegisterErro === void 0
|
|
1588
|
+
(_props$onRegisterErro = props.onRegisterErrorListeners) === null || _props$onRegisterErro === void 0 || _props$onRegisterErro.call(props, {
|
|
1588
1589
|
dispatch: configureApollo.internalReduxStore.dispatch
|
|
1589
1590
|
});
|
|
1590
1591
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1624,59 +1625,133 @@ ApplicationShell.propTypes = {};
|
|
|
1624
1625
|
ApplicationShell.displayName = 'ApplicationShell';
|
|
1625
1626
|
ApplicationShell.version = configureApollo.applicationShellVersion;
|
|
1626
1627
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
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: ''
|
|
1628
|
+
const messages = reactIntl.defineMessages({
|
|
1629
|
+
loadError: {
|
|
1630
|
+
id: 'CustomViewLoader.error.load',
|
|
1631
|
+
defaultMessage: 'We could not load the Custom View. Please contact your administrator to check its configuration.'
|
|
1658
1632
|
}
|
|
1659
1633
|
});
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
const useCustomViewContext = () => {
|
|
1671
|
-
const context = react.useContext(CustomViewContext);
|
|
1672
|
-
if (!context) {
|
|
1673
|
-
throw new Error('useCustomViewContext must be used within a CustomViewContextProvider');
|
|
1634
|
+
|
|
1635
|
+
const isIframeReady = iFrameElementRef => {
|
|
1636
|
+
try {
|
|
1637
|
+
var _iFrameElementRef$con;
|
|
1638
|
+
return (iFrameElementRef === null || iFrameElementRef === void 0 || (_iFrameElementRef$con = iFrameElementRef.contentWindow) === null || _iFrameElementRef$con === void 0 ? void 0 : _iFrameElementRef$con.document.readyState) === 'complete';
|
|
1639
|
+
} catch {
|
|
1640
|
+
// Trying to access the contentWindow of a cross-origin iFrame will throw an error.
|
|
1641
|
+
// We are not supposed to even get here because the iFrame must use
|
|
1642
|
+
// a URL from our very same domain (the custom view is proxied through our http-proxy service).
|
|
1643
|
+
return false;
|
|
1674
1644
|
}
|
|
1675
|
-
return context;
|
|
1676
1645
|
};
|
|
1646
|
+
const CustomPanelIframe = /*#__PURE__*/_styled__default["default"]("iframe", {
|
|
1647
|
+
target: "e1e3x9i10"
|
|
1648
|
+
} )({
|
|
1649
|
+
name: "174lt7a",
|
|
1650
|
+
styles: "height:100%;width:100%;border:none"
|
|
1651
|
+
} );
|
|
1652
|
+
function CustomViewLoader(props) {
|
|
1653
|
+
var _props$customView$typ;
|
|
1654
|
+
const iFrameElementRef = react.useRef(null);
|
|
1655
|
+
const dataLocale = applicationShellConnectors.useApplicationContext(context => context.dataLocale);
|
|
1656
|
+
const projectKey = applicationShellConnectors.useApplicationContext(context => {
|
|
1657
|
+
var _context$project;
|
|
1658
|
+
return (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key;
|
|
1659
|
+
});
|
|
1660
|
+
const iFrameCommunicationChannel = react.useRef(new MessageChannel());
|
|
1661
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
1662
|
+
const intl = reactIntl.useIntl();
|
|
1663
|
+
const messageFromIFrameHandler = react.useCallback(event => {
|
|
1664
|
+
if (event.data.origin === window.location.origin) {
|
|
1665
|
+
console.log('message received from iframe port: ', event);
|
|
1666
|
+
}
|
|
1667
|
+
}, []);
|
|
1668
|
+
|
|
1669
|
+
// onLoad handler is called from the iFrame even where the URL is not valid
|
|
1670
|
+
// (blocked by CORS, 404, etc.) so we need to make sure the iFrame is ready
|
|
1671
|
+
const onLoadSuccessHandler = react.useCallback(() => {
|
|
1672
|
+
var _iFrameElementRef$cur, _context;
|
|
1673
|
+
// Show error and block if the iFrame is not ready
|
|
1674
|
+
// (error loading it)
|
|
1675
|
+
if (!isIframeReady(iFrameElementRef.current)) {
|
|
1676
|
+
showNotification({
|
|
1677
|
+
domain: constants$1.DOMAINS.PAGE,
|
|
1678
|
+
kind: constants$1.NOTIFICATION_KINDS_PAGE.error,
|
|
1679
|
+
text: intl.formatMessage(messages.loadError)
|
|
1680
|
+
});
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1677
1683
|
|
|
1678
|
-
|
|
1679
|
-
|
|
1684
|
+
// Listen for messages from the iFrame
|
|
1685
|
+
iFrameCommunicationChannel.current.port1.onmessage = messageFromIFrameHandler;
|
|
1686
|
+
|
|
1687
|
+
// Transfer port2 to the iFrame so it can send messages back privately
|
|
1688
|
+
(_iFrameElementRef$cur = iFrameElementRef.current) === null || _iFrameElementRef$cur === void 0 || (_iFrameElementRef$cur = _iFrameElementRef$cur.contentWindow) === null || _iFrameElementRef$cur === void 0 || _iFrameElementRef$cur.postMessage(constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_BOOTSTRAP, window.location.href, [iFrameCommunicationChannel.current.port2]);
|
|
1689
|
+
|
|
1690
|
+
// Send the initialization message to the iFrame
|
|
1691
|
+
iFrameCommunicationChannel.current.port1.postMessage({
|
|
1692
|
+
source: constants$1.CUSTOM_VIEWS_EVENTS_META.SOURCE,
|
|
1693
|
+
destination: _concatInstanceProperty__default["default"](_context = "".concat(constants$1.CUSTOM_VIEWS_EVENTS_META.DESTINATION_PREFIX)).call(_context, props.customView.id),
|
|
1694
|
+
eventName: constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_INITIALIZATION,
|
|
1695
|
+
eventData: {
|
|
1696
|
+
context: {
|
|
1697
|
+
dataLocale,
|
|
1698
|
+
projectKey,
|
|
1699
|
+
customViewConfig: props.customView,
|
|
1700
|
+
hostUrl: props.hostUrl || window.location.href
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
});
|
|
1704
|
+
|
|
1705
|
+
// We want the effect to run only once so we don't need the dependencies array.
|
|
1706
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1707
|
+
}, []);
|
|
1708
|
+
react.useEffect(() => {
|
|
1709
|
+
// Close the channel when the component unmounts
|
|
1710
|
+
return () => {
|
|
1711
|
+
var _iFrameCommunicationC;
|
|
1712
|
+
(_iFrameCommunicationC = iFrameCommunicationChannel.current) === null || _iFrameCommunicationC === void 0 || _iFrameCommunicationC.port1.close();
|
|
1713
|
+
};
|
|
1714
|
+
}, []);
|
|
1715
|
+
|
|
1716
|
+
// Currently we only support custom panels
|
|
1717
|
+
if (props.customView.type !== 'CustomPanel') {
|
|
1718
|
+
sentry.reportErrorToSentry(new Error("CustomViewLoader: Provided Custom View has an unsupported type: ".concat(props.customView.type, ". Supported types: ['CustomPanel'].")));
|
|
1719
|
+
return null;
|
|
1720
|
+
}
|
|
1721
|
+
const panelSize = ((_props$customView$typ = props.customView.typeSettings) === null || _props$customView$typ === void 0 || (_props$customView$typ = _props$customView$typ.size) === null || _props$customView$typ === void 0 ? void 0 : _props$customView$typ.toLocaleLowerCase()) || 'large';
|
|
1722
|
+
const iFrameUrl = [window.location.origin, 'custom-views', props.customView.id, 'projects', projectKey].join('/');
|
|
1723
|
+
return jsxRuntime.jsx(applicationComponents.CustomPanel, {
|
|
1724
|
+
title: "Custom View: ".concat(props.customView.defaultLabel),
|
|
1725
|
+
onClose: props.onClose,
|
|
1726
|
+
size: panelSize,
|
|
1727
|
+
children: jsxRuntime.jsx(CustomPanelIframe, {
|
|
1728
|
+
id: "custom-view-".concat(props.customView.id),
|
|
1729
|
+
title: "Custom View: ".concat(props.customView.defaultLabel),
|
|
1730
|
+
ref: iFrameElementRef,
|
|
1731
|
+
src: iFrameUrl,
|
|
1732
|
+
onLoad: onLoadSuccessHandler
|
|
1733
|
+
}, "custom-view-".concat(props.customView.id))
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
CustomViewLoader.propTypes = {};
|
|
1737
|
+
|
|
1738
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1739
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1740
|
+
const CustomViewWithPermissionCheck = props => {
|
|
1741
|
+
const permissionKeys = ssr.entryPointUriPathToPermissionKeys(props.customViewId);
|
|
1742
|
+
|
|
1743
|
+
// Require View permission to render the application.
|
|
1744
|
+
const canView = permissions.useIsAuthorized({
|
|
1745
|
+
demandedPermissions: [permissionKeys.View]
|
|
1746
|
+
});
|
|
1747
|
+
if (canView) {
|
|
1748
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1749
|
+
children: props.children
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
return jsxRuntime.jsx(applicationComponents.PageUnauthorized, {});
|
|
1753
|
+
};
|
|
1754
|
+
CustomViewWithPermissionCheck.propTypes = {};
|
|
1680
1755
|
function CustomViewShellAuthenticated(props) {
|
|
1681
1756
|
const browserLocale = getBrowserLocale(window);
|
|
1682
1757
|
return jsxRuntime.jsx(FetchUser, {
|
|
@@ -1707,7 +1782,7 @@ function CustomViewShellAuthenticated(props) {
|
|
|
1707
1782
|
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1708
1783
|
children: [jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1709
1784
|
theme: "default"
|
|
1710
|
-
}),
|
|
1785
|
+
}), jsxRuntime.jsx(FetchProject, {
|
|
1711
1786
|
projectKey: props.projectKey,
|
|
1712
1787
|
children: _ref3 => {
|
|
1713
1788
|
let isProjectLoading = _ref3.isLoading,
|
|
@@ -1723,7 +1798,10 @@ function CustomViewShellAuthenticated(props) {
|
|
|
1723
1798
|
project: project,
|
|
1724
1799
|
projectDataLocale: props.dataLocale,
|
|
1725
1800
|
environment: props.environment,
|
|
1726
|
-
children:
|
|
1801
|
+
children: jsxRuntime.jsx(CustomViewWithPermissionCheck, {
|
|
1802
|
+
customViewId: props.customViewConfig.id,
|
|
1803
|
+
children: props.children
|
|
1804
|
+
})
|
|
1727
1805
|
});
|
|
1728
1806
|
}
|
|
1729
1807
|
})]
|
|
@@ -1755,10 +1833,9 @@ function CustomViewShell(props) {
|
|
|
1755
1833
|
}, []);
|
|
1756
1834
|
react.useEffect(() => {
|
|
1757
1835
|
const bootstrapMessageHandler = event => {
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
if (event.origin === window.location.origin && event.data === constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_BOOTSTRAP) {
|
|
1836
|
+
if ((event.origin === window.location.origin ||
|
|
1837
|
+
// event.origin is not defined in test environment
|
|
1838
|
+
"production" === 'test') && event.data === constants$1.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_BOOTSTRAP) {
|
|
1762
1839
|
iFrameCommunicationPort.current = event.ports[0];
|
|
1763
1840
|
iFrameCommunicationPort.current.onmessage = hostMessageHandler;
|
|
1764
1841
|
// Once bootstraped, we don't want to listen for global messages anymore.
|
|
@@ -1775,31 +1852,42 @@ function CustomViewShell(props) {
|
|
|
1775
1852
|
window.removeEventListener('message', bootstrapMessageHandler);
|
|
1776
1853
|
};
|
|
1777
1854
|
}, [hostMessageHandler]);
|
|
1855
|
+
react.useEffect(() => {
|
|
1856
|
+
// Close the channel when the component unmounts
|
|
1857
|
+
return () => {
|
|
1858
|
+
var _iFrameCommunicationP;
|
|
1859
|
+
(_iFrameCommunicationP = iFrameCommunicationPort.current) === null || _iFrameCommunicationP === void 0 || _iFrameCommunicationP.close();
|
|
1860
|
+
iFrameCommunicationPort.current = undefined;
|
|
1861
|
+
};
|
|
1862
|
+
}, []);
|
|
1778
1863
|
if (!hostContext) {
|
|
1779
1864
|
return jsxRuntime.jsx(ApplicationLoader, {
|
|
1780
1865
|
showLogo: true
|
|
1781
1866
|
});
|
|
1782
1867
|
}
|
|
1868
|
+
const hostUrl = hostContext.hostUrl;
|
|
1783
1869
|
return jsxRuntime.jsx(ApplicationShellProvider, {
|
|
1784
1870
|
environment: window.app,
|
|
1785
|
-
applicationMessages: props.
|
|
1871
|
+
applicationMessages: props.applicationMessages,
|
|
1786
1872
|
children: _ref => {
|
|
1787
1873
|
let isAuthenticated = _ref.isAuthenticated;
|
|
1788
1874
|
if (isAuthenticated) {
|
|
1789
|
-
return jsxRuntime.jsx(CustomViewContextProvider, {
|
|
1790
|
-
|
|
1875
|
+
return jsxRuntime.jsx(applicationShellConnectors.CustomViewContextProvider, {
|
|
1876
|
+
hostUrl: hostUrl,
|
|
1877
|
+
customViewConfig: hostContext.customViewConfig,
|
|
1791
1878
|
children: jsxRuntime.jsx(CustomViewShellAuthenticated, {
|
|
1792
1879
|
dataLocale: hostContext.dataLocale,
|
|
1793
1880
|
environment: window.app,
|
|
1794
|
-
messages: props.
|
|
1881
|
+
messages: props.applicationMessages,
|
|
1795
1882
|
projectKey: hostContext.projectKey,
|
|
1883
|
+
customViewConfig: hostContext.customViewConfig,
|
|
1796
1884
|
children: props.children
|
|
1797
1885
|
})
|
|
1798
1886
|
});
|
|
1799
1887
|
}
|
|
1800
1888
|
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1801
1889
|
locale: browserLocale,
|
|
1802
|
-
applicationMessages: props.
|
|
1890
|
+
applicationMessages: props.applicationMessages,
|
|
1803
1891
|
children: _ref2 => {
|
|
1804
1892
|
let locale = _ref2.locale,
|
|
1805
1893
|
messages = _ref2.messages;
|
|
@@ -1814,6 +1902,13 @@ function CustomViewShell(props) {
|
|
|
1814
1902
|
});
|
|
1815
1903
|
}
|
|
1816
1904
|
CustomViewShell.propTypes = {};
|
|
1905
|
+
const CustomViewShellWrapper = props => {
|
|
1906
|
+
return jsxRuntime.jsx(CustomViewShell, {
|
|
1907
|
+
applicationMessages: props.applicationMessages,
|
|
1908
|
+
children: props.children
|
|
1909
|
+
});
|
|
1910
|
+
};
|
|
1911
|
+
CustomViewShellWrapper.propTypes = {};
|
|
1817
1912
|
|
|
1818
1913
|
const defaultProps = {
|
|
1819
1914
|
shouldCleanUpOnUnmount: true
|
|
@@ -1901,8 +1996,8 @@ function setupGlobalErrorListener() {
|
|
|
1901
1996
|
});
|
|
1902
1997
|
}
|
|
1903
1998
|
|
|
1904
|
-
function ownKeys(
|
|
1905
|
-
function _objectSpread(
|
|
1999
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2000
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1906
2001
|
|
|
1907
2002
|
/**
|
|
1908
2003
|
* The route path to match. Usually it starts with `/:projectKey/my-entry-point`.
|
|
@@ -1948,8 +2043,8 @@ exports.ApplicationShell = ApplicationShell;
|
|
|
1948
2043
|
exports.ApplicationShellProvider = ApplicationShellProvider;
|
|
1949
2044
|
exports.ButlerContainer = ButlerContainer;
|
|
1950
2045
|
exports.ConfigureIntlProvider = ConfigureIntlProvider;
|
|
1951
|
-
exports.
|
|
1952
|
-
exports.
|
|
2046
|
+
exports.CustomViewLoader = CustomViewLoader;
|
|
2047
|
+
exports.CustomViewShellWrapper = CustomViewShellWrapper;
|
|
1953
2048
|
exports.ErrorBoundary = ErrorBoundary;
|
|
1954
2049
|
exports.FetchProject = FetchProject;
|
|
1955
2050
|
exports.InjectReducers = InjectReducers;
|
|
@@ -1964,7 +2059,6 @@ exports.SuspendedRoute = SuspendedRoute;
|
|
|
1964
2059
|
exports.createApolloContextForProxyForwardTo = createApolloContextForProxyForwardTo;
|
|
1965
2060
|
exports.pimIndexerStates = pimIndexerStates;
|
|
1966
2061
|
exports.setupGlobalErrorListener = setupGlobalErrorListener;
|
|
1967
|
-
exports.useCustomViewContext = useCustomViewContext;
|
|
1968
2062
|
exports.useMcLazyQuery = useMcLazyQuery;
|
|
1969
2063
|
exports.useMcMutation = useMcMutation;
|
|
1970
2064
|
exports.useMcQuery = useMcQuery;
|