@commercetools-frontend/application-shell 22.2.0 → 22.3.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-362fa5d0.cjs.dev.js → application-entry-point-0c3254b0.cjs.dev.js} +10 -19
- package/dist/{application-entry-point-390ae225.cjs.prod.js → application-entry-point-2333abb6.cjs.prod.js} +10 -19
- package/dist/{application-entry-point-587966d5.esm.js → application-entry-point-a1dfe994.esm.js} +10 -19
- package/dist/{box-6b5be9a9.cjs.dev.js → box-686bc950.cjs.dev.js} +0 -2
- package/dist/{box-4395623b.esm.js → box-6ce924c9.esm.js} +0 -2
- package/dist/{box-8850277f.cjs.prod.js → box-e17daf6c.cjs.prod.js} +0 -2
- package/dist/{cart-a49faf67.esm.js → cart-3b156a46.esm.js} +0 -2
- package/dist/{cart-41f0b7bc.cjs.dev.js → cart-796beed7.cjs.dev.js} +0 -2
- package/dist/{cart-0698b97d.cjs.prod.js → cart-f2fc1baf.cjs.prod.js} +0 -2
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +5 -5
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +5 -5
- package/dist/commercetools-frontend-application-shell.esm.js +5 -5
- package/dist/{configure-apollo-249465d4.cjs.prod.js → configure-apollo-70d83707.cjs.prod.js} +64 -181
- package/dist/{configure-apollo-4d96823e.esm.js → configure-apollo-89ea99bf.esm.js} +64 -183
- package/dist/{configure-apollo-63948b67.cjs.dev.js → configure-apollo-de2b9aa2.cjs.dev.js} +64 -183
- package/dist/{connected-square-47233754.cjs.dev.js → connected-square-960e046b.cjs.prod.js} +0 -2
- package/dist/{connected-square-b2e25621.cjs.prod.js → connected-square-961eb5b6.cjs.dev.js} +0 -2
- package/dist/{connected-square-3cac6bd7.esm.js → connected-square-f34a98ff.esm.js} +0 -2
- package/dist/{constants-a3c2194a.cjs.prod.js → constants-902cf3f3.cjs.prod.js} +2 -1
- package/dist/{constants-940f343f.esm.js → constants-b962b73e.esm.js} +2 -1
- package/dist/{constants-b201d328.cjs.dev.js → constants-e51cdcc0.cjs.dev.js} +2 -1
- package/dist/declarations/src/components/app-bar/app-bar.d.ts +1 -1
- package/dist/declarations/src/components/application-entry-point/application-entry-point.d.ts +1 -1
- package/dist/declarations/src/components/application-loader/application-loader.d.ts +1 -1
- package/dist/declarations/src/components/application-shell/application-shell.d.ts +1 -1
- package/dist/declarations/src/components/application-shell/global-styles.d.ts +1 -1
- package/dist/declarations/src/components/application-shell-authenticated/application-shell-authenticated.d.ts +1 -1
- package/dist/declarations/src/components/application-shell-provider/application-shell-provider.d.ts +1 -2
- package/dist/declarations/src/components/application-shell-provider/utils.d.ts +2 -0
- package/dist/declarations/src/components/authenticated/am-i-logged-in.d.ts +1 -1
- package/dist/declarations/src/components/authenticated/authenticated.d.ts +1 -1
- package/dist/declarations/src/components/authenticated/oidc-callback-error-page.d.ts +1 -1
- package/dist/declarations/src/components/authenticated/oidc-callback.async.d.ts +1 -1
- package/dist/declarations/src/components/authenticated/oidc-callback.d.ts +1 -1
- package/dist/declarations/src/components/back-to-project/back-to-project.d.ts +1 -1
- package/dist/declarations/src/components/configure-intl-provider/configure-intl-provider.d.ts +1 -1
- package/dist/declarations/src/components/error-apologizer/error-apologizer.d.ts +1 -1
- package/dist/declarations/src/components/error-apologizer/index.d.ts +1 -1
- package/dist/declarations/src/components/error-boundary/error-boundary.d.ts +1 -1
- package/dist/declarations/src/components/fetch-project/fetch-project.d.ts +1 -1
- package/dist/declarations/src/components/fetch-user/fetch-user.d.ts +1 -1
- package/dist/declarations/src/components/inject-reducers/inject-reducers.d.ts +1 -1
- package/dist/declarations/src/components/locale-switcher/locale-switcher.d.ts +2 -2
- package/dist/declarations/src/components/navbar/index.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/box.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/cart.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/connected-square.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/gear.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/heart.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/list-with-search.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/paperclip.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/plugin.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/rocket.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/speedometer.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/star.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/tag-multi.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/tree-structure.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/user-filled.d.ts +1 -1
- package/dist/declarations/src/components/navbar/legacy-icons/world.d.ts +1 -1
- package/dist/declarations/src/components/navbar/loading-navbar.d.ts +1 -1
- package/dist/declarations/src/components/navbar/menu-items.d.ts +8 -8
- package/dist/declarations/src/components/navbar/navbar.d.ts +1 -1
- package/dist/declarations/src/components/project-container/index.d.ts +1 -1
- package/dist/declarations/src/components/project-container/project-container.d.ts +1 -1
- package/dist/declarations/src/components/project-data-locale/project-data-locale.d.ts +1 -1
- package/dist/declarations/src/components/project-expired/index.d.ts +1 -1
- package/dist/declarations/src/components/project-expired/project-expired.d.ts +1 -1
- package/dist/declarations/src/components/project-not-found/index.d.ts +1 -1
- package/dist/declarations/src/components/project-not-found/project-not-found.d.ts +1 -1
- package/dist/declarations/src/components/project-not-initialized/index.d.ts +1 -1
- package/dist/declarations/src/components/project-not-initialized/project-not-initialized.d.ts +1 -1
- package/dist/declarations/src/components/project-suspended/index.d.ts +1 -1
- package/dist/declarations/src/components/project-suspended/project-suspended.d.ts +1 -1
- package/dist/declarations/src/components/project-switcher/project-switcher.d.ts +3 -3
- package/dist/declarations/src/components/quick-access/butler/butler.d.ts +1 -1
- package/dist/declarations/src/components/quick-access/butler-command/butler-command.d.ts +1 -1
- package/dist/declarations/src/components/quick-access/index.d.ts +1 -1
- package/dist/declarations/src/components/quick-access/quick-access.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-login/index.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-login/redirect-to-login.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-logout/index.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-logout/redirect-to-logout.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-project-create/index.d.ts +1 -1
- package/dist/declarations/src/components/redirect-to-project-create/redirect-to-project-create.d.ts +1 -1
- package/dist/declarations/src/components/route-catch-all/index.d.ts +1 -1
- package/dist/declarations/src/components/route-catch-all/route-catch-all.d.ts +1 -1
- package/dist/declarations/src/components/service-page-project-switcher/service-page-project-switcher.d.ts +1 -1
- package/dist/declarations/src/components/setup-flop-flip-provider/setup-flop-flip-provider.d.ts +1 -1
- package/dist/declarations/src/components/suspended-route/suspended-route.d.ts +1 -1
- package/dist/declarations/src/components/theme-switcher/new-design-release-info-dialog.d.ts +1 -1
- package/dist/declarations/src/components/theme-switcher/theme-switcher.d.ts +1 -1
- package/dist/declarations/src/components/user-settings-menu/index.d.ts +1 -1
- package/dist/declarations/src/components/user-settings-menu/user-settings-menu.d.ts +3 -3
- package/dist/declarations/src/types/generated/settings.d.ts +89 -1151
- package/dist/{error-apologizer-57a2fb57.cjs.prod.js → error-apologizer-24ad0b88.cjs.prod.js} +0 -3
- package/dist/{error-apologizer-d0409fcb.esm.js → error-apologizer-55551c07.esm.js} +0 -3
- package/dist/{error-apologizer-d20ca326.cjs.dev.js → error-apologizer-a5c03978.cjs.dev.js} +0 -3
- package/dist/{gear-300dd24c.esm.js → gear-1f381738.esm.js} +0 -2
- package/dist/{gear-2890f7fb.cjs.prod.js → gear-9b394c43.cjs.prod.js} +0 -2
- package/dist/{gear-e8014c5a.cjs.dev.js → gear-ab1f6210.cjs.dev.js} +0 -2
- package/dist/{get-mc-origin-7968e04f.cjs.prod.js → get-mc-origin-8f7a578c.cjs.prod.js} +10 -16
- package/dist/{get-mc-origin-314b77a2.cjs.dev.js → get-mc-origin-a86dff20.cjs.dev.js} +10 -16
- package/dist/{get-mc-origin-5df60933.esm.js → get-mc-origin-fecfee07.esm.js} +10 -16
- package/dist/{heart-000a023d.cjs.prod.js → heart-a6e7ccf9.cjs.dev.js} +0 -2
- package/dist/{heart-dded66b4.esm.js → heart-be7c779b.esm.js} +0 -2
- package/dist/{heart-f21b7d39.cjs.dev.js → heart-ebfab4cd.cjs.prod.js} +0 -2
- package/dist/{index-2591875d.cjs.dev.js → index-02a17607.cjs.dev.js} +241 -473
- package/dist/{index-42ea4111.esm.js → index-667035b8.esm.js} +240 -472
- package/dist/{index-2302ee7f.cjs.prod.js → index-a03f4e81.cjs.prod.js} +237 -465
- package/dist/{list-with-search-a3302710.esm.js → list-with-search-3341bbf7.esm.js} +0 -2
- package/dist/{list-with-search-a5b72b33.cjs.prod.js → list-with-search-b5e9ae1b.cjs.dev.js} +0 -2
- package/dist/{list-with-search-ee796e9e.cjs.dev.js → list-with-search-e3ccba98.cjs.prod.js} +0 -2
- package/dist/{navbar-b56b7b35.cjs.prod.js → navbar-00a55ccf.cjs.prod.js} +55 -111
- package/dist/{navbar-70b7575c.cjs.dev.js → navbar-1b61993a.cjs.dev.js} +55 -111
- package/dist/{navbar-ef173893.esm.js → navbar-84dc97f9.esm.js} +55 -111
- package/dist/{new-design-release-info-dialog-629191c2.cjs.dev.js → new-design-release-info-dialog-57843832.cjs.dev.js} +0 -2
- package/dist/{new-design-release-info-dialog-879a4af8.cjs.prod.js → new-design-release-info-dialog-730137e2.cjs.prod.js} +0 -2
- package/dist/{new-design-release-info-dialog-6e19106c.esm.js → new-design-release-info-dialog-e2cd95fa.esm.js} +0 -2
- package/dist/{oidc-15d3a4c1.cjs.dev.js → oidc-4895bd80.cjs.dev.js} +13 -20
- package/dist/{oidc-callback-bcf67ab0.cjs.prod.js → oidc-callback-121ef6c1.cjs.prod.js} +12 -20
- package/dist/{oidc-callback-fd0c6ab8.esm.js → oidc-callback-cddf8bb4.esm.js} +12 -20
- package/dist/{oidc-callback-9538bece.cjs.dev.js → oidc-callback-e60075ab.cjs.dev.js} +12 -20
- package/dist/{oidc-77115492.esm.js → oidc-d7f0409a.esm.js} +13 -20
- package/dist/{oidc-6c79100b.cjs.prod.js → oidc-da4ccc69.cjs.prod.js} +13 -20
- package/dist/{paperclip-23d1e69c.cjs.prod.js → paperclip-6f0b6ae5.cjs.prod.js} +0 -2
- package/dist/{paperclip-a61112e8.esm.js → paperclip-c76aec52.esm.js} +0 -2
- package/dist/{paperclip-d653c134.cjs.dev.js → paperclip-ec55e4a0.cjs.dev.js} +0 -2
- package/dist/{plugin-0ee6aee4.cjs.dev.js → plugin-16c01245.cjs.dev.js} +0 -2
- package/dist/{plugin-3d353a5b.esm.js → plugin-279f88cd.esm.js} +0 -2
- package/dist/{plugin-7e57f237.cjs.prod.js → plugin-f199ed20.cjs.prod.js} +0 -2
- package/dist/{project-container-56d0c955.cjs.dev.js → project-container-51e70095.cjs.dev.js} +21 -46
- package/dist/{project-container-8c617e3c.esm.js → project-container-98c2a789.esm.js} +21 -46
- package/dist/{project-container-32a1d5c4.cjs.prod.js → project-container-e7f950b0.cjs.prod.js} +21 -45
- package/dist/{project-expired-1cc0ccbb.cjs.prod.js → project-expired-1cd4843f.cjs.prod.js} +6 -11
- package/dist/{project-expired-73713e7e.esm.js → project-expired-513a8320.esm.js} +6 -11
- package/dist/{project-expired-2a72b968.cjs.dev.js → project-expired-fd3efa19.cjs.dev.js} +6 -11
- package/dist/{project-not-found-a3b0d2f0.esm.js → project-not-found-8bab15e7.esm.js} +6 -9
- package/dist/{project-not-found-6b42e6c0.cjs.prod.js → project-not-found-9f21b30c.cjs.prod.js} +6 -9
- package/dist/{project-not-found-a09d8a13.cjs.dev.js → project-not-found-e5eb5b7e.cjs.dev.js} +6 -9
- package/dist/{project-not-initialized-dbaa28e7.cjs.dev.js → project-not-initialized-3cdb8692.cjs.dev.js} +6 -11
- package/dist/{project-not-initialized-dfca89f5.cjs.prod.js → project-not-initialized-a1a8d9dc.cjs.prod.js} +6 -11
- package/dist/{project-not-initialized-2542a33a.esm.js → project-not-initialized-a8562fd3.esm.js} +6 -11
- package/dist/{project-suspended-b78011e8.cjs.dev.js → project-suspended-79c67f38.cjs.dev.js} +6 -10
- package/dist/{project-suspended-231a0961.cjs.prod.js → project-suspended-8a558cb8.cjs.prod.js} +6 -10
- package/dist/{project-suspended-ccaaa1d7.esm.js → project-suspended-e0fb960a.esm.js} +6 -10
- package/dist/{quick-access-a2d18d3b.cjs.dev.js → quick-access-0fb30eee.cjs.dev.js} +124 -194
- package/dist/{quick-access-3dabce21.esm.js → quick-access-8c7919d2.esm.js} +124 -194
- package/dist/{quick-access-54ce94b5.cjs.prod.js → quick-access-ff6fee75.cjs.prod.js} +123 -191
- package/dist/{redirect-to-login-3fecfdc9.esm.js → redirect-to-login-02167259.esm.js} +14 -18
- package/dist/{redirect-to-login-f8ba63e5.cjs.prod.js → redirect-to-login-3c2a1258.cjs.prod.js} +14 -18
- package/dist/{redirect-to-login-fa9676c1.cjs.dev.js → redirect-to-login-73396807.cjs.dev.js} +14 -18
- package/dist/{redirect-to-logout-2d96cea9.cjs.prod.js → redirect-to-logout-838758f3.cjs.prod.js} +7 -12
- package/dist/{redirect-to-logout-764c003b.esm.js → redirect-to-logout-b5c8fdbf.esm.js} +7 -12
- package/dist/{redirect-to-logout-b0f5c48e.cjs.dev.js → redirect-to-logout-be3e139d.cjs.dev.js} +7 -12
- package/dist/{redirect-to-project-create-048efa71.cjs.prod.js → redirect-to-project-create-2266c427.cjs.prod.js} +1 -3
- package/dist/{redirect-to-project-create-f0e7b35e.cjs.dev.js → redirect-to-project-create-7b476aa6.cjs.dev.js} +1 -3
- package/dist/{redirect-to-project-create-052f293e.esm.js → redirect-to-project-create-c5323504.esm.js} +1 -3
- package/dist/{redirector-47a6be71.esm.js → redirector-368eeb0f.esm.js} +1 -8
- package/dist/{redirector-0d98f9df.cjs.dev.js → redirector-ec9fa17f.cjs.prod.js} +1 -8
- package/dist/{redirector-77ce2f5c.cjs.prod.js → redirector-f71198cc.cjs.dev.js} +1 -8
- package/dist/{requests-in-flight-loader-23a03381.cjs.dev.js → requests-in-flight-loader-3a40411c.cjs.dev.js} +5 -9
- package/dist/{requests-in-flight-loader-6e4fd082.esm.js → requests-in-flight-loader-78bce8a5.esm.js} +5 -9
- package/dist/{requests-in-flight-loader-40b16b26.cjs.prod.js → requests-in-flight-loader-d7963726.cjs.prod.js} +5 -9
- package/dist/{rocket-4b088727.esm.js → rocket-067c2f8c.esm.js} +0 -2
- package/dist/{rocket-3e3f0a98.cjs.prod.js → rocket-c6d44215.cjs.dev.js} +0 -2
- package/dist/{rocket-95b6858d.cjs.dev.js → rocket-f0bfae34.cjs.prod.js} +0 -2
- package/dist/{route-catch-all-3b490df1.cjs.prod.js → route-catch-all-293a1269.cjs.dev.js} +6 -6
- package/dist/{route-catch-all-9ac99936.cjs.dev.js → route-catch-all-373c69c6.cjs.prod.js} +6 -6
- package/dist/{route-catch-all-01cf0095.esm.js → route-catch-all-4af77675.esm.js} +6 -6
- package/dist/{service-page-project-switcher-4341744e.cjs.dev.js → service-page-project-switcher-2a4bc3ee.cjs.dev.js} +3 -4
- package/dist/{service-page-project-switcher-4c425f79.cjs.prod.js → service-page-project-switcher-617a204e.cjs.prod.js} +3 -3
- package/dist/{service-page-project-switcher-fd691711.esm.js → service-page-project-switcher-b99782a7.esm.js} +3 -4
- package/dist/{speedometer-2881cef6.cjs.prod.js → speedometer-0de260cf.cjs.prod.js} +0 -2
- package/dist/{speedometer-54f872f2.cjs.dev.js → speedometer-aedd9660.cjs.dev.js} +0 -2
- package/dist/{speedometer-08a11d5a.esm.js → speedometer-baa6ae82.esm.js} +0 -2
- package/dist/{star-52bf7a64.cjs.dev.js → star-49745c72.cjs.dev.js} +0 -2
- package/dist/{star-15244db1.esm.js → star-bd723a9c.esm.js} +0 -2
- package/dist/{star-f8502efb.cjs.prod.js → star-c11b0683.cjs.prod.js} +0 -2
- package/dist/{tag-multi-3be995ac.esm.js → tag-multi-1dee8212.esm.js} +0 -2
- package/dist/{tag-multi-1d1553b6.cjs.dev.js → tag-multi-2e7a68ec.cjs.dev.js} +0 -2
- package/dist/{tag-multi-f9acb1c2.cjs.prod.js → tag-multi-f8d9c9e6.cjs.prod.js} +0 -2
- package/dist/{tree-structure-c8753526.esm.js → tree-structure-0a1dc6bf.esm.js} +0 -2
- package/dist/{tree-structure-4650688d.cjs.dev.js → tree-structure-690366f9.cjs.prod.js} +0 -2
- package/dist/{tree-structure-f24ee3f6.cjs.prod.js → tree-structure-8c974c7a.cjs.dev.js} +0 -2
- package/dist/{use-applications-menu-390a31f4.cjs.dev.js → use-applications-menu-2046cce4.cjs.dev.js} +30 -40
- package/dist/{use-applications-menu-1d53322d.cjs.prod.js → use-applications-menu-84a888d7.cjs.prod.js} +30 -40
- package/dist/{use-applications-menu-6f960374.esm.js → use-applications-menu-daf4a744.esm.js} +30 -40
- package/dist/{use-is-served-by-proxy-499bfa16.esm.js → use-is-served-by-proxy-77984220.esm.js} +0 -2
- package/dist/{use-is-served-by-proxy-2b4916e5.cjs.dev.js → use-is-served-by-proxy-845cace5.cjs.prod.js} +0 -2
- package/dist/{use-is-served-by-proxy-51e76976.cjs.prod.js → use-is-served-by-proxy-ed411f45.cjs.dev.js} +0 -2
- package/dist/{user-filled-2e6cb25e.cjs.dev.js → user-filled-58af1ae4.cjs.prod.js} +0 -2
- package/dist/{user-filled-815b49a0.cjs.prod.js → user-filled-5dd7a51a.cjs.dev.js} +0 -2
- package/dist/{user-filled-2dc4e79e.esm.js → user-filled-d40a7e17.esm.js} +0 -2
- package/dist/{user-settings-menu-4646418a.esm.js → user-settings-menu-b8ecc868.esm.js} +16 -53
- package/dist/{user-settings-menu-22bf89c0.cjs.prod.js → user-settings-menu-c50b95e4.cjs.prod.js} +16 -52
- package/dist/{user-settings-menu-c8b3ee57.cjs.dev.js → user-settings-menu-fe393647.cjs.dev.js} +16 -53
- package/dist/{version-tracker-9fd44381.cjs.dev.js → version-tracker-3b9eb5c6.cjs.dev.js} +5 -5
- package/dist/{version-tracker-71b6de2c.cjs.prod.js → version-tracker-4ad14ed3.cjs.prod.js} +5 -5
- package/dist/{version-tracker-5c514d81.esm.js → version-tracker-f2e3185f.esm.js} +5 -5
- package/dist/{world-c5ea311a.esm.js → world-1b0e72fc.esm.js} +0 -2
- package/dist/{world-973090a5.cjs.dev.js → world-bfd04f52.cjs.dev.js} +0 -2
- package/dist/{world-e1f9dbf8.cjs.prod.js → world-f921d80c.cjs.prod.js} +0 -2
- package/package.json +41 -27
- 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 +78 -112
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +78 -112
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +78 -112
|
@@ -18,15 +18,15 @@ import { useLocation, matchPath } from 'react-router-dom';
|
|
|
18
18
|
import { normalizeAllAppliedPermissions, normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities } from '@commercetools-frontend/application-shell-connectors';
|
|
19
19
|
import { GRAPHQL_TARGETS, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
20
20
|
import { SupportIcon } from '@commercetools-uikit/icons';
|
|
21
|
-
import { u as useMcQuery, N as NavBarLayout, M as MenuGroup, a as MenuItemDivider, F as Faded, b as MenuItem, c as MenuExpander, d as RestrictedMenuItem, e as MenuItemLink, I as IconSwitcher, f as MenuLabel } from './index-
|
|
21
|
+
import { u as useMcQuery, N as NavBarLayout, M as MenuGroup, a as MenuItemDivider, F as Faded, b as MenuItem, c as MenuExpander, d as RestrictedMenuItem, e as MenuItemLink, I as IconSwitcher, f as MenuLabel } from './index-667035b8.esm.js';
|
|
22
22
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
23
23
|
import isNil from 'lodash/isNil';
|
|
24
24
|
import throttle from 'lodash/throttle';
|
|
25
25
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
26
|
-
import { S as STORAGE_KEYS } from './constants-
|
|
27
|
-
import { u as useApplicationsMenu } from './use-applications-menu-
|
|
26
|
+
import { S as STORAGE_KEYS } from './constants-b962b73e.esm.js';
|
|
27
|
+
import { u as useApplicationsMenu } from './use-applications-menu-daf4a744.esm.js';
|
|
28
28
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
29
|
-
import './configure-apollo-
|
|
29
|
+
import './configure-apollo-89ea99bf.esm.js';
|
|
30
30
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
31
31
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
32
32
|
import '@babel/runtime-corejs3/core-js-stable/reflect/has';
|
|
@@ -70,7 +70,7 @@ import '@commercetools-frontend/assets/images/logo.svg';
|
|
|
70
70
|
import '@commercetools-uikit/design-system';
|
|
71
71
|
import '@commercetools-uikit/spacings';
|
|
72
72
|
import '@commercetools-uikit/flat-button';
|
|
73
|
-
import './use-is-served-by-proxy-
|
|
73
|
+
import './use-is-served-by-proxy-77984220.esm.js';
|
|
74
74
|
import '@babel/runtime-corejs3/helpers/taggedTemplateLiteral';
|
|
75
75
|
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
76
76
|
import 'memoize-one';
|
|
@@ -93,7 +93,7 @@ import '@flopflip/http-adapter';
|
|
|
93
93
|
import '@flopflip/launchdarkly-adapter';
|
|
94
94
|
import 'react-redux';
|
|
95
95
|
import 'lodash/upperFirst';
|
|
96
|
-
import './oidc-
|
|
96
|
+
import './oidc-d7f0409a.esm.js';
|
|
97
97
|
import '@commercetools-uikit/design-system/materials/resets.css';
|
|
98
98
|
import '@commercetools-frontend/actions-global';
|
|
99
99
|
import '@commercetools-frontend/application-config/ssr';
|
|
@@ -111,57 +111,46 @@ function nonNullable(value) {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var FetchProjectExtensionsNavbar = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProjectExtensionsNavbar" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "projectExtension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "applications" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "ObjectValue", fields: [{ kind: "ObjectField", name: { kind: "Name", value: "isActive" }, value: { kind: "BooleanValue", value: true } }] } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "navbarMenu" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "featureToggle" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "submenu" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "featureToggle" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "installedApplications" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "application" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "entryPointUriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mainMenuLink" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "submenuLinks" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 984, source: { body: "query FetchProjectExtensionsNavbar {\n projectExtension {\n id\n applications(where: { isActive: true }) {\n id\n navbarMenu {\n id\n key\n uriPath\n icon\n labelAllLocales {\n locale\n value\n }\n featureToggle\n permissions\n submenu {\n id\n key\n uriPath\n labelAllLocales {\n locale\n value\n }\n permissions\n featureToggle\n }\n }\n }\n installedApplications {\n application {\n id\n entryPointUriPath\n icon\n mainMenuLink {\n id\n permissions\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n }\n submenuLinks {\n id\n uriPath\n permissions\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
117
|
-
|
|
114
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$1(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$1(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
115
|
+
var FetchProjectExtensionsNavbar = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProjectExtensionsNavbar" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "projectExtension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "installedApplications" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "application" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "entryPointUriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mainMenuLink" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "submenuLinks" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 537, source: { body: "query FetchProjectExtensionsNavbar {\n projectExtension {\n id\n installedApplications {\n application {\n id\n entryPointUriPath\n icon\n mainMenuLink {\n id\n permissions\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n }\n submenuLinks {\n id\n uriPath\n permissions\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
118
116
|
const getInitialState = isForcedMenuOpen => ({
|
|
119
117
|
isExpanderVisible: true,
|
|
120
118
|
isMenuOpen: isNil(isForcedMenuOpen) ? false : isForcedMenuOpen
|
|
121
119
|
});
|
|
122
|
-
|
|
123
120
|
const reducer = (state, action) => {
|
|
124
121
|
switch (action.type) {
|
|
125
122
|
case 'setActiveItemIndex':
|
|
126
123
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
127
124
|
activeItemIndex: action.payload
|
|
128
125
|
});
|
|
129
|
-
|
|
130
126
|
case 'unsetActiveItemIndex':
|
|
131
127
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
132
128
|
activeItemIndex: undefined
|
|
133
129
|
});
|
|
134
|
-
|
|
135
130
|
case 'setIsExpanderVisible':
|
|
136
131
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
137
132
|
isExpanderVisible: true
|
|
138
133
|
});
|
|
139
|
-
|
|
140
134
|
case 'toggleIsMenuOpen':
|
|
141
135
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
142
136
|
isMenuOpen: !state.isMenuOpen
|
|
143
137
|
});
|
|
144
|
-
|
|
145
138
|
case 'setIsMenuOpenAndMakeExpanderVisible':
|
|
146
139
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
147
140
|
isExpanderVisible: true,
|
|
148
141
|
isMenuOpen: action.payload
|
|
149
142
|
});
|
|
150
|
-
|
|
151
143
|
case 'reset':
|
|
152
144
|
return {
|
|
153
145
|
isExpanderVisible: false,
|
|
154
146
|
isMenuOpen: false
|
|
155
147
|
};
|
|
156
|
-
|
|
157
148
|
default:
|
|
158
149
|
return state;
|
|
159
150
|
}
|
|
160
151
|
};
|
|
161
|
-
|
|
162
152
|
const useNavbarStateManager = props => {
|
|
163
|
-
var _context, _context2
|
|
164
|
-
|
|
153
|
+
var _context, _context2;
|
|
165
154
|
const navBarNode = useRef(null);
|
|
166
155
|
const applicationsNavBarMenu = useApplicationsMenu('navBar', {
|
|
167
156
|
queryOptions: {
|
|
@@ -169,55 +158,22 @@ const useNavbarStateManager = props => {
|
|
|
169
158
|
},
|
|
170
159
|
environment: props.environment
|
|
171
160
|
});
|
|
172
|
-
|
|
173
161
|
const _useMcQuery = useMcQuery(FetchProjectExtensionsNavbar, {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const legacyCustomAppsMenu = projectExtensionsQuery && projectExtensionsQuery.projectExtension && projectExtensionsQuery.projectExtension.applications ? _filterInstanceProperty(_context = _mapInstanceProperty(_context2 = projectExtensionsQuery.projectExtension.applications).call(_context2, app => {
|
|
162
|
+
skip: !props.environment.servedByProxy,
|
|
163
|
+
context: {
|
|
164
|
+
target: GRAPHQL_TARGETS.SETTINGS_SERVICE
|
|
165
|
+
},
|
|
166
|
+
fetchPolicy: 'cache-and-network',
|
|
167
|
+
onError: reportErrorToSentry
|
|
168
|
+
}),
|
|
169
|
+
projectExtensionsQuery = _useMcQuery.data;
|
|
170
|
+
const allCustomApplicationsNavbarMenu = projectExtensionsQuery && projectExtensionsQuery.projectExtension && projectExtensionsQuery.projectExtension.installedApplications ? _filterInstanceProperty(_context = _mapInstanceProperty(_context2 = projectExtensionsQuery.projectExtension.installedApplications).call(_context2, installedApplication => {
|
|
184
171
|
var _context3;
|
|
185
|
-
|
|
172
|
+
const application = installedApplication.application;
|
|
186
173
|
// Map the menu properties to match the one from the proxy schema.
|
|
187
174
|
// This is to ensure that the menu object is the same from the proxy
|
|
188
175
|
// config and the custom apps config, thus allowing them to be
|
|
189
176
|
// concatenated and rendered the same way.
|
|
190
|
-
if (!app.navbarMenu) return;
|
|
191
|
-
return {
|
|
192
|
-
key: app.navbarMenu.key,
|
|
193
|
-
uriPath: app.navbarMenu.uriPath,
|
|
194
|
-
labelAllLocales: app.navbarMenu.labelAllLocales || [],
|
|
195
|
-
icon: app.navbarMenu.icon,
|
|
196
|
-
featureToggle: app.navbarMenu.featureToggle,
|
|
197
|
-
permissions: app.navbarMenu.permissions,
|
|
198
|
-
submenu: _mapInstanceProperty(_context3 = app.navbarMenu.submenu || []).call(_context3, menu => ({
|
|
199
|
-
key: menu.key,
|
|
200
|
-
uriPath: menu.uriPath,
|
|
201
|
-
labelAllLocales: menu.labelAllLocales || [],
|
|
202
|
-
featureToggle: menu.featureToggle,
|
|
203
|
-
permissions: menu.permissions,
|
|
204
|
-
menuVisibility: undefined,
|
|
205
|
-
actionRights: undefined,
|
|
206
|
-
dataFences: undefined
|
|
207
|
-
})),
|
|
208
|
-
menuVisibility: undefined,
|
|
209
|
-
actionRights: undefined,
|
|
210
|
-
dataFences: undefined
|
|
211
|
-
};
|
|
212
|
-
})).call(_context, nonNullable) : [];
|
|
213
|
-
const organizationCustomAppsMenu = projectExtensionsQuery && projectExtensionsQuery.projectExtension && projectExtensionsQuery.projectExtension.installedApplications ? _filterInstanceProperty(_context4 = _mapInstanceProperty(_context5 = projectExtensionsQuery.projectExtension.installedApplications).call(_context5, installedApplication => {
|
|
214
|
-
var _context6;
|
|
215
|
-
|
|
216
|
-
const application = installedApplication.application; // Map the menu properties to match the one from the proxy schema.
|
|
217
|
-
// This is to ensure that the menu object is the same from the proxy
|
|
218
|
-
// config and the custom apps config, thus allowing them to be
|
|
219
|
-
// concatenated and rendered the same way.
|
|
220
|
-
|
|
221
177
|
return {
|
|
222
178
|
key: application.id,
|
|
223
179
|
uriPath: application.entryPointUriPath,
|
|
@@ -229,7 +185,7 @@ const useNavbarStateManager = props => {
|
|
|
229
185
|
menuVisibility: undefined,
|
|
230
186
|
actionRights: undefined,
|
|
231
187
|
dataFences: undefined,
|
|
232
|
-
submenu: _mapInstanceProperty(
|
|
188
|
+
submenu: _mapInstanceProperty(_context3 = application.submenuLinks || []).call(_context3, submenuLink => ({
|
|
233
189
|
key: submenuLink.id,
|
|
234
190
|
uriPath: submenuLink.uriPath,
|
|
235
191
|
labelAllLocales: submenuLink.labelAllLocales || [],
|
|
@@ -241,20 +197,19 @@ const useNavbarStateManager = props => {
|
|
|
241
197
|
dataFences: undefined
|
|
242
198
|
}))
|
|
243
199
|
};
|
|
244
|
-
})).call(
|
|
200
|
+
})).call(_context, nonNullable) : [];
|
|
245
201
|
const cachedIsForcedMenuOpen = window.localStorage.getItem(STORAGE_KEYS.IS_FORCED_MENU_OPEN);
|
|
246
202
|
const isForcedMenuOpen = isNil(cachedIsForcedMenuOpen) ? null : JSON.parse(cachedIsForcedMenuOpen);
|
|
247
|
-
|
|
248
203
|
const _useReducer = useReducer(reducer, getInitialState(isForcedMenuOpen)),
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
204
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
205
|
+
state = _useReducer2[0],
|
|
206
|
+
dispatch = _useReducer2[1];
|
|
253
207
|
const checkSize = useCallback(throttle(() => {
|
|
254
208
|
const shouldOpen = window.innerWidth > 1024;
|
|
255
|
-
const canExpandMenu = window.innerWidth > 918;
|
|
256
|
-
// no matter the settings.
|
|
209
|
+
const canExpandMenu = window.innerWidth > 918;
|
|
257
210
|
|
|
211
|
+
// If the screen is small, we should always keep the menu closed,
|
|
212
|
+
// no matter the settings.
|
|
258
213
|
if (!canExpandMenu) {
|
|
259
214
|
if (state.isMenuOpen || state.isExpanderVisible) {
|
|
260
215
|
// and resets the state to avoid conflicts
|
|
@@ -300,7 +255,8 @@ const useNavbarStateManager = props => {
|
|
|
300
255
|
};
|
|
301
256
|
}, [checkSize, shouldCloseMenuFly]);
|
|
302
257
|
useEffect(() => {
|
|
303
|
-
checkSize();
|
|
258
|
+
checkSize();
|
|
259
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
304
260
|
}, []); // <-- run this only once!!
|
|
305
261
|
|
|
306
262
|
useLayoutEffect(() => {
|
|
@@ -319,17 +275,13 @@ const useNavbarStateManager = props => {
|
|
|
319
275
|
type: 'unsetActiveItemIndex'
|
|
320
276
|
});
|
|
321
277
|
}
|
|
322
|
-
|
|
323
278
|
dispatch({
|
|
324
279
|
type: 'toggleIsMenuOpen'
|
|
325
|
-
});
|
|
326
|
-
|
|
280
|
+
});
|
|
281
|
+
// Synchronize the menu state with local storage.
|
|
327
282
|
window.localStorage.setItem(STORAGE_KEYS.IS_FORCED_MENU_OPEN, String(!state.isMenuOpen));
|
|
328
283
|
}, [state.activeItemIndex, state.isMenuOpen]);
|
|
329
284
|
const allInternalApplicationsNavbarMenu = applicationsNavBarMenu || [];
|
|
330
|
-
|
|
331
|
-
const allCustomApplicationsNavbarMenu = _concatInstanceProperty(legacyCustomAppsMenu).call(legacyCustomAppsMenu, organizationCustomAppsMenu);
|
|
332
|
-
|
|
333
285
|
return _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
334
286
|
navBarNode,
|
|
335
287
|
handleToggleItem,
|
|
@@ -341,9 +293,8 @@ const useNavbarStateManager = props => {
|
|
|
341
293
|
};
|
|
342
294
|
|
|
343
295
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
344
|
-
|
|
345
296
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
346
|
-
|
|
297
|
+
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
347
298
|
const compiledStyles = {
|
|
348
299
|
"global": ":root {\n\n /* Left navigation */\n}\n\n/* Left Nav */\n\n.navbar-mod__left-navigation___n7yUt {\n display: flex;\n flex-grow: 1;\n width: 64px;\n z-index: 19999;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n}\n\n.navbar-mod__list___RCV3J {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 0;\n}\n\n.body__menu-open .navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.navbar-mod__list-item___MjK6t {\n width: 64px;\n min-height: 56px;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n margin: 0;\n list-style: none;\n cursor: pointer;\n}\n\n.navbar-mod__item-link___X2Ina {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n padding: var(--spacing-m);\n width: 100%;\n position: relative;\n display: block;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep {\n width: 24px;\n height: 24px;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon__active___asorg > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n flex: 1;\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n display: none;\n opacity: 0;\n transition: all 0.25s ease-in-out;\n text-align: left;\n text-decoration: none;\n}\n\n.navbar-mod__expander___jyAUi {\n border-top: 1px solid var(--color-neutral-40);\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n}\n\n.navbar-mod__expander___jyAUi:hover {\n background: transparent !important;\n}\n\n.navbar-mod__expand-icon___BtmRa {\n align-items: center;\n border-radius: 32px;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n transform: translateX(0) rotateZ(0deg);\n width: 24px;\n}\n\n.navbar-mod__item--bottom___eW7nh {\n position: absolute;\n bottom: 50px;\n}\n\n.navbar-mod__list-item___MjK6t:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-hovered);\n}\n\n.navbar-mod__item__active___lo1sr .navbar-mod__title___eRWUj {\n opacity: 1;\n display: block;\n transition: all 0.2s ease;\n}\n\n.navbar-mod__item_menu-open___zk0zh {\n height: auto !important;\n}\n\n/* NO SUBMENU */\n\n.navbar-mod__item_menu-collapsed___cluyY .navbar-mod__item-link___X2Ina {\n text-align: center;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__title___eRWUj {\n border-bottom: 0;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__sublist___os1s7 {\n padding-top: 40px;\n}\n\n/* left-nav open */\n\n.body__menu-open .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n box-shadow: var(--shadow-for-navbar);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t {\n height: auto;\n min-height: 56px;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt,\n.body__menu-open .navbar-mod__list-item___MjK6t {\n width: 245px;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n display: block;\n opacity: 1;\n margin-left: var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expand-icon___BtmRa {\n transform: translateX(0) rotateZ(180deg);\n}\n\n.body__menu-open .navbar-mod__item__active___lo1sr {\n max-height: 500px;\n transition: max-height 0.25s ease-in;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7 {\n position: relative;\n z-index: 1;\n left: 0;\n margin: 0 0 0 calc(\n 24px + var(--spacing-m) + 4px + 4px\n );\n padding: var(--spacing-m) 0 0;\n background-color: transparent;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7.navbar-mod__sublist-no-children___Dy-h- {\n border: 0;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expander___jyAUi {\n min-height: 50px;\n justify-content: flex-end;\n padding: var(--spacing-m);\n}\n\n/* Second level menu */\n\n.navbar-mod__sublist___os1s7 {\n padding: 75px var(--spacing-l) var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n position: absolute;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar);\n top: 0;\n left: 64px;\n z-index: -1;\n list-style: none;\n opacity: 0.01;\n visibility: hidden;\n}\n\n.navbar-mod__sublist__inactive___kJvf- {\n /* empty block */\n}\n\n.navbar-mod__sublist-item___gafkS {\n padding: var(--spacing-s) 0 0;\n}\n\n.navbar-mod__sublist-item___gafkS:first-of-type {\n padding: 0;\n}\n\n.navbar-mod__sublist-item___gafkS:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__text___ccHEu {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.navbar-mod__text-link___dhtj6 {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.navbar-mod__text-link___dhtj6:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n/* Item active */\n\n.navbar-mod__item__active___lo1sr,\n.navbar-mod__item_menu__active___5xFRw {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n width: calc(\n 205px + 64px -\n var(--spacing-m) * 2\n );\n justify-content: flex-start;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n width: calc(24px + 4px * 2);\n display: flex;\n justify-content: center;\n align-self: flex-start;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n justify-content: flex-start;\n display: flex;\n width: 100%;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n /* empty block */\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n position: relative;\n width: auto;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: 40px;\n}\n\n.navbar-mod__item_menu-collapsed___cluyY.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n max-height: 44px;\n overflow: hidden;\n /* stylelint-disable-next-line value-no-vendor-prefix */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: var(--spacing-m);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n margin-left: 0;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: 205px;\n min-height: 100%;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: calc(100% - calc(\n 24px + var(--spacing-m) + 4px + 4px\n ));\n}\n\n.navbar-mod__sublist-expanded__active___240JK,\n.navbar-mod__sublist-collapsed__active___-9vYh {\n opacity: 1;\n visibility: visible;\n text-align: left;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__highlighted___oJWkA,\n.navbar-mod__highlighted___oJWkA .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-active) !important;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-active);\n}\n\n.navbar-mod__hidden___TQLSs {\n display: none;\n}\n\n.navbar-mod__divider___TpVzu {\n border-top: 1px solid var(--color-neutral-40);\n}\n\n.navbar-mod__loading-dot-container___G2LVb {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n padding-bottom: 32px;\n /* \n FIXME: Make the navbar scrollable in collapsed state.\n NOTE: do not use `overflow-x: hidden; overflow-y: auto;` as this prevents submenus from showing up on hover \n */\n}\n\n.navbar-mod__fixed-menu___42tD9 {\n flex: 0 0 0;\n position: relative;\n}\n",
|
|
349
300
|
"jsonMap": {
|
|
@@ -382,18 +333,13 @@ const compiledStyles = {
|
|
|
382
333
|
}
|
|
383
334
|
};
|
|
384
335
|
const styles = compiledStyles.jsonMap;
|
|
385
|
-
|
|
386
336
|
const getMenuVisibilitiesOfSubmenus = menu => {
|
|
387
337
|
var _context, _context2;
|
|
388
|
-
|
|
389
338
|
return _filterInstanceProperty(_context = _mapInstanceProperty(_context2 = menu.submenu).call(_context2, submenu => submenu.menuVisibility)).call(_context, nonNullable);
|
|
390
339
|
};
|
|
391
|
-
|
|
392
340
|
const getMenuVisibilityOfMainmenu = menu => menu.menuVisibility ? [menu.menuVisibility] : [];
|
|
393
|
-
|
|
394
341
|
const ApplicationMenu = props => {
|
|
395
342
|
var _context3, _props$menu$featureTo, _props$menu$actionRig, _props$menu$dataFence, _context4, _context5;
|
|
396
|
-
|
|
397
343
|
const isMainMenuRouteActive = Boolean(matchPath(props.location.pathname, {
|
|
398
344
|
path: _concatInstanceProperty(_context3 = "/".concat(props.projectKey, "/")).call(_context3, props.menu.uriPath),
|
|
399
345
|
exact: false,
|
|
@@ -405,14 +351,17 @@ const ApplicationMenu = props => {
|
|
|
405
351
|
// the submenu automatically unless the all navbar is collapsed or there are no submenu links.
|
|
406
352
|
if (props.isMenuOpen && isMainMenuRouteActive && hasSubmenu) {
|
|
407
353
|
props.handleToggleItem();
|
|
408
|
-
}
|
|
409
|
-
|
|
354
|
+
}
|
|
355
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
410
356
|
}, [props.isMenuOpen]); // <-- (re)run this only when the all menu expands
|
|
411
357
|
|
|
412
358
|
const namesOfMenuVisibilitiesOfAllSubmenus = hasSubmenu ? getMenuVisibilitiesOfSubmenus(props.menu) : getMenuVisibilityOfMainmenu(props.menu);
|
|
413
|
-
const isMainMenuItemALink =
|
|
414
|
-
|
|
415
|
-
!
|
|
359
|
+
const isMainMenuItemALink =
|
|
360
|
+
// 1. When the navbar is collapsed
|
|
361
|
+
!props.isMenuOpen ||
|
|
362
|
+
// 2. When there is no submenu
|
|
363
|
+
!hasSubmenu ||
|
|
364
|
+
// 3. When the submenu group is active/visible
|
|
416
365
|
props.isActive;
|
|
417
366
|
return jsx(RestrictedMenuItem, {
|
|
418
367
|
keyOfMenuItem: props.menu.key,
|
|
@@ -466,7 +415,6 @@ const ApplicationMenu = props => {
|
|
|
466
415
|
hasSubmenu: hasSubmenu,
|
|
467
416
|
children: hasSubmenu ? _mapInstanceProperty(_context5 = props.menu.submenu).call(_context5, submenu => {
|
|
468
417
|
var _context6, _submenu$featureToggl, _submenu$actionRights, _submenu$dataFences, _context7;
|
|
469
|
-
|
|
470
418
|
return jsx(RestrictedMenuItem, {
|
|
471
419
|
keyOfMenuItem: submenu.key,
|
|
472
420
|
featureToggle: (_submenu$featureToggl = submenu.featureToggle) !== null && _submenu$featureToggl !== void 0 ? _submenu$featureToggl : undefined,
|
|
@@ -481,9 +429,11 @@ const ApplicationMenu = props => {
|
|
|
481
429
|
children: jsx("div", {
|
|
482
430
|
className: styles.text,
|
|
483
431
|
children: jsx(MenuItemLink, {
|
|
484
|
-
linkTo: _concatInstanceProperty(_context7 = "/".concat(props.projectKey, "/")).call(_context7, submenu.uriPath)
|
|
432
|
+
linkTo: _concatInstanceProperty(_context7 = "/".concat(props.projectKey, "/")).call(_context7, submenu.uriPath)
|
|
433
|
+
// We want to use an exact matching strategy to avoid multiple
|
|
434
|
+
// links matching sub-routes.
|
|
485
435
|
,
|
|
486
|
-
exactMatch:
|
|
436
|
+
exactMatch: true,
|
|
487
437
|
useFullRedirectsForLinks: props.useFullRedirectsForLinks,
|
|
488
438
|
onClick: props.onMenuItemClick,
|
|
489
439
|
children: jsx(MenuLabel, {
|
|
@@ -500,7 +450,6 @@ const ApplicationMenu = props => {
|
|
|
500
450
|
})
|
|
501
451
|
}, props.menu.key);
|
|
502
452
|
};
|
|
503
|
-
|
|
504
453
|
ApplicationMenu.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
505
454
|
menu: _pt.oneOfType([_pt.any, _pt.shape({
|
|
506
455
|
defaultLabel: _pt.string
|
|
@@ -520,26 +469,23 @@ ApplicationMenu.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
520
469
|
useFullRedirectsForLinks: _pt.bool.isRequired
|
|
521
470
|
} : {};
|
|
522
471
|
ApplicationMenu.displayName = 'ApplicationMenu';
|
|
523
|
-
|
|
524
472
|
const NavBar = props => {
|
|
525
473
|
const _useNavbarStateManage = useNavbarStateManager({
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
474
|
+
environment: props.environment
|
|
475
|
+
}),
|
|
476
|
+
navBarNode = _useNavbarStateManage.navBarNode,
|
|
477
|
+
isMenuOpen = _useNavbarStateManage.isMenuOpen,
|
|
478
|
+
isExpanderVisible = _useNavbarStateManage.isExpanderVisible,
|
|
479
|
+
activeItemIndex = _useNavbarStateManage.activeItemIndex,
|
|
480
|
+
handleToggleItem = _useNavbarStateManage.handleToggleItem,
|
|
481
|
+
handleToggleMenu = _useNavbarStateManage.handleToggleMenu,
|
|
482
|
+
shouldCloseMenuFly = _useNavbarStateManage.shouldCloseMenuFly,
|
|
483
|
+
allInternalApplicationsNavbarMenu = _useNavbarStateManage.allInternalApplicationsNavbarMenu,
|
|
484
|
+
allCustomApplicationsNavbarMenu = _useNavbarStateManage.allCustomApplicationsNavbarMenu;
|
|
538
485
|
const useFullRedirectsForLinks = Boolean(props.environment.useFullRedirectsForLinks);
|
|
539
486
|
const location = useLocation();
|
|
540
487
|
const projectPermissions = useMemo(() => {
|
|
541
488
|
var _props$project, _props$project2, _props$project3;
|
|
542
|
-
|
|
543
489
|
return {
|
|
544
490
|
permissions: normalizeAllAppliedPermissions((_props$project = props.project) === null || _props$project === void 0 ? void 0 : _props$project.allPermissionsForAllApplications.allAppliedPermissions),
|
|
545
491
|
actionRights: normalizeAllAppliedActionRights((_props$project2 = props.project) === null || _props$project2 === void 0 ? void 0 : _props$project2.allPermissionsForAllApplications.allAppliedActionRights),
|
|
@@ -548,7 +494,6 @@ const NavBar = props => {
|
|
|
548
494
|
}, [props.project]);
|
|
549
495
|
const menuVisibilities = useMemo(() => {
|
|
550
496
|
var _props$project4;
|
|
551
|
-
|
|
552
497
|
return normalizeAllAppliedMenuVisibilities((_props$project4 = props.project) === null || _props$project4 === void 0 ? void 0 : _props$project4.allPermissionsForAllApplications.allAppliedMenuVisibilities);
|
|
553
498
|
}, [props.project]);
|
|
554
499
|
return jsx(NavBarLayout, {
|
|
@@ -635,7 +580,6 @@ const NavBar = props => {
|
|
|
635
580
|
})
|
|
636
581
|
});
|
|
637
582
|
};
|
|
638
|
-
|
|
639
583
|
NavBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
640
584
|
applicationLocale: _pt.string.isRequired,
|
|
641
585
|
projectKey: _pt.string.isRequired
|
|
@@ -42,9 +42,7 @@ var messages = reactIntl.defineMessages({
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
45
|
-
|
|
46
45
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
47
|
-
|
|
48
46
|
const NewDesignReleaseInfoDialog = props => {
|
|
49
47
|
const intl = reactIntl.useIntl();
|
|
50
48
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
@@ -42,9 +42,7 @@ var messages = reactIntl.defineMessages({
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
45
|
-
|
|
46
45
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
47
|
-
|
|
48
46
|
const NewDesignReleaseInfoDialog = props => {
|
|
49
47
|
const intl = reactIntl.useIntl();
|
|
50
48
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
@@ -26,9 +26,7 @@ var messages = defineMessages({
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
29
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
-
|
|
32
30
|
const NewDesignReleaseInfoDialog = props => {
|
|
33
31
|
const intl = useIntl();
|
|
34
32
|
return jsx(InfoDialog, {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
4
4
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
5
5
|
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
6
|
-
var constants = require('./constants-
|
|
6
|
+
var constants = require('./constants-e51cdcc0.cjs.dev.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
9
|
|
|
@@ -13,54 +13,47 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
13
13
|
|
|
14
14
|
const buildOidcScope = options => {
|
|
15
15
|
var _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
16
|
+
const claims = [];
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
// Set the projectKey
|
|
19
19
|
if (options.projectKey) {
|
|
20
20
|
var _context;
|
|
21
|
-
|
|
22
21
|
claims.push(_concatInstanceProperty__default["default"](_context = "".concat(constants.OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
23
|
-
}
|
|
24
|
-
|
|
22
|
+
}
|
|
25
23
|
|
|
24
|
+
// Set the OAuth Scopes
|
|
26
25
|
claims.push(..._mapInstanceProperty__default["default"](_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, scope => {
|
|
27
26
|
var _context3;
|
|
28
|
-
|
|
29
27
|
return _concatInstanceProperty__default["default"](_context3 = "".concat(constants.OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
30
28
|
}));
|
|
31
29
|
claims.push(..._mapInstanceProperty__default["default"](_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, scope => {
|
|
32
30
|
var _context5;
|
|
33
|
-
|
|
34
31
|
return _concatInstanceProperty__default["default"](_context5 = "".concat(constants.OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
35
|
-
}));
|
|
36
|
-
|
|
32
|
+
}));
|
|
33
|
+
// Set additional OAuth scopes
|
|
37
34
|
if (options !== null && options !== void 0 && options.additionalOAuthScopes) {
|
|
38
35
|
var _context6;
|
|
39
|
-
|
|
40
36
|
_forEachInstanceProperty__default["default"](_context6 = options.additionalOAuthScopes).call(_context6, additionalOAuthScope => {
|
|
41
37
|
var _context7, _additionalOAuthScope, _context9, _additionalOAuthScope2;
|
|
42
|
-
|
|
43
38
|
claims.push(..._mapInstanceProperty__default["default"](_context7 = (_additionalOAuthScope = additionalOAuthScope.view) !== null && _additionalOAuthScope !== void 0 ? _additionalOAuthScope : []).call(_context7, viewOAuthScope => {
|
|
44
39
|
var _context8;
|
|
45
|
-
|
|
46
40
|
return _concatInstanceProperty__default["default"](_context8 = "view/".concat(additionalOAuthScope.name, ":")).call(_context8, viewOAuthScope);
|
|
47
41
|
}), ..._mapInstanceProperty__default["default"](_context9 = (_additionalOAuthScope2 = additionalOAuthScope.manage) !== null && _additionalOAuthScope2 !== void 0 ? _additionalOAuthScope2 : []).call(_context9, manageOAuthScope => {
|
|
48
42
|
var _context10;
|
|
49
|
-
|
|
50
43
|
return _concatInstanceProperty__default["default"](_context10 = "manage/".concat(additionalOAuthScope.name, ":")).call(_context10, manageOAuthScope);
|
|
51
44
|
}));
|
|
52
45
|
});
|
|
53
|
-
}
|
|
54
|
-
|
|
46
|
+
}
|
|
55
47
|
|
|
48
|
+
// Set the teamId
|
|
56
49
|
if (options.teamId) {
|
|
57
50
|
var _context11;
|
|
58
|
-
|
|
59
51
|
claims.push(_concatInstanceProperty__default["default"](_context11 = "".concat(constants.OIDC_CLAIMS.TEAM_ID, ":")).call(_context11, options.teamId));
|
|
60
52
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
constants.OIDC_CLAIMS.OPEN_ID,
|
|
53
|
+
return [
|
|
54
|
+
// This is required as per OIDC spec.
|
|
55
|
+
constants.OIDC_CLAIMS.OPEN_ID,
|
|
56
|
+
// Custom claims
|
|
64
57
|
...claims].join(' ');
|
|
65
58
|
};
|
|
66
59
|
|