@commercetools-frontend/application-shell 22.7.1 → 22.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{application-entry-point-6853f92e.cjs.dev.js → application-entry-point-61deb1f6.cjs.dev.js} +3 -3
- package/dist/{application-entry-point-2bbea741.cjs.prod.js → application-entry-point-90aa1cdb.cjs.prod.js} +3 -3
- package/dist/{application-entry-point-97efa554.esm.js → application-entry-point-bfcf85aa.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-99b8a3fe.cjs.dev.js → configure-apollo-459b0dbc.cjs.dev.js} +20 -19
- package/dist/{configure-apollo-2077e9e6.cjs.prod.js → configure-apollo-55d13684.cjs.prod.js} +20 -19
- package/dist/{configure-apollo-8bcf9317.esm.js → configure-apollo-a219411c.esm.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-58d037c2.cjs.dev.js +215 -0
- package/dist/custom-view-dev-host-77fdde9b.esm.js +202 -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-6c0bc333.cjs.dev.js → index-0f5381b1.cjs.dev.js} +282 -156
- package/dist/{index-975c5225.esm.js → index-519cff4b.esm.js} +284 -157
- package/dist/{index-f85c276c.cjs.prod.js → index-e8c02aca.cjs.prod.js} +221 -127
- 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-8102a43b.esm.js +1991 -0
- package/dist/navbar-89b2edc4.cjs.dev.js +2021 -0
- package/dist/navbar-a29ebdeb.cjs.prod.js +1834 -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-7c234583.cjs.prod.js → oidc-callback-6415bb71.cjs.prod.js} +6 -5
- package/dist/{oidc-callback-7221e7d2.esm.js → oidc-callback-80314ba9.esm.js} +6 -5
- package/dist/{oidc-callback-80416189.cjs.dev.js → oidc-callback-ff8e12ba.cjs.dev.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-c36e4793.cjs.dev.js → project-container-bc3768d1.cjs.dev.js} +11 -11
- package/dist/{project-container-84c7881c.esm.js → project-container-bd9ab58b.esm.js} +11 -11
- package/dist/{project-container-20379b3d.cjs.prod.js → project-container-e24d4274.cjs.prod.js} +11 -11
- package/dist/{project-expired-fea5a2c6.cjs.dev.js → project-expired-1cf2470b.cjs.dev.js} +8 -7
- package/dist/{project-expired-84871cc1.cjs.prod.js → project-expired-ad577eea.cjs.prod.js} +8 -7
- package/dist/{project-expired-6f9e5ff9.esm.js → project-expired-cd0367e6.esm.js} +8 -7
- package/dist/{project-not-found-763dcf53.esm.js → project-not-found-47fe81e3.esm.js} +8 -7
- package/dist/{project-not-found-e55553d5.cjs.prod.js → project-not-found-531c1f36.cjs.prod.js} +8 -7
- package/dist/{project-not-found-382b664d.cjs.dev.js → project-not-found-bdf80892.cjs.dev.js} +8 -7
- package/dist/{project-not-initialized-8b3d52be.esm.js → project-not-initialized-b632dec8.esm.js} +8 -7
- package/dist/{project-not-initialized-be040234.cjs.prod.js → project-not-initialized-d12db254.cjs.prod.js} +8 -7
- package/dist/{project-not-initialized-aee7541a.cjs.dev.js → project-not-initialized-e903c05c.cjs.dev.js} +8 -7
- package/dist/{project-suspended-02eb3c52.esm.js → project-suspended-33c95408.esm.js} +8 -7
- package/dist/{project-suspended-506c7b5f.cjs.dev.js → project-suspended-5b038275.cjs.dev.js} +8 -7
- package/dist/{project-suspended-2df71dad.cjs.prod.js → project-suspended-65120ddf.cjs.prod.js} +8 -7
- package/dist/{quick-access-e474562c.esm.js → quick-access-134b051c.esm.js} +7 -8
- package/dist/{quick-access-bd5cc59f.cjs.prod.js → quick-access-444ebdce.cjs.prod.js} +7 -8
- package/dist/{quick-access-98ac50ec.cjs.dev.js → quick-access-59d69a96.cjs.dev.js} +7 -8
- package/dist/{redirect-to-login-2b6962dd.esm.js → redirect-to-login-6c90f034.esm.js} +12 -12
- package/dist/{redirect-to-login-cc23cd31.cjs.prod.js → redirect-to-login-bc568233.cjs.prod.js} +12 -12
- package/dist/{redirect-to-login-1e136a4f.cjs.dev.js → redirect-to-login-e4cbcc7a.cjs.dev.js} +12 -12
- package/dist/{redirect-to-logout-47a5daea.esm.js → redirect-to-logout-732ccf57.esm.js} +10 -9
- package/dist/{redirect-to-logout-d6dce2e6.cjs.dev.js → redirect-to-logout-cf0a4d95.cjs.dev.js} +10 -9
- package/dist/{redirect-to-logout-dd88770a.cjs.prod.js → redirect-to-logout-e608f60c.cjs.prod.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-84434d03.cjs.prod.js → requests-in-flight-loader-a59adc86.cjs.prod.js} +7 -6
- package/dist/{requests-in-flight-loader-2b781c0e.esm.js → requests-in-flight-loader-b52b55fb.esm.js} +7 -6
- package/dist/{requests-in-flight-loader-d908a6df.cjs.dev.js → requests-in-flight-loader-cb996eb9.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-23846f90.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-51ec5202.cjs.dev.js → service-page-project-switcher-68e55d2a.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-da4d68ce.esm.js → service-page-project-switcher-fc88ffa8.esm.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-15ea8813.esm.js} +3 -3
- package/dist/{use-applications-menu-5873c7ab.cjs.dev.js → use-applications-menu-4f35b214.cjs.dev.js} +3 -3
- package/dist/{use-applications-menu-08236536.cjs.prod.js → use-applications-menu-e19bc05b.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-a724a9b9.cjs.prod.js → user-settings-menu-695efeec.cjs.prod.js} +9 -8
- package/dist/{user-settings-menu-986485b8.esm.js → user-settings-menu-8080c4ff.esm.js} +9 -8
- package/dist/{user-settings-menu-6a7ff392.cjs.dev.js → user-settings-menu-d08e3b19.cjs.dev.js} +9 -8
- package/dist/{version-tracker-90a08689.cjs.dev.js → version-tracker-0fe7660b.cjs.dev.js} +2 -2
- package/dist/{version-tracker-3d9b5cf0.cjs.prod.js → version-tracker-3b691dec.cjs.prod.js} +2 -2
- package/dist/{version-tracker-cba298d4.esm.js → version-tracker-cb877c84.esm.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
|
@@ -27,13 +27,13 @@ import { Provider } from 'react-redux';
|
|
|
27
27
|
import { Router } from 'react-router-dom';
|
|
28
28
|
import invariant from 'tiny-invariant';
|
|
29
29
|
import { entryPointUriPathToPermissionKeys } from '@commercetools-frontend/application-config/ssr';
|
|
30
|
-
import { ApplicationContextProvider } from '@commercetools-frontend/application-shell-connectors';
|
|
30
|
+
import { ApplicationContextProvider, CustomViewContextProvider } from '@commercetools-frontend/application-shell-connectors';
|
|
31
31
|
import { createEnhancedHistory } from '@commercetools-frontend/browser-history';
|
|
32
32
|
import { DOMAINS } from '@commercetools-frontend/constants';
|
|
33
33
|
import { NotificationProviderForCustomComponent, NotificationsList } from '@commercetools-frontend/react-notifications';
|
|
34
34
|
import { createTestMiddleware } from '@commercetools-frontend/sdk/test-utils';
|
|
35
|
-
import { A as ApplicationEntryPoint } from '../../dist/application-entry-point-
|
|
36
|
-
import { n as createReduxStore, d as createApolloClient } from '../../dist/configure-apollo-
|
|
35
|
+
import { A as ApplicationEntryPoint } from '../../dist/application-entry-point-bfcf85aa.esm.js';
|
|
36
|
+
import { n as createReduxStore, d as createApolloClient } from '../../dist/configure-apollo-a219411c.esm.js';
|
|
37
37
|
import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
|
|
38
38
|
import '@commercetools-frontend/application-components';
|
|
39
39
|
import '@commercetools-frontend/permissions';
|
|
@@ -50,7 +50,7 @@ import '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
|
50
50
|
import '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
51
51
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
52
52
|
import '@commercetools-frontend/sentry';
|
|
53
|
-
import '../../dist/constants-
|
|
53
|
+
import '../../dist/constants-0b9c2426.esm.js';
|
|
54
54
|
import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
55
55
|
import 'redux-logger';
|
|
56
56
|
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
@@ -76,8 +76,8 @@ import '@apollo/client/link/retry';
|
|
|
76
76
|
|
|
77
77
|
const _excluded = ["children"],
|
|
78
78
|
_excluded2 = ["children"];
|
|
79
|
-
function ownKeys(
|
|
80
|
-
function _objectSpread(
|
|
79
|
+
function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
80
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys$1(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context10 = ownKeys$1(Object(t))).call(_context10, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
81
81
|
const defaultProject = {
|
|
82
82
|
key: 'test-with-big-data',
|
|
83
83
|
version: 43,
|
|
@@ -264,9 +264,9 @@ function createApplicationProviders() {
|
|
|
264
264
|
project = _ref.project,
|
|
265
265
|
_ref$dataLocale = _ref.dataLocale,
|
|
266
266
|
dataLocale = _ref$dataLocale === void 0 ? 'en' : _ref$dataLocale;
|
|
267
|
-
const mergedUser = user === null ? undefined : _objectSpread(_objectSpread({}, defaultUser), user);
|
|
268
|
-
const mergedProject = project === null ? undefined : _objectSpread(_objectSpread({}, defaultProject), project);
|
|
269
|
-
const mergedEnvironment = _objectSpread(_objectSpread({}, defaultEnvironment), environment);
|
|
267
|
+
const mergedUser = user === null ? undefined : _objectSpread$1(_objectSpread$1({}, defaultUser), user);
|
|
268
|
+
const mergedProject = project === null ? undefined : _objectSpread$1(_objectSpread$1({}, defaultProject), project);
|
|
269
|
+
const mergedEnvironment = _objectSpread$1(_objectSpread$1({}, defaultEnvironment), environment);
|
|
270
270
|
|
|
271
271
|
// Provide default permissions to render the application route.
|
|
272
272
|
if (mergedProject) {
|
|
@@ -341,17 +341,17 @@ function renderApp(ui) {
|
|
|
341
341
|
history = _createApplicationPro.history;
|
|
342
342
|
|
|
343
343
|
// eslint-disable-next-line testing-library/render-result-naming-convention
|
|
344
|
-
const rendered = rtl.render(ui, _objectSpread(_objectSpread({}, options), {}, {
|
|
344
|
+
const rendered = rtl.render(ui, _objectSpread$1(_objectSpread$1({}, options), {}, {
|
|
345
345
|
// eslint-disable-next-line react/display-name
|
|
346
346
|
wrapper: _ref2 => {
|
|
347
347
|
let children = _ref2.children,
|
|
348
348
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
349
|
-
return jsx(ApplicationProviders, _objectSpread(_objectSpread({}, props), {}, {
|
|
349
|
+
return jsx(ApplicationProviders, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
350
350
|
children: wrapIfNeeded(children, options.wrapper)
|
|
351
351
|
}));
|
|
352
352
|
}
|
|
353
353
|
}));
|
|
354
|
-
return _objectSpread(_objectSpread({}, rendered), {}, {
|
|
354
|
+
return _objectSpread$1(_objectSpread$1({}, rendered), {}, {
|
|
355
355
|
// adding `history` to the returned utilities to allow us
|
|
356
356
|
// to reference it in our tests (just try to avoid using
|
|
357
357
|
// this to test implementation details).
|
|
@@ -426,17 +426,17 @@ function renderAppWithRedux(ui) {
|
|
|
426
426
|
ReduxProviders = _createReduxProviders.ReduxProviders,
|
|
427
427
|
reduxStore = _createReduxProviders.reduxStore;
|
|
428
428
|
// eslint-disable-next-line testing-library/render-result-naming-convention
|
|
429
|
-
const rendered = renderApp(ui, _objectSpread(_objectSpread({}, options), {}, {
|
|
429
|
+
const rendered = renderApp(ui, _objectSpread$1(_objectSpread$1({}, options), {}, {
|
|
430
430
|
// eslint-disable-next-line react/display-name
|
|
431
431
|
wrapper: _ref4 => {
|
|
432
432
|
let children = _ref4.children,
|
|
433
433
|
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
434
|
-
return jsx(ReduxProviders, _objectSpread(_objectSpread({}, props), {}, {
|
|
434
|
+
return jsx(ReduxProviders, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
435
435
|
children: wrapIfNeeded(children, options.wrapper)
|
|
436
436
|
}));
|
|
437
437
|
}
|
|
438
438
|
}));
|
|
439
|
-
return _objectSpread(_objectSpread({}, rendered), {}, {
|
|
439
|
+
return _objectSpread$1(_objectSpread$1({}, rendered), {}, {
|
|
440
440
|
// adding `store` to the returned utilities to allow us
|
|
441
441
|
// to reference it in our tests (just try to avoid using
|
|
442
442
|
// this to test implementation details).
|
|
@@ -456,7 +456,7 @@ function renderHook(callback) {
|
|
|
456
456
|
history = _createApplicationPro2.history;
|
|
457
457
|
|
|
458
458
|
// eslint-disable-next-line testing-library/render-result-naming-convention
|
|
459
|
-
const rendered = rtlHooks.renderHook(callback, _objectSpread(_objectSpread({}, options), {}, {
|
|
459
|
+
const rendered = rtlHooks.renderHook(callback, _objectSpread$1(_objectSpread$1({}, options), {}, {
|
|
460
460
|
// eslint-disable-next-line react/display-name
|
|
461
461
|
wrapper: _ref5 => {
|
|
462
462
|
let children = _ref5.children;
|
|
@@ -467,7 +467,7 @@ function renderHook(callback) {
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
}));
|
|
470
|
-
return _objectSpread(_objectSpread({}, rendered), {}, {
|
|
470
|
+
return _objectSpread$1(_objectSpread$1({}, rendered), {}, {
|
|
471
471
|
store: reduxStore,
|
|
472
472
|
history,
|
|
473
473
|
user: mergedUser,
|
|
@@ -477,8 +477,42 @@ function renderHook(callback) {
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
// namespace for hooks related helpers
|
|
480
|
-
const hooks = _objectSpread(_objectSpread({}, rtlHooks), {}, {
|
|
480
|
+
const hooks = _objectSpread$1(_objectSpread$1({}, rtlHooks), {}, {
|
|
481
481
|
renderHook
|
|
482
482
|
});
|
|
483
483
|
|
|
484
|
-
|
|
484
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
485
|
+
let TCustomViewType = /*#__PURE__*/function (TCustomViewType) {
|
|
486
|
+
TCustomViewType["CustomPanel"] = "CustomPanel";
|
|
487
|
+
return TCustomViewType;
|
|
488
|
+
}({});
|
|
489
|
+
|
|
490
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
491
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
492
|
+
const testCustomViewData = {
|
|
493
|
+
id: 'custom-view-id',
|
|
494
|
+
defaultLabel: 'My View',
|
|
495
|
+
labelAllLocales: [],
|
|
496
|
+
url: 'https://my-view.com',
|
|
497
|
+
type: TCustomViewType.CustomPanel,
|
|
498
|
+
locators: ['products.product_details.general'],
|
|
499
|
+
permissions: [{
|
|
500
|
+
name: 'view',
|
|
501
|
+
oAuthScopes: ['view_products']
|
|
502
|
+
}]
|
|
503
|
+
};
|
|
504
|
+
const renderCustomView = props => {
|
|
505
|
+
var _props$customViewHost;
|
|
506
|
+
return renderApp(jsx(CustomViewContextProvider, {
|
|
507
|
+
hostUrl: (_props$customViewHost = props.customViewHostUrl) !== null && _props$customViewHost !== void 0 ? _props$customViewHost : 'https://mc.ct.com/my-project/products/product-id-1',
|
|
508
|
+
customViewConfig: _objectSpread(_objectSpread({}, testCustomViewData), props.customViewConfig),
|
|
509
|
+
children: props.children
|
|
510
|
+
}), {
|
|
511
|
+
locale: props.locale,
|
|
512
|
+
project: {
|
|
513
|
+
key: props.projectKey
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
export { denormalizeActionRights, denormalizeDataFences, denormalizePermissions, hooks, mapResourceAccessToAppliedPermissions, renderApp, renderAppWithRedux, renderCustomView };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type TCustomView } from '../../types/generated/settings';
|
|
3
|
-
type TCustomViewContext = {
|
|
4
|
-
config: TCustomView;
|
|
5
|
-
};
|
|
6
|
-
type TCustomViewContextProviderProps = {
|
|
7
|
-
config: TCustomView;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export declare const CustomViewContextProvider: (props: TCustomViewContextProviderProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
11
|
-
export declare const useCustomViewContext: () => TCustomViewContext;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './custom-view-context';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/* eslint-disable prettier/prettier */
|
|
2
|
-
declare const styles: {"left-navigation":"navbar-mod__left-navigation___n7yUt","left-navigation-new":"navbar-mod__left-navigation-new___31u-2","list":"navbar-mod__list___RCV3J","scrollable-menu":"navbar-mod__scrollable-menu___64pxJ","list-item":"navbar-mod__list-item___MjK6t","item-link":"navbar-mod__item-link___X2Ina","item-icon-text":"navbar-mod__item-icon-text___a-8JY","icon":"navbar-mod__icon___bLsep","icon__active":"navbar-mod__icon__active___asorg","title":"navbar-mod__title___eRWUj","expander":"navbar-mod__expander___jyAUi","expand-icon":"navbar-mod__expand-icon___BtmRa","item--bottom":"navbar-mod__item--bottom___eW7nh","item__active":"navbar-mod__item__active___lo1sr","item_menu-open":"navbar-mod__item_menu-open___zk0zh","item_menu-collapsed":"navbar-mod__item_menu-collapsed___cluyY","item__no-submenu":"navbar-mod__item__no-submenu___0lmiH","sublist":"navbar-mod__sublist___os1s7","sublist-no-children":"navbar-mod__sublist-no-children___Dy-h-","title-copy":"navbar-mod__title-copy___o2y1q","sublist-new":"navbar-mod__sublist-new___5gy2L","sublist__inactive":"navbar-mod__sublist__inactive___kJvf-","sublist-item":"navbar-mod__sublist-item___gafkS","sublist-item-new":"navbar-mod__sublist-item-new___z6xTy","sublist-item-new__active":"navbar-mod__sublist-item-new__active___ZNiqu","text":"navbar-mod__text___ccHEu","text-link":"navbar-mod__text-link___dhtj6","text-link-new":"navbar-mod__text-link-new___1mTbx","item_menu__active":"navbar-mod__item_menu__active___5xFRw","icon-container":"navbar-mod__icon-container___w3FtA","fixed-menu":"navbar-mod__fixed-menu___42tD9","sublist-expanded__active":"navbar-mod__sublist-expanded__active___240JK","sublist-collapsed__active":"navbar-mod__sublist-collapsed__active___-9vYh","sublist-collapsed-new__active":"navbar-mod__sublist-collapsed-new__active___scHEz","sublist-expanded-new__active":"navbar-mod__sublist-expanded-new__active___KJ32l","highlighted":"navbar-mod__highlighted___oJWkA","highlighted-new":"navbar-mod__highlighted-new___tJFEc","hidden":"navbar-mod__hidden___TQLSs","divider":"navbar-mod__divider___TpVzu","loading-dot-container":"navbar-mod__loading-dot-container___G2LVb","scrollable-menu-new":"navbar-mod__scrollable-menu-new___4yfOE"};
|
|
3
|
-
export default styles;
|